1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{10:function(t,n,e){"use strict";e.r(n),e.d(n,"default",(function(){return v}));var r,i=e(0),o=e(1),s=e(13),a=e(3),c=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(s,a)}c((r=r.apply(t,n||[])).next())}))},u=function(t,n){var e,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;s;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=n.call(t,s)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},f=e(17),h=e(14),l=[],p=!1;function d(){return c(this,void 0,void 0,(function(){var t,n,s,c,v,y;return u(this,(function(u){switch(u.label){case 0:if(!(l.length>0)||p)return[3,11];p=!0,t=l.shift(),u.label=1;case 1:if(u.trys.push([1,7,8,10]),!a.a.canSave())throw new Error(i.b.EXCEED_TRY_TIMES);return n=function(t){var n={t:t.logType,c:""+encodeURIComponent(t.content),d:""+Date.now()};return JSON.stringify(n)}(t),t.encryptVersion!==i.a.PLAIN?[3,3]:(y={l:(g=n,f.parse(g).toString(h))},[4,r.addLog(JSON.stringify(y))]);case 2:return[2,u.sent()];case 3:return t.encryptVersion!==i.a.RSA?[3,6]:(s=o.a.get("publicKey"),[4,e.e(3).then(e.bind(null,23))]);case 4:return c=u.sent(),v=c.encryptByRSA(n,""+s),y={l:v.cipherText,iv:v.iv,k:v.secretKey,v:i.a.RSA},[4,r.addLog(JSON.stringify(y))];case 5:return[2,u.sent()];case 6:return[3,10];case 7:throw u.sent();case 8:return p=!1,[4,d()];case 9:return u.sent(),[7];case 10:return[3,0];case 11:return[2]}var g}))}))}function v(t){return c(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:if(s.b.idbIsSupported())return[3,1];throw new Error(i.b.DB_NOT_SUPPORT);case 1:return r||(r=new s.b(o.a.get("dbName"))),l.push(t),[4,d()];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}},12:function(t,n,e){var r;t.exports=(r=r||function(t,n){var e=Object.create||function(){function t(){}return function(n){var e;return t.prototype=n,e=new t,t.prototype=null,e}}(),r={},i=r.lib={},o=i.Base={extend:function(t){var n=e(this);return t&&n.mixIn(t),n.hasOwnProperty("init")&&this.init!==n.init||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},s=i.WordArray=o.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=null!=n?n:4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var n=this.words,e=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=e[o>>>2]>>>24-o%4*8&255;n[r+o>>>2]|=s<<24-(r+o)%4*8}else for(o=0;o<i;o+=4)n[r+o>>>2]=e[o>>>2];return this.sigBytes+=i,this},clamp:function(){var n=this.words,e=this.sigBytes;n[e>>>2]&=4294967295<<32-e%4*8,n.length=t.ceil(e/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(n){for(var e,r=[],i=function(n){n=n;var e=987654321,r=4294967295;return function(){var i=((e=36969*(65535&e)+(e>>16)&r)<<16)+(n=18e3*(65535&n)+(n>>16)&r)&r;return i/=4294967296,(i+=.5)*(t.random()>.5?1:-1)}},o=0;o<n;o+=4){var a=i(4294967296*(e||t.random()));e=987654071*a(),r.push(4294967296*a()|0)}return new s.init(r,n)}}),a=r.enc={},c=a.Hex={stringify:function(t){for(var n=t.words,e=t.sigBytes,r=[],i=0;i<e;i++){var o=n[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var n=t.length,e=[],r=0;r<n;r+=2)e[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new s.init(e,n/2)}},u=a.Latin1={stringify:function(t){for(var n=t.words,e=t.sigBytes,r=[],i=0;i<e;i++){var o=n[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var n=t.length,e=[],r=0;r<n;r++)e[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new s.init(e,n)}},f=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},h=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(n){var e=this._data,r=e.words,i=e.sigBytes,o=this.blockSize,a=i/(4*o),c=(a=n?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*o,u=t.min(4*c,i);if(c){for(var f=0;f<c;f+=o)this._doProcessBlock(r,f);var h=r.splice(0,c);e.sigBytes-=u}return new s.init(h,u)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),l=(i.Hasher=h.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(n,e){return new t.init(e).finalize(n)}},_createHmacHelper:function(t){return function(n,e){return new l.HMAC.init(t,e).finalize(n)}}}),r.algo={});return r}(Math),r)},14:function(t,n,e){var r,i,o;t.exports=(o=e(12),i=(r=o).lib.WordArray,r.enc.Base64={stringify:function(t){var n=t.words,e=t.sigBytes,r=this._map;t.clamp();for(var i=[],o=0;o<e;o+=3)for(var s=(n[o>>>2]>>>24-o%4*8&255)<<16|(n[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|n[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<e;a++)i.push(r.charAt(s>>>6*(3-a)&63));var c=r.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(t){var n=t.length,e=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o<e.length;o++)r[e.charCodeAt(o)]=o}var s=e.charAt(64);if(s){var a=t.indexOf(s);-1!==a&&(n=a)}return function(t,n,e){for(var r=[],o=0,s=0;s<n;s++)if(s%4){var a=e[t.charCodeAt(s-1)]<<s%4*2,c=e[t.charCodeAt(s)]>>>6-s%4*2;r[o>>>2]|=(a|c)<<24-o%4*8,o++}return i.create(r,o)}(t,n,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},17:function(t,n,e){var r;t.exports=(r=e(12),r.enc.Utf8)}}]);
|