isdata-customer-sdk 0.1.80 → 0.1.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.min.js
CHANGED
|
@@ -23,5 +23,5 @@ return t.mode.CTRGladman=function(){var e=t.lib.BlockCipherMode.extend();functio
|
|
|
23
23
|
|
|
24
24
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
25
25
|
*/
|
|
26
|
-
return function(){var e=t,n=e.lib,r=n.WordArray,i=n.Hasher,o=e.algo,a=r.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=r.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),s=r.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=r.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=r.create([0,1518500249,1859775393,2400959708,2840853838]),l=r.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=i.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,h,_,m,b,x,I,S,k,A,C,D=this._hash.words,E=f.words,B=l.words,O=a.words,T=u.words,j=s.words,R=c.words;x=o=D[0],I=h=D[1],S=_=D[2],k=m=D[3],A=b=D[4];for(n=0;n<80;n+=1)C=o+t[e+O[n]]|0,C+=n<16?p(h,_,m)+E[0]:n<32?d(h,_,m)+E[1]:n<48?v(h,_,m)+E[2]:n<64?g(h,_,m)+E[3]:w(h,_,m)+E[4],C|=0,C=y(C,j[n]),C=C+b|0,o=b,b=m,m=y(_,10),_=h,h=C,C=x+t[e+T[n]]|0,C+=n<16?w(I,S,k)+B[0]:n<32?g(I,S,k)+B[1]:n<48?v(I,S,k)+B[2]:n<64?d(I,S,k)+B[3]:p(I,S,k)+B[4],C|=0,C=y(C,R[n]),C=C+A|0,x=A,A=k,k=y(S,10),S=I,I=C;C=D[1]+_+k|0,D[1]=D[2]+m+A|0,D[2]=D[3]+b+x|0,D[3]=D[4]+o+I|0,D[4]=D[0]+h+S|0,D[0]=C},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var u=o[a];o[a]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return i},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,n){return t^e^n}function d(t,e,n){return t&e|~t&n}function v(t,e,n){return(t|~e)^n}function g(t,e,n){return t&n|e&~n}function w(t,e,n){return t^(e|~n)}function y(t,e){return t<<e|t>>>32-e}e.RIPEMD160=i._createHelper(h),e.HmacRIPEMD160=i._createHmacHelper(h)}(Math),t.RIPEMD160}))},8111:function(t,e,n){"use strict";var r=n(6518),i=n(4576),o=n(679),a=n(8551),u=n(4901),s=n(2787),c=n(2106),f=n(4659),l=n(9039),h=n(9297),p=n(8227),d=n(7657).IteratorPrototype,v=n(3724),g=n(6395),w="constructor",y="Iterator",_=p("toStringTag"),m=TypeError,b=i[y],x=g||!u(b)||b.prototype!==d||!l((function(){b({})})),I=function(){if(o(this,d),s(this)===d)throw new m("Abstract class Iterator not directly constructable")},S=function(t,e){v?c(d,t,{configurable:!0,get:function(){return e},set:function(e){if(a(this),this===d)throw new m("You can't redefine this property");h(this,t)?this[t]=e:f(this,t,e)}}):d[t]=e};h(d,_)||S(_,y),!x&&h(d,w)&&d[w]!==Object||S(w,I),I.prototype=d,r({global:!0,constructor:!0,forced:x},{Iterator:I})},8124:function(t,e,n){(function(e,r){t.exports=r(n(9021),n(7165))})(0,(function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding}))},8227:function(t,e,n){"use strict";var r=n(4576),i=n(5745),o=n(9297),a=n(3392),u=n(4495),s=n(7040),c=r.Symbol,f=i("wks"),l=s?c["for"]||c:c&&c.withoutSetter||a;t.exports=function(t){return o(f,t)||(f[t]=u&&o(c,t)?c[t]:l("Symbol."+t)),f[t]}},8454:function(t,e,n){(function(e,r){t.exports=r(n(9021),n(7165))})(0,(function(t){return t.mode.ECB=function(){var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),e.Decryptor=e.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),e}(),t.mode.ECB}))},8480:function(t,e,n){"use strict";var r=n(1828),i=n(8727),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},8551:function(t,e,n){"use strict";var r=n(34),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not an object")}},8622:function(t,e,n){"use strict";var r=n(4576),i=n(4901),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},8686:function(t,e,n){"use strict";var r=n(3724),i=n(9039);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8727:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8773:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},8981:function(t,e,n){"use strict";var r=n(7750),i=Object;t.exports=function(t){return i(r(t))}},9012:function(t){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},9021:function(t,e,n){(function(e,n){t.exports=n()})(0,(function(){var t=t||function(t,e){var r;if("undefined"!==typeof window&&window.crypto&&(r=window.crypto),"undefined"!==typeof self&&self.crypto&&(r=self.crypto),"undefined"!==typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!==typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&"undefined"!==typeof n.g&&n.g.crypto&&(r=n.g.crypto),!r)try{r=n(477)}catch(g){}var i=function(){if(r){if("function"===typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(g){}if("function"===typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(g){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),a={},u=a.lib={},s=u.Base=function(){return{extend:function(t){var e=o(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=u.WordArray=s.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var u=0;u<i;u+=4)e[r+u>>>2]=n[u>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=s.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(i());return new c.init(e,t)}}),f=a.enc={},l=f.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new c.init(n,e/2)}},h=f.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new c.init(n,e)}},p=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},d=u.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,u=4*a,s=o/u;s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0);var f=s*a,l=t.min(4*f,o);if(f){for(var h=0;h<f;h+=a)this._doProcessBlock(i,h);n=i.splice(0,f),r.sigBytes-=l}return new c.init(n,l)},clone:function(){var t=s.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),v=(u.Hasher=d.extend({cfg:s.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new v.HMAC.init(t,n).finalize(e)}}}),a.algo={});return a}(Math);return t}))},9039:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},9106:function(t,e,n){"use strict";var r=n(9516);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!==t&&"undefined"!==typeof t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))})))})),o=a.join("&")}if(o){var u=t.indexOf("#");-1!==u&&(t=t.slice(0,u)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},9137:function(t){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},9297:function(t,e,n){"use strict";var r=n(9504),i=n(8981),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},9306:function(t,e,n){"use strict";var r=n(4901),i=n(6823),o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not a function")}},9433:function(t,e,n){"use strict";var r=n(4576),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},9462:function(t,e,n){"use strict";var r=n(9565),i=n(2360),o=n(6699),a=n(6279),u=n(8227),s=n(1181),c=n(5966),f=n(7657).IteratorPrototype,l=n(2529),h=n(9539),p=u("toStringTag"),d="IteratorHelper",v="WrapForValidIterator",g=s.set,w=function(t){var e=s.getterFor(t?v:d);return a(i(f),{next:function(){var n=e(this);if(t)return n.nextHandler();if(n.done)return l(void 0,!0);try{var r=n.nextHandler();return n.returnHandlerResult?r:l(r,n.done)}catch(i){throw n.done=!0,i}},return:function(){var n=e(this),i=n.iterator;if(n.done=!0,t){var o=c(i,"return");return o?r(o,i):l(void 0,!0)}if(n.inner)try{h(n.inner.iterator,"normal")}catch(a){return h(i,"throw",a)}return i&&h(i,"normal"),l(void 0,!0)}})},y=w(!0),_=w(!1);o(_,p,"Iterator Helper"),t.exports=function(t,e,n){var r=function(r,i){i?(i.iterator=r.iterator,i.next=r.next):i=r,i.type=e?v:d,i.returnHandlerResult=!!n,i.nextHandler=t,i.counter=0,i.done=!1,g(this,i)};return r.prototype=e?y:_,r}},9504:function(t,e,n){"use strict";var r=n(616),i=Function.prototype,o=i.call,a=r&&i.bind.bind(o,o);t.exports=r?a:function(t){return function(){return o.apply(t,arguments)}}},9506:function(t,e,n){(function(e,r){t.exports=r(n(9021),n(5471),n(1025))})(0,(function(t){return function(){var e=t,n=e.lib,r=n.Base,i=n.WordArray,o=e.algo,a=o.MD5,u=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){var n,r=this.cfg,o=r.hasher.create(),a=i.create(),u=a.words,s=r.keySize,c=r.iterations;while(u.length<s){n&&o.update(n),n=o.update(t).finalize(e),o.reset();for(var f=1;f<c;f++)n=o.finalize(n),o.reset();a.concat(n)}return a.sigBytes=4*s,a}});e.EvpKDF=function(t,e,n){return u.create(n).compute(t,e)}}(),t.EvpKDF}))},9516:function(t,e,n){"use strict";var r=n(9012),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return"undefined"===typeof t}function u(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function s(t){return"[object ArrayBuffer]"===i.call(t)}function c(t){return"undefined"!==typeof FormData&&t instanceof FormData}function f(t){var e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function l(t){return"string"===typeof t}function h(t){return"number"===typeof t}function p(t){return null!==t&&"object"===typeof t}function d(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function v(t){return"[object Date]"===i.call(t)}function g(t){return"[object File]"===i.call(t)}function w(t){return"[object Blob]"===i.call(t)}function y(t){return"[object Function]"===i.call(t)}function _(t){return p(t)&&y(t.pipe)}function m(t){return"undefined"!==typeof URLSearchParams&&t instanceof URLSearchParams}function b(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function x(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function I(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}function S(){var t={};function e(e,n){d(t[n])&&d(e)?t[n]=S(t[n],e):d(e)?t[n]=S({},e):o(e)?t[n]=e.slice():t[n]=e}for(var n=0,r=arguments.length;n<r;n++)I(arguments[n],e);return t}function k(t,e,n){return I(e,(function(e,i){t[i]=n&&"function"===typeof e?r(e,n):e})),t}function A(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}t.exports={isArray:o,isArrayBuffer:s,isBuffer:u,isFormData:c,isArrayBufferView:f,isString:l,isNumber:h,isObject:p,isPlainObject:d,isUndefined:a,isDate:v,isFile:g,isBlob:w,isFunction:y,isStream:_,isURLSearchParams:m,isStandardBrowserEnv:x,forEach:I,merge:S,extend:k,trim:b,stripBOM:A}},9519:function(t,e,n){"use strict";var r,i,o=n(4576),a=n(2839),u=o.process,s=o.Deno,c=u&&u.versions||s&&s.version,f=c&&c.v8;f&&(r=f.split("."),i=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(i=+r[1]))),t.exports=i},9539:function(t,e,n){"use strict";var r=n(9565),i=n(8551),o=n(5966);t.exports=function(t,e,n){var a,u;i(t);try{if(a=o(t,"return"),!a){if("throw"===e)throw n;return n}a=r(a,t)}catch(s){u=!0,a=s}if("throw"===e)throw n;if(u)throw a;return i(a),n}},9547:function(t,e,n){"use strict";n(4114),n(8111),n(7588);var r=n(2543),i=n.n(r);class o{constructor(){this.__listeners={}}register(...t){let e,n;3==t.length?(e=`${t[0]}-${t[1]}`,n=t[2]):(e=t[0],n=t[1]),this.__listeners[e]=this.__listeners[e]||[],this.__listeners[e].push({callback:n})}fireEvent(...t){let e,n;3==t.length?(e=`${t[0]}-${t[1]}`,n=t[2]):(e=t[0],n=t[1]);let r=this.__listeners[e]||[],o=!0;return i().forEach(r,(t=>{let e=t.callback,r=e.call(null,n);if(!1===r)return o=!1,!1})),o}unregister(...t){let e,n;3==t.length?(e=`${t[0]}-${t[1]}`,n=t[2]):(e=t[0],n=t[1]),i().isString(e)&&!i().isEmpty(this.__listeners[e])&&i().remove(this.__listeners[e],(t=>t.callback===n||void 0===n))}hasListener(t){return i().isString(t)&&!i().isEmpty(this.__listeners[t])}clearAll(){this.__listeners={}}}const a=new o;e.A=a},9557:function(t,e,n){(function(e,r){t.exports=r(n(9021),n(3240),n(1380))})(0,(function(t){return function(){var e=t,n=e.x64,r=n.Word,i=n.WordArray,o=e.algo,a=o.SHA512,u=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=16,t}});e.SHA384=a._createHelper(u),e.HmacSHA384=a._createHmacHelper(u)}(),t.SHA384}))},9565:function(t,e,n){"use strict";var r=n(616),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},9615:function(t,e,n){"use strict";var r=n(9137),i=n(4680);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},9617:function(t,e,n){"use strict";var r=n(5397),i=n(5610),o=n(6198),a=function(t){return function(e,n,a){var u=r(e),s=o(u);if(0===s)return!t&&-1;var c,f=i(a,s);if(t&&n!==n){while(s>f)if(c=u[f++],c!==c)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},9641:function(t){t.exports={version:"0.23.0"}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}!function(){n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,{a:e}),e}}(),function(){n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){n.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t}}(),function(){n.p=""}();var r={};return function(){"use strict";n.r(r),n.d(r,{ChatClientMgr:function(){return yn},addEventAction:function(){return dn},addIMMapping:function(){return nt},addObjectUsedTimes:function(){return q},addWindowTrustedOrigin:function(){return hn},createFileFromUrl:function(){return cn},decrypt:function(){return nn},destroyEventCenter:function(){return u},extractFilenameFromUrl:function(){return fn},fireEvent:function(){return c},getAIRobotInfos:function(){return rt},getAPPInfosByID:function(){return Y},getAllUserInfosByGroupID:function(){return Q},getAppCustomData:function(){return ot},getAppPortalMenuDatas:function(){return _},getAuthPic:function(){return tn},getChildrenOfficeInfosByID:function(){return tt},getCurrentUserPortalPageID:function(){return D},getDifyFileType:function(){return xn},getFileSize:function(){return ln},getGroupMappingsByAccount:function(){return V},getIMHanlder:function(){return mn},getIntegrateAppInfoByID:function(){return at},getKey:function(){return an},getLoginPageNotices:function(){return M},getMappingAppInfoByID:function(){return P},getMenuDatasByGroupID:function(){return m},getMenuMappingDatasByRoleIDs:function(){return b},getObjectUseTimes:function(){return K},getOfficeInfosByIDs:function(){return J},getPageIDByComponentID:function(){return G},getPojectDptsByUserAndGroupID:function(){return et},getPoratlAppID:function(){return y},getPortalAccessToken:function(){return N},getPortalAppCustomConfig:function(){return L},getPortalDocmentInfo:function(){return S},getPortalPageConfig:function(){return O},getPortalPageMenuID:function(){return R},getPortalUserInfo:function(){return U},getPortalUserMappingInfos:function(){return B},getPortalUserSig:function(){return z},getRobotInfoByID:function(){return _n},getRoleIDsByUserAndGroupID:function(){return I},getThirdAppPathByKey:function(){return W},getUrlParamValue:function(){return sn},getUserAllMappngPortal:function(){return E},hasListener:function(){return f},initEventCenter:function(){return a},initFrameWindowListener:function(){return gn},loginAccount:function(){return on},logoutAccount:function(){return en},queryAndStoreAppVariable:function(){return $},queryAppVariable:function(){return F},queryAssetById:function(){return un},queryGroupIDByOfficeId:function(){return H},queryGroupInfosByOfficeId:function(){return X},queryOfficeInfosById:function(){return Z},registerEventListener:function(){return o},removeEventAction:function(){return vn},removeEventListener:function(){return s},removeWindowTrustedOrigin:function(){return pn},sendPostToAIAgent:function(){return bn},sendWindowMessage:function(){return wn},setPortalPageConfig:function(){return T},switchPortalLogin:function(){return rn},transformPortalQuickMenuDatas:function(){return A},transformPortalSystemMenuDatas:function(){return C},updateIMMapping:function(){return it},updateUserSelectPortal:function(){return j},validateSSOPageLoaded:function(){return x}});var t={};if(n.r(t),"undefined"!==typeof window){var e=window.document.currentScript,i=e&&e.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}const o=(t,e)=>{let n=window.rjEventCenter;n||(a(),n=window.rjEventCenter),n&&n.register&&n.register(t,e)},a=()=>{if(window.rjEventCenter)console.log(`事件中心已经初始化,不需要重新初始化:时间戳: ${(new Date).toLocaleString()}`);else{console.log(`初始化事件中心:时间戳: ${(new Date).toLocaleString()}`);let t=n(9547).A;window.rjEventCenter=t}},u=()=>{window.rjEventCenter&&(window.rjEventCenter.clearAll(),window.rjEventCenter=null,console.log(`事件中心已清理:时间戳: ${(new Date).toLocaleString()}`))},s=(t,e)=>{let n=window.rjEventCenter;n&&n.unregister&&n.unregister(t,e)},c=(t,e)=>{let n=window.rjEventCenter;n&&n.fireEvent&&n.fireEvent(t,e)},f=t=>{let e=window.rjEventCenter;return!(!e||!e.hasListener)&&e.hasListener(t)};n(4114),n(8111),n(2489),n(116),n(7588);var l=n(2505),h=n.n(l),p=n(3992);let d="";const v=(t="")=>{t&&(t.startsWith("/")&&(t=t.slice(1,t.length)),t.endsWith("/")&&(t=t.slice(0,-1)));const e=h().create({baseURL:`${d}/${t?t+"/":""}sdata/rest`,timeout:6e4,validateStatus:function(t){return t>=200&&t<300},headers:window.location.search&&p.parse(window.location.search).token||window.token?{token:p.parse(window.location.search).token||window.token}:{}});return e.defaults.headers.post["Content-Type"]="application/json",e.interceptors.response.use((t=>{let{data:e}=t;return"string"===typeof e&&(e=JSON.parse(e)),!e||200===e.status||e instanceof Blob?e instanceof Blob?(t.data=e,t):(t.data=e&&e.result,t):Promise.reject(t)}),(t=>{if(!t.response||401!==t.response.status)return Promise.reject(t.response)})),e};let g=window.prefixPath||"";var w=v(g);const y=(t,e)=>{let n="";return t?n=window.appSdk.getAppId():(n=window.sessionStorage.getItem("iportal_app_id"),n||e.forEach((t=>{"iPortal_app_id"==t.name&&(n=t.default_value)})),n||(n=window.appSdk.getAppId())),n},_=async(t,e,n,r)=>{let i=y(n,r),o=await I(t,i,e),a=await m(e,o),u=window.appSdk.getAppId(),s=a.filter((t=>{if(n)return!0;if(t.app_id==i)return!0;{let e=t.children,n=!1;return e&&e.length>0&&e.forEach((t=>{let e=t.children;if(e&&e.length>0){let t=e.filter((t=>t.app_id===u));t&&t.length>0&&(n=!0)}})),n}}));return s},m=async(t,e)=>{let n={param:{id:t}},r=await w.post("/dataservice/rest/orchestration/getMenuDatasByGroupID",n),i=r.data.resultDatas,o=r.data.menuTypes;if(e&&e.length>0){let n=await b(e,t),r=n.data.quickMenuMappingDatas||[],a={},u={};for(const t of i){let e=t.id;u[e]=t}for(const t of r){let e=t.menu_mapping_id,n=u[e];a[e]=n}return k(i,o,a)}return k(i,o,[])},b=async(t,e)=>{let n={param:{role_ids:t,group_id:e}},r=await w.post("/dataservice/rest/orchestration/getQuckMenuMappingsByRoleIDs",n);return r},x=async(t,e,n)=>{let r={param:{app_id:t,appSecret:e,returnUrl:n}},i=await w.post("/dataservice/rest/orchestration/validateSSOPageLoaded",r),o=i.data.count;return o},I=async(t,e,n)=>{let r={param:{user_id:t,app_id:e,group_id:n}},i=await w.post("/dataservice/rest/orchestration/getRoleIDsByUserAndGroupID",r),o=i.data.portal_role_ids;return o},S=async t=>{let e={param:{kb_doc_id:t}},n=await w.post("/dataservice/rest/orchestration/getPortalDocmentInfoByKBID",e),r=n.data.docInfo;return r},k=(t,e,n)=>{let r={},i={},o={};for(let u in n){let t=n[u],e=t.parent_id;e&&(o[e]=!0)}for(const u of t){let t=u.id,e={id:t,index:u.menu_id,name:u.title,sort:u.sort,actionType:u.actionType,url:u.url,iconClass:u.image,children:[],app_id:u.app_id,menu_id:u.menu_id,beyond_type:u.menu_type?u.menu_type:"RJVIEW-OTHERS",beyond_type_sort:u.menu_type_sort?u.menu_type_sort:999};n?(n[t]||"4"==u.type||o[t])&&(r[t]=e):r[t]=e}for(const u of e){let t=u.id;i[t]=u}for(const u of t){let t=u.type;if("5"==t){let t=r[u.id];if(!t)continue;let e=u.parent_id,n=t.beyond_type,o=r[e];if(!o)continue;let a=o.children,s=a.find((t=>t.id==n));if(s){let e=s.children;e.push(t),t.typeItem=s}else{let e=i[n],r=e?{id:n,index:n,name:e.title,children:[],sort:e.value}:{id:n,index:n,name:"其他",children:[],sort:999},o=r.children;o.push(t),a.push(r),t.typeItem=r}}}const a=[];for(const u of t){let t=u.type;if("4"==t){let t=r[u.id];if(!t)continue;let e=t.children,n=0;for(const r of e){let t=r.children,e=t.length;if(n+=e,e>0)break}if(0==n)continue;a.push(t);let i=t.children;i.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort));for(let r of i){let t=r.children;t.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort))}}}return a.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort)),a},A=t=>{let e={};for(const r of t){let t=r.id,n={id:t,label:r.title,sort:r.sort,children:[],parent_id:r.parent_id,type:r.type};e[t]=n}for(const r of t){let t=e[r.id];if("5"==t.type){let n=t.parent_id,r=e[n];if(r){let e=r.children;e.push(t)}}}const n=[];for(const r of t){let t=e[r.id];if("4"==t.type){n.push(t);let e=t.children;e.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort))}}return n.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort)),n},C=t=>{let e={};for(const r of t){let t=r.id,n={id:t,label:r.name,sort:r.sort,icon:r.icon,children:[],app_id:r.datapp_id,parent_id:r.parent_id,leaf_flag:r.leaf_flag};e[t]=n}for(const r of t){let t=r.leaf_flag;if(1==t){let t=e[r.id],n=r.parent_id,i=e[n];if(i){let e=i.children;e.push(t)}}}const n=[];for(const r of t){let t=r.leaf_flag;if(0==t){let t=e[r.id];n.push(t);let i=t.children;i.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort))}}return n.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort)),n},D=async t=>{let e={param:{userData:t}},n=await w.post("/dataservice/rest/orchestration/getPortalPageID",e),r=n.data.portal_id;return r},E=t=>{let e={param:{userData:t}};return w.post("/dataservice/rest/orchestration/getUserAllMappngPortal",e)},B=async t=>{let e={param:{operateData:t}},n=await w.post("/dataservice/rest/orchestration/getPortalUserMappingInfos",e),r=n.data.portalMapping;return r},O=async t=>{let e={param:{id:t}},n=await w.post("/dataservice/rest/orchestration/getPortalPageConfig",e),r=n.data.portal_page_config||"[]";return r},T=t=>{let e={param:t};return w.post("/dataservice/rest/orchestration/setPortalPageConfig",e)},j=t=>{let e={param:{portalMappingData:t}};return w.post("/dataservice/rest/orchestration/updateUserSelectPortal",e)},R=async(t,e)=>{let n={param:{id:t,appid:e}},r=await w.post("/dataservice/rest/orchestration/getPortalPageMenuID",n),i=r.data.menu_id;return i},P=async(t,e)=>{let n={param:{appID:t,groupID:e}},r=await w.post("/dataservice/rest/orchestration/getPortalMappingAppInfoByID",n),i=r.data.appInfo;return i},M=async()=>{let t={param:{id:"1005"}},e=await w.post("/dataservice/rest/orchestration/getNoticeInfosByAppTypeID",t),n=e.data.resultDatas;return n},N=async(t,e)=>{let n=await w.get(`/appAuth/getAccessToken?appKey=${t}&appSecret=${e}`),r=n.data;return r},U=async(t,e)=>{let n=await w.get(`/systhirdapp/user/getUserByCode?code=${t}&access_token=${e}`),r=n.data;return r},z=async(t,e,n)=>{let r={param:{userID:t,im_type:e,group_id:n}},i=await w.post("/dataservice/rest/orchestration/getIMUserSigByID",r),o=i.data.userSig;return o},L=async t=>{let e={param:{groupID:t}},n=await w.post("/dataservice/rest/orchestration/getPortalAppCustomConfig",e),r=n.data.configInfo;return r},H=async t=>{let e={param:{id:t}},n=await w.post("/dataservice/rest/orchestration/getGroupIDByDptID",e),r=n.data.resultDptData,i=r.id;return i},F=(t,e)=>{if(e&&e.length>0)for(let n=0;n<e.length;n++)if(e[n].name==t)return e[n].default_value;return""},W=async(t,e,n)=>{let r={param:{appKey:t,appSecret:e,groupID:n}},i=await w.post("/dataservice/rest/orchestration/getThirdAppPathByKey",r),o=i.data.path;return o},$=(t,e)=>{let n=window.sessionStorage.getItem("isdata_app_variable_"+t);return n||(n=F(t,e),n&&window.sessionStorage.setItem("isdata_app_variable_"+t,n)),n},q=t=>{let e={param:{operateData:t}};return w.post("/dataservice/rest/orchestration/addObjectUsedTimes",e)},K=t=>{let e={param:{objectInfo:t}};return w.post("/dataservice/rest/orchestration/getObjectUseTimes",e)},G=async t=>{let e={param:{componentID:t}},n=await w.post("/dataservice/rest/orchestration/getPageIDByComponentID",e),r=n.data.page_id;return r},V=async t=>{let e={param:{account:t}},n=await w.post("/dataservice/rest/orchestration/getGourpMappingsByAccountName",e),r=n.data.resultGroups;return r},X=async t=>{let e={param:{id:t}},n=await w.post("/dataservice/rest/orchestration/getGroupIDByDptID",e),r=n.data.resultDptData;return r},J=async t=>{let e={param:{ids:t}},n=await w.post("/dataservice/rest/orchestration/getOfficeInfosByIDs",e),r=n.data.officeInfos;return r},Z=async t=>{let e={param:{id:t}},n=await w.post("/dataservice/rest/orchestration/getOfficeInfosByID",e),r=n.data.officeData;return r},Y=async t=>{let e={param:{id:t}},n=await w.post("/dataservice/rest/orchestration/getAPPInfosByID",e),r=n.data.appInfo;return r},Q=async t=>{let e={param:{groupID:t}},n=await w.post("/dataservice/rest/orchestration/getAllUserInfosByGroupID",e),r=n.data.resultDatas;return r},tt=async t=>{let e={param:{officeID:t}},n=await w.post("/dataservice/rest/orchestration/getChildrenOfficeInfosByID",e),r=n.data.resultDatas;return r},et=async(t,e)=>{let n={param:{userID:t,groupID:e}},r=await w.post("/dataservice/rest/orchestration/getPojectDptsByUserAndGroupID",n),i={dptDatas:r.data.officeDatas,userMappings:r.data.userMappings};return i},nt=async(t,e,n,r)=>{let i={param:{data:{userID:t,im_type:e,group_id:n,userSig:r}}},o=await w.post("/dataservice/rest/orchestration/addIMMapping",i),a=o.data;return a},rt=async(t,e)=>{let n={param:{userID:t,groupID:e}},r=await w.post("/dataservice/rest/orchestration/getAIRobotInfos",n),i=r.data.robotInfos;return i},it=async(t,e,n,r)=>{let i={param:{userID:t,im_type:e,groupID:n,userSig:r}},o=await w.post("/dataservice/rest/orchestration/updateIMMapping",i),a=o.data;return a},ot=async t=>{let e={param:{appID:t}},n=await w.post("/dataservice/rest/orchestration/getAppCustomData",e),r=n.data.customData;return r=r?JSON.parse(r):{},r},at=async t=>{let e={param:{appID:t}},n=await w.post("/dataservice/rest/orchestration/getIntegrateAppInfoByID",e),r=n.data.appInfo;return r};var ut="2.0.6",st=500,ct="user-agent",ft="",lt="?",ht={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},pt="browser",dt="cpu",vt="device",gt="engine",wt="os",yt="result",_t="name",mt="type",bt="vendor",xt="version",It="architecture",St="major",kt="model",At="console",Ct="mobile",Dt="tablet",Et="smarttv",Bt="wearable",Ot="xr",Tt="embedded",jt="inapp",Rt="brands",Pt="formFactors",Mt="fullVersionList",Nt="platform",Ut="platformVersion",zt="bitness",Lt="sec-ch-ua",Ht=Lt+"-full-version-list",Ft=Lt+"-arch",Wt=Lt+"-"+zt,$t=Lt+"-form-factors",qt=Lt+"-"+Ct,Kt=Lt+"-"+kt,Gt=Lt+"-"+Nt,Vt=Gt+"-version",Xt=[Rt,Mt,Ct,kt,Nt,Ut,It,Pt,zt],Jt="Amazon",Zt="Apple",Yt="ASUS",Qt="BlackBerry",te="Google",ee="Huawei",ne="Lenovo",re="Honor",ie="LG",oe="Microsoft",ae="Motorola",ue="Nvidia",se="OnePlus",ce="OPPO",fe="Samsung",le="Sharp",he="Sony",pe="Xiaomi",de="Zebra",ve="Chrome",ge="Chromium",we="Chromecast",ye="Edge",_e="Firefox",me="Opera",be="Facebook",xe="Sogou",Ie="Mobile ",Se=" Browser",ke="Windows",Ae=typeof window!==ht.UNDEFINED,Ce=Ae&&window.navigator?window.navigator:void 0,De=Ce&&Ce.userAgentData?Ce.userAgentData:void 0,Ee=function(t,e){var n={},r=e;if(!Te(e))for(var i in r={},e)for(var o in e[i])r[o]=e[i][o].concat(r[o]?r[o]:[]);for(var a in t)n[a]=r[a]&&r[a].length%2===0?r[a].concat(t[a]):t[a];return n},Be=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e},Oe=function(t,e){if(typeof t===ht.OBJECT&&t.length>0){for(var n in t)if(Pe(e)==Pe(t[n]))return!0;return!1}return!!je(t)&&Pe(e)==Pe(t)},Te=function(t,e){for(var n in t)return/^(browser|cpu|device|engine|os)$/.test(n)||!!e&&Te(t[n])},je=function(t){return typeof t===ht.STRING},Re=function(t){if(t){for(var e=[],n=Ue(/\\?\"/g,t).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var i=Le(n[r]).split(";v=");e[r]={brand:i[0],version:i[1]}}else e[r]=Le(n[r]);return e}},Pe=function(t){return je(t)?t.toLowerCase():t},Me=function(t){return je(t)?Ue(/[^\d\.]/g,t).split(".")[0]:void 0},Ne=function(t){for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];typeof n==ht.OBJECT&&2==n.length?this[n[0]]=n[1]:this[n]=void 0}return this},Ue=function(t,e){return je(e)?e.replace(t,ft):e},ze=function(t){return Ue(/\\?\"/g,t)},Le=function(t,e){return t=Ue(/^\s\s*/,String(t)),typeof e===ht.UNDEFINED?t:t.substring(0,e)},He=function(t,e){if(t&&e){var n,r,i,o,a,u,s=0;while(s<e.length&&!a){var c=e[s],f=e[s+1];n=r=0;while(n<c.length&&!a){if(!c[n])break;if(a=c[n++].exec(t),a)for(i=0;i<f.length;i++)u=a[++r],o=f[i],typeof o===ht.OBJECT&&o.length>0?2===o.length?typeof o[1]==ht.FUNCTION?this[o[0]]=o[1].call(this,u):this[o[0]]=o[1]:o.length>=3&&(typeof o[1]!==ht.FUNCTION||o[1].exec&&o[1].test?3==o.length?this[o[0]]=u?u.replace(o[1],o[2]):void 0:4==o.length?this[o[0]]=u?o[3].call(this,u.replace(o[1],o[2])):void 0:o.length>4&&(this[o[0]]=u?o[3].apply(this,[u.replace(o[1],o[2])].concat(o.slice(4))):void 0):o.length>3?this[o[0]]=u?o[1].apply(this,o.slice(2)):void 0:this[o[0]]=u?o[1].call(this,u,o[2]):void 0):this[o]=u||void 0}s+=2}}},Fe=function(t,e){for(var n in e)if(typeof e[n]===ht.OBJECT&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(Oe(e[n][r],t))return n===lt?void 0:n}else if(Oe(e[n],t))return n===lt?void 0:n;return e.hasOwnProperty("*")?e["*"]:t},We={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},$e={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},qe={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Ke={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[xt,[_t,Ie+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[xt,[_t,ye+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[xt,[_t,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[_t,xt],[/opios[\/ ]+([\w\.]+)/i],[xt,[_t,me+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[xt,[_t,me+" GX"]],[/\bopr\/([\w\.]+)/i],[xt,[_t,me]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[xt,[_t,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[xt,[_t,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[_t,xt],[/quark(?:pc)?\/([-\w\.]+)/i],[xt,[_t,"Quark"]],[/\bddg\/([\w\.]+)/i],[xt,[_t,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[xt,[_t,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[xt,[_t,"WeChat"]],[/konqueror\/([\w\.]+)/i],[xt,[_t,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[xt,[_t,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[xt,[_t,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[xt,[_t,"Smart "+ne+Se]],[/(avast|avg)\/([\w\.]+)/i],[[_t,/(.+)/,"$1 Secure"+Se],xt],[/\bfocus\/([\w\.]+)/i],[xt,[_t,_e+" Focus"]],[/\bopt\/([\w\.]+)/i],[xt,[_t,me+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[xt,[_t,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[xt,[_t,"Dolphin"]],[/coast\/([\w\.]+)/i],[xt,[_t,me+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[xt,[_t,"MIUI"+Se]],[/fxios\/([\w\.-]+)/i],[xt,[_t,Ie+_e]],[/\bqihoobrowser\/?([\w\.]*)/i],[xt,[_t,"360"]],[/\b(qq)\/([\w\.]+)/i],[[_t,/(.+)/,"$1Browser"],xt],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[_t,/(.+)/,"$1"+Se],xt],[/samsungbrowser\/([\w\.]+)/i],[xt,[_t,fe+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[xt,[_t,xe+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[_t,xe+" Mobile"],xt],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[_t,xt],[/(lbbrowser|rekonq)/i],[_t],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[xt,_t],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[_t,be],xt,[mt,jt]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[_t,xt,[mt,jt]],[/\bgsa\/([\w\.]+) .*safari\//i],[xt,[_t,"GSA"],[mt,jt]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[xt,[_t,"TikTok"],[mt,jt]],[/\[(linkedin)app\]/i],[_t,[mt,jt]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[_t,/(.+)/,"Zalo"],xt,[mt,jt]],[/(chromium)[\/ ]([-\w\.]+)/i],[_t,xt],[/headlesschrome(?:\/([\w\.]+)| )/i],[xt,[_t,ve+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[xt,[_t,ye+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[_t,ve+" WebView"],xt],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[xt,[_t,"Android"+Se]],[/chrome\/([\w\.]+) mobile/i],[xt,[_t,Ie+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[_t,xt],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[xt,[_t,Ie+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[_t,Ie+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[xt,_t],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[_t,[xt,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[_t,xt],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[_t,Ie+_e],xt],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[_t,"Netscape"],xt],[/(wolvic|librewolf)\/([\w\.]+)/i],[_t,xt],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[xt,[_t,_e+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[_t,[xt,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[_t,[xt,/[^\d\.]+./,ft]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[It,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[It,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[It,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[It,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[It,"arm"]],[/ sun4\w[;\)]/i],[[It,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[It,/ower/,ft,Pe]],[/mc680.0/i],[[It,"68k"]],[/winnt.+\[axp/i],[[It,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[kt,[bt,fe],[mt,Dt]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[kt,[bt,fe],[mt,Ct]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[kt,[bt,Zt],[mt,Ct]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[kt,[bt,Zt],[mt,Dt]],[/(macintosh);/i],[kt,[bt,Zt]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[kt,[bt,le],[mt,Ct]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[kt,[bt,re],[mt,Dt]],[/honor([-\w ]+)[;\)]/i],[kt,[bt,re],[mt,Ct]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[kt,[bt,ee],[mt,Dt]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[kt,[bt,ee],[mt,Ct]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[kt,/_/g," "],[bt,pe],[mt,Dt]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[kt,/_/g," "],[bt,pe],[mt,Ct]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[kt,[bt,se],[mt,Ct]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[kt,[bt,ce],[mt,Ct]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[kt,[bt,Fe,{OnePlus:["203","304","403","404","413","415"],"*":ce}],[mt,Dt]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[kt,[bt,"BLU"],[mt,Ct]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[kt,[bt,"Vivo"],[mt,Ct]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[kt,[bt,"Realme"],[mt,Ct]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[kt,[bt,ne],[mt,Dt]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[kt,[bt,ne],[mt,Ct]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[kt,[bt,ae],[mt,Ct]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[kt,[bt,ae],[mt,Dt]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[kt,[bt,ie],[mt,Dt]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[kt,[bt,ie],[mt,Ct]],[/(nokia) (t[12][01])/i],[bt,kt,[mt,Dt]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[kt,/_/g," "],[mt,Ct],[bt,"Nokia"]],[/(pixel (c|tablet))\b/i],[kt,[bt,te],[mt,Dt]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[kt,[bt,te],[mt,Ct]],[/(google) (pixelbook( go)?)/i],[bt,kt],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[kt,[bt,he],[mt,Ct]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[kt,"Xperia Tablet"],[bt,he],[mt,Dt]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[kt,[bt,Jt],[mt,Dt]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[kt,/(.+)/g,"Fire Phone $1"],[bt,Jt],[mt,Ct]],[/(playbook);[-\w\),; ]+(rim)/i],[kt,bt,[mt,Dt]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[kt,[bt,Qt],[mt,Ct]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[kt,[bt,Yt],[mt,Dt]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[kt,[bt,Yt],[mt,Ct]],[/(nexus 9)/i],[kt,[bt,"HTC"],[mt,Dt]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[bt,[kt,/_/g," "],[mt,Ct]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[kt,[bt,"TCL"],[mt,Dt]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[kt,[bt,"TCL"],[mt,Ct]],[/(itel) ((\w+))/i],[[bt,Pe],kt,[mt,Fe,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[kt,[bt,"Acer"],[mt,Dt]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[kt,[bt,"Meizu"],[mt,Ct]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[kt,[bt,"Ulefone"],[mt,Ct]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[kt,[bt,"Energizer"],[mt,Ct]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[kt,[bt,"Cat"],[mt,Ct]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[kt,[bt,"Smartfren"],[mt,Ct]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[kt,[bt,"Nothing"],[mt,Ct]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[kt,[bt,"Archos"],[mt,Dt]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[kt,[bt,"Archos"],[mt,Ct]],[/; (n159v)/i],[kt,[bt,"HMD"],[mt,Ct]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[bt,kt,[mt,Dt]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[bt,kt,[mt,Ct]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[bt,kt,[mt,Dt]],[/(surface duo)/i],[kt,[bt,oe],[mt,Dt]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[kt,[bt,"Fairphone"],[mt,Ct]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[kt,[bt,ue],[mt,Dt]],[/(sprint) (\w+)/i],[bt,kt,[mt,Ct]],[/(kin\.[onetw]{3})/i],[[kt,/\./g," "],[bt,oe],[mt,Ct]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[kt,[bt,de],[mt,Dt]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[kt,[bt,de],[mt,Ct]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[bt,[mt,Et]],[/hbbtv.+maple;(\d+)/i],[[kt,/^/,"SmartTV"],[bt,fe],[mt,Et]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[bt,kt,[mt,Et]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[bt,ie],[mt,Et]],[/(apple) ?tv/i],[bt,[kt,Zt+" TV"],[mt,Et]],[/crkey.*devicetype\/chromecast/i],[[kt,we+" Third Generation"],[bt,te],[mt,Et]],[/crkey.*devicetype\/([^/]*)/i],[[kt,/^/,"Chromecast "],[bt,te],[mt,Et]],[/fuchsia.*crkey/i],[[kt,we+" Nest Hub"],[bt,te],[mt,Et]],[/crkey/i],[[kt,we],[bt,te],[mt,Et]],[/(portaltv)/i],[kt,[bt,be],[mt,Et]],[/droid.+aft(\w+)( bui|\))/i],[kt,[bt,Jt],[mt,Et]],[/(shield \w+ tv)/i],[kt,[bt,ue],[mt,Et]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[kt,[bt,le],[mt,Et]],[/(bravia[\w ]+)( bui|\))/i],[kt,[bt,he],[mt,Et]],[/(mi(tv|box)-?\w+) bui/i],[kt,[bt,pe],[mt,Et]],[/Hbbtv.*(technisat) (.*);/i],[bt,kt,[mt,Et]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[bt,/.+\/(\w+)/,"$1",Fe,{LG:"lge"}],[kt,Le],[mt,Et]],[/(playstation \w+)/i],[kt,[bt,he],[mt,At]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[kt,[bt,oe],[mt,At]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[bt,kt,[mt,At]],[/droid.+; (shield)( bui|\))/i],[kt,[bt,ue],[mt,At]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[kt,[bt,fe],[mt,Bt]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[bt,kt,[mt,Bt]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[kt,[bt,ce],[mt,Bt]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[kt,[bt,Zt],[mt,Bt]],[/(opwwe\d{3})/i],[kt,[bt,se],[mt,Bt]],[/(moto 360)/i],[kt,[bt,ae],[mt,Bt]],[/(smartwatch 3)/i],[kt,[bt,he],[mt,Bt]],[/(g watch r)/i],[kt,[bt,ie],[mt,Bt]],[/droid.+; (wt63?0{2,3})\)/i],[kt,[bt,de],[mt,Bt]],[/droid.+; (glass) \d/i],[kt,[bt,te],[mt,Ot]],[/(pico) ([\w ]+) os\d/i],[bt,kt,[mt,Ot]],[/(quest( \d| pro)?s?).+vr/i],[kt,[bt,be],[mt,Ot]],[/mobile vr; rv.+firefox/i],[[mt,Ot]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[bt,[mt,Tt]],[/(aeobc)\b/i],[kt,[bt,Jt],[mt,Tt]],[/(homepod).+mac os/i],[kt,[bt,Zt],[mt,Tt]],[/windows iot/i],[[mt,Tt]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[kt,[mt,Et]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[mt,Et]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[kt,[mt,Fe,{mobile:"Mobile",xr:"VR","*":Dt}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[mt,Dt]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[mt,Ct]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[kt,[bt,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[xt,[_t,ye+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[_t,xt],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[xt,[_t,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[_t,xt],[/ladybird\//i],[[_t,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[xt,_t]],os:[[/(windows nt) (6\.[23]); arm/i],[[_t,/N/,"R"],[xt,Fe,We]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[_t,xt],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[xt,/(;|\))/g,"",Fe,We],[_t,ke]],[/(windows ce)\/?([\d\.]*)/i],[_t,xt],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[xt,/_/g,"."],[_t,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[_t,"macOS"],[xt,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[xt,[_t,we+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[xt,[_t,we+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[xt,[_t,we+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[xt,[_t,we+" Linux"]],[/crkey\/([\d\.]+)/i],[xt,[_t,we]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[xt,_t],[/(ubuntu) ([\w\.]+) like android/i],[[_t,/(.+)/,"$1 Touch"],xt],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[_t,xt],[/\(bb(10);/i],[xt,[_t,Qt]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[xt,[_t,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[xt,[_t,_e+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[xt,[_t,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[xt,Fe,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[_t,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[xt,[_t,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[_t,"Chrome OS"],xt],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[_t,xt],[/(sunos) ?([\d\.]*)/i],[[_t,"Solaris"],xt],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[_t,xt]]},Ge=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return Ne.call(t.init,[[pt,[_t,xt,St,mt]],[dt,[It]],[vt,[mt,kt,bt]],[gt,[_t,xt]],[wt,[_t,xt]]]),Ne.call(t.isIgnore,[[pt,[xt,St]],[gt,[xt]],[wt,[xt]]]),Ne.call(t.isIgnoreRgx,[[pt,/ ?browser$/i],[wt,/ ?os$/i]]),Ne.call(t.toString,[[pt,[_t,xt]],[dt,[It]],[vt,[bt,kt]],[gt,[_t,xt]],[wt,[_t,xt]]]),t}(),Ve=function(t,e){var n=Ge.init[e],r=Ge.isIgnore[e]||0,i=Ge.isIgnoreRgx[e]||0,o=Ge.toString[e]||0;function a(){Ne.call(this,n)}return a.prototype.getItem=function(){return t},a.prototype.withClientHints=function(){return De?De.getHighEntropyValues(Xt).then((function(e){return t.setCH(new Xe(e,!1)).parseCH().get()})):t.parseCH().get()},a.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=yt&&(a.prototype.is=function(t){var e=!1;for(var n in this)if(this.hasOwnProperty(n)&&!Oe(r,n)&&Pe(i?Ue(i,this[n]):this[n])==Pe(i?Ue(i,t):t)){if(e=!0,t!=ht.UNDEFINED)break}else if(t==ht.UNDEFINED&&e){e=!e;break}return e},a.prototype.toString=function(){var t=ft;for(var e in o)typeof this[o[e]]!==ht.UNDEFINED&&(t+=(t?" ":ft)+this[o[e]]);return t||ht.UNDEFINED}),De||(a.prototype.then=function(t){var e=this,n=function(){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])};n.prototype={is:a.prototype.is,toString:a.prototype.toString};var r=new n;return t(r),r}),new a};function Xe(t,e){if(t=t||{},Ne.call(this,Xt),e)Ne.call(this,[[Rt,Re(t[Lt])],[Mt,Re(t[Ht])],[Ct,/\?1/.test(t[qt])],[kt,ze(t[Kt])],[Nt,ze(t[Gt])],[Ut,ze(t[Vt])],[It,ze(t[Ft])],[Pt,Re(t[$t])],[zt,ze(t[Wt])]]);else for(var n in t)this.hasOwnProperty(n)&&typeof t[n]!==ht.UNDEFINED&&(this[n]=t[n])}function Je(t,e,n,r){return this.get=function(t){return t?this.data.hasOwnProperty(t)?this.data[t]:void 0:this.data},this.set=function(t,e){return this.data[t]=e,this},this.setCH=function(t){return this.uaCH=t,this},this.detectFeature=function(){if(Ce&&Ce.userAgent==this.ua)switch(this.itemType){case pt:Ce.brave&&typeof Ce.brave.isBrave==ht.FUNCTION&&this.set(_t,"Brave");break;case vt:!this.get(mt)&&De&&De[Ct]&&this.set(mt,Ct),"Macintosh"==this.get(kt)&&Ce&&typeof Ce.standalone!==ht.UNDEFINED&&Ce.maxTouchPoints&&Ce.maxTouchPoints>2&&this.set(kt,"iPad").set(mt,Dt);break;case wt:!this.get(_t)&&De&&De[Nt]&&this.set(_t,De[Nt]);break;case yt:var t=this.data,e=function(e){return t[e].getItem().detectFeature().get()};this.set(pt,e(pt)).set(dt,e(dt)).set(vt,e(vt)).set(gt,e(gt)).set(wt,e(wt))}return this},this.parseUA=function(){switch(this.itemType!=yt&&He.call(this.data,this.ua,this.rgxMap),this.itemType){case pt:this.set(St,Me(this.get(xt)));break;case wt:if("iOS"==this.get(_t)&&"18.6"==this.get(xt)){var t=/\) Version\/([\d\.]+)/.exec(this.ua);t&&parseInt(t[1].substring(0,2),10)>=26&&this.set(xt,t[1])}break}return this},this.parseCH=function(){var t=this.uaCH,e=this.rgxMap;switch(this.itemType){case pt:case gt:var n,r=t[Mt]||t[Rt];if(r)for(var i=0;i<r.length;i++){var o=r[i].brand||r[i],a=r[i].version;this.itemType==pt&&!/not.a.brand/i.test(o)&&(!n||/Chrom/.test(n)&&o!=ge||n==ye&&/WebView2/.test(o))&&(o=Fe(o,qe),n=this.get(_t),n&&!/Chrom/.test(n)&&/Chrom/.test(o)||this.set(_t,o).set(xt,a).set(St,Me(a)),n=o),this.itemType==gt&&o==ge&&this.set(xt,a)}break;case dt:var u=t[It];u&&(u&&"64"==t[zt]&&(u+="64"),He.call(this.data,u+";",e));break;case vt:if(t[Ct]&&this.set(mt,Ct),t[kt]&&(this.set(kt,t[kt]),!this.get(mt)||!this.get(bt))){var s={};He.call(s,"droid 9; "+t[kt]+")",e),!this.get(mt)&&s.type&&this.set(mt,s.type),!this.get(bt)&&s.vendor&&this.set(bt,s.vendor)}if(t[Pt]){var c;if("string"!==typeof t[Pt]){var f=0;while(!c&&f<t[Pt].length)c=Fe(t[Pt][f++],$e)}else c=Fe(t[Pt],$e);this.set(mt,c)}break;case wt:var l=t[Nt];if(l){var h=t[Ut];l==ke&&(h=parseInt(Me(h),10)>=13?"11":"10"),this.set(_t,l).set(xt,h)}this.get(_t)==ke&&"Xbox"==t[kt]&&this.set(_t,"Xbox").set(xt,void 0);break;case yt:var p=this.data,d=function(e){return p[e].getItem().setCH(t).parseCH().get()};this.set(pt,d(pt)).set(dt,d(dt)).set(vt,d(vt)).set(gt,d(gt)).set(wt,d(wt))}return this},Ne.call(this,[["itemType",t],["ua",e],["uaCH",r],["rgxMap",n],["data",Ve(this,t)]]),this}function Ze(t,e,n){if(typeof t===ht.OBJECT?(Te(t,!0)?(typeof e===ht.OBJECT&&(n=e),e=t):(n=t,e=void 0),t=void 0):typeof t!==ht.STRING||Te(e,!0)||(n=e,e=void 0),n)if(typeof n.append===ht.FUNCTION){var r={};n.forEach((function(t,e){r[String(e).toLowerCase()]=t})),n=r}else{var i={};for(var o in n)n.hasOwnProperty(o)&&(i[String(o).toLowerCase()]=n[o]);n=i}if(!(this instanceof Ze))return new Ze(t,e,n).getResult();var a=typeof t===ht.STRING?t:n&&n[ct]?n[ct]:Ce&&Ce.userAgent?Ce.userAgent:ft,u=new Xe(n,!0),s=e?Ee(Ke,e):Ke,c=function(t){return t==yt?function(){return new Je(t,a,s,u).set("ua",a).set(pt,this.getBrowser()).set(dt,this.getCPU()).set(vt,this.getDevice()).set(gt,this.getEngine()).set(wt,this.getOS()).get()}:function(){return new Je(t,a,s[t],u).parseUA().get()}};return Ne.call(this,[["getBrowser",c(pt)],["getCPU",c(dt)],["getDevice",c(vt)],["getEngine",c(gt)],["getOS",c(wt)],["getResult",c(yt)],["getUA",function(){return a}],["setUA",function(t){return je(t)&&(a=Le(t,st)),this}]]).setUA(a),this}Ze.VERSION=ut,Ze.BROWSER=Be([_t,xt,St,mt]),Ze.CPU=Be([It]),Ze.DEVICE=Be([kt,bt,mt,At,Ct,Et,Dt,Bt,Tt]),Ze.ENGINE=Ze.OS=Be([_t,xt]);var Ye=n(1396),Qe=n.n(Ye);const tn=()=>w.get("/system/authority/getAuthPic?module=loginPassword",{responseType:"arraybuffer"}),en=async t=>{let e=await w.get(`/system/authority/logout?isMobileLogout=${t}`),n=JSON.parse(e.request.response),r=n.code;return"10110020"==r?(window.sessionStorage.clear(),{code:r,message:n.message}):{code:r,message:n.message}},nn=async t=>{let e=await an();const n=Qe().AES.decrypt(t,e).toString(Qe().enc.Utf8);return n},rn=async(t,e,n)=>{let r=window.sessionStorage.getItem("iportal_login_user_key");r=await nn(r),t.password=r;let i=await en(n),o=i.code,a=i.message;if("10110020"==o){let n=await on(t,e);return n}return{code:o,message:a}},on=async(e,n)=>{let r={param:{loginData:{account:e.account_view,group_id:e.groupid,imageCode:e.imageCode}}},i=await w.post("/dataservice/rest/orchestration/getLoginPortalAccountKey",r),o=await an(),a=JSON.parse(i.request.response),u=a.result.code;if(10001==u){let r=a.result.codeData.code,s=r,c=a.result.codeData.key;if(r=Qe().AES.decrypt(r,o).toString(Qe().enc.Utf8),c=Qe().AES.decrypt(c,o).toString(Qe().enc.Utf8),c==e.password){if(r=window.appSdk.Encrypt(r),e.password=r,i=await w.post(`/system/authority/loginAccount4Application?authPicCode=${e.imageCode}&dataappId=${n}&mobileOrWeb=web`,e),a=JSON.parse(i.request.response),u=a.code,10110004==u){let n=a.id;const r=new t["default"],i=r.getBrowser();let o=(new Date).getTime(),c=i.name+"_"+i.version+"_"+o;return window.sessionStorage.setItem("iportal_login_user_id",n),window.sessionStorage.setItem("iportal_group_id",e.groupid),window.sessionStorage.setItem("iportal_login_user_key",s),window.sessionStorage.setItem("iportal_client_id",c),{code:u}}return{code:u,message:a.message}}return{code:u,message:"账户密码错误!"}}return{code:u,message:a.result.message}},an=async()=>{let t={param:{}},e=await w.post("/dataservice/rest/orchestration/getKey",t),n=e.data.key;return n},un=(t,e=200)=>w.post(`/asset/getAssetData?asset_id=${t}&count=${e}`,{filters:[]}),sn=(t,e)=>{try{const n=new URL(t),r=n.searchParams.get(e);return r&&-1!==r.indexOf("#")?r.split("#")[0]:r}catch(n){return console.error("URL 格式错误:",n),""}},cn=async(t,e)=>{try{const n=await fetch(t);if(!n.ok)throw new Error(`网络请求失败: ${n.status} ${n.statusText}`);const r=await n.blob(),i=e||fn(t);return new File([r],i,{type:r.type,lastModified:Date.now()})}catch(n){throw console.error("创建 File 失败:",n),n}},fn=t=>{try{const e=new URL(t);return e.pathname.split("/").pop()||"downloaded_file"}catch(e){return"downloaded_file"}},ln=async t=>{try{const e=await fetch(t,{method:"GET",headers:{Range:"bytes=0-0"}});if(206!==e.status)throw new Error("不支持 Range 请求");const n=e.headers.get("Content-Range"),r=n?.match(/\/(\d+)$/)?.[1];return r?parseInt(r,10):-1}catch(e){return console.error("获取文件大小失败:",e),-1}};n(3579);const hn=t=>{let e=window.SDATA_WINDOW_TRUSTED_ORIGINS;e||(window.SDATA_WINDOW_TRUSTED_ORIGINS=[]),e.includes(t)||e.push(t)},pn=t=>{let e=window.SDATA_WINDOW_TRUSTED_ORIGINS;e||(window.SDATA_WINDOW_TRUSTED_ORIGINS=[]);let n=e.indexOf(t);n>-1&&e.splice(n,1)},dn=(t,e)=>{let n=window.sdataEventActions;n||(window.sdataEventActions={}),window.sdataEventActions[t]=e},vn=t=>{let e=window.sdataEventActions;e||(window.sdataEventActions={}),delete window.sdataEventActions[t]},gn=()=>{let t=window.SDATA_WINDOW_TRUSTED_ORIGINS;t||(window.SDATA_WINDOW_TRUSTED_ORIGINS=[]);let e=window.sdataEventActions;e||(window.sdataEventActions={}),window.addEventListener("message",(async t=>{const e=window.SDATA_WINDOW_TRUSTED_ORIGINS.some((e=>t.origin===e||new RegExp(e).test(t.origin)));if(!e)return void console.log("拒绝非可信源消息:",t.origin);let n=t.data?.eventKey;if(!n)return;let r=t.origin;if(console.log(`收到${r}页面消息:`,t.data),"sdata_alllife_event_response"===n){let e=t.data.eventOperateKey,n=window.sdataEventActions[e];delete window.sdataEventActions[e],n&&await n(t.data.data,t)}else{let e=window.sdataEventActions[n],i={eventKey:"sdata_alllife_event_response",eventOperateKey:t.data.eventOperateKey,data:{}};if(e){let n=await e(t.data.data,t);i.data=n}t.source.postMessage(i,r)}}))},wn=async(t,e,n,r,i)=>{let o=(new Date).getTime(),a=Math.floor(1e4*Math.random())+1,u=`${n}_${o}_${a}`;dn(u,i);let s={eventOperateKey:u,eventKey:n,data:r};t.postMessage(s,e)};class yn{constructor(t,e){this.handler=e,this.actionKey=t.actionKey,this.appSKID=t.appSKID,this.imType=t.imType,this.groupID=t.groupID,this.userID=t.userID,this.chatType=t.chatType||0,this.singleChatID=t.singleChatID||"",this.customParams=t.customParams||{},this.chartOrigin=t.chartOrigin}makeKey(t){return`${t}-${this.actionKey}`}async init(){this.handler.addChatListener(this.makeKey("sdata_get_access_token"),(async t=>await this.handler.getPortalAccessToken(t))),this.handler.addChatListener(this.makeKey("sdata_get_portal_user_info"),(async t=>await this.handler.getPortalUserInfo(t))),this.handler.addChatListener(this.makeKey("sdata_get_portal_user_sig"),(async t=>{let e=t.userID,n=t.im_type,r=t.group_id;return await this.handler.getPortalUserSig(e,n,r)})),this.handler.addChatListener(this.makeKey("sdata_add_im_mapping"),(async t=>{let e=t.userID,n=t.im_type,r=t.userSig;return await this.handler.addIMMapping(e,n,r,this.groupID)})),this.handler.addChatListener(this.makeKey("sdata_update_im_mapping"),(async t=>await this.handler.updateIMMapping(t))),this.handler.addChatListener(this.makeKey("sdata_get_users_by_group_id"),(async t=>await this.handler.getAllUserInfosByGroupID(t))),this.handler.addChatListener(this.makeKey("sdata_get_dpts_by_group_id"),(async t=>await this.handler.getChildrenOfficeInfosByID(t))),this.handler.addChatListener(this.makeKey("sdata_get_project_dpts_by_user_group_id"),(async t=>await this.handler.getPojectDptsByUserAndGroupID(t))),this.handler.addChatListener(this.makeKey("sdata_get_ai_robot_infos"),(async t=>{let e=t.groupID,n=t.userID;return this.userID==n&&this.groupID==e?this.getAIRobotInfos():[]})),this.handler.addChatListener(this.makeKey("sdata_get_test_user_sig"),(async t=>{let e=t.SDKAppID,n=t.userID,r=await this.handler.genTestUserSig({SDKAppID:e,userID:n}),i=r.userSig;return i})),this.handler.addChatListener(this.makeKey("sdata_send_message_to_chat_server"),(async(t,e)=>{let n=t.message,r=n.from,i=await this.sendMessageToChatServer(r,n);return i})),this.handler.addChatListener(this.makeKey("sdata_close_frame_window"),(async(t,e)=>this.handler.closeWindow())),this.handler.addChatListener(this.makeKey("sdata_get_portal_doc_info"),(async(t,e)=>this.handler.getPortalDocmentInfo(t))),this.handler.addChatListener(this.makeKey("sdata_chat_aiAgent_event"),(async(t,e)=>this.handler.onAIAgentEvent(t,e))),this.handler.addChatListener(this.makeKey("sdata_alllife_event_regist"),(async(t,e)=>{this.appSKID=t.appid,this.imType=t.im_type,await this.initChatAIs();let n={type:this.getChatTypeKey(this.chatType),singleChatID:this.singleChatID,customParams:this.customParams};this.handler.fireEventToChatWindow(e,this.chartOrigin,this.makeKey("sdata_alllife_initChat"),n,(t=>{t&&this.handler.onChatInitFinished()}))}))}getChatTypeKey(t){switch(t){case 0:return"IM_MULTIPLE_MODE";case 1:return"IM_SINGLE_MODE";case 2:return"IM_EMBED_MODE";default:return"IM_MULTIPLE_MODE"}}async initChatAIs(){if(window.imClient)this.chatAIClient=window.imClient;else{let t=await this.handler.getChatClientClasses();const{TencentCloudChat:e,TIMUploadPlugin:n}=t;window.imClient=e.create({SDKAppID:this.appSKID,storage:{enable:!0}}),window.imClient.registerPlugin({"tim-upload-plugin":n}),window.imClient.on(e.EVENT.SDK_READY,this.onChatAIReady.bind(this)),window.imClient.charAIs={},this.chatAIClient=window.imClient}this.chatAIClient.charAIs||(this.chatAIClient.charAIs={});let t=await this.handler.getAIRobotInfos(this.userID,this.groupID);t&&t.length>0&&t.forEach((async t=>{let e=t.id;if(!this.chatAIClient.charAIs[e]){t.chatID=e;let n=await this.handler.getPortalUserSig(e,this.imType,this.groupID);n||(n=await this.generateUserSigAndAdd(e)),t.userSig=n,this.chatAIClient.charAIs[e]={robot:t,messageCache:[]}}}))}async generateUserSigAndUpdate(t){let e=await this.handler.genTestUserSig({SDKAppID:this.appSKID,userID:t}),n=e.userSig;if(n){await this.chatAIClient.login({userID:t,userSig:n}),await this.chatAIClient.logout();let e={userID:t,userSig:n,im_type:this.imType,group_id:this.groupID};await this.handler.updateIMMapping(e)}return n}async generateUserSigAndAdd(t){let e=await this.handler.genTestUserSig({SDKAppID:this.appSKID,userID:t}),n=e.userSig;return n&&(await this.chatAIClient.login({userID:t,userSig:n}),await this.chatAIClient.logout(),await this.handler.addIMMapping(t,this.imType,n,this.groupID)),n}onChatAIReady(t){let e=this.chatAIClient.lastRobotID,n=this.getAIRobotInfoByID(e);if(console.log(`[AI chat] ${n.name}已经就绪:`,t),this.chatAIClient){let t=this.getAIRobotCacheMessagesByID(e);if(console.log(`[AI chat] ${n.name}就绪后查到的缓存信息:`,t),console.log(`[AI chat] ${n.name}所有信息仓:`,this.chatAIClient.charAIs),t&&t.length>0){const r=[...t];t.splice(0,t.length),r.forEach((t=>{console.log(`[AI chat] ${n.name}发送缓存消息:`,t),this.sendMessageToChatServer(e,t)}))}}}getAIRobotInfos(){let t=[];for(let e in this.chatAIClient.charAIs)t.push(this.chatAIClient.charAIs[e].robot);return t}getAIRobotInfoByID(t){return this.chatAIClient.charAIs[t]?this.chatAIClient.charAIs[t].robot:null}getAIRobotCacheMessagesByID(t){return this.chatAIClient.charAIs[t]?this.chatAIClient.charAIs[t].messageCache:[]}async sendMessageToChatServer(t,e){let n=this.getAIRobotInfoByID(t);if(this.chatAIClient.lastRobotID!=t){console.log(`[AI chat]需要新机器人回答,切换到新机器人${n.name}`),this.chatAIClient.lastRobotID&&await this.chatAIClient.logout();try{await this.chatAIClient.login({userID:t,userSig:n.userSig})}catch(r){console.log(`[AI chat]${n.name}登录失败`,r);let i=r.code;if(70001==i){console.log(`[AI chat]${n.name}UserSig过期,重新生成userSig`);let i=await this.generateUserSigAndUpdate(t);try{return await this.chatAIClient.login({userID:t,userSig:i}),void this.sendMessageToChatServer(t,e)}catch(r){return void console.log(`[AI chat]${n.name}重新登录失败`,r)}}}}if(this.chatAIClient.lastRobotID=t,this.chatAIClient&&this.chatAIClient.isReady()){let t=await this.chatAIClient.createTextMessage(e);this.chatAIClient.sendMessage(t).then((t=>{console.log(`[AI chat]${n.name}发送信息成功`,t)}),(t=>{console.log(`[AI chat]${n.name}发送失败`,t)}))}else{let r=this.getAIRobotCacheMessagesByID(t);r.push(e),console.log(`[AI chat]${n.name}未就绪,缓存后消息:`,r)}}converToAIServerParams(t,e,n){let r="",i=t.type;switch(i){case"TIMTextElem":r=t.payload?.text||"";break;case"TIMImageElem":break;case"TIMSoundElem":break;case"TIMVideoFileElem":break;case"TIMFileElem":break;default:break}let o=t.cloudCustomData||{},a=o.conversation_id||"",u={prompt:r,params:n||{},robotKey:e.password,conversation_id:a||"",userID:t.from||""};return u}abort(){this.chatAIClient=null}}const _n=async(t,e)=>{let n={param:{id:t,groupID:e}},r=await w.post("/dataservice/rest/orchestration/getRobotInfoByID",n),i=r.data.robotInfo;return i},mn=t=>{let e={genTestUserSig:async t=>{},getChatClientClasses:async()=>[],getAIRobotInfos:async(t,e)=>rt(t,e),getPortalUserSig:async(t,e,n)=>z(t,e,n),addIMMapping:async(t,e,n,r)=>nt(t,e,r,n),updateIMMapping:async t=>{let e=t.userID,n=t.im_type,r=t.group_id,i=t.userSig;return it(e,n,r,i)},getPortalAccessToken:async t=>{let e=t.appKey,n=t.appSecret;return N(e,n)},getPortalUserInfo:async t=>{let e=t.code,n=t.access_token;return U(e,n)},getAllUserInfosByGroupID:async t=>{let e=t.groupID;return Q(e)},getChildrenOfficeInfosByID:async t=>{let e=t.groupID;return tt(e)},getPojectDptsByUserAndGroupID:async t=>{let e=t.groupID,n=t.userID;return et(n,e)},closeWindow:()=>!0,addChatListener:async(t,e)=>{await dn(t,e)},fireEventToChatWindow:async(t,e,n,r,i)=>{await wn(t.source,e,n,r,i)},onChatInitFinished:async()=>{},onAIAgentEvent:async(t,e)=>{},getPortalDocmentInfo:async t=>{let e=t.kb_doc_id,n=await S(e),r=n?.summary;if(r){let t=JSON.parse(r);if(t){let e=t[0].url,r=window.smardaten_api_context_path,i=`${r}/storage_area/public${e}`,o=await ln(i);n.fileSize=o}}return n}};return e={...e,...t},e},bn=async(t,e,n)=>{let r=y(!1,[]),i=await ot(r),o=i?.aiAgentServerIP||"";if(!o)return console.error("没有配置AI Agent服务地址,请联系管理员"),void(n&&n("没有配置AI Agent服务地址,请联系管理员"));let a=`${o}/addAndCleanDocument`;w.post(a,JSON.stringify(t)).then((t=>{console.log("发送消息成功:",t),e&&e(t)})).catch((t=>{console.error("发送消息失败:",t),n&&n(t)}))},xn=t=>{let e={DOCX:"document",TXT:"document",MD:"document",MARKDOWN:"document",MDX:"document",PDF:"document",HTML:"document",XLSX:"document",XLS:"document",VTT:"document",DOC:"document",CSV:"document",EML:"document",MSG:"document",PPTX:"document",PPT:"document",XML:"document",EPUB:"document",JPG:"image",JPEG:"image",PNG:"image",GIF:"image",WEBP:"image",MP3:"audio",M4A:"audio",WAV:"audio",WEBM:"audio",MPGA:"audio",MP4:"video",MOV:"video",MPEG:"video"},n=t.toUpperCase();return e[n]||"custom"}}(),r}()}));
|
|
26
|
+
return function(){var e=t,n=e.lib,r=n.WordArray,i=n.Hasher,o=e.algo,a=r.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=r.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),s=r.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=r.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=r.create([0,1518500249,1859775393,2400959708,2840853838]),l=r.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=i.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,h,_,m,b,x,I,S,k,A,C,D=this._hash.words,E=f.words,B=l.words,O=a.words,T=u.words,j=s.words,R=c.words;x=o=D[0],I=h=D[1],S=_=D[2],k=m=D[3],A=b=D[4];for(n=0;n<80;n+=1)C=o+t[e+O[n]]|0,C+=n<16?p(h,_,m)+E[0]:n<32?d(h,_,m)+E[1]:n<48?v(h,_,m)+E[2]:n<64?g(h,_,m)+E[3]:w(h,_,m)+E[4],C|=0,C=y(C,j[n]),C=C+b|0,o=b,b=m,m=y(_,10),_=h,h=C,C=x+t[e+T[n]]|0,C+=n<16?w(I,S,k)+B[0]:n<32?g(I,S,k)+B[1]:n<48?v(I,S,k)+B[2]:n<64?d(I,S,k)+B[3]:p(I,S,k)+B[4],C|=0,C=y(C,R[n]),C=C+A|0,x=A,A=k,k=y(S,10),S=I,I=C;C=D[1]+_+k|0,D[1]=D[2]+m+A|0,D[2]=D[3]+b+x|0,D[3]=D[4]+o+I|0,D[4]=D[0]+h+S|0,D[0]=C},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var u=o[a];o[a]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return i},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,n){return t^e^n}function d(t,e,n){return t&e|~t&n}function v(t,e,n){return(t|~e)^n}function g(t,e,n){return t&n|e&~n}function w(t,e,n){return t^(e|~n)}function y(t,e){return t<<e|t>>>32-e}e.RIPEMD160=i._createHelper(h),e.HmacRIPEMD160=i._createHmacHelper(h)}(Math),t.RIPEMD160}))},8111:function(t,e,n){"use strict";var r=n(6518),i=n(4576),o=n(679),a=n(8551),u=n(4901),s=n(2787),c=n(2106),f=n(4659),l=n(9039),h=n(9297),p=n(8227),d=n(7657).IteratorPrototype,v=n(3724),g=n(6395),w="constructor",y="Iterator",_=p("toStringTag"),m=TypeError,b=i[y],x=g||!u(b)||b.prototype!==d||!l((function(){b({})})),I=function(){if(o(this,d),s(this)===d)throw new m("Abstract class Iterator not directly constructable")},S=function(t,e){v?c(d,t,{configurable:!0,get:function(){return e},set:function(e){if(a(this),this===d)throw new m("You can't redefine this property");h(this,t)?this[t]=e:f(this,t,e)}}):d[t]=e};h(d,_)||S(_,y),!x&&h(d,w)&&d[w]!==Object||S(w,I),I.prototype=d,r({global:!0,constructor:!0,forced:x},{Iterator:I})},8124:function(t,e,n){(function(e,r){t.exports=r(n(9021),n(7165))})(0,(function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding}))},8227:function(t,e,n){"use strict";var r=n(4576),i=n(5745),o=n(9297),a=n(3392),u=n(4495),s=n(7040),c=r.Symbol,f=i("wks"),l=s?c["for"]||c:c&&c.withoutSetter||a;t.exports=function(t){return o(f,t)||(f[t]=u&&o(c,t)?c[t]:l("Symbol."+t)),f[t]}},8454:function(t,e,n){(function(e,r){t.exports=r(n(9021),n(7165))})(0,(function(t){return t.mode.ECB=function(){var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),e.Decryptor=e.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),e}(),t.mode.ECB}))},8480:function(t,e,n){"use strict";var r=n(1828),i=n(8727),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},8551:function(t,e,n){"use strict";var r=n(34),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not an object")}},8622:function(t,e,n){"use strict";var r=n(4576),i=n(4901),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},8686:function(t,e,n){"use strict";var r=n(3724),i=n(9039);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8727:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8773:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},8981:function(t,e,n){"use strict";var r=n(7750),i=Object;t.exports=function(t){return i(r(t))}},9012:function(t){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},9021:function(t,e,n){(function(e,n){t.exports=n()})(0,(function(){var t=t||function(t,e){var r;if("undefined"!==typeof window&&window.crypto&&(r=window.crypto),"undefined"!==typeof self&&self.crypto&&(r=self.crypto),"undefined"!==typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!==typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&"undefined"!==typeof n.g&&n.g.crypto&&(r=n.g.crypto),!r)try{r=n(477)}catch(g){}var i=function(){if(r){if("function"===typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(g){}if("function"===typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(g){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),a={},u=a.lib={},s=u.Base=function(){return{extend:function(t){var e=o(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=u.WordArray=s.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var u=0;u<i;u+=4)e[r+u>>>2]=n[u>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=s.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(i());return new c.init(e,t)}}),f=a.enc={},l=f.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new c.init(n,e/2)}},h=f.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new c.init(n,e)}},p=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},d=u.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,u=4*a,s=o/u;s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0);var f=s*a,l=t.min(4*f,o);if(f){for(var h=0;h<f;h+=a)this._doProcessBlock(i,h);n=i.splice(0,f),r.sigBytes-=l}return new c.init(n,l)},clone:function(){var t=s.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),v=(u.Hasher=d.extend({cfg:s.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new v.HMAC.init(t,n).finalize(e)}}}),a.algo={});return a}(Math);return t}))},9039:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},9106:function(t,e,n){"use strict";var r=n(9516);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!==t&&"undefined"!==typeof t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))})))})),o=a.join("&")}if(o){var u=t.indexOf("#");-1!==u&&(t=t.slice(0,u)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},9137:function(t){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},9297:function(t,e,n){"use strict";var r=n(9504),i=n(8981),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},9306:function(t,e,n){"use strict";var r=n(4901),i=n(6823),o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not a function")}},9433:function(t,e,n){"use strict";var r=n(4576),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},9462:function(t,e,n){"use strict";var r=n(9565),i=n(2360),o=n(6699),a=n(6279),u=n(8227),s=n(1181),c=n(5966),f=n(7657).IteratorPrototype,l=n(2529),h=n(9539),p=u("toStringTag"),d="IteratorHelper",v="WrapForValidIterator",g=s.set,w=function(t){var e=s.getterFor(t?v:d);return a(i(f),{next:function(){var n=e(this);if(t)return n.nextHandler();if(n.done)return l(void 0,!0);try{var r=n.nextHandler();return n.returnHandlerResult?r:l(r,n.done)}catch(i){throw n.done=!0,i}},return:function(){var n=e(this),i=n.iterator;if(n.done=!0,t){var o=c(i,"return");return o?r(o,i):l(void 0,!0)}if(n.inner)try{h(n.inner.iterator,"normal")}catch(a){return h(i,"throw",a)}return i&&h(i,"normal"),l(void 0,!0)}})},y=w(!0),_=w(!1);o(_,p,"Iterator Helper"),t.exports=function(t,e,n){var r=function(r,i){i?(i.iterator=r.iterator,i.next=r.next):i=r,i.type=e?v:d,i.returnHandlerResult=!!n,i.nextHandler=t,i.counter=0,i.done=!1,g(this,i)};return r.prototype=e?y:_,r}},9504:function(t,e,n){"use strict";var r=n(616),i=Function.prototype,o=i.call,a=r&&i.bind.bind(o,o);t.exports=r?a:function(t){return function(){return o.apply(t,arguments)}}},9506:function(t,e,n){(function(e,r){t.exports=r(n(9021),n(5471),n(1025))})(0,(function(t){return function(){var e=t,n=e.lib,r=n.Base,i=n.WordArray,o=e.algo,a=o.MD5,u=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){var n,r=this.cfg,o=r.hasher.create(),a=i.create(),u=a.words,s=r.keySize,c=r.iterations;while(u.length<s){n&&o.update(n),n=o.update(t).finalize(e),o.reset();for(var f=1;f<c;f++)n=o.finalize(n),o.reset();a.concat(n)}return a.sigBytes=4*s,a}});e.EvpKDF=function(t,e,n){return u.create(n).compute(t,e)}}(),t.EvpKDF}))},9516:function(t,e,n){"use strict";var r=n(9012),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return"undefined"===typeof t}function u(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function s(t){return"[object ArrayBuffer]"===i.call(t)}function c(t){return"undefined"!==typeof FormData&&t instanceof FormData}function f(t){var e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function l(t){return"string"===typeof t}function h(t){return"number"===typeof t}function p(t){return null!==t&&"object"===typeof t}function d(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function v(t){return"[object Date]"===i.call(t)}function g(t){return"[object File]"===i.call(t)}function w(t){return"[object Blob]"===i.call(t)}function y(t){return"[object Function]"===i.call(t)}function _(t){return p(t)&&y(t.pipe)}function m(t){return"undefined"!==typeof URLSearchParams&&t instanceof URLSearchParams}function b(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function x(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function I(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}function S(){var t={};function e(e,n){d(t[n])&&d(e)?t[n]=S(t[n],e):d(e)?t[n]=S({},e):o(e)?t[n]=e.slice():t[n]=e}for(var n=0,r=arguments.length;n<r;n++)I(arguments[n],e);return t}function k(t,e,n){return I(e,(function(e,i){t[i]=n&&"function"===typeof e?r(e,n):e})),t}function A(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}t.exports={isArray:o,isArrayBuffer:s,isBuffer:u,isFormData:c,isArrayBufferView:f,isString:l,isNumber:h,isObject:p,isPlainObject:d,isUndefined:a,isDate:v,isFile:g,isBlob:w,isFunction:y,isStream:_,isURLSearchParams:m,isStandardBrowserEnv:x,forEach:I,merge:S,extend:k,trim:b,stripBOM:A}},9519:function(t,e,n){"use strict";var r,i,o=n(4576),a=n(2839),u=o.process,s=o.Deno,c=u&&u.versions||s&&s.version,f=c&&c.v8;f&&(r=f.split("."),i=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(i=+r[1]))),t.exports=i},9539:function(t,e,n){"use strict";var r=n(9565),i=n(8551),o=n(5966);t.exports=function(t,e,n){var a,u;i(t);try{if(a=o(t,"return"),!a){if("throw"===e)throw n;return n}a=r(a,t)}catch(s){u=!0,a=s}if("throw"===e)throw n;if(u)throw a;return i(a),n}},9547:function(t,e,n){"use strict";n(4114),n(8111),n(7588);var r=n(2543),i=n.n(r);class o{constructor(){this.__listeners={}}register(...t){let e,n;3==t.length?(e=`${t[0]}-${t[1]}`,n=t[2]):(e=t[0],n=t[1]),this.__listeners[e]=this.__listeners[e]||[],this.__listeners[e].push({callback:n})}fireEvent(...t){let e,n;3==t.length?(e=`${t[0]}-${t[1]}`,n=t[2]):(e=t[0],n=t[1]);let r=this.__listeners[e]||[],o=!0;return i().forEach(r,(t=>{let e=t.callback,r=e.call(null,n);if(!1===r)return o=!1,!1})),o}unregister(...t){let e,n;3==t.length?(e=`${t[0]}-${t[1]}`,n=t[2]):(e=t[0],n=t[1]),i().isString(e)&&!i().isEmpty(this.__listeners[e])&&i().remove(this.__listeners[e],(t=>t.callback===n||void 0===n))}hasListener(t){return i().isString(t)&&!i().isEmpty(this.__listeners[t])}clearAll(){this.__listeners={}}}const a=new o;e.A=a},9557:function(t,e,n){(function(e,r){t.exports=r(n(9021),n(3240),n(1380))})(0,(function(t){return function(){var e=t,n=e.x64,r=n.Word,i=n.WordArray,o=e.algo,a=o.SHA512,u=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=16,t}});e.SHA384=a._createHelper(u),e.HmacSHA384=a._createHmacHelper(u)}(),t.SHA384}))},9565:function(t,e,n){"use strict";var r=n(616),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},9615:function(t,e,n){"use strict";var r=n(9137),i=n(4680);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},9617:function(t,e,n){"use strict";var r=n(5397),i=n(5610),o=n(6198),a=function(t){return function(e,n,a){var u=r(e),s=o(u);if(0===s)return!t&&-1;var c,f=i(a,s);if(t&&n!==n){while(s>f)if(c=u[f++],c!==c)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},9641:function(t){t.exports={version:"0.23.0"}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}!function(){n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,{a:e}),e}}(),function(){n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){n.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t}}(),function(){n.p=""}();var r={};return function(){"use strict";if(n.r(r),n.d(r,{ChatClientMgr:function(){return wn},addEventAction:function(){return pn},addIMMapping:function(){return et},addObjectUsedTimes:function(){return $},addWindowTrustedOrigin:function(){return ln},createFileFromUrl:function(){return sn},decrypt:function(){return en},destroyEventCenter:function(){return a},extractFilenameFromUrl:function(){return cn},fireEvent:function(){return s},getAIRobotInfos:function(){return nt},getAPPInfosByID:function(){return Z},getAllUserInfosByGroupID:function(){return Y},getAppCustomData:function(){return it},getAppPortalMenuDatas:function(){return y},getAuthPic:function(){return Qe},getChildrenOfficeInfosByID:function(){return Q},getCurrentUserPortalPageID:function(){return C},getDifyFileType:function(){return bn},getFileSize:function(){return fn},getGroupMappingsByAccount:function(){return G},getIMHanlder:function(){return _n},getIntegrateAppInfoByID:function(){return ot},getKey:function(){return on},getLoginPageNotices:function(){return P},getMappingAppInfoByID:function(){return R},getMenuDatasByGroupID:function(){return _},getMenuMappingDatasByRoleIDs:function(){return m},getObjectUseTimes:function(){return q},getOfficeInfosByIDs:function(){return X},getPageIDByComponentID:function(){return K},getPojectDptsByUserAndGroupID:function(){return tt},getPoratlAppID:function(){return w},getPortalAccessToken:function(){return M},getPortalAppCustomConfig:function(){return z},getPortalDocmentInfo:function(){return I},getPortalPageConfig:function(){return B},getPortalPageMenuID:function(){return j},getPortalUserInfo:function(){return N},getPortalUserMappingInfos:function(){return E},getPortalUserSig:function(){return U},getRobotInfoByID:function(){return yn},getRoleIDsByUserAndGroupID:function(){return x},getThirdAppPathByKey:function(){return F},getUrlParamValue:function(){return un},getUserAllMappngPortal:function(){return D},hasListener:function(){return c},initEventCenter:function(){return o},initFrameWindowListener:function(){return vn},loginAccount:function(){return rn},logoutAccount:function(){return tn},queryAndStoreAppVariable:function(){return W},queryAppVariable:function(){return H},queryAssetById:function(){return an},queryGroupIDByOfficeId:function(){return L},queryGroupInfosByOfficeId:function(){return V},queryOfficeInfosById:function(){return J},registerEventListener:function(){return i},removeEventAction:function(){return dn},removeEventListener:function(){return u},removeWindowTrustedOrigin:function(){return hn},sendPostToAIAgent:function(){return mn},sendWindowMessage:function(){return gn},setPortalPageConfig:function(){return O},switchPortalLogin:function(){return nn},transformPortalQuickMenuDatas:function(){return k},transformPortalSystemMenuDatas:function(){return A},updateIMMapping:function(){return rt},updateUserSelectPortal:function(){return T},validateSSOPageLoaded:function(){return b}}),"undefined"!==typeof window){var t=window.document.currentScript,e=t&&t.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);e&&(n.p=e[1])}const i=(t,e)=>{let n=window.rjEventCenter;n||(o(),n=window.rjEventCenter),n&&n.register&&n.register(t,e)},o=()=>{if(window.rjEventCenter)console.log(`事件中心已经初始化,不需要重新初始化:时间戳: ${(new Date).toLocaleString()}`);else{console.log(`初始化事件中心:时间戳: ${(new Date).toLocaleString()}`);let t=n(9547).A;window.rjEventCenter=t}},a=()=>{window.rjEventCenter&&(window.rjEventCenter.clearAll(),window.rjEventCenter=null,console.log(`事件中心已清理:时间戳: ${(new Date).toLocaleString()}`))},u=(t,e)=>{let n=window.rjEventCenter;n&&n.unregister&&n.unregister(t,e)},s=(t,e)=>{let n=window.rjEventCenter;n&&n.fireEvent&&n.fireEvent(t,e)},c=t=>{let e=window.rjEventCenter;return!(!e||!e.hasListener)&&e.hasListener(t)};n(4114),n(8111),n(2489),n(116),n(7588);var f=n(2505),l=n.n(f),h=n(3992);let p="";const d=(t="")=>{t&&(t.startsWith("/")&&(t=t.slice(1,t.length)),t.endsWith("/")&&(t=t.slice(0,-1)));const e=l().create({baseURL:`${p}/${t?t+"/":""}sdata/rest`,timeout:6e4,validateStatus:function(t){return t>=200&&t<300},headers:window.location.search&&h.parse(window.location.search).token||window.token?{token:h.parse(window.location.search).token||window.token}:{}});return e.defaults.headers.post["Content-Type"]="application/json",e.interceptors.response.use((t=>{let{data:e}=t;return"string"===typeof e&&(e=JSON.parse(e)),!e||200===e.status||e instanceof Blob?e instanceof Blob?(t.data=e,t):(t.data=e&&e.result,t):Promise.reject(t)}),(t=>{if(!t.response||401!==t.response.status)return Promise.reject(t.response)})),e};let v=window.prefixPath||"";var g=d(v);const w=(t,e)=>{let n="";return t?n=window.appSdk.getAppId():(n=window.sessionStorage.getItem("iportal_app_id"),n||e.forEach((t=>{"iPortal_app_id"==t.name&&(n=t.default_value)})),n||(n=window.appSdk.getAppId())),n},y=async(t,e,n,r)=>{let i=w(n,r),o=await x(t,i,e),a=await _(e,o),u=window.appSdk.getAppId(),s=a.filter((t=>{if(n)return!0;if(t.app_id==i)return!0;{let e=t.children,n=!1;return e&&e.length>0&&e.forEach((t=>{let e=t.children;if(e&&e.length>0){let t=e.filter((t=>t.app_id===u));t&&t.length>0&&(n=!0)}})),n}}));return s},_=async(t,e)=>{let n={param:{id:t}},r=await g.post("/dataservice/rest/orchestration/getMenuDatasByGroupID",n),i=r.data.resultDatas,o=r.data.menuTypes;if(e&&e.length>0){let n=await m(e,t),r=n.data.quickMenuMappingDatas||[],a={},u={};for(const t of i){let e=t.id;u[e]=t}for(const t of r){let e=t.menu_mapping_id,n=u[e];a[e]=n}return S(i,o,a)}return S(i,o,[])},m=async(t,e)=>{let n={param:{role_ids:t,group_id:e}},r=await g.post("/dataservice/rest/orchestration/getQuckMenuMappingsByRoleIDs",n);return r},b=async(t,e,n)=>{let r={param:{app_id:t,appSecret:e,returnUrl:n}},i=await g.post("/dataservice/rest/orchestration/validateSSOPageLoaded",r),o=i.data.count;return o},x=async(t,e,n)=>{let r={param:{user_id:t,app_id:e,group_id:n}},i=await g.post("/dataservice/rest/orchestration/getRoleIDsByUserAndGroupID",r),o=i.data.portal_role_ids;return o},I=async t=>{let e={param:{kb_doc_id:t}},n=await g.post("/dataservice/rest/orchestration/getPortalDocmentInfoByKBID",e),r=n.data.docInfo;return r},S=(t,e,n)=>{let r={},i={},o={};for(let u in n){let t=n[u],e=t.parent_id;e&&(o[e]=!0)}for(const u of t){let t=u.id,e={id:t,index:u.menu_id,name:u.title,sort:u.sort,actionType:u.actionType,url:u.url,iconClass:u.image,children:[],app_id:u.app_id,menu_id:u.menu_id,beyond_type:u.menu_type?u.menu_type:"RJVIEW-OTHERS",beyond_type_sort:u.menu_type_sort?u.menu_type_sort:999};n?(n[t]||"4"==u.type||o[t])&&(r[t]=e):r[t]=e}for(const u of e){let t=u.id;i[t]=u}for(const u of t){let t=u.type;if("5"==t){let t=r[u.id];if(!t)continue;let e=u.parent_id,n=t.beyond_type,o=r[e];if(!o)continue;let a=o.children,s=a.find((t=>t.id==n));if(s){let e=s.children;e.push(t),t.typeItem=s}else{let e=i[n],r=e?{id:n,index:n,name:e.title,children:[],sort:e.value}:{id:n,index:n,name:"其他",children:[],sort:999},o=r.children;o.push(t),a.push(r),t.typeItem=r}}}const a=[];for(const u of t){let t=u.type;if("4"==t){let t=r[u.id];if(!t)continue;let e=t.children,n=0;for(const r of e){let t=r.children,e=t.length;if(n+=e,e>0)break}if(0==n)continue;a.push(t);let i=t.children;i.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort));for(let r of i){let t=r.children;t.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort))}}}return a.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort)),a},k=t=>{let e={};for(const r of t){let t=r.id,n={id:t,label:r.title,sort:r.sort,children:[],parent_id:r.parent_id,type:r.type};e[t]=n}for(const r of t){let t=e[r.id];if("5"==t.type){let n=t.parent_id,r=e[n];if(r){let e=r.children;e.push(t)}}}const n=[];for(const r of t){let t=e[r.id];if("4"==t.type){n.push(t);let e=t.children;e.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort))}}return n.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort)),n},A=t=>{let e={};for(const r of t){let t=r.id,n={id:t,label:r.name,sort:r.sort,icon:r.icon,children:[],app_id:r.datapp_id,parent_id:r.parent_id,leaf_flag:r.leaf_flag};e[t]=n}for(const r of t){let t=r.leaf_flag;if(1==t){let t=e[r.id],n=r.parent_id,i=e[n];if(i){let e=i.children;e.push(t)}}}const n=[];for(const r of t){let t=r.leaf_flag;if(0==t){let t=e[r.id];n.push(t);let i=t.children;i.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort))}}return n.sort(((t,e)=>Number.isNaN(t.sort)?1:Number.isNaN(e.sort)?-1:t.sort-e.sort)),n},C=async t=>{let e={param:{userData:t}},n=await g.post("/dataservice/rest/orchestration/getPortalPageID",e),r=n.data.portal_id;return r},D=t=>{let e={param:{userData:t}};return g.post("/dataservice/rest/orchestration/getUserAllMappngPortal",e)},E=async t=>{let e={param:{operateData:t}},n=await g.post("/dataservice/rest/orchestration/getPortalUserMappingInfos",e),r=n.data.portalMapping;return r},B=async t=>{let e={param:{id:t}},n=await g.post("/dataservice/rest/orchestration/getPortalPageConfig",e),r=n.data.portal_page_config||"[]";return r},O=t=>{let e={param:t};return g.post("/dataservice/rest/orchestration/setPortalPageConfig",e)},T=t=>{let e={param:{portalMappingData:t}};return g.post("/dataservice/rest/orchestration/updateUserSelectPortal",e)},j=async(t,e)=>{let n={param:{id:t,appid:e}},r=await g.post("/dataservice/rest/orchestration/getPortalPageMenuID",n),i=r.data.menu_id;return i},R=async(t,e)=>{let n={param:{appID:t,groupID:e}},r=await g.post("/dataservice/rest/orchestration/getPortalMappingAppInfoByID",n),i=r.data.appInfo;return i},P=async()=>{let t={param:{id:"1005"}},e=await g.post("/dataservice/rest/orchestration/getNoticeInfosByAppTypeID",t),n=e.data.resultDatas;return n},M=async(t,e)=>{let n=await g.get(`/appAuth/getAccessToken?appKey=${t}&appSecret=${e}`),r=n.data;return r},N=async(t,e)=>{let n=await g.get(`/systhirdapp/user/getUserByCode?code=${t}&access_token=${e}`),r=n.data;return r},U=async(t,e,n)=>{let r={param:{userID:t,im_type:e,group_id:n}},i=await g.post("/dataservice/rest/orchestration/getIMUserSigByID",r),o=i.data.userSig;return o},z=async t=>{let e={param:{groupID:t}},n=await g.post("/dataservice/rest/orchestration/getPortalAppCustomConfig",e),r=n.data.configInfo;return r},L=async t=>{let e={param:{id:t}},n=await g.post("/dataservice/rest/orchestration/getGroupIDByDptID",e),r=n.data.resultDptData,i=r.id;return i},H=(t,e)=>{if(e&&e.length>0)for(let n=0;n<e.length;n++)if(e[n].name==t)return e[n].default_value;return""},F=async(t,e,n)=>{let r={param:{appKey:t,appSecret:e,groupID:n}},i=await g.post("/dataservice/rest/orchestration/getThirdAppPathByKey",r),o=i.data.path;return o},W=(t,e)=>{let n=window.sessionStorage.getItem("isdata_app_variable_"+t);return n||(n=H(t,e),n&&window.sessionStorage.setItem("isdata_app_variable_"+t,n)),n},$=t=>{let e={param:{operateData:t}};return g.post("/dataservice/rest/orchestration/addObjectUsedTimes",e)},q=t=>{let e={param:{objectInfo:t}};return g.post("/dataservice/rest/orchestration/getObjectUseTimes",e)},K=async t=>{let e={param:{componentID:t}},n=await g.post("/dataservice/rest/orchestration/getPageIDByComponentID",e),r=n.data.page_id;return r},G=async t=>{let e={param:{account:t}},n=await g.post("/dataservice/rest/orchestration/getGourpMappingsByAccountName",e),r=n.data.resultGroups;return r},V=async t=>{let e={param:{id:t}},n=await g.post("/dataservice/rest/orchestration/getGroupIDByDptID",e),r=n.data.resultDptData;return r},X=async t=>{let e={param:{ids:t}},n=await g.post("/dataservice/rest/orchestration/getOfficeInfosByIDs",e),r=n.data.officeInfos;return r},J=async t=>{let e={param:{id:t}},n=await g.post("/dataservice/rest/orchestration/getOfficeInfosByID",e),r=n.data.officeData;return r},Z=async t=>{let e={param:{id:t}},n=await g.post("/dataservice/rest/orchestration/getAPPInfosByID",e),r=n.data.appInfo;return r},Y=async t=>{let e={param:{groupID:t}},n=await g.post("/dataservice/rest/orchestration/getAllUserInfosByGroupID",e),r=n.data.resultDatas;return r},Q=async t=>{let e={param:{officeID:t}},n=await g.post("/dataservice/rest/orchestration/getChildrenOfficeInfosByID",e),r=n.data.resultDatas;return r},tt=async(t,e)=>{let n={param:{userID:t,groupID:e}},r=await g.post("/dataservice/rest/orchestration/getPojectDptsByUserAndGroupID",n),i={dptDatas:r.data.officeDatas,userMappings:r.data.userMappings};return i},et=async(t,e,n,r)=>{let i={param:{data:{userID:t,im_type:e,group_id:n,userSig:r}}},o=await g.post("/dataservice/rest/orchestration/addIMMapping",i),a=o.data;return a},nt=async(t,e)=>{let n={param:{userID:t,groupID:e}},r=await g.post("/dataservice/rest/orchestration/getAIRobotInfos",n),i=r.data.robotInfos;return i},rt=async(t,e,n,r)=>{let i={param:{userID:t,im_type:e,groupID:n,userSig:r}},o=await g.post("/dataservice/rest/orchestration/updateIMMapping",i),a=o.data;return a},it=async t=>{let e={param:{appID:t}},n=await g.post("/dataservice/rest/orchestration/getAppCustomData",e),r=n.data.customData;return r=r?JSON.parse(r):{},r},ot=async t=>{let e={param:{appID:t}},n=await g.post("/dataservice/rest/orchestration/getIntegrateAppInfoByID",e),r=n.data.appInfo;return r};var at="2.0.6",ut=500,st="user-agent",ct="",ft="?",lt={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},ht="browser",pt="cpu",dt="device",vt="engine",gt="os",wt="result",yt="name",_t="type",mt="vendor",bt="version",xt="architecture",It="major",St="model",kt="console",At="mobile",Ct="tablet",Dt="smarttv",Et="wearable",Bt="xr",Ot="embedded",Tt="inapp",jt="brands",Rt="formFactors",Pt="fullVersionList",Mt="platform",Nt="platformVersion",Ut="bitness",zt="sec-ch-ua",Lt=zt+"-full-version-list",Ht=zt+"-arch",Ft=zt+"-"+Ut,Wt=zt+"-form-factors",$t=zt+"-"+At,qt=zt+"-"+St,Kt=zt+"-"+Mt,Gt=Kt+"-version",Vt=[jt,Pt,At,St,Mt,Nt,xt,Rt,Ut],Xt="Amazon",Jt="Apple",Zt="ASUS",Yt="BlackBerry",Qt="Google",te="Huawei",ee="Lenovo",ne="Honor",re="LG",ie="Microsoft",oe="Motorola",ae="Nvidia",ue="OnePlus",se="OPPO",ce="Samsung",fe="Sharp",le="Sony",he="Xiaomi",pe="Zebra",de="Chrome",ve="Chromium",ge="Chromecast",we="Edge",ye="Firefox",_e="Opera",me="Facebook",be="Sogou",xe="Mobile ",Ie=" Browser",Se="Windows",ke=typeof window!==lt.UNDEFINED,Ae=ke&&window.navigator?window.navigator:void 0,Ce=Ae&&Ae.userAgentData?Ae.userAgentData:void 0,De=function(t,e){var n={},r=e;if(!Oe(e))for(var i in r={},e)for(var o in e[i])r[o]=e[i][o].concat(r[o]?r[o]:[]);for(var a in t)n[a]=r[a]&&r[a].length%2===0?r[a].concat(t[a]):t[a];return n},Ee=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e},Be=function(t,e){if(typeof t===lt.OBJECT&&t.length>0){for(var n in t)if(Re(e)==Re(t[n]))return!0;return!1}return!!Te(t)&&Re(e)==Re(t)},Oe=function(t,e){for(var n in t)return/^(browser|cpu|device|engine|os)$/.test(n)||!!e&&Oe(t[n])},Te=function(t){return typeof t===lt.STRING},je=function(t){if(t){for(var e=[],n=Ne(/\\?\"/g,t).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var i=ze(n[r]).split(";v=");e[r]={brand:i[0],version:i[1]}}else e[r]=ze(n[r]);return e}},Re=function(t){return Te(t)?t.toLowerCase():t},Pe=function(t){return Te(t)?Ne(/[^\d\.]/g,t).split(".")[0]:void 0},Me=function(t){for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];typeof n==lt.OBJECT&&2==n.length?this[n[0]]=n[1]:this[n]=void 0}return this},Ne=function(t,e){return Te(e)?e.replace(t,ct):e},Ue=function(t){return Ne(/\\?\"/g,t)},ze=function(t,e){return t=Ne(/^\s\s*/,String(t)),typeof e===lt.UNDEFINED?t:t.substring(0,e)},Le=function(t,e){if(t&&e){var n,r,i,o,a,u,s=0;while(s<e.length&&!a){var c=e[s],f=e[s+1];n=r=0;while(n<c.length&&!a){if(!c[n])break;if(a=c[n++].exec(t),a)for(i=0;i<f.length;i++)u=a[++r],o=f[i],typeof o===lt.OBJECT&&o.length>0?2===o.length?typeof o[1]==lt.FUNCTION?this[o[0]]=o[1].call(this,u):this[o[0]]=o[1]:o.length>=3&&(typeof o[1]!==lt.FUNCTION||o[1].exec&&o[1].test?3==o.length?this[o[0]]=u?u.replace(o[1],o[2]):void 0:4==o.length?this[o[0]]=u?o[3].call(this,u.replace(o[1],o[2])):void 0:o.length>4&&(this[o[0]]=u?o[3].apply(this,[u.replace(o[1],o[2])].concat(o.slice(4))):void 0):o.length>3?this[o[0]]=u?o[1].apply(this,o.slice(2)):void 0:this[o[0]]=u?o[1].call(this,u,o[2]):void 0):this[o]=u||void 0}s+=2}}},He=function(t,e){for(var n in e)if(typeof e[n]===lt.OBJECT&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(Be(e[n][r],t))return n===ft?void 0:n}else if(Be(e[n],t))return n===ft?void 0:n;return e.hasOwnProperty("*")?e["*"]:t},Fe={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},We={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},$e={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},qe={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[bt,[yt,xe+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[bt,[yt,we+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[bt,[yt,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[yt,bt],[/opios[\/ ]+([\w\.]+)/i],[bt,[yt,_e+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[bt,[yt,_e+" GX"]],[/\bopr\/([\w\.]+)/i],[bt,[yt,_e]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[bt,[yt,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[bt,[yt,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[yt,bt],[/quark(?:pc)?\/([-\w\.]+)/i],[bt,[yt,"Quark"]],[/\bddg\/([\w\.]+)/i],[bt,[yt,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[bt,[yt,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[bt,[yt,"WeChat"]],[/konqueror\/([\w\.]+)/i],[bt,[yt,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[bt,[yt,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[bt,[yt,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[bt,[yt,"Smart "+ee+Ie]],[/(avast|avg)\/([\w\.]+)/i],[[yt,/(.+)/,"$1 Secure"+Ie],bt],[/\bfocus\/([\w\.]+)/i],[bt,[yt,ye+" Focus"]],[/\bopt\/([\w\.]+)/i],[bt,[yt,_e+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[bt,[yt,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[bt,[yt,"Dolphin"]],[/coast\/([\w\.]+)/i],[bt,[yt,_e+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[bt,[yt,"MIUI"+Ie]],[/fxios\/([\w\.-]+)/i],[bt,[yt,xe+ye]],[/\bqihoobrowser\/?([\w\.]*)/i],[bt,[yt,"360"]],[/\b(qq)\/([\w\.]+)/i],[[yt,/(.+)/,"$1Browser"],bt],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[yt,/(.+)/,"$1"+Ie],bt],[/samsungbrowser\/([\w\.]+)/i],[bt,[yt,ce+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[bt,[yt,be+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[yt,be+" Mobile"],bt],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[yt,bt],[/(lbbrowser|rekonq)/i],[yt],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[bt,yt],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[yt,me],bt,[_t,Tt]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[yt,bt,[_t,Tt]],[/\bgsa\/([\w\.]+) .*safari\//i],[bt,[yt,"GSA"],[_t,Tt]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[bt,[yt,"TikTok"],[_t,Tt]],[/\[(linkedin)app\]/i],[yt,[_t,Tt]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[yt,/(.+)/,"Zalo"],bt,[_t,Tt]],[/(chromium)[\/ ]([-\w\.]+)/i],[yt,bt],[/headlesschrome(?:\/([\w\.]+)| )/i],[bt,[yt,de+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[bt,[yt,we+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[yt,de+" WebView"],bt],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[bt,[yt,"Android"+Ie]],[/chrome\/([\w\.]+) mobile/i],[bt,[yt,xe+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[yt,bt],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[bt,[yt,xe+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[yt,xe+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[bt,yt],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[yt,[bt,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[yt,bt],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[yt,xe+ye],bt],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[yt,"Netscape"],bt],[/(wolvic|librewolf)\/([\w\.]+)/i],[yt,bt],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[bt,[yt,ye+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[yt,[bt,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[yt,[bt,/[^\d\.]+./,ct]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[xt,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[xt,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[xt,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[xt,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[xt,"arm"]],[/ sun4\w[;\)]/i],[[xt,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[xt,/ower/,ct,Re]],[/mc680.0/i],[[xt,"68k"]],[/winnt.+\[axp/i],[[xt,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[St,[mt,ce],[_t,Ct]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[St,[mt,ce],[_t,At]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[St,[mt,Jt],[_t,At]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[St,[mt,Jt],[_t,Ct]],[/(macintosh);/i],[St,[mt,Jt]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[St,[mt,fe],[_t,At]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[St,[mt,ne],[_t,Ct]],[/honor([-\w ]+)[;\)]/i],[St,[mt,ne],[_t,At]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[St,[mt,te],[_t,Ct]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[St,[mt,te],[_t,At]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[St,/_/g," "],[mt,he],[_t,Ct]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[St,/_/g," "],[mt,he],[_t,At]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[St,[mt,ue],[_t,At]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[St,[mt,se],[_t,At]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[St,[mt,He,{OnePlus:["203","304","403","404","413","415"],"*":se}],[_t,Ct]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[St,[mt,"BLU"],[_t,At]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[St,[mt,"Vivo"],[_t,At]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[St,[mt,"Realme"],[_t,At]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[St,[mt,ee],[_t,Ct]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[St,[mt,ee],[_t,At]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[St,[mt,oe],[_t,At]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[St,[mt,oe],[_t,Ct]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[St,[mt,re],[_t,Ct]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[St,[mt,re],[_t,At]],[/(nokia) (t[12][01])/i],[mt,St,[_t,Ct]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[St,/_/g," "],[_t,At],[mt,"Nokia"]],[/(pixel (c|tablet))\b/i],[St,[mt,Qt],[_t,Ct]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[St,[mt,Qt],[_t,At]],[/(google) (pixelbook( go)?)/i],[mt,St],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[St,[mt,le],[_t,At]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[St,"Xperia Tablet"],[mt,le],[_t,Ct]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[St,[mt,Xt],[_t,Ct]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[St,/(.+)/g,"Fire Phone $1"],[mt,Xt],[_t,At]],[/(playbook);[-\w\),; ]+(rim)/i],[St,mt,[_t,Ct]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[St,[mt,Yt],[_t,At]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[St,[mt,Zt],[_t,Ct]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[St,[mt,Zt],[_t,At]],[/(nexus 9)/i],[St,[mt,"HTC"],[_t,Ct]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[mt,[St,/_/g," "],[_t,At]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[St,[mt,"TCL"],[_t,Ct]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[St,[mt,"TCL"],[_t,At]],[/(itel) ((\w+))/i],[[mt,Re],St,[_t,He,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[St,[mt,"Acer"],[_t,Ct]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[St,[mt,"Meizu"],[_t,At]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[St,[mt,"Ulefone"],[_t,At]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[St,[mt,"Energizer"],[_t,At]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[St,[mt,"Cat"],[_t,At]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[St,[mt,"Smartfren"],[_t,At]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[St,[mt,"Nothing"],[_t,At]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[St,[mt,"Archos"],[_t,Ct]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[St,[mt,"Archos"],[_t,At]],[/; (n159v)/i],[St,[mt,"HMD"],[_t,At]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[mt,St,[_t,Ct]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[mt,St,[_t,At]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[mt,St,[_t,Ct]],[/(surface duo)/i],[St,[mt,ie],[_t,Ct]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[St,[mt,"Fairphone"],[_t,At]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[St,[mt,ae],[_t,Ct]],[/(sprint) (\w+)/i],[mt,St,[_t,At]],[/(kin\.[onetw]{3})/i],[[St,/\./g," "],[mt,ie],[_t,At]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[St,[mt,pe],[_t,Ct]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[St,[mt,pe],[_t,At]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[mt,[_t,Dt]],[/hbbtv.+maple;(\d+)/i],[[St,/^/,"SmartTV"],[mt,ce],[_t,Dt]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[mt,St,[_t,Dt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[mt,re],[_t,Dt]],[/(apple) ?tv/i],[mt,[St,Jt+" TV"],[_t,Dt]],[/crkey.*devicetype\/chromecast/i],[[St,ge+" Third Generation"],[mt,Qt],[_t,Dt]],[/crkey.*devicetype\/([^/]*)/i],[[St,/^/,"Chromecast "],[mt,Qt],[_t,Dt]],[/fuchsia.*crkey/i],[[St,ge+" Nest Hub"],[mt,Qt],[_t,Dt]],[/crkey/i],[[St,ge],[mt,Qt],[_t,Dt]],[/(portaltv)/i],[St,[mt,me],[_t,Dt]],[/droid.+aft(\w+)( bui|\))/i],[St,[mt,Xt],[_t,Dt]],[/(shield \w+ tv)/i],[St,[mt,ae],[_t,Dt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[St,[mt,fe],[_t,Dt]],[/(bravia[\w ]+)( bui|\))/i],[St,[mt,le],[_t,Dt]],[/(mi(tv|box)-?\w+) bui/i],[St,[mt,he],[_t,Dt]],[/Hbbtv.*(technisat) (.*);/i],[mt,St,[_t,Dt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[mt,/.+\/(\w+)/,"$1",He,{LG:"lge"}],[St,ze],[_t,Dt]],[/(playstation \w+)/i],[St,[mt,le],[_t,kt]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[St,[mt,ie],[_t,kt]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[mt,St,[_t,kt]],[/droid.+; (shield)( bui|\))/i],[St,[mt,ae],[_t,kt]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[St,[mt,ce],[_t,Et]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[mt,St,[_t,Et]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[St,[mt,se],[_t,Et]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[St,[mt,Jt],[_t,Et]],[/(opwwe\d{3})/i],[St,[mt,ue],[_t,Et]],[/(moto 360)/i],[St,[mt,oe],[_t,Et]],[/(smartwatch 3)/i],[St,[mt,le],[_t,Et]],[/(g watch r)/i],[St,[mt,re],[_t,Et]],[/droid.+; (wt63?0{2,3})\)/i],[St,[mt,pe],[_t,Et]],[/droid.+; (glass) \d/i],[St,[mt,Qt],[_t,Bt]],[/(pico) ([\w ]+) os\d/i],[mt,St,[_t,Bt]],[/(quest( \d| pro)?s?).+vr/i],[St,[mt,me],[_t,Bt]],[/mobile vr; rv.+firefox/i],[[_t,Bt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[mt,[_t,Ot]],[/(aeobc)\b/i],[St,[mt,Xt],[_t,Ot]],[/(homepod).+mac os/i],[St,[mt,Jt],[_t,Ot]],[/windows iot/i],[[_t,Ot]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[St,[_t,Dt]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[_t,Dt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[St,[_t,He,{mobile:"Mobile",xr:"VR","*":Ct}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[_t,Ct]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[_t,At]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[St,[mt,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[bt,[yt,we+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[yt,bt],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[bt,[yt,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[yt,bt],[/ladybird\//i],[[yt,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[bt,yt]],os:[[/(windows nt) (6\.[23]); arm/i],[[yt,/N/,"R"],[bt,He,Fe]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[yt,bt],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[bt,/(;|\))/g,"",He,Fe],[yt,Se]],[/(windows ce)\/?([\d\.]*)/i],[yt,bt],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[bt,/_/g,"."],[yt,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[yt,"macOS"],[bt,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[bt,[yt,ge+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[bt,[yt,ge+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[bt,[yt,ge+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[bt,[yt,ge+" Linux"]],[/crkey\/([\d\.]+)/i],[bt,[yt,ge]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[bt,yt],[/(ubuntu) ([\w\.]+) like android/i],[[yt,/(.+)/,"$1 Touch"],bt],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[yt,bt],[/\(bb(10);/i],[bt,[yt,Yt]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[bt,[yt,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[bt,[yt,ye+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[bt,[yt,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[bt,He,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[yt,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[bt,[yt,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[yt,"Chrome OS"],bt],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[yt,bt],[/(sunos) ?([\d\.]*)/i],[[yt,"Solaris"],bt],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[yt,bt]]},Ke=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return Me.call(t.init,[[ht,[yt,bt,It,_t]],[pt,[xt]],[dt,[_t,St,mt]],[vt,[yt,bt]],[gt,[yt,bt]]]),Me.call(t.isIgnore,[[ht,[bt,It]],[vt,[bt]],[gt,[bt]]]),Me.call(t.isIgnoreRgx,[[ht,/ ?browser$/i],[gt,/ ?os$/i]]),Me.call(t.toString,[[ht,[yt,bt]],[pt,[xt]],[dt,[mt,St]],[vt,[yt,bt]],[gt,[yt,bt]]]),t}(),Ge=function(t,e){var n=Ke.init[e],r=Ke.isIgnore[e]||0,i=Ke.isIgnoreRgx[e]||0,o=Ke.toString[e]||0;function a(){Me.call(this,n)}return a.prototype.getItem=function(){return t},a.prototype.withClientHints=function(){return Ce?Ce.getHighEntropyValues(Vt).then((function(e){return t.setCH(new Ve(e,!1)).parseCH().get()})):t.parseCH().get()},a.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=wt&&(a.prototype.is=function(t){var e=!1;for(var n in this)if(this.hasOwnProperty(n)&&!Be(r,n)&&Re(i?Ne(i,this[n]):this[n])==Re(i?Ne(i,t):t)){if(e=!0,t!=lt.UNDEFINED)break}else if(t==lt.UNDEFINED&&e){e=!e;break}return e},a.prototype.toString=function(){var t=ct;for(var e in o)typeof this[o[e]]!==lt.UNDEFINED&&(t+=(t?" ":ct)+this[o[e]]);return t||lt.UNDEFINED}),Ce||(a.prototype.then=function(t){var e=this,n=function(){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])};n.prototype={is:a.prototype.is,toString:a.prototype.toString};var r=new n;return t(r),r}),new a};function Ve(t,e){if(t=t||{},Me.call(this,Vt),e)Me.call(this,[[jt,je(t[zt])],[Pt,je(t[Lt])],[At,/\?1/.test(t[$t])],[St,Ue(t[qt])],[Mt,Ue(t[Kt])],[Nt,Ue(t[Gt])],[xt,Ue(t[Ht])],[Rt,je(t[Wt])],[Ut,Ue(t[Ft])]]);else for(var n in t)this.hasOwnProperty(n)&&typeof t[n]!==lt.UNDEFINED&&(this[n]=t[n])}function Xe(t,e,n,r){return this.get=function(t){return t?this.data.hasOwnProperty(t)?this.data[t]:void 0:this.data},this.set=function(t,e){return this.data[t]=e,this},this.setCH=function(t){return this.uaCH=t,this},this.detectFeature=function(){if(Ae&&Ae.userAgent==this.ua)switch(this.itemType){case ht:Ae.brave&&typeof Ae.brave.isBrave==lt.FUNCTION&&this.set(yt,"Brave");break;case dt:!this.get(_t)&&Ce&&Ce[At]&&this.set(_t,At),"Macintosh"==this.get(St)&&Ae&&typeof Ae.standalone!==lt.UNDEFINED&&Ae.maxTouchPoints&&Ae.maxTouchPoints>2&&this.set(St,"iPad").set(_t,Ct);break;case gt:!this.get(yt)&&Ce&&Ce[Mt]&&this.set(yt,Ce[Mt]);break;case wt:var t=this.data,e=function(e){return t[e].getItem().detectFeature().get()};this.set(ht,e(ht)).set(pt,e(pt)).set(dt,e(dt)).set(vt,e(vt)).set(gt,e(gt))}return this},this.parseUA=function(){switch(this.itemType!=wt&&Le.call(this.data,this.ua,this.rgxMap),this.itemType){case ht:this.set(It,Pe(this.get(bt)));break;case gt:if("iOS"==this.get(yt)&&"18.6"==this.get(bt)){var t=/\) Version\/([\d\.]+)/.exec(this.ua);t&&parseInt(t[1].substring(0,2),10)>=26&&this.set(bt,t[1])}break}return this},this.parseCH=function(){var t=this.uaCH,e=this.rgxMap;switch(this.itemType){case ht:case vt:var n,r=t[Pt]||t[jt];if(r)for(var i=0;i<r.length;i++){var o=r[i].brand||r[i],a=r[i].version;this.itemType==ht&&!/not.a.brand/i.test(o)&&(!n||/Chrom/.test(n)&&o!=ve||n==we&&/WebView2/.test(o))&&(o=He(o,$e),n=this.get(yt),n&&!/Chrom/.test(n)&&/Chrom/.test(o)||this.set(yt,o).set(bt,a).set(It,Pe(a)),n=o),this.itemType==vt&&o==ve&&this.set(bt,a)}break;case pt:var u=t[xt];u&&(u&&"64"==t[Ut]&&(u+="64"),Le.call(this.data,u+";",e));break;case dt:if(t[At]&&this.set(_t,At),t[St]&&(this.set(St,t[St]),!this.get(_t)||!this.get(mt))){var s={};Le.call(s,"droid 9; "+t[St]+")",e),!this.get(_t)&&s.type&&this.set(_t,s.type),!this.get(mt)&&s.vendor&&this.set(mt,s.vendor)}if(t[Rt]){var c;if("string"!==typeof t[Rt]){var f=0;while(!c&&f<t[Rt].length)c=He(t[Rt][f++],We)}else c=He(t[Rt],We);this.set(_t,c)}break;case gt:var l=t[Mt];if(l){var h=t[Nt];l==Se&&(h=parseInt(Pe(h),10)>=13?"11":"10"),this.set(yt,l).set(bt,h)}this.get(yt)==Se&&"Xbox"==t[St]&&this.set(yt,"Xbox").set(bt,void 0);break;case wt:var p=this.data,d=function(e){return p[e].getItem().setCH(t).parseCH().get()};this.set(ht,d(ht)).set(pt,d(pt)).set(dt,d(dt)).set(vt,d(vt)).set(gt,d(gt))}return this},Me.call(this,[["itemType",t],["ua",e],["uaCH",r],["rgxMap",n],["data",Ge(this,t)]]),this}function Je(t,e,n){if(typeof t===lt.OBJECT?(Oe(t,!0)?(typeof e===lt.OBJECT&&(n=e),e=t):(n=t,e=void 0),t=void 0):typeof t!==lt.STRING||Oe(e,!0)||(n=e,e=void 0),n)if(typeof n.append===lt.FUNCTION){var r={};n.forEach((function(t,e){r[String(e).toLowerCase()]=t})),n=r}else{var i={};for(var o in n)n.hasOwnProperty(o)&&(i[String(o).toLowerCase()]=n[o]);n=i}if(!(this instanceof Je))return new Je(t,e,n).getResult();var a=typeof t===lt.STRING?t:n&&n[st]?n[st]:Ae&&Ae.userAgent?Ae.userAgent:ct,u=new Ve(n,!0),s=e?De(qe,e):qe,c=function(t){return t==wt?function(){return new Xe(t,a,s,u).set("ua",a).set(ht,this.getBrowser()).set(pt,this.getCPU()).set(dt,this.getDevice()).set(vt,this.getEngine()).set(gt,this.getOS()).get()}:function(){return new Xe(t,a,s[t],u).parseUA().get()}};return Me.call(this,[["getBrowser",c(ht)],["getCPU",c(pt)],["getDevice",c(dt)],["getEngine",c(vt)],["getOS",c(gt)],["getResult",c(wt)],["getUA",function(){return a}],["setUA",function(t){return Te(t)&&(a=ze(t,ut)),this}]]).setUA(a),this}Je.VERSION=at,Je.BROWSER=Ee([yt,bt,It,_t]),Je.CPU=Ee([xt]),Je.DEVICE=Ee([St,mt,_t,kt,At,Dt,Ct,Et,Ot]),Je.ENGINE=Je.OS=Ee([yt,bt]);var Ze=n(1396),Ye=n.n(Ze);const Qe=()=>g.get("/system/authority/getAuthPic?module=loginPassword",{responseType:"arraybuffer"}),tn=async t=>{let e=await g.get(`/system/authority/logout?isMobileLogout=${t}`),n=JSON.parse(e.request.response),r=n.code;return"10110020"==r?(window.sessionStorage.clear(),{code:r,message:n.message}):{code:r,message:n.message}},en=async t=>{let e=await on();const n=Ye().AES.decrypt(t,e).toString(Ye().enc.Utf8);return n},nn=async(t,e,n)=>{let r=window.sessionStorage.getItem("iportal_login_user_key");r=await en(r),t.password=r;let i=await tn(n),o=i.code,a=i.message;if("10110020"==o){let n=await rn(t,e);return n}return{code:o,message:a}},rn=async(t,e)=>{let n={param:{loginData:{account:t.account_view,group_id:t.groupid,imageCode:t.imageCode}}},r=await g.post("/dataservice/rest/orchestration/getLoginPortalAccountKey",n),i=await on(),o=JSON.parse(r.request.response),a=o.result.code;if(10001==a){let n=o.result.codeData.code,u=n,s=o.result.codeData.key;if(n=Ye().AES.decrypt(n,i).toString(Ye().enc.Utf8),s=Ye().AES.decrypt(s,i).toString(Ye().enc.Utf8),s==t.password){if(n=window.appSdk.Encrypt(n),t.password=n,r=await g.post(`/system/authority/loginAccount4Application?dataappId=${e}&mobileOrWeb=web`,t),o=JSON.parse(r.request.response),a=o.code,10110004==a){let e=o.id;const n=new Je,r=n.getBrowser();let i=(new Date).getTime(),s=r.name+"_"+r.version+"_"+i;return window.sessionStorage.setItem("iportal_login_user_id",e),window.sessionStorage.setItem("iportal_group_id",t.groupid),window.sessionStorage.setItem("iportal_login_user_key",u),window.sessionStorage.setItem("iportal_client_id",s),{code:a}}return{code:a,message:o.message}}return{code:a,message:"账户密码错误!"}}return{code:a,message:o.result.message}},on=async()=>{let t={param:{}},e=await g.post("/dataservice/rest/orchestration/getKey",t),n=e.data.key;return n},an=(t,e=200)=>g.post(`/asset/getAssetData?asset_id=${t}&count=${e}`,{filters:[]}),un=(t,e)=>{try{const n=new URL(t),r=n.searchParams.get(e);return r&&-1!==r.indexOf("#")?r.split("#")[0]:r}catch(n){return console.error("URL 格式错误:",n),""}},sn=async(t,e)=>{try{const n=await fetch(t);if(!n.ok)throw new Error(`网络请求失败: ${n.status} ${n.statusText}`);const r=await n.blob(),i=e||cn(t);return new File([r],i,{type:r.type,lastModified:Date.now()})}catch(n){throw console.error("创建 File 失败:",n),n}},cn=t=>{try{const e=new URL(t);return e.pathname.split("/").pop()||"downloaded_file"}catch(e){return"downloaded_file"}},fn=async t=>{try{const e=await fetch(t,{method:"GET",headers:{Range:"bytes=0-0"}});if(206!==e.status)throw new Error("不支持 Range 请求");const n=e.headers.get("Content-Range"),r=n?.match(/\/(\d+)$/)?.[1];return r?parseInt(r,10):-1}catch(e){return console.error("获取文件大小失败:",e),-1}};n(3579);const ln=t=>{let e=window.SDATA_WINDOW_TRUSTED_ORIGINS;e||(window.SDATA_WINDOW_TRUSTED_ORIGINS=[]),e.includes(t)||e.push(t)},hn=t=>{let e=window.SDATA_WINDOW_TRUSTED_ORIGINS;e||(window.SDATA_WINDOW_TRUSTED_ORIGINS=[]);let n=e.indexOf(t);n>-1&&e.splice(n,1)},pn=(t,e)=>{let n=window.sdataEventActions;n||(window.sdataEventActions={}),window.sdataEventActions[t]=e},dn=t=>{let e=window.sdataEventActions;e||(window.sdataEventActions={}),delete window.sdataEventActions[t]},vn=()=>{let t=window.SDATA_WINDOW_TRUSTED_ORIGINS;t||(window.SDATA_WINDOW_TRUSTED_ORIGINS=[]);let e=window.sdataEventActions;e||(window.sdataEventActions={}),window.addEventListener("message",(async t=>{const e=window.SDATA_WINDOW_TRUSTED_ORIGINS.some((e=>t.origin===e||new RegExp(e).test(t.origin)));if(!e)return void console.log("拒绝非可信源消息:",t.origin);let n=t.data?.eventKey;if(!n)return;let r=t.origin;if(console.log(`收到${r}页面消息:`,t.data),"sdata_alllife_event_response"===n){let e=t.data.eventOperateKey,n=window.sdataEventActions[e];delete window.sdataEventActions[e],n&&await n(t.data.data,t)}else{let e=window.sdataEventActions[n],i={eventKey:"sdata_alllife_event_response",eventOperateKey:t.data.eventOperateKey,data:{}};if(e){let n=await e(t.data.data,t);i.data=n}t.source.postMessage(i,r)}}))},gn=async(t,e,n,r,i)=>{let o=(new Date).getTime(),a=Math.floor(1e4*Math.random())+1,u=`${n}_${o}_${a}`;pn(u,i);let s={eventOperateKey:u,eventKey:n,data:r};t.postMessage(s,e)};class wn{constructor(t,e){this.handler=e,this.actionKey=t.actionKey,this.appSKID=t.appSKID,this.imType=t.imType,this.groupID=t.groupID,this.userID=t.userID,this.chatType=t.chatType||0,this.singleChatID=t.singleChatID||"",this.customParams=t.customParams||{},this.chartOrigin=t.chartOrigin}makeKey(t){return`${t}-${this.actionKey}`}async init(){this.handler.addChatListener(this.makeKey("sdata_get_access_token"),(async t=>await this.handler.getPortalAccessToken(t))),this.handler.addChatListener(this.makeKey("sdata_get_portal_user_info"),(async t=>await this.handler.getPortalUserInfo(t))),this.handler.addChatListener(this.makeKey("sdata_get_portal_user_sig"),(async t=>{let e=t.userID,n=t.im_type,r=t.group_id;return await this.handler.getPortalUserSig(e,n,r)})),this.handler.addChatListener(this.makeKey("sdata_add_im_mapping"),(async t=>{let e=t.userID,n=t.im_type,r=t.userSig;return await this.handler.addIMMapping(e,n,r,this.groupID)})),this.handler.addChatListener(this.makeKey("sdata_update_im_mapping"),(async t=>await this.handler.updateIMMapping(t))),this.handler.addChatListener(this.makeKey("sdata_get_users_by_group_id"),(async t=>await this.handler.getAllUserInfosByGroupID(t))),this.handler.addChatListener(this.makeKey("sdata_get_dpts_by_group_id"),(async t=>await this.handler.getChildrenOfficeInfosByID(t))),this.handler.addChatListener(this.makeKey("sdata_get_project_dpts_by_user_group_id"),(async t=>await this.handler.getPojectDptsByUserAndGroupID(t))),this.handler.addChatListener(this.makeKey("sdata_get_ai_robot_infos"),(async t=>{let e=t.groupID,n=t.userID;return this.userID==n&&this.groupID==e?this.getAIRobotInfos():[]})),this.handler.addChatListener(this.makeKey("sdata_get_test_user_sig"),(async t=>{let e=t.SDKAppID,n=t.userID,r=await this.handler.genTestUserSig({SDKAppID:e,userID:n}),i=r.userSig;return i})),this.handler.addChatListener(this.makeKey("sdata_send_message_to_chat_server"),(async(t,e)=>{let n=t.message,r=n.from,i=await this.sendMessageToChatServer(r,n);return i})),this.handler.addChatListener(this.makeKey("sdata_close_frame_window"),(async(t,e)=>this.handler.closeWindow())),this.handler.addChatListener(this.makeKey("sdata_get_portal_doc_info"),(async(t,e)=>this.handler.getPortalDocmentInfo(t))),this.handler.addChatListener(this.makeKey("sdata_chat_aiAgent_event"),(async(t,e)=>this.handler.onAIAgentEvent(t,e))),this.handler.addChatListener(this.makeKey("sdata_alllife_event_regist"),(async(t,e)=>{this.appSKID=t.appid,this.imType=t.im_type,await this.initChatAIs();let n={type:this.getChatTypeKey(this.chatType),singleChatID:this.singleChatID,customParams:this.customParams};this.handler.fireEventToChatWindow(e,this.chartOrigin,this.makeKey("sdata_alllife_initChat"),n,(t=>{t&&this.handler.onChatInitFinished()}))}))}getChatTypeKey(t){switch(t){case 0:return"IM_MULTIPLE_MODE";case 1:return"IM_SINGLE_MODE";case 2:return"IM_EMBED_MODE";default:return"IM_MULTIPLE_MODE"}}async initChatAIs(){if(window.imClient)this.chatAIClient=window.imClient;else{let t=await this.handler.getChatClientClasses();const{TencentCloudChat:e,TIMUploadPlugin:n}=t;window.imClient=e.create({SDKAppID:this.appSKID,storage:{enable:!0}}),window.imClient.registerPlugin({"tim-upload-plugin":n}),window.imClient.on(e.EVENT.SDK_READY,this.onChatAIReady.bind(this)),window.imClient.charAIs={},this.chatAIClient=window.imClient}this.chatAIClient.charAIs||(this.chatAIClient.charAIs={});let t=await this.handler.getAIRobotInfos(this.userID,this.groupID);t&&t.length>0&&t.forEach((async t=>{let e=t.id;if(!this.chatAIClient.charAIs[e]){t.chatID=e;let n=await this.handler.getPortalUserSig(e,this.imType,this.groupID);n||(n=await this.generateUserSigAndAdd(e)),t.userSig=n,this.chatAIClient.charAIs[e]={robot:t,messageCache:[]}}}))}async generateUserSigAndUpdate(t){let e=await this.handler.genTestUserSig({SDKAppID:this.appSKID,userID:t}),n=e.userSig;if(n){await this.chatAIClient.login({userID:t,userSig:n}),await this.chatAIClient.logout();let e={userID:t,userSig:n,im_type:this.imType,group_id:this.groupID};await this.handler.updateIMMapping(e)}return n}async generateUserSigAndAdd(t){let e=await this.handler.genTestUserSig({SDKAppID:this.appSKID,userID:t}),n=e.userSig;return n&&(await this.chatAIClient.login({userID:t,userSig:n}),await this.chatAIClient.logout(),await this.handler.addIMMapping(t,this.imType,n,this.groupID)),n}onChatAIReady(t){let e=this.chatAIClient.lastRobotID,n=this.getAIRobotInfoByID(e);if(console.log(`[AI chat] ${n.name}已经就绪:`,t),this.chatAIClient){let t=this.getAIRobotCacheMessagesByID(e);if(console.log(`[AI chat] ${n.name}就绪后查到的缓存信息:`,t),console.log(`[AI chat] ${n.name}所有信息仓:`,this.chatAIClient.charAIs),t&&t.length>0){const r=[...t];t.splice(0,t.length),r.forEach((t=>{console.log(`[AI chat] ${n.name}发送缓存消息:`,t),this.sendMessageToChatServer(e,t)}))}}}getAIRobotInfos(){let t=[];for(let e in this.chatAIClient.charAIs)t.push(this.chatAIClient.charAIs[e].robot);return t}getAIRobotInfoByID(t){return this.chatAIClient.charAIs[t]?this.chatAIClient.charAIs[t].robot:null}getAIRobotCacheMessagesByID(t){return this.chatAIClient.charAIs[t]?this.chatAIClient.charAIs[t].messageCache:[]}async sendMessageToChatServer(t,e){let n=this.getAIRobotInfoByID(t);if(this.chatAIClient.lastRobotID!=t){console.log(`[AI chat]需要新机器人回答,切换到新机器人${n.name}`),this.chatAIClient.lastRobotID&&await this.chatAIClient.logout();try{await this.chatAIClient.login({userID:t,userSig:n.userSig})}catch(r){console.log(`[AI chat]${n.name}登录失败`,r);let i=r.code;if(70001==i){console.log(`[AI chat]${n.name}UserSig过期,重新生成userSig`);let i=await this.generateUserSigAndUpdate(t);try{return await this.chatAIClient.login({userID:t,userSig:i}),void this.sendMessageToChatServer(t,e)}catch(r){return void console.log(`[AI chat]${n.name}重新登录失败`,r)}}}}if(this.chatAIClient.lastRobotID=t,this.chatAIClient&&this.chatAIClient.isReady()){let t=await this.chatAIClient.createTextMessage(e);this.chatAIClient.sendMessage(t).then((t=>{console.log(`[AI chat]${n.name}发送信息成功`,t)}),(t=>{console.log(`[AI chat]${n.name}发送失败`,t)}))}else{let r=this.getAIRobotCacheMessagesByID(t);r.push(e),console.log(`[AI chat]${n.name}未就绪,缓存后消息:`,r)}}converToAIServerParams(t,e,n){let r="",i=t.type;switch(i){case"TIMTextElem":r=t.payload?.text||"";break;case"TIMImageElem":break;case"TIMSoundElem":break;case"TIMVideoFileElem":break;case"TIMFileElem":break;default:break}let o=t.cloudCustomData||{},a=o.conversation_id||"",u={prompt:r,params:n||{},robotKey:e.password,conversation_id:a||"",userID:t.from||""};return u}abort(){this.chatAIClient=null}}const yn=async(t,e)=>{let n={param:{id:t,groupID:e}},r=await g.post("/dataservice/rest/orchestration/getRobotInfoByID",n),i=r.data.robotInfo;return i},_n=t=>{let e={genTestUserSig:async t=>{},getChatClientClasses:async()=>[],getAIRobotInfos:async(t,e)=>nt(t,e),getPortalUserSig:async(t,e,n)=>U(t,e,n),addIMMapping:async(t,e,n,r)=>et(t,e,r,n),updateIMMapping:async t=>{let e=t.userID,n=t.im_type,r=t.group_id,i=t.userSig;return rt(e,n,r,i)},getPortalAccessToken:async t=>{let e=t.appKey,n=t.appSecret;return M(e,n)},getPortalUserInfo:async t=>{let e=t.code,n=t.access_token;return N(e,n)},getAllUserInfosByGroupID:async t=>{let e=t.groupID;return Y(e)},getChildrenOfficeInfosByID:async t=>{let e=t.groupID;return Q(e)},getPojectDptsByUserAndGroupID:async t=>{let e=t.groupID,n=t.userID;return tt(n,e)},closeWindow:()=>!0,addChatListener:async(t,e)=>{await pn(t,e)},fireEventToChatWindow:async(t,e,n,r,i)=>{await gn(t.source,e,n,r,i)},onChatInitFinished:async()=>{},onAIAgentEvent:async(t,e)=>{},getPortalDocmentInfo:async t=>{let e=t.kb_doc_id,n=await I(e),r=n?.summary;if(r){let t=JSON.parse(r);if(t){let e=t[0].url,r=window.smardaten_api_context_path,i=`${r}/storage_area/public${e}`,o=await fn(i);n.fileSize=o}}return n}};return e={...e,...t},e},mn=async(t,e,n)=>{let r=w(!1,[]),i=await it(r),o=i?.aiAgentServerIP||"";if(!o)return console.error("没有配置AI Agent服务地址,请联系管理员"),void(n&&n("没有配置AI Agent服务地址,请联系管理员"));let a=`${o}/addAndCleanDocument`;g.post(a,JSON.stringify(t)).then((t=>{console.log("发送消息成功:",t),e&&e(t)})).catch((t=>{console.error("发送消息失败:",t),n&&n(t)}))},bn=t=>{let e={DOCX:"document",TXT:"document",MD:"document",MARKDOWN:"document",MDX:"document",PDF:"document",HTML:"document",XLSX:"document",XLS:"document",VTT:"document",DOC:"document",CSV:"document",EML:"document",MSG:"document",PPTX:"document",PPT:"document",XML:"document",EPUB:"document",JPG:"image",JPEG:"image",PNG:"image",GIF:"image",WEBP:"image",MP3:"audio",M4A:"audio",WAV:"audio",WEBM:"audio",MPGA:"audio",MP4:"video",MOV:"video",MPEG:"video"},n=t.toUpperCase();return e[n]||"custom"}}(),r}()}));
|
|
27
27
|
//# sourceMappingURL=index.umd.min.js.map
|