!function(){"use strict";var e="main_thread",t="out_app",r="cookie_set_by_document",n="cookie_blocked_on_start",o="general_fetch",i="webapi",a="storage_use",u="sw_incompat",c="proxy_unsupport",s="frequency",l="cost_time",f="__PNS_RUNTIME__",d="__PNS_SW_CACHE__",p="__PNS_SW_CACHE_KEY__",h=Symbol.for("lazyModuleRegistry");function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:g(),r=globalThis[t];return r||(r={pendingEvents:[],pendingConfig:{},pendingListeners:{},errors:[],pushEvent:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,i=arguments.length>3?arguments[3]:void 0;b(r.pendingEvents,{eventName:t,eventDetail:n,source:o,options:i},_)},pushError:function(e){b(r.errors,e,20)},pageContextObservers:[]},globalThis[t]=r),r}function O(){return"undefined"==typeof globalThis}function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g();return O()?null:w(e)}function j(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g(),n=document.createElement("script"),o=new URL(e);return o.search="?globalName=".concat(r,"&").concat(d,"=1&").concat(p,"=").concat(t),n.src=o.toString(),n.crossOrigin="anonymous",n.async=!0,new Promise((function(e,o){n.onload=function(){var n=globalThis[r];if(n){var o=n[h];e((null==o?void 0:o[t])||null)}else e(null)},n.onerror=o,document.head.appendChild(n),document.head.removeChild(n)}))}var k=function(e,t){if("object"!=typeof t)return!1;if("$eq"in t&&e!==t.$eq||"$ne"in t&&e===t.$ne||"$exists"in t&&void 0===e||void 0!==t.$in&&-1===t.$in.indexOf(e)||void 0!==t.$nin&&-1!==t.$nin.indexOf(e))return!1;var r;try{var n;r="string"==typeof e?e:null!==(n=JSON.stringify(e))&&void 0!==n?n:""}catch(e){return!1}return!(void 0!==t.$regex&&!new RegExp(t.$regex,t.$options).test(r)||void 0!==t.$text&&-1===r.indexOf(t.$text)||void 0!==t.$prefix&&!r.startsWith(t.$prefix))},S=function(e){return e&&"function"==typeof e.then};function x(e,t,r){return function(){for(var n=arguments.length,o=new Array(n),i=0;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var d=!1,p=!0,h=!1,v=void 0;try{for(var y,m=n[Symbol.iterator]();!(p=(y=m.next()).done);p=!0){var g=y.value;e.startsWith(g)&&(d=!0)}}catch(e){h=!0,v=e}finally{try{p||null==m.return||m.return()}finally{if(h)throw v}}if(!d)return!0}return!1}(u,{allowlist:n,blocklist:o,enableSameOriginBlock:i})),c)e["x-pns-block"]="1",e._blocked=!0;else if(a){var s;e.request_url=u;var l,f,d,p,h=m(u);e.request_host=null!==(l=null==h?void 0:h.host)&&void 0!==l?l:"",e.request_path=null!==(f=null==h?void 0:h.pathname)&&void 0!==f?f:"",e.search=null!==(d=null==h?void 0:h.search)&&void 0!==d?d:"",null!==(p=(s=e)._replaced_fields)&&void 0!==p||(s._replaced_fields=[]),e._replaced_fields.push("url"),e["x-pns-replace"]="1"}return(c||a)&&(e.rule_name=t.ruleName?"".concat(e.rule_name?"".concat(e.rule_name,","):"").concat(t.ruleName):e.rule_name),e}function G(e,t){var r=encodeURIComponent(t),n=("?"===e[0]?e.slice(1):e).split("&"),o=!0,i=!1,a=void 0;try{for(var u,c=n[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=q(u.value.split("="),2),l=s[0],f=s[1];if(l===r)return decodeURIComponent(f)}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function V(e,t){t.type;var r=t.pattern;switch(t.type){case"body":if(!e._is_json_body)return!1;var n,o=null!==(n=e._parsed_json_body)&&void 0!==n?n:e.body,i=t.field,a=function(e){try{var t=!0,n=!1,o=void 0;try{for(var a,u=i[Symbol.iterator]();!(t=(a=u.next()).done);t=!0){e=e[a.value]}}catch(e){n=!0,o=e}finally{try{t||null==u.return||u.return()}finally{if(n)throw o}}}catch(e){return!1}return!!k(e,r)};return S(o)?o.then(a,(function(){return!1})):a(o);case"url":if(k(e.request_url,r))return!0;break;case"host":if(k(e.request_host,r))return!0;break;case"path":if(k(e.request_path,r))return!0;break;case"search":if(!e.search)return!1;var u=G(e.search,t.field);if(k(u,r))return!0;break;case"header":var c,s;if(k(null!==(s=null===(c=e.header_map)||void 0===c?void 0:c[t.field])&&void 0!==s?s:"",r))return!0;break;case"method":if(k(e.method,r))return!0;break;case"source":if(k(e.source,r))return!0;break;case"destination":if(k(e.destination,r))return!0}return!1}function Y(e,t,r,n,o){switch(t.handler){case"replace":return void 0===t.pattern?t.value:function(e,t,r){if(!k(e,t))return e;if(["$eq","$ne","$exists","$in","$nin"].some((function(e){return e in t})))return r;var n,o="string"==typeof e,i=o?e:null!==(n=JSON.stringify(e))&&void 0!==n?n:"";return void 0!==t.$regex?i=i.replace(new RegExp(t.$regex,t.$options),r):void 0!==t.$text?i=i.replace(t.$text,r):void 0!==t.$prefix&&(i=i.replace(t.$prefix,r)),x((function(){return o?i:JSON.parse(i)}),void 0,e)()}(r(),t.pattern,t.value);case"remove":return n;case"empty":return o}}function K(e,t){var r=e;switch(t.type){case"body":if(!r._is_json_body)return r;var n=t.type,o=t.field,i=function(e){var r,i=void 0===e._parsed_json_body?"body":"_parsed_json_body",a=Y(0,t,(function(){return function(e,t){try{var r=e,n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done);n=!0)r=r[a.value]}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}catch(e){}}(e,[i].concat(B(o)))}),void 0,null);return function(e,t,r){var n=e;try{var o=t.pop(),i=!0,a=!1,u=void 0;try{for(var c,s=t[Symbol.iterator]();!(i=(c=s.next()).done);i=!0)n=n[c.value]}catch(e){a=!0,u=e}finally{try{i||null==s.return||s.return()}finally{if(a)throw u}}n[o]=r}catch(e){}}(e,[i].concat(B(o)),a),e._replaced_fields=B(null!==(r=e._replaced_fields)&&void 0!==r?r:[]).concat([n]),e._modified=!0,e};return S(r.body)?r.body.then((function(e){return r.body=e,r})).then(i):i(r);case"url":var a,u=Y(0,t,(function(){return r.request_url})),c=m(u);r.request_url=u,r.request_host=c.host,r.request_path=c.pathname,r.search=c.search,r._replaced_fields=B(null!==(a=r._replaced_fields)&&void 0!==a?a:[]).concat([t.type]);break;case"host":var s,l=Y(0,t,(function(){return r.request_host}),"",""),f=m(r.request_url);f.host=l,r.request_url=f.href,r.request_host=l,r._replaced_fields=B(null!==(s=r._replaced_fields)&&void 0!==s?s:[]).concat(["url"]);break;case"path":var d,p=Y(0,t,(function(){return r.request_path}),"",""),h=m(r.request_url);h.pathname=p,r.request_url=h.href,r.request_path=p,r._replaced_fields=B(null!==(d=r._replaced_fields)&&void 0!==d?d:[]).concat(["url"]);break;case"search":var v,y=Y(0,t,(function(){return G(r.search,t.field)}),void 0,""),g=function(e,t,r){for(var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=encodeURIComponent(t),i="?"===e[0],a=(i?e.slice(1):e).split("&"),u=!1,c=0;c0&&void 0!==arguments[0]?arguments[0]:location,t=e.href,r=e.host,n=e.pathname,o=e.search,i=e.hash;return{url:t,host:r,path:n,search:o,hash:i}}function ee(){ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ ee=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=_(a,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l={};function f(){}function d(){}function p(){}var h={};u(h,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(j([])));y&&y!==t&&r.call(y,o)&&(h=y);var m=p.prototype=f.prototype=Object.create(h);function g(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(o,i,a,u){var c=s(e[o],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function _(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,l;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function j(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ne(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}var ve=function(){},ye=function(e){return"object"===te(e)&&null!==e},me=function(e){return"string"==typeof e},ge=function(){var e=Object.prototype.hasOwnProperty;return function(t,r){return e.call(t,r)}}(),be=function(e,t,r){ge(e,r)&&(t[r]=e[r])},_e=function(e,t){var r,n={},o=he(t);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(Array.isArray(i)){var a,u=he(i);try{for(u.s();!(a=u.n()).done;){var c=a.value;be(e,n,c)}}catch(e){u.e(e)}finally{u.f()}}else be(e,n,i)}}catch(e){o.e(e)}finally{o.f()}return n};function we(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ve,n=document.createElement("script");n.src=e,"module"===t?n.setAttribute("type","module"):"nomodule"===t&&n.setAttribute("nomodule",""),n.crossOrigin="anonymous",n.onerror=function(){return r(e)},document.body.appendChild(n)}function Oe(){return!(void 0!==window)}function Ee(e,t){return e.replace(/./g,(function(e){return Math.random()>t?"*":e}))}function je(e){return e>Math.random()}function ke(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=(new Error).stack;return null!==(e=null==r?void 0:r.split("\n").slice(t).map((function(e){return e.trim()})).join("\n"))&&void 0!==e?e:""}function Se(e){var t=e.split("=").slice(1).join("=");try{'"'===t[0]&&(t=t.slice(1,-1)),t=t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)}catch(e){}return t}function xe(e,t){var r=w();return x(e,(function(e){return r.pushError(e)}),t)}/iPhone|iPad/.test(navigator.userAgent);function Re(e){var t=document.head.querySelector(e);if(!t)return null;try{var r=t.content.split(",").reduce((function(e,t){var r=le(t.split("="),2),n=r[0],o=r[1];return e[n]=o,e}),{});return r}catch(e){return null}}function Ae(){var e={},t=Re("meta[name=pumbaa-web-config]");if(t)for(var r=0,n=Object.keys(t);r=o&&s.call(this),clearTimeout(c),c=setTimeout(s.bind(this),a)},flushWithBeacon:function(){var e;clearTimeout(c),u.length&&(null===(e=navigator.sendBeacon)||void 0===e||e.call(navigator,this.getEndpoint(),this.getBatchData()),u=[])},getBatchData:function(){return u.length?(e=u,JSON.stringify({ev_type:"batch",list:e})):"";var e},clear:function(){clearTimeout(c),u=[]}}}var We,Je=function(){var e=function(){for(var e=new Array(16),t=0,r=0;r<16;r++)0==(3&r)&&(t=4294967296*Math.random()),e[r]=t>>>((3&r)<<3)&255;return e}();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,function(e){for(var t=[],r=0;r<256;++r)t[r]=(r+256).toString(16).substr(1);var n=0,o=t;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")}(e)},ze=function(){try{return!!window.localStorage}catch(e){return!1}}(),Ge=function(e,t){var r,n,o=e.sampleRate,i=e.valueRate,a=e.stackCollectKeys.map((function(e){return new RegExp(e)})),u={sessionStorage:{setItem:new Set,getItem:new Set},localStorage:{setItem:new Set,getItem:new Set}};return r=function(e){var r,n=e.value,c=$e(e,["value"]),s=c.key,l=c.storageType,f=c.operateType,d=null===(r=u[l])||void 0===r?void 0:r[f];if(d){if(d.has(s))return;d.add(s)}je(i)&&"string"==typeof n&&Object.assign(c,{value:Ee(n,.5)}),s&&a.some((function(e){return e.test(s)}))&&Object.assign(c,{stack:ke(7)}),t.reportCustomizedEvent("storage_use",{},c,{common:{sample_rate:o}})},n=o,function(){if(Math.random()0){var o=Math.max.apply(Math,fe(Object.keys(r).map(Number)))+1,i=Array.from(Object.assign(Object.assign({},r),{length:o})).map((function(e){var t=te(e);return"string"===t?"'".concat(e,"'"):"undefined"===t?"":"".concat(e)})).join(",");n="".concat(n,"(").concat(i,")")}return n}(u.apiObj,u.apiName,u.paramCondition);case Ye:return t=u.url,r=u.method,n=Xe(t.indexOf("#")),o=Xe(t.indexOf("?")),i=Math.min(n,o),a=t.slice(0,i),"".concat(r.toUpperCase()," ").concat(a);default:return""}},Ze=function(){function e(t){var r=this;if(re(this,e),this.reporter=t,this.timeout=Ie().reporter.freqInterval,this.volume=Ie().reporter.freqSize,this.cache={},this.size=0,this.pause=!1,null!==e._instance)return e._instance;e._instance=this,document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(r.clear(),e.withPause(t.flush.bind(t))())}))}return oe(e,[{key:"push",value:function(e){var t,r,n;if(!this.pause){this.size++;var o=Qe(e);null!==(t=(n=this.cache)[o])&&void 0!==t||(n[o]={key:o,ts:[],event_type:e.type,sample_rate:null!==(r=e.eventDetail.freqSampleRate)&&void 0!==r?r:1}),this.cache[o].ts.push(e.time),this.size>=this.volume&&this.clear(),this.resetTimer()}}},{key:"clear",value:function(){var e=this;0!==this.size&&(Object.keys(this.cache).map((function(t){var r=e.cache[t],n=r.key,o=r.ts,i=r.event_type,a=r.sample_rate;return{categories:{key:n,event_type:i,start_time:"".concat(o[0]),call_time:o.slice(1).map((function(e,t,r){var n;return e-(null!==(n=r[t-1])&&void 0!==n?n:o[0])})).join(",")},common:{sample_rate:a}}})).forEach((function(t){var r=t.categories,n=t.common;e.reporter.report(s,{},r,{common:n})})),this.size=0,this.cache={})}},{key:"onTimeout",value:function(){this.clear()}},{key:"resetTimer",value:function(){clearTimeout(this.timeoutID),this.timeoutID=Number(setTimeout(this.onTimeout.bind(this),this.timeout))}}],[{key:"getInstance",value:function(){return e._instance}},{key:"withPause",value:function(t){return Ke?function(){var r=e.getInstance();r&&(r.pause=!0);var n=t.apply(void 0,arguments);return r&&(r.pause=!1),n}:t}}]),e}();function et(e){var t=new Ze(e);return null!=We||(We=function(e){t.push(e)}),We}Ze._instance=null;var tt="/monitor_browser/collect/batch/",rt=function(e){return"HYBRID_SLARDAR_WEB"+e},nt=function(e){try{var t=Ze.withPause(localStorage.getItem.bind(localStorage))(e);if(t&&me(t))return JSON.parse(t)}catch(e){}return null},ot=function(e){var t=e.bid,r=e.userId,n=e.deviceId;!function(e,t){try{var r=me(t)?t:JSON.stringify(t);Ze.withPause(localStorage.setItem.bind(localStorage))(e,r)}catch(e){}}(rt(t),{userId:r,deviceId:n})},it=function(e,t,r){var n=t.url,o=t.data,i=new r;i.open(e,n,!0),i.setRequestHeader("Content-Type","application/json"),i.send(o)},at=function(){if("function"==typeof XMLHttpRequest&&"function"==typeof XMLHttpRequest)return XMLHttpRequest},ut=function(){var e=at();return e?{get:function(t){it("GET",t,e)},post:function(t){it("POST",t,e)}}:{get:ve,post:ve}},ct=function(){return void 0!==window.fetch?{post:function(e){return function(e){var t=e.url,r=e.data;window.fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:r}).catch((function(e){}))}(e)}}:{post:ve}},st=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tt;return e?"".concat(e&&e.indexOf("//")>=0?"":"https://").concat(e).concat(r).concat(t?"?bid=".concat(t):""):""},lt=function(e){try{return me(e)?e:JSON.stringify(e)}catch(e){return"[FAILED_TO_STRINGIFY]:".concat(String(e))}},ft=function(e,t){var r=t.business;if(e&&ye(e)&&e.name&&me(e.name)){var n={name:e.name,type:"event",metrics:{},categories:{}};if("metrics"in e&&ye(e.metrics)){var o=e.metrics,i={};for(var a in o){var u=o[a];"number"==typeof u&&(i[a]=u)}n.metrics=i}if("categories"in e&&ye(e.categories)){var c=e.categories,s={};for(var l in c){var f=c[l];s[l]=lt(f)}n.categories=s}return r&&Object.assign(n.categories,{__business__:r}),n}},dt=function(){return ye(window)?window:null},pt=function(e){return function(e){try{var t=new URL(e),r=t.pathname||"/";return"/"!==r[0]&&(r="/".concat(r)),{url:e,protocol:t.protocol.slice(0,-1),domain:t.hostname,query:t.search.substring(1),path:r,hash:t.hash}}catch(t){return{url:e,protocol:"",domain:"",query:"",path:"",hash:""}}}(e).path};var ht,vt="custom",yt=function(e){var t,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=rt(e),r=nt(t);if(!r){var n={userId:Je(),deviceId:Je()};return ot(Object.assign({bid:e},n)),n}return r}(e.bid);return{pid:pt(location.href),viewId:(t="_","".concat(t,"_").concat(Date.now())),userId:r.userId,release:"1.0.0.841",deviceId:r.deviceId,sessionId:Je(),env:e.env||"production",sample_rate:1}},mt=function(e){var t=Object.assign({},function(e){var t={bid:""};for(var r in e){var n=e[r];t[r.replace(/[A-Z]/g,(function(e){return"_".concat(e.toLowerCase())}))]=n}return t}(e));t=Object.assign(Object.assign(Object.assign({},t),function(){var e,t=dt()&&dt()&&window.location;return t?{url:null===(e=t.href)||void 0===e?void 0:e.split("?")[0],protocol:t.protocol.slice(0,-1),domain:t.hostname,path:t.pathname,query:t.search.substring(1)}:{}}()),{timestamp:Date.now(),sdk_version:"0.0.1",sdk_name:"SDK_SLARDAR_WEB"});var r=Ce(),n=r.ftc,o=r.login;return n&&(t.context=Object.assign(Object.assign({},t.context),{ftc:n})),o&&(t.context=Object.assign(Object.assign({},t.context),{login:o})),t},gt=function(e){if(!(e&&ye(e)&&(t=e,ye(t)&&"bid"in t)))throw new Error("invalid InitConfig, init failed");var t,r=e.wait,n=e.size,o=e.beforeSend,i=$e(e,["wait","size","beforeSend"]),a=yt(i),u=Object.assign(Object.assign({},a),i),c=Me({endpoint:st(u.domain,e.bid),transport:"function"==typeof window.fetch?ct():ut(),wait:r,size:n}),s=function(e){return c.send(e)},l={config:function(e){Object.assign(u,e)},sendEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=ft(e,u);this.report({ev_type:vt,payload:r},t)},report:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){if(e.common||(e.common=Object.assign(Object.assign({},mt(u)),t.common)),!t.bypassHook&&o&&!o(e))return;s(e)}},reportError:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];null!==(t=(r=e.payload).extra)&&void 0!==t||(r.extra={}),e.payload.extra.__business__=u.business,this.report(e,{bypassHook:n})},flush:function(){c.flushWithBeacon()}};return l},bt=["name","message","stack","filename","lineno","colno"],_t=function(e){var t,r;if(r=ht,!((t=e)&&r&&t.message&&t.stack&&t.message===r.message&&t.stack===r.stack))return ht=e,e;ht=e},wt=function(e){if(performance&&"function"==typeof performance.getEntriesByName)return performance.getEntriesByName(e)[0]},Ot=function(){var e,t,r,n,o=["ftc","login","cb_enabled","gtm"],i=function(e){return o.reduce((function(t,r){return void 0===e[r]?t:Object.assign(Object.assign({},t),ie({},r,e[r]))}),{})},a=Le().pageContext,u={ref:i(a)};return e=function(e){u.ref=i(e)},t=o,n=w(),null!==(r=n.pageContextObservers)&&void 0!==r||(n.pageContextObservers=[]),n.pageContextObservers.push({func:e,fields:t}),u},Et=function(){function e(t){var r=this;re(this,e),this.handleOpt=function(e){var t;return Object.assign(Object.assign({},e),{common:Object.assign(Object.assign({},null==e?void 0:e.common),{context:Object.assign(Object.assign({},r.ctx.ref),null===(t=e.common)||void 0===t?void 0:t.context)})})},this.report=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r.client?r.client.sendEvent({name:e,metrics:t,categories:n},r.handleOpt(o)):N.warn("[Reporter] Not ready to report.")},this.reportCustomizedEvent=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r.client?r.client.sendEvent({name:e,metrics:t,categories:n},r.handleOpt(o)):N.warn("[Reporter] Not ready to report.")},this.reportAbnormality=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.client?r.client.sendEvent({name:"framework_abnormality",metrics:{count:1},categories:{abnormal_type:e,message:null!=t?t:""}},r.handleOpt(n)):N.warn("[Reporter] Not ready to report.")},this.reportError=function(e){if(r.client){if(e instanceof Error){if(!_t(e))return;r.client.reportError({ev_type:"js_error",payload:{error:bt.reduce((function(t,r){return t[r]=null==e?void 0:e[r],t}),{}),breadcrumbs:[]}})}else if(e instanceof Event){var t="string"!=typeof e?e.target||e.srcElement:null;if(!t)return;var n=t.tagName;if(!n||"string"!=typeof n)return;var o=t.src,i={type:"script",url:o,timing:wt(o)};r.client.reportError({ev_type:"resource_error",payload:i})}}else N.warn("[Reporter] Not ready to report.")},this.client=gt(Object.assign({bid:He.bid,env:"production"},t)),this.ctx=Ot(),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&r.client.flush()}))}return oe(e,[{key:"config",value:function(e){this.client.config(e)}},{key:"reportPerf",value:function(e){var t;this.client?(t="string"==typeof e?wt(e):e)&&this.client.report({ev_type:"resource",payload:t}):N.warn("[Reporter] Not ready to report.")}},{key:"reportPreloadScript",value:function(){if(performance&&"function"==typeof performance.getEntriesByType){var e=performance.getEntriesByType("resource").filter((function(e){return String.prototype.includes.call(e.name,"tiktok_privacy_protection_framework")}));e.length>0&&this.reportPerf(e[0])}}},{key:"flush",value:function(){this.client.flush()}}]),e}(),jt={va:"https://api-pns-va.tiktok.com",sg:"https://api-pns-sg.tiktok.com","us-ttp":"https://api-pns.tiktokw.us"};function kt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var St,xt={exports:{}},Rt={exports:{}},At=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n0;)a[i=n[o]]||(t[i]=e[i],a[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Nt,kindOfTest:Pt,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;var t=e.length;if(It(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:Gt,isFileList:Ft},Yt=Vt;function Kt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Xt=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(Yt.isURLSearchParams(t))n=t.toString();else{var o=[];Yt.forEach(t,(function(e,t){null!=e&&(Yt.isArray(e)?t+="[]":e=[e],Yt.forEach(e,(function(e){Yt.isDate(e)?e=e.toISOString():Yt.isObject(e)&&(e=JSON.stringify(e)),o.push(Kt(t)+"="+Kt(e))})))})),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},Qt=Vt;function Zt(){this.handlers=[]}Zt.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},Zt.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},Zt.prototype.forEach=function(e){Qt.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var er,tr,rr=Zt,nr=Vt;function or(){if(tr)return er;tr=1;var e=Vt;function t(e,t,r,n,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}e.inherits(t,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 r=t.prototype,n={};return["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){n[e]={value:e}})),Object.defineProperties(t,n),Object.defineProperty(r,"isAxiosError",{value:!0}),t.from=function(n,o,i,a,u,c){var s=Object.create(r);return e.toFlatObject(n,s,(function(e){return e!==Error.prototype})),t.call(s,n.message,o,i,a,u),s.name=n.name,c&&Object.assign(s,c),s},er=t}var ir,ar,ur,cr,sr,lr,fr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};function dr(){if(ar)return ir;ar=1;var e=Vt;return ir=function(t,r){r=r||new FormData;var n=[];function o(t){return null===t?"":e.isDate(t)?t.toISOString():e.isArrayBuffer(t)||e.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}return function t(i,a){if(e.isPlainObject(i)||e.isArray(i)){if(-1!==n.indexOf(i))throw Error("Circular reference detected in "+a);n.push(i),e.forEach(i,(function(n,i){if(!e.isUndefined(n)){var u,c=a?a+"."+i:i;if(n&&!a&&"object"==typeof n)if(e.endsWith(i,"{}"))n=JSON.stringify(n);else if(e.endsWith(i,"[]")&&(u=e.toArray(n)))return void u.forEach((function(t){!e.isUndefined(t)&&r.append(c,o(t))}));t(n,c)}})),n.pop()}else r.append(a,o(i))}(t),r},ir}function pr(){if(cr)return ur;cr=1;var e=or();return ur=function(t,r,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?r(new e("Request failed with status code "+n.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}}function hr(){if(lr)return sr;lr=1;var e=Vt;return sr=e.isStandardBrowserEnv()?{write:function(t,r,n,o,i,a){var u=[];u.push(t+"="+encodeURIComponent(r)),e.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),e.isString(o)&&u.push("path="+o),e.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.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(){}}}var vr,yr,mr,gr,br,_r,wr,Or,Er,jr,kr,Sr,xr=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},Rr=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},Ar=function(e,t){return e&&!xr(t)?Rr(e,t):t};function Cr(){if(yr)return vr;yr=1;var e=Vt,t=["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"];return vr=function(r){var n,o,i,a={};return r?(e.forEach(r.split("\n"),(function(r){if(i=r.indexOf(":"),n=e.trim(r.substr(0,i)).toLowerCase(),o=e.trim(r.substr(i+1)),n){if(a[n]&&t.indexOf(n)>=0)return;a[n]="set-cookie"===n?(a[n]?a[n]:[]).concat([o]):a[n]?a[n]+", "+o:o}})),a):a}}function Tr(){if(gr)return mr;gr=1;var e=Vt;return mr=e.isStandardBrowserEnv()?function(){var t,r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var t=e;return r&&(n.setAttribute("href",t),t=n.href),n.setAttribute("href",t),{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 t=o(window.location.href),function(r){var n=e.isString(r)?o(r):r;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}}function Nr(){if(_r)return br;_r=1;var e=or();function t(t){e.call(this,null==t?"canceled":t,e.ERR_CANCELED),this.name="CanceledError"}return Vt.inherits(t,e,{__CANCEL__:!0}),br=t}function Pr(){return Or?wr:(Or=1,wr=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""})}function Lr(){if(jr)return Er;jr=1;var e=Vt,t=pr(),r=hr(),n=Xt,o=Ar,i=Cr(),a=Tr(),u=fr,c=or(),s=Nr(),l=Pr();return Er=function(f){return new Promise((function(d,p){var h,v=f.data,y=f.headers,m=f.responseType;function g(){f.cancelToken&&f.cancelToken.unsubscribe(h),f.signal&&f.signal.removeEventListener("abort",h)}e.isFormData(v)&&e.isStandardBrowserEnv()&&delete y["Content-Type"];var b=new XMLHttpRequest;if(f.auth){var _=f.auth.username||"",w=f.auth.password?unescape(encodeURIComponent(f.auth.password)):"";y.Authorization="Basic "+btoa(_+":"+w)}var O=o(f.baseURL,f.url);function E(){if(b){var e="getAllResponseHeaders"in b?i(b.getAllResponseHeaders()):null,r={data:m&&"text"!==m&&"json"!==m?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:e,config:f,request:b};t((function(e){d(e),g()}),(function(e){p(e),g()}),r),b=null}}if(b.open(f.method.toUpperCase(),n(O,f.params,f.paramsSerializer),!0),b.timeout=f.timeout,"onloadend"in b?b.onloadend=E:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(E)},b.onabort=function(){b&&(p(new c("Request aborted",c.ECONNABORTED,f,b)),b=null)},b.onerror=function(){p(new c("Network Error",c.ERR_NETWORK,f,b,b)),b=null},b.ontimeout=function(){var e=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded",t=f.transitional||u;f.timeoutErrorMessage&&(e=f.timeoutErrorMessage),p(new c(e,t.clarifyTimeoutError?c.ETIMEDOUT:c.ECONNABORTED,f,b)),b=null},e.isStandardBrowserEnv()){var j=(f.withCredentials||a(O))&&f.xsrfCookieName?r.read(f.xsrfCookieName):void 0;j&&(y[f.xsrfHeaderName]=j)}"setRequestHeader"in b&&e.forEach(y,(function(e,t){void 0===v&&"content-type"===t.toLowerCase()?delete y[t]:b.setRequestHeader(t,e)})),e.isUndefined(f.withCredentials)||(b.withCredentials=!!f.withCredentials),m&&"json"!==m&&(b.responseType=f.responseType),"function"==typeof f.onDownloadProgress&&b.addEventListener("progress",f.onDownloadProgress),"function"==typeof f.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",f.onUploadProgress),(f.cancelToken||f.signal)&&(h=function(e){b&&(p(!e||e&&e.type?new s:e),b.abort(),b=null)},f.cancelToken&&f.cancelToken.subscribe(h),f.signal&&(f.signal.aborted?h():f.signal.addEventListener("abort",h))),v||(v=null);var k=l(O);k&&-1===["http","https","file"].indexOf(k)?p(new c("Unsupported protocol "+k+":",c.ERR_BAD_REQUEST,f)):b.send(v)}))},Er}var Ir=Vt,Dr=function(e,t){nr.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},qr=or(),Br=fr,Ur=dr(),Hr={"Content-Type":"application/x-www-form-urlencoded"};function $r(e,t){!Ir.isUndefined(e)&&Ir.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Fr,Mr={transitional:Br,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(Fr=Lr()),Fr),transformRequest:[function(e,t){if(Dr(t,"Accept"),Dr(t,"Content-Type"),Ir.isFormData(e)||Ir.isArrayBuffer(e)||Ir.isBuffer(e)||Ir.isStream(e)||Ir.isFile(e)||Ir.isBlob(e))return e;if(Ir.isArrayBufferView(e))return e.buffer;if(Ir.isURLSearchParams(e))return $r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,n=Ir.isObject(e),o=t&&t["Content-Type"];if((r=Ir.isFileList(e))||n&&"multipart/form-data"===o){var i=this.env&&this.env.FormData;return Ur(r?{"files[]":e}:e,i&&new i)}return n||"application/json"===o?($r(t,"application/json"),function(e,t,r){if(Ir.isString(e))try{return(t||JSON.parse)(e),Ir.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Mr.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||n&&Ir.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw qr.from(e,qr.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:Sr?kr:(Sr=1,kr=null)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Ir.forEach(["delete","get","head"],(function(e){Mr.headers[e]={}})),Ir.forEach(["post","put","patch"],(function(e){Mr.headers[e]=Ir.merge(Hr)}));var Wr,Jr,zr=Mr,Gr=Vt,Vr=zr;function Yr(){return Jr?Wr:(Jr=1,Wr=function(e){return!(!e||!e.__CANCEL__)})}var Kr=Vt,Xr=function(e,t,r){var n=this||Vr;return Gr.forEach(r,(function(r){e=r.call(n,e,t)})),e},Qr=Yr(),Zr=zr,en=Nr();function tn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new en}var rn,nn,on=Vt,an=function(e,t){t=t||{};var r={};function n(e,t){return on.isPlainObject(e)&&on.isPlainObject(t)?on.merge(e,t):on.isPlainObject(t)?on.merge({},t):on.isArray(t)?t.slice():t}function o(r){return on.isUndefined(t[r])?on.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function i(e){if(!on.isUndefined(t[e]))return n(void 0,t[e])}function a(r){return on.isUndefined(t[r])?on.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function u(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var c={url:i,method:i,data:i,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:u};return on.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,n=t(e);on.isUndefined(n)&&t!==u||(r[e]=n)})),r};function un(){return nn?rn:(nn=1,rn={version:"0.27.2"})}var cn=un().version,sn=or(),ln={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){ln[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var fn={};ln.transitional=function(e,t,r){return function(n,o,i){if(!1===e)throw new sn(function(e,t){return"[Axios v"+cn+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}(o," has been removed"+(t?" in "+t:"")),sn.ERR_DEPRECATED);return t&&!fn[o]&&(fn[o]=!0),!e||e(n,o,i)}};var dn,pn,hn,vn,yn,mn,gn={assertOptions:function(e,t,r){if("object"!=typeof e)throw new sn("options must be an object",sn.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var u=e[i],c=void 0===u||a(u,i,e);if(!0!==c)throw new sn("option "+i+" must be "+c,sn.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new sn("Unknown option "+i,sn.ERR_BAD_OPTION)}},validators:ln},bn=Vt,_n=Xt,wn=rr,On=function(e){return tn(e),e.headers=e.headers||{},e.data=Xr.call(e,e.data,e.headers,e.transformRequest),e.headers=Kr.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Kr.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||Zr.adapter)(e).then((function(t){return tn(e),t.data=Xr.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return Qr(t)||(tn(e),t&&t.response&&(t.response.data=Xr.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},En=an,jn=Ar,kn=gn,Sn=kn.validators;function xn(e){this.defaults=e,this.interceptors={request:new wn,response:new wn}}xn.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=En(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&kn.assertOptions(r,{silentJSONParsing:Sn.transitional(Sn.boolean),forcedJSONParsing:Sn.transitional(Sn.boolean),clarifyTimeoutError:Sn.transitional(Sn.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!o){var u=[On,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),i=Promise.resolve(t);u.length;)i=i.then(u.shift(),u.shift());return i}for(var c=t;n.length;){var s=n.shift(),l=n.shift();try{c=s(c)}catch(e){l(e);break}}try{i=On(c)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},xn.prototype.getUri=function(e){e=En(this.defaults,e);var t=jn(e.baseURL,e.url);return _n(t,e.params,e.paramsSerializer)},bn.forEach(["delete","get","head","options"],(function(e){xn.prototype[e]=function(t,r){return this.request(En(r||{},{method:e,url:t,data:(r||{}).data}))}})),bn.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(En(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}xn.prototype[e]=t(),xn.prototype[e+"Form"]=t(!0)}));var Rn=Vt,An=At,Cn=xn,Tn=an;var Nn=function e(t){var r=new Cn(t),n=An(Cn.prototype.request,r);return Rn.extend(n,Cn.prototype,r),Rn.extend(n,r),n.create=function(r){return e(Tn(t,r))},n}(zr);Nn.Axios=Cn,Nn.CanceledError=Nr(),Nn.CancelToken=function(){if(pn)return dn;pn=1;var e=Nr();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var r;this.promise=new Promise((function(e){r=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t0&&e.switcher.callbackEnabled.freq&&(null===(i=(o=e.switcher.callback).freq)||void 0===i||i.call(o,a)))}),100)}}})),e.isBufferedEntry=!1}xe((function(e){var t={isBufferedEntry:!0,securityPolicyViolationURLs:function(){var e=[];return document.addEventListener("securitypolicyviolation",(function(t){var r=m(t.blockedURI);r&&"report"!==t.disposition&&-1===e.indexOf(r.href)&&(100===e.length&&e.shift(),e.push(r.href))})),e}(),switcher:e},r=ao?new PerformanceObserver((function(e){return co(t,e)})):null;try{null==r||r.observe({type:"resource",buffered:!0})}catch(e){co(t,{getEntries:function(){return performance.getEntriesByType("resource")}}),null==r||r.observe({entryTypes:["resource"]})}}));var so=function(e,t,r){var n,i,a=e.fpBody,c=void 0===a?0:a,l=e.rawVal,f=void 0===l?[]:l,d=r.sw,p=r.region,h=t.getReporter();!function(){Fe(this,void 0,void 0,ee().mark((function e(){var t,r;return ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=document.currentScript?document.currentScript.src.split("/").slice(0,-1).join("/"):""){e.next=3;break}return e.abrupt("return");case 3:return r="".concat(t,"/devtools.js"),e.prev=4,e.next=7,j(r,"to-json-schema");case 7:n=e.sent,e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),h.reportError(e.t0);case 13:case"end":return e.stop()}}),e,null,[[4,10]])})))}(),navigator&&"serviceWorker"in navigator&&d&&navigator.serviceWorker.register((i=d,i.startsWith("http")?i:"".concat(location.origin).concat(i))).then((function(e){return e.active})).catch((function(e){var t;h.report("sw_register_fail",{count:1},{reason:null!==(t=null==e?void 0:e.message)&&void 0!==t?t:""})})),t.registerHandler(o,xe((function(e,t,r){var o,i,a,u,s=null==e?void 0:e.eventDetail;if(s){var l=s.body,d=s.contentType,v=void 0===d?null!==(i=null===(o=s.header_map)||void 0===o?void 0:o["content-type"])&&void 0!==i?i:"":d,y=s.request_host,m=s.request_url,g=s.header_map,b=s.search,_=$e(s,["body","contentType","request_host","request_url","header_map","search"]);g=function(e){var t={};for(var r in e){var n=e[r];W(r,n)||(t[r]=n)}return t}(null!=g?g:{}),_.header_names=Object.keys(g).join(",");var w="",O="";if(y!==He.domain||-1===b.indexOf(He.bid)){var E,j;if(_.rule_name&&-1!==_.rule_name.indexOf(",")&&(_.rule_name=(E=_.rule_name.split(","),j=E.reduce((function(e,t){return e[t]=null,e}),{}),Object.keys(j)).join(",")),v&&l&&(!oo.some((function(e){return y.endsWith(e)}))||je(c))){var k=_.source===$&&"string"==typeof l;if((k||-1!==v.indexOf("application/json"))&&n){var S;try{S="string"==typeof l?JSON.parse(l):JSON.parse(JSON.stringify(l))}catch(e){if(!k)throw e}void 0!==S&&(w=JSON.stringify(n(S,function(e,t){var r,n=[],o=he(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;i.endpoint.indexOf(t)>-1&&n.push.apply(n,fe(i.keyPath.map((function(e){return e.split(".")}))))}}catch(e){o.e(e)}finally{o.f()}return n}(f,m.split("?")[0]))))}else if(v.includes("application/x-www-form-urlencoded")||v.includes("multipart/form-data")||l instanceof FormData||l instanceof URLSearchParams){var x=[];"function"==typeof l.forEach?l.forEach((function(e,t){x.push(t)})):"object"===te(l)&&x.push.apply(x,fe(Object.keys(l))),O=x.join(",")}}for(var R={region:null!=p?p:"",sw_version:null!==(a=null==e?void 0:e.sw_version)&&void 0!==a?a:"",request_content_type:null!=v?v:"",request_json_body:w,request_form_keys:O,request_host:y,request_url:m,header_map:JSON.stringify(g)},A=0,C=Object.keys(_);A2&&void 0!==arguments[2]?arguments[2]:e,i=arguments.length>3?arguments[3]:void 0,a={eventName:t,eventDetail:r,source:o,options:i},u=this.eventHandlers[a.eventName]||[],c=he(u);try{for(c.s();!(n=c.n()).done;){var s=n.value;xe(s)(a.eventDetail,a.source,a.options)}}catch(e){c.e(e)}finally{c.f()}}},{key:"init",value:function(){var e=E();if(!e)return N.warn("monitor exit due to no global context"),void this.reporter.reportAbnormality(De);e.pushEvent=this.dispatchEvent.bind(this),e.pushError=this.reporter.reportError.bind(this.reporter);for(var t=e.pendingEvents,r=void 0===t?[]:t,n=e.errors,o=void 0===n?[]:n;null==r?void 0:r.length;){var i=r.shift();this.dispatchEvent(i.eventName,i.eventDetail,i.source,i.options)}for(;null==o?void 0:o.length;){var a=o.shift();this.reporter.reportError(a)}this.reporter.reportPreloadScript()}},{key:"registerDefaultHandlers",value:function(){var e=this;this.registerHandler(l,(function(t){e.reporter.reportCustomizedEvent(l,t.metrics,t.categories)}))}}]),t}();function po(e,t){var r=new fo(t),n=Ie(),o=n.cookie,i=n.storage,u=(n.webapi,n.network);ro(o,r),function(e,t){ze&&t.registerHandler(a,Ge(e,t.getReporter()))}(i,r),no(0,r),so(u,r,e),lo(r),r.init()}try{!function(e,r){return function(){var n=Date.now(),o=e.apply(void 0,arguments);return w().pushEvent(l,{metrics:{time:Date.now()-n},categories:{version:"1.0.0.841",runtime_env:t,module:r}}),o}}((function(){var e=w(),t=Ae(),r=t.business,n=t.env,o=t.region;if(o){He.setRegion(o);var i=He.domain,a=Ie().reporter,u=new Et({domain:i,wait:null==a?void 0:a.interval,size:null==a?void 0:a.size});u.config({business:r,env:n}),to(e,t,u),po(t,u)}}),"core")()}catch(e){P.error("[PumbaaWeb] core execute failed. Errors below.",e)}}();