@botim/nucleus 1.0.0
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/nucleus.esm.js +2 -0
- package/dist/nucleus.esm.js.map +1 -0
- package/dist/nucleus.umd.cjs +2 -0
- package/dist/nucleus.umd.cjs.map +1 -0
- package/package.json +36 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e="[NUCLEUS]",t=function(){window.logDebug&&console.log.apply(console,[e].concat(Array.from(arguments)))},n=function(){window.logDebug&&console.warn.apply(console,[e].concat(Array.from(arguments)))},r=function(){window.logDebug&&console.error.apply(console,[e].concat(Array.from(arguments)))},o={},i={};function a(e,t){i[e]=t}function c(e){if(e in o)return o[e];if(!i[e])throw new Error("Unknown service: "+e);return o[e]=i[e](),o[e]}function s(e,t){o[e]=t}var u,l,d,f,g,p,h,m,b,v,y,S,w,A,k,O,I,C,N,T,B,L,P,R,J,D,_,x,M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function F(){if(l)return u;return l=1,u=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},u}function j(){if(p)return g;p=1;var e=(f||(f=1,d=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),c=a.length;c--;){var s=a[e?c:++o];if(!1===n(i[s],s,i))break}return t}}),d),t=e();return g=t}function U(){if(v)return b;v=1;var e="object"==typeof M&&M&&M.Object===Object&&M;return b=e}function V(){if(S)return y;S=1;var e=U(),t="object"==typeof self&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return y=n}function z(){if(A)return w;A=1;var e=V().Symbol;return w=e}function H(){if(T)return N;T=1;var e=z(),t=function(){if(O)return k;O=1;var e=z(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;return k=function(e){var t=n.call(e,o),i=e[o];try{e[o]=void 0;var a=!0}catch(e){}var c=r.call(e);return a&&(t?e[o]=i:delete e[o]),c}}(),n=function(){if(C)return I;C=1;var e=Object.prototype.toString;return I=function(t){return e.call(t)}}(),r=e?e.toStringTag:void 0;return N=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?t(e):n(e)}}function K(){if(L)return B;return L=1,B=function(e){return null!=e&&"object"==typeof e}}function W(){if(D)return J;D=1;var e=function(){if(R)return P;R=1;var e=H(),t=K();return P=function(n){return t(n)&&"[object Arguments]"==e(n)}}(),t=K(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return J=i}function G(){if(x)return _;x=1;var e=Array.isArray;return _=e}var $,q,Y,Z,Q,X,ee,te,ne,re,oe,ie={exports:{}};function ae(){return Y||(Y=1,function(e,t){var n=V(),r=q?$:(q=1,$=function(){return!1}),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,c=(a?a.isBuffer:void 0)||r;e.exports=c}(ie,ie.exports)),ie.exports}function ce(){if(Q)return Z;Q=1;var e=/^(?:0|[1-9]\d*)$/;return Z=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function se(){if(ee)return X;ee=1;return X=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function ue(){if(oe)return re;return oe=1,re=function(e){return function(t){return e(t)}}}var le,de,fe,ge,pe,he,me,be,ve,ye,Se,we,Ae,ke,Oe,Ie,Ce,Ne,Te,Be,Le,Pe,Re,Je,De,_e,xe,Me,Ee,Fe,je,Ue,Ve,ze,He,Ke={exports:{}};function We(){return le||(le=1,e=Ke,t=Ke.exports,n=U(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}(),e.exports=a),Ke.exports;var e,t,n,r,o,i,a}function Ge(){if(fe)return de;fe=1;var e=function(){if(ne)return te;ne=1;var e=H(),t=se(),n=K(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,te=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}(),t=ue(),n=We(),r=n&&n.isTypedArray,o=r?t(r):e;return de=o}function $e(){if(pe)return ge;pe=1;var e=(m||(m=1,h=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}),h),t=W(),n=G(),r=ae(),o=ce(),i=Ge(),a=Object.prototype.hasOwnProperty;return ge=function(c,s){var u=n(c),l=!u&&t(c),d=!u&&!l&&r(c),f=!u&&!l&&!d&&i(c),g=u||l||d||f,p=g?e(c.length,String):[],h=p.length;for(var m in c)!s&&!a.call(c,m)||g&&("length"==m||d&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||o(m,h))||p.push(m);return p}}function qe(){if(me)return he;me=1;var e=Object.prototype;return he=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function Ye(){if(ve)return be;return ve=1,be=function(e,t){return function(n){return e(t(n))}}}function Ze(){if(Ae)return we;Ae=1;var e=qe(),t=function(){if(Se)return ye;Se=1;var e=Ye()(Object.keys,Object);return ye=e}(),n=Object.prototype.hasOwnProperty;return we=function(r){if(!e(r))return t(r);var o=[];for(var i in Object(r))n.call(r,i)&&"constructor"!=i&&o.push(i);return o}}function Qe(){if(Oe)return ke;return Oe=1,ke=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}function Xe(){if(Ce)return Ie;Ce=1;var e=H(),t=Qe();return Ie=function(n){if(!t(n))return!1;var r=e(n);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}}function et(){if(Te)return Ne;Te=1;var e=Xe(),t=se();return Ne=function(n){return null!=n&&t(n.length)&&!e(n)}}function tt(){if(Le)return Be;Le=1;var e=$e(),t=Ze(),n=et();return Be=function(r){return n(r)?e(r):t(r)}}function nt(){if(xe)return _e;xe=1;var e=function(){if(Re)return Pe;Re=1;var e=j(),t=tt();return Pe=function(n,r){return n&&e(n,r,t)}}(),t=function(){if(De)return Je;De=1;var e=et();return Je=function(t,n){return function(r,o){if(null==r)return r;if(!e(r))return t(r,o);for(var i=r.length,a=n?i:-1,c=Object(r);(n?a--:++a<i)&&!1!==o(c[a],a,c););return r}},Je}(),n=t(e);return _e=n}function rt(){if(Ee)return Me;return Ee=1,Me=function(e){return e}}function ot(){if(Ve)return Ue;Ve=1;var e=F(),t=nt(),n=function(){if(je)return Fe;je=1;var e=rt();return Fe=function(t){return"function"==typeof t?t:e}}(),r=G();return Ue=function(o,i){return(r(o)?e:t)(o,n(i))}}var it,at,ct,st,ut,lt,dt,ft,gt,pt,ht,mt,bt,vt,yt,St,wt=E(He?ze:(He=1,ze=ot()));function At(){if(st)return ct;st=1;var e=function(){if(at)return it;at=1;var e=/\s/;return it=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n},it}(),t=/^\s+/;return ct=function(n){return n?n.slice(0,e(n)+1).replace(t,""):n}}function kt(){if(lt)return ut;lt=1;var e=H(),t=K();return ut=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==e(n)}}function Ot(){if(ft)return dt;ft=1;var e=At(),t=Qe(),n=kt(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt;return dt=function(c){if("number"==typeof c)return c;if(n(c))return NaN;if(t(c)){var s="function"==typeof c.valueOf?c.valueOf():c;c=t(s)?s+"":s}if("string"!=typeof c)return 0===c?c:+c;c=e(c);var u=o.test(c);return u||i.test(c)?a(c.slice(2),u?2:8):r.test(c)?NaN:+c}}function It(){if(mt)return ht;mt=1;var e=function(){if(pt)return gt;pt=1;var e=Ot(),t=1/0;return gt=function(n){return n?(n=e(n))===t||n===-1/0?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}();return ht=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}var Ct,Nt,Tt,Bt,Lt,Pt,Rt,Jt,Dt,_t,xt,Mt,Et,Ft,jt,Ut,Vt,zt,Ht,Kt,Wt,Gt,$t,qt,Yt,Zt,Qt,Xt,en,tn,nn,rn,on,an,cn,sn,un,ln,dn,fn,gn,pn,hn,mn,bn,vn,yn,Sn,wn,An,kn,On,In,Cn,Nn,Tn,Bn,Ln,Pn,Rn,Jn,Dn,_n,xn,Mn,En,Fn,jn,Un,Vn,zn,Hn,Kn,Wn,Gn,$n,qn,Yn,Zn=E(function(){if(St)return yt;St=1;var e=function(){if(vt)return bt;vt=1;var e=It();return bt=function(t,n){var r;if("function"!=typeof n)throw new TypeError("Expected a function");return t=e(t),function(){return--t>0&&(r=n.apply(this,arguments)),t<=1&&(n=void 0),r}},bt}();return yt=function(t){return e(2,t)}}());function Qn(){if(Bt)return Tt;return Bt=1,Tt=function(e,t){return e===t||e!=e&&t!=t}}function Xn(){if(Pt)return Lt;Pt=1;var e=Qn();return Lt=function(t,n){for(var r=t.length;r--;)if(e(t[r][0],n))return r;return-1}}function er(){if(Ut)return jt;Ut=1;var e=Nt?Ct:(Nt=1,Ct=function(){this.__data__=[],this.size=0}),t=function(){if(Jt)return Rt;Jt=1;var e=Xn(),t=Array.prototype.splice;return Rt=function(n){var r=this.__data__,o=e(r,n);return!(o<0||(o==r.length-1?r.pop():t.call(r,o,1),--this.size,0))},Rt}(),n=function(){if(_t)return Dt;_t=1;var e=Xn();return Dt=function(t){var n=this.__data__,r=e(n,t);return r<0?void 0:n[r][1]},Dt}(),r=function(){if(Mt)return xt;Mt=1;var e=Xn();return xt=function(t){return e(this.__data__,t)>-1}}(),o=function(){if(Ft)return Et;Ft=1;var e=Xn();return Et=function(t,n){var r=this.__data__,o=e(r,t);return o<0?(++this.size,r.push([t,n])):r[o][1]=n,this},Et}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,jt=i}function tr(){if(Xt)return Qt;Xt=1;var e,t=function(){if(Zt)return Yt;Zt=1;var e=V()["__core-js_shared__"];return Yt=e}(),n=(e=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"";return Qt=function(e){return!!n&&n in e}}function nr(){if(tn)return en;tn=1;var e=Function.prototype.toString;return en=function(t){if(null!=t){try{return e.call(t)}catch(e){}try{return t+""}catch(e){}}return""}}function rr(){if(sn)return cn;sn=1;var e=function(){if(rn)return nn;rn=1;var e=Xe(),t=tr(),n=Qe(),r=nr(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,c=i.toString,s=a.hasOwnProperty,u=RegExp("^"+c.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return nn=function(i){return!(!n(i)||t(i))&&(e(i)?u:o).test(r(i))}}(),t=an?on:(an=1,on=function(e,t){return null==e?void 0:e[t]});return cn=function(n,r){var o=t(n,r);return e(o)?o:void 0}}function or(){if(ln)return un;ln=1;var e=rr()(V(),"Map");return un=e}function ir(){if(fn)return dn;fn=1;var e=rr()(Object,"create");return dn=e}function ar(){if(On)return kn;On=1;var e=function(){if(pn)return gn;pn=1;var e=ir();return gn=function(){this.__data__=e?e(null):{},this.size=0}}(),t=mn?hn:(mn=1,hn=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}),n=function(){if(vn)return bn;vn=1;var e=ir(),t=Object.prototype.hasOwnProperty;return bn=function(n){var r=this.__data__;if(e){var o=r[n];return"__lodash_hash_undefined__"===o?void 0:o}return t.call(r,n)?r[n]:void 0}}(),r=function(){if(Sn)return yn;Sn=1;var e=ir(),t=Object.prototype.hasOwnProperty;return yn=function(n){var r=this.__data__;return e?void 0!==r[n]:t.call(r,n)}}(),o=function(){if(An)return wn;An=1;var e=ir();return wn=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=e&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,kn=i}function cr(){if(Ln)return Bn;Ln=1;var e=Tn?Nn:(Tn=1,Nn=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e});return Bn=function(t,n){var r=t.__data__;return e(n)?r["string"==typeof n?"string":"hash"]:r.map},Bn}function sr(){if(jn)return Fn;jn=1;var e=function(){if(Cn)return In;Cn=1;var e=ar(),t=er(),n=or();return In=function(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}}(),t=function(){if(Rn)return Pn;Rn=1;var e=cr();return Pn=function(t){var n=e(this,t).delete(t);return this.size-=n?1:0,n}}(),n=function(){if(Dn)return Jn;Dn=1;var e=cr();return Jn=function(t){return e(this,t).get(t)}}(),r=function(){if(xn)return _n;xn=1;var e=cr();return _n=function(t){return e(this,t).has(t)}}(),o=function(){if(En)return Mn;En=1;var e=cr();return Mn=function(t,n){var r=e(this,t),o=r.size;return r.set(t,n),this.size+=r.size==o?0:1,this}}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Fn=i}function ur(){if(Hn)return zn;Hn=1;var e=er(),t=function(){if(zt)return Vt;zt=1;var e=er();return Vt=function(){this.__data__=new e,this.size=0}}(),n=Kt?Ht:(Kt=1,Ht=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}),r=Gt?Wt:(Gt=1,Wt=function(e){return this.__data__.get(e)}),o=qt?$t:(qt=1,$t=function(e){return this.__data__.has(e)}),i=function(){if(Vn)return Un;Vn=1;var e=er(),t=or(),n=sr();return Un=function(r,o){var i=this.__data__;if(i instanceof e){var a=i.__data__;if(!t||a.length<199)return a.push([r,o]),this.size=++i.size,this;i=this.__data__=new n(a)}return i.set(r,o),this.size=i.size,this}}();function a(t){var n=this.__data__=new e(t);this.size=n.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,zn=a}function lr(){if(Wn)return Kn;Wn=1;var e=rr(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch(e){}}();return Kn=t}function dr(){if($n)return Gn;$n=1;var e=lr();return Gn=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function fr(){if(Yn)return qn;Yn=1;var e=dr(),t=Qn();return qn=function(n,r,o){(void 0!==o&&!t(n[r],o)||void 0===o&&!(r in n))&&e(n,r,o)}}var gr,pr,hr,mr,br,vr,yr,Sr,wr,Ar,kr,Or,Ir,Cr,Nr,Tr,Br,Lr,Pr,Rr,Jr,Dr,_r,xr,Mr,Er,Fr,jr,Ur,Vr,zr,Hr,Kr,Wr,Gr,$r,qr,Yr,Zr,Qr,Xr,eo,to,no,ro,oo,io,ao,co,so,uo,lo,fo,go,po,ho,mo,bo={exports:{}};function vo(){return gr||(gr=1,e=bo,t=bo.exports,n=V(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r?n.Buffer:void 0,a=i?i.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}),bo.exports;var e,t,n,r,o,i,a}function yo(){if(hr)return pr;hr=1;var e=V().Uint8Array;return pr=e}function So(){if(br)return mr;br=1;var e=yo();return mr=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function wo(){if(yr)return vr;yr=1;var e=So();return vr=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function Ao(){if(wr)return Sr;return wr=1,Sr=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},Sr}function ko(){if(Ir)return Or;Ir=1;var e=Ye()(Object.getPrototypeOf,Object);return Or=e}function Oo(){if(Nr)return Cr;Nr=1;var e=function(){if(kr)return Ar;kr=1;var e=Qe(),t=Object.create,n=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}();return Ar=n}(),t=ko(),n=qe();return Cr=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function Io(){if(Jr)return Rr;return Jr=1,Rr=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}}function Co(){if(_r)return Dr;_r=1;var e=dr(),t=Qn(),n=Object.prototype.hasOwnProperty;return Dr=function(r,o,i){var a=r[o];n.call(r,o)&&t(a,i)&&(void 0!==i||o in r)||e(r,o,i)}}function No(){if(Mr)return xr;Mr=1;var e=Co(),t=dr();return xr=function(n,r,o,i){var a=!o;o||(o={});for(var c=-1,s=r.length;++c<s;){var u=r[c],l=i?i(o[u],n[u],u,o,n):void 0;void 0===l&&(l=n[u]),a?t(o,u,l):e(o,u,l)}return o},xr}function To(){if(Ur)return jr;Ur=1;var e=Qe(),t=qe(),n=Fr?Er:(Fr=1,Er=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}),r=Object.prototype.hasOwnProperty;return jr=function(o){if(!e(o))return n(o);var i=t(o),a=[];for(var c in o)("constructor"!=c||!i&&r.call(o,c))&&a.push(c);return a}}function Bo(){if(zr)return Vr;zr=1;var e=$e(),t=To(),n=et();return Vr=function(r){return n(r)?e(r,!0):t(r)}}function Lo(){if(Gr)return Wr;Gr=1;var e=fr(),t=vo(),n=wo(),r=Ao(),o=Oo(),i=W(),a=G(),c=function(){if(Br)return Tr;Br=1;var e=et(),t=K();return Tr=function(n){return t(n)&&e(n)}}(),s=ae(),u=Xe(),l=Qe(),d=function(){if(Pr)return Lr;Pr=1;var e=H(),t=ko(),n=K(),r=Function.prototype,o=Object.prototype,i=r.toString,a=o.hasOwnProperty,c=i.call(Object);return Lr=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var s=a.call(o,"constructor")&&o.constructor;return"function"==typeof s&&s instanceof s&&i.call(s)==c}}(),f=Ge(),g=Io(),p=function(){if(Kr)return Hr;Kr=1;var e=No(),t=Bo();return Hr=function(n){return e(n,t(n))}}();return Wr=function(h,m,b,v,y,S,w){var A=g(h,b),k=g(m,b),O=w.get(k);if(O)e(h,b,O);else{var I=S?S(A,k,b+"",h,m,w):void 0,C=void 0===I;if(C){var N=a(k),T=!N&&s(k),B=!N&&!T&&f(k);I=k,N||T||B?a(A)?I=A:c(A)?I=r(A):T?(C=!1,I=t(k,!0)):B?(C=!1,I=n(k,!0)):I=[]:d(k)||i(k)?(I=A,i(A)?I=p(A):l(A)&&!u(A)||(I=o(k))):C=!1}C&&(w.set(k,I),y(I,k,v,S,w),w.delete(k)),e(h,b,I)}}}function Po(){if(Xr)return Qr;Xr=1;var e=Zr?Yr:(Zr=1,Yr=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}),t=Math.max;return Qr=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var i=arguments,a=-1,c=t(i.length-r,0),s=Array(c);++a<c;)s[a]=i[r+a];a=-1;for(var u=Array(r+1);++a<r;)u[a]=i[a];return u[r]=o(s),e(n,this,u)}},Qr}function Ro(){if(ro)return no;ro=1;var e=to?eo:(to=1,eo=function(e){return function(){return e}}),t=lr(),n=rt();return no=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function Jo(){if(co)return ao;co=1;var e=Ro(),t=function(){if(io)return oo;io=1;var e=Date.now;return oo=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},oo}(),n=t(e);return ao=n}function Do(){if(po)return go;po=1;var e=function(){if(uo)return so;uo=1;var e=rt(),t=Po(),n=Jo();return so=function(r,o){return n(t(r,o,e),r+"")}}(),t=function(){if(fo)return lo;fo=1;var e=Qn(),t=et(),n=ce(),r=Qe();return lo=function(o,i,a){if(!r(a))return!1;var c=typeof i;return!!("number"==c?t(a)&&n(i,a.length):"string"==c&&i in a)&&e(a[i],o)},lo}();return go=function(n){return e(function(e,r){var o=-1,i=r.length,a=i>1?r[i-1]:void 0,c=i>2?r[2]:void 0;for(a=n.length>3&&"function"==typeof a?(i--,a):void 0,c&&t(r[0],r[1],c)&&(a=i<3?void 0:a,i=1),e=Object(e);++o<i;){var s=r[o];s&&n(e,s,o,a)}return e})},go}var _o,xo,Mo,Eo,Fo,jo,Uo,Vo,zo,Ho,Ko,Wo,Go,$o,qo,Yo,Zo,Qo,Xo,ei,ti,ni,ri,oi,ii,ai,ci,si,ui,li,di,fi,gi,pi,hi,mi,bi,vi,yi,Si,wi,Ai,ki,Oi,Ii=function(){if(mo)return ho;mo=1;var e=function(){if(qr)return $r;qr=1;var e=ur(),t=fr(),n=j(),r=Lo(),o=Qe(),i=Bo(),a=Io();return $r=function c(s,u,l,d,f){s!==u&&n(u,function(n,i){if(f||(f=new e),o(n))r(s,u,i,l,c,d,f);else{var g=d?d(a(s,i),n,i+"",s,u,f):void 0;void 0===g&&(g=n),t(s,i,g)}},i)},$r}(),t=Do()(function(t,n,r){e(t,n,r)});return ho=t}(),Ci=E(Ii);function Ni(){if(xo)return _o;xo=1;var e=G(),t=kt(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;return _o=function(o,i){if(e(o))return!1;var a=typeof o;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=o&&!t(o))||(r.test(o)||!n.test(o)||null!=i&&o in Object(i))}}function Ti(){if(jo)return Fo;jo=1;var e=function(){if(Eo)return Mo;Eo=1;var e=sr();function t(n,r){if("function"!=typeof n||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var o=function(){var e=arguments,t=r?r.apply(this,e):e[0],i=o.cache;if(i.has(t))return i.get(t);var a=n.apply(this,e);return o.cache=i.set(t,a)||i,a};return o.cache=new(t.Cache||e),o}return t.Cache=e,Mo=t}();return Fo=function(t){var n=e(t,function(e){return 500===r.size&&r.clear(),e}),r=n.cache;return n}}function Bi(){if(Ho)return zo;return Ho=1,zo=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},zo}function Li(){if($o)return Go;$o=1;var e=function(){if(Wo)return Ko;Wo=1;var e=z(),t=Bi(),n=G(),r=kt(),o=e?e.prototype:void 0,i=o?o.toString:void 0;return Ko=function e(o){if("string"==typeof o)return o;if(n(o))return t(o,e)+"";if(r(o))return i?i.call(o):"";var a=o+"";return"0"==a&&1/o==-1/0?"-0":a},Ko}();return Go=function(t){return null==t?"":e(t)}}function Pi(){if(Yo)return qo;Yo=1;var e=G(),t=Ni(),n=function(){if(Vo)return Uo;Vo=1;var e=Ti(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(e){var r=[];return 46===e.charCodeAt(0)&&r.push(""),e.replace(t,function(e,t,o,i){r.push(o?i.replace(n,"$1"):t||e)}),r});return Uo=r}(),r=Li();return qo=function(o,i){return e(o)?o:t(o,i)?[o]:n(r(o))}}function Ri(){if(Qo)return Zo;Qo=1;var e=kt();return Zo=function(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}}function Ji(){if(ei)return Xo;ei=1;var e=Pi(),t=Ri();return Xo=function(n,r){for(var o=0,i=(r=e(r,n)).length;null!=n&&o<i;)n=n[t(r[o++])];return o&&o==i?n:void 0},Xo}function Di(){if(oi)return ri;oi=1;var e=Ji(),t=function(){if(ni)return ti;ni=1;var e=Co(),t=Pi(),n=ce(),r=Qe(),o=Ri();return ti=function(i,a,c,s){if(!r(i))return i;for(var u=-1,l=(a=t(a,i)).length,d=l-1,f=i;null!=f&&++u<l;){var g=o(a[u]),p=c;if("__proto__"===g||"constructor"===g||"prototype"===g)return i;if(u!=d){var h=f[g];void 0===(p=s?s(h,g,f):void 0)&&(p=r(h)?h:n(a[u+1])?[]:{})}e(f,g,p),f=f[g]}return i},ti}(),n=Pi();return ri=function(r,o,i){for(var a=-1,c=o.length,s={};++a<c;){var u=o[a],l=e(r,u);i(l,u)&&t(s,n(u,r),l)}return s},ri}function _i(){if(li)return ui;li=1;var e=ai?ii:(ai=1,ii=function(e,t){return null!=e&&t in Object(e)}),t=function(){if(si)return ci;si=1;var e=Pi(),t=W(),n=G(),r=ce(),o=se(),i=Ri();return ci=function(a,c,s){for(var u=-1,l=(c=e(c,a)).length,d=!1;++u<l;){var f=i(c[u]);if(!(d=null!=a&&s(a,f)))break;a=a[f]}return d||++u!=l?d:!!(l=null==a?0:a.length)&&o(l)&&r(f,l)&&(n(a)||t(a))},ci}();return ui=function(n,r){return null!=n&&t(n,r,e)}}function xi(){if(pi)return gi;return pi=1,gi=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},gi}function Mi(){if(vi)return bi;vi=1;var e=xi(),t=function(){if(mi)return hi;mi=1;var e=z(),t=W(),n=G(),r=e?e.isConcatSpreadable:void 0;return hi=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}();return bi=function n(r,o,i,a,c){var s=-1,u=r.length;for(i||(i=t),c||(c=[]);++s<u;){var l=r[s];o>0&&i(l)?o>1?n(l,o-1,i,a,c):e(c,l):a||(c[c.length]=l)}return c},bi}function Ei(){if(Ai)return wi;Ai=1;var e=function(){if(Si)return yi;Si=1;var e=Mi();return yi=function(t){return null!=t&&t.length?e(t,1):[]}}(),t=Po(),n=Jo();return wi=function(r){return n(t(r,void 0,e),r+"")}}var Fi,ji,Ui,Vi,zi=function(){if(Oi)return ki;Oi=1;var e=function(){if(fi)return di;fi=1;var e=Di(),t=_i();return di=function(n,r){return e(n,r,function(e,r){return t(n,r)})}}(),t=Ei()(function(t,n){return null==t?{}:e(t,n)});return ki=t}(),Hi=E(zi);function Ki(){if(Vi)return Ui;Vi=1;var e=Qe(),t=function(){if(ji)return Fi;ji=1;var e=V();return Fi=function(){return e.Date.now()}}(),n=Ot(),r=Math.max,o=Math.min;return Ui=function(i,a,c){var s,u,l,d,f,g,p=0,h=!1,m=!1,b=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function v(e){var t=s,n=u;return s=u=void 0,p=e,d=i.apply(n,t)}function y(e){var t=e-g;return void 0===g||t>=a||t<0||m&&e-p>=l}function S(){var e=t();if(y(e))return w(e);f=setTimeout(S,function(e){var t=a-(e-g);return m?o(t,l-(e-p)):t}(e))}function w(e){return f=void 0,b&&s?v(e):(s=u=void 0,d)}function A(){var e=t(),n=y(e);if(s=arguments,u=this,g=e,n){if(void 0===f)return function(e){return p=e,f=setTimeout(S,a),h?v(e):d}(g);if(m)return clearTimeout(f),f=setTimeout(S,a),v(g)}return void 0===f&&(f=setTimeout(S,a)),d}return a=n(a)||0,e(c)&&(h=!!c.leading,l=(m="maxWait"in c)?r(n(c.maxWait)||0,a):l,b="trailing"in c?!!c.trailing:b),A.cancel=function(){void 0!==f&&clearTimeout(f),p=0,s=g=u=f=void 0},A.flush=function(){return void 0===f?d:w(t())},A},Ui}var Wi,Gi,$i=E(Ki());var qi,Yi,Zi=E(function(){if(Gi)return Wi;Gi=1;var e=It();return Wi=function(t,n){if("function"!=typeof n)throw new TypeError("Expected a function");return t=e(t),function(){if(--t<1)return n.apply(this,arguments)}}}());var Qi,Xi,ea,ta,na,ra,oa,ia,aa,ca,sa,ua,la,da,fa,ga,pa,ha,ma,ba,va,ya,Sa,wa,Aa,ka,Oa,Ia,Ca,Na,Ta,Ba,La,Pa,Ra,Ja,Da,_a,xa,Ma,Ea,Fa,ja,Ua,Va,za,Ha,Ka,Wa,Ga,$a,qa,Ya,Za,Qa,Xa,ec,tc,nc,rc,oc,ic,ac,cc,sc,uc,lc,dc,fc,gc,pc=function(){if(Yi)return qi;Yi=1;var e=Ki(),t=Qe();return qi=function(n,r,o){var i=!0,a=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(o)&&(i="leading"in o?!!o.leading:i,a="trailing"in o?!!o.trailing:a),e(n,r,{leading:i,maxWait:r,trailing:a})}}(),hc=E(pc);function mc(){if(Xi)return Qi;return Xi=1,Qi=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i},Qi}function bc(){if(ca)return aa;ca=1;var e=sr(),t=ra?na:(ra=1,na=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}),n=ia?oa:(ia=1,oa=function(e){return this.__data__.has(e)});function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,aa=r}function vc(){if(ga)return fa;ga=1;var e=bc(),t=(ua||(ua=1,sa=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}),sa),n=da?la:(da=1,la=function(e,t){return e.has(t)});return fa=function(r,o,i,a,c,s){var u=1&i,l=r.length,d=o.length;if(l!=d&&!(u&&d>l))return!1;var f=s.get(r),g=s.get(o);if(f&&g)return f==o&&g==r;var p=-1,h=!0,m=2&i?new e:void 0;for(s.set(r,o),s.set(o,r);++p<l;){var b=r[p],v=o[p];if(a)var y=u?a(v,b,p,o,r,s):a(b,v,p,r,o,s);if(void 0!==y){if(y)continue;h=!1;break}if(m){if(!t(o,function(e,t){if(!n(m,t)&&(b===e||c(b,e,i,a,s)))return m.push(t)})){h=!1;break}}else if(b!==v&&!c(b,v,i,a,s)){h=!1;break}}return s.delete(r),s.delete(o),h},fa}function yc(){if(ya)return va;ya=1;var e=z(),t=yo(),n=Qn(),r=vc(),o=(ha||(ha=1,pa=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}),pa),i=(ba||(ba=1,ma=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}),ma),a=e?e.prototype:void 0,c=a?a.valueOf:void 0;return va=function(e,a,s,u,l,d,f){switch(s){case"[object DataView]":if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=a.byteLength||!d(new t(e),new t(a)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+a);case"[object Error]":return e.name==a.name&&e.message==a.message;case"[object RegExp]":case"[object String]":return e==a+"";case"[object Map]":var g=o;case"[object Set]":var p=1&u;if(g||(g=i),e.size!=a.size&&!p)return!1;var h=f.get(e);if(h)return h==a;u|=2,f.set(e,a);var m=r(g(e),g(a),u,l,d,f);return f.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(a)}return!1}}function Sc(){if(wa)return Sa;wa=1;var e=xi(),t=G();return Sa=function(n,r,o){var i=r(n);return t(n)?i:e(i,o(n))}}function wc(){if(ka)return Aa;return ka=1,Aa=function(){return[]}}function Ac(){if(Ia)return Oa;Ia=1;var e=mc(),t=wc(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Oa=r?function(t){return null==t?[]:(t=Object(t),e(r(t),function(e){return n.call(t,e)}))}:t}function kc(){if(Na)return Ca;Na=1;var e=Sc(),t=Ac(),n=tt();return Ca=function(r){return e(r,n,t)}}function Oc(){if(Fa)return Ea;Fa=1;var e=function(){if(Pa)return La;Pa=1;var e=rr()(V(),"DataView");return La=e}(),t=or(),n=function(){if(Ja)return Ra;Ja=1;var e=rr()(V(),"Promise");return Ra=e}(),r=function(){if(_a)return Da;_a=1;var e=rr()(V(),"Set");return Da=e}(),o=function(){if(Ma)return xa;Ma=1;var e=rr()(V(),"WeakMap");return xa=e}(),i=H(),a=nr(),c="[object Map]",s="[object Promise]",u="[object Set]",l="[object WeakMap]",d="[object DataView]",f=a(e),g=a(t),p=a(n),h=a(r),m=a(o),b=i;return(e&&b(new e(new ArrayBuffer(1)))!=d||t&&b(new t)!=c||n&&b(n.resolve())!=s||r&&b(new r)!=u||o&&b(new o)!=l)&&(b=function(e){var t=i(e),n="[object Object]"==t?e.constructor:void 0,r=n?a(n):"";if(r)switch(r){case f:return d;case g:return c;case p:return s;case h:return u;case m:return l}return t}),Ea=b}function Ic(){if(Ua)return ja;Ua=1;var e=ur(),t=vc(),n=yc(),r=function(){if(Ba)return Ta;Ba=1;var e=kc(),t=Object.prototype.hasOwnProperty;return Ta=function(n,r,o,i,a,c){var s=1&o,u=e(n),l=u.length;if(l!=e(r).length&&!s)return!1;for(var d=l;d--;){var f=u[d];if(!(s?f in r:t.call(r,f)))return!1}var g=c.get(n),p=c.get(r);if(g&&p)return g==r&&p==n;var h=!0;c.set(n,r),c.set(r,n);for(var m=s;++d<l;){var b=n[f=u[d]],v=r[f];if(i)var y=s?i(v,b,f,r,n,c):i(b,v,f,n,r,c);if(!(void 0===y?b===v||a(b,v,o,i,c):y)){h=!1;break}m||(m="constructor"==f)}if(h&&!m){var S=n.constructor,w=r.constructor;S==w||!("constructor"in n)||!("constructor"in r)||"function"==typeof S&&S instanceof S&&"function"==typeof w&&w instanceof w||(h=!1)}return c.delete(n),c.delete(r),h},Ta}(),o=Oc(),i=G(),a=ae(),c=Ge(),s="[object Arguments]",u="[object Array]",l="[object Object]",d=Object.prototype.hasOwnProperty;return ja=function(f,g,p,h,m,b){var v=i(f),y=i(g),S=v?u:o(f),w=y?u:o(g),A=(S=S==s?l:S)==l,k=(w=w==s?l:w)==l,O=S==w;if(O&&a(f)){if(!a(g))return!1;v=!0,A=!1}if(O&&!A)return b||(b=new e),v||c(f)?t(f,g,p,h,m,b):n(f,g,S,p,h,m,b);if(!(1&p)){var I=A&&d.call(f,"__wrapped__"),C=k&&d.call(g,"__wrapped__");if(I||C){var N=I?f.value():f,T=C?g.value():g;return b||(b=new e),m(N,T,p,h,b)}}return!!O&&(b||(b=new e),r(f,g,p,h,m,b))}}function Cc(){if(za)return Va;za=1;var e=Ic(),t=K();return Va=function n(r,o,i,a,c){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,i,a,n,c))},Va}function Nc(){if(Ga)return Wa;Ga=1;var e=Qe();return Wa=function(t){return t==t&&!e(t)}}function Tc(){if(Za)return Ya;return Za=1,Ya=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function Bc(){if(Xa)return Qa;Xa=1;var e=function(){if(Ka)return Ha;Ka=1;var e=ur(),t=Cc();return Ha=function(n,r,o,i){var a=o.length,c=a,s=!i;if(null==n)return!c;for(n=Object(n);a--;){var u=o[a];if(s&&u[2]?u[1]!==n[u[0]]:!(u[0]in n))return!1}for(;++a<c;){var l=(u=o[a])[0],d=n[l],f=u[1];if(s&&u[2]){if(void 0===d&&!(l in n))return!1}else{var g=new e;if(i)var p=i(d,f,l,n,r,g);if(!(void 0===p?t(f,d,3,i,g):p))return!1}}return!0},Ha}(),t=function(){if(qa)return $a;qa=1;var e=Nc(),t=tt();return $a=function(n){for(var r=t(n),o=r.length;o--;){var i=r[o],a=n[i];r[o]=[i,a,e(a)]}return r}}(),n=Tc();return Qa=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function Lc(){if(rc)return nc;rc=1;var e=Cc(),t=function(){if(tc)return ec;tc=1;var e=Ji();return ec=function(t,n,r){var o=null==t?void 0:e(t,n);return void 0===o?r:o}}(),n=_i(),r=Ni(),o=Nc(),i=Tc(),a=Ri();return nc=function(c,s){return r(c)&&o(s)?i(a(c),s):function(r){var o=t(r,c);return void 0===o&&o===s?n(r,c):e(s,o,3)}}}function Pc(){if(uc)return sc;uc=1;var e=ic?oc:(ic=1,oc=function(e){return function(t){return null==t?void 0:t[e]}}),t=function(){if(cc)return ac;cc=1;var e=Ji();return ac=function(t){return function(n){return e(n,t)}}}(),n=Ni(),r=Ri();return sc=function(o){return n(o)?e(r(o)):t(o)}}function Rc(){if(dc)return lc;dc=1;var e=Bc(),t=Lc(),n=rt(),r=G(),o=Pc();return lc=function(i){return"function"==typeof i?i:null==i?n:"object"==typeof i?r(i)?t(i[0],i[1]):e(i):o(i)}}var Jc,Dc,_c,xc,Mc=function(){if(gc)return fc;gc=1;var e=mc(),t=function(){if(ta)return ea;ta=1;var e=nt();return ea=function(t,n){var r=[];return e(t,function(e,t,o){n(e,t,o)&&r.push(e)}),r},ea}(),n=Rc(),r=G();return fc=function(o,i){return(r(o)?e:t)(o,n(i,3))}}(),Ec=E(Mc),Fc=E(Pc());var jc,Uc,Vc,zc,Hc,Kc,Wc,Gc,$c,qc,Yc,Zc,Qc,Xc,es,ts,ns,rs,os,is,as,cs,ss,us,ls,ds,fs,gs,ps,hs,ms,bs,vs,ys,Ss=function(){if(xc)return _c;xc=1;var e=Bi(),t=Rc(),n=function(){if(Dc)return Jc;Dc=1;var e=nt(),t=et();return Jc=function(n,r){var o=-1,i=t(n)?Array(n.length):[];return e(n,function(e,t,n){i[++o]=r(e,t,n)}),i},Jc}(),r=G();return _c=function(o,i){return(r(o)?e:n)(o,t(i,3))}}();function ws(){if(Gc)return Wc;Gc=1;var e=xi(),t=ko(),n=Ac(),r=wc(),o=Object.getOwnPropertySymbols;return Wc=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function As(){if(cs)return as;cs=1;var e=So(),t=function(){if(ts)return es;ts=1;var e=So();return es=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}(),n=function(){if(rs)return ns;rs=1;var e=/\w*$/;return ns=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}(),r=function(){if(is)return os;is=1;var e=z(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return os=function(e){return n?Object(n.call(e)):{}}}(),o=wo();return as=function(i,a,c){var s=i.constructor;switch(a){case"[object ArrayBuffer]":return e(i);case"[object Boolean]":case"[object Date]":return new s(+i);case"[object DataView]":return t(i,c);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(i,c);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(i);case"[object RegExp]":return n(i);case"[object Symbol]":return r(i)}}}function ks(){if(ds)return ls;ds=1;var e=function(){if(us)return ss;us=1;var e=Oc(),t=K();return ss=function(n){return t(n)&&"[object Map]"==e(n)}}(),t=ue(),n=We(),r=n&&n.isMap,o=r?t(r):e;return ls=o}function Os(){if(hs)return ps;hs=1;var e=function(){if(gs)return fs;gs=1;var e=Oc(),t=K();return fs=function(n){return t(n)&&"[object Set]"==e(n)}}(),t=ue(),n=We(),r=n&&n.isSet,o=r?t(r):e;return ps=o}function Is(){if(bs)return ms;bs=1;var e=ur(),t=F(),n=Co(),r=function(){if(Uc)return jc;Uc=1;var e=No(),t=tt();return jc=function(n,r){return n&&e(r,t(r),n)}}(),o=function(){if(zc)return Vc;zc=1;var e=No(),t=Bo();return Vc=function(n,r){return n&&e(r,t(r),n)}}(),i=vo(),a=Ao(),c=function(){if(Kc)return Hc;Kc=1;var e=No(),t=Ac();return Hc=function(n,r){return e(n,t(n),r)}}(),s=function(){if(qc)return $c;qc=1;var e=No(),t=ws();return $c=function(n,r){return e(n,t(n),r)}}(),u=kc(),l=function(){if(Zc)return Yc;Zc=1;var e=Sc(),t=ws(),n=Bo();return Yc=function(r){return e(r,n,t)}}(),d=Oc(),f=function(){if(Xc)return Qc;Xc=1;var e=Object.prototype.hasOwnProperty;return Qc=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}(),g=As(),p=Oo(),h=G(),m=ae(),b=ks(),v=Qe(),y=Os(),S=tt(),w=Bo(),A="[object Arguments]",k="[object Function]",O="[object Object]",I={};return I[A]=I["[object Array]"]=I["[object ArrayBuffer]"]=I["[object DataView]"]=I["[object Boolean]"]=I["[object Date]"]=I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Map]"]=I["[object Number]"]=I[O]=I["[object RegExp]"]=I["[object Set]"]=I["[object String]"]=I["[object Symbol]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I["[object Error]"]=I[k]=I["[object WeakMap]"]=!1,ms=function C(N,T,B,L,P,R){var J,D=1&T,_=2&T,x=4&T;if(B&&(J=P?B(N,L,P,R):B(N)),void 0!==J)return J;if(!v(N))return N;var M=h(N);if(M){if(J=f(N),!D)return a(N,J)}else{var E=d(N),F=E==k||"[object GeneratorFunction]"==E;if(m(N))return i(N,D);if(E==O||E==A||F&&!P){if(J=_||F?{}:p(N),!D)return _?s(N,o(J,N)):c(N,r(J,N))}else{if(!I[E])return P?N:{};J=g(N,E,D)}}R||(R=new e);var j=R.get(N);if(j)return j;R.set(N,J),y(N)?N.forEach(function(e){J.add(C(e,T,B,e,N,R))}):b(N)&&N.forEach(function(e,t){J.set(t,C(e,T,B,t,N,R))});var U=M?void 0:(x?_?l:u:_?w:S)(N);return t(U||N,function(e,t){U&&(e=N[t=e]),n(J,t,C(e,T,B,t,N,R))}),J},ms}const Cs={each:wt,once:Zn,merge:Ci,pick:Hi,debounce:$i,after:Zi,throttle:hc,filter:Ec,property:Fc,map:E(Ss),cloneDeep:E(function(){if(ys)return vs;ys=1;var e=Is();return vs=function(t){return e(t,5)}}())};function Ns(e,t){return function(e,t,n){return void 0===n&&(n=console.log),function(){n(`[${e}] ${t}`,Array.prototype.slice.call(arguments))}}(e,t,console.warn)}function Ts(e){const t=Ns("NOT_IMPL",e);return t.NOT_IMPL=!0,t}const Bs={$SHIM_REGISTRY:{},$SHIM_MAP:{}};function Ls(e,t,n){void 0===n&&(n=e.exports),void 0===t&&(t={}),Cs.each(n,function(n){let r=t[n];void 0===r&&(r=Ts("function not impl: "+n)),Bs.checkImpl(t,n),e.methods[n]=r}),e.methods["__proxy_"+e.name]=t}function Ps(e,t){const n={name:e,methods:{},exports:t},r="__proxy_"+e;n.methods[r]=void 0,Cs.each(t,function(e){n[e]=function(){const t=n.methods[r];return n.methods[e].apply(t||this,arguments)}}),a(e,function(){return n.methods});return a(Bs.getConfigureOfShim(e),function(){return{wire:function(e,t){Ls(n,e,t)},getFnList:function(){return n.exports}}}),Bs.$SHIM_MAP[e]=n,{name:e,exportable:function(t){return Bs.exportable(e,t)}}}Bs.makeShim=function(e,t,n){if(void 0===e.exports)throw"error when make "+t+", shim exports undefined";void 0===n&&(n={}),e.methods=n,e.$get=function(){return e.methods},e.wire=function(t,n){Ls(e,t,n)},Bs.$SHIM_REGISTRY[t]||(Bs.$SHIM_REGISTRY[t]=void 0)},Bs.getConfigureOfShim=function(e){return e+"Configure"},Bs.exportable=function(e,t){const n={};return n[e=e.name||e]=t,Bs.$SHIM_REGISTRY[e]=t,n},Bs.checkImpl=function(e,t){return!!e&&(void 0!==e[t]&&(!e[t].NOT_IMPL||!!e[t].LAZY))},Bs.link=function(e){const t={},n=Bs.$SHIM_REGISTRY;return e&&Cs.merge(n,e),Cs.each(n,function(e,n){const r=c(Bs.getConfigureOfShim(n));let o=e?c(e):void 0;o={name:e,...o},r.wire(o);const i=c(n);Cs.merge(t,i)}),t},a("$BRIDGEKIT",function(){return Bs});const Rs=Cs.once(function(){return void 0!==window.BOTBridge});function Js(){Rs()?(t("setup interface BOTBridge"),s("bridgeAdapterJSInterface",window.BOTBridge)):s("bridgeAdapterJSInterface",void 0)}var Ds=Object.freeze({__proto__:null,checker:Rs,name:"bridgeAdapterJSInterface",setup:Js});const _s=window.navigator.userAgent,xs=/(iOS|Android)MPAdapter\/(\d+(\.?\d*))(\(.*\)|\/.*)?/.exec(_s),Ms=xs?xs[1]:"unknown",Es=xs?1*xs[2]:-1,Fs=xs?xs[4]:"",js=!!window.BOTBridge;let Us=!0;const Vs=function(){return!("iOS"===Ms&&Es>=1)&&("Android"===Ms&&Es>=1?Us:!js&&"botmpx:"===window.location.protocol)};let zs=0;const Hs=function(){return t("LazyLoad-BOTBridgeeeee",zs),zs++>80&&(Us=!1),!!window.BOTBridge};function Ks(){if(!Vs())return void s("bridgeAdapterLazyJSInterface",void 0);n("setup LAZY interface BOTBridge");const e={};e.isReady=Hs,Cs.each(Bs.$SHIM_REGISTRY,function(t,r){const o="get"+r,i={};i["lazy"+r]=!1;let a=!1;const c=Bs.$SHIM_MAP[r].exports,s=e[o]=function(){if(!window.BOTBridge||a)return i;let e=o;"Storage"===r&&!window.BOTBridge[o]&&window.BOTBridge.getLocalStorage&&(e="getLocalStorage");const t=window.BOTBridge[e];if(!t)return i;const n={},s=t.apply(window.BOTBridge);return Cs.each(c,function(e){const t=s[e];"function"==typeof t?n[e]=function(){return t.apply(s,arguments)}:i[e]&&(i[e].LAZY=!1)}),Cs.merge(i,n),a=!0,i};Cs.each(c,function(e){i[e]=function(){s();const t=i[e];return a&&t&&!t.NOT_IMPL?t.apply(this,arguments):void n("error calling a lazy load method "+r+"."+e+", not "+(i[e].LAZY?"loaded":"impl"))},i[e].NOT_IMPL=!0,i[e].LAZY=!0})}),Cs.each(["wakeup","getAPILevel","getAppJson"],function(t){e[t]=function(){if(window.BOTBridge&&window.BOTBridge[t])return window.BOTBridge[t]()}}),e.overrideMethod=function(e,t){if(!window.BOTBridge)throw"sync override method "+e+" failed, entry is null";void 0!==window.BOTBridge[e]?n("BOTBridge."+e+" occupied, can not override"):window.BOTBridge[e]=t},s("bridgeAdapterLazyJSInterface",e)}var Ws=Object.freeze({__proto__:null,checker:Vs,isReady:Hs,name:"bridgeAdapterLazyJSInterface",setup:Ks});const Gs=!!window.BOTBridge,$s=Cs.once(function(){return!Gs&&("iOS"===Ms&&Es>=1&&/usePrompt/.test(Fs))}),qs=function(){return $s()};function Ys(e,n){const r=n||"BOTbridge";return function(){const n=Array.from(arguments),o={type:r,functionName:e,arguments:n};t("proxyCaller prompt "+e,o);let i=prompt(JSON.stringify(o));return i&&(i=JSON.parse(i)),i instanceof Array&&(i=i[0]),i}}function Zs(){if(!$s())return void s("bridgeAdapterPromptIntercept",void 0);n("setup PromptIntercept proxy BOTBridge");const e={};e.isReady=qs,Cs.each(Bs.$SHIM_REGISTRY,function(t,r){const o="get"+r,i={};i["lazy"+r]=!1;let a=!1;const c=Bs.$SHIM_MAP[r].exports,s=e[o]=function(){if(a)return i;const e={},t={};return Cs.each(c,function(n){const o=Ys(n,r);e[n]=function(){return o.apply(t,arguments)}}),Cs.merge(i,e),a=!0,i};Cs.each(c,function(e){i[e]=function(){s();const t=i[e];return a&&t&&!t.NOT_IMPL?t.apply(this,arguments):void n("error calling a lazy load method "+r+"."+e+", not "+(i[e].LAZY?"loaded":"impl"))},i[e].NOT_IMPL=!0,i[e].LAZY=!0})}),Cs.each(["wakeup","getAPILevel","getAppJson"],function(t){e[t]=Ys(t)}),s("bridgeAdapterPromptIntercept",e)}var Qs=Object.freeze({__proto__:null,checker:$s,isReady:qs,name:"bridgeAdapterPromptIntercept",setup:Zs});const Xs=!!window.BOTBridge,eu=Cs.once(function(){return!Xs&&!!("iOS"===Ms&&Es>=1&&/mixPMPrompt|usePostMessage/.test(Fs))}),tu=function(){return eu()&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.BOTbridge};function nu(e,n){const r=n||"BOTbridge";return/mixPMPrompt/.test(Fs)&&function(e){if(/^(is.*|.*Sync)$/.test(e))return!0;switch(e){case"getAppJson":case"getAPILevel":case"getPublicNavigateUrl":case"getClientInfo":return!0}return!1}(e)?function(){const n=Array.from(arguments),o={type:r,functionName:e,arguments:n};t("proxyCaller mix prompt "+e,o);let i=prompt(JSON.stringify(o));return i&&(i=JSON.parse(i)),i instanceof Array&&(i=i[0]),i}:function(){const n=Array.from(arguments),o={functionName:e,arguments:n};t("proxyCaller messageHandlers "+r+"."+e,o),window.webkit.messageHandlers[r].postMessage(o)}}function ru(){if(!eu())return void s("bridgeAdapterWebkitPostMessage",void 0);n("setup WebView JavaScript Bridge");const e={};e.isReady=tu,Cs.each(Bs.$SHIM_REGISTRY,function(t,r){const o="get"+r,i={};i["lazy"+r]=!1;let a=!1;const c=Bs.$SHIM_MAP[r].exports,s=e[o]=function(){if(a)return i;const e={},t={};return Cs.each(c,function(n){const o=nu(n,r);e[n]=function(){return o.apply(t,arguments)}}),Cs.merge(i,e),a=!0,i};Cs.each(c,function(e){i[e]=function(){s();const t=i[e];return a&&t&&!t.NOT_IMPL?t.apply(this,arguments):void n("error calling a lazy load method "+r+"."+e+", not "+(i[e].LAZY?"loaded":"impl"))},i[e].NOT_IMPL=!0,i[e].LAZY=!0})}),Cs.each(["wakeup","getAPILevel","getAppJson"],function(t){e[t]=nu(t)}),s("bridgeAdapterWebkitPostMessage",e)}const ou=[Ds,Ws,Qs,Object.freeze({__proto__:null,checker:eu,isReady:tu,name:"bridgeAdapterWebkitPostMessage",setup:ru})];function iu(e){if("browser"!==(e||"bridge"))for(let e=0;e<ou.length;e++){const t=ou[e];if(t.checker())return t}}let au;const cu=new Uint8Array(16);function su(){if(!au&&(au="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!au))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return au(cu)}const uu=[];for(let e=0;e<256;++e)uu.push((e+256).toString(16).slice(1));var lu={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function du(e,t,n){if(lu.randomUUID&&!e)return lu.randomUUID();const r=(e=e||{}).random||(e.rng||su)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return uu[e[t+0]]+uu[e[t+1]]+uu[e[t+2]]+uu[e[t+3]]+"-"+uu[e[t+4]]+uu[e[t+5]]+"-"+uu[e[t+6]]+uu[e[t+7]]+"-"+uu[e[t+8]]+uu[e[t+9]]+"-"+uu[e[t+10]]+uu[e[t+11]]+uu[e[t+12]]+uu[e[t+13]]+uu[e[t+14]]+uu[e[t+15]]}(r)}function fu(){a("bridgeCallback",function(){const e=c("BOTBridge"),o={},i="__fn_null";o.emptyCallback=i;const a={},s={};function u(){return"__cb_"+du().replace(/-/g,"")}function l(e){if(e===i)return!0;const t=a[e];if(!t)return;let n=0;return Cs.each(t,function(e){e&&n++}),!n&&(a[e]=void 0,!0)}o.build=function(e,t){return function({success:e,fail:t,complete:n},r){void 0===r&&(r=u());const o={success:e,fail:t,complete:n||function(){}};return a[r]=o,l(r)?i:r}(e||{},t)},o.buildDataCallback=function(e,t){const{success:n,fail:i,complete:a}=e||{};return o.build({success:function(e){if(n){try{e.data&&(e.data=JSON.parse(e.data))}catch(e){r("e")}return n(e)}},fail:i,complete:function(e){if(a)return e.data&&void 0===e.error&&(e.data=JSON.parse(e.data)),a(e)}},t)},o.hint=function(e){e=function(e){let t="";for(let n=0;n<e.length;n++)e[n]>="A"&&e[n]<="z"&&(t+=e[n]);return t}(e);const t=u();return t.substring(0,5)+e.substring(0,12)+"_"+t.substring(t.length-5-12-1)},o.invoke=function(e,r,o){if(e===i)return;if("publish"===r){if(t("call "+r+" "+e,[o,s[e]]),void 0===s[e])return;return void Cs.each(s[e],function(e){e&&setTimeout(function(){e.apply(void 0,o||[])},0)})}const c=a[e];if(!c)return void n("?? "+r+" "+e,o);const u=c[r];u?(c[r]=void 0,t("call "+r+" "+e,[u,o]),setTimeout(function(){u.apply(void 0,o||[])},0),l(e)):l(e)},o.subscribe=function(e,t){void 0===s[e]&&(s[e]={}),s[e][t]=t};const d=function(e,t,n){o.invoke(e,t,n)};if(void 0!==e()){const t=e();t.overrideMethod?t.overrideMethod("callback",d):t.callback=d}return window.BOTBridgeCallback=d,o})}var gu=Ps("Advertisement",["createFloatingAd","onFloatingAdLoad","onFloatingAdError","onFloatingAdClose","onFloatingAdClick","showFloatingAd","hiddenFloatingAd","createRewardedAd","setRewardedAdListener","loadRewardedAd","showRewardedAd","createNativeAd","setNativeAdListeners","loadNativeAd","showNativeAd","destroyNativeAd","hiddenNativeAds","visibleNativeAds","loadCustomAd","showCustomAd","destroyCustomAd","hiddenCustomAds","visibleCustomAds"]);var pu=Ps("Camera",["scanCode","getOcrResultFromCamera","getOcrResultFromGallery"]);var hu=Ps("Contact",["getContact","chooseContact","getContacts","chooseContacts","chooseGroups"]);var mu=Ps("Device",["vibrateShort","vibrateLong","setClipboardData","getClipboardData","onKeyboardPop","allowContentOffSet","setKeepScreenOn"]);var bu=Ps("File",["chooseImage","uploadImage","onImageProgressUpdate","onImageUpdateStatus","chooseFile","uploadFile","cancelUploadFile","setFileUpdateListener","downloadFile","cancelDownloadFile","setFileDownloadListener","loadResource","openDocument","saveFile"]);var vu=Ps("Location",["getLocation","operateCompass","compassChange","onCompassChange","getMapData","getStaticMap","openNavigationPage"]);var yu=Ps("Media",["playVoice","stopVoice","saveImageToPhotosAlbum"]);var Su=Ps("OfficialAccount",["setSubscription","getSubscription","getMuteStatus","setMuteStatus","getNewsLetterStatus","setNewsLetterStatus"]);var wu=Ps("Pay",["requestPayment","setUpCashier","applyConsumeDiamond","consumeDiamonds"]);function Au(){a("bridgeBrowserPay",function(){var e={},t="pay bridge not available on browser";return e.requestPayment=Ts(t),e.setUpCashier=Ts(t),e.applyConsumeDiamond=Ts(t),e}),wu.exportable("bridgeBrowserPay")}var ku=Ps("PayBySDK",["paybyOpenUrl","paybyGetDefaultPaymentMethod","paybyGetLatestPaymentMethod","paybyChoosePaymentMethod","paybyToPay"]);var Ou=Ps("RTCSDK",["newRTC","initEngine","isInited","destroyEngine","updateToken","joinRoom","leaveRoom","changeAudioDevice","getAudioDevice","enableLocalAudio","enableLocalVideo","muteLocalAudioStream","muteLocalVideoStream","muteRemoteAudioStream","muteRemoteVideoStream","muteAllRemoteAudioStream","muteAllRemoteVideoStream","switchCamera","setupVideo","sendAppMessage","getSpeakingLevel","getSdkVersion","setBackgroundImage","getNetworkState","getConnectState","showDebugView","getVoipState","updateConfiguration","pauseStream","resumeStream","sendAppSignal","getRoomInfo","getAllPluginTools","callPluginTool","addRtcEventListener"]);var Iu=Ps("Share",["share","shareContent","shareCustomizeCard","disableShare","shareText","shareFile"]);function Cu(){a("bridgeBrowserShare",function(){var e={},t="share bridge not available on browser";return e.share=Ts(t),e.shareContent=Ts(t),e.shareCustomizeCard=Ts(t),e.disableShare=function(){},e.shareText=Ts(t),e.shareFile=Ts(t),e}),Iu.exportable("bridgeBrowserShare")}var Nu=Ps("SolarSDK",["newSolar","solarLoginApp","solarJoinRoom","solarLeaveRoom","solarAudioActive","solarVideoActive","solarSwitchSpeaker","solarLogout","solarMuteRemoteAudioStream","solarChangeRemoteVideoStream","solarVideoHDAvailable","solarVideoHDType","solarSwitchHD","solarSwitchLD","solarSwitchCamera","solarSendAppMessage","addSolarEngineListener","addSolarEventListener","solarMicEnable","getSolarLifeCycle","solarSetupVideo","solarApplyMic","solarCancelMic","solarConfirmApplyMic","solarInviteMic","solarCancelInviting","solarInviteConfirm","solarKickoutMic","solarLayDownMic"]);var Tu=Ps("TitleBar",["setTitleBarBackButton","clearTitleBar","setTitleBarText","setTitleBarTextColor","setTitleBarBgColor","setTitleBarRightTextButton","setTitleBarMoreMenu","setTitleBarStyle","setTitleBar"]);function Bu(){a("bridgeBrowserTitleBar",function(){var e={},t="titlebar bridge not available on browser";return e.setTitleBarBackButton=Ts(t),e.clearTitleBar=Ts(t),e.setTitleBarText=Ts(t),e.setTitleBarTextColor=Ts(t),e.setTitleBarBgColor=Ts(t),e.setTitleBarStyle=Ts(t),e.setTitleBarRightTextButton=Ts(t),e.setTitleBarMoreMenu=Ts(t),e.setTitleBar=Ts(t),e}),Tu.exportable("bridgeBrowserTitleBar")}var Lu=Ps("WebSocket",["connectSocket","socketClose","onSocketClose","onSocketError","onSocketMessage","onSocketOpen","socketSend","checkAllSocket","checkSocket","socketEnable","socketPool","socketPing","onSocketPong"]);var Pu=Ps("SocketIO",["socketIoConnect","socketIoSend","socketIoEnable","socketIoClose","socketIoPool","onSocketIoConnect","onSocketIoDisconnect","onSocketIoError","onSocketIoMessage","addSocketIOEventListener"]);var Ru=Ps("Navigator",["navigateTo","redirectTo","getPageQuery","getPublicNavigateUrl","getUrlWithPayload","setNavigationBarTitle","closeAll","navigateBack","navigateBackWithResult","closeCurrent","startMiniProgramWithResult","startShare","reLaunch","navigateToPlus"]);function Ju(){a("bridgeBrowserNavigator",function(){var e=c("Environment"),t={},n="now browser",r=function(t){var n=e.App();return n.external&&n.external[t]?n.external[t]:t};return t.navigateTo=function(e){var n,r=t.getUrlWithPayload(e);return n=r,void(window.location.href=n)},t.navigateBack=function(){return history.go(-1)},t.navigateBackWithResult=Ts(n),t.redirectTo=function(e){var n,r=t.getUrlWithPayload(e);return n=r,void window.location.replace(n)},t.closeAll=function(){window.close()},t.closeCurrent=function(){window.close()},t.getPageQuery=function(e){var t=new URLSearchParams(window.location.hash.substring(2));return e?t.get(e)?t.get(e):void 0:t},t.getUrlWithPayload=function(e){if("string"==typeof e)return r(e);var{url:n,payload:o}=e;return r(n)+t.buildSearchHash(o)},t.buildSearchHash=function(e){return e?"#!?"+function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}(e):""},t.getPublicNavigateUrl=function(e){var n=window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/")),r=window.location.protocol+"//"+window.location.host+n+"/";return"string"==typeof e?r+e:r+t.getUrlWithPayload(e)},t.setNavigationBarTitle=function(e){window.document.title=e},t.startMiniProgramWithResult=Ts(n),t.startShare=Ts(n),t.reLaunch=Ts(n),t}),Ru.exportable("bridgeBrowserNavigator")}var Du=Ps("Network",["request","baseRequest","browserSetDefaultHeader","getNetworkType","onNetworkStatusChange"]);function _u(){a("bridgeBrowserNetwork",function(){const e=c("Environment"),n={},r={};let o;return n.browserSetDefaultHeader=function(e){e&&Cs.each(e,function(e,t){r[t]!==e&&(r[t]=e)})},n.request=function(n,i){let a=n.url,c=n.data;const s=n.header;let u=n.method,l=n.success,d=n.fail,f=n.complete;i&&(i.success&&(l=i.success),i.fail&&(d=i.fail),i.complete&&(f=i.complete)),function(){if(void 0!==o||!e.App)return;const t=e.App();t.app&&(o={},o["MP-APP"]=t.app,o["MP-VERSION"]=t.version+"/"+t.platform,o["MP-BUILD"]=t.date)}(),u||(u="GET");const g=void 0===e.App?"":e.App().url;let p;t("send request "+u,[a,c]),g&&0!==!a.indexOf(g)&&(a=g+a),/^(GET|OPTIONS|HEAD|PUT|DELETE)$/.test(u)&&(p=c,c=void 0);const h={};r&&Cs.merge(h,r),s&&Cs.merge(h,s),o&&Cs.merge(h,o);let m=a;if(p){const e=[];for(const t in p)p.hasOwnProperty(t)&&null!=p[t]&&e.push(encodeURIComponent(t)+"="+encodeURIComponent(p[t]));e.length&&(m+="?"+e.join("&"))}const b={method:u,headers:h};c&&(h["Content-Type"]="application/json",b.body=JSON.stringify(c)),fetch(m,b).then(function(e){const t=e.status;return e.text().then(function(e){let n=e;try{n=JSON.parse(e)}catch(e){}return{data:n,status:t}})}).then(function(e){e.status>=200&&e.status<300?l&&l(e):d&&d(e),f&&f(e)}).catch(function(e){const t={status:0,data:e.message||"Network Error"};d&&d(t),f&&f(t)})},n.baseRequest=n.request,n.getNetworkType=function(e){const t=e&&e.success,n=e&&e.complete,r={data:{networkType:navigator.onLine?"wifi":"none"}};t&&t(r),n&&n(r)},n}),Du.exportable("bridgeBrowserNetwork")}var xu=Ps("LifeCycle",["onLaunch","onShow","onStop","onDestroy","onRestart","onFinish","onPageResult"]);function Mu(){a("bridgeBrowserLifeCycle",function(){var e=c("Environment"),t={},n="now browser",r={},o={};return t._lock=function(e){r&&(r[e]=(r[e]||0)+1)},t._unlock=function(e){if(r){for(var t in r[e]=(r[e]||1)-1,r){if(r[t])return}r=void 0,Cs.each(o,function(e){e()}),o=void 0}},t.onLaunch=function(e){if(!r)return e();o[e]=e},t.onShow=function(e){if(!r)return e();o[e]=e},t.onLaunch(function(){e.isAndroid()&&document.documentElement.setAttribute("os","android"),e.isiOS()&&document.documentElement.setAttribute("os","ios")}),t.onStop=Ts(n),t.onDestroy=Ts(n),t.onRestart=Ts(n),t.onFinish=Ts(n),t}),xu.exportable("bridgeBrowserLifeCycle")}var Eu=Ps("Storage",["setStorage","setStorageSync","getStorage","getStorageSync","clearStorage","clearStorageSync","removeStorage","removeStorageSync","getDataFromDV"]);function Fu(){a("bridgeBrowserStorage",function(){var e,t=c("Environment"),n={},r=function(n){return void 0===e&&(e=t.App()),e.app+"/"+n};return n.setStorage=function(e,t,r){var o=r&&r.success,i=r&&r.fail,a=r&&r.complete;try{n.setStorageSync(e,t),o&&o(),a&&a()}catch(e){var c={error:e};i&&i(c),a&&a(c)}},n.setStorageSync=function(e,t){if(void 0!==t){var n=JSON.stringify(t);window.localStorage.setItem(r(e),n)}else window.localStorage.removeItem(r(e))},n.getStorage=function(e,t){var r=t&&t.success,o=t&&t.fail,i=t&&t.complete;try{var a={data:n.getStorageSync(e)};r&&r(a),i&&i(a)}catch(e){var c={error:e};o&&o(c),i&&i(c)}},n.getStorageSync=function(e){var t=window.localStorage.getItem(r(e));return JSON.parse(t)},n.clearStorage=function(e){var t=e&&e.success,r=e&&e.fail,o=e&&e.complete;try{n.clearStorageSync(),t&&t(),o&&o()}catch(e){var i={error:e};r&&r(i),o&&o(i)}},n.clearStorageSync=function(){for(var e=r(""),t=[],n=0;n<localStorage.length;n++)0===window.localStorage.key(n).indexOf(e)&&t.push(window.localStorage.key(n));for(n=0;n<t.length;n++)window.localStorage.removeItem(t[n])},n.removeStorage=function(e,t){n.setStorage(e,void 0,t)},n.removeStorageSync=function(e){n.setStorageSync(e,void 0)},n.getDataFromDV=Ts("now browser"),n}),Eu.exportable("bridgeBrowserStorage")}var ju=Ps("Environment",["isChrome","isAndroid","isiOS","getDisplayWidth","getDisplayHeight","App","doLogin","forceDoLogin","isLogined","onPageReady","onLazy","onPageFatal","getUserInfo","onFrameworkReady","getAuthcode","checkAPILevel","getClientInfo","isRtl","getLanguageSync","getDisplayInfoSync","getVipStatusSync","getPath","checkAppExistSync","mpTrack","thirdPartyLogin","loginResult","requestUpgrade","onThemeChange","logEvent","nativeCall","setButtonAction","saveToFavorite","hideKeyboard","mpTrackCVR","addAttribution","shareMiniProgramCard","openKYCFlow","checkAccessGuard","getTranslationText","getTranslation","getTranslations","getI18nString"]);function Uu(){a("bridgeBrowserEnvironment",function(){const e=c("bridgeBrowserLifeCycle"),n=c("bridgeBrowserNetwork"),o=c("Network"),i=c("Storage"),a=c("BOTBridge"),s={},u="now browser",l={url:""},d=navigator.userAgent,f=/Chrome/.test(d),g=d.indexOf("Android")>-1||d.indexOf("Adr")>-1,p=!!d.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);s.isChrome=function(){return f},s.isAndroid=function(){return g},s.isiOS=function(){return p},s.getDisplayWidth=function(){return window.innerWidth},s.getDisplayHeight=function(){return window.innerHeight},s.isRtl=function(){return!1},s.App=function(e){return void 0!==e&&Object.assign(l,e),l},s.loadAppJson=function(){const t="browserLoadAppJson";e._lock(t),n.request({url:"app.json",headers:{"Cache-Control":"no-cache"},success:function(n){try{s.App(n.data)}catch(e){alert("browser launch failed, "+e)}e._unlock(t)},fail:function(){}})};const h=function(){const e={uid:"b_"+du(),token:du()};try{const t=i.getStorageSync("uid");t&&(t.uid&&(e.uid=t.uid),t.token&&(e.token=t.token),t.appToken&&n.browserSetDefaultHeader({Authorization:t.appToken}))}catch(e){}return e};let m=!1;return s.onLaunchBrowserLogin=function(e){const t=e&&e.success,r=e&&e.fail,a=e&&e.complete;if(m)return t&&t(),void(a&&a());const c=h();o.request({url:"/api/auth/exchange",method:"POST",data:c,header:{Authorization:""},success:function(e){const r=e.data.token;n.browserSetDefaultHeader({Authorization:r}),c.appToken=r,i.setStorage("uid",c),m=!0,t&&t(),a&&a()},fail:function(e){const t={error:"http "+e.status};r&&r(t),a&&a(t)}})},s.doLogin=s.onLaunchBrowserLogin,s.forceDoLogin=s.onLaunchBrowserLogin,s.isLogined=function(){return m},s.onPageReady=function(){},s.onLazy=function(){},s.onPageFatal=function(e){r("PAGE FATAL ERROR",e)},s.getUserInfo=function(e){const t=e&&e.success,n=e&&e.complete,r={data:{firstName:h().uid.replace(/(-|_|[0-9])/g,""),lastName:"BOTIM User"}};t&&t(r),n&&n(r)},s.getAuthcode=function(e,t){const n=t&&t.success;n&&n({code:""})},s.getClientInfo=function(){return{}},s.getLanguageSync=function(){return{}},s.getDisplayInfoSync=function(){return{}},s.getVipStatusSync=function(){return{}},s.checkAppExistSync=function(){return{}},s.onFrameworkReady=function(){s.loadAppJson()},s.mpTrack=function(e){t("[track]",e.message||e)},s.mpTrackCVR=function(e){t("[mpTrackCVR]",e.message||e)},s.checkAPILevel=a.checkAPILevel,s.addAttribution=Ts(u),s.thirdPartyLogin=Ts(u),s.loginResult=Ts(u),s.requestUpgrade=Ts(u),s.getPath=Ts(u),s.onThemeChange=Ts(u),s.logEvent=Ts(u),s.nativeCall=Ts(u),s.setButtonAction=Ts(u),s.saveToFavorite=Ts(u),s.hideKeyboard=Ts(u),s.openKYCFlow=Ts(u),s.checkAccessGuard=Ts(u),s.getTranslationText=Ts(u),s.getTranslation=Ts(u),s.getTranslations=Ts(u),s.getI18nString=Ts(u),s}),ju.exportable("bridgeBrowserEnvironment")}function Vu(){Mu(),_u(),Fu(),Uu(),Ju(),a("bridgeBrowserContact",function(){var e={},t="contact bridge not available on browser";return e.chooseContact=Ts(t),e.getContact=Ts(t),e.getContacts=Ts(t),e.chooseContacts=Ts(t),e.chooseGroups=Ts(t),e}),hu.exportable("bridgeBrowserContact"),Au(),Bu(),Cu(),a("bridgeBrowserOfficialAccount",function(){var e={},t="officialaccount bridge not available on browser";return e.setSubscription=Ts(t),e.getSubscription=Ts(t),e.getMuteStatus=Ts(t),e.setMuteStatus=Ts(t),e.getNewsLetterStatus=Ts(t),e.setNewsLetterStatus=Ts(t),e}),Su.exportable("bridgeBrowserOfficialAccount"),a("bridgeBrowserPayBySDK",function(){var e={},t="paybysdk bridge not available on browser";return e.paybyOpenUrl=Ts(t),e.paybyGetDefaultPaymentMethod=Ts(t),e.paybyChoosePaymentMethod=Ts(t),e.paybyToPay=Ts(t),e.paybyGetLatestPaymentMethod=Ts(t),e}),ku.exportable("bridgeBrowserPayBySDK"),a("bridgeBrowserDevice",function(){var e={},t="device bridge not available on browser";return e.vibrateShort=Ts(t),e.vibrateLong=Ts(t),e.setClipboardData=Ts(t),e.getClipboardData=Ts(t),e.onKeyboardPop=Ts(t),e.allowContentOffSet=function(){},e.setKeepScreenOn=function(){},e}),mu.exportable("bridgeBrowserDevice"),a("bridgeBrowserCamera",function(){var e={},t="camera bridge not available on browser";return e.scanCode=Ts(t),e.getOcrResultFromCamera=Ts(t),e.getOcrResultFromGallery=Ts(t),e}),pu.exportable("bridgeBrowserCamera"),a("bridgeBrowserFile",function(){var e={},t="file bridge not available on browser";return e.chooseImage=Ts(t),e.uploadImage=Ts(t),e.onImageProgressUpdate=Ts(t),e.onImageUpdateStatus=Ts(t),e.chooseFile=Ts(t),e.uploadFile=Ts(t),e.cancelUploadFile=Ts(t),e.setFileUpdateListener=Ts(t),e.downloadFile=Ts(t),e.cancelDownloadFile=Ts(t),e.setFileDownloadListener=Ts(t),e.loadResource=Ts(t),e.openDocument=Ts(t),e.saveFile=Ts(t),e}),bu.exportable("bridgeBrowserFile"),a("bridgeBrowserLocation",function(){var e={},t="location bridge not available on browser";return e.getLocation=Ts(t),e.operateCompass=Ts(t),e.compassChange=Ts(t),e.onCompassChange=Ts(t),e.getMapData=Ts(t),e.getStaticMap=Ts(t),e.openNavigationPage=Ts(t),e}),vu.exportable("bridgeBrowserLocation"),a("bridgeBrowserAdvertisement",function(){var e={},t="advertisement bridge not available on browser";return e.createFloatingAd=Ts(t),e.onFloatingAdLoad=Ts(t),e.onFloatingAdError=Ts(t),e.onFloatingAdClose=Ts(t),e.onFloatingAdClick=Ts(t),e.showFloatingAd=Ts(t),e.hiddenFloatingAd=Ts(t),e.createRewardedAd=Ts(t),e.setRewardedAdListener=Ts(t),e.loadRewardedAd=Ts(t),e.showRewardedAd=Ts(t),e.createNativeAd=Ts(t),e.setNativeAdListeners=Ts(t),e.loadNativeAd=Ts(t),e.showNativeAd=Ts(t),e.destroyNativeAd=Ts(t),e.hiddenNativeAds=Ts(t),e.visibleNativeAds=Ts(t),e.loadCustomAd=Ts(t),e.showCustomAd=Ts(t),e.destroyCustomAd=Ts(t),e.hiddenCustomAds=Ts(t),e.visibleCustomAds=Ts(t),e}),gu.exportable("bridgeBrowserAdvertisement"),a("bridgeBrowserSolarSdk",function(){var e={},t="solarsdk bridge not available on browser";return e.newSolar=Ts(t),e.solarLoginApp=Ts(t),e.solarJoinRoom=Ts(t),e.solarLeaveRoom=Ts(t),e.solarAudioActive=Ts(t),e.solarSwitchSpeaker=Ts(t),e.solarLogout=Ts(t),e.solarMuteRemoteAudioStream=Ts(t),e.addSolarEngineListener=Ts(t),e.addSolarEventListener=Ts(t),e.getSolarLifeCycle=Ts(t),e.solarMicEnable=Ts(t),e.solarVideoActive=Ts(t),e.solarChangeRemoteVideoStream=Ts(t),e.solarVideoHDAvailable=Ts(t),e.solarVideoHDType=Ts(t),e.solarSwitchHD=Ts(t),e.solarSwitchLD=Ts(t),e.solarSwitchCamera=Ts(t),e.solarSendAppMessage=Ts(t),e.solarSetupVideo=Ts(t),e.solarApplyMic=Ts(t),e.solarCancelMic=Ts(t),e.solarConfirmApplyMic=Ts(t),e.solarInviteMic=Ts(t),e.solarCancelInviting=Ts(t),e.solarInviteConfirm=Ts(t),e.solarKickoutMic=Ts(t),e.solarLayDownMic=Ts(t),e}),Nu.exportable("bridgeBrowserSolarSdk"),a("bridgeBrowserWebsocket",function(){var e={},t="websocket bridge not available on browser";return e.connectSocket=Ts(t),e.onSocketClose=Ts(t),e.onSocketError=Ts(t),e.onSocketMessage=Ts(t),e.onSocketOpen=Ts(t),e.socketClose=Ts(t),e.socketSend=Ts(t),e.socketEnable=Ts(t),e.socketPool=Ts(t),e.onSocketPong=Ts(t),e.socketPing=Ts(t),e.checkAllSocket=Ts(t),e.checkSocket=Ts(t),e}),Lu.exportable("bridgeBrowserWebsocket"),a("bridgeBrowserSocketIO",function(){var e,n,o={},i="now browser",a={};return o.socketIoEnable=Ts(i),o.socketIoPool=Ts(i),o.onSocketIoError=Ts(i),o.addSocketIOEventListener=Ts(i),o.socketIoConnect=function(t){if(null==e&&(e=t.io),!e)throw"socketio-client implementation not found!";var r=JSON.parse(t.header).token,o=JSON.parse(t.query);a.conf=t,(n=e(t.url,{path:t.path,auth:{token:r},query:o})).on("connect",function(){a.onopen&&a.onopen()}),n.on("broadcastMessage",function(e){a.onmessage&&a.onmessage(e)}),n.on("disconnect",function(){a.onclose&&a.onclose()})},o.onSocketIoDisconnect=function(e){t("register onSocketIoDisconnect",arguments),n?n.on("disconnect",function(){t("socketIO onclose"),e()}):a.onclose=e},o.socketIoClose=function(e){if(n){if(e.url&&e.url!=a.conf.url)return void r("socketIoSend url mismatched");n.disconnect(),n=void 0}a={}},o.socketIoSend=function(e,o){t("socketIoSend",arguments);var i=o&&o.success,c=o&&o.fail;if(n){if(e.url&&e.url!=a.conf.url)return r("socketIoSend url mismatched"),void(c&&c());n.emit("socketIoEvent",JSON.stringify(e),function(){i&&i()})}else c&&c()},o.onSocketIoConnect=function(e){t("register onSocketIoConnect",arguments),n?n.on("connect",function(){t("socketIO onopen"),e()}):a.onopen=e},o.onSocketIoMessage=function(e){t("register onSocketIoMessage"),a.onmessage=function(t){e({data:{url:a.conf.url,message:t}})}},o}),Pu.exportable("bridgeBrowserSocketIO"),a("bridgeBrowserMedia",function(){var e={},t="media bridge not available on browser";return e.playVoice=Ts(t),e.stopVoice=Ts(t),e.saveImageToPhotosAlbum=Ts(t),e}),yu.exportable("bridgeBrowserMedia"),a("bridgeBrowserRTCSdk",function(){var e={},t="rtc sdk bridge not available on browser";return e.newRTC=Ts(t),e.initEngine=Ts(t),e.isInited=Ts(t),e.destroyEngine=Ts(t),e.updateToken=Ts(t),e.joinRoom=Ts(t),e.leaveRoom=Ts(t),e.changeAudioDevice=Ts(t),e.getAudioDevice=Ts(t),e.enableLocalAudio=Ts(t),e.enableLocalVideo=Ts(t),e.muteLocalAudioStream=Ts(t),e.muteLocalVideoStream=Ts(t),e.muteRemoteAudioStream=Ts(t),e.muteRemoteVideoStream=Ts(t),e.muteAllRemoteAudioStream=Ts(t),e.muteAllRemoteVideoStream=Ts(t),e.switchCamera=Ts(t),e.setupVideo=Ts(t),e.sendAppMessage=Ts(t),e.addRtcEventListener=Ts(t),e.getSpeakingLevel=Ts(t),e.getSdkVersion=Ts(t),e.setBackgroundImage=Ts(t),e.getNetworkState=Ts(t),e.getConnectState=Ts(t),e.showDebugView=Ts(t),e.getVoipState=Ts(t),e.updateConfiguration=Ts(t),e.pauseStream=Ts(t),e.resumeStream=Ts(t),e.sendAppSignal=Ts(t),e.getRoomInfo=Ts(t),e.getAllPluginTools=Ts(t),e.callPluginTool=Ts(t),e}),Ou.exportable("bridgeBrowserRTCSdk")}function zu(){Mu(),_u(),Fu(),Uu(),Ju(),Bu(),Au(),Cu(),a("bridgeLifecycle",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=c("bridgeBrowserLifeCycle"),o=c("Environment");if(void 0===e()||!e().getEnvironment||!e().getEnvironment())return n("BOTBridge.ENVIRONMENT is null, use bridgeBrowserLifeCycle instead!"),r;const i={};let a={};return t.build({complete:function(){const e=a;a=!1,Cs.each(e,function(e){e()})}},"onLaunch"),i.onLaunch=function(t){if(!a)return t();a[t]=t,e().wakeup()},i.onShow=function(e){t.subscribe("onShow",e)},i.onStop=function(e){t.subscribe("onStop",e)},i.onDestroy=function(e){t.subscribe("onDestroy",e)},i.onRestart=function(e){t.subscribe("onRestart",e)},i.onFinish=function(e){t.subscribe("onFinish",e)},i.onLaunch(function(){o.isAndroid()&&document.documentElement.setAttribute("os","android"),o.isiOS()&&document.documentElement.setAttribute("os","ios")}),i.onPageResult=function(e){t.subscribe("onPageResult",e)},i}),xu.exportable("bridgeLifecycle"),a("bridgeNetwork",function(){const e=c("BOTBridge"),t=c("bridgeBrowserNetwork"),r=c("$BRIDGEKIT"),o=c("bridgeCallback");let i=0,a=[];const s=!(void 0===e()||!e().getNetwork)&&e().getNetwork();if(!s)return n("NETWORK is null, use bridgeBrowserNetwork instead!"),t;const u={};function l(e,n){if(i++,e.method||(e.method="GET"),!r.checkImpl(s,"baseRequest"))return t.baseRequest(e),void d();const a=o.buildDataCallback({...e,complete:t=>{e.complete&&e.complete(t),d()}},o.hint("baseRequest"));s.baseRequest(JSON.stringify({method:e.method,url:e.url,data:e.data,header:e.header,timeout:e.timeout}),a)}function d(){if(i--,a.length>0){const{requestParams:e,callback:t}=a.shift();l(e)}}return u.browserSetDefaultHeader=t.browserSetDefaultHeader,u.request=function({url:e,data:n,header:r,method:o,timeout:i,success:a,fail:c,complete:s},l){let d={success:a,fail:c,complete:s};return d={...d,...l},o||(o="GET"),"GET"===o||"POST"===o?u.baseRequest({url:e,data:n,header:r,method:o,timeout:i,...d}):t.request({url:e,data:n,header:r,method:o,...d})},u.baseRequest=function({url:e,data:t,header:n,method:r,timeout:o,success:c,fail:s,complete:u},d){let f={success:c,fail:s,complete:u};f={...f,...d};const g={url:e,data:t,header:n,method:r,timeout:o,...f};i<10?l(g):a.push({requestParams:g,callback:d})},u.getNetworkType=function(e){const t=o.build(e,o.hint("getNetworkType"));s.getNetworkType(t)},u.onNetworkStatusChange=function(e){o.subscribe("onNetworkStatusChange",e)},u}),Du.exportable("bridgeNetwork"),a("bridgeStorage",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=c("bridgeBrowserStorage"),o=c("bridgeEnvironment");let i=!(void 0===e()||!e().getLocalStorage)&&e().getLocalStorage();if(i||(i=!(void 0===e()||!e().getStorage)&&e().getStorage()),!i)return n("STORAGE is null, use bridgeBrowserStorage instead!"),r;const a={},s=function(e,n){return t.hint(e.substring(0,4)+"_"+(n||""))};return a.setStorage=function(e,n,r){const o=t.build(r,s("setStorage",e));try{if(void 0!==n){const t=JSON.stringify(n);i.setStorage(e,t,o)}else i.removeStorage(e,o)}catch(e){const n={error:e};t.invoke(o,"fail",[n]),t.invoke(o,"complete",[n])}},a.setStorageSync=function(n,r){if(void 0===r){if(e.checkImpl(i,"removeStorageSync"))return i.removeStorageSync(n);if(e.checkImpl(i,"removeStorage"))return i.removeStorage(n,t.emptyCallback)}const o=JSON.stringify(r);if(e.checkImpl(i,"setStorageSync"))return i.setStorageSync(n,o);i.setStorage(n,o,null)},a.getStorage=function(e,n){const r=t.buildDataCallback(n,s("getStorage",e));try{return i.getStorage(e,r)}catch(e){const n={error:e};t.invoke(r,"fail",[n]),t.invoke(r,"complete",[n])}},a.getStorageSync=function(t){let n;return n=e.checkImpl(i,"getStorageSync")?i.getStorageSync(t):i.getStorage(t,null),null===n||""===n?n:JSON.parse(n)},a.clearStorage=function(e){const n=t.build(e,s("clearStorage",""));try{i.clearStorage(n)}catch(e){const r={error:e};t.invoke(n,"fail",[r]),t.invoke(n,"complete",[r])}},a.clearStorageSync=function(){if(e.checkImpl(i,"clearStorageSync"))return i.clearStorageSync();i.clearStorage(null)},a.removeStorage=function(n,r){if(e.checkImpl(i,"removeStorage")){const e=t.build(r,s("removeStorage",""));return i.removeStorage(n,e)}return a.setStorage(n,void 0,r)},a.removeStorageSync=function(t){return e.checkImpl(i,"removeStorageSync")?i.removeStorageSync(t):a.setStorageSync(t,void 0)},a.getDataFromDV=function({key:e},n){const{success:r,fail:a,complete:c}=n||{},s=t.build({success:function(e){r&&("string"==typeof e.data&&(e.data=JSON.parse(e.data),e.data.userInfo&&(e.data.value=e.data.userInfo)),r(e))},fail:a,complete:c},t.hint("getDataFromDV"));o.isiOS()?i.getDataFromDV(e,s):i.getDataFromDV(JSON.stringify({key:e}),s)},a}),Eu.exportable("bridgeStorage"),a("bridgeEnvironment",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),o=c("bridgeBrowserEnvironment"),i=c("Network"),a=c("$BRIDGEKIT"),s=!(void 0===e()||!e().getEnvironment)&&e().getEnvironment();if(!s)return n("BOTBridge is null, use bridgeBrowserEnvironment instead!"),o;const u={};let l;const d=function(e,n,r){if(!n)return r;const o=t.hint(e);return t.subscribe(o,n),o},f=function(e){return"true"===e};u.isChrome=function(){return s.isChrome()},u.isAndroid=function(){return s.isAndroid()},u.isiOS=function(){return s.isiOS()},u.isRtl=function(){return s.isRtl()},u.getDisplayWidth=function(){return window.innerWidth},u.getDisplayHeight=function(){return window.innerHeight},u.App=function(){return void 0===l&&(l=JSON.parse(e().getAppJson())),l};let g=!1;return u.doLogin=function(e){const{success:n,fail:o,complete:a}=e||{},c=t.build({success:function(e){i.browserSetDefaultHeader({Authorization:e.data.token}),g=!0,n&&n(e)},fail:o,complete:a},t.hint("doLogin"));try{s.doLogin(c)}catch(e){r("bridge doLogin failed",e);const n={error:e};t.invoke(c,"fail",[n]),t.invoke(c,"complete",[n])}},u.forceDoLogin=function({key:e},n){const{success:r,fail:o,complete:a}=n||{},c=t.build({success:function(e){i.browserSetDefaultHeader({Authorization:e.data.token}),g=!0,r&&r(e)},fail:o,complete:a},t.hint("forceDoLogin"));try{s.forceDoLogin(JSON.stringify({key:e}),c)}catch(e){const n={error:e};t.invoke(c,"fail",[n]),t.invoke(c,"complete",[n])}},u.isLogined=function(){return g},u.onPageReady=function(){u.onLazy("pageready")},u.onLazy=function(e){if(a.checkImpl(s,"onLazy"))try{s.onLazy(e)}catch(e){r("onLazy error",e)}},u.onPageFatal=function(e){a.checkImpl(s,"onPageFatal")&&s.onPageFatal(JSON.stringify(e))},u.getUserInfo=function(e){const n=t.build(e,t.hint("getUserInfo"));try{s.getUserInfo(n)}catch(e){const r={error:e};t.invoke(n,"fail",[r]),t.invoke(n,"complete",[r])}},u.getAuthcode=function({state:e,scope:n,redirectUri:r},o){const{success:i,fail:a,complete:c}=o||{};e=e||"",n=n||"default",r||(r=`https://botim.me/mp/b/?app=${u.App().app}`);const l=t.build({success:function(e){i&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),i(e))},fail:a,complete:c},t.hint("getAuthcode"));try{s.getAuthcode(JSON.stringify({state:e,scope:n,redirectUri:r}),l)}catch(e){const n={error:e};t.invoke(l,"fail",[n]),t.invoke(l,"complete",[n])}},u.getClientInfo=Cs.once(function(){return s.isAndroid()?JSON.parse(s.getClientInfo()):s.getClientInfo()}),u.getLanguageSync=Cs.once(function(){return s.getLanguageSync()}),u.getDisplayInfoSync=function(){return s.isAndroid()?JSON.parse(s.getDisplayInfoSync()):s.getDisplayInfoSync()},u.getVipStatusSync=function(){return s.getVipStatusSync()},u.onFrameworkReady=function(){},u.checkAppExistSync=function({name:e}){return s.checkAppExistSync(JSON.stringify({name:e}))},u.getPath=function(e){const n=t.build(e,t.hint("getPath"));try{s.getPath(n)}catch(e){const r={error:e};t.invoke(n,"fail",[r]),t.invoke(n,"complete",[r])}},u.mpTrack=function({message:e}){return s.mpTrack(JSON.stringify({message:e}))},u.mpTrackCVR=function({message:e}){return s.mpTrackCVR(JSON.stringify({message:e}))},u.getTranslationText=function(e){return s.getTranslationText(e)},u.getTranslation=function(e){return s.getTranslationText(e)},u.getTranslations=function(e){const t={};for(const n of e)t[n]=u.getTranslationText(n);return t},u.getI18nString=function(e,t){return t&&""!==t?s.getI18nString(e,t):u.getTranslationText(e)},u.checkAccessGuard=function({type:e},n){const r=t.build(n,t.hint("checkAccessGuard"));s.checkAccessGuard(JSON.stringify({type:e}),r)},u.addAttribution=function({type:e,data:n},r){const o=t.build(r,t.hint("addAttribution"));s.addAttribution(JSON.stringify({type:e,data:n}),o)},u.thirdPartyLogin=function({state:e,scope:n,redirectUri:r},o){const i=t.build(o,t.hint("thirdPartyLogin"));s.thirdPartyLogin(JSON.stringify({state:e,scope:n,redirectUri:r}),i)},u.loginResult=function({token:e,uid:n},r){const o=t.build(r,t.hint("loginResult"));s.loginResult(JSON.stringify({token:e,uid:n}),o)},u.requestUpgrade=function({appId:e},n){const r=t.build(n,t.hint("requestUpgrade"));s.requestUpgrade(JSON.stringify({appId:e}),r)},u.onThemeChange=function(e){t.subscribe("onThemeChange",e)},u.checkAPILevel=e.checkAPILevel,u.logEvent=function({message:e,type:t}){return s.logEvent(JSON.stringify({message:e,type:t}))},u.nativeCall=function({method:e,parameters:n,callback:r}){const{success:o,fail:i,complete:a}=r||{},c=t.build({success:function(t){if(o){if(t&&t.data&&""!==t.data&&"string"==typeof t.data&&(t.data=JSON.parse(t.data)),n&&n.length>0&&t&&t.data&&t.data[n[0]])try{"object"==typeof JSON.parse(t.data[n[0]])&&(t.data[n[0]]=JSON.parse(t.data[n[0]]))}catch(e){return void o(t)}if("Page.getPageResult"===e&&s.isiOS()&&t.data&&(t=t.data),"Business.getUserContacts"===e&&(t.data.data=t.data.data.map(e=>({phoneNumber:{fullNumber:e.uid,components:{countryCode:e.countryCode,localNumber:e.phone}},name:e.name,avatarText:e.txt_avatar,profilePhotoUrl:e.profile_photo_url,lastContactedAt:e.last_contacted_at}))),"Payby.openNative"===e&&n&&JSON.parse(n)&&JSON.parse(n).router&&JSON.parse(n).router.includes("startEidKyc"))if(s.isAndroid())try{const e=JSON.parse(JSON.parse(t.data.result).result);t.data={verifyFinished:f(e.verifyFinished),kycType:e.kycType.toLowerCase(),kycStatus:e.kycStatus.toLowerCase()}}catch(e){t.data={verifyFinished:!1}}else try{const e=t.data.result;t.data={verifyFinished:f(e)}}catch(e){t.data={verifyFinished:!1}}o(t)}},fail:function(e){"string"==typeof e&&(e=JSON.parse(e)),i(e)},complete:a},t.hint("nativeCall"));"Diagnosis.addUdpEventListener"===e||"Diagnosis.addBwEventListener"===e?(n[1]&&n[1].onUdpTestReport&&(n[1].onUdpTestReport=d("onUdpTestReport",n[1].onUdpTestReport)),n[1]&&n[1].onUdpTestFinish&&(n[1].onUdpTestFinish=d("onUdpTestFinish",n[1].onUdpTestFinish)),n[1]&&n[1].onBwTestReport&&(n[1].onBwTestReport=d("onBwTestReport",n[1].onBwTestReport)),n[1]&&n[1].onBwTestFinish&&(n[1].onBwTestFinish=d("onBwTestFinish",n[1].onBwTestFinish)),n[1]=JSON.stringify(n[1]),s.nativeCall(JSON.stringify({method:e,parameters:n,fnCallback:c}))):"MixCall.addMixCallListener"===e?(n[1]&&n[1].mixSignalChange&&(n[1].mixSignalChange=d("mixSignalChange",n[1].mixSignalChange)),n[1]&&n[1].mixDebugInfo&&(n[1].mixDebugInfo=d("mixDebugInfo",n[1].mixDebugInfo)),n[1]&&n[1].networkQuality&&(n[1].networkQuality=d("networkQuality",n[1].networkQuality)),n[1]&&n[1].audioDeviceChanged&&(n[1].audioDeviceChanged=d("audioDeviceChanged",n[1].audioDeviceChanged)),n[1]&&n[1].onErrorOccured&&(n[1].onErrorOccured=d("onErrorOccured",n[1].onErrorOccured)),n[1]&&n[1].volumeChanged&&(n[1].volumeChanged=d("volumeChanged",n[1].volumeChanged)),n[1]&&n[1].voiceToText&&(n[1].voiceToText=d("voiceToText",n[1].voiceToText)),n[1]&&n[1].recvFirstAudioFrame&&(n[1].recvFirstAudioFrame=d("recvFirstAudioFrame",n[1].recvFirstAudioFrame)),n[1]&&n[1].notifyAppSignal&&(n[1].notifyAppSignal=d("notifyAppSignal",n[1].notifyAppSignal)),n[1]=JSON.stringify(n[1]),s.nativeCall(JSON.stringify({method:e,parameters:n,fnCallback:c}))):s.nativeCall(JSON.stringify({method:e,parameters:n,fnCallback:c}))},u.shareMiniProgramCard=function({ids:e,cardContent:t},n){const r={channelType:0,ids:e,shareData:{type:42,content:{title:t.title,subTitle:t.content,cover:t.cover,icon:t.appIcon,externalUrl:t.action,cardType:0}}};u.nativeCall({method:"Share.startChannelShare",parameters:[JSON.stringify(r)],callback:n})},u.openKYCFlow=function(e){const t={router:"route://native/kyc/startEidKyc",needCallback:!0};u.nativeCall({method:"Payby.openNative",parameters:[JSON.stringify(t)],callback:e})},u.setButtonAction=function({close:e}){s.setButtonAction(JSON.stringify({close:e}))},u.hideKeyboard=function(){s.hideKeyboard()},u.saveToFavorite=function(t){let r="";r=t?t.appId:u.App().app,r?e().getNavigator().navigateTo(`https://botim.me/mp/b/?app=me.botim.explore.exploremore%2Findex.html%23%2Fcustomize%3Fappid%3D${r}`):n("appid is empty!")},u}),ju.exportable("bridgeEnvironment"),a("bridgeNavigator",function(){const e=c("BOTBridge"),t=c("bridgeBrowserNavigator"),n=c("bridgeCallback"),r=c("bridgeTitleBar"),o=c("bridgeEnvironment"),i=!(void 0===e()||!e().getNavigator)&&e().getNavigator();if(!i)return t;const a={navigateTo:function(e){const n=t.getUrlWithPayload(e);i.navigateTo(n)},redirectTo:function(e){const n=t.getUrlWithPayload(e);i.redirectTo?i.redirectTo(n):i.navigateTo(n)},closeAll:function(){i.closeAll()},closeCurrent:function(){i.closeCurrent()}};return a.getPageQuery=t.getPageQuery,a.getPublicNavigateUrl=function(e){if("string"==typeof e)return i.getPublicNavigateUrl(e);const n=t.getUrlWithPayload(e);return i.getPublicNavigateUrl(n)},a.setNavigationBarTitle=function(n){t.setNavigationBarTitle(n),e.checkImpl(r,"setTitleBarText")&&r.setTitleBarText(n)},a.navigateBack=function(t,n){void 0===t&&void 0===n||!e.checkAPILevel(2)?i.navigateBack():a.navigateBackWithResult(t,n)},a.navigateBackWithResult=function(e,t){t=t||"success",i.navigateBackWithResult(JSON.stringify(e),t)},a.startMiniProgramWithResult=function({url:e,code:t,params:r},o){const{success:a,fail:c,complete:s}=o||{},u=n.build({success:function(e){a&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),a(e))},fail:c,complete:s},n.hint("startMiniProgramWithResult"));i.startMiniProgramWithResult(JSON.stringify({url:e,code:t,params:r}),u)},a.startShare=function({id:e=null,shareData:t={},recentDisabled:n=!1,config:r={},ext:o={}},i){t.content&&(t.content=JSON.stringify(t.content));const c={shareData:t,recentDisabled:n,config:r,ext:o};e&&(c.shareData.shareId=e),e||t.constructor!==Object||0!==Object.keys(t).length||(c.shareData={action:"shareSimple"}),a.startMiniProgramWithResult({url:"https://botim.me/mp/b/?app=me.botim.function.mpsharedialog",code:1e3,params:c},i)},a.reLaunch=function(){i.reLaunch()},a.getUrlWithPayload=t.getUrlWithPayload,a.navigateToPlus=function({url:e},t){const{success:n,fail:r,complete:i}=t||{};if(!e||"string"!=typeof e)return r&&r({errorCode:-1,errorMessage:"url not recognized"}),void(i&&i());try{const t=new URL(e);if("app.payby.com"===t.hostname){const e=t.searchParams.get("ft");if(!e)return r&&r({errorCode:-2,errorMessage:"Payby url missing parameters"}),void(i&&i());const a={token:e};return void o.nativeCall({method:"Payby.openCashDesk",parameters:[JSON.stringify(a)],callback:{success:e=>{let t=e;try{e&&"object"==typeof e&&e.data&&"string"==typeof e.data.result&&(t={result:JSON.parse(e.data.result)})}catch(e){}n&&n({code:200,data:t}),i&&i()},fail:e=>{r&&r(e),i&&i()}}})}e.startsWith("https://botim.me/mp/b/?app=")||e.startsWith("internalbot://botim.me")?a.navigateTo(e):window.location.href=e,n&&n({code:200}),i&&i()}catch(e){r&&r({errorCode:-1,errorMessage:"url not recognized"}),i&&i()}},a}),Ru.exportable("bridgeNavigator"),a("bridgeTitleBar",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=c("bridgeBrowserTitleBar"),o=c("bridgeEnvironment"),i=!(void 0===e()||!e().getTitleBar)&&e().getTitleBar();if(!i)return n("TITLEBAR is null, use bridgeBrowserTitleBar instead!"),r;const a={},s=function(e,n){if(!n)return;if("function"!=typeof n)return n+"";const r=t.hint(e);return t.subscribe(r,n),r};return a.setTitleBarBackButton=function(e,t){const n=s("clickTBBack",t);i.setTitleBarBackButton(e,n)},a.clearTitleBar=function(){i.clearTitleBar()},a.setTitleBarText=function(e){i.setTitleBarText(e)},a.setTitleBarTextColor=function(e){i.setTitleBarTextColor(e)},a.setTitleBarBgColor=function(e){i.setTitleBarBgColor(e)},a.setTitleBarRightTextButton=function(e,t){"string"==typeof e&&(e={text:e});const n=s("clickTBTopRight",t);i.setTitleBarRightTextButton(JSON.stringify(e),n)},a.setTitleBarMoreMenu=function(e,t){const n=[];Cs.each(t,function(e){const t=s("clickTBMenu"+n.length,e.fn);n.push({icon:e.icon,title:e.title,fn:t})}),i.setTitleBarMoreMenu(e,JSON.stringify(n))},a.setTitleBarStyle=function(e){const t=Cs.pick(e,["title","titleColor","titlebg"]);e.back&&(t.back=Cs.pick(e.back,["icon","fn"]),t.back.fn=s("clickTBBack",t.back.fn)),e.menu&&e.menu.length&&(t.menu=[],Cs.each(e.menu,function(e){switch(e.type){case"text":{const n=Cs.pick(e,"type","text","fn","color");n.fn=s("clickTBTopRight",n.fn),t.menu.push(n);break}case"more":{let n=[];n=e.fn?["type","moreIcon","fn"]:["type","moreIcon"];const r=Cs.pick(e,...n);r.fn&&(r.fn=s("clickMore",r.fn)),r.list&&(r.list=[],Cs.each(e.list,function(e,t){const n=Cs.pick(e,["icon","title","fn"]);n.fn=s("clickTBMenu"+t,n.fn),r.list.push(n)})),t.menu.push(r);break}}})),i.setTitleBarStyle(JSON.stringify(t))},a.setTitleBar=function({title:e,titleBgColor:t="fff",titleTextColor:n="000000",backIcon:r,isRtl:i,backButtonCallBack:a}){const c=document.getElementById("app"),s=o.getDisplayInfoSync(),u="1"===s.hasNotch?Number(s.notchHeight)/window.devicePixelRatio:(Number(s.notchHeight)+Number(s.statusBarHeight||0))/window.devicePixelRatio,l=o.isAndroid(),d=document.createElement("div"),f=document.createElement("div"),g=u+44/375*(window.screen.width>900?900:window.screen.width),p="height: "+g+"px;z-index:9999;width: 100%;position:fixed;background:#"+t;let h="position: fixed;top:"+u+"px;z-index:9999;height: 1.19rem;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 0.412rem;font-weight: bold;line-height:1.173rem;background:#"+t+";color:#"+n+";";document.getElementById("titleBar")&&document.getElementById("titleBar").remove(),document.getElementById("placeholder")&&document.getElementById("placeholder").remove(),l&&!r&&i&&(h="position: fixed;top:"+u+"px;z-index:9999;height: 1.19rem;right:0.242rem;width:100%;font-size: 0.412rem;font-weight: bold;line-height:1.173rem;background:#"+t+";color:#"+n+";"),d.id="titleBar",d.innerHTML=i&&l?'<div style="'+h+'"> <img id="backBtn" style="width: 0.315rem;height: 0.51rem;transform: rotateY(180deg);margin:0.347rem 0.4rem 0.347rem 0.347rem;" src="'+r+'" alt=""><p style="width:calc(100% - 3.54rem);height: 100%;display: inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">'+e+"</p></div>":i&&!l?'<div style="'+h+'"> <img id="backBtn" style="width: 0.315rem;height: 0.51rem;transform: rotateY(180deg);margin:0.347rem 0.4rem 0.347rem 0.347rem;" src="'+r+'" alt=""><p style="width:calc(100% - 3.54rem);height: 100%;display: inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"> '+e+"</p></div>":l?'<div style="'+h+'"> <img id="backBtn" style="width: 0.315rem;height: 0.51rem; margin: 0.347rem 0.347rem 0.347rem 0.4rem;" src="'+r+'" alt=""><p style="padding-left:15px;max-width:65%;height: 100%;display: inline-block;margin: 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">'+e+"</p></div>":'<div style="'+h+'"> <img id="backBtn" style="width: 0.315rem;height: 0.51rem; margin: 0.347rem 0.347rem 0.347rem 0.4rem;" src="'+r+'" alt=""><p style="max-width:45%;height: 100%;display: inline-block;margin: 0;position: absolute;left: 50%; transform: translateX(-50%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">'+e+"</p></div>",f.id="placeholder",f.innerHTML='<div style="'+p+'"></div>',c.style.paddingTop=g+"px",c.parentElement.append(f,c),c.parentElement.append(d,c);const m=document.getElementById("backBtn");m.style.display=r?"unset":"none",m.onclick=function(){a()}},a}),Tu.exportable("bridgeTitleBar"),a("bridgeContact",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=!(void 0===e()||!e().getContact)&&e().getContact();return r?{getContact:function(e,n){const o=t.build(n,t.hint("getContact"));r.getContact(e,o)},chooseContact:function(e){const n=t.build(e,t.hint("chooseContact"));r.chooseContact(n)},getContacts:function(e,n){const o=t.build(n,t.hint("getContacts"));r.getContacts(JSON.stringify(e),o)},chooseContacts:function({count:e,selected:n,title:o,confirmButtonText:i,theme:a,recent:c},s){const{success:u,fail:l,complete:d}=s||{},f=t.build({success:function(e){u&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),u(e))},fail:l,complete:d},t.hint("chooseContacts"));r.chooseContacts(JSON.stringify({count:e,selected:n,title:o,confirmButtonText:i,theme:a,recent:c}),f)},chooseGroups:function({count:e,selected:n,title:o,confirmButtonText:i},a){const{success:c,fail:s,complete:u}=a||{},l=t.build({success:function(e){c&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),c(e))},fail:s,complete:u},t.hint("chooseGroups"));r.chooseGroups(JSON.stringify({count:e,selected:n,title:o,confirmButtonText:i}),l)}}:(n("CONTACT is null"),{})}),hu.exportable("bridgeContact"),a("bridgePay",function(){const e=c("BOTBridge"),t=c("bridgeBrowserPay"),r=c("bridgeCallback"),o=c("bridgeEnvironment"),i=c("bridgeNavigator"),a=c("bridgeLifecycle"),s=!(void 0===e()||!e().getPay)&&e().getPay();return s?{requestPayment:function({tradeId:e,loading:t},n){const{success:i,fail:a,complete:c}=n||{},u=r.build({success:function(t){i&&("string"==typeof t.data&&(t.data=JSON.parse(t.data)),i(t),o.mpTrackCVR({message:{event:"in_app_pch_suc",parameter:{tradeId:e}}}))},fail:function(e){a&&(o.isAndroid()&&"cancel"===e?e={data:{code:-10001}}:o.isAndroid()&&"string"==typeof e&&(e=JSON.parse(e)),a(e))},complete:c},r.hint("requestPayment"));s.requestPayment(JSON.stringify({tradeId:e,loading:t}),u)},setUpCashier:function({tradeId:e,appForIap:t,pidForIAP:n,iapType:o},i){const a=r.build(i,r.hint("setUpCashier"));s.setUpCashier(JSON.stringify({tradeId:e,appForIap:t,pidForIAP:n,iapType:o}),a)},applyConsumeDiamond:function({orderNo:e},t){const{success:n,fail:r}=t||{};i.navigateTo(`https://botim.me/mp/b/?app=me.botim.mix.iapauthorizer%2Findex.html%23%2F%3ForderNo%3D${e}`),a.onShow(()=>{o.nativeCall({method:"Page.getPageResult",parameters:["me.botim.mix.iapauthorizer"],callback:{success:t=>{if(n)try{o.isAndroid()?n(JSON.parse(t.data.value)):n(JSON.parse(t.data.data.value))}catch(t){n({orderNo:e,result:"cancel"})}},fail:e=>{r&&r(e)}}})})},consumeDiamonds:function({orderNo:e},t){const{success:n,fail:r}=t||{};i.navigateTo(`https://botim.me/mp/b/?app=me.botim.game.iapauthorizer%2Findex.html%23%2F%3ForderNo%3D${e}`),a.onShow(()=>{o.nativeCall({method:"Page.getPageResult",parameters:["me.botim.game.iapauthorizer"],callback:{success:t=>{if(n)try{o.isAndroid()?n(JSON.parse(t.data.value)):n(JSON.parse(t.data.data.value))}catch(t){n({orderNo:e,result:"cancel"})}},fail:e=>{r&&r(e)}}})})}}:(n("PAY is null, use bridgeBrowserPay instead!"),t)}),wu.exportable("bridgePay"),a("bridgeShare",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=c("bridgeBrowserShare"),o=!(void 0===e()||!e().getShare)&&e().getShare();return o?{share:function(e){const n=t.build(e,t.hint("share"));o.share(n)},shareContent:function({title:e,content:n,cover:r,toCurrentSession:i},a){const c=t.build(a,t.hint("shareContent"));o.shareContent(JSON.stringify({title:e,content:n,cover:r,toCurrentSession:i}),c)},shareCustomizeCard:function(e,n){const r=t.build(n,t.hint("shareCustomizeCard"));o.shareCustomizeCard(JSON.stringify(e),r)},shareText:function({text:e},n){const r=t.build(n,t.hint("shareText"));o.shareText(JSON.stringify({text:e}),r)},disableShare:function({disable:e}){o.disableShare(JSON.stringify({disable:e}))},shareFile:function({filePath:e,mimeType:n},r){const i=t.build(r,t.hint("shareFile"));o.shareFile(JSON.stringify({filePath:e,mimeType:n}),i)}}:(n("SHARE is null, use bridgeBrowserShare instead!"),r)}),Iu.exportable("bridgeShare"),a("bridgeOfficialAccount",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=!(void 0===e()||!e().getOfficialAccount)&&e().getOfficialAccount();return r?{setSubscription:function(e,n,o){const i=t.build(o,t.hint("setSubscription"));r.setSubscription(e,n,i)},getSubscription:function(e,n){const o=t.build(n,t.hint("getSubscription"));r.getSubscription(e,o)},getMuteStatus:function({sessionId:e},n){const o=t.build(n,t.hint("getMuteStatus"));r.getMuteStatus(JSON.stringify({sessionId:e}),o)},setMuteStatus:function({sessionId:e,on:n},o){const i=t.build(o,t.hint("setMuteStatus"));r.setMuteStatus(JSON.stringify({sessionId:e,on:n}),i)},getNewsLetterStatus:function({oaId:e},n){const o=t.build(n,t.hint("getNewsLetterStatus"));r.getNewsLetterStatus(JSON.stringify({oaId:e}),o)},setNewsLetterStatus:function({oaId:e,on:n},o){const i=t.build(o,t.hint("setNewsLetterStatus"));r.setNewsLetterStatus(JSON.stringify({oaId:e,on:n}),i)}}:(n("OfficialAccount is null"),{})}),Su.exportable("bridgeOfficialAccount"),a("bridgePayBySDK",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=!(void 0===e()||!e().getPayBySDK)&&e().getPayBySDK();return r?{paybyOpenUrl:function(e){r.paybyOpenUrl(e)},paybyGetDefaultPaymentMethod:function(e){const{success:n,fail:o,complete:i}=e||{},a=t.build({success:function(e){n&&(e.data&&"string"==typeof e.data&&(e.data=JSON.parse(e.data)),n(e))},fail:o,complete:i},t.hint("paybyGetDefaultPaymentMethod"));r.paybyGetDefaultPaymentMethod(a)},paybyGetLatestPaymentMethod:function({partnerId:e,payScene:n,businessScene:o,payeeId:i,installBlock:a},c){const{success:s,fail:u,complete:l}=c||{},d=t.build({success:function(e){s&&(e.data&&"string"==typeof e.data&&(e.data=JSON.parse(e.data)),s(e))},fail:u,complete:l},t.hint("paybyGetLatestPaymentMethod"));r.paybyGetLatestPaymentMethod(JSON.stringify({partnerId:e,payScene:n,businessScene:o,payeeId:i,installBlock:a}),d)},paybyChoosePaymentMethod:function(e){const{success:n,fail:o,complete:i}=e||{},a=t.build({success:function(e){n&&(e.data&&"string"==typeof e.data&&(e.data=JSON.parse(e.data)),n(e))},fail:o,complete:i},t.hint("paybyChoosePaymentMethod"));r.paybyChoosePaymentMethod(a)},paybyToPay:function({orderToken:e,returnUrl:n,payeeId:o,passData:i},a){const{success:c,fail:s,complete:u}=a||{},l=t.build({success:function(e){c&&(e.data&&"string"==typeof e.data&&(e.data=JSON.parse(e.data)),c(e))},fail:s,complete:u},t.hint("paybyToPay"));r.paybyToPay(JSON.stringify({orderToken:e,returnUrl:n,payeeId:o,passData:i}),l)}}:(n("PayBySDK is null"),{})}),ku.exportable("bridgePayBySDK"),a("bridgeDevice",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=!(void 0===e()||!e().getDevice)&&e().getDevice();return r?{vibrateShort:function({type:e},n){const o=t.build(n,t.hint("vibrateShort"));r.vibrateShort(JSON.stringify({type:e}),o)},vibrateLong:function(e){const n=t.build(e,t.hint("vibrateLong"));r.vibrateLong(n)},setClipboardData:function({data:e,message:n},o){const i=t.build(o,t.hint("setClipboardData"));r.setClipboardData(JSON.stringify({data:e,message:n}),i)},getClipboardData:function(e){const n=t.build(e,t.hint("getClipboardData"));r.getClipboardData(n)},onKeyboardPop:function(e){t.subscribe("onKeyboardPop",e)},allowContentOffSet:function({isNotAllow:e}){r.allowContentOffSet(JSON.stringify({isNotAllow:e}))},setKeepScreenOn:function({keepScreenOn:e},n){const o=t.build(n,t.hint("setKeepScreenOn"));r.setKeepScreenOn(JSON.stringify({keepScreenOn:e}),o)}}:(n("Device is null"),{})}),mu.exportable("bridgeDevice"),a("bridgeCamera",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=!(void 0===e()||!e().getCamera)&&e().getCamera();return r?{scanCode:function({onlyFromCamera:e,scanType:n},o){const{success:i,fail:a,complete:c}=o||{},s=t.build({success:function(e){i&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),i(e))},fail:a,complete:c},t.hint("scanCode"));r.scanCode(JSON.stringify({onlyFromCamera:e,scanType:n}),s)},getOcrResultFromCamera:function({ocrType:e},n){const{success:o,fail:i,complete:a}=n||{},c=t.build({success:function(e){o&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),o(e))},fail:i,complete:a},t.hint("getOcrResultFromCamera"));r.getOcrResultFromCamera(JSON.stringify({ocrType:e}),c)},getOcrResultFromGallery:function({ocrType:e,frontPath:n,backPath:o},i){const{success:a,fail:c,complete:s}=i||{},u=t.build({success:function(e){a&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),a(e))},fail:c,complete:s},t.hint("getOcrResultFromGallery"));r.getOcrResultFromGallery(JSON.stringify({ocrType:e,frontPath:n,backPath:o}),u)}}:(n("Camera is null"),{})}),pu.exportable("bridgeCamera"),a("bridgeFile",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=!(void 0===e()||!e().getFile)&&e().getFile();if(!r)return n("File is null"),{};const o={},i=function(e,n,r){if(!n)return r;const o=t.hint(e);return t.subscribe(o,n),o};return o.chooseImage=function({count:e,sizeType:n,sourceType:o,crop:i},a){const{success:c,fail:s,complete:u}=a||{},l=t.build({success:function(e){c&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),c(e))},fail:s,complete:u},t.hint("chooseImage"));r.chooseImage(JSON.stringify({count:e,sizeType:n,sourceType:o,crop:i}),l)},o.uploadImage=function({filePath:e,storageMode:t}){r.uploadImage(JSON.stringify({filePath:e,storageMode:t}),JSON.stringify({imageProgress:"onImageProgressUpdate",imageUpdateStatus:"onImageUpdateStatus"}))},o.onImageProgressUpdate=function(e){t.subscribe("onImageProgressUpdate",e)},o.onImageUpdateStatus=function(e){t.subscribe("onImageUpdateStatus",e)},o.chooseFile=function({count:e,select:n,crop:o},i){const{success:a,fail:c,complete:s}=i||{},u=t.build({success:function(e){a&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),e&&e.data&&e.data.file&&e.data.file.forEach(e=>{e.fileSize&&(e.fileSize=Number(e.fileSize))}),a(e))},fail:c,complete:s},t.hint("chooseFile"));r.chooseFile(JSON.stringify({count:e,select:n,crop:o}),u)},o.uploadFile=function({filePath:e,url:n,contentType:o,method:a,timeout:c,formData:s,header:u,name:l,success:d,fail:f,complete:g},p){const h=t.build(p,t.hint("uploadFile"));r.uploadFile(JSON.stringify({filePath:e,url:n,contentType:o,method:a,timeout:c,formData:s,header:u,name:l,success:i("success",d),fail:i("fail",f),complete:i("complete",g)}),h)},o.setFileUpdateListener=function({instanceId:e,listeners:t}){const{onFileProgress:n}=t||{};r.setFileUpdateListener(JSON.stringify({instanceId:e,listeners:{onFileProgress:i("onFileProgress",n)}}))},o.cancelUploadFile=function({instanceId:e},n){const{success:o,fail:i,complete:a}=n||{},c=t.build({success:function(e){o&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),o(e))},fail:i,complete:a},t.hint("cancelUploadFile"));r.cancelUploadFile(JSON.stringify({instanceId:e}),c)},o.downloadFile=function({url:e,header:n,timeout:o,filePath:a,fileName:c,isAcceptRange:s,success:u,fail:l,complete:d},f){const g=t.build(f,t.hint("downloadFile"));r.downloadFile(JSON.stringify({url:e,header:n,timeout:o,filePath:a,fileName:c,isAcceptRange:s,success:i("success",u),fail:i("fail",l),complete:i("complete",d)}),g)},o.cancelDownloadFile=function({instanceId:e},n){const{success:o,fail:i,complete:a}=n||{},c=t.build({success:function(e){o&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),o(e))},fail:i,complete:a},t.hint("cancelDownloadFile"));r.cancelDownloadFile(JSON.stringify({instanceId:e}),c)},o.setFileDownloadListener=function({instanceId:e,listeners:t}){const{onFileProgress:n}=t||{};r.setFileDownloadListener(JSON.stringify({instanceId:e,listeners:{onFileProgress:i("onFileDownloadProgress",n)}}))},o.loadResource=function({file:e},n){const{success:o,fail:i,complete:a}=n||{},c=t.build({success:function(e){o&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),o(e))},fail:i,complete:a},t.hint("loadResource"));r.loadResource(JSON.stringify({file:e}),c)},o.openDocument=function({filePath:e},n){const{success:o,fail:i,complete:a}=n||{},c=t.build({success:function(e){o&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),o(e))},fail:i,complete:a},t.hint("openDocument"));r.openDocument(JSON.stringify({filePath:e}),c)},o.saveFile=function({filePath:e,fileName:n,content:o},i){const{success:a,fail:c,complete:s}=i||{},u=t.build({success:function(e){a&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),a(e))},fail:c,complete:s},t.hint("saveFile"));r.saveFile(JSON.stringify({filePath:e,fileName:n,content:o}),u)},o}),bu.exportable("bridgeFile"),a("bridgeLocation",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=!(void 0===e()||!e().getLocation)&&e().getLocation();if(!r)return n("Location is null"),{};const o={getLocation:function({altitude:e,isHighAccuracy:n,expireTime:o},i){const{success:a,fail:c,complete:s}=i||{},u=t.build({success:function(e){a&&("string"==typeof e.data&&(e.data=JSON.parse(e.data)),a(e))},fail:function(e){c&&("string"==typeof e&&(e=JSON.parse(e)),c(e))},complete:s},t.hint("getLocation"));r.getLocation(JSON.stringify({altitude:e,isHighAccuracy:n,expireTime:o}),u)},operateCompass:function({action:e},n){const o=t.build(n,t.hint("operateCompass"));r.operateCompass(JSON.stringify({action:e}),o)},compassChange:function({action:e},n){const o=t.build(n,t.hint("compassChange"));r.compassChange(JSON.stringify({action:e,callback:"onCompassChange"}),o)},onCompassChange:function(e){t.subscribe("onCompassChange",e)},getMapData:function(e){const n=t.build(e,t.hint("getMapData"));r.getMapData(n)},getStaticMap:function({latitude:e,longitude:n,width:o,height:i,language:a,format:c},s){const u=t.build(s,t.hint("getStaticMap"));r.getStaticMap(JSON.stringify({latitude:e,longitude:n,width:o,height:i,format:c}),u)},openNavigationPage:function({latitude:e,longitude:n,name:o,address:i},a){const c=t.build(a,t.hint("openNavigationPage"));r.openNavigationPage(JSON.stringify({latitude:e,longitude:n,name:o,address:i}),c)}};return o}),vu.exportable("bridgeLocation"),a("bridgeAdvertisement",function(){const e=c("BOTBridge"),r=c("bridgeCallback"),o=!(void 0===e()||!e().getAdvertisement)&&e().getAdvertisement();if(!o)return n("Advertisement is null"),{};const i={},a=function(e,t,n){if(!t)return n;const o=r.hint(e);return r.subscribe(o,t),o};return i.createFloatingAd=function({adUnitId:e}){o.createFloatingAd(JSON.stringify({adUnitId:e}),JSON.stringify({onAdLoad:"onFloatingAdLoad",onAdError:"onFloatingAdError",onAdClose:"onFloatingAdClose",onAdClick:"onFloatingAdClick"}))},i.onFloatingAdLoad=function(e){r.subscribe("onFloatingAdLoad",e)},i.onFloatingAdError=function(e){r.subscribe("onFloatingAdError",e)},i.onFloatingAdClose=function(e){r.subscribe("onFloatingAdClose",e)},i.onFloatingAdClick=function(e){r.subscribe("onFloatingAdClick",e)},i.showFloatingAd=function({adUnitId:e},t){const n=r.build(t,r.hint("showFloatingAd"));o.showFloatingAd(JSON.stringify({adUnitId:e}),n)},i.hiddenFloatingAd=function({adUnitId:e},t){const n=r.build(t,r.hint("hiddenFloatingAd"));o.hiddenFloatingAd(JSON.stringify({adUnitId:e}),n)},i.createRewardedAd=function({rewardedAdKey:e},t){const n=r.build(t,r.hint("createRewardedAd"));o.createRewardedAd(JSON.stringify({rewardedAdKey:e}),n)},i.setRewardedAdListener=function({instanceId:e,listeners:t},n){const{onAdLoad:i,onAdShow:c,onAdError:s,onAdClose:u,onAdClick:l}=t||{},d=r.build(n,r.hint("setRewardedAdListener"));o.setRewardedAdListener(JSON.stringify({instanceId:e,listeners:{onAdLoad:a("onAdLoaded",i),onAdShow:a("onAdShow",c),onAdError:a("onAdError",s),onAdClose:a("onAdClose",u),onAdClick:a("onAdClick",l)}}),d)},i.loadRewardedAd=function({instanceId:e},t){const n=r.build(t,r.hint("loadRewardedAd"));o.loadRewardedAd(JSON.stringify({instanceId:e}),n)},i.showRewardedAd=function({instanceId:e,customData:t},n){const i=r.build(n,r.hint("showRewardedAd"));o.showRewardedAd(JSON.stringify({instanceId:e,customData:t}),i)},i.createNativeAd=function({adKey:e,width:t,height:n,adLayoutType:i,source:a},c){0===i&&(t=window.innerWidth,n=104);const s=r.build(c,r.hint("createNativeAd"));o.createNativeAd(JSON.stringify({adKey:e,width:t,height:n,adLayoutType:i,source:a}),s)},i.setNativeAdListeners=function({instanceId:e,listeners:t},n){const{onAdClose:i,onAdClick:c}=t||{},s=r.build(n,r.hint("setNativeAdListeners"));o.setNativeAdListeners(JSON.stringify({instanceId:e,listeners:{onAdClose:a("onAdClose",i),onAdClick:a("onAdClick",c)}}),s)},i.loadNativeAd=function({instanceId:e,listeners:t},n){const{onAdError:i,onAdLoad:c}=t||{},s=r.build(n,r.hint("loadNativeAd"));o.loadNativeAd(JSON.stringify({instanceId:e,listeners:{onAdLoad:a("onAdLoad",c),onAdError:a("onAdError",i)}}),s)},i.showNativeAd=function({instanceId:e,top:t,left:n,scale:i,listeners:a},c){const s=r.build(c,r.hint("showNativeAd"));o.showNativeAd(JSON.stringify({instanceId:e,scale:i,top:t,left:n}),s)},i.showCustomAd=function({instanceId:e,top:t,left:n,listeners:r},o){i.showNativeAd({instanceId:e,top:t,left:n,listeners:r},o)},i.destroyNativeAd=function({instanceId:e},t){const n=r.build(t,r.hint("destroyNativeAd"));o.destroyNativeAd(JSON.stringify({instanceId:e}),n)},i.destroyCustomAd=function({instanceId:e},t){i.destroyNativeAd({instanceId:e},t)},i.hiddenNativeAds=function({instanceIds:e},t){const n=r.build(t,r.hint("hiddenNativeAds"));o.hiddenNativeAds(JSON.stringify({instanceIds:e}),n)},i.hiddenCustomAds=function({instanceIds:e},t){i.hiddenNativeAds({instanceIds:e},t)},i.visibleNativeAds=function({instanceIds:e},t){const n=r.build(t,r.hint("visibleNativeAds"));o.visibleNativeAds(JSON.stringify({instanceIds:e}),n)},i.visibleCustomAds=function({instanceIds:e},t){i.visibleNativeAds({instanceIds:e},t)},i.loadCustomAd=function({adKey:e,width:n,height:i,adLayoutType:c,top:s,left:u,bottom:l,listeners:d,source:f}){const{adLoad:g,adError:p,adClose:h}=d||{};let m="";0!==c&&c||(c=0,n=window.innerWidth,i=104,0===l&&(s=document.documentElement.clientHeight-104),u=0);const b={success:e=>{m=e.data.instanceId;const n=r.build({success:()=>{}},r.hint("setNativeAdListeners"));o.setNativeAdListeners(JSON.stringify({instanceId:m,listeners:{onAdClose:a("onAdClose",function(){const t=r.build({success:()=>{},fail:()=>{}},r.hint("destroyNativeAd"));o.destroyNativeAd(JSON.stringify({instanceId:m}),t),h(e)})}}),n);const i={success:()=>{t("loadNativeAdCallback")},fail:e=>{p(e)}},c=r.build(i,r.hint("loadNativeAd"));o.loadNativeAd(JSON.stringify({instanceId:m,listeners:{onAdLoad:a("onAdLoad",function(){const e={success:()=>{g({data:{instanceId:m}})},fail:e=>{p(e)}},t=r.build(e,r.hint("showNativeAd"));o.showNativeAd(JSON.stringify({instanceId:m,top:s,left:u}),t)}),onAdError:a("onAdError",p)}}),c)},fail:e=>{p(e)}},v=r.build(b,r.hint("createNativeAd"));o.createNativeAd(JSON.stringify({adKey:e,width:n,height:i,adLayoutType:c,source:f}),v)},i}),gu.exportable("bridgeAdvertisement"),a("bridgeSolarSdk",function(){const e=c("BOTBridge"),t=c("bridgeEnvironment"),r=c("bridgeCallback"),o=!(void 0===e()||!e().getSolarSDK)&&e().getSolarSDK();if(!o)return n("SolarSDK is null"),{};const i={},a=new function(){let e;this.setId=function(t){e=t},this.getId=function(){return e}};return i.newSolar=function(){return{solarLoginApp:({appId:e,uid:t,token:n,type:i,rtmToken:a,rtmAppId:c},s)=>{const u=r.build(s,r.hint("solarLoginApp"));o.solarLoginApp(JSON.stringify({appId:e,uid:t,token:n,type:i,rtmToken:a,rtmAppId:c}),u)},loginApp:({appId:e,uid:t,token:n,type:i,rtmToken:a,rtmAppId:c},s)=>{const u=r.build(s,r.hint("solarLoginApp"));o.solarLoginApp(JSON.stringify({appId:e,uid:t,token:n,type:i,rtmToken:a,rtmAppId:c}),u)},solarJoinRoom:({audioOpen:e=!0,role:t=0,roomId:n,roomType:i,videoOpen:c=!1,creator:s},u)=>{const{success:l,fail:d,complete:f}=u,g=r.build({success:e=>{a.setId(n),l&&l(e)},fail:d,complete:f},r.hint("solarJoinRoom"));o.solarJoinRoom(JSON.stringify({audioOpen:e,role:t,roomId:n,roomType:i,videoOpen:c,creator:s}),g)},joinRoom:({audioOpen:e=!0,role:t=0,roomId:n,roomType:i,videoOpen:c=!1,creator:s},u)=>{const{success:l,fail:d,complete:f}=u,g=r.build({success:e=>{a.setId(n),l&&l(e)},fail:d,complete:f},r.hint("solarJoinRoom"));o.solarJoinRoom(JSON.stringify({audioOpen:e,role:t,roomId:n,roomType:i,videoOpen:c,creator:s}),g)},solarLeaveRoom:e=>{const t=r.build(e,r.hint("solarLeaveRoom")),n=a.getId();o.solarLeaveRoom(JSON.stringify({roomId:n}),t)},leaveRoom:e=>{const t=r.build(e,r.hint("solarLeaveRoom")),n=a.getId();o.solarLeaveRoom(JSON.stringify({roomId:n}),t)},solarAudioActive:({active:e},t)=>{const n=r.build(t,r.hint("solarAudioActive")),i=a.getId();o.solarAudioActive(JSON.stringify({active:e,roomId:i}),n)},setMuted:({active:e},t)=>{const n=r.build(t,r.hint("solarAudioActive")),i=a.getId();o.solarAudioActive(JSON.stringify({active:e,roomId:i}),n)},solarVideoActive:({active:e},t)=>{const n=r.build(t,r.hint("solarVideoActive")),i=a.getId();o.solarVideoActive(JSON.stringify({active:e,roomId:i}),n)},solarSwitchSpeaker:({useSpeaker:e},t)=>{const n=r.build(t,r.hint("solarSwitchSpeaker")),i=a.getId();o.solarSwitchSpeaker(JSON.stringify({useSpeaker:e,roomId:i}),n)},switchSpeaker:({useSpeaker:e},t)=>{const n=r.build(t,r.hint("solarSwitchSpeaker")),i=a.getId();o.solarSwitchSpeaker(JSON.stringify({useSpeaker:e,roomId:i}),n)},solarLogout:e=>{const t=r.build(e,r.hint("solarLogout")),n=a.getId();o.solarLogout(JSON.stringify({roomId:n}),t)},logout:e=>{const t=r.build(e,r.hint("solarLogout")),n=a.getId();o.solarLogout(JSON.stringify({roomId:n}),t)},solarMuteRemoteAudioStream:({uid:e,mute:t},n)=>{const i=r.build(n,r.hint("solarMuteRemoteAudioStream")),c=a.getId();o.solarMuteRemoteAudioStream(JSON.stringify({uid:e,roomId:c,mute:t}),i)},muteRemoteAudioStream:({uid:e,mute:t},n)=>{const i=r.build(n,r.hint("solarMuteRemoteAudioStream")),c=a.getId();o.solarMuteRemoteAudioStream(JSON.stringify({uid:e,roomId:c,mute:t}),i)},solarChangeRemoteVideoStream:({subscribe:e,uid:t},n)=>{const i=r.build(n,r.hint("solarChangeRemoteVideoStream")),c=a.getId();o.solarChangeRemoteVideoStream(JSON.stringify({subscribe:e,uid:t,roomId:c}),i)},changeRemoteVideoStream:({subscribe:e,uid:t},n)=>{const i=r.build(n,r.hint("solarChangeRemoteVideoStream")),c=a.getId();o.solarChangeRemoteVideoStream(JSON.stringify({subscribe:e,uid:t,roomId:c}),i)},solarVideoHDAvailable:({uid:e},t)=>{const n=r.build(t,r.hint("solarVideoHDAvailable")),i=a.getId();o.solarVideoHDAvailable(JSON.stringify({uid:e,roomId:i}),n)},solarVideoHDType:({uid:e},t)=>{const n=r.build(t,r.hint("solarVideoHDType")),i=a.getId();o.solarVideoHDType(JSON.stringify({uid:e,roomId:i}),n)},solarSwitchHD:({uid:e},t)=>{const n=r.build(t,r.hint("solarSwitchHD")),i=a.getId();o.solarSwitchHD(JSON.stringify({uid:e,roomId:i}),n)},solarSwitchLD:({uid:e},t)=>{const n=r.build(t,r.hint("solarSwitchLD")),i=a.getId();o.solarSwitchLD(JSON.stringify({uid:e,roomId:i}),n)},solarSwitchCamera:({useFront:e},t)=>{const n=r.build(t,r.hint("solarSwitchCamera")),i=a.getId();o.solarSwitchCamera(JSON.stringify({roomId:i,useFront:e}),n)},solarSendAppMessage:({message:e},t)=>{const n=r.build(t,r.hint("solarSendAppMessage")),i=a.getId();o.solarSendAppMessage(JSON.stringify({roomId:i,message:e}),n)},solarMicEnable:e=>{const t=r.build(e,r.hint("solarMicEnable")),n=a.getId();o.solarMicEnable(JSON.stringify({roomId:n}),t)},solarSetupVideo:({uid:e,type:t,show:n},i)=>{const c=r.build(i,r.hint("solarSetupVideo")),s=a.getId();o.solarSetupVideo(JSON.stringify({uid:e,roomId:s,type:t,show:n}),c)},solarApplyMic:e=>{const t=r.build(e,r.hint("solarApplyMic"));o.solarApplyMic(t)},solarCancelMic:e=>{const t=r.build(e,r.hint("solarCancelMic"));o.solarCancelMic(t)},solarConfirmApplyMic:({refUid:e,confirm:t},n)=>{const i=r.build(n,r.hint("solarConfirmApplyMic"));o.solarConfirmApplyMic(JSON.stringify({refUid:e,confirm:t}),i)},solarInviteMic:({refUid:e},t)=>{const n=r.build(t,r.hint("solarInviteMic"));o.solarInviteMic(JSON.stringify({refUid:e}),n)},solarCancelInviting:({refUid:e},t)=>{const n=r.build(t,r.hint("solarCancelInviting"));o.solarCancelInviting(JSON.stringify({refUid:e}),n)},solarInviteConfirm:({refUid:e,confirm:t},n)=>{const i=r.build(n,r.hint("solarInviteConfirm"));o.solarInviteConfirm(JSON.stringify({refUid:e,confirm:t}),i)},solarKickoutMic:({refUid:e},t)=>{const n=r.build(t,r.hint("solarKickoutMic"));o.solarKickoutMic(JSON.stringify({refUid:e}),n)},solarLayDownMic:e=>{const t=r.build(e,r.hint("solarLayDownMic"));o.solarLayDownMic(t)},addSolarEngineListener:()=>{o.addSolarEngineListener()},getSolarLifeCycle:({appId:e},t)=>{const n=r.build(t,r.hint("getSolarLifeCycle"));o.getSolarLifeCycle(JSON.stringify({appId:e}),n)},addSolarEventListener:e=>{t.isAndroid()&&o.addSolarEngineListener(),r.subscribe("addSolarEventListener",e)},addEventListener:e=>{t.isAndroid()&&o.addSolarEngineListener(),r.subscribe("addSolarEventListener",e)}}},i}),Nu.exportable("bridgeSolarSdk"),a("bridgeWebsocket",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=!(void 0===e()||!e().getWebSocket)&&e().getWebSocket();if(!r)return n("WebSocket is null"),{};const o={stack:[]};class i{constructor(e,t,n){this.url=e,this.name=t,this.readyState=n,this.message="",this.errorMessage="",this.errorCode=""}}return o.checkSocket=function({name:e}){if(e)return o.stack.find(t=>t.name===e);n("You should provide at least one param name")},o.checkAllSocket=function(){return o.stack},o.connectSocket=function({url:e,name:a,header:c,protocols:s,tcpNoDelay:u,perMessageDeflate:l,timeout:d,maxCount:f},g){if(!e||!a)return void n("params url and name must be exist!");const{success:p,fail:h,complete:m}=g,b=t.build({success:t=>{const n=new i(e,a,1);o.stack.some(e=>e.name===n.name)||o.stack.push(n),p&&p(t)},fail:h,complete:m},t.hint("connectSocket"));r.connectSocket(JSON.stringify({url:e,name:a,header:c,protocols:s,tcpNoDelay:u,perMessageDeflate:l,timeout:d,maxCount:f}),JSON.stringify({onMessage:"onSocketMessage",onOpen:"onSocketOpen",onClose:"onSocketClose",onError:"onSocketError"}),b)},o.socketEnable=function({actions:e},n){const o=t.build(n,t.hint("socketEnable"));r.socketEnable(JSON.stringify({actions:e}),o)},o.onSocketMessage=function(e,r){let i=null;t.subscribe("onSocketMessage",t=>(e||(i=t),(t.data.name||t.data.url)&&o.stack.forEach(n=>{n.name===t.data.name&&(n.message=t.data.message,n.readyState=1),e&&e===n.name&&(i=n)}),e&&!i&&n("You params name may be not exist"),r(i)))},o.onSocketOpen=function(e){t.subscribe("onSocketOpen",t=>{const{url:n,isOpen:r,name:i}=t;o.stack.forEach(e=>{e.name===i&&(e.readyState=r?1:0)}),e(t)})},o.onSocketClose=function(e){t.subscribe("onSocketClose",t=>(t.data.name&&(o.stack=o.stack.filter(e=>e.name!==t.data.name)),e(t)))},o.onSocketError=function(e){t.subscribe("onSocketError",t=>{t.data.name&&o.stack.forEach(e=>{e.name===t.data.name&&(e.errorMessage=t.data.errorMessage,e.errorCode=t.data.code,e.readyState=0)}),e(t)})},o.socketSend=function({url:e,name:o,data:i},a){if(!o)return void n("params name must be exist");const c=t.build(a,t.hint("socketSend"));r.socketSend(JSON.stringify({url:e,name:o,data:i}),c)},o.socketClose=function(e,i){if(!e.name)return void n("params name must be exist");const{success:a,fail:c,complete:s}=i,u=t.build({success:t=>{e.name&&(o.stack=o.stack.filter(t=>t.name!==e.name)),a(t)},fail:c,complete:s},t.hint("socketSend"));r.socketClose(JSON.stringify(e),u)},o.socketPool=function(e){const n=t.build(e,t.hint("socketPool"));r.socketPool(n)},o.socketPing=function(e,n){const o=t.build(n,t.hint("socketPing"));r.socketSend(JSON.stringify(e),o)},o.onSocketPong=function(e){t.subscribe("onSocketPong",e)},o}),Lu.exportable("bridgeWebsocket"),a("bridgeSocketIo",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=!(void 0===e()||!e().getSocketIO)&&e().getSocketIO();return r?{stack:[],socketIoConnect:function(e,n){const o=t.build(n,t.hint("socketIoConnect"));r.socketIoConnect(JSON.stringify(e),JSON.stringify({onConnect:"onSocketIoConnect",onDisconnect:"onSocketIoDisconnect",onError:"onSocketIoError",onMessage:"onSocketIoMessage"}),o)},socketIoEnable:function({actions:e},n){const o=t.build(n,t.hint("socketIoEnable"));r.socketIoEnable(JSON.stringify({actions:e}),o)},onSocketIoMessage:function(e){t.subscribe("onSocketIoMessage",e)},onSocketIoConnect:function(e){t.subscribe("onSocketIoConnect",e)},onSocketIoDisconnect:function(e){t.subscribe("onSocketIoDisconnect",e)},onSocketIoError:function(e){t.subscribe("onSocketIoError",e)},socketIoSend:function({url:e,data:n},o){const i=t.build(o,t.hint("socketIoSend"));r.socketIoSend(JSON.stringify({url:e,data:n}),i)},socketIoClose:function({url:e,code:n,reason:o},i){const a=t.build(i,t.hint("socketIoClose"));r.socketIoClose(JSON.stringify({url:e,code:n,reason:o}),a)},socketIoPool:function(e){const n=t.build(e,t.hint("socketIoPool"));r.socketIoPool(n)},addSocketIOEventListener:function(e){t.subscribe("addSocketIOEventListener",e)}}:(n("socketIO is null"),{})}),Pu.exportable("bridgeSocketIo"),a("bridgeMedia",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=!(void 0===e()||!e().getMedia)&&e().getMedia();return r?{playVoice:function({path:e,looping:n,mode:o},i){const a=t.build(i,t.hint("playVoice"));r.playVoice(JSON.stringify({path:e,looping:n,mode:o}),a)},stopVoice:function({path:e},n){const o=t.build(n,t.hint("stopVoice"));r.stopVoice(o)},saveImageToPhotosAlbum:function({filePath:e},n){const o=t.build(n,t.hint("saveImageToPhotosAlbum"));r.saveImageToPhotosAlbum(JSON.stringify({filePath:e}),o)}}:(n("Media is null"),{})}),yu.exportable("bridgeMedia"),a("bridgeRTCSDK",function(){const e=c("BOTBridge"),t=c("bridgeCallback"),r=!(void 0===e()||!e().getRTCSDK)&&e().getRTCSDK();return r?{newRTC:function(){return{initEngine:({appId:e,uid:n,roomId:o,token:i},a)=>{const c=t.build(a,t.hint("initEngine"));r.initEngine(JSON.stringify({appId:e,uid:n,roomId:o,token:i}),c)},isInited:e=>{const n=t.build(e,t.hint("isInited"));r.isInited(n)},destroyEngine:()=>{r.destroyEngine()},updateToken:e=>{const n=t.build(e,t.hint("updateToken"));r.updateToken(n)},joinRoom:({audioOpen:e,videoOpen:n,audioDevice:o},i)=>{const a=t.build(i,t.hint("joinRoom"));r.joinRoom(JSON.stringify({audioOpen:e,videoOpen:n,audioDevice:o}),a)},pauseStream:({keepAlive:e},n)=>{const o=t.build(n,t.hint("pauseStream"));r.pauseStream(JSON.stringify({keepAlive:e}),o)},resumeStream:e=>{const n=t.build(e,t.hint("resumeStream"));r.resumeStream(n)},sendAppSignal:({signal:e},n)=>{const o=t.build(n,t.hint("sendAppSignal"));r.sendAppSignal(JSON.stringify({signal:e}),o)},leaveRoom:e=>{const n=t.build(e,t.hint("leaveRoom"));r.leaveRoom(n)},changeAudioDevice:e=>{const n=t.build(e,t.hint("changeAudioDevice"));r.changeAudioDevice(n)},getAudioDevice:e=>{const n=t.build(e,t.hint("getAudioDevice"));r.getAudioDevice(n)},enableLocalAudio:({enabled:e},n)=>{const o=t.build(n,t.hint("enableLocalAudio"));r.enableLocalAudio(JSON.stringify({enabled:e}),o)},enableLocalVideo:({enabled:e},n)=>{const o=t.build(n,t.hint("enableLocalVideo"));r.enableLocalVideo(JSON.stringify({enabled:e}),o)},muteLocalAudioStream:({muted:e},n)=>{const o=t.build(n,t.hint("muteLocalAudioStream"));r.muteLocalAudioStream(JSON.stringify({muted:e}),o)},muteLocalVideoStream:({muted:e},n)=>{const o=t.build(n,t.hint("muteLocalVideoStream"));r.muteLocalVideoStream(JSON.stringify({muted:e}),o)},muteRemoteAudioStream:({uid:e,muted:n},o)=>{const i=t.build(o,t.hint("muteRemoteAudioStream"));r.muteRemoteAudioStream(JSON.stringify({uid:e,muted:n}),i)},muteRemoteVideoStream:({uid:e,muted:n},o)=>{const i=t.build(o,t.hint("muteRemoteVideoStream"));r.muteRemoteVideoStream(JSON.stringify({uid:e,muted:n}),i)},muteAllRemoteAudioStream:({muted:e},n)=>{const o=t.build(n,t.hint("muteAllRemoteAudioStream"));r.muteAllRemoteAudioStream(JSON.stringify({muted:e}),o)},muteAllRemoteVideoStream:({muted:e},n)=>{const o=t.build(n,t.hint("muteAllRemoteVideoStream"));r.muteAllRemoteVideoStream(JSON.stringify({muted:e}),o)},switchCamera:({useFront:e},n)=>{const o=t.build(n,t.hint("switchCamera"));r.switchCamera(JSON.stringify({useFront:e}),o)},setupVideo:({uid:e,type:n,show:o,layout:i,mode:a,corner:c,border:s,background:u},l)=>{const d=t.build(l,t.hint("setupVideo"));r.setupVideo(JSON.stringify({uid:e,type:n,show:o,layout:i,mode:a,corner:c,border:s,background:u}),d)},sendAppMessage:({toUid:e,message:n},o)=>{const i=t.build(o,t.hint("sendAppMessage"));r.sendAppMessage(JSON.stringify({toUid:e,message:n}),i)},getSpeakingLevel:({uid:e},n)=>{const o=t.build(n,t.hint("getSpeakingLevel"));r.getSpeakingLevel(JSON.stringify({uid:e}),o)},getSdkVersion:e=>{const n=t.build(e,t.hint("getSdkVersion"));r.getSdkVersion(n)},setBackgroundImage:({type:e,url:n},o)=>{const i=t.build(o,t.hint("setBackgroundImage"));r.setBackgroundImage(JSON.stringify({type:e,url:n}),i)},getNetworkState:e=>{const n=t.build(e,t.hint("getNetworkState"));r.getNetworkState(n)},getConnectState:({direction:e},n)=>{const o=t.build(n,t.hint("getConnectState"));r.getConnectState(JSON.stringify({direction:e}),o)},showDebugView:({show:e},n)=>{const o=t.build(n,t.hint("showDebugView"));r.showDebugView(JSON.stringify({show:e}),o)},getVoipState:e=>{const n=t.build(e,t.hint("getVoipState"));r.getVoipState(n)},updateConfiguration:({keepAliveOnDestroyed:e,mpName:n,callMode:o},i)=>{const a=t.build(i,t.hint("updateConfiguration"));r.updateConfiguration(JSON.stringify({keepAliveOnDestroyed:e,mpName:n,callMode:o}),a)},getRoomInfo:({mpName:e},n)=>{const o=t.build(n,t.hint("getRoomInfo"));r.getRoomInfo(JSON.stringify({mpName:e}),o)},getAllPluginTools:({tools:e},n)=>{const o=t.build(n,t.hint("getAllPluginTools"));r.getAllPluginTools(JSON.stringify({tools:e}),o)},callPluginTool:({callId:e,functionName:n,args:o},i)=>{const a=t.build(i,t.hint("callPluginTool"));r.callPluginTool(JSON.stringify({callId:e,functionName:n,args:o}),a)},addRtcEventListener:e=>{t.subscribe("addRtcEventListener",e)}}}}:(n("RtcSDK is null"),{})}),Ou.exportable("bridgeRTCSDK")}let Hu=null,Ku=!1;function Wu(e,r){if(Hu)return e(Hu);if(Ku||(Js(),Ks(),Zs(),ru(),fu(),a("BOTBridge",function(){const e=c("bridgeAdapterJSInterface"),t=c("bridgeAdapterLazyJSInterface"),n=c("bridgeAdapterPromptIntercept"),r=c("bridgeAdapterWebkitPostMessage"),o=function(){return e||t||n||r||void 0};let i;return o.checkAPILevel=function(e,t){if(void 0===i){if(!o()){if(t)throw"API@"+e+" factory not found";return!1}i=o().getAPILevel()}if(void 0===i){if(t)throw"API@"+e+" undefined";return!1}if(e>i){if(t)throw"require minimal API@"+e+", but "+i;return!1}return!0},o.checkImpl=Bs.checkImpl,o.getCurrentAdapter=iu,o}),Ku=!0),!r){const e=iu("bridge");"bridge"===(r=e?"bridge":"browser")&&t("auto-detected bridge mode")}const o=iu(r);o||"browser"===r||(n("all bridge checker failed, force using browser mode"),r="browser"),o&&o.isReady&&!o.isReady()?setTimeout(function(){Wu(e,r)},100):(o&&o.isReady&&n("adapter is loaded, continue."),"browser"===r?Vu():zu(),Hu=Bs.link(),Hu.setTimeout=setTimeout,Hu.setInterval=setInterval,Hu._=Cs,window._=Cs,Hu.checkImpl=Bs.checkImpl,Hu.__nucleus_version__="1.0.0",t("bootstrap ok"),c("Environment").onFrameworkReady(),e(Hu))}function Gu(e,t){t&&(window.logDebug=!0),Wu(function(t){try{e.apply({},[{},t]),c("Environment").onPageReady()}catch(e){r("[NUCLEUS] PAGE FATAL ERROR",e),c("Environment").onPageFatal(e)}})}function $u(e,n){Wu(function(o){try{n.apply({},[{},o]),t("[NUCLEUS] "+e+" PAGE LOADED"),c("Environment").onPageReady()}catch(t){r("[NUCLEUS] "+e+" PAGE FATAL ERROR",t),c("Environment").onPageFatal(t)}})}function qu(){}function Yu(){}function Zu(){}function Qu(){}function Xu(){}var el={Run:Gu,Page:$u,config:qu,directive:Yu,factory:Zu,provider:Qu,run:Xu};export{$u as Page,Gu as Run,qu as config,el as default,Yu as directive,Zu as factory,Qu as provider,Xu as run};
|
|
2
|
+
//# sourceMappingURL=nucleus.esm.js.map
|