!function(e,t){var n,i,r,o,a,s,c,l,u,f,d,h,p,v,g,m,_,y=["entityKeys","collectionPointId"],b=["entityKeys","wid"];function E(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function w(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function S(e){for(var t=1;t=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;w(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}function R(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}function O(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){R(o,i,r,a,s,"next",e)}function s(e){R(o,i,r,a,s,"throw",e)}a(void 0)}))}}function I(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}function M(e){var t=G();return function(){var n,i=j(e);if(t){var r=j(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return P(this,n)}}function P(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return N(e)}function N(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U(e){var t="function"==typeof Map?new Map:void 0;return U=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return B(e,arguments,j(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),L(n,e)},U(e)}function B(e,t,n){return B=G()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&L(r,n.prototype),r},B.apply(null,arguments)}function G(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function F(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=K(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function K(e,t){if(e){if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */}void 0===Element.prototype.getAttributeNames&&(Element.prototype.getAttributeNames=function(){for(var e=this.attributes,t=e.length,n=new Array(t),i=0;i>>0,1)}},{key:"_$Eg",value:function(){var e=this;this.constructor.elementProperties.forEach((function(t,n){e.hasOwnProperty(n)&&(e._$Ei.set(n,e[n]),delete e[n])}))}},{key:"createRenderRoot",value:function(){var e,t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return function(e,t){Q?e.adoptedStyleSheets=t.map((function(e){return e instanceof CSSStyleSheet?e:e.styleSheet})):t.forEach((function(t){var n=document.createElement("style"),i=Y.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=t.cssText,e.appendChild(n)}))}(t,this.constructor.elementStyles),t}},{key:"connectedCallback",value:function(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((function(e){var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}},{key:"enableUpdating",value:function(e){}},{key:"disconnectedCallback",value:function(){var e;null===(e=this._$ES)||void 0===e||e.forEach((function(e){var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}},{key:"attributeChangedCallback",value:function(e,t,n){this._$AK(e,n)}},{key:"_$EO",value:function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:fe,r=this.constructor._$Ep(e,i);if(void 0!==r&&!0===i.reflect){var o=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:le).toAttribute(t,i.type);this._$El=e,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}},{key:"_$AK",value:function(e,t){var n,i=this.constructor,r=i._$Ev.get(e);if(void 0!==r&&this._$El!==r){var o=i.getPropertyOptions(r),a="function"==typeof o.converter?{fromAttribute:o.converter}:void 0!==(null===(n=o.converter)||void 0===n?void 0:n.fromAttribute)?o.converter:le;this._$El=r,this[r]=a.fromAttribute(t,o.type),this._$El=null}}},{key:"requestUpdate",value:function(e,t,n){var i=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||ue)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}},{key:"_$Ej",value:(t=O(D().mark((function e(){var t;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isUpdatePending=!0,e.prev=1,e.next=4,this._$E_;case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),Promise.reject(e.t0);case 9:if(t=this.scheduleUpdate(),e.t1=null!=t,!e.t1){e.next=14;break}return e.next=14,t;case 14:return e.abrupt("return",!this.isUpdatePending);case 15:case"end":return e.stop()}}),e,this,[[1,6]])}))),function(){return t.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){var e,t=this;if(this.isUpdatePending){this.hasUpdated,this._$Ei&&(this._$Ei.forEach((function(e,n){return t[n]=e})),this._$Ei=void 0);var n=!1,i=this._$AL;try{(n=this.shouldUpdate(i))?(this.willUpdate(i),null===(e=this._$ES)||void 0===e||e.forEach((function(e){var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(i)):this._$Ek()}catch(e){throw n=!1,this._$Ek(),e}n&&this._$AE(i)}}},{key:"willUpdate",value:function(e){}},{key:"_$AE",value:function(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((function(e){var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}},{key:"_$Ek",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$E_}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){var t=this;void 0!==this._$EC&&(this._$EC.forEach((function(e,n){return t._$EO(n,t[n],e)})),this._$EC=void 0),this._$Ek()}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}}],[{key:"addInitializer",value:function(e){var t;null!==(t=this.h)&&void 0!==t||(this.h=[]),this.h.push(e)}},{key:"observedAttributes",get:function(){var e=this;this.finalize();var t=[];return this.elementProperties.forEach((function(n,i){var r=e._$Ep(i,n);void 0!==r&&(e._$Ev.set(r,i),t.push(r))})),t}},{key:"createProperty",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fe;if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){var n="symbol"==J(e)?Symbol():"__"+e,i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Object.defineProperty(this.prototype,e,i)}}},{key:"getPropertyDescriptor",value:function(e,t,n){return{get:function(){return this[t]},set:function(i){var r=this[e];this[t]=i,this.requestUpdate(e,r,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){return this.elementProperties.get(e)||fe}},{key:"finalize",value:function(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;var e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){var t,n=this.properties,i=F([].concat(C(Object.getOwnPropertyNames(n)),C(Object.getOwnPropertySymbols(n))));try{for(i.s();!(t=i.n()).done;){var r=t.value;this.createProperty(r,n[r])}}catch(e){i.e(e)}finally{i.f()}}return this.elementStyles=this.finalizeStyles(this.styles),!0}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e)){var n,i=F(new Set(e.flat(1/0).reverse()));try{for(i.s();!(n=i.n()).done;){var r=n.value;t.unshift(re(r))}}catch(e){i.e(e)}finally{i.f()}}else void 0!==e&&t.push(re(e));return t}},{key:"_$Ep",value:function(e,t){var n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}}]),i}(U(HTMLElement));de.finalized=!0,de.elementProperties=new Map,de.elementStyles=[],de.shadowRootOptions={mode:"open"},null==ce||ce({ReactiveElement:de}),(null!==(X=oe.reactiveElementVersions)&&void 0!==X?X:oe.reactiveElementVersions=[]).push("1.4.1");var he=window,pe=he.trustedTypes,ve=pe?pe.createPolicy("lit-html",{createHTML:function(e){return e}}):void 0,ge="lit$".concat((Math.random()+"").slice(9),"$"),me="?"+ge,_e="<".concat(me,">"),ye=document,be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return ye.createComment(e)},Ee=function(e){return null===e||"object"!=J(e)&&"function"!=typeof e},we=Array.isArray,ke=function(e){return we(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator])},Se=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xe=/-->/g,Te=/>/g,Ae=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),ze=/'/g,Ce=/"/g,De=/^(?:script|style|textarea|title)$/i,Re=function(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r":"",a=Se,s=0;s"===u[0]?(a=null!=n?n:Se,f=-1):void 0===u[1]?f=-2:(f=a.lastIndex-u[2].length,l=u[1],a=void 0===u[3]?Ae:'"'===u[3]?Ce:ze):a===Ce||a===ze?a=Ae:a===xe||a===Te?a=Se:(a=Ae,n=void 0);var h=a===Ae&&e[s+1].startsWith("/>")?" ":"";o+=a===Se?c+_e:f>=0?(r.push(l),c.slice(0,f)+"$lit$"+c.slice(f)+ge+h):c+ge+(-2===f?(r.push(void 0),s):h)}var p=o+(e[i]||"")+(2===t?"":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==ve?ve.createHTML(p):p,r]}(r,o),f=z(u,2),d=f[0],h=f[1];if(this.el=e.createElement(d,n),Pe.currentNode=this.el.content,2===o){var p=this.el.content,v=p.firstChild;v.remove(),p.append.apply(p,C(v.childNodes))}for(;null!==(i=Pe.nextNode())&&l.length0){i.textContent=pe?pe.emptyScript:"";for(var D=0;D2&&void 0!==arguments[2]?arguments[2]:e,s=arguments.length>3?arguments[3]:void 0;if(t===Oe)return t;var c=void 0!==s?null===(n=a._$Cl)||void 0===n?void 0:n[s]:a._$Cu,l=Ee(t)?void 0:t._$litDirective$;return(null==c?void 0:c.constructor)!==l&&(null===(i=null==c?void 0:c._$AO)||void 0===i||i.call(c,!1),void 0===l?c=void 0:(c=new l(e))._$AT(e,a,s),void 0!==s?(null!==(r=(o=a)._$Cl)&&void 0!==r?r:o._$Cl=[])[s]=c:a._$Cu=c),void 0!==c&&(t=Ue(e,c._$AS(e,t.values),c,s)),t}var Be,Ge,Le=function(){function e(t,n){V(this,e),this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=n}return $(e,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"p",value:function(e){var t,n=this._$AD,i=n.el.content,r=n.parts,o=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:ye).importNode(i,!0);Pe.currentNode=o;for(var a=Pe.nextNode(),s=0,c=0,l=r[0];void 0!==l;){if(s===l.index){var u=void 0;2===l.type?u=new je(a,a.nextSibling,this,e):1===l.type?u=new l.ctor(a,l.name,l.strings,this,e):6===l.type&&(u=new $e(a,this,e)),this.v.push(u),l=r[++c]}s!==(null==l?void 0:l.index)&&(a=Pe.nextNode(),s++)}return o}},{key:"m",value:function(e){var t,n=0,i=F(this.v);try{for(i.s();!(t=i.n()).done;){var r=t.value;void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,n),n+=r.strings.length-2):r._$AI(e[n])),n++}}catch(e){i.e(e)}finally{i.f()}}}]),e}(),je=function(){function e(t,n,i,r){var o;V(this,e),this.type=2,this._$AH=Ie,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=i,this.options=r,this._$C_=null===(o=null==r?void 0:r.isConnected)||void 0===o||o}return $(e,[{key:"_$AU",get:function(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$C_}},{key:"parentNode",get:function(){var e=this._$AA.parentNode,t=this._$AM;return void 0!==t&&11===e.nodeType&&(e=t.parentNode),e}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;e=Ue(this,e,t),Ee(e)?e===Ie||null==e||""===e?(this._$AH!==Ie&&this._$AR(),this._$AH=Ie):e!==this._$AH&&e!==Oe&&this.$(e):void 0!==e._$litType$?this.T(e):void 0!==e.nodeType?this.k(e):ke(e)?this.O(e):this.$(e)}},{key:"S",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._$AB;return this._$AA.parentNode.insertBefore(e,t)}},{key:"k",value:function(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}},{key:"$",value:function(e){this._$AH!==Ie&&Ee(this._$AH)?this._$AA.nextSibling.data=e:this.k(ye.createTextNode(e)),this._$AH=e}},{key:"T",value:function(e){var t,n=e.values,i=e._$litType$,r="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=Ne.createElement(i.h,this.options)),i);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===r)this._$AH.m(n);else{var o=new Le(r,this),a=o.p(this.options);o.m(n),this.k(a),this._$AH=o}}},{key:"_$AC",value:function(e){var t=Me.get(e.strings);return void 0===t&&Me.set(e.strings,t=new Ne(e)),t}},{key:"O",value:function(t){we(this._$AH)||(this._$AH=[],this._$AR());var n,i,r=this._$AH,o=0,a=F(t);try{for(a.s();!(i=a.n()).done;){var s=i.value;o===r.length?r.push(n=new e(this.S(be()),this.S(be()),this,this.options)):n=r[o],n._$AI(s),o++}}catch(e){a.e(e)}finally{a.f()}o0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,n);t&&t!==this._$AB;){var i=t.nextSibling;t.remove(),t=i}}},{key:"setConnected",value:function(e){var t;void 0===this._$AM&&(this._$C_=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}]),e}(),Fe=function(){function e(t,n,i,r,o){V(this,e),this.type=1,this._$AH=Ie,this._$AN=void 0,this.element=t,this.name=n,this._$AM=r,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Ie}return $(e,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=this.strings,o=!1;if(void 0===r)e=Ue(this,e,t,0),(o=!Ee(e)||e!==this._$AH&&e!==Oe)&&(this._$AH=e);else{var a,s,c=e;for(e=r[0],a=0;a1&&void 0!==arguments[1]?arguments[1]:this;if((e=null!==(t=Ue(this,e,n,0))&&void 0!==t?t:Ie)!==Oe){var i=this._$AH,r=e===Ie&&i!==Ie||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==Ie&&(i===Ie||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}}},{key:"handleEvent",value:function(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==n?n:this.element,e):this._$AH.handleEvent(e)}}]),n}(Fe),$e=function(){function e(t,n,i){V(this,e),this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}return $(e,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e){Ue(this,e)}}]),e}(),Je=he.litHtmlPolyfillSupport;null==Je||Je(Ne,je),(null!==(Z=he.litHtmlVersions)&&void 0!==Z?Z:he.litHtmlVersions=[]).push("2.3.1");var We=function(e){I(n,e);var t=M(n);function n(){var e;return V(this,n),(e=t.apply(this,arguments)).renderOptions={host:N(e)},e._$Do=void 0,e}return $(n,[{key:"createRenderRoot",value:function(){var e,t,i=T(j(n.prototype),"createRenderRoot",this).call(this);return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=i.firstChild),i}},{key:"update",value:function(e){var t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),T(j(n.prototype),"update",this).call(this,e),this._$Do=function(e,t,n){var i,r,o=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:t,a=o._$litPart$;if(void 0===a){var s=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:null;o._$litPart$=a=new je(t.insertBefore(be(),s),s,void 0,null!=n?n:{})}return a._$AI(e),a}(t,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var e;T(j(n.prototype),"connectedCallback",this).call(this),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var e;T(j(n.prototype),"disconnectedCallback",this).call(this),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}},{key:"render",value:function(){return Oe}}]),n}(de);We.finalized=!0,We._$litElement$=!0,null===(Be=globalThis.litElementHydrateSupport)||void 0===Be||Be.call(globalThis,{LitElement:We});var Xe=globalThis.litElementPolyfillSupport;null==Xe||Xe({LitElement:We}),(null!==(Ge=globalThis.litElementVersions)&&void 0!==Ge?Ge:globalThis.litElementVersions=[]).push("3.2.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ var Ze,Ye=1,Qe=2,et=function(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");return P(i)}return $(n,[{key:"render",value:function(e){return" "+Object.keys(e).filter((function(t){return e[t]})).join(" ")+" "}},{key:"update",value:function(e,t){var n,i,r=this,o=z(t,1)[0];if(void 0===this.nt){for(var a in this.nt=new Set,void 0!==e.strings&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter((function(e){return""!==e})))),o)o[a]&&!(null===(n=this.st)||void 0===n?void 0:n.has(a))&&this.nt.add(a);return this.render(o)}var s=e.element.classList;for(var c in this.nt.forEach((function(e){e in o||(s.remove(e),r.nt.delete(e))})),o){var l=!!o[c];l===this.nt.has(c)||(null===(i=this.st)||void 0===i?void 0:i.has(c))||(l?(s.add(c),this.nt.add(c)):(s.remove(c),this.nt.delete(c)))}return Oe}}]),n}(tt)),it=function(e){return function(t){return"function"==typeof t?function(e,t){return customElements.define(e,t),t}(e,t):function(e,t){return{kind:t.kind,elements:t.elements,finisher:function(t){customElements.define(e,t)}}}(e,t)}};function rt(e){return function(t,n){return void 0!==n?function(e,t,n){t.constructor.createProperty(n,e)}(e,t,n):function(e,t){return"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?S(S({},t),{},{finisher:function(n){n.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer:function(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher:function(n){n.createProperty(t.key,e)}}}(e,t)}} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function ot(e){return rt(S(S({},e),{},{state:!0}))} /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */null===(Ze=window.HTMLSlotElement)||void 0===Ze||Ze.prototype.assignedElements;var at=["ar"],st="cookie-consent",ct="https://sf16-website-login.neutral.ttwstatic.com/obj/tiktok_web_login_static/tiktok_fonts/",lt='\n\n',ut="LOCAL_IS_EFFECTIVE",ft={channel:"sg",channel_type:"tcpy"};/*! js-cookie v3.0.1 | MIT */function dt(e){for(var t=1;t0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function gt(){for(var e=[],t=0;t-1&&(t=e.slice(0,e.indexOf("Build/")))}));else if("ios"===e||"mac"===e||"windows"===e)if(this.isNewIpad())t="iPad";else{var n=navigator.userAgent.replace("Mozilla/5.0 (",""),i=n.indexOf(";");t=n.slice(0,i)}}catch(e){return t.trim()}return t.trim()},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},e}(),Ut={sg:"1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k"},Bt={va:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",in:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},Gt={sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z21z1ez4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",in:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z49z23z21z1cz18z21z22z4ez18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",ie2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23"},Lt={sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz25z4az23z21",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz24z4az23z21",ie:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4az22z1gz1iz22z1mz1iz25z4az1cz23",ie2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23"};!function(e){e.Init="init",e.Config="config",e.Start="start",e.Ready="ready",e.TokenComplete="token-complete",e.TokenStorage="token-storage",e.TokenFetch="token-fetch",e.TokenError="token-error",e.ConfigUuid="config-uuid",e.ConfigWebId="config-webid",e.ConfigDomain="config-domain",e.CustomWebId="custom-webid",e.TokenChange="token-change",e.TokenReset="token-reset",e.ConfigTransform="config-transform",e.EnvTransform="env-transform",e.SessionReset="session-reset",e.SessionResetTime="session-reset-time",e.Event="event",e.Events="events",e.EventNow="event-now",e.CleanEvents="clean-events",e.BeconEvent="becon-event",e.SubmitBefore="submit-before",e.SubmitScuess="submit-scuess",e.SubmitAfter="submit-after",e.SubmitError="submit-error",e.SubmitVerify="submit-verify",e.DestoryInstance="destory-instance",e.Stay="stay",e.ResetStay="reset-stay",e.StayReady="stay-ready",e.SetStay="set-stay",e.RouteChange="route-change",e.RouteReady="route-ready",e.Ab="ab",e.AbVar="ab-var",e.AbAllVars="ab-all-vars",e.AbConfig="ab-config",e.AbExternalVersion="ab-external-version",e.AbVersionChangeOn="ab-version-change-on",e.AbVersionChangeOff="ab-version-change-off",e.AbOpenLayer="ab-open-layer",e.AbCloseLayer="ab-close-layer",e.AbReady="ab-ready",e.AbComplete="ab-complete",e.AbTimeout="ab-timeout",e.Profile="profile",e.ProfileSet="profile-set",e.ProfileSetOnce="profile-set-once",e.ProfileUnset="profile-unset",e.ProfileIncrement="profile-increment",e.ProfileAppend="profile-append",e.ProfileClear="profile-clear",e.Autotrack="autotrack",e.AutotrackReady="autotrack-ready",e.CepReady="cep-ready",e.TracerReady="tracer-ready",e.sessionRecord="session-record",e.SessionRecordStart="session-record-start",e.SessionRecordPause="session-record-pause",e.SessionRecordEnd="session-record-end",e.SessionRecordReport="session-record-report",e.VisualCollectReady="visual-collect-ready",e.VisualApiReady="visual-api-ready",e.VisualApiUpdate="visual-api-update"}(_t||(_t={})),function(e){e.DEBUGGER_MESSAGE="debugger-message",e.DEBUGGER_MESSAGE_SDK="debugger-message-sdk",e.DEBUGGER_MESSAGE_FETCH="debugger-message-fetch",e.DEBUGGER_MESSAGE_FETCH_RESULT="debugger-message-fetch-result",e.DEBUGGER_MESSAGE_EVENT="debugger-message-event",e.DEVTOOL_WEB_READY="devtool-web-ready"}(yt||(yt={}));var jt,Ft=_t,Kt=void 0,Ht=(new Date).getTimezoneOffset(),Vt=parseInt(""+-Ht/60,10),qt=60*Ht,$t=function(){function e(e,t){this.is_first_time=!0,this.configPersist=!1,this.initConfig=t,this.collect=e;var n=new Nt(t.app_id,t.cookie_domain||"",t.cookie_expire||6048e5).init(),i="__tea_cache_first_"+t.app_id;this.configKey="__tea_cache_config_"+t.app_id,this.sessionStorage=new Pt(!1,"session"),this.localStorage=new Pt(!1,"local"),this.channelUrl="tcpy"===t.channel_type||"ttp"===t.channel_type?{WEBID_URL:"/v1/user/webid",TOB_URL:"",REPORT_URL:"/v1/list"}:{WEBID_URL:"/webid",TOB_URL:"/tobid",REPORT_URL:"/list"},t.configPersist&&(this.configPersist=!0,this.storage=1===t.configPersist?this.sessionStorage:this.localStorage);var r=this.localStorage.getItem(i);r&&1==r?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(i,"1")),this.envInfo={user:{user_unique_id:Kt,user_type:Kt,user_id:Kt,user_is_auth:Kt,user_is_login:Kt,device_id:Kt,web_id:Kt,ip_addr_id:Kt,user_unique_id_type:Kt},header:{app_id:Kt,app_name:Kt,app_install_id:Kt,install_id:Kt,app_package:Kt,app_channel:Kt,app_version:Kt,ab_version:Kt,os_name:n.os_name,os_version:n.os_version,device_model:n.device_model,ab_client:Kt,traffic_type:Kt,client_ip:Kt,device_brand:Kt,os_api:Kt,access:Kt,language:n.language,region:Kt,app_language:Kt,app_region:Kt,creative_id:n.utm.creative_id,ad_id:n.utm.ad_id,campaign_id:n.utm.campaign_id,log_type:Kt,rnd:Kt,platform:n.platform,sdk_version:"5.3.0_oversea",sdk_lib:"js",province:Kt,city:Kt,timezone:Vt,tz_offset:qt,tz_name:Kt,sim_region:Kt,carrier:Kt,resolution:n.screen_width+"x"+n.screen_height,browser:n.browser,browser_version:n.browser_version,referrer:n.referrer,referrer_host:n.referrer_host,width:n.screen_width,height:n.screen_height,screen_width:n.screen_width,screen_height:n.screen_height,utm_term:n.utm.utm_term,utm_content:n.utm.utm_content,utm_source:n.utm.utm_source,utm_medium:n.utm.utm_medium,utm_campaign:n.utm.utm_campaign,tracer_data:JSON.stringify(n.utm.tracer_data),custom:{}}},this.ab_version="",this.ab_uuid_cache={},this.evtParams={},this.reportErrorCallback=function(){},this.isLast=!1,this.setCustom(n),this.initDomain(),this.initABData()}return e.prototype.initDomain=function(e){var t=this.initConfig.channel_domain;if(t)this.domain=t;else{var n=e||this.initConfig.channel,i=this.initConfig&&this.initConfig.channel_type?"tcpy"===this.initConfig.channel_type?Gt[n]:Lt[n]:Ut[n];i||(console.warn("current channel: "+n+" is not exist, use va instead, please check!!!!"),i=Ut.sg),this.domain=St(i)}},e.prototype.setDomain=function(e){this.customDomain=!0,this.domain=e},e.prototype.getDomain=function(e){return this.customDomain||e&&this.initDomain(e),this.domain},e.prototype.initABData=function(){var e,t="__tea_sdk_ab_version_"+this.initConfig.app_id;e=this.localStorage.getItem(t),this.setAbCache(e)},e.prototype.setAbCache=function(e){this.ab_cache=e},e.prototype.getAbCache=function(){return this.ab_cache},e.prototype.clearAbCache=function(){this.ab_cache={},this.ab_version=""},e.prototype.setAbVersion=function(e){this.ab_version=e},e.prototype.getAbVersion=function(){return this.ab_version},e.prototype.setAbUuidCache=function(e,t){var n=t||this.envInfo.user.user_unique_id;this.ab_uuid_cache[""+n]||(this.ab_uuid_cache[""+n]=[]),-1===this.ab_uuid_cache[""+n].indexOf(e)&&this.ab_uuid_cache[""+n].push(e)},e.prototype.getAbUuidCache=function(e){return this.ab_uuid_cache[""+e]},e.prototype.getUrl=function(e){var t="";switch(e){case"event":t=this.channelUrl.REPORT_URL;break;case"webid":t=this.channelUrl.WEBID_URL;break;case"tobid":t=this.channelUrl.TOB_URL}var n="";return this.initConfig.caller&&(n="?sdk_version=5.3.0_oversea&sdk_name=web&app_id="+this.initConfig.app_id+"&caller="+this.initConfig.caller),""+this.getDomain()+t+n},e.prototype.setCustom=function(e){if(e&&e.latest_data&&e.latest_data.isLast)for(var t in delete e.latest_data.isLast,this.isLast=!0,e.latest_data)this.envInfo.header.custom[t]=e.latest_data[t]},e.prototype.setAppid=function(e){this.envInfo.header.app_id=e},e.prototype.set=function(e){var t=this;Object.keys(e).forEach((function(n){if(void 0!==e[n]&&null!==e[n]||t.delete(n),"traffic_type"===n&&t.isLast&&(t.envInfo.header.custom.$latest_traffic_source_type=e[n]),"evtParams"===n)t.evtParams=pt(pt({},t.evtParams||{}),e.evtParams||{});else if("_staging_flag"===n)t.evtParams=pt(pt({},t.evtParams||{}),{_staging_flag:e._staging_flag});else if("reportErrorCallback"===n&&"function"==typeof e[n])t.reportErrorCallback=e[n];else{var i="",r="";if(n.indexOf(".")>-1){var o=n.split(".");i=o[0],r=o[1]}i?"user"===i||"header"===i?t.envInfo[i][r]=e[n]:t.envInfo.header.custom[r]=e[n]:Object.hasOwnProperty.call(t.envInfo.user,n)?["user_type","ip_addr_id"].indexOf(n)>-1?t.envInfo.user[n]=e[n]?Number(e[n]):e[n]:["user_id","web_id","user_unique_id","user_unique_id_type"].indexOf(n)>-1?t.envInfo.user[n]=e[n]?String(e[n]):e[n]:["user_is_auth","user_is_login"].indexOf(n)>-1?t.envInfo.user[n]=Boolean(e[n]):"device_id"===n&&(t.envInfo.user[n]=e[n]):Object.hasOwnProperty.call(t.envInfo.header,n)?t.envInfo.header[n]=e[n]:t.envInfo.header.custom[n]=e[n]}}))},e.prototype.get=function(e){try{return e?"evtParams"===e?this.evtParams:"reportErrorCallback"===e?this[e]:Object.hasOwnProperty.call(this.envInfo.user,e)?this.envInfo.user[e]:Object.hasOwnProperty.call(this.envInfo.header,e)?this.envInfo.header[e]:JSON.parse(JSON.stringify(this.envInfo[e])):JSON.parse(JSON.stringify(this.envInfo))}catch(e){console.log("get config stringify error "),this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.setStore=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};if(t&&Object.keys(e).length){var n=Object.assign(e,t);this.storage.setItem(this.configKey,n)}}catch(e){console.log("setStore error"),this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.getStore=function(){try{if(!this.configPersist)return null;var e=this.storage.getItem(this.configKey)||{};return e&&Object.keys(e).length?e:null}catch(e){return this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"}),null}},e.prototype.delete=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};t&&Object.hasOwnProperty.call(t,e)&&(delete t[e],this.storage.setItem(this.configKey,t))}catch(e){this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"}),console.log("delete error")}},e}(),Jt=function(){function e(e,t){this.isLog=t||!1,this.name=e||""}return e.prototype.info=function(e){this.isLog&&console.log("%c %s","color: yellow; background-color: black;","[Tea instance: "+this.name+"] "+e)},e.prototype.warn=function(e){this.isLog&&console.warn("%c %s","color: #4D1B00; background-color: #FF7D00;","[Tea instance: "+this.name+"] "+e)},e.prototype.error=function(e){this.isLog&&console.error("%c %s","color: #FFF; background-color: #F53F3F;","[Tea instance: "+this.name+"] "+e)},e.prototype.throw=function(e){throw this.error(this.name),new Error(e)},e}(),Wt=function(){function e(){this.spiderBot=["Baiduspider","googlebot","360Spider","haosouspider","YoudaoBot","Yisouspider","Googlebot","Headless","Applebot","Bingbot","PetalBot"]}return e.prototype.checkSpider=function(e){if(!e.enable_spider)return!1;var t=window.navigator.userAgent;if(!t)return!0;var n=!1;return this.spiderBot.forEach((function(e){-1!==t.indexOf(e)&&(n=!0)})),n},e}(),Xt=function(){function e(e,t){this.collect=e,this.native=t}var t=e.prototype;return t.bridgeInject=function(){try{return!!this.native&&(AppLogBridge?(console.log("AppLogBridge is injected"),!0):(console.log("AppLogBridge is not inject"),!1))}catch(e){return console.log("AppLogBridge is not inject"),!1}},t.bridgeReady=function(){var e=this;return new Promise((function(t,n){try{e.bridgeInject()?AppLogBridge.hasStarted((function(e){console.log("AppLogBridge is started? : "+e),e?t(!0):n(!1)})):n(!1)}catch(e){console.log("AppLogBridge, error:"+JSON.stringify(e.stack)),n(!1)}}))},t.setNativeAppId=function(e){try{AppLogBridge.setNativeAppId(JSON.stringify(e)),console.log("change bridge appid, event report with appid: "+e)}catch(e){console.error("setNativeAppId error")}},t.setConfig=function(e){var t=this;try{Object.keys(e).forEach((function(n){"user_unique_id"===n?t.setUserUniqueId(e[n]):e[n]?t.addHeaderInfo(n,e[n]):t.removeHeaderInfo(n)}))}catch(e){console.error("setConfig error")}},t.setUserUniqueId=function(e){try{AppLogBridge.setUserUniqueId(e)}catch(e){console.error("setUserUniqueId error")}},t.addHeaderInfo=function(e,t){try{AppLogBridge.addHeaderInfo(e,t)}catch(e){console.error("addHeaderInfo error")}},t.setHeaderInfo=function(e){try{AppLogBridge.setHeaderInfo(JSON.stringify(e))}catch(e){console.error("setHeaderInfo error")}},t.removeHeaderInfo=function(e){try{AppLogBridge.removeHeaderInfo(e)}catch(e){console.error("removeHeaderInfo error")}},t.reportPv=function(e){this.onEventV3("predefine_pageview",e)},t.onEventV3=function(e,t){try{AppLogBridge.onEventV3(e,t),this.collect.emit(DebuggerMesssge.DEBUGGER_MESSAGE,{type:DebuggerMesssge.DEBUGGER_MESSAGE_EVENT,info:"bridge埋点上报",time:Date.now(),data:[{events:[{event:e,params:t}]}],code:200,status:"success"})}catch(e){console.error("onEventV3 error")}},t.profileSet=function(e){try{AppLogBridge.profileSet(e)}catch(e){console.error("profileSet error")}},t.profileSetOnce=function(e){try{AppLogBridge.profileSetOnce(e)}catch(e){console.error("profileSetOnce error")}},t.profileIncrement=function(e){try{AppLogBridge.profileIncrement(e)}catch(e){console.error("profileIncrement error")}},t.profileUnset=function(e){try{AppLogBridge.profileUnset(e)}catch(e){console.error("profileUnset error")}},t.profileAppend=function(e){try{AppLogBridge.profileAppend(e)}catch(e){console.error("profileAppend error")}},e}(),Zt=function(){function e(){this.eventLimit=50,this.enable_ttwebid=!1,this.eventCache=[],this.beconEventCache=[]}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=e.configManager,this.cacheStorgae=new Pt(!0),this.localStorage=new Pt(!1),this.maxReport=t.max_report||10,this.reportTime=t.reportTime||30,this.timeout=t.timeout||1e5,this.enable_ttwebid=t.enable_ttwebid,this.reportUrl=t.report_url||this.configManager.getUrl("event"),this.eventKey="__tea_cache_events_"+this.configManager.get("app_id"),this.beconKey="__tea_cache_events_becon_"+this.configManager.get("app_id"),this.abKey="__tea_sdk_ab_version_"+this.configManager.get("app_id"),this.refer_key="__tea_cache_refer_"+this.configManager.get("app_id"),this.collect.on(Ft.Ready,(function(){n.reportAll(!1)})),this.collect.on(Ft.ConfigDomain,(function(){n.reportUrl=n.configManager.getUrl("event")})),this.collect.on(Ft.Event,(function(e){n.event(e)})),this.collect.on(Ft.BeconEvent,(function(e){n.beconEvent(e)})),this.collect.on(Ft.CleanEvents,(function(){n.reportAll(!1)})),this.linster()},e.prototype.linster=function(){var e=this;window.addEventListener("unload",(function(){e.reportAll(!0)}),!1),xt((function(){e.reportAll(!0)})),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.reportAll(!0)}),!1)},e.prototype.reportAll=function(e){this.report(e),this.reportBecon()},e.prototype.event=function(e){var t=this;if(!this.collect.destroy&&!this.collect.sdkStop)try{var n=gt(e,this.cacheStorgae.getItem(this.eventKey)||[]);if(this.cacheStorgae.setItem(this.eventKey,n),this.reportTimeout&&clearTimeout(this.reportTimeout),n.length>=this.maxReport)this.report(!1);else{var i=this.reportTime;this.reportTimeout=setTimeout((function(){t.report(!1),t.reportTimeout=null}),i)}}catch(e){this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.beconEvent=function(e){if(!this.collect.destroy&&!this.collect.sdkStop){var t=gt(e,this.cacheStorgae.getItem(this.beconKey)||[]);this.cacheStorgae.setItem(this.beconKey,t),this.collect.tokenManager.getReady()&&this.collect.sdkReady&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(t)),!0))}},e.prototype.reportBecon=function(){if(!this.collect.destroy&&!this.collect.sdkStop&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var e=this.cacheStorgae.getItem(this.beconKey)||[];e&&e.length&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(e)),!0))}},e.prototype.report=function(e){if(!this.collect.destroy&&!this.collect.sdkStop&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var t=this.cacheStorgae.getItem(this.eventKey)||[];t.length&&(this.cacheStorgae.removeItem(this.eventKey),this.sliceEvent(t,e))}},e.prototype.sliceEvent=function(e,t){if(e.length>this.eventLimit)for(var n=0;n>t/4).toString(10):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}().replace(/-/g,"").slice(0,19)},Qt=function(){function e(){this.cacheToken={},this.enableCookie=!1,this.enable_ttwebid=!1,this.enableCustomWebid=!1}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=this.collect.configManager,this.storage=new Pt(!1),this.tokenKey="__tea_cache_tokens_"+t.app_id,this.enable_ttwebid=t.enable_ttwebid,this.enableCustomWebid=t.enable_custom_webid,this.collect.on(Ft.ConfigUuid,(function(e){n.setUuid(e)})),this.collect.on(Ft.ConfigWebId,(function(e){n.setWebId(e)})),this.enableCookie=t.cross_subdomain,this.expiresTime=t.cookie_expire||6048e5,this.cookieDomain=t.cookie_domain||"",this.checkStorage()},e.prototype.checkStorage=function(){var e=this;this.cacheToken=this.storage.getItem(this.tokenKey)||{},this.tokenType=this.cacheToken&&this.cacheToken._type_?this.cacheToken._type_:"default","custom"!==this.tokenType||this.enableCustomWebid?this.enableCustomWebid?this.collect.on(Ft.CustomWebId,(function(){e.tokenReady=!0,e.collect.emit(Ft.TokenComplete)})):this.checkEnv()||(this.enable_ttwebid?this.completeTtWid(this.cacheToken):this.check()):this.remoteWebid()},e.prototype.check=function(){this.cacheToken&&this.cacheToken.web_id?this.complete(this.cacheToken):this.config.disable_webid?this.complete({web_id:Yt(),user_unique_id:this.configManager.get("user_unique_id")||Yt()}):this.remoteWebid()},e.prototype.checkEnv=function(){var e=window.navigator.userAgent;if(-1!==e.indexOf("miniProgram")||-1!==e.indexOf("MiniProgram")){var t=zt(window.location.href);return!(!t||!t.Web_ID||(this.complete({web_id:""+t.Web_ID,user_unique_id:this.configManager.get("user_unique_id")||""+t.Web_ID}),0))}return!1},e.prototype.remoteWebid=function(){var e=this,t=this.configManager.getUrl("webid"),n={app_key:this.config.app_key,app_id:this.config.app_id,url:location.href,user_agent:window.navigator.userAgent,referer:document.referrer,user_unique_id:""};this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch WebID Request",logType:"fetch",level:"info",time:Date.now(),data:n});var i=Yt();this.collect.requestManager.useRequest({url:t,data:n,success:function(t){var n;t&&0===t.e?(n=t.web_id,e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Success",logType:"fetch",level:"info",time:Date.now(),data:t})):(n=i,e.collect.configManager.set({localWebId:i}),e.collect.emit(Ft.TokenError),e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Data Error, Use LocalId",logType:"fetch",level:"warn",time:Date.now(),data:t}),e.collect.logger.warn("appid: "+e.config.app_id+" get webid error, use local webid~")),e.complete({web_id:e.configManager.get("web_id")||n,user_unique_id:e.configManager.get("user_unique_id")||n})},fail:function(){e.complete({web_id:e.configManager.get("web_id")||i,user_unique_id:e.configManager.get("user_unique_id")||i}),e.collect.configManager.set({localWebId:i}),e.collect.emit(Ft.TokenError),e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Network Fail, Use LocalId",logType:"fetch",level:"error",time:Date.now(),data:null}),e.collect.logger.warn("appid: "+e.config.app_id+", get webid error, use local webid~")},timeout:3e5})},e.prototype.complete=function(e){var t=e.web_id,n=e.user_unique_id;e.timestamp=Date.now(),this.collect.configManager.set({web_id:t,user_unique_id:n}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK UserInfo Complete",logType:"info",secType:"USER",level:"info",time:Date.now(),data:{web_id:t,user_unique_id:n},infoType:"sdk"}),this.collect.emit(Ft.TokenComplete)},e.prototype.completeTtWid=function(e){var t=e.user_unique_id||"",n=this.configManager.get("user_unique_id");(n||t)&&this.configManager.set({user_unique_id:n||t}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(Ft.TokenComplete)},e.prototype.setUuid=function(e){if(e&&-1===["null","undefined","Null","None"].indexOf(e)){var t=String(e),n=this.configManager.get("user_unique_id"),i=this.cacheToken&&this.cacheToken.user_unique_id;if(t===n&&t===i)return;this.configManager.set({user_unique_id:t}),this.cacheToken||(this.cacheToken={}),this.cacheToken.user_unique_id=t,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken),this.collect.emit(Ft.TokenChange,"uuid"),this.collect.emit(Ft.SessionReset)}else this.clearUuid()},e.prototype.clearUuid=function(){this.config.enable_ttwebid||this.configManager.get("web_id")&&(this.configManager.set({user_unique_id:this.configManager.get("web_id")}),this.cacheToken&&this.cacheToken.web_id&&(this.cacheToken.user_unique_id=this.cacheToken.web_id,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)),this.collect.emit(Ft.TokenReset))},e.prototype.setWebId=function(e){if(e&&!this.config.enable_ttwebid){this.cacheToken&&this.cacheToken.web_id?this.cacheToken.web_id!==e&&(this.cacheToken.user_unique_id=this.cacheToken.web_id===this.cacheToken.user_unique_id?e:this.cacheToken.user_unique_id,this.cacheToken.web_id=e):(this.cacheToken={},this.cacheToken.web_id=e,this.cacheToken.user_unique_id=e),this.cacheToken.timestamp=Date.now();var t=this.configManager.get("web_id"),n=this.configManager.get("user_unique_id");n&&n!==t||(this.configManager.set({user_unique_id:e}),this.collect.emit(Ft.TokenChange,"uuid")),t!==e&&(this.configManager.set({web_id:e}),this.collect.emit(Ft.TokenChange,"webid")),this.setStorage(this.cacheToken)}},e.prototype.setStorage=function(e){e._type_=this.enableCustomWebid?"custom":"default",delete e["diss".split("").reverse().join("")],this.storage.setItem(this.tokenKey,e),this.cacheToken=e},e.prototype.getReady=function(){return this.tokenReady},e.prototype.getTobId=function(){var e=this;return new Promise((function(t){if("tcpy"!==e.config.channel_type&&"ttp"!==e.config.channel_type){var n={app_id:e.config.app_id,user_unique_id:e.configManager.get("user_unique_id"),web_id:e.configManager.get("web_id"),user_unique_id_type:e.configManager.get("user_unique_id_type")};e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch GetToken Request",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"}),e.collect.requestManager.useRequest({url:e.configManager.getUrl("tobid"),data:n,success:function(n){n&&0===n.e?(t(n.tobid),e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Success",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"})):(t(""),e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Fail",logType:"fetch",level:"error",time:Date.now(),data:n,infoType:"sdk"}))},fail:function(){t(""),e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Network Error",logType:"fetch",level:"error",time:Date.now(),infoType:"sdk"})},time:3e4,withCredentials:e.enable_ttwebid})}else t("")}))},e}(),en=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},tn=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.storage=new Pt(!1,"session"),this.sessionKey="__tea_session_id_"+t.app_id,this.expireTime=t.expireTime||18e5,this.disableSession=t.disable_session,this.disableSessionTimeCheck=t.disable_session_check,this.disableSession||(this.setSessionId(),this.collect.on(Ft.SessionReset,(function(e){n.resetSessionId(e)})),this.collect.on(Ft.SessionResetTime,(function(){n.updateSessionIdTime()})))},e.prototype.updateSessionIdTime=function(){var e=this.storage.getItem(this.sessionKey);if(e&&e.sessionId){var t=e.timestamp;Date.now()-t>this.expireTime?e={sessionId:en(),timestamp:Date.now()}:e.timestamp=Date.now(),this.storage.setItem(this.sessionKey,e),this.resetExpTime()}},e.prototype.setSessionId=function(){var e=this,t=this.storage.getItem(this.sessionKey);t&&t.sessionId?t.timestamp=Date.now():t={sessionId:en(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,t),this.disableSessionTimeCheck||(this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime))},e.prototype.getSessionId=function(){var e=this.storage.getItem(this.sessionKey);return this.disableSession?"":e&&e.sessionId?e.sessionId:""},e.prototype.resetExpTime=function(){var e=this;this.sessionExp&&(clearInterval(this.sessionExp),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime))},e.prototype.resetSessionId=function(e){var t={sessionId:e||en(),timestamp:Date.now()};this.storage.setItem(this.sessionKey,t)},e.prototype.checkEXp=function(){var e=this.storage.getItem(this.sessionKey);e&&e.sessionId&&Date.now()-e.timestamp+30>=this.expireTime&&(e={sessionId:en(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,e))},e}(),nn=function(){function e(e,t){this.collector=e,this.config=t,this.requestType=t.request_type,this.supportBeacon=!(!window.navigator||!window.navigator.sendBeacon),this.errorCode={NO_URL:4001,IMG_ON:4e3,IMG_CATCH:4002,BEACON_FALSE:4003,XHR_ON:500,RESPONSE:5001,TIMEOUT:5005},this.customHeader=t.custom_request_header||{}}return e.prototype.useFetch=function(e){var t=e.url,n=e.data,i=e.method,r=e.success,o=e.fail,a={"Content-Type":"application/json; charset=utf-8"};if(Object.keys(this.customHeader).length)for(var s in this.customHeader)a[s]=this.customHeader[s];window.fetch?fetch(t,{method:i||"POST",headers:a,body:JSON.stringify(n)}).then((function(e){return e.json()})).then((function(e){r&&r(e)})).catch((function(e){o&&o(n,e)})):(this.requestType="xhr",console.log("your brwoser not support fetch, use xhr"),this.useRequest({url:t,data:n,method:i,success:r,fail:o}))},e.prototype.useBeacon=function(e){var t=e.url,n=e.data,i=e.success,r=e.fail;"xhr"!==this.requestType?window.navigator.sendBeacon(t,JSON.stringify(n))?i&&i():r&&r(n,this.errorCode.BEACON_FALSE):this.useXhr(e)},e.prototype.useXhr=function(e){var t=this,n=e.url,i=e.data,r=e.method,o=e.success,a=e.fail,s=e.timeout,c=e.withCredentials,l=e.app_key;try{var u=new XMLHttpRequest,f=r||"POST";if(u.open(f,""+n,!0),u.setRequestHeader("Content-Type","application/json; charset=utf-8"),l&&u.setRequestHeader("X-MCS-AppKey",""+l),Object.keys(this.customHeader).length)for(var d in this.customHeader)u.setRequestHeader(d,this.customHeader[d]);c&&(u.withCredentials=!0),s&&(u.timeout=s,u.ontimeout=function(){a&&a(i,t.errorCode.TIMEOUT)}),u.onload=function(){if(o){var e=null;if(u.responseText){try{e=JSON.parse(u.responseText)}catch(t){e={}}o(e,i)}}},u.onerror=function(){u.abort(),a&&a(i,t.errorCode.XHR_ON)},u.send(JSON.stringify(i))}catch(e){}},e.prototype.useRequest=function(e){var t=e.useBeacon,n=e.forceXhr;if("xhr"===this.requestType)this.useXhr(e);else{if(t&&this.supportBeacon)return void this.useBeacon(e);if("fetch"===this.requestType&&!n)return void this.useFetch(e);this.useXhr(e)}},e}(),rn=function(){function e(e,t){if(this.devToolReady=!1,this.devToolOrigin="*",this.sendAlready=!1,t.enable_debug&&"Microsoft Internet Explorer"!==e.configManager.get("browser")){this.collect=e,this.config=t,this.app_id=t.app_id;var n=e.adapters.storage;this.cacheStorgae=new n(!1),this.loadUrl=t.devtool_url||"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/devtool/debug-web.v2.0.0.js",this.filterEvent=new Set(["__bav_page","__bav_beat","__bav_page_statistics","__bav_click","__bav_page_exposure","bav2b_page","bav2b_beat","bav2b_page_statistics","bav2b_click","bav2b_page_exposure","_be_active","predefine_pageview","__profile_set","__profile_set_once","__profile_increment","__profile_unset","__profile_append","predefine_page_alive","predefine_page_close","abtest_exposure"]),this.load()}}return e.prototype.loadScript=function(e){try{var t=document.createElement("script");t.src=e,t.onerror=function(){console.log("load DevTool render fail")},t.onload=function(){console.log("load DevTool render success")},document.getElementsByTagName("body")[0].appendChild(t)}catch(e){console.log("devTool load fail, "+e.message)}},e.prototype.parseUrl=function(){var e={};try{var t=window.location.href.split("?")[1].split("&");t.length&&t.forEach((function(t){var n=t.split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}))}catch(e){}return e},e.prototype.load=function(){try{var e=this.parseUrl();if(e.open_devtool_web&&e.app_id){if(parseInt(e.app_id)!==this.app_id)return}else if(!this.getStorage())return;this.loadBaseInfo(),this.loadHook(),this.setStorage(),this.addLintener(),this.loadDebuggerModule(),this.loadDevTool()}catch(e){console.log("debug fail, "+e.message)}},e.prototype.getStorage=function(){var e=this.cacheStorgae.getItem("__applog_open_devtool_web");return e&&parseInt(e)===this.app_id},e.prototype.setStorage=function(){this.cacheStorgae.setItem("__applog_open_devtool_web",this.app_id)},e.prototype.loadDevTool=function(){this.loadScript(this.loadUrl)},e.prototype.loadBaseInfo=function(){if(this.log=[],this.event=[],this.info=[{title:"BaseInfo",key:"base",type:1,content:[{name:"app_id",desc:"APPID",value:this.config.app_id},{name:"channel",desc:"CHANNEL",value:this.config.channel},{name:"domain",desc:"Domain",value:this.collect.configManager.getDomain()},{name:"sdk_version",desc:"SDK Version",value:"5.3.0_oversea"},{name:"sdk_type",desc:"SDK Import Type",value:"npm"}]},{title:"UserInfo",key:"user",type:2,content:[{name:"uuid",desc:"UserUniqueId",value:this.collect.configManager.get("user").user_unique_id||""},{name:"web_id",desc:"WEB_ID",value:this.collect.configManager.get("user").web_id||""}]},{title:"CommonInfo",type:2,key:"common",content:[{name:"browser",desc:"Browser",value:this.collect.configManager.get("browser")},{name:"browser_version",desc:"Browser Version",value:this.collect.configManager.get("browser_version")},{name:"platform",desc:"Platform",value:this.collect.configManager.get("platform")},{name:"device_model",desc:"Devide Model",value:this.collect.configManager.get("device_model")},{name:"os_name",desc:"Os Name",value:this.collect.configManager.get("os_name")},{name:"os_version",desc:"Os Version",value:this.collect.configManager.get("os_version")},{name:"resolution",desc:"Screen Resolution",value:this.collect.configManager.get("resolution")},{name:"referrer",desc:"Referrer",value:this.collect.configManager.get("referrer")},{name:"custom",desc:"Custom Info",value:JSON.stringify(this.collect.configManager.get("custom"))}]},{title:"Config Info",key:"config",type:3,content:[{name:"autotrack",desc:"AutoTrackEvent",value:!!this.config.autotrack},{name:"stay",desc:"StayDuration",value:!!this.config.enable_stay_duration}]},{title:"A/B Config Info",key:"ab",type:4,content:[{name:"ab",desc:"A/BTester",value:!!this.config.enable_ab_test}]}],this.config.enable_ab_test){var e=this.getInfo("ab"),t=[{name:"ab",desc:"A/BTester",value:!!this.config.enable_ab_test},{name:"vid",desc:"A/B VID",value:this.collect.configManager.getAbVersion()},{name:"ab_domain",desc:"Domain",value:this.config.ab_channel_domain||St(Bt[this.config.channel])},{name:"all_values",desc:"A/B ALL Values",value:this.collect.configManager.getAbCache()}];e.content=t,this.setInfo("ab",e)}},e.prototype.getInfo=function(e){var t=null;return this.info.forEach((function(n){n.key===e&&(t=n)})),t},e.prototype.setInfo=function(e,t){var n=!1;this.info.forEach((function(i){i.key===e&&(n=!0,i=t)})),n||this.info.push(t)},e.prototype.getSecondInfo=function(e,t){var n=this.getInfo(e),i=null;return n.content.forEach((function(e){e.name===t&&(i=e)})),i},e.prototype.setSecondInfo=function(e,t,n){var i=this.getInfo(e);i.content.forEach((function(e){e.name===t&&(e.value=n)})),this.setInfo(e,i)},e.prototype.loadHook=function(){var e=this;this.collect.on(yt.DEBUGGER_MESSAGE,(function(t){switch(t.type){case yt.DEBUGGER_MESSAGE_SDK:var n={time:t.time,type:t.logType||"sdk",infoType:t.infoType||"sdk",level:t.level,name:t.info,show:!0,levelShow:!0,needDesc:!!t.data};return t.data&&(n.desc={content:JSON.stringify(t.data)}),e.updateLog(n),t.secType&&"AB"===t.secType?(e.setSecondInfo("ab","vid",e.collect.configManager.getAbVersion()),e.setSecondInfo("ab","all_values",e.collect.configManager.getAbCache())):"USER"===t.secType&&(e.setSecondInfo("user","uuid",e.collect.configManager.get("user").user_unique_id),e.setSecondInfo("user","web_id",e.collect.configManager.get("user").web_id)),void e.updateInfo();case yt.DEBUGGER_MESSAGE_EVENT:if(t.data&&t.data.length){var i=t.data[0],r=i.events;if(!r.length)return;r.forEach((function(n){n.checkShow=!0,n.searchShow=!0,n.focusShow=!0,n.status=t.status,n.type=e.filterEvent.has(n.event)?"sdk":"cus",n.verifyType=t.verifyType?"verify":"no",n.info="","fail"===t.status&&(n.info={message:"code: "+t.code+", msg: "+(t.msg||t.failType)})})),e.updateEvent(i)}return}}))},e.prototype.addLintener=function(){var e=this;window.addEventListener("message",(function(t){if(t&&t.data&&"devtool:web:ready"===t.data.type){if(e.devToolOrigin=t.origin,e.devToolReady=!0,e.sendAlready)return;e.sendData("devtool:web:init",{info:e.info,log:e.log,event:e.event,sdk_type:"5.3.0_oversea".includes("tob")?"tob":"inner",appId:e.app_id}),e.sendAlready=!0}t&&t.data&&"devtool:web:ssid"===t.data.type&&e.collect.getToken((function(t){e.setSecondInfo("user","sid",t.tobid),e.updateInfo()}))}))},e.prototype.sendData=function(e,t){try{var n={type:e,payload:t};window&&window.postMessage(n,this.devToolOrigin)}catch(e){}},e.prototype.updateInfo=function(){this.devToolReady&&this.sendData("devtool:web:info",this.info)},e.prototype.updateLog=function(e){this.devToolReady?this.sendData("devtool:web:log",e):this.log.push(e)},e.prototype.updateEvent=function(e){this.devToolReady?this.sendData("devtool:web:event",e):this.event.push(e)},e.prototype.loadDebuggerModule=function(){var e="#debugger-applog-web {\n position: fixed;\n width: 45px;\n height: 45px;\n background-image: url("+St("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1bz1cz24z22z1mz1mz1jz4bz18z1nz1nz1jz1mz1ez4az1nz1lz1e")+");\n bottom: 5%;\n right: 10%;\n cursor: pointer;\n z-index:100;\n background-size: 45px;\n }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.appendChild(document.createTextNode(e)),t.appendChild(n);var i=document.createElement("div");i.innerHTML='
';var r=document.createElement("div");r.innerHTML='
',document.getElementsByTagName("body")[0].appendChild(i),document.getElementsByTagName("body")[0].appendChild(r);var o=document.getElementById("debugger-applog-web");o&&o.addEventListener("click",(function(){window&&window.postMessage({type:"devtool:web:open-draw"},location.origin)}))},e}(),on={autotrack:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/autotrack.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/autotrack.js"},object:"LogAutoTrack"},ab:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/ab.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/ab.js"},object:"LogAb"},stay:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/stay.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/stay.js"},object:"LogStay"},route:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/route.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/route.js"},object:"LogRoute"},tracer:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/tracer.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/tracer.js"},object:"LogTracer"},retry:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/retry.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/retry.js"},object:"LogRetry"},visual:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/visual.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/visual.js"},object:"LogVisual"}},an=["ab","autotrack","Stay","store","et","profile","cep","heartbeat","monitor","route","tracer"],sn=function(){function e(e){this.disableAutoPageView=!1,this.bridgeReport=!1,this.staging=!1,this.pluginInstances=[],this.sended=!1,this.started=!1,this.destroy=!1,this.sdkReady=!1,this.adapters={},this.loadType="base",this.sdkStop=!1,this.name=e,this.hook=new bt,this.remotePlugin=new Map,this.Types=Ft,this.adapters.storage=Pt,this.loadType="full"}return e.usePlugin=function(t,n,i){if(n){for(var r=!1,o=0,a=e.plugins.length;o0&&this.changeListener.forEach((function(t){"function"==typeof t&&t(e)}))},e.prototype.configVersions=function(e){this.collect.configManager.setAbVersion(e)},e.prototype.getVar=function(e,t,n,i){if(!e)throw new Error("variable must not be empty");if(void 0===t)throw new Error("variable no default value");if("function"!=typeof n)throw new Error("callback must be a function");var r={name:e,defaultValue:t,callback:n,type:jt.Var};this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetVar",level:"info",time:Date.now(),data:e,infoType:"cus"}),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealVar(r,e,i):this.callbacks.push(r)},e.prototype.setAbUuid=function(e,t){this.collect.configManager.setAbUuidCache(e,t)},e.prototype.getRealVar=function(e,t,n){var i=e.name,r=e.defaultValue,o=e.callback,a=this.data;if(a){if(Et(a[i])){var s=a[i].vid;return"$ab_url"===t?this.mulilinkVersions.includes(s)||this.mulilinkVersions.push(s):this.versions.includes(s)||this.versions.push(s),this.setAbUuid(s,n),this.updateVersions(),this.fechEvent(s,t,r),o(a[i].val),void this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetVar, Exposure Experiment "+i,level:"info",time:Date.now(),data:a[i],infoType:"sdk"})}this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GerVar Default Callback",level:"info",time:Date.now(),data:this.data,infoType:"sdk"}),o(r)}else o(r)},e.prototype.getAllVars=function(e){if("function"!=typeof e)throw new Error("callback must be a function");var t={callback:e,type:jt.All};this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetAllVars",level:"info",time:Date.now(),infoType:"cus"}),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealAllVars(t):this.callbacks.push(t)},e.prototype.getRealAllVars=function(e){(0,e.callback)(this.data?JSON.parse(JSON.stringify(this.data)):{}),this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetAllVars Callback",level:"info",time:Date.now(),data:this.data,infoType:"sdk"})},e.prototype.fechEvent=function(e,t,n){try{if(this.config.disable_track_event)return;if(!e)return;var i=this.collect.configManager.get(),r=i.header,o=i.user,a=this.getABCache(),s=o[this.ab_user_mode]||o.user_unique_id;if(a&&a.uuid&&a.uuid!==s)return;var c={event:"abtest_exposure",ab_sdk_version:""+e,params:JSON.stringify({app_id:this.config.appId,ab_url:"$ab_url"===t?n:window.location.href,data:this.data}),local_time_ms:Date.now()};r.custom=JSON.stringify(r.custom);var l={events:[c],user:o,header:r};this.reportExposure(l,t)}catch(e){this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.reportExposure=function(e,t){var n=this;this.exposureCache.push(e),this.reportTimeout&&clearTimeout(this.reportTimeout),this.exposureCache.length>=this.exposureLimit?this.report(t):this.reportTimeout=setTimeout((function(){n.report(t),clearTimeout(n.reportTimeout)}),this.ab_batch_time)},e.prototype.report=function(e){var t=this;this.collect.requestManager.useRequest({url:this.reportUrl,data:this.exposureCache,timeout:2e4,useBeacon:"$ab_url"===e}),this.exposureCache.forEach((function(e){t.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_EVENT,info:"SDK Report Exposure Event Success",time:Date.now(),data:[e],code:200,status:"success",infoType:"sdk"})})),this.exposureCache=[]},e.prototype.setExternalAbVersion=function(e){this.extVersions=[e],this.updateVersions()},e.prototype.getABconfig=function(e,t){var n=Object.keys(e);n&&n.length&&this.collect.configManager.set(e),this.fetchAB(t)},e.prototype.get=function(e){return this.cacheStorgae.getItem(e)},e.prototype.set=function(e,t){this.cacheStorgae.setItem(e,t),this.collect.configManager.setAbCache(t),this.collect.event("abtest_cache",{env_uuid:this.collect.configManager.get("user").user_unique_id||"",cache:JSON.stringify(t)})},e.prototype.getABCache=function(e){var t={ab_version:[],ab_ext_version:[],ab_version_multilink:[],data:null,timestamp:+new Date,uuid:""};return t=this.get(this.abKey)||t,e?t[e]:t},e.prototype.updateABCache=function(){var e=this.getABCache();e.ab_version_multilink=this.mulilinkVersions,e.ab_ext_version=this.extVersions,e.ab_version=this.versions,e.timestamp=Date.now(),this.set(this.abKey,e)},e.prototype.setAbCache=function(e){var t=this.getABCache();t.data=this.data,t.uuid=e,t.timestamp=Date.now(),this.set(this.abKey,t)},e.prototype.clearCache=function(){this.refreshFetchStatus="ing",this.data={},this.extVersions=[],this.mulilinkVersions=[],this.versions=[],this.collect.configManager.clearAbCache()},e.prototype.openOverlayer=function(e){var t=this;if(function(){if(!document.getElementById(cn)){var e="body { opacity: 0 !important; }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id=cn,n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)}}(),e)var n=setTimeout((function(){t.closeOverlayer(),clearTimeout(n)}),e)},e.prototype.closeOverlayer=function(){var e;(e=document.getElementById(cn))&&e.parentElement.removeChild(e)},e.prototype.fetchComplete=function(e,t){var n=this;try{if(e&&"[object Object]"==Object.prototype.toString.call(e)){this.data=e,this.setAbCache(t);var i=[];Object.keys(e).forEach((function(t){var n=e[t].vid;n&&i.push(n)})),this.versions=this.versions.filter((function(e){return i.includes(e)}));var r=e.$ab_url,o=e.$ab_modification;if(o&&o.val&&this.enable_ab_visual){if(this.collect.destroy)return}else if(r&&this.enable_multilink){this.mulilinkVersions=this.mulilinkVersions.filter((function(e){return i.includes(e)}));var a=r.val,s=r.vid;a&&s&&this.getVar("$ab_url",a,(function(){n.editMode||(a!==window.location.href?setTimeout((function(){if(!n.collect.destroy){var e=""+a;e=-1===e.indexOf("http")?"https://"+e:e,At(e).host!==location.host?e=e+"&vid="+s:window.history.replaceState("","",e),window.location.href=e}}),100):n.closeOverlayer())}))}this.updateVersions()}else this.closeOverlayer();this.callbacks.forEach((function(e){return n[e.type===jt.Var?"getRealVar":"getRealAllVars"](e,"")})),this.callbacks=[]}catch(e){}},e.prototype.fetchAB=function(e){var t=this,n=this.collect.configManager.get(),i={header:pt(pt(pt({aid:this.config.app_id},n.user||{}),n.header||{}),{ab_sdk_version:this.collect.configManager.getAbVersion(),ab_url:window.location.href})};this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch AB Request",level:"info",logType:"fetch",time:Date.now(),data:i,infoType:"sdk"});var r=n.user[this.ab_user_mode]||n.user.user_unique_id;this.collect.requestManager.useRequest({url:this.fetchUrl,data:i,success:function(n){t.fetchStatus="complete",t.refreshFetchStatus="complete";var i=n.data;"success"===n.message?(t.fetchComplete(i,r),e&&e(i)):(t.fetchComplete(null,r),e&&e(null)),t.collect.emit(t.types.AbComplete,i),t.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Fetch AB Request Success",level:"info",logType:"fetch",time:Date.now(),data:i,infoType:"sdk"})},fail:function(){t.fetchStatus="complete",t.refreshFetchStatus="complete",t.fetchComplete(null,r),t.collect.emit(t.types.AbTimeout),e&&e(null),t.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Fetch AB Request Network Error",level:"error",logType:"fetch",time:Date.now(),infoType:"sdk"})},timeout:this.timeout})},e.prototype.filterUrl=function(e){try{var t="";-1!==e.indexOf("&multilink=true")?t="&multilink=true[\0-ÿ]*":-1!==e.indexOf("?multilink=true")&&(t="\\?multilink=true[\0-ÿ]*");var n=new RegExp(t,"g");e=e.replace(n,"")}catch(e){}return e},e}(),un=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(t.event_verify_url)if("string"==typeof t.event_verify_url){if(this.url=t.event_verify_url+"/v1/list_test",this.url){var i=e.Types;e.on(i.SubmitBefore,(function(t){e.requestManager.useBeacon({url:n.url,data:t}),e.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_EVENT,info:"SDK Report ByteIo Verify Request",time:Date.now(),data:t,code:200,status:"success",verifyType:!0})}))}}else console.log("please use correct et_test url")},e}(),fn=function(){function e(e,t){this.maxDuration=432e5,this.aliveDTime=6e4,this.options={aliveName:"predefine_page_alive",params:{}},this.focusState=!0,this.collect=e,this.config=t,this.pageStartTime=Date.now(),this.sessionStartTime=this.pageStartTime,this.timerHandler=null,Et(t.enable_stay_duration)&&(this.options=Object.assign(this.options,t.enable_stay_duration)),this.hard=this.options.mode&&"hard"===this.options.mode,this.focusState=document.hasFocus()}return e.prototype.setParams=function(e,t,n){this.set_path=e,this.set_url=n,this.set_title=t},e.prototype.enable=function(e,t,n){this.url_path=e,this.url=n,this.title=t,this.disableCallback=this.enablePageAlive(),this.hard&&(this.removeMode=this.hardMode())},e.prototype.disable=function(){this.disableCallback(),this.pageStartTime=Date.now()},e.prototype.sendEvent=function(e,t){void 0===t&&(t=!1);var n=t?this.aliveDTime:Date.now()-this.sessionStartTime;n<0||n>this.aliveDTime||Date.now()-this.pageStartTime>this.maxDuration||t&&"hidden"===document.visibilityState||this.hard&&!this.focusState||(this.collect.beconEvent(this.options.aliveName,pt({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),duration:n,is_support_visibility_change:Tt(),startTime:this.sessionStartTime,hidden:document.visibilityState,leave:e,mode:this.hard?"hard":"normal",focusState:this.focusState},this.options.params)),this.sessionStartTime=Date.now())},e.prototype.getParams=function(e){switch(e){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.prototype.setUpTimer=function(){var e=this;return this.timerHandler&&clearInterval(this.timerHandler),setInterval((function(){Date.now()-e.sessionStartTime>e.aliveDTime&&e.sendEvent(!1,!0)}),1e3)},e.prototype.visibilitychange=function(){"hidden"===document.visibilityState?this.timerHandler&&(clearInterval(this.timerHandler),this.sendEvent(!1)):"visible"===document.visibilityState&&(this.sessionStartTime=Date.now(),this.timerHandler=this.setUpTimer())},e.prototype.beforeunload=function(){document.hidden||this.sendEvent(!0)},e.prototype.enablePageAlive=function(){var e=this;this.timerHandler=this.setUpTimer();var t=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",t),xt(n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},e.prototype.hardMode=function(){var e=this,t=function(){e.timerHandler&&(clearInterval(e.timerHandler),e.sendEvent(!1)),e.focusState=!1},n=function(){e.focusState=!0,e.sessionStartTime=Date.now(),e.timerHandler=e.setUpTimer()};return window.addEventListener("blur",t),window.addEventListener("focus",n),function(){window.removeEventListener("blur",t),window.removeEventListener("focus",n)}},e}(),dn=function(){function e(e,t){var n=this;this.maxDuration=432e5,this.aliveDTime=6e4,this.options={closeName:"predefine_page_close",params:{}},this.focusState=!0,this.visibilitychange=function(){"hidden"===document.visibilityState?n.activeEndTime=Date.now():"visible"===document.visibilityState&&(n.activeEndTime&&(n.totalTime+=n.activeEndTime-n.activeStartTime,n.activeTimes+=1),n.activeEndTime=void 0,n.activeStartTime=Date.now())},this.beforeunload=function(){if(n.totalTime+=(n.activeEndTime||Date.now())-n.activeStartTime,n.config.autotrack)try{window.sessionStorage.setItem("_tea_cache_duration",JSON.stringify({duration:n.totalTime,page_title:document.title||location.pathname}))}catch(e){}n.sendEventPageClose()},this.collect=e,this.config=t,this.maxDuration=t.maxDuration||864e5,this.pageStartTime=Date.now(),Et(t.enable_stay_duration)&&(this.options=Object.assign(this.options,t.enable_stay_duration)),this.hard=this.options.mode&&"hard"===this.options.mode,this.focusState=document.hasFocus(),this.resetData()}return e.prototype.setParams=function(e,t,n){this.set_path=e,this.set_url=n,this.set_title=t},e.prototype.resetParams=function(e,t,n){this.url_path=e,this.url=n,this.title=t},e.prototype.enable=function(e,t,n){this.url_path=e,this.url=n,this.title=t,this.disableCallback=this.enablePageClose(),this.hard&&(this.removeMode=this.hardMode())},e.prototype.disable=function(){this.disableCallback()},e.prototype.resetData=function(){this.activeStartTime=void 0===this.activeStartTime?this.pageStartTime:Date.now(),this.activeEndTime=void 0,this.activeTimes=1,this.totalTime=0,this.resetParams(location.pathname,document.title,location.href)},e.prototype.sendEventPageClose=function(){var e=Date.now()-this.pageStartTime;this.totalTime<0||e<0||this.totalTime>=this.maxDuration||this.hard&&!this.focusState||(this.collect.beconEvent(this.options.closeName,pt({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),active_times:this.activeTimes,duration:this.totalTime,total_duration:e,is_support_visibility_change:Tt(),mode:this.hard?"hard":"normal",focusState:this.focusState},this.options.params)),this.pageStartTime=Date.now(),this.resetData())},e.prototype.getParams=function(e){switch(e){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.prototype.enablePageClose=function(){var e=this,t=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",t),xt(n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},e.prototype.hardMode=function(){var e=this,t=function(){e.focusState=!1},n=function(){e.focusState=!0};return window.addEventListener("blur",t),window.addEventListener("focus",n),function(){window.removeEventListener("blur",t),window.removeEventListener("focus",n)}},e}(),hn=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,this.config.enable_stay_duration){this.title=document.title||location.pathname,this.url=location.href,this.url_path=location.pathname,this.pageAlive=new fn(e,t),this.pageClose=new dn(e,t);var i=this.collect.Types;this.collect.on(i.ResetStay,(function(e){var t=e.url_path,i=e.title,r=e.url;n.resetStayDuration(t,i,r)})),this.collect.on(i.RouteChange,(function(e){e.init||t.disable_route_report||n.resetStayDuration()})),this.collect.on(i.SetStay,(function(e){var t=e.url_path,i=e.title,r=e.url;n.setStayParmas(t,i,r)})),this.enable(this.url_path,this.title,this.url),this.ready(i.Stay),this.collect.emit(i.StayReady)}},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!Object.keys(n).length)return;var i=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var r in n)i(r)}},e.prototype.enable=function(e,t,n){this.pageAlive.enable(e,t,n),this.pageClose.enable(e,t,n)},e.prototype.disable=function(){this.pageAlive.disable(),this.pageClose.disable()},e.prototype.setStayParmas=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),this.pageAlive.setParams(e,t,n),this.pageClose.setParams(e,t,n),this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Execute resetStayParams",level:"info",time:Date.now(),data:{url_path:e,title:t,url:n}})},e.prototype.reset=function(e,t,n){this.disable(),this.enable(e,t,n)},e.prototype.resetStayDuration=function(e,t,n){this.reset(e,t,n),this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Execute resetStayDuration",level:"info",time:Date.now(),data:{url_path:e,title:t,url:n}})},e}(),pn=function(){function e(){var e=this;this.setInterval=function(){e.clearIntervalFunc=function(e,t){void 0===e&&(e=function(){}),void 0===t&&(t=1e3);var n,i=Date.now()+t;return n=window.setTimeout((function r(){var o=Date.now()-i;e(),i+=t,n=window.setTimeout(r,Math.max(0,t-o))}),t),function(){window.clearTimeout(n)}}((function(){e.isSessionhasEvent&&e.endCurrentSession()}),e.sessionInterval)},this.clearInterval=function(){e.clearIntervalFunc&&e.clearIntervalFunc()}}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,!t.disable_heartbeat){this.sessionInterval=6e4,this.startTime=0,this.lastTime=0,this.setInterval();var i=this.collect.Types;this.collect.on(i.SessionReset,(function(){n.process()}))}},e.prototype.endCurrentSession=function(){this.collect.event("_be_active",{start_time:this.startTime,end_time:this.lastTime,url:window.location.href,referrer:window.document.referrer,title:document.title||location.pathname}),this.isSessionhasEvent=!1,this.startTime=0},e.prototype.process=function(){this.isSessionhasEvent||(this.isSessionhasEvent=!0,this.startTime=+new Date);var e=this.lastTime||+new Date;this.lastTime=+new Date,this.lastTime-e>this.sessionInterval&&(this.clearInterval(),this.endCurrentSession(),this.setInterval())},e}(),vn=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,!this.config.channel_domain&&!t.disable_track_event&&!t.disable_sdk_monitor){this.url=e.configManager.getUrl("event");var i=this.collect.Types;this.collect.on(i.Ready,(function(){n.sdkOnload()})),this.collect.on(i.SubmitError,(function(e){var t=e.type,i=e.eventData,r=e.errorCode;"f_data"===t&&n.sdkError(i,r)}))}},e.prototype.sdkOnload=function(){var e=this;try{var t=this.collect.configManager.get(),n=t.header,i=t.user,r=n.app_id,o=n.app_name,a=n.sdk_version,s=i.web_id,c={events:[{event:"onload",params:JSON.stringify({app_id:r,app_name:o||"",sdk_version:a,sdk_type:"npm",sdk_config:this.config,sdk_desc:"TOC_OVERSEA"}),local_time_ms:Date.now()}],user:{user_unique_id:s},header:{}};setTimeout((function(){e.collect.requestManager.useRequest({url:e.url,data:[c],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(e){}},e.prototype.sdkError=function(e,t){var n=this;try{var i=e[0],r=i.user,o=i.header,a=[];e.forEach((function(e){e.events.forEach((function(e){a.push(e)}))}));var s={events:a.map((function(e){return{event:"on_error",params:JSON.stringify({error_code:t,app_id:o.app_id,app_name:o.app_name||"",error_event:e.event,sdk_version:o.sdk_version,local_time_ms:e.local_time_ms,tea_event_index:Date.now(),params:e.params,header:JSON.stringify(o),user:JSON.stringify(r)}),local_time_ms:Date.now()}})),user:{user_unique_id:r.user_unique_id},header:{}};setTimeout((function(){n.collect.requestManager.useRequest({url:n.url,data:[s],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(e){}},e}();function gn(e,t){if(void 0===t&&(t="list"),!e)return!1;if(t&&"list"===t){if(["LI","TR","DL"].includes(e.nodeName))return!0;if(e.dataset&&e.dataset.hasOwnProperty("teaIdx"))return!0;if(e.hasAttribute&&e.hasAttribute("data-tea-idx"))return!0}else{if(["A","BUTTON"].includes(e.nodeName))return!0;if(e.dataset&&e.dataset.hasOwnProperty("teaContainer"))return!0;if(e.hasAttribute&&e.hasAttribute("data-tea-container"))return!0}return!1}function mn(e){for(var t=e;t&&!gn(t,"container");){if("HTML"===t.nodeName||"BODY"===t.nodeName)return e;t=t.parentElement}return t||e}function _n(e){var t="";return 3===e.nodeType?t=e.textContent.trim():e.dataset&&e.dataset.hasOwnProperty("teaTitle")||e.hasAttribute("ata-tea-title")?t=e.getAttribute("data-tea-title"):e.hasAttribute("title")?t=e.getAttribute("title"):"INPUT"===e.nodeName&&["button","submit"].includes(e.getAttribute("type"))?t=e.getAttribute("value"):"IMG"===e.nodeName&&e.getAttribute("alt")&&(t=e.getAttribute("alt")),t.slice(0,200)}var yn=function(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0},bn=function(){function e(e,t,n){var i=this;this.statistics=!1,this.pageView=!1,this.clickEvent=function(e){(function(e,t){if(1!==e.nodeType)return!1;if(!t.svg&&function(e){if("svg"===e.tagName.toLowerCase())return!0;for(var t=e.parentElement,n=!1;t;)"svg"===t.tagName.toLowerCase()?(t=null,n=!0):t=t.parentElement;return n}(e))return!1;if(["HTML","BODY"].includes(e.tagName.toUpperCase()))return!1;var n=e;return!("none"===n.style.display||!gn(n,"container")&&!function(e){if(e.children.length){var t=e.children;return![].slice.call(t).some((function(e){return e.children.length>0}))}return!0}(n)&&!t.svg)})(e.target,i.options)&&i.eventHandel({eventType:"dom",eventName:"click"},e)},this.changeEvent=function(e){i.eventHandel({eventType:"dom",eventName:"change"},e)},this.submitEvent=function(e){i.eventHandel({eventType:"dom",eventName:"submit"},e)},this.getPageViewEvent=function(e,t){t&&"pushState"===t&&i.eventHandel({eventType:"dom",eventName:"beat"},pt({beat_type:0},e)),i.eventHandel({eventType:"dom",eventName:"page_view"},e)},this.getPageLoadEvent=function(e){i.eventHandel({eventType:"dom",eventName:"page_statistics"},{lcp:e})},this.config=n.getConfig().eventConfig,this.collect=t,this.options=e,this.beatTime=e.beat}return e.prototype.init=function(e){this.eventHandel=e;var t=this.config.mode;this.addListener(t)},e.prototype.addListener=function(e){var t=this;if("proxy-capturing"===e){if(this.config.click&&window.document.addEventListener("click",this.clickEvent,!0),this.config.change&&window.document.addEventListener("change",this.changeEvent,!0),this.config.submit&&window.document.addEventListener("submit",this.submitEvent,!0),this.config.pv){this.collect.on("route-change",(function(e){var n=e.config,i=e.name;t.getPageViewEvent(n,i),t.pageView=!0}));var n=setTimeout((function(){t.pageView||(t.getPageViewEvent(t.getDefaultConfig()),t.pageView=!0,clearTimeout(n))}),2e3)}if(this.config.beat){try{"complete"===document.readyState?this.beatEvent(this.beatTime):window.addEventListener("load",(function(){t.beatEvent(t.beatTime)}));var i=0,r=null;window.addEventListener("scroll",(function(){clearTimeout(r),r=setTimeout(o,500),i=document.documentElement.scrollTop||document.body.scrollTop}));var o=function(){(document.documentElement.scrollTop||document.body.scrollTop)==i&&t.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:1})}}catch(e){}try{var a=window.performance&&window.performance.getEntriesByType("paint");a&&a.length?(new PerformanceObserver((function(e){var n=e.getEntries(),i=n[n.length-1],r=i.renderTime||i.loadTime;t.statistics||(t.getPageLoadEvent(r),t.statistics=!0)})).observe({entryTypes:["largest-contentful-paint"]}),setTimeout((function(){t.statistics||(t.getPageLoadEvent(a[0].startTime||0),t.statistics=!0)}),2e3)):this.getPageLoadEvent(0)}catch(e){this.getPageLoadEvent(0)}}}},e.prototype.removeListener=function(){window.document.removeEventListener("click",this.clickEvent,!0),window.document.removeEventListener("change",this.changeEvent,!0),window.document.removeEventListener("submit",this.submitEvent,!0)},e.prototype.beatEvent=function(e){var t=this;try{var n;this.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:3}),this.beatTime&&(n=setInterval((function(){t.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:2})}),e)),xt((function(){t.eventHandel({eventType:"dom",eventName:"beat",eventSend:"becon"},{beat_type:0}),t.beatTime&&clearInterval(n)}))}catch(e){}},e.prototype.getDefaultConfig=function(){return{is_html:1,url:location.href,referrer:document.referrer,page_key:location.href,refer_page_key:document.referrer,page_title:document.title||location.pathname,page_manual_key:"",refer_page_manual_key:"",refer_page_title:"",page_path:location.pathname,page_host:location.host}},e}(),En={eventConfig:{mode:"proxy-capturing",submit:!1,click:!0,change:!1,pv:!0,beat:!0,hashTag:!1,impr:!1},scoutConfig:{mode:"xpath"}},wn=function(){function e(e,t){this.config=e,this.config.eventConfig=Object.assign(this.config.eventConfig,t)}return e.prototype.getConfig=function(){return this.config},e.prototype.setConfig=function(e){return this.config=e},e}();function kn(e,t,n,i){var r={},o=function(e){if(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return{left:t.left,top:t.top,element_width:n,element_height:i}}}(t),a=function(e,t){void 0===e&&(e={}),void 0===t&&(t={});var n=e.clientX,i=e.clientY,r=t.left,o=t.top,a=n-r>=0?n-r:0,s=i-o>=0?i-o:0;return{touch_x:Math.floor(a),touch_y:Math.floor(s)}}(e,o),s=o.element_width,c=o.element_height,l=a.touch_x,u=a.touch_y,f=function(e){for(var t=[];null!==e.parentElement;)t.push(e),e=e.parentElement;var n=[],i=[];return t.forEach((function(e){var t=function(e){if(null===e)return{str:"",index:0};var t=0,n=e.parentElement;if(n)for(var i=n.children,r=0;r0)for(var r=t.childNodes,o=0;o0)for(var r=t.childNodes,o=0;o0?r:0)),t.page_start_ms=i.navigationStart}catch(e){console.log("page_statistics event error "+JSON.stringify(e))}return t},e.prototype.handleBeadtEvent=function(e){e.event=this.eventName.beat,e.page_key=window.location.href,e.is_html=1,e.page_title=document.title,e.page_manual_key=this.initConfig.autotrack.page_manual_key||"";try{e.page_viewport_width=window.innerWidth,e.page_viewport_height=window.innerHeight,e.page_total_width=document.documentElement.scrollWidth,e.page_total_height=document.documentElement.scrollHeight,e.scroll_width=document.documentElement.scrollLeft+window.innerWidth,e.scroll_height=document.documentElement.scrollTop+window.innerHeight,e.since_page_start_ms=Date.now()-window.performance.timing.navigationStart,e.page_start_ms=window.performance.timing.navigationStart}catch(e){console.log("beat event error "+JSON.stringify(e))}return e},e}(),Tn=function(){function e(e){this.collect=e,this.eventNameList=["report_click_event","report_change_event","report_submit_event","report_exposure_event","report_page_view_event","report_page_statistics_event","report_beat_event"]}return e.prototype.send=function(e,t){var n=e.eventSend,i=t.event;delete t.event,n&&"becon"===n?this.collect.beconEvent(i,t):this.collect.event(i,t)},e.prototype.get=function(e,t){var n=Object.assign({headers:{"content-type":"application/json"},method:"GET"},t);fetch(e,n)},e.prototype.post=function(e,t){var n=Object.assign({headers:{"content-type":"application/json"},method:"POST"},t);fetch(e,n)},e}(),An={},zn=[];function Cn(e,t,n,i){var r=e&&e.source||window.opener||window.parent,o=e&&e.origin||i||"*",a={type:t,payload:n};r.postMessage(JSON.stringify(a),o)}function Dn(e){if(zn.some((function(e){return"*"===e}))||zn.some((function(t){return e.origin.indexOf(t)>-1}))){var t=e.data;if("string"==typeof e.data)try{t=JSON.parse(e.data)}catch(e){t=void 0}if(!t)return;var n=t.type,i=t.payload;An[n]&&An[n].forEach((function(t){"function"==typeof t&&t(e,i)}))}}var Rn=!1;function On(e,t){window.TEAVisualEditor=window.TEAVisualEditor||{},window.TEAVisualEditor.appId=t.app_id;var n,i,r,o,a=t.channel_domain,s="";if((n=["*"]).length&&n.forEach((function(e){zn.push(e)})),a){var c,l="";try{var u=window.performance.getEntriesByType("resource");if(u&&u.length&&(u.forEach((function(e){"script"===e.initiatorType&&e.name&&-1!==e.name.indexOf("collect")&&(l=e.name)})),l&&(c=l.split("/"))&&c.length)){s="https:/";for(var f=2;f=0&&c<=window.innerHeight&&a>=0&&s<=window.innerWidth&&(n.visible=!0,this.EventHandle({eventType:"dom",eventName:"exposure"},e))}}else n._observeId=this.count,n.visible=!1,this.observeMap.set(this.count,n),this.observe(n),this.count++},e.prototype.exposureRemove=function(e){this.observeMap.has(e._observeId)&&(this.observeMap.delete(e._observeId),this.unobserve(e))},e.prototype.exposureEvent=function(e){if(e.intersectionRatio>=this.Ratio&&e.isIntersecting){if("0"===e.target.style.opacity||"hidden"===e.target.style.visibility)return;if(!0===e.target.visible)return;e.target.visible=!0,this.EventHandle({eventType:"dom",eventName:"exposure"},e)}else e.target.visible=!1},e.prototype.observe=function(e){this.instance.observe(e)},e.prototype.unobserve=function(e){this.instance.unobserve(e)},e._observer_instance=null,e._observer_map=new Map,e}(),Nn=function(){function e(e,t){e.autotrack&&e.autotrack.exposure&&(this._intersection=new Pn(e,t),this._observer=new Mn(this._intersection),this.initObserver())}return e.prototype.initObserver=function(){var e=this;Array.prototype.forEach.call(document.querySelectorAll("[data-exposure]"),(function(t){e._intersection.exposureAdd(t,"intersect")}))},e}(),Un={hashTag:!1,impr:!1},Bn=function(){function e(){}return e.prototype.apply=function(e,t){if(this.autoTrackStart=!1,this.collect=e,this.config=t,t.autotrack){var n=e.Types;t.autotrack&&t.autotrack.collect_url&&!t.autotrack.collect_url()||(this.ready(n.Autotrack),this.collect.emit(n.AutotrackReady))}},e.prototype.ready=function(e){this.collect.set(e);var t=this.config.autotrack;t="object"==J(t)?t:{},t=Object.assign(Un,t),this.destroyed=!1,this.options=t,this.Config=new wn(En,this.options),this.Exposure=new Nn(this.config,this.handle.bind(this)),this.Listener=new bn(t,this.collect,this.Config),this.EventHandle=new xn(this.config,t),this.Request=new Tn(this.collect),this.autoTrackStart=!0,this.init(),On(this,this.config)},e.prototype.init=function(){this.Listener.init(this.handle.bind(this)),"base"===this.collect.loadType&&(window.opener||window.parent).postMessage("[tea-sdk]ready","*")},e.prototype.handle=function(e,t){"dom"===e.eventType&&this.handleDom(e,t)},e.prototype.handleDom=function(e,t){try{var n=e.eventName;if("click"===n||"exposure"===n||"change"===n||"submit"===n){var i=this.EventHandle.handleEvent(t,n);null!==i&&this.Request.send({eventType:"custom",eventName:"report_"+n+"_event",extra:{methods:"GET"}},i)}else if("page_view"===n||"page_statistics"===n){var r;r="page_view"===n?this.EventHandle.handleViewEvent(t):this.EventHandle.handleStatisticsEvent(t),this.Request.send({eventType:"custom",eventName:"report_${eventName}_event",extra:{methods:"GET"}},r)}else if("beat"===n){var o=this.EventHandle.handleBeadtEvent(t),a=e.eventSend;this.Request.send({eventType:"custom",eventName:"report_${eventName}_event",extra:{methods:"GET"},eventSend:a},o)}}catch(e){console.log("handel dom event error "+JSON.stringify(e))}},e.prototype.destroy=function(){if(!this.autoTrackStart)return console.warn("engine is undefined, make sure you have called autoTrack.start()");this.autoTrackStart=!1,this.Listener.removeListener()},e}();!function(e){e.Net="net",e.FailNet="f_net",e.FailData="f_data"}(In||(In={}));var Gn={pv:["predefine_pageview"],sdk:["_be_active","predefine_page_alive","predefine_page_close","__profile_set","__profile_set_once","__profile_increment","__profile_unset","__profile_append"],autotrack:["bav2b_click","bav2b_page","bav2b_beat","bav2b_page_statistics","__bav_click","__bav_page","__bav_beat","__bav_page_statistics"]},Ln=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.ready=t.app_id&&t.enable_tracer&&!t.disable_track_event,this.ready){this.limit={pv:1,sdk:3,autotrack:3,log:3},this.errorCode={f_net:0,f_data:0},this.tracerCache=new Map,this.collect=e,this.appid=t.app_id,this.reportUrl=e.configManager.getUrl("event");var i=this.collect.Types;e.adapters.fetch,this.collect.on(i.Event,(function(e){wt(e)?e.forEach((function(e){n.addCount("log")})):n.addCount("log")})),this.collect.on(i.SubmitError,(function(e){var t=e.type,i=e.eventDate,r=e.errorCode,o=e.response;n.addErrorCount(i,t,r,o)})),this.listener(),this.collect.emit(i.TracerReady)}},e.prototype.addCount=function(e,t,n){void 0===t&&(t="net"),void 0===n&&(n=1);try{this.tracerCache||(this.tracerCache=new Map);var i=void 0;if(this.tracerCache.has(e))(r=this.tracerCache.get(e)).has(t)?(i=r.get(t).params.count,i++,r.set(t,this.processTracer(i,e,t))):(i=n,r.set(t,this.processTracer(n,e,t)));else{var r=new Map;i=n,r.set(t,this.processTracer(n,e,t)),this.tracerCache.set(e,r)}"net"===t&&i>=this.limit[e]&&this.report(!1)}catch(e){console.log(e)}},e.prototype.addErrorCount=function(e,t,n,i){var r=this;try{if(e&&e.length){var o=e[0].events;o&&o.length&&("f_data"===t?(i&&i.hasOwnProperty("sc")?this.addCount("log",t,o.length-i.sc):this.addCount("log",t,o.length),this.errorCode[t]=n):o.forEach((function(e){var i="log";for(var o in Gn)if(-1!==Gn[o].indexOf(e.event)){i=o;break}r.addCount(i,t,1),r.errorCode[t]=n})))}}catch(e){}},e.prototype.report=function(e){if(this.tracerCache){var t=[];this.tracerCache.forEach((function(e){console.log(e),e.forEach((function(e){t.push(e)}))})),t&&t.length&&this.sendTracer(t,e)}},e.prototype.sendTracer=function(e,t){try{var n=this.collect.eventManager.merge(e);this.collect.requestManager.useRequest({url:this.reportUrl,data:n,useBeacon:t}),this.tracerCache=null}catch(e){}},e.prototype.processTracer=function(e,t,n){try{var i={count:e,state:n,key:t,params_for_special:"applog_trace",aid:this.appid,platform:"web",_staging_flag:1,sdk_version:"5.3.0_oversea"};"f_net"!==n&&"f_data"!==n||(i.errorCode=this.errorCode[n]);var r=this.collect.processEvent("applog_trace",i);if(r&&r.event)return delete r.is_bav,r}catch(e){console.warn("something error")}},e.prototype.listener=function(){var e=this;document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.leavePage()})),xt((function(){e.leavePage()}))},e.prototype.leavePage=function(){this.report(!0)},e}(),jn="undefined"!=typeof window?(window.LogPluginObject||(window.LogPluginObject={}),window.LogPluginObject):null,Fn=function(){function e(){}return e.prototype.apply=function(e,t){this._plugin={},this.config=t,this.collect=e,this.channel=t.channel||"cn",this.loadExtend()},e.prototype.loadExtend=function(){var e=this;try{this.collect.remotePlugin.forEach((function(t,n){if("sdk"===t)if(on.hasOwnProperty(n)){var i=on[n].object,r=""+on[n].src[e.channel];e.exist(n,i,r)}else console.warn("your "+n+" is not exist,please check plugin name");else"object"==J(t)&&(t.src?e.exist(n,t.call,t.src):e.process(n,t.instance,"INSTANCE"))}))}catch(e){this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message}),console.log("load extend error")}},e.prototype.exist=function(e,t,n){var i=this;jn[t]?(this.process(e,jn[t]),console.log("already has "+e+" plugin~")):this.loadPlugin(e,n,(function(){i.process(e,jn[t]),console.log(" %c %s %s %s","color: yellow; background-color: black;","–","load plugin:"+e+" success","-")}),(function(){console.log(" %c %s %s %s","color: red; background-color: yellow;","–","load plugin:"+e+" error","-")}))},e.prototype.process=function(e,t,n){try{if(n){var i=new t;i.apply&&i.apply(this.collect,this.config),console.log("excude "+e+" success")}else t&&t(this.collect,this.config)}catch(t){this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),console.log("excude "+e+" error, message:"+t.message)}},e.prototype.loadPlugin=function(e,t,n,i){var r=this;try{var o=document.createElement("script");o.src=t,this._plugin[e]||(this._plugin[e]=[]),this._plugin[e].push(n),o.onerror=function(){i(t)},o.onload=function(){r._plugin[e].forEach((function(e){e()}))},document.getElementsByTagName("head")[0].appendChild(o)}catch(e){this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message})}},e}(),Kn=function(){function e(){this.autotrack=!1,this.spa=!1,this.cache={},this.allowHash=!1}return e.prototype.apply=function(e,t){if(t.spa||t.autotrack){var n=e.Types;this.collect=e,this.config=t,this.appid=t.app_id,this.allowHash=t.allow_hash,this.fncArray=new Map,this.setKey(),this.setLocation(),this.hack(),this.init(),this.listener(),e.emit(n.RouteReady)}},e.prototype.setKey=function(){var e=this.collect.adapters.storage;this.storage=new e(!1),this.cache_key="__tea_cache_refer_"+this.appid,this.cache={refer_key:"",refer_title:document.title||location.pathname,refer_manual_key:"",routeChange:!1},this.config.autotrack&&"object"==J(this.config.autotrack)&&this.config.autotrack.page_manual_key&&(this.cache.refer_manual_key=this.config.autotrack.page_manual_key),this.storage.setItem(this.cache_key,this.cache)},e.prototype.hack=function(){var e=this,t=window.history.pushState;history.pushState=function(n){for(var i=[],r=1;r1&&void 0!==arguments[1]?arguments[1]:{};if(qn&&Vn){var n="".concat(location.protocol,"//").concat(location.host).concat(location.pathname);Vn.event(e,S({page_url:n,host:location.host,user_agent:navigator.userAgent,referrer:n},t))}}var Jn=function(){this.__data__=[],this.size=0};var Wn=function(e,t){return e===t||e!=e&&t!=t};var Xn=function(e,t){for(var n=e.length;n--;)if(Wn(e[n][0],t))return n;return-1},Zn=Array.prototype.splice;var Yn=function(e){var t=this.__data__,n=Xn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Zn.call(t,n,1),--this.size,!0)};var Qn=function(e){var t=this.__data__,n=Xn(t,e);return n<0?void 0:t[n][1]};var ei=function(e){return Xn(this.__data__,e)>-1};var ti=function(e,t){var n=this.__data__,i=Xn(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};function ni(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991};var Mr=function(e){return null!=e&&Ir(e.length)&&!xi(e)};var Pr=function(e){return xr(e)&&Mr(e)};var Nr=function(){return!1},Ur=li((function(e,t){var n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,r=i&&i.exports===n?di.Buffer:void 0,o=(r?r.isBuffer:void 0)||Nr;e.exports=o})),Br=Function.prototype,Gr=Object.prototype,Lr=Br.toString,jr=Gr.hasOwnProperty,Fr=Lr.call(Object);var Kr=function(e){if(!xr(e)||"[object Object]"!=wi(e))return!1;var t=Er(e);if(null===t)return!0;var n=jr.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Lr.call(n)==Fr},Hr={};Hr["[object Float32Array]"]=Hr["[object Float64Array]"]=Hr["[object Int8Array]"]=Hr["[object Int16Array]"]=Hr["[object Int32Array]"]=Hr["[object Uint8Array]"]=Hr["[object Uint8ClampedArray]"]=Hr["[object Uint16Array]"]=Hr["[object Uint32Array]"]=!0,Hr["[object Arguments]"]=Hr["[object Array]"]=Hr["[object ArrayBuffer]"]=Hr["[object Boolean]"]=Hr["[object DataView]"]=Hr["[object Date]"]=Hr["[object Error]"]=Hr["[object Function]"]=Hr["[object Map]"]=Hr["[object Number]"]=Hr["[object Object]"]=Hr["[object RegExp]"]=Hr["[object Set]"]=Hr["[object String]"]=Hr["[object WeakMap]"]=!1;var Vr=function(e){return xr(e)&&Ir(e.length)&&!!Hr[wi(e)]};var qr=function(e){return function(t){return e(t)}},$r=li((function(e,t){var n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,r=i&&i.exports===n&&ui.process,o=function(){try{var e=i&&i.require&&i.require("util").types;return e||r&&r.binding&&r.binding("util")}catch(e){}}();e.exports=o})),Jr=$r&&$r.isTypedArray,Wr=Jr?qr(Jr):Vr;var Xr=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Zr=Object.prototype.hasOwnProperty;var Yr=function(e,t,n){var i=e[t];Zr.call(e,t)&&Wn(i,n)&&(void 0!==n||t in e)||ur(e,t,n)};var Qr=function(e,t,n,i){var r=!n;n||(n={});for(var o=-1,a=t.length;++o-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Eo=bo(_o);var wo=function(e,t){return Eo(go(e,t,ho),e+"")};var ko=function(e,t,n){if(!ki(n))return!1;var i=J(t);return!!("number"==i?Mr(n)&&no(t,n.length):"string"==i&&t in n)&&Wn(n[t],e)};var So,xo,To,Ao,zo,Co,Do,Ro,Oo=function(e){return wo((function(t,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(r--,o):void 0,a&&ko(n[0],n[1],a)&&(o=r<3?void 0:o,r=1),t=Object(t);++i0?e[0].duration:-1},No=function(e,t){e("sendCustomPerfMetric",{name:"actual_fmp",value:t})},Uo=function(e,t){if(t){var n={method:e,params:t};if("undefined"!=typeof NativeModules){var i,r,o=null===(r=NativeModules)||void 0===r||null===(i=r.hybridMonitor)||void 0===i?void 0:i.request;null==o||o(n,(function(){}))}else{var a,s,c,l,u,f=function(){var e,t,n="unknown",i=null!==(t=null===(e=navigator)||void 0===e?void 0:e.userAgent)&&void 0!==t?t:"";return/android|Android/i.test(i)&&(n="Android"),/iPhone|iPad|iPod|iOS/i.test(i)&&(n="iOS"),{os:n,isAndroid:"Android"===n,isIOS:"iOS"===n}}();if(f.isIOS)null===(u=window)||void 0===u||null===(l=u.webkit)||void 0===l||null===(c=l.messageHandlers)||void 0===c||null===(s=c.bdhmRequest)||void 0===s||null===(a=s.postMessage)||void 0===a||a.call(s,n);else if(f.isAndroid){var d,h,p;null===(p=window)||void 0===p||null===(h=p.iesJsBridgeTransferMonitor)||void 0===h||null===(d=h.request)||void 0===d||d.call(h,JSON.stringify(n))}}}},Bo=function(e,t,n){var i={key:e,value:void 0===t?Date.now():t,description:n||""};Uo("timing.mark",i)},Go=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("undefined"==typeof location||"undefined"==typeof URLSearchParams)return"";var n=new URLSearchParams(location.search);return n.get(e)||t},Lo=function(){var e,t,n,i;return{scm_version:"undefined"==typeof window?"":null!==(n=null===(e=window.gfdatav1)||void 0===e?void 0:e.ver)&&void 0!==n?n:"",path:"undefined"==typeof location?"":location.pathname,enter_from:Go("enter_from"),host:"undefined"==typeof location?"":location.host,canary:"undefined"==typeof window?"":null!==(i=null===(t=window.gfdatav1)||void 0===t?void 0:t.canary)&&void 0!==i?i:""}};function jo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fo(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ho,Vo,qo,$o={pageCrash:!1,cuj:!1},Jo=$((function e(){var t=this;V(this,e),this.slardarWindowGlobalName="",this.slardarHybridGlobalName="",this._shouldReportJSError={pageCrash:!1,cuj:!1},this.setContext=function(e){t._context=e},this.initSlardar=function(e){try{var n=null!=e?e:{},i=n.slardarContainer,r=n.slardarWindowGlobalName,o=n.slardarHybridGlobalName,a=n.sparkMonitor,s=n.reportActualFMP,c=n.shouldReportJSError;"string"==typeof r&&(t.slardarWindowGlobalName=r),"string"==typeof o&&(t.slardarHybridGlobalName=o),"function"==typeof s&&(t.reportTTAPActualFMP=s),void 0!==a&&(t.sparkMonitor=a),void 0!==i&&"function"==typeof i.sendEvent&&"function"==typeof i.reportActualFMP&&(t.slardarContainer=i),t._shouldReportJSError=Fo({},$o,null!=c?c:{})}catch(e){}},this.initJSB=function(e){t.jsbBridge=e},this._formatEventPayload=function(e){var n=e.name,i=e.metrics,r=e.categories,o=Ko(e,["name","metrics","categories"]),a=Fo({},r,t._context);return Fo({name:n,metrics:i,categories:a},o)},this._formatErrorPayload=function(e){return Fo({},null!=e?e:{},t._context)},this.sendEvent=function(e){try{var n,i,r,o=null!==(r=t._formatEventPayload(e))&&void 0!==r?r:{};if(t.slardarWindowGlobalName&&"function"==typeof(null===(n=window)||void 0===n?void 0:n[t.slardarWindowGlobalName])&&window[t.slardarWindowGlobalName]("sendEvent",o),t.slardarHybridGlobalName&&"function"==typeof(null===(i=window)||void 0===i?void 0:i[t.slardarHybridGlobalName])){var a=o.name,s=void 0===a?"":a,c=o.categories,l=Ko(o,["name","categories"]);window[t.slardarHybridGlobalName]("emit","custom",Fo({eventName:s,level:0,category:c},l))}t.slardarContainer&&t.slardarContainer.sendEvent(o)}catch(e){}},this._sendError=function(e,n){if(t._shouldReportJSError)try{var i,r,o,a=null!==(o=t._formatErrorPayload(n))&&void 0!==o?o:{};if(t.slardarWindowGlobalName&&"function"==typeof(null===(i=window)||void 0===i?void 0:i[t.slardarWindowGlobalName])&&window[t.slardarWindowGlobalName]("captureException",e,a),t.slardarHybridGlobalName&&"function"==typeof(null===(r=window)||void 0===r?void 0:r[t.slardarHybridGlobalName])){var s=a.name,c=void 0===s?"":s,l=Ko(a,["name"]);window[t.slardarHybridGlobalName]("captureException",e,Fo({eventName:c,level:0},l))}t.slardarContainer&&"function"==typeof t.slardarContainer.captureException&&t.slardarContainer.captureException(e,a)}catch(e){}},this.sendPageCrashError=function(e,n){t._shouldReportJSError.pageCrash&&t._sendError(e,n)},this.sendCUJError=function(e,n){t._shouldReportJSError.cuj&&t._sendError(e,n)},this.teaReport=function(e){var n,i,r,o=null!==(i=t._formatEventPayload(e))&&void 0!==i?i:{};"undefined"!=typeof window&&"function"==typeof(null===(n=window)||void 0===n?void 0:n.collectEvent)&&(null===(r=window)||void 0===r||r.collectEvent(o.name,Fo({},o.metrics,o.categories,Lo())));t.jsbBridge&&t.jsbBridge.x.reportAppLog({eventName:o.name,params:Fo({},o.metrics,o.categories,Lo())})},this.resetTeaModule=function(){t.jsbBridge=void 0},this.resetSlardarModule=function(){t.slardarContainer=void 0,t.slardarWindowGlobalName="",t.slardarHybridGlobalName="",t.sparkMonitor=void 0,t.reportTTAPActualFMP=void 0}}));(qo=Vo||(Vo={})).FBJS="pns_privacy_product_mark_fbjs",qo.AFMP="pns_privacy_product_mark_afmp";var Wo=(null===(Ho=performance.timing)||void 0===Ho?void 0:Ho.navigationStart)||performance.timeOrigin;function Xo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zo(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:zo.normal;if(!n._hasReportedActualFMP){n._hasReportedActualFMP=!0;var a,s,c,l,u,f,d=[zo.normal,zo.noRecord],h=d.includes(o),p=Date.now();if(null===(t=performance)||void 0===t||null===(e=t.mark)||void 0===e||e.call(t,"pns_privacy_product_mark_afmp"),h)if("function"==typeof(null===(a=n._trackingContext.sparkMonitor)||void 0===a?void 0:a.mark)?n._trackingContext.sparkMonitor.mark("fmp"):n._trackingContext.slardarHybridGlobalName&&"function"==typeof(null===(s=window)||void 0===s?void 0:s[n._trackingContext.slardarHybridGlobalName])&&Bo("fmp"),"function"==typeof(null===(c=n._trackingContext)||void 0===c?void 0:c.reportTTAPActualFMP))n._trackingContext.reportTTAPActualFMP();else if(n._trackingContext.slardarWindowGlobalName&&"function"==typeof(null===(l=window)||void 0===l?void 0:l[n._trackingContext.slardarWindowGlobalName])){var v;No(null===(v=window)||void 0===v?void 0:v[n._trackingContext.slardarWindowGlobalName],p-Wo)}if(n._trackingContext.slardarHybridGlobalName&&"function"==typeof(null===(i=window)||void 0===i?void 0:i[n._trackingContext.slardarHybridGlobalName]))null===(f=window)||void 0===f||null===(u=f[n._trackingContext.slardarHybridGlobalName])||void 0===u||u.call(f,"sendCustomPerfMetric",{name:"actual_fmp",value:p-Wo});n._trackingContext.sendEvent({name:Vo.AFMP,metrics:Yo(Zo({costMs:p-Wo},Mo()),{pns_privacy_product_mark_dcl:Po()}),categories:Zo({isSuccess:h?"1":"0",scene:o},Lo())}),n._trackingContext.teaReport({name:Vo.AFMP,metrics:Yo(Zo({costMs:p-Wo},Mo()),{pns_privacy_product_mark_dcl:Po()}),categories:{isSuccess:h?"1":"0",scene:o}}),"function"==typeof(null===(r=n._trackingContext.slardarContainer)||void 0===r?void 0:r.reportActualFMP)&&n._trackingContext.slardarContainer.reportActualFMP()}},this._trackingContext=t}return $(e,[{key:"resetForSPA",value:function(){this._hasReportedActualFMP=!1}}]),e}(),ea=function(){var e,t,n;return(null===(t=performance)||void 0===t||null===(e=t.timing)||void 0===e?void 0:e.navigationStart)||(null===(n=performance)||void 0===n?void 0:n.timeOrigin)},ta=function(e){var t=0;try{performance.mark("error"),t=performance.measure("navigationStart_to_error","navigationStart","error").duration,performance.clearMarks("error"),performance.clearMeasures("navigationStart_to_error")}catch(e){t=Date.now()-ea()}"object"===J(e)&&(e._triggerTime=t)},na=function(e){try{var t=e.error;ta(t)}catch(e){}},ia=function(){window._bound_error_time||(window._bound_error_time=!0,"development"===process.env.NODE_ENV?window.addEventListener("error",na,!0):function(){var e;if(null===(e=console)||void 0===e?void 0:e.error){var t=console.error;console.error=function(e){ta(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2?arguments[2]:void 0;if(!n._hasReportedUserDrop&&!n._hasReportedPageCrash){n._hasReportedPageCrash=!0;var s=null!=e?e:{},c=s.name,l=void 0===c?"":c,u=s.message,f=s.stack,d=s._triggerTime,h=void 0===d?0:d,p=0;if(!p)try{performance.mark("pageCrashReporting"),p=performance.measure("navigationStart_to_pageCrashReporting","navigationStart","pageCrashReporting").duration}catch(e){p=Date.now()-ea()}var v,g,m,_=o?h:p,y=_0&&void 0!==arguments[0]?arguments[0]:"",t=!1,n=function(){function e(){var n,i=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return V(this,e),this._pageReadyTiming=So.ACTUAL_FMP,this.init=function(e){try{if(t)return;t=!0;var n=null!=e?e:{},r=n.slardarContainer,o=n.slardarWindowGlobalName,a=n.slardarHybridGlobalName,s=n.sparkMonitor,c=n.reportActualFMP,l=n.pageReadyTiming,u=void 0===l?So.CUSTOM:l,f=n.jsbBridge,d=n.shouldReportJSError,h=void 0===d?{}:d,p=n.shouldRegisterUserDrop,v=void 0===p||p,g=n.context;i._trackingContext.setContext(null!=g?g:{tenant:"N/A",appId:0,appVersion:"N/A"}),i._pageReadyTiming=u,i._trackingContext.initSlardar({slardarContainer:r,slardarWindowGlobalName:o,slardarHybridGlobalName:a,sparkMonitor:s,reportActualFMP:c,shouldReportJSError:h}),f&&i._trackingContext.initJSB(f),ia(),v&&i._registerUserDropEvent()}catch(e){}},this._registerUserDropEvent=function(){window.addEventListener("beforeunload",i.reportUserDrop,!0)},this.reportPageReady=function(e){i._stabilityTracker.reportPageReady(),i._pageReadyTiming===So.ACTUAL_FMP&&i._perfTracker.reportActualFMP(e)},this.reportUserDrop=function(){i._stabilityTracker.reportUserDrop()},this.reportPageCrash=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;i._stabilityTracker.reportPageCrash(e,t,n)},this.reportFBJS=function(){i._perfTracker.reportFBJS()},this.reportActualFMP=function(e){i._perfTracker.reportActualFMP(e)},this.reportCUJ=function(e,t,n){i._stabilityTracker.reportCUJ(e,t,n)},r?(oa[r]=this,n=this):(e._instance||(e._instance=this),n=e._instance),this._trackingContext=new Jo,this._perfTracker=new Qo(this._trackingContext),this._stabilityTracker=new ra(this._trackingContext),n}return $(e,[{key:"resetForSPA",value:function(){this._stabilityTracker.resetForSPA(),this._perfTracker.resetForSPA()}},{key:"reset",value:function(){this.resetForSPA();try{window.removeEventListener("beforeunload",this.reportUserDrop,!0)}catch(e){}this._trackingContext.resetSlardarModule(),this._trackingContext.resetTeaModule(),t=!1}},{key:"isInitialized",value:function(){return t}}]),e}();return e?(oa[e]||(oa[e]=new n(e)),oa[e]):new n},sa=aa();function ca(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var la,ua,fa,da,ha=function(){function e(){V(this,e),this.debug=!1,this.meta={}}return $(e,[{key:"init",value:function(e,t){var n,i;this.debug=null!==(n=null==t?void 0:t.debug)&&void 0!==n&&n,this.meta=null!==(i=null==e?void 0:e.meta)&&void 0!==i?i:{}}},{key:"send",value:function(e){}},{key:"info",value:function(e,t){}},{key:"warn",value:function(e,t){}},{key:"error",value:function(e,t){}},{key:"getMeta",value:function(){return function(e){for(var t=1;t0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function r(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r=0){var i=e.slice();return i.splice(n,1),i}return e},E=function(e,t,n){for(var r,o=i(t.split(".")),a=o[0],s=o.slice(1);e&&s.length>0;)e=e[a],a=(r=i(s))[0],s=r.slice(1);if(e)return n(e,a)},w=function(e,t,n){return E(e,t,(function(e,t){if(e&&t in e&&h(e[t]))try{return e[t].apply(e,n)}catch(e){return}}))};function k(e){return d(e)&&e.length?function(e){for(var t=[],n=e.length,i=0;i>>((3&n)<<3)&255;return e}();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,function(e){for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);var i=0,r=t;return[r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]]].join("")}(e)}var U=function e(t,n){var i=[];try{i=n.reduce((function(e,n){try{var i=n(t);"function"==typeof i&&e.push(i)}catch(e){}return e}),[])}catch(e){}return function(t){return e(t,i)}},B=function(e){void 0===e&&(e=3e5);var t,n=[],i=[],r=!1,o=function(e,t,n){var i=0;return-1===n?s:function(){if(e())return i&&clearTimeout(i),void(i=0);0===i&&(i=setTimeout(t,n))}}((function(){return!!n.length}),(function(){r=!0,t&&t[0](),i.forEach((function(e){return e()})),i.length=0,t=void 0}),e),a=function(e){n=b(n,e),!r&&o()};return{next:function(e){return U(e,n)},complete:function(e){i.push(e)},attach:function(e,n){t=[e,n]},subscribe:function(e){if(r)throw new Error("Observer is closed");return n.push(e),t&&t[1]&&t[1](e),o(),function(){return a(e)}},unsubscribe:a}},G=function(e,t,n){var i=B(n);try{e(i.next,i.attach),t&&i.complete(t)}catch(e){}return[i.subscribe,i.unsubscribe]},L=function(e,t){var n=i(e,1)[0];return function(e,i){var r=n((function(n){var i,r=(i=t,function(e){for(var t=!0,n=0;n([\\d\\D]*?)<\\/script>[\\d\\D]*","i");o=s.replace(c,"$1").trim()}for(;e=q()?o:void 0}catch(e){return}var a},_e=function(e,t,i){var r;if(!(i<=0))try{localStorage.setItem(e,(r=JSON.stringify(n(n({},t),{expires:q()+i})),ge()?btoa(encodeURI(r)):r))}catch(e){}},ye=function(e){return!1===e?0:!0!==e&&void 0!==e&&p(e)?e:7776e6},be=function(){var e=new RegExp("\\/monitor_web\\/collect|\\/monitor_browser\\/collect\\/batch","i");return function(t){return e.test(t)}},Ee=function(e){return function(){for(var t,n=[],r=0;r=400)&&(l.request.body=c?""+c:void 0,l.response.body=e.response?""+e.response:void 0)}catch(e){}return l},Ve="ajax",qe={autoWrap:!0,setContextAtReq:function(){return c},ignoreUrls:[],collectBodyOnError:!1};var $e=function(e,t,n){var r=i(t,2),o=r[0],a=r[1],c=n.setTraceHeader,l=n.ignoreUrls,u=n.setContextAtReq,f=n.extractUrl,d=window.Headers,h=window.Request;h&&d&&e.push(o[0]((function(e){var t=i(e,2),r=t[0],o=t[1],p=te(r instanceof h?r.url:r);if(!Je(p)||S(l,p))return s;c&&c(p,(function(e,t){return Xe(e,t,r,o,h,d)}));var v=u(),g=q(),m=void 0,_=a()[0]((function(e){p===e.name&&!m&&(m=e)}));return function(e){var t,i,a=et(r,o,e,h,d,n,g),s=(t=function(e){m&&(e.response.timing=m),Fe(e,f),v&&v({ev_type:Ie,payload:e}),_()},i=!1,function(e){i||(i=!0,t(e))});setTimeout((function(){s(a)}),1e3)}})))},Je=function(e){if(!v(e))return!1;var t=i(e.split(":"),2),n=t[0];return!t[1]||"http"===n||"https"===n},We=function(e,t){return e instanceof t},Xe=function(e,t,i,r,o,a){var s;We(i,o)?i.headers.set(e,t):r.headers instanceof a?r.headers.set(e,t):r.headers=n(n({},r.headers),((s={})[e]=t,s))},Ze=function(e,t,n){var i=t&&t.method||"get";return We(e,n)&&(i=e.method||i),i.toLowerCase()},Ye=function(e){for(var t=[],n=1;n=400&&f()}catch(e){}else f();return c},tt="fetch",nt={autoWrap:!0,setContextAtReq:function(){return c},ignoreUrls:[],collectBodyOnError:!1};var it=["name","message","stack","filename","lineno","colno"],rt=function(e){var t,n;return!function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMError]":case"[object DOMException]":return!0;default:return e instanceof Error}}(e)?(f(e)||(n=e,"undefined"!=typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(n,Event))||v(e))&&(t={message:x(e)}):t=function(e,t){return e&&l(e)?t.reduce((function(t,n){return t[n]=e[n],t}),{}):e}(e,it),t},ot=function(e){return t=e,"[object ErrorEvent]"===Object.prototype.toString.call(t)?function(e){var t=rt(e.error);if(!t)return t;var n=e.colno,i=e.lineno,r=e.filename;return n&&!t.colno&&(t.colno=String(n)),i&&!t.lineno&&(t.lineno=String(i)),r&&!t.filename&&(t.filename=r),t}(e):function(e){return"[object PromiseRejectionEvent]"===Object.prototype.toString.call(e)}(e)?function(e){var t;try{var i=void 0;if("reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason),i){var r=rt(i);return n(n({},r),{name:null!==(t=r&&r.name)&&void 0!==t?t:"UnhandledRejection"})}}catch(e){}}(e):rt(e);var t},at=function(e){return"hidden"===e.visibilityState},st=["hidden_3",function(e,t){var n=W(),i=$();if(n&&i){var r=function(t){e("pagehide"===t.type||at(n))},o=de(n,"visibilitychange",r,!0),a=fe(i,"pagehide",r,!0);t((function(){o(),a()}),(function(e){e(at(n))}))}}],ct=["unload_0",function(e,t){var n=$();if(n){var r=i(he(e),1)[0],o=function(){r()},a=[];["unload","beforeunload","pagehide"].forEach((function(e){a.push(fe(n,e,o,!1))})),t((function(){a.forEach((function(e){return e()}))}))}}],lt=["hash_0",function(e,t){var n=$();if(n){var i=fe(n,"hashchange",(function(){return e(location.href)}),!0);t((function(){i()}))}}],ut=["history_0",function(e,t){var n=Z(),i=$();if(n&&i){var r=[],o=function(){return e(location.href)},a=function(e){return function(){for(var t=[],i=0;it.frustrating_threshold?2:i>t.satisfying_threshold||0===n?0:1},gt=function(e,t){return function(n,i){var r=n.payload;switch(n.ev_type){case"performance":var o=r.name;r.isSupport&&e(i.perf_apdex,o,r.value);break;case Pe:e(i.perf_apdex,"action",r.duration||0);break;case Oe:t(i.error_weight,0);break;case Ie:if(r.response.is_custom_error||r.response.status>=400)t(i.error_weight,1);else{var a=r.response.timing;a&&e(i.duration_apdex,0,a.duration)}break;case"resource_error":t(i.error_weight,2);break;case"blank_screen":t(i.error_weight,3);break;case"resource":e(i.duration_apdex,1,r.duration);break;case"performance_longtask":r.longtasks.forEach((function(t){e(i.duration_apdex,2,t.duration)}))}}},mt=function(){var e,t,n=function(){e=[0,0,0],t=function(){var e;return(e={error_count:[0,0,0,0],duration_count:[0,0,0]}).perf_apdex={},e}()};n();return[function(n,i,r){var o=n&&n[i];if(o&&!(r<=0)){var a=r<(o[0].threshold||0)?0:r>(o[1].threshold||0)?2:1;if(e[a]+=o[a].weight,"string"==typeof i){var s=dt(i,a),c=t.perf_apdex[s];t.perf_apdex[s]=(c||0)+1}else 2===a&&(t.duration_count[i]+=1)}},function(n,i){n&&(e[2]+=n[i],t.error_count[i]+=1)},function(){return[e,t]},n]},_t=function(e,t,n,r){var o,a,s=r.sendInit,c=r.initPid,l=r.routeMode,u=r.extractPid,f=r.onPidUpdate,d=pt(l)?function(){return""}:function(e){return function(t){var n;return"hash"===e?(null===(n=ne(t).hash)||void 0===n?void 0:n.replace(/^#/,""))||"/":ne(t).path}}(l),h=u||function(){},p=i(function(e,t,n,i){var r=n,o=t;return i&&i(t),[function(t,n,a){"user_set"!==t&&n!==r?(r=n,o=null!=a?a:r,i&&i(o),e(t,o)):"user_set"===t&&n!==o&&(o=n,i&&i(o),e(t,o))},function(){t&&e("init",t)}]}(ht(e),c||function(e){var t;return null!==(t=h(e))&&void 0!==t?t:d(e)}(location.href),d(location.href),f),2),v=p[0],g=p[1];if(!pt(l)){var m=i((o=function(e,t){return v(e,d(t),h(t))},a="",[function(e,t){t!==a&&o(e,a=t)}]),1)[0];n.length&&n.forEach((function(e){return t.push(e[0]((function(e){return m(l,e)})))}))}return s&&g(),[v.bind(null,"user_set")]},yt=function(e,t,n,r){var o,a,s,c=i(n,2),l=c[0],u=c[1],f=2===r.apdex,d=void 0,h=void 0,p=void 0,v=!1,g=i(mt(),4),m=g[0],_=g[1],y=g[2],b=g[3],E=i(mt(),4),w=E[0],k=E[1],S=E[2],x=E[3],T=i((o={start:q(),end:0,time_spent:0,is_bounced:!1,entry:"",exit:"",p_count:0,a_count:0},[function(e,t){var n=i(e,3),r=n[0],a=n[1],s=n[2];o.end=q(),o.time_spent+=t&&t.time_spent||0,o.last_page=t,o.p_count+=1,o.rank=r,o.apdex=a,o.apdex_detail=s;var c=W();c&&(o.is_bounced=!function(e){return"complete"===e.readyState}(c))},function(e,t){o.time_spent+=e.time_spent,o.p_count+=1,o.exit=t},function(){o.a_count+=1},function(e){o.entry=e,o.exit=e},function(){return o}]),5),A=T[0],z=T[1],C=T[2],D=T[3],R=T[4],O=i((a=0,s=void 0,[function(e){if(e){if(!s)return;a+=q()-s,s=void 0}else s=q()},function(){s&&(a+=q()-s);var e=a;return a=0,s=q(),e}]),2),I=O[0],M=O[1];t.push(l[0](I)),!f&&t.push(u[0]((function(){if(v){var t=i(S(),2),n=t[0],r=t[1],o=vt(n,p);A([o,n,r],U()),e({ev_type:Re,payload:R()}),x()}})));var P=gt(m,_),N=gt(w,k),U=function(){var e=i(y(),2),t=e[0],n=e[1];return{start:d[0],pid:d[1],view_id:d[2],end:q(),time_spent:M(),apdex:t,rank:vt(t,p),detail:n}};return t.push((function(){v=!1})),[function(e,t){if(!d)return d=[q(),e,t],D(e),void(v=!(!p||!d));v&&(h=U(),z(h,e)),d=[q(),e,t],b()},function(e){v&&(f||(N(e,p),e.ev_type===Pe&&C()),e.common.pid===d[1]&&P(e,p))},function(t){v&&(t.payload.last=h),e(t)},function(e){if(!e)return t.forEach((function(e){return e()})),void(t.length=0);v=!(!(p=e)||!d)}]},bt="pageview",Et={sendInit:!0,routeMode:"history",apdex:2};var wt=function(e){e.provide("sendEvent",(function t(n){var i=function(e){if(e&&l(e)&&e.name&&v(e.name)){var t={name:e.name,type:"event"};if("metrics"in e&&l(e.metrics)){var n=e.metrics,i={};for(var r in n)p(n[r])&&(i[r]=n[r]);t.metrics=i}if("categories"in e&&l(e.categories)){var o=e.categories,a={};for(var r in o)a[r]=x(o[r]);t.categories=a}return"attached_log"in e&&v(e.attached_log)&&(t.attached_log=e.attached_log),t}}(n);if(i){var r=function(e){var t;if("object"===("undefined"==typeof window?"undefined":J(window))&&window.__perfsee__){var n={};return null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,n,e),n.stack}}(t);r&&(i.stacks=r),e.report({ev_type:Me,payload:i,extra:{timestamp:q()}})}})),e.provide("sendLog",(function(t){var n=function(e){if(e&&l(e)&&e.content&&v(e.content)){var t={content:x(e.content),type:"log",level:"info"};if("level"in e&&(t.level=e.level),"extra"in e&&l(e.extra)){var n=e.extra,i={},r={};for(var o in n)p(n[o])?i[o]=n[o]:r[o]=x(n[o]);t.metrics=i,t.categories=r}return"attached_log"in e&&v(e.attached_log)&&(t.attached_log=e.attached_log),t}}(t);n&&e.report({ev_type:Me,payload:n,extra:{timestamp:q()}})}))};function kt(e){return(null==e?void 0:e.effectiveType)||(null==e?void 0:e.type)||""}var St=function(e,t){var n=e.common||{};return n.sample_rate=t,e.common=n,e},xt=function(e,t,n,i,r){return e?function(e){return function(){return e}}(r(i,t)):function(){return n(t)}},Tt=function(e,t,n,i){var r=E(e,t,(function(e,t){return e[t]}));if(void 0===r)return!1;var o=function(e){return"boolean"==typeof e}(r)?"bool":p(r)?"number":"string";return function(e,t,n){switch(n){case"eq":return y(t,e);case"neq":return!y(t,e);case"gt":return e>t[0];case"gte":return e>=t[0];case"lt":return e=400)l(new Error(this.responseText||this.statusText));else if(this.responseText){var e=JSON.parse(this.responseText);a(e)}else a({})}catch(e){l(e)}},p.onerror=function(){l(new Error("Network request failed"))},p.onabort=function(){l(new Error("Network request aborted"))},p.send(r)},Dt=function(){var e=Y();return e?{useBeacon:!0,get:function(t){Ct("GET",t,e)},post:function(t){Ct("POST",t,e)}}:{get:s,post:s}};function Rt(e){var t=function(e){var t,n=e.transport,i=e.endpoint,r=e.size,a=void 0===r?10:r,s=e.wait,c=void 0===s?1e3:s,l=[],u=0,f={getSize:function(){return a},getWait:function(){return c},setSize:function(e){a=e},setWait:function(e){c=e},getEndpoint:function(){return i},setEndpoint:function(e){i=e},send:function(e){l.push(e),l.length>=a&&d.call(this),clearTimeout(u),u=setTimeout(d.bind(this),c)},flush:function(){clearTimeout(u),d.call(this)},getBatchData:function(){return l.length?o(l):""},clear:function(){clearTimeout(u),l=[]},fail:function(e){t=e}};function d(){if(l.length){var e=this.getBatchData();n.post({url:i,data:e,fail:function(n){t&&t(n,e)}}),l=[]}}return f}(e),n=t.send;return function(e){var t=$();if(t){var n=i(he(e),1)[0];["unload","beforeunload","pagehide"].forEach((function(e){fe(t,e,n,!1)}))}}((function(){if(e.transport.useBeacon){var i=function(){var e=$();return e&&e.navigator.sendBeacon?{get:function(){},post:function(t,n){e.navigator.sendBeacon(t,n)}}:{get:s,post:s}}(),r=t.getBatchData();r&&(i.post(t.getEndpoint(),r),t.clear()),t.send=function(e){i.post(t.getEndpoint(),o([e]))},function(e){var t=W(),n=$();if(t&&n){var i=s;i=de(t,"visibilitychange",(function(){"visible"===t.visibilityState&&(e(),i())}),!0)}}((function(){t.send=n}))}else t.flush()})),t}var Ot="mon-va.byteoversea.com",It="https://sf16-short-sg.bytedapm.com/slardar/fe/sdk-web/plugins",Mt="1.14.5",Pt="SDK_SLARDAR_WEB",Nt="/monitor_web/settings/browser-settings",Ut="/monitor_browser/collect/batch/",Bt="SLARDAR",Gt=["/log/sentry/",Ut,Nt],Lt="session",jt=["blankScreen","action"],Ft={sample_rate:1,include_users:[],sample_granularity:Lt,rules:{}};function Kt(e,t,n){void 0===n&&(n=qt),function(e){var t=$(),n=W();t&&n&&("complete"!==n.readyState?fe(t,"load",(function(){setTimeout((function(){e()}),0)}),!1):e())}((function(){e.on("init",(function(){n(e,t)}))}))}var Ht=function(e,t,n,i){void 0===i&&(i=$t);var r=t.config(),o=r.plugins,a=r.pluginBundle,s=e.filter((function(e){return o[e]&&!t.destroyAgent.has(e)})),c=function(){return s.forEach((function(e){return Jt(t,e,n)}))};s.every((function(e){return Xt(e,n)}))?c():i(t,{name:a.name},c)},Vt=function(e,t,n,i){void 0===i&&(i=$t);var r=t.config().plugins;e.filter((function(e){return r[e]&&!t.destroyAgent.has(e)})).forEach((function(e){Xt(e,n)?Jt(t,e,n):i(t,{name:e,config:r[e]},(function(){return Jt(t,e,n)}))}))};function qt(e,t,i){void 0===i&&(i=$t);var r=e.config().pluginBundle,o=r?r.plugins:[];Ht(o,e,t,i),Vt(jt,e,t,i),e.provide("reloadPlugin",function(e){return function(t,i){var r,o=e.config().pluginBundle;e.destroyAgent.has(t)&&e.destroyAgent.remove(t),void 0!==i&&e.set({plugins:n(n({},e.config().plugins),(r={},r[t]=i,r))}),o&&~o.plugins.indexOf(t)?Ht([t],e):Vt([t],e)}}(e))}function $t(e,t,n,i){var r=t.name,o=t.config;void 0===i&&(i=pe);var a=function(e,t,n){var i;return null!==(i=null==n?void 0:n.path)&&void 0!==i?i:e.config().pluginPathPrefix+"/"+(r=t,r.replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"-"+n.toLowerCase()}))+".")+"1.14.5.js";var r}(e,r,o);i(a,(function(){n()}))}function Jt(e,t,n){if(void 0===n&&(n=se($())),n){var i=Wt(n,t);if(i)try{if(e.destroyAgent.has(t))return;i.apply(e)}catch(e){ce(e),O("[loader].applyPlugin failed",t,e)}else O("[loader].applyPlugin not found",t)}}function Wt(e,t){return e.plugins.filter((function(e){return e.name===t&&e.version===Mt}))[0]}function Xt(e,t){return void 0===t&&(t=se($())),!(!t||!t.plugins)&&!!Wt(t,e)}function Zt(e,t,n){void 0===n&&(n=se($())),n&&n.plugins&&(Wt(n,e)||n.plugins.push({name:e,version:Mt,apply:t}))}function Yt(e){var t,n;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(["userId","deviceId","sessionId","env"]),r=i.next();!r.done;r=i.next()){var o=r.value;e[o]||delete e[o]}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return e}function Qt(e){var t=e.plugins||{};for(var i in t)t[i]&&!l(t[i])&&(t[i]={});return Yt(n(n({},e),{plugins:t}))}function en(e){return l(e)&&"bid"in e}function tn(e){return Yt(n({},e))}function nn(e){var t;if(!e)return{};var n=e.sample,i=e.plugins,r=e.timestamp,o=e.quota_rate,a=void 0===o?1:o,s=e.apdex;if(!n)return{};var c=n.sample_rate,l=n.sample_granularity,u=void 0===l?Lt:l,f=n.include_users,d=n.rules;return{sample:{include_users:f,sample_rate:c*a,sample_granularity:u,rules:(void 0===d?[]:d).reduce((function(e,t){var n=t.name,i=t.enable,r=t.sample_rate,o=t.conditional_sample_rules;return e[n]={enable:i,sample_rate:r,conditional_sample_rules:o},e}),{})},plugins:{heatmap:null!==(t=null==i?void 0:i.heatmap)&&void 0!==t&&t},apdex:s,serverTimestamp:r}}var rn=function(e,t){return void 0===t&&(t=Ut),(e&&e.indexOf("//")>=0?"":"https://")+e+t},on=function(e,t){return void 0===t&&(t=Nt),(e&&e.indexOf("//")>=0?"":"https://")+e+t},an=function(){return N()},sn=function(e){var t=[];return e.observe=function(e){t.push(e)},e.push=function(){for(var n,o=[],a=0;a0||s<-6e5)&&e.on("beforeBuild",(function(e){var t;return n(n({},e),{extra:n(n({},null!==(t=e.extra)&&void 0!==t?t:{}),{sdk_offset:null!=s?s:0})})}))}}}))}))},Rn=function(e,t){var i={};return i.bid=t.bid,i.user_id=t.userId,i.device_id=t.deviceId,i.session_id=t.sessionId,i.release=t.release,i.env=t.env,n(n({},e),{extra:n(n({},i),e.extra||{})})},On=function(e){e.on("beforeBuild",(function(t){return Rn(t,e.config())}))},In=function(e){e.on("start",(function(){var t=e.config().bid,n=e.getSender();n.setEndpoint(n.getEndpoint()+"?biz_id="+t)}))},Mn=function(e){var t=ye(e.storageExpires),n=fn(e.bid,t);return{bid:"",pid:"",viewId:ft("_"),userId:n.userId,deviceId:n.deviceId,storageExpires:t,sessionId:an(),domain:Ot,pluginBundle:{name:"commonMonitors",plugins:["breadcrumb","jsError","performance","resourceError","resource"]},pluginPathPrefix:It,plugins:{ajax:{ignoreUrls:Gt},fetch:{ignoreUrls:Gt},breadcrumb:{},pageview:{},jsError:{},resource:{},resourceError:{},performance:{},tti:{},fmp:{},blankScreen:!1,heatmap:!1},release:"",env:"production",sample:Ft,transport:Dt()}},Pn=function(e){var t=void 0===e?{}:e,o=t.createSender,a=void 0===o?function(e){return Rt({size:20,endpoint:rn(e.domain),transport:e.transport})}:o,s=t.builder,c=void 0===s?_n:s,l=t.createDefaultConfig,u=F({validateInitConfig:en,initConfigNormalizer:Qt,userConfigNormalizer:tn,createSender:a,builder:c,createDefaultConfig:void 0===l?Mn:l,createConfigManager:pn});Cn(u),K(u);var f=se($());!function(e,t){var n=t||{},r={};e.provide("setFilter",(function(e,t){r[e]||(r[e]=[]),r[e].push(t)})),e.provide("initSubject",(function(t){var o=i(t,2),a=o[0],s=o[1],c=function(e){return e.split("_")[0]}(a),l=!!c&&r[c];return n[a]||(n[a]=G(s,(function(){n[a]=void 0}))),l?V(e,[a,L(n[a],l)]):n[a]})),e.provide("getSubject",(function(e){return n[e]})),e.provide("privateSubject",{})}(u,f&&f.subject),Dn(u),On(u),bn(u),function(e){var t=Q(),i=kt(t);t&&(t.onchange=function(){i=kt(t)}),e.on("report",(function(e){return n(n({},e),{extra:n(n({},e.extra||{}),{network_type:i})})}))}(u),In(u);var d=function(e,t,n){var o={},a=function n(){for(var a,s=[],c=0;c0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function Ta(){for(var e=[],t=0;t=43)}})).catch((function(){return!1}))}(e).then((function(e){return f=e}))}function v(e){var t=d[e.name],n={};n.promise=new a((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function g(e){var t=d[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function m(e,t){var n=d[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function _(e,t){return new a((function(n,i){if(d[e.name]=d[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return n(e.db);v(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var a=r.open.apply(r,o);t&&(a.onupgradeneeded=function(t){var n=a.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore("local-forage-detect-blob-support")}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),a.onerror=function(e){e.preventDefault(),i(a.error)},a.onsuccess=function(){var t=a.result;t.onversionchange=function(e){e.target.close()},n(t),g(e)}}))}function y(e){return _(e,!1)}function b(e){return _(e,!0)}function E(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),i=e.versione.db.version;if(i&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),r||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function w(e){return o([function(e){for(var t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n),r=0;r0&&(!e.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return a.resolve().then((function(){if(!e.db||"NotFoundError"===r.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),b(e)})).then((function(){return function(e){v(e);for(var t=d[e.name],n=t.forages,i=0;i>4,u[c++]=(15&i)<<4|r>>2,u[c++]=(3&r)<<6|63&o;return l}function I(e){var t,n=new Uint8Array(e),i="";for(t=0;t>2],i+=A[(3&n[t])<<4|n[t+1]>>4],i+=A[(15&n[t+1])<<2|n[t+2]>>6],i+=A[63&n[t+2]];return n.length%3==2?i=i.substring(0,i.length-1)+"=":n.length%3==1&&(i=i.substring(0,i.length-2)+"=="),i}var M={serialize:function(e,t){var n="";if(e&&(n=R.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===R.call(e.buffer))){var i,r="__lfsc__:";e instanceof ArrayBuffer?(i=e,r+="arbf"):(i=e.buffer,"[object Int8Array]"===n?r+="si08":"[object Uint8Array]"===n?r+="ui08":"[object Uint8ClampedArray]"===n?r+="uic8":"[object Int16Array]"===n?r+="si16":"[object Uint16Array]"===n?r+="ur16":"[object Int32Array]"===n?r+="si32":"[object Uint32Array]"===n?r+="ui32":"[object Float32Array]"===n?r+="fl32":"[object Float64Array]"===n?r+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(r+I(i))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n="~~local_forage_type~"+e.type+"~"+I(this.result);t("__lfsc__:blob"+n)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,C))return JSON.parse(e);var t,n=e.substring(D),i=e.substring(C,D);if("blob"===i&&z.test(n)){var r=n.match(z);t=r[1],n=n.substring(r[0].length)}var a=O(n);switch(i){case"arbf":return a;case"blob":return o([a],{type:t});case"si08":return new Int8Array(a);case"ui08":return new Uint8Array(a);case"uic8":return new Uint8ClampedArray(a);case"si16":return new Int16Array(a);case"ur16":return new Uint16Array(a);case"si32":return new Int32Array(a);case"ui32":return new Uint32Array(a);case"fl32":return new Float32Array(a);case"fl64":return new Float64Array(a);default:throw new Error("Unkown type: "+i)}},stringToBuffer:O,bufferToString:I};function P(e,t,n,i){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,i)}function N(e,t,n,i,r,o){e.executeSql(n,i,r,(function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,s){s.rows.length?o(e,a):P(e,t,(function(){e.executeSql(n,i,r,o)}),o)}),o):o(e,a)}),o)}function U(e,t,n,i){var r=this;e=l(e);var o=new a((function(o,a){r.ready().then((function(){void 0===t&&(t=null);var s=t,c=r._dbInfo;c.serializer.serialize(t,(function(t,l){l?a(l):c.db.transaction((function(n){N(n,c,"INSERT OR REPLACE INTO "+c.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(s)}),(function(e,t){a(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(i>0)return void o(U.apply(r,[e,s,n,i-1]));a(t)}}))}))})).catch(a)}));return s(o,n),o}function B(e){return new a((function(t,n){e.transaction((function(i){i.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,i){for(var r=[],o=0;o0?(this._dbInfo=t,t.serializer=M,a.resolve()):a.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,i=n.ready().then((function(){for(var t=n._dbInfo,i=t.keyPrefix,r=i.length,o=localStorage.length,a=1,s=0;s=0;n--){var i=localStorage.key(n);0===i.indexOf(e)&&localStorage.removeItem(i)}}));return s(n,e),n},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var n=this,i=n.ready().then((function(){var t,i=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(i.keyPrefix.length)),t}));return s(i,t),i},keys:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,i=[],r=0;r=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):a.reject("Invalid arguments"),t),i}},F=function(e,t){for(var n,i,r=e.length,o=0;o-1&&(t=e.slice(0,e.indexOf("Build/")))}));else if("ios"===e||"mac"===e||"windows"===e)if(this.isNewIpad())t="iPad";else{var n=navigator.userAgent.replace("Mozilla/5.0 (",""),i=n.indexOf(";");t=n.slice(0,i)}}catch(e){return t.trim()}return t.trim()},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},e}(),Za=function(e,t){try{return Ka.get(e)}catch(e){return""}},Ya=function(e,t,n,i){try{var r=i||document.domain,o=+new Date+(n||6048e5);Ka.set(e,t,{expires:new Date(o),path:"/",domain:r})}catch(e){}},Qa=function(){function e(){this.cache={}}return e.prototype.setItem=function(e,t){this.cache[e]=t},e.prototype.getItem=function(e){return this.cache[e]},e.prototype.removeItem=function(e){this.cache[e]=void 0},e.prototype.getCookie=function(e,t){return Za(e)},e.prototype.setCookie=function(e,t,n,i){Ya(e,t,n,i)},e}(),es={getItem:function(e){try{var t=localStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(e){}return n||{}}catch(e){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:JSON.stringify(t);localStorage.setItem(e,n)}catch(e){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(e){}},getCookie:function(e,t){return Za(e)},setCookie:function(e,t,n,i){Ya(e,t,n,i)},isSupportLS:function(){try{return localStorage.setItem("_ranger-test-key","hi"),localStorage.getItem("_ranger-test-key"),localStorage.removeItem("_ranger-test-key"),!0}catch(e){return!1}}()},ts={getItem:function(e){try{var t=sessionStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(e){}return n||{}}catch(e){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:JSON.stringify(t);sessionStorage.setItem(e,n)}catch(e){}},removeItem:function(e){try{sessionStorage.removeItem(e)}catch(e){}},getCookie:function(e,t){return Za(e)},setCookie:function(e,t,n,i){Ya(e,t,n,i)},isSupportSession:function(){try{return sessionStorage.setItem("_ranger-test-key","hi"),sessionStorage.getItem("_ranger-test-key"),sessionStorage.removeItem("_ranger-test-key"),!0}catch(e){return!1}}()},ns=function(){function e(e,t){this._storage=t&&"session"===t?ts:!e&&es.isSupportLS?es:new Qa}return e.prototype.getItem=function(e){return this._storage.getItem(e)},e.prototype.setItem=function(e,t){this._storage.setItem(e,t)},e.prototype.getCookie=function(e,t){return this._storage.getCookie(e,t)},e.prototype.setCookie=function(e,t,n,i){this._storage.setCookie(e,t,n,i)},e.prototype.removeItem=function(e){this._storage.removeItem(e)},e}(),is={sg_central:"1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",us_east:"1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",sg_central_tt:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z21z1ez4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",us_east_tt:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",us_ttp:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz24z4az23z21",us_ttp_w:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz25z4az23z21",us_ttp2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z22z22z1nz4ez4az23z21z4az22z1gz1iz22z1mz1iz4az1az1mz1k",eu_ttp_gcp:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z49z23z21z1cz18z21z22z4ez18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",eu_central:"1fz22z22z1nz21z4mz4bz4bz18z25z21z1dz20z49z1kz1az21z4az19z27z22z1cz1gz1lz22z1jz18z1nz1gz4az1az1mz1k",eu_ttp_ie2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23",eu_ttp2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4dz4iz49z1lz1mz20z1kz18z1jz49z1lz1mz4dz18z4az22z1gz1iz22z1mz1iz25z4az1cz23"},rs=function(){return new Set(Object.keys(is))},os=function(){return Object.keys(is)},as={sg:"1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",my:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z19z1bz49z1kz27z4az1jz18z20z1iz1mz1dz1dz1gz1az1cz4az1az1mz1k"},ss={va:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",in:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},cs={sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z21z1ez4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",in:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z49z23z21z1cz18z21z22z4ez18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",ie2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23"},ls={sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz25z4az23z21",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz24z4az23z21",ie2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23"},us="5.3.12_oversea",fs=["1fz22z22z1nz21z4mz4bz4bz1bz18z22z18z4az19z27z22z1cz1bz18z1lz1az1cz4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz22z1cz18z49z24z18z4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz22z1cz18z4az22z1gz1iz22z1mz1iz49z1cz23z4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz22z1cz18z4az22z1gz1iz22z1mz1iz49z23z21z22z21z4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz1gz1mz49z21z1ez4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz1gz1mz49z24z18z4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz22z1cz18z49z24z18z4az19z27z22z1cz1bz18z1lz1az1cz4az1lz1cz22"].map((function(e){return Oa(e)}));!function(e){e.Init="init",e.Config="config",e.Start="start",e.Ready="ready",e.TokenComplete="token-complete",e.TokenStorage="token-storage",e.TokenFetch="token-fetch",e.TokenError="token-error",e.ConfigUuid="config-uuid",e.ConfigWebId="config-webid",e.ConfigDiD="config-deviceid",e.ConfigDomain="config-domain",e.CustomWebId="custom-webid",e.TokenChange="token-change",e.TokenReset="token-reset",e.ConfigTransform="config-transform",e.EnvTransform="env-transform",e.SessionReset="session-reset",e.SessionResetTime="session-reset-time",e.SessionResetInner="session-reset-inner",e.Event="event",e.Events="events",e.EventNow="event-now",e.CleanEvents="clean-events",e.BeconEvent="becon-event",e.SubmitBefore="submit-before",e.SubmitScuess="submit-scuess",e.SubmitAfter="submit-after",e.SubmitError="submit-error",e.SubmitVerify="submit-verify",e.DestoryInstance="destory-instance",e.LogSettingReady="log-setting-ready",e.Stay="stay",e.ResetStay="reset-stay",e.StayReady="stay-ready",e.SetStay="set-stay",e.RouteChange="route-change",e.RouteReady="route-ready",e.Ab="ab",e.AbVar="ab-var",e.AbAllVars="ab-all-vars",e.AbConfig="ab-config",e.AbExternalVersion="ab-external-version",e.AbVersionChangeOn="ab-version-change-on",e.AbVersionChangeOff="ab-version-change-off",e.AbOpenLayer="ab-open-layer",e.AbCloseLayer="ab-close-layer",e.AbReady="ab-ready",e.AbComplete="ab-complete",e.AbTimeout="ab-timeout",e.AbVerify="ab-verify",e.Profile="profile",e.ProfileSet="profile-set",e.ProfileSetOnce="profile-set-once",e.ProfileUnset="profile-unset",e.ProfileIncrement="profile-increment",e.ProfileAppend="profile-append",e.ProfileClear="profile-clear",e.Autotrack="autotrack",e.AutotrackReady="autotrack-ready",e.CepReady="cep-ready",e.TracerReady="tracer-ready",e.sessionRecord="session-record",e.SessionRecordStart="session-record-start",e.SessionRecordPause="session-record-pause",e.SessionRecordEnd="session-record-end",e.SessionRecordReport="session-record-report",e.TrackEventDuration="track-event-duration",e.TrackEventDurationStart="track-event-duration-start",e.TrackEventDurationEnd="track-event-duration-end",e.TrackEventDurationPause="track-event-duration-pause",e.TrackEventDurationResume="tracl-event-duration-resume",e.VisualCollectReady="visual-collect-ready",e.VisualApiReady="visual-api-ready",e.VisualApiUpdate="visual-api-update"}(ja||(ja={})),function(e){e.DEBUGGER_MESSAGE="debugger-message",e.DEBUGGER_MESSAGE_SDK="debugger-message-sdk",e.DEBUGGER_MESSAGE_FETCH="debugger-message-fetch",e.DEBUGGER_MESSAGE_FETCH_RESULT="debugger-message-fetch-result",e.DEBUGGER_MESSAGE_EVENT="debugger-message-event",e.DEVTOOL_WEB_READY="devtool-web-ready"}(Fa||(Fa={}));var ds=ja,hs=void 0,ps=(new Date).getTimezoneOffset(),vs=parseInt(""+-ps/60,10),gs=60*ps,ms=function(){function e(e,t){var n=this;this.is_first_time=!0,this.configPersist=!1,this.initConfig=t,this.collect=e;var i=new Xa(t.app_id,t.cookie_domain||"",t.cookie_expire||6048e5).init(),r="__tea_cache_first_"+t.app_id;this.configKey="__tea_cache_config_"+t.app_id,this.sessionStorage=new ns(!1,"session"),this.localStorage=new ns(!1,"local"),this.channelUrl=this.getChannelForUrl(),this.current_env="row",t.configPersist&&(this.configPersist=!0,this.storage=1===t.configPersist?this.sessionStorage:this.localStorage);var o=this.localStorage.getItem(r);o&&1==o?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(r,"1")),this.envInfo={user:{user_unique_id:hs,user_type:hs,user_id:hs,user_is_auth:hs,user_is_login:hs,device_id:hs,web_id:hs,ip_addr_id:hs,user_unique_id_type:hs},header:{app_id:hs,app_name:hs,app_install_id:hs,install_id:hs,app_package:hs,app_channel:hs,app_version:hs,ab_version:hs,os_name:i.os_name,os_version:i.os_version,device_model:i.device_model,ab_client:hs,traffic_type:hs,network_type:i.network_type,client_ip:hs,device_brand:hs,os_api:hs,access:hs,language:i.language,region:hs,app_language:hs,app_region:hs,creative_id:i.utm.creative_id,ad_id:i.utm.ad_id,campaign_id:i.utm.campaign_id,log_type:hs,rnd:hs,platform:i.platform,sdk_version:us,sdk_lib:"js",province:hs,city:hs,timezone:vs,tz_offset:gs,tz_name:hs,sim_region:hs,carrier:hs,resolution:i.screen_width+"x"+i.screen_height,browser:i.browser,browser_version:i.browser_version,referrer:i.referrer,referrer_host:i.referrer_host,width:i.screen_width,height:i.screen_height,screen_width:i.screen_width,screen_height:i.screen_height,utm_term:i.utm.utm_term,utm_content:i.utm.utm_content,utm_source:i.utm.utm_source,utm_medium:i.utm.utm_medium,utm_campaign:i.utm.utm_campaign,tracer_data:JSON.stringify(i.utm.tracer_data),custom:i.network_type?{network_type:i.network_type}:{}}},this.ab_version="",this.ab_uuid_cache={},this.evtParams={},this.reportErrorCallback=function(){},this.isLast=!1,this.setCustom(i),this.initDomain(),this.initABData(),this.collect.on("route-change",(function(e){n.changeReferInfo(e.config)}))}return e.prototype.initDomain=function(e){var t=this.initConfig.channel_domain;if(t)this.domain=t;else{var n=e||this.initConfig.report_channel||this.initConfig.channel,i=this.getChannelDomain(n);i||(console.warn("current channel: "+n+" is not exist, use va instead, please check!!!!"),i=as.sg),this.domain=Oa(i),this.setCurrentEnv(this.domain)}},e.prototype.setDomain=function(e){this.customDomain=!0,this.domain=e,this.setCurrentEnv(this.domain)},e.prototype.getDomain=function(e){return this.customDomain||e&&this.initDomain(e),this.domain},e.prototype.getChannelDomain=function(e){var t,n,i=e||this.initConfig.report_channel||this.initConfig.channel;return rs().has(i)?is[i]:"tcpy"===(null===(t=this.initConfig)||void 0===t?void 0:t.channel_type)?cs[i]:"ttp"===(null===(n=this.initConfig)||void 0===n?void 0:n.channel_type)?ls[i]:as[i]},e.prototype.getChannelForUrl=function(){return this.initConfig.channel_type?{WEBID_URL:"/v1/user/webid",TOB_URL:"",REPORT_URL:"/v1/list"}:this.initConfig.report_channel?-1!==["sg_central","us_east"].indexOf(this.initConfig.report_channel)?{WEBID_URL:"/webid",TOB_URL:"/tobid",REPORT_URL:"/list"}:{WEBID_URL:"/v1/user/webid",TOB_URL:"",REPORT_URL:"/v1/list"}:{WEBID_URL:"/webid",TOB_URL:"/tobid",REPORT_URL:"/list"}},e.prototype.setCurrentEnv=function(e){this.getDomain().includes("byteoversea")?this.current_env="row":this.current_env="other"},e.prototype.getCurrentEnv=function(){return this.current_env},e.prototype.initABData=function(){var e,t="__tea_sdk_ab_version_"+this.initConfig.app_id;e=this.localStorage.getItem(t),this.setAbCache(e)},e.prototype.setAbCache=function(e){this.ab_cache=e},e.prototype.getAbCache=function(){return this.ab_cache},e.prototype.clearAbCache=function(){this.ab_cache={},this.ab_version=""},e.prototype.setAbVersion=function(e){this.ab_version=e},e.prototype.getAbVersion=function(){return this.ab_version},e.prototype.setAbUuidCache=function(e,t){var n=t||this.envInfo.user.user_unique_id;this.ab_uuid_cache[""+n]||(this.ab_uuid_cache[""+n]=[]),-1===this.ab_uuid_cache[""+n].indexOf(e)&&this.ab_uuid_cache[""+n].push(e)},e.prototype.getAbUuidCache=function(e){return this.ab_uuid_cache[""+e]},e.prototype.getUrl=function(e){var t="";switch(e){case"event":t=this.channelUrl.REPORT_URL;break;case"webid":t=this.channelUrl.WEBID_URL;break;case"tobid":t=this.channelUrl.TOB_URL}var n="";return this.initConfig.caller&&(n="?sdk_version=5.3.12_oversea&sdk_name=web&app_id="+this.initConfig.app_id+"&caller="+this.initConfig.caller),""+this.getDomain()+t+n},e.prototype.setCustom=function(e){if(e&&e.latest_data&&e.latest_data.isLast)for(var t in delete e.latest_data.isLast,this.isLast=!0,e.latest_data)this.envInfo.header.custom[t]=e.latest_data[t]},e.prototype.setAppid=function(e){this.envInfo.header.app_id=e},e.prototype.changeReferInfo=function(e){var t=e;this.set({referrer:t.referrer});var n="";try{n=new URL(t.referrer).host}catch(e){}this.set({referrer_host:n||this.envInfo.header.referrer_host})},e.prototype.set=function(e){var t=this;Object.keys(e).forEach((function(n){if(void 0!==e[n]&&null!==e[n]||t.delete(n),"traffic_type"===n&&t.isLast&&(t.envInfo.header.custom.$latest_traffic_source_type=e[n]),"evtParams"===n)t.evtParams=wa(wa({},t.evtParams||{}),e.evtParams||{});else if("_staging_flag"===n)t.evtParams=wa(wa({},t.evtParams||{}),{_staging_flag:e._staging_flag});else if("reportErrorCallback"===n&&"function"==typeof e[n])t.reportErrorCallback=e[n];else{var i="",r="";if(n.indexOf(".")>-1){var o=n.split(".");i=o[0],r=o[1]}i?"user"===i||"header"===i?t.envInfo[i][r]=e[n]:(t.envInfo.header.custom[r]=e[n],t.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Add Custom Params",level:"info",time:Date.now(),infoType:"sdk",secType:"HEADER",common:"custom"})):Object.hasOwnProperty.call(t.envInfo.user,n)?(["user_type","ip_addr_id"].indexOf(n)>-1?t.envInfo.user[n]=e[n]?Number(e[n]):e[n]:["user_id","web_id","user_unique_id","user_unique_id_type"].indexOf(n)>-1?t.envInfo.user[n]=e[n]?String(e[n]):e[n]:["user_is_auth","user_is_login"].indexOf(n)>-1?t.envInfo.user[n]=Boolean(e[n]):"device_id"===n&&(t.envInfo.user[n]=e[n]),t.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Set Common Params",level:"info",time:Date.now(),infoType:"sdk",secType:"USER",common:n})):Object.hasOwnProperty.call(t.envInfo.header,n)?(t.envInfo.header[n]=e[n],t.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Set Common Params",level:"info",time:Date.now(),infoType:"sdk",secType:"HEADER",common:n})):(t.envInfo.header.custom[n]=e[n],t.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Add Custom Params",level:"info",time:Date.now(),infoType:"sdk",secType:"HEADER",common:"custom"}))}}))},e.prototype.get=function(e){try{return e?"evtParams"===e?this.evtParams:"reportErrorCallback"===e?this[e]:Object.hasOwnProperty.call(this.envInfo.user,e)?this.envInfo.user[e]:Object.hasOwnProperty.call(this.envInfo.header,e)?this.envInfo.header[e]:JSON.parse(JSON.stringify(this.envInfo[e])):JSON.parse(JSON.stringify(this.envInfo))}catch(e){console.log("get config stringify error "),this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.setStore=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};if(t&&Object.keys(e).length){var n=Object.assign(e,t);this.storage.setItem(this.configKey,n)}}catch(e){console.log("setStore error"),this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.getStore=function(){try{if(!this.configPersist)return null;var e=this.storage.getItem(this.configKey)||{};return e&&Object.keys(e).length?e:null}catch(e){return this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"}),null}},e.prototype.delete=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};t&&Object.hasOwnProperty.call(t,e)&&(delete t[e],this.storage.setItem(this.configKey,t))}catch(e){this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"}),console.log("delete error")}},e}(),_s=function(){function e(e){this.name=e||"default"}return e.prototype.enable=function(e){this.isLog=!1!==e},e.prototype.info=function(e){this.isLog&&console.log("%c %s","color: yellow; background-color: black;","[instance: "+this.name+"] "+e)},e.prototype.warn=function(e){this.isLog&&console.warn("%c %s","color: yellow; background-color: black;","[instance: "+this.name+"] "+e)},e.prototype.error=function(e){this.isLog&&console.error("%c %s","color: yellow; background-color: red;","[instance: "+this.name+"] "+e)},e.prototype.throw=function(e){throw this.error(this.name),new Error(e)},e}(),ys=function(){function e(){this.spiderBot=["Baiduspider","googlebot","360Spider","haosouspider","YoudaoBot","Yisouspider","Googlebot","Headless","Applebot","Bingbot","PetalBot"]}return e.prototype.checkSpider=function(e){if(!e.enable_spider)return!1;var t=window.navigator.userAgent;if(!t)return!0;var n=!1;return this.spiderBot.forEach((function(e){-1!==t.indexOf(e)&&(n=!0)})),n},e}(),bs=function(){function e(e,t){this.collect=e,this.native=t}var t=e.prototype;return t.bridgeInject=function(){try{return!!this.native&&(AppLogBridge?(console.log("AppLogBridge is injected"),!0):(console.log("AppLogBridge is not inject"),!1))}catch(e){return console.log("AppLogBridge is not inject"),!1}},t.bridgeReady=function(){var e=this;return new Promise((function(t,n){try{e.bridgeInject()?AppLogBridge.hasStarted((function(e){console.log("AppLogBridge is started? : "+e),e?t(!0):n(!1)})):n(!1)}catch(e){console.log("AppLogBridge, error:"+JSON.stringify(e.stack)),n(!1)}}))},t.setNativeAppId=function(e){try{AppLogBridge.setNativeAppId(JSON.stringify(e)),console.log("change bridge appid, event report with appid: "+e)}catch(e){console.error("setNativeAppId error")}},t.setConfig=function(e){var t=this;try{Object.keys(e).forEach((function(n){"user_unique_id"===n?t.setUserUniqueId(e[n]):e[n]?t.addHeaderInfo(n,e[n]):t.removeHeaderInfo(n)}))}catch(e){console.error("setConfig error")}},t.setUserUniqueId=function(e){try{AppLogBridge.setUserUniqueId(e)}catch(e){console.error("setUserUniqueId error")}},t.addHeaderInfo=function(e,t){try{AppLogBridge.addHeaderInfo(e,t)}catch(e){console.error("addHeaderInfo error")}},t.setHeaderInfo=function(e){try{AppLogBridge.setHeaderInfo(JSON.stringify(e))}catch(e){console.error("setHeaderInfo error")}},t.removeHeaderInfo=function(e){try{AppLogBridge.removeHeaderInfo(e)}catch(e){console.error("removeHeaderInfo error")}},t.reportPv=function(e){this.onEventV3("predefine_pageview",e)},t.onEventV3=function(e,t){try{AppLogBridge.onEventV3(e,t),this.collect.emit(DebuggerMesssge.DEBUGGER_MESSAGE,{type:DebuggerMesssge.DEBUGGER_MESSAGE_EVENT,info:"bridge report success",time:Date.now(),data:[{events:[{event:e,params:t}]}],code:200,status:"success"})}catch(e){console.error("onEventV3 error")}},t.profileSet=function(e){try{AppLogBridge.profileSet(e)}catch(e){console.error("profileSet error")}},t.profileSetOnce=function(e){try{AppLogBridge.profileSetOnce(e)}catch(e){console.error("profileSetOnce error")}},t.profileIncrement=function(e){try{AppLogBridge.profileIncrement(e)}catch(e){console.error("profileIncrement error")}},t.profileUnset=function(e){try{AppLogBridge.profileUnset(e)}catch(e){console.error("profileUnset error")}},t.profileAppend=function(e){try{AppLogBridge.profileAppend(e)}catch(e){console.error("profileAppend error")}},e}(),Es=function(){function e(){this.setUrl="/service/2/web_sdk_settings/",this.expireTime=216e5}return e.prototype.apply=function(e,t){if(t.enable_logsetting){this.collect=e,this.config=t;var n=e.adapters.storage;this.setKey="applog_web_logsetting_"+t.app_id,this.uniqueKey="web_logsetting_data",this.cacheStorgae=new n(!1),this.dbStorage=new Ja(this.setKey,"LOGSETTING_DATA_STORE"),this.domain=t.logsetting_domain||this.collect.configManager.getDomain(),this.check()}else e.emit(ds.LogSettingReady)},e.prototype.check=function(){return ka(this,void 0,void 0,(function(){var e;return Sa(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.getLocalData()];case 1:return(e=t.sent())&&Object.keys(e).length?(null==e?void 0:e.timestamp)=this.maxReport)this.report(!1);else{var i=this.reportTime;this.reportTimeout=setTimeout((function(){t.report(!1),t.reportTimeout=null}),i)}}catch(e){this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.beconEvent=function(e){if(!this.collect.destroy&&!this.collect.sdkStop){var t=Ta(e,this.cacheStorgae.getItem(this.beconKey)||[]);if(this.cacheStorgae.setItem(this.beconKey,t),this.collect.tokenManager.getReady()&&this.collect.sdkReady){this.cacheStorgae.removeItem(this.beconKey);try{var n=JSON.parse(JSON.stringify(t));if(this.send(this.split(this.merge(t)),!0),this.config.event_verify_url){var i=this.split(this.merge(n,!0));this.collect.emit(ds.SubmitVerify,i)}}catch(e){this.send(this.split(this.merge(t)),!0)}}}},e.prototype.reportBecon=function(){if(!this.collect.destroy&&!this.collect.sdkStop&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var e=this.cacheStorgae.getItem(this.beconKey)||[];if(e&&e.length){this.cacheStorgae.removeItem(this.beconKey);try{var t=JSON.parse(JSON.stringify(e));if(this.send(this.split(this.merge(e)),!0),this.config.event_verify_url){var n=this.split(this.merge(t,!0));this.collect.emit(ds.SubmitVerify,n)}}catch(t){this.send(this.split(this.merge(e)),!0)}}}},e.prototype.report=function(e){if(!this.collect.destroy&&!this.collect.sdkStop&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var t=this.cacheStorgae.getItem(this.eventKey)||[];t.length&&(this.cacheStorgae.removeItem(this.eventKey),this.sliceEvent(t,e))}},e.prototype.sliceEvent=function(e,t){if(e.length>this.eventLimit)for(var n=0;n>t/4).toString(10):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}().replace(/-/g,"").slice(0,19)},Ss=function(){function e(){this.cacheToken={},this.enableCookie=!1,this.enable_ttwebid=!1,this.enableCustomWebid=!1}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=this.collect.configManager,this.storage=new ns(!1),this.tokenKey="__tea_cache_tokens_"+t.app_id,this.enable_ttwebid=t.enable_ttwebid,this.enableCustomWebid=t.enable_custom_webid,this.collect.on(ds.ConfigUuid,(function(e){n.setUuid(e)})),this.collect.on(ds.ConfigWebId,(function(e){n.setWebId(e)})),this.collect.on(ds.ConfigDiD,(function(e){n.setDeviceId(e)})),this.enableCookie=t.cross_subdomain,this.expiresTime=t.cookie_expire||6048e5,this.cookieDomain=t.cookie_domain||"",this.checkStorage()},e.prototype.checkStorage=function(){var e=this;this.cacheToken=this.storage.getItem(this.tokenKey)||{},this.tokenType=this.cacheToken&&this.cacheToken._type_?this.cacheToken._type_:"default","custom"!==this.tokenType||this.enableCustomWebid?this.enableCustomWebid?this.collect.on(ds.CustomWebId,(function(){e.tokenReady=!0,e.collect.emit(ds.TokenComplete)})):this.checkEnv()||(this.enable_ttwebid?this.completeTtWid(this.cacheToken):this.check()):this.remoteWebid()},e.prototype.check=function(){this.cacheToken&&this.cacheToken.web_id?this.complete(this.cacheToken):this.config.disable_webid?this.complete({web_id:ks(),user_unique_id:this.configManager.get("user_unique_id")||ks()}):this.remoteWebid()},e.prototype.checkEnv=function(){var e=window.navigator.userAgent;if(-1!==e.indexOf("miniProgram")||-1!==e.indexOf("MiniProgram")){var t=Ua(window.location.href);return!(!t||!t.Web_ID||(this.complete({web_id:""+t.Web_ID,user_unique_id:this.configManager.get("user_unique_id")||""+t.Web_ID}),0))}return!1},e.prototype.remoteWebid=function(){var e=this,t=this.configManager.getUrl("webid"),n={app_key:this.config.app_key,app_id:this.config.app_id,url:location.href,user_agent:window.navigator.userAgent,referer:document.referrer,user_unique_id:""};this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch WebID Request",logType:"fetch",level:"info",time:Date.now(),data:n});var i=ks();this.collect.requestManager.useRequest({url:t,data:n,success:function(t){var n;t&&0===t.e?(n=t.web_id,e.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Success",logType:"fetch",level:"info",time:Date.now(),data:t})):(n=i,e.collect.configManager.set({localWebId:i}),e.collect.emit(ds.TokenError),e.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Data Error, Use LocalId",logType:"fetch",level:"warn",time:Date.now(),data:t}),e.collect.logger.warn("appid: "+e.config.app_id+" get webid error, use local webid~")),e.complete({web_id:e.configManager.get("web_id")||n,user_unique_id:e.configManager.get("user_unique_id")||n})},fail:function(){e.complete({web_id:e.configManager.get("web_id")||i,user_unique_id:e.configManager.get("user_unique_id")||i}),e.collect.configManager.set({localWebId:i}),e.collect.emit(ds.TokenError),e.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Network Fail, Use LocalId",logType:"fetch",level:"error",time:Date.now(),data:null}),e.collect.logger.warn("appid: "+e.config.app_id+", get webid error, use local webid~")},timeout:3e5})},e.prototype.complete=function(e){var t=e.web_id,n=e.user_unique_id,i=e.device_id;if(e.timestamp=Date.now(),this.collect.configManager.set({web_id:t,user_unique_id:n}),this.config.enable_device_id){var r=this.configManager.get("device_id")||i||t;this.collect.configManager.set({device_id:r}),e=wa(wa({},e),{device_id:r})}else delete e.device_id;this.setStorage(e),this.tokenReady=!0,this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK UserInfo Complete",logType:"info",secType:"USER",level:"info",time:Date.now(),data:{web_id:t,user_unique_id:n},infoType:"sdk"}),this.collect.emit(ds.TokenComplete)},e.prototype.completeTtWid=function(e){var t=e.user_unique_id||"",n=this.configManager.get("user_unique_id");(n||t)&&this.configManager.set({user_unique_id:n||t}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(ds.TokenComplete)},e.prototype.setUuid=function(e){if(e&&-1===["null","undefined","Null","None"].indexOf(e)){var t=String(e),n=this.configManager.get("user_unique_id"),i=this.cacheToken&&this.cacheToken.user_unique_id;if(t===n&&t===i)return;this.configManager.set({user_unique_id:t}),this.cacheToken||(this.cacheToken={}),this.cacheToken.user_unique_id=t,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken),this.collect.emit(ds.TokenChange,"uuid"),this.collect.emit(ds.SessionReset)}else this.clearUuid()},e.prototype.clearUuid=function(){this.config.enable_ttwebid||this.configManager.get("web_id")&&(this.configManager.set({user_unique_id:this.configManager.get("web_id")}),this.cacheToken&&this.cacheToken.web_id&&(this.cacheToken.user_unique_id=this.cacheToken.web_id,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)),this.collect.emit(ds.TokenReset))},e.prototype.setWebId=function(e){if(e&&!this.config.enable_ttwebid){this.cacheToken&&this.cacheToken.web_id?this.cacheToken.web_id!==e&&(this.cacheToken.user_unique_id=this.cacheToken.web_id===this.cacheToken.user_unique_id?e:this.cacheToken.user_unique_id,this.cacheToken.web_id=e):(this.cacheToken={},this.cacheToken.web_id=e,this.cacheToken.user_unique_id=e),this.cacheToken.timestamp=Date.now();var t=this.configManager.get("web_id"),n=this.configManager.get("user_unique_id");n&&n!==t||(this.configManager.set({user_unique_id:e}),this.collect.emit(ds.TokenChange,"uuid")),t!==e&&(this.configManager.set({web_id:e}),this.collect.emit(ds.TokenChange,"webid")),this.setStorage(this.cacheToken)}},e.prototype.setDeviceId=function(e){this.configManager.set({device_id:e}),this.config.enable_device_id&&this.cacheToken&&(this.cacheToken.device_id=e,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken))},e.prototype.setStorage=function(e){e._type_=this.enableCustomWebid?"custom":"default",delete e["diss".split("").reverse().join("")],this.storage.setItem(this.tokenKey,e),this.cacheToken=e},e.prototype.getReady=function(){return this.tokenReady},e.prototype.getTobId=function(){var e=this;return new Promise((function(t){var n;if("row"===(null===(n=e.collect.configManager)||void 0===n?void 0:n.getCurrentEnv()))if("tcpy"!==e.config.channel_type&&"ttp"!==e.config.channel_type){var i={app_id:e.config.app_id,user_unique_id:e.configManager.get("user_unique_id"),web_id:e.configManager.get("web_id"),user_unique_id_type:e.configManager.get("user_unique_id_type")};e.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch GetToken Request",logType:"fetch",level:"info",time:Date.now(),data:i,infoType:"sdk"}),e.collect.requestManager.useRequest({url:e.configManager.getUrl("tobid"),data:i,success:function(n){n&&0===n.e?(t(n.tobid),e.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Success",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"})):(t(""),e.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Fail",logType:"fetch",level:"error",time:Date.now(),data:n,infoType:"sdk"}))},fail:function(){t(""),e.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Network Error",logType:"fetch",level:"error",time:Date.now(),infoType:"sdk"})},time:3e4,withCredentials:e.enable_ttwebid})}else t("");else t("")}))},e}(),xs=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},Ts=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.storage=new Wa,this.sessionKey="__tea_session_id_"+t.app_id,this.expireTime=t.expireTime||18e5,this.disableSession=t.disable_session,this.disableSession||(this.setSessionId(),this.collect.on(ds.SessionReset,(function(){n.resetSessionId()})),this.collect.on(ds.SessionResetTime,(function(){n.updateSessionIdTime()})))},e.prototype.updateSessionIdTime=function(){var e=this.storage.getSessionItem(this.sessionKey);if(e&&e.sessionId){var t=e.timestamp;Date.now()-t>this.expireTime?(e={sessionId:xs(),timestamp:Date.now()},this.collect.emit(ds.SessionResetInner)):e.timestamp=Date.now(),this.storage.setSessionItem(this.sessionKey,e),this.resetExpTime()}},e.prototype.setSessionId=function(){var e=this,t=this.storage.getSessionItem(this.sessionKey);t&&t.sessionId?t.timestamp=Date.now():t={sessionId:xs(),timestamp:Date.now()},this.storage.setSessionItem(this.sessionKey,t),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime)},e.prototype.getSessionId=function(){var e=this.storage.getSessionItem(this.sessionKey);return this.disableSession?"":e&&e.sessionId?e.sessionId:""},e.prototype.resetExpTime=function(){var e=this;this.sessionExp&&(clearInterval(this.sessionExp),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime))},e.prototype.resetSessionId=function(){var e={sessionId:xs(),timestamp:Date.now()};this.storage.setItem(this.sessionKey,e)},e.prototype.checkEXp=function(){var e=this.storage.getSessionItem(this.sessionKey);e&&e.sessionId&&Date.now()-e.timestamp+30>=this.expireTime&&(e={sessionId:xs(),timestamp:Date.now()},this.storage.setSessionItem(this.sessionKey,e))},e}();function As(e){for(var t=e.length;--t>=0;)e[t]=0}var zs=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),Cs=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Ds=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Rs=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Os=new Array(576);As(Os);var Is=new Array(60);As(Is);var Ms=new Array(512);As(Ms);var Ps=new Array(256);As(Ps);var Ns=new Array(29);As(Ns);var Us,Bs,Gs,Ls=new Array(30);function js(e,t,n,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}function Fs(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}As(Ls);var Ks=function(e){return e<256?Ms[e]:Ms[256+(e>>>7)]},Hs=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Vs=function(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1},Js=function(e,t,n){var i,r,o=new Array(16),a=0;for(i=1;i<=15;i++)a=a+n[i-1]<<1,o[i]=a;for(r=0;r<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=$s(o[s]++,s))}},Ws=function(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Xs=function(e){e.bi_valid>8?Hs(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Zs=function(e,t,n,i){var r=2*t,o=2*n;return e[r]>1;n>=1;n--)Ys(e,o,n);r=c;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ys(e,o,1),i=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=i,o[2*r]=o[2*n]+o[2*i],e.depth[r]=(e.depth[n]>=e.depth[i]?e.depth[n]:e.depth[i])+1,o[2*n+1]=o[2*i+1]=r,e.heap[1]=r++,Ys(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,i,r,o,a,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,f=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,p=t.stat_desc.max_length,v=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=c[2*c[2*(i=e.heap[n])+1]+1]+1)>p&&(o=p,v++),c[2*i+1]=o,i>l||(e.bl_count[o]++,a=0,i>=h&&(a=d[i-h]),s=c[2*i],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(u[2*i+1]+a)));if(0!==v){do{for(o=p-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[p]--,v-=2}while(v>0);for(o=p;0!==o;o--)for(i=e.bl_count[o];0!==i;)(r=e.heap[--n])>l||(c[2*r+1]!==o&&(e.opt_len+=(o-c[2*r+1])*c[2*r],c[2*r+1]=o),i--)}}(e,t),Js(o,l,e.bl_count)},tc=function(e,t,n){var i,r,o=-1,a=t[1],s=0,c=7,l=4;for(0===a&&(c=138,l=3),t[2*(n+1)+1]=65535,i=0;i<=n;i++)r=a,a=t[2*(i+1)+1],++s>=7;i<30;i++)for(Ls[i]=r<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),ec(e,e.l_desc),ec(e,e.d_desc),a=function(e){var t;for(tc(e,e.dyn_ltree,e.l_desc.max_code),tc(e,e.dyn_dtree,e.d_desc.max_code),ec(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Rs[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),r=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=r&&(r=o)):r=o=n+5,n+4<=r&&-1!==t?rc(e,t,n,i):4===e.strategy||o===r?(Vs(e,2+(i?1:0),3),Qs(e,Os,Is)):(Vs(e,4+(i?1:0),3),function(e,t,n,i){var r;for(Vs(e,t-257,5),Vs(e,n-1,5),Vs(e,i-4,4),r=0;r>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Ps[n]+256+1)]++,e.dyn_dtree[2*Ks(t)]++),e.sym_next===e.sym_end},lc=function(e){Vs(e,2,3),qs(e,256,Os),function(e){16===e.bi_valid?(Hs(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)},uc=function(e,t,n,i){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(r=r+t[i++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0},fc=new Uint32Array(function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}()),dc=function(e,t,n,i){var r=fc,o=i+n;e^=-1;for(var a=i;a>>8^r[255&(e^t[a])];return-1^e},hc={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},pc={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},vc=oc,gc=ac,mc=sc,_c=cc,yc=lc,bc=pc.Z_NO_FLUSH,Ec=pc.Z_PARTIAL_FLUSH,wc=pc.Z_FULL_FLUSH,kc=pc.Z_FINISH,Sc=pc.Z_BLOCK,xc=pc.Z_OK,Tc=pc.Z_STREAM_END,Ac=pc.Z_STREAM_ERROR,zc=pc.Z_DATA_ERROR,Cc=pc.Z_BUF_ERROR,Dc=pc.Z_DEFAULT_COMPRESSION,Rc=pc.Z_FILTERED,Oc=pc.Z_HUFFMAN_ONLY,Ic=pc.Z_RLE,Mc=pc.Z_FIXED,Pc=pc.Z_UNKNOWN,Nc=pc.Z_DEFLATED,Uc=function(e,t){return e.msg=hc[t],t},Bc=function(e){return 2*e-(e>4?9:0)},Gc=function(e){for(var t=e.length;--t>=0;)e[t]=0},Lc=function(e){var t,n,i,r=e.w_size;i=t=e.hash_size;do{n=e.head[--i],e.head[i]=n>=r?n-r:0}while(--t);i=t=r;do{n=e.prev[--i],e.prev[i]=n>=r?n-r:0}while(--t)},jc=function(e,t,n){return(t<e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},Kc=function(e,t){mc(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Fc(e.strm)},Hc=function(e,t){e.pending_buf[e.pending++]=t},Vc=function(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},qc=function(e,t,n,i){var r=e.avail_in;return r>i&&(r=i),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),n),1===e.state.wrap?e.adler=uc(e.adler,t,r,n):2===e.state.wrap&&(e.adler=dc(e.adler,t,r,n)),e.next_in+=r,e.total_in+=r,r)},$c=function(e,t){var n,i,r=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,l=e.window,u=e.w_mask,f=e.prev,d=e.strstart+258,h=l[o+a-1],p=l[o+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do{if(l[(n=t)+a]===p&&l[n+a-1]===h&&l[n]===l[o]&&l[++n]===l[o+1]){o+=2,n++;do{}while(l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&oa){if(e.match_start=t,a=i,i>=s)break;h=l[o+a-1],p=l[o+a]}}}while((t=f[t&u])>c&&0!=--r);return a<=e.lookahead?a:e.lookahead},Jc=function(e){var t,n,i,r=e.w_size;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-262)&&(e.window.set(e.window.subarray(r,r+r-n),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.insert>e.strstart&&(e.insert=e.strstart),Lc(e),n+=r),0===e.strm.avail_in)break;if(t=qc(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=t,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=jc(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=jc(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},Wc=function(e,t){var n,i,r,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,s=e.strm.avail_in;do{if(n=65535,r=e.bi_valid+42>>3,e.strm.avail_out(i=e.strstart-e.block_start)+e.strm.avail_in&&(n=i+e.strm.avail_in),n>r&&(n=r),n>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,Fc(e.strm),i&&(i>n&&(i=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,n-=i),n&&(qc(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(0===a);return(s-=e.strm.avail_in)&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_waterr&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,r+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),r>e.strm.avail_in&&(r=e.strm.avail_in),r&&(qc(e.strm,e.window,e.strstart,r),e.strstart+=r,e.insert+=r>e.w_size-e.insert?e.w_size-e.insert:r),e.high_water>3,o=(r=e.pending_buf_size-r>65535?65535:e.pending_buf_size-r)>e.w_size?e.w_size:r,((i=e.strstart-e.block_start)>=o||(i||t===kc)&&t!==bc&&0===e.strm.avail_in&&i<=r)&&(n=i>r?r:i,a=t===kc&&0===e.strm.avail_in&&n===i?1:0,gc(e,e.block_start,n,a),e.block_start+=n,Fc(e.strm)),a?3:1)},Xc=function(e,t){for(var n,i;;){if(e.lookahead<262){if(Jc(e),e.lookahead<262&&t===bc)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=jc(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=$c(e,n)),e.match_length>=3)if(i=_c(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=jc(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=jc(e,e.ins_h,e.window[e.strstart+1]);else i=_c(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(Kc(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===kc?(Kc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Kc(e,!1),0===e.strm.avail_out)?1:2},Zc=function(e,t){for(var n,i,r;;){if(e.lookahead<262){if(Jc(e),e.lookahead<262&&t===bc)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=jc(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,i=_c(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=jc(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(Kc(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((i=_c(e,0,e.window[e.strstart-1]))&&Kc(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=_c(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===kc?(Kc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Kc(e,!1),0===e.strm.avail_out)?1:2};function Yc(e,t,n,i,r){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=i,this.func=r}var Qc=[new Yc(0,0,0,0,Wc),new Yc(4,4,8,4,Xc),new Yc(4,5,16,8,Xc),new Yc(4,6,32,32,Xc),new Yc(4,4,16,16,Zc),new Yc(8,16,32,32,Zc),new Yc(8,16,128,128,Zc),new Yc(8,32,128,256,Zc),new Yc(32,128,258,1024,Zc),new Yc(32,258,258,4096,Zc)];function el(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Nc,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Gc(this.dyn_ltree),Gc(this.dyn_dtree),Gc(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Gc(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Gc(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var tl=function(e){if(!e)return 1;var t=e.state;return!t||t.strm!==e||42!==t.status&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&113!==t.status&&666!==t.status?1:0},nl=function(e){if(tl(e))return Uc(e,Ac);e.total_in=e.total_out=0,e.data_type=Pc;var t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=-2,vc(t),xc},il=function(e){var t,n=nl(e);return n===xc&&((t=e.state).window_size=2*t.w_size,Gc(t.head),t.max_lazy_match=Qc[t.level].max_lazy,t.good_match=Qc[t.level].good_length,t.nice_match=Qc[t.level].nice_length,t.max_chain_length=Qc[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n},rl=function(e,t,n,i,r,o){if(!e)return Ac;var a=1;if(t===Dc&&(t=6),i<0?(a=0,i=-i):i>15&&(a=2,i-=16),r<1||r>9||n!==Nc||i<8||i>15||t<0||t>9||o<0||o>Mc||8===i&&1!==a)return Uc(e,Ac);8===i&&(i=9);var s=new el;return e.state=s,s.strm=e,s.status=42,s.wrap=a,s.gzhead=null,s.w_bits=i,s.w_size=1<Sc||t<0)return e?Uc(e,Ac):Ac;var n=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===n.status&&t!==kc)return Uc(e,0===e.avail_out?Cc:Ac);var i=n.last_flush;if(n.last_flush=t,0!==n.pending){if(Fc(e),0===e.avail_out)return n.last_flush=-1,xc}else if(0===e.avail_in&&Bc(t)<=Bc(i)&&t!==kc)return Uc(e,Cc);if(666===n.status&&0!==e.avail_in)return Uc(e,Cc);if(42===n.status&&0===n.wrap&&(n.status=113),42===n.status){var r=Nc+(n.w_bits-8<<4)<<8;if(r|=(n.strategy>=Oc||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(r|=32),Vc(n,r+=31-r%31),0!==n.strstart&&(Vc(n,e.adler>>>16),Vc(n,65535&e.adler)),e.adler=1,n.status=113,Fc(e),0!==n.pending)return n.last_flush=-1,xc}if(57===n.status)if(e.adler=0,Hc(n,31),Hc(n,139),Hc(n,8),n.gzhead)Hc(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Hc(n,255&n.gzhead.time),Hc(n,n.gzhead.time>>8&255),Hc(n,n.gzhead.time>>16&255),Hc(n,n.gzhead.time>>24&255),Hc(n,9===n.level?2:n.strategy>=Oc||n.level<2?4:0),Hc(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(Hc(n,255&n.gzhead.extra.length),Hc(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=dc(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(Hc(n,0),Hc(n,0),Hc(n,0),Hc(n,0),Hc(n,0),Hc(n,9===n.level?2:n.strategy>=Oc||n.level<2?4:0),Hc(n,3),n.status=113,Fc(e),0!==n.pending)return n.last_flush=-1,xc;if(69===n.status){if(n.gzhead.extra){for(var o=n.pending,a=(65535&n.gzhead.extra.length)-n.gzindex;n.pending+a>n.pending_buf_size;){var s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>o&&(e.adler=dc(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex+=s,Fc(e),0!==n.pending)return n.last_flush=-1,xc;o=0,a-=s}var c=new Uint8Array(n.gzhead.extra);n.pending_buf.set(c.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending+=a,n.gzhead.hcrc&&n.pending>o&&(e.adler=dc(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){var l,u=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>u&&(e.adler=dc(e.adler,n.pending_buf,n.pending-u,u)),Fc(e),0!==n.pending)return n.last_flush=-1,xc;u=0}l=n.gzindexu&&(e.adler=dc(e.adler,n.pending_buf,n.pending-u,u)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){var f,d=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>d&&(e.adler=dc(e.adler,n.pending_buf,n.pending-d,d)),Fc(e),0!==n.pending)return n.last_flush=-1,xc;d=0}f=n.gzindexd&&(e.adler=dc(e.adler,n.pending_buf,n.pending-d,d))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Fc(e),0!==n.pending))return n.last_flush=-1,xc;Hc(n,255&e.adler),Hc(n,e.adler>>8&255),e.adler=0}if(n.status=113,Fc(e),0!==n.pending)return n.last_flush=-1,xc}if(0!==e.avail_in||0!==n.lookahead||t!==bc&&666!==n.status){var h=0===n.level?Wc(n,t):n.strategy===Oc?function(e,t){for(var n;;){if(0===e.lookahead&&(Jc(e),0===e.lookahead)){if(t===bc)return 1;break}if(e.match_length=0,n=_c(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Kc(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===kc?(Kc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Kc(e,!1),0===e.strm.avail_out)?1:2}(n,t):n.strategy===Ic?function(e,t){for(var n,i,r,o,a=e.window;;){if(e.lookahead<=258){if(Jc(e),e.lookahead<=258&&t===bc)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&((i=a[r=e.strstart-1])===a[++r]&&i===a[++r]&&i===a[++r])){o=e.strstart+258;do{}while(i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&re.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=_c(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=_c(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Kc(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===kc?(Kc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Kc(e,!1),0===e.strm.avail_out)?1:2}(n,t):Qc[n.level].func(n,t);if(3!==h&&4!==h||(n.status=666),1===h||3===h)return 0===e.avail_out&&(n.last_flush=-1),xc;if(2===h&&(t===Ec?yc(n):t!==Sc&&(gc(n,0,0,!1),t===wc&&(Gc(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Fc(e),0===e.avail_out))return n.last_flush=-1,xc}return t!==kc?xc:n.wrap<=0?Tc:(2===n.wrap?(Hc(n,255&e.adler),Hc(n,e.adler>>8&255),Hc(n,e.adler>>16&255),Hc(n,e.adler>>24&255),Hc(n,255&e.total_in),Hc(n,e.total_in>>8&255),Hc(n,e.total_in>>16&255),Hc(n,e.total_in>>24&255)):(Vc(n,e.adler>>>16),Vc(n,65535&e.adler)),Fc(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?xc:Tc)},cl=function(e){if(tl(e))return Ac;var t=e.state.status;return e.state=null,113===t?Uc(e,zc):xc},ll=function(e,t){var n=t.length;if(tl(e))return Ac;var i=e.state,r=i.wrap;if(2===r||1===r&&42!==i.status||i.lookahead)return Ac;if(1===r&&(e.adler=uc(e.adler,t,n,0)),i.wrap=0,n>=i.w_size){0===r&&(Gc(i.head),i.strstart=0,i.block_start=0,i.insert=0);var o=new Uint8Array(i.w_size);o.set(t.subarray(n-i.w_size,n),0),t=o,n=i.w_size}var a=e.avail_in,s=e.next_in,c=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Jc(i);i.lookahead>=3;){var l=i.strstart,u=i.lookahead-2;do{i.ins_h=jc(i,i.ins_h,i.window[l+3-1]),i.prev[l&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=l,l++}while(--u);i.strstart=l,i.lookahead=2,Jc(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=s,e.input=c,e.avail_in=a,i.wrap=r,xc},ul=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},fl=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=J(n))throw new TypeError(n+"must be non-object");for(var i in n)ul(n,i)&&(e[i]=n[i])}}return e},dl=function(e){for(var t=0,n=0,i=e.length;n=252?6:vl>=248?5:vl>=240?4:vl>=224?3:vl>=192?2:1;pl[254]=pl[254]=1;var gl=function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,n,i,r,o,a=e.length,s=0;for(r=0;r>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},ml=function(e,t){var n,i,r=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var o=new Array(2*r);for(i=0,n=0;n4)o[i++]=65533,n+=s-1;else{for(a&=2===s?31:3===s?15:7;s>1&&n1?o[i++]=65533:a<65536?o[i++]=a:(a-=65536,o[i++]=55296|a>>10&1023,o[i++]=56320|1023&a)}}}return function(e,t){if(t<65534&&e.subarray&&hl)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var n="",i=0;ie.length&&(t=e.length);for(var n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+pl[e[n]]>t?n:t},yl=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},bl=Object.prototype.toString,El=pc.Z_NO_FLUSH,wl=pc.Z_SYNC_FLUSH,kl=pc.Z_FULL_FLUSH,Sl=pc.Z_FINISH,xl=pc.Z_OK,Tl=pc.Z_STREAM_END,Al=pc.Z_DEFAULT_COMPRESSION,zl=pc.Z_DEFAULT_STRATEGY,Cl=pc.Z_DEFLATED;function Dl(e){this.options=fl({level:Al,method:Cl,chunkSize:16384,windowBits:15,memLevel:8,strategy:zl},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new yl,this.strm.avail_out=0;var n=ol(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==xl)throw new Error(hc[n]);if(t.header&&al(this.strm,t.header),t.dictionary){var i;if(i="string"==typeof t.dictionary?gl(t.dictionary):"[object ArrayBuffer]"===bl.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=ll(this.strm,i))!==xl)throw new Error(hc[n]);this._dict_set=!0}}function Rl(e,t){var n=new Dl(t);if(n.push(e,!0),n.err)throw n.msg||hc[n.err];return n.result}Dl.prototype.push=function(e,t){var n,i,r=this.strm,o=this.options.chunkSize;if(this.ended)return!1;for(i=t===~~t?t:!0===t?Sl:El,"string"==typeof e?r.input=gl(e):"[object ArrayBuffer]"===bl.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),(i===wl||i===kl)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((n=sl(r,i))===Tl)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),n=cl(this.strm),this.onEnd(n),this.ended=!0,n===xl;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Dl.prototype.onData=function(e){this.chunks.push(e)},Dl.prototype.onEnd=function(e){e===xl&&(this.result=dl(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Ol=Dl,Il=Rl,Ml=function(e,t){return(t=t||{}).raw=!0,Rl(e,t)},Pl=function(e,t){return(t=t||{}).gzip=!0,Rl(e,t)},Nl=function(e,t){var n,i,r,o,a,s,c,l,u,f,d,h,p,v,g,m,_,y,b,E,w,k,S,x,T=e.state;n=e.next_in,S=e.input,i=n+(e.avail_in-5),r=e.next_out,x=e.output,o=r-(t-e.avail_out),a=r+(e.avail_out-257),s=T.dmax,c=T.wsize,l=T.whave,u=T.wnext,f=T.window,d=T.hold,h=T.bits,p=T.lencode,v=T.distcode,g=(1<>>=y=_>>>24,h-=y,0===(y=_>>>16&255))x[r++]=65535&_;else{if(!(16&y)){if(0==(64&y)){_=p[(65535&_)+(d&(1<>>=y,h-=y),h<15&&(d+=S[n++]<>>=y=_>>>24,h-=y,!(16&(y=_>>>16&255))){if(0==(64&y)){_=v[(65535&_)+(d&(1<s){e.msg="invalid distance too far back",T.mode=16209;break e}if(d>>>=y,h-=y,E>(y=r-o)){if((y=E-y)>l&&T.sane){e.msg="invalid distance too far back",T.mode=16209;break e}if(w=0,k=f,0===u){if(w+=c-y,y2;)x[r++]=k[w++],x[r++]=k[w++],x[r++]=k[w++],b-=3;b&&(x[r++]=k[w++],b>1&&(x[r++]=k[w++]))}else{w=r-E;do{x[r++]=x[w++],x[r++]=x[w++],x[r++]=x[w++],b-=3}while(b>2);b&&(x[r++]=x[w++],b>1&&(x[r++]=x[w++]))}break}}break}}while(n>3,d&=(1<<(h-=b<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n=1&&0===C[E];E--);if(w>E&&(w=E),0===E)return r[o++]=20971520,r[o++]=20971520,s.bits=1,0;for(b=1;b0&&(0===e||1!==E))return-1;for(D[1]=0,_=1;_<15;_++)D[_+1]=D[_]+C[_];for(y=0;y852||2===e&&T>592)return 1;for(;;){p=_-S,a[y]+1=h?(v=R[a[y]-h],g=z[a[y]-h]):(v=96,g=0),c=1<<_-S,b=l=1<>S)+(l-=c)]=p<<24|v<<16|g|0}while(0!==l);for(c=1<<_-1;A&c;)c>>=1;if(0!==c?(A&=c-1,A+=c):A=0,y++,0==--C[_]){if(_===E)break;_=t[n+a[y]]}if(_>w&&(A&f)!==u){for(0===S&&(S=w),d+=b,x=1<<(k=_-S);k+S852||2===e&&T>592)return 1;r[u=A&f]=w<<24|k<<16|d-o|0}}return 0!==A&&(r[d+A]=_-S<<24|64<<16|0),s.bits=w,0},Fl=pc.Z_FINISH,Kl=pc.Z_BLOCK,Hl=pc.Z_TREES,Vl=pc.Z_OK,ql=pc.Z_STREAM_END,$l=pc.Z_NEED_DICT,Jl=pc.Z_STREAM_ERROR,Wl=pc.Z_DATA_ERROR,Xl=pc.Z_MEM_ERROR,Zl=pc.Z_BUF_ERROR,Yl=pc.Z_DEFLATED,Ql=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function eu(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var tu,nu,iu=function(e){if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode<16180||t.mode>16211?1:0},ru=function(e){if(iu(e))return Jl;var t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=16180,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Vl},ou=function(e){if(iu(e))return Jl;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ru(e)},au=function(e,t){var n;if(iu(e))return Jl;var i=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Jl:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,ou(e))},su=function(e,t){if(!e)return Jl;var n=new eu;e.state=n,n.strm=e,n.window=null,n.mode=16180;var i=au(e,t);return i!==Vl&&(e.state=null),i},cu=!0,lu=function(e){if(cu){tu=new Int32Array(512),nu=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(jl(1,e.lens,0,288,tu,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;jl(2,e.lens,0,32,nu,0,e.work,{bits:5}),cu=!1}e.lencode=tu,e.lenbits=9,e.distcode=nu,e.distbits=5},uu=function(e,t,n,i){var r,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):((r=o.wsize-o.wnext)>i&&(r=i),o.window.set(t.subarray(n-i,n-i+r),o.wnext),(i-=r)?(o.window.set(t.subarray(n-i,n),0),o.wnext=i,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=dc(n.check,A,2,0),l=0,u=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=16209;break}if((15&l)!==Yl){e.msg="unknown compression method",n.mode=16209;break}if(u-=4,w=8+(15&(l>>>=4)),0===n.wbits&&(n.wbits=w),w>15||w>n.wbits){e.msg="invalid window size",n.mode=16209;break}n.dmax=1<>8&1),512&n.flags&&4&n.wrap&&(A[0]=255&l,A[1]=l>>>8&255,n.check=dc(n.check,A,2,0)),l=0,u=0,n.mode=16182;case 16182:for(;u<32;){if(0===s)break e;s--,l+=i[o++]<>>8&255,A[2]=l>>>16&255,A[3]=l>>>24&255,n.check=dc(n.check,A,4,0)),l=0,u=0,n.mode=16183;case 16183:for(;u<16;){if(0===s)break e;s--,l+=i[o++]<>8),512&n.flags&&4&n.wrap&&(A[0]=255&l,A[1]=l>>>8&255,n.check=dc(n.check,A,2,0)),l=0,u=0,n.mode=16184;case 16184:if(1024&n.flags){for(;u<16;){if(0===s)break e;s--,l+=i[o++]<>>8&255,n.check=dc(n.check,A,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&((h=n.length)>s&&(h=s),h&&(n.head&&(w=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(i.subarray(o,o+h),w)),512&n.flags&&4&n.wrap&&(n.check=dc(n.check,i,h,o)),s-=h,o+=h,n.length-=h),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===s)break e;h=0;do{w=i[o+h++],n.head&&w&&n.length<65536&&(n.head.name+=String.fromCharCode(w))}while(w&&h>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=16191;break;case 16189:for(;u<32;){if(0===s)break e;s--,l+=i[o++]<>>=7&u,u-=7&u,n.mode=16206;break}for(;u<3;){if(0===s)break e;s--,l+=i[o++]<>>=1)){case 0:n.mode=16193;break;case 1:if(lu(n),n.mode=16199,t===Hl){l>>>=2,u-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=16209}l>>>=2,u-=2;break;case 16193:for(l>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,l+=i[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=16209;break}if(n.length=65535&l,l=0,u=0,n.mode=16194,t===Hl)break e;case 16194:n.mode=16195;case 16195:if(h=n.length){if(h>s&&(h=s),h>c&&(h=c),0===h)break e;r.set(i.subarray(o,o+h),a),s-=h,o+=h,c-=h,a+=h,n.length-=h;break}n.mode=16191;break;case 16196:for(;u<14;){if(0===s)break e;s--,l+=i[o++]<>>=5,u-=5,n.ndist=1+(31&l),l>>>=5,u-=5,n.ncode=4+(15&l),l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=16209;break}n.have=0,n.mode=16197;case 16197:for(;n.have>>=3,u-=3}for(;n.have<19;)n.lens[z[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,S={bits:n.lenbits},k=jl(0,n.lens,0,19,n.lencode,0,n.work,S),n.lenbits=S.bits,k){e.msg="invalid code lengths set",n.mode=16209;break}n.have=0,n.mode=16198;case 16198:for(;n.have>>16&255,_=65535&T,!((g=T>>>24)<=u);){if(0===s)break e;s--,l+=i[o++]<>>=g,u-=g,n.lens[n.have++]=_;else{if(16===_){for(x=g+2;u>>=g,u-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=16209;break}w=n.lens[n.have-1],h=3+(3&l),l>>>=2,u-=2}else if(17===_){for(x=g+3;u>>=g)),l>>>=3,u-=3}else{for(x=g+7;u>>=g)),l>>>=7,u-=7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=16209;break}for(;h--;)n.lens[n.have++]=w}}if(16209===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=16209;break}if(n.lenbits=9,S={bits:n.lenbits},k=jl(1,n.lens,0,n.nlen,n.lencode,0,n.work,S),n.lenbits=S.bits,k){e.msg="invalid literal/lengths set",n.mode=16209;break}if(n.distbits=6,n.distcode=n.distdyn,S={bits:n.distbits},k=jl(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,S),n.distbits=S.bits,k){e.msg="invalid distances set",n.mode=16209;break}if(n.mode=16199,t===Hl)break e;case 16199:n.mode=16200;case 16200:if(s>=6&&c>=258){e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,Nl(e,d),a=e.next_out,r=e.output,c=e.avail_out,o=e.next_in,i=e.input,s=e.avail_in,l=n.hold,u=n.bits,16191===n.mode&&(n.back=-1);break}for(n.back=0;m=(T=n.lencode[l&(1<>>16&255,_=65535&T,!((g=T>>>24)<=u);){if(0===s)break e;s--,l+=i[o++]<>y)])>>>16&255,_=65535&T,!(y+(g=T>>>24)<=u);){if(0===s)break e;s--,l+=i[o++]<>>=y,u-=y,n.back+=y}if(l>>>=g,u-=g,n.back+=g,n.length=_,0===m){n.mode=16205;break}if(32&m){n.back=-1,n.mode=16191;break}if(64&m){e.msg="invalid literal/length code",n.mode=16209;break}n.extra=15&m,n.mode=16201;case 16201:if(n.extra){for(x=n.extra;u>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;m=(T=n.distcode[l&(1<>>16&255,_=65535&T,!((g=T>>>24)<=u);){if(0===s)break e;s--,l+=i[o++]<>y)])>>>16&255,_=65535&T,!(y+(g=T>>>24)<=u);){if(0===s)break e;s--,l+=i[o++]<>>=y,u-=y,n.back+=y}if(l>>>=g,u-=g,n.back+=g,64&m){e.msg="invalid distance code",n.mode=16209;break}n.offset=_,n.extra=15&m,n.mode=16203;case 16203:if(n.extra){for(x=n.extra;u>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=16209;break}n.mode=16204;case 16204:if(0===c)break e;if(h=d-c,n.offset>h){if((h=n.offset-h)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=16209;break}h>n.wnext?(h-=n.wnext,p=n.wsize-h):p=n.wnext-h,h>n.length&&(h=n.length),v=n.window}else v=r,p=a-n.offset,h=n.length;h>c&&(h=c),c-=h,n.length-=h;do{r[a++]=v[p++]}while(--h);0===n.length&&(n.mode=16200);break;case 16205:if(0===c)break e;r[a++]=n.length,c--,n.mode=16200;break;case 16206:if(n.wrap){for(;u<32;){if(0===s)break e;s--,l|=i[o++]<=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new yl,this.strm.avail_out=0;var n=du(this.strm,t.windowBits);if(n!==Eu)throw new Error(hc[n]);if(this.header=new mu,vu(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=gl(t.dictionary):"[object ArrayBuffer]"===_u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=gu(this.strm,t.dictionary))!==Eu))throw new Error(hc[n])}function zu(e,t){var n=new Au(t);if(n.push(e),n.err)throw n.msg||hc[n.err];return n.result}Au.prototype.push=function(e,t){var n,i,r,o=this.strm,a=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(i=t===~~t?t:!0===t?bu:yu,"[object ArrayBuffer]"===_u.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;;){for(0===o.avail_out&&(o.output=new Uint8Array(a),o.next_out=0,o.avail_out=a),(n=hu(o,i))===ku&&s&&((n=gu(o,s))===Eu?n=hu(o,i):n===xu&&(n=ku));o.avail_in>0&&n===wu&&o.state.wrap>0&&0!==e[o.next_in];)fu(o),n=hu(o,i);switch(n){case Su:case xu:case ku:case Tu:return this.onEnd(n),this.ended=!0,!1}if(r=o.avail_out,o.next_out&&(0===o.avail_out||n===wu))if("string"===this.options.to){var c=_l(o.output,o.next_out),l=o.next_out-c,u=ml(o.output,c);o.next_out=l,o.avail_out=a-l,l&&o.output.set(o.output.subarray(c,c+l),0),this.onData(u)}else this.onData(o.output.length===o.next_out?o.output:o.output.subarray(0,o.next_out));if(n!==Eu||0!==r){if(n===wu)return n=pu(this.strm),this.onEnd(n),this.ended=!0,!0;if(0===o.avail_in)break}}return!0},Au.prototype.onData=function(e){this.chunks.push(e)},Au.prototype.onEnd=function(e){e===Eu&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=dl(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Cu=function(e,t){return(t=t||{}).raw=!0,zu(e,t)},Du={Deflate:Ol,deflate:Il,deflateRaw:Ml,gzip:Pl,Inflate:Au,inflate:zu,inflateRaw:Cu,ungzip:zu,constants:pc},Ru=function(){function e(e,t){this.collector=e,this.config=t,this.requestType=t.request_type,this.supportBeacon=!(!window.navigator||!window.navigator.sendBeacon),this.errorCode={NO_URL:4001,IMG_ON:4e3,IMG_CATCH:4002,BEACON_FALSE:4003,XHR_ON:500,RESPONSE:5001,TIMEOUT:5005},this.customHeader=t.custom_request_header||{}}return e.prototype.useFetch=function(e){var t=e.url,n=e.data,i=e.method,r=e.success,o=e.fail,a={"Content-Type":"application/json; charset=utf-8"};if(Object.keys(this.customHeader).length)for(var s in this.customHeader)a[s]=this.customHeader[s];window.fetch?fetch(t,{method:i||"POST",headers:a,body:JSON.stringify(n)}).then((function(e){return e.json()})).then((function(e){r&&r(e)})).catch((function(e){o&&o(n,e)})):(this.requestType="xhr",console.log("your brwoser not support fetch, use xhr"),this.useRequest({url:t,data:n,method:i,success:r,fail:o}))},e.prototype.useBeacon=function(e){var t=e.url,n=e.data,i=e.success,r=e.fail;"xhr"!==this.requestType?window.navigator.sendBeacon(t,JSON.stringify(n))?i&&i():r&&r(n,this.errorCode.BEACON_FALSE):this.useXhr(e)},e.prototype.useXhr=function(e){var t=this,n=e.url,i=e.data,r=e.method,o=e.success,a=e.fail,s=e.timeout,c=e.withCredentials,l=e.app_key,u=e.zip;try{var f=new XMLHttpRequest,d=r||"POST";if(f.open(d,""+n,!0),f.setRequestHeader("Content-Type","application/json; charset=utf-8"),l&&f.setRequestHeader("X-MCS-AppKey",""+l),Object.keys(this.customHeader).length)for(var h in this.customHeader)f.setRequestHeader(h,this.customHeader[h]);c&&(f.withCredentials=!0),s&&(f.timeout=s,f.ontimeout=function(){a&&a(i,t.errorCode.TIMEOUT)}),f.onload=function(){if(o){var e=null;if(f.responseText){try{e=JSON.parse(f.responseText)}catch(t){e={}}o(e,i)}}},f.onerror=function(){f.abort(),a&&a(i,t.errorCode.XHR_ON)};try{var p=JSON.stringify(i),v=this.collector.configManager.getCurrentEnv();if(this.config.need_zip&&u)if("row"===v){var g=(new TextEncoder).encode(p),m=Du.gzip(g);f.setRequestHeader("Content-Encoding","gzip"),f.send(m)}else f.send(p),this.collector.logger.warn("your channel do not support gzip, use normal data!");else f.send(p)}catch(e){f.send(JSON.stringify(i)),this.collector.emit("sdk-inner-error",{type:"sdk_error_send",eventData:i,errorCode:1e3,msg:e.message||e.stack||"sdk_error_send"})}}catch(e){this.collector.emit("sdk-inner-error",{type:"sdk_error_request",eventData:i,errorCode:1001,msg:e.message||e.stack||"sdk_error_request"})}},e.prototype.useRequest=function(e){var t=e.useBeacon,n=e.forceXhr;if("xhr"===this.requestType)this.useXhr(e);else{if(t&&this.supportBeacon)return void this.useBeacon(e);if("fetch"===this.requestType&&!n)return void this.useFetch(e);this.useXhr(e)}},e}(),Ou=function(){function e(e){var t=this;this.onMove=function(e){if(t.isDragging){var n=e.clientX||e.touches[0].clientX,i=e.clientY||e.touches[0].clientY;if(t.clickAllowed){var r=Math.abs(n-t.initialX),o=Math.abs(i-t.initialY);(r>t.dragThreshold||o>t.dragThreshold)&&(t.clickAllowed=!1)}t.animationFrameId&&cancelAnimationFrame(t.animationFrameId),t.animationFrameId=requestAnimationFrame((function(){var n=e.touches?e.touches[0].clientX:e.clientX,i=e.touches?e.touches[0].clientY:e.clientY,r=n-t.offsetX,o=i-t.offsetY,a=window.innerWidth-t.element.offsetWidth,s=window.innerHeight-t.element.offsetHeight;r=Math.max(0,Math.min(r,a)),o=Math.max(0,Math.min(o,s)),t.element.style.transform="translate(\n "+(r-t.initialX)+"px, \n "+(o-t.initialY)+"px\n )"}))}},this.onEnd=function(){if(t.isDragging){t.isDragging=!1;var e=new DOMMatrix(getComputedStyle(t.element).transform),n=t.initialX+e.m41,i=t.initialY+e.m42;t.element.style.left=n+"px",t.element.style.top=i+"px",t.element.style.transform="none",t.initialX=n,t.initialY=i,document.removeEventListener("mousemove",t.onMove),document.removeEventListener("mouseup",t.onEnd),document.removeEventListener("touchmove",t.onMove),document.removeEventListener("touchend",t.onEnd),setTimeout((function(){t.clickAllowed=!0}),50)}},this.element=e,this.isDragging=!1,this.animationFrameId=null,this.lastX=0,this.lastY=0,this.initialX=0,this.initialY=0,this.offsetX=0,this.offsetY=0,this.clickAllowed=!0,this.dragThreshold=1,this.initPosition(),this.bindEvents(),this.bindClickHandler()}return e.prototype.initPosition=function(){var e=this.element.getBoundingClientRect();this.element.style.position="fixed",this.element.style.left=e.left+"px",this.element.style.top=e.top+"px",this.element.style.transform="translate(0, 0)"},e.prototype.bindEvents=function(){this.element.addEventListener("mousedown",this.onStart.bind(this)),this.element.addEventListener("touchstart",this.onStart.bind(this))},e.prototype.onStart=function(e){e.preventDefault(),this.initialX=e.clientX||e.touches[0].clientX,this.initialY=e.clientY||e.touches[0].clientY;var t=e.touches?e.touches[0].clientX:e.clientX,n=e.touches?e.touches[0].clientY:e.clientY,i=this.element.getBoundingClientRect();this.initialX=i.left,this.initialY=i.top,this.offsetX=t-this.initialX,this.offsetY=n-this.initialY,this.clickAllowed=!0,this.isDragging=!0,document.addEventListener("mousemove",this.onMove),document.addEventListener("mouseup",this.onEnd),document.addEventListener("touchmove",this.onMove),document.addEventListener("touchend",this.onEnd)},e.prototype.bindClickHandler=function(){var e=this;this.element.addEventListener("click",(function(t){if(!e.clickAllowed)return t.stopImmediatePropagation(),void t.preventDefault();window&&window.postMessage({type:"devtool:web:open-draw"},location.origin)}))},e}(),Iu=function(){function e(e,t){if(this.devToolReady=!1,this.sendAlready=!1,t.enable_debug&&"Microsoft Internet Explorer"!==e.configManager.get("browser")){this.collect=e,this.config=t,this.app_id=t.app_id;var n=e.adapters.storage;this.cacheStorgae=new n(!1),this.devToolOrigin=window.location.origin,this.currentInstance=t.current_instance||"",this.loadUrl=t.devtool_url||"https://sf16-website-login.neutral.ttwstatic.com/obj/tiktok_web_login_static/log-sdk/collect/devtool/debug-web.v2.0.0.js",this.filterEvent=new Set(["__bav_page","__bav_beat","__bav_page_statistics","__bav_click","__bav_page_exposure","bav2b_page","bav2b_beat","bav2b_page_statistics","bav2b_click","bav2b_page_exposure","_be_active","predefine_pageview","__profile_set","__profile_set_once","__profile_increment","__profile_unset","__profile_append","predefine_page_alive","predefine_page_close","abtest_exposure"]),this.load()}}return e.prototype.loadScript=function(e){try{var t=document.createElement("script");t.src=e,t.onerror=function(){console.log("load DevTool render fail")},t.onload=function(){console.log("load DevTool render success")},document.getElementsByTagName("body")[0].appendChild(t)}catch(e){console.log("devTool load fail, "+e.message)}},e.prototype.parseUrl=function(){var e={};try{var t=window.location.href.split("?")[1].split("&");t.length&&t.forEach((function(t){var n=t.split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}))}catch(e){}return e},e.prototype.load=function(){try{var e=this.parseUrl();if(e.open_devtool_web&&e.app_id){if(parseInt(e.app_id)!==this.app_id)return;if(e.current_instance&&e.current_instance!==this.currentInstance)return}else if(!this.getStorage())return;this.loadBaseInfo(),this.loadHook(),this.setStorage(),this.addLintener(),this.loadDebuggerModule(),this.loadDevTool()}catch(e){console.log("debug fail, "+e.message)}},e.prototype.getStorage=function(){var e=this.cacheStorgae.getItem("__applog_open_devtool_web");return e&&parseInt(e)===this.app_id},e.prototype.setStorage=function(){this.cacheStorgae.setItem("__applog_open_devtool_web",this.app_id)},e.prototype.loadDevTool=function(){this.loadScript(this.loadUrl)},e.prototype.loadBaseInfo=function(){if(this.log=[],this.event=[],this.info=[{title:"BaseInfo",key:"base",type:1,content:[{name:"app_id",desc:"APPID",value:this.config.app_id},{name:"channel",desc:"CHANNEL",value:this.config.channel},{name:"domain",desc:"Domain",value:this.collect.configManager.getDomain()},{name:"sdk_version",desc:"SDK Version",value:us},{name:"sdk_type",desc:"SDK Import Type",value:"npm"}]},{title:"UserInfo",key:"user",type:2,content:[{name:"uuid",desc:"UserUniqueId",value:this.collect.configManager.get("user").user_unique_id||""},{name:"web_id",desc:"WEB_ID",value:this.collect.configManager.get("user").web_id||""}]},{title:"CommonInfo",type:2,key:"common",content:[{name:"browser",desc:"Browser",value:this.collect.configManager.get("browser")},{name:"browser_version",desc:"Browser Version",value:this.collect.configManager.get("browser_version")},{name:"platform",desc:"Platform",value:this.collect.configManager.get("platform")},{name:"device_model",desc:"Devide Model",value:this.collect.configManager.get("device_model")},{name:"os_name",desc:"Os Name",value:this.collect.configManager.get("os_name")},{name:"os_version",desc:"Os Version",value:this.collect.configManager.get("os_version")},{name:"resolution",desc:"Screen Resolution",value:this.collect.configManager.get("resolution")},{name:"referrer",desc:"Referrer",value:this.collect.configManager.get("referrer")},{name:"custom",desc:"Custom Info",value:JSON.stringify(this.collect.configManager.get("custom"))}]},{title:"Config Info",key:"config",type:3,content:[{name:"autotrack",desc:"AutoTrackEvent",value:!!this.config.autotrack},{name:"stay",desc:"StayDuration",value:!!this.config.enable_stay_duration}]},{title:"A/B Config Info",key:"ab",type:4,content:[{name:"ab",desc:"A/BTester",value:!!this.config.enable_ab_test}]}],this.config.enable_ab_test){var e=this.getInfo("ab"),t=[{name:"ab",desc:"A/BTester",value:!!this.config.enable_ab_test},{name:"vid",desc:"A/B VID",value:this.collect.configManager.getAbVersion()},{name:"ab_domain",desc:"Domain",value:this.config.ab_channel_domain||Oa(ss[this.config.channel])},{name:"all_values",desc:"A/B ALL Values",value:this.collect.configManager.getAbCache()}];e.content=t,this.setInfo("ab",e)}},e.prototype.getInfo=function(e){var t=null;return this.info.forEach((function(n){n.key===e&&(t=n)})),t},e.prototype.setInfo=function(e,t){var n=!1;this.info.forEach((function(i){i.key===e&&(n=!0,i=t)})),n||this.info.push(t)},e.prototype.getSecondInfo=function(e,t){var n=this.getInfo(e),i=null;return n.content.forEach((function(e){e.name===t&&(i=e)})),i},e.prototype.setSecondInfo=function(e,t,n){var i=this.getInfo(e),r=!1;if(i.content.forEach((function(e){e.name===t&&(e.value=n,r=!0)})),!r){var o={name:t,value:n,desc:t.toLocaleUpperCase()};i.content.push(o)}this.setInfo(e,i)},e.prototype.loadHook=function(){var e=this;this.collect.on(Fa.DEBUGGER_MESSAGE,(function(t){switch(t.type){case Fa.DEBUGGER_MESSAGE_SDK:var n={time:t.time,type:t.logType||"sdk",infoType:t.infoType||"sdk",level:t.level,name:t.info,show:!0,levelShow:!0,needDesc:!!t.data};if(t.data&&(n.desc={content:JSON.stringify(t.data)}),e.updateLog(n),t.secType&&"AB"===t.secType)e.setSecondInfo("ab","vid",e.collect.configManager.getAbVersion()),e.setSecondInfo("ab","all_values",e.collect.configManager.getAbCache());else if("USER"===t.secType)e.setSecondInfo("user","user_unique_id"===t.common?"uuid":t.common,e.collect.configManager.get(t.common));else if("HEADER"===t.secType){var i=e.collect.configManager.get(t.common);e.setSecondInfo("common",t.common,"custom"===t.common?JSON.stringify(i):i)}return void e.updateInfo();case Fa.DEBUGGER_MESSAGE_EVENT:if(t.data&&t.data.length){var r=t.data[0],o=r.events;if(!o.length)return;o.forEach((function(n){n.checkShow=!0,n.searchShow=!0,n.focusShow=!0,n.status=t.status,n.type=e.filterEvent.has(n.event)?"sdk":"cus",n.verifyType=t.verifyType?"verify":"no",n.info="","fail"===t.status&&(n.info={message:"code: "+t.code+", msg: "+(t.msg||t.failType)})})),e.updateEvent(r)}return}}))},e.prototype.addLintener=function(){var e=this;window.addEventListener("message",(function(t){if(e.devToolOrigin===t.origin){if(t&&t.data&&"devtool:web:ready"===t.data.type){if(e.devToolOrigin=t.origin,e.devToolReady=!0,e.sendAlready)return;e.sendData("devtool:web:init",{info:e.info,log:e.log,event:e.event,sdk_type:us.includes("tob")?"tob":"inner",appId:e.app_id}),e.sendAlready=!0}t&&t.data&&"devtool:web:ssid"===t.data.type&&e.collect.getToken((function(t){e.setSecondInfo("user","sid",t.tobid),e.updateInfo()}))}}))},e.prototype.sendData=function(e,t){try{var n={type:e,payload:t};window&&window.postMessage(n,this.devToolOrigin)}catch(e){}},e.prototype.updateInfo=function(){this.devToolReady&&this.sendData("devtool:web:info",this.info)},e.prototype.updateLog=function(e){this.devToolReady?this.sendData("devtool:web:log",e):this.log.push(e)},e.prototype.updateEvent=function(e){this.devToolReady?this.sendData("devtool:web:event",e):this.event.push(e)},e.prototype.loadDebuggerModule=function(){var e="#debugger-applog-web {\n position: fixed;\n width: 45px;\n height: 45px;\n background-image: url("+Oa("1fz22z22z1nz21z4mz4bz4bz21z1dz4dz4iz49z25z1cz19z21z1gz22z1cz49z1jz1mz1ez1gz1lz4az1lz1cz23z22z20z18z1jz4az22z22z25z21z22z18z22z1gz1az4az1az1mz1kz4bz1mz19z1hz4bz22z1gz1iz22z1mz1iz16z25z1cz19z16z1jz1mz1ez1gz1lz16z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1bz1cz24z22z1mz1mz1jz4bz18z1nz1nz1jz1mz1ez4az1nz1lz1e")+");\n bottom: 5%;\n right: 10%;\n cursor: pointer;\n z-index:100;\n background-size: 45px;\n }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.appendChild(document.createTextNode(e)),t.appendChild(n);var i=document.createElement("div");i.innerHTML='
';var r=document.createElement("div");r.innerHTML='
',document.getElementsByTagName("body")[0].appendChild(i),document.getElementsByTagName("body")[0].appendChild(r);var o=document.getElementById("debugger-applog-web");new Ou(o)},e}(),Mu={autotrack:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/autotrack.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/autotrack.js"},object:"LogAutoTrack"},ab:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/ab.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/ab.js"},object:"LogAb"},stay:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/stay.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/stay.js"},object:"LogStay"},route:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/route.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/route.js"},object:"LogRoute"},tracer:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/tracer.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/tracer.js"},object:"LogTracer"},retry:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/retry.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/retry.js"},object:"LogRetry"},visual:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/visual.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/visual.js"},object:"LogVisual"}},Pu=["ab","autotrack","Stay","store","et","profile","cep","heartbeat","monitor","route","tracer"],Nu=function(){function e(e){this.disableAutoPageView=!1,this.bridgeReport=!1,this.staging=!1,this.pluginInstances=[],this.sended=!1,this.started=!1,this.destroy=!1,this.sdkReady=!1,this.adapters={},this.loadType="base",this.sdkStop=!1,this.name=e,this.hook=new za,this.remotePlugin=new Map,this.logger=new _s(e),this.Types=ds,this.adapters.storage=ns,this.loadType="full"}return e.usePlugin=function(t,n,i){if(n){for(var r=!1,o=0,a=e.plugins.length;o-1}))){var t=e.data;if("string"==typeof e.data)try{t=JSON.parse(e.data)}catch(e){t=void 0}if(!t)return;var n=t.type,i=t.payload;Uu[n]&&Uu[n].forEach((function(t){"function"==typeof t&&t(e,i)}))}}var Fu,Ku="__rangers_ab_style__";!function(e){e[e.Var=0]="Var",e[e.All=1]="All"}(Fu||(Fu={}));var Hu=function(){function e(){this.fetchStatus="no",this.refreshFetchStatus="no",this.versions=[],this.extVersions=[],this.mulilinkVersions=[],this.enable_multilink=!1,this.enable_ab_visual=!1,this.editMode=!1,this.callbacks=[],this.data={},this.changeListener=new Map,this.readyStatus=!1,this.exposureCache=[],this.fetchQueueMap=new Map}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,this.config.enable_ab_test){var i=t.enable_multilink,r=t.ab_channel_domain,o=t.enable_ab_visual,a=t.ab_cross,s=t.ab_cookie_domain,c=t.ab_timeout,l=t.disable_auto_ab,u=ss[t.channel||"sg"]||ss.sg,f=r||Oa(u),d=e.adapters.storage;this.cacheStorgae=new d(!1),this.timeout=c||3e3,this.enable_multilink=i,this.enable_ab_visual=o,this.abKey="__tea_sdk_ab_version_"+t.app_id,this.ab_cross=a,this.ab_cookie_domain=s||"",this.fetchUrl=f+"/service/2/abtest_config/",this.reportUrl=this.collect.configManager.getUrl("event"),this.exposureLimit=t.exposure_limit||20,this.ab_batch_time=t.ab_batch_time||500,this.ab_user_mode=t.ab_user_mode||"user_unique_id",this.callbackMap=new Map,this.fetchQueueMap=new Map;var h=this.collect.Types;this.types=h,this.collect.on(h.TokenChange,(function(e){"uuid"===e&&n.readyStatus&&(n.clearCache(),n.fetchAB())})),this.collect.on(h.AbVar,(function(e){var t=e.name,i=e.defaultValue,r=e.callback;n.getVar(t,i,r)})),this.collect.on(h.AbAllVars,(function(e){var t=e.callback,i=e.timeout;n.getAllVars(t,i)})),this.collect.on(h.AbConfig,(function(e){var t=e.params,i=e.callback;n.getABconfig(t,i)})),this.collect.on(h.AbExternalVersion,(function(e){n.setExternalAbVersion(e)})),this.collect.on(h.AbOpenLayer,(function(){n.openOverlayer()})),this.collect.on(h.AbCloseLayer,(function(){n.closeOverlayer()})),this.collect.on(h.AbVersionChangeOn,(function(e){n.changeListener.set(e,e)})),this.collect.on(h.AbVersionChangeOff,(function(e){n.changeListener.get(e)&&n.changeListener.delete(e)})),this.loadMode(),(this.enable_ab_visual||this.enable_multilink)&&this.openOverlayer(this.config.multilink_timeout_ms||500),this.checkLocal(),this.ready("ab"),this.readyStatus||(!l&&this.fetchAB(),this.readyStatus=!0),this.collect.emit(h.AbReady)}},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!Object.keys(n).length)return;var i=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var r in n)i(r)}},e.prototype.loadMode=function(){var e=function(){try{return JSON.parse(atob(window.name))||void 0}catch(e){return}}(),t="";if(e){var n=e.scenario,i=e.href;n?(this.editMode=!0,t=n):!i||-1===i.indexOf("datatester")&&-1===i.indexOf("visual-editor")||(this.editMode=!0,t="visual-editor")}this.enable_ab_visual&&"visual-editor"===t&&this.collect.destoryInstace()},e.prototype.checkLocal=function(){var e=this.getABCache(),t=e.ab_version,n=e.ab_ext_version,i=e.ab_version_multilink,r=(e.data,this.checkFromUrl());r?this.mulilinkVersions.push(r):this.mulilinkVersions=i||[],this.extVersions=n||[],this.versions=t||[];var o=this.versions.concat(this.extVersions);this.enable_multilink&&(o=o.concat(this.mulilinkVersions))},e.prototype.checkFromUrl=function(){var e=Ua(window.location.href);return e&&e.vid?e.vid:""},e.prototype.updateVersions=function(){var e=this.extVersions.length?this.versions.concat(this.extVersions):this.versions;this.enable_multilink&&(e=e.concat(this.mulilinkVersions)),this.configVersions(e.join(",")),this.updateABCache(),this.changeListener.size>0&&this.changeListener.forEach((function(t){"function"==typeof t&&t(e)}))},e.prototype.configVersions=function(e){this.collect.configManager.setAbVersion(e)},e.prototype.getVar=function(e,t,n,i){if(!e)throw new Error("getVar key must not be empty");if(void 0===t&&console.warn("getVar defaultValue is illegal, please check!"),"function"!=typeof n)throw new Error("getVar callback must be a function");var r={name:e,defaultValue:t,callback:n,type:Fu.Var};this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetVar",level:"info",time:Date.now(),data:e,infoType:"cus"}),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealVar(r,e,i):this.callbackMap.set(e,r)},e.prototype.setAbUuid=function(e,t){this.collect.configManager.setAbUuidCache(e,t)},e.prototype.getRealVar=function(e,t,n){var i=e.name,r=e.defaultValue,o=e.callback,a=this.data;if(a){var s=a[i];if(s&&Ca(s)){var c=s.vid;return"$ab_url"===t?this.mulilinkVersions.includes(c)||this.mulilinkVersions.push(c):this.versions.includes(c)||this.versions.push(c),this.setAbUuid(c,n),this.updateVersions(),this.fechEvent(c,t||i,r,o,s.val),void this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetVar, Exposure Experiment "+i,level:"info",time:Date.now(),data:a[i],infoType:"sdk"})}this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GerVar Default Callback",level:"info",time:Date.now(),data:this.data,infoType:"sdk"}),o(r)}else o(r)},e.prototype.getAllVars=function(e,t){var n=this;if("function"!=typeof e)throw new Error("getAllVars callback must be a function");var i=null,r={callback:e,type:Fu.All,timer:i};this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetAllVars",level:"info",time:Date.now(),infoType:"cus"}),t&&(i=setTimeout((function(){r.timer=null,n.getRealAllVars(r),clearTimeout(i)}),t),r.timer=i),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?(r.timer=null,this.getRealAllVars(r),i&&clearTimeout(i)):this.callbackMap.set("allVars",r)},e.prototype.getRealAllVars=function(e,t){var n=e.callback,i=e.timer;i&&(clearTimeout(i),e.timer=null);var r=(null!=t?t:this.data)||{};try{n(JSON.parse(JSON.stringify(r)))}catch(e){n(r)}this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetAllVars Callback",level:"info",time:Date.now(),data:this.data,infoType:"sdk"})},e.prototype.fechEvent=function(e,t,n,i,r){try{if(this.config.disable_track_event)return;if(!e)return;var o=this.collect.configManager.get(),a=o.header,s=o.user,c=this.getABCache(),l=s[this.ab_user_mode]||s.user_unique_id;if(c&&c.uuid&&c.uuid!==l)return;var u={event:"abtest_exposure",ab_sdk_version:""+e,params:JSON.stringify({app_id:this.config.appId,ab_url:"$ab_url"===t?n:window.location.href,data:this.data}),local_time_ms:Date.now()};a.custom=JSON.stringify(a.custom);var f={events:[u],user:s,header:a};this.reportExposure(f,t),i&&i(r)}catch(e){this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.reportExposure=function(e,t){var n=this;this.exposureCache.push(e),this.reportTimeout&&clearTimeout(this.reportTimeout),this.exposureCache.length>=this.exposureLimit?this.report(t):this.reportTimeout=setTimeout((function(){n.report(t),clearTimeout(n.reportTimeout)}),this.ab_batch_time)},e.prototype.report=function(e){var t=this;this.collect.requestManager.useRequest({url:this.reportUrl,data:this.exposureCache,timeout:2e4,useBeacon:"$ab_url"===e,zip:!0}),this.exposureCache.forEach((function(e){t.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_EVENT,info:"SDK Report Exposure Event Success",time:Date.now(),data:[e],code:200,status:"success",infoType:"sdk"})})),this.collect.emit(this.types.AbVerify,[this.exposureCache]),this.exposureCache=[]},e.prototype.setExternalAbVersion=function(e){this.extVersions=[e],this.updateVersions()},e.prototype.getABconfig=function(e,t){var n=Object.keys(e);n&&n.length&&this.collect.configManager.set(e),this.fetchAB(t)},e.prototype.get=function(e){return this.cacheStorgae.getItem(e)},e.prototype.set=function(e,t){this.cacheStorgae.setItem(e,t),this.collect.configManager.setAbCache(t)},e.prototype.getABCache=function(e){var t={ab_version:[],ab_ext_version:[],ab_version_multilink:[],data:null,timestamp:+new Date,uuid:""};return t=this.get(this.abKey)||t,e?t[e]:t},e.prototype.updateABCache=function(){var e=this.getABCache();e.ab_version_multilink=this.mulilinkVersions,e.ab_ext_version=this.extVersions,e.ab_version=this.versions,e.timestamp=Date.now(),this.set(this.abKey,e)},e.prototype.setAbCache=function(e){var t=this.getABCache();t.data=this.data,t.uuid=e,t.timestamp=Date.now(),this.set(this.abKey,t)},e.prototype.clearCache=function(){this.refreshFetchStatus="ing",this.data={},this.extVersions=[],this.mulilinkVersions=[],this.versions=[],this.collect.configManager.clearAbCache()},e.prototype.openOverlayer=function(e){var t=this;if(function(){if(!document.getElementById(Ku)){var e="body { opacity: 0 !important; }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id=Ku,n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)}}(),e)var n=setTimeout((function(){t.closeOverlayer(),clearTimeout(n)}),e)},e.prototype.closeOverlayer=function(){var e;(e=document.getElementById(Ku))&&e.parentElement.removeChild(e)},e.prototype.fetchComplete=function(e,t){var n=this;this.changeFetchQueueStatus(t);try{if(e&&"[object Object]"==Object.prototype.toString.call(e)){var i=this.collect.configManager.get().user;if(t&&t!==i.user_unique_id)return;this.data=e,this.setAbCache(t);var r=[];Object.keys(e).forEach((function(t){var n=e[t].vid;n&&r.push(n)})),this.versions=this.versions.filter((function(e){return r.includes(e)}));var o=e.$ab_url,a=e.$ab_modification;if(a&&a.val&&this.enable_ab_visual){if(this.collect.destroy)return}else if(o&&this.enable_multilink){this.mulilinkVersions=this.mulilinkVersions.filter((function(e){return r.includes(e)}));var s=o.val,c=o.vid;s&&c&&this.getVar("$ab_url",s,(function(){n.editMode||(s!==window.location.href?setTimeout((function(){if(!n.collect.destroy){var e=""+s;e=-1===e.indexOf("http")?"https://"+e:e,Na(e).host!==location.host?e=e+"&vid="+c:window.history.replaceState("","",e),window.location.href=e}}),100):n.closeOverlayer())}))}this.updateVersions()}else this.closeOverlayer();this.callbackMap.forEach((function(t){t.type===Fu.Var?n.getRealVar(t,""):n.getRealAllVars(t,e)}))}catch(e){}},e.prototype.pushFetchToQueue=function(e){var t=e,n=this.fetchQueueMap.get(t);n?n.fetchStatus="ing":n={current_user_id:t,fetchStatus:"ing"},this.fetchQueueMap.set(t,n)},e.prototype.changeFetchQueueStatus=function(e){var t=this.fetchQueueMap.get(e);t&&(t.fetchStatus="complete",this.fetchQueueMap.set(e,t))},e.prototype.checkFetchQueueStatus=function(){if(0===this.fetchQueueMap.size)return!1;var e=!0;return this.fetchQueueMap.forEach((function(t){"complete"!==t.fetchStatus&&(e=!1)})),e},e.prototype.clearFetchQueue=function(e){this.fetchQueueMap.delete(e)},e.prototype.fetchAB=function(e){var t=this,n=this.collect.configManager.get(),i={header:wa(wa(wa({aid:this.config.app_id},n.user||{}),n.header||{}),{ab_sdk_version:this.collect.configManager.getAbVersion(),ab_url:window.location.href})};this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch AB Request",level:"info",logType:"fetch",time:Date.now(),data:i,infoType:"sdk"});var r=n.user[this.ab_user_mode]||n.user.user_unique_id;this.pushFetchToQueue(r),this.collect.requestManager.useRequest({url:this.fetchUrl,data:i,success:function(n){t.fetchStatus="complete",t.refreshFetchStatus="complete";var i=n.data;"success"===n.message?(t.fetchComplete(i,r),e&&e(i)):(t.fetchComplete(null,r),e&&e(null)),t.collect.emit(t.types.AbComplete,i),t.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Fetch AB Request Success",level:"info",logType:"fetch",time:Date.now(),data:i,infoType:"sdk"})},fail:function(){t.fetchStatus="complete",t.refreshFetchStatus="complete",t.fetchComplete(null,r),t.collect.emit(t.types.AbTimeout),e&&e(null),t.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Fetch AB Request Network Error",level:"error",logType:"fetch",time:Date.now(),infoType:"sdk"})},timeout:this.timeout})},e.prototype.filterUrl=function(e){try{var t="";-1!==e.indexOf("&multilink=true")?t="&multilink=true[\0-ÿ]*":-1!==e.indexOf("?multilink=true")&&(t="\\?multilink=true[\0-ÿ]*");var n=new RegExp(t,"g");e=e.replace(n,"")}catch(e){}return e},e}(),Vu=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,t.event_verify_url)if("string"==typeof t.event_verify_url){if(this.url=t.event_verify_url+"/v1/list_test",this.url){var i=e.Types;e.on(i.SubmitVerify,(function(e){n.verify(e)})),e.on(i.AbVerify,(function(e){n.verify(e)}))}}else console.log("please use correct et_test url")},e.prototype.verify=function(e){var t=this;e.forEach((function(e){try{var n=JSON.parse(JSON.stringify(e));t.config.filter&&((n=t.config.filter(n))||console.warn("filter must return data !!")),t.collect.eventFilter&&n&&((n=t.collect.eventFilter(n))||console.warn("filterEvent api must return data !!"));var i=n||e,r=JSON.parse(JSON.stringify(i));if(!i.length)return;var o=!0;if(i.forEach((function(e){e.events.length||(o=!1)})),!o)return;t.collect.requestManager.useBeacon({url:t.url,data:i}),t.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_EVENT,info:"SDK Report ByteIo Verify Request",time:Date.now(),data:r,code:200,status:"success",verifyType:!0})}catch(e){console.warn("something error, "+JSON.stringify(e.stack)),t.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Report ByteIo Verify Request Error",level:"error",time:Date.now(),data:e.message})}}))},e}(),qu=function(){function e(e,t){this.maxDuration=432e5,this.aliveDTime=6e4,this.options={aliveName:"predefine_page_alive",params:{}},this.focusState=!0,this.collect=e,this.config=t,this.pageStartTime=Date.now(),this.sessionStartTime=this.pageStartTime,this.timerHandler=null,Ca(t.enable_stay_duration)&&(this.options=Object.assign(this.options,t.enable_stay_duration)),this.hard=this.options.mode&&"hard"===this.options.mode,this.focusState=document.hasFocus()}return e.prototype.setParams=function(e,t,n){this.set_path=e,this.set_url=n,this.set_title=t},e.prototype.enable=function(e,t,n){this.url_path=e,this.url=n,this.title=t,this.disableCallback=this.enablePageAlive(),this.hard&&(this.removeMode=this.hardMode())},e.prototype.disable=function(){this.disableCallback(),this.pageStartTime=Date.now()},e.prototype.sendEvent=function(e,t){void 0===t&&(t=!1);var n=t?this.aliveDTime:Date.now()-this.sessionStartTime;n<0||n>this.aliveDTime||Date.now()-this.pageStartTime>this.maxDuration||t&&"hidden"===document.visibilityState||this.hard&&!this.focusState||(this.collect.beconEvent(this.options.aliveName,wa({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),duration:n,is_support_visibility_change:Pa(),startTime:this.sessionStartTime,hidden:document.visibilityState,leave:e,mode:this.hard?"hard":"normal",focusState:this.focusState},this.options.params)),this.sessionStartTime=Date.now())},e.prototype.getParams=function(e){switch(e){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.prototype.setUpTimer=function(){var e=this;return this.timerHandler&&clearInterval(this.timerHandler),setInterval((function(){Date.now()-e.sessionStartTime>e.aliveDTime&&e.sendEvent(!1,!0)}),1e3)},e.prototype.visibilitychange=function(){"hidden"===document.visibilityState?this.timerHandler&&(clearInterval(this.timerHandler),this.sendEvent(!1)):"visible"===document.visibilityState&&(this.sessionStartTime=Date.now(),this.timerHandler=this.setUpTimer())},e.prototype.beforeunload=function(){document.hidden||this.sendEvent(!0)},e.prototype.enablePageAlive=function(){var e=this;this.timerHandler=this.setUpTimer();var t=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",t),Ma(n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},e.prototype.hardMode=function(){var e=this,t=function(){e.timerHandler&&(clearInterval(e.timerHandler),e.sendEvent(!1)),e.focusState=!1},n=function(){e.focusState=!0,e.sessionStartTime=Date.now(),e.timerHandler=e.setUpTimer()};return window.addEventListener("blur",t),window.addEventListener("focus",n),function(){window.removeEventListener("blur",t),window.removeEventListener("focus",n)}},e}(),$u=function(){function e(e,t){var n=this;this.maxDuration=432e5,this.aliveDTime=6e4,this.options={closeName:"predefine_page_close",params:{}},this.focusState=!0,this.visibilitychange=function(){"hidden"===document.visibilityState?n.activeEndTime=Date.now():"visible"===document.visibilityState&&(n.activeEndTime&&(n.totalTime+=n.activeEndTime-n.activeStartTime,n.activeTimes+=1),n.activeEndTime=void 0,n.activeStartTime=Date.now())},this.beforeunload=function(){if(n.totalTime+=(n.activeEndTime||Date.now())-n.activeStartTime,n.config.autotrack)try{window.sessionStorage.setItem("_tea_cache_duration",JSON.stringify({duration:n.totalTime,page_title:document.title||location.pathname}))}catch(e){}n.sendEventPageClose()},this.collect=e,this.config=t,this.maxDuration=t.maxDuration||864e5,this.pageStartTime=Date.now(),Ca(t.enable_stay_duration)&&(this.options=Object.assign(this.options,t.enable_stay_duration)),this.hard=this.options.mode&&"hard"===this.options.mode,this.focusState=document.hasFocus(),this.resetData()}return e.prototype.setParams=function(e,t,n){this.set_path=e,this.set_url=n,this.set_title=t},e.prototype.resetParams=function(e,t,n){this.url_path=e,this.url=n,this.title=t},e.prototype.enable=function(e,t,n){this.url_path=e,this.url=n,this.title=t,this.disableCallback=this.enablePageClose(),this.hard&&(this.removeMode=this.hardMode())},e.prototype.disable=function(){this.disableCallback()},e.prototype.resetData=function(){this.activeStartTime=void 0===this.activeStartTime?this.pageStartTime:Date.now(),this.activeEndTime=void 0,this.activeTimes=1,this.totalTime=0,this.resetParams(location.pathname,document.title,location.href)},e.prototype.sendEventPageClose=function(){var e=Date.now()-this.pageStartTime;this.totalTime<0||e<0||this.totalTime>=this.maxDuration||this.hard&&!this.focusState||(this.collect.beconEvent(this.options.closeName,wa({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),active_times:this.activeTimes,duration:this.totalTime,total_duration:e,is_support_visibility_change:Pa(),mode:this.hard?"hard":"normal",focusState:this.focusState},this.options.params)),this.pageStartTime=Date.now(),this.resetData())},e.prototype.getParams=function(e){switch(e){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.prototype.enablePageClose=function(){var e=this,t=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",t),Ma(n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},e.prototype.hardMode=function(){var e=this,t=function(){e.focusState=!1},n=function(){e.focusState=!0};return window.addEventListener("blur",t),window.addEventListener("focus",n),function(){window.removeEventListener("blur",t),window.removeEventListener("focus",n)}},e}(),Ju=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,this.config.enable_stay_duration){this.title=document.title||location.pathname,this.url=location.href,this.url_path=location.pathname,this.pageAlive=new qu(e,t),this.pageClose=new $u(e,t);var i=this.collect.Types;this.collect.on(i.ResetStay,(function(e){var t=e.url_path,i=e.title,r=e.url;n.resetStayDuration(t,i,r)})),this.collect.on(i.RouteChange,(function(e){e.init||t.disable_route_report||n.resetStayDuration()})),this.collect.on(i.SetStay,(function(e){var t=e.url_path,i=e.title,r=e.url;n.setStayParmas(t,i,r)})),this.enable(this.url_path,this.title,this.url),this.ready(i.Stay),this.collect.emit(i.StayReady)}},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!Object.keys(n).length)return;var i=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var r in n)i(r)}},e.prototype.enable=function(e,t,n){this.pageAlive.enable(e,t,n),this.pageClose.enable(e,t,n)},e.prototype.disable=function(){this.pageAlive.disable(),this.pageClose.disable()},e.prototype.setStayParmas=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),this.pageAlive.setParams(e,t,n),this.pageClose.setParams(e,t,n),this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Execute resetStayParams",level:"info",time:Date.now(),data:{url_path:e,title:t,url:n}})},e.prototype.reset=function(e,t,n){this.disable(),this.enable(e,t,n)},e.prototype.resetStayDuration=function(e,t,n){this.reset(e,t,n),this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"SDK Execute resetStayDuration",level:"info",time:Date.now(),data:{url_path:e,title:t,url:n}})},e}(),Wu=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,!this.config.channel_domain&&!t.disable_track_event&&!t.disable_sdk_monitor){this.url=e.configManager.getUrl("event");var i=this.collect.Types;this.collect.on(i.Ready,(function(){n.sdkOnload()})),this.collect.on(i.SubmitError,(function(e){var t=e.type,i=e.eventData,r=e.errorCode,o=e.response;"f_data"===t&&n.sdkError(i,r,o)})),this.collect.on(e.Types.SDKInnerError,(function(e){var t=e.type,i=e.eventData,r=e.errorCode,o=e.msg;n.sdkInnerError(t,i,r,o)}))}},e.prototype.sdkOnload=function(){var e=this;try{var t=this.collect.configManager.get(),n=t.header,i=t.user,r=n.app_id,o=n.app_name,a=n.sdk_version,s=(i.web_id,{events:[{event:"onload",params:JSON.stringify({app_id:r,app_name:o||"",sdk_version:a,sdk_type:"npm",sdk_config:this.config,sdk_desc:"TOC_OVERSEA",url:location.href,is_setting:this.config.enable_logsetting||!1,enable_logsetting_params:this.config.enable_logsetting_params||!1,enable_logsetting_header_custom:this.config.enable_logsetting_header_custom||!1}),local_time_ms:Date.now()}],user:{user_unique_id:i.user_unique_id},header:{app_id:6656}});setTimeout((function(){e.collect.requestManager.useRequest({url:e.url,data:[s],timeout:3e4,forceXhr:!0})}),16)}catch(e){}},e.prototype.sdkError=function(e,t,n){var i=this;try{var r=e[0],o=r.user,a=r.header,s=[];e.forEach((function(e){e.events.forEach((function(e){s.push(e)}))}));var c={events:s.map((function(e){return{event:"on_error",params:JSON.stringify({type:"sdk_event_error",error_code:t,app_id:a.app_id,app_name:a.app_name||"",error_event:e.event,sdk_version:a.sdk_version,local_time_ms:e.local_time_ms,tea_event_index:Date.now(),params:e.params,header:a,user:o,err_msg:n.m||""}),local_time_ms:Date.now()}})),user:{user_unique_id:o.user_unique_id},header:{app_id:6656}};setTimeout((function(){i.collect.requestManager.useRequest({url:i.url,data:[c],timeout:3e4,forceXhr:!0})}),16)}catch(e){}},e.prototype.sdkInnerError=function(e,t,n,i){var r=this;try{var o=t[0],a=o.user,s=o.header,c=[];t.forEach((function(e){e.events.forEach((function(e){c.push(e)}))}));var l={events:c.map((function(t){return{event:"on_error",params:JSON.stringify({type:e,error_code:n,app_id:s.app_id,app_name:s.app_name||"",error_event:t.event,sdk_version:s.sdk_version,local_time_ms:t.local_time_ms,tea_event_index:Date.now(),params:t.params,header:s,user:a,ua:window.navigator.userAgent,err_msg:i}),local_time_ms:Date.now()}})),user:a,header:{}};setTimeout((function(){r.collect.requestManager.useRequest({url:r.url,data:[l],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(e){}},e}();function Xu(e,t){if(void 0===t&&(t="list"),!e)return!1;if(t&&"list"===t){if(["LI","TR","DL"].includes(e.nodeName))return!0;if(e.dataset&&e.dataset.hasOwnProperty("teaIdx"))return!0;if(e.hasAttribute&&e.hasAttribute("data-tea-idx"))return!0}else{if(["A","BUTTON"].includes(e.nodeName))return!0;if(e.dataset&&e.dataset.hasOwnProperty("teaContainer"))return!0;if(e.hasAttribute&&e.hasAttribute("data-tea-container"))return!0}return!1}function Zu(e){for(var t=e;t&&!Xu(t,"container");){if("HTML"===t.nodeName||"BODY"===t.nodeName)return e;t=t.parentElement}return t||e}function Yu(e){var t="";return 3===e.nodeType?t=e.textContent.trim():e.dataset&&e.dataset.hasOwnProperty("teaTitle")||e.hasAttribute("ata-tea-title")?t=e.getAttribute("data-tea-title"):e.hasAttribute("title")?t=e.getAttribute("title"):"INPUT"===e.nodeName&&["button","submit"].includes(e.getAttribute("type"))?t=e.getAttribute("value"):"IMG"===e.nodeName&&e.getAttribute("alt")&&(t=e.getAttribute("alt")),t.slice(0,200)}function Qu(e){for(var t=e;t&&t.parentNode;){if(t.hasAttribute("data-tea-ignore"))return!0;if("HTML"===t.nodeName||"body"===t.nodeName)return!1;t=t.parentNode}return!1}var ef=function(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0},tf=function(){function e(e,t,n){var i=this;this.statistics=!1,this.pageView=!1,this.clickEvent=function(e){(function(e,t){if(1!==e.nodeType)return!1;if(!t.svg&&function(e){if("svg"===e.tagName.toLowerCase())return!0;for(var t=e.parentElement,n=!1;t;)"svg"===t.tagName.toLowerCase()?(t=null,n=!0):t=t.parentElement;return n}(e))return!1;if(["HTML","BODY"].includes(e.tagName.toUpperCase()))return!1;var n=e;return!("none"===n.style.display||!Xu(n,"container")&&!function(e){if(e.children.length){var t=e.children;return![].slice.call(t).some((function(e){return e.children.length>0}))}return!0}(n)&&!t.svg)})(e.target,i.options)&&i.eventHandel({eventType:"dom",eventName:"click"},e)},this.changeEvent=function(e){i.eventHandel({eventType:"dom",eventName:"change"},e)},this.submitEvent=function(e){i.eventHandel({eventType:"dom",eventName:"submit"},e)},this.getPageViewEvent=function(e,t){t&&"pushState"===t&&i.eventHandel({eventType:"dom",eventName:"beat"},wa({beat_type:0},e)),i.eventHandel({eventType:"dom",eventName:"page_view"},e)},this.getPageLoadEvent=function(e){i.eventHandel({eventType:"dom",eventName:"page_statistics"},{lcp:e})},this.config=n.getConfig().eventConfig,this.collect=t,this.options=e,this.beatTime=e.beat}return e.prototype.init=function(e){this.eventHandel=e;var t=this.config.mode;this.addListener(t)},e.prototype.addListener=function(e){var t=this;if("proxy-capturing"===e){if(this.config.click&&window.document.addEventListener("click",this.clickEvent,!0),this.config.change&&window.document.addEventListener("change",this.changeEvent,!0),this.config.submit&&window.document.addEventListener("submit",this.submitEvent,!0),this.config.pv){this.collect.on("route-change",(function(e){var n=e.config,i=e.name;t.getPageViewEvent(n,i),t.pageView=!0}));var n=setTimeout((function(){t.pageView||(t.getPageViewEvent(t.getDefaultConfig()),t.pageView=!0,clearTimeout(n))}),2e3)}if(this.config.beat){try{"complete"===document.readyState?this.beatEvent(this.beatTime):window.addEventListener("load",(function(){t.beatEvent(t.beatTime)}));var i=0,r=null;window.addEventListener("scroll",(function(){clearTimeout(r),r=setTimeout(o,500),i=document.documentElement.scrollTop||document.body.scrollTop}));var o=function(){(document.documentElement.scrollTop||document.body.scrollTop)==i&&t.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:1})}}catch(e){}try{var a=window.performance&&window.performance.getEntriesByType("paint");a&&a.length?(new PerformanceObserver((function(e){var n=e.getEntries(),i=n[n.length-1],r=i.renderTime||i.loadTime;t.statistics||(t.getPageLoadEvent(r),t.statistics=!0)})).observe({entryTypes:["largest-contentful-paint"]}),setTimeout((function(){t.statistics||(t.getPageLoadEvent(a[0].startTime||0),t.statistics=!0)}),2e3)):this.getPageLoadEvent(0)}catch(e){this.getPageLoadEvent(0)}}}},e.prototype.removeListener=function(){window.document.removeEventListener("click",this.clickEvent,!0),window.document.removeEventListener("change",this.changeEvent,!0),window.document.removeEventListener("submit",this.submitEvent,!0)},e.prototype.beatEvent=function(e){var t=this;try{var n;this.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:3}),this.beatTime&&(n=setInterval((function(){t.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:2})}),e)),Ma((function(){t.eventHandel({eventType:"dom",eventName:"beat",eventSend:"becon"},{beat_type:0}),t.beatTime&&clearInterval(n)}))}catch(e){}},e.prototype.getDefaultConfig=function(){return{is_html:1,url:location.href,referrer:document.referrer,page_key:location.href,refer_page_key:document.referrer,page_title:document.title||location.pathname,page_manual_key:"",refer_page_manual_key:"",refer_page_title:"",page_path:location.pathname,page_host:location.host}},e}(),nf={eventConfig:{mode:"proxy-capturing",submit:!1,click:!0,change:!1,pv:!0,beat:!0,hashTag:!1,impr:!1},scoutConfig:{mode:"xpath"}},rf=function(){function e(e,t){this.config=e,this.config.eventConfig=Object.assign(this.config.eventConfig,t)}return e.prototype.getConfig=function(){return this.config},e.prototype.setConfig=function(e){return this.config=e},e}();function of(e,t,n,i){var r={},o=function(e){if(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return{left:t.left,top:t.top,element_width:n,element_height:i}}}(t),a=function(e,t){void 0===e&&(e={}),void 0===t&&(t={});var n=e.clientX,i=e.clientY,r=t.left,o=t.top,a=n-r>=0?n-r:0,s=i-o>=0?i-o:0;return{touch_x:Math.floor(a),touch_y:Math.floor(s)}}(e,o),s=o.element_width,c=o.element_height,l=a.touch_x,u=a.touch_y,f=function(e){for(var t=[];null!==e.parentElement;)t.push(e),e=e.parentElement;var n=[],i=[];return t.forEach((function(e){var t=function(e){if(null===e)return{str:"",index:0};var t=0,n=e.parentElement;if(n)for(var i=n.children,r=0;r0)for(var r=t.childNodes,o=0;o0)for(var r=t.childNodes,o=0;o0?r:0)),t.page_start_ms=i.navigationStart}catch(e){console.log("page_statistics event error "+JSON.stringify(e))}return t},e.prototype.handleBeadtEvent=function(e){e.event=this.eventName.beat,e.page_key=window.location.href,e.is_html=1,e.page_title=document.title,e.page_manual_key=this.initConfig.autotrack.page_manual_key||"";try{e.page_viewport_width=window.innerWidth,e.page_viewport_height=window.innerHeight,e.page_total_width=document.documentElement.scrollWidth,e.page_total_height=document.documentElement.scrollHeight,e.scroll_width=document.documentElement.scrollLeft+window.innerWidth,e.scroll_height=document.documentElement.scrollTop+window.innerHeight,e.since_page_start_ms=Date.now()-window.performance.timing.navigationStart,e.page_start_ms=window.performance.timing.navigationStart}catch(e){console.log("beat event error "+JSON.stringify(e))}return e},e.prototype.handleExposureEvent=function(e,t){if(Qu(t.target))return null;var n=af(e.event||this.eventName.exposure,t,t.target||t,this.options,this.ignore);if(n.$exposure_type=e.exposureType,this.options.exposure.callback){var i=this.options.exposure.callback(n);return i||Object.keys(i).length?i:(console.warn("exposure callback must return data!"),n)}return n},e.prototype.handleScrollEvent=function(e,t){var n=af(e.event||this.eventName.scroll,t,t.target||t,this.options,this.ignore);if(n=Object.assign(n,e.params),!this.options.scroll.callback||(n=this.options.scroll.callback(n))||Object.keys(n).length)return n;console.warn("scroll callback must return data!")},e}(),cf=function(){function e(e){this.collect=e,this.eventNameList=["report_click_event","report_change_event","report_submit_event","report_exposure_event","report_page_view_event","report_page_statistics_event","report_beat_event"]}return e.prototype.send=function(e,t){var n=e.eventSend,i=t.event;delete t.event,n&&"becon"===n?this.collect.beconEvent(i,t):this.collect.event(i,t)},e.prototype.get=function(e,t){var n=Object.assign({headers:{"content-type":"application/json"},method:"GET"},t);fetch(e,n)},e.prototype.post=function(e,t){var n=Object.assign({headers:{"content-type":"application/json"},method:"POST"},t);fetch(e,n)},e}();var lf,uf=function(){function e(e,t){this._instance=null,this._intersection=e,this.config=t,this._intersection&&this.init()}return e.prototype.init=function(){var e=this;if(window.MutationObserver)try{if(this._instance=new MutationObserver((function(t){t.forEach((function(t){"attributes"===t.type&&e.attributeChangeObserve(t),"childList"===t.type&&e.modifyNodeObserve(t)}))})),!document||!document.body)return void console.warn("please use sdk api init after body element");var t=!1!==this.config.autotrack.exposure.attributes;this._instance.observe(document.body,{childList:!0,attributes:t,subtree:!0,attributeOldValue:!1})}catch(e){console.log("your browser cannot support MutationObserver,so cannot report exposure event, please update")}else console.log("your browser cannot support MutationObserver,so cannot report exposure event, please update")},e.prototype.attributeChangeObserve=function(e){e.target.hasAttribute("data-exposure")?this.exposureAdd(e,"mutation"):this.exposureRemove(e)},e.prototype.modifyNodeObserve=function(e){var t=this;Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&e.hasAttribute("data-exposure")&&t.exposureAdd(e,"intersect"),t.mapChild(e,t.exposureAdd.bind(t))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&e.hasAttribute("data-exposure")&&t.exposureRemove(e),t.mapChild(e,t.exposureRemove.bind(t))}))},e.prototype.mapChild=function(e,t){var n=this;1===e.nodeType&&e.children.length&&Array.prototype.forEach.call(e.children,(function(e){1===e.nodeType&&e.hasAttribute("data-exposure")&&t(e),n.mapChild(e,t)}))},e.prototype.exposureAdd=function(e,t){try{this._intersection&&this._intersection.exposureAdd(e,t)}catch(e){console.log("intersection error",JSON.stringify(e.message))}},e.prototype.exposureRemove=function(e){try{this._intersection&&this._intersection.exposureRemove(e)}catch(e){console.log("intersection error",JSON.stringify(e.message))}},e._exposure_observer=null,e}();!function(e){e[e.EXPOSURE_ONCE=0]="EXPOSURE_ONCE",e[e.LIFECYCLE_SHOW_NEW=3]="LIFECYCLE_SHOW_NEW",e[e.RESUME_FORM_PAGE=6]="RESUME_FORM_PAGE",e[e.RESUME_FORM_BACK=7]="RESUME_FORM_BACK",e[e.NOT_EXPOSURE=-1]="NOT_EXPOSURE"}(lf||(lf={}));var ff,df=function(){function e(t,n,i){var r=this;this.backStatus=!1,this.instance=this.buildObserver(),this.collect=t,this.observeMap=e._observer_map,n.autotrack.exposure.ratio?this.ratio=n.autotrack.exposure.ratio:0===n.autotrack.exposure.ratio?this.ratio=0:this.ratio=.5,this.timeLimit=n.autotrack.exposure.stay||0,this.exposureType=lf.NOT_EXPOSURE,this.eventHandle=i,this.hashMap=new Map,this.backStatus=!1,this.lastState=null,this.collect.on("re-start-sdk",(function(){r.visibilitychange()})),this.addListen()}return e.prototype.buildObserver=function(){var t=this;if(e._observer_instance)return console.log("your browser cannot support IntersectionObserver, so cannot report exposure event, please update"),null;if(window.IntersectionObserver){for(var n=[],i=0;i<=1;i+=.01)n.push(i);n.push(1);try{e._observer_instance=new IntersectionObserver((function(e){e.forEach((function(e){var n=e.target.observeId,i=t.observeMap.get(n),r=(e.target,e.isIntersecting,e.intersectionRatio);if(i.intersectionRatio=r,r<=.1&&(e.target.backStatus=!1),t.observeMap.set(n,i),r=t.timeLimit&&!i.exposured&&t.exposureEvent(e,r,n,i)}))}),{threshold:n})}catch(e){console.log("IntersectionObserver error,msg: "+JSON.stringify(e))}return e._observer_instance}return console.log("your browser cannot support IntersectionObserver, so cannot report exposure event, please update"),null},e.prototype.exposureAdd=function(e,t){var n="mutation"===t?e.target:e,i=n.observeId,r=ks();if(i||this.observeMap.has(i)){var o=this.observeMap.get(i);if(o&&n!==o.instance)this.unobserve(n),this.observeMap.delete(i),n.observeId=r,n.visible=!1,this.observeMap.set(r,{instance:n.cloneNode(!0),isIntersecting:!1}),this.observe(n);else{if(!0===n.visible)return;this.handleBoundingExposure(n)}}else n.observeId=r,n.visible=!1,this.observeMap.set(r,{instance:n.cloneNode(!0),isIntersecting:!1}),this.observe(n)},e.prototype.exposureRemove=function(e){this.observeMap.has(e.observeId)&&(this.observeMap.delete(e.observeId),this.unobserve(e),e.observeId="",e.visible=!1)},e.prototype.exposureEvent=function(e,t,n,i){if(t>=this.ratio){if("0"===e.target.style.opacity||"hidden"===e.target.style.visibility)return;if(!0===i.exposured)return;i.startWait&&clearTimeout(i.startWait);var r=e.target.getAttribute("data-applog-exposure-event");this.eventHandle({eventType:"dom",eventName:"exposure",event:r,exposureType:this.getExposureType(e.target)},e),e.target.visible=!0,e.target.hasExposure=!0,i.startTime=Date.now(),i.exposured=!0}else i.startTime=Date.now(),i.exposured=!1;this.observeMap.set(n,i)},e.prototype.observe=function(e){this.instance&&this.instance.observe(e)},e.prototype.unobserve=function(e){this.instance&&this.instance.unobserve(e)},e.prototype.getExposureDomToExposure=function(){var e=this;Array.prototype.forEach.call(document.querySelectorAll("[data-exposure]"),(function(t){e.handleBoundingExposure(t)}))},e.prototype.visibilitychange=function(){var e=this,t=null;"visible"===document.visibilityState?this.timeLimit?t=setTimeout((function(){e.getExposureDomToExposure()}),this.timeLimit):this.getExposureDomToExposure():(clearTimeout(t),this.customType=void 0)},e.prototype.handleBoundingExposure=function(e){if(this.getBoundingRatio(e)>=this.ratio){e.visible=!0;var t=e.getAttribute&&e.getAttribute("data-exposure-event");this.eventHandle({eventType:"dom",eventName:"exposure",event:t,exposureType:this.customType||lf.RESUME_FORM_BACK},e)}},e.prototype.getBoundingRatio=function(e){var t=e.getBoundingClientRect(),n=t.top,i=t.left,r=t.width,o=t.height,a=window.innerWidth||document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return n>=0&&i>=0&&n<=s&&i<=a?(r>a?a:r)*(s-n)/(r*o):0},e.prototype.getExposureType=function(e){return e.visible?!1!==e.backStatus&&(this.backStatus||this.customType||2===window.performance.navigation.type)?this.exposureType=lf.RESUME_FORM_PAGE:this.exposureType=lf.LIFECYCLE_SHOW_NEW:(e.hasExposure,!1!==e.backStatus&&(this.backStatus||this.customType||2===window.performance.navigation.type)?this.exposureType=lf.RESUME_FORM_PAGE:this.exposureType=lf.EXPOSURE_ONCE),this.exposureType},e.prototype.addListen=function(){var e=this;this.collect.on("set-exposure-type",(function(t){e.customType=t}));var t,n,i,r=this.visibilitychange.bind(this);return t=document,n="visibilitychange",i=r,!1,t.addEventListener?t.addEventListener(n,i,false):t.attachEven?t.attachEven("on"+n,i):t["on"+n]=i,window.addEventListener("hashchange",(function(t){var n=e.hashMap.get(t.oldURL);n&&location.href===n.prev?(e.backStatus=!0,e.exposureType=lf.RESUME_FORM_PAGE):(e.backStatus=!1,e.hashMap.set(location.href,{current:t.newURL,prev:t.oldURL}))})),this.collect.on("STATE_CHANGE",(function(t){e.lastState=t})),window.addEventListener("popstate",(function(t){var n=t.state;n&&n.current&&e.lastState&&e.lastState.back&&n.current===e.lastState.back?(e.backStatus=!0,e.exposureType=lf.RESUME_FORM_PAGE):e.backStatus=!1})),function(){!function(e,t,n,i){e.addEventListener?e.removeEventListener(t,n,!1):e.attachEven&&e.detachEven("on"+t,n)}(document,"visibilitychange",r)}},e._observer_instance=null,e._observer_map=new Map,e}(),hf=function(){function e(e,t,n){t.autotrack&&t.autotrack.exposure&&(this._intersection=new df(e,t,n),this._observer=new uf(this._intersection,t),this._intersection&&this._observer?this.initObserver():console.log("your browser version cannot support exposure event, please update~"))}return e.prototype.initObserver=function(){var e=this;Array.prototype.forEach.call(document.querySelectorAll("[data-exposure]"),(function(t){e._intersection.exposureAdd(t,"intersect")}))},e}();!function(e){e[e.SCROLL_UP=1]="SCROLL_UP",e[e.SCROLL_DOWN=2]="SCROLL_DOWN",e[e.SCROLL_LEFT=3]="SCROLL_LEFT",e[e.SCROLL_RIGHT=4]="SCROLL_RIGHT",e[e.NOT_SCROLL=-1]="NOT_SCROLL"}(ff||(ff={}));var pf,vf=function(){function e(e,t){this.distance=30,e.autotrack&&e.autotrack.scroll&&(e.autotrack.scroll.distance&&(this.distance=e.autotrack.scroll.distance),this.eventHandle=t,this.addLinstenr(),this.mutation())}return e.prototype.addLinstenr=function(){var e=this;Array.prototype.forEach.call(document.querySelectorAll("[data-scroll]"),(function(t){e.scrollHandle(t)}))},e.prototype.mutation=function(){var e=this;if(window.MutationObserver)try{var t=new MutationObserver((function(t){t.forEach((function(t){"childList"===t.type&&e.modifyNodeObserve(t)}))}));if(!document||!document.body)return void console.warn("please use sdk api init after body element");t.observe(document.body,{childList:!0,attributes:!0,subtree:!0,attributeOldValue:!1})}catch(e){console.log("your browser cannot support MutationObserver")}else console.log("your browser cannot support MutationObserver")},e.prototype.modifyNodeObserve=function(e){var t=this;Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&e.hasAttribute("data-scroll")&&t.scrollHandle(e),t.mapChild(e,t.scrollHandle.bind(t))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&e.hasAttribute("data-scroll")&&t.scrollHandle(e,"remove"),t.mapChild(e,t.scrollHandle.bind(t))}))},e.prototype.mapChild=function(e,t){var n=this;1===e.nodeType&&e.children.length&&Array.prototype.forEach.call(e.children,(function(e){1===e.nodeType&&e.hasAttribute("data-scroll")&&t(e),n.mapChild(e,t)}))},e.prototype.scrollHandle=function(e,t){var n=this;try{var i=e.scrollTop,r=e.scrollLeft,o=null,a=0,s=0,c=function(t){clearTimeout(o),o=setTimeout((function(){var o=e.scrollTop,f=e.scrollLeft,d=t.target&&t.target.getAttribute("data-scroll-event")||"";1===u||2===u?o===c&&(s=c-i,Math.abs(s)>=n.distance&&n.distance&&n.eventHandle({eventType:"dom",eventName:"scroll",event:d,params:{$direction:u,$offsetY:s,$offsetX:a}},t)):3!==u&&4!==u||f===l&&(a=l-r,Math.abs(a)>=n.distance&&n.distance&&n.eventHandle({eventType:"dom",eventName:"scroll",event:d,params:{$direction:u,$offsetY:s,$offsetX:a}},t)),i=c,r=l}),100);var c=e.scrollTop,l=e.scrollLeft,u=ff.NOT_SCROLL;c>i?u=ff.SCROLL_DOWN:cr?u=ff.SCROLL_LEFT:l=this.limit[e]&&this.report(!1)}catch(e){console.log(e)}},e.prototype.addErrorCount=function(e,t,n,i){var r=this;try{if(e&&e.length){var o=e[0].events;o&&o.length&&("f_data"===t?(i&&i.hasOwnProperty("sc")?this.addCount("log",t,o.length-i.sc):this.addCount("log",t,o.length),this.errorCode[t]=n):o.forEach((function(e){var i="log";for(var o in _f)if(-1!==_f[o].indexOf(e.event)){i=o;break}r.addCount(i,t,1),r.errorCode[t]=n})))}}catch(e){}},e.prototype.report=function(e){if(this.tracerCache){var t=[];this.tracerCache.forEach((function(e){console.log(e),e.forEach((function(e){t.push(e)}))})),t&&t.length&&this.sendTracer(t,e)}},e.prototype.sendTracer=function(e,t){try{var n=this.collect.eventManager.merge(e);this.collect.requestManager.useRequest({url:this.reportUrl,data:n,useBeacon:t}),this.tracerCache=null}catch(e){}},e.prototype.processTracer=function(e,t,n){try{var i={count:e,state:n,key:t,params_for_special:"applog_trace",aid:this.appid,platform:"web",_staging_flag:1,sdk_version:us};"f_net"!==n&&"f_data"!==n||(i.errorCode=this.errorCode[n]);var r=this.collect.processEvent("applog_trace",i);if(r&&r.event)return delete r.is_bav,r}catch(e){console.warn("something error")}},e.prototype.listener=function(){var e=this;document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.leavePage()})),Ma((function(){e.leavePage()}))},e.prototype.leavePage=function(){this.report(!0)},e}(),bf=function(){function e(){this.retryWaitTime=3e3,this.retryStatus=!1,this.retryCacheStatus=!1}return e.prototype.apply=function(e,t){var n=this;if(t.enable_storage&&!t.disable_storage&&(this.collect=e,this.config=t,!this.collect.destroy)){var i=e.Types,r=e.adapters.storage;this.storage=new r(!1),this.eventUrl=this.collect.configManager.getUrl("event"),this.eventKey="__tea_cache_events_"+t.app_id,this.storageNum=t.storage_num||50,this.retryNum=t.retry_num||3,this.retryInterval=1e3,e.on(i.SubmitError,(function(e){"f_data"!==e.type&&n.storeData(e)})),e.on(i.Ready,(function(){n.checkStorage()}))}},e.prototype.retryRightNow=function(e){var t=this;if(this.retryStatus)this.errorCache.push(e);else{var n=0;this.retryStatus=!0;var i=setInterval((function(){if(3===n)return t.storeData(t.errorCache),t.retryStatus=!1,void clearInterval(i);var r=e.eventData;t.fetchData(r,(function(){t.retryStatus=!1,clearInterval(i),t.retryCacheStatus&&t.errorCache.splice(0,1),t.errorCache.length&&(t.retryCacheStatus=!0,t.retryRightNow(t.errorCache[0]))}),(function(){n++}))}),this.retryInterval)}},e.prototype.storeData=function(e){var t=this.storage.getItem(this.eventKey),n=e.eventData;Object.keys(t).length!==this.storageNum&&(t[Date.now()]=n,this.storage.setItem(this.eventKey,t))},e.prototype.checkStorage=function(){var e=this;try{if(!window.navigator.onLine)return;var t=this.storage.getItem(this.eventKey);if(!t||!Object.keys(t).length)return;var n={events:[{event:"ontest",params:{app_id:this.config.app_id},local_time_ms:Date.now()}],user:{user_unique_id:this.collect.configManager.get("web_id")},header:{}};this.fetchData([n],(function(){var n=JSON.parse(JSON.stringify(t)),i=function(i){e.fetchData(t[i],(function(){delete n[i],e.storage.setItem(e.eventKey,n)}),(function(){}),!1)};for(var r in t)i(r)}),(function(){}),!0)}catch(e){console.warn("error check storage")}},e.prototype.fetchData=function(e,t,n,i){this.collect.requestManager.useRequest({url:this.eventUrl,data:e,timeout:3e4,success:t,fail:n,app_key:i?"566f58151b0ed37e":""})},e}(),Ef="undefined"!=typeof window?(window.LogPluginObject||(window.LogPluginObject={}),window.LogPluginObject):null,wf=function(){function e(){}return e.prototype.apply=function(e,t){this._plugin={},this.config=t,this.collect=e,this.channel="va",this.loadExtend()},e.prototype.loadExtend=function(){var e=this;try{this.collect.remotePlugin.forEach((function(t,n){if("sdk"===t)if(Mu.hasOwnProperty(n)){var i=Mu[n].object,r=""+Mu[n].src[e.channel];e.exist(n,i,r)}else console.warn("your "+n+" is not exist,please check plugin name");else"object"==J(t)&&(t.src?e.exist(n,t.call,t.src):e.process(n,t.instance,"INSTANCE"))}))}catch(e){this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"LoadExtend Fail",level:"error",time:Date.now(),data:e.message}),console.log("load extend error")}},e.prototype.exist=function(e,t,n){var i=this;Ef[t]?(this.process(e,Ef[t]),console.log("already has "+e+" plugin~")):this.loadPlugin(e,n,(function(){i.process(e,Ef[t]),console.log(" %c %s %s %s","color: yellow; background-color: black;","–","load plugin:"+e+" success","-")}),(function(){console.log(" %c %s %s %s","color: red; background-color: yellow;","–","load plugin:"+e+" error","-")}))},e.prototype.process=function(e,t,n){try{if(n){var i=new t;i.apply&&i.apply(this.collect,this.config),console.log("excude "+e+" success")}else t&&t(this.collect,this.config)}catch(t){this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"Extend Process Fail",level:"error",time:Date.now(),data:t.message}),console.log("excude "+e+" error, message:"+t.message)}},e.prototype.loadPlugin=function(e,t,n,i){var r=this;try{var o=document.createElement("script");o.src=t,this._plugin[e]||(this._plugin[e]=[]),this._plugin[e].push(n),o.onerror=function(){i(t)},o.onload=function(){r._plugin[e].forEach((function(e){e()}))},document.getElementsByTagName("head")[0].appendChild(o)}catch(e){this.collect.emit(Fa.DEBUGGER_MESSAGE,{type:Fa.DEBUGGER_MESSAGE_SDK,info:"Extend LoadPlugin Fail",level:"error",time:Date.now(),data:e.message})}},e}(),kf=function(){function e(){this.autotrack=!1,this.spa=!1,this.cache={},this.allowHash=!1}return e.prototype.apply=function(e,t){if(t.spa||t.autotrack){var n=e.Types;this.collect=e,this.config=t,this.appid=t.app_id,this.allowHash=t.allow_hash,this.fncArray=new Map,this.setKey(),this.setLocation(),this.hack(),this.init(),this.listener(),e.emit(n.RouteReady)}},e.prototype.setKey=function(){var e=this.collect.adapters.storage;this.storage=new e(!1),this.cache_key="__tea_cache_refer_"+this.appid,this.cache={refer_key:"",refer_title:document.title||location.pathname,refer_manual_key:"",routeChange:!1},this.config.autotrack&&"object"==J(this.config.autotrack)&&this.config.autotrack.page_manual_key&&(this.cache.refer_manual_key=this.config.autotrack.page_manual_key),this.storage.setItem(this.cache_key,this.cache)},e.prototype.hack=function(){var e=this,t=window.history.pushState;history.pushState=function(n){for(var i=[],r=1;r0;)a[o=i[r]]||(t[o]=e[o],a[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Kf,kindOfTest:Hf,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var i=e.indexOf(t,n);return-1!==i&&i===n},toArray:function(e){if(!e)return null;var t=e.length;if(qf(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:rd,isFileList:Qf};function ad(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var sd=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(od.isURLSearchParams(t))i=t.toString();else{var r=[];od.forEach(t,(function(e,t){null!=e&&(od.isArray(e)?t+="[]":e=[e],od.forEach(e,(function(e){od.isDate(e)?e=e.toISOString():od.isObject(e)&&(e=JSON.stringify(e)),r.push(ad(t)+"="+ad(e))})))})),i=r.join("&")}if(i){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e};function cd(){this.handlers=[]}cd.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},cd.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},cd.prototype.forEach=function(e){od.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var ld=cd,ud=function(e,t){od.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))};function fd(e,t,n,i,r){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}od.inherits(fd,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var dd=fd.prototype,hd={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){hd[e]={value:e}})),Object.defineProperties(fd,hd),Object.defineProperty(dd,"isAxiosError",{value:!0}),fd.from=function(e,t,n,i,r,o){var a=Object.create(dd);return od.toFlatObject(e,a,(function(e){return e!==Error.prototype})),fd.call(a,e.message,t,n,i,r),a.name=e.name,o&&Object.assign(a,o),a};var pd=fd,vd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var gd=function(e,t){t=t||new FormData;var n=[];function i(e){return null===e?"":od.isDate(e)?e.toISOString():od.isArrayBuffer(e)||od.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(r,o){if(od.isPlainObject(r)||od.isArray(r)){if(-1!==n.indexOf(r))throw Error("Circular reference detected in "+o);n.push(r),od.forEach(r,(function(n,r){if(!od.isUndefined(n)){var a,s=o?o+"."+r:r;if(n&&!o&&"object"===J(n))if(od.endsWith(r,"{}"))n=JSON.stringify(n);else if(od.endsWith(r,"[]")&&(a=od.toArray(n)))return void a.forEach((function(e){!od.isUndefined(e)&&t.append(s,i(e))}));e(n,s)}})),n.pop()}else t.append(o,i(r))}(e),t},md=od.isStandardBrowserEnv()?{write:function(e,t,n,i,r,o){var a=[];a.push(e+"="+encodeURIComponent(t)),od.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),od.isString(i)&&a.push("path="+i),od.isString(r)&&a.push("domain="+r),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},_d=function(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t},yd=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],bd=od.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=od.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};function Ed(e){pd.call(this,null==e?"canceled":e,pd.ERR_CANCELED),this.name="CanceledError"}od.inherits(Ed,pd,{__CANCEL__:!0});var wd=Ed,kd=function(e){return new Promise((function(t,n){var i,r=e.data,o=e.headers,a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}od.isFormData(r)&&od.isStandardBrowserEnv()&&delete o["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var l=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(l+":"+u)}var f=_d(e.baseURL,e.url);function d(){if(c){var i="getAllResponseHeaders"in c?function(e){var t,n,i,r={};return e?(od.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=od.trim(e.substr(0,i)).toLowerCase(),n=od.trim(e.substr(i+1)),t){if(r[t]&&yd.indexOf(t)>=0)return;r[t]="set-cookie"===t?(r[t]?r[t]:[]).concat([n]):r[t]?r[t]+", "+n:n}})),r):r}(c.getAllResponseHeaders()):null;!function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new pd("Request failed with status code "+n.status,[pd.ERR_BAD_REQUEST,pd.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),s()}),(function(e){n(e),s()}),{data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:i,config:e,request:c}),c=null}}if(c.open(e.method.toUpperCase(),sd(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(n(new pd("Request aborted",pd.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new pd("Network Error",pd.ERR_NETWORK,e,c,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",i=e.transitional||vd;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new pd(t,i.clarifyTimeoutError?pd.ETIMEDOUT:pd.ECONNABORTED,e,c)),c=null},od.isStandardBrowserEnv()){var h=(e.withCredentials||bd(f))&&e.xsrfCookieName?md.read(e.xsrfCookieName):void 0;h&&(o[e.xsrfHeaderName]=h)}"setRequestHeader"in c&&od.forEach(o,(function(e,t){void 0===r&&"content-type"===t.toLowerCase()?delete o[t]:c.setRequestHeader(t,e)})),od.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(i=function(e){c&&(n(!e||e&&e.type?new wd:e),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i))),r||(r=null);var p,v=(p=/^([-+\w]{1,25})(:?\/\/|:)/.exec(f))&&p[1]||"";v&&-1===["http","https","file"].indexOf(v)?n(new pd("Unsupported protocol "+v+":",pd.ERR_BAD_REQUEST,e)):c.send(r)}))},Sd={"Content-Type":"application/x-www-form-urlencoded"};function xd(e,t){!od.isUndefined(e)&&od.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Td,Ad={transitional:vd,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(Td=kd),Td),transformRequest:[function(e,t){if(ud(t,"Accept"),ud(t,"Content-Type"),od.isFormData(e)||od.isArrayBuffer(e)||od.isBuffer(e)||od.isStream(e)||od.isFile(e)||od.isBlob(e))return e;if(od.isArrayBufferView(e))return e.buffer;if(od.isURLSearchParams(e))return xd(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,i=od.isObject(e),r=t&&t["Content-Type"];if((n=od.isFileList(e))||i&&"multipart/form-data"===r){var o=this.env&&this.env.FormData;return gd(n?{"files[]":e}:e,o&&new o)}return i||"application/json"===r?(xd(t,"application/json"),function(e,t,n){if(od.isString(e))try{return(t||JSON.parse)(e),od.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Ad.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,r=!n&&"json"===this.responseType;if(r||i&&od.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw pd.from(e,pd.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:null},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};od.forEach(["delete","get","head"],(function(e){Ad.headers[e]={}})),od.forEach(["post","put","patch"],(function(e){Ad.headers[e]=od.merge(Sd)}));var zd=Ad,Cd=function(e,t,n){var i=this||zd;return od.forEach(n,(function(n){e=n.call(i,e,t)})),e},Dd=function(e){return!(!e||!e.__CANCEL__)};function Rd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new wd}var Od=function(e){return Rd(e),e.headers=e.headers||{},e.data=Cd.call(e,e.data,e.headers,e.transformRequest),e.headers=od.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),od.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||zd.adapter)(e).then((function(t){return Rd(e),t.data=Cd.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return Dd(t)||(Rd(e),t&&t.response&&(t.response.data=Cd.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Id=function(e,t){t=t||{};var n={};function i(e,t){return od.isPlainObject(e)&&od.isPlainObject(t)?od.merge(e,t):od.isPlainObject(t)?od.merge({},t):od.isArray(t)?t.slice():t}function r(n){return od.isUndefined(t[n])?od.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function o(e){if(!od.isUndefined(t[e]))return i(void 0,t[e])}function a(n){return od.isUndefined(t[n])?od.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function s(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s};return od.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||r,i=t(e);od.isUndefined(i)&&t!==s||(n[e]=i)})),n},Md="0.27.2",Pd=Md,Nd={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Nd[e]=function(n){return J(n)===e||"a"+(t<1?"n ":" ")+e}}));var Ud={};Nd.transitional=function(e,t,n){function i(e,t){return"[Axios v"+Pd+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,o){if(!1===e)throw new pd(i(r," has been removed"+(t?" in "+t:"")),pd.ERR_DEPRECATED);return t&&!Ud[r]&&(Ud[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}};var Bd={assertOptions:function(e,t,n){if("object"!==J(e))throw new pd("options must be an object",pd.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(e),r=i.length;r-- >0;){var o=i[r],a=t[o];if(a){var s=e[o],c=void 0===s||a(s,o,e);if(!0!==c)throw new pd("option "+o+" must be "+c,pd.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new pd("Unknown option "+o,pd.ERR_BAD_OPTION)}},validators:Nd},Gd=Bd.validators;function Ld(e){this.defaults=e,this.interceptors={request:new ld,response:new ld}}Ld.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=Id(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&Bd.assertOptions(n,{silentJSONParsing:Gd.transitional(Gd.boolean),forcedJSONParsing:Gd.transitional(Gd.boolean),clarifyTimeoutError:Gd.transitional(Gd.boolean)},!1);var i=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));var o,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var s=[Od,void 0];for(Array.prototype.unshift.apply(s,i),s=s.concat(a),o=Promise.resolve(t);s.length;)o=o.then(s.shift(),s.shift());return o}for(var c=t;i.length;){var l=i.shift(),u=i.shift();try{c=l(c)}catch(e){u(e);break}}try{o=Od(c)}catch(e){return Promise.reject(e)}for(;a.length;)o=o.then(a.shift(),a.shift());return o},Ld.prototype.getUri=function(e){e=Id(this.defaults,e);var t=_d(e.baseURL,e.url);return sd(t,e.params,e.paramsSerializer)},od.forEach(["delete","get","head","options"],(function(e){Ld.prototype[e]=function(t,n){return this.request(Id(n||{},{method:e,url:t,data:(n||{}).data}))}})),od.forEach(["post","put","patch"],(function(e){function t(t){return function(n,i,r){return this.request(Id(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Ld.prototype[e]=t(),Ld.prototype[e+"Form"]=t(!0)}));var jd=Ld;function Fd(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,i=n._listeners.length;for(t=0;t0?2===c.length?J(c[1])==r?this[c[0]]=c[1].call(this,u):this[c[0]]=c[1]:3===c.length?J(c[1])!==r||c[1].exec&&c[1].test?this[c[0]]=u?u.replace(c[1],c[2]):i:this[c[0]]=u?c[1].call(this,u,c[2]):i:4===c.length&&(this[c[0]]=u?c[3].call(this,u.replace(c[1],c[2])):i):this[c]=u||i;f+=2}},V=function(e,t){for(var n in t)if(J(t[n])===a&&t[n].length>0){for(var r=0;r2&&(e.model="iPad",e.type=m),e},this.getEngine=function(){var e={};return e.name=i,e.version=i,H.call(e,u,d.engine),e},this.getOS=function(){var e={};return e.name=i,e.version=i,H.call(e,u,d.os),h&&!e.name&&f&&f.platform&&"Unknown"!=f.platform&&(e.name=f.platform.replace(/chrome os/i,B).replace(/macos/i,G)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return u},this.setUA=function(e){return u=J(e)===s&&e.length>500?K(e,500):e,this},this.setUA(u),this};W.VERSION="1.0.38",W.BROWSER=L([u,h,c]),W.CPU=L([p]),W.DEVICE=L([l,d,f,v,g,_,m,y,b]),W.ENGINE=W.OS=L([u,h]),e.exports&&(t=e.exports=W),t.UAParser=W;var X=J(n)!==o&&(n.jQuery||n.Zepto);if(X&&!X.ua){var Z=new W;X.ua=Z.getResult(),X.ua.get=function(){return Z.getUA()},X.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var n in t)X.ua[n]=t[n]}}}("object"===("undefined"==typeof window?"undefined":J(window))?window:ci)}));Jd.UAParser;var Wd="2.0.2",Xd="_ccfs_".concat(Wd),Zd="".concat(Xd,"_consent"),Yd="".concat(Xd,"_notifications"),Qd=function(e){return e.US_EAST="US-East",e.US_EASTRED="US-EastRed",e.SINGAPORE_CENTRAL="Singapore-Central",e.EU_TTP="EU-TTP",e.EU_TTP2="EU-TTP2",e.US_TTP="US-TTP",e.US_TTP2="US-TTP2",e}(Qd||{}),eh=function(e){return e.PRODUCTION="production",e.DEV="dev",e.BOE="boe",e}(eh||{}),th=function(e){return e.UNSUPPORTED="Unsupported",e.WEB="Web",e.ANDROID="Android",e.IOS="IOS",e.PC_MAC="PC_MAC",e.PC_WINDOWS="PC_WINDOWS",e}(th||{}),nh={},ih=function(){var e,t,n,i;if(Object.keys(nh).length)return nh;var r=(new Jd).getResult(),o=r.browser,a=r.os;return nh={platform:th.WEB,browser:null!=(e=null==o?void 0:o.name)?e:"",browser_version:null!=(t=null==o?void 0:o.version)?t:"",os:null!=(n=null==a?void 0:a.name)?n:"",os_version:null!=(i=null==a?void 0:a.version)?i:""}},rh=Object.defineProperty,oh=Object.getOwnPropertySymbols,ah=Object.prototype.hasOwnProperty,sh=Object.prototype.propertyIsEnumerable,ch=function(e,t,n){return t in e?rh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},lh=function(e,t){for(var n in t||(t={}))ah.call(t,n)&&ch(e,n,t[n]);if(oh){var i,r=F(oh(t));try{for(r.s();!(i=r.n()).done;){n=i.value;sh.call(t,n)&&ch(e,n,t[n])}}catch(e){r.e(e)}finally{r.f()}}return e},uh=/^(https?:\/\/)/,fh=$((function e(){var t=this;return V(this,e),this._region="",this._bid="",this._debug=!1,this.init=function(e){Lf.info("[ServiceModule]: init");var n=null!=e?e:{},i=n.region,r=void 0===i?"":i,o=n.bid,a=void 0===o?"":o,s=n.appId,c=n.domain;t._appId=s,t._region=r,t._bid=a,t._domain=c},this.sendRequest=function(e,n,i,r){var o=uh.test(e)?e:"".concat(t._domain).concat(e),a=new URL(o),s=Array.from(a.searchParams.entries()).reduce((function(e,t){var n=z(t,2),i=n[0],r=n[1];return void 0===r&&""===r||(e[i]=r),e}),{}),c=null!=r?r:{},l=c.params,u=c.timeout,f=function(e,t){var n={};for(var i in e)ah.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&oh){var r,o=F(oh(e));try{for(o.s();!(r=o.n()).done;)i=r.value,t.indexOf(i)<0&&sh.call(e,i)&&(n[i]=e[i])}catch(e){o.e(e)}finally{o.f()}}return n}(c,["params","timeout"]),d=lh(lh(lh({region:t._region,aid:t._appId,bid:t._bid},s),null!=l?l:{}),ih());"GET"===n&&i&&"object"===J(i)&&(d=lh(lh({},d),i));var h=new URLSearchParams(function(e){if(!e)return"";var t=new URLSearchParams;return Object.entries(e).forEach((function(e){var n=z(e,2),i=n[0],r=n[1];Array.isArray(r)?r.forEach((function(e){t.append(i,e)})):null!=r&&t.append(i,r)})),t.toString()}(d)),p=new URL("".concat(a.origin).concat(a.pathname,"?").concat(h.toString())),v=Io({},f,{method:n,timeout:null!=u?u:0,data:i});return Lf.info("[ServiceModule]: sendRequest start",v),$d(p.href,v).then((function(e){return Lf.info("[ServiceModule]: sendRequest finish",e),e})).catch((function(e){throw Lf.error("[ServiceModule]: sendRequest error",e),e}))},this.destruct=function(){Lf.info("[ServiceModule]: destruct")},e._instance||(e._instance=this),e._instance})),dh=new fh,hh=function(e){return e.beforeFetchUserInfo="beforeFetchUserInfo",e.afterFetchUserInfo="afterFetchUserInfo",e.beforeFetchConsentData="beforeFetchConsentData",e.afterFetchConsentData="afterFetchConsentData",e.beforeFetchCollectionPoint="beforeFetchCollectionPoint",e.afterFetchCollectionPoint="afterFetchCollectionPoint",e.beforeFetchEntities="beforeFetchEntities",e.afterFetchEntities="afterFetchEntities",e.beforeFetchNotificationData="beforeFetchNotificationData",e.afterFetchNotificationData="afterFetchNotificationData",e.beforeUpdateRecords="beforeUpdateRecords",e.afterUpdateRecords="afterUpdateRecords",e.beforeNotify="beforeNotify",e.afterNotify="afterNotify",e.beforeRemoveNotification="beforeRemoveNotification",e.afterRemoveNotification="afterRemoveNotification",e.beforeThirdPartyApprove="beforeThirdPartyApprove",e.afterThirdPartyApprove="afterThirdPartyApprove",e.beforeThirdPartyReject="beforeThirdPartyReject",e.afterThirdPartyReject="afterThirdPartyReject",e}(hh||{}),ph=function(e){return e.sessionStorage="sessionStorage",e.localStorage="localStorage",e.inMem="inMem",e}(ph||{}),vh=function(e){return e.UNSUPPORTED="Unsupported",e.APPROVE="Approve",e.REJECT="Reject",e.NOT_DETERMINED="NotDetermined",e.PENDING_REVIEW="PENDING_REVIEW",e.REVOKE="REVOKE",e}(vh||{}),gh=function(e){return e[e.UNSUPPORTED=0]="UNSUPPORTED",e[e.APPROVE=1]="APPROVE",e[e.REJECT=2]="REJECT",e[e.NOT_DETERMINED=3]="NOT_DETERMINED",e[e.PENDING_REVIEW=4]="PENDING_REVIEW",e[e.REVOKE=5]="REVOKE",e}(gh||{}),mh=function(e){return e.ENTITIES="entities",e.COLLECTION_POINTS="collectionPoints",e.NOTIFICATIONS="notifications",e}(mh||{}),_h=(x(n={},0,"Unsupported"),x(n,1,"Approve"),x(n,2,"Reject"),x(n,3,"NotDetermined"),x(n,4,"PENDING_REVIEW"),x(n,5,"REVOKE"),n);var yh=function(e,t){for(var n=-1,i=null==e?0:e.length;++n0&&void 0!==arguments[0]?arguments[0]:"BaseStorageWrapper";V(this,e),this._getConsentData=function(e){var n,i,r,o,a=e.userInfo,s=e.entityKeys,c=e.collectionPointId;Lf.info("[".concat(t.name,"]: _getConsentData"),{userInfo:a,entityKeys:s,collectionPointId:c});var l={entityMap:null,collectionPoint:null};try{var u=t.getConsentStore(a),f=u[mh.ENTITIES],d=u[mh.COLLECTION_POINTS],h=[];if(c&&(l.collectionPoint=(null==(n=null==d?void 0:d.data)?void 0:n[c])?bp(d.data[c]):null,h=null!=(r=null==(i=l.collectionPoint)?void 0:i.entity_keys)?r:[]),l.entityMap=bp(null!=(o=null==f?void 0:f.data)?o:{}),Object.keys(l.entityMap).length)if(c){var p={};h.forEach((function(e){var t;(null==(t=l.entityMap)?void 0:t[e])&&(p[e]=l.entityMap[e])})),l.entityMap=p}else if(null==s?void 0:s.length){var v={};s.forEach((function(e){var t;(null==(t=l.entityMap)?void 0:t[e])&&(v[e]=l.entityMap[e])})),l.entityMap=v}}catch(e){Lf.error("[".concat(t.name,"]: getConsentData Error"),{userInfo:a,entityKeys:s,collectionPointId:c,error:e})}return l},this._updateUserInfo=function(e,n){Lf.info("[".concat(t.name,"]: _updateUserInfo"),{userId:n,deviceId:e}),t._did=e,t._uid=n},this._formatConsentRecord=function(e){var t=null!=e?e:{},n=t.key,i=t.record,r=t.version;return i&&n?Wp({entity_key:n,entity_version:r},i):null},this.getUserInfo=function(){return{device_id:t._did,user_id:t._uid}},this.cleanUpUnrelatedUserData=function(e){Lf.info("[".concat(t.name,"]: cleanUpUnrelatedUserData"),{userInfo:e});var n=null!=e?e:{},i=n.device_id,r=void 0===i?"":i,o=n.user_id,a=void 0===o?"":o;(r||a)&&r===t._did&&a===t._uid||(t.cleanConsentData(),t._updateUserInfo(r,a))},this.insertDataByStorageName=function(e,n,i,r){Lf.info("[".concat(t.name,"]: insertDataByStorageName"),{data:i,storageName:n,timestamp:r});var o=e[n],a=o.data,s=void 0===a?{}:a,c=o.timestamp;if((void 0===c?0:c)>>2]>>>24-o%4*8&255;t[i+o>>>2]|=a<<24-(i+o)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-r%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new c.init(n,t/2)}},f=l.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;r>>2]>>>24-r%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new c.init(n,t)}},d=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},h=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,i=this._data,r=i.words,o=i.sigBytes,a=this.blockSize,s=o/(4*a),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,u=e.min(4*l,o);if(l){for(var f=0;f>>2]|=e[r]<<24-r%4*8;t.call(this,i,n)}else t.apply(this,arguments)};i.prototype=e}}(),n.lib.WordArray)})),li((function(e,t){var n;e.exports=(n=rv,function(){var e=n,t=e.lib.WordArray,i=e.enc;function r(e){return e<<8&4278255360|e>>>8&16711935}i.Utf16=i.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;r>>2]>>>16-r%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var n=e.length,i=[],r=0;r>>1]|=e.charCodeAt(r)<<16-r%2*16;return t.create(i,2*n)}},i.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],o=0;o>>2]>>>16-o%4*8&65535);i.push(String.fromCharCode(a))}return i.join("")},parse:function(e){for(var n=e.length,i=[],o=0;o>>1]|=r(e.charCodeAt(o)<<16-o%2*16);return t.create(i,2*n)}}}(),n.enc.Utf16)})),li((function(e,t){var n;e.exports=(n=rv,function(){var e=n,t=e.lib.WordArray;function i(e,n,i){for(var r=[],o=0,a=0;a>>6-a%4*2;r[o>>>2]|=s<<24-o%4*8,o++}return t.create(r,o)}e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,i=this._map;e.clamp();for(var r=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var c=i.charAt(64);if(c)for(;r.length%4;)r.push(c);return r.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o>>6-a%4*2;r[o>>>2]|=s<<24-o%4*8,o++}return t.create(r,o)}e.enc.Base64url={stringify:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.words,i=e.sigBytes,r=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,c=0;c<4&&a+.75*c>>6*(3-c)&63));var l=r.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.length,r=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a>>24)|4278255360&(r<<24|r>>>8)}var o=this._hash.words,a=e[t+0],c=e[t+1],h=e[t+2],p=e[t+3],v=e[t+4],g=e[t+5],m=e[t+6],_=e[t+7],y=e[t+8],b=e[t+9],E=e[t+10],w=e[t+11],k=e[t+12],S=e[t+13],x=e[t+14],T=e[t+15],A=o[0],z=o[1],C=o[2],D=o[3];A=l(A,z,C,D,a,7,s[0]),D=l(D,A,z,C,c,12,s[1]),C=l(C,D,A,z,h,17,s[2]),z=l(z,C,D,A,p,22,s[3]),A=l(A,z,C,D,v,7,s[4]),D=l(D,A,z,C,g,12,s[5]),C=l(C,D,A,z,m,17,s[6]),z=l(z,C,D,A,_,22,s[7]),A=l(A,z,C,D,y,7,s[8]),D=l(D,A,z,C,b,12,s[9]),C=l(C,D,A,z,E,17,s[10]),z=l(z,C,D,A,w,22,s[11]),A=l(A,z,C,D,k,7,s[12]),D=l(D,A,z,C,S,12,s[13]),C=l(C,D,A,z,x,17,s[14]),A=u(A,z=l(z,C,D,A,T,22,s[15]),C,D,c,5,s[16]),D=u(D,A,z,C,m,9,s[17]),C=u(C,D,A,z,w,14,s[18]),z=u(z,C,D,A,a,20,s[19]),A=u(A,z,C,D,g,5,s[20]),D=u(D,A,z,C,E,9,s[21]),C=u(C,D,A,z,T,14,s[22]),z=u(z,C,D,A,v,20,s[23]),A=u(A,z,C,D,b,5,s[24]),D=u(D,A,z,C,x,9,s[25]),C=u(C,D,A,z,p,14,s[26]),z=u(z,C,D,A,y,20,s[27]),A=u(A,z,C,D,S,5,s[28]),D=u(D,A,z,C,h,9,s[29]),C=u(C,D,A,z,_,14,s[30]),A=f(A,z=u(z,C,D,A,k,20,s[31]),C,D,g,4,s[32]),D=f(D,A,z,C,y,11,s[33]),C=f(C,D,A,z,w,16,s[34]),z=f(z,C,D,A,x,23,s[35]),A=f(A,z,C,D,c,4,s[36]),D=f(D,A,z,C,v,11,s[37]),C=f(C,D,A,z,_,16,s[38]),z=f(z,C,D,A,E,23,s[39]),A=f(A,z,C,D,S,4,s[40]),D=f(D,A,z,C,a,11,s[41]),C=f(C,D,A,z,p,16,s[42]),z=f(z,C,D,A,m,23,s[43]),A=f(A,z,C,D,b,4,s[44]),D=f(D,A,z,C,k,11,s[45]),C=f(C,D,A,z,T,16,s[46]),A=d(A,z=f(z,C,D,A,h,23,s[47]),C,D,a,6,s[48]),D=d(D,A,z,C,_,10,s[49]),C=d(C,D,A,z,x,15,s[50]),z=d(z,C,D,A,g,21,s[51]),A=d(A,z,C,D,k,6,s[52]),D=d(D,A,z,C,p,10,s[53]),C=d(C,D,A,z,E,15,s[54]),z=d(z,C,D,A,c,21,s[55]),A=d(A,z,C,D,y,6,s[56]),D=d(D,A,z,C,T,10,s[57]),C=d(C,D,A,z,m,15,s[58]),z=d(z,C,D,A,S,21,s[59]),A=d(A,z,C,D,v,6,s[60]),D=d(D,A,z,C,w,10,s[61]),C=d(C,D,A,z,h,15,s[62]),z=d(z,C,D,A,b,21,s[63]),o[0]=o[0]+A|0,o[1]=o[1]+z|0,o[2]=o[2]+C|0,o[3]=o[3]+D|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;n[r>>>5]|=128<<24-r%32;var o=e.floor(i/4294967296),a=i;n[15+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,i,r,o,a){var s=e+(t&n|~t&i)+r+a;return(s<>>32-o)+t}function u(e,t,n,i,r,o,a){var s=e+(t&i|n&~i)+r+a;return(s<>>32-o)+t}function f(e,t,n,i,r,o,a){var s=e+(t^n^i)+r+a;return(s<>>32-o)+t}function d(e,t,n,i,r,o,a){var s=e+(n^(t|~i))+r+a;return(s<>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),n.MD5)})),li((function(e,t){var n;e.exports=(n=rv,function(){var e=n,t=e.lib,i=t.WordArray,r=t.Hasher,o=e.algo,a=[],s=o.SHA1=r.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],r=n[1],o=n[2],s=n[3],c=n[4],l=0;l<80;l++){if(l<16)a[l]=0|e[t+l];else{var u=a[l-3]^a[l-8]^a[l-14]^a[l-16];a[l]=u<<1|u>>>31}var f=(i<<5|i>>>27)+c+a[l];f+=l<20?1518500249+(r&o|~r&s):l<40?1859775393+(r^o^s):l<60?(r&o|r&s|o&s)-1894007588:(r^o^s)-899497514,c=s,s=o,o=r<<30|r>>>2,r=i,i=f}n[0]=n[0]+i|0,n[1]=n[1]+r|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(i+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s)}(),n.SHA1)})),li((function(e,t){var n;e.exports=(n=rv,function(e){var t=n,i=t.lib,r=i.WordArray,o=i.Hasher,a=t.algo,s=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),i=2;i<=n;i++)if(!(t%i))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var i=2,r=0;r<64;)t(i)&&(r<8&&(s[r]=n(e.pow(i,.5))),c[r]=n(e.pow(i,1/3)),r++),i++}();var l=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],d=n[7],h=0;h<64;h++){if(h<16)l[h]=0|e[t+h];else{var p=l[h-15],v=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=l[h-2],m=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;l[h]=v+l[h-7]+m+l[h-16]}var _=i&r^i&o^r&o,y=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),b=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&f)+c[h]+l[h];d=f,f=u,u=s,s=a+b|0,a=o,o=r,r=i,i=b+(y+_)|0}n[0]=n[0]+i|0,n[1]=n[1]+r|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+f|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=e.floor(i/4294967296),n[15+(r+64>>>9<<4)]=i,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),n.SHA256)})),li((function(e,t){var n;e.exports=(n=rv,function(){var e=n,t=e.lib.WordArray,i=e.algo,r=i.SHA256,o=i.SHA224=r.extend({_doReset:function(){this._hash=new t.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=r._doFinalize.call(this);return e.sigBytes-=4,e}});e.SHA224=r._createHelper(o),e.HmacSHA224=r._createHmacHelper(o)}(),n.SHA224)})),li((function(e,t){var n;e.exports=(n=rv,function(){var e=n,t=e.lib.Hasher,i=e.x64,r=i.Word,o=i.WordArray,a=e.algo;function s(){return r.create.apply(r,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=s()}();var u=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],d=n[7],h=i.high,p=i.low,v=r.high,g=r.low,m=o.high,_=o.low,y=a.high,b=a.low,E=s.high,w=s.low,k=u.high,S=u.low,x=f.high,T=f.low,A=d.high,z=d.low,C=h,D=p,R=v,O=g,I=m,M=_,P=y,N=b,U=E,B=w,G=k,L=S,j=x,F=T,K=A,H=z,V=0;V<80;V++){var q,$,J=l[V];if(V<16)$=J.high=0|e[t+2*V],q=J.low=0|e[t+2*V+1];else{var W=l[V-15],X=W.high,Z=W.low,Y=(X>>>1|Z<<31)^(X>>>8|Z<<24)^X>>>7,Q=(Z>>>1|X<<31)^(Z>>>8|X<<24)^(Z>>>7|X<<25),ee=l[V-2],te=ee.high,ne=ee.low,ie=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,re=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=l[V-7],ae=oe.high,se=oe.low,ce=l[V-16],le=ce.high,ue=ce.low;$=($=($=Y+ae+((q=Q+se)>>>0>>0?1:0))+ie+((q+=re)>>>0>>0?1:0))+le+((q+=ue)>>>0>>0?1:0),J.high=$,J.low=q}var fe,de=U&G^~U&j,he=B&L^~B&F,pe=C&R^C&I^R&I,ve=D&O^D&M^O&M,ge=(C>>>28|D<<4)^(C<<30|D>>>2)^(C<<25|D>>>7),me=(D>>>28|C<<4)^(D<<30|C>>>2)^(D<<25|C>>>7),_e=(U>>>14|B<<18)^(U>>>18|B<<14)^(U<<23|B>>>9),ye=(B>>>14|U<<18)^(B>>>18|U<<14)^(B<<23|U>>>9),be=c[V],Ee=be.high,we=be.low,ke=K+_e+((fe=H+ye)>>>0>>0?1:0),Se=me+ve;K=j,H=F,j=G,F=L,G=U,L=B,U=P+(ke=(ke=(ke=ke+de+((fe+=he)>>>0>>0?1:0))+Ee+((fe+=we)>>>0>>0?1:0))+$+((fe+=q)>>>0>>0?1:0))+((B=N+fe|0)>>>0>>0?1:0)|0,P=I,N=M,I=R,M=O,R=C,O=D,C=ke+(ge+pe+(Se>>>0>>0?1:0))+((D=fe+Se|0)>>>0>>0?1:0)|0}p=i.low=p+D,i.high=h+C+(p>>>0>>0?1:0),g=r.low=g+O,r.high=v+R+(g>>>0>>0?1:0),_=o.low=_+M,o.high=m+I+(_>>>0>>0?1:0),b=a.low=b+N,a.high=y+P+(b>>>0>>0?1:0),w=s.low=w+B,s.high=E+U+(w>>>0>>0?1:0),S=u.low=S+L,u.high=k+G+(S>>>0>>0?1:0),T=f.low=T+F,f.high=x+j+(T>>>0>>0?1:0),z=d.low=z+H,d.high=A+K+(z>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[30+(i+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(i+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),n.SHA512)})),li((function(e,t){var n;e.exports=(n=rv,function(){var e=n,t=e.x64,i=t.Word,r=t.WordArray,o=e.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new r.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=a._createHelper(s),e.HmacSHA384=a._createHmacHelper(s)}(),n.SHA384)})),li((function(e,t){var n;e.exports=(n=rv,function(e){var t=n,i=t.lib,r=i.WordArray,o=i.Hasher,a=t.x64.Word,s=t.algo,c=[],l=[],u=[];!function(){for(var e=1,t=0,n=0;n<24;n++){c[e+5*t]=(n+1)*(n+2)/2%64;var i=(2*e+3*t)%5;e=t%5,t=i}for(e=0;e<5;e++)for(t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var r=1,o=0;o<24;o++){for(var s=0,f=0,d=0;d<7;d++){if(1&r){var h=(1<>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(z=n[r]).high^=a,z.low^=o}for(var s=0;s<24;s++){for(var d=0;d<5;d++){for(var h=0,p=0,v=0;v<5;v++)h^=(z=n[d+5*v]).high,p^=z.low;var g=f[d];g.high=h,g.low=p}for(d=0;d<5;d++){var m=f[(d+4)%5],_=f[(d+1)%5],y=_.high,b=_.low;for(h=m.high^(y<<1|b>>>31),p=m.low^(b<<1|y>>>31),v=0;v<5;v++)(z=n[d+5*v]).high^=h,z.low^=p}for(var E=1;E<25;E++){var w=(z=n[E]).high,k=z.low,S=c[E];S<32?(h=w<>>32-S,p=k<>>32-S):(h=k<>>64-S,p=w<>>64-S);var x=f[l[E]];x.high=h,x.low=p}var T=f[0],A=n[0];for(T.high=A.high,T.low=A.low,d=0;d<5;d++)for(v=0;v<5;v++){var z=n[E=d+5*v],C=f[E],D=f[(d+1)%5+5*v],R=f[(d+2)%5+5*v];z.high=C.high^~D.high&R.high,z.low=C.low^~D.low&R.low}z=n[0];var O=u[s];z.high^=O.high,z.low^=O.low}},_doFinalize:function(){var t=this._data,n=t.words;this._nDataBytes;var i=8*t.sigBytes,o=32*this.blockSize;n[i>>>5]|=1<<24-i%32,n[(e.ceil((i+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,c=s/8,l=[],u=0;u>>24)|4278255360&(d<<24|d>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),l.push(h),l.push(d)}return new r.init(l,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(d),t.HmacSHA3=o._createHmacHelper(d)}(Math),n.SHA3)})),li((function(e,t){var n;e.exports=(n=rv, /** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ function(e){var t=n,i=t.lib,r=i.WordArray,o=i.Hasher,a=t.algo,s=r.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=r.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=r.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=r.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=r.create([0,1518500249,1859775393,2400959708,2840853838]),d=r.create([1352829926,1548603684,1836072691,2053994217,0]),h=a.RIPEMD160=o.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var i=t+n,r=e[i];e[i]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var o,a,h,b,E,w,k,S,x,T,A,z=this._hash.words,C=f.words,D=d.words,R=s.words,O=c.words,I=l.words,M=u.words;for(w=o=z[0],k=a=z[1],S=h=z[2],x=b=z[3],T=E=z[4],n=0;n<80;n+=1)A=o+e[t+R[n]]|0,A+=n<16?p(a,h,b)+C[0]:n<32?v(a,h,b)+C[1]:n<48?g(a,h,b)+C[2]:n<64?m(a,h,b)+C[3]:_(a,h,b)+C[4],A=(A=y(A|=0,I[n]))+E|0,o=E,E=b,b=y(h,10),h=a,a=A,A=w+e[t+O[n]]|0,A+=n<16?_(k,S,x)+D[0]:n<32?m(k,S,x)+D[1]:n<48?g(k,S,x)+D[2]:n<64?v(k,S,x)+D[3]:p(k,S,x)+D[4],A=(A=y(A|=0,M[n]))+T|0,w=T,T=x,x=y(S,10),S=k,k=A;A=z[1]+h+x|0,z[1]=z[2]+b+T|0,z[2]=z[3]+E+w|0,z[3]=z[4]+o+k|0,z[4]=z[0]+a+S|0,z[0]=A},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var r=this._hash,o=r.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return r},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,n){return e^t^n}function v(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function m(e,t,n){return e&n|t&~n}function _(e,t,n){return e^(t|~n)}function y(e,t){return e<>>32-t}t.RIPEMD160=o._createHelper(h),t.HmacRIPEMD160=o._createHmacHelper(h)}(),n.RIPEMD160)})),li((function(e,t){var n;e.exports=(n=rv,void function(){var e=n,t=e.lib.Base,i=e.enc.Utf8;e.algo.HMAC=t.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,c=a.words,l=0;l>>2];e.sigBytes-=t}};i.BlockCipher=u.extend({cfg:u.cfg.extend({mode:h,padding:p}),reset:function(){var e;u.reset.call(this);var t=this.cfg,n=t.iv,i=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=i.createEncryptor:(e=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(i,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var v=i.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(t):t).toString(c)},parse:function(e){var t,n=c.parse(e),i=n.words;return 1398893684==i[0]&&1701076831==i[1]&&(t=o.create(i.slice(2,4)),i.splice(0,4),n.sigBytes-=16),v.create({ciphertext:n,salt:t})}},m=i.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(e,t,n,i){i=this.cfg.extend(i);var r=e.createEncryptor(n,i),o=r.finalize(t),a=r.cfg;return v.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,n,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),e.createDecryptor(n,i).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=(t.kdf={}).OpenSSL={execute:function(e,t,n,i){i||(i=o.random(8));var r=l.create({keySize:t+n}).compute(e,i),a=o.create(r.words.slice(t),4*n);return r.sigBytes=4*t,v.create({key:r,iv:a,salt:i})}},y=i.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:_}),encrypt:function(e,t,n,i){var r=(i=this.cfg.extend(i)).kdf.execute(n,e.keySize,e.ivSize);i.iv=r.iv;var o=m.encrypt.call(this,e,t,r.key,i);return o.mixIn(r),o},decrypt:function(e,t,n,i){i=this.cfg.extend(i),t=this._parse(t,i.format);var r=i.kdf.execute(n,e.keySize,e.ivSize,t.salt);return i.iv=r.iv,m.decrypt.call(this,e,t,r.key,i)}})}())})),li((function(e,t){var n;e.exports=((n=rv).mode.CFB=function(){var e=n.lib.BlockCipherMode.extend();function t(e,t,n,i){var r,o=this._iv;o?(r=o.slice(0),this._iv=void 0):r=this._prevBlock,i.encryptBlock(r,0);for(var a=0;a>24&255)){var t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}function i(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var r=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),i(a);var s=a.slice(0);n.encryptBlock(s,0);for(var c=0;c>>2]|=r<<24-o%4*8,e.sigBytes+=r},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Ansix923)})),li((function(e,t){var n;e.exports=((n=rv).pad.Iso10126={pad:function(e,t){var i=4*t,r=i-e.sigBytes%i;e.concat(n.lib.WordArray.random(r-1)).concat(n.lib.WordArray.create([r<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)})),li((function(e,t){var n;e.exports=((n=rv).pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)})),li((function(e,t){var n;e.exports=((n=rv).pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},n.pad.ZeroPadding)})),li((function(e,t){var n;e.exports=((n=rv).pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)})),li((function(e,t){var n;e.exports=(n=rv,function(e){var t=n,i=t.lib.CipherParams,r=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var t=r.parse(e);return i.create({ciphertext:t})}}}(),n.format.Hex)})),li((function(e,t){var n;e.exports=(n=rv,function(){var e=n,t=e.lib.BlockCipher,i=e.algo,r=[],o=[],a=[],s=[],c=[],l=[],u=[],f=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,i=0;for(t=0;t<256;t++){var p=i^i<<1^i<<2^i<<3^i<<4;p=p>>>8^255&p^99,r[n]=p,o[p]=n;var v=e[n],g=e[v],m=e[g],_=257*e[p]^16843008*p;a[n]=_<<24|_>>>8,s[n]=_<<16|_>>>16,c[n]=_<<8|_>>>24,l[n]=_,_=16843009*m^65537*g^257*v^16843008*n,u[p]=_<<24|_>>>8,f[p]=_<<16|_>>>16,d[p]=_<<8|_>>>24,h[p]=_,n?(n=v^e[e[e[m^v]]],i^=e[e[i]]):n=i=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=i.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,i=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a6&&a%n==4&&(l=r[l>>>24]<<24|r[l>>>16&255]<<16|r[l>>>8&255]<<8|r[255&l]):(l=r[(l=l<<8|l>>>24)>>>24]<<24|r[l>>>16&255]<<16|r[l>>>8&255]<<8|r[255&l],l^=p[a/n|0]<<24),o[a]=o[a-n]^l);for(var s=this._invKeySchedule=[],c=0;c>>24]]^f[r[l>>>16&255]]^d[r[l>>>8&255]]^h[r[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,r)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,f,d,h,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,r,o,a,s){for(var c=this._nRounds,l=e[t]^n[0],u=e[t+1]^n[1],f=e[t+2]^n[2],d=e[t+3]^n[3],h=4,p=1;p>>24]^r[u>>>16&255]^o[f>>>8&255]^a[255&d]^n[h++],g=i[u>>>24]^r[f>>>16&255]^o[d>>>8&255]^a[255&l]^n[h++],m=i[f>>>24]^r[d>>>16&255]^o[l>>>8&255]^a[255&u]^n[h++],_=i[d>>>24]^r[l>>>16&255]^o[u>>>8&255]^a[255&f]^n[h++];l=v,u=g,f=m,d=_}v=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&d])^n[h++],g=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[d>>>8&255]<<8|s[255&l])^n[h++],m=(s[f>>>24]<<24|s[d>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^n[h++],_=(s[d>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[h++],e[t]=v,e[t+1]=g,e[t+2]=m,e[t+3]=_},keySize:8});e.AES=t._createHelper(v)}(),n.AES)})),li((function(e,t){var n;e.exports=(n=rv,function(){var e=n,t=e.lib,i=t.WordArray,r=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=r.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var i=a[n]-1;t[n]=e[i>>>5]>>>31-i%32&1}for(var r=this._subKeys=[],o=0;o<16;o++){var l=r[o]=[],u=c[o];for(n=0;n<24;n++)l[n/6|0]|=t[(s[n]-1+u)%28]<<31-n%6,l[4+(n/6|0)]|=t[28+(s[n+24]-1+u)%28]<<31-n%6;for(l[0]=l[0]<<1|l[0]>>>31,n=1;n<7;n++)l[n]=l[n]>>>4*(n-1)+3;l[7]=l[7]<<5|l[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=r[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],d.call(this,4,252645135),d.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),d.call(this,1,1431655765);for(var i=0;i<16;i++){for(var r=n[i],o=this._lBlock,a=this._rBlock,s=0,c=0;c<8;c++)s|=l[c][((a^r[c])&u[c])>>>0];this._lBlock=a,this._rBlock=o^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,d.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),r=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(i.create(t)),this._des2=f.createEncryptor(i.create(n)),this._des3=f.createEncryptor(i.create(r))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=r._createHelper(p)}(),n.TripleDES)})),li((function(e,t){var n;e.exports=(n=rv,function(){var e=n,t=e.lib.StreamCipher,i=e.algo,r=i.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,i=this._S=[],r=0;r<256;r++)i[r]=r;r=0;for(var o=0;r<256;r++){var a=r%n,s=t[a>>>2]>>>24-a%4*8&255;o=(o+i[r]+s)%256;var c=i[r];i[r]=i[o],i[o]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,i=0,r=0;r<4;r++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,i|=e[(e[t]+e[n])%256]<<24-8*r}return this._i=t,this._j=n,i}e.RC4=t._createHelper(r);var a=i.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),n.RC4)})),li((function(e,t){var n;e.exports=(n=rv,function(){var e=n,t=e.lib.StreamCipher,i=e.algo,r=[],o=[],a=[],s=i.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var i=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)c.call(this);for(n=0;n<8;n++)r[n]^=i[n+4&7];if(t){var o=t.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=l>>>16|4294901760&u,d=u<<16|65535&l;for(r[0]^=l,r[1]^=f,r[2]^=u,r[3]^=d,r[4]^=l,r[5]^=f,r[6]^=u,r[7]^=d,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),r[0]=n[0]^n[5]>>>16^n[3]<<16,r[1]=n[2]^n[7]>>>16^n[5]<<16,r[2]=n[4]^n[1]>>>16^n[7]<<16,r[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8),e[t+i]^=r[i]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var i=e[n]+t[n],r=65535&i,s=i>>>16,c=((r*r>>>17)+r*s>>>15)+s*s,l=((4294901760&i)*i|0)+((65535&i)*i|0);a[n]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),n.Rabbit)})),li((function(e,t){var n;e.exports=(n=rv,function(){var e=n,t=e.lib.StreamCipher,i=e.algo,r=[],o=[],a=[],s=i.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=l>>>16|4294901760&u,d=u<<16|65535&l;for(i[0]^=l,i[1]^=f,i[2]^=u,i[3]^=d,i[4]^=l,i[5]^=f,i[6]^=u,i[7]^=d,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),r[0]=n[0]^n[5]>>>16^n[3]<<16,r[1]=n[2]^n[7]>>>16^n[5]<<16,r[2]=n[4]^n[1]>>>16^n[7]<<16,r[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8),e[t+i]^=r[i]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var i=e[n]+t[n],r=65535&i,s=i>>>16,c=((r*r>>>17)+r*s>>>15)+s*s,l=((4294901760&i)*i|0)+((65535&i)*i|0);a[n]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),n.RabbitLegacy)})),li((function(e,t){e.exports=rv}))),av=function(e){I(n,e);var t=M(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"WebStorageWrapper",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ph.sessionStorage;return V(this,n),(e=t.call(this,i))._decrypt=function(t,n,i){Lf.info("[".concat(e.name,"]: _decrypt"));var r=null;if(n||i){var o="".concat(null!=n?n:"","_").concat(null!=i?i:"");try{var a=ov.AES.decrypt(t,o).toString(ov.enc.Utf8),s=JSON.parse(a);(null==s?void 0:s.data)&&"number"==typeof(null==s?void 0:s.timestamp)&&(r=s)}catch(t){Lf.info("[".concat(e.name,"]: _decrypt - ").concat(t.message),t)}}return Lf.info("[".concat(e.name,"]: _decrypt - finish"),r),r},e._encrypt=function(t,n){Lf.info("[".concat(e.name,"]: _encrypt"));var i=null!=n?n:{},r=i.device_id,o=void 0===r?"":r,a=i.user_id,s=void 0===a?"":a,c="";if(o||s){var l="".concat(null!=o?o:"","_").concat(null!=s?s:"");c=ov.AES.encrypt(JSON.stringify(t),l).toString()}return c},e._encryptConsentStorage=function(t,n){var i;return x(i={},mh.ENTITIES,e._encrypt(t[mh.ENTITIES],n)),x(i,mh.COLLECTION_POINTS,JSON.stringify(t[mh.COLLECTION_POINTS])),i},e._setConsentWebStorage=function(t,n){var i=e._encryptConsentStorage(t,n);window[e._storageName].setItem(Zd,JSON.stringify(i))},e.insertConsentData=function(t,n,i){Lf.info("[".concat(e.name,"]: insertConsentData"),{data:t,timestamp:n,userInfo:i});try{var r=e.insertConsentDataIntoStore(t,n,i);e._setConsentWebStorage(r,i)}catch(t){throw Lf.error("[".concat(e.name,"]: insertConsentData - ").concat(t.message),t),t}},e.insertNotificationData=function(t,n,i){Lf.info("[".concat(e.name,"]: insertNotificationData"),{data:t,timestamp:n,userInfo:i});try{var r=e.getNotificationStore(i);e.insertDataByStorageName(r,mh.NOTIFICATIONS,t,n),window[e._storageName].setItem(Yd,JSON.stringify(r))}catch(t){throw Lf.error("[".concat(e.name,"]: insertNotificationData - ").concat(t.message),t),t}},e.getConsentStore=function(t){var n,i,r;Lf.info("[".concat(e.name,"]: getConsentStore"),{userInfo:t}),e.cleanUpUnrelatedUserData(t);var o=null!=t?t:{},a=o.device_id,s=void 0===a?"":a,c=o.user_id,l=void 0===c?"":c,u=bp(Xp),f=bp(Xp);try{var d=null!=(i=window[e._storageName].getItem(Zd))?i:"{}",h=null!=(r=JSON.parse(d))?r:{};u=e._retrieveEntitiesData(h,s,l),f=e._retrieveCollectionPointData(h)}catch(t){Lf.error("[".concat(e.name,"]: getConsentStore - ").concat(t.message),t)}return x(n={},mh.ENTITIES,u),x(n,mh.COLLECTION_POINTS,f),n},e.getNotificationStore=function(t){var n,i;Lf.info("[".concat(e.name,"]: getNotificationStore"),{userInfo:t});var r=bp(Xp);try{var o=null!=(n=window[e._storageName].getItem(Yd))?n:"{}";r=null!=(i=JSON.parse(o))?i:{}}catch(t){Lf.error("[".concat(e.name,"]: getNotificationStore - ").concat(t.message),t)}return x({},mh.NOTIFICATIONS,r)},e.cleanConsentData=function(){Lf.info("[".concat(e.name,"]: cleanConsentData")),window[e._storageName].removeItem(Zd)},e.cleanNotificationData=function(){Lf.info("[".concat(e.name,"]: cleanNotificationData")),window[e._storageName].removeItem(Yd)},e.clean=function(){window[e._storageName].removeItem(Zd),window[e._storageName].removeItem(Yd)},e.destruct=function(){e.clean()},e._storageName=r,e}return $(n,[{key:"_retrieveEntitiesData",value:function(e,t,n){var i=bp(Xp),r=this._decrypt(e[mh.ENTITIES],t,n);return r||i}},{key:"_retrieveCollectionPointData",value:function(e){var t=bp(Xp),n=null;try{n=JSON.parse(e[mh.COLLECTION_POINTS])}catch(e){Lf.info("[".concat(this.name,"]: _retrieveCollectionPointData - ").concat(e.message),e)}return n||t}}]),n}(Yp),sv=function(e){I(n,e);var t=M(n);function n(){return V(this,n),t.call(this,"LocalStorageWrapper",ph.localStorage)}return $(n)}(av),cv=function(e){I(n,e);var t=M(n);function n(){return V(this,n),t.call(this,"SessionStorageWrapper",ph.sessionStorage)}return $(n)}(av),lv=(x(r={},ph.inMem,nv),x(r,ph.localStorage,sv),x(r,ph.sessionStorage,cv),r),uv=function(){function e(){return V(this,e),e._instance||(e._instance=this),e._instance}return $(e,[{key:"init",value:function(e){Lf.info("[StorageModule]: init");var t=(null!=e?e:{}).storageType,n=void 0===t?ph.sessionStorage:t;n&&(Object.values(ph).includes(n)||Lf.error("[StorageModule]: init - Invalid Storage Type ".concat(n),{storageType:n}),this._setupStorage(n))}},{key:"getRecord",value:function(e,t){return Lf.info("[StorageModule]: getRecord",{key:e}),this._store.getRecord(e,t)}},{key:"getRecords",value:function(e,t){return Lf.info("[StorageModule]: getRecords",{keys:e}),this._store.getRecords(e,t)}},{key:"getEntity",value:function(e,t){return Lf.info("[StorageModule]: getEntity",{key:e}),this._store.getEntity(e,t)}},{key:"getEntities",value:function(e,t){return Lf.info("[StorageModule]: getEntities",{keys:e}),this._store.getEntities(e,t)}},{key:"getCollectionPoint",value:function(e,t){return Lf.info("[StorageModule]: getCollectionPoint",{collectionPointId:e}),this._store.getCollectionPoint(e,t)}},{key:"insertConsentData",value:function(e,t,n){Lf.info("[StorageModule]: insertConsentData",{data:e,timestamp:t});try{this._inMemStore.insertConsentData(e,t,n),this._store.insertConsentData(e,t,n)}catch(e){e instanceof DOMException&&"QuotaExceededError"===e.name?Lf.error("[StorageModule]: insertConsentData - Storage limit exceeded, switch to in mem storage",e):Lf.error("[StorageModule]: insertConsentData - Error",e),this._store.destruct(),this._store=this._inMemStore}}},{key:"getNotificationData",value:function(e){return Lf.info("[StorageModule]: getNotificationData",{userInfo:e}),this._store.getNotificationData(e)}},{key:"insertNotificationData",value:function(e,t,n){Lf.info("[StorageModule]: insertNotificationData",{data:e,timestamp:t});try{this._inMemStore.insertNotificationData(e,t,n),this._store.insertNotificationData(e,t,n)}catch(e){e instanceof DOMException&&"QuotaExceededError"===e.name?Lf.error("[StorageModule]: insertNotificationData - Storage limit exceeded, switch to in mem storage",e):Lf.error("[StorageModule]: insertNotificationData - Error",e),this._store.destruct(),this._store=this._inMemStore}}},{key:"_checkStorage",value:function(e){if(Lf.info("[StorageModule]: checkStorage",{storageType:e}),e===ph.inMem)return!0;try{var t=window[e].getItem(Zd);return t?(window[e].setItem(Zd,t),!0):(window[e].setItem(Zd,"{}"),window[e].removeItem(Zd),!0)}catch(e){return!1}}},{key:"_setupStorage",value:function(e){if(Lf.info("[StorageModule]: setupStorage",{storageType:e}),this._inMemStore=new nv,e&&this._checkStorage(e)){var t=lv[e];this._store=new t}else this._checkStorage(ph.sessionStorage)?this._store=new cv:this._checkStorage(ph.localStorage)?this._store=new sv:this._store=this._inMemStore}},{key:"clean",value:function(){Lf.info("[StorageModule]: clean"),this._store&&this._store.clean(),this._inMemStore&&this._inMemStore.clean()}},{key:"destruct",value:function(){Lf.info("[StorageModule]: destruct"),this.clean()}}]),e}(),fv=new uv,dv=function(e){return e.SDK_INIT="sdk_init",e.FETCH_DATA="fetch_data",e.SUBSCRIBE_EVENT="subscribe_event",e.UNSUBSCRIBE_EVENT="unsubscribe_event",e.GET_RECORD="get_record",e.FETCH_RECORD="fetch_record",e.GET_RECORDS="get_records",e.FETCH_RECORDS="fetch_records",e.GET_ENTITY="get_entity",e.FETCH_ENTITY="fetch_entity",e.GET_ENTITIES="get_entities",e.FETCH_ENTITIES="fetch_entities",e.FETCH_COLLECTION_POINT="fetch_collection_point",e.GET_COLLECTION_POINT="get_collection_point",e.UPDATE_RECORD="update_record",e.UPDATE_RECORDS_BY_COLLECTION_POINT="update_records_by_collection_point",e}(dv||{}),hv=(x(o={},"sdk_init","consent_init_sdk"),x(o,"fetch_data","consent_fetch_data"),x(o,"subscribe_event","consent_subscribe_event"),x(o,"unsubscribe_event","consent_unsubscribe_event"),x(o,"fetch_record","consent_fetch_record"),x(o,"fetch_records","consent_fetch_records"),x(o,"get_record","consent_get_record"),x(o,"get_records","consent_get_records"),x(o,"fetch_entity","consent_fetch_entity"),x(o,"fetch_entities","consent_fetch_entities"),x(o,"get_entity","consent_get_entity"),x(o,"get_entities","consent_get_entities"),x(o,"fetch_collection_point","consent_fetch_collection_point"),x(o,"get_collection_point","consent_get_collection_point"),x(o,"update_records_by_collection_point","consent_update_records_by_collection_point"),x(o,"update_record","consent_create_record_api"),o),pv=function(e){return e.USAGE_BEFORE_INIT="Usage before init",e.INVALID_PARAM="Invalid param",e.INVALID_USER_INFO="Empty user info",e.INVALID_RESPONSE="Invalid response",e.ENTITY_MAX_PAGE_SIZE="Max page size for entity is 20. If you need to fetch all, remove page size & page token settings",e}(pv||{}),vv=function(){function e(){V(this,e),this.userInfo={}}return $(e,[{key:"init",value:function(e){Lf.info("[BaseInfoModule]: init")}},{key:"getUserInfo",value:function(){return Lf.info("[BaseInfoModule]: getUserInfo"),this.userInfo}},{key:"setUserInfo",value:function(e){Lf.info("[BaseInfoModule]: setUserInfo"),this.userInfo=e}},{key:"fetchUserInfo",value:function(){return Lf.info("[BaseInfoModule]: fetchUserInfo"),Promise.resolve({})}}]),e}(),gv=function(){function e(){V(this,e)}return $(e,[{key:"getName",value:function(){return this.constructor.name}},{key:"getLifeCycleEvents",value:function(){var e=this;return Object.values(hh).filter((function(t){return"function"==typeof(null==e?void 0:e[t])}))}}]),e}(),mv=Object.defineProperty,_v=Object.getOwnPropertySymbols,yv=Object.prototype.hasOwnProperty,bv=Object.prototype.propertyIsEnumerable,Ev=function(e,t,n){return t in e?mv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},wv=function(e,t){for(var n in t||(t={}))yv.call(t,n)&&Ev(e,n,t[n]);if(_v){var i,r=F(_v(t));try{for(r.s();!(i=r.n()).done;){n=i.value;bv.call(t,n)&&Ev(e,n,t[n])}}catch(e){r.e(e)}finally{r.f()}}return e},kv=function(e,t){var n={};for(var i in e)yv.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&_v){var r,o=F(_v(e));try{for(o.s();!(r=o.n()).done;){i=r.value;t.indexOf(i)<0&&bv.call(e,i)&&(n[i]=e[i])}}catch(e){o.e(e)}finally{o.f()}}return n},Sv=Object.keys(hh).reduce((function(e,t){return e[hh[t]]={},e}),{}),xv=function(e){I(n,e);var t=M(n);function n(){var e;return V(this,n),(e=t.apply(this,arguments)).addEventListener=function(t,n,i){var r,o;Lf.info("[DefaultEventPlugin]: addEventListener"),(null==(o=null==(r=e._registeredCallbackMap)?void 0:r[t])?void 0:o[n])?Lf.error("[DefaultEventPlugin]: addEventListener - id for this event callback has been used"):e._registeredCallbackMap[t][n]=i},e.removeEventListener=function(t,n){var i,r;Lf.info("[DefaultEventPlugin]: removeEventListener"),(null==(r=null==(i=e._registeredCallbackMap)?void 0:i[t])?void 0:r[n])&&delete e._registeredCallbackMap[t][n]},e[Ep]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.beforeFetchUserInfo)),e._triggerEvent(hh.beforeFetchUserInfo,t)},e[wp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.afterFetchUserInfo)),e._triggerEvent(hh.afterFetchUserInfo,t)},e[kp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.beforeFetchConsentData)),e._triggerEvent(hh.beforeFetchConsentData,t)},e[Sp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.afterFetchConsentData)),e._triggerEvent(hh.afterFetchConsentData,t)},e[xp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.beforeFetchEntities)),e._triggerEvent(hh.beforeFetchEntities,t)},e[Tp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.afterFetchEntities)),e._triggerEvent(hh.afterFetchEntities,t)},e[Ap]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.beforeFetchCollectionPoint)),e._triggerEvent(hh.beforeFetchCollectionPoint,t)},e[zp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.afterFetchCollectionPoint)),e._triggerEvent(hh.afterFetchCollectionPoint,t)},e[Cp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.beforeFetchNotificationData)),e._triggerEvent(hh.beforeFetchNotificationData,t)},e[Dp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.afterFetchNotificationData)),e._triggerEvent(hh.afterFetchNotificationData,t)},e[Rp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.beforeUpdateRecords)),e._triggerEvent(hh.beforeUpdateRecords,t)},e[Op]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.afterUpdateRecords)),e._triggerEvent(hh.afterUpdateRecords,t)},e[Ip]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.beforeNotify)),e._triggerEvent(hh.beforeNotify,t)},e[Mp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.afterNotify)),e._triggerEvent(hh.afterNotify,t)},e[Pp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.beforeRemoveNotification)),e._triggerEvent(hh.beforeRemoveNotification,t)},e[Np]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.afterRemoveNotification)),e._triggerEvent(hh.afterRemoveNotification,t)},e[Up]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.beforeThirdPartyApprove)),e._triggerEvent(hh.beforeThirdPartyApprove,t)},e[Bp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.afterThirdPartyApprove)),e._triggerEvent(hh.afterThirdPartyApprove,t)},e[Gp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.beforeThirdPartyReject)),e._triggerEvent(hh.beforeThirdPartyReject,t)},e[Lp]=function(t){Lf.info("[DefaultEventPlugin]: ".concat(hh.afterThirdPartyReject)),e._triggerEvent(hh.afterThirdPartyReject,t)},e.destruct=function(){Object.keys(hh).forEach((function(t){var n=hh[t];Object.keys(e._registeredCallbackMap[n]).forEach((function(t){delete e._registeredCallbackMap[n][t]})),e._registeredCallbackMap[n]={}}))},e}return $(n,[{key:"init",value:function(){this._registeredCallbackMap=bp(Sv)}},{key:"_triggerEvent",value:function(e,t){return n=this,i=null,r=D().mark((function n(){var i;return D().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return Lf.info("[DefaultEventPlugin]: triggerEvent"),i=[],Object.values(this._registeredCallbackMap[e]).forEach((function(e){if("function"==typeof e){var n=t,r=n.plugin,o=kv(n,["plugin"]);i.push(e(wv({plugin:r},bp(o))))}})),n.prev=3,n.next=6,Promise.all(i);case 6:n.next=11;break;case 8:n.prev=8,n.t0=n.catch(3),Lf.warn("[DefaultEventPlugin]: plugin callback error",n.t0);case 11:case"end":return n.stop()}}),n,this,[[3,8]])})),new Promise((function(e,t){var o=function(e){try{s(r.next(e))}catch(e){t(e)}},a=function(e){try{s(r.throw(e))}catch(e){t(e)}},s=function(t){return t.done?e(t.value):Promise.resolve(t.value).then(o,a)};s((r=r.apply(n,i)).next())}));var n,i,r}}]),n}(gv);Ep=hh.beforeFetchUserInfo,wp=hh.afterFetchUserInfo,kp=hh.beforeFetchConsentData,Sp=hh.afterFetchConsentData,xp=hh.beforeFetchEntities,Tp=hh.afterFetchEntities,Ap=hh.beforeFetchCollectionPoint,zp=hh.afterFetchCollectionPoint,Cp=hh.beforeFetchNotificationData,Dp=hh.afterFetchNotificationData,Rp=hh.beforeUpdateRecords,Op=hh.afterUpdateRecords,Ip=hh.beforeNotify,Mp=hh.afterNotify,Pp=hh.beforeRemoveNotification,Np=hh.afterRemoveNotification,Up=hh.beforeThirdPartyApprove,Bp=hh.afterThirdPartyApprove,Gp=hh.beforeThirdPartyReject,Lp=hh.afterThirdPartyReject;var Tv=xv;var Av=function(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(r);++i0&&e.every((function(e){return!!t._validateEntityKey(e)}))},this._validateEntityKey=function(e){return/^(conditions|permissions|data)/.test(e)},this._validateUserInfo=function(e){if(!(null==e?void 0:e.user_id)&&!(null==e?void 0:e.device_id))throw Lf.error("[ConsentModule]: updateRecords - invalid user info"),Hv(pv.INVALID_USER_INFO)},this._validateUpdateParam=function(e){return(null==e?void 0:e.length)>0&&e.every((function(e){if(!e)return!1;var n=e.key,i=e.status;return!!/^(conditions|permissions|data)/.test(n)&&!!t._validateStatus(i)}))},this._formatExtra=function(e,n){var i={};try{var r=JSON.parse(null!=n?n:"");i=Yv({},r)}catch(e){}return t._debug&&(i=Qv(Yv({},i),{appId:t._appId,domain:e||t._domain,tenant:t._tenant,path:"/consent/api/record/create/v2",debug:!0,vregion:t._vregion})),JSON.stringify(i)},this.destruct=function(){Lf.info("[ConsentModule]: destruct")}}return $(e,[{key:"_getAPIConfig",value:function(e){var t,n,i={};return(null==(t=this._config)?void 0:t[e])&&(i="function"==typeof this._config[e]?this._config[e]():null!=(n=this._config[e])?n:{}),i}},{key:"init",value:function(e){Lf.info("[ConsentModule]: init");var t=null!=e?e:{},n=t.api,i=t.appId,r=t.debug,o=t.domain,a=t.tenant,s=t.region;this._appId=i,this._debug=null!=r&&r,this._domain=o,this._tenant=a,this._vregion=null!=s?s:Qd.SINGAPORE_CENTRAL;var c=(null!=n?n:{}).consent;this._config=Kp({},c,tg)}},{key:"getRecord",value:function(e,t){return Lf.info("[ConsentModule]: getRecord",{entityKey:e,userInfo:t}),fv.getRecord(e,t)}},{key:"getRecords",value:function(e,t){return Lf.info("[ConsentModule]: getRecords",{entityKeys:e,userInfo:t}),fv.getRecords(e,t)}},{key:"getEntity",value:function(e,t){return Lf.info("[ConsentModule]: getEntity",{entityKey:e,userInfo:t}),fv.getEntity(e,t)}},{key:"getEntities",value:function(e,t){return Lf.info("[ConsentModule]: getEntities",{entityKeys:e,userInfo:t}),fv.getEntities(e,t)}},{key:"fetchEntities",value:function(e,t){return eg(this,null,D().mark((function n(){var i,r,o,a,s,c,l,u,f,d=this;return D().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(Lf.info("[ConsentModule]: fetchEntities",{entityKeys:e,userInfo:t}),this._validateUserInfo(t),this._validateEntityKeys(e)){n.next=4;break}throw Hv(pv.INVALID_PARAM,{entityKeys:e});case 4:if(Lf.reportCUJ(dv.FETCH_ENTITIES,Do.IN_PROGRESS,{stepName:"api"}),i=this._getAPIConfig("fetchEntities"),r=i.domain,o=void 0===r?"":r,a=i.timeout,s=i.requestConfig,!((c=i.pageSize)&&c>20)){n.next=8;break}throw Hv(pv.ENTITY_MAX_PAGE_SIZE);case 8:return l={entityMap:{},collectionPoint:null},u=(new Date).getTime(),f=(c?Kv(e,c):[e]).map((function(e){return Lf.reportCUJ(dv.FETCH_ENTITIES,Do.IN_PROGRESS,{stepName:"pagination_api"}),d._fetchEntitiesWithPagination(e,t,o,c,a,"",s).then((function(t){var n,i,r=null!=(n=null==t?void 0:t.data)?n:{},o=r.data,a=r.status_code,s=r.status_msg,c=r.extra;if(0!==a)throw Hv(pv.INVALID_RESPONSE,{entityKey:e,statusCode:a,statusMessage:s});Lf.reportCUJ(dv.FETCH_ENTITIES,Do.IN_PROGRESS,{stepName:"pagination_api_finish"});var f=null==(i=null==o?void 0:o.reduce)?void 0:i.call(o,(function(e,t){var n=(null!=t?t:{}).key;return n&&(e[n]=t),e}),{});l.entityMap=Yv(Yv({},l.entityMap),null!=f?f:{}),(null==c?void 0:c.now)&&u3){var t=e.length-1;return".".concat(e.slice(-t).join("."))}return".".concat(e.slice(-2).join("."))}function Cg(){ht.remove(st,{domain:zg()}),ht.remove(st),ht.remove(st,{domain:window.location.hostname})}function Dg(e){return e?"1":"0"}var Rg=function(){function e(){V(this,e),this.isRequestInflight=!1,this.pendingTasks=[],this.entityKeys={},this.collectionPointId=""}return $(e,[{key:"getSettings",value:function(){var e,t;return(null===(t=null===(e=this.value)||void 0===e?void 0:e.settings)||void 0===t?void 0:t.length)?this.value.settings:(console.error("`CookieConfigManager.getSettings` returned undefined."),[])}},{key:"getSettingItemKeys",value:function(e,t){var n=Object.keys(e||{});return n.length?n:(null==t?void 0:t.length)?t.map((function(e){return e.entityKey})):[]}},{key:"getCategoryConsents",value:function(e){var t=e.groupName,n=e.value,i=this.getSettings().find((function(e){return e.groupName===t}));return i?this.getSettingItemKeys(i.items,i.groupEntityKeys).reduce((function(e,t){return e[t]=n,e}),{}):(console.error("`CookieConfigManager.getCategoryConsents` returned category undefined."),{})}},{key:"setFullConsents",value:function(){var e=this.getFullConsents();return this.setCookieConsents(e)}},{key:"getFullConsents",value:function(){var e=this,t=this.getSettings(),n={};return t.forEach((function(t){var i=e.getCategoryConsents({groupName:t.groupName,value:!0});n=S(S({},n),i)})),n}},{key:"setEmptyConsents",value:function(){var e=this.getEmptyConsents();return this.setCookieConsents(e)}},{key:"getEmptyConsents",value:function(){var e=this,t=this.getSettings(),n={};return t.forEach((function(t){var i=e.getCategoryConsents({groupName:t.groupName,value:!1});n=S(S({},n),i)})),n}},{key:"setCookieConsents",value:function(e){var t,n=this.getSettings();if(!n.length)return{};n.forEach((function(t){for(var n=0,i=Object.keys(t.items);nNumber(r[1]):e!==t}((null===(t=this.value)||void 0===t?void 0:t.version)||"",i))}},{key:"setCookieConfig",value:function(e){var t=e.entityKeys,n=e.collectionPointId,i=w(e,y);this.value=i,this.entityKeys=t||{},this.collectionPointId=n||""}}]),e}(),Og=new Rg;function Ig(e,t){var n,i,r,o,a;try{o=null===(n=document.getElementById(e))||void 0===n?void 0:n.textContent;var s=JSON.parse(o),c=s.i18n,l=void 0===c?{}:c,u=s.appProps,f=(u=void 0===u?{}:u).region,d=void 0===f?"":f,h=u.user,p=(h=void 0===h?{}:h).ftcUser,v=void 0!==p&&p,g=u.idcRegion,m=void 0===g?"":g,_=s.cookieBanner,y=(_=void 0===_?{}:_).disabled,b=void 0!==y&&y,E=_.isEffective,w=void 0!==E&&E,k=_.settings,x=void 0===k?{}:k,T=_.version,A=void 0===T?"":T,z=_.disabledAccessKeys,C=void 0===z?[]:z,D=_.resource,R=void 0===D?{}:D,O=s.consent,I=s.consentApiDomain,M=s.customTheme,P=void 0===M?[]:M,N=s.tea,U=s.tenantId;return function(e){if(!qn&&Vn){qn=!0;var t=null!=e?e:ft;Vn.init(S({app_id:345918,log:!1,disable_auto_pv:!0},t)),Vn.start()}}(N),Og.setCookieConfig({settings:x,version:A,entityKeys:O.entityKeys,collectionPointId:O.collectionPointId}),a={locale:t,region:d,js_version:null!==(i=null==R?void 0:R.version)&&void 0!==i?i:"default",tenant_id:U||"default"},qn&&Vn&&Vn.config({evtParams:a}),{region:d,isFTC:v,i18n:l,disabled:b,isEffective:w,consent:O,disabledAccessKeys:C,consentApiDomain:I,customTheme:P.join(";")||"",idcRegion:m,disableTea:null===(r=null==R?void 0:R.esm)||void 0===r?void 0:r.includes("no-tea"),tenantId:U,tea:N}}catch(e){return console.error(e),null}} /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var Mg=function e(t,n){var i,r,o=t._$AN;if(void 0===o)return!1;var a,s=F(o);try{for(s.s();!(a=s.n()).done;){var c=a.value;null===(r=(i=c)._$AO)||void 0===r||r.call(i,n,!1),e(c,n)}}catch(e){s.e(e)}finally{s.f()}return!0},Pg=function(e){var t,n;do{if(void 0===(t=e._$AM))break;(n=t._$AN).delete(e),e=t}while(0===(null==n?void 0:n.size))},Ng=function(e){for(var t;t=e._$AM;e=t){var n=t._$AN;if(void 0===n)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),Gg(t)}}; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function Ug(e){void 0!==this._$AN?(Pg(this),this._$AM=e,Ng(this)):this._$AM=e}function Bg(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(t)if(Array.isArray(i))for(var o=n;o1&&void 0!==arguments[1])||arguments[1];e!==this.isConnected&&(this.isConnected=e,e?null===(t=this.reconnected)||void 0===t||t.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),i&&(Mg(this,e),Pg(this))}},{key:"setValue",value:function(e){if(function(e){return void 0===e.strings}(this._$Ct))this._$Ct._$AI(e,this);else{var t=C(this._$Ct._$AH);t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}},{key:"disconnected",value:function(){}},{key:"reconnected",value:function(){}}]),n}(tt),jg=function(){return new Fg},Fg=$((function e(){V(this,e)})),Kg=new WeakMap,Hg=et(function(e){I(n,e);var t=M(n);function n(){return V(this,n),t.apply(this,arguments)}return $(n,[{key:"render",value:function(e){return Ie}},{key:"update",value:function(e,t){var n,i=z(t,1)[0],r=i!==this.Y;return r&&void 0!==this.Y&&this.rt(void 0),(r||this.lt!==this.dt)&&(this.Y=i,this.ct=null===(n=e.options)||void 0===n?void 0:n.host,this.rt(this.dt=e.element)),Ie}},{key:"rt",value:function(e){var t;if("function"==typeof this.Y){var n=null!==(t=this.ct)&&void 0!==t?t:globalThis,i=Kg.get(n);void 0===i&&(i=new WeakMap,Kg.set(n,i)),void 0!==i.get(this.Y)&&this.Y.call(this.ct,void 0),i.set(this.Y,e),void 0!==e&&this.Y.call(this.ct,e)}else this.Y.value=e}},{key:"lt",get:function(){var e,t,n;return"function"==typeof this.Y?null===(t=Kg.get(null!==(e=this.ct)&&void 0!==e?e:globalThis))||void 0===t?void 0:t.get(this.Y):null===(n=this.Y)||void 0===n?void 0:n.value}},{key:"disconnected",value:function(){this.lt===this.dt&&this.rt(void 0)}},{key:"reconnected",value:function(){this.rt(this.dt)}}]),n}(Lg)),Vg=[],qg=[];function $g(e,t){if(e&&"undefined"!=typeof document){var n,i=!0===t.prepend?"prepend":"append",r=!0===t.singleTag,o="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(r){var a=Vg.indexOf(o);-1===a&&(a=Vg.push(o)-1,qg[a]={}),n=qg[a]&&qg[a][i]?qg[a][i]:qg[a][i]=s()}else n=s();65279===e.charCodeAt(0)&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function s(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var n=Object.keys(t.attributes),r=0;r',""])),Hg(this.wrapperRef),nt({"cookie-banner-toast":!0,show:this.visible}),this.text)}}]),n}(We);function Zg(e){if(Wg)Wg.setAttribute("text",e),Wg.setAttribute("text-id",Date.now().toString(36));else{(Wg=document.createElement("tiktok-cookie-banner-toast")).setAttribute("text",e),Wg.setAttribute("text-id",Date.now().toString(36));Wg.addEventListener("fadeOutComplete",(function e(){Wg&&(Wg.removeEventListener("fadeOutComplete",e),document.body.removeChild(Wg),Wg=null)})),document.body.appendChild(Wg)}}Xg.styles=ie(Jg),W([rt()],Xg.prototype,"text",void 0),W([rt({attribute:"text-id"})],Xg.prototype,"textId",void 0),W([ot()],Xg.prototype,"visible",void 0),Xg=W([it("tiktok-cookie-banner-toast")],Xg);var Yg='.tiktok-cookie-banner.paas_lemon8 {\n box-shadow: 0px -0.5px 0px 0px rgba(0, 0, 0, 0.05);\n}\n\n.tiktok-cookie-banner {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 18px;\n line-height: 130%;\n letter-spacing: -0.16%;\n position: fixed;\n left: 0;\n bottom: 0;\n right: 0;\n background: var(--banner-background-color--, #10a2c5);\n z-index: 10001;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n color: #fff;\n padding: 24px 64px 32px;\n box-sizing: border-box;\n box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);\n -moz-text-size-adjust: 100%;\n text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n}\n.tiktok-cookie-banner .cookie-content .cookie-title {\n font-family: "tiktok-display-bold", PingFangSC, sans-serif;\n font-weight: 700;\n font-size: 24px;\n line-height: 125%;\n letter-spacing: 1%;\n margin-top: 0;\n margin-bottom: 0;\n color: var(--banner-title-color--, #fff);\n}\n.tiktok-cookie-banner .cookie-content .cookie-desc {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n margin-top: 8px;\n margin-bottom: 0;\n color: var(--banner-desc-color--, #fff);\n}\n.tiktok-cookie-banner .cookie-content .cookie-desc a {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n text-decoration: none;\n color: var(--banner-link-color--, #fff);\n}\n.tiktok-cookie-banner .cookie-content .cookie-desc a:hover {\n text-decoration: underline;\n color: var(--banner-link-hover-color--, #fff);\n}\n.tiktok-cookie-banner .button-wrapper {\n display: flex;\n margin-left: 64px;\n}\n.tiktok-cookie-banner .button-wrapper a,\n.tiktok-cookie-banner .button-wrapper button {\n font-family: "tiktok-text-bold", PingFangSC, sans-serif;\n font-weight: 700;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n box-sizing: border-box;\n padding: 0 24px;\n height: 46px;\n min-width: 153px;\n white-space: nowrap;\n border-radius: 4px;\n border: 1px solid rgba(22, 24, 35, 0.12);\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n cursor: pointer;\n background: #fff;\n color: #161823;\n outline: none;\n text-decoration: none;\n border: 1px solid rgba(22, 24, 35, 0.12);\n}\n.tiktok-cookie-banner .button-wrapper a:hover,\n.tiktok-cookie-banner .button-wrapper button:hover {\n background: #f8f8f8;\n}\n.tiktok-cookie-banner .button-wrapper button {\n margin-left: 16px;\n background: var(--banner-button-background-color--, #fff);\n color: var(--banner-button-text-color--, #161823);\n}\n.tiktok-cookie-banner .button-wrapper button:hover {\n background: var(--banner-button-hover-background-color--, #f8f8f8);\n}\n@media (min-width: 768px) and (max-width: 1200px) {\n .tiktok-cookie-banner .special-button-wrapper button {\n height: auto;\n min-height: 44px;\n white-space: pre-wrap;\n }\n}\n.tiktok-cookie-banner.is-rtl {\n direction: rtl;\n}\n.tiktok-cookie-banner.is-rtl .button-wrapper {\n margin-left: unset;\n margin-right: 64px;\n}\n.tiktok-cookie-banner.is-rtl .button-wrapper button {\n margin-left: unset;\n margin-right: 16px;\n}\n@media (max-width: 991px) {\n .tiktok-cookie-banner.is-rtl .button-wrapper button {\n margin-right: 8px;\n }\n}\n@media (max-width: 991px) {\n .tiktok-cookie-banner {\n flex-direction: column;\n height: auto;\n padding: 16px 16px 20px;\n box-shadow: none;\n }\n .tiktok-cookie-banner .cookie-content .cookie-title {\n font-family: "tiktok-text-bold", PingFangSC, sans-serif;\n font-weight: 700;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n text-align: center;\n color: var(--banner-title-color--, #fff);\n }\n .tiktok-cookie-banner .cookie-content .cookie-desc {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 12px;\n line-height: 130%;\n letter-spacing: 1.34%;\n width: auto;\n text-align: center;\n color: var(--banner-desc-color--, #fff);\n }\n .tiktok-cookie-banner .cookie-content .cookie-desc a {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 12px;\n line-height: 130%;\n letter-spacing: 1.34%;\n text-decoration: none;\n color: var(--banner-link-color--, #fff);\n }\n .tiktok-cookie-banner .cookie-content .cookie-desc a:hover {\n text-decoration: underline;\n color: var(--banner-link-hover-color--, #fff);\n }\n .tiktok-cookie-banner .button-wrapper {\n align-self: flex-end;\n margin-top: 16px;\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n }\n .tiktok-cookie-banner .button-wrapper a,\n .tiktok-cookie-banner .button-wrapper button {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 15px;\n line-height: 130%;\n letter-spacing: 0.4%;\n min-width: unset;\n padding: 0 6px;\n width: 100%;\n height: 44px;\n border-radius: 2px;\n white-space: pre-wrap;\n margin: 0;\n }\n .tiktok-cookie-banner .button-wrapper button {\n margin-left: 8px;\n height: auto;\n min-height: 44px;\n }\n}';$g(Yg,{}); /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ var Qg=et(function(e){I(n,e);var t=M(n);function n(e){var i,r;if(V(this,n),i=t.call(this,e),e.type!==Ye||"style"!==e.name||(null===(r=e.strings)||void 0===r?void 0:r.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");return P(i)}return $(n,[{key:"render",value:function(e){return Object.keys(e).reduce((function(t,n){var i=e[n];return null==i?t:t+"".concat(n=n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),":").concat(i,";")}),"")}},{key:"update",value:function(e,t){var n=this,i=z(t,1)[0],r=e.element.style;if(void 0===this.vt){for(var o in this.vt=new Set,i)this.vt.add(o);return this.render(i)}for(var a in this.vt.forEach((function(e){null==i[e]&&(n.vt.delete(e),e.includes("-")?r.removeProperty(e):r[e]="")})),i){var s=i[a];null!=s&&(this.vt.add(a),a.includes("-")?r.setProperty(a,s):r[a]=s)}return Oe}}]),n}(tt)),em=':root body.disable-scroll {\n overflow: hidden;\n}\n\n.tiktok-cookie-setting-portal {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 130%;\n letter-spacing: 0.67%;\n position: fixed;\n left: 0;\n top: 0;\n width: 0;\n height: 0;\n color: rgb(22, 24, 35);\n -webkit-font-smoothing: antialiased;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-backdrop {\n background-color: rgba(0, 0, 0, 0.5);\n transition: opacity 300ms linear;\n opacity: 0;\n position: fixed;\n inset: 0;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-backdrop.visible {\n opacity: 1;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-container {\n position: fixed;\n inset: 0;\n left: 0;\n top: 32px;\n bottom: 32px;\n left: 16px;\n right: 16px;\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0;\n transform: scale(0.8);\n transition: opacity 300ms cubic-bezier(0.65, 0, 0.35, 1), transform 300ms cubic-bezier(0.65, 0, 0.35, 1);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-container.visible {\n opacity: 1;\n transform: scale(1);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-container .tiktok-cookie-setting-modal {\n position: relative;\n max-width: 700px;\n max-height: 100%;\n background-color: var(--setting-modal-background-color--, #fff);\n border-radius: 8px;\n overflow: hidden;\n box-shadow: rgba(0, 0, 0, 0.12) 0 2px 12px;\n outline: 0;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n@media (max-width: 700px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-container .tiktok-cookie-setting-modal {\n width: calc(100vw - 32px);\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-header-container {\n font-family: "tiktok-display-bold", PingFangSC, sans-serif;\n font-weight: 700;\n font-size: 24px;\n line-height: 125%;\n letter-spacing: 1%;\n padding: 24px 29px 16px 24px;\n color: var(--setting-modal-title-color--, #161823);\n border-bottom: 0.5px solid rgba(22, 24, 35, 0.2);\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex: 0;\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-header-container {\n border-bottom: none;\n padding: 32px 24px 24px;\n font-family: "tiktok-display-bold", PingFangSC, sans-serif;\n font-weight: 700;\n font-size: 20px;\n line-height: 125%;\n letter-spacing: 1.5%;\n justify-content: center;\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-close {\n width: 24px;\n height: 24px;\n cursor: pointer;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-close svg {\n fill: var(--setting-modal-close-icon-color--, rgba(22, 24, 35, 0.6));\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-close {\n position: absolute;\n top: 14px;\n right: 14px;\n transform: scale(0.8);\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-description-container {\n background-color: rgba(22, 24, 35, 0.03);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-description-container .tiktok-cookie-setting-modal-description {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n margin: 20px 24px;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content {\n padding: 12px 40px 12px 24px;\n overflow-y: auto;\n flex: 1 1 auto;\n}\n@media (max-width: 700px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-content {\n width: calc(100% - 48px);\n }\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-content {\n padding: 6px 16px 0 16px;\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content::-webkit-scrollbar {\n width: 6px;\n margin-right: 8px;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content:hover::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.15);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content::-webkit-scrollbar-track {\n background: transparent;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background: rgba(0, 0, 0, 0.15);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-setting-info-icon {\n margin-left: auto;\n justify-content: flex-end;\n height: 48px;\n cursor: pointer;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-setting-info-icon.hide {\n transform: rotate(180deg);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-setting-info-icon svg {\n width: 14px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n padding: 17px;\n fill: var(--setting-modal-arrow-icon-color--, #161823);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-vertical-info-icon {\n margin-left: auto;\n margin-right: 20px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-vendor-group-name {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n margin-top: 0;\n margin-bottom: 0;\n color: var(--setting-modal-text-color--, #161823);\n flex: 1 1 0;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-vendor-group-name .tiktok-cookie-vendor-group-name-outside {\n display: flex;\n align-items: center;\n flex-shrink: 1;\n flex-grow: 1;\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-vendor-group-name {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 15px;\n line-height: 130%;\n letter-spacing: 0.4%;\n }\n}\n.tiktok-cookie-setting-portal cookie-setting-switch {\n line-height: 0;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer {\n padding: 24px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-top: 0.5px solid rgba(22, 24, 35, 0.2);\n flex: 0 0 auto;\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-footer {\n border-top: none;\n padding: 20px;\n flex-direction: column-reverse;\n justify-content: center;\n align-items: stretch;\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-text,\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-primary {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n min-width: 100px;\n border-radius: 4px;\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n cursor: pointer;\n box-sizing: border-box;\n height: 36px;\n outline: none;\n border: none;\n text-align: center;\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-text,\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-primary {\n height: 44px;\n margin-left: 0;\n border-radius: 2px;\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-text {\n color: #fe2c55;\n background-color: #fff;\n text-decoration: none;\n padding-left: 0;\n padding-right: 0;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-primary {\n background-color: var(--setting-modal-button-background-color--, rgb(254, 44, 85));\n color: var(--setting-modal-button-text-color--, #fff);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-primary:hover {\n background: var(--setting-modal-button-hover-background-color--, linear-gradient(0deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.06)), #fe2c55);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor-group {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor-group.show-detail {\n margin-bottom: 16px;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor .tiktok-cookie-vendor-label-outside {\n display: flex;\n flex-shrink: 1;\n flex-grow: 1;\n color: var(--setting-modal-text-color--, #161823);\n cursor: pointer;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor .tiktok-cookie-vendor-label-outside .tiktok-cookie-vendor-label {\n margin-left: 16px;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n flex: 1 1 0;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-manage-tip-context {\n padding: 0;\n margin: 0;\n margin-bottom: 8px;\n padding-left: -16px;\n color: var(--setting-modal-desc-color--, rgba(0, 0, 0, 0.7));\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-manage-tip-context .tiktok-cookie-manage-tip-context-ref {\n text-decoration: none;\n color: var(--setting-modal-link-color--, #fe2c55);\n font-weight: bold;\n text-decoration: none;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-manage-tip-context .tiktok-cookie-manage-tip-context-ref:hover {\n text-decoration: underline;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor-context-ref {\n text-decoration: none;\n color: var(--setting-modal-link-color--, #fe2c55);\n font-weight: bold;\n text-decoration: none;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor-context-ref:hover {\n text-decoration: underline;\n color: var(--setting-modal-link-hover-color--, #fe2c55);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor-context {\n padding: 0;\n margin-top: 4px;\n margin-bottom: 8px;\n padding-left: 16px;\n color: var(--setting-modal-text-color--, rgba(0, 0, 0, 0.56));\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor-group p,\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor p {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n margin-top: 0;\n margin-bottom: 0;\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-vendor-group p,\n .tiktok-cookie-setting-portal .tiktok-cookie-vendor p {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 15px;\n line-height: 130%;\n letter-spacing: 0.4%;\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-desc {\n color: var(--setting-modal-text-color--, rgba(0, 0, 0, 0.56));\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 130%;\n letter-spacing: 0.67%;\n margin-bottom: 24px;\n}\n.tiktok-cookie-setting-portal .cookie-setting-switch {\n line-height: 0;\n padding-left: 36px;\n flex-grow: 0;\n flex-shrink: 0;\n}\n.tiktok-cookie-setting-portal .cookie-setting-switch.checked {\n background-color: var(--setting-modal-switch-toggle-color--, #0be09b);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer-desc {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n padding: 0;\n margin: 0 16px 0 0;\n color: var(--setting-modal-link-color--, #fe2c55);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer-desc a {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n text-decoration: none;\n color: var(--setting-modal-link-color--, #fe2c55);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer-desc a:hover {\n text-decoration: underline;\n color: var(--setting-modal-link-color--, #fe2c55);\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-footer-desc {\n margin: 16px 0 0 0;\n text-align: center;\n }\n}\n.tiktok-cookie-setting-portal.is-rtl {\n direction: rtl;\n}\n.tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-setting-content {\n padding: 12px 24px 12px 40px;\n}\n.tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-vertical-info-icon {\n margin-left: 20px;\n margin-right: auto;\n}\n.tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-setting-info-icon {\n margin-right: auto;\n margin-left: 0;\n}\n.tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-vendor .tiktok-cookie-vendor-label-outside .tiktok-cookie-vendor-label {\n margin-left: 0;\n margin-right: 16px;\n}\n.tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-vendor-context {\n padding-left: 0;\n padding-right: 16px;\n}\n.tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-setting-footer-desc {\n margin: 0 0 0 16px;\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-setting-footer-desc {\n margin: 16px 0 0 0;\n text-align: center;\n }\n}'; /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */$g(em,{});var tm="global_module_disableScroll__472ccca3";$g(":root body.global_module_disableScroll__472ccca3 {\n overflow: hidden;\n}",{});var nm=".tiktok-cookie-setting-switch {\n box-sizing: border-box;\n display: inline-block;\n border-radius: 12px;\n border: 1px rgba(0, 0, 0, 0) solid;\n position: relative;\n cursor: pointer;\n background-color: var(--setting-modal-switch-toggle-color--, rgba(46, 50, 56, 0.05));\n transition: background-color 200ms ease-in-out;\n width: 40px;\n height: 24px;\n}\n.tiktok-cookie-setting-switch.checked {\n background-color: var(--setting-modal-switch-toggle-checked-color--, #0be09b);\n}\n.tiktok-cookie-setting-switch.checked .tiktok-cookie-setting-switch-knob {\n transform: translateX(18px);\n}\n.tiktok-cookie-setting-switch.disabled {\n opacity: 0.34;\n cursor: not-allowed;\n}\n\n.tiktok-cookie-setting-switch-knob {\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.08);\n cursor: pointer;\n border-radius: 9px;\n background-color: #fff;\n box-sizing: border-box;\n position: absolute;\n left: 0;\n right: auto;\n transition: transform 200ms ease-in-out, width 200ms ease-in-out;\n width: 18px;\n height: 18px;\n top: 2px;\n transform: translateX(2px);\n}\n\n.tiktok-cookie-setting-switch-native-control {\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: inherit;\n pointer-events: auto;\n margin: 0;\n position: absolute;\n top: 0;\n left: 0;\n}";$g(nm,{});var im=function(e){I(n,e);var t=M(n);function n(){var e;return V(this,n),(e=t.apply(this,arguments)).value=!1,e.name="",e.disabled=!1,e}return $(n,[{key:"handleCheck",value:function(e){var t=e.target.checked;this.dispatchEvent(new CustomEvent("checkedChange",{detail:t}))}},{key:"render",value:function(){return Re(s||(s=E(['
'])),nt({"tiktok-cookie-setting-switch":!0,checked:this.value,disabled:this.disabled}),this.value,this.handleCheck,this.value,this.name)}}]),n}(We);im.styles=ie(nm),W([rt({converter:function(e){return"true"===e}})],im.prototype,"value",void 0),W([rt()],im.prototype,"name",void 0),W([rt({converter:function(e){return"true"===e}})],im.prototype,"disabled",void 0),im=W([it("cookie-setting-switch")],im);var rm=["touchstart","touchmove","touchend","scroll"],om=function(e){I(n,e);var t=M(n);function n(){var e;return V(this,n),(e=t.apply(this,arguments)).zIndex=10002,e.visible=!1,e.settingModalCloseDisabled=!1,e.deferredVisible=!1,e.cookieConsent={},e.customTheme="",e.tenantId="",e.modalBackdropRef=jg(),e.scrollableListRef=jg(),e}return $(n,[{key:"connectedCallback",value:function(){var e=this;if(T(j(n.prototype),"connectedCallback",this).call(this),this.initUserConfig(),this.userConfig){this.cookieConsent=Og.getCookieConsents(this.userConfig);var t=this.userConfig;xg({config:t.consent,region:t.region,consentApiDomain:t.consentApiDomain,idcRegion:t.idcRegion,disableTea:t.disableTea,tea:t.tea,tenantId:t.tenantId})}this.visible&&requestAnimationFrame((function(){return e.deferredVisible=!0}))}},{key:"willUpdate",value:function(e){var t,n=this;if((e.has("userConfigEleId")||e.has("locale"))&&this.initUserConfig(),e.has("visible"))if(this.visible)this.cookieConsent=this.userConfig?Og.getCookieConsents(this.userConfig):{},requestAnimationFrame((function(){return n.deferredVisible=!0})),this.lockScroll(),$n("cookie_setting_show"),this.dispatchEvent(new CustomEvent("customBannerEvents",{detail:{eventName:"onSettingShow"},bubbles:!0,composed:!0}));else{var i=this.modalBackdropRef.value;null==i||i.addEventListener("transitionend",(function e(){null==i||i.removeEventListener("transitionend",e),n.deferredVisible=!1})),this.unlockScroll();var r,o=F(rm);try{for(o.s();!(r=o.n()).done;){var a=r.value;null===(t=this.scrollableListRef.value)||void 0===t||t.removeEventListener(a,this.stopTouchEventPropagation)}}catch(e){o.e(e)}finally{o.f()}}}},{key:"updated",value:function(e){if(e.has("visible")&&this.visible&&this.scrollableListRef.value){var t,n=F(rm);try{for(n.s();!(t=n.n()).done;){var i=t.value;this.scrollableListRef.value.addEventListener(i,this.stopTouchEventPropagation)}}catch(e){n.e(e)}finally{n.f()}}}},{key:"stopTouchEventPropagation",value:function(e){e.stopPropagation()}},{key:"lockScroll",value:function(){document.body.classList.add(tm)}},{key:"unlockScroll",value:function(){document.body.classList.remove(tm)}},{key:"initUserConfig",value:function(){var e=Ig(this.userConfigEleId,this.locale);e&&(this.userConfig=e,this.customTheme=e.customTheme,this.tenantId=e.tenantId)}},{key:"handleClose",value:function(){$n("cookie_setting_close"),this.dispatchEvent(new Event("close"))}},{key:"disagreeToAll",value:function(e){var t=e.value,n=e.groupName,i=Og.getCategoryConsents({groupName:n,value:t});this.cookieConsent=S(S({},this.cookieConsent||{}),i),$n("cookie_setting_toggle",{state:t?1:0,type:"category",name:n})}},{key:"disagreeToOne",value:function(e){var t=this.cookieConsent[e];this.cookieConsent=S(S({},this.cookieConsent),{},x({},e,!t)),$n("cookie_setting_toggle",{state:t?0:1,type:"vendor",name:e})}},{key:"handleSave",value:function(){var e=this;Og.setCookieConsents(this.cookieConsent),this.dispatchEvent(new Event("close")),this.dispatchEvent(new CustomEvent("save",{detail:this.cookieConsent})),$n("cookie_setting_save",{result:Object.keys(this.cookieConsent).filter((function(t){return e.cookieConsent[t]})).join(",")});var t=Object.keys(this.cookieConsent).every((function(t){return e.cookieConsent[t]})),n=Object.keys(this.cookieConsent).every((function(t){return!e.cookieConsent[t]}));t?$n("cookie_banner_accept"):n&&$n("cookie_banner_decline")}},{key:"renderVendorDescription",value:function(e){for(var t,n=[],i=new RegExp("\\[([^\\]]+)\\]\\(([^)]+)\\)","g");null!==(t=i.exec(e));){var r=e.slice(0,t.index);r&&n.push({type:"normalText",value:r}),n.push({type:"linkText",value:t[1],ref:t[2]}),e=e.slice(t.index+t[0].length)}return e&&n.push({type:"normalText",value:e}),n.map((function(e){var t,n=e.type,i=e.value,r=e.ref;switch(n){case"normalText":return Re(c||(c=E(["",""])),i);case"linkText":return Re(l||(l=E(['',""])),null!=(t=r)?t:Ie,i);default:return Ie}}))}},{key:"render",value:function(){var e,t,n=this,i=this.locale,r=void 0===i?"en":i,o=this.tenantId,a=null!==(t=null===(e=this.userConfig)||void 0===e?void 0:e.i18n)&&void 0!==t?t:{},s=a.cookieSettingsTitle,c=void 0===s?"":s,l=a.cookieSettingSaveBtn,g=void 0===l?"":l,m=a.cookieSettingsSubTitle,_=void 0===m?"":m,y=a.cookieSettingsFooter,b=void 0===y?"":y;if(!this.deferredVisible&&!this.visible)return Ie;var w=Og.getSettings();return Re(u||(u=E(["
"])),this.customTheme,nt(S({"tiktok-cookie-setting-portal":!0,"is-rtl":at.includes(r)},o?x({},o,!0):{})),Qg({zIndex:"".concat(this.zIndex)}),Hg(this.modalBackdropRef),nt({"tiktok-cookie-setting-backdrop":!0,visible:this.visible&&this.deferredVisible}),nt({"tiktok-cookie-setting-modal-container":!0,visible:this.visible&&this.deferredVisible}),c,this.settingModalCloseDisabled?Ie:Re(f||(f=E([''])),this.handleClose,''),this.renderVendorDescription(_),Hg(this.scrollableListRef),w.map((function(e){return Re(d||(d=E([''," ",""])),e.groupName,lt,!!e.disabled||function(e){var t=e.reduce((function(e,t){return S(S({},e),{},x({},t,n.cookieConsent[t]))}),{});return Object.values(t).every((function(e){return Boolean(e)}))}(Og.getSettingItemKeys(e.items,e.groupEntityKeys)),e.disabled,(function(t){e.disabled||n.disagreeToAll({value:t.detail,groupName:e.groupName})}),Re(h||(h=E(['"])),e.groupDescription),Og.getSettingItemKeys(e.items).map((function(t){var i,r;return Re(p||(p=E(['"])),(null===(i=e.items[t])||void 0===i?void 0:i.vendorName)||"",lt,Boolean(n.cookieConsent[t]),e.disabled,(function(){e.disabled||n.disagreeToOne(t)}),Re(v||(v=E(['"])),n.renderVendorDescription(null===(r=e.items[t])||void 0===r?void 0:r.description)))})))})),b,this.handleSave,g)}}]),n}(We);function am(){for(var e=arguments.length,t=new Array(e),n=0;n
','
"])),nt(S({"tiktok-cookie-banner":!0,"is-rtl":at.includes(n)},r?x({},r,!0):{})),a,this._handleDescClick,c,nt({"button-wrapper":!0,"special-button-wrapper":(null==u?void 0:u.length)>30||(null==d?void 0:d.length)>30}),p?Re(m||(m=E(['"])),this.openSettingModal,p):Ie,this._handleDecline,u,this._handleConfirm,d):Ie;return Re(_||(_=E(["",''])),this.customTheme,v,this.settingVisible,this.settingModalCloseDisabled,this.userConfigEleId,this.locale,(function(){e.settingModalCloseDisabled||(e.settingVisible=!1)}),this._handleSave)}}]),i}(We);lm.styles=ie(Yg),W([rt()],lm.prototype,"locale",void 0),W([rt({attribute:"user-config-ele-id"})],lm.prototype,"userConfigEleId",void 0),W([rt({converter:function(e){return"true"===e}})],lm.prototype,"disabled",void 0),W([rt({attribute:"disabled-access-key"})],lm.prototype,"disabledAccessKey",void 0),W([ot()],lm.prototype,"i18n",void 0),W([ot()],lm.prototype,"userConfig",void 0),W([ot()],lm.prototype,"cookieConsent",void 0),W([ot()],lm.prototype,"disabledByPolicy",void 0),W([ot()],lm.prototype,"settingVisible",void 0),W([ot()],lm.prototype,"settingModalCloseDisabled",void 0),W([ot()],lm.prototype,"forceUpdater",void 0),W([ot()],lm.prototype,"disabledAccessKeyConfig",void 0),W([ot()],lm.prototype,"customTheme",void 0),W([ot()],lm.prototype,"tenantId",void 0),lm=W([it("tiktok-cookie-banner")],lm)}(this.reactJsxRuntime,this.react); //# sourceMappingURL=default.eu-ttp.esm.js.map