var e,t,n,r,i,o,a,s,c,u,l,f,h,d,p,_,m=Symbol.for("pv"),v={},y=[],g=/^m(i|n|o|s|text|space)$/,b=Array.isArray,w=y.slice,S=Object.assign;function x(e){e&&e.parentNode&&e.remove()}function E(e,t,n){var r,i,o,a={},s=arguments.length;for(o in t)"key"==o?r=t[o]:"ref"==o&&"function"!=typeof e?i=t[o]:a[o]=t[o];return s>2&&(a.children=s>3?w.call(arguments,2):n),A(e,a,r,i,null)}function k(e,t,n){var r,i,o,a=S({},e.props),s=arguments.length;for(o in t)"key"==o?r=t[o]:"ref"==o&&"function"!=typeof e.type?i=t[o]:a[o]=t[o];return s>2&&(a.children=s>3?w.call(arguments,2):n),A(e.type,a,void 0!==r?r:e.key,void 0!==i?i:e.ref,null)}function A(n,r,i,o,a){var s={type:n,props:r,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:m,__v:a||++t,__i:-1,__u:0};return!a&&e.vnode&&e.vnode(s),s}function P(){return{current:null}}function C(e){return e.children}function N(e,t){this.props=e,this.context=t,this.__g=0}function T(e,t){if(null==t)return e.__&&T(e.__,e.__i+1);for(var n;tt&&r.sort(a),e=r.shift(),t=r.length,8&e.__g&&$(e)}finally{(o=r.length)&&(i||queueMicrotask)(U)}}function D(e,t,n,r,i,o,a,s,c,u,l){var f,h,d,p,_,g,w=r.__k||y,S=t.length;for(c=function(e,t,n,r,i){var o,a,s,c,u,l,f,h,d,p=n.length,_=p,v=0,y=0,g=e.__k=Array(i);for(o=0;oc?v--:v++,y=1)):(~u||(i>p?v--:i>1](c?1:0)){for(i=n-1;i>=0;i--)if((s=t[i])&&!(2&s.__u)&&o==s.key&&a==s.type)return i;for(i=n+1;i=n.__.length&&n.__.push({}),n.__[e]}function le(e){return Y=1,fe(Ne,e)}function fe(e,t,n){var r=ue(h++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ne(void 0,t),function(e){var t=(r.__N||r.__)[0],n=r.t(t,e);X(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=d,!d.__f)){d.__f=!0;var i=d.shouldComponentUpdate;d.shouldComponentUpdate=function(e,t,n){var r=this.__H;if(!r)return!0;var o=!1,a=this.props!=e;if(r.__.some(function(e){e.__N&&(o=!0,X(e.__[0],e.__N[0])||(a=!0))}),i){var s=i.call(this,e,t,n);return o?s||a:s}return!o||a}}return r.__}function he(e,t){var n=ue(h++,3);!ne.__s&&Ce(n.__H,t)&&(n.__P=!0,n.__=e,n.u=t,d.__H.__h.push(n))}function de(e,t){var n=ue(h++,4);!ne.__s&&Ce(n.__H,t)&&(n.__P=!1,n.__=e,n.u=t,d.__h.push(n))}function pe(e){return Y=5,me(function(){return{current:e}},[])}function _e(e,t,n){Y=6,de(function(){if("function"==typeof e){var n=e(t());return function(){e(null),"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))}function me(e,t){var n=ue(h++,7);return Ce(n.__H,t)&&(n.__=e(),n.__H=t),n.__}function ve(e,t){return Y=8,me(function(){return e},t)}function ye(e){var t=d.context[e.__c],n=ue(h++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(d)),t.props.value):e.__}function ge(e,t){ne.useDebugValue&&ne.useDebugValue(t?t(e):e)}function be(e){var t=ue(h++,10),n=le();return t.__=e,d.componentDidCatch||(d.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){return n[1]()}]}function we(){var e=ue(h++,11);if(!e.__){for(var t=d.__v;!t.__m&&t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Se(){var e;do{for(;e=te.shift();)try{Ae(e)}catch(t){ne.__e(t,{__:(e=e.__P)&&e.__v})}for(;e=ee.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ae),t.__h.some(Pe),t.__h=[]}catch(Re){t.__h=[],ne.__e(Re,e.__v)}}}while(te.length)}ne.__b=function(e){d=null,re&&re(e)},ne.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ce&&ce(e,t)},ne.__r=function(e){ie&&ie(e),h=0;var t=(d=e.__c).__H;t&&(p==d?d.__h=[]:(t.__h.some(Ae),t.__h.some(Pe),h=0),t.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})),p=d},ne.diffed=function(e){oe&&oe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&ke(ee.push(t)),t.__H.__.some(function(e){e.u&&(e.__H=e.u)})),p=d=null},ne.__c=function(e,t){t.some(function(e){try{e.__h.some(Ae),e.__h=e.__h.filter(function(e){return!e.__||Pe(e)})}catch(t){e.__h=[function(){throw t}]}}),ae&&ae(e,t)},ne.unmount=function(e){se&&se(e);var t,n,r=e.__c;r&&r.__H&&(r.__H.__.some(function(r){try{if(r.__P&&r.__c){if(void 0===n){for(n=e.__;n&&(!n.__c||!n.__c.__P);)n=n.__;n=n&&n.__c}r.__P=n,ke(te.push(r))}else Ae(r)}catch(e){t=e}}),r.__H=void 0,t&&ne.__e(t,r.__v))};var xe="function"==typeof requestAnimationFrame;function Ee(e){var t,n=function(){clearTimeout(r),xe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);xe&&(t=requestAnimationFrame(n))}function ke(e){1!=e&&_==ne.requestAnimationFrame||((_=ne.requestAnimationFrame)||Ee)(Se)}function Ae(e){var t=d,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),d=t}function Pe(e){var t=d;e.__c=e.__(),d=t}function Ce(e,t){return!e||e.length!=t.length||t.some(function(t,n){return!X(t,e[n])})}function Ne(e,t){return"function"==typeof t?t(e):t}var Te,$e=Symbol.for("preact-signals");function Oe(){if(Ie>1)Ie--;else{var e,t=!1;for(function(){var e=qe;for(qe=void 0;void 0!==e;){var t=e.S;if(t.v===e.v)for(var n=t.t;void 0!==n;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}}();void 0!==Me;){var n=Me;for(Me=void 0,je++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&ze(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(je=0,Ie--,t)throw e}}function Re(e){if(Ie>0)return e();Fe=++Le,Ie++;try{return e()}finally{Oe()}}var Ue=void 0;function De(e){var t=Ue,n=Te;Ue=void 0,Te=void 0;try{return e()}finally{Ue=t,Te=n}}var Me=void 0,Ie=0,je=0,Le=0,Fe=0,qe=void 0,Be=0;function He(e){if(void 0!==Ue){var t=e.n;if(void 0===t||t.t!==Ue)return t={i:0,S:e,p:Ue.s,n:void 0,t:Ue,e:void 0,x:void 0,r:t},void 0!==Ue.s&&(Ue.s.n=t),Ue.s=t,e.n=t,32&Ue.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=Ue.s,t.n=void 0,Ue.s.n=t,Ue.s=t),t}}function Ke(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function We(e,t){return new Ke(e,t)}function ze(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Ge(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function Ve(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function Je(e,t){Ke.call(this,void 0,t),this.x=e,this.s=void 0,this.g=Be-1,this.f=4}function Ze(e,t){return new Je(e,t)}function Qe(e){var t=e.j;if(e.j=void 0,"function"==typeof t){Ie++;var n=Ue;Ue=void 0;try{t()}catch(Oe){throw e.f&=-2,e.f|=8,Xe(e),Oe}finally{Ue=n,Oe()}}}function Xe(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Qe(e)}function Ye(e){if(Ue!==this)throw new Error("Out-of-order effect");Ve(this),Ue=e,this.f&=-2;try{8&this.f&&Xe(this)}finally{Oe()}}function et(e,t){this.x=e,this.j=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name,Te&&Te.push(this)}function tt(e,t){var n=new et(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}function nt(e){return function(){var t=arguments,n=this;return Re(function(){return De(function(){return e.apply(n,[].slice.call(t))})})}}Ke.prototype.brand=$e,Ke.prototype.h=function(){return!0},Ke.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:De(function(){var e;null==(e=t.W)||e.call(t)}))},Ke.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&De(function(){var e;null==(e=t.Z)||e.call(t)}))}},Ke.prototype.subscribe=function(e){var t=this;return tt(function(){var n=t.value;De(function(){return e(n)})},{name:"sub"})},Ke.prototype.valueOf=function(){return this.value},Ke.prototype.toString=function(){return this.value+""},Ke.prototype.toJSON=function(){return this.value},Ke.prototype.peek=function(){var e=this;return De(function(){return e.value})},Object.defineProperty(Ke.prototype,"value",{get:function(){var e=He(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(je>100)throw new Error("Cycle detected");!function(e){0!==Ie&&0===je&&e.l!==Fe&&(e.l=Fe,qe={S:e,v:e.v,i:e.i,o:qe})}(this),this.v=e,this.i++,Be++,Ie++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{Oe()}}}}),Je.prototype=new Ke,Je.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===Be)return!0;if(this.g=Be,this.f|=1,this.i>0&&!ze(this))return this.f&=-2,!0;var e=Ue;try{Ge(this),Ue=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return Ue=e,Ve(this),this.f&=-2,!0},Je.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}Ke.prototype.S.call(this,e)},Je.prototype.U=function(e){if(void 0!==this.t&&(Ke.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},Je.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(Je.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=He(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),et.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.j=t)}finally{e()}},et.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Qe(this),Ge(this),Ie++;var e=Ue;return Ue=this,Ye.bind(this,e)},et.prototype.N=function(){2&this.f||(this.f|=2,this.u=Me,Me=this)},et.prototype.d=function(){this.f|=8,1&this.f||Xe(this)},et.prototype.dispose=function(){this.d()};var rt,it,ot,at=function(e,t){t.push(e);for(var n="[object Object]"===Object.prototype.toString.call(e),r=Object.create(null),i=e;i&&i!==Object.prototype;i=n&&Object.getPrototypeOf(i)){var o=Object.getOwnPropertyDescriptors(i);for(var a in o)if(!r[a]){r[a]=!0;var s=o[a].value;"function"==typeof s?"constructor"!==a&&(e[a]=nt(s)):i===e&&"object"==typeof s&&null!==s&&!("brand"in s)&&t.indexOf(s)<0&&at(s,t)}}};function st(e){return function(){var t,n,r=function(){var e=Te;return Te=[],function(){var t=Te;return Te&&e&&(e=e.concat(Te)),Te=e,t}}();try{n=e.apply(void 0,[].slice.call(arguments))}catch(e){var i=Te;if(Te=void 0,i)try{Re(function(){for(var e=0;e0?` (exports: ${t.join(", ")})`:""),exports:t}}(e);super(`${n} resolved to ${r}`),this.name="MissingDefaultExportError",this.exports=i}};var At={}.hasOwnProperty;function Pt(...e){let t="";for(const n of e)n&&(t=Nt(t,Ct(n)));return t}function Ct(e){if("string"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return Pt(...e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();let t="";for(const n in e)At.call(e,n)&&e[n]&&(t=Nt(t,n));return t}function Nt(e,t){return t?e?`${e} ${t}`:t:e}function Tt(e,t){return`${e}${"number"==typeof t?String(t):`${t[0].toUpperCase()}${t.substring(1)}`}`}var $t,Ot,Rt=function(e,t,n){return null==e?null:I(I(e).map(t.bind(n)))},Ut={map:Rt,forEach:Rt,count:function(e){return e?I(e).length:0},only:function(e){var t=I(e);if(1!=t.length)throw"Children.only";return t[0]},toArray:I},Dt=Object.assign,Mt=/^(-|f[lo].*[^se]$|g.{5,}[^ps]$|z|o[pr]|(W.{5})?[lL]i.*(t|mp)$|an|(bo|s).{4}Im|sca|m.{6}[ds]|ta|c.*[st]$|wido|ini|asp|fill|st)/,It=Symbol.for("react.forward_ref");function jt(e){function t(t){var n=Dt({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=It,t.render=e,t.prototype.isReactComponent=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}function Lt(e,t){function n(e){var n=this.props.ref;return n!=e.ref&&n&&("function"==typeof n?n(null):n.current=null),t?!t(this.props,e)||n!=e.ref:function(e,t){for(var n in e)if("__source"!=n&&e[n]!==t[n])return!0;for(var r in t)if("__source"!=r&&!(r in e))return!0;return!1}(this.props,e)}function r(t){return this.shouldComponentUpdate=n,E(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.type=e,r}function Ft(e,t){var n=function(e,t){return A(Q,{__P:t,children:e})}(e,t);return n.containerInfo=t,n}var qt=Symbol.for("react.element"),Bt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(?!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ht=/[A-Z0-9]/g,Kt=typeof document<"u",Wt=Qt(function(t,n,r){var i=e.__s||$t?(r||n)():n(),o=le({t:{__:i,u:n}}),a=o[0].t,s=o[1];return de(function(){a.__=i,a.u=n,zt(a)&&s({t:a})},[t,i,n]),he(function(){return zt(a)&&s({t:a}),t(function(){zt(a)&&s({t:a})})},[t]),i});function zt(e){try{return!Object.is(e.__,e.u())}catch(e){return!0}}var Gt=function(e){return/fil|che|rad/.test(e)};N.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(N.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Vt=e.event;e.event=function(e){return Vt&&(e=Vt(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Jt={configurable:!0,get:function(){return this.class}},Zt=e.vnode;function Qt(t){if(!Ot){Ot=!0;var n=e.__r;e.__r=function(e){n&&n(e),32&e.__u&&($t=e),e.__c};var r=e.diffed;e.diffed=function(e){r&&r(e),$t==e&&($t=null)}}return t}e.vnode=function(e){if("string"==typeof e.type)!function(e){var t=e.props,n=e.type,r={},i=-1==n.indexOf("-");for(var o in t){var a=t[o];if(!("value"==o&&"defaultValue"in t&&null==a||Kt&&"children"==o&&"noscript"==n||"class"==o||"className"==o)){if("style"==o&&a&&a.constructor==Object){var s=void 0;for(var c in a)"number"!=typeof a[c]||Mt.test(c)||(s||(s=a=Dt({},a)),a[c]+="px")}else if("defaultValue"==o&&"value"in t&&null==t.value)o="value";else if("download"==o&&!0===a)a="";else if("translate"==o&&"no"===a)a=!1;else if("o"==o[0]&&"n"==o[1]){var u=o.toLowerCase();"ondoubleclick"==u?o="ondblclick":"onchange"!=u||"input"!=n&&"textarea"!=n||Gt(t.type)?"onfocus"==u?o="onfocusin":"onblur"==u&&(o="onfocusout"):u=o="oninput","oninput"==u&&r[o=u]&&(o="oninputCapture")}else i&&Bt.test(o)?o=o.replace(Ht,"-$&").toLowerCase():null===a&&(a=void 0);r[o]=a}}if("select"==n){var l=null!=r.defaultValue?r.defaultValue:r.multiple&&Array.isArray(r.value)?r.value:null;null!=l&&(r.value=I(t.children).forEach(function(e){e.props.selected=r.multiple?-1!=l.indexOf(e.props.value):l==e.props.value}))}t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Jt)):t.className&&(r.class=r.className=t.className),e.props=r}(e);else if("function"==typeof e.type&&("ref"in e.props&&"prototype"in e.type&&e.type.prototype.render&&(e.ref=e.props.ref,delete e.props.ref),e.type.defaultProps)){var t=Dt({},e.props);for(var n in e.type.defaultProps)void 0===t[n]&&(t[n]=e.type.defaultProps[n]);e.props=t}e.ref&&!("ref"in e.props)&&Object.defineProperty(e.props,"ref",{value:e.ref,configurable:!0,writable:!0}),e.$$typeof=qt,Zt&&Zt(e)};var Xt=Symbol.for("pv");function Yt(e,t,n){if(e){var r=e.__c&&e.__c.__H;r&&(r.__.forEach(function(e){null!=e.__P&&("function"==typeof e.__c&&e.__c(),e.__c=e.__H=void 0)}),r.__h=e.__c.__h=[]),"string"==typeof e.type&&(e.__u|=8),null!=(e=Dt({constructor:Xt},e)).__c&&(e.__c.__P==n&&(e.__c.__P=t),e.__c.__g|=4,e.__c=e.ref=null),e.__k=e.__k&&e.__k.map(function(e){return Yt(e,t,n)})}return e}function en(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return en(e,t,n)}),e.__c&&e.__c.__P==t&&(e.__e&&n.appendChild(e.__e),e.__c.__g|=4,e.__c.__P=n)),e}function tn(){function t(){this.__u=0,this.i=null,this.__b=null}return function(){var t=e.__e;e.__e=function(e,n,r,i){if(e&&e.then)for(var o,a=n;a=a.__;)if((o=a.__c)&&o.__c)return r&&!r.__c&&(n.__c.__H=void 0),o.__c(e,n);t(e,n,r,i)};var n=e.unmount;e.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),n&&n(e)}}(),(t.prototype=new N).__c=function(e,t){var n=this,r=t.__c;this.i??=[],this.i.push(r);var i=!1,o=function(){!i&&n.__P&&(i=!0,r.__R=null,s())};r.__R=o;var a=r.__P;r.__P=null;var s=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=en(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.i.pop();)t.__P=a,t.forceUpdate()}};this.__u++||32&t.__u||this.setState({__a:this.__b=this.__v.__k[0]}),e.then(o,o)},t.prototype.componentWillUnmount=function(){this.i=[],this.state.__a&&(this.__v.__k[0]=this.state.__a)},t.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Yt(this.__b,n,r.__O=r.__P)}this.__b=null}return[E(C,null,t.__a?null:e.children),t.__a&&E(C,null,e.fallback)]},t}var nn=tn();function rn(e){return!!e&&e.$$typeof===qt}function on(e){return rn(e)?k.apply(null,arguments):e}function an(e){return!!e.__k&&(V(null,e),!0)}var sn=function(t,n){var r,i=e.debounceRendering;e.debounceRendering=function(e){r=e};try{var o=t(n);return r&&r(),o}finally{e.debounceRendering=i}},cn=Symbol.for("pv"),un=0;function ln(t,n,r,i,o,a){n||(n={});var s,c,u=n;if("ref"in u&&"function"!=typeof t)for(c in u={},n)"ref"==c?s=n[c]:u[c]=n[c];var l={type:t,props:u,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:cn,__v:--un,__i:-1,__u:0};return(o||a)&&(l.__source=o,l.__self=a),e.vnode&&e.vnode(l),l}function fn(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function hn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r={};for(var i in e){var o=e[i],a=[...n,i];"string"==typeof o||"number"==typeof o||null==o?r[i]=t(o,a):"object"!=typeof o||Array.isArray(o)?console.warn('Skipping invalid key "'.concat(a.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(o)?"Array":typeof o,'"')):r[i]=hn(o,t,a)}return r}function dn(e,t){var n={};if("object"==typeof t){var r=e;hn(t,(e,t)=>{if(null!=e){var i=function(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}(r,t);n[fn(i)]=String(e)}})}else{var i=e;for(var o in i){var a=i[o];null!=a&&(n[fn(o)]=a)}}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(e=>"".concat(e,":").concat(this[e])).join(";")},writable:!1}),n}Array.isArray;var pn=class extends Error{constructor(...e){super(...e),this.name="TypescriptAssertionError"}};function _n(e){throw new pn(`Received unexpected value ${JSON.stringify(e)} in an exhaustive switch/conditional block`)}function mn(e){throw new pn(`Received unexpected value ${JSON.stringify(e)} in an exhaustive switch/conditional block`)}var vn=()=>e=>e,yn=function(e){return"function"==typeof e.children?e.children(e.v,e.i?e.i.value:void 0):e.children};function gn(e){var t="function"==typeof e.when?e.when():e.when.value;if(!t){var n=e.fallback;return"function"==typeof n?n():n||null}return E(yn,{v:t,children:e.children})}function bn(e){var t=me(function(){return new Map},[]),n="function"==typeof e.each?e.each():e.each,r=n instanceof Ke?n.value:n;if(!r.length){var i=e.fallback;return"function"==typeof i?i():i||null}var o=new Set(t.keys()),a=r.map(function(n,r){o.delete(n);var i=t.get(n);if(i)i.i.peek()!==r&&(i.i.value=r);else{var a=We(r),s=e.getKey?e.getKey(n,r):r;i={vnode:E(yn,{key:s,v:n,i:a,children:e.children}),i:a},t.set(n,i)}return i.vnode});return o.forEach(function(e){t.delete(e)}),E(C,null,a)}function wn(e){var t=_t(e);return t.name="useLiveSignal",t.peek()!==e&&(t.value=e),t}function Sn(e){var t=_t(e);return"current"in t||Object.defineProperty(t,"current",xn),t}yn.displayName="Item",gn.displayName="Show",bn.displayName="For";var xn={configurable:!0,get:function(){return this.value},set:function(e){this.value=e}};function En(e,t=2){return 1e3*Math.min(t**e,60)+Math.floor(100*Math.random())}function*kn(e=2,t=10){for(let n=1;n<=t;n++)yield En(n,e)}function An({initialDelay:e=2,maxAttempts:t=10}={}){return me(()=>{let n=kn(e,t);return{next:()=>n.next(),reset:()=>{n=kn(e,t)}}},[e,t])}var Pn=class extends Error{constructor(...e){super(...e),this.name="RetryError"}};async function Cn(e,{shouldRetry:t=Nn,maxAttempts:n=3,initialRetryDelay:r}={}){let i;for(let a=1;a<=n;a++){a>1&&await Tn(En(a-1,r));try{return await e()}catch(o){if(i=o,!t(o))break;console.warn(`Failed to execute action on attempt ${a} of ${n}.`)}}if(i instanceof Error)throw i;throw new Pn("Failed to execute action after retrying.",{cause:i})}function Nn(e){return null!=e}function Tn(e){return new Promise(t=>setTimeout(t,Math.max(e,0)))}function $n(e,{suspense:t,cacheErrors:n=!0}={}){const{id:r}=e,i=ve(()=>e.resolve({cacheErrors:n}),[e,n]),{snapshot:o,subscribe:a}=me(()=>({snapshot:()=>e.resolved,subscribe:t=>e.subscribe(t)}),[e]),s=Wt(a,o);if(t&&null==s)throw"undefined"==typeof window?new Promise(e=>{setTimeout(()=>{e(i())},10)}):new Promise(e=>{setTimeout(async()=>{e(await i())},0)});return s instanceof Error?{id:r,resolved:null,error:s,loading:!1,load:i}:{id:r,resolved:s,error:null,loading:null==s,load:i}}function On({name:e,fallback:t,children:n}){const r=me(()=>e?function(e){return`S${t=e,0===t.length?"0":Array.from(t,e=>e.codePointAt(0).toString(36)).join("_")}`;var t}(e):void 0,[e]);return void 0===r?ln(nn,{fallback:t,children:n}):ln(Rn,{namespace:r,fallback:t,children:n},r)}var Rn=class extends N{render(){const e=this.__v;return e&&(this.mask??=[this.props.namespace,0],e.__m=this.mask),ln(nn,{fallback:this.props.fallback,children:this.props.children})}};function Un({id:e,load:t,displayName:n,suspense:r=!0,suspenseName:i,renderLoading:o=Mn,renderError:a=Ln,useError:s,usePreload:c,usePrefetch:u}){const l=function({id:e,displayName:t,load:n}){let r,i,o=!0;const a=e?.(),s=a??t,c=new Set;return{get id(){return a},get resolved(){return r},resolve:async e=>{const t=e?.cacheErrors??!0;return i?o||=t:(o=t,i=async function(){let e=!1;try{return r=function(e,t){if(null==e)throw new kt(e,t);if("object"!=typeof e)return e;if("default"in e){if(null==e.default)throw new kt(e,t);return e.default}if(n=e,"[object Module]"===Object.prototype.toString.call(n))throw new kt(e,t);var n;return e}(await n(),s),e=!0,u(),r}catch(t){const e=t instanceof Error?t:void 0;return o&&(r=e,u()),e}finally{e||(i=void 0,o=!0)}}()),i},subscribe:e=>(c.add(e),()=>{c.delete(e)})};function u(){for(const e of c)e(r)}}({id:e,displayName:n,load:t}),f=n??function(e){return e?jn.exec(e)?.[1]??In:In}(l.id);function h(e){const{resolved:t,load:n,loading:i,error:c}=$n(l,{suspense:r});if(s?.(c,e),c)return ln(C,{children:a(c,e)});let u=null;const f=t?ln(t,{...e}):null;return r?f:(u=i?o(e):f,ln(C,{children:[u,i&&ln(Fn,{load:n})]}))}function d(e){if(!r)return ln(h,{...e});const t=o(e)??null,n="function"==typeof i?i(e):i;return void 0===n?ln(nn,{fallback:t,children:ln(h,{...e})}):ln(On,{name:n,fallback:t,children:ln(h,{...e})})}function p(e){const{load:t}=$n(l,{cacheErrors:!1}),n=c?.(e);return ve(()=>(t(),n?.()??Dn),[t,n])}function _(e){const{load:t}=$n(l,{cacheErrors:!1}),n=u?.(e);return ve(()=>(t(),n?.()??Dn),[t,n])}function m(e){const t=p(e);return he(()=>t(),[t]),null}function v(e){const t=_(e);return he(()=>t(),[t]),null}h.displayName=`Suspender(${f})`,d.displayName=`Async(${f})`,m.displayName=`Async.Preload(${n})`,v.displayName=`Async.Prefetch(${n})`;const y=d;return Reflect.defineProperty(y,"load",{value:()=>l.resolve(),writable:!1}),Reflect.defineProperty(y,"preload",{value:()=>l.resolve({cacheErrors:!1}),writable:!1}),Reflect.defineProperty(y,"Preload",{value:m,writable:!1}),Reflect.defineProperty(y,"Prefetch",{value:v,writable:!1}),Reflect.defineProperty(y,"usePreload",{value:p,writable:!1}),Reflect.defineProperty(y,"usePrefetch",{value:_,writable:!1}),Reflect.defineProperty(y,"useLoadState",{value:function(){const e=Wt(l.subscribe,()=>l.resolved,()=>l.resolved);return e instanceof Error?"failed":null==e?"loading":"loaded"},writable:!1}),y}function Dn(){}function Mn(){return null}var In="Component",jn=/([^/]*)\.\w+$/;function Ln(e){return null}function Fn({load:e}){return he(()=>{e()},[e]),null}function qn({url:e,method:t="POST",credentials:n,headers:r,source:i,explicitSearchParams:o={},maxGetQueryStringLength:a,onResult:s,onError:c,onInvalidHeader:u,fetch:l=globalThis.fetch}){return async f=>{const h=performance.now(),d=new Headers;Bn(d,"function"==typeof r?r(f):r,u),Bn(d,f.additionalHeaders,u);let p="function"==typeof t?t(f):t;const _=("function"==typeof i?i(f):i)??"GET"!==p;d.has("Content-Type")||d.set("Content-Type","application/json"),d.has("Accept")||d.set("Accept","application/json"),d.set("Shopify-Checkout-Client","checkout-web/1.0");const m={method:p,headers:d,credentials:n,redirect:"manual",signal:f.signal},v=new URL("function"==typeof e?e(f):e);if(f.query.name&&v.searchParams.set("operationName",f.query.name),o&&Object.entries(o).forEach(([e,t])=>{v.searchParams.set(e,t)}),"GET"===p){const e=v.search;f.variables&&"{}"!==JSON.stringify(f.variables)&&v.searchParams.set("variables",JSON.stringify(f.variables)),_?v.searchParams.set("query",f.query.source):v.searchParams.set("id",f.query.id),v.search.includes(";")&&(v.search=v.search.replace(/;/g,"%3B")),void 0!==a&&v.search.length>a&&(v.search=e,p="POST",m.method=p)}if("GET"!==p){const e={variables:f.variables,operationName:f.query.name};_?e.query=f.query.source:e.id=f.query.id,m.body=JSON.stringify(e)}const y=new Request(v,m),g=await l(y).catch(e=>e);try{if(g instanceof Error)throw new Wn(g);if(!g.ok){if(400===g.status)throw new Vn(g,f.query.name);throw new Gn(g,f.query.name)}const e=g.headers.get("Content-Type")??"missing";if(!e.includes("application/json"))throw new Jn(g,e,(await g.text()).substring(0,200),f.query.name);let t;try{t=await g.json()}catch(b){throw new Zn(g,v.toString(),f.query.name,b)}const{data:n,errors:r}=t;let i;i=null!=r&&r.length>0?{data:void 0,error:new Hn(r,void 0,n??void 0)}:null==n?{data:void 0,error:new Hn([{name:"NoDataError",message:"No data returned by GraphQL"}],"GraphQLExecutionError::NoDataReturned")}:{data:n,error:void 0};const o=performance.now();return s?.({...f,request:y,response:g,result:i,start:h,end:o,duration:o-h}),i}catch(b){const e=performance.now();throw c?.({...f,request:y,response:g instanceof Error?void 0:g,error:b,start:h,end:e,duration:e-h}),b}}}function Bn(e,t={},n){const r=(t,r)=>{try{e.delete(r),e.set(r,t)}catch(i){if(!(i instanceof TypeError))throw i;n?.(r)}};t instanceof Headers?t.forEach(r):Array.isArray(t)?t.forEach(([e,t])=>r(t,e)):Object.entries(t).forEach(([e,t])=>r(t,e))}var Hn=class extends Error{constructor(e,t,n){const r=JSON.stringify(e.map(({message:e})=>e),null,2);var i;super(`GraphQL execution failed with errors: ${r}`),this.errors=e,this.data=n,this.name="GraphQLExecutionError",this.groupingHash=t??(i=r,[{pattern:/syntax error/i,hash:"graphql_parsing_error"},{pattern:/No operation named/i,hash:"graphql_missing_operation_error"},{pattern:/Variable.*geolocation\.countryCode/i,hash:"invalid_country_code_error"},{pattern:/Variable.*coordinates\.(latitude|longitude)/i,hash:"invalid_coordinates_error"},{pattern:/Variable.*was provided invalid value/i,hash:"invalid_variable_error"},{pattern:/Cannot target merchandise with stableId/i,hash:"merchandise_stable_id_error"},{pattern:/Cannot return null for non-nullable field CreditCard/i,hash:"credit_card_field_error"},{pattern:/doesn't exist on type/i,hash:"graphql_undefined_field_error"},{pattern:/isn't a defined input type/i,hash:"graphql_undefined_input_type_error"},{pattern:/could not be composed from extendedFields/i,hash:"address_composition_error"},{pattern:/Invalid query string parameter/i,hash:"invalid_query_string_parameter_error"},{pattern:/Cannot return null for non-nullable field/i,hash:"graphql_non_nullable_field_error"},{pattern:/Field '[^']+' doesn't accept argument '[^']+'/i,hash:"graphql_unsupported_argument_error"},{pattern:/Cashback is temporarily unavailable/i,hash:"cashback_unavailable_error"},{pattern:/ProductVariantReferenceInput with invalid \w+ input:/i,hash:"invalid_product_variant_reference_error"},{pattern:/disclosureCountryCode is required when phoneNumber is present|(?:phoneNumber|value) is required when consentState is GRANTED/i,hash:"invalid_consent_input_error"},{pattern:/Invalid custom delivery strategy handle:/i,hash:"invalid_delivery_strategy_handle_error"},{pattern:/LineAllocation quantity \S+ is out of bounds/i,hash:"line_allocation_quantity_out_of_bounds_error"}].find(({pattern:e})=>e.test(i))?.hash??"generic_graphql_execution_error")}},Kn="GraphQL fetch failed with network failure:",Wn=class extends Error{constructor(e){super(`${Kn} ${e.message}`),this.error=e,this.name="GraphQLFetchNetworkError"}},zn=class extends Error{constructor(e){super(e),this.message=e,this.name="GraphQLFetchHttpBaseError"}getGroupingHash(e){const t=e??"UNKNOWN NAME";return[this.name,t].join(":")}},Gn=class extends zn{constructor(e,t){super(`GraphQL query [${t??"UNKNOWN NAME"}] fetch failed with status: ${e.status}`),this.response=e,this.queryName=t,this.name="GraphQLFetchHttpStatusError",this.groupingHash=this.getGroupingHash(t)}},Vn=class extends Gn{constructor(e,t){super(e,t),this.response=e,this.queryName=t,this.name="GraphQLFetchHttpBadRequestError",this.groupingHash=this.getGroupingHash(t)}},Jn=class extends zn{constructor(e,t,n,r){super(`GraphQL UnsupportedContentType ${t}: ${n}`),this.response=e,this.contentType=t,this.contentPreview=n,this.queryName=r,this.name="GraphQLFetchHttpContentTypeError",this.groupingHash=this.getGroupingHash(r)}},Zn=class extends zn{constructor(e,t,n,r){const i=r?` (${r.constructor.name}: ${r.message})`:"";super(`GraphQL JSON parse error for query [${n??"UNKNOWN NAME"}]: status ${e.status}, url ${t}${i}`),this.response=e,this.requestUrl=t,this.queryName=n,this.name="GraphQLFetchJsonParseError",this.groupingHash=this.getGroupingHash(n)}};function Qn(e){"undefined"!=typeof window&&("function"==typeof window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,0))}function Xn(e){const t=pe(!1);t.current||(t.current=!0,Qn(()=>{Promise.resolve(e()).catch(()=>{})}))}function Yn(e){let t=!1;const n=()=>{t||(t=!0,document.removeEventListener("visibilitychange",n),e())};"hidden"!==document.visibilityState?(document.addEventListener("visibilitychange",n),requestAnimationFrame(()=>setTimeout(n,0))):n()}var er=["ac","ah","ba","bin","cn","do","e","md","o","pc","sim","uc"],tr="(?[a-z]{2,3}|zh-hans|zh-hant)(?:-(?[a-zA-Z0-9]+))?",nr=new RegExp(`^${tr}$`),rr=`/(?[a-zA-Z0-9=\\-_]+)(?:/(?${tr}))?(?:/(?[^/]+))?`;function ir(e){return`(?${e.join("|")})${rr}`}var or=ir(er.filter(e=>"uc"!==e)),ar=ir(["uc"]),sr=new RegExp(`^/checkouts/${or}/?$`),cr=new RegExp(`^/checkout/(?[0-9]+)/${or}/?$`),ur=new RegExp(`^/checkouts/${ar}/?$`),lr=new RegExp("^/checkout/(?[0-9]+)/(?spe)(?:/(?[a-zA-Z0-9=\\-_]+)?)?(?:/(?[^/]+)?)?/?$");function fr(e,t){const n=function(e,{isShopPayActive:t,isShopPayExternal:n}){return t?n?e.match(lr):e.match(cr)??e.match(ur):e.match(sr)}(e.pathname,t);if(!n)return;const{shopId:r,sourceType:i,sourceId:o,route:a,locale:s}=n.groups??{};let c;if("spe"===i)c={type:i,id:o};else{const e=er.find(e=>e===i);if(!e||void 0===o)return;c={type:e,id:"o"!==e||(u=o,u&&/^[a-f0-9]{32}$/i.test(u))?o:`gid://shopify/Order/${o}`}}var u;const l=r?{id:r}:void 0,f=e.searchParams.get("locale")??void 0;let h;return hr(f)?h=f:hr(s)&&(h=s),{shop:l,source:c,route:`/${a??""}`,locale:h,shopPaySimulated:"sim"===c.type&&e.searchParams.has("shop_pay_sim")}}function hr(e){return!!e&&nr.test(e)}function dr(e){return pr.get(e)??2}var pr=new Map([["BHD",3],["BIF",0],["BYR",0],["CLF",4],["CLP",0],["DJF",0],["GNF",0],["HUF",2],["IQD",3],["ISK",0],["JOD",3],["JPY",0],["KMF",0],["KRW",0],["KWD",3],["LYD",3],["MGA",2],["MRO",5],["OMR",3],["PYG",0],["RWF",0],["TND",3],["UGX",0],["VND",0],["VUV",0],["XAF",0],["XAG",0],["XAU",0],["XBA",0],["XBB",0],["XBC",0],["XBD",0],["XDR",0],["XOF",0],["XPD",0],["XPF",0],["XPT",0],["XTS",0]]);function _r(e){return e.replace(/\s*[A-Z]{3}\s*/g,"")}function mr(e,t={},n){const r="he"===n.locale.split("-")[0],i=e<0||Object.is(e,-0),o=br(t.currency||n.currency||"",n),a=wr(n,t),s=_r(n.numberFormatter({style:"currency",maximumFractionDigits:a,minimumFractionDigits:a,currencyDisplay:"code",...t}).format(t.spacedMinusSign&&!r?Math.abs(e):e)),c=o.prefixed&&/^[A-Za-z]+$/.test(o.symbol)?" ":"",u=o.prefixed?`${o.symbol}${c}${s}`:`${s} ${o.symbol}`,l=t.spacedMinusSign?"− ":"-";return i&&r?u.replace("−","-").replace("-",l):i?`${l}${u.replace("-","").replace("−","")}`:u}function vr(e,t={},n){const r=mr(e,t,n),i=t.currency||n.currency||"";return gr(i,r)?r:`${r} ${i}`}var yr={SRD:{symbol:"SRD",prefixed:!0,explicit:!0},TRY:{symbol:"TL",prefixed:!1,explicit:!0},CHF:{symbol:"CHF",explicit:!0},KGS:{symbol:"лв",prefixed:!0}};function gr(e,t){return!0===yr[e]?.explicit||null!=t&&t.includes(e)}function br(e,t){const n=e||t.currency,r=yr[n];if(void 0!==r?.prefixed)return{symbol:r.symbol,prefixed:r.prefixed};const i=n.substring(0,2),o=wr(t),a=t.numberFormatter({currency:n,style:"currency",currencyDisplay:"narrowSymbol",maximumFractionDigits:o,minimumFractionDigits:o}).format(0).replace(/[\u200E\u200F]/g,""),s=t.numberFormatter({currency:n,style:"currency",currencyDisplay:"code",maximumFractionDigits:o,minimumFractionDigits:o}).format(0).replace(/[\u200E\u200F]/g,"");if(r&&a!==s)return{symbol:r.symbol,prefixed:s.startsWith(n)};if(a===s){const e=s.replace(n,"").trim();return{symbol:s.replace(e,"").trimStart(),prefixed:s.startsWith(n)}}const c=s.replace(n,"").trim(),u=a.replace(c,"").trimStart(),l=a.startsWith(u);return{symbol:u.replace(i,""),prefixed:l}}function wr(e,t={}){let n=t.precision;return void 0===n&&(n=dr((t.currency||e.currency||"").toUpperCase())),n}function Sr(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var xr=0;function Er(e){return"__private_"+xr+++"_"+e}function kr(e){return Object.entries(e).map(([e,t])=>({key:e,value:{stringValue:String(t)}}))}function Ar(e){if(Array.isArray(e))return{arrayValue:{values:e.map(e=>Ar(e))}};switch(typeof e){case"boolean":return{boolValue:Boolean(e)};case"number":return{doubleValue:Number(e)};default:return{stringValue:String(e)}}}var Pr=function(){const e=[0];for(let t=0;t<12;t++){const n=Math.floor(5*2**t);e.push(n)}return e}();function Cr(e){return"number"==typeof e&&Number.isFinite(e)}function Nr(e,t,n){throw new Error(`[OpenTelemetry] Invalid ${e} "${t}": value must be a finite number, got ${null===n?"null":typeof n}`)}var Tr=Er("exporter"),$r=Er("attributes"),Or=Er("metrics"),Rr=Er("logs"),Ur=class{constructor({exporter:e,attributes:t}){Object.defineProperty(this,Tr,{writable:!0,value:void 0}),Object.defineProperty(this,$r,{writable:!0,value:void 0}),Object.defineProperty(this,Or,{writable:!0,value:[]}),Object.defineProperty(this,Rr,{writable:!0,value:[]}),Sr(this,Tr)[Tr]=e,Sr(this,$r)[$r]=null!=t?t:{}}addAttributes(e){Sr(this,$r)[$r]={...Sr(this,$r)[$r],...e}}histogram({name:e,value:t,unit:n,description:r,bounds:i,attributes:o,scale:a,requiresKeepalive:s}){Cr(t)||Nr("histogram",e,t);const c=1e6*Date.now();i?Sr(this,Or)[Or].push({name:e,type:"histogram",value:t,unit:n,description:r,timeUnixNano:c,attributes:o,bounds:i,requiresKeepalive:s}):Sr(this,Or)[Or].push({name:e,type:"exponential_histogram",value:t,unit:n,description:r,timeUnixNano:c,attributes:o,scale:a,requiresKeepalive:s})}counter({name:e,value:t,unit:n,description:r,attributes:i,requiresKeepalive:o}){Cr(t)||Nr("counter",e,t);const a=1e6*Date.now();Sr(this,Or)[Or].push({name:e,type:"counter",value:t,unit:n,description:r,timeUnixNano:a,attributes:i,requiresKeepalive:o})}gauge({name:e,value:t,unit:n,description:r,attributes:i,requiresKeepalive:o}){Cr(t)||Nr("gauge",e,t);const a=1e6*Date.now();Sr(this,Or)[Or].push({name:e,type:"gauge",value:t,unit:n,description:r,timeUnixNano:a,attributes:i,requiresKeepalive:o})}log({body:e,attributes:t,requiresKeepalive:n}){const r=1e6*Date.now();Sr(this,Rr)[Rr].push({timeUnixNano:r,body:e,attributes:t,requiresKeepalive:n})}async exportMetrics(){Sr(this,Or)[Or].forEach(e=>{e.attributes={...Sr(this,$r)[$r],...e.attributes}});const e=Sr(this,Or)[Or];Sr(this,Or)[Or]=[],await this.exportByKeepalive(e,(e,t)=>Sr(this,Tr)[Tr].exportMetrics(this.aggregateMetrics(e),t))}async exportLogs(){const e=Sr(this,Rr)[Rr];Sr(this,Rr)[Rr]=[],await this.exportByKeepalive(e,(e,t)=>Sr(this,Tr)[Tr].exportLogs(this.formatLogs(e),t))}aggregateMetrics(e){const t={};return e.forEach(e=>{switch(e.type){case"histogram":!function(e,t){var n;const{name:r,value:i,unit:o,description:a,timeUnixNano:s,attributes:c}=t,u=null!==(n=t.bounds)&&void 0!==n?n:Pr,l=new Array(u.length+1).fill(0);e[r]||={name:r,unit:o||"1",description:a,histogram:{aggregationTemporality:1,dataPoints:[]}};for(let f=0;f0?h:0,bucketCounts:r>0?[1]:[]};e[n].exponentialHistogram.dataPoints.push({attributes:kr(null!=s?s:{}),startTimeUnixNano:a,timeUnixNano:a,count:1,sum:u,scale:l,zeroCount:d,positive:p,negative:{offset:0,bucketCounts:[]},min:u,max:u,zeroThreshold:0})}(t,e);break;case"counter":!function(e,t){const{name:n,value:r,unit:i,description:o,timeUnixNano:a,attributes:s}=t;e[n]||={name:n,unit:i||"1",description:o,sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}},e[n].sum.dataPoints.push({startTimeUnixNano:a,timeUnixNano:a,asDouble:r,attributes:kr(null!=s?s:{})})}(t,e);break;case"gauge":!function(e,t){const{name:n,value:r,unit:i,description:o,timeUnixNano:a,attributes:s}=t;e[n]||={name:n,unit:i||"1",description:o,gauge:{dataPoints:[]}},e[n].gauge.dataPoints.push({startTimeUnixNano:a,timeUnixNano:a,asDouble:r,attributes:kr(null!=s?s:{})})}(t,e)}}),Object.values(t)}async exportByKeepalive(e,t){if(0===e.length)return;const n=[],r=[];e.forEach(e=>{var t;null===(t=e.requiresKeepalive)||void 0===t||t?n.push(e):r.push(e)});const i=[n.length>0?t(n,{keepalive:!0}):void 0,r.length>0?t(r,{keepalive:!1}):void 0].filter(e=>void 0!==e);await Promise.all(i)}formatLogs(e){return e.map(e=>{const t={timeUnixNano:e.timeUnixNano,observedTimeUnixNano:e.timeUnixNano,attributes:(n={...Sr(this,$r)[$r],...e.attributes},Object.entries(n).map(([e,t])=>({key:e,value:Ar(t)})))};var n;return e.body&&(t.body={stringValue:e.body}),t})}},Dr=Er("url"),Mr=Er("serviceName"),Ir=Er("logger"),jr=Er("fetchFn"),Lr=Er("maxPayloadSizeBytes"),Fr=Er("retry"),qr=class{constructor(e,t,n){var r;Object.defineProperty(this,Dr,{writable:!0,value:void 0}),Object.defineProperty(this,Mr,{writable:!0,value:void 0}),Object.defineProperty(this,Ir,{writable:!0,value:void 0}),Object.defineProperty(this,jr,{writable:!0,value:void 0}),Object.defineProperty(this,Lr,{writable:!0,value:void 0}),Object.defineProperty(this,Fr,{writable:!0,value:void 0}),Sr(this,Dr)[Dr]=e.replace(/\/v1\/(logs|metrics|traces)\/?$/,""),Sr(this,Mr)[Mr]=t,Sr(this,Ir)[Ir]=null==n?void 0:n.logger,Sr(this,jr)[jr]=null==n?void 0:n.fetchFn,Sr(this,Lr)[Lr]=null!==(r=null==n?void 0:n.maxPayloadSizeBytes)&&void 0!==r?r:51200,Sr(this,Fr)[Fr]=null==n?void 0:n.retry}async exportMetrics(e,t){var n;const r=null===(n=null==t?void 0:t.keepalive)||void 0===n||n;await this.exportBatches("/v1/metrics",[...e],e=>({resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:Sr(this,Mr)[Mr]}}]},scopeMetrics:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},metrics:e}]}]}),r,{splitEntry:Br,describeEntry:e=>({metricName:e.name,dataPointCount:Kr(e)})})}async exportLogs(e,t){var n;const r=null===(n=null==t?void 0:t.keepalive)||void 0===n||n;await this.exportBatches("/v1/logs",[...e],e=>({resourceLogs:[{resource:{attributes:[{key:"service.name",value:{stringValue:Sr(this,Mr)[Mr]}}]},scopeLogs:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},logRecords:e}]}]}),r)}async exportTo(e,t,n){await this.exportSerializedWithRetry(this.serializeBody(e),t,n)}serializeBody(e){const t=JSON.stringify(e),n=(new TextEncoder).encode(t).length;if(n>Sr(this,Lr)[Lr])throw new Gr(n,Sr(this,Lr)[Lr]);return{body:e,jsonBody:t}}async exportSerializedTo({body:e,jsonBody:t},n,r){var i;const o=await this.exporterFetch()(`${Sr(this,Dr)[Dr]}${n}`,{method:"POST",keepalive:r,headers:{"Content-Type":"application/json"},body:t});if(null===(i=Sr(this,Ir)[Ir])||void 0===i||i.log({status:o.status}),!o.ok){if(400===o.status){const e=await o.text();throw new zr(`Invalid OpenTelemetry Data: ${e}`)}if(429===o.status||503===o.status){const t=await o.text(),n=o.headers.get("Retry-After"),r=n?{seconds:Number(n)}:void 0;throw new zr("Server did not accept data",{errorData:t,retryAfter:r,body:e})}if(401===o.status||403===o.status){const t=await o.text();throw new Vr(`Authentication failed: ${o.status} ${401===o.status?"Unauthorized":"Forbidden"}`,{errorData:t,body:e})}throw new zr(`Server responded with ${o.status}`)}}async exportSerializedWithRetry(e,t,n){const r=()=>this.exportSerializedTo(e,t,n);await(Sr(this,Fr)[Fr]?Sr(this,Fr)[Fr](r):r())}exporterFetch(){return Sr(this,jr)[jr]||fetch}async exportBatches(e,t,n,r,i){const o=this.serializedBatches(t,n,i);for(const a of o)await this.exportSerializedWithRetry(a,e,r)}serializedBatches(e,t,n){if(0===e.length)return[];try{return[this.serializeBody(t(e))]}catch(o){var r;if(!(o instanceof Gr))throw o;if(e.length>1){const r=Math.ceil(e.length/2);return[...this.serializedBatches(e.slice(0,r),t,n),...this.serializedBatches(e.slice(r),t,n)]}const a=e[0];if(void 0===a)throw o;const s=null==n||null===(r=n.splitEntry)||void 0===r?void 0:r.call(n,a);var i;if(!s)throw o.metricDetails=null==n||null===(i=n.describeEntry)||void 0===i?void 0:i.call(n,a),o;return[...this.serializedBatches([s[0]],t,n),...this.serializedBatches([s[1]],t,n)]}}};function Br(e){const t=Kr(e);if(t<=1)return;const n=Math.ceil(t/2);return[Hr(e,0,n),Hr(e,n,t)]}function Hr(e,t,n){switch(!0){case"exponentialHistogram"in e:return{...e,exponentialHistogram:{...e.exponentialHistogram,dataPoints:e.exponentialHistogram.dataPoints.slice(t,n)}};case"histogram"in e:return{...e,histogram:{...e.histogram,dataPoints:e.histogram.dataPoints.slice(t,n)}};case"gauge"in e:return{...e,gauge:{...e.gauge,dataPoints:e.gauge.dataPoints.slice(t,n)}};case"sum"in e:return{...e,sum:{...e.sum,dataPoints:e.sum.dataPoints.slice(t,n)}};default:return Wr(e)}}function Kr(e){switch(!0){case"exponentialHistogram"in e:return e.exponentialHistogram.dataPoints.length;case"histogram"in e:return e.histogram.dataPoints.length;case"gauge"in e:return e.gauge.dataPoints.length;case"sum"in e:return e.sum.dataPoints.length;default:return Wr(e)}}function Wr(e){throw new Error(`Unhandled metric type: ${JSON.stringify(e)}`)}var zr=class extends Error{constructor(e,t){super(e),this.metadata=void 0,this.name="OpenTelemetryClientError",this.metadata=t}},Gr=class extends Error{constructor(e,t){const n="number"==typeof e&&void 0!==t;super(n?`Payload size ${e} exceeds ${t} bytes`:String(e)),this.name="PayloadTooLargeError",this.payloadSizeBytes=void 0,this.payloadSizeLimitBytes=void 0,this.metricDetails=void 0,n&&(this.payloadSizeBytes=e,this.payloadSizeLimitBytes=t)}},Vr=class extends Error{constructor(e,t){super(e),this.name="AuthenticationFailedError",this.metadata=void 0,this.name="AuthenticationFailedError",this.metadata=t}};function Jr(e){return Zr(e).map(e=>e instanceof Error?e:new Qr(`[${typeof e}] ${function(e){if("function"==typeof e)return`${e.name||"anonymous"}`;if("string"!=typeof e)try{return JSON.stringify(e)??typeof e}catch{}return`${e}`}(e).slice(0,10240)}`))}function Zr(e,t=0){return t>=20?[e,"Truncated cause stack"]:e instanceof Error&&e.cause?[e,...Zr(e.cause,t+1)]:[e]}var Qr=class extends Error{name="BugsnagInvalidError"},Xr=/^\s*at .*(\S+:\d+|\(native\))/m,Yr=/^(eval@)?(\[native code])?$/;function ei(e){if(-1===e.indexOf(":"))return[e];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]?Number(t[2]):void 0,t[3]?Number(t[3]):void 0]}var ti=class{breadcrumbs=[];apiKey;plugins;appId;appType;appVersion;releaseStage;locale;userAgent;metadata;persistedMetadata;onError;onPostErrorListeners=[];endpoints;session;constructor(e){this.apiKey=e.apiKey,this.appType=e.appType,this.appId=e.appId,this.appVersion=e.appVersion,this.releaseStage=e.releaseStage,this.locale=e.locale,this.userAgent=e.userAgent,this.metadata=e.metadata,this.onError=e.onError,this.persistedMetadata={},this.endpoints=e.endpoints??{notify:"https://error-analytics-production.shopifysvc.com",sessions:"https://error-analytics-sessions-production.shopifysvc.com/observeonly"},this.plugins=e.plugins??[],this.plugins.forEach(e=>e.load(this)),this.leaveBreadcrumb("Bugsnag started",void 0,"state"),(e.withSessionTracking??!0)&&(this.session={id:this.getRandomUUID(),startedAt:(new Date).toISOString(),events:{handled:0,unhandled:0}},this.startSession())}addMetadata(e){for(let t of Object.keys(e))this.persistedMetadata[t]=e[t]}getSessionId(){return this.session?.id}leaveBreadcrumb(e,t,n="manual"){this.breadcrumbs.push({name:e,metaData:t,type:n,timestamp:(new Date).toISOString()})}notify(e,{errorClass:t,severity:n,severityType:r,handled:i=!0,metadata:o,context:a,groupingHash:s}={}){let c=Jr(e),u={...this.metadata,...this.persistedMetadata,...o},l=this.buildBugsnagEvent(c,{errorClass:t,severityType:r,handled:i,severity:n,metadata:u,context:a,groupingHash:s});if((this.onError?.(l,e)??!0)&&"development"!==this.releaseStage){this.updateAndAppendSessionInformation(l);let t=this.sendToBugsnag(l);return this.onPostErrorListeners.forEach(t=>t(l,e)),t}return Promise.resolve()}addOnPostError(e){this.onPostErrorListeners.push(e)}updateAndAppendSessionInformation(e){this.session&&(e.unhandled?this.session.events.unhandled++:this.session.events.handled++,e.session=this.session)}buildBugsnagEvent(e,{errorClass:t,severity:n="error",severityType:r="handledException",handled:i,metadata:o={},context:a,groupingHash:s}){let c=(new Date).toISOString(),{breadcrumbs:u,appId:l,appType:f,appVersion:h,releaseStage:d,locale:p,userAgent:_}=this;return{payloadVersion:"5",exceptions:e.map((e,n)=>({errorClass:0===n?t??e.name:e.name,stacktrace:ni(l,e),message:e.message,type:"browserjs"})),severity:n,severityReason:{type:r},unhandled:!i,app:{id:l,type:f,version:h,releaseStage:d},device:{time:c,locale:p,userAgent:_},breadcrumbs:u,context:a,metaData:o,groupingHash:s}}async startSession(){if("development"===this.releaseStage)return void console.log("Skipping error logging session tracking in development mode");let{apiKey:e}=this,t={notifier:{name:"Bugsnag JavaScript",version:"7.22.2",url:"https://github.com/bugsnag/bugsnag-js"},app:{version:this.appVersion,releaseStage:this.releaseStage,type:this.appType},device:{id:this.appId,locale:this.locale,userAgent:this.userAgent},sessions:[this.session]};try{await fetch(this.endpoints.sessions,{method:"POST",headers:{"Content-Type":"application/json","Bugsnag-Api-Key":e,"Bugsnag-Payload-Version":"5","Bugsnag-Sent-At":this.session?.startedAt??(new Date).toISOString()},body:JSON.stringify(ii(t))})}catch(Re){console.warn("[bugsnag-light] failed to start session"),console.warn(Re)}}async sendToBugsnag(e){let{apiKey:t}=this,n={apiKey:t,notifier:{name:"Bugsnag JavaScript",version:"7.22.2",url:"https://github.com/bugsnag/bugsnag-js"},events:[e]};try{await fetch(this.endpoints.notify,{method:"POST",headers:{"Content-Type":"application/json","Bugsnag-Api-Key":t,"Bugsnag-Payload-Version":"5","Bugsnag-Sent-At":e.device.time},body:JSON.stringify(ii(n))})}catch(je){console.warn("[bugsnag-light] failed to send an event"),console.warn(je)}}getRandomUUID(){try{return crypto.randomUUID()}catch{return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}};function ni(e,t){let n=function(e){return e.stack?e.stack.match(Xr)?function(e){return e.stack.split("\n").filter(e=>!!e.match(Xr)).map(e=>{let t=e.replace(/^\s+/,"").replace(/^.*?\s+/,""),n=t.match(/ (\(.+\)$)/);t=n?t.replace(n[0],""):t;let r=ei(n?n[1]:t);return{method:n&&t||void 0,file:["eval",""].indexOf(r[0])>-1?void 0:r[0],lineNumber:r[1],columnNumber:r[2]}})}(e):function(e){return e.stack.split("\n").filter(e=>!e.match(Yr)).map(e=>{if(-1===e.indexOf("@")&&-1===e.indexOf(":"))return{method:e};let t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=ei(e.replace(t,""));return{method:r,file:i[0],lineNumber:i[1],columnNumber:i[2]}})}(e):[]}(t).map(t=>{let n=t.file?.includes(e);return{method:t.method??"",file:t.file??"",lineNumber:t.lineNumber??0,columnNumber:t.columnNumber,inProject:n}});if(t instanceof Qr){let e=n.findIndex(e=>e.method.endsWith("notify"));e>-1&&(n=n.slice(e+1))}return n}var ri=50;function ii(e,t=new Set,n=0){if(null===e||"object"!=typeof e)return e;if(n>=ri)return"[MaxDepth]";if(t.has(e))return"[Circular]";let r=new Set(t);if(r.add(e),Array.isArray(e))return e.map(e=>ii(e,r,n+1));let i={};for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(i[o]=ii(e[o],r,n+1));return i}var oi=class e extends Error{reason;constructor(t,n){super(t,n),this.name="BreadcrumbsPluginFetchError",Object.setPrototypeOf(this,e.prototype)}};function ai(e,{metadata:t}={}){let n=window.onerror;window.onerror=(r,i,o,a,s)=>{s&&e.notify(s,{severityType:"unhandledException",handled:!1,metadata:t}),"function"==typeof n&&n.apply(window.onerror,[r,i,o,a,s])}}function si(e,{metadata:t}={}){window.addEventListener("unhandledrejection",n=>{n.reason&&n.reason instanceof Error&&n.reason.stack&&!(n.reason instanceof oi)&&e.notify(n.reason,{severityType:"unhandledPromiseRejection",handled:!1,metadata:t})})}var ci={load(e){e.addOnPostError(t=>{e.leaveBreadcrumb(t.exceptions[0].errorClass,{errorClass:t.exceptions[0].errorClass,errorMessage:t.exceptions[0].message,severity:t.severity},"error")})}};function ui(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var li={load(e){"addEventListener"in self&&self.addEventListener("click",t=>{let n="[hidden]";try{let e=function(e){return ui(e)&&e.nodeType===Node.ELEMENT_NODE}(t.target)?t.target:null;n=e?fi(e):"(Non-Element Target)"}catch{}let r=function(){try{return window.self===window.top?"in-top-window":"in-same-origin-iframe"}catch{return"in-cross-origin-iframe"}}();e.leaveBreadcrumb("UI click",{targetSelector:n,targetFrame:r},"user")},!0)}};function fi(e){let t=e.tagName;if(e.id&&(t+=`#${e.id}`),e.className?.length&&(t+=`.${e.className.replace(/ /g,".")}`),!self.document.querySelectorAll)return t;try{if(1===self.document.querySelectorAll(t).length)return t}catch{return t}return e.parentNode&&e.parentNode.childNodes.length>1&&(t+=`:nth-child(${Array.from(e.parentNode.children).indexOf(e)+1})`),1===self.document.querySelectorAll(t).length?t:e.parentElement?`${fi(e.parentElement)} > ${t}`:t}var hi={load(e){let t=["log","debug","info","warn","error"].filter(e=>typeof console<"u"&&"function"==typeof console[e]);for(let n of t){let t=console[n];console[n]=(...r)=>{e.leaveBreadcrumb("Console output",r.reduce((e,t,n)=>{let r="[Unknown value]";try{r=String(t)}catch{}if("[object Object]"===r)try{r=JSON.stringify(t)}catch{}return e[`[${n}]`]=r,e},{severity:n}),"log"),t.apply(console,r)}}}},di={load(e){if(!("addEventListener"in self))return;let t=t=>()=>e.leaveBreadcrumb(t,void 0,"navigation");self.addEventListener("pagehide",t("Page hidden"),!0),self.addEventListener("pageshow",t("Page shown"),!0),self.addEventListener("load",()=>{self.addEventListener("popstate",t("Navigated back"),!0)},!0),self.document?.addEventListener("DOMContentLoaded",t("DOMContentLoaded"),!0),self.location&&self.addEventListener("hashchange",t=>e.leaveBreadcrumb("Hash changed",{from:t.oldURL&&pi(t.oldURL),to:pi(t.oldURL?t.newURL:self.location.href),state:t.oldURL&&_i(self)},"navigation"),!0);let n=e.leaveBreadcrumb.bind(e);self.history&&self instanceof Window&&("function"==typeof self.history.replaceState&&mi({fn:"replaceState",target:self.history,leaveBreadcrumb:n,win:self}),"function"==typeof self.history.pushState&&mi({fn:"pushState",target:self.history,leaveBreadcrumb:n,win:self}))}};function pi(e){try{let t=new URL(e);return`${t.pathname}${t.search}${t.hash}`}catch{return e}}function _i(e){try{return e.history.state}catch{return{}}}function mi({fn:e,leaveBreadcrumb:t,target:n,win:r}){let i=n[e];n[e]=(o,a,s)=>{t(`History ${e}`,function({win:e,state:t,title:n,url:r}){let i=pi(e.location.href);return{title:n,state:t,prevState:_i(e),to:r||i,from:i}}({win:r,state:o,title:a,url:s}),"navigation"),i.apply(n,[o,a,s])}}var vi={load(e){if(!("fetch"in self))return;let t=self.fetch;self.fetch=function(n,r){let i,o="GET";!function(e){return e instanceof Request||ui(e)&&"url"in e}(n)?i=n.toString():(i=n.url,o=n.method),r&&"string"==typeof r.method&&r.method.length&&(o=r.method);let a=e.leaveBreadcrumb.bind(e);return new Promise((e,s)=>{t(n,r).then(t=>{let n=t.headers?.get("x-request-id");yi({message:"fetch() "+(t.status>=400?"failed":"succeeded"),url:i,leaveBreadcrumb:a,breadcrumbMetadata:{request:`${o} ${i}`,status:t.status,...n&&{requestId:n}}}),e(t)}).catch(e=>{yi({message:"fetch() error",url:i,leaveBreadcrumb:a,breadcrumbMetadata:{error:e?.message,request:`${o} ${i}`}}),s(new oi(e?.message,{cause:e}))})})}}};function yi({message:e,url:t,leaveBreadcrumb:n,breadcrumbMetadata:r}){t.startsWith("https://notify.bugsnag")||n(e,r,"request")}var gi=class e extends TypeError{constructor(t){super(t),this.name="ConsentValidationError",Object.setPrototypeOf(this,e.prototype)}},bi={TRACKING_ACCEPTED:"trackingConsentAccepted",TRACKING_DECLINED:"trackingConsentDeclined",MARKETING_ACCEPTED:"firstPartyMarketingConsentAccepted",SALE_OF_DATA_ACCEPTED:"thirdPartyMarketingConsentAccepted",ANALYTICS_ACCEPTED:"analyticsConsentAccepted",PREFERENCES_ACCEPTED:"preferencesConsentAccepted",MARKETING_DECLINED:"firstPartyMarketingConsentDeclined",SALE_OF_DATA_DECLINED:"thirdPartyMarketingConsentDeclined",ANALYTICS_DECLINED:"analyticsConsentDeclined",PREFERENCES_DECLINED:"preferencesConsentDeclined",CONSENT_COLLECTED:"visitorConsentCollected",CONSENT_TRACKING_API_LOADED:"consentTrackingApiLoaded"},wi="p",Si="a",xi="m",Ei="t",ki="m",Ai="a",Pi="p",Ci="s",Ni="marketing",Ti="analytics",$i="preferences",Oi="sale_of_data",Ri=()=>"undefined"==typeof window;function Ui(e,t){if(null===e)return"null";if(Array.isArray(e))return`[${e.map(e=>Ui(e,!0)).join(",")}]`;if("object"==typeof e){let n=[];for(const t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&n.push(`${t}:${Ui(e[t],!0)}`);const r=n.join(",");return t?`{${r}}`:r}return"string"==typeof e?JSON.stringify(e):`${e}`}function Di(e,...t){if(0===t.length)return e;const n=t[0];return e[n]||(e[n]={}),Di(e[n],...t.slice(1))}function Mi(e){try{return decodeURIComponent(e)}catch(Le){return""}}function Ii(){if(!Ri())return window}var ji=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Li(e,t){if("string"!=typeof e)return;if(!function(e){return!!e&&ji.test(e.trim().toLowerCase())}(e))return;const n=e.trim();if("00000000-0000-0000-0000-000000000000"===n)return;if("00000000-0000-0000-5000-000000000000"===n)return;const r=null==t||"string"==typeof t&&""===t.trim()?NaN:Number(t);return Number.isFinite(r)&&Date.now()>r?void 0:n}var Fi="_shopify_cmp";function qi(){try{return document.cookie}catch{return!1}}function Bi(e){return e===encodeURIComponent(Mi(e))}function Hi(e,t,n,r){if(!Bi(r))throw new TypeError("Cookie value is not correctly URI encoded.");if(!Bi(e))throw new TypeError("Cookie name is not correctly URI encoded.");let i=`${e}=${r}`;i+="; path=/",t&&(i+=`; domain=${t}`),i+=`; expires=${new Date((new Date).getTime()+n).toUTCString()}`,document.cookie=i}var Ki=["_shopify_y","_shopify_s"];function Wi(){return Ri()?{}:window.Shopify?.customerPrivacy?.config||{}}var zi,Gi="_cmp",Vi="consentHeader";function Ji(e){if(!Ri()){try{e=decodeURIComponent(e)}catch{}try{sessionStorage.setItem(Vi,e)}catch{}}}function Zi(e=Gi){let t;if(t=function(){try{return function(e=Gi){const t=performance?.getEntriesByType?.("navigation");if(!t)return;const n=t.map(t=>function(e,t=Gi){if(e)return e.serverTiming?.find(e=>e.name==t)?.description}(t,e)).find(e=>e);return n&&e===Gi&&Ji(n),n}(e)}catch{return}}(),!t){if(e!==Gi)return;let t;try{t=sessionStorage.getItem(Vi)}catch{}return t||void 0}try{t=decodeURIComponent(t)}catch{}return t}function Qi(){if(Ri())return zi;{const e=window.Shopify?.customerPrivacy?.injectedConsent||Wi().injectedConsent;return e?Mi(e):void 0}}function Xi(e,t){if(!Ri())try{document.dispatchEvent(new CustomEvent(e,{detail:t||{}}))}catch(Le){console.error(`[Shopify Customer Privacy] Error in event listener for "${e}":`,Le)}}function Yi(e){!function(e){const t=function(){if(!Ri())return window.Shopify?.customerPrivacy}();t&&(t.consentStatus=e)}("loaded");const t=e[xi],n=e[Ei],r=e[Si],i=e[wi];!0===t?Xi(bi.MARKETING_ACCEPTED):!1===t&&Xi(bi.MARKETING_DECLINED),!0===n?Xi(bi.SALE_OF_DATA_ACCEPTED):!1===n&&Xi(bi.SALE_OF_DATA_DECLINED),!0===r?Xi(bi.ANALYTICS_ACCEPTED):!1===r&&Xi(bi.ANALYTICS_DECLINED),!0===i?Xi(bi.PREFERENCES_ACCEPTED):!1===i&&Xi(bi.PREFERENCES_DECLINED);const o=function(e){return{marketingAllowed:e[xi],saleOfDataAllowed:e[Ei],analyticsAllowed:e[Si],preferencesAllowed:e[wi],firstPartyMarketingAllowed:e[xi],thirdPartyMarketingAllowed:e[Ei]}}(e);Xi(bi.CONSENT_COLLECTED,o);const a=[r,i,t,n];a.every(e=>!0===e)&&Xi(bi.TRACKING_ACCEPTED),a.every(e=>!1===e)&&Xi(bi.TRACKING_DECLINED)}function eo(e){!function(e){Ri()?zi=e:Di(window,"Shopify","customerPrivacy").injectedConsent=e}(e),Ri()||(window.Shopify?.customerPrivacy?.cachedConsent&&(window.Shopify.customerPrivacy.cachedConsent=void 0),Yi({[wi]:uo(),[Si]:lo(),[xi]:fo(),[Ei]:ho()}))}function to(){let e;if(e=Ri()?Qi():function(){const e=window.Shopify?.customerPrivacy?.cachedConsent;return e?Mi(e):void 0}()||Qi()||new URLSearchParams(window.location.search).get("_cs")||function(e){const t=qi()?document.cookie.split("; "):[];for(let n=0;ne.slice(0,t)+"-"+e.slice(t),n)}function l(e){const t=r.split(".")[0];return t.includes(e.toLowerCase())?"0":t.includes(e.toUpperCase())?"1":""}function f(e){return r.includes(e.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[Ai]:l(Ai),[Pi]:l(Pi),[ki]:l(ki),[Ci]:l(Ci)}},region:i||"",cus:c,purposes:{[Si]:f(Si),[wi]:f(wi),[xi]:f(xi),[Ei]:f(Ei)},sale_of_data_region:"t"==a,display_banner:"t"==o,consent_id:u}}(e):void 0}function oo(e){switch(e){case"1":return"yes";case"0":return"no";default:return""}}function ao(e){switch(e){case Ai:return Ti;case ki:return Ni;case Pi:return $i;case Ci:return Oi}}function so(e){const t=no();if(!t)return"";const n=t.con.CMP;return n?n[e]:""}function co(e){const t=no();if(!t||!t.purposes)return!0;const n=t.purposes[e];return"boolean"!=typeof n||n}function uo(){return co(wi)}function lo(){return co(Si)}function fo(){return co(xi)}function ho(){return co(Ei)}function po(){const e=no();return!!e&&"boolean"==typeof e.display_banner&&e.display_banner}function _o(){const e=no();return e&&e.sale_of_data_region||!1}function mo({id:e},t){return`${e}${JSON.stringify(t?vo(t):{})}`}function vo(e){const t={};for(const n of Object.keys(e).sort())t[n]=e[n];return t}function yo(e,t){const n=Ii();if(!n)return;const r=Di(n,"Shopify","customerPrivacy","cachedToken");if(t){const n="_shopify_s"===e?18e5:31536e6;r[e]=t,r[e+"_expires_at"]=Date.now()+n}else delete r[e],delete r[e+"_expires_at"]}var go="Shopify-Storefront-Consent-Management";function bo(e){return""===e?void 0:e}var wo,So=["SHOPIFY_PRIVACY_BANNER","SHOPIFY_CHECKOUT_BANNER","CHECKOUT_UI_EXTENSION"],xo=["SHOPIFY_CUSTOMER_ACCOUNTS_BANNER"];function Eo(e){const t=e.granular_consent;return{query:`query { consentManagement { cookies(${Ui({visitorConsent:{marketing:bo(t.marketing),analytics:bo(t.analytics),preferences:bo(t.preferences),saleOfData:bo(t.sale_of_data),...t.metafields&&{metafields:t.metafields}},...t.email&&{visitorEmail:t.email},origReferrer:bo(e.referrer),landingPage:bo(e.landing_page)})}${n=e.source,r=Boolean(t.customerAccountRequestInfo),n&&(r?xo:So).includes(n)?`,source:${n}`:""}) { trackingConsentCookie cookieDomain landingPageCookie origReferrerCookie shopifyUnique shopifyVisit } customerAccountUrl } }`,variables:{}};var n,r}function ko(e,t,n,r={}){const i=Wi().consentDomain||t.granular_consent.checkoutRootDomain||window.location.host,o=()=>function(e,t,n,r){const i=t.granular_consent;let o="",a={};if(i.customerAccountRequestInfo)o=i.customerAccountRequestInfo.url,a=i.customerAccountRequestInfo.headers;else{const t=Wi(),r=i.storefrontAccessToken||t.storefrontAccessToken;o=`${/^(localhost|127\.0\.0\.1)(:|$)/.test(e)?"http:":"https:"}//${e}/api/unstable/graphql.json`;const s=i.isExtensionToken?"Shopify-Storefront-Extension-Token":"x-shopify-storefront-access-token";a=r?{[s]:r}:{},n&&(a={...a,...n()})}const s={headers:{"content-type":"application/json",...!0===Wi().asyncConsent&&new URL(o).origin===window.location.origin&&{[go]:"1"},...a,..."undefined"!=typeof __CtaTestEnv__&&"true"===__CtaTestEnv__?{"x-test-payload":JSON.stringify(t)}:{}},body:JSON.stringify(Eo(t)),method:"POST"};let c;try{c=fetch(o,s)}catch(Le){c=Promise.reject(Le)}return c.then(e=>{try{r?.(e)}catch{}if(e.ok)return e.json();{const t=new Error("Server error");throw t.cause={status:e.status},t}})}(i,t,r.getVisitorTokenHeaders,r.onResponse).then(e=>{const i=e?.data?.consentManagement;if(!i){const t=(e?.errors??[]).map(e=>e?.message).filter(Boolean).join("; ");throw new Error(t?`GraphQL error: ${t}`:"GraphQL response missing consentManagement")}const o=i.cookies.cookieDomain,a=i.cookies.trackingConsentCookie,s=i.cookies.shopifyUnique,c=i.cookies.shopifyVisit;if(!0===Wi().asyncConsent&&a&&!function(e){try{return void 0!==io(Mi(e))}catch{return!1}}(a))throw new Error("Consent response contains unreadable consent");var u,l,f;if(a&&(u=a,Di(window,"Shopify","customerPrivacy").cachedConsent=u,!0!==Wi().asyncConsent&&Ji(a)),yo("_shopify_y",s),yo("_shopify_s",c),!0===Wi().asyncConsent)e.errors?.length||!a||ro()||function(){if(Ri()||!function(){const e=qi();return!!e&&e.split(";").some(e=>Ki.includes(e.split("=")[0].trim()))}())return;const e=window.location.hostname.split("."),t=["",...e.map((t,n)=>e.slice(n).join("."))];for(const n of Ki)for(const e of t)try{Hi(n,e,-1,"")}catch{}}();else if(t.granular_consent.headlessStorefront&&!0!==Ii()?.Shopify?.customerPrivacy?.backendConsentEnabled&&!0!==Wi().asyncVisitorState){const e=31536e6,n=t.granular_consent,r=o||n.checkoutRootDomain||window.location.hostname,i=n.storefrontRootDomain||o||window.location.hostname;Hi(Fi,r,e,a),i!==r&&Hi(Fi,i,e,a)}return!1!==r.emitEvents&&(l=t,f={[wi]:uo(),[Si]:lo(),[xi]:fo(),[Ei]:ho()},void 0!==l.granular_consent&&Yi(f)),void 0!==n&&n(null,e),e}).catch(e=>{const t="Error while setting storefront API consent: "+e.message,r=e.cause?.status,i={error:t};if(void 0!==r&&(i.statusCode=r),void 0===n)throw i;n(i)});if(!0!==Wi().asyncConsent)return o();const a=wo=wo?wo.then(o,o):o(),s=()=>{wo===a&&(wo=void 0)};return a.then(s,s),a}var Ao,Po=class e{constructor(){if(this.endpoint="https://otlp-http-production.shopifysvc.com/v1/metrics",this.serviceName="consent-tracking-api",this.scopeName="consent-tracking-api-opentelemetry",e.instance)return e.instance;e.instance=this}increment(e,t={},n=.01){if(!Ri()&&e)try{if(!Number.isFinite(n)||n<=0||n>1)return;if(!lo())return;if(Math.random()>=n)return;const r=this.buildMetricBody(e,t);if(window.location.host.endsWith("spin.dev"))return void console.log("OpenTelemetry metric from consent API:",r);if("function"!=typeof fetch)return;return fetch(this.endpoint,{headers:{accept:"*/*","content-type":"application/json; charset=utf-8"},body:JSON.stringify(r),method:"POST",mode:"cors",credentials:"omit"}).catch(()=>{})}catch(Le){}}buildMetricBody(e,t){const n=1e6*Date.now();return{resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:this.serviceName}}]},scopeMetrics:[{scope:{name:this.scopeName,version:"1.1.1",attributes:[]},metrics:[{name:e,unit:"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[{asDouble:1,startTimeUnixNano:n,timeUnixNano:n,attributes:Co(t)}]}}]}]}]}}};function Co(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return null==r||t.push({key:n,value:No(r)}),t},[])}function No(e){return"string"==typeof e?{stringValue:e}:"boolean"==typeof e?{boolValue:e}:isFinite(e)?Math.floor(e)===e?{intValue:e}:{doubleValue:e}:{stringValue:String(e)}}function To(){return Ao??=new Po}Po.instance=void 0;var $o=[Ni,Ti,$i,Oi],Oo=[...$o,"email","rootDomain","checkoutRootDomain","storefrontRootDomain","storefrontAccessToken","headlessStorefront","isExtensionToken","metafields","customerAccountRequestInfo"],Ro=$o.map(e=>`"${e}"`).join(", "),Uo="https://shopify.dev/docs/api/customer-privacy";function Do(e,t,n){return function(e,t,n){if(Ri())throw new Error("setTrackingConsent is not supported in Node.js environments. This function requires browser APIs (XHR, cookies, window) and can only be called client-side.");if(To().increment("consent_tracking_api_calls_total",{method_name:"setTrackingConsent",api_version:"v1.11"}),function(e){if("boolean"!=typeof e&&"object"!=typeof e)throw new gi(`setTrackingConsent received an invalid argument of type "${typeof e}". Expected an object with consent keys. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${Uo} for documentation.`);if("object"==typeof e){const t=Object.keys(e);if(0===t.length)throw new gi(`The submitted consent object is empty. Expected at least one consent key: ${Ro}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${Uo} for documentation.`);for(const e of t)if(!Oo.includes(e))throw new gi(`The submitted consent object contains an invalid key: "${e}". Valid keys are: ${Ro}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${Uo} for documentation.`)}}(e),void 0!==t&&"function"!=typeof t)throw new gi(`setTrackingConsent received an invalid callback of type "${typeof t}". The second argument must be a function if provided. Example: setTrackingConsent({ analytics: true }, (error, result) => { ... }). See ${Uo} for documentation.`);const r=function(e){if(!e)return null;try{return Io()?document.referrer:""}catch{return""}}(e.analytics),i=function(e){if(!e)return null;if(!Io())return"/";try{return window.location.pathname+window.location.search}catch{return"/"}}(e.analytics);return ko(0,{granular_consent:e,...null!==r&&{referrer:r},...null!==i&&{landing_page:i},...n.source&&{source:n.source}},t)}(e,n,{source:t})}function Mo(){return function(){const e=no();return ro(e)?"":e.region||""}()}function Io(){try{if(""===document.referrer)return!0;const e=document.createElement("a");return e.href=document.referrer,window.location.hostname!=e.hostname}catch{return!0}}function jo(){return function(){const e=no();if(!ro(e)&&e.cus)return Object.entries(e.cus).map(([e,t])=>({key:decodeURIComponent(e),value:decodeURIComponent(t)}))}()}function Lo(){const e={},t={m:so(ki),a:so(Ai),p:so(Pi),s:so(Ci)};for(const n of Object.keys(t))e[ao(n)]=oo(t[n]);return e}function Fo(e){if(!Ri())try{return document.querySelector(`meta[name="${e}"]`)?.getAttribute("content")?.trim()}catch{return}}function qo(e){const t=Fo(e);if(t)try{const e=JSON.parse(t);return"string"==typeof e?e.trim():void 0}catch{return}}function Bo(e){return void 0!==e&&Date.now()>e}function Ho(e,t){const n=Li(qo(t));if(n&&!Bo(function(e){const t=qo(`${e}Expiration`);if(!t)return;const n=Number(t);return Number.isFinite(n)?n:void 0}(t)))return n;const r=Li(Fo(e));return r&&!Bo(function(e){if(!Ri())try{const t=document.querySelector(`meta[name="${e}"]`)?.getAttribute("data-expiration")?.trim();if(!t)return;const n=Number(t);return Number.isFinite(n)?n:void 0}catch{return}}(e))?r:void 0}function Ko(e,t){try{To().increment("consent_tracking_api_tracking_token_read",{token:e,source:t})}catch{}}function Wo(e){try{return performance?.getEntriesByType("navigation")[0]?.serverTiming?.find(t=>t.name==e)?.description}catch{return}}async function zo(e){try{if(Math.random()>.01)return;let t=null;if(e)try{const n=await e.json();t=Array.isArray(n?.errors)&&n.errors.length>0}catch{}To().increment("consent_tracking_api_persist",{ok:String(!!e?.ok),status:String(e?.status??"none"),graphql_errors:String(t)},1)}catch{}}function Go(e,t){if(!Ri())try{const n=Li(e),r=Li(t);if(!n&&!r)return;const i=function(){const e=document.querySelector('[data-serialized-id="app-base-path"]');if(!Ri()&&Boolean(Ii()?.__CUSTOMER_ACCOUNT__)||e){const t=document.querySelector('[data-serialized-id="preview-mode-data"]');if("/"!==JSON.parse(e?.textContent||"null")||!1!==JSON.parse(t?.textContent||"null")?.inPreviewMode)return;return new URL("/customer/api/unstable/graphql",window.location.origin).href}const{protocol:t,host:n}=function(){const e=Wi().consentDomain||window.location.host;return{protocol:/^(localhost|127\.0\.0\.1)(:|$)/.test(e)?"http:":"https:",host:e}}();return`${t}//${n}/api/unstable/graphql.json`}();if(!i)return;const o=new URLSearchParams,a={"content-type":"application/json"};n&&(o.set("_y",n),a["X-Shopify-UniqueToken"]=n),r&&(o.set("_s",r),a["X-Shopify-VisitToken"]=r);const s=`${i}?${o.toString()}`;let c;try{c=fetch(s,{headers:a,body:JSON.stringify({query:"query { consentManagement { cookies(visitorConsent:{}) { cookieDomain } } }",variables:{}}),method:"POST",mode:"cors",credentials:"include"})}catch(Le){c=Promise.reject(Le)}c.then(e=>zo(e),()=>zo(void 0))}catch{}}function Vo(e){if(!lo()&&!fo())return;const t=function(e){const t=Ii();if(!t)return;const n=t.Shopify?.customerPrivacy?.cachedToken?.[e],r=t.Shopify?.customerPrivacy?.cachedToken?.[e+"_expires_at"];return!n||!r||r<(new Date).getTime()?void 0:Li(n)}(e);if(t)return Ko(e,"window_cache"),t;if(function(){const e=Ii();if(!e?.ShopPay)return!1;try{const t=Object(e.ShopPay);return Reflect.has(t,"trackingUnique")||Reflect.has(t,"trackingVisit")}catch{return!1}}()){const t=function(e){const t=Ii();if(!t||!t.ShopPay)return;const n={_shopify_y:"trackingUnique",_shopify_s:"trackingVisit"}[e];return n?Li(t.ShopPay[n]):void 0}(e);return Ko(e,"shop_pay"),t}const n="_shopify_y"===(r=e)?Ho("shopify-y","serialized-shopifyY"):"_shopify_s"===r?Ho("shopify-s","serialized-shopifyS"):void 0;var r;if(n)return Ko(e,"meta"),n;const i=function(e){const t=e.replace("_shopify",""),n=Wo(t),r=Number(Wo(`${t}e`));if(!r||Date.now()/1e3t.trim().startsWith(`${e}=`))?.split("=")[1]?.trim();return Li(t)}catch{return}}(e);if(o)return Ko(e,"cookie"),o;Ko(e,"missing")}function Jo(){return Vo("_shopify_y")}function Zo(){return Vo("_shopify_s")}function Qo(){return fo()}function Xo(){return lo()}function Yo(){return uo()}function ea(){return ho()}var ta=class extends Error{constructor(...e){super(...e),this.name="CheckoutGraphQLError"}};function na(e){return"function"==typeof e?e():e}function ra(e){return e?Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&"):""}var ia=class{constructor(e,t=new Map,{timing:n}={}){this.cache=t,this.timings=[],this.inflight=new Map,this.cacheWriteSequence=new Map,this.fetch=n?function(e,t,n){return async r=>{const i=performance.now();try{return await e(r)}finally{n({clientName:t,operationName:r.query.name??r.query.id,startedAt:i,duration:Math.max(0,performance.now()-i)})}}}(e,n.clientName,e=>this.timings.push(e)):e}read(e,t){return this.cache.get("string"==typeof e?e:mo(e,t))}extract(){return Object.fromEntries(this.cache.entries())}mutate(e,{variables:t}={}){return this.run(e,{variables:t})}staticQuery(e,t={}){return this.internalQuery(e,t)}get reactiveEffectsEnabled(){return!0}query(e,t={}){const n=We(void 0),r=We(!1),i=We(void 0),o=We(!1);let a,s,c=0,u=Promise.resolve({});const l=t.cache??!0,f=()=>{const e=(c??0)+1;return c=e,e},h=(e,t)=>{t===c&&(e.error?(i.value=e.error,n.value=void 0):(i.value=void 0,n.value=e.data),r.value=!1)},d=n=>{if(null===c)return Promise.resolve({});const i=f();s=ra(n.additionalHeaders);const a=(t.getCacheKey??mo)(e,n.variables),u=!n.forceNetwork&&(n.cache??l)&&!this.inflight.has(a)&&this.cache.has(a),d=this.internalQuery(e,{variables:n.variables,cache:n.cache??l,getCacheKey:t.getCacheKey,additionalHeaders:n.additionalHeaders,forceNetwork:n.forceNetwork});return o.value=u,d instanceof Promise?(r.value=!0,d.then(e=>(h(e,i),e))):(h(d,i),Promise.resolve(d))};if(this.reactiveEffectsEnabled)a=tt(()=>{if(na(t.skip))return f(),void(r.value=!1);const e=na(t.variables),n=na(t.additionalHeaders),i=ra(n);u=d({variables:e,cache:l,additionalHeaders:n,forceNetwork:void 0!==s&&i!==s})});else if(!na(t.skip)){const i=(t.getCacheKey??mo)(e,na(t.variables)),a=l?this.read(i):void 0;null==a?r.value=!0:(n.value=a,o.value=!0,u=Promise.resolve({data:a}))}const p=()=>{null!==c&&(c=null,a?.())};tt(()=>()=>p());const _={data:n,loading:r,error:i,isFromCache:o,refetch:e=>(u=d({variables:e?.variables??na(t.variables),cache:!1,additionalHeaders:na(t.additionalHeaders),forceNetwork:!e?.deduplicate}),_),[Symbol.dispose]:p,then:(e,t)=>u.then(e,t)};return _}internalQuery(e,{cache:t=!0,variables:n,getCacheKey:r,skip:i=!1,additionalHeaders:o,forceNetwork:a=!1}={}){const s=(r??mo)(e,n);if(i)return{data:this.cache.get(s)};if(!a){if(this.inflight.has(s))return this.inflight.get(s);if(t&&this.cache.has(s))return{data:this.cache.get(s)}}const c=(this.cacheWriteSequence.get(s)??0)+1;this.cacheWriteSequence.set(s,c);const u=(async()=>{try{const t=await this.run(e,{variables:n},o);return t.error||this.cacheWriteSequence.get(s)!==c||this.cache.set(s,t.data),t}finally{this.cacheWriteSequence.get(s)===c&&