@datalayer/agent-runtimes 1.6.25 → 1.6.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-embed/chunks/{CellSidebarExtension-C6l8SYJ5.js → CellSidebarExtension-D7aXShZc.js} +1 -1
- package/dist-embed/chunks/{CollapsiblePlugin-Bn70jFpi.js → CollapsiblePlugin-Df_cvRKL.js} +1 -1
- package/dist-embed/chunks/{DeckComponent-DuxVpxzx.js → DeckComponent-sQU5JWCV.js} +1 -1
- package/dist-embed/chunks/{DocumentView-DKLkbwvh.js → DocumentView-BGthuEds.js} +1 -1
- package/dist-embed/chunks/{EphemeralDocument-CAXNOtEL.js → EphemeralDocument-CPSZcPKd.js} +1 -1
- package/dist-embed/chunks/{EphemeralNotebook-P_uxBveu.js → EphemeralNotebook-Dyx-25uN.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawComponent-mHitiMde.js → ExcalidrawComponent-F2NybZbz.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawModal-KB4MTQbk.js → ExcalidrawModal-CDiyt5M-.js} +1 -1
- package/dist-embed/chunks/{JupyterLexicalExtension-BtjDYMne.js → JupyterLexicalExtension-CEBuhvME.js} +7 -7
- package/dist-embed/chunks/{KernelVariables-CyPoY7Ap.js → KernelVariables-D3DSQaD3.js} +1 -1
- package/dist-embed/chunks/{NotebookToolSurfaces-SJd2MRQh.js → NotebookToolSurfaces-BDYXmM7k.js} +1 -1
- package/dist-embed/chunks/{NotebookView-CqS2dr1U.js → NotebookView-DRPnBAI2.js} +1 -1
- package/dist-embed/chunks/{Output-BfmeU6C2.js → Output-C6ZHZSBH.js} +1 -1
- package/dist-embed/chunks/{SandboxDetailsDialog-BQIrcZPM.js → SandboxDetailsDialog-qJBg2naH.js} +1 -1
- package/dist-embed/chunks/{WidgetVariableView-CxupIe6b.js → WidgetVariableView-B4faSdWW.js} +1 -1
- package/dist-embed/chunks/{YouTubePlugin-B6JmeO6g.js → YouTubePlugin-ChcBEMI-.js} +1 -1
- package/dist-embed/chunks/{ar-SA-G6X2FPQ2-BtDm_vBV.js → ar-SA-G6X2FPQ2-CnEVkWCp.js} +1 -1
- package/dist-embed/chunks/{az-AZ-76LH7QW2-CU9PzGa-.js → az-AZ-76LH7QW2-CSwFJ6du.js} +1 -1
- package/dist-embed/chunks/{bg-BG-XCXSNQG7-CcZG1sMf.js → bg-BG-XCXSNQG7-JG4F_3L3.js} +1 -1
- package/dist-embed/chunks/{bn-BD-2XOGV67Q-CsBxRWS8.js → bn-BD-2XOGV67Q-__W94Bx-.js} +1 -1
- package/dist-embed/chunks/{ca-ES-6MX7JW3Y-DiPlBY-L.js → ca-ES-6MX7JW3Y-CgTiQ3-C.js} +1 -1
- package/dist-embed/chunks/{cs-CZ-2BRQDIVT-B2LG8kaF.js → cs-CZ-2BRQDIVT-CuzIST9-.js} +1 -1
- package/dist-embed/chunks/{da-DK-5WZEPLOC-CjiEJ2dL.js → da-DK-5WZEPLOC-D4Z2Xglb.js} +1 -1
- package/dist-embed/chunks/{de-DE-XR44H4JA-D2hSEI1m.js → de-DE-XR44H4JA-E0rMdm2C.js} +1 -1
- package/dist-embed/chunks/{el-GR-BZB4AONW-C7ps3kie.js → el-GR-BZB4AONW-DHhs1347.js} +1 -1
- package/dist-embed/chunks/{es-ES-U4NZUMDT-BfNMUvfg.js → es-ES-U4NZUMDT-DI3jTuDV.js} +1 -1
- package/dist-embed/chunks/{esm-dClDAAXj.js → esm-DqlTXy-D.js} +1 -1
- package/dist-embed/chunks/{eu-ES-A7QVB2H4-CBQcRcNh.js → eu-ES-A7QVB2H4-ChXyoAj9.js} +1 -1
- package/dist-embed/chunks/{fa-IR-HGAKTJCU-CKTkkQUk.js → fa-IR-HGAKTJCU-D1qRoSi6.js} +1 -1
- package/dist-embed/chunks/{fi-FI-Z5N7JZ37-B2flJw4O.js → fi-FI-Z5N7JZ37-Cxzt5XFf.js} +1 -1
- package/dist-embed/chunks/{fr-FR-RHASNOE6-DCWxP6nh.js → fr-FR-RHASNOE6-DxKK7jD9.js} +1 -1
- package/dist-embed/chunks/{gl-ES-HMX3MZ6V-BGEA0PhL.js → gl-ES-HMX3MZ6V-CFdnAa4-.js} +1 -1
- package/dist-embed/chunks/{he-IL-6SHJWFNN-BaHixqAA.js → he-IL-6SHJWFNN-lBjIyRxj.js} +1 -1
- package/dist-embed/chunks/{hi-IN-IWLTKZ5I-CrHbvHN0.js → hi-IN-IWLTKZ5I-CtdCPck4.js} +1 -1
- package/dist-embed/chunks/{hu-HU-A5ZG7DT2-B9wQnRpK.js → hu-HU-A5ZG7DT2-D_CFF32t.js} +1 -1
- package/dist-embed/chunks/{id-ID-SAP4L64H-T0pQVB4m.js → id-ID-SAP4L64H-CwTXhwLK.js} +1 -1
- package/dist-embed/chunks/{index-BKAeSGYJ.js → index-9wJFadG-.js} +6 -6
- package/dist-embed/chunks/{index-Dd7kISed.js → index-C7UsrKrP.js} +1 -1
- package/dist-embed/chunks/{index-eH_desiS.js → index-DCpvl_OP.js} +2 -2
- package/dist-embed/chunks/{it-IT-JPQ66NNP-ECgWHvcY.js → it-IT-JPQ66NNP-BUEFwYid.js} +1 -1
- package/dist-embed/chunks/{ja-JP-DBVTYXUO-Cz96ctDW.js → ja-JP-DBVTYXUO-BAK_QQr1.js} +1 -1
- package/dist-embed/chunks/{kaa-6HZHGXH3-Cu7gLGxC.js → kaa-6HZHGXH3-C2yLyxLW.js} +1 -1
- package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-CoJI939s.js → kab-KAB-ZGHBKWFO-CW0xgQ8n.js} +1 -1
- package/dist-embed/chunks/{kk-KZ-P5N5QNE5-DiEAZ9si.js → kk-KZ-P5N5QNE5-iG2uKF6i.js} +1 -1
- package/dist-embed/chunks/{km-KH-HSX4SM5Z-CNF1qzO2.js → km-KH-HSX4SM5Z-Bm_m99ak.js} +1 -1
- package/dist-embed/chunks/{ko-KR-MTYHY66A-BCvHfgyK.js → ko-KR-MTYHY66A-Clgfny6b.js} +1 -1
- package/dist-embed/chunks/{ku-TR-6OUDTVRD-BV9JoFXu.js → ku-TR-6OUDTVRD-Y8Y_vzzq.js} +1 -1
- package/dist-embed/chunks/{lib-Bx5jthWD.js → lib-7ge2Kma3.js} +1 -1
- package/dist-embed/chunks/{lib-yg0_lz05.js → lib-8ZUSfvoH.js} +1 -1
- package/dist-embed/chunks/{lib-CAo1qw8O.js → lib-B5Wbadbg.js} +1 -1
- package/dist-embed/chunks/{lib-DZN1MrxI.js → lib-B9ahcmxX.js} +1 -1
- package/dist-embed/chunks/{lib-BxusOAUc.js → lib-BFuQ3UQC.js} +1 -1
- package/dist-embed/chunks/{lib-0nJV2tTp.js → lib-BP80BmI2.js} +1 -1
- package/dist-embed/chunks/{lib-NqXc-p0V.js → lib-BepajD8I.js} +1 -1
- package/dist-embed/chunks/{lib-Dxhw9PEm.js → lib-COZbOw0Z.js} +1 -1
- package/dist-embed/chunks/{lib-DhqDod2q.js → lib-CbUWOQj9.js} +1 -1
- package/dist-embed/chunks/{lib-DJJHSa4o.js → lib-CpkMRAJY.js} +1 -1
- package/dist-embed/chunks/{lib-CIkHn_Ac.js → lib-D25l5ZAy.js} +1 -1
- package/dist-embed/chunks/{lib-CZz_1UlC.js → lib-DBCP5fWa.js} +1 -1
- package/dist-embed/chunks/{lib-BkW0DwuV.js → lib-DHHIihJW.js} +1 -1
- package/dist-embed/chunks/{lib-Cn6fuwbC.js → lib-DggdYYmh.js} +1 -1
- package/dist-embed/chunks/{lib-CJQ5jBOi.js → lib-DmPUUoao.js} +1 -1
- package/dist-embed/chunks/{lib-3EwLl_XC.js → lib-DwylwlRk.js} +1 -1
- package/dist-embed/chunks/{lib-aEdpLJmk.js → lib-NBgDVJov.js} +1 -1
- package/dist-embed/chunks/{lib-Bjb6erCc.js → lib-j6VKUVII.js} +1 -1
- package/dist-embed/chunks/{lib-DLAP9X-I.js → lib-obIZUupc.js} +1 -1
- package/dist-embed/chunks/{lt-LT-XHIRWOB4-BpoBiZvj.js → lt-LT-XHIRWOB4-D7Por38P.js} +1 -1
- package/dist-embed/chunks/{lv-LV-5QDEKY6T-DWPLOycm.js → lv-LV-5QDEKY6T-Bz5t6-LB.js} +1 -1
- package/dist-embed/chunks/{mr-IN-CRQNXWMA-C3XokKLN.js → mr-IN-CRQNXWMA-B1NTMzvS.js} +1 -1
- package/dist-embed/chunks/{my-MM-5M5IBNSE-bPDcBtIx.js → my-MM-5M5IBNSE-C1gGuOaf.js} +1 -1
- package/dist-embed/chunks/{nb-NO-T6EIAALU-zGQywuc4.js → nb-NO-T6EIAALU-o2E12ucR.js} +1 -1
- package/dist-embed/chunks/{nl-NL-IS3SIHDZ-D0N-QxdB.js → nl-NL-IS3SIHDZ-Bqxu5mbZ.js} +1 -1
- package/dist-embed/chunks/{nn-NO-6E72VCQL-BeiBipEM.js → nn-NO-6E72VCQL-DxUXxDPK.js} +1 -1
- package/dist-embed/chunks/{oc-FR-POXYY2M6-BSmiDtLw.js → oc-FR-POXYY2M6-CDttJVdz.js} +1 -1
- package/dist-embed/chunks/{pa-IN-N4M65BXN-YTioBliU.js → pa-IN-N4M65BXN-Dp8ANANJ.js} +1 -1
- package/dist-embed/chunks/{percentages-BXMCSKIN-B5BZ64UL.js → percentages-BXMCSKIN-B5xVDaSp.js} +3 -3
- package/dist-embed/chunks/{pl-PL-T2D74RX3-BmA-mIoA.js → pl-PL-T2D74RX3-N3d_R6le.js} +1 -1
- package/dist-embed/chunks/{pt-BR-5N22H2LF-DF1nGVg3.js → pt-BR-5N22H2LF-CpPiMZ-u.js} +1 -1
- package/dist-embed/chunks/{pt-PT-UZXXM6DQ-DhiSFYNH.js → pt-PT-UZXXM6DQ-EGdAVYif.js} +1 -1
- package/dist-embed/chunks/{renderer-D_wPFwb6.js → renderer-8__rsP1H.js} +1 -1
- package/dist-embed/chunks/{ro-RO-JPDTUUEW-DN5nT_8E.js → ro-RO-JPDTUUEW-Bkty7yik.js} +1 -1
- package/dist-embed/chunks/{ru-RU-B4JR7IUQ-DJAZColu.js → ru-RU-B4JR7IUQ-BRHTHx-M.js} +1 -1
- package/dist-embed/chunks/{si-LK-N5RQ5JYF-BcJdGNJf.js → si-LK-N5RQ5JYF-BnP3_yrO.js} +1 -1
- package/dist-embed/chunks/{sk-SK-C5VTKIMK-Bs43X2b-.js → sk-SK-C5VTKIMK-CcOBsX7R.js} +1 -1
- package/dist-embed/chunks/{sl-SI-NN7IZMDC-CVhBQ31i.js → sl-SI-NN7IZMDC-DjcpDjk-.js} +1 -1
- package/dist-embed/chunks/{standalone-BmUQQ5LE.js → standalone-BjQ9N7UL.js} +1 -1
- package/dist-embed/chunks/{subset-shared.chunk-BkTdi2-W.js → subset-shared.chunk-DuIbGrTT.js} +1 -1
- package/dist-embed/chunks/{subset-worker.chunk-SkNsdM6t.js → subset-worker.chunk-CNz8UZDr.js} +1 -1
- package/dist-embed/chunks/{sv-SE-XGPEYMSR-BR0XZMXJ.js → sv-SE-XGPEYMSR-DbihwJ2w.js} +1 -1
- package/dist-embed/chunks/{ta-IN-2NMHFXQM-4CfGQQ8v.js → ta-IN-2NMHFXQM--fKIkmrb.js} +1 -1
- package/dist-embed/chunks/{th-TH-HPSO5L25-CjO8TBa6.js → th-TH-HPSO5L25-CkS_jtXJ.js} +1 -1
- package/dist-embed/chunks/{tr-TR-DEFEU3FU-B3tO43YQ.js → tr-TR-DEFEU3FU-B7b1yuT5.js} +1 -1
- package/dist-embed/chunks/{uk-UA-QMV73CPH-DYk01HNs.js → uk-UA-QMV73CPH-DMXQPyW5.js} +1 -1
- package/dist-embed/chunks/{vi-VN-M7AON7JQ-Dyd2Hf1G.js → vi-VN-M7AON7JQ-DQGL1ixT.js} +1 -1
- package/dist-embed/chunks/{zh-CN-LNUGB5OW-Bs2W1BrY.js → zh-CN-LNUGB5OW-BzDVFX-Z.js} +1 -1
- package/dist-embed/chunks/{zh-HK-E62DVLB3-BwN2oc_m.js → zh-HK-E62DVLB3-DwTp6Tkq.js} +1 -1
- package/dist-embed/chunks/{zh-TW-RAJ6MFWO-qOevWsjt.js → zh-TW-RAJ6MFWO-VbTpKAX1.js} +1 -1
- package/dist-embed/datalayer-app-main.js +24 -24
- package/lib/specs/actions.js +3 -2
- package/lib/specs/agents/agents.d.ts +1 -1
- package/lib/specs/agents/agents.js +134 -134
- package/lib/specs/apps.d.ts +1 -1
- package/lib/specs/apps.js +394 -394
- package/lib/specs/backendTools.js +6 -6
- package/lib/specs/policies.js +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ The error may be correlated with this previous error:
|
|
|
6
6
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return i=l.done,l},e:function(l){s=!0,n=l},f:function(){try{i||r.return==null||r.return()}finally{if(s)throw n}}}}function B4(e,t,r){return(t=j4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function z4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
7
7
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function gk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hk(Object(r),!0).forEach(function(a){B4(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hk(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function V4(e){return U4(e)||H4(e)||c3(e)||z4()}function W4(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function j4(e){var t=W4(e,"string");return typeof t=="symbol"?t:t+""}function c3(e,t){if(e){if(typeof e=="string")return xb(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xb(e,t):void 0}}var si={getActiveTrap:function(t){return t?.length>0?t[t.length-1]:null},activateTrap:function(t,r){var a=si.getActiveTrap(t);r!==a&&si.pauseTrap(t);var o=t.indexOf(r);o===-1||t.splice(o,1),t.push(r)},deactivateTrap:function(t,r){var a=t.indexOf(r);a!==-1&&t.splice(a,1),si.unpauseTrap(t)},pauseTrap:function(t){var r=si.getActiveTrap(t);r?._setPausedState(!0)},unpauseTrap:function(t){var r=si.getActiveTrap(t);r&&!r._isManuallyPaused()&&r._setPausedState(!1)}},G4=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},K4=function(t){return t?.key==="Escape"||t?.key==="Esc"||t?.keyCode===27},Oh=function(t){return t?.key==="Tab"||t?.keyCode===9},Y4=function(t){return Oh(t)&&!t.shiftKey},X4=function(t){return Oh(t)&&t.shiftKey},fk=function(t){return setTimeout(t,0)},ud=function(t){for(var r=arguments.length,a=new Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,a):t},Fg=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},J4=[],Z4=function(t,r){var a=r?.document||document,o=r?.trapStack||J4,n=gk({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:Y4,isKeyBackward:X4},r),i={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,l=function(H,W,z){return H&&H[W]!==void 0?H[W]:n[z||W]},c=function(H,W){var z=typeof W?.composedPath=="function"?W.composedPath():void 0;return i.containerGroups.findIndex(function(J){var $=J.container,se=J.tabbableNodes;return $.contains(H)||z?.includes($)||se.find(function(G){return G===H})})},u=function(H){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=W.hasFallback,J=z===void 0?!1:z,$=W.params,se=$===void 0?[]:$,G=n[H];if(typeof G=="function"&&(G=G.apply(void 0,V4(se))),G===!0&&(G=void 0),!G){if(G===void 0||G===!1)return G;throw new Error("`".concat(H,"` was specified but was not a node, or did not return a node"))}var Z=G;if(typeof G=="string"){try{Z=a.querySelector(G)}catch(ue){throw new Error("`".concat(H,'` appears to be an invalid selector; error="').concat(ue.message,'"'))}if(!Z&&!J)throw new Error("`".concat(H,"` as selector refers to no known node"))}return Z},d=function(){var H=u("initialFocus",{hasFallback:!0});if(H===!1)return!1;if(H===void 0||H&&!yv(H,n.tabbableOptions))if(c(a.activeElement)>=0)H=a.activeElement;else{var W=i.tabbableGroups[0],z=W&&W.firstTabbableNode;H=z||u("fallbackFocus")}else H===null&&(H=u("fallbackFocus"));if(!H)throw new Error("Your focus-trap needs to have at least one focusable element");return H},m=function(){if(i.containerGroups=i.containers.map(function(H){var W=k6(H,n.tabbableOptions),z=w6(H,n.tabbableOptions),J=W.length>0?W[0]:void 0,$=W.length>0?W[W.length-1]:void 0,se=z.find(function(ue){return hc(ue)}),G=z.slice().reverse().find(function(ue){return hc(ue)}),Z=!!W.find(function(ue){return sd(ue)>0});return{container:H,tabbableNodes:W,focusableNodes:z,posTabIndexesFound:Z,firstTabbableNode:J,lastTabbableNode:$,firstDomTabbableNode:se,lastDomTabbableNode:G,nextTabbableNode:function(ne){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ke=W.indexOf(ne);return ke<0?le?z.slice(z.indexOf(ne)+1).find(function(Te){return hc(Te)}):z.slice(0,z.indexOf(ne)).reverse().find(function(Te){return hc(Te)}):W[ke+(le?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(H){return H.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(H){return H.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},b=function(H){var W=H.activeElement;if(W)return W.shadowRoot&&W.shadowRoot.activeElement!==null?b(W.shadowRoot):W},v=function(H){if(H!==!1&&H!==b(document)){if(!H||!H.focus){v(d());return}H.focus({preventScroll:!!n.preventScroll}),i.mostRecentlyFocusedNode=H,G4(H)&&H.select()}},g=function(H){var W=u("setReturnFocus",{params:[H]});return W||(W===!1?!1:H)},w=function(H){var W=H.target,z=H.event,J=H.isBackward,$=J===void 0?!1:J;W=W||Fg(z),m();var se=null;if(i.tabbableGroups.length>0){var G=c(W,z),Z=G>=0?i.containerGroups[G]:void 0;if(G<0)$?se=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:se=i.tabbableGroups[0].firstTabbableNode;else if($){var ue=i.tabbableGroups.findIndex(function(Se){var Oe=Se.firstTabbableNode;return W===Oe});if(ue<0&&(Z.container===W||yv(W,n.tabbableOptions)&&!hc(W,n.tabbableOptions)&&!Z.nextTabbableNode(W,!1))&&(ue=G),ue>=0){var ne=ue===0?i.tabbableGroups.length-1:ue-1,le=i.tabbableGroups[ne];se=sd(W)>=0?le.lastTabbableNode:le.lastDomTabbableNode}else Oh(z)||(se=Z.nextTabbableNode(W,!1))}else{var ke=i.tabbableGroups.findIndex(function(Se){var Oe=Se.lastTabbableNode;return W===Oe});if(ke<0&&(Z.container===W||yv(W,n.tabbableOptions)&&!hc(W,n.tabbableOptions)&&!Z.nextTabbableNode(W))&&(ke=G),ke>=0){var Te=ke===i.tabbableGroups.length-1?0:ke+1,ae=i.tabbableGroups[Te];se=sd(W)>=0?ae.firstTabbableNode:ae.firstDomTabbableNode}else Oh(z)||(se=Z.nextTabbableNode(W))}}else se=u("fallbackFocus");return se},E=function(H){var W=Fg(H);if(!(c(W,H)>=0)){if(ud(n.clickOutsideDeactivates,H)){s.deactivate({returnFocus:n.returnFocusOnDeactivate});return}ud(n.allowOutsideClick,H)||H.preventDefault()}},S=function(H){var W=Fg(H),z=c(W,H)>=0;if(z||W instanceof Document)z&&(i.mostRecentlyFocusedNode=W);else{H.stopImmediatePropagation();var J,$=!0;if(i.mostRecentlyFocusedNode)if(sd(i.mostRecentlyFocusedNode)>0){var se=c(i.mostRecentlyFocusedNode),G=i.containerGroups[se].tabbableNodes;if(G.length>0){var Z=G.findIndex(function(ue){return ue===i.mostRecentlyFocusedNode});Z>=0&&(n.isKeyForward(i.recentNavEvent)?Z+1<G.length&&(J=G[Z+1],$=!1):Z-1>=0&&(J=G[Z-1],$=!1))}}else i.containerGroups.some(function(ue){return ue.tabbableNodes.some(function(ne){return sd(ne)>0})})||($=!1);else $=!1;$&&(J=w({target:i.mostRecentlyFocusedNode,isBackward:n.isKeyBackward(i.recentNavEvent)})),v(J||i.mostRecentlyFocusedNode||d())}i.recentNavEvent=void 0},P=function(H){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=H;var z=w({event:H,isBackward:W});z&&(Oh(H)&&H.preventDefault(),v(z))},I=function(H){(n.isKeyForward(H)||n.isKeyBackward(H))&&P(H,n.isKeyBackward(H))},O=function(H){K4(H)&&ud(n.escapeDeactivates,H)!==!1&&(H.preventDefault(),s.deactivate())},T=function(H){var W=Fg(H);c(W,H)>=0||ud(n.clickOutsideDeactivates,H)||ud(n.allowOutsideClick,H)||(H.preventDefault(),H.stopImmediatePropagation())},C=function(){if(i.active)return si.activateTrap(o,s),i.delayInitialFocusTimer=n.delayInitialFocus?fk(function(){v(d())}):v(d()),a.addEventListener("focusin",S,!0),a.addEventListener("mousedown",E,{capture:!0,passive:!1}),a.addEventListener("touchstart",E,{capture:!0,passive:!1}),a.addEventListener("click",T,{capture:!0,passive:!1}),a.addEventListener("keydown",I,{capture:!0,passive:!1}),a.addEventListener("keydown",O),s},R=function(H){i.active&&!i.paused&&s._setSubtreeIsolation(!1),i.adjacentElements.clear(),i.alreadySilent.clear();var W=new Set,z=new Set,J=dk(H),$;try{for(J.s();!($=J.n()).done;){var se=$.value;W.add(se);for(var G=typeof ShadowRoot<"u"&&se.getRootNode()instanceof ShadowRoot,Z=se;Z;){W.add(Z);var ue=Z.parentElement,ne=[];ue?ne=ue.children:!ue&&G&&(ne=Z.getRootNode().children,ue=Z.getRootNode().host,G=typeof ShadowRoot<"u"&&ue.getRootNode()instanceof ShadowRoot);var le=dk(ne),ke;try{for(le.s();!(ke=le.n()).done;){var Te=ke.value;z.add(Te)}}catch(ae){le.e(ae)}finally{le.f()}Z=ue}}}catch(ae){J.e(ae)}finally{J.f()}W.forEach(function(ae){z.delete(ae)}),i.adjacentElements=z},N=function(){if(i.active)return a.removeEventListener("focusin",S,!0),a.removeEventListener("mousedown",E,!0),a.removeEventListener("touchstart",E,!0),a.removeEventListener("click",T,!0),a.removeEventListener("keydown",I,!0),a.removeEventListener("keydown",O),s},U=function(H){var W=H.some(function(z){var J=Array.from(z.removedNodes);return J.some(function($){return $===i.mostRecentlyFocusedNode})});W&&v(d())},B=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(U):void 0,Y=function(){B&&(B.disconnect(),i.active&&!i.paused&&i.containers.map(function(H){B.observe(H,{subtree:!0,childList:!0})}))};return s={get active(){return i.active},get paused(){return i.paused},activate:function(H){if(i.active)return this;var W=l(H,"onActivate"),z=l(H,"onPostActivate"),J=l(H,"checkCanFocusTrap"),$=si.getActiveTrap(o),se=!1;if($&&!$.paused){var G;(G=$._setSubtreeIsolation)===null||G===void 0||G.call($,!1),se=!0}try{J||m(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=b(a),W?.();var Z=function(){J&&m(),C(),Y(),n.isolateSubtrees&&s._setSubtreeIsolation(!0),z?.()};if(J)return J(i.containers.concat()).then(Z,Z),this;Z()}catch(ne){if($===si.getActiveTrap(o)&&se){var ue;(ue=$._setSubtreeIsolation)===null||ue===void 0||ue.call($,!0)}throw ne}return this},deactivate:function(H){if(!i.active)return this;var W=gk({onDeactivate:n.onDeactivate,onPostDeactivate:n.onPostDeactivate,checkCanReturnFocus:n.checkCanReturnFocus},H);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,i.paused||s._setSubtreeIsolation(!1),i.alreadySilent.clear(),N(),i.active=!1,i.paused=!1,Y(),si.deactivateTrap(o,s);var z=l(W,"onDeactivate"),J=l(W,"onPostDeactivate"),$=l(W,"checkCanReturnFocus"),se=l(W,"returnFocus","returnFocusOnDeactivate");z?.();var G=function(){fk(function(){se&&v(g(i.nodeFocusedBeforeActivation)),J?.()})};return se&&$?($(g(i.nodeFocusedBeforeActivation)).then(G,G),this):(G(),this)},pause:function(H){return i.active?(i.manuallyPaused=!0,this._setPausedState(!0,H)):this},unpause:function(H){return i.active?(i.manuallyPaused=!1,o[o.length-1]!==this?this:this._setPausedState(!1,H)):this},updateContainerElements:function(H){var W=[].concat(H).filter(Boolean);return i.containers=W.map(function(z){return typeof z=="string"?a.querySelector(z):z}),n.isolateSubtrees&&R(i.containers),i.active&&(m(),n.isolateSubtrees&&!i.paused&&s._setSubtreeIsolation(!0)),Y(),this}},Object.defineProperties(s,{_isManuallyPaused:{value:function(){return i.manuallyPaused}},_setPausedState:{value:function(H,W){if(i.paused===H)return this;if(i.paused=H,H){var z=l(W,"onPause"),J=l(W,"onPostPause");z?.(),N(),Y(),s._setSubtreeIsolation(!1),J?.()}else{var $=l(W,"onUnpause"),se=l(W,"onPostUnpause");$?.(),s._setSubtreeIsolation(!0),m(),C(),Y(),se?.()}return this}},_setSubtreeIsolation:{value:function(H){n.isolateSubtrees&&i.adjacentElements.forEach(function(W){var z;H?n.isolateSubtrees==="aria-hidden"?((W.ariaHidden==="true"||((z=W.getAttribute("aria-hidden"))===null||z===void 0?void 0:z.toLowerCase())==="true")&&i.alreadySilent.add(W),W.setAttribute("aria-hidden","true")):((W.inert||W.hasAttribute("inert"))&&i.alreadySilent.add(W),W.setAttribute("inert",!0)):i.alreadySilent.has(W)||(n.isolateSubtrees==="aria-hidden"?W.removeAttribute("aria-hidden"):W.removeAttribute("inert"))})}}}),s.updateContainerElements(t),s};const Q4=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:Z4},Symbol.toStringTag,{value:"Module"})),q4=Kf(Q4),$4=Kf(E6);var Tv,pk;function e7(){if(pk)return Tv;pk=1;function e(T){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},e(T)}function t(T,C){if(!(T instanceof C))throw new TypeError("Cannot call a class as a function")}function r(T,C){for(var R=0;R<C.length;R++){var N=C[R];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(T,m(N.key),N)}}function a(T,C,R){return C&&r(T.prototype,C),Object.defineProperty(T,"prototype",{writable:!1}),T}function o(T,C,R){return C=l(C),n(T,s()?Reflect.construct(C,R||[],l(T).constructor):C.apply(T,R))}function n(T,C){if(C&&(e(C)=="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i(T)}function i(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}function s(){try{var T=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(s=function(){return!!T})()}function l(T){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(C){return C.__proto__||Object.getPrototypeOf(C)},l(T)}function c(T,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(C&&C.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),Object.defineProperty(T,"prototype",{writable:!1}),C&&u(T,C)}function u(T,C){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,N){return R.__proto__=N,R},u(T,C)}function d(T,C,R){return(C=m(C))in T?Object.defineProperty(T,C,{value:R,enumerable:!0,configurable:!0,writable:!0}):T[C]=R,T}function m(T){var C=b(T,"string");return e(C)=="symbol"?C:C+""}function b(T,C){if(e(T)!="object"||!T)return T;var R=T[Symbol.toPrimitive];if(R!==void 0){var N=R.call(T,C);if(e(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(T)}var v=mt(),g=S6(),w=q4,E=w.createFocusTrap,S=$4,P=S.isFocusable,I=(function(T){function C(R){var N;t(this,C),N=o(this,C,[R]),d(N,"getNodeForOption",function(Y){var F,H=(F=this.internalOptions[Y])!==null&&F!==void 0?F:this.originalOptions[Y];if(typeof H=="function"){for(var W=arguments.length,z=new Array(W>1?W-1:0),J=1;J<W;J++)z[J-1]=arguments[J];H=H.apply(void 0,z)}if(H===!0&&(H=void 0),!H){if(H===void 0||H===!1)return H;throw new Error("`".concat(Y,"` was specified but was not a node, or did not return a node"))}var $=H;if(typeof H=="string"){var se;if($=(se=this.getDocument())===null||se===void 0?void 0:se.querySelector(H),!$)throw new Error("`".concat(Y,"` as selector refers to no known node"))}return $}),N.handleDeactivate=N.handleDeactivate.bind(N),N.handlePostDeactivate=N.handlePostDeactivate.bind(N),N.handleClickOutsideDeactivates=N.handleClickOutsideDeactivates.bind(N),N.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:N.handleDeactivate,onPostDeactivate:N.handlePostDeactivate,clickOutsideDeactivates:N.handleClickOutsideDeactivates},N.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var U=R.focusTrapOptions;for(var B in U)if(Object.prototype.hasOwnProperty.call(U,B)){if(B==="returnFocusOnDeactivate"||B==="onDeactivate"||B==="onPostDeactivate"||B==="checkCanReturnFocus"||B==="clickOutsideDeactivates"){N.originalOptions[B]=U[B];continue}N.internalOptions[B]=U[B]}return N.outsideClick=null,N.focusTrapElements=R.containerElements||[],N.updatePreviousElement(),N}return c(C,T),a(C,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document<"u"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var N=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return N||(N===!1?!1:this.previouslyFocusedElement)}},{key:"updatePreviousElement",value:function(){var N=this.getDocument();N&&(this.previouslyFocusedElement=N.activeElement)}},{key:"deactivateTrap",value:function(){!this.focusTrap||!this.focusTrap.active||this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(N){var U=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,N):this.originalOptions.clickOutsideDeactivates;return U&&(this.outsideClick={target:N.target,allowDeactivation:U}),U}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var N=this,U=function(){var Y=N.getReturnFocusNode(),F=!!(N.originalOptions.returnFocusOnDeactivate&&Y!==null&&Y!==void 0&&Y.focus&&(!N.outsideClick||N.outsideClick.allowDeactivation&&!P(N.outsideClick.target,N.internalOptions.tabbableOptions))),H=N.internalOptions.preventScroll,W=H===void 0?!1:H;F&&Y.focus({preventScroll:W}),N.originalOptions.onPostDeactivate&&N.originalOptions.onPostDeactivate.call(null),N.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(U,U):U()}},{key:"setupFocusTrap",value:function(){if(this.focusTrap)this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause());else{var N=this.focusTrapElements.some(Boolean);N&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(N){if(this.focusTrap){N.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var U=!N.active&&this.props.active,B=N.active&&!this.props.active,Y=!N.paused&&this.props.paused,F=N.paused&&!this.props.paused;if(U&&(this.updatePreviousElement(),this.focusTrap.activate()),B){this.deactivateTrap();return}Y&&this.focusTrap.pause(),F&&this.focusTrap.unpause()}else N.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var N=this,U=this.props.children?v.Children.only(this.props.children):void 0;if(U){if(U.type&&U.type===v.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");var B=function(H){var W=N.props.containerElements;U&&(typeof U.ref=="function"?U.ref(H):U.ref&&(U.ref.current=H)),N.focusTrapElements=W||[H]},Y=v.cloneElement(U,{ref:B});return Y}return null}}])})(v.Component),O=typeof Element>"u"?Function:Element;return I.propTypes={active:g.bool,paused:g.bool,focusTrapOptions:g.shape({document:g.object,onActivate:g.func,onPostActivate:g.func,checkCanFocusTrap:g.func,onPause:g.func,onPostPause:g.func,onUnpause:g.func,onPostUnpause:g.func,onDeactivate:g.func,onPostDeactivate:g.func,checkCanReturnFocus:g.func,initialFocus:g.oneOfType([g.instanceOf(O),g.string,g.bool,g.func]),fallbackFocus:g.oneOfType([g.instanceOf(O),g.string,g.func]),escapeDeactivates:g.oneOfType([g.bool,g.func]),clickOutsideDeactivates:g.oneOfType([g.bool,g.func]),returnFocusOnDeactivate:g.bool,setReturnFocus:g.oneOfType([g.instanceOf(O),g.string,g.bool,g.func]),allowOutsideClick:g.oneOfType([g.bool,g.func]),preventScroll:g.bool,tabbableOptions:g.shape({displayCheck:g.oneOf(["full","legacy-full","non-zero-area","none"]),getShadowRoot:g.oneOfType([g.bool,g.func])}),trapStack:g.array,isKeyForward:g.func,isKeyBackward:g.func}),containerElements:g.arrayOf(g.instanceOf(O)),children:g.oneOfType([g.element,g.instanceOf(O)])},I.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:E},Tv=I,Tv}var t7=e7();const u3=vt(t7);function d3(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Gc(e,t)}var r7=function(t,r){return t===void 0&&(t=[]),r===void 0&&(r=[]),t.length!==r.length||t.some(function(a,o){return!Object.is(a,r[o])})},vk={error:null},a7=(function(e){d3(t,e);function t(){for(var a,o=arguments.length,n=new Array(o),i=0;i<o;i++)n[i]=arguments[i];return a=e.call.apply(e,[this].concat(n))||this,a.state=vk,a.resetErrorBoundary=function(){for(var s,l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];a.props.onReset==null||(s=a.props).onReset.apply(s,c),a.reset()},a}t.getDerivedStateFromError=function(o){return{error:o}};var r=t.prototype;return r.reset=function(){this.setState(vk)},r.componentDidCatch=function(o,n){var i,s;(i=(s=this.props).onError)==null||i.call(s,o,n)},r.componentDidUpdate=function(o,n){var i=this.state.error,s=this.props.resetKeys;if(i!==null&&n.error!==null&&r7(o.resetKeys,s)){var l,c;(l=(c=this.props).onResetKeysChange)==null||l.call(c,o.resetKeys,s),this.reset()}},r.render=function(){var o=this.state.error,n=this.props,i=n.fallbackRender,s=n.FallbackComponent,l=n.fallback;if(o!==null){var c={error:o,resetErrorBoundary:this.resetErrorBoundary};if(Q.isValidElement(l))return l;if(typeof i=="function")return i(c);if(s)return Q.createElement(s,c);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t})(Q.Component),Rv,mk;function n7(){if(mk)return Rv;mk=1;class e extends Error{constructor(l){super(e._prepareSuperMessage(l)),Object.defineProperty(this,"name",{value:"NonError",configurable:!0,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(this,e)}static _prepareSuperMessage(l){try{return JSON.stringify(l)}catch{return String(l)}}}const t=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0}],r=Symbol(".toJSON called"),a=s=>{s[r]=!0;const l=s.toJSON();return delete s[r],l},o=({from:s,seen:l,to_:c,forceEnumerable:u,maxDepth:d,depth:m})=>{const b=c||(Array.isArray(s)?[]:{});if(l.push(s),m>=d)return b;if(typeof s.toJSON=="function"&&s[r]!==!0)return a(s);for(const[v,g]of Object.entries(s)){if(typeof Buffer=="function"&&Buffer.isBuffer(g)){b[v]="[object Buffer]";continue}if(typeof g!="function"){if(!g||typeof g!="object"){b[v]=g;continue}if(!l.includes(s[v])){m++,b[v]=o({from:s[v],seen:l.slice(),forceEnumerable:u,maxDepth:d,depth:m});continue}b[v]="[Circular]"}}for(const{property:v,enumerable:g}of t)typeof s[v]=="string"&&Object.defineProperty(b,v,{value:s[v],enumerable:u?!0:g,configurable:!0,writable:!0});return b};return Rv={serializeError:(s,l={})=>{const{maxDepth:c=Number.POSITIVE_INFINITY}=l;return typeof s=="object"&&s!==null?o({from:s,seen:[],forceEnumerable:!0,maxDepth:c,depth:0}):typeof s=="function"?`[Function: ${s.name||"anonymous"}]`:s},deserializeError:(s,l={})=>{const{maxDepth:c=Number.POSITIVE_INFINITY}=l;if(s instanceof Error)return s;if(typeof s=="object"&&s!==null&&!Array.isArray(s)){const u=new Error;return o({from:s,seen:[],to_:u,maxDepth:c,depth:0}),u}return new e(s)}},Rv}var o7=n7(),i7={};function Pb(e,t){for(let r=0,a=e.length;r<a;r++)if(t.apply(t,[e[r],r,e]))return e[r]}function bk(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function kh(e){return typeof e=="number"&&!isNaN(e)}function wa(e){return parseInt(e,10)}function Uc(e,t,r){if(e[t])return new Error(`Invalid prop ${t} passed to ${r} - do not set this, set it on the child.`)}var Av=["Moz","Webkit","O","ms"];function s7(e="transform"){var t,r;if(typeof window>"u")return"";const a=(r=(t=window.document)==null?void 0:t.documentElement)==null?void 0:r.style;if(!a||e in a)return"";for(let o=0;o<Av.length;o++)if(h3(e,Av[o])in a)return Av[o];return""}function h3(e,t){return t?`${t}${l7(e)}`:e}function l7(e){let t="",r=!0;for(let a=0;a<e.length;a++)r?(t+=e[a].toUpperCase(),r=!1):e[a]==="-"?r=!0:t+=e[a];return t}var c7=s7(),Dv="";function u7(e,t){var r;Dv||(Dv=(r=Pb(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(o){return bk(e[o])}))!=null?r:"");const a=e[Dv];return bk(a)?!!a.call(e,t):!1}function yk(e,t,r){let a=e;do{if(u7(a,t))return!0;if(a===r)return!1;a=a.parentNode}while(a);return!1}function Nv(e,t,r,a){if(!e)return;const o={capture:!0,...a},n=r;e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function Ws(e,t,r,a){if(!e)return;const o={capture:!0,...a},n=r;e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}function d7(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=wa(r.borderTopWidth),t+=wa(r.borderBottomWidth),t}function h7(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=wa(r.borderLeftWidth),t+=wa(r.borderRightWidth),t}function g7(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=wa(r.paddingTop),t-=wa(r.paddingBottom),t}function f7(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=wa(r.paddingLeft),t-=wa(r.paddingRight),t}function p7(e,t,r){const o=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),n=(e.clientX+t.scrollLeft-o.left)/r,i=(e.clientY+t.scrollTop-o.top)/r;return{x:n,y:i}}function v7(e,t){const r=g3(e,t,"px");return{[h3("transform",c7)]:r}}function m7(e,t){return g3(e,t,"")}function g3({x:e,y:t},r,a){let o=`translate(${e}${a},${t}${a})`;if(r){const n=`${typeof r.x=="string"?r.x:r.x+a}`,i=`${typeof r.y=="string"?r.y:r.y+a}`;o=`translate(${n}, ${i})`+o}return o}function b7(e,t){return e.targetTouches&&Pb(e.targetTouches,r=>t===r.identifier)||e.changedTouches&&Pb(e.changedTouches,r=>t===r.identifier)}function y7(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function k7(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0}function w7(e,t){if(!e)return;let r=e.getElementById("react-draggable-style-el");if(!r){r=e.createElement("style"),r.type="text/css",r.id="react-draggable-style-el";const a=t??k7();a&&r.setAttribute("nonce",a),r.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
8
8
|
`,r.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
9
|
-
`,e.getElementsByTagName("head")[0].appendChild(r)}e.body&&E7(e.body,"react-draggable-transparent-selection")}function kk(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{wk(e)}):wk(e)}function wk(e){if(e)try{e.body&&S7(e.body,"react-draggable-transparent-selection");const t=e.selection;if(t)t.empty();else{const r=(e.defaultView||window).getSelection();r&&r.type!=="Caret"&&r.removeAllRanges()}}catch{}}function E7(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function S7(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}function _7(e,t,r){if(!e.props.bounds)return[t,r];let{bounds:a}=e.props;a=typeof a=="string"?a:P7(a);const o=E0(e);if(typeof a=="string"){const{ownerDocument:n}=o,i=n.defaultView;if(!i)throw new Error("Cannot resolve the owner window of the draggable node.");let s;if(a==="parent"?s=o.parentNode:s=o.getRootNode().querySelector(a),!(s instanceof i.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const l=s,c=i.getComputedStyle(o),u=i.getComputedStyle(l);a={left:-o.offsetLeft+wa(u.paddingLeft)+wa(c.marginLeft),top:-o.offsetTop+wa(u.paddingTop)+wa(c.marginTop),right:f7(l)-h7(o)-o.offsetLeft+wa(u.paddingRight)-wa(c.marginRight),bottom:g7(l)-d7(o)-o.offsetTop+wa(u.paddingBottom)-wa(c.marginBottom)}}return kh(a.right)&&(t=Math.min(t,a.right)),kh(a.bottom)&&(r=Math.min(r,a.bottom)),kh(a.left)&&(t=Math.max(t,a.left)),kh(a.top)&&(r=Math.max(r,a.top)),[t,r]}function Ek(e,t,r){const a=Math.round(t/e[0])*e[0],o=Math.round(r/e[1])*e[1];return[a,o]}function C7(e){return e.props.axis==="both"||e.props.axis==="x"}function x7(e){return e.props.axis==="both"||e.props.axis==="y"}function Mv(e,t,r){const a=typeof t=="number"?b7(e,t):null;if(typeof t=="number"&&!a)return null;const o=E0(r),n=r.props.offsetParent||o.offsetParent||o.ownerDocument.body;return p7(a||e,n,r.props.scale)}function Fv(e,t,r){const a=!kh(e.lastX),o=E0(e);return a?{node:o,deltaX:0,deltaY:0,lastX:t,lastY:r,x:t,y:r}:{node:o,deltaX:t-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:r}}function Lv(e,t){const r=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/r,y:e.state.y+t.deltaY/r,deltaX:t.deltaX/r,deltaY:t.deltaY/r,lastX:e.state.x,lastY:e.state.y}}function P7(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function E0(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var O7=typeof process<"u"&&i7.DRAGGABLE_DEBUG?console.log.bind(console):function(){},wo=O7,Ln={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},Hi=Ln.mouse,$c=class extends Q.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button=="number"&&e.button!==0||e.ctrlKey))return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:r}=t;if(this.props.disabled||!(e.target instanceof r.defaultView.Node)||this.props.handle&&!yk(e.target,this.props.handle,t)||this.props.cancel&&yk(e.target,this.props.cancel,t))return;e.type==="touchstart"&&!this.props.allowMobileScroll&&e.preventDefault();const a=y7(e);this.touchIdentifier=a;const o=Mv(e,a,this);if(o==null)return;const{x:n,y:i}=o,s=Fv(this,n,i);wo("DraggableCore: handleDragStart: %j",s),wo("calling",this.props.onStart),!(this.props.onStart(e,s)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&w7(r,this.props.nonce),this.dragging=!0,this.lastX=n,this.lastY=i,Nv(r,Hi.move,this.handleDrag),Nv(r,Hi.stop,this.handleDragStop))},this.handleDrag=e=>{const t=Mv(e,this.touchIdentifier,this);if(t==null)return;let{x:r,y:a}=t;if(Array.isArray(this.props.grid)){let i=r-this.lastX,s=a-this.lastY;if([i,s]=Ek(this.props.grid,i,s),!i&&!s)return;r=this.lastX+i,a=this.lastY+s}const o=Fv(this,r,a);if(wo("DraggableCore: handleDrag: %j",o),this.props.onDrag(e,o)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const i=document.createEvent("MouseEvents");i.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(i)}return}this.lastX=r,this.lastY=a},this.handleDragStop=e=>{if(!this.dragging)return;const t=Mv(e,this.touchIdentifier,this);if(t==null)return;let{x:r,y:a}=t;if(Array.isArray(this.props.grid)){let s=r-this.lastX||0,l=a-this.lastY||0;[s,l]=Ek(this.props.grid,s,l),r=this.lastX+s,a=this.lastY+l}const o=Fv(this,r,a);if(this.props.onStop(e,o)===!1||this.mounted===!1)return!1;const i=this.findDOMNode();i&&this.props.enableUserSelectHack&&kk(i.ownerDocument),wo("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,i&&(wo("DraggableCore: Removing handlers"),Ws(i.ownerDocument,Hi.move,this.handleDrag),Ws(i.ownerDocument,Hi.stop,this.handleDragStop))},this.onMouseDown=e=>(Hi=Ln.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(Hi=Ln.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(Hi=Ln.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(Hi=Ln.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&Nv(e,Ln.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;Ws(t,Ln.mouse.move,this.handleDrag),Ws(t,Ln.touch.move,this.handleDrag),Ws(t,Ln.mouse.stop,this.handleDragStop),Ws(t,Ln.touch.stop,this.handleDragStop),Ws(e,Ln.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&kk(t)}}findDOMNode(){var e;if((e=this.props)!=null&&e.nodeRef)return this.props.nodeRef.current;const t=o0;return typeof t.findDOMNode=="function"?t.findDOMNode(this):(wo("react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef"),null)}render(){return Q.cloneElement(Q.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};$c.displayName="DraggableCore";$c.propTypes={allowAnyClick:ye.bool,allowMobileScroll:ye.bool,children:ye.node.isRequired,disabled:ye.bool,enableUserSelectHack:ye.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:ye.arrayOf(ye.number),handle:ye.string,cancel:ye.string,nodeRef:ye.object,nonce:ye.string,onStart:ye.func,onDrag:ye.func,onStop:ye.func,onMouseDown:ye.func,scale:ye.number,className:Uc,style:Uc,transform:Uc};$c.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Xf=class extends Q.Component{constructor(e){super(e),this.onDragStart=(t,r)=>{if(wo("Draggable: onDragStart: %j",r),this.props.onStart(t,Lv(this,r))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(t,r)=>{if(!this.state.dragging)return!1;wo("Draggable: onDrag: %j",r);const a=Lv(this,r),o={x:a.x,y:a.y,slackX:0,slackY:0};if(this.props.bounds){const{x:i,y:s}=o;o.x+=this.state.slackX,o.y+=this.state.slackY;const[l,c]=_7(this,o.x,o.y);o.x=l,o.y=c,o.slackX=this.state.slackX+(i-o.x),o.slackY=this.state.slackY+(s-o.y),a.x=o.x,a.y=o.y,a.deltaX=o.x-this.state.x,a.deltaY=o.y-this.state.y}if(this.props.onDrag(t,a)===!1)return!1;this.setState(o)},this.onDragStop=(t,r)=>{if(!this.state.dragging||this.props.onStop(t,Lv(this,r))===!1)return!1;wo("Draggable: onDragStop: %j",r);const o={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:i,y:s}=this.props.position;o.x=i,o.y=s}this.setState(o)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(wo("Draggable: getDerivedStateFromProps %j",{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var e;if((e=this.props)!=null&&e.nodeRef)return this.props.nodeRef.current;const t=o0;return typeof t.findDOMNode=="function"?t.findDOMNode(this):null}render(){const{axis:e,bounds:t,children:r,defaultPosition:a,defaultClassName:o,defaultClassNameDragging:n,defaultClassNameDragged:i,position:s,positionOffset:l,scale:c,...u}=this.props;let d={},m=null;const v=!!!s||this.state.dragging,g=s||a,w={x:C7(this)&&v?this.state.x:g.x,y:x7(this)&&v?this.state.y:g.y};this.state.isElementSVG?m=m7(w,l):d=v7(w,l);const E=Q.Children.only(r),S=_6(E.props.className||"",o,{[n]:this.state.dragging,[i]:this.state.dragged});return Q.createElement($c,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},Q.cloneElement(E,{className:S,style:{...E.props.style,...d},transform:m}))}};Xf.displayName="Draggable";Xf.propTypes={...$c.propTypes,axis:ye.oneOf(["both","x","y","none"]),bounds:ye.oneOfType([ye.shape({left:ye.number,right:ye.number,top:ye.number,bottom:ye.number}),ye.string,ye.oneOf([!1])]),defaultClassName:ye.string,defaultClassNameDragging:ye.string,defaultClassNameDragged:ye.string,defaultPosition:ye.shape({x:ye.number,y:ye.number}),positionOffset:ye.shape({x:ye.oneOfType([ye.number,ye.string]),y:ye.oneOfType([ye.number,ye.string])}),position:ye.shape({x:ye.number,y:ye.number}),className:Uc,style:Uc,transform:Uc};Xf.defaultProps={...$c.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1};var I7=Xf,Uv,Sk;function f3(){if(Sk)return Uv;Sk=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Uv=e,Uv}var Bv,_k;function T7(){if(_k)return Bv;_k=1;var e=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis;return Bv=e,Bv}var Hv,Ck;function p3(){if(Ck)return Hv;Ck=1;var e=T7(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Hv=r,Hv}var zv,xk;function R7(){if(xk)return zv;xk=1;var e=p3(),t=function(){return e.Date.now()};return zv=t,zv}var Vv,Pk;function A7(){if(Pk)return Vv;Pk=1;var e=/\s/;function t(r){for(var a=r.length;a--&&e.test(r.charAt(a)););return a}return Vv=t,Vv}var Wv,Ok;function D7(){if(Ok)return Wv;Ok=1;var e=A7(),t=/^\s+/;function r(a){return a&&a.slice(0,e(a)+1).replace(t,"")}return Wv=r,Wv}var jv,Ik;function v3(){if(Ik)return jv;Ik=1;var e=p3(),t=e.Symbol;return jv=t,jv}var Gv,Tk;function N7(){if(Tk)return Gv;Tk=1;var e=v3(),t=Object.prototype,r=t.hasOwnProperty,a=t.toString,o=e?e.toStringTag:void 0;function n(i){var s=r.call(i,o),l=i[o];try{i[o]=void 0;var c=!0}catch{}var u=a.call(i);return c&&(s?i[o]=l:delete i[o]),u}return Gv=n,Gv}var Kv,Rk;function M7(){if(Rk)return Kv;Rk=1;var e=Object.prototype,t=e.toString;function r(a){return t.call(a)}return Kv=r,Kv}var Yv,Ak;function F7(){if(Ak)return Yv;Ak=1;var e=v3(),t=N7(),r=M7(),a="[object Null]",o="[object Undefined]",n=e?e.toStringTag:void 0;function i(s){return s==null?s===void 0?o:a:n&&n in Object(s)?t(s):r(s)}return Yv=i,Yv}var Xv,Dk;function L7(){if(Dk)return Xv;Dk=1;function e(t){return t!=null&&typeof t=="object"}return Xv=e,Xv}var Jv,Nk;function U7(){if(Nk)return Jv;Nk=1;var e=F7(),t=L7(),r="[object Symbol]";function a(o){return typeof o=="symbol"||t(o)&&e(o)==r}return Jv=a,Jv}var Zv,Mk;function B7(){if(Mk)return Zv;Mk=1;var e=D7(),t=f3(),r=U7(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,i=/^0o[0-7]+$/i,s=parseInt;function l(c){if(typeof c=="number")return c;if(r(c))return a;if(t(c)){var u=typeof c.valueOf=="function"?c.valueOf():c;c=t(u)?u+"":u}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=n.test(c);return d||i.test(c)?s(c.slice(2),d?2:8):o.test(c)?a:+c}return Zv=l,Zv}var Qv,Fk;function H7(){if(Fk)return Qv;Fk=1;var e=f3(),t=R7(),r=B7(),a="Expected a function",o=Math.max,n=Math.min;function i(s,l,c){var u,d,m,b,v,g,w=0,E=!1,S=!1,P=!0;if(typeof s!="function")throw new TypeError(a);l=r(l)||0,e(c)&&(E=!!c.leading,S="maxWait"in c,m=S?o(r(c.maxWait)||0,l):m,P="trailing"in c?!!c.trailing:P);function I(F){var H=u,W=d;return u=d=void 0,w=F,b=s.apply(W,H),b}function O(F){return w=F,v=setTimeout(R,l),E?I(F):b}function T(F){var H=F-g,W=F-w,z=l-H;return S?n(z,m-W):z}function C(F){var H=F-g,W=F-w;return g===void 0||H>=l||H<0||S&&W>=m}function R(){var F=t();if(C(F))return N(F);v=setTimeout(R,T(F))}function N(F){return v=void 0,P&&u?I(F):(u=d=void 0,b)}function U(){v!==void 0&&clearTimeout(v),w=0,u=g=d=v=void 0}function B(){return v===void 0?b:N(t())}function Y(){var F=t(),H=C(F);if(u=arguments,d=this,g=F,H){if(v===void 0)return O(g);if(S)return clearTimeout(v),v=setTimeout(R,l),I(g)}return v===void 0&&(v=setTimeout(R,l)),b}return Y.cancel=U,Y.flush=B,Y}return Qv=i,Qv}H7();var Lg={exports:{}},Lk;function m3(){if(Lk)return Lg.exports;Lk=1;var e=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(e){var t=new Uint8Array(16);Lg.exports=function(){return e(t),t}}else{var r=new Array(16);Lg.exports=function(){for(var o=0,n;o<16;o++)(o&3)===0&&(n=Math.random()*4294967296),r[o]=n>>>((o&3)<<3)&255;return r}}return Lg.exports}var qv,Uk;function b3(){if(Uk)return qv;Uk=1;for(var e=[],t=0;t<256;++t)e[t]=(t+256).toString(16).substr(1);function r(a,o){var n=o||0,i=e;return[i[a[n++]],i[a[n++]],i[a[n++]],i[a[n++]],"-",i[a[n++]],i[a[n++]],"-",i[a[n++]],i[a[n++]],"-",i[a[n++]],i[a[n++]],"-",i[a[n++]],i[a[n++]],i[a[n++]],i[a[n++]],i[a[n++]],i[a[n++]]].join("")}return qv=r,qv}var $v,Bk;function z7(){if(Bk)return $v;Bk=1;var e=m3(),t=b3(),r,a,o=0,n=0;function i(s,l,c){var u=l&&c||0,d=l||[];s=s||{};var m=s.node||r,b=s.clockseq!==void 0?s.clockseq:a;if(m==null||b==null){var v=e();m==null&&(m=r=[v[0]|1,v[1],v[2],v[3],v[4],v[5]]),b==null&&(b=a=(v[6]<<8|v[7])&16383)}var g=s.msecs!==void 0?s.msecs:new Date().getTime(),w=s.nsecs!==void 0?s.nsecs:n+1,E=g-o+(w-n)/1e4;if(E<0&&s.clockseq===void 0&&(b=b+1&16383),(E<0||g>o)&&s.nsecs===void 0&&(w=0),w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=g,n=w,a=b,g+=122192928e5;var S=((g&268435455)*1e4+w)%4294967296;d[u++]=S>>>24&255,d[u++]=S>>>16&255,d[u++]=S>>>8&255,d[u++]=S&255;var P=g/4294967296*1e4&268435455;d[u++]=P>>>8&255,d[u++]=P&255,d[u++]=P>>>24&15|16,d[u++]=P>>>16&255,d[u++]=b>>>8|128,d[u++]=b&255;for(var I=0;I<6;++I)d[u+I]=m[I];return l||t(d)}return $v=i,$v}var em,Hk;function V7(){if(Hk)return em;Hk=1;var e=m3(),t=b3();function r(a,o,n){var i=o&&n||0;typeof a=="string"&&(o=a==="binary"?new Array(16):null,a=null),a=a||{};var s=a.random||(a.rng||e)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,o)for(var l=0;l<16;++l)o[i+l]=s[l];return o||t(s)}return em=r,em}var tm,zk;function W7(){if(zk)return tm;zk=1;var e=z7(),t=V7(),r=t;return r.v1=e,r.v4=t,tm=r,tm}var j7=W7();function Jf(e,t){if(e==null)return{};var r,a,o=Pc(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Vk(e,t,r,a,o,n,i){try{var s=e[n](i),l=s.value}catch(c){return void r(c)}s.done?t(l):Promise.resolve(l).then(a,o)}function Mt(e){return function(){var t=this,r=arguments;return new Promise(function(a,o){var n=e.apply(t,r);function i(l){Vk(n,a,o,i,s,"next",l)}function s(l){Vk(n,a,o,i,s,"throw",l)}i(void 0)})}}var rm={exports:{}},am={exports:{}},Wk;function y3(){return Wk||(Wk=1,(function(e){function t(r,a){this.v=r,this.k=a}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(am)),am.exports}var nm={exports:{}},om={exports:{}},jk;function k3(){return jk||(jk=1,(function(e){function t(r,a,o,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}e.exports=t=function(l,c,u,d){function m(b,v){t(l,b,function(g){return this._invoke(b,v,g)})}c?i?i(l,c,{value:u,enumerable:!d,configurable:!d,writable:!d}):l[c]=u:(m("next",0),m("throw",1),m("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,a,o,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(om)),om.exports}var Gk;function w3(){return Gk||(Gk=1,(function(e){var t=k3();function r(){var a,o,n=typeof Symbol=="function"?Symbol:{},i=n.iterator||"@@iterator",s=n.toStringTag||"@@toStringTag";function l(w,E,S,P){var I=E&&E.prototype instanceof u?E:u,O=Object.create(I.prototype);return t(O,"_invoke",(function(T,C,R){var N,U,B,Y=0,F=R||[],H=!1,W={p:0,n:0,v:a,a:z,f:z.bind(a,4),d:function($,se){return N=$,U=0,B=a,W.n=se,c}};function z(J,$){for(U=J,B=$,o=0;!H&&Y&&!se&&o<F.length;o++){var se,G=F[o],Z=W.p,ue=G[2];J>3?(se=ue===$)&&(B=G[(U=G[4])?5:(U=3,3)],G[4]=G[5]=a):G[0]<=Z&&((se=J<2&&Z<G[1])?(U=0,W.v=$,W.n=G[1]):Z<ue&&(se=J<3||G[0]>$||$>ue)&&(G[4]=J,G[5]=$,W.n=ue,U=0))}if(se||J>1)return c;throw H=!0,$}return function(J,$,se){if(Y>1)throw TypeError("Generator is already running");for(H&&$===1&&z($,se),U=$,B=se;(o=U<2?a:B)||!H;){N||(U?U<3?(U>1&&(W.n=-1),z(U,B)):W.n=B:W.v=B);try{if(Y=2,N){if(U||(J="next"),o=N[J]){if(!(o=o.call(N,B)))throw TypeError("iterator result is not an object");if(!o.done)return o;B=o.value,U<2&&(U=0)}else U===1&&(o=N.return)&&o.call(N),U<2&&(B=TypeError("The iterator does not provide a '"+J+"' method"),U=1);N=a}else if((o=(H=W.n<0)?B:T.call(C,W))!==c)break}catch(G){N=a,U=1,B=G}finally{Y=1}}return{value:o,done:H}}})(w,S,P),!0),O}var c={};function u(){}function d(){}function m(){}o=Object.getPrototypeOf;var b=[][i]?o(o([][i]())):(t(o={},i,function(){return this}),o),v=m.prototype=u.prototype=Object.create(b);function g(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,m):(w.__proto__=m,t(w,s,"GeneratorFunction")),w.prototype=Object.create(v),w}return d.prototype=m,t(v,"constructor",m),t(m,"constructor",d),d.displayName="GeneratorFunction",t(m,s,"GeneratorFunction"),t(v),t(v,s,"Generator"),t(v,i,function(){return this}),t(v,"toString",function(){return"[object Generator]"}),(e.exports=r=function(){return{w:l,m:g}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(nm)),nm.exports}var im={exports:{}},sm={exports:{}},lm={exports:{}},Kk;function E3(){return Kk||(Kk=1,(function(e){var t=y3(),r=k3();function a(o,n){function i(l,c,u,d){try{var m=o[l](c),b=m.value;return b instanceof t?n.resolve(b.v).then(function(v){i("next",v,u,d)},function(v){i("throw",v,u,d)}):n.resolve(b).then(function(v){m.value=v,u(m)},function(v){return i("throw",v,u,d)})}catch(v){d(v)}}var s;this.next||(r(a.prototype),r(a.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),r(this,"_invoke",function(l,c,u){function d(){return new n(function(m,b){i(l,u,m,b)})}return s=s?s.then(d,d):d()},!0)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports})(lm)),lm.exports}var Yk;function S3(){return Yk||(Yk=1,(function(e){var t=w3(),r=E3();function a(o,n,i,s,l){return new r(t().w(o,n,i,s),l||Promise)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports})(sm)),sm.exports}var Xk;function G7(){return Xk||(Xk=1,(function(e){var t=S3();function r(a,o,n,i,s){var l=t(a,o,n,i,s);return l.next().then(function(c){return c.done?c.value:l.next()})}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(im)),im.exports}var cm={exports:{}},Jk;function K7(){return Jk||(Jk=1,(function(e){function t(r){var a=Object(r),o=[];for(var n in a)o.unshift(n);return function i(){for(;o.length;)if((n=o.pop())in a)return i.value=n,i.done=!1,i;return i.done=!0,i}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(cm)),cm.exports}var um={exports:{}},dm={exports:{}},Zk;function Y7(){return Zk||(Zk=1,(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(dm)),dm.exports}var Qk;function X7(){return Qk||(Qk=1,(function(e){var t=Y7().default;function r(a){if(a!=null){var o=a[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(o)return o.call(a);if(typeof a.next=="function")return a;if(!isNaN(a.length))return{next:function(){return a&&n>=a.length&&(a=void 0),{value:a&&a[n++],done:!a}}}}throw new TypeError(t(a)+" is not iterable")}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(um)),um.exports}var qk;function J7(){return qk||(qk=1,(function(e){var t=y3(),r=w3(),a=G7(),o=S3(),n=E3(),i=K7(),s=X7();function l(){var c=r(),u=c.m(l),d=(Object.getPrototypeOf?Object.getPrototypeOf(u):u.__proto__).constructor;function m(g){var w=typeof g=="function"&&g.constructor;return!!w&&(w===d||(w.displayName||w.name)==="GeneratorFunction")}var b={throw:1,return:2,break:3,continue:3};function v(g){var w,E;return function(S){w||(w={stop:function(){return E(S.a,2)},catch:function(){return S.v},abrupt:function(I,O){return E(S.a,b[I],O)},delegateYield:function(I,O,T){return w.resultName=O,E(S.d,s(I),T)},finish:function(I){return E(S.f,I)}},E=function(I,O,T){S.p=w.prev,S.n=w.next;try{return I(O,T)}finally{w.next=S.n}}),w.resultName&&(w[w.resultName]=S.v,w.resultName=void 0),w.sent=S.v,w.next=S.n;try{return g.call(this,w)}finally{S.p=w.prev,S.n=w.next}}}return(e.exports=l=function(){return{wrap:function(E,S,P,I){return c.w(v(E),S,P,I&&I.reverse())},isGeneratorFunction:m,mark:c.m,awrap:function(E,S){return new t(E,S)},AsyncIterator:n,async:function(E,S,P,I,O){return(m(S)?o:a)(v(E),S,P,I,O)},keys:i,values:s}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports})(rm)),rm.exports}var hm,$k;function Z7(){if($k)return hm;$k=1;var e=J7()();hm=e;try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}return hm}var Q7=Z7();const Ge=vt(Q7);var js={},Gs={},gm={},fm={},ew;function Da(){return ew||(ew=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Log=e.LogLevel=void 0;const t=" DEBUG ",r=" INFO ",a=" WARN ",o=" ERROR ";function n(s){return s.unshift("[Statsig]"),s}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class i{static info(...l){i.level>=e.LogLevel.Info&&console.info(r,...n(l))}static debug(...l){i.level>=e.LogLevel.Debug&&console.debug(t,...n(l))}static warn(...l){i.level>=e.LogLevel.Warn&&console.warn(a,...n(l))}static error(...l){i.level>=e.LogLevel.Error&&console.error(o,...n(l))}}e.Log=i,i.level=e.LogLevel.Warn})(fm)),fm}var tw;function Ji(){return tw||(tw=1,(function(e){var t,r,a;Object.defineProperty(e,"__esModule",{value:!0}),e._getInstance=e._getStatsigGlobalFlag=e._getStatsigGlobal=void 0;const o=Da(),n=()=>{try{return typeof __STATSIG__<"u"?__STATSIG__:m}catch{return m}};e._getStatsigGlobal=n;const i=b=>(0,e._getStatsigGlobal)()[b];e._getStatsigGlobalFlag=i;const s=b=>{const v=(0,e._getStatsigGlobal)();return b?v.instances&&v.instances[b]:(v.instances&&Object.keys(v.instances).length>1&&o.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),v.firstInstance)};e._getInstance=s;const l="__STATSIG__",c=typeof window<"u"?window:{},u=typeof globalThis<"u"?globalThis:{},d=typeof globalThis<"u"?globalThis:{},m=(a=(r=(t=c[l])!==null&&t!==void 0?t:u[l])!==null&&r!==void 0?r:d[l])!==null&&a!==void 0?a:{instance:e._getInstance};c[l]=m,u[l]=m,d[l]=m})(gm)),gm}var pm={},rw;function Ob(){return rw||(rw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Diagnostics=void 0;const t=new Map,r="start",a="end",o="statsig::diagnostics";e.Diagnostics={_getMarkers:c=>t.get(c),_markInitOverallStart:c=>{s(c,n({},r,"overall"))},_markInitOverallEnd:(c,u,d)=>{s(c,n({success:u,error:u?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:d},a,"overall"))},_markInitNetworkReqStart:(c,u)=>{s(c,n(u,r,"initialize","network_request"))},_markInitNetworkReqEnd:(c,u)=>{s(c,n(u,a,"initialize","network_request"))},_markInitProcessStart:c=>{s(c,n({},r,"initialize","process"))},_markInitProcessEnd:(c,u)=>{s(c,n(u,a,"initialize","process"))},_clearMarkers:c=>{t.delete(c)},_formatError(c){if(c&&typeof c=="object")return{code:l(c,"code"),name:l(c,"name"),message:l(c,"message")}},_getDiagnosticsData(c,u,d,m){var b;return{success:c?.ok===!0,statusCode:c?.status,sdkRegion:(b=c?.headers)===null||b===void 0?void 0:b.get("x-statsig-region"),isDelta:d.includes('"is_delta":true')===!0?!0:void 0,attempt:u,error:e.Diagnostics._formatError(m)}},_enqueueDiagnosticsEvent(c,u,d,m){const b=e.Diagnostics._getMarkers(d);if(b==null||b.length<=0)return-1;const v=b[b.length-1].timestamp-b[0].timestamp;e.Diagnostics._clearMarkers(d);const g=i(c,{context:"initialize",markers:b.slice(),statsigOptions:m});return u.enqueue(g),v}};function n(c,u,d,m){return Object.assign({key:d,action:u,step:m,timestamp:Date.now()},c)}function i(c,u){return{eventName:o,user:c,value:null,metadata:u,time:Date.now()}}function s(c,u){var d;const m=(d=t.get(c))!==null&&d!==void 0?d:[];m.push(u),t.set(c,m)}function l(c,u){if(u in c)return c[u]}})(pm)),pm}var Ks={},Ys={},vm={},Xs={},aw;function S0(){if(aw)return Xs;aw=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs._isTypeMatch=Xs._typeOf=void 0;function e(r){return Array.isArray(r)?"array":typeof r}Xs._typeOf=e;function t(r,a){const o=n=>Array.isArray(n)?"array":n===null?"null":typeof n;return o(r)===o(a)}return Xs._isTypeMatch=t,Xs}var nw;function eu(){return nw||(nw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._getSortedObject=e._DJB2Object=e._DJB2=void 0;const t=S0(),r=n=>{let i=0;for(let s=0;s<n.length;s++){const l=n.charCodeAt(s);i=(i<<5)-i+l,i=i&i}return String(i>>>0)};e._DJB2=r;const a=(n,i)=>(0,e._DJB2)(JSON.stringify((0,e._getSortedObject)(n,i)));e._DJB2Object=a;const o=(n,i)=>{if(n==null)return null;const s=Object.keys(n).sort(),l={};return s.forEach(c=>{const u=n[c];if(i===0||(0,t._typeOf)(u)!=="object"){l[c]=u;return}l[c]=(0,e._getSortedObject)(u,i!=null?i-1:i)}),l};e._getSortedObject=o})(vm)),vm}var ow;function Zf(){if(ow)return Ys;ow=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys._getStorageKey=Ys._getUserStorageKey=void 0;const e=eu();function t(a,o,n){var i;if(n)return n(a,o);const s=o&&o.customIDs?o.customIDs:{},l=[`uid:${(i=o?.userID)!==null&&i!==void 0?i:""}`,`cids:${Object.keys(s).sort((c,u)=>c.localeCompare(u)).map(c=>`${c}-${s[c]}`).join(",")}`,`k:${a}`];return(0,e._DJB2)(l.join("|"))}Ys._getUserStorageKey=t;function r(a,o,n){return o?t(a,o,n):(0,e._DJB2)(`k:${a}`)}return Ys._getStorageKey=r,Ys}var mm={},iw;function Qf(){return iw||(iw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},e.NetworkDefault={[e.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[e.Endpoint._initialize]:"https://featureassets.org/v1",[e.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}})(mm)),mm}var bm={},sw;function bl(){return sw||(sw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._getUnloadEvent=e._getCurrentPageUrlSafe=e._addDocumentEventListenerSafe=e._addWindowEventListenerSafe=e._isServerEnv=e._getDocumentSafe=e._getWindowSafe=void 0;const t=()=>typeof window<"u"?window:null;e._getWindowSafe=t;const r=()=>{var l;const c=(0,e._getWindowSafe)();return(l=c?.document)!==null&&l!==void 0?l:null};e._getDocumentSafe=r;const a=()=>{if((0,e._getDocumentSafe)()!==null)return!1;const l=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;return typeof EdgeRuntime=="string"||l};e._isServerEnv=a;const o=(l,c)=>{const u=(0,e._getWindowSafe)();typeof u?.addEventListener=="function"&&u.addEventListener(l,c)};e._addWindowEventListenerSafe=o;const n=(l,c)=>{const u=(0,e._getDocumentSafe)();typeof u?.addEventListener=="function"&&u.addEventListener(l,c)};e._addDocumentEventListenerSafe=n;const i=()=>{var l;try{return(l=(0,e._getWindowSafe)())===null||l===void 0?void 0:l.location.href.split(/[?#]/)[0]}catch{return}};e._getCurrentPageUrlSafe=i;const s=()=>{const l=(0,e._getWindowSafe)();return l&&"onpagehide"in l?"pagehide":"beforeunload"};e._getUnloadEvent=s})(bm)),bm}var qa={},lw;function _3(){if(lw)return qa;lw=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa._createLayerParameterExposure=qa._createConfigExposure=qa._mapExposures=qa._createGateExposure=qa._isExposureEvent=void 0;const e="statsig::config_exposure",t="statsig::gate_exposure",r="statsig::layer_exposure",a=(u,d,m,b,v)=>(m.bootstrapMetadata&&(b.bootstrapMetadata=m.bootstrapMetadata),{eventName:u,user:d,value:null,metadata:c(m,b),secondaryExposures:v,time:Date.now()}),o=({eventName:u})=>u===t||u===e||u===r;qa._isExposureEvent=o;const n=(u,d,m)=>{var b,v,g;const w={gate:d.name,gateValue:String(d.value),ruleID:d.ruleID};return((b=d.__evaluation)===null||b===void 0?void 0:b.version)!=null&&(w.configVersion=d.__evaluation.version),a(t,u,d.details,w,i((g=(v=d.__evaluation)===null||v===void 0?void 0:v.secondary_exposures)!==null&&g!==void 0?g:[],m))};qa._createGateExposure=n;function i(u,d){return u.map(m=>typeof m=="string"?(d??{})[m]:m).filter(m=>m!=null)}qa._mapExposures=i;const s=(u,d,m)=>{var b,v,g,w;const E={config:d.name,ruleID:d.ruleID};return((b=d.__evaluation)===null||b===void 0?void 0:b.version)!=null&&(E.configVersion=d.__evaluation.version),((v=d.__evaluation)===null||v===void 0?void 0:v.passed)!=null&&(E.rulePassed=String(d.__evaluation.passed)),a(e,u,d.details,E,i((w=(g=d.__evaluation)===null||g===void 0?void 0:g.secondary_exposures)!==null&&w!==void 0?w:[],m))};qa._createConfigExposure=s;const l=(u,d,m,b)=>{var v,g,w,E,S,P,I;const O=d.__evaluation,T=((v=O?.explicit_parameters)===null||v===void 0?void 0:v.includes(m))===!0;let C="",R=(g=O?.undelegated_secondary_exposures)!==null&&g!==void 0?g:[];T&&(C=(w=O.allocated_experiment_name)!==null&&w!==void 0?w:"",R=(E=O.secondary_exposures)!==null&&E!==void 0?E:[]);const N=(S=d.__evaluation)===null||S===void 0?void 0:S.parameter_rule_ids,U={config:d.name,parameterName:m,ruleID:(P=N?.[m])!==null&&P!==void 0?P:d.ruleID,allocatedExperiment:C,isExplicitParameter:String(T)};return((I=d.__evaluation)===null||I===void 0?void 0:I.version)!=null&&(U.configVersion=d.__evaluation.version),a(r,u,d.details,U,i(R,b))};qa._createLayerParameterExposure=l;const c=(u,d)=>(d.reason=u.reason,u.lcut&&(d.lcut=String(u.lcut)),u.receivedAt&&(d.receivedAt=String(u.receivedAt)),d);return qa}var Js={},cw;function qf(){return cw||(cw=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.LoggingEnabledOption=Js.LogEventCompressionMode=void 0,Js.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},Js.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}),Js}var ym={},uw;function $i(){return uw||(uw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._setObjectInStorage=e._getObjectFromStorage=e.Storage=void 0;const t=Da(),r=bl(),a={},o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:d=>a[d]?a[d]:null,setItem:(d,m)=>{a[d]=m},removeItem:d=>{delete a[d]},getAllKeys:()=>Object.keys(a)};let n=null;try{const d=(0,r._getWindowSafe)();d&&d.localStorage&&typeof d.localStorage.getItem=="function"&&(n={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:m=>d.localStorage.getItem(m),setItem:(m,b)=>d.localStorage.setItem(m,b),removeItem:m=>d.localStorage.removeItem(m),getAllKeys:()=>Object.keys(d.localStorage)})}catch{t.Log.warn("Failed to setup localStorageProvider.")}let i=n??o,s=i;function l(d){try{return d()}catch(m){if(m instanceof Error&&m.name==="SecurityError")return e.Storage._setProvider(o),null;throw m}}e.Storage={isReady:()=>s.isReady(),isReadyResolver:()=>s.isReadyResolver(),getProviderName:()=>s.getProviderName(),getItem:d=>l(()=>s.getItem(d)),setItem:(d,m)=>l(()=>s.setItem(d,m)),removeItem:d=>s.removeItem(d),getAllKeys:()=>s.getAllKeys(),_setProvider:d=>{i=d,s=d},_setDisabled:d=>{d?s=o:s=i}};function c(d){const m=e.Storage.getItem(d);try{return JSON.parse(m??"null")}catch{return t.Log.error(`Failed to parse value for key "${d}"`),null}}e._getObjectFromStorage=c;function u(d,m){e.Storage.setItem(d,JSON.stringify(m))}e._setObjectInStorage=u})(ym)),ym}var dd={},dw;function C3(){if(dw)return dd;dw=1,Object.defineProperty(dd,"__esModule",{value:!0}),dd.UrlConfiguration=void 0;const e=eu(),t=Qf(),r={[t.Endpoint._initialize]:"i",[t.Endpoint._rgstr]:"e",[t.Endpoint._download_config_specs]:"d"};let a=class{constructor(n,i,s,l){this.customUrl=null,this.fallbackUrls=null,this.endpoint=n,this.endpointDnsKey=r[n],i&&(this.customUrl=i),!i&&s&&(this.customUrl=s.endsWith("/")?`${s}${n}`:`${s}/${n}`),l&&(this.fallbackUrls=l);const c=t.NetworkDefault[n];this.defaultUrl=`${c}/${n}`}getUrl(){var n;return(n=this.customUrl)!==null&&n!==void 0?n:this.defaultUrl}getChecksum(){var n;const i=((n=this.fallbackUrls)!==null&&n!==void 0?n:[]).sort().join(",");return(0,e._DJB2)(this.customUrl+i)}};return dd.UrlConfiguration=a,dd}var km={},hw;function _0(){return hw||(hw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._notifyVisibilityChanged=e._subscribeToVisiblityChanged=e._isUnloading=e._isCurrentlyVisible=void 0;const t=bl(),r="foreground",a="background",o=[];let n=r,i=!1;const s=()=>n===r;e._isCurrentlyVisible=s;const l=()=>i;e._isUnloading=l;const c=d=>{o.unshift(d)};e._subscribeToVisiblityChanged=c;const u=d=>{d!==n&&(n=d,o.forEach(m=>m(d)))};e._notifyVisibilityChanged=u,(0,t._addWindowEventListenerSafe)("focus",()=>{i=!1,(0,e._notifyVisibilityChanged)(r)}),(0,t._addWindowEventListenerSafe)("blur",()=>(0,e._notifyVisibilityChanged)(a)),(0,t._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,e._notifyVisibilityChanged)(document.visibilityState==="visible"?r:a)}),(0,t._addWindowEventListenerSafe)((0,t._getUnloadEvent)(),()=>{i=!0,(0,e._notifyVisibilityChanged)(a)})})(km)),km}var gw;function x3(){if(gw)return Ks;gw=1;var e=Ks&&Ks.__awaiter||function(P,I,O,T){function C(R){return R instanceof O?R:new O(function(N){N(R)})}return new(O||(O=Promise))(function(R,N){function U(F){try{Y(T.next(F))}catch(H){N(H)}}function B(F){try{Y(T.throw(F))}catch(H){N(H)}}function Y(F){F.done?R(F.value):C(F.value).then(U,B)}Y((T=T.apply(P,I||[])).next())})};Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.EventLogger=void 0;const t=Zf(),r=eu(),a=Da(),o=Qf(),n=bl(),i=_3(),s=qf(),l=$i(),c=C3(),u=_0(),d=100,m=1e4,b=1e3,v=6e5,g=500,w=200,E={};let S=class Oc{static _safeFlushAndForget(I){var O;(O=E[I])===null||O===void 0||O.flush().catch(()=>{})}static _safeRetryFailedLogs(I){var O;(O=E[I])===null||O===void 0||O._retryFailedLogs()}constructor(I,O,T,C){var R,N;this._sdkKey=I,this._emitter=O,this._network=T,this._options=C,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=(R=C?.loggingEnabled)!==null&&R!==void 0?R:C?.disableLogging===!0?s.LoggingEnabledOption.disabled:s.LoggingEnabledOption.browserOnly,C?.loggingEnabled&&C.disableLogging!==void 0&&a.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=(N=C?.loggingBufferMaxSize)!==null&&N!==void 0?N:d;const U=C?.networkConfig;this._logEventUrlConfig=new c.UrlConfiguration(o.Endpoint._rgstr,U?.logEventUrl,U?.api,U?.logEventFallbackUrls)}setLogEventCompressionMode(I){this._network.setLogEventCompressionMode(I)}setLoggingEnabled(I){if(this._loggingEnabled==="disabled"&&I!=="disabled"){const O=this._getStorageKey(),T=(0,l._getObjectFromStorage)(O);T&&this._queue.push(...T),l.Storage.removeItem(O)}this._loggingEnabled=I}enqueue(I){this._shouldLogEvent(I)&&(this._normalizeAndAppendEvent(I),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&Oc._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(I){var O;const T=(O=this._nonExposedChecks[I])!==null&&O!==void 0?O:0;this._nonExposedChecks[I]=T+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var I;const O=(0,n._isServerEnv)();O&&((I=this._options)===null||I===void 0?void 0:I.loggingEnabled)!=="always"||(E[this._sdkKey]=this,O||(0,u._subscribeToVisiblityChanged)(T=>{T==="background"?Oc._safeFlushAndForget(this._sdkKey):T==="foreground"&&Oc._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(),this._startBackgroundFlushInterval())}stop(){return e(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete E[this._sdkKey],yield this.flush()})}flush(){return e(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),this._queue.length===0)return;const I=this._queue;this._queue=[],yield this._sendEvents(I)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,!(Date.now()-this._creationTime>w)&&setTimeout(()=>Oc._safeFlushAndForget(this._sdkKey),w))}_shouldLogEvent(I){var O;if(((O=this._options)===null||O===void 0?void 0:O.loggingEnabled)!=="always"&&(0,n._isServerEnv)())return!1;if(!(0,i._isExposureEvent)(I))return!0;const T=I.user?I.user:{statsigEnvironment:void 0},C=(0,t._getUserStorageKey)(this._sdkKey,T),R=I.metadata?I.metadata:{},N=[I.eventName,C,R.gate,R.config,R.ruleID,R.allocatedExperiment,R.parameterName,String(R.isExplicitParameter),R.reason].join("|"),U=this._lastExposureTimeMap[N],B=Date.now();return U&&B-U<v?!1:(Object.keys(this._lastExposureTimeMap).length>b&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[N]=B,!0)}_sendEvents(I){return e(this,void 0,void 0,function*(){var O,T;if(this._loggingEnabled==="disabled")return this._saveFailedLogsToStorage(I),!1;try{const R=(0,u._isUnloading)()&&this._network.isBeaconSupported()&&((T=(O=this._options)===null||O===void 0?void 0:O.networkConfig)===null||T===void 0?void 0:T.networkOverrideFunc)==null;return this._emitter({name:"pre_logs_flushed",events:I}),(R?this._sendEventsViaBeacon(I):yield this._sendEventsViaPost(I)).success?(this._emitter({name:"logs_flushed",events:I}),!0):(a.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(I),!1)}catch{return a.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(I){return e(this,void 0,void 0,function*(){var O;const T=yield this._network.post(this._getRequestData(I)),C=(O=T?.code)!==null&&O!==void 0?O:-1;return{success:C>=200&&C<300}})}_sendEventsViaBeacon(I){return{success:this._network.beacon(this._getRequestData(I))}}_getRequestData(I){return{sdkKey:this._sdkKey,data:{events:I},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[o.NetworkParam.EventCount]:String(I.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(I){for(;I.length>g;)I.shift();const O=this._getStorageKey();try{const T=this._getFailedLogsFromStorage(O);(0,l._setObjectInStorage)(O,[...T,...I])}catch{a.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(I){let O=[];try{const T=(0,l._getObjectFromStorage)(I);return Array.isArray(T)&&(O=T),O}catch{return[]}}_retryFailedLogs(){const I=this._getStorageKey();e(this,void 0,void 0,function*(){l.Storage.isReady()||(yield l.Storage.isReadyResolver());const O=(0,l._getObjectFromStorage)(I);O&&(l.Storage.removeItem(I),yield this._sendEvents(O))}).catch(()=>{a.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,r._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(I){I.user&&(I.user=Object.assign({},I.user),delete I.user.privateAttributes);const O={},T=this._getCurrentPageUrl();T&&(O.statsigMetadata={currentPage:T});const C=Object.assign(Object.assign({},I),O);a.Log.debug("Enqueued Event:",C),this._queue.push(C)}_appendAndResetNonExposedChecks(){Object.keys(this._nonExposedChecks).length!==0&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var I;if(((I=this._options)===null||I===void 0?void 0:I.includeCurrentPageUrlWithEvents)!==!1)return(0,n._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var I,O;const T=(O=(I=this._options)===null||I===void 0?void 0:I.loggingIntervalMs)!==null&&O!==void 0?O:m,C=setInterval(()=>{const R=E[this._sdkKey];!R||R._flushIntervalId!==C?clearInterval(C):Oc._safeFlushAndForget(this._sdkKey)},T);this._flushIntervalId=C}};return Ks.EventLogger=S,Ks}var wm={},fw;function kf(){return fw||(fw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.30.2";let t={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>t,add:r=>{t=Object.assign(Object.assign({},t),r)}}})(wm)),wm}var Em={},pw;function q7(){return pw||(pw=1,Object.defineProperty(Em,"__esModule",{value:!0})),Em}var ai={},Zs={},hd={},vw;function C0(){if(vw)return hd;vw=1,Object.defineProperty(hd,"__esModule",{value:!0}),hd.getUUID=void 0;function e(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let t=new Date().getTime(),r=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(Math.random()*4)]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,o=>{let n=Math.random()*16;return t>0?(n=(t+n)%16|0,t=Math.floor(t/16)):(n=(r+n)%16|0,r=Math.floor(r/16)),(o==="x"?n:n&7|8).toString(16)})}return hd.getUUID=e,hd}var mw;function $f(){if(mw)return Zs;mw=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.getCookieName=Zs.StableID=void 0;const e=Zf(),t=Da(),r=bl(),a=$i(),o=C0(),n={},i={},s={};Zs.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:v=>{if(s[v])return null;if(n[v]!=null)return n[v];let g=null;return g=d(v),g!=null?(n[v]=g,c(g,v),g):(g=u(v),g==null&&(g=(0,o.getUUID)()),c(g,v),m(g,v),n[v]=g,g)},setOverride:(v,g)=>{n[g]=v,c(v,g),m(v,g)},_setCookiesEnabled:(v,g)=>{i[v]=g},_setDisabled:(v,g)=>{s[v]=g}};function l(v){return`statsig.stable_id.${(0,e._getStorageKey)(v)}`}function c(v,g){const w=l(g);try{(0,a._setObjectInStorage)(w,v)}catch{t.Log.warn("Failed to save StableID to storage")}}function u(v){const g=l(v);return(0,a._getObjectFromStorage)(g)}function d(v){if(!i[v]||(0,r._getDocumentSafe)()==null)return null;const g=document.cookie.split(";");for(const w of g){const[E,S]=w.trim().split("=");if(E===b(v))return decodeURIComponent(S)}return null}function m(v,g){if(!i[g]||(0,r._getDocumentSafe)()==null)return;const w=new Date;w.setFullYear(w.getFullYear()+1),document.cookie=`${b(g)}=${encodeURIComponent(v)}; expires=${w.toUTCString()}; path=/`}function b(v){return`statsig.stable_id.${(0,e._getStorageKey)(v)}`}return Zs.getCookieName=b,Zs}var Qs={},bw;function P3(){if(bw)return Qs;bw=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs._getFullUserHash=Qs._normalizeUser=void 0;const e=eu(),t=Da();function r(o,n,i){try{const s=JSON.parse(JSON.stringify(o));return n!=null&&n.environment!=null?s.statsigEnvironment=n.environment:i!=null&&(s.statsigEnvironment={tier:i}),s}catch{return t.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}}Qs._normalizeUser=r;function a(o){return o?(0,e._DJB2Object)(o):null}return Qs._getFullUserHash=a,Qs}var gd={},yw;function O3(){if(yw)return gd;yw=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd._typedJsonParse=void 0;const e=Da();function t(r,a,o){try{const n=JSON.parse(r);if(n&&typeof n=="object"&&a in n)return n}catch{}return e.Log.error(`Failed to parse ${o}`),null}return gd._typedJsonParse=t,gd}var kw;function $7(){if(kw)return ai;kw=1;var e=ai&&ai.__awaiter||function(m,b,v,g){function w(E){return E instanceof v?E:new v(function(S){S(E)})}return new(v||(v=Promise))(function(E,S){function P(T){try{O(g.next(T))}catch(C){S(C)}}function I(T){try{O(g.throw(T))}catch(C){S(C)}}function O(T){T.done?E(T.value):w(T.value).then(P,I)}O((g=g.apply(m,b||[])).next())})};Object.defineProperty(ai,"__esModule",{value:!0}),ai._makeDataAdapterResult=ai.DataAdapterCore=void 0;const t=Da(),r=$f(),a=P3(),o=$i(),n=O3(),i=10,s=8;let l=class{constructor(b,v){this._adapterName=b,this._cacheSuffix=v,this._options=null,this._sdkKey=null,this._cacheLimit=i,this._lastModifiedStoreKey=`statsig.last_modified_time.${v}`,this._inMemoryCache=new u}attach(b,v,g){this._sdkKey=b,this._options=v}getDataSync(b){const v=b&&(0,a._normalizeUser)(b,this._options),g=this._getCacheKey(v),w=this._inMemoryCache.get(g,v);if(w&&this._getIsCacheValueValid(w))return w;const E=this._loadFromCache(g);return E&&this._getIsCacheValueValid(E)?(this._inMemoryCache.add(g,E,this._cacheLimit),this._inMemoryCache.get(g,v)):null}setData(b,v){const g=v&&(0,a._normalizeUser)(v,this._options),w=this._getCacheKey(g);this._inMemoryCache.add(w,c("Bootstrap",b,null,g),this._cacheLimit)}_getIsCacheValueValid(b){return b.stableID==null||b.stableID===r.StableID.get(this._getSdkKey())}_getDataAsyncImpl(b,v,g){return e(this,void 0,void 0,function*(){o.Storage.isReady()||(yield o.Storage.isReadyResolver());const w=b??this.getDataSync(v),E=[this._fetchAndPrepFromNetwork(w,v,g)];return g?.timeoutMs&&E.push(new Promise(S=>setTimeout(S,g.timeoutMs)).then(()=>(t.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(E)})}_prefetchDataImpl(b,v){return e(this,void 0,void 0,function*(){const g=b&&(0,a._normalizeUser)(b,this._options),w=this._getCacheKey(g),E=yield this._getDataAsyncImpl(null,g,v);E&&this._inMemoryCache.add(w,Object.assign(Object.assign({},E),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(b,v,g){return e(this,void 0,void 0,function*(){var w;const E=(w=b?.data)!==null&&w!==void 0?w:null,S=b!=null&&this._isCachedResultValidFor204(b,v),P=yield this._fetchFromNetwork(E,v,g,S);if(!P)return t.Log.debug("No response returned for latest value"),null;const I=(0,n._typedJsonParse)(P,"has_updates","Response"),O=this._getSdkKey(),T=r.StableID.get(O);let C=null;if(I?.has_updates===!0)C=c("Network",P,T,v);else if(E&&I?.has_updates===!1)C=c("NetworkNotModified",E,T,v);else return null;const R=this._getCacheKey(v);return this._inMemoryCache.add(R,C,this._cacheLimit),this._writeToCache(R,C),C})}_getSdkKey(){return this._sdkKey!=null?this._sdkKey:(t.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(b){var v;const g=(v=o.Storage.getItem)===null||v===void 0?void 0:v.call(o.Storage,b);if(g==null)return null;const w=(0,n._typedJsonParse)(g,"source","Cached Result");return w?Object.assign(Object.assign({},w),{source:"Cache"}):null}_writeToCache(b,v){const g=JSON.stringify(v);for(let w=0;w<s;w++)try{o.Storage.setItem(b,g);break}catch(E){if(!(E instanceof Error)||!(E.toString().includes("QuotaExceededError")||E.toString().includes("QUOTA_EXCEEDED_ERR"))||this._cacheLimit<=1)throw E;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(b,this._cacheLimit-1)}this._runLocalStorageCacheEviction(b)}_runLocalStorageCacheEviction(b,v=this._cacheLimit){var g;const w=(g=(0,o._getObjectFromStorage)(this._lastModifiedStoreKey))!==null&&g!==void 0?g:{};w[b]=Date.now();const E=d(w,v);for(const S of E)delete w[S],o.Storage.removeItem(S);(0,o._setObjectInStorage)(this._lastModifiedStoreKey,w)}};ai.DataAdapterCore=l;function c(m,b,v,g){return{source:m,data:b,receivedAt:Date.now(),stableID:v,fullUserHash:(0,a._getFullUserHash)(g)}}ai._makeDataAdapterResult=c;class u{constructor(){this._data={}}get(b,v){var g;const w=this._data[b],E=w?.stableID,S=(g=v?.customIDs)===null||g===void 0?void 0:g.stableID;return S&&E&&S!==E?(t.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):w}add(b,v,g){const w=d(this._data,g-1);for(const E of w)delete this._data[E];this._data[b]=v}merge(b){this._data=Object.assign(Object.assign({},this._data),b)}}function d(m,b){const v=Object.keys(m);return v.length<=b?[]:b===0?v:v.sort((g,w)=>{const E=m[g],S=m[w];return typeof E=="object"&&typeof S=="object"?E.receivedAt-S.receivedAt:E-S}).slice(0,v.length-b)}return ai}var Sm={},ww;function e8(){return ww||(ww=1,Object.defineProperty(Sm,"__esModule",{value:!0})),Sm}var fd={},pd={},Ew;function x0(){if(Ew)return pd;Ew=1,Object.defineProperty(pd,"__esModule",{value:!0}),pd.SDKType=void 0;const e={};let t;return pd.SDKType={_get:r=>{var a;return((a=e[r])!==null&&a!==void 0?a:"js-mono")+(t??"")},_setClientType(r,a){e[r]=a},_setBindingType(r){(!t||t==="-react")&&(t="-"+r)}},pd}var Sw;function I3(){return Sw||(Sw=1,(function(e){var t=fd&&fd.__awaiter||function(d,m,b,v){function g(w){return w instanceof b?w:new b(function(E){E(w)})}return new(b||(b=Promise))(function(w,E){function S(O){try{I(v.next(O))}catch(T){E(T)}}function P(O){try{I(v.throw(O))}catch(T){E(T)}}function I(O){O.done?w(O.value):g(O.value).then(S,P)}I((v=v.apply(d,m||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorBoundary=e.EXCEPTION_ENDPOINT=void 0;const r=Da(),a=x0(),o=kf();e.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const n="[Statsig] UnknownError";let i=class{constructor(m,b,v,g){this._sdkKey=m,this._options=b,this._emitter=v,this._lastSeenError=g,this._seen=new Set}wrap(m,b){try{const v=m;c(v).forEach(g=>{const w=v[g];"$EB"in w||(v[g]=(...E)=>this._capture(b?`${b}:${g}`:g,()=>w.apply(m,E)),v[g].$EB=!0)})}catch(v){this._onError("eb:wrap",v)}}logError(m,b){this._onError(m,b)}getLastSeenErrorAndReset(){const m=this._lastSeenError;return this._lastSeenError=void 0,m??null}attachErrorIfNoneExists(m){this._lastSeenError||(this._lastSeenError=s(m))}_capture(m,b){try{const v=b();return v&&v instanceof Promise?v.catch(g=>this._onError(m,g)):v}catch(v){return this._onError(m,v),null}}_onError(m,b){try{r.Log.warn(`Caught error in ${m}`,{error:b}),t(this,void 0,void 0,function*(){var g,w,E,S,P,I,O;const T=b||Error(n),C=T instanceof Error,R=C?T.name:"No Name",N=s(T);if(this._lastSeenError=N,this._seen.has(R))return;if(this._seen.add(R),!((w=(g=this._options)===null||g===void 0?void 0:g.networkConfig)===null||w===void 0)&&w.preventAllNetworkTraffic){(E=this._emitter)===null||E===void 0||E.call(this,{name:"error",error:b,tag:m});return}const U=a.SDKType._get(this._sdkKey),B=o.StatsigMetadataProvider.get(),Y=C?T.stack:l(T),F=Object.assign({tag:m,exception:R,info:Y,statsigOptions:u(this._options)},Object.assign(Object.assign({},B),{sdkType:U}));yield((I=(P=(S=this._options)===null||S===void 0?void 0:S.networkConfig)===null||P===void 0?void 0:P.networkOverrideFunc)!==null&&I!==void 0?I:fetch)(e.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(U),"STATSIG-SDK-VERSION":String(B.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(F)}),(O=this._emitter)===null||O===void 0||O.call(this,{name:"error",error:b,tag:m})}).then(()=>{}).catch(()=>{})}catch{}}};e.ErrorBoundary=i;function s(d){return d instanceof Error?d:typeof d=="string"?new Error(d):new Error("An unknown error occurred.")}function l(d){try{return JSON.stringify(d)}catch{return n}}function c(d){const m=new Set;let b=Object.getPrototypeOf(d);for(;b&&b!==Object.prototype;)Object.getOwnPropertyNames(b).filter(v=>typeof b?.[v]=="function").forEach(v=>m.add(v)),b=Object.getPrototypeOf(b);return Array.from(m)}function u(d){if(!d)return{};const m={};return Object.keys(d).forEach(b=>{const v=b,g=d[v];switch(typeof g){case"number":case"bigint":case"boolean":m[String(v)]=g;break;case"string":g.length<50?m[String(v)]=g:m[String(v)]="set";break;case"object":v==="environment"?m.environment=g:v==="networkConfig"?m.networkConfig=g:m[String(v)]=g!=null?"set":"unset";break}}),m}})(fd)),fd}var _m={},_w;function t8(){return _w||(_w=1,Object.defineProperty(_m,"__esModule",{value:!0})),_m}var Cm={},Cw;function r8(){return Cw||(Cw=1,Object.defineProperty(Cm,"__esModule",{value:!0})),Cm}var xm={},xw;function a8(){return xw||(xw=1,Object.defineProperty(xm,"__esModule",{value:!0})),xm}var qs={},Pw;function T3(){if(Pw)return qs;Pw=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.createMemoKey=qs.MemoPrefix=void 0,qs.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const e=new Set([]),t=new Set(["userPersistedValues"]);function r(a,o,n){let i=`${a}|${o}`;if(!n)return i;for(const s of Object.keys(n)){if(t.has(s))return;e.has(s)?i+=`|${s}=true`:i+=`|${s}=${n[s]}`}return i}return qs.createMemoKey=r,qs}var $s={},ni={},el={},Ow;function n8(){if(Ow)return el;Ow=1;var e=el&&el.__awaiter||function(s,l,c,u){function d(m){return m instanceof c?m:new c(function(b){b(m)})}return new(c||(c=Promise))(function(m,b){function v(E){try{w(u.next(E))}catch(S){b(S)}}function g(E){try{w(u.throw(E))}catch(S){b(S)}}function w(E){E.done?m(E.value):d(E.value).then(v,g)}w((u=u.apply(s,l||[])).next())})};Object.defineProperty(el,"__esModule",{value:!0}),el._fetchTxtRecords=void 0;const t=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),r="https://cloudflare-dns.com/dns-query",a=["i","e","d"],o=200;function n(s){return e(this,void 0,void 0,function*(){const l=yield s(r,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:t});if(!l.ok){const d=new Error("Failed to fetch TXT records from DNS");throw d.name="DnsTxtFetchError",d}const c=yield l.arrayBuffer(),u=new Uint8Array(c);return i(u)})}el._fetchTxtRecords=n;function i(s){const l=s.findIndex((u,d)=>d<o&&String.fromCharCode(u)==="="&&a.includes(String.fromCharCode(s[d-1])));if(l===-1){const u=new Error("Failed to parse TXT records from DNS");throw u.name="DnsTxtParseError",u}let c="";for(let u=l-1;u<s.length;u++)c+=String.fromCharCode(s[u]);return c.split(",")}return el}var Iw;function o8(){if(Iw)return ni;Iw=1;var e=ni&&ni.__awaiter||function(b,v,g,w){function E(S){return S instanceof g?S:new g(function(P){P(S)})}return new(g||(g=Promise))(function(S,P){function I(C){try{T(w.next(C))}catch(R){P(R)}}function O(C){try{T(w.throw(C))}catch(R){P(R)}}function T(C){C.done?S(C.value):E(C.value).then(I,O)}T((w=w.apply(b,v||[])).next())})};Object.defineProperty(ni,"__esModule",{value:!0}),ni._isDomainFailure=ni.NetworkFallbackResolver=void 0;const t=n8(),r=eu(),a=Da(),o=$i(),n=10080*60*1e3,i=14400*1e3;let s=class{constructor(v){var g;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=(g=v.networkConfig)===null||g===void 0?void 0:g.networkOverrideFunc}setErrorBoundary(v){this._errorBoundary=v}tryBumpExpiryTime(v,g){var w;const E=(w=this._fallbackInfo)===null||w===void 0?void 0:w[g.endpoint];E&&(E.expiryTime=Date.now()+n,u(v,Object.assign(Object.assign({},this._fallbackInfo),{[g.endpoint]:E})))}getActiveFallbackUrl(v,g){var w,E;if(g.customUrl!=null&&g.fallbackUrls!=null)return null;let S=this._fallbackInfo;S==null&&(S=(w=d(v))!==null&&w!==void 0?w:{},this._fallbackInfo=S);const P=S[g.endpoint];return!P||Date.now()>((E=P.expiryTime)!==null&&E!==void 0?E:0)||g.getChecksum()!==P.urlConfigChecksum?(delete S[g.endpoint],this._fallbackInfo=S,u(v,this._fallbackInfo),null):P.url?P.url:null}tryFetchUpdatedFallbackInfo(v,g,w,E){return e(this,void 0,void 0,function*(){var S,P;try{if(!l(w,E))return!1;const O=g.customUrl==null&&g.fallbackUrls==null?yield this._tryFetchFallbackUrlsFromNetwork(g):g.fallbackUrls,T=this._pickNewFallbackUrl((S=this._fallbackInfo)===null||S===void 0?void 0:S[g.endpoint],O);return T?(this._updateFallbackInfoWithNewUrl(v,g,T),!0):!1}catch(I){return(P=this._errorBoundary)===null||P===void 0||P.logError("tryFetchUpdatedFallbackInfo",I),!1}})}_updateFallbackInfoWithNewUrl(v,g,w){var E,S,P;const I={urlConfigChecksum:g.getChecksum(),url:w,expiryTime:Date.now()+n,previous:[]},O=g.endpoint,T=(E=this._fallbackInfo)===null||E===void 0?void 0:E[O];T&&I.previous.push(...T.previous),I.previous.length>10&&(I.previous=[]);const C=(P=(S=this._fallbackInfo)===null||S===void 0?void 0:S[O])===null||P===void 0?void 0:P.url;C!=null&&I.previous.push(C),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[O]:I}),u(v,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(v){return e(this,void 0,void 0,function*(){var g;const w=this._dnsQueryCooldowns[v.endpoint];if(w&&Date.now()<w)return null;this._dnsQueryCooldowns[v.endpoint]=Date.now()+i;const E=[],S=yield(0,t._fetchTxtRecords)((g=this._networkOverrideFunc)!==null&&g!==void 0?g:fetch),P=m(v.defaultUrl);for(const I of S){if(!I.startsWith(v.endpointDnsKey+"="))continue;const O=I.split("=");if(O.length>1){let T=O[1];T.endsWith("/")&&(T=T.slice(0,-1)),E.push(`https://${T}${P}`)}}return E})}_pickNewFallbackUrl(v,g){var w;if(g==null)return null;const E=new Set((w=v?.previous)!==null&&w!==void 0?w:[]),S=v?.url;let P=null;for(const I of g){const O=I.endsWith("/")?I.slice(0,-1):I;if(!E.has(I)&&O!==S){P=O;break}}return P}};ni.NetworkFallbackResolver=s;function l(b,v){var g;const w=(g=b?.toLowerCase())!==null&&g!==void 0?g:"";return v||w.includes("uncaught exception")||w.includes("failed to fetch")||w.includes("networkerror when attempting to fetch resource")}ni._isDomainFailure=l;function c(b){return`statsig.network_fallback.${(0,r._DJB2)(b)}`}function u(b,v){const g=c(b);if(!v||Object.keys(v).length===0){o.Storage.removeItem(g);return}o.Storage.setItem(g,JSON.stringify(v))}function d(b){const v=c(b),g=o.Storage.getItem(v);if(!g)return null;try{return JSON.parse(g)}catch{return a.Log.error("Failed to parse FallbackInfo"),null}}function m(b){try{return new URL(b).pathname}catch{return null}}return ni}var vd={},Tw;function R3(){if(Tw)return vd;Tw=1,Object.defineProperty(vd,"__esModule",{value:!0}),vd.SDKFlags=void 0;const e={};return vd.SDKFlags={setFlags:(t,r)=>{e[t]=r},get:(t,r)=>{var a,o;return(o=(a=e[t])===null||a===void 0?void 0:a[r])!==null&&o!==void 0?o:!1}},vd}var Pm={},Rw;function P0(){return Rw||(Rw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigSession=e.SessionID=void 0;const t=Ji(),r=Zf(),a=Da(),o=$i(),n=C0(),i=1800*1e3,s=14400*1e3,l={};e.SessionID={get:S=>e.StatsigSession.get(S).data.sessionID},e.StatsigSession={get:S=>{l[S]==null&&(l[S]=c(S));const P=l[S];return d(P)},overrideInitialSessionID:(S,P)=>{l[P]=u(S,P)}};function c(S){let P=E(S);const I=Date.now();return P||(P={sessionID:(0,n.getUUID)(),startTime:I,lastUpdate:I}),{data:P,sdkKey:S}}function u(S,P){const I=Date.now();return{data:{sessionID:S,startTime:I,lastUpdate:I},sdkKey:P}}function d(S){const P=Date.now(),I=S.data,O=S.sdkKey;if(b(I)||v(I)){I.sessionID=(0,n.getUUID)(),I.startTime=P;const C=__STATSIG__==null?void 0:__STATSIG__.instance(O);C&&C.$emt({name:"session_expired"})}I.lastUpdate=P,w(I,S.sdkKey),clearTimeout(S.idleTimeoutID),clearTimeout(S.ageTimeoutID);const T=P-I.startTime;return S.idleTimeoutID=m(O,i),S.ageTimeoutID=m(O,s-T),S}function m(S,P){return setTimeout(()=>{var I;const O=(I=(0,t._getStatsigGlobal)())===null||I===void 0?void 0:I.instance(S);O&&O.$emt({name:"session_expired"})},P)}function b({lastUpdate:S}){return Date.now()-S>i}function v({startTime:S}){return Date.now()-S>s}function g(S){return`statsig.session_id.${(0,r._getStorageKey)(S)}`}function w(S,P){const I=g(P);try{(0,o._setObjectInStorage)(I,S)}catch{a.Log.warn("Failed to save SessionID")}}function E(S){const P=g(S);return(0,o._getObjectFromStorage)(P)}})(Pm)),Pm}var md={},Aw;function A3(){return Aw||(Aw=1,Object.defineProperty(md,"__esModule",{value:!0}),md.ErrorTag=void 0,md.ErrorTag={NetworkError:"NetworkError"}),md}var Dw;function i8(){if(Dw)return $s;Dw=1;var e=$s&&$s.__awaiter||function(W,z,J,$){function se(G){return G instanceof J?G:new J(function(Z){Z(G)})}return new(J||(J=Promise))(function(G,Z){function ue(ke){try{le($.next(ke))}catch(Te){Z(Te)}}function ne(ke){try{le($.throw(ke))}catch(Te){Z(Te)}}function le(ke){ke.done?G(ke.value):se(ke.value).then(ue,ne)}le(($=$.apply(W,z||[])).next())})};Object.defineProperty($s,"__esModule",{value:!0}),$s.NetworkCore=void 0,Ji();const t=Ji(),r=Ob(),a=Da(),o=Qf(),n=o8(),i=R3(),s=x0(),l=bl(),c=P0(),u=$f(),d=A3(),m=kf(),b=qf(),v=_0(),g=1e4,w=500,E=3e4,S=1e3,P=50,I=P/S,O=new Set([408,500,502,503,504,522,524,599]);let T=class{constructor(z,J){this._emitter=J,this._errorBoundary=null,this._timeout=g,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,z&&(this._options=z),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new n.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(z))}setLogEventCompressionMode(z){this._options.logEventCompressionMode=z}setErrorBoundary(z){this._errorBoundary=z,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(z)}isBeaconSupported(){return typeof navigator<"u"&&typeof navigator.sendBeacon=="function"}getLastUsedInitUrlAndReset(){const z=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,z}beacon(z){if(!C(z))return!1;const J=this._getInternalRequestArgs("POST",z),$=this._getPopulatedURL(J),se=navigator;return se.sendBeacon.bind(se)($,J.body)}post(z){return e(this,void 0,void 0,function*(){const J=this._getInternalRequestArgs("POST",z);return this._tryEncodeBody(J),yield this._tryToCompressBody(J),this._sendRequest(J)})}get(z){const J=this._getInternalRequestArgs("GET",z);return this._sendRequest(J)}_sendRequest(z){return e(this,void 0,void 0,function*(){var J,$,se,G;if(!C(z)||this._netConfig.preventAllNetworkTraffic)return null;const{method:Z,body:ue,retries:ne,attempt:le}=z,ke=z.urlConfig.endpoint;if(this._isRateLimited(ke))return a.Log.warn(`Request to ${ke} was blocked because you are making requests too frequently.`),null;const Te=le??1;let ae=!1;const Se=this._getPopulatedURL(z);let Oe=null;const Je=(0,v._isUnloading)();try{const Ae={method:Z,body:ue,headers:Object.assign({},z.headers),priority:z.priority,keepalive:Je};Y(z,Te);const je=this._leakyBucket[ke];je&&(je.lastRequestTime=Date.now(),this._leakyBucket[ke]=je);const j=(J=this._netConfig.networkOverrideFunc)!==null&&J!==void 0?J:fetch;let Qe;if(Oe=yield Promise.race([j(Se,Ae).finally(()=>clearTimeout(Qe)),new Promise((Pe,Ze)=>{Qe=setTimeout(()=>{ae=!0,Ze(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!Oe.ok){const Pe=yield Oe.text().catch(()=>"No Text"),Ze=new Error(`NetworkError: ${Se} ${Pe}`);throw Ze.name="NetworkError",Ze}const ce=yield Oe.text();return F(z,Oe,Te,ce),this._fallbackResolver.tryBumpExpiryTime(z.sdkKey,z.urlConfig),{body:ce,code:Oe.status}}catch(Ae){const je=U(Ae),j=B(je??"",ae);if(F(z,Oe,Te,"",Ae),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(z.sdkKey,z.urlConfig,je,j))&&(z.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(z.sdkKey,z.urlConfig)),!ne||Te>ne||!O.has(($=Oe?.status)!==null&&$!==void 0?$:500)){(se=this._emitter)===null||se===void 0||se.call(this,{name:"error",error:Ae,tag:d.ErrorTag.NetworkError,requestArgs:z});const ce=`A networking error occurred during ${Z} request to ${Se}.`;return a.Log.error(ce,je,Ae),(G=this._errorBoundary)===null||G===void 0||G.attachErrorIfNoneExists(ce),null}return yield H(Te),this._sendRequest(Object.assign(Object.assign({},z),{retries:ne,attempt:Te+1}))}})}_getLogEventCompressionMode(z){let J=z?.logEventCompressionMode;return!J&&z?.disableCompression===!0&&(J=b.LogEventCompressionMode.Disabled),J||(J=b.LogEventCompressionMode.Enabled),J}_isRateLimited(z){var J;const $=Date.now(),se=(J=this._leakyBucket[z])!==null&&J!==void 0?J:{count:0,lastRequestTime:$},G=$-se.lastRequestTime,Z=Math.floor(G*I);return se.count=Math.max(0,se.count-Z),se.count>=P?!0:(se.count+=1,se.lastRequestTime=$,this._leakyBucket[z]=se,!1)}_getPopulatedURL(z){var J;const $=(J=z.fallbackUrl)!==null&&J!==void 0?J:z.urlConfig.getUrl();(z.urlConfig.endpoint===o.Endpoint._initialize||z.urlConfig.endpoint===o.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=$);const se=Object.assign({[o.NetworkParam.SdkKey]:z.sdkKey,[o.NetworkParam.SdkType]:s.SDKType._get(z.sdkKey),[o.NetworkParam.SdkVersion]:m.SDK_VERSION,[o.NetworkParam.Time]:String(Date.now()),[o.NetworkParam.SessionID]:c.SessionID.get(z.sdkKey)},z.params),G=Object.keys(se).map(Z=>`${encodeURIComponent(Z)}=${encodeURIComponent(se[Z])}`).join("&");return`${$}${G?`?${G}`:""}`}_tryEncodeBody(z){var J;const $=(0,l._getWindowSafe)(),se=z.body;if(!(!z.isStatsigEncodable||this._options.disableStatsigEncoding||typeof se!="string"||(0,t._getStatsigGlobalFlag)("no-encode")!=null||!$?.btoa))try{z.body=$.btoa(se).split("").reverse().join(""),z.params=Object.assign(Object.assign({},(J=z.params)!==null&&J!==void 0?J:{}),{[o.NetworkParam.StatsigEncoded]:"1"})}catch(G){a.Log.warn(`Request encoding failed for ${z.urlConfig.getUrl()}`,G)}}_tryToCompressBody(z){return e(this,void 0,void 0,function*(){var J;const $=z.body;if(!(typeof $!="string"||!N(z,this._options)))try{const se=new TextEncoder().encode($),G=new CompressionStream("gzip"),Z=G.writable.getWriter();Z.write(se).catch(a.Log.error),Z.close().catch(a.Log.error);const ue=G.readable.getReader(),ne=[];let le;for(;!(le=yield ue.read()).done;)ne.push(le.value);const ke=ne.reduce((Se,Oe)=>Se+Oe.length,0),Te=new Uint8Array(ke);let ae=0;for(const Se of ne)Te.set(Se,ae),ae+=Se.length;z.body=Te,z.params=Object.assign(Object.assign({},(J=z.params)!==null&&J!==void 0?J:{}),{[o.NetworkParam.IsGzipped]:"1"})}catch(se){a.Log.warn(`Request compression failed for ${z.urlConfig.getUrl()}`,se)}})}_getInternalRequestArgs(z,J){const $=this._fallbackResolver.getActiveFallbackUrl(J.sdkKey,J.urlConfig),se=Object.assign(Object.assign({},J),{method:z,fallbackUrl:$});return"data"in J&&R(se,J.data),se}};$s.NetworkCore=T;const C=W=>W.sdkKey?!0:(a.Log.warn("Unable to make request without an SDK key"),!1),R=(W,z)=>{const{sdkKey:J,fallbackUrl:$}=W,se=u.StableID.get(J),G=c.SessionID.get(J),Z=s.SDKType._get(J);W.body=JSON.stringify(Object.assign(Object.assign({},z),{statsigMetadata:Object.assign(Object.assign({},m.StatsigMetadataProvider.get()),{stableID:se,sessionID:G,sdkType:Z,fallbackUrl:$})}))};function N(W,z){if(!W.isCompressable||(0,t._getStatsigGlobalFlag)("no-compress")!=null||typeof CompressionStream>"u"||typeof TextEncoder>"u")return!1;const J=W.urlConfig.customUrl!=null||W.urlConfig.fallbackUrls!=null,$=i.SDKFlags.get(W.sdkKey,"enable_log_event_compression")===!0;switch(z.logEventCompressionMode){case b.LogEventCompressionMode.Disabled:return!1;case b.LogEventCompressionMode.Enabled:return!(J&&!$);case b.LogEventCompressionMode.Forced:return!0;default:return!1}}function U(W){return typeof W=="string"?W:W instanceof Error?`${W.name}: ${W.message}`:"Unknown Error"}function B(W,z){return W.includes("Timeout")||z}function Y(W,z){W.urlConfig.endpoint===o.Endpoint._initialize&&r.Diagnostics._markInitNetworkReqStart(W.sdkKey,{attempt:z})}function F(W,z,J,$,se){W.urlConfig.endpoint===o.Endpoint._initialize&&r.Diagnostics._markInitNetworkReqEnd(W.sdkKey,r.Diagnostics._getDiagnosticsData(z,J,$,se))}function H(W){return e(this,void 0,void 0,function*(){yield new Promise(z=>setTimeout(z,Math.min(w*(W*W),E)))})}return $s}var Om={},Nw;function s8(){return Nw||(Nw=1,Object.defineProperty(Om,"__esModule",{value:!0})),Om}var Im={},Mw;function l8(){return Mw||(Mw=1,Object.defineProperty(Im,"__esModule",{value:!0})),Im}var Tm={},Fw;function c8(){return Fw||(Fw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._fastApproxSizeOf=void 0;const t=2,r=1,a=(o,n)=>{let i=0;const s=Object.keys(o);for(let l=0;l<s.length;l++){const c=s[l],u=o[c];if(i+=c.length,typeof u=="object"&&u!==null?i+=(0,e._fastApproxSizeOf)(u,n)+t:i+=String(u).length+r,i>=n)return i}return i};e._fastApproxSizeOf=a})(Tm)),Tm}var tl={},Lw;function u8(){if(Lw)return tl;Lw=1;var e=tl&&tl.__awaiter||function(v,g,w,E){function S(P){return P instanceof w?P:new w(function(I){I(P)})}return new(w||(w=Promise))(function(P,I){function O(R){try{C(E.next(R))}catch(N){I(N)}}function T(R){try{C(E.throw(R))}catch(N){I(N)}}function C(R){R.done?P(R.value):S(R.value).then(O,T)}C((E=E.apply(v,g||[])).next())})};Object.defineProperty(tl,"__esModule",{value:!0}),tl.StatsigClientBase=void 0,Ji();const t=Ji(),r=I3(),a=x3(),o=Da(),n=T3(),i=bl(),s=P0(),l=$f(),c=qf(),u=$i(),d=3e3;let m=class{constructor(g,w,E,S){var P,I,O,T;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const C=this.$emt.bind(this);S?.logLevel!=null&&(o.Log.level=S.logLevel),S?.disableStorage&&u.Storage._setDisabled(!0),S?.initialSessionID&&s.StatsigSession.overrideInitialSessionID(S.initialSessionID,g),S?.storageProvider&&u.Storage._setProvider(S.storageProvider),S?.enableCookies&&l.StableID._setCookiesEnabled(g,S.enableCookies),S?.disableStableID&&l.StableID._setDisabled(g,!0),this._sdkKey=g,this._options=S??{},this._memoCache={},this.overrideAdapter=(P=S?.overrideAdapter)!==null&&P!==void 0?P:null,this._logger=new a.EventLogger(g,C,E,S),this._errorBoundary=new r.ErrorBoundary(g,S,C),this._errorBoundary.wrap(this),this._errorBoundary.wrap(w),this._errorBoundary.wrap(this._logger),E.setErrorBoundary(this._errorBoundary),this.dataAdapter=w,this.dataAdapter.attach(g,S,E),this.storageProvider=u.Storage,(T=(O=(I=this.overrideAdapter)===null||I===void 0?void 0:I.loadFromStorage)===null||O===void 0?void 0:O.call(I))===null||T===void 0||T.catch(R=>this._errorBoundary.logError("OA::loadFromStorage",R)),this._primeReadyRipcord(),b(g,this)}updateRuntimeOptions(g){g.loggingEnabled?(this._options.loggingEnabled=g.loggingEnabled,this._logger.setLoggingEnabled(g.loggingEnabled)):g.disableLogging!=null&&(this._options.disableLogging=g.disableLogging,this._logger.setLoggingEnabled(g.disableLogging?"disabled":"browser-only")),g.disableStorage!=null&&(this._options.disableStorage=g.disableStorage,u.Storage._setDisabled(g.disableStorage)),g.enableCookies!=null&&(this._options.enableCookies=g.enableCookies,l.StableID._setCookiesEnabled(this._sdkKey,g.enableCookies)),g.logEventCompressionMode?this._logger.setLogEventCompressionMode(g.logEventCompressionMode):g.disableCompression&&this._logger.setLogEventCompressionMode(c.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return e(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(g,w){this._listeners[g]||(this._listeners[g]=[]),this._listeners[g].push(w)}off(g,w){if(this._listeners[g]){const E=this._listeners[g].indexOf(w);E!==-1&&this._listeners[g].splice(E,1)}}$on(g,w){w.__isInternal=!0,this.on(g,w)}$emt(g){var w;const E=S=>{try{S(g)}catch(P){if(S.__isInternal===!0){this._errorBoundary.logError(`__emit:${g.name}`,P);return}o.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",g)}};this._listeners[g.name]&&this._listeners[g.name].forEach(S=>E(S)),(w=this._listeners["*"])===null||w===void 0||w.forEach(E)}_setStatus(g,w){this.loadingStatus=g,this._memoCache={},this.$emt({name:"values_updated",status:g,values:w})}_enqueueExposure(g,w,E){if(E?.disableExposureLog===!0){this._logger.incrementNonExposureCount(g);return}this._logger.enqueue(w)}_memoize(g,w){return(E,S)=>{if(this._options.disableEvaluationMemoization)return w(E,S);const P=(0,n.createMemoKey)(g,E,S);return P?(P in this._memoCache||(Object.keys(this._memoCache).length>=d&&(this._memoCache={}),this._memoCache[P]=w(E,S)),this._memoCache[P]):w(E,S)}}};tl.StatsigClientBase=m;function b(v,g){var w;if((0,i._isServerEnv)())return;const E=(0,t._getStatsigGlobal)(),S=(w=E.instances)!==null&&w!==void 0?w:{},P=g;S[v]!=null&&o.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),S[v]=P,E.firstInstance||(E.firstInstance=P),E.instances=S,__STATSIG__=E}return tl}var bd={},Uw;function d8(){return Uw||(Uw=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.DataAdapterCachePrefix=void 0,bd.DataAdapterCachePrefix="statsig.cached"),bd}var Rm={},Bw;function h8(){return Bw||(Bw=1,Object.defineProperty(Rm,"__esModule",{value:!0})),Rm}var Ra={},Hw;function g8(){if(Hw)return Ra;Hw=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra._makeTypedGet=Ra._mergeOverride=Ra._makeLayer=Ra._makeExperiment=Ra._makeDynamicConfig=Ra._makeFeatureGate=void 0;const e=Da(),t=S0();function r(c,u,d,m){var b;return{name:c,details:u,ruleID:(b=d?.rule_id)!==null&&b!==void 0?b:"",__evaluation:d,value:m}}function a(c,u,d){var m;return Object.assign(Object.assign({},r(c,u,d,d?.value===!0)),{idType:(m=d?.id_type)!==null&&m!==void 0?m:null})}Ra._makeFeatureGate=a;function o(c,u,d){var m,b;const v=(m=d?.value)!==null&&m!==void 0?m:{};return Object.assign(Object.assign({},r(c,u,d,v)),{idType:(b=d?.id_type)!==null&&b!==void 0?b:null,get:l(c,d?.value)})}Ra._makeDynamicConfig=o;function n(c,u,d){var m;const b=o(c,u,d);return Object.assign(Object.assign({},b),{groupName:(m=d?.group_name)!==null&&m!==void 0?m:null})}Ra._makeExperiment=n;function i(c,u,d,m){var b,v;return Object.assign(Object.assign({},r(c,u,d,void 0)),{get:l(c,d?.value,m),groupName:(b=d?.group_name)!==null&&b!==void 0?b:null,__value:(v=d?.value)!==null&&v!==void 0?v:{}})}Ra._makeLayer=i;function s(c,u,d,m){return Object.assign(Object.assign(Object.assign({},c),u),{get:l(c.name,d,m)})}Ra._mergeOverride=s;function l(c,u,d){return(m,b)=>{var v;const g=(v=u?.[m])!==null&&v!==void 0?v:null;return g==null?b??null:b!=null&&!(0,t._isTypeMatch)(g,b)?(e.Log.warn(`Parameter type mismatch. '${c}.${m}' was found to be type '${typeof g}' but fallback/return type is '${typeof b}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),b??null):(d?.(m),g)}}return Ra._makeTypedGet=l,Ra}var Am={},zw;function f8(){return zw||(zw=1,Object.defineProperty(Am,"__esModule",{value:!0})),Am}var rl={},Vw;function p8(){if(Vw)return rl;Vw=1,Object.defineProperty(rl,"__esModule",{value:!0}),rl.UPDATE_DETAIL_ERROR_MESSAGES=rl.createUpdateDetails=void 0;const e=(t,r,a,o,n,i)=>({duration:a,source:r,success:t,error:o,sourceUrl:n,warnings:i});return rl.createUpdateDetails=e,rl.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."},rl}var Ww;function Jn(){return Ww||(Ww=1,(function(e){var t=Gs&&Gs.__createBinding||(Object.create?(function(c,u,d,m){m===void 0&&(m=d);var b=Object.getOwnPropertyDescriptor(u,d);(!b||("get"in b?!u.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return u[d]}}),Object.defineProperty(c,m,b)}):(function(c,u,d,m){m===void 0&&(m=d),c[m]=u[d]})),r=Gs&&Gs.__exportStar||function(c,u){for(var d in c)d!=="default"&&!Object.prototype.hasOwnProperty.call(u,d)&&t(u,c,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,Ji();const a=Ji(),o=Ob();Object.defineProperty(e,"Diagnostics",{enumerable:!0,get:function(){return o.Diagnostics}});const n=x3();Object.defineProperty(e,"EventLogger",{enumerable:!0,get:function(){return n.EventLogger}});const i=Da();Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return i.Log}});const s=kf(),l=$i();Object.defineProperty(e,"Storage",{enumerable:!0,get:function(){return l.Storage}}),r(Ji(),e),r(Zf(),e),r(q7(),e),r($7(),e),r(Ob(),e),r(e8(),e),r(I3(),e),r(t8(),e),r(r8(),e),r(eu(),e),r(a8(),e),r(Da(),e),r(T3(),e),r(Qf(),e),r(i8(),e),r(s8(),e),r(l8(),e),r(bl(),e),r(x0(),e),r(P0(),e),r(c8(),e),r($f(),e),r(u8(),e),r(A3(),e),r(d8(),e),r(_3(),e),r(kf(),e),r(qf(),e),r(h8(),e),r(g8(),e),r(f8(),e),r(P3(),e),r($i(),e),r(O3(),e),r(S0(),e),r(C3(),e),r(C0(),e),r(_0(),e),r(p8(),e),r(R3(),e),Object.assign((0,a._getStatsigGlobal)(),{Log:i.Log,SDK_VERSION:s.SDK_VERSION})})(Gs)),Gs}var gc={},Ug={},yd={},jw;function v8(){if(jw)return yd;jw=1,Object.defineProperty(yd,"__esModule",{value:!0}),yd.V1InitializeContainer=void 0;const e=Jn();let t=class{constructor(a){this._values=a}getGate(a){return this._getResultFromLookup(this._values.feature_gates,a)}getConfig(a){return this._getResultFromLookup(this._values.dynamic_configs,a)}getLayer(a){return this._getResultFromLookup(this._values.layer_configs,a)}getParamStore(a){return this._getResultFromLookup(this._values.param_stores,a)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(a,o){var n,i;return a&&(i=(n=a[o])!==null&&n!==void 0?n:a[(0,e._DJB2)(o)])!==null&&i!==void 0?i:null}};return yd.V1InitializeContainer=t,yd}var kd={},Gw;function m8(){if(Gw)return kd;Gw=1,Object.defineProperty(kd,"__esModule",{value:!0}),kd.V2InitializeContainer=void 0;const e=Jn();let t=class{constructor(a){this._values=a}getGate(a){var o,n,i;const s=this._getResultFromLookup(this._values.feature_gates,a);return s?{name:a,value:s.v===!0,rule_id:(o=s.r)!==null&&o!==void 0?o:"default",secondary_exposures:(n=s.s)!==null&&n!==void 0?n:[],id_type:(i=s.i)!==null&&i!==void 0?i:""}:null}getConfig(a){var o,n,i,s;const l=this._getResultFromLookup(this._values.dynamic_configs,a);return l?{name:a,value:(o=this._values.values[l.v])!==null&&o!==void 0?o:{},rule_id:l.r,secondary_exposures:(n=l.s)!==null&&n!==void 0?n:[],id_type:(i=l.i)!==null&&i!==void 0?i:"",is_user_in_experiment:l.ue===!0,passed:l.p===!0,group_name:(s=l.gn)!==null&&s!==void 0?s:void 0,is_experiment_active:l.ea===!0,group:l.r,is_device_based:l.i==="stableID"}:null}getLayer(a){var o,n,i,s,l,c;const u=this._getResultFromLookup(this._values.layer_configs,a);return u?{name:a,value:(o=this._values.values[u.v])!==null&&o!==void 0?o:{},rule_id:u.r,secondary_exposures:(n=u.s)!==null&&n!==void 0?n:[],is_user_in_experiment:u.ue===!0,group_name:(i=u.gn)!==null&&i!==void 0?i:void 0,is_experiment_active:u.ea===!0,group:u.r,is_device_based:u.i==="stableID",allocated_experiment_name:(s=u.ae)!==null&&s!==void 0?s:"",explicit_parameters:(l=u.ep)!==null&&l!==void 0?l:[],undelegated_secondary_exposures:(c=u.us)!==null&&c!==void 0?c:[],parameter_rule_ids:u.pr}:null}getParamStore(a){return this._getResultFromLookup(this._values.param_stores,a)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(a,o){var n,i;return a&&(i=(n=a[o])!==null&&n!==void 0?n:a[(0,e._DJB2)(o)])!==null&&i!==void 0?i:null}};return kd.V2InitializeContainer=t,kd}var Kw;function b8(){if(Kw)return Ug;Kw=1,Object.defineProperty(Ug,"__esModule",{value:!0});const e=Jn(),t=v8(),r=m8();let a=class{constructor(n){this._sdkKey=n,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,e._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(n,i){var s,l;if(!n)return!1;const c=(0,e._typedJsonParse)(n.data,"has_updates","EvaluationResponse");return c==null?!1:(this._source=n.source,c?.has_updates!==!0||((s=c.time)!==null&&s!==void 0?s:0)<this._lcut||(this._rawValues=n.data,this._lcut=c.time,this._receivedAt=n.receivedAt,c.response_format==="init-v2"?this._values=new r.V2InitializeContainer(c):this._values=new t.V1InitializeContainer(c),this._bootstrapMetadata=this._extractBootstrapMetadata(n.source,c),n.source&&c.user&&this._setWarningState(i,c),e.SDKFlags.setFlags(this._sdkKey,(l=c.sdk_flags)!==null&&l!==void 0?l:{})),!0)}getWarnings(){if(this._warnings.size!==0)return Array.from(this._warnings)}getGate(n){const i=this._values?this._values.getGate(n):null;return this._getDetailedStoreResult(i)}getConfig(n){const i=this._values?this._values.getConfig(n):null;return this._getDetailedStoreResult(i)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(n){const i=this._values?this._values.getLayer(n):null;return this._getDetailedStoreResult(i)}getParamStore(n){const i=this._values?this._values.getParamStore(n):null;return this._getDetailedStoreResult(i)}getSource(){return this._source}getExposureMapping(){var n;return(n=this._values)===null||n===void 0?void 0:n.getExposureMapping()}_extractBootstrapMetadata(n,i){if(n!=="Bootstrap")return null;const s={};return i.user&&(s.user=i.user),i.sdkInfo&&(s.generatorSDKInfo=i.sdkInfo),s.lcut=i.time,s}_getDetailedStoreResult(n){return{result:n,details:this._getDetails(n==null)}}_setWarningState(n,i){var s,l;const c=e.StableID.get(this._sdkKey);if(((s=n.customIDs)===null||s===void 0?void 0:s.stableID)!==c&&(!((l=n.customIDs)===null||l===void 0)&&l.stableID||c)){this._warnings.add("StableIDMismatch");return}if("user"in i){const u=i.user,d=Object.assign(Object.assign({},n),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,e._getFullUserHash)(d)!==(0,e._getFullUserHash)(u)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if(this._source==="Uninitialized"||this._source==="NoValues")return{reason:this._source};const n={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(n.warnings=Array.from(this._warnings)),n}_getDetails(n){var i,s;const l=this.getCurrentSourceDetails();let c=l.reason;const u=(i=l.warnings)!==null&&i!==void 0?i:[];this._source==="Bootstrap"&&u.length>0&&(c=c+u[0]),c!=="Uninitialized"&&c!=="NoValues"&&(c=`${c}:${n?"Unrecognized":"Recognized"}`);const d=this._source==="Bootstrap"&&(s=this._bootstrapMetadata)!==null&&s!==void 0?s:void 0;return d&&(l.bootstrapMetadata=d),Object.assign(Object.assign({},l),{reason:c})}};return Ug.default=a,Ug}var fc={},wd={},Yw;function y8(){if(Yw)return wd;Yw=1,Object.defineProperty(wd,"__esModule",{value:!0}),wd._resolveDeltasResponse=void 0;const e=Jn(),t=2;function r(i,s){const l=(0,e._typedJsonParse)(s,"checksum","DeltasEvaluationResponse");if(!l)return{hadBadDeltaChecksum:!0};const c=a(i,l),u=o(c),d=(0,e._DJB2Object)({feature_gates:u.feature_gates,dynamic_configs:u.dynamic_configs,layer_configs:u.layer_configs},t);return d===l.checksumV2?JSON.stringify(u):{hadBadDeltaChecksum:!0,badChecksum:d,badMergedConfigs:u,badFullResponse:l.deltas_full_response}}wd._resolveDeltasResponse=r;function a(i,s){return Object.assign(Object.assign(Object.assign({},i),s),{feature_gates:Object.assign(Object.assign({},i.feature_gates),s.feature_gates),layer_configs:Object.assign(Object.assign({},i.layer_configs),s.layer_configs),dynamic_configs:Object.assign(Object.assign({},i.dynamic_configs),s.dynamic_configs)})}function o(i){const s=i;return n(i.deleted_gates,s.feature_gates),delete s.deleted_gates,n(i.deleted_configs,s.dynamic_configs),delete s.deleted_configs,n(i.deleted_layers,s.layer_configs),delete s.deleted_layers,s}function n(i,s){i?.forEach(l=>{delete s[l]})}return wd}var Xw;function D3(){if(Xw)return fc;Xw=1;var e=fc&&fc.__awaiter||function(o,n,i,s){function l(c){return c instanceof i?c:new i(function(u){u(c)})}return new(i||(i=Promise))(function(c,u){function d(v){try{b(s.next(v))}catch(g){u(g)}}function m(v){try{b(s.throw(v))}catch(g){u(g)}}function b(v){v.done?c(v.value):l(v.value).then(d,m)}b((s=s.apply(o,n||[])).next())})};Object.defineProperty(fc,"__esModule",{value:!0});const t=Jn(),r=y8();class a extends t.NetworkCore{constructor(n,i){super(n,i);const s=n?.networkConfig;this._option=n,this._initializeUrlConfig=new t.UrlConfiguration(t.Endpoint._initialize,s?.initializeUrl,s?.api,s?.initializeFallbackUrls)}fetchEvaluations(n,i,s,l,c){return e(this,void 0,void 0,function*(){var u,d,m,b,v,g;const w=i?(0,t._typedJsonParse)(i,"has_updates","InitializeResponse"):null;let E={user:l,hash:(m=(d=(u=this._option)===null||u===void 0?void 0:u.networkConfig)===null||d===void 0?void 0:d.initializeHashAlgorithm)!==null&&m!==void 0?m:"djb2",deltasResponseRequested:!1,full_checksum:null};if(w?.has_updates){const S=w?.hash_used!==((g=(v=(b=this._option)===null||b===void 0?void 0:b.networkConfig)===null||v===void 0?void 0:v.initializeHashAlgorithm)!==null&&g!==void 0?g:"djb2");E=Object.assign(Object.assign({},E),{sinceTime:c&&!S?w.time:0,previousDerivedFields:"derived_fields"in w&&c?w.derived_fields:{},deltasResponseRequested:!0,full_checksum:w.full_checksum,partialUserMatchSinceTime:S?0:w.time})}return this._fetchEvaluations(n,w,E,s)})}_fetchEvaluations(n,i,s,l){return e(this,void 0,void 0,function*(){var c,u;const d=yield this.post({sdkKey:n,urlConfig:this._initializeUrlConfig,data:s,retries:2,isStatsigEncodable:!0,priority:l});if(d?.code===204)return'{"has_updates": false}';if(d?.code!==200)return(c=d?.body)!==null&&c!==void 0?c:null;if(i?.has_updates!==!0||((u=d.body)===null||u===void 0?void 0:u.includes('"is_delta":true'))!==!0||s.deltasResponseRequested!==!0)return d.body;const m=(0,r._resolveDeltasResponse)(i,d.body);return typeof m=="string"?m:this._fetchEvaluations(n,i,Object.assign(Object.assign(Object.assign({},s),m),{deltasResponseRequested:!1}),l)})}}return fc.default=a,fc}var Ed={},Jw;function k8(){if(Jw)return Ed;Jw=1,Object.defineProperty(Ed,"__esModule",{value:!0}),Ed._makeParamStoreGetter=void 0;const e=Jn(),t={disableExposureLog:!0};function r(u){return u==null||u.disableExposureLog===!1}function a(u,d){return d!=null&&!(0,e._isTypeMatch)(u,d)}function o(u,d){return u.value}function n(u,d,m){return u.getFeatureGate(d.gate_name,r(m)?void 0:t).value?d.pass_value:d.fail_value}function i(u,d,m,b){const g=u.getDynamicConfig(d.config_name,r(b)?void 0:t).get(d.param_name);return a(g,m)?m:g}function s(u,d,m,b){const g=u.getExperiment(d.experiment_name,r(b)?void 0:t).get(d.param_name);return a(g,m)?m:g}function l(u,d,m,b){const g=u.getLayer(d.layer_name,r(b)?void 0:t).get(d.param_name);return a(g,m)?m:g}function c(u,d,m){return(b,v)=>{if(d==null)return v;const g=d[b];if(g==null||v!=null&&(0,e._typeOf)(v)!==g.param_type)return v;switch(g.ref_type){case"static":return o(g);case"gate":return n(u,g,m);case"dynamic_config":return i(u,g,v,m);case"experiment":return s(u,g,v,m);case"layer":return l(u,g,v,m);default:return v}}}return Ed._makeParamStoreGetter=c,Ed}var al={},Zw;function w8(){if(Zw)return al;Zw=1;var e=al&&al.__awaiter||function(o,n,i,s){function l(c){return c instanceof i?c:new i(function(u){u(c)})}return new(i||(i=Promise))(function(c,u){function d(v){try{b(s.next(v))}catch(g){u(g)}}function m(v){try{b(s.throw(v))}catch(g){u(g)}}function b(v){v.done?c(v.value):l(v.value).then(d,m)}b((s=s.apply(o,n||[])).next())})};Object.defineProperty(al,"__esModule",{value:!0}),al.StatsigEvaluationsDataAdapter=void 0;const t=Jn(),r=D3();let a=class extends t.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(n,i,s){super.attach(n,i,s),s!==null&&s instanceof r.default?this._network=s:this._network=new r.default(i??{})}getDataAsync(n,i,s){return this._getDataAsyncImpl(n,(0,t._normalizeUser)(i,this._options),s)}prefetchData(n,i){return this._prefetchDataImpl(n,i)}setData(n){const i=(0,t._typedJsonParse)(n,"has_updates","data");i&&"user"in i?super.setData(n,i.user):t.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(n,i){super.setData(n,i)}_fetchFromNetwork(n,i,s,l){return e(this,void 0,void 0,function*(){var c;const u=yield(c=this._network)===null||c===void 0?void 0:c.fetchEvaluations(this._getSdkKey(),n,s?.priority,i,l);return u??null})}_getCacheKey(n){var i;const s=(0,t._getStorageKey)(this._getSdkKey(),n,(i=this._options)===null||i===void 0?void 0:i.customUserCacheKeyFunc);return`${t.DataAdapterCachePrefix}.${this._cacheSuffix}.${s}`}_isCachedResultValidFor204(n,i){return n.fullUserHash!=null&&n.fullUserHash===(0,t._getFullUserHash)(i)}};return al.StatsigEvaluationsDataAdapter=a,al}var Qw;function E8(){if(Qw)return gc;Qw=1;var e=gc&&gc.__awaiter||function(s,l,c,u){function d(m){return m instanceof c?m:new c(function(b){b(m)})}return new(c||(c=Promise))(function(m,b){function v(E){try{w(u.next(E))}catch(S){b(S)}}function g(E){try{w(u.throw(E))}catch(S){b(S)}}function w(E){E.done?m(E.value):d(E.value).then(v,g)}w((u=u.apply(s,l||[])).next())})};Object.defineProperty(gc,"__esModule",{value:!0});const t=Jn(),r=b8(),a=D3(),o=k8(),n=w8();let i=class Ib extends t.StatsigClientBase{static instance(l){const c=(0,t._getStatsigGlobal)().instance(l);return c instanceof Ib?c:(t.Log.warn((0,t._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new Ib(l??"",{}))}constructor(l,c,u=null){var d,m;t.SDKType._setClientType(l,"javascript-client");const b=new a.default(u,g=>{this.$emt(g)});super(l,(d=u?.dataAdapter)!==null&&d!==void 0?d:new n.StatsigEvaluationsDataAdapter,b,u),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(t.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(t.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(t.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(t.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(t.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(t.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new r.default(l),this._network=b,this._user=this._configureUser(c,u),this._sdkInstanceID=(0,t.getUUID)();const v=(m=u?.plugins)!==null&&m!==void 0?m:[];for(const g of v)g.bind(this)}initializeSync(l){var c;return this.loadingStatus!=="Uninitialized"?(0,t.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...(c=this._store.getWarnings())!==null&&c!==void 0?c:[]]):(this._logger.start(),this.updateUserSync(this._user,l))}initializeAsync(l){return e(this,void 0,void 0,function*(){return this._initializePromise?this._initializePromise:(this._initializePromise=this._initializeAsyncImpl(l),this._initializePromise)})}updateUserSync(l,c){const u=performance.now();try{return this._updateUserSyncImpl(l,c,u)}catch(d){const m=d instanceof Error?d:new Error(String(d));return this._createErrorUpdateDetails(m,u)}}_updateUserSyncImpl(l,c,u){var d;const m=[...(d=this._store.getWarnings())!==null&&d!==void 0?d:[]];this._resetForUser(l);const b=this.dataAdapter.getDataSync(this._user);b==null&&m.push("NoCachedValues"),this._store.setValues(b,this._user),this._finalizeUpdate(b);const v=c?.disableBackgroundCacheRefresh;return v===!0||v==null&&b?.source==="Bootstrap"?(0,t.createUpdateDetails)(!0,this._store.getSource(),performance.now()-u,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),m):(this._runPostUpdate(b??null,this._user),(0,t.createUpdateDetails)(!0,this._store.getSource(),performance.now()-u,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),m))}updateUserAsync(l,c){return e(this,void 0,void 0,function*(){const u=performance.now();try{return yield this._updateUserAsyncImpl(l,c)}catch(d){const m=d instanceof Error?d:new Error(String(d));return this._createErrorUpdateDetails(m,u)}})}_updateUserAsyncImpl(l,c){return e(this,void 0,void 0,function*(){this._resetForUser(l);const u=this._user;t.Diagnostics._markInitOverallStart(this._sdkKey);let d=this.dataAdapter.getDataSync(u);if(this._store.setValues(d,this._user),this._setStatus("Loading",d),d=yield this.dataAdapter.getDataAsync(d,u,c),u!==this._user)return(0,t.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let m=!1;d!=null&&(t.Diagnostics._markInitProcessStart(this._sdkKey),m=this._store.setValues(d,this._user),t.Diagnostics._markInitProcessEnd(this._sdkKey,{success:m})),this._finalizeUpdate(d),m||(this._errorBoundary.attachErrorIfNoneExists(t.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),t.Diagnostics._markInitOverallEnd(this._sdkKey,m,this._store.getCurrentSourceDetails());const b=t.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,t.createUpdateDetails)(m,this._store.getSource(),b,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){let l={};try{l=JSON.parse(JSON.stringify(this._user))}catch{t.Log.error("Failed to parse user")}return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:l,errorBoundary:this._errorBoundary,session:t.StatsigSession.get(this._sdkKey),stableID:t.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(l,c){return this.getFeatureGate(l,c).value}logEvent(l,c,u){const d=typeof l=="string"?{eventName:l,value:c,metadata:u}:l;this.$emt({name:"log_event_called",event:d}),this._logger.enqueue(Object.assign(Object.assign({},d),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(l){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:l}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{this.loadingStatus==="Loading"&&this._finalizeUpdate(null)})}_initializeAsyncImpl(l){return e(this,void 0,void 0,function*(){return t.Storage.isReady()||(yield t.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,l)})}_createErrorUpdateDetails(l,c){var u;return(0,t.createUpdateDetails)(!1,this._store.getSource(),performance.now()-c,l,null,[...(u=this._store.getWarnings())!==null&&u!==void 0?u:[]])}_finalizeUpdate(l){this._store.finalize(),this._setStatus("Ready",l)}_runPostUpdate(l,c){this.dataAdapter.getDataAsync(l,c,{priority:"low"}).catch(u=>{t.Log.error("An error occurred after update.",u)})}_resetForUser(l){this._logger.reset(),this._store.reset(),this._user=this._configureUser(l,this._options)}_configureUser(l,c){var u,d,m;const b=(0,t._normalizeUser)(l,c),v=(u=b.customIDs)===null||u===void 0?void 0:u.stableID;if(v){const g=(m=(d=this.storageProvider).isReadyResolver)===null||m===void 0?void 0:m.call(d);g?g.then(()=>t.StableID.setOverride(v,this._sdkKey),()=>t.StableID.setOverride(v,this._sdkKey)):t.StableID.setOverride(v,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(b.analyticsOnlyMetadata=Object.assign(Object.assign({},b.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),b}_getFeatureGateImpl(l,c){var u,d;const{result:m,details:b}=this._store.getGate(l),v=(0,t._makeFeatureGate)(l,b,m),g=(d=(u=this.overrideAdapter)===null||u===void 0?void 0:u.getGateOverride)===null||d===void 0?void 0:d.call(u,v,this._user,c),w=g??v;return this._enqueueExposure(l,(0,t._createGateExposure)(this._user,w,this._store.getExposureMapping()),c),this.$emt({name:"gate_evaluation",gate:w}),w}_getDynamicConfigImpl(l,c){var u,d;const{result:m,details:b}=this._store.getConfig(l),v=(0,t._makeDynamicConfig)(l,b,m),g=(d=(u=this.overrideAdapter)===null||u===void 0?void 0:u.getDynamicConfigOverride)===null||d===void 0?void 0:d.call(u,v,this._user,c),w=g??v;return this._enqueueExposure(l,(0,t._createConfigExposure)(this._user,w,this._store.getExposureMapping()),c),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:w}),w}_getExperimentImpl(l,c){var u,d,m,b;const{result:v,details:g}=this._store.getConfig(l),w=(0,t._makeExperiment)(l,g,v);w.__evaluation!=null&&(w.__evaluation.secondary_exposures=(0,t._mapExposures)((d=(u=w.__evaluation)===null||u===void 0?void 0:u.secondary_exposures)!==null&&d!==void 0?d:[],this._store.getExposureMapping()));const E=(b=(m=this.overrideAdapter)===null||m===void 0?void 0:m.getExperimentOverride)===null||b===void 0?void 0:b.call(m,w,this._user,c),S=E??w;return this._enqueueExposure(l,(0,t._createConfigExposure)(this._user,S,this._store.getExposureMapping()),c),this.$emt({name:"experiment_evaluation",experiment:S}),S}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(l,c){var u,d,m;const{result:b,details:v}=this._store.getLayer(l),g=(0,t._makeLayer)(l,v,b),w=(d=(u=this.overrideAdapter)===null||u===void 0?void 0:u.getLayerOverride)===null||d===void 0?void 0:d.call(u,g,this._user,c);c?.disableExposureLog&&this._logger.incrementNonExposureCount(l);const E=(0,t._mergeOverride)(g,w,(m=w?.__value)!==null&&m!==void 0?m:g.__value,S=>{c?.disableExposureLog||this._enqueueExposure(l,(0,t._createLayerParameterExposure)(this._user,E,S,this._store.getExposureMapping()),c)});return this.$emt({name:"layer_evaluation",layer:E}),E}_getParameterStoreImpl(l,c){var u,d;const{result:m,details:b}=this._store.getParamStore(l);this._logger.incrementNonExposureCount(l);const v={name:l,details:b,__configuration:m,get:(0,o._makeParamStoreGetter)(this,m,c)},g=(d=(u=this.overrideAdapter)===null||u===void 0?void 0:u.getParamStoreOverride)===null||d===void 0?void 0:d.call(u,v,c);return g!=null&&(v.__configuration=g.config,v.details=g.details,v.get=(0,o._makeParamStoreGetter)(this,g.config,c)),v}};return gc.default=i,gc}var qw;function S8(){return qw||(qw=1,(function(e){var t=js&&js.__createBinding||(Object.create?(function(i,s,l,c){c===void 0&&(c=l);var u=Object.getOwnPropertyDescriptor(s,l);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(i,c,u)}):(function(i,s,l,c){c===void 0&&(c=l),i[c]=s[l]})),r=js&&js.__exportStar||function(i,s){for(var l in i)l!=="default"&&!Object.prototype.hasOwnProperty.call(s,l)&&t(s,i,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigClient=void 0;const a=Jn(),o=E8();e.StatsigClient=o.default,r(Jn(),e);const n=Object.assign((0,a._getStatsigGlobal)(),{StatsigClient:o.default});e.default=n})(js)),js}var Vn=S8();function $w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function zi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$w(Object(r),!0).forEach(function(a){me(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$w(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var Bg="@all-features",_8=(function(){function e(){ur(this,e),me(this,"eventToValue",new Map),this.emitter=new q5}return dr(e,[{key:"onGateUpdated",value:function(r,a,o,n){var i=this,s=o(r,zi(zi({},n),{},{fireGateExposure:!1}));this.eventToValue.get(a)===void 0&&this.eventToValue.set(a,s);var l=function(){var u=o(r,zi(zi({},n),{},{fireGateExposure:!1})),d=i.eventToValue.get(a);d!==u&&(i.eventToValue.set(a,u),a(u))};return this.emitter.on(r,l),function(){i.emitter.off(r,l)}}},{key:"onExperimentValueUpdated",value:function(r,a,o,n,i,s){var l=this,c="".concat(r,".").concat(a),u=i(r,a,o,zi(zi({},s),{},{fireExperimentExposure:!1}));this.eventToValue.get(n)===void 0&&this.eventToValue.set(n,u);var d=function(){var b=i(r,a,o,zi(zi({},s),{},{fireExperimentExposure:!1})),v=l.eventToValue.get(n);v!==b&&(l.eventToValue.set(n,b),n(b))};return this.emitter.on(c,d),function(){l.emitter.off(c,d)}}},{key:"onAnyUpdated",value:function(r){var a=this;return this.emitter.on(Bg,r),function(){a.emitter.off(Bg,r)}}},{key:"anyUpdated",value:function(){var r=this;this.emitter.emit(Bg),this.emitter.eventNames().filter(function(a){return a!==Bg}).forEach(function(a){r.emitter.emit(a)})}}])})();function C8(e){if(Array.isArray(e))return v6(e)}function x8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function P8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
9
|
+
`,e.getElementsByTagName("head")[0].appendChild(r)}e.body&&E7(e.body,"react-draggable-transparent-selection")}function kk(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{wk(e)}):wk(e)}function wk(e){if(e)try{e.body&&S7(e.body,"react-draggable-transparent-selection");const t=e.selection;if(t)t.empty();else{const r=(e.defaultView||window).getSelection();r&&r.type!=="Caret"&&r.removeAllRanges()}}catch{}}function E7(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function S7(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}function _7(e,t,r){if(!e.props.bounds)return[t,r];let{bounds:a}=e.props;a=typeof a=="string"?a:P7(a);const o=E0(e);if(typeof a=="string"){const{ownerDocument:n}=o,i=n.defaultView;if(!i)throw new Error("Cannot resolve the owner window of the draggable node.");let s;if(a==="parent"?s=o.parentNode:s=o.getRootNode().querySelector(a),!(s instanceof i.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const l=s,c=i.getComputedStyle(o),u=i.getComputedStyle(l);a={left:-o.offsetLeft+wa(u.paddingLeft)+wa(c.marginLeft),top:-o.offsetTop+wa(u.paddingTop)+wa(c.marginTop),right:f7(l)-h7(o)-o.offsetLeft+wa(u.paddingRight)-wa(c.marginRight),bottom:g7(l)-d7(o)-o.offsetTop+wa(u.paddingBottom)-wa(c.marginBottom)}}return kh(a.right)&&(t=Math.min(t,a.right)),kh(a.bottom)&&(r=Math.min(r,a.bottom)),kh(a.left)&&(t=Math.max(t,a.left)),kh(a.top)&&(r=Math.max(r,a.top)),[t,r]}function Ek(e,t,r){const a=Math.round(t/e[0])*e[0],o=Math.round(r/e[1])*e[1];return[a,o]}function C7(e){return e.props.axis==="both"||e.props.axis==="x"}function x7(e){return e.props.axis==="both"||e.props.axis==="y"}function Mv(e,t,r){const a=typeof t=="number"?b7(e,t):null;if(typeof t=="number"&&!a)return null;const o=E0(r),n=r.props.offsetParent||o.offsetParent||o.ownerDocument.body;return p7(a||e,n,r.props.scale)}function Fv(e,t,r){const a=!kh(e.lastX),o=E0(e);return a?{node:o,deltaX:0,deltaY:0,lastX:t,lastY:r,x:t,y:r}:{node:o,deltaX:t-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:r}}function Lv(e,t){const r=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/r,y:e.state.y+t.deltaY/r,deltaX:t.deltaX/r,deltaY:t.deltaY/r,lastX:e.state.x,lastY:e.state.y}}function P7(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function E0(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var O7=typeof process<"u"&&i7.DRAGGABLE_DEBUG?console.log.bind(console):function(){},wo=O7,Ln={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},Hi=Ln.mouse,$c=class extends Q.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button=="number"&&e.button!==0||e.ctrlKey))return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:r}=t;if(this.props.disabled||!(e.target instanceof r.defaultView.Node)||this.props.handle&&!yk(e.target,this.props.handle,t)||this.props.cancel&&yk(e.target,this.props.cancel,t))return;e.type==="touchstart"&&!this.props.allowMobileScroll&&e.preventDefault();const a=y7(e);this.touchIdentifier=a;const o=Mv(e,a,this);if(o==null)return;const{x:n,y:i}=o,s=Fv(this,n,i);wo("DraggableCore: handleDragStart: %j",s),wo("calling",this.props.onStart),!(this.props.onStart(e,s)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&w7(r,this.props.nonce),this.dragging=!0,this.lastX=n,this.lastY=i,Nv(r,Hi.move,this.handleDrag),Nv(r,Hi.stop,this.handleDragStop))},this.handleDrag=e=>{const t=Mv(e,this.touchIdentifier,this);if(t==null)return;let{x:r,y:a}=t;if(Array.isArray(this.props.grid)){let i=r-this.lastX,s=a-this.lastY;if([i,s]=Ek(this.props.grid,i,s),!i&&!s)return;r=this.lastX+i,a=this.lastY+s}const o=Fv(this,r,a);if(wo("DraggableCore: handleDrag: %j",o),this.props.onDrag(e,o)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const i=document.createEvent("MouseEvents");i.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(i)}return}this.lastX=r,this.lastY=a},this.handleDragStop=e=>{if(!this.dragging)return;const t=Mv(e,this.touchIdentifier,this);if(t==null)return;let{x:r,y:a}=t;if(Array.isArray(this.props.grid)){let s=r-this.lastX||0,l=a-this.lastY||0;[s,l]=Ek(this.props.grid,s,l),r=this.lastX+s,a=this.lastY+l}const o=Fv(this,r,a);if(this.props.onStop(e,o)===!1||this.mounted===!1)return!1;const i=this.findDOMNode();i&&this.props.enableUserSelectHack&&kk(i.ownerDocument),wo("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,i&&(wo("DraggableCore: Removing handlers"),Ws(i.ownerDocument,Hi.move,this.handleDrag),Ws(i.ownerDocument,Hi.stop,this.handleDragStop))},this.onMouseDown=e=>(Hi=Ln.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(Hi=Ln.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(Hi=Ln.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(Hi=Ln.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&Nv(e,Ln.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;Ws(t,Ln.mouse.move,this.handleDrag),Ws(t,Ln.touch.move,this.handleDrag),Ws(t,Ln.mouse.stop,this.handleDragStop),Ws(t,Ln.touch.stop,this.handleDragStop),Ws(e,Ln.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&kk(t)}}findDOMNode(){var e;if((e=this.props)!=null&&e.nodeRef)return this.props.nodeRef.current;const t=o0;return typeof t.findDOMNode=="function"?t.findDOMNode(this):(wo("react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef"),null)}render(){return Q.cloneElement(Q.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};$c.displayName="DraggableCore";$c.propTypes={allowAnyClick:ye.bool,allowMobileScroll:ye.bool,children:ye.node.isRequired,disabled:ye.bool,enableUserSelectHack:ye.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:ye.arrayOf(ye.number),handle:ye.string,cancel:ye.string,nodeRef:ye.object,nonce:ye.string,onStart:ye.func,onDrag:ye.func,onStop:ye.func,onMouseDown:ye.func,scale:ye.number,className:Uc,style:Uc,transform:Uc};$c.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Xf=class extends Q.Component{constructor(e){super(e),this.onDragStart=(t,r)=>{if(wo("Draggable: onDragStart: %j",r),this.props.onStart(t,Lv(this,r))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(t,r)=>{if(!this.state.dragging)return!1;wo("Draggable: onDrag: %j",r);const a=Lv(this,r),o={x:a.x,y:a.y,slackX:0,slackY:0};if(this.props.bounds){const{x:i,y:s}=o;o.x+=this.state.slackX,o.y+=this.state.slackY;const[l,c]=_7(this,o.x,o.y);o.x=l,o.y=c,o.slackX=this.state.slackX+(i-o.x),o.slackY=this.state.slackY+(s-o.y),a.x=o.x,a.y=o.y,a.deltaX=o.x-this.state.x,a.deltaY=o.y-this.state.y}if(this.props.onDrag(t,a)===!1)return!1;this.setState(o)},this.onDragStop=(t,r)=>{if(!this.state.dragging||this.props.onStop(t,Lv(this,r))===!1)return!1;wo("Draggable: onDragStop: %j",r);const o={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:i,y:s}=this.props.position;o.x=i,o.y=s}this.setState(o)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(wo("Draggable: getDerivedStateFromProps %j",{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var e;if((e=this.props)!=null&&e.nodeRef)return this.props.nodeRef.current;const t=o0;return typeof t.findDOMNode=="function"?t.findDOMNode(this):null}render(){const{axis:e,bounds:t,children:r,defaultPosition:a,defaultClassName:o,defaultClassNameDragging:n,defaultClassNameDragged:i,position:s,positionOffset:l,scale:c,...u}=this.props;let d={},m=null;const v=!!!s||this.state.dragging,g=s||a,w={x:C7(this)&&v?this.state.x:g.x,y:x7(this)&&v?this.state.y:g.y};this.state.isElementSVG?m=m7(w,l):d=v7(w,l);const E=Q.Children.only(r),S=_6(E.props.className||"",o,{[n]:this.state.dragging,[i]:this.state.dragged});return Q.createElement($c,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},Q.cloneElement(E,{className:S,style:{...E.props.style,...d},transform:m}))}};Xf.displayName="Draggable";Xf.propTypes={...$c.propTypes,axis:ye.oneOf(["both","x","y","none"]),bounds:ye.oneOfType([ye.shape({left:ye.number,right:ye.number,top:ye.number,bottom:ye.number}),ye.string,ye.oneOf([!1])]),defaultClassName:ye.string,defaultClassNameDragging:ye.string,defaultClassNameDragged:ye.string,defaultPosition:ye.shape({x:ye.number,y:ye.number}),positionOffset:ye.shape({x:ye.oneOfType([ye.number,ye.string]),y:ye.oneOfType([ye.number,ye.string])}),position:ye.shape({x:ye.number,y:ye.number}),className:Uc,style:Uc,transform:Uc};Xf.defaultProps={...$c.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1};var I7=Xf,Uv,Sk;function f3(){if(Sk)return Uv;Sk=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Uv=e,Uv}var Bv,_k;function T7(){if(_k)return Bv;_k=1;var e=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis;return Bv=e,Bv}var Hv,Ck;function p3(){if(Ck)return Hv;Ck=1;var e=T7(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Hv=r,Hv}var zv,xk;function R7(){if(xk)return zv;xk=1;var e=p3(),t=function(){return e.Date.now()};return zv=t,zv}var Vv,Pk;function A7(){if(Pk)return Vv;Pk=1;var e=/\s/;function t(r){for(var a=r.length;a--&&e.test(r.charAt(a)););return a}return Vv=t,Vv}var Wv,Ok;function D7(){if(Ok)return Wv;Ok=1;var e=A7(),t=/^\s+/;function r(a){return a&&a.slice(0,e(a)+1).replace(t,"")}return Wv=r,Wv}var jv,Ik;function v3(){if(Ik)return jv;Ik=1;var e=p3(),t=e.Symbol;return jv=t,jv}var Gv,Tk;function N7(){if(Tk)return Gv;Tk=1;var e=v3(),t=Object.prototype,r=t.hasOwnProperty,a=t.toString,o=e?e.toStringTag:void 0;function n(i){var s=r.call(i,o),l=i[o];try{i[o]=void 0;var c=!0}catch{}var u=a.call(i);return c&&(s?i[o]=l:delete i[o]),u}return Gv=n,Gv}var Kv,Rk;function M7(){if(Rk)return Kv;Rk=1;var e=Object.prototype,t=e.toString;function r(a){return t.call(a)}return Kv=r,Kv}var Yv,Ak;function F7(){if(Ak)return Yv;Ak=1;var e=v3(),t=N7(),r=M7(),a="[object Null]",o="[object Undefined]",n=e?e.toStringTag:void 0;function i(s){return s==null?s===void 0?o:a:n&&n in Object(s)?t(s):r(s)}return Yv=i,Yv}var Xv,Dk;function L7(){if(Dk)return Xv;Dk=1;function e(t){return t!=null&&typeof t=="object"}return Xv=e,Xv}var Jv,Nk;function U7(){if(Nk)return Jv;Nk=1;var e=F7(),t=L7(),r="[object Symbol]";function a(o){return typeof o=="symbol"||t(o)&&e(o)==r}return Jv=a,Jv}var Zv,Mk;function B7(){if(Mk)return Zv;Mk=1;var e=D7(),t=f3(),r=U7(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,i=/^0o[0-7]+$/i,s=parseInt;function l(c){if(typeof c=="number")return c;if(r(c))return a;if(t(c)){var u=typeof c.valueOf=="function"?c.valueOf():c;c=t(u)?u+"":u}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=n.test(c);return d||i.test(c)?s(c.slice(2),d?2:8):o.test(c)?a:+c}return Zv=l,Zv}var Qv,Fk;function H7(){if(Fk)return Qv;Fk=1;var e=f3(),t=R7(),r=B7(),a="Expected a function",o=Math.max,n=Math.min;function i(s,l,c){var u,d,m,b,v,g,w=0,E=!1,S=!1,P=!0;if(typeof s!="function")throw new TypeError(a);l=r(l)||0,e(c)&&(E=!!c.leading,S="maxWait"in c,m=S?o(r(c.maxWait)||0,l):m,P="trailing"in c?!!c.trailing:P);function I(F){var H=u,W=d;return u=d=void 0,w=F,b=s.apply(W,H),b}function O(F){return w=F,v=setTimeout(R,l),E?I(F):b}function T(F){var H=F-g,W=F-w,z=l-H;return S?n(z,m-W):z}function C(F){var H=F-g,W=F-w;return g===void 0||H>=l||H<0||S&&W>=m}function R(){var F=t();if(C(F))return N(F);v=setTimeout(R,T(F))}function N(F){return v=void 0,P&&u?I(F):(u=d=void 0,b)}function U(){v!==void 0&&clearTimeout(v),w=0,u=g=d=v=void 0}function B(){return v===void 0?b:N(t())}function Y(){var F=t(),H=C(F);if(u=arguments,d=this,g=F,H){if(v===void 0)return O(g);if(S)return clearTimeout(v),v=setTimeout(R,l),I(g)}return v===void 0&&(v=setTimeout(R,l)),b}return Y.cancel=U,Y.flush=B,Y}return Qv=i,Qv}H7();var Lg={exports:{}},Lk;function m3(){if(Lk)return Lg.exports;Lk=1;var e=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(e){var t=new Uint8Array(16);Lg.exports=function(){return e(t),t}}else{var r=new Array(16);Lg.exports=function(){for(var o=0,n;o<16;o++)(o&3)===0&&(n=Math.random()*4294967296),r[o]=n>>>((o&3)<<3)&255;return r}}return Lg.exports}var qv,Uk;function b3(){if(Uk)return qv;Uk=1;for(var e=[],t=0;t<256;++t)e[t]=(t+256).toString(16).substr(1);function r(a,o){var n=o||0,i=e;return[i[a[n++]],i[a[n++]],i[a[n++]],i[a[n++]],"-",i[a[n++]],i[a[n++]],"-",i[a[n++]],i[a[n++]],"-",i[a[n++]],i[a[n++]],"-",i[a[n++]],i[a[n++]],i[a[n++]],i[a[n++]],i[a[n++]],i[a[n++]]].join("")}return qv=r,qv}var $v,Bk;function z7(){if(Bk)return $v;Bk=1;var e=m3(),t=b3(),r,a,o=0,n=0;function i(s,l,c){var u=l&&c||0,d=l||[];s=s||{};var m=s.node||r,b=s.clockseq!==void 0?s.clockseq:a;if(m==null||b==null){var v=e();m==null&&(m=r=[v[0]|1,v[1],v[2],v[3],v[4],v[5]]),b==null&&(b=a=(v[6]<<8|v[7])&16383)}var g=s.msecs!==void 0?s.msecs:new Date().getTime(),w=s.nsecs!==void 0?s.nsecs:n+1,E=g-o+(w-n)/1e4;if(E<0&&s.clockseq===void 0&&(b=b+1&16383),(E<0||g>o)&&s.nsecs===void 0&&(w=0),w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=g,n=w,a=b,g+=122192928e5;var S=((g&268435455)*1e4+w)%4294967296;d[u++]=S>>>24&255,d[u++]=S>>>16&255,d[u++]=S>>>8&255,d[u++]=S&255;var P=g/4294967296*1e4&268435455;d[u++]=P>>>8&255,d[u++]=P&255,d[u++]=P>>>24&15|16,d[u++]=P>>>16&255,d[u++]=b>>>8|128,d[u++]=b&255;for(var I=0;I<6;++I)d[u+I]=m[I];return l||t(d)}return $v=i,$v}var em,Hk;function V7(){if(Hk)return em;Hk=1;var e=m3(),t=b3();function r(a,o,n){var i=o&&n||0;typeof a=="string"&&(o=a==="binary"?new Array(16):null,a=null),a=a||{};var s=a.random||(a.rng||e)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,o)for(var l=0;l<16;++l)o[i+l]=s[l];return o||t(s)}return em=r,em}var tm,zk;function W7(){if(zk)return tm;zk=1;var e=z7(),t=V7(),r=t;return r.v1=e,r.v4=t,tm=r,tm}var j7=W7();function Jf(e,t){if(e==null)return{};var r,a,o=Pc(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Vk(e,t,r,a,o,n,i){try{var s=e[n](i),l=s.value}catch(c){return void r(c)}s.done?t(l):Promise.resolve(l).then(a,o)}function Mt(e){return function(){var t=this,r=arguments;return new Promise(function(a,o){var n=e.apply(t,r);function i(l){Vk(n,a,o,i,s,"next",l)}function s(l){Vk(n,a,o,i,s,"throw",l)}i(void 0)})}}var rm={exports:{}},am={exports:{}},Wk;function y3(){return Wk||(Wk=1,(function(e){function t(r,a){this.v=r,this.k=a}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(am)),am.exports}var nm={exports:{}},om={exports:{}},jk;function k3(){return jk||(jk=1,(function(e){function t(r,a,o,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}e.exports=t=function(l,c,u,d){function m(b,v){t(l,b,function(g){return this._invoke(b,v,g)})}c?i?i(l,c,{value:u,enumerable:!d,configurable:!d,writable:!d}):l[c]=u:(m("next",0),m("throw",1),m("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,a,o,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(om)),om.exports}var Gk;function w3(){return Gk||(Gk=1,(function(e){var t=k3();function r(){var a,o,n=typeof Symbol=="function"?Symbol:{},i=n.iterator||"@@iterator",s=n.toStringTag||"@@toStringTag";function l(w,E,S,P){var I=E&&E.prototype instanceof u?E:u,O=Object.create(I.prototype);return t(O,"_invoke",(function(T,C,R){var N,U,B,Y=0,F=R||[],H=!1,W={p:0,n:0,v:a,a:z,f:z.bind(a,4),d:function($,se){return N=$,U=0,B=a,W.n=se,c}};function z(J,$){for(U=J,B=$,o=0;!H&&Y&&!se&&o<F.length;o++){var se,G=F[o],Z=W.p,ue=G[2];J>3?(se=ue===$)&&(B=G[(U=G[4])?5:(U=3,3)],G[4]=G[5]=a):G[0]<=Z&&((se=J<2&&Z<G[1])?(U=0,W.v=$,W.n=G[1]):Z<ue&&(se=J<3||G[0]>$||$>ue)&&(G[4]=J,G[5]=$,W.n=ue,U=0))}if(se||J>1)return c;throw H=!0,$}return function(J,$,se){if(Y>1)throw TypeError("Generator is already running");for(H&&$===1&&z($,se),U=$,B=se;(o=U<2?a:B)||!H;){N||(U?(U>1&&(W.n=U<3?-1:B),z(U,B)):W.v=B);try{if(Y=2,N){if(U||(J="next"),o=N[J]){if(!(o=o.call(N,B)))throw TypeError("iterator result is not an object");if(!o.done)return o;B=o.value,U<2&&(U=0)}else U===1&&(o=N.return)&&o.call(N),U<2&&(B=TypeError("The iterator does not provide a '"+J+"' method"),U=1);N=a}else if((o=(H=W.n<0)?B:T.call(C,W))!==c)break}catch(G){N=a,U=1,B=G}finally{Y=1}}return{value:o,done:H}}})(w,S,P),!0),O}var c={};function u(){}function d(){}function m(){}o=Object.getPrototypeOf;var b=[][i]?o(o([][i]())):(t(o={},i,function(){return this}),o),v=m.prototype=u.prototype=Object.create(b);function g(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,m):(w.__proto__=m,t(w,s,"GeneratorFunction")),w.prototype=Object.create(v),w}return d.prototype=m,t(v,"constructor",m),t(m,"constructor",d),d.displayName="GeneratorFunction",t(m,s,"GeneratorFunction"),t(v),t(v,s,"Generator"),t(v,i,function(){return this}),t(v,"toString",function(){return"[object Generator]"}),(e.exports=r=function(){return{w:l,m:g}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(nm)),nm.exports}var im={exports:{}},sm={exports:{}},lm={exports:{}},Kk;function E3(){return Kk||(Kk=1,(function(e){var t=y3(),r=k3();function a(o,n){function i(l,c,u,d){try{var m=o[l](c),b=m.value;return b instanceof t?n.resolve(b.v).then(function(v){i("next",v,u,d)},function(v){i("throw",v,u,d)}):n.resolve(b).then(function(v){m.value=v,u(m)},function(v){return i("throw",v,u,d)})}catch(v){d(v)}}var s;this.next||(r(a.prototype),r(a.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),r(this,"_invoke",function(l,c,u){function d(){return new n(function(m,b){i(l,u,m,b)})}return s=s?s.then(d,d):d()},!0)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports})(lm)),lm.exports}var Yk;function S3(){return Yk||(Yk=1,(function(e){var t=w3(),r=E3();function a(o,n,i,s,l){return new r(t().w(o,n,i,s),l||Promise)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports})(sm)),sm.exports}var Xk;function G7(){return Xk||(Xk=1,(function(e){var t=S3();function r(a,o,n,i,s){var l=t(a,o,n,i,s);return l.next().then(function(c){return c.done?c.value:l.next()})}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(im)),im.exports}var cm={exports:{}},Jk;function K7(){return Jk||(Jk=1,(function(e){function t(r){var a=Object(r),o=[];for(var n in a)o.unshift(n);return function i(){for(;o.length;)if((n=o.pop())in a)return i.value=n,i.done=!1,i;return i.done=!0,i}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(cm)),cm.exports}var um={exports:{}},dm={exports:{}},Zk;function Y7(){return Zk||(Zk=1,(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(dm)),dm.exports}var Qk;function X7(){return Qk||(Qk=1,(function(e){var t=Y7().default;function r(a){if(a!=null){var o=a[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(o)return o.call(a);if(typeof a.next=="function")return a;if(!isNaN(a.length))return{next:function(){return a&&n>=a.length&&(a=void 0),{value:a&&a[n++],done:!a}}}}throw new TypeError(t(a)+" is not iterable")}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(um)),um.exports}var qk;function J7(){return qk||(qk=1,(function(e){var t=y3(),r=w3(),a=G7(),o=S3(),n=E3(),i=K7(),s=X7();function l(){var c=r(),u=c.m(l),d=(Object.getPrototypeOf?Object.getPrototypeOf(u):u.__proto__).constructor;function m(g){var w=typeof g=="function"&&g.constructor;return!!w&&(w===d||(w.displayName||w.name)==="GeneratorFunction")}var b={throw:1,return:2,break:3,continue:3};function v(g){var w,E;return function(S){w||(w={stop:function(){return E(S.a,2)},catch:function(){return S.v},abrupt:function(I,O){return E(S.a,b[I],O)},delegateYield:function(I,O,T){return w.resultName=O,E(S.d,s(I),T)},finish:function(I){return E(S.f,I)}},E=function(I,O,T){S.p=w.prev,S.n=w.next;try{return I(O,T)}finally{w.next=S.n}}),w.resultName&&(w[w.resultName]=S.v,w.resultName=void 0),w.sent=S.v,w.next=S.n;try{return g.call(this,w)}finally{S.p=w.prev,S.n=w.next}}}return(e.exports=l=function(){return{wrap:function(E,S,P,I){return c.w(v(E),S,P,I&&I.reverse())},isGeneratorFunction:m,mark:c.m,awrap:function(E,S){return new t(E,S)},AsyncIterator:n,async:function(E,S,P,I,O){return(m(S)?o:a)(v(E),S,P,I,O)},keys:i,values:s}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports})(rm)),rm.exports}var hm,$k;function Z7(){if($k)return hm;$k=1;var e=J7()();hm=e;try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}return hm}var Q7=Z7();const Ge=vt(Q7);var js={},Gs={},gm={},fm={},ew;function Da(){return ew||(ew=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Log=e.LogLevel=void 0;const t=" DEBUG ",r=" INFO ",a=" WARN ",o=" ERROR ";function n(s){return s.unshift("[Statsig]"),s}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class i{static info(...l){i.level>=e.LogLevel.Info&&console.info(r,...n(l))}static debug(...l){i.level>=e.LogLevel.Debug&&console.debug(t,...n(l))}static warn(...l){i.level>=e.LogLevel.Warn&&console.warn(a,...n(l))}static error(...l){i.level>=e.LogLevel.Error&&console.error(o,...n(l))}}e.Log=i,i.level=e.LogLevel.Warn})(fm)),fm}var tw;function Ji(){return tw||(tw=1,(function(e){var t,r,a;Object.defineProperty(e,"__esModule",{value:!0}),e._getInstance=e._getStatsigGlobalFlag=e._getStatsigGlobal=void 0;const o=Da(),n=()=>{try{return typeof __STATSIG__<"u"?__STATSIG__:m}catch{return m}};e._getStatsigGlobal=n;const i=b=>(0,e._getStatsigGlobal)()[b];e._getStatsigGlobalFlag=i;const s=b=>{const v=(0,e._getStatsigGlobal)();return b?v.instances&&v.instances[b]:(v.instances&&Object.keys(v.instances).length>1&&o.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),v.firstInstance)};e._getInstance=s;const l="__STATSIG__",c=typeof window<"u"?window:{},u=typeof globalThis<"u"?globalThis:{},d=typeof globalThis<"u"?globalThis:{},m=(a=(r=(t=c[l])!==null&&t!==void 0?t:u[l])!==null&&r!==void 0?r:d[l])!==null&&a!==void 0?a:{instance:e._getInstance};c[l]=m,u[l]=m,d[l]=m})(gm)),gm}var pm={},rw;function Ob(){return rw||(rw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Diagnostics=void 0;const t=new Map,r="start",a="end",o="statsig::diagnostics";e.Diagnostics={_getMarkers:c=>t.get(c),_markInitOverallStart:c=>{s(c,n({},r,"overall"))},_markInitOverallEnd:(c,u,d)=>{s(c,n({success:u,error:u?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:d},a,"overall"))},_markInitNetworkReqStart:(c,u)=>{s(c,n(u,r,"initialize","network_request"))},_markInitNetworkReqEnd:(c,u)=>{s(c,n(u,a,"initialize","network_request"))},_markInitProcessStart:c=>{s(c,n({},r,"initialize","process"))},_markInitProcessEnd:(c,u)=>{s(c,n(u,a,"initialize","process"))},_clearMarkers:c=>{t.delete(c)},_formatError(c){if(c&&typeof c=="object")return{code:l(c,"code"),name:l(c,"name"),message:l(c,"message")}},_getDiagnosticsData(c,u,d,m){var b;return{success:c?.ok===!0,statusCode:c?.status,sdkRegion:(b=c?.headers)===null||b===void 0?void 0:b.get("x-statsig-region"),isDelta:d.includes('"is_delta":true')===!0?!0:void 0,attempt:u,error:e.Diagnostics._formatError(m)}},_enqueueDiagnosticsEvent(c,u,d,m){const b=e.Diagnostics._getMarkers(d);if(b==null||b.length<=0)return-1;const v=b[b.length-1].timestamp-b[0].timestamp;e.Diagnostics._clearMarkers(d);const g=i(c,{context:"initialize",markers:b.slice(),statsigOptions:m});return u.enqueue(g),v}};function n(c,u,d,m){return Object.assign({key:d,action:u,step:m,timestamp:Date.now()},c)}function i(c,u){return{eventName:o,user:c,value:null,metadata:u,time:Date.now()}}function s(c,u){var d;const m=(d=t.get(c))!==null&&d!==void 0?d:[];m.push(u),t.set(c,m)}function l(c,u){if(u in c)return c[u]}})(pm)),pm}var Ks={},Ys={},vm={},Xs={},aw;function S0(){if(aw)return Xs;aw=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs._isTypeMatch=Xs._typeOf=void 0;function e(r){return Array.isArray(r)?"array":typeof r}Xs._typeOf=e;function t(r,a){const o=n=>Array.isArray(n)?"array":n===null?"null":typeof n;return o(r)===o(a)}return Xs._isTypeMatch=t,Xs}var nw;function eu(){return nw||(nw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._getSortedObject=e._DJB2Object=e._DJB2=void 0;const t=S0(),r=n=>{let i=0;for(let s=0;s<n.length;s++){const l=n.charCodeAt(s);i=(i<<5)-i+l,i=i&i}return String(i>>>0)};e._DJB2=r;const a=(n,i)=>(0,e._DJB2)(JSON.stringify((0,e._getSortedObject)(n,i)));e._DJB2Object=a;const o=(n,i)=>{if(n==null)return null;const s=Object.keys(n).sort(),l={};return s.forEach(c=>{const u=n[c];if(i===0||(0,t._typeOf)(u)!=="object"){l[c]=u;return}l[c]=(0,e._getSortedObject)(u,i!=null?i-1:i)}),l};e._getSortedObject=o})(vm)),vm}var ow;function Zf(){if(ow)return Ys;ow=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys._getStorageKey=Ys._getUserStorageKey=void 0;const e=eu();function t(a,o,n){var i;if(n)return n(a,o);const s=o&&o.customIDs?o.customIDs:{},l=[`uid:${(i=o?.userID)!==null&&i!==void 0?i:""}`,`cids:${Object.keys(s).sort((c,u)=>c.localeCompare(u)).map(c=>`${c}-${s[c]}`).join(",")}`,`k:${a}`];return(0,e._DJB2)(l.join("|"))}Ys._getUserStorageKey=t;function r(a,o,n){return o?t(a,o,n):(0,e._DJB2)(`k:${a}`)}return Ys._getStorageKey=r,Ys}var mm={},iw;function Qf(){return iw||(iw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},e.NetworkDefault={[e.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[e.Endpoint._initialize]:"https://featureassets.org/v1",[e.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}})(mm)),mm}var bm={},sw;function bl(){return sw||(sw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._getUnloadEvent=e._getCurrentPageUrlSafe=e._addDocumentEventListenerSafe=e._addWindowEventListenerSafe=e._isServerEnv=e._getDocumentSafe=e._getWindowSafe=void 0;const t=()=>typeof window<"u"?window:null;e._getWindowSafe=t;const r=()=>{var l;const c=(0,e._getWindowSafe)();return(l=c?.document)!==null&&l!==void 0?l:null};e._getDocumentSafe=r;const a=()=>{if((0,e._getDocumentSafe)()!==null)return!1;const l=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;return typeof EdgeRuntime=="string"||l};e._isServerEnv=a;const o=(l,c)=>{const u=(0,e._getWindowSafe)();typeof u?.addEventListener=="function"&&u.addEventListener(l,c)};e._addWindowEventListenerSafe=o;const n=(l,c)=>{const u=(0,e._getDocumentSafe)();typeof u?.addEventListener=="function"&&u.addEventListener(l,c)};e._addDocumentEventListenerSafe=n;const i=()=>{var l;try{return(l=(0,e._getWindowSafe)())===null||l===void 0?void 0:l.location.href.split(/[?#]/)[0]}catch{return}};e._getCurrentPageUrlSafe=i;const s=()=>{const l=(0,e._getWindowSafe)();return l&&"onpagehide"in l?"pagehide":"beforeunload"};e._getUnloadEvent=s})(bm)),bm}var qa={},lw;function _3(){if(lw)return qa;lw=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa._createLayerParameterExposure=qa._createConfigExposure=qa._mapExposures=qa._createGateExposure=qa._isExposureEvent=void 0;const e="statsig::config_exposure",t="statsig::gate_exposure",r="statsig::layer_exposure",a=(u,d,m,b,v)=>(m.bootstrapMetadata&&(b.bootstrapMetadata=m.bootstrapMetadata),{eventName:u,user:d,value:null,metadata:c(m,b),secondaryExposures:v,time:Date.now()}),o=({eventName:u})=>u===t||u===e||u===r;qa._isExposureEvent=o;const n=(u,d,m)=>{var b,v,g;const w={gate:d.name,gateValue:String(d.value),ruleID:d.ruleID};return((b=d.__evaluation)===null||b===void 0?void 0:b.version)!=null&&(w.configVersion=d.__evaluation.version),a(t,u,d.details,w,i((g=(v=d.__evaluation)===null||v===void 0?void 0:v.secondary_exposures)!==null&&g!==void 0?g:[],m))};qa._createGateExposure=n;function i(u,d){return u.map(m=>typeof m=="string"?(d??{})[m]:m).filter(m=>m!=null)}qa._mapExposures=i;const s=(u,d,m)=>{var b,v,g,w;const E={config:d.name,ruleID:d.ruleID};return((b=d.__evaluation)===null||b===void 0?void 0:b.version)!=null&&(E.configVersion=d.__evaluation.version),((v=d.__evaluation)===null||v===void 0?void 0:v.passed)!=null&&(E.rulePassed=String(d.__evaluation.passed)),a(e,u,d.details,E,i((w=(g=d.__evaluation)===null||g===void 0?void 0:g.secondary_exposures)!==null&&w!==void 0?w:[],m))};qa._createConfigExposure=s;const l=(u,d,m,b)=>{var v,g,w,E,S,P,I;const O=d.__evaluation,T=((v=O?.explicit_parameters)===null||v===void 0?void 0:v.includes(m))===!0;let C="",R=(g=O?.undelegated_secondary_exposures)!==null&&g!==void 0?g:[];T&&(C=(w=O.allocated_experiment_name)!==null&&w!==void 0?w:"",R=(E=O.secondary_exposures)!==null&&E!==void 0?E:[]);const N=(S=d.__evaluation)===null||S===void 0?void 0:S.parameter_rule_ids,U={config:d.name,parameterName:m,ruleID:(P=N?.[m])!==null&&P!==void 0?P:d.ruleID,allocatedExperiment:C,isExplicitParameter:String(T)};return((I=d.__evaluation)===null||I===void 0?void 0:I.version)!=null&&(U.configVersion=d.__evaluation.version),a(r,u,d.details,U,i(R,b))};qa._createLayerParameterExposure=l;const c=(u,d)=>(d.reason=u.reason,u.lcut&&(d.lcut=String(u.lcut)),u.receivedAt&&(d.receivedAt=String(u.receivedAt)),d);return qa}var Js={},cw;function qf(){return cw||(cw=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.LoggingEnabledOption=Js.LogEventCompressionMode=void 0,Js.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},Js.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}),Js}var ym={},uw;function $i(){return uw||(uw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._setObjectInStorage=e._getObjectFromStorage=e.Storage=void 0;const t=Da(),r=bl(),a={},o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:d=>a[d]?a[d]:null,setItem:(d,m)=>{a[d]=m},removeItem:d=>{delete a[d]},getAllKeys:()=>Object.keys(a)};let n=null;try{const d=(0,r._getWindowSafe)();d&&d.localStorage&&typeof d.localStorage.getItem=="function"&&(n={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:m=>d.localStorage.getItem(m),setItem:(m,b)=>d.localStorage.setItem(m,b),removeItem:m=>d.localStorage.removeItem(m),getAllKeys:()=>Object.keys(d.localStorage)})}catch{t.Log.warn("Failed to setup localStorageProvider.")}let i=n??o,s=i;function l(d){try{return d()}catch(m){if(m instanceof Error&&m.name==="SecurityError")return e.Storage._setProvider(o),null;throw m}}e.Storage={isReady:()=>s.isReady(),isReadyResolver:()=>s.isReadyResolver(),getProviderName:()=>s.getProviderName(),getItem:d=>l(()=>s.getItem(d)),setItem:(d,m)=>l(()=>s.setItem(d,m)),removeItem:d=>s.removeItem(d),getAllKeys:()=>s.getAllKeys(),_setProvider:d=>{i=d,s=d},_setDisabled:d=>{d?s=o:s=i}};function c(d){const m=e.Storage.getItem(d);try{return JSON.parse(m??"null")}catch{return t.Log.error(`Failed to parse value for key "${d}"`),null}}e._getObjectFromStorage=c;function u(d,m){e.Storage.setItem(d,JSON.stringify(m))}e._setObjectInStorage=u})(ym)),ym}var dd={},dw;function C3(){if(dw)return dd;dw=1,Object.defineProperty(dd,"__esModule",{value:!0}),dd.UrlConfiguration=void 0;const e=eu(),t=Qf(),r={[t.Endpoint._initialize]:"i",[t.Endpoint._rgstr]:"e",[t.Endpoint._download_config_specs]:"d"};let a=class{constructor(n,i,s,l){this.customUrl=null,this.fallbackUrls=null,this.endpoint=n,this.endpointDnsKey=r[n],i&&(this.customUrl=i),!i&&s&&(this.customUrl=s.endsWith("/")?`${s}${n}`:`${s}/${n}`),l&&(this.fallbackUrls=l);const c=t.NetworkDefault[n];this.defaultUrl=`${c}/${n}`}getUrl(){var n;return(n=this.customUrl)!==null&&n!==void 0?n:this.defaultUrl}getChecksum(){var n;const i=((n=this.fallbackUrls)!==null&&n!==void 0?n:[]).sort().join(",");return(0,e._DJB2)(this.customUrl+i)}};return dd.UrlConfiguration=a,dd}var km={},hw;function _0(){return hw||(hw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._notifyVisibilityChanged=e._subscribeToVisiblityChanged=e._isUnloading=e._isCurrentlyVisible=void 0;const t=bl(),r="foreground",a="background",o=[];let n=r,i=!1;const s=()=>n===r;e._isCurrentlyVisible=s;const l=()=>i;e._isUnloading=l;const c=d=>{o.unshift(d)};e._subscribeToVisiblityChanged=c;const u=d=>{d!==n&&(n=d,o.forEach(m=>m(d)))};e._notifyVisibilityChanged=u,(0,t._addWindowEventListenerSafe)("focus",()=>{i=!1,(0,e._notifyVisibilityChanged)(r)}),(0,t._addWindowEventListenerSafe)("blur",()=>(0,e._notifyVisibilityChanged)(a)),(0,t._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,e._notifyVisibilityChanged)(document.visibilityState==="visible"?r:a)}),(0,t._addWindowEventListenerSafe)((0,t._getUnloadEvent)(),()=>{i=!0,(0,e._notifyVisibilityChanged)(a)})})(km)),km}var gw;function x3(){if(gw)return Ks;gw=1;var e=Ks&&Ks.__awaiter||function(P,I,O,T){function C(R){return R instanceof O?R:new O(function(N){N(R)})}return new(O||(O=Promise))(function(R,N){function U(F){try{Y(T.next(F))}catch(H){N(H)}}function B(F){try{Y(T.throw(F))}catch(H){N(H)}}function Y(F){F.done?R(F.value):C(F.value).then(U,B)}Y((T=T.apply(P,I||[])).next())})};Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.EventLogger=void 0;const t=Zf(),r=eu(),a=Da(),o=Qf(),n=bl(),i=_3(),s=qf(),l=$i(),c=C3(),u=_0(),d=100,m=1e4,b=1e3,v=6e5,g=500,w=200,E={};let S=class Oc{static _safeFlushAndForget(I){var O;(O=E[I])===null||O===void 0||O.flush().catch(()=>{})}static _safeRetryFailedLogs(I){var O;(O=E[I])===null||O===void 0||O._retryFailedLogs()}constructor(I,O,T,C){var R,N;this._sdkKey=I,this._emitter=O,this._network=T,this._options=C,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=(R=C?.loggingEnabled)!==null&&R!==void 0?R:C?.disableLogging===!0?s.LoggingEnabledOption.disabled:s.LoggingEnabledOption.browserOnly,C?.loggingEnabled&&C.disableLogging!==void 0&&a.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=(N=C?.loggingBufferMaxSize)!==null&&N!==void 0?N:d;const U=C?.networkConfig;this._logEventUrlConfig=new c.UrlConfiguration(o.Endpoint._rgstr,U?.logEventUrl,U?.api,U?.logEventFallbackUrls)}setLogEventCompressionMode(I){this._network.setLogEventCompressionMode(I)}setLoggingEnabled(I){if(this._loggingEnabled==="disabled"&&I!=="disabled"){const O=this._getStorageKey(),T=(0,l._getObjectFromStorage)(O);T&&this._queue.push(...T),l.Storage.removeItem(O)}this._loggingEnabled=I}enqueue(I){this._shouldLogEvent(I)&&(this._normalizeAndAppendEvent(I),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&Oc._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(I){var O;const T=(O=this._nonExposedChecks[I])!==null&&O!==void 0?O:0;this._nonExposedChecks[I]=T+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var I;const O=(0,n._isServerEnv)();O&&((I=this._options)===null||I===void 0?void 0:I.loggingEnabled)!=="always"||(E[this._sdkKey]=this,O||(0,u._subscribeToVisiblityChanged)(T=>{T==="background"?Oc._safeFlushAndForget(this._sdkKey):T==="foreground"&&Oc._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(),this._startBackgroundFlushInterval())}stop(){return e(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete E[this._sdkKey],yield this.flush()})}flush(){return e(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),this._queue.length===0)return;const I=this._queue;this._queue=[],yield this._sendEvents(I)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,!(Date.now()-this._creationTime>w)&&setTimeout(()=>Oc._safeFlushAndForget(this._sdkKey),w))}_shouldLogEvent(I){var O;if(((O=this._options)===null||O===void 0?void 0:O.loggingEnabled)!=="always"&&(0,n._isServerEnv)())return!1;if(!(0,i._isExposureEvent)(I))return!0;const T=I.user?I.user:{statsigEnvironment:void 0},C=(0,t._getUserStorageKey)(this._sdkKey,T),R=I.metadata?I.metadata:{},N=[I.eventName,C,R.gate,R.config,R.ruleID,R.allocatedExperiment,R.parameterName,String(R.isExplicitParameter),R.reason].join("|"),U=this._lastExposureTimeMap[N],B=Date.now();return U&&B-U<v?!1:(Object.keys(this._lastExposureTimeMap).length>b&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[N]=B,!0)}_sendEvents(I){return e(this,void 0,void 0,function*(){var O,T;if(this._loggingEnabled==="disabled")return this._saveFailedLogsToStorage(I),!1;try{const R=(0,u._isUnloading)()&&this._network.isBeaconSupported()&&((T=(O=this._options)===null||O===void 0?void 0:O.networkConfig)===null||T===void 0?void 0:T.networkOverrideFunc)==null;return this._emitter({name:"pre_logs_flushed",events:I}),(R?this._sendEventsViaBeacon(I):yield this._sendEventsViaPost(I)).success?(this._emitter({name:"logs_flushed",events:I}),!0):(a.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(I),!1)}catch{return a.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(I){return e(this,void 0,void 0,function*(){var O;const T=yield this._network.post(this._getRequestData(I)),C=(O=T?.code)!==null&&O!==void 0?O:-1;return{success:C>=200&&C<300}})}_sendEventsViaBeacon(I){return{success:this._network.beacon(this._getRequestData(I))}}_getRequestData(I){return{sdkKey:this._sdkKey,data:{events:I},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[o.NetworkParam.EventCount]:String(I.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(I){for(;I.length>g;)I.shift();const O=this._getStorageKey();try{const T=this._getFailedLogsFromStorage(O);(0,l._setObjectInStorage)(O,[...T,...I])}catch{a.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(I){let O=[];try{const T=(0,l._getObjectFromStorage)(I);return Array.isArray(T)&&(O=T),O}catch{return[]}}_retryFailedLogs(){const I=this._getStorageKey();e(this,void 0,void 0,function*(){l.Storage.isReady()||(yield l.Storage.isReadyResolver());const O=(0,l._getObjectFromStorage)(I);O&&(l.Storage.removeItem(I),yield this._sendEvents(O))}).catch(()=>{a.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,r._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(I){I.user&&(I.user=Object.assign({},I.user),delete I.user.privateAttributes);const O={},T=this._getCurrentPageUrl();T&&(O.statsigMetadata={currentPage:T});const C=Object.assign(Object.assign({},I),O);a.Log.debug("Enqueued Event:",C),this._queue.push(C)}_appendAndResetNonExposedChecks(){Object.keys(this._nonExposedChecks).length!==0&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var I;if(((I=this._options)===null||I===void 0?void 0:I.includeCurrentPageUrlWithEvents)!==!1)return(0,n._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var I,O;const T=(O=(I=this._options)===null||I===void 0?void 0:I.loggingIntervalMs)!==null&&O!==void 0?O:m,C=setInterval(()=>{const R=E[this._sdkKey];!R||R._flushIntervalId!==C?clearInterval(C):Oc._safeFlushAndForget(this._sdkKey)},T);this._flushIntervalId=C}};return Ks.EventLogger=S,Ks}var wm={},fw;function kf(){return fw||(fw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.30.2";let t={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>t,add:r=>{t=Object.assign(Object.assign({},t),r)}}})(wm)),wm}var Em={},pw;function q7(){return pw||(pw=1,Object.defineProperty(Em,"__esModule",{value:!0})),Em}var ai={},Zs={},hd={},vw;function C0(){if(vw)return hd;vw=1,Object.defineProperty(hd,"__esModule",{value:!0}),hd.getUUID=void 0;function e(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let t=new Date().getTime(),r=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(Math.random()*4)]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,o=>{let n=Math.random()*16;return t>0?(n=(t+n)%16|0,t=Math.floor(t/16)):(n=(r+n)%16|0,r=Math.floor(r/16)),(o==="x"?n:n&7|8).toString(16)})}return hd.getUUID=e,hd}var mw;function $f(){if(mw)return Zs;mw=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.getCookieName=Zs.StableID=void 0;const e=Zf(),t=Da(),r=bl(),a=$i(),o=C0(),n={},i={},s={};Zs.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:v=>{if(s[v])return null;if(n[v]!=null)return n[v];let g=null;return g=d(v),g!=null?(n[v]=g,c(g,v),g):(g=u(v),g==null&&(g=(0,o.getUUID)()),c(g,v),m(g,v),n[v]=g,g)},setOverride:(v,g)=>{n[g]=v,c(v,g),m(v,g)},_setCookiesEnabled:(v,g)=>{i[v]=g},_setDisabled:(v,g)=>{s[v]=g}};function l(v){return`statsig.stable_id.${(0,e._getStorageKey)(v)}`}function c(v,g){const w=l(g);try{(0,a._setObjectInStorage)(w,v)}catch{t.Log.warn("Failed to save StableID to storage")}}function u(v){const g=l(v);return(0,a._getObjectFromStorage)(g)}function d(v){if(!i[v]||(0,r._getDocumentSafe)()==null)return null;const g=document.cookie.split(";");for(const w of g){const[E,S]=w.trim().split("=");if(E===b(v))return decodeURIComponent(S)}return null}function m(v,g){if(!i[g]||(0,r._getDocumentSafe)()==null)return;const w=new Date;w.setFullYear(w.getFullYear()+1),document.cookie=`${b(g)}=${encodeURIComponent(v)}; expires=${w.toUTCString()}; path=/`}function b(v){return`statsig.stable_id.${(0,e._getStorageKey)(v)}`}return Zs.getCookieName=b,Zs}var Qs={},bw;function P3(){if(bw)return Qs;bw=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs._getFullUserHash=Qs._normalizeUser=void 0;const e=eu(),t=Da();function r(o,n,i){try{const s=JSON.parse(JSON.stringify(o));return n!=null&&n.environment!=null?s.statsigEnvironment=n.environment:i!=null&&(s.statsigEnvironment={tier:i}),s}catch{return t.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}}Qs._normalizeUser=r;function a(o){return o?(0,e._DJB2Object)(o):null}return Qs._getFullUserHash=a,Qs}var gd={},yw;function O3(){if(yw)return gd;yw=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd._typedJsonParse=void 0;const e=Da();function t(r,a,o){try{const n=JSON.parse(r);if(n&&typeof n=="object"&&a in n)return n}catch{}return e.Log.error(`Failed to parse ${o}`),null}return gd._typedJsonParse=t,gd}var kw;function $7(){if(kw)return ai;kw=1;var e=ai&&ai.__awaiter||function(m,b,v,g){function w(E){return E instanceof v?E:new v(function(S){S(E)})}return new(v||(v=Promise))(function(E,S){function P(T){try{O(g.next(T))}catch(C){S(C)}}function I(T){try{O(g.throw(T))}catch(C){S(C)}}function O(T){T.done?E(T.value):w(T.value).then(P,I)}O((g=g.apply(m,b||[])).next())})};Object.defineProperty(ai,"__esModule",{value:!0}),ai._makeDataAdapterResult=ai.DataAdapterCore=void 0;const t=Da(),r=$f(),a=P3(),o=$i(),n=O3(),i=10,s=8;let l=class{constructor(b,v){this._adapterName=b,this._cacheSuffix=v,this._options=null,this._sdkKey=null,this._cacheLimit=i,this._lastModifiedStoreKey=`statsig.last_modified_time.${v}`,this._inMemoryCache=new u}attach(b,v,g){this._sdkKey=b,this._options=v}getDataSync(b){const v=b&&(0,a._normalizeUser)(b,this._options),g=this._getCacheKey(v),w=this._inMemoryCache.get(g,v);if(w&&this._getIsCacheValueValid(w))return w;const E=this._loadFromCache(g);return E&&this._getIsCacheValueValid(E)?(this._inMemoryCache.add(g,E,this._cacheLimit),this._inMemoryCache.get(g,v)):null}setData(b,v){const g=v&&(0,a._normalizeUser)(v,this._options),w=this._getCacheKey(g);this._inMemoryCache.add(w,c("Bootstrap",b,null,g),this._cacheLimit)}_getIsCacheValueValid(b){return b.stableID==null||b.stableID===r.StableID.get(this._getSdkKey())}_getDataAsyncImpl(b,v,g){return e(this,void 0,void 0,function*(){o.Storage.isReady()||(yield o.Storage.isReadyResolver());const w=b??this.getDataSync(v),E=[this._fetchAndPrepFromNetwork(w,v,g)];return g?.timeoutMs&&E.push(new Promise(S=>setTimeout(S,g.timeoutMs)).then(()=>(t.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(E)})}_prefetchDataImpl(b,v){return e(this,void 0,void 0,function*(){const g=b&&(0,a._normalizeUser)(b,this._options),w=this._getCacheKey(g),E=yield this._getDataAsyncImpl(null,g,v);E&&this._inMemoryCache.add(w,Object.assign(Object.assign({},E),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(b,v,g){return e(this,void 0,void 0,function*(){var w;const E=(w=b?.data)!==null&&w!==void 0?w:null,S=b!=null&&this._isCachedResultValidFor204(b,v),P=yield this._fetchFromNetwork(E,v,g,S);if(!P)return t.Log.debug("No response returned for latest value"),null;const I=(0,n._typedJsonParse)(P,"has_updates","Response"),O=this._getSdkKey(),T=r.StableID.get(O);let C=null;if(I?.has_updates===!0)C=c("Network",P,T,v);else if(E&&I?.has_updates===!1)C=c("NetworkNotModified",E,T,v);else return null;const R=this._getCacheKey(v);return this._inMemoryCache.add(R,C,this._cacheLimit),this._writeToCache(R,C),C})}_getSdkKey(){return this._sdkKey!=null?this._sdkKey:(t.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(b){var v;const g=(v=o.Storage.getItem)===null||v===void 0?void 0:v.call(o.Storage,b);if(g==null)return null;const w=(0,n._typedJsonParse)(g,"source","Cached Result");return w?Object.assign(Object.assign({},w),{source:"Cache"}):null}_writeToCache(b,v){const g=JSON.stringify(v);for(let w=0;w<s;w++)try{o.Storage.setItem(b,g);break}catch(E){if(!(E instanceof Error)||!(E.toString().includes("QuotaExceededError")||E.toString().includes("QUOTA_EXCEEDED_ERR"))||this._cacheLimit<=1)throw E;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(b,this._cacheLimit-1)}this._runLocalStorageCacheEviction(b)}_runLocalStorageCacheEviction(b,v=this._cacheLimit){var g;const w=(g=(0,o._getObjectFromStorage)(this._lastModifiedStoreKey))!==null&&g!==void 0?g:{};w[b]=Date.now();const E=d(w,v);for(const S of E)delete w[S],o.Storage.removeItem(S);(0,o._setObjectInStorage)(this._lastModifiedStoreKey,w)}};ai.DataAdapterCore=l;function c(m,b,v,g){return{source:m,data:b,receivedAt:Date.now(),stableID:v,fullUserHash:(0,a._getFullUserHash)(g)}}ai._makeDataAdapterResult=c;class u{constructor(){this._data={}}get(b,v){var g;const w=this._data[b],E=w?.stableID,S=(g=v?.customIDs)===null||g===void 0?void 0:g.stableID;return S&&E&&S!==E?(t.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):w}add(b,v,g){const w=d(this._data,g-1);for(const E of w)delete this._data[E];this._data[b]=v}merge(b){this._data=Object.assign(Object.assign({},this._data),b)}}function d(m,b){const v=Object.keys(m);return v.length<=b?[]:b===0?v:v.sort((g,w)=>{const E=m[g],S=m[w];return typeof E=="object"&&typeof S=="object"?E.receivedAt-S.receivedAt:E-S}).slice(0,v.length-b)}return ai}var Sm={},ww;function e8(){return ww||(ww=1,Object.defineProperty(Sm,"__esModule",{value:!0})),Sm}var fd={},pd={},Ew;function x0(){if(Ew)return pd;Ew=1,Object.defineProperty(pd,"__esModule",{value:!0}),pd.SDKType=void 0;const e={};let t;return pd.SDKType={_get:r=>{var a;return((a=e[r])!==null&&a!==void 0?a:"js-mono")+(t??"")},_setClientType(r,a){e[r]=a},_setBindingType(r){(!t||t==="-react")&&(t="-"+r)}},pd}var Sw;function I3(){return Sw||(Sw=1,(function(e){var t=fd&&fd.__awaiter||function(d,m,b,v){function g(w){return w instanceof b?w:new b(function(E){E(w)})}return new(b||(b=Promise))(function(w,E){function S(O){try{I(v.next(O))}catch(T){E(T)}}function P(O){try{I(v.throw(O))}catch(T){E(T)}}function I(O){O.done?w(O.value):g(O.value).then(S,P)}I((v=v.apply(d,m||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorBoundary=e.EXCEPTION_ENDPOINT=void 0;const r=Da(),a=x0(),o=kf();e.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const n="[Statsig] UnknownError";let i=class{constructor(m,b,v,g){this._sdkKey=m,this._options=b,this._emitter=v,this._lastSeenError=g,this._seen=new Set}wrap(m,b){try{const v=m;c(v).forEach(g=>{const w=v[g];"$EB"in w||(v[g]=(...E)=>this._capture(b?`${b}:${g}`:g,()=>w.apply(m,E)),v[g].$EB=!0)})}catch(v){this._onError("eb:wrap",v)}}logError(m,b){this._onError(m,b)}getLastSeenErrorAndReset(){const m=this._lastSeenError;return this._lastSeenError=void 0,m??null}attachErrorIfNoneExists(m){this._lastSeenError||(this._lastSeenError=s(m))}_capture(m,b){try{const v=b();return v&&v instanceof Promise?v.catch(g=>this._onError(m,g)):v}catch(v){return this._onError(m,v),null}}_onError(m,b){try{r.Log.warn(`Caught error in ${m}`,{error:b}),t(this,void 0,void 0,function*(){var g,w,E,S,P,I,O;const T=b||Error(n),C=T instanceof Error,R=C?T.name:"No Name",N=s(T);if(this._lastSeenError=N,this._seen.has(R))return;if(this._seen.add(R),!((w=(g=this._options)===null||g===void 0?void 0:g.networkConfig)===null||w===void 0)&&w.preventAllNetworkTraffic){(E=this._emitter)===null||E===void 0||E.call(this,{name:"error",error:b,tag:m});return}const U=a.SDKType._get(this._sdkKey),B=o.StatsigMetadataProvider.get(),Y=C?T.stack:l(T),F=Object.assign({tag:m,exception:R,info:Y,statsigOptions:u(this._options)},Object.assign(Object.assign({},B),{sdkType:U}));yield((I=(P=(S=this._options)===null||S===void 0?void 0:S.networkConfig)===null||P===void 0?void 0:P.networkOverrideFunc)!==null&&I!==void 0?I:fetch)(e.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(U),"STATSIG-SDK-VERSION":String(B.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(F)}),(O=this._emitter)===null||O===void 0||O.call(this,{name:"error",error:b,tag:m})}).then(()=>{}).catch(()=>{})}catch{}}};e.ErrorBoundary=i;function s(d){return d instanceof Error?d:typeof d=="string"?new Error(d):new Error("An unknown error occurred.")}function l(d){try{return JSON.stringify(d)}catch{return n}}function c(d){const m=new Set;let b=Object.getPrototypeOf(d);for(;b&&b!==Object.prototype;)Object.getOwnPropertyNames(b).filter(v=>typeof b?.[v]=="function").forEach(v=>m.add(v)),b=Object.getPrototypeOf(b);return Array.from(m)}function u(d){if(!d)return{};const m={};return Object.keys(d).forEach(b=>{const v=b,g=d[v];switch(typeof g){case"number":case"bigint":case"boolean":m[String(v)]=g;break;case"string":g.length<50?m[String(v)]=g:m[String(v)]="set";break;case"object":v==="environment"?m.environment=g:v==="networkConfig"?m.networkConfig=g:m[String(v)]=g!=null?"set":"unset";break}}),m}})(fd)),fd}var _m={},_w;function t8(){return _w||(_w=1,Object.defineProperty(_m,"__esModule",{value:!0})),_m}var Cm={},Cw;function r8(){return Cw||(Cw=1,Object.defineProperty(Cm,"__esModule",{value:!0})),Cm}var xm={},xw;function a8(){return xw||(xw=1,Object.defineProperty(xm,"__esModule",{value:!0})),xm}var qs={},Pw;function T3(){if(Pw)return qs;Pw=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.createMemoKey=qs.MemoPrefix=void 0,qs.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const e=new Set([]),t=new Set(["userPersistedValues"]);function r(a,o,n){let i=`${a}|${o}`;if(!n)return i;for(const s of Object.keys(n)){if(t.has(s))return;e.has(s)?i+=`|${s}=true`:i+=`|${s}=${n[s]}`}return i}return qs.createMemoKey=r,qs}var $s={},ni={},el={},Ow;function n8(){if(Ow)return el;Ow=1;var e=el&&el.__awaiter||function(s,l,c,u){function d(m){return m instanceof c?m:new c(function(b){b(m)})}return new(c||(c=Promise))(function(m,b){function v(E){try{w(u.next(E))}catch(S){b(S)}}function g(E){try{w(u.throw(E))}catch(S){b(S)}}function w(E){E.done?m(E.value):d(E.value).then(v,g)}w((u=u.apply(s,l||[])).next())})};Object.defineProperty(el,"__esModule",{value:!0}),el._fetchTxtRecords=void 0;const t=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),r="https://cloudflare-dns.com/dns-query",a=["i","e","d"],o=200;function n(s){return e(this,void 0,void 0,function*(){const l=yield s(r,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:t});if(!l.ok){const d=new Error("Failed to fetch TXT records from DNS");throw d.name="DnsTxtFetchError",d}const c=yield l.arrayBuffer(),u=new Uint8Array(c);return i(u)})}el._fetchTxtRecords=n;function i(s){const l=s.findIndex((u,d)=>d<o&&String.fromCharCode(u)==="="&&a.includes(String.fromCharCode(s[d-1])));if(l===-1){const u=new Error("Failed to parse TXT records from DNS");throw u.name="DnsTxtParseError",u}let c="";for(let u=l-1;u<s.length;u++)c+=String.fromCharCode(s[u]);return c.split(",")}return el}var Iw;function o8(){if(Iw)return ni;Iw=1;var e=ni&&ni.__awaiter||function(b,v,g,w){function E(S){return S instanceof g?S:new g(function(P){P(S)})}return new(g||(g=Promise))(function(S,P){function I(C){try{T(w.next(C))}catch(R){P(R)}}function O(C){try{T(w.throw(C))}catch(R){P(R)}}function T(C){C.done?S(C.value):E(C.value).then(I,O)}T((w=w.apply(b,v||[])).next())})};Object.defineProperty(ni,"__esModule",{value:!0}),ni._isDomainFailure=ni.NetworkFallbackResolver=void 0;const t=n8(),r=eu(),a=Da(),o=$i(),n=10080*60*1e3,i=14400*1e3;let s=class{constructor(v){var g;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=(g=v.networkConfig)===null||g===void 0?void 0:g.networkOverrideFunc}setErrorBoundary(v){this._errorBoundary=v}tryBumpExpiryTime(v,g){var w;const E=(w=this._fallbackInfo)===null||w===void 0?void 0:w[g.endpoint];E&&(E.expiryTime=Date.now()+n,u(v,Object.assign(Object.assign({},this._fallbackInfo),{[g.endpoint]:E})))}getActiveFallbackUrl(v,g){var w,E;if(g.customUrl!=null&&g.fallbackUrls!=null)return null;let S=this._fallbackInfo;S==null&&(S=(w=d(v))!==null&&w!==void 0?w:{},this._fallbackInfo=S);const P=S[g.endpoint];return!P||Date.now()>((E=P.expiryTime)!==null&&E!==void 0?E:0)||g.getChecksum()!==P.urlConfigChecksum?(delete S[g.endpoint],this._fallbackInfo=S,u(v,this._fallbackInfo),null):P.url?P.url:null}tryFetchUpdatedFallbackInfo(v,g,w,E){return e(this,void 0,void 0,function*(){var S,P;try{if(!l(w,E))return!1;const O=g.customUrl==null&&g.fallbackUrls==null?yield this._tryFetchFallbackUrlsFromNetwork(g):g.fallbackUrls,T=this._pickNewFallbackUrl((S=this._fallbackInfo)===null||S===void 0?void 0:S[g.endpoint],O);return T?(this._updateFallbackInfoWithNewUrl(v,g,T),!0):!1}catch(I){return(P=this._errorBoundary)===null||P===void 0||P.logError("tryFetchUpdatedFallbackInfo",I),!1}})}_updateFallbackInfoWithNewUrl(v,g,w){var E,S,P;const I={urlConfigChecksum:g.getChecksum(),url:w,expiryTime:Date.now()+n,previous:[]},O=g.endpoint,T=(E=this._fallbackInfo)===null||E===void 0?void 0:E[O];T&&I.previous.push(...T.previous),I.previous.length>10&&(I.previous=[]);const C=(P=(S=this._fallbackInfo)===null||S===void 0?void 0:S[O])===null||P===void 0?void 0:P.url;C!=null&&I.previous.push(C),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[O]:I}),u(v,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(v){return e(this,void 0,void 0,function*(){var g;const w=this._dnsQueryCooldowns[v.endpoint];if(w&&Date.now()<w)return null;this._dnsQueryCooldowns[v.endpoint]=Date.now()+i;const E=[],S=yield(0,t._fetchTxtRecords)((g=this._networkOverrideFunc)!==null&&g!==void 0?g:fetch),P=m(v.defaultUrl);for(const I of S){if(!I.startsWith(v.endpointDnsKey+"="))continue;const O=I.split("=");if(O.length>1){let T=O[1];T.endsWith("/")&&(T=T.slice(0,-1)),E.push(`https://${T}${P}`)}}return E})}_pickNewFallbackUrl(v,g){var w;if(g==null)return null;const E=new Set((w=v?.previous)!==null&&w!==void 0?w:[]),S=v?.url;let P=null;for(const I of g){const O=I.endsWith("/")?I.slice(0,-1):I;if(!E.has(I)&&O!==S){P=O;break}}return P}};ni.NetworkFallbackResolver=s;function l(b,v){var g;const w=(g=b?.toLowerCase())!==null&&g!==void 0?g:"";return v||w.includes("uncaught exception")||w.includes("failed to fetch")||w.includes("networkerror when attempting to fetch resource")}ni._isDomainFailure=l;function c(b){return`statsig.network_fallback.${(0,r._DJB2)(b)}`}function u(b,v){const g=c(b);if(!v||Object.keys(v).length===0){o.Storage.removeItem(g);return}o.Storage.setItem(g,JSON.stringify(v))}function d(b){const v=c(b),g=o.Storage.getItem(v);if(!g)return null;try{return JSON.parse(g)}catch{return a.Log.error("Failed to parse FallbackInfo"),null}}function m(b){try{return new URL(b).pathname}catch{return null}}return ni}var vd={},Tw;function R3(){if(Tw)return vd;Tw=1,Object.defineProperty(vd,"__esModule",{value:!0}),vd.SDKFlags=void 0;const e={};return vd.SDKFlags={setFlags:(t,r)=>{e[t]=r},get:(t,r)=>{var a,o;return(o=(a=e[t])===null||a===void 0?void 0:a[r])!==null&&o!==void 0?o:!1}},vd}var Pm={},Rw;function P0(){return Rw||(Rw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigSession=e.SessionID=void 0;const t=Ji(),r=Zf(),a=Da(),o=$i(),n=C0(),i=1800*1e3,s=14400*1e3,l={};e.SessionID={get:S=>e.StatsigSession.get(S).data.sessionID},e.StatsigSession={get:S=>{l[S]==null&&(l[S]=c(S));const P=l[S];return d(P)},overrideInitialSessionID:(S,P)=>{l[P]=u(S,P)}};function c(S){let P=E(S);const I=Date.now();return P||(P={sessionID:(0,n.getUUID)(),startTime:I,lastUpdate:I}),{data:P,sdkKey:S}}function u(S,P){const I=Date.now();return{data:{sessionID:S,startTime:I,lastUpdate:I},sdkKey:P}}function d(S){const P=Date.now(),I=S.data,O=S.sdkKey;if(b(I)||v(I)){I.sessionID=(0,n.getUUID)(),I.startTime=P;const C=__STATSIG__==null?void 0:__STATSIG__.instance(O);C&&C.$emt({name:"session_expired"})}I.lastUpdate=P,w(I,S.sdkKey),clearTimeout(S.idleTimeoutID),clearTimeout(S.ageTimeoutID);const T=P-I.startTime;return S.idleTimeoutID=m(O,i),S.ageTimeoutID=m(O,s-T),S}function m(S,P){return setTimeout(()=>{var I;const O=(I=(0,t._getStatsigGlobal)())===null||I===void 0?void 0:I.instance(S);O&&O.$emt({name:"session_expired"})},P)}function b({lastUpdate:S}){return Date.now()-S>i}function v({startTime:S}){return Date.now()-S>s}function g(S){return`statsig.session_id.${(0,r._getStorageKey)(S)}`}function w(S,P){const I=g(P);try{(0,o._setObjectInStorage)(I,S)}catch{a.Log.warn("Failed to save SessionID")}}function E(S){const P=g(S);return(0,o._getObjectFromStorage)(P)}})(Pm)),Pm}var md={},Aw;function A3(){return Aw||(Aw=1,Object.defineProperty(md,"__esModule",{value:!0}),md.ErrorTag=void 0,md.ErrorTag={NetworkError:"NetworkError"}),md}var Dw;function i8(){if(Dw)return $s;Dw=1;var e=$s&&$s.__awaiter||function(W,z,J,$){function se(G){return G instanceof J?G:new J(function(Z){Z(G)})}return new(J||(J=Promise))(function(G,Z){function ue(ke){try{le($.next(ke))}catch(Te){Z(Te)}}function ne(ke){try{le($.throw(ke))}catch(Te){Z(Te)}}function le(ke){ke.done?G(ke.value):se(ke.value).then(ue,ne)}le(($=$.apply(W,z||[])).next())})};Object.defineProperty($s,"__esModule",{value:!0}),$s.NetworkCore=void 0,Ji();const t=Ji(),r=Ob(),a=Da(),o=Qf(),n=o8(),i=R3(),s=x0(),l=bl(),c=P0(),u=$f(),d=A3(),m=kf(),b=qf(),v=_0(),g=1e4,w=500,E=3e4,S=1e3,P=50,I=P/S,O=new Set([408,500,502,503,504,522,524,599]);let T=class{constructor(z,J){this._emitter=J,this._errorBoundary=null,this._timeout=g,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,z&&(this._options=z),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new n.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(z))}setLogEventCompressionMode(z){this._options.logEventCompressionMode=z}setErrorBoundary(z){this._errorBoundary=z,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(z)}isBeaconSupported(){return typeof navigator<"u"&&typeof navigator.sendBeacon=="function"}getLastUsedInitUrlAndReset(){const z=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,z}beacon(z){if(!C(z))return!1;const J=this._getInternalRequestArgs("POST",z),$=this._getPopulatedURL(J),se=navigator;return se.sendBeacon.bind(se)($,J.body)}post(z){return e(this,void 0,void 0,function*(){const J=this._getInternalRequestArgs("POST",z);return this._tryEncodeBody(J),yield this._tryToCompressBody(J),this._sendRequest(J)})}get(z){const J=this._getInternalRequestArgs("GET",z);return this._sendRequest(J)}_sendRequest(z){return e(this,void 0,void 0,function*(){var J,$,se,G;if(!C(z)||this._netConfig.preventAllNetworkTraffic)return null;const{method:Z,body:ue,retries:ne,attempt:le}=z,ke=z.urlConfig.endpoint;if(this._isRateLimited(ke))return a.Log.warn(`Request to ${ke} was blocked because you are making requests too frequently.`),null;const Te=le??1;let ae=!1;const Se=this._getPopulatedURL(z);let Oe=null;const Je=(0,v._isUnloading)();try{const Ae={method:Z,body:ue,headers:Object.assign({},z.headers),priority:z.priority,keepalive:Je};Y(z,Te);const je=this._leakyBucket[ke];je&&(je.lastRequestTime=Date.now(),this._leakyBucket[ke]=je);const j=(J=this._netConfig.networkOverrideFunc)!==null&&J!==void 0?J:fetch;let Qe;if(Oe=yield Promise.race([j(Se,Ae).finally(()=>clearTimeout(Qe)),new Promise((Pe,Ze)=>{Qe=setTimeout(()=>{ae=!0,Ze(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!Oe.ok){const Pe=yield Oe.text().catch(()=>"No Text"),Ze=new Error(`NetworkError: ${Se} ${Pe}`);throw Ze.name="NetworkError",Ze}const ce=yield Oe.text();return F(z,Oe,Te,ce),this._fallbackResolver.tryBumpExpiryTime(z.sdkKey,z.urlConfig),{body:ce,code:Oe.status}}catch(Ae){const je=U(Ae),j=B(je??"",ae);if(F(z,Oe,Te,"",Ae),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(z.sdkKey,z.urlConfig,je,j))&&(z.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(z.sdkKey,z.urlConfig)),!ne||Te>ne||!O.has(($=Oe?.status)!==null&&$!==void 0?$:500)){(se=this._emitter)===null||se===void 0||se.call(this,{name:"error",error:Ae,tag:d.ErrorTag.NetworkError,requestArgs:z});const ce=`A networking error occurred during ${Z} request to ${Se}.`;return a.Log.error(ce,je,Ae),(G=this._errorBoundary)===null||G===void 0||G.attachErrorIfNoneExists(ce),null}return yield H(Te),this._sendRequest(Object.assign(Object.assign({},z),{retries:ne,attempt:Te+1}))}})}_getLogEventCompressionMode(z){let J=z?.logEventCompressionMode;return!J&&z?.disableCompression===!0&&(J=b.LogEventCompressionMode.Disabled),J||(J=b.LogEventCompressionMode.Enabled),J}_isRateLimited(z){var J;const $=Date.now(),se=(J=this._leakyBucket[z])!==null&&J!==void 0?J:{count:0,lastRequestTime:$},G=$-se.lastRequestTime,Z=Math.floor(G*I);return se.count=Math.max(0,se.count-Z),se.count>=P?!0:(se.count+=1,se.lastRequestTime=$,this._leakyBucket[z]=se,!1)}_getPopulatedURL(z){var J;const $=(J=z.fallbackUrl)!==null&&J!==void 0?J:z.urlConfig.getUrl();(z.urlConfig.endpoint===o.Endpoint._initialize||z.urlConfig.endpoint===o.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=$);const se=Object.assign({[o.NetworkParam.SdkKey]:z.sdkKey,[o.NetworkParam.SdkType]:s.SDKType._get(z.sdkKey),[o.NetworkParam.SdkVersion]:m.SDK_VERSION,[o.NetworkParam.Time]:String(Date.now()),[o.NetworkParam.SessionID]:c.SessionID.get(z.sdkKey)},z.params),G=Object.keys(se).map(Z=>`${encodeURIComponent(Z)}=${encodeURIComponent(se[Z])}`).join("&");return`${$}${G?`?${G}`:""}`}_tryEncodeBody(z){var J;const $=(0,l._getWindowSafe)(),se=z.body;if(!(!z.isStatsigEncodable||this._options.disableStatsigEncoding||typeof se!="string"||(0,t._getStatsigGlobalFlag)("no-encode")!=null||!$?.btoa))try{z.body=$.btoa(se).split("").reverse().join(""),z.params=Object.assign(Object.assign({},(J=z.params)!==null&&J!==void 0?J:{}),{[o.NetworkParam.StatsigEncoded]:"1"})}catch(G){a.Log.warn(`Request encoding failed for ${z.urlConfig.getUrl()}`,G)}}_tryToCompressBody(z){return e(this,void 0,void 0,function*(){var J;const $=z.body;if(!(typeof $!="string"||!N(z,this._options)))try{const se=new TextEncoder().encode($),G=new CompressionStream("gzip"),Z=G.writable.getWriter();Z.write(se).catch(a.Log.error),Z.close().catch(a.Log.error);const ue=G.readable.getReader(),ne=[];let le;for(;!(le=yield ue.read()).done;)ne.push(le.value);const ke=ne.reduce((Se,Oe)=>Se+Oe.length,0),Te=new Uint8Array(ke);let ae=0;for(const Se of ne)Te.set(Se,ae),ae+=Se.length;z.body=Te,z.params=Object.assign(Object.assign({},(J=z.params)!==null&&J!==void 0?J:{}),{[o.NetworkParam.IsGzipped]:"1"})}catch(se){a.Log.warn(`Request compression failed for ${z.urlConfig.getUrl()}`,se)}})}_getInternalRequestArgs(z,J){const $=this._fallbackResolver.getActiveFallbackUrl(J.sdkKey,J.urlConfig),se=Object.assign(Object.assign({},J),{method:z,fallbackUrl:$});return"data"in J&&R(se,J.data),se}};$s.NetworkCore=T;const C=W=>W.sdkKey?!0:(a.Log.warn("Unable to make request without an SDK key"),!1),R=(W,z)=>{const{sdkKey:J,fallbackUrl:$}=W,se=u.StableID.get(J),G=c.SessionID.get(J),Z=s.SDKType._get(J);W.body=JSON.stringify(Object.assign(Object.assign({},z),{statsigMetadata:Object.assign(Object.assign({},m.StatsigMetadataProvider.get()),{stableID:se,sessionID:G,sdkType:Z,fallbackUrl:$})}))};function N(W,z){if(!W.isCompressable||(0,t._getStatsigGlobalFlag)("no-compress")!=null||typeof CompressionStream>"u"||typeof TextEncoder>"u")return!1;const J=W.urlConfig.customUrl!=null||W.urlConfig.fallbackUrls!=null,$=i.SDKFlags.get(W.sdkKey,"enable_log_event_compression")===!0;switch(z.logEventCompressionMode){case b.LogEventCompressionMode.Disabled:return!1;case b.LogEventCompressionMode.Enabled:return!(J&&!$);case b.LogEventCompressionMode.Forced:return!0;default:return!1}}function U(W){return typeof W=="string"?W:W instanceof Error?`${W.name}: ${W.message}`:"Unknown Error"}function B(W,z){return W.includes("Timeout")||z}function Y(W,z){W.urlConfig.endpoint===o.Endpoint._initialize&&r.Diagnostics._markInitNetworkReqStart(W.sdkKey,{attempt:z})}function F(W,z,J,$,se){W.urlConfig.endpoint===o.Endpoint._initialize&&r.Diagnostics._markInitNetworkReqEnd(W.sdkKey,r.Diagnostics._getDiagnosticsData(z,J,$,se))}function H(W){return e(this,void 0,void 0,function*(){yield new Promise(z=>setTimeout(z,Math.min(w*(W*W),E)))})}return $s}var Om={},Nw;function s8(){return Nw||(Nw=1,Object.defineProperty(Om,"__esModule",{value:!0})),Om}var Im={},Mw;function l8(){return Mw||(Mw=1,Object.defineProperty(Im,"__esModule",{value:!0})),Im}var Tm={},Fw;function c8(){return Fw||(Fw=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._fastApproxSizeOf=void 0;const t=2,r=1,a=(o,n)=>{let i=0;const s=Object.keys(o);for(let l=0;l<s.length;l++){const c=s[l],u=o[c];if(i+=c.length,typeof u=="object"&&u!==null?i+=(0,e._fastApproxSizeOf)(u,n)+t:i+=String(u).length+r,i>=n)return i}return i};e._fastApproxSizeOf=a})(Tm)),Tm}var tl={},Lw;function u8(){if(Lw)return tl;Lw=1;var e=tl&&tl.__awaiter||function(v,g,w,E){function S(P){return P instanceof w?P:new w(function(I){I(P)})}return new(w||(w=Promise))(function(P,I){function O(R){try{C(E.next(R))}catch(N){I(N)}}function T(R){try{C(E.throw(R))}catch(N){I(N)}}function C(R){R.done?P(R.value):S(R.value).then(O,T)}C((E=E.apply(v,g||[])).next())})};Object.defineProperty(tl,"__esModule",{value:!0}),tl.StatsigClientBase=void 0,Ji();const t=Ji(),r=I3(),a=x3(),o=Da(),n=T3(),i=bl(),s=P0(),l=$f(),c=qf(),u=$i(),d=3e3;let m=class{constructor(g,w,E,S){var P,I,O,T;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const C=this.$emt.bind(this);S?.logLevel!=null&&(o.Log.level=S.logLevel),S?.disableStorage&&u.Storage._setDisabled(!0),S?.initialSessionID&&s.StatsigSession.overrideInitialSessionID(S.initialSessionID,g),S?.storageProvider&&u.Storage._setProvider(S.storageProvider),S?.enableCookies&&l.StableID._setCookiesEnabled(g,S.enableCookies),S?.disableStableID&&l.StableID._setDisabled(g,!0),this._sdkKey=g,this._options=S??{},this._memoCache={},this.overrideAdapter=(P=S?.overrideAdapter)!==null&&P!==void 0?P:null,this._logger=new a.EventLogger(g,C,E,S),this._errorBoundary=new r.ErrorBoundary(g,S,C),this._errorBoundary.wrap(this),this._errorBoundary.wrap(w),this._errorBoundary.wrap(this._logger),E.setErrorBoundary(this._errorBoundary),this.dataAdapter=w,this.dataAdapter.attach(g,S,E),this.storageProvider=u.Storage,(T=(O=(I=this.overrideAdapter)===null||I===void 0?void 0:I.loadFromStorage)===null||O===void 0?void 0:O.call(I))===null||T===void 0||T.catch(R=>this._errorBoundary.logError("OA::loadFromStorage",R)),this._primeReadyRipcord(),b(g,this)}updateRuntimeOptions(g){g.loggingEnabled?(this._options.loggingEnabled=g.loggingEnabled,this._logger.setLoggingEnabled(g.loggingEnabled)):g.disableLogging!=null&&(this._options.disableLogging=g.disableLogging,this._logger.setLoggingEnabled(g.disableLogging?"disabled":"browser-only")),g.disableStorage!=null&&(this._options.disableStorage=g.disableStorage,u.Storage._setDisabled(g.disableStorage)),g.enableCookies!=null&&(this._options.enableCookies=g.enableCookies,l.StableID._setCookiesEnabled(this._sdkKey,g.enableCookies)),g.logEventCompressionMode?this._logger.setLogEventCompressionMode(g.logEventCompressionMode):g.disableCompression&&this._logger.setLogEventCompressionMode(c.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return e(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(g,w){this._listeners[g]||(this._listeners[g]=[]),this._listeners[g].push(w)}off(g,w){if(this._listeners[g]){const E=this._listeners[g].indexOf(w);E!==-1&&this._listeners[g].splice(E,1)}}$on(g,w){w.__isInternal=!0,this.on(g,w)}$emt(g){var w;const E=S=>{try{S(g)}catch(P){if(S.__isInternal===!0){this._errorBoundary.logError(`__emit:${g.name}`,P);return}o.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",g)}};this._listeners[g.name]&&this._listeners[g.name].forEach(S=>E(S)),(w=this._listeners["*"])===null||w===void 0||w.forEach(E)}_setStatus(g,w){this.loadingStatus=g,this._memoCache={},this.$emt({name:"values_updated",status:g,values:w})}_enqueueExposure(g,w,E){if(E?.disableExposureLog===!0){this._logger.incrementNonExposureCount(g);return}this._logger.enqueue(w)}_memoize(g,w){return(E,S)=>{if(this._options.disableEvaluationMemoization)return w(E,S);const P=(0,n.createMemoKey)(g,E,S);return P?(P in this._memoCache||(Object.keys(this._memoCache).length>=d&&(this._memoCache={}),this._memoCache[P]=w(E,S)),this._memoCache[P]):w(E,S)}}};tl.StatsigClientBase=m;function b(v,g){var w;if((0,i._isServerEnv)())return;const E=(0,t._getStatsigGlobal)(),S=(w=E.instances)!==null&&w!==void 0?w:{},P=g;S[v]!=null&&o.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),S[v]=P,E.firstInstance||(E.firstInstance=P),E.instances=S,__STATSIG__=E}return tl}var bd={},Uw;function d8(){return Uw||(Uw=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.DataAdapterCachePrefix=void 0,bd.DataAdapterCachePrefix="statsig.cached"),bd}var Rm={},Bw;function h8(){return Bw||(Bw=1,Object.defineProperty(Rm,"__esModule",{value:!0})),Rm}var Ra={},Hw;function g8(){if(Hw)return Ra;Hw=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra._makeTypedGet=Ra._mergeOverride=Ra._makeLayer=Ra._makeExperiment=Ra._makeDynamicConfig=Ra._makeFeatureGate=void 0;const e=Da(),t=S0();function r(c,u,d,m){var b;return{name:c,details:u,ruleID:(b=d?.rule_id)!==null&&b!==void 0?b:"",__evaluation:d,value:m}}function a(c,u,d){var m;return Object.assign(Object.assign({},r(c,u,d,d?.value===!0)),{idType:(m=d?.id_type)!==null&&m!==void 0?m:null})}Ra._makeFeatureGate=a;function o(c,u,d){var m,b;const v=(m=d?.value)!==null&&m!==void 0?m:{};return Object.assign(Object.assign({},r(c,u,d,v)),{idType:(b=d?.id_type)!==null&&b!==void 0?b:null,get:l(c,d?.value)})}Ra._makeDynamicConfig=o;function n(c,u,d){var m;const b=o(c,u,d);return Object.assign(Object.assign({},b),{groupName:(m=d?.group_name)!==null&&m!==void 0?m:null})}Ra._makeExperiment=n;function i(c,u,d,m){var b,v;return Object.assign(Object.assign({},r(c,u,d,void 0)),{get:l(c,d?.value,m),groupName:(b=d?.group_name)!==null&&b!==void 0?b:null,__value:(v=d?.value)!==null&&v!==void 0?v:{}})}Ra._makeLayer=i;function s(c,u,d,m){return Object.assign(Object.assign(Object.assign({},c),u),{get:l(c.name,d,m)})}Ra._mergeOverride=s;function l(c,u,d){return(m,b)=>{var v;const g=(v=u?.[m])!==null&&v!==void 0?v:null;return g==null?b??null:b!=null&&!(0,t._isTypeMatch)(g,b)?(e.Log.warn(`Parameter type mismatch. '${c}.${m}' was found to be type '${typeof g}' but fallback/return type is '${typeof b}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),b??null):(d?.(m),g)}}return Ra._makeTypedGet=l,Ra}var Am={},zw;function f8(){return zw||(zw=1,Object.defineProperty(Am,"__esModule",{value:!0})),Am}var rl={},Vw;function p8(){if(Vw)return rl;Vw=1,Object.defineProperty(rl,"__esModule",{value:!0}),rl.UPDATE_DETAIL_ERROR_MESSAGES=rl.createUpdateDetails=void 0;const e=(t,r,a,o,n,i)=>({duration:a,source:r,success:t,error:o,sourceUrl:n,warnings:i});return rl.createUpdateDetails=e,rl.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."},rl}var Ww;function Jn(){return Ww||(Ww=1,(function(e){var t=Gs&&Gs.__createBinding||(Object.create?(function(c,u,d,m){m===void 0&&(m=d);var b=Object.getOwnPropertyDescriptor(u,d);(!b||("get"in b?!u.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return u[d]}}),Object.defineProperty(c,m,b)}):(function(c,u,d,m){m===void 0&&(m=d),c[m]=u[d]})),r=Gs&&Gs.__exportStar||function(c,u){for(var d in c)d!=="default"&&!Object.prototype.hasOwnProperty.call(u,d)&&t(u,c,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,Ji();const a=Ji(),o=Ob();Object.defineProperty(e,"Diagnostics",{enumerable:!0,get:function(){return o.Diagnostics}});const n=x3();Object.defineProperty(e,"EventLogger",{enumerable:!0,get:function(){return n.EventLogger}});const i=Da();Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return i.Log}});const s=kf(),l=$i();Object.defineProperty(e,"Storage",{enumerable:!0,get:function(){return l.Storage}}),r(Ji(),e),r(Zf(),e),r(q7(),e),r($7(),e),r(Ob(),e),r(e8(),e),r(I3(),e),r(t8(),e),r(r8(),e),r(eu(),e),r(a8(),e),r(Da(),e),r(T3(),e),r(Qf(),e),r(i8(),e),r(s8(),e),r(l8(),e),r(bl(),e),r(x0(),e),r(P0(),e),r(c8(),e),r($f(),e),r(u8(),e),r(A3(),e),r(d8(),e),r(_3(),e),r(kf(),e),r(qf(),e),r(h8(),e),r(g8(),e),r(f8(),e),r(P3(),e),r($i(),e),r(O3(),e),r(S0(),e),r(C3(),e),r(C0(),e),r(_0(),e),r(p8(),e),r(R3(),e),Object.assign((0,a._getStatsigGlobal)(),{Log:i.Log,SDK_VERSION:s.SDK_VERSION})})(Gs)),Gs}var gc={},Ug={},yd={},jw;function v8(){if(jw)return yd;jw=1,Object.defineProperty(yd,"__esModule",{value:!0}),yd.V1InitializeContainer=void 0;const e=Jn();let t=class{constructor(a){this._values=a}getGate(a){return this._getResultFromLookup(this._values.feature_gates,a)}getConfig(a){return this._getResultFromLookup(this._values.dynamic_configs,a)}getLayer(a){return this._getResultFromLookup(this._values.layer_configs,a)}getParamStore(a){return this._getResultFromLookup(this._values.param_stores,a)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(a,o){var n,i;return a&&(i=(n=a[o])!==null&&n!==void 0?n:a[(0,e._DJB2)(o)])!==null&&i!==void 0?i:null}};return yd.V1InitializeContainer=t,yd}var kd={},Gw;function m8(){if(Gw)return kd;Gw=1,Object.defineProperty(kd,"__esModule",{value:!0}),kd.V2InitializeContainer=void 0;const e=Jn();let t=class{constructor(a){this._values=a}getGate(a){var o,n,i;const s=this._getResultFromLookup(this._values.feature_gates,a);return s?{name:a,value:s.v===!0,rule_id:(o=s.r)!==null&&o!==void 0?o:"default",secondary_exposures:(n=s.s)!==null&&n!==void 0?n:[],id_type:(i=s.i)!==null&&i!==void 0?i:""}:null}getConfig(a){var o,n,i,s;const l=this._getResultFromLookup(this._values.dynamic_configs,a);return l?{name:a,value:(o=this._values.values[l.v])!==null&&o!==void 0?o:{},rule_id:l.r,secondary_exposures:(n=l.s)!==null&&n!==void 0?n:[],id_type:(i=l.i)!==null&&i!==void 0?i:"",is_user_in_experiment:l.ue===!0,passed:l.p===!0,group_name:(s=l.gn)!==null&&s!==void 0?s:void 0,is_experiment_active:l.ea===!0,group:l.r,is_device_based:l.i==="stableID"}:null}getLayer(a){var o,n,i,s,l,c;const u=this._getResultFromLookup(this._values.layer_configs,a);return u?{name:a,value:(o=this._values.values[u.v])!==null&&o!==void 0?o:{},rule_id:u.r,secondary_exposures:(n=u.s)!==null&&n!==void 0?n:[],is_user_in_experiment:u.ue===!0,group_name:(i=u.gn)!==null&&i!==void 0?i:void 0,is_experiment_active:u.ea===!0,group:u.r,is_device_based:u.i==="stableID",allocated_experiment_name:(s=u.ae)!==null&&s!==void 0?s:"",explicit_parameters:(l=u.ep)!==null&&l!==void 0?l:[],undelegated_secondary_exposures:(c=u.us)!==null&&c!==void 0?c:[],parameter_rule_ids:u.pr}:null}getParamStore(a){return this._getResultFromLookup(this._values.param_stores,a)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(a,o){var n,i;return a&&(i=(n=a[o])!==null&&n!==void 0?n:a[(0,e._DJB2)(o)])!==null&&i!==void 0?i:null}};return kd.V2InitializeContainer=t,kd}var Kw;function b8(){if(Kw)return Ug;Kw=1,Object.defineProperty(Ug,"__esModule",{value:!0});const e=Jn(),t=v8(),r=m8();let a=class{constructor(n){this._sdkKey=n,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,e._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(n,i){var s,l;if(!n)return!1;const c=(0,e._typedJsonParse)(n.data,"has_updates","EvaluationResponse");return c==null?!1:(this._source=n.source,c?.has_updates!==!0||((s=c.time)!==null&&s!==void 0?s:0)<this._lcut||(this._rawValues=n.data,this._lcut=c.time,this._receivedAt=n.receivedAt,c.response_format==="init-v2"?this._values=new r.V2InitializeContainer(c):this._values=new t.V1InitializeContainer(c),this._bootstrapMetadata=this._extractBootstrapMetadata(n.source,c),n.source&&c.user&&this._setWarningState(i,c),e.SDKFlags.setFlags(this._sdkKey,(l=c.sdk_flags)!==null&&l!==void 0?l:{})),!0)}getWarnings(){if(this._warnings.size!==0)return Array.from(this._warnings)}getGate(n){const i=this._values?this._values.getGate(n):null;return this._getDetailedStoreResult(i)}getConfig(n){const i=this._values?this._values.getConfig(n):null;return this._getDetailedStoreResult(i)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(n){const i=this._values?this._values.getLayer(n):null;return this._getDetailedStoreResult(i)}getParamStore(n){const i=this._values?this._values.getParamStore(n):null;return this._getDetailedStoreResult(i)}getSource(){return this._source}getExposureMapping(){var n;return(n=this._values)===null||n===void 0?void 0:n.getExposureMapping()}_extractBootstrapMetadata(n,i){if(n!=="Bootstrap")return null;const s={};return i.user&&(s.user=i.user),i.sdkInfo&&(s.generatorSDKInfo=i.sdkInfo),s.lcut=i.time,s}_getDetailedStoreResult(n){return{result:n,details:this._getDetails(n==null)}}_setWarningState(n,i){var s,l;const c=e.StableID.get(this._sdkKey);if(((s=n.customIDs)===null||s===void 0?void 0:s.stableID)!==c&&(!((l=n.customIDs)===null||l===void 0)&&l.stableID||c)){this._warnings.add("StableIDMismatch");return}if("user"in i){const u=i.user,d=Object.assign(Object.assign({},n),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,e._getFullUserHash)(d)!==(0,e._getFullUserHash)(u)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if(this._source==="Uninitialized"||this._source==="NoValues")return{reason:this._source};const n={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(n.warnings=Array.from(this._warnings)),n}_getDetails(n){var i,s;const l=this.getCurrentSourceDetails();let c=l.reason;const u=(i=l.warnings)!==null&&i!==void 0?i:[];this._source==="Bootstrap"&&u.length>0&&(c=c+u[0]),c!=="Uninitialized"&&c!=="NoValues"&&(c=`${c}:${n?"Unrecognized":"Recognized"}`);const d=this._source==="Bootstrap"&&(s=this._bootstrapMetadata)!==null&&s!==void 0?s:void 0;return d&&(l.bootstrapMetadata=d),Object.assign(Object.assign({},l),{reason:c})}};return Ug.default=a,Ug}var fc={},wd={},Yw;function y8(){if(Yw)return wd;Yw=1,Object.defineProperty(wd,"__esModule",{value:!0}),wd._resolveDeltasResponse=void 0;const e=Jn(),t=2;function r(i,s){const l=(0,e._typedJsonParse)(s,"checksum","DeltasEvaluationResponse");if(!l)return{hadBadDeltaChecksum:!0};const c=a(i,l),u=o(c),d=(0,e._DJB2Object)({feature_gates:u.feature_gates,dynamic_configs:u.dynamic_configs,layer_configs:u.layer_configs},t);return d===l.checksumV2?JSON.stringify(u):{hadBadDeltaChecksum:!0,badChecksum:d,badMergedConfigs:u,badFullResponse:l.deltas_full_response}}wd._resolveDeltasResponse=r;function a(i,s){return Object.assign(Object.assign(Object.assign({},i),s),{feature_gates:Object.assign(Object.assign({},i.feature_gates),s.feature_gates),layer_configs:Object.assign(Object.assign({},i.layer_configs),s.layer_configs),dynamic_configs:Object.assign(Object.assign({},i.dynamic_configs),s.dynamic_configs)})}function o(i){const s=i;return n(i.deleted_gates,s.feature_gates),delete s.deleted_gates,n(i.deleted_configs,s.dynamic_configs),delete s.deleted_configs,n(i.deleted_layers,s.layer_configs),delete s.deleted_layers,s}function n(i,s){i?.forEach(l=>{delete s[l]})}return wd}var Xw;function D3(){if(Xw)return fc;Xw=1;var e=fc&&fc.__awaiter||function(o,n,i,s){function l(c){return c instanceof i?c:new i(function(u){u(c)})}return new(i||(i=Promise))(function(c,u){function d(v){try{b(s.next(v))}catch(g){u(g)}}function m(v){try{b(s.throw(v))}catch(g){u(g)}}function b(v){v.done?c(v.value):l(v.value).then(d,m)}b((s=s.apply(o,n||[])).next())})};Object.defineProperty(fc,"__esModule",{value:!0});const t=Jn(),r=y8();class a extends t.NetworkCore{constructor(n,i){super(n,i);const s=n?.networkConfig;this._option=n,this._initializeUrlConfig=new t.UrlConfiguration(t.Endpoint._initialize,s?.initializeUrl,s?.api,s?.initializeFallbackUrls)}fetchEvaluations(n,i,s,l,c){return e(this,void 0,void 0,function*(){var u,d,m,b,v,g;const w=i?(0,t._typedJsonParse)(i,"has_updates","InitializeResponse"):null;let E={user:l,hash:(m=(d=(u=this._option)===null||u===void 0?void 0:u.networkConfig)===null||d===void 0?void 0:d.initializeHashAlgorithm)!==null&&m!==void 0?m:"djb2",deltasResponseRequested:!1,full_checksum:null};if(w?.has_updates){const S=w?.hash_used!==((g=(v=(b=this._option)===null||b===void 0?void 0:b.networkConfig)===null||v===void 0?void 0:v.initializeHashAlgorithm)!==null&&g!==void 0?g:"djb2");E=Object.assign(Object.assign({},E),{sinceTime:c&&!S?w.time:0,previousDerivedFields:"derived_fields"in w&&c?w.derived_fields:{},deltasResponseRequested:!0,full_checksum:w.full_checksum,partialUserMatchSinceTime:S?0:w.time})}return this._fetchEvaluations(n,w,E,s)})}_fetchEvaluations(n,i,s,l){return e(this,void 0,void 0,function*(){var c,u;const d=yield this.post({sdkKey:n,urlConfig:this._initializeUrlConfig,data:s,retries:2,isStatsigEncodable:!0,priority:l});if(d?.code===204)return'{"has_updates": false}';if(d?.code!==200)return(c=d?.body)!==null&&c!==void 0?c:null;if(i?.has_updates!==!0||((u=d.body)===null||u===void 0?void 0:u.includes('"is_delta":true'))!==!0||s.deltasResponseRequested!==!0)return d.body;const m=(0,r._resolveDeltasResponse)(i,d.body);return typeof m=="string"?m:this._fetchEvaluations(n,i,Object.assign(Object.assign(Object.assign({},s),m),{deltasResponseRequested:!1}),l)})}}return fc.default=a,fc}var Ed={},Jw;function k8(){if(Jw)return Ed;Jw=1,Object.defineProperty(Ed,"__esModule",{value:!0}),Ed._makeParamStoreGetter=void 0;const e=Jn(),t={disableExposureLog:!0};function r(u){return u==null||u.disableExposureLog===!1}function a(u,d){return d!=null&&!(0,e._isTypeMatch)(u,d)}function o(u,d){return u.value}function n(u,d,m){return u.getFeatureGate(d.gate_name,r(m)?void 0:t).value?d.pass_value:d.fail_value}function i(u,d,m,b){const g=u.getDynamicConfig(d.config_name,r(b)?void 0:t).get(d.param_name);return a(g,m)?m:g}function s(u,d,m,b){const g=u.getExperiment(d.experiment_name,r(b)?void 0:t).get(d.param_name);return a(g,m)?m:g}function l(u,d,m,b){const g=u.getLayer(d.layer_name,r(b)?void 0:t).get(d.param_name);return a(g,m)?m:g}function c(u,d,m){return(b,v)=>{if(d==null)return v;const g=d[b];if(g==null||v!=null&&(0,e._typeOf)(v)!==g.param_type)return v;switch(g.ref_type){case"static":return o(g);case"gate":return n(u,g,m);case"dynamic_config":return i(u,g,v,m);case"experiment":return s(u,g,v,m);case"layer":return l(u,g,v,m);default:return v}}}return Ed._makeParamStoreGetter=c,Ed}var al={},Zw;function w8(){if(Zw)return al;Zw=1;var e=al&&al.__awaiter||function(o,n,i,s){function l(c){return c instanceof i?c:new i(function(u){u(c)})}return new(i||(i=Promise))(function(c,u){function d(v){try{b(s.next(v))}catch(g){u(g)}}function m(v){try{b(s.throw(v))}catch(g){u(g)}}function b(v){v.done?c(v.value):l(v.value).then(d,m)}b((s=s.apply(o,n||[])).next())})};Object.defineProperty(al,"__esModule",{value:!0}),al.StatsigEvaluationsDataAdapter=void 0;const t=Jn(),r=D3();let a=class extends t.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(n,i,s){super.attach(n,i,s),s!==null&&s instanceof r.default?this._network=s:this._network=new r.default(i??{})}getDataAsync(n,i,s){return this._getDataAsyncImpl(n,(0,t._normalizeUser)(i,this._options),s)}prefetchData(n,i){return this._prefetchDataImpl(n,i)}setData(n){const i=(0,t._typedJsonParse)(n,"has_updates","data");i&&"user"in i?super.setData(n,i.user):t.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(n,i){super.setData(n,i)}_fetchFromNetwork(n,i,s,l){return e(this,void 0,void 0,function*(){var c;const u=yield(c=this._network)===null||c===void 0?void 0:c.fetchEvaluations(this._getSdkKey(),n,s?.priority,i,l);return u??null})}_getCacheKey(n){var i;const s=(0,t._getStorageKey)(this._getSdkKey(),n,(i=this._options)===null||i===void 0?void 0:i.customUserCacheKeyFunc);return`${t.DataAdapterCachePrefix}.${this._cacheSuffix}.${s}`}_isCachedResultValidFor204(n,i){return n.fullUserHash!=null&&n.fullUserHash===(0,t._getFullUserHash)(i)}};return al.StatsigEvaluationsDataAdapter=a,al}var Qw;function E8(){if(Qw)return gc;Qw=1;var e=gc&&gc.__awaiter||function(s,l,c,u){function d(m){return m instanceof c?m:new c(function(b){b(m)})}return new(c||(c=Promise))(function(m,b){function v(E){try{w(u.next(E))}catch(S){b(S)}}function g(E){try{w(u.throw(E))}catch(S){b(S)}}function w(E){E.done?m(E.value):d(E.value).then(v,g)}w((u=u.apply(s,l||[])).next())})};Object.defineProperty(gc,"__esModule",{value:!0});const t=Jn(),r=b8(),a=D3(),o=k8(),n=w8();let i=class Ib extends t.StatsigClientBase{static instance(l){const c=(0,t._getStatsigGlobal)().instance(l);return c instanceof Ib?c:(t.Log.warn((0,t._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new Ib(l??"",{}))}constructor(l,c,u=null){var d,m;t.SDKType._setClientType(l,"javascript-client");const b=new a.default(u,g=>{this.$emt(g)});super(l,(d=u?.dataAdapter)!==null&&d!==void 0?d:new n.StatsigEvaluationsDataAdapter,b,u),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(t.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(t.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(t.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(t.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(t.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(t.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new r.default(l),this._network=b,this._user=this._configureUser(c,u),this._sdkInstanceID=(0,t.getUUID)();const v=(m=u?.plugins)!==null&&m!==void 0?m:[];for(const g of v)g.bind(this)}initializeSync(l){var c;return this.loadingStatus!=="Uninitialized"?(0,t.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...(c=this._store.getWarnings())!==null&&c!==void 0?c:[]]):(this._logger.start(),this.updateUserSync(this._user,l))}initializeAsync(l){return e(this,void 0,void 0,function*(){return this._initializePromise?this._initializePromise:(this._initializePromise=this._initializeAsyncImpl(l),this._initializePromise)})}updateUserSync(l,c){const u=performance.now();try{return this._updateUserSyncImpl(l,c,u)}catch(d){const m=d instanceof Error?d:new Error(String(d));return this._createErrorUpdateDetails(m,u)}}_updateUserSyncImpl(l,c,u){var d;const m=[...(d=this._store.getWarnings())!==null&&d!==void 0?d:[]];this._resetForUser(l);const b=this.dataAdapter.getDataSync(this._user);b==null&&m.push("NoCachedValues"),this._store.setValues(b,this._user),this._finalizeUpdate(b);const v=c?.disableBackgroundCacheRefresh;return v===!0||v==null&&b?.source==="Bootstrap"?(0,t.createUpdateDetails)(!0,this._store.getSource(),performance.now()-u,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),m):(this._runPostUpdate(b??null,this._user),(0,t.createUpdateDetails)(!0,this._store.getSource(),performance.now()-u,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),m))}updateUserAsync(l,c){return e(this,void 0,void 0,function*(){const u=performance.now();try{return yield this._updateUserAsyncImpl(l,c)}catch(d){const m=d instanceof Error?d:new Error(String(d));return this._createErrorUpdateDetails(m,u)}})}_updateUserAsyncImpl(l,c){return e(this,void 0,void 0,function*(){this._resetForUser(l);const u=this._user;t.Diagnostics._markInitOverallStart(this._sdkKey);let d=this.dataAdapter.getDataSync(u);if(this._store.setValues(d,this._user),this._setStatus("Loading",d),d=yield this.dataAdapter.getDataAsync(d,u,c),u!==this._user)return(0,t.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let m=!1;d!=null&&(t.Diagnostics._markInitProcessStart(this._sdkKey),m=this._store.setValues(d,this._user),t.Diagnostics._markInitProcessEnd(this._sdkKey,{success:m})),this._finalizeUpdate(d),m||(this._errorBoundary.attachErrorIfNoneExists(t.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),t.Diagnostics._markInitOverallEnd(this._sdkKey,m,this._store.getCurrentSourceDetails());const b=t.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,t.createUpdateDetails)(m,this._store.getSource(),b,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){let l={};try{l=JSON.parse(JSON.stringify(this._user))}catch{t.Log.error("Failed to parse user")}return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:l,errorBoundary:this._errorBoundary,session:t.StatsigSession.get(this._sdkKey),stableID:t.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(l,c){return this.getFeatureGate(l,c).value}logEvent(l,c,u){const d=typeof l=="string"?{eventName:l,value:c,metadata:u}:l;this.$emt({name:"log_event_called",event:d}),this._logger.enqueue(Object.assign(Object.assign({},d),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(l){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:l}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{this.loadingStatus==="Loading"&&this._finalizeUpdate(null)})}_initializeAsyncImpl(l){return e(this,void 0,void 0,function*(){return t.Storage.isReady()||(yield t.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,l)})}_createErrorUpdateDetails(l,c){var u;return(0,t.createUpdateDetails)(!1,this._store.getSource(),performance.now()-c,l,null,[...(u=this._store.getWarnings())!==null&&u!==void 0?u:[]])}_finalizeUpdate(l){this._store.finalize(),this._setStatus("Ready",l)}_runPostUpdate(l,c){this.dataAdapter.getDataAsync(l,c,{priority:"low"}).catch(u=>{t.Log.error("An error occurred after update.",u)})}_resetForUser(l){this._logger.reset(),this._store.reset(),this._user=this._configureUser(l,this._options)}_configureUser(l,c){var u,d,m;const b=(0,t._normalizeUser)(l,c),v=(u=b.customIDs)===null||u===void 0?void 0:u.stableID;if(v){const g=(m=(d=this.storageProvider).isReadyResolver)===null||m===void 0?void 0:m.call(d);g?g.then(()=>t.StableID.setOverride(v,this._sdkKey),()=>t.StableID.setOverride(v,this._sdkKey)):t.StableID.setOverride(v,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(b.analyticsOnlyMetadata=Object.assign(Object.assign({},b.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),b}_getFeatureGateImpl(l,c){var u,d;const{result:m,details:b}=this._store.getGate(l),v=(0,t._makeFeatureGate)(l,b,m),g=(d=(u=this.overrideAdapter)===null||u===void 0?void 0:u.getGateOverride)===null||d===void 0?void 0:d.call(u,v,this._user,c),w=g??v;return this._enqueueExposure(l,(0,t._createGateExposure)(this._user,w,this._store.getExposureMapping()),c),this.$emt({name:"gate_evaluation",gate:w}),w}_getDynamicConfigImpl(l,c){var u,d;const{result:m,details:b}=this._store.getConfig(l),v=(0,t._makeDynamicConfig)(l,b,m),g=(d=(u=this.overrideAdapter)===null||u===void 0?void 0:u.getDynamicConfigOverride)===null||d===void 0?void 0:d.call(u,v,this._user,c),w=g??v;return this._enqueueExposure(l,(0,t._createConfigExposure)(this._user,w,this._store.getExposureMapping()),c),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:w}),w}_getExperimentImpl(l,c){var u,d,m,b;const{result:v,details:g}=this._store.getConfig(l),w=(0,t._makeExperiment)(l,g,v);w.__evaluation!=null&&(w.__evaluation.secondary_exposures=(0,t._mapExposures)((d=(u=w.__evaluation)===null||u===void 0?void 0:u.secondary_exposures)!==null&&d!==void 0?d:[],this._store.getExposureMapping()));const E=(b=(m=this.overrideAdapter)===null||m===void 0?void 0:m.getExperimentOverride)===null||b===void 0?void 0:b.call(m,w,this._user,c),S=E??w;return this._enqueueExposure(l,(0,t._createConfigExposure)(this._user,S,this._store.getExposureMapping()),c),this.$emt({name:"experiment_evaluation",experiment:S}),S}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(l,c){var u,d,m;const{result:b,details:v}=this._store.getLayer(l),g=(0,t._makeLayer)(l,v,b),w=(d=(u=this.overrideAdapter)===null||u===void 0?void 0:u.getLayerOverride)===null||d===void 0?void 0:d.call(u,g,this._user,c);c?.disableExposureLog&&this._logger.incrementNonExposureCount(l);const E=(0,t._mergeOverride)(g,w,(m=w?.__value)!==null&&m!==void 0?m:g.__value,S=>{c?.disableExposureLog||this._enqueueExposure(l,(0,t._createLayerParameterExposure)(this._user,E,S,this._store.getExposureMapping()),c)});return this.$emt({name:"layer_evaluation",layer:E}),E}_getParameterStoreImpl(l,c){var u,d;const{result:m,details:b}=this._store.getParamStore(l);this._logger.incrementNonExposureCount(l);const v={name:l,details:b,__configuration:m,get:(0,o._makeParamStoreGetter)(this,m,c)},g=(d=(u=this.overrideAdapter)===null||u===void 0?void 0:u.getParamStoreOverride)===null||d===void 0?void 0:d.call(u,v,c);return g!=null&&(v.__configuration=g.config,v.details=g.details,v.get=(0,o._makeParamStoreGetter)(this,g.config,c)),v}};return gc.default=i,gc}var qw;function S8(){return qw||(qw=1,(function(e){var t=js&&js.__createBinding||(Object.create?(function(i,s,l,c){c===void 0&&(c=l);var u=Object.getOwnPropertyDescriptor(s,l);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(i,c,u)}):(function(i,s,l,c){c===void 0&&(c=l),i[c]=s[l]})),r=js&&js.__exportStar||function(i,s){for(var l in i)l!=="default"&&!Object.prototype.hasOwnProperty.call(s,l)&&t(s,i,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigClient=void 0;const a=Jn(),o=E8();e.StatsigClient=o.default,r(Jn(),e);const n=Object.assign((0,a._getStatsigGlobal)(),{StatsigClient:o.default});e.default=n})(js)),js}var Vn=S8();function $w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function zi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$w(Object(r),!0).forEach(function(a){me(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$w(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var Bg="@all-features",_8=(function(){function e(){ur(this,e),me(this,"eventToValue",new Map),this.emitter=new q5}return dr(e,[{key:"onGateUpdated",value:function(r,a,o,n){var i=this,s=o(r,zi(zi({},n),{},{fireGateExposure:!1}));this.eventToValue.get(a)===void 0&&this.eventToValue.set(a,s);var l=function(){var u=o(r,zi(zi({},n),{},{fireGateExposure:!1})),d=i.eventToValue.get(a);d!==u&&(i.eventToValue.set(a,u),a(u))};return this.emitter.on(r,l),function(){i.emitter.off(r,l)}}},{key:"onExperimentValueUpdated",value:function(r,a,o,n,i,s){var l=this,c="".concat(r,".").concat(a),u=i(r,a,o,zi(zi({},s),{},{fireExperimentExposure:!1}));this.eventToValue.get(n)===void 0&&this.eventToValue.set(n,u);var d=function(){var b=i(r,a,o,zi(zi({},s),{},{fireExperimentExposure:!1})),v=l.eventToValue.get(n);v!==b&&(l.eventToValue.set(n,b),n(b))};return this.emitter.on(c,d),function(){l.emitter.off(c,d)}}},{key:"onAnyUpdated",value:function(r){var a=this;return this.emitter.on(Bg,r),function(){a.emitter.off(Bg,r)}}},{key:"anyUpdated",value:function(){var r=this;this.emitter.emit(Bg),this.emitter.eventNames().filter(function(a){return a!==Bg}).forEach(function(a){r.emitter.emit(a)})}}])})();function C8(e){if(Array.isArray(e))return v6(e)}function x8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function P8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
10
10
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zn(e){return C8(e)||x8(e)||m6(e)||P8()}var O8="fedramp-moderate";function I8(){var e,t=globalThis,r=t.MICROS_PERIMETER||t.UNSAFE_ATL_CONTEXT_BOUNDARY;if(r)return r===O8;var a=(e=t.location)===null||e===void 0||(e=e.hostname)===null||e===void 0?void 0:e.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);return a?a.length>0:!1}var O0={Error:"Error",LocalOverride:"LocalOverride",Unrecognized:"Unrecognized",Uninitialized:"Uninitialized",NetworkNotModified:"NetworkNotModified",Network:"Network",InvalidBootstrap:"InvalidBootstrap",Bootstrap:"Bootstrap",Cache:"Cache",Unknown:"Unknown"},wh={Development:"development",Staging:"staging",Production:"production"},Bh={COMMERCIAL:"commercial",FEDRAMP_MODERATE:"fedramp-moderate"},T8=["stableId"],R8=["api","disableCurrentPageLogging","loggingIntervalMillis","loggingBufferMaxSize","localMode","eventLoggingApi","eventLoggingApiForRetries","disableLocalStorage","ignoreWindowUndefined","disableAllLogging","initTimeoutMs","disableNetworkKeepalive","overrideStableID","disableErrorLogging","disableAutoMetricsLogging"];function eE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function Hh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eE(Object(r),!0).forEach(function(a){me(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eE(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var Hg=function(t){return Hh({perimeter:I8()?Bh.FEDRAMP_MODERATE:Bh.COMMERCIAL},t)},Sd=function(t,r){if(!t&&!r)return!0;if(!t||!r)return!1;var a=Object.entries(t),o=Object.entries(r);if(a.length!==o.length)return!1;var n=function(m,b){var v=or(m,1),g=v[0],w=or(b,1),E=w[0];return g.localeCompare(E)};a.sort(n),o.sort(n);for(var i=0;i<a.length;i++){var s=or(a[i],2),l=s[1],c=or(o[i],2),u=c[1];if(l!==u)return!1}return!0},tE=function(t,r){var a=t.stableId,o=Jf(t,T8),n={customIDs:Hh(Hh({},o),a!==void 0?{stableID:a}:{}),custom:r};return t.atlassianAccountId&&(n.userID=t.atlassianAccountId),n};function Ih(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];if(!r.length)return e;var o=r.shift();if(o==null)return Ih.apply(void 0,[e].concat(Zn(r)));for(var n=0,i=Object.entries(o);n<i.length;n++){var s=or(i[n],2),l=s[0],c=s[1],u=e[l],d=c&&Yn(c)==="object"&&!Array.isArray(c),m=u&&Yn(u)==="object"&&!Array.isArray(u);d&&m?e[l]=Ih(u,c):e[l]=c}return Ih.apply(void 0,[e].concat(Zn(r)))}var A8=function(t){var r=t.api,a=t.disableCurrentPageLogging,o=t.loggingIntervalMillis,n=t.loggingBufferMaxSize,i=t.localMode,s=t.eventLoggingApi,l=t.eventLoggingApiForRetries,c=t.disableLocalStorage,u=t.ignoreWindowUndefined,d=t.disableAllLogging;t.initTimeoutMs,t.disableNetworkKeepalive,t.overrideStableID,t.disableErrorLogging,t.disableAutoMetricsLogging;var m=Jf(t,R8);return Hh(Hh({},m),{},{networkConfig:{api:r,logEventUrl:s?s+"rgstr":void 0,logEventFallbackUrls:l?[l]:void 0,preventAllNetworkTraffic:i||!u&&typeof window>"u"},includeCurrentPageUrlWithEvents:!a,loggingIntervalMs:o,loggingBufferMaxSize:n,disableStorage:c===void 0?i:c,disableLogging:d===void 0?i:d})},D8=Object.entries(O0).map(function(e){var t=or(e,2),r=t[0],a=t[1];return[r.toLowerCase(),a]}),N3=function(t){var r,a,o,n=t.reason.toLowerCase();return{reason:(r=(a=D8.find(function(i){var s=or(i,1),l=s[0];return n.includes(l)}))===null||a===void 0?void 0:a[1])!==null&&r!==void 0?r:O0.Unknown,time:(o=t.receivedAt)!==null&&o!==void 0?o:Date.now()}},Tb=function(t){return t.map(function(r){return typeof r=="string"?{gate:r}:r})},rE=(function(){function e(t,r,a,o){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"",s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null;ur(this,e),this.value=r,this._name=t,this._ruleID=a,this._secondaryExposures=n,this._allocatedExperimentName=i,this._evaluationDetails=o,this._onDefaultValueFallback=s}return dr(e,[{key:"get",value:function(r,a,o){var n,i=this.getValue(r,a);if(i==null)return a;var s=Array.isArray(a)?"array":Yn(a),l=Array.isArray(i)?"array":Yn(i);if(o){var c;return o(i)?(this.fireExposure(r),i):((c=this._onDefaultValueFallback)===null||c===void 0||c.call(this,this,r,s,l),a)}return a==null||s===l?(this.fireExposure(r),i):((n=this._onDefaultValueFallback)===null||n===void 0||n.call(this,this,r,s,l),a)}},{key:"getValue",value:function(r,a){return r==null?this.value:(a==null&&(a=null),this.value[r]==null?a:(this.fireExposure(r),this.value[r]))}},{key:"fireExposure",value:function(r){this.experiment&&this.experiment.get(r)}}],[{key:"fromExperiment",value:function(r){var a,o,n,i=new e(r.name,r.value,r.ruleID,N3(r.details),Tb((a=(o=r.__evaluation)===null||o===void 0?void 0:o.secondary_exposures)!==null&&a!==void 0?a:[]),(n=r.groupName)!==null&&n!==void 0?n:void 0);return i.experiment=r,i}}])})(),aE=(function(){function e(t,r,a,o){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:[],l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"",c=arguments.length>8&&arguments[8]!==void 0?arguments[8]:[];ur(this,e),this._logParameterFunction=n,this._name=t,this._value=JSON.parse(JSON.stringify(r??{})),this._ruleID=a??"",this._evaluationDetails=o,this._secondaryExposures=i,this._undelegatedSecondaryExposures=s,this._allocatedExperimentName=l,this._explicitParameters=c}return dr(e,[{key:"get",value:function(r,a,o){var n=this,i=this._value[r];if(i==null)return a;var s=function(){return n._logLayerParameterExposure(r),i};return o?o(i)?s():a:a==null||Yn(i)===Yn(a)&&Array.isArray(a)===Array.isArray(i)?s():a}},{key:"getValue",value:function(r,a){a==null&&(a=null);var o=this._value[r];return o!=null&&this._logLayerParameterExposure(r),o??a}},{key:"_logLayerParameterExposure",value:function(r){var a;(a=this._logParameterFunction)===null||a===void 0||a.call(this,this,r)}}],[{key:"fromLayer",value:function(r){var a,o,n,i,s,l,c=new e(r.name,r.__value,r.ruleID,N3(r.details),function(u,d){return r.get(d)},Tb((a=(o=r.__evaluation)===null||o===void 0?void 0:o.secondary_exposures)!==null&&a!==void 0?a:[]),Tb((n=(i=r.__evaluation)===null||i===void 0?void 0:i.undelegated_secondary_exposures)!==null&&n!==void 0?n:[]),(s=r.__evaluation)===null||s===void 0?void 0:s.allocated_experiment_name,(l=r.__evaluation)===null||l===void 0?void 0:l.explicit_parameters);return c}}])})(),Bc="5.8.0";function N8(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function M8(e,t,r){if(L5())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,t);var o=new(e.bind.apply(e,a));return r&&Gc(o,r.prototype),o}function Rb(e){var t=typeof Map=="function"?new Map:void 0;return Rb=function(a){if(a===null||!N8(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(a))return t.get(a);t.set(a,o)}function o(){return M8(a,arguments,Xn(this).constructor)}return o.prototype=Object.create(a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Gc(o,a)},Rb(e)}function F8(e,t,r){return t=Xn(t),c0(e,M3()?Reflect.construct(t,r||[],Xn(e).constructor):t.apply(e,r))}function M3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(M3=function(){return!!e})()}var nE=(function(e){function t(r){return ur(this,t),F8(this,t,[r])}return l0(t,e),dr(t)})(Rb(Error));function oE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function L8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oE(Object(r),!0).forEach(function(a){me(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oE(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var U8=5e3,B8="https://api.atlassian.com/flags",H8="https://api.stg.atlassian.com/flags",z8="https://api.dev.atlassian.com/flags",V8="https://api.stg.atlassian-us-gov-mod.com/flags",W8="https://api.atlassian-us-gov-mod.com/flags",j8="https://atlassian-statsig-proxy-archetype.atl-paas.%s.atl-ic.net",G8="oasis-stg.com/flags",K8="atlassian-isolated.net/flags",Y8="/gateway/api/flags",Dm=(function(){function e(){ur(this,e)}return dr(e,null,[{key:"fetchClientSdk",value:(function(){var t=Mt(Ge.mark(function a(o){var n,i,s;return Ge.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return n=o.targetApp,i="/api/v2/frontend/clientSdkKey/".concat(n),l.prev=1,l.next=2,this.fetchRequest(i,"GET",o);case 2:return l.abrupt("return",l.sent);case 3:if(l.prev=3,s=l.catch(1),!(s instanceof Error)){l.next=4;break}throw s;case 4:throw Error("Failed to retrieve client sdk key");case 5:case"end":return l.stop()}},a,this,[[1,3]])}));function r(a){return t.apply(this,arguments)}return r})()},{key:"fetchExperimentValues",value:(function(){var t=Mt(Ge.mark(function a(o,n,i){var s,l;return Ge.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return s={identifiers:n,customAttributes:i,targetApp:o.targetApp},c.prev=1,c.next=2,this.fetchRequest("/api/v2/frontend/experimentValues","POST",o,s);case 2:return c.abrupt("return",c.sent);case 3:if(c.prev=3,l=c.catch(1),!(l instanceof Error)){c.next=4;break}throw l;case 4:throw Error("Failed to retrieve experiment values");case 5:case"end":return c.stop()}},a,this,[[1,3]])}));function r(a,o,n){return t.apply(this,arguments)}return r})()},{key:"handleResponseError",value:(function(){var t=Mt(Ge.mark(function a(o){var n;return Ge.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(o.ok){i.next=2;break}return i.next=1,o.text();case 1:throw n=i.sent,new nE("Non 2xx response status received, status: ".concat(o.status,", body: ").concat(JSON.stringify(n)));case 2:if(o.status!==204){i.next=3;break}throw new nE("Unexpected 204 response");case 3:case"end":return i.stop()}},a)}));function r(a){return t.apply(this,arguments)}return r})()},{key:"extractResponseBody",value:(function(){var t=Mt(Ge.mark(function a(o){var n;return Ge.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=1,o.text();case 1:return n=i.sent,i.abrupt("return",JSON.parse(n));case 2:case"end":return i.stop()}},a)}));function r(a){return t.apply(this,arguments)}return r})()},{key:"getBaseUrl",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(a)return Y8;if(o===Bh.FEDRAMP_MODERATE)switch(r){case wh.Production:return W8;case wh.Staging:return V8;default:throw new Error('Invalid environment "'.concat(r,'" for "').concat(o,'" perimeter'))}else if(o===Bh.COMMERCIAL)switch(r){case wh.Development:return z8;case wh.Staging:var i=this.getApiUrl(n);return i!==null?i:H8;default:var s=this.getApiUrl(n);return s!==null?s:B8}else throw new Error('Invalid perimeter "'.concat(o,'"'))}},{key:"fetchRequest",value:(function(){var t=Mt(Ge.mark(function a(o,n,i,s){var l,c,u,d,m;return Ge.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return l=e.getBaseUrl(i.environment,i.useGatewayURL,i.perimeter,i.isolationContextId),c=i.fetchTimeoutMs||U8,AbortSignal.timeout?u=AbortSignal.timeout(c):AbortController&&(d=new AbortController,u=d.signal,setTimeout(function(){return d.abort()},c)),b.next=1,fetch("".concat(l).concat(o),L8({method:n,headers:{"Content-Type":"application/json","X-Client-Name":"feature-gate-js-client","X-Client-Version":Bc,"X-API-KEY":i.apiKey},signal:u},s&&{body:JSON.stringify(s)}));case 1:return m=b.sent,b.next=2,this.handleResponseError(m);case 2:return b.next=3,this.extractResponseBody(m);case 3:return b.abrupt("return",b.sent);case 4:case"end":return b.stop()}},a,this)}));function r(a,o,n,i){return t.apply(this,arguments)}return r})()},{key:"getApiUrl",value:function(r){var a=this.getWindowLocation();if(a===void 0)return r?j8.replace("%s",r):null;var o=a.protocol,n=a.hostname,i=n.match(/([^.]+)\.oasis-stg\.com$/);if(i)return"".concat(o,"//api.").concat(i[1],".").concat(G8);var s=n.match(/([^.]+)\.atlassian-isolated\.net$/);return s?"".concat(o,"//api.").concat(s[1],".").concat(K8):null}},{key:"getWindowLocation",value:function(){if(typeof window<"u"&&window.location)return window.location}}])})();function X8(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Xn(e))!==null;);return e}function Ab(){return Ab=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var a=X8(e,t);if(a){var o=Object.getOwnPropertyDescriptor(a,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Ab.apply(null,arguments)}function iE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function _d(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iE(Object(r),!0).forEach(function(a){me(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iE(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function J8(e,t,r){return t=Xn(t),c0(e,F3()?Reflect.construct(t,r||[],Xn(e).constructor):t.apply(e,r))}function F3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(F3=function(){return!!e})()}function Z8(e,t,r,a){var o=Ab(Xn(e.prototype),t,r);return typeof o=="function"?function(n){return o.apply(r,n)}:o}var Q8=(function(e){function t(){var r;return ur(this,t),r=J8(this,t,["NoFetchDataAdapter","nofetch"]),me(r,"bootstrapResult",null),r}return l0(t,e),dr(t,[{key:"setBootstrapData",value:function(a){this.bootstrapResult=a?{source:"Bootstrap",data:JSON.stringify(a),receivedAt:Date.now(),stableID:Vn.StableID.get(this._getSdkKey()),fullUserHash:null}:null}},{key:"prefetchData",value:(function(){var r=Mt(Ge.mark(function o(n,i){return Ge.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:case"end":return s.stop()}},o)}));function a(o,n){return r.apply(this,arguments)}return a})()},{key:"getDataAsync",value:(function(){var r=Mt(Ge.mark(function o(n,i,s){return Ge.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",this.bootstrapResult&&_d(_d({},this.bootstrapResult),{},{fullUserHash:Vn._getFullUserHash(i)}));case 1:case"end":return l.stop()}},o,this)}));function a(o,n,i){return r.apply(this,arguments)}return a})()},{key:"getDataSync",value:function(a){return this.bootstrapResult&&_d(_d({},this.bootstrapResult),{},{fullUserHash:Vn._getFullUserHash(a)})}},{key:"_fetchFromNetwork",value:(function(){var r=Mt(Ge.mark(function o(n,i,s){return Ge.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",null);case 1:case"end":return l.stop()}},o)}));function a(o,n,i){return r.apply(this,arguments)}return a})()},{key:"_getCacheKey",value:function(a){var o=Vn._getStorageKey(this._getSdkKey(),a);return"".concat(Vn.DataAdapterCachePrefix,".").concat(this._cacheSuffix,".").concat(o)}},{key:"_isCachedResultValidFor204",value:function(a,o){return!1}},{key:"setDataLegacy",value:function(a,o){Z8(t,"setData",this)([a,o])}},{key:"toJSON",value:function(){var a=_d({},this);return delete a._options,delete a._inMemoryCache,delete a.bootstrapResult,a}}])})(Vn.DataAdapterCore),fn=Jn();function sE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function ja(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sE(Object(r),!0).forEach(function(a){me(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sE(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function q8(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=$8(e))||t){r&&(e=r);var a=0,o=function(){};return{s:o,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(c){throw c},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
11
11
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return i=c.done,c},e:function(c){s=!0,n=c},f:function(){try{i||r.return==null||r.return()}finally{if(s)throw n}}}}function $8(e,t){if(e){if(typeof e=="string")return lE(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lE(e,t):void 0}}function lE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}var Nm="LocalOverride:Recognized",eA="STATSIG_OVERRIDES",cE="STATSIG_JS_LITE_LOCAL_OVERRIDES",pc=function(){return{gates:{},configs:{},layers:{}}},pn=function(t,r){return r+":"+t},tA=(function(){function e(t){ur(this,e),this._overrides=pc(),this._djb2Map=new Map,this._localStorageKey=t}return dr(e,[{key:"parseStoredOverrides",value:function(r){try{var a=window.localStorage.getItem(r);return a?JSON.parse(a):pc()}catch{return pc()}}},{key:"mergeOverrides",value:function(){for(var r=pc(),a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];for(var i=0,s=o;i<s.length;i++){for(var l=s[i],c=0,u=Object.entries((d=l.gates)!==null&&d!==void 0?d:{});c<u.length;c++){var d,m=or(u[c],2),b=m[0],v=m[1];r.gates[b]=v}for(var g=0,w=Object.entries((E=l.configs)!==null&&E!==void 0?E:{});g<w.length;g++){var E,S=or(w[g],2),P=S[0],I=S[1];r.configs[P]=I}for(var O=0,T=Object.entries((C=l.layers)!==null&&C!==void 0?C:{});O<T.length;O++){var C,R=or(T[O],2),N=R[0],U=R[1];r.layers[N]=U}}return r}},{key:"initFromStoredOverrides",value:function(){var r=this.mergeOverrides(this._overrides,this.parseStoredOverrides(cE),this.parseStoredOverrides(this._localStorageKey));try{window.localStorage.removeItem(cE)}catch{}for(var a=0,o=Object.values(r);a<o.length;a++){var n=o[a],i=new Set(Object.keys(n)),s=q8(i),l;try{for(s.s();!(l=s.n()).done;){var c=l.value,u=fn._DJB2(c);i.has(u)&&delete n[u]}}catch(d){s.e(d)}finally{s.f()}}this.applyOverrides(r)}},{key:"saveOverrides",value:function(){try{window.localStorage.setItem(this._localStorageKey,JSON.stringify(this._overrides))}catch{}}},{key:"getOverrides",value:function(){return this.mergeOverrides(this._overrides)}},{key:"applyOverrides",value:function(r){var a=ja(ja({},pc()),r);this._djb2Map.clear();for(var o=0,n=Object.entries(a);o<n.length;o++)for(var i=or(n[o],2),s=i[0],l=i[1],c=0,u=Object.entries(l);c<u.length;c++){var d=or(u[c],2),m=d[0],b=d[1];this._djb2Map.set(pn(fn._DJB2(m),s),b)}this._overrides=a}},{key:"setOverrides",value:function(r){this.applyOverrides(r),this.saveOverrides()}},{key:"overrideGate",value:function(r,a){this._overrides.gates[r]=a,this._djb2Map.set(pn(fn._DJB2(r),"gates"),a),this.saveOverrides()}},{key:"removeGateOverride",value:function(r){delete this._overrides.gates[r],this._djb2Map.delete(pn(fn._DJB2(r),"gates")),this.saveOverrides()}},{key:"getGateOverride",value:function(r,a){var o,n=(o=this._overrides.gates[r.name])!==null&&o!==void 0?o:this._djb2Map.get(pn(r.name,"gates"));return n==null?null:ja(ja({},r),{},{value:n,details:ja(ja({},r.details),{},{reason:Nm})})}},{key:"overrideDynamicConfig",value:function(r,a){this._overrides.configs[r]=a,this._djb2Map.set(pn(fn._DJB2(r),"configs"),a),this.saveOverrides()}},{key:"removeDynamicConfigOverride",value:function(r){delete this._overrides.configs[r],this._djb2Map.delete(pn(fn._DJB2(r),"configs")),this.saveOverrides()}},{key:"getDynamicConfigOverride",value:function(r,a){return this._getConfigOverride(r,this._overrides.configs)}},{key:"overrideExperiment",value:function(r,a){this._overrides.configs[r]=a,this._djb2Map.set(pn(fn._DJB2(r),"configs"),a),this.saveOverrides()}},{key:"removeExperimentOverride",value:function(r){delete this._overrides.configs[r],this._djb2Map.delete(pn(fn._DJB2(r),"configs")),this.saveOverrides()}},{key:"getExperimentOverride",value:function(r,a){return this._getConfigOverride(r,this._overrides.configs)}},{key:"overrideLayer",value:function(r,a){this._overrides.layers[r]=a,this._djb2Map.set(pn(fn._DJB2(r),"layers"),a),this.saveOverrides()}},{key:"removeLayerOverride",value:function(r){delete this._overrides.layers[r],this._djb2Map.delete(pn(fn._DJB2(r),"layers")),this.saveOverrides()}},{key:"removeAllOverrides",value:function(){this._overrides=pc();try{window.localStorage.removeItem(this._localStorageKey)}catch{}}},{key:"getLayerOverride",value:function(r,a){var o,n=(o=this._overrides.layers[r.name])!==null&&o!==void 0?o:this._djb2Map.get(pn(r.name,"layers"));return n==null?null:ja(ja({},r),{},{__value:n,get:fn._makeTypedGet(r.name,n),details:ja(ja({},r.details),{},{reason:Nm})})}},{key:"_getConfigOverride",value:function(r,a){var o,n=(o=a[r.name])!==null&&o!==void 0?o:this._djb2Map.get(pn(r.name,"configs"));return n==null?null:ja(ja({},r),{},{value:n,get:fn._makeTypedGet(r.name,n),details:ja(ja({},r.details),{},{reason:Nm})})}}])})(),rA=["sdkKey","environment","updateUserCompletionCallback","perimeter"];function uE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function Vi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uE(Object(r),!0).forEach(function(a){me(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uE(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var dE="client-default-key",aA="https://xp.atlassian.com/v1/rgstr",nA=(function(){function e(){var t=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=r.localStorageKey,o=a===void 0?eA:a,n=r.overrideAdapter;ur(this,e),me(this,"initPromise",null),me(this,"initCompleted",!1),me(this,"initWithDefaults",!1),me(this,"hasCheckGateErrorOccurred",!1),me(this,"hasGetExperimentErrorOccurred",!1),me(this,"hasGetExperimentValueErrorOccurred",!1),me(this,"hasGetLayerErrorOccurred",!1),me(this,"hasGetLayerValueErrorOccurred",!1),me(this,"subscriptions",new _8),me(this,"dataAdapter",new Q8),me(this,"statsigValuesUpdated",function(){t.user&&t.statsigClient.updateUserSync(t.user,{disableBackgroundCacheRefresh:!0}),t.subscriptions.anyUpdated()}),this.overrideAdapter=n||new tA(o)}return dr(e,[{key:"initialize",value:(function(){var t=Mt(Ge.mark(function a(o,n,i){var s=this,l,c;return Ge.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(l=Hg(o),!this.initPromise){u.next=1;break}return Sd(l,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),u.abrupt("return",this.initPromise);case 1:return c=performance.now(),this.initOptions=l,this.initPromise=this.init(l,n,i).then(function(){s.initCompleted=!0,s.initWithDefaults=!0}).finally(function(){var d=performance.now(),m=d-c;s.fireClientEvent(c,m,"initialize",s.initCompleted,l.apiKey)}),u.abrupt("return",this.initPromise);case 2:case"end":return u.stop()}},a,this)}));function r(a,o,n){return t.apply(this,arguments)}return r})()},{key:"initializeWithProvider",value:(function(){var t=Mt(Ge.mark(function a(o,n,i,s){var l=this,c,u;return Ge.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(c=Hg(o),!this.initPromise){d.next=1;break}return Sd(c,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),d.abrupt("return",this.initPromise);case 1:return u=performance.now(),this.initOptions=c,this.provider=n,this.provider.setClientVersion(Bc),this.provider.setApplyUpdateCallback&&this.provider.setApplyUpdateCallback(this.applyUpdateCallback.bind(this)),this.initPromise=this.initWithProvider(c,n,i,s).then(function(){l.initCompleted=!0,l.initWithDefaults=!0}).finally(function(){var m=performance.now(),b=m-u;l.fireClientEvent(u,b,"initializeWithProvider",l.initCompleted,n.getApiKey?n.getApiKey():void 0)}),d.abrupt("return",this.initPromise);case 2:case"end":return d.stop()}},a,this)}));function r(a,o,n,i){return t.apply(this,arguments)}return r})()},{key:"applyUpdateCallback",value:function(r){try{(this.initCompleted||this.initWithDefaults)&&(this.assertInitialized(this.statsigClient),this.dataAdapter.setBootstrapData(r.experimentValues),this.dataAdapter.setData(JSON.stringify(r.experimentValues)),this.statsigValuesUpdated())}catch(a){console.warn("Error when attempting to apply update",a)}}},{key:"fireClientEvent",value:function(r,a,o,n){var i,s=this,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0;(i=this.initOptions.analyticsWebClient)===null||i===void 0||i.then(function(c){var u=Vi({targetApp:s.initOptions.targetApp,clientVersion:Bc,success:n,startTime:r,totalTime:a},l&&{apiKey:l});c.sendOperationalEvent({action:o,actionSubject:"featureGatesClient",attributes:u,tags:["measurement"],source:"@atlaskit/feature-gate-js-client"})}).catch(function(c){s.initOptions.environment!==wh.Production&&console.error("Analytics web client promise did not resolve",c)})}},{key:"initializeFromValues",value:(function(){var t=Mt(Ge.mark(function a(o,n,i){var s=this,l,c,u,d=arguments;return Ge.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(l=d.length>3&&d[3]!==void 0?d[3]:{},c=Hg(o),!this.initPromise){m.next=1;break}return Sd(c,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),m.abrupt("return",this.initPromise);case 1:return Object.prototype.hasOwnProperty.call(l,"has_updates")||(l.has_updates=!0),u=performance.now(),this.initOptions=c,this.initPromise=this.initFromValues(c,n,i,l).then(function(){s.initCompleted=!0,s.initWithDefaults=!0}).finally(function(){var b=performance.now(),v=b-u;s.fireClientEvent(u,v,"initializeFromValues",s.initCompleted)}),m.abrupt("return",this.initPromise);case 2:case"end":return m.stop()}},a,this)}));function r(a,o,n){return t.apply(this,arguments)}return r})()},{key:"assertInitialized",value:function(r){if(!r)throw new Error("Client must be initialized before using this method")}},{key:"updateUser",value:(function(){var t=Mt(Ge.mark(function a(o,n,i){var s,l;return Ge.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.assertInitialized(this.statsigClient),s=Hg(o),l=function(){return Dm.fetchExperimentValues(s,n,i).then(function(d){var m=d.experimentValues,b=d.customAttributes;return{experimentValues:m,customAttributesFromFetch:b}})},c.next=1,this.updateUserUsingInitializeValuesProducer(l,n,i);case 1:case"end":return c.stop()}},a,this)}));function r(a,o,n){return t.apply(this,arguments)}return r})()},{key:"updateUserWithProvider",value:(function(){var t=Mt(Ge.mark(function a(o,n){var i=this;return Ge.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(this.assertInitialized(this.statsigClient),this.provider){s.next=1;break}throw new Error("Cannot update user using provider as the client was not initialised with a provider");case 1:return s.next=2,this.provider.setProfile(this.initOptions,o,n);case 2:return s.next=3,this.updateUserUsingInitializeValuesProducer(function(){return i.provider.getExperimentValues()},o,n);case 3:case"end":return s.stop()}},a,this)}));function r(a,o){return t.apply(this,arguments)}return r})()},{key:"updateUserWithValues",value:(function(){var t=Mt(Ge.mark(function a(o,n){var i,s,l=arguments;return Ge.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return i=l.length>2&&l[2]!==void 0?l[2]:{},this.assertInitialized(this.statsigClient),s=function(){return Promise.resolve({experimentValues:i,customAttributesFromFetch:n})},c.next=1,this.updateUserUsingInitializeValuesProducer(s,o,n);case 1:case"end":return c.stop()}},a,this)}));function r(a,o){return t.apply(this,arguments)}return r})()},{key:"initializeCalled",value:function(){return this.initPromise!=null}},{key:"initializeCompleted",value:function(){return this.initCompleted}},{key:"waitUntilInitializeCompleted",value:(function(){var t=Mt(Ge.mark(function a(){return Ge.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(this.initPromise){o.next=1;break}throw new Error("The client must be initialized before you can wait until initialized.");case 1:if(!this.initCompleted){o.next=2;break}return o.abrupt("return");case 2:return o.next=3,this.initPromise;case 3:case"end":return o.stop()}},a,this)}));function r(){return t.apply(this,arguments)}return r})()},{key:"checkGate",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var o=a.fireGateExposure,n=o===void 0?!0:o;return this.statsigClient.checkGate(r,{disableExposureLog:!n})}catch(i){return this.hasCheckGateErrorOccurred||(console.warn({msg:"An error has occurred checking the feature gate. Only the first occurrence of this error is logged.",gateName:r,error:i}),this.hasCheckGateErrorOccurred=!0),!1}}},{key:"isGateExist",value:function(r){try{this.assertInitialized(this.statsigClient);var a=this.statsigClient.getFeatureGate(r,{disableExposureLog:!0});return!a.details.reason.includes("Unrecognized")}catch(o){return console.error("Error occurred when trying to check FeatureGate: ".concat(o)),!0}}},{key:"isExperimentExist",value:function(r){try{this.assertInitialized(this.statsigClient);var a=this.statsigClient.getExperiment(r,{disableExposureLog:!0});return!a.details.reason.includes("Unrecognized")}catch(o){return console.error("Error occurred when trying to check Experiment: ".concat(o)),!0}}},{key:"manuallyLogGateExposure",value:function(r){this.assertInitialized(this.statsigClient),this.statsigClient.checkGate(r)}},{key:"getExperiment",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var o=a.fireExperimentExposure,n=o===void 0?!0:o;return rE.fromExperiment(this.statsigClient.getExperiment(r,{disableExposureLog:!n}))}catch(i){return this.hasGetExperimentErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment. Only the first occurrence of this error is logged.",experimentName:r,error:i}),this.hasGetExperimentErrorOccurred=!0),new rE(r,{},"",{time:Date.now(),reason:O0.Error})}}},{key:"getExperimentValue",value:function(r,a,o){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=this.getExperiment(r,n);try{var s=n.typeGuard;return i.get(a,o,s)}catch(l){return this.hasGetExperimentValueErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment value. Only the first occurrence of this error is logged.",experimentName:r,defaultValue:o,options:n,error:l}),this.hasGetExperimentValueErrorOccurred=!0),o}}},{key:"manuallyLogExperimentExposure",value:function(r){this.assertInitialized(this.statsigClient),this.statsigClient.getExperiment(r)}},{key:"manuallyLogLayerExposure",value:function(r,a){var o;this.assertInitialized(this.statsigClient),(o=this.statsigClient.getLayer(r))===null||o===void 0||o.get(a)}},{key:"shutdownStatsig",value:function(){this.assertInitialized(this.statsigClient),this.statsigClient.shutdown()}},{key:"overrideGate",value:function(r,a){if(this.overrideAdapter.overrideGate(r,a),this.user){var o;(o=this.statsigClient)===null||o===void 0||o.updateUserSync(this.user,{disableBackgroundCacheRefresh:!0})}this.statsigValuesUpdated()}},{key:"clearGateOverride",value:function(r){this.overrideAdapter.removeGateOverride(r),this.statsigValuesUpdated()}},{key:"overrideConfig",value:function(r,a){this.overrideAdapter.overrideDynamicConfig(r,a),this.statsigValuesUpdated()}},{key:"clearConfigOverride",value:function(r){this.overrideAdapter.removeDynamicConfigOverride(r),this.statsigValuesUpdated()}},{key:"setOverrides",value:function(r){this.overrideAdapter.setOverrides(r),this.statsigValuesUpdated()}},{key:"getOverrides",value:function(){return this.overrideAdapter.getOverrides()}},{key:"clearAllOverrides",value:function(){this.overrideAdapter.removeAllOverrides(),this.statsigValuesUpdated()}},{key:"isCurrentUser",value:function(r,a){return Sd(this.currentIdentifiers,r)&&Sd(this.currentAttributes,a)}},{key:"onGateUpdated",value:function(r,a){var o=this,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=function(l){var c=n.fireGateExposure,u=c===void 0?!0:c;u&&o.manuallyLogGateExposure(r);try{a(l)}catch(d){console.warn("Error calling callback for gate ".concat(r," with value ").concat(l),d)}};return this.subscriptions.onGateUpdated(r,i,this.checkGate.bind(this),n)}},{key:"onExperimentValueUpdated",value:function(r,a,o,n){var i=this,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{},l=function(u){var d=s.fireExperimentExposure,m=d===void 0?!0:d;m&&i.manuallyLogExperimentExposure(r);try{n(u)}catch(b){console.warn("Error calling callback for experiment ".concat(r," with value ").concat(u),b)}};return this.subscriptions.onExperimentValueUpdated(r,a,o,l,this.getExperimentValue.bind(this),s)}},{key:"onAnyUpdated",value:function(r){return this.subscriptions.onAnyUpdated(r)}},{key:"init",value:(function(){var t=Mt(Ge.mark(function a(o,n,i){var s,l,c,u,d,m,b,v,g;return Ge.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(s=Vi({},o),!o.localMode){w.next=2;break}return w.next=1,this.initFromValues(s,n,i);case 1:return w.abrupt("return");case 2:return w.prev=2,u=Dm.fetchClientSdk(o).then(function(E){return s.sdkKey=E.clientSdkKey}),d=Dm.fetchExperimentValues(o,n,i),w.next=3,Promise.all([u,d]);case 3:m=w.sent,b=or(m,2),v=b[1],l=v.experimentValues,c=v.customAttributes,w.next=6;break;case 4:return w.prev=4,g=w.catch(2),g instanceof Error&&console.error("Error occurred when trying to fetch the Feature Gates client values, error: ".concat(g?.message)),console.warn("Initialising Statsig client without values"),w.next=5,this.initFromValues(s,n,i);case 5:throw g;case 6:return w.abrupt("return",this.initFromValues(s,n,c,l));case 7:case"end":return w.stop()}},a,this,[[2,4]])}));function r(a,o,n){return t.apply(this,arguments)}return r})()},{key:"initWithProvider",value:(function(){var t=Mt(Ge.mark(function a(o,n,i,s){var l,c,u,d,m,b,v,g,w;return Ge.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return l=Vi(Vi({},o),{},{disableCurrentPageLogging:!0}),E.prev=1,E.next=2,n.setProfile(o,i,s);case 2:return d=n.getClientSdkKey().then(function(S){return l.sdkKey=S}),m=n.getExperimentValues(),E.next=3,Promise.all([d,m]);case 3:b=E.sent,v=or(b,2),g=v[1],c=g.experimentValues,u=g.customAttributesFromFetch,E.next=6;break;case 4:return E.prev=4,w=E.catch(1),w instanceof Error&&console.error("Error occurred when trying to fetch the Feature Gates client values, error: ".concat(w?.message)),console.warn("Initialising Statsig client without values"),E.next=5,this.initFromValues(l,i,s);case 5:throw w;case 6:return E.abrupt("return",this.initFromValues(l,i,u,c));case 7:case"end":return E.stop()}},a,this,[[1,4]])}));function r(a,o,n,i){return t.apply(this,arguments)}return r})()},{key:"initFromValues",value:(function(){var t=Mt(Ge.mark(function a(o,n,i){var s,l,c,u,d,m,b,v,g=arguments,w;return Ge.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return l=g.length>3&&g[3]!==void 0?g[3]:{},this.overrideAdapter.initFromStoredOverrides(),this.currentIdentifiers=n,this.currentAttributes=i,c=A8(o),c.sdkKey||(c.sdkKey=dE),(s=c.networkConfig)!==null&&s!==void 0&&s.logEventUrl||(c.networkConfig=Vi(Vi({},c.networkConfig),{},{logEventUrl:aA})),c.perimeter===Bh.FEDRAMP_MODERATE&&(c.disableLogging=!0),u=c.sdkKey,d=c.environment,c.updateUserCompletionCallback,c.perimeter,m=Jf(c,rA),b=tE(n,i),this.user=Ih({},l.user,b),v=Vi(Vi({},m),{},{environment:{tier:d},includeCurrentPageUrlWithEvents:!1,dataAdapter:this.dataAdapter,overrideAdapter:this.overrideAdapter,logEventCompressionMode:Vn.LogEventCompressionMode.Forced}),n.stableId?Vn.StableID.setOverride(n.stableId,u):v.disableStableID=!0,E.prev=1,this.statsigClient=new Vn.StatsigClient(u,this.user,v),this.dataAdapter.setBootstrapData(l),E.next=2,this.statsigClient.initializeAsync();case 2:E.next=5;break;case 3:return E.prev=3,w=E.catch(1),w instanceof Error&&console.error("Error occurred when trying to initialise the Statsig client, error: ".concat(w?.message)),console.warn("Initialising Statsig client with default sdk key and without values"),this.statsigClient=new Vn.StatsigClient(dE,this.user,v),this.dataAdapter.setBootstrapData(),E.next=4,this.statsigClient.initializeAsync();case 4:throw this.initWithDefaults=!0,w;case 5:case"end":return E.stop()}},a,this,[[1,3]])}));function r(a,o,n){return t.apply(this,arguments)}return r})()},{key:"updateUserUsingInitializeValuesProducer",value:(function(){var t=Mt(Ge.mark(function a(o,n,i){var s=this,l,c,u;return Ge.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(this.assertInitialized(this.statsigClient),this.initPromise){d.next=1;break}throw new Error("The client must be initialized before you can update the user.");case 1:if(!this.isCurrentUser(n,i)){d.next=2;break}return d.abrupt("return",this.initPromise);case 2:return l=this.initPromise,d.prev=3,d.next=4,this.initPromise;case 4:d.next=6;break;case 5:d.prev=5,d.catch(3);case 6:return c=o(),u=this.updateStatsigClientUser(c,n,i),this.initPromise=u.catch(Mt(Ge.mark(function m(){return Ge.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(s.initPromise=l,!s.provider){b.next=1;break}return b.next=1,s.provider.setProfile(s.initOptions,s.currentIdentifiers,s.currentAttributes);case 1:case"end":return b.stop()}},m)}))),d.abrupt("return",u);case 7:case"end":return d.stop()}},a,this,[[3,5]])}));function r(a,o,n){return t.apply(this,arguments)}return r})()},{key:"updateStatsigClientUser",value:(function(){var t=Mt(Ge.mark(function a(o,n,i){var s,l,c,u,d,m,b,v,g,w,E,S;return Ge.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return this.assertInitialized(this.statsigClient),P.prev=1,P.next=2,o;case 2:c=P.sent,d=tE(n,c.customAttributesFromFetch),u=Ih({},c.experimentValues.user,d),P.next=4;break;case 3:throw P.prev=3,E=P.catch(1),v=E instanceof Error?E.message:JSON.stringify(E),(m=(b=this.initOptions).updateUserCompletionCallback)===null||m===void 0||m.call(b,!1,v),E;case 4:if(g=!0,w=null,P.prev=5,this.dataAdapter.setBootstrapData(c.experimentValues),this.user=u,!this.user){P.next=6;break}return P.next=6,this.statsigClient.updateUserAsync(this.user);case 6:P.next=8;break;case 7:P.prev=7,S=P.catch(5),g=!1,w=String(S);case 8:if((s=this.initOptions)===null||s===void 0||(l=s.updateUserCompletionCallback)===null||l===void 0||l.call(s,g,w),!g){P.next=9;break}this.currentIdentifiers=n,this.currentAttributes=i,this.subscriptions.anyUpdated(),P.next=10;break;case 9:throw new Error("Failed to update user. An unexpected error occured.");case 10:case"end":return P.stop()}},a,this,[[1,3],[5,7]])}));function r(a,o,n){return t.apply(this,arguments)}return r})()},{key:"getPackageVersion",value:function(){return Bc}},{key:"getTargetApp",value:function(){var r;return(r=this.initOptions)===null||r===void 0?void 0:r.targetApp}},{key:"getLayer",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var o=a.fireLayerExposure,n=o===void 0?!0:o;return aE.fromLayer(this.statsigClient.getLayer(r,{disableExposureLog:!n}))}catch(i){return this.hasGetLayerErrorOccurred||(console.warn({msg:"An error has occurred getting the layer. Only the first occurrence of this error is logged.",layerName:r,error:i}),this.hasGetLayerErrorOccurred=!0),aE.fromLayer(Vn._makeLayer(r,{reason:"Error"},null))}}},{key:"getLayerValue",value:function(r,a,o){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=this.getLayer(r,n);try{var s=n.typeGuard;return i.get(a,o,s)}catch(l){return this.hasGetLayerValueErrorOccurred||(console.warn({msg:"An error has occurred getting the layer value. Only the first occurrence of this error is logged.",layerName:r,defaultValue:o,options:n,error:l}),this.hasGetLayerValueErrorOccurred=!0),o}}}])})(),Ke,Ct=(function(){function e(){ur(this,e)}return dr(e,null,[{key:"isGateExists",value:function(r){return this.client.isGateExist(r)}},{key:"isExperimentExists",value:function(r){return this.client.isExperimentExist(r)}}])})();Ke=Ct;me(Ct,"client",new nA);me(Ct,"hasCheckGateErrorOccurred",!1);me(Ct,"hasGetExperimentValueErrorOccurred",!1);me(Ct,"checkGate",function(e,t){try{if(typeof window<"u"&&window.__CRITERION__&&typeof window.__CRITERION__.getFeatureFlagOverride=="function"){var r=window.__CRITERION__.getFeatureFlagOverride(e);if(r!==void 0)return r}}catch(a){Ke.hasCheckGateErrorOccurred||(console.warn({msg:"An error has occurred checking the feature gate from criterion override. Only the first occurrence of this error is logged.",gateName:e,error:a}),Ke.hasCheckGateErrorOccurred=!0)}return Ke.client.checkGate(e,t)});me(Ct,"getExperimentValue",function(e,t,r,a){try{if(typeof window<"u"&&window.__CRITERION__&&typeof window.__CRITERION__.getExperimentValueOverride=="function"){var o=window.__CRITERION__.getExperimentValueOverride(e,t);if(o!=null)return o}}catch(n){return Ke.hasGetExperimentValueErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment value from criterion override. Only the first occurrence of this error is logged.",experimentName:e,defaultValue:r,options:a,error:n}),Ke.hasGetExperimentValueErrorOccurred=!0),r}return Ke.client.getExperimentValue(e,t,r,a)});me(Ct,"initializeCalled",Ke.client.initializeCalled.bind(Ke.client));me(Ct,"initializeCompleted",Ke.client.initializeCompleted.bind(Ke.client));me(Ct,"waitUntilInitializeCompleted",Ke.client.waitUntilInitializeCompleted.bind(Ke.client));me(Ct,"initialize",Ke.client.initialize.bind(Ke.client));me(Ct,"initializeWithProvider",Ke.client.initializeWithProvider.bind(Ke.client));me(Ct,"initializeFromValues",Ke.client.initializeFromValues.bind(Ke.client));me(Ct,"manuallyLogGateExposure",Ke.client.manuallyLogGateExposure.bind(Ke.client));me(Ct,"getExperiment",Ke.client.getExperiment.bind(Ke.client));me(Ct,"manuallyLogExperimentExposure",Ke.client.manuallyLogExperimentExposure.bind(Ke.client));me(Ct,"manuallyLogLayerExposure",Ke.client.manuallyLogLayerExposure.bind(Ke.client));me(Ct,"shutdownStatsig",Ke.client.shutdownStatsig.bind(Ke.client));me(Ct,"overrideGate",Ke.client.overrideGate.bind(Ke.client));me(Ct,"clearGateOverride",Ke.client.clearGateOverride.bind(Ke.client));me(Ct,"overrideConfig",Ke.client.overrideConfig.bind(Ke.client));me(Ct,"clearConfigOverride",Ke.client.clearConfigOverride.bind(Ke.client));me(Ct,"setOverrides",Ke.client.setOverrides.bind(Ke.client));me(Ct,"getOverrides",Ke.client.getOverrides.bind(Ke.client));me(Ct,"clearAllOverrides",Ke.client.clearAllOverrides.bind(Ke.client));me(Ct,"isCurrentUser",Ke.client.isCurrentUser.bind(Ke.client));me(Ct,"onGateUpdated",Ke.client.onGateUpdated.bind(Ke.client));me(Ct,"onExperimentValueUpdated",Ke.client.onExperimentValueUpdated.bind(Ke.client));me(Ct,"onAnyUpdated",Ke.client.onAnyUpdated.bind(Ke.client));me(Ct,"updateUser",Ke.client.updateUser.bind(Ke.client));me(Ct,"updateUserWithProvider",Ke.client.updateUserWithProvider.bind(Ke.client));me(Ct,"updateUserWithValues",Ke.client.updateUserWithValues.bind(Ke.client));me(Ct,"getPackageVersion",Ke.client.getPackageVersion.bind(Ke.client));me(Ct,"getTargetApp",Ke.client.getTargetApp.bind(Ke.client));me(Ct,"getLayer",Ke.client.getLayer.bind(Ke.client));me(Ct,"getLayerValue",Ke.client.getLayerValue.bind(Ke.client));var Db=Ct;if(typeof window<"u")if(window.__FEATUREGATES_JS__===void 0)window.__FEATUREGATES_JS__=Ct;else{var zg,Mm;Db=window.__FEATUREGATES_JS__;var hE=((zg=Db)===null||zg===void 0||(Mm=zg.getPackageVersion)===null||Mm===void 0?void 0:Mm.call(zg))||"4.10.0 or earlier";if(hE!==Bc){var oA=`Multiple versions of FeatureGateClients found on the current page.
|
|
12
12
|
The currently bound version is `.concat(hE," when module version ").concat(Bc," was loading.");console.warn(oA)}}var vc,mc,iA=(globalThis==null||(vc=globalThis.process)===null||vc===void 0||(vc=vc.env)===null||vc===void 0?void 0:vc.JEST_WORKER_ID)!==void 0,sA=!iA&&(globalThis==null||(mc=globalThis.process)===null||mc===void 0||(mc=mc.env)===null||mc===void 0?void 0:mc.NODE_ENV)!=="production",lA=function(){var t;sA&&(t=console).debug.apply(t,arguments)},I0={},cA="@atlaskit/platform-feature-flags",Th="__PLATFORM_FEATURE_FLAGS__",L3=typeof process<"u"&&typeof I0<"u",uA=L3?I0.ENABLE_PLATFORM_FF==="true":!1,dA=L3?I0.STORYBOOK_ENABLE_PLATFORM_FF==="true":!1,hA=uA||dA,gA={booleanResolver:void 0},Rh=typeof window<"u"?window:globalThis;Rh[Th]=Rh[Th]||gA;function fA(e){if(hA)return lA('[%s]: The feature flags were enabled while running tests. The flag "%s" will be always enabled.',cA,e),!0;try{var t,r,a;if(((t=Rh[Th])===null||t===void 0?void 0:t.booleanResolver)===void 0||((r=Rh[Th])===null||r===void 0?void 0:r.booleanResolver)===null)return Db.checkGate(e);var o=(a=Rh[Th])===null||a===void 0?void 0:a.booleanResolver(e);return typeof o!="boolean"?(console.warn("".concat(e," resolved to a non-boolean value, returning false for safety")),!1):o}catch{return!1}}function wr(e){return fA(e)}function U3(e){return e===0?!1:e===1?!0:Math.random()*e<=1}var Ja,pA="fy25.02";function xo(){return Ja}var gE=function(t){return Array.isArray(t)&&t.length>0};function vA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";try{var t;if(!Ja)return[];if((t=Ja.vc)!==null&&t!==void 0&&t.enabled){var r,a,o=(r=Ja.vc)!==null&&r!==void 0?r:{},n=o.enabledVCRevisions;if(gE(n==null||(a=n.byExperience)===null||a===void 0?void 0:a[e])){var i;return(i=n.byExperience)===null||i===void 0?void 0:i[e]}return gE(n?.all)?n.all:[pA]}return[]}catch{return[]}}function Jr(e,t){return vA(t).includes(e)}function mA(e,t){try{if(!Ja)return 0;var r=Ja,a=r.killswitch,o=r.rates,n=r.rules,i=r.kind,s=r.autoGeneratedRate;if(a!=null&&a.includes(e))return 0;if(o!=null&&o[e]!=null)return o[e];if(n!=null)for(var l=0;l<n.length;l++){var c=n[l],u=c.test,d=c.rate;if(u!=null&&d!=null){var m=new RegExp(u,"ig");if(m.test(e))return d}}var b=e?.startsWith("auto-generated");if(b){var v=s;if(v!=null)return v}if(i!=null){var g=i[t];if(g!=null)return g}return 0}catch{return 0}}function bA(e){try{if(!Ja)return 0;var t=Ja,r=t.capability;if(r!=null){var a=r[e];if(a!=null)return a}return 0}catch{return 0}}function yA(){try{if(!Ja)return[];var e=Ja,t=e.awaitBM3TTI;return t??[]}catch{return[]}}function kA(){try{if(!Ja)return;var e=Ja,t=e.doNotAbortActivePressInteraction;return t}catch{return}}var Fm=60*1e3;function wA(e){try{if(!Ja)return Fm;var t=Ja,r=t.interactionTimeout;return r!=null&&r[e]!=null?r[e]:r!=null&&r.__globalInteractionTimeout!=null?r.__globalInteractionTimeout:Fm}catch{return Fm}}var T0={context:null};function EA(){return Array.from(new Array(16),function(){return Math.floor(Math.random()*16).toString(16)}).join("")}function SA(e,t){_A(e.replace(/-/g,""),EA(),t)}function _A(e,t,r){T0.context={traceId:e,spanId:t,type:r}}function CA(){return T0.context||void 0}function xA(){T0.context=null}var PA=new Set,OA=(function(){function e(){ur(this,e),me(this,"_current",null)}return dr(e,[{key:"current",get:function(){return this._current},set:function(r){var a=this._current;this._current=r,a!==r&&PA.forEach(function(o){return o(r)})}}])})(),IA=function(){if(globalThis.__UFO_DEFAULT_INTERACTION_ID__)return globalThis.__UFO_DEFAULT_INTERACTION_ID__;var t=new OA;return globalThis.__UFO_DEFAULT_INTERACTION_ID__=t,t},B3=IA(),TA=function(){return B3},Lm={},Cd={},fE;function H3(){if(fE)return Cd;fE=1,Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.bind=void 0;function e(t,r){var a=r.type,o=r.listener,n=r.options;return t.addEventListener(a,o,n),function(){t.removeEventListener(a,o,n)}}return Cd.bind=e,Cd}var nl={},pE;function RA(){if(pE)return nl;pE=1;var e=nl&&nl.__assign||function(){return e=Object.assign||function(n){for(var i,s=1,l=arguments.length;s<l;s++){i=arguments[s];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(n[c]=i[c])}return n},e.apply(this,arguments)};Object.defineProperty(nl,"__esModule",{value:!0}),nl.bindAll=void 0;var t=H3();function r(n){if(!(typeof n>"u"))return typeof n=="boolean"?{capture:n}:n}function a(n,i){if(i==null)return n;var s=e(e({},n),{options:e(e({},r(i)),r(n.options))});return s}function o(n,i,s){var l=i.map(function(c){var u=a(c,s);return(0,t.bind)(n,u)});return function(){l.forEach(function(u){return u()})}}return nl.bindAll=o,nl}var vE;function AA(){return vE||(vE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bindAll=e.bind=void 0;var t=H3();Object.defineProperty(e,"bind",{enumerable:!0,get:function(){return t.bind}});var r=RA();Object.defineProperty(e,"bindAll",{enumerable:!0,get:function(){return r.bindAll}})})(Lm)),Lm}var sf=AA(),xd=[],Um=0;function DA(e,t){if(xd.length===0)return"visible";for(var r=xd.length,a="mixed",o=Um,n=Um,i=0;i<r;i++){var s=(Um+i)%r;xd[s].time<=t&&(n=s,xd[s].time<=e&&(o=s))}return n-o===0&&(xd[o].hidden?a="hidden":a="visible"),a}var bc={wheel:"wheel",keydown:"keydown",resize:"resize"};function z3(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.document,t;try{t=e.documentElement.clientWidth||0}catch{t=0}return Math.max(t,window.innerWidth||0)}function V3(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.document,t;try{t=e.documentElement.clientHeight||0}catch{t=0}return Math.max(t,window.innerHeight||0)}function NA(e,t,r){var a=sf.bind(e,{type:bc.wheel,listener:function(s){r(bc.wheel,s.timeStamp)},options:{passive:!0,once:!0}}),o=sf.bind(e,{type:bc.keydown,listener:function(s){r(bc.keydown,s.timeStamp)},options:{once:!0}}),n=sf.bind(e,{type:bc.resize,listener:function(s){(z3()!==t.w||V3()!==t.h)&&(r(bc.resize,s.timeStamp),n())}});return[a,o,n]}function mE(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=MA(e))||t){r&&(e=r);var a=0,o=function(){};return{s:o,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(c){throw c},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|