@namiml/web-sdk 3.4.1 → 3.4.2-dev.202605300214

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/nami-web.mjs CHANGED
@@ -251,7 +251,7 @@ import{NAMI_SDK_VERSION as e,getExtendedClientInfo as t,PaywallState as i,logger
251
251
  .nami-modal-content nami-content-container {
252
252
  overflow: visible;
253
253
  }
254
- `)),St=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},Et=globalThis,Mt=Et.ShadowRoot&&(void 0===Et.ShadyCSS||Et.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Tt=Symbol(),Pt=new WeakMap,At=function(){return ee(function e(t,i,n){if(Y(this,e),this._$cssResult$=!0,n!==Tt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i},[{key:"styleSheet",get:function(){var e=this.o,t=this.t;if(Mt&&void 0===e){var i=void 0!==t&&1===t.length;i&&(e=Pt.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Pt.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Dt=(e,t)=>{if(Mt)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(var i,n=te(t);!(i=n()).done;){var a=i.value,r=document.createElement("style"),o=Et.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=a.cssText,e.appendChild(r)}},xt=Mt?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,i="",n=te(e.cssRules);!(t=n()).done;){i+=t.value.cssText}return(e=>new At("string"==typeof e?e:e+"",void 0,Tt))(i)})(e):e,Ct=Object.is,It=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,_t=Object.getOwnPropertyNames,Rt=Object.getOwnPropertySymbols,Ft=Object.getPrototypeOf,Wt=globalThis,Ot=Wt.trustedTypes,$t=Ot?Ot.emptyScript:"",Nt=Wt.reactiveElementPolyfillSupport,jt=(e,t)=>e,Bt={toAttribute(e,t){switch(t){case Boolean:e=e?$t:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){var i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},zt=(e,t)=>!Ct(e,t),Ut={attribute:!0,type:String,converter:Bt,reflect:!1,useDefault:!1,hasChanged:zt};null!==(gt=Symbol.metadata)&&void 0!==gt||(Symbol.metadata=Symbol("metadata")),null!==(yt=Wt.litPropertyMetadata)&&void 0!==yt||(Wt.litPropertyMetadata=new WeakMap);var Ht=function(){function e(){var t;return Y(this,e),(t=X(this,e))._$Ep=void 0,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Em=null,t._$Ev(),t}return re(e,ve(HTMLElement)),ee(e,[{key:"_$Ev",value:function(){var e;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach(e=>e(this))}},{key:"addController",value:function(e){var t,i;(null!==(t=this._$EO)&&void 0!==t?t:this._$EO=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.call(e))}},{key:"removeController",value:function(e){var t;null===(t=this._$EO)||void 0===t||t.delete(e)}},{key:"_$E_",value:function(){for(var e,t=new Map,i=te(this.constructor.elementProperties.keys());!(e=i()).done;){var n=e.value;this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n])}t.size>0&&(this._$Ep=t)}},{key:"createRenderRoot",value:function(){var e,t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return Dt(t,this.constructor.elementStyles),t}},{key:"connectedCallback",value:function(){var e,t;null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$EO)||void 0===t||t.forEach(e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)})}},{key:"enableUpdating",value:function(e){}},{key:"disconnectedCallback",value:function(){var e;null===(e=this._$EO)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)})}},{key:"attributeChangedCallback",value:function(e,t,i){this._$AK(e,i)}},{key:"_$ET",value:function(e,t){var i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(void 0!==n&&!0===i.reflect){var a,r=(void 0!==(null===(a=i.converter)||void 0===a?void 0:a.toAttribute)?i.converter:Bt).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}},{key:"_$AK",value:function(e,t){var i=this.constructor,n=i._$Eh.get(e);if(void 0!==n&&this._$Em!==n){var a,r,o,s=i.getPropertyOptions(n),u="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(a=s.converter)||void 0===a?void 0:a.fromAttribute)?s.converter:Bt;this._$Em=n;var l=u.fromAttribute(t,s.type);this[n]=null!==(r=null!=l?l:null===(o=this._$Ej)||void 0===o?void 0:o.get(n))&&void 0!==r?r:l,this._$Em=null}}},{key:"requestUpdate",value:function(e,t,i,n=!1,a){if(void 0!==e){var r,o,s=this.constructor;if(!1===n&&(a=this[e]),null!=i||(i=s.getPropertyOptions(e)),!((null!==(r=i.hasChanged)&&void 0!==r?r:zt)(a,t)||i.useDefault&&i.reflect&&a===(null===(o=this._$Ej)||void 0===o?void 0:o.get(e))&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(e,t,{useDefault:i,reflect:n,wrapped:a},r){var o,s,u;i&&!(null!==(o=this._$Ej)&&void 0!==o?o:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,null!==(s=null!=r?r:t)&&void 0!==s?s:this[e]),!0!==a||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(null!==(u=this._$Eq)&&void 0!==u?u:this._$Eq=new Set).add(e))}},{key:"_$EP",value:function(){var e,t;return le(function(i){for(;;)switch(i.p=i.n){case 0:return this.isUpdatePending=!0,i.p=1,i.n=2,K(this._$ES);case 2:i.n=4;break;case 3:i.p=3,t=i.v,Promise.reject(t);case 4:if(e=this.scheduleUpdate(),!(null!=e)){i.n=5;break}return i.n=5,K(e);case 5:return i.a(2,!this.isUpdatePending)}},null,this,[[1,3]],Promise)}},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var e;if(null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(var t,i=te(this._$Ep);!(t=i()).done;){var n=t.value,a=n[0],r=n[1];this[a]=r}this._$Ep=void 0}var o=this.constructor.elementProperties;if(o.size>0)for(var s,u=te(o);!(s=u()).done;){var l=s.value,d=l[0],h=l[1],c=h.wrapped,m=this[d];!0!==c||this._$AL.has(d)||void 0===m||this.C(d,void 0,h,m)}}var f=!1,v=this._$AL;try{var p;(f=this.shouldUpdate(v))?(this.willUpdate(v),null!==(p=this._$EO)&&void 0!==p&&p.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(v)):this._$EM()}catch(v){throw f=!1,this._$EM(),v}f&&this._$AE(v)}}},{key:"willUpdate",value:function(e){}},{key:"_$AE",value:function(e){var t;null!==(t=this._$EO)&&void 0!==t&&t.forEach(e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}},{key:"_$EM",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}}],[{key:"addInitializer",value:function(e){var t;this._$Ei(),(null!==(t=this.l)&&void 0!==t?t:this.l=[]).push(e)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}},{key:"createProperty",value:function(e,t=Ut){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){var i=Symbol(),n=this.getPropertyDescriptor(e,i,t);void 0!==n&&It(this.prototype,e,n)}}},{key:"getPropertyDescriptor",value:function(e,t,i){var n,a=null!==(n=Lt(this.prototype,e))&&void 0!==n?n:{get(){return this[t]},set(e){this[t]=e}},r=a.get,o=a.set;return{get:r,set(t){var n=null==r?void 0:r.call(this);null!=o&&o.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){var t;return null!==(t=this.elementProperties.get(e))&&void 0!==t?t:Ut}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(jt("elementProperties"))){var e=Ft(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(jt("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(jt("properties")))for(var e=this.properties,t=0,i=[..._t(e),...Rt(e)];t<i.length;t++){var n=i[t];this.createProperty(n,e[n])}var a=this[Symbol.metadata];if(null!==a){var r=litPropertyMetadata.get(a);if(void 0!==r)for(var o,s=te(r);!(o=s()).done;){var u=o.value,l=u[0],d=u[1];this.elementProperties.set(l,d)}}this._$Eh=new Map;for(var h,c=te(this.elementProperties);!(h=c()).done;){var m=h.value,f=m[0],v=m[1],p=this._$Eu(f,v);void 0!==p&&this._$Eh.set(p,f)}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e))for(var i,n=te(new Set(e.flat(1/0).reverse()));!(i=n()).done;){var a=i.value;t.unshift(xt(a))}else void 0!==e&&t.push(xt(e));return t}},{key:"_$Eu",value:function(e,t){var i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}}])}();Ht.elementStyles=[],Ht.shadowRootOptions={mode:"open"},Ht[jt("elementProperties")]=new Map,Ht[jt("finalized")]=new Map,null!=Nt&&Nt({ReactiveElement:Ht}),(null!==(bt=Wt.reactiveElementVersions)&&void 0!==bt?bt:Wt.reactiveElementVersions=[]).push("2.1.2");var Gt={attribute:!0,type:String,converter:Bt,reflect:!1,hasChanged:zt},Vt=(e=Gt,t,i)=>{var n=i.kind,a=i.metadata,r=globalThis.litPropertyMetadata.get(a);if(void 0===r&&globalThis.litPropertyMetadata.set(a,r=new Map),"setter"===n&&((e=Object.create(e)).wrapped=!0),r.set(i.name,e),"accessor"===n){var o=i.name;return{set(i){var n=t.get.call(this);t.set.call(this,i),this.requestUpdate(o,n,e,!0,i)},init(t){return void 0!==t&&this.C(o,void 0,e,t),t}}}if("setter"===n){var s=i.name;return function(i){var n=this[s];t.call(this,i),this.requestUpdate(s,n,e,!0,i)}}throw Error("Unsupported decorator location: "+n)};function Kt(e){return(t,i)=>"object"==typeof i?Vt(e,t,i):((e,t,i)=>{var n=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),n?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}function Xt(e){return Kt(ie({},e,{state:!0,attribute:!1}))}var Yt=function(){function e(t,i,n){var a;return Y(this,e),(a=X(this,e,[t,i,n])).host=null,a.defineDynamicStateProps(),a}return re(e,i),ee(e,[{key:"hostConnected",value:function(){}},{key:"hostDisconnected",value:function(){this.subscribers.clear()}},{key:"onStateChanged",value:function(){this.defineDynamicStateProps(),this.host&&this.host.requestUpdate()}},{key:"defineDynamicStateProps",value:function(){Object.defineProperty(this.state,"tvQuality",{get:this.getTVQuality.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportWidth",{get:this.getViewportWidth.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportHeight",{get:this.getViewportHeight.bind(this),enumerable:!1,configurable:!0})}},{key:"getTVQuality",value:function(){var e,t;if("television"!==this.getFormFactor())return"";var i=window.devicePixelRatio||1,n=window.innerWidth||(null===(e=window.screen)||void 0===e?void 0:e.availWidth),a=window.innerHeight||(null===(t=window.screen)||void 0===t?void 0:t.availHeight);if(!n||!a)return"720p";var r=Math.max(n,a)*i,o=Math.min(n,a)*i;return r>=3840||o>=2160?"4K":r>=1920||o>=1080?"1080p":"720p"}},{key:"getViewportWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}},{key:"getViewportHeight",value:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}],[{key:"create",value:function(t,i,n){var a=new e(t,i,n);return this.providers.push(a),a}},{key:"remove",value:function(e){this.providers=this.providers.filter(t=>t!==e)}},{key:"currentProvider",get:function(){return this.providers[0]}}])}();var qt=e=>{var t;return le(function(i){for(;;)if(0===i.n)return t=new Set(Array.from(document.fonts.values()).map(e=>e.family)),e.forEach(e=>{var i=Jt(e);if(!t.has(i)){var n=new FontFace(i,`url(${e.file})`);document.fonts.add(n)}}),i.a(2,document.fonts.ready.then())},null,null,null,Promise)};function Jt(e){return`${e.family}-${e.style}`.replace(/ /g,"")}function Qt(e,t,i){var a,r,o,s,u,l,d,h;if("undefined"==typeof window||!e||!t)return n.debug("Swipe detection is not supported in this environment."),{destroy(){},updateOptions(){}};var c={minDistance:null!==(a=null==i?void 0:i.minDistance)&&void 0!==a?a:30,maxDuration:null!==(r=null==i?void 0:i.maxDuration)&&void 0!==r?r:600,lockAxis:null===(o=null==i?void 0:i.lockAxis)||void 0===o||o,preventScrollOnSwipe:null!==(s=null==i?void 0:i.preventScrollOnSwipe)&&void 0!==s&&s,pointerTypes:null!==(u=null==i?void 0:i.pointerTypes)&&void 0!==u?u:["touch"],passiveListeners:null===(l=null==i?void 0:i.passiveListeners)||void 0===l||l,axisHint:null!==(d=null==i?void 0:i.axisHint)&&void 0!==d?d:"y",edgeLeakThreshold:null!==(h=null==i?void 0:i.edgeLeakThreshold)&&void 0!==h?h:24},m=e.style.touchAction;c.preventScrollOnSwipe&&(e.style.touchAction="none");var f=null,v=0,p=0,g=0,y=0,b=0,w=null,k=null,S=!1,E=!1,M=!1,T=e=>{try{var t=window.getComputedStyle(e);if(!t)return!1;var i=t.overflowY;if("auto"!==i&&"scroll"!==i)return!1;var n=e;return n.scrollHeight>n.clientHeight}catch(e){return!1}},P=e=>c.pointerTypes.includes(e.pointerType),A=t=>{var i=t.composedPath?t.composedPath()[0]:t.target;if(P(t)&&null===f){f=t.pointerId,v=g=t.clientX,p=y=t.clientY,b=performance.now(),w=null,M=!1,S=!1,E=!1,(k="y"===c.axisHint?((e,t)=>{for(var i=e;i&&i!==t&&i instanceof HTMLElement;){var n,a;if(T(i))return i;i=i.parentElement||(null!==(n=null===(a=i.parentNode)||void 0===a?void 0:a.host)&&void 0!==n?n:null)}return null})(i,e):null)||(E=!0);try{var n;null==e||null===(n=e.setPointerCapture)||void 0===n||n.call(e,t.pointerId)}catch(e){try{var a;null==i||null===(a=i.setPointerCapture)||void 0===a||a.call(i,t.pointerId)}catch(e){}}}},D=e=>{if(e.pointerId===f&&P(e)){if(g=e.clientX,y=e.clientY,c.lockAxis&&!w){var i=Math.abs(g-v),n=Math.abs(y-p);(i>2||n>2)&&(w=n>=i?"y":"x")}if("y"===c.axisHint&&("y"===w||!c.lockAxis)){var a=y-p,r=a<0?"up":"down",o=Math.abs(a),s=performance.now()-b,u=o/Math.max(s,1),l=o>=c.minDistance||u>.5;if(k)if(l)E=!0;else if(((e,t)=>!!e&&("down"===t?e.scrollTop>0:e.scrollTop+e.clientHeight<e.scrollHeight-1))(k,r)){if(!(("down"===r&&k.scrollTop<=50||"up"===r&&k.scrollTop+k.clientHeight>=k.scrollHeight-50)&&u>.3))return void(S=!0);E=!0}else E=!0;var d=!k||o>=c.edgeLeakThreshold;if(!M&&!S&&E&&d&&o>=c.minDistance){M=!0;var h=performance.now(),m={direction:"up"===r?"up":"down",distanceX:g-v,distanceY:a,absX:Math.abs(g-v),absY:o,duration:h-b,velocity:o/Math.max(h-b,1),startX:v,startY:p,endX:g,endY:y,startedAt:b,endedAt:h,originalEvent:e};t(m)}}}},x=e=>{if(e.pointerId===f)if(P(e))if(k)C();else if(M||S)C();else{var i,n=performance.now(),a=n-b,r=g-v,o=y-p,s=Math.abs(r),u=Math.abs(o),l="x"===(i=c.lockAxis&&w?w:"x"===c.axisHint?"x":"y"===c.axisHint?"y":s>=u?"x":"y")?s:u,d=a<=c.maxDuration,h=c.minDistance;if(k&&"y"===i&&E&&(h+=c.edgeLeakThreshold),d&&l>=h){var m;m="x"===i?r>0?"right":"left":o>0?"down":"up";var T=l/Math.max(a,1);t({direction:m,distanceX:r,distanceY:o,absX:s,absY:u,duration:a,velocity:T,startX:v,startY:p,endX:g,endY:y,startedAt:b,endedAt:n,originalEvent:e})}C()}else C()},C=()=>{f=null,w=null,b=0,k=null,E=!1,S=!1,M=!1},I=!!c.passiveListeners&&{passive:!0},L=c.passiveListeners?{passive:!0,capture:!0}:{capture:!0};e.addEventListener("pointerdown",A,L),e.addEventListener("pointermove",D,I),e.addEventListener("pointerup",x,I),e.addEventListener("pointercancel",x,I),e.addEventListener("lostpointercapture",x,I);return{destroy:()=>{e.removeEventListener("pointerdown",A,L),e.removeEventListener("pointermove",D,I),e.removeEventListener("pointerup",x,I),e.removeEventListener("pointercancel",x,I),e.removeEventListener("lostpointercapture",x,I),c.preventScrollOnSwipe&&(e.style.touchAction=m),C()},updateOptions:t=>{Object.assign(c,t),"boolean"==typeof t.preventScrollOnSwipe&&(t.preventScrollOnSwipe?e.style.touchAction="none":e.style.touchAction=m)}}}var Zt={},ei=Zt.NAMI_CLOSE_PAYWALL,ti=void 0===ei?"namiClosePaywall":ei,ii=Zt.NAMI_RESTORE_PURCHASES,ni=void 0===ii?"namiRestorePurchases":ii,ai=Zt.NAMI_SIGN_IN,ri=void 0===ai?"namiSignIn":ai,oi=Zt.NAMI_BUY_SKU,si=void 0===oi?"namiBuySKU":oi,ui=Zt.SET_STATE,li=void 0===ui?"setState":ui,di=Zt.NAMI_SELECT_SKU,hi=void 0===di?"namiSelectSKU":di,ci=Zt.NAMI_PURCHASE_SELECTED_SKU,mi=void 0===ci?"namiPurchaseSelectedSKU":ci,fi=Zt.NAMI_DEEP_LINK,vi=void 0===fi?"namiDeeplink":fi,pi=Zt.NAMI_NAVIGATE_TO_SCREEN,gi=void 0===pi?"namiNavigateToScreen":pi,yi=Zt.NAMI_RELOAD_PRODUCTS,bi=void 0===yi?"namiReloadProducts":yi,wi=Zt.NAMI_PLAY_VIDEO,ki=void 0===wi?"namiPlayVideo":wi,Si=Zt.NAMI_PAUSE_VIDEO,Ei=void 0===Si?"namiPauseVideo":Si,Mi=Zt.NAMI_MUTE_VIDEO,Ti=void 0===Mi?"namiMuteVideo":Mi,Pi=Zt.NAMI_UNMUTE_VIDEO,Ai=void 0===Pi?"namiUnmuteVideo":Pi,Di=e=>"subscription"===e;function xi(e){if(Di(null==e?void 0:e.product_type)){var t=Ii(e);if(t.length>0)return t[0].billingPeriod}return null}function Ci(e){var t=function(e){if(!e)return[];var t=e.offers.filter(e=>"promo"===e.offer_type);return Li(t,e.subscription_period)}(e).find(e=>0===e.priceAmountMicros);return(null==t?void 0:t.billingPeriod)||null}function Ii(e){return e?Li(e.offers.filter(e=>"default"===e.offer_type),e.subscription_period):[]}function Li(e,t){return e.map(e=>_i(e,t))}function _i(e,t){var i,n,a,r,o,s,u,l;if(!e)return{};var d=null!==(i=null===(n=e.promo_period)||void 0===n?void 0:n.count)&&void 0!==i?i:null==t?void 0:t.count,h=null!==(a=null===(r=e.promo_period)||void 0===r?void 0:r.type)&&void 0!==a?a:null==t?void 0:t.type,c=null!==(o=null===(s=e.promo_price)||void 0===s?void 0:s.price)&&void 0!==o?o:e.price,m=null!==(u=null===(l=e.promo_price)||void 0===l?void 0:l.currency)&&void 0!==u?u:e.currency;return{priceAmountMicros:1e6*c,priceCurrencyCode:m,billingPeriod:h?`P${d}${h[0].toUpperCase()}`:"",formattedPrice:Wi(m).format(c)}}function Ri(e,t=!1,i=!1,n=!1,r=!1){if(!e)return null;var o=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!o)return null;var s=o.slice(1).map(e=>parseInt(e)),u=s[0],l=s[1],d=s[2],h=s[3],c=(e,t,i,n,o)=>{var s=(e=>r?`${e}_abbrev`:e)(o),u=(e=>r?`${e}_abbrev_plural`:`${e}_plural`)(o),l=a(s),d=a(u);return r||l!==s||(l=a(`${o}_abbrev`)),r||d!==u||(d=a(`${o}_abbrev_plural`)),n?e.toString():i?1===e||t?l:d:1===e||t?`${e} ${l}`:`${e} ${d}`};switch(e.at(-1)){case"D":return c(h,t,i,n,"nami_day");case"W":return c(d,t,i,n,"nami_week");case"M":return c(l,t,i,n,"nami_month");case"Y":return c(u,t,i,n,"nami_year")}return null}function Fi(e){var t;if(!e||e.length<2)return!1;var i=null===(t=e.at(-1))||void 0===t?void 0:t.toUpperCase();return"M"===i||"Y"===i}function Wi(e){var t={maximumFractionDigits:2,minimumFractionDigits:0};try{return new Intl.NumberFormat(navigator.language,ie({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(navigator.language,ie({},t,{style:"currency",currency:"USD"}))}}var Oi=(e,t,i)=>e&&t&&i?i.format(e-t):null,$i=(e,t,i,n)=>{if(e&&t&&i&&n){var a=100*(1-e/(i/n*t));return`${Math.round(a)}%`}return null},Ni=(e,t)=>{if(""!=t){var i=parseInt(t)-1;return i>=0&&i<(null==e?void 0:e.length)?e[i]:null==e?void 0:e.find(e=>e.sku_ref_id===t)}},ji=e=>zi(e.priceAmountMicros)/Bi(e.billingPeriod),Bi=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},zi=e=>e/1e6;function Ui(e){return parseFloat((Math.round(e)/100).toFixed(2))}var Hi=(e,t,i=[])=>({price:()=>Vi(e),name:()=>null==e?void 0:e.name,title:()=>null==e?void 0:e.name,description:()=>null==e?void 0:e.description,duration:()=>Ki(e),durationSingular:()=>Ki(e,!0),period:()=>Ki(e,!1,!0),periodNumber:()=>Ki(e,!1,!1,!0),freeTrialDuration:()=>Xi(e),freeTrialDurationSingular:()=>Xi(e,!0),freeTrialPeriod:()=>Xi(e,!1,!0),freeTrialPeriodNumber:()=>Xi(e,!1,!1,!0),pricePerMonth:()=>Yi(e),pricePerMonthRounded:()=>Yi(e,!0),periodInMonths:()=>qi(e),durationInMonths:()=>Ji(e),durationInMonthsSingular:()=>Ji(e,!0),periodNumberInMonths:()=>Qi(e),percentagePriceDifferenceFromSku:()=>Zi(e,t,i),priceDifferenceFromSku:()=>en(e,t,i),promoEligible:()=>null===tn(e)&&null!==nn(e,t),freeTrialEligible:()=>null!==tn(e),promo:()=>{var i;return null===(i=nn(e,t))||void 0===i?void 0:i.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var i;return null===(i=an(e,t))||void 0===i?void 0:i.formattedPrice},promoPeriod:()=>rn(e,t,!1,!0),promoPeriodNumber:()=>rn(e,t,!1,!1,!0),promoDuration:()=>rn(e,t),promoDurationSingular:()=>rn(e,t,!0),introEligible:()=>!1,pricePerDay:()=>dn(e),pricePerWeek:()=>hn(e),pricePerWeekRounded:()=>hn(e,!0),introductoryPrice:()=>un(e,t),introductoryPeriod:()=>sn(e,t,!1,!0),introductoryPeriodNumber:()=>sn(e,t,!1,!1,!0),introductoryDuration:()=>sn(e,t),introductoryDurationSingular:()=>sn(e,t,!0),introductoryPricePerMonth:()=>ln(e,t),introductoryPricePerMonthRounded:()=>ln(e,t,!0),durationAbbrev:()=>Ki(e,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>Xi(e,!1,!1,!1,!0),introductoryDurationAbbrev:()=>sn(e,t,!1,!1,!1,!0),promoDurationAbbrev:()=>rn(e,t,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>rn(e,t,!0,!0,!1,!0),durationInMonthsAbbrev:()=>Ji(e,!1,!1,!1,!0),durationSingularAbbrev:()=>Ki(e,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>Xi(e,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>sn(e,t,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>rn(e,t,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>rn(e,t,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>Ji(e,!0,!1,!1,!0),periodAbbrev:()=>Ki(e,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>Xi(e,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>sn(e,t,!1,!0,!1,!0),promoPeriodAbbrev:()=>rn(e,t,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>rn(e,t,!1,!0,!0,!0),periodInMonthsAbbrev:()=>Ji(e,!1,!0,!1,!0),periodly:()=>function(e){if(!e)return null;var t=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!t)return null;var i=t[1],n=t[2],r=t[3],o=t[4],s=void 0!==i?parseInt(i,10):0,u=void 0!==n?parseInt(n,10):0,l=void 0!==r?parseInt(r,10):0;return(void 0!==o?parseInt(o,10):0)>0?null:l>0?1===l?a("nami_weekly"):2===l?a("nami_biweekly"):null:u>0?a(1===u?"nami_monthly":2===u?"nami_bimonthly":3===u?"nami_quarterly":6===u?"nami_biannually":12===u?"nami_yearly":"nami_monthly"):s>0?a("nami_yearly"):null}(xi(e)),iso_subscription_duration:()=>cn(e),invalid:()=>!1,unavailable:()=>!1}),Gi=(e,t,i,n=[])=>{if(!t)return null;var a=Hi(t,i,n);return a[e]?a[e]():null},Vi=e=>{var t=Ii(e);return t&&t.length?t[0].formattedPrice:null},Ki=(e,t,i,n,a)=>Ri(xi(e),t,i,n,a),Xi=(e,t,i,n,a)=>Ri(Ci(e),t,i,n,a),Yi=(e,t)=>{var i=Ii(e);if(!i||0===i.length)return null;var n=ji(i[0]);return n?Wi(i[0].priceCurrencyCode).format(t?Math.round(n):n):null},qi=(e,t)=>{var i=Ii(e);if(!i||0===i.length)return null;var n=i[0].billingPeriod;return Fi(n)?Ri("P1Y"===n?"P12M":n,!1,!1,!1,t):null},Ji=(e,t,i,n,a)=>{var r=Ii(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return Fi(o)?Ri("P1Y"===o?"P12M":o,t,i,n,a):null},Qi=e=>{if(!e)return 0;var t=Ii(e);return t&&t.length?Bi(t[0].billingPeriod):0},Zi=(e,t,i=[])=>{var n,a=Ii(e);if(!a||0===a.length)return null;var r=null===(n=Ni(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return $i(Ui(a[0].priceAmountMicros),Qi(e));var o=Ii(r);return $i(Ui(a[0].priceAmountMicros),Qi(e),(null==o?void 0:o.length)>0?Ui(o[0].priceAmountMicros):0,Qi(r))},en=(e,t,i=[])=>{var n,a=Ii(e);if(!a||0===a.length)return null;var r=null===(n=Ni(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return Oi(ji(a[0]));var o=Ii(r);return Oi(ji(a[0]),ji(o[0]),Wi(o[0].priceCurrencyCode))},tn=e=>Ci(e),nn=(e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"promo"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null},an=(e,t)=>{if(!e)return null;var i=nn(e,t);return i?_i(i,e.subscription_period):null},rn=(e,t,i,n,a,r)=>{var o=an(e,t);return Ri((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},on=(e,t)=>{if(!e)return null;var i=((e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"intro"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null})(e,t);return i?_i(i,e.subscription_period):null},sn=(e,t,i,n,a,r)=>{var o=on(e,t);return Ri((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},un=(e,t)=>{var i=on(e,t);return i?i.formattedPrice:null},ln=(e,t,i)=>{var n=on(e,t);if(!n)return null;var a=ji(n);return a?Wi(n.priceCurrencyCode).format(i?Math.round(a):a):null},dn=e=>{var t=Ii(e);if(!t||0===t.length)return null;var i,n,a=zi(t[0].priceAmountMicros)/(i=t[0].billingPeriod,(n=Bi(i))?30.437*n:1);return Wi(t[0].priceCurrencyCode).format(a)},hn=(e,t)=>{var i=Ii(e);if(!i||0===i.length)return null;var n,a,r=zi(i[0].priceAmountMicros)/(n=i[0].billingPeriod,(a=Bi(n))?52*a/12:1);return Wi(i[0].priceCurrencyCode).format(t?Math.round(r):r)},cn=e=>{var t=Ii(e)[0];return t?t.billingPeriod:null},mn="object"==typeof global&&global&&global.Object===Object&&global,fn="object"==typeof self&&self&&self.Object===Object&&self,vn=mn||fn||Function("return this")(),pn=vn.Symbol;var gn=Array.isArray,yn=Object.prototype,bn=yn.hasOwnProperty,wn=yn.toString,kn=pn?pn.toStringTag:void 0;var Sn=Object.prototype.toString;var En=pn?pn.toStringTag:void 0;function Mn(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":En&&En in Object(e)?function(e){var t=bn.call(e,kn),i=e[kn];try{e[kn]=void 0;var n=!0}catch(e){}var a=wn.call(e);return n&&(t?e[kn]=i:delete e[kn]),a}(e):function(e){return Sn.call(e)}(e)}function Tn(e){return null!=e&&"object"==typeof e}var Pn=pn?pn.prototype:void 0,An=Pn?Pn.toString:void 0;function Dn(e){if("string"==typeof e)return e;if(gn(e))return function(e,t){for(var i=-1,n=null==e?0:e.length,a=Array(n);++i<n;)a[i]=t(e[i],i,e);return a}(e,Dn)+"";if(function(e){return"symbol"==typeof e||Tn(e)&&"[object Symbol]"==Mn(e)}(e))return An?An.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function xn(e){return null==e?"":Dn(e)}function Cn(e,t,i){var n=e.length;return i=void 0===i?n:i,!t&&i>=n?e:function(e,t,i){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(i=i>a?a:i)<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var r=Array(a);++n<a;)r[n]=e[n+t];return r}(e,t,i)}var In=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Ln(e){return In.test(e)}var _n="\\ud800-\\udfff",Rn="["+_n+"]",Fn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Wn="\\ud83c[\\udffb-\\udfff]",On="[^"+_n+"]",$n="(?:\\ud83c[\\udde6-\\uddff]){2}",Nn="[\\ud800-\\udbff][\\udc00-\\udfff]",jn="(?:"+Fn+"|"+Wn+")"+"?",Bn="[\\ufe0e\\ufe0f]?",zn=Bn+jn+("(?:\\u200d(?:"+[On,$n,Nn].join("|")+")"+Bn+jn+")*"),Un="(?:"+[On+Fn+"?",Fn,$n,Nn,Rn].join("|")+")",Hn=RegExp(Wn+"(?="+Wn+")|"+Un+zn,"g");function Gn(e){return Ln(e)?function(e){return e.match(Hn)||[]}(e):function(e){return e.split("")}(e)}var Vn,Kn=(Vn="toUpperCase",function(e){var t=Ln(e=xn(e))?Gn(e):void 0,i=t?t[0]:e.charAt(0),n=t?Cn(t,1).join(""):e.slice(1);return i[Vn]()+n});var Xn,Yn=(Xn={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},function(e){return null==Xn?void 0:Xn[e]}),qn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Qn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var ea="\\ud800-\\udfff",ta="\\u2700-\\u27bf",ia="a-z\\xdf-\\xf6\\xf8-\\xff",na="A-Z\\xc0-\\xd6\\xd8-\\xde",aa="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ra="["+aa+"]",oa="\\d+",sa="["+ta+"]",ua="["+ia+"]",la="[^"+ea+aa+oa+ta+ia+na+"]",da="(?:\\ud83c[\\udde6-\\uddff]){2}",ha="[\\ud800-\\udbff][\\udc00-\\udfff]",ca="["+na+"]",ma="(?:"+ua+"|"+la+")",fa="(?:"+ca+"|"+la+")",va="(?:['’](?:d|ll|m|re|s|t|ve))?",pa="(?:['’](?:D|LL|M|RE|S|T|VE))?",ga="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",ya="[\\ufe0e\\ufe0f]?",ba=ya+ga+("(?:\\u200d(?:"+["[^"+ea+"]",da,ha].join("|")+")"+ya+ga+")*"),wa="(?:"+[sa,da,ha].join("|")+")"+ba,ka=RegExp([ca+"?"+ua+"+"+va+"(?="+[ra,ca,"$"].join("|")+")",fa+"+"+pa+"(?="+[ra,ca+ma,"$"].join("|")+")",ca+"?"+ma+"+"+va,ca+"+"+pa,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",oa,wa].join("|"),"g");function Sa(e,t,i){return e=xn(e),void 0===t?function(e){return Zn.test(e)}(e)?function(e){return e.match(ka)||[]}(e):function(e){return e.match(Qn)||[]}(e):e.match(t)||[]}var Ea=RegExp("['’]","g");var Ma,Ta=(Ma=function(e,t,i){return t=t.toLowerCase(),e+(i?Kn(xn(t).toLowerCase()):t)},function(e){return function(e,t,i){for(var n=-1,a=null==e?0:e.length;++n<a;)i=t(i,e[n],n,e);return i}(Sa(function(e){return(e=xn(e))&&e.replace(qn,Yn).replace(Jn,"")}(e).replace(Ea,"")),Ma,"")});function Pa(e,t,i){var n,a,r=null!==(n=null===(a=t.find(e=>e.id===i))||void 0===a?void 0:a.products)&&void 0!==n?n:[];return r.forEach(t=>{t.product_details=Ca(e,t.sku_ref_id||""),t.variables=function(e,t,i){if(!t)return{};var n=t.variables;if(!n)return ie({},t);Object.keys(n).forEach(t=>{if(Aa(n[t])){var a=xa(n[t],e,i);n[t]=function(e){if(!e||e.includes("null")||e.includes("undefined"))return"";if(/\$\{\s*(launch\.customAttributes\.|sku\.)\w+\s*}/.test(e))return"";return e}(a)}});var a={};return(()=>Object.keys(Hi({})))().forEach(t=>{if(void 0===n[t]){var r=Gi(t,e,void 0,i);null!==r&&(a[t]=r)}}),ie({},t,a,n)}(t.product_details,t,r)}),r}function Aa(e){return"string"==typeof e&&e.includes(r)}function Da(e,t,i){return t?(Object.keys(t).forEach(n=>{Aa(t[n])&&(t[n]=t[Ta(n)]=xa(t[n],e,i))}),ie({},t)):{}}var xa=(e,t,i)=>e.replace(o,(n,a)=>{var r,s,u,l,d=(null===(r=o.exec(e))||void 0===r?void 0:r.slice(1))||[];a=null!==(s=d[0])&&void 0!==s?s:a;var h=null!==(u=null===(l=d[1])||void 0===l?void 0:l.replace(":",""))&&void 0!==u?u:"";return Gi(a,t,h,i)});function Ca(e=[],t=""){return e.find(e=>e.product_ref_id===t)||null}var Ia=["conditionAttributes"];function La(e,t){return Array.isArray(e)?e.reduce((e,i)=>{var n=La(i,t);return Array.isArray(n)?[...e,...n]:[...e,n]},[]):null==e?e:"object"==typeof e?Object.entries(e).reduce((e,[i,n])=>{var a="newRow"===i?n:La(n,t);return ie({},e,{[i]:a})},{}):"string"==typeof e?Na(e,t):e}function _a(e,t,i,n={}){var a=i.productBaseComponents||i.components||[],r=i.productFeaturedComponents||a;return t.map(t=>{var i,o,s,u=t.featured?r:a,l=t.entitlements.map(e=>e.entitlement_ref_id),h=Ca(e.productDetails,t.sku_ref_id),c={freeTrialEligible:1==Gi("freeTrialEligible",h),introEligible:1==Gi("introEligible",h),promoEligible:1==Gi("promoEligible",h),invalid:Gi("invalid",h),unavailable:Gi("unavailable",h)},m=ie({},t,t.variables,c,{id:t.id,entitlements:l});o=t,s=e=>{for(var t,i=te(e);!(t=i()).done;){var n=t.value;n.sku=d(o),n.components&&s(n.components),n.collapseHeader&&n.collapseHeader.components&&s(n.collapseHeader.components)}},s(u);var f={sku:m,media:$a(n,{convertToUrl:!0})};return[null!==(i=t.featured)&&void 0!==i&&i,La(u,La(f,f))]},[])}function Ra(e,t){if(!t.loopSource)return[];var i="string"==typeof t.loopSource?JSON.parse(t.loopSource):t.loopSource,n=null!=i?i:[],a=t.groupBy,r=t.groupHeaderTemplate,o=e=>La(t.components,La({block:e},{block:e}));if(!a||!r)return n.map(o).filter(e=>null!=e);for(var s,u=[],l=new Map,d=te(n);!(s=d()).done;){var h=s.value,c=La(a,La({block:h},{block:h})),m=null==c?"":String(c);l.has(m)||(u.push(m),l.set(m,[])),l.get(m).push(h)}for(var f=[],v=0,p=u;v<p.length;v++){var g=p[v],y={key:g},b=La(r,La({group:y},{group:y}));f.push([b]);for(var w,k=te(l.get(g));!(w=k()).done;){var S=w.value;f.push(o(S))}}return f}function Fa(e,t){return t.assertions?t.assertions.every(Oa.bind(null,e)):!!t.orAssertions&&(!t.orAssertions.length||t.orAssertions.some(Oa.bind(null,e)))}function Wa(e,t,i,n=null){var a,o=null!==(a=null==e?void 0:e.flow)&&void 0!==a?a:{},u=o.manager,l=o.previousStepAvailable,d=o.nextStepAvailable,h=e.state,c={};return n&&(c={block:n}),c=ie({},c,{state:h,urlParams:s(),flow:{isLaunched:!(null==u||!u.flowOpen),previousStepAvailable:!!l,nextStepAvailable:!!d},launch:h.launch,sku:h.sku,customer:h.customer}),"string"==typeof t&&t.includes(r)&&(t=Na(t,c)),t}function Oa(e,{value:t,expected:i,operator:n},a){if(t=Wa(e,t,0,a),i=Wa(e,i,0,a),"equals"===n)return t===i;if("notEquals"===n)return t!==i;if("contains"===n){var r;if(Array.isArray(t)||"string"==typeof t||t instanceof String||(t=t.toString()),"collapse"==i)i+="_"+(null===(r=e.getCurrentCollapsibleSku())||void 0===r?void 0:r.skuId);return t.includes(i)}return"notContains"===n?(Array.isArray(t)||"string"==typeof t||t instanceof String||(t=t.toString()),!t.includes(i)):"set"===n?"boolean"==typeof i?!!t&&!t.toString().match(l)===i:!!t&&!t.toString().match(l):"notSet"===n?!t||t.toString().match(l):"gt"===n?t>i:"gte"===n?t>=i:"lt"===n?t<i:"lte"===n&&t<=i}function $a(e,{convertToUrl:t}={convertToUrl:!1}){return Object.entries(e).reduce((e,[i,{content:n}])=>(t&&"string"!=typeof n&&n&&(n=URL.createObjectURL(n)),ie({},e,{[i]:n})),{})}function Na(e,t){var i=e;if("string"!=typeof e)return i;for(var n,a=new RegExp(u.source,u.flags),r=[];null!==(n=a.exec(e))&&(r.push(n),a.global);)n.index===a.lastIndex&&a.lastIndex++;for(var o=0,s=r;o<s.length;o++){var l=s[o],d=l[0],h=l[1],c=Na(h,t);if(d===e)return m(d,c);c!==h&&(i=i.replace(h,c)),i=i.replace(u,m)}return i;function m(e,i){var n=String(i).split("."),a=n[0];if(!a)return e;var r=ja(t,a);if(void 0===r)return e;if("object"==typeof r&&null!==r&&0===Object.keys(r).length)return"";var o=ja(t,...n);return void 0===o?"":"string"!=typeof o?o:Na(o,t)}}function ja(e,...t){for(var i=e,n=0,a=t;n<a.length;n++){var r=a[n];if(null==i)return;i=Array.isArray(i)?i[+r]:i[r]}return i}var Ba=e=>{var t=e.state.timeSpentOnPaywall;if(t)return Date.now()-t},za=e=>{if(!e)return null;if(e.includes("#"))return e;var t=e.match(/[\d.]+/g);if(!t||t.length<3)return null;var i=t.map(Number),n=i[0],a=i[1],r=i[2],o=i[3],s=e=>Math.round(e).toString(16).padStart(2,"0"),u=void 0!==o&&o<1?s(255*o):"";return`#${s(n)}${s(a)}${s(r)}${u}`},Ua=(e,t)=>{if(!e||!t)return!0;var i=null!=e&&e.includes("rgb")?za(e):e,n=null!=t&&t.includes("rgb")?za(t):t;return(null==i?void 0:i.toLowerCase())===(null==n?void 0:n.toLowerCase())},Ha=!0,Ga=!1,Va=!1,Ka=!1,Xa=!1,Ya=!1,qa=null,Ja=null,Qa=null,Za=!1,er="",tr=!1,ir=null,nr=null,ar=null,rr=null,or=null,sr=null,ur=null,lr=null,dr=!1,hr=null,cr="",mr=0,fr=1,vr=null,pr=[],gr=new WeakMap,yr=new WeakMap,br=1;function wr(e){var t=yr.get(e);return t||(t=br++,yr.set(e,t)),String(t)}var kr=null,Sr=null;function Er(e){return!0===e||"true"===e||"1"===e||"yes"===e}function Mr(e,t){if(function(){if("undefined"==typeof window)return!1;try{var e,t;return!!Er(window.NAMI_TTS_DEBUG)||Er(null===(e=window.localStorage)||void 0===e?void 0:e.getItem("nami:tts:debug"))||Er(null===(t=window.localStorage)||void 0===t?void 0:t.getItem("NAMI_TTS_DEBUG"))}catch(e){return!1}}())try{t?console.debug(`[Nami TTS] ${e}`,t):console.debug(`[Nami TTS] ${e}`)}catch(e){}}function Tr(e="TTS is unavailable in this runtime."){Ga||(Ga=!0,Mr(e))}function Pr(e){if(!e)return"none";var t=e.id?`#${e.id}`:"",i=e.getAttribute("data-testid"),n=i?`[data-testid="${i}"]`:"";return`${e.tagName.toLowerCase()}${t}${n}`}function Ar(e){return function(e){return null==e?"":String(e).replace(/[^.!?\n]*\$\{[^}]*subscribeUrl[^}]*\}[^.!?\n]*[.!?]?/gi,"To subscribe, follow the on-screen instructions.").replace(/\$\{[^}]+\}/g," ").replace(/\s+([.,!?;:])/g,"$1").replace(/\s+/g," ").trim()}(e)}function Dr(e){return e.toLowerCase().replace(/[^a-z0-9$]+/g," ").replace(/\s+/g," ").trim()}function xr(e){return Ar(String(null!=e?e:"").replace(/<[^>]*>/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[*_`#>~]/g," "))}function Cr(e,t){var i=Ar(t);i&&e[e.length-1]!==i&&e.push(i)}function Ir(e,t=[]){var i=[];return[...e,...t].forEach(e=>{var t=function(e){var t=Ar(e);if(!t)return[];for(var i=[],n=0,a=0;a<t.length;a+=1){var r=t.charAt(a),o=t.charAt(a+1);if(("."===r||"!"===r||"?"===r)&&(!o||/\s/.test(o))){var s=Ar(t.slice(n,a+1));for(s&&i.push(s);a+1<t.length&&/\s/.test(t.charAt(a+1));)a+=1;n=a+1}}var u=Ar(t.slice(n));u&&i.push(u);return i.length?i:[t]}(e);t.length||Cr(i,e),t.forEach(e=>Cr(i,e))}),i.slice(0,60)}function Lr(e){return Ar(e.join(". ").replace(/\.\s*([.!?])/g,"$1"))}function _r(e){var t,i=vr;i&&(e&&i.id===e||(i.status="cancelled",(null===(t=vr)||void 0===t?void 0:t.id)===i.id&&(vr=null)))}function Rr(){if("undefined"==typeof document)return null;for(var e=document.activeElement;e&&null!==(t=e.shadowRoot)&&void 0!==t&&t.activeElement;){var t,i,n;e=null!==(i=null===(n=e.shadowRoot)||void 0===n?void 0:n.activeElement)&&void 0!==i?i:e}return e}function Fr(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot}function Wr(e){for(var t=[],i=null!=e?e:null;i;){i instanceof Element&&-1===t.indexOf(i)&&t.push(i);var n=i.parentNode;i=Fr(n)?n.host:n}return t}function Or(e,t){return!!t&&-1!==Wr(t).indexOf(e)}function $r(e,t){if(!t)return!1;if(t===e)return!0;if(e.contains(t))return!0;var i=e.shadowRoot;return!!i&&(i.activeElement===t||i.contains(t))}function Nr(e){return $r(e,Rr())}function jr(e,t){t&&-1===e.indexOf(t)&&e.push(t)}function Br(e,t){var i=t.shadowRoot;i&&i.querySelectorAll('button,[role="button"],a,input,select,textarea,[tabindex]:not([tabindex="-1"])').forEach(t=>jr(e,t))}function zr(e,t){var i,n=("function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():null!==(i=null==t?void 0:t.composedPath)&&void 0!==i?i:[]).filter(e=>e instanceof Element);return n.length?n:Wr(e)}function Ur(e,t=[]){var i=[],n=(t.length?t:Wr(e)).filter(e=>e.isConnected),a=function(e,t){var i,n=t.find(e=>e.matches("nami-product-container"));if(n)return n;var a=Wr(e).find(e=>e.matches("nami-product-container"));if(a)return a;var r=Qa&&"querySelectorAll"in Qa?Qa:"undefined"!=typeof document?document:null;return r&&null!==(i=Array.prototype.slice.call(r.querySelectorAll("nami-product-container")).find(t=>Or(t,e)))&&void 0!==i?i:null}(e,n);return jr(i,e),Br(i,e),n.forEach(t=>{var n=!!a&&(t===a||Or(a,t)),r=t!==e&&Or(t,e),o=t.matches('nami-product-container,nami-button,[role="button"],button,[tabindex]:not([tabindex="-1"])');(n||r||t===e)&&o&&(jr(i,t),Br(i,t))}),null!=a&&a.isConnected&&(jr(i,a),Br(i,a)),i}function Hr(e){return"true"===e.getAttribute("data-tts-composite-active")||"true"===e.getAttribute("data-webos-luna-composite-active")}function Gr(e){return!!e&&pr.some(t=>t.getAttribute("data-tts-composite-transaction")===String(e)||t.getAttribute("data-webos-luna-composite-transaction")===String(e))}function Vr(e){var t,i;return pr.length?e?null!==(i=pr.find(t=>t.getAttribute("data-tts-composite-transaction")===String(e)||t.getAttribute("data-webos-luna-composite-transaction")===String(e)))&&void 0!==i?i:null:null!==(t=pr[0])&&void 0!==t?t:null:null}function Kr(e,t,i){var n=Ar(t);return!!n&&(gr.has(e)||gr.set(e,{"aria-label":e.getAttribute("aria-label"),"speech-label":e.getAttribute("speech-label"),"data-speech":e.getAttribute("data-speech"),"data-tts-spoken-label":e.getAttribute("data-tts-spoken-label"),"data-tts-composite-label":e.getAttribute("data-tts-composite-label"),"data-tts-composite-active":e.getAttribute("data-tts-composite-active"),"data-tts-composite-transaction":e.getAttribute("data-tts-composite-transaction"),"data-webos-luna-composite-active":e.getAttribute("data-webos-luna-composite-active"),"data-webos-luna-composite-transaction":e.getAttribute("data-webos-luna-composite-transaction")}),e.setAttribute("aria-label",n),e.setAttribute("speech-label",n),e.setAttribute("data-speech",n),e.setAttribute("data-tts-composite-label",n),e.setAttribute("data-tts-composite-active","true"),i&&e.setAttribute("data-tts-composite-transaction",String(i)),e.setAttribute("data-webos-luna-composite-active","true"),i&&e.setAttribute("data-webos-luna-composite-transaction",String(i)),!0)}function Xr(e,t,i,n=[]){var a=Ar(t);if(!a)return!1;Jr(),qr(void 0,void 0,"new-composite",!0);var r=Ur(e,n);return r.forEach(e=>Kr(e,a,i)),pr=r,!0}function Yr(e,t,i){if(!(t instanceof Element))return!1;if(!t.isConnected||!i)return!1;if(!function(e){var t;return!(!e||(null===(t=vr)||void 0===t?void 0:t.id)!==e||"composite"!==vr.reason||!Gr(e))}(i))return!1;if(!t.matches("nami-product-container"))return!1;var n=vr;if(null==n||!n.text)return!1;var a=[];jr(a,t),Br(a,t);var r=[];return a.forEach(e=>{Kr(e,n.text,i)&&(jr(pr,e),jr(r,e))}),r.length>0}function qr(e,t,i="manual",n=!1){var a,r=e&&-1===pr.indexOf(e)?Ur(e):pr;if(r.length){var o=vr,s=r.map(e=>e.getAttribute("data-tts-composite-transaction")||e.getAttribute("data-webos-luna-composite-transaction")).find(Boolean);!n&&t&&s&&String(t)!==s?Mr("composite restore skipped: transaction mismatch",{reason:i}):n||!o||t&&t===o.id||!r.some(e=>Hr(e))?(Jr(),r.forEach(e=>{var t=gr.get(e);t&&(Object.keys(t).forEach(i=>function(e,t,i){null===i?e.removeAttribute(t):e.setAttribute(t,i)}(e,i,t[i])),gr.delete(e))}),e&&-1===pr.indexOf(e)||(pr=[]),!t||(null===(a=vr)||void 0===a?void 0:a.id)!==t||e&&vr.element!==e||(vr.status="ended",vr=null)):Mr("composite restore skipped: active transaction mismatch",{reason:i})}}function Jr(){ar&&(clearTimeout(ar),ar=null)}function Qr(){rr&&(clearTimeout(rr),rr=null),kr=null}function Zr(){or&&(clearTimeout(or),or=null)}function eo(){sr&&(clearTimeout(sr),sr=null)}function to(){ur&&(clearTimeout(ur),ur=null)}function io(){lr&&(clearTimeout(lr),lr=null)}function no(e){dr=!0,io(),lr=setTimeout(()=>{lr=null,dr=!1},oo(e)+500)}function ao(){io(),dr=!1}function ro(e){pr.length&&qr(void 0,void 0,e,!0)}function oo(e){var t=Ar(e),i=350*(t?t.split(/\s+/).filter(Boolean).length:0);return Math.min(3e4,Math.max(4e3,i))}function so(e,t="",i="estimated-speech-duration"){if(Vr(e)){var n=oo(t);Jr(),ar=setTimeout(()=>{ar=null;var t=Vr(e);t&&(Nr(t)||qr(t,e,i))},n)}}function uo(){return"undefined"==typeof window?null:window}function lo(){var e,t=null===(e=uo())||void 0===e||null===(e=e.webOS)||void 0===e||null===(e=e.service)||void 0===e?void 0:e.request;return"function"==typeof t?t:null}function ho(){return!!lo()}function co(){var e;if("undefined"==typeof window)return null;var t=null===(e=window.VIZIO)||void 0===e?void 0:e.Chromevox;return t&&"function"==typeof t.play?t:null}function mo(){return"undefined"!=typeof window&&void 0!==window.speechSynthesis&&"function"==typeof window.speechSynthesis.speak&&"function"==typeof window.SpeechSynthesisUtterance}function fo(){var e;if("undefined"==typeof window)return!1;var t=window,i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"";return!(!t.VIZIO&&-1===i.indexOf("vizio"))}function vo(){var e,t;if("undefined"==typeof window)return!1;if(fo())return!1;var i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"",n=uo();return!!(null!=n&&n.webOS||null!=n&&n.webOSDev||null!=n&&n.PalmSystem||null!=n&&null!==(t=n.webOS)&&void 0!==t&&null!==(t=t.platform)&&void 0!==t&&t.tv||-1!==i.indexOf("webos")||-1!==i.indexOf("netcast"))}function po(){var e;if("undefined"==typeof window)return!1;var t=window,i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"";return!!(t.tizen||-1!==i.indexOf("tizen")||-1!==i.indexOf("samsung")&&(-1!==i.indexOf("smart-tv")||-1!==i.indexOf("smarttv"))||-1!==i.indexOf("samsungbrowser")&&-1!==i.indexOf("tv"))}function go(){var e;return"undefined"!=typeof window&&-1!==((null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"").indexOf("xbox")}function yo(){if("undefined"==typeof window)return!1;try{return"television"===h()}catch(e){return!1}}function bo(){if(Xa)return!1;var e=co();if(!e)return!1;try{return"function"!=typeof e.isEnabled||e.isEnabled()}catch(e){return!1}}function wo(){return{televisionRuntime:yo(),televisionTtsRuntime:ko(),webos:vo(),tizen:po(),vizio:fo(),xbox:go(),hasWebOsServiceRequest:ho(),webOsRequestType:typeof lo(),hasWebSpeechApi:mo(),webSpeechUnavailableForSession:Va,webOsLunaUnavailableForSession:Ka,vizioChromevoxUnavailableForSession:Xa}}function ko(){return yo()||vo()||fo()||po()}function So(){return ko()&&!Va&&mo()}function Eo(e){if(Ya=e,Mr("set media playing",{playing:e,hasDeferredUtterance:!!qa}),!e&&qa){var t,i=qa;if(qa=null,i.options.transactionId&&(null===(t=vr)||void 0===t?void 0:t.id)!==i.options.transactionId)return void Mr("drop stale deferred speech",{transactionId:i.options.transactionId,reason:i.options.reason});Bo(i.text,i.options)}}function Mo(e){Va=!0,Tr(vo()?"Web Speech TTS unavailable in this webOS runtime":"Web Speech TTS unavailable in this runtime"),Mr("web speech unavailable",{error:e})}function To(e){Ka=!0,Mr("webOS Luna unavailable",{error:e})}function Po(e,t){qa={text:e,options:t}}var Ao={name:"webos-luna-tts",platform:"webos",isAvailable:function(){return ko()&&!fo()&&!Ka&&ho()},speak:function(e,t){Mr("speakViaWebOsLuna:enter",{textPreview:e.slice(0,160),reason:t.reason,transactionId:t.transactionId,requestType:typeof lo()});var i=lo();if(!i)return Mr("speakViaWebOsLuna:no-request"),!1;var n="composite"===t.reason,a=!1,r=()=>{var r,o;if(sr=null,t.transactionId&&(null===(r=vr)||void 0===r?void 0:r.id)!==t.transactionId)return Mr("speakViaWebOsLuna:drop-stale-delayed-speak",{transactionId:t.transactionId,activeTransaction:null===(o=vr)||void 0===o?void 0:o.id,reason:t.reason}),!1;if(Ya)return Mr("speakViaWebOsLuna:defer-delayed-speak-media-playing",{transactionId:t.transactionId,reason:t.reason}),Po(e,t),!0;var s=!1;try{Mr("speakViaWebOsLuna:request",{uri:"luna://com.webos.service.tts",method:"speak",delayedComposite:n,textPreview:e.slice(0,160)}),i("luna://com.webos.service.tts",{method:"speak",parameters:{text:e,clear:!0,feedback:!0},onSuccess:i=>{var n;if(Mr("speakViaWebOsLuna:onSuccess",{response:i,transactionId:t.transactionId}),!t.transactionId||(null===(n=vr)||void 0===n?void 0:n.id)===t.transactionId){var r=function(e){var t,i=Ar(null!==(t=null==e?void 0:e.msgStatus)&&void 0!==t?t:null==e?void 0:e.status).toLowerCase();return"done"===i||"stopped"===i||"canceled"===i||"cancelled"===i||"error"===i}(i),o=!(null==i||!i.returnValue||"msgStatus"in Object(null!=i?i:{}));a||!r&&!o||(a=!0,function(e,t,i){var n,a=Gr(e),r=!e||(null===(n=vr)||void 0===n?void 0:n.id)===e;e&&r&&vr&&!a?(vr.status="ended",vr=null):e&&r&&vr&&(vr.status="ended"),a&&r&&so(e,t,i)}(t.transactionId,e,r?"webos-feedback":"estimated-speech-duration"))}},onFailure:i=>{var n;s=!0,Mr("speakViaWebOsLuna:onFailure",{error:i,transactionId:t.transactionId});var a=Gr(t.transactionId),r=!t.transactionId||(null===(n=vr)||void 0===n?void 0:n.id)===t.transactionId;t.transactionId&&r&&vr&&!a?(vr.status="cancelled",vr=null):t.transactionId&&r&&vr&&(vr.status="cancelled"),To(i),a&&r&&so(t.transactionId,e,"estimated-speech-duration-after-failure")}})}catch(e){var u;return t.transactionId&&(null===(u=vr)||void 0===u?void 0:u.id)===t.transactionId&&(vr.status="cancelled",vr=null),To(e),!1}return!s};if(n)return eo(),Mr("speakViaWebOsLuna:delay-composite-until-focus-settles",{delayMs:250,transactionId:t.transactionId}),sr=setTimeout(r,250),!0;return r()},stop:Co},Do={name:"web-speech",platform:"web",isAvailable:So,speak:function(e,t){if(!So())return!1;try{var i=new window.SpeechSynthesisUtterance(e);return i.onstart=()=>{var e;t.transactionId&&(null===(e=vr)||void 0===e?void 0:e.id)===t.transactionId&&(vr.status="started")},i.onend=()=>{var e=vr,i=!t.transactionId||(null==e?void 0:e.id)===t.transactionId;t.transactionId&&i&&e&&(e.status="ended",vr=null)},i.onerror=e=>{var i,n=e.error;t.transactionId&&(null===(i=vr)||void 0===i?void 0:i.id)===t.transactionId&&(vr.status="cancelled",vr=null),"synthesis-failed"===n&&Mo(n)},window.speechSynthesis.speak(i),!0}catch(e){return Mo("exception"),!1}},stop:()=>{if(mo())try{window.speechSynthesis.cancel()}catch(e){}}},xo={name:"vizio-chromevox",platform:"vizio",isAvailable:bo,speak:Lo,stop:Io};function Co(){var e=lo();if(e)try{e("luna://com.webos.service.tts",{method:"stop",parameters:{},onFailure:e=>Mr("webOS Luna stop failed",{error:e})})}catch(e){Mr("webOS Luna stop threw",{error:e})}}function Io(e=!0){var t=!!or,i=dr;Zr();var n=co(),a=function(){var e;if("undefined"==typeof window)return null;var t=null===(e=window.chrome)||void 0===e||null===(e=e.tts)||void 0===e?void 0:e.stop;return"function"==typeof t?t:null}();if((n||a)&&(i||t||a)&&(i||!t||a))try{var r=!1;n&&"function"==typeof n.stop&&(n.stop(),r=!0),n&&"function"==typeof n.cancel&&n.cancel(),n&&"function"==typeof n.pause&&n.pause(),a&&(a(),r=!0),n&&e&&!r&&i&&n.play(""),ao()}catch(e){ao(),Mr("VIZIO stop threw",{error:e})}}function Lo(e,t){var i=co();if(!i)return!1;try{var n,a,r=!0===(null===(n=t.element)||void 0===n?void 0:n.isConnected),o="composite"===t.reason?1400:"focus"===t.reason?700:0;return o>0?(Zr(),or=setTimeout(()=>{var n;if(or=null,!t.transactionId||!vr||vr.id===t.transactionId)if(t.element&&r&&!t.element.isConnected){var a;t.transactionId&&(null===(a=vr)||void 0===a?void 0:a.id)===t.transactionId&&(vr.status="cancelled",vr=null)}else{if(Ya)return Qr(),Sr=null,void Po(e,t);i.play(e),no(e),t.transactionId&&(null===(n=vr)||void 0===n?void 0:n.id)===t.transactionId&&(vr.status="ended",vr=null)}},o),!0):(i.play(e),no(e),t.transactionId&&(null===(a=vr)||void 0===a?void 0:a.id)===t.transactionId&&(vr.status="ended",vr=null),!0)}catch(e){return function(e){Xa=!0,Mr("VIZIO Chromevox unavailable",{error:e})}(e),!1}}function _o(e){return"high"===e?3:"normal"===e?2:1}function Ro(){return Date.now()-mr<1500}function Fo(e){return Dr(e)}function Wo(e){if(!e)return"";var t=function(e){return e?[e.tagName.toLowerCase(),e.id||"",e.getAttribute("data-component-id")||"",e.getAttribute("data-nami-id")||"",e.getAttribute("data-testid")||"",`el-${wr(e)}`].filter(Boolean).join("|"):""}(e);return Dr(t||Vo(e))}function Oo(e){var t=Fo(e);return"clickable"===t||"button"===t||"focusable"===t||"selected"===t||"unselected"===t}function $o(e,t,i){var n;if(Sr={textKey:Fo(e),reason:t.reason,timestamp:Date.now()},"high"===i){var a=oo(e),r=Date.now();kr={transactionId:t.transactionId,pageKey:er,element:null!==(n=t.element)&&void 0!==n?n:null,elementKey:Wo(t.element),textKey:Fo(e),startedAt:r,suppressUntil:r+a},rr&&clearTimeout(rr),rr=setTimeout(()=>{rr=null,kr=null},a)}}function No(e,t=!0){var i,n,a,r=!(!e||(null===(i=vr)||void 0===i?void 0:i.id)!==e||"pending"!==vr.status);if(Mr("stopSpeech",{preserveTransactionId:e,allowVizioEmptyFallback:t,activeTransaction:null===(n=vr)||void 0===n?void 0:n.id,reason:null===(a=vr)||void 0===a?void 0:a.reason,preservingCurrentTransaction:r}),qa=null,r||(to(),eo()),e||(Qr(),Jr(),ro("stop")),_r(e),nr&&(clearTimeout(nr),nr=null),!r){if(mo())try{window.speechSynthesis.cancel()}catch(e){}vo()&&Co(),fo()&&Io(t)}}function jo(){No()}function Bo(e,t={}){var i,n,a;Mr("speakText:enter",{textPreview:Ar(e).slice(0,160),reason:t.reason,transactionId:t.transactionId,element:Pr(t.element),runtime:wo()});var r=Ar(e);if(!r)return!1;if(!ko())return Mr("skip speech: non-CTV runtime"),!1;var o={interrupt:!1!==t.interrupt,reason:null!==(i=t.reason)&&void 0!==i?i:"manual",transactionId:t.transactionId,element:t.element,focusPath:t.focusPath,focusedLabel:t.focusedLabel,priority:t.priority},s=function(e,t){return t.priority?t.priority:"composite"===t.reason?"high":Oo(e)?"low":"normal"}(r,o);if(function(e,t,i){var n=Fo(e),a=Date.now(),r=Wo(t.element);if(Oo(e))return!0;if(Sr&&Sr.reason===t.reason&&Sr.textKey===n&&a-Sr.timestamp<600)return Mr("suppress:duplicate-request",{reason:t.reason,textPreview:e.slice(0,120)}),!0;if(!kr)return!1;if(_o(i)>=_o("high"))return!1;if("focus"===t.reason){var o=kr.textKey;if(!Ro()&&(n===o||n.includes(o)))return Mr("suppress:focus-text-is-active-composite",{textPreview:e.slice(0,120),transactionId:kr.transactionId,element:Pr(t.element)}),!0}var s=function(e,t){return!!e&&!!t&&e===t}(t.element,kr.element),u=!!r&&kr.elementKey===r,l=!kr.pageKey||kr.pageKey===er,d=Ro(),h=l&&!d&&a<kr.startedAt+2500;return!(!s&&!u&&(l&&"focus"===t.reason&&t.element&&kr.element!==t.element||"low"!==i&&!h)&&(Qr(),1))}(r,o,s))return!1;if(o.interrupt&&No(o.transactionId,!1),Ya)return Po(r,o),!0;var u=function(e){var t;return"manual"!==(null!==(t=e.reason)&&void 0!==t?t:"manual")&&e.element?po()?"accessibility-label":vo()||fo()?"programmatic":"accessibility-label":"programmatic"}(o);Mr("speakText:owner",{owner:u,reason:o.reason,element:Pr(o.element)});var l,d,h="programmatic"===u?function(){if(!ko())return null;var e=fo(),t=go(),i=vo();return xo.isAvailable()?(Mr("resolveTtsEngine:selected",{engine:"vizio-chromevox"}),xo):e?null:Ao.isAvailable()?(Mr("resolveTtsEngine:selected",{engine:"webos-luna-tts"}),Ao):t?Do.isAvailable()?Do:null:Do.isAvailable()?(Mr("resolveTtsEngine:selected",{engine:"web-speech"}),Do):(Mr("tts engine unavailable",{webos:i,vizio:e,xbox:t}),null)}():null;(Mr("speakText:engine",{engine:null!==(n=null==h?void 0:h.name)&&void 0!==n?n:null,owner:u}),"composite"===o.reason&&o.transactionId&&o.element&&function(e){return"accessibility-label"===e||vo()}(u))&&Xr(o.element,r,o.transactionId,null!==(l=o.focusPath)&&void 0!==l?l:[]);if("accessibility-label"===u)return"focus"===o.reason&&o.element&&o.element.setAttribute("aria-label",r),o.transactionId&&(null===(d=vr)||void 0===d?void 0:d.id)===o.transactionId&&(vr.status="started"),$o(r,o,s),!0;if(!h)return function(e,t){if(!fo()||Xa)return!1;var i=Date.now(),n=()=>{var a;ur=null,t.transactionId&&vr&&vr.id!==t.transactionId||(bo()?Lo(e,t):Date.now()-i>=8e3?t.transactionId&&(null===(a=vr)||void 0===a?void 0:a.id)===t.transactionId&&(vr.status="cancelled",vr=null):ur=setTimeout(n,250))};return to(),ur=setTimeout(n,250),!0}(r,o)?($o(r,o,s),!0):(Tr(),!1);var c=h.speak(r,o);if(Mr("speakText:engine-result",{engine:h.name,accepted:c,reason:o.reason,transactionId:o.transactionId}),c&&$o(r,o,s),c)return c;if("webos-luna-tts"!==h.name&&"vizio-chromevox"!==h.name)return c;if(!o.element)return c;var m=Xr(o.element,r,o.transactionId,null!==(a=o.focusPath)&&void 0!==a?a:[]);return Mr("speakText:aria-label-fallback",{engine:h.name,accepted:m,reason:o.reason}),m&&$o(r,o,s),m}function zo(e){var t=e.component;return e.hasAttribute("data-nami-primary-cta")||!0===(null==t?void 0:t.focused)||"productButton"===(null==t?void 0:t.namiComponentType)}function Uo(e){var t,i=null===(t=e.getAttribute("role"))||void 0===t?void 0:t.toLowerCase();return"button"===e.tagName.toLowerCase()||"button"===i||e.matches("nami-button,nami-play-pause-button,nami-volume-button,nami-toggle-button")}function Ho(e){return Ar(e).replace(/(?:,\s*)?\bbutton\b\s*$/i,"").trim()||Ar(e)}function Go(e){return Ar(e.innerText||e.textContent||"")}function Vo(e){if(!e)return"";if(Hr(e)){var t=function(e){var t=gr.get(e);return t?Ar(t["data-tts-spoken-label"]||t["data-speech"]||t["speech-label"]||t["aria-label"]||e.getAttribute("title")||""):""}(e);if(t)return t;var i=Ko(e.component);if(i)return i}var n=e.getAttribute("data-tts-spoken-label");if(n)return Ar(n);var a=Ko(e.component);if(a)return a;var r=e.getAttribute("data-speech")||e.getAttribute("speech-label")||e.getAttribute("aria-label")||e.getAttribute("title");return r?Ar(r):Go(e)}function Ko(e){if(!e||e.hidden)return"";var t=e,i=Ar(t.speechLabel||t.speech_label||t.screenreaderText||t.title||t.alt||t.text||(Array.isArray(t.texts)?t.texts.join(", "):""));if(i)return i;for(var n,a=te(Yo(t));!(n=a()).done;){var r=Ko(n.value);if(r)return r}return""}function Xo(e,t){if(Mr("applySpeechAttributes:enter",{element:Pr(e),label:t,activeComposite:Hr(e)}),!Hr(e)){var i=Ar(t),n=function(e,t){var i=Ar(t);return i?Uo(e)?Ho(i):i:""}(e,t);if(!n)return e.removeAttribute("speech-label"),e.removeAttribute("data-speech"),e.removeAttribute("data-tts-spoken-label"),void e.removeAttribute("aria-label");i?e.setAttribute("data-tts-spoken-label",i):e.removeAttribute("data-tts-spoken-label"),e.setAttribute("speech-label",n),e.setAttribute("data-speech",n),e.setAttribute("aria-label",function(e,t){return Uo(e)?Ho(t):Ar(t)}(e,n))}}function Yo(e){for(var t=[],i=0,n=["components","playingComponents","pausedComponents","mutedComponents","volumeComponents","productBaseComponents","productFeaturedComponents"];i<n.length;i++){var a=null==e?void 0:e[n[i]];Array.isArray(a)&&t.push(...a)}return null!=e&&e.collapseHeader&&(Array.isArray(e.collapseHeader)?t.push(...e.collapseHeader):t.push(e.collapseHeader)),t}function qo(e,t,i){if(e&&!e.hidden&&!function(e){if(!e||e.hidden)return!1;var t=e,i=String(t.component||t.namiComponentType||"").toLowerCase();return-1!==i.indexOf("button")||-1!==i.indexOf("toggle")||-1!==i.indexOf("checkbox")||-1!==i.indexOf("radio")||-1!==i.indexOf("select")||-1!==i.indexOf("input")||!!t.onTap||!!t.sku||!0===t.focused}(e)){var n=function(e){if(!e||e.hidden)return"";var t=e;switch(e.component){case"text":case"countdownTimerText":return xr(t.screenreaderText||t.text);case"text-list":return Array.isArray(t.texts)?xr(t.texts.join(", ")):"";case"videoUrl":case"progressBar":return Ar(t.screenreaderText);default:return""}}(e);Cr(t,n),Yo(e).forEach(e=>qo(e,t))}}function Jo(e,t){var i=[];if(!e)return i;var n=e;return[n.header,n.contentContainer,n.footer,n.backgroundContainer,n.components].forEach(e=>{Array.isArray(e)?e.forEach(e=>qo(e,i)):qo(e,i)}),i}function Qo(e,t){var i=Jo(e),n=function(e){if(!e)return"";var t=Ko(e.component),i=e.getAttribute("data-speech")||e.getAttribute("speech-label")||e.getAttribute("aria-label")||e.getAttribute("title")||Go(e),n=Ar(t||i);return n?Uo(e)&&!/\bbutton\b\s*$/i.test(n)?Ar(`${n} button`):n:""}(t);return Lr(Ir(i,n?[n]:[]))}function Zo(e){return e?Dr(`${Ar(e.id||e.name||"")}|${Lr(Ir(Jo(e),[]))}`):""}function es(){return tr}function ts(e){Mr("setActivePage:enter",{nextKey:Zo(e),previousKey:er,activePageAnnounced:Za,pageName:Ar((null==e?void 0:e.name)||(null==e?void 0:e.id)||"")});var t=er;Ja=e,function(e){var t=Zo(e);if(t!==er){var i=!er&&!!hr;Za=!1,er=t,tr=i,hr=null,cr=""}}(e),t!==er&&No(void 0,!1)}function is(e,t){if(Mr("prepareInitialComposite:enter",{element:Pr(e),activePageKey:er,activePageAnnounced:Za,blockedByNavigation:es(),label:Vo(e),isPrimary:zo(e)}),!Ja||Za||!zo(e)||es())return Mr("prepareInitialComposite:skip",{hasActivePage:!!Ja,activePageAnnounced:Za,isPrimary:zo(e),blockedByNavigation:es()}),!1;var i=Qo(Ja,e);if(!i)return!1;var n=zr(e,t),a=function(e,t,i){var n={id:fr++,reason:e,element:i,text:t,page:Ja,status:"pending"};return vr=n,n}("composite",i,e);Za=!0,hr=e,cr=Wo(e);var r,o=Bo(i,{reason:"composite",interrupt:!0,transactionId:a.id,element:e,focusPath:n,focusedLabel:Vo(e),priority:"high"});o||(Za=!1,(null===(r=vr)||void 0===r?void 0:r.id)===a.id&&(vr.status="cancelled",vr=null));return o}function ns(e,t){Mr("preparePrimaryCtaCompositeFocus:enter",{element:Pr(e),label:Vo(e),activePageKey:er,activePageAnnounced:Za});var i=is(e,t);return Mr("preparePrimaryCtaCompositeFocus:result",{result:i,activePageKey:er,activePageAnnounced:Za}),i}function as(e){Mr("handleNativeFocusIn:enter",{target:e.target instanceof Element?Pr(e.target):String(e.target),activePageKey:er,activePageAnnounced:Za});var t=function(e){for(var t,i=null,n=te("function"==typeof e.composedPath?e.composedPath():[]);!(t=n()).done;){var a=t.value;if(a instanceof Element&&Vo(a)){if(a.tagName.toLowerCase().startsWith("nami-"))return a;i||(i=a)}}return null!=i?i:e.target instanceof Element?e.target:null}(e);t&&rs(t,e)}function rs(e,t){if(Mr("handleFocusedElementForSpeech:enter",{element:Pr(e),label:Vo(e),ttsEnabled:Ha,runtime:wo(),activePageKey:er,activePageAnnounced:Za,lastFocused:Pr(hr),lastFocusedElementIdentity:cr}),!e)return Mr("handleFocusedElementForSpeech:skip-basic",{hasElement:!!e,ttsEnabled:Ha}),!1;if(!ko())return!1;var i=Wo(e);if(kr&&kr.pageKey===er&&Date.now()<kr.startedAt+2500){var n=kr.element===e,a=!!i&&kr.elementKey===i;if(!Ro()&&(n||a))return Mr("handleFocusedElementForSpeech:skip-during-initial-composite-lock",{element:Pr(e),sameCompositeElement:n,sameCompositeElementKey:a}),!1;var r=Vo(e),o=r?Fo(r):"";if(!Ro()&&o&&kr.textKey.includes(o))return Mr("handleFocusedElementForSpeech:skip-composite-contained-label-during-initial-lock",{element:Pr(e),labelPreview:r.slice(0,120),transactionId:kr.transactionId}),hr=e,cr=i,!1}if(hr===e||i&&i===cr&&!Za)return Mr("handleFocusedElementForSpeech:skip-same-element",{element:Pr(e),activePageAnnounced:Za,elementIdentity:i,lastFocusedElementIdentity:cr}),!1;if(!Za&&Ja&&zo(e)&&!hr&&!es())return is(e,t);var s=Vo(e);if(!s)return!1;if(kr){var u=Fo(s),l=kr.textKey;if(!Ro()&&(u===l||u.includes(l)))return Mr("handleFocusedElementForSpeech:skip-active-composite-label",{element:Pr(e),labelPreview:s.slice(0,120),transactionId:kr.transactionId}),hr=e,cr=i,!1}return hr=e,cr=i,nr&&clearTimeout(nr),nr=setTimeout(()=>{nr=null,hr===e&&Bo(s,{reason:"focus",interrupt:!0,element:e,focusPath:zr(e,t),priority:"normal"})},120),!0}function os(e=document){var t;if(Mr("attachFocusSpeechListeners:enter",{root:e instanceof Element?Pr(e):e instanceof DocumentFragment?"document-fragment":"document",runtime:wo()}),ss(),!ko())return Mr("focus speech listeners not attached: non-CTV runtime"),ss;if(!ko())return Mr("focus speech listeners not attached: non-CTV runtime"),ss;var i,n=e=>as(e),a=()=>(Mr("handleUserNavigationKey",{activePageKey:er,activePageAnnounced:Za}),mr=Date.now(),void(tr=!0));e.addEventListener("focusin",n,!0),e.addEventListener("keydown",a,!0);var r=window;if("undefined"!=typeof window&&null!==(t=r.TVJS)&&void 0!==t&&t.DirectionalNavigation){var o=r.TVJS.DirectionalNavigation;i=o.onfocuschanged,o.onfocuschanged=e=>{var t;null===(t=i)||void 0===t||t.call(o,e),function(e){var t,i=null===(t=e.detail)||void 0===t?void 0:t.nextFocusElement;i&&rs(i,e)}(e)}}return ir={root:e,focusListener:n,keyListener:a,previousTvjsHandler:i},ss}function ss(){var e;if(Mr("detachFocusSpeechListeners:enter",{hasCleanup:!!ir}),ir){var t=ir,i=t.root,n=t.focusListener,a=t.keyListener,r=t.previousTvjsHandler;i.removeEventListener("focusin",n,!0),a&&i.removeEventListener("keydown",a,!0);var o=window;null!==(e=o.TVJS)&&void 0!==e&&e.DirectionalNavigation&&r&&(o.TVJS.DirectionalNavigation.onfocuschanged=r),ir=null}}function us(){var e;Mr("resetScreenreaderState:enter",{activePageKey:er,activePageAnnounced:Za,activeTransaction:null===(e=vr)||void 0===e?void 0:e.id,lastFocused:Pr(hr)}),ss(),qa=null,Ya=!1,Ja=null,Qa=null,Za=!1,er="",tr=!1,hr=null,cr="",mr=0,Sr=null,Qr(),Jr(),Zr(),eo(),to(),ao(),nr&&(clearTimeout(nr),nr=null),ro("reset"),_r(),vr=null}var ls=function(){return ee(function e(t,i,n="",a=""){var r;Y(this,e),this.playing=!1,this.toggling=!1,this.handleVideoEvents=e=>{this.video.onended=()=>{Eo(!1),this.handlePlayerAnalytics(e,c.VIDEO_ENDED)},this.video.onpause=()=>{Eo(!1),this.toggling||this.handlePlayerAnalytics(e,c.VIDEO_PAUSED)},this.video.onplay=()=>{Eo(!this.video.muted),this.toggling||this.handlePlayerAnalytics(e,this.video.currentTime>.05?c.VIDEO_RESUMED:c.VIDEO_STARTED)},this.video.onvolumechange=()=>{this.toggling||(this.muted=this.video.muted,Eo(!this.video.paused&&!this.video.ended&&!this.muted),this.handlePlayerAnalytics(e,this.muted?c.VIDEO_MUTED:c.VIDEO_UNMUTED))}},this.removeVideoEvents=()=>{this.video&&(Eo(!1),this.video.onended=null,this.video.onpause=null,this.video.onplay=null,this.video.onvolumechange=null,this.toggling=!1)},this.video=null!=i?i:this.video,null!==(r=e.instance)&&void 0!==r&&r.videoSrc&&i.src!=e.instance.videoSrc&&this.handlePlayerAnalytics(t,c.VIDEO_CHANGED),this.videoSrc=i.src,this.video&&(this.muteByDefault=i.muted,this.loopVideo=i.loop,this.autoplayVideo=i.autoplay,this.muted=this.video.muted,this.videoComponentName=n,this.videoComponentId=a,this.playing=!(!(this.video.currentTime>0)||this.video.paused||this.video.ended),Eo(this.playing&&!this.video.muted),this.handleVideoEvents(t))},[{key:"togglePlayVideo",value:function(e){this.toggling=!0,this.playing?this.video.pause():this.video.play(),this.playing=!this.playing,this.handlePlayerAnalytics(e)}},{key:"toggleMuteVideo",value:function(e){this.toggling=!0,this.video.muted=!this.video.muted,this.muted=this.video.muted,this.handlePlayerAnalytics(e,this.muted?c.VIDEO_MUTED:c.VIDEO_UNMUTED)}},{key:"videoPlayingAction",value:function(){var e,t;return(null===(e=this.video)||void 0===e?void 0:e.currentTime)<=0?c.VIDEO_STARTED:this.video.paused?c.VIDEO_PAUSED:this.video.ended?c.VIDEO_ENDED:(null===(t=this.video)||void 0===t?void 0:t.currentTime)>.05?c.VIDEO_RESUMED:c.UNKNOWN}},{key:"handlePlayerAnalytics",value:function(e,t){if(this.video){var i={id:this.videoComponentId,name:this.videoComponentName,url:this.video.src,loopVideo:this.loopVideo,muteByDefault:this.muteByDefault,autoplayVideo:this.autoplayVideo,contentDuration:this.video.duration/1e3,contentTimecode:this.video.currentTime/1e3};m.getInstance().emit(f,{action:null!=t?t:this.videoPlayingAction(),videoMetaData:i,timeSpentOnPaywall:Ba(e)})}}}])}();ls.instance=null;var ds=({onTap:e,sku:t,componentChange:i,contextProvider:n}={})=>{var a,r,o,s,u,l,d,h,v,p,g,y=c.UNKNOWN;switch(null==e?void 0:e.function){case ti:y=c.CLOSE_PAYWALL,g=Ba(n),hs(),null===(a=ls.instance)||void 0===a||a.handlePlayerAnalytics(n,c.VIDEO_ENDED);break;case ni:y=c.RESTORE_PURCHASES,cs();break;case ri:y=c.SIGN_IN,ms();break;case vi:fs(null===(r=e.parameters)||void 0===r?void 0:r.url);break;case si:t&&(y=c.BUY_SKU,t=vs(n,e,t));break;case gi:y=c.PAGE_CHANGE,i={name:null==e||null===(o=e.parameters)||void 0===o?void 0:o.screen},ps(n,null==e||null===(s=e.parameters)||void 0===s?void 0:s.screen);break;case li:y=c.TOGGLE_CHANGE,i=gs(n,null==e||null===(u=e.parameters)||void 0===u?void 0:u.formId,null==e||null===(l=e.parameters)||void 0===l?void 0:l.value);break;case hi:t&&(y=c.SELECT_SKU,ys(n,t));break;case mi:t&&(y=c.PURCHASE_SELECTED_SKU,bs(n,t));break;case bi:break;case ki:null===(d=ls.instance)||void 0===d||d.togglePlayVideo(n);break;case Ei:null===(h=ls.instance)||void 0===h||h.togglePlayVideo(n);break;case Ti:null===(v=ls.instance)||void 0===v||v.toggleMuteVideo(n);break;case Ai:null===(p=ls.instance)||void 0===p||p.toggleMuteVideo(n)}y!==c.UNKNOWN&&m.getInstance().emit(f,ie({},n.getPaywallActionEventData(),{action:y,sku:t,timeSpentOnPaywall:g,componentChange:i,purchaseError:void 0,purchases:void 0}))},hs=()=>{jo(),v.clearLaunchId(),ws(p.Close)||"undefined"==typeof window||window.history.back()},cs=()=>{var e=g(y.THIRD_PARTY_TRANSACTIONS);ws(p.Restore)||e||n.warn("NamiPaywallManager.registerRestoreHandler is not registered, so restore option on the paywall will use default behavior.")},ms=()=>{ws(p.SignIn)},fs=e=>{e?ws(p.DeeplinkAction,e)||"undefined"!=typeof window&&window.open(e,"_blank"):n.debug("Paywall deep link action invoked, but no url present.")},vs=(e,t,i)=>{var a,r=null===(a=t.parameters)||void 0===a?void 0:a.promo,o=i;if(r)n.debug(`promo id is not null ${null==i?void 0:i.id}`),o.promoId=r.toString();else{n.debug(`promo id is null for ${i.id}, product details: ${JSON.stringify(i.productDetails)}`);var s=i.productDetails;if(Di(null==s?void 0:s.product_type)){var u=function(e){return e.offers.find(e=>"promo"===e.offer_type&&0===e.price)}(s);if(u&&u.offer_ref_id)n.debug(`Found a free trial offer ${u.offer_ref_id}`),o.promoId=u.offer_ref_id.toString();else{var l,d=s.offers[0];if(d)n.debug(`Found an offer ${d.offer_ref_id}`),o.promoId=null===(l=d.offer_ref_id)||void 0===l?void 0:l.toString()}}}return function(e,t){if(g(y.THIRD_PARTY_TRANSACTIONS)){if(v.setPurchaseImpression(),m.getInstance().listenerCount(p.BuySku)<=0)return void n.warn("In order for Nami to hand off the purchase so the transaction can be handled by, you must register a NamiBuySkuHandler callbackwith NamiPaywallManager.registerBuySkuHandler.");n.info(`Handing off purchase for processing by developer skuId=${t.skuId} promoId=${t.promoId}`),ws(p.BuySku,t)}else{var i=b(t.skuId);if(i&&(n.info(`Purchase flow completed, success=${i.success}, code=${i.billingResponseCode}, message=${i.message}`),i.success)){var a;m.getInstance().emit(f,{action:c.CLOSE_PAYWALL,sku:t,timeSpentOnPaywall:Ba(e)}),null===(a=ls.instance)||void 0===a||a.handlePlayerAnalytics(e,c.VIDEO_ENDED);var r=e.getSelectedCampaign();r&&r.conversion_event_type==w.IN_APP&&r.conversion_event_url?(v.clearLaunchId(),window.location.href=r.conversion_event_url):hs()}}}(e,o),o},ps=(e,t)=>{var i;t&&((null===(i=window.history.state)||void 0===i?void 0:i.prevUrl)==t?window.history.back():e.setCurrentPage(t))},gs=(e,t,i)=>{if(t)return e.setCurrentFormId(t,i),{formId:t,value:i};var n=e.getCurrentGroupId(),a=e.getCurrentGroupName();return e.setCurrentGroupData(n,a),{id:n,name:a}},ys=(e,t)=>{var i=e.getCurrentGroupId(),n=e.selectedProducts();i&&t.id!=n[i]&&(n[i]=t.id,e.setSelectedProducts(n))},bs=(e,t)=>{e.setPurchase(!0,t)};function ws(e,...t){var i=m.getInstance();return i.emit(e,...t),i.listenerCount(e)>0}var ks,Ss,Es,Ms,Ts,Ps,As,Ds,xs,Cs,Is,Ls=e=>e,_s=k.NamiFlowManager,Rs=250,Fs=function(){function e(t,i,n){var a;return Y(this,e),(a=X(this,e)).pages=[],a.currentOffset=0,a.presentationStyle="fullscreen",a._sheetEntranceActive=!0,a.formFactor=h(),a.timeSpentOnPaywall=0,a.animation={transition:"none",direction:"forward"},a._originalBodyStyles={},a._originalDocumentStyles={},a._savedScrollY=0,a._sheetDragStartY=0,a._sheetIsDragging=!1,a._dismissThreshold=100,a._boundHandleKeyDownEvent=e=>a.handleKeyDownEvent(e),a._stylesAlreadySaved=!1,a.type=t,a.value=i,a.context=n,a.setPaywallData(),a.presentationStyle=a.getPresentationStyle(a.paywall),a.applyPresentationHostClasses(),se(a,a)}return re(e,j),ee(e,[{key:"applyPresentationHostClasses",value:function(){this.classList.toggle("nami-half-sheet-mode",this.isOverlaySheet),this.classList.toggle("nami-modal-mode",this.isModal),this.classList.toggle("nami-modal-phone",this.isModal&&"phone"===this.formFactor),this.classList.toggle("nami-modal-wide",this.isModal&&"phone"!==this.formFactor)}},{key:"setPaywallData",value:function(){var e=S(this.value,this.type);this.paywall=e.paywall,this.campaign=e.campaign}},{key:"getPresentationStyle",value:function(e){var t,i,n,a=null!==(t=null==e||null===(i=e.template)||void 0===i||null===(i=i.initialState)||void 0===i?void 0:i.presentationStyle)&&void 0!==t?t:null==e||null===(n=e.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.presentation_style;return E(a)}},{key:"isHalfSheet",get:function(){return"compact_sheet"===this.presentationStyle}},{key:"isSheet",get:function(){return"sheet"===this.presentationStyle}},{key:"isOverlaySheet",get:function(){return this.isHalfSheet||this.isSheet}},{key:"isModal",get:function(){return"modal"===this.presentationStyle}},{key:"isOverlay",get:function(){return this.isOverlaySheet||this.isModal}},{key:"connectedCallback",value:function(){var t;me(e,"connectedCallback",this)([]),null!==(t=window.TVJS)&&void 0!==t&&t.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=this),this._detachFocusSpeechListeners=os(this),document.addEventListener("keydown",this._boundHandleKeyDownEvent),this._swipeHandler=Qt(this,this.handleSwipeEvent.bind(this),{axisHint:"y",lockAxis:!0,minDistance:25,edgeLeakThreshold:15,preventScrollOnSwipe:!1,pointerTypes:["touch"]}),this.setOriginalStyles()}},{key:"disconnectedCallback",value:function(){var t,i,n;me(e,"disconnectedCallback",this)([]),jo(),null===(t=this._detachFocusSpeechListeners)||void 0===t||t.call(this),this._detachFocusSpeechListeners=void 0,us(),v.clearLaunchId(),null!==(i=window.TVJS)&&void 0!==i&&i.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=document.body),document.removeEventListener("keydown",this._boundHandleKeyDownEvent),m.getInstance().removeAllListeners(f),this.restoreStyles(),null===(n=this._halfSheetAbortController)||void 0===n||n.abort(),this._swipeHandler.destroy()}},{key:"setOriginalStyles",value:function(){this._stylesAlreadySaved||(this._stylesAlreadySaved=!0,this._originalBodyStyles.background=document.body.style.background,this._originalBodyStyles.overflow=document.body.style.overflow||null,this._originalBodyStyles.position=document.body.style.position||null,this._originalBodyStyles.top=document.body.style.top||null,this._originalBodyStyles.width=document.body.style.width||null,"phone"===this.formFactor&&(this._originalBodyStyles["overscroll-behavior"]=document.body.style.overscrollBehavior||null,this._originalDocumentStyles["overscroll-behavior"]=document.documentElement.style.overscrollBehavior||null)),"television"===this.formFactor&&(document.body.style.overflow="hidden"),"phone"===this.formFactor&&(document.body.style.overscrollBehavior="none",document.documentElement.style.overscrollBehavior="none",this.isOverlay||(document.body.style.overflow="hidden")),this.isOverlay&&(this._savedScrollY=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${this._savedScrollY}px`,document.body.style.width="100%",document.body.style.overflow="hidden")}},{key:"restoreStyles",value:function(){Object.entries(this._originalBodyStyles).forEach(([e,t])=>{null!==t?document.body.style.setProperty(e,t):document.body.style.removeProperty(e)}),Object.entries(this._originalDocumentStyles).forEach(([e,t])=>{null!==t?document.documentElement.style.setProperty(e,t):document.documentElement.style.removeProperty(e)}),this._savedScrollY>0&&(window.scrollTo(0,this._savedScrollY),this._savedScrollY=0)}},{key:"handleKeyDownEvent",value:function(e){(10009===e.keyCode||27===e.keyCode||166===e.keyCode||"Backspace"===e.key||"GoBack"===e.key||"BrowserBack"===e.key||"XF86Back"===e.key)&&(e.preventDefault(),jo(),this.flow?this.flow.triggerActions(M.REMOTE_BACK):this.isModal&&this.animateSheetDismiss().then(()=>hs()))}},{key:"handleBackdropClick",value:function(e){var t;(e.stopPropagation(),this.flow)?null!==(t=this.flow.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==t&&t?this.flow.triggerActions("__swipe_down__"):this.animateSheetDismiss().then(()=>{var e;null===(e=this.flow)||void 0===e||e.finished(),hs()}):this.animateSheetDismiss().then(()=>hs())}},{key:"animateSheetDismiss",value:function(){var e,t,i,n,a;return le(function(r){for(;;)switch(r.n){case 0:return i=this.shadowRoot,n=null!==(e=null==i?void 0:i.querySelector(".nami-half-sheet-container"))&&void 0!==e?e:null==i?void 0:i.querySelector(".nami-modal-container"),a=null!==(t=null==i?void 0:i.querySelector(".nami-half-sheet-backdrop"))&&void 0!==t?t:null==i?void 0:i.querySelector(".nami-modal-backdrop"),n&&n.classList.add("nami-dismissing"),a&&a.classList.add("nami-dismissing"),r.n=1,K(new Promise(e=>setTimeout(e,200)));case 1:return r.a(2)}},null,this,null,Promise)}},{key:"handleSwipeEvent",value:function({direction:e}){var t;if("down"===e)null===(t=this.flow)||void 0===t||t.triggerActions("__swipe_down__");else if("up"===e){var i;null===(i=this.flow)||void 0===i||i.triggerActions("__swipe_up__")}}},{key:"setupHalfSheetDragTracking",value:function(){var e,t,i;null===(e=this._halfSheetAbortController)||void 0===e||e.abort(),this._halfSheetAbortController=new AbortController;var n=this._halfSheetAbortController.signal,a=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"),r=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".nami-half-sheet-content");if(a&&r){a.addEventListener("touchstart",e=>{r.scrollTop>0||(this._sheetDragStartY=e.touches[0].clientY,this._sheetIsDragging=!0)},{passive:!0,signal:n}),a.addEventListener("touchmove",e=>{if(this._sheetIsDragging){var t=e.touches[0].clientY-this._sheetDragStartY;t>0&&(a.style.transform=`translateY(${t}px)`,a.style.transition="none",e.preventDefault())}},{passive:!1,signal:n}),a.addEventListener("touchend",()=>{if(this._sheetIsDragging){this._sheetIsDragging=!1;var e,t,i=a.style.transform.match(/translateY\((\d+(?:\.\d+)?)px\)/);if((i?parseFloat(i[1]):0)>this._dismissThreshold)if(null!==(e=null===(t=this.flow)||void 0===t?void 0:t.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==e&&e){var n;a.style.transform="translateY(0)",a.style.transition="transform 0.2s ease-out",null===(n=this.flow)||void 0===n||n.triggerActions("__swipe_down__")}else{var r;a.style.transform="translateY(100%)",a.style.transition="transform 0.2s ease-in";var o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(".nami-half-sheet-backdrop");o&&o.classList.add("nami-dismissing"),setTimeout(()=>{var e;null===(e=this.flow)||void 0===e||e.finished()},200)}else a.style.transform="translateY(0)",a.style.transition="transform 0.2s ease-out"}},{signal:n})}}},{key:"setupHalfSheetFocusTrap",value:function(){var e,t,i,n,a=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"))&&void 0!==e?e:null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".nami-modal-container");if(a){a.focus();var r=null===(n=this._halfSheetAbortController)||void 0===n?void 0:n.signal;a.addEventListener("keydown",e=>{if("Tab"===e.key){var t=a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0!==t.length){var i,n,r=t[0],o=t[t.length-1];if(e.shiftKey)document.activeElement!==r&&(null===(i=this.shadowRoot)||void 0===i?void 0:i.activeElement)!==r||(e.preventDefault(),o.focus());else document.activeElement!==o&&(null===(n=this.shadowRoot)||void 0===n?void 0:n.activeElement)!==o||(e.preventDefault(),r.focus())}}},r?{signal:r}:void 0)}}},{key:"firstUpdated",value:function(){var e;this.timeSpentOnPaywall=Date.now(),null===(e=this._detachFocusSpeechListeners)||void 0===e||e.call(this),this._detachFocusSpeechListeners=os(this.renderRoot),T(this.campaign)&&(this.flow=_s.instance.presentFlow(this.campaign,this,this.context)),this.isOverlay&&this.updateComplete.then(()=>{this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap()})}},{key:"updated",value:function(t){if(me(e,"updated",this)([t]),t.has("presentationStyle")){var i=t.get("presentationStyle");("compact_sheet"===i||"sheet"===i||"modal"===i)!==this.isOverlay&&(this.restoreStyles(),this._stylesAlreadySaved=!1,this.setOriginalStyles()),this.isOverlay&&(this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap())}}},{key:"getAnimationStyles",value:function(e){var t="backward"===this.animation.direction?-1:1;switch(this.animation.transition){case"verticalSlide":return`transform: translateY(${100*(e-this.currentOffset)*t}vh);`;case"slide":return`transform: translateX(${100*(e-this.currentOffset)*t}vw);`;case"fade":return`opacity: ${e===this.currentOffset?1:0};`;default:return""}}},{key:"updatePages",value:function(e){var t,i,n;return le(function(a){for(;;)switch(a.n){case 0:if(0!==this.pages.length&&"none"!==this.animation.transition){a.n=1;break}return this.pages=[e],a.a(2);case 1:if((null==(t=this.pages[this.pages.length-1])?void 0:t.id)!==e.id){a.n=2;break}return a.a(2);case 2:return i=null,this.isOverlaySheet&&(i=null===(n=this.shadowRoot)||void 0===n?void 0:n.querySelector(".nami-half-sheet-content"))&&(i.style.height=`${i.clientHeight}px`),this.pages=[t,e],this.currentOffset=0,a.n=3,K(this.updateComplete);case 3:requestAnimationFrame(()=>{this.currentOffset=1,setTimeout(()=>{this.pages=[e],this.currentOffset=0,this.paywall=e,i&&(i.style.height="")},Rs)});case 4:return a.a(2)}},null,this,null,Promise)}},{key:"animateFullscreenEntry",value:function(){return le(function(e){for(;;)switch(e.n){case 0:return e.n=1,K(new Promise(e=>requestAnimationFrame(()=>e())));case 1:return this.classList.remove("nami-fullscreen-entering"),this.classList.add("nami-fullscreen-entering-active"),e.n=2,K(new Promise(e=>setTimeout(e,Rs)));case 2:this.classList.remove("nami-fullscreen-entering-active");case 3:return e.a(2)}},null,this,null,Promise)}},{key:"_captureExitOverlay",value:function(e){var t=this.shadowRoot;if(!t)return null;var i=t.querySelector(".nami-flow-container"),n=document.createElement("div");if(n.className="nami-fullscreen-exit-overlay",n.style.cssText=`\n position: fixed; inset: 0; z-index: 10000;\n pointer-events: none;\n background: ${e};\n overflow: hidden;\n `,i){var a=i.cloneNode(!0);a.style.transform="none",a.style.transition="none",n.appendChild(a)}return t.appendChild(n),n.offsetHeight,n}},{key:"_slideExitOverlayAway",value:function(e){var t;return le(function(i){for(;;)switch(i.n){case 0:if(e){i.n=1;break}return i.a(2);case 1:return t="undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,e.style.transition=t?"none":"transform 250ms ease-in",e.style.transform="translateY(100%)",i.n=2,K(new Promise(e=>setTimeout(e,t?0:Rs)));case 2:e.remove();case 3:return i.a(2)}},null,null,null,Promise)}},{key:"flowNavigateToScreen",value:function(e,t){var i,n,a,r,o,s,u,l,d,h,c;return le(function(m){for(;;)switch(m.n){case 0:if(null!==(i=this.flow)&&void 0!==i&&i.previousFlowStep&&this.flow.executeLifecycle(this.flow.previousFlowStep,M.DISAPPEAR),a=this.presentationStyle,r=this.getPresentationStyle(e),o=0===this.pages.length,s="backward"===t.direction,"compact_sheet"!==a&&"sheet"!==a||"fullscreen"!==r){m.n=3;break}return this.classList.add("nami-fullscreen-entering"),this.presentationStyle="fullscreen",this.applyPresentationHostClasses(),m.n=1,K(this.updateComplete);case 1:return m.n=2,K(this.animateFullscreenEntry());case 2:m.n=11;break;case 3:if("fullscreen"!==a||"compact_sheet"!==r&&"sheet"!==r){m.n=10;break}if(!o&&!s){m.n=8;break}if(!s){m.n=6;break}return u=document.body.style.background||getComputedStyle(this).backgroundColor||"#000",this._sheetEntranceActive=!1,l=this._captureExitOverlay(u),this.presentationStyle=r,this.applyPresentationHostClasses(),this.pages=[e],this.paywall=e,m.n=4,K(this.updateComplete);case 4:return m.n=5,K(this._slideExitOverlayAway(l));case 5:m.n=7;break;case 6:this.presentationStyle=r,this.applyPresentationHostClasses();case 7:m.n=9;break;case 8:console.warn(`Unsupported forward transition: fullscreen → ${r}. Presenting as fullscreen.`);case 9:m.n=11;break;case 10:this.presentationStyle=r,this.applyPresentationHostClasses();case 11:return d=("compact_sheet"===a||"sheet"===a)&&"fullscreen"===r,h="fullscreen"===a&&("compact_sheet"===r||"sheet"===r),c=!("compact_sheet"!==a&&"sheet"!==a||"compact_sheet"!==r&&"sheet"!==r||a===r)||d||h,this.animation=c?{transition:"fade",direction:t.direction}:t,m.n=12,K(this.updatePages(e));case 12:null!==(n=this.flow)&&void 0!==n&&n.currentFlowStep&&this.flow.executeLifecycle(this.flow.currentFlowStep,M.APPEAR);case 13:return m.a(2)}},null,this,null,Promise)}},{key:"getSelectedSlideIndexForCurrentCarousel",value:function(){return Yt.getSelectedSlideIndex()}},{key:"renderFlow",value:function(){return"undefined"==typeof document?N(ks||(ks=Ls``)):this.isOverlaySheet?this.renderHalfSheet():this.isModal?this.renderModal(this.renderFlowContainer()):this.renderFlowContainer()}},{key:"renderFlowContainer",value:function(){return N(Ss||(Ss=Ls`
254
+ `)),St=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},Et=globalThis,Mt=Et.ShadowRoot&&(void 0===Et.ShadyCSS||Et.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Tt=Symbol(),Pt=new WeakMap,At=function(){return ee(function e(t,i,n){if(Y(this,e),this._$cssResult$=!0,n!==Tt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i},[{key:"styleSheet",get:function(){var e=this.o,t=this.t;if(Mt&&void 0===e){var i=void 0!==t&&1===t.length;i&&(e=Pt.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Pt.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Dt=(e,t)=>{if(Mt)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(var i,n=te(t);!(i=n()).done;){var a=i.value,r=document.createElement("style"),o=Et.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=a.cssText,e.appendChild(r)}},xt=Mt?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,i="",n=te(e.cssRules);!(t=n()).done;){i+=t.value.cssText}return(e=>new At("string"==typeof e?e:e+"",void 0,Tt))(i)})(e):e,Ct=Object.is,It=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,_t=Object.getOwnPropertyNames,Rt=Object.getOwnPropertySymbols,Ft=Object.getPrototypeOf,Wt=globalThis,Ot=Wt.trustedTypes,$t=Ot?Ot.emptyScript:"",Nt=Wt.reactiveElementPolyfillSupport,jt=(e,t)=>e,Bt={toAttribute(e,t){switch(t){case Boolean:e=e?$t:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){var i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},zt=(e,t)=>!Ct(e,t),Ut={attribute:!0,type:String,converter:Bt,reflect:!1,useDefault:!1,hasChanged:zt};null!==(gt=Symbol.metadata)&&void 0!==gt||(Symbol.metadata=Symbol("metadata")),null!==(yt=Wt.litPropertyMetadata)&&void 0!==yt||(Wt.litPropertyMetadata=new WeakMap);var Ht=function(){function e(){var t;return Y(this,e),(t=X(this,e))._$Ep=void 0,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Em=null,t._$Ev(),t}return re(e,ve(HTMLElement)),ee(e,[{key:"_$Ev",value:function(){var e;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach(e=>e(this))}},{key:"addController",value:function(e){var t,i;(null!==(t=this._$EO)&&void 0!==t?t:this._$EO=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.call(e))}},{key:"removeController",value:function(e){var t;null===(t=this._$EO)||void 0===t||t.delete(e)}},{key:"_$E_",value:function(){for(var e,t=new Map,i=te(this.constructor.elementProperties.keys());!(e=i()).done;){var n=e.value;this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n])}t.size>0&&(this._$Ep=t)}},{key:"createRenderRoot",value:function(){var e,t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return Dt(t,this.constructor.elementStyles),t}},{key:"connectedCallback",value:function(){var e,t;null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$EO)||void 0===t||t.forEach(e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)})}},{key:"enableUpdating",value:function(e){}},{key:"disconnectedCallback",value:function(){var e;null===(e=this._$EO)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)})}},{key:"attributeChangedCallback",value:function(e,t,i){this._$AK(e,i)}},{key:"_$ET",value:function(e,t){var i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(void 0!==n&&!0===i.reflect){var a,r=(void 0!==(null===(a=i.converter)||void 0===a?void 0:a.toAttribute)?i.converter:Bt).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}},{key:"_$AK",value:function(e,t){var i=this.constructor,n=i._$Eh.get(e);if(void 0!==n&&this._$Em!==n){var a,r,o,s=i.getPropertyOptions(n),u="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(a=s.converter)||void 0===a?void 0:a.fromAttribute)?s.converter:Bt;this._$Em=n;var l=u.fromAttribute(t,s.type);this[n]=null!==(r=null!=l?l:null===(o=this._$Ej)||void 0===o?void 0:o.get(n))&&void 0!==r?r:l,this._$Em=null}}},{key:"requestUpdate",value:function(e,t,i,n=!1,a){if(void 0!==e){var r,o,s=this.constructor;if(!1===n&&(a=this[e]),null!=i||(i=s.getPropertyOptions(e)),!((null!==(r=i.hasChanged)&&void 0!==r?r:zt)(a,t)||i.useDefault&&i.reflect&&a===(null===(o=this._$Ej)||void 0===o?void 0:o.get(e))&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(e,t,{useDefault:i,reflect:n,wrapped:a},r){var o,s,u;i&&!(null!==(o=this._$Ej)&&void 0!==o?o:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,null!==(s=null!=r?r:t)&&void 0!==s?s:this[e]),!0!==a||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(null!==(u=this._$Eq)&&void 0!==u?u:this._$Eq=new Set).add(e))}},{key:"_$EP",value:function(){var e,t;return le(function(i){for(;;)switch(i.p=i.n){case 0:return this.isUpdatePending=!0,i.p=1,i.n=2,K(this._$ES);case 2:i.n=4;break;case 3:i.p=3,t=i.v,Promise.reject(t);case 4:if(e=this.scheduleUpdate(),!(null!=e)){i.n=5;break}return i.n=5,K(e);case 5:return i.a(2,!this.isUpdatePending)}},null,this,[[1,3]],Promise)}},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var e;if(null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(var t,i=te(this._$Ep);!(t=i()).done;){var n=t.value,a=n[0],r=n[1];this[a]=r}this._$Ep=void 0}var o=this.constructor.elementProperties;if(o.size>0)for(var s,u=te(o);!(s=u()).done;){var l=s.value,d=l[0],h=l[1],c=h.wrapped,m=this[d];!0!==c||this._$AL.has(d)||void 0===m||this.C(d,void 0,h,m)}}var f=!1,v=this._$AL;try{var p;(f=this.shouldUpdate(v))?(this.willUpdate(v),null!==(p=this._$EO)&&void 0!==p&&p.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(v)):this._$EM()}catch(v){throw f=!1,this._$EM(),v}f&&this._$AE(v)}}},{key:"willUpdate",value:function(e){}},{key:"_$AE",value:function(e){var t;null!==(t=this._$EO)&&void 0!==t&&t.forEach(e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}},{key:"_$EM",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}}],[{key:"addInitializer",value:function(e){var t;this._$Ei(),(null!==(t=this.l)&&void 0!==t?t:this.l=[]).push(e)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}},{key:"createProperty",value:function(e,t=Ut){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){var i=Symbol(),n=this.getPropertyDescriptor(e,i,t);void 0!==n&&It(this.prototype,e,n)}}},{key:"getPropertyDescriptor",value:function(e,t,i){var n,a=null!==(n=Lt(this.prototype,e))&&void 0!==n?n:{get(){return this[t]},set(e){this[t]=e}},r=a.get,o=a.set;return{get:r,set(t){var n=null==r?void 0:r.call(this);null!=o&&o.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){var t;return null!==(t=this.elementProperties.get(e))&&void 0!==t?t:Ut}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(jt("elementProperties"))){var e=Ft(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(jt("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(jt("properties")))for(var e=this.properties,t=0,i=[..._t(e),...Rt(e)];t<i.length;t++){var n=i[t];this.createProperty(n,e[n])}var a=this[Symbol.metadata];if(null!==a){var r=litPropertyMetadata.get(a);if(void 0!==r)for(var o,s=te(r);!(o=s()).done;){var u=o.value,l=u[0],d=u[1];this.elementProperties.set(l,d)}}this._$Eh=new Map;for(var h,c=te(this.elementProperties);!(h=c()).done;){var m=h.value,f=m[0],v=m[1],p=this._$Eu(f,v);void 0!==p&&this._$Eh.set(p,f)}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e))for(var i,n=te(new Set(e.flat(1/0).reverse()));!(i=n()).done;){var a=i.value;t.unshift(xt(a))}else void 0!==e&&t.push(xt(e));return t}},{key:"_$Eu",value:function(e,t){var i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}}])}();Ht.elementStyles=[],Ht.shadowRootOptions={mode:"open"},Ht[jt("elementProperties")]=new Map,Ht[jt("finalized")]=new Map,null!=Nt&&Nt({ReactiveElement:Ht}),(null!==(bt=Wt.reactiveElementVersions)&&void 0!==bt?bt:Wt.reactiveElementVersions=[]).push("2.1.2");var Gt={attribute:!0,type:String,converter:Bt,reflect:!1,hasChanged:zt},Vt=(e=Gt,t,i)=>{var n=i.kind,a=i.metadata,r=globalThis.litPropertyMetadata.get(a);if(void 0===r&&globalThis.litPropertyMetadata.set(a,r=new Map),"setter"===n&&((e=Object.create(e)).wrapped=!0),r.set(i.name,e),"accessor"===n){var o=i.name;return{set(i){var n=t.get.call(this);t.set.call(this,i),this.requestUpdate(o,n,e,!0,i)},init(t){return void 0!==t&&this.C(o,void 0,e,t),t}}}if("setter"===n){var s=i.name;return function(i){var n=this[s];t.call(this,i),this.requestUpdate(s,n,e,!0,i)}}throw Error("Unsupported decorator location: "+n)};function Kt(e){return(t,i)=>"object"==typeof i?Vt(e,t,i):((e,t,i)=>{var n=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),n?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}function Xt(e){return Kt(ie({},e,{state:!0,attribute:!1}))}var Yt=function(){function e(t,i,n){var a;return Y(this,e),(a=X(this,e,[t,i,n])).host=null,a.defineDynamicStateProps(),a}return re(e,i),ee(e,[{key:"hostConnected",value:function(){}},{key:"hostDisconnected",value:function(){this.subscribers.clear()}},{key:"onStateChanged",value:function(){this.defineDynamicStateProps(),this.host&&this.host.requestUpdate()}},{key:"defineDynamicStateProps",value:function(){Object.defineProperty(this.state,"tvQuality",{get:this.getTVQuality.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportWidth",{get:this.getViewportWidth.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportHeight",{get:this.getViewportHeight.bind(this),enumerable:!1,configurable:!0})}},{key:"getTVQuality",value:function(){var e,t;if("television"!==this.getFormFactor())return"";var i=window.devicePixelRatio||1,n=window.innerWidth||(null===(e=window.screen)||void 0===e?void 0:e.availWidth),a=window.innerHeight||(null===(t=window.screen)||void 0===t?void 0:t.availHeight);if(!n||!a)return"720p";var r=Math.max(n,a)*i,o=Math.min(n,a)*i;return r>=3840||o>=2160?"4K":r>=1920||o>=1080?"1080p":"720p"}},{key:"getViewportWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}},{key:"getViewportHeight",value:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}],[{key:"create",value:function(t,i,n){var a=new e(t,i,n);return this.providers.push(a),a}},{key:"remove",value:function(e){this.providers=this.providers.filter(t=>t!==e)}},{key:"currentProvider",get:function(){return this.providers[0]}}])}();var qt=e=>{var t;return le(function(i){for(;;)if(0===i.n)return t=new Set(Array.from(document.fonts.values()).map(e=>e.family)),e.forEach(e=>{var i=Jt(e);if(!t.has(i)){var n=new FontFace(i,`url(${e.file})`);document.fonts.add(n)}}),i.a(2,document.fonts.ready.then())},null,null,null,Promise)};function Jt(e){return`${e.family}-${e.style}`.replace(/ /g,"")}function Qt(e,t,i){var a,r,o,s,u,l,d,h;if("undefined"==typeof window||!e||!t)return n.debug("Swipe detection is not supported in this environment."),{destroy(){},updateOptions(){}};var c={minDistance:null!==(a=null==i?void 0:i.minDistance)&&void 0!==a?a:30,maxDuration:null!==(r=null==i?void 0:i.maxDuration)&&void 0!==r?r:600,lockAxis:null===(o=null==i?void 0:i.lockAxis)||void 0===o||o,preventScrollOnSwipe:null!==(s=null==i?void 0:i.preventScrollOnSwipe)&&void 0!==s&&s,pointerTypes:null!==(u=null==i?void 0:i.pointerTypes)&&void 0!==u?u:["touch"],passiveListeners:null===(l=null==i?void 0:i.passiveListeners)||void 0===l||l,axisHint:null!==(d=null==i?void 0:i.axisHint)&&void 0!==d?d:"y",edgeLeakThreshold:null!==(h=null==i?void 0:i.edgeLeakThreshold)&&void 0!==h?h:24},m=e.style.touchAction;c.preventScrollOnSwipe&&(e.style.touchAction="none");var f=null,v=0,p=0,g=0,y=0,b=0,w=null,k=null,S=!1,E=!1,M=!1,T=e=>{try{var t=window.getComputedStyle(e);if(!t)return!1;var i=t.overflowY;if("auto"!==i&&"scroll"!==i)return!1;var n=e;return n.scrollHeight>n.clientHeight}catch(e){return!1}},P=e=>c.pointerTypes.includes(e.pointerType),A=t=>{var i=t.composedPath?t.composedPath()[0]:t.target;if(P(t)&&null===f){f=t.pointerId,v=g=t.clientX,p=y=t.clientY,b=performance.now(),w=null,M=!1,S=!1,E=!1,(k="y"===c.axisHint?((e,t)=>{for(var i=e;i&&i!==t&&i instanceof HTMLElement;){var n,a;if(T(i))return i;i=i.parentElement||(null!==(n=null===(a=i.parentNode)||void 0===a?void 0:a.host)&&void 0!==n?n:null)}return null})(i,e):null)||(E=!0);try{var n;null==e||null===(n=e.setPointerCapture)||void 0===n||n.call(e,t.pointerId)}catch(e){try{var a;null==i||null===(a=i.setPointerCapture)||void 0===a||a.call(i,t.pointerId)}catch(e){}}}},D=e=>{if(e.pointerId===f&&P(e)){if(g=e.clientX,y=e.clientY,c.lockAxis&&!w){var i=Math.abs(g-v),n=Math.abs(y-p);(i>2||n>2)&&(w=n>=i?"y":"x")}if("y"===c.axisHint&&("y"===w||!c.lockAxis)){var a=y-p,r=a<0?"up":"down",o=Math.abs(a),s=performance.now()-b,u=o/Math.max(s,1),l=o>=c.minDistance||u>.5;if(k)if(l)E=!0;else if(((e,t)=>!!e&&("down"===t?e.scrollTop>0:e.scrollTop+e.clientHeight<e.scrollHeight-1))(k,r)){if(!(("down"===r&&k.scrollTop<=50||"up"===r&&k.scrollTop+k.clientHeight>=k.scrollHeight-50)&&u>.3))return void(S=!0);E=!0}else E=!0;var d=!k||o>=c.edgeLeakThreshold;if(!M&&!S&&E&&d&&o>=c.minDistance){M=!0;var h=performance.now(),m={direction:"up"===r?"up":"down",distanceX:g-v,distanceY:a,absX:Math.abs(g-v),absY:o,duration:h-b,velocity:o/Math.max(h-b,1),startX:v,startY:p,endX:g,endY:y,startedAt:b,endedAt:h,originalEvent:e};t(m)}}}},x=e=>{if(e.pointerId===f)if(P(e))if(k)C();else if(M||S)C();else{var i,n=performance.now(),a=n-b,r=g-v,o=y-p,s=Math.abs(r),u=Math.abs(o),l="x"===(i=c.lockAxis&&w?w:"x"===c.axisHint?"x":"y"===c.axisHint?"y":s>=u?"x":"y")?s:u,d=a<=c.maxDuration,h=c.minDistance;if(k&&"y"===i&&E&&(h+=c.edgeLeakThreshold),d&&l>=h){var m;m="x"===i?r>0?"right":"left":o>0?"down":"up";var T=l/Math.max(a,1);t({direction:m,distanceX:r,distanceY:o,absX:s,absY:u,duration:a,velocity:T,startX:v,startY:p,endX:g,endY:y,startedAt:b,endedAt:n,originalEvent:e})}C()}else C()},C=()=>{f=null,w=null,b=0,k=null,E=!1,S=!1,M=!1},I=!!c.passiveListeners&&{passive:!0},L=c.passiveListeners?{passive:!0,capture:!0}:{capture:!0};e.addEventListener("pointerdown",A,L),e.addEventListener("pointermove",D,I),e.addEventListener("pointerup",x,I),e.addEventListener("pointercancel",x,I),e.addEventListener("lostpointercapture",x,I);return{destroy:()=>{e.removeEventListener("pointerdown",A,L),e.removeEventListener("pointermove",D,I),e.removeEventListener("pointerup",x,I),e.removeEventListener("pointercancel",x,I),e.removeEventListener("lostpointercapture",x,I),c.preventScrollOnSwipe&&(e.style.touchAction=m),C()},updateOptions:t=>{Object.assign(c,t),"boolean"==typeof t.preventScrollOnSwipe&&(t.preventScrollOnSwipe?e.style.touchAction="none":e.style.touchAction=m)}}}var Zt={},ei=Zt.NAMI_CLOSE_PAYWALL,ti=void 0===ei?"namiClosePaywall":ei,ii=Zt.NAMI_RESTORE_PURCHASES,ni=void 0===ii?"namiRestorePurchases":ii,ai=Zt.NAMI_SIGN_IN,ri=void 0===ai?"namiSignIn":ai,oi=Zt.NAMI_BUY_SKU,si=void 0===oi?"namiBuySKU":oi,ui=Zt.SET_STATE,li=void 0===ui?"setState":ui,di=Zt.NAMI_SELECT_SKU,hi=void 0===di?"namiSelectSKU":di,ci=Zt.NAMI_PURCHASE_SELECTED_SKU,mi=void 0===ci?"namiPurchaseSelectedSKU":ci,fi=Zt.NAMI_DEEP_LINK,vi=void 0===fi?"namiDeeplink":fi,pi=Zt.NAMI_NAVIGATE_TO_SCREEN,gi=void 0===pi?"namiNavigateToScreen":pi,yi=Zt.NAMI_RELOAD_PRODUCTS,bi=void 0===yi?"namiReloadProducts":yi,wi=Zt.NAMI_PLAY_VIDEO,ki=void 0===wi?"namiPlayVideo":wi,Si=Zt.NAMI_PAUSE_VIDEO,Ei=void 0===Si?"namiPauseVideo":Si,Mi=Zt.NAMI_MUTE_VIDEO,Ti=void 0===Mi?"namiMuteVideo":Mi,Pi=Zt.NAMI_UNMUTE_VIDEO,Ai=void 0===Pi?"namiUnmuteVideo":Pi,Di=e=>"subscription"===e;function xi(e){if(Di(null==e?void 0:e.product_type)){var t=Ii(e);if(t.length>0)return t[0].billingPeriod}return null}function Ci(e){var t=function(e){if(!e)return[];var t=e.offers.filter(e=>"promo"===e.offer_type);return Li(t,e.subscription_period)}(e).find(e=>0===e.priceAmountMicros);return(null==t?void 0:t.billingPeriod)||null}function Ii(e){return e?Li(e.offers.filter(e=>"default"===e.offer_type),e.subscription_period):[]}function Li(e,t){return e.map(e=>_i(e,t))}function _i(e,t){var i,n,a,r,o,s,u,l;if(!e)return{};var d=null!==(i=null===(n=e.promo_period)||void 0===n?void 0:n.count)&&void 0!==i?i:null==t?void 0:t.count,h=null!==(a=null===(r=e.promo_period)||void 0===r?void 0:r.type)&&void 0!==a?a:null==t?void 0:t.type,c=null!==(o=null===(s=e.promo_price)||void 0===s?void 0:s.price)&&void 0!==o?o:e.price,m=null!==(u=null===(l=e.promo_price)||void 0===l?void 0:l.currency)&&void 0!==u?u:e.currency;return{priceAmountMicros:1e6*c,priceCurrencyCode:m,billingPeriod:h?`P${d}${h[0].toUpperCase()}`:"",formattedPrice:Wi(m).format(c)}}function Ri(e,t=!1,i=!1,n=!1,r=!1){if(!e)return null;var o=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!o)return null;var s=o.slice(1).map(e=>parseInt(e)),u=s[0],l=s[1],d=s[2],h=s[3],c=(e,t,i,n,o)=>{var s=(e=>r?`${e}_abbrev`:e)(o),u=(e=>r?`${e}_abbrev_plural`:`${e}_plural`)(o),l=a(s),d=a(u);return r||l!==s||(l=a(`${o}_abbrev`)),r||d!==u||(d=a(`${o}_abbrev_plural`)),n?e.toString():i?1===e||t?l:d:1===e||t?`${e} ${l}`:`${e} ${d}`};switch(e.at(-1)){case"D":return c(h,t,i,n,"nami_day");case"W":return c(d,t,i,n,"nami_week");case"M":return c(l,t,i,n,"nami_month");case"Y":return c(u,t,i,n,"nami_year")}return null}function Fi(e){var t;if(!e||e.length<2)return!1;var i=null===(t=e.at(-1))||void 0===t?void 0:t.toUpperCase();return"M"===i||"Y"===i}function Wi(e){var t={maximumFractionDigits:2,minimumFractionDigits:0};try{return new Intl.NumberFormat(navigator.language,ie({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(navigator.language,ie({},t,{style:"currency",currency:"USD"}))}}var Oi=(e,t,i)=>e&&t&&i?i.format(e-t):null,$i=(e,t,i,n)=>{if(e&&t&&i&&n){var a=100*(1-e/(i/n*t));return`${Math.round(a)}%`}return null},Ni=(e,t)=>{if(""!=t){var i=parseInt(t)-1;return i>=0&&i<(null==e?void 0:e.length)?e[i]:null==e?void 0:e.find(e=>e.sku_ref_id===t)}},ji=e=>zi(e.priceAmountMicros)/Bi(e.billingPeriod),Bi=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},zi=e=>e/1e6;function Ui(e){return parseFloat((Math.round(e)/100).toFixed(2))}var Hi=(e,t,i=[])=>({price:()=>Vi(e),name:()=>null==e?void 0:e.name,title:()=>null==e?void 0:e.name,description:()=>null==e?void 0:e.description,duration:()=>Ki(e),durationSingular:()=>Ki(e,!0),period:()=>Ki(e,!1,!0),periodNumber:()=>Ki(e,!1,!1,!0),freeTrialDuration:()=>Xi(e),freeTrialDurationSingular:()=>Xi(e,!0),freeTrialPeriod:()=>Xi(e,!1,!0),freeTrialPeriodNumber:()=>Xi(e,!1,!1,!0),pricePerMonth:()=>Yi(e),pricePerMonthRounded:()=>Yi(e,!0),periodInMonths:()=>qi(e),durationInMonths:()=>Ji(e),durationInMonthsSingular:()=>Ji(e,!0),periodNumberInMonths:()=>Qi(e),percentagePriceDifferenceFromSku:()=>Zi(e,t,i),priceDifferenceFromSku:()=>en(e,t,i),promoEligible:()=>null===tn(e)&&null!==nn(e,t),freeTrialEligible:()=>null!==tn(e),promo:()=>{var i;return null===(i=nn(e,t))||void 0===i?void 0:i.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var i;return null===(i=an(e,t))||void 0===i?void 0:i.formattedPrice},promoPeriod:()=>rn(e,t,!1,!0),promoPeriodNumber:()=>rn(e,t,!1,!1,!0),promoDuration:()=>rn(e,t),promoDurationSingular:()=>rn(e,t,!0),introEligible:()=>!1,pricePerDay:()=>dn(e),pricePerWeek:()=>hn(e),pricePerWeekRounded:()=>hn(e,!0),introductoryPrice:()=>un(e,t),introductoryPeriod:()=>sn(e,t,!1,!0),introductoryPeriodNumber:()=>sn(e,t,!1,!1,!0),introductoryDuration:()=>sn(e,t),introductoryDurationSingular:()=>sn(e,t,!0),introductoryPricePerMonth:()=>ln(e,t),introductoryPricePerMonthRounded:()=>ln(e,t,!0),durationAbbrev:()=>Ki(e,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>Xi(e,!1,!1,!1,!0),introductoryDurationAbbrev:()=>sn(e,t,!1,!1,!1,!0),promoDurationAbbrev:()=>rn(e,t,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>rn(e,t,!0,!0,!1,!0),durationInMonthsAbbrev:()=>Ji(e,!1,!1,!1,!0),durationSingularAbbrev:()=>Ki(e,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>Xi(e,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>sn(e,t,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>rn(e,t,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>rn(e,t,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>Ji(e,!0,!1,!1,!0),periodAbbrev:()=>Ki(e,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>Xi(e,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>sn(e,t,!1,!0,!1,!0),promoPeriodAbbrev:()=>rn(e,t,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>rn(e,t,!1,!0,!0,!0),periodInMonthsAbbrev:()=>Ji(e,!1,!0,!1,!0),periodly:()=>function(e){if(!e)return null;var t=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!t)return null;var i=t[1],n=t[2],r=t[3],o=t[4],s=void 0!==i?parseInt(i,10):0,u=void 0!==n?parseInt(n,10):0,l=void 0!==r?parseInt(r,10):0;return(void 0!==o?parseInt(o,10):0)>0?null:l>0?1===l?a("nami_weekly"):2===l?a("nami_biweekly"):null:u>0?a(1===u?"nami_monthly":2===u?"nami_bimonthly":3===u?"nami_quarterly":6===u?"nami_biannually":12===u?"nami_yearly":"nami_monthly"):s>0?a("nami_yearly"):null}(xi(e)),iso_subscription_duration:()=>cn(e),invalid:()=>!1,unavailable:()=>!1}),Gi=(e,t,i,n=[])=>{if(!t)return null;var a=Hi(t,i,n);return a[e]?a[e]():null},Vi=e=>{var t=Ii(e);return t&&t.length?t[0].formattedPrice:null},Ki=(e,t,i,n,a)=>Ri(xi(e),t,i,n,a),Xi=(e,t,i,n,a)=>Ri(Ci(e),t,i,n,a),Yi=(e,t)=>{var i=Ii(e);if(!i||0===i.length)return null;var n=ji(i[0]);return n?Wi(i[0].priceCurrencyCode).format(t?Math.round(n):n):null},qi=(e,t)=>{var i=Ii(e);if(!i||0===i.length)return null;var n=i[0].billingPeriod;return Fi(n)?Ri("P1Y"===n?"P12M":n,!1,!1,!1,t):null},Ji=(e,t,i,n,a)=>{var r=Ii(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return Fi(o)?Ri("P1Y"===o?"P12M":o,t,i,n,a):null},Qi=e=>{if(!e)return 0;var t=Ii(e);return t&&t.length?Bi(t[0].billingPeriod):0},Zi=(e,t,i=[])=>{var n,a=Ii(e);if(!a||0===a.length)return null;var r=null===(n=Ni(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return $i(Ui(a[0].priceAmountMicros),Qi(e));var o=Ii(r);return $i(Ui(a[0].priceAmountMicros),Qi(e),(null==o?void 0:o.length)>0?Ui(o[0].priceAmountMicros):0,Qi(r))},en=(e,t,i=[])=>{var n,a=Ii(e);if(!a||0===a.length)return null;var r=null===(n=Ni(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return Oi(ji(a[0]));var o=Ii(r);return Oi(ji(a[0]),ji(o[0]),Wi(o[0].priceCurrencyCode))},tn=e=>Ci(e),nn=(e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"promo"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null},an=(e,t)=>{if(!e)return null;var i=nn(e,t);return i?_i(i,e.subscription_period):null},rn=(e,t,i,n,a,r)=>{var o=an(e,t);return Ri((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},on=(e,t)=>{if(!e)return null;var i=((e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"intro"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null})(e,t);return i?_i(i,e.subscription_period):null},sn=(e,t,i,n,a,r)=>{var o=on(e,t);return Ri((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},un=(e,t)=>{var i=on(e,t);return i?i.formattedPrice:null},ln=(e,t,i)=>{var n=on(e,t);if(!n)return null;var a=ji(n);return a?Wi(n.priceCurrencyCode).format(i?Math.round(a):a):null},dn=e=>{var t=Ii(e);if(!t||0===t.length)return null;var i,n,a=zi(t[0].priceAmountMicros)/(i=t[0].billingPeriod,(n=Bi(i))?30.437*n:1);return Wi(t[0].priceCurrencyCode).format(a)},hn=(e,t)=>{var i=Ii(e);if(!i||0===i.length)return null;var n,a,r=zi(i[0].priceAmountMicros)/(n=i[0].billingPeriod,(a=Bi(n))?52*a/12:1);return Wi(i[0].priceCurrencyCode).format(t?Math.round(r):r)},cn=e=>{var t=Ii(e)[0];return t?t.billingPeriod:null},mn="object"==typeof global&&global&&global.Object===Object&&global,fn="object"==typeof self&&self&&self.Object===Object&&self,vn=mn||fn||Function("return this")(),pn=vn.Symbol;var gn=Array.isArray,yn=Object.prototype,bn=yn.hasOwnProperty,wn=yn.toString,kn=pn?pn.toStringTag:void 0;var Sn=Object.prototype.toString;var En=pn?pn.toStringTag:void 0;function Mn(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":En&&En in Object(e)?function(e){var t=bn.call(e,kn),i=e[kn];try{e[kn]=void 0;var n=!0}catch(e){}var a=wn.call(e);return n&&(t?e[kn]=i:delete e[kn]),a}(e):function(e){return Sn.call(e)}(e)}function Tn(e){return null!=e&&"object"==typeof e}var Pn=pn?pn.prototype:void 0,An=Pn?Pn.toString:void 0;function Dn(e){if("string"==typeof e)return e;if(gn(e))return function(e,t){for(var i=-1,n=null==e?0:e.length,a=Array(n);++i<n;)a[i]=t(e[i],i,e);return a}(e,Dn)+"";if(function(e){return"symbol"==typeof e||Tn(e)&&"[object Symbol]"==Mn(e)}(e))return An?An.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function xn(e){return null==e?"":Dn(e)}function Cn(e,t,i){var n=e.length;return i=void 0===i?n:i,!t&&i>=n?e:function(e,t,i){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(i=i>a?a:i)<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var r=Array(a);++n<a;)r[n]=e[n+t];return r}(e,t,i)}var In=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Ln(e){return In.test(e)}var _n="\\ud800-\\udfff",Rn="["+_n+"]",Fn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Wn="\\ud83c[\\udffb-\\udfff]",On="[^"+_n+"]",$n="(?:\\ud83c[\\udde6-\\uddff]){2}",Nn="[\\ud800-\\udbff][\\udc00-\\udfff]",jn="(?:"+Fn+"|"+Wn+")"+"?",Bn="[\\ufe0e\\ufe0f]?",zn=Bn+jn+("(?:\\u200d(?:"+[On,$n,Nn].join("|")+")"+Bn+jn+")*"),Un="(?:"+[On+Fn+"?",Fn,$n,Nn,Rn].join("|")+")",Hn=RegExp(Wn+"(?="+Wn+")|"+Un+zn,"g");function Gn(e){return Ln(e)?function(e){return e.match(Hn)||[]}(e):function(e){return e.split("")}(e)}var Vn,Kn=(Vn="toUpperCase",function(e){var t=Ln(e=xn(e))?Gn(e):void 0,i=t?t[0]:e.charAt(0),n=t?Cn(t,1).join(""):e.slice(1);return i[Vn]()+n});var Xn,Yn=(Xn={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},function(e){return null==Xn?void 0:Xn[e]}),qn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Qn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var ea="\\ud800-\\udfff",ta="\\u2700-\\u27bf",ia="a-z\\xdf-\\xf6\\xf8-\\xff",na="A-Z\\xc0-\\xd6\\xd8-\\xde",aa="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ra="["+aa+"]",oa="\\d+",sa="["+ta+"]",ua="["+ia+"]",la="[^"+ea+aa+oa+ta+ia+na+"]",da="(?:\\ud83c[\\udde6-\\uddff]){2}",ha="[\\ud800-\\udbff][\\udc00-\\udfff]",ca="["+na+"]",ma="(?:"+ua+"|"+la+")",fa="(?:"+ca+"|"+la+")",va="(?:['’](?:d|ll|m|re|s|t|ve))?",pa="(?:['’](?:D|LL|M|RE|S|T|VE))?",ga="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",ya="[\\ufe0e\\ufe0f]?",ba=ya+ga+("(?:\\u200d(?:"+["[^"+ea+"]",da,ha].join("|")+")"+ya+ga+")*"),wa="(?:"+[sa,da,ha].join("|")+")"+ba,ka=RegExp([ca+"?"+ua+"+"+va+"(?="+[ra,ca,"$"].join("|")+")",fa+"+"+pa+"(?="+[ra,ca+ma,"$"].join("|")+")",ca+"?"+ma+"+"+va,ca+"+"+pa,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",oa,wa].join("|"),"g");function Sa(e,t,i){return e=xn(e),void 0===t?function(e){return Zn.test(e)}(e)?function(e){return e.match(ka)||[]}(e):function(e){return e.match(Qn)||[]}(e):e.match(t)||[]}var Ea=RegExp("['’]","g");var Ma,Ta=(Ma=function(e,t,i){return t=t.toLowerCase(),e+(i?Kn(xn(t).toLowerCase()):t)},function(e){return function(e,t,i){for(var n=-1,a=null==e?0:e.length;++n<a;)i=t(i,e[n],n,e);return i}(Sa(function(e){return(e=xn(e))&&e.replace(qn,Yn).replace(Jn,"")}(e).replace(Ea,"")),Ma,"")});function Pa(e,t,i){var n,a,r=null!==(n=null===(a=t.find(e=>e.id===i))||void 0===a?void 0:a.products)&&void 0!==n?n:[];return r.forEach(t=>{t.product_details=Ca(e,t.sku_ref_id||""),t.variables=function(e,t,i){if(!t)return{};var n=t.variables;if(!n)return ie({},t);Object.keys(n).forEach(t=>{if(Aa(n[t])){var a=xa(n[t],e,i);n[t]=function(e){if(!e||e.includes("null")||e.includes("undefined"))return"";if(/\$\{\s*(launch\.customAttributes\.|sku\.)\w+\s*}/.test(e))return"";return e}(a)}});var a={};return(()=>Object.keys(Hi({})))().forEach(t=>{if(void 0===n[t]){var r=Gi(t,e,void 0,i);null!==r&&(a[t]=r)}}),ie({},t,a,n)}(t.product_details,t,r)}),r}function Aa(e){return"string"==typeof e&&e.includes(r)}function Da(e,t,i){return t?(Object.keys(t).forEach(n=>{Aa(t[n])&&(t[n]=t[Ta(n)]=xa(t[n],e,i))}),ie({},t)):{}}var xa=(e,t,i)=>e.replace(o,(n,a)=>{var r,s,u,l,d=(null===(r=o.exec(e))||void 0===r?void 0:r.slice(1))||[];a=null!==(s=d[0])&&void 0!==s?s:a;var h=null!==(u=null===(l=d[1])||void 0===l?void 0:l.replace(":",""))&&void 0!==u?u:"";return Gi(a,t,h,i)});function Ca(e=[],t=""){return e.find(e=>e.product_ref_id===t)||null}var Ia=["conditionAttributes"];function La(e,t){return Array.isArray(e)?e.reduce((e,i)=>{var n=La(i,t);return Array.isArray(n)?[...e,...n]:[...e,n]},[]):null==e?e:"object"==typeof e?Object.entries(e).reduce((e,[i,n])=>{var a="newRow"===i?n:La(n,t);return ie({},e,{[i]:a})},{}):"string"==typeof e?Na(e,t):e}function _a(e,t,i,n={}){var a=i.productBaseComponents||i.components||[],r=i.productFeaturedComponents||a;return t.map(t=>{var i,o,s,u=t.featured?r:a,l=t.entitlements.map(e=>e.entitlement_ref_id),h=Ca(e.productDetails,t.sku_ref_id),c={freeTrialEligible:1==Gi("freeTrialEligible",h),introEligible:1==Gi("introEligible",h),promoEligible:1==Gi("promoEligible",h),invalid:Gi("invalid",h),unavailable:Gi("unavailable",h)},m=ie({},t,t.variables,c,{id:t.id,entitlements:l});o=t,s=e=>{for(var t,i=te(e);!(t=i()).done;){var n=t.value;n.sku=d(o),n.components&&s(n.components),n.collapseHeader&&n.collapseHeader.components&&s(n.collapseHeader.components)}},s(u);var f={sku:m,media:$a(n,{convertToUrl:!0})};return[null!==(i=t.featured)&&void 0!==i&&i,La(u,La(f,f))]},[])}function Ra(e,t){if(!t.loopSource)return[];var i="string"==typeof t.loopSource?JSON.parse(t.loopSource):t.loopSource,n=null!=i?i:[],a=t.groupBy,r=t.groupHeaderTemplate,o=e=>La(t.components,La({block:e},{block:e}));if(!a||!r)return[{header:null,items:n.map(o).filter(e=>null!=e)}];for(var s,u=[],l=new Map,d=te(n);!(s=d()).done;){var h=s.value,c=La(a,La({block:h},{block:h})),m=null==c?"":String(c);l.has(m)||(u.push(m),l.set(m,[])),l.get(m).push(h)}return u.map(e=>{var t={key:e};return{header:[La(r,La({group:t},{group:t}))],items:l.get(e).map(o)}})}function Fa(e,t){return t.assertions?t.assertions.every(Oa.bind(null,e)):!!t.orAssertions&&(!t.orAssertions.length||t.orAssertions.some(Oa.bind(null,e)))}function Wa(e,t,i,n=null){var a,o=null!==(a=null==e?void 0:e.flow)&&void 0!==a?a:{},u=o.manager,l=o.previousStepAvailable,d=o.nextStepAvailable,h=e.state,c={};return n&&(c={block:n}),c=ie({},c,{state:h,urlParams:s(),flow:{isLaunched:!(null==u||!u.flowOpen),previousStepAvailable:!!l,nextStepAvailable:!!d},launch:h.launch,sku:h.sku,customer:h.customer}),"string"==typeof t&&t.includes(r)&&(t=Na(t,c)),t}function Oa(e,{value:t,expected:i,operator:n},a){if(t=Wa(e,t,0,a),i=Wa(e,i,0,a),"equals"===n)return t===i;if("notEquals"===n)return t!==i;if("contains"===n){var r;if(Array.isArray(t)||"string"==typeof t||t instanceof String||(t=t.toString()),"collapse"==i)i+="_"+(null===(r=e.getCurrentCollapsibleSku())||void 0===r?void 0:r.skuId);return t.includes(i)}return"notContains"===n?(Array.isArray(t)||"string"==typeof t||t instanceof String||(t=t.toString()),!t.includes(i)):"set"===n?"boolean"==typeof i?!!t&&!t.toString().match(l)===i:!!t&&!t.toString().match(l):"notSet"===n?!t||t.toString().match(l):"gt"===n?t>i:"gte"===n?t>=i:"lt"===n?t<i:"lte"===n&&t<=i}function $a(e,{convertToUrl:t}={convertToUrl:!1}){return Object.entries(e).reduce((e,[i,{content:n}])=>(t&&"string"!=typeof n&&n&&(n=URL.createObjectURL(n)),ie({},e,{[i]:n})),{})}function Na(e,t){var i=e;if("string"!=typeof e)return i;for(var n,a=new RegExp(u.source,u.flags),r=[];null!==(n=a.exec(e))&&(r.push(n),a.global);)n.index===a.lastIndex&&a.lastIndex++;for(var o=0,s=r;o<s.length;o++){var l=s[o],d=l[0],h=l[1],c=Na(h,t);if(d===e)return m(d,c);c!==h&&(i=i.replace(h,c)),i=i.replace(u,m)}return i;function m(e,i){var n=String(i).split("."),a=n[0];if(!a)return e;var r=ja(t,a);if(void 0===r)return e;if("object"==typeof r&&null!==r&&0===Object.keys(r).length)return"";var o=ja(t,...n);return void 0===o?"":"string"!=typeof o?o:Na(o,t)}}function ja(e,...t){for(var i=e,n=0,a=t;n<a.length;n++){var r=a[n];if(null==i)return;i=Array.isArray(i)?i[+r]:i[r]}return i}var Ba=e=>{var t=e.state.timeSpentOnPaywall;if(t)return Date.now()-t},za=e=>{if(!e)return null;if(e.includes("#"))return e;var t=e.match(/[\d.]+/g);if(!t||t.length<3)return null;var i=t.map(Number),n=i[0],a=i[1],r=i[2],o=i[3],s=e=>Math.round(e).toString(16).padStart(2,"0"),u=void 0!==o&&o<1?s(255*o):"";return`#${s(n)}${s(a)}${s(r)}${u}`},Ua=(e,t)=>{if(!e||!t)return!0;var i=null!=e&&e.includes("rgb")?za(e):e,n=null!=t&&t.includes("rgb")?za(t):t;return(null==i?void 0:i.toLowerCase())===(null==n?void 0:n.toLowerCase())},Ha=!0,Ga=!1,Va=!1,Ka=!1,Xa=!1,Ya=!1,qa=null,Ja=null,Qa=null,Za=!1,er="",tr=!1,ir=null,nr=null,ar=null,rr=null,or=null,sr=null,ur=null,lr=null,dr=!1,hr=null,cr="",mr=0,fr=1,vr=null,pr=[],gr=new WeakMap,yr=new WeakMap,br=1;function wr(e){var t=yr.get(e);return t||(t=br++,yr.set(e,t)),String(t)}var kr=null,Sr=null;function Er(e){return!0===e||"true"===e||"1"===e||"yes"===e}function Mr(e,t){if(function(){if("undefined"==typeof window)return!1;try{var e,t;return!!Er(window.NAMI_TTS_DEBUG)||Er(null===(e=window.localStorage)||void 0===e?void 0:e.getItem("nami:tts:debug"))||Er(null===(t=window.localStorage)||void 0===t?void 0:t.getItem("NAMI_TTS_DEBUG"))}catch(e){return!1}}())try{t?console.debug(`[Nami TTS] ${e}`,t):console.debug(`[Nami TTS] ${e}`)}catch(e){}}function Tr(e="TTS is unavailable in this runtime."){Ga||(Ga=!0,Mr(e))}function Pr(e){if(!e)return"none";var t=e.id?`#${e.id}`:"",i=e.getAttribute("data-testid"),n=i?`[data-testid="${i}"]`:"";return`${e.tagName.toLowerCase()}${t}${n}`}function Ar(e){return function(e){return null==e?"":String(e).replace(/[^.!?\n]*\$\{[^}]*subscribeUrl[^}]*\}[^.!?\n]*[.!?]?/gi,"To subscribe, follow the on-screen instructions.").replace(/\$\{[^}]+\}/g," ").replace(/\s+([.,!?;:])/g,"$1").replace(/\s+/g," ").trim()}(e)}function Dr(e){return e.toLowerCase().replace(/[^a-z0-9$]+/g," ").replace(/\s+/g," ").trim()}function xr(e){return Ar(String(null!=e?e:"").replace(/<[^>]*>/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[*_`#>~]/g," "))}function Cr(e,t){var i=Ar(t);i&&e[e.length-1]!==i&&e.push(i)}function Ir(e,t=[]){var i=[];return[...e,...t].forEach(e=>{var t=function(e){var t=Ar(e);if(!t)return[];for(var i=[],n=0,a=0;a<t.length;a+=1){var r=t.charAt(a),o=t.charAt(a+1);if(("."===r||"!"===r||"?"===r)&&(!o||/\s/.test(o))){var s=Ar(t.slice(n,a+1));for(s&&i.push(s);a+1<t.length&&/\s/.test(t.charAt(a+1));)a+=1;n=a+1}}var u=Ar(t.slice(n));u&&i.push(u);return i.length?i:[t]}(e);t.length||Cr(i,e),t.forEach(e=>Cr(i,e))}),i.slice(0,60)}function Lr(e){return Ar(e.join(". ").replace(/\.\s*([.!?])/g,"$1"))}function _r(e){var t,i=vr;i&&(e&&i.id===e||(i.status="cancelled",(null===(t=vr)||void 0===t?void 0:t.id)===i.id&&(vr=null)))}function Rr(){if("undefined"==typeof document)return null;for(var e=document.activeElement;e&&null!==(t=e.shadowRoot)&&void 0!==t&&t.activeElement;){var t,i,n;e=null!==(i=null===(n=e.shadowRoot)||void 0===n?void 0:n.activeElement)&&void 0!==i?i:e}return e}function Fr(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot}function Wr(e){for(var t=[],i=null!=e?e:null;i;){i instanceof Element&&-1===t.indexOf(i)&&t.push(i);var n=i.parentNode;i=Fr(n)?n.host:n}return t}function Or(e,t){return!!t&&-1!==Wr(t).indexOf(e)}function $r(e,t){if(!t)return!1;if(t===e)return!0;if(e.contains(t))return!0;var i=e.shadowRoot;return!!i&&(i.activeElement===t||i.contains(t))}function Nr(e){return $r(e,Rr())}function jr(e,t){t&&-1===e.indexOf(t)&&e.push(t)}function Br(e,t){var i=t.shadowRoot;i&&i.querySelectorAll('button,[role="button"],a,input,select,textarea,[tabindex]:not([tabindex="-1"])').forEach(t=>jr(e,t))}function zr(e,t){var i,n=("function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():null!==(i=null==t?void 0:t.composedPath)&&void 0!==i?i:[]).filter(e=>e instanceof Element);return n.length?n:Wr(e)}function Ur(e,t=[]){var i=[],n=(t.length?t:Wr(e)).filter(e=>e.isConnected),a=function(e,t){var i,n=t.find(e=>e.matches("nami-product-container"));if(n)return n;var a=Wr(e).find(e=>e.matches("nami-product-container"));if(a)return a;var r=Qa&&"querySelectorAll"in Qa?Qa:"undefined"!=typeof document?document:null;return r&&null!==(i=Array.prototype.slice.call(r.querySelectorAll("nami-product-container")).find(t=>Or(t,e)))&&void 0!==i?i:null}(e,n);return jr(i,e),Br(i,e),n.forEach(t=>{var n=!!a&&(t===a||Or(a,t)),r=t!==e&&Or(t,e),o=t.matches('nami-product-container,nami-button,[role="button"],button,[tabindex]:not([tabindex="-1"])');(n||r||t===e)&&o&&(jr(i,t),Br(i,t))}),null!=a&&a.isConnected&&(jr(i,a),Br(i,a)),i}function Hr(e){return"true"===e.getAttribute("data-tts-composite-active")||"true"===e.getAttribute("data-webos-luna-composite-active")}function Gr(e){return!!e&&pr.some(t=>t.getAttribute("data-tts-composite-transaction")===String(e)||t.getAttribute("data-webos-luna-composite-transaction")===String(e))}function Vr(e){var t,i;return pr.length?e?null!==(i=pr.find(t=>t.getAttribute("data-tts-composite-transaction")===String(e)||t.getAttribute("data-webos-luna-composite-transaction")===String(e)))&&void 0!==i?i:null:null!==(t=pr[0])&&void 0!==t?t:null:null}function Kr(e,t,i){var n=Ar(t);return!!n&&(gr.has(e)||gr.set(e,{"aria-label":e.getAttribute("aria-label"),"speech-label":e.getAttribute("speech-label"),"data-speech":e.getAttribute("data-speech"),"data-tts-spoken-label":e.getAttribute("data-tts-spoken-label"),"data-tts-composite-label":e.getAttribute("data-tts-composite-label"),"data-tts-composite-active":e.getAttribute("data-tts-composite-active"),"data-tts-composite-transaction":e.getAttribute("data-tts-composite-transaction"),"data-webos-luna-composite-active":e.getAttribute("data-webos-luna-composite-active"),"data-webos-luna-composite-transaction":e.getAttribute("data-webos-luna-composite-transaction")}),e.setAttribute("aria-label",n),e.setAttribute("speech-label",n),e.setAttribute("data-speech",n),e.setAttribute("data-tts-composite-label",n),e.setAttribute("data-tts-composite-active","true"),i&&e.setAttribute("data-tts-composite-transaction",String(i)),e.setAttribute("data-webos-luna-composite-active","true"),i&&e.setAttribute("data-webos-luna-composite-transaction",String(i)),!0)}function Xr(e,t,i,n=[]){var a=Ar(t);if(!a)return!1;Jr(),qr(void 0,void 0,"new-composite",!0);var r=Ur(e,n);return r.forEach(e=>Kr(e,a,i)),pr=r,!0}function Yr(e,t,i){if(!(t instanceof Element))return!1;if(!t.isConnected||!i)return!1;if(!function(e){var t;return!(!e||(null===(t=vr)||void 0===t?void 0:t.id)!==e||"composite"!==vr.reason||!Gr(e))}(i))return!1;if(!t.matches("nami-product-container"))return!1;var n=vr;if(null==n||!n.text)return!1;var a=[];jr(a,t),Br(a,t);var r=[];return a.forEach(e=>{Kr(e,n.text,i)&&(jr(pr,e),jr(r,e))}),r.length>0}function qr(e,t,i="manual",n=!1){var a,r=e&&-1===pr.indexOf(e)?Ur(e):pr;if(r.length){var o=vr,s=r.map(e=>e.getAttribute("data-tts-composite-transaction")||e.getAttribute("data-webos-luna-composite-transaction")).find(Boolean);!n&&t&&s&&String(t)!==s?Mr("composite restore skipped: transaction mismatch",{reason:i}):n||!o||t&&t===o.id||!r.some(e=>Hr(e))?(Jr(),r.forEach(e=>{var t=gr.get(e);t&&(Object.keys(t).forEach(i=>function(e,t,i){null===i?e.removeAttribute(t):e.setAttribute(t,i)}(e,i,t[i])),gr.delete(e))}),e&&-1===pr.indexOf(e)||(pr=[]),!t||(null===(a=vr)||void 0===a?void 0:a.id)!==t||e&&vr.element!==e||(vr.status="ended",vr=null)):Mr("composite restore skipped: active transaction mismatch",{reason:i})}}function Jr(){ar&&(clearTimeout(ar),ar=null)}function Qr(){rr&&(clearTimeout(rr),rr=null),kr=null}function Zr(){or&&(clearTimeout(or),or=null)}function eo(){sr&&(clearTimeout(sr),sr=null)}function to(){ur&&(clearTimeout(ur),ur=null)}function io(){lr&&(clearTimeout(lr),lr=null)}function no(e){dr=!0,io(),lr=setTimeout(()=>{lr=null,dr=!1},oo(e)+500)}function ao(){io(),dr=!1}function ro(e){pr.length&&qr(void 0,void 0,e,!0)}function oo(e){var t=Ar(e),i=350*(t?t.split(/\s+/).filter(Boolean).length:0);return Math.min(3e4,Math.max(4e3,i))}function so(e,t="",i="estimated-speech-duration"){if(Vr(e)){var n=oo(t);Jr(),ar=setTimeout(()=>{ar=null;var t=Vr(e);t&&(Nr(t)||qr(t,e,i))},n)}}function uo(){return"undefined"==typeof window?null:window}function lo(){var e,t=null===(e=uo())||void 0===e||null===(e=e.webOS)||void 0===e||null===(e=e.service)||void 0===e?void 0:e.request;return"function"==typeof t?t:null}function ho(){return!!lo()}function co(){var e;if("undefined"==typeof window)return null;var t=null===(e=window.VIZIO)||void 0===e?void 0:e.Chromevox;return t&&"function"==typeof t.play?t:null}function mo(){return"undefined"!=typeof window&&void 0!==window.speechSynthesis&&"function"==typeof window.speechSynthesis.speak&&"function"==typeof window.SpeechSynthesisUtterance}function fo(){var e;if("undefined"==typeof window)return!1;var t=window,i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"";return!(!t.VIZIO&&-1===i.indexOf("vizio"))}function vo(){var e,t;if("undefined"==typeof window)return!1;if(fo())return!1;var i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"",n=uo();return!!(null!=n&&n.webOS||null!=n&&n.webOSDev||null!=n&&n.PalmSystem||null!=n&&null!==(t=n.webOS)&&void 0!==t&&null!==(t=t.platform)&&void 0!==t&&t.tv||-1!==i.indexOf("webos")||-1!==i.indexOf("netcast"))}function po(){var e;if("undefined"==typeof window)return!1;var t=window,i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"";return!!(t.tizen||-1!==i.indexOf("tizen")||-1!==i.indexOf("samsung")&&(-1!==i.indexOf("smart-tv")||-1!==i.indexOf("smarttv"))||-1!==i.indexOf("samsungbrowser")&&-1!==i.indexOf("tv"))}function go(){var e;return"undefined"!=typeof window&&-1!==((null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"").indexOf("xbox")}function yo(){if("undefined"==typeof window)return!1;try{return"television"===h()}catch(e){return!1}}function bo(){if(Xa)return!1;var e=co();if(!e)return!1;try{return"function"!=typeof e.isEnabled||e.isEnabled()}catch(e){return!1}}function wo(){return{televisionRuntime:yo(),televisionTtsRuntime:ko(),webos:vo(),tizen:po(),vizio:fo(),xbox:go(),hasWebOsServiceRequest:ho(),webOsRequestType:typeof lo(),hasWebSpeechApi:mo(),webSpeechUnavailableForSession:Va,webOsLunaUnavailableForSession:Ka,vizioChromevoxUnavailableForSession:Xa}}function ko(){return yo()||vo()||fo()||po()}function So(){return ko()&&!Va&&mo()}function Eo(e){if(Ya=e,Mr("set media playing",{playing:e,hasDeferredUtterance:!!qa}),!e&&qa){var t,i=qa;if(qa=null,i.options.transactionId&&(null===(t=vr)||void 0===t?void 0:t.id)!==i.options.transactionId)return void Mr("drop stale deferred speech",{transactionId:i.options.transactionId,reason:i.options.reason});Bo(i.text,i.options)}}function Mo(e){Va=!0,Tr(vo()?"Web Speech TTS unavailable in this webOS runtime":"Web Speech TTS unavailable in this runtime"),Mr("web speech unavailable",{error:e})}function To(e){Ka=!0,Mr("webOS Luna unavailable",{error:e})}function Po(e,t){qa={text:e,options:t}}var Ao={name:"webos-luna-tts",platform:"webos",isAvailable:function(){return ko()&&!fo()&&!Ka&&ho()},speak:function(e,t){Mr("speakViaWebOsLuna:enter",{textPreview:e.slice(0,160),reason:t.reason,transactionId:t.transactionId,requestType:typeof lo()});var i=lo();if(!i)return Mr("speakViaWebOsLuna:no-request"),!1;var n="composite"===t.reason,a=!1,r=()=>{var r,o;if(sr=null,t.transactionId&&(null===(r=vr)||void 0===r?void 0:r.id)!==t.transactionId)return Mr("speakViaWebOsLuna:drop-stale-delayed-speak",{transactionId:t.transactionId,activeTransaction:null===(o=vr)||void 0===o?void 0:o.id,reason:t.reason}),!1;if(Ya)return Mr("speakViaWebOsLuna:defer-delayed-speak-media-playing",{transactionId:t.transactionId,reason:t.reason}),Po(e,t),!0;var s=!1;try{Mr("speakViaWebOsLuna:request",{uri:"luna://com.webos.service.tts",method:"speak",delayedComposite:n,textPreview:e.slice(0,160)}),i("luna://com.webos.service.tts",{method:"speak",parameters:{text:e,clear:!0,feedback:!0},onSuccess:i=>{var n;if(Mr("speakViaWebOsLuna:onSuccess",{response:i,transactionId:t.transactionId}),!t.transactionId||(null===(n=vr)||void 0===n?void 0:n.id)===t.transactionId){var r=function(e){var t,i=Ar(null!==(t=null==e?void 0:e.msgStatus)&&void 0!==t?t:null==e?void 0:e.status).toLowerCase();return"done"===i||"stopped"===i||"canceled"===i||"cancelled"===i||"error"===i}(i),o=!(null==i||!i.returnValue||"msgStatus"in Object(null!=i?i:{}));a||!r&&!o||(a=!0,function(e,t,i){var n,a=Gr(e),r=!e||(null===(n=vr)||void 0===n?void 0:n.id)===e;e&&r&&vr&&!a?(vr.status="ended",vr=null):e&&r&&vr&&(vr.status="ended"),a&&r&&so(e,t,i)}(t.transactionId,e,r?"webos-feedback":"estimated-speech-duration"))}},onFailure:i=>{var n;s=!0,Mr("speakViaWebOsLuna:onFailure",{error:i,transactionId:t.transactionId});var a=Gr(t.transactionId),r=!t.transactionId||(null===(n=vr)||void 0===n?void 0:n.id)===t.transactionId;t.transactionId&&r&&vr&&!a?(vr.status="cancelled",vr=null):t.transactionId&&r&&vr&&(vr.status="cancelled"),To(i),a&&r&&so(t.transactionId,e,"estimated-speech-duration-after-failure")}})}catch(e){var u;return t.transactionId&&(null===(u=vr)||void 0===u?void 0:u.id)===t.transactionId&&(vr.status="cancelled",vr=null),To(e),!1}return!s};if(n)return eo(),Mr("speakViaWebOsLuna:delay-composite-until-focus-settles",{delayMs:250,transactionId:t.transactionId}),sr=setTimeout(r,250),!0;return r()},stop:Co},Do={name:"web-speech",platform:"web",isAvailable:So,speak:function(e,t){if(!So())return!1;try{var i=new window.SpeechSynthesisUtterance(e);return i.onstart=()=>{var e;t.transactionId&&(null===(e=vr)||void 0===e?void 0:e.id)===t.transactionId&&(vr.status="started")},i.onend=()=>{var e=vr,i=!t.transactionId||(null==e?void 0:e.id)===t.transactionId;t.transactionId&&i&&e&&(e.status="ended",vr=null)},i.onerror=e=>{var i,n=e.error;t.transactionId&&(null===(i=vr)||void 0===i?void 0:i.id)===t.transactionId&&(vr.status="cancelled",vr=null),"synthesis-failed"===n&&Mo(n)},window.speechSynthesis.speak(i),!0}catch(e){return Mo("exception"),!1}},stop:()=>{if(mo())try{window.speechSynthesis.cancel()}catch(e){}}},xo={name:"vizio-chromevox",platform:"vizio",isAvailable:bo,speak:Lo,stop:Io};function Co(){var e=lo();if(e)try{e("luna://com.webos.service.tts",{method:"stop",parameters:{},onFailure:e=>Mr("webOS Luna stop failed",{error:e})})}catch(e){Mr("webOS Luna stop threw",{error:e})}}function Io(e=!0){var t=!!or,i=dr;Zr();var n=co(),a=function(){var e;if("undefined"==typeof window)return null;var t=null===(e=window.chrome)||void 0===e||null===(e=e.tts)||void 0===e?void 0:e.stop;return"function"==typeof t?t:null}();if((n||a)&&(i||t||a)&&(i||!t||a))try{var r=!1;n&&"function"==typeof n.stop&&(n.stop(),r=!0),n&&"function"==typeof n.cancel&&n.cancel(),n&&"function"==typeof n.pause&&n.pause(),a&&(a(),r=!0),n&&e&&!r&&i&&n.play(""),ao()}catch(e){ao(),Mr("VIZIO stop threw",{error:e})}}function Lo(e,t){var i=co();if(!i)return!1;try{var n,a,r=!0===(null===(n=t.element)||void 0===n?void 0:n.isConnected),o="composite"===t.reason?1400:"focus"===t.reason?700:0;return o>0?(Zr(),or=setTimeout(()=>{var n;if(or=null,!t.transactionId||!vr||vr.id===t.transactionId)if(t.element&&r&&!t.element.isConnected){var a;t.transactionId&&(null===(a=vr)||void 0===a?void 0:a.id)===t.transactionId&&(vr.status="cancelled",vr=null)}else{if(Ya)return Qr(),Sr=null,void Po(e,t);i.play(e),no(e),t.transactionId&&(null===(n=vr)||void 0===n?void 0:n.id)===t.transactionId&&(vr.status="ended",vr=null)}},o),!0):(i.play(e),no(e),t.transactionId&&(null===(a=vr)||void 0===a?void 0:a.id)===t.transactionId&&(vr.status="ended",vr=null),!0)}catch(e){return function(e){Xa=!0,Mr("VIZIO Chromevox unavailable",{error:e})}(e),!1}}function _o(e){return"high"===e?3:"normal"===e?2:1}function Ro(){return Date.now()-mr<1500}function Fo(e){return Dr(e)}function Wo(e){if(!e)return"";var t=function(e){return e?[e.tagName.toLowerCase(),e.id||"",e.getAttribute("data-component-id")||"",e.getAttribute("data-nami-id")||"",e.getAttribute("data-testid")||"",`el-${wr(e)}`].filter(Boolean).join("|"):""}(e);return Dr(t||Vo(e))}function Oo(e){var t=Fo(e);return"clickable"===t||"button"===t||"focusable"===t||"selected"===t||"unselected"===t}function $o(e,t,i){var n;if(Sr={textKey:Fo(e),reason:t.reason,timestamp:Date.now()},"high"===i){var a=oo(e),r=Date.now();kr={transactionId:t.transactionId,pageKey:er,element:null!==(n=t.element)&&void 0!==n?n:null,elementKey:Wo(t.element),textKey:Fo(e),startedAt:r,suppressUntil:r+a},rr&&clearTimeout(rr),rr=setTimeout(()=>{rr=null,kr=null},a)}}function No(e,t=!0){var i,n,a,r=!(!e||(null===(i=vr)||void 0===i?void 0:i.id)!==e||"pending"!==vr.status);if(Mr("stopSpeech",{preserveTransactionId:e,allowVizioEmptyFallback:t,activeTransaction:null===(n=vr)||void 0===n?void 0:n.id,reason:null===(a=vr)||void 0===a?void 0:a.reason,preservingCurrentTransaction:r}),qa=null,r||(to(),eo()),e||(Qr(),Jr(),ro("stop")),_r(e),nr&&(clearTimeout(nr),nr=null),!r){if(mo())try{window.speechSynthesis.cancel()}catch(e){}vo()&&Co(),fo()&&Io(t)}}function jo(){No()}function Bo(e,t={}){var i,n,a;Mr("speakText:enter",{textPreview:Ar(e).slice(0,160),reason:t.reason,transactionId:t.transactionId,element:Pr(t.element),runtime:wo()});var r=Ar(e);if(!r)return!1;if(!ko())return Mr("skip speech: non-CTV runtime"),!1;var o={interrupt:!1!==t.interrupt,reason:null!==(i=t.reason)&&void 0!==i?i:"manual",transactionId:t.transactionId,element:t.element,focusPath:t.focusPath,focusedLabel:t.focusedLabel,priority:t.priority},s=function(e,t){return t.priority?t.priority:"composite"===t.reason?"high":Oo(e)?"low":"normal"}(r,o);if(function(e,t,i){var n=Fo(e),a=Date.now(),r=Wo(t.element);if(Oo(e))return!0;if(Sr&&Sr.reason===t.reason&&Sr.textKey===n&&a-Sr.timestamp<600)return Mr("suppress:duplicate-request",{reason:t.reason,textPreview:e.slice(0,120)}),!0;if(!kr)return!1;if(_o(i)>=_o("high"))return!1;if("focus"===t.reason){var o=kr.textKey;if(!Ro()&&(n===o||n.includes(o)))return Mr("suppress:focus-text-is-active-composite",{textPreview:e.slice(0,120),transactionId:kr.transactionId,element:Pr(t.element)}),!0}var s=function(e,t){return!!e&&!!t&&e===t}(t.element,kr.element),u=!!r&&kr.elementKey===r,l=!kr.pageKey||kr.pageKey===er,d=Ro(),h=l&&!d&&a<kr.startedAt+2500;return!(!s&&!u&&(l&&"focus"===t.reason&&t.element&&kr.element!==t.element||"low"!==i&&!h)&&(Qr(),1))}(r,o,s))return!1;if(o.interrupt&&No(o.transactionId,!1),Ya)return Po(r,o),!0;var u=function(e){var t;return"manual"!==(null!==(t=e.reason)&&void 0!==t?t:"manual")&&e.element?po()?"accessibility-label":vo()||fo()?"programmatic":"accessibility-label":"programmatic"}(o);Mr("speakText:owner",{owner:u,reason:o.reason,element:Pr(o.element)});var l,d,h="programmatic"===u?function(){if(!ko())return null;var e=fo(),t=go(),i=vo();return xo.isAvailable()?(Mr("resolveTtsEngine:selected",{engine:"vizio-chromevox"}),xo):e?null:Ao.isAvailable()?(Mr("resolveTtsEngine:selected",{engine:"webos-luna-tts"}),Ao):t?Do.isAvailable()?Do:null:Do.isAvailable()?(Mr("resolveTtsEngine:selected",{engine:"web-speech"}),Do):(Mr("tts engine unavailable",{webos:i,vizio:e,xbox:t}),null)}():null;(Mr("speakText:engine",{engine:null!==(n=null==h?void 0:h.name)&&void 0!==n?n:null,owner:u}),"composite"===o.reason&&o.transactionId&&o.element&&function(e){return"accessibility-label"===e||vo()}(u))&&Xr(o.element,r,o.transactionId,null!==(l=o.focusPath)&&void 0!==l?l:[]);if("accessibility-label"===u)return"focus"===o.reason&&o.element&&o.element.setAttribute("aria-label",r),o.transactionId&&(null===(d=vr)||void 0===d?void 0:d.id)===o.transactionId&&(vr.status="started"),$o(r,o,s),!0;if(!h)return function(e,t){if(!fo()||Xa)return!1;var i=Date.now(),n=()=>{var a;ur=null,t.transactionId&&vr&&vr.id!==t.transactionId||(bo()?Lo(e,t):Date.now()-i>=8e3?t.transactionId&&(null===(a=vr)||void 0===a?void 0:a.id)===t.transactionId&&(vr.status="cancelled",vr=null):ur=setTimeout(n,250))};return to(),ur=setTimeout(n,250),!0}(r,o)?($o(r,o,s),!0):(Tr(),!1);var c=h.speak(r,o);if(Mr("speakText:engine-result",{engine:h.name,accepted:c,reason:o.reason,transactionId:o.transactionId}),c&&$o(r,o,s),c)return c;if("webos-luna-tts"!==h.name&&"vizio-chromevox"!==h.name)return c;if(!o.element)return c;var m=Xr(o.element,r,o.transactionId,null!==(a=o.focusPath)&&void 0!==a?a:[]);return Mr("speakText:aria-label-fallback",{engine:h.name,accepted:m,reason:o.reason}),m&&$o(r,o,s),m}function zo(e){var t=e.component;return e.hasAttribute("data-nami-primary-cta")||!0===(null==t?void 0:t.focused)||"productButton"===(null==t?void 0:t.namiComponentType)}function Uo(e){var t,i=null===(t=e.getAttribute("role"))||void 0===t?void 0:t.toLowerCase();return"button"===e.tagName.toLowerCase()||"button"===i||e.matches("nami-button,nami-play-pause-button,nami-volume-button,nami-toggle-button")}function Ho(e){return Ar(e).replace(/(?:,\s*)?\bbutton\b\s*$/i,"").trim()||Ar(e)}function Go(e){return Ar(e.innerText||e.textContent||"")}function Vo(e){if(!e)return"";if(Hr(e)){var t=function(e){var t=gr.get(e);return t?Ar(t["data-tts-spoken-label"]||t["data-speech"]||t["speech-label"]||t["aria-label"]||e.getAttribute("title")||""):""}(e);if(t)return t;var i=Ko(e.component);if(i)return i}var n=e.getAttribute("data-tts-spoken-label");if(n)return Ar(n);var a=Ko(e.component);if(a)return a;var r=e.getAttribute("data-speech")||e.getAttribute("speech-label")||e.getAttribute("aria-label")||e.getAttribute("title");return r?Ar(r):Go(e)}function Ko(e){if(!e||e.hidden)return"";var t=e,i=Ar(t.speechLabel||t.speech_label||t.screenreaderText||t.title||t.alt||t.text||(Array.isArray(t.texts)?t.texts.join(", "):""));if(i)return i;for(var n,a=te(Yo(t));!(n=a()).done;){var r=Ko(n.value);if(r)return r}return""}function Xo(e,t){if(Mr("applySpeechAttributes:enter",{element:Pr(e),label:t,activeComposite:Hr(e)}),!Hr(e)){var i=Ar(t),n=function(e,t){var i=Ar(t);return i?Uo(e)?Ho(i):i:""}(e,t);if(!n)return e.removeAttribute("speech-label"),e.removeAttribute("data-speech"),e.removeAttribute("data-tts-spoken-label"),void e.removeAttribute("aria-label");i?e.setAttribute("data-tts-spoken-label",i):e.removeAttribute("data-tts-spoken-label"),e.setAttribute("speech-label",n),e.setAttribute("data-speech",n),e.setAttribute("aria-label",function(e,t){return Uo(e)?Ho(t):Ar(t)}(e,n))}}function Yo(e){for(var t=[],i=0,n=["components","playingComponents","pausedComponents","mutedComponents","volumeComponents","productBaseComponents","productFeaturedComponents"];i<n.length;i++){var a=null==e?void 0:e[n[i]];Array.isArray(a)&&t.push(...a)}return null!=e&&e.collapseHeader&&(Array.isArray(e.collapseHeader)?t.push(...e.collapseHeader):t.push(e.collapseHeader)),t}function qo(e,t,i){if(e&&!e.hidden&&!function(e){if(!e||e.hidden)return!1;var t=e,i=String(t.component||t.namiComponentType||"").toLowerCase();return-1!==i.indexOf("button")||-1!==i.indexOf("toggle")||-1!==i.indexOf("checkbox")||-1!==i.indexOf("radio")||-1!==i.indexOf("select")||-1!==i.indexOf("input")||!!t.onTap||!!t.sku||!0===t.focused}(e)){var n=function(e){if(!e||e.hidden)return"";var t=e;switch(e.component){case"text":case"countdownTimerText":return xr(t.screenreaderText||t.text);case"text-list":return Array.isArray(t.texts)?xr(t.texts.join(", ")):"";case"videoUrl":case"progressBar":return Ar(t.screenreaderText);default:return""}}(e);Cr(t,n),Yo(e).forEach(e=>qo(e,t))}}function Jo(e,t){var i=[];if(!e)return i;var n=e;return[n.header,n.contentContainer,n.footer,n.backgroundContainer,n.components].forEach(e=>{Array.isArray(e)?e.forEach(e=>qo(e,i)):qo(e,i)}),i}function Qo(e,t){var i=Jo(e),n=function(e){if(!e)return"";var t=Ko(e.component),i=e.getAttribute("data-speech")||e.getAttribute("speech-label")||e.getAttribute("aria-label")||e.getAttribute("title")||Go(e),n=Ar(t||i);return n?Uo(e)&&!/\bbutton\b\s*$/i.test(n)?Ar(`${n} button`):n:""}(t);return Lr(Ir(i,n?[n]:[]))}function Zo(e){return e?Dr(`${Ar(e.id||e.name||"")}|${Lr(Ir(Jo(e),[]))}`):""}function es(){return tr}function ts(e){Mr("setActivePage:enter",{nextKey:Zo(e),previousKey:er,activePageAnnounced:Za,pageName:Ar((null==e?void 0:e.name)||(null==e?void 0:e.id)||"")});var t=er;Ja=e,function(e){var t=Zo(e);if(t!==er){var i=!er&&!!hr;Za=!1,er=t,tr=i,hr=null,cr=""}}(e),t!==er&&No(void 0,!1)}function is(e,t){if(Mr("prepareInitialComposite:enter",{element:Pr(e),activePageKey:er,activePageAnnounced:Za,blockedByNavigation:es(),label:Vo(e),isPrimary:zo(e)}),!Ja||Za||!zo(e)||es())return Mr("prepareInitialComposite:skip",{hasActivePage:!!Ja,activePageAnnounced:Za,isPrimary:zo(e),blockedByNavigation:es()}),!1;var i=Qo(Ja,e);if(!i)return!1;var n=zr(e,t),a=function(e,t,i){var n={id:fr++,reason:e,element:i,text:t,page:Ja,status:"pending"};return vr=n,n}("composite",i,e);Za=!0,hr=e,cr=Wo(e);var r,o=Bo(i,{reason:"composite",interrupt:!0,transactionId:a.id,element:e,focusPath:n,focusedLabel:Vo(e),priority:"high"});o||(Za=!1,(null===(r=vr)||void 0===r?void 0:r.id)===a.id&&(vr.status="cancelled",vr=null));return o}function ns(e,t){Mr("preparePrimaryCtaCompositeFocus:enter",{element:Pr(e),label:Vo(e),activePageKey:er,activePageAnnounced:Za});var i=is(e,t);return Mr("preparePrimaryCtaCompositeFocus:result",{result:i,activePageKey:er,activePageAnnounced:Za}),i}function as(e){Mr("handleNativeFocusIn:enter",{target:e.target instanceof Element?Pr(e.target):String(e.target),activePageKey:er,activePageAnnounced:Za});var t=function(e){for(var t,i=null,n=te("function"==typeof e.composedPath?e.composedPath():[]);!(t=n()).done;){var a=t.value;if(a instanceof Element&&Vo(a)){if(a.tagName.toLowerCase().startsWith("nami-"))return a;i||(i=a)}}return null!=i?i:e.target instanceof Element?e.target:null}(e);t&&rs(t,e)}function rs(e,t){if(Mr("handleFocusedElementForSpeech:enter",{element:Pr(e),label:Vo(e),ttsEnabled:Ha,runtime:wo(),activePageKey:er,activePageAnnounced:Za,lastFocused:Pr(hr),lastFocusedElementIdentity:cr}),!e)return Mr("handleFocusedElementForSpeech:skip-basic",{hasElement:!!e,ttsEnabled:Ha}),!1;if(!ko())return!1;var i=Wo(e);if(kr&&kr.pageKey===er&&Date.now()<kr.startedAt+2500){var n=kr.element===e,a=!!i&&kr.elementKey===i;if(!Ro()&&(n||a))return Mr("handleFocusedElementForSpeech:skip-during-initial-composite-lock",{element:Pr(e),sameCompositeElement:n,sameCompositeElementKey:a}),!1;var r=Vo(e),o=r?Fo(r):"";if(!Ro()&&o&&kr.textKey.includes(o))return Mr("handleFocusedElementForSpeech:skip-composite-contained-label-during-initial-lock",{element:Pr(e),labelPreview:r.slice(0,120),transactionId:kr.transactionId}),hr=e,cr=i,!1}if(hr===e||i&&i===cr&&!Za)return Mr("handleFocusedElementForSpeech:skip-same-element",{element:Pr(e),activePageAnnounced:Za,elementIdentity:i,lastFocusedElementIdentity:cr}),!1;if(!Za&&Ja&&zo(e)&&!hr&&!es())return is(e,t);var s=Vo(e);if(!s)return!1;if(kr){var u=Fo(s),l=kr.textKey;if(!Ro()&&(u===l||u.includes(l)))return Mr("handleFocusedElementForSpeech:skip-active-composite-label",{element:Pr(e),labelPreview:s.slice(0,120),transactionId:kr.transactionId}),hr=e,cr=i,!1}return hr=e,cr=i,nr&&clearTimeout(nr),nr=setTimeout(()=>{nr=null,hr===e&&Bo(s,{reason:"focus",interrupt:!0,element:e,focusPath:zr(e,t),priority:"normal"})},120),!0}function os(e=document){var t;if(Mr("attachFocusSpeechListeners:enter",{root:e instanceof Element?Pr(e):e instanceof DocumentFragment?"document-fragment":"document",runtime:wo()}),ss(),!ko())return Mr("focus speech listeners not attached: non-CTV runtime"),ss;if(!ko())return Mr("focus speech listeners not attached: non-CTV runtime"),ss;var i,n=e=>as(e),a=()=>(Mr("handleUserNavigationKey",{activePageKey:er,activePageAnnounced:Za}),mr=Date.now(),void(tr=!0));e.addEventListener("focusin",n,!0),e.addEventListener("keydown",a,!0);var r=window;if("undefined"!=typeof window&&null!==(t=r.TVJS)&&void 0!==t&&t.DirectionalNavigation){var o=r.TVJS.DirectionalNavigation;i=o.onfocuschanged,o.onfocuschanged=e=>{var t;null===(t=i)||void 0===t||t.call(o,e),function(e){var t,i=null===(t=e.detail)||void 0===t?void 0:t.nextFocusElement;i&&rs(i,e)}(e)}}return ir={root:e,focusListener:n,keyListener:a,previousTvjsHandler:i},ss}function ss(){var e;if(Mr("detachFocusSpeechListeners:enter",{hasCleanup:!!ir}),ir){var t=ir,i=t.root,n=t.focusListener,a=t.keyListener,r=t.previousTvjsHandler;i.removeEventListener("focusin",n,!0),a&&i.removeEventListener("keydown",a,!0);var o=window;null!==(e=o.TVJS)&&void 0!==e&&e.DirectionalNavigation&&r&&(o.TVJS.DirectionalNavigation.onfocuschanged=r),ir=null}}function us(){var e;Mr("resetScreenreaderState:enter",{activePageKey:er,activePageAnnounced:Za,activeTransaction:null===(e=vr)||void 0===e?void 0:e.id,lastFocused:Pr(hr)}),ss(),qa=null,Ya=!1,Ja=null,Qa=null,Za=!1,er="",tr=!1,hr=null,cr="",mr=0,Sr=null,Qr(),Jr(),Zr(),eo(),to(),ao(),nr&&(clearTimeout(nr),nr=null),ro("reset"),_r(),vr=null}var ls=function(){return ee(function e(t,i,n="",a=""){var r;Y(this,e),this.playing=!1,this.toggling=!1,this.handleVideoEvents=e=>{this.video.onended=()=>{Eo(!1),this.handlePlayerAnalytics(e,c.VIDEO_ENDED)},this.video.onpause=()=>{Eo(!1),this.toggling||this.handlePlayerAnalytics(e,c.VIDEO_PAUSED)},this.video.onplay=()=>{Eo(!this.video.muted),this.toggling||this.handlePlayerAnalytics(e,this.video.currentTime>.05?c.VIDEO_RESUMED:c.VIDEO_STARTED)},this.video.onvolumechange=()=>{this.toggling||(this.muted=this.video.muted,Eo(!this.video.paused&&!this.video.ended&&!this.muted),this.handlePlayerAnalytics(e,this.muted?c.VIDEO_MUTED:c.VIDEO_UNMUTED))}},this.removeVideoEvents=()=>{this.video&&(Eo(!1),this.video.onended=null,this.video.onpause=null,this.video.onplay=null,this.video.onvolumechange=null,this.toggling=!1)},this.video=null!=i?i:this.video,null!==(r=e.instance)&&void 0!==r&&r.videoSrc&&i.src!=e.instance.videoSrc&&this.handlePlayerAnalytics(t,c.VIDEO_CHANGED),this.videoSrc=i.src,this.video&&(this.muteByDefault=i.muted,this.loopVideo=i.loop,this.autoplayVideo=i.autoplay,this.muted=this.video.muted,this.videoComponentName=n,this.videoComponentId=a,this.playing=!(!(this.video.currentTime>0)||this.video.paused||this.video.ended),Eo(this.playing&&!this.video.muted),this.handleVideoEvents(t))},[{key:"togglePlayVideo",value:function(e){this.toggling=!0,this.playing?this.video.pause():this.video.play(),this.playing=!this.playing,this.handlePlayerAnalytics(e)}},{key:"toggleMuteVideo",value:function(e){this.toggling=!0,this.video.muted=!this.video.muted,this.muted=this.video.muted,this.handlePlayerAnalytics(e,this.muted?c.VIDEO_MUTED:c.VIDEO_UNMUTED)}},{key:"videoPlayingAction",value:function(){var e,t;return(null===(e=this.video)||void 0===e?void 0:e.currentTime)<=0?c.VIDEO_STARTED:this.video.paused?c.VIDEO_PAUSED:this.video.ended?c.VIDEO_ENDED:(null===(t=this.video)||void 0===t?void 0:t.currentTime)>.05?c.VIDEO_RESUMED:c.UNKNOWN}},{key:"handlePlayerAnalytics",value:function(e,t){if(this.video){var i={id:this.videoComponentId,name:this.videoComponentName,url:this.video.src,loopVideo:this.loopVideo,muteByDefault:this.muteByDefault,autoplayVideo:this.autoplayVideo,contentDuration:this.video.duration/1e3,contentTimecode:this.video.currentTime/1e3};m.getInstance().emit(f,{action:null!=t?t:this.videoPlayingAction(),videoMetaData:i,timeSpentOnPaywall:Ba(e)})}}}])}();ls.instance=null;var ds=({onTap:e,sku:t,componentChange:i,contextProvider:n}={})=>{var a,r,o,s,u,l,d,h,v,p,g,y=c.UNKNOWN;switch(null==e?void 0:e.function){case ti:y=c.CLOSE_PAYWALL,g=Ba(n),hs(),null===(a=ls.instance)||void 0===a||a.handlePlayerAnalytics(n,c.VIDEO_ENDED);break;case ni:y=c.RESTORE_PURCHASES,cs();break;case ri:y=c.SIGN_IN,ms();break;case vi:fs(null===(r=e.parameters)||void 0===r?void 0:r.url);break;case si:t&&(y=c.BUY_SKU,t=vs(n,e,t));break;case gi:y=c.PAGE_CHANGE,i={name:null==e||null===(o=e.parameters)||void 0===o?void 0:o.screen},ps(n,null==e||null===(s=e.parameters)||void 0===s?void 0:s.screen);break;case li:y=c.TOGGLE_CHANGE,i=gs(n,null==e||null===(u=e.parameters)||void 0===u?void 0:u.formId,null==e||null===(l=e.parameters)||void 0===l?void 0:l.value);break;case hi:t&&(y=c.SELECT_SKU,ys(n,t));break;case mi:t&&(y=c.PURCHASE_SELECTED_SKU,bs(n,t));break;case bi:break;case ki:null===(d=ls.instance)||void 0===d||d.togglePlayVideo(n);break;case Ei:null===(h=ls.instance)||void 0===h||h.togglePlayVideo(n);break;case Ti:null===(v=ls.instance)||void 0===v||v.toggleMuteVideo(n);break;case Ai:null===(p=ls.instance)||void 0===p||p.toggleMuteVideo(n)}y!==c.UNKNOWN&&m.getInstance().emit(f,ie({},n.getPaywallActionEventData(),{action:y,sku:t,timeSpentOnPaywall:g,componentChange:i,purchaseError:void 0,purchases:void 0}))},hs=()=>{jo(),v.clearLaunchId(),ws(p.Close)||"undefined"==typeof window||window.history.back()},cs=()=>{var e=g(y.THIRD_PARTY_TRANSACTIONS);ws(p.Restore)||e||n.warn("NamiPaywallManager.registerRestoreHandler is not registered, so restore option on the paywall will use default behavior.")},ms=()=>{ws(p.SignIn)},fs=e=>{e?ws(p.DeeplinkAction,e)||"undefined"!=typeof window&&window.open(e,"_blank"):n.debug("Paywall deep link action invoked, but no url present.")},vs=(e,t,i)=>{var a,r=null===(a=t.parameters)||void 0===a?void 0:a.promo,o=i;if(r)n.debug(`promo id is not null ${null==i?void 0:i.id}`),o.promoId=r.toString();else{n.debug(`promo id is null for ${i.id}, product details: ${JSON.stringify(i.productDetails)}`);var s=i.productDetails;if(Di(null==s?void 0:s.product_type)){var u=function(e){return e.offers.find(e=>"promo"===e.offer_type&&0===e.price)}(s);if(u&&u.offer_ref_id)n.debug(`Found a free trial offer ${u.offer_ref_id}`),o.promoId=u.offer_ref_id.toString();else{var l,d=s.offers[0];if(d)n.debug(`Found an offer ${d.offer_ref_id}`),o.promoId=null===(l=d.offer_ref_id)||void 0===l?void 0:l.toString()}}}return function(e,t){if(g(y.THIRD_PARTY_TRANSACTIONS)){if(v.setPurchaseImpression(),m.getInstance().listenerCount(p.BuySku)<=0)return void n.warn("In order for Nami to hand off the purchase so the transaction can be handled by, you must register a NamiBuySkuHandler callbackwith NamiPaywallManager.registerBuySkuHandler.");n.info(`Handing off purchase for processing by developer skuId=${t.skuId} promoId=${t.promoId}`),ws(p.BuySku,t)}else{var i=b(t.skuId);if(i&&(n.info(`Purchase flow completed, success=${i.success}, code=${i.billingResponseCode}, message=${i.message}`),i.success)){var a;m.getInstance().emit(f,{action:c.CLOSE_PAYWALL,sku:t,timeSpentOnPaywall:Ba(e)}),null===(a=ls.instance)||void 0===a||a.handlePlayerAnalytics(e,c.VIDEO_ENDED);var r=e.getSelectedCampaign();r&&r.conversion_event_type==w.IN_APP&&r.conversion_event_url?(v.clearLaunchId(),window.location.href=r.conversion_event_url):hs()}}}(e,o),o},ps=(e,t)=>{var i;t&&((null===(i=window.history.state)||void 0===i?void 0:i.prevUrl)==t?window.history.back():e.setCurrentPage(t))},gs=(e,t,i)=>{if(t)return e.setCurrentFormId(t,i),{formId:t,value:i};var n=e.getCurrentGroupId(),a=e.getCurrentGroupName();return e.setCurrentGroupData(n,a),{id:n,name:a}},ys=(e,t)=>{var i=e.getCurrentGroupId(),n=e.selectedProducts();i&&t.id!=n[i]&&(n[i]=t.id,e.setSelectedProducts(n))},bs=(e,t)=>{e.setPurchase(!0,t)};function ws(e,...t){var i=m.getInstance();return i.emit(e,...t),i.listenerCount(e)>0}var ks,Ss,Es,Ms,Ts,Ps,As,Ds,xs,Cs,Is,Ls=e=>e,_s=k.NamiFlowManager,Rs=250,Fs=function(){function e(t,i,n){var a;return Y(this,e),(a=X(this,e)).pages=[],a.currentOffset=0,a.presentationStyle="fullscreen",a._sheetEntranceActive=!0,a.formFactor=h(),a.timeSpentOnPaywall=0,a.animation={transition:"none",direction:"forward"},a._originalBodyStyles={},a._originalDocumentStyles={},a._savedScrollY=0,a._sheetDragStartY=0,a._sheetIsDragging=!1,a._dismissThreshold=100,a._boundHandleKeyDownEvent=e=>a.handleKeyDownEvent(e),a._stylesAlreadySaved=!1,a.type=t,a.value=i,a.context=n,a.setPaywallData(),a.presentationStyle=a.getPresentationStyle(a.paywall),a.applyPresentationHostClasses(),se(a,a)}return re(e,j),ee(e,[{key:"applyPresentationHostClasses",value:function(){this.classList.toggle("nami-half-sheet-mode",this.isOverlaySheet),this.classList.toggle("nami-modal-mode",this.isModal),this.classList.toggle("nami-modal-phone",this.isModal&&"phone"===this.formFactor),this.classList.toggle("nami-modal-wide",this.isModal&&"phone"!==this.formFactor)}},{key:"setPaywallData",value:function(){var e=S(this.value,this.type);this.paywall=e.paywall,this.campaign=e.campaign}},{key:"getPresentationStyle",value:function(e){var t,i,n,a=null!==(t=null==e||null===(i=e.template)||void 0===i||null===(i=i.initialState)||void 0===i?void 0:i.presentationStyle)&&void 0!==t?t:null==e||null===(n=e.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.presentation_style;return E(a)}},{key:"isHalfSheet",get:function(){return"compact_sheet"===this.presentationStyle}},{key:"isSheet",get:function(){return"sheet"===this.presentationStyle}},{key:"isOverlaySheet",get:function(){return this.isHalfSheet||this.isSheet}},{key:"isModal",get:function(){return"modal"===this.presentationStyle}},{key:"isOverlay",get:function(){return this.isOverlaySheet||this.isModal}},{key:"connectedCallback",value:function(){var t;me(e,"connectedCallback",this)([]),null!==(t=window.TVJS)&&void 0!==t&&t.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=this),this._detachFocusSpeechListeners=os(this),document.addEventListener("keydown",this._boundHandleKeyDownEvent),this._swipeHandler=Qt(this,this.handleSwipeEvent.bind(this),{axisHint:"y",lockAxis:!0,minDistance:25,edgeLeakThreshold:15,preventScrollOnSwipe:!1,pointerTypes:["touch"]}),this.setOriginalStyles()}},{key:"disconnectedCallback",value:function(){var t,i,n;me(e,"disconnectedCallback",this)([]),jo(),null===(t=this._detachFocusSpeechListeners)||void 0===t||t.call(this),this._detachFocusSpeechListeners=void 0,us(),v.clearLaunchId(),null!==(i=window.TVJS)&&void 0!==i&&i.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=document.body),document.removeEventListener("keydown",this._boundHandleKeyDownEvent),m.getInstance().removeAllListeners(f),this.restoreStyles(),null===(n=this._halfSheetAbortController)||void 0===n||n.abort(),this._swipeHandler.destroy()}},{key:"setOriginalStyles",value:function(){this._stylesAlreadySaved||(this._stylesAlreadySaved=!0,this._originalBodyStyles.background=document.body.style.background,this._originalBodyStyles.overflow=document.body.style.overflow||null,this._originalBodyStyles.position=document.body.style.position||null,this._originalBodyStyles.top=document.body.style.top||null,this._originalBodyStyles.width=document.body.style.width||null,"phone"===this.formFactor&&(this._originalBodyStyles["overscroll-behavior"]=document.body.style.overscrollBehavior||null,this._originalDocumentStyles["overscroll-behavior"]=document.documentElement.style.overscrollBehavior||null)),"television"===this.formFactor&&(document.body.style.overflow="hidden"),"phone"===this.formFactor&&(document.body.style.overscrollBehavior="none",document.documentElement.style.overscrollBehavior="none",this.isOverlay||(document.body.style.overflow="hidden")),this.isOverlay&&(this._savedScrollY=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${this._savedScrollY}px`,document.body.style.width="100%",document.body.style.overflow="hidden")}},{key:"restoreStyles",value:function(){Object.entries(this._originalBodyStyles).forEach(([e,t])=>{null!==t?document.body.style.setProperty(e,t):document.body.style.removeProperty(e)}),Object.entries(this._originalDocumentStyles).forEach(([e,t])=>{null!==t?document.documentElement.style.setProperty(e,t):document.documentElement.style.removeProperty(e)}),this._savedScrollY>0&&(window.scrollTo(0,this._savedScrollY),this._savedScrollY=0)}},{key:"handleKeyDownEvent",value:function(e){(10009===e.keyCode||27===e.keyCode||166===e.keyCode||"Backspace"===e.key||"GoBack"===e.key||"BrowserBack"===e.key||"XF86Back"===e.key)&&(e.preventDefault(),jo(),this.flow?this.flow.triggerActions(M.REMOTE_BACK):this.isModal&&this.animateSheetDismiss().then(()=>hs()))}},{key:"handleBackdropClick",value:function(e){var t;(e.stopPropagation(),this.flow)?null!==(t=this.flow.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==t&&t?this.flow.triggerActions("__swipe_down__"):this.animateSheetDismiss().then(()=>{var e;null===(e=this.flow)||void 0===e||e.finished(),hs()}):this.animateSheetDismiss().then(()=>hs())}},{key:"animateSheetDismiss",value:function(){var e,t,i,n,a;return le(function(r){for(;;)switch(r.n){case 0:return i=this.shadowRoot,n=null!==(e=null==i?void 0:i.querySelector(".nami-half-sheet-container"))&&void 0!==e?e:null==i?void 0:i.querySelector(".nami-modal-container"),a=null!==(t=null==i?void 0:i.querySelector(".nami-half-sheet-backdrop"))&&void 0!==t?t:null==i?void 0:i.querySelector(".nami-modal-backdrop"),n&&n.classList.add("nami-dismissing"),a&&a.classList.add("nami-dismissing"),r.n=1,K(new Promise(e=>setTimeout(e,200)));case 1:return r.a(2)}},null,this,null,Promise)}},{key:"handleSwipeEvent",value:function({direction:e}){var t;if("down"===e)null===(t=this.flow)||void 0===t||t.triggerActions("__swipe_down__");else if("up"===e){var i;null===(i=this.flow)||void 0===i||i.triggerActions("__swipe_up__")}}},{key:"setupHalfSheetDragTracking",value:function(){var e,t,i;null===(e=this._halfSheetAbortController)||void 0===e||e.abort(),this._halfSheetAbortController=new AbortController;var n=this._halfSheetAbortController.signal,a=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"),r=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".nami-half-sheet-content");if(a&&r){a.addEventListener("touchstart",e=>{r.scrollTop>0||(this._sheetDragStartY=e.touches[0].clientY,this._sheetIsDragging=!0)},{passive:!0,signal:n}),a.addEventListener("touchmove",e=>{if(this._sheetIsDragging){var t=e.touches[0].clientY-this._sheetDragStartY;t>0&&(a.style.transform=`translateY(${t}px)`,a.style.transition="none",e.preventDefault())}},{passive:!1,signal:n}),a.addEventListener("touchend",()=>{if(this._sheetIsDragging){this._sheetIsDragging=!1;var e,t,i=a.style.transform.match(/translateY\((\d+(?:\.\d+)?)px\)/);if((i?parseFloat(i[1]):0)>this._dismissThreshold)if(null!==(e=null===(t=this.flow)||void 0===t?void 0:t.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==e&&e){var n;a.style.transform="translateY(0)",a.style.transition="transform 0.2s ease-out",null===(n=this.flow)||void 0===n||n.triggerActions("__swipe_down__")}else{var r;a.style.transform="translateY(100%)",a.style.transition="transform 0.2s ease-in";var o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(".nami-half-sheet-backdrop");o&&o.classList.add("nami-dismissing"),setTimeout(()=>{var e;null===(e=this.flow)||void 0===e||e.finished()},200)}else a.style.transform="translateY(0)",a.style.transition="transform 0.2s ease-out"}},{signal:n})}}},{key:"setupHalfSheetFocusTrap",value:function(){var e,t,i,n,a=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"))&&void 0!==e?e:null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".nami-modal-container");if(a){a.focus();var r=null===(n=this._halfSheetAbortController)||void 0===n?void 0:n.signal;a.addEventListener("keydown",e=>{if("Tab"===e.key){var t=a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0!==t.length){var i,n,r=t[0],o=t[t.length-1];if(e.shiftKey)document.activeElement!==r&&(null===(i=this.shadowRoot)||void 0===i?void 0:i.activeElement)!==r||(e.preventDefault(),o.focus());else document.activeElement!==o&&(null===(n=this.shadowRoot)||void 0===n?void 0:n.activeElement)!==o||(e.preventDefault(),r.focus())}}},r?{signal:r}:void 0)}}},{key:"firstUpdated",value:function(){var e;this.timeSpentOnPaywall=Date.now(),null===(e=this._detachFocusSpeechListeners)||void 0===e||e.call(this),this._detachFocusSpeechListeners=os(this.renderRoot),T(this.campaign)&&(this.flow=_s.instance.presentFlow(this.campaign,this,this.context)),this.isOverlay&&this.updateComplete.then(()=>{this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap()})}},{key:"updated",value:function(t){if(me(e,"updated",this)([t]),t.has("presentationStyle")){var i=t.get("presentationStyle");("compact_sheet"===i||"sheet"===i||"modal"===i)!==this.isOverlay&&(this.restoreStyles(),this._stylesAlreadySaved=!1,this.setOriginalStyles()),this.isOverlay&&(this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap())}}},{key:"getAnimationStyles",value:function(e){var t="backward"===this.animation.direction?-1:1;switch(this.animation.transition){case"verticalSlide":return`transform: translateY(${100*(e-this.currentOffset)*t}vh);`;case"slide":return`transform: translateX(${100*(e-this.currentOffset)*t}vw);`;case"fade":return`opacity: ${e===this.currentOffset?1:0};`;default:return""}}},{key:"updatePages",value:function(e){var t,i,n;return le(function(a){for(;;)switch(a.n){case 0:if(0!==this.pages.length&&"none"!==this.animation.transition){a.n=1;break}return this.pages=[e],a.a(2);case 1:if((null==(t=this.pages[this.pages.length-1])?void 0:t.id)!==e.id){a.n=2;break}return a.a(2);case 2:return i=null,this.isOverlaySheet&&(i=null===(n=this.shadowRoot)||void 0===n?void 0:n.querySelector(".nami-half-sheet-content"))&&(i.style.height=`${i.clientHeight}px`),this.pages=[t,e],this.currentOffset=0,a.n=3,K(this.updateComplete);case 3:requestAnimationFrame(()=>{this.currentOffset=1,setTimeout(()=>{this.pages=[e],this.currentOffset=0,this.paywall=e,i&&(i.style.height="")},Rs)});case 4:return a.a(2)}},null,this,null,Promise)}},{key:"animateFullscreenEntry",value:function(){return le(function(e){for(;;)switch(e.n){case 0:return e.n=1,K(new Promise(e=>requestAnimationFrame(()=>e())));case 1:return this.classList.remove("nami-fullscreen-entering"),this.classList.add("nami-fullscreen-entering-active"),e.n=2,K(new Promise(e=>setTimeout(e,Rs)));case 2:this.classList.remove("nami-fullscreen-entering-active");case 3:return e.a(2)}},null,this,null,Promise)}},{key:"_captureExitOverlay",value:function(e){var t=this.shadowRoot;if(!t)return null;var i=t.querySelector(".nami-flow-container"),n=document.createElement("div");if(n.className="nami-fullscreen-exit-overlay",n.style.cssText=`\n position: fixed; inset: 0; z-index: 10000;\n pointer-events: none;\n background: ${e};\n overflow: hidden;\n `,i){var a=i.cloneNode(!0);a.style.transform="none",a.style.transition="none",n.appendChild(a)}return t.appendChild(n),n.offsetHeight,n}},{key:"_slideExitOverlayAway",value:function(e){var t;return le(function(i){for(;;)switch(i.n){case 0:if(e){i.n=1;break}return i.a(2);case 1:return t="undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,e.style.transition=t?"none":"transform 250ms ease-in",e.style.transform="translateY(100%)",i.n=2,K(new Promise(e=>setTimeout(e,t?0:Rs)));case 2:e.remove();case 3:return i.a(2)}},null,null,null,Promise)}},{key:"flowNavigateToScreen",value:function(e,t){var i,n,a,r,o,s,u,l,d,h,c;return le(function(m){for(;;)switch(m.n){case 0:if(null!==(i=this.flow)&&void 0!==i&&i.previousFlowStep&&this.flow.executeLifecycle(this.flow.previousFlowStep,M.DISAPPEAR),a=this.presentationStyle,r=this.getPresentationStyle(e),o=0===this.pages.length,s="backward"===t.direction,"compact_sheet"!==a&&"sheet"!==a||"fullscreen"!==r){m.n=3;break}return this.classList.add("nami-fullscreen-entering"),this.presentationStyle="fullscreen",this.applyPresentationHostClasses(),m.n=1,K(this.updateComplete);case 1:return m.n=2,K(this.animateFullscreenEntry());case 2:m.n=11;break;case 3:if("fullscreen"!==a||"compact_sheet"!==r&&"sheet"!==r){m.n=10;break}if(!o&&!s){m.n=8;break}if(!s){m.n=6;break}return u=document.body.style.background||getComputedStyle(this).backgroundColor||"#000",this._sheetEntranceActive=!1,l=this._captureExitOverlay(u),this.presentationStyle=r,this.applyPresentationHostClasses(),this.pages=[e],this.paywall=e,m.n=4,K(this.updateComplete);case 4:return m.n=5,K(this._slideExitOverlayAway(l));case 5:m.n=7;break;case 6:this.presentationStyle=r,this.applyPresentationHostClasses();case 7:m.n=9;break;case 8:console.warn(`Unsupported forward transition: fullscreen → ${r}. Presenting as fullscreen.`);case 9:m.n=11;break;case 10:this.presentationStyle=r,this.applyPresentationHostClasses();case 11:return d=("compact_sheet"===a||"sheet"===a)&&"fullscreen"===r,h="fullscreen"===a&&("compact_sheet"===r||"sheet"===r),c=!("compact_sheet"!==a&&"sheet"!==a||"compact_sheet"!==r&&"sheet"!==r||a===r)||d||h,this.animation=c?{transition:"fade",direction:t.direction}:t,m.n=12,K(this.updatePages(e));case 12:null!==(n=this.flow)&&void 0!==n&&n.currentFlowStep&&this.flow.executeLifecycle(this.flow.currentFlowStep,M.APPEAR);case 13:return m.a(2)}},null,this,null,Promise)}},{key:"getSelectedSlideIndexForCurrentCarousel",value:function(){return Yt.getSelectedSlideIndex()}},{key:"renderFlow",value:function(){return"undefined"==typeof document?N(ks||(ks=Ls``)):this.isOverlaySheet?this.renderHalfSheet():this.isModal?this.renderModal(this.renderFlowContainer()):this.renderFlowContainer()}},{key:"renderFlowContainer",value:function(){return N(Ss||(Ss=Ls`
255
255
  <div class="nami-flow-container">
256
256
  ${0}
257
257
  </div>
@@ -485,7 +485,10 @@ import{NAMI_SDK_VERSION as e,getExtendedClientInfo as t,PaywallState as i,logger
485
485
  >
486
486
  ${0}
487
487
  </div>
488
- `),this.isCollapsed?"Expand":"Collapse",!this.isCollapsed,this._handleClick,cl(this.contextProvider,i,this.scaleFactor,this.inFocusedState,this.minSDKVersion),this.isCollapsed,this.isCollapsed?"-1":"0",o)}}])}();ft([Kt({type:Object})],Y_.prototype,"component",void 0),ft([Kt({type:Boolean})],Y_.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],Y_.prototype,"height",void 0),ft([Kt({type:Number})],Y_.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],Y_.prototype,"minSDKVersion",void 0),Y_=ft([St("nami-collapse-container")],Y_);var q_=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t.mouseDown=!1,t.startDragging=e=>{e.preventDefault(),t.mouseDown=!0,t.startX=e.pageX-t.offsetLeft},t.stopDragging=()=>{t.mouseDown=!1},t.move=e=>{e.preventDefault(),t.mouseDown&&(t.scrollLeft=t.scrollLeft-(e.pageX-t.offsetLeft-t.startX))},t}return re(e,tu),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),this.addEventListener("mousemove",this.move,!1),this.addEventListener("mousedown",this.startDragging,!1),this.addEventListener("mouseup",this.stopDragging,!1),this.addEventListener("mouseleave",this.stopDragging,!1)}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),this.removeEventListener("mousemove",this.move,!1),this.removeEventListener("mousedown",this.startDragging,!1),this.removeEventListener("mouseup",this.stopDragging,!1),this.removeEventListener("mouseleave",this.stopDragging,!1)}},{key:"styles",value:function(){var e="vertical"===this.component.direction,t=e?"margin-top":"margin-left",i=this.component.spacing?this.component.spacing*this.scaleFactor:0;return B(`\n :host {\n display: ${this.component.hidden?"none":"flex"};\n flex-direction: ${e?"column":"row"};\n flex-wrap: ${e?"nowrap":"wrap"};\n overflow: auto;\n align-items: center;\n justify-content: center;\n ${pu(this.component,!1)}\n ${Cu(this.component,!1)}\n align-self: baseline;\n cursor: -webkit-grab;\n cursor: grab;\n }\n :host(:focus){\n ${pu(this.component,!0)}\n ${Cu(this.component,!0)}\n }\n :host(:focus-visible){\n ${Fu(this.component)}\n }\n @supports not (display: grid) {\n :host > *:not(:first-child) {\n ${t}: ${i}px;\n }\n }\n @supports (display: grid) {\n :host {\n display: ${this.component.hidden?"none":"grid"};\n grid-row-gap: ${i}px;\n grid-column-gap: ${i}px;\n grid-gap: ${i}px;\n grid-auto-flow: ${e?"row":"column"};\n align-items: center;\n justify-items: center;\n place-items: center;\n }\n :host > * {\n margin: 0;\n }\n }\n `)}},{key:"render",value:function(){var e=this.component,t=e.focusedBorderColor,i=e.focusedFillColor,n=e.fillColor;return!t&&Ua(n,i)||(this.tabIndex=0),Ra(this.contextProvider,this.component).map(e=>e.map(e=>cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))}}])}();ft([Kt({type:Object})],q_.prototype,"component",void 0),ft([Kt({type:Boolean})],q_.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],q_.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],q_.prototype,"minSDKVersion",void 0),q_=ft([St("nami-responsive-grid")],q_);var J_=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return re(e,tu),ee(e,[{key:"styles",value:function(){var e,t,i,n,a=Math.max(1,null!==(e=this.component.columns)&&void 0!==e?e:2),r=(null!==(t=this.component.columnSpacing)&&void 0!==t?t:0)*this.scaleFactor,o=(null!==(i=this.component.rowSpacing)&&void 0!==i?i:0)*this.scaleFactor,s=null!==(n=this.component.itemAlignment)&&void 0!==n?n:"start";return B(`\n :host {\n display: ${this.component.hidden?"none":"grid"};\n grid-template-columns: repeat(${a}, 1fr);\n column-gap: ${r}px;\n row-gap: ${o}px;\n justify-items: ${s};\n ${pu(this.component,!1)}\n ${Cu(this.component,!1)}\n }\n :host(:focus) {\n ${pu(this.component,!0)}\n ${Cu(this.component,!0)}\n }\n :host(:focus-visible) {\n ${Fu(this.component)}\n }\n `)}},{key:"render",value:function(){var e=this.component,t=e.focusedBorderColor,i=e.focusedFillColor,n=e.fillColor;return!t&&Ua(n,i)||(this.tabIndex=0),Ra(this.contextProvider,this.component).map(e=>e.map(e=>cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))}}])}();function Q_(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function Z_(e={},t={}){var i=["__proto__","constructor","prototype"];Object.keys(t).filter(e=>i.indexOf(e)<0).forEach(i=>{void 0===e[i]?e[i]=t[i]:Q_(t[i])&&Q_(e[i])&&Object.keys(t[i]).length>0&&Z_(e[i],t[i])})}ft([Kt({type:Object})],J_.prototype,"component",void 0),ft([Kt({type:Boolean})],J_.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],J_.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],J_.prototype,"minSDKVersion",void 0),J_=ft([St("nami-repeating-grid")],J_);var eR={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function tR(){var e="undefined"!=typeof document?document:{};return Z_(e,eR),e}var iR,nR,aR,rR={document:eR,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function oR(){var e="undefined"!=typeof window?window:{};return Z_(e,rR),e}function sR(e,t=0){return setTimeout(e,t)}function uR(){return Date.now()}function lR(e,t="x"){var i,n,a,r=oR(),o=function(e){var t,i=oR();return i.getComputedStyle&&(t=i.getComputedStyle(e,null)),!t&&e.currentStyle&&(t=e.currentStyle),t||(t=e.style),t}(e);return r.WebKitCSSMatrix?((n=o.transform||o.webkitTransform).split(",").length>6&&(n=n.split(", ").map(e=>e.replace(",",".")).join(", ")),a=new r.WebKitCSSMatrix("none"===n?"":n)):i=(a=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(n=r.WebKitCSSMatrix?a.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(n=r.WebKitCSSMatrix?a.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),n||0}function dR(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function hR(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function cR(...e){for(var t=Object(e[0]),i=1;i<e.length;i+=1){var n=e[i];if(null!=n&&!hR(n))for(var a=Object.keys(Object(n)).filter(e=>"__proto__"!==e&&"constructor"!==e&&"prototype"!==e),r=0,o=a.length;r<o;r+=1){var s=a[r],u=Object.getOwnPropertyDescriptor(n,s);void 0!==u&&u.enumerable&&(dR(t[s])&&dR(n[s])?n[s].__swiper__?t[s]=n[s]:cR(t[s],n[s]):!dR(t[s])&&dR(n[s])?(t[s]={},n[s].__swiper__?t[s]=n[s]:cR(t[s],n[s])):t[s]=n[s])}}return t}function mR(e,t,i){e.style.setProperty(t,i)}function fR({swiper:e,targetPosition:t,side:i}){var n,a=oR(),r=-e.translate,o=null,s=e.params.speed;e.wrapperEl.style.scrollSnapType="none",a.cancelAnimationFrame(e.cssModeFrameID);var u=t>r?"next":"prev",l=(e,t)=>"next"===u&&e>=t||"prev"===u&&e<=t,d=()=>{n=(new Date).getTime(),null===o&&(o=n);var u=Math.max(Math.min((n-o)/s,1),0),h=.5-Math.cos(u*Math.PI)/2,c=r+h*(t-r);if(l(c,t)&&(c=t),e.wrapperEl.scrollTo({[i]:c}),l(c,t))return e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[i]:c})}),void a.cancelAnimationFrame(e.cssModeFrameID);e.cssModeFrameID=a.requestAnimationFrame(d)};d()}function vR(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function pR(e,t=""){var i=oR(),n=[...e.children];return i.HTMLSlotElement&&e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),t?n.filter(e=>e.matches(t)):n}function gR(e){try{return void console.warn(e)}catch(e){}}function yR(e,t=[]){var i=document.createElement(e);return i.classList.add(...Array.isArray(t)?t:function(e=""){return e.trim().split(" ").filter(e=>!!e.trim())}(t)),i}function bR(e,t){return oR().getComputedStyle(e,null).getPropertyValue(t)}function wR(e){var t,i=e;if(i){for(t=0;null!==(i=i.previousSibling);)1===i.nodeType&&(t+=1);return t}}function kR(e,t){for(var i=[],n=e.parentElement;n;)t?n.matches(t)&&i.push(n):i.push(n),n=n.parentElement;return i}function SR(e,t,i){var n=oR();return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(n.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(n.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom"))}function ER(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)}function MR(e,t=""){"undefined"!=typeof trustedTypes?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}function TR(){return iR||(iR=function(){var e=oR(),t=tR();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),iR}function PR(e={}){return nR||(nR=function({userAgent:e}={}){var t=TR(),i=oR(),n=i.navigator.platform,a=e||i.navigator.userAgent,r={ios:!1,android:!1},o=i.screen.width,s=i.screen.height,u=a.match(/(Android);?[\s\/]+([\d.]+)?/),l=a.match(/(iPad)(?!\1).*OS\s([\d_]+)/),d=a.match(/(iPod)(.*OS\s([\d_]+))?/),h=!l&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),c="Win32"===n,m="MacIntel"===n;return!l&&m&&t.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${o}x${s}`)>=0&&((l=a.match(/(Version)\/([\d.]+)/))||(l=[0,1,"13_0_0"]),m=!1),u&&!c&&(r.os="android",r.android=!0),(l||h||d)&&(r.os="ios",r.ios=!0),r}(e)),nR}function AR(){return aR||(aR=function(){var e=oR(),t=PR(),i=!1;function n(){var t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(n()){var a=String(e.navigator.userAgent);if(a.includes("Version/")){var r=a.split("Version/")[1].split(" ")[0].split(".").map(e=>Number(e)),o=r[0],s=r[1];i=o<16||16===o&&s<2}}var u=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),l=n();return{isSafari:i||l,needPerspectiveFix:i,need3dFix:l||u&&t.ios,isWebView:u}}()),aR}var DR={on(e,t,i){var n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof t)return n;var a=i?"unshift":"push";return e.split(" ").forEach(e=>{n.eventsListeners[e]||(n.eventsListeners[e]=[]),n.eventsListeners[e][a](t)}),n},once(e,t,i){var n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof t)return n;function a(...i){n.off(e,a),a.__emitterProxy&&delete a.__emitterProxy,t.apply(n,i)}return a.__emitterProxy=t,n.on(e,a,i)},onAny(e,t){var i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof e)return i;var n=t?"unshift":"push";return i.eventsAnyListeners.indexOf(e)<0&&i.eventsAnyListeners[n](e),i},offAny(e){var t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;var i=t.eventsAnyListeners.indexOf(e);return i>=0&&t.eventsAnyListeners.splice(i,1),t},off(e,t){var i=this;return!i.eventsListeners||i.destroyed?i:i.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].forEach((n,a)=>{(n===t||n.__emitterProxy&&n.__emitterProxy===t)&&i.eventsListeners[e].splice(a,1)})}),i):i},emit(...e){var t,i,n,a=this;return!a.eventsListeners||a.destroyed?a:a.eventsListeners?("string"==typeof e[0]||Array.isArray(e[0])?(t=e[0],i=e.slice(1,e.length),n=a):(t=e[0].events,i=e[0].data,n=e[0].context||a),i.unshift(n),(Array.isArray(t)?t:t.split(" ")).forEach(e=>{a.eventsAnyListeners&&a.eventsAnyListeners.length&&a.eventsAnyListeners.forEach(t=>{t.apply(n,[e,...i])}),a.eventsListeners&&a.eventsListeners[e]&&a.eventsListeners[e].forEach(e=>{e.apply(n,i)})}),a):a}};var xR=(e,t,i)=>{t&&!e.classList.contains(i)?e.classList.add(i):!t&&e.classList.contains(i)&&e.classList.remove(i)};var CR=(e,t,i)=>{t&&!e.classList.contains(i)?e.classList.add(i):!t&&e.classList.contains(i)&&e.classList.remove(i)};var IR=(e,t)=>{if(e&&!e.destroyed&&e.params){var i=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(i){var n=i.querySelector(`.${e.params.lazyPreloaderClass}`);!n&&e.isElement&&(i.shadowRoot?n=i.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{i.shadowRoot&&(n=i.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`))&&!n.lazyPreloaderManaged&&n.remove()})),n&&!n.lazyPreloaderManaged&&n.remove()}}},LR=(e,t)=>{if(e.slides[t]){var i=e.slides[t].querySelector('[loading="lazy"]');i&&i.removeAttribute("loading")}},_R=e=>{if(e&&!e.destroyed&&e.params){var t=e.params.lazyPreloadPrevNext,i=e.slides.length;if(i&&t&&!(t<0)){t=Math.min(t,i);var n="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){var r=a,o=[r-t];return o.push(...Array.from({length:t}).map((e,t)=>r+n+t)),void e.slides.forEach((t,i)=>{o.includes(t.column)&&LR(e,i)})}var s=a+n-1;if(e.params.rewind||e.params.loop)for(var u=a-t;u<=s+t;u+=1){var l=(u%i+i)%i;(l<a||l>s)&&LR(e,l)}else for(var d=Math.max(a-t,0);d<=Math.min(s+t,i-1);d+=1)d!==a&&(d>s||d<a)&&LR(e,d)}}};var RR={updateSize:function(){var e,t,i=this,n=i.el;e=void 0!==i.params.width&&null!==i.params.width?i.params.width:n.clientWidth,t=void 0!==i.params.height&&null!==i.params.height?i.params.height:n.clientHeight,0===e&&i.isHorizontal()||0===t&&i.isVertical()||(e=e-parseInt(bR(n,"padding-left")||0,10)-parseInt(bR(n,"padding-right")||0,10),t=t-parseInt(bR(n,"padding-top")||0,10)-parseInt(bR(n,"padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),Object.assign(i,{width:e,height:t,size:i.isHorizontal()?e:t}))},updateSlides:function(){var e=this;function t(t,i){return parseFloat(t.getPropertyValue(e.getDirectionLabel(i))||0)}var i=e.params,n=e.wrapperEl,a=e.slidesEl,r=e.rtlTranslate,o=e.wrongRTL,s=e.virtual&&i.virtual.enabled,u=s?e.virtual.slides.length:e.slides.length,l=pR(a,`.${e.params.slideClass}, swiper-slide`),d=s?e.virtual.slides.length:l.length,h=[],c=[],m=[],f=i.slidesOffsetBefore;"function"==typeof f&&(f=i.slidesOffsetBefore.call(e));var v=i.slidesOffsetAfter;"function"==typeof v&&(v=i.slidesOffsetAfter.call(e));var p=e.snapGrid.length,g=e.slidesGrid.length,y=e.size-f-v,b=i.spaceBetween,w=-f,k=0,S=0;if(void 0!==y){"string"==typeof b&&b.indexOf("%")>=0?b=parseFloat(b.replace("%",""))/100*y:"string"==typeof b&&(b=parseFloat(b)),e.virtualSize=-b-f-v,l.forEach(e=>{r?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),i.centeredSlides&&i.cssMode&&(mR(n,"--swiper-centered-offset-before",""),mR(n,"--swiper-centered-offset-after","")),i.cssMode&&(mR(n,"--swiper-slides-offset-before",`${f}px`),mR(n,"--swiper-slides-offset-after",`${v}px`));var E,M=i.grid&&i.grid.rows>1&&e.grid;M?e.grid.initSlides(l):e.grid&&e.grid.unsetSlides();for(var T="auto"===i.slidesPerView&&i.breakpoints&&Object.keys(i.breakpoints).filter(e=>void 0!==i.breakpoints[e].slidesPerView).length>0,P=0;P<d;P+=1){E=0;var A=l[P];if(!A||(M&&e.grid.updateSlide(P,A,l),"none"!==bR(A,"display"))){if(s&&"auto"===i.slidesPerView)i.virtual.slidesPerViewAutoSlideSize&&(E=i.virtual.slidesPerViewAutoSlideSize),E&&A&&(i.roundLengths&&(E=Math.floor(E)),A.style[e.getDirectionLabel("width")]=`${E}px`);else if("auto"===i.slidesPerView){T&&(A.style[e.getDirectionLabel("width")]="");var D=getComputedStyle(A),x=A.style.transform,C=A.style.webkitTransform;if(x&&(A.style.transform="none"),C&&(A.style.webkitTransform="none"),i.roundLengths)E=e.isHorizontal()?SR(A,"width"):SR(A,"height");else{var I=t(D,"width"),L=t(D,"padding-left"),_=t(D,"padding-right"),R=t(D,"margin-left"),F=t(D,"margin-right"),W=D.getPropertyValue("box-sizing");if(W&&"border-box"===W)E=I+R+F;else{var O=A.clientWidth;E=I+L+_+R+F+(A.offsetWidth-O)}}x&&(A.style.transform=x),C&&(A.style.webkitTransform=C),i.roundLengths&&(E=Math.floor(E))}else E=(y-(i.slidesPerView-1)*b)/i.slidesPerView,i.roundLengths&&(E=Math.floor(E)),A&&(A.style[e.getDirectionLabel("width")]=`${E}px`);A&&(A.swiperSlideSize=E),m.push(E),i.centeredSlides?(w=w+E/2+k/2+b,0===k&&0!==P&&(w=w-y/2-b),0===P&&(w=w-y/2-b),Math.abs(w)<.001&&(w=0),i.roundLengths&&(w=Math.floor(w)),S%i.slidesPerGroup===0&&h.push(w),c.push(w)):(i.roundLengths&&(w=Math.floor(w)),(S-Math.min(e.params.slidesPerGroupSkip,S))%e.params.slidesPerGroup===0&&h.push(w),c.push(w),w=w+E+b),e.virtualSize+=E+b,k=E,S+=1}}if(e.virtualSize=Math.max(e.virtualSize,y)+v,r&&o&&("slide"===i.effect||"coverflow"===i.effect)&&(n.style.width=`${e.virtualSize+b}px`),i.setWrapperSize&&(n.style[e.getDirectionLabel("width")]=`${e.virtualSize+b}px`),M&&e.grid.updateWrapperSize(E,h),!i.centeredSlides){var $="auto"!==i.slidesPerView&&i.slidesPerView%1!=0,N=i.snapToSlideEdge&&!i.loop&&("auto"===i.slidesPerView||$),j=h.length;if(N){var B;if("auto"===i.slidesPerView){B=1;for(var z=0,U=m.length-1;U>=0&&(z+=m[U]+(U<m.length-1?b:0))<=y;U-=1)B=m.length-U}else B=Math.floor(i.slidesPerView);j=Math.max(d-B,0)}for(var H=[],G=0;G<h.length;G+=1){var V=h[G];i.roundLengths&&(V=Math.floor(V)),N?G<=j&&H.push(V):h[G]<=e.virtualSize-y&&H.push(V)}h=H,Math.floor(e.virtualSize-y)-Math.floor(h[h.length-1])>1&&(N||h.push(e.virtualSize-y))}if(s&&i.loop){var K=m[0]+b;if(i.slidesPerGroup>1)for(var X=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/i.slidesPerGroup),Y=K*i.slidesPerGroup,q=0;q<X;q+=1)h.push(h[h.length-1]+Y);for(var J=0;J<e.virtual.slidesBefore+e.virtual.slidesAfter;J+=1)1===i.slidesPerGroup&&h.push(h[h.length-1]+K),c.push(c[c.length-1]+K),e.virtualSize+=K}if(0===h.length&&(h=[0]),0!==b){var Q=e.isHorizontal()&&r?"marginLeft":e.getDirectionLabel("marginRight");l.filter((e,t)=>!(i.cssMode&&!i.loop)||t!==l.length-1).forEach(e=>{e.style[Q]=`${b}px`})}if(i.centeredSlides&&i.centeredSlidesBounds){var Z=0;m.forEach(e=>{Z+=e+(b||0)});var ee=(Z-=b)>y?Z-y:0;h=h.map(e=>e<=0?-f:e>ee?ee+v:e)}if(i.centerInsufficientSlides){var te=0;if(m.forEach(e=>{te+=e+(b||0)}),(te-=b)<y){var ie=(y-te)/2;h.forEach((e,t)=>{h[t]=e-ie}),c.forEach((e,t)=>{c[t]=e+ie})}}if(Object.assign(e,{slides:l,snapGrid:h,slidesGrid:c,slidesSizesGrid:m}),i.centeredSlides&&i.cssMode&&!i.centeredSlidesBounds){mR(n,"--swiper-centered-offset-before",-h[0]+"px"),mR(n,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");var ne=-e.snapGrid[0],ae=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+ne),e.slidesGrid=e.slidesGrid.map(e=>e+ae)}if(d!==u&&e.emit("slidesLengthChange"),h.length!==p&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),c.length!==g&&e.emit("slidesGridLengthChange"),i.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(s||i.cssMode||"slide"!==i.effect&&"fade"!==i.effect)){var re=`${i.containerModifierClass}backface-hidden`,oe=e.el.classList.contains(re);d<=i.maxBackfaceHiddenSlides?oe||e.el.classList.add(re):oe&&e.el.classList.remove(re)}}},updateAutoHeight:function(e){var t,i=this,n=[],a=i.virtual&&i.params.virtual.enabled,r=0;"number"==typeof e?i.setTransition(e):!0===e&&i.setTransition(i.params.speed);var o=e=>a?i.slides[i.getSlideIndexByData(e)]:i.slides[e];if("auto"!==i.params.slidesPerView&&i.params.slidesPerView>1)if(i.params.centeredSlides)(i.visibleSlides||[]).forEach(e=>{n.push(e)});else for(t=0;t<Math.ceil(i.params.slidesPerView);t+=1){var s=i.activeIndex+t;if(s>i.slides.length&&!a)break;n.push(o(s))}else n.push(o(i.activeIndex));for(t=0;t<n.length;t+=1)if(void 0!==n[t]){var u=n[t].offsetHeight;r=u>r?u:r}(r||0===r)&&(i.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){for(var e=this,t=e.slides,i=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0,n=0;n<t.length;n+=1)t[n].swiperSlideOffset=(e.isHorizontal()?t[n].offsetLeft:t[n].offsetTop)-i-e.cssOverflowAdjustment()},updateSlidesProgress:function(e=this&&this.translate||0){var t=this,i=t.params,n=t.slides,a=t.rtlTranslate,r=t.snapGrid;if(0!==n.length){void 0===n[0].swiperSlideOffset&&t.updateSlidesOffset();var o=-e;a&&(o=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];var s=i.spaceBetween;"string"==typeof s&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:"string"==typeof s&&(s=parseFloat(s));for(var u=0;u<n.length;u+=1){var l=n[u],d=l.swiperSlideOffset;i.cssMode&&i.centeredSlides&&(d-=n[0].swiperSlideOffset);var h=(o+(i.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),c=(o-r[0]+(i.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),m=-(o-d),f=m+t.slidesSizesGrid[u],v=m>=0&&m<=t.size-t.slidesSizesGrid[u],p=m>=0&&m<t.size-1||f>1&&f<=t.size||m<=0&&f>=t.size;p&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(u)),xR(l,p,i.slideVisibleClass),xR(l,v,i.slideFullyVisibleClass),l.progress=a?-h:h,l.originalProgress=a?-c:c}}},updateProgress:function(e){var t=this;if(void 0===e){var i=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*i||0}var n=t.params,a=t.maxTranslate()-t.minTranslate(),r=t.progress,o=t.isBeginning,s=t.isEnd,u=t.progressLoop,l=o,d=s;if(0===a)r=0,o=!0,s=!0;else{r=(e-t.minTranslate())/a;var h=Math.abs(e-t.minTranslate())<1,c=Math.abs(e-t.maxTranslate())<1;o=h||r<=0,s=c||r>=1,h&&(r=0),c&&(r=1)}if(n.loop){var m=t.getSlideIndexByData(0),f=t.getSlideIndexByData(t.slides.length-1),v=t.slidesGrid[m],p=t.slidesGrid[f],g=t.slidesGrid[t.slidesGrid.length-1],y=Math.abs(e);(u=y>=v?(y-v)/g:(y+g-p)/g)>1&&(u-=1)}Object.assign(t,{progress:r,progressLoop:u,isBeginning:o,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),s&&!d&&t.emit("reachEnd toEdge"),(l&&!o||d&&!s)&&t.emit("fromEdge"),t.emit("progress",r)},updateSlidesClasses:function(){var e,t,i,n=this,a=n.slides,r=n.params,o=n.slidesEl,s=n.activeIndex,u=n.virtual&&r.virtual.enabled,l=n.grid&&r.grid&&r.grid.rows>1,d=e=>pR(o,`.${r.slideClass}${e}, swiper-slide${e}`)[0];if(u)if(r.loop){var h=s-n.virtual.slidesBefore;h<0&&(h=n.virtual.slides.length+h),h>=n.virtual.slides.length&&(h-=n.virtual.slides.length),e=d(`[data-swiper-slide-index="${h}"]`)}else e=d(`[data-swiper-slide-index="${s}"]`);else l?(e=a.find(e=>e.column===s),i=a.find(e=>e.column===s+1),t=a.find(e=>e.column===s-1)):e=a[s];e&&(l||(i=function(e,t){for(var i=[];e.nextElementSibling;){var n=e.nextElementSibling;t?n.matches(t)&&i.push(n):i.push(n),e=n}return i}(e,`.${r.slideClass}, swiper-slide`)[0],r.loop&&!i&&(i=a[0]),t=function(e,t){for(var i=[];e.previousElementSibling;){var n=e.previousElementSibling;t?n.matches(t)&&i.push(n):i.push(n),e=n}return i}(e,`.${r.slideClass}, swiper-slide`)[0],r.loop&&0===!t&&(t=a[a.length-1]))),a.forEach(n=>{CR(n,n===e,r.slideActiveClass),CR(n,n===i,r.slideNextClass),CR(n,n===t,r.slidePrevClass)}),n.emitSlidesClasses()},updateActiveIndex:function(e){var t,i=this,n=i.rtlTranslate?i.translate:-i.translate,a=i.snapGrid,r=i.params,o=i.activeIndex,s=i.realIndex,u=i.snapIndex,l=e,d=e=>{var t=e-i.virtual.slidesBefore;return t<0&&(t=i.virtual.slides.length+t),t>=i.virtual.slides.length&&(t-=i.virtual.slides.length),t};if(void 0===l&&(l=function(e){for(var t,i=e.slidesGrid,n=e.params,a=e.rtlTranslate?e.translate:-e.translate,r=0;r<i.length;r+=1)void 0!==i[r+1]?a>=i[r]&&a<i[r+1]-(i[r+1]-i[r])/2?t=r:a>=i[r]&&a<i[r+1]&&(t=r+1):a>=i[r]&&(t=r);return n.normalizeSlideIndex&&(t<0||void 0===t)&&(t=0),t}(i)),a.indexOf(n)>=0)t=a.indexOf(n);else{var h=Math.min(r.slidesPerGroupSkip,l);t=h+Math.floor((l-h)/r.slidesPerGroup)}if(t>=a.length&&(t=a.length-1),l!==o||i.params.loop)if(l===o&&i.params.loop&&i.virtual&&i.params.virtual.enabled)i.realIndex=d(l);else{var c,m=i.grid&&r.grid&&r.grid.rows>1;if(i.virtual&&r.virtual.enabled)c=r.loop?d(l):l;else if(m){var f=i.slides.find(e=>e.column===l),v=parseInt(f.getAttribute("data-swiper-slide-index"),10);Number.isNaN(v)&&(v=Math.max(i.slides.indexOf(f),0)),c=Math.floor(v/r.grid.rows)}else if(i.slides[l]){var p=i.slides[l].getAttribute("data-swiper-slide-index");c=p?parseInt(p,10):l}else c=l;Object.assign(i,{previousSnapIndex:u,snapIndex:t,previousRealIndex:s,realIndex:c,previousIndex:o,activeIndex:l}),i.initialized&&_R(i),i.emit("activeIndexChange"),i.emit("snapIndexChange"),(i.initialized||i.params.runCallbacksOnInit)&&(s!==c&&i.emit("realIndexChange"),i.emit("slideChange"))}else t!==u&&(i.snapIndex=t,i.emit("snapIndexChange"))},updateClickedSlide:function(e,t){var i=this,n=i.params,a=e.closest(`.${n.slideClass}, swiper-slide`);!a&&i.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(e=>{!a&&e.matches&&e.matches(`.${n.slideClass}, swiper-slide`)&&(a=e)});var r,o=!1;if(a)for(var s=0;s<i.slides.length;s+=1)if(i.slides[s]===a){o=!0,r=s;break}if(!a||!o)return i.clickedSlide=void 0,void(i.clickedIndex=void 0);i.clickedSlide=a,i.virtual&&i.params.virtual.enabled?i.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):i.clickedIndex=r,n.slideToClickedSlide&&void 0!==i.clickedIndex&&i.clickedIndex!==i.activeIndex&&i.slideToClickedSlide()}};var FR={getTranslate:function(e=(this.isHorizontal()?"x":"y")){var t=this,i=t.params,n=t.rtlTranslate,a=t.translate,r=t.wrapperEl;if(i.virtualTranslate)return n?-a:a;if(i.cssMode)return a;var o=lR(r,e);return o+=t.cssOverflowAdjustment(),n&&(o=-o),o||0},setTranslate:function(e,t){var i=this,n=i.rtlTranslate,a=i.params,r=i.wrapperEl,o=i.progress,s=0,u=0;i.isHorizontal()?s=n?-e:e:u=e,a.roundLengths&&(s=Math.floor(s),u=Math.floor(u)),i.previousTranslate=i.translate,i.translate=i.isHorizontal()?s:u,a.cssMode?r[i.isHorizontal()?"scrollLeft":"scrollTop"]=i.isHorizontal()?-s:-u:a.virtualTranslate||(i.isHorizontal()?s-=i.cssOverflowAdjustment():u-=i.cssOverflowAdjustment(),r.style.transform=`translate3d(${s}px, ${u}px, 0px)`);var l=i.maxTranslate()-i.minTranslate();(0===l?0:(e-i.minTranslate())/l)!==o&&i.updateProgress(e),i.emit("setTranslate",i.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e=0,t=this.params.speed,i=!0,n=!0,a){var r=this,o=r.params,s=r.wrapperEl;if(r.animating&&o.preventInteractionOnTransition)return!1;var u,l=r.minTranslate(),d=r.maxTranslate();if(u=n&&e>l?l:n&&e<d?d:e,r.updateProgress(u),o.cssMode){var h=r.isHorizontal();if(0===t)s[h?"scrollLeft":"scrollTop"]=-u;else{if(!r.support.smoothScroll)return fR({swiper:r,targetPosition:-u,side:h?"left":"top"}),!0;s.scrollTo({[h?"left":"top"]:-u,behavior:"smooth"})}return!0}return 0===t?(r.setTransition(0),r.setTranslate(u),i&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(u),i&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,i&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}};function WR({swiper:e,runCallbacks:t,direction:i,step:n}){var a=e.activeIndex,r=e.previousIndex,o=i;o||(o=a>r?"next":a<r?"prev":"reset"),e.emit(`transition${n}`),t&&"reset"===o?e.emit(`slideResetTransition${n}`):t&&a!==r&&(e.emit(`slideChangeTransition${n}`),"next"===o?e.emit(`slideNextTransition${n}`):e.emit(`slidePrevTransition${n}`))}var OR={slideTo:function(e=0,t,i=!0,n,a){"string"==typeof e&&(e=parseInt(e,10));var r=this,o=e;o<0&&(o=0);var s=r.params,u=r.snapGrid,l=r.slidesGrid,d=r.previousIndex,h=r.activeIndex,c=r.rtlTranslate,m=r.wrapperEl;if(!r.enabled&&!n&&!a||r.destroyed||r.animating&&s.preventInteractionOnTransition)return!1;void 0===t&&(t=r.params.speed);var f=Math.min(r.params.slidesPerGroupSkip,o),v=f+Math.floor((o-f)/r.params.slidesPerGroup);v>=u.length&&(v=u.length-1);var p,g=-u[v];if(s.normalizeSlideIndex)for(var y=0;y<l.length;y+=1){var b=-Math.floor(100*g),w=Math.floor(100*l[y]),k=Math.floor(100*l[y+1]);void 0!==l[y+1]?b>=w&&b<k-(k-w)/2?o=y:b>=w&&b<k&&(o=y+1):b>=w&&(o=y)}if(r.initialized&&o!==h){if(!r.allowSlideNext&&(c?g>r.translate&&g>r.minTranslate():g<r.translate&&g<r.minTranslate()))return!1;if(!r.allowSlidePrev&&g>r.translate&&g>r.maxTranslate()&&(h||0)!==o)return!1}o!==(d||0)&&i&&r.emit("beforeSlideChangeStart"),r.updateProgress(g),p=o>h?"next":o<h?"prev":"reset";var S=r.virtual&&r.params.virtual.enabled;if(!(S&&a)&&(c&&-g===r.translate||!c&&g===r.translate))return r.updateActiveIndex(o),s.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==s.effect&&r.setTranslate(g),"reset"!==p&&(r.transitionStart(i,p),r.transitionEnd(i,p)),!1;if(s.cssMode){var E=r.isHorizontal(),M=c?g:-g;if(0===t)S&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),S&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{m[E?"scrollLeft":"scrollTop"]=M})):m[E?"scrollLeft":"scrollTop"]=M,S&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return fR({swiper:r,targetPosition:M,side:E?"left":"top"}),!0;m.scrollTo({[E?"left":"top"]:M,behavior:"smooth"})}return!0}var T=AR().isSafari;return S&&!a&&T&&r.isElement&&r.virtual.update(!1,!1,o),r.setTransition(t),r.setTranslate(g),r.updateActiveIndex(o),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,n),r.transitionStart(i,p),0===t?r.transitionEnd(i,p):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(i,p))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e=0,t,i=!0,n){"string"==typeof e&&(e=parseInt(e,10));var a=this;if(!a.destroyed){void 0===t&&(t=a.params.speed);var r=a.grid&&a.params.grid&&a.params.grid.rows>1,o=e;if(a.params.loop)if(a.virtual&&a.params.virtual.enabled)o+=a.virtual.slidesBefore;else{var s;if(r){var u=o*a.params.grid.rows;s=a.slides.find(e=>1*e.getAttribute("data-swiper-slide-index")===u).column}else s=a.getSlideIndexByData(o);var l=r?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,d=a.params,h=d.centeredSlides,c=d.slidesOffsetBefore,m=d.slidesOffsetAfter,f=h||!!c||!!m,v=a.params.slidesPerView;"auto"===v?v=a.slidesPerViewDynamic():(v=Math.ceil(parseFloat(a.params.slidesPerView,10)),f&&v%2==0&&(v+=1));var p=l-s<v;if(f&&(p=p||s<Math.ceil(v/2)),n&&f&&"auto"!==a.params.slidesPerView&&!r&&(p=!1),p){var g=f?s<a.activeIndex?"prev":"next":s-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:g,slideTo:!0,activeSlideIndex:"next"===g?s+1:s-l+1,slideRealIndex:"next"===g?a.realIndex:void 0})}if(r){var y=o*a.params.grid.rows;o=a.slides.find(e=>1*e.getAttribute("data-swiper-slide-index")===y).column}else o=a.getSlideIndexByData(o)}return requestAnimationFrame(()=>{a.slideTo(o,t,i,n)}),a}},slideNext:function(e,t=!0,i){var n=this,a=n.enabled,r=n.params,o=n.animating;if(!a||n.destroyed)return n;void 0===e&&(e=n.params.speed);var s=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(s=Math.max(n.slidesPerViewDynamic("current",!0),1));var u=n.activeIndex<r.slidesPerGroupSkip?1:s,l=n.virtual&&r.virtual.enabled;if(r.loop){if(o&&!l&&r.loopPreventsSliding)return!1;if(n.loopFix({direction:"next"}),n._clientLeft=n.wrapperEl.clientLeft,n.activeIndex===n.slides.length-1&&r.cssMode)return requestAnimationFrame(()=>{n.slideTo(n.activeIndex+u,e,t,i)}),!0}return r.rewind&&n.isEnd?n.slideTo(0,e,t,i):n.slideTo(n.activeIndex+u,e,t,i)},slidePrev:function(e,t=!0,i){var n=this,a=n.params,r=n.snapGrid,o=n.slidesGrid,s=n.rtlTranslate,u=n.enabled,l=n.animating;if(!u||n.destroyed)return n;void 0===e&&(e=n.params.speed);var d=n.virtual&&a.virtual.enabled;if(a.loop){if(l&&!d&&a.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}function h(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var c,m=h(s?n.translate:-n.translate),f=r.map(e=>h(e)),v=a.freeMode&&a.freeMode.enabled,p=r[f.indexOf(m)-1];void 0===p&&(a.cssMode||v)&&(r.forEach((e,t)=>{m>=e&&(c=t)}),void 0!==c&&(p=v?r[c]:r[c>0?c-1:c]));var g=0;if(void 0!==p&&((g=o.indexOf(p))<0&&(g=n.activeIndex-1),"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(g=g-n.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),a.rewind&&n.isBeginning){var y=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(y,e,t,i)}return a.loop&&0===n.activeIndex&&a.cssMode?(requestAnimationFrame(()=>{n.slideTo(g,e,t,i)}),!0):n.slideTo(g,e,t,i)},slideReset:function(e,t=!0,i){var n=this;if(!n.destroyed)return void 0===e&&(e=n.params.speed),n.slideTo(n.activeIndex,e,t,i)},slideToClosest:function(e,t=!0,i,n=.5){var a=this;if(!a.destroyed){void 0===e&&(e=a.params.speed);var r=a.activeIndex,o=Math.min(a.params.slidesPerGroupSkip,r),s=o+Math.floor((r-o)/a.params.slidesPerGroup),u=a.rtlTranslate?a.translate:-a.translate;if(u>=a.snapGrid[s]){var l=a.snapGrid[s];u-l>(a.snapGrid[s+1]-l)*n&&(r+=a.params.slidesPerGroup)}else{var d=a.snapGrid[s-1];u-d<=(a.snapGrid[s]-d)*n&&(r-=a.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,a.slidesGrid.length-1),a.slideTo(r,e,t,i)}},slideToClickedSlide:function(){var e=this;if(!e.destroyed){var t,i=e.params,n=e.slidesEl,a="auto"===i.slidesPerView?e.slidesPerViewDynamic():i.slidesPerView,r=e.getSlideIndexWhenGrid(e.clickedIndex),o=e.isElement?"swiper-slide":`.${i.slideClass}`,s=e.grid&&e.params.grid&&e.params.grid.rows>1;if(i.loop){if(e.animating)return;t=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),i.centeredSlides?e.slideToLoop(t):r>(s?(e.slides.length-a)/2-(e.params.grid.rows-1):e.slides.length-a)?(e.loopFix(),r=e.getSlideIndex(pR(n,`${o}[data-swiper-slide-index="${t}"]`)[0]),sR(()=>{e.slideTo(r)})):e.slideTo(r)}else e.slideTo(r)}}};var $R={loopCreate:function(e,t){var i=this,n=i.params,a=i.slidesEl;if(!(!n.loop||i.virtual&&i.params.virtual.enabled)){var r,o=()=>{pR(a,`.${n.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})},s=i.grid&&n.grid&&n.grid.rows>1;n.loopAddBlankSlides&&(n.slidesPerGroup>1||s)&&((r=pR(a,`.${n.slideBlankClass}`)).forEach(e=>{e.remove()}),r.length>0&&(i.recalcSlides(),i.updateSlides()));var u=n.slidesPerGroup*(s?n.grid.rows:1),l=i.slides.length%u!==0,d=s&&i.slides.length%n.grid.rows!==0,h=e=>{for(var t=0;t<e;t+=1){var a=i.isElement?yR("swiper-slide",[n.slideBlankClass]):yR("div",[n.slideClass,n.slideBlankClass]);i.slidesEl.append(a)}};if(l){if(n.loopAddBlankSlides)h(u-i.slides.length%u),i.recalcSlides(),i.updateSlides();else gR("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else if(d){if(n.loopAddBlankSlides)h(n.grid.rows-i.slides.length%n.grid.rows),i.recalcSlides(),i.updateSlides();else gR("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else o();var c=n.centeredSlides||!!n.slidesOffsetBefore||!!n.slidesOffsetAfter;i.loopFix({slideRealIndex:e,direction:c?void 0:"next",initial:t})}},loopFix:function({slideRealIndex:e,slideTo:t=!0,direction:i,setTranslate:n,activeSlideIndex:a,initial:r,byController:o,byMousewheel:s}={}){var u=this;if(u.params.loop){u.emit("beforeLoopFix");var l=u.slides,d=u.allowSlidePrev,h=u.allowSlideNext,c=u.slidesEl,m=u.params,f=m.centeredSlides,v=m.slidesOffsetBefore,p=m.slidesOffsetAfter,g=m.initialSlide,y=f||!!v||!!p;if(u.allowSlidePrev=!0,u.allowSlideNext=!0,u.virtual&&m.virtual.enabled)return t&&(y||0!==u.snapIndex?y&&u.snapIndex<m.slidesPerView?u.slideTo(u.virtual.slides.length+u.snapIndex,0,!1,!0):u.snapIndex===u.snapGrid.length-1&&u.slideTo(u.virtual.slidesBefore,0,!1,!0):u.slideTo(u.virtual.slides.length,0,!1,!0)),u.allowSlidePrev=d,u.allowSlideNext=h,void u.emit("loopFix");var b=m.slidesPerView;"auto"===b?b=u.slidesPerViewDynamic():(b=Math.ceil(parseFloat(m.slidesPerView,10)),y&&b%2==0&&(b+=1));var w=m.slidesPerGroupAuto?b:m.slidesPerGroup,k=y?Math.max(w,Math.ceil(b/2)):w;k%w!==0&&(k+=w-k%w),k+=m.loopAdditionalSlides,u.loopedSlides=k;var S=u.grid&&m.grid&&m.grid.rows>1;l.length<b+k||"cards"===u.params.effect&&l.length<b+2*k?gR("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):S&&"row"===m.grid.fill&&gR("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");var E=[],M=[],T=S?Math.ceil(l.length/m.grid.rows):l.length,P=r&&T-g<b&&!y,A=P?g:u.activeIndex;void 0===a?a=u.getSlideIndex(l.find(e=>e.classList.contains(m.slideActiveClass))):A=a;var D="next"===i||!i,x="prev"===i||!i,C=0,I=0,L=(S?l[a].column:a)+(y&&void 0===n?-b/2+.5:0);if(L<k){C=Math.max(k-L,w);for(var _=0;_<k-L;_+=1){var R=_-Math.floor(_/T)*T;if(S)for(var F=T-R-1,W=l.length-1;W>=0;W-=1)l[W].column===F&&E.push(W);else E.push(T-R-1)}}else if(L+b>T-k){I=Math.max(L-(T-2*k),w),P&&(I=Math.max(I,b-T+g+1));for(var O=function(){var e=$-Math.floor($/T)*T;S?l.forEach((t,i)=>{t.column===e&&M.push(i)}):M.push(e)},$=0;$<I;$+=1)O()}if(u.__preventObserver__=!0,requestAnimationFrame(()=>{u.__preventObserver__=!1}),"cards"===u.params.effect&&l.length<b+2*k&&(M.includes(a)&&M.splice(M.indexOf(a),1),E.includes(a)&&E.splice(E.indexOf(a),1)),x&&E.forEach(e=>{l[e].swiperLoopMoveDOM=!0,c.prepend(l[e]),l[e].swiperLoopMoveDOM=!1}),D&&M.forEach(e=>{l[e].swiperLoopMoveDOM=!0,c.append(l[e]),l[e].swiperLoopMoveDOM=!1}),u.recalcSlides(),"auto"===m.slidesPerView?u.updateSlides():S&&(E.length>0&&x||M.length>0&&D)&&u.slides.forEach((e,t)=>{u.grid.updateSlide(t,e,u.slides)}),m.watchSlidesProgress&&u.updateSlidesOffset(),t)if(E.length>0&&x){if(void 0===e){var N=u.slidesGrid[A],j=u.slidesGrid[A+C]-N;s?u.setTranslate(u.translate-j):(u.slideTo(A+Math.ceil(C),0,!1,!0),n&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-j,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-j))}else if(n){var B=S?E.length/m.grid.rows:E.length;u.slideTo(u.activeIndex+B,0,!1,!0),u.touchEventsData.currentTranslate=u.translate}}else if(M.length>0&&D)if(void 0===e){var z=u.slidesGrid[A],U=u.slidesGrid[A-I]-z;s?u.setTranslate(u.translate-U):(u.slideTo(A-I,0,!1,!0),n&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-U,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-U))}else{var H=S?M.length/m.grid.rows:M.length;u.slideTo(u.activeIndex-H,0,!1,!0)}if(u.allowSlidePrev=d,u.allowSlideNext=h,u.controller&&u.controller.control&&!o){var G={slideRealIndex:e,direction:i,setTranslate:n,activeSlideIndex:a,byController:!0};Array.isArray(u.controller.control)?u.controller.control.forEach(e=>{!e.destroyed&&e.params.loop&&e.loopFix(ie({},G,{slideTo:e.params.slidesPerView===m.slidesPerView&&t}))}):u.controller.control instanceof u.constructor&&u.controller.control.params.loop&&u.controller.control.loopFix(ie({},G,{slideTo:u.controller.control.params.slidesPerView===m.slidesPerView&&t}))}u.emit("loopFix")}},loopDestroy:function(){var e=this,t=e.params,i=e.slidesEl;if(t.loop&&i&&(!e.virtual||!e.params.virtual.enabled)){e.recalcSlides();var n=[];e.slides.forEach(e=>{var t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;n[t]=e}),e.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),n.forEach(e=>{i.append(e)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}}};var NR={setGrabCursor:function(e){var t=this;if(!(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)){var i="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),i.style.cursor="move",i.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}},unsetGrabCursor:function(){var e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}};function jR(e,t,i){var n=oR(),a=e.params,r=a.edgeSwipeDetection,o=a.edgeSwipeThreshold;return!r||!(i<=o||i>=n.innerWidth-o)||"prevent"===r&&(t.preventDefault(),!0)}function BR(e){var t=this,i=tR(),n=e;n.originalEvent&&(n=n.originalEvent);var a=t.touchEventsData;if("pointerdown"===n.type){if(null!==a.pointerId&&a.pointerId!==n.pointerId)return;a.pointerId=n.pointerId}else"touchstart"===n.type&&1===n.targetTouches.length&&(a.touchId=n.targetTouches[0].identifier);if("touchstart"!==n.type){var r=t.params,o=t.touches;if(t.enabled&&(r.simulateTouch||"mouse"!==n.pointerType)&&(!t.animating||!r.preventInteractionOnTransition)){!t.animating&&r.cssMode&&r.loop&&t.loopFix();var s=n.target;if(("wrapper"!==r.touchEventsTarget||function(e,t){var i=oR(),n=t.contains(e);return!n&&i.HTMLSlotElement&&t instanceof HTMLSlotElement&&((n=[...t.assignedElements()].includes(e))||(n=function(e,t){for(var i=[t];i.length>0;){var n=i.shift();if(e===n)return!0;i.push(...n.children,...n.shadowRoot?n.shadowRoot.children:[],...n.assignedElements?n.assignedElements():[])}}(e,t))),n}(s,t.wrapperEl))&&!("which"in n&&3===n.which||"button"in n&&n.button>0||a.isTouched&&a.isMoved)){var u=!!r.noSwipingClass&&""!==r.noSwipingClass,l=n.composedPath?n.composedPath():n.path;u&&n.target&&n.target.shadowRoot&&l&&(s=l[0]);var d=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,h=!(!n.target||!n.target.shadowRoot);if(r.noSwiping&&(h?function(e,t=this){return function t(i){if(!i||i===tR()||i===oR())return null;i.assignedSlot&&(i=i.assignedSlot);var n=i.closest(e);return n||i.getRootNode?n||t(i.getRootNode().host):null}(t)}(d,s):s.closest(d)))t.allowClick=!0;else if(!r.swipeHandler||s.closest(r.swipeHandler)){o.currentX=n.pageX,o.currentY=n.pageY;var c=o.currentX,m=o.currentY;if(jR(t,n,c)){Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=c,o.startY=m,a.touchStartTime=uR(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(a.allowThresholdMove=!1);var f=!0;s.matches(a.focusableElements)&&(f=!1,"SELECT"===s.nodeName&&(a.isTouched=!1)),i.activeElement&&i.activeElement.matches(a.focusableElements)&&i.activeElement!==s&&("mouse"===n.pointerType||"mouse"!==n.pointerType&&!s.matches(a.focusableElements))&&i.activeElement.blur();var v=f&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!v||s.isContentEditable||n.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",n)}}}}}else jR(t,n,n.targetTouches[0].pageX)}function zR(e){var t=tR(),i=this,n=i.touchEventsData,a=i.params,r=i.touches,o=i.rtlTranslate;if(i.enabled&&(a.simulateTouch||"mouse"!==e.pointerType)){var s,u=e;if(u.originalEvent&&(u=u.originalEvent),"pointermove"===u.type){if(null!==n.touchId)return;if(u.pointerId!==n.pointerId)return}if("touchmove"===u.type){if(s=[...u.changedTouches].find(e=>e.identifier===n.touchId),!s||s.identifier!==n.touchId)return}else s=u;if(n.isTouched){var l=s.pageX,d=s.pageY;if(u.preventedByNestedSwiper)return r.startX=l,void(r.startY=d);if(!i.allowTouchMove)return u.target.matches(n.focusableElements)||(i.allowClick=!1),void(n.isTouched&&(Object.assign(r,{startX:l,startY:d,currentX:l,currentY:d}),n.touchStartTime=uR()));if(a.touchReleaseOnEdges&&!a.loop)if(i.isVertical()){if(d<r.startY&&i.translate<=i.maxTranslate()||d>r.startY&&i.translate>=i.minTranslate())return n.isTouched=!1,void(n.isMoved=!1)}else{if(o&&(l>r.startX&&-i.translate<=i.maxTranslate()||l<r.startX&&-i.translate>=i.minTranslate()))return;if(!o&&(l<r.startX&&i.translate<=i.maxTranslate()||l>r.startX&&i.translate>=i.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(n.focusableElements)&&t.activeElement!==u.target&&"mouse"!==u.pointerType&&t.activeElement.blur(),t.activeElement&&u.target===t.activeElement&&u.target.matches(n.focusableElements))return n.isMoved=!0,void(i.allowClick=!1);n.allowTouchCallbacks&&i.emit("touchMove",u),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=l,r.currentY=d;var h=r.currentX-r.startX,c=r.currentY-r.startY;if(!(i.params.threshold&&Math.sqrt(h**2+c**2)<i.params.threshold)){var m;if(void 0===n.isScrolling)i.isHorizontal()&&r.currentY===r.startY||i.isVertical()&&r.currentX===r.startX?n.isScrolling=!1:h*h+c*c>=25&&(m=180*Math.atan2(Math.abs(c),Math.abs(h))/Math.PI,n.isScrolling=i.isHorizontal()?m>a.touchAngle:90-m>a.touchAngle);if(n.isScrolling&&i.emit("touchMoveOpposite",u),void 0===n.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(n.startMoving=!0)),n.isScrolling||"touchmove"===u.type&&n.preventTouchMoveFromPointerMove)n.isTouched=!1;else if(n.startMoving){i.allowClick=!1,!a.cssMode&&u.cancelable&&u.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&u.stopPropagation();var f=i.isHorizontal()?h:c,v=i.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;a.oneWayMovement&&(f=Math.abs(f)*(o?1:-1),v=Math.abs(v)*(o?1:-1)),r.diff=f,f*=a.touchRatio,o&&(f=-f,v=-v);var p=i.touchesDirection;i.swipeDirection=f>0?"prev":"next",i.touchesDirection=v>0?"prev":"next";var g=i.params.loop&&!a.cssMode,y="next"===i.touchesDirection&&i.allowSlideNext||"prev"===i.touchesDirection&&i.allowSlidePrev;if(!n.isMoved){if(g&&y&&i.loopFix({direction:i.swipeDirection}),n.startTranslate=i.getTranslate(),i.setTransition(0),i.animating){var b=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});i.wrapperEl.dispatchEvent(b)}n.allowMomentumBounce=!1,!a.grabCursor||!0!==i.allowSlideNext&&!0!==i.allowSlidePrev||i.setGrabCursor(!0),i.emit("sliderFirstMove",u)}if((new Date).getTime(),!1!==a._loopSwapReset&&n.isMoved&&n.allowThresholdMove&&p!==i.touchesDirection&&g&&y&&Math.abs(f)>=1)return Object.assign(r,{startX:l,startY:d,currentX:l,currentY:d,startTranslate:n.currentTranslate}),n.loopSwapReset=!0,void(n.startTranslate=n.currentTranslate);i.emit("sliderMove",u),n.isMoved=!0,n.currentTranslate=f+n.startTranslate;var w=!0,k=a.resistanceRatio;if(a.touchReleaseOnEdges&&(k=0),f>0?(g&&y&&n.allowThresholdMove&&n.currentTranslate>(a.centeredSlides?i.minTranslate()-i.slidesSizesGrid[i.activeIndex+1]-("auto"!==a.slidesPerView&&i.slides.length-a.slidesPerView>=2?i.slidesSizesGrid[i.activeIndex+1]+i.params.spaceBetween:0)-i.params.spaceBetween:i.minTranslate())&&i.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),n.currentTranslate>i.minTranslate()&&(w=!1,a.resistance&&(n.currentTranslate=i.minTranslate()-1+(-i.minTranslate()+n.startTranslate+f)**k))):f<0&&(g&&y&&n.allowThresholdMove&&n.currentTranslate<(a.centeredSlides?i.maxTranslate()+i.slidesSizesGrid[i.slidesSizesGrid.length-1]+i.params.spaceBetween+("auto"!==a.slidesPerView&&i.slides.length-a.slidesPerView>=2?i.slidesSizesGrid[i.slidesSizesGrid.length-1]+i.params.spaceBetween:0):i.maxTranslate())&&i.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:i.slides.length-("auto"===a.slidesPerView?i.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),n.currentTranslate<i.maxTranslate()&&(w=!1,a.resistance&&(n.currentTranslate=i.maxTranslate()+1-(i.maxTranslate()-n.startTranslate-f)**k))),w&&(u.preventedByNestedSwiper=!0),!i.allowSlideNext&&"next"===i.swipeDirection&&n.currentTranslate<n.startTranslate&&(n.currentTranslate=n.startTranslate),!i.allowSlidePrev&&"prev"===i.swipeDirection&&n.currentTranslate>n.startTranslate&&(n.currentTranslate=n.startTranslate),i.allowSlidePrev||i.allowSlideNext||(n.currentTranslate=n.startTranslate),a.threshold>0){if(!(Math.abs(f)>a.threshold||n.allowThresholdMove))return void(n.currentTranslate=n.startTranslate);if(!n.allowThresholdMove)return n.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,n.currentTranslate=n.startTranslate,void(r.diff=i.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}a.followFinger&&!a.cssMode&&((a.freeMode&&a.freeMode.enabled&&i.freeMode||a.watchSlidesProgress)&&(i.updateActiveIndex(),i.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&i.freeMode&&i.freeMode.onTouchMove(),i.updateProgress(n.currentTranslate),i.setTranslate(n.currentTranslate))}}}else n.startMoving&&n.isScrolling&&i.emit("touchMoveOpposite",u)}}function UR(e){var t,i=this,n=i.touchEventsData,a=e;if(a.originalEvent&&(a=a.originalEvent),"touchend"===a.type||"touchcancel"===a.type){if(t=[...a.changedTouches].find(e=>e.identifier===n.touchId),!t||t.identifier!==n.touchId)return}else{if(null!==n.touchId)return;if(a.pointerId!==n.pointerId)return;t=a}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(a.type)&&!(["pointercancel","contextmenu"].includes(a.type)&&(i.browser.isSafari||i.browser.isWebView)))return;n.pointerId=null,n.touchId=null;var r=i.params,o=i.touches,s=i.rtlTranslate,u=i.slidesGrid;if(i.enabled&&(r.simulateTouch||"mouse"!==a.pointerType)){if(n.allowTouchCallbacks&&i.emit("touchEnd",a),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&r.grabCursor&&i.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);r.grabCursor&&n.isMoved&&n.isTouched&&(!0===i.allowSlideNext||!0===i.allowSlidePrev)&&i.setGrabCursor(!1);var l,d=uR(),h=d-n.touchStartTime;if(i.allowClick){var c=a.path||a.composedPath&&a.composedPath();i.updateClickedSlide(c&&c[0]||a.target,c),i.emit("tap click",a),h<300&&d-n.lastClickTime<300&&i.emit("doubleTap doubleClick",a)}if(n.lastClickTime=uR(),sR(()=>{i.destroyed||(i.allowClick=!0)}),!n.isTouched||!n.isMoved||!i.swipeDirection||0===o.diff&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,l=r.followFinger?s?i.translate:-i.translate:-n.currentTranslate,!r.cssMode)if(r.freeMode&&r.freeMode.enabled)i.freeMode.onTouchEnd({currentPos:l});else{for(var m=l>=-i.maxTranslate()&&!i.params.loop,f=0,v=i.slidesSizesGrid[0],p=0;p<u.length;p+=p<r.slidesPerGroupSkip?1:r.slidesPerGroup){var g=p<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==u[p+g]?(m||l>=u[p]&&l<u[p+g])&&(f=p,v=u[p+g]-u[p]):(m||l>=u[p])&&(f=p,v=u[u.length-1]-u[u.length-2])}var y=null,b=null;r.rewind&&(i.isBeginning?b=r.virtual&&r.virtual.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1:i.isEnd&&(y=0));var w=(l-u[f])/v,k=f<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(h>r.longSwipesMs){if(!r.longSwipes)return void i.slideTo(i.activeIndex);"next"===i.swipeDirection&&(w>=r.longSwipesRatio?i.slideTo(r.rewind&&i.isEnd?y:f+k):i.slideTo(f)),"prev"===i.swipeDirection&&(w>1-r.longSwipesRatio?i.slideTo(f+k):null!==b&&w<0&&Math.abs(w)>r.longSwipesRatio?i.slideTo(b):i.slideTo(f))}else{if(!r.shortSwipes)return void i.slideTo(i.activeIndex);i.navigation&&(a.target===i.navigation.nextEl||a.target===i.navigation.prevEl)?a.target===i.navigation.nextEl?i.slideTo(f+k):i.slideTo(f):("next"===i.swipeDirection&&i.slideTo(null!==y?y:f+k),"prev"===i.swipeDirection&&i.slideTo(null!==b?b:f))}}}}function HR(){var e=this,t=e.params,i=e.el;if(!i||0!==i.offsetWidth){t.breakpoints&&e.setBreakpoint();var n=e.allowSlideNext,a=e.allowSlidePrev,r=e.snapGrid,o=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();var s=o&&t.loop;if(!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||s)e.params.loop&&!o?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);else{var u=o?e.virtual.slides:e.slides;e.slideTo(u.length-1,0,!1,!0)}e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=a,e.allowSlideNext=n,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}}function GR(e){var t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function VR(){var e=this,t=e.wrapperEl,i=e.rtlTranslate;if(e.enabled){e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();var n=e.maxTranslate()-e.minTranslate();(0===n?0:(e.translate-e.minTranslate())/n)!==e.progress&&e.updateProgress(i?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}}function KR(e){var t=this;IR(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function XR(){var e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}var YR=(e,t)=>{var i=tR(),n=e.params,a=e.el,r=e.wrapperEl,o=e.device,s=!!n.nested,u="on"===t?"addEventListener":"removeEventListener",l=t;a&&"string"!=typeof a&&(i[u]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:s}),a[u]("touchstart",e.onTouchStart,{passive:!1}),a[u]("pointerdown",e.onTouchStart,{passive:!1}),i[u]("touchmove",e.onTouchMove,{passive:!1,capture:s}),i[u]("pointermove",e.onTouchMove,{passive:!1,capture:s}),i[u]("touchend",e.onTouchEnd,{passive:!0}),i[u]("pointerup",e.onTouchEnd,{passive:!0}),i[u]("pointercancel",e.onTouchEnd,{passive:!0}),i[u]("touchcancel",e.onTouchEnd,{passive:!0}),i[u]("pointerout",e.onTouchEnd,{passive:!0}),i[u]("pointerleave",e.onTouchEnd,{passive:!0}),i[u]("contextmenu",e.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&a[u]("click",e.onClick,!0),n.cssMode&&r[u]("scroll",e.onScroll),n.updateOnWindowResize?e[l](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",HR,!0):e[l]("observerUpdate",HR,!0),a[u]("load",e.onLoad,{capture:!0}))};var qR=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var JR={setBreakpoint:function(){var e=this,t=e.realIndex,i=e.initialized,n=e.params,a=e.el,r=n.breakpoints;if(r&&(!r||0!==Object.keys(r).length)){var o=tR(),s="window"!==n.breakpointsBase&&n.breakpointsBase?"container":n.breakpointsBase,u=["window","container"].includes(n.breakpointsBase)||!n.breakpointsBase?e.el:o.querySelector(n.breakpointsBase),l=e.getBreakpoint(r,s,u);if(l&&e.currentBreakpoint!==l){var d=(l in r?r[l]:void 0)||e.originalParams,h=qR(e,n),c=qR(e,d),m=e.params.grabCursor,f=d.grabCursor,v=n.enabled;h&&!c?(a.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),e.emitContainerClasses()):!h&&c&&(a.classList.add(`${n.containerModifierClass}grid`),(d.grid.fill&&"column"===d.grid.fill||!d.grid.fill&&"column"===n.grid.fill)&&a.classList.add(`${n.containerModifierClass}grid-column`),e.emitContainerClasses()),m&&!f?e.unsetGrabCursor():!m&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(t=>{if(void 0!==d[t]){var i=n[t]&&n[t].enabled,a=d[t]&&d[t].enabled;i&&!a&&e[t].disable(),!i&&a&&e[t].enable()}});var p=d.direction&&d.direction!==n.direction,g=n.loop&&(d.slidesPerView!==n.slidesPerView||p),y=n.loop;p&&i&&e.changeDirection(),cR(e.params,d);var b=e.params.enabled,w=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),v&&!b?e.disable():!v&&b&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",d),i&&(g?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!y&&w?(e.loopCreate(t),e.updateSlides()):y&&!w&&e.loopDestroy()),e.emit("breakpoint",d)}}},getBreakpoint:function(e,t="window",i){if(e&&("container"!==t||i)){var n=!1,a=oR(),r="window"===t?a.innerHeight:i.clientHeight,o=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){var t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}});o.sort((e,t)=>parseInt(e.value,10)-parseInt(t.value,10));for(var s=0;s<o.length;s+=1){var u=o[s],l=u.point,d=u.value;"window"===t?a.matchMedia(`(min-width: ${d}px)`).matches&&(n=l):d<=i.clientWidth&&(n=l)}return n||"max"}}};var QR={addClasses:function(){var e,t,i,n=this,a=n.classNames,r=n.params,o=n.rtl,s=n.el,u=n.device,l=(e=["initialized",r.direction,{"free-mode":n.params.freeMode&&r.freeMode.enabled},{autoheight:r.autoHeight},{rtl:o},{grid:r.grid&&r.grid.rows>1},{"grid-column":r.grid&&r.grid.rows>1&&"column"===r.grid.fill},{android:u.android},{ios:u.ios},{"css-mode":r.cssMode},{centered:r.cssMode&&r.centeredSlides},{"watch-progress":r.watchSlidesProgress}],t=r.containerModifierClass,i=[],e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(n=>{e[n]&&i.push(t+n)}):"string"==typeof e&&i.push(t+e)}),i);a.push(...l),s.classList.add(...a),n.emitContainerClasses()},removeClasses:function(){var e=this,t=e.el,i=e.classNames;t&&"string"!=typeof t&&(t.classList.remove(...i),e.emitContainerClasses())}};var ZR={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function eF(e,t){return function(i={}){var n=Object.keys(i)[0],a=i[n];"object"==typeof a&&null!==a?(!0===e[n]&&(e[n]={enabled:!0}),"navigation"===n&&e[n]&&e[n].enabled&&!e[n].prevEl&&!e[n].nextEl&&(e[n].auto=!0),["pagination","scrollbar"].indexOf(n)>=0&&e[n]&&e[n].enabled&&!e[n].el&&(e[n].auto=!0),n in e&&"enabled"in a?("object"!=typeof e[n]||"enabled"in e[n]||(e[n].enabled=!0),e[n]||(e[n]={enabled:!1}),cR(t,i)):cR(t,i)):cR(t,i)}}var tF={eventsEmitter:DR,update:RR,translate:FR,transition:{setTransition:function(e,t){var i=this;i.params.cssMode||(i.wrapperEl.style.transitionDuration=`${e}ms`,i.wrapperEl.style.transitionDelay=0===e?"0ms":""),i.emit("setTransition",e,t)},transitionStart:function(e=!0,t){var i=this,n=i.params;n.cssMode||(n.autoHeight&&i.updateAutoHeight(),WR({swiper:i,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e=!0,t){var i=this,n=i.params;i.animating=!1,n.cssMode||(i.setTransition(0),WR({swiper:i,runCallbacks:e,direction:t,step:"End"}))}},slide:OR,loop:$R,grabCursor:NR,events:{attachEvents:function(){var e=this,t=e.params;e.onTouchStart=BR.bind(e),e.onTouchMove=zR.bind(e),e.onTouchEnd=UR.bind(e),e.onDocumentTouchStart=XR.bind(e),t.cssMode&&(e.onScroll=VR.bind(e)),e.onClick=GR.bind(e),e.onLoad=KR.bind(e),YR(e,"on")},detachEvents:function(){YR(this,"off")}},breakpoints:JR,checkOverflow:{checkOverflow:function(){var e=this,t=e.isLocked,i=e.params,n=i.slidesOffsetBefore;if(n){var a=e.slides.length-1,r=e.slidesGrid[a]+e.slidesSizesGrid[a]+2*n;e.isLocked=e.size>r}else e.isLocked=1===e.snapGrid.length;!0===i.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===i.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:QR},iF={},nF=function(){function e(...t){var i,n;Y(this,e),1===t.length&&t[0].constructor&&"Object"===Object.prototype.toString.call(t[0]).slice(8,-1)?n=t[0]:(i=t[0],n=t[1]),n||(n={}),n=cR({},n),i&&!n.el&&(n.el=i);var a=tR();if(n.el&&"string"==typeof n.el&&a.querySelectorAll(n.el).length>1){var r=[];return a.querySelectorAll(n.el).forEach(t=>{var i=cR({},n,{el:t});r.push(new e(i))}),r}var o=this;o.__swiper__=!0,o.support=TR(),o.device=PR({userAgent:n.userAgent}),o.browser=AR(),o.eventsListeners={},o.eventsAnyListeners=[],o.modules=[...o.__modules__],n.modules&&Array.isArray(n.modules)&&n.modules.forEach(e=>{"function"==typeof e&&o.modules.indexOf(e)<0&&o.modules.push(e)});var s={};o.modules.forEach(e=>{e({params:n,swiper:o,extendParams:eF(n,s),on:o.on.bind(o),once:o.once.bind(o),off:o.off.bind(o),emit:o.emit.bind(o)})});var u=cR({},ZR,s);return o.params=cR({},u,iF,n),o.originalParams=cR({},o.params),o.passedParams=cR({},n),o.params&&o.params.on&&Object.keys(o.params.on).forEach(e=>{o.on(e,o.params.on[e])}),o.params&&o.params.onAny&&o.onAny(o.params.onAny),Object.assign(o,{enabled:o.params.enabled,el:i,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===o.params.direction,isVertical:()=>"vertical"===o.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:o.params.allowSlideNext,allowSlidePrev:o.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:o.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:o.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),o.emit("_swiper"),o.params.init&&o.init(),o}return ee(e,[{key:"getDirectionLabel",value:function(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}},{key:"getSlideIndex",value:function(e){var t=wR(pR(this.slidesEl,`.${this.params.slideClass}, swiper-slide`)[0]);return wR(e)-t}},{key:"getSlideIndexByData",value:function(e){return this.getSlideIndex(this.slides.find(t=>1*t.getAttribute("data-swiper-slide-index")===e))}},{key:"getSlideIndexWhenGrid",value:function(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&("column"===this.params.grid.fill?e=Math.floor(e/this.params.grid.rows):"row"===this.params.grid.fill&&(e%=Math.ceil(this.slides.length/this.params.grid.rows))),e}},{key:"recalcSlides",value:function(){var e=this,t=e.slidesEl,i=e.params;e.slides=pR(t,`.${i.slideClass}, swiper-slide`)}},{key:"enable",value:function(){var e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}},{key:"disable",value:function(){var e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}},{key:"setProgress",value:function(e,t){var i=this;e=Math.min(Math.max(e,0),1);var n=i.minTranslate(),a=(i.maxTranslate()-n)*e+n;i.translateTo(a,void 0===t?0:t),i.updateActiveIndex(),i.updateSlidesClasses()}},{key:"emitContainerClasses",value:function(){var e=this;if(e.params._emitClasses&&e.el){var t=e.el.className.split(" ").filter(t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass));e.emit("_containerClasses",t.join(" "))}}},{key:"getSlideClasses",value:function(e){var t=this;return t.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)).join(" ")}},{key:"emitSlidesClasses",value:function(){var e=this;if(e.params._emitClasses&&e.el){var t=[];e.slides.forEach(i=>{var n=e.getSlideClasses(i);t.push({slideEl:i,classNames:n}),e.emit("_slideClass",i,n)}),e.emit("_slideClasses",t)}}},{key:"slidesPerViewDynamic",value:function(e="current",t=!1){var i=this,n=i.params,a=i.slides,r=i.slidesGrid,o=i.slidesSizesGrid,s=i.size,u=i.activeIndex,l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(n.centeredSlides){for(var d,h=a[u]?Math.ceil(a[u].swiperSlideSize):0,c=u+1;c<a.length;c+=1)a[c]&&!d&&(l+=1,(h+=Math.ceil(a[c].swiperSlideSize))>s&&(d=!0));for(var m=u-1;m>=0;m-=1)a[m]&&!d&&(l+=1,(h+=a[m].swiperSlideSize)>s&&(d=!0))}else if("current"===e)for(var f=u+1;f<a.length;f+=1){(t?r[f]+o[f]-r[u]<s:r[f]-r[u]<s)&&(l+=1)}else for(var v=u-1;v>=0;v-=1){r[u]-r[v]<s&&(l+=1)}return l}},{key:"update",value:function(){var e=this;if(e&&!e.destroyed){var t,i=e.snapGrid,n=e.params;if(n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach(t=>{t.complete&&IR(e,t)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)r(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){var a=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;t=e.slideTo(a.length-1,0,!1,!0)}else t=e.slideTo(e.activeIndex,0,!1,!0);t||r()}n.watchOverflow&&i!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function r(){var t=e.rtlTranslate?-1*e.translate:e.translate,i=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(i),e.updateActiveIndex(),e.updateSlidesClasses()}}},{key:"changeDirection",value:function(e,t=!0){var i=this,n=i.params.direction;return e||(e="horizontal"===n?"vertical":"horizontal"),e===n||"horizontal"!==e&&"vertical"!==e||(i.el.classList.remove(`${i.params.containerModifierClass}${n}`),i.el.classList.add(`${i.params.containerModifierClass}${e}`),i.emitContainerClasses(),i.params.direction=e,i.slides.forEach(t=>{"vertical"===e?t.style.width="":t.style.height=""}),i.emit("changeDirection"),t&&i.update()),i}},{key:"changeLanguageDirection",value:function(e){var t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}},{key:"mount",value:function(e){var t=this;if(t.mounted)return!0;var i=e||t.params.el;if("string"==typeof i&&(i=document.querySelector(i)),!i)return!1;i.swiper=t,i.parentNode&&i.parentNode.host&&i.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);var n=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`,a=i&&i.shadowRoot&&i.shadowRoot.querySelector?i.shadowRoot.querySelector(n()):pR(i,n())[0];return!a&&t.params.createElements&&(a=yR("div",t.params.wrapperClass),i.append(a),pR(i,`.${t.params.slideClass}`).forEach(e=>{a.append(e)})),Object.assign(t,{el:i,wrapperEl:a,slidesEl:t.isElement&&!i.parentNode.host.slideSlots?i.parentNode.host:a,hostEl:t.isElement?i.parentNode.host:i,mounted:!0,rtl:"rtl"===i.dir.toLowerCase()||"rtl"===bR(i,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===i.dir.toLowerCase()||"rtl"===bR(i,"direction")),wrongRTL:"-webkit-box"===bR(a,"display")}),!0}},{key:"init",value:function(e){var t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();var i=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&i.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(e=>{e.complete?IR(t,e):e.addEventListener("load",e=>{IR(t,e.target)})}),_R(t),t.initialized=!0,_R(t),t.emit("init"),t.emit("afterInit"),t}},{key:"destroy",value:function(e=!0,t=!0){var i=this,n=i.params,a=i.el,r=i.wrapperEl,o=i.slides;return void 0===i.params||i.destroyed||(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),n.loop&&i.loopDestroy(),t&&(i.removeClasses(),a&&"string"!=typeof a&&a.removeAttribute("style"),r&&r.removeAttribute("style"),o&&o.length&&o.forEach(e=>{e.classList.remove(n.slideVisibleClass,n.slideFullyVisibleClass,n.slideActiveClass,n.slideNextClass,n.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")})),i.emit("destroy"),Object.keys(i.eventsListeners).forEach(e=>{i.off(e)}),!1!==e&&(i.el&&"string"!=typeof i.el&&(i.el.swiper=null),function(e){var t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})}(i)),i.destroyed=!0),null}}],[{key:"extendDefaults",value:function(e){cR(iF,e)}},{key:"extendedDefaults",get:function(){return iF}},{key:"defaults",get:function(){return ZR}},{key:"installModule",value:function(t){e.prototype.__modules__||(e.prototype.__modules__=[]);var i=e.prototype.__modules__;"function"==typeof t&&i.indexOf(t)<0&&i.push(t)}},{key:"use",value:function(t){return Array.isArray(t)?(t.forEach(t=>e.installModule(t)),e):(e.installModule(t),e)}}])}();function aF(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function rF({swiper:e,extendParams:t,on:i,emit:n}){var a,r="swiper-pagination";t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),e.pagination={el:null,bullets:[]};var o=0;function s(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&0===e.pagination.el.length}function u(t,i){var n=e.params.pagination.bulletActiveClass;t&&(t=t[("prev"===i?"previous":"next")+"ElementSibling"])&&(t.classList.add(`${n}-${i}`),(t=t[("prev"===i?"previous":"next")+"ElementSibling"])&&t.classList.add(`${n}-${i}-${i}`))}function l(t){var i=t.target.closest(aF(e.params.pagination.bulletClass));if(i){t.preventDefault();var n,a,r,o=wR(i)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===o)return;var s=(n=e.realIndex,a=o,r=e.slides.length,(a%=r)===1+(n%=r)?"next":a===n-1?"previous":void 0);"next"===s?e.slideNext():"previous"===s?e.slidePrev():e.slideToLoop(o)}else e.slideTo(o)}}function d(){var t=e.rtl,i=e.params.pagination;if(!s()){var r,l,d=e.pagination.el;d=ER(d);var h=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,c=e.params.loop?Math.ceil(h/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(l=e.previousRealIndex||0,r=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):void 0!==e.snapIndex?(r=e.snapIndex,l=e.previousSnapIndex):(l=e.previousIndex||0,r=e.activeIndex||0),"bullets"===i.type&&e.pagination.bullets&&e.pagination.bullets.length>0){var m,f,v,p=e.pagination.bullets;if(i.dynamicBullets&&(a=SR(p[0],e.isHorizontal()?"width":"height"),d.forEach(t=>{t.style[e.isHorizontal()?"width":"height"]=a*(i.dynamicMainBullets+4)+"px"}),i.dynamicMainBullets>1&&void 0!==l&&((o+=r-(l||0))>i.dynamicMainBullets-1?o=i.dynamicMainBullets-1:o<0&&(o=0)),m=Math.max(r-o,0),v=((f=m+(Math.min(p.length,i.dynamicMainBullets)-1))+m)/2),p.forEach(e=>{var t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(e=>`${i.bulletActiveClass}${e}`)].map(e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e).flat();e.classList.remove(...t)}),d.length>1)p.forEach(t=>{var n=wR(t);n===r?t.classList.add(...i.bulletActiveClass.split(" ")):e.isElement&&t.setAttribute("part","bullet"),i.dynamicBullets&&(n>=m&&n<=f&&t.classList.add(...`${i.bulletActiveClass}-main`.split(" ")),n===m&&u(t,"prev"),n===f&&u(t,"next"))});else{var g=p[r];if(g&&g.classList.add(...i.bulletActiveClass.split(" ")),e.isElement&&p.forEach((e,t)=>{e.setAttribute("part",t===r?"bullet-active":"bullet")}),i.dynamicBullets){for(var y=p[m],b=p[f],w=m;w<=f;w+=1)p[w]&&p[w].classList.add(...`${i.bulletActiveClass}-main`.split(" "));u(y,"prev"),u(b,"next")}}if(i.dynamicBullets){var k=Math.min(p.length,i.dynamicMainBullets+4),S=(a*k-a)/2-v*a,E=t?"right":"left";p.forEach(t=>{t.style[e.isHorizontal()?E:"top"]=`${S}px`})}}d.forEach((t,a)=>{if("fraction"===i.type&&(t.querySelectorAll(aF(i.currentClass)).forEach(e=>{e.textContent=i.formatFractionCurrent(r+1)}),t.querySelectorAll(aF(i.totalClass)).forEach(e=>{e.textContent=i.formatFractionTotal(c)})),"progressbar"===i.type){var o;o=i.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var s=(r+1)/c,u=1,l=1;"horizontal"===o?u=s:l=s,t.querySelectorAll(aF(i.progressbarFillClass)).forEach(t=>{t.style.transform=`translate3d(0,0,0) scaleX(${u}) scaleY(${l})`,t.style.transitionDuration=`${e.params.speed}ms`})}"custom"===i.type&&i.renderCustom?(MR(t,i.renderCustom(e,r+1,c)),0===a&&n("paginationRender",t)):(0===a&&n("paginationRender",t),n("paginationUpdate",t)),e.params.watchOverflow&&e.enabled&&t.classList[e.isLocked?"add":"remove"](i.lockClass)})}}function h(){var t=e.params.pagination;if(!s()){var i=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length,a=e.pagination.el;a=ER(a);var r="";if("bullets"===t.type){var o=e.params.loop?Math.ceil(i/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&o>i&&(o=i);for(var u=0;u<o;u+=1)t.renderBullet?r+=t.renderBullet.call(e,u,t.bulletClass):r+=`<${t.bulletElement} ${e.isElement?'part="bullet"':""} class="${t.bulletClass}"></${t.bulletElement}>`}"fraction"===t.type&&(r=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):`<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`),"progressbar"===t.type&&(r=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):`<span class="${t.progressbarFillClass}"></span>`),e.pagination.bullets=[],a.forEach(i=>{"custom"!==t.type&&MR(i,r||""),"bullets"===t.type&&e.pagination.bullets.push(...i.querySelectorAll(aF(t.bulletClass)))}),"custom"!==t.type&&n("paginationRender",a[0])}}function c(){e.params.pagination=function(e,t,i,n){return e.params.createElements&&Object.keys(n).forEach(a=>{if(!i[a]&&!0===i.auto){var r=pR(e.el,`.${n[a]}`)[0];r||((r=yR("div",n[a])).className=n[a],e.el.append(r)),i[a]=r,t[a]=r}}),i}(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});var t,i=e.params.pagination;i.el&&("string"==typeof i.el&&e.isElement&&(t=e.el.querySelector(i.el)),t||"string"!=typeof i.el||(t=[...document.querySelectorAll(i.el)]),t||(t=i.el),t&&0!==t.length&&(e.params.uniqueNavElements&&"string"==typeof i.el&&Array.isArray(t)&&t.length>1&&(t=[...e.el.querySelectorAll(i.el)]).length>1&&(t=t.find(t=>kR(t,".swiper")[0]===e.el)),Array.isArray(t)&&1===t.length&&(t=t[0]),Object.assign(e.pagination,{el:t}),(t=ER(t)).forEach(t=>{"bullets"===i.type&&i.clickable&&t.classList.add(...(i.clickableClass||"").split(" ")),t.classList.add(i.modifierClass+i.type),t.classList.add(e.isHorizontal()?i.horizontalClass:i.verticalClass),"bullets"===i.type&&i.dynamicBullets&&(t.classList.add(`${i.modifierClass}${i.type}-dynamic`),o=0,i.dynamicMainBullets<1&&(i.dynamicMainBullets=1)),"progressbar"===i.type&&i.progressbarOpposite&&t.classList.add(i.progressbarOppositeClass),i.clickable&&t.addEventListener("click",l),e.enabled||t.classList.add(i.lockClass)})))}function m(){var t=e.params.pagination;if(!s()){var i=e.pagination.el;i&&(i=ER(i)).forEach(i=>{i.classList.remove(t.hiddenClass),i.classList.remove(t.modifierClass+t.type),i.classList.remove(e.isHorizontal()?t.horizontalClass:t.verticalClass),t.clickable&&(i.classList.remove(...(t.clickableClass||"").split(" ")),i.removeEventListener("click",l))}),e.pagination.bullets&&e.pagination.bullets.forEach(e=>e.classList.remove(...t.bulletActiveClass.split(" ")))}}i("changeDirection",()=>{if(e.pagination&&e.pagination.el){var t=e.params.pagination,i=e.pagination.el;(i=ER(i)).forEach(i=>{i.classList.remove(t.horizontalClass,t.verticalClass),i.classList.add(e.isHorizontal()?t.horizontalClass:t.verticalClass)})}}),i("init",()=>{!1===e.params.pagination.enabled?f():(c(),h(),d())}),i("activeIndexChange",()=>{void 0===e.snapIndex&&d()}),i("snapIndexChange",()=>{d()}),i("snapGridLengthChange",()=>{h(),d()}),i("destroy",()=>{m()}),i("enable disable",()=>{var t=e.pagination.el;t&&(t=ER(t)).forEach(t=>t.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass))}),i("lock unlock",()=>{d()}),i("click",(t,i)=>{var a=i.target,r=ER(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&r&&r.length>0&&!a.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&a===e.navigation.nextEl||e.navigation.prevEl&&a===e.navigation.prevEl))return;var o=r[0].classList.contains(e.params.pagination.hiddenClass);n(!0===o?"paginationShow":"paginationHide"),r.forEach(t=>t.classList.toggle(e.params.pagination.hiddenClass))}});var f=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);var t=e.pagination.el;t&&(t=ER(t)).forEach(t=>t.classList.add(e.params.pagination.paginationDisabledClass)),m()};Object.assign(e.pagination,{enable:()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);var t=e.pagination.el;t&&(t=ER(t)).forEach(t=>t.classList.remove(e.params.pagination.paginationDisabledClass)),c(),h(),d()},disable:f,render:h,update:d,init:c,destroy:m})}function oF({swiper:e,extendParams:t,on:i,emit:n,params:a}){var r,o;e.autoplay={running:!1,paused:!1,timeLeft:0},t({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});var s,u,l,d,h,c,m,f=a&&a.autoplay?a.autoplay.delay:3e3,v=a&&a.autoplay?a.autoplay.delay:3e3,p=(new Date).getTime();function g(t){e&&!e.destroyed&&e.wrapperEl&&t.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",g),m||t.detail&&t.detail.bySwiperTouchMove||M())}var y=()=>{if(!e.destroyed&&e.autoplay.running){e.autoplay.paused?u=!0:u&&(v=s,u=!1);var t=e.autoplay.paused?s:p+v-(new Date).getTime();e.autoplay.timeLeft=t,n("autoplayTimeLeft",t,t/f),o=requestAnimationFrame(()=>{y()})}},b=()=>{var t=e.params.autoplay.delay,i=(()=>{var t;if(t=e.virtual&&e.params.virtual.enabled?e.slides.find(e=>e.classList.contains("swiper-slide-active")):e.slides[e.activeIndex])return parseInt(t.getAttribute("data-swiper-autoplay"),10)})();return!Number.isNaN(i)&&i>0&&(t=i),t},w=t=>{if(!e.destroyed&&e.autoplay.running){cancelAnimationFrame(o),y();var i=t;void 0===i&&(i=b(),f=i,v=i),s=i;var a=e.params.speed,u=()=>{e&&!e.destroyed&&(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(a,!0,!0),n("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,a,!0,!0),n("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(a,!0,!0),n("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,a,!0,!0),n("autoplay")),e.params.cssMode&&(p=(new Date).getTime(),requestAnimationFrame(()=>{w()})))};return i>0?(clearTimeout(r),r=setTimeout(()=>{u()},i)):requestAnimationFrame(()=>{u()}),i}},k=()=>{p=(new Date).getTime(),e.autoplay.running=!0,w(),n("autoplayStart")},S=()=>{e.autoplay.running=!1,clearTimeout(r),cancelAnimationFrame(o),n("autoplayStop")},E=(t,i)=>{if(!e.destroyed&&e.autoplay.running){clearTimeout(r),t||(c=!0);var a=()=>{n("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",g):M()};if(e.autoplay.paused=!0,i)a();else{var o=s||e.params.autoplay.delay;s=o-((new Date).getTime()-p),e.isEnd&&s<0&&!e.params.loop||(s<0&&(s=0),a())}}},M=()=>{e.isEnd&&s<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(p=(new Date).getTime(),c?(c=!1,w(s)):w(),e.autoplay.paused=!1,n("autoplayResume"))},T=()=>{if(!e.destroyed&&e.autoplay.running){var t=tR();"hidden"===t.visibilityState&&(c=!0,E(!0)),"visible"===t.visibilityState&&M()}},P=t=>{"mouse"===t.pointerType&&(c=!0,m=!0,e.animating||e.autoplay.paused||E(!0))},A=t=>{"mouse"===t.pointerType&&(m=!1,e.autoplay.paused&&M())};i("init",()=>{e.params.autoplay.enabled&&(e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",P),e.el.addEventListener("pointerleave",A)),tR().addEventListener("visibilitychange",T),k())}),i("destroy",()=>{e.el&&"string"!=typeof e.el&&(e.el.removeEventListener("pointerenter",P),e.el.removeEventListener("pointerleave",A)),tR().removeEventListener("visibilitychange",T),e.autoplay.running&&S()}),i("_freeModeStaticRelease",()=>{(d||c)&&M()}),i("_freeModeNoMomentumRelease",()=>{e.params.autoplay.disableOnInteraction?S():E(!0,!0)}),i("beforeTransitionStart",(t,i,n)=>{!e.destroyed&&e.autoplay.running&&(n||!e.params.autoplay.disableOnInteraction?E(!0,!0):S())}),i("sliderFirstMove",()=>{!e.destroyed&&e.autoplay.running&&(e.params.autoplay.disableOnInteraction?S():(l=!0,d=!1,c=!1,h=setTimeout(()=>{c=!0,d=!0,E(!0)},200)))}),i("touchEnd",()=>{if(!e.destroyed&&e.autoplay.running&&l){if(clearTimeout(h),clearTimeout(r),e.params.autoplay.disableOnInteraction)return d=!1,void(l=!1);d&&e.params.cssMode&&M(),d=!1,l=!1}}),i("slideChange",()=>{!e.destroyed&&e.autoplay.running&&e.autoplay.paused&&(s=b(),f=b())}),Object.assign(e.autoplay,{start:k,stop:S,pause:E,resume:M})}function sF(e,t){var i=vR(t);return i!==t&&(i.style.backfaceVisibility="hidden",i.style["-webkit-backface-visibility"]="hidden"),i}function uF(e,t,i){var n=`swiper-slide-shadow${i?`-${i}`:""} swiper-slide-shadow-${e}`,a=vR(t),r=a.querySelector(`.${n.split(" ").join(".")}`);return r||(r=yR("div",n.split(" ")),a.append(r)),r}function lF({swiper:e,extendParams:t,on:i}){t({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}});!function(e){var t,i=e.effect,n=e.swiper,a=e.on,r=e.setTranslate,o=e.setTransition,s=e.overwriteParams,u=e.perspective,l=e.recreateShadows,d=e.getEffectParams;a("beforeInit",()=>{if(n.params.effect===i){n.classNames.push(`${n.params.containerModifierClass}${i}`),u&&u()&&n.classNames.push(`${n.params.containerModifierClass}3d`);var e=s?s():{};Object.assign(n.params,e),Object.assign(n.originalParams,e)}}),a("setTranslate _virtualUpdated",()=>{n.params.effect===i&&r()}),a("setTransition",(e,t)=>{n.params.effect===i&&o(t)}),a("transitionEnd",()=>{if(n.params.effect===i&&l){if(!d||!d().slideShadows)return;n.slides.forEach(e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>e.remove())}),l()}}),a("virtualUpdate",()=>{n.params.effect===i&&(n.slides.length||(t=!0),requestAnimationFrame(()=>{t&&n.slides&&n.slides.length&&(r(),t=!1)}))})}({effect:"coverflow",swiper:e,on:i,setTranslate:()=>{for(var t=e.width,i=e.height,n=e.slides,a=e.slidesSizesGrid,r=e.params.coverflowEffect,o=e.isHorizontal(),s=e.translate,u=o?t/2-s:i/2-s,l=o?r.rotate:-r.rotate,d=r.depth,h=function(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}(e),c=0,m=n.length;c<m;c+=1){var f=n[c],v=a[c],p=(u-f.swiperSlideOffset-v/2)/v,g="function"==typeof r.modifier?r.modifier(p):p*r.modifier,y=o?l*g:0,b=o?0:l*g,w=-d*Math.abs(g),k=r.stretch;"string"==typeof k&&-1!==k.indexOf("%")&&(k=parseFloat(r.stretch)/100*v);var S=o?0:k*g,E=o?k*g:0,M=1-(1-r.scale)*Math.abs(g);Math.abs(E)<.001&&(E=0),Math.abs(S)<.001&&(S=0),Math.abs(w)<.001&&(w=0),Math.abs(y)<.001&&(y=0),Math.abs(b)<.001&&(b=0),Math.abs(M)<.001&&(M=0);var T=`translate3d(${E}px,${S}px,${w}px) rotateX(${h(b)}deg) rotateY(${h(y)}deg) scale(${M})`;if(sF(0,f).style.transform=T,f.style.zIndex=1-Math.abs(Math.round(g)),r.slideShadows){var P=o?f.querySelector(".swiper-slide-shadow-left"):f.querySelector(".swiper-slide-shadow-top"),A=o?f.querySelector(".swiper-slide-shadow-right"):f.querySelector(".swiper-slide-shadow-bottom");P||(P=uF("coverflow",f,o?"left":"top")),A||(A=uF("coverflow",f,o?"right":"bottom")),P&&(P.style.opacity=g>0?g:0),A&&(A.style.opacity=-g>0?-g:0)}}},setTransition:t=>{e.slides.map(e=>vR(e)).forEach(e=>{e.style.transitionDuration=`${t}ms`,e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>{e.style.transitionDuration=`${t}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}Object.keys(tF).forEach(e=>{Object.keys(tF[e]).forEach(t=>{nF.prototype[t]=tF[e][t]})}),nF.use([function({swiper:e,on:t,emit:i}){var n=oR(),a=null,r=null,o=()=>{e&&!e.destroyed&&e.initialized&&(i("beforeResize"),i("resize"))},s=()=>{e&&!e.destroyed&&e.initialized&&i("orientationchange")};t("init",()=>{e.params.resizeObserver&&void 0!==n.ResizeObserver?e&&!e.destroyed&&e.initialized&&(a=new ResizeObserver(t=>{r=n.requestAnimationFrame(()=>{var i=e.width,n=e.height,a=i,r=n;t.forEach(({contentBoxSize:t,contentRect:i,target:n})=>{n&&n!==e.el||(a=i?i.width:(t[0]||t).inlineSize,r=i?i.height:(t[0]||t).blockSize)}),a===i&&r===n||o()})})).observe(e.el):(n.addEventListener("resize",o),n.addEventListener("orientationchange",s))}),t("destroy",()=>{r&&n.cancelAnimationFrame(r),a&&a.unobserve&&e.el&&(a.unobserve(e.el),a=null),n.removeEventListener("resize",o),n.removeEventListener("orientationchange",s)})},function({swiper:e,extendParams:t,on:i,emit:n}){var a=[],r=oR(),o=(t,i={})=>{var o=new(r.MutationObserver||r.WebkitMutationObserver)(t=>{if(!e.__preventObserver__)if(1!==t.length){var i=function(){n("observerUpdate",t[0])};r.requestAnimationFrame?r.requestAnimationFrame(i):r.setTimeout(i,0)}else n("observerUpdate",t[0])});o.observe(t,{attributes:void 0===i.attributes||i.attributes,childList:e.isElement||(void 0===i.childList||i).childList,characterData:void 0===i.characterData||i.characterData}),a.push(o)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),i("init",()=>{if(e.params.observer){if(e.params.observeParents)for(var t=kR(e.hostEl),i=0;i<t.length;i+=1)o(t[i]);o(e.hostEl,{childList:e.params.observeSlideChildren}),o(e.wrapperEl,{attributes:!1})}}),i("destroy",()=>{a.forEach(e=>{e.disconnect()}),a.splice(0,a.length)})}]);var dF,hF,cF=e=>e,mF=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t.updateSpacing=e=>{t.slideSpacing=e.detail.spacing,t.swiperInstance&&(t.swiperInstance.params.spaceBetween=t.slideSpacing,t.swiperInstance.update())},t}return re(e,tu),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),window.addEventListener("child-spacing",this.updateSpacing,!1)}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),window.removeEventListener("child-spacing",this.updateSpacing,!1)}},{key:"styles",value:function(){var e,t,i,n=this.scaleFactor,a=this.component,r=a.backgroundBlur,o=a.indicator,s=a.activeIndicator,u=a.previousSlidePadding,l=a.nextSlidePadding,d="vertical"===a.direction?"margin-top":"margin-left";return B(`\n :host {\n display: ${a.hidden?"none":"flex"};\n flex-direction: column !important;\n ${Iu(a.position)} \n width: 100%;\n bottom: -1px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n z-index: ${null!==(e=a.zIndex)&&void 0!==e?e:1};\n top: 0px;\n transition: all 0.3s;\n ${ku(a,n)}\n ${function(e,t){return`\n padding-right: ${hu(t,e.nextSlidePadding)}px !important;\n padding-left: ${hu(t,e.previousSlidePadding)}px !important;\n `}(a,n)}\n ${gu(a)}\n ${pu(a,!1)}\n max-width: 100vw;\n }\n :host(:focus){\n ${pu(a,!0)}\n ${xu(a,n,!0)}\n }\n :host(:focus-visible){\n ${Fu(a)}\n }\n :host > *:not(:first-child) {\n ${d}: ${a.spacing?a.spacing*n:0}px;\n }\n .swiper-container {\n ${Mu(a,n)};\n padding-left: ${null!=u?u:0}px;\n padding-right: ${null!=l?l:0}px;\n box-sizing: border-box;\n }\n .swiper-pagination{\n position: relative;\n padding: 8px;\n }\n .swiper-pagination-bullet {\n opacity: 1 !important;\n ${null!=(null==o?void 0:o.width)?`width: ${o.width}px !important;`:""}\n ${null!=(null==o?void 0:o.height)?`height: ${o.height}px !important;`:""}\n ${null!=(null==o?void 0:o.borderRadius)?`border-radius: ${o.borderRadius}px !important;`:""}\n background: ${null!==(t=null==o?void 0:o.fillColor)&&void 0!==t?t:a.indicatorColor} !important;\n }\n .swiper-pagination-bullet-active {\n ${null!=(null==s?void 0:s.width)?`width: ${s.width}px !important;`:""}\n ${null!=(null==s?void 0:s.height)?`height: ${s.height}px !important;`:""}\n ${null!=(null==s?void 0:s.borderRadius)?`border-radius: ${s.borderRadius}px !important;`:""}\n background: ${null!==(i=null==s?void 0:s.fillColor)&&void 0!==i?i:a.activeIndicatorColor} !important;\n }\n `)}},{key:"updated",value:function(){var e,t,i=[rF,oF],n=this.component,a=n.autoplay,r=n.autoplaySeconds,o=n.showIndicators,s=n.slideSpacing,u=n.inactiveSlideScale;u&&i.push(lF),nF.use(i);var l=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".swiper-container"),d=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".swiper-pagination");if(l&&!this.swiperInstance){var h,c={initialSlide:0,slidesPerView:1,loop:a,spaceBetween:null!==(h=null!=s?s:this.slideSpacing)&&void 0!==h?h:0,autoplay:!!a&&{delay:1e3*r,disableOnInteraction:!1},pagination:!(null!=o&&!o)&&{el:d,clickable:!0},on:{init:e=>{this.handleSlideChange(e)},slideChange:e=>{this.handleSlideChange(e)}}};u&&(c.effect="coverflow",c.coverflowEffect={rotate:0,stretch:0,depth:100,modifier:1,slideShadows:!1,scale:u}),this.swiperInstance=new nF(l,c)}}},{key:"handleSlideChange",value:function(e){if(this.contextProvider.setCurrentSlideIndex(e.realIndex),this.component.onChange){var t,i=this.getCarouselOnChange(this.component),n=null==i||null===(t=i.parameters)||void 0===t||null===(t=t.partialState)||void 0===t?void 0:t.currentGroupId;n&&this.contextProvider.setCurrentGroupData(n,"")}}},{key:"getCarouselOnChange",value:function(e){var t;if(e.onChange&&e.onChange.parameters){var i=this.contextProvider.state.slides,n="string"==typeof e.loopSource?e.loopSource:"",a=null==i||null===(t=i[n])||void 0===t||null===(t=t.carouselName)||void 0===t?void 0:t[this.contextProvider.state.currentSlideIndex];return La(e.onChange,{slide:a,sku:this.contextProvider.state.sku,state:this.contextProvider.state,launch:this.contextProvider.state.launch,customer:this.contextProvider.state.customer})}}},{key:"getCarouselSlides",value:function(e){var t,i;if(!e.loopSource)return[];var n,a=this.contextProvider.state,r=a.slides,o=a.selectedProducts,s="string"==typeof e.loopSource?e.loopSource:"",u=Pa(this.contextProvider.productDetails,null!==(t=null===(i=this.contextProvider.getSelectedPaywall())||void 0===i?void 0:i.sku_menus)&&void 0!==t?t:[],s),l=[];P(r)||(l=""!=s?r[s].carouselName:null!==(n=e.loopSource)&&void 0!==n?n:[]);var d=this.contextProvider.filteredSkuMenus.map(e=>e.id);return l.filter(e=>!e.productGroupId||d.includes(e.productGroupId)).map(t=>{var i=u.find(e=>e.id==o[t.productGroupId]);return La(e.components,La({slide:t},{sku:ie({},Da(null==i?void 0:i.product_details,t,u))}))||[]})}},{key:"render",value:function(){var e=this.getCarouselSlides(this.component),t=this.component,i=t.focusedBorderColor,n=t.focusedFillColor,a=t.fillColor;return!i&&Ua(a,n)||(this.tabIndex=0),N(dF||(dF=cF`
488
+ `),this.isCollapsed?"Expand":"Collapse",!this.isCollapsed,this._handleClick,cl(this.contextProvider,i,this.scaleFactor,this.inFocusedState,this.minSDKVersion),this.isCollapsed,this.isCollapsed?"-1":"0",o)}}])}();ft([Kt({type:Object})],Y_.prototype,"component",void 0),ft([Kt({type:Boolean})],Y_.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],Y_.prototype,"height",void 0),ft([Kt({type:Number})],Y_.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],Y_.prototype,"minSDKVersion",void 0),Y_=ft([St("nami-collapse-container")],Y_);var q_=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t.mouseDown=!1,t.startDragging=e=>{e.preventDefault(),t.mouseDown=!0,t.startX=e.pageX-t.offsetLeft},t.stopDragging=()=>{t.mouseDown=!1},t.move=e=>{e.preventDefault(),t.mouseDown&&(t.scrollLeft=t.scrollLeft-(e.pageX-t.offsetLeft-t.startX))},t}return re(e,tu),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),this.addEventListener("mousemove",this.move,!1),this.addEventListener("mousedown",this.startDragging,!1),this.addEventListener("mouseup",this.stopDragging,!1),this.addEventListener("mouseleave",this.stopDragging,!1)}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),this.removeEventListener("mousemove",this.move,!1),this.removeEventListener("mousedown",this.startDragging,!1),this.removeEventListener("mouseup",this.stopDragging,!1),this.removeEventListener("mouseleave",this.stopDragging,!1)}},{key:"styles",value:function(){var e="vertical"===this.component.direction,t=e?"margin-top":"margin-left",i=this.component.spacing?this.component.spacing*this.scaleFactor:0;return B(`\n :host {\n display: ${this.component.hidden?"none":"flex"};\n flex-direction: ${e?"column":"row"};\n flex-wrap: ${e?"nowrap":"wrap"};\n overflow: auto;\n align-items: center;\n justify-content: center;\n ${pu(this.component,!1)}\n ${Cu(this.component,!1)}\n align-self: baseline;\n cursor: -webkit-grab;\n cursor: grab;\n }\n :host(:focus){\n ${pu(this.component,!0)}\n ${Cu(this.component,!0)}\n }\n :host(:focus-visible){\n ${Fu(this.component)}\n }\n @supports not (display: grid) {\n :host > *:not(:first-child) {\n ${t}: ${i}px;\n }\n }\n @supports (display: grid) {\n :host {\n display: ${this.component.hidden?"none":"grid"};\n grid-row-gap: ${i}px;\n grid-column-gap: ${i}px;\n grid-gap: ${i}px;\n grid-auto-flow: ${e?"row":"column"};\n align-items: center;\n justify-items: center;\n place-items: center;\n }\n :host > * {\n margin: 0;\n }\n }\n `)}},{key:"render",value:function(){var e=this.component,t=e.focusedBorderColor,i=e.focusedFillColor,n=e.fillColor;return!t&&Ua(n,i)||(this.tabIndex=0),(this.contextProvider,Ra(0,this.component).flatMap(e=>e.header?[e.header,...e.items]:e.items)).map(e=>e.map(e=>cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))}}])}();ft([Kt({type:Object})],q_.prototype,"component",void 0),ft([Kt({type:Boolean})],q_.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],q_.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],q_.prototype,"minSDKVersion",void 0),q_=ft([St("nami-responsive-grid")],q_);var J_,Q_,Z_=e=>e,eR=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return re(e,tu),ee(e,[{key:"styles",value:function(){var e,t,i,n,a=Math.max(1,null!==(e=this.component.columns)&&void 0!==e?e:2),r=(null!==(t=this.component.columnSpacing)&&void 0!==t?t:0)*this.scaleFactor,o=(null!==(i=this.component.rowSpacing)&&void 0!==i?i:0)*this.scaleFactor,s=null!==(n=this.component.itemAlignment)&&void 0!==n?n:"start";return B(`\n :host {\n display: ${this.component.hidden?"none":"grid"};\n grid-template-columns: repeat(${a}, 1fr);\n column-gap: ${r}px;\n row-gap: ${o}px;\n justify-items: ${s};\n ${pu(this.component,!1)}\n ${Cu(this.component,!1)}\n }\n .nami-group-header {\n grid-column: 1 / -1;\n justify-self: stretch;\n }\n :host(:focus) {\n ${pu(this.component,!0)}\n ${Cu(this.component,!0)}\n }\n :host(:focus-visible) {\n ${Fu(this.component)}\n }\n `)}},{key:"render",value:function(){var e=this.component,t=e.focusedBorderColor,i=e.focusedFillColor,n=e.fillColor;!t&&Ua(n,i)||(this.tabIndex=0);var a=e=>cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion);return Ra(this.contextProvider,this.component).map(e=>N(J_||(J_=Z_`
489
+ ${0}
490
+ ${0}
491
+ `),e.header?N(Q_||(Q_=Z_`<div class="nami-group-header">${0}</div>`),e.header.map(a)):null,e.items.map(e=>e.map(a))))}}])}();function tR(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function iR(e={},t={}){var i=["__proto__","constructor","prototype"];Object.keys(t).filter(e=>i.indexOf(e)<0).forEach(i=>{void 0===e[i]?e[i]=t[i]:tR(t[i])&&tR(e[i])&&Object.keys(t[i]).length>0&&iR(e[i],t[i])})}ft([Kt({type:Object})],eR.prototype,"component",void 0),ft([Kt({type:Boolean})],eR.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],eR.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],eR.prototype,"minSDKVersion",void 0),eR=ft([St("nami-repeating-grid")],eR);var nR={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function aR(){var e="undefined"!=typeof document?document:{};return iR(e,nR),e}var rR,oR,sR,uR={document:nR,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function lR(){var e="undefined"!=typeof window?window:{};return iR(e,uR),e}function dR(e,t=0){return setTimeout(e,t)}function hR(){return Date.now()}function cR(e,t="x"){var i,n,a,r=lR(),o=function(e){var t,i=lR();return i.getComputedStyle&&(t=i.getComputedStyle(e,null)),!t&&e.currentStyle&&(t=e.currentStyle),t||(t=e.style),t}(e);return r.WebKitCSSMatrix?((n=o.transform||o.webkitTransform).split(",").length>6&&(n=n.split(", ").map(e=>e.replace(",",".")).join(", ")),a=new r.WebKitCSSMatrix("none"===n?"":n)):i=(a=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(n=r.WebKitCSSMatrix?a.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(n=r.WebKitCSSMatrix?a.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),n||0}function mR(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function fR(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function vR(...e){for(var t=Object(e[0]),i=1;i<e.length;i+=1){var n=e[i];if(null!=n&&!fR(n))for(var a=Object.keys(Object(n)).filter(e=>"__proto__"!==e&&"constructor"!==e&&"prototype"!==e),r=0,o=a.length;r<o;r+=1){var s=a[r],u=Object.getOwnPropertyDescriptor(n,s);void 0!==u&&u.enumerable&&(mR(t[s])&&mR(n[s])?n[s].__swiper__?t[s]=n[s]:vR(t[s],n[s]):!mR(t[s])&&mR(n[s])?(t[s]={},n[s].__swiper__?t[s]=n[s]:vR(t[s],n[s])):t[s]=n[s])}}return t}function pR(e,t,i){e.style.setProperty(t,i)}function gR({swiper:e,targetPosition:t,side:i}){var n,a=lR(),r=-e.translate,o=null,s=e.params.speed;e.wrapperEl.style.scrollSnapType="none",a.cancelAnimationFrame(e.cssModeFrameID);var u=t>r?"next":"prev",l=(e,t)=>"next"===u&&e>=t||"prev"===u&&e<=t,d=()=>{n=(new Date).getTime(),null===o&&(o=n);var u=Math.max(Math.min((n-o)/s,1),0),h=.5-Math.cos(u*Math.PI)/2,c=r+h*(t-r);if(l(c,t)&&(c=t),e.wrapperEl.scrollTo({[i]:c}),l(c,t))return e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[i]:c})}),void a.cancelAnimationFrame(e.cssModeFrameID);e.cssModeFrameID=a.requestAnimationFrame(d)};d()}function yR(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function bR(e,t=""){var i=lR(),n=[...e.children];return i.HTMLSlotElement&&e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),t?n.filter(e=>e.matches(t)):n}function wR(e){try{return void console.warn(e)}catch(e){}}function kR(e,t=[]){var i=document.createElement(e);return i.classList.add(...Array.isArray(t)?t:function(e=""){return e.trim().split(" ").filter(e=>!!e.trim())}(t)),i}function SR(e,t){return lR().getComputedStyle(e,null).getPropertyValue(t)}function ER(e){var t,i=e;if(i){for(t=0;null!==(i=i.previousSibling);)1===i.nodeType&&(t+=1);return t}}function MR(e,t){for(var i=[],n=e.parentElement;n;)t?n.matches(t)&&i.push(n):i.push(n),n=n.parentElement;return i}function TR(e,t,i){var n=lR();return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(n.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(n.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom"))}function PR(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)}function AR(e,t=""){"undefined"!=typeof trustedTypes?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}function DR(){return rR||(rR=function(){var e=lR(),t=aR();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),rR}function xR(e={}){return oR||(oR=function({userAgent:e}={}){var t=DR(),i=lR(),n=i.navigator.platform,a=e||i.navigator.userAgent,r={ios:!1,android:!1},o=i.screen.width,s=i.screen.height,u=a.match(/(Android);?[\s\/]+([\d.]+)?/),l=a.match(/(iPad)(?!\1).*OS\s([\d_]+)/),d=a.match(/(iPod)(.*OS\s([\d_]+))?/),h=!l&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),c="Win32"===n,m="MacIntel"===n;return!l&&m&&t.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${o}x${s}`)>=0&&((l=a.match(/(Version)\/([\d.]+)/))||(l=[0,1,"13_0_0"]),m=!1),u&&!c&&(r.os="android",r.android=!0),(l||h||d)&&(r.os="ios",r.ios=!0),r}(e)),oR}function CR(){return sR||(sR=function(){var e=lR(),t=xR(),i=!1;function n(){var t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(n()){var a=String(e.navigator.userAgent);if(a.includes("Version/")){var r=a.split("Version/")[1].split(" ")[0].split(".").map(e=>Number(e)),o=r[0],s=r[1];i=o<16||16===o&&s<2}}var u=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),l=n();return{isSafari:i||l,needPerspectiveFix:i,need3dFix:l||u&&t.ios,isWebView:u}}()),sR}var IR={on(e,t,i){var n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof t)return n;var a=i?"unshift":"push";return e.split(" ").forEach(e=>{n.eventsListeners[e]||(n.eventsListeners[e]=[]),n.eventsListeners[e][a](t)}),n},once(e,t,i){var n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof t)return n;function a(...i){n.off(e,a),a.__emitterProxy&&delete a.__emitterProxy,t.apply(n,i)}return a.__emitterProxy=t,n.on(e,a,i)},onAny(e,t){var i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof e)return i;var n=t?"unshift":"push";return i.eventsAnyListeners.indexOf(e)<0&&i.eventsAnyListeners[n](e),i},offAny(e){var t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;var i=t.eventsAnyListeners.indexOf(e);return i>=0&&t.eventsAnyListeners.splice(i,1),t},off(e,t){var i=this;return!i.eventsListeners||i.destroyed?i:i.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].forEach((n,a)=>{(n===t||n.__emitterProxy&&n.__emitterProxy===t)&&i.eventsListeners[e].splice(a,1)})}),i):i},emit(...e){var t,i,n,a=this;return!a.eventsListeners||a.destroyed?a:a.eventsListeners?("string"==typeof e[0]||Array.isArray(e[0])?(t=e[0],i=e.slice(1,e.length),n=a):(t=e[0].events,i=e[0].data,n=e[0].context||a),i.unshift(n),(Array.isArray(t)?t:t.split(" ")).forEach(e=>{a.eventsAnyListeners&&a.eventsAnyListeners.length&&a.eventsAnyListeners.forEach(t=>{t.apply(n,[e,...i])}),a.eventsListeners&&a.eventsListeners[e]&&a.eventsListeners[e].forEach(e=>{e.apply(n,i)})}),a):a}};var LR=(e,t,i)=>{t&&!e.classList.contains(i)?e.classList.add(i):!t&&e.classList.contains(i)&&e.classList.remove(i)};var _R=(e,t,i)=>{t&&!e.classList.contains(i)?e.classList.add(i):!t&&e.classList.contains(i)&&e.classList.remove(i)};var RR=(e,t)=>{if(e&&!e.destroyed&&e.params){var i=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(i){var n=i.querySelector(`.${e.params.lazyPreloaderClass}`);!n&&e.isElement&&(i.shadowRoot?n=i.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{i.shadowRoot&&(n=i.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`))&&!n.lazyPreloaderManaged&&n.remove()})),n&&!n.lazyPreloaderManaged&&n.remove()}}},FR=(e,t)=>{if(e.slides[t]){var i=e.slides[t].querySelector('[loading="lazy"]');i&&i.removeAttribute("loading")}},WR=e=>{if(e&&!e.destroyed&&e.params){var t=e.params.lazyPreloadPrevNext,i=e.slides.length;if(i&&t&&!(t<0)){t=Math.min(t,i);var n="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){var r=a,o=[r-t];return o.push(...Array.from({length:t}).map((e,t)=>r+n+t)),void e.slides.forEach((t,i)=>{o.includes(t.column)&&FR(e,i)})}var s=a+n-1;if(e.params.rewind||e.params.loop)for(var u=a-t;u<=s+t;u+=1){var l=(u%i+i)%i;(l<a||l>s)&&FR(e,l)}else for(var d=Math.max(a-t,0);d<=Math.min(s+t,i-1);d+=1)d!==a&&(d>s||d<a)&&FR(e,d)}}};var OR={updateSize:function(){var e,t,i=this,n=i.el;e=void 0!==i.params.width&&null!==i.params.width?i.params.width:n.clientWidth,t=void 0!==i.params.height&&null!==i.params.height?i.params.height:n.clientHeight,0===e&&i.isHorizontal()||0===t&&i.isVertical()||(e=e-parseInt(SR(n,"padding-left")||0,10)-parseInt(SR(n,"padding-right")||0,10),t=t-parseInt(SR(n,"padding-top")||0,10)-parseInt(SR(n,"padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),Object.assign(i,{width:e,height:t,size:i.isHorizontal()?e:t}))},updateSlides:function(){var e=this;function t(t,i){return parseFloat(t.getPropertyValue(e.getDirectionLabel(i))||0)}var i=e.params,n=e.wrapperEl,a=e.slidesEl,r=e.rtlTranslate,o=e.wrongRTL,s=e.virtual&&i.virtual.enabled,u=s?e.virtual.slides.length:e.slides.length,l=bR(a,`.${e.params.slideClass}, swiper-slide`),d=s?e.virtual.slides.length:l.length,h=[],c=[],m=[],f=i.slidesOffsetBefore;"function"==typeof f&&(f=i.slidesOffsetBefore.call(e));var v=i.slidesOffsetAfter;"function"==typeof v&&(v=i.slidesOffsetAfter.call(e));var p=e.snapGrid.length,g=e.slidesGrid.length,y=e.size-f-v,b=i.spaceBetween,w=-f,k=0,S=0;if(void 0!==y){"string"==typeof b&&b.indexOf("%")>=0?b=parseFloat(b.replace("%",""))/100*y:"string"==typeof b&&(b=parseFloat(b)),e.virtualSize=-b-f-v,l.forEach(e=>{r?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),i.centeredSlides&&i.cssMode&&(pR(n,"--swiper-centered-offset-before",""),pR(n,"--swiper-centered-offset-after","")),i.cssMode&&(pR(n,"--swiper-slides-offset-before",`${f}px`),pR(n,"--swiper-slides-offset-after",`${v}px`));var E,M=i.grid&&i.grid.rows>1&&e.grid;M?e.grid.initSlides(l):e.grid&&e.grid.unsetSlides();for(var T="auto"===i.slidesPerView&&i.breakpoints&&Object.keys(i.breakpoints).filter(e=>void 0!==i.breakpoints[e].slidesPerView).length>0,P=0;P<d;P+=1){E=0;var A=l[P];if(!A||(M&&e.grid.updateSlide(P,A,l),"none"!==SR(A,"display"))){if(s&&"auto"===i.slidesPerView)i.virtual.slidesPerViewAutoSlideSize&&(E=i.virtual.slidesPerViewAutoSlideSize),E&&A&&(i.roundLengths&&(E=Math.floor(E)),A.style[e.getDirectionLabel("width")]=`${E}px`);else if("auto"===i.slidesPerView){T&&(A.style[e.getDirectionLabel("width")]="");var D=getComputedStyle(A),x=A.style.transform,C=A.style.webkitTransform;if(x&&(A.style.transform="none"),C&&(A.style.webkitTransform="none"),i.roundLengths)E=e.isHorizontal()?TR(A,"width"):TR(A,"height");else{var I=t(D,"width"),L=t(D,"padding-left"),_=t(D,"padding-right"),R=t(D,"margin-left"),F=t(D,"margin-right"),W=D.getPropertyValue("box-sizing");if(W&&"border-box"===W)E=I+R+F;else{var O=A.clientWidth;E=I+L+_+R+F+(A.offsetWidth-O)}}x&&(A.style.transform=x),C&&(A.style.webkitTransform=C),i.roundLengths&&(E=Math.floor(E))}else E=(y-(i.slidesPerView-1)*b)/i.slidesPerView,i.roundLengths&&(E=Math.floor(E)),A&&(A.style[e.getDirectionLabel("width")]=`${E}px`);A&&(A.swiperSlideSize=E),m.push(E),i.centeredSlides?(w=w+E/2+k/2+b,0===k&&0!==P&&(w=w-y/2-b),0===P&&(w=w-y/2-b),Math.abs(w)<.001&&(w=0),i.roundLengths&&(w=Math.floor(w)),S%i.slidesPerGroup===0&&h.push(w),c.push(w)):(i.roundLengths&&(w=Math.floor(w)),(S-Math.min(e.params.slidesPerGroupSkip,S))%e.params.slidesPerGroup===0&&h.push(w),c.push(w),w=w+E+b),e.virtualSize+=E+b,k=E,S+=1}}if(e.virtualSize=Math.max(e.virtualSize,y)+v,r&&o&&("slide"===i.effect||"coverflow"===i.effect)&&(n.style.width=`${e.virtualSize+b}px`),i.setWrapperSize&&(n.style[e.getDirectionLabel("width")]=`${e.virtualSize+b}px`),M&&e.grid.updateWrapperSize(E,h),!i.centeredSlides){var $="auto"!==i.slidesPerView&&i.slidesPerView%1!=0,N=i.snapToSlideEdge&&!i.loop&&("auto"===i.slidesPerView||$),j=h.length;if(N){var B;if("auto"===i.slidesPerView){B=1;for(var z=0,U=m.length-1;U>=0&&(z+=m[U]+(U<m.length-1?b:0))<=y;U-=1)B=m.length-U}else B=Math.floor(i.slidesPerView);j=Math.max(d-B,0)}for(var H=[],G=0;G<h.length;G+=1){var V=h[G];i.roundLengths&&(V=Math.floor(V)),N?G<=j&&H.push(V):h[G]<=e.virtualSize-y&&H.push(V)}h=H,Math.floor(e.virtualSize-y)-Math.floor(h[h.length-1])>1&&(N||h.push(e.virtualSize-y))}if(s&&i.loop){var K=m[0]+b;if(i.slidesPerGroup>1)for(var X=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/i.slidesPerGroup),Y=K*i.slidesPerGroup,q=0;q<X;q+=1)h.push(h[h.length-1]+Y);for(var J=0;J<e.virtual.slidesBefore+e.virtual.slidesAfter;J+=1)1===i.slidesPerGroup&&h.push(h[h.length-1]+K),c.push(c[c.length-1]+K),e.virtualSize+=K}if(0===h.length&&(h=[0]),0!==b){var Q=e.isHorizontal()&&r?"marginLeft":e.getDirectionLabel("marginRight");l.filter((e,t)=>!(i.cssMode&&!i.loop)||t!==l.length-1).forEach(e=>{e.style[Q]=`${b}px`})}if(i.centeredSlides&&i.centeredSlidesBounds){var Z=0;m.forEach(e=>{Z+=e+(b||0)});var ee=(Z-=b)>y?Z-y:0;h=h.map(e=>e<=0?-f:e>ee?ee+v:e)}if(i.centerInsufficientSlides){var te=0;if(m.forEach(e=>{te+=e+(b||0)}),(te-=b)<y){var ie=(y-te)/2;h.forEach((e,t)=>{h[t]=e-ie}),c.forEach((e,t)=>{c[t]=e+ie})}}if(Object.assign(e,{slides:l,snapGrid:h,slidesGrid:c,slidesSizesGrid:m}),i.centeredSlides&&i.cssMode&&!i.centeredSlidesBounds){pR(n,"--swiper-centered-offset-before",-h[0]+"px"),pR(n,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");var ne=-e.snapGrid[0],ae=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+ne),e.slidesGrid=e.slidesGrid.map(e=>e+ae)}if(d!==u&&e.emit("slidesLengthChange"),h.length!==p&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),c.length!==g&&e.emit("slidesGridLengthChange"),i.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(s||i.cssMode||"slide"!==i.effect&&"fade"!==i.effect)){var re=`${i.containerModifierClass}backface-hidden`,oe=e.el.classList.contains(re);d<=i.maxBackfaceHiddenSlides?oe||e.el.classList.add(re):oe&&e.el.classList.remove(re)}}},updateAutoHeight:function(e){var t,i=this,n=[],a=i.virtual&&i.params.virtual.enabled,r=0;"number"==typeof e?i.setTransition(e):!0===e&&i.setTransition(i.params.speed);var o=e=>a?i.slides[i.getSlideIndexByData(e)]:i.slides[e];if("auto"!==i.params.slidesPerView&&i.params.slidesPerView>1)if(i.params.centeredSlides)(i.visibleSlides||[]).forEach(e=>{n.push(e)});else for(t=0;t<Math.ceil(i.params.slidesPerView);t+=1){var s=i.activeIndex+t;if(s>i.slides.length&&!a)break;n.push(o(s))}else n.push(o(i.activeIndex));for(t=0;t<n.length;t+=1)if(void 0!==n[t]){var u=n[t].offsetHeight;r=u>r?u:r}(r||0===r)&&(i.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){for(var e=this,t=e.slides,i=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0,n=0;n<t.length;n+=1)t[n].swiperSlideOffset=(e.isHorizontal()?t[n].offsetLeft:t[n].offsetTop)-i-e.cssOverflowAdjustment()},updateSlidesProgress:function(e=this&&this.translate||0){var t=this,i=t.params,n=t.slides,a=t.rtlTranslate,r=t.snapGrid;if(0!==n.length){void 0===n[0].swiperSlideOffset&&t.updateSlidesOffset();var o=-e;a&&(o=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];var s=i.spaceBetween;"string"==typeof s&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:"string"==typeof s&&(s=parseFloat(s));for(var u=0;u<n.length;u+=1){var l=n[u],d=l.swiperSlideOffset;i.cssMode&&i.centeredSlides&&(d-=n[0].swiperSlideOffset);var h=(o+(i.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),c=(o-r[0]+(i.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),m=-(o-d),f=m+t.slidesSizesGrid[u],v=m>=0&&m<=t.size-t.slidesSizesGrid[u],p=m>=0&&m<t.size-1||f>1&&f<=t.size||m<=0&&f>=t.size;p&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(u)),LR(l,p,i.slideVisibleClass),LR(l,v,i.slideFullyVisibleClass),l.progress=a?-h:h,l.originalProgress=a?-c:c}}},updateProgress:function(e){var t=this;if(void 0===e){var i=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*i||0}var n=t.params,a=t.maxTranslate()-t.minTranslate(),r=t.progress,o=t.isBeginning,s=t.isEnd,u=t.progressLoop,l=o,d=s;if(0===a)r=0,o=!0,s=!0;else{r=(e-t.minTranslate())/a;var h=Math.abs(e-t.minTranslate())<1,c=Math.abs(e-t.maxTranslate())<1;o=h||r<=0,s=c||r>=1,h&&(r=0),c&&(r=1)}if(n.loop){var m=t.getSlideIndexByData(0),f=t.getSlideIndexByData(t.slides.length-1),v=t.slidesGrid[m],p=t.slidesGrid[f],g=t.slidesGrid[t.slidesGrid.length-1],y=Math.abs(e);(u=y>=v?(y-v)/g:(y+g-p)/g)>1&&(u-=1)}Object.assign(t,{progress:r,progressLoop:u,isBeginning:o,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),s&&!d&&t.emit("reachEnd toEdge"),(l&&!o||d&&!s)&&t.emit("fromEdge"),t.emit("progress",r)},updateSlidesClasses:function(){var e,t,i,n=this,a=n.slides,r=n.params,o=n.slidesEl,s=n.activeIndex,u=n.virtual&&r.virtual.enabled,l=n.grid&&r.grid&&r.grid.rows>1,d=e=>bR(o,`.${r.slideClass}${e}, swiper-slide${e}`)[0];if(u)if(r.loop){var h=s-n.virtual.slidesBefore;h<0&&(h=n.virtual.slides.length+h),h>=n.virtual.slides.length&&(h-=n.virtual.slides.length),e=d(`[data-swiper-slide-index="${h}"]`)}else e=d(`[data-swiper-slide-index="${s}"]`);else l?(e=a.find(e=>e.column===s),i=a.find(e=>e.column===s+1),t=a.find(e=>e.column===s-1)):e=a[s];e&&(l||(i=function(e,t){for(var i=[];e.nextElementSibling;){var n=e.nextElementSibling;t?n.matches(t)&&i.push(n):i.push(n),e=n}return i}(e,`.${r.slideClass}, swiper-slide`)[0],r.loop&&!i&&(i=a[0]),t=function(e,t){for(var i=[];e.previousElementSibling;){var n=e.previousElementSibling;t?n.matches(t)&&i.push(n):i.push(n),e=n}return i}(e,`.${r.slideClass}, swiper-slide`)[0],r.loop&&0===!t&&(t=a[a.length-1]))),a.forEach(n=>{_R(n,n===e,r.slideActiveClass),_R(n,n===i,r.slideNextClass),_R(n,n===t,r.slidePrevClass)}),n.emitSlidesClasses()},updateActiveIndex:function(e){var t,i=this,n=i.rtlTranslate?i.translate:-i.translate,a=i.snapGrid,r=i.params,o=i.activeIndex,s=i.realIndex,u=i.snapIndex,l=e,d=e=>{var t=e-i.virtual.slidesBefore;return t<0&&(t=i.virtual.slides.length+t),t>=i.virtual.slides.length&&(t-=i.virtual.slides.length),t};if(void 0===l&&(l=function(e){for(var t,i=e.slidesGrid,n=e.params,a=e.rtlTranslate?e.translate:-e.translate,r=0;r<i.length;r+=1)void 0!==i[r+1]?a>=i[r]&&a<i[r+1]-(i[r+1]-i[r])/2?t=r:a>=i[r]&&a<i[r+1]&&(t=r+1):a>=i[r]&&(t=r);return n.normalizeSlideIndex&&(t<0||void 0===t)&&(t=0),t}(i)),a.indexOf(n)>=0)t=a.indexOf(n);else{var h=Math.min(r.slidesPerGroupSkip,l);t=h+Math.floor((l-h)/r.slidesPerGroup)}if(t>=a.length&&(t=a.length-1),l!==o||i.params.loop)if(l===o&&i.params.loop&&i.virtual&&i.params.virtual.enabled)i.realIndex=d(l);else{var c,m=i.grid&&r.grid&&r.grid.rows>1;if(i.virtual&&r.virtual.enabled)c=r.loop?d(l):l;else if(m){var f=i.slides.find(e=>e.column===l),v=parseInt(f.getAttribute("data-swiper-slide-index"),10);Number.isNaN(v)&&(v=Math.max(i.slides.indexOf(f),0)),c=Math.floor(v/r.grid.rows)}else if(i.slides[l]){var p=i.slides[l].getAttribute("data-swiper-slide-index");c=p?parseInt(p,10):l}else c=l;Object.assign(i,{previousSnapIndex:u,snapIndex:t,previousRealIndex:s,realIndex:c,previousIndex:o,activeIndex:l}),i.initialized&&WR(i),i.emit("activeIndexChange"),i.emit("snapIndexChange"),(i.initialized||i.params.runCallbacksOnInit)&&(s!==c&&i.emit("realIndexChange"),i.emit("slideChange"))}else t!==u&&(i.snapIndex=t,i.emit("snapIndexChange"))},updateClickedSlide:function(e,t){var i=this,n=i.params,a=e.closest(`.${n.slideClass}, swiper-slide`);!a&&i.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(e=>{!a&&e.matches&&e.matches(`.${n.slideClass}, swiper-slide`)&&(a=e)});var r,o=!1;if(a)for(var s=0;s<i.slides.length;s+=1)if(i.slides[s]===a){o=!0,r=s;break}if(!a||!o)return i.clickedSlide=void 0,void(i.clickedIndex=void 0);i.clickedSlide=a,i.virtual&&i.params.virtual.enabled?i.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):i.clickedIndex=r,n.slideToClickedSlide&&void 0!==i.clickedIndex&&i.clickedIndex!==i.activeIndex&&i.slideToClickedSlide()}};var $R={getTranslate:function(e=(this.isHorizontal()?"x":"y")){var t=this,i=t.params,n=t.rtlTranslate,a=t.translate,r=t.wrapperEl;if(i.virtualTranslate)return n?-a:a;if(i.cssMode)return a;var o=cR(r,e);return o+=t.cssOverflowAdjustment(),n&&(o=-o),o||0},setTranslate:function(e,t){var i=this,n=i.rtlTranslate,a=i.params,r=i.wrapperEl,o=i.progress,s=0,u=0;i.isHorizontal()?s=n?-e:e:u=e,a.roundLengths&&(s=Math.floor(s),u=Math.floor(u)),i.previousTranslate=i.translate,i.translate=i.isHorizontal()?s:u,a.cssMode?r[i.isHorizontal()?"scrollLeft":"scrollTop"]=i.isHorizontal()?-s:-u:a.virtualTranslate||(i.isHorizontal()?s-=i.cssOverflowAdjustment():u-=i.cssOverflowAdjustment(),r.style.transform=`translate3d(${s}px, ${u}px, 0px)`);var l=i.maxTranslate()-i.minTranslate();(0===l?0:(e-i.minTranslate())/l)!==o&&i.updateProgress(e),i.emit("setTranslate",i.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e=0,t=this.params.speed,i=!0,n=!0,a){var r=this,o=r.params,s=r.wrapperEl;if(r.animating&&o.preventInteractionOnTransition)return!1;var u,l=r.minTranslate(),d=r.maxTranslate();if(u=n&&e>l?l:n&&e<d?d:e,r.updateProgress(u),o.cssMode){var h=r.isHorizontal();if(0===t)s[h?"scrollLeft":"scrollTop"]=-u;else{if(!r.support.smoothScroll)return gR({swiper:r,targetPosition:-u,side:h?"left":"top"}),!0;s.scrollTo({[h?"left":"top"]:-u,behavior:"smooth"})}return!0}return 0===t?(r.setTransition(0),r.setTranslate(u),i&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(u),i&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,i&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}};function NR({swiper:e,runCallbacks:t,direction:i,step:n}){var a=e.activeIndex,r=e.previousIndex,o=i;o||(o=a>r?"next":a<r?"prev":"reset"),e.emit(`transition${n}`),t&&"reset"===o?e.emit(`slideResetTransition${n}`):t&&a!==r&&(e.emit(`slideChangeTransition${n}`),"next"===o?e.emit(`slideNextTransition${n}`):e.emit(`slidePrevTransition${n}`))}var jR={slideTo:function(e=0,t,i=!0,n,a){"string"==typeof e&&(e=parseInt(e,10));var r=this,o=e;o<0&&(o=0);var s=r.params,u=r.snapGrid,l=r.slidesGrid,d=r.previousIndex,h=r.activeIndex,c=r.rtlTranslate,m=r.wrapperEl;if(!r.enabled&&!n&&!a||r.destroyed||r.animating&&s.preventInteractionOnTransition)return!1;void 0===t&&(t=r.params.speed);var f=Math.min(r.params.slidesPerGroupSkip,o),v=f+Math.floor((o-f)/r.params.slidesPerGroup);v>=u.length&&(v=u.length-1);var p,g=-u[v];if(s.normalizeSlideIndex)for(var y=0;y<l.length;y+=1){var b=-Math.floor(100*g),w=Math.floor(100*l[y]),k=Math.floor(100*l[y+1]);void 0!==l[y+1]?b>=w&&b<k-(k-w)/2?o=y:b>=w&&b<k&&(o=y+1):b>=w&&(o=y)}if(r.initialized&&o!==h){if(!r.allowSlideNext&&(c?g>r.translate&&g>r.minTranslate():g<r.translate&&g<r.minTranslate()))return!1;if(!r.allowSlidePrev&&g>r.translate&&g>r.maxTranslate()&&(h||0)!==o)return!1}o!==(d||0)&&i&&r.emit("beforeSlideChangeStart"),r.updateProgress(g),p=o>h?"next":o<h?"prev":"reset";var S=r.virtual&&r.params.virtual.enabled;if(!(S&&a)&&(c&&-g===r.translate||!c&&g===r.translate))return r.updateActiveIndex(o),s.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==s.effect&&r.setTranslate(g),"reset"!==p&&(r.transitionStart(i,p),r.transitionEnd(i,p)),!1;if(s.cssMode){var E=r.isHorizontal(),M=c?g:-g;if(0===t)S&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),S&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{m[E?"scrollLeft":"scrollTop"]=M})):m[E?"scrollLeft":"scrollTop"]=M,S&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return gR({swiper:r,targetPosition:M,side:E?"left":"top"}),!0;m.scrollTo({[E?"left":"top"]:M,behavior:"smooth"})}return!0}var T=CR().isSafari;return S&&!a&&T&&r.isElement&&r.virtual.update(!1,!1,o),r.setTransition(t),r.setTranslate(g),r.updateActiveIndex(o),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,n),r.transitionStart(i,p),0===t?r.transitionEnd(i,p):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(i,p))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e=0,t,i=!0,n){"string"==typeof e&&(e=parseInt(e,10));var a=this;if(!a.destroyed){void 0===t&&(t=a.params.speed);var r=a.grid&&a.params.grid&&a.params.grid.rows>1,o=e;if(a.params.loop)if(a.virtual&&a.params.virtual.enabled)o+=a.virtual.slidesBefore;else{var s;if(r){var u=o*a.params.grid.rows;s=a.slides.find(e=>1*e.getAttribute("data-swiper-slide-index")===u).column}else s=a.getSlideIndexByData(o);var l=r?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,d=a.params,h=d.centeredSlides,c=d.slidesOffsetBefore,m=d.slidesOffsetAfter,f=h||!!c||!!m,v=a.params.slidesPerView;"auto"===v?v=a.slidesPerViewDynamic():(v=Math.ceil(parseFloat(a.params.slidesPerView,10)),f&&v%2==0&&(v+=1));var p=l-s<v;if(f&&(p=p||s<Math.ceil(v/2)),n&&f&&"auto"!==a.params.slidesPerView&&!r&&(p=!1),p){var g=f?s<a.activeIndex?"prev":"next":s-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:g,slideTo:!0,activeSlideIndex:"next"===g?s+1:s-l+1,slideRealIndex:"next"===g?a.realIndex:void 0})}if(r){var y=o*a.params.grid.rows;o=a.slides.find(e=>1*e.getAttribute("data-swiper-slide-index")===y).column}else o=a.getSlideIndexByData(o)}return requestAnimationFrame(()=>{a.slideTo(o,t,i,n)}),a}},slideNext:function(e,t=!0,i){var n=this,a=n.enabled,r=n.params,o=n.animating;if(!a||n.destroyed)return n;void 0===e&&(e=n.params.speed);var s=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(s=Math.max(n.slidesPerViewDynamic("current",!0),1));var u=n.activeIndex<r.slidesPerGroupSkip?1:s,l=n.virtual&&r.virtual.enabled;if(r.loop){if(o&&!l&&r.loopPreventsSliding)return!1;if(n.loopFix({direction:"next"}),n._clientLeft=n.wrapperEl.clientLeft,n.activeIndex===n.slides.length-1&&r.cssMode)return requestAnimationFrame(()=>{n.slideTo(n.activeIndex+u,e,t,i)}),!0}return r.rewind&&n.isEnd?n.slideTo(0,e,t,i):n.slideTo(n.activeIndex+u,e,t,i)},slidePrev:function(e,t=!0,i){var n=this,a=n.params,r=n.snapGrid,o=n.slidesGrid,s=n.rtlTranslate,u=n.enabled,l=n.animating;if(!u||n.destroyed)return n;void 0===e&&(e=n.params.speed);var d=n.virtual&&a.virtual.enabled;if(a.loop){if(l&&!d&&a.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}function h(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var c,m=h(s?n.translate:-n.translate),f=r.map(e=>h(e)),v=a.freeMode&&a.freeMode.enabled,p=r[f.indexOf(m)-1];void 0===p&&(a.cssMode||v)&&(r.forEach((e,t)=>{m>=e&&(c=t)}),void 0!==c&&(p=v?r[c]:r[c>0?c-1:c]));var g=0;if(void 0!==p&&((g=o.indexOf(p))<0&&(g=n.activeIndex-1),"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(g=g-n.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),a.rewind&&n.isBeginning){var y=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(y,e,t,i)}return a.loop&&0===n.activeIndex&&a.cssMode?(requestAnimationFrame(()=>{n.slideTo(g,e,t,i)}),!0):n.slideTo(g,e,t,i)},slideReset:function(e,t=!0,i){var n=this;if(!n.destroyed)return void 0===e&&(e=n.params.speed),n.slideTo(n.activeIndex,e,t,i)},slideToClosest:function(e,t=!0,i,n=.5){var a=this;if(!a.destroyed){void 0===e&&(e=a.params.speed);var r=a.activeIndex,o=Math.min(a.params.slidesPerGroupSkip,r),s=o+Math.floor((r-o)/a.params.slidesPerGroup),u=a.rtlTranslate?a.translate:-a.translate;if(u>=a.snapGrid[s]){var l=a.snapGrid[s];u-l>(a.snapGrid[s+1]-l)*n&&(r+=a.params.slidesPerGroup)}else{var d=a.snapGrid[s-1];u-d<=(a.snapGrid[s]-d)*n&&(r-=a.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,a.slidesGrid.length-1),a.slideTo(r,e,t,i)}},slideToClickedSlide:function(){var e=this;if(!e.destroyed){var t,i=e.params,n=e.slidesEl,a="auto"===i.slidesPerView?e.slidesPerViewDynamic():i.slidesPerView,r=e.getSlideIndexWhenGrid(e.clickedIndex),o=e.isElement?"swiper-slide":`.${i.slideClass}`,s=e.grid&&e.params.grid&&e.params.grid.rows>1;if(i.loop){if(e.animating)return;t=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),i.centeredSlides?e.slideToLoop(t):r>(s?(e.slides.length-a)/2-(e.params.grid.rows-1):e.slides.length-a)?(e.loopFix(),r=e.getSlideIndex(bR(n,`${o}[data-swiper-slide-index="${t}"]`)[0]),dR(()=>{e.slideTo(r)})):e.slideTo(r)}else e.slideTo(r)}}};var BR={loopCreate:function(e,t){var i=this,n=i.params,a=i.slidesEl;if(!(!n.loop||i.virtual&&i.params.virtual.enabled)){var r,o=()=>{bR(a,`.${n.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})},s=i.grid&&n.grid&&n.grid.rows>1;n.loopAddBlankSlides&&(n.slidesPerGroup>1||s)&&((r=bR(a,`.${n.slideBlankClass}`)).forEach(e=>{e.remove()}),r.length>0&&(i.recalcSlides(),i.updateSlides()));var u=n.slidesPerGroup*(s?n.grid.rows:1),l=i.slides.length%u!==0,d=s&&i.slides.length%n.grid.rows!==0,h=e=>{for(var t=0;t<e;t+=1){var a=i.isElement?kR("swiper-slide",[n.slideBlankClass]):kR("div",[n.slideClass,n.slideBlankClass]);i.slidesEl.append(a)}};if(l){if(n.loopAddBlankSlides)h(u-i.slides.length%u),i.recalcSlides(),i.updateSlides();else wR("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else if(d){if(n.loopAddBlankSlides)h(n.grid.rows-i.slides.length%n.grid.rows),i.recalcSlides(),i.updateSlides();else wR("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else o();var c=n.centeredSlides||!!n.slidesOffsetBefore||!!n.slidesOffsetAfter;i.loopFix({slideRealIndex:e,direction:c?void 0:"next",initial:t})}},loopFix:function({slideRealIndex:e,slideTo:t=!0,direction:i,setTranslate:n,activeSlideIndex:a,initial:r,byController:o,byMousewheel:s}={}){var u=this;if(u.params.loop){u.emit("beforeLoopFix");var l=u.slides,d=u.allowSlidePrev,h=u.allowSlideNext,c=u.slidesEl,m=u.params,f=m.centeredSlides,v=m.slidesOffsetBefore,p=m.slidesOffsetAfter,g=m.initialSlide,y=f||!!v||!!p;if(u.allowSlidePrev=!0,u.allowSlideNext=!0,u.virtual&&m.virtual.enabled)return t&&(y||0!==u.snapIndex?y&&u.snapIndex<m.slidesPerView?u.slideTo(u.virtual.slides.length+u.snapIndex,0,!1,!0):u.snapIndex===u.snapGrid.length-1&&u.slideTo(u.virtual.slidesBefore,0,!1,!0):u.slideTo(u.virtual.slides.length,0,!1,!0)),u.allowSlidePrev=d,u.allowSlideNext=h,void u.emit("loopFix");var b=m.slidesPerView;"auto"===b?b=u.slidesPerViewDynamic():(b=Math.ceil(parseFloat(m.slidesPerView,10)),y&&b%2==0&&(b+=1));var w=m.slidesPerGroupAuto?b:m.slidesPerGroup,k=y?Math.max(w,Math.ceil(b/2)):w;k%w!==0&&(k+=w-k%w),k+=m.loopAdditionalSlides,u.loopedSlides=k;var S=u.grid&&m.grid&&m.grid.rows>1;l.length<b+k||"cards"===u.params.effect&&l.length<b+2*k?wR("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):S&&"row"===m.grid.fill&&wR("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");var E=[],M=[],T=S?Math.ceil(l.length/m.grid.rows):l.length,P=r&&T-g<b&&!y,A=P?g:u.activeIndex;void 0===a?a=u.getSlideIndex(l.find(e=>e.classList.contains(m.slideActiveClass))):A=a;var D="next"===i||!i,x="prev"===i||!i,C=0,I=0,L=(S?l[a].column:a)+(y&&void 0===n?-b/2+.5:0);if(L<k){C=Math.max(k-L,w);for(var _=0;_<k-L;_+=1){var R=_-Math.floor(_/T)*T;if(S)for(var F=T-R-1,W=l.length-1;W>=0;W-=1)l[W].column===F&&E.push(W);else E.push(T-R-1)}}else if(L+b>T-k){I=Math.max(L-(T-2*k),w),P&&(I=Math.max(I,b-T+g+1));for(var O=function(){var e=$-Math.floor($/T)*T;S?l.forEach((t,i)=>{t.column===e&&M.push(i)}):M.push(e)},$=0;$<I;$+=1)O()}if(u.__preventObserver__=!0,requestAnimationFrame(()=>{u.__preventObserver__=!1}),"cards"===u.params.effect&&l.length<b+2*k&&(M.includes(a)&&M.splice(M.indexOf(a),1),E.includes(a)&&E.splice(E.indexOf(a),1)),x&&E.forEach(e=>{l[e].swiperLoopMoveDOM=!0,c.prepend(l[e]),l[e].swiperLoopMoveDOM=!1}),D&&M.forEach(e=>{l[e].swiperLoopMoveDOM=!0,c.append(l[e]),l[e].swiperLoopMoveDOM=!1}),u.recalcSlides(),"auto"===m.slidesPerView?u.updateSlides():S&&(E.length>0&&x||M.length>0&&D)&&u.slides.forEach((e,t)=>{u.grid.updateSlide(t,e,u.slides)}),m.watchSlidesProgress&&u.updateSlidesOffset(),t)if(E.length>0&&x){if(void 0===e){var N=u.slidesGrid[A],j=u.slidesGrid[A+C]-N;s?u.setTranslate(u.translate-j):(u.slideTo(A+Math.ceil(C),0,!1,!0),n&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-j,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-j))}else if(n){var B=S?E.length/m.grid.rows:E.length;u.slideTo(u.activeIndex+B,0,!1,!0),u.touchEventsData.currentTranslate=u.translate}}else if(M.length>0&&D)if(void 0===e){var z=u.slidesGrid[A],U=u.slidesGrid[A-I]-z;s?u.setTranslate(u.translate-U):(u.slideTo(A-I,0,!1,!0),n&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-U,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-U))}else{var H=S?M.length/m.grid.rows:M.length;u.slideTo(u.activeIndex-H,0,!1,!0)}if(u.allowSlidePrev=d,u.allowSlideNext=h,u.controller&&u.controller.control&&!o){var G={slideRealIndex:e,direction:i,setTranslate:n,activeSlideIndex:a,byController:!0};Array.isArray(u.controller.control)?u.controller.control.forEach(e=>{!e.destroyed&&e.params.loop&&e.loopFix(ie({},G,{slideTo:e.params.slidesPerView===m.slidesPerView&&t}))}):u.controller.control instanceof u.constructor&&u.controller.control.params.loop&&u.controller.control.loopFix(ie({},G,{slideTo:u.controller.control.params.slidesPerView===m.slidesPerView&&t}))}u.emit("loopFix")}},loopDestroy:function(){var e=this,t=e.params,i=e.slidesEl;if(t.loop&&i&&(!e.virtual||!e.params.virtual.enabled)){e.recalcSlides();var n=[];e.slides.forEach(e=>{var t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;n[t]=e}),e.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),n.forEach(e=>{i.append(e)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}}};var zR={setGrabCursor:function(e){var t=this;if(!(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)){var i="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),i.style.cursor="move",i.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}},unsetGrabCursor:function(){var e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}};function UR(e,t,i){var n=lR(),a=e.params,r=a.edgeSwipeDetection,o=a.edgeSwipeThreshold;return!r||!(i<=o||i>=n.innerWidth-o)||"prevent"===r&&(t.preventDefault(),!0)}function HR(e){var t=this,i=aR(),n=e;n.originalEvent&&(n=n.originalEvent);var a=t.touchEventsData;if("pointerdown"===n.type){if(null!==a.pointerId&&a.pointerId!==n.pointerId)return;a.pointerId=n.pointerId}else"touchstart"===n.type&&1===n.targetTouches.length&&(a.touchId=n.targetTouches[0].identifier);if("touchstart"!==n.type){var r=t.params,o=t.touches;if(t.enabled&&(r.simulateTouch||"mouse"!==n.pointerType)&&(!t.animating||!r.preventInteractionOnTransition)){!t.animating&&r.cssMode&&r.loop&&t.loopFix();var s=n.target;if(("wrapper"!==r.touchEventsTarget||function(e,t){var i=lR(),n=t.contains(e);return!n&&i.HTMLSlotElement&&t instanceof HTMLSlotElement&&((n=[...t.assignedElements()].includes(e))||(n=function(e,t){for(var i=[t];i.length>0;){var n=i.shift();if(e===n)return!0;i.push(...n.children,...n.shadowRoot?n.shadowRoot.children:[],...n.assignedElements?n.assignedElements():[])}}(e,t))),n}(s,t.wrapperEl))&&!("which"in n&&3===n.which||"button"in n&&n.button>0||a.isTouched&&a.isMoved)){var u=!!r.noSwipingClass&&""!==r.noSwipingClass,l=n.composedPath?n.composedPath():n.path;u&&n.target&&n.target.shadowRoot&&l&&(s=l[0]);var d=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,h=!(!n.target||!n.target.shadowRoot);if(r.noSwiping&&(h?function(e,t=this){return function t(i){if(!i||i===aR()||i===lR())return null;i.assignedSlot&&(i=i.assignedSlot);var n=i.closest(e);return n||i.getRootNode?n||t(i.getRootNode().host):null}(t)}(d,s):s.closest(d)))t.allowClick=!0;else if(!r.swipeHandler||s.closest(r.swipeHandler)){o.currentX=n.pageX,o.currentY=n.pageY;var c=o.currentX,m=o.currentY;if(UR(t,n,c)){Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=c,o.startY=m,a.touchStartTime=hR(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(a.allowThresholdMove=!1);var f=!0;s.matches(a.focusableElements)&&(f=!1,"SELECT"===s.nodeName&&(a.isTouched=!1)),i.activeElement&&i.activeElement.matches(a.focusableElements)&&i.activeElement!==s&&("mouse"===n.pointerType||"mouse"!==n.pointerType&&!s.matches(a.focusableElements))&&i.activeElement.blur();var v=f&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!v||s.isContentEditable||n.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",n)}}}}}else UR(t,n,n.targetTouches[0].pageX)}function GR(e){var t=aR(),i=this,n=i.touchEventsData,a=i.params,r=i.touches,o=i.rtlTranslate;if(i.enabled&&(a.simulateTouch||"mouse"!==e.pointerType)){var s,u=e;if(u.originalEvent&&(u=u.originalEvent),"pointermove"===u.type){if(null!==n.touchId)return;if(u.pointerId!==n.pointerId)return}if("touchmove"===u.type){if(s=[...u.changedTouches].find(e=>e.identifier===n.touchId),!s||s.identifier!==n.touchId)return}else s=u;if(n.isTouched){var l=s.pageX,d=s.pageY;if(u.preventedByNestedSwiper)return r.startX=l,void(r.startY=d);if(!i.allowTouchMove)return u.target.matches(n.focusableElements)||(i.allowClick=!1),void(n.isTouched&&(Object.assign(r,{startX:l,startY:d,currentX:l,currentY:d}),n.touchStartTime=hR()));if(a.touchReleaseOnEdges&&!a.loop)if(i.isVertical()){if(d<r.startY&&i.translate<=i.maxTranslate()||d>r.startY&&i.translate>=i.minTranslate())return n.isTouched=!1,void(n.isMoved=!1)}else{if(o&&(l>r.startX&&-i.translate<=i.maxTranslate()||l<r.startX&&-i.translate>=i.minTranslate()))return;if(!o&&(l<r.startX&&i.translate<=i.maxTranslate()||l>r.startX&&i.translate>=i.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(n.focusableElements)&&t.activeElement!==u.target&&"mouse"!==u.pointerType&&t.activeElement.blur(),t.activeElement&&u.target===t.activeElement&&u.target.matches(n.focusableElements))return n.isMoved=!0,void(i.allowClick=!1);n.allowTouchCallbacks&&i.emit("touchMove",u),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=l,r.currentY=d;var h=r.currentX-r.startX,c=r.currentY-r.startY;if(!(i.params.threshold&&Math.sqrt(h**2+c**2)<i.params.threshold)){var m;if(void 0===n.isScrolling)i.isHorizontal()&&r.currentY===r.startY||i.isVertical()&&r.currentX===r.startX?n.isScrolling=!1:h*h+c*c>=25&&(m=180*Math.atan2(Math.abs(c),Math.abs(h))/Math.PI,n.isScrolling=i.isHorizontal()?m>a.touchAngle:90-m>a.touchAngle);if(n.isScrolling&&i.emit("touchMoveOpposite",u),void 0===n.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(n.startMoving=!0)),n.isScrolling||"touchmove"===u.type&&n.preventTouchMoveFromPointerMove)n.isTouched=!1;else if(n.startMoving){i.allowClick=!1,!a.cssMode&&u.cancelable&&u.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&u.stopPropagation();var f=i.isHorizontal()?h:c,v=i.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;a.oneWayMovement&&(f=Math.abs(f)*(o?1:-1),v=Math.abs(v)*(o?1:-1)),r.diff=f,f*=a.touchRatio,o&&(f=-f,v=-v);var p=i.touchesDirection;i.swipeDirection=f>0?"prev":"next",i.touchesDirection=v>0?"prev":"next";var g=i.params.loop&&!a.cssMode,y="next"===i.touchesDirection&&i.allowSlideNext||"prev"===i.touchesDirection&&i.allowSlidePrev;if(!n.isMoved){if(g&&y&&i.loopFix({direction:i.swipeDirection}),n.startTranslate=i.getTranslate(),i.setTransition(0),i.animating){var b=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});i.wrapperEl.dispatchEvent(b)}n.allowMomentumBounce=!1,!a.grabCursor||!0!==i.allowSlideNext&&!0!==i.allowSlidePrev||i.setGrabCursor(!0),i.emit("sliderFirstMove",u)}if((new Date).getTime(),!1!==a._loopSwapReset&&n.isMoved&&n.allowThresholdMove&&p!==i.touchesDirection&&g&&y&&Math.abs(f)>=1)return Object.assign(r,{startX:l,startY:d,currentX:l,currentY:d,startTranslate:n.currentTranslate}),n.loopSwapReset=!0,void(n.startTranslate=n.currentTranslate);i.emit("sliderMove",u),n.isMoved=!0,n.currentTranslate=f+n.startTranslate;var w=!0,k=a.resistanceRatio;if(a.touchReleaseOnEdges&&(k=0),f>0?(g&&y&&n.allowThresholdMove&&n.currentTranslate>(a.centeredSlides?i.minTranslate()-i.slidesSizesGrid[i.activeIndex+1]-("auto"!==a.slidesPerView&&i.slides.length-a.slidesPerView>=2?i.slidesSizesGrid[i.activeIndex+1]+i.params.spaceBetween:0)-i.params.spaceBetween:i.minTranslate())&&i.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),n.currentTranslate>i.minTranslate()&&(w=!1,a.resistance&&(n.currentTranslate=i.minTranslate()-1+(-i.minTranslate()+n.startTranslate+f)**k))):f<0&&(g&&y&&n.allowThresholdMove&&n.currentTranslate<(a.centeredSlides?i.maxTranslate()+i.slidesSizesGrid[i.slidesSizesGrid.length-1]+i.params.spaceBetween+("auto"!==a.slidesPerView&&i.slides.length-a.slidesPerView>=2?i.slidesSizesGrid[i.slidesSizesGrid.length-1]+i.params.spaceBetween:0):i.maxTranslate())&&i.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:i.slides.length-("auto"===a.slidesPerView?i.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),n.currentTranslate<i.maxTranslate()&&(w=!1,a.resistance&&(n.currentTranslate=i.maxTranslate()+1-(i.maxTranslate()-n.startTranslate-f)**k))),w&&(u.preventedByNestedSwiper=!0),!i.allowSlideNext&&"next"===i.swipeDirection&&n.currentTranslate<n.startTranslate&&(n.currentTranslate=n.startTranslate),!i.allowSlidePrev&&"prev"===i.swipeDirection&&n.currentTranslate>n.startTranslate&&(n.currentTranslate=n.startTranslate),i.allowSlidePrev||i.allowSlideNext||(n.currentTranslate=n.startTranslate),a.threshold>0){if(!(Math.abs(f)>a.threshold||n.allowThresholdMove))return void(n.currentTranslate=n.startTranslate);if(!n.allowThresholdMove)return n.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,n.currentTranslate=n.startTranslate,void(r.diff=i.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}a.followFinger&&!a.cssMode&&((a.freeMode&&a.freeMode.enabled&&i.freeMode||a.watchSlidesProgress)&&(i.updateActiveIndex(),i.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&i.freeMode&&i.freeMode.onTouchMove(),i.updateProgress(n.currentTranslate),i.setTranslate(n.currentTranslate))}}}else n.startMoving&&n.isScrolling&&i.emit("touchMoveOpposite",u)}}function VR(e){var t,i=this,n=i.touchEventsData,a=e;if(a.originalEvent&&(a=a.originalEvent),"touchend"===a.type||"touchcancel"===a.type){if(t=[...a.changedTouches].find(e=>e.identifier===n.touchId),!t||t.identifier!==n.touchId)return}else{if(null!==n.touchId)return;if(a.pointerId!==n.pointerId)return;t=a}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(a.type)&&!(["pointercancel","contextmenu"].includes(a.type)&&(i.browser.isSafari||i.browser.isWebView)))return;n.pointerId=null,n.touchId=null;var r=i.params,o=i.touches,s=i.rtlTranslate,u=i.slidesGrid;if(i.enabled&&(r.simulateTouch||"mouse"!==a.pointerType)){if(n.allowTouchCallbacks&&i.emit("touchEnd",a),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&r.grabCursor&&i.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);r.grabCursor&&n.isMoved&&n.isTouched&&(!0===i.allowSlideNext||!0===i.allowSlidePrev)&&i.setGrabCursor(!1);var l,d=hR(),h=d-n.touchStartTime;if(i.allowClick){var c=a.path||a.composedPath&&a.composedPath();i.updateClickedSlide(c&&c[0]||a.target,c),i.emit("tap click",a),h<300&&d-n.lastClickTime<300&&i.emit("doubleTap doubleClick",a)}if(n.lastClickTime=hR(),dR(()=>{i.destroyed||(i.allowClick=!0)}),!n.isTouched||!n.isMoved||!i.swipeDirection||0===o.diff&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,l=r.followFinger?s?i.translate:-i.translate:-n.currentTranslate,!r.cssMode)if(r.freeMode&&r.freeMode.enabled)i.freeMode.onTouchEnd({currentPos:l});else{for(var m=l>=-i.maxTranslate()&&!i.params.loop,f=0,v=i.slidesSizesGrid[0],p=0;p<u.length;p+=p<r.slidesPerGroupSkip?1:r.slidesPerGroup){var g=p<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==u[p+g]?(m||l>=u[p]&&l<u[p+g])&&(f=p,v=u[p+g]-u[p]):(m||l>=u[p])&&(f=p,v=u[u.length-1]-u[u.length-2])}var y=null,b=null;r.rewind&&(i.isBeginning?b=r.virtual&&r.virtual.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1:i.isEnd&&(y=0));var w=(l-u[f])/v,k=f<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(h>r.longSwipesMs){if(!r.longSwipes)return void i.slideTo(i.activeIndex);"next"===i.swipeDirection&&(w>=r.longSwipesRatio?i.slideTo(r.rewind&&i.isEnd?y:f+k):i.slideTo(f)),"prev"===i.swipeDirection&&(w>1-r.longSwipesRatio?i.slideTo(f+k):null!==b&&w<0&&Math.abs(w)>r.longSwipesRatio?i.slideTo(b):i.slideTo(f))}else{if(!r.shortSwipes)return void i.slideTo(i.activeIndex);i.navigation&&(a.target===i.navigation.nextEl||a.target===i.navigation.prevEl)?a.target===i.navigation.nextEl?i.slideTo(f+k):i.slideTo(f):("next"===i.swipeDirection&&i.slideTo(null!==y?y:f+k),"prev"===i.swipeDirection&&i.slideTo(null!==b?b:f))}}}}function KR(){var e=this,t=e.params,i=e.el;if(!i||0!==i.offsetWidth){t.breakpoints&&e.setBreakpoint();var n=e.allowSlideNext,a=e.allowSlidePrev,r=e.snapGrid,o=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();var s=o&&t.loop;if(!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||s)e.params.loop&&!o?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);else{var u=o?e.virtual.slides:e.slides;e.slideTo(u.length-1,0,!1,!0)}e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=a,e.allowSlideNext=n,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}}function XR(e){var t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function YR(){var e=this,t=e.wrapperEl,i=e.rtlTranslate;if(e.enabled){e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();var n=e.maxTranslate()-e.minTranslate();(0===n?0:(e.translate-e.minTranslate())/n)!==e.progress&&e.updateProgress(i?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}}function qR(e){var t=this;RR(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function JR(){var e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}var QR=(e,t)=>{var i=aR(),n=e.params,a=e.el,r=e.wrapperEl,o=e.device,s=!!n.nested,u="on"===t?"addEventListener":"removeEventListener",l=t;a&&"string"!=typeof a&&(i[u]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:s}),a[u]("touchstart",e.onTouchStart,{passive:!1}),a[u]("pointerdown",e.onTouchStart,{passive:!1}),i[u]("touchmove",e.onTouchMove,{passive:!1,capture:s}),i[u]("pointermove",e.onTouchMove,{passive:!1,capture:s}),i[u]("touchend",e.onTouchEnd,{passive:!0}),i[u]("pointerup",e.onTouchEnd,{passive:!0}),i[u]("pointercancel",e.onTouchEnd,{passive:!0}),i[u]("touchcancel",e.onTouchEnd,{passive:!0}),i[u]("pointerout",e.onTouchEnd,{passive:!0}),i[u]("pointerleave",e.onTouchEnd,{passive:!0}),i[u]("contextmenu",e.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&a[u]("click",e.onClick,!0),n.cssMode&&r[u]("scroll",e.onScroll),n.updateOnWindowResize?e[l](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",KR,!0):e[l]("observerUpdate",KR,!0),a[u]("load",e.onLoad,{capture:!0}))};var ZR=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var eF={setBreakpoint:function(){var e=this,t=e.realIndex,i=e.initialized,n=e.params,a=e.el,r=n.breakpoints;if(r&&(!r||0!==Object.keys(r).length)){var o=aR(),s="window"!==n.breakpointsBase&&n.breakpointsBase?"container":n.breakpointsBase,u=["window","container"].includes(n.breakpointsBase)||!n.breakpointsBase?e.el:o.querySelector(n.breakpointsBase),l=e.getBreakpoint(r,s,u);if(l&&e.currentBreakpoint!==l){var d=(l in r?r[l]:void 0)||e.originalParams,h=ZR(e,n),c=ZR(e,d),m=e.params.grabCursor,f=d.grabCursor,v=n.enabled;h&&!c?(a.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),e.emitContainerClasses()):!h&&c&&(a.classList.add(`${n.containerModifierClass}grid`),(d.grid.fill&&"column"===d.grid.fill||!d.grid.fill&&"column"===n.grid.fill)&&a.classList.add(`${n.containerModifierClass}grid-column`),e.emitContainerClasses()),m&&!f?e.unsetGrabCursor():!m&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(t=>{if(void 0!==d[t]){var i=n[t]&&n[t].enabled,a=d[t]&&d[t].enabled;i&&!a&&e[t].disable(),!i&&a&&e[t].enable()}});var p=d.direction&&d.direction!==n.direction,g=n.loop&&(d.slidesPerView!==n.slidesPerView||p),y=n.loop;p&&i&&e.changeDirection(),vR(e.params,d);var b=e.params.enabled,w=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),v&&!b?e.disable():!v&&b&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",d),i&&(g?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!y&&w?(e.loopCreate(t),e.updateSlides()):y&&!w&&e.loopDestroy()),e.emit("breakpoint",d)}}},getBreakpoint:function(e,t="window",i){if(e&&("container"!==t||i)){var n=!1,a=lR(),r="window"===t?a.innerHeight:i.clientHeight,o=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){var t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}});o.sort((e,t)=>parseInt(e.value,10)-parseInt(t.value,10));for(var s=0;s<o.length;s+=1){var u=o[s],l=u.point,d=u.value;"window"===t?a.matchMedia(`(min-width: ${d}px)`).matches&&(n=l):d<=i.clientWidth&&(n=l)}return n||"max"}}};var tF={addClasses:function(){var e,t,i,n=this,a=n.classNames,r=n.params,o=n.rtl,s=n.el,u=n.device,l=(e=["initialized",r.direction,{"free-mode":n.params.freeMode&&r.freeMode.enabled},{autoheight:r.autoHeight},{rtl:o},{grid:r.grid&&r.grid.rows>1},{"grid-column":r.grid&&r.grid.rows>1&&"column"===r.grid.fill},{android:u.android},{ios:u.ios},{"css-mode":r.cssMode},{centered:r.cssMode&&r.centeredSlides},{"watch-progress":r.watchSlidesProgress}],t=r.containerModifierClass,i=[],e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(n=>{e[n]&&i.push(t+n)}):"string"==typeof e&&i.push(t+e)}),i);a.push(...l),s.classList.add(...a),n.emitContainerClasses()},removeClasses:function(){var e=this,t=e.el,i=e.classNames;t&&"string"!=typeof t&&(t.classList.remove(...i),e.emitContainerClasses())}};var iF={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function nF(e,t){return function(i={}){var n=Object.keys(i)[0],a=i[n];"object"==typeof a&&null!==a?(!0===e[n]&&(e[n]={enabled:!0}),"navigation"===n&&e[n]&&e[n].enabled&&!e[n].prevEl&&!e[n].nextEl&&(e[n].auto=!0),["pagination","scrollbar"].indexOf(n)>=0&&e[n]&&e[n].enabled&&!e[n].el&&(e[n].auto=!0),n in e&&"enabled"in a?("object"!=typeof e[n]||"enabled"in e[n]||(e[n].enabled=!0),e[n]||(e[n]={enabled:!1}),vR(t,i)):vR(t,i)):vR(t,i)}}var aF={eventsEmitter:IR,update:OR,translate:$R,transition:{setTransition:function(e,t){var i=this;i.params.cssMode||(i.wrapperEl.style.transitionDuration=`${e}ms`,i.wrapperEl.style.transitionDelay=0===e?"0ms":""),i.emit("setTransition",e,t)},transitionStart:function(e=!0,t){var i=this,n=i.params;n.cssMode||(n.autoHeight&&i.updateAutoHeight(),NR({swiper:i,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e=!0,t){var i=this,n=i.params;i.animating=!1,n.cssMode||(i.setTransition(0),NR({swiper:i,runCallbacks:e,direction:t,step:"End"}))}},slide:jR,loop:BR,grabCursor:zR,events:{attachEvents:function(){var e=this,t=e.params;e.onTouchStart=HR.bind(e),e.onTouchMove=GR.bind(e),e.onTouchEnd=VR.bind(e),e.onDocumentTouchStart=JR.bind(e),t.cssMode&&(e.onScroll=YR.bind(e)),e.onClick=XR.bind(e),e.onLoad=qR.bind(e),QR(e,"on")},detachEvents:function(){QR(this,"off")}},breakpoints:eF,checkOverflow:{checkOverflow:function(){var e=this,t=e.isLocked,i=e.params,n=i.slidesOffsetBefore;if(n){var a=e.slides.length-1,r=e.slidesGrid[a]+e.slidesSizesGrid[a]+2*n;e.isLocked=e.size>r}else e.isLocked=1===e.snapGrid.length;!0===i.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===i.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:tF},rF={},oF=function(){function e(...t){var i,n;Y(this,e),1===t.length&&t[0].constructor&&"Object"===Object.prototype.toString.call(t[0]).slice(8,-1)?n=t[0]:(i=t[0],n=t[1]),n||(n={}),n=vR({},n),i&&!n.el&&(n.el=i);var a=aR();if(n.el&&"string"==typeof n.el&&a.querySelectorAll(n.el).length>1){var r=[];return a.querySelectorAll(n.el).forEach(t=>{var i=vR({},n,{el:t});r.push(new e(i))}),r}var o=this;o.__swiper__=!0,o.support=DR(),o.device=xR({userAgent:n.userAgent}),o.browser=CR(),o.eventsListeners={},o.eventsAnyListeners=[],o.modules=[...o.__modules__],n.modules&&Array.isArray(n.modules)&&n.modules.forEach(e=>{"function"==typeof e&&o.modules.indexOf(e)<0&&o.modules.push(e)});var s={};o.modules.forEach(e=>{e({params:n,swiper:o,extendParams:nF(n,s),on:o.on.bind(o),once:o.once.bind(o),off:o.off.bind(o),emit:o.emit.bind(o)})});var u=vR({},iF,s);return o.params=vR({},u,rF,n),o.originalParams=vR({},o.params),o.passedParams=vR({},n),o.params&&o.params.on&&Object.keys(o.params.on).forEach(e=>{o.on(e,o.params.on[e])}),o.params&&o.params.onAny&&o.onAny(o.params.onAny),Object.assign(o,{enabled:o.params.enabled,el:i,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===o.params.direction,isVertical:()=>"vertical"===o.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:o.params.allowSlideNext,allowSlidePrev:o.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:o.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:o.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),o.emit("_swiper"),o.params.init&&o.init(),o}return ee(e,[{key:"getDirectionLabel",value:function(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}},{key:"getSlideIndex",value:function(e){var t=ER(bR(this.slidesEl,`.${this.params.slideClass}, swiper-slide`)[0]);return ER(e)-t}},{key:"getSlideIndexByData",value:function(e){return this.getSlideIndex(this.slides.find(t=>1*t.getAttribute("data-swiper-slide-index")===e))}},{key:"getSlideIndexWhenGrid",value:function(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&("column"===this.params.grid.fill?e=Math.floor(e/this.params.grid.rows):"row"===this.params.grid.fill&&(e%=Math.ceil(this.slides.length/this.params.grid.rows))),e}},{key:"recalcSlides",value:function(){var e=this,t=e.slidesEl,i=e.params;e.slides=bR(t,`.${i.slideClass}, swiper-slide`)}},{key:"enable",value:function(){var e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}},{key:"disable",value:function(){var e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}},{key:"setProgress",value:function(e,t){var i=this;e=Math.min(Math.max(e,0),1);var n=i.minTranslate(),a=(i.maxTranslate()-n)*e+n;i.translateTo(a,void 0===t?0:t),i.updateActiveIndex(),i.updateSlidesClasses()}},{key:"emitContainerClasses",value:function(){var e=this;if(e.params._emitClasses&&e.el){var t=e.el.className.split(" ").filter(t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass));e.emit("_containerClasses",t.join(" "))}}},{key:"getSlideClasses",value:function(e){var t=this;return t.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)).join(" ")}},{key:"emitSlidesClasses",value:function(){var e=this;if(e.params._emitClasses&&e.el){var t=[];e.slides.forEach(i=>{var n=e.getSlideClasses(i);t.push({slideEl:i,classNames:n}),e.emit("_slideClass",i,n)}),e.emit("_slideClasses",t)}}},{key:"slidesPerViewDynamic",value:function(e="current",t=!1){var i=this,n=i.params,a=i.slides,r=i.slidesGrid,o=i.slidesSizesGrid,s=i.size,u=i.activeIndex,l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(n.centeredSlides){for(var d,h=a[u]?Math.ceil(a[u].swiperSlideSize):0,c=u+1;c<a.length;c+=1)a[c]&&!d&&(l+=1,(h+=Math.ceil(a[c].swiperSlideSize))>s&&(d=!0));for(var m=u-1;m>=0;m-=1)a[m]&&!d&&(l+=1,(h+=a[m].swiperSlideSize)>s&&(d=!0))}else if("current"===e)for(var f=u+1;f<a.length;f+=1){(t?r[f]+o[f]-r[u]<s:r[f]-r[u]<s)&&(l+=1)}else for(var v=u-1;v>=0;v-=1){r[u]-r[v]<s&&(l+=1)}return l}},{key:"update",value:function(){var e=this;if(e&&!e.destroyed){var t,i=e.snapGrid,n=e.params;if(n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach(t=>{t.complete&&RR(e,t)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)r(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){var a=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;t=e.slideTo(a.length-1,0,!1,!0)}else t=e.slideTo(e.activeIndex,0,!1,!0);t||r()}n.watchOverflow&&i!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function r(){var t=e.rtlTranslate?-1*e.translate:e.translate,i=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(i),e.updateActiveIndex(),e.updateSlidesClasses()}}},{key:"changeDirection",value:function(e,t=!0){var i=this,n=i.params.direction;return e||(e="horizontal"===n?"vertical":"horizontal"),e===n||"horizontal"!==e&&"vertical"!==e||(i.el.classList.remove(`${i.params.containerModifierClass}${n}`),i.el.classList.add(`${i.params.containerModifierClass}${e}`),i.emitContainerClasses(),i.params.direction=e,i.slides.forEach(t=>{"vertical"===e?t.style.width="":t.style.height=""}),i.emit("changeDirection"),t&&i.update()),i}},{key:"changeLanguageDirection",value:function(e){var t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}},{key:"mount",value:function(e){var t=this;if(t.mounted)return!0;var i=e||t.params.el;if("string"==typeof i&&(i=document.querySelector(i)),!i)return!1;i.swiper=t,i.parentNode&&i.parentNode.host&&i.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);var n=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`,a=i&&i.shadowRoot&&i.shadowRoot.querySelector?i.shadowRoot.querySelector(n()):bR(i,n())[0];return!a&&t.params.createElements&&(a=kR("div",t.params.wrapperClass),i.append(a),bR(i,`.${t.params.slideClass}`).forEach(e=>{a.append(e)})),Object.assign(t,{el:i,wrapperEl:a,slidesEl:t.isElement&&!i.parentNode.host.slideSlots?i.parentNode.host:a,hostEl:t.isElement?i.parentNode.host:i,mounted:!0,rtl:"rtl"===i.dir.toLowerCase()||"rtl"===SR(i,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===i.dir.toLowerCase()||"rtl"===SR(i,"direction")),wrongRTL:"-webkit-box"===SR(a,"display")}),!0}},{key:"init",value:function(e){var t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();var i=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&i.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(e=>{e.complete?RR(t,e):e.addEventListener("load",e=>{RR(t,e.target)})}),WR(t),t.initialized=!0,WR(t),t.emit("init"),t.emit("afterInit"),t}},{key:"destroy",value:function(e=!0,t=!0){var i=this,n=i.params,a=i.el,r=i.wrapperEl,o=i.slides;return void 0===i.params||i.destroyed||(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),n.loop&&i.loopDestroy(),t&&(i.removeClasses(),a&&"string"!=typeof a&&a.removeAttribute("style"),r&&r.removeAttribute("style"),o&&o.length&&o.forEach(e=>{e.classList.remove(n.slideVisibleClass,n.slideFullyVisibleClass,n.slideActiveClass,n.slideNextClass,n.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")})),i.emit("destroy"),Object.keys(i.eventsListeners).forEach(e=>{i.off(e)}),!1!==e&&(i.el&&"string"!=typeof i.el&&(i.el.swiper=null),function(e){var t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})}(i)),i.destroyed=!0),null}}],[{key:"extendDefaults",value:function(e){vR(rF,e)}},{key:"extendedDefaults",get:function(){return rF}},{key:"defaults",get:function(){return iF}},{key:"installModule",value:function(t){e.prototype.__modules__||(e.prototype.__modules__=[]);var i=e.prototype.__modules__;"function"==typeof t&&i.indexOf(t)<0&&i.push(t)}},{key:"use",value:function(t){return Array.isArray(t)?(t.forEach(t=>e.installModule(t)),e):(e.installModule(t),e)}}])}();function sF(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function uF({swiper:e,extendParams:t,on:i,emit:n}){var a,r="swiper-pagination";t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),e.pagination={el:null,bullets:[]};var o=0;function s(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&0===e.pagination.el.length}function u(t,i){var n=e.params.pagination.bulletActiveClass;t&&(t=t[("prev"===i?"previous":"next")+"ElementSibling"])&&(t.classList.add(`${n}-${i}`),(t=t[("prev"===i?"previous":"next")+"ElementSibling"])&&t.classList.add(`${n}-${i}-${i}`))}function l(t){var i=t.target.closest(sF(e.params.pagination.bulletClass));if(i){t.preventDefault();var n,a,r,o=ER(i)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===o)return;var s=(n=e.realIndex,a=o,r=e.slides.length,(a%=r)===1+(n%=r)?"next":a===n-1?"previous":void 0);"next"===s?e.slideNext():"previous"===s?e.slidePrev():e.slideToLoop(o)}else e.slideTo(o)}}function d(){var t=e.rtl,i=e.params.pagination;if(!s()){var r,l,d=e.pagination.el;d=PR(d);var h=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,c=e.params.loop?Math.ceil(h/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(l=e.previousRealIndex||0,r=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):void 0!==e.snapIndex?(r=e.snapIndex,l=e.previousSnapIndex):(l=e.previousIndex||0,r=e.activeIndex||0),"bullets"===i.type&&e.pagination.bullets&&e.pagination.bullets.length>0){var m,f,v,p=e.pagination.bullets;if(i.dynamicBullets&&(a=TR(p[0],e.isHorizontal()?"width":"height"),d.forEach(t=>{t.style[e.isHorizontal()?"width":"height"]=a*(i.dynamicMainBullets+4)+"px"}),i.dynamicMainBullets>1&&void 0!==l&&((o+=r-(l||0))>i.dynamicMainBullets-1?o=i.dynamicMainBullets-1:o<0&&(o=0)),m=Math.max(r-o,0),v=((f=m+(Math.min(p.length,i.dynamicMainBullets)-1))+m)/2),p.forEach(e=>{var t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(e=>`${i.bulletActiveClass}${e}`)].map(e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e).flat();e.classList.remove(...t)}),d.length>1)p.forEach(t=>{var n=ER(t);n===r?t.classList.add(...i.bulletActiveClass.split(" ")):e.isElement&&t.setAttribute("part","bullet"),i.dynamicBullets&&(n>=m&&n<=f&&t.classList.add(...`${i.bulletActiveClass}-main`.split(" ")),n===m&&u(t,"prev"),n===f&&u(t,"next"))});else{var g=p[r];if(g&&g.classList.add(...i.bulletActiveClass.split(" ")),e.isElement&&p.forEach((e,t)=>{e.setAttribute("part",t===r?"bullet-active":"bullet")}),i.dynamicBullets){for(var y=p[m],b=p[f],w=m;w<=f;w+=1)p[w]&&p[w].classList.add(...`${i.bulletActiveClass}-main`.split(" "));u(y,"prev"),u(b,"next")}}if(i.dynamicBullets){var k=Math.min(p.length,i.dynamicMainBullets+4),S=(a*k-a)/2-v*a,E=t?"right":"left";p.forEach(t=>{t.style[e.isHorizontal()?E:"top"]=`${S}px`})}}d.forEach((t,a)=>{if("fraction"===i.type&&(t.querySelectorAll(sF(i.currentClass)).forEach(e=>{e.textContent=i.formatFractionCurrent(r+1)}),t.querySelectorAll(sF(i.totalClass)).forEach(e=>{e.textContent=i.formatFractionTotal(c)})),"progressbar"===i.type){var o;o=i.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var s=(r+1)/c,u=1,l=1;"horizontal"===o?u=s:l=s,t.querySelectorAll(sF(i.progressbarFillClass)).forEach(t=>{t.style.transform=`translate3d(0,0,0) scaleX(${u}) scaleY(${l})`,t.style.transitionDuration=`${e.params.speed}ms`})}"custom"===i.type&&i.renderCustom?(AR(t,i.renderCustom(e,r+1,c)),0===a&&n("paginationRender",t)):(0===a&&n("paginationRender",t),n("paginationUpdate",t)),e.params.watchOverflow&&e.enabled&&t.classList[e.isLocked?"add":"remove"](i.lockClass)})}}function h(){var t=e.params.pagination;if(!s()){var i=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length,a=e.pagination.el;a=PR(a);var r="";if("bullets"===t.type){var o=e.params.loop?Math.ceil(i/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&o>i&&(o=i);for(var u=0;u<o;u+=1)t.renderBullet?r+=t.renderBullet.call(e,u,t.bulletClass):r+=`<${t.bulletElement} ${e.isElement?'part="bullet"':""} class="${t.bulletClass}"></${t.bulletElement}>`}"fraction"===t.type&&(r=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):`<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`),"progressbar"===t.type&&(r=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):`<span class="${t.progressbarFillClass}"></span>`),e.pagination.bullets=[],a.forEach(i=>{"custom"!==t.type&&AR(i,r||""),"bullets"===t.type&&e.pagination.bullets.push(...i.querySelectorAll(sF(t.bulletClass)))}),"custom"!==t.type&&n("paginationRender",a[0])}}function c(){e.params.pagination=function(e,t,i,n){return e.params.createElements&&Object.keys(n).forEach(a=>{if(!i[a]&&!0===i.auto){var r=bR(e.el,`.${n[a]}`)[0];r||((r=kR("div",n[a])).className=n[a],e.el.append(r)),i[a]=r,t[a]=r}}),i}(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});var t,i=e.params.pagination;i.el&&("string"==typeof i.el&&e.isElement&&(t=e.el.querySelector(i.el)),t||"string"!=typeof i.el||(t=[...document.querySelectorAll(i.el)]),t||(t=i.el),t&&0!==t.length&&(e.params.uniqueNavElements&&"string"==typeof i.el&&Array.isArray(t)&&t.length>1&&(t=[...e.el.querySelectorAll(i.el)]).length>1&&(t=t.find(t=>MR(t,".swiper")[0]===e.el)),Array.isArray(t)&&1===t.length&&(t=t[0]),Object.assign(e.pagination,{el:t}),(t=PR(t)).forEach(t=>{"bullets"===i.type&&i.clickable&&t.classList.add(...(i.clickableClass||"").split(" ")),t.classList.add(i.modifierClass+i.type),t.classList.add(e.isHorizontal()?i.horizontalClass:i.verticalClass),"bullets"===i.type&&i.dynamicBullets&&(t.classList.add(`${i.modifierClass}${i.type}-dynamic`),o=0,i.dynamicMainBullets<1&&(i.dynamicMainBullets=1)),"progressbar"===i.type&&i.progressbarOpposite&&t.classList.add(i.progressbarOppositeClass),i.clickable&&t.addEventListener("click",l),e.enabled||t.classList.add(i.lockClass)})))}function m(){var t=e.params.pagination;if(!s()){var i=e.pagination.el;i&&(i=PR(i)).forEach(i=>{i.classList.remove(t.hiddenClass),i.classList.remove(t.modifierClass+t.type),i.classList.remove(e.isHorizontal()?t.horizontalClass:t.verticalClass),t.clickable&&(i.classList.remove(...(t.clickableClass||"").split(" ")),i.removeEventListener("click",l))}),e.pagination.bullets&&e.pagination.bullets.forEach(e=>e.classList.remove(...t.bulletActiveClass.split(" ")))}}i("changeDirection",()=>{if(e.pagination&&e.pagination.el){var t=e.params.pagination,i=e.pagination.el;(i=PR(i)).forEach(i=>{i.classList.remove(t.horizontalClass,t.verticalClass),i.classList.add(e.isHorizontal()?t.horizontalClass:t.verticalClass)})}}),i("init",()=>{!1===e.params.pagination.enabled?f():(c(),h(),d())}),i("activeIndexChange",()=>{void 0===e.snapIndex&&d()}),i("snapIndexChange",()=>{d()}),i("snapGridLengthChange",()=>{h(),d()}),i("destroy",()=>{m()}),i("enable disable",()=>{var t=e.pagination.el;t&&(t=PR(t)).forEach(t=>t.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass))}),i("lock unlock",()=>{d()}),i("click",(t,i)=>{var a=i.target,r=PR(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&r&&r.length>0&&!a.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&a===e.navigation.nextEl||e.navigation.prevEl&&a===e.navigation.prevEl))return;var o=r[0].classList.contains(e.params.pagination.hiddenClass);n(!0===o?"paginationShow":"paginationHide"),r.forEach(t=>t.classList.toggle(e.params.pagination.hiddenClass))}});var f=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);var t=e.pagination.el;t&&(t=PR(t)).forEach(t=>t.classList.add(e.params.pagination.paginationDisabledClass)),m()};Object.assign(e.pagination,{enable:()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);var t=e.pagination.el;t&&(t=PR(t)).forEach(t=>t.classList.remove(e.params.pagination.paginationDisabledClass)),c(),h(),d()},disable:f,render:h,update:d,init:c,destroy:m})}function lF({swiper:e,extendParams:t,on:i,emit:n,params:a}){var r,o;e.autoplay={running:!1,paused:!1,timeLeft:0},t({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});var s,u,l,d,h,c,m,f=a&&a.autoplay?a.autoplay.delay:3e3,v=a&&a.autoplay?a.autoplay.delay:3e3,p=(new Date).getTime();function g(t){e&&!e.destroyed&&e.wrapperEl&&t.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",g),m||t.detail&&t.detail.bySwiperTouchMove||M())}var y=()=>{if(!e.destroyed&&e.autoplay.running){e.autoplay.paused?u=!0:u&&(v=s,u=!1);var t=e.autoplay.paused?s:p+v-(new Date).getTime();e.autoplay.timeLeft=t,n("autoplayTimeLeft",t,t/f),o=requestAnimationFrame(()=>{y()})}},b=()=>{var t=e.params.autoplay.delay,i=(()=>{var t;if(t=e.virtual&&e.params.virtual.enabled?e.slides.find(e=>e.classList.contains("swiper-slide-active")):e.slides[e.activeIndex])return parseInt(t.getAttribute("data-swiper-autoplay"),10)})();return!Number.isNaN(i)&&i>0&&(t=i),t},w=t=>{if(!e.destroyed&&e.autoplay.running){cancelAnimationFrame(o),y();var i=t;void 0===i&&(i=b(),f=i,v=i),s=i;var a=e.params.speed,u=()=>{e&&!e.destroyed&&(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(a,!0,!0),n("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,a,!0,!0),n("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(a,!0,!0),n("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,a,!0,!0),n("autoplay")),e.params.cssMode&&(p=(new Date).getTime(),requestAnimationFrame(()=>{w()})))};return i>0?(clearTimeout(r),r=setTimeout(()=>{u()},i)):requestAnimationFrame(()=>{u()}),i}},k=()=>{p=(new Date).getTime(),e.autoplay.running=!0,w(),n("autoplayStart")},S=()=>{e.autoplay.running=!1,clearTimeout(r),cancelAnimationFrame(o),n("autoplayStop")},E=(t,i)=>{if(!e.destroyed&&e.autoplay.running){clearTimeout(r),t||(c=!0);var a=()=>{n("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",g):M()};if(e.autoplay.paused=!0,i)a();else{var o=s||e.params.autoplay.delay;s=o-((new Date).getTime()-p),e.isEnd&&s<0&&!e.params.loop||(s<0&&(s=0),a())}}},M=()=>{e.isEnd&&s<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(p=(new Date).getTime(),c?(c=!1,w(s)):w(),e.autoplay.paused=!1,n("autoplayResume"))},T=()=>{if(!e.destroyed&&e.autoplay.running){var t=aR();"hidden"===t.visibilityState&&(c=!0,E(!0)),"visible"===t.visibilityState&&M()}},P=t=>{"mouse"===t.pointerType&&(c=!0,m=!0,e.animating||e.autoplay.paused||E(!0))},A=t=>{"mouse"===t.pointerType&&(m=!1,e.autoplay.paused&&M())};i("init",()=>{e.params.autoplay.enabled&&(e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",P),e.el.addEventListener("pointerleave",A)),aR().addEventListener("visibilitychange",T),k())}),i("destroy",()=>{e.el&&"string"!=typeof e.el&&(e.el.removeEventListener("pointerenter",P),e.el.removeEventListener("pointerleave",A)),aR().removeEventListener("visibilitychange",T),e.autoplay.running&&S()}),i("_freeModeStaticRelease",()=>{(d||c)&&M()}),i("_freeModeNoMomentumRelease",()=>{e.params.autoplay.disableOnInteraction?S():E(!0,!0)}),i("beforeTransitionStart",(t,i,n)=>{!e.destroyed&&e.autoplay.running&&(n||!e.params.autoplay.disableOnInteraction?E(!0,!0):S())}),i("sliderFirstMove",()=>{!e.destroyed&&e.autoplay.running&&(e.params.autoplay.disableOnInteraction?S():(l=!0,d=!1,c=!1,h=setTimeout(()=>{c=!0,d=!0,E(!0)},200)))}),i("touchEnd",()=>{if(!e.destroyed&&e.autoplay.running&&l){if(clearTimeout(h),clearTimeout(r),e.params.autoplay.disableOnInteraction)return d=!1,void(l=!1);d&&e.params.cssMode&&M(),d=!1,l=!1}}),i("slideChange",()=>{!e.destroyed&&e.autoplay.running&&e.autoplay.paused&&(s=b(),f=b())}),Object.assign(e.autoplay,{start:k,stop:S,pause:E,resume:M})}function dF(e,t){var i=yR(t);return i!==t&&(i.style.backfaceVisibility="hidden",i.style["-webkit-backface-visibility"]="hidden"),i}function hF(e,t,i){var n=`swiper-slide-shadow${i?`-${i}`:""} swiper-slide-shadow-${e}`,a=yR(t),r=a.querySelector(`.${n.split(" ").join(".")}`);return r||(r=kR("div",n.split(" ")),a.append(r)),r}function cF({swiper:e,extendParams:t,on:i}){t({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}});!function(e){var t,i=e.effect,n=e.swiper,a=e.on,r=e.setTranslate,o=e.setTransition,s=e.overwriteParams,u=e.perspective,l=e.recreateShadows,d=e.getEffectParams;a("beforeInit",()=>{if(n.params.effect===i){n.classNames.push(`${n.params.containerModifierClass}${i}`),u&&u()&&n.classNames.push(`${n.params.containerModifierClass}3d`);var e=s?s():{};Object.assign(n.params,e),Object.assign(n.originalParams,e)}}),a("setTranslate _virtualUpdated",()=>{n.params.effect===i&&r()}),a("setTransition",(e,t)=>{n.params.effect===i&&o(t)}),a("transitionEnd",()=>{if(n.params.effect===i&&l){if(!d||!d().slideShadows)return;n.slides.forEach(e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>e.remove())}),l()}}),a("virtualUpdate",()=>{n.params.effect===i&&(n.slides.length||(t=!0),requestAnimationFrame(()=>{t&&n.slides&&n.slides.length&&(r(),t=!1)}))})}({effect:"coverflow",swiper:e,on:i,setTranslate:()=>{for(var t=e.width,i=e.height,n=e.slides,a=e.slidesSizesGrid,r=e.params.coverflowEffect,o=e.isHorizontal(),s=e.translate,u=o?t/2-s:i/2-s,l=o?r.rotate:-r.rotate,d=r.depth,h=function(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}(e),c=0,m=n.length;c<m;c+=1){var f=n[c],v=a[c],p=(u-f.swiperSlideOffset-v/2)/v,g="function"==typeof r.modifier?r.modifier(p):p*r.modifier,y=o?l*g:0,b=o?0:l*g,w=-d*Math.abs(g),k=r.stretch;"string"==typeof k&&-1!==k.indexOf("%")&&(k=parseFloat(r.stretch)/100*v);var S=o?0:k*g,E=o?k*g:0,M=1-(1-r.scale)*Math.abs(g);Math.abs(E)<.001&&(E=0),Math.abs(S)<.001&&(S=0),Math.abs(w)<.001&&(w=0),Math.abs(y)<.001&&(y=0),Math.abs(b)<.001&&(b=0),Math.abs(M)<.001&&(M=0);var T=`translate3d(${E}px,${S}px,${w}px) rotateX(${h(b)}deg) rotateY(${h(y)}deg) scale(${M})`;if(dF(0,f).style.transform=T,f.style.zIndex=1-Math.abs(Math.round(g)),r.slideShadows){var P=o?f.querySelector(".swiper-slide-shadow-left"):f.querySelector(".swiper-slide-shadow-top"),A=o?f.querySelector(".swiper-slide-shadow-right"):f.querySelector(".swiper-slide-shadow-bottom");P||(P=hF("coverflow",f,o?"left":"top")),A||(A=hF("coverflow",f,o?"right":"bottom")),P&&(P.style.opacity=g>0?g:0),A&&(A.style.opacity=-g>0?-g:0)}}},setTransition:t=>{e.slides.map(e=>yR(e)).forEach(e=>{e.style.transitionDuration=`${t}ms`,e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>{e.style.transitionDuration=`${t}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}Object.keys(aF).forEach(e=>{Object.keys(aF[e]).forEach(t=>{oF.prototype[t]=aF[e][t]})}),oF.use([function({swiper:e,on:t,emit:i}){var n=lR(),a=null,r=null,o=()=>{e&&!e.destroyed&&e.initialized&&(i("beforeResize"),i("resize"))},s=()=>{e&&!e.destroyed&&e.initialized&&i("orientationchange")};t("init",()=>{e.params.resizeObserver&&void 0!==n.ResizeObserver?e&&!e.destroyed&&e.initialized&&(a=new ResizeObserver(t=>{r=n.requestAnimationFrame(()=>{var i=e.width,n=e.height,a=i,r=n;t.forEach(({contentBoxSize:t,contentRect:i,target:n})=>{n&&n!==e.el||(a=i?i.width:(t[0]||t).inlineSize,r=i?i.height:(t[0]||t).blockSize)}),a===i&&r===n||o()})})).observe(e.el):(n.addEventListener("resize",o),n.addEventListener("orientationchange",s))}),t("destroy",()=>{r&&n.cancelAnimationFrame(r),a&&a.unobserve&&e.el&&(a.unobserve(e.el),a=null),n.removeEventListener("resize",o),n.removeEventListener("orientationchange",s)})},function({swiper:e,extendParams:t,on:i,emit:n}){var a=[],r=lR(),o=(t,i={})=>{var o=new(r.MutationObserver||r.WebkitMutationObserver)(t=>{if(!e.__preventObserver__)if(1!==t.length){var i=function(){n("observerUpdate",t[0])};r.requestAnimationFrame?r.requestAnimationFrame(i):r.setTimeout(i,0)}else n("observerUpdate",t[0])});o.observe(t,{attributes:void 0===i.attributes||i.attributes,childList:e.isElement||(void 0===i.childList||i).childList,characterData:void 0===i.characterData||i.characterData}),a.push(o)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),i("init",()=>{if(e.params.observer){if(e.params.observeParents)for(var t=MR(e.hostEl),i=0;i<t.length;i+=1)o(t[i]);o(e.hostEl,{childList:e.params.observeSlideChildren}),o(e.wrapperEl,{attributes:!1})}}),i("destroy",()=>{a.forEach(e=>{e.disconnect()}),a.splice(0,a.length)})}]);var mF,fF,vF=e=>e,pF=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t.updateSpacing=e=>{t.slideSpacing=e.detail.spacing,t.swiperInstance&&(t.swiperInstance.params.spaceBetween=t.slideSpacing,t.swiperInstance.update())},t}return re(e,tu),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),window.addEventListener("child-spacing",this.updateSpacing,!1)}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),window.removeEventListener("child-spacing",this.updateSpacing,!1)}},{key:"styles",value:function(){var e,t,i,n=this.scaleFactor,a=this.component,r=a.backgroundBlur,o=a.indicator,s=a.activeIndicator,u=a.previousSlidePadding,l=a.nextSlidePadding,d="vertical"===a.direction?"margin-top":"margin-left";return B(`\n :host {\n display: ${a.hidden?"none":"flex"};\n flex-direction: column !important;\n ${Iu(a.position)} \n width: 100%;\n bottom: -1px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n z-index: ${null!==(e=a.zIndex)&&void 0!==e?e:1};\n top: 0px;\n transition: all 0.3s;\n ${ku(a,n)}\n ${function(e,t){return`\n padding-right: ${hu(t,e.nextSlidePadding)}px !important;\n padding-left: ${hu(t,e.previousSlidePadding)}px !important;\n `}(a,n)}\n ${gu(a)}\n ${pu(a,!1)}\n max-width: 100vw;\n }\n :host(:focus){\n ${pu(a,!0)}\n ${xu(a,n,!0)}\n }\n :host(:focus-visible){\n ${Fu(a)}\n }\n :host > *:not(:first-child) {\n ${d}: ${a.spacing?a.spacing*n:0}px;\n }\n .swiper-container {\n ${Mu(a,n)};\n padding-left: ${null!=u?u:0}px;\n padding-right: ${null!=l?l:0}px;\n box-sizing: border-box;\n }\n .swiper-pagination{\n position: relative;\n padding: 8px;\n }\n .swiper-pagination-bullet {\n opacity: 1 !important;\n ${null!=(null==o?void 0:o.width)?`width: ${o.width}px !important;`:""}\n ${null!=(null==o?void 0:o.height)?`height: ${o.height}px !important;`:""}\n ${null!=(null==o?void 0:o.borderRadius)?`border-radius: ${o.borderRadius}px !important;`:""}\n background: ${null!==(t=null==o?void 0:o.fillColor)&&void 0!==t?t:a.indicatorColor} !important;\n }\n .swiper-pagination-bullet-active {\n ${null!=(null==s?void 0:s.width)?`width: ${s.width}px !important;`:""}\n ${null!=(null==s?void 0:s.height)?`height: ${s.height}px !important;`:""}\n ${null!=(null==s?void 0:s.borderRadius)?`border-radius: ${s.borderRadius}px !important;`:""}\n background: ${null!==(i=null==s?void 0:s.fillColor)&&void 0!==i?i:a.activeIndicatorColor} !important;\n }\n `)}},{key:"updated",value:function(){var e,t,i=[uF,lF],n=this.component,a=n.autoplay,r=n.autoplaySeconds,o=n.showIndicators,s=n.slideSpacing,u=n.inactiveSlideScale;u&&i.push(cF),oF.use(i);var l=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".swiper-container"),d=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".swiper-pagination");if(l&&!this.swiperInstance){var h,c={initialSlide:0,slidesPerView:1,loop:a,spaceBetween:null!==(h=null!=s?s:this.slideSpacing)&&void 0!==h?h:0,autoplay:!!a&&{delay:1e3*r,disableOnInteraction:!1},pagination:!(null!=o&&!o)&&{el:d,clickable:!0},on:{init:e=>{this.handleSlideChange(e)},slideChange:e=>{this.handleSlideChange(e)}}};u&&(c.effect="coverflow",c.coverflowEffect={rotate:0,stretch:0,depth:100,modifier:1,slideShadows:!1,scale:u}),this.swiperInstance=new oF(l,c)}}},{key:"handleSlideChange",value:function(e){if(this.contextProvider.setCurrentSlideIndex(e.realIndex),this.component.onChange){var t,i=this.getCarouselOnChange(this.component),n=null==i||null===(t=i.parameters)||void 0===t||null===(t=t.partialState)||void 0===t?void 0:t.currentGroupId;n&&this.contextProvider.setCurrentGroupData(n,"")}}},{key:"getCarouselOnChange",value:function(e){var t;if(e.onChange&&e.onChange.parameters){var i=this.contextProvider.state.slides,n="string"==typeof e.loopSource?e.loopSource:"",a=null==i||null===(t=i[n])||void 0===t||null===(t=t.carouselName)||void 0===t?void 0:t[this.contextProvider.state.currentSlideIndex];return La(e.onChange,{slide:a,sku:this.contextProvider.state.sku,state:this.contextProvider.state,launch:this.contextProvider.state.launch,customer:this.contextProvider.state.customer})}}},{key:"getCarouselSlides",value:function(e){var t,i;if(!e.loopSource)return[];var n,a=this.contextProvider.state,r=a.slides,o=a.selectedProducts,s="string"==typeof e.loopSource?e.loopSource:"",u=Pa(this.contextProvider.productDetails,null!==(t=null===(i=this.contextProvider.getSelectedPaywall())||void 0===i?void 0:i.sku_menus)&&void 0!==t?t:[],s),l=[];P(r)||(l=""!=s?r[s].carouselName:null!==(n=e.loopSource)&&void 0!==n?n:[]);var d=this.contextProvider.filteredSkuMenus.map(e=>e.id);return l.filter(e=>!e.productGroupId||d.includes(e.productGroupId)).map(t=>{var i=u.find(e=>e.id==o[t.productGroupId]);return La(e.components,La({slide:t},{sku:ie({},Da(null==i?void 0:i.product_details,t,u))}))||[]})}},{key:"render",value:function(){var e=this.getCarouselSlides(this.component),t=this.component,i=t.focusedBorderColor,n=t.focusedFillColor,a=t.fillColor;return!i&&Ua(a,n)||(this.tabIndex=0),N(mF||(mF=vF`
489
492
  <link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css"/>
490
493
  <div class="swiper-container" aria-live="assertive" aria-atomic="true">
491
494
  <div class="swiper-wrapper">
@@ -493,10 +496,10 @@ import{NAMI_SDK_VERSION as e,getExtendedClientInfo as t,PaywallState as i,logger
493
496
  </div>
494
497
  </div>
495
498
  <div class="swiper-pagination"></div>
496
- `),e.map(e=>e.map(e=>(e.spacing&&(this.slideSpacing=2*e.spacing),N(hF||(hF=cF`
499
+ `),e.map(e=>e.map(e=>(e.spacing&&(this.slideSpacing=2*e.spacing),N(fF||(fF=vF`
497
500
  <div class="swiper-slide">
498
501
  ${0}
499
- </div>`),cl(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))))))}}])}();ft([Kt({type:Object})],mF.prototype,"component",void 0),ft([Kt({type:Boolean})],mF.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],mF.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],mF.prototype,"minSDKVersion",void 0),mF=ft([St("nami-carousel-container")],mF);var fF=function(){function e(){var t;return Y(this,e),(t=X(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleBlur=()=>{t.inFocusedState=!1},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||t._handleClick()},t._handleClick=()=>{ds({contextProvider:t.contextProvider,onTap:t.muted?t.component.mutedOnTap:t.component.volumeOnTap}),t.requestUpdate()},t.addEventListener("click",t._handleClick,!1),t.addEventListener("focus",t._handleFocus,!1),t.addEventListener("blur",t._handleBlur,!1),t.addEventListener("keydown",t._handleKeyDown,!1),t}return re(e,tu),ee(e,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i="vertical"===e.direction?"margin-top":"margin-left";return B(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${pu(e,!1)}\n ${gu(e)}\n ${xu(e,t,!1)}\n }\n :host(:focus){\n ${pu(e,!0)}\n ${xu(e,t,!0)}\n }\n :host(:focus-visible){\n ${Fu(e)}\n }\n :host > *:not(:first-child) {\n ${i}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;this.muted=null!==(e=null===(t=ls.instance)||void 0===t?void 0:t.muted)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0});var i=this.muted?this.component.mutedComponents:this.component.volumeComponents;return null==i?void 0:i.map(e=>cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();ft([Kt({type:Object})],fF.prototype,"component",void 0),ft([Kt({type:Boolean})],fF.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],fF.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],fF.prototype,"minSDKVersion",void 0),fF=ft([St("nami-volume-button")],fF);var vF=function(){function e(){var t;return Y(this,e),(t=X(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleBlur=()=>{t.inFocusedState=!1},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||t._handleClick()},t._handleClick=()=>{ds({contextProvider:t.contextProvider,onTap:t.playing?t.component.playingOnTap:t.component.pausedOnTap}),t.requestUpdate()},t.addEventListener("click",t._handleClick,!1),t.addEventListener("focus",t._handleFocus,!1),t.addEventListener("blur",t._handleBlur,!1),t.addEventListener("keydown",t._handleKeyDown,!1),t}return re(e,tu),ee(e,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i="vertical"===e.direction?"margin-top":"margin-left";return B(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${pu(e,!1)}\n ${gu(e)}\n ${xu(e,t,!1)}\n }\n :host(:focus){\n ${pu(e,!0)}\n ${xu(e,t,!0)}\n }\n :host(:focus-visible){\n ${Fu(e)}\n }\n :host > *:not(:first-child) {\n ${i}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;return this.playing=null!==(e=null===(t=ls.instance)||void 0===t?void 0:t.playing)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0}),(this.playing?this.component.playingComponents:this.component.pausedComponents).map(e=>cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();ft([Kt({type:Object})],vF.prototype,"component",void 0),ft([Kt({type:Boolean})],vF.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],vF.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],vF.prototype,"minSDKVersion",void 0),vF=ft([St("nami-play-pause-button")],vF);var pF=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return re(e,tu),ee(e,[{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i=this.minSDKVersion,n=e.backgroundBlur,a="vertical"===e.direction,r=a?"width":"height",o=a?"margin-top":"margin-left",s=e.fillImage?B(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):B(pu(e,!1));return B(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${n?`backdrop-filter: blur(${n}px);`:""}\n ${s};\n ${Iu(e.position)}\n ${gu(e)}\n ${xu(e,t,!1)}\n display: ${e.hidden?"none":"flex"};\n align-items: center;\n justify-content: center;\n }\n :host(:focus){\n ${pu(e,!0)}\n ${xu(e,t,!0)}\n }\n :host(:focus-visible){\n ${Fu(e)}\n }\n :host > *:not(nami-text) {\n position: absolute;\n }\n :host > * {\n ${bu(i,r)}\n }\n :host > *:not(:first-child) {\n ${o}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e,t=this.component,i=t.focusedBorderColor,n=t.focusedFillColor,a=t.fillColor;return!i&&Ua(a,n)||(this.tabIndex=0),(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>cl(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();ft([Kt({type:Object})],pF.prototype,"component",void 0),ft([Kt({type:Boolean})],pF.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],pF.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],pF.prototype,"minSDKVersion",void 0),pF=ft([St("nami-stack")],pF);var gF,yF,bF=e=>e,wF="nami-disabled",kF=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).active=!0,t.timeSpentOnPaywall=0,t.activeTemplate=null,t}return re(e,j),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),this.minSDKVersion=F(this.paywall.template.min_sdk_version),this.contextProvider=Yt.create(this.paywall,this.context,this.campaign),this.contextConsumer=new Vs(this,this.contextProvider),this.flow&&this.contextProvider.setFlow(this.flow),this.contextProvider.setTimeSpentOnPaywall(this.timeSpentOnPaywall),this.contextProvider.state.userInteractionEnabled||this.classList.add(wF),this.teardownEvent=this.contextProvider.onEvent("user-interaction-changed",this.userInteractionListener.bind(this))}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),Yt.remove(this.contextProvider),this.teardownEvent(),this.active&&us()}},{key:"userInteractionListener",value:function(e){this.classList.toggle(wF,!e.enabled)}},{key:"firstUpdated",value:function(){this.postImpression(),this.postPaywallScreenData(),this.updateActiveRenderRoot()}},{key:"updated",value:function(){this.updateActiveRenderRoot()}},{key:"updateActiveRenderRoot",value:function(){this.active&&this.activeTemplate&&(ts(this.activeTemplate),function(e){if(Mr("setActivePageRenderRoot:enter",{hasRoot:!!e,rootType:e instanceof Element?Pr(e):e instanceof DocumentFragment?"document-fragment":String(e),activePageKey:er,activePageAnnounced:Za,activeElement:Pr(Rr())}),Qa=e,e&&Ja&&!Za){var t=Rr();if(t&&"contains"in e&&e.contains(t))is(t);else if(e instanceof DocumentFragment){var i=e.activeElement;i&&is(i)}}}(this.renderRoot))}},{key:"postImpression",value:function(){var e,t;null!==(e=this.paywall)&&void 0!==e&&e.id&&(e=>{var t,i,a;le(function(r){for(;;)switch(r.p=r.n){case 0:if(!R()){r.n=1;break}return n.info("Skipping paywall impression - anonymous mode"),r.a(2);case 1:return(t=v.getSessionId())&&(e.session=t),(i=v.getLaunchId())&&(e.launch_id=i),e.app_env="production",e.url_params=s(),n.info("Post paywall impression - segment ",e.segment),r.p=2,r.n=3,K(_.instance.postImpression(e));case 3:r.n=5;break;case 4:r.p=4,a=r.v,n.error("Error posting impression",a);case 5:return r.a(2)}},null,null,[[2,4]],Promise)})({segment:null===(t=this.campaign)||void 0===t?void 0:t.segment,call_to_action:this.paywall.id})}},{key:"postPaywallScreenData",value:function(){m.getInstance().emit(f,ie({},this.contextProvider.getPaywallActionEventData(),{action:c.SHOW_PAYWALL}))}},{key:"getTemplate",value:function(){var e,t,i,n;this.contextProvider.state.selectedPaywall===this.paywall?t=this.contextProvider.state.currentPage:t=null!==(i=null===(n=this.paywall.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.currentPage)&&void 0!==i?i:"page1";var a=null===(e=this.paywall.template)||void 0===e?void 0:e.pages.find(e=>e.name===t);if(!a)throw new Error(`Page with name ${t} not found in paywall template.`);return this.activeTemplate=a,this.active&&ts(a),a}},{key:"render",value:function(){var e,t=this.getTemplate(),i=t.backgroundContainer,n=t.header,a=void 0===n?[]:n,r=t.footer,o=void 0===r?[]:r,s=t.contentContainer,u=null!==(e=this.contextProvider.state.fullScreenPresentation)&&void 0!==e&&e,l=this.contextProvider.getFormFactor(),d=W(l);return N(gF||(gF=bF`
502
+ </div>`),cl(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))))))}}])}();ft([Kt({type:Object})],pF.prototype,"component",void 0),ft([Kt({type:Boolean})],pF.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],pF.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],pF.prototype,"minSDKVersion",void 0),pF=ft([St("nami-carousel-container")],pF);var gF=function(){function e(){var t;return Y(this,e),(t=X(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleBlur=()=>{t.inFocusedState=!1},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||t._handleClick()},t._handleClick=()=>{ds({contextProvider:t.contextProvider,onTap:t.muted?t.component.mutedOnTap:t.component.volumeOnTap}),t.requestUpdate()},t.addEventListener("click",t._handleClick,!1),t.addEventListener("focus",t._handleFocus,!1),t.addEventListener("blur",t._handleBlur,!1),t.addEventListener("keydown",t._handleKeyDown,!1),t}return re(e,tu),ee(e,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i="vertical"===e.direction?"margin-top":"margin-left";return B(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${pu(e,!1)}\n ${gu(e)}\n ${xu(e,t,!1)}\n }\n :host(:focus){\n ${pu(e,!0)}\n ${xu(e,t,!0)}\n }\n :host(:focus-visible){\n ${Fu(e)}\n }\n :host > *:not(:first-child) {\n ${i}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;this.muted=null!==(e=null===(t=ls.instance)||void 0===t?void 0:t.muted)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0});var i=this.muted?this.component.mutedComponents:this.component.volumeComponents;return null==i?void 0:i.map(e=>cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();ft([Kt({type:Object})],gF.prototype,"component",void 0),ft([Kt({type:Boolean})],gF.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],gF.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],gF.prototype,"minSDKVersion",void 0),gF=ft([St("nami-volume-button")],gF);var yF=function(){function e(){var t;return Y(this,e),(t=X(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleBlur=()=>{t.inFocusedState=!1},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||t._handleClick()},t._handleClick=()=>{ds({contextProvider:t.contextProvider,onTap:t.playing?t.component.playingOnTap:t.component.pausedOnTap}),t.requestUpdate()},t.addEventListener("click",t._handleClick,!1),t.addEventListener("focus",t._handleFocus,!1),t.addEventListener("blur",t._handleBlur,!1),t.addEventListener("keydown",t._handleKeyDown,!1),t}return re(e,tu),ee(e,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i="vertical"===e.direction?"margin-top":"margin-left";return B(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${pu(e,!1)}\n ${gu(e)}\n ${xu(e,t,!1)}\n }\n :host(:focus){\n ${pu(e,!0)}\n ${xu(e,t,!0)}\n }\n :host(:focus-visible){\n ${Fu(e)}\n }\n :host > *:not(:first-child) {\n ${i}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;return this.playing=null!==(e=null===(t=ls.instance)||void 0===t?void 0:t.playing)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0}),(this.playing?this.component.playingComponents:this.component.pausedComponents).map(e=>cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();ft([Kt({type:Object})],yF.prototype,"component",void 0),ft([Kt({type:Boolean})],yF.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],yF.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],yF.prototype,"minSDKVersion",void 0),yF=ft([St("nami-play-pause-button")],yF);var bF=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return re(e,tu),ee(e,[{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i=this.minSDKVersion,n=e.backgroundBlur,a="vertical"===e.direction,r=a?"width":"height",o=a?"margin-top":"margin-left",s=e.fillImage?B(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):B(pu(e,!1));return B(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${n?`backdrop-filter: blur(${n}px);`:""}\n ${s};\n ${Iu(e.position)}\n ${gu(e)}\n ${xu(e,t,!1)}\n display: ${e.hidden?"none":"flex"};\n align-items: center;\n justify-content: center;\n }\n :host(:focus){\n ${pu(e,!0)}\n ${xu(e,t,!0)}\n }\n :host(:focus-visible){\n ${Fu(e)}\n }\n :host > *:not(nami-text) {\n position: absolute;\n }\n :host > * {\n ${bu(i,r)}\n }\n :host > *:not(:first-child) {\n ${o}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e,t=this.component,i=t.focusedBorderColor,n=t.focusedFillColor,a=t.fillColor;return!i&&Ua(a,n)||(this.tabIndex=0),(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>cl(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();ft([Kt({type:Object})],bF.prototype,"component",void 0),ft([Kt({type:Boolean})],bF.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],bF.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],bF.prototype,"minSDKVersion",void 0),bF=ft([St("nami-stack")],bF);var wF,kF,SF=e=>e,EF="nami-disabled",MF=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).active=!0,t.timeSpentOnPaywall=0,t.activeTemplate=null,t}return re(e,j),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),this.minSDKVersion=F(this.paywall.template.min_sdk_version),this.contextProvider=Yt.create(this.paywall,this.context,this.campaign),this.contextConsumer=new Vs(this,this.contextProvider),this.flow&&this.contextProvider.setFlow(this.flow),this.contextProvider.setTimeSpentOnPaywall(this.timeSpentOnPaywall),this.contextProvider.state.userInteractionEnabled||this.classList.add(EF),this.teardownEvent=this.contextProvider.onEvent("user-interaction-changed",this.userInteractionListener.bind(this))}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),Yt.remove(this.contextProvider),this.teardownEvent(),this.active&&us()}},{key:"userInteractionListener",value:function(e){this.classList.toggle(EF,!e.enabled)}},{key:"firstUpdated",value:function(){this.postImpression(),this.postPaywallScreenData(),this.updateActiveRenderRoot()}},{key:"updated",value:function(){this.updateActiveRenderRoot()}},{key:"updateActiveRenderRoot",value:function(){this.active&&this.activeTemplate&&(ts(this.activeTemplate),function(e){if(Mr("setActivePageRenderRoot:enter",{hasRoot:!!e,rootType:e instanceof Element?Pr(e):e instanceof DocumentFragment?"document-fragment":String(e),activePageKey:er,activePageAnnounced:Za,activeElement:Pr(Rr())}),Qa=e,e&&Ja&&!Za){var t=Rr();if(t&&"contains"in e&&e.contains(t))is(t);else if(e instanceof DocumentFragment){var i=e.activeElement;i&&is(i)}}}(this.renderRoot))}},{key:"postImpression",value:function(){var e,t;null!==(e=this.paywall)&&void 0!==e&&e.id&&(e=>{var t,i,a;le(function(r){for(;;)switch(r.p=r.n){case 0:if(!R()){r.n=1;break}return n.info("Skipping paywall impression - anonymous mode"),r.a(2);case 1:return(t=v.getSessionId())&&(e.session=t),(i=v.getLaunchId())&&(e.launch_id=i),e.app_env="production",e.url_params=s(),n.info("Post paywall impression - segment ",e.segment),r.p=2,r.n=3,K(_.instance.postImpression(e));case 3:r.n=5;break;case 4:r.p=4,a=r.v,n.error("Error posting impression",a);case 5:return r.a(2)}},null,null,[[2,4]],Promise)})({segment:null===(t=this.campaign)||void 0===t?void 0:t.segment,call_to_action:this.paywall.id})}},{key:"postPaywallScreenData",value:function(){m.getInstance().emit(f,ie({},this.contextProvider.getPaywallActionEventData(),{action:c.SHOW_PAYWALL}))}},{key:"getTemplate",value:function(){var e,t,i,n;this.contextProvider.state.selectedPaywall===this.paywall?t=this.contextProvider.state.currentPage:t=null!==(i=null===(n=this.paywall.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.currentPage)&&void 0!==i?i:"page1";var a=null===(e=this.paywall.template)||void 0===e?void 0:e.pages.find(e=>e.name===t);if(!a)throw new Error(`Page with name ${t} not found in paywall template.`);return this.activeTemplate=a,this.active&&ts(a),a}},{key:"render",value:function(){var e,t=this.getTemplate(),i=t.backgroundContainer,n=t.header,a=void 0===n?[]:n,r=t.footer,o=void 0===r?[]:r,s=t.contentContainer,u=null!==(e=this.contextProvider.state.fullScreenPresentation)&&void 0!==e&&e,l=this.contextProvider.getFormFactor(),d=W(l);return N(wF||(wF=SF`
500
503
  <nami-background-container
501
504
  .component=${0}
502
505
  .scaleFactor=${0}
@@ -520,7 +523,7 @@ import{NAMI_SDK_VERSION as e,getExtendedClientInfo as t,PaywallState as i,logger
520
523
  .scaleFactor=${0}
521
524
  .minSDKVersion=${0}
522
525
  ></nami-footer>
523
- `),i,d,this.minSDKVersion,a,l,d,u,this.minSDKVersion,s,d,l,this.minSDKVersion,o,d,this.minSDKVersion)}}])}();kF.styles=$(yF||(yF=bF`
526
+ `),i,d,this.minSDKVersion,a,l,d,u,this.minSDKVersion,s,d,l,this.minSDKVersion,o,d,this.minSDKVersion)}}])}();MF.styles=$(kF||(kF=SF`
524
527
  :host {
525
528
  display: flex;
526
529
  flex-direction: column;
@@ -529,15 +532,15 @@ import{NAMI_SDK_VERSION as e,getExtendedClientInfo as t,PaywallState as i,logger
529
532
  min-height: 0;
530
533
  overflow: hidden;
531
534
  }
532
- `)),ft([Kt({type:Object})],kF.prototype,"paywall",void 0),ft([Kt({type:Object})],kF.prototype,"campaign",void 0),ft([Kt({type:Object})],kF.prototype,"context",void 0),ft([Kt({type:Boolean})],kF.prototype,"active",void 0),ft([function({context:e}){return(t,i)=>{var n=new WeakMap;if("object"==typeof i)return{get(){return t.get.call(this)},set(e){return n.get(this).setValue(e),t.set.call(this,e)},init(t){return n.set(this,new Gs(this,{context:e,initialValue:t})),t}};t.constructor.addInitializer(t=>{n.set(t,new Gs(t,{context:e}))});var a,r=Object.getOwnPropertyDescriptor(t,i);if(void 0===r){var o=new WeakMap;a={get(){return o.get(this)},set(e){n.get(this).setValue(e),o.set(this,e)},configurable:!0,enumerable:!0}}else{var s=r.set;a=ie({},r,{set(e){n.get(this).setValue(e),null==s||s.call(this,e)}})}Object.defineProperty(t,i,a)}}({context:Ks})],kF.prototype,"contextProvider",void 0),kF=ft([St("nami-paywall-screen")],kF);var SF,EF,MF={};function TF(){return EF?SF:(EF=1,SF=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var PF,AF={},DF={};function xF(){if(PF)return DF;var e;PF=1;var t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return DF.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},DF.getSymbolTotalCodewords=function(e){return t[e]},DF.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},DF.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},DF.isKanjiModeEnabled=function(){return void 0!==e},DF.toSJIS=function(t){return e(t)},DF}var CF,IF,LF,_F,RF,FF={};function WF(){return CF||(CF=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,i){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(e){return i}}}(FF)),FF}var OF,$F={};var NF,jF={};var BF,zF={};var UF,HF={};function GF(){if(UF)return HF;UF=1;var e=WF(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return HF.getBlocksCount=function(i,n){switch(n){case e.L:return t[4*(i-1)+0];case e.M:return t[4*(i-1)+1];case e.Q:return t[4*(i-1)+2];case e.H:return t[4*(i-1)+3];default:return}},HF.getTotalCodewordsCount=function(t,n){switch(n){case e.L:return i[4*(t-1)+0];case e.M:return i[4*(t-1)+1];case e.Q:return i[4*(t-1)+2];case e.H:return i[4*(t-1)+3];default:return}},HF}var VF,KF,XF,YF,qF={},JF={};function QF(){return KF||(KF=1,function(e){var t=function(){if(VF)return JF;VF=1;var e=new Uint8Array(512),t=new Uint8Array(256);return function(){for(var i=1,n=0;n<255;n++)e[n]=i,t[i]=n,256&(i<<=1)&&(i^=285);for(var a=255;a<512;a++)e[a]=e[a-255]}(),JF.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},JF.exp=function(t){return e[t]},JF.mul=function(i,n){return 0===i||0===n?0:e[t[i]+t[n]]},JF}();e.mul=function(e,i){for(var n=new Uint8Array(e.length+i.length-1),a=0;a<e.length;a++)for(var r=0;r<i.length;r++)n[a+r]^=t.mul(e[a],i[r]);return n},e.mod=function(e,i){for(var n=new Uint8Array(e);n.length-i.length>=0;){for(var a=n[0],r=0;r<i.length;r++)n[r]^=t.mul(i[r],a);for(var o=0;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},e.generateECPolynomial=function(i){for(var n=new Uint8Array([1]),a=0;a<i;a++)n=e.mul(n,new Uint8Array([1,t.exp(a)]));return n}}(qF)),qF}var ZF,eW={},tW={},iW={};function nW(){return ZF||(ZF=1,iW.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),iW}var aW,rW,oW,sW={};function uW(){if(aW)return sW;aW=1;var e="[0-9]+",t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(t=t.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";sW.KANJI=new RegExp(t,"g"),sW.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),sW.BYTE=new RegExp(i,"g"),sW.NUMERIC=new RegExp(e,"g"),sW.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var n=new RegExp("^"+t+"$"),a=new RegExp("^"+e+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return sW.testKanji=function(e){return n.test(e)},sW.testNumeric=function(e){return a.test(e)},sW.testAlphanumeric=function(e){return r.test(e)},sW}function lW(){return rW||(rW=1,function(e){var t=nW(),i=uW();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,i){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?e.ccBits[0]:i<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return i.testNumeric(t)?e.NUMERIC:i.testAlphanumeric(t)?e.ALPHANUMERIC:i.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,i){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(e){return i}}}(tW)),tW}function dW(){return oW||(oW=1,function(e){var t=xF(),i=GF(),n=WF(),a=lW(),r=nW(),o=t.getBCHDigit(7973);function s(e,t){return a.getCharCountIndicator(e,t)+4}function u(e,t){var i=0;return e.forEach(function(e){var n=s(e.mode,t);i+=n+e.getBitsLength()}),i}e.from=function(e,t){return r.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,n,o){if(!r.isValid(e))throw new Error("Invalid QR Code version");void 0===o&&(o=a.BYTE);var u=8*(t.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,n));if(o===a.MIXED)return u;var l=u-s(o,e);switch(o){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(t,i){var r,o=n.from(i,n.M);if(Array.isArray(t)){if(t.length>1)return function(t,i){for(var n=1;n<=40;n++)if(u(t,n)<=e.getCapacity(n,i,a.MIXED))return n}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,i,n){for(var a=1;a<=40;a++)if(i<=e.getCapacity(a,n,t))return a}(r.mode,r.getLength(),o)},e.getEncodedBits=function(e){if(!r.isValid(e)||e<7)throw new Error("Invalid QR Code version");for(var i=e<<12;t.getBCHDigit(i)-o>=0;)i^=7973<<t.getBCHDigit(i)-o;return e<<12|i}}(eW)),eW}var hW,cW={};var mW,fW,vW,pW,gW,yW,bW,wW,kW={};var SW,EW,MW,TW={exports:{}};function PW(){return SW||(SW=1,function(e){var t={single_source_shortest_paths:function(e,i,n){var a={},r={};r[i]=0;var o,s,u,l,d,h,c,m=t.PriorityQueue.make();for(m.push(i,0);!m.empty();)for(u in s=(o=m.pop()).value,l=o.cost,d=e[s]||{})d.hasOwnProperty(u)&&(h=l+d[u],c=r[u],(void 0===r[u]||c>h)&&(r[u]=h,m.push(u,h),a[u]=s));if(void 0!==n&&void 0===r[n]){var f=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(f)}return a},extract_shortest_path_from_predecessor_list:function(e,t){for(var i=[],n=t;n;)i.push(n),e[n],n=e[n];return i.reverse(),i},find_path:function(e,i,n){var a=t.single_source_shortest_paths(e,i,n);return t.extract_shortest_path_from_predecessor_list(a,n)},PriorityQueue:{make:function(e){var i,n=t.PriorityQueue,a={};for(i in e=e||{},n)n.hasOwnProperty(i)&&(a[i]=n[i]);return a.queue=[],a.sorter=e.sorter||n.default_sorter,a},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var i={value:e,cost:t};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(TW)),TW.exports}function AW(){return EW||(EW=1,function(e){var t=lW(),i=function(){if(fW)return mW;fW=1;var e=lW();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){var t,i,n;for(t=0;t+3<=this.data.length;t+=3)i=this.data.substr(t,3),n=parseInt(i,10),e.put(n,10);var a=this.data.length-t;a>0&&(i=this.data.substr(t),n=parseInt(i,10),e.put(n,3*a+1))},mW=t}(),n=function(){if(pW)return vW;pW=1;var e=lW(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(t){this.mode=e.ALPHANUMERIC,this.data=t}return i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){var i;for(i=0;i+2<=this.data.length;i+=2){var n=45*t.indexOf(this.data[i]);n+=t.indexOf(this.data[i+1]),e.put(n,11)}this.data.length%2&&e.put(t.indexOf(this.data[i]),6)},vW=i}(),a=function(){if(yW)return gW;yW=1;var e=lW();function t(t){this.mode=e.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(var t=0,i=this.data.length;t<i;t++)e.put(this.data[t],8)},gW=t}(),r=function(){if(wW)return bW;wW=1;var e=lW(),t=xF();function i(t){this.mode=e.KANJI,this.data=t}return i.getBitsLength=function(e){return 13*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){var i;for(i=0;i<this.data.length;i++){var n=t.toSJIS(this.data[i]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[i]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},bW=i}(),o=uW(),s=xF(),u=PW();function l(e){return unescape(encodeURIComponent(e)).length}function d(e,t,i){for(var n,a=[];null!==(n=e.exec(i));)a.push({data:n[0],index:n.index,mode:t,length:n[0].length});return a}function h(e){var i,n,a=d(o.NUMERIC,t.NUMERIC,e),r=d(o.ALPHANUMERIC,t.ALPHANUMERIC,e);return s.isKanjiModeEnabled()?(i=d(o.BYTE,t.BYTE,e),n=d(o.KANJI,t.KANJI,e)):(i=d(o.BYTE_KANJI,t.BYTE,e),n=[]),a.concat(r,i,n).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function c(e,o){switch(o){case t.NUMERIC:return i.getBitsLength(e);case t.ALPHANUMERIC:return n.getBitsLength(e);case t.KANJI:return r.getBitsLength(e);case t.BYTE:return a.getBitsLength(e)}}function m(e,o){var u,l=t.getBestModeForData(e);if((u=t.from(o,l))!==t.BYTE&&u.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(u)+".\n Suggested mode is: "+t.toString(l));switch(u!==t.KANJI||s.isKanjiModeEnabled()||(u=t.BYTE),u){case t.NUMERIC:return new i(e);case t.ALPHANUMERIC:return new n(e);case t.KANJI:return new r(e);case t.BYTE:return new a(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},e.fromString=function(i,n){for(var a=function(e){for(var i=[],n=0;n<e.length;n++){var a=e[n];switch(a.mode){case t.NUMERIC:i.push([a,{data:a.data,mode:t.ALPHANUMERIC,length:a.length},{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.ALPHANUMERIC:i.push([a,{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.KANJI:i.push([a,{data:a.data,mode:t.BYTE,length:l(a.data)}]);break;case t.BYTE:i.push([{data:a.data,mode:t.BYTE,length:l(a.data)}])}}return i}(h(i,s.isKanjiModeEnabled())),r=function(e,i){for(var n={},a={start:{}},r=["start"],o=0;o<e.length;o++){for(var s=e[o],u=[],l=0;l<s.length;l++){var d=s[l],h=""+o+l;u.push(h),n[h]={node:d,lastCount:0},a[h]={};for(var m=0;m<r.length;m++){var f=r[m];n[f]&&n[f].node.mode===d.mode?(a[f][h]=c(n[f].lastCount+d.length,d.mode)-c(n[f].lastCount,d.mode),n[f].lastCount+=d.length):(n[f]&&(n[f].lastCount=d.length),a[f][h]=c(d.length,d.mode)+4+t.getCharCountIndicator(d.mode,i))}}r=u}for(var v=0;v<r.length;v++)a[r[v]].end=0;return{map:a,table:n}}(a,n),o=u.find_path(r.map,"start","end"),d=[],m=1;m<o.length-1;m++)d.push(r.table[o[m]].node);return e.fromArray(function(e){return e.reduce(function(e,t){var i=e.length-1>=0?e[e.length-1]:null;return i&&i.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}(d))},e.rawSplit=function(t){return e.fromArray(h(t,s.isKanjiModeEnabled()))}}(kW)),kW}function DW(){if(MW)return AF;MW=1;var e=xF(),t=WF(),i=function(){if(LF)return IF;function e(){this.buffer=[],this.length=0}return LF=1,e.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var i=0;i<t;i++)this.putBit(1==(e>>>t-i-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},IF=e}(),n=function(){if(RF)return _F;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return RF=1,e.prototype.set=function(e,t,i,n){var a=e*this.size+t;this.data[a]=i,n&&(this.reservedBit[a]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},_F=e}(),a=(OF||(OF=1,function(e){var t=xF().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];for(var i=Math.floor(e/7)+2,n=t(e),a=145===n?26:2*Math.ceil((n-13)/(2*i-2)),r=[n-7],o=1;o<i-1;o++)r[o]=r[o-1]-a;return r.push(6),r.reverse()},e.getPositions=function(t){for(var i=[],n=e.getRowColCoords(t),a=n.length,r=0;r<a;r++)for(var o=0;o<a;o++)0===r&&0===o||0===r&&o===a-1||r===a-1&&0===o||i.push([n[r],n[o]]);return i}}($F)),$F),r=function(){if(NF)return jF;NF=1;var e=xF().getSymbolSize;return jF.getPositions=function(t){var i=e(t);return[[0,0],[i-7,0],[0,i-7]]},jF}(),o=(BF||(BF=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t=3,i=3,n=40,a=10;function r(t,i,n){switch(t){case e.Patterns.PATTERN000:return(i+n)%2==0;case e.Patterns.PATTERN001:return i%2==0;case e.Patterns.PATTERN010:return n%3==0;case e.Patterns.PATTERN011:return(i+n)%3==0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(n/3))%2==0;case e.Patterns.PATTERN101:return i*n%2+i*n%3==0;case e.Patterns.PATTERN110:return(i*n%2+i*n%3)%2==0;case e.Patterns.PATTERN111:return(i*n%3+(i+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){for(var i=e.size,n=0,a=0,r=0,o=null,s=null,u=0;u<i;u++){a=r=0,o=s=null;for(var l=0;l<i;l++){var d=e.get(u,l);d===o?a++:(a>=5&&(n+=t+(a-5)),o=d,a=1),(d=e.get(l,u))===s?r++:(r>=5&&(n+=t+(r-5)),s=d,r=1)}a>=5&&(n+=t+(a-5)),r>=5&&(n+=t+(r-5))}return n},e.getPenaltyN2=function(e){for(var t=e.size,n=0,a=0;a<t-1;a++)for(var r=0;r<t-1;r++){var o=e.get(a,r)+e.get(a,r+1)+e.get(a+1,r)+e.get(a+1,r+1);4!==o&&0!==o||n++}return n*i},e.getPenaltyN3=function(e){for(var t=e.size,i=0,a=0,r=0,o=0;o<t;o++){a=r=0;for(var s=0;s<t;s++)a=a<<1&2047|e.get(o,s),s>=10&&(1488===a||93===a)&&i++,r=r<<1&2047|e.get(s,o),s>=10&&(1488===r||93===r)&&i++}return i*n},e.getPenaltyN4=function(e){for(var t=0,i=e.data.length,n=0;n<i;n++)t+=e.data[n];return Math.abs(Math.ceil(100*t/i/5)-10)*a},e.applyMask=function(e,t){for(var i=t.size,n=0;n<i;n++)for(var a=0;a<i;a++)t.isReserved(a,n)||t.xor(a,n,r(e,a,n))},e.getBestMask=function(t,i){for(var n=Object.keys(e.Patterns).length,a=0,r=1/0,o=0;o<n;o++){i(o),e.applyMask(o,t);var s=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),s<r&&(r=s,a=o)}return a}}(zF)),zF),s=GF(),u=function(){if(YF)return XF;YF=1;var e=QF();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var i=new Uint8Array(t.length+this.degree);i.set(t);var n=e.mod(i,this.genPoly),a=this.degree-n.length;if(a>0){var r=new Uint8Array(this.degree);return r.set(n,a),r}return n},XF=t}(),l=dW(),d=function(){if(hW)return cW;hW=1;var e=xF(),t=e.getBCHDigit(1335);return cW.getEncodedBits=function(i,n){for(var a=i.bit<<3|n,r=a<<10;e.getBCHDigit(r)-t>=0;)r^=1335<<e.getBCHDigit(r)-t;return 21522^(a<<10|r)},cW}(),h=lW(),c=AW();function m(e,t,i){var n,a,r=e.size,o=d.getEncodedBits(t,i);for(n=0;n<15;n++)a=1==(o>>n&1),n<6?e.set(n,8,a,!0):n<8?e.set(n+1,8,a,!0):e.set(r-15+n,8,a,!0),n<8?e.set(8,r-n-1,a,!0):n<9?e.set(8,15-n-1+1,a,!0):e.set(8,15-n-1,a,!0);e.set(r-8,8,1,!0)}function f(t,n,a){var r=new i;a.forEach(function(e){r.put(e.mode.bit,4),r.put(e.getLength(),h.getCharCountIndicator(e.mode,t)),e.write(r)});var o=8*(e.getSymbolTotalCodewords(t)-s.getTotalCodewordsCount(t,n));for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);for(var l=(o-r.getLengthInBits())/8,d=0;d<l;d++)r.put(d%2?17:236,8);return function(t,i,n){for(var a=e.getSymbolTotalCodewords(i),r=s.getTotalCodewordsCount(i,n),o=a-r,l=s.getBlocksCount(i,n),d=l-a%l,h=Math.floor(a/l),c=Math.floor(o/l),m=c+1,f=h-c,v=new u(f),p=0,g=new Array(l),y=new Array(l),b=0,w=new Uint8Array(t.buffer),k=0;k<l;k++){var S=k<d?c:m;g[k]=w.slice(p,p+S),y[k]=v.encode(g[k]),p+=S,b=Math.max(b,S)}var E,M,T=new Uint8Array(a),P=0;for(E=0;E<b;E++)for(M=0;M<l;M++)E<g[M].length&&(T[P++]=g[M][E]);for(E=0;E<f;E++)for(M=0;M<l;M++)T[P++]=y[M][E];return T}(r,t,n)}function v(t,i,s,u){var d;if(Array.isArray(t))d=c.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var h=i;if(!h){var v=c.rawSplit(t);h=l.getBestVersionForData(v,s)}d=c.fromString(t,h||40)}var p=l.getBestVersionForData(d,s);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(i){if(i<p)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+p+".\n")}else i=p;var g=f(i,s,d),y=e.getSymbolSize(i),b=new n(y);return function(e,t){for(var i=e.size,n=r.getPositions(t),a=0;a<n.length;a++)for(var o=n[a][0],s=n[a][1],u=-1;u<=7;u++)if(!(o+u<=-1||i<=o+u))for(var l=-1;l<=7;l++)s+l<=-1||i<=s+l||(u>=0&&u<=6&&(0===l||6===l)||l>=0&&l<=6&&(0===u||6===u)||u>=2&&u<=4&&l>=2&&l<=4?e.set(o+u,s+l,!0,!0):e.set(o+u,s+l,!1,!0))}(b,i),function(e){for(var t=e.size,i=8;i<t-8;i++){var n=i%2==0;e.set(i,6,n,!0),e.set(6,i,n,!0)}}(b),function(e,t){for(var i=a.getPositions(t),n=0;n<i.length;n++)for(var r=i[n][0],o=i[n][1],s=-2;s<=2;s++)for(var u=-2;u<=2;u++)-2===s||2===s||-2===u||2===u||0===s&&0===u?e.set(r+s,o+u,!0,!0):e.set(r+s,o+u,!1,!0)}(b,i),m(b,s,0),i>=7&&function(e,t){for(var i,n,a,r=e.size,o=l.getEncodedBits(t),s=0;s<18;s++)i=Math.floor(s/3),n=s%3+r-8-3,a=1==(o>>s&1),e.set(i,n,a,!0),e.set(n,i,a,!0)}(b,i),function(e,t){for(var i=e.size,n=-1,a=i-1,r=7,o=0,s=i-1;s>0;s-=2)for(6===s&&s--;;){for(var u=0;u<2;u++)if(!e.isReserved(a,s-u)){var l=!1;o<t.length&&(l=1==(t[o]>>>r&1)),e.set(a,s-u,l),-1===--r&&(o++,r=7)}if((a+=n)<0||i<=a){a-=n,n=-n;break}}}(b,g),isNaN(u)&&(u=o.getBestMask(b,m.bind(null,b,s))),o.applyMask(u,b),m(b,s,u),{modules:b,version:i,errorCorrectionLevel:s,maskPattern:u,segments:d}}return AF.create=function(i,n){if(void 0===i||""===i)throw new Error("No input text");var a,r,s=t.M;return void 0!==n&&(s=t.from(n.errorCorrectionLevel,t.M),a=l.from(n.version),r=o.from(n.maskPattern),n.toSJISFunc&&e.setToSJISFunction(n.toSJISFunc)),v(i,a,s,r)},AF}var xW,CW,IW={},LW={};function _W(){return xW||(xW=1,function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");var i=parseInt(t.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:255&i,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});var i=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,a=e.scale||4;return{width:n,scale:n?4:a,margin:i,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,i){var n=e.getScale(t,i);return Math.floor((t+2*i.margin)*n)},e.qrToImageData=function(t,i,n){for(var a=i.modules.size,r=i.modules.data,o=e.getScale(a,n),s=Math.floor((a+2*n.margin)*o),u=n.margin*o,l=[n.color.light,n.color.dark],d=0;d<s;d++)for(var h=0;h<s;h++){var c=4*(d*s+h),m=n.color.light;if(d>=u&&h>=u&&d<s-u&&h<s-u)m=l[r[Math.floor((d-u)/o)*a+Math.floor((h-u)/o)]?1:0];t[c++]=m.r,t[c++]=m.g,t[c++]=m.b,t[c]=m.a}}}(LW)),LW}function RW(){return CW||(CW=1,function(e){var t=_W();e.render=function(e,i,n){var a=n,r=i;void 0!==a||i&&i.getContext||(a=i,i=void 0),i||(r=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),a=t.getOptions(a);var o=t.getImageWidth(e.modules.size,a),s=r.getContext("2d"),u=s.createImageData(o,o);return t.qrToImageData(u.data,e,a),function(e,t,i){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=i,t.width=i,t.style.height=i+"px",t.style.width=i+"px"}(s,r,o),s.putImageData(u,0,0),r},e.renderToDataURL=function(t,i,n){var a=n;void 0!==a||i&&i.getContext||(a=i,i=void 0),a||(a={});var r=e.render(t,i,a),o=a.type||"image/png",s=a.rendererOpts||{};return r.toDataURL(o,s.quality)}}(IW)),IW}var FW,WW,OW={};function $W(){if(FW)return OW;FW=1;var e=_W();function t(e,t){var i=e.a/255,n=t+'="'+e.hex+'"';return i<1?n+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':n}function i(e,t,i){var n=e+t;return void 0!==i&&(n+=" "+i),n}return OW.render=function(n,a,r){var o=e.getOptions(a),s=n.modules.size,u=n.modules.data,l=s+2*o.margin,d=o.color.light.a?"<path "+t(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",h="<path "+t(o.color.dark,"stroke")+' d="'+function(e,t,n){for(var a="",r=0,o=!1,s=0,u=0;u<e.length;u++){var l=Math.floor(u%t),d=Math.floor(u/t);l||o||(o=!0),e[u]?(s++,u>0&&l>0&&e[u-1]||(a+=o?i("M",l+n,.5+d+n):i("m",r,0),r=0,o=!1),l+1<t&&e[u+1]||(a+=i("h",s),s=0)):r++}return a}(u,s,o.margin)+'"/>',c='viewBox="0 0 '+l+" "+l+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+c+' shape-rendering="crispEdges">'+d+h+"</svg>\n";return"function"==typeof r&&r(null,m),m},OW}var NW,jW,BW=function(){if(WW)return MF;WW=1;var e=TF(),t=DW(),i=RW(),n=$W();function a(i,n,a,r,o){var s=[].slice.call(arguments,1),u=s.length,l="function"==typeof s[u-1];if(!l&&!e())throw new Error("Callback required as last argument");if(!l){if(u<1)throw new Error("Too few arguments provided");return 1===u?(a=n,n=r=void 0):2!==u||n.getContext||(r=a,a=n,n=void 0),new Promise(function(e,o){try{var s=t.create(a,r);e(i(s,n,r))}catch(e){o(e)}})}if(u<2)throw new Error("Too few arguments provided");2===u?(o=a,a=n,n=r=void 0):3===u&&(n.getContext&&void 0===o?(o=r,r=void 0):(o=r,r=a,a=n,n=void 0));try{var d=t.create(a,r);o(null,i(d,n,r))}catch(e){o(e)}}return MF.create=t.create,MF.toCanvas=a.bind(null,i.render),MF.toDataURL=a.bind(null,i.renderToDataURL),MF.toString=a.bind(null,function(e,t,i){return n.render(e,i)}),MF}(),zW=ot(BW),UW=e=>e,HW=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).scaleFactor=1,t}return re(e,tu),ee(e,[{key:"styles",value:function(){var e;return this.component?B(`\n :host {\n box-sizing: border-box;\n ${Mu(this.component,this.scaleFactor)}\n ${ku(this.component,this.scaleFactor)}\n background-color: ${this.component.fillColor||this.component.borderColor||"transparent"};\n border-width: ${null!==(e=this.component.borderWidth)&&void 0!==e?e:0}px;\n ${fu(this.component.borderColor||"transparent")}\n border-style: solid;\n display: inline-block;\n }`):B(":host { box-sizing: border-box; display: inline-block; }")}},{key:"renderQr",value:function(){var e,t,i,a,r,o,s,u;return le(function(l){for(;;)switch(l.p=l.n){case 0:if((a=this.renderRoot.querySelector("canvas"))&&null!==(e=this.component)&&void 0!==e&&e.url){l.n=1;break}return l.a(2);case 1:return r=this.computedSize,a.width=r,a.height=r,a.style.width=`${r}px`,a.style.height=`${r}px`,o=null!==(t=za(this.component.color))&&void 0!==t?t:"#000000",s=null!==(i=za(this.component.fillColor))&&void 0!==i?i:"#ffffff",l.p=2,l.n=3,K(zW.toCanvas(a,this.component.url,{width:r,color:{dark:o,light:s},margin:0}));case 3:l.n=5;break;case 4:l.p=4,u=l.v,n.error(`QR render failed for URL "${this.component.url}":`,u);case 5:return l.a(2)}},null,this,[[2,4]],Promise)}},{key:"firstUpdated",value:function(){this.renderQr()}},{key:"updated",value:function(e){(e.has("component")||e.has("scaleFactor"))&&Promise.resolve().then(()=>this.renderQr())}},{key:"computedSize",get:function(){var e,t=Number(null!==(e=this.component.borderWidth)&&void 0!==e?e:0),i=Number(this.component.width)*this.scaleFactor,n=Math.floor(this.component.width?i-2*t:360);return Math.max(1,n)}},{key:"render",value:function(){if(this.component){var e=this.computedSize;return N(NW||(NW=UW`<canvas width="${0}" height="${0}" style="width:${0}px;height:${0}px;"></canvas>`),e,e,e,e)}return N(jW||(jW=UW`<canvas></canvas>`))}}])}();ft([Kt({type:Object})],HW.prototype,"component",void 0),ft([Kt({type:Number})],HW.prototype,"scaleFactor",void 0),HW=ft([St("nami-qr-code")],HW);var GW,VW=e=>e,KW=function(){function e(){var t;return Y(this,e),(t=X(this,e)).inFocusedState=!1,t.scaleFactor=1,t.isActive=!1,t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||t._handleClick()},t}return re(e,tu),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),this.isActive=!!this.component.checked,this.contextProvider.setFormState(this.component.formId,this.isActive),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown)}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown)}},{key:"_handleClick",value:function(){var e=this.component,t=e.onTap,i=e.disabled,a=e.formId;if(!0!==i){this.component.checked=!this.component.checked,this.isActive=this.component.checked;var r=void 0;r=a?{function:(null==t?void 0:t.function)||"",parameters:ie({},null==t?void 0:t.parameters,{formId:a||""})}:t,!this.contextProvider.flow||a?ds({onTap:r,contextProvider:this.contextProvider}):this.component.id?(n.debug(`Trigger NamiFlow action for component ${this.component.id}`),this.contextProvider.flow.triggerActions(this.component.id)):n.warn("Cannot trigger button hoisting without an id")}}},{key:"styles",value:function(){return B(`\n :host {\n box-sizing: border-box;\n }\n :host .toggle-plate {\n display: flex;\n position: relative;\n ${this.applyPlateStyles()}\n }\n :host .toggle-handle {\n display: flex;\n position: relative;\n ${this.applyHandleStyles()}\n }\n `)}},{key:"applyPlateStyles",value:function(){var e=this.component,t=this.scaleFactor,i=this.isActive||e.checked||!1,n=i?e.activePlateFillColor||"transparent":e.inactivePlateFillColor||"transparent",a=i?e.activePlateBorderColor||"transparent":e.inactivePlateBorderColor||"transparent";return`\n transition: all 0.3s;\n ${Mu(e,t)};\n ${fu(a)}\n border-width: ${i?e.activePlateBorderWidth||0:e.inactivePlateBorderWidth||0}px !important;\n border-style: solid;\n border-radius: ${e.borderRadius||0}px !important;\n padding: ${e.innerPadding||0}px !important;\n ${mu(n)}\n `}},{key:"applyHandleStyles",value:function(){var e=this.component,t=e.checked||!1,i=t?e.activeHandleFillColor||"transparent":e.inactiveHandleFillColor||"transparent",n=t?e.activeHandleBorderColor||"transparent":e.inactiveHandleBorderColor||"transparent";return`\n transition: all 0.3s;\n height: 100%;\n width: 50%;\n border-radius: ${e.borderRadius}px !important;\n ${fu(n)}\n border-width: ${t?e.activeHandleBorderWidth||0:e.inactiveHandleBorderWidth||0}px !important;\n ${Pu(e.dropShadow)}\n border-style: solid;\n left: ${t?"50%":0};\n ${mu(i)}\n `}},{key:"render",value:function(){return this.tabIndex=0,this.role="switch",N(GW||(GW=VW`
535
+ `)),ft([Kt({type:Object})],MF.prototype,"paywall",void 0),ft([Kt({type:Object})],MF.prototype,"campaign",void 0),ft([Kt({type:Object})],MF.prototype,"context",void 0),ft([Kt({type:Boolean})],MF.prototype,"active",void 0),ft([function({context:e}){return(t,i)=>{var n=new WeakMap;if("object"==typeof i)return{get(){return t.get.call(this)},set(e){return n.get(this).setValue(e),t.set.call(this,e)},init(t){return n.set(this,new Gs(this,{context:e,initialValue:t})),t}};t.constructor.addInitializer(t=>{n.set(t,new Gs(t,{context:e}))});var a,r=Object.getOwnPropertyDescriptor(t,i);if(void 0===r){var o=new WeakMap;a={get(){return o.get(this)},set(e){n.get(this).setValue(e),o.set(this,e)},configurable:!0,enumerable:!0}}else{var s=r.set;a=ie({},r,{set(e){n.get(this).setValue(e),null==s||s.call(this,e)}})}Object.defineProperty(t,i,a)}}({context:Ks})],MF.prototype,"contextProvider",void 0),MF=ft([St("nami-paywall-screen")],MF);var TF,PF,AF={};function DF(){return PF?TF:(PF=1,TF=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var xF,CF={},IF={};function LF(){if(xF)return IF;var e;xF=1;var t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return IF.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},IF.getSymbolTotalCodewords=function(e){return t[e]},IF.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},IF.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},IF.isKanjiModeEnabled=function(){return void 0!==e},IF.toSJIS=function(t){return e(t)},IF}var _F,RF,FF,WF,OF,$F={};function NF(){return _F||(_F=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,i){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(e){return i}}}($F)),$F}var jF,BF={};var zF,UF={};var HF,GF={};var VF,KF={};function XF(){if(VF)return KF;VF=1;var e=NF(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return KF.getBlocksCount=function(i,n){switch(n){case e.L:return t[4*(i-1)+0];case e.M:return t[4*(i-1)+1];case e.Q:return t[4*(i-1)+2];case e.H:return t[4*(i-1)+3];default:return}},KF.getTotalCodewordsCount=function(t,n){switch(n){case e.L:return i[4*(t-1)+0];case e.M:return i[4*(t-1)+1];case e.Q:return i[4*(t-1)+2];case e.H:return i[4*(t-1)+3];default:return}},KF}var YF,qF,JF,QF,ZF={},eW={};function tW(){return qF||(qF=1,function(e){var t=function(){if(YF)return eW;YF=1;var e=new Uint8Array(512),t=new Uint8Array(256);return function(){for(var i=1,n=0;n<255;n++)e[n]=i,t[i]=n,256&(i<<=1)&&(i^=285);for(var a=255;a<512;a++)e[a]=e[a-255]}(),eW.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},eW.exp=function(t){return e[t]},eW.mul=function(i,n){return 0===i||0===n?0:e[t[i]+t[n]]},eW}();e.mul=function(e,i){for(var n=new Uint8Array(e.length+i.length-1),a=0;a<e.length;a++)for(var r=0;r<i.length;r++)n[a+r]^=t.mul(e[a],i[r]);return n},e.mod=function(e,i){for(var n=new Uint8Array(e);n.length-i.length>=0;){for(var a=n[0],r=0;r<i.length;r++)n[r]^=t.mul(i[r],a);for(var o=0;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},e.generateECPolynomial=function(i){for(var n=new Uint8Array([1]),a=0;a<i;a++)n=e.mul(n,new Uint8Array([1,t.exp(a)]));return n}}(ZF)),ZF}var iW,nW={},aW={},rW={};function oW(){return iW||(iW=1,rW.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),rW}var sW,uW,lW,dW={};function hW(){if(sW)return dW;sW=1;var e="[0-9]+",t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(t=t.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";dW.KANJI=new RegExp(t,"g"),dW.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),dW.BYTE=new RegExp(i,"g"),dW.NUMERIC=new RegExp(e,"g"),dW.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var n=new RegExp("^"+t+"$"),a=new RegExp("^"+e+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return dW.testKanji=function(e){return n.test(e)},dW.testNumeric=function(e){return a.test(e)},dW.testAlphanumeric=function(e){return r.test(e)},dW}function cW(){return uW||(uW=1,function(e){var t=oW(),i=hW();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,i){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?e.ccBits[0]:i<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return i.testNumeric(t)?e.NUMERIC:i.testAlphanumeric(t)?e.ALPHANUMERIC:i.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,i){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(e){return i}}}(aW)),aW}function mW(){return lW||(lW=1,function(e){var t=LF(),i=XF(),n=NF(),a=cW(),r=oW(),o=t.getBCHDigit(7973);function s(e,t){return a.getCharCountIndicator(e,t)+4}function u(e,t){var i=0;return e.forEach(function(e){var n=s(e.mode,t);i+=n+e.getBitsLength()}),i}e.from=function(e,t){return r.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,n,o){if(!r.isValid(e))throw new Error("Invalid QR Code version");void 0===o&&(o=a.BYTE);var u=8*(t.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,n));if(o===a.MIXED)return u;var l=u-s(o,e);switch(o){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(t,i){var r,o=n.from(i,n.M);if(Array.isArray(t)){if(t.length>1)return function(t,i){for(var n=1;n<=40;n++)if(u(t,n)<=e.getCapacity(n,i,a.MIXED))return n}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,i,n){for(var a=1;a<=40;a++)if(i<=e.getCapacity(a,n,t))return a}(r.mode,r.getLength(),o)},e.getEncodedBits=function(e){if(!r.isValid(e)||e<7)throw new Error("Invalid QR Code version");for(var i=e<<12;t.getBCHDigit(i)-o>=0;)i^=7973<<t.getBCHDigit(i)-o;return e<<12|i}}(nW)),nW}var fW,vW={};var pW,gW,yW,bW,wW,kW,SW,EW,MW={};var TW,PW,AW,DW={exports:{}};function xW(){return TW||(TW=1,function(e){var t={single_source_shortest_paths:function(e,i,n){var a={},r={};r[i]=0;var o,s,u,l,d,h,c,m=t.PriorityQueue.make();for(m.push(i,0);!m.empty();)for(u in s=(o=m.pop()).value,l=o.cost,d=e[s]||{})d.hasOwnProperty(u)&&(h=l+d[u],c=r[u],(void 0===r[u]||c>h)&&(r[u]=h,m.push(u,h),a[u]=s));if(void 0!==n&&void 0===r[n]){var f=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(f)}return a},extract_shortest_path_from_predecessor_list:function(e,t){for(var i=[],n=t;n;)i.push(n),e[n],n=e[n];return i.reverse(),i},find_path:function(e,i,n){var a=t.single_source_shortest_paths(e,i,n);return t.extract_shortest_path_from_predecessor_list(a,n)},PriorityQueue:{make:function(e){var i,n=t.PriorityQueue,a={};for(i in e=e||{},n)n.hasOwnProperty(i)&&(a[i]=n[i]);return a.queue=[],a.sorter=e.sorter||n.default_sorter,a},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var i={value:e,cost:t};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(DW)),DW.exports}function CW(){return PW||(PW=1,function(e){var t=cW(),i=function(){if(gW)return pW;gW=1;var e=cW();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){var t,i,n;for(t=0;t+3<=this.data.length;t+=3)i=this.data.substr(t,3),n=parseInt(i,10),e.put(n,10);var a=this.data.length-t;a>0&&(i=this.data.substr(t),n=parseInt(i,10),e.put(n,3*a+1))},pW=t}(),n=function(){if(bW)return yW;bW=1;var e=cW(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(t){this.mode=e.ALPHANUMERIC,this.data=t}return i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){var i;for(i=0;i+2<=this.data.length;i+=2){var n=45*t.indexOf(this.data[i]);n+=t.indexOf(this.data[i+1]),e.put(n,11)}this.data.length%2&&e.put(t.indexOf(this.data[i]),6)},yW=i}(),a=function(){if(kW)return wW;kW=1;var e=cW();function t(t){this.mode=e.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(var t=0,i=this.data.length;t<i;t++)e.put(this.data[t],8)},wW=t}(),r=function(){if(EW)return SW;EW=1;var e=cW(),t=LF();function i(t){this.mode=e.KANJI,this.data=t}return i.getBitsLength=function(e){return 13*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){var i;for(i=0;i<this.data.length;i++){var n=t.toSJIS(this.data[i]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[i]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},SW=i}(),o=hW(),s=LF(),u=xW();function l(e){return unescape(encodeURIComponent(e)).length}function d(e,t,i){for(var n,a=[];null!==(n=e.exec(i));)a.push({data:n[0],index:n.index,mode:t,length:n[0].length});return a}function h(e){var i,n,a=d(o.NUMERIC,t.NUMERIC,e),r=d(o.ALPHANUMERIC,t.ALPHANUMERIC,e);return s.isKanjiModeEnabled()?(i=d(o.BYTE,t.BYTE,e),n=d(o.KANJI,t.KANJI,e)):(i=d(o.BYTE_KANJI,t.BYTE,e),n=[]),a.concat(r,i,n).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function c(e,o){switch(o){case t.NUMERIC:return i.getBitsLength(e);case t.ALPHANUMERIC:return n.getBitsLength(e);case t.KANJI:return r.getBitsLength(e);case t.BYTE:return a.getBitsLength(e)}}function m(e,o){var u,l=t.getBestModeForData(e);if((u=t.from(o,l))!==t.BYTE&&u.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(u)+".\n Suggested mode is: "+t.toString(l));switch(u!==t.KANJI||s.isKanjiModeEnabled()||(u=t.BYTE),u){case t.NUMERIC:return new i(e);case t.ALPHANUMERIC:return new n(e);case t.KANJI:return new r(e);case t.BYTE:return new a(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},e.fromString=function(i,n){for(var a=function(e){for(var i=[],n=0;n<e.length;n++){var a=e[n];switch(a.mode){case t.NUMERIC:i.push([a,{data:a.data,mode:t.ALPHANUMERIC,length:a.length},{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.ALPHANUMERIC:i.push([a,{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.KANJI:i.push([a,{data:a.data,mode:t.BYTE,length:l(a.data)}]);break;case t.BYTE:i.push([{data:a.data,mode:t.BYTE,length:l(a.data)}])}}return i}(h(i,s.isKanjiModeEnabled())),r=function(e,i){for(var n={},a={start:{}},r=["start"],o=0;o<e.length;o++){for(var s=e[o],u=[],l=0;l<s.length;l++){var d=s[l],h=""+o+l;u.push(h),n[h]={node:d,lastCount:0},a[h]={};for(var m=0;m<r.length;m++){var f=r[m];n[f]&&n[f].node.mode===d.mode?(a[f][h]=c(n[f].lastCount+d.length,d.mode)-c(n[f].lastCount,d.mode),n[f].lastCount+=d.length):(n[f]&&(n[f].lastCount=d.length),a[f][h]=c(d.length,d.mode)+4+t.getCharCountIndicator(d.mode,i))}}r=u}for(var v=0;v<r.length;v++)a[r[v]].end=0;return{map:a,table:n}}(a,n),o=u.find_path(r.map,"start","end"),d=[],m=1;m<o.length-1;m++)d.push(r.table[o[m]].node);return e.fromArray(function(e){return e.reduce(function(e,t){var i=e.length-1>=0?e[e.length-1]:null;return i&&i.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}(d))},e.rawSplit=function(t){return e.fromArray(h(t,s.isKanjiModeEnabled()))}}(MW)),MW}function IW(){if(AW)return CF;AW=1;var e=LF(),t=NF(),i=function(){if(FF)return RF;function e(){this.buffer=[],this.length=0}return FF=1,e.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var i=0;i<t;i++)this.putBit(1==(e>>>t-i-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},RF=e}(),n=function(){if(OF)return WF;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return OF=1,e.prototype.set=function(e,t,i,n){var a=e*this.size+t;this.data[a]=i,n&&(this.reservedBit[a]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},WF=e}(),a=(jF||(jF=1,function(e){var t=LF().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];for(var i=Math.floor(e/7)+2,n=t(e),a=145===n?26:2*Math.ceil((n-13)/(2*i-2)),r=[n-7],o=1;o<i-1;o++)r[o]=r[o-1]-a;return r.push(6),r.reverse()},e.getPositions=function(t){for(var i=[],n=e.getRowColCoords(t),a=n.length,r=0;r<a;r++)for(var o=0;o<a;o++)0===r&&0===o||0===r&&o===a-1||r===a-1&&0===o||i.push([n[r],n[o]]);return i}}(BF)),BF),r=function(){if(zF)return UF;zF=1;var e=LF().getSymbolSize;return UF.getPositions=function(t){var i=e(t);return[[0,0],[i-7,0],[0,i-7]]},UF}(),o=(HF||(HF=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t=3,i=3,n=40,a=10;function r(t,i,n){switch(t){case e.Patterns.PATTERN000:return(i+n)%2==0;case e.Patterns.PATTERN001:return i%2==0;case e.Patterns.PATTERN010:return n%3==0;case e.Patterns.PATTERN011:return(i+n)%3==0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(n/3))%2==0;case e.Patterns.PATTERN101:return i*n%2+i*n%3==0;case e.Patterns.PATTERN110:return(i*n%2+i*n%3)%2==0;case e.Patterns.PATTERN111:return(i*n%3+(i+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){for(var i=e.size,n=0,a=0,r=0,o=null,s=null,u=0;u<i;u++){a=r=0,o=s=null;for(var l=0;l<i;l++){var d=e.get(u,l);d===o?a++:(a>=5&&(n+=t+(a-5)),o=d,a=1),(d=e.get(l,u))===s?r++:(r>=5&&(n+=t+(r-5)),s=d,r=1)}a>=5&&(n+=t+(a-5)),r>=5&&(n+=t+(r-5))}return n},e.getPenaltyN2=function(e){for(var t=e.size,n=0,a=0;a<t-1;a++)for(var r=0;r<t-1;r++){var o=e.get(a,r)+e.get(a,r+1)+e.get(a+1,r)+e.get(a+1,r+1);4!==o&&0!==o||n++}return n*i},e.getPenaltyN3=function(e){for(var t=e.size,i=0,a=0,r=0,o=0;o<t;o++){a=r=0;for(var s=0;s<t;s++)a=a<<1&2047|e.get(o,s),s>=10&&(1488===a||93===a)&&i++,r=r<<1&2047|e.get(s,o),s>=10&&(1488===r||93===r)&&i++}return i*n},e.getPenaltyN4=function(e){for(var t=0,i=e.data.length,n=0;n<i;n++)t+=e.data[n];return Math.abs(Math.ceil(100*t/i/5)-10)*a},e.applyMask=function(e,t){for(var i=t.size,n=0;n<i;n++)for(var a=0;a<i;a++)t.isReserved(a,n)||t.xor(a,n,r(e,a,n))},e.getBestMask=function(t,i){for(var n=Object.keys(e.Patterns).length,a=0,r=1/0,o=0;o<n;o++){i(o),e.applyMask(o,t);var s=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),s<r&&(r=s,a=o)}return a}}(GF)),GF),s=XF(),u=function(){if(QF)return JF;QF=1;var e=tW();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var i=new Uint8Array(t.length+this.degree);i.set(t);var n=e.mod(i,this.genPoly),a=this.degree-n.length;if(a>0){var r=new Uint8Array(this.degree);return r.set(n,a),r}return n},JF=t}(),l=mW(),d=function(){if(fW)return vW;fW=1;var e=LF(),t=e.getBCHDigit(1335);return vW.getEncodedBits=function(i,n){for(var a=i.bit<<3|n,r=a<<10;e.getBCHDigit(r)-t>=0;)r^=1335<<e.getBCHDigit(r)-t;return 21522^(a<<10|r)},vW}(),h=cW(),c=CW();function m(e,t,i){var n,a,r=e.size,o=d.getEncodedBits(t,i);for(n=0;n<15;n++)a=1==(o>>n&1),n<6?e.set(n,8,a,!0):n<8?e.set(n+1,8,a,!0):e.set(r-15+n,8,a,!0),n<8?e.set(8,r-n-1,a,!0):n<9?e.set(8,15-n-1+1,a,!0):e.set(8,15-n-1,a,!0);e.set(r-8,8,1,!0)}function f(t,n,a){var r=new i;a.forEach(function(e){r.put(e.mode.bit,4),r.put(e.getLength(),h.getCharCountIndicator(e.mode,t)),e.write(r)});var o=8*(e.getSymbolTotalCodewords(t)-s.getTotalCodewordsCount(t,n));for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);for(var l=(o-r.getLengthInBits())/8,d=0;d<l;d++)r.put(d%2?17:236,8);return function(t,i,n){for(var a=e.getSymbolTotalCodewords(i),r=s.getTotalCodewordsCount(i,n),o=a-r,l=s.getBlocksCount(i,n),d=l-a%l,h=Math.floor(a/l),c=Math.floor(o/l),m=c+1,f=h-c,v=new u(f),p=0,g=new Array(l),y=new Array(l),b=0,w=new Uint8Array(t.buffer),k=0;k<l;k++){var S=k<d?c:m;g[k]=w.slice(p,p+S),y[k]=v.encode(g[k]),p+=S,b=Math.max(b,S)}var E,M,T=new Uint8Array(a),P=0;for(E=0;E<b;E++)for(M=0;M<l;M++)E<g[M].length&&(T[P++]=g[M][E]);for(E=0;E<f;E++)for(M=0;M<l;M++)T[P++]=y[M][E];return T}(r,t,n)}function v(t,i,s,u){var d;if(Array.isArray(t))d=c.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var h=i;if(!h){var v=c.rawSplit(t);h=l.getBestVersionForData(v,s)}d=c.fromString(t,h||40)}var p=l.getBestVersionForData(d,s);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(i){if(i<p)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+p+".\n")}else i=p;var g=f(i,s,d),y=e.getSymbolSize(i),b=new n(y);return function(e,t){for(var i=e.size,n=r.getPositions(t),a=0;a<n.length;a++)for(var o=n[a][0],s=n[a][1],u=-1;u<=7;u++)if(!(o+u<=-1||i<=o+u))for(var l=-1;l<=7;l++)s+l<=-1||i<=s+l||(u>=0&&u<=6&&(0===l||6===l)||l>=0&&l<=6&&(0===u||6===u)||u>=2&&u<=4&&l>=2&&l<=4?e.set(o+u,s+l,!0,!0):e.set(o+u,s+l,!1,!0))}(b,i),function(e){for(var t=e.size,i=8;i<t-8;i++){var n=i%2==0;e.set(i,6,n,!0),e.set(6,i,n,!0)}}(b),function(e,t){for(var i=a.getPositions(t),n=0;n<i.length;n++)for(var r=i[n][0],o=i[n][1],s=-2;s<=2;s++)for(var u=-2;u<=2;u++)-2===s||2===s||-2===u||2===u||0===s&&0===u?e.set(r+s,o+u,!0,!0):e.set(r+s,o+u,!1,!0)}(b,i),m(b,s,0),i>=7&&function(e,t){for(var i,n,a,r=e.size,o=l.getEncodedBits(t),s=0;s<18;s++)i=Math.floor(s/3),n=s%3+r-8-3,a=1==(o>>s&1),e.set(i,n,a,!0),e.set(n,i,a,!0)}(b,i),function(e,t){for(var i=e.size,n=-1,a=i-1,r=7,o=0,s=i-1;s>0;s-=2)for(6===s&&s--;;){for(var u=0;u<2;u++)if(!e.isReserved(a,s-u)){var l=!1;o<t.length&&(l=1==(t[o]>>>r&1)),e.set(a,s-u,l),-1===--r&&(o++,r=7)}if((a+=n)<0||i<=a){a-=n,n=-n;break}}}(b,g),isNaN(u)&&(u=o.getBestMask(b,m.bind(null,b,s))),o.applyMask(u,b),m(b,s,u),{modules:b,version:i,errorCorrectionLevel:s,maskPattern:u,segments:d}}return CF.create=function(i,n){if(void 0===i||""===i)throw new Error("No input text");var a,r,s=t.M;return void 0!==n&&(s=t.from(n.errorCorrectionLevel,t.M),a=l.from(n.version),r=o.from(n.maskPattern),n.toSJISFunc&&e.setToSJISFunction(n.toSJISFunc)),v(i,a,s,r)},CF}var LW,_W,RW={},FW={};function WW(){return LW||(LW=1,function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");var i=parseInt(t.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:255&i,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});var i=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,a=e.scale||4;return{width:n,scale:n?4:a,margin:i,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,i){var n=e.getScale(t,i);return Math.floor((t+2*i.margin)*n)},e.qrToImageData=function(t,i,n){for(var a=i.modules.size,r=i.modules.data,o=e.getScale(a,n),s=Math.floor((a+2*n.margin)*o),u=n.margin*o,l=[n.color.light,n.color.dark],d=0;d<s;d++)for(var h=0;h<s;h++){var c=4*(d*s+h),m=n.color.light;if(d>=u&&h>=u&&d<s-u&&h<s-u)m=l[r[Math.floor((d-u)/o)*a+Math.floor((h-u)/o)]?1:0];t[c++]=m.r,t[c++]=m.g,t[c++]=m.b,t[c]=m.a}}}(FW)),FW}function OW(){return _W||(_W=1,function(e){var t=WW();e.render=function(e,i,n){var a=n,r=i;void 0!==a||i&&i.getContext||(a=i,i=void 0),i||(r=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),a=t.getOptions(a);var o=t.getImageWidth(e.modules.size,a),s=r.getContext("2d"),u=s.createImageData(o,o);return t.qrToImageData(u.data,e,a),function(e,t,i){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=i,t.width=i,t.style.height=i+"px",t.style.width=i+"px"}(s,r,o),s.putImageData(u,0,0),r},e.renderToDataURL=function(t,i,n){var a=n;void 0!==a||i&&i.getContext||(a=i,i=void 0),a||(a={});var r=e.render(t,i,a),o=a.type||"image/png",s=a.rendererOpts||{};return r.toDataURL(o,s.quality)}}(RW)),RW}var $W,NW,jW={};function BW(){if($W)return jW;$W=1;var e=WW();function t(e,t){var i=e.a/255,n=t+'="'+e.hex+'"';return i<1?n+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':n}function i(e,t,i){var n=e+t;return void 0!==i&&(n+=" "+i),n}return jW.render=function(n,a,r){var o=e.getOptions(a),s=n.modules.size,u=n.modules.data,l=s+2*o.margin,d=o.color.light.a?"<path "+t(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",h="<path "+t(o.color.dark,"stroke")+' d="'+function(e,t,n){for(var a="",r=0,o=!1,s=0,u=0;u<e.length;u++){var l=Math.floor(u%t),d=Math.floor(u/t);l||o||(o=!0),e[u]?(s++,u>0&&l>0&&e[u-1]||(a+=o?i("M",l+n,.5+d+n):i("m",r,0),r=0,o=!1),l+1<t&&e[u+1]||(a+=i("h",s),s=0)):r++}return a}(u,s,o.margin)+'"/>',c='viewBox="0 0 '+l+" "+l+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+c+' shape-rendering="crispEdges">'+d+h+"</svg>\n";return"function"==typeof r&&r(null,m),m},jW}var zW,UW,HW=function(){if(NW)return AF;NW=1;var e=DF(),t=IW(),i=OW(),n=BW();function a(i,n,a,r,o){var s=[].slice.call(arguments,1),u=s.length,l="function"==typeof s[u-1];if(!l&&!e())throw new Error("Callback required as last argument");if(!l){if(u<1)throw new Error("Too few arguments provided");return 1===u?(a=n,n=r=void 0):2!==u||n.getContext||(r=a,a=n,n=void 0),new Promise(function(e,o){try{var s=t.create(a,r);e(i(s,n,r))}catch(e){o(e)}})}if(u<2)throw new Error("Too few arguments provided");2===u?(o=a,a=n,n=r=void 0):3===u&&(n.getContext&&void 0===o?(o=r,r=void 0):(o=r,r=a,a=n,n=void 0));try{var d=t.create(a,r);o(null,i(d,n,r))}catch(e){o(e)}}return AF.create=t.create,AF.toCanvas=a.bind(null,i.render),AF.toDataURL=a.bind(null,i.renderToDataURL),AF.toString=a.bind(null,function(e,t,i){return n.render(e,i)}),AF}(),GW=ot(HW),VW=e=>e,KW=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).scaleFactor=1,t}return re(e,tu),ee(e,[{key:"styles",value:function(){var e;return this.component?B(`\n :host {\n box-sizing: border-box;\n ${Mu(this.component,this.scaleFactor)}\n ${ku(this.component,this.scaleFactor)}\n background-color: ${this.component.fillColor||this.component.borderColor||"transparent"};\n border-width: ${null!==(e=this.component.borderWidth)&&void 0!==e?e:0}px;\n ${fu(this.component.borderColor||"transparent")}\n border-style: solid;\n display: inline-block;\n }`):B(":host { box-sizing: border-box; display: inline-block; }")}},{key:"renderQr",value:function(){var e,t,i,a,r,o,s,u;return le(function(l){for(;;)switch(l.p=l.n){case 0:if((a=this.renderRoot.querySelector("canvas"))&&null!==(e=this.component)&&void 0!==e&&e.url){l.n=1;break}return l.a(2);case 1:return r=this.computedSize,a.width=r,a.height=r,a.style.width=`${r}px`,a.style.height=`${r}px`,o=null!==(t=za(this.component.color))&&void 0!==t?t:"#000000",s=null!==(i=za(this.component.fillColor))&&void 0!==i?i:"#ffffff",l.p=2,l.n=3,K(GW.toCanvas(a,this.component.url,{width:r,color:{dark:o,light:s},margin:0}));case 3:l.n=5;break;case 4:l.p=4,u=l.v,n.error(`QR render failed for URL "${this.component.url}":`,u);case 5:return l.a(2)}},null,this,[[2,4]],Promise)}},{key:"firstUpdated",value:function(){this.renderQr()}},{key:"updated",value:function(e){(e.has("component")||e.has("scaleFactor"))&&Promise.resolve().then(()=>this.renderQr())}},{key:"computedSize",get:function(){var e,t=Number(null!==(e=this.component.borderWidth)&&void 0!==e?e:0),i=Number(this.component.width)*this.scaleFactor,n=Math.floor(this.component.width?i-2*t:360);return Math.max(1,n)}},{key:"render",value:function(){if(this.component){var e=this.computedSize;return N(zW||(zW=VW`<canvas width="${0}" height="${0}" style="width:${0}px;height:${0}px;"></canvas>`),e,e,e,e)}return N(UW||(UW=VW`<canvas></canvas>`))}}])}();ft([Kt({type:Object})],KW.prototype,"component",void 0),ft([Kt({type:Number})],KW.prototype,"scaleFactor",void 0),KW=ft([St("nami-qr-code")],KW);var XW,YW=e=>e,qW=function(){function e(){var t;return Y(this,e),(t=X(this,e)).inFocusedState=!1,t.scaleFactor=1,t.isActive=!1,t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||t._handleClick()},t}return re(e,tu),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),this.isActive=!!this.component.checked,this.contextProvider.setFormState(this.component.formId,this.isActive),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown)}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown)}},{key:"_handleClick",value:function(){var e=this.component,t=e.onTap,i=e.disabled,a=e.formId;if(!0!==i){this.component.checked=!this.component.checked,this.isActive=this.component.checked;var r=void 0;r=a?{function:(null==t?void 0:t.function)||"",parameters:ie({},null==t?void 0:t.parameters,{formId:a||""})}:t,!this.contextProvider.flow||a?ds({onTap:r,contextProvider:this.contextProvider}):this.component.id?(n.debug(`Trigger NamiFlow action for component ${this.component.id}`),this.contextProvider.flow.triggerActions(this.component.id)):n.warn("Cannot trigger button hoisting without an id")}}},{key:"styles",value:function(){return B(`\n :host {\n box-sizing: border-box;\n }\n :host .toggle-plate {\n display: flex;\n position: relative;\n ${this.applyPlateStyles()}\n }\n :host .toggle-handle {\n display: flex;\n position: relative;\n ${this.applyHandleStyles()}\n }\n `)}},{key:"applyPlateStyles",value:function(){var e=this.component,t=this.scaleFactor,i=this.isActive||e.checked||!1,n=i?e.activePlateFillColor||"transparent":e.inactivePlateFillColor||"transparent",a=i?e.activePlateBorderColor||"transparent":e.inactivePlateBorderColor||"transparent";return`\n transition: all 0.3s;\n ${Mu(e,t)};\n ${fu(a)}\n border-width: ${i?e.activePlateBorderWidth||0:e.inactivePlateBorderWidth||0}px !important;\n border-style: solid;\n border-radius: ${e.borderRadius||0}px !important;\n padding: ${e.innerPadding||0}px !important;\n ${mu(n)}\n `}},{key:"applyHandleStyles",value:function(){var e=this.component,t=e.checked||!1,i=t?e.activeHandleFillColor||"transparent":e.inactiveHandleFillColor||"transparent",n=t?e.activeHandleBorderColor||"transparent":e.inactiveHandleBorderColor||"transparent";return`\n transition: all 0.3s;\n height: 100%;\n width: 50%;\n border-radius: ${e.borderRadius}px !important;\n ${fu(n)}\n border-width: ${t?e.activeHandleBorderWidth||0:e.inactiveHandleBorderWidth||0}px !important;\n ${Pu(e.dropShadow)}\n border-style: solid;\n left: ${t?"50%":0};\n ${mu(i)}\n `}},{key:"render",value:function(){return this.tabIndex=0,this.role="switch",N(XW||(XW=YW`
533
536
  <div class="toggle-plate">
534
537
  <div class="toggle-handle"></div>
535
538
  </div>
536
- `))}}])}();ft([Kt({type:Object})],KW.prototype,"component",void 0),ft([Kt({type:Boolean})],KW.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],KW.prototype,"scaleFactor",void 0),ft([Kt({type:Boolean})],KW.prototype,"isActive",void 0),KW=ft([St("nami-toggle-switch")],KW);var XW,YW=e=>e,qW=function(){function e(){var t;return Y(this,e),(t=X(this,e)).inFocusedState=!1,t.scaleFactor=1,t.tabIndex=0,t}return re(e,tu),ee(e,[{key:"styles",value:function(){var e=this.component;return B(`\n :host {\n box-sizing: border-box;\n }\n :host .radio-button-wrapper {\n display: flex;\n transition: all 0.3s;\n ${Mu(e,this.scaleFactor)}\n ${fu(e.inactiveBorderColor||"transparent")}\n border-width: ${e.inactiveBorderWidth||0}px !important;\n border-style: solid;\n border-radius: 100%;\n padding: ${e.innerPadding||0}px !important;\n }\n :host .radio-button-wrapper.active {\n ${fu(e.activeBorderColor||"transparent")}\n border-width: ${e.activeBorderWidth||0}px !important;\n ${Pu(e.dropShadow)}\n }\n :host .radio-button-inner {\n ${mu(e.inactiveFillColor||"transparent")}\n width: 100%;\n height: 100%;\n border-radius: 100%;\n }\n :host .radio-button-wrapper.active .radio-button-inner {\n ${mu(e.activeFillColor||"transparent")}\n }\n `)}},{key:"isActive",get:function(){var e,t,i=null!==(e=null===(t=this.component.sku)||void 0===t?void 0:t.id)&&void 0!==e?e:"";return Object.values(this.contextProvider.selectedProducts()).includes(i)}},{key:"render",value:function(){var e=this.isActive?"active":"";return N(XW||(XW=YW`
539
+ `))}}])}();ft([Kt({type:Object})],qW.prototype,"component",void 0),ft([Kt({type:Boolean})],qW.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],qW.prototype,"scaleFactor",void 0),ft([Kt({type:Boolean})],qW.prototype,"isActive",void 0),qW=ft([St("nami-toggle-switch")],qW);var JW,QW=e=>e,ZW=function(){function e(){var t;return Y(this,e),(t=X(this,e)).inFocusedState=!1,t.scaleFactor=1,t.tabIndex=0,t}return re(e,tu),ee(e,[{key:"styles",value:function(){var e=this.component;return B(`\n :host {\n box-sizing: border-box;\n }\n :host .radio-button-wrapper {\n display: flex;\n transition: all 0.3s;\n ${Mu(e,this.scaleFactor)}\n ${fu(e.inactiveBorderColor||"transparent")}\n border-width: ${e.inactiveBorderWidth||0}px !important;\n border-style: solid;\n border-radius: 100%;\n padding: ${e.innerPadding||0}px !important;\n }\n :host .radio-button-wrapper.active {\n ${fu(e.activeBorderColor||"transparent")}\n border-width: ${e.activeBorderWidth||0}px !important;\n ${Pu(e.dropShadow)}\n }\n :host .radio-button-inner {\n ${mu(e.inactiveFillColor||"transparent")}\n width: 100%;\n height: 100%;\n border-radius: 100%;\n }\n :host .radio-button-wrapper.active .radio-button-inner {\n ${mu(e.activeFillColor||"transparent")}\n }\n `)}},{key:"isActive",get:function(){var e,t,i=null!==(e=null===(t=this.component.sku)||void 0===t?void 0:t.id)&&void 0!==e?e:"";return Object.values(this.contextProvider.selectedProducts()).includes(i)}},{key:"render",value:function(){var e=this.isActive?"active":"";return N(JW||(JW=QW`
537
540
  <div class="radio-button-wrapper ${0}">
538
541
  <div class="radio-button-inner"></div>
539
542
  </div>
540
- `),e)}}])}();ft([Kt({type:Object})],qW.prototype,"component",void 0),ft([Kt({type:Boolean})],qW.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],qW.prototype,"scaleFactor",void 0),qW=ft([St("nami-radio-button")],qW);var JW,QW=e=>e,ZW=k.NamiFlowManager,eO=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).scaleFactor=1,t.inFocusedState=!1,t.currentWidth=0,t.hasInitialized=!1,t}return re(e,tu),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),O(this.minSDKVersion,"ProgressIndicator")}},{key:"firstUpdated",value:function(t){var i;me(e,"firstUpdated",this)([t]),this.currentWidth=100*ZW.getLastAnimatedFlowProgress((null===(i=this.component)||void 0===i?void 0:i.id)||"default"),this.hasInitialized=!0,this.animateProgress(!0)}},{key:"updated",value:function(t){me(e,"updated",this)([t]),this.hasInitialized&&this.animateProgress(!1)}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i=this.inFocusedState,n=e.inactiveFillColor,a=e.inactiveFillColorFallback,r=e.inactiveBorderRadius,o=e.activeFillColor,s=e.activeFillColorFallback,u=e.activeBorderRadius,l=e.innerPadding,d=void 0===l?0:l,h=e.activeDropShadow,c=e.inactiveDropShadow;return B(`\n :host {\n display: ${e.hidden?"none":"block"};\n ${xu(e,t,i)}\n }\n \n .progress-container {\n ${Mu(e,t)} \n background: ${n||a};\n border-radius: ${r||0}px;\n overflow: hidden;\n position: relative;\n padding: ${d*t}px;\n box-sizing: border-box;\n ${Pu(c)}\n }\n \n .progress-bar {\n height: 100%;\n background: ${o||s};\n border-radius: ${u||0}px;\n box-sizing: border-box;\n transition: width 0.8s ease-in-out;\n ${Pu(h)}\n }\n `)}},{key:"getProgressPercentage",value:function(){var e,t=null!==(e=this.component.percentage)&&void 0!==e?e:0;return"auto"===t&&(t=ZW.getCurrentFlowProgress(this.component.id)),Math.min(100,Math.max(0,100*Number(t)))}},{key:"animateProgress",value:function(e){var t=this.component,i=t.id,n=t.percentage,a=this.getProgressPercentage();if(this.currentWidth!==a){var r=()=>{this.currentWidth=a,"auto"===n&&ZW.setLastAnimatedFlowProgress(i||"default",a/100)};e?requestAnimationFrame(()=>requestAnimationFrame(r)):requestAnimationFrame(r)}}},{key:"render",value:function(){return N(JW||(JW=QW`
543
+ `),e)}}])}();ft([Kt({type:Object})],ZW.prototype,"component",void 0),ft([Kt({type:Boolean})],ZW.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],ZW.prototype,"scaleFactor",void 0),ZW=ft([St("nami-radio-button")],ZW);var eO,tO=e=>e,iO=k.NamiFlowManager,nO=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).scaleFactor=1,t.inFocusedState=!1,t.currentWidth=0,t.hasInitialized=!1,t}return re(e,tu),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),O(this.minSDKVersion,"ProgressIndicator")}},{key:"firstUpdated",value:function(t){var i;me(e,"firstUpdated",this)([t]),this.currentWidth=100*iO.getLastAnimatedFlowProgress((null===(i=this.component)||void 0===i?void 0:i.id)||"default"),this.hasInitialized=!0,this.animateProgress(!0)}},{key:"updated",value:function(t){me(e,"updated",this)([t]),this.hasInitialized&&this.animateProgress(!1)}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i=this.inFocusedState,n=e.inactiveFillColor,a=e.inactiveFillColorFallback,r=e.inactiveBorderRadius,o=e.activeFillColor,s=e.activeFillColorFallback,u=e.activeBorderRadius,l=e.innerPadding,d=void 0===l?0:l,h=e.activeDropShadow,c=e.inactiveDropShadow;return B(`\n :host {\n display: ${e.hidden?"none":"block"};\n ${xu(e,t,i)}\n }\n \n .progress-container {\n ${Mu(e,t)} \n background: ${n||a};\n border-radius: ${r||0}px;\n overflow: hidden;\n position: relative;\n padding: ${d*t}px;\n box-sizing: border-box;\n ${Pu(c)}\n }\n \n .progress-bar {\n height: 100%;\n background: ${o||s};\n border-radius: ${u||0}px;\n box-sizing: border-box;\n transition: width 0.8s ease-in-out;\n ${Pu(h)}\n }\n `)}},{key:"getProgressPercentage",value:function(){var e,t=null!==(e=this.component.percentage)&&void 0!==e?e:0;return"auto"===t&&(t=iO.getCurrentFlowProgress(this.component.id)),Math.min(100,Math.max(0,100*Number(t)))}},{key:"animateProgress",value:function(e){var t=this.component,i=t.id,n=t.percentage,a=this.getProgressPercentage();if(this.currentWidth!==a){var r=()=>{this.currentWidth=a,"auto"===n&&iO.setLastAnimatedFlowProgress(i||"default",a/100)};e?requestAnimationFrame(()=>requestAnimationFrame(r)):requestAnimationFrame(r)}}},{key:"render",value:function(){return N(eO||(eO=tO`
541
544
  <div class="progress-container">
542
545
  <div
543
546
  class="progress-bar"
@@ -548,20 +551,20 @@ import{NAMI_SDK_VERSION as e,getExtendedClientInfo as t,PaywallState as i,logger
548
551
  aria-valuemax="100"
549
552
  ></div>
550
553
  </div>
551
- `),this.currentWidth,Math.round(this.currentWidth))}}])}();ft([Kt({type:Object})],eO.prototype,"component",void 0),ft([Kt({type:Number})],eO.prototype,"scaleFactor",void 0),ft([Kt({type:Boolean})],eO.prototype,"inFocusedState",void 0),ft([Kt({type:Object})],eO.prototype,"minSDKVersion",void 0),ft([Kt({type:Number})],eO.prototype,"currentWidth",void 0),eO=ft([St("nami-progress-indicator")],eO);var tO=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t.isActive=!1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||t._handleClick()},t}return re(e,tu),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}},{key:"_handleClick",value:function(){var e,t,i=null===(e=this.component.onTap)||void 0===e?void 0:e.function;if(i){var n={function:i,parameters:ie({},null===(t=this.component.onTap)||void 0===t?void 0:t.parameters,{formId:this.component.formId||"",value:"radio"===this.component.mode?this.component.value:void 0})};ds({onTap:n,contextProvider:this.contextProvider})}}},{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,t=this.contextProvider.getCurrentFormId(e.formId||""),i=!0===t||t===e.value;this.inFocusedState=i;var n=i?e.activeFillColor||e.activeFillColorFallback||"transparent":e.inactiveFillColor||e.inactiveFillColorFallback||"transparent",a=i?e.activeBorderColor||"transparent":e.inactiveBorderColor||"transparent";return B(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n position: relative;\n cursor: pointer;\n height: 100%;\n border-radius: ${e.borderRadius}px !important;\n ${xu(e,this.scaleFactor,this.inFocusedState)}\n ${fu(a)}\n border-width: ${i?e.activeBorderWidth||0:e.inactiveBorderWidth||0}px !important;\n ${Pu(i?e.activeDropShadow:e.inactiveDropShadow)};\n border-style: solid;\n ${mu(n)}\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.component.components.map(e=>cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();ft([Kt({type:Object})],tO.prototype,"component",void 0),ft([Kt({type:Boolean})],tO.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],tO.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],tO.prototype,"minSDKVersion",void 0),ft([Kt({type:Boolean})],tO.prototype,"isActive",void 0),tO=ft([St("nami-toggle-button")],tO);var iO,nO,aO,rO,oO,sO,uO,lO,dO,hO=e=>e,cO=dO=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t.timer=null,t.startTime=0,t.initialDuration=0,t.hasEmittedCompletion=!1,t}return re(e,tu),ee(e,[{key:"firstUpdated",value:function(){this.loadTimerState(),this.startTimer()}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),this.saveTimerState(),this.clearTimer()}},{key:"getTimerId",value:function(){var e,t;return null!==(e=null===(t=this.component)||void 0===t?void 0:t.id)&&void 0!==e?e:""}},{key:"loadTimerState",value:function(){var e;null!==(e=this.contextProvider)&&void 0!==e&&e.flow&&(this.timerState=this.contextProvider.flow.timerStates[this.getTimerId()])}},{key:"saveTimerState",value:function(){var e;if(null!==(e=this.contextProvider)&&void 0!==e&&e.flow){var t=this.component,i=t.mode,n=t.durationSeconds;if("duration"===i&&void 0!==n){var a=this.calculateCurrentRemainingSeconds();this.contextProvider.flow.timerStates[this.getTimerId()]={remainingSeconds:a,savedAt:Date.now(),hasEmittedCompletion:this.hasEmittedCompletion}}}}},{key:"getSavedTimerState",value:function(){var e;return null===(e=this.contextProvider)||void 0===e||null===(e=e.flow)||void 0===e?void 0:e.timerStates[this.getTimerId()]}},{key:"startTimer",value:function(){this.initializeTimerState(),this.clearTimer(),this.timer=setInterval(()=>this.onTimerTick(),dO.TIMER_INTERVAL_MS)}},{key:"initializeTimerState",value:function(){var e=this.component,t=e.mode,i=e.durationSeconds,n=e.resetOnRemount;"duration"===t&&void 0!==i&&(this.timerState&&!n?this.restoreTimerFromState(this.timerState,i):this.resetTimerState(i))}},{key:"restoreTimerFromState",value:function(e,t){var i=(Date.now()-e.savedAt)/1e3,n=Math.max(0,e.remainingSeconds-i);this.initialDuration=t,this.startTime=Date.now()-1e3*(this.initialDuration-n),this.hasEmittedCompletion=e.hasEmittedCompletion}},{key:"resetTimerState",value:function(e){this.initialDuration=e,this.startTime=Date.now(),this.hasEmittedCompletion=!1}},{key:"onTimerTick",value:function(){var e=this.calculateTimeValues().isCompleted;this.requestUpdate(),e&&this.clearTimer()}},{key:"clearTimer",value:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}},{key:"calculateTimeValues",value:function(){var e=this.calculateTotalRemainingSeconds(),t=e<=0,i=this.component.units||dO.DEFAULT_UNITS,n=i.days,a=i.hours,r=i.minutes,o=i.seconds;return ie({},this.convertSecondsToTimeUnits(e,{days:n,hours:a,minutes:r,seconds:o}),{isCompleted:t})}},{key:"calculateTotalRemainingSeconds",value:function(){var e=this.component,t=e.mode,i=e.durationSeconds,n=e.targetDateTime;return"duration"===t?this.calculateDurationRemainingSeconds(i):"targetDateTime"===t&&n?this.calculateTargetDateTimeRemainingSeconds(n):0}},{key:"calculateDurationRemainingSeconds",value:function(e){var t=this.getSavedTimerState();if(t){var i=(Date.now()-t.savedAt)/1e3;return Math.max(0,t.remainingSeconds-i)}if(this.initialDuration>0&&this.startTime>0){var n=(Date.now()-this.startTime)/1e3;return Math.max(0,this.initialDuration-n)}return void 0!==e?Math.max(0,e):0}},{key:"calculateTargetDateTimeRemainingSeconds",value:function(e){var t=new Date(e).getTime(),i=Date.now();return Math.max(0,(t-i)/1e3)}},{key:"calculateCurrentRemainingSeconds",value:function(){var e=this.component.durationSeconds;if(this.initialDuration>0&&this.startTime>0){var t=(Date.now()-this.startTime)/1e3;return Math.max(0,this.initialDuration-t)}return null!=e?e:0}},{key:"convertSecondsToTimeUnits",value:function(e,t){var i=t.days?Math.floor(e/dO.SECONDS_PER_DAY):0,n=e-i*dO.SECONDS_PER_DAY,a=t.hours?Math.floor(n/dO.SECONDS_PER_HOUR):0,r=n-a*dO.SECONDS_PER_HOUR,o=t.minutes?Math.floor(r/dO.SECONDS_PER_MINUTE):0,s=r-o*dO.SECONDS_PER_MINUTE;return{days:i,hours:a,minutes:o,seconds:t.seconds?Math.floor(s):0}}},{key:"formatValue",value:function(e,t){return t?e.toString().padStart(2,"0"):e.toString()}},{key:"emitCompletionEvent",value:function(){!this.hasEmittedCompletion&&this.contextProvider&&(this.hasEmittedCompletion=!0,m.getInstance().emit(f,ie({},this.contextProvider.getPaywallActionEventData(),{action:c.COUNTDOWN_TIMER_COMPLETED,componentChange:{id:this.component.id,name:this.component.title}})))}},{key:"updated",value:function(e){this.updateAccessibilityAttributes(),e.has("component")&&this.handleComponentChange(e.get("component"))}},{key:"updateAccessibilityAttributes",value:function(){this.ariaLabel=this.component.screenreaderText||"",this.ariaDescription=this.component.screenreaderHint||""}},{key:"handleComponentChange",value:function(e){if(e){var t=this.component,i=t.mode,n=t.durationSeconds,a=t.targetDateTime;(i!==e.mode||n!==e.durationSeconds||a!==e.targetDateTime)&&this.startTimer()}}},{key:"styles",value:function(){var e=this.component,t=e.labels,i=e.separator,n=e.labelPosition,a=void 0===n?"none":n,r=e.direction,o=void 0===r?"horizontal":r,s=e.labelFontSize,u=e.labelFontColor,l=e.labelFontName,d=e.labelSpacing,h=e.spacing,c=e.fontSize,m=e.fontColor,f=e.fontName,v=e.alignment,p="below"===a?"bottom":"above"===a?"top":a,g="vertical"===o,y=t&&(t.days||t.hours||t.minutes||t.seconds)||"none"!==p;return B(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n position: relative;\n cursor: pointer;\n height: 100%;\n border-radius: ${e.borderRadius||0}px !important;\n flex-direction: ${g?"column":"row"};\n align-items: center;\n justify-content: flex-start;\n ${pu(e,this.inFocusedState)}\n ${ku(e,this.scaleFactor)}\n ${Eu(e,this.scaleFactor,this.inFocusedState)}\n ${yu(e)}\n ${Mu(e,this.scaleFactor)}\n }\n .timer-text {\n display: flex;\n flex-direction: ${g?"column":"row"};\n align-items: center;\n gap: ${g?h?h*this.scaleFactor:4:0}px;\n }\n .timer-unit {\n display: flex;\n flex-direction: ${"top"===p||"bottom"===p?"column":"row"};\n align-items: center;\n ${g?`margin-top: ${h?h*this.scaleFactor:4}px;`:`margin-right: ${h?h*this.scaleFactor:4}px;`} \n }\n .timer-text-value-days,\n .timer-text-value-hours,\n .timer-text-value-minutes,\n .timer-text-value-seconds {\n ${c?`font-size: ${c*this.scaleFactor}px;`:""}\n ${m?vu(m):""}\n ${Du(f)}\n ${v?`text-align: ${v};`:""}\n ${Pu(e.dropShadow,!0)}\n line-height: 1;\n }\n .timer-text-value-label {\n font-size: ${s?s*this.scaleFactor:12*this.scaleFactor}px;\n color: ${u||"inherit"};\n ${Du(l)}\n ${"top"===p?`margin-bottom: ${d?d*this.scaleFactor:2}px;`:""}\n ${"bottom"===p?`margin-top: ${d?d*this.scaleFactor:2}px;`:""}\n ${y?"":"display: none;"}\n }\n .timer-text-value-separator {\n ${i?`\n display: flex;\n align-items: center;\n ${c?`font-size: ${c*this.scaleFactor}px;`:""}\n ${m?vu(m):""}\n ${Du(f)}\n line-height: 1;\n ${g?`margin-top: ${h?h*this.scaleFactor:4}px;`:`margin-right: ${h?h*this.scaleFactor:4}px;`} \n ${"bottom"===p||"top"===p?"align-self: flex-start;":""}\n `:"display: none;"}\n }\n `)}},{key:"render",value:function(){this.tabIndex=0;var e=this.component.showWhenCompleted,t=void 0===e?"zero":e,i=this.calculateTimeValues();if(i.isCompleted&&(this.emitCompletionEvent(),"hidden"===t))return N(iO||(iO=hO``));var n=this.buildUnitsToRender(i);return 0===n.length?N(nO||(nO=hO`<div class="timer-text"></div>`)):this.renderTimerUnits(n)}},{key:"buildUnitsToRender",value:function(e){var t=this.component,i=t.labels,n=t.units,a=t.labelPosition,r=void 0===a?"none":a,o=n||{},s=o.days,u=o.hours,l=o.minutes,d=o.seconds,h=this.normalizeLabelPosition(r),c=this.shouldDisplayLabels(i,h);return[{enabled:s,value:e.days,label:this.getLabel("days",i,c),class:"timer-text-value-days"},{enabled:u,value:e.hours,label:this.getLabel("hours",i,c),class:"timer-text-value-hours"},{enabled:l,value:e.minutes,label:this.getLabel("minutes",i,c),class:"timer-text-value-minutes"},{enabled:d,value:e.seconds,label:this.getLabel("seconds",i,c),class:"timer-text-value-seconds"}].filter(e=>e.enabled).map(e=>({value:e.value,label:e.label,unitClass:e.class,showUnit:!0}))}},{key:"normalizeLabelPosition",value:function(e){return"below"===e?"bottom":"above"===e?"top":e}},{key:"shouldDisplayLabels",value:function(e,t){return Boolean(e&&(e.days||e.hours||e.minutes||e.seconds))||"none"!==t&&void 0!==t}},{key:"getLabel",value:function(e,t,i){var n;return null!==(n=null==t?void 0:t[e])&&void 0!==n?n:i?dO.DEFAULT_LABELS[e]:""}},{key:"renderTimerUnits",value:function(e){var t=this.component,i=t.separator,n=t.zeroPad,a=void 0===n||n,r=t.labelPosition,o=void 0===r?"none":r,s=this.component.labels,u=this.normalizeLabelPosition(o),l=s&&(s.days||s.hours||s.minutes||s.seconds),d=Boolean(l||"none"!==u),h=null!=i?i:":";return N(aO||(aO=hO`
554
+ `),this.currentWidth,Math.round(this.currentWidth))}}])}();ft([Kt({type:Object})],nO.prototype,"component",void 0),ft([Kt({type:Number})],nO.prototype,"scaleFactor",void 0),ft([Kt({type:Boolean})],nO.prototype,"inFocusedState",void 0),ft([Kt({type:Object})],nO.prototype,"minSDKVersion",void 0),ft([Kt({type:Number})],nO.prototype,"currentWidth",void 0),nO=ft([St("nami-progress-indicator")],nO);var aO=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t.isActive=!1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||t._handleClick()},t}return re(e,tu),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}},{key:"_handleClick",value:function(){var e,t,i=null===(e=this.component.onTap)||void 0===e?void 0:e.function;if(i){var n={function:i,parameters:ie({},null===(t=this.component.onTap)||void 0===t?void 0:t.parameters,{formId:this.component.formId||"",value:"radio"===this.component.mode?this.component.value:void 0})};ds({onTap:n,contextProvider:this.contextProvider})}}},{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,t=this.contextProvider.getCurrentFormId(e.formId||""),i=!0===t||t===e.value;this.inFocusedState=i;var n=i?e.activeFillColor||e.activeFillColorFallback||"transparent":e.inactiveFillColor||e.inactiveFillColorFallback||"transparent",a=i?e.activeBorderColor||"transparent":e.inactiveBorderColor||"transparent";return B(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n position: relative;\n cursor: pointer;\n height: 100%;\n border-radius: ${e.borderRadius}px !important;\n ${xu(e,this.scaleFactor,this.inFocusedState)}\n ${fu(a)}\n border-width: ${i?e.activeBorderWidth||0:e.inactiveBorderWidth||0}px !important;\n ${Pu(i?e.activeDropShadow:e.inactiveDropShadow)};\n border-style: solid;\n ${mu(n)}\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.component.components.map(e=>cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();ft([Kt({type:Object})],aO.prototype,"component",void 0),ft([Kt({type:Boolean})],aO.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],aO.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],aO.prototype,"minSDKVersion",void 0),ft([Kt({type:Boolean})],aO.prototype,"isActive",void 0),aO=ft([St("nami-toggle-button")],aO);var rO,oO,sO,uO,lO,dO,hO,cO,mO,fO=e=>e,vO=mO=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t.timer=null,t.startTime=0,t.initialDuration=0,t.hasEmittedCompletion=!1,t}return re(e,tu),ee(e,[{key:"firstUpdated",value:function(){this.loadTimerState(),this.startTimer()}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),this.saveTimerState(),this.clearTimer()}},{key:"getTimerId",value:function(){var e,t;return null!==(e=null===(t=this.component)||void 0===t?void 0:t.id)&&void 0!==e?e:""}},{key:"loadTimerState",value:function(){var e;null!==(e=this.contextProvider)&&void 0!==e&&e.flow&&(this.timerState=this.contextProvider.flow.timerStates[this.getTimerId()])}},{key:"saveTimerState",value:function(){var e;if(null!==(e=this.contextProvider)&&void 0!==e&&e.flow){var t=this.component,i=t.mode,n=t.durationSeconds;if("duration"===i&&void 0!==n){var a=this.calculateCurrentRemainingSeconds();this.contextProvider.flow.timerStates[this.getTimerId()]={remainingSeconds:a,savedAt:Date.now(),hasEmittedCompletion:this.hasEmittedCompletion}}}}},{key:"getSavedTimerState",value:function(){var e;return null===(e=this.contextProvider)||void 0===e||null===(e=e.flow)||void 0===e?void 0:e.timerStates[this.getTimerId()]}},{key:"startTimer",value:function(){this.initializeTimerState(),this.clearTimer(),this.timer=setInterval(()=>this.onTimerTick(),mO.TIMER_INTERVAL_MS)}},{key:"initializeTimerState",value:function(){var e=this.component,t=e.mode,i=e.durationSeconds,n=e.resetOnRemount;"duration"===t&&void 0!==i&&(this.timerState&&!n?this.restoreTimerFromState(this.timerState,i):this.resetTimerState(i))}},{key:"restoreTimerFromState",value:function(e,t){var i=(Date.now()-e.savedAt)/1e3,n=Math.max(0,e.remainingSeconds-i);this.initialDuration=t,this.startTime=Date.now()-1e3*(this.initialDuration-n),this.hasEmittedCompletion=e.hasEmittedCompletion}},{key:"resetTimerState",value:function(e){this.initialDuration=e,this.startTime=Date.now(),this.hasEmittedCompletion=!1}},{key:"onTimerTick",value:function(){var e=this.calculateTimeValues().isCompleted;this.requestUpdate(),e&&this.clearTimer()}},{key:"clearTimer",value:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}},{key:"calculateTimeValues",value:function(){var e=this.calculateTotalRemainingSeconds(),t=e<=0,i=this.component.units||mO.DEFAULT_UNITS,n=i.days,a=i.hours,r=i.minutes,o=i.seconds;return ie({},this.convertSecondsToTimeUnits(e,{days:n,hours:a,minutes:r,seconds:o}),{isCompleted:t})}},{key:"calculateTotalRemainingSeconds",value:function(){var e=this.component,t=e.mode,i=e.durationSeconds,n=e.targetDateTime;return"duration"===t?this.calculateDurationRemainingSeconds(i):"targetDateTime"===t&&n?this.calculateTargetDateTimeRemainingSeconds(n):0}},{key:"calculateDurationRemainingSeconds",value:function(e){var t=this.getSavedTimerState();if(t){var i=(Date.now()-t.savedAt)/1e3;return Math.max(0,t.remainingSeconds-i)}if(this.initialDuration>0&&this.startTime>0){var n=(Date.now()-this.startTime)/1e3;return Math.max(0,this.initialDuration-n)}return void 0!==e?Math.max(0,e):0}},{key:"calculateTargetDateTimeRemainingSeconds",value:function(e){var t=new Date(e).getTime(),i=Date.now();return Math.max(0,(t-i)/1e3)}},{key:"calculateCurrentRemainingSeconds",value:function(){var e=this.component.durationSeconds;if(this.initialDuration>0&&this.startTime>0){var t=(Date.now()-this.startTime)/1e3;return Math.max(0,this.initialDuration-t)}return null!=e?e:0}},{key:"convertSecondsToTimeUnits",value:function(e,t){var i=t.days?Math.floor(e/mO.SECONDS_PER_DAY):0,n=e-i*mO.SECONDS_PER_DAY,a=t.hours?Math.floor(n/mO.SECONDS_PER_HOUR):0,r=n-a*mO.SECONDS_PER_HOUR,o=t.minutes?Math.floor(r/mO.SECONDS_PER_MINUTE):0,s=r-o*mO.SECONDS_PER_MINUTE;return{days:i,hours:a,minutes:o,seconds:t.seconds?Math.floor(s):0}}},{key:"formatValue",value:function(e,t){return t?e.toString().padStart(2,"0"):e.toString()}},{key:"emitCompletionEvent",value:function(){!this.hasEmittedCompletion&&this.contextProvider&&(this.hasEmittedCompletion=!0,m.getInstance().emit(f,ie({},this.contextProvider.getPaywallActionEventData(),{action:c.COUNTDOWN_TIMER_COMPLETED,componentChange:{id:this.component.id,name:this.component.title}})))}},{key:"updated",value:function(e){this.updateAccessibilityAttributes(),e.has("component")&&this.handleComponentChange(e.get("component"))}},{key:"updateAccessibilityAttributes",value:function(){this.ariaLabel=this.component.screenreaderText||"",this.ariaDescription=this.component.screenreaderHint||""}},{key:"handleComponentChange",value:function(e){if(e){var t=this.component,i=t.mode,n=t.durationSeconds,a=t.targetDateTime;(i!==e.mode||n!==e.durationSeconds||a!==e.targetDateTime)&&this.startTimer()}}},{key:"styles",value:function(){var e=this.component,t=e.labels,i=e.separator,n=e.labelPosition,a=void 0===n?"none":n,r=e.direction,o=void 0===r?"horizontal":r,s=e.labelFontSize,u=e.labelFontColor,l=e.labelFontName,d=e.labelSpacing,h=e.spacing,c=e.fontSize,m=e.fontColor,f=e.fontName,v=e.alignment,p="below"===a?"bottom":"above"===a?"top":a,g="vertical"===o,y=t&&(t.days||t.hours||t.minutes||t.seconds)||"none"!==p;return B(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n position: relative;\n cursor: pointer;\n height: 100%;\n border-radius: ${e.borderRadius||0}px !important;\n flex-direction: ${g?"column":"row"};\n align-items: center;\n justify-content: flex-start;\n ${pu(e,this.inFocusedState)}\n ${ku(e,this.scaleFactor)}\n ${Eu(e,this.scaleFactor,this.inFocusedState)}\n ${yu(e)}\n ${Mu(e,this.scaleFactor)}\n }\n .timer-text {\n display: flex;\n flex-direction: ${g?"column":"row"};\n align-items: center;\n gap: ${g?h?h*this.scaleFactor:4:0}px;\n }\n .timer-unit {\n display: flex;\n flex-direction: ${"top"===p||"bottom"===p?"column":"row"};\n align-items: center;\n ${g?`margin-top: ${h?h*this.scaleFactor:4}px;`:`margin-right: ${h?h*this.scaleFactor:4}px;`} \n }\n .timer-text-value-days,\n .timer-text-value-hours,\n .timer-text-value-minutes,\n .timer-text-value-seconds {\n ${c?`font-size: ${c*this.scaleFactor}px;`:""}\n ${m?vu(m):""}\n ${Du(f)}\n ${v?`text-align: ${v};`:""}\n ${Pu(e.dropShadow,!0)}\n line-height: 1;\n }\n .timer-text-value-label {\n font-size: ${s?s*this.scaleFactor:12*this.scaleFactor}px;\n color: ${u||"inherit"};\n ${Du(l)}\n ${"top"===p?`margin-bottom: ${d?d*this.scaleFactor:2}px;`:""}\n ${"bottom"===p?`margin-top: ${d?d*this.scaleFactor:2}px;`:""}\n ${y?"":"display: none;"}\n }\n .timer-text-value-separator {\n ${i?`\n display: flex;\n align-items: center;\n ${c?`font-size: ${c*this.scaleFactor}px;`:""}\n ${m?vu(m):""}\n ${Du(f)}\n line-height: 1;\n ${g?`margin-top: ${h?h*this.scaleFactor:4}px;`:`margin-right: ${h?h*this.scaleFactor:4}px;`} \n ${"bottom"===p||"top"===p?"align-self: flex-start;":""}\n `:"display: none;"}\n }\n `)}},{key:"render",value:function(){this.tabIndex=0;var e=this.component.showWhenCompleted,t=void 0===e?"zero":e,i=this.calculateTimeValues();if(i.isCompleted&&(this.emitCompletionEvent(),"hidden"===t))return N(rO||(rO=fO``));var n=this.buildUnitsToRender(i);return 0===n.length?N(oO||(oO=fO`<div class="timer-text"></div>`)):this.renderTimerUnits(n)}},{key:"buildUnitsToRender",value:function(e){var t=this.component,i=t.labels,n=t.units,a=t.labelPosition,r=void 0===a?"none":a,o=n||{},s=o.days,u=o.hours,l=o.minutes,d=o.seconds,h=this.normalizeLabelPosition(r),c=this.shouldDisplayLabels(i,h);return[{enabled:s,value:e.days,label:this.getLabel("days",i,c),class:"timer-text-value-days"},{enabled:u,value:e.hours,label:this.getLabel("hours",i,c),class:"timer-text-value-hours"},{enabled:l,value:e.minutes,label:this.getLabel("minutes",i,c),class:"timer-text-value-minutes"},{enabled:d,value:e.seconds,label:this.getLabel("seconds",i,c),class:"timer-text-value-seconds"}].filter(e=>e.enabled).map(e=>({value:e.value,label:e.label,unitClass:e.class,showUnit:!0}))}},{key:"normalizeLabelPosition",value:function(e){return"below"===e?"bottom":"above"===e?"top":e}},{key:"shouldDisplayLabels",value:function(e,t){return Boolean(e&&(e.days||e.hours||e.minutes||e.seconds))||"none"!==t&&void 0!==t}},{key:"getLabel",value:function(e,t,i){var n;return null!==(n=null==t?void 0:t[e])&&void 0!==n?n:i?mO.DEFAULT_LABELS[e]:""}},{key:"renderTimerUnits",value:function(e){var t=this.component,i=t.separator,n=t.zeroPad,a=void 0===n||n,r=t.labelPosition,o=void 0===r?"none":r,s=this.component.labels,u=this.normalizeLabelPosition(o),l=s&&(s.days||s.hours||s.minutes||s.seconds),d=Boolean(l||"none"!==u),h=null!=i?i:":";return N(sO||(sO=fO`
552
555
  <div class="timer-text">
553
556
  ${0}
554
557
  </div>
555
- `),e.map((t,i)=>N(rO||(rO=hO`
558
+ `),e.map((t,i)=>N(uO||(uO=fO`
556
559
  ${0}
557
560
  ${0}
558
- `),this.renderUnit(t.value,t.label,t.unitClass,t.showUnit,a,u,d),i<e.length-1&&h?N(oO||(oO=hO`<span class="timer-text-value-separator">${0}</span>`),h):"")))}},{key:"renderUnit",value:function(e,t,i,n,a,r,o){if(!n)return null;var s=Boolean(t&&o);return N(sO||(sO=hO`
561
+ `),this.renderUnit(t.value,t.label,t.unitClass,t.showUnit,a,u,d),i<e.length-1&&h?N(lO||(lO=fO`<span class="timer-text-value-separator">${0}</span>`),h):"")))}},{key:"renderUnit",value:function(e,t,i,n,a,r,o){if(!n)return null;var s=Boolean(t&&o);return N(dO||(dO=fO`
559
562
  <div class="timer-unit">
560
563
  ${0}
561
564
  <span class="${0}">${0}</span>
562
565
  ${0}
563
566
  </div>
564
- `),s&&"top"===r?N(uO||(uO=hO`<span class="timer-text-value-label">${0}</span>`),t):"",i,this.formatValue(e,a),s&&"bottom"===r?N(lO||(lO=hO`<span class="timer-text-value-label">${0}</span>`),t):"")}}])}();cO.DEFAULT_LABELS={days:"days",hours:"hours",minutes:"minutes",seconds:"seconds"},cO.DEFAULT_UNITS={days:!1,hours:!0,minutes:!0,seconds:!0},cO.SECONDS_PER_DAY=86400,cO.SECONDS_PER_HOUR=3600,cO.SECONDS_PER_MINUTE=60,cO.TIMER_INTERVAL_MS=1e3,ft([Kt({type:Object})],cO.prototype,"component",void 0),ft([Kt({type:Boolean})],cO.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],cO.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],cO.prototype,"minSDKVersion",void 0),cO=dO=ft([St("nami-countdown-timer-text")],cO);var mO,fO=e=>e,vO=k.NamiFlowManager,pO=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).scaleFactor=1,t.inFocusedState=!1,t.currentProgress=0,t.isAnimating=!1,t.screenreaderAnnouncement="",t.hasInitialized=!1,t.delayTimeoutId=null,t.animationFrameId=null,t.animationStartTime=null,t.startPercentage=0,t}return re(e,tu),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),O(this.minSDKVersion,"ProgressBar")}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),this.cleanup()}},{key:"firstUpdated",value:function(t){me(e,"firstUpdated",this)([t]),this.hasInitialized=!0,this.startAnimation()}},{key:"updated",value:function(t){me(e,"updated",this)([t]),this.hasInitialized&&t.has("component")&&(this.cleanup(),this.startAnimation())}},{key:"cleanup",value:function(){null!==this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null),null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.animationStartTime=null,this.isAnimating=!1}},{key:"getResolvedDuration",value:function(){var e=this.component,t=e.duration,i=e.mode;if("auto"===t&&"determinate"===i){var n=vO.getCurrentFlowStepAutoAdvanceDelay();return null!=n?n:3}return"number"==typeof t&&t>0?t:"determinate"===i?3:2}},{key:"startAnimation",value:function(){var e=this.component,t=e.mode,i=e.delay,n=e.percentage,a=void 0===n?0:n,r="number"==typeof a&&!Number.isInteger(a);this.startPercentage="number"==typeof a?r?100*a:a:0,this.currentProgress=this.startPercentage;var o="number"==typeof i&&i>0?1e3*i:0;o>0?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.beginAnimation(t)},o):this.beginAnimation(t)}},{key:"beginAnimation",value:function(e){this.isAnimating=!0;var t=this.component.screenreaderText||"Loading";this.screenreaderAnnouncement=t,setTimeout(()=>{this.screenreaderAnnouncement=""},1e3),"determinate"===e&&this.animateDeterminate()}},{key:"animateDeterminate",value:function(){if(!this.isAnimating||null===this.animationFrameId){var e=1e3*this.getResolvedDuration(),t=this.startPercentage;this.animationStartTime=null;var i=n=>{null===this.animationStartTime&&(this.animationStartTime=n);var a=n-this.animationStartTime,r=Math.min(1,a/e);this.currentProgress=t+(100-t)*r,r<1?this.animationFrameId=requestAnimationFrame(i):(this.currentProgress=100,this.isAnimating=!1,this.animationFrameId=null,this.animationStartTime=null)};this.animationFrameId=requestAnimationFrame(i)}}},{key:"getActiveWidthCss",value:function(){var e=this.component.activeWidth;return null==e?"30%":"number"==typeof e?`${e}px`:String(e).trim()}},{key:"isActiveWidthPercent",value:function(){var e=this.component.activeWidth;return null==e||"number"!=typeof e&&String(e).endsWith("%")}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i=this.inFocusedState,n=e.mode,a=e.inactiveFillColor,r=e.inactiveFillColorFallback,o=e.inactiveBorderRadius,s=e.activeFillColor,u=e.activeFillColorFallback,l=e.activeBorderRadius,d=e.innerPadding,h=void 0===d?0:d,c=e.activeDropShadow,m=e.inactiveDropShadow,f=this.getActiveWidthCss(),v=this.getResolvedDuration(),p=this.isActiveWidthPercent(),g=p&&parseFloat(f)||30,y=(100-g)/g*100,b=p?0:parseFloat(f)||0;return B(`\n :host {\n display: ${e.hidden?"none":"block"};\n ${xu(e,t,i)}\n }\n \n .progress-container {\n ${Mu(e,t)} \n background: ${a||r};\n border-radius: ${o||0}px;\n overflow: hidden;\n position: relative;\n padding: ${h*t}px;\n box-sizing: border-box;\n ${Pu(m)}\n }\n \n .progress-bar {\n height: 100%;\n background: ${s||u};\n border-radius: ${l||0}px;\n box-sizing: border-box;\n ${Pu(c)}\n ${"indeterminate"===n?`\n position: absolute;\n left: 0;\n top: ${h*t}px;\n bottom: ${h*t}px;\n width: ${f};\n animation: slide ${v}s linear infinite;\n `:""}\n }\n\n ${"indeterminate"===n?p?`\n @keyframes slide {\n 0% {\n transform: translateX(-${y}%);\n }\n 100% {\n transform: translateX(${y+100}%);\n }\n }\n `:`\n @keyframes slide {\n 0% {\n left: -${b}px;\n }\n 100% {\n left: 100%;\n }\n }\n `:""}\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `)}},{key:"render",value:function(){var e=this.component.mode;return N(mO||(mO=fO`
567
+ `),s&&"top"===r?N(hO||(hO=fO`<span class="timer-text-value-label">${0}</span>`),t):"",i,this.formatValue(e,a),s&&"bottom"===r?N(cO||(cO=fO`<span class="timer-text-value-label">${0}</span>`),t):"")}}])}();vO.DEFAULT_LABELS={days:"days",hours:"hours",minutes:"minutes",seconds:"seconds"},vO.DEFAULT_UNITS={days:!1,hours:!0,minutes:!0,seconds:!0},vO.SECONDS_PER_DAY=86400,vO.SECONDS_PER_HOUR=3600,vO.SECONDS_PER_MINUTE=60,vO.TIMER_INTERVAL_MS=1e3,ft([Kt({type:Object})],vO.prototype,"component",void 0),ft([Kt({type:Boolean})],vO.prototype,"inFocusedState",void 0),ft([Kt({type:Number})],vO.prototype,"scaleFactor",void 0),ft([Kt({type:Object})],vO.prototype,"minSDKVersion",void 0),vO=mO=ft([St("nami-countdown-timer-text")],vO);var pO,gO=e=>e,yO=k.NamiFlowManager,bO=function(){function e(){var t;return Y(this,e),(t=X(this,e,arguments)).scaleFactor=1,t.inFocusedState=!1,t.currentProgress=0,t.isAnimating=!1,t.screenreaderAnnouncement="",t.hasInitialized=!1,t.delayTimeoutId=null,t.animationFrameId=null,t.animationStartTime=null,t.startPercentage=0,t}return re(e,tu),ee(e,[{key:"connectedCallback",value:function(){me(e,"connectedCallback",this)([]),O(this.minSDKVersion,"ProgressBar")}},{key:"disconnectedCallback",value:function(){me(e,"disconnectedCallback",this)([]),this.cleanup()}},{key:"firstUpdated",value:function(t){me(e,"firstUpdated",this)([t]),this.hasInitialized=!0,this.startAnimation()}},{key:"updated",value:function(t){me(e,"updated",this)([t]),this.hasInitialized&&t.has("component")&&(this.cleanup(),this.startAnimation())}},{key:"cleanup",value:function(){null!==this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null),null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.animationStartTime=null,this.isAnimating=!1}},{key:"getResolvedDuration",value:function(){var e=this.component,t=e.duration,i=e.mode;if("auto"===t&&"determinate"===i){var n=yO.getCurrentFlowStepAutoAdvanceDelay();return null!=n?n:3}return"number"==typeof t&&t>0?t:"determinate"===i?3:2}},{key:"startAnimation",value:function(){var e=this.component,t=e.mode,i=e.delay,n=e.percentage,a=void 0===n?0:n,r="number"==typeof a&&!Number.isInteger(a);this.startPercentage="number"==typeof a?r?100*a:a:0,this.currentProgress=this.startPercentage;var o="number"==typeof i&&i>0?1e3*i:0;o>0?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.beginAnimation(t)},o):this.beginAnimation(t)}},{key:"beginAnimation",value:function(e){this.isAnimating=!0;var t=this.component.screenreaderText||"Loading";this.screenreaderAnnouncement=t,setTimeout(()=>{this.screenreaderAnnouncement=""},1e3),"determinate"===e&&this.animateDeterminate()}},{key:"animateDeterminate",value:function(){if(!this.isAnimating||null===this.animationFrameId){var e=1e3*this.getResolvedDuration(),t=this.startPercentage;this.animationStartTime=null;var i=n=>{null===this.animationStartTime&&(this.animationStartTime=n);var a=n-this.animationStartTime,r=Math.min(1,a/e);this.currentProgress=t+(100-t)*r,r<1?this.animationFrameId=requestAnimationFrame(i):(this.currentProgress=100,this.isAnimating=!1,this.animationFrameId=null,this.animationStartTime=null)};this.animationFrameId=requestAnimationFrame(i)}}},{key:"getActiveWidthCss",value:function(){var e=this.component.activeWidth;return null==e?"30%":"number"==typeof e?`${e}px`:String(e).trim()}},{key:"isActiveWidthPercent",value:function(){var e=this.component.activeWidth;return null==e||"number"!=typeof e&&String(e).endsWith("%")}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i=this.inFocusedState,n=e.mode,a=e.inactiveFillColor,r=e.inactiveFillColorFallback,o=e.inactiveBorderRadius,s=e.activeFillColor,u=e.activeFillColorFallback,l=e.activeBorderRadius,d=e.innerPadding,h=void 0===d?0:d,c=e.activeDropShadow,m=e.inactiveDropShadow,f=this.getActiveWidthCss(),v=this.getResolvedDuration(),p=this.isActiveWidthPercent(),g=p&&parseFloat(f)||30,y=(100-g)/g*100,b=p?0:parseFloat(f)||0;return B(`\n :host {\n display: ${e.hidden?"none":"block"};\n ${xu(e,t,i)}\n }\n \n .progress-container {\n ${Mu(e,t)} \n background: ${a||r};\n border-radius: ${o||0}px;\n overflow: hidden;\n position: relative;\n padding: ${h*t}px;\n box-sizing: border-box;\n ${Pu(m)}\n }\n \n .progress-bar {\n height: 100%;\n background: ${s||u};\n border-radius: ${l||0}px;\n box-sizing: border-box;\n ${Pu(c)}\n ${"indeterminate"===n?`\n position: absolute;\n left: 0;\n top: ${h*t}px;\n bottom: ${h*t}px;\n width: ${f};\n animation: slide ${v}s linear infinite;\n `:""}\n }\n\n ${"indeterminate"===n?p?`\n @keyframes slide {\n 0% {\n transform: translateX(-${y}%);\n }\n 100% {\n transform: translateX(${y+100}%);\n }\n }\n `:`\n @keyframes slide {\n 0% {\n left: -${b}px;\n }\n 100% {\n left: 100%;\n }\n }\n `:""}\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `)}},{key:"render",value:function(){var e=this.component.mode;return N(pO||(pO=gO`
565
568
  <div class="progress-container">
566
569
  <div
567
570
  class="progress-bar"
@@ -578,4 +581,4 @@ import{NAMI_SDK_VERSION as e,getExtendedClientInfo as t,PaywallState as i,logger
578
581
  aria-live="polite"
579
582
  aria-atomic="true"
580
583
  >${0}</span>
581
- `),"indeterminate"===e?"":`width: ${this.currentProgress}%`,"indeterminate"===e?void 0:Math.round(this.currentProgress),"indeterminate"===e?void 0:0,"indeterminate"===e?void 0:100,this.isAnimating,this.screenreaderAnnouncement)}}])}();ft([Kt({type:Object})],pO.prototype,"component",void 0),ft([Kt({type:Number})],pO.prototype,"scaleFactor",void 0),ft([Kt({type:Boolean})],pO.prototype,"inFocusedState",void 0),ft([Kt({type:Object})],pO.prototype,"minSDKVersion",void 0),ft([Xt()],pO.prototype,"currentProgress",void 0),ft([Xt()],pO.prototype,"isAnimating",void 0),ft([Xt()],pO.prototype,"screenreaderAnnouncement",void 0),pO=ft([St("nami-progress-bar")],pO);
584
+ `),"indeterminate"===e?"":`width: ${this.currentProgress}%`,"indeterminate"===e?void 0:Math.round(this.currentProgress),"indeterminate"===e?void 0:0,"indeterminate"===e?void 0:100,this.isAnimating,this.screenreaderAnnouncement)}}])}();ft([Kt({type:Object})],bO.prototype,"component",void 0),ft([Kt({type:Number})],bO.prototype,"scaleFactor",void 0),ft([Kt({type:Boolean})],bO.prototype,"inFocusedState",void 0),ft([Kt({type:Object})],bO.prototype,"minSDKVersion",void 0),ft([Xt()],bO.prototype,"currentProgress",void 0),ft([Xt()],bO.prototype,"isAnimating",void 0),ft([Xt()],bO.prototype,"screenreaderAnnouncement",void 0),bO=ft([St("nami-progress-bar")],bO);