isdata-customer-sdk 0.1.93 → 0.1.94
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.common.js +19 -0
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +19 -0
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
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,R=s.words,j=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,R[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,j[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 bn},addEventAction:function(){return wn},addIMMapping:function(){return rt},addObjectUsedTimes:function(){return q},addWindowTrustedOrigin:function(){return vn},createFileFromUrl:function(){return hn},decrypt:function(){return rn},destroyEventCenter:function(){return a},encrypt:function(){return on},extractFilenameFromUrl:function(){return pn},fireEvent:function(){return s},getAIRobotInfos:function(){return it},getAPPInfosByID:function(){return Q},getAllUserInfosByGroupID:function(){return tt},getAppCustomData:function(){return at},getAppPortalMenuDatas:function(){return _},getAuthPic:function(){return en},getChildrenOfficeInfosByID:function(){return et},getCurrentAppID:function(){return y},getCurrentUserPortalPageID:function(){return E},getDifyFileType:function(){return kn},getFileSize:function(){return dn},getGroupMappingsByAccount:function(){return X},getIMHanlder:function(){return In},getIntegrateAppInfoByID:function(){return ut},getKey:function(){return cn},getLoginPageNotices:function(){return N},getLoginPortalAccountKey:function(){return k},getMappingAppInfoByID:function(){return M},getMenuDatasByGroupID:function(){return m},getMenuMappingDatasByRoleIDs:function(){return b},getObjectUseTimes:function(){return G},getOfficeInfosByIDs:function(){return Z},getPageIDByComponentID:function(){return V},getPojectDptsByUserAndGroupID:function(){return nt},getPoratlAppID:function(){return w},getPortalAccessToken:function(){return U},getPortalAppCustomConfig:function(){return H},getPortalDocmentInfo:function(){return S},getPortalPageConfig:function(){return T},getPortalPageMenuID:function(){return P},getPortalUserInfo:function(){return z},getPortalUserMappingInfos:function(){return O},getPortalUserSig:function(){return L},getRobotInfoByID:function(){return xn},getRoleIDsByUserAndGroupID:function(){return I},getThirdAppPathByKey:function(){return $},getUrlParamValue:function(){return ln},getUserAllMappngPortal:function(){return B},getUserID:function(){return un},hasListener:function(){return c},initEventCenter:function(){return o},initFrameWindowListener:function(){return _n},loginAccount:function(){return sn},logoutAccount:function(){return nn},queryAndStoreAppVariable:function(){return K},queryAppVariable:function(){return W},queryAssetById:function(){return fn},queryGroupIDByOfficeId:function(){return F},queryGroupInfosByOfficeId:function(){return J},queryOfficeInfosById:function(){return Y},registerEventListener:function(){return i},removeEventAction:function(){return yn},removeEventListener:function(){return u},removeWindowTrustedOrigin:function(){return gn},sendPostToAIAgent:function(){return Sn},sendWindowMessage:function(){return mn},setPortalPageConfig:function(){return R},switchPortalLogin:function(){return an},transformPortalQuickMenuDatas:function(){return C},transformPortalSystemMenuDatas:function(){return D},updateIMMapping:function(){return ot},updateUserSelectPortal:function(){return j},validateSSOPageLoaded:function(){return x}}),"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;e.eventKey=t,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}:{}});let n=e.post;return e.post=(t,r,i)=>{let o=window.VITE_SERVICE_BASE_URL||"";if(o){let a=o+t;return n.call(e,a,r,i)}return n.call(e,t,r,i)},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=()=>{let t=window.sessionStorage.getItem("iportal_app_id");return t||(t=y()),t},y=()=>{let t=window.appSdk.getAppId()||window.localStorage.MobileAppId;return t},_=async(t,e,n,r)=>{let i=w(),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 g.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 A(i,o,a)}return A(i,o,[])},b=async(t,e)=>{let n={param:{role_ids:t,group_id:e}},r=await g.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 g.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 g.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 g.post("/dataservice/rest/orchestration/getPortalDocmentInfoByKBID",e),r=n.data.docInfo;return r},k=async(t,e)=>{let n={param:{loginData:{account:t,group_id:e}}},r=await g.post("/dataservice/rest/orchestration/getLoginPortalAccountKey",n);return r},A=(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},C=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},D=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},E=async t=>{let e={param:{userData:t}},n=await g.post("/dataservice/rest/orchestration/getPortalPageID",e),r=n.data.portal_id;return r},B=t=>{let e={param:{userData:t}};return g.post("/dataservice/rest/orchestration/getUserAllMappngPortal",e)},O=async t=>{let e={param:{operateData:t}},n=await g.post("/dataservice/rest/orchestration/getPortalUserMappingInfos",e),r=n.data.portalMapping;return r},T=async t=>{let e={param:{id:t}},n=await g.post("/dataservice/rest/orchestration/getPortalPageConfig",e),r=n.data.portal_page_config||"[]";return r},R=t=>{let e={param:t};return g.post("/dataservice/rest/orchestration/setPortalPageConfig",e)},j=t=>{let e={param:{portalMappingData:t}};return g.post("/dataservice/rest/orchestration/updateUserSelectPortal",e)},P=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},M=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},N=async()=>{let t={param:{id:"1005"}},e=await g.post("/dataservice/rest/orchestration/getNoticeInfosByAppTypeID",t),n=e.data.resultDatas;return n},U=async(t,e)=>{let n=await g.get(`/appAuth/getAccessToken?appKey=${t}&appSecret=${e}`),r=n.data;return r},z=async(t,e)=>{let n=await g.get(`/systhirdapp/user/getUserByCode?code=${t}&access_token=${e}`),r=n.data;return r},L=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},H=async t=>{let e={param:{groupID:t}},n=await g.post("/dataservice/rest/orchestration/getPortalAppCustomConfig",e),r=n.data.configInfo;return r},F=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},W=(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""},$=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},K=(t,e)=>{let n=window.sessionStorage.getItem("isdata_app_variable_"+t);return n||(n=W(t,e),n&&window.sessionStorage.setItem("isdata_app_variable_"+t,n)),n},q=t=>{let e={param:{operateData:t}};return g.post("/dataservice/rest/orchestration/addObjectUsedTimes",e)},G=t=>{let e={param:{objectInfo:t}};return g.post("/dataservice/rest/orchestration/getObjectUseTimes",e)},V=async t=>{let e={param:{componentID:t}},n=await g.post("/dataservice/rest/orchestration/getPageIDByComponentID",e),r=n.data.page_id;return r},X=async t=>{let e={param:{account:t}},n=await g.post("/dataservice/rest/orchestration/getGourpMappingsByAccountName",e),r=n.data.resultGroups;return r},J=async t=>{let e={param:{id:t}},n=await g.post("/dataservice/rest/orchestration/getGroupIDByDptID",e),r=n.data.resultDptData;return r},Z=async t=>{let e={param:{ids:t}},n=await g.post("/dataservice/rest/orchestration/getOfficeInfosByIDs",e),r=n.data.officeInfos;return r},Y=async t=>{let e={param:{id:t}},n=await g.post("/dataservice/rest/orchestration/getOfficeInfosByID",e),r=n.data.officeData;return r},Q=async t=>{let e={param:{id:t}},n=await g.post("/dataservice/rest/orchestration/getAPPInfosByID",e),r=n.data.appInfo;return r},tt=async t=>{let e={param:{groupID:t}},n=await g.post("/dataservice/rest/orchestration/getAllUserInfosByGroupID",e),r=n.data.resultDatas;return r},et=async t=>{let e={param:{officeID:t}},n=await g.post("/dataservice/rest/orchestration/getChildrenOfficeInfosByID",e),r=n.data.resultDatas;return r},nt=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},rt=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},it=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},ot=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},at=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},ut=async t=>{let e={param:{appID:t}},n=await g.post("/dataservice/rest/orchestration/getIntegrateAppInfoByID",e),r=n.data.appInfo;return r};var st="2.0.6",ct=500,ft="user-agent",lt="",ht="?",pt={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},dt="browser",vt="cpu",gt="device",wt="engine",yt="os",_t="result",mt="name",bt="type",xt="vendor",It="version",St="architecture",kt="major",At="model",Ct="console",Dt="mobile",Et="tablet",Bt="smarttv",Ot="wearable",Tt="xr",Rt="embedded",jt="inapp",Pt="brands",Mt="formFactors",Nt="fullVersionList",Ut="platform",zt="platformVersion",Lt="bitness",Ht="sec-ch-ua",Ft=Ht+"-full-version-list",Wt=Ht+"-arch",$t=Ht+"-"+Lt,Kt=Ht+"-form-factors",qt=Ht+"-"+Dt,Gt=Ht+"-"+At,Vt=Ht+"-"+Ut,Xt=Vt+"-version",Jt=[Pt,Nt,Dt,At,Ut,zt,St,Mt,Lt],Zt="Amazon",Yt="Apple",Qt="ASUS",te="BlackBerry",ee="Google",ne="Huawei",re="Lenovo",ie="Honor",oe="LG",ae="Microsoft",ue="Motorola",se="Nvidia",ce="OnePlus",fe="OPPO",le="Samsung",he="Sharp",pe="Sony",de="Xiaomi",ve="Zebra",ge="Chrome",we="Chromium",ye="Chromecast",_e="Edge",me="Firefox",be="Opera",xe="Facebook",Ie="Sogou",Se="Mobile ",ke=" Browser",Ae="Windows",Ce=typeof window!==pt.UNDEFINED,De=Ce&&window.navigator?window.navigator:void 0,Ee=De&&De.userAgentData?De.userAgentData:void 0,Be=function(t,e){var n={},r=e;if(!Re(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},Oe=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e},Te=function(t,e){if(typeof t===pt.OBJECT&&t.length>0){for(var n in t)if(Me(e)==Me(t[n]))return!0;return!1}return!!je(t)&&Me(e)==Me(t)},Re=function(t,e){for(var n in t)return/^(browser|cpu|device|engine|os)$/.test(n)||!!e&&Re(t[n])},je=function(t){return typeof t===pt.STRING},Pe=function(t){if(t){for(var e=[],n=ze(/\\?\"/g,t).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var i=He(n[r]).split(";v=");e[r]={brand:i[0],version:i[1]}}else e[r]=He(n[r]);return e}},Me=function(t){return je(t)?t.toLowerCase():t},Ne=function(t){return je(t)?ze(/[^\d\.]/g,t).split(".")[0]:void 0},Ue=function(t){for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];typeof n==pt.OBJECT&&2==n.length?this[n[0]]=n[1]:this[n]=void 0}return this},ze=function(t,e){return je(e)?e.replace(t,lt):e},Le=function(t){return ze(/\\?\"/g,t)},He=function(t,e){return t=ze(/^\s\s*/,String(t)),typeof e===pt.UNDEFINED?t:t.substring(0,e)},Fe=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===pt.OBJECT&&o.length>0?2===o.length?typeof o[1]==pt.FUNCTION?this[o[0]]=o[1].call(this,u):this[o[0]]=o[1]:o.length>=3&&(typeof o[1]!==pt.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}}},We=function(t,e){for(var n in e)if(typeof e[n]===pt.OBJECT&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(Te(e[n][r],t))return n===ht?void 0:n}else if(Te(e[n],t))return n===ht?void 0:n;return e.hasOwnProperty("*")?e["*"]:t},$e={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:""},Ke={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"},Ge={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[It,[mt,Se+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[It,[mt,_e+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[It,[mt,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[mt,It],[/opios[\/ ]+([\w\.]+)/i],[It,[mt,be+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[It,[mt,be+" GX"]],[/\bopr\/([\w\.]+)/i],[It,[mt,be]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[It,[mt,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[It,[mt,"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],[mt,It],[/quark(?:pc)?\/([-\w\.]+)/i],[It,[mt,"Quark"]],[/\bddg\/([\w\.]+)/i],[It,[mt,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[It,[mt,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[It,[mt,"WeChat"]],[/konqueror\/([\w\.]+)/i],[It,[mt,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[It,[mt,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[It,[mt,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[It,[mt,"Smart "+re+ke]],[/(avast|avg)\/([\w\.]+)/i],[[mt,/(.+)/,"$1 Secure"+ke],It],[/\bfocus\/([\w\.]+)/i],[It,[mt,me+" Focus"]],[/\bopt\/([\w\.]+)/i],[It,[mt,be+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[It,[mt,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[It,[mt,"Dolphin"]],[/coast\/([\w\.]+)/i],[It,[mt,be+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[It,[mt,"MIUI"+ke]],[/fxios\/([\w\.-]+)/i],[It,[mt,Se+me]],[/\bqihoobrowser\/?([\w\.]*)/i],[It,[mt,"360"]],[/\b(qq)\/([\w\.]+)/i],[[mt,/(.+)/,"$1Browser"],It],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[mt,/(.+)/,"$1"+ke],It],[/samsungbrowser\/([\w\.]+)/i],[It,[mt,le+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[It,[mt,Ie+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[mt,Ie+" Mobile"],It],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[mt,It],[/(lbbrowser|rekonq)/i],[mt],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[It,mt],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[mt,xe],It,[bt,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],[mt,It,[bt,jt]],[/\bgsa\/([\w\.]+) .*safari\//i],[It,[mt,"GSA"],[bt,jt]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[It,[mt,"TikTok"],[bt,jt]],[/\[(linkedin)app\]/i],[mt,[bt,jt]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[mt,/(.+)/,"Zalo"],It,[bt,jt]],[/(chromium)[\/ ]([-\w\.]+)/i],[mt,It],[/headlesschrome(?:\/([\w\.]+)| )/i],[It,[mt,ge+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[It,[mt,_e+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[mt,ge+" WebView"],It],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[It,[mt,"Android"+ke]],[/chrome\/([\w\.]+) mobile/i],[It,[mt,Se+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[mt,It],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[It,[mt,Se+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[mt,Se+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[It,mt],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[mt,[It,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[mt,It],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[mt,Se+me],It],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[mt,"Netscape"],It],[/(wolvic|librewolf)\/([\w\.]+)/i],[mt,It],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[It,[mt,me+" 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],[mt,[It,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[mt,[It,/[^\d\.]+./,lt]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[St,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[St,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[St,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[St,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[St,"arm"]],[/ sun4\w[;\)]/i],[[St,"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],[[St,/ower/,lt,Me]],[/mc680.0/i],[[St,"68k"]],[/winnt.+\[axp/i],[[St,"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],[At,[xt,le],[bt,Et]],[/\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],[At,[xt,le],[bt,Dt]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[At,[xt,Yt],[bt,Dt]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[At,[xt,Yt],[bt,Et]],[/(macintosh);/i],[At,[xt,Yt]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[At,[xt,he],[bt,Dt]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[At,[xt,ie],[bt,Et]],[/honor([-\w ]+)[;\)]/i],[At,[xt,ie],[bt,Dt]],[/\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],[At,[xt,ne],[bt,Et]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[At,[xt,ne],[bt,Dt]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[At,/_/g," "],[xt,de],[bt,Et]],[/\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],[[At,/_/g," "],[xt,de],[bt,Dt]],[/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],[At,[xt,ce],[bt,Dt]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[At,[xt,fe],[bt,Dt]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[At,[xt,We,{OnePlus:["203","304","403","404","413","415"],"*":fe}],[bt,Et]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[At,[xt,"BLU"],[bt,Dt]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[At,[xt,"Vivo"],[bt,Dt]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[At,[xt,"Realme"],[bt,Dt]],[/(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],[At,[xt,re],[bt,Et]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[At,[xt,re],[bt,Dt]],[/\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],[At,[xt,ue],[bt,Dt]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[At,[xt,ue],[bt,Et]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[At,[xt,oe],[bt,Et]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[At,[xt,oe],[bt,Dt]],[/(nokia) (t[12][01])/i],[xt,At,[bt,Et]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[At,/_/g," "],[bt,Dt],[xt,"Nokia"]],[/(pixel (c|tablet))\b/i],[At,[xt,ee],[bt,Et]],[/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],[At,[xt,ee],[bt,Dt]],[/(google) (pixelbook( go)?)/i],[xt,At],[/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],[At,[xt,pe],[bt,Dt]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[At,"Xperia Tablet"],[xt,pe],[bt,Et]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[At,[xt,Zt],[bt,Et]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[At,/(.+)/g,"Fire Phone $1"],[xt,Zt],[bt,Dt]],[/(playbook);[-\w\),; ]+(rim)/i],[At,xt,[bt,Et]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[At,[xt,te],[bt,Dt]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[At,[xt,Qt],[bt,Et]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[At,[xt,Qt],[bt,Dt]],[/(nexus 9)/i],[At,[xt,"HTC"],[bt,Et]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[xt,[At,/_/g," "],[bt,Dt]],[/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],[At,[xt,"TCL"],[bt,Et]],[/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],[At,[xt,"TCL"],[bt,Dt]],[/(itel) ((\w+))/i],[[xt,Me],At,[bt,We,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[At,[xt,"Acer"],[bt,Et]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[At,[xt,"Meizu"],[bt,Dt]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[At,[xt,"Ulefone"],[bt,Dt]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[At,[xt,"Energizer"],[bt,Dt]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[At,[xt,"Cat"],[bt,Dt]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[At,[xt,"Smartfren"],[bt,Dt]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[At,[xt,"Nothing"],[bt,Dt]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[At,[xt,"Archos"],[bt,Et]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[At,[xt,"Archos"],[bt,Dt]],[/; (n159v)/i],[At,[xt,"HMD"],[bt,Dt]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[xt,At,[bt,Et]],[/(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],[xt,At,[bt,Dt]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[xt,At,[bt,Et]],[/(surface duo)/i],[At,[xt,ae],[bt,Et]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[At,[xt,"Fairphone"],[bt,Dt]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[At,[xt,se],[bt,Et]],[/(sprint) (\w+)/i],[xt,At,[bt,Dt]],[/(kin\.[onetw]{3})/i],[[At,/\./g," "],[xt,ae],[bt,Dt]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[At,[xt,ve],[bt,Et]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[At,[xt,ve],[bt,Dt]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[xt,[bt,Bt]],[/hbbtv.+maple;(\d+)/i],[[At,/^/,"SmartTV"],[xt,le],[bt,Bt]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[xt,At,[bt,Bt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[xt,oe],[bt,Bt]],[/(apple) ?tv/i],[xt,[At,Yt+" TV"],[bt,Bt]],[/crkey.*devicetype\/chromecast/i],[[At,ye+" Third Generation"],[xt,ee],[bt,Bt]],[/crkey.*devicetype\/([^/]*)/i],[[At,/^/,"Chromecast "],[xt,ee],[bt,Bt]],[/fuchsia.*crkey/i],[[At,ye+" Nest Hub"],[xt,ee],[bt,Bt]],[/crkey/i],[[At,ye],[xt,ee],[bt,Bt]],[/(portaltv)/i],[At,[xt,xe],[bt,Bt]],[/droid.+aft(\w+)( bui|\))/i],[At,[xt,Zt],[bt,Bt]],[/(shield \w+ tv)/i],[At,[xt,se],[bt,Bt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[At,[xt,he],[bt,Bt]],[/(bravia[\w ]+)( bui|\))/i],[At,[xt,pe],[bt,Bt]],[/(mi(tv|box)-?\w+) bui/i],[At,[xt,de],[bt,Bt]],[/Hbbtv.*(technisat) (.*);/i],[xt,At,[bt,Bt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[xt,/.+\/(\w+)/,"$1",We,{LG:"lge"}],[At,He],[bt,Bt]],[/(playstation \w+)/i],[At,[xt,pe],[bt,Ct]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[At,[xt,ae],[bt,Ct]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[xt,At,[bt,Ct]],[/droid.+; (shield)( bui|\))/i],[At,[xt,se],[bt,Ct]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[At,[xt,le],[bt,Ot]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[xt,At,[bt,Ot]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[At,[xt,fe],[bt,Ot]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[At,[xt,Yt],[bt,Ot]],[/(opwwe\d{3})/i],[At,[xt,ce],[bt,Ot]],[/(moto 360)/i],[At,[xt,ue],[bt,Ot]],[/(smartwatch 3)/i],[At,[xt,pe],[bt,Ot]],[/(g watch r)/i],[At,[xt,oe],[bt,Ot]],[/droid.+; (wt63?0{2,3})\)/i],[At,[xt,ve],[bt,Ot]],[/droid.+; (glass) \d/i],[At,[xt,ee],[bt,Tt]],[/(pico) ([\w ]+) os\d/i],[xt,At,[bt,Tt]],[/(quest( \d| pro)?s?).+vr/i],[At,[xt,xe],[bt,Tt]],[/mobile vr; rv.+firefox/i],[[bt,Tt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[xt,[bt,Rt]],[/(aeobc)\b/i],[At,[xt,Zt],[bt,Rt]],[/(homepod).+mac os/i],[At,[xt,Yt],[bt,Rt]],[/windows iot/i],[[bt,Rt]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[At,[bt,Bt]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[bt,Bt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[At,[bt,We,{mobile:"Mobile",xr:"VR","*":Et}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[bt,Et]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[bt,Dt]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[At,[xt,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[It,[mt,_e+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[mt,It],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[It,[mt,"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],[mt,It],[/ladybird\//i],[[mt,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[It,mt]],os:[[/(windows nt) (6\.[23]); arm/i],[[mt,/N/,"R"],[It,We,$e]],[/(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],[mt,It],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[It,/(;|\))/g,"",We,$e],[mt,Ae]],[/(windows ce)\/?([\d\.]*)/i],[mt,It],[/[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],[[It,/_/g,"."],[mt,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[mt,"macOS"],[It,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[It,[mt,ye+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[It,[mt,ye+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[It,[mt,ye+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[It,[mt,ye+" Linux"]],[/crkey\/([\d\.]+)/i],[It,[mt,ye]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[It,mt],[/(ubuntu) ([\w\.]+) like android/i],[[mt,/(.+)/,"$1 Touch"],It],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[mt,It],[/\(bb(10);/i],[It,[mt,te]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[It,[mt,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[It,[mt,me+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[It,[mt,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[It,We,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[mt,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[It,[mt,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[mt,"Chrome OS"],It],[/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],[mt,It],[/(sunos) ?([\d\.]*)/i],[[mt,"Solaris"],It],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[mt,It]]},Ve=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return Ue.call(t.init,[[dt,[mt,It,kt,bt]],[vt,[St]],[gt,[bt,At,xt]],[wt,[mt,It]],[yt,[mt,It]]]),Ue.call(t.isIgnore,[[dt,[It,kt]],[wt,[It]],[yt,[It]]]),Ue.call(t.isIgnoreRgx,[[dt,/ ?browser$/i],[yt,/ ?os$/i]]),Ue.call(t.toString,[[dt,[mt,It]],[vt,[St]],[gt,[xt,At]],[wt,[mt,It]],[yt,[mt,It]]]),t}(),Xe=function(t,e){var n=Ve.init[e],r=Ve.isIgnore[e]||0,i=Ve.isIgnoreRgx[e]||0,o=Ve.toString[e]||0;function a(){Ue.call(this,n)}return a.prototype.getItem=function(){return t},a.prototype.withClientHints=function(){return Ee?Ee.getHighEntropyValues(Jt).then((function(e){return t.setCH(new Je(e,!1)).parseCH().get()})):t.parseCH().get()},a.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=_t&&(a.prototype.is=function(t){var e=!1;for(var n in this)if(this.hasOwnProperty(n)&&!Te(r,n)&&Me(i?ze(i,this[n]):this[n])==Me(i?ze(i,t):t)){if(e=!0,t!=pt.UNDEFINED)break}else if(t==pt.UNDEFINED&&e){e=!e;break}return e},a.prototype.toString=function(){var t=lt;for(var e in o)typeof this[o[e]]!==pt.UNDEFINED&&(t+=(t?" ":lt)+this[o[e]]);return t||pt.UNDEFINED}),Ee||(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 Je(t,e){if(t=t||{},Ue.call(this,Jt),e)Ue.call(this,[[Pt,Pe(t[Ht])],[Nt,Pe(t[Ft])],[Dt,/\?1/.test(t[qt])],[At,Le(t[Gt])],[Ut,Le(t[Vt])],[zt,Le(t[Xt])],[St,Le(t[Wt])],[Mt,Pe(t[Kt])],[Lt,Le(t[$t])]]);else for(var n in t)this.hasOwnProperty(n)&&typeof t[n]!==pt.UNDEFINED&&(this[n]=t[n])}function Ze(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(De&&De.userAgent==this.ua)switch(this.itemType){case dt:De.brave&&typeof De.brave.isBrave==pt.FUNCTION&&this.set(mt,"Brave");break;case gt:!this.get(bt)&&Ee&&Ee[Dt]&&this.set(bt,Dt),"Macintosh"==this.get(At)&&De&&typeof De.standalone!==pt.UNDEFINED&&De.maxTouchPoints&&De.maxTouchPoints>2&&this.set(At,"iPad").set(bt,Et);break;case yt:!this.get(mt)&&Ee&&Ee[Ut]&&this.set(mt,Ee[Ut]);break;case _t:var t=this.data,e=function(e){return t[e].getItem().detectFeature().get()};this.set(dt,e(dt)).set(vt,e(vt)).set(gt,e(gt)).set(wt,e(wt)).set(yt,e(yt))}return this},this.parseUA=function(){switch(this.itemType!=_t&&Fe.call(this.data,this.ua,this.rgxMap),this.itemType){case dt:this.set(kt,Ne(this.get(It)));break;case yt:if("iOS"==this.get(mt)&&"18.6"==this.get(It)){var t=/\) Version\/([\d\.]+)/.exec(this.ua);t&&parseInt(t[1].substring(0,2),10)>=26&&this.set(It,t[1])}break}return this},this.parseCH=function(){var t=this.uaCH,e=this.rgxMap;switch(this.itemType){case dt:case wt:var n,r=t[Nt]||t[Pt];if(r)for(var i=0;i<r.length;i++){var o=r[i].brand||r[i],a=r[i].version;this.itemType==dt&&!/not.a.brand/i.test(o)&&(!n||/Chrom/.test(n)&&o!=we||n==_e&&/WebView2/.test(o))&&(o=We(o,qe),n=this.get(mt),n&&!/Chrom/.test(n)&&/Chrom/.test(o)||this.set(mt,o).set(It,a).set(kt,Ne(a)),n=o),this.itemType==wt&&o==we&&this.set(It,a)}break;case vt:var u=t[St];u&&(u&&"64"==t[Lt]&&(u+="64"),Fe.call(this.data,u+";",e));break;case gt:if(t[Dt]&&this.set(bt,Dt),t[At]&&(this.set(At,t[At]),!this.get(bt)||!this.get(xt))){var s={};Fe.call(s,"droid 9; "+t[At]+")",e),!this.get(bt)&&s.type&&this.set(bt,s.type),!this.get(xt)&&s.vendor&&this.set(xt,s.vendor)}if(t[Mt]){var c;if("string"!==typeof t[Mt]){var f=0;while(!c&&f<t[Mt].length)c=We(t[Mt][f++],Ke)}else c=We(t[Mt],Ke);this.set(bt,c)}break;case yt:var l=t[Ut];if(l){var h=t[zt];l==Ae&&(h=parseInt(Ne(h),10)>=13?"11":"10"),this.set(mt,l).set(It,h)}this.get(mt)==Ae&&"Xbox"==t[At]&&this.set(mt,"Xbox").set(It,void 0);break;case _t:var p=this.data,d=function(e){return p[e].getItem().setCH(t).parseCH().get()};this.set(dt,d(dt)).set(vt,d(vt)).set(gt,d(gt)).set(wt,d(wt)).set(yt,d(yt))}return this},Ue.call(this,[["itemType",t],["ua",e],["uaCH",r],["rgxMap",n],["data",Xe(this,t)]]),this}function Ye(t,e,n){if(typeof t===pt.OBJECT?(Re(t,!0)?(typeof e===pt.OBJECT&&(n=e),e=t):(n=t,e=void 0),t=void 0):typeof t!==pt.STRING||Re(e,!0)||(n=e,e=void 0),n)if(typeof n.append===pt.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 Ye))return new Ye(t,e,n).getResult();var a=typeof t===pt.STRING?t:n&&n[ft]?n[ft]:De&&De.userAgent?De.userAgent:lt,u=new Je(n,!0),s=e?Be(Ge,e):Ge,c=function(t){return t==_t?function(){return new Ze(t,a,s,u).set("ua",a).set(dt,this.getBrowser()).set(vt,this.getCPU()).set(gt,this.getDevice()).set(wt,this.getEngine()).set(yt,this.getOS()).get()}:function(){return new Ze(t,a,s[t],u).parseUA().get()}};return Ue.call(this,[["getBrowser",c(dt)],["getCPU",c(vt)],["getDevice",c(gt)],["getEngine",c(wt)],["getOS",c(yt)],["getResult",c(_t)],["getUA",function(){return a}],["setUA",function(t){return je(t)&&(a=He(t,ct)),this}]]).setUA(a),this}Ye.VERSION=st,Ye.BROWSER=Oe([mt,It,kt,bt]),Ye.CPU=Oe([St]),Ye.DEVICE=Oe([At,xt,bt,Ct,Dt,Bt,Et,Ot,Rt]),Ye.ENGINE=Ye.OS=Oe([mt,It]);var Qe=n(1396),tn=n.n(Qe);const en=()=>g.get("/system/authority/getAuthPic?module=loginPassword",{responseType:"arraybuffer"}),nn=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}},rn=async t=>{let e=await cn();const n=tn().AES.decrypt(t,e).toString(tn().enc.Utf8);return n},on=async t=>{let e=await cn();const n=tn().AES.encrypt(t,e).toString();return n},an=async(t,e,n)=>{let r=window.sessionStorage.getItem("iportal_login_user_key");r=await rn(r),t.password=r;let i=await nn(n),o=i.code,a=i.message;if("10110020"==o){let n=await sn(t,e);return n}return{code:o,message:a}},un=async(t,e,n)=>{let r={param:{accountName:t,group_id:n,account_key:e}},i=await g.post("/dataservice/rest/orchestration/getUserID",r),o=i.data.persion_id;return o},sn=async(t,e)=>{let n=await k(t.account_view,t.groupid),r=n.data.code;if(10001==r){let i=n.data.codeData.key,o=i,a=n.data.codeData.code;if(i=await rn(i),a=await rn(a),i==t.password){i=window.appSdk.Encrypt(a),t.password=i,n=await g.post(`/system/authority/loginAccount4Application?authPicCode=${t.imageCode}&dataappId=${e}&mobileOrWeb=web`,t);let u=JSON.parse(n.request.response);if(r=u.code,10110004==r){let n=await un(t.account_view,o,t.groupid);const i=new Ye,a=i.getBrowser();let u=(new Date).getTime(),s=a.name+"_"+a.version+"_"+u;return window.sessionStorage.setItem("iportal_login_user_id",n),window.sessionStorage.setItem("iportal_group_id",t.groupid),window.sessionStorage.setItem("iportal_login_user_key",o),window.sessionStorage.setItem("iportal_client_id",s),window.sessionStorage.setItem("iportal_app_id",e),{code:r}}return{code:r,message:u.message}}return{code:r,message:"账户密码错误!"}}return{code:r,message:response.result.message}},cn=async()=>{let t={param:{}},e=await g.post("/dataservice/rest/orchestration/getKey",t),n=e.data.key;return n},fn=(t,e=200)=>g.post(`/asset/getAssetData?asset_id=${t}&count=${e}`,{filters:[]}),ln=(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),""}},hn=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||pn(t);return new File([r],i,{type:r.type,lastModified:Date.now()})}catch(n){throw console.error("创建 File 失败:",n),n}},pn=t=>{try{const e=new URL(t);return e.pathname.split("/").pop()||"downloaded_file"}catch(e){return"downloaded_file"}},dn=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 vn=t=>{let e=window.SDATA_WINDOW_TRUSTED_ORIGINS;e||(window.SDATA_WINDOW_TRUSTED_ORIGINS=[]),e.includes(t)||e.push(t)},gn=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)},wn=(t,e)=>{let n=window.sdataEventActions;n||(window.sdataEventActions={}),window.sdataEventActions[t]=e},yn=t=>{let e=window.sdataEventActions;e||(window.sdataEventActions={}),delete window.sdataEventActions[t]},_n=()=>{if(window.isFrameWindowInited)return;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)}})),window.isFrameWindowInited=!0},mn=async(t,e,n,r,i)=>{let o=(new Date).getTime(),a=Math.floor(1e4*Math.random())+1,u=`${n}_${o}_${a}`;wn(u,i);let s={eventOperateKey:u,eventKey:n,data:r};t.postMessage(s,e)};class bn{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";case 3:return"IM_MOBILE_MULTIPLE_EMBED_MODE";case 4:return"IM_MOBILE_SINGLE_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 xn=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},In=t=>{let e={genTestUserSig:async t=>{},getChatClientClasses:async()=>[],getAIRobotInfos:async(t,e)=>it(t,e),getPortalUserSig:async(t,e,n)=>L(t,e,n),addIMMapping:async(t,e,n,r)=>rt(t,e,r,n),updateIMMapping:async t=>{let e=t.userID,n=t.im_type,r=t.group_id,i=t.userSig;return ot(e,n,r,i)},getPortalAccessToken:async t=>{let e=t.appKey,n=t.appSecret;return U(e,n)},getPortalUserInfo:async t=>{let e=t.code,n=t.access_token;return z(e,n)},getAllUserInfosByGroupID:async t=>{let e=t.groupID;return tt(e)},getChildrenOfficeInfosByID:async t=>{let e=t.groupID;return et(e)},getPojectDptsByUserAndGroupID:async t=>{let e=t.groupID,n=t.userID;return nt(n,e)},closeWindow:()=>!0,addChatListener:async(t,e)=>{await wn(t,e)},fireEventToChatWindow:async(t,e,n,r,i)=>{await mn(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 dn(i);n.fileSize=o}}return n}};return e={...e,...t},e},Sn=async(t,e,n)=>{let r=w(),i=await at(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)}))},kn=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,R=s.words,j=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,R[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,j[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 xn},addEventAction:function(){return yn},addIMMapping:function(){return it},addObjectUsedTimes:function(){return G},addWindowTrustedOrigin:function(){return gn},createFileFromUrl:function(){return pn},decrypt:function(){return on},destroyEventCenter:function(){return a},encrypt:function(){return an},extractFilenameFromUrl:function(){return dn},fireEvent:function(){return s},getAIRobotInfos:function(){return ot},getAPPInfosByID:function(){return tt},getAllUserInfosByGroupID:function(){return et},getAppCustomData:function(){return ut},getAppPortalMenuDatas:function(){return _},getAuthPic:function(){return nn},getChildrenOfficeInfosByID:function(){return nt},getCurrentAppID:function(){return y},getCurrentUserPortalMapping:function(){return B},getCurrentUserPortalPageID:function(){return E},getDifyFileType:function(){return An},getFileSize:function(){return vn},getGroupMappingsByAccount:function(){return J},getIMHanlder:function(){return Sn},getIntegrateAppInfoByID:function(){return st},getKey:function(){return fn},getLoginPageNotices:function(){return U},getLoginPortalAccountKey:function(){return k},getMappingAppInfoByID:function(){return N},getMenuDatasByGroupID:function(){return m},getMenuMappingDatasByRoleIDs:function(){return b},getObjectUseTimes:function(){return V},getOfficeInfosByIDs:function(){return Y},getPageIDByComponentID:function(){return X},getPojectDptsByUserAndGroupID:function(){return rt},getPoratlAppID:function(){return w},getPortalAccessToken:function(){return z},getPortalAppCustomConfig:function(){return F},getPortalDocmentInfo:function(){return S},getPortalPageConfig:function(){return R},getPortalPageMenuID:function(){return M},getPortalUserInfo:function(){return L},getPortalUserMappingInfos:function(){return T},getPortalUserSig:function(){return H},getRobotInfoByID:function(){return In},getRoleIDsByUserAndGroupID:function(){return I},getThirdAppPathByKey:function(){return K},getUrlParamValue:function(){return hn},getUserAllMappngPortal:function(){return O},getUserID:function(){return sn},hasListener:function(){return c},initEventCenter:function(){return o},initFrameWindowListener:function(){return mn},loginAccount:function(){return cn},logoutAccount:function(){return rn},queryAndStoreAppVariable:function(){return q},queryAppVariable:function(){return $},queryAssetById:function(){return ln},queryGroupIDByOfficeId:function(){return W},queryGroupInfosByOfficeId:function(){return Z},queryOfficeInfosById:function(){return Q},registerEventListener:function(){return i},removeEventAction:function(){return _n},removeEventListener:function(){return u},removeWindowTrustedOrigin:function(){return wn},sendPostToAIAgent:function(){return kn},sendWindowMessage:function(){return bn},setPortalPageConfig:function(){return j},switchPortalLogin:function(){return un},transformPortalQuickMenuDatas:function(){return C},transformPortalSystemMenuDatas:function(){return D},updateIMMapping:function(){return at},updateUserSelectPortal:function(){return P},validateSSOPageLoaded:function(){return x}}),"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;e.eventKey=t,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}:{}});let n=e.post;return e.post=(t,r,i)=>{let o=window.VITE_SERVICE_BASE_URL||"";if(o){let a=o+t;return n.call(e,a,r,i)}return n.call(e,t,r,i)},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=()=>{let t=window.sessionStorage.getItem("iportal_app_id");return t||(t=y()),t},y=()=>{let t=window.appSdk.getAppId()||window.localStorage.MobileAppId;return t},_=async(t,e,n,r)=>{let i=w(),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 g.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 A(i,o,a)}return A(i,o,[])},b=async(t,e)=>{let n={param:{role_ids:t,group_id:e}},r=await g.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 g.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 g.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 g.post("/dataservice/rest/orchestration/getPortalDocmentInfoByKBID",e),r=n.data.docInfo;return r},k=async(t,e)=>{let n={param:{loginData:{account:t,group_id:e}}},r=await g.post("/dataservice/rest/orchestration/getLoginPortalAccountKey",n);return r},A=(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},C=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},D=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},E=async t=>{let e={param:{userData:t}},n=await g.post("/dataservice/rest/orchestration/getPortalPageID",e),r=n.data.portal_id;return r},B=async t=>{let e={param:{userData:t}},n=await g.post("/dataservice/rest/orchestration/getPortalMappingInfo",e),r=n.data.portal_info;return r},O=t=>{let e={param:{userData:t}};return g.post("/dataservice/rest/orchestration/getUserAllMappngPortal",e)},T=async t=>{let e={param:{operateData:t}},n=await g.post("/dataservice/rest/orchestration/getPortalUserMappingInfos",e),r=n.data.portalMapping;return r},R=async t=>{let e={param:{id:t}},n=await g.post("/dataservice/rest/orchestration/getPortalPageConfig",e),r=n.data.portal_page_config||"[]";return r},j=t=>{let e={param:t};return g.post("/dataservice/rest/orchestration/setPortalPageConfig",e)},P=t=>{let e={param:{portalMappingData:t}};return g.post("/dataservice/rest/orchestration/updateUserSelectPortal",e)},M=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},N=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},U=async()=>{let t={param:{id:"1005"}},e=await g.post("/dataservice/rest/orchestration/getNoticeInfosByAppTypeID",t),n=e.data.resultDatas;return n},z=async(t,e)=>{let n=await g.get(`/appAuth/getAccessToken?appKey=${t}&appSecret=${e}`),r=n.data;return r},L=async(t,e)=>{let n=await g.get(`/systhirdapp/user/getUserByCode?code=${t}&access_token=${e}`),r=n.data;return r},H=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},F=async t=>{let e={param:{groupID:t}},n=await g.post("/dataservice/rest/orchestration/getPortalAppCustomConfig",e),r=n.data.configInfo;return r},W=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},$=(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""},K=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},q=(t,e)=>{let n=window.sessionStorage.getItem("isdata_app_variable_"+t);return n||(n=$(t,e),n&&window.sessionStorage.setItem("isdata_app_variable_"+t,n)),n},G=t=>{let e={param:{operateData:t}};return g.post("/dataservice/rest/orchestration/addObjectUsedTimes",e)},V=t=>{let e={param:{objectInfo:t}};return g.post("/dataservice/rest/orchestration/getObjectUseTimes",e)},X=async t=>{let e={param:{componentID:t}},n=await g.post("/dataservice/rest/orchestration/getPageIDByComponentID",e),r=n.data.page_id;return r},J=async t=>{let e={param:{account:t}},n=await g.post("/dataservice/rest/orchestration/getGourpMappingsByAccountName",e),r=n.data.resultGroups;return r},Z=async t=>{let e={param:{id:t}},n=await g.post("/dataservice/rest/orchestration/getGroupIDByDptID",e),r=n.data.resultDptData;return r},Y=async t=>{let e={param:{ids:t}},n=await g.post("/dataservice/rest/orchestration/getOfficeInfosByIDs",e),r=n.data.officeInfos;return r},Q=async t=>{let e={param:{id:t}},n=await g.post("/dataservice/rest/orchestration/getOfficeInfosByID",e),r=n.data.officeData;return r},tt=async t=>{let e={param:{id:t}},n=await g.post("/dataservice/rest/orchestration/getAPPInfosByID",e),r=n.data.appInfo;return r},et=async t=>{let e={param:{groupID:t}},n=await g.post("/dataservice/rest/orchestration/getAllUserInfosByGroupID",e),r=n.data.resultDatas;return r},nt=async t=>{let e={param:{officeID:t}},n=await g.post("/dataservice/rest/orchestration/getChildrenOfficeInfosByID",e),r=n.data.resultDatas;return r},rt=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},it=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},ot=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},at=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},ut=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},st=async t=>{let e={param:{appID:t}},n=await g.post("/dataservice/rest/orchestration/getIntegrateAppInfoByID",e),r=n.data.appInfo;return r};var ct="2.0.6",ft=500,lt="user-agent",ht="",pt="?",dt={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},vt="browser",gt="cpu",wt="device",yt="engine",_t="os",mt="result",bt="name",xt="type",It="vendor",St="version",kt="architecture",At="major",Ct="model",Dt="console",Et="mobile",Bt="tablet",Ot="smarttv",Tt="wearable",Rt="xr",jt="embedded",Pt="inapp",Mt="brands",Nt="formFactors",Ut="fullVersionList",zt="platform",Lt="platformVersion",Ht="bitness",Ft="sec-ch-ua",Wt=Ft+"-full-version-list",$t=Ft+"-arch",Kt=Ft+"-"+Ht,qt=Ft+"-form-factors",Gt=Ft+"-"+Et,Vt=Ft+"-"+Ct,Xt=Ft+"-"+zt,Jt=Xt+"-version",Zt=[Mt,Ut,Et,Ct,zt,Lt,kt,Nt,Ht],Yt="Amazon",Qt="Apple",te="ASUS",ee="BlackBerry",ne="Google",re="Huawei",ie="Lenovo",oe="Honor",ae="LG",ue="Microsoft",se="Motorola",ce="Nvidia",fe="OnePlus",le="OPPO",he="Samsung",pe="Sharp",de="Sony",ve="Xiaomi",ge="Zebra",we="Chrome",ye="Chromium",_e="Chromecast",me="Edge",be="Firefox",xe="Opera",Ie="Facebook",Se="Sogou",ke="Mobile ",Ae=" Browser",Ce="Windows",De=typeof window!==dt.UNDEFINED,Ee=De&&window.navigator?window.navigator:void 0,Be=Ee&&Ee.userAgentData?Ee.userAgentData:void 0,Oe=function(t,e){var n={},r=e;if(!je(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},Te=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e},Re=function(t,e){if(typeof t===dt.OBJECT&&t.length>0){for(var n in t)if(Ne(e)==Ne(t[n]))return!0;return!1}return!!Pe(t)&&Ne(e)==Ne(t)},je=function(t,e){for(var n in t)return/^(browser|cpu|device|engine|os)$/.test(n)||!!e&&je(t[n])},Pe=function(t){return typeof t===dt.STRING},Me=function(t){if(t){for(var e=[],n=Le(/\\?\"/g,t).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var i=Fe(n[r]).split(";v=");e[r]={brand:i[0],version:i[1]}}else e[r]=Fe(n[r]);return e}},Ne=function(t){return Pe(t)?t.toLowerCase():t},Ue=function(t){return Pe(t)?Le(/[^\d\.]/g,t).split(".")[0]:void 0},ze=function(t){for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];typeof n==dt.OBJECT&&2==n.length?this[n[0]]=n[1]:this[n]=void 0}return this},Le=function(t,e){return Pe(e)?e.replace(t,ht):e},He=function(t){return Le(/\\?\"/g,t)},Fe=function(t,e){return t=Le(/^\s\s*/,String(t)),typeof e===dt.UNDEFINED?t:t.substring(0,e)},We=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===dt.OBJECT&&o.length>0?2===o.length?typeof o[1]==dt.FUNCTION?this[o[0]]=o[1].call(this,u):this[o[0]]=o[1]:o.length>=3&&(typeof o[1]!==dt.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}}},$e=function(t,e){for(var n in e)if(typeof e[n]===dt.OBJECT&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(Re(e[n][r],t))return n===pt?void 0:n}else if(Re(e[n],t))return n===pt?void 0:n;return e.hasOwnProperty("*")?e["*"]:t},Ke={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:""},qe={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Ge={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"},Ve={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[St,[bt,ke+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[St,[bt,me+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[St,[bt,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[bt,St],[/opios[\/ ]+([\w\.]+)/i],[St,[bt,xe+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[St,[bt,xe+" GX"]],[/\bopr\/([\w\.]+)/i],[St,[bt,xe]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[St,[bt,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[St,[bt,"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],[bt,St],[/quark(?:pc)?\/([-\w\.]+)/i],[St,[bt,"Quark"]],[/\bddg\/([\w\.]+)/i],[St,[bt,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[St,[bt,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[St,[bt,"WeChat"]],[/konqueror\/([\w\.]+)/i],[St,[bt,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[St,[bt,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[St,[bt,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[St,[bt,"Smart "+ie+Ae]],[/(avast|avg)\/([\w\.]+)/i],[[bt,/(.+)/,"$1 Secure"+Ae],St],[/\bfocus\/([\w\.]+)/i],[St,[bt,be+" Focus"]],[/\bopt\/([\w\.]+)/i],[St,[bt,xe+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[St,[bt,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[St,[bt,"Dolphin"]],[/coast\/([\w\.]+)/i],[St,[bt,xe+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[St,[bt,"MIUI"+Ae]],[/fxios\/([\w\.-]+)/i],[St,[bt,ke+be]],[/\bqihoobrowser\/?([\w\.]*)/i],[St,[bt,"360"]],[/\b(qq)\/([\w\.]+)/i],[[bt,/(.+)/,"$1Browser"],St],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[bt,/(.+)/,"$1"+Ae],St],[/samsungbrowser\/([\w\.]+)/i],[St,[bt,he+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[St,[bt,Se+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[bt,Se+" Mobile"],St],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[bt,St],[/(lbbrowser|rekonq)/i],[bt],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[St,bt],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[bt,Ie],St,[xt,Pt]],[/(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],[bt,St,[xt,Pt]],[/\bgsa\/([\w\.]+) .*safari\//i],[St,[bt,"GSA"],[xt,Pt]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[St,[bt,"TikTok"],[xt,Pt]],[/\[(linkedin)app\]/i],[bt,[xt,Pt]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[bt,/(.+)/,"Zalo"],St,[xt,Pt]],[/(chromium)[\/ ]([-\w\.]+)/i],[bt,St],[/headlesschrome(?:\/([\w\.]+)| )/i],[St,[bt,we+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[St,[bt,me+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[bt,we+" WebView"],St],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[St,[bt,"Android"+Ae]],[/chrome\/([\w\.]+) mobile/i],[St,[bt,ke+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[bt,St],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[St,[bt,ke+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[bt,ke+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[St,bt],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[bt,[St,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[bt,St],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[bt,ke+be],St],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[bt,"Netscape"],St],[/(wolvic|librewolf)\/([\w\.]+)/i],[bt,St],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[St,[bt,be+" 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],[bt,[St,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[bt,[St,/[^\d\.]+./,ht]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[kt,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[kt,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[kt,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[kt,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[kt,"arm"]],[/ sun4\w[;\)]/i],[[kt,"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],[[kt,/ower/,ht,Ne]],[/mc680.0/i],[[kt,"68k"]],[/winnt.+\[axp/i],[[kt,"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],[Ct,[It,he],[xt,Bt]],[/\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],[Ct,[It,he],[xt,Et]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[Ct,[It,Qt],[xt,Et]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[Ct,[It,Qt],[xt,Bt]],[/(macintosh);/i],[Ct,[It,Qt]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[Ct,[It,pe],[xt,Et]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[Ct,[It,oe],[xt,Bt]],[/honor([-\w ]+)[;\)]/i],[Ct,[It,oe],[xt,Et]],[/\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],[Ct,[It,re],[xt,Bt]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[Ct,[It,re],[xt,Et]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[Ct,/_/g," "],[It,ve],[xt,Bt]],[/\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],[[Ct,/_/g," "],[It,ve],[xt,Et]],[/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],[Ct,[It,fe],[xt,Et]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[Ct,[It,le],[xt,Et]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[Ct,[It,$e,{OnePlus:["203","304","403","404","413","415"],"*":le}],[xt,Bt]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[Ct,[It,"BLU"],[xt,Et]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[Ct,[It,"Vivo"],[xt,Et]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[Ct,[It,"Realme"],[xt,Et]],[/(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],[Ct,[It,ie],[xt,Bt]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[Ct,[It,ie],[xt,Et]],[/\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],[Ct,[It,se],[xt,Et]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[Ct,[It,se],[xt,Bt]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[Ct,[It,ae],[xt,Bt]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[Ct,[It,ae],[xt,Et]],[/(nokia) (t[12][01])/i],[It,Ct,[xt,Bt]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[Ct,/_/g," "],[xt,Et],[It,"Nokia"]],[/(pixel (c|tablet))\b/i],[Ct,[It,ne],[xt,Bt]],[/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],[Ct,[It,ne],[xt,Et]],[/(google) (pixelbook( go)?)/i],[It,Ct],[/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],[Ct,[It,de],[xt,Et]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[Ct,"Xperia Tablet"],[It,de],[xt,Bt]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[Ct,[It,Yt],[xt,Bt]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[Ct,/(.+)/g,"Fire Phone $1"],[It,Yt],[xt,Et]],[/(playbook);[-\w\),; ]+(rim)/i],[Ct,It,[xt,Bt]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[Ct,[It,ee],[xt,Et]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[Ct,[It,te],[xt,Bt]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[Ct,[It,te],[xt,Et]],[/(nexus 9)/i],[Ct,[It,"HTC"],[xt,Bt]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[It,[Ct,/_/g," "],[xt,Et]],[/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],[Ct,[It,"TCL"],[xt,Bt]],[/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],[Ct,[It,"TCL"],[xt,Et]],[/(itel) ((\w+))/i],[[It,Ne],Ct,[xt,$e,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[Ct,[It,"Acer"],[xt,Bt]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[Ct,[It,"Meizu"],[xt,Et]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[Ct,[It,"Ulefone"],[xt,Et]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[Ct,[It,"Energizer"],[xt,Et]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[Ct,[It,"Cat"],[xt,Et]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[Ct,[It,"Smartfren"],[xt,Et]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[Ct,[It,"Nothing"],[xt,Et]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[Ct,[It,"Archos"],[xt,Bt]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[Ct,[It,"Archos"],[xt,Et]],[/; (n159v)/i],[Ct,[It,"HMD"],[xt,Et]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[It,Ct,[xt,Bt]],[/(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],[It,Ct,[xt,Et]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[It,Ct,[xt,Bt]],[/(surface duo)/i],[Ct,[It,ue],[xt,Bt]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[Ct,[It,"Fairphone"],[xt,Et]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[Ct,[It,ce],[xt,Bt]],[/(sprint) (\w+)/i],[It,Ct,[xt,Et]],[/(kin\.[onetw]{3})/i],[[Ct,/\./g," "],[It,ue],[xt,Et]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[Ct,[It,ge],[xt,Bt]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[Ct,[It,ge],[xt,Et]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[It,[xt,Ot]],[/hbbtv.+maple;(\d+)/i],[[Ct,/^/,"SmartTV"],[It,he],[xt,Ot]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[It,Ct,[xt,Ot]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[It,ae],[xt,Ot]],[/(apple) ?tv/i],[It,[Ct,Qt+" TV"],[xt,Ot]],[/crkey.*devicetype\/chromecast/i],[[Ct,_e+" Third Generation"],[It,ne],[xt,Ot]],[/crkey.*devicetype\/([^/]*)/i],[[Ct,/^/,"Chromecast "],[It,ne],[xt,Ot]],[/fuchsia.*crkey/i],[[Ct,_e+" Nest Hub"],[It,ne],[xt,Ot]],[/crkey/i],[[Ct,_e],[It,ne],[xt,Ot]],[/(portaltv)/i],[Ct,[It,Ie],[xt,Ot]],[/droid.+aft(\w+)( bui|\))/i],[Ct,[It,Yt],[xt,Ot]],[/(shield \w+ tv)/i],[Ct,[It,ce],[xt,Ot]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[Ct,[It,pe],[xt,Ot]],[/(bravia[\w ]+)( bui|\))/i],[Ct,[It,de],[xt,Ot]],[/(mi(tv|box)-?\w+) bui/i],[Ct,[It,ve],[xt,Ot]],[/Hbbtv.*(technisat) (.*);/i],[It,Ct,[xt,Ot]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[It,/.+\/(\w+)/,"$1",$e,{LG:"lge"}],[Ct,Fe],[xt,Ot]],[/(playstation \w+)/i],[Ct,[It,de],[xt,Dt]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[Ct,[It,ue],[xt,Dt]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[It,Ct,[xt,Dt]],[/droid.+; (shield)( bui|\))/i],[Ct,[It,ce],[xt,Dt]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[Ct,[It,he],[xt,Tt]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[It,Ct,[xt,Tt]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[Ct,[It,le],[xt,Tt]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[Ct,[It,Qt],[xt,Tt]],[/(opwwe\d{3})/i],[Ct,[It,fe],[xt,Tt]],[/(moto 360)/i],[Ct,[It,se],[xt,Tt]],[/(smartwatch 3)/i],[Ct,[It,de],[xt,Tt]],[/(g watch r)/i],[Ct,[It,ae],[xt,Tt]],[/droid.+; (wt63?0{2,3})\)/i],[Ct,[It,ge],[xt,Tt]],[/droid.+; (glass) \d/i],[Ct,[It,ne],[xt,Rt]],[/(pico) ([\w ]+) os\d/i],[It,Ct,[xt,Rt]],[/(quest( \d| pro)?s?).+vr/i],[Ct,[It,Ie],[xt,Rt]],[/mobile vr; rv.+firefox/i],[[xt,Rt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[It,[xt,jt]],[/(aeobc)\b/i],[Ct,[It,Yt],[xt,jt]],[/(homepod).+mac os/i],[Ct,[It,Qt],[xt,jt]],[/windows iot/i],[[xt,jt]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[Ct,[xt,Ot]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[xt,Ot]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[Ct,[xt,$e,{mobile:"Mobile",xr:"VR","*":Bt}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[xt,Bt]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[xt,Et]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[Ct,[It,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[St,[bt,me+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[bt,St],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[St,[bt,"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],[bt,St],[/ladybird\//i],[[bt,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[St,bt]],os:[[/(windows nt) (6\.[23]); arm/i],[[bt,/N/,"R"],[St,$e,Ke]],[/(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],[bt,St],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[St,/(;|\))/g,"",$e,Ke],[bt,Ce]],[/(windows ce)\/?([\d\.]*)/i],[bt,St],[/[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],[[St,/_/g,"."],[bt,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[bt,"macOS"],[St,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[St,[bt,_e+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[St,[bt,_e+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[St,[bt,_e+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[St,[bt,_e+" Linux"]],[/crkey\/([\d\.]+)/i],[St,[bt,_e]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[St,bt],[/(ubuntu) ([\w\.]+) like android/i],[[bt,/(.+)/,"$1 Touch"],St],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[bt,St],[/\(bb(10);/i],[St,[bt,ee]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[St,[bt,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[St,[bt,be+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[St,[bt,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[St,$e,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[bt,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[St,[bt,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[bt,"Chrome OS"],St],[/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],[bt,St],[/(sunos) ?([\d\.]*)/i],[[bt,"Solaris"],St],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[bt,St]]},Xe=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return ze.call(t.init,[[vt,[bt,St,At,xt]],[gt,[kt]],[wt,[xt,Ct,It]],[yt,[bt,St]],[_t,[bt,St]]]),ze.call(t.isIgnore,[[vt,[St,At]],[yt,[St]],[_t,[St]]]),ze.call(t.isIgnoreRgx,[[vt,/ ?browser$/i],[_t,/ ?os$/i]]),ze.call(t.toString,[[vt,[bt,St]],[gt,[kt]],[wt,[It,Ct]],[yt,[bt,St]],[_t,[bt,St]]]),t}(),Je=function(t,e){var n=Xe.init[e],r=Xe.isIgnore[e]||0,i=Xe.isIgnoreRgx[e]||0,o=Xe.toString[e]||0;function a(){ze.call(this,n)}return a.prototype.getItem=function(){return t},a.prototype.withClientHints=function(){return Be?Be.getHighEntropyValues(Zt).then((function(e){return t.setCH(new Ze(e,!1)).parseCH().get()})):t.parseCH().get()},a.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=mt&&(a.prototype.is=function(t){var e=!1;for(var n in this)if(this.hasOwnProperty(n)&&!Re(r,n)&&Ne(i?Le(i,this[n]):this[n])==Ne(i?Le(i,t):t)){if(e=!0,t!=dt.UNDEFINED)break}else if(t==dt.UNDEFINED&&e){e=!e;break}return e},a.prototype.toString=function(){var t=ht;for(var e in o)typeof this[o[e]]!==dt.UNDEFINED&&(t+=(t?" ":ht)+this[o[e]]);return t||dt.UNDEFINED}),Be||(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 Ze(t,e){if(t=t||{},ze.call(this,Zt),e)ze.call(this,[[Mt,Me(t[Ft])],[Ut,Me(t[Wt])],[Et,/\?1/.test(t[Gt])],[Ct,He(t[Vt])],[zt,He(t[Xt])],[Lt,He(t[Jt])],[kt,He(t[$t])],[Nt,Me(t[qt])],[Ht,He(t[Kt])]]);else for(var n in t)this.hasOwnProperty(n)&&typeof t[n]!==dt.UNDEFINED&&(this[n]=t[n])}function Ye(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(Ee&&Ee.userAgent==this.ua)switch(this.itemType){case vt:Ee.brave&&typeof Ee.brave.isBrave==dt.FUNCTION&&this.set(bt,"Brave");break;case wt:!this.get(xt)&&Be&&Be[Et]&&this.set(xt,Et),"Macintosh"==this.get(Ct)&&Ee&&typeof Ee.standalone!==dt.UNDEFINED&&Ee.maxTouchPoints&&Ee.maxTouchPoints>2&&this.set(Ct,"iPad").set(xt,Bt);break;case _t:!this.get(bt)&&Be&&Be[zt]&&this.set(bt,Be[zt]);break;case mt:var t=this.data,e=function(e){return t[e].getItem().detectFeature().get()};this.set(vt,e(vt)).set(gt,e(gt)).set(wt,e(wt)).set(yt,e(yt)).set(_t,e(_t))}return this},this.parseUA=function(){switch(this.itemType!=mt&&We.call(this.data,this.ua,this.rgxMap),this.itemType){case vt:this.set(At,Ue(this.get(St)));break;case _t:if("iOS"==this.get(bt)&&"18.6"==this.get(St)){var t=/\) Version\/([\d\.]+)/.exec(this.ua);t&&parseInt(t[1].substring(0,2),10)>=26&&this.set(St,t[1])}break}return this},this.parseCH=function(){var t=this.uaCH,e=this.rgxMap;switch(this.itemType){case vt:case yt:var n,r=t[Ut]||t[Mt];if(r)for(var i=0;i<r.length;i++){var o=r[i].brand||r[i],a=r[i].version;this.itemType==vt&&!/not.a.brand/i.test(o)&&(!n||/Chrom/.test(n)&&o!=ye||n==me&&/WebView2/.test(o))&&(o=$e(o,Ge),n=this.get(bt),n&&!/Chrom/.test(n)&&/Chrom/.test(o)||this.set(bt,o).set(St,a).set(At,Ue(a)),n=o),this.itemType==yt&&o==ye&&this.set(St,a)}break;case gt:var u=t[kt];u&&(u&&"64"==t[Ht]&&(u+="64"),We.call(this.data,u+";",e));break;case wt:if(t[Et]&&this.set(xt,Et),t[Ct]&&(this.set(Ct,t[Ct]),!this.get(xt)||!this.get(It))){var s={};We.call(s,"droid 9; "+t[Ct]+")",e),!this.get(xt)&&s.type&&this.set(xt,s.type),!this.get(It)&&s.vendor&&this.set(It,s.vendor)}if(t[Nt]){var c;if("string"!==typeof t[Nt]){var f=0;while(!c&&f<t[Nt].length)c=$e(t[Nt][f++],qe)}else c=$e(t[Nt],qe);this.set(xt,c)}break;case _t:var l=t[zt];if(l){var h=t[Lt];l==Ce&&(h=parseInt(Ue(h),10)>=13?"11":"10"),this.set(bt,l).set(St,h)}this.get(bt)==Ce&&"Xbox"==t[Ct]&&this.set(bt,"Xbox").set(St,void 0);break;case mt:var p=this.data,d=function(e){return p[e].getItem().setCH(t).parseCH().get()};this.set(vt,d(vt)).set(gt,d(gt)).set(wt,d(wt)).set(yt,d(yt)).set(_t,d(_t))}return this},ze.call(this,[["itemType",t],["ua",e],["uaCH",r],["rgxMap",n],["data",Je(this,t)]]),this}function Qe(t,e,n){if(typeof t===dt.OBJECT?(je(t,!0)?(typeof e===dt.OBJECT&&(n=e),e=t):(n=t,e=void 0),t=void 0):typeof t!==dt.STRING||je(e,!0)||(n=e,e=void 0),n)if(typeof n.append===dt.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 Qe))return new Qe(t,e,n).getResult();var a=typeof t===dt.STRING?t:n&&n[lt]?n[lt]:Ee&&Ee.userAgent?Ee.userAgent:ht,u=new Ze(n,!0),s=e?Oe(Ve,e):Ve,c=function(t){return t==mt?function(){return new Ye(t,a,s,u).set("ua",a).set(vt,this.getBrowser()).set(gt,this.getCPU()).set(wt,this.getDevice()).set(yt,this.getEngine()).set(_t,this.getOS()).get()}:function(){return new Ye(t,a,s[t],u).parseUA().get()}};return ze.call(this,[["getBrowser",c(vt)],["getCPU",c(gt)],["getDevice",c(wt)],["getEngine",c(yt)],["getOS",c(_t)],["getResult",c(mt)],["getUA",function(){return a}],["setUA",function(t){return Pe(t)&&(a=Fe(t,ft)),this}]]).setUA(a),this}Qe.VERSION=ct,Qe.BROWSER=Te([bt,St,At,xt]),Qe.CPU=Te([kt]),Qe.DEVICE=Te([Ct,It,xt,Dt,Et,Ot,Bt,Tt,jt]),Qe.ENGINE=Qe.OS=Te([bt,St]);var tn=n(1396),en=n.n(tn);const nn=()=>g.get("/system/authority/getAuthPic?module=loginPassword",{responseType:"arraybuffer"}),rn=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}},on=async t=>{let e=await fn();const n=en().AES.decrypt(t,e).toString(en().enc.Utf8);return n},an=async t=>{let e=await fn();const n=en().AES.encrypt(t,e).toString();return n},un=async(t,e,n)=>{let r=window.sessionStorage.getItem("iportal_login_user_key");r=await on(r),t.password=r;let i=await rn(n),o=i.code,a=i.message;if("10110020"==o){let n=await cn(t,e);return n}return{code:o,message:a}},sn=async(t,e,n)=>{let r={param:{accountName:t,group_id:n,account_key:e}},i=await g.post("/dataservice/rest/orchestration/getUserID",r),o=i.data.persion_id;return o},cn=async(t,e)=>{let n=await k(t.account_view,t.groupid),r=n.data.code;if(10001==r){let i=n.data.codeData.key,o=i,a=n.data.codeData.code;if(i=await on(i),a=await on(a),i==t.password){i=window.appSdk.Encrypt(a),t.password=i,n=await g.post(`/system/authority/loginAccount4Application?authPicCode=${t.imageCode}&dataappId=${e}&mobileOrWeb=web`,t);let u=JSON.parse(n.request.response);if(r=u.code,10110004==r){let n=await sn(t.account_view,o,t.groupid);const i=new Qe,a=i.getBrowser();let u=(new Date).getTime(),s=a.name+"_"+a.version+"_"+u;return window.sessionStorage.setItem("iportal_login_user_id",n),window.sessionStorage.setItem("iportal_group_id",t.groupid),window.sessionStorage.setItem("iportal_login_user_key",o),window.sessionStorage.setItem("iportal_client_id",s),window.sessionStorage.setItem("iportal_app_id",e),{code:r}}return{code:r,message:u.message}}return{code:r,message:"账户密码错误!"}}return{code:r,message:response.result.message}},fn=async()=>{let t={param:{}},e=await g.post("/dataservice/rest/orchestration/getKey",t),n=e.data.key;return n},ln=(t,e=200)=>g.post(`/asset/getAssetData?asset_id=${t}&count=${e}`,{filters:[]}),hn=(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),""}},pn=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||dn(t);return new File([r],i,{type:r.type,lastModified:Date.now()})}catch(n){throw console.error("创建 File 失败:",n),n}},dn=t=>{try{const e=new URL(t);return e.pathname.split("/").pop()||"downloaded_file"}catch(e){return"downloaded_file"}},vn=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 gn=t=>{let e=window.SDATA_WINDOW_TRUSTED_ORIGINS;e||(window.SDATA_WINDOW_TRUSTED_ORIGINS=[]),e.includes(t)||e.push(t)},wn=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)},yn=(t,e)=>{let n=window.sdataEventActions;n||(window.sdataEventActions={}),window.sdataEventActions[t]=e},_n=t=>{let e=window.sdataEventActions;e||(window.sdataEventActions={}),delete window.sdataEventActions[t]},mn=()=>{if(window.isFrameWindowInited)return;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)}})),window.isFrameWindowInited=!0},bn=async(t,e,n,r,i)=>{let o=(new Date).getTime(),a=Math.floor(1e4*Math.random())+1,u=`${n}_${o}_${a}`;yn(u,i);let s={eventOperateKey:u,eventKey:n,data:r};t.postMessage(s,e)};class xn{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";case 3:return"IM_MOBILE_MULTIPLE_EMBED_MODE";case 4:return"IM_MOBILE_SINGLE_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 In=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},Sn=t=>{let e={genTestUserSig:async t=>{},getChatClientClasses:async()=>[],getAIRobotInfos:async(t,e)=>ot(t,e),getPortalUserSig:async(t,e,n)=>H(t,e,n),addIMMapping:async(t,e,n,r)=>it(t,e,r,n),updateIMMapping:async t=>{let e=t.userID,n=t.im_type,r=t.group_id,i=t.userSig;return at(e,n,r,i)},getPortalAccessToken:async t=>{let e=t.appKey,n=t.appSecret;return z(e,n)},getPortalUserInfo:async t=>{let e=t.code,n=t.access_token;return L(e,n)},getAllUserInfosByGroupID:async t=>{let e=t.groupID;return et(e)},getChildrenOfficeInfosByID:async t=>{let e=t.groupID;return nt(e)},getPojectDptsByUserAndGroupID:async t=>{let e=t.groupID,n=t.userID;return rt(n,e)},closeWindow:()=>!0,addChatListener:async(t,e)=>{await yn(t,e)},fireEventToChatWindow:async(t,e,n,r,i)=>{await bn(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 vn(i);n.fileSize=o}}return n}};return e={...e,...t},e},kn=async(t,e,n)=>{let r=w(),i=await ut(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)}))},An=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
|