!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("DevCycle",[],t):"object"==typeof exports?exports.DevCycle=t():e.DevCycle=t()}(self,(()=>(()=>{var e={9832:(e,t,i)=>{"use strict";var n=i(2587),r=i(3769),a=TypeError;e.exports=function(e){if(n(e))return e;throw new a(r(e)+" is not a function")}},7382:(e,t,i)=>{"use strict";var n=i(5567),r=i(3769),a=TypeError;e.exports=function(e){if(n(e))return e;throw new a(r(e)+" is not a constructor")}},4524:(e,t,i)=>{"use strict";var n=i(5071),r=String,a=TypeError;e.exports=function(e){if(n(e))return e;throw new a("Can't set "+r(e)+" as a prototype")}},2183:(e,t,i)=>{"use strict";var n=i(3345),r=i(298),a=i(7403).f,o=n("unscopables"),s=Array.prototype;void 0===s[o]&&a(s,o,{configurable:!0,value:r(null)}),e.exports=function(e){s[o][e]=!0}},7125:(e,t,i)=>{"use strict";var n=i(6383),r=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new r("Incorrect invocation")}},3589:(e,t,i)=>{"use strict";var n=i(6648),r=String,a=TypeError;e.exports=function(e){if(n(e))return e;throw new a(r(e)+" is not an object")}},1275:(e,t,i)=>{"use strict";var n=i(2591),r=i(384),a=i(7632),o=function(e){return function(t,i,o){var s=n(t),u=a(s);if(0===u)return!e&&-1;var l,c=r(o,u);if(e&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((e||c in s)&&s[c]===i)return e||c||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},4720:(e,t,i)=>{"use strict";var n=i(2601);e.exports=function(e,t){var i=[][e];return!!i&&n((function(){i.call(null,t||function(){return 1},1)}))}},2580:(e,t,i)=>{"use strict";var n=i(9832),r=i(7291),a=i(6745),o=i(7632),s=TypeError,u="Reduce of empty array with no initial value",l=function(e){return function(t,i,l,c){var f=r(t),d=a(f),h=o(f);if(n(i),0===h&&l<2)throw new s(u);var p=e?h-1:0,v=e?-1:1;if(l<2)for(;;){if(p in d){c=d[p],p+=v;break}if(p+=v,e?p<0:h<=p)throw new s(u)}for(;e?p>=0:h>p;p+=v)p in d&&(c=i(c,d[p],p,f));return c}};e.exports={left:l(!1),right:l(!0)}},2802:(e,t,i)=>{"use strict";var n=i(9098);e.exports=n([].slice)},9066:(e,t,i)=>{"use strict";var n=i(2802),r=Math.floor,a=function(e,t){var i=e.length;if(i<8)for(var o,s,u=1;u0;)e[s]=e[--s];s!==u++&&(e[s]=o)}else for(var l=r(i/2),c=a(n(e,0,l),t),f=a(n(e,l),t),d=c.length,h=f.length,p=0,v=0;p{"use strict";var n=i(1138),r=i(5567),a=i(6648),o=i(3345)("species"),s=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(r(t)&&(t===s||n(t.prototype))||a(t)&&null===(t=t[o]))&&(t=void 0)),void 0===t?s:t}},5223:(e,t,i)=>{"use strict";var n=i(103);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},5202:(e,t,i)=>{"use strict";var n=i(3345)("iterator"),r=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){r=!0}};o[n]=function(){return this},Array.from(o,(function(){throw 2}))}catch(s){}e.exports=function(e,t){try{if(!t&&!r)return!1}catch(s){return!1}var i=!1;try{var a={};a[n]=function(){return{next:function(){return{done:i=!0}}}},e(a)}catch(s){}return i}},2382:(e,t,i)=>{"use strict";var n=i(9098),r=n({}.toString),a=n("".slice);e.exports=function(e){return a(r(e),8,-1)}},3505:(e,t,i)=>{"use strict";var n=i(8674),r=i(2587),a=i(2382),o=i(3345)("toStringTag"),s=Object,u="Arguments"===a(function(){return arguments}());e.exports=n?a:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(i){}}(t=s(e),o))?i:u?a(t):"Object"===(n=a(t))&&r(t.callee)?"Arguments":n}},4742:(e,t,i)=>{"use strict";var n=i(8955),r=i(2073),a=i(3041),o=i(7403);e.exports=function(e,t,i){for(var s=r(t),u=o.f,l=a.f,c=0;c{"use strict";var n=i(3345)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[n]=!1,"/./"[e](t)}catch(r){}}return!1}},2001:(e,t,i)=>{"use strict";var n=i(2601);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},9295:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},2685:(e,t,i)=>{"use strict";var n=i(1486),r=i(7403),a=i(9866);e.exports=n?function(e,t,i){return r.f(e,t,a(1,i))}:function(e,t,i){return e[t]=i,e}},9866:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6424:(e,t,i)=>{"use strict";var n=i(5177),r=i(7403);e.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),r.f(e,t,i)}},4730:(e,t,i)=>{"use strict";var n=i(2587),r=i(7403),a=i(5177),o=i(3663);e.exports=function(e,t,i,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:t;if(n(i)&&a(i,l,s),s.global)u?e[t]=i:o(t,i);else{try{s.unsafe?e[t]&&(u=!0):delete e[t]}catch(c){}u?e[t]=i:r.f(e,t,{value:i,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},1865:(e,t,i)=>{"use strict";var n=i(4730);e.exports=function(e,t,i){for(var r in t)n(e,r,t[r],i);return e}},3663:(e,t,i)=>{"use strict";var n=i(6682),r=Object.defineProperty;e.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},1486:(e,t,i)=>{"use strict";var n=i(2601);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9401:(e,t,i)=>{"use strict";var n=i(6682),r=i(6648),a=n.document,o=r(a)&&r(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},835:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},9850:e=>{"use strict";e.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}},814:(e,t,i)=>{"use strict";var n=i(9401)("span").classList,r=n&&n.constructor&&n.constructor.prototype;e.exports=r===Object.prototype?void 0:r},9749:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},5359:(e,t,i)=>{"use strict";var n=i(1029);e.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},6146:(e,t,i)=>{"use strict";var n=i(1029);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},247:(e,t,i)=>{"use strict";var n=i(5001);e.exports="NODE"===n},2350:(e,t,i)=>{"use strict";var n=i(1029);e.exports=/web0s(?!.*chrome)/i.test(n)},1029:(e,t,i)=>{"use strict";var n=i(6682).navigator,r=n&&n.userAgent;e.exports=r?String(r):""},4397:(e,t,i)=>{"use strict";var n,r,a=i(6682),o=i(1029),s=a.process,u=a.Deno,l=s&&s.versions||u&&u.version,c=l&&l.v8;c&&(r=(n=c.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(r=+n[1]),e.exports=r},5001:(e,t,i)=>{"use strict";var n=i(6682),r=i(1029),a=i(2382),o=function(e){return r.slice(0,e.length)===e};e.exports=o("Bun/")?"BUN":o("Cloudflare-Workers")?"CLOUDFLARE":o("Deno/")?"DENO":o("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===a(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},8900:(e,t,i)=>{"use strict";var n=i(6682),r=i(3041).f,a=i(2685),o=i(4730),s=i(3663),u=i(4742),l=i(3674);e.exports=function(e,t){var i,c,f,d,h,p=e.target,v=e.global,g=e.stat;if(i=v?n:g?n[p]||s(p,{}):n[p]&&n[p].prototype)for(c in t){if(d=t[c],f=e.dontCallGetSet?(h=r(i,c))&&h.value:i[c],!l(v?c:p+(g?".":"#")+c,e.forced)&&void 0!==f){if(typeof d==typeof f)continue;u(d,f)}(e.sham||f&&f.sham)&&a(d,"sham",!0),o(i,c,d,e)}}},2601:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},3217:(e,t,i)=>{"use strict";var n=i(1138),r=i(7632),a=i(835),o=i(7250),s=function(e,t,i,u,l,c,f,d){for(var h,p,v=l,g=0,m=!!f&&o(f,d);g0&&n(h)?(p=r(h),v=s(e,t,h,p,v,c-1)-1):(a(v+1),e[v]=h),v++),g++;return v};e.exports=s},7691:(e,t,i)=>{"use strict";var n=i(946),r=Function.prototype,a=r.apply,o=r.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?o.bind(a):function(){return o.apply(a,arguments)})},7250:(e,t,i)=>{"use strict";var n=i(3530),r=i(9832),a=i(946),o=n(n.bind);e.exports=function(e,t){return r(e),void 0===t?e:a?o(e,t):function(){return e.apply(t,arguments)}}},946:(e,t,i)=>{"use strict";var n=i(2601);e.exports=!n((function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},6815:(e,t,i)=>{"use strict";var n=i(946),r=Function.prototype.call;e.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},3408:(e,t,i)=>{"use strict";var n=i(1486),r=i(8955),a=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,s=r(a,"name"),u=s&&"something"===(function(){}).name,l=s&&(!n||n&&o(a,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:l}},4328:(e,t,i)=>{"use strict";var n=i(9098),r=i(9832);e.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(a){}}},3530:(e,t,i)=>{"use strict";var n=i(2382),r=i(9098);e.exports=function(e){if("Function"===n(e))return r(e)}},9098:(e,t,i)=>{"use strict";var n=i(946),r=Function.prototype,a=r.call,o=n&&r.bind.bind(a,a);e.exports=n?o:function(e){return function(){return a.apply(e,arguments)}}},5761:(e,t,i)=>{"use strict";var n=i(6682),r=i(2587);e.exports=function(e,t){return arguments.length<2?(i=n[e],r(i)?i:void 0):n[e]&&n[e][t];var i}},5353:(e,t,i)=>{"use strict";var n=i(3505),r=i(628),a=i(6655),o=i(8071),s=i(3345)("iterator");e.exports=function(e){if(!a(e))return r(e,s)||r(e,"@@iterator")||o[n(e)]}},9239:(e,t,i)=>{"use strict";var n=i(6815),r=i(9832),a=i(3589),o=i(3769),s=i(5353),u=TypeError;e.exports=function(e,t){var i=arguments.length<2?s(e):t;if(r(i))return a(n(i,e));throw new u(o(e)+" is not iterable")}},628:(e,t,i)=>{"use strict";var n=i(9832),r=i(6655);e.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}},6682:function(e){"use strict";var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},8955:(e,t,i)=>{"use strict";var n=i(9098),r=i(7291),a=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(r(e),t)}},2611:e=>{"use strict";e.exports={}},6427:e=>{"use strict";e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(i){}}},6043:(e,t,i)=>{"use strict";var n=i(5761);e.exports=n("document","documentElement")},6423:(e,t,i)=>{"use strict";var n=i(1486),r=i(2601),a=i(9401);e.exports=!n&&!r((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},6745:(e,t,i)=>{"use strict";var n=i(9098),r=i(2601),a=i(2382),o=Object,s=n("".split);e.exports=r((function(){return!o("z").propertyIsEnumerable(0)}))?function(e){return"String"===a(e)?s(e,""):o(e)}:o},1892:(e,t,i)=>{"use strict";var n=i(9098),r=i(2587),a=i(6183),o=n(Function.toString);r(a.inspectSource)||(a.inspectSource=function(e){return o(e)}),e.exports=a.inspectSource},2755:(e,t,i)=>{"use strict";var n,r,a,o=i(7204),s=i(6682),u=i(6648),l=i(2685),c=i(8955),f=i(6183),d=i(7121),h=i(2611),p="Object already initialized",v=s.TypeError,g=s.WeakMap;if(o||f.state){var m=f.state||(f.state=new g);m.get=m.get,m.has=m.has,m.set=m.set,n=function(e,t){if(m.has(e))throw new v(p);return t.facade=e,m.set(e,t),t},r=function(e){return m.get(e)||{}},a=function(e){return m.has(e)}}else{var y=d("state");h[y]=!0,n=function(e,t){if(c(e,y))throw new v(p);return t.facade=e,l(e,y,t),t},r=function(e){return c(e,y)?e[y]:{}},a=function(e){return c(e,y)}}e.exports={set:n,get:r,has:a,enforce:function(e){return a(e)?r(e):n(e,{})},getterFor:function(e){return function(t){var i;if(!u(t)||(i=r(t)).type!==e)throw new v("Incompatible receiver, "+e+" required");return i}}}},7859:(e,t,i)=>{"use strict";var n=i(3345),r=i(8071),a=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[a]===e)}},1138:(e,t,i)=>{"use strict";var n=i(2382);e.exports=Array.isArray||function(e){return"Array"===n(e)}},2587:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},5567:(e,t,i)=>{"use strict";var n=i(9098),r=i(2601),a=i(2587),o=i(3505),s=i(5761),u=i(1892),l=function(){},c=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=n(f.exec),h=!f.test(l),p=function(e){if(!a(e))return!1;try{return c(l,[],e),!0}catch(t){return!1}},v=function(e){if(!a(e))return!1;switch(o(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!d(f,u(e))}catch(t){return!0}};v.sham=!0,e.exports=!c||r((function(){var e;return p(p.call)||!p(Object)||!p((function(){e=!0}))||e}))?v:p},3674:(e,t,i)=>{"use strict";var n=i(2601),r=i(2587),a=/#|\.prototype\./,o=function(e,t){var i=u[s(e)];return i===c||i!==l&&(r(t)?n(t):!!t)},s=o.normalize=function(e){return String(e).replace(a,".").toLowerCase()},u=o.data={},l=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},6655:e=>{"use strict";e.exports=function(e){return null==e}},6648:(e,t,i)=>{"use strict";var n=i(2587);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},5071:(e,t,i)=>{"use strict";var n=i(6648);e.exports=function(e){return n(e)||null===e}},3269:e=>{"use strict";e.exports=!1},9730:(e,t,i)=>{"use strict";var n=i(6648),r=i(2382),a=i(3345)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[a])?!!t:"RegExp"===r(e))}},6367:(e,t,i)=>{"use strict";var n=i(5761),r=i(2587),a=i(6383),o=i(2014),s=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&a(t.prototype,s(e))}},5218:(e,t,i)=>{"use strict";var n=i(7250),r=i(6815),a=i(3589),o=i(3769),s=i(7859),u=i(7632),l=i(6383),c=i(9239),f=i(5353),d=i(4993),h=TypeError,p=function(e,t){this.stopped=e,this.result=t},v=p.prototype;e.exports=function(e,t,i){var g,m,y,b,w,S,E,N=i&&i.that,x=!(!i||!i.AS_ENTRIES),O=!(!i||!i.IS_RECORD),C=!(!i||!i.IS_ITERATOR),k=!(!i||!i.INTERRUPTED),_=n(t,N),T=function(e){return g&&d(g,"normal",e),new p(!0,e)},A=function(e){return x?(a(e),k?_(e[0],e[1],T):_(e[0],e[1])):k?_(e,T):_(e)};if(O)g=e.iterator;else if(C)g=e;else{if(!(m=f(e)))throw new h(o(e)+" is not iterable");if(s(m)){for(y=0,b=u(e);b>y;y++)if((w=A(e[y]))&&l(v,w))return w;return new p(!1)}g=c(e,m)}for(S=O?e.next:g.next;!(E=r(S,g)).done;){try{w=A(E.value)}catch(D){d(g,"throw",D)}if("object"==typeof w&&w&&l(v,w))return w}return new p(!1)}},4993:(e,t,i)=>{"use strict";var n=i(6815),r=i(3589),a=i(628);e.exports=function(e,t,i){var o,s;r(e);try{if(!(o=a(e,"return"))){if("throw"===t)throw i;return i}o=n(o,e)}catch(u){s=!0,o=u}if("throw"===t)throw i;if(s)throw o;return r(o),i}},2704:(e,t,i)=>{"use strict";var n=i(6475).IteratorPrototype,r=i(298),a=i(9866),o=i(9269),s=i(8071),u=function(){return this};e.exports=function(e,t,i,l){var c=t+" Iterator";return e.prototype=r(n,{next:a(+!l,i)}),o(e,c,!1,!0),s[c]=u,e}},2478:(e,t,i)=>{"use strict";var n=i(8900),r=i(6815),a=i(3269),o=i(3408),s=i(2587),u=i(2704),l=i(5789),c=i(8209),f=i(9269),d=i(2685),h=i(4730),p=i(3345),v=i(8071),g=i(6475),m=o.PROPER,y=o.CONFIGURABLE,b=g.IteratorPrototype,w=g.BUGGY_SAFARI_ITERATORS,S=p("iterator"),E="keys",N="values",x="entries",O=function(){return this};e.exports=function(e,t,i,o,p,g,C){u(i,t,o);var k,_,T,A=function(e){if(e===p&&j)return j;if(!w&&e&&e in M)return M[e];switch(e){case E:case N:case x:return function(){return new i(this,e)}}return function(){return new i(this)}},D=t+" Iterator",R=!1,M=e.prototype,I=M[S]||M["@@iterator"]||p&&M[p],j=!w&&I||A(p),P="Array"===t&&M.entries||I;if(P&&(k=l(P.call(new e)))!==Object.prototype&&k.next&&(a||l(k)===b||(c?c(k,b):s(k[S])||h(k,S,O)),f(k,D,!0,!0),a&&(v[D]=O)),m&&p===N&&I&&I.name!==N&&(!a&&y?d(M,"name",N):(R=!0,j=function(){return r(I,this)})),p)if(_={values:A(N),keys:g?j:A(E),entries:A(x)},C)for(T in _)(w||R||!(T in M))&&h(M,T,_[T]);else n({target:t,proto:!0,forced:w||R},_);return a&&!C||M[S]===j||h(M,S,j,{name:p}),v[t]=j,_}},6475:(e,t,i)=>{"use strict";var n,r,a,o=i(2601),s=i(2587),u=i(6648),l=i(298),c=i(5789),f=i(4730),d=i(3345),h=i(3269),p=d("iterator"),v=!1;[].keys&&("next"in(a=[].keys())?(r=c(c(a)))!==Object.prototype&&(n=r):v=!0),!u(n)||o((function(){var e={};return n[p].call(e)!==e}))?n={}:h&&(n=l(n)),s(n[p])||f(n,p,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:v}},8071:e=>{"use strict";e.exports={}},7632:(e,t,i)=>{"use strict";var n=i(3268);e.exports=function(e){return n(e.length)}},5177:(e,t,i)=>{"use strict";var n=i(9098),r=i(2601),a=i(2587),o=i(8955),s=i(1486),u=i(3408).CONFIGURABLE,l=i(1892),c=i(2755),f=c.enforce,d=c.get,h=String,p=Object.defineProperty,v=n("".slice),g=n("".replace),m=n([].join),y=s&&!r((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),w=e.exports=function(e,t,i){"Symbol("===v(h(t),0,7)&&(t="["+g(h(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!o(e,"name")||u&&e.name!==t)&&(s?p(e,"name",{value:t,configurable:!0}):e.name=t),y&&i&&o(i,"arity")&&e.length!==i.arity&&p(e,"length",{value:i.arity});try{i&&o(i,"constructor")&&i.constructor?s&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(r){}var n=f(e);return o(n,"source")||(n.source=m(b,"string"==typeof t?t:"")),e};Function.prototype.toString=w((function(){return a(this)&&d(this).source||l(this)}),"toString")},3415:e=>{"use strict";var t=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?i:t)(n)}},1849:(e,t,i)=>{"use strict";var n,r,a,o,s,u=i(6682),l=i(1467),c=i(7250),f=i(239).set,d=i(9587),h=i(6146),p=i(5359),v=i(2350),g=i(247),m=u.MutationObserver||u.WebKitMutationObserver,y=u.document,b=u.process,w=u.Promise,S=l("queueMicrotask");if(!S){var E=new d,N=function(){var e,t;for(g&&(e=b.domain)&&e.exit();t=E.get();)try{t()}catch(i){throw E.head&&n(),i}e&&e.enter()};h||g||v||!m||!y?!p&&w&&w.resolve?((o=w.resolve(void 0)).constructor=w,s=c(o.then,o),n=function(){s(N)}):g?n=function(){b.nextTick(N)}:(f=c(f,u),n=function(){f(N)}):(r=!0,a=y.createTextNode(""),new m(N).observe(a,{characterData:!0}),n=function(){a.data=r=!r}),S=function(e){E.head||n(),E.add(e)}}e.exports=S},2741:(e,t,i)=>{"use strict";var n=i(9832),r=TypeError,a=function(e){var t,i;this.promise=new e((function(e,n){if(void 0!==t||void 0!==i)throw new r("Bad Promise constructor");t=e,i=n})),this.resolve=n(t),this.reject=n(i)};e.exports.f=function(e){return new a(e)}},9341:(e,t,i)=>{"use strict";var n=i(9730),r=TypeError;e.exports=function(e){if(n(e))throw new r("The method doesn't accept regular expressions");return e}},9653:(e,t,i)=>{"use strict";var n=i(6682),r=i(2601),a=i(9098),o=i(7557),s=i(9296).trim,u=i(6974),l=n.parseInt,c=n.Symbol,f=c&&c.iterator,d=/^[+-]?0x/i,h=a(d.exec),p=8!==l(u+"08")||22!==l(u+"0x16")||f&&!r((function(){l(Object(f))}));e.exports=p?function(e,t){var i=s(o(e));return l(i,t>>>0||(h(d,i)?16:10))}:l},6447:(e,t,i)=>{"use strict";var n=i(1486),r=i(9098),a=i(6815),o=i(2601),s=i(4762),u=i(8571),l=i(2395),c=i(7291),f=i(6745),d=Object.assign,h=Object.defineProperty,p=r([].concat);e.exports=!d||o((function(){if(n&&1!==d({b:1},d(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[i]=7,r.split("").forEach((function(e){t[e]=e})),7!==d({},e)[i]||s(d({},t)).join("")!==r}))?function(e,t){for(var i=c(e),r=arguments.length,o=1,d=u.f,h=l.f;r>o;)for(var v,g=f(arguments[o++]),m=d?p(s(g),d(g)):s(g),y=m.length,b=0;y>b;)v=m[b++],n&&!a(h,g,v)||(i[v]=g[v]);return i}:d},298:(e,t,i)=>{"use strict";var n,r=i(3589),a=i(4711),o=i(9749),s=i(2611),u=i(6043),l=i(9401),c=i(7121),f="prototype",d="script",h=c("IE_PROTO"),p=function(){},v=function(e){return"<"+d+">"+e+""},g=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{n=new ActiveXObject("htmlfile")}catch(a){}var e,t,i;m="undefined"!=typeof document?document.domain&&n?g(n):(t=l("iframe"),i="java"+d+":",t.style.display="none",u.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F):g(n);for(var r=o.length;r--;)delete m[f][o[r]];return m()};s[h]=!0,e.exports=Object.create||function(e,t){var i;return null!==e?(p[f]=r(e),i=new p,p[f]=null,i[h]=e):i=m(),void 0===t?i:a.f(i,t)}},4711:(e,t,i)=>{"use strict";var n=i(1486),r=i(152),a=i(7403),o=i(3589),s=i(2591),u=i(4762);t.f=n&&!r?Object.defineProperties:function(e,t){o(e);for(var i,n=s(t),r=u(t),l=r.length,c=0;l>c;)a.f(e,i=r[c++],n[i]);return e}},7403:(e,t,i)=>{"use strict";var n=i(1486),r=i(6423),a=i(152),o=i(3589),s=i(631),u=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f="enumerable",d="configurable",h="writable";t.f=n?a?function(e,t,i){if(o(e),t=s(t),o(i),"function"==typeof e&&"prototype"===t&&"value"in i&&h in i&&!i[h]){var n=c(e,t);n&&n[h]&&(e[t]=i.value,i={configurable:d in i?i[d]:n[d],enumerable:f in i?i[f]:n[f],writable:!1})}return l(e,t,i)}:l:function(e,t,i){if(o(e),t=s(t),o(i),r)try{return l(e,t,i)}catch(n){}if("get"in i||"set"in i)throw new u("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},3041:(e,t,i)=>{"use strict";var n=i(1486),r=i(6815),a=i(2395),o=i(9866),s=i(2591),u=i(631),l=i(8955),c=i(6423),f=Object.getOwnPropertyDescriptor;t.f=n?f:function(e,t){if(e=s(e),t=u(t),c)try{return f(e,t)}catch(i){}if(l(e,t))return o(!r(a.f,e,t),e[t])}},7062:(e,t,i)=>{"use strict";var n=i(7414),r=i(9749).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,r)}},8571:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},5789:(e,t,i)=>{"use strict";var n=i(8955),r=i(2587),a=i(7291),o=i(7121),s=i(2001),u=o("IE_PROTO"),l=Object,c=l.prototype;e.exports=s?l.getPrototypeOf:function(e){var t=a(e);if(n(t,u))return t[u];var i=t.constructor;return r(i)&&t instanceof i?i.prototype:t instanceof l?c:null}},6383:(e,t,i)=>{"use strict";var n=i(9098);e.exports=n({}.isPrototypeOf)},7414:(e,t,i)=>{"use strict";var n=i(9098),r=i(8955),a=i(2591),o=i(1275).indexOf,s=i(2611),u=n([].push);e.exports=function(e,t){var i,n=a(e),l=0,c=[];for(i in n)!r(s,i)&&r(n,i)&&u(c,i);for(;t.length>l;)r(n,i=t[l++])&&(~o(c,i)||u(c,i));return c}},4762:(e,t,i)=>{"use strict";var n=i(7414),r=i(9749);e.exports=Object.keys||function(e){return n(e,r)}},2395:(e,t)=>{"use strict";var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,r=n&&!i.call({1:2},1);t.f=r?function(e){var t=n(this,e);return!!t&&t.enumerable}:i},8209:(e,t,i)=>{"use strict";var n=i(4328),r=i(6648),a=i(2224),o=i(4524);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=n(Object.prototype,"__proto__","set"))(i,[]),t=i instanceof Array}catch(s){}return function(i,n){return a(i),o(n),r(i)?(t?e(i,n):i.__proto__=n,i):i}}():void 0)},4684:(e,t,i)=>{"use strict";var n=i(6815),r=i(2587),a=i(6648),o=TypeError;e.exports=function(e,t){var i,s;if("string"===t&&r(i=e.toString)&&!a(s=n(i,e)))return s;if(r(i=e.valueOf)&&!a(s=n(i,e)))return s;if("string"!==t&&r(i=e.toString)&&!a(s=n(i,e)))return s;throw new o("Can't convert object to primitive value")}},2073:(e,t,i)=>{"use strict";var n=i(5761),r=i(9098),a=i(7062),o=i(8571),s=i(3589),u=r([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=a.f(s(e)),i=o.f;return i?u(t,i(e)):t}},1553:e=>{"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},286:(e,t,i)=>{"use strict";var n=i(6682),r=i(4960),a=i(2587),o=i(3674),s=i(1892),u=i(3345),l=i(5001),c=i(3269),f=i(4397),d=r&&r.prototype,h=u("species"),p=!1,v=a(n.PromiseRejectionEvent),g=o("Promise",(function(){var e=s(r),t=e!==String(r);if(!t&&66===f)return!0;if(c&&(!d.catch||!d.finally))return!0;if(!f||f<51||!/native code/.test(e)){var i=new r((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((i.constructor={})[h]=n,!(p=i.then((function(){}))instanceof n))return!0}return!(t||"BROWSER"!==l&&"DENO"!==l||v)}));e.exports={CONSTRUCTOR:g,REJECTION_EVENT:v,SUBCLASSING:p}},4960:(e,t,i)=>{"use strict";var n=i(6682);e.exports=n.Promise},8988:(e,t,i)=>{"use strict";var n=i(3589),r=i(6648),a=i(2741);e.exports=function(e,t){if(n(e),r(t)&&t.constructor===e)return t;var i=a.f(e);return(0,i.resolve)(t),i.promise}},8764:(e,t,i)=>{"use strict";var n=i(4960),r=i(5202),a=i(286).CONSTRUCTOR;e.exports=a||!r((function(e){n.all(e).then(void 0,(function(){}))}))},9587:e=>{"use strict";var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},i=this.tail;i?i.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},4653:(e,t,i)=>{"use strict";var n=i(3589);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},2936:(e,t,i)=>{"use strict";var n=i(6815),r=i(8955),a=i(6383),o=i(4653),s=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in s||r(e,"flags")||!a(s,e)?t:n(o,e)}},2224:(e,t,i)=>{"use strict";var n=i(6655),r=TypeError;e.exports=function(e){if(n(e))throw new r("Can't call method on "+e);return e}},1467:(e,t,i)=>{"use strict";var n=i(6682),r=i(1486),a=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!r)return n[e];var t=a(n,e);return t&&t.value}},8963:(e,t,i)=>{"use strict";var n=i(5761),r=i(6424),a=i(3345),o=i(1486),s=a("species");e.exports=function(e){var t=n(e);o&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},9269:(e,t,i)=>{"use strict";var n=i(7403).f,r=i(8955),a=i(3345)("toStringTag");e.exports=function(e,t,i){e&&!i&&(e=e.prototype),e&&!r(e,a)&&n(e,a,{configurable:!0,value:t})}},7121:(e,t,i)=>{"use strict";var n=i(7543),r=i(6746),a=n("keys");e.exports=function(e){return a[e]||(a[e]=r(e))}},6183:(e,t,i)=>{"use strict";var n=i(3269),r=i(6682),a=i(3663),o="__core-js_shared__",s=e.exports=r[o]||a(o,{});(s.versions||(s.versions=[])).push({version:"3.41.0",mode:n?"pure":"global",copyright:"\xa9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7543:(e,t,i)=>{"use strict";var n=i(6183);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},9171:(e,t,i)=>{"use strict";var n=i(3589),r=i(7382),a=i(6655),o=i(3345)("species");e.exports=function(e,t){var i,s=n(e).constructor;return void 0===s||a(i=n(s)[o])?t:r(i)}},1908:(e,t,i)=>{"use strict";var n=i(3408).PROPER,r=i(2601),a=i(6974);e.exports=function(e){return r((function(){return!!a[e]()||"\u200b\x85\u180e"!=="\u200b\x85\u180e"[e]()||n&&a[e].name!==e}))}},9296:(e,t,i)=>{"use strict";var n=i(9098),r=i(2224),a=i(7557),o=i(6974),s=n("".replace),u=RegExp("^["+o+"]+"),l=RegExp("(^|[^"+o+"])["+o+"]+$"),c=function(e){return function(t){var i=a(r(t));return 1&e&&(i=s(i,u,"")),2&e&&(i=s(i,l,"$1")),i}};e.exports={start:c(1),end:c(2),trim:c(3)}},2125:(e,t,i)=>{"use strict";var n=i(4397),r=i(2601),a=i(6682).String;e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},239:(e,t,i)=>{"use strict";var n,r,a,o,s=i(6682),u=i(7691),l=i(7250),c=i(2587),f=i(8955),d=i(2601),h=i(6043),p=i(2802),v=i(9401),g=i(4466),m=i(6146),y=i(247),b=s.setImmediate,w=s.clearImmediate,S=s.process,E=s.Dispatch,N=s.Function,x=s.MessageChannel,O=s.String,C=0,k={},_="onreadystatechange";d((function(){n=s.location}));var T=function(e){if(f(k,e)){var t=k[e];delete k[e],t()}},A=function(e){return function(){T(e)}},D=function(e){T(e.data)},R=function(e){s.postMessage(O(e),n.protocol+"//"+n.host)};b&&w||(b=function(e){g(arguments.length,1);var t=c(e)?e:N(e),i=p(arguments,1);return k[++C]=function(){u(t,void 0,i)},r(C),C},w=function(e){delete k[e]},y?r=function(e){S.nextTick(A(e))}:E&&E.now?r=function(e){E.now(A(e))}:x&&!m?(o=(a=new x).port2,a.port1.onmessage=D,r=l(o.postMessage,o)):s.addEventListener&&c(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!d(R)?(r=R,s.addEventListener("message",D,!1)):r=_ in v("script")?function(e){h.appendChild(v("script"))[_]=function(){h.removeChild(this),T(e)}}:function(e){setTimeout(A(e),0)}),e.exports={set:b,clear:w}},384:(e,t,i)=>{"use strict";var n=i(925),r=Math.max,a=Math.min;e.exports=function(e,t){var i=n(e);return i<0?r(i+t,0):a(i,t)}},2591:(e,t,i)=>{"use strict";var n=i(6745),r=i(2224);e.exports=function(e){return n(r(e))}},925:(e,t,i)=>{"use strict";var n=i(3415);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},3268:(e,t,i)=>{"use strict";var n=i(925),r=Math.min;e.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}},7291:(e,t,i)=>{"use strict";var n=i(2224),r=Object;e.exports=function(e){return r(n(e))}},355:(e,t,i)=>{"use strict";var n=i(6815),r=i(6648),a=i(6367),o=i(628),s=i(4684),u=i(3345),l=TypeError,c=u("toPrimitive");e.exports=function(e,t){if(!r(e)||a(e))return e;var i,u=o(e,c);if(u){if(void 0===t&&(t="default"),i=n(u,e,t),!r(i)||a(i))return i;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},631:(e,t,i)=>{"use strict";var n=i(355),r=i(6367);e.exports=function(e){var t=n(e,"string");return r(t)?t:t+""}},8674:(e,t,i)=>{"use strict";var n={};n[i(3345)("toStringTag")]="z",e.exports="[object z]"===String(n)},7557:(e,t,i)=>{"use strict";var n=i(3505),r=String;e.exports=function(e){if("Symbol"===n(e))throw new TypeError("Cannot convert a Symbol value to a string");return r(e)}},3769:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(i){return"Object"}}},6746:(e,t,i)=>{"use strict";var n=i(9098),r=0,a=Math.random(),o=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++r+a,36)}},4650:(e,t,i)=>{"use strict";var n=i(2601),r=i(3345),a=i(1486),o=i(3269),s=r("iterator");e.exports=!n((function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,i=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach((function(e,i){t.delete("b"),n+=i+e})),i.delete("a",2),i.delete("b",void 0),o&&(!e.toJSON||!i.has("a",1)||i.has("a",2)||!i.has("a",void 0)||i.has("b"))||!t.size&&(o||!a)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://\u0442\u0435\u0441\u0442").host||"#%D0%B1"!==new URL("https://a#\u0431").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host}))},2014:(e,t,i)=>{"use strict";var n=i(2125);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},152:(e,t,i)=>{"use strict";var n=i(1486),r=i(2601);e.exports=n&&r((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4466:e=>{"use strict";var t=TypeError;e.exports=function(e,i){if(e{"use strict";var n=i(6682),r=i(2587),a=n.WeakMap;e.exports=r(a)&&/native code/.test(String(a))},3345:(e,t,i)=>{"use strict";var n=i(6682),r=i(7543),a=i(8955),o=i(6746),s=i(2125),u=i(2014),l=n.Symbol,c=r("wks"),f=u?l.for||l:l&&l.withoutSetter||o;e.exports=function(e){return a(c,e)||(c[e]=s&&a(l,e)?l[e]:f("Symbol."+e)),c[e]}},6974:e=>{"use strict";e.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},5875:(e,t,i)=>{"use strict";var n=i(8900),r=i(3217),a=i(7291),o=i(7632),s=i(925),u=i(5223);n({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=a(this),i=o(t),n=u(t,0);return n.length=r(n,t,t,i,0,void 0===e?1:s(e)),n}})},3097:(e,t,i)=>{"use strict";var n=i(8900),r=i(1275).includes,a=i(2601),o=i(2183);n({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},1778:(e,t,i)=>{"use strict";var n=i(2591),r=i(2183),a=i(8071),o=i(2755),s=i(7403).f,u=i(2478),l=i(9295),c=i(3269),f=i(1486),d="Array Iterator",h=o.set,p=o.getterFor(d);e.exports=u(Array,"Array",(function(e,t){h(this,{type:d,target:n(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,l(void 0,!0);switch(e.kind){case"keys":return l(i,!1);case"values":return l(t[i],!1)}return l([i,t[i]],!1)}),"values");var v=a.Arguments=a.Array;if(r("keys"),r("values"),r("entries"),!c&&f&&"values"!==v.name)try{s(v,"name",{value:"values"})}catch(g){}},5526:(e,t,i)=>{"use strict";var n=i(8900),r=i(2580).left,a=i(4720),o=i(4397);n({target:"Array",proto:!0,forced:!i(247)&&o>79&&o<83||!a("reduce")},{reduce:function(e){var t=arguments.length;return r(this,e,t,t>1?arguments[1]:void 0)}})},5596:(e,t,i)=>{"use strict";var n=i(8900),r=i(9098),a=i(1138),o=r([].reverse),s=[1,2];n({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return a(this)&&(this.length=this.length),o(this)}})},7960:(e,t,i)=>{"use strict";i(2183)("flat")},3055:(e,t,i)=>{"use strict";var n=i(8900),r=i(6682);n({global:!0,forced:r.globalThis!==r},{globalThis:r})},2199:(e,t,i)=>{"use strict";var n=i(8900),r=i(6447);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==r},{assign:r})},7766:(e,t,i)=>{"use strict";var n=i(8900),r=i(9653);n({global:!0,forced:parseInt!==r},{parseInt:r})},601:(e,t,i)=>{"use strict";var n=i(8900),r=i(6815),a=i(9832),o=i(2741),s=i(1553),u=i(5218);n({target:"Promise",stat:!0,forced:i(8764)},{all:function(e){var t=this,i=o.f(t),n=i.resolve,l=i.reject,c=s((function(){var i=a(t.resolve),o=[],s=0,c=1;u(e,(function(e){var a=s++,u=!1;c++,r(i,t,e).then((function(e){u||(u=!0,o[a]=e,--c||n(o))}),l)})),--c||n(o)}));return c.error&&l(c.value),i.promise}})},4953:(e,t,i)=>{"use strict";var n=i(8900),r=i(3269),a=i(286).CONSTRUCTOR,o=i(4960),s=i(5761),u=i(2587),l=i(4730),c=o&&o.prototype;if(n({target:"Promise",proto:!0,forced:a,real:!0},{catch:function(e){return this.then(void 0,e)}}),!r&&u(o)){var f=s("Promise").prototype.catch;c.catch!==f&&l(c,"catch",f,{unsafe:!0})}},5810:(e,t,i)=>{"use strict";var n,r,a,o=i(8900),s=i(3269),u=i(247),l=i(6682),c=i(6815),f=i(4730),d=i(8209),h=i(9269),p=i(8963),v=i(9832),g=i(2587),m=i(6648),y=i(7125),b=i(9171),w=i(239).set,S=i(1849),E=i(6427),N=i(1553),x=i(9587),O=i(2755),C=i(4960),k=i(286),_=i(2741),T="Promise",A=k.CONSTRUCTOR,D=k.REJECTION_EVENT,R=k.SUBCLASSING,M=O.getterFor(T),I=O.set,j=C&&C.prototype,P=C,z=j,L=l.TypeError,U=l.document,V=l.process,B=_.f,F=B,$=!!(U&&U.createEvent&&l.dispatchEvent),K="unhandledrejection",G=function(e){var t;return!(!m(e)||!g(t=e.then))&&t},H=function(e,t){var i,n,r,a=t.value,o=1===t.state,s=o?e.ok:e.fail,u=e.resolve,l=e.reject,f=e.domain;try{s?(o||(2===t.rejection&&Z(t),t.rejection=1),!0===s?i=a:(f&&f.enter(),i=s(a),f&&(f.exit(),r=!0)),i===e.promise?l(new L("Promise-chain cycle")):(n=G(i))?c(n,i,u,l):u(i)):l(a)}catch(d){f&&!r&&f.exit(),l(d)}},q=function(e,t){e.notified||(e.notified=!0,S((function(){for(var i,n=e.reactions;i=n.get();)H(i,e);e.notified=!1,t&&!e.rejection&&W(e)})))},Q=function(e,t,i){var n,r;$?((n=U.createEvent("Event")).promise=t,n.reason=i,n.initEvent(e,!1,!0),l.dispatchEvent(n)):n={promise:t,reason:i},!D&&(r=l["on"+e])?r(n):e===K&&E("Unhandled promise rejection",i)},W=function(e){c(w,l,(function(){var t,i=e.facade,n=e.value;if(J(e)&&(t=N((function(){u?V.emit("unhandledRejection",n,i):Q(K,i,n)})),e.rejection=u||J(e)?2:1,t.error))throw t.value}))},J=function(e){return 1!==e.rejection&&!e.parent},Z=function(e){c(w,l,(function(){var t=e.facade;u?V.emit("rejectionHandled",t):Q("rejectionhandled",t,e.value)}))},Y=function(e,t,i){return function(n){e(t,n,i)}},X=function(e,t,i){e.done||(e.done=!0,i&&(e=i),e.value=t,e.state=2,q(e,!0))},ee=function(e,t,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===t)throw new L("Promise can't be resolved itself");var n=G(t);n?S((function(){var i={done:!1};try{c(n,t,Y(ee,i,e),Y(X,i,e))}catch(r){X(i,r,e)}})):(e.value=t,e.state=1,q(e,!1))}catch(r){X({done:!1},r,e)}}};if(A&&(z=(P=function(e){y(this,z),v(e),c(n,this);var t=M(this);try{e(Y(ee,t),Y(X,t))}catch(i){X(t,i)}}).prototype,(n=function(e){I(this,{type:T,done:!1,notified:!1,parent:!1,reactions:new x,rejection:!1,state:0,value:null})}).prototype=f(z,"then",(function(e,t){var i=M(this),n=B(b(this,P));return i.parent=!0,n.ok=!g(e)||e,n.fail=g(t)&&t,n.domain=u?V.domain:void 0,0===i.state?i.reactions.add(n):S((function(){H(n,i)})),n.promise})),r=function(){var e=new n,t=M(e);this.promise=e,this.resolve=Y(ee,t),this.reject=Y(X,t)},_.f=B=function(e){return e===P||undefined===e?new r(e):F(e)},!s&&g(C)&&j!==Object.prototype)){a=j.then,R||f(j,"then",(function(e,t){var i=this;return new P((function(e,t){c(a,i,e,t)})).then(e,t)}),{unsafe:!0});try{delete j.constructor}catch(te){}d&&d(j,z)}o({global:!0,constructor:!0,wrap:!0,forced:A},{Promise:P}),h(P,T,!1,!0),p(T)},8509:(e,t,i)=>{"use strict";var n=i(8900),r=i(3269),a=i(4960),o=i(2601),s=i(5761),u=i(2587),l=i(9171),c=i(8988),f=i(4730),d=a&&a.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!a&&o((function(){d.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=l(this,s("Promise")),i=u(e);return this.then(i?function(i){return c(t,e()).then((function(){return i}))}:e,i?function(i){return c(t,e()).then((function(){throw i}))}:e)}}),!r&&u(a)){var h=s("Promise").prototype.finally;d.finally!==h&&f(d,"finally",h,{unsafe:!0})}},2652:(e,t,i)=>{"use strict";i(5810),i(601),i(4953),i(6689),i(6047),i(8974)},6689:(e,t,i)=>{"use strict";var n=i(8900),r=i(6815),a=i(9832),o=i(2741),s=i(1553),u=i(5218);n({target:"Promise",stat:!0,forced:i(8764)},{race:function(e){var t=this,i=o.f(t),n=i.reject,l=s((function(){var o=a(t.resolve);u(e,(function(e){r(o,t,e).then(i.resolve,n)}))}));return l.error&&n(l.value),i.promise}})},6047:(e,t,i)=>{"use strict";var n=i(8900),r=i(2741);n({target:"Promise",stat:!0,forced:i(286).CONSTRUCTOR},{reject:function(e){var t=r.f(this);return(0,t.reject)(e),t.promise}})},8974:(e,t,i)=>{"use strict";var n=i(8900),r=i(5761),a=i(3269),o=i(4960),s=i(286).CONSTRUCTOR,u=i(8988),l=r("Promise"),c=a&&!s;n({target:"Promise",stat:!0,forced:a||s},{resolve:function(e){return u(c&&this===l?o:this,e)}})},7031:(e,t,i)=>{"use strict";var n=i(3408).PROPER,r=i(4730),a=i(3589),o=i(7557),s=i(2601),u=i(2936),l="toString",c=RegExp.prototype,f=c[l],d=s((function(){return"/a/b"!==f.call({source:"a",flags:"b"})})),h=n&&f.name!==l;(d||h)&&r(c,l,(function(){var e=a(this);return"/"+o(e.source)+"/"+o(u(e))}),{unsafe:!0})},4331:(e,t,i)=>{"use strict";var n,r=i(8900),a=i(3530),o=i(3041).f,s=i(3268),u=i(7557),l=i(9341),c=i(2224),f=i(7130),d=i(3269),h=a("".slice),p=Math.min,v=f("endsWith");r({target:"String",proto:!0,forced:!!(d||v||(n=o(String.prototype,"endsWith"),!n||n.writable))&&!v},{endsWith:function(e){var t=u(c(this));l(e);var i=arguments.length>1?arguments[1]:void 0,n=t.length,r=void 0===i?n:p(s(i),n),a=u(e);return h(t,r-a.length,r)===a}})},2259:(e,t,i)=>{"use strict";var n=i(8900),r=i(9098),a=i(384),o=RangeError,s=String.fromCharCode,u=String.fromCodePoint,l=r([].join);n({target:"String",stat:!0,arity:1,forced:!!u&&1!==u.length},{fromCodePoint:function(e){for(var t,i=[],n=arguments.length,r=0;n>r;){if(t=+arguments[r++],a(t,1114111)!==t)throw new o(t+" is not a valid code point");i[r]=t<65536?s(t):s(55296+((t-=65536)>>10),t%1024+56320)}return l(i,"")}})},2625:(e,t,i)=>{"use strict";var n=i(8900),r=i(9098),a=i(9341),o=i(2224),s=i(7557),u=i(7130),l=r("".indexOf);n({target:"String",proto:!0,forced:!u("includes")},{includes:function(e){return!!~l(s(o(this)),s(a(e)),arguments.length>1?arguments[1]:void 0)}})},2750:(e,t,i)=>{"use strict";var n,r=i(8900),a=i(3530),o=i(3041).f,s=i(3268),u=i(7557),l=i(9341),c=i(2224),f=i(7130),d=i(3269),h=a("".slice),p=Math.min,v=f("startsWith");r({target:"String",proto:!0,forced:!!(d||v||(n=o(String.prototype,"startsWith"),!n||n.writable))&&!v},{startsWith:function(e){var t=u(c(this));l(e);var i=s(p(arguments.length>1?arguments[1]:void 0,t.length)),n=u(e);return h(t,i,i+n.length)===n}})},1320:(e,t,i)=>{"use strict";var n=i(8900),r=i(9296).trim;n({target:"String",proto:!0,forced:i(1908)("trim")},{trim:function(){return r(this)}})},5602:(e,t,i)=>{"use strict";i(3055)},4495:(e,t,i)=>{"use strict";var n=i(6682),r=i(9850),a=i(814),o=i(1778),s=i(2685),u=i(9269),l=i(3345)("iterator"),c=o.values,f=function(e,t){if(e){if(e[l]!==c)try{s(e,l,c)}catch(n){e[l]=c}if(u(e,t,!0),r[t])for(var i in o)if(e[i]!==o[i])try{s(e,i,o[i])}catch(n){e[i]=o[i]}}};for(var d in r)f(n[d]&&n[d].prototype,d);f(a,"DOMTokenList")},5064:(e,t,i)=>{"use strict";i(1778),i(2259);var n=i(8900),r=i(6682),a=i(1467),o=i(5761),s=i(6815),u=i(9098),l=i(1486),c=i(4650),f=i(4730),d=i(6424),h=i(1865),p=i(9269),v=i(2704),g=i(2755),m=i(7125),y=i(2587),b=i(8955),w=i(7250),S=i(3505),E=i(3589),N=i(6648),x=i(7557),O=i(298),C=i(9866),k=i(9239),_=i(5353),T=i(9295),A=i(4466),D=i(3345),R=i(9066),M=D("iterator"),I="URLSearchParams",j=I+"Iterator",P=g.set,z=g.getterFor(I),L=g.getterFor(j),U=a("fetch"),V=a("Request"),B=a("Headers"),F=V&&V.prototype,$=B&&B.prototype,K=r.TypeError,G=r.encodeURIComponent,H=String.fromCharCode,q=o("String","fromCodePoint"),Q=parseInt,W=u("".charAt),J=u([].join),Z=u([].push),Y=u("".replace),X=u([].shift),ee=u([].splice),te=u("".split),ie=u("".slice),ne=u(/./.exec),re=/\+/g,ae=/^[0-9a-f]+$/i,oe=function(e,t){var i=ie(e,t,t+2);return ne(ae,i)?Q(i,16):NaN},se=function(e){for(var t=0,i=128;i>0&&0!=(e&i);i>>=1)t++;return t},ue=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},le=function(e){for(var t=(e=Y(e,re," ")).length,i="",n=0;nt){i+="%",n++;continue}var a=oe(e,n+1);if(a!=a){i+=r,n++;continue}n+=2;var o=se(a);if(0===o)r=H(a);else{if(1===o||o>4){i+="\ufffd",n++;continue}for(var s=[a],u=1;ut||"%"!==W(e,n));){var l=oe(e,n+1);if(l!=l){n+=3;break}if(l>191||l<128)break;Z(s,l),n+=2,u++}if(s.length!==o){i+="\ufffd";continue}var c=ue(s);null===c?i+="\ufffd":r=q(c)}}i+=r,n++}return i},ce=/[!'()~]|%20/g,fe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},de=function(e){return fe[e]},he=function(e){return Y(G(e),ce,de)},pe=v((function(e,t){P(this,{type:j,target:z(e).entries,index:0,kind:t})}),I,(function(){var e=L(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,T(void 0,!0);var n=t[i];switch(e.kind){case"keys":return T(n.key,!1);case"values":return T(n.value,!1)}return T([n.key,n.value],!1)}),!0),ve=function(e){this.entries=[],this.url=null,void 0!==e&&(N(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===W(e,0)?ie(e,1):e:x(e)))};ve.prototype={type:I,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,i,n,r,a,o,u,l=this.entries,c=_(e);if(c)for(i=(t=k(e,c)).next;!(n=s(i,t)).done;){if(a=(r=k(E(n.value))).next,(o=s(a,r)).done||(u=s(a,r)).done||!s(a,r).done)throw new K("Expected sequence with length 2");Z(l,{key:x(o.value),value:x(u.value)})}else for(var f in e)b(e,f)&&Z(l,{key:f,value:x(e[f])})},parseQuery:function(e){if(e)for(var t,i,n=this.entries,r=te(e,"&"),a=0;a0?arguments[0]:void 0));l||(this.size=e.entries.length)},me=ge.prototype;if(h(me,{append:function(e,t){var i=z(this);A(arguments.length,2),Z(i.entries,{key:x(e),value:x(t)}),l||this.length++,i.updateURL()},delete:function(e){for(var t=z(this),i=A(arguments.length,1),n=t.entries,r=x(e),a=i<2?void 0:arguments[1],o=void 0===a?a:x(a),s=0;st.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,i=z(this).entries,n=w(e,arguments.length>1?arguments[1]:void 0),r=0;r1?we(arguments[1]):{})}}),y(V)){var Se=function(e){return m(this,F),new V(e,arguments.length>1?we(arguments[1]):{})};F.constructor=Se,Se.prototype=F,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Se})}}e.exports={URLSearchParams:ge,getState:z}},4142:(e,t,i)=>{"use strict";i(5064)},293:function(e){e.exports=function(){"use strict";function e(e){return Number.isInteger(e)&&e>=0}function t(e){this.name="ArgumentError",this.message=e}return function(i,n){if(n=n||{},"function"!=typeof i)throw new t("fetch must be a function");if("object"!=typeof n)throw new t("defaults must be an object");if(void 0!==n.retries&&!e(n.retries))throw new t("retries must be a positive integer");if(void 0!==n.retryDelay&&!e(n.retryDelay)&&"function"!=typeof n.retryDelay)throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(void 0!==n.retryOn&&!Array.isArray(n.retryOn)&&"function"!=typeof n.retryOn)throw new t("retryOn property expects an array or function");var r={retries:3,retryDelay:1e3,retryOn:[]};return n=Object.assign(r,n),function(r,a){var o=n.retries,s=n.retryDelay,u=n.retryOn;if(a&&void 0!==a.retries){if(!e(a.retries))throw new t("retries must be a positive integer");o=a.retries}if(a&&void 0!==a.retryDelay){if(!e(a.retryDelay)&&"function"!=typeof a.retryDelay)throw new t("retryDelay must be a positive integer or a function returning a positive integer");s=a.retryDelay}if(a&&a.retryOn){if(!Array.isArray(a.retryOn)&&"function"!=typeof a.retryOn)throw new t("retryOn property expects an array or function");u=a.retryOn}return new Promise((function(e,t){var n=function(n){var s="undefined"!=typeof Request&&r instanceof Request?r.clone():r;i(s,a).then((function(i){if(Array.isArray(u)&&-1===u.indexOf(i.status))e(i);else if("function"==typeof u)try{return Promise.resolve(u(n,null,i)).then((function(t){t?l(n,null,i):e(i)})).catch(t)}catch(r){t(r)}else n{var n=i(1032).Symbol;e.exports=n},8353:(e,t,i)=>{var n=i(2420),r=i(1944),a=i(6239),o=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?r(e):a(e)}},7615:e=>{e.exports=function(e,t,i){var n=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(i=i>r?r:i)<0&&(i+=r),r=t>i?0:i-t>>>0,t>>>=0;for(var a=Array(r);++n{var n=i(959),r=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(r,""):e}},4897:e=>{var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},2838:(e,t,i)=>{var n=i(9492)(Object.getPrototypeOf,Object);e.exports=n},1944:(e,t,i)=>{var n=i(2420),r=Object.prototype,a=r.hasOwnProperty,o=r.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),i=e[s];try{e[s]=void 0;var n=!0}catch(u){}var r=o.call(e);return n&&(t?e[s]=i:delete e[s]),r}},9306:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,i){var n=typeof e;return!!(i=i??9007199254740991)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=i(8203),r=i(4363),a=i(9306),o=i(6798);e.exports=function(e,t,i){if(!o(i))return!1;var s=typeof t;return!!("number"==s?r(i)&&a(t,i.length):"string"==s&&t in i)&&n(i[t],e)}},6239:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9492:e=>{e.exports=function(e,t){return function(i){return e(t(i))}}},1032:(e,t,i)=>{var n=i(4897),r="object"==typeof self&&self&&self.Object===Object&&self,a=n||r||Function("return this")();e.exports=a},959:e=>{var t=/\s/;e.exports=function(e){for(var i=e.length;i--&&t.test(e.charAt(i)););return i}},1564:(e,t,i)=>{var n=i(7615),r=i(1073),a=i(4980),o=Math.ceil,s=Math.max;e.exports=function(e,t,i){t=(i?r(e,t,i):void 0===t)?1:s(a(t),0);var u=null==e?0:e.length;if(!u||t<1)return[];for(var l=0,c=0,f=Array(o(u/t));l{e.exports=function(e,t){return e===t||e!=e&&t!=t}},308:e=>{var t=Array.isArray;e.exports=t},4363:(e,t,i)=>{var n=i(9021),r=i(2637);e.exports=function(e){return null!=e&&r(e.length)&&!n(e)}},2201:(e,t,i)=>{var n=i(8353),r=i(8249);e.exports=function(e){return!0===e||!1===e||r(e)&&"[object Boolean]"==n(e)}},9021:(e,t,i)=>{var n=i(8353),r=i(6798);e.exports=function(e){if(!r(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},2637:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},1876:e=>{e.exports=function(e){return null===e}},9272:(e,t,i)=>{var n=i(8353),r=i(8249);e.exports=function(e){return"number"==typeof e||r(e)&&"[object Number]"==n(e)}},6798:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},8249:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},9170:(e,t,i)=>{var n=i(8353),r=i(2838),a=i(8249),o=Function.prototype,s=Object.prototype,u=o.toString,l=s.hasOwnProperty,c=u.call(Object);e.exports=function(e){if(!a(e)||"[object Object]"!=n(e))return!1;var t=r(e);if(null===t)return!0;var i=l.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&u.call(i)==c}},732:(e,t,i)=>{var n=i(8353),r=i(308),a=i(8249);e.exports=function(e){return"string"==typeof e||!r(e)&&a(e)&&"[object String]"==n(e)}},6305:(e,t,i)=>{var n=i(8353),r=i(8249);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==n(e)}},1581:e=>{e.exports=function(e){return void 0===e}},7415:(e,t,i)=>{var n=i(913),r=1/0;e.exports=function(e){return e?(e=n(e))===r||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},4980:(e,t,i)=>{var n=i(7415);e.exports=function(e){var t=n(e),i=t%1;return t==t?i?t-i:t:0}},913:(e,t,i)=>{var n=i(6981),r=i(6798),a=i(6305),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var i=s.test(e);return i||u.test(e)?l(e.slice(2),i?2:8):o.test(e)?NaN:+e}},5618:()=>{var e;!function(e){!function(t){var i="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),n=r(e);function r(e,t){return function(i,n){"function"!=typeof e[i]&&Object.defineProperty(e,i,{configurable:!0,writable:!0,value:n}),t&&t(i,n)}}void 0===i.Reflect?i.Reflect=e:n=r(i.Reflect,n),function(e){var t=Object.prototype.hasOwnProperty,i="function"==typeof Symbol,n=i&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",r=i&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,o={__proto__:[]}instanceof Array,s=!a&&!o,u={create:a?function(){return ne(Object.create(null))}:o?function(){return ne({__proto__:null})}:function(){return ne({})},has:s?function(e,i){return t.call(e,i)}:function(e,t){return t in e},get:s?function(e,i){return t.call(e,i)?e[i]:void 0}:function(e,t){return e[t]}},l=Object.getPrototypeOf(Function),c="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,f=c||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?ee():Map,d=c||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?te():Set,h=new(c||"function"!=typeof WeakMap?ie():WeakMap);function p(e,t,i,n){if(j(i)){if(!K(e))throw new TypeError;if(!H(t))throw new TypeError;return x(e,t)}if(!K(e))throw new TypeError;if(!L(t))throw new TypeError;if(!L(n)&&!j(n)&&!P(n))throw new TypeError;return P(n)&&(n=void 0),O(e,t,i=$(i),n)}function v(e,t){function i(i,n){if(!L(i))throw new TypeError;if(!j(n)&&!q(n))throw new TypeError;D(e,t,i,n)}return i}function g(e,t,i,n){if(!L(i))throw new TypeError;return j(n)||(n=$(n)),D(e,t,i,n)}function m(e,t,i){if(!L(t))throw new TypeError;return j(i)||(i=$(i)),k(e,t,i)}function y(e,t,i){if(!L(t))throw new TypeError;return j(i)||(i=$(i)),_(e,t,i)}function b(e,t,i){if(!L(t))throw new TypeError;return j(i)||(i=$(i)),T(e,t,i)}function w(e,t,i){if(!L(t))throw new TypeError;return j(i)||(i=$(i)),A(e,t,i)}function S(e,t){if(!L(e))throw new TypeError;return j(t)||(t=$(t)),R(e,t)}function E(e,t){if(!L(e))throw new TypeError;return j(t)||(t=$(t)),M(e,t)}function N(e,t,i){if(!L(t))throw new TypeError;j(i)||(i=$(i));var n=C(t,i,!1);if(j(n))return!1;if(!n.delete(e))return!1;if(n.size>0)return!0;var r=h.get(t);return r.delete(i),r.size>0||h.delete(t),!0}function x(e,t){for(var i=e.length-1;i>=0;--i){var n=(0,e[i])(t);if(!j(n)&&!P(n)){if(!H(n))throw new TypeError;t=n}}return t}function O(e,t,i,n){for(var r=e.length-1;r>=0;--r){var a=(0,e[r])(t,i,n);if(!j(a)&&!P(a)){if(!L(a))throw new TypeError;n=a}}return n}function C(e,t,i){var n=h.get(e);if(j(n)){if(!i)return;n=new f,h.set(e,n)}var r=n.get(t);if(j(r)){if(!i)return;r=new f,n.set(t,r)}return r}function k(e,t,i){if(_(e,t,i))return!0;var n=X(t);return!P(n)&&k(e,n,i)}function _(e,t,i){var n=C(t,i,!1);return!j(n)&&B(n.has(e))}function T(e,t,i){if(_(e,t,i))return A(e,t,i);var n=X(t);return P(n)?void 0:T(e,n,i)}function A(e,t,i){var n=C(t,i,!1);if(!j(n))return n.get(e)}function D(e,t,i,n){C(i,n,!0).set(e,t)}function R(e,t){var i=M(e,t),n=X(e);if(null===n)return i;var r=R(n,t);if(r.length<=0)return i;if(i.length<=0)return r;for(var a=new d,o=[],s=0,u=i;s=0&&e=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:i,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var i=this._find(e,!0);return this._values[i]=t,this},t.prototype.delete=function(t){var i=this._find(t,!1);if(i>=0){for(var n=this._keys.length,r=i+1;r0?2===s.length?typeof s[1]==o?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:3===s.length?typeof s[1]!==o||s[1].exec&&s[1].test?this[s[0]]=c?c.replace(s[1],s[2]):a:this[s[0]]=c?s[1].call(this,c,s[2]):a:4===s.length&&(this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):a):this[s]=c||a;f+=2}},J=function(e,t){for(var i in t)if(typeof t[i]===u&&t[i].length>0){for(var n=0;n2&&(e[f]="iPad",e[h]=b),e},this.getEngine=function(){var e={};return e[d]=a,e[v]=a,W.call(e,n,w.engine),e},this.getOS=function(){var e={};return e[d]=a,e[v]=a,W.call(e,n,w.os),S&&!e[d]&&m&&m.platform&&"Unknown"!=m.platform&&(e[d]=m.platform.replace(/chrome os/i,F).replace(/macos/i,$)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===l&&e.length>500?Q(e,500):e,this},this.setUA(n),this};X.VERSION="1.0.40",X.BROWSER=G([d,v,c]),X.CPU=G([g]),X.DEVICE=G([f,p,h,m,y,w,b,S,E]),X.ENGINE=X.OS=G([d,v]),typeof t!==s?(e.exports&&(t=e.exports=X),t.UAParser=X):i.amdO?(n=(function(){return X}).call(t,i,t,e))===a||(e.exports=n):typeof r!==s&&(r.UAParser=X);var ee=typeof r!==s&&(r.jQuery||r.Zepto);if(ee&&!ee.ua){var te=new X;ee.ua=te.getResult(),ee.ua.get=function(){return te.getUA()},ee.ua.set=function(e){te.setUA(e);var t=te.getResult();for(var i in t)ee.ua[i]=t[i]}}}("object"==typeof window?window:this)},305:(e,t,i)=>{"use strict";t.Ay=function(e){return(0,r.default)(e),a.has(e.toUpperCase())};var n,r=(n=i(2049))&&n.__esModule?n:{default:n};var a=new Set(["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"])},2049:(e,t)=>{"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!("string"==typeof e||e instanceof String)){var t=i(e);throw null===e?t="null":"object"===t&&(t=e.constructor.name),new TypeError("Expected a string but received a ".concat(t))}},e.exports=t.default,e.exports.default=t.default}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,i),a.exports}i.amdO={},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";i.r(n),i.d(n,{DVCPopulatedUser:()=>DVCPopulatedUser,StoreKey:()=>la,UserError:()=>UserError,VariableDefinitions:()=>e.VariableDefinitions,dvcDefaultLogger:()=>Wa,initialize:()=>Xa,initializeDevCycle:()=>Ya});var e={};i.r(e),i.d(e,{IC:()=>cn,bj:()=>ln,yo:()=>UserError,my:()=>ua});i(2750),i(5602);function t(e,t,i,n){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(n):void 0})}function r(e,t,i,n,r){var a={};return Object.keys(n).forEach((function(e){a[e]=n[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=i.slice().reverse().reduce((function(i,n){return n(e,t,i)||i}),a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer?(Object.defineProperty(e,t,a),null):a}i(1778),i(4495);var a,o,s=i(732),u=i.n(s),l=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find((function(t){return t.type===e}));return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}());function c(e){if(a)try{var t=a.get(e);if(t)return t;if(!o||!o.fallback)return t}catch(i){if(!o||!o.fallbackOnErrors)throw i}return l.get(e)}var f=function(){function e(e,t,i){void 0===i&&(i=!1),this.target=e,this.name=t,this.async=i}return Object.defineProperty(e.prototype,"instance",{get:function(){return c(this.target)},enumerable:!1,configurable:!0}),e}(),d=function(e){this.groups=[],this.each=!1,this.context=void 0,this.type=e.type,this.name=e.name,this.target=e.target,this.propertyName=e.propertyName,this.constraints=null==e?void 0:e.constraints,this.constraintCls=e.constraintCls,this.validationTypeOptions=e.validationTypeOptions,e.validationOptions&&(this.message=e.validationOptions.message,this.groups=e.validationOptions.groups,this.always=e.validationOptions.always,this.each=e.validationOptions.each,this.context=e.validationOptions.context)},h=function(){function e(){}return e.isValid=function(e){var t=this;return"isValid"!==e&&"getMessage"!==e&&-1!==Object.keys(this).map((function(e){return t[e]})).indexOf(e)},e.CUSTOM_VALIDATION="customValidation",e.NESTED_VALIDATION="nestedValidation",e.PROMISE_VALIDATION="promiseValidation",e.CONDITIONAL_VALIDATION="conditionalValidation",e.WHITELIST="whitelistValidation",e.IS_DEFINED="isDefined",e}(),p=function(){function e(){}return e.prototype.transform=function(e){var t=[];return Object.keys(e.properties).forEach((function(i){e.properties[i].forEach((function(n){var r={message:n.message,groups:n.groups,always:n.always,each:n.each},a={type:n.type,name:n.name,target:e.name,propertyName:i,constraints:n.constraints,validationTypeOptions:n.options,validationOptions:r};t.push(new d(a))}))})),t},e}();function v(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0}var g=function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},m=function(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,a=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(s){r={error:s}}finally{try{n&&!n.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o},y=function(e,t,i){if(i||2===arguments.length)for(var n,r=0,a=t.length;r0)||i.groups&&!!i.groups.find((function(e){return-1!==r.indexOf(e)}))))})),c=[];try{for(var f=g(this.validationMetadatas.entries()),d=f.next();!d.done;d=f.next()){var h=m(d.value,2),p=h[0],v=h[1];e.prototype instanceof p&&c.push.apply(c,y([],m(v),!1))}}catch(w){a={error:w}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}var b=c.filter((function(t){return"string"!=typeof t.target&&(t.target!==e&&((!(t.target instanceof Function)||e.prototype instanceof t.target)&&(!!s(t)||!u(t)&&(!(r&&r.length>0)||t.groups&&!!t.groups.find((function(e){return-1!==r.indexOf(e)}))))))})).filter((function(e){return!l.find((function(t){return t.propertyName===e.propertyName&&t.type===e.type}))}));return l.concat(b)},e.prototype.getTargetValidatorConstraints=function(e){return this.constraintMetadatas.get(e)||[]},e}();function w(){var e=v();return e.classValidatorMetadataStorage||(e.classValidatorMetadataStorage=new b),e.classValidatorMetadataStorage}function S(e){var t;if(e.validator instanceof Function){if(t=e.validator,c(b).getTargetValidatorConstraints(e.validator).length>1)throw"More than one implementation of ValidatorConstraintInterface found for validator on: ".concat(e.target.name,":").concat(e.propertyName)}else{var i=e.validator;t=function(){function e(){}return e.prototype.validate=function(e,t){return i.validate(e,t)},e.prototype.defaultMessage=function(e){return i.defaultMessage?i.defaultMessage(e):""},e}(),w().addConstraintMetadata(new f(t,e.name,e.async))}var n={type:e.name&&h.isValid(e.name)?e.name:h.CUSTOM_VALIDATION,name:e.name,target:e.target,propertyName:e.propertyName,validationOptions:e.options,constraintCls:t,constraints:e.constraints};w().addValidationMetadata(new d(n))}function E(e,t){return function(i){var n=t&&t.each?"each value in ":"";return e(n,i)}}function N(e,t){return function(i,n){S({name:e.name,target:i.constructor,propertyName:n,options:t,constraints:e.constraints,validator:e.validator})}}function x(e){return N({name:"isBoolean",validator:{validate:function(e,t){return function(e){return e instanceof Boolean||"boolean"==typeof e}(e)},defaultMessage:E((function(e){return e+"$property must be a boolean value"}),e)}},e)}function O(e){return function(t,i){var n={type:h.CONDITIONAL_VALIDATION,target:t.constructor,propertyName:i,constraints:[function(e,t){return null!==e[i]&&void 0!==e[i]}],validationOptions:e};w().addValidationMetadata(new d(n))}}function C(e){return N({name:"isString",validator:{validate:function(e,t){return function(e){return e instanceof String||"string"==typeof e}(e)},defaultMessage:E((function(e){return e+"$property must be a string"}),e)}},e)}function k(e){return N({name:"isNotEmpty",validator:{validate:function(e,t){return function(e){return""!==e&&null!=e}(e)},defaultMessage:E((function(e){return e+"$property should not be empty"}),e)}},e)}var _=i(305);function T(e){return N({name:"isISO31661Alpha2",validator:{validate:function(e,t){return function(e){return"string"==typeof e&&(0,_.Ay)(e)}(e)},defaultMessage:E((function(e){return e+"$property must be a valid ISO31661 Alpha2 code"}),e)}},e)}function A(e,t){return void 0===e&&(e={}),N({name:"isNumber",constraints:[e],validator:{validate:function(e,t){return function(e,t){if(void 0===t&&(t={}),"number"!=typeof e)return!1;if(e===1/0||e===-1/0)return!!t.allowInfinity;if(Number.isNaN(e))return!!t.allowNaN;if(void 0!==t.maxDecimalPlaces){var i=0;if(e%1!=0&&(i=e.toString().split(".")[1].length),i>t.maxDecimalPlaces)return!1}return Number.isFinite(e)}(e,null==t?void 0:t.constraints[0])},defaultMessage:E((function(e){return e+"$property must be a number conforming to the specified constraints"}),t)}},t)}function D(e){return N({name:"isDate",validator:{validate:function(e,t){return function(e){return e instanceof Date&&!isNaN(e.getTime())}(e)},defaultMessage:E((function(e){return e+"$property must be a Date instance"}),e)}},e)}var R;function M(e,t){return N({name:"isIn",constraints:[e],validator:{validate:function(e,t){return function(e,t){return Array.isArray(t)&&t.some((function(t){return t===e}))}(e,null==t?void 0:t.constraints[0])},defaultMessage:E((function(e){return e+"$property must be one of the following values: $constraint1"}),t)}},t)}!function(e){e[e.PLAIN_TO_CLASS=0]="PLAIN_TO_CLASS",e[e.CLASS_TO_PLAIN=1]="CLASS_TO_PLAIN",e[e.CLASS_TO_CLASS=2]="CLASS_TO_CLASS"}(R||(R={}));var I=function(){function e(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}return e.prototype.addTypeMetadata=function(e){this._typeMetadatas.has(e.target)||this._typeMetadatas.set(e.target,new Map),this._typeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addTransformMetadata=function(e){this._transformMetadatas.has(e.target)||this._transformMetadatas.set(e.target,new Map),this._transformMetadatas.get(e.target).has(e.propertyName)||this._transformMetadatas.get(e.target).set(e.propertyName,[]),this._transformMetadatas.get(e.target).get(e.propertyName).push(e)},e.prototype.addExposeMetadata=function(e){this._exposeMetadatas.has(e.target)||this._exposeMetadatas.set(e.target,new Map),this._exposeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addExcludeMetadata=function(e){this._excludeMetadatas.has(e.target)||this._excludeMetadatas.set(e.target,new Map),this._excludeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.findTransformMetadatas=function(e,t,i){return this.findMetadatas(this._transformMetadatas,e,t).filter((function(e){return!e.options||(!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?i===R.CLASS_TO_CLASS||i===R.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||i===R.CLASS_TO_PLAIN))}))},e.prototype.findExcludeMetadata=function(e,t){return this.findMetadata(this._excludeMetadatas,e,t)},e.prototype.findExposeMetadata=function(e,t){return this.findMetadata(this._exposeMetadatas,e,t)},e.prototype.findExposeMetadataByCustomName=function(e,t){return this.getExposedMetadatas(e).find((function(e){return e.options&&e.options.name===t}))},e.prototype.findTypeMetadata=function(e,t){return this.findMetadata(this._typeMetadatas,e,t)},e.prototype.getStrategy=function(e){var t=this._excludeMetadatas.get(e),i=t&&t.get(void 0),n=this._exposeMetadatas.get(e),r=n&&n.get(void 0);return i&&r||!i&&!r?"none":i?"excludeAll":"exposeAll"},e.prototype.getExposedMetadatas=function(e){return this.getMetadata(this._exposeMetadatas,e)},e.prototype.getExcludedMetadatas=function(e){return this.getMetadata(this._excludeMetadatas,e)},e.prototype.getExposedProperties=function(e,t){return this.getExposedMetadatas(e).filter((function(e){return!e.options||(!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?t===R.CLASS_TO_CLASS||t===R.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||t===R.CLASS_TO_PLAIN))})).map((function(e){return e.propertyName}))},e.prototype.getExcludedProperties=function(e,t){return this.getExcludedMetadatas(e).filter((function(e){return!e.options||(!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?t===R.CLASS_TO_CLASS||t===R.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||t===R.CLASS_TO_PLAIN))})).map((function(e){return e.propertyName}))},e.prototype.clear=function(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()},e.prototype.getMetadata=function(e,t){var i,n=e.get(t);n&&(i=Array.from(n.values()).filter((function(e){return void 0!==e.propertyName})));for(var r=[],a=0,o=this.getAncestors(t);a"$property must be a JSON Object with only string / number / boolean / null types"}})}}function W(e){if(!$()(e))return!1;for(const t in e){if(!u()(t))return!1;const i=e[t];if(q()(i)||!(u()(i)||U()(i)||B()(i)||G()(i)))return!1}return!0}i(1320);function J(e){return function(t,i){S({name:"isNotBlank",target:t.constructor,propertyName:i,options:e,validator:{validate:Z}})}}function Z(e){return"string"==typeof e&&e.trim().length>0}const Y={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"\u0430\u04a7\u0441\u0443\u0430 \u0431\u044b\u0437\u0448\u04d9\u0430"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"\u12a0\u121b\u122d\u129b"},an:{name:"Aragonese",nativeName:"aragon\xe9s"},ar:{name:"Arabic",nativeName:"\u0627\u064e\u0644\u0652\u0639\u064e\u0631\u064e\u0628\u0650\u064a\u064e\u0651\u0629\u064f"},as:{name:"Assamese",nativeName:"\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be"},av:{name:"Avaric",nativeName:"\u0430\u0432\u0430\u0440 \u043c\u0430\u0446\u04c0"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"az\u0259rbaycan dili"},ba:{name:"Bashkir",nativeName:"\u0431\u0430\u0448\u04a1\u043e\u0440\u0442 \u0442\u0435\u043b\u0435"},be:{name:"Belarusian",nativeName:"\u0431\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f \u043c\u043e\u0432\u0430"},bg:{name:"Bulgarian",nativeName:"\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438 \u0435\u0437\u0438\u043a"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"\u09ac\u09be\u0982\u09b2\u09be"},bo:{name:"Tibetan",nativeName:"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Catal\xe0"},ce:{name:"Chechen",nativeName:"\u043d\u043e\u0445\u0447\u0438\u0439\u043d \u043c\u043e\u0442\u0442"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423"},cs:{name:"Czech",nativeName:"\u010de\u0161tina"},cu:{name:"Old Church Slavonic",nativeName:"\u0469\u0437\u044b\u043a\u044a \u0441\u043b\u043e\u0432\u0463\u043d\u044c\u0441\u043a\u044a"},cv:{name:"Chuvash",nativeName:"\u0447\u04d1\u0432\u0430\u0448 \u0447\u04d7\u043b\u0445\u0438"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"\u078b\u07a8\u0788\u07ac\u0780\u07a8"},dz:{name:"Dzongkha",nativeName:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41"},ee:{name:"Ewe",nativeName:"E\u028begbe"},el:{name:"Greek",nativeName:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Espa\xf1ol"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"\u0641\u0627\u0631\u0633\u06cc"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fo:{name:"Faroese",nativeName:"f\xf8royskt"},fr:{name:"French",nativeName:"Fran\xe7ais"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"G\xe0idhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaran\xed",nativeName:"Ava\xf1e'\u1ebd"},gu:{name:"Gujarati",nativeName:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"\u0647\u064e\u0648\u064f\u0633\u064e"},he:{name:"Hebrew",nativeName:"\u05e2\u05d1\u05e8\u05d9\u05ea"},hi:{name:"Hindi",nativeName:"\u0939\u093f\u0928\u094d\u0926\u0940"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Krey\xf2l ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"As\u1ee5s\u1ee5 Igbo"},ii:{name:"Nuosu",nativeName:"\ua188\ua320\ua4bf Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"I\xf1upiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"\xcdslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"\u1403\u14c4\u1483\u144e\u1450\u1466"},ja:{name:"Japanese",nativeName:"\u65e5\u672c\u8a9e"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8"},kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"G\u0129k\u0169y\u0169"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"\u049b\u0430\u0437\u0430\u049b \u0442\u0456\u043b\u0456"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"\u1781\u17c1\u1798\u179a\u1797\u17b6\u179f\u17b6"},kn:{name:"Kannada",nativeName:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1"},ko:{name:"Korean",nativeName:"\ud55c\uad6d\uc5b4"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"\u0915\u0936\u094d\u092e\u0940\u0930\u0940"},ku:{name:"Kurdish",nativeName:"Kurd\xee"},kv:{name:"Komi",nativeName:"\u043a\u043e\u043c\u0438 \u043a\u044b\u0432"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"\u041a\u044b\u0440\u0433\u044b\u0437\u0447\u0430"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"L\xebtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Ling\xe1la"},lo:{name:"Lao",nativeName:"\u0e9e\u0eb2\u0eaa\u0eb2\u0ea5\u0eb2\u0ea7"},lt:{name:"Lithuanian",nativeName:"lietuvi\u0173 kalba"},lu:{name:"Luba-Katanga",nativeName:"Kiluba"},lv:{name:"Latvian",nativeName:"latvie\u0161u valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M\u0327aje\u013c"},mi:{name:"M\u0101ori",nativeName:"te reo M\u0101ori"},mk:{name:"Macedonian",nativeName:"\u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 \u0458\u0430\u0437\u0438\u043a"},ml:{name:"Malayalam",nativeName:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02"},mn:{name:"Mongolian",nativeName:"\u041c\u043e\u043d\u0433\u043e\u043b \u0445\u044d\u043b"},mr:{name:"Marathi",nativeName:"\u092e\u0930\u093e\u0920\u0940"},ms:{name:"Malay",nativeName:"Bahasa Melayu"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"\u1017\u1019\u102c\u1005\u102c"},na:{name:"Nauru",nativeName:"Dorerin Naoero"},nb:{name:"Norwegian Bokm\xe5l",nativeName:"Norsk bokm\xe5l"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"\u0928\u0947\u092a\u093e\u0932\u0940"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Din\xe9 bizaad"},ny:{name:"Chichewa",nativeName:"chiChe\u0175a"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"\u140a\u14c2\u1511\u14c8\u142f\u14a7\u140e\u14d0"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"\u0b13\u0b21\u0b3c\u0b3f\u0b06"},os:{name:"Ossetian",nativeName:"\u0438\u0440\u043e\u043d \xe6\u0432\u0437\u0430\u0433"},pa:{name:"Panjabi",nativeName:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40"},pi:{name:"P\u0101li",nativeName:"\u092a\u093e\u0934\u093f"},pl:{name:"Polish",nativeName:"Polski"},ps:{name:"Pashto",nativeName:"\u067e\u069a\u062a\u0648"},pt:{name:"Portuguese",nativeName:"Portugu\xeas"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"},ro:{name:"Romanian",nativeName:"Rom\xe2n\u0103"},ru:{name:"Russian",nativeName:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"\u0938\u093f\u0928\u094d\u0927\u0940"},se:{name:"Northern Sami",nativeName:"Davvis\xe1megiella"},sg:{name:"Sango",nativeName:"y\xe2ng\xe2 t\xee s\xe4ng\xf6"},si:{name:"Sinhala",nativeName:"\u0dc3\u0dd2\u0d82\u0dc4\u0dbd"},sk:{name:"Slovak",nativeName:"sloven\u010dina"},sl:{name:"Slovenian",nativeName:"sloven\u0161\u010dina"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"\u0441\u0440\u043f\u0441\u043a\u0438 \u0458\u0435\u0437\u0438\u043a"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd"},te:{name:"Telugu",nativeName:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41"},tg:{name:"Tajik",nativeName:"\u0442\u043e\u04b7\u0438\u043a\u04e3"},th:{name:"Thai",nativeName:"\u0e44\u0e17\u0e22"},ti:{name:"Tigrinya",nativeName:"\u1275\u130d\u122d\u129b"},tk:{name:"Turkmen",nativeName:"T\xfcrkmen\xe7e"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"T\xfcrk\xe7e"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"\u0442\u0430\u0442\u0430\u0440 \u0442\u0435\u043b\u0435"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"\u0626\u06c7\u064a\u063a\u06c7\u0631\u0686\u06d5\u200e"},uk:{name:"Ukrainian",nativeName:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430"},ur:{name:"Urdu",nativeName:"\u0627\u0631\u062f\u0648"},uz:{name:"Uzbek",nativeName:"\u040e\u0437\u0431\u0435\u043a"},ve:{name:"Venda",nativeName:"Tshiven\u1e13a"},vi:{name:"Vietnamese",nativeName:"Ti\u1ebfng Vi\u1ec7t"},vo:{name:"Volap\xfck",nativeName:"Volap\xfck"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9"},yo:{name:"Yoruba",nativeName:"Yor\xf9b\xe1"},za:{name:"Zhuang",nativeName:"Sa\u026f cue\u014b\u0185"},zh:{name:"Chinese",nativeName:"\u4e2d\u6587"},zu:{name:"Zulu",nativeName:"isiZulu"}};class ISO6391{static getLanguages(e=[]){return e.map((e=>({code:e,name:ISO6391.getName(e),nativeName:ISO6391.getNativeName(e)})))}static getName(e){return ISO6391.validate(e)?Y[e].name:""}static getAllNames(){return Object.values(Y).map((e=>e.name))}static getNativeName(e){return ISO6391.validate(e)?Y[e].nativeName:""}static getAllNativeNames(){return Object.values(Y).map((e=>e.nativeName))}static getCode(e){return Object.keys(Y).find((t=>{const i=Y[t];return i.name.toLowerCase()===e.toLowerCase()||i.nativeName.toLowerCase()===e.toLowerCase()}))||""}static getAllCodes(){return Object.keys(Y)}static validate(e){return Y.hasOwnProperty(e)}}function X(e){return"string"==typeof e&&function(e){return ISO6391.validate(e.toLocaleLowerCase())}(e)}function ee(e){return N({name:"isISO6391",validator:{validate:(e,t)=>X(e),defaultMessage:E((e=>e+"$property must be a valid ISO6391 code"),e)}},e)}var te,ie,ne,re,ae,oe,se,ue,le,ce,fe,de,he,pe,ve,ge,me,ye,be,we,Se,Ee,Ne,xe,Oe,Ce,ke,_e,Te,Ae,De,Re,Me,Ie,je,Pe,ze,Le,Ue,Ve,Be,Fe,$e,Ke,Ge,He,qe,Qe,We,Je,Ze,Ye,Xe,et,tt,it,nt,rt,at,ot,st,ut,lt,ct,ft,dt,ht,pt,vt,gt,mt,yt,bt,wt,St,Et,Nt,xt,Ot,Ct,kt,_t,Tt,At,Dt,Rt,Mt,It,jt,Pt,zt,Lt,Ut,Vt,Bt,Ft,$t,Kt,Gt,Ht,qt,Qt,Wt,Jt,Zt,Yt,Xt,ei,ti,ii,ni,ri,ai,oi,si,ui,li,ci,fi,di,hi,pi,vi,gi,mi,yi,bi,wi,Si,Ei,Ni,xi,Oi,Ci,ki,_i,Ti,Ai,Di,Ri,Mi,Ii,ji,Pi,zi,Li,Ui,Vi,Bi,Fi,$i,Ki,Gi,Hi,qi,Qi,Wi,Ji,Zi,Yi,Xi,en,tn,nn,rn,an,on,sn,un;let ln=function(e){return e.TARGETING_MATCH="TARGETING_MATCH",e.SPLIT="SPLIT",e.DEFAULT="DEFAULT",e.DISABLED="DISABLED",e.ERROR="ERROR",e.OVERRIDE="OVERRIDE",e.OPT_IN="OPT_IN",e}({}),cn=function(e){return e.MISSING_CONFIG="Missing Config",e.MISSING_VARIABLE="Missing Variable",e.MISSING_FEATURE="Missing Feature",e.MISSING_VARIATION="Missing Variation",e.MISSING_VARIABLE_FOR_VARIATION="Missing Variable for Variation",e.USER_NOT_IN_ROLLOUT="User Not in Rollout",e.USER_NOT_TARGETED="User Not Targeted",e.INVALID_VARIABLE_TYPE="Invalid Variable Type",e.TYPE_MISMATCH="Variable Type Mismatch",e.UNKNOWN="Unknown",e.ERROR="Error",e}({});const fn=({value:e})=>"true"===e||"false"!==e&&e,dn=({value:e})=>{if(!e)return;const t=Number(e);return isNaN(t)?new Date(e):new Date(t)};let hn=(te=x(),ie=O(),ne=P(fn),re=Reflect.metadata("design:type",Boolean),ae=C(),oe=J(),se=k(),ue=Reflect.metadata("design:type",String),le=C(),ce=O(),fe=Reflect.metadata("design:type",String),de=C(),he=O(),pe=Reflect.metadata("design:type",String),ve=ee(),ge=C(),me=O(),ye=Reflect.metadata("design:type",String),be=T(),we=O(),Se=Reflect.metadata("design:type",String),Ee=C(),Ne=O(),xe=Reflect.metadata("design:type",String),Oe=A(),Ce=O(),ke=z((()=>Number)),_e=Reflect.metadata("design:type",Number),Te=Q(),Ae=O(),De=P((({value:e})=>u()(e)?JSON.parse(e):e)),Re=Reflect.metadata("design:type","undefined"==typeof DVCCustomDataJSON?Object:DVCCustomDataJSON),Me=Q(),Ie=O(),je=P((({value:e})=>u()(e)?JSON.parse(e):e)),Pe=Reflect.metadata("design:type","undefined"==typeof DVCCustomDataJSON?Object:DVCCustomDataJSON),ze=D(),Le=O(),Ue=P(dn),Ve=Reflect.metadata("design:type","undefined"==typeof Date?Object:Date),Be=D(),Fe=O(),$e=P(dn),Ke=Reflect.metadata("design:type","undefined"==typeof Date?Object:Date),Ge=C(),He=O(),qe=Reflect.metadata("design:type",String),Qe=C(),We=O(),Je=Reflect.metadata("design:type",String),Ze=C(),Ye=O(),Xe=Reflect.metadata("design:type",String),et=C(),tt=O(),it=M(["client","server","mobile","api"]),nt=P((({value:e})=>e)),rt=Reflect.metadata("design:type","undefined"==typeof SDKTypes?Object:SDKTypes),at=C(),ot=O(),st=Reflect.metadata("design:type",String),lt=r((ut=class DVCAPIUser{constructor(){t(this,"isAnonymous",lt,this),t(this,"user_id",ct,this),t(this,"email",ft,this),t(this,"name",dt,this),t(this,"language",ht,this),t(this,"country",pt,this),t(this,"appVersion",vt,this),t(this,"appBuild",gt,this),t(this,"customData",mt,this),t(this,"privateCustomData",yt,this),t(this,"createdDate",bt,this),t(this,"lastSeenDate",wt,this),t(this,"platform",St,this),t(this,"platformVersion",Et,this),t(this,"deviceModel",Nt,this),t(this,"sdkType",xt,this),t(this,"sdkVersion",Ot,this)}}).prototype,"isAnonymous",[te,ie,ne,re],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ct=r(ut.prototype,"user_id",[ae,oe,se,ue],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ft=r(ut.prototype,"email",[le,ce,fe],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),dt=r(ut.prototype,"name",[de,he,pe],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ht=r(ut.prototype,"language",[ve,ge,me,ye],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),pt=r(ut.prototype,"country",[be,we,Se],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),vt=r(ut.prototype,"appVersion",[Ee,Ne,xe],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),gt=r(ut.prototype,"appBuild",[Oe,Ce,ke,_e],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),mt=r(ut.prototype,"customData",[Te,Ae,De,Re],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),yt=r(ut.prototype,"privateCustomData",[Me,Ie,je,Pe],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),bt=r(ut.prototype,"createdDate",[ze,Le,Ue,Ve],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),wt=r(ut.prototype,"lastSeenDate",[Be,Fe,$e,Ke],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),St=r(ut.prototype,"platform",[Ge,He,qe],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Et=r(ut.prototype,"platformVersion",[Qe,We,Je],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Nt=r(ut.prototype,"deviceModel",[Ze,Ye,Xe],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),xt=r(ut.prototype,"sdkType",[et,tt,it,nt,rt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"api"}}),Ot=r(ut.prototype,"sdkVersion",[at,ot,st],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ut);Ct=O(),kt=P((({value:e})=>u()(e)?JSON.parse(e):e)),_t=Reflect.metadata("design:type","undefined"==typeof Record?Object:Record),At=r((Tt=class DVCBucketingUser extends hn{constructor(...e){super(...e),t(this,"optIns",At,this)}}).prototype,"optIns",[Ct,kt,_t],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Dt=x(),Rt=P(fn),Mt=Reflect.metadata("design:type",Boolean),It=C(),jt=J(),Pt=k(),zt=Reflect.metadata("design:type",String),Lt=C(),Ut=O(),Vt=Reflect.metadata("design:type",String),Bt=C(),Ft=O(),$t=Reflect.metadata("design:type",String),Kt=ee(),Gt=C(),Ht=O(),qt=Reflect.metadata("design:type",String),Qt=T(),Wt=O(),Jt=Reflect.metadata("design:type",String),Zt=C(),Yt=O(),Xt=Reflect.metadata("design:type",String),ei=A(),ti=O(),ii=z((()=>Number)),ni=Reflect.metadata("design:type",Number),ri=Q(),ai=O(),oi=P((({value:e})=>u()(e)?JSON.parse(e):e)),si=Reflect.metadata("design:type","undefined"==typeof DVCCustomDataJSON?Object:DVCCustomDataJSON),ui=Q(),li=O(),ci=P((({value:e})=>u()(e)?JSON.parse(e):e)),fi=Reflect.metadata("design:type","undefined"==typeof DVCCustomDataJSON?Object:DVCCustomDataJSON),di=D(),hi=P(dn),pi=Reflect.metadata("design:type","undefined"==typeof Date?Object:Date),vi=D(),gi=P(dn),mi=Reflect.metadata("design:type","undefined"==typeof Date?Object:Date),yi=C(),bi=k(),wi=Reflect.metadata("design:type",String),Si=C(),Ei=k(),Ni=Reflect.metadata("design:type",String),xi=C(),Oi=k(),Ci=Reflect.metadata("design:type",String),ki=C(),_i=M(["client","mobile"]),Ti=Reflect.metadata("design:type","undefined"==typeof SDKTypes?Object:SDKTypes),Ai=C(),Di=k(),Ri=Reflect.metadata("design:type",String),Mi=x(),Ii=O(),ji=P((({value:e})=>u()(e)?"true"===e:e)),Pi=Reflect.metadata("design:type",Boolean),Li=r((zi=class DVCClientAPIUser{constructor(){t(this,"isAnonymous",Li,this),t(this,"user_id",Ui,this),t(this,"email",Vi,this),t(this,"name",Bi,this),t(this,"language",Fi,this),t(this,"country",$i,this),t(this,"appVersion",Ki,this),t(this,"appBuild",Gi,this),t(this,"customData",Hi,this),t(this,"privateCustomData",qi,this),t(this,"createdDate",Qi,this),t(this,"lastSeenDate",Wi,this),t(this,"platform",Ji,this),t(this,"platformVersion",Zi,this),t(this,"deviceModel",Yi,this),t(this,"sdkType",Xi,this),t(this,"sdkVersion",en,this),t(this,"isDebug",tn,this)}}).prototype,"isAnonymous",[Dt,Rt,Mt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ui=r(zi.prototype,"user_id",[It,jt,Pt,zt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Vi=r(zi.prototype,"email",[Lt,Ut,Vt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Bi=r(zi.prototype,"name",[Bt,Ft,$t],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Fi=r(zi.prototype,"language",[Kt,Gt,Ht,qt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$i=r(zi.prototype,"country",[Qt,Wt,Jt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ki=r(zi.prototype,"appVersion",[Zt,Yt,Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Gi=r(zi.prototype,"appBuild",[ei,ti,ii,ni],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Hi=r(zi.prototype,"customData",[ri,ai,oi,si],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qi=r(zi.prototype,"privateCustomData",[ui,li,ci,fi],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qi=r(zi.prototype,"createdDate",[di,hi,pi],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Wi=r(zi.prototype,"lastSeenDate",[vi,gi,mi],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ji=r(zi.prototype,"platform",[yi,bi,wi],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Zi=r(zi.prototype,"platformVersion",[Si,Ei,Ni],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Yi=r(zi.prototype,"deviceModel",[xi,Oi,Ci],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Xi=r(zi.prototype,"sdkType",[ki,_i,Ti],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),en=r(zi.prototype,"sdkVersion",[Ai,Di,Ri],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),tn=r(zi.prototype,"isDebug",[Mi,Ii,ji,Pi],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),nn=C(),rn=J(),an=k(),on=Reflect.metadata("design:type",String),un=r((sn=class DVCOptInUser{constructor(){t(this,"user_id",un,this)}}).prototype,"user_id",[nn,rn,an,on],{configurable:!0,enumerable:!0,writable:!0,initializer:null});var pn=function(){return pn=Object.assign||function(e){for(var t,i=1,n=arguments.length;ihn)),Vn=Reflect.metadata("design:type",void 0===hn?Object:hn),Bn=k(),Fn=function(e){return N({name:"isArray",validator:{validate:function(e,t){return function(e){return Array.isArray(e)}(e)},defaultMessage:E((function(e){return e+"$property must be an array"}),e)}},e)}(),$n=vn({each:!0}),Kn=z((()=>Wn)),Gn=Reflect.metadata("design:type",Array),qn=r((Hn=class SDKEventRequestBody{constructor(){t(this,"user",qn,this),t(this,"events",Qn,this)}}).prototype,"user",[zn,Ln,Un,Vn],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qn=r(Hn.prototype,"events",[Bn,Fn,$n,Kn,Gn],{configurable:!0,enumerable:!0,writable:!0,initializer:null});var Zn,Yn,Xn,er,tr,ir,nr,rr,ar,or,sr,ur,lr,cr,fr,dr,hr,pr,vr;let gr=(Zn=z((()=>Date)),Yn=Reflect.metadata("design:type","undefined"==typeof Date?Object:Date),er=r((Xn=class RolloutStage{constructor(){this.type=void 0,t(this,"date",er,this),this.percentage=void 0}}).prototype,"date",[Zn,Yn],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Xn),mr=(tr=z((()=>Date)),ir=Reflect.metadata("design:type","undefined"==typeof Date?Object:Date),nr=z((()=>gr)),rr=Reflect.metadata("design:type",Array),or=r((ar=class Rollout{constructor(){this.type=void 0,this.startPercentage=void 0,t(this,"startDate",or,this),t(this,"stages",sr,this)}}).prototype,"startDate",[tr,ir],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),sr=r(ar.prototype,"stages",[nr,rr],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ar);let yr=(ur=z((()=>mr)),lr=Reflect.metadata("design:type",void 0===mr?Object:mr),fr=r((cr=class Target{constructor(){this._id=void 0,this._audience=void 0,t(this,"rollout",fr,this),this.distribution=void 0,this.type=void 0,this.bucketingKey=void 0}}).prototype,"rollout",[ur,lr],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),cr);let br=(dr=z((()=>yr)),hr=Reflect.metadata("design:type",Array),vr=r((pr=class FeatureConfiguration{constructor(){this._id=void 0,this.prerequisites=void 0,this.winningVariation=void 0,this.forcedUsers=void 0,t(this,"targets",vr,this)}}).prototype,"targets",[dr,hr],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),pr);var wr,Sr,Er,Nr;let xr=(wr=z((()=>br)),Sr=Reflect.metadata("design:type",void 0===br?Object:br),Nr=r((Er=class Feature{constructor(){this._id=void 0,this.type=void 0,this.key=void 0,this.variations=void 0,t(this,"configuration",Nr,this),this.settings=void 0,this.tags=void 0}}).prototype,"configuration",[wr,Sr],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Er);let Or=function(e){return e.string="String",e.boolean="Boolean",e.number="Number",e.json="JSON",e}({});var Cr,kr,_r,Tr;Cr=z((()=>xr)),kr=Reflect.metadata("design:type",Array),Tr=r((_r=class ConfigBody{constructor(){this.project=void 0,this.environment=void 0,t(this,"features",Tr,this),this.variables=void 0,this.audiences=void 0,this.variableHashes=void 0,this.listAudiences=void 0,this.debugUsers=void 0,this.sse=void 0,this.ably=void 0,this.clientSDKKey=void 0}}).prototype,"features",[Cr,kr],{configurable:!0,enumerable:!0,writable:!0,initializer:null});var Ar,Dr,Rr,Mr,Ir,jr,Pr,zr,Lr,Ur,Vr,Br,Fr,$r,Kr,Gr,Hr,qr,Qr,Wr,Jr,Zr,Yr,Xr,ea,ta,ia,na,ra,aa,oa,sa;Ar=C(),Dr=Reflect.metadata("design:type",String),Rr=O(),Mr=C(),Ir=Reflect.metadata("design:type",String),jr=O(),Pr=C(),zr=Reflect.metadata("design:type",String),Lr=C(),Ur=k(),Vr=Reflect.metadata("design:type",String),Br=A(),Fr=Reflect.metadata("design:type",Number),$r=A(),Kr=Reflect.metadata("design:type",Number),Gr=O(),Hr=A(),qr=Reflect.metadata("design:type",Number),Qr=k(),Wr=Reflect.metadata("design:type","undefined"==typeof Record?Object:Record),Jr=O(),Zr=Reflect.metadata("design:type","undefined"==typeof Record?Object:Record),Xr=r((Yr=class DVCPopulatedRequestEventDto{constructor(){t(this,"type",Xr,this),t(this,"target",ea,this),t(this,"customType",ta,this),t(this,"user_id",ia,this),t(this,"date",na,this),t(this,"clientDate",ra,this),t(this,"value",aa,this),t(this,"featureVars",oa,this),t(this,"metaData",sa,this)}}).prototype,"type",[Ar,Dr],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ea=r(Yr.prototype,"target",[Rr,Mr,Ir],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ta=r(Yr.prototype,"customType",[jr,Pr,zr],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ia=r(Yr.prototype,"user_id",[Lr,Ur,Vr],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),na=r(Yr.prototype,"date",[Br,Fr],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ra=r(Yr.prototype,"clientDate",[$r,Kr],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),aa=r(Yr.prototype,"value",[Gr,Hr,qr],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),oa=r(Yr.prototype,"featureVars",[Qr,Wr],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),sa=r(Yr.prototype,"metaData",[Jr,Zr],{configurable:!0,enumerable:!0,writable:!0,initializer:null});function ua(e,t,i,n){if("boolean"==typeof e)return Or.boolean;if("number"==typeof e)return Or.number;if("string"==typeof e)return Or.string;if("object"==typeof e)return Or.json;if(n)throw new Error(`The default value for variable ${t} is not of type Boolean, Number, String, or JSON`);return i.warn(`The default value for variable ${t} is not of type Boolean, Number, String, or JSON`),null}class UserError extends Error{constructor(e){super(e instanceof Error?e.message:e),this.name="UserError",e instanceof Error&&(this.stack=e.stack)}}const la={User:"dvc:user",AnonUserId:"dvc:anonymous_user_id",AnonymousConfig:"dvc:anonymous_config",IdentifiedConfig:"dvc:identified_config"};i(3097),i(2199),i(2652),i(2625);const ca=(e,t)=>{for(const n in e){const r=(i=e[n])instanceof Date?i.getTime():"object"==typeof i?JSON.stringify(i):i;null!=r&&t.append(n,r)}var i},fa=(e,t)=>{if(!da(t))throw new Error(`Missing parameter: ${e}`)},da=e=>null!=e,ha=(e,t,i)=>{if(!t)throw new Error(`Missing parameter: ${e}`);if(typeof t!==i)throw new Error(`${e} is not of type ${i}`)};function pa(){return"undefined"!=typeof self&&self.constructor&&"ServiceWorkerGlobalScope"===self.constructor.name}class DVCVariable{constructor(e){this.key=void 0,this.value=void 0,this.callback=void 0,this.defaultValue=void 0,this.isDefaulted=void 0,this.eval=void 0,this._feature=void 0;const{key:t,defaultValue:i}=e;ha("key",t,"string"),fa("defaultValue",i),this.key=t.toLowerCase(),void 0===e.value||null===e.value?(this.isDefaulted=!0,this.value=i):(this.value=e.value,this.isDefaulted=!1),this.defaultValue=e.defaultValue,this.eval=e.eval,this._feature=e._feature||null}onUpdate(e){return ha("callback",e,"function"),this.callback=e,this}}i(7031),i(4142),i(5875),i(5526),i(7960);var va=i(1564),ga=i.n(va);const ma={variableEvaluated:"variableEvaluated",variableDefaulted:"variableDefaulted"};class EventQueue{constructor(e,t,i){var n,r,a;this.sdkKey=void 0,this.options=void 0,this.client=void 0,this.eventQueue=void 0,this.aggregateEventMap=void 0,this.flushInterval=void 0,this.flushEventQueueSize=void 0,this.maxEventQueueSize=void 0,this.eventQueueBatchSize=100,this.sdkKey=e,this.client=t,this.eventQueue=[],this.aggregateEventMap={},this.options=i;const o="number"==typeof i.eventFlushIntervalMS?i.eventFlushIntervalMS:1e4;if(o<500)throw new Error(`eventFlushIntervalMS: ${o} must be larger than 500ms`);if(o>6e4)throw new Error(`eventFlushIntervalMS: ${o} must be smaller than 1 minute`);if(null!=(n=i.next)&&n.disableAutomaticEventFlush||(this.flushInterval=setInterval(this.flushEvents.bind(this),o)),this.flushEventQueueSize=null!=(r=null==i?void 0:i.flushEventQueueSize)?r:100,this.maxEventQueueSize=null!=(a=null==i?void 0:i.maxEventQueueSize)?a:1e3,this.flushEventQueueSize>=this.maxEventQueueSize)throw new Error(`flushEventQueueSize: ${this.flushEventQueueSize} must be smaller than maxEventQueueSize: ${this.maxEventQueueSize}`);if(this.flushEventQueueSize<10||this.flushEventQueueSize>1e3)throw new Error(`flushEventQueueSize: ${this.flushEventQueueSize} must be between 10 and 1000`);if(this.maxEventQueueSize<100||this.maxEventQueueSize>5e3)throw new Error(`maxEventQueueSize: ${this.maxEventQueueSize} must be between 100 and 5000`)}async flushEvents(){const e=this.client.user;if(!e)return void this.client.logger.warn("Skipping event flush, user has not been set yet.");const t=[...this.eventQueue],i=this.eventsFromAggregateEventMap();if(t.push(...i),!t.length)return;this.client.logger.info(`Flush ${t.length} Events`),this.eventQueue=[],this.aggregateEventMap={};const n=ga()(t,this.eventQueueBatchSize);for(const a of n)try{const t=await Ta(this.sdkKey,this.client.config,e,a,this.client.logger,this.options);201===t.status?this.client.logger.info(`DevCycle Flushed ${a.length} Events.`):t.status>=500||408===t.status?(this.client.logger.warn(`failed to flush events, retrying events. Response status: ${t.status}, message: ${t.statusText}`),this.eventQueue.push(...a)):this.client.logger.error(`failed to flush events, dropping events. Response status: ${t.status}, message: ${t.statusText}`)}catch(r){this.client.eventEmitter.emitError(r),this.client.logger.error(`failed to flush events due to error, dropping events. Error message: ${null==r?void 0:r.message}`)}}queueEvent(e){this.checkEventQueueSize()?this.client.logger.warn(`DevCycle: Max event queue size (${this.maxEventQueueSize}) reached, dropping event: ${e}`):this.eventQueue.push(e)}queueAggregateEvent(e){if(this.checkEventQueueSize())return void this.client.logger.warn(`DevCycle: Max event queue size (${this.maxEventQueueSize}) reached, dropping event: ${e}`);fa("type",e.type),fa("target",e.target),e.date=Date.now(),e.value=1;const t=this.aggregateEventMap[e.type];t?t[e.target]?t[e.target].value++:t[e.target]=e:this.aggregateEventMap[e.type]={[e.target]:e}}checkEventQueueSize(){const e=Object.values(this.aggregateEventMap).reduce(((e,t)=>e+Object.keys(t).length),0),t=this.eventQueue.length+e;return t>=this.flushEventQueueSize&&this.flushEvents(),t>=this.maxEventQueueSize}eventsFromAggregateEventMap(){return Object.values(this.aggregateEventMap).map((e=>Object.values(e))).flat()}async close(){clearInterval(this.flushInterval),await this.flushEvents()}}class DVCRequestEvent{constructor(e,t,i){var n;this.type=void 0,this.target=void 0,this.customType=void 0,this.user_id=void 0,this.clientDate=void 0,this.value=void 0,this.featureVars=void 0,this.metaData=void 0;const{type:r,target:a,date:o,value:s,metaData:u}=e;fa("type",r);const l=!(r in ma);if(this.type=l?"customEvent":r,this.customType=l?r:void 0,this.target=a,this.user_id=t,this.clientDate=o||Date.now(),this.value=s,i&&null!=(n=i.settings)&&n.filterFeatureVars&&("variableEvaluated"===r||"variableDefaulted"===r)&&a){const e=null==i?void 0:i.variables[a],t=null==e?void 0:e._feature;this.featureVars=t&&null!=i&&i.featureVariationMap[t]?{[t]:null==i?void 0:i.featureVariationMap[t]}:{}}else this.featureVars=(null==i?void 0:i.featureVariationMap)||{};this.metaData=u}}var ya=i(293),ba=i.n(ya);class ResponseError extends Error{constructor(e){super(e),this.status=void 0,this.name="ResponseError"}}const wa=e=>{const t=100*Math.pow(2,e);return t+.2*t*Math.random()},Sa=e=>(t,i,n)=>!(t>=e)&&!(n&&(null==n?void 0:n.status)<500);async function Ea(e){if(!e.ok&&e.status>=400){let i;try{const t=await e.clone().json();i=new ResponseError(t.message||"Something went wrong")}catch(t){i=new ResponseError("Something went wrong")}throw i.status=e.status,i}return e}async function Na(e,t,i){const n=new AbortController;try{const r=setTimeout((()=>{n.abort()}),i),a=await async function(e,t){const[i,n]=await xa(t),r=Object.assign({},n.headers,{"Content-Type":"application/json"}),a=await i(e,Object.assign({},n,{headers:r,method:"GET"}));return Ea(a)}(e,Object.assign({},t,{signal:n.signal}));return clearTimeout(r),a}catch(a){var r;throw null!=n&&null!=(r=n.signal)&&r.aborted?new Error("Network connection timed out."):a}}async function xa(e){if("retries"in e&&e.retries){const t=Object.assign({},e);return t.retryOn=Sa(e.retries),t.retryDelay=wa,[ba()(fetch),t]}return[fetch,e]}const Oa=".devcycle.com",Ca="https://sdk-api"+Oa,ka="https://events"+Oa,_a={retries:5,retryDelay:wa},Ta=async(e,t,i,n,r,a)=>{if(!e)throw new Error("Missing sdkKey to publish events to Events API");const o=function(e,t,i){return{events:i.map((i=>new DVCRequestEvent(i,t.user_id,e))),user:t}}(t,i,n);r.info(`Submit Events Payload: ${JSON.stringify(o)}`);let s=`${(null==a?void 0:a.apiProxyURL)||ka}/v1/events`;null!=a&&a.enableObfuscation&&(s+="?obfuscated=1");const u=await async function(e,t,i){const[n,r]=await xa(t),a=Object.assign({},r.headers,{Authorization:i,"Content-Type":"application/json"});return Ea(await n(e,Object.assign({},r,{headers:a,method:"POST"})))}(s,Object.assign({},_a,{body:JSON.stringify(o)}),e),l=await u.json();return u.status>=400?r.error(`Error posting events, status: ${u.status}, body: ${l}`):r.info(`Posted Events, status: ${u.status}, body: ${l}`),u},Aa=async(e,t,i,n)=>{if(!t)throw new Error("Missing sdkKey to save to Edge DB!");if(!e||!e.user_id)throw new Error("Missing user to save to Edge DB!");if(e.isAnonymous)throw new Error("Cannot save user data for an anonymous user!");try{return await async function(e,t,i){const[n,r]=await xa(t),a=Object.assign({},r.headers,{Authorization:i,"Content-Type":"application/json"});return Ea(await n(e,Object.assign({},r,{headers:a,method:"PATCH"})))}(`${(null==n?void 0:n.apiProxyURL)||Ca}/v1/edgedb/${encodeURIComponent(e.user_id)}`,Object.assign({},_a,{body:JSON.stringify(e)}),t)}catch(r){const e=r;return void(403===e.status?i.warn("Warning: EdgeDB feature is not enabled for this project"):e.status>=400?i.warn(`Error saving user entity, status: ${e.status}, body: ${e.message}`):i.info(`Saved user entity, status: ${e.status}, body: ${e.message}`))}};i(7766),i(4331);var Da,Ra=new Uint8Array(16);function Ma(){if(!Da&&!(Da="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Da(Ra)}const Ia=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const ja=function(e){return"string"==typeof e&&Ia.test(e)};for(var Pa=[],za=0;za<256;++za)Pa.push((za+256).toString(16).substr(1));const La=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(Pa[e[t+0]]+Pa[e[t+1]]+Pa[e[t+2]]+Pa[e[t+3]]+"-"+Pa[e[t+4]]+Pa[e[t+5]]+"-"+Pa[e[t+6]]+Pa[e[t+7]]+"-"+Pa[e[t+8]]+Pa[e[t+9]]+"-"+Pa[e[t+10]]+Pa[e[t+11]]+Pa[e[t+12]]+Pa[e[t+13]]+Pa[e[t+14]]+Pa[e[t+15]]).toLowerCase();if(!ja(i))throw TypeError("Stringified UUID is invalid");return i};const Ua=function(e,t,i){var n=(e=e||{}).random||(e.rng||Ma)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){i=i||0;for(var r=0;r<16;++r)t[i+r]=n[r];return t}return La(n)},Va="1.47.8";var Ba=i(6879),Fa=i.n(Ba);class DVCPopulatedUser{generateAndSaveAnonUserId(e,t){const i=e||Ua();return!e&&t&&t.saveAnonUserId(i),i}constructor(e,t,i,n,r,a){this.isAnonymous=void 0,this.user_id=void 0,this.email=void 0,this.name=void 0,this.language=void 0,this.country=void 0,this.appVersion=void 0,this.appBuild=void 0,this.customData=void 0,this.privateCustomData=void 0,this.lastSeenDate=void 0,this.createdDate=void 0,this.platform=void 0,this.platformVersion=void 0,this.deviceModel=void 0,this.sdkType=void 0,this.sdkVersion=void 0,this.sdkPlatform=void 0;const o=""===e.user_id?void 0:e.user_id;if(!1===e.isAnonymous&&!o)throw new Error("A User cannot be created with isAnonymous: false without a valid user_id");o?(this.user_id=o,this.isAnonymous=!1):(this.user_id=this.generateAndSaveAnonUserId(n,a),this.isAnonymous=!0),this.email=e.email,this.name=e.name,this.language=e.language,this.country=e.country,this.appVersion=e.appVersion,this.appBuild=e.appBuild,this.customData=e.customData,this.privateCustomData=e.privateCustomData,this.lastSeenDate=new Date;const s="undefined"!=typeof window?window.navigator.userAgent:r;if(i)Object.assign(this,i);else{const e=new(Fa())(s),i=e.getBrowser().name&&`${e.getBrowser().name} ${e.getBrowser().version}`;this.createdDate=new Date,this.platform=null!=t&&t.reactNative?"ReactNative":"web",this.platformVersion=null!=i?i:"unknown",this.deviceModel=null!=t&&t.reactNative&&globalThis.DeviceInfo?globalThis.DeviceInfo.getModel():null!=s?s:"SSR - unknown",this.sdkType="client",this.sdkVersion=Va,this.sdkPlatform=null==t?void 0:t.sdkPlatform}}getStaticData(){return{createdDate:this.createdDate,platform:this.platform,platformVersion:this.platformVersion,deviceModel:this.deviceModel,sdkType:this.sdkType,sdkVersion:this.sdkVersion,sdkPlatform:this.sdkPlatform}}updateUser(e,t){if(this.user_id!==e.user_id)throw new Error("Cannot update a user with a different user_id");return new DVCPopulatedUser(e,t,this.getStaticData())}}const $a=class CacheStore{constructor(e,t,i=2592e6){this.store=void 0,this.logger=void 0,this.configCacheTTL=void 0,this.store=e,this.logger=t,this.configCacheTTL=i}getConfigKey(e){return e.isAnonymous?`${la.AnonymousConfig}.${e.user_id}`:`${la.IdentifiedConfig}.${e.user_id}`}getConfigExpiryKey(e){return`${this.getConfigKey(e)}.expiry_date`}async loadConfigExpiryDate(e){const t=this.getConfigExpiryKey(e),i=await this.store.load(t)||"0";return parseInt(i,10)}async saveConfig(e,t){var i;const n=this.getConfigKey(t),r=this.getConfigExpiryKey(t),a=Date.now()+this.configCacheTTL;await Promise.all([this.store.save(n,e),this.store.save(r,a)]),null==(i=this.logger)||i.info(`Successfully saved config for user ${t.user_id} to local storage`)}isBucketedUserConfig(e){return!(!e||"object"!=typeof e)&&("features"in e&&"project"in e&&"environment"in e&&"featureVariationMap"in e&&"variableVariationMap"in e&&"variables"in e)}async loadConfig(e){await this.migrateLegacyConfigs(),await this.cleanupExpiredConfigs();const t=this.getConfigKey(e),i=await this.store.load(t);var n,r;if(!i)return null==(n=this.logger)||n.debug("Skipping cached config: no config found"),null;if(!this.isBucketedUserConfig(i))return null==(r=this.logger)||r.debug(`Skipping cached config: invalid config found: ${JSON.stringify(i)}`),null;const a=await this.loadConfigExpiryDate(e);if(Date.now()>a){var o;null==(o=this.logger)||o.debug("Skipping cached config: config has expired");const i=this.getConfigExpiryKey(e);return await Promise.all([this.store.remove(t),this.store.remove(i)]),null}return i}async saveAnonUserId(e){var t;await this.store.save(la.AnonUserId,e),null==(t=this.logger)||t.info("Successfully saved anonymous user id to local storage")}async loadAnonUserId(){return await this.store.load(la.AnonUserId)}async removeAnonUserId(){const e=await this.loadAnonUserId();if(e){const t=`${la.AnonymousConfig}.${e}`,i=`${t}.expiry_date`;await Promise.all([this.store.remove(t),this.store.remove(i)])}await this.store.remove(la.AnonUserId)}async migrateLegacyConfigs(){await Promise.all([this.migrateLegacyConfigType(la.AnonymousConfig,!0),this.migrateLegacyConfigType(la.IdentifiedConfig,!1)])}async migrateLegacyConfigType(e,t){try{var i;const n=await this.store.load(e);if(!n||!this.isBucketedUserConfig(n))return;const r=`${e}.user_id`,a=await this.store.load(r);if(!a)return;const o=new DVCPopulatedUser({user_id:a,isAnonymous:t},{}),s=`${e}.fetch_date`,u=this.getConfigKey(o);if(await this.store.load(u))return void(await Promise.all([this.store.remove(e),this.store.remove(r),this.store.remove(s),this.store.remove(la.User)]));null==(i=this.logger)||i.debug(`Migrating legacy ${t?"anonymous":"identified"} config for user ${a} to new format`),await this.saveConfig(n,o),await Promise.all([this.store.remove(e),this.store.remove(r),this.store.remove(s),this.store.remove(la.User)])}catch(r){var n;null==(n=this.logger)||n.debug(`Failed to migrate legacy config from ${e}: ${r}`)}}async cleanupExpiredConfigs(){var e;if(this.store.listKeys)try{const e=Date.now(),n=[la.AnonymousConfig,la.IdentifiedConfig];for(const r of n){const n=await this.store.listKeys(r);for(const r of n){if(r.endsWith(".expiry_date"))continue;const n=`${r}.expiry_date`,a=await this.store.load(n);if(a){var t;if(e>parseInt(a,10))null==(t=this.logger)||t.debug(`Cleaning up expired config: ${r}`),await Promise.all([this.store.remove(r),this.store.remove(n)])}else{var i;null==(i=this.logger)||i.debug(`Cleaning up orphaned config: ${r}`),await this.store.remove(r)}}}}catch(r){var n;null==(n=this.logger)||n.debug(`Failed to cleanup expired configs: ${r}`)}else null==(e=this.logger)||e.debug("Storage does not support key enumeration, skipping cleanup")}};class StorageStrategy{constructor(){this.store=void 0}}class LocalStorageStrategy extends StorageStrategy{constructor(e=!1){super(),this.store=void 0,this.isTesting=void 0,this.isTesting=e,this.init()}async init(){this.store=this.isTesting?Ka:window.localStorage}async save(e,t){this.store.setItem(e,JSON.stringify(t))}async load(e){const t=this.store.getItem(e);return t?JSON.parse(t):void 0}async remove(e){this.store.removeItem(e)}async listKeys(e){const t=[];for(let i=0;inull,setItem:()=>{},removeItem:()=>{},clear:()=>{},key:()=>null,length:0};class IndexedDBStrategy extends StorageStrategy{constructor(){super(),this.store=void 0,this.isReady=void 0,this.connectionPromise=void 0,this.connectionPromise=new Promise(((e,t)=>{this.init().then((t=>{this.store=t,this.isReady=!0,e()})).catch((e=>t(e)))}))}async init(){return new Promise(((e,t)=>{const i=indexedDB.open(IndexedDBStrategy.DBName,1);i.onupgradeneeded=e=>{const t=i.result;t.objectStoreNames.contains(IndexedDBStrategy.storeName)||t.createObjectStore(IndexedDBStrategy.storeName,{keyPath:"id"})},i.onsuccess=t=>{e(i.result)},i.onerror=e=>{t(i.error)}}))}async save(e,t){await this.connectionPromise;this.store.transaction(IndexedDBStrategy.storeName,"readwrite").objectStore(IndexedDBStrategy.storeName).put({id:e,data:t})}async load(e){await this.connectionPromise;const t=this.store.transaction(IndexedDBStrategy.storeName,"readonly").objectStore(IndexedDBStrategy.storeName).get(e);return new Promise(((e,i)=>{t.onsuccess=()=>{e(t.result?t.result.data:void 0)},t.onerror=()=>i(t.error)}))}async remove(e){await this.connectionPromise;this.store.transaction(IndexedDBStrategy.storeName,"readwrite").objectStore(IndexedDBStrategy.storeName).delete(e)}async listKeys(e){const t=[];await this.connectionPromise;const i=this.store.transaction(IndexedDBStrategy.storeName,"readonly").objectStore(IndexedDBStrategy.storeName).openCursor();return new Promise(((n,r)=>{i.onsuccess=i=>{const r=i.target.result;if(r){const i=r.key;i.startsWith(e)&&t.push(i),r.continue()}else n(t)},i.onerror=()=>r(i.error)}))}}IndexedDBStrategy.storeName="DevCycleStore",IndexedDBStrategy.DBName="DevCycleDB";const Ga={INITIALIZED:"initialized",NEW_VARIABLES:"newVariables",ERROR:"error",VARIABLE_UPDATED:"variableUpdated",FEATURE_UPDATED:"featureUpdated",CONFIG_UPDATED:"configUpdated",VARIABLE_EVALUATED:"variableEvaluated",DEBUG_USER_SET:"debugUserSet",DEBUG_USER_REVERTED:"debugUserReverted"},Ha=e=>!(Object.values(Ga).includes(e)||e.startsWith(Ga.VARIABLE_UPDATED)||e.startsWith(Ga.FEATURE_UPDATED)||e.startsWith(Ga.NEW_VARIABLES)||e.startsWith(Ga.VARIABLE_EVALUATED));class EventEmitter{constructor(){this.handlers=void 0,this.handlers={}}subscribe(e,t){if(ha("key",e,"string"),ha("handler",t,"function"),Ha(e))throw new Error("Not a valid event to subscribe to");this.handlers[e]?this.handlers[e].push(t):this.handlers[e]=[t]}unsubscribe(e,t){if(ha("key",e,"string"),!Ha(e))if(t){const i=this.handlers[e].findIndex((e=>e===t));this.handlers[e].splice(i,1)}else this.handlers[e]=[]}emit(e,...t){var i;ha("key",e,"string"),null==(i=this.handlers[e])||i.forEach((e=>{new Promise((i=>{e(...t),i(!0)}))}))}emitDebugUserSet(e){this.emit(Ga.DEBUG_USER_SET,e)}emitDebugUserReverted(e){this.emit(Ga.DEBUG_USER_REVERTED,e)}emitInitialized(e){this.emit(Ga.INITIALIZED,e)}emitError(e){this.emit(Ga.ERROR,e)}emitConfigUpdate(e){this.emit(Ga.CONFIG_UPDATED,e)}emitVariableEvaluated(e){this.emit(`${Ga.VARIABLE_EVALUATED}:*`,e.key,e),this.emit(`${Ga.VARIABLE_EVALUATED}:${e.key}`,e.key,e)}emitVariableUpdates(e,t,i){const n=new Set(Object.keys(e).concat(Object.keys(t)));let r=!1;n.forEach((n=>{const a=e[n]&&e[n].value,o=t[n],s=o&&t[n].value;if(JSON.stringify(a)!==JSON.stringify(s)){const e=i[n]&&Object.values(i[n]);e&&(r=!0,e.forEach((e=>{var t;e.value=null!=s?s:e.defaultValue,e.isDefaulted=null==s,null==(t=e.callback)||t.call(e,e.value)})));const t=o||null;this.emit(`${Ga.VARIABLE_UPDATED}:*`,n,t),this.emit(`${Ga.VARIABLE_UPDATED}:${n}`,n,t)}})),r&&this.emit(`${Ga.NEW_VARIABLES}`)}emitFeatureUpdates(e,t){Object.keys(e).concat(Object.keys(t)).forEach((i=>{const n=e[i]&&e[i]._variation,r=t[i],a=r||null;n!==(r&&t[i]._variation)&&(this.emit(`${Ga.FEATURE_UPDATED}:*`,i,a),this.emit(`${Ga.FEATURE_UPDATED}:${i}`,i,a))}))}}i(8509);class ConfigRequestConsolidator{constructor(e,t,i){this.requestConfigFunction=e,this.handleConfigReceivedFunction=t,this.nextUser=i,this.currentPromise=void 0,this.resolvers=[],this.requestParams=null}async queue(e,t){e&&(this.nextUser=e),t&&(this.requestParams=t);const i=new Promise(((e,t)=>{this.resolvers.push({resolve:e,reject:t})}));return this.currentPromise||this.processQueue(),i}async processQueue(){if(!this.resolvers.length)return;const e=this.resolvers.splice(0);await this.performRequest(this.nextUser).then((t=>{this.resolvers.length?this.resolvers.push(...e):(this.handleConfigReceivedFunction(t,this.nextUser),e.forEach((({resolve:e})=>e(t))))})).catch((t=>{e.forEach((({reject:e})=>e(t)))})),this.resolvers.length&&this.processQueue()}async performRequest(e){this.currentPromise=this.requestConfigFunction(e,this.requestParams?this.requestParams:void 0),this.requestParams=null;return await this.currentPromise.finally((()=>{this.currentPromise=null}))}}const qa="[DevCycle]: ";let Qa=function(e){return e[e.debug=0]="debug",e[e.info=1]="info",e[e.warn=2]="warn",e[e.error=3]="error",e}({});function Wa(e){const t=null!=e&&e.level&&U()(Qa[null==e?void 0:e.level])?Qa[null==e?void 0:e.level]:Qa.error,i=(null==e?void 0:e.logWriter)||console.log,n=(null==e?void 0:e.logWriter)||console.error,r=e=>i(qa+e),a=e=>{};return{error:Qa.error>=t?(e,t)=>n(qa+e,t):a,warn:Qa.warn>=t?r:a,info:Qa.info>=t?r:a,debug:Qa.debug>=t?r:a}}class StreamingConnection{constructor(e,t,i){this.url=e,this.onMessage=t,this.logger=i,this.connection=void 0,this.openConnection()}updateURL(e){this.close(),this.url=e,this.openConnection()}openConnection(){"undefined"!=typeof EventSource?(this.connection=new EventSource(this.url,{withCredentials:!0}),this.connection.onmessage=e=>{this.onMessage(e.data)},this.connection.onerror=()=>{this.logger.warn("StreamingConnection warning. Connection failed to establish.")},this.connection.onopen=()=>{this.logger.debug("StreamingConnection opened")}):this.logger.warn("StreamingConnection not opened. EventSource is not available.")}isConnected(){var e,t;return(null==(e=this.connection)?void 0:e.readyState)===(null==(t=this.connection)?void 0:t.OPEN)}reopen(){this.isConnected()||(this.close(),this.openConnection())}close(){var e;null==(e=this.connection)||e.close()}}i(5596);class HookContext{constructor(e,t,i,n,r){this.user=e,this.variableKey=t,this.defaultValue=i,this.metadata=n,this.evaluationContext=r}}class EvalHooksRunner{constructor(e=[],t){this.hooks=e,this.logger=t}runHooksForEvaluation(e,t,i,n){const r=new HookContext(null!=e?e:{},t,i,{}),a=[...this.hooks],o=[...a].reverse();let s;try{const e=Object.freeze(Object.assign({},r));this.runBefore(a,e),s=n.call(e);const i={key:t,value:s.value,isDefaulted:s.isDefaulted,eval:s.eval};r.evaluationContext=i,this.runAfter(o,r)}catch(u){throw this.runError(o,r,u),this.runFinally(o,r),u}return this.runFinally(o,r),s}runBefore(e,t){for(const i of e)i.before(t)}runAfter(e,t){for(const i of e)i.after(t)}runFinally(e,t){try{for(const i of e)i.onFinally(t)}catch(n){var i;null==(i=this.logger)||i.error("Error running before hooks",n)}}runError(e,t,i){try{for(const n of e)n.error(t,i)}catch(i){var n;null==(n=this.logger)||n.error("Error running error hooks",i)}}enqueue(e){this.hooks.push(e)}clear(){this.hooks=[]}}class DevCycleClient{get isInitialized(){return this._isInitialized}constructor(e,t,i={}){var n,r=this;if(this.logger=void 0,this.config=void 0,this.user=void 0,this._isInitialized=!1,this.sdkKey=void 0,this.options=void 0,this.onInitialized=void 0,this.settleOnInitialized=void 0,this.userSaved=!1,this._closing=!1,this.isConfigCached=!1,this.initializeTriggered=!1,this.variableDefaultMap=void 0,this.store=void 0,this.eventQueue=void 0,this.requestConsolidator=void 0,this.eventEmitter=void 0,this.streamingConnection=void 0,this.pageVisibilityHandler=void 0,this.inactivityHandlerId=void 0,this.windowMessageHandler=void 0,this.windowPageHideHandler=void 0,this.configRefetchHandler=void 0,this.evalHooksRunner=void 0,this.clientInitialization=async function(e){if(r.initializeTriggered||r._closing)return r;r.initializeTriggered=!0;const t=e.user_id?void 0:await r.store.loadAnonUserId();r.user=new DVCPopulatedUser(e,r.options,void 0,t,void 0,r.store),r.options.bootstrapConfig||await r.getConfigCache(r.user),r.requestConsolidator=new ConfigRequestConsolidator(((e,t)=>(async(e,t,i,n,r)=>{const a=new URLSearchParams({sdkKey:e});ca(t,a),null!=n&&n.enableEdgeDB&&a.append("enableEdgeDB",n.enableEdgeDB.toString()),null!=r&&r.sse&&(a.append("sse","1"),r.lastModified&&a.append("sseLastModified",r.lastModified.toString()),r.etag&&a.append("sseEtag",r.etag)),null!=n&&n.enableObfuscation&&a.append("obfuscated","1");const o=`${(null==n?void 0:n.apiProxyURL)||Ca}/v1/sdkConfig?`+a.toString();try{const e=await Na(o,_a,5e3);return await e.json()}catch(s){if(i.error(`Request to get config failed for url: ${o}, response message: ${s}`),s instanceof ResponseError){if(401===s.status||403===s.status)throw new UserError(`Invalid SDK Key. Error details: ${s.message}`);throw new Error(`Failed to download DevCycle config. Error details: ${s.message}`)}throw new Error(`Failed to download DevCycle config. Error details: ${s}`)}})(r.sdkKey,e,r.logger,r.options,t)),((e,t)=>r.handleConfigReceived(e,t)),r.user);try{r.options.bootstrapConfig?r.handleConfigReceived(r.options.bootstrapConfig,r.user):await r.requestConsolidator.queue(r.user),r._isInitialized=!0,r.settleOnInitialized(r),r.logger.info("Client initialized")}catch(i){return r.initializeOnConfigFailure(r.user,i),r}return r.eventEmitter.emitInitialized(!0),r},this.initializeOnConfigFailure=(e,t)=>{this.isInitialized||(this.eventEmitter.emitInitialized(!1),t&&this.eventEmitter.emitError(t),this.setUser(e),this.settleOnInitialized(this,t instanceof UserError?t:null))},i.sdkPlatform||(i.sdkPlatform="js"),null!=(n=i.next)&&n.configRefreshHandler&&(this.configRefetchHandler=i.next.configRefreshHandler),this.logger=i.logger||Wa({level:i.logLevel}),this.store=new $a(i.storage||(pa()?new IndexedDBStrategy:new LocalStorageStrategy("undefined"==typeof window)),this.logger,i.configCacheTTL),this.options=i,this.sdkKey=e,this.variableDefaultMap={},this.evalHooksRunner=new EvalHooksRunner(i.hooks),this.options.disableAutomaticEventLogging&&this.options.disableCustomEventLogging||(this.eventQueue=new EventQueue(e,this,i)),this.eventEmitter=new EventEmitter,this.options.disableRealtimeUpdates||this.registerVisibilityChangeHandler(),this.onInitialized=new Promise(((e,t)=>{this.settleOnInitialized=(i,n)=>{n?(this._isInitialized=!1,t(n)):(this._isInitialized=!0,e(i))}})),this.options.deferInitialization){if(this.options.bootstrapConfig)throw new Error("bootstrapConfig option can not be combined with deferred initialization!")}else{if(!t)throw new Error("User must be provided to initialize SDK");this.clientInitialization(t)}null!=i&&i.reactNative||"undefined"==typeof window||(this.windowMessageHandler=e=>{const t=e.data;"DVC.optIn.saved"===(null==t?void 0:t.type)&&this.refetchConfig(!1)},window.addEventListener("message",this.windowMessageHandler),this.windowPageHideHandler=()=>{this.flushEvents()},window.addEventListener("pagehide",this.windowPageHideHandler))}onClientInitialized(e){if(!e||"function"!=typeof e)return this.onInitialized;this.onInitialized.then((()=>e(null,this))).catch((t=>e(t)))}variable(e,t){return this.evalHooksRunner.runHooksForEvaluation(this.user,e,t,(()=>this._variable(e,t)))}_variable(e,t){if(null==t)throw new Error("Default value is a required param");const i=ua(t,e,this.logger,!0),n="string"==typeof t?t:JSON.stringify(t);let r;if(this.variableDefaultMap[e]&&this.variableDefaultMap[e][n])r=this.variableDefaultMap[e][n];else{var a;const o=null==(a=this.config)||null==(a=a.variables)?void 0:a[e],s={key:e,defaultValue:t};o?o.type===i?(s.value=o.value,s._feature=o._feature,s.eval=o.eval):(this.logger.warn(`Type mismatch for variable ${e}. Expected ${i}, got ${o.type}`),s.eval={reason:ln.DEFAULT,details:cn.TYPE_MISMATCH}):s.eval={reason:ln.DEFAULT,details:cn.USER_NOT_TARGETED},r=new DVCVariable(s),this.variableDefaultMap[e]=Object.assign({[n]:r},this.variableDefaultMap[e])}return this.trackVariableEvaluated(r),this.eventEmitter.emitVariableEvaluated(r),r}trackVariableEvaluated(e){if(!this.options.disableAutomaticEventLogging)try{var t,i;const n=null==(t=this.config)||null==(t=t.variables)?void 0:t[e.key];null==(i=this.eventQueue)||i.queueAggregateEvent({type:e.isDefaulted?ma.variableDefaulted:ma.variableEvaluated,target:e.key,metaData:{value:e.value,type:ua(e.defaultValue,e.key,this.logger),_variable:null==n?void 0:n._id,eval:e.eval}})}catch(n){this.eventEmitter.emitError(n),this.logger.warn(`Error with queueing aggregate events ${n}`)}}variableValue(e,t){return this.variable(e,t).value}identifyUser(e,t){if(this.options.next)return void this.logger.error("Unable to change user identity from the clientside in Next.js");const i=this._identifyUser(e);if(!t||"function"!=typeof t)return i;i.then((e=>t(null,e))).catch((e=>t(e,null)))}async _identifyUser(e){var t;let i;var n;if(this.options.deferInitialization&&!this.initializeTriggered)return await this.clientInitialization(e),(null==(n=this.config)?void 0:n.variables)||{};null==(t=this.eventQueue)||t.flushEvents();try{await this.onInitialized;const t=await this.store.loadAnonUserId();i=this.user&&e.user_id===this.user.user_id?this.user.updateUser(e,this.options):new DVCPopulatedUser(e,this.options,void 0,t,void 0,this.store);const n=await this.requestConsolidator.queue(i);if(n)return n.variables;throw this.logger.error("Config fetch returned no config"),new Error("Failed to fetch user configuration")}catch(r){if(i)try{const e=await this.store.loadConfig(i);if(e)return this.logger.warn("Config fetch failed, using cached user config"),this.handleConfigReceived(e,i),e.variables||{};this.logger.debug("Config fetch failed and no cached config available")}catch(a){this.logger.error("Failed to load cached config",a)}throw this.eventEmitter.emitError(r),r}}resetUser(e){var t=this;if(this.options.next)return void this.logger.error("Unable to change user identity from the clientside in Next.js");const i=new Promise(((e,i)=>{var n;null==(n=this.eventQueue)||n.flushEvents(),this.onInitialized.then((async function(){const e=await t.store.loadAnonUserId();await t.store.removeAnonUserId();const i=new DVCPopulatedUser({isAnonymous:!0},t.options,void 0,void 0,void 0,t.store);try{const e=await t.requestConsolidator.queue(i);if(!e)throw t.logger.error("Config fetch returned no config"),new Error("Failed to fetch user configuration");return e}catch(n){throw e?await t.store.saveAnonUserId(e):await t.store.removeAnonUserId(),n}})).then((async function(t){e(t.variables)})).catch((async function(e){t.eventEmitter.emitError(e),i(e)}))}));if(!e||"function"!=typeof e)return i;i.then((t=>e(null,t))).catch((t=>e(t,null)))}allFeatures(){var e;return(null==(e=this.config)?void 0:e.features)||{}}allVariables(){var e;return(null==(e=this.config)?void 0:e.variables)||{}}subscribe(e,t){this.eventEmitter.subscribe(e,t)}unsubscribe(e,t){this.eventEmitter.unsubscribe(e,t)}track(e){this._closing?this.logger.error("Client is closing, cannot track new events."):this.options.disableCustomEventLogging||(fa("type",e.type),this.onInitialized.then((()=>{var t;null==(t=this.eventQueue)||t.queueEvent(e)})))}flushEvents(e){var t,i;return null!=(t=null==(i=this.eventQueue)?void 0:i.flushEvents().then((()=>null==e?void 0:e())))?t:Promise.resolve().then((()=>null==e?void 0:e()))}async close(){var e,t;this.logger.debug("Closing client"),this._closing=!0,void 0!==typeof document&&this.pageVisibilityHandler&&document.removeEventListener("visibilitychange",this.pageVisibilityHandler),this.windowMessageHandler&&window.removeEventListener("message",this.windowMessageHandler),this.windowPageHideHandler&&window.removeEventListener("pagehide",this.windowPageHideHandler),null==(e=this.streamingConnection)||e.close(),await(null==(t=this.eventQueue)?void 0:t.close())}get closing(){return this._closing}synchronizeBootstrapData(e,t,i){const n=new DVCPopulatedUser(t,this.options,void 0,void 0,i,this.store);e?(this.options.bootstrapConfig=e,!this.options.deferInitialization||this.initializeTriggered?this.handleConfigReceived(e,n):this.clientInitialization(t)):this.initializeOnConfigFailure(n)}async refetchConfig(e,t,i){await this.onInitialized,this.configRefetchHandler?this.configRefetchHandler(t):await this.requestConsolidator.queue(null,{sse:e,lastModified:t,etag:i})}addHook(e){this.evalHooksRunner.enqueue(e)}clearHooks(){this.evalHooksRunner.clear()}handleConfigReceived(e,t){var i,n;if(!e)return;const r=this.config;this.config=e,this.store.saveConfig(e,t),this.isConfigCached=!1,this.setUser(t);const a=(null==r?void 0:r.features)||{},o=(null==r?void 0:r.variables)||{};this.eventEmitter.emitFeatureUpdates(a,e.features),this.eventEmitter.emitVariableUpdates(o,e.variables,this.variableDefaultMap);const s=null==(i=this.config)||null==(i=i.sse)||null==(i=i.url)?void 0:i.includes("dvc_user");var u;if(r&&!s&&r.etag===this.config.etag||this.eventEmitter.emitConfigUpdate(e.variables),null!=e&&null!=(n=e.sse)&&n.url)if(this.streamingConnection)e.sse.url!==(null==r||null==(u=r.sse)?void 0:u.url)&&this.streamingConnection.updateURL(e.sse.url);else if(this.options.disableRealtimeUpdates)this.logger.info("Disabling Realtime Updates based on Initialization parameter");else{const t=this.options.sseConnectionClass||StreamingConnection;this.streamingConnection=new t(e.sse.url,this.onSSEMessage.bind(this),this.logger)}}async setUser(e){if(this.user!=e||!this.userSaved){var t;if(this.user=e,!this.user.isAnonymous&&Ja(this.logger,this.config,null==(t=this.options)?void 0:t.enableEdgeDB,!0)){const e=await Aa(this.user,this.sdkKey,this.logger,this.options);this.logger.info(`Saved response entity! ${e}`)}this.userSaved=!0}}onSSEMessage(e){try{const n=JSON.parse(e),r=JSON.parse(n.data);if(!r)return;var t,i;if(!r.type||"refetchConfig"===r.type)null!=(t=this.config)&&t.etag&&r.etag===(null==(i=this.config)?void 0:i.etag)||this.refetchConfig(!0,r.lastModified,r.etag).catch((e=>{this.logger.warn(`Failed to refetch config ${e}`)}))}catch(n){this.logger.warn(`Streaming Connection: Unparseable message ${n}`)}}registerVisibilityChangeHandler(){var e;if("undefined"==typeof document)return;const t=(null==(e=this.config)||null==(e=e.sse)?void 0:e.inactivityDelay)||12e4;this.pageVisibilityHandler=()=>{var e;if(null!=(e=this.config)&&e.sse)if("visible"===document.visibilityState){var i,n,r;if(null==(i=this.streamingConnection)||!i.isConnected())this.logger.debug("Page became visible, refetching config"),this.refetchConfig(!1).catch((e=>{this.logger.warn(`Failed to refetch config ${e}`)})),null==(r=this.streamingConnection)||r.reopen();null==(n=window)||n.clearTimeout(this.inactivityHandlerId)}else{var a,o;null==(a=window)||a.clearTimeout(this.inactivityHandlerId),this.inactivityHandlerId=null==(o=window)?void 0:o.setTimeout((()=>{var e;this.logger.debug("Page is not visible, closing streaming connection"),null==(e=this.streamingConnection)||e.close()}),t)}},null==document.addEventListener||document.addEventListener("visibilitychange",this.pageVisibilityHandler)}async getConfigCache(e){if(this.options.disableConfigCache)return void this.logger.info("Skipping config cache");const t=await this.store.loadConfig(e);t&&(this.config=t,this.isConfigCached=!0,this.eventEmitter.emitFeatureUpdates({},t.features),this.eventEmitter.emitVariableUpdates({},t.variables,this.variableDefaultMap),this.logger.debug("Initialized with a cached config"))}}const Ja=(e,t,i,n=!1)=>{var r;return null!=t&&null!=(r=t.project)&&null!=(r=r.settings)&&null!=(r=r.edgeDB)&&r.enabled?!!i:(i&&n&&e.warn("EdgeDB is not enabled for this project. Only using local user data."),!1)},Za=(e,t={})=>{let i;if(e&&"deferInitialization"in e){if(e.deferInitialization)return{user:void 0,options:e,isDeferred:!0}}else i=e;if(!i)throw new Error("Missing user! Call initialize with a valid user");return{user:i,options:t,isDeferred:!1}};function Ya(e,t,i={}){if(!e)throw new UserError("Missing SDK key! Call initialize with a valid SDK key");if(!(e.startsWith("client")||e.startsWith("dvc_client")||null!=i&&i.next))throw new UserError("Invalid SDK key provided. Please call initialize with a valid client SDK key");const n=Za(t,i),{options:r}=n,a=pa();if(!("undefined"==typeof window||window.addEventListener||a||null!=r&&r.reactNative))throw new Error("Window is not defined, try initializing in a browser context. If running on React Native, initialize with the option reactNative: true");if(null!=r&&r.reactNative&&!globalThis.DeviceInfo)throw new Error("DeviceInfo is not defined. Import react-native-device-info and set global.DeviceInfo when running on React Native");if(!r||null===r)throw new Error("Invalid options! Call initialize with valid options");let o;return o=n.isDeferred?new DevCycleClient(e,void 0,n.options):new DevCycleClient(e,n.user,n.options),o.onClientInitialized().then((()=>o.logger.info("Successfully initialized DevCycle!"))).catch((e=>o.logger.error(`Error initializing DevCycle: ${e}`))),o}const Xa=Ya})(),n})())); //# sourceMappingURL=devcycle.min.js.map