@flagship.io/react-sdk 2.2.0-alpha.7 → 2.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/FlagshipContext.js +229 -0
- package/dist/es/FlagshipHooks.js +363 -0
- package/dist/es/index.js +3 -0
- package/dist/es/utils.js +46 -0
- package/dist/esm/FlagshipContext.js +251 -0
- package/dist/esm/FlagshipHooks.js +538 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/utils.js +46 -0
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/FlagshipContext.d.ts +80 -0
- package/dist/types/FlagshipHooks.d.ts +89 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/utils.d.ts +5 -0
- package/package.json +5 -3
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var t={6968:(t,e,n)=>{(()=>{"use strict";var e={271:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});var r=n(834);class o extends r.EventTarget{constructor(){throw super(),new TypeError("AbortSignal cannot be constructed directly")}get aborted(){const t=i.get(this);if("boolean"!=typeof t)throw new TypeError("Expected 'this' to be an 'AbortSignal' object, but got "+(null===this?"null":typeof this));return t}}r.defineEventAttribute(o.prototype,"abort");const i=new WeakMap;Object.defineProperties(o.prototype,{aborted:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(o.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class a{constructor(){s.set(this,function(){const t=Object.create(o.prototype);return r.EventTarget.call(t),i.set(t,!1),t}())}get signal(){return c(this)}abort(){var t;t=c(this),!1===i.get(t)&&(i.set(t,!0),t.dispatchEvent({type:"abort"}))}}const s=new WeakMap;function c(t){const e=s.get(t);if(null==e)throw new TypeError("Expected 'this' to be an 'AbortController' object, but got "+(null===t?"null":typeof t));return e}Object.defineProperties(a.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(a.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"}),e.AbortController=a,e.AbortSignal=o,e.default=a,t.exports=a,t.exports.AbortController=t.exports.default=a,t.exports.AbortSignal=o},505:(t,e,r)=>{r.d(e,{ZP:()=>W});const o=n(2781);var i=r(605);const a=n(7310);var s=r(211);const c=n(9796),u=o.Readable,f=Symbol("buffer"),l=Symbol("type");class p{constructor(){this[l]="";const t=arguments[0],e=arguments[1],n=[];let r=0;if(t){const e=t,o=Number(e.length);for(let t=0;t<o;t++){const o=e[t];let i;i=o instanceof Buffer?o:ArrayBuffer.isView(o)?Buffer.from(o.buffer,o.byteOffset,o.byteLength):o instanceof ArrayBuffer?Buffer.from(o):o instanceof p?o[f]:Buffer.from("string"==typeof o?o:String(o)),r+=i.length,n.push(i)}}this[f]=Buffer.concat(n);let o=e&&void 0!==e.type&&String(e.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[l]=o)}get size(){return this[f].length}get type(){return this[l]}text(){return Promise.resolve(this[f].toString())}arrayBuffer(){const t=this[f],e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return Promise.resolve(e)}stream(){const t=new u;return t._read=function(){},t.push(this[f]),t.push(null),t}toString(){return"[object Blob]"}slice(){const t=this.size,e=arguments[0],n=arguments[1];let r,o;r=void 0===e?0:e<0?Math.max(t+e,0):Math.min(e,t),o=void 0===n?t:n<0?Math.max(t+n,0):Math.min(n,t);const i=Math.max(o-r,0),a=this[f].slice(r,r+i),s=new p([],{type:arguments[2]});return s[f]=a,s}}function h(t,e,n){Error.call(this,t),this.message=t,this.type=e,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let d;Object.defineProperties(p.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(p.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),h.prototype=Object.create(Error.prototype),h.prototype.constructor=h,h.prototype.name="FetchError";try{d=Object(function(){var t=new Error("Cannot find module 'encoding'");throw t.code="MODULE_NOT_FOUND",t}())}catch(t){}const y=Symbol("Body internals"),g=o.PassThrough;function v(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.size;let i=void 0===r?0:r;var a=n.timeout;let s=void 0===a?0:a;null==t?t=null:m(t)?t=Buffer.from(t.toString()):w(t)||Buffer.isBuffer(t)||("[object ArrayBuffer]"===Object.prototype.toString.call(t)?t=Buffer.from(t):ArrayBuffer.isView(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof o||(t=Buffer.from(String(t)))),this[y]={body:t,disturbed:!1,error:null},this.size=i,this.timeout=s,t instanceof o&&t.on("error",(function(t){const n="AbortError"===t.name?t:new h(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t);e[y].error=n}))}function b(){var t=this;if(this[y].disturbed)return v.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[y].disturbed=!0,this[y].error)return v.Promise.reject(this[y].error);let e=this.body;if(null===e)return v.Promise.resolve(Buffer.alloc(0));if(w(e)&&(e=e.stream()),Buffer.isBuffer(e))return v.Promise.resolve(e);if(!(e instanceof o))return v.Promise.resolve(Buffer.alloc(0));let n=[],r=0,i=!1;return new v.Promise((function(o,a){let s;t.timeout&&(s=setTimeout((function(){i=!0,a(new h(`Response timeout while trying to fetch ${t.url} (over ${t.timeout}ms)`,"body-timeout"))}),t.timeout)),e.on("error",(function(e){"AbortError"===e.name?(i=!0,a(e)):a(new h(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e))})),e.on("data",(function(e){if(!i&&null!==e){if(t.size&&r+e.length>t.size)return i=!0,void a(new h(`content size at ${t.url} over limit: ${t.size}`,"max-size"));r+=e.length,n.push(e)}})),e.on("end",(function(){if(!i){clearTimeout(s);try{o(Buffer.concat(n,r))}catch(e){a(new h(`Could not create Buffer from response body for ${t.url}: ${e.message}`,"system",e))}}}))}))}function m(t){return"object"==typeof t&&"function"==typeof t.append&&"function"==typeof t.delete&&"function"==typeof t.get&&"function"==typeof t.getAll&&"function"==typeof t.has&&"function"==typeof t.set&&("URLSearchParams"===t.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(t)||"function"==typeof t.sort)}function w(t){return"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}function O(t){let e,n,r=t.body;if(t.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof o&&"function"!=typeof r.getBoundary&&(e=new g,n=new g,r.pipe(e),r.pipe(n),t[y].body=e,r=n),r}function _(t){return null===t?null:"string"==typeof t?"text/plain;charset=UTF-8":m(t)?"application/x-www-form-urlencoded;charset=UTF-8":w(t)?t.type||null:Buffer.isBuffer(t)||"[object ArrayBuffer]"===Object.prototype.toString.call(t)||ArrayBuffer.isView(t)?null:"function"==typeof t.getBoundary?`multipart/form-data;boundary=${t.getBoundary()}`:t instanceof o?null:"text/plain;charset=UTF-8"}function x(t){const e=t.body;return null===e?0:w(e)?e.size:Buffer.isBuffer(e)?e.length:e&&"function"==typeof e.getLengthSync&&(e._lengthRetrievers&&0==e._lengthRetrievers.length||e.hasKnownLength&&e.hasKnownLength())?e.getLengthSync():null}v.prototype={get body(){return this[y].body},get bodyUsed(){return this[y].disturbed},arrayBuffer(){return b.call(this).then((function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}))},blob(){let t=this.headers&&this.headers.get("content-type")||"";return b.call(this).then((function(e){return Object.assign(new p([],{type:t.toLowerCase()}),{[f]:e})}))},json(){var t=this;return b.call(this).then((function(e){try{return JSON.parse(e.toString())}catch(e){return v.Promise.reject(new h(`invalid json response body at ${t.url} reason: ${e.message}`,"invalid-json"))}}))},text(){return b.call(this).then((function(t){return t.toString()}))},buffer(){return b.call(this)},textConverted(){var t=this;return b.call(this).then((function(e){return function(t,e){if("function"!=typeof d)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=e.get("content-type");let r,o,i="utf-8";return n&&(r=/charset=([^;]*)/i.exec(n)),o=t.slice(0,1024).toString(),!r&&o&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(o)),!r&&o&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(o),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(o),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop()))),!r&&o&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(o)),r&&(i=r.pop(),"gb2312"!==i&&"gbk"!==i||(i="gb18030")),d(t,"UTF-8",i).toString()}(e,t.headers)}))}},Object.defineProperties(v.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),v.mixIn=function(t){for(const e of Object.getOwnPropertyNames(v.prototype))if(!(e in t)){const n=Object.getOwnPropertyDescriptor(v.prototype,e);Object.defineProperty(t,e,n)}},v.Promise=global.Promise;const S=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,I=/[^\t\x20-\x7e\x80-\xff]/;function E(t){if(t=`${t}`,S.test(t)||""===t)throw new TypeError(`${t} is not a legal HTTP header name`)}function C(t){if(t=`${t}`,I.test(t))throw new TypeError(`${t} is not a legal HTTP header value`)}function M(t,e){e=e.toLowerCase();for(const n in t)if(n.toLowerCase()===e)return n}const P=Symbol("map");class A{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[P]=Object.create(null),t instanceof A){const e=t.raw(),n=Object.keys(e);for(const t of n)for(const n of e[t])this.append(t,n)}else if(null==t);else{if("object"!=typeof t)throw new TypeError("Provided initializer must be an object");{const e=t[Symbol.iterator];if(null!=e){if("function"!=typeof e)throw new TypeError("Header pairs must be iterable");const n=[];for(const e of t){if("object"!=typeof e||"function"!=typeof e[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(e))}for(const t of n){if(2!==t.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(t[0],t[1])}}else for(const e of Object.keys(t)){const n=t[e];this.append(e,n)}}}}get(t){E(t=`${t}`);const e=M(this[P],t);return void 0===e?null:this[P][e].join(", ")}forEach(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=j(this),r=0;for(;r<n.length;){var o=n[r];const i=o[0],a=o[1];t.call(e,a,i,this),n=j(this),r++}}set(t,e){e=`${e}`,E(t=`${t}`),C(e);const n=M(this[P],t);this[P][void 0!==n?n:t]=[e]}append(t,e){e=`${e}`,E(t=`${t}`),C(e);const n=M(this[P],t);void 0!==n?this[P][n].push(e):this[P][t]=[e]}has(t){return E(t=`${t}`),void 0!==M(this[P],t)}delete(t){E(t=`${t}`);const e=M(this[P],t);void 0!==e&&delete this[P][e]}raw(){return this[P]}keys(){return k(this,"key")}values(){return k(this,"value")}[Symbol.iterator](){return k(this,"key+value")}}function j(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";const n=Object.keys(t[P]).sort();return n.map("key"===e?function(t){return t.toLowerCase()}:"value"===e?function(e){return t[P][e].join(", ")}:function(e){return[e.toLowerCase(),t[P][e].join(", ")]})}A.prototype.entries=A.prototype[Symbol.iterator],Object.defineProperty(A.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(A.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const T=Symbol("internal");function k(t,e){const n=Object.create(N);return n[T]={target:t,kind:e,index:0},n}const N=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==N)throw new TypeError("Value of `this` is not a HeadersIterator");var t=this[T];const e=t.target,n=t.kind,r=t.index,o=j(e,n);return r>=o.length?{value:void 0,done:!0}:(this[T].index=r+1,{value:o[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function R(t){const e=Object.assign({__proto__:null},t[P]),n=M(t[P],"Host");return void 0!==n&&(e[n]=e[n][0]),e}Object.defineProperty(N,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const L=Symbol("Response internals"),D=i.STATUS_CODES;class F{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v.call(this,t,e);const n=e.status||200,r=new A(e.headers);if(null!=t&&!r.has("Content-Type")){const e=_(t);e&&r.append("Content-Type",e)}this[L]={url:e.url,status:n,statusText:e.statusText||D[n],headers:r,counter:e.counter}}get url(){return this[L].url||""}get status(){return this[L].status}get ok(){return this[L].status>=200&&this[L].status<300}get redirected(){return this[L].counter>0}get statusText(){return this[L].statusText}get headers(){return this[L].headers}clone(){return new F(O(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}v.mixIn(F.prototype),Object.defineProperties(F.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(F.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const G=Symbol("Request internals"),B=a.parse,V=a.format,H="destroy"in o.Readable.prototype;function z(t){return"object"==typeof t&&"object"==typeof t[G]}class U{constructor(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};z(t)?e=B(t.url):(e=t&&t.href?B(t.href):B(`${t}`),t={});let r=n.method||t.method||"GET";if(r=r.toUpperCase(),(null!=n.body||z(t)&&null!==t.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let o=null!=n.body?n.body:z(t)&&null!==t.body?O(t):null;v.call(this,o,{timeout:n.timeout||t.timeout||0,size:n.size||t.size||0});const i=new A(n.headers||t.headers||{});if(null!=o&&!i.has("Content-Type")){const t=_(o);t&&i.append("Content-Type",t)}let a=z(t)?t.signal:null;if("signal"in n&&(a=n.signal),null!=a&&!function(t){const e=t&&"object"==typeof t&&Object.getPrototypeOf(t);return!(!e||"AbortSignal"!==e.constructor.name)}(a))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[G]={method:r,redirect:n.redirect||t.redirect||"follow",headers:i,parsedURL:e,signal:a},this.follow=void 0!==n.follow?n.follow:void 0!==t.follow?t.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===t.compress||t.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent}get method(){return this[G].method}get url(){return V(this[G].parsedURL)}get headers(){return this[G].headers}get redirect(){return this[G].redirect}get signal(){return this[G].signal}clone(){return new U(this)}}function K(t){Error.call(this,t),this.type="aborted",this.message=t,Error.captureStackTrace(this,this.constructor)}v.mixIn(U.prototype),Object.defineProperty(U.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(U.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),K.prototype=Object.create(Error.prototype),K.prototype.constructor=K,K.prototype.name="AbortError";const $=o.PassThrough,Y=a.resolve;function q(t,e){if(!q.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return v.Promise=q.Promise,new q.Promise((function(n,r){const a=new U(t,e),u=function(t){const e=t[G].parsedURL,n=new A(t[G].headers);if(n.has("Accept")||n.set("Accept","*/*"),!e.protocol||!e.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(e.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(t.signal&&t.body instanceof o.Readable&&!H)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let r=null;if(null==t.body&&/^(POST|PUT)$/i.test(t.method)&&(r="0"),null!=t.body){const e=x(t);"number"==typeof e&&(r=String(e))}r&&n.set("Content-Length",r),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),t.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let i=t.agent;return"function"==typeof i&&(i=i(e)),n.has("Connection")||i||n.set("Connection","close"),Object.assign({},e,{method:t.method,headers:R(n),agent:i})}(a),f=("https:"===u.protocol?s:i).request,l=a.signal;let p=null;const d=function(){let t=new K("The user aborted a request.");r(t),a.body&&a.body instanceof o.Readable&&a.body.destroy(t),p&&p.body&&p.body.emit("error",t)};if(l&&l.aborted)return void d();const y=function(){d(),b()},g=f(u);let v;function b(){g.abort(),l&&l.removeEventListener("abort",y),clearTimeout(v)}l&&l.addEventListener("abort",y),a.timeout&&g.once("socket",(function(t){v=setTimeout((function(){r(new h(`network timeout at: ${a.url}`,"request-timeout")),b()}),a.timeout)})),g.on("error",(function(t){r(new h(`request to ${a.url} failed, reason: ${t.message}`,"system",t)),b()})),g.on("response",(function(t){clearTimeout(v);const e=function(t){const e=new A;for(const n of Object.keys(t))if(!S.test(n))if(Array.isArray(t[n]))for(const r of t[n])I.test(r)||(void 0===e[P][n]?e[P][n]=[r]:e[P][n].push(r));else I.test(t[n])||(e[P][n]=[t[n]]);return e}(t.headers);if(q.isRedirect(t.statusCode)){const o=e.get("Location"),i=null===o?null:Y(a.url,o);switch(a.redirect){case"error":return r(new h(`uri requested responds with a redirect, redirect mode is set to error: ${a.url}`,"no-redirect")),void b();case"manual":if(null!==i)try{e.set("Location",i)}catch(t){r(t)}break;case"follow":if(null===i)break;if(a.counter>=a.follow)return r(new h(`maximum redirect reached at: ${a.url}`,"max-redirect")),void b();const o={headers:new A(a.headers),follow:a.follow,counter:a.counter+1,agent:a.agent,compress:a.compress,method:a.method,body:a.body,signal:a.signal,timeout:a.timeout,size:a.size};return 303!==t.statusCode&&a.body&&null===x(a)?(r(new h("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void b()):(303!==t.statusCode&&(301!==t.statusCode&&302!==t.statusCode||"POST"!==a.method)||(o.method="GET",o.body=void 0,o.headers.delete("content-length")),n(q(new U(i,o))),void b())}}t.once("end",(function(){l&&l.removeEventListener("abort",y)}));let o=t.pipe(new $);const i={url:a.url,status:t.statusCode,statusText:t.statusMessage,headers:e,size:a.size,timeout:a.timeout,counter:a.counter},s=e.get("Content-Encoding");if(!a.compress||"HEAD"===a.method||null===s||204===t.statusCode||304===t.statusCode)return p=new F(o,i),void n(p);const u={flush:c.Z_SYNC_FLUSH,finishFlush:c.Z_SYNC_FLUSH};if("gzip"==s||"x-gzip"==s)return o=o.pipe(c.createGunzip(u)),p=new F(o,i),void n(p);if("deflate"!=s&&"x-deflate"!=s){if("br"==s&&"function"==typeof c.createBrotliDecompress)return o=o.pipe(c.createBrotliDecompress()),p=new F(o,i),void n(p);p=new F(o,i),n(p)}else t.pipe(new $).once("data",(function(t){o=8==(15&t[0])?o.pipe(c.createInflate()):o.pipe(c.createInflateRaw()),p=new F(o,i),n(p)}))})),function(t,e){const n=e.body;null===n?t.end():w(n)?n.stream().pipe(t):Buffer.isBuffer(n)?(t.write(n),t.end()):n.pipe(t)}(g,a)}))}q.isRedirect=function(t){return 301===t||302===t||303===t||307===t||308===t},q.Promise=global.Promise;const W=q},834:t=>{t.exports=n(5254)},605:t=>{t.exports=n(3685)},211:t=>{t.exports=n(5687)}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{o.r(i),o.d(i,{APP_VERSION_CODE:()=>It,APP_VERSION_NAME:()=>St,CARRIER_NAME:()=>_t,DEVICE_LOCALE:()=>ft,DEVICE_MODEL:()=>pt,DEVICE_TYPE:()=>lt,DecisionApiConfig:()=>D,DecisionMode:()=>C,Event:()=>K,EventCategory:()=>k,FLAGSHIP_CLIENT:()=>Ct,FLAGSHIP_CONTEXT:()=>At,FLAGSHIP_VERSION:()=>Mt,FLAGSHIP_VISITOR:()=>Pt,Flagship:()=>ae,FlagshipStatus:()=>u,HitAbstract:()=>H,HitType:()=>f,INTERFACE_NAME:()=>Et,INTERNET_CONNECTION:()=>xt,IP:()=>bt,Item:()=>Y,LOCATION_CITY:()=>ht,LOCATION_COUNTRY:()=>yt,LOCATION_LAT:()=>gt,LOCATION_LONG:()=>vt,LOCATION_REGION:()=>dt,LogLevel:()=>e,OS_NAME:()=>mt,OS_VERSION_CODE:()=>Ot,OS_VERSION_NAME:()=>wt,Page:()=>W,Screen:()=>Q,Transaction:()=>X,Visitor:()=>P,default:()=>se});const t=n(1239);var e,r={},a="undefined"==typeof window?o(505).ZP:window.fetch;if("undefined"==typeof window){var s=o(605).Agent,c=o(211).Agent;r.agent=function(t){return"http:"===t.protocol?new s({keepAlive:!0}):new c({keepAlive:!0})}}!function(t){t[t.NONE=0]="NONE",t[t.EMERGENCY=1]="EMERGENCY",t[t.ALERT=2]="ALERT",t[t.CRITICAL=3]="CRITICAL",t[t.ERROR=4]="ERROR",t[t.WARNING=5]="WARNING",t[t.NOTICE=6]="NOTICE",t[t.INFO=7]="INFO",t[t.DEBUG=8]="DEBUG",t[t.ALL=9]="ALL"}(e||(e={}));var u,f,l="TypeScript",p="v2",h="ready",d="Key {0} must not be null. Default value is returned.",y="No modification for key {0}.",g="{0} must be a {1}",v="visitorId must not be null or empty",b="Method {0} is deactivated while SDK status is: {1}.",m="INITIALIZATION",w="UPDATE CONTEXT",O="GET MODIFICATION",_="GET MODIFICATION INFO",x="ACTIVE MODIFICATION",S="SEND HIT",I="application/json";!function(t){t[t.NOT_READY=0]="NOT_READY",t[t.NOT_INITIALIZED=0]="NOT_INITIALIZED",t[t.STARTING=1]="STARTING",t[t.POLLING=2]="POLLING",t[t.READY_PANIC_ON=3]="READY_PANIC_ON",t[t.READY=4]="READY"}(u||(u={})),function(t){t.PAGE_VIEW="PAGEVIEW",t.PAGE="PAGEVIEW",t.SCREEN_VIEW="SCREENVIEW",t.SCREEN="SCREENVIEW",t.TRANSACTION="TRANSACTION",t.ITEM="ITEM",t.EVENT="EVENT"}(f||(f={}));var E,C,M=(E=function(t,e){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},E(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}E(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),P=function(t){function e(e){var n=t.call(this)||this;return n.visitorDelegate=e,n.visitorDelegate.on(h,(function(t){n.emit(h,t)})),n}return M(e,t),e.prototype.getModificationsArray=function(){return this.visitorDelegate.getModificationsArray()},Object.defineProperty(e.prototype,"visitorId",{get:function(){return this.visitorDelegate.visitorId},set:function(t){this.visitorDelegate.visitorId=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"anonymousId",{get:function(){return this.visitorDelegate.anonymousId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasConsented",{get:function(){return this.visitorDelegate.hasConsented},enumerable:!1,configurable:!0}),e.prototype.setConsent=function(t){this.visitorDelegate.setConsent(t)},Object.defineProperty(e.prototype,"config",{get:function(){return this.visitorDelegate.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this.visitorDelegate.context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modifications",{get:function(){return this.visitorDelegate.modifications},enumerable:!1,configurable:!0}),e.prototype.updateContext=function(t){this.visitorDelegate.updateContext(t)},e.prototype.clearContext=function(){this.visitorDelegate.clearContext()},e.prototype.getModification=function(t){return this.visitorDelegate.getModification(t)},e.prototype.getModificationSync=function(t){return this.visitorDelegate.getModificationSync(t)},e.prototype.getModifications=function(t,e){return this.visitorDelegate.getModifications(t,e)},e.prototype.getModificationsSync=function(t,e){return this.visitorDelegate.getModificationsSync(t,e)},e.prototype.getModificationInfo=function(t){return this.visitorDelegate.getModificationInfo(t)},e.prototype.getModificationInfoSync=function(t){return this.visitorDelegate.getModificationInfoSync(t)},e.prototype.synchronizeModifications=function(){return this.visitorDelegate.synchronizeModifications()},e.prototype.activateModification=function(t){return this.visitorDelegate.activateModification(t)},e.prototype.activateModifications=function(t){return this.visitorDelegate.activateModifications(t)},e.prototype.sendHit=function(t){return this.visitorDelegate.sendHit(t)},e.prototype.sendHits=function(t){return this.visitorDelegate.sendHits(t)},e.prototype.getAllModifications=function(t){return void 0===t&&(t=!1),this.visitorDelegate.getAllModifications(t)},e.prototype.getModificationsForCampaign=function(t,e){return void 0===e&&(e=!1),this.visitorDelegate.getModificationsForCampaign(t,e)},e.prototype.authenticate=function(t){this.visitorDelegate.authenticate(t)},e.prototype.unauthenticate=function(){this.visitorDelegate.unauthenticate()},e}(t.EventEmitter);function A(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=t,o=0;o<e.length;o++){var i=e[o];r=r.replace(new RegExp("\\{"+o+"\\}","g"),i)}return r}function j(t,n,r){t&&t.logManager&&"function"==typeof t.logManager.error&&t.logLevel&&!(t.logLevel<e.ERROR)&&t.logManager.error(n,r)}function T(t,n,r){t&&t.logManager&&"function"==typeof t.logManager.info&&t.logLevel&&!(t.logLevel<e.INFO)&&t.logManager.info(n,r)}!function(t){t.DECISION_API="API",t.BUCKETING="BUCKETING"}(C||(C={}));var k,N=function(){function t(t){var n=t.envId,r=t.apiKey,o=t.timeout,i=t.logLevel,a=t.logManager,s=t.statusChangedCallback,c=t.fetchNow,u=t.decisionMode,f=t.enableClientCache,l=t.initialBucketing;this._envId=n,this._apiKey=r,this.logLevel=i||e.ALL,this.timeout=o||2,this.fetchNow=void 0===c||c,this.enableClientCache=void 0===f||f,this._decisionMode=u||C.DECISION_API,this._initialBucketing=l,a&&(this.logManager=a),this.statusChangedCallback=s}return Object.defineProperty(t.prototype,"initialBucketing",{get:function(){return this._initialBucketing},set:function(t){this._initialBucketing=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableClientCache",{get:function(){return this._enableClientCache},set:function(t){this._enableClientCache=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBucketingSuccess",{get:function(){return this._onBucketingSuccess},set:function(t){this._onBucketingSuccess=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBucketingFail",{get:function(){return this._onBucketingFail},set:function(t){this._onBucketingFail=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBucketingUpdated",{get:function(){return this._onBucketingUpdated},set:function(t){this._onBucketingUpdated=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"envId",{get:function(){return this._envId},set:function(t){this._envId=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"apiKey",{get:function(){return this._apiKey},set:function(t){this._apiKey=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"decisionMode",{get:function(){return this._decisionMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeout",{get:function(){return this._timeout},set:function(t){this._timeout=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){this._logLevel=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fetchNow",{get:function(){return this._fetchNow},set:function(t){this._fetchNow=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pollingInterval",{get:function(){return this._pollingInterval},set:function(t){this._pollingInterval=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"statusChangedCallback",{get:function(){return this._statusChangedCallback},set:function(t){"function"==typeof t?this._statusChangedCallback=t:j(this,"statusChangedCallback must be a function","statusChangedCallback")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"logManager",{get:function(){return this._logManager},set:function(t){this._logManager=t},enumerable:!1,configurable:!0}),t}(),R=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(){return L=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},L.apply(this,arguments)},D=function(t){function e(e){return t.call(this,L(L({},e),{decisionMode:C.DECISION_API}))||this}return R(e,t),e}(N),F=function(){function t(t,e,n){this._config=t,this._decisionManager=e,this._trackingManager=n}return Object.defineProperty(t.prototype,"config",{get:function(){return this._config},set:function(t){this._config=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"decisionManager",{get:function(){return this._decisionManager},set:function(t){this._decisionManager=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trackingManager",{get:function(){return this._trackingManager},set:function(t){this._trackingManager=t},enumerable:!1,configurable:!0}),t}(),G=function(){function t(t,e){this._panic=!1,this._config=e,this._httpClient=t}return Object.defineProperty(t.prototype,"config",{get:function(){return this._config},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panic",{set:function(t){this.updateFlagshipStatus(t?u.READY_PANIC_ON:u.READY),this._panic=t},enumerable:!1,configurable:!0}),t.prototype.statusChangedCallback=function(t){this._statusChangedCallback=t},t.prototype.updateFlagshipStatus=function(t){"function"==typeof this._statusChangedCallback&&this._statusChangedCallback&&this._statusChangedCallback(t)},t.prototype.getModifications=function(t){var e=new Map;return t.forEach((function(t){var n=t.variation.modifications.value;for(var r in n){var o=n[r];e.set(r,{key:r,campaignId:t.id,variationGroupId:t.variationGroupId,variationId:t.variation.id,isReference:t.variation.reference,value:o})}})),e},t.prototype.getCampaignsModificationsAsync=function(t){return function(t,e,n,r){return new(n||(n=Promise))((function(e,o){function i(t){try{s(r.next(t))}catch(t){o(t)}}function a(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(i,a)}s((r=r.apply(t,[])).next())}))}(this,0,void 0,(function(){var e=this;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(n){return[2,this.getCampaignsAsync(t).then((function(t){return e.getModifications(t)})).catch((function(t){return j(e.config,t.message||t,"getCampaignsModificationsAsync"),new Map}))]}))}))},t.prototype.isPanic=function(){return this._panic},t}(),B=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),V=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.getCampaignsAsync=function(t){return function(t,e,n,r){return new(n||(n=Promise))((function(e,o){function i(t){try{s(r.next(t))}catch(t){o(t)}}function a(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(i,a)}s((r=r.apply(t,[])).next())}))}(this,0,void 0,(function(){var e,n,r,o,i=this;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(a){return(o={})["x-api-key"]=""+this.config.apiKey,o["x-sdk-client"]=l,o["x-sdk-version"]=p,o["Content-Type"]=I,e=o,n={visitorId:t.visitorId,anonymousId:t.anonymousId,trigger_hit:!1,context:t.context},r="https://decision.flagship.io/v2/"+this.config.envId+"/campaigns?exposeAllKeys=true",t.hasConsented||(r+="&sendContextEvent=false"),[2,this._httpClient.postAsync(r,{headers:e,timeout:this.config.timeout,body:n}).then((function(t){i.panic=!!t.body.panic;var e=[];return t.body.campaigns&&(e=t.body.campaigns),e})).catch((function(t){return j(i.config,t.message||t,"GET CAMPAIGNS"),[]}))]}))}))},e}(G),H=function(){function t(t){this.type=t,this._anonymousId=null}return Object.defineProperty(t.prototype,"anonymousId",{get:function(){return this._anonymousId},set:function(t){this._anonymousId=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visitorId",{get:function(){return this._visitorId},set:function(t){this._visitorId=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ds",{get:function(){return this._ds},set:function(t){this._ds=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"config",{get:function(){return this._config},set:function(t){this._config=t},enumerable:!1,configurable:!0}),t.prototype.isNotEmptyString=function(t,e){return!(!t||"string"!=typeof t)||(j(this.config,A(g,e,"string"),e),!1)},t.prototype.isNumeric=function(t,e){return!(!t||"number"!=typeof t)||(j(this.config,A(g,e,"number"),e),!1)},t.prototype.isInteger=function(t,e){return t&&"number"==typeof t?(Number.isInteger(t)||j(this.config,A("value of {0} is not an {1}, it will be truncated to {1}",e,"integer"),e),!0):(j(this.config,A(g,e,"integer"),e),!1)},t.prototype.toApiKeys=function(){var t,e=((t={}).vid=this.visitorId,t.ds=this.ds,t.cid=""+this.config.envId,t.t=this.type,t);return this.visitorId&&this._anonymousId?(e.vid=this._anonymousId,e.cuid=this.visitorId):(e.vid=this._anonymousId||this.visitorId,e.cuid=null),e},t.prototype.isReady=function(){return!!(this.visitorId&&this.ds&&this.config&&this.config.envId&&this.type)},t}(),z=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t.ACTION_TRACKING="ACTION TRACKING",t.USER_ENGAGEMENT="USER ENGAGEMENT"}(k||(k={}));var U,K=function(t){function e(e){var n=t.call(this,f.EVENT)||this,r=e.category,o=e.action,i=e.eventLabel,a=e.eventValue;return n.category=r,n.action=o,i&&(n.eventLabel=i),a&&(n.eventValue=a),n}return z(e,t),Object.defineProperty(e.prototype,"category",{get:function(){return this._category},set:function(t){Object.values(k).includes(t)?this._category=t:j(this.config,"The category value must be either EventCategory::ACTION_TRACKING or EventCategory::ACTION_TRACKING","category")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"action",{get:function(){return this._action},set:function(t){this.isNotEmptyString(t,"action")&&(this._action=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"eventLabel",{get:function(){return this._eventLabel},set:function(t){this.isNotEmptyString(t,"eventLabel")&&(this._eventLabel=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"eventValue",{get:function(){return this._eventValue},set:function(t){this.isNumeric(t,"eventValue")&&(this._eventValue=t)},enumerable:!1,configurable:!0}),e.prototype.toApiKeys=function(){var e=t.prototype.toApiKeys.call(this);return e.ec=this.category,e.ea=this.action,this.eventLabel&&(e.el=this.eventLabel),this.eventValue&&(e.ev=this.eventValue),e},e.prototype.isReady=function(){return!!(t.prototype.isReady.call(this)&&this.category&&this.action)},e.prototype.getErrorMessage=function(){return"event category and event action are required"},e}(H),$=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Y=function(t){function e(e){var n=t.call(this,f.ITEM)||this,r=e.transactionId,o=e.productName,i=e.productSku,a=e.itemCategory,s=e.itemPrice,c=e.itemQuantity;return n.transactionId=r,n.productName=o,n.productSku=i,a&&(n.itemCategory=a),s&&(n.itemPrice=s),c&&(n.itemQuantity=c),n}return $(e,t),Object.defineProperty(e.prototype,"transactionId",{get:function(){return this._transactionId},set:function(t){this.isNotEmptyString(t,"transactionId")&&(this._transactionId=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"productName",{get:function(){return this._productName},set:function(t){this.isNotEmptyString(t,"productName")&&(this._productName=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"productSku",{get:function(){return this._productSku},set:function(t){this.isNotEmptyString(t,"productSku")&&(this._productSku=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemPrice",{get:function(){return this._itemPrice},set:function(t){this.isNumeric(t,"itemPrice")&&(this._itemPrice=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemQuantity",{get:function(){return this._itemQuantity},set:function(t){this.isInteger(t,"itemQuantity")&&(this._itemQuantity=Math.trunc(t))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemCategory",{get:function(){return this._itemCategory},set:function(t){this.isNotEmptyString(t,"itemCategory")&&(this._itemCategory=t)},enumerable:!1,configurable:!0}),e.prototype.isReady=function(){return!!(t.prototype.isReady.call(this)&&this.transactionId&&this.productName&&this.productSku)},e.prototype.toApiKeys=function(){var e=t.prototype.toApiKeys.call(this);return e.tid=this.transactionId,e.in=this.productName,e.ic=this.productSku,this.itemPrice&&(e.ip=this.itemPrice),this.itemQuantity&&(e.iq=this.itemQuantity),this.itemCategory&&(e.iv=this.itemCategory),e},e.prototype.getErrorMessage=function(){return"Transaction Id, Item name and item code are required"},e}(H),q=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),W=function(t){function e(e){var n=t.call(this,f.PAGE_VIEW)||this;return n.documentLocation=null==e?void 0:e.documentLocation,n}return q(e,t),Object.defineProperty(e.prototype,"documentLocation",{get:function(){return this._documentLocation},set:function(t){this.isNotEmptyString(t,"documentLocation")&&(this._documentLocation=t)},enumerable:!1,configurable:!0}),e.prototype.isReady=function(){return!(!t.prototype.isReady.call(this)||!this.documentLocation)},e.prototype.toApiKeys=function(){var e=t.prototype.toApiKeys.call(this);return e.dl=this.documentLocation,e},e.prototype.getErrorMessage=function(){return"documentLocation url is required"},e}(H),Z=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(t){function e(e){var n=t.call(this,f.SCREEN_VIEW)||this;return n.documentLocation=null==e?void 0:e.documentLocation,n}return Z(e,t),Object.defineProperty(e.prototype,"documentLocation",{get:function(){return this._documentLocation},set:function(t){this.isNotEmptyString(t,"documentLocation")&&(this._documentLocation=t)},enumerable:!1,configurable:!0}),e.prototype.isReady=function(){return!(!t.prototype.isReady.call(this)||!this.documentLocation)},e.prototype.toApiKeys=function(){var e=t.prototype.toApiKeys.call(this);return e.dl=this.documentLocation,e},e.prototype.getErrorMessage=function(){return"Screen name is required"},e}(H),J=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),X=function(t){function e(e){var n=t.call(this,f.TRANSACTION)||this,r=e.transactionId,o=e.affiliation,i=e.taxes,a=e.currency,s=e.couponCode,c=e.itemCount,u=e.shippingMethod,l=e.paymentMethod,p=e.totalRevenue,h=e.shippingCosts;return n.transactionId=r,n.affiliation=o,i&&(n.taxes=i),a&&(n.currency=a),s&&(n.couponCode=s),c&&(n.itemCount=c),u&&(n.shippingMethod=u),l&&(n.paymentMethod=l),p&&(n.totalRevenue=p),h&&(n.shippingCosts=h),n}return J(e,t),Object.defineProperty(e.prototype,"transactionId",{get:function(){return this._transactionId},set:function(t){this.isNotEmptyString(t,"transactionId")&&(this._transactionId=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"affiliation",{get:function(){return this._affiliation},set:function(t){this.isNotEmptyString(t,"affiliation")&&(this._affiliation=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"taxes",{get:function(){return this._taxes},set:function(t){this.isNumeric(t,"taxes")&&(this._taxes=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currency",{get:function(){return this._currency},set:function(t){t&&"string"==typeof t&&3===t.length?this._currency=t:j(this.config,A("{0} must be a string and have exactly 3 letters","currency"),"currency")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"couponCode",{get:function(){return this._couponCode},set:function(t){this.isNotEmptyString(t,"couponCode")&&(this._couponCode=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"itemCount",{get:function(){return this._itemCount},set:function(t){this.isInteger(t,"itemCount")&&(this._itemCount=Math.trunc(t))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shippingMethod",{get:function(){return this._shippingMethod},set:function(t){this.isNotEmptyString(t,"shippingMethod")&&(this._shippingMethod=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paymentMethod",{get:function(){return this._paymentMethod},set:function(t){this.isNotEmptyString(t,"paymentMethod")&&(this._paymentMethod=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalRevenue",{get:function(){return this._totalRevenue},set:function(t){this.isNumeric(t,"totalRevenue")&&(this._totalRevenue=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shippingCosts",{get:function(){return this._shippingCosts},set:function(t){this.isNumeric(t,"shippingCosts")&&(this._shippingCosts=t)},enumerable:!1,configurable:!0}),e.prototype.isReady=function(){return!!(t.prototype.isReady.call(this)&&this.transactionId&&this.affiliation)},e.prototype.toApiKeys=function(){var e=t.prototype.toApiKeys.call(this);return e.tid=this.transactionId,e.ta=this.affiliation,this.taxes&&(e.tt=this.taxes),this.currency&&(e.tc=this.currency),this.couponCode&&(e.tcc=this.couponCode),this.itemCount&&(e.icn=this.itemCount),this.shippingMethod&&(e.sm=this.shippingMethod),this.paymentMethod&&(e.pm=this.paymentMethod),this.totalRevenue&&(e.tr=this.totalRevenue),this.shippingCosts&&(e.ts=this.shippingCosts),e},e.prototype.getErrorMessage=function(){return"Transaction Id and Transaction affiliation are required"},e}(H),tt=function(){function t(t,e){this._httpClient=t,this._config=e}return Object.defineProperty(t.prototype,"httpClient",{get:function(){return this._httpClient},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"config",{get:function(){return this._config},enumerable:!1,configurable:!0}),t}(),et=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},rt=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},ot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return et(e,t),e.prototype.sendConsentHit=function(t){return nt(this,void 0,void 0,(function(){var e,n,r,o;return rt(this,(function(i){switch(i.label){case 0:return(r={}).t=f.EVENT,r.el="TypeScript:"+t.hasConsented,r.ea="fs_consent",r.ec=k.USER_ENGAGEMENT,r.cid=this.config.envId,r.ds="APP",e=r,t.visitorId&&t.anonymousId?(e.vid=t.anonymousId,e.cuid=t.visitorId):(e.vid=t.anonymousId||t.visitorId,e.cuid=null),(o={})["Content-Type"]=I,n=o,[4,this.httpClient.postAsync("https://ariane.abtasty.com",{headers:n,timeout:this.config.timeout,body:e})];case 1:return i.sent(),[2]}}))}))},e.prototype.sendActive=function(t,e){return nt(this,void 0,void 0,(function(){var n,r,o,i;return rt(this,(function(a){switch(a.label){case 0:return(o={})["x-api-key"]=""+this.config.apiKey,o["x-sdk-client"]=l,o["x-sdk-version"]=p,o["Content-Type"]=I,n=o,(i={}).vid=t.visitorId,i.vaid=e.variationId,i.caid=e.variationGroupId,i.cid=""+this.config.envId,r=i,t.visitorId&&t.anonymousId?(r.vid=t.visitorId,r.aid=t.anonymousId):(r.vid=t.anonymousId||t.visitorId,r.aid=null),[4,this.httpClient.postAsync("https://decision.flagship.io/v2/activate",{headers:n,timeout:this.config.timeout,body:r})];case 1:return a.sent(),[2]}}))}))},e.prototype.sendHit=function(t){return nt(this,void 0,void 0,(function(){var e,n;return rt(this,(function(r){switch(r.label){case 0:return(n={})["Content-Type"]=I,e=n,[4,this.httpClient.postAsync("https://ariane.abtasty.com",{headers:e,timeout:this.config.timeout,body:t.toApiKeys()})];case 1:return r.sent(),[2]}}))}))},e}(tt),it=function(){function t(){}return t.prototype.emergency=function(t,n){this.log(e.EMERGENCY,t,n)},t.prototype.alert=function(t,n){this.log(e.ALERT,t,n)},t.prototype.critical=function(t,n){this.log(e.CRITICAL,t,n)},t.prototype.error=function(t,n){this.log(e.ERROR,t,n)},t.prototype.warning=function(t,n){this.log(e.WARNING,t,n)},t.prototype.notice=function(t,n){this.log(e.NOTICE,t,n)},t.prototype.info=function(t,n){this.log(e.INFO,t,n)},t.prototype.debug=function(t,n){this.log(e.DEBUG,t,n)},t.prototype.log=function(t,n,r){var o=new Date,i=function(t){return 1===t.toString().length?"0"+t:t},a="["+i(o.getFullYear())+"-"+i(o.getMonth())+"-"+i(o.getDay())+" "+i(o.getHours())+":"+i(o.getMinutes())+"] [Flagship SDK] ["+e[t]+"] ["+r+"] : "+n;console.log(a)},t}(),at=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),st=function(){return st=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},st.apply(this,arguments)},ct=function(t){function e(e){var n,r=t.call(this,st(st({},e),{decisionMode:C.BUCKETING}))||this;return r.pollingInterval=null!==(n=null==e?void 0:e.pollingInterval)&&void 0!==n?n:2,r.onBucketingFail=null==e?void 0:e.onBucketingFail,r.onBucketingSuccess=null==e?void 0:e.onBucketingSuccess,r.onBucketingUpdated=null==e?void 0:e.onBucketingUpdated,r}return at(e,t),e}(N),ut=function(){function t(t){this.visitor=t}return Object.defineProperty(t.prototype,"configManager",{get:function(){return this.visitor.configManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trackingManager",{get:function(){return this.configManager.trackingManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"decisionManager",{get:function(){return this.configManager.decisionManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"config",{get:function(){return this.visitor.config},enumerable:!1,configurable:!0}),t.prototype.updateCampaigns=function(t){try{this.visitor.campaigns=t,this.visitor.modifications=this.decisionManager.getModifications(t)}catch(t){j(this.config,t.message||t,"updateCampaigns")}},t}(),ft="sdk_deviceLanguage",lt="sdk_deviceType",pt="sdk_deviceModel",ht="sdk_city",dt="sdk_region",yt="sdk_country",gt="sdk_lat",vt="sdk_long",bt="sdk_ip",mt="sdk_osName",wt="sdk_osVersionName",Ot="sdk_osVersionCode",_t="sdk_carrierName",xt="sdk_internetConnection",St="sdk_versionName",It="sdk_versionCode",Et="sdk_interfaceName",Ct="fs_client",Mt="fs_version",Pt="fs_users",At=((U={})[ft]="string",U[lt]="string",U[pt]="string",U[ht]="string",U[dt]="string",U[yt]="string",U[gt]="number",U[vt]="number",U[bt]="string",U[mt]="string",U[wt]="string",U[Ot]="number",U[_t]="string",U[xt]="string",U[St]="string",U[It]="number",U[Et]="string",U[Ct]="string",U[Mt]="string",U[Pt]="string",U),jt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},kt=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return jt(e,t),e.prototype.setConsent=function(t){var e=this,n="setConsent";this.visitor.hasConsented=t,this.hasTrackingManager(n)&&this.trackingManager.sendConsentHit(this.visitor).catch((function(t){j(e.config,t.message||t,n)}))},e.prototype.checkPredefinedContext=function(t,e){var n=At[t];if(!n)return null;var r=!1;return"string"===n?r="string"==typeof e:"number"===n&&(r="number"==typeof e),r||j(this.config,A("Predefined Context {0} must be type of {1}",t,n),w),r},e.prototype.updateContextKeyValue=function(t,e){var n=typeof e;if("string"!=typeof t||""===t||"string"!==n&&"number"!==n&&"boolean"!==n)j(this.visitor.config,A("params {0} must be a non null String, and 'value' must be one of the following types , Number, Boolean",t),w);else if(!t.match(/^fs_/i)){var r=this.checkPredefinedContext(t,e);("boolean"!=typeof r||r)&&(this.visitor.context[t]=e)}},e.prototype.updateContext=function(t){if(t)for(var e in t){var n=t[e];this.updateContextKeyValue(e,n)}else j(this.visitor.config,"Context must not to be null",w)},e.prototype.clearContext=function(){this.visitor.context={}},e.prototype.checkAndGetModification=function(t,e){var n=t.key,r=t.defaultValue,o=t.activate;if(!n||"string"!=typeof n)return j(this.config,A(d,n),O),r;var i=this.visitor.modifications.get(n);return i?"object"==typeof i.value&&"object"==typeof r&&Array.isArray(i.value)!==Array.isArray(r)||typeof i.value!=typeof r?(j(this.config,A("Modification for key {0} has a different type. Default value is returned.",n),O),i.value||!o&&!e||this.activateModification(n),r):((o||e)&&this.activateModification(n),i.value):(j(this.config,A("No modification for key {0}. Default value is returned.",n),O),r)},e.prototype.getModifications=function(t,e){return Tt(this,void 0,void 0,(function(){return kt(this,(function(n){return[2,this.getModificationsSync(t,e)]}))}))},e.prototype.getModificationsSync=function(t,e){var n=this,r={};return t.forEach((function(t){r[t.key]=n.checkAndGetModification(t,e)})),r},e.prototype.getModification=function(t){return Tt(this,void 0,void 0,(function(){return kt(this,(function(e){return[2,this.getModificationSync(t)]}))}))},e.prototype.getModificationSync=function(t){return this.checkAndGetModification(t)},e.prototype.getModificationInfo=function(t){return Tt(this,void 0,void 0,(function(){return kt(this,(function(e){return[2,this.getModificationInfoSync(t)]}))}))},e.prototype.getModificationInfoSync=function(t){return t&&"string"==typeof t?this.visitor.modifications.get(t)||(j(this.visitor.config,A(y,t),_),null):(j(this.visitor.config,A(d,t),_),null)},e.prototype.synchronizeModifications=function(){return Tt(this,void 0,void 0,(function(){var t,e;return kt(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.decisionManager.getCampaignsAsync(this.visitor)];case 1:return t=n.sent(),this.visitor.campaigns=t,this.visitor.modifications=this.decisionManager.getModifications(this.visitor.campaigns),this.visitor.emit(h),[3,3];case 2:return e=n.sent(),this.visitor.emit(h,e),j(this.config,e.message||e,"SYNCHRONIZED MODIFICATION"),[3,3];case 3:return[2]}}))}))},e.prototype.activateModification=function(t){return Tt(this,void 0,void 0,(function(){return kt(this,(function(e){return t&&"string"==typeof t?[2,this.activate(t)]:(j(this.config,A(d,t),x),[2])}))}))},e.prototype.activateModifications=function(t){return Tt(this,void 0,void 0,(function(){var e=this;return kt(this,(function(n){return t&&Array.isArray(t)?(t.forEach((function(t){"string"==typeof t?e.activate(t):e.activate(t.key)})),[2]):(j(this.config,A(d,t),x),[2])}))}))},e.prototype.hasTrackingManager=function(t){var e=this.trackingManager;return e||j(this.config,A("trackerManager must not be null."),t),!!e},e.prototype.activate=function(t){return Tt(this,void 0,void 0,(function(){var e,n;return kt(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),(e=this.visitor.modifications.get(t))?this.hasTrackingManager(x)?[4,this.trackingManager.sendActive(this.visitor,e)]:[2]:(j(this.visitor.config,A(y,t),x),[2]);case 1:return r.sent(),[3,3];case 2:return n=r.sent(),j(this.config,n.message||n,x),[3,3];case 3:return[2]}}))}))},e.prototype.sendHit=function(t){return this.hasTrackingManager(S)?this.prepareAndSendHit(t):Promise.resolve()},e.prototype.sendHits=function(t){return Tt(this,void 0,void 0,(function(){var e=this;return kt(this,(function(n){return this.hasTrackingManager(S)?(t.forEach((function(t){e.prepareAndSendHit(t)})),[2]):[2]}))}))},e.prototype.getHit=function(t){var e=null;switch(t.type.toUpperCase()){case f.EVENT:e=new K(t);break;case f.ITEM:e=new Y(t);break;case f.PAGE:case f.PAGE_VIEW:e=new W(t);break;case f.SCREEN:case f.SCREEN_VIEW:e=new Q(t);break;case f.TRANSACTION:e=new X(t)}return e},e.prototype.prepareAndSendHit=function(t){return Tt(this,void 0,void 0,(function(){var e,n,r;return kt(this,(function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),e=void 0,t instanceof H)e=t;else{if(!(n=this.getHit(t)))return j(this.config,"property type is required and must ",S),[2];e=n}return e.visitorId=this.visitor.visitorId,e.ds="APP",e.config=this.config,e.anonymousId=this.visitor.anonymousId,e.isReady()?[4,this.trackingManager.sendHit(e)]:(j(this.config,e.getErrorMessage(),S),[2]);case 1:return o.sent(),[3,3];case 2:return r=o.sent(),j(this.config,r.message||r,S),[3,3];case 3:return[2]}}))}))},e.prototype.getAllModifications=function(t){return void 0===t&&(t=!1),Tt(this,void 0,void 0,(function(){var e=this;return kt(this,(function(n){return t&&this.visitor.modifications.forEach((function(t,n){e.activateModification(n)})),[2,{visitorId:this.visitor.visitorId,campaigns:this.visitor.campaigns}]}))}))},e.prototype.getModificationsForCampaign=function(t,e){return void 0===e&&(e=!1),Tt(this,void 0,void 0,(function(){var n=this;return kt(this,(function(r){return e&&this.visitor.modifications.forEach((function(e){e.campaignId===t&&n.activateModification(e.key)})),[2,{visitorId:this.visitor.visitorId,campaigns:this.visitor.campaigns.filter((function(e){return e.id===t}))}]}))}))},e.prototype.authenticate=function(t){var e="authenticate";this.config.decisionMode!==C.BUCKETING?t?(this.visitor.anonymousId=this.visitor.visitorId,this.visitor.visitorId=t):j(this.config,v,e):this.logDeactivateOnBucketing(e)},e.prototype.unauthenticate=function(){var t="unauthenticate";this.config.decisionMode!==C.BUCKETING?this.visitor.anonymousId?(this.visitor.visitorId=this.visitor.anonymousId,this.visitor.anonymousId=null):j(this.config,"Visitor is not authenticated yet",t):this.logDeactivateOnBucketing(t)},e.prototype.logDeactivateOnBucketing=function(t){j(this.config,A("Method {0} is deactivated on Bucketing mode.",t),t)},e}(ut),Rt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},Dt=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Rt(e,t),e.prototype.synchronizeModifications=function(){return this.log("synchronizeModifications"),Promise.resolve()},e.prototype.getModificationSync=function(t){return this.log("getModification"),t.defaultValue},e.prototype.getModificationsSync=function(t,e){this.log("getModifications");var n={};return t.forEach((function(t){n[t.key]=t.defaultValue})),n},e.prototype.getModificationInfoSync=function(t){return this.log("getModificationInfo"),null},e.prototype.activateModification=function(t){return Lt(this,void 0,void 0,(function(){return Dt(this,(function(t){return this.log("activateModification"),[2]}))}))},e.prototype.activateModifications=function(t){return Lt(this,void 0,void 0,(function(){return Dt(this,(function(t){return this.log("activateModifications"),[2]}))}))},e.prototype.sendHit=function(t){return this.log("sendHit"),Promise.resolve()},e.prototype.sendHits=function(t){return this.log("sendHits"),Promise.resolve()},e.prototype.log=function(t){j(this.config,A(b,t,u[u.NOT_INITIALIZED]),t)},e}(Nt),Gt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},Vt=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Gt(e,t),e.prototype.setConsent=function(t){this.visitor.hasConsented=t,j(this.config,A("Send consent hit is deactivated while SDK status is: {1}.",u[u.READY_PANIC_ON]),"setConsent")},e.prototype.updateContext=function(t){this.log("updateContext")},e.prototype.clearContext=function(){this.log("clearContext")},e.prototype.getModificationSync=function(t){return this.log("getModification"),t.defaultValue},e.prototype.getModificationsSync=function(t,e){this.log("getModifications");var n={};return t.forEach((function(t){n[t.key]=t.defaultValue})),n},e.prototype.getModificationInfoSync=function(t){return this.log("getModificationInfo"),null},e.prototype.activateModification=function(t){return Bt(this,void 0,void 0,(function(){return Vt(this,(function(t){return this.log("activateModification"),[2]}))}))},e.prototype.activateModifications=function(t){return Bt(this,void 0,void 0,(function(){return Vt(this,(function(t){return this.log("activateModifications"),[2]}))}))},e.prototype.sendHit=function(t){return this.log("sendHit"),Promise.resolve()},e.prototype.sendHits=function(t){return this.log("sendHits"),Promise.resolve()},e.prototype.log=function(t){j(this.config,A(b,t,u[u.READY_PANIC_ON]),t)},e}(Nt),zt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ut=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},Kt=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},$t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return zt(e,t),e.prototype.activateModification=function(t){return Ut(this,void 0,void 0,(function(){return Kt(this,(function(t){return this.log("activateModification"),[2]}))}))},e.prototype.activateModifications=function(t){return Ut(this,void 0,void 0,(function(){return Kt(this,(function(t){return this.log("activateModifications"),[2]}))}))},e.prototype.sendHit=function(t){return this.log("sendHit"),Promise.resolve()},e.prototype.sendHits=function(t){return this.log("sendHits"),Promise.resolve()},e.prototype.log=function(t){j(this.config,A("Method {0} is deactivated for visitor {1} : visitor did not consent.",t,this.visitor.visitorId),t)},e}(Nt),Yt="FS_CLIENT_VISITOR",qt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wt=function(t){function e(e){var n=this,r=e.visitorId,o=e.configManager,i=e.context,a=e.isAuthenticated,s=e.hasConsented,c=e.initialModifications,u=e.initialCampaigns;(n=t.call(this)||this)._configManager=o;var f=n.config.enableClientCache?function(){var t=null;try{t=localStorage.getItem(Yt)}catch(t){}return t?JSON.parse(t):null}():null;return n.visitorId=r||(null==f?void 0:f.visitorId)||n.createVisitorId(),n.campaigns=[],n._context={},n.updateContext(i),n._anonymousId=(null==f?void 0:f.anonymousId)||null,n.loadPredefinedContext(),s||n.setConsent(!1),n.hasConsented=null==s||s,!n._anonymousId&&a&&n.config.decisionMode===C.DECISION_API&&(n._anonymousId=n.uuidV4()),n.updateCache(),n.setInitialModifications(c),n.setInitializeCampaigns(u,!!c),n}return qt(e,t),e.prototype.getModificationsArray=function(){return Array.from(this._modifications,(function(t){return t[0],t[1]}))},e.prototype.setInitialModifications=function(t){var e=this;this._modifications=new Map,t&&(t instanceof Map||Array.isArray(t))&&t.forEach((function(t){e._modifications.set(t.key,t)}))},e.prototype.setInitializeCampaigns=function(t,e){t&&Array.isArray(t)&&!e&&this.getStrategy().updateCampaigns(t)},e.prototype.updateCache=function(){!function(t){try{localStorage.setItem(Yt,JSON.stringify(t))}catch(t){}}({visitorId:this.visitorId,anonymousId:this.anonymousId})},e.prototype.loadPredefinedContext=function(){this.context.fs_client=l,this.context.fs_version=p,this.context.fs_users=this.visitorId},e.prototype.uuidV4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},e.prototype.createVisitorId=function(){var t=new Date,e=Math.floor(89999*Math.random()+1e4),n=function(t){return 1===t.toString().length?"0"+t:t};return""+t.getFullYear()+n(t.getMonth()+1)+n(t.getDate())+n(t.getHours())+n(t.getMinutes())+e},Object.defineProperty(e.prototype,"visitorId",{get:function(){return this._visitorId},set:function(t){t&&"string"==typeof t?this._visitorId=t:j(this.config,v,"VISITOR ID")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasConsented",{get:function(){return this._hasConsented},set:function(t){this._hasConsented=t},enumerable:!1,configurable:!0}),e.prototype.setConsent=function(t){this.getStrategy().setConsent(t)},Object.defineProperty(e.prototype,"context",{get:function(){return this._context},set:function(t){this._context={},this.updateContext(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modifications",{get:function(){return this._modifications},set:function(t){this._modifications=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"configManager",{get:function(){return this._configManager},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this.configManager.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"campaigns",{get:function(){return this._campaigns},set:function(t){this._campaigns=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"anonymousId",{get:function(){return this._anonymousId},set:function(t){this._anonymousId=t},enumerable:!1,configurable:!0}),e.prototype.getStrategy=function(){return ae.getStatus()&&ae.getStatus()!==u.NOT_INITIALIZED?ae.getStatus()===u.READY_PANIC_ON?new Ht(this):this.hasConsented?new Nt(this):new $t(this):new Ft(this)},e}(t.EventEmitter),Zt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Zt(e,t),e.prototype.updateContext=function(t){this.getStrategy().updateContext(t)},e.prototype.clearContext=function(){this.getStrategy().clearContext()},e.prototype.getModification=function(t){return this.getStrategy().getModification(t)},e.prototype.getModificationSync=function(t){return this.getStrategy().getModificationSync(t)},e.prototype.getModifications=function(t,e){return this.getStrategy().getModifications(t,e)},e.prototype.getModificationsSync=function(t,e){return this.getStrategy().getModificationsSync(t,e)},e.prototype.getModificationInfo=function(t){return this.getStrategy().getModificationInfo(t)},e.prototype.getModificationInfoSync=function(t){return this.getStrategy().getModificationInfoSync(t)},e.prototype.synchronizeModifications=function(){return this.getStrategy().synchronizeModifications()},e.prototype.activateModification=function(t){return this.getStrategy().activateModification(t)},e.prototype.activateModifications=function(t){return this.getStrategy().activateModifications(t)},e.prototype.sendHit=function(t){return this.getStrategy().sendHit(t)},e.prototype.sendHits=function(t){return this.getStrategy().sendHits(t)},e.prototype.getAllModifications=function(t){return void 0===t&&(t=!1),this.getStrategy().getAllModifications(t)},e.prototype.getModificationsForCampaign=function(t,e){return void 0===e&&(e=!1),this.getStrategy().getModificationsForCampaign(t,e)},e.prototype.authenticate=function(t){this.getStrategy().authenticate(t),this.updateCache()},e.prototype.unauthenticate=function(){this.getStrategy().unauthenticate(),this.updateCache()},e}(Wt),Jt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xt=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},te=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},ee=function(t){function e(e,n,r){var o=t.call(this,e,n)||this;return o._murmurHash=r,o._isFirstPooling=!0,n.initialBucketing&&(o._bucketingContent=n.initialBucketing),o}return Jt(e,t),e.prototype.finishLoop=function(t){if(200===t.status&&(this._bucketingContent=t.body),t.headers&&t.headers["last-modified"]){var e=t.headers["last-modified"];this._lastModified!==e&&this.config.onBucketingUpdated&&this.config.onBucketingUpdated(new Date(e)),this._lastModified=e}this._isFirstPooling&&(this._isFirstPooling=!1,this.updateFlagshipStatus(u.READY)),"function"==typeof this.config.onBucketingSuccess&&this.config.onBucketingSuccess({status:t.status,payload:this._bucketingContent}),this._isPooling=!1},e.prototype.startPolling=function(){var t,e=this,n=1e3*(null!==(t=this.config.pollingInterval)&&void 0!==t?t:2);T(this.config,"Bucketing polling starts","startPolling"),this.polling(),0!==n&&(this._intervalID=setInterval((function(){e.polling()}),n))},e.prototype.polling=function(){return Xt(this,void 0,void 0,(function(){var t,e,n,r,o;return te(this,(function(i){switch(i.label){case 0:if(this._isPooling)return[2];this._isPooling=!0,this._isFirstPooling&&this.updateFlagshipStatus(u.POLLING),i.label=1;case 1:return i.trys.push([1,3,,4]),t=A("https://cdn.flagship.io/{0}/bucketing.json",this.config.envId),(o={})["x-api-key"]=""+this.config.apiKey,o["x-sdk-client"]=l,o["x-sdk-version"]=p,o["Content-Type"]=I,e=o,this._lastModified&&(e["if-modified-since"]=this._lastModified),[4,this._httpClient.getAsync(t,{headers:e})];case 2:return n=i.sent(),this.finishLoop(n),[3,4];case 3:return r=i.sent(),this._isPooling=!1,j(this.config,r,"startPolling dd"),this._isFirstPooling&&this.updateFlagshipStatus(u.NOT_INITIALIZED),"function"==typeof this.config.onBucketingFail&&this.config.onBucketingFail(new Error(r)),[3,4];case 4:return[2]}}))}))},e.prototype.stopPolling=function(){clearInterval(this._intervalID),this._isPooling=!1,T(this.config,"Bucketing polling stopped","stopPolling")},e.prototype.sendContext=function(t){return Xt(this,void 0,void 0,(function(){var e,n,r,o,i;return te(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e=A("https://decision.flagship.io/v2/{0}/events",this.config.envId),(i={})["x-api-key"]=""+this.config.apiKey,i["x-sdk-client"]=l,i["x-sdk-version"]=p,i["Content-Type"]=I,n=i,r={visitorId:t.visitorId,type:"CONTEXT",data:t.context},[4,this._httpClient.postAsync(e,{headers:n,body:r})];case 1:return a.sent(),[3,3];case 2:return o=a.sent(),j(this.config,o.message||o,"sendContext"),[3,3];case 3:return[2]}}))}))},e.prototype.getCampaignsAsync=function(t){return Xt(this,void 0,void 0,(function(){var e,n=this;return te(this,(function(r){return this.sendContext(t),this._bucketingContent?this._bucketingContent.panic?(this.panic=!0,[2,[]]):(this.panic=!1,this._bucketingContent.campaigns?(e=[],this._bucketingContent.campaigns.forEach((function(r){var o=n.getVisitorCampaigns(r.variationGroups,r.id,t);o&&e.push(o)})),[2,e]):[2,[]]):[2,[]]}))}))},e.prototype.getVisitorCampaigns=function(t,e,n){for(var r=0,o=t;r<o.length;r++){var i=o[r];if(this.isMatchTargeting(i,n)){var a=this.getVariation(i,n.visitorId);return a?{id:e,variation:a,variationGroupId:i.id}:null}}return null},e.prototype.getVariation=function(t,e){for(var n=this._murmurHash.murmurHash3Int32(t.id+e)%100,r=0,o=0,i=t.variations;o<i.length;o++){var a=i[o];if(void 0!==a.allocation&&n<(r+=a.allocation))return{id:a.id,modifications:a.modifications,reference:!!a.reference}}return null},e.prototype.isMatchTargeting=function(t,e){var n=this;return!!(t&&t.targeting&&t.targeting.targetingGroups)&&t.targeting.targetingGroups.some((function(t){return n.checkAndTargeting(t.targetings,e)}))},e.prototype.checkAndTargeting=function(t,e){for(var n,r=!1,o=0,i=t;o<i.length;o++){var a=i[o],s=a.key,c=a.value,u=a.operator;if("fs_all_users"!==s){if("fs_users"===s)n=e.visitorId;else{if(!(s in e.context))continue;n=e.context[s]}if(!(r=this.testOperator(u,n,c)))break}else r=!0}return r},e.prototype.testOperator=function(t,e,n){var r;switch(t){case"EQUALS":r=e===n;break;case"NOT_EQUALS":r=e!==n;break;case"CONTAINS":r=new RegExp(""+n.join("|")).test(e.toString());break;case"NOT_CONTAINS":r=!new RegExp(""+n.join("|")).test(e.toString());break;case"GREATER_THAN":r=e>n;break;case"LOWER_THAN":r=e<n;break;case"GREATER_THAN_OR_EQUALS":r=e>=n;break;case"LOWER_THAN_OR_EQUALS":r=e<=n;break;case"STARTS_WITH":r=new RegExp("^"+n).test(e.toString());break;case"ENDS_WITH":r=new RegExp(n+"$").test(e.toString());break;default:r=!1}return r},e}(G),ne=function(){function t(){}return t.prototype.murmurHash3Int32=function(t,e){var n,r,o,i;void 0===e&&(e=0);var a=3&t.length,s=t.length-a;n=e;var c=3432918353,u=461845907;for(i=0;i<s;)o=255&t.charCodeAt(i)|(255&t.charCodeAt(++i))<<8|(255&t.charCodeAt(++i))<<16|(255&t.charCodeAt(++i))<<24,++i,n=27492+(65535&(r=5*(65535&(n=(n^=o=(65535&(o=(o=(65535&o)*c+(((o>>>16)*c&65535)<<16)&4294967295)<<15|o>>>17))*u+(((o>>>16)*u&65535)<<16)&4294967295)<<13|n>>>19))+((5*(n>>>16)&65535)<<16)&4294967295))+((58964+(r>>>16)&65535)<<16);switch(o=0,a){case 3:o^=(255&t.charCodeAt(i+2))<<16;case 2:o^=(255&t.charCodeAt(i+1))<<8;case 1:n^=o=(65535&(o=(o=(65535&(o^=255&t.charCodeAt(i)))*c+(((o>>>16)*c&65535)<<16)&4294967295)<<15|o>>>17))*u+(((o>>>16)*u&65535)<<16)&4294967295}return n^=t.length,n=2246822507*(65535&(n^=n>>>16))+((2246822507*(n>>>16)&65535)<<16)&4294967295,n=3266489909*(65535&(n^=n>>>13))+((3266489909*(n>>>16)&65535)<<16)&4294967295,(n^=n>>>16)>>>0},t}(),re=o(271),oe=function(){return oe=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},oe.apply(this,arguments)},ie=function(){function t(){}return t.prototype.getResponse=function(t){return function(t,e,n,r){return new(n||(n=Promise))((function(e,o){function i(t){try{s(r.next(t))}catch(t){o(t)}}function a(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(i,a)}s((r=r.apply(t,[])).next())}))}(this,0,void 0,(function(){var e,n,r;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(o){switch(o.label){case 0:return e=t.headers.get("Content-Type"),n="application/json"===e,[4,t.text()];case 1:if((r=o.sent())&&n&&(r=JSON.parse(r)),!t.ok)throw new Error(r||t.statusText);return[2,{status:t.status,body:r}]}}))}))},t.prototype.getAsync=function(t,e){var n=new re,o=setTimeout((function(){return n.abort()}),1e3*((null==e?void 0:e.timeout)?e.timeout:2));return a(t,oe(oe({},r),{method:"GET",headers:null==e?void 0:e.headers,signal:n.signal,keepalive:!0})).then(this.getResponse).catch((function(t){throw t})).finally((function(){clearInterval(o)}))},t.prototype.postAsync=function(t,e){var n=new re,o=setTimeout((function(){return n.abort()}),e.timeout?1e3*e.timeout:2e3);return a(t,oe(oe({},r),{method:"POST",headers:e.headers,body:JSON.stringify(e.body),signal:n.signal,keepalive:!0})).then(this.getResponse).catch((function(t){throw t})).finally((function(){clearInterval(o)}))},t}(),ae=function(){function t(){}return Object.defineProperty(t.prototype,"config",{get:function(){return this._config},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"configManager",{get:function(){return this._configManger},set:function(t){this._configManger=t},enumerable:!1,configurable:!0}),t.getInstance=function(){return this._instance||(this._instance=new this),this._instance},t.isReady=function(){var t,e,n,r,o,i=null===(e=null===(t=this._instance)||void 0===t?void 0:t.config)||void 0===e?void 0:e.apiKey,a=null===(r=null===(n=this._instance)||void 0===n?void 0:n.config)||void 0===r?void 0:r.envId,s=null===(o=this._instance)||void 0===o?void 0:o.configManager;return!!(this._instance&&i&&a&&s)},t.prototype.setStatus=function(t){var e=this.config.statusChangedCallback;if(this.config&&e&&this._status!==t)return this._status=t,void e(t);this._status=t},t.getStatus=function(){return this.getInstance()._status},t.getConfig=function(){return this.getInstance()._config},t.prototype.buildConfig=function(t){return t instanceof N?t:(null==t?void 0:t.decisionMode)===C.BUCKETING?new ct(t):new D(t)},t.prototype.buildDecisionManager=function(t,e,n){var r,o=function(e){t.setStatus(e)};if(e.decisionMode===C.BUCKETING){var i=r=new ee(n,e,new ne);r.statusChangedCallback(o),i.startPolling()}else(r=new V(n,e)).statusChangedCallback(o);return r},t.start=function(t,e,n){var r,o=this.getInstance();if((n=o.buildConfig(n)).envId=t,n.apiKey=e,o._config=n,o.setStatus(u.STARTING),n.logManager||(n.logManager=new it),!t||!e)return o.setStatus(u.NOT_INITIALIZED),j(n,"Params 'envId' and 'apiKey' must not be null or empty.",m),null;var i=null===(r=o.configManager)||void 0===r?void 0:r.decisionManager;"object"==typeof i&&i instanceof ee&&i.stopPolling();var a=new ie;i=o.buildDecisionManager(o,n,a);var s=new ot(a,n);return o.configManager?(o.configManager.config=n,o.configManager.decisionManager=i,o.configManager.trackingManager=s):o.configManager=new F(n,i,s),this.isReady()?(o._status===u.STARTING&&o.setStatus(u.READY),T(n,A("Flagship SDK (version: {0}) READY",p),m),o):(o.setStatus(u.NOT_INITIALIZED),null)},t.prototype.newVisitor=function(e,n){return t.newVisitor(e,n)},t.newVisitor=function(t,e){var n,r,o;if(!this.isReady())return null;var i,a,s=!1,c=!0;"string"==typeof t||null===t?(r=t,o=e||{}):(r=(null==t?void 0:t.visitorId)||null,o=(null==t?void 0:t.context)||{},s=!!(null==t?void 0:t.isAuthenticated),c=null===(n=null==t?void 0:t.hasConsented)||void 0===n||n,i=null==t?void 0:t.initialModifications,a=null==t?void 0:t.initialCampaigns);var u=new Qt({visitorId:r,context:o,isAuthenticated:s,hasConsented:c,configManager:this.getInstance().configManager,initialModifications:i,initialCampaigns:a}),f=new P(u);return this.getConfig().fetchNow&&f.synchronizeModifications(),f},t}();const se=ae})(),t.exports=i})()},9662:(t,e,n)=>{var r=n(614),o=n(6330);t.exports=function(t){if(r(t))return t;throw TypeError(o(t)+" is not a function")}},9483:(t,e,n)=>{var r=n(4411),o=n(6330);t.exports=function(t){if(r(t))return t;throw TypeError(o(t)+" is not a constructor")}},6077:(t,e,n)=>{var r=n(614);t.exports=function(t){if("object"==typeof t||r(t))return t;throw TypeError("Can't set "+String(t)+" as a prototype")}},1223:(t,e,n)=>{var r=n(5112),o=n(30),i=n(3070),a=r("unscopables"),s=Array.prototype;null==s[a]&&i.f(s,a,{configurable:!0,value:o(null)}),t.exports=function(t){s[a][t]=!0}},5787:t=>{t.exports=function(t,e,n){if(t instanceof e)return t;throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}},9670:(t,e,n)=>{var r=n(111);t.exports=function(t){if(r(t))return t;throw TypeError(String(t)+" is not an object")}},8533:(t,e,n)=>{"use strict";var r=n(2092).forEach,o=n(9341)("forEach");t.exports=o?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},8457:(t,e,n)=>{"use strict";var r=n(9974),o=n(7908),i=n(3411),a=n(7659),s=n(4411),c=n(7466),u=n(6135),f=n(8554),l=n(1246);t.exports=function(t){var e=o(t),n=s(this),p=arguments.length,h=p>1?arguments[1]:void 0,d=void 0!==h;d&&(h=r(h,p>2?arguments[2]:void 0,2));var y,g,v,b,m,w,O=l(e),_=0;if(!O||this==Array&&a(O))for(y=c(e.length),g=n?new this(y):Array(y);y>_;_++)w=d?h(e[_],_):e[_],u(g,_,w);else for(m=(b=f(e,O)).next,g=n?new this:[];!(v=m.call(b)).done;_++)w=d?i(b,h,[v.value,_],!0):v.value,u(g,_,w);return g.length=_,g}},1318:(t,e,n)=>{var r=n(5656),o=n(7466),i=n(1400),a=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),f=i(a,u);if(t&&n!=n){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2092:(t,e,n)=>{var r=n(9974),o=n(8361),i=n(7908),a=n(7466),s=n(5417),c=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,f=4==t,l=6==t,p=7==t,h=5==t||l;return function(d,y,g,v){for(var b,m,w=i(d),O=o(w),_=r(y,g,3),x=a(O.length),S=0,I=v||s,E=e?I(d,x):n||p?I(d,0):void 0;x>S;S++)if((h||S in O)&&(m=_(b=O[S],S,w),t))if(e)E[S]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return S;case 2:c.call(E,b)}else switch(t){case 4:return!1;case 7:c.call(E,b)}return l?-1:u||f?f:E}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},1194:(t,e,n)=>{var r=n(7293),o=n(5112),i=n(7392),a=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:(t,e,n)=>{"use strict";var r=n(7293);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},7475:(t,e,n)=>{var r=n(3157),o=n(4411),i=n(111),a=n(5112)("species");t.exports=function(t){var e;return r(t)&&(e=t.constructor,(o(e)&&(e===Array||r(e.prototype))||i(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?Array:e}},5417:(t,e,n)=>{var r=n(7475);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},3411:(t,e,n)=>{var r=n(9670),o=n(9212);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){o(t,"throw",e)}}},7072:(t,e,n)=>{var r=n(5112)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},4326:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},648:(t,e,n)=>{var r=n(1694),o=n(614),i=n(4326),a=n(5112)("toStringTag"),s="Arguments"==i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),a))?n:s?i(e):"Object"==(r=i(e))&&o(e.callee)?"Arguments":r}},5631:(t,e,n)=>{"use strict";var r=n(3070).f,o=n(30),i=n(2248),a=n(9974),s=n(5787),c=n(408),u=n(654),f=n(6340),l=n(9781),p=n(2423).fastKey,h=n(9909),d=h.set,y=h.getterFor;t.exports={getConstructor:function(t,e,n,u){var f=t((function(t,r){s(t,f,e),d(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),l||(t.size=0),null!=r&&c(r,t[u],{that:t,AS_ENTRIES:n})})),h=y(e),g=function(t,e,n){var r,o,i=h(t),a=v(t,e);return a?a.value=n:(i.last=a={index:o=p(e,!0),key:e,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),l?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},v=function(t,e){var n,r=h(t),o=p(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==e)return n};return i(f.prototype,{clear:function(){for(var t=h(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,l?t.size=0:this.size=0},delete:function(t){var e=this,n=h(e),r=v(e,t);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),l?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=h(this),r=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!v(this,t)}}),i(f.prototype,n?{get:function(t){var e=v(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),l&&r(f.prototype,"size",{get:function(){return h(this).size}}),f},setStrong:function(t,e,n){var r=e+" Iterator",o=y(e),i=y(r);u(t,e,(function(t,e){d(this,{type:r,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),f(e)}}},7710:(t,e,n)=>{"use strict";var r=n(2109),o=n(7854),i=n(4705),a=n(1320),s=n(2423),c=n(408),u=n(5787),f=n(614),l=n(111),p=n(7293),h=n(7072),d=n(8003),y=n(9587);t.exports=function(t,e,n){var g=-1!==t.indexOf("Map"),v=-1!==t.indexOf("Weak"),b=g?"set":"add",m=o[t],w=m&&m.prototype,O=m,_={},x=function(t){var e=w[t];a(w,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!l(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(i(t,!f(m)||!(v||w.forEach&&!p((function(){(new m).entries().next()})))))O=n.getConstructor(e,t,g,b),s.enable();else if(i(t,!0)){var S=new O,I=S[b](v?{}:-0,1)!=S,E=p((function(){S.has(1)})),C=h((function(t){new m(t)})),M=!v&&p((function(){for(var t=new m,e=5;e--;)t[b](e,e);return!t.has(-0)}));C||((O=e((function(e,n){u(e,O,t);var r=y(new m,e,O);return null!=n&&c(n,r[b],{that:r,AS_ENTRIES:g}),r}))).prototype=w,w.constructor=O),(E||M)&&(x("delete"),x("has"),g&&x("get")),(M||I)&&x(b),v&&w.clear&&delete w.clear}return _[t]=O,r({global:!0,forced:O!=m},_),d(O,t),v||n.setStrong(O,t,g),O}},9920:(t,e,n)=>{var r=n(6656),o=n(3887),i=n(1236),a=n(3070);t.exports=function(t,e){for(var n=o(e),s=a.f,c=i.f,u=0;u<n.length;u++){var f=n[u];r(t,f)||s(t,f,c(e,f))}}},8544:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},4994:(t,e,n)=>{"use strict";var r=n(3383).IteratorPrototype,o=n(30),i=n(9114),a=n(8003),s=n(7497),c=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=o(r,{next:i(1,n)}),a(t,u,!1,!0),s[u]=c,t}},8880:(t,e,n)=>{var r=n(9781),o=n(3070),i=n(9114);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,n)=>{"use strict";var r=n(4948),o=n(3070),i=n(9114);t.exports=function(t,e,n){var a=r(e);a in t?o.f(t,a,i(0,n)):t[a]=n}},654:(t,e,n)=>{"use strict";var r=n(2109),o=n(1913),i=n(6530),a=n(614),s=n(4994),c=n(9518),u=n(7674),f=n(8003),l=n(8880),p=n(1320),h=n(5112),d=n(7497),y=n(3383),g=i.PROPER,v=i.CONFIGURABLE,b=y.IteratorPrototype,m=y.BUGGY_SAFARI_ITERATORS,w=h("iterator"),O="keys",_="values",x="entries",S=function(){return this};t.exports=function(t,e,n,i,h,y,I){s(n,e,i);var E,C,M,P=function(t){if(t===h&&N)return N;if(!m&&t in T)return T[t];switch(t){case O:case _:case x:return function(){return new n(this,t)}}return function(){return new n(this)}},A=e+" Iterator",j=!1,T=t.prototype,k=T[w]||T["@@iterator"]||h&&T[h],N=!m&&k||P(h),R="Array"==e&&T.entries||k;if(R&&(E=c(R.call(new t)))!==Object.prototype&&E.next&&(o||c(E)===b||(u?u(E,b):a(E[w])||p(E,w,S)),f(E,A,!0,!0),o&&(d[A]=S)),g&&h==_&&k&&k.name!==_&&(!o&&v?l(T,"name",_):(j=!0,N=function(){return k.call(this)})),h)if(C={values:P(_),keys:y?N:P(O),entries:P(x)},I)for(M in C)(m||j||!(M in T))&&p(T,M,C[M]);else r({target:e,proto:!0,forced:m||j},C);return o&&!I||T[w]===N||p(T,w,N,{name:h}),d[e]=N,C}},7235:(t,e,n)=>{var r=n(857),o=n(6656),i=n(6061),a=n(3070).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},9781:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,n)=>{var r=n(7854),o=n(111),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,e,n)=>{var r=n(317)("span").classList,o=r&&r.constructor&&r.constructor.prototype;t.exports=o===Object.prototype?void 0:o},7871:t=>{t.exports="object"==typeof window},1528:(t,e,n)=>{var r=n(8113),o=n(7854);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},6833:(t,e,n)=>{var r=n(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},5268:(t,e,n)=>{var r=n(4326),o=n(7854);t.exports="process"==r(o.process)},1036:(t,e,n)=>{var r=n(8113);t.exports=/web0s(?!.*chrome)/i.test(r)},8113:(t,e,n)=>{var r=n(5005);t.exports=r("navigator","userAgent")||""},7392:(t,e,n)=>{var r,o,i=n(7854),a=n(8113),s=i.process,c=i.Deno,u=s&&s.versions||c&&c.version,f=u&&u.v8;f?o=(r=f.split("."))[0]<4?1:r[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),t.exports=o&&+o},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,n)=>{var r=n(7854),o=n(1236).f,i=n(8880),a=n(1320),s=n(3505),c=n(9920),u=n(4705);t.exports=function(t,e){var n,f,l,p,h,d=t.target,y=t.global,g=t.stat;if(n=y?r:g?r[d]||s(d,{}):(r[d]||{}).prototype)for(f in e){if(p=e[f],l=t.noTargetGet?(h=o(n,f))&&h.value:n[f],!u(y?f:d+(g?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;c(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),a(n,f,p,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},6677:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},9974:(t,e,n)=>{var r=n(9662);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},6530:(t,e,n)=>{var r=n(9781),o=n(6656),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},5005:(t,e,n)=>{var r=n(7854),o=n(614),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},1246:(t,e,n)=>{var r=n(648),o=n(8173),i=n(7497),a=n(5112)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[r(t)]}},8554:(t,e,n)=>{var r=n(9662),o=n(9670),i=n(1246);t.exports=function(t,e){var n=arguments.length<2?i(t):e;if(r(n))return o(n.call(t));throw TypeError(String(t)+" is not iterable")}},8173:(t,e,n)=>{var r=n(9662);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},7854:t=>{var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||function(){return this}()||Function("return this")()},6656:(t,e,n)=>{var r=n(7908),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(r(t),e)}},3501:t=>{t.exports={}},842:(t,e,n)=>{var r=n(7854);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},490:(t,e,n)=>{var r=n(5005);t.exports=r("document","documentElement")},4664:(t,e,n)=>{var r=n(9781),o=n(7293),i=n(317);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,n)=>{var r=n(7293),o=n(4326),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},9587:(t,e,n)=>{var r=n(614),o=n(111),i=n(7674);t.exports=function(t,e,n){var a,s;return i&&r(a=e.constructor)&&a!==n&&o(s=a.prototype)&&s!==n.prototype&&i(t,s),t}},2788:(t,e,n)=>{var r=n(614),o=n(5465),i=Function.toString;r(o.inspectSource)||(o.inspectSource=function(t){return i.call(t)}),t.exports=o.inspectSource},2423:(t,e,n)=>{var r=n(2109),o=n(3501),i=n(111),a=n(6656),s=n(3070).f,c=n(8006),u=n(1156),f=n(9711),l=n(6677),p=!1,h=f("meta"),d=0,y=Object.isExtensible||function(){return!0},g=function(t){s(t,h,{value:{objectID:"O"+d++,weakData:{}}})},v=t.exports={enable:function(){v.enable=function(){},p=!0;var t=c.f,e=[].splice,n={};n[h]=1,t(n).length&&(c.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===h){e.call(r,o,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,h)){if(!y(t))return"F";if(!e)return"E";g(t)}return t[h].objectID},getWeakData:function(t,e){if(!a(t,h)){if(!y(t))return!0;if(!e)return!1;g(t)}return t[h].weakData},onFreeze:function(t){return l&&p&&y(t)&&!a(t,h)&&g(t),t}};o[h]=!0},9909:(t,e,n)=>{var r,o,i,a=n(8536),s=n(7854),c=n(111),u=n(8880),f=n(6656),l=n(5465),p=n(6200),h=n(3501),d="Object already initialized",y=s.WeakMap;if(a||l.state){var g=l.state||(l.state=new y),v=g.get,b=g.has,m=g.set;r=function(t,e){if(b.call(g,t))throw new TypeError(d);return e.facade=t,m.call(g,t,e),e},o=function(t){return v.call(g,t)||{}},i=function(t){return b.call(g,t)}}else{var w=p("state");h[w]=!0,r=function(t,e){if(f(t,w))throw new TypeError(d);return e.facade=t,u(t,w,e),e},o=function(t){return f(t,w)?t[w]:{}},i=function(t){return f(t,w)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},7659:(t,e,n)=>{var r=n(5112),o=n(7497),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},3157:(t,e,n)=>{var r=n(4326);t.exports=Array.isArray||function(t){return"Array"==r(t)}},614:t=>{t.exports=function(t){return"function"==typeof t}},4411:(t,e,n)=>{var r=n(7293),o=n(614),i=n(648),a=n(5005),s=n(2788),c=[],u=a("Reflect","construct"),f=/^\s*(?:class|function)\b/,l=f.exec,p=!f.exec((function(){})),h=function(t){if(!o(t))return!1;try{return u(Object,c,t),!0}catch(t){return!1}};t.exports=!u||r((function(){var t;return h(h.call)||!h(Object)||!h((function(){t=!0}))||t}))?function(t){if(!o(t))return!1;switch(i(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return p||!!l.call(f,s(t))}:h},4705:(t,e,n)=>{var r=n(7293),o=n(614),i=/#|\.prototype\./,a=function(t,e){var n=c[s(t)];return n==f||n!=u&&(o(e)?r(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},111:(t,e,n)=>{var r=n(614);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},1913:t=>{t.exports=!1},2190:(t,e,n)=>{var r=n(614),o=n(5005),i=n(3307);t.exports=i?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return r(e)&&Object(t)instanceof e}},408:(t,e,n)=>{var r=n(9670),o=n(7659),i=n(7466),a=n(9974),s=n(8554),c=n(1246),u=n(9212),f=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var l,p,h,d,y,g,v,b=n&&n.that,m=!(!n||!n.AS_ENTRIES),w=!(!n||!n.IS_ITERATOR),O=!(!n||!n.INTERRUPTED),_=a(e,b,1+m+O),x=function(t){return l&&u(l,"normal",t),new f(!0,t)},S=function(t){return m?(r(t),O?_(t[0],t[1],x):_(t[0],t[1])):O?_(t,x):_(t)};if(w)l=t;else{if(!(p=c(t)))throw TypeError(String(t)+" is not iterable");if(o(p)){for(h=0,d=i(t.length);d>h;h++)if((y=S(t[h]))&&y instanceof f)return y;return new f(!1)}l=s(t,p)}for(g=l.next;!(v=g.call(l)).done;){try{y=S(v.value)}catch(t){u(l,"throw",t)}if("object"==typeof y&&y&&y instanceof f)return y}return new f(!1)}},9212:(t,e,n)=>{var r=n(9670),o=n(8173);t.exports=function(t,e,n){var i,a;r(t);try{if(!(i=o(t,"return"))){if("throw"===e)throw n;return n}i=i.call(t)}catch(t){a=!0,i=t}if("throw"===e)throw n;if(a)throw i;return r(i),n}},3383:(t,e,n)=>{"use strict";var r,o,i,a=n(7293),s=n(614),c=n(30),u=n(9518),f=n(1320),l=n(5112),p=n(1913),h=l("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):d=!0),null==r||a((function(){var t={};return r[h].call(t)!==t}))?r={}:p&&(r=c(r)),s(r[h])||f(r,h,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},7497:t=>{t.exports={}},5948:(t,e,n)=>{var r,o,i,a,s,c,u,f,l=n(7854),p=n(1236).f,h=n(261).set,d=n(6833),y=n(1528),g=n(1036),v=n(5268),b=l.MutationObserver||l.WebKitMutationObserver,m=l.document,w=l.process,O=l.Promise,_=p(l,"queueMicrotask"),x=_&&_.value;x||(r=function(){var t,e;for(v&&(t=w.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},d||v||g||!b||!m?!y&&O&&O.resolve?((u=O.resolve(void 0)).constructor=O,f=u.then,a=function(){f.call(u,r)}):a=v?function(){w.nextTick(r)}:function(){h.call(l,r)}:(s=!0,c=m.createTextNode(""),new b(r).observe(c,{characterData:!0}),a=function(){c.data=s=!s})),t.exports=x||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},3366:(t,e,n)=>{var r=n(7854);t.exports=r.Promise},133:(t,e,n)=>{var r=n(7392),o=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8536:(t,e,n)=>{var r=n(7854),o=n(614),i=n(2788),a=r.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},8523:(t,e,n)=>{"use strict";var r=n(9662),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},30:(t,e,n)=>{var r,o=n(9670),i=n(6048),a=n(748),s=n(3501),c=n(490),u=n(317),f=n(6200)("IE_PROTO"),l=function(){},p=function(t){return"<script>"+t+"<\/script>"},h=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},d=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;d="undefined"!=typeof document?document.domain&&r?h(r):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):h(r);for(var n=a.length;n--;)delete d.prototype[a[n]];return d()};s[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(l.prototype=o(t),n=new l,l.prototype=null,n[f]=t):n=d(),void 0===e?n:i(n,e)}},6048:(t,e,n)=>{var r=n(9781),o=n(3070),i=n(9670),a=n(1956);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),s=r.length,c=0;s>c;)o.f(t,n=r[c++],e[n]);return t}},3070:(t,e,n)=>{var r=n(9781),o=n(4664),i=n(9670),a=n(4948),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(i(t),e=a(e),i(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:(t,e,n)=>{var r=n(9781),o=n(5296),i=n(9114),a=n(5656),s=n(4948),c=n(6656),u=n(4664),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=s(e),u)try{return f(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},1156:(t,e,n)=>{var r=n(5656),o=n(8006).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},8006:(t,e,n)=>{var r=n(6324),o=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},9518:(t,e,n)=>{var r=n(6656),o=n(614),i=n(7908),a=n(6200),s=n(8544),c=a("IE_PROTO"),u=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){var e=i(t);if(r(e,c))return e[c];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof Object?u:null}},6324:(t,e,n)=>{var r=n(6656),o=n(5656),i=n(1318).indexOf,a=n(3501);t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)!r(a,n)&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},1956:(t,e,n)=>{var r=n(6324),o=n(748);t.exports=Object.keys||function(t){return r(t,o)}},5296:(t,e)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},7674:(t,e,n)=>{var r=n(9670),o=n(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),o(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},288:(t,e,n)=>{"use strict";var r=n(1694),o=n(648);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},2140:(t,e,n)=>{var r=n(614),o=n(111);t.exports=function(t,e){var n,i;if("string"===e&&r(n=t.toString)&&!o(i=n.call(t)))return i;if(r(n=t.valueOf)&&!o(i=n.call(t)))return i;if("string"!==e&&r(n=t.toString)&&!o(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},3887:(t,e,n)=>{var r=n(5005),o=n(8006),i=n(5181),a=n(9670);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=i.f;return n?e.concat(n(t)):e}},857:(t,e,n)=>{var r=n(7854);t.exports=r},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},9478:(t,e,n)=>{var r=n(9670),o=n(111),i=n(8523);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},2248:(t,e,n)=>{var r=n(1320);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},1320:(t,e,n)=>{var r=n(7854),o=n(614),i=n(6656),a=n(8880),s=n(3505),c=n(2788),u=n(9909),f=n(6530).CONFIGURABLE,l=u.get,p=u.enforce,h=String(String).split("String");(t.exports=function(t,e,n,c){var u,l=!!c&&!!c.unsafe,d=!!c&&!!c.enumerable,y=!!c&&!!c.noTargetGet,g=c&&void 0!==c.name?c.name:e;o(n)&&("Symbol("===String(g).slice(0,7)&&(g="["+String(g).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(n,"name")||f&&n.name!==g)&&a(n,"name",g),(u=p(n)).source||(u.source=h.join("string"==typeof g?g:""))),t!==r?(l?!y&&t[e]&&(d=!0):delete t[e],d?t[e]=n:a(t,e,n)):d?t[e]=n:s(e,n)})(Function.prototype,"toString",(function(){return o(this)&&l(this).source||c(this)}))},4488:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},3505:(t,e,n)=>{var r=n(7854);t.exports=function(t,e){try{Object.defineProperty(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},6340:(t,e,n)=>{"use strict";var r=n(5005),o=n(3070),i=n(5112),a=n(9781),s=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},8003:(t,e,n)=>{var r=n(3070).f,o=n(6656),i=n(5112)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},6200:(t,e,n)=>{var r=n(2309),o=n(9711),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5465:(t,e,n)=>{var r=n(7854),o=n(3505),i="__core-js_shared__",a=r[i]||o(i,{});t.exports=a},2309:(t,e,n)=>{var r=n(1913),o=n(5465);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:(t,e,n)=>{var r=n(9670),o=n(9483),i=n(5112)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},8710:(t,e,n)=>{var r=n(9958),o=n(1340),i=n(4488),a=function(t){return function(e,n){var a,s,c=o(i(e)),u=r(n),f=c.length;return u<0||u>=f?t?"":void 0:(a=c.charCodeAt(u))<55296||a>56319||u+1===f||(s=c.charCodeAt(u+1))<56320||s>57343?t?c.charAt(u):a:t?c.slice(u,u+2):s-56320+(a-55296<<10)+65536}};t.exports={codeAt:a(!1),charAt:a(!0)}},261:(t,e,n)=>{var r,o,i,a,s=n(7854),c=n(614),u=n(7293),f=n(9974),l=n(490),p=n(317),h=n(6833),d=n(5268),y=s.setImmediate,g=s.clearImmediate,v=s.process,b=s.MessageChannel,m=s.Dispatch,w=0,O={};try{r=s.location}catch(t){}var _=function(t){if(O.hasOwnProperty(t)){var e=O[t];delete O[t],e()}},x=function(t){return function(){_(t)}},S=function(t){_(t.data)},I=function(t){s.postMessage(String(t),r.protocol+"//"+r.host)};y&&g||(y=function(t){for(var e=[],n=arguments.length,r=1;n>r;)e.push(arguments[r++]);return O[++w]=function(){(c(t)?t:Function(t)).apply(void 0,e)},o(w),w},g=function(t){delete O[t]},d?o=function(t){v.nextTick(x(t))}:m&&m.now?o=function(t){m.now(x(t))}:b&&!h?(a=(i=new b).port2,i.port1.onmessage=S,o=f(a.postMessage,a,1)):s.addEventListener&&c(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!u(I)?(o=I,s.addEventListener("message",S,!1)):o="onreadystatechange"in p("script")?function(t){l.appendChild(p("script")).onreadystatechange=function(){l.removeChild(this),_(t)}}:function(t){setTimeout(x(t),0)}),t.exports={set:y,clear:g}},1400:(t,e,n)=>{var r=n(9958),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},5656:(t,e,n)=>{var r=n(8361),o=n(4488);t.exports=function(t){return r(o(t))}},9958:t=>{var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},7466:(t,e,n)=>{var r=n(9958),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},7908:(t,e,n)=>{var r=n(4488);t.exports=function(t){return Object(r(t))}},7593:(t,e,n)=>{var r=n(111),o=n(2190),i=n(8173),a=n(2140),s=n(5112)("toPrimitive");t.exports=function(t,e){if(!r(t)||o(t))return t;var n,c=i(t,s);if(c){if(void 0===e&&(e="default"),n=c.call(t,e),!r(n)||o(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},4948:(t,e,n)=>{var r=n(7593),o=n(2190);t.exports=function(t){var e=r(t,"string");return o(e)?e:String(e)}},1694:(t,e,n)=>{var r={};r[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(r)},1340:(t,e,n)=>{var r=n(648);t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},6330:t=>{t.exports=function(t){try{return String(t)}catch(t){return"Object"}}},9711:t=>{var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},3307:(t,e,n)=>{var r=n(133);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},6061:(t,e,n)=>{var r=n(5112);e.f=r},5112:(t,e,n)=>{var r=n(7854),o=n(2309),i=n(6656),a=n(9711),s=n(133),c=n(3307),u=o("wks"),f=r.Symbol,l=c?f:f&&f.withoutSetter||a;t.exports=function(t){return i(u,t)&&(s||"string"==typeof u[t])||(s&&i(f,t)?u[t]=f[t]:u[t]=l("Symbol."+t)),u[t]}},7327:(t,e,n)=>{"use strict";var r=n(2109),o=n(2092).filter;r({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},1038:(t,e,n)=>{var r=n(2109),o=n(8457);r({target:"Array",stat:!0,forced:!n(7072)((function(t){Array.from(t)}))},{from:o})},6992:(t,e,n)=>{"use strict";var r=n(5656),o=n(1223),i=n(7497),a=n(9909),s=n(654),c="Array Iterator",u=a.set,f=a.getterFor(c);t.exports=s(Array,"Array",(function(t,e){u(this,{type:c,target:r(t),index:0,kind:e})}),(function(){var t=f(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},7042:(t,e,n)=>{"use strict";var r=n(2109),o=n(3157),i=n(4411),a=n(111),s=n(1400),c=n(7466),u=n(5656),f=n(6135),l=n(5112),p=n(1194)("slice"),h=l("species"),d=[].slice,y=Math.max;r({target:"Array",proto:!0,forced:!p},{slice:function(t,e){var n,r,l,p=u(this),g=c(p.length),v=s(t,g),b=s(void 0===e?g:e,g);if(o(p)&&(n=p.constructor,(i(n)&&(n===Array||o(n.prototype))||a(n)&&null===(n=n[h]))&&(n=void 0),n===Array||void 0===n))return d.call(p,v,b);for(r=new(void 0===n?Array:n)(y(b-v,0)),l=0;v<b;v++,l++)v in p&&f(r,l,p[v]);return r.length=l,r}})},8309:(t,e,n)=>{var r=n(9781),o=n(6530).EXISTS,i=n(3070).f,a=Function.prototype,s=a.toString,c=/^\s*function ([^ (]*)/;r&&!o&&i(a,"name",{configurable:!0,get:function(){try{return s.call(this).match(c)[1]}catch(t){return""}}})},1532:(t,e,n)=>{"use strict";var r=n(7710),o=n(5631);t.exports=r("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),o)},5003:(t,e,n)=>{var r=n(2109),o=n(7293),i=n(5656),a=n(1236).f,s=n(9781),c=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||c,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},9337:(t,e,n)=>{var r=n(2109),o=n(9781),i=n(3887),a=n(5656),s=n(1236),c=n(6135);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),o=s.f,u=i(r),f={},l=0;u.length>l;)void 0!==(n=o(r,e=u[l++]))&&c(f,e,n);return f}})},7941:(t,e,n)=>{var r=n(2109),o=n(7908),i=n(1956);r({target:"Object",stat:!0,forced:n(7293)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},1539:(t,e,n)=>{var r=n(1694),o=n(1320),i=n(288);r||o(Object.prototype,"toString",i,{unsafe:!0})},8674:(t,e,n)=>{"use strict";var r,o,i,a,s=n(2109),c=n(1913),u=n(7854),f=n(5005),l=n(3366),p=n(1320),h=n(2248),d=n(7674),y=n(8003),g=n(6340),v=n(9662),b=n(614),m=n(111),w=n(5787),O=n(2788),_=n(408),x=n(7072),S=n(6707),I=n(261).set,E=n(5948),C=n(9478),M=n(842),P=n(8523),A=n(2534),j=n(9909),T=n(4705),k=n(5112),N=n(7871),R=n(5268),L=n(7392),D=k("species"),F="Promise",G=j.get,B=j.set,V=j.getterFor(F),H=l&&l.prototype,z=l,U=H,K=u.TypeError,$=u.document,Y=u.process,q=P.f,W=q,Z=!!($&&$.createEvent&&u.dispatchEvent),Q=b(u.PromiseRejectionEvent),J="unhandledrejection",X=!1,tt=T(F,(function(){var t=O(z),e=t!==String(z);if(!e&&66===L)return!0;if(c&&!U.finally)return!0;if(L>=51&&/native code/.test(t))return!1;var n=new z((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[D]=r,!(X=n.then((function(){}))instanceof r)||!e&&N&&!Q})),et=tt||!x((function(t){z.all(t).catch((function(){}))})),nt=function(t){var e;return!(!m(t)||!b(e=t.then))&&e},rt=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;E((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var a,s,c,u=n[i++],f=o?u.ok:u.fail,l=u.resolve,p=u.reject,h=u.domain;try{f?(o||(2===t.rejection&&st(t),t.rejection=1),!0===f?a=r:(h&&h.enter(),a=f(r),h&&(h.exit(),c=!0)),a===u.promise?p(K("Promise-chain cycle")):(s=nt(a))?s.call(a,l,p):l(a)):p(r)}catch(t){h&&!c&&h.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&it(t)}))}},ot=function(t,e,n){var r,o;Z?((r=$.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:e,reason:n},!Q&&(o=u["on"+t])?o(r):t===J&&M("Unhandled promise rejection",n)},it=function(t){I.call(u,(function(){var e,n=t.facade,r=t.value;if(at(t)&&(e=A((function(){R?Y.emit("unhandledRejection",r,n):ot(J,n,r)})),t.rejection=R||at(t)?2:1,e.error))throw e.value}))},at=function(t){return 1!==t.rejection&&!t.parent},st=function(t){I.call(u,(function(){var e=t.facade;R?Y.emit("rejectionHandled",e):ot("rejectionhandled",e,t.value)}))},ct=function(t,e,n){return function(r){t(e,r,n)}},ut=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,rt(t,!0))},ft=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw K("Promise can't be resolved itself");var r=nt(e);r?E((function(){var n={done:!1};try{r.call(e,ct(ft,n,t),ct(ut,n,t))}catch(e){ut(n,e,t)}})):(t.value=e,t.state=1,rt(t,!1))}catch(e){ut({done:!1},e,t)}}};if(tt&&(U=(z=function(t){w(this,z,F),v(t),r.call(this);var e=G(this);try{t(ct(ft,e),ct(ut,e))}catch(t){ut(e,t)}}).prototype,(r=function(t){B(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(U,{then:function(t,e){var n=V(this),r=q(S(this,z));return r.ok=!b(t)||t,r.fail=b(e)&&e,r.domain=R?Y.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&rt(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=G(t);this.promise=t,this.resolve=ct(ft,e),this.reject=ct(ut,e)},P.f=q=function(t){return t===z||t===i?new o(t):W(t)},!c&&b(l)&&H!==Object.prototype)){a=H.then,X||(p(H,"then",(function(t,e){var n=this;return new z((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),p(H,"catch",U.catch,{unsafe:!0}));try{delete H.constructor}catch(t){}d&&d(H,U)}s({global:!0,wrap:!0,forced:tt},{Promise:z}),y(z,F,!1,!0),g(F),i=f(F),s({target:F,stat:!0,forced:tt},{reject:function(t){var e=q(this);return e.reject.call(void 0,t),e.promise}}),s({target:F,stat:!0,forced:c||tt},{resolve:function(t){return C(c&&this===i?z:this,t)}}),s({target:F,stat:!0,forced:et},{all:function(t){var e=this,n=q(e),r=n.resolve,o=n.reject,i=A((function(){var n=v(e.resolve),i=[],a=0,s=1;_(t,(function(t){var c=a++,u=!1;i.push(void 0),s++,n.call(e,t).then((function(t){u||(u=!0,i[c]=t,--s||r(i))}),o)})),--s||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=q(e),r=n.reject,o=A((function(){var o=v(e.resolve);_(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},8783:(t,e,n)=>{"use strict";var r=n(8710).charAt,o=n(1340),i=n(9909),a=n(654),s="String Iterator",c=i.set,u=i.getterFor(s);a(String,"String",(function(t){c(this,{type:s,string:o(t),index:0})}),(function(){var t,e=u(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},1817:(t,e,n)=>{"use strict";var r=n(2109),o=n(9781),i=n(7854),a=n(6656),s=n(614),c=n(111),u=n(3070).f,f=n(9920),l=i.Symbol;if(o&&s(l)&&(!("description"in l.prototype)||void 0!==l().description)){var p={},h=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof h?new l(t):void 0===t?l():l(t);return""===t&&(p[e]=!0),e};f(h,l);var d=h.prototype=l.prototype;d.constructor=h;var y=d.toString,g="Symbol(test)"==String(l("test")),v=/^Symbol\((.*)\)[^)]+$/;u(d,"description",{configurable:!0,get:function(){var t=c(this)?this.valueOf():this,e=y.call(t);if(a(p,t))return"";var n=g?e.slice(7,-1):e.replace(v,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:h})}},2165:(t,e,n)=>{n(7235)("iterator")},2526:(t,e,n)=>{"use strict";var r=n(2109),o=n(7854),i=n(5005),a=n(1913),s=n(9781),c=n(133),u=n(7293),f=n(6656),l=n(3157),p=n(614),h=n(111),d=n(2190),y=n(9670),g=n(7908),v=n(5656),b=n(4948),m=n(1340),w=n(9114),O=n(30),_=n(1956),x=n(8006),S=n(1156),I=n(5181),E=n(1236),C=n(3070),M=n(5296),P=n(1320),A=n(2309),j=n(6200),T=n(3501),k=n(9711),N=n(5112),R=n(6061),L=n(7235),D=n(8003),F=n(9909),G=n(2092).forEach,B=j("hidden"),V="Symbol",H=N("toPrimitive"),z=F.set,U=F.getterFor(V),K=Object.prototype,$=o.Symbol,Y=i("JSON","stringify"),q=E.f,W=C.f,Z=S.f,Q=M.f,J=A("symbols"),X=A("op-symbols"),tt=A("string-to-symbol-registry"),et=A("symbol-to-string-registry"),nt=A("wks"),rt=o.QObject,ot=!rt||!rt.prototype||!rt.prototype.findChild,it=s&&u((function(){return 7!=O(W({},"a",{get:function(){return W(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=q(K,e);r&&delete K[e],W(t,e,n),r&&t!==K&&W(K,e,r)}:W,at=function(t,e){var n=J[t]=O($.prototype);return z(n,{type:V,tag:t,description:e}),s||(n.description=e),n},st=function(t,e,n){t===K&&st(X,e,n),y(t);var r=b(e);return y(n),f(J,r)?(n.enumerable?(f(t,B)&&t[B][r]&&(t[B][r]=!1),n=O(n,{enumerable:w(0,!1)})):(f(t,B)||W(t,B,w(1,{})),t[B][r]=!0),it(t,r,n)):W(t,r,n)},ct=function(t,e){y(t);var n=v(e),r=_(n).concat(pt(n));return G(r,(function(e){s&&!ut.call(n,e)||st(t,e,n[e])})),t},ut=function(t){var e=b(t),n=Q.call(this,e);return!(this===K&&f(J,e)&&!f(X,e))&&(!(n||!f(this,e)||!f(J,e)||f(this,B)&&this[B][e])||n)},ft=function(t,e){var n=v(t),r=b(e);if(n!==K||!f(J,r)||f(X,r)){var o=q(n,r);return!o||!f(J,r)||f(n,B)&&n[B][r]||(o.enumerable=!0),o}},lt=function(t){var e=Z(v(t)),n=[];return G(e,(function(t){f(J,t)||f(T,t)||n.push(t)})),n},pt=function(t){var e=t===K,n=Z(e?X:v(t)),r=[];return G(n,(function(t){!f(J,t)||e&&!f(K,t)||r.push(J[t])})),r};if(c||(P(($=function(){if(this instanceof $)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,e=k(t),n=function(t){this===K&&n.call(X,t),f(this,B)&&f(this[B],e)&&(this[B][e]=!1),it(this,e,w(1,t))};return s&&ot&&it(K,e,{configurable:!0,set:n}),at(e,t)}).prototype,"toString",(function(){return U(this).tag})),P($,"withoutSetter",(function(t){return at(k(t),t)})),M.f=ut,C.f=st,E.f=ft,x.f=S.f=lt,I.f=pt,R.f=function(t){return at(N(t),t)},s&&(W($.prototype,"description",{configurable:!0,get:function(){return U(this).description}}),a||P(K,"propertyIsEnumerable",ut,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:$}),G(_(nt),(function(t){L(t)})),r({target:V,stat:!0,forced:!c},{for:function(t){var e=m(t);if(f(tt,e))return tt[e];var n=$(e);return tt[e]=n,et[n]=e,n},keyFor:function(t){if(!d(t))throw TypeError(t+" is not a symbol");if(f(et,t))return et[t]},useSetter:function(){ot=!0},useSimple:function(){ot=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!s},{create:function(t,e){return void 0===e?O(t):ct(O(t),e)},defineProperty:st,defineProperties:ct,getOwnPropertyDescriptor:ft}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:lt,getOwnPropertySymbols:pt}),r({target:"Object",stat:!0,forced:u((function(){I.f(1)}))},{getOwnPropertySymbols:function(t){return I.f(g(t))}}),Y&&r({target:"JSON",stat:!0,forced:!c||u((function(){var t=$();return"[null]"!=Y([t])||"{}"!=Y({a:t})||"{}"!=Y(Object(t))}))},{stringify:function(t,e,n){for(var r,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=e,(h(e)||void 0!==t)&&!d(t))return l(e)||(e=function(t,e){if(p(r)&&(e=r.call(this,t,e)),!d(e))return e}),o[1]=e,Y.apply(null,o)}}),!$.prototype[H]){var ht=$.prototype.valueOf;P($.prototype,H,(function(){return ht.apply(this,arguments)}))}D($,V),T[B]=!0},4747:(t,e,n)=>{var r=n(7854),o=n(8324),i=n(8509),a=n(8533),s=n(8880),c=function(t){if(t&&t.forEach!==a)try{s(t,"forEach",a)}catch(e){t.forEach=a}};for(var u in o)o[u]&&c(r[u]&&r[u].prototype);c(i)},3948:(t,e,n)=>{var r=n(7854),o=n(8324),i=n(8509),a=n(6992),s=n(8880),c=n(5112),u=c("iterator"),f=c("toStringTag"),l=a.values,p=function(t,e){if(t){if(t[u]!==l)try{s(t,u,l)}catch(e){t[u]=l}if(t[f]||s(t,f,e),o[e])for(var n in a)if(t[n]!==a[n])try{s(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var h in o)p(r[h]&&r[h].prototype,h);p(i,"DOMTokenList")},5666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),a=new M(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=I(a,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=f(t,e,n);if("normal"===c.type){if(r=n.done?d:p,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l="suspendedStart",p="suspendedYield",h="executing",d="completed",y={};function g(){}function v(){}function b(){}var m={};c(m,i,(function(){return this}));var w=Object.getPrototypeOf,O=w&&w(w(P([])));O&&O!==n&&r.call(O,i)&&(m=O);var _=b.prototype=g.prototype=Object.create(m);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function n(o,i,a,s){var c=f(t[o],t,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,s)}))}s(c.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function I(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=f(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function P(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:e,done:!0}}return v.prototype=b,c(_,"constructor",b),c(b,"constructor",v),v.displayName=c(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},x(S.prototype),c(S.prototype,a,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new S(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(_),c(_,s,"Generator"),c(_,i,(function(){return this})),c(_,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=P,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},5254:t=>{"use strict";t.exports=require("event-target-shim")},1239:t=>{"use strict";t.exports=require("events")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2781:t=>{"use strict";t.exports=require("stream")},7310:t=>{"use strict";t.exports=require("url")},9796:t=>{"use strict";t.exports=require("zlib")}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{DecisionMode:()=>o.DecisionMode,FlagshipContext:()=>h,FlagshipProvider:()=>d,noVisitorDefault:()=>j,noVisitorMessage:()=>A,useFlagship:()=>P,useFsActivate:()=>M,useFsModification:()=>_,useFsModificationInfo:()=>S,useFsModifications:()=>O,useFsSynchronizeModifications:()=>E}),n(6992),n(1532),n(1539),n(8783),n(3948),n(4747),n(7941),n(2526),n(7327),n(5003),n(9337),n(1817),n(2165),n(7042),n(8309),n(1038);const t=require("react");var e=n.n(t),o=n(6968);function i(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.error&&t.logLevel&&!(t.logLevel<o.LogLevel.ERROR)&&t.logManager.error(e,n)}function a(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.warning&&t.logLevel&&!(t.logLevel<o.LogLevel.WARNING)&&t.logManager.warning(e,n)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var p={status:{isLoading:!0,isSdkReady:!1}},h=(0,t.createContext)({state:f({},p)}),d=function(n){var r=n.children,a=n.fetchNow,c=n.envId,u=n.apiKey,l=n.decisionMode,d=n.timeout,y=n.logLevel,g=n.statusChangedCallback,v=n.logManager,b=n.pollingInterval,m=n.visitorData,w=n.onInitStart,O=n.onInitDone,_=n.onBucketingSuccess,x=n.onBucketingFail,S=n.loadingComponent,I=n.onBucketingUpdated,E=n.onUpdate,C=n.enableClientCache,M=n.initialBucketing,P=n.initialCampaigns,A=n.initialModifications,j=n.synchronizeOnBucketingUpdated,T=new Map;A?A.forEach((function(t){T.set(t.key,t)})):P&&(T=function(t){var e=new Map;return t&&Array.isArray(t)?(t.forEach((function(t){var n=t.variation.modifications.value;for(var r in n){var o=n[r];e.set(r,{key:r,campaignId:t.id,variationGroupId:t.variationGroupId,variationId:t.variation.id,isReference:t.variation.reference,value:o})}})),e):e}(P));var k=s((0,t.useState)(f(f({},p),{},{modifications:T})),2),N=k[0],R=k[1],L=s((0,t.useState)(),2),D=L[0],F=L[1],G=(0,t.useRef)();G.current=N,(0,t.useEffect)((function(){var t;j&&(null===(t=N.visitor)||void 0===t||t.synchronizeModifications())}),[D]),(0,t.useEffect)((function(){B()}),[m]),(0,t.useEffect)((function(){K()}),[c,u,l]);var B=function(){N.visitor&&(m.context&&(N.visitor.clearContext(),N.visitor.updateContext(m.context)),"boolean"==typeof m.hasConsented&&N.visitor.setConsent(m.hasConsented),N.visitor.anonymousId&&!m.isAuthenticated?N.visitor.unauthenticate():!N.visitor.anonymousId&&m.isAuthenticated&&N.visitor.authenticate(m.id),m.id&&(N.visitor.visitorId=m.id),N.visitor.synchronizeModifications())};function V(t){var e={isSdkReady:t.isSdkReady,isLoading:t.isLoading,isVisitorDefined:!!t.fsVisitor,lastRefresh:(new Date).toISOString()};return R((function(n){return n.status.firstInitSuccess||(e.firstInitSuccess=(new Date).toISOString()),f(f({},n),{},{visitor:t.fsVisitor,modifications:t.fsVisitor.modifications,config:o.Flagship.getConfig(),status:f(f({},n.status),e)})})),e}var H,z=function(t){if(g&&g(t),t===o.FlagshipStatus.STARTING&&w)w();else if(t===o.FlagshipStatus.READY_PANIC_ON||t===o.FlagshipStatus.READY){var e;if(O&&O(),null!==(e=G.current)&&void 0!==e&&e.visitor){var n;null===(n=G.current)||void 0===n||n.visitor.synchronizeModifications()}else{var r=o.Flagship.newVisitor({visitorId:m.id,context:m.context,isAuthenticated:m.isAuthenticated,hasConsented:m.hasConsented,initialCampaigns:P,initialModifications:A});null==r||r.on("ready",(function(t){!function(t,e){if(e)i(o.Flagship.getConfig(),e.message||e,"onReady");else{var n=V({fsVisitor:t,isSdkReady:!0,isLoading:!1});E&&E({fsModifications:t.modifications,config:o.Flagship.getConfig(),status:n})}}(r,t)})),!a&&r&&V({fsVisitor:r,isSdkReady:!0,isLoading:!1})}}},U=function(t){I&&I(t),F(t)},K=function(){o.Flagship.start(c,u,{decisionMode:l,fetchNow:a,timeout:d,logLevel:y,statusChangedCallback:z,logManager:v,pollingInterval:b,onBucketingFail:x,onBucketingSuccess:_,enableClientCache:C,onBucketingUpdated:U,initialBucketing:M})};return e().createElement(h.Provider,{value:{state:N,setState:R}},(H=!N.visitor,N.status.isLoading&&S&&H?e().createElement(e().Fragment,null,S):e().createElement(e().Fragment,null,r)))};function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function g(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function v(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){g(i,r,o,a,s,"next",t)}function s(t){g(i,r,o,a,s,"throw",t)}a(void 0)}))}}function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}d.defaultProps={nodeEnv:"production"},n(5666),n(8674);var m=function(t,e){return"object"===b(t)&&"object"===b(e)&&Array.isArray(t)===Array.isArray(e)||b(t)===b(e)},w=function(t){var e=t.visitor,n=t.params,r=t.activateAll,o=t.state,i=t.functionName,s=t.config;if(e)return e.getModificationsSync(n,r);var c=!o.status.isSdkReady&&!!o.modifications&&o.modifications.size>0,u={};return c?(n.forEach((function(t){var e,n=null===(e=o.modifications)||void 0===e?void 0:e.get(t.key);n&&m(null==n?void 0:n.value,t.defaultValue)?u[t.key]=n.value:u[t.key]=t.defaultValue})),u):(a(s,j,i),n.forEach((function(t){u[t.key]=t.defaultValue})),u)},O=function(e,n){var r=(0,t.useContext)(h).state,o=r.visitor,i=r.config;return w({functionName:"useFsModifications",state:r,visitor:o,config:i,params:e,activateAll:n})},_=function(e){var n,r=(0,t.useContext)(h).state,o=r.visitor,i=r.config;if(o)return o.getModificationSync(e);var s=null===(n=r.modifications)||void 0===n?void 0:n.get(e.key);return!r.status.isSdkReady&&s&&m(null==s?void 0:s.value,e.defaultValue)?s.value:(a(i,j,"useFsModifications"),e.defaultValue)},x=function(t){var e,n=t.key,r=t.visitor,o=t.state;if(r)return r.getModificationInfoSync(n);var i=null===(e=o.modifications)||void 0===e?void 0:e.get(n);return!o.status.isSdkReady&&i?i:null},S=function(e){var n=(0,t.useContext)(h).state,r=n.visitor;return x({key:e,state:n,visitor:r})},I=function(){var t=v(regeneratorRuntime.mark((function t(e,n,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n){t.next=4;break}return T(r,e),t.abrupt("return");case 4:return t.next=6,n.synchronizeModifications();case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),i(r,t.t0.message||t.t0,e);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e,n,r){return t.apply(this,arguments)}}(),E=function(){var e=v(regeneratorRuntime.mark((function e(){var n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,t.useContext)(h),r=n.state,o=r.visitor,i=r.config,e.next=5,I("useFsSynchronizeModifications",o,i);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var t=v(regeneratorRuntime.mark((function t(e,n,r,o){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,r){t.next=4;break}return a(o,A,n),t.abrupt("return");case 4:return t.next=6,r.activateModifications(e);case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),a(o,t.t0.message||t.t0,n);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e,n,r,o){return t.apply(this,arguments)}}(),M=function(){var e=v(regeneratorRuntime.mark((function e(n){var r,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,t.useContext)(h),o=r.state,i=o.visitor,a=o.config,e.next=5,C(n,"useFsModifications",i,a);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),P=function(){var e=(0,t.useContext)(h).state,n=e.visitor,r=e.config,o=null==n?void 0:n.getModificationsArray();!e.status.isSdkReady&&e.modifications&&(o=Array.from(e.modifications,(function(t){var e,n,r=(n=2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,n)||function(t,e){if(t){if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return r[0],r[1]})));var a=function(){var t=v(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,C(e,"activateModification",n,r);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),s=function(){var t=v(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,I("synchronizeModifications",n,r);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),c=function(){var t=v(regeneratorRuntime.mark((function t(o,i){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",w({functionName:"getModifications",state:e,visitor:n,config:r,params:o,activateAll:i}));case 2:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),u=function(){var t=v(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",x({key:r,state:e,visitor:n}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return{updateContext:function(t){n?(n.clearContext(),n.updateContext(t)):i(r,A,"updateContext")},clearContext:function(){n?n.clearContext():i(r,A,"cleanContext")},authenticate:function(t){n?n.authenticate(t):i(r,A,"authenticate")},unauthenticate:function(){n?n.unauthenticate():i(r,A,"unauthenticate")},status:e.status,activateModification:a,synchronizeModifications:s,getModificationsSync:function(t,o){return w({functionName:"getModificationsSync",state:e,visitor:n,config:r,params:t,activateAll:o})},getModifications:c,modifications:o||[],getModificationInfo:u,getModificationInfoSync:function(t){return x({key:t,state:e,visitor:n})},hit:{send:function(t){return n?n.sendHit(t):(i(r,A,"sendHit"),Promise.resolve())},sendMultiple:function(t){return n?n.sendHits(t):(i(r,A,"sendHits"),Promise.resolve())}}}},A="sdk not correctly initialized... Make sure fsVisitor is ready.",j="fsVisitor not initialized, returns default value",T=function(t,e){i(t,A,e)}})(),module.exports=r})();
|
|
1
|
+
(()=>{var t={6968:(t,e,n)=>{(()=>{"use strict";var e={289:t=>{t.exports=n(1030)},605:t=>{t.exports=n(3685)},211:t=>{t.exports=n(5687)},786:t=>{t.exports=n(4809)}},r={};function i(t){var n=r[t];if(void 0!==n)return n.exports;var o=r[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{i.r(o),i.d(o,{APP_VERSION_CODE:()=>Dt,APP_VERSION_NAME:()=>jt,CARRIER_NAME:()=>Pt,DEVICE_LOCALE:()=>It,DEVICE_MODEL:()=>Et,DEVICE_TYPE:()=>St,DecisionApiConfig:()=>X,DecisionMode:()=>H,Event:()=>st,EventCategory:()=>at,FLAGSHIP_CLIENT:()=>Bt,FLAGSHIP_CONTEXT:()=>Ht,FLAGSHIP_VERSION:()=>Gt,FLAGSHIP_VISITOR:()=>Vt,Flagship:()=>ie,FlagshipStatus:()=>k,HitAbstract:()=>ct,HitType:()=>x,INTERFACE_NAME:()=>Ft,INTERNET_CONNECTION:()=>Lt,IP:()=>At,Item:()=>ut,LOCATION_CITY:()=>wt,LOCATION_COUNTRY:()=>Mt,LOCATION_LAT:()=>Ct,LOCATION_LONG:()=>_t,LOCATION_REGION:()=>Ot,LogLevel:()=>p,OS_NAME:()=>Rt,OS_VERSION_CODE:()=>Tt,OS_VERSION_NAME:()=>Nt,Page:()=>ft,Screen:()=>lt,Transaction:()=>ht,Visitor:()=>U,default:()=>oe});const t=n(9293);var e=i.n(t);const r=n(8765);var a=i.n(r);n(2419);const c=n(5370);var s=i.n(c);const u=n(9548);var f=i.n(u);const l=n(3761);var h=i.n(l);n(1539),n(8674);const v=n(1239);var p,d={},g="undefined"==typeof window?i(786).default:window.fetch;if("undefined"==typeof window){var y=i(605).Agent,m=i(211).Agent;d.agent=function(t){return"http:"===t.protocol?new y({keepAlive:!0}):new m({keepAlive:!0})}}!function(t){t[t.NONE=0]="NONE",t[t.EMERGENCY=1]="EMERGENCY",t[t.ALERT=2]="ALERT",t[t.CRITICAL=3]="CRITICAL",t[t.ERROR=4]="ERROR",t[t.WARNING=5]="WARNING",t[t.NOTICE=6]="NOTICE",t[t.INFO=7]="INFO",t[t.DEBUG=8]="DEBUG",t[t.ALL=9]="ALL"}(p||(p={}));var k,x,b="TypeScript",I="https://decision.flagship.io/v2/",S="v2",E="ready",w="Key {0} must not be null. Default value is returned.",O="No modification for key {0}.",M="{0} must be a {1}",C="visitorId must not be null or empty",_="Method {0} is deactivated while SDK status is: {1}.",A="INITIALIZATION",R="UPDATE CONTEXT",N="GET MODIFICATION",T="GET MODIFICATION INFO",P="ACTIVE MODIFICATION",L="SEND HIT",j="cid",D="x-api-key",F="Content-Type",B="x-sdk-client",G="x-sdk-version",V="application/json";!function(t){t[t.NOT_READY=0]="NOT_READY",t[t.NOT_INITIALIZED=0]="NOT_INITIALIZED",t[t.STARTING=1]="STARTING",t[t.POLLING=2]="POLLING",t[t.READY_PANIC_ON=3]="READY_PANIC_ON",t[t.READY=4]="READY"}(k||(k={})),function(t){t.PAGE_VIEW="PAGEVIEW",t.PAGE="PAGEVIEW",t.SCREEN_VIEW="SCREENVIEW",t.SCREEN="SCREENVIEW",t.TRANSACTION="TRANSACTION",t.ITEM="ITEM",t.EVENT="EVENT"}(x||(x={}));var H,U=function(t){s()(n,t);var e=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n;return(n=e.call(this)).visitorDelegate=t,n.visitorDelegate.on(E,(function(t){n.emit(E,t)})),n}return a()(n,[{key:"getModificationsArray",value:function(){return this.visitorDelegate.getModificationsArray()}},{key:"visitorId",get:function(){return this.visitorDelegate.visitorId},set:function(t){this.visitorDelegate.visitorId=t}},{key:"anonymousId",get:function(){return this.visitorDelegate.anonymousId}},{key:"hasConsented",get:function(){return this.visitorDelegate.hasConsented}},{key:"setConsent",value:function(t){this.visitorDelegate.setConsent(t)}},{key:"config",get:function(){return this.visitorDelegate.config}},{key:"context",get:function(){return this.visitorDelegate.context}},{key:"modifications",get:function(){return this.visitorDelegate.modifications}},{key:"updateContext",value:function(t){this.visitorDelegate.updateContext(t)}},{key:"clearContext",value:function(){this.visitorDelegate.clearContext()}},{key:"getModification",value:function(t){return this.visitorDelegate.getModification(t)}},{key:"getModificationSync",value:function(t){return this.visitorDelegate.getModificationSync(t)}},{key:"getModifications",value:function(t,e){return this.visitorDelegate.getModifications(t,e)}},{key:"getModificationsSync",value:function(t,e){return this.visitorDelegate.getModificationsSync(t,e)}},{key:"getModificationInfo",value:function(t){return this.visitorDelegate.getModificationInfo(t)}},{key:"getModificationInfoSync",value:function(t){return this.visitorDelegate.getModificationInfoSync(t)}},{key:"synchronizeModifications",value:function(){return this.visitorDelegate.synchronizeModifications()}},{key:"activateModification",value:function(t){return this.visitorDelegate.activateModification(t)}},{key:"activateModifications",value:function(t){return this.visitorDelegate.activateModifications(t)}},{key:"sendHit",value:function(t){return this.visitorDelegate.sendHit(t)}},{key:"sendHits",value:function(t){return this.visitorDelegate.sendHits(t)}},{key:"getAllModifications",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.visitorDelegate.getAllModifications(t)}},{key:"getModificationsForCampaign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.visitorDelegate.getModificationsForCampaign(t,e)}},{key:"authenticate",value:function(t){this.visitorDelegate.authenticate(t)}},{key:"unauthenticate",value:function(){this.visitorDelegate.unauthenticate()}}]),n}(v.EventEmitter);function K(t){for(var e=t,n=0;n<(arguments.length<=1?0:arguments.length-1);n++){var r=n+1<1||arguments.length<=n+1?void 0:arguments[n+1];e=e.replace(new RegExp("\\{".concat(n,"\\}"),"g"),r)}return e}function z(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.error&&t.logLevel&&!(t.logLevel<p.ERROR)&&t.logManager.error(e,n)}function W(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.info&&t.logLevel&&!(t.logLevel<p.INFO)&&t.logManager.info(e,n)}n(4916),n(5306),n(4603),n(9714),function(t){t.DECISION_API="API",t.BUCKETING="BUCKETING"}(H||(H={}));var Y=function(){function t(t){var e=t.envId,n=t.apiKey,r=t.timeout,i=t.logLevel,o=t.logManager,a=t.statusChangedCallback,c=t.fetchNow,s=t.decisionMode,u=t.enableClientCache,f=t.initialBucketing;this._envId=e,this._apiKey=n,this.logLevel=i||p.ALL,this.timeout=r||2,this.fetchNow=void 0===c||c,this.enableClientCache=void 0===u||u,this._decisionMode=s||H.DECISION_API,this._initialBucketing=f,o&&(this.logManager=o),this.statusChangedCallback=a}return a()(t,[{key:"initialBucketing",get:function(){return this._initialBucketing},set:function(t){this._initialBucketing=t}},{key:"enableClientCache",get:function(){return this._enableClientCache},set:function(t){this._enableClientCache=t}},{key:"onBucketingSuccess",get:function(){return this._onBucketingSuccess},set:function(t){this._onBucketingSuccess=t}},{key:"onBucketingFail",get:function(){return this._onBucketingFail},set:function(t){this._onBucketingFail=t}},{key:"onBucketingUpdated",get:function(){return this._onBucketingUpdated},set:function(t){this._onBucketingUpdated=t}},{key:"envId",get:function(){return this._envId},set:function(t){this._envId=t}},{key:"apiKey",get:function(){return this._apiKey},set:function(t){this._apiKey=t}},{key:"decisionMode",get:function(){return this._decisionMode}},{key:"timeout",get:function(){return this._timeout},set:function(t){this._timeout=t}},{key:"logLevel",get:function(){return this._logLevel},set:function(t){this._logLevel=t}},{key:"fetchNow",get:function(){return this._fetchNow},set:function(t){this._fetchNow=t}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(t){this._pollingInterval=t}},{key:"statusChangedCallback",get:function(){return this._statusChangedCallback},set:function(t){"function"==typeof t?this._statusChangedCallback=t:z(this,"statusChangedCallback must be a function","statusChangedCallback")}},{key:"logManager",get:function(){return this._logManager},set:function(t){this._logManager=t}}]),t}();n(7941),n(2526),n(7327),n(5003),n(4747),n(9337);const q=n(8779);var $=i.n(q);function Q(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(n),!0).forEach((function(e){$()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var X=function(t){s()(n,t);var e=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){return e.call(this,Z(Z({},t),{},{decisionMode:H.DECISION_API}))}return n}(Y),J=function(){function t(t,e,n){this._config=t,this._decisionManager=e,this._trackingManager=n}return a()(t,[{key:"config",get:function(){return this._config},set:function(t){this._config=t}},{key:"decisionManager",get:function(){return this._decisionManager},set:function(t){this._decisionManager=t}},{key:"trackingManager",get:function(){return this._trackingManager},set:function(t){this._trackingManager=t}}]),t}();const tt=n(9591);var et=i.n(tt);const nt=n(1307);var rt=i.n(nt);n(2222),n(6992),n(1532),n(8783),n(3948);var it=function(){function t(t,e){$()(this,"_panic",!1),this._config=e,this._httpClient=t}var e;return a()(t,[{key:"config",get:function(){return this._config}},{key:"panic",set:function(t){this.updateFlagshipStatus(t?k.READY_PANIC_ON:k.READY),this._panic=t}},{key:"statusChangedCallback",value:function(t){this._statusChangedCallback=t}},{key:"updateFlagshipStatus",value:function(t){"function"==typeof this._statusChangedCallback&&this._statusChangedCallback&&this._statusChangedCallback(t)}},{key:"getModifications",value:function(t){var e=new Map;return t.forEach((function(t){var n=t.variation.modifications.value;for(var r in n){var i=n[r];e.set(r,{key:r,campaignId:t.id,variationGroupId:t.variationGroupId,variationId:t.variation.id,isReference:t.variation.reference,value:i})}})),e}},{key:"getCampaignsModificationsAsync",value:(e=et()(rt().mark((function t(e){var n=this;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getCampaignsAsync(e).then((function(t){return n.getModifications(t)})).catch((function(t){return z(n.config,t.message||t,"getCampaignsModificationsAsync"),new Map})));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"isPanic",value:function(){return this._panic}}]),t}(),ot=function(t){s()(r,t);var e,n=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return n.apply(this,arguments)}return a()(r,[{key:"getCampaignsAsync",value:(e=et()(rt().mark((function t(e){var n,r,i,o,a=this;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={},$()(n,D,"".concat(this.config.apiKey)),$()(n,B,b),$()(n,G,S),$()(n,F,V),r=n,i={visitorId:e.visitorId,anonymousId:e.anonymousId,trigger_hit:!1,context:e.context},o="".concat(I).concat(this.config.envId).concat("/campaigns","?").concat("exposeAllKeys","=true"),e.hasConsented||(o+="&".concat("sendContextEvent","=false")),t.abrupt("return",this._httpClient.postAsync(o,{headers:r,timeout:this.config.timeout,body:i}).then((function(t){a.panic=!!t.body.panic;var e=[];return t.body.campaigns&&(e=t.body.campaigns),e})).catch((function(t){return z(a.config,t.message||t,"GET CAMPAIGNS"),[]})));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),r}(it);n(6699),n(2023),n(2479),n(3161),n(9653);var at,ct=function(){function t(t){this.type=t,this._anonymousId=null}return a()(t,[{key:"anonymousId",get:function(){return this._anonymousId},set:function(t){this._anonymousId=t}},{key:"visitorId",get:function(){return this._visitorId},set:function(t){this._visitorId=t}},{key:"ds",get:function(){return this._ds},set:function(t){this._ds=t}},{key:"type",get:function(){return this._type},set:function(t){this._type=t}},{key:"config",get:function(){return this._config},set:function(t){this._config=t}},{key:"isNotEmptyString",value:function(t,e){return!(!t||"string"!=typeof t)||(z(this.config,K(M,e,"string"),e),!1)}},{key:"isNumeric",value:function(t,e){return!(!t||"number"!=typeof t)||(z(this.config,K(M,e,"number"),e),!1)}},{key:"isInteger",value:function(t,e){return t&&"number"==typeof t?(Number.isInteger(t)||z(this.config,K("value of {0} is not an {1}, it will be truncated to {1}",e,"integer"),e),!0):(z(this.config,K(M,e,"integer"),e),!1)}},{key:"toApiKeys",value:function(){var t,e=(t={},$()(t,"vid",this.visitorId),$()(t,"ds",this.ds),$()(t,j,"".concat(this.config.envId)),$()(t,"t",this.type),t);return this.visitorId&&this._anonymousId?(e.vid=this._anonymousId,e.cuid=this.visitorId):(e.vid=this._anonymousId||this.visitorId,e.cuid=null),e}},{key:"isReady",value:function(){return!!(this.visitorId&&this.ds&&this.config&&this.config.envId&&this.type)}}]),t}();!function(t){t.ACTION_TRACKING="ACTION TRACKING",t.USER_ENGAGEMENT="USER ENGAGEMENT"}(at||(at={}));var st=function(t){s()(n,t);var e=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n;n=e.call(this,x.EVENT);var r=t.category,i=t.action,o=t.eventLabel,a=t.eventValue;return n.category=r,n.action=i,o&&(n.eventLabel=o),a&&(n.eventValue=a),n}return a()(n,[{key:"category",get:function(){return this._category},set:function(t){Object.values(at).includes(t)?this._category=t:z(this.config,"The category value must be either EventCategory::ACTION_TRACKING or EventCategory::ACTION_TRACKING","category")}},{key:"action",get:function(){return this._action},set:function(t){this.isNotEmptyString(t,"action")&&(this._action=t)}},{key:"eventLabel",get:function(){return this._eventLabel},set:function(t){this.isNotEmptyString(t,"eventLabel")&&(this._eventLabel=t)}},{key:"eventValue",get:function(){return this._eventValue},set:function(t){this.isNumeric(t,"eventValue")&&(this._eventValue=t)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e.ec=this.category,e.ea=this.action,this.eventLabel&&(e.el=this.eventLabel),this.eventValue&&(e.ev=this.eventValue),e}},{key:"isReady",value:function(){return!!(t.prototype.isReady.call(this)&&this.category&&this.action)}},{key:"getErrorMessage",value:function(){return"event category and event action are required"}}]),n}(ct);n(3689);var ut=function(t){s()(n,t);var e=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n;n=e.call(this,x.ITEM);var r=t.transactionId,i=t.productName,o=t.productSku,a=t.itemCategory,c=t.itemPrice,s=t.itemQuantity;return n.transactionId=r,n.productName=i,n.productSku=o,a&&(n.itemCategory=a),c&&(n.itemPrice=c),s&&(n.itemQuantity=s),n}return a()(n,[{key:"transactionId",get:function(){return this._transactionId},set:function(t){this.isNotEmptyString(t,"transactionId")&&(this._transactionId=t)}},{key:"productName",get:function(){return this._productName},set:function(t){this.isNotEmptyString(t,"productName")&&(this._productName=t)}},{key:"productSku",get:function(){return this._productSku},set:function(t){this.isNotEmptyString(t,"productSku")&&(this._productSku=t)}},{key:"itemPrice",get:function(){return this._itemPrice},set:function(t){this.isNumeric(t,"itemPrice")&&(this._itemPrice=t)}},{key:"itemQuantity",get:function(){return this._itemQuantity},set:function(t){this.isInteger(t,"itemQuantity")&&(this._itemQuantity=Math.trunc(t))}},{key:"itemCategory",get:function(){return this._itemCategory},set:function(t){this.isNotEmptyString(t,"itemCategory")&&(this._itemCategory=t)}},{key:"isReady",value:function(){return!!(t.prototype.isReady.call(this)&&this.transactionId&&this.productName&&this.productSku)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e.tid=this.transactionId,e.in=this.productName,e.ic=this.productSku,this.itemPrice&&(e.ip=this.itemPrice),this.itemQuantity&&(e.iq=this.itemQuantity),this.itemCategory&&(e.iv=this.itemCategory),e}},{key:"getErrorMessage",value:function(){return"Transaction Id, Item name and item code are required"}}]),n}(ct),ft=function(t){s()(n,t);var e=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n;return(n=e.call(this,x.PAGE_VIEW)).documentLocation=null==t?void 0:t.documentLocation,n}return a()(n,[{key:"documentLocation",get:function(){return this._documentLocation},set:function(t){this.isNotEmptyString(t,"documentLocation")&&(this._documentLocation=t)}},{key:"isReady",value:function(){return!(!t.prototype.isReady.call(this)||!this.documentLocation)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e.dl=this.documentLocation,e}},{key:"getErrorMessage",value:function(){return"documentLocation url is required"}}]),n}(ct),lt=function(t){s()(n,t);var e=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n;return(n=e.call(this,x.SCREEN_VIEW)).documentLocation=null==t?void 0:t.documentLocation,n}return a()(n,[{key:"documentLocation",get:function(){return this._documentLocation},set:function(t){this.isNotEmptyString(t,"documentLocation")&&(this._documentLocation=t)}},{key:"isReady",value:function(){return!(!t.prototype.isReady.call(this)||!this.documentLocation)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e.dl=this.documentLocation,e}},{key:"getErrorMessage",value:function(){return"Screen name is required"}}]),n}(ct),ht=function(t){s()(n,t);var e=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n;n=e.call(this,x.TRANSACTION);var r=t.transactionId,i=t.affiliation,o=t.taxes,a=t.currency,c=t.couponCode,s=t.itemCount,u=t.shippingMethod,f=t.paymentMethod,l=t.totalRevenue,h=t.shippingCosts;return n.transactionId=r,n.affiliation=i,o&&(n.taxes=o),a&&(n.currency=a),c&&(n.couponCode=c),s&&(n.itemCount=s),u&&(n.shippingMethod=u),f&&(n.paymentMethod=f),l&&(n.totalRevenue=l),h&&(n.shippingCosts=h),n}return a()(n,[{key:"transactionId",get:function(){return this._transactionId},set:function(t){this.isNotEmptyString(t,"transactionId")&&(this._transactionId=t)}},{key:"affiliation",get:function(){return this._affiliation},set:function(t){this.isNotEmptyString(t,"affiliation")&&(this._affiliation=t)}},{key:"taxes",get:function(){return this._taxes},set:function(t){this.isNumeric(t,"taxes")&&(this._taxes=t)}},{key:"currency",get:function(){return this._currency},set:function(t){t&&"string"==typeof t&&3===t.length?this._currency=t:z(this.config,K("{0} must be a string and have exactly 3 letters","currency"),"currency")}},{key:"couponCode",get:function(){return this._couponCode},set:function(t){this.isNotEmptyString(t,"couponCode")&&(this._couponCode=t)}},{key:"itemCount",get:function(){return this._itemCount},set:function(t){this.isInteger(t,"itemCount")&&(this._itemCount=Math.trunc(t))}},{key:"shippingMethod",get:function(){return this._shippingMethod},set:function(t){this.isNotEmptyString(t,"shippingMethod")&&(this._shippingMethod=t)}},{key:"paymentMethod",get:function(){return this._paymentMethod},set:function(t){this.isNotEmptyString(t,"paymentMethod")&&(this._paymentMethod=t)}},{key:"totalRevenue",get:function(){return this._totalRevenue},set:function(t){this.isNumeric(t,"totalRevenue")&&(this._totalRevenue=t)}},{key:"shippingCosts",get:function(){return this._shippingCosts},set:function(t){this.isNumeric(t,"shippingCosts")&&(this._shippingCosts=t)}},{key:"isReady",value:function(){return!!(t.prototype.isReady.call(this)&&this.transactionId&&this.affiliation)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e.tid=this.transactionId,e.ta=this.affiliation,this.taxes&&(e.tt=this.taxes),this.currency&&(e.tc=this.currency),this.couponCode&&(e.tcc=this.couponCode),this.itemCount&&(e.icn=this.itemCount),this.shippingMethod&&(e.sm=this.shippingMethod),this.paymentMethod&&(e.pm=this.paymentMethod),this.totalRevenue&&(e.tr=this.totalRevenue),this.shippingCosts&&(e.ts=this.shippingCosts),e}},{key:"getErrorMessage",value:function(){return"Transaction Id and Transaction affiliation are required"}}]),n}(ct),vt=function(t){s()(o,t);var e,n,r,i=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(o);function o(){return i.apply(this,arguments)}return a()(o,[{key:"sendConsentHit",value:(r=et()(rt().mark((function t(e){var n,r,i;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={},$()(n,"t",x.EVENT),$()(n,"el","".concat(b,":").concat(e.hasConsented)),$()(n,"ea","fs_consent"),$()(n,"ec",at.USER_ENGAGEMENT),$()(n,j,this.config.envId),$()(n,"ds","APP"),r=n,e.visitorId&&e.anonymousId?(r.vid=e.anonymousId,r.cuid=e.visitorId):(r.vid=e.anonymousId||e.visitorId,r.cuid=null),i=$()({},F,V),t.next=5,this.httpClient.postAsync("https://ariane.abtasty.com",{headers:i,timeout:this.config.timeout,body:r});case 5:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"sendActive",value:(n=et()(rt().mark((function t(e,n){var r,i,o,a,c;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},$()(r,D,"".concat(this.config.apiKey)),$()(r,B,b),$()(r,G,S),$()(r,F,V),o=r,a="".concat(I).concat("activate"),i={},$()(i,"vid",e.visitorId),$()(i,"vaid",n.variationId),$()(i,"caid",n.variationGroupId),$()(i,j,"".concat(this.config.envId)),c=i,e.visitorId&&e.anonymousId?(c.vid=e.visitorId,c.aid=e.anonymousId):(c.vid=e.anonymousId||e.visitorId,c.aid=null),t.next=6,this.httpClient.postAsync(a,{headers:o,timeout:this.config.timeout,body:c});case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"sendHit",value:(e=et()(rt().mark((function t(e){var n;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=$()({},F,V),t.next=3,this.httpClient.postAsync("https://ariane.abtasty.com",{headers:n,timeout:this.config.timeout,body:e.toApiKeys()});case 3:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),o}(function(){function t(t,e){this._httpClient=t,this._config=e}return a()(t,[{key:"httpClient",get:function(){return this._httpClient}},{key:"config",get:function(){return this._config}}]),t}()),pt=function(){function t(){}return a()(t,[{key:"emergency",value:function(t,e){this.log(p.EMERGENCY,t,e)}},{key:"alert",value:function(t,e){this.log(p.ALERT,t,e)}},{key:"critical",value:function(t,e){this.log(p.CRITICAL,t,e)}},{key:"error",value:function(t,e){this.log(p.ERROR,t,e)}},{key:"warning",value:function(t,e){this.log(p.WARNING,t,e)}},{key:"notice",value:function(t,e){this.log(p.NOTICE,t,e)}},{key:"info",value:function(t,e){this.log(p.INFO,t,e)}},{key:"debug",value:function(t,e){this.log(p.DEBUG,t,e)}},{key:"log",value:function(t,e,n){var r=new Date,i=function(t){return 1===t.toString().length?"0".concat(t):t},o="[".concat(i(r.getFullYear()),"-").concat(i(r.getMonth()),"-").concat(i(r.getDay())," ").concat(i(r.getHours()),":").concat(i(r.getMinutes()),"] [").concat("Flagship SDK","] [").concat(p[t],"] [").concat(n,"] : ").concat(e);console.log(o)}}]),t}();const dt=n(353);var gt=i.n(dt);function yt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function mt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(n),!0).forEach((function(e){$()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}n(1038);var kt=function(t){s()(n,t);var e=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n,r;return(r=e.call(this,mt(mt({},t),{},{decisionMode:H.BUCKETING}))).pollingInterval=null!=(n=null==t?void 0:t.pollingInterval)?n:2,r.onBucketingFail=null==t?void 0:t.onBucketingFail,r.onBucketingSuccess=null==t?void 0:t.onBucketingSuccess,r.onBucketingUpdated=null==t?void 0:t.onBucketingUpdated,r}return n}(Y);n(4723);var xt,bt=function(){function t(t){this.visitor=t}return a()(t,[{key:"configManager",get:function(){return this.visitor.configManager}},{key:"trackingManager",get:function(){return this.configManager.trackingManager}},{key:"decisionManager",get:function(){return this.configManager.decisionManager}},{key:"config",get:function(){return this.visitor.config}},{key:"updateCampaigns",value:function(t){try{this.visitor.campaigns=t,this.visitor.modifications=this.decisionManager.getModifications(t)}catch(t){z(this.config,t.message||t,"updateCampaigns")}}}]),t}(),It="sdk_deviceLanguage",St="sdk_deviceType",Et="sdk_deviceModel",wt="sdk_city",Ot="sdk_region",Mt="sdk_country",Ct="sdk_lat",_t="sdk_long",At="sdk_ip",Rt="sdk_osName",Nt="sdk_osVersionName",Tt="sdk_osVersionCode",Pt="sdk_carrierName",Lt="sdk_internetConnection",jt="sdk_versionName",Dt="sdk_versionCode",Ft="sdk_interfaceName",Bt="fs_client",Gt="fs_version",Vt="fs_users",Ht=(xt={},$()(xt,It,"string"),$()(xt,St,"string"),$()(xt,Et,"string"),$()(xt,wt,"string"),$()(xt,Ot,"string"),$()(xt,Mt,"string"),$()(xt,Ct,"number"),$()(xt,_t,"number"),$()(xt,At,"string"),$()(xt,Rt,"string"),$()(xt,Nt,"string"),$()(xt,Tt,"number"),$()(xt,Pt,"string"),$()(xt,Lt,"string"),$()(xt,jt,"string"),$()(xt,Dt,"number"),$()(xt,Ft,"string"),$()(xt,Bt,"string"),$()(xt,Gt,"string"),$()(xt,Vt,"string"),xt);function Ut(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}var Kt=function(t){s()(g,t);var n,r,i,o,c,u,f,l,h,v,p,d=Ut(g);function g(){return d.apply(this,arguments)}return a()(g,[{key:"setConsent",value:function(t){var e=this,n="setConsent";this.visitor.hasConsented=t,this.hasTrackingManager(n)&&this.trackingManager.sendConsentHit(this.visitor).catch((function(t){z(e.config,t.message||t,n)}))}},{key:"checkPredefinedContext",value:function(t,e){var n=Ht[t];if(!n)return null;var r=!1;return"string"===n?r="string"==typeof e:"number"===n&&(r="number"==typeof e),r||z(this.config,K("Predefined Context {0} must be type of {1}",t,n),R),r}},{key:"updateContextKeyValue",value:function(t,n){var r=e()(n);if("string"!=typeof t||""===t||"string"!==r&&"number"!==r&&"boolean"!==r)z(this.visitor.config,K("params {0} must be a non null String, and 'value' must be one of the following types , Number, Boolean",t),R);else if(!t.match(/^fs_/i)){var i=this.checkPredefinedContext(t,n);("boolean"!=typeof i||i)&&(this.visitor.context[t]=n)}}},{key:"updateContext",value:function(t){if(t)for(var e in t){var n=t[e];this.updateContextKeyValue(e,n)}else z(this.visitor.config,"Context must not to be null",R)}},{key:"clearContext",value:function(){this.visitor.context={}}},{key:"checkAndGetModification",value:function(t,n){var r=t.key,i=t.defaultValue,o=t.activate;if(!r||"string"!=typeof r)return z(this.config,K(w,r),N),i;var a=this.visitor.modifications.get(r);return a?"object"===e()(a.value)&&"object"===e()(i)&&Array.isArray(a.value)!==Array.isArray(i)||e()(a.value)!==e()(i)?(z(this.config,K("Modification for key {0} has a different type. Default value is returned.",r),N),a.value||!o&&!n||this.activateModification(r),i):((o||n)&&this.activateModification(r),a.value):(W(this.config,K("No modification for key {0}. Default value is returned.",r),N),i)}},{key:"getModifications",value:(p=et()(rt().mark((function t(e,n){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getModificationsSync(e,n));case 1:case"end":return t.stop()}}),t,this)}))),function(t,e){return p.apply(this,arguments)})},{key:"getModificationsSync",value:function(t,e){var n=this,r={};return t.forEach((function(t){r[t.key]=n.checkAndGetModification(t,e)})),r}},{key:"getModification",value:(v=et()(rt().mark((function t(e){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getModificationSync(e));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getModificationSync",value:function(t){return this.checkAndGetModification(t)}},{key:"getModificationInfo",value:(h=et()(rt().mark((function t(e){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getModificationInfoSync(e));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"getModificationInfoSync",value:function(t){return t&&"string"==typeof t?this.visitor.modifications.get(t)||(z(this.visitor.config,K(O,t),T),null):(z(this.visitor.config,K(w,t),T),null)}},{key:"synchronizeModifications",value:(l=et()(rt().mark((function t(){var e;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.decisionManager.getCampaignsAsync(this.visitor);case 3:e=t.sent,this.visitor.campaigns=e,this.visitor.modifications=this.decisionManager.getModifications(this.visitor.campaigns),this.visitor.emit(E),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),this.visitor.emit(E,t.t0),z(this.config,t.t0.message||t.t0,"SYNCHRONIZED MODIFICATION");case 13:case"end":return t.stop()}}),t,this,[[0,9]])}))),function(){return l.apply(this,arguments)})},{key:"activateModification",value:(f=et()(rt().mark((function t(e){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&"string"==typeof e){t.next=3;break}return z(this.config,K(w,e),P),t.abrupt("return");case 3:return t.abrupt("return",this.activate(e));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)})},{key:"activateModifications",value:(u=et()(rt().mark((function t(e){var n=this;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&Array.isArray(e)){t.next=3;break}return z(this.config,K(w,e),P),t.abrupt("return");case 3:e.forEach((function(t){"string"==typeof t?n.activate(t):n.activate(t.key)}));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"hasTrackingManager",value:function(t){var e=this.trackingManager;return e||z(this.config,K("trackerManager must not be null."),t),!!e}},{key:"activate",value:(c=et()(rt().mark((function t(e){var n;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n=this.visitor.modifications.get(e)){t.next=5;break}return z(this.visitor.config,K(O,e),P),t.abrupt("return");case 5:if(this.hasTrackingManager(P)){t.next=7;break}return t.abrupt("return");case 7:return t.next=9,this.trackingManager.sendActive(this.visitor,n);case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),z(this.config,t.t0.message||t.t0,P);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(t){return c.apply(this,arguments)})},{key:"sendHit",value:function(t){return this.hasTrackingManager(L)?this.prepareAndSendHit(t):Promise.resolve()}},{key:"sendHits",value:(o=et()(rt().mark((function t(e){var n=this;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.hasTrackingManager(L)){t.next=2;break}return t.abrupt("return");case 2:e.forEach((function(t){n.prepareAndSendHit(t)}));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"getHit",value:function(t){var e=null;switch(t.type.toUpperCase()){case x.EVENT:e=new st(t);break;case x.ITEM:e=new ut(t);break;case x.PAGE:case x.PAGE_VIEW:e=new ft(t);break;case x.SCREEN:case x.SCREEN_VIEW:e=new lt(t);break;case x.TRANSACTION:e=new ht(t)}return e}},{key:"prepareAndSendHit",value:(i=et()(rt().mark((function t(e){var n,r;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(e instanceof ct)){t.next=5;break}n=e,t.next=10;break;case 5:if(r=this.getHit(e)){t.next=9;break}return z(this.config,"property type is required and must ",L),t.abrupt("return");case 9:n=r;case 10:if(n.visitorId=this.visitor.visitorId,n.ds="APP",n.config=this.config,n.anonymousId=this.visitor.anonymousId,n.isReady()){t.next=17;break}return z(this.config,n.getErrorMessage(),L),t.abrupt("return");case 17:return t.next=19,this.trackingManager.sendHit(n);case 19:t.next=24;break;case 21:t.prev=21,t.t0=t.catch(0),z(this.config,t.t0.message||t.t0,L);case 24:case"end":return t.stop()}}),t,this,[[0,21]])}))),function(t){return i.apply(this,arguments)})},{key:"getAllModifications",value:(r=et()(rt().mark((function t(){var e=this,n=arguments;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.length>0&&void 0!==n[0]&&n[0]&&this.visitor.modifications.forEach((function(t,n){e.activateModification(n)})),t.abrupt("return",{visitorId:this.visitor.visitorId,campaigns:this.visitor.campaigns});case 3:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"getModificationsForCampaign",value:(n=et()(rt().mark((function t(e){var n=this,r=arguments;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.length>1&&void 0!==r[1]&&r[1]&&this.visitor.modifications.forEach((function(t){t.campaignId===e&&n.activateModification(t.key)})),t.abrupt("return",{visitorId:this.visitor.visitorId,campaigns:this.visitor.campaigns.filter((function(t){return t.id===e}))});case 3:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"authenticate",value:function(t){var e="authenticate";this.config.decisionMode!==H.BUCKETING?t?(this.visitor.anonymousId=this.visitor.visitorId,this.visitor.visitorId=t):z(this.config,C,e):this.logDeactivateOnBucketing(e)}},{key:"unauthenticate",value:function(){var t="unauthenticate";this.config.decisionMode!==H.BUCKETING?this.visitor.anonymousId?(this.visitor.visitorId=this.visitor.anonymousId,this.visitor.anonymousId=null):z(this.config,"Visitor is not authenticated yet",t):this.logDeactivateOnBucketing(t)}},{key:"logDeactivateOnBucketing",value:function(t){z(this.config,K("Method {0} is deactivated on Bucketing mode.",t),t)}}]),g}(bt),zt=function(t){s()(i,t);var e,n,r=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(i);function i(){return r.apply(this,arguments)}return a()(i,[{key:"synchronizeModifications",value:function(){return this.log("synchronizeModifications"),Promise.resolve()}},{key:"getModificationSync",value:function(t){return this.log("getModification"),t.defaultValue}},{key:"getModificationsSync",value:function(t,e){this.log("getModifications");var n={};return t.forEach((function(t){n[t.key]=t.defaultValue})),n}},{key:"getModificationInfoSync",value:function(t){return this.log("getModificationInfo"),null}},{key:"activateModification",value:(n=et()(rt().mark((function t(e){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModification");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"activateModifications",value:(e=et()(rt().mark((function t(e){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModifications");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"sendHit",value:function(t){return this.log("sendHit"),Promise.resolve()}},{key:"sendHits",value:function(t){return this.log("sendHits"),Promise.resolve()}},{key:"log",value:function(t){z(this.config,K(_,t,k[k.NOT_INITIALIZED]),t)}}]),i}(Kt),Wt=function(t){s()(i,t);var e,n,r=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(i);function i(){return r.apply(this,arguments)}return a()(i,[{key:"setConsent",value:function(t){this.visitor.hasConsented=t,z(this.config,K("Send consent hit is deactivated while SDK status is: {1}.",k[k.READY_PANIC_ON]),"setConsent")}},{key:"updateContext",value:function(t){this.log("updateContext")}},{key:"clearContext",value:function(){this.log("clearContext")}},{key:"getModificationSync",value:function(t){return this.log("getModification"),t.defaultValue}},{key:"getModificationsSync",value:function(t,e){this.log("getModifications");var n={};return t.forEach((function(t){n[t.key]=t.defaultValue})),n}},{key:"getModificationInfoSync",value:function(t){return this.log("getModificationInfo"),null}},{key:"activateModification",value:(n=et()(rt().mark((function t(e){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModification");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"activateModifications",value:(e=et()(rt().mark((function t(e){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModifications");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"sendHit",value:function(t){return this.log("sendHit"),Promise.resolve()}},{key:"sendHits",value:function(t){return this.log("sendHits"),Promise.resolve()}},{key:"log",value:function(t){z(this.config,K(_,t,k[k.READY_PANIC_ON]),t)}}]),i}(Kt),Yt=function(t){s()(i,t);var e,n,r=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(i);function i(){return r.apply(this,arguments)}return a()(i,[{key:"activateModification",value:(n=et()(rt().mark((function t(e){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModification");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"activateModifications",value:(e=et()(rt().mark((function t(e){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModifications");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"sendHit",value:function(t){return this.log("sendHit"),Promise.resolve()}},{key:"sendHits",value:function(t){return this.log("sendHits"),Promise.resolve()}},{key:"log",value:function(t){z(this.config,K("Method {0} is deactivated for visitor {1} : visitor did not consent.",t,this.visitor.visitorId),t)}}]),i}(Kt),qt="FS_CLIENT_VISITOR",$t=function(t){s()(n,t);var e=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return e.apply(this,arguments)}return a()(n,[{key:"updateContext",value:function(t){this.getStrategy().updateContext(t)}},{key:"clearContext",value:function(){this.getStrategy().clearContext()}},{key:"getModification",value:function(t){return this.getStrategy().getModification(t)}},{key:"getModificationSync",value:function(t){return this.getStrategy().getModificationSync(t)}},{key:"getModifications",value:function(t,e){return this.getStrategy().getModifications(t,e)}},{key:"getModificationsSync",value:function(t,e){return this.getStrategy().getModificationsSync(t,e)}},{key:"getModificationInfo",value:function(t){return this.getStrategy().getModificationInfo(t)}},{key:"getModificationInfoSync",value:function(t){return this.getStrategy().getModificationInfoSync(t)}},{key:"synchronizeModifications",value:function(){return this.getStrategy().synchronizeModifications()}},{key:"activateModification",value:function(t){return this.getStrategy().activateModification(t)}},{key:"activateModifications",value:function(t){return this.getStrategy().activateModifications(t)}},{key:"sendHit",value:function(t){return this.getStrategy().sendHit(t)}},{key:"sendHits",value:function(t){return this.getStrategy().sendHits(t)}},{key:"getAllModifications",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.getStrategy().getAllModifications(t)}},{key:"getModificationsForCampaign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getStrategy().getModificationsForCampaign(t,e)}},{key:"authenticate",value:function(t){this.getStrategy().authenticate(t),this.updateCache()}},{key:"unauthenticate",value:function(){this.getStrategy().unauthenticate(),this.updateCache()}}]),n}(function(t){s()(n,t);var e=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n,r=t.visitorId,i=t.configManager,o=t.context,a=t.isAuthenticated,c=t.hasConsented,s=t.initialModifications,u=t.initialCampaigns;(n=e.call(this))._configManager=i;var f=n.config.enableClientCache?function(){var t=null;try{t=localStorage.getItem(qt)}catch(t){}return t?JSON.parse(t):null}():null;return n.visitorId=r||(null==f?void 0:f.visitorId)||n.createVisitorId(),n.campaigns=[],n._context={},n.updateContext(o),n._anonymousId=(null==f?void 0:f.anonymousId)||null,n.loadPredefinedContext(),c||n.setConsent(!1),n.hasConsented=null==c||c,!n._anonymousId&&a&&n.config.decisionMode===H.DECISION_API&&(n._anonymousId=n.uuidV4()),n.updateCache(),n.setInitialModifications(s),n.setInitializeCampaigns(u,!!s),n}return a()(n,[{key:"getModificationsArray",value:function(){return Array.from(this._modifications,(function(t){var e=gt()(t,2);return e[0],e[1]}))}},{key:"setInitialModifications",value:function(t){var e=this;this._modifications=new Map,t&&(t instanceof Map||Array.isArray(t))&&t.forEach((function(t){e._modifications.set(t.key,t)}))}},{key:"setInitializeCampaigns",value:function(t,e){t&&Array.isArray(t)&&!e&&this.getStrategy().updateCampaigns(t)}},{key:"updateCache",value:function(){!function(t){try{localStorage.setItem(qt,JSON.stringify(t))}catch(t){}}({visitorId:this.visitorId,anonymousId:this.anonymousId})}},{key:"loadPredefinedContext",value:function(){this.context.fs_client=b,this.context.fs_version=S,this.context.fs_users=this.visitorId}},{key:"uuidV4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}},{key:"createVisitorId",value:function(){var t=new Date,e=Math.floor(89999*Math.random()+1e4),n=function(t){return 1===t.toString().length?"0".concat(t):t};return"".concat(t.getFullYear()).concat(n(t.getMonth()+1)).concat(n(t.getDate())).concat(n(t.getHours())).concat(n(t.getMinutes())).concat(e)}},{key:"visitorId",get:function(){return this._visitorId},set:function(t){t&&"string"==typeof t?this._visitorId=t:z(this.config,C,"VISITOR ID")}},{key:"hasConsented",get:function(){return this._hasConsented},set:function(t){this._hasConsented=t}},{key:"setConsent",value:function(t){this.getStrategy().setConsent(t)}},{key:"context",get:function(){return this._context},set:function(t){this._context={},this.updateContext(t)}},{key:"modifications",get:function(){return this._modifications},set:function(t){this._modifications=t}},{key:"configManager",get:function(){return this._configManager}},{key:"config",get:function(){return this.configManager.config}},{key:"campaigns",get:function(){return this._campaigns},set:function(t){this._campaigns=t}},{key:"anonymousId",get:function(){return this._anonymousId},set:function(t){this._anonymousId=t}},{key:"getStrategy",value:function(){return ie.getStatus()&&ie.getStatus()!==k.NOT_INITIALIZED?ie.getStatus()===k.READY_PANIC_ON?new Wt(this):this.hasConsented?new Kt(this):new Yt(this):new zt(this)}}]),n}(v.EventEmitter));function Qt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Zt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function Zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n(7042),n(8309),n(1817),n(2165),n(6755),n(7852);var Xt=function(t){s()(o,t);var e,n,r,i=function(t){var e=function(){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(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(o);function o(t,e,n){var r;return(r=i.call(this,t,e))._murmurHash=n,r._isFirstPooling=!0,e.initialBucketing&&(r._bucketingContent=e.initialBucketing),r}return a()(o,[{key:"finishLoop",value:function(t){if(200===t.status&&(this._bucketingContent=t.body),t.headers&&t.headers["last-modified"]){var e=t.headers["last-modified"];this._lastModified!==e&&this.config.onBucketingUpdated&&this.config.onBucketingUpdated(new Date(e)),this._lastModified=e}this._isFirstPooling&&(this._isFirstPooling=!1,this.updateFlagshipStatus(k.READY)),"function"==typeof this.config.onBucketingSuccess&&this.config.onBucketingSuccess({status:t.status,payload:this._bucketingContent}),this._isPooling=!1}},{key:"startPolling",value:function(){var t,e=this,n=1e3*(null!=(t=this.config.pollingInterval)?t:2);W(this.config,"Bucketing polling starts","startPolling"),this.polling(),0!==n&&(this._intervalID=setInterval((function(){e.polling()}),n))}},{key:"polling",value:(r=et()(rt().mark((function t(){var e,n,r,i;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._isPooling){t.next=2;break}return t.abrupt("return");case 2:return this._isPooling=!0,this._isFirstPooling&&this.updateFlagshipStatus(k.POLLING),t.prev=4,n=K("https://cdn.flagship.io/{0}/bucketing.json",this.config.envId),e={},$()(e,D,"".concat(this.config.apiKey)),$()(e,B,b),$()(e,G,S),$()(e,F,V),r=e,this._lastModified&&(r["if-modified-since"]=this._lastModified),t.next=10,this._httpClient.getAsync(n,{headers:r});case 10:i=t.sent,this.finishLoop(i),t.next=20;break;case 14:t.prev=14,t.t0=t.catch(4),this._isPooling=!1,z(this.config,t.t0,"startPolling dd"),this._isFirstPooling&&this.updateFlagshipStatus(k.NOT_INITIALIZED),"function"==typeof this.config.onBucketingFail&&this.config.onBucketingFail(new Error(t.t0));case 20:case"end":return t.stop()}}),t,this,[[4,14]])}))),function(){return r.apply(this,arguments)})},{key:"stopPolling",value:function(){clearInterval(this._intervalID),this._isPooling=!1,W(this.config,"Bucketing polling stopped","stopPolling")}},{key:"sendContext",value:(n=et()(rt().mark((function t(e){var n,r,i,o;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r=K("https://decision.flagship.io/v2/{0}/events",this.config.envId),n={},$()(n,D,"".concat(this.config.apiKey)),$()(n,B,b),$()(n,G,S),$()(n,F,V),i=n,o={visitorId:e.visitorId,type:"CONTEXT",data:e.context},t.next=6,this._httpClient.postAsync(r,{headers:i,body:o});case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),z(this.config,t.t0.message||t.t0,"sendContext");case 11:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(t){return n.apply(this,arguments)})},{key:"getCampaignsAsync",value:(e=et()(rt().mark((function t(e){var n,r=this;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.sendContext(e),this._bucketingContent){t.next=3;break}return t.abrupt("return",[]);case 3:if(!this._bucketingContent.panic){t.next=6;break}return this.panic=!0,t.abrupt("return",[]);case 6:if(this.panic=!1,this._bucketingContent.campaigns){t.next=9;break}return t.abrupt("return",[]);case 9:return n=[],this._bucketingContent.campaigns.forEach((function(t){var i=r.getVisitorCampaigns(t.variationGroups,t.id,e);i&&n.push(i)})),t.abrupt("return",n);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"getVisitorCampaigns",value:function(t,e,n){var r,i=Qt(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(this.isMatchTargeting(o,n)){var a=this.getVariation(o,n.visitorId);return a?{id:e,variation:a,variationGroupId:o.id}:null}}}catch(t){i.e(t)}finally{i.f()}return null}},{key:"getVariation",value:function(t,e){var n,r=this._murmurHash.murmurHash3Int32(t.id+e)%100,i=0,o=Qt(t.variations);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(void 0!==a.allocation&&r<(i+=a.allocation))return{id:a.id,modifications:a.modifications,reference:!!a.reference}}}catch(t){o.e(t)}finally{o.f()}return null}},{key:"isMatchTargeting",value:function(t,e){var n=this;return!!(t&&t.targeting&&t.targeting.targetingGroups)&&t.targeting.targetingGroups.some((function(t){return n.checkAndTargeting(t.targetings,e)}))}},{key:"isANDListOperator",value:function(t){return["NOT_EQUALS","NOT_CONTAINS"].includes(t)}},{key:"checkAndTargeting",value:function(t,e){var n,r,i=!1,o=Qt(t);try{for(o.s();!(r=o.n()).done;){var a=r.value,c=a.key,s=a.value,u=a.operator;if("fs_all_users"!==c){if("fs_users"===c)n=e.visitorId;else{if(!(c in e.context)){i=!1;break}n=e.context[c]}if(!(i=this.testOperator(u,n,s)))break}else i=!0}}catch(t){o.e(t)}finally{o.f()}return i}},{key:"testListOperatorLoop",value:function(t,e,n,r){var i,o=r,a=Qt(n);try{for(a.s();!(i=a.n()).done;){var c=i.value;if((o=this.testOperator(t,e,c))!==r)break}}catch(t){a.e(t)}finally{a.f()}return o}},{key:"testListOperator",value:function(t,e,n){return this.isANDListOperator(t)?this.testListOperatorLoop(t,e,n,!0):this.testListOperatorLoop(t,e,n,!1)}},{key:"testOperator",value:function(t,e,n){var r;if(Array.isArray(n))return this.testListOperator(t,e,n);switch(t){case"EQUALS":r=e===n;break;case"NOT_EQUALS":r=e!==n;break;case"CONTAINS":r=e.toString().includes(n.toString());break;case"NOT_CONTAINS":r=!e.toString().includes(n.toString());break;case"GREATER_THAN":r=e>n;break;case"LOWER_THAN":r=e<n;break;case"GREATER_THAN_OR_EQUALS":r=e>=n;break;case"LOWER_THAN_OR_EQUALS":r=e<=n;break;case"STARTS_WITH":r=e.toString().startsWith(n.toString());break;case"ENDS_WITH":r=e.toString().endsWith(n.toString());break;default:r=!1}return r}}]),o}(it),Jt=function(){function t(){}return a()(t,[{key:"murmurHash3Int32",value:function(t){var e,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=3&t.length,c=t.length-a;e=o;var s=3432918353,u=461845907;for(i=0;i<c;)r=255&t.charCodeAt(i)|(255&t.charCodeAt(++i))<<8|(255&t.charCodeAt(++i))<<16|(255&t.charCodeAt(++i))<<24,++i,e=27492+(65535&(n=5*(65535&(e=(e^=r=(65535&(r=(r=(65535&r)*s+(((r>>>16)*s&65535)<<16)&4294967295)<<15|r>>>17))*u+(((r>>>16)*u&65535)<<16)&4294967295)<<13|e>>>19))+((5*(e>>>16)&65535)<<16)&4294967295))+((58964+(n>>>16)&65535)<<16);switch(r=0,a){case 3:r^=(255&t.charCodeAt(i+2))<<16;case 2:r^=(255&t.charCodeAt(i+1))<<8;case 1:e^=r=(65535&(r=(r=(65535&(r^=255&t.charCodeAt(i)))*s+(((r>>>16)*s&65535)<<16)&4294967295)<<15|r>>>17))*u+(((r>>>16)*u&65535)<<16)&4294967295}return e^=t.length,e=2246822507*(65535&(e^=e>>>16))+((2246822507*(e>>>16)&65535)<<16)&4294967295,e=3266489909*(65535&(e^=e>>>13))+((3266489909*(e>>>16)&65535)<<16)&4294967295,(e^=e>>>16)>>>0}}]),t}();n(7727);var te=i(289);function ee(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ne(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ee(Object(n),!0).forEach((function(e){$()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var re=function(){function t(){}var e;return a()(t,[{key:"getResponse",value:(e=et()(rt().mark((function t(e){var n,r,i;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.headers.get("Content-Type"),r="application/json"===n,t.next=4,e.text();case 4:if((i=t.sent)&&r&&(i=JSON.parse(i)),e.ok){t.next=8;break}throw new Error(i||e.statusText);case 8:return t.abrupt("return",{status:e.status,body:i});case 9:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})},{key:"getAsync",value:function(t,e){var n=new te,r=setTimeout((function(){return n.abort()}),1e3*(null!=e&&e.timeout?e.timeout:2));return g(t,ne(ne({},d),{},{method:"GET",headers:null==e?void 0:e.headers,signal:n.signal,keepalive:!0})).then(this.getResponse).catch((function(t){throw t})).finally((function(){clearInterval(r)}))}},{key:"postAsync",value:function(t,e){var n=new te,r=setTimeout((function(){return n.abort()}),e.timeout?1e3*e.timeout:2e3);return g(t,ne(ne({},d),{},{method:"POST",headers:e.headers,body:JSON.stringify(e.body),signal:n.signal,keepalive:!0})).then(this.getResponse).catch((function(t){throw t})).finally((function(){clearInterval(r)}))}}]),t}(),ie=function(){function t(){}return a()(t,[{key:"config",get:function(){return this._config}},{key:"configManager",get:function(){return this._configManger},set:function(t){this._configManger=t}},{key:"setStatus",value:function(t){var e=this.config.statusChangedCallback;if(this.config&&e&&this._status!==t)return this._status=t,void e(t);this._status=t}},{key:"buildConfig",value:function(t){return t instanceof Y?t:(null==t?void 0:t.decisionMode)===H.BUCKETING?new kt(t):new X(t)}},{key:"buildDecisionManager",value:function(t,e,n){var r,i=function(e){t.setStatus(e)};if(e.decisionMode===H.BUCKETING){var o=r=new Xt(n,e,new Jt);r.statusChangedCallback(i),o.startPolling()}else(r=new ot(n,e)).statusChangedCallback(i);return r}},{key:"newVisitor",value:function(e,n){return t.newVisitor(e,n)}}],[{key:"getInstance",value:function(){return this._instance||(this._instance=new this),this._instance}},{key:"isReady",value:function(){var t,e,n,r,i,o=null==(t=this._instance)||null==(e=t.config)?void 0:e.apiKey,a=null==(n=this._instance)||null==(r=n.config)?void 0:r.envId,c=null==(i=this._instance)?void 0:i.configManager;return!!(this._instance&&o&&a&&c)}},{key:"getStatus",value:function(){return this.getInstance()._status}},{key:"getConfig",value:function(){return this.getInstance()._config}},{key:"start",value:function(t,n,r){var i,o=this.getInstance();if((r=o.buildConfig(r)).envId=t,r.apiKey=n,o._config=r,o.setStatus(k.STARTING),r.logManager||(r.logManager=new pt),!t||!n)return o.setStatus(k.NOT_INITIALIZED),z(r,"Params 'envId' and 'apiKey' must not be null or empty.",A),null;var a=null==(i=o.configManager)?void 0:i.decisionManager;"object"===e()(a)&&a instanceof Xt&&a.stopPolling();var c=new re;a=o.buildDecisionManager(o,r,c);var s=new vt(c,r);return o.configManager?(o.configManager.config=r,o.configManager.decisionManager=a,o.configManager.trackingManager=s):o.configManager=new J(r,a,s),this.isReady()?(o._status===k.STARTING&&o.setStatus(k.READY),W(r,K("Flagship SDK (version: {0}) READY",S),A),o):(o.setStatus(k.NOT_INITIALIZED),null)}},{key:"newVisitor",value:function(t,e){if(!this.isReady())return null;var n,r,i,o,a,c=!1,s=!0;"string"==typeof t||null===t?(n=t,r=e||{}):(n=(null==t?void 0:t.visitorId)||null,r=(null==t?void 0:t.context)||{},c=!(null==t||!t.isAuthenticated),s=null==(a=null==t?void 0:t.hasConsented)||a,i=null==t?void 0:t.initialModifications,o=null==t?void 0:t.initialCampaigns);var u=new $t({visitorId:n,context:r,isAuthenticated:c,hasConsented:s,configManager:this.getInstance().configManager,initialModifications:i,initialCampaigns:o}),f=new U(u);return this.getConfig().fetchNow&&f.synchronizeModifications(),f}}]),t}();const oe=ie})(),t.exports=o})()},9662:(t,e,n)=>{var r=n(614),i=n(6330);t.exports=function(t){if(r(t))return t;throw TypeError(i(t)+" is not a function")}},9483:(t,e,n)=>{var r=n(4411),i=n(6330);t.exports=function(t){if(r(t))return t;throw TypeError(i(t)+" is not a constructor")}},6077:(t,e,n)=>{var r=n(614);t.exports=function(t){if("object"==typeof t||r(t))return t;throw TypeError("Can't set "+String(t)+" as a prototype")}},1223:(t,e,n)=>{var r=n(5112),i=n(30),o=n(3070),a=r("unscopables"),c=Array.prototype;null==c[a]&&o.f(c,a,{configurable:!0,value:i(null)}),t.exports=function(t){c[a][t]=!0}},1530:(t,e,n)=>{"use strict";var r=n(8710).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},5787:t=>{t.exports=function(t,e,n){if(t instanceof e)return t;throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}},9670:(t,e,n)=>{var r=n(111);t.exports=function(t){if(r(t))return t;throw TypeError(String(t)+" is not an object")}},8533:(t,e,n)=>{"use strict";var r=n(2092).forEach,i=n(9341)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},8457:(t,e,n)=>{"use strict";var r=n(9974),i=n(7908),o=n(3411),a=n(7659),c=n(4411),s=n(7466),u=n(6135),f=n(8554),l=n(1246);t.exports=function(t){var e=i(t),n=c(this),h=arguments.length,v=h>1?arguments[1]:void 0,p=void 0!==v;p&&(v=r(v,h>2?arguments[2]:void 0,2));var d,g,y,m,k,x,b=l(e),I=0;if(!b||this==Array&&a(b))for(d=s(e.length),g=n?new this(d):Array(d);d>I;I++)x=p?v(e[I],I):e[I],u(g,I,x);else for(k=(m=f(e,b)).next,g=n?new this:[];!(y=k.call(m)).done;I++)x=p?o(m,v,[y.value,I],!0):y.value,u(g,I,x);return g.length=I,g}},1318:(t,e,n)=>{var r=n(5656),i=n(7466),o=n(1400),a=function(t){return function(e,n,a){var c,s=r(e),u=i(s.length),f=o(a,u);if(t&&n!=n){for(;u>f;)if((c=s[f++])!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2092:(t,e,n)=>{var r=n(9974),i=n(8361),o=n(7908),a=n(7466),c=n(5417),s=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,f=4==t,l=6==t,h=7==t,v=5==t||l;return function(p,d,g,y){for(var m,k,x=o(p),b=i(x),I=r(d,g,3),S=a(b.length),E=0,w=y||c,O=e?w(p,S):n||h?w(p,0):void 0;S>E;E++)if((v||E in b)&&(k=I(m=b[E],E,x),t))if(e)O[E]=k;else if(k)switch(t){case 3:return!0;case 5:return m;case 6:return E;case 2:s.call(O,m)}else switch(t){case 4:return!1;case 7:s.call(O,m)}return l?-1:u||f?f:O}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},1194:(t,e,n)=>{var r=n(7293),i=n(5112),o=n(7392),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:(t,e,n)=>{"use strict";var r=n(7293);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},7475:(t,e,n)=>{var r=n(3157),i=n(4411),o=n(111),a=n(5112)("species");t.exports=function(t){var e;return r(t)&&(e=t.constructor,(i(e)&&(e===Array||r(e.prototype))||o(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?Array:e}},5417:(t,e,n)=>{var r=n(7475);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},3411:(t,e,n)=>{var r=n(9670),i=n(9212);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){i(t,"throw",e)}}},7072:(t,e,n)=>{var r=n(5112)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},4326:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},648:(t,e,n)=>{var r=n(1694),i=n(614),o=n(4326),a=n(5112)("toStringTag"),c="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),a))?n:c?o(e):"Object"==(r=o(e))&&i(e.callee)?"Arguments":r}},5631:(t,e,n)=>{"use strict";var r=n(3070).f,i=n(30),o=n(2248),a=n(9974),c=n(5787),s=n(408),u=n(654),f=n(6340),l=n(9781),h=n(2423).fastKey,v=n(9909),p=v.set,d=v.getterFor;t.exports={getConstructor:function(t,e,n,u){var f=t((function(t,r){c(t,f,e),p(t,{type:e,index:i(null),first:void 0,last:void 0,size:0}),l||(t.size=0),null!=r&&s(r,t[u],{that:t,AS_ENTRIES:n})})),v=d(e),g=function(t,e,n){var r,i,o=v(t),a=y(t,e);return a?a.value=n:(o.last=a={index:i=h(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),l?o.size++:t.size++,"F"!==i&&(o.index[i]=a)),t},y=function(t,e){var n,r=v(t),i=h(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return o(f.prototype,{clear:function(){for(var t=v(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,l?t.size=0:this.size=0},delete:function(t){var e=this,n=v(e),r=y(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),l?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=v(this),r=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!y(this,t)}}),o(f.prototype,n?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),l&&r(f.prototype,"size",{get:function(){return v(this).size}}),f},setStrong:function(t,e,n){var r=e+" Iterator",i=d(e),o=d(r);u(t,e,(function(t,e){p(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),f(e)}}},7710:(t,e,n)=>{"use strict";var r=n(2109),i=n(7854),o=n(4705),a=n(1320),c=n(2423),s=n(408),u=n(5787),f=n(614),l=n(111),h=n(7293),v=n(7072),p=n(8003),d=n(9587);t.exports=function(t,e,n){var g=-1!==t.indexOf("Map"),y=-1!==t.indexOf("Weak"),m=g?"set":"add",k=i[t],x=k&&k.prototype,b=k,I={},S=function(t){var e=x[t];a(x,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(y&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!l(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!l(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(o(t,!f(k)||!(y||x.forEach&&!h((function(){(new k).entries().next()})))))b=n.getConstructor(e,t,g,m),c.enable();else if(o(t,!0)){var E=new b,w=E[m](y?{}:-0,1)!=E,O=h((function(){E.has(1)})),M=v((function(t){new k(t)})),C=!y&&h((function(){for(var t=new k,e=5;e--;)t[m](e,e);return!t.has(-0)}));M||((b=e((function(e,n){u(e,b,t);var r=d(new k,e,b);return null!=n&&s(n,r[m],{that:r,AS_ENTRIES:g}),r}))).prototype=x,x.constructor=b),(O||C)&&(S("delete"),S("has"),g&&S("get")),(C||w)&&S(m),y&&x.clear&&delete x.clear}return I[t]=b,r({global:!0,forced:b!=k},I),p(b,t),y||n.setStrong(b,t,g),b}},9920:(t,e,n)=>{var r=n(6656),i=n(3887),o=n(1236),a=n(3070);t.exports=function(t,e){for(var n=i(e),c=a.f,s=o.f,u=0;u<n.length;u++){var f=n[u];r(t,f)||c(t,f,s(e,f))}}},4964:(t,e,n)=>{var r=n(5112)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},8544:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},4994:(t,e,n)=>{"use strict";var r=n(3383).IteratorPrototype,i=n(30),o=n(9114),a=n(8003),c=n(7497),s=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),a(t,u,!1,!0),c[u]=s,t}},8880:(t,e,n)=>{var r=n(9781),i=n(3070),o=n(9114);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,n)=>{"use strict";var r=n(4948),i=n(3070),o=n(9114);t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},654:(t,e,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(6530),a=n(614),c=n(4994),s=n(9518),u=n(7674),f=n(8003),l=n(8880),h=n(1320),v=n(5112),p=n(7497),d=n(3383),g=o.PROPER,y=o.CONFIGURABLE,m=d.IteratorPrototype,k=d.BUGGY_SAFARI_ITERATORS,x=v("iterator"),b="keys",I="values",S="entries",E=function(){return this};t.exports=function(t,e,n,o,v,d,w){c(n,e,o);var O,M,C,_=function(t){if(t===v&&P)return P;if(!k&&t in N)return N[t];switch(t){case b:case I:case S:return function(){return new n(this,t)}}return function(){return new n(this)}},A=e+" Iterator",R=!1,N=t.prototype,T=N[x]||N["@@iterator"]||v&&N[v],P=!k&&T||_(v),L="Array"==e&&N.entries||T;if(L&&(O=s(L.call(new t)))!==Object.prototype&&O.next&&(i||s(O)===m||(u?u(O,m):a(O[x])||h(O,x,E)),f(O,A,!0,!0),i&&(p[A]=E)),g&&v==I&&T&&T.name!==I&&(!i&&y?l(N,"name",I):(R=!0,P=function(){return T.call(this)})),v)if(M={values:_(I),keys:d?P:_(b),entries:_(S)},w)for(C in M)(k||R||!(C in N))&&h(N,C,M[C]);else r({target:e,proto:!0,forced:k||R},M);return i&&!w||N[x]===P||h(N,x,P,{name:v}),p[e]=P,M}},7235:(t,e,n)=>{var r=n(857),i=n(6656),o=n(6061),a=n(3070).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},9781:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,n)=>{var r=n(7854),i=n(111),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,e,n)=>{var r=n(317)("span").classList,i=r&&r.constructor&&r.constructor.prototype;t.exports=i===Object.prototype?void 0:i},7871:t=>{t.exports="object"==typeof window},1528:(t,e,n)=>{var r=n(8113),i=n(7854);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==i.Pebble},6833:(t,e,n)=>{var r=n(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},5268:(t,e,n)=>{var r=n(4326),i=n(7854);t.exports="process"==r(i.process)},1036:(t,e,n)=>{var r=n(8113);t.exports=/web0s(?!.*chrome)/i.test(r)},8113:(t,e,n)=>{var r=n(5005);t.exports=r("navigator","userAgent")||""},7392:(t,e,n)=>{var r,i,o=n(7854),a=n(8113),c=o.process,s=o.Deno,u=c&&c.versions||s&&s.version,f=u&&u.v8;f?i=(r=f.split("."))[0]<4?1:r[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),t.exports=i&&+i},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,n)=>{var r=n(7854),i=n(1236).f,o=n(8880),a=n(1320),c=n(3505),s=n(9920),u=n(4705);t.exports=function(t,e){var n,f,l,h,v,p=t.target,d=t.global,g=t.stat;if(n=d?r:g?r[p]||c(p,{}):(r[p]||{}).prototype)for(f in e){if(h=e[f],l=t.noTargetGet?(v=i(n,f))&&v.value:n[f],!u(d?f:p+(g?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;s(h,l)}(t.sham||l&&l.sham)&&o(h,"sham",!0),a(n,f,h,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,n)=>{"use strict";n(4916);var r=n(1320),i=n(2261),o=n(7293),a=n(5112),c=n(8880),s=a("species"),u=RegExp.prototype;t.exports=function(t,e,n,f){var l=a(t),h=!o((function(){var e={};return e[l]=function(){return 7},7!=""[t](e)})),v=h&&!o((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[l]=/./[l]),n.exec=function(){return e=!0,null},n[l](""),!e}));if(!h||!v||n){var p=/./[l],d=e(l,""[t],(function(t,e,n,r,o){var a=e.exec;return a===i||a===u.exec?h&&!o?{done:!0,value:p.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}));r(String.prototype,t,d[0]),r(u,l,d[1])}f&&c(u[l],"sham",!0)}},6677:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},9974:(t,e,n)=>{var r=n(9662);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},7065:(t,e,n)=>{"use strict";var r=n(9662),i=n(111),o=[].slice,a={},c=function(t,e,n){if(!(e in a)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";a[e]=Function("C,a","return new C("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=o.call(arguments,1),a=function(){var r=n.concat(o.call(arguments));return this instanceof a?c(e,r.length,r):e.apply(t,r)};return i(e.prototype)&&(a.prototype=e.prototype),a}},6530:(t,e,n)=>{var r=n(9781),i=n(6656),o=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,c=i(o,"name"),s=c&&"something"===function(){}.name,u=c&&(!r||r&&a(o,"name").configurable);t.exports={EXISTS:c,PROPER:s,CONFIGURABLE:u}},5005:(t,e,n)=>{var r=n(7854),i=n(614),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},1246:(t,e,n)=>{var r=n(648),i=n(8173),o=n(7497),a=n(5112)("iterator");t.exports=function(t){if(null!=t)return i(t,a)||i(t,"@@iterator")||o[r(t)]}},8554:(t,e,n)=>{var r=n(9662),i=n(9670),o=n(1246);t.exports=function(t,e){var n=arguments.length<2?o(t):e;if(r(n))return i(n.call(t));throw TypeError(String(t)+" is not iterable")}},8173:(t,e,n)=>{var r=n(9662);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},647:(t,e,n)=>{var r=n(7908),i=Math.floor,o="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,s,u,f){var l=n+t.length,h=s.length,v=c;return void 0!==u&&(u=r(u),v=a),o.call(f,v,(function(r,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(l);case"<":a=u[o.slice(1,-1)];break;default:var c=+o;if(0===c)return r;if(c>h){var f=i(c/10);return 0===f?r:f<=h?void 0===s[f-1]?o.charAt(1):s[f-1]+o.charAt(1):r}a=s[c-1]}return void 0===a?"":a}))}},7854:t=>{var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||function(){return this}()||Function("return this")()},6656:(t,e,n)=>{var r=n(7908),i={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return i.call(r(t),e)}},3501:t=>{t.exports={}},842:(t,e,n)=>{var r=n(7854);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},490:(t,e,n)=>{var r=n(5005);t.exports=r("document","documentElement")},4664:(t,e,n)=>{var r=n(9781),i=n(7293),o=n(317);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,n)=>{var r=n(7293),i=n(4326),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},9587:(t,e,n)=>{var r=n(614),i=n(111),o=n(7674);t.exports=function(t,e,n){var a,c;return o&&r(a=e.constructor)&&a!==n&&i(c=a.prototype)&&c!==n.prototype&&o(t,c),t}},2788:(t,e,n)=>{var r=n(614),i=n(5465),o=Function.toString;r(i.inspectSource)||(i.inspectSource=function(t){return o.call(t)}),t.exports=i.inspectSource},2423:(t,e,n)=>{var r=n(2109),i=n(3501),o=n(111),a=n(6656),c=n(3070).f,s=n(8006),u=n(1156),f=n(9711),l=n(6677),h=!1,v=f("meta"),p=0,d=Object.isExtensible||function(){return!0},g=function(t){c(t,v,{value:{objectID:"O"+p++,weakData:{}}})},y=t.exports={enable:function(){y.enable=function(){},h=!0;var t=s.f,e=[].splice,n={};n[v]=1,t(n).length&&(s.f=function(n){for(var r=t(n),i=0,o=r.length;i<o;i++)if(r[i]===v){e.call(r,i,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,v)){if(!d(t))return"F";if(!e)return"E";g(t)}return t[v].objectID},getWeakData:function(t,e){if(!a(t,v)){if(!d(t))return!0;if(!e)return!1;g(t)}return t[v].weakData},onFreeze:function(t){return l&&h&&d(t)&&!a(t,v)&&g(t),t}};i[v]=!0},9909:(t,e,n)=>{var r,i,o,a=n(8536),c=n(7854),s=n(111),u=n(8880),f=n(6656),l=n(5465),h=n(6200),v=n(3501),p="Object already initialized",d=c.WeakMap;if(a||l.state){var g=l.state||(l.state=new d),y=g.get,m=g.has,k=g.set;r=function(t,e){if(m.call(g,t))throw new TypeError(p);return e.facade=t,k.call(g,t,e),e},i=function(t){return y.call(g,t)||{}},o=function(t){return m.call(g,t)}}else{var x=h("state");v[x]=!0,r=function(t,e){if(f(t,x))throw new TypeError(p);return e.facade=t,u(t,x,e),e},i=function(t){return f(t,x)?t[x]:{}},o=function(t){return f(t,x)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!s(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},7659:(t,e,n)=>{var r=n(5112),i=n(7497),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},3157:(t,e,n)=>{var r=n(4326);t.exports=Array.isArray||function(t){return"Array"==r(t)}},614:t=>{t.exports=function(t){return"function"==typeof t}},4411:(t,e,n)=>{var r=n(7293),i=n(614),o=n(648),a=n(5005),c=n(2788),s=[],u=a("Reflect","construct"),f=/^\s*(?:class|function)\b/,l=f.exec,h=!f.exec((function(){})),v=function(t){if(!i(t))return!1;try{return u(Object,s,t),!0}catch(t){return!1}};t.exports=!u||r((function(){var t;return v(v.call)||!v(Object)||!v((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return h||!!l.call(f,c(t))}:v},4705:(t,e,n)=>{var r=n(7293),i=n(614),o=/#|\.prototype\./,a=function(t,e){var n=s[c(t)];return n==f||n!=u&&(i(e)?r(e):!!e)},c=a.normalize=function(t){return String(t).replace(o,".").toLowerCase()},s=a.data={},u=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},8730:(t,e,n)=>{var r=n(111),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},111:(t,e,n)=>{var r=n(614);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},1913:t=>{t.exports=!1},7850:(t,e,n)=>{var r=n(111),i=n(4326),o=n(5112)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},2190:(t,e,n)=>{var r=n(614),i=n(5005),o=n(3307);t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return r(e)&&Object(t)instanceof e}},408:(t,e,n)=>{var r=n(9670),i=n(7659),o=n(7466),a=n(9974),c=n(8554),s=n(1246),u=n(9212),f=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var l,h,v,p,d,g,y,m=n&&n.that,k=!(!n||!n.AS_ENTRIES),x=!(!n||!n.IS_ITERATOR),b=!(!n||!n.INTERRUPTED),I=a(e,m,1+k+b),S=function(t){return l&&u(l,"normal",t),new f(!0,t)},E=function(t){return k?(r(t),b?I(t[0],t[1],S):I(t[0],t[1])):b?I(t,S):I(t)};if(x)l=t;else{if(!(h=s(t)))throw TypeError(String(t)+" is not iterable");if(i(h)){for(v=0,p=o(t.length);p>v;v++)if((d=E(t[v]))&&d instanceof f)return d;return new f(!1)}l=c(t,h)}for(g=l.next;!(y=g.call(l)).done;){try{d=E(y.value)}catch(t){u(l,"throw",t)}if("object"==typeof d&&d&&d instanceof f)return d}return new f(!1)}},9212:(t,e,n)=>{var r=n(9670),i=n(8173);t.exports=function(t,e,n){var o,a;r(t);try{if(!(o=i(t,"return"))){if("throw"===e)throw n;return n}o=o.call(t)}catch(t){a=!0,o=t}if("throw"===e)throw n;if(a)throw o;return r(o),n}},3383:(t,e,n)=>{"use strict";var r,i,o,a=n(7293),c=n(614),s=n(30),u=n(9518),f=n(1320),l=n(5112),h=n(1913),v=l("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(r=i):p=!0),null==r||a((function(){var t={};return r[v].call(t)!==t}))?r={}:h&&(r=s(r)),c(r[v])||f(r,v,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},7497:t=>{t.exports={}},5948:(t,e,n)=>{var r,i,o,a,c,s,u,f,l=n(7854),h=n(1236).f,v=n(261).set,p=n(6833),d=n(1528),g=n(1036),y=n(5268),m=l.MutationObserver||l.WebKitMutationObserver,k=l.document,x=l.process,b=l.Promise,I=h(l,"queueMicrotask"),S=I&&I.value;S||(r=function(){var t,e;for(y&&(t=x.domain)&&t.exit();i;){e=i.fn,i=i.next;try{e()}catch(t){throw i?a():o=void 0,t}}o=void 0,t&&t.enter()},p||y||g||!m||!k?!d&&b&&b.resolve?((u=b.resolve(void 0)).constructor=b,f=u.then,a=function(){f.call(u,r)}):a=y?function(){x.nextTick(r)}:function(){v.call(l,r)}:(c=!0,s=k.createTextNode(""),new m(r).observe(s,{characterData:!0}),a=function(){s.data=c=!c})),t.exports=S||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,a()),o=e}},3366:(t,e,n)=>{var r=n(7854);t.exports=r.Promise},133:(t,e,n)=>{var r=n(7392),i=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8536:(t,e,n)=>{var r=n(7854),i=n(614),o=n(2788),a=r.WeakMap;t.exports=i(a)&&/native code/.test(o(a))},8523:(t,e,n)=>{"use strict";var r=n(9662),i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new i(t)}},3929:(t,e,n)=>{var r=n(7850);t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},30:(t,e,n)=>{var r,i=n(9670),o=n(6048),a=n(748),c=n(3501),s=n(490),u=n(317),f=n(6200)("IE_PROTO"),l=function(){},h=function(t){return"<script>"+t+"<\/script>"},v=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;p="undefined"!=typeof document?document.domain&&r?v(r):((e=u("iframe")).style.display="none",s.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):v(r);for(var n=a.length;n--;)delete p.prototype[a[n]];return p()};c[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(l.prototype=i(t),n=new l,l.prototype=null,n[f]=t):n=p(),void 0===e?n:o(n,e)}},6048:(t,e,n)=>{var r=n(9781),i=n(3070),o=n(9670),a=n(1956);t.exports=r?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),c=r.length,s=0;c>s;)i.f(t,n=r[s++],e[n]);return t}},3070:(t,e,n)=>{var r=n(9781),i=n(4664),o=n(9670),a=n(4948),c=Object.defineProperty;e.f=r?c:function(t,e,n){if(o(t),e=a(e),o(n),i)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:(t,e,n)=>{var r=n(9781),i=n(5296),o=n(9114),a=n(5656),c=n(4948),s=n(6656),u=n(4664),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e),u)try{return f(t,e)}catch(t){}if(s(t,e))return o(!i.f.call(t,e),t[e])}},1156:(t,e,n)=>{var r=n(5656),i=n(8006).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},8006:(t,e,n)=>{var r=n(6324),i=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},9518:(t,e,n)=>{var r=n(6656),i=n(614),o=n(7908),a=n(6200),c=n(8544),s=a("IE_PROTO"),u=Object.prototype;t.exports=c?Object.getPrototypeOf:function(t){var e=o(t);if(r(e,s))return e[s];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof Object?u:null}},6324:(t,e,n)=>{var r=n(6656),i=n(5656),o=n(1318).indexOf,a=n(3501);t.exports=function(t,e){var n,c=i(t),s=0,u=[];for(n in c)!r(a,n)&&r(c,n)&&u.push(n);for(;e.length>s;)r(c,n=e[s++])&&(~o(u,n)||u.push(n));return u}},1956:(t,e,n)=>{var r=n(6324),i=n(748);t.exports=Object.keys||function(t){return r(t,i)}},5296:(t,e)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},7674:(t,e,n)=>{var r=n(9670),i=n(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},4699:(t,e,n)=>{var r=n(9781),i=n(1956),o=n(5656),a=n(5296).f,c=function(t){return function(e){for(var n,c=o(e),s=i(c),u=s.length,f=0,l=[];u>f;)n=s[f++],r&&!a.call(c,n)||l.push(t?[n,c[n]]:c[n]);return l}};t.exports={entries:c(!0),values:c(!1)}},288:(t,e,n)=>{"use strict";var r=n(1694),i=n(648);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(t,e,n)=>{var r=n(614),i=n(111);t.exports=function(t,e){var n,o;if("string"===e&&r(n=t.toString)&&!i(o=n.call(t)))return o;if(r(n=t.valueOf)&&!i(o=n.call(t)))return o;if("string"!==e&&r(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},3887:(t,e,n)=>{var r=n(5005),i=n(8006),o=n(5181),a=n(9670);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=o.f;return n?e.concat(n(t)):e}},857:(t,e,n)=>{var r=n(7854);t.exports=r},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},9478:(t,e,n)=>{var r=n(9670),i=n(111),o=n(8523);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},2248:(t,e,n)=>{var r=n(1320);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},1320:(t,e,n)=>{var r=n(7854),i=n(614),o=n(6656),a=n(8880),c=n(3505),s=n(2788),u=n(9909),f=n(6530).CONFIGURABLE,l=u.get,h=u.enforce,v=String(String).split("String");(t.exports=function(t,e,n,s){var u,l=!!s&&!!s.unsafe,p=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet,g=s&&void 0!==s.name?s.name:e;i(n)&&("Symbol("===String(g).slice(0,7)&&(g="["+String(g).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(n,"name")||f&&n.name!==g)&&a(n,"name",g),(u=h(n)).source||(u.source=v.join("string"==typeof g?g:""))),t!==r?(l?!d&&t[e]&&(p=!0):delete t[e],p?t[e]=n:a(t,e,n)):p?t[e]=n:c(e,n)})(Function.prototype,"toString",(function(){return i(this)&&l(this).source||s(this)}))},7651:(t,e,n)=>{var r=n(9670),i=n(614),o=n(4326),a=n(2261);t.exports=function(t,e){var n=t.exec;if(i(n)){var c=n.call(t,e);return null!==c&&r(c),c}if("RegExp"===o(t))return a.call(t,e);throw TypeError("RegExp#exec called on incompatible receiver")}},2261:(t,e,n)=>{"use strict";var r,i,o=n(1340),a=n(7066),c=n(2999),s=n(2309),u=n(30),f=n(9909).get,l=n(9441),h=n(7168),v=RegExp.prototype.exec,p=s("native-string-replace",String.prototype.replace),d=v,g=(r=/a/,i=/b*/g,v.call(r,"a"),v.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),y=c.UNSUPPORTED_Y||c.BROKEN_CARET,m=void 0!==/()??/.exec("")[1];(g||m||y||l||h)&&(d=function(t){var e,n,r,i,c,s,l,h=this,k=f(h),x=o(t),b=k.raw;if(b)return b.lastIndex=h.lastIndex,e=d.call(b,x),h.lastIndex=b.lastIndex,e;var I=k.groups,S=y&&h.sticky,E=a.call(h),w=h.source,O=0,M=x;if(S&&(-1===(E=E.replace("y","")).indexOf("g")&&(E+="g"),M=x.slice(h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==x.charAt(h.lastIndex-1))&&(w="(?: "+w+")",M=" "+M,O++),n=new RegExp("^(?:"+w+")",E)),m&&(n=new RegExp("^"+w+"$(?!\\s)",E)),g&&(r=h.lastIndex),i=v.call(S?n:h,M),S?i?(i.input=i.input.slice(O),i[0]=i[0].slice(O),i.index=h.lastIndex,h.lastIndex+=i[0].length):h.lastIndex=0:g&&i&&(h.lastIndex=h.global?i.index+i[0].length:r),m&&i&&i.length>1&&p.call(i[0],n,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(i[c]=void 0)})),i&&I)for(i.groups=s=u(null),c=0;c<I.length;c++)s[(l=I[c])[0]]=i[l[1]];return i}),t.exports=d},7066:(t,e,n)=>{"use strict";var r=n(9670);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},2999:(t,e,n)=>{var r=n(7293),i=n(7854).RegExp;e.UNSUPPORTED_Y=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},9441:(t,e,n)=>{var r=n(7293),i=n(7854).RegExp;t.exports=r((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},7168:(t,e,n)=>{var r=n(7293),i=n(7854).RegExp;t.exports=r((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4488:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},3505:(t,e,n)=>{var r=n(7854);t.exports=function(t,e){try{Object.defineProperty(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},6340:(t,e,n)=>{"use strict";var r=n(5005),i=n(3070),o=n(5112),a=n(9781),c=o("species");t.exports=function(t){var e=r(t),n=i.f;a&&e&&!e[c]&&n(e,c,{configurable:!0,get:function(){return this}})}},8003:(t,e,n)=>{var r=n(3070).f,i=n(6656),o=n(5112)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},6200:(t,e,n)=>{var r=n(2309),i=n(9711),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:(t,e,n)=>{var r=n(7854),i=n(3505),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},2309:(t,e,n)=>{var r=n(1913),i=n(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:(t,e,n)=>{var r=n(9670),i=n(9483),o=n(5112)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},8710:(t,e,n)=>{var r=n(9958),i=n(1340),o=n(4488),a=function(t){return function(e,n){var a,c,s=i(o(e)),u=r(n),f=s.length;return u<0||u>=f?t?"":void 0:(a=s.charCodeAt(u))<55296||a>56319||u+1===f||(c=s.charCodeAt(u+1))<56320||c>57343?t?s.charAt(u):a:t?s.slice(u,u+2):c-56320+(a-55296<<10)+65536}};t.exports={codeAt:a(!1),charAt:a(!0)}},3111:(t,e,n)=>{var r=n(4488),i=n(1340),o="["+n(1361)+"]",a=RegExp("^"+o+o+"*"),c=RegExp(o+o+"*$"),s=function(t){return function(e){var n=i(r(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(c,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},261:(t,e,n)=>{var r,i,o,a,c=n(7854),s=n(614),u=n(7293),f=n(9974),l=n(490),h=n(317),v=n(6833),p=n(5268),d=c.setImmediate,g=c.clearImmediate,y=c.process,m=c.MessageChannel,k=c.Dispatch,x=0,b={};try{r=c.location}catch(t){}var I=function(t){if(b.hasOwnProperty(t)){var e=b[t];delete b[t],e()}},S=function(t){return function(){I(t)}},E=function(t){I(t.data)},w=function(t){c.postMessage(String(t),r.protocol+"//"+r.host)};d&&g||(d=function(t){for(var e=[],n=arguments.length,r=1;n>r;)e.push(arguments[r++]);return b[++x]=function(){(s(t)?t:Function(t)).apply(void 0,e)},i(x),x},g=function(t){delete b[t]},p?i=function(t){y.nextTick(S(t))}:k&&k.now?i=function(t){k.now(S(t))}:m&&!v?(a=(o=new m).port2,o.port1.onmessage=E,i=f(a.postMessage,a,1)):c.addEventListener&&s(c.postMessage)&&!c.importScripts&&r&&"file:"!==r.protocol&&!u(w)?(i=w,c.addEventListener("message",E,!1)):i="onreadystatechange"in h("script")?function(t){l.appendChild(h("script")).onreadystatechange=function(){l.removeChild(this),I(t)}}:function(t){setTimeout(S(t),0)}),t.exports={set:d,clear:g}},1400:(t,e,n)=>{var r=n(9958),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},5656:(t,e,n)=>{var r=n(8361),i=n(4488);t.exports=function(t){return r(i(t))}},9958:t=>{var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},7466:(t,e,n)=>{var r=n(9958),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},7908:(t,e,n)=>{var r=n(4488);t.exports=function(t){return Object(r(t))}},7593:(t,e,n)=>{var r=n(111),i=n(2190),o=n(8173),a=n(2140),c=n(5112)("toPrimitive");t.exports=function(t,e){if(!r(t)||i(t))return t;var n,s=o(t,c);if(s){if(void 0===e&&(e="default"),n=s.call(t,e),!r(n)||i(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},4948:(t,e,n)=>{var r=n(7593),i=n(2190);t.exports=function(t){var e=r(t,"string");return i(e)?e:String(e)}},1694:(t,e,n)=>{var r={};r[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(r)},1340:(t,e,n)=>{var r=n(648);t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},6330:t=>{t.exports=function(t){try{return String(t)}catch(t){return"Object"}}},9711:t=>{var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},3307:(t,e,n)=>{var r=n(133);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},6061:(t,e,n)=>{var r=n(5112);e.f=r},5112:(t,e,n)=>{var r=n(7854),i=n(2309),o=n(6656),a=n(9711),c=n(133),s=n(3307),u=i("wks"),f=r.Symbol,l=s?f:f&&f.withoutSetter||a;t.exports=function(t){return o(u,t)&&(c||"string"==typeof u[t])||(c&&o(f,t)?u[t]=f[t]:u[t]=l("Symbol."+t)),u[t]}},1361:t=>{t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},2222:(t,e,n)=>{"use strict";var r=n(2109),i=n(7293),o=n(3157),a=n(111),c=n(7908),s=n(7466),u=n(6135),f=n(5417),l=n(1194),h=n(5112),v=n(7392),p=h("isConcatSpreadable"),d=9007199254740991,g="Maximum allowed index exceeded",y=v>=51||!i((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),m=l("concat"),k=function(t){if(!a(t))return!1;var e=t[p];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,forced:!y||!m},{concat:function(t){var e,n,r,i,o,a=c(this),l=f(a,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(k(o=-1===e?a:arguments[e])){if(h+(i=s(o.length))>d)throw TypeError(g);for(n=0;n<i;n++,h++)n in o&&u(l,h,o[n])}else{if(h>=d)throw TypeError(g);u(l,h++,o)}return l.length=h,l}})},7327:(t,e,n)=>{"use strict";var r=n(2109),i=n(2092).filter;r({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},1038:(t,e,n)=>{var r=n(2109),i=n(8457);r({target:"Array",stat:!0,forced:!n(7072)((function(t){Array.from(t)}))},{from:i})},6699:(t,e,n)=>{"use strict";var r=n(2109),i=n(1318).includes,o=n(1223);r({target:"Array",proto:!0},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},6992:(t,e,n)=>{"use strict";var r=n(5656),i=n(1223),o=n(7497),a=n(9909),c=n(654),s="Array Iterator",u=a.set,f=a.getterFor(s);t.exports=c(Array,"Array",(function(t,e){u(this,{type:s,target:r(t),index:0,kind:e})}),(function(){var t=f(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},7042:(t,e,n)=>{"use strict";var r=n(2109),i=n(3157),o=n(4411),a=n(111),c=n(1400),s=n(7466),u=n(5656),f=n(6135),l=n(5112),h=n(1194)("slice"),v=l("species"),p=[].slice,d=Math.max;r({target:"Array",proto:!0,forced:!h},{slice:function(t,e){var n,r,l,h=u(this),g=s(h.length),y=c(t,g),m=c(void 0===e?g:e,g);if(i(h)&&(n=h.constructor,(o(n)&&(n===Array||i(n.prototype))||a(n)&&null===(n=n[v]))&&(n=void 0),n===Array||void 0===n))return p.call(h,y,m);for(r=new(void 0===n?Array:n)(d(m-y,0)),l=0;y<m;y++,l++)y in h&&f(r,l,h[y]);return r.length=l,r}})},8309:(t,e,n)=>{var r=n(9781),i=n(6530).EXISTS,o=n(3070).f,a=Function.prototype,c=a.toString,s=/^\s*function ([^ (]*)/;r&&!i&&o(a,"name",{configurable:!0,get:function(){try{return c.call(this).match(s)[1]}catch(t){return""}}})},1532:(t,e,n)=>{"use strict";var r=n(7710),i=n(5631);t.exports=r("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},3689:(t,e,n)=>{var r=n(2109),i=Math.ceil,o=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(t>0?o:i)(t)}})},9653:(t,e,n)=>{"use strict";var r=n(9781),i=n(7854),o=n(4705),a=n(1320),c=n(6656),s=n(4326),u=n(9587),f=n(2190),l=n(7593),h=n(7293),v=n(30),p=n(8006).f,d=n(1236).f,g=n(3070).f,y=n(3111).trim,m="Number",k=i.Number,x=k.prototype,b=s(v(x))==m,I=function(t){if(f(t))throw TypeError("Cannot convert a Symbol value to a number");var e,n,r,i,o,a,c,s,u=l(t,"number");if("string"==typeof u&&u.length>2)if(43===(e=(u=y(u)).charCodeAt(0))||45===e){if(88===(n=u.charCodeAt(2))||120===n)return NaN}else if(48===e){switch(u.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+u}for(a=(o=u.slice(2)).length,c=0;c<a;c++)if((s=o.charCodeAt(c))<48||s>i)return NaN;return parseInt(o,r)}return+u};if(o(m,!k(" 0o1")||!k("0b1")||k("+0x1"))){for(var S,E=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof E&&(b?h((function(){x.valueOf.call(n)})):s(n)!=m)?u(new k(I(e)),n,E):I(e)},w=r?p(k):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),O=0;w.length>O;O++)c(k,S=w[O])&&!c(E,S)&&g(E,S,d(k,S));E.prototype=x,x.constructor=E,a(i,m,E)}},3161:(t,e,n)=>{n(2109)({target:"Number",stat:!0},{isInteger:n(8730)})},5003:(t,e,n)=>{var r=n(2109),i=n(7293),o=n(5656),a=n(1236).f,c=n(9781),s=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!c||s,sham:!c},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},9337:(t,e,n)=>{var r=n(2109),i=n(9781),o=n(3887),a=n(5656),c=n(1236),s=n(6135);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),i=c.f,u=o(r),f={},l=0;u.length>l;)void 0!==(n=i(r,e=u[l++]))&&s(f,e,n);return f}})},7941:(t,e,n)=>{var r=n(2109),i=n(7908),o=n(1956);r({target:"Object",stat:!0,forced:n(7293)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},1539:(t,e,n)=>{var r=n(1694),i=n(1320),o=n(288);r||i(Object.prototype,"toString",o,{unsafe:!0})},2479:(t,e,n)=>{var r=n(2109),i=n(4699).values;r({target:"Object",stat:!0},{values:function(t){return i(t)}})},7727:(t,e,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(3366),a=n(7293),c=n(5005),s=n(614),u=n(6707),f=n(9478),l=n(1320);if(r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=u(this,c("Promise")),n=s(t);return this.then(n?function(n){return f(e,t()).then((function(){return n}))}:t,n?function(n){return f(e,t()).then((function(){throw n}))}:t)}}),!i&&s(o)){var h=c("Promise").prototype.finally;o.prototype.finally!==h&&l(o.prototype,"finally",h,{unsafe:!0})}},8674:(t,e,n)=>{"use strict";var r,i,o,a,c=n(2109),s=n(1913),u=n(7854),f=n(5005),l=n(3366),h=n(1320),v=n(2248),p=n(7674),d=n(8003),g=n(6340),y=n(9662),m=n(614),k=n(111),x=n(5787),b=n(2788),I=n(408),S=n(7072),E=n(6707),w=n(261).set,O=n(5948),M=n(9478),C=n(842),_=n(8523),A=n(2534),R=n(9909),N=n(4705),T=n(5112),P=n(7871),L=n(5268),j=n(7392),D=T("species"),F="Promise",B=R.get,G=R.set,V=R.getterFor(F),H=l&&l.prototype,U=l,K=H,z=u.TypeError,W=u.document,Y=u.process,q=_.f,$=q,Q=!!(W&&W.createEvent&&u.dispatchEvent),Z=m(u.PromiseRejectionEvent),X="unhandledrejection",J=!1,tt=N(F,(function(){var t=b(U),e=t!==String(U);if(!e&&66===j)return!0;if(s&&!K.finally)return!0;if(j>=51&&/native code/.test(t))return!1;var n=new U((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[D]=r,!(J=n.then((function(){}))instanceof r)||!e&&P&&!Z})),et=tt||!S((function(t){U.all(t).catch((function(){}))})),nt=function(t){var e;return!(!k(t)||!m(e=t.then))&&e},rt=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;O((function(){for(var r=t.value,i=1==t.state,o=0;n.length>o;){var a,c,s,u=n[o++],f=i?u.ok:u.fail,l=u.resolve,h=u.reject,v=u.domain;try{f?(i||(2===t.rejection&&ct(t),t.rejection=1),!0===f?a=r:(v&&v.enter(),a=f(r),v&&(v.exit(),s=!0)),a===u.promise?h(z("Promise-chain cycle")):(c=nt(a))?c.call(a,l,h):l(a)):h(r)}catch(t){v&&!s&&v.exit(),h(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ot(t)}))}},it=function(t,e,n){var r,i;Q?((r=W.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:e,reason:n},!Z&&(i=u["on"+t])?i(r):t===X&&C("Unhandled promise rejection",n)},ot=function(t){w.call(u,(function(){var e,n=t.facade,r=t.value;if(at(t)&&(e=A((function(){L?Y.emit("unhandledRejection",r,n):it(X,n,r)})),t.rejection=L||at(t)?2:1,e.error))throw e.value}))},at=function(t){return 1!==t.rejection&&!t.parent},ct=function(t){w.call(u,(function(){var e=t.facade;L?Y.emit("rejectionHandled",e):it("rejectionhandled",e,t.value)}))},st=function(t,e,n){return function(r){t(e,r,n)}},ut=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,rt(t,!0))},ft=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw z("Promise can't be resolved itself");var r=nt(e);r?O((function(){var n={done:!1};try{r.call(e,st(ft,n,t),st(ut,n,t))}catch(e){ut(n,e,t)}})):(t.value=e,t.state=1,rt(t,!1))}catch(e){ut({done:!1},e,t)}}};if(tt&&(K=(U=function(t){x(this,U,F),y(t),r.call(this);var e=B(this);try{t(st(ft,e),st(ut,e))}catch(t){ut(e,t)}}).prototype,(r=function(t){G(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=v(K,{then:function(t,e){var n=V(this),r=q(E(this,U));return r.ok=!m(t)||t,r.fail=m(e)&&e,r.domain=L?Y.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&rt(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r,e=B(t);this.promise=t,this.resolve=st(ft,e),this.reject=st(ut,e)},_.f=q=function(t){return t===U||t===o?new i(t):$(t)},!s&&m(l)&&H!==Object.prototype)){a=H.then,J||(h(H,"then",(function(t,e){var n=this;return new U((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),h(H,"catch",K.catch,{unsafe:!0}));try{delete H.constructor}catch(t){}p&&p(H,K)}c({global:!0,wrap:!0,forced:tt},{Promise:U}),d(U,F,!1,!0),g(F),o=f(F),c({target:F,stat:!0,forced:tt},{reject:function(t){var e=q(this);return e.reject.call(void 0,t),e.promise}}),c({target:F,stat:!0,forced:s||tt},{resolve:function(t){return M(s&&this===o?U:this,t)}}),c({target:F,stat:!0,forced:et},{all:function(t){var e=this,n=q(e),r=n.resolve,i=n.reject,o=A((function(){var n=y(e.resolve),o=[],a=0,c=1;I(t,(function(t){var s=a++,u=!1;o.push(void 0),c++,n.call(e,t).then((function(t){u||(u=!0,o[s]=t,--c||r(o))}),i)})),--c||r(o)}));return o.error&&i(o.value),n.promise},race:function(t){var e=this,n=q(e),r=n.reject,i=A((function(){var i=y(e.resolve);I(t,(function(t){i.call(e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},2419:(t,e,n)=>{var r=n(2109),i=n(5005),o=n(9483),a=n(9670),c=n(111),s=n(30),u=n(7065),f=n(7293),l=i("Reflect","construct"),h=f((function(){function t(){}return!(l((function(){}),[],t)instanceof t)})),v=!f((function(){l((function(){}))})),p=h||v;r({target:"Reflect",stat:!0,forced:p,sham:p},{construct:function(t,e){o(t),a(e);var n=arguments.length<3?t:o(arguments[2]);if(v&&!h)return l(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var i=n.prototype,f=s(c(i)?i:Object.prototype),p=Function.apply.call(t,f,e);return c(p)?p:f}})},4603:(t,e,n)=>{var r=n(9781),i=n(7854),o=n(4705),a=n(9587),c=n(8880),s=n(3070).f,u=n(8006).f,f=n(7850),l=n(1340),h=n(7066),v=n(2999),p=n(1320),d=n(7293),g=n(6656),y=n(9909).enforce,m=n(6340),k=n(5112),x=n(9441),b=n(7168),I=k("match"),S=i.RegExp,E=S.prototype,w=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,O=/a/g,M=/a/g,C=new S(O)!==O,_=v.UNSUPPORTED_Y;if(o("RegExp",r&&(!C||_||x||b||d((function(){return M[I]=!1,S(O)!=O||S(M)==M||"/a/i"!=S(O,"i")}))))){for(var A=function(t,e){var n,r,i,o,s,u,v=this instanceof A,p=f(t),d=void 0===e,m=[],k=t;if(!v&&p&&d&&t.constructor===A)return t;if((p||t instanceof A)&&(t=t.source,d&&(e="flags"in k?k.flags:h.call(k))),t=void 0===t?"":l(t),e=void 0===e?"":l(e),k=t,x&&"dotAll"in O&&(r=!!e&&e.indexOf("s")>-1)&&(e=e.replace(/s/g,"")),n=e,_&&"sticky"in O&&(i=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,"")),b&&(o=function(t){for(var e,n=t.length,r=0,i="",o=[],a={},c=!1,s=!1,u=0,f="";r<=n;r++){if("\\"===(e=t.charAt(r)))e+=t.charAt(++r);else if("]"===e)c=!1;else if(!c)switch(!0){case"["===e:c=!0;break;case"("===e:w.test(t.slice(r+1))&&(r+=2,s=!0),i+=e,u++;continue;case">"===e&&s:if(""===f||g(a,f))throw new SyntaxError("Invalid capture group name");a[f]=!0,o.push([f,u]),s=!1,f="";continue}s?f+=e:i+=e}return[i,o]}(t),t=o[0],m=o[1]),s=a(S(t,e),v?this:E,A),(r||i||m.length)&&(u=y(s),r&&(u.dotAll=!0,u.raw=A(function(t){for(var e,n=t.length,r=0,i="",o=!1;r<=n;r++)"\\"!==(e=t.charAt(r))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),i+=e):i+="[\\s\\S]":i+=e+t.charAt(++r);return i}(t),n)),i&&(u.sticky=!0),m.length&&(u.groups=m)),t!==k)try{c(s,"source",""===k?"(?:)":k)}catch(t){}return s},R=function(t){t in A||s(A,t,{configurable:!0,get:function(){return S[t]},set:function(e){S[t]=e}})},N=u(S),T=0;N.length>T;)R(N[T++]);E.constructor=A,A.prototype=E,p(i,"RegExp",A)}m("RegExp")},4916:(t,e,n)=>{"use strict";var r=n(2109),i=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},9714:(t,e,n)=>{"use strict";var r=n(6530).PROPER,i=n(1320),o=n(9670),a=n(1340),c=n(7293),s=n(7066),u="toString",f=RegExp.prototype,l=f.toString,h=c((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),v=r&&l.name!=u;(h||v)&&i(RegExp.prototype,u,(function(){var t=o(this),e=a(t.source),n=t.flags;return"/"+e+"/"+a(void 0===n&&t instanceof RegExp&&!("flags"in f)?s.call(t):n)}),{unsafe:!0})},7852:(t,e,n)=>{"use strict";var r,i=n(2109),o=n(1236).f,a=n(7466),c=n(1340),s=n(3929),u=n(4488),f=n(4964),l=n(1913),h="".endsWith,v=Math.min,p=f("endsWith");i({target:"String",proto:!0,forced:!(!l&&!p&&(r=o(String.prototype,"endsWith"),r&&!r.writable)||p)},{endsWith:function(t){var e=c(u(this));s(t);var n=arguments.length>1?arguments[1]:void 0,r=a(e.length),i=void 0===n?r:v(a(n),r),o=c(t);return h?h.call(e,o,i):e.slice(i-o.length,i)===o}})},2023:(t,e,n)=>{"use strict";var r=n(2109),i=n(3929),o=n(4488),a=n(1340);r({target:"String",proto:!0,forced:!n(4964)("includes")},{includes:function(t){return!!~a(o(this)).indexOf(a(i(t)),arguments.length>1?arguments[1]:void 0)}})},8783:(t,e,n)=>{"use strict";var r=n(8710).charAt,i=n(1340),o=n(9909),a=n(654),c="String Iterator",s=o.set,u=o.getterFor(c);a(String,"String",(function(t){s(this,{type:c,string:i(t),index:0})}),(function(){var t,e=u(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},4723:(t,e,n)=>{"use strict";var r=n(7007),i=n(9670),o=n(7466),a=n(1340),c=n(4488),s=n(8173),u=n(1530),f=n(7651);r("match",(function(t,e,n){return[function(e){var n=c(this),r=null==e?void 0:s(e,t);return r?r.call(e,n):new RegExp(e)[t](a(n))},function(t){var r=i(this),c=a(t),s=n(e,r,c);if(s.done)return s.value;if(!r.global)return f(r,c);var l=r.unicode;r.lastIndex=0;for(var h,v=[],p=0;null!==(h=f(r,c));){var d=a(h[0]);v[p]=d,""===d&&(r.lastIndex=u(c,o(r.lastIndex),l)),p++}return 0===p?null:v}]}))},5306:(t,e,n)=>{"use strict";var r=n(7007),i=n(7293),o=n(9670),a=n(614),c=n(9958),s=n(7466),u=n(1340),f=n(4488),l=n(1530),h=n(8173),v=n(647),p=n(7651),d=n(5112)("replace"),g=Math.max,y=Math.min,m="$0"==="a".replace(/./,"$0"),k=!!/./[d]&&""===/./[d]("a","$0");r("replace",(function(t,e,n){var r=k?"$":"$0";return[function(t,n){var r=f(this),i=null==t?void 0:h(t,d);return i?i.call(t,r,n):e.call(u(r),t,n)},function(t,i){var f=o(this),h=u(t);if("string"==typeof i&&-1===i.indexOf(r)&&-1===i.indexOf("$<")){var d=n(e,f,h,i);if(d.done)return d.value}var m=a(i);m||(i=u(i));var k=f.global;if(k){var x=f.unicode;f.lastIndex=0}for(var b=[];;){var I=p(f,h);if(null===I)break;if(b.push(I),!k)break;""===u(I[0])&&(f.lastIndex=l(h,s(f.lastIndex),x))}for(var S,E="",w=0,O=0;O<b.length;O++){I=b[O];for(var M=u(I[0]),C=g(y(c(I.index),h.length),0),_=[],A=1;A<I.length;A++)_.push(void 0===(S=I[A])?S:String(S));var R=I.groups;if(m){var N=[M].concat(_,C,h);void 0!==R&&N.push(R);var T=u(i.apply(void 0,N))}else T=v(M,h,C,_,R,i);C>=w&&(E+=h.slice(w,C)+T,w=C+M.length)}return E+h.slice(w)}]}),!!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!m||k)},6755:(t,e,n)=>{"use strict";var r,i=n(2109),o=n(1236).f,a=n(7466),c=n(1340),s=n(3929),u=n(4488),f=n(4964),l=n(1913),h="".startsWith,v=Math.min,p=f("startsWith");i({target:"String",proto:!0,forced:!(!l&&!p&&(r=o(String.prototype,"startsWith"),r&&!r.writable)||p)},{startsWith:function(t){var e=c(u(this));s(t);var n=a(v(arguments.length>1?arguments[1]:void 0,e.length)),r=c(t);return h?h.call(e,r,n):e.slice(n,n+r.length)===r}})},1817:(t,e,n)=>{"use strict";var r=n(2109),i=n(9781),o=n(7854),a=n(6656),c=n(614),s=n(111),u=n(3070).f,f=n(9920),l=o.Symbol;if(i&&c(l)&&(!("description"in l.prototype)||void 0!==l().description)){var h={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof v?new l(t):void 0===t?l():l(t);return""===t&&(h[e]=!0),e};f(v,l);var p=v.prototype=l.prototype;p.constructor=v;var d=p.toString,g="Symbol(test)"==String(l("test")),y=/^Symbol\((.*)\)[^)]+$/;u(p,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=d.call(t);if(a(h,t))return"";var n=g?e.slice(7,-1):e.replace(y,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:v})}},2165:(t,e,n)=>{n(7235)("iterator")},2526:(t,e,n)=>{"use strict";var r=n(2109),i=n(7854),o=n(5005),a=n(1913),c=n(9781),s=n(133),u=n(7293),f=n(6656),l=n(3157),h=n(614),v=n(111),p=n(2190),d=n(9670),g=n(7908),y=n(5656),m=n(4948),k=n(1340),x=n(9114),b=n(30),I=n(1956),S=n(8006),E=n(1156),w=n(5181),O=n(1236),M=n(3070),C=n(5296),_=n(1320),A=n(2309),R=n(6200),N=n(3501),T=n(9711),P=n(5112),L=n(6061),j=n(7235),D=n(8003),F=n(9909),B=n(2092).forEach,G=R("hidden"),V="Symbol",H=P("toPrimitive"),U=F.set,K=F.getterFor(V),z=Object.prototype,W=i.Symbol,Y=o("JSON","stringify"),q=O.f,$=M.f,Q=E.f,Z=C.f,X=A("symbols"),J=A("op-symbols"),tt=A("string-to-symbol-registry"),et=A("symbol-to-string-registry"),nt=A("wks"),rt=i.QObject,it=!rt||!rt.prototype||!rt.prototype.findChild,ot=c&&u((function(){return 7!=b($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=q(z,e);r&&delete z[e],$(t,e,n),r&&t!==z&&$(z,e,r)}:$,at=function(t,e){var n=X[t]=b(W.prototype);return U(n,{type:V,tag:t,description:e}),c||(n.description=e),n},ct=function(t,e,n){t===z&&ct(J,e,n),d(t);var r=m(e);return d(n),f(X,r)?(n.enumerable?(f(t,G)&&t[G][r]&&(t[G][r]=!1),n=b(n,{enumerable:x(0,!1)})):(f(t,G)||$(t,G,x(1,{})),t[G][r]=!0),ot(t,r,n)):$(t,r,n)},st=function(t,e){d(t);var n=y(e),r=I(n).concat(ht(n));return B(r,(function(e){c&&!ut.call(n,e)||ct(t,e,n[e])})),t},ut=function(t){var e=m(t),n=Z.call(this,e);return!(this===z&&f(X,e)&&!f(J,e))&&(!(n||!f(this,e)||!f(X,e)||f(this,G)&&this[G][e])||n)},ft=function(t,e){var n=y(t),r=m(e);if(n!==z||!f(X,r)||f(J,r)){var i=q(n,r);return!i||!f(X,r)||f(n,G)&&n[G][r]||(i.enumerable=!0),i}},lt=function(t){var e=Q(y(t)),n=[];return B(e,(function(t){f(X,t)||f(N,t)||n.push(t)})),n},ht=function(t){var e=t===z,n=Q(e?J:y(t)),r=[];return B(n,(function(t){!f(X,t)||e&&!f(z,t)||r.push(X[t])})),r};if(s||(_((W=function(){if(this instanceof W)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?k(arguments[0]):void 0,e=T(t),n=function(t){this===z&&n.call(J,t),f(this,G)&&f(this[G],e)&&(this[G][e]=!1),ot(this,e,x(1,t))};return c&&it&&ot(z,e,{configurable:!0,set:n}),at(e,t)}).prototype,"toString",(function(){return K(this).tag})),_(W,"withoutSetter",(function(t){return at(T(t),t)})),C.f=ut,M.f=ct,O.f=ft,S.f=E.f=lt,w.f=ht,L.f=function(t){return at(P(t),t)},c&&($(W.prototype,"description",{configurable:!0,get:function(){return K(this).description}}),a||_(z,"propertyIsEnumerable",ut,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:W}),B(I(nt),(function(t){j(t)})),r({target:V,stat:!0,forced:!s},{for:function(t){var e=k(t);if(f(tt,e))return tt[e];var n=W(e);return tt[e]=n,et[n]=e,n},keyFor:function(t){if(!p(t))throw TypeError(t+" is not a symbol");if(f(et,t))return et[t]},useSetter:function(){it=!0},useSimple:function(){it=!1}}),r({target:"Object",stat:!0,forced:!s,sham:!c},{create:function(t,e){return void 0===e?b(t):st(b(t),e)},defineProperty:ct,defineProperties:st,getOwnPropertyDescriptor:ft}),r({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:lt,getOwnPropertySymbols:ht}),r({target:"Object",stat:!0,forced:u((function(){w.f(1)}))},{getOwnPropertySymbols:function(t){return w.f(g(t))}}),Y&&r({target:"JSON",stat:!0,forced:!s||u((function(){var t=W();return"[null]"!=Y([t])||"{}"!=Y({a:t})||"{}"!=Y(Object(t))}))},{stringify:function(t,e,n){for(var r,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=e,(v(e)||void 0!==t)&&!p(t))return l(e)||(e=function(t,e){if(h(r)&&(e=r.call(this,t,e)),!p(e))return e}),i[1]=e,Y.apply(null,i)}}),!W.prototype[H]){var vt=W.prototype.valueOf;_(W.prototype,H,(function(){return vt.apply(this,arguments)}))}D(W,V),N[G]=!0},4747:(t,e,n)=>{var r=n(7854),i=n(8324),o=n(8509),a=n(8533),c=n(8880),s=function(t){if(t&&t.forEach!==a)try{c(t,"forEach",a)}catch(e){t.forEach=a}};for(var u in i)i[u]&&s(r[u]&&r[u].prototype);s(o)},3948:(t,e,n)=>{var r=n(7854),i=n(8324),o=n(8509),a=n(6992),c=n(8880),s=n(5112),u=s("iterator"),f=s("toStringTag"),l=a.values,h=function(t,e){if(t){if(t[u]!==l)try{c(t,u,l)}catch(e){t[u]=l}if(t[f]||c(t,f,e),i[e])for(var n in a)if(t[n]!==a[n])try{c(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var v in i)h(r[v]&&r[v].prototype,v);h(o,"DOMTokenList")},5666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof g?e:g,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(t,e,n){var r=l;return function(i,o){if(r===v)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=v;var s=f(t,e,n);if("normal"===s.type){if(r=n.done?p:h,s.arg===d)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=p,n.method="throw",n.arg=s.arg)}}}(t,n,a),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l="suspendedStart",h="suspendedYield",v="executing",p="completed",d={};function g(){}function y(){}function m(){}var k={};s(k,o,(function(){return this}));var x=Object.getPrototypeOf,b=x&&x(x(_([])));b&&b!==n&&r.call(b,o)&&(k=b);var I=m.prototype=g.prototype=Object.create(k);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(i,o,a,c){var s=f(t[i],t,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,w(t,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=f(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:e,done:!0}}return y.prototype=m,s(I,"constructor",m),s(m,"constructor",y),y.displayName=s(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},S(E.prototype),s(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new E(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(I),s(I,c,"Generator"),s(I,o,(function(){return this})),s(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(M),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return c.type="throw",c.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},9591:t=>{"use strict";t.exports=require("@babel/runtime/helpers/asyncToGenerator")},8765:t=>{"use strict";t.exports=require("@babel/runtime/helpers/createClass")},8779:t=>{"use strict";t.exports=require("@babel/runtime/helpers/defineProperty")},3761:t=>{"use strict";t.exports=require("@babel/runtime/helpers/getPrototypeOf")},5370:t=>{"use strict";t.exports=require("@babel/runtime/helpers/inherits")},9548:t=>{"use strict";t.exports=require("@babel/runtime/helpers/possibleConstructorReturn")},353:t=>{"use strict";t.exports=require("@babel/runtime/helpers/slicedToArray")},9293:t=>{"use strict";t.exports=require("@babel/runtime/helpers/typeof")},1307:t=>{"use strict";t.exports=require("@babel/runtime/regenerator")},1030:t=>{"use strict";t.exports=require("abort-controller")},1239:t=>{"use strict";t.exports=require("events")},4809:t=>{"use strict";t.exports=require("node-fetch")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{DecisionMode:()=>i.DecisionMode,FlagshipContext:()=>v,FlagshipProvider:()=>p,noVisitorDefault:()=>R,noVisitorMessage:()=>A,useFlagship:()=>_,useFsActivate:()=>C,useFsModification:()=>I,useFsModificationInfo:()=>E,useFsModifications:()=>b,useFsSynchronizeModifications:()=>O}),n(6992),n(1532),n(1539),n(8783),n(3948),n(4747),n(7941),n(2526),n(7327),n(5003),n(9337),n(1817),n(2165),n(7042),n(8309),n(1038);const t=require("react");var e=n.n(t),i=n(6968);function o(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.error&&t.logLevel&&!(t.logLevel<i.LogLevel.ERROR)&&t.logManager.error(e,n)}function a(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.warning&&t.logLevel&&!(t.logLevel<i.LogLevel.WARNING)&&t.logManager.warning(e,n)}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h={status:{isLoading:!0,isSdkReady:!1}},v=(0,t.createContext)({state:f({},h)}),p=function(n){var r=n.children,a=n.fetchNow,s=n.envId,u=n.apiKey,l=n.decisionMode,p=n.timeout,d=n.logLevel,g=n.statusChangedCallback,y=n.logManager,m=n.pollingInterval,k=n.visitorData,x=n.onInitStart,b=n.onInitDone,I=n.onBucketingSuccess,S=n.onBucketingFail,E=n.loadingComponent,w=n.onBucketingUpdated,O=n.onUpdate,M=n.enableClientCache,C=n.initialBucketing,_=n.initialCampaigns,A=n.initialModifications,R=n.synchronizeOnBucketingUpdated,N=new Map;A?A.forEach((function(t){N.set(t.key,t)})):_&&(N=function(t){var e=new Map;return t&&Array.isArray(t)?(t.forEach((function(t){var n=t.variation.modifications.value;for(var r in n){var i=n[r];e.set(r,{key:r,campaignId:t.id,variationGroupId:t.variationGroupId,variationId:t.variation.id,isReference:t.variation.reference,value:i})}})),e):e}(_));var T=c((0,t.useState)(f(f({},h),{},{modifications:N})),2),P=T[0],L=T[1],j=c((0,t.useState)(),2),D=j[0],F=j[1],B=(0,t.useRef)();B.current=P,(0,t.useEffect)((function(){var t;R&&(null===(t=P.visitor)||void 0===t||t.synchronizeModifications())}),[D]),(0,t.useEffect)((function(){G()}),[JSON.stringify(k)]),(0,t.useEffect)((function(){z()}),[s,u,l]);var G=function(){P.visitor&&(k.context&&(P.visitor.clearContext(),P.visitor.updateContext(k.context)),"boolean"==typeof k.hasConsented&&P.visitor.setConsent(k.hasConsented),P.visitor.anonymousId&&!k.isAuthenticated?P.visitor.unauthenticate():!P.visitor.anonymousId&&k.isAuthenticated&&P.visitor.authenticate(k.id),k.id&&(P.visitor.visitorId=k.id),P.visitor.synchronizeModifications())};function V(t){var e={isSdkReady:t.isSdkReady,isLoading:t.isLoading,isVisitorDefined:!!t.fsVisitor,lastRefresh:(new Date).toISOString()};return L((function(n){return n.status.firstInitSuccess||(e.firstInitSuccess=(new Date).toISOString()),f(f({},n),{},{visitor:t.fsVisitor,modifications:t.fsVisitor.modifications,config:i.Flagship.getConfig(),status:f(f({},n.status),e)})})),e}var H,U=function(t){if(g&&g(t),t===i.FlagshipStatus.STARTING&&x)x();else if(t===i.FlagshipStatus.READY_PANIC_ON||t===i.FlagshipStatus.READY){var e;if(b&&b(),null!==(e=B.current)&&void 0!==e&&e.visitor){var n;null===(n=B.current)||void 0===n||n.visitor.synchronizeModifications()}else{var r=i.Flagship.newVisitor({visitorId:k.id,context:k.context,isAuthenticated:k.isAuthenticated,hasConsented:k.hasConsented,initialCampaigns:_,initialModifications:A});null==r||r.on("ready",(function(t){!function(t,e){if(e)o(i.Flagship.getConfig(),e.message||e,"onReady");else{var n=V({fsVisitor:t,isSdkReady:!0,isLoading:!1});O&&O({fsModifications:t.modifications,config:i.Flagship.getConfig(),status:n})}}(r,t)})),!a&&r&&V({fsVisitor:r,isSdkReady:!0,isLoading:!1})}}},K=function(t){w&&w(t),F(t)},z=function(){i.Flagship.start(s,u,{decisionMode:l,fetchNow:a,timeout:p,logLevel:d,statusChangedCallback:U,logManager:y,pollingInterval:m,onBucketingFail:S,onBucketingSuccess:I,enableClientCache:M,onBucketingUpdated:K,initialBucketing:C})};return e().createElement(v.Provider,{value:{state:P,setState:L}},(H=!P.visitor,P.status.isLoading&&E&&H?e().createElement(e().Fragment,null,E):e().createElement(e().Fragment,null,r)))};function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function g(t,e,n,r,i,o,a){try{var c=t[o](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,i)}function y(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){g(o,r,i,a,c,"next",t)}function c(t){g(o,r,i,a,c,"throw",t)}a(void 0)}))}}function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}p.defaultProps={nodeEnv:"production"},n(5666),n(8674);var k=function(t,e){return"object"===m(t)&&"object"===m(e)&&Array.isArray(t)===Array.isArray(e)||m(t)===m(e)},x=function(t){var e=t.visitor,n=t.params,r=t.activateAll,i=t.state,o=t.functionName,c=t.config;if(e)return e.getModificationsSync(n,r);var s=!i.status.isSdkReady&&!!i.modifications&&i.modifications.size>0,u={};return s?(n.forEach((function(t){var e,n=null===(e=i.modifications)||void 0===e?void 0:e.get(t.key);n&&k(null==n?void 0:n.value,t.defaultValue)?u[t.key]=n.value:u[t.key]=t.defaultValue})),u):(a(c,R,o),n.forEach((function(t){u[t.key]=t.defaultValue})),u)},b=function(e,n){var r=(0,t.useContext)(v).state,i=r.visitor,o=r.config;return x({functionName:"useFsModifications",state:r,visitor:i,config:o,params:e,activateAll:n})},I=function(e){var n,r=(0,t.useContext)(v).state,i=r.visitor,o=r.config;if(i)return i.getModificationSync(e);var c=null===(n=r.modifications)||void 0===n?void 0:n.get(e.key);return!r.status.isSdkReady&&c&&k(null==c?void 0:c.value,e.defaultValue)?c.value:(a(o,R,"useFsModifications"),e.defaultValue)},S=function(t){var e,n=t.key,r=t.visitor,i=t.state;if(r)return r.getModificationInfoSync(n);var o=null===(e=i.modifications)||void 0===e?void 0:e.get(n);return!i.status.isSdkReady&&o?o:null},E=function(e){var n=(0,t.useContext)(v).state,r=n.visitor;return S({key:e,state:n,visitor:r})},w=function(){var t=y(regeneratorRuntime.mark((function t(e,n,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n){t.next=4;break}return N(r,e),t.abrupt("return");case 4:return t.next=6,n.synchronizeModifications();case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),o(r,t.t0.message||t.t0,e);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e,n,r){return t.apply(this,arguments)}}(),O=function(){var e=y(regeneratorRuntime.mark((function e(){var n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,t.useContext)(v),r=n.state,i=r.visitor,o=r.config,e.next=5,w("useFsSynchronizeModifications",i,o);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(){var t=y(regeneratorRuntime.mark((function t(e,n,r,i){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,r){t.next=4;break}return a(i,A,n),t.abrupt("return");case 4:return t.next=6,r.activateModifications(e);case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),a(i,t.t0.message||t.t0,n);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e,n,r,i){return t.apply(this,arguments)}}(),C=function(){var e=y(regeneratorRuntime.mark((function e(n){var r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,t.useContext)(v),i=r.state,o=i.visitor,a=i.config,e.next=5,M(n,"useFsModifications",o,a);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_=function(){var e=(0,t.useContext)(v).state,n=e.visitor,r=e.config,i=null==n?void 0:n.getModificationsArray();!e.status.isSdkReady&&e.modifications&&(i=Array.from(e.modifications,(function(t){var e,n,r=(n=2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw i}}return o}}(e,n)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return r[0],r[1]})));var a=function(){var t=y(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,M(e,"activateModification",n,r);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),c=function(){var t=y(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,w("synchronizeModifications",n,r);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),s=function(){var t=y(regeneratorRuntime.mark((function t(i,o){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",x({functionName:"getModifications",state:e,visitor:n,config:r,params:i,activateAll:o}));case 2:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),u=function(){var t=y(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",S({key:r,state:e,visitor:n}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return{updateContext:function(t){n?(n.clearContext(),n.updateContext(t)):o(r,A,"updateContext")},clearContext:function(){n?n.clearContext():o(r,A,"cleanContext")},authenticate:function(t){n?n.authenticate(t):o(r,A,"authenticate")},unauthenticate:function(){n?n.unauthenticate():o(r,A,"unauthenticate")},status:e.status,activateModification:a,synchronizeModifications:c,getModificationsSync:function(t,i){return x({functionName:"getModificationsSync",state:e,visitor:n,config:r,params:t,activateAll:i})},getModifications:s,modifications:i||[],getModificationInfo:u,getModificationInfoSync:function(t){return S({key:t,state:e,visitor:n})},hit:{send:function(t){return n?n.sendHit(t):(o(r,A,"sendHit"),Promise.resolve())},sendMultiple:function(t){return n?n.sendHits(t):(o(r,A,"sendHits"),Promise.resolve())}}}},A="sdk not correctly initialized... Make sure fsVisitor is ready.",R="fsVisitor not initialized, returns default value",N=function(t,e){o(t,A,e)}})(),module.exports=r})();
|
|
2
2
|
//# sourceMappingURL=index.js.map
|