UNPKG

configcat-js-ssr

Version:

ConfigCat Feature Flags for Server Side Rendered apps like NuxtJS. Official ConfigCat SDK for Server Side Rendered to easily access feature flags.

1 lines 161 kB
var configcat;(()=>{"use strict";var e={34:(e,t,n)=>{var r=n(4901);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},67:(e,t,n)=>{n(7145)},81:(e,t,n)=>{var r=n(9565),o=n(9306),i=n(8551),s=n(6823),a=n(851),u=TypeError;e.exports=function(e,t){var n=arguments.length<2?a(e):t;if(o(n))return i(r(n,e));throw new u(s(e)+" is not iterable")}},280:(e,t,n)=>{var r=n(6518),o=n(7751),i=n(6395),s=n(550),a=n(916).CONSTRUCTOR,u=n(3438),c=o("Promise"),l=i&&!a;r({target:"Promise",stat:!0,forced:i||a},{resolve:function(e){return u(l&&this===c?s:this,e)}})},283:(e,t,n)=>{var r=n(9504),o=n(9039),i=n(4901),s=n(9297),a=n(3724),u=n(350).CONFIGURABLE,c=n(3706),l=n(1181),f=l.enforce,h=l.get,p=String,d=Object.defineProperty,g=r("".slice),v=r("".replace),y=r([].join),m=a&&!o((function(){return 8!==d((function(){}),"length",{value:8}).length})),b=String(String).split("String"),O=e.exports=function(e,t,n){"Symbol("===g(p(t),0,7)&&(t="["+v(p(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!s(e,"name")||u&&e.name!==t)&&(a?d(e,"name",{value:t,configurable:!0}):e.name=t),m&&n&&s(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=f(e);return s(r,"source")||(r.source=y(b,"string"==typeof t?t:"")),e};Function.prototype.toString=O((function(){return i(this)&&h(this).source||c(this)}),"toString")},350:(e,t,n)=>{var r=n(3724),o=n(9297),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),u=a&&"something"===function(){}.name,c=a&&(!r||r&&s(i,"name").configurable);e.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},397:(e,t,n)=>{var r=n(7751);e.exports=r("document","documentElement")},421:e=>{e.exports={}},436:(e,t,n)=>{var r,o,i,s=n(6518),a=n(6395),u=n(8574),c=n(4576),l=n(9565),f=n(6840),h=n(2967),p=n(687),d=n(7633),g=n(9306),v=n(4901),y=n(34),m=n(679),b=n(2293),O=n(9225).set,E=n(1955),S=n(3138),w=n(1103),T=n(8265),A=n(1181),C=n(550),N=n(916),x=n(6043),R="Promise",I=N.CONSTRUCTOR,L=N.REJECTION_EVENT,P=N.SUBCLASSING,k=A.getterFor(R),U=A.set,j=C&&C.prototype,F=C,D=j,M=c.TypeError,q=c.document,V=c.process,_=x.f,B=_,W=!!(q&&q.createEvent&&c.dispatchEvent),z="unhandledrejection",K=function(e){var t;return!(!y(e)||!v(t=e.then))&&t},H=function(e,t){var n,r,o,i=t.value,s=1===t.state,a=s?e.ok:e.fail,u=e.resolve,c=e.reject,f=e.domain;try{a?(s||(2===t.rejection&&X(t),t.rejection=1),!0===a?n=i:(f&&f.enter(),n=a(i),f&&(f.exit(),o=!0)),n===e.promise?c(new M("Promise-chain cycle")):(r=K(n))?l(r,n,u,c):u(n)):c(i)}catch(e){f&&!o&&f.exit(),c(e)}},G=function(e,t){e.notified||(e.notified=!0,E((function(){for(var n,r=e.reactions;n=r.get();)H(n,e);e.notified=!1,t&&!e.rejection&&Y(e)})))},J=function(e,t,n){var r,o;W?((r=q.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},!L&&(o=c["on"+e])?o(r):e===z&&S("Unhandled promise rejection",n)},Y=function(e){l(O,c,(function(){var t,n=e.facade,r=e.value;if($(e)&&(t=w((function(){u?V.emit("unhandledRejection",r,n):J(z,n,r)})),e.rejection=u||$(e)?2:1,t.error))throw t.value}))},$=function(e){return 1!==e.rejection&&!e.parent},X=function(e){l(O,c,(function(){var t=e.facade;u?V.emit("rejectionHandled",t):J("rejectionhandled",t,e.value)}))},Q=function(e,t,n){return function(r){e(t,r,n)}},Z=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,G(e,!0))},ee=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new M("Promise can't be resolved itself");var r=K(t);r?E((function(){var n={done:!1};try{l(r,t,Q(ee,n,e),Q(Z,n,e))}catch(t){Z(n,t,e)}})):(e.value=t,e.state=1,G(e,!1))}catch(t){Z({done:!1},t,e)}}};if(I&&(D=(F=function(e){m(this,D),g(e),l(r,this);var t=k(this);try{e(Q(ee,t),Q(Z,t))}catch(e){Z(t,e)}}).prototype,(r=function(e){U(this,{type:R,done:!1,notified:!1,parent:!1,reactions:new T,rejection:!1,state:0,value:null})}).prototype=f(D,"then",(function(e,t){var n=k(this),r=_(b(this,F));return n.parent=!0,r.ok=!v(e)||e,r.fail=v(t)&&t,r.domain=u?V.domain:void 0,0===n.state?n.reactions.add(r):E((function(){H(r,n)})),r.promise})),o=function(){var e=new r,t=k(e);this.promise=e,this.resolve=Q(ee,t),this.reject=Q(Z,t)},x.f=_=function(e){return e===F||void 0===e?new o(e):B(e)},!a&&v(C)&&j!==Object.prototype)){i=j.then,P||f(j,"then",(function(e,t){var n=this;return new F((function(e,t){l(i,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete j.constructor}catch(e){}h&&h(j,D)}s({global:!0,constructor:!0,wrap:!0,forced:I},{Promise:F}),p(F,R,!1,!0),d(R)},537:(e,t,n)=>{var r=n(550),o=n(4428),i=n(916).CONSTRUCTOR;e.exports=i||!o((function(e){r.all(e).then(void 0,(function(){}))}))},550:(e,t,n)=>{var r=n(4576);e.exports=r.Promise},616:(e,t,n)=>{var r=n(9039);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},655:(e,t,n)=>{var r=n(6955),o=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return o(e)}},679:(e,t,n)=>{var r=n(1625),o=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new o("Incorrect invocation")}},687:(e,t,n)=>{var r=n(4913).f,o=n(9297),i=n(8227)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!o(e,i)&&r(e,i,{configurable:!0,value:t})}},741:e=>{var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},747:(e,t,n)=>{var r=n(6699),o=n(6193),i=n(4659),s=Error.captureStackTrace;e.exports=function(e,t,n,a){i&&(s?s(e,t):r(e,"stack",o(n,a)))}},757:(e,t,n)=>{var r=n(7751),o=n(4901),i=n(1625),s=n(7040),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,a(e))}},780:(e,t,n)=>{var r=n(2473);n(7628),n(3799),e.exports=r},851:(e,t,n)=>{var r=n(6955),o=n(5966),i=n(4117),s=n(6269),a=n(8227)("iterator");e.exports=function(e){if(!i(e))return o(e,a)||o(e,"@@iterator")||s[r(e)]}},911:(e,t,n)=>{var r=n(780);n(9806),n(5874),n(7575),e.exports=r},916:(e,t,n)=>{var r=n(4576),o=n(550),i=n(4901),s=n(2796),a=n(3706),u=n(8227),c=n(4215),l=n(6395),f=n(9519),h=o&&o.prototype,p=u("species"),d=!1,g=i(r.PromiseRejectionEvent),v=s("Promise",(function(){var e=a(o),t=e!==String(o);if(!t&&66===f)return!0;if(l&&(!h.catch||!h.finally))return!0;if(!f||f<51||!/native code/.test(e)){var n=new o((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[p]=r,!(d=n.then((function(){}))instanceof r))return!0}return!(t||"BROWSER"!==c&&"DENO"!==c||g)}));e.exports={CONSTRUCTOR:v,REJECTION_EVENT:g,SUBCLASSING:d}},1072:(e,t,n)=>{var r=n(1828),o=n(8727);e.exports=Object.keys||function(e){return r(e,o)}},1088:(e,t,n)=>{var r=n(6518),o=n(9565),i=n(6395),s=n(350),a=n(4901),u=n(3994),c=n(2787),l=n(2967),f=n(687),h=n(6699),p=n(6840),d=n(8227),g=n(6269),v=n(7657),y=s.PROPER,m=s.CONFIGURABLE,b=v.IteratorPrototype,O=v.BUGGY_SAFARI_ITERATORS,E=d("iterator"),S="keys",w="values",T="entries",A=function(){return this};e.exports=function(e,t,n,s,d,v,C){u(n,t,s);var N,x,R,I=function(e){if(e===d&&j)return j;if(!O&&e&&e in k)return k[e];switch(e){case S:case w:case T:return function(){return new n(this,e)}}return function(){return new n(this)}},L=t+" Iterator",P=!1,k=e.prototype,U=k[E]||k["@@iterator"]||d&&k[d],j=!O&&U||I(d),F="Array"===t&&k.entries||U;if(F&&(N=c(F.call(new e)))!==Object.prototype&&N.next&&(i||c(N)===b||(l?l(N,b):a(N[E])||p(N,E,A)),f(N,L,!0,!0),i&&(g[L]=A)),y&&d===w&&U&&U.name!==w&&(!i&&m?h(k,"name",w):(P=!0,j=function(){return o(U,this)})),d)if(x={values:I(w),keys:v?j:I(S),entries:I(T)},C)for(R in x)(O||P||!(R in k))&&p(k,R,x[R]);else r({target:t,proto:!0,forced:O||P},x);return i&&!C||k[E]===j||p(k,E,j,{name:d}),g[t]=j,x}},1103:e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},1181:(e,t,n)=>{var r,o,i,s=n(8622),a=n(4576),u=n(34),c=n(6699),l=n(9297),f=n(7629),h=n(6119),p=n(421),d="Object already initialized",g=a.TypeError,v=a.WeakMap;if(s||f.state){var y=f.state||(f.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,r=function(e,t){if(y.has(e))throw new g(d);return t.facade=e,y.set(e,t),t},o=function(e){return y.get(e)||{}},i=function(e){return y.has(e)}}else{var m=h("state");p[m]=!0,r=function(e,t){if(l(e,m))throw new g(d);return t.facade=e,c(e,m,t),t},o=function(e){return l(e,m)?e[m]:{}},i=function(e){return l(e,m)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return n}}}},1291:(e,t,n)=>{var r=n(741);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},1481:(e,t,n)=>{var r=n(6518),o=n(6043);r({target:"Promise",stat:!0,forced:n(916).CONSTRUCTOR},{reject:function(e){var t=o.f(this);return(0,t.reject)(e),t.promise}})},1625:(e,t,n)=>{var r=n(9504);e.exports=r({}.isPrototypeOf)},1689:(e,t,n)=>{var r=n(6518),o=n(4576),i=n(8745),s=n(7680),a=n(6043),u=n(9306),c=n(1103),l=o.Promise,f=!1;r({target:"Promise",stat:!0,forced:!l||!l.try||c((function(){l.try((function(e){f=8===e}),8)})).error||!f},{try:function(e){var t=arguments.length>1?s(arguments,1):[],n=a.f(this),r=c((function(){return i(u(e),void 0,t)}));return(r.error?n.reject:n.resolve)(r.value),n.promise}})},1828:(e,t,n)=>{var r=n(9504),o=n(9297),i=n(5397),s=n(9617).indexOf,a=n(421),u=r([].push);e.exports=function(e,t){var n,r=i(e),c=0,l=[];for(n in r)!o(a,n)&&o(r,n)&&u(l,n);for(;t.length>c;)o(r,n=t[c++])&&(~s(l,n)||u(l,n));return l}},1955:(e,t,n)=>{var r,o,i,s,a,u=n(4576),c=n(3389),l=n(6080),f=n(9225).set,h=n(8265),p=n(9544),d=n(4265),g=n(7860),v=n(8574),y=u.MutationObserver||u.WebKitMutationObserver,m=u.document,b=u.process,O=u.Promise,E=c("queueMicrotask");if(!E){var S=new h,w=function(){var e,t;for(v&&(e=b.domain)&&e.exit();t=S.get();)try{t()}catch(e){throw S.head&&r(),e}e&&e.enter()};p||v||g||!y||!m?!d&&O&&O.resolve?((s=O.resolve(void 0)).constructor=O,a=l(s.then,s),r=function(){a(w)}):v?r=function(){b.nextTick(w)}:(f=l(f,u),r=function(){f(w)}):(o=!0,i=m.createTextNode(""),new y(w).observe(i,{characterData:!0}),r=function(){i.data=o=!o}),E=function(e){S.head||r(),S.add(e)}}e.exports=E},2003:(e,t,n)=>{var r=n(6518),o=n(6395),i=n(916).CONSTRUCTOR,s=n(550),a=n(7751),u=n(4901),c=n(6840),l=s&&s.prototype;if(r({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!o&&u(s)){var f=a("Promise").prototype.catch;l.catch!==f&&c(l,"catch",f,{unsafe:!0})}},2106:(e,t,n)=>{var r=n(283),o=n(4913);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),o.f(e,t,n)}},2140:(e,t,n)=>{var r={};r[n(8227)("toStringTag")]="z",e.exports="[object z]"===String(r)},2195:(e,t,n)=>{var r=n(9504),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},2211:(e,t,n)=>{var r=n(9039);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},2293:(e,t,n)=>{var r=n(8551),o=n(5548),i=n(4117),s=n(8227)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||i(n=r(a)[s])?t:o(n)}},2360:(e,t,n)=>{var r,o=n(8551),i=n(6801),s=n(8727),a=n(421),u=n(397),c=n(4055),l=n(6119),f="prototype",h="script",p=l("IE_PROTO"),d=function(){},g=function(e){return"<"+h+">"+e+"</"+h+">"},v=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},y=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;y="undefined"!=typeof document?document.domain&&r?v(r):(t=c("iframe"),n="java"+h+":",t.style.display="none",u.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F):v(r);for(var o=s.length;o--;)delete y[f][s[o]];return y()};a[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d[f]=o(e),n=new d,d[f]=null,n[p]=e):n=y(),void 0===t?n:i.f(n,t)}},2473:(e,t,n)=>{var r=n(6398);n(2953),e.exports=r},2529:e=>{e.exports=function(e,t){return{value:e,done:t}}},2603:(e,t,n)=>{var r=n(655);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},2652:(e,t,n)=>{var r=n(6080),o=n(9565),i=n(8551),s=n(6823),a=n(4209),u=n(6198),c=n(1625),l=n(81),f=n(851),h=n(9539),p=TypeError,d=function(e,t){this.stopped=e,this.result=t},g=d.prototype;e.exports=function(e,t,n){var v,y,m,b,O,E,S,w=n&&n.that,T=!(!n||!n.AS_ENTRIES),A=!(!n||!n.IS_RECORD),C=!(!n||!n.IS_ITERATOR),N=!(!n||!n.INTERRUPTED),x=r(t,w),R=function(e){return v&&h(v,"normal",e),new d(!0,e)},I=function(e){return T?(i(e),N?x(e[0],e[1],R):x(e[0],e[1])):N?x(e,R):x(e)};if(A)v=e.iterator;else if(C)v=e;else{if(!(y=f(e)))throw new p(s(e)+" is not iterable");if(a(y)){for(m=0,b=u(e);b>m;m++)if((O=I(e[m]))&&c(g,O))return O;return new d(!1)}v=l(e,y)}for(E=A?e.next:v.next;!(S=o(E,v)).done;){try{O=I(S.value)}catch(e){h(v,"throw",e)}if("object"==typeof O&&O&&c(g,O))return O}return new d(!1)}},2777:(e,t,n)=>{var r=n(9565),o=n(34),i=n(757),s=n(5966),a=n(4270),u=n(8227),c=TypeError,l=u("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,u=s(e,l);if(u){if(void 0===t&&(t="default"),n=r(u,e,t),!o(n)||i(n))return n;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},2787:(e,t,n)=>{var r=n(9297),o=n(4901),i=n(8981),s=n(6119),a=n(2211),u=s("IE_PROTO"),c=Object,l=c.prototype;e.exports=a?c.getPrototypeOf:function(e){var t=i(e);if(r(t,u))return t[u];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof c?l:null}},2796:(e,t,n)=>{var r=n(9039),o=n(4901),i=/#|\.prototype\./,s=function(e,t){var n=u[a(e)];return n===l||n!==c&&(o(t)?r(t):!!t)},a=s.normalize=function(e){return String(e).replace(i,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},2812:e=>{var t=TypeError;e.exports=function(e,n){if(e<n)throw new t("Not enough arguments");return e}},2839:(e,t,n)=>{var r=n(4576).navigator,o=r&&r.userAgent;e.exports=o?String(o):""},2953:(e,t,n)=>{var r=n(4576),o=n(7400),i=n(9296),s=n(3792),a=n(6699),u=n(687),c=n(8227)("iterator"),l=s.values,f=function(e,t){if(e){if(e[c]!==l)try{a(e,c,l)}catch(t){e[c]=l}if(u(e,t,!0),o[t])for(var n in s)if(e[n]!==s[n])try{a(e,n,s[n])}catch(t){e[n]=s[n]}}};for(var h in o)f(r[h]&&r[h].prototype,h);f(i,"DOMTokenList")},2967:(e,t,n)=>{var r=n(6706),o=n(34),i=n(7750),s=n(3506);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),s(r),o(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},3138:e=>{e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}},3179:(e,t,n)=>{var r=n(2140),o=n(6955);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},3362:(e,t,n)=>{n(436),n(6499),n(2003),n(7743),n(1481),n(280)},3389:(e,t,n)=>{var r=n(4576),o=n(3724),i=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!o)return r[e];var t=i(r,e);return t&&t.value}},3392:(e,t,n)=>{var r=n(9504),o=0,i=Math.random(),s=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++o+i,36)}},3438:(e,t,n)=>{var r=n(8551),o=n(34),i=n(6043);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},3506:(e,t,n)=>{var r=n(3925),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+o(e)+" as a prototype")}},3517:(e,t,n)=>{var r=n(9504),o=n(9039),i=n(4901),s=n(6955),a=n(7751),u=n(3706),c=function(){},l=a("Reflect","construct"),f=/^\s*(?:class|function)\b/,h=r(f.exec),p=!f.test(c),d=function(e){if(!i(e))return!1;try{return l(c,[],e),!0}catch(e){return!1}},g=function(e){if(!i(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!h(f,u(e))}catch(e){return!0}};g.sham=!0,e.exports=!l||o((function(){var e;return d(d.call)||!d(Object)||!d((function(){e=!0}))||e}))?g:d},3518:(e,t,n)=>{var r=n(6518),o=n(9565),i=n(9306),s=n(7751),a=n(6043),u=n(1103),c=n(2652),l=n(537),f="No one promise resolved";r({target:"Promise",stat:!0,forced:l},{any:function(e){var t=this,n=s("AggregateError"),r=a.f(t),l=r.resolve,h=r.reject,p=u((function(){var r=i(t.resolve),s=[],a=0,u=1,p=!1;c(e,(function(e){var i=a++,c=!1;u++,o(r,t,e).then((function(e){c||p||(p=!0,l(e))}),(function(e){c||p||(c=!0,s[i]=e,--u||h(new n(s,f)))}))})),--u||h(new n(s,f))}));return p.error&&h(p.value),r.promise}})},3706:(e,t,n)=>{var r=n(9504),o=n(4901),i=n(7629),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},3717:(e,t)=>{t.f=Object.getOwnPropertySymbols},3724:(e,t,n)=>{var r=n(9039);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},3792:(e,t,n)=>{var r=n(5397),o=n(6469),i=n(6269),s=n(1181),a=n(4913).f,u=n(1088),c=n(2529),l=n(6395),f=n(3724),h="Array Iterator",p=s.set,d=s.getterFor(h);e.exports=u(Array,"Array",(function(e,t){p(this,{type:h,target:r(e),index:0,kind:t})}),(function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(n,!1);case"values":return c(t[n],!1)}return c([n,t[n]],!1)}),"values");var g=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!l&&f&&"values"!==g.name)try{a(g,"name",{value:"values"})}catch(e){}},3799:(e,t,n)=>{n(4628)},3925:(e,t,n)=>{var r=n(34);e.exports=function(e){return r(e)||null===e}},3994:(e,t,n)=>{var r=n(7657).IteratorPrototype,o=n(2360),i=n(6980),s=n(687),a=n(6269),u=function(){return this};e.exports=function(e,t,n,c){var l=t+" Iterator";return e.prototype=o(r,{next:i(+!c,n)}),s(e,l,!1,!0),a[l]=u,e}},4055:(e,t,n)=>{var r=n(4576),o=n(34),i=r.document,s=o(i)&&o(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},4117:e=>{e.exports=function(e){return null==e}},4209:(e,t,n)=>{var r=n(8227),o=n(6269),i=r("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||s[i]===e)}},4215:(e,t,n)=>{var r=n(4576),o=n(2839),i=n(2195),s=function(e){return o.slice(0,e.length)===e};e.exports=s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"},4265:(e,t,n)=>{var r=n(2839);e.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},4270:(e,t,n)=>{var r=n(9565),o=n(4901),i=n(34),s=TypeError;e.exports=function(e,t){var n,a;if("string"===t&&o(n=e.toString)&&!i(a=r(n,e)))return a;if(o(n=e.valueOf)&&!i(a=r(n,e)))return a;if("string"!==t&&o(n=e.toString)&&!i(a=r(n,e)))return a;throw new s("Can't convert object to primitive value")}},4428:(e,t,n)=>{var r=n(8227)("iterator"),o=!1;try{var i=0,s={next:function(){return{done:!!i++}},return:function(){o=!0}};s[r]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){try{if(!t&&!o)return!1}catch(e){return!1}var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},4495:(e,t,n)=>{var r=n(9519),o=n(9039),i=n(4576).String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},4576:function(e,t,n){var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4628:(e,t,n)=>{var r=n(6518),o=n(6043);r({target:"Promise",stat:!0},{withResolvers:function(){var e=o.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}})},4659:(e,t,n)=>{var r=n(9039),o=n(6980);e.exports=!r((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)}))},4901:e=>{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}},4913:(e,t,n)=>{var r=n(3724),o=n(5917),i=n(8686),s=n(8551),a=n(6969),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",p="writable";t.f=r?i?function(e,t,n){if(s(e),t=a(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&p in n&&!n[p]){var r=l(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:f in n?n[f]:r[f],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(s(e),t=a(t),s(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new u("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},5031:(e,t,n)=>{var r=n(7751),o=n(9504),i=n(8480),s=n(3717),a=n(8551),u=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=s.f;return n?u(t,n(e)):t}},5397:(e,t,n)=>{var r=n(7055),o=n(7750);e.exports=function(e){return r(o(e))}},5431:(e,t,n)=>{n.r(t),n.d(t,{ClientCacheState:()=>L,DataGovernance:()=>Ne,FormattableLogMessage:()=>de,LogLevel:()=>z,OverrideBehaviour:()=>Re,PollingMode:()=>Ce,PrerequisiteFlagComparator:()=>g,RefreshResult:()=>k,SegmentComparator:()=>v,SettingKeyValue:()=>Rt,SettingType:()=>p,User:()=>rt,UserComparator:()=>d,createConsoleLogger:()=>jt,createFlagOverridesFromMap:()=>Ft,disposeAllClients:()=>Ut,getClient:()=>to});var r={};n.r(r),n.d(r,{hasBrowserEnv:()=>Hn,hasStandardBrowserEnv:()=>Jn,hasStandardBrowserWebWorkerEnv:()=>Yn,navigator:()=>Gn,origin:()=>$n});var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s,a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function u(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function l(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}function f(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError,function(e){e[e.Fetched=0]="Fetched",e[e.NotModified=1]="NotModified",e[e.Errored=2]="Errored"}(s||(s={}));var h,p,d,g,v,y=function(){function e(e,t,n,r){this.status=e,this.config=t,this.errorMessage=n,this.errorException=r}return e.success=function(t){return new e(s.Fetched,t)},e.notModified=function(t){return new e(s.NotModified,t)},e.error=function(t,n,r){return new e(s.Errored,t,null!=n?n:"Unknown error.",r)},e}(),m=function(e){function t(n){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var i=e.call(this,function(e,t){switch(e){case"abort":return"Request was aborted.";case"timeout":return"Request timed out. Timeout value: "+t[0]+"ms";case"failure":var n=t[0],r="Request failed due to a network or protocol error.";return n?r+" "+(n instanceof Error?n.message:n+""):r}}(n,r))||this;return i.cause=n,i instanceof t||(Object.setPrototypeOf||function(e,t){return e.__proto__=t})(i,t.prototype),i.args=r,i}return i(t,e),t}(Error);!function(e){e[e.No=0]="No",e[e.Should=1]="Should",e[e.Force=2]="Force"}(h||(h={})),function(e){e[e.Boolean=0]="Boolean",e[e.String=1]="String",e[e.Int=2]="Int",e[e.Double=3]="Double"}(p||(p={})),function(e){e[e.TextIsOneOf=0]="TextIsOneOf",e[e.TextIsNotOneOf=1]="TextIsNotOneOf",e[e.TextContainsAnyOf=2]="TextContainsAnyOf",e[e.TextNotContainsAnyOf=3]="TextNotContainsAnyOf",e[e.SemVerIsOneOf=4]="SemVerIsOneOf",e[e.SemVerIsNotOneOf=5]="SemVerIsNotOneOf",e[e.SemVerLess=6]="SemVerLess",e[e.SemVerLessOrEquals=7]="SemVerLessOrEquals",e[e.SemVerGreater=8]="SemVerGreater",e[e.SemVerGreaterOrEquals=9]="SemVerGreaterOrEquals",e[e.NumberEquals=10]="NumberEquals",e[e.NumberNotEquals=11]="NumberNotEquals",e[e.NumberLess=12]="NumberLess",e[e.NumberLessOrEquals=13]="NumberLessOrEquals",e[e.NumberGreater=14]="NumberGreater",e[e.NumberGreaterOrEquals=15]="NumberGreaterOrEquals",e[e.SensitiveTextIsOneOf=16]="SensitiveTextIsOneOf",e[e.SensitiveTextIsNotOneOf=17]="SensitiveTextIsNotOneOf",e[e.DateTimeBefore=18]="DateTimeBefore",e[e.DateTimeAfter=19]="DateTimeAfter",e[e.SensitiveTextEquals=20]="SensitiveTextEquals",e[e.SensitiveTextNotEquals=21]="SensitiveTextNotEquals",e[e.SensitiveTextStartsWithAnyOf=22]="SensitiveTextStartsWithAnyOf",e[e.SensitiveTextNotStartsWithAnyOf=23]="SensitiveTextNotStartsWithAnyOf",e[e.SensitiveTextEndsWithAnyOf=24]="SensitiveTextEndsWithAnyOf",e[e.SensitiveTextNotEndsWithAnyOf=25]="SensitiveTextNotEndsWithAnyOf",e[e.SensitiveArrayContainsAnyOf=26]="SensitiveArrayContainsAnyOf",e[e.SensitiveArrayNotContainsAnyOf=27]="SensitiveArrayNotContainsAnyOf",e[e.TextEquals=28]="TextEquals",e[e.TextNotEquals=29]="TextNotEquals",e[e.TextStartsWithAnyOf=30]="TextStartsWithAnyOf",e[e.TextNotStartsWithAnyOf=31]="TextNotStartsWithAnyOf",e[e.TextEndsWithAnyOf=32]="TextEndsWithAnyOf",e[e.TextNotEndsWithAnyOf=33]="TextNotEndsWithAnyOf",e[e.ArrayContainsAnyOf=34]="ArrayContainsAnyOf",e[e.ArrayNotContainsAnyOf=35]="ArrayNotContainsAnyOf"}(d||(d={})),function(e){e[e.Equals=0]="Equals",e[e.NotEquals=1]="NotEquals"}(g||(g={})),function(e){e[e.IsIn=0]="IsIn",e[e.IsNotIn=1]="IsNotIn"}(v||(v={}));var b=function(){function e(e,t,n,r){this.configJson=e,this.config=t,this.timestamp=n,this.httpETag=r}return e.equals=function(e,t){return e.httpETag&&t.httpETag?e.httpETag===t.httpETag:e.configJson===t.configJson},e.prototype.with=function(t){return new e(this.configJson,this.config,t,this.httpETag)},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return!this.config},enumerable:!1,configurable:!0}),e.prototype.isExpired=function(t){return this===e.empty||this.timestamp+t<e.generateTimestamp()},e.generateTimestamp=function(){return(new Date).getTime()},e.serialize=function(e){var t,n;return e.timestamp+"\n"+(null!==(t=e.httpETag)&&void 0!==t?t:"")+"\n"+(null!==(n=e.configJson)&&void 0!==n?n:"")},e.deserialize=function(t){for(var n=Array(2),r=0,o=0;o<n.length;o++){if((r=t.indexOf("\n",r))<0)throw new Error("Number of values is fewer than expected.");n[o]=r++}var i=n[0],s=t.substring(0,i),a=parseInt(s);if(isNaN(a))throw new Error("Invalid fetch time: "+s);r=i+1,i=n[1];var u,c,l=(s=t.substring(r,i)).length>0?s:void 0;return r=i+1,(s=t.substring(r)).length>0&&(u=O.deserialize(s),c=s),new e(c,u,a,l)},e.serializationFormatVersion="v2",e.empty=new e(void 0,void 0,0,void 0),e}(),O=function(){function e(e){var t,n,r=this;this.preferences=null!=e.p?new E(e.p):void 0,this.segments=null!==(n=null===(t=e.s)||void 0===t?void 0:t.map((function(e){return new S(e)})))&&void 0!==n?n:[],this.settings=null!=e.f?Object.fromEntries(Object.entries(e.f).map((function(e){var t=e[0],n=e[1];return[t,new T(n,r)]}))):{}}return e.deserialize=function(t){var n=JSON.parse(t);if("object"!=typeof n||!n)throw new Error("Invalid config JSON content:"+t);return new e(n)},Object.defineProperty(e.prototype,"salt",{get:function(){var e;return null===(e=this.preferences)||void 0===e?void 0:e.salt},enumerable:!1,configurable:!0}),e}(),E=function(e){this.baseUrl=e.u,this.redirectMode=e.r,this.salt=e.s},S=function(e){var t,n;this.name=e.n,this.conditions=null!==(n=null===(t=e.r)||void 0===t?void 0:t.map((function(e){return new N(e)})))&&void 0!==n?n:[]},w=function(e,t){void 0===t&&(t=!1),this.value=t?e.v:I(e.v),this.variationId=e.i},T=function(e){function t(t,n){var r,o,i,s,a,u,c=e.call(this,t,t.t<0)||this;return c.type=t.t,c.percentageOptionsAttribute=null!==(r=t.a)&&void 0!==r?r:"Identifier",c.targetingRules=null!==(i=null===(o=t.r)||void 0===o?void 0:o.map((function(e){return new A(e,n)})))&&void 0!==i?i:[],c.percentageOptions=null!==(a=null===(s=t.p)||void 0===s?void 0:s.map((function(e){return new C(e)})))&&void 0!==a?a:[],c.configJsonSalt=null!==(u=null==n?void 0:n.salt)&&void 0!==u?u:"",c}return i(t,e),t.fromValue=function(e){return new t({t:-1,v:e})},t}(w),A=function(e,t){var n,r;this.conditions=null!==(r=null===(n=e.c)||void 0===n?void 0:n.map((function(e){return null!=e.u?new N(e.u):null!=e.p?new x(e.p):null!=e.s?new R(e.s,t):void 0})))&&void 0!==r?r:[],this.then=null!=e.p?e.p.map((function(e){return new C(e)})):new w(e.s)},C=function(e){function t(t){var n=e.call(this,t)||this;return n.percentage=t.p,n}return i(t,e),t}(w),N=function(e){var t,n;this.type="UserCondition",this.comparisonAttribute=e.a,this.comparator=e.c,this.comparisonValue=null!==(n=null!==(t=e.s)&&void 0!==t?t:e.d)&&void 0!==n?n:e.l},x=function(e){this.type="PrerequisiteFlagCondition",this.prerequisiteFlagKey=e.f,this.comparator=e.c,this.comparisonValue=I(e.v)},R=function(e,t){this.type="SegmentCondition",this.segment=t.segments[e.s],this.comparator=e.c};function I(e){var t,n,r;return null!==(r=null!==(n=null!==(t=e.b)&&void 0!==t?t:e.s)&&void 0!==n?n:e.i)&&void 0!==r?r:e.d}var L,P,k=function(){function e(e,t){this.errorMessage=e,this.errorException=t}return Object.defineProperty(e.prototype,"isSuccess",{get:function(){return null===this.errorMessage},enumerable:!1,configurable:!0}),e.from=function(t){return t.status!==s.Errored?e.success():e.failure(t.errorMessage,t.errorException)},e.success=function(){return new e(null)},e.failure=function(t,n){return new e(t,n)},e}();!function(e){e[e.NoFlagData=0]="NoFlagData",e[e.HasLocalOverrideFlagDataOnly=1]="HasLocalOverrideFlagDataOnly",e[e.HasCachedFlagDataOnly=2]="HasCachedFlagDataOnly",e[e.HasUpToDateFlagData=3]="HasUpToDateFlagData"}(L||(L={})),function(e){e[e.Online=0]="Online",e[e.Offline=1]="Offline",e[e.Disposed=2]="Disposed"}(P||(P={}));var U=function(){function e(e,t){this.configFetcher=e,this.options=t,this.pendingFetch=null,this.cacheKey=t.getCacheKey(),this.configFetcher=e,this.options=t,this.status=t.offline?P.Offline:P.Online}return e.prototype.dispose=function(){this.status=P.Disposed},Object.defineProperty(e.prototype,"disposed",{get:function(){return this.status===P.Disposed},enumerable:!1,configurable:!0}),e.prototype.refreshConfigAsync=function(){return u(this,void 0,void 0,(function(){var e,t,n,r,o;return c(this,(function(i){switch(i.label){case 0:return[4,this.options.cache.get(this.cacheKey)];case 1:return e=i.sent(),this.isOffline?[3,3]:[4,this.refreshConfigCoreAsync(e)];case 2:return t=i.sent(),n=t[0],r=t[1],[2,[k.from(n),r]];case 3:return o=this.options.logger.configServiceCannotInitiateHttpCalls().toString(),[2,[k.failure(o),e]]}}))}))},e.prototype.refreshConfigCoreAsync=function(e){return u(this,void 0,void 0,(function(){var t,n,r;return c(this,(function(o){switch(o.label){case 0:return[4,this.fetchAsync(e)];case 1:return t=o.sent(),n=!1,(r=t.status===s.Fetched)||t.config.timestamp>e.timestamp&&(!t.config.isEmpty||e.isEmpty)?[4,this.options.cache.set(this.cacheKey,t.config)]:[3,3];case 2:o.sent(),n=r&&!b.equals(t.config,e),e=t.config,o.label=3;case 3:return this.onConfigFetched(t.config),n&&this.onConfigChanged(t.config),[2,[t,e]]}}))}))},e.prototype.onConfigFetched=function(e){},e.prototype.onConfigChanged=function(e){var t;this.options.logger.debug("config changed"),this.options.hooks.emit("configChanged",null!==(t=e.config)&&void 0!==t?t:new O({}))},e.prototype.fetchAsync=function(e){var t;return null!==(t=this.pendingFetch)&&void 0!==t?t:this.pendingFetch=u(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),[4,this.fetchLogicAsync(e)];case 1:return[2,t.sent()];case 2:return this.pendingFetch=null,[7];case 3:return[2]}}))}))},e.prototype.fetchLogicAsync=function(e){var t;return u(this,void 0,void 0,(function(){var n,r,o,i,s,a;return c(this,(function(u){switch(u.label){case 0:(n=this.options).logger.debug("ConfigServiceBase.fetchLogicAsync() - called."),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.fetchRequestAsync(null!==(t=e.httpETag)&&void 0!==t?t:null)];case 2:switch(o=u.sent(),i=o[0],s=o[1],i.statusCode){case 200:return s instanceof O?(n.logger.debug("ConfigServiceBase.fetchLogicAsync(): fetch was successful. Returning new config."),[2,y.success(new b(i.body,s,b.generateTimestamp(),i.eTag))]):(r=n.logger.fetchReceived200WithInvalidBody(s).toString(),n.logger.debug("ConfigServiceBase.fetchLogicAsync(): "+i.statusCode+" "+i.reasonPhrase+" was received but the HTTP response content was invalid. Returning null."),[2,y.error(e,r,s)]);case 304:return e?(n.logger.debug("ConfigServiceBase.fetchLogicAsync(): content was not modified. Returning last config with updated timestamp."),[2,y.notModified(e.with(b.generateTimestamp()))]):(r=n.logger.fetchReceived304WhenLocalCacheIsEmpty(i.statusCode,i.reasonPhrase).toString(),n.logger.debug("ConfigServiceBase.fetchLogicAsync(): "+i.statusCode+" "+i.reasonPhrase+" was received when no config is cached locally. Returning null."),[2,y.error(e,r)]);case 403:case 404:return r=n.logger.fetchFailedDueToInvalidSdkKey().toString(),n.logger.debug("ConfigServiceBase.fetchLogicAsync(): fetch was unsuccessful. Returning last config (if any) with updated timestamp."),[2,y.error(e.with(b.generateTimestamp()),r)];default:return r=n.logger.fetchFailedDueToUnexpectedHttpResponse(i.statusCode,i.reasonPhrase).toString(),n.logger.debug("ConfigServiceBase.fetchLogicAsync(): fetch was unsuccessful. Returning null."),[2,y.error(e,r)]}return[3,4];case 3:return a=u.sent(),r=(a instanceof m&&"timeout"===a.cause?n.logger.fetchFailedDueToRequestTimeout(a.args[0],a):n.logger.fetchFailedDueToUnexpectedError(a)).toString(),n.logger.debug("ConfigServiceBase.fetchLogicAsync(): fetch was unsuccessful. Returning null."),[2,y.error(e,r,a)];case 4:return[2]}}))}))},e.prototype.fetchRequestAsync=function(e,t){return void 0===t&&(t=2),u(this,void 0,void 0,(function(){var n,r,o,i,s,a,u;return c(this,(function(c){switch(c.label){case 0:(n=this.options).logger.debug("ConfigServiceBase.fetchRequestAsync() - called."),r=0,c.label=1;case 1:return n.logger.debug("ConfigServiceBase.fetchRequestAsync(): calling fetchLogic()"+(r>0?", retry "+r+"/"+t:"")),[4,this.configFetcher.fetchLogic(n,e)];case 2:if(200!==(o=c.sent()).statusCode)return[2,[o]];if(!o.body)return n.logger.debug("ConfigServiceBase.fetchRequestAsync(): no response body."),[2,[o,new Error("No response body.")]];i=void 0;try{i=O.deserialize(o.body)}catch(e){return n.logger.debug("ConfigServiceBase.fetchRequestAsync(): invalid response body."),[2,[o,e]]}if(!(s=i.preferences))return n.logger.debug("ConfigServiceBase.fetchRequestAsync(): preferences is empty."),[2,[o,i]];if(!(a=s.baseUrl)||a===n.baseUrl)return n.logger.debug("ConfigServiceBase.fetchRequestAsync(): baseUrl OK."),[2,[o,i]];if(u=s.redirectMode,n.baseUrlOverriden&&u!==h.Force)return n.logger.debug("ConfigServiceBase.fetchRequestAsync(): options.baseUrlOverriden && redirect !== 2."),[2,[o,i]];if(n.baseUrl=a,u===h.No)return[2,[o,i]];if(u===h.Should&&n.logger.dataGovernanceIsOutOfSync(),r>=t)return n.logger.fetchFailedDueToRedirectLoop(),[2,[o,i]];c.label=3;case 3:return r++,[3,1];case 4:return[2]}}))}))},Object.defineProperty(e.prototype,"isOfflineExactly",{get:function(){return this.status===P.Offline},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOffline",{get:function(){return this.status!==P.Online},enumerable:!1,configurable:!0}),e.prototype.setOnlineCore=function(){},e.prototype.setOnline=function(){this.status===P.Offline?(this.setOnlineCore(),this.status=P.Online,this.options.logger.configServiceStatusChanged(P[this.status])):this.disposed&&this.options.logger.configServiceMethodHasNoEffectDueToDisposedClient("setOnline")},e.prototype.setOfflineCore=function(){},e.prototype.setOffline=function(){this.status===P.Online?(this.setOfflineCore(),this.status=P.Offline,this.options.logger.configServiceStatusChanged(P[this.status])):this.disposed&&this.options.logger.configServiceMethodHasNoEffectDueToDisposedClient("setOffline")},e.prototype.syncUpWithCache=function(){return this.options.cache.get(this.cacheKey)},e.prototype.getReadyPromise=function(e,t){return u(this,void 0,void 0,(function(){var n;return c(this,(function(r){switch(r.label){case 0:return[4,t(e)];case 1:return n=r.sent(),this.options.hooks.emit("clientReady",n),[2,n]}}))}))},e}(),j=function(){function e(){this.callbacks=[]}return Object.defineProperty(e.prototype,"aborted",{get:function(){return!this.callbacks},enumerable:!1,configurable:!0}),e.prototype.abort=function(){if(!this.aborted){var e=this.callbacks;this.callbacks=null;for(var t=0,n=e;t<n.length;t++)(0,n[t])()}},e.prototype.registerCallback=function(e){var t=this;return this.aborted?(e(),function(){}):(this.callbacks.push(e),function(){var n,r=t.callbacks;r&&(n=r.indexOf(e))>=0&&r.splice(n,1)})},e}();function F(e,t){var n;return new Promise((function(r){var o=null==t?void 0:t.registerCallback((function(){clearTimeout(n),r(!1)}));n=setTimeout((function(){null==o||o(),r(!0)}),e)}))}function D(e,t){return void 0===t&&(t=!1),e instanceof Error?t&&e.stack?e.stack:e.toString():e+""}function M(e){throw e}function q(e){return Array.isArray(e)}function V(e){return q(e)&&!e.some((function(e){return"string"!=typeof e}))}function _(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=", ");var o=e.length;if(!o)return"";var i="";return t>0&&o>t&&(e=e.slice(0,t),n&&(i=n(o-t))),"'"+e.join("'"+r+"'")+"'"+i}function B(e){function t(e,t){var n=e.charCodeAt(t);if(55296<=n&&n<56320){var r=e.charCodeAt(t+1);if(56320<=r&&r<=57343)return(n<<10)+r-56613888}return n}var n,r="",o=0,i=String.fromCharCode;for(n=0;n<e.length;n++){var s=t(e,n);s<=127||(r+=e.slice(o,n),s<=2047?(r+=i(192|s>>6),r+=i(128|63&s)):s<=65535?(r+=i(224|s>>12),r+=i(128|s>>6&63),r+=i(128|63&s)):(r+=i(240|s>>18),r+=i(128|s>>12&63),r+=i(128|s>>6&63),r+=i(128|63&s),++n),o=n+1)}return r+e.slice(o,n)}function W(e){return"number"==typeof e?e:"string"!=typeof e||!e.length||/^\s*$|^\s*0[^\d.e]/.test(e)?NaN:+e}var z,K=function(e){function t(t,n){var r=e.call(this,t,n)||this;r.signalInitialization=function(){},r.stopToken=new j,r.pollIntervalMs=1e3*n.pollIntervalSeconds,r.pollExpirationMs=r.pollIntervalMs-500;var o=r.syncUpWithCache();if(0!==n.maxInitWaitTimeSeconds){r.initialized=!1;var i=new Promise((function(e){return r.signalInitialization=e}));r.initializationPromise=r.waitForInitializationAsync(i).then((function(e){return r.initialized=!0,e}))}else r.initialized=!0,r.initializationPromise=Promise.resolve(!1);return r.readyPromise=r.getReadyPromise(r.initializationPromise,(function(e){return u(r,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,e];case 1:return t.sent(),[2,this.getCacheState(this.options.cache.getInMemory())]}}))}))})),n.offline||r.startRefreshWorker(o,r.stopToken),r}return i(t,e),t.prototype.waitForInitializationAsync=function(e){return u(this,void 0,void 0,(function(){var t,n;return c(this,(function(r){switch(r.label){case 0:return this.options.maxInitWaitTimeSeconds<0?[4,e]:[3,2];case 1:return r.sent(),[2,!0];case 2:return t=new j,[4,Promise.race([e.then((function(){return!0})),F(1e3*this.options.maxInitWaitTimeSeconds,t).then((function(){return!1}))])];case 3:return n=r.sent(),t.abort(),[2,n]}}))}))},t.prototype.getConfig=function(){return u(this,void 0,void 0,(function(){function e(e){e.debug("AutoPollConfigService.getConfig() - returning value from cache.")}var t;return c(this,(function(n){switch(n.label){case 0:return this.options.logger.debug("AutoPollConfigService.getConfig() called."),this.isOffline||this.initialized?[3,3]:[4,this.options.cache.get(this.cacheKey)];case 1:return(t=n.sent()).isExpired(this.pollIntervalMs)?(this.options.logger.debug("AutoPollConfigService.getConfig() - cache is empty or expired, waiting for initialization."),[4,this.initializationPromise]):(e(this.options.logger),[2,t]);case 2:n.sent(),n.label=3;case 3:return[4,this.options.cache.get(this.cacheKey)];case 4:return(t=n.sent()).isExpired(this.pollIntervalMs)?this.options.logger.debug("AutoPollConfigService.getConfig() - cache is empty or expired."):e(this.options.logger),[2,t]}}))}))},t.prototype.refreshConfigAsync=function(){return this.options.logger.debug("AutoPollConfigService.refreshConfigAsync() called."),e.prototype.refreshConfigAsync.call(this)},t.prototype.dispose=function(){this.options.logger.debug("AutoPollConfigService.dispose() called."),e.prototype.dispose.call(this),this.stopToken.aborted||this.stopRefreshWorker()},t.prototype.onConfigFetched=function(t){e.prototype.onConfigFetched.call(this,t),this.signalInitialization()},t.prototype.setOnlineCore=function(){this.startRefreshWorker(null,this.stopToken)},t.prototype.setOfflineCore=function(){this.stopRefreshWorker(),this.stopToken=new j},t.prototype.startRefreshWorker=function(e,t){return u(this,void 0,void 0,(function(){var n,r,o,i,s;return c(this,(function(a){switch(a.label){case 0:this.options.logger.debug("AutoPollConfigService.startRefreshWorker() called."),n=!0,a.label=1;case 1:if(t.aborted)return[3,11];a.label=2;case 2:a.trys.push([2,9,,10]),r=(new Date).getTime()+this.pollIntervalMs,a.label=3;case 3:return a.trys.push([3,5,,6]),[4,this.refreshWorkerLogic(n,e)];case 4:return a.sent(),[3,6];case 5:return o=a.sent(),this.options.logger.autoPollConfigServiceErrorDuringPolling(o),[3,6];case 6:return(i=r-(new Date).getTime())>0?[4,F(i,t)]:[3,8];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:return s=a.sent(),this.options.logger.autoPollConfigServiceErrorDuringPolling(s),[3,10];case 10:return n=!1,e=null,[3,1];case 11:return[2]}}))}))},t.prototype.stopRefreshWorker=function(){this.options.logger.debug("AutoPollConfigService.stopRefreshWorker() called."),this.stopToken.abort()},t.prototype.refreshWorkerLogic=function(e,t){return u(this,void 0,void 0,(function(){var n;return c(this,(function(r){switch(r.label){case 0:return this.options.logger.debug("AutoPollConfigService.refreshWorkerLogic() - called."),[4,null!=t?t:this.options.cache.get(this.cacheKey)];case 1:return(n=r.sent()).isExpired(this.pollExpirationMs)?(e?this.isOfflineExactly:this.isOffline)?[3,3]:[4,this.refreshConfigCoreAsync(n)]:[3,4];case 2:r.sent(),r.label=3;case 3:return[3,5];case 4:e&&this.signalInitialization(),r.label=5;case 5:return[2]}}))}))},t.prototype.getCacheState=function(e){return e.isEmpty?L.NoFlagData:e.isExpired(this.pollIntervalMs)?L.HasCachedFlagDataOnly:L.HasUpToDateFlagData},t}(U),H=function(){function e(){this.cachedConfig=b.empty}return e.prototype.set=function(e,t){this.cachedConfig=t},e.prototype.get=function(e){return this.cachedConfig},e.prototype.getInMemory=function(){return this.cachedConfig},e}(),G=function(){function e(e,t){this.cache=e,this.logger=t,this.cachedConfig=b.empty}return e.prototype.set=function(e,t){return u(this,void 0,void 0,(function(){var n;return c(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t.isEmpty?(this.cachedSerializedConfig=void 0,this.cachedConfig=t,[2]):(this.cachedSerializedConfig=b.serialize(t),this.cachedConfig=t,[4,this.cache.set(e,this.cachedSerializedConfig)]);case 1:return r.sent(),[3,3];case 2:return n=r.sent(),this.logger.configServiceCacheWriteError(n),[3,3];case 3:return[2]}}))}))},e.prototype.updateCachedConfig=function(e){null!=e&&e!==this.cachedSerializedConfig&&(this.cachedConfig=b.deserialize(e),this.cachedSerializedConfig=e)},e.prototype.get=function(e){var t,n;try{var r=this.cache.get(e);if("function"==typeof(null===(n=r)||void 0===n?void 0:n.then))return t=r,u(this,void 0,void 0,(function(){var e,n;return c(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=this.updateCachedConfig,[4,t];case 1:return e.apply(this,[r.sent()]),[3,3];case 2:return n=r.sent(),this.logger.configServiceCacheReadError(n),[3,3];case 3:return[2,this.cachedConfig]}}))}));this.updateCachedConfig(r)}catch(e){this.logger.configServiceCacheReadError(e)}return Promise.resolve(this.cachedConfig)},e.prototype.getInMemory=function(){return this.cachedConfig},e}();!function(e){e[e.Debug=4]="Debug",e[e.Info=3]="Info",e[e.Warn=2]="Warn",e[e.Error=1]="Error",e[e.Off=-1]="Off"}(z||(z={}));var J,Y,$,X,Q,Z,ee,te,ne,re,oe,ie,se,ae,ue,ce,le,fe,he,pe,de=function(){function e(e,t,n){this.strings=e,this.argNames=t,this.argValues=n}return e.from=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(n){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];return new e(n,t,r)}},Object.defineProperty(e.prototype,"defaultFormattedMessage",{get:function(){var e=this.cachedDefaultFormattedMessage;if(void 0===e){e="";for(var t=this.strings,n=this.argValues,r=0;r<t.length-1;r++)e+=t[r],e+=n[r];e+=t[r],this.cachedDefaultFormattedMessage=e}return e},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return this.defaultFormattedMessage},e}(),ge=function(){function e(e,t){this.logger=e,this.hooks=t}return Object.defineProperty(e.prototype,"level",{get:function(){var e;return null!==(e=this.logger.level)&&void 0!==e?e:z.Warn},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"eol",{get:function(){var e;return null!==(e=this.logger.eol)&&void 0!==e?e:"\n"},enumerable:!1,configurable:!0}),e.prototype.isEnabled=function(e){return this.level>=e},e.prototype.log=function(e,t,n,r){var o;return this.isEnabled(e)&&this.logger.log(e,t,n,r),e===z.Error&&(null===(o=this.hooks)||void 0===o||o.emit("clientError",n.toString(),r)),n},e.prototype.debug=function(e){this.log(z.Debug,0,e)},e.prototype.configJsonIsNotPresent=function(e){return this.log(z.Error,1e3,de.from("DEFAULT_RETURN_VALUE")(J||(J=f(["Config JSON is not present. Returning ","."],["Config JSON is not present. Returning ","."])),e))},e.prototype.configJsonIsNotPresentSingle=function(e,t,n){return this.log(z.Error,1e3,de.from("KEY","DEFAULT_PARAM_NAME","DEFAULT_PARAM_VALUE")(Y||(Y=f(["Config JSON is not present when evaluating setting '","'. Returning the `","` parameter that you specified in your application: '","'."],["Config JSON is not present when evaluating setting '","'. Returning the \\`","\\` parameter that you specified in your application: '","'."])),e,t,n))},e.prototype.settingEvaluationFailedDueToMissingKey=function(e,t,n,r){return this.log(z.Error,1001,de.from("KEY","DEFAULT_PARAM_NAME","DEFAULT_PARAM_VALUE","AVAILABLE_KEYS")($||($=f(["Failed to evaluate setting '","' (the key was not found in config JSON). Returning the `","` parameter that you specified in your application: '","'. Available keys: [","]."],["Failed to evaluate setting '","' (the key was not found in config JSON). Returning the \\`","\\` parameter that you specified in your application: '","'. Available keys: [","]."])),e,t,n,r))},e.prototype.settingEvaluationError=function(e,t,n){return this.log(z.Error,1002,de.from("METHOD_NAME","DEFAULT_RETURN_VALUE")(X||(X=f(["Error occurred in the `","` method. Returning ","."],["Error occurred in the \\`","\\` method. Returning ","."])),e,t),n)},e.prototype.settingEvaluationErrorSingle=function(e,t,n,r,o){return this.log(z.Error,1002,de.from("METHOD_NAME","KEY","DEFAULT_PARAM_NAME","DEFAULT_PARAM_VALUE")(Q||(Q=f(["Error occurred in the `","` method while evaluating setting '","'. Returning the `","` parameter that you specified in your application: '","'."],["Error occurred in the \\`","\\` method while evaluating setting '","'. Returning the \\`","\\` parameter that you specified in your application: '","'."])),e,t,n,r),o)},e.prototype.forceRefreshError=function(e,t){return this.log(z.Error,1003,de.from("METHOD_NAME")(Z||(Z=f(["Error occurred in the `","` method."],["Error occurred in the \\`","\\` method."])),e),t)},e.prototype.fetchFailedDueToInvalidSdkKey=function(){return this.log(z.Error,1100,"Your SDK Key seems to be wrong. You can find the valid SDK Key at https://app.configcat.com/sdkkey")},e.prototype.fetchFailedDueToUnexpectedHttpResponse=function(e,t){return this.log(z.Error,1101,de.from("STATUS_CODE","REASON_PHRASE")(ee||(ee=f(["Unexpected HTTP response was received while trying to fetch config JSON: "," ",""],["Unexpected HTTP response was received while trying to fetch config JSON: "," ",""])),e,t))},e.prototype.fetchFailedDueToRequestTimeout=function(e,t){return this.log(z.Error,1102,de.from("TIMEOUT")(te||(te=f(["Request timed out while trying to f