@jxstjh/auth-client
Advanced tools
Comparing version 0.0.21 to 0.0.22
@@ -8,2 +8,2 @@ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=22)}([function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";const r=n(18),o=n(19),i=n(20),s=n(21),a=Symbol("encodeFragmentIdentifier");function c(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function u(t,e){return e.encode?e.strict?r(t):encodeURIComponent(t):t}function l(t,e){return e.decode?o(t):t}function f(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function p(t){const e=(t=f(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function d(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function h(t,e){c((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const n=function(t){let e;switch(t.arrayFormat){case"index":return(t,n,r)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n};case"bracket":return(t,n,r)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==r[t]?r[t]=[].concat(r[t],n):r[t]=[n]:r[t]=n};case"comma":case"separator":return(e,n,r)=>{const o="string"==typeof n&&n.includes(t.arrayFormatSeparator),i="string"==typeof n&&!o&&l(n,t).includes(t.arrayFormatSeparator);n=i?l(n,t):n;const s=o||i?n.split(t.arrayFormatSeparator).map(e=>l(e,t)):null===n?n:l(n,t);r[e]=s};case"bracket-separator":return(e,n,r)=>{const o=/(\[\])$/.test(e);if(e=e.replace(/\[\]$/,""),!o)return void(r[e]=n?l(n,t):n);const i=null===n?[]:n.split(t.arrayFormatSeparator).map(e=>l(e,t));void 0!==r[e]?r[e]=[].concat(r[e],i):r[e]=i};default:return(t,e,n)=>{void 0!==n[t]?n[t]=[].concat(n[t],e):n[t]=e}}}(e),r=Object.create(null);if("string"!=typeof t)return r;if(!(t=t.trim().replace(/^[?#&]/,"")))return r;for(const o of t.split("&")){if(""===o)continue;let[t,s]=i(e.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?s:l(s,e),n(l(t,e),s,r)}for(const t of Object.keys(r)){const n=r[t];if("object"==typeof n&&null!==n)for(const t of Object.keys(n))n[t]=d(n[t],e);else r[t]=d(n,e)}return!1===e.sort?r:(!0===e.sort?Object.keys(r).sort():Object.keys(r).sort(e.sort)).reduce((t,e)=>{const n=r[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"==typeof e?t(Object.keys(e)).sort((t,e)=>Number(t)-Number(e)).map(t=>e[t]):e}(n):t[e]=n,t},Object.create(null))}e.extract=p,e.parse=h,e.stringify=(t,e)=>{if(!t)return"";c((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const n=n=>e.skipNull&&null==t[n]||e.skipEmptyString&&""===t[n],r=function(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{const o=n.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[u(e,t),"[",o,"]"].join("")]:[...n,[u(e,t),"[",u(o,t),"]=",u(r,t)].join("")]};case"bracket":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[u(e,t),"[]"].join("")]:[...n,[u(e,t),"[]=",u(r,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e="bracket-separator"===t.arrayFormat?"[]=":"=";return n=>(r,o)=>void 0===o||t.skipNull&&null===o||t.skipEmptyString&&""===o?r:(o=null===o?"":o,0===r.length?[[u(n,t),e,u(o,t)].join("")]:[[r,u(o,t)].join(t.arrayFormatSeparator)])}default:return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,u(e,t)]:[...n,[u(e,t),"=",u(r,t)].join("")]}}(e),o={};for(const e of Object.keys(t))n(e)||(o[e]=t[e]);const i=Object.keys(o);return!1!==e.sort&&i.sort(e.sort),i.map(n=>{const o=t[n];return void 0===o?"":null===o?u(n,e):Array.isArray(o)?0===o.length&&"bracket-separator"===e.arrayFormat?u(n,e)+"[]":o.reduce(r(n),[]).join("&"):u(n,e)+"="+u(o,e)}).filter(t=>t.length>0).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[n,r]=i(t,"#");return Object.assign({url:n.split("?")[0]||"",query:h(p(t),e)},e&&e.parseFragmentIdentifier&&r?{fragmentIdentifier:l(r,e)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);const r=f(t.url).split("?")[0]||"",o=e.extract(t.url),i=e.parse(o,{sort:!1}),s=Object.assign(i,t.query);let c=e.stringify(s,n);c&&(c="?"+c);let l=function(t){let e="";const n=t.indexOf("#");return-1!==n&&(e=t.slice(n)),e}(t.url);return t.fragmentIdentifier&&(l="#"+(n[a]?u(t.fragmentIdentifier,n):t.fragmentIdentifier)),`${r}${c}${l}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);const{url:o,query:i,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:s(i,n),fragmentIdentifier:c},r)},e.exclude=(t,n,r)=>{const o=Array.isArray(n)?t=>!n.includes(t):(t,e)=>!n(t,e);return e.pick(t,o,r)}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r,o; | ||
* Released under the MIT license | ||
*/!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(e,n,e,t):r)||(t.exports=o),!0,t.exports=i(),!!0){var s=window.Cookies,a=window.Cookies=i();a.noConflict=function(){return window.Cookies=s,a}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=t({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var s=JSON.stringify(n);/^[\{\[]/.test(s)&&(n=s)}catch(t){}n=r.write?r.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var c in i)i[c]&&(a+="; "+c,!0!==i[c]&&(a+="="+i[c].split(";")[0]));return document.cookie=e+"="+n+a}}function s(t,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],s=0;s<i.length;s++){var a=i[s].split("="),c=a.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=e(a[0]);if(c=(r.read||r)(c,u)||e(c),n)try{c=JSON.parse(c)}catch(t){}if(o[u]=c,t===u)break}catch(t){}}return t?o[t]:o}}return o.set=i,o.get=function(t){return s(t,!1)},o.getJSON=function(t){return s(t,!0)},o.remove=function(e,n){i(e,"",t(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(n,r){function o(n){t.removeListener(e,i),r(n)}function i(){"function"==typeof t.removeListener&&t.removeListener("error",o),n([].slice.call(arguments))}m(t,e,i,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&m(t,"error",e,n)}(t,o,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function u(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function f(t,e,n,r){var o,i,s,a;if(u(n),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),s=i[e]),void 0===s)s=i[e]=n,++t._eventsCount;else if("function"==typeof s?s=i[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=l(t))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return t}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=p.bind(r);return o.listener=n,r.wrapFn=o,o}function h(t,e,n){var r=t._events;if(void 0===r)return[];var o=r[e];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(o):y(o,o.length)}function v(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function m(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function o(i){r.once&&t.removeEventListener(e,o),n(i)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");c=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[t];if(void 0===c)return!1;if("function"==typeof c)i(c,this,e);else{var u=c.length,l=y(c,u);for(n=0;n<u;++n)i(l[n],this,e)}return!0},a.prototype.addListener=function(t,e){return f(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return f(this,t,e,!0)},a.prototype.once=function(t,e){return u(e),this.on(t,d(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,d(this,t,e)),this},a.prototype.removeListener=function(t,e){var n,r,o,i,s;if(u(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===e||n[i].listener===e){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,o),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return h(this,t,!0)},a.prototype.rawListeners=function(t){return h(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):v.call(t,e)},a.prototype.listenerCount=v,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){var r=n(12),o=n(13),i=n(14),s=n(16);t.exports=function(t,e){return r(t)||o(t,e)||i(t,e)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){t.exports=n(17)},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=n=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(t,e,n,r,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var s=t.apply(e,r);function a(t){n(s,o,i,a,c,"next",t)}function c(t){n(s,o,i,a,c,"throw",t)}a(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t){t.exports=JSON.parse('{"a":"0.0.20"}')},function(t,e,n){"use strict";t.exports=function(t,e,n,r){var o=self||window;try{try{var i;try{i=new o.Blob([t])}catch(e){(i=new(o.BlobBuilder||o.WebKitBlobBuilder||o.MozBlobBuilder||o.MSBlobBuilder)).append(t),i=i.getBlob()}var s=o.URL||o.webkitURL,a=s.createObjectURL(i),c=new o[e](a,n);return s.revokeObjectURL(a),c}catch(r){return new o[e]("data:application/javascript,".concat(encodeURIComponent(t)),n)}}catch(t){if(!r)throw Error("Inline worker is not supported");return new o[e](r,n)}}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);s=!0);}catch(t){a=!0,o=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(15);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),s=new S(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return L()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=w(s,n);if(a){if(a===l)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,s),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function f(){}function p(){}function d(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(k([])));y&&y!==e&&n.call(y,o)&&(h=y);var m=d.prototype=f.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,i){function s(){return new e((function(r,s){!function r(o,i,s,a){var c=u(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}(o,i,r,s)}))}return r=r?r.then(s,s):s()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=m.constructor=d,d.constructor=p,p.displayName=a(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(b.prototype),b.prototype[i]=function(){return this},t.AsyncIterator=b,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var s=new b(c(e,n,r,o),i);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},g(m),a(m,s,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=k,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase())},function(t,e,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function i(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],i(n),i(r))}function s(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(r),n=1;n<e.length;n++)e=(t=i(e,n).join("")).match(r);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=o.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch(t){var r=s(n[0]);r!==n[0]&&(e[n[0]]=r)}n=o.exec(t)}e["%C2"]="�";for(var i=Object.keys(e),a=0;a<i.length;a++){var c=i[a];t=t.replace(new RegExp(c,"g"),e[c])}return t}(t)}}},function(t,e,n){"use strict";t.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];const n=t.indexOf(e);return-1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]}},function(t,e,n){"use strict";t.exports=function(t,e){for(var n={},r=Object.keys(t),o=Array.isArray(e),i=0;i<r.length;i++){var s=r[i],a=t[s];(o?-1!==e.indexOf(s):e(s,a,t))&&(n[s]=a)}return n}},function(t,e,n){"use strict";n.r(e),n.d(e,"AuthClient",(function(){return M})),n.d(e,"SiteAnalysis",(function(){return Ut}));var r,o,i=n(2),s=n.n(i),a=n(4),c=n.n(a),u=n(0),l=n.n(u),f=n(6),p=n.n(f);!function(t){t.SSO="sso",t.DD="dingTalk",t.CUSTOM="custom"}(r||(r={})),function(t){t.HASH="hash",t.HISTORY="history"}(o||(o={}));var d="inited",h="error",v=n(5);function y(t){this.message=t}y.prototype=new Error,y.prototype.name="InvalidCharacterError";"undefined"!=typeof window&&window.atob&&window.atob.bind(window);function m(t){this.message=t}m.prototype=new Error,m.prototype.name="InvalidTokenError";var g,b,w=n(3),_=n.n(w),x=function(t,e,n){_.a.set(t,e,n)},S=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?_.a.getJSON(t):_.a.get(t)},k=function(t){_.a.remove(t)},L=function(t,e){sessionStorage.setItem(t,JSON.stringify(e))},O=n(8),E=n.n(O),j=n(9),I=n.n(j),A=n(7),T=n.n(A),C=function(){var t=I()(T.a.mark((function t(){var e,n,r,o,i,s,a,c,u=arguments;return T.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:"",n=u.length>1&&void 0!==u[1]?u[1]:{},r=u.length>2&&void 0!==u[2]?u[2]:"GET",o=u.length>3&&void 0!==u[3]?u[3]:"fetch",r=r.toUpperCase(),e=e,"GET"==r&&(i="",Object.keys(n).forEach((function(t){i+=t+"="+n[t]+"&"})),""!==i&&(i=i.substr(0,i.lastIndexOf("&")),e=e+"?"+i)),!window.fetch||"fetch"!=o){t.next=25;break}return s={credentials:"include",method:r,headers:{Accept:"application/json","Content-Type":"application/json"},mode:"cors",cache:"force-cache"},"POST"==r&&Object.defineProperty(s,"body",{value:JSON.stringify(n)}),t.prev=10,t.next=13,fetch(e,s);case 13:return a=t.sent,t.next=16,a.json();case 16:return c=t.sent,t.abrupt("return",c);case 20:throw t.prev=20,t.t0=t.catch(10),new Error(t.t0);case 23:t.next=26;break;case 25:return t.abrupt("return",new Promise((function(t,o){var i;i=window.XMLHttpRequest?new XMLHttpRequest:new window.ActiveXObject;var s="";"POST"==r&&(s=JSON.stringify(n)),i.open(r,e,!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.send(s),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status){var e=i.response;"object"!==E()(e)&&(e=JSON.parse(e)),t(e)}else o(i)}})));case 26:case"end":return t.stop()}}),t,null,[[10,20]])})));return function(){return t.apply(this,arguments)}}(),P=n(1),N="JH_AUTH_CLIENT_BASE",U=function(t,e){var n=new RegExp("(^|&)"+t+"=([^&]*)(&|$)");if(e===o.HASH){var r=window.location.hash.split("?")[1];return P.parse(r)[t]}var i=window.location.search.substr(1).match(n);return null!=i?decodeURI(i[2]):null},M=function(){function t(e){var n,i=this;if(s()(this,t),this.option=e,l()(this,"_tokenInfo",void 0),l()(this,"_user",void 0),l()(this,"_emitter",new v),l()(this,"_href",void 0),l()(this,"_permissionList",void 0),e.SSOServer){this.option=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={SSOServer:"https://auth-test.jxwrd.gov.cn/",resourceCode:"code",jwtToken:!0,routerMode:o.HASH,method:r.SSO,cacheInCookie:!1};return Object.assign(e,t)}(e),this._href=function(t,e){if(e===o.HISTORY){var n=P.parse(location.search);delete n[t];var r=window.location;return Object.keys(n).length>0?r.origin+r.pathname+P.stringify(n):r.origin+r.pathname}var i=window.location.hash.split("?"),s=p()(i,2),a=s[0],c=s[1],u=P.parse(c);if(delete u[t],Object.keys(u).length>0){var l=P.stringify(u);return window.location.origin+window.location.pathname+a+"?"+l}return window.location.origin+window.location.pathname+a}("tmpTicket",e.routerMode);var a=(n=N+"_isDirty",JSON.parse(sessionStorage.getItem(n)));this.init(a)}else setTimeout((function(){i._emitter.emit(h,"SSOServer必传")}),0)}return c()(t,[{key:"token",get:function(){return this._tokenInfo.access_token}},{key:"tokenInfo",get:function(){return this._tokenInfo},set:function(t){this._tokenInfo=t}},{key:"user",get:function(){return this._user},set:function(t){this._user=t}},{key:"permissionList",get:function(){return this._permissionList},set:function(t){this._permissionList=t}},{key:"init",value:function(t){var e=this;if(t&&this.getCookieCache()){var n=this.user,o=this.tokenInfo,i=this.permissionList,s=U("tmpTicket",this.option.routerMode);s&&"null"!==s&&"undefined"!==s?this.validateBytmpTicket(s):setTimeout((function(){e._emitter.emit(d,{umsAdmin:n,tokenInfo:o,permissionList:i})}),0)}else switch(this.option.method){case r.CUSTOM:return;case r.SSO:return void this.initSSOMethod()}}},{key:"getCookieCache",value:function(){return this.user=S(N+"_user",!0),this.tokenInfo=S(N+"_tokenInfo",!0),this.permissionList=S(N+"_permissionList",!0),!(!this.user||!this.tokenInfo)||(this.removeAllCookie(),!1)}},{key:"removeAllCookie",value:function(){k(N+"_user"),k(N+"_tokenInfo"),k(N+"_permissionList"),L(N+"_isDirty",!1)}},{key:"setAllCookies",value:function(){var t={expires:(this.tokenInfo&&this.tokenInfo.expires_in||3600)/3600/24};x(N+"_user",this.user,t),x(N+"_tokenInfo",this.tokenInfo,t),x(N+"_permissionList",this.permissionList,t)}},{key:"initSSOMethod",value:function(){var t=U("tmpTicket",this.option.routerMode);if(L(N+"_isDirty",!0),t&&"null"!==t&&"undefined"!==t)this.validateBytmpTicket(t);else{var e=encodeURIComponent(this._href);window.location.href="".concat(this.option.SSOServer,"?code=").concat(this.option.resourceCode,"&returnUrl=").concat(e)}}},{key:"validateBytmpTicket",value:function(t){var e=this;return new Promise((function(n,r){C(e.option.SSOServer+"/web/verify-tmp-ticket?tmpTicket="+t,{},"post").then((function(t){if(0===t.code){var o=t.data,i=o.umsAdmin,s=o.tokenInfo,a=o.permissionList;e.user=i,e.tokenInfo=s,e.permissionList=a||[],e.setAllCookies(),e._emitter.emit(d,t.data),setTimeout((function(){e.fixUrlQuery()}),0),n(t.data)}else e._emitter.emit(h,t),r(t)})).catch((function(t){e._emitter.emit(h,t),r(t)}))}))}},{key:"serverLogout",value:function(){var t=this;return new Promise((function(e,n){var r=t.user.loginName,o=t.tokenInfo.access_token;C(t.option.SSOServer+"/web/users/login-out",{username:r,authToken:o},"GET").then((function(t){t?e(t):n(t)})).catch((function(t){n(t)}))}))}},{key:"fixUrlQuery",value:function(){!function(t,e){if(e===o.HISTORY){var n=P.parse(location.search);delete n[t];var r=window.location,i=Object.keys(n).length>0?r.origin+r.pathname+P.stringify(n):r.origin+r.pathname;"pushState"in history?history.replaceState(null,null,i):window.location.replace(i)}else{var s=window.location.hash.split("?"),a=p()(s,2),c=a[0],u=a[1],l=P.parse(u);if(delete l[t],Object.keys(l).length>0){var f=P.stringify(l);window.location.hash=c+"?"+f}else window.location.hash=c}}("tmpTicket",this.option.routerMode)}},{key:"on",value:function(t,e){this._emitter.addListener(t,e)}},{key:"off",value:function(t,e){this._emitter.removeListener(t,e)}},{key:"logout",value:function(){var t=this;this.serverLogout().then((function(){t.removeAllCookie();var e=encodeURIComponent(t._href);window.location.href="".concat(t.option.SSOServer,"?code=").concat(t.option.resourceCode,"&returnUrl=").concat(e)})).catch((function(t){alert("登出错误"+String(t))}))}},{key:"destroy",value:function(){this._emitter.removeAllListeners(),this._emitter=null}}]),t}();!function(t){t.HASH="hash",t.HISTORY="history"}(g||(g={})),function(t){t[t.LOGIN=0]="LOGIN",t[t.PAGE=1]="PAGE"}(b||(b={}));var R="error";function F(){return(65536*(1+Math.random())|0).toString(16).substring(1)}var B=function(){return F()+F()+"-"+F()+"-"+F()+"-"+F()+"-"+F()+F()+F()},G=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return-1!==t.indexOf("127.0.0.1")||t.indexOf("localhost")},H=n(10),D=function(t,e){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function q(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}D(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function J(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function Y(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t}Object.create;function W(t){return"function"==typeof t}var X,z=((X=function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}((function(t){Error.call(t),t.stack=(new Error).stack}))).prototype=Object.create(Error.prototype),X.prototype.constructor=X,X);function K(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Q=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=J(i),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else i.remove(this);var c=this.initialTeardown;if(W(c))try{c()}catch(t){o=t instanceof z?t.errors:[t]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var l=J(u),f=l.next();!f.done;f=l.next()){var p=f.value;try{Z(p)}catch(t){o=null!=o?o:[],t instanceof z?o=Y(Y([],$(o)),$(t.errors)):o.push(t)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(o)throw new z(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Z(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(n=this._teardowns)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&K(e,t)},t.prototype.remove=function(e){var n=this._teardowns;n&&K(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}();Q.EMPTY;function V(t){return t instanceof Q||t&&"closed"in t&&W(t.remove)&&W(t.add)&&W(t.unsubscribe)}function Z(t){W(t)?t():t.unsubscribe()}var tt=function(t){function e(e,n){return t.call(this)||this}return q(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(Q),et={setInterval:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=et.delegate;return((null==n?void 0:n.setInterval)||setInterval).apply(void 0,Y([],$(t)))},clearInterval:function(t){var e=et.delegate;return((null==e?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},nt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return q(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),et.setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return e;et.clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,K(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(tt),rt={now:function(){return(rt.delegate||Date).now()},delegate:void 0},ot=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=rt.now,t}(),it=new(function(t){function e(e,n){void 0===n&&(n=ot.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return q(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(ot))(nt),st=it,at={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ct={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ct.delegate;return((null==n?void 0:n.setTimeout)||setTimeout).apply(void 0,Y([],$(t)))},clearTimeout:function(t){var e=ct.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function ut(t){ct.setTimeout((function(){var e=at.onUnhandledError;if(!e)throw t;e(t)}))}function lt(){}var ft=pt("C",void 0,void 0);function pt(t,e,n){return{kind:t,value:e,error:n}}var dt=null;function ht(t){at.useDeprecatedSynchronousErrorHandling&&dt&&(dt.errorThrown=!0,dt.error=t)}var vt=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,V(e)&&e.add(n)):n.destination=wt,n}return q(e,t),e.create=function(t,e,n){return new yt(t,e,n)},e.prototype.next=function(t){this.isStopped?bt(function(t){return pt("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?bt(pt("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?bt(ft,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Q),yt=function(t){function e(e,n,r){var o,i=t.call(this)||this;if(W(e))o=e;else if(e){var s;o=e.next,n=e.error,r=e.complete,i&&at.useDeprecatedNextContext?(s=Object.create(e)).unsubscribe=function(){return i.unsubscribe()}:s=e,o=null==o?void 0:o.bind(s),n=null==n?void 0:n.bind(s),r=null==r?void 0:r.bind(s)}return i.destination={next:o?mt(o,i):lt,error:mt(null!=n?n:gt,i),complete:r?mt(r,i):lt},i}return q(e,t),e}(vt);function mt(t,e){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{t.apply(void 0,Y([],$(e)))}catch(t){at.useDeprecatedSynchronousErrorHandling?ht(t):ut(t)}}}function gt(t){throw t}function bt(t,e){var n=at.onStoppedNotification;n&&ct.setTimeout((function(){return n(t,e)}))}var wt={closed:!0,next:lt,error:gt,complete:lt},_t="function"==typeof Symbol&&Symbol.observable||"@@observable";function xt(t){return t}function St(t){return 0===t.length?xt:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var kt=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,o=this,i=(r=t)&&r instanceof vt||function(t){return t&&W(t.next)&&W(t.error)&&W(t.complete)}(r)&&V(r)?t:new yt(t,e,n);return function(t){if(at.useDeprecatedSynchronousErrorHandling){var e=!dt;if(e&&(dt={errorThrown:!1,error:null}),t(),e){var n=dt,r=n.errorThrown,o=n.error;if(dt=null,r)throw o}}else t()}((function(){var t=o,e=t.operator,n=t.source;i.add(e?e.call(i,n):n?o._subscribe(i):o._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=Lt(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),null==o||o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[_t]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return St(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Lt(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function Lt(t){var e;return null!==(e=null!=t?t:at.Promise)&&void 0!==e?e:Promise}function Ot(t,e,n){void 0===t&&(t=0),void 0===n&&(n=st);var r,o=-1;return null!=e&&((r=e)&&W(r.schedule)?n=e:o=e),new kt((function(e){var r=function(t){return t instanceof Date&&!isNaN(t)}(t)?+t-n.now():t;r<0&&(r=0);var i=0;return n.schedule((function(){e.closed||(e.next(i++),0<=o?this.schedule(void 0,o):e.complete())}),r)}))}function Et(t){return function(e){if(function(t){return W(null==t?void 0:t.lift)}(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")}}var jt=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.onFinalize=i,s._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,s._error=o?function(t){try{o(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return q(e,t),e.prototype.unsubscribe=function(){var e,n=this.closed;t.prototype.unsubscribe.call(this),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))},e}(vt);var It=n(11),At=n.n(It);function Tt(){return At()('!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var o={get(e,t=null){return this.fetch("GET",e,t)},post(e,t=null){return this.fetch("POST",e,t)},put(e,t=null){return this.fetch("PUT",e,t)},del(e,t=null){return this.fetch("DELETE",e,t)},ajax:(e,t,n,o={})=>new Promise((r,s)=>{let a=new XMLHttpRequest;a.responseType="json",a.onload=()=>{switch(a.status){case 200:r(a.response);break;case 204:r();break;case 401:s();break;default:s({status:a.status,res:a.response})}},n&&(n=JSON.stringify(n)),a.open(e,t,!0),Object.entries(o).forEach(([e,t])=>{a.setRequestHeader(e,t)}),a.setRequestHeader("Content-type","application/json"),a.send(n)}),fetch(e,t,n){if(window&&!window.fetch)return this.ajax(e,t,n);let o=[],r={method:e,mode:"cors",headers:{"Content-Type":"application/json"}};if(n){for(let e in n)o.push(`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`);"GET"===e?t+="?"+o.join("&"):r.body=JSON.stringify(n)}return fetch(t,r).then(e=>{switch(e.status){case 200:return e.json();case 204:break;case 401:return Promise.reject();case 403:return e.json().then(e=>Promise.reject(e));default:return Promise.reject({status_code:500,message:"服务器繁忙, 请稍后再试"})}})}};onmessage=function(e){switch(e.data.cmd){case"UPLOADLOGLIST":const t=e.data.url,n=e.data.log;!function(e,t,n=[],r){const s=n.map(e=>e.id),a=(e=>{const t=[];for(;e.length>0;){const n=e.pop();if(t.find(e=>e.login_name===n.login_name)){const e=t.find(e=>e.login_name===n.login_name&&e.log_type===n.log_type);e?e.count+=1:t.push(n)}else t.push(n)}return t})(n).map(e=>({appId:t,count:e.count,dataType:e.log_type,identify:e.login_name})),c={"Stjh-Real-IP":r+""};o.ajax("post",e+"/site-statistics",a,c).then((function(e){0===e.code&&postMessage({cmd:"UPLOAD_SUCCESS",ids:s})})).catch((function(e){}))}(t,e.data.appId,n,e.data.ip);break;case"GETIP":o.ajax("get","http://pv.sohu.com/cityjson?ie=utf-8",null,{}).then((function(e){console.log(e,"--")})).catch((function(e){}))}}}]);',"Worker",void 0,n.p+"index.worker.js")}var Ct=function(t,e){return new Promise((function(n,r){t||r(" DB null"),t.transaction((function(t){t.executeSql("".concat(e),[],(function(t,e){n(e)}),(function(t,e){console.log("select table error"),console.dir(e),r(e)}))}))}))},Pt=H.a,Nt=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s()(this,t),this.log_type=e,this.login_name=n,this.is_upload=r,l()(this,"id",void 0),l()(this,"url",void 0),l()(this,"creater_date",void 0),l()(this,"count",void 0),this.log_type=e,this.id=B(),this.url=location.href,this.creater_date=(new Date).getTime(),this.count=1},Ut=function(){function t(e){var n=this;if(s()(this,t),this.option=e,l()(this,"id",void 0),l()(this,"_loginName",void 0),l()(this,"e",void 0),l()(this,"_db",void 0),l()(this,"_prod",void 0),l()(this,"_version",void 0),l()(this,"_ip",void 0),l()(this,"_worker",void 0),l()(this,"_emitter",new v),l()(this,"$upLoadSubction",void 0),l()(this,"sqlUnLoadLog",(function(){return new Promise((function(t,e){Ct(n.db,"SELECT * FROM LOG_TABLE WHERE is_upload=0").then((function(n){var r=Array.prototype.slice.call(n.rows);Array.isArray(r)&&r.length>0?t(r):e([])})).catch((function(t){e(t)}))}))})),l()(this,"clearUploaded",(function(){return new Promise((function(t,e){Ct(n.db,"DELETE FROM LOG_TABLE WHERE is_upload=1").then((function(e){var n=Array.prototype.slice.call(e.rows);Array.isArray(n)?t(n):t([])})).catch((function(t){e(t)}))}))})),l()(this,"onWorker",(function(t){switch(t.data.cmd){case"UPLOAD_SUCCESS":var e=t.data.ids;n.upLoaderServerSuccess(e)}})),window.jxstjh_siteAnalysis)return window.jxstjh_siteAnalysis;this.id="ac"+B(),this._prod=this.option.production,this._version=Pt,e&&e.siteAnalysisServer?(this.option=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={siteAnalysisServer:"https://auth-test.jxwrd.gov.cn/",appId:"code",routerMode:g.HASH,interval:10,production:!1};return Object.assign(e,t)}(e),this.e={onPageChange:this._onPageChange.bind(this),onUserLogin:this._onUserLogin.bind(this)},this._worker=new Tt,this._worker.onmessage=this.onWorker,this.getIPbyFront(),this._prod&&this.init()):setTimeout((function(){n._emitter.emit(R,"siteAnalysisServer必传")}),0),window.jxstjh_siteAnalysis=this}return c()(t,[{key:"db",get:function(){return this._db},set:function(t){this._db=t}},{key:"loginName",get:function(){return this._loginName},set:function(t){this._loginName=t}},{key:"init",value:function(){var t,e,n,r,o,i=this,s=this.option.appId;this.db=window.openDatabase("SA"+s,"1.0","JXSTJH_SITE_ANALYSIS",50331648),(t=this.db,new Promise((function(e,n){t?t.transaction((function(t){t.executeSql("create table if not exists LOG_TABLE(id varchar(32),url varchar(256), login_name varchar(20), creater_date varchar(20), log_type int, count int, is_upload int)",[],(function(t,n){e(n)}),(function(t){console.log("INIT_LOG_TABLE 失败"),n(t)}))})):n(" DB null")}))).catch((function(t){i._emitter.emit(R,t)})),this.$upLoadSubction=(r=1e3*this.option.interval,void 0===r&&(r=0),void 0===o&&(o=it),r<0&&(r=0),Ot(r,r,o)).pipe((e=function(){return!!i.db&&i._prod},Et((function(t,r){var o=0;t.subscribe(new jt(r,(function(t){return e.call(n,t,o++)&&r.next(t)})))})))).subscribe((function(){i.sqlUnLoadLog().then((function(t){return i.upLoadLog(t)})).then((function(){return i.clearUploaded()})).catch((function(){}))})),this.insetLogMsg(b.PAGE)}},{key:"getIPbyFront",value:function(){var t=this;if(!document.getElementById("sohuIp")){var e=document.createElement("script");e.id="sohuIp",e.src="http://pv.sohu.com/cityjson?ie=utf-8",e.onload=function(){t._ip=window.returnCitySN&&window.returnCitySN.cip},document.body.appendChild(e)}}},{key:"setLoginName",value:function(t){return this.loginName=t,this._prod?this._onUserLogin():Promise.resolve("recordPage in production only")}},{key:"_onPageChange",value:function(){this.insetLogMsg(b.PAGE)}},{key:"_onUserLogin",value:function(){var t=this;return new Promise((function(e,n){var r=new Nt(b.LOGIN,t.loginName,0);if(!G(r.url)||t.option.production){var o="INSERT INTO LOG_TABLE (id, url, login_name, creater_date, log_type, count, is_upload) VALUES ('".concat(r.id,"','").concat(r.url,"','").concat(r.login_name,"','").concat(r.creater_date,"',").concat(r.log_type,",").concat(r.count,",").concat(r.is_upload,")");Ct(t.db,o).then((function(){e("插入数据成功!")})).catch((function(t){n(t)}))}else e("本地环境")}))}},{key:"recordPage",value:function(){return this._prod?this.insetLogMsg(b.PAGE):Promise.resolve("recordPage in production only")}},{key:"insetLogMsg",value:function(t){var e=this;return new Promise((function(n,r){var o=new Nt(t,e.loginName,0);if(!G(o.url)||e.option.production){var i="INSERT INTO LOG_TABLE (id, url, login_name, creater_date, log_type, count, is_upload) VALUES ('".concat(o.id,"','").concat(o.url,"','").concat(o.login_name,"','").concat(o.creater_date,"',").concat(o.log_type,",").concat(o.count,",").concat(o.is_upload,")");Ct(e.db,i).then((function(){n("插入数据成功!")})).catch((function(t){r(t)}))}else n("本地环境")}))}},{key:"upLoadLog",value:function(t){var e=this;return new Promise((function(n){var r=e.option.appId;e._worker.postMessage({cmd:"UPLOADLOGLIST",url:e.option.siteAnalysisServer,log:t,appId:r,ip:e._ip}),n(!0)}))}},{key:"upLoaderServerSuccess",value:function(t){var e=this;return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"success";"success"===n?console.log("%c".concat(t,"%c").concat(e),"background: #00d1b2; padding: 5px; color: #fff; border-radius: 5px 0 0 5px","background: #555; padding: 5px; color: #fff; border-radius: 0 5px 5px 0"):"error"===n?console.log("%c".concat(t,"%c").concat(e),"background: #f5222d; padding: 5px; color: #fff; border-radius: 5px 0 0 5px","background: #555; padding: 5px; color: #fff; border-radius: 0 5px 5px 0"):"warn"===n&&console.log("%c".concat(t,"%c").concat(e),"background: #fa8c16; padding: 5px; color: #fff; border-radius: 5px 0 0 5px","background: #555; padding: 5px; color: #fff; border-radius: 0 5px 5px 0")}("JH_SA","upLoaderServerSuccess!","success"),new Promise((function(n,r){t.length<1&&r("length 0");var o="DELETE FROM LOG_TABLE WHERE id in (";t.forEach((function(e,n){n===t.length-1?o+="'".concat(e,"'"):o+="'".concat(e,"',")})),o+=")",Ct(e.db,o).then((function(){n(!0)})).catch((function(t){r(t)}))}))}},{key:"destroy",value:function(){this.e=null,this._emitter.removeAllListeners(),this.$upLoadSubction.unsubscribe(),this._emitter=null}}]),t}()}])})); | ||
*/!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(e,n,e,t):r)||(t.exports=o),!0,t.exports=i(),!!0){var s=window.Cookies,a=window.Cookies=i();a.noConflict=function(){return window.Cookies=s,a}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=t({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var s=JSON.stringify(n);/^[\{\[]/.test(s)&&(n=s)}catch(t){}n=r.write?r.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var c in i)i[c]&&(a+="; "+c,!0!==i[c]&&(a+="="+i[c].split(";")[0]));return document.cookie=e+"="+n+a}}function s(t,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],s=0;s<i.length;s++){var a=i[s].split("="),c=a.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=e(a[0]);if(c=(r.read||r)(c,u)||e(c),n)try{c=JSON.parse(c)}catch(t){}if(o[u]=c,t===u)break}catch(t){}}return t?o[t]:o}}return o.set=i,o.get=function(t){return s(t,!1)},o.getJSON=function(t){return s(t,!0)},o.remove=function(e,n){i(e,"",t(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(n,r){function o(n){t.removeListener(e,i),r(n)}function i(){"function"==typeof t.removeListener&&t.removeListener("error",o),n([].slice.call(arguments))}m(t,e,i,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&m(t,"error",e,n)}(t,o,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function u(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function f(t,e,n,r){var o,i,s,a;if(u(n),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),s=i[e]),void 0===s)s=i[e]=n,++t._eventsCount;else if("function"==typeof s?s=i[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=l(t))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return t}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=p.bind(r);return o.listener=n,r.wrapFn=o,o}function h(t,e,n){var r=t._events;if(void 0===r)return[];var o=r[e];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(o):y(o,o.length)}function v(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function m(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function o(i){r.once&&t.removeEventListener(e,o),n(i)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");c=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[t];if(void 0===c)return!1;if("function"==typeof c)i(c,this,e);else{var u=c.length,l=y(c,u);for(n=0;n<u;++n)i(l[n],this,e)}return!0},a.prototype.addListener=function(t,e){return f(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return f(this,t,e,!0)},a.prototype.once=function(t,e){return u(e),this.on(t,d(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,d(this,t,e)),this},a.prototype.removeListener=function(t,e){var n,r,o,i,s;if(u(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===e||n[i].listener===e){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,o),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return h(this,t,!0)},a.prototype.rawListeners=function(t){return h(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):v.call(t,e)},a.prototype.listenerCount=v,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){var r=n(12),o=n(13),i=n(14),s=n(16);t.exports=function(t,e){return r(t)||o(t,e)||i(t,e)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){t.exports=n(17)},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=n=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(t,e,n,r,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var s=t.apply(e,r);function a(t){n(s,o,i,a,c,"next",t)}function c(t){n(s,o,i,a,c,"throw",t)}a(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t){t.exports=JSON.parse('{"a":"0.0.21"}')},function(t,e,n){"use strict";t.exports=function(t,e,n,r){var o=self||window;try{try{var i;try{i=new o.Blob([t])}catch(e){(i=new(o.BlobBuilder||o.WebKitBlobBuilder||o.MozBlobBuilder||o.MSBlobBuilder)).append(t),i=i.getBlob()}var s=o.URL||o.webkitURL,a=s.createObjectURL(i),c=new o[e](a,n);return s.revokeObjectURL(a),c}catch(r){return new o[e]("data:application/javascript,".concat(encodeURIComponent(t)),n)}}catch(t){if(!r)throw Error("Inline worker is not supported");return new o[e](r,n)}}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);s=!0);}catch(t){a=!0,o=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(15);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),s=new S(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=w(s,n);if(a){if(a===l)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,s),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function f(){}function p(){}function d(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(L([])));y&&y!==e&&n.call(y,o)&&(h=y);var m=d.prototype=f.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,i){function s(){return new e((function(r,s){!function r(o,i,s,a){var c=u(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}(o,i,r,s)}))}return r=r?r.then(s,s):s()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function L(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=m.constructor=d,d.constructor=p,p.displayName=a(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(b.prototype),b.prototype[i]=function(){return this},t.AsyncIterator=b,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var s=new b(c(e,n,r,o),i);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},g(m),a(m,s,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=L,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:L(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase())},function(t,e,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function i(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],i(n),i(r))}function s(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(r),n=1;n<e.length;n++)e=(t=i(e,n).join("")).match(r);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=o.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch(t){var r=s(n[0]);r!==n[0]&&(e[n[0]]=r)}n=o.exec(t)}e["%C2"]="�";for(var i=Object.keys(e),a=0;a<i.length;a++){var c=i[a];t=t.replace(new RegExp(c,"g"),e[c])}return t}(t)}}},function(t,e,n){"use strict";t.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];const n=t.indexOf(e);return-1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]}},function(t,e,n){"use strict";t.exports=function(t,e){for(var n={},r=Object.keys(t),o=Array.isArray(e),i=0;i<r.length;i++){var s=r[i],a=t[s];(o?-1!==e.indexOf(s):e(s,a,t))&&(n[s]=a)}return n}},function(t,e,n){"use strict";n.r(e),n.d(e,"AuthClient",(function(){return M})),n.d(e,"SiteAnalysis",(function(){return Mt}));var r,o,i=n(2),s=n.n(i),a=n(4),c=n.n(a),u=n(0),l=n.n(u),f=n(6),p=n.n(f);!function(t){t.SSO="sso",t.DD="dingTalk",t.CUSTOM="custom"}(r||(r={})),function(t){t.HASH="hash",t.HISTORY="history"}(o||(o={}));var d="inited",h="error",v=n(5);function y(t){this.message=t}y.prototype=new Error,y.prototype.name="InvalidCharacterError";"undefined"!=typeof window&&window.atob&&window.atob.bind(window);function m(t){this.message=t}m.prototype=new Error,m.prototype.name="InvalidTokenError";var g,b,w=n(3),_=n.n(w),x=function(t,e,n){_.a.set(t,e,n)},S=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?_.a.getJSON(t):_.a.get(t)},L=function(t){_.a.remove(t)},k=function(t,e){sessionStorage.setItem(t,JSON.stringify(e))},O=n(8),E=n.n(O),j=n(9),I=n.n(j),A=n(7),T=n.n(A),C=function(){var t=I()(T.a.mark((function t(){var e,n,r,o,i,s,a,c,u=arguments;return T.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:"",n=u.length>1&&void 0!==u[1]?u[1]:{},r=u.length>2&&void 0!==u[2]?u[2]:"GET",o=u.length>3&&void 0!==u[3]?u[3]:"fetch",r=r.toUpperCase(),e=e,"GET"==r&&(i="",Object.keys(n).forEach((function(t){i+=t+"="+n[t]+"&"})),""!==i&&(i=i.substr(0,i.lastIndexOf("&")),e=e+"?"+i)),!window.fetch||"fetch"!=o){t.next=25;break}return s={credentials:"include",method:r,headers:{Accept:"application/json","Content-Type":"application/json"},mode:"cors",cache:"force-cache"},"POST"==r&&Object.defineProperty(s,"body",{value:JSON.stringify(n)}),t.prev=10,t.next=13,fetch(e,s);case 13:return a=t.sent,t.next=16,a.json();case 16:return c=t.sent,t.abrupt("return",c);case 20:throw t.prev=20,t.t0=t.catch(10),new Error(t.t0);case 23:t.next=26;break;case 25:return t.abrupt("return",new Promise((function(t,o){var i;i=window.XMLHttpRequest?new XMLHttpRequest:new window.ActiveXObject;var s="";"POST"==r&&(s=JSON.stringify(n)),i.open(r,e,!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.send(s),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status){var e=i.response;"object"!==E()(e)&&(e=JSON.parse(e)),t(e)}else o(i)}})));case 26:case"end":return t.stop()}}),t,null,[[10,20]])})));return function(){return t.apply(this,arguments)}}(),P=n(1),N="JH_AUTH_CLIENT_BASE",U=function(t,e){var n=new RegExp("(^|&)"+t+"=([^&]*)(&|$)");if(e===o.HASH){var r=window.location.hash.split("?")[1];return P.parse(r)[t]}var i=window.location.search.substr(1).match(n);return null!=i?decodeURI(i[2]):null},M=function(){function t(e){var n,i=this;if(s()(this,t),this.option=e,l()(this,"_tokenInfo",void 0),l()(this,"_user",void 0),l()(this,"_emitter",new v),l()(this,"_href",void 0),l()(this,"_permissionList",void 0),e.SSOServer){this.option=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={SSOServer:"https://auth-test.jxwrd.gov.cn/",resourceCode:"code",jwtToken:!0,routerMode:o.HASH,method:r.SSO,cacheInCookie:!1};return Object.assign(e,t)}(e),this._href=function(t,e){if(e===o.HISTORY){var n=P.parse(location.search);delete n[t];var r=window.location;return Object.keys(n).length>0?r.origin+r.pathname+P.stringify(n):r.origin+r.pathname}var i=window.location.hash.split("?"),s=p()(i,2),a=s[0],c=s[1],u=P.parse(c);if(delete u[t],Object.keys(u).length>0){var l=P.stringify(u);return window.location.origin+window.location.pathname+a+"?"+l}return window.location.origin+window.location.pathname+a}("tmpTicket",e.routerMode);var a=(n=N+"_isDirty",JSON.parse(sessionStorage.getItem(n)));this.init(a)}else setTimeout((function(){i._emitter.emit(h,"SSOServer必传")}),0)}return c()(t,[{key:"token",get:function(){return this._tokenInfo.access_token}},{key:"tokenInfo",get:function(){return this._tokenInfo},set:function(t){this._tokenInfo=t}},{key:"user",get:function(){return this._user},set:function(t){this._user=t}},{key:"permissionList",get:function(){return this._permissionList},set:function(t){this._permissionList=t}},{key:"init",value:function(t){var e=this;if(t&&this.getCookieCache()){var n=this.user,o=this.tokenInfo,i=this.permissionList,s=U("tmpTicket",this.option.routerMode);s&&"null"!==s&&"undefined"!==s?this.validateBytmpTicket(s):setTimeout((function(){e._emitter.emit(d,{umsAdmin:n,tokenInfo:o,permissionList:i})}),0)}else switch(this.option.method){case r.CUSTOM:return;case r.SSO:return void this.initSSOMethod()}}},{key:"getCookieCache",value:function(){return this.user=S(N+"_user",!0),this.tokenInfo=S(N+"_tokenInfo",!0),this.permissionList=S(N+"_permissionList",!0),!(!this.user||!this.tokenInfo)||(this.removeAllCookie(),!1)}},{key:"removeAllCookie",value:function(){L(N+"_user"),L(N+"_tokenInfo"),L(N+"_permissionList"),k(N+"_isDirty",!1)}},{key:"setAllCookies",value:function(){var t={expires:(this.tokenInfo&&this.tokenInfo.expires_in||3600)/3600/24};x(N+"_user",this.user,t),x(N+"_tokenInfo",this.tokenInfo,t),x(N+"_permissionList",this.permissionList,t)}},{key:"initSSOMethod",value:function(){var t=U("tmpTicket",this.option.routerMode);if(k(N+"_isDirty",!0),t&&"null"!==t&&"undefined"!==t)this.validateBytmpTicket(t);else{var e=encodeURIComponent(this._href);window.location.href="".concat(this.option.SSOServer,"?code=").concat(this.option.resourceCode,"&returnUrl=").concat(e)}}},{key:"validateBytmpTicket",value:function(t){var e=this;return new Promise((function(n,r){C(e.option.SSOServer+"/web/verify-tmp-ticket?tmpTicket="+t,{},"post").then((function(t){if(0===t.code){var o=t.data,i=o.umsAdmin,s=o.tokenInfo,a=o.permissionList;e.user=i,e.tokenInfo=s,e.permissionList=a||[],e.setAllCookies(),e._emitter.emit(d,t.data),setTimeout((function(){e.fixUrlQuery()}),0),n(t.data)}else e._emitter.emit(h,t),r(t)})).catch((function(t){e._emitter.emit(h,t),r(t)}))}))}},{key:"serverLogout",value:function(){var t=this;return new Promise((function(e,n){var r=t.user.loginName,o=t.tokenInfo.access_token;C(t.option.SSOServer+"/web/users/login-out",{username:r,authToken:o},"GET").then((function(t){t?e(t):n(t)})).catch((function(t){n(t)}))}))}},{key:"fixUrlQuery",value:function(){!function(t,e){if(e===o.HISTORY){var n=P.parse(location.search);delete n[t];var r=window.location,i=Object.keys(n).length>0?r.origin+r.pathname+P.stringify(n):r.origin+r.pathname;"pushState"in history?history.replaceState(null,null,i):window.location.replace(i)}else{var s=window.location.hash.split("?"),a=p()(s,2),c=a[0],u=a[1],l=P.parse(u);if(delete l[t],Object.keys(l).length>0){var f=P.stringify(l);window.location.hash=c+"?"+f}else window.location.hash=c}}("tmpTicket",this.option.routerMode)}},{key:"on",value:function(t,e){this._emitter.addListener(t,e)}},{key:"off",value:function(t,e){this._emitter.removeListener(t,e)}},{key:"logout",value:function(){var t=this;this.serverLogout().then((function(){t.removeAllCookie();var e=encodeURIComponent(t._href);window.location.href="".concat(t.option.SSOServer,"?code=").concat(t.option.resourceCode,"&returnUrl=").concat(e)})).catch((function(t){alert("登出错误"+String(t))}))}},{key:"destroy",value:function(){this._emitter.removeAllListeners(),this._emitter=null}}]),t}();!function(t){t.HASH="hash",t.HISTORY="history"}(g||(g={})),function(t){t[t.LOGIN=0]="LOGIN",t[t.PAGE=1]="PAGE"}(b||(b={}));var R="error";function F(){return(65536*(1+Math.random())|0).toString(16).substring(1)}var H=function(){return F()+F()+"-"+F()+"-"+F()+"-"+F()+"-"+F()+F()+F()},B=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return-1!==t.indexOf("127.0.0.1")||t.indexOf("localhost")},G=n(10),D=function(t,e){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function J(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}D(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function q(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function Y(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t}Object.create;function W(t){return"function"==typeof t}var X,Q=((X=function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}((function(t){Error.call(t),t.stack=(new Error).stack}))).prototype=Object.create(Error.prototype),X.prototype.constructor=X,X);function z(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var K=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=q(i),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else i.remove(this);var c=this.initialTeardown;if(W(c))try{c()}catch(t){o=t instanceof Q?t.errors:[t]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var l=q(u),f=l.next();!f.done;f=l.next()){var p=f.value;try{Z(p)}catch(t){o=null!=o?o:[],t instanceof Q?o=Y(Y([],$(o)),$(t.errors)):o.push(t)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(o)throw new Q(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Z(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(n=this._teardowns)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&z(e,t)},t.prototype.remove=function(e){var n=this._teardowns;n&&z(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}();K.EMPTY;function V(t){return t instanceof K||t&&"closed"in t&&W(t.remove)&&W(t.add)&&W(t.unsubscribe)}function Z(t){W(t)?t():t.unsubscribe()}var tt=function(t){function e(e,n){return t.call(this)||this}return J(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(K),et={setInterval:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=et.delegate;return((null==n?void 0:n.setInterval)||setInterval).apply(void 0,Y([],$(t)))},clearInterval:function(t){var e=et.delegate;return((null==e?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},nt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return J(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),et.setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return e;et.clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,z(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(tt),rt={now:function(){return(rt.delegate||Date).now()},delegate:void 0},ot=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=rt.now,t}(),it=new(function(t){function e(e,n){void 0===n&&(n=ot.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return J(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(ot))(nt),st=it,at={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ct={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ct.delegate;return((null==n?void 0:n.setTimeout)||setTimeout).apply(void 0,Y([],$(t)))},clearTimeout:function(t){var e=ct.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function ut(t){ct.setTimeout((function(){var e=at.onUnhandledError;if(!e)throw t;e(t)}))}function lt(){}var ft=pt("C",void 0,void 0);function pt(t,e,n){return{kind:t,value:e,error:n}}var dt=null;function ht(t){at.useDeprecatedSynchronousErrorHandling&&dt&&(dt.errorThrown=!0,dt.error=t)}var vt=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,V(e)&&e.add(n)):n.destination=wt,n}return J(e,t),e.create=function(t,e,n){return new yt(t,e,n)},e.prototype.next=function(t){this.isStopped?bt(function(t){return pt("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?bt(pt("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?bt(ft,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(K),yt=function(t){function e(e,n,r){var o,i=t.call(this)||this;if(W(e))o=e;else if(e){var s;o=e.next,n=e.error,r=e.complete,i&&at.useDeprecatedNextContext?(s=Object.create(e)).unsubscribe=function(){return i.unsubscribe()}:s=e,o=null==o?void 0:o.bind(s),n=null==n?void 0:n.bind(s),r=null==r?void 0:r.bind(s)}return i.destination={next:o?mt(o,i):lt,error:mt(null!=n?n:gt,i),complete:r?mt(r,i):lt},i}return J(e,t),e}(vt);function mt(t,e){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{t.apply(void 0,Y([],$(e)))}catch(t){at.useDeprecatedSynchronousErrorHandling?ht(t):ut(t)}}}function gt(t){throw t}function bt(t,e){var n=at.onStoppedNotification;n&&ct.setTimeout((function(){return n(t,e)}))}var wt={closed:!0,next:lt,error:gt,complete:lt},_t="function"==typeof Symbol&&Symbol.observable||"@@observable";function xt(t){return t}function St(t){return 0===t.length?xt:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Lt=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,o=this,i=(r=t)&&r instanceof vt||function(t){return t&&W(t.next)&&W(t.error)&&W(t.complete)}(r)&&V(r)?t:new yt(t,e,n);return function(t){if(at.useDeprecatedSynchronousErrorHandling){var e=!dt;if(e&&(dt={errorThrown:!1,error:null}),t(),e){var n=dt,r=n.errorThrown,o=n.error;if(dt=null,r)throw o}}else t()}((function(){var t=o,e=t.operator,n=t.source;i.add(e?e.call(i,n):n?o._subscribe(i):o._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=kt(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),null==o||o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[_t]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return St(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=kt(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function kt(t){var e;return null!==(e=null!=t?t:at.Promise)&&void 0!==e?e:Promise}function Ot(t,e,n){void 0===t&&(t=0),void 0===n&&(n=st);var r,o=-1;return null!=e&&((r=e)&&W(r.schedule)?n=e:o=e),new Lt((function(e){var r=function(t){return t instanceof Date&&!isNaN(t)}(t)?+t-n.now():t;r<0&&(r=0);var i=0;return n.schedule((function(){e.closed||(e.next(i++),0<=o?this.schedule(void 0,o):e.complete())}),r)}))}function Et(t){return function(e){if(function(t){return W(null==t?void 0:t.lift)}(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")}}var jt=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.onFinalize=i,s._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,s._error=o?function(t){try{o(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return J(e,t),e.prototype.unsubscribe=function(){var e,n=this.closed;t.prototype.unsubscribe.call(this),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))},e}(vt);var It=n(11),At=n.n(It);function Tt(){return At()('!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var o={get(e,t=null){return this.fetch("GET",e,t)},post(e,t=null){return this.fetch("POST",e,t)},put(e,t=null){return this.fetch("PUT",e,t)},del(e,t=null){return this.fetch("DELETE",e,t)},ajax:(e,t,n,o={})=>new Promise((r,s)=>{let a=new XMLHttpRequest;a.responseType="json",a.onload=()=>{switch(a.status){case 200:r(a.response);break;case 204:r();break;case 401:s();break;default:s({status:a.status,res:a.response})}},n&&(n=JSON.stringify(n)),a.open(e,t,!0),Object.entries(o).forEach(([e,t])=>{a.setRequestHeader(e,t)}),a.setRequestHeader("Content-type","application/json"),a.send(n)}),fetch(e,t,n){if(window&&!window.fetch)return this.ajax(e,t,n);let o=[],r={method:e,mode:"cors",headers:{"Content-Type":"application/json"}};if(n){for(let e in n)o.push(`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`);"GET"===e?t+="?"+o.join("&"):r.body=JSON.stringify(n)}return fetch(t,r).then(e=>{switch(e.status){case 200:return e.json();case 204:break;case 401:return Promise.reject();case 403:return e.json().then(e=>Promise.reject(e));default:return Promise.reject({status_code:500,message:"服务器繁忙, 请稍后再试"})}})}};onmessage=function(e){switch(e.data.cmd){case"UPLOADLOGLIST":const t=e.data.url,n=e.data.log;!function(e,t,n=[],r){const s=n.map(e=>e.id),a=(e=>{const t=[];for(;e.length>0;){const n=e.pop();if(t.find(e=>e.login_name===n.login_name)){const e=t.find(e=>e.login_name===n.login_name&&e.log_type===n.log_type);e?e.count+=1:t.push(n)}else t.push(n)}return t})(n).map(e=>({appId:t,count:e.count,dataType:e.log_type,identify:e.login_name})),c={"Stjh-Real-IP":r+""};o.ajax("post",e+"/site-statistics",a,c).then((function(e){0===e.code&&postMessage({cmd:"UPLOAD_SUCCESS",ids:s})})).catch((function(e){}))}(t,e.data.appId,n,e.data.ip);break;case"GETIP":o.ajax("get","http://pv.sohu.com/cityjson?ie=utf-8",null,{}).then((function(e){console.log(e,"--")})).catch((function(e){}))}}}]);',"Worker",void 0,n.p+"index.worker.js")}var Ct=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"success";"success"===n?console.log("%c".concat(t,"%c").concat(e),"background: #00d1b2; padding: 5px; color: #fff; border-radius: 5px 0 0 5px","background: #555; padding: 5px; color: #fff; border-radius: 0 5px 5px 0"):"error"===n?console.log("%c".concat(t,"%c").concat(e),"background: #f5222d; padding: 5px; color: #fff; border-radius: 5px 0 0 5px","background: #555; padding: 5px; color: #fff; border-radius: 0 5px 5px 0"):"warn"===n&&console.log("%c".concat(t,"%c").concat(e),"background: #fa8c16; padding: 5px; color: #fff; border-radius: 5px 0 0 5px","background: #555; padding: 5px; color: #fff; border-radius: 0 5px 5px 0")},Pt=function(t,e){return new Promise((function(n,r){t||r(" DB null"),t.transaction((function(t){t.executeSql("".concat(e),[],(function(t,e){n(e)}),(function(t,e){console.log("select table error"),console.dir(e),r(e)}))}))}))},Nt=G.a,Ut=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s()(this,t),this.log_type=e,this.login_name=n,this.is_upload=r,l()(this,"id",void 0),l()(this,"url",void 0),l()(this,"creater_date",void 0),l()(this,"count",void 0),this.log_type=e,this.id=H(),this.url=location.href,this.creater_date=(new Date).getTime(),this.count=1},Mt=function(){function t(e){var n=this;if(s()(this,t),this.option=e,l()(this,"id",void 0),l()(this,"_loginName",void 0),l()(this,"e",void 0),l()(this,"_db",void 0),l()(this,"_prod",void 0),l()(this,"_version",void 0),l()(this,"_ip",void 0),l()(this,"_worker",void 0),l()(this,"_emitter",new v),l()(this,"$upLoadSubction",void 0),l()(this,"sqlUnLoadLog",(function(){return new Promise((function(t,e){Pt(n.db,"SELECT * FROM LOG_TABLE WHERE is_upload=0").then((function(n){var r=Array.prototype.slice.call(n.rows);Array.isArray(r)&&r.length>0?t(r):e([])})).catch((function(t){e(t)}))}))})),l()(this,"clearUploaded",(function(){return new Promise((function(t,e){Pt(n.db,"DELETE FROM LOG_TABLE WHERE is_upload=1").then((function(e){var n=Array.prototype.slice.call(e.rows);Array.isArray(n)?t(n):t([])})).catch((function(t){e(t)}))}))})),l()(this,"onWorker",(function(t){switch(t.data.cmd){case"UPLOAD_SUCCESS":var e=t.data.ids;n.upLoaderServerSuccess(e)}})),window.jxstjh_siteAnalysis)return window.jxstjh_siteAnalysis;this.id="ac"+H(),this._prod=this.option.production,this._version=Nt,e&&e.siteAnalysisServer?(this.option=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={siteAnalysisServer:"https://auth-test.jxwrd.gov.cn/",appId:"code",routerMode:g.HASH,interval:10,production:!1};return Object.assign(e,t)}(e),this.e={onPageChange:this._onPageChange.bind(this),onUserLogin:this._onUserLogin.bind(this)},this._worker=new Tt,this._worker.onmessage=this.onWorker,this.getIPbyFront(),this._prod&&this.init()):setTimeout((function(){n._emitter.emit(R,"siteAnalysisServer必传")}),0),window.jxstjh_siteAnalysis=this}return c()(t,[{key:"db",get:function(){return this._db},set:function(t){this._db=t}},{key:"loginName",get:function(){return this._loginName},set:function(t){this._loginName=t}},{key:"init",value:function(){var t,e,n,r,o,i=this,s=this.option.appId,a=null;try{a=window.openDatabase("SA"+s,"1.0","JXSTJH_SITE_ANALYSIS",50331648)}catch(t){this._emitter.emit(R,"不支持webSQL"),Ct("JH_SA","不支持webSQL!","error")}this.db=a,(t=this.db,new Promise((function(e,n){t?t.transaction((function(t){t.executeSql("create table if not exists LOG_TABLE(id varchar(32),url varchar(256), login_name varchar(20), creater_date varchar(20), log_type int, count int, is_upload int)",[],(function(t,n){e(n)}),(function(t){console.log("INIT_LOG_TABLE 失败"),n(t)}))})):n(" DB null")}))).catch((function(t){i._emitter.emit(R,t)})),this.$upLoadSubction=(r=1e3*this.option.interval,void 0===r&&(r=0),void 0===o&&(o=it),r<0&&(r=0),Ot(r,r,o)).pipe((e=function(){return!!i.db&&i._prod},Et((function(t,r){var o=0;t.subscribe(new jt(r,(function(t){return e.call(n,t,o++)&&r.next(t)})))})))).subscribe((function(){i.sqlUnLoadLog().then((function(t){return i.upLoadLog(t)})).then((function(){return i.clearUploaded()})).catch((function(){}))})),this.insetLogMsg(b.PAGE)}},{key:"getIPbyFront",value:function(){var t=this;if(!document.getElementById("sohuIp")){var e=document.createElement("script");e.id="sohuIp",e.src="http://pv.sohu.com/cityjson?ie=utf-8",e.onload=function(){t._ip=window.returnCitySN&&window.returnCitySN.cip},document.body.appendChild(e)}}},{key:"setLoginName",value:function(t){return this.loginName=t,this._prod?this._onUserLogin():Promise.resolve("recordPage in production only")}},{key:"_onPageChange",value:function(){this.insetLogMsg(b.PAGE)}},{key:"_onUserLogin",value:function(){var t=this;return new Promise((function(e,n){var r=new Ut(b.LOGIN,t.loginName,0);if(!B(r.url)||t.option.production){var o="INSERT INTO LOG_TABLE (id, url, login_name, creater_date, log_type, count, is_upload) VALUES ('".concat(r.id,"','").concat(r.url,"','").concat(r.login_name,"','").concat(r.creater_date,"',").concat(r.log_type,",").concat(r.count,",").concat(r.is_upload,")");Pt(t.db,o).then((function(){e("插入数据成功!")})).catch((function(t){n(t)}))}else e("本地环境")}))}},{key:"recordPage",value:function(){return this._prod?this.insetLogMsg(b.PAGE):Promise.resolve("recordPage in production only")}},{key:"insetLogMsg",value:function(t){var e=this;return new Promise((function(n,r){var o=new Ut(t,e.loginName,0);if(!B(o.url)||e.option.production){var i="INSERT INTO LOG_TABLE (id, url, login_name, creater_date, log_type, count, is_upload) VALUES ('".concat(o.id,"','").concat(o.url,"','").concat(o.login_name,"','").concat(o.creater_date,"',").concat(o.log_type,",").concat(o.count,",").concat(o.is_upload,")");Pt(e.db,i).then((function(){n("插入数据成功!")})).catch((function(t){r(t)}))}else n("本地环境")}))}},{key:"upLoadLog",value:function(t){var e=this;return new Promise((function(n){var r=e.option.appId;e._worker.postMessage({cmd:"UPLOADLOGLIST",url:e.option.siteAnalysisServer,log:t,appId:r,ip:e._ip}),n(!0)}))}},{key:"upLoaderServerSuccess",value:function(t){var e=this;return Ct("JH_SA","upLoaderServerSuccess!","success"),new Promise((function(n,r){t.length<1&&r("length 0");var o="DELETE FROM LOG_TABLE WHERE id in (";t.forEach((function(e,n){n===t.length-1?o+="'".concat(e,"'"):o+="'".concat(e,"',")})),o+=")",Pt(e.db,o).then((function(){n(!0)})).catch((function(t){r(t)}))}))}},{key:"destroy",value:function(){this.e=null,this._emitter.removeAllListeners(),this.$upLoadSubction.unsubscribe(),this._emitter=null}}]),t}()}])})); |
@@ -8,2 +8,2 @@ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(global,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=22)}([function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";const r=n(18),o=n(19),i=n(20),s=n(21),a=Symbol("encodeFragmentIdentifier");function c(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function u(t,e){return e.encode?e.strict?r(t):encodeURIComponent(t):t}function l(t,e){return e.decode?o(t):t}function f(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function p(t){const e=(t=f(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function d(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function h(t,e){c((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const n=function(t){let e;switch(t.arrayFormat){case"index":return(t,n,r)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n};case"bracket":return(t,n,r)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==r[t]?r[t]=[].concat(r[t],n):r[t]=[n]:r[t]=n};case"comma":case"separator":return(e,n,r)=>{const o="string"==typeof n&&n.includes(t.arrayFormatSeparator),i="string"==typeof n&&!o&&l(n,t).includes(t.arrayFormatSeparator);n=i?l(n,t):n;const s=o||i?n.split(t.arrayFormatSeparator).map(e=>l(e,t)):null===n?n:l(n,t);r[e]=s};case"bracket-separator":return(e,n,r)=>{const o=/(\[\])$/.test(e);if(e=e.replace(/\[\]$/,""),!o)return void(r[e]=n?l(n,t):n);const i=null===n?[]:n.split(t.arrayFormatSeparator).map(e=>l(e,t));void 0!==r[e]?r[e]=[].concat(r[e],i):r[e]=i};default:return(t,e,n)=>{void 0!==n[t]?n[t]=[].concat(n[t],e):n[t]=e}}}(e),r=Object.create(null);if("string"!=typeof t)return r;if(!(t=t.trim().replace(/^[?#&]/,"")))return r;for(const o of t.split("&")){if(""===o)continue;let[t,s]=i(e.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?s:l(s,e),n(l(t,e),s,r)}for(const t of Object.keys(r)){const n=r[t];if("object"==typeof n&&null!==n)for(const t of Object.keys(n))n[t]=d(n[t],e);else r[t]=d(n,e)}return!1===e.sort?r:(!0===e.sort?Object.keys(r).sort():Object.keys(r).sort(e.sort)).reduce((t,e)=>{const n=r[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"==typeof e?t(Object.keys(e)).sort((t,e)=>Number(t)-Number(e)).map(t=>e[t]):e}(n):t[e]=n,t},Object.create(null))}e.extract=p,e.parse=h,e.stringify=(t,e)=>{if(!t)return"";c((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const n=n=>e.skipNull&&null==t[n]||e.skipEmptyString&&""===t[n],r=function(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{const o=n.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[u(e,t),"[",o,"]"].join("")]:[...n,[u(e,t),"[",u(o,t),"]=",u(r,t)].join("")]};case"bracket":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[u(e,t),"[]"].join("")]:[...n,[u(e,t),"[]=",u(r,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e="bracket-separator"===t.arrayFormat?"[]=":"=";return n=>(r,o)=>void 0===o||t.skipNull&&null===o||t.skipEmptyString&&""===o?r:(o=null===o?"":o,0===r.length?[[u(n,t),e,u(o,t)].join("")]:[[r,u(o,t)].join(t.arrayFormatSeparator)])}default:return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,u(e,t)]:[...n,[u(e,t),"=",u(r,t)].join("")]}}(e),o={};for(const e of Object.keys(t))n(e)||(o[e]=t[e]);const i=Object.keys(o);return!1!==e.sort&&i.sort(e.sort),i.map(n=>{const o=t[n];return void 0===o?"":null===o?u(n,e):Array.isArray(o)?0===o.length&&"bracket-separator"===e.arrayFormat?u(n,e)+"[]":o.reduce(r(n),[]).join("&"):u(n,e)+"="+u(o,e)}).filter(t=>t.length>0).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[n,r]=i(t,"#");return Object.assign({url:n.split("?")[0]||"",query:h(p(t),e)},e&&e.parseFragmentIdentifier&&r?{fragmentIdentifier:l(r,e)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);const r=f(t.url).split("?")[0]||"",o=e.extract(t.url),i=e.parse(o,{sort:!1}),s=Object.assign(i,t.query);let c=e.stringify(s,n);c&&(c="?"+c);let l=function(t){let e="";const n=t.indexOf("#");return-1!==n&&(e=t.slice(n)),e}(t.url);return t.fragmentIdentifier&&(l="#"+(n[a]?u(t.fragmentIdentifier,n):t.fragmentIdentifier)),`${r}${c}${l}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);const{url:o,query:i,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:s(i,n),fragmentIdentifier:c},r)},e.exclude=(t,n,r)=>{const o=Array.isArray(n)?t=>!n.includes(t):(t,e)=>!n(t,e);return e.pick(t,o,r)}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r,o; | ||
* Released under the MIT license | ||
*/!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(e,n,e,t):r)||(t.exports=o),!0,t.exports=i(),!!0){var s=window.Cookies,a=window.Cookies=i();a.noConflict=function(){return window.Cookies=s,a}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=t({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var s=JSON.stringify(n);/^[\{\[]/.test(s)&&(n=s)}catch(t){}n=r.write?r.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var c in i)i[c]&&(a+="; "+c,!0!==i[c]&&(a+="="+i[c].split(";")[0]));return document.cookie=e+"="+n+a}}function s(t,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],s=0;s<i.length;s++){var a=i[s].split("="),c=a.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=e(a[0]);if(c=(r.read||r)(c,u)||e(c),n)try{c=JSON.parse(c)}catch(t){}if(o[u]=c,t===u)break}catch(t){}}return t?o[t]:o}}return o.set=i,o.get=function(t){return s(t,!1)},o.getJSON=function(t){return s(t,!0)},o.remove=function(e,n){i(e,"",t(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=require("events")},function(t,e,n){var r=n(12),o=n(13),i=n(14),s=n(16);t.exports=function(t,e){return r(t)||o(t,e)||i(t,e)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){t.exports=n(17)},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=n=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(t,e,n,r,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var s=t.apply(e,r);function a(t){n(s,o,i,a,c,"next",t)}function c(t){n(s,o,i,a,c,"throw",t)}a(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t){t.exports=JSON.parse('{"a":"0.0.20"}')},function(t,e,n){"use strict";t.exports=function(t,e,n,r){var o=self||window;try{try{var i;try{i=new o.Blob([t])}catch(e){(i=new(o.BlobBuilder||o.WebKitBlobBuilder||o.MozBlobBuilder||o.MSBlobBuilder)).append(t),i=i.getBlob()}var s=o.URL||o.webkitURL,a=s.createObjectURL(i),c=new o[e](a,n);return s.revokeObjectURL(a),c}catch(r){return new o[e]("data:application/javascript,".concat(encodeURIComponent(t)),n)}}catch(t){if(!r)throw Error("Inline worker is not supported");return new o[e](r,n)}}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);s=!0);}catch(t){a=!0,o=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(15);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),s=new S(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=w(s,n);if(a){if(a===l)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,s),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function f(){}function p(){}function d(){}var h={};h[o]=function(){return this};var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&n.call(v,o)&&(h=v);var g=d.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,i){function s(){return new e((function(r,s){!function r(o,i,s,a){var c=u(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}(o,i,r,s)}))}return r=r?r.then(s,s):s()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=g.constructor=d,d.constructor=p,p.displayName=a(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(b.prototype),b.prototype[i]=function(){return this},t.AsyncIterator=b,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var s=new b(c(e,n,r,o),i);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},m(g),a(g,s,"Generator"),g[o]=function(){return this},g.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=k,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase())},function(t,e,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function i(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],i(n),i(r))}function s(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(r),n=1;n<e.length;n++)e=(t=i(e,n).join("")).match(r);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=o.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch(t){var r=s(n[0]);r!==n[0]&&(e[n[0]]=r)}n=o.exec(t)}e["%C2"]="�";for(var i=Object.keys(e),a=0;a<i.length;a++){var c=i[a];t=t.replace(new RegExp(c,"g"),e[c])}return t}(t)}}},function(t,e,n){"use strict";t.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];const n=t.indexOf(e);return-1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]}},function(t,e,n){"use strict";t.exports=function(t,e){for(var n={},r=Object.keys(t),o=Array.isArray(e),i=0;i<r.length;i++){var s=r[i],a=t[s];(o?-1!==e.indexOf(s):e(s,a,t))&&(n[s]=a)}return n}},function(t,e,n){"use strict";n.r(e),n.d(e,"AuthClient",(function(){return M})),n.d(e,"SiteAnalysis",(function(){return Ut}));var r,o,i=n(2),s=n.n(i),a=n(4),c=n.n(a),u=n(0),l=n.n(u),f=n(6),p=n.n(f);!function(t){t.SSO="sso",t.DD="dingTalk",t.CUSTOM="custom"}(r||(r={})),function(t){t.HASH="hash",t.HISTORY="history"}(o||(o={}));var d="inited",h="error",y=n(5);function v(t){this.message=t}v.prototype=new Error,v.prototype.name="InvalidCharacterError";"undefined"!=typeof window&&window.atob&&window.atob.bind(window);function g(t){this.message=t}g.prototype=new Error,g.prototype.name="InvalidTokenError";var m,b,w=n(3),_=n.n(w),x=function(t,e,n){_.a.set(t,e,n)},S=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?_.a.getJSON(t):_.a.get(t)},k=function(t){_.a.remove(t)},O=function(t,e){sessionStorage.setItem(t,JSON.stringify(e))},j=n(8),E=n.n(j),L=n(9),I=n.n(L),A=n(7),T=n.n(A),P=function(){var t=I()(T.a.mark((function t(){var e,n,r,o,i,s,a,c,u=arguments;return T.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:"",n=u.length>1&&void 0!==u[1]?u[1]:{},r=u.length>2&&void 0!==u[2]?u[2]:"GET",o=u.length>3&&void 0!==u[3]?u[3]:"fetch",r=r.toUpperCase(),e=e,"GET"==r&&(i="",Object.keys(n).forEach((function(t){i+=t+"="+n[t]+"&"})),""!==i&&(i=i.substr(0,i.lastIndexOf("&")),e=e+"?"+i)),!window.fetch||"fetch"!=o){t.next=25;break}return s={credentials:"include",method:r,headers:{Accept:"application/json","Content-Type":"application/json"},mode:"cors",cache:"force-cache"},"POST"==r&&Object.defineProperty(s,"body",{value:JSON.stringify(n)}),t.prev=10,t.next=13,fetch(e,s);case 13:return a=t.sent,t.next=16,a.json();case 16:return c=t.sent,t.abrupt("return",c);case 20:throw t.prev=20,t.t0=t.catch(10),new Error(t.t0);case 23:t.next=26;break;case 25:return t.abrupt("return",new Promise((function(t,o){var i;i=window.XMLHttpRequest?new XMLHttpRequest:new window.ActiveXObject;var s="";"POST"==r&&(s=JSON.stringify(n)),i.open(r,e,!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.send(s),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status){var e=i.response;"object"!==E()(e)&&(e=JSON.parse(e)),t(e)}else o(i)}})));case 26:case"end":return t.stop()}}),t,null,[[10,20]])})));return function(){return t.apply(this,arguments)}}(),C=n(1),N="JH_AUTH_CLIENT_BASE",U=function(t,e){var n=new RegExp("(^|&)"+t+"=([^&]*)(&|$)");if(e===o.HASH){var r=window.location.hash.split("?")[1];return C.parse(r)[t]}var i=window.location.search.substr(1).match(n);return null!=i?decodeURI(i[2]):null},M=function(){function t(e){var n,i=this;if(s()(this,t),this.option=e,l()(this,"_tokenInfo",void 0),l()(this,"_user",void 0),l()(this,"_emitter",new y),l()(this,"_href",void 0),l()(this,"_permissionList",void 0),e.SSOServer){this.option=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={SSOServer:"https://auth-test.jxwrd.gov.cn/",resourceCode:"code",jwtToken:!0,routerMode:o.HASH,method:r.SSO,cacheInCookie:!1};return Object.assign(e,t)}(e),this._href=function(t,e){if(e===o.HISTORY){var n=C.parse(location.search);delete n[t];var r=window.location;return Object.keys(n).length>0?r.origin+r.pathname+C.stringify(n):r.origin+r.pathname}var i=window.location.hash.split("?"),s=p()(i,2),a=s[0],c=s[1],u=C.parse(c);if(delete u[t],Object.keys(u).length>0){var l=C.stringify(u);return window.location.origin+window.location.pathname+a+"?"+l}return window.location.origin+window.location.pathname+a}("tmpTicket",e.routerMode);var a=(n=N+"_isDirty",JSON.parse(sessionStorage.getItem(n)));this.init(a)}else setTimeout((function(){i._emitter.emit(h,"SSOServer必传")}),0)}return c()(t,[{key:"token",get:function(){return this._tokenInfo.access_token}},{key:"tokenInfo",get:function(){return this._tokenInfo},set:function(t){this._tokenInfo=t}},{key:"user",get:function(){return this._user},set:function(t){this._user=t}},{key:"permissionList",get:function(){return this._permissionList},set:function(t){this._permissionList=t}},{key:"init",value:function(t){var e=this;if(t&&this.getCookieCache()){var n=this.user,o=this.tokenInfo,i=this.permissionList,s=U("tmpTicket",this.option.routerMode);s&&"null"!==s&&"undefined"!==s?this.validateBytmpTicket(s):setTimeout((function(){e._emitter.emit(d,{umsAdmin:n,tokenInfo:o,permissionList:i})}),0)}else switch(this.option.method){case r.CUSTOM:return;case r.SSO:return void this.initSSOMethod()}}},{key:"getCookieCache",value:function(){return this.user=S(N+"_user",!0),this.tokenInfo=S(N+"_tokenInfo",!0),this.permissionList=S(N+"_permissionList",!0),!(!this.user||!this.tokenInfo)||(this.removeAllCookie(),!1)}},{key:"removeAllCookie",value:function(){k(N+"_user"),k(N+"_tokenInfo"),k(N+"_permissionList"),O(N+"_isDirty",!1)}},{key:"setAllCookies",value:function(){var t={expires:(this.tokenInfo&&this.tokenInfo.expires_in||3600)/3600/24};x(N+"_user",this.user,t),x(N+"_tokenInfo",this.tokenInfo,t),x(N+"_permissionList",this.permissionList,t)}},{key:"initSSOMethod",value:function(){var t=U("tmpTicket",this.option.routerMode);if(O(N+"_isDirty",!0),t&&"null"!==t&&"undefined"!==t)this.validateBytmpTicket(t);else{var e=encodeURIComponent(this._href);window.location.href="".concat(this.option.SSOServer,"?code=").concat(this.option.resourceCode,"&returnUrl=").concat(e)}}},{key:"validateBytmpTicket",value:function(t){var e=this;return new Promise((function(n,r){P(e.option.SSOServer+"/web/verify-tmp-ticket?tmpTicket="+t,{},"post").then((function(t){if(0===t.code){var o=t.data,i=o.umsAdmin,s=o.tokenInfo,a=o.permissionList;e.user=i,e.tokenInfo=s,e.permissionList=a||[],e.setAllCookies(),e._emitter.emit(d,t.data),setTimeout((function(){e.fixUrlQuery()}),0),n(t.data)}else e._emitter.emit(h,t),r(t)})).catch((function(t){e._emitter.emit(h,t),r(t)}))}))}},{key:"serverLogout",value:function(){var t=this;return new Promise((function(e,n){var r=t.user.loginName,o=t.tokenInfo.access_token;P(t.option.SSOServer+"/web/users/login-out",{username:r,authToken:o},"GET").then((function(t){t?e(t):n(t)})).catch((function(t){n(t)}))}))}},{key:"fixUrlQuery",value:function(){!function(t,e){if(e===o.HISTORY){var n=C.parse(location.search);delete n[t];var r=window.location,i=Object.keys(n).length>0?r.origin+r.pathname+C.stringify(n):r.origin+r.pathname;"pushState"in history?history.replaceState(null,null,i):window.location.replace(i)}else{var s=window.location.hash.split("?"),a=p()(s,2),c=a[0],u=a[1],l=C.parse(u);if(delete l[t],Object.keys(l).length>0){var f=C.stringify(l);window.location.hash=c+"?"+f}else window.location.hash=c}}("tmpTicket",this.option.routerMode)}},{key:"on",value:function(t,e){this._emitter.addListener(t,e)}},{key:"off",value:function(t,e){this._emitter.removeListener(t,e)}},{key:"logout",value:function(){var t=this;this.serverLogout().then((function(){t.removeAllCookie();var e=encodeURIComponent(t._href);window.location.href="".concat(t.option.SSOServer,"?code=").concat(t.option.resourceCode,"&returnUrl=").concat(e)})).catch((function(t){alert("登出错误"+String(t))}))}},{key:"destroy",value:function(){this._emitter.removeAllListeners(),this._emitter=null}}]),t}();!function(t){t.HASH="hash",t.HISTORY="history"}(m||(m={})),function(t){t[t.LOGIN=0]="LOGIN",t[t.PAGE=1]="PAGE"}(b||(b={}));var R="error";function F(){return(65536*(1+Math.random())|0).toString(16).substring(1)}var B=function(){return F()+F()+"-"+F()+"-"+F()+"-"+F()+"-"+F()+F()+F()},G=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return-1!==t.indexOf("127.0.0.1")||t.indexOf("localhost")},H=n(10),D=function(t,e){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function q(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}D(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function J(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function Y(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t}Object.create;function W(t){return"function"==typeof t}var X,z=((X=function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}((function(t){Error.call(t),t.stack=(new Error).stack}))).prototype=Object.create(Error.prototype),X.prototype.constructor=X,X);function Q(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var V=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=J(i),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else i.remove(this);var c=this.initialTeardown;if(W(c))try{c()}catch(t){o=t instanceof z?t.errors:[t]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var l=J(u),f=l.next();!f.done;f=l.next()){var p=f.value;try{Z(p)}catch(t){o=null!=o?o:[],t instanceof z?o=Y(Y([],$(o)),$(t.errors)):o.push(t)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(o)throw new z(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Z(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(n=this._teardowns)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Q(e,t)},t.prototype.remove=function(e){var n=this._teardowns;n&&Q(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}();V.EMPTY;function K(t){return t instanceof V||t&&"closed"in t&&W(t.remove)&&W(t.add)&&W(t.unsubscribe)}function Z(t){W(t)?t():t.unsubscribe()}var tt=function(t){function e(e,n){return t.call(this)||this}return q(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(V),et={setInterval:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=et.delegate;return((null==n?void 0:n.setInterval)||setInterval).apply(void 0,Y([],$(t)))},clearInterval:function(t){var e=et.delegate;return((null==e?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},nt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return q(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),et.setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return e;et.clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Q(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(tt),rt={now:function(){return(rt.delegate||Date).now()},delegate:void 0},ot=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=rt.now,t}(),it=new(function(t){function e(e,n){void 0===n&&(n=ot.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return q(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(ot))(nt),st=it,at={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ct={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ct.delegate;return((null==n?void 0:n.setTimeout)||setTimeout).apply(void 0,Y([],$(t)))},clearTimeout:function(t){var e=ct.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function ut(t){ct.setTimeout((function(){var e=at.onUnhandledError;if(!e)throw t;e(t)}))}function lt(){}var ft=pt("C",void 0,void 0);function pt(t,e,n){return{kind:t,value:e,error:n}}var dt=null;function ht(t){at.useDeprecatedSynchronousErrorHandling&&dt&&(dt.errorThrown=!0,dt.error=t)}var yt=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,K(e)&&e.add(n)):n.destination=wt,n}return q(e,t),e.create=function(t,e,n){return new vt(t,e,n)},e.prototype.next=function(t){this.isStopped?bt(function(t){return pt("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?bt(pt("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?bt(ft,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(V),vt=function(t){function e(e,n,r){var o,i=t.call(this)||this;if(W(e))o=e;else if(e){var s;o=e.next,n=e.error,r=e.complete,i&&at.useDeprecatedNextContext?(s=Object.create(e)).unsubscribe=function(){return i.unsubscribe()}:s=e,o=null==o?void 0:o.bind(s),n=null==n?void 0:n.bind(s),r=null==r?void 0:r.bind(s)}return i.destination={next:o?gt(o,i):lt,error:gt(null!=n?n:mt,i),complete:r?gt(r,i):lt},i}return q(e,t),e}(yt);function gt(t,e){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{t.apply(void 0,Y([],$(e)))}catch(t){at.useDeprecatedSynchronousErrorHandling?ht(t):ut(t)}}}function mt(t){throw t}function bt(t,e){var n=at.onStoppedNotification;n&&ct.setTimeout((function(){return n(t,e)}))}var wt={closed:!0,next:lt,error:mt,complete:lt},_t="function"==typeof Symbol&&Symbol.observable||"@@observable";function xt(t){return t}function St(t){return 0===t.length?xt:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var kt=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,o=this,i=(r=t)&&r instanceof yt||function(t){return t&&W(t.next)&&W(t.error)&&W(t.complete)}(r)&&K(r)?t:new vt(t,e,n);return function(t){if(at.useDeprecatedSynchronousErrorHandling){var e=!dt;if(e&&(dt={errorThrown:!1,error:null}),t(),e){var n=dt,r=n.errorThrown,o=n.error;if(dt=null,r)throw o}}else t()}((function(){var t=o,e=t.operator,n=t.source;i.add(e?e.call(i,n):n?o._subscribe(i):o._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=Ot(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),null==o||o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[_t]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return St(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Ot(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function Ot(t){var e;return null!==(e=null!=t?t:at.Promise)&&void 0!==e?e:Promise}function jt(t,e,n){void 0===t&&(t=0),void 0===n&&(n=st);var r,o=-1;return null!=e&&((r=e)&&W(r.schedule)?n=e:o=e),new kt((function(e){var r=function(t){return t instanceof Date&&!isNaN(t)}(t)?+t-n.now():t;r<0&&(r=0);var i=0;return n.schedule((function(){e.closed||(e.next(i++),0<=o?this.schedule(void 0,o):e.complete())}),r)}))}function Et(t){return function(e){if(function(t){return W(null==t?void 0:t.lift)}(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")}}var Lt=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.onFinalize=i,s._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,s._error=o?function(t){try{o(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return q(e,t),e.prototype.unsubscribe=function(){var e,n=this.closed;t.prototype.unsubscribe.call(this),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))},e}(yt);var It=n(11),At=n.n(It);function Tt(){return At()('!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var o={get(e,t=null){return this.fetch("GET",e,t)},post(e,t=null){return this.fetch("POST",e,t)},put(e,t=null){return this.fetch("PUT",e,t)},del(e,t=null){return this.fetch("DELETE",e,t)},ajax:(e,t,n,o={})=>new Promise((r,s)=>{let a=new XMLHttpRequest;a.responseType="json",a.onload=()=>{switch(a.status){case 200:r(a.response);break;case 204:r();break;case 401:s();break;default:s({status:a.status,res:a.response})}},n&&(n=JSON.stringify(n)),a.open(e,t,!0),Object.entries(o).forEach(([e,t])=>{a.setRequestHeader(e,t)}),a.setRequestHeader("Content-type","application/json"),a.send(n)}),fetch(e,t,n){if(window&&!window.fetch)return this.ajax(e,t,n);let o=[],r={method:e,mode:"cors",headers:{"Content-Type":"application/json"}};if(n){for(let e in n)o.push(`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`);"GET"===e?t+="?"+o.join("&"):r.body=JSON.stringify(n)}return fetch(t,r).then(e=>{switch(e.status){case 200:return e.json();case 204:break;case 401:return Promise.reject();case 403:return e.json().then(e=>Promise.reject(e));default:return Promise.reject({status_code:500,message:"服务器繁忙, 请稍后再试"})}})}};onmessage=function(e){switch(e.data.cmd){case"UPLOADLOGLIST":const t=e.data.url,n=e.data.log;!function(e,t,n=[],r){const s=n.map(e=>e.id),a=(e=>{const t=[];for(;e.length>0;){const n=e.pop();if(t.find(e=>e.login_name===n.login_name)){const e=t.find(e=>e.login_name===n.login_name&&e.log_type===n.log_type);e?e.count+=1:t.push(n)}else t.push(n)}return t})(n).map(e=>({appId:t,count:e.count,dataType:e.log_type,identify:e.login_name})),c={"Stjh-Real-IP":r+""};o.ajax("post",e+"/site-statistics",a,c).then((function(e){0===e.code&&postMessage({cmd:"UPLOAD_SUCCESS",ids:s})})).catch((function(e){}))}(t,e.data.appId,n,e.data.ip);break;case"GETIP":o.ajax("get","http://pv.sohu.com/cityjson?ie=utf-8",null,{}).then((function(e){console.log(e,"--")})).catch((function(e){}))}}}]);',"Worker",void 0,n.p+"index.node.worker.js")}var Pt=function(t,e){return new Promise((function(n,r){t||r(" DB null"),t.transaction((function(t){t.executeSql("".concat(e),[],(function(t,e){n(e)}),(function(t,e){console.log("select table error"),console.dir(e),r(e)}))}))}))},Ct=H.a,Nt=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s()(this,t),this.log_type=e,this.login_name=n,this.is_upload=r,l()(this,"id",void 0),l()(this,"url",void 0),l()(this,"creater_date",void 0),l()(this,"count",void 0),this.log_type=e,this.id=B(),this.url=location.href,this.creater_date=(new Date).getTime(),this.count=1},Ut=function(){function t(e){var n=this;if(s()(this,t),this.option=e,l()(this,"id",void 0),l()(this,"_loginName",void 0),l()(this,"e",void 0),l()(this,"_db",void 0),l()(this,"_prod",void 0),l()(this,"_version",void 0),l()(this,"_ip",void 0),l()(this,"_worker",void 0),l()(this,"_emitter",new y),l()(this,"$upLoadSubction",void 0),l()(this,"sqlUnLoadLog",(function(){return new Promise((function(t,e){Pt(n.db,"SELECT * FROM LOG_TABLE WHERE is_upload=0").then((function(n){var r=Array.prototype.slice.call(n.rows);Array.isArray(r)&&r.length>0?t(r):e([])})).catch((function(t){e(t)}))}))})),l()(this,"clearUploaded",(function(){return new Promise((function(t,e){Pt(n.db,"DELETE FROM LOG_TABLE WHERE is_upload=1").then((function(e){var n=Array.prototype.slice.call(e.rows);Array.isArray(n)?t(n):t([])})).catch((function(t){e(t)}))}))})),l()(this,"onWorker",(function(t){switch(t.data.cmd){case"UPLOAD_SUCCESS":var e=t.data.ids;n.upLoaderServerSuccess(e)}})),window.jxstjh_siteAnalysis)return window.jxstjh_siteAnalysis;this.id="ac"+B(),this._prod=this.option.production,this._version=Ct,e&&e.siteAnalysisServer?(this.option=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={siteAnalysisServer:"https://auth-test.jxwrd.gov.cn/",appId:"code",routerMode:m.HASH,interval:10,production:!1};return Object.assign(e,t)}(e),this.e={onPageChange:this._onPageChange.bind(this),onUserLogin:this._onUserLogin.bind(this)},this._worker=new Tt,this._worker.onmessage=this.onWorker,this.getIPbyFront(),this._prod&&this.init()):setTimeout((function(){n._emitter.emit(R,"siteAnalysisServer必传")}),0),window.jxstjh_siteAnalysis=this}return c()(t,[{key:"db",get:function(){return this._db},set:function(t){this._db=t}},{key:"loginName",get:function(){return this._loginName},set:function(t){this._loginName=t}},{key:"init",value:function(){var t,e,n,r,o,i=this,s=this.option.appId;this.db=window.openDatabase("SA"+s,"1.0","JXSTJH_SITE_ANALYSIS",50331648),(t=this.db,new Promise((function(e,n){t?t.transaction((function(t){t.executeSql("create table if not exists LOG_TABLE(id varchar(32),url varchar(256), login_name varchar(20), creater_date varchar(20), log_type int, count int, is_upload int)",[],(function(t,n){e(n)}),(function(t){console.log("INIT_LOG_TABLE 失败"),n(t)}))})):n(" DB null")}))).catch((function(t){i._emitter.emit(R,t)})),this.$upLoadSubction=(r=1e3*this.option.interval,void 0===r&&(r=0),void 0===o&&(o=it),r<0&&(r=0),jt(r,r,o)).pipe((e=function(){return!!i.db&&i._prod},Et((function(t,r){var o=0;t.subscribe(new Lt(r,(function(t){return e.call(n,t,o++)&&r.next(t)})))})))).subscribe((function(){i.sqlUnLoadLog().then((function(t){return i.upLoadLog(t)})).then((function(){return i.clearUploaded()})).catch((function(){}))})),this.insetLogMsg(b.PAGE)}},{key:"getIPbyFront",value:function(){var t=this;if(!document.getElementById("sohuIp")){var e=document.createElement("script");e.id="sohuIp",e.src="http://pv.sohu.com/cityjson?ie=utf-8",e.onload=function(){t._ip=window.returnCitySN&&window.returnCitySN.cip},document.body.appendChild(e)}}},{key:"setLoginName",value:function(t){return this.loginName=t,this._prod?this._onUserLogin():Promise.resolve("recordPage in production only")}},{key:"_onPageChange",value:function(){this.insetLogMsg(b.PAGE)}},{key:"_onUserLogin",value:function(){var t=this;return new Promise((function(e,n){var r=new Nt(b.LOGIN,t.loginName,0);if(!G(r.url)||t.option.production){var o="INSERT INTO LOG_TABLE (id, url, login_name, creater_date, log_type, count, is_upload) VALUES ('".concat(r.id,"','").concat(r.url,"','").concat(r.login_name,"','").concat(r.creater_date,"',").concat(r.log_type,",").concat(r.count,",").concat(r.is_upload,")");Pt(t.db,o).then((function(){e("插入数据成功!")})).catch((function(t){n(t)}))}else e("本地环境")}))}},{key:"recordPage",value:function(){return this._prod?this.insetLogMsg(b.PAGE):Promise.resolve("recordPage in production only")}},{key:"insetLogMsg",value:function(t){var e=this;return new Promise((function(n,r){var o=new Nt(t,e.loginName,0);if(!G(o.url)||e.option.production){var i="INSERT INTO LOG_TABLE (id, url, login_name, creater_date, log_type, count, is_upload) VALUES ('".concat(o.id,"','").concat(o.url,"','").concat(o.login_name,"','").concat(o.creater_date,"',").concat(o.log_type,",").concat(o.count,",").concat(o.is_upload,")");Pt(e.db,i).then((function(){n("插入数据成功!")})).catch((function(t){r(t)}))}else n("本地环境")}))}},{key:"upLoadLog",value:function(t){var e=this;return new Promise((function(n){var r=e.option.appId;e._worker.postMessage({cmd:"UPLOADLOGLIST",url:e.option.siteAnalysisServer,log:t,appId:r,ip:e._ip}),n(!0)}))}},{key:"upLoaderServerSuccess",value:function(t){var e=this;return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"success";"success"===n?console.log("%c".concat(t,"%c").concat(e),"background: #00d1b2; padding: 5px; color: #fff; border-radius: 5px 0 0 5px","background: #555; padding: 5px; color: #fff; border-radius: 0 5px 5px 0"):"error"===n?console.log("%c".concat(t,"%c").concat(e),"background: #f5222d; padding: 5px; color: #fff; border-radius: 5px 0 0 5px","background: #555; padding: 5px; color: #fff; border-radius: 0 5px 5px 0"):"warn"===n&&console.log("%c".concat(t,"%c").concat(e),"background: #fa8c16; padding: 5px; color: #fff; border-radius: 5px 0 0 5px","background: #555; padding: 5px; color: #fff; border-radius: 0 5px 5px 0")}("JH_SA","upLoaderServerSuccess!","success"),new Promise((function(n,r){t.length<1&&r("length 0");var o="DELETE FROM LOG_TABLE WHERE id in (";t.forEach((function(e,n){n===t.length-1?o+="'".concat(e,"'"):o+="'".concat(e,"',")})),o+=")",Pt(e.db,o).then((function(){n(!0)})).catch((function(t){r(t)}))}))}},{key:"destroy",value:function(){this.e=null,this._emitter.removeAllListeners(),this.$upLoadSubction.unsubscribe(),this._emitter=null}}]),t}()}])})); | ||
*/!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(e,n,e,t):r)||(t.exports=o),!0,t.exports=i(),!!0){var s=window.Cookies,a=window.Cookies=i();a.noConflict=function(){return window.Cookies=s,a}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=t({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var s=JSON.stringify(n);/^[\{\[]/.test(s)&&(n=s)}catch(t){}n=r.write?r.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var c in i)i[c]&&(a+="; "+c,!0!==i[c]&&(a+="="+i[c].split(";")[0]));return document.cookie=e+"="+n+a}}function s(t,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],s=0;s<i.length;s++){var a=i[s].split("="),c=a.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=e(a[0]);if(c=(r.read||r)(c,u)||e(c),n)try{c=JSON.parse(c)}catch(t){}if(o[u]=c,t===u)break}catch(t){}}return t?o[t]:o}}return o.set=i,o.get=function(t){return s(t,!1)},o.getJSON=function(t){return s(t,!0)},o.remove=function(e,n){i(e,"",t(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=require("events")},function(t,e,n){var r=n(12),o=n(13),i=n(14),s=n(16);t.exports=function(t,e){return r(t)||o(t,e)||i(t,e)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){t.exports=n(17)},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=n=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(t,e,n,r,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var s=t.apply(e,r);function a(t){n(s,o,i,a,c,"next",t)}function c(t){n(s,o,i,a,c,"throw",t)}a(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t){t.exports=JSON.parse('{"a":"0.0.21"}')},function(t,e,n){"use strict";t.exports=function(t,e,n,r){var o=self||window;try{try{var i;try{i=new o.Blob([t])}catch(e){(i=new(o.BlobBuilder||o.WebKitBlobBuilder||o.MozBlobBuilder||o.MSBlobBuilder)).append(t),i=i.getBlob()}var s=o.URL||o.webkitURL,a=s.createObjectURL(i),c=new o[e](a,n);return s.revokeObjectURL(a),c}catch(r){return new o[e]("data:application/javascript,".concat(encodeURIComponent(t)),n)}}catch(t){if(!r)throw Error("Inline worker is not supported");return new o[e](r,n)}}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);s=!0);}catch(t){a=!0,o=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(15);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),s=new S(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=w(s,n);if(a){if(a===l)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,s),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function f(){}function p(){}function d(){}var h={};h[o]=function(){return this};var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&n.call(v,o)&&(h=v);var g=d.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,i){function s(){return new e((function(r,s){!function r(o,i,s,a){var c=u(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}(o,i,r,s)}))}return r=r?r.then(s,s):s()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=g.constructor=d,d.constructor=p,p.displayName=a(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(b.prototype),b.prototype[i]=function(){return this},t.AsyncIterator=b,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var s=new b(c(e,n,r,o),i);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},m(g),a(g,s,"Generator"),g[o]=function(){return this},g.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=k,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase())},function(t,e,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function i(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],i(n),i(r))}function s(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(r),n=1;n<e.length;n++)e=(t=i(e,n).join("")).match(r);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=o.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch(t){var r=s(n[0]);r!==n[0]&&(e[n[0]]=r)}n=o.exec(t)}e["%C2"]="�";for(var i=Object.keys(e),a=0;a<i.length;a++){var c=i[a];t=t.replace(new RegExp(c,"g"),e[c])}return t}(t)}}},function(t,e,n){"use strict";t.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];const n=t.indexOf(e);return-1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]}},function(t,e,n){"use strict";t.exports=function(t,e){for(var n={},r=Object.keys(t),o=Array.isArray(e),i=0;i<r.length;i++){var s=r[i],a=t[s];(o?-1!==e.indexOf(s):e(s,a,t))&&(n[s]=a)}return n}},function(t,e,n){"use strict";n.r(e),n.d(e,"AuthClient",(function(){return M})),n.d(e,"SiteAnalysis",(function(){return Mt}));var r,o,i=n(2),s=n.n(i),a=n(4),c=n.n(a),u=n(0),l=n.n(u),f=n(6),p=n.n(f);!function(t){t.SSO="sso",t.DD="dingTalk",t.CUSTOM="custom"}(r||(r={})),function(t){t.HASH="hash",t.HISTORY="history"}(o||(o={}));var d="inited",h="error",y=n(5);function v(t){this.message=t}v.prototype=new Error,v.prototype.name="InvalidCharacterError";"undefined"!=typeof window&&window.atob&&window.atob.bind(window);function g(t){this.message=t}g.prototype=new Error,g.prototype.name="InvalidTokenError";var m,b,w=n(3),_=n.n(w),x=function(t,e,n){_.a.set(t,e,n)},S=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?_.a.getJSON(t):_.a.get(t)},k=function(t){_.a.remove(t)},O=function(t,e){sessionStorage.setItem(t,JSON.stringify(e))},j=n(8),E=n.n(j),L=n(9),I=n.n(L),A=n(7),T=n.n(A),P=function(){var t=I()(T.a.mark((function t(){var e,n,r,o,i,s,a,c,u=arguments;return T.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:"",n=u.length>1&&void 0!==u[1]?u[1]:{},r=u.length>2&&void 0!==u[2]?u[2]:"GET",o=u.length>3&&void 0!==u[3]?u[3]:"fetch",r=r.toUpperCase(),e=e,"GET"==r&&(i="",Object.keys(n).forEach((function(t){i+=t+"="+n[t]+"&"})),""!==i&&(i=i.substr(0,i.lastIndexOf("&")),e=e+"?"+i)),!window.fetch||"fetch"!=o){t.next=25;break}return s={credentials:"include",method:r,headers:{Accept:"application/json","Content-Type":"application/json"},mode:"cors",cache:"force-cache"},"POST"==r&&Object.defineProperty(s,"body",{value:JSON.stringify(n)}),t.prev=10,t.next=13,fetch(e,s);case 13:return a=t.sent,t.next=16,a.json();case 16:return c=t.sent,t.abrupt("return",c);case 20:throw t.prev=20,t.t0=t.catch(10),new Error(t.t0);case 23:t.next=26;break;case 25:return t.abrupt("return",new Promise((function(t,o){var i;i=window.XMLHttpRequest?new XMLHttpRequest:new window.ActiveXObject;var s="";"POST"==r&&(s=JSON.stringify(n)),i.open(r,e,!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.send(s),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status){var e=i.response;"object"!==E()(e)&&(e=JSON.parse(e)),t(e)}else o(i)}})));case 26:case"end":return t.stop()}}),t,null,[[10,20]])})));return function(){return t.apply(this,arguments)}}(),C=n(1),N="JH_AUTH_CLIENT_BASE",U=function(t,e){var n=new RegExp("(^|&)"+t+"=([^&]*)(&|$)");if(e===o.HASH){var r=window.location.hash.split("?")[1];return C.parse(r)[t]}var i=window.location.search.substr(1).match(n);return null!=i?decodeURI(i[2]):null},M=function(){function t(e){var n,i=this;if(s()(this,t),this.option=e,l()(this,"_tokenInfo",void 0),l()(this,"_user",void 0),l()(this,"_emitter",new y),l()(this,"_href",void 0),l()(this,"_permissionList",void 0),e.SSOServer){this.option=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={SSOServer:"https://auth-test.jxwrd.gov.cn/",resourceCode:"code",jwtToken:!0,routerMode:o.HASH,method:r.SSO,cacheInCookie:!1};return Object.assign(e,t)}(e),this._href=function(t,e){if(e===o.HISTORY){var n=C.parse(location.search);delete n[t];var r=window.location;return Object.keys(n).length>0?r.origin+r.pathname+C.stringify(n):r.origin+r.pathname}var i=window.location.hash.split("?"),s=p()(i,2),a=s[0],c=s[1],u=C.parse(c);if(delete u[t],Object.keys(u).length>0){var l=C.stringify(u);return window.location.origin+window.location.pathname+a+"?"+l}return window.location.origin+window.location.pathname+a}("tmpTicket",e.routerMode);var a=(n=N+"_isDirty",JSON.parse(sessionStorage.getItem(n)));this.init(a)}else setTimeout((function(){i._emitter.emit(h,"SSOServer必传")}),0)}return c()(t,[{key:"token",get:function(){return this._tokenInfo.access_token}},{key:"tokenInfo",get:function(){return this._tokenInfo},set:function(t){this._tokenInfo=t}},{key:"user",get:function(){return this._user},set:function(t){this._user=t}},{key:"permissionList",get:function(){return this._permissionList},set:function(t){this._permissionList=t}},{key:"init",value:function(t){var e=this;if(t&&this.getCookieCache()){var n=this.user,o=this.tokenInfo,i=this.permissionList,s=U("tmpTicket",this.option.routerMode);s&&"null"!==s&&"undefined"!==s?this.validateBytmpTicket(s):setTimeout((function(){e._emitter.emit(d,{umsAdmin:n,tokenInfo:o,permissionList:i})}),0)}else switch(this.option.method){case r.CUSTOM:return;case r.SSO:return void this.initSSOMethod()}}},{key:"getCookieCache",value:function(){return this.user=S(N+"_user",!0),this.tokenInfo=S(N+"_tokenInfo",!0),this.permissionList=S(N+"_permissionList",!0),!(!this.user||!this.tokenInfo)||(this.removeAllCookie(),!1)}},{key:"removeAllCookie",value:function(){k(N+"_user"),k(N+"_tokenInfo"),k(N+"_permissionList"),O(N+"_isDirty",!1)}},{key:"setAllCookies",value:function(){var t={expires:(this.tokenInfo&&this.tokenInfo.expires_in||3600)/3600/24};x(N+"_user",this.user,t),x(N+"_tokenInfo",this.tokenInfo,t),x(N+"_permissionList",this.permissionList,t)}},{key:"initSSOMethod",value:function(){var t=U("tmpTicket",this.option.routerMode);if(O(N+"_isDirty",!0),t&&"null"!==t&&"undefined"!==t)this.validateBytmpTicket(t);else{var e=encodeURIComponent(this._href);window.location.href="".concat(this.option.SSOServer,"?code=").concat(this.option.resourceCode,"&returnUrl=").concat(e)}}},{key:"validateBytmpTicket",value:function(t){var e=this;return new Promise((function(n,r){P(e.option.SSOServer+"/web/verify-tmp-ticket?tmpTicket="+t,{},"post").then((function(t){if(0===t.code){var o=t.data,i=o.umsAdmin,s=o.tokenInfo,a=o.permissionList;e.user=i,e.tokenInfo=s,e.permissionList=a||[],e.setAllCookies(),e._emitter.emit(d,t.data),setTimeout((function(){e.fixUrlQuery()}),0),n(t.data)}else e._emitter.emit(h,t),r(t)})).catch((function(t){e._emitter.emit(h,t),r(t)}))}))}},{key:"serverLogout",value:function(){var t=this;return new Promise((function(e,n){var r=t.user.loginName,o=t.tokenInfo.access_token;P(t.option.SSOServer+"/web/users/login-out",{username:r,authToken:o},"GET").then((function(t){t?e(t):n(t)})).catch((function(t){n(t)}))}))}},{key:"fixUrlQuery",value:function(){!function(t,e){if(e===o.HISTORY){var n=C.parse(location.search);delete n[t];var r=window.location,i=Object.keys(n).length>0?r.origin+r.pathname+C.stringify(n):r.origin+r.pathname;"pushState"in history?history.replaceState(null,null,i):window.location.replace(i)}else{var s=window.location.hash.split("?"),a=p()(s,2),c=a[0],u=a[1],l=C.parse(u);if(delete l[t],Object.keys(l).length>0){var f=C.stringify(l);window.location.hash=c+"?"+f}else window.location.hash=c}}("tmpTicket",this.option.routerMode)}},{key:"on",value:function(t,e){this._emitter.addListener(t,e)}},{key:"off",value:function(t,e){this._emitter.removeListener(t,e)}},{key:"logout",value:function(){var t=this;this.serverLogout().then((function(){t.removeAllCookie();var e=encodeURIComponent(t._href);window.location.href="".concat(t.option.SSOServer,"?code=").concat(t.option.resourceCode,"&returnUrl=").concat(e)})).catch((function(t){alert("登出错误"+String(t))}))}},{key:"destroy",value:function(){this._emitter.removeAllListeners(),this._emitter=null}}]),t}();!function(t){t.HASH="hash",t.HISTORY="history"}(m||(m={})),function(t){t[t.LOGIN=0]="LOGIN",t[t.PAGE=1]="PAGE"}(b||(b={}));var R="error";function F(){return(65536*(1+Math.random())|0).toString(16).substring(1)}var H=function(){return F()+F()+"-"+F()+"-"+F()+"-"+F()+"-"+F()+F()+F()},B=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return-1!==t.indexOf("127.0.0.1")||t.indexOf("localhost")},G=n(10),D=function(t,e){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function q(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}D(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function J(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function Y(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t}Object.create;function W(t){return"function"==typeof t}var X,Q=((X=function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}((function(t){Error.call(t),t.stack=(new Error).stack}))).prototype=Object.create(Error.prototype),X.prototype.constructor=X,X);function z(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var V=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=J(i),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else i.remove(this);var c=this.initialTeardown;if(W(c))try{c()}catch(t){o=t instanceof Q?t.errors:[t]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var l=J(u),f=l.next();!f.done;f=l.next()){var p=f.value;try{Z(p)}catch(t){o=null!=o?o:[],t instanceof Q?o=Y(Y([],$(o)),$(t.errors)):o.push(t)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(o)throw new Q(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Z(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(n=this._teardowns)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&z(e,t)},t.prototype.remove=function(e){var n=this._teardowns;n&&z(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}();V.EMPTY;function K(t){return t instanceof V||t&&"closed"in t&&W(t.remove)&&W(t.add)&&W(t.unsubscribe)}function Z(t){W(t)?t():t.unsubscribe()}var tt=function(t){function e(e,n){return t.call(this)||this}return q(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(V),et={setInterval:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=et.delegate;return((null==n?void 0:n.setInterval)||setInterval).apply(void 0,Y([],$(t)))},clearInterval:function(t){var e=et.delegate;return((null==e?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},nt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return q(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),et.setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return e;et.clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,z(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(tt),rt={now:function(){return(rt.delegate||Date).now()},delegate:void 0},ot=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=rt.now,t}(),it=new(function(t){function e(e,n){void 0===n&&(n=ot.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return q(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(ot))(nt),st=it,at={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ct={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ct.delegate;return((null==n?void 0:n.setTimeout)||setTimeout).apply(void 0,Y([],$(t)))},clearTimeout:function(t){var e=ct.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function ut(t){ct.setTimeout((function(){var e=at.onUnhandledError;if(!e)throw t;e(t)}))}function lt(){}var ft=pt("C",void 0,void 0);function pt(t,e,n){return{kind:t,value:e,error:n}}var dt=null;function ht(t){at.useDeprecatedSynchronousErrorHandling&&dt&&(dt.errorThrown=!0,dt.error=t)}var yt=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,K(e)&&e.add(n)):n.destination=wt,n}return q(e,t),e.create=function(t,e,n){return new vt(t,e,n)},e.prototype.next=function(t){this.isStopped?bt(function(t){return pt("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?bt(pt("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?bt(ft,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(V),vt=function(t){function e(e,n,r){var o,i=t.call(this)||this;if(W(e))o=e;else if(e){var s;o=e.next,n=e.error,r=e.complete,i&&at.useDeprecatedNextContext?(s=Object.create(e)).unsubscribe=function(){return i.unsubscribe()}:s=e,o=null==o?void 0:o.bind(s),n=null==n?void 0:n.bind(s),r=null==r?void 0:r.bind(s)}return i.destination={next:o?gt(o,i):lt,error:gt(null!=n?n:mt,i),complete:r?gt(r,i):lt},i}return q(e,t),e}(yt);function gt(t,e){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{t.apply(void 0,Y([],$(e)))}catch(t){at.useDeprecatedSynchronousErrorHandling?ht(t):ut(t)}}}function mt(t){throw t}function bt(t,e){var n=at.onStoppedNotification;n&&ct.setTimeout((function(){return n(t,e)}))}var wt={closed:!0,next:lt,error:mt,complete:lt},_t="function"==typeof Symbol&&Symbol.observable||"@@observable";function xt(t){return t}function St(t){return 0===t.length?xt:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var kt=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,o=this,i=(r=t)&&r instanceof yt||function(t){return t&&W(t.next)&&W(t.error)&&W(t.complete)}(r)&&K(r)?t:new vt(t,e,n);return function(t){if(at.useDeprecatedSynchronousErrorHandling){var e=!dt;if(e&&(dt={errorThrown:!1,error:null}),t(),e){var n=dt,r=n.errorThrown,o=n.error;if(dt=null,r)throw o}}else t()}((function(){var t=o,e=t.operator,n=t.source;i.add(e?e.call(i,n):n?o._subscribe(i):o._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=Ot(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),null==o||o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[_t]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return St(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Ot(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function Ot(t){var e;return null!==(e=null!=t?t:at.Promise)&&void 0!==e?e:Promise}function jt(t,e,n){void 0===t&&(t=0),void 0===n&&(n=st);var r,o=-1;return null!=e&&((r=e)&&W(r.schedule)?n=e:o=e),new kt((function(e){var r=function(t){return t instanceof Date&&!isNaN(t)}(t)?+t-n.now():t;r<0&&(r=0);var i=0;return n.schedule((function(){e.closed||(e.next(i++),0<=o?this.schedule(void 0,o):e.complete())}),r)}))}function Et(t){return function(e){if(function(t){return W(null==t?void 0:t.lift)}(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")}}var Lt=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.onFinalize=i,s._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,s._error=o?function(t){try{o(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return q(e,t),e.prototype.unsubscribe=function(){var e,n=this.closed;t.prototype.unsubscribe.call(this),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))},e}(yt);var It=n(11),At=n.n(It);function Tt(){return At()('!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var o={get(e,t=null){return this.fetch("GET",e,t)},post(e,t=null){return this.fetch("POST",e,t)},put(e,t=null){return this.fetch("PUT",e,t)},del(e,t=null){return this.fetch("DELETE",e,t)},ajax:(e,t,n,o={})=>new Promise((r,s)=>{let a=new XMLHttpRequest;a.responseType="json",a.onload=()=>{switch(a.status){case 200:r(a.response);break;case 204:r();break;case 401:s();break;default:s({status:a.status,res:a.response})}},n&&(n=JSON.stringify(n)),a.open(e,t,!0),Object.entries(o).forEach(([e,t])=>{a.setRequestHeader(e,t)}),a.setRequestHeader("Content-type","application/json"),a.send(n)}),fetch(e,t,n){if(window&&!window.fetch)return this.ajax(e,t,n);let o=[],r={method:e,mode:"cors",headers:{"Content-Type":"application/json"}};if(n){for(let e in n)o.push(`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`);"GET"===e?t+="?"+o.join("&"):r.body=JSON.stringify(n)}return fetch(t,r).then(e=>{switch(e.status){case 200:return e.json();case 204:break;case 401:return Promise.reject();case 403:return e.json().then(e=>Promise.reject(e));default:return Promise.reject({status_code:500,message:"服务器繁忙, 请稍后再试"})}})}};onmessage=function(e){switch(e.data.cmd){case"UPLOADLOGLIST":const t=e.data.url,n=e.data.log;!function(e,t,n=[],r){const s=n.map(e=>e.id),a=(e=>{const t=[];for(;e.length>0;){const n=e.pop();if(t.find(e=>e.login_name===n.login_name)){const e=t.find(e=>e.login_name===n.login_name&&e.log_type===n.log_type);e?e.count+=1:t.push(n)}else t.push(n)}return t})(n).map(e=>({appId:t,count:e.count,dataType:e.log_type,identify:e.login_name})),c={"Stjh-Real-IP":r+""};o.ajax("post",e+"/site-statistics",a,c).then((function(e){0===e.code&&postMessage({cmd:"UPLOAD_SUCCESS",ids:s})})).catch((function(e){}))}(t,e.data.appId,n,e.data.ip);break;case"GETIP":o.ajax("get","http://pv.sohu.com/cityjson?ie=utf-8",null,{}).then((function(e){console.log(e,"--")})).catch((function(e){}))}}}]);',"Worker",void 0,n.p+"index.node.worker.js")}var Pt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"success";"success"===n?console.log("%c".concat(t,"%c").concat(e),"background: #00d1b2; padding: 5px; color: #fff; border-radius: 5px 0 0 5px","background: #555; padding: 5px; color: #fff; border-radius: 0 5px 5px 0"):"error"===n?console.log("%c".concat(t,"%c").concat(e),"background: #f5222d; padding: 5px; color: #fff; border-radius: 5px 0 0 5px","background: #555; padding: 5px; color: #fff; border-radius: 0 5px 5px 0"):"warn"===n&&console.log("%c".concat(t,"%c").concat(e),"background: #fa8c16; padding: 5px; color: #fff; border-radius: 5px 0 0 5px","background: #555; padding: 5px; color: #fff; border-radius: 0 5px 5px 0")},Ct=function(t,e){return new Promise((function(n,r){t||r(" DB null"),t.transaction((function(t){t.executeSql("".concat(e),[],(function(t,e){n(e)}),(function(t,e){console.log("select table error"),console.dir(e),r(e)}))}))}))},Nt=G.a,Ut=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s()(this,t),this.log_type=e,this.login_name=n,this.is_upload=r,l()(this,"id",void 0),l()(this,"url",void 0),l()(this,"creater_date",void 0),l()(this,"count",void 0),this.log_type=e,this.id=H(),this.url=location.href,this.creater_date=(new Date).getTime(),this.count=1},Mt=function(){function t(e){var n=this;if(s()(this,t),this.option=e,l()(this,"id",void 0),l()(this,"_loginName",void 0),l()(this,"e",void 0),l()(this,"_db",void 0),l()(this,"_prod",void 0),l()(this,"_version",void 0),l()(this,"_ip",void 0),l()(this,"_worker",void 0),l()(this,"_emitter",new y),l()(this,"$upLoadSubction",void 0),l()(this,"sqlUnLoadLog",(function(){return new Promise((function(t,e){Ct(n.db,"SELECT * FROM LOG_TABLE WHERE is_upload=0").then((function(n){var r=Array.prototype.slice.call(n.rows);Array.isArray(r)&&r.length>0?t(r):e([])})).catch((function(t){e(t)}))}))})),l()(this,"clearUploaded",(function(){return new Promise((function(t,e){Ct(n.db,"DELETE FROM LOG_TABLE WHERE is_upload=1").then((function(e){var n=Array.prototype.slice.call(e.rows);Array.isArray(n)?t(n):t([])})).catch((function(t){e(t)}))}))})),l()(this,"onWorker",(function(t){switch(t.data.cmd){case"UPLOAD_SUCCESS":var e=t.data.ids;n.upLoaderServerSuccess(e)}})),window.jxstjh_siteAnalysis)return window.jxstjh_siteAnalysis;this.id="ac"+H(),this._prod=this.option.production,this._version=Nt,e&&e.siteAnalysisServer?(this.option=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={siteAnalysisServer:"https://auth-test.jxwrd.gov.cn/",appId:"code",routerMode:m.HASH,interval:10,production:!1};return Object.assign(e,t)}(e),this.e={onPageChange:this._onPageChange.bind(this),onUserLogin:this._onUserLogin.bind(this)},this._worker=new Tt,this._worker.onmessage=this.onWorker,this.getIPbyFront(),this._prod&&this.init()):setTimeout((function(){n._emitter.emit(R,"siteAnalysisServer必传")}),0),window.jxstjh_siteAnalysis=this}return c()(t,[{key:"db",get:function(){return this._db},set:function(t){this._db=t}},{key:"loginName",get:function(){return this._loginName},set:function(t){this._loginName=t}},{key:"init",value:function(){var t,e,n,r,o,i=this,s=this.option.appId,a=null;try{a=window.openDatabase("SA"+s,"1.0","JXSTJH_SITE_ANALYSIS",50331648)}catch(t){this._emitter.emit(R,"不支持webSQL"),Pt("JH_SA","不支持webSQL!","error")}this.db=a,(t=this.db,new Promise((function(e,n){t?t.transaction((function(t){t.executeSql("create table if not exists LOG_TABLE(id varchar(32),url varchar(256), login_name varchar(20), creater_date varchar(20), log_type int, count int, is_upload int)",[],(function(t,n){e(n)}),(function(t){console.log("INIT_LOG_TABLE 失败"),n(t)}))})):n(" DB null")}))).catch((function(t){i._emitter.emit(R,t)})),this.$upLoadSubction=(r=1e3*this.option.interval,void 0===r&&(r=0),void 0===o&&(o=it),r<0&&(r=0),jt(r,r,o)).pipe((e=function(){return!!i.db&&i._prod},Et((function(t,r){var o=0;t.subscribe(new Lt(r,(function(t){return e.call(n,t,o++)&&r.next(t)})))})))).subscribe((function(){i.sqlUnLoadLog().then((function(t){return i.upLoadLog(t)})).then((function(){return i.clearUploaded()})).catch((function(){}))})),this.insetLogMsg(b.PAGE)}},{key:"getIPbyFront",value:function(){var t=this;if(!document.getElementById("sohuIp")){var e=document.createElement("script");e.id="sohuIp",e.src="http://pv.sohu.com/cityjson?ie=utf-8",e.onload=function(){t._ip=window.returnCitySN&&window.returnCitySN.cip},document.body.appendChild(e)}}},{key:"setLoginName",value:function(t){return this.loginName=t,this._prod?this._onUserLogin():Promise.resolve("recordPage in production only")}},{key:"_onPageChange",value:function(){this.insetLogMsg(b.PAGE)}},{key:"_onUserLogin",value:function(){var t=this;return new Promise((function(e,n){var r=new Ut(b.LOGIN,t.loginName,0);if(!B(r.url)||t.option.production){var o="INSERT INTO LOG_TABLE (id, url, login_name, creater_date, log_type, count, is_upload) VALUES ('".concat(r.id,"','").concat(r.url,"','").concat(r.login_name,"','").concat(r.creater_date,"',").concat(r.log_type,",").concat(r.count,",").concat(r.is_upload,")");Ct(t.db,o).then((function(){e("插入数据成功!")})).catch((function(t){n(t)}))}else e("本地环境")}))}},{key:"recordPage",value:function(){return this._prod?this.insetLogMsg(b.PAGE):Promise.resolve("recordPage in production only")}},{key:"insetLogMsg",value:function(t){var e=this;return new Promise((function(n,r){var o=new Ut(t,e.loginName,0);if(!B(o.url)||e.option.production){var i="INSERT INTO LOG_TABLE (id, url, login_name, creater_date, log_type, count, is_upload) VALUES ('".concat(o.id,"','").concat(o.url,"','").concat(o.login_name,"','").concat(o.creater_date,"',").concat(o.log_type,",").concat(o.count,",").concat(o.is_upload,")");Ct(e.db,i).then((function(){n("插入数据成功!")})).catch((function(t){r(t)}))}else n("本地环境")}))}},{key:"upLoadLog",value:function(t){var e=this;return new Promise((function(n){var r=e.option.appId;e._worker.postMessage({cmd:"UPLOADLOGLIST",url:e.option.siteAnalysisServer,log:t,appId:r,ip:e._ip}),n(!0)}))}},{key:"upLoaderServerSuccess",value:function(t){var e=this;return Pt("JH_SA","upLoaderServerSuccess!","success"),new Promise((function(n,r){t.length<1&&r("length 0");var o="DELETE FROM LOG_TABLE WHERE id in (";t.forEach((function(e,n){n===t.length-1?o+="'".concat(e,"'"):o+="'".concat(e,"',")})),o+=")",Ct(e.db,o).then((function(){n(!0)})).catch((function(t){r(t)}))}))}},{key:"destroy",value:function(){this.e=null,this._emitter.removeAllListeners(),this.$upLoadSubction.unsubscribe(),this._emitter=null}}]),t}()}])})); |
{ | ||
"name": "@jxstjh/auth-client", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"description": "匹配4a认证的客户端工具包 🌼", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -16,3 +16,3 @@ | ||
window.SA = new SiteAnalysis({ | ||
siteAnalysisServer: 'http://10.36.6.3:30419', // 统一上报服务器 | ||
siteAnalysisServer: 'http://constcount.dev.jxwrd.gov.cn', // 统一上报服务器 | ||
appId: 'cb11c7ba-df52-4142-9312-c195f2baf7bb', // appId | ||
@@ -19,0 +19,0 @@ interval: 30, // 上报日志频率 单位秒 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
118524