@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/components/containers/RepeatingGrid.d.ts +1 -1
- package/dist/components/utils/helpers.d.ts +19 -0
- package/dist/nami-web.cjs +16 -13
- package/dist/nami-web.d.ts +1 -1
- package/dist/nami-web.mjs +16 -13
- package/dist/nami-web.umd.js +30 -27
- package/package.json +2 -2
package/dist/nami-web.cjs
CHANGED
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
.nami-modal-content nami-content-container {
|
|
252
252
|
overflow: visible;
|
|
253
253
|
}
|
|
254
|
-
`)),Fe=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},Oe=globalThis,We=Oe.ShadowRoot&&(void 0===Oe.ShadyCSS||Oe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$e=Symbol(),Ne=new WeakMap,je=function(){return m(function e(t,i,n){if(u(this,e),this._$cssResult$=!0,n!==$e)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(We&&void 0===e){var i=void 0!==t&&1===t.length;i&&(e=Ne.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ne.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Be=(e,t)=>{if(We)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(var i,n=f(t);!(i=n()).done;){var a=i.value,r=document.createElement("style"),o=Oe.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=a.cssText,e.appendChild(r)}},ze=We?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,i="",n=f(e.cssRules);!(t=n()).done;){i+=t.value.cssText}return(e=>new je("string"==typeof e?e:e+"",void 0,$e))(i)})(e):e,Ue=Object.is,He=Object.defineProperty,Ge=Object.getOwnPropertyDescriptor,Ve=Object.getOwnPropertyNames,Ke=Object.getOwnPropertySymbols,Xe=Object.getPrototypeOf,Ye=globalThis,qe=Ye.trustedTypes,Je=qe?qe.emptyScript:"",Qe=Ye.reactiveElementPolyfillSupport,Ze=(e,t)=>e,et={toAttribute(e,t){switch(t){case Boolean:e=e?Je: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}},tt=(e,t)=>!Ue(e,t),it={attribute:!0,type:String,converter:et,reflect:!1,useDefault:!1,hasChanged:tt};null!==(Ce=Symbol.metadata)&&void 0!==Ce||(Symbol.metadata=Symbol("metadata")),null!==(Ie=Ye.litPropertyMetadata)&&void 0!==Ie||(Ye.litPropertyMetadata=new WeakMap);var nt=function(){function e(){var t;return u(this,e),(t=s(this,e))._$Ep=void 0,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Em=null,t._$Ev(),t}return y(e,D(HTMLElement)),m(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=f(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 Be(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:et).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:et;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:tt)(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 S(function(i){for(;;)switch(i.p=i.n){case 0:return this.isUpdatePending=!0,i.p=1,i.n=2,o(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,o(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=f(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=f(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 v=!1,p=this._$AL;try{var g;(v=this.shouldUpdate(p))?(this.willUpdate(p),null!==(g=this._$EO)&&void 0!==g&&g.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(p)):this._$EM()}catch(p){throw v=!1,this._$EM(),p}v&&this._$AE(p)}}},{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=it){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&&He(this.prototype,e,n)}}},{key:"getPropertyDescriptor",value:function(e,t,i){var n,a=null!==(n=Ge(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:it}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Ze("elementProperties"))){var e=Xe(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Ze("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ze("properties")))for(var e=this.properties,t=0,i=[...Ve(e),...Ke(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=f(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=f(this.elementProperties);!(h=c()).done;){var m=h.value,v=m[0],p=m[1],g=this._$Eu(v,p);void 0!==g&&this._$Eh.set(g,v)}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e))for(var i,n=f(new Set(e.flat(1/0).reverse()));!(i=n()).done;){var a=i.value;t.unshift(ze(a))}else void 0!==e&&t.push(ze(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}}])}();nt.elementStyles=[],nt.shadowRootOptions={mode:"open"},nt[Ze("elementProperties")]=new Map,nt[Ze("finalized")]=new Map,null!=Qe&&Qe({ReactiveElement:nt}),(null!==(Le=Ye.reactiveElementVersions)&&void 0!==Le?Le:Ye.reactiveElementVersions=[]).push("2.1.2");var at={attribute:!0,type:String,converter:et,reflect:!1,hasChanged:tt},rt=(e=at,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 ot(e){return(t,i)=>"object"==typeof i?rt(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 st(e){return ot(v({},e,{state:!0,attribute:!1}))}var ut=function(){function t(e,i,n){var a;return u(this,t),(a=s(this,t,[e,i,n])).host=null,a.defineDynamicStateProps(),a}return y(t,e.PaywallState),m(t,[{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(e,i,n){var a=new t(e,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 lt=e=>{var t;return S(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=dt(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 dt(e){return`${e.family}-${e.style}`.replace(/ /g,"")}function ht(t,i,n){var a,r,o,s,u,l,d,h;if("undefined"==typeof window||!t||!i)return e.logger.debug("Swipe detection is not supported in this environment."),{destroy(){},updateOptions(){}};var c={minDistance:null!==(a=null==n?void 0:n.minDistance)&&void 0!==a?a:30,maxDuration:null!==(r=null==n?void 0:n.maxDuration)&&void 0!==r?r:600,lockAxis:null===(o=null==n?void 0:n.lockAxis)||void 0===o||o,preventScrollOnSwipe:null!==(s=null==n?void 0:n.preventScrollOnSwipe)&&void 0!==s&&s,pointerTypes:null!==(u=null==n?void 0:n.pointerTypes)&&void 0!==u?u:["touch"],passiveListeners:null===(l=null==n?void 0:n.passiveListeners)||void 0===l||l,axisHint:null!==(d=null==n?void 0:n.axisHint)&&void 0!==d?d:"y",edgeLeakThreshold:null!==(h=null==n?void 0:n.edgeLeakThreshold)&&void 0!==h?h:24},m=t.style.touchAction;c.preventScrollOnSwipe&&(t.style.touchAction="none");var f=null,v=0,p=0,g=0,y=0,b=0,w=null,k=null,S=!1,E=!1,P=!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}},M=e=>c.pointerTypes.includes(e.pointerType),A=e=>{var i=e.composedPath?e.composedPath()[0]:e.target;if(M(e)&&null===f){f=e.pointerId,v=g=e.clientX,p=y=e.clientY,b=performance.now(),w=null,P=!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,t):null)||(E=!0);try{var n;null==t||null===(n=t.setPointerCapture)||void 0===n||n.call(t,e.pointerId)}catch(t){try{var a;null==i||null===(a=i.setPointerCapture)||void 0===a||a.call(i,e.pointerId)}catch(e){}}}},D=e=>{if(e.pointerId===f&&M(e)){if(g=e.clientX,y=e.clientY,c.lockAxis&&!w){var t=Math.abs(g-v),n=Math.abs(y-p);(t>2||n>2)&&(w=n>=t?"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(!P&&!S&&E&&d&&o>=c.minDistance){P=!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};i(m)}}}},x=e=>{if(e.pointerId===f)if(M(e))if(k)C();else if(P||S)C();else{var t,n=performance.now(),a=n-b,r=g-v,o=y-p,s=Math.abs(r),u=Math.abs(o),l="x"===(t=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"===t&&E&&(h+=c.edgeLeakThreshold),d&&l>=h){var m;m="x"===t?r>0?"right":"left":o>0?"down":"up";var T=l/Math.max(a,1);i({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,P=!1},I=!!c.passiveListeners&&{passive:!0},L=c.passiveListeners?{passive:!0,capture:!0}:{capture:!0};t.addEventListener("pointerdown",A,L),t.addEventListener("pointermove",D,I),t.addEventListener("pointerup",x,I),t.addEventListener("pointercancel",x,I),t.addEventListener("lostpointercapture",x,I);return{destroy:()=>{t.removeEventListener("pointerdown",A,L),t.removeEventListener("pointermove",D,I),t.removeEventListener("pointerup",x,I),t.removeEventListener("pointercancel",x,I),t.removeEventListener("lostpointercapture",x,I),c.preventScrollOnSwipe&&(t.style.touchAction=m),C()},updateOptions:e=>{Object.assign(c,e),"boolean"==typeof e.preventScrollOnSwipe&&(e.preventScrollOnSwipe?t.style.touchAction="none":t.style.touchAction=m)}}}var ct={},mt=ct.NAMI_CLOSE_PAYWALL,ft=void 0===mt?"namiClosePaywall":mt,vt=ct.NAMI_RESTORE_PURCHASES,pt=void 0===vt?"namiRestorePurchases":vt,gt=ct.NAMI_SIGN_IN,yt=void 0===gt?"namiSignIn":gt,bt=ct.NAMI_BUY_SKU,wt=void 0===bt?"namiBuySKU":bt,kt=ct.SET_STATE,St=void 0===kt?"setState":kt,Et=ct.NAMI_SELECT_SKU,Pt=void 0===Et?"namiSelectSKU":Et,Tt=ct.NAMI_PURCHASE_SELECTED_SKU,Mt=void 0===Tt?"namiPurchaseSelectedSKU":Tt,At=ct.NAMI_DEEP_LINK,Dt=void 0===At?"namiDeeplink":At,xt=ct.NAMI_NAVIGATE_TO_SCREEN,Ct=void 0===xt?"namiNavigateToScreen":xt,It=ct.NAMI_RELOAD_PRODUCTS,Lt=void 0===It?"namiReloadProducts":It,_t=ct.NAMI_PLAY_VIDEO,Rt=void 0===_t?"namiPlayVideo":_t,Ft=ct.NAMI_PAUSE_VIDEO,Ot=void 0===Ft?"namiPauseVideo":Ft,Wt=ct.NAMI_MUTE_VIDEO,$t=void 0===Wt?"namiMuteVideo":Wt,Nt=ct.NAMI_UNMUTE_VIDEO,jt=void 0===Nt?"namiUnmuteVideo":Nt,Bt=e=>"subscription"===e;function zt(e){if(Bt(null==e?void 0:e.product_type)){var t=Ht(e);if(t.length>0)return t[0].billingPeriod}return null}function Ut(e){var t=function(e){if(!e)return[];var t=e.offers.filter(e=>"promo"===e.offer_type);return Gt(t,e.subscription_period)}(e).find(e=>0===e.priceAmountMicros);return(null==t?void 0:t.billingPeriod)||null}function Ht(e){return e?Gt(e.offers.filter(e=>"default"===e.offer_type),e.subscription_period):[]}function Gt(e,t){return e.map(e=>Vt(e,t))}function Vt(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:Yt(m).format(c)}}function Kt(t,i=!1,n=!1,a=!1,r=!1){if(!t)return null;var o=t.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=(t,i,n,a,o)=>{var s=(e=>r?`${e}_abbrev`:e)(o),u=(e=>r?`${e}_abbrev_plural`:`${e}_plural`)(o),l=e.getTranslate(s),d=e.getTranslate(u);return r||l!==s||(l=e.getTranslate(`${o}_abbrev`)),r||d!==u||(d=e.getTranslate(`${o}_abbrev_plural`)),a?t.toString():n?1===t||i?l:d:1===t||i?`${t} ${l}`:`${t} ${d}`};switch(t.at(-1)){case"D":return c(h,i,n,a,"nami_day");case"W":return c(d,i,n,a,"nami_week");case"M":return c(l,i,n,a,"nami_month");case"Y":return c(u,i,n,a,"nami_year")}return null}function Xt(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 Yt(e){var t={maximumFractionDigits:2,minimumFractionDigits:0};try{return new Intl.NumberFormat(navigator.language,v({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(navigator.language,v({},t,{style:"currency",currency:"USD"}))}}var qt=(e,t,i)=>e&&t&&i?i.format(e-t):null,Jt=(e,t,i,n)=>{if(e&&t&&i&&n){var a=100*(1-e/(i/n*t));return`${Math.round(a)}%`}return null},Qt=(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)}},Zt=e=>ti(e.priceAmountMicros)/ei(e.billingPeriod),ei=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},ti=e=>e/1e6;function ii(e){return parseFloat((Math.round(e)/100).toFixed(2))}var ni=(t,i,n=[])=>({price:()=>ri(t),name:()=>null==t?void 0:t.name,title:()=>null==t?void 0:t.name,description:()=>null==t?void 0:t.description,duration:()=>oi(t),durationSingular:()=>oi(t,!0),period:()=>oi(t,!1,!0),periodNumber:()=>oi(t,!1,!1,!0),freeTrialDuration:()=>si(t),freeTrialDurationSingular:()=>si(t,!0),freeTrialPeriod:()=>si(t,!1,!0),freeTrialPeriodNumber:()=>si(t,!1,!1,!0),pricePerMonth:()=>ui(t),pricePerMonthRounded:()=>ui(t,!0),periodInMonths:()=>li(t),durationInMonths:()=>di(t),durationInMonthsSingular:()=>di(t,!0),periodNumberInMonths:()=>hi(t),percentagePriceDifferenceFromSku:()=>ci(t,i,n),priceDifferenceFromSku:()=>mi(t,i,n),promoEligible:()=>null===fi(t)&&null!==vi(t,i),freeTrialEligible:()=>null!==fi(t),promo:()=>{var e;return null===(e=vi(t,i))||void 0===e?void 0:e.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var e;return null===(e=pi(t,i))||void 0===e?void 0:e.formattedPrice},promoPeriod:()=>gi(t,i,!1,!0),promoPeriodNumber:()=>gi(t,i,!1,!1,!0),promoDuration:()=>gi(t,i),promoDurationSingular:()=>gi(t,i,!0),introEligible:()=>!1,pricePerDay:()=>Si(t),pricePerWeek:()=>Ei(t),pricePerWeekRounded:()=>Ei(t,!0),introductoryPrice:()=>wi(t,i),introductoryPeriod:()=>bi(t,i,!1,!0),introductoryPeriodNumber:()=>bi(t,i,!1,!1,!0),introductoryDuration:()=>bi(t,i),introductoryDurationSingular:()=>bi(t,i,!0),introductoryPricePerMonth:()=>ki(t,i),introductoryPricePerMonthRounded:()=>ki(t,i,!0),durationAbbrev:()=>oi(t,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>si(t,!1,!1,!1,!0),introductoryDurationAbbrev:()=>bi(t,i,!1,!1,!1,!0),promoDurationAbbrev:()=>gi(t,i,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>gi(t,i,!0,!0,!1,!0),durationInMonthsAbbrev:()=>di(t,!1,!1,!1,!0),durationSingularAbbrev:()=>oi(t,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>si(t,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>bi(t,i,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>gi(t,i,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>gi(t,i,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>di(t,!0,!1,!1,!0),periodAbbrev:()=>oi(t,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>si(t,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>bi(t,i,!1,!0,!1,!0),promoPeriodAbbrev:()=>gi(t,i,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>gi(t,i,!1,!0,!0,!0),periodInMonthsAbbrev:()=>di(t,!1,!0,!1,!0),periodly:()=>function(t){if(!t)return null;var i=t.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!i)return null;var n=i[1],a=i[2],r=i[3],o=i[4],s=void 0!==n?parseInt(n,10):0,u=void 0!==a?parseInt(a,10):0,l=void 0!==r?parseInt(r,10):0;return(void 0!==o?parseInt(o,10):0)>0?null:l>0?1===l?e.getTranslate("nami_weekly"):2===l?e.getTranslate("nami_biweekly"):null:u>0?1===u?e.getTranslate("nami_monthly"):2===u?e.getTranslate("nami_bimonthly"):3===u?e.getTranslate("nami_quarterly"):6===u?e.getTranslate("nami_biannually"):12===u?e.getTranslate("nami_yearly"):e.getTranslate("nami_monthly"):s>0?e.getTranslate("nami_yearly"):null}(zt(t)),iso_subscription_duration:()=>Pi(t),invalid:()=>!1,unavailable:()=>!1}),ai=(e,t,i,n=[])=>{if(!t)return null;var a=ni(t,i,n);return a[e]?a[e]():null},ri=e=>{var t=Ht(e);return t&&t.length?t[0].formattedPrice:null},oi=(e,t,i,n,a)=>Kt(zt(e),t,i,n,a),si=(e,t,i,n,a)=>Kt(Ut(e),t,i,n,a),ui=(e,t)=>{var i=Ht(e);if(!i||0===i.length)return null;var n=Zt(i[0]);return n?Yt(i[0].priceCurrencyCode).format(t?Math.round(n):n):null},li=(e,t)=>{var i=Ht(e);if(!i||0===i.length)return null;var n=i[0].billingPeriod;return Xt(n)?Kt("P1Y"===n?"P12M":n,!1,!1,!1,t):null},di=(e,t,i,n,a)=>{var r=Ht(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return Xt(o)?Kt("P1Y"===o?"P12M":o,t,i,n,a):null},hi=e=>{if(!e)return 0;var t=Ht(e);return t&&t.length?ei(t[0].billingPeriod):0},ci=(e,t,i=[])=>{var n,a=Ht(e);if(!a||0===a.length)return null;var r=null===(n=Qt(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return Jt(ii(a[0].priceAmountMicros),hi(e));var o=Ht(r);return Jt(ii(a[0].priceAmountMicros),hi(e),(null==o?void 0:o.length)>0?ii(o[0].priceAmountMicros):0,hi(r))},mi=(e,t,i=[])=>{var n,a=Ht(e);if(!a||0===a.length)return null;var r=null===(n=Qt(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return qt(Zt(a[0]));var o=Ht(r);return qt(Zt(a[0]),Zt(o[0]),Yt(o[0].priceCurrencyCode))},fi=e=>Ut(e),vi=(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},pi=(e,t)=>{if(!e)return null;var i=vi(e,t);return i?Vt(i,e.subscription_period):null},gi=(e,t,i,n,a,r)=>{var o=pi(e,t);return Kt((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},yi=(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?Vt(i,e.subscription_period):null},bi=(e,t,i,n,a,r)=>{var o=yi(e,t);return Kt((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},wi=(e,t)=>{var i=yi(e,t);return i?i.formattedPrice:null},ki=(e,t,i)=>{var n=yi(e,t);if(!n)return null;var a=Zt(n);return a?Yt(n.priceCurrencyCode).format(i?Math.round(a):a):null},Si=e=>{var t=Ht(e);if(!t||0===t.length)return null;var i,n,a=ti(t[0].priceAmountMicros)/(i=t[0].billingPeriod,(n=ei(i))?30.437*n:1);return Yt(t[0].priceCurrencyCode).format(a)},Ei=(e,t)=>{var i=Ht(e);if(!i||0===i.length)return null;var n,a,r=ti(i[0].priceAmountMicros)/(n=i[0].billingPeriod,(a=ei(n))?52*a/12:1);return Yt(i[0].priceCurrencyCode).format(t?Math.round(r):r)},Pi=e=>{var t=Ht(e)[0];return t?t.billingPeriod:null},Ti="object"==typeof global&&global&&global.Object===Object&&global,Mi="object"==typeof self&&self&&self.Object===Object&&self,Ai=Ti||Mi||Function("return this")(),Di=Ai.Symbol;var xi=Array.isArray,Ci=Object.prototype,Ii=Ci.hasOwnProperty,Li=Ci.toString,_i=Di?Di.toStringTag:void 0;var Ri=Object.prototype.toString;var Fi=Di?Di.toStringTag:void 0;function Oi(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Fi&&Fi in Object(e)?function(e){var t=Ii.call(e,_i),i=e[_i];try{e[_i]=void 0;var n=!0}catch(e){}var a=Li.call(e);return n&&(t?e[_i]=i:delete e[_i]),a}(e):function(e){return Ri.call(e)}(e)}function Wi(e){return null!=e&&"object"==typeof e}var $i=Di?Di.prototype:void 0,Ni=$i?$i.toString:void 0;function ji(e){if("string"==typeof e)return e;if(xi(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,ji)+"";if(function(e){return"symbol"==typeof e||Wi(e)&&"[object Symbol]"==Oi(e)}(e))return Ni?Ni.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Bi(e){return null==e?"":ji(e)}function zi(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 Ui=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Hi(e){return Ui.test(e)}var Gi="\\ud800-\\udfff",Vi="["+Gi+"]",Ki="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Xi="\\ud83c[\\udffb-\\udfff]",Yi="[^"+Gi+"]",qi="(?:\\ud83c[\\udde6-\\uddff]){2}",Ji="[\\ud800-\\udbff][\\udc00-\\udfff]",Qi="(?:"+Ki+"|"+Xi+")"+"?",Zi="[\\ufe0e\\ufe0f]?",en=Zi+Qi+("(?:\\u200d(?:"+[Yi,qi,Ji].join("|")+")"+Zi+Qi+")*"),tn="(?:"+[Yi+Ki+"?",Ki,qi,Ji,Vi].join("|")+")",nn=RegExp(Xi+"(?="+Xi+")|"+tn+en,"g");function an(e){return Hi(e)?function(e){return e.match(nn)||[]}(e):function(e){return e.split("")}(e)}var rn,on=(rn="toUpperCase",function(e){var t=Hi(e=Bi(e))?an(e):void 0,i=t?t[0]:e.charAt(0),n=t?zi(t,1).join(""):e.slice(1);return i[rn]()+n});var sn,un=(sn={À:"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==sn?void 0:sn[e]}),ln=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var hn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var cn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var mn="\\ud800-\\udfff",fn="\\u2700-\\u27bf",vn="a-z\\xdf-\\xf6\\xf8-\\xff",pn="A-Z\\xc0-\\xd6\\xd8-\\xde",gn="\\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",yn="["+gn+"]",bn="\\d+",wn="["+fn+"]",kn="["+vn+"]",Sn="[^"+mn+gn+bn+fn+vn+pn+"]",En="(?:\\ud83c[\\udde6-\\uddff]){2}",Pn="[\\ud800-\\udbff][\\udc00-\\udfff]",Tn="["+pn+"]",Mn="(?:"+kn+"|"+Sn+")",An="(?:"+Tn+"|"+Sn+")",Dn="(?:['’](?:d|ll|m|re|s|t|ve))?",xn="(?:['’](?:D|LL|M|RE|S|T|VE))?",Cn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",In="[\\ufe0e\\ufe0f]?",Ln=In+Cn+("(?:\\u200d(?:"+["[^"+mn+"]",En,Pn].join("|")+")"+In+Cn+")*"),_n="(?:"+[wn,En,Pn].join("|")+")"+Ln,Rn=RegExp([Tn+"?"+kn+"+"+Dn+"(?="+[yn,Tn,"$"].join("|")+")",An+"+"+xn+"(?="+[yn,Tn+Mn,"$"].join("|")+")",Tn+"?"+Mn+"+"+Dn,Tn+"+"+xn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bn,_n].join("|"),"g");function Fn(e,t,i){return e=Bi(e),void 0===t?function(e){return cn.test(e)}(e)?function(e){return e.match(Rn)||[]}(e):function(e){return e.match(hn)||[]}(e):e.match(t)||[]}var On=RegExp("['’]","g");var Wn,$n=(Wn=function(e,t,i){return t=t.toLowerCase(),e+(i?on(Bi(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}(Fn(function(e){return(e=Bi(e))&&e.replace(ln,un).replace(dn,"")}(e).replace(On,"")),Wn,"")});function Nn(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=Un(e,t.sku_ref_id||""),t.variables=function(e,t,i){if(!t)return{};var n=t.variables;if(!n)return v({},t);Object.keys(n).forEach(t=>{if(jn(n[t])){var a=zn(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(ni({})))().forEach(t=>{if(void 0===n[t]){var r=ai(t,e,void 0,i);null!==r&&(a[t]=r)}}),v({},t,a,n)}(t.product_details,t,r)}),r}function jn(t){return"string"==typeof t&&t.includes(e.SMART_TEXT_PATTERN)}function Bn(e,t,i){return t?(Object.keys(t).forEach(n=>{jn(t[n])&&(t[n]=t[$n(n)]=zn(t[n],e,i))}),v({},t)):{}}var zn=(t,i,n)=>t.replace(e.SKU_TEXT_REGEX,(a,r)=>{var o,s,u,l,d=(null===(o=e.SKU_TEXT_REGEX.exec(t))||void 0===o?void 0:o.slice(1))||[];r=null!==(s=d[0])&&void 0!==s?s:r;var h=null!==(u=null===(l=d[1])||void 0===l?void 0:l.replace(":",""))&&void 0!==u?u:"";return ai(r,i,h,n)});function Un(e=[],t=""){return e.find(e=>e.product_ref_id===t)||null}var Hn=["conditionAttributes"];function Gn(e,t){return Array.isArray(e)?e.reduce((e,i)=>{var n=Gn(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:Gn(n,t);return v({},e,{[i]:a})},{}):"string"==typeof e?Qn(e,t):e}function Vn(t,i,n,a={}){var r=n.productBaseComponents||n.components||[],o=n.productFeaturedComponents||r;return i.map(i=>{var n,s,u,l=i.featured?o:r,d=i.entitlements.map(e=>e.entitlement_ref_id),h=Un(t.productDetails,i.sku_ref_id),c={freeTrialEligible:1==ai("freeTrialEligible",h),introEligible:1==ai("introEligible",h),promoEligible:1==ai("promoEligible",h),invalid:ai("invalid",h),unavailable:ai("unavailable",h)},m=v({},i,i.variables,c,{id:i.id,entitlements:d});s=i,u=t=>{for(var i,n=f(t);!(i=n()).done;){var a=i.value;a.sku=e.toNamiSKU(s),a.components&&u(a.components),a.collapseHeader&&a.collapseHeader.components&&u(a.collapseHeader.components)}},u(l);var p={sku:m,media:Jn(a,{convertToUrl:!0})};return[null!==(n=i.featured)&&void 0!==n&&n,Gn(l,Gn(p,p))]},[])}function Kn(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=>Gn(t.components,Gn({block:e},{block:e}));if(!a||!r)return n.map(o).filter(e=>null!=e);for(var s,u=[],l=new Map,d=f(n);!(s=d()).done;){var h=s.value,c=Gn(a,Gn({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 v=[],p=0,g=u;p<g.length;p++){var y=g[p],b={key:y},w=Gn(r,Gn({group:b},{group:b}));v.push([w]);for(var k,S=f(l.get(y));!(k=S()).done;){var E=k.value;v.push(o(E))}}return v}function Xn(e,t){return t.assertions?t.assertions.every(qn.bind(null,e)):!!t.orAssertions&&(!t.orAssertions.length||t.orAssertions.some(qn.bind(null,e)))}function Yn(t,i,n,a=null){var r,o=null!==(r=null==t?void 0:t.flow)&&void 0!==r?r:{},s=o.manager,u=o.previousStepAvailable,l=o.nextStepAvailable,d=t.state,h={};return a&&(h={block:a}),h=v({},h,{state:d,urlParams:e.getUrlParams(),flow:{isLaunched:!(null==s||!s.flowOpen),previousStepAvailable:!!u,nextStepAvailable:!!l},launch:d.launch,sku:d.sku,customer:d.customer}),"string"==typeof i&&i.includes(e.SMART_TEXT_PATTERN)&&(i=Qn(i,h)),i}function qn(t,{value:i,expected:n,operator:a},r){if(i=Yn(t,i,0,r),n=Yn(t,n,0,r),"equals"===a)return i===n;if("notEquals"===a)return i!==n;if("contains"===a){var o;if(Array.isArray(i)||"string"==typeof i||i instanceof String||(i=i.toString()),"collapse"==n)n+="_"+(null===(o=t.getCurrentCollapsibleSku())||void 0===o?void 0:o.skuId);return i.includes(n)}return"notContains"===a?(Array.isArray(i)||"string"==typeof i||i instanceof String||(i=i.toString()),!i.includes(n)):"set"===a?"boolean"==typeof n?!!i&&!i.toString().match(e.LIQUID_VARIABLE_REGEX)===n:!!i&&!i.toString().match(e.LIQUID_VARIABLE_REGEX):"notSet"===a?!i||i.toString().match(e.LIQUID_VARIABLE_REGEX):"gt"===a?i>n:"gte"===a?i>=n:"lt"===a?i<n:"lte"===a&&i<=n}function Jn(e,{convertToUrl:t}={convertToUrl:!1}){return Object.entries(e).reduce((e,[i,{content:n}])=>(t&&"string"!=typeof n&&n&&(n=URL.createObjectURL(n)),v({},e,{[i]:n})),{})}function Qn(t,i){var n=t;if("string"!=typeof t)return n;for(var a,r=new RegExp(e.VAR_REGEX.source,e.VAR_REGEX.flags),o=[];null!==(a=r.exec(t))&&(o.push(a),r.global);)a.index===r.lastIndex&&r.lastIndex++;for(var s=0,u=o;s<u.length;s++){var l=u[s],d=l[0],h=l[1],c=Qn(h,i);if(d===t)return m(d,c);c!==h&&(n=n.replace(h,c)),n=n.replace(e.VAR_REGEX,m)}return n;function m(e,t){var n=String(t).split("."),a=n[0];if(!a)return e;var r=Zn(i,a);if(void 0===r)return e;if("object"==typeof r&&null!==r&&0===Object.keys(r).length)return"";var o=Zn(i,...n);return void 0===o?"":"string"!=typeof o?o:Qn(o,i)}}function Zn(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 ea=e=>{var t=e.state.timeSpentOnPaywall;if(t)return Date.now()-t},ta=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}`},ia=(e,t)=>{if(!e||!t)return!0;var i=null!=e&&e.includes("rgb")?ta(e):e,n=null!=t&&t.includes("rgb")?ta(t):t;return(null==i?void 0:i.toLowerCase())===(null==n?void 0:n.toLowerCase())},na=!0,aa=!1,ra=!1,oa=!1,sa=!1,ua=!1,la=null,da=null,ha=null,ca=!1,ma="",fa=!1,va=null,pa=null,ga=null,ya=null,ba=null,wa=null,ka=null,Sa=null,Ea=!1,Pa=null,Ta="",Ma=0,Aa=1,Da=null,xa=[],Ca=new WeakMap,Ia=new WeakMap,La=1;function _a(e){var t=Ia.get(e);return t||(t=La++,Ia.set(e,t)),String(t)}var Ra=null,Fa=null;function Oa(e){return!0===e||"true"===e||"1"===e||"yes"===e}function Wa(e,t){if(function(){if("undefined"==typeof window)return!1;try{var e,t;return!!Oa(window.NAMI_TTS_DEBUG)||Oa(null===(e=window.localStorage)||void 0===e?void 0:e.getItem("nami:tts:debug"))||Oa(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 $a(e="TTS is unavailable in this runtime."){aa||(aa=!0,Wa(e))}function Na(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 ja(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 Ba(e){return e.toLowerCase().replace(/[^a-z0-9$]+/g," ").replace(/\s+/g," ").trim()}function za(e){return ja(String(null!=e?e:"").replace(/<[^>]*>/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[*_`#>~]/g," "))}function Ua(e,t){var i=ja(t);i&&e[e.length-1]!==i&&e.push(i)}function Ha(e,t=[]){var i=[];return[...e,...t].forEach(e=>{var t=function(e){var t=ja(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=ja(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=ja(t.slice(n));u&&i.push(u);return i.length?i:[t]}(e);t.length||Ua(i,e),t.forEach(e=>Ua(i,e))}),i.slice(0,60)}function Ga(e){return ja(e.join(". ").replace(/\.\s*([.!?])/g,"$1"))}function Va(e){var t,i=Da;i&&(e&&i.id===e||(i.status="cancelled",(null===(t=Da)||void 0===t?void 0:t.id)===i.id&&(Da=null)))}function Ka(){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 Xa(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot}function Ya(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=Xa(n)?n.host:n}return t}function qa(e,t){return!!t&&-1!==Ya(t).indexOf(e)}function Ja(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 Qa(e){return Ja(e,Ka())}function Za(e,t){t&&-1===e.indexOf(t)&&e.push(t)}function er(e,t){var i=t.shadowRoot;i&&i.querySelectorAll('button,[role="button"],a,input,select,textarea,[tabindex]:not([tabindex="-1"])').forEach(t=>Za(e,t))}function tr(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:Ya(e)}function ir(e,t=[]){var i=[],n=(t.length?t:Ya(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=Ya(e).find(e=>e.matches("nami-product-container"));if(a)return a;var r=ha&&"querySelectorAll"in ha?ha:"undefined"!=typeof document?document:null;return r&&null!==(i=Array.prototype.slice.call(r.querySelectorAll("nami-product-container")).find(t=>qa(t,e)))&&void 0!==i?i:null}(e,n);return Za(i,e),er(i,e),n.forEach(t=>{var n=!!a&&(t===a||qa(a,t)),r=t!==e&&qa(t,e),o=t.matches('nami-product-container,nami-button,[role="button"],button,[tabindex]:not([tabindex="-1"])');(n||r||t===e)&&o&&(Za(i,t),er(i,t))}),null!=a&&a.isConnected&&(Za(i,a),er(i,a)),i}function nr(e){return"true"===e.getAttribute("data-tts-composite-active")||"true"===e.getAttribute("data-webos-luna-composite-active")}function ar(e){return!!e&&xa.some(t=>t.getAttribute("data-tts-composite-transaction")===String(e)||t.getAttribute("data-webos-luna-composite-transaction")===String(e))}function rr(e){var t,i;return xa.length?e?null!==(i=xa.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=xa[0])&&void 0!==t?t:null:null}function or(e,t,i){var n=ja(t);return!!n&&(Ca.has(e)||Ca.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 sr(e,t,i,n=[]){var a=ja(t);if(!a)return!1;dr(),lr(void 0,void 0,"new-composite",!0);var r=ir(e,n);return r.forEach(e=>or(e,a,i)),xa=r,!0}function ur(e,t,i){if(!(t instanceof Element))return!1;if(!t.isConnected||!i)return!1;if(!function(e){var t;return!(!e||(null===(t=Da)||void 0===t?void 0:t.id)!==e||"composite"!==Da.reason||!ar(e))}(i))return!1;if(!t.matches("nami-product-container"))return!1;var n=Da;if(null==n||!n.text)return!1;var a=[];Za(a,t),er(a,t);var r=[];return a.forEach(e=>{or(e,n.text,i)&&(Za(xa,e),Za(r,e))}),r.length>0}function lr(e,t,i="manual",n=!1){var a,r=e&&-1===xa.indexOf(e)?ir(e):xa;if(r.length){var o=Da,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?Wa("composite restore skipped: transaction mismatch",{reason:i}):n||!o||t&&t===o.id||!r.some(e=>nr(e))?(dr(),r.forEach(e=>{var t=Ca.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])),Ca.delete(e))}),e&&-1===xa.indexOf(e)||(xa=[]),!t||(null===(a=Da)||void 0===a?void 0:a.id)!==t||e&&Da.element!==e||(Da.status="ended",Da=null)):Wa("composite restore skipped: active transaction mismatch",{reason:i})}}function dr(){ga&&(clearTimeout(ga),ga=null)}function hr(){ya&&(clearTimeout(ya),ya=null),Ra=null}function cr(){ba&&(clearTimeout(ba),ba=null)}function mr(){wa&&(clearTimeout(wa),wa=null)}function fr(){ka&&(clearTimeout(ka),ka=null)}function vr(){Sa&&(clearTimeout(Sa),Sa=null)}function pr(e){Ea=!0,vr(),Sa=setTimeout(()=>{Sa=null,Ea=!1},br(e)+500)}function gr(){vr(),Ea=!1}function yr(e){xa.length&&lr(void 0,void 0,e,!0)}function br(e){var t=ja(e),i=350*(t?t.split(/\s+/).filter(Boolean).length:0);return Math.min(3e4,Math.max(4e3,i))}function wr(e,t="",i="estimated-speech-duration"){if(rr(e)){var n=br(t);dr(),ga=setTimeout(()=>{ga=null;var t=rr(e);t&&(Qa(t)||lr(t,e,i))},n)}}function kr(){return"undefined"==typeof window?null:window}function Sr(){var e,t=null===(e=kr())||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 Er(){return!!Sr()}function Pr(){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 Tr(){return"undefined"!=typeof window&&void 0!==window.speechSynthesis&&"function"==typeof window.speechSynthesis.speak&&"function"==typeof window.SpeechSynthesisUtterance}function Mr(){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 Ar(){var e,t;if("undefined"==typeof window)return!1;if(Mr())return!1;var i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"",n=kr();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 Dr(){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 xr(){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 Cr(){if("undefined"==typeof window)return!1;try{return"television"===e.getDeviceFormFactor()}catch(e){return!1}}function Ir(){if(sa)return!1;var e=Pr();if(!e)return!1;try{return"function"!=typeof e.isEnabled||e.isEnabled()}catch(e){return!1}}function Lr(){return{televisionRuntime:Cr(),televisionTtsRuntime:_r(),webos:Ar(),tizen:Dr(),vizio:Mr(),xbox:xr(),hasWebOsServiceRequest:Er(),webOsRequestType:typeof Sr(),hasWebSpeechApi:Tr(),webSpeechUnavailableForSession:ra,webOsLunaUnavailableForSession:oa,vizioChromevoxUnavailableForSession:sa}}function _r(){return Cr()||Ar()||Mr()||Dr()}function Rr(){return _r()&&!ra&&Tr()}function Fr(e){if(ua=e,Wa("set media playing",{playing:e,hasDeferredUtterance:!!la}),!e&&la){var t,i=la;if(la=null,i.options.transactionId&&(null===(t=Da)||void 0===t?void 0:t.id)!==i.options.transactionId)return void Wa("drop stale deferred speech",{transactionId:i.options.transactionId,reason:i.options.reason});Zr(i.text,i.options)}}function Or(e){ra=!0,$a(Ar()?"Web Speech TTS unavailable in this webOS runtime":"Web Speech TTS unavailable in this runtime"),Wa("web speech unavailable",{error:e})}function Wr(e){oa=!0,Wa("webOS Luna unavailable",{error:e})}function $r(e,t){la={text:e,options:t}}var Nr={name:"webos-luna-tts",platform:"webos",isAvailable:function(){return _r()&&!Mr()&&!oa&&Er()},speak:function(e,t){Wa("speakViaWebOsLuna:enter",{textPreview:e.slice(0,160),reason:t.reason,transactionId:t.transactionId,requestType:typeof Sr()});var i=Sr();if(!i)return Wa("speakViaWebOsLuna:no-request"),!1;var n="composite"===t.reason,a=!1,r=()=>{var r,o;if(wa=null,t.transactionId&&(null===(r=Da)||void 0===r?void 0:r.id)!==t.transactionId)return Wa("speakViaWebOsLuna:drop-stale-delayed-speak",{transactionId:t.transactionId,activeTransaction:null===(o=Da)||void 0===o?void 0:o.id,reason:t.reason}),!1;if(ua)return Wa("speakViaWebOsLuna:defer-delayed-speak-media-playing",{transactionId:t.transactionId,reason:t.reason}),$r(e,t),!0;var s=!1;try{Wa("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(Wa("speakViaWebOsLuna:onSuccess",{response:i,transactionId:t.transactionId}),!t.transactionId||(null===(n=Da)||void 0===n?void 0:n.id)===t.transactionId){var r=function(e){var t,i=ja(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=ar(e),r=!e||(null===(n=Da)||void 0===n?void 0:n.id)===e;e&&r&&Da&&!a?(Da.status="ended",Da=null):e&&r&&Da&&(Da.status="ended"),a&&r&&wr(e,t,i)}(t.transactionId,e,r?"webos-feedback":"estimated-speech-duration"))}},onFailure:i=>{var n;s=!0,Wa("speakViaWebOsLuna:onFailure",{error:i,transactionId:t.transactionId});var a=ar(t.transactionId),r=!t.transactionId||(null===(n=Da)||void 0===n?void 0:n.id)===t.transactionId;t.transactionId&&r&&Da&&!a?(Da.status="cancelled",Da=null):t.transactionId&&r&&Da&&(Da.status="cancelled"),Wr(i),a&&r&&wr(t.transactionId,e,"estimated-speech-duration-after-failure")}})}catch(e){var u;return t.transactionId&&(null===(u=Da)||void 0===u?void 0:u.id)===t.transactionId&&(Da.status="cancelled",Da=null),Wr(e),!1}return!s};if(n)return mr(),Wa("speakViaWebOsLuna:delay-composite-until-focus-settles",{delayMs:250,transactionId:t.transactionId}),wa=setTimeout(r,250),!0;return r()},stop:zr},jr={name:"web-speech",platform:"web",isAvailable:Rr,speak:function(e,t){if(!Rr())return!1;try{var i=new window.SpeechSynthesisUtterance(e);return i.onstart=()=>{var e;t.transactionId&&(null===(e=Da)||void 0===e?void 0:e.id)===t.transactionId&&(Da.status="started")},i.onend=()=>{var e=Da,i=!t.transactionId||(null==e?void 0:e.id)===t.transactionId;t.transactionId&&i&&e&&(e.status="ended",Da=null)},i.onerror=e=>{var i,n=e.error;t.transactionId&&(null===(i=Da)||void 0===i?void 0:i.id)===t.transactionId&&(Da.status="cancelled",Da=null),"synthesis-failed"===n&&Or(n)},window.speechSynthesis.speak(i),!0}catch(e){return Or("exception"),!1}},stop:()=>{if(Tr())try{window.speechSynthesis.cancel()}catch(e){}}},Br={name:"vizio-chromevox",platform:"vizio",isAvailable:Ir,speak:Hr,stop:Ur};function zr(){var e=Sr();if(e)try{e("luna://com.webos.service.tts",{method:"stop",parameters:{},onFailure:e=>Wa("webOS Luna stop failed",{error:e})})}catch(e){Wa("webOS Luna stop threw",{error:e})}}function Ur(e=!0){var t=!!ba,i=Ea;cr();var n=Pr(),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(""),gr()}catch(e){gr(),Wa("VIZIO stop threw",{error:e})}}function Hr(e,t){var i=Pr();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?(cr(),ba=setTimeout(()=>{var n;if(ba=null,!t.transactionId||!Da||Da.id===t.transactionId)if(t.element&&r&&!t.element.isConnected){var a;t.transactionId&&(null===(a=Da)||void 0===a?void 0:a.id)===t.transactionId&&(Da.status="cancelled",Da=null)}else{if(ua)return hr(),Fa=null,void $r(e,t);i.play(e),pr(e),t.transactionId&&(null===(n=Da)||void 0===n?void 0:n.id)===t.transactionId&&(Da.status="ended",Da=null)}},o),!0):(i.play(e),pr(e),t.transactionId&&(null===(a=Da)||void 0===a?void 0:a.id)===t.transactionId&&(Da.status="ended",Da=null),!0)}catch(e){return function(e){sa=!0,Wa("VIZIO Chromevox unavailable",{error:e})}(e),!1}}function Gr(e){return"high"===e?3:"normal"===e?2:1}function Vr(){return Date.now()-Ma<1500}function Kr(e){return Ba(e)}function Xr(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-${_a(e)}`].filter(Boolean).join("|"):""}(e);return Ba(t||ao(e))}function Yr(e){var t=Kr(e);return"clickable"===t||"button"===t||"focusable"===t||"selected"===t||"unselected"===t}function qr(e,t,i){var n;if(Fa={textKey:Kr(e),reason:t.reason,timestamp:Date.now()},"high"===i){var a=br(e),r=Date.now();Ra={transactionId:t.transactionId,pageKey:ma,element:null!==(n=t.element)&&void 0!==n?n:null,elementKey:Xr(t.element),textKey:Kr(e),startedAt:r,suppressUntil:r+a},ya&&clearTimeout(ya),ya=setTimeout(()=>{ya=null,Ra=null},a)}}function Jr(e,t=!0){var i,n,a,r=!(!e||(null===(i=Da)||void 0===i?void 0:i.id)!==e||"pending"!==Da.status);if(Wa("stopSpeech",{preserveTransactionId:e,allowVizioEmptyFallback:t,activeTransaction:null===(n=Da)||void 0===n?void 0:n.id,reason:null===(a=Da)||void 0===a?void 0:a.reason,preservingCurrentTransaction:r}),la=null,r||(fr(),mr()),e||(hr(),dr(),yr("stop")),Va(e),pa&&(clearTimeout(pa),pa=null),!r){if(Tr())try{window.speechSynthesis.cancel()}catch(e){}Ar()&&zr(),Mr()&&Ur(t)}}function Qr(){Jr()}function Zr(e,t={}){var i,n,a;Wa("speakText:enter",{textPreview:ja(e).slice(0,160),reason:t.reason,transactionId:t.transactionId,element:Na(t.element),runtime:Lr()});var r=ja(e);if(!r)return!1;if(!_r())return Wa("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":Yr(e)?"low":"normal"}(r,o);if(function(e,t,i){var n=Kr(e),a=Date.now(),r=Xr(t.element);if(Yr(e))return!0;if(Fa&&Fa.reason===t.reason&&Fa.textKey===n&&a-Fa.timestamp<600)return Wa("suppress:duplicate-request",{reason:t.reason,textPreview:e.slice(0,120)}),!0;if(!Ra)return!1;if(Gr(i)>=Gr("high"))return!1;if("focus"===t.reason){var o=Ra.textKey;if(!Vr()&&(n===o||n.includes(o)))return Wa("suppress:focus-text-is-active-composite",{textPreview:e.slice(0,120),transactionId:Ra.transactionId,element:Na(t.element)}),!0}var s=function(e,t){return!!e&&!!t&&e===t}(t.element,Ra.element),u=!!r&&Ra.elementKey===r,l=!Ra.pageKey||Ra.pageKey===ma,d=Vr(),h=l&&!d&&a<Ra.startedAt+2500;return!(!s&&!u&&(l&&"focus"===t.reason&&t.element&&Ra.element!==t.element||"low"!==i&&!h)&&(hr(),1))}(r,o,s))return!1;if(o.interrupt&&Jr(o.transactionId,!1),ua)return $r(r,o),!0;var u=function(e){var t;return"manual"!==(null!==(t=e.reason)&&void 0!==t?t:"manual")&&e.element?Dr()?"accessibility-label":Ar()||Mr()?"programmatic":"accessibility-label":"programmatic"}(o);Wa("speakText:owner",{owner:u,reason:o.reason,element:Na(o.element)});var l,d,h="programmatic"===u?function(){if(!_r())return null;var e=Mr(),t=xr(),i=Ar();return Br.isAvailable()?(Wa("resolveTtsEngine:selected",{engine:"vizio-chromevox"}),Br):e?null:Nr.isAvailable()?(Wa("resolveTtsEngine:selected",{engine:"webos-luna-tts"}),Nr):t?jr.isAvailable()?jr:null:jr.isAvailable()?(Wa("resolveTtsEngine:selected",{engine:"web-speech"}),jr):(Wa("tts engine unavailable",{webos:i,vizio:e,xbox:t}),null)}():null;(Wa("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||Ar()}(u))&&sr(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=Da)||void 0===d?void 0:d.id)===o.transactionId&&(Da.status="started"),qr(r,o,s),!0;if(!h)return function(e,t){if(!Mr()||sa)return!1;var i=Date.now(),n=()=>{var a;ka=null,t.transactionId&&Da&&Da.id!==t.transactionId||(Ir()?Hr(e,t):Date.now()-i>=8e3?t.transactionId&&(null===(a=Da)||void 0===a?void 0:a.id)===t.transactionId&&(Da.status="cancelled",Da=null):ka=setTimeout(n,250))};return fr(),ka=setTimeout(n,250),!0}(r,o)?(qr(r,o,s),!0):($a(),!1);var c=h.speak(r,o);if(Wa("speakText:engine-result",{engine:h.name,accepted:c,reason:o.reason,transactionId:o.transactionId}),c&&qr(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=sr(o.element,r,o.transactionId,null!==(a=o.focusPath)&&void 0!==a?a:[]);return Wa("speakText:aria-label-fallback",{engine:h.name,accepted:m,reason:o.reason}),m&&qr(r,o,s),m}function eo(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 to(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 io(e){return ja(e).replace(/(?:,\s*)?\bbutton\b\s*$/i,"").trim()||ja(e)}function no(e){return ja(e.innerText||e.textContent||"")}function ao(e){if(!e)return"";if(nr(e)){var t=function(e){var t=Ca.get(e);return t?ja(t["data-tts-spoken-label"]||t["data-speech"]||t["speech-label"]||t["aria-label"]||e.getAttribute("title")||""):""}(e);if(t)return t;var i=ro(e.component);if(i)return i}var n=e.getAttribute("data-tts-spoken-label");if(n)return ja(n);var a=ro(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?ja(r):no(e)}function ro(e){if(!e||e.hidden)return"";var t=e,i=ja(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=f(so(t));!(n=a()).done;){var r=ro(n.value);if(r)return r}return""}function oo(e,t){if(Wa("applySpeechAttributes:enter",{element:Na(e),label:t,activeComposite:nr(e)}),!nr(e)){var i=ja(t),n=function(e,t){var i=ja(t);return i?to(e)?io(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 to(e)?io(t):ja(t)}(e,n))}}function so(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 uo(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 za(t.screenreaderText||t.text);case"text-list":return Array.isArray(t.texts)?za(t.texts.join(", ")):"";case"videoUrl":case"progressBar":return ja(t.screenreaderText);default:return""}}(e);Ua(t,n),so(e).forEach(e=>uo(e,t))}}function lo(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=>uo(e,i)):uo(e,i)}),i}function ho(e,t){var i=lo(e),n=function(e){if(!e)return"";var t=ro(e.component),i=e.getAttribute("data-speech")||e.getAttribute("speech-label")||e.getAttribute("aria-label")||e.getAttribute("title")||no(e),n=ja(t||i);return n?to(e)&&!/\bbutton\b\s*$/i.test(n)?ja(`${n} button`):n:""}(t);return Ga(Ha(i,n?[n]:[]))}function co(e){return e?Ba(`${ja(e.id||e.name||"")}|${Ga(Ha(lo(e),[]))}`):""}function mo(){return fa}function fo(e){Wa("setActivePage:enter",{nextKey:co(e),previousKey:ma,activePageAnnounced:ca,pageName:ja((null==e?void 0:e.name)||(null==e?void 0:e.id)||"")});var t=ma;da=e,function(e){var t=co(e);if(t!==ma){var i=!ma&&!!Pa;ca=!1,ma=t,fa=i,Pa=null,Ta=""}}(e),t!==ma&&Jr(void 0,!1)}function vo(e,t){if(Wa("prepareInitialComposite:enter",{element:Na(e),activePageKey:ma,activePageAnnounced:ca,blockedByNavigation:mo(),label:ao(e),isPrimary:eo(e)}),!da||ca||!eo(e)||mo())return Wa("prepareInitialComposite:skip",{hasActivePage:!!da,activePageAnnounced:ca,isPrimary:eo(e),blockedByNavigation:mo()}),!1;var i=ho(da,e);if(!i)return!1;var n=tr(e,t),a=function(e,t,i){var n={id:Aa++,reason:e,element:i,text:t,page:da,status:"pending"};return Da=n,n}("composite",i,e);ca=!0,Pa=e,Ta=Xr(e);var r,o=Zr(i,{reason:"composite",interrupt:!0,transactionId:a.id,element:e,focusPath:n,focusedLabel:ao(e),priority:"high"});o||(ca=!1,(null===(r=Da)||void 0===r?void 0:r.id)===a.id&&(Da.status="cancelled",Da=null));return o}function po(e,t){Wa("preparePrimaryCtaCompositeFocus:enter",{element:Na(e),label:ao(e),activePageKey:ma,activePageAnnounced:ca});var i=vo(e,t);return Wa("preparePrimaryCtaCompositeFocus:result",{result:i,activePageKey:ma,activePageAnnounced:ca}),i}function go(e){Wa("handleNativeFocusIn:enter",{target:e.target instanceof Element?Na(e.target):String(e.target),activePageKey:ma,activePageAnnounced:ca});var t=function(e){for(var t,i=null,n=f("function"==typeof e.composedPath?e.composedPath():[]);!(t=n()).done;){var a=t.value;if(a instanceof Element&&ao(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&&yo(t,e)}function yo(e,t){if(Wa("handleFocusedElementForSpeech:enter",{element:Na(e),label:ao(e),ttsEnabled:na,runtime:Lr(),activePageKey:ma,activePageAnnounced:ca,lastFocused:Na(Pa),lastFocusedElementIdentity:Ta}),!e)return Wa("handleFocusedElementForSpeech:skip-basic",{hasElement:!!e,ttsEnabled:na}),!1;if(!_r())return!1;var i=Xr(e);if(Ra&&Ra.pageKey===ma&&Date.now()<Ra.startedAt+2500){var n=Ra.element===e,a=!!i&&Ra.elementKey===i;if(!Vr()&&(n||a))return Wa("handleFocusedElementForSpeech:skip-during-initial-composite-lock",{element:Na(e),sameCompositeElement:n,sameCompositeElementKey:a}),!1;var r=ao(e),o=r?Kr(r):"";if(!Vr()&&o&&Ra.textKey.includes(o))return Wa("handleFocusedElementForSpeech:skip-composite-contained-label-during-initial-lock",{element:Na(e),labelPreview:r.slice(0,120),transactionId:Ra.transactionId}),Pa=e,Ta=i,!1}if(Pa===e||i&&i===Ta&&!ca)return Wa("handleFocusedElementForSpeech:skip-same-element",{element:Na(e),activePageAnnounced:ca,elementIdentity:i,lastFocusedElementIdentity:Ta}),!1;if(!ca&&da&&eo(e)&&!Pa&&!mo())return vo(e,t);var s=ao(e);if(!s)return!1;if(Ra){var u=Kr(s),l=Ra.textKey;if(!Vr()&&(u===l||u.includes(l)))return Wa("handleFocusedElementForSpeech:skip-active-composite-label",{element:Na(e),labelPreview:s.slice(0,120),transactionId:Ra.transactionId}),Pa=e,Ta=i,!1}return Pa=e,Ta=i,pa&&clearTimeout(pa),pa=setTimeout(()=>{pa=null,Pa===e&&Zr(s,{reason:"focus",interrupt:!0,element:e,focusPath:tr(e,t),priority:"normal"})},120),!0}function bo(e=document){var t;if(Wa("attachFocusSpeechListeners:enter",{root:e instanceof Element?Na(e):e instanceof DocumentFragment?"document-fragment":"document",runtime:Lr()}),wo(),!_r())return Wa("focus speech listeners not attached: non-CTV runtime"),wo;if(!_r())return Wa("focus speech listeners not attached: non-CTV runtime"),wo;var i,n=e=>go(e),a=()=>(Wa("handleUserNavigationKey",{activePageKey:ma,activePageAnnounced:ca}),Ma=Date.now(),void(fa=!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&&yo(i,e)}(e)}}return va={root:e,focusListener:n,keyListener:a,previousTvjsHandler:i},wo}function wo(){var e;if(Wa("detachFocusSpeechListeners:enter",{hasCleanup:!!va}),va){var t=va,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),va=null}}function ko(){var e;Wa("resetScreenreaderState:enter",{activePageKey:ma,activePageAnnounced:ca,activeTransaction:null===(e=Da)||void 0===e?void 0:e.id,lastFocused:Na(Pa)}),wo(),la=null,ua=!1,da=null,ha=null,ca=!1,ma="",fa=!1,Pa=null,Ta="",Ma=0,Fa=null,hr(),dr(),cr(),mr(),fr(),gr(),pa&&(clearTimeout(pa),pa=null),yr("reset"),Va(),Da=null}var So=function(){return m(function t(i,n,a="",r=""){var o;u(this,t),this.playing=!1,this.toggling=!1,this.handleVideoEvents=t=>{this.video.onended=()=>{Fr(!1),this.handlePlayerAnalytics(t,e.NamiPaywallAction.VIDEO_ENDED)},this.video.onpause=()=>{Fr(!1),this.toggling||this.handlePlayerAnalytics(t,e.NamiPaywallAction.VIDEO_PAUSED)},this.video.onplay=()=>{Fr(!this.video.muted),this.toggling||this.handlePlayerAnalytics(t,this.video.currentTime>.05?e.NamiPaywallAction.VIDEO_RESUMED:e.NamiPaywallAction.VIDEO_STARTED)},this.video.onvolumechange=()=>{this.toggling||(this.muted=this.video.muted,Fr(!this.video.paused&&!this.video.ended&&!this.muted),this.handlePlayerAnalytics(t,this.muted?e.NamiPaywallAction.VIDEO_MUTED:e.NamiPaywallAction.VIDEO_UNMUTED))}},this.removeVideoEvents=()=>{this.video&&(Fr(!1),this.video.onended=null,this.video.onpause=null,this.video.onplay=null,this.video.onvolumechange=null,this.toggling=!1)},this.video=null!=n?n:this.video,null!==(o=t.instance)&&void 0!==o&&o.videoSrc&&n.src!=t.instance.videoSrc&&this.handlePlayerAnalytics(i,e.NamiPaywallAction.VIDEO_CHANGED),this.videoSrc=n.src,this.video&&(this.muteByDefault=n.muted,this.loopVideo=n.loop,this.autoplayVideo=n.autoplay,this.muted=this.video.muted,this.videoComponentName=a,this.videoComponentId=r,this.playing=!(!(this.video.currentTime>0)||this.video.paused||this.video.ended),Fr(this.playing&&!this.video.muted),this.handleVideoEvents(i))},[{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(t){this.toggling=!0,this.video.muted=!this.video.muted,this.muted=this.video.muted,this.handlePlayerAnalytics(t,this.muted?e.NamiPaywallAction.VIDEO_MUTED:e.NamiPaywallAction.VIDEO_UNMUTED)}},{key:"videoPlayingAction",value:function(){var t,i;return(null===(t=this.video)||void 0===t?void 0:t.currentTime)<=0?e.NamiPaywallAction.VIDEO_STARTED:this.video.paused?e.NamiPaywallAction.VIDEO_PAUSED:this.video.ended?e.NamiPaywallAction.VIDEO_ENDED:(null===(i=this.video)||void 0===i?void 0:i.currentTime)>.05?e.NamiPaywallAction.VIDEO_RESUMED:e.NamiPaywallAction.UNKNOWN}},{key:"handlePlayerAnalytics",value:function(t,i){if(this.video){var n={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};e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,{action:null!=i?i:this.videoPlayingAction(),videoMetaData:n,timeSpentOnPaywall:ea(t)})}}}])}();So.instance=null;var Eo=({onTap:t,sku:i,componentChange:n,contextProvider:a}={})=>{var r,o,s,u,l,d,h,c,m,f,p,g=e.NamiPaywallAction.UNKNOWN;switch(null==t?void 0:t.function){case ft:g=e.NamiPaywallAction.CLOSE_PAYWALL,p=ea(a),Po(),null===(r=So.instance)||void 0===r||r.handlePlayerAnalytics(a,e.NamiPaywallAction.VIDEO_ENDED);break;case pt:g=e.NamiPaywallAction.RESTORE_PURCHASES,To();break;case yt:g=e.NamiPaywallAction.SIGN_IN,Mo();break;case Dt:Ao(null===(o=t.parameters)||void 0===o?void 0:o.url);break;case wt:i&&(g=e.NamiPaywallAction.BUY_SKU,i=Do(a,t,i));break;case Ct:g=e.NamiPaywallAction.PAGE_CHANGE,n={name:null==t||null===(s=t.parameters)||void 0===s?void 0:s.screen},xo(a,null==t||null===(u=t.parameters)||void 0===u?void 0:u.screen);break;case St:g=e.NamiPaywallAction.TOGGLE_CHANGE,n=Co(a,null==t||null===(l=t.parameters)||void 0===l?void 0:l.formId,null==t||null===(d=t.parameters)||void 0===d?void 0:d.value);break;case Pt:i&&(g=e.NamiPaywallAction.SELECT_SKU,Io(a,i));break;case Mt:i&&(g=e.NamiPaywallAction.PURCHASE_SELECTED_SKU,Lo(a,i));break;case Lt:break;case Rt:null===(h=So.instance)||void 0===h||h.togglePlayVideo(a);break;case Ot:null===(c=So.instance)||void 0===c||c.togglePlayVideo(a);break;case $t:null===(m=So.instance)||void 0===m||m.toggleMuteVideo(a);break;case jt:null===(f=So.instance)||void 0===f||f.toggleMuteVideo(a)}g!==e.NamiPaywallAction.UNKNOWN&&e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,v({},a.getPaywallActionEventData(),{action:g,sku:i,timeSpentOnPaywall:p,componentChange:n,purchaseError:void 0,purchases:void 0}))},Po=()=>{Qr(),e.storageService.clearLaunchId(),_o(e.PaywallManagerEvents.Close)||"undefined"==typeof window||window.history.back()},To=()=>{var t=e.hasCapability(e.Capabilities.THIRD_PARTY_TRANSACTIONS);_o(e.PaywallManagerEvents.Restore)||t||e.logger.warn("NamiPaywallManager.registerRestoreHandler is not registered, so restore option on the paywall will use default behavior.")},Mo=()=>{_o(e.PaywallManagerEvents.SignIn)},Ao=t=>{t?_o(e.PaywallManagerEvents.DeeplinkAction,t)||"undefined"!=typeof window&&window.open(t,"_blank"):e.logger.debug("Paywall deep link action invoked, but no url present.")},Do=(t,i,n)=>{var a,r=null===(a=i.parameters)||void 0===a?void 0:a.promo,o=n;if(r)e.logger.debug(`promo id is not null ${null==n?void 0:n.id}`),o.promoId=r.toString();else{e.logger.debug(`promo id is null for ${n.id}, product details: ${JSON.stringify(n.productDetails)}`);var s=n.productDetails;if(Bt(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)e.logger.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)e.logger.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(t,i){if(e.hasCapability(e.Capabilities.THIRD_PARTY_TRANSACTIONS)){if(e.storageService.setPurchaseImpression(),e.NamiEventEmitter.getInstance().listenerCount(e.PaywallManagerEvents.BuySku)<=0)return void e.logger.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.");e.logger.info(`Handing off purchase for processing by developer skuId=${i.skuId} promoId=${i.promoId}`),_o(e.PaywallManagerEvents.BuySku,i)}else{var n=e.namiBuySKU(i.skuId);if(n&&(e.logger.info(`Purchase flow completed, success=${n.success}, code=${n.billingResponseCode}, message=${n.message}`),n.success)){var a;e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,{action:e.NamiPaywallAction.CLOSE_PAYWALL,sku:i,timeSpentOnPaywall:ea(t)}),null===(a=So.instance)||void 0===a||a.handlePlayerAnalytics(t,e.NamiPaywallAction.VIDEO_ENDED);var r=t.getSelectedCampaign();r&&r.conversion_event_type==e.CampaignRuleConversionEventType.IN_APP&&r.conversion_event_url?(e.storageService.clearLaunchId(),window.location.href=r.conversion_event_url):Po()}}}(t,o),o},xo=(e,t)=>{var i;t&&((null===(i=window.history.state)||void 0===i?void 0:i.prevUrl)==t?window.history.back():e.setCurrentPage(t))},Co=(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}},Io=(e,t)=>{var i=e.getCurrentGroupId(),n=e.selectedProducts();i&&t.id!=n[i]&&(n[i]=t.id,e.setSelectedProducts(n))},Lo=(e,t)=>{e.setPurchase(!0,t)};function _o(t,...i){var n=e.NamiEventEmitter.getInstance();return n.emit(t,...i),n.listenerCount(t)>0}var Ro,Fo,Oo,Wo,$o,No,jo,Bo,zo,Uo,Ho,Go=e=>e,Vo=e._internal.NamiFlowManager,Ko=250,Xo=function(){function n(t,i,a){var r;return u(this,n),(r=s(this,n)).pages=[],r.currentOffset=0,r.presentationStyle="fullscreen",r._sheetEntranceActive=!0,r.formFactor=e.getDeviceFormFactor(),r.timeSpentOnPaywall=0,r.animation={transition:"none",direction:"forward"},r._originalBodyStyles={},r._originalDocumentStyles={},r._savedScrollY=0,r._sheetDragStartY=0,r._sheetIsDragging=!1,r._dismissThreshold=100,r._boundHandleKeyDownEvent=e=>r.handleKeyDownEvent(e),r._stylesAlreadySaved=!1,r.type=t,r.value=i,r.context=a,r.setPaywallData(),r.presentationStyle=r.getPresentationStyle(r.paywall),r.applyPresentationHostClasses(),w(r,r)}return y(n,t.LitElement),m(n,[{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 t=e.getPaywallDataFromLabel(this.value,this.type);this.paywall=t.paywall,this.campaign=t.campaign}},{key:"getPresentationStyle",value:function(t){var i,n,a,r=null!==(i=null==t||null===(n=t.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.presentationStyle)&&void 0!==i?i:null==t||null===(a=t.template)||void 0===a||null===(a=a.initialState)||void 0===a?void 0:a.presentation_style;return e.getEffectiveWebStyle(r)}},{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 e;M(n,"connectedCallback",this)([]),null!==(e=window.TVJS)&&void 0!==e&&e.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=this),this._detachFocusSpeechListeners=bo(this),document.addEventListener("keydown",this._boundHandleKeyDownEvent),this._swipeHandler=ht(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,a;M(n,"disconnectedCallback",this)([]),Qr(),null===(t=this._detachFocusSpeechListeners)||void 0===t||t.call(this),this._detachFocusSpeechListeners=void 0,ko(),e.storageService.clearLaunchId(),null!==(i=window.TVJS)&&void 0!==i&&i.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=document.body),document.removeEventListener("keydown",this._boundHandleKeyDownEvent),e.NamiEventEmitter.getInstance().removeAllListeners(e.PAYWALL_ACTION_EVENT),this.restoreStyles(),null===(a=this._halfSheetAbortController)||void 0===a||a.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(t){(10009===t.keyCode||27===t.keyCode||166===t.keyCode||"Backspace"===t.key||"GoBack"===t.key||"BrowserBack"===t.key||"XF86Back"===t.key)&&(t.preventDefault(),Qr(),this.flow?this.flow.triggerActions(e.NamiReservedActions.REMOTE_BACK):this.isModal&&this.animateSheetDismiss().then(()=>Po()))}},{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(),Po()}):this.animateSheetDismiss().then(()=>Po())}},{key:"animateSheetDismiss",value:function(){var e,t,i,n,a;return S(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,o(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 t;this.timeSpentOnPaywall=Date.now(),null===(t=this._detachFocusSpeechListeners)||void 0===t||t.call(this),this._detachFocusSpeechListeners=bo(this.renderRoot),e.isNamiFlowCampaign(this.campaign)&&(this.flow=Vo.instance.presentFlow(this.campaign,this,this.context)),this.isOverlay&&this.updateComplete.then(()=>{this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap()})}},{key:"updated",value:function(e){if(M(n,"updated",this)([e]),e.has("presentationStyle")){var t=e.get("presentationStyle");("compact_sheet"===t||"sheet"===t||"modal"===t)!==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 S(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,o(this.updateComplete);case 3:requestAnimationFrame(()=>{this.currentOffset=1,setTimeout(()=>{this.pages=[e],this.currentOffset=0,this.paywall=e,i&&(i.style.height="")},Ko)});case 4:return a.a(2)}},null,this,null,Promise)}},{key:"animateFullscreenEntry",value:function(){return S(function(e){for(;;)switch(e.n){case 0:return e.n=1,o(new Promise(e=>requestAnimationFrame(()=>e())));case 1:return this.classList.remove("nami-fullscreen-entering"),this.classList.add("nami-fullscreen-entering-active"),e.n=2,o(new Promise(e=>setTimeout(e,Ko)));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 S(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,o(new Promise(e=>setTimeout(e,t?0:Ko)));case 2:e.remove();case 3:return i.a(2)}},null,null,null,Promise)}},{key:"flowNavigateToScreen",value:function(t,i){var n,a,r,s,u,l,d,h,c,m,f;return S(function(v){for(;;)switch(v.n){case 0:if(null!==(n=this.flow)&&void 0!==n&&n.previousFlowStep&&this.flow.executeLifecycle(this.flow.previousFlowStep,e.NamiReservedActions.DISAPPEAR),r=this.presentationStyle,s=this.getPresentationStyle(t),u=0===this.pages.length,l="backward"===i.direction,"compact_sheet"!==r&&"sheet"!==r||"fullscreen"!==s){v.n=3;break}return this.classList.add("nami-fullscreen-entering"),this.presentationStyle="fullscreen",this.applyPresentationHostClasses(),v.n=1,o(this.updateComplete);case 1:return v.n=2,o(this.animateFullscreenEntry());case 2:v.n=11;break;case 3:if("fullscreen"!==r||"compact_sheet"!==s&&"sheet"!==s){v.n=10;break}if(!u&&!l){v.n=8;break}if(!l){v.n=6;break}return d=document.body.style.background||getComputedStyle(this).backgroundColor||"#000",this._sheetEntranceActive=!1,h=this._captureExitOverlay(d),this.presentationStyle=s,this.applyPresentationHostClasses(),this.pages=[t],this.paywall=t,v.n=4,o(this.updateComplete);case 4:return v.n=5,o(this._slideExitOverlayAway(h));case 5:v.n=7;break;case 6:this.presentationStyle=s,this.applyPresentationHostClasses();case 7:v.n=9;break;case 8:console.warn(`Unsupported forward transition: fullscreen → ${s}. Presenting as fullscreen.`);case 9:v.n=11;break;case 10:this.presentationStyle=s,this.applyPresentationHostClasses();case 11:return c=("compact_sheet"===r||"sheet"===r)&&"fullscreen"===s,m="fullscreen"===r&&("compact_sheet"===s||"sheet"===s),f=!("compact_sheet"!==r&&"sheet"!==r||"compact_sheet"!==s&&"sheet"!==s||r===s)||c||m,this.animation=f?{transition:"fade",direction:i.direction}:i,v.n=12,o(this.updatePages(t));case 12:null!==(a=this.flow)&&void 0!==a&&a.currentFlowStep&&this.flow.executeLifecycle(this.flow.currentFlowStep,e.NamiReservedActions.APPEAR);case 13:return v.a(2)}},null,this,null,Promise)}},{key:"getSelectedSlideIndexForCurrentCarousel",value:function(){return ut.getSelectedSlideIndex()}},{key:"renderFlow",value:function(){return"undefined"==typeof document?t.html(Ro||(Ro=Go``)):this.isOverlaySheet?this.renderHalfSheet():this.isModal?this.renderModal(this.renderFlowContainer()):this.renderFlowContainer()}},{key:"renderFlowContainer",value:function(){return t.html(Fo||(Fo=Go`
|
|
254
|
+
`)),Fe=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},Oe=globalThis,We=Oe.ShadowRoot&&(void 0===Oe.ShadyCSS||Oe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$e=Symbol(),Ne=new WeakMap,je=function(){return m(function e(t,i,n){if(u(this,e),this._$cssResult$=!0,n!==$e)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(We&&void 0===e){var i=void 0!==t&&1===t.length;i&&(e=Ne.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ne.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Be=(e,t)=>{if(We)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(var i,n=f(t);!(i=n()).done;){var a=i.value,r=document.createElement("style"),o=Oe.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=a.cssText,e.appendChild(r)}},ze=We?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,i="",n=f(e.cssRules);!(t=n()).done;){i+=t.value.cssText}return(e=>new je("string"==typeof e?e:e+"",void 0,$e))(i)})(e):e,Ue=Object.is,He=Object.defineProperty,Ge=Object.getOwnPropertyDescriptor,Ve=Object.getOwnPropertyNames,Ke=Object.getOwnPropertySymbols,Xe=Object.getPrototypeOf,Ye=globalThis,qe=Ye.trustedTypes,Je=qe?qe.emptyScript:"",Qe=Ye.reactiveElementPolyfillSupport,Ze=(e,t)=>e,et={toAttribute(e,t){switch(t){case Boolean:e=e?Je: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}},tt=(e,t)=>!Ue(e,t),it={attribute:!0,type:String,converter:et,reflect:!1,useDefault:!1,hasChanged:tt};null!==(Ce=Symbol.metadata)&&void 0!==Ce||(Symbol.metadata=Symbol("metadata")),null!==(Ie=Ye.litPropertyMetadata)&&void 0!==Ie||(Ye.litPropertyMetadata=new WeakMap);var nt=function(){function e(){var t;return u(this,e),(t=s(this,e))._$Ep=void 0,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Em=null,t._$Ev(),t}return y(e,D(HTMLElement)),m(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=f(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 Be(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:et).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:et;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:tt)(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 S(function(i){for(;;)switch(i.p=i.n){case 0:return this.isUpdatePending=!0,i.p=1,i.n=2,o(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,o(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=f(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=f(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 v=!1,p=this._$AL;try{var g;(v=this.shouldUpdate(p))?(this.willUpdate(p),null!==(g=this._$EO)&&void 0!==g&&g.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(p)):this._$EM()}catch(p){throw v=!1,this._$EM(),p}v&&this._$AE(p)}}},{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=it){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&&He(this.prototype,e,n)}}},{key:"getPropertyDescriptor",value:function(e,t,i){var n,a=null!==(n=Ge(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:it}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Ze("elementProperties"))){var e=Xe(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Ze("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ze("properties")))for(var e=this.properties,t=0,i=[...Ve(e),...Ke(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=f(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=f(this.elementProperties);!(h=c()).done;){var m=h.value,v=m[0],p=m[1],g=this._$Eu(v,p);void 0!==g&&this._$Eh.set(g,v)}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e))for(var i,n=f(new Set(e.flat(1/0).reverse()));!(i=n()).done;){var a=i.value;t.unshift(ze(a))}else void 0!==e&&t.push(ze(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}}])}();nt.elementStyles=[],nt.shadowRootOptions={mode:"open"},nt[Ze("elementProperties")]=new Map,nt[Ze("finalized")]=new Map,null!=Qe&&Qe({ReactiveElement:nt}),(null!==(Le=Ye.reactiveElementVersions)&&void 0!==Le?Le:Ye.reactiveElementVersions=[]).push("2.1.2");var at={attribute:!0,type:String,converter:et,reflect:!1,hasChanged:tt},rt=(e=at,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 ot(e){return(t,i)=>"object"==typeof i?rt(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 st(e){return ot(v({},e,{state:!0,attribute:!1}))}var ut=function(){function t(e,i,n){var a;return u(this,t),(a=s(this,t,[e,i,n])).host=null,a.defineDynamicStateProps(),a}return y(t,e.PaywallState),m(t,[{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(e,i,n){var a=new t(e,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 lt=e=>{var t;return S(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=dt(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 dt(e){return`${e.family}-${e.style}`.replace(/ /g,"")}function ht(t,i,n){var a,r,o,s,u,l,d,h;if("undefined"==typeof window||!t||!i)return e.logger.debug("Swipe detection is not supported in this environment."),{destroy(){},updateOptions(){}};var c={minDistance:null!==(a=null==n?void 0:n.minDistance)&&void 0!==a?a:30,maxDuration:null!==(r=null==n?void 0:n.maxDuration)&&void 0!==r?r:600,lockAxis:null===(o=null==n?void 0:n.lockAxis)||void 0===o||o,preventScrollOnSwipe:null!==(s=null==n?void 0:n.preventScrollOnSwipe)&&void 0!==s&&s,pointerTypes:null!==(u=null==n?void 0:n.pointerTypes)&&void 0!==u?u:["touch"],passiveListeners:null===(l=null==n?void 0:n.passiveListeners)||void 0===l||l,axisHint:null!==(d=null==n?void 0:n.axisHint)&&void 0!==d?d:"y",edgeLeakThreshold:null!==(h=null==n?void 0:n.edgeLeakThreshold)&&void 0!==h?h:24},m=t.style.touchAction;c.preventScrollOnSwipe&&(t.style.touchAction="none");var f=null,v=0,p=0,g=0,y=0,b=0,w=null,k=null,S=!1,E=!1,P=!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}},M=e=>c.pointerTypes.includes(e.pointerType),A=e=>{var i=e.composedPath?e.composedPath()[0]:e.target;if(M(e)&&null===f){f=e.pointerId,v=g=e.clientX,p=y=e.clientY,b=performance.now(),w=null,P=!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,t):null)||(E=!0);try{var n;null==t||null===(n=t.setPointerCapture)||void 0===n||n.call(t,e.pointerId)}catch(t){try{var a;null==i||null===(a=i.setPointerCapture)||void 0===a||a.call(i,e.pointerId)}catch(e){}}}},D=e=>{if(e.pointerId===f&&M(e)){if(g=e.clientX,y=e.clientY,c.lockAxis&&!w){var t=Math.abs(g-v),n=Math.abs(y-p);(t>2||n>2)&&(w=n>=t?"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(!P&&!S&&E&&d&&o>=c.minDistance){P=!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};i(m)}}}},x=e=>{if(e.pointerId===f)if(M(e))if(k)C();else if(P||S)C();else{var t,n=performance.now(),a=n-b,r=g-v,o=y-p,s=Math.abs(r),u=Math.abs(o),l="x"===(t=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"===t&&E&&(h+=c.edgeLeakThreshold),d&&l>=h){var m;m="x"===t?r>0?"right":"left":o>0?"down":"up";var T=l/Math.max(a,1);i({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,P=!1},I=!!c.passiveListeners&&{passive:!0},L=c.passiveListeners?{passive:!0,capture:!0}:{capture:!0};t.addEventListener("pointerdown",A,L),t.addEventListener("pointermove",D,I),t.addEventListener("pointerup",x,I),t.addEventListener("pointercancel",x,I),t.addEventListener("lostpointercapture",x,I);return{destroy:()=>{t.removeEventListener("pointerdown",A,L),t.removeEventListener("pointermove",D,I),t.removeEventListener("pointerup",x,I),t.removeEventListener("pointercancel",x,I),t.removeEventListener("lostpointercapture",x,I),c.preventScrollOnSwipe&&(t.style.touchAction=m),C()},updateOptions:e=>{Object.assign(c,e),"boolean"==typeof e.preventScrollOnSwipe&&(e.preventScrollOnSwipe?t.style.touchAction="none":t.style.touchAction=m)}}}var ct={},mt=ct.NAMI_CLOSE_PAYWALL,ft=void 0===mt?"namiClosePaywall":mt,vt=ct.NAMI_RESTORE_PURCHASES,pt=void 0===vt?"namiRestorePurchases":vt,gt=ct.NAMI_SIGN_IN,yt=void 0===gt?"namiSignIn":gt,bt=ct.NAMI_BUY_SKU,wt=void 0===bt?"namiBuySKU":bt,kt=ct.SET_STATE,St=void 0===kt?"setState":kt,Et=ct.NAMI_SELECT_SKU,Pt=void 0===Et?"namiSelectSKU":Et,Tt=ct.NAMI_PURCHASE_SELECTED_SKU,Mt=void 0===Tt?"namiPurchaseSelectedSKU":Tt,At=ct.NAMI_DEEP_LINK,Dt=void 0===At?"namiDeeplink":At,xt=ct.NAMI_NAVIGATE_TO_SCREEN,Ct=void 0===xt?"namiNavigateToScreen":xt,It=ct.NAMI_RELOAD_PRODUCTS,Lt=void 0===It?"namiReloadProducts":It,_t=ct.NAMI_PLAY_VIDEO,Rt=void 0===_t?"namiPlayVideo":_t,Ft=ct.NAMI_PAUSE_VIDEO,Ot=void 0===Ft?"namiPauseVideo":Ft,Wt=ct.NAMI_MUTE_VIDEO,$t=void 0===Wt?"namiMuteVideo":Wt,Nt=ct.NAMI_UNMUTE_VIDEO,jt=void 0===Nt?"namiUnmuteVideo":Nt,Bt=e=>"subscription"===e;function zt(e){if(Bt(null==e?void 0:e.product_type)){var t=Ht(e);if(t.length>0)return t[0].billingPeriod}return null}function Ut(e){var t=function(e){if(!e)return[];var t=e.offers.filter(e=>"promo"===e.offer_type);return Gt(t,e.subscription_period)}(e).find(e=>0===e.priceAmountMicros);return(null==t?void 0:t.billingPeriod)||null}function Ht(e){return e?Gt(e.offers.filter(e=>"default"===e.offer_type),e.subscription_period):[]}function Gt(e,t){return e.map(e=>Vt(e,t))}function Vt(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:Yt(m).format(c)}}function Kt(t,i=!1,n=!1,a=!1,r=!1){if(!t)return null;var o=t.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=(t,i,n,a,o)=>{var s=(e=>r?`${e}_abbrev`:e)(o),u=(e=>r?`${e}_abbrev_plural`:`${e}_plural`)(o),l=e.getTranslate(s),d=e.getTranslate(u);return r||l!==s||(l=e.getTranslate(`${o}_abbrev`)),r||d!==u||(d=e.getTranslate(`${o}_abbrev_plural`)),a?t.toString():n?1===t||i?l:d:1===t||i?`${t} ${l}`:`${t} ${d}`};switch(t.at(-1)){case"D":return c(h,i,n,a,"nami_day");case"W":return c(d,i,n,a,"nami_week");case"M":return c(l,i,n,a,"nami_month");case"Y":return c(u,i,n,a,"nami_year")}return null}function Xt(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 Yt(e){var t={maximumFractionDigits:2,minimumFractionDigits:0};try{return new Intl.NumberFormat(navigator.language,v({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(navigator.language,v({},t,{style:"currency",currency:"USD"}))}}var qt=(e,t,i)=>e&&t&&i?i.format(e-t):null,Jt=(e,t,i,n)=>{if(e&&t&&i&&n){var a=100*(1-e/(i/n*t));return`${Math.round(a)}%`}return null},Qt=(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)}},Zt=e=>ti(e.priceAmountMicros)/ei(e.billingPeriod),ei=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},ti=e=>e/1e6;function ii(e){return parseFloat((Math.round(e)/100).toFixed(2))}var ni=(t,i,n=[])=>({price:()=>ri(t),name:()=>null==t?void 0:t.name,title:()=>null==t?void 0:t.name,description:()=>null==t?void 0:t.description,duration:()=>oi(t),durationSingular:()=>oi(t,!0),period:()=>oi(t,!1,!0),periodNumber:()=>oi(t,!1,!1,!0),freeTrialDuration:()=>si(t),freeTrialDurationSingular:()=>si(t,!0),freeTrialPeriod:()=>si(t,!1,!0),freeTrialPeriodNumber:()=>si(t,!1,!1,!0),pricePerMonth:()=>ui(t),pricePerMonthRounded:()=>ui(t,!0),periodInMonths:()=>li(t),durationInMonths:()=>di(t),durationInMonthsSingular:()=>di(t,!0),periodNumberInMonths:()=>hi(t),percentagePriceDifferenceFromSku:()=>ci(t,i,n),priceDifferenceFromSku:()=>mi(t,i,n),promoEligible:()=>null===fi(t)&&null!==vi(t,i),freeTrialEligible:()=>null!==fi(t),promo:()=>{var e;return null===(e=vi(t,i))||void 0===e?void 0:e.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var e;return null===(e=pi(t,i))||void 0===e?void 0:e.formattedPrice},promoPeriod:()=>gi(t,i,!1,!0),promoPeriodNumber:()=>gi(t,i,!1,!1,!0),promoDuration:()=>gi(t,i),promoDurationSingular:()=>gi(t,i,!0),introEligible:()=>!1,pricePerDay:()=>Si(t),pricePerWeek:()=>Ei(t),pricePerWeekRounded:()=>Ei(t,!0),introductoryPrice:()=>wi(t,i),introductoryPeriod:()=>bi(t,i,!1,!0),introductoryPeriodNumber:()=>bi(t,i,!1,!1,!0),introductoryDuration:()=>bi(t,i),introductoryDurationSingular:()=>bi(t,i,!0),introductoryPricePerMonth:()=>ki(t,i),introductoryPricePerMonthRounded:()=>ki(t,i,!0),durationAbbrev:()=>oi(t,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>si(t,!1,!1,!1,!0),introductoryDurationAbbrev:()=>bi(t,i,!1,!1,!1,!0),promoDurationAbbrev:()=>gi(t,i,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>gi(t,i,!0,!0,!1,!0),durationInMonthsAbbrev:()=>di(t,!1,!1,!1,!0),durationSingularAbbrev:()=>oi(t,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>si(t,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>bi(t,i,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>gi(t,i,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>gi(t,i,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>di(t,!0,!1,!1,!0),periodAbbrev:()=>oi(t,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>si(t,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>bi(t,i,!1,!0,!1,!0),promoPeriodAbbrev:()=>gi(t,i,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>gi(t,i,!1,!0,!0,!0),periodInMonthsAbbrev:()=>di(t,!1,!0,!1,!0),periodly:()=>function(t){if(!t)return null;var i=t.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!i)return null;var n=i[1],a=i[2],r=i[3],o=i[4],s=void 0!==n?parseInt(n,10):0,u=void 0!==a?parseInt(a,10):0,l=void 0!==r?parseInt(r,10):0;return(void 0!==o?parseInt(o,10):0)>0?null:l>0?1===l?e.getTranslate("nami_weekly"):2===l?e.getTranslate("nami_biweekly"):null:u>0?1===u?e.getTranslate("nami_monthly"):2===u?e.getTranslate("nami_bimonthly"):3===u?e.getTranslate("nami_quarterly"):6===u?e.getTranslate("nami_biannually"):12===u?e.getTranslate("nami_yearly"):e.getTranslate("nami_monthly"):s>0?e.getTranslate("nami_yearly"):null}(zt(t)),iso_subscription_duration:()=>Pi(t),invalid:()=>!1,unavailable:()=>!1}),ai=(e,t,i,n=[])=>{if(!t)return null;var a=ni(t,i,n);return a[e]?a[e]():null},ri=e=>{var t=Ht(e);return t&&t.length?t[0].formattedPrice:null},oi=(e,t,i,n,a)=>Kt(zt(e),t,i,n,a),si=(e,t,i,n,a)=>Kt(Ut(e),t,i,n,a),ui=(e,t)=>{var i=Ht(e);if(!i||0===i.length)return null;var n=Zt(i[0]);return n?Yt(i[0].priceCurrencyCode).format(t?Math.round(n):n):null},li=(e,t)=>{var i=Ht(e);if(!i||0===i.length)return null;var n=i[0].billingPeriod;return Xt(n)?Kt("P1Y"===n?"P12M":n,!1,!1,!1,t):null},di=(e,t,i,n,a)=>{var r=Ht(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return Xt(o)?Kt("P1Y"===o?"P12M":o,t,i,n,a):null},hi=e=>{if(!e)return 0;var t=Ht(e);return t&&t.length?ei(t[0].billingPeriod):0},ci=(e,t,i=[])=>{var n,a=Ht(e);if(!a||0===a.length)return null;var r=null===(n=Qt(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return Jt(ii(a[0].priceAmountMicros),hi(e));var o=Ht(r);return Jt(ii(a[0].priceAmountMicros),hi(e),(null==o?void 0:o.length)>0?ii(o[0].priceAmountMicros):0,hi(r))},mi=(e,t,i=[])=>{var n,a=Ht(e);if(!a||0===a.length)return null;var r=null===(n=Qt(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return qt(Zt(a[0]));var o=Ht(r);return qt(Zt(a[0]),Zt(o[0]),Yt(o[0].priceCurrencyCode))},fi=e=>Ut(e),vi=(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},pi=(e,t)=>{if(!e)return null;var i=vi(e,t);return i?Vt(i,e.subscription_period):null},gi=(e,t,i,n,a,r)=>{var o=pi(e,t);return Kt((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},yi=(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?Vt(i,e.subscription_period):null},bi=(e,t,i,n,a,r)=>{var o=yi(e,t);return Kt((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},wi=(e,t)=>{var i=yi(e,t);return i?i.formattedPrice:null},ki=(e,t,i)=>{var n=yi(e,t);if(!n)return null;var a=Zt(n);return a?Yt(n.priceCurrencyCode).format(i?Math.round(a):a):null},Si=e=>{var t=Ht(e);if(!t||0===t.length)return null;var i,n,a=ti(t[0].priceAmountMicros)/(i=t[0].billingPeriod,(n=ei(i))?30.437*n:1);return Yt(t[0].priceCurrencyCode).format(a)},Ei=(e,t)=>{var i=Ht(e);if(!i||0===i.length)return null;var n,a,r=ti(i[0].priceAmountMicros)/(n=i[0].billingPeriod,(a=ei(n))?52*a/12:1);return Yt(i[0].priceCurrencyCode).format(t?Math.round(r):r)},Pi=e=>{var t=Ht(e)[0];return t?t.billingPeriod:null},Ti="object"==typeof global&&global&&global.Object===Object&&global,Mi="object"==typeof self&&self&&self.Object===Object&&self,Ai=Ti||Mi||Function("return this")(),Di=Ai.Symbol;var xi=Array.isArray,Ci=Object.prototype,Ii=Ci.hasOwnProperty,Li=Ci.toString,_i=Di?Di.toStringTag:void 0;var Ri=Object.prototype.toString;var Fi=Di?Di.toStringTag:void 0;function Oi(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Fi&&Fi in Object(e)?function(e){var t=Ii.call(e,_i),i=e[_i];try{e[_i]=void 0;var n=!0}catch(e){}var a=Li.call(e);return n&&(t?e[_i]=i:delete e[_i]),a}(e):function(e){return Ri.call(e)}(e)}function Wi(e){return null!=e&&"object"==typeof e}var $i=Di?Di.prototype:void 0,Ni=$i?$i.toString:void 0;function ji(e){if("string"==typeof e)return e;if(xi(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,ji)+"";if(function(e){return"symbol"==typeof e||Wi(e)&&"[object Symbol]"==Oi(e)}(e))return Ni?Ni.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Bi(e){return null==e?"":ji(e)}function zi(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 Ui=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Hi(e){return Ui.test(e)}var Gi="\\ud800-\\udfff",Vi="["+Gi+"]",Ki="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Xi="\\ud83c[\\udffb-\\udfff]",Yi="[^"+Gi+"]",qi="(?:\\ud83c[\\udde6-\\uddff]){2}",Ji="[\\ud800-\\udbff][\\udc00-\\udfff]",Qi="(?:"+Ki+"|"+Xi+")"+"?",Zi="[\\ufe0e\\ufe0f]?",en=Zi+Qi+("(?:\\u200d(?:"+[Yi,qi,Ji].join("|")+")"+Zi+Qi+")*"),tn="(?:"+[Yi+Ki+"?",Ki,qi,Ji,Vi].join("|")+")",nn=RegExp(Xi+"(?="+Xi+")|"+tn+en,"g");function an(e){return Hi(e)?function(e){return e.match(nn)||[]}(e):function(e){return e.split("")}(e)}var rn,on=(rn="toUpperCase",function(e){var t=Hi(e=Bi(e))?an(e):void 0,i=t?t[0]:e.charAt(0),n=t?zi(t,1).join(""):e.slice(1);return i[rn]()+n});var sn,un=(sn={À:"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==sn?void 0:sn[e]}),ln=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var hn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var cn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var mn="\\ud800-\\udfff",fn="\\u2700-\\u27bf",vn="a-z\\xdf-\\xf6\\xf8-\\xff",pn="A-Z\\xc0-\\xd6\\xd8-\\xde",gn="\\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",yn="["+gn+"]",bn="\\d+",wn="["+fn+"]",kn="["+vn+"]",Sn="[^"+mn+gn+bn+fn+vn+pn+"]",En="(?:\\ud83c[\\udde6-\\uddff]){2}",Pn="[\\ud800-\\udbff][\\udc00-\\udfff]",Tn="["+pn+"]",Mn="(?:"+kn+"|"+Sn+")",An="(?:"+Tn+"|"+Sn+")",Dn="(?:['’](?:d|ll|m|re|s|t|ve))?",xn="(?:['’](?:D|LL|M|RE|S|T|VE))?",Cn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",In="[\\ufe0e\\ufe0f]?",Ln=In+Cn+("(?:\\u200d(?:"+["[^"+mn+"]",En,Pn].join("|")+")"+In+Cn+")*"),_n="(?:"+[wn,En,Pn].join("|")+")"+Ln,Rn=RegExp([Tn+"?"+kn+"+"+Dn+"(?="+[yn,Tn,"$"].join("|")+")",An+"+"+xn+"(?="+[yn,Tn+Mn,"$"].join("|")+")",Tn+"?"+Mn+"+"+Dn,Tn+"+"+xn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bn,_n].join("|"),"g");function Fn(e,t,i){return e=Bi(e),void 0===t?function(e){return cn.test(e)}(e)?function(e){return e.match(Rn)||[]}(e):function(e){return e.match(hn)||[]}(e):e.match(t)||[]}var On=RegExp("['’]","g");var Wn,$n=(Wn=function(e,t,i){return t=t.toLowerCase(),e+(i?on(Bi(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}(Fn(function(e){return(e=Bi(e))&&e.replace(ln,un).replace(dn,"")}(e).replace(On,"")),Wn,"")});function Nn(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=Un(e,t.sku_ref_id||""),t.variables=function(e,t,i){if(!t)return{};var n=t.variables;if(!n)return v({},t);Object.keys(n).forEach(t=>{if(jn(n[t])){var a=zn(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(ni({})))().forEach(t=>{if(void 0===n[t]){var r=ai(t,e,void 0,i);null!==r&&(a[t]=r)}}),v({},t,a,n)}(t.product_details,t,r)}),r}function jn(t){return"string"==typeof t&&t.includes(e.SMART_TEXT_PATTERN)}function Bn(e,t,i){return t?(Object.keys(t).forEach(n=>{jn(t[n])&&(t[n]=t[$n(n)]=zn(t[n],e,i))}),v({},t)):{}}var zn=(t,i,n)=>t.replace(e.SKU_TEXT_REGEX,(a,r)=>{var o,s,u,l,d=(null===(o=e.SKU_TEXT_REGEX.exec(t))||void 0===o?void 0:o.slice(1))||[];r=null!==(s=d[0])&&void 0!==s?s:r;var h=null!==(u=null===(l=d[1])||void 0===l?void 0:l.replace(":",""))&&void 0!==u?u:"";return ai(r,i,h,n)});function Un(e=[],t=""){return e.find(e=>e.product_ref_id===t)||null}var Hn=["conditionAttributes"];function Gn(e,t){return Array.isArray(e)?e.reduce((e,i)=>{var n=Gn(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:Gn(n,t);return v({},e,{[i]:a})},{}):"string"==typeof e?Qn(e,t):e}function Vn(t,i,n,a={}){var r=n.productBaseComponents||n.components||[],o=n.productFeaturedComponents||r;return i.map(i=>{var n,s,u,l=i.featured?o:r,d=i.entitlements.map(e=>e.entitlement_ref_id),h=Un(t.productDetails,i.sku_ref_id),c={freeTrialEligible:1==ai("freeTrialEligible",h),introEligible:1==ai("introEligible",h),promoEligible:1==ai("promoEligible",h),invalid:ai("invalid",h),unavailable:ai("unavailable",h)},m=v({},i,i.variables,c,{id:i.id,entitlements:d});s=i,u=t=>{for(var i,n=f(t);!(i=n()).done;){var a=i.value;a.sku=e.toNamiSKU(s),a.components&&u(a.components),a.collapseHeader&&a.collapseHeader.components&&u(a.collapseHeader.components)}},u(l);var p={sku:m,media:Jn(a,{convertToUrl:!0})};return[null!==(n=i.featured)&&void 0!==n&&n,Gn(l,Gn(p,p))]},[])}function Kn(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=>Gn(t.components,Gn({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=f(n);!(s=d()).done;){var h=s.value,c=Gn(a,Gn({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:[Gn(r,Gn({group:t},{group:t}))],items:l.get(e).map(o)}})}function Xn(e,t){return t.assertions?t.assertions.every(qn.bind(null,e)):!!t.orAssertions&&(!t.orAssertions.length||t.orAssertions.some(qn.bind(null,e)))}function Yn(t,i,n,a=null){var r,o=null!==(r=null==t?void 0:t.flow)&&void 0!==r?r:{},s=o.manager,u=o.previousStepAvailable,l=o.nextStepAvailable,d=t.state,h={};return a&&(h={block:a}),h=v({},h,{state:d,urlParams:e.getUrlParams(),flow:{isLaunched:!(null==s||!s.flowOpen),previousStepAvailable:!!u,nextStepAvailable:!!l},launch:d.launch,sku:d.sku,customer:d.customer}),"string"==typeof i&&i.includes(e.SMART_TEXT_PATTERN)&&(i=Qn(i,h)),i}function qn(t,{value:i,expected:n,operator:a},r){if(i=Yn(t,i,0,r),n=Yn(t,n,0,r),"equals"===a)return i===n;if("notEquals"===a)return i!==n;if("contains"===a){var o;if(Array.isArray(i)||"string"==typeof i||i instanceof String||(i=i.toString()),"collapse"==n)n+="_"+(null===(o=t.getCurrentCollapsibleSku())||void 0===o?void 0:o.skuId);return i.includes(n)}return"notContains"===a?(Array.isArray(i)||"string"==typeof i||i instanceof String||(i=i.toString()),!i.includes(n)):"set"===a?"boolean"==typeof n?!!i&&!i.toString().match(e.LIQUID_VARIABLE_REGEX)===n:!!i&&!i.toString().match(e.LIQUID_VARIABLE_REGEX):"notSet"===a?!i||i.toString().match(e.LIQUID_VARIABLE_REGEX):"gt"===a?i>n:"gte"===a?i>=n:"lt"===a?i<n:"lte"===a&&i<=n}function Jn(e,{convertToUrl:t}={convertToUrl:!1}){return Object.entries(e).reduce((e,[i,{content:n}])=>(t&&"string"!=typeof n&&n&&(n=URL.createObjectURL(n)),v({},e,{[i]:n})),{})}function Qn(t,i){var n=t;if("string"!=typeof t)return n;for(var a,r=new RegExp(e.VAR_REGEX.source,e.VAR_REGEX.flags),o=[];null!==(a=r.exec(t))&&(o.push(a),r.global);)a.index===r.lastIndex&&r.lastIndex++;for(var s=0,u=o;s<u.length;s++){var l=u[s],d=l[0],h=l[1],c=Qn(h,i);if(d===t)return m(d,c);c!==h&&(n=n.replace(h,c)),n=n.replace(e.VAR_REGEX,m)}return n;function m(e,t){var n=String(t).split("."),a=n[0];if(!a)return e;var r=Zn(i,a);if(void 0===r)return e;if("object"==typeof r&&null!==r&&0===Object.keys(r).length)return"";var o=Zn(i,...n);return void 0===o?"":"string"!=typeof o?o:Qn(o,i)}}function Zn(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 ea=e=>{var t=e.state.timeSpentOnPaywall;if(t)return Date.now()-t},ta=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}`},ia=(e,t)=>{if(!e||!t)return!0;var i=null!=e&&e.includes("rgb")?ta(e):e,n=null!=t&&t.includes("rgb")?ta(t):t;return(null==i?void 0:i.toLowerCase())===(null==n?void 0:n.toLowerCase())},na=!0,aa=!1,ra=!1,oa=!1,sa=!1,ua=!1,la=null,da=null,ha=null,ca=!1,ma="",fa=!1,va=null,pa=null,ga=null,ya=null,ba=null,wa=null,ka=null,Sa=null,Ea=!1,Pa=null,Ta="",Ma=0,Aa=1,Da=null,xa=[],Ca=new WeakMap,Ia=new WeakMap,La=1;function _a(e){var t=Ia.get(e);return t||(t=La++,Ia.set(e,t)),String(t)}var Ra=null,Fa=null;function Oa(e){return!0===e||"true"===e||"1"===e||"yes"===e}function Wa(e,t){if(function(){if("undefined"==typeof window)return!1;try{var e,t;return!!Oa(window.NAMI_TTS_DEBUG)||Oa(null===(e=window.localStorage)||void 0===e?void 0:e.getItem("nami:tts:debug"))||Oa(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 $a(e="TTS is unavailable in this runtime."){aa||(aa=!0,Wa(e))}function Na(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 ja(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 Ba(e){return e.toLowerCase().replace(/[^a-z0-9$]+/g," ").replace(/\s+/g," ").trim()}function za(e){return ja(String(null!=e?e:"").replace(/<[^>]*>/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[*_`#>~]/g," "))}function Ua(e,t){var i=ja(t);i&&e[e.length-1]!==i&&e.push(i)}function Ha(e,t=[]){var i=[];return[...e,...t].forEach(e=>{var t=function(e){var t=ja(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=ja(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=ja(t.slice(n));u&&i.push(u);return i.length?i:[t]}(e);t.length||Ua(i,e),t.forEach(e=>Ua(i,e))}),i.slice(0,60)}function Ga(e){return ja(e.join(". ").replace(/\.\s*([.!?])/g,"$1"))}function Va(e){var t,i=Da;i&&(e&&i.id===e||(i.status="cancelled",(null===(t=Da)||void 0===t?void 0:t.id)===i.id&&(Da=null)))}function Ka(){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 Xa(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot}function Ya(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=Xa(n)?n.host:n}return t}function qa(e,t){return!!t&&-1!==Ya(t).indexOf(e)}function Ja(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 Qa(e){return Ja(e,Ka())}function Za(e,t){t&&-1===e.indexOf(t)&&e.push(t)}function er(e,t){var i=t.shadowRoot;i&&i.querySelectorAll('button,[role="button"],a,input,select,textarea,[tabindex]:not([tabindex="-1"])').forEach(t=>Za(e,t))}function tr(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:Ya(e)}function ir(e,t=[]){var i=[],n=(t.length?t:Ya(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=Ya(e).find(e=>e.matches("nami-product-container"));if(a)return a;var r=ha&&"querySelectorAll"in ha?ha:"undefined"!=typeof document?document:null;return r&&null!==(i=Array.prototype.slice.call(r.querySelectorAll("nami-product-container")).find(t=>qa(t,e)))&&void 0!==i?i:null}(e,n);return Za(i,e),er(i,e),n.forEach(t=>{var n=!!a&&(t===a||qa(a,t)),r=t!==e&&qa(t,e),o=t.matches('nami-product-container,nami-button,[role="button"],button,[tabindex]:not([tabindex="-1"])');(n||r||t===e)&&o&&(Za(i,t),er(i,t))}),null!=a&&a.isConnected&&(Za(i,a),er(i,a)),i}function nr(e){return"true"===e.getAttribute("data-tts-composite-active")||"true"===e.getAttribute("data-webos-luna-composite-active")}function ar(e){return!!e&&xa.some(t=>t.getAttribute("data-tts-composite-transaction")===String(e)||t.getAttribute("data-webos-luna-composite-transaction")===String(e))}function rr(e){var t,i;return xa.length?e?null!==(i=xa.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=xa[0])&&void 0!==t?t:null:null}function or(e,t,i){var n=ja(t);return!!n&&(Ca.has(e)||Ca.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 sr(e,t,i,n=[]){var a=ja(t);if(!a)return!1;dr(),lr(void 0,void 0,"new-composite",!0);var r=ir(e,n);return r.forEach(e=>or(e,a,i)),xa=r,!0}function ur(e,t,i){if(!(t instanceof Element))return!1;if(!t.isConnected||!i)return!1;if(!function(e){var t;return!(!e||(null===(t=Da)||void 0===t?void 0:t.id)!==e||"composite"!==Da.reason||!ar(e))}(i))return!1;if(!t.matches("nami-product-container"))return!1;var n=Da;if(null==n||!n.text)return!1;var a=[];Za(a,t),er(a,t);var r=[];return a.forEach(e=>{or(e,n.text,i)&&(Za(xa,e),Za(r,e))}),r.length>0}function lr(e,t,i="manual",n=!1){var a,r=e&&-1===xa.indexOf(e)?ir(e):xa;if(r.length){var o=Da,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?Wa("composite restore skipped: transaction mismatch",{reason:i}):n||!o||t&&t===o.id||!r.some(e=>nr(e))?(dr(),r.forEach(e=>{var t=Ca.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])),Ca.delete(e))}),e&&-1===xa.indexOf(e)||(xa=[]),!t||(null===(a=Da)||void 0===a?void 0:a.id)!==t||e&&Da.element!==e||(Da.status="ended",Da=null)):Wa("composite restore skipped: active transaction mismatch",{reason:i})}}function dr(){ga&&(clearTimeout(ga),ga=null)}function hr(){ya&&(clearTimeout(ya),ya=null),Ra=null}function cr(){ba&&(clearTimeout(ba),ba=null)}function mr(){wa&&(clearTimeout(wa),wa=null)}function fr(){ka&&(clearTimeout(ka),ka=null)}function vr(){Sa&&(clearTimeout(Sa),Sa=null)}function pr(e){Ea=!0,vr(),Sa=setTimeout(()=>{Sa=null,Ea=!1},br(e)+500)}function gr(){vr(),Ea=!1}function yr(e){xa.length&&lr(void 0,void 0,e,!0)}function br(e){var t=ja(e),i=350*(t?t.split(/\s+/).filter(Boolean).length:0);return Math.min(3e4,Math.max(4e3,i))}function wr(e,t="",i="estimated-speech-duration"){if(rr(e)){var n=br(t);dr(),ga=setTimeout(()=>{ga=null;var t=rr(e);t&&(Qa(t)||lr(t,e,i))},n)}}function kr(){return"undefined"==typeof window?null:window}function Sr(){var e,t=null===(e=kr())||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 Er(){return!!Sr()}function Pr(){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 Tr(){return"undefined"!=typeof window&&void 0!==window.speechSynthesis&&"function"==typeof window.speechSynthesis.speak&&"function"==typeof window.SpeechSynthesisUtterance}function Mr(){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 Ar(){var e,t;if("undefined"==typeof window)return!1;if(Mr())return!1;var i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"",n=kr();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 Dr(){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 xr(){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 Cr(){if("undefined"==typeof window)return!1;try{return"television"===e.getDeviceFormFactor()}catch(e){return!1}}function Ir(){if(sa)return!1;var e=Pr();if(!e)return!1;try{return"function"!=typeof e.isEnabled||e.isEnabled()}catch(e){return!1}}function Lr(){return{televisionRuntime:Cr(),televisionTtsRuntime:_r(),webos:Ar(),tizen:Dr(),vizio:Mr(),xbox:xr(),hasWebOsServiceRequest:Er(),webOsRequestType:typeof Sr(),hasWebSpeechApi:Tr(),webSpeechUnavailableForSession:ra,webOsLunaUnavailableForSession:oa,vizioChromevoxUnavailableForSession:sa}}function _r(){return Cr()||Ar()||Mr()||Dr()}function Rr(){return _r()&&!ra&&Tr()}function Fr(e){if(ua=e,Wa("set media playing",{playing:e,hasDeferredUtterance:!!la}),!e&&la){var t,i=la;if(la=null,i.options.transactionId&&(null===(t=Da)||void 0===t?void 0:t.id)!==i.options.transactionId)return void Wa("drop stale deferred speech",{transactionId:i.options.transactionId,reason:i.options.reason});Zr(i.text,i.options)}}function Or(e){ra=!0,$a(Ar()?"Web Speech TTS unavailable in this webOS runtime":"Web Speech TTS unavailable in this runtime"),Wa("web speech unavailable",{error:e})}function Wr(e){oa=!0,Wa("webOS Luna unavailable",{error:e})}function $r(e,t){la={text:e,options:t}}var Nr={name:"webos-luna-tts",platform:"webos",isAvailable:function(){return _r()&&!Mr()&&!oa&&Er()},speak:function(e,t){Wa("speakViaWebOsLuna:enter",{textPreview:e.slice(0,160),reason:t.reason,transactionId:t.transactionId,requestType:typeof Sr()});var i=Sr();if(!i)return Wa("speakViaWebOsLuna:no-request"),!1;var n="composite"===t.reason,a=!1,r=()=>{var r,o;if(wa=null,t.transactionId&&(null===(r=Da)||void 0===r?void 0:r.id)!==t.transactionId)return Wa("speakViaWebOsLuna:drop-stale-delayed-speak",{transactionId:t.transactionId,activeTransaction:null===(o=Da)||void 0===o?void 0:o.id,reason:t.reason}),!1;if(ua)return Wa("speakViaWebOsLuna:defer-delayed-speak-media-playing",{transactionId:t.transactionId,reason:t.reason}),$r(e,t),!0;var s=!1;try{Wa("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(Wa("speakViaWebOsLuna:onSuccess",{response:i,transactionId:t.transactionId}),!t.transactionId||(null===(n=Da)||void 0===n?void 0:n.id)===t.transactionId){var r=function(e){var t,i=ja(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=ar(e),r=!e||(null===(n=Da)||void 0===n?void 0:n.id)===e;e&&r&&Da&&!a?(Da.status="ended",Da=null):e&&r&&Da&&(Da.status="ended"),a&&r&&wr(e,t,i)}(t.transactionId,e,r?"webos-feedback":"estimated-speech-duration"))}},onFailure:i=>{var n;s=!0,Wa("speakViaWebOsLuna:onFailure",{error:i,transactionId:t.transactionId});var a=ar(t.transactionId),r=!t.transactionId||(null===(n=Da)||void 0===n?void 0:n.id)===t.transactionId;t.transactionId&&r&&Da&&!a?(Da.status="cancelled",Da=null):t.transactionId&&r&&Da&&(Da.status="cancelled"),Wr(i),a&&r&&wr(t.transactionId,e,"estimated-speech-duration-after-failure")}})}catch(e){var u;return t.transactionId&&(null===(u=Da)||void 0===u?void 0:u.id)===t.transactionId&&(Da.status="cancelled",Da=null),Wr(e),!1}return!s};if(n)return mr(),Wa("speakViaWebOsLuna:delay-composite-until-focus-settles",{delayMs:250,transactionId:t.transactionId}),wa=setTimeout(r,250),!0;return r()},stop:zr},jr={name:"web-speech",platform:"web",isAvailable:Rr,speak:function(e,t){if(!Rr())return!1;try{var i=new window.SpeechSynthesisUtterance(e);return i.onstart=()=>{var e;t.transactionId&&(null===(e=Da)||void 0===e?void 0:e.id)===t.transactionId&&(Da.status="started")},i.onend=()=>{var e=Da,i=!t.transactionId||(null==e?void 0:e.id)===t.transactionId;t.transactionId&&i&&e&&(e.status="ended",Da=null)},i.onerror=e=>{var i,n=e.error;t.transactionId&&(null===(i=Da)||void 0===i?void 0:i.id)===t.transactionId&&(Da.status="cancelled",Da=null),"synthesis-failed"===n&&Or(n)},window.speechSynthesis.speak(i),!0}catch(e){return Or("exception"),!1}},stop:()=>{if(Tr())try{window.speechSynthesis.cancel()}catch(e){}}},Br={name:"vizio-chromevox",platform:"vizio",isAvailable:Ir,speak:Hr,stop:Ur};function zr(){var e=Sr();if(e)try{e("luna://com.webos.service.tts",{method:"stop",parameters:{},onFailure:e=>Wa("webOS Luna stop failed",{error:e})})}catch(e){Wa("webOS Luna stop threw",{error:e})}}function Ur(e=!0){var t=!!ba,i=Ea;cr();var n=Pr(),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(""),gr()}catch(e){gr(),Wa("VIZIO stop threw",{error:e})}}function Hr(e,t){var i=Pr();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?(cr(),ba=setTimeout(()=>{var n;if(ba=null,!t.transactionId||!Da||Da.id===t.transactionId)if(t.element&&r&&!t.element.isConnected){var a;t.transactionId&&(null===(a=Da)||void 0===a?void 0:a.id)===t.transactionId&&(Da.status="cancelled",Da=null)}else{if(ua)return hr(),Fa=null,void $r(e,t);i.play(e),pr(e),t.transactionId&&(null===(n=Da)||void 0===n?void 0:n.id)===t.transactionId&&(Da.status="ended",Da=null)}},o),!0):(i.play(e),pr(e),t.transactionId&&(null===(a=Da)||void 0===a?void 0:a.id)===t.transactionId&&(Da.status="ended",Da=null),!0)}catch(e){return function(e){sa=!0,Wa("VIZIO Chromevox unavailable",{error:e})}(e),!1}}function Gr(e){return"high"===e?3:"normal"===e?2:1}function Vr(){return Date.now()-Ma<1500}function Kr(e){return Ba(e)}function Xr(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-${_a(e)}`].filter(Boolean).join("|"):""}(e);return Ba(t||ao(e))}function Yr(e){var t=Kr(e);return"clickable"===t||"button"===t||"focusable"===t||"selected"===t||"unselected"===t}function qr(e,t,i){var n;if(Fa={textKey:Kr(e),reason:t.reason,timestamp:Date.now()},"high"===i){var a=br(e),r=Date.now();Ra={transactionId:t.transactionId,pageKey:ma,element:null!==(n=t.element)&&void 0!==n?n:null,elementKey:Xr(t.element),textKey:Kr(e),startedAt:r,suppressUntil:r+a},ya&&clearTimeout(ya),ya=setTimeout(()=>{ya=null,Ra=null},a)}}function Jr(e,t=!0){var i,n,a,r=!(!e||(null===(i=Da)||void 0===i?void 0:i.id)!==e||"pending"!==Da.status);if(Wa("stopSpeech",{preserveTransactionId:e,allowVizioEmptyFallback:t,activeTransaction:null===(n=Da)||void 0===n?void 0:n.id,reason:null===(a=Da)||void 0===a?void 0:a.reason,preservingCurrentTransaction:r}),la=null,r||(fr(),mr()),e||(hr(),dr(),yr("stop")),Va(e),pa&&(clearTimeout(pa),pa=null),!r){if(Tr())try{window.speechSynthesis.cancel()}catch(e){}Ar()&&zr(),Mr()&&Ur(t)}}function Qr(){Jr()}function Zr(e,t={}){var i,n,a;Wa("speakText:enter",{textPreview:ja(e).slice(0,160),reason:t.reason,transactionId:t.transactionId,element:Na(t.element),runtime:Lr()});var r=ja(e);if(!r)return!1;if(!_r())return Wa("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":Yr(e)?"low":"normal"}(r,o);if(function(e,t,i){var n=Kr(e),a=Date.now(),r=Xr(t.element);if(Yr(e))return!0;if(Fa&&Fa.reason===t.reason&&Fa.textKey===n&&a-Fa.timestamp<600)return Wa("suppress:duplicate-request",{reason:t.reason,textPreview:e.slice(0,120)}),!0;if(!Ra)return!1;if(Gr(i)>=Gr("high"))return!1;if("focus"===t.reason){var o=Ra.textKey;if(!Vr()&&(n===o||n.includes(o)))return Wa("suppress:focus-text-is-active-composite",{textPreview:e.slice(0,120),transactionId:Ra.transactionId,element:Na(t.element)}),!0}var s=function(e,t){return!!e&&!!t&&e===t}(t.element,Ra.element),u=!!r&&Ra.elementKey===r,l=!Ra.pageKey||Ra.pageKey===ma,d=Vr(),h=l&&!d&&a<Ra.startedAt+2500;return!(!s&&!u&&(l&&"focus"===t.reason&&t.element&&Ra.element!==t.element||"low"!==i&&!h)&&(hr(),1))}(r,o,s))return!1;if(o.interrupt&&Jr(o.transactionId,!1),ua)return $r(r,o),!0;var u=function(e){var t;return"manual"!==(null!==(t=e.reason)&&void 0!==t?t:"manual")&&e.element?Dr()?"accessibility-label":Ar()||Mr()?"programmatic":"accessibility-label":"programmatic"}(o);Wa("speakText:owner",{owner:u,reason:o.reason,element:Na(o.element)});var l,d,h="programmatic"===u?function(){if(!_r())return null;var e=Mr(),t=xr(),i=Ar();return Br.isAvailable()?(Wa("resolveTtsEngine:selected",{engine:"vizio-chromevox"}),Br):e?null:Nr.isAvailable()?(Wa("resolveTtsEngine:selected",{engine:"webos-luna-tts"}),Nr):t?jr.isAvailable()?jr:null:jr.isAvailable()?(Wa("resolveTtsEngine:selected",{engine:"web-speech"}),jr):(Wa("tts engine unavailable",{webos:i,vizio:e,xbox:t}),null)}():null;(Wa("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||Ar()}(u))&&sr(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=Da)||void 0===d?void 0:d.id)===o.transactionId&&(Da.status="started"),qr(r,o,s),!0;if(!h)return function(e,t){if(!Mr()||sa)return!1;var i=Date.now(),n=()=>{var a;ka=null,t.transactionId&&Da&&Da.id!==t.transactionId||(Ir()?Hr(e,t):Date.now()-i>=8e3?t.transactionId&&(null===(a=Da)||void 0===a?void 0:a.id)===t.transactionId&&(Da.status="cancelled",Da=null):ka=setTimeout(n,250))};return fr(),ka=setTimeout(n,250),!0}(r,o)?(qr(r,o,s),!0):($a(),!1);var c=h.speak(r,o);if(Wa("speakText:engine-result",{engine:h.name,accepted:c,reason:o.reason,transactionId:o.transactionId}),c&&qr(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=sr(o.element,r,o.transactionId,null!==(a=o.focusPath)&&void 0!==a?a:[]);return Wa("speakText:aria-label-fallback",{engine:h.name,accepted:m,reason:o.reason}),m&&qr(r,o,s),m}function eo(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 to(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 io(e){return ja(e).replace(/(?:,\s*)?\bbutton\b\s*$/i,"").trim()||ja(e)}function no(e){return ja(e.innerText||e.textContent||"")}function ao(e){if(!e)return"";if(nr(e)){var t=function(e){var t=Ca.get(e);return t?ja(t["data-tts-spoken-label"]||t["data-speech"]||t["speech-label"]||t["aria-label"]||e.getAttribute("title")||""):""}(e);if(t)return t;var i=ro(e.component);if(i)return i}var n=e.getAttribute("data-tts-spoken-label");if(n)return ja(n);var a=ro(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?ja(r):no(e)}function ro(e){if(!e||e.hidden)return"";var t=e,i=ja(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=f(so(t));!(n=a()).done;){var r=ro(n.value);if(r)return r}return""}function oo(e,t){if(Wa("applySpeechAttributes:enter",{element:Na(e),label:t,activeComposite:nr(e)}),!nr(e)){var i=ja(t),n=function(e,t){var i=ja(t);return i?to(e)?io(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 to(e)?io(t):ja(t)}(e,n))}}function so(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 uo(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 za(t.screenreaderText||t.text);case"text-list":return Array.isArray(t.texts)?za(t.texts.join(", ")):"";case"videoUrl":case"progressBar":return ja(t.screenreaderText);default:return""}}(e);Ua(t,n),so(e).forEach(e=>uo(e,t))}}function lo(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=>uo(e,i)):uo(e,i)}),i}function ho(e,t){var i=lo(e),n=function(e){if(!e)return"";var t=ro(e.component),i=e.getAttribute("data-speech")||e.getAttribute("speech-label")||e.getAttribute("aria-label")||e.getAttribute("title")||no(e),n=ja(t||i);return n?to(e)&&!/\bbutton\b\s*$/i.test(n)?ja(`${n} button`):n:""}(t);return Ga(Ha(i,n?[n]:[]))}function co(e){return e?Ba(`${ja(e.id||e.name||"")}|${Ga(Ha(lo(e),[]))}`):""}function mo(){return fa}function fo(e){Wa("setActivePage:enter",{nextKey:co(e),previousKey:ma,activePageAnnounced:ca,pageName:ja((null==e?void 0:e.name)||(null==e?void 0:e.id)||"")});var t=ma;da=e,function(e){var t=co(e);if(t!==ma){var i=!ma&&!!Pa;ca=!1,ma=t,fa=i,Pa=null,Ta=""}}(e),t!==ma&&Jr(void 0,!1)}function vo(e,t){if(Wa("prepareInitialComposite:enter",{element:Na(e),activePageKey:ma,activePageAnnounced:ca,blockedByNavigation:mo(),label:ao(e),isPrimary:eo(e)}),!da||ca||!eo(e)||mo())return Wa("prepareInitialComposite:skip",{hasActivePage:!!da,activePageAnnounced:ca,isPrimary:eo(e),blockedByNavigation:mo()}),!1;var i=ho(da,e);if(!i)return!1;var n=tr(e,t),a=function(e,t,i){var n={id:Aa++,reason:e,element:i,text:t,page:da,status:"pending"};return Da=n,n}("composite",i,e);ca=!0,Pa=e,Ta=Xr(e);var r,o=Zr(i,{reason:"composite",interrupt:!0,transactionId:a.id,element:e,focusPath:n,focusedLabel:ao(e),priority:"high"});o||(ca=!1,(null===(r=Da)||void 0===r?void 0:r.id)===a.id&&(Da.status="cancelled",Da=null));return o}function po(e,t){Wa("preparePrimaryCtaCompositeFocus:enter",{element:Na(e),label:ao(e),activePageKey:ma,activePageAnnounced:ca});var i=vo(e,t);return Wa("preparePrimaryCtaCompositeFocus:result",{result:i,activePageKey:ma,activePageAnnounced:ca}),i}function go(e){Wa("handleNativeFocusIn:enter",{target:e.target instanceof Element?Na(e.target):String(e.target),activePageKey:ma,activePageAnnounced:ca});var t=function(e){for(var t,i=null,n=f("function"==typeof e.composedPath?e.composedPath():[]);!(t=n()).done;){var a=t.value;if(a instanceof Element&&ao(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&&yo(t,e)}function yo(e,t){if(Wa("handleFocusedElementForSpeech:enter",{element:Na(e),label:ao(e),ttsEnabled:na,runtime:Lr(),activePageKey:ma,activePageAnnounced:ca,lastFocused:Na(Pa),lastFocusedElementIdentity:Ta}),!e)return Wa("handleFocusedElementForSpeech:skip-basic",{hasElement:!!e,ttsEnabled:na}),!1;if(!_r())return!1;var i=Xr(e);if(Ra&&Ra.pageKey===ma&&Date.now()<Ra.startedAt+2500){var n=Ra.element===e,a=!!i&&Ra.elementKey===i;if(!Vr()&&(n||a))return Wa("handleFocusedElementForSpeech:skip-during-initial-composite-lock",{element:Na(e),sameCompositeElement:n,sameCompositeElementKey:a}),!1;var r=ao(e),o=r?Kr(r):"";if(!Vr()&&o&&Ra.textKey.includes(o))return Wa("handleFocusedElementForSpeech:skip-composite-contained-label-during-initial-lock",{element:Na(e),labelPreview:r.slice(0,120),transactionId:Ra.transactionId}),Pa=e,Ta=i,!1}if(Pa===e||i&&i===Ta&&!ca)return Wa("handleFocusedElementForSpeech:skip-same-element",{element:Na(e),activePageAnnounced:ca,elementIdentity:i,lastFocusedElementIdentity:Ta}),!1;if(!ca&&da&&eo(e)&&!Pa&&!mo())return vo(e,t);var s=ao(e);if(!s)return!1;if(Ra){var u=Kr(s),l=Ra.textKey;if(!Vr()&&(u===l||u.includes(l)))return Wa("handleFocusedElementForSpeech:skip-active-composite-label",{element:Na(e),labelPreview:s.slice(0,120),transactionId:Ra.transactionId}),Pa=e,Ta=i,!1}return Pa=e,Ta=i,pa&&clearTimeout(pa),pa=setTimeout(()=>{pa=null,Pa===e&&Zr(s,{reason:"focus",interrupt:!0,element:e,focusPath:tr(e,t),priority:"normal"})},120),!0}function bo(e=document){var t;if(Wa("attachFocusSpeechListeners:enter",{root:e instanceof Element?Na(e):e instanceof DocumentFragment?"document-fragment":"document",runtime:Lr()}),wo(),!_r())return Wa("focus speech listeners not attached: non-CTV runtime"),wo;if(!_r())return Wa("focus speech listeners not attached: non-CTV runtime"),wo;var i,n=e=>go(e),a=()=>(Wa("handleUserNavigationKey",{activePageKey:ma,activePageAnnounced:ca}),Ma=Date.now(),void(fa=!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&&yo(i,e)}(e)}}return va={root:e,focusListener:n,keyListener:a,previousTvjsHandler:i},wo}function wo(){var e;if(Wa("detachFocusSpeechListeners:enter",{hasCleanup:!!va}),va){var t=va,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),va=null}}function ko(){var e;Wa("resetScreenreaderState:enter",{activePageKey:ma,activePageAnnounced:ca,activeTransaction:null===(e=Da)||void 0===e?void 0:e.id,lastFocused:Na(Pa)}),wo(),la=null,ua=!1,da=null,ha=null,ca=!1,ma="",fa=!1,Pa=null,Ta="",Ma=0,Fa=null,hr(),dr(),cr(),mr(),fr(),gr(),pa&&(clearTimeout(pa),pa=null),yr("reset"),Va(),Da=null}var So=function(){return m(function t(i,n,a="",r=""){var o;u(this,t),this.playing=!1,this.toggling=!1,this.handleVideoEvents=t=>{this.video.onended=()=>{Fr(!1),this.handlePlayerAnalytics(t,e.NamiPaywallAction.VIDEO_ENDED)},this.video.onpause=()=>{Fr(!1),this.toggling||this.handlePlayerAnalytics(t,e.NamiPaywallAction.VIDEO_PAUSED)},this.video.onplay=()=>{Fr(!this.video.muted),this.toggling||this.handlePlayerAnalytics(t,this.video.currentTime>.05?e.NamiPaywallAction.VIDEO_RESUMED:e.NamiPaywallAction.VIDEO_STARTED)},this.video.onvolumechange=()=>{this.toggling||(this.muted=this.video.muted,Fr(!this.video.paused&&!this.video.ended&&!this.muted),this.handlePlayerAnalytics(t,this.muted?e.NamiPaywallAction.VIDEO_MUTED:e.NamiPaywallAction.VIDEO_UNMUTED))}},this.removeVideoEvents=()=>{this.video&&(Fr(!1),this.video.onended=null,this.video.onpause=null,this.video.onplay=null,this.video.onvolumechange=null,this.toggling=!1)},this.video=null!=n?n:this.video,null!==(o=t.instance)&&void 0!==o&&o.videoSrc&&n.src!=t.instance.videoSrc&&this.handlePlayerAnalytics(i,e.NamiPaywallAction.VIDEO_CHANGED),this.videoSrc=n.src,this.video&&(this.muteByDefault=n.muted,this.loopVideo=n.loop,this.autoplayVideo=n.autoplay,this.muted=this.video.muted,this.videoComponentName=a,this.videoComponentId=r,this.playing=!(!(this.video.currentTime>0)||this.video.paused||this.video.ended),Fr(this.playing&&!this.video.muted),this.handleVideoEvents(i))},[{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(t){this.toggling=!0,this.video.muted=!this.video.muted,this.muted=this.video.muted,this.handlePlayerAnalytics(t,this.muted?e.NamiPaywallAction.VIDEO_MUTED:e.NamiPaywallAction.VIDEO_UNMUTED)}},{key:"videoPlayingAction",value:function(){var t,i;return(null===(t=this.video)||void 0===t?void 0:t.currentTime)<=0?e.NamiPaywallAction.VIDEO_STARTED:this.video.paused?e.NamiPaywallAction.VIDEO_PAUSED:this.video.ended?e.NamiPaywallAction.VIDEO_ENDED:(null===(i=this.video)||void 0===i?void 0:i.currentTime)>.05?e.NamiPaywallAction.VIDEO_RESUMED:e.NamiPaywallAction.UNKNOWN}},{key:"handlePlayerAnalytics",value:function(t,i){if(this.video){var n={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};e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,{action:null!=i?i:this.videoPlayingAction(),videoMetaData:n,timeSpentOnPaywall:ea(t)})}}}])}();So.instance=null;var Eo=({onTap:t,sku:i,componentChange:n,contextProvider:a}={})=>{var r,o,s,u,l,d,h,c,m,f,p,g=e.NamiPaywallAction.UNKNOWN;switch(null==t?void 0:t.function){case ft:g=e.NamiPaywallAction.CLOSE_PAYWALL,p=ea(a),Po(),null===(r=So.instance)||void 0===r||r.handlePlayerAnalytics(a,e.NamiPaywallAction.VIDEO_ENDED);break;case pt:g=e.NamiPaywallAction.RESTORE_PURCHASES,To();break;case yt:g=e.NamiPaywallAction.SIGN_IN,Mo();break;case Dt:Ao(null===(o=t.parameters)||void 0===o?void 0:o.url);break;case wt:i&&(g=e.NamiPaywallAction.BUY_SKU,i=Do(a,t,i));break;case Ct:g=e.NamiPaywallAction.PAGE_CHANGE,n={name:null==t||null===(s=t.parameters)||void 0===s?void 0:s.screen},xo(a,null==t||null===(u=t.parameters)||void 0===u?void 0:u.screen);break;case St:g=e.NamiPaywallAction.TOGGLE_CHANGE,n=Co(a,null==t||null===(l=t.parameters)||void 0===l?void 0:l.formId,null==t||null===(d=t.parameters)||void 0===d?void 0:d.value);break;case Pt:i&&(g=e.NamiPaywallAction.SELECT_SKU,Io(a,i));break;case Mt:i&&(g=e.NamiPaywallAction.PURCHASE_SELECTED_SKU,Lo(a,i));break;case Lt:break;case Rt:null===(h=So.instance)||void 0===h||h.togglePlayVideo(a);break;case Ot:null===(c=So.instance)||void 0===c||c.togglePlayVideo(a);break;case $t:null===(m=So.instance)||void 0===m||m.toggleMuteVideo(a);break;case jt:null===(f=So.instance)||void 0===f||f.toggleMuteVideo(a)}g!==e.NamiPaywallAction.UNKNOWN&&e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,v({},a.getPaywallActionEventData(),{action:g,sku:i,timeSpentOnPaywall:p,componentChange:n,purchaseError:void 0,purchases:void 0}))},Po=()=>{Qr(),e.storageService.clearLaunchId(),_o(e.PaywallManagerEvents.Close)||"undefined"==typeof window||window.history.back()},To=()=>{var t=e.hasCapability(e.Capabilities.THIRD_PARTY_TRANSACTIONS);_o(e.PaywallManagerEvents.Restore)||t||e.logger.warn("NamiPaywallManager.registerRestoreHandler is not registered, so restore option on the paywall will use default behavior.")},Mo=()=>{_o(e.PaywallManagerEvents.SignIn)},Ao=t=>{t?_o(e.PaywallManagerEvents.DeeplinkAction,t)||"undefined"!=typeof window&&window.open(t,"_blank"):e.logger.debug("Paywall deep link action invoked, but no url present.")},Do=(t,i,n)=>{var a,r=null===(a=i.parameters)||void 0===a?void 0:a.promo,o=n;if(r)e.logger.debug(`promo id is not null ${null==n?void 0:n.id}`),o.promoId=r.toString();else{e.logger.debug(`promo id is null for ${n.id}, product details: ${JSON.stringify(n.productDetails)}`);var s=n.productDetails;if(Bt(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)e.logger.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)e.logger.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(t,i){if(e.hasCapability(e.Capabilities.THIRD_PARTY_TRANSACTIONS)){if(e.storageService.setPurchaseImpression(),e.NamiEventEmitter.getInstance().listenerCount(e.PaywallManagerEvents.BuySku)<=0)return void e.logger.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.");e.logger.info(`Handing off purchase for processing by developer skuId=${i.skuId} promoId=${i.promoId}`),_o(e.PaywallManagerEvents.BuySku,i)}else{var n=e.namiBuySKU(i.skuId);if(n&&(e.logger.info(`Purchase flow completed, success=${n.success}, code=${n.billingResponseCode}, message=${n.message}`),n.success)){var a;e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,{action:e.NamiPaywallAction.CLOSE_PAYWALL,sku:i,timeSpentOnPaywall:ea(t)}),null===(a=So.instance)||void 0===a||a.handlePlayerAnalytics(t,e.NamiPaywallAction.VIDEO_ENDED);var r=t.getSelectedCampaign();r&&r.conversion_event_type==e.CampaignRuleConversionEventType.IN_APP&&r.conversion_event_url?(e.storageService.clearLaunchId(),window.location.href=r.conversion_event_url):Po()}}}(t,o),o},xo=(e,t)=>{var i;t&&((null===(i=window.history.state)||void 0===i?void 0:i.prevUrl)==t?window.history.back():e.setCurrentPage(t))},Co=(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}},Io=(e,t)=>{var i=e.getCurrentGroupId(),n=e.selectedProducts();i&&t.id!=n[i]&&(n[i]=t.id,e.setSelectedProducts(n))},Lo=(e,t)=>{e.setPurchase(!0,t)};function _o(t,...i){var n=e.NamiEventEmitter.getInstance();return n.emit(t,...i),n.listenerCount(t)>0}var Ro,Fo,Oo,Wo,$o,No,jo,Bo,zo,Uo,Ho,Go=e=>e,Vo=e._internal.NamiFlowManager,Ko=250,Xo=function(){function n(t,i,a){var r;return u(this,n),(r=s(this,n)).pages=[],r.currentOffset=0,r.presentationStyle="fullscreen",r._sheetEntranceActive=!0,r.formFactor=e.getDeviceFormFactor(),r.timeSpentOnPaywall=0,r.animation={transition:"none",direction:"forward"},r._originalBodyStyles={},r._originalDocumentStyles={},r._savedScrollY=0,r._sheetDragStartY=0,r._sheetIsDragging=!1,r._dismissThreshold=100,r._boundHandleKeyDownEvent=e=>r.handleKeyDownEvent(e),r._stylesAlreadySaved=!1,r.type=t,r.value=i,r.context=a,r.setPaywallData(),r.presentationStyle=r.getPresentationStyle(r.paywall),r.applyPresentationHostClasses(),w(r,r)}return y(n,t.LitElement),m(n,[{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 t=e.getPaywallDataFromLabel(this.value,this.type);this.paywall=t.paywall,this.campaign=t.campaign}},{key:"getPresentationStyle",value:function(t){var i,n,a,r=null!==(i=null==t||null===(n=t.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.presentationStyle)&&void 0!==i?i:null==t||null===(a=t.template)||void 0===a||null===(a=a.initialState)||void 0===a?void 0:a.presentation_style;return e.getEffectiveWebStyle(r)}},{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 e;M(n,"connectedCallback",this)([]),null!==(e=window.TVJS)&&void 0!==e&&e.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=this),this._detachFocusSpeechListeners=bo(this),document.addEventListener("keydown",this._boundHandleKeyDownEvent),this._swipeHandler=ht(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,a;M(n,"disconnectedCallback",this)([]),Qr(),null===(t=this._detachFocusSpeechListeners)||void 0===t||t.call(this),this._detachFocusSpeechListeners=void 0,ko(),e.storageService.clearLaunchId(),null!==(i=window.TVJS)&&void 0!==i&&i.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=document.body),document.removeEventListener("keydown",this._boundHandleKeyDownEvent),e.NamiEventEmitter.getInstance().removeAllListeners(e.PAYWALL_ACTION_EVENT),this.restoreStyles(),null===(a=this._halfSheetAbortController)||void 0===a||a.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(t){(10009===t.keyCode||27===t.keyCode||166===t.keyCode||"Backspace"===t.key||"GoBack"===t.key||"BrowserBack"===t.key||"XF86Back"===t.key)&&(t.preventDefault(),Qr(),this.flow?this.flow.triggerActions(e.NamiReservedActions.REMOTE_BACK):this.isModal&&this.animateSheetDismiss().then(()=>Po()))}},{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(),Po()}):this.animateSheetDismiss().then(()=>Po())}},{key:"animateSheetDismiss",value:function(){var e,t,i,n,a;return S(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,o(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 t;this.timeSpentOnPaywall=Date.now(),null===(t=this._detachFocusSpeechListeners)||void 0===t||t.call(this),this._detachFocusSpeechListeners=bo(this.renderRoot),e.isNamiFlowCampaign(this.campaign)&&(this.flow=Vo.instance.presentFlow(this.campaign,this,this.context)),this.isOverlay&&this.updateComplete.then(()=>{this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap()})}},{key:"updated",value:function(e){if(M(n,"updated",this)([e]),e.has("presentationStyle")){var t=e.get("presentationStyle");("compact_sheet"===t||"sheet"===t||"modal"===t)!==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 S(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,o(this.updateComplete);case 3:requestAnimationFrame(()=>{this.currentOffset=1,setTimeout(()=>{this.pages=[e],this.currentOffset=0,this.paywall=e,i&&(i.style.height="")},Ko)});case 4:return a.a(2)}},null,this,null,Promise)}},{key:"animateFullscreenEntry",value:function(){return S(function(e){for(;;)switch(e.n){case 0:return e.n=1,o(new Promise(e=>requestAnimationFrame(()=>e())));case 1:return this.classList.remove("nami-fullscreen-entering"),this.classList.add("nami-fullscreen-entering-active"),e.n=2,o(new Promise(e=>setTimeout(e,Ko)));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 S(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,o(new Promise(e=>setTimeout(e,t?0:Ko)));case 2:e.remove();case 3:return i.a(2)}},null,null,null,Promise)}},{key:"flowNavigateToScreen",value:function(t,i){var n,a,r,s,u,l,d,h,c,m,f;return S(function(v){for(;;)switch(v.n){case 0:if(null!==(n=this.flow)&&void 0!==n&&n.previousFlowStep&&this.flow.executeLifecycle(this.flow.previousFlowStep,e.NamiReservedActions.DISAPPEAR),r=this.presentationStyle,s=this.getPresentationStyle(t),u=0===this.pages.length,l="backward"===i.direction,"compact_sheet"!==r&&"sheet"!==r||"fullscreen"!==s){v.n=3;break}return this.classList.add("nami-fullscreen-entering"),this.presentationStyle="fullscreen",this.applyPresentationHostClasses(),v.n=1,o(this.updateComplete);case 1:return v.n=2,o(this.animateFullscreenEntry());case 2:v.n=11;break;case 3:if("fullscreen"!==r||"compact_sheet"!==s&&"sheet"!==s){v.n=10;break}if(!u&&!l){v.n=8;break}if(!l){v.n=6;break}return d=document.body.style.background||getComputedStyle(this).backgroundColor||"#000",this._sheetEntranceActive=!1,h=this._captureExitOverlay(d),this.presentationStyle=s,this.applyPresentationHostClasses(),this.pages=[t],this.paywall=t,v.n=4,o(this.updateComplete);case 4:return v.n=5,o(this._slideExitOverlayAway(h));case 5:v.n=7;break;case 6:this.presentationStyle=s,this.applyPresentationHostClasses();case 7:v.n=9;break;case 8:console.warn(`Unsupported forward transition: fullscreen → ${s}. Presenting as fullscreen.`);case 9:v.n=11;break;case 10:this.presentationStyle=s,this.applyPresentationHostClasses();case 11:return c=("compact_sheet"===r||"sheet"===r)&&"fullscreen"===s,m="fullscreen"===r&&("compact_sheet"===s||"sheet"===s),f=!("compact_sheet"!==r&&"sheet"!==r||"compact_sheet"!==s&&"sheet"!==s||r===s)||c||m,this.animation=f?{transition:"fade",direction:i.direction}:i,v.n=12,o(this.updatePages(t));case 12:null!==(a=this.flow)&&void 0!==a&&a.currentFlowStep&&this.flow.executeLifecycle(this.flow.currentFlowStep,e.NamiReservedActions.APPEAR);case 13:return v.a(2)}},null,this,null,Promise)}},{key:"getSelectedSlideIndexForCurrentCarousel",value:function(){return ut.getSelectedSlideIndex()}},{key:"renderFlow",value:function(){return"undefined"==typeof document?t.html(Ro||(Ro=Go``)):this.isOverlaySheet?this.renderHalfSheet():this.isModal?this.renderModal(this.renderFlowContainer()):this.renderFlowContainer()}},{key:"renderFlowContainer",value:function(){return t.html(Fo||(Fo=Go`
|
|
255
255
|
<div class="nami-flow-container">
|
|
256
256
|
${0}
|
|
257
257
|
</div>
|
|
@@ -485,7 +485,10 @@
|
|
|
485
485
|
>
|
|
486
486
|
${0}
|
|
487
487
|
</div>
|
|
488
|
-
`),this.isCollapsed?"Expand":"Collapse",!this.isCollapsed,this._handleClick,Tu(this.contextProvider,n,this.scaleFactor,this.inFocusedState,this.minSDKVersion),this.isCollapsed,this.isCollapsed?"-1":"0",s)}}])}();Ae([ot({type:Object})],u_.prototype,"component",void 0),Ae([ot({type:Boolean})],u_.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],u_.prototype,"height",void 0),Ae([ot({type:Number})],u_.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],u_.prototype,"minSDKVersion",void 0),u_=Ae([Fe("nami-collapse-container")],u_);var l_=function(){function e(){var t;return u(this,e),(t=s(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 y(e,fs),m(e,[{key:"connectedCallback",value:function(){M(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(){M(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,i=e?"margin-top":"margin-left",n=this.component.spacing?this.component.spacing*this.scaleFactor:0;return t.unsafeCSS(`\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 ${xs(this.component,!1)}\n ${Us(this.component,!1)}\n align-self: baseline;\n cursor: -webkit-grab;\n cursor: grab;\n }\n :host(:focus){\n ${xs(this.component,!0)}\n ${Us(this.component,!0)}\n }\n :host(:focus-visible){\n ${Xs(this.component)}\n }\n @supports not (display: grid) {\n :host > *:not(:first-child) {\n ${i}: ${n}px;\n }\n }\n @supports (display: grid) {\n :host {\n display: ${this.component.hidden?"none":"grid"};\n grid-row-gap: ${n}px;\n grid-column-gap: ${n}px;\n grid-gap: ${n}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&&ia(n,i)||(this.tabIndex=0),Kn(this.contextProvider,this.component).map(e=>e.map(e=>Tu(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))}}])}();Ae([ot({type:Object})],l_.prototype,"component",void 0),Ae([ot({type:Boolean})],l_.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],l_.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],l_.prototype,"minSDKVersion",void 0),l_=Ae([Fe("nami-responsive-grid")],l_);var d_=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,fs),m(e,[{key:"styles",value:function(){var e,i,n,a,r=Math.max(1,null!==(e=this.component.columns)&&void 0!==e?e:2),o=(null!==(i=this.component.columnSpacing)&&void 0!==i?i:0)*this.scaleFactor,s=(null!==(n=this.component.rowSpacing)&&void 0!==n?n:0)*this.scaleFactor,u=null!==(a=this.component.itemAlignment)&&void 0!==a?a:"start";return t.unsafeCSS(`\n :host {\n display: ${this.component.hidden?"none":"grid"};\n grid-template-columns: repeat(${r}, 1fr);\n column-gap: ${o}px;\n row-gap: ${s}px;\n justify-items: ${u};\n ${xs(this.component,!1)}\n ${Us(this.component,!1)}\n }\n :host(:focus) {\n ${xs(this.component,!0)}\n ${Us(this.component,!0)}\n }\n :host(:focus-visible) {\n ${Xs(this.component)}\n }\n `)}},{key:"render",value:function(){var e=this.component,t=e.focusedBorderColor,i=e.focusedFillColor,n=e.fillColor;return!t&&ia(n,i)||(this.tabIndex=0),Kn(this.contextProvider,this.component).map(e=>e.map(e=>Tu(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))}}])}();function h_(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function c_(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]:h_(t[i])&&h_(e[i])&&Object.keys(t[i]).length>0&&c_(e[i],t[i])})}Ae([ot({type:Object})],d_.prototype,"component",void 0),Ae([ot({type:Boolean})],d_.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],d_.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],d_.prototype,"minSDKVersion",void 0),d_=Ae([Fe("nami-repeating-grid")],d_);var m_={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 f_(){var e="undefined"!=typeof document?document:{};return c_(e,m_),e}var v_,p_,g_,y_={document:m_,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 b_(){var e="undefined"!=typeof window?window:{};return c_(e,y_),e}function w_(e,t=0){return setTimeout(e,t)}function k_(){return Date.now()}function S_(e,t="x"){var i,n,a,r=b_(),o=function(e){var t,i=b_();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 E_(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function P_(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function T_(...e){for(var t=Object(e[0]),i=1;i<e.length;i+=1){var n=e[i];if(null!=n&&!P_(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&&(E_(t[s])&&E_(n[s])?n[s].__swiper__?t[s]=n[s]:T_(t[s],n[s]):!E_(t[s])&&E_(n[s])?(t[s]={},n[s].__swiper__?t[s]=n[s]:T_(t[s],n[s])):t[s]=n[s])}}return t}function M_(e,t,i){e.style.setProperty(t,i)}function A_({swiper:e,targetPosition:t,side:i}){var n,a=b_(),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 D_(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function x_(e,t=""){var i=b_(),n=[...e.children];return i.HTMLSlotElement&&e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),t?n.filter(e=>e.matches(t)):n}function C_(e){try{return void console.warn(e)}catch(e){}}function I_(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 L_(e,t){return b_().getComputedStyle(e,null).getPropertyValue(t)}function __(e){var t,i=e;if(i){for(t=0;null!==(i=i.previousSibling);)1===i.nodeType&&(t+=1);return t}}function R_(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 F_(e,t,i){var n=b_();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 O_(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)}function W_(e,t=""){"undefined"!=typeof trustedTypes?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}function $_(){return v_||(v_=function(){var e=b_(),t=f_();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),v_}function N_(e={}){return p_||(p_=function({userAgent:e}={}){var t=$_(),i=b_(),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)),p_}function j_(){return g_||(g_=function(){var e=b_(),t=N_(),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}}()),g_}var B_={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 z_=(e,t,i)=>{t&&!e.classList.contains(i)?e.classList.add(i):!t&&e.classList.contains(i)&&e.classList.remove(i)};var U_=(e,t,i)=>{t&&!e.classList.contains(i)?e.classList.add(i):!t&&e.classList.contains(i)&&e.classList.remove(i)};var H_=(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()}}},G_=(e,t)=>{if(e.slides[t]){var i=e.slides[t].querySelector('[loading="lazy"]');i&&i.removeAttribute("loading")}},V_=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)&&G_(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)&&G_(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)&&G_(e,d)}}};var K_={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(L_(n,"padding-left")||0,10)-parseInt(L_(n,"padding-right")||0,10),t=t-parseInt(L_(n,"padding-top")||0,10)-parseInt(L_(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=x_(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&&(M_(n,"--swiper-centered-offset-before",""),M_(n,"--swiper-centered-offset-after","")),i.cssMode&&(M_(n,"--swiper-slides-offset-before",`${f}px`),M_(n,"--swiper-slides-offset-after",`${v}px`));var E,P=i.grid&&i.grid.rows>1&&e.grid;P?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,M=0;M<d;M+=1){E=0;var A=l[M];if(!A||(P&&e.grid.updateSlide(M,A,l),"none"!==L_(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()?F_(A,"width"):F_(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"),O=D.getPropertyValue("box-sizing");if(O&&"border-box"===O)E=I+R+F;else{var W=A.clientWidth;E=I+L+_+R+F+(A.offsetWidth-W)}}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!==M&&(w=w-y/2-b),0===M&&(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`),P&&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){M_(n,"--swiper-centered-offset-before",-h[0]+"px"),M_(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)),z_(l,p,i.slideVisibleClass),z_(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=>x_(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=>{U_(n,n===e,r.slideActiveClass),U_(n,n===i,r.slideNextClass),U_(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&&V_(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 X_={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=S_(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 A_({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 Y_({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 q_={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(),P=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"]=P})):m[E?"scrollLeft":"scrollTop"]=P,S&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return A_({swiper:r,targetPosition:P,side:E?"left":"top"}),!0;m.scrollTo({[E?"left":"top"]:P,behavior:"smooth"})}return!0}var T=j_().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(x_(n,`${o}[data-swiper-slide-index="${t}"]`)[0]),w_(()=>{e.slideTo(r)})):e.slideTo(r)}else e.slideTo(r)}}};var J_={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=()=>{x_(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=x_(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?I_("swiper-slide",[n.slideBlankClass]):I_("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 C_("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 C_("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,p=m.slidesOffsetBefore,g=m.slidesOffsetAfter,y=m.initialSlide,b=f||!!p||!!g;if(u.allowSlidePrev=!0,u.allowSlideNext=!0,u.virtual&&m.virtual.enabled)return t&&(b||0!==u.snapIndex?b&&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 w=m.slidesPerView;"auto"===w?w=u.slidesPerViewDynamic():(w=Math.ceil(parseFloat(m.slidesPerView,10)),b&&w%2==0&&(w+=1));var k=m.slidesPerGroupAuto?w:m.slidesPerGroup,S=b?Math.max(k,Math.ceil(w/2)):k;S%k!==0&&(S+=k-S%k),S+=m.loopAdditionalSlides,u.loopedSlides=S;var E=u.grid&&m.grid&&m.grid.rows>1;l.length<w+S||"cards"===u.params.effect&&l.length<w+2*S?C_("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"):E&&"row"===m.grid.fill&&C_("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");var P=[],T=[],M=E?Math.ceil(l.length/m.grid.rows):l.length,A=r&&M-y<w&&!b,D=A?y:u.activeIndex;void 0===a?a=u.getSlideIndex(l.find(e=>e.classList.contains(m.slideActiveClass))):D=a;var x="next"===i||!i,C="prev"===i||!i,I=0,L=0,_=(E?l[a].column:a)+(b&&void 0===n?-w/2+.5:0);if(_<S){I=Math.max(S-_,k);for(var R=0;R<S-_;R+=1){var F=R-Math.floor(R/M)*M;if(E)for(var O=M-F-1,W=l.length-1;W>=0;W-=1)l[W].column===O&&P.push(W);else P.push(M-F-1)}}else if(_+w>M-S){L=Math.max(_-(M-2*S),k),A&&(L=Math.max(L,w-M+y+1));for(var $=function(){var e=N-Math.floor(N/M)*M;E?l.forEach((t,i)=>{t.column===e&&T.push(i)}):T.push(e)},N=0;N<L;N+=1)$()}if(u.__preventObserver__=!0,requestAnimationFrame(()=>{u.__preventObserver__=!1}),"cards"===u.params.effect&&l.length<w+2*S&&(T.includes(a)&&T.splice(T.indexOf(a),1),P.includes(a)&&P.splice(P.indexOf(a),1)),C&&P.forEach(e=>{l[e].swiperLoopMoveDOM=!0,c.prepend(l[e]),l[e].swiperLoopMoveDOM=!1}),x&&T.forEach(e=>{l[e].swiperLoopMoveDOM=!0,c.append(l[e]),l[e].swiperLoopMoveDOM=!1}),u.recalcSlides(),"auto"===m.slidesPerView?u.updateSlides():E&&(P.length>0&&C||T.length>0&&x)&&u.slides.forEach((e,t)=>{u.grid.updateSlide(t,e,u.slides)}),m.watchSlidesProgress&&u.updateSlidesOffset(),t)if(P.length>0&&C){if(void 0===e){var j=u.slidesGrid[D],B=u.slidesGrid[D+I]-j;s?u.setTranslate(u.translate-B):(u.slideTo(D+Math.ceil(I),0,!1,!0),n&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-B,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-B))}else if(n){var z=E?P.length/m.grid.rows:P.length;u.slideTo(u.activeIndex+z,0,!1,!0),u.touchEventsData.currentTranslate=u.translate}}else if(T.length>0&&x)if(void 0===e){var U=u.slidesGrid[D],H=u.slidesGrid[D-L]-U;s?u.setTranslate(u.translate-H):(u.slideTo(D-L,0,!1,!0),n&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-H,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-H))}else{var G=E?T.length/m.grid.rows:T.length;u.slideTo(u.activeIndex-G,0,!1,!0)}if(u.allowSlidePrev=d,u.allowSlideNext=h,u.controller&&u.controller.control&&!o){var V={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(v({},V,{slideTo:e.params.slidesPerView===m.slidesPerView&&t}))}):u.controller.control instanceof u.constructor&&u.controller.control.params.loop&&u.controller.control.loopFix(v({},V,{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 Q_={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 Z_(e,t,i){var n=b_(),a=e.params,r=a.edgeSwipeDetection,o=a.edgeSwipeThreshold;return!r||!(i<=o||i>=n.innerWidth-o)||"prevent"===r&&(t.preventDefault(),!0)}function eR(e){var t=this,i=f_(),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=b_(),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===f_()||i===b_())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(Z_(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=k_(),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 Z_(t,n,n.targetTouches[0].pageX)}function tR(e){var t=f_(),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=k_()));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 iR(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=k_(),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=k_(),w_(()=>{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 nR(){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 aR(e){var t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function rR(){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 oR(e){var t=this;H_(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function sR(){var e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}var uR=(e,t)=>{var i=f_(),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",nR,!0):e[l]("observerUpdate",nR,!0),a[u]("load",e.onLoad,{capture:!0}))};var lR=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var dR={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=f_(),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=lR(e,n),c=lR(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(),T_(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=b_(),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 hR={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 cR={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 mR(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}),T_(t,i)):T_(t,i)):T_(t,i)}}var fR={eventsEmitter:B_,update:K_,translate:X_,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(),Y_({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),Y_({swiper:i,runCallbacks:e,direction:t,step:"End"}))}},slide:q_,loop:J_,grabCursor:Q_,events:{attachEvents:function(){var e=this,t=e.params;e.onTouchStart=eR.bind(e),e.onTouchMove=tR.bind(e),e.onTouchEnd=iR.bind(e),e.onDocumentTouchStart=sR.bind(e),t.cssMode&&(e.onScroll=rR.bind(e)),e.onClick=aR.bind(e),e.onLoad=oR.bind(e),uR(e,"on")},detachEvents:function(){uR(this,"off")}},breakpoints:dR,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:hR},vR={},pR=function(){function e(...t){var i,n;u(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=T_({},n),i&&!n.el&&(n.el=i);var a=f_();if(n.el&&"string"==typeof n.el&&a.querySelectorAll(n.el).length>1){var r=[];return a.querySelectorAll(n.el).forEach(t=>{var i=T_({},n,{el:t});r.push(new e(i))}),r}var o=this;o.__swiper__=!0,o.support=$_(),o.device=N_({userAgent:n.userAgent}),o.browser=j_(),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:mR(n,s),on:o.on.bind(o),once:o.once.bind(o),off:o.off.bind(o),emit:o.emit.bind(o)})});var l=T_({},cR,s);return o.params=T_({},l,vR,n),o.originalParams=T_({},o.params),o.passedParams=T_({},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 m(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=__(x_(this.slidesEl,`.${this.params.slideClass}, swiper-slide`)[0]);return __(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=x_(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&&H_(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()):x_(i,n())[0];return!a&&t.params.createElements&&(a=I_("div",t.params.wrapperClass),i.append(a),x_(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"===L_(i,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===i.dir.toLowerCase()||"rtl"===L_(i,"direction")),wrongRTL:"-webkit-box"===L_(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?H_(t,e):e.addEventListener("load",e=>{H_(t,e.target)})}),V_(t),t.initialized=!0,V_(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){T_(vR,e)}},{key:"extendedDefaults",get:function(){return vR}},{key:"defaults",get:function(){return cR}},{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 gR(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function yR({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(gR(e.params.pagination.bulletClass));if(i){t.preventDefault();var n,a,r,o=__(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=O_(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=F_(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=__(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(gR(i.currentClass)).forEach(e=>{e.textContent=i.formatFractionCurrent(r+1)}),t.querySelectorAll(gR(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(gR(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?(W_(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=O_(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&&W_(i,r||""),"bullets"===t.type&&e.pagination.bullets.push(...i.querySelectorAll(gR(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=x_(e.el,`.${n[a]}`)[0];r||((r=I_("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=>R_(t,".swiper")[0]===e.el)),Array.isArray(t)&&1===t.length&&(t=t[0]),Object.assign(e.pagination,{el:t}),(t=O_(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=O_(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=O_(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=O_(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=O_(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=O_(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=O_(t)).forEach(t=>t.classList.remove(e.params.pagination.paginationDisabledClass)),c(),h(),d()},disable:f,render:h,update:d,init:c,destroy:m})}function bR({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||P())}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):P()};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())}}},P=()=>{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=f_();"hidden"===t.visibilityState&&(c=!0,E(!0)),"visible"===t.visibilityState&&P()}},M=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&&P())};i("init",()=>{e.params.autoplay.enabled&&(e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",M),e.el.addEventListener("pointerleave",A)),f_().addEventListener("visibilitychange",T),k())}),i("destroy",()=>{e.el&&"string"!=typeof e.el&&(e.el.removeEventListener("pointerenter",M),e.el.removeEventListener("pointerleave",A)),f_().removeEventListener("visibilitychange",T),e.autoplay.running&&S()}),i("_freeModeStaticRelease",()=>{(d||c)&&P()}),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&&P(),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:P})}function wR(e,t){var i=D_(t);return i!==t&&(i.style.backfaceVisibility="hidden",i.style["-webkit-backface-visibility"]="hidden"),i}function kR(e,t,i){var n=`swiper-slide-shadow${i?`-${i}`:""} swiper-slide-shadow-${e}`,a=D_(t),r=a.querySelector(`.${n.split(" ").join(".")}`);return r||(r=I_("div",n.split(" ")),a.append(r)),r}function SR({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,P=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(P)<.001&&(P=0);var T=`translate3d(${E}px,${S}px,${w}px) rotateX(${h(b)}deg) rotateY(${h(y)}deg) scale(${P})`;if(wR(0,f).style.transform=T,f.style.zIndex=1-Math.abs(Math.round(g)),r.slideShadows){var M=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");M||(M=kR("coverflow",f,o?"left":"top")),A||(A=kR("coverflow",f,o?"right":"bottom")),M&&(M.style.opacity=g>0?g:0),A&&(A.style.opacity=-g>0?-g:0)}}},setTransition:t=>{e.slides.map(e=>D_(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(fR).forEach(e=>{Object.keys(fR[e]).forEach(t=>{pR.prototype[t]=fR[e][t]})}),pR.use([function({swiper:e,on:t,emit:i}){var n=b_(),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=b_(),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=R_(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 ER,PR,TR=e=>e,MR=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).inFocusedState=!1,e.scaleFactor=1,e.updateSpacing=t=>{e.slideSpacing=t.detail.spacing,e.swiperInstance&&(e.swiperInstance.params.spaceBetween=e.slideSpacing,e.swiperInstance.update())},e}return y(i,fs),m(i,[{key:"connectedCallback",value:function(){M(i,"connectedCallback",this)([]),window.addEventListener("child-spacing",this.updateSpacing,!1)}},{key:"disconnectedCallback",value:function(){M(i,"disconnectedCallback",this)([]),window.removeEventListener("child-spacing",this.updateSpacing,!1)}},{key:"styles",value:function(){var e,i,n,a=this.scaleFactor,r=this.component,o=r.backgroundBlur,s=r.indicator,u=r.activeIndicator,l=r.previousSlidePadding,d=r.nextSlidePadding,h="vertical"===r.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n display: ${r.hidden?"none":"flex"};\n flex-direction: column !important;\n ${Hs(r.position)} \n width: 100%;\n bottom: -1px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n ${o?`backdrop-filter: blur(${o}px);`:""}\n z-index: ${null!==(e=r.zIndex)&&void 0!==e?e:1};\n top: 0px;\n transition: all 0.3s;\n ${Rs(r,a)}\n ${function(e,t){return`\n padding-right: ${Ps(t,e.nextSlidePadding)}px !important;\n padding-left: ${Ps(t,e.previousSlidePadding)}px !important;\n `}(r,a)}\n ${Cs(r)}\n ${xs(r,!1)}\n max-width: 100vw;\n }\n :host(:focus){\n ${xs(r,!0)}\n ${zs(r,a,!0)}\n }\n :host(:focus-visible){\n ${Xs(r)}\n }\n :host > *:not(:first-child) {\n ${h}: ${r.spacing?r.spacing*a:0}px;\n }\n .swiper-container {\n ${Ws(r,a)};\n padding-left: ${null!=l?l:0}px;\n padding-right: ${null!=d?d: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==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:r.indicatorColor} !important;\n }\n .swiper-pagination-bullet-active {\n ${null!=(null==u?void 0:u.width)?`width: ${u.width}px !important;`:""}\n ${null!=(null==u?void 0:u.height)?`height: ${u.height}px !important;`:""}\n ${null!=(null==u?void 0:u.borderRadius)?`border-radius: ${u.borderRadius}px !important;`:""}\n background: ${null!==(n=null==u?void 0:u.fillColor)&&void 0!==n?n:r.activeIndicatorColor} !important;\n }\n `)}},{key:"updated",value:function(){var e,t,i=[yR,bR],n=this.component,a=n.autoplay,r=n.autoplaySeconds,o=n.showIndicators,s=n.slideSpacing,u=n.inactiveSlideScale;u&&i.push(SR),pR.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 pR(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 Gn(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(t){var i,n;if(!t.loopSource)return[];var a,r=this.contextProvider.state,o=r.slides,s=r.selectedProducts,u="string"==typeof t.loopSource?t.loopSource:"",l=Nn(this.contextProvider.productDetails,null!==(i=null===(n=this.contextProvider.getSelectedPaywall())||void 0===n?void 0:n.sku_menus)&&void 0!==i?i:[],u),d=[];e.empty(o)||(d=""!=u?o[u].carouselName:null!==(a=t.loopSource)&&void 0!==a?a:[]);var h=this.contextProvider.filteredSkuMenus.map(e=>e.id);return d.filter(e=>!e.productGroupId||h.includes(e.productGroupId)).map(e=>{var i=l.find(t=>t.id==s[e.productGroupId]);return Gn(t.components,Gn({slide:e},{sku:v({},Bn(null==i?void 0:i.product_details,e,l))}))||[]})}},{key:"render",value:function(){var e=this.getCarouselSlides(this.component),i=this.component,n=i.focusedBorderColor,a=i.focusedFillColor,r=i.fillColor;return!n&&ia(r,a)||(this.tabIndex=0),t.html(ER||(ER=TR`
|
|
488
|
+
`),this.isCollapsed?"Expand":"Collapse",!this.isCollapsed,this._handleClick,Tu(this.contextProvider,n,this.scaleFactor,this.inFocusedState,this.minSDKVersion),this.isCollapsed,this.isCollapsed?"-1":"0",s)}}])}();Ae([ot({type:Object})],u_.prototype,"component",void 0),Ae([ot({type:Boolean})],u_.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],u_.prototype,"height",void 0),Ae([ot({type:Number})],u_.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],u_.prototype,"minSDKVersion",void 0),u_=Ae([Fe("nami-collapse-container")],u_);var l_=function(){function e(){var t;return u(this,e),(t=s(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 y(e,fs),m(e,[{key:"connectedCallback",value:function(){M(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(){M(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,i=e?"margin-top":"margin-left",n=this.component.spacing?this.component.spacing*this.scaleFactor:0;return t.unsafeCSS(`\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 ${xs(this.component,!1)}\n ${Us(this.component,!1)}\n align-self: baseline;\n cursor: -webkit-grab;\n cursor: grab;\n }\n :host(:focus){\n ${xs(this.component,!0)}\n ${Us(this.component,!0)}\n }\n :host(:focus-visible){\n ${Xs(this.component)}\n }\n @supports not (display: grid) {\n :host > *:not(:first-child) {\n ${i}: ${n}px;\n }\n }\n @supports (display: grid) {\n :host {\n display: ${this.component.hidden?"none":"grid"};\n grid-row-gap: ${n}px;\n grid-column-gap: ${n}px;\n grid-gap: ${n}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&&ia(n,i)||(this.tabIndex=0),(this.contextProvider,Kn(0,this.component).flatMap(e=>e.header?[e.header,...e.items]:e.items)).map(e=>e.map(e=>Tu(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))}}])}();Ae([ot({type:Object})],l_.prototype,"component",void 0),Ae([ot({type:Boolean})],l_.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],l_.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],l_.prototype,"minSDKVersion",void 0),l_=Ae([Fe("nami-responsive-grid")],l_);var d_,h_,c_=e=>e,m_=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,fs),m(e,[{key:"styles",value:function(){var e,i,n,a,r=Math.max(1,null!==(e=this.component.columns)&&void 0!==e?e:2),o=(null!==(i=this.component.columnSpacing)&&void 0!==i?i:0)*this.scaleFactor,s=(null!==(n=this.component.rowSpacing)&&void 0!==n?n:0)*this.scaleFactor,u=null!==(a=this.component.itemAlignment)&&void 0!==a?a:"start";return t.unsafeCSS(`\n :host {\n display: ${this.component.hidden?"none":"grid"};\n grid-template-columns: repeat(${r}, 1fr);\n column-gap: ${o}px;\n row-gap: ${s}px;\n justify-items: ${u};\n ${xs(this.component,!1)}\n ${Us(this.component,!1)}\n }\n .nami-group-header {\n grid-column: 1 / -1;\n justify-self: stretch;\n }\n :host(:focus) {\n ${xs(this.component,!0)}\n ${Us(this.component,!0)}\n }\n :host(:focus-visible) {\n ${Xs(this.component)}\n }\n `)}},{key:"render",value:function(){var e=this.component,i=e.focusedBorderColor,n=e.focusedFillColor,a=e.fillColor;!i&&ia(a,n)||(this.tabIndex=0);var r=e=>Tu(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion);return Kn(this.contextProvider,this.component).map(e=>t.html(d_||(d_=c_`
|
|
489
|
+
${0}
|
|
490
|
+
${0}
|
|
491
|
+
`),e.header?t.html(h_||(h_=c_`<div class="nami-group-header">${0}</div>`),e.header.map(r)):null,e.items.map(e=>e.map(r))))}}])}();function f_(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function v_(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]:f_(t[i])&&f_(e[i])&&Object.keys(t[i]).length>0&&v_(e[i],t[i])})}Ae([ot({type:Object})],m_.prototype,"component",void 0),Ae([ot({type:Boolean})],m_.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],m_.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],m_.prototype,"minSDKVersion",void 0),m_=Ae([Fe("nami-repeating-grid")],m_);var p_={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 g_(){var e="undefined"!=typeof document?document:{};return v_(e,p_),e}var y_,b_,w_,k_={document:p_,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 S_(){var e="undefined"!=typeof window?window:{};return v_(e,k_),e}function E_(e,t=0){return setTimeout(e,t)}function P_(){return Date.now()}function T_(e,t="x"){var i,n,a,r=S_(),o=function(e){var t,i=S_();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 M_(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function A_(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function D_(...e){for(var t=Object(e[0]),i=1;i<e.length;i+=1){var n=e[i];if(null!=n&&!A_(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&&(M_(t[s])&&M_(n[s])?n[s].__swiper__?t[s]=n[s]:D_(t[s],n[s]):!M_(t[s])&&M_(n[s])?(t[s]={},n[s].__swiper__?t[s]=n[s]:D_(t[s],n[s])):t[s]=n[s])}}return t}function x_(e,t,i){e.style.setProperty(t,i)}function C_({swiper:e,targetPosition:t,side:i}){var n,a=S_(),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 I_(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function L_(e,t=""){var i=S_(),n=[...e.children];return i.HTMLSlotElement&&e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),t?n.filter(e=>e.matches(t)):n}function __(e){try{return void console.warn(e)}catch(e){}}function R_(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 F_(e,t){return S_().getComputedStyle(e,null).getPropertyValue(t)}function O_(e){var t,i=e;if(i){for(t=0;null!==(i=i.previousSibling);)1===i.nodeType&&(t+=1);return t}}function W_(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 $_(e,t,i){var n=S_();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 N_(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)}function j_(e,t=""){"undefined"!=typeof trustedTypes?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}function B_(){return y_||(y_=function(){var e=S_(),t=g_();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),y_}function z_(e={}){return b_||(b_=function({userAgent:e}={}){var t=B_(),i=S_(),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)),b_}function U_(){return w_||(w_=function(){var e=S_(),t=z_(),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}}()),w_}var H_={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 G_=(e,t,i)=>{t&&!e.classList.contains(i)?e.classList.add(i):!t&&e.classList.contains(i)&&e.classList.remove(i)};var V_=(e,t,i)=>{t&&!e.classList.contains(i)?e.classList.add(i):!t&&e.classList.contains(i)&&e.classList.remove(i)};var K_=(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()}}},X_=(e,t)=>{if(e.slides[t]){var i=e.slides[t].querySelector('[loading="lazy"]');i&&i.removeAttribute("loading")}},Y_=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)&&X_(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)&&X_(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)&&X_(e,d)}}};var q_={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(F_(n,"padding-left")||0,10)-parseInt(F_(n,"padding-right")||0,10),t=t-parseInt(F_(n,"padding-top")||0,10)-parseInt(F_(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=L_(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&&(x_(n,"--swiper-centered-offset-before",""),x_(n,"--swiper-centered-offset-after","")),i.cssMode&&(x_(n,"--swiper-slides-offset-before",`${f}px`),x_(n,"--swiper-slides-offset-after",`${v}px`));var E,P=i.grid&&i.grid.rows>1&&e.grid;P?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,M=0;M<d;M+=1){E=0;var A=l[M];if(!A||(P&&e.grid.updateSlide(M,A,l),"none"!==F_(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()?$_(A,"width"):$_(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"),O=D.getPropertyValue("box-sizing");if(O&&"border-box"===O)E=I+R+F;else{var W=A.clientWidth;E=I+L+_+R+F+(A.offsetWidth-W)}}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!==M&&(w=w-y/2-b),0===M&&(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`),P&&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){x_(n,"--swiper-centered-offset-before",-h[0]+"px"),x_(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)),G_(l,p,i.slideVisibleClass),G_(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=>L_(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=>{V_(n,n===e,r.slideActiveClass),V_(n,n===i,r.slideNextClass),V_(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&&Y_(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 J_={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=T_(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 C_({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 Q_({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 Z_={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(),P=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"]=P})):m[E?"scrollLeft":"scrollTop"]=P,S&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return C_({swiper:r,targetPosition:P,side:E?"left":"top"}),!0;m.scrollTo({[E?"left":"top"]:P,behavior:"smooth"})}return!0}var T=U_().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(L_(n,`${o}[data-swiper-slide-index="${t}"]`)[0]),E_(()=>{e.slideTo(r)})):e.slideTo(r)}else e.slideTo(r)}}};var eR={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=()=>{L_(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=L_(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?R_("swiper-slide",[n.slideBlankClass]):R_("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 __("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 __("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,p=m.slidesOffsetBefore,g=m.slidesOffsetAfter,y=m.initialSlide,b=f||!!p||!!g;if(u.allowSlidePrev=!0,u.allowSlideNext=!0,u.virtual&&m.virtual.enabled)return t&&(b||0!==u.snapIndex?b&&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 w=m.slidesPerView;"auto"===w?w=u.slidesPerViewDynamic():(w=Math.ceil(parseFloat(m.slidesPerView,10)),b&&w%2==0&&(w+=1));var k=m.slidesPerGroupAuto?w:m.slidesPerGroup,S=b?Math.max(k,Math.ceil(w/2)):k;S%k!==0&&(S+=k-S%k),S+=m.loopAdditionalSlides,u.loopedSlides=S;var E=u.grid&&m.grid&&m.grid.rows>1;l.length<w+S||"cards"===u.params.effect&&l.length<w+2*S?__("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"):E&&"row"===m.grid.fill&&__("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");var P=[],T=[],M=E?Math.ceil(l.length/m.grid.rows):l.length,A=r&&M-y<w&&!b,D=A?y:u.activeIndex;void 0===a?a=u.getSlideIndex(l.find(e=>e.classList.contains(m.slideActiveClass))):D=a;var x="next"===i||!i,C="prev"===i||!i,I=0,L=0,_=(E?l[a].column:a)+(b&&void 0===n?-w/2+.5:0);if(_<S){I=Math.max(S-_,k);for(var R=0;R<S-_;R+=1){var F=R-Math.floor(R/M)*M;if(E)for(var O=M-F-1,W=l.length-1;W>=0;W-=1)l[W].column===O&&P.push(W);else P.push(M-F-1)}}else if(_+w>M-S){L=Math.max(_-(M-2*S),k),A&&(L=Math.max(L,w-M+y+1));for(var $=function(){var e=N-Math.floor(N/M)*M;E?l.forEach((t,i)=>{t.column===e&&T.push(i)}):T.push(e)},N=0;N<L;N+=1)$()}if(u.__preventObserver__=!0,requestAnimationFrame(()=>{u.__preventObserver__=!1}),"cards"===u.params.effect&&l.length<w+2*S&&(T.includes(a)&&T.splice(T.indexOf(a),1),P.includes(a)&&P.splice(P.indexOf(a),1)),C&&P.forEach(e=>{l[e].swiperLoopMoveDOM=!0,c.prepend(l[e]),l[e].swiperLoopMoveDOM=!1}),x&&T.forEach(e=>{l[e].swiperLoopMoveDOM=!0,c.append(l[e]),l[e].swiperLoopMoveDOM=!1}),u.recalcSlides(),"auto"===m.slidesPerView?u.updateSlides():E&&(P.length>0&&C||T.length>0&&x)&&u.slides.forEach((e,t)=>{u.grid.updateSlide(t,e,u.slides)}),m.watchSlidesProgress&&u.updateSlidesOffset(),t)if(P.length>0&&C){if(void 0===e){var j=u.slidesGrid[D],B=u.slidesGrid[D+I]-j;s?u.setTranslate(u.translate-B):(u.slideTo(D+Math.ceil(I),0,!1,!0),n&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-B,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-B))}else if(n){var z=E?P.length/m.grid.rows:P.length;u.slideTo(u.activeIndex+z,0,!1,!0),u.touchEventsData.currentTranslate=u.translate}}else if(T.length>0&&x)if(void 0===e){var U=u.slidesGrid[D],H=u.slidesGrid[D-L]-U;s?u.setTranslate(u.translate-H):(u.slideTo(D-L,0,!1,!0),n&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-H,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-H))}else{var G=E?T.length/m.grid.rows:T.length;u.slideTo(u.activeIndex-G,0,!1,!0)}if(u.allowSlidePrev=d,u.allowSlideNext=h,u.controller&&u.controller.control&&!o){var V={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(v({},V,{slideTo:e.params.slidesPerView===m.slidesPerView&&t}))}):u.controller.control instanceof u.constructor&&u.controller.control.params.loop&&u.controller.control.loopFix(v({},V,{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 tR={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 iR(e,t,i){var n=S_(),a=e.params,r=a.edgeSwipeDetection,o=a.edgeSwipeThreshold;return!r||!(i<=o||i>=n.innerWidth-o)||"prevent"===r&&(t.preventDefault(),!0)}function nR(e){var t=this,i=g_(),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=S_(),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===g_()||i===S_())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(iR(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=P_(),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 iR(t,n,n.targetTouches[0].pageX)}function aR(e){var t=g_(),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=P_()));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 rR(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=P_(),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=P_(),E_(()=>{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 oR(){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 sR(e){var t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function uR(){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 lR(e){var t=this;K_(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function dR(){var e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}var hR=(e,t)=>{var i=g_(),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",oR,!0):e[l]("observerUpdate",oR,!0),a[u]("load",e.onLoad,{capture:!0}))};var cR=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var mR={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=g_(),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=cR(e,n),c=cR(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(),D_(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=S_(),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 fR={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 vR={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 pR(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}),D_(t,i)):D_(t,i)):D_(t,i)}}var gR={eventsEmitter:H_,update:q_,translate:J_,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(),Q_({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),Q_({swiper:i,runCallbacks:e,direction:t,step:"End"}))}},slide:Z_,loop:eR,grabCursor:tR,events:{attachEvents:function(){var e=this,t=e.params;e.onTouchStart=nR.bind(e),e.onTouchMove=aR.bind(e),e.onTouchEnd=rR.bind(e),e.onDocumentTouchStart=dR.bind(e),t.cssMode&&(e.onScroll=uR.bind(e)),e.onClick=sR.bind(e),e.onLoad=lR.bind(e),hR(e,"on")},detachEvents:function(){hR(this,"off")}},breakpoints:mR,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:fR},yR={},bR=function(){function e(...t){var i,n;u(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=D_({},n),i&&!n.el&&(n.el=i);var a=g_();if(n.el&&"string"==typeof n.el&&a.querySelectorAll(n.el).length>1){var r=[];return a.querySelectorAll(n.el).forEach(t=>{var i=D_({},n,{el:t});r.push(new e(i))}),r}var o=this;o.__swiper__=!0,o.support=B_(),o.device=z_({userAgent:n.userAgent}),o.browser=U_(),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:pR(n,s),on:o.on.bind(o),once:o.once.bind(o),off:o.off.bind(o),emit:o.emit.bind(o)})});var l=D_({},vR,s);return o.params=D_({},l,yR,n),o.originalParams=D_({},o.params),o.passedParams=D_({},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 m(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=O_(L_(this.slidesEl,`.${this.params.slideClass}, swiper-slide`)[0]);return O_(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=L_(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&&K_(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()):L_(i,n())[0];return!a&&t.params.createElements&&(a=R_("div",t.params.wrapperClass),i.append(a),L_(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"===F_(i,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===i.dir.toLowerCase()||"rtl"===F_(i,"direction")),wrongRTL:"-webkit-box"===F_(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?K_(t,e):e.addEventListener("load",e=>{K_(t,e.target)})}),Y_(t),t.initialized=!0,Y_(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){D_(yR,e)}},{key:"extendedDefaults",get:function(){return yR}},{key:"defaults",get:function(){return vR}},{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 wR(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function kR({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(wR(e.params.pagination.bulletClass));if(i){t.preventDefault();var n,a,r,o=O_(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=N_(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=$_(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=O_(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(wR(i.currentClass)).forEach(e=>{e.textContent=i.formatFractionCurrent(r+1)}),t.querySelectorAll(wR(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(wR(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?(j_(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=N_(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&&j_(i,r||""),"bullets"===t.type&&e.pagination.bullets.push(...i.querySelectorAll(wR(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=L_(e.el,`.${n[a]}`)[0];r||((r=R_("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=>W_(t,".swiper")[0]===e.el)),Array.isArray(t)&&1===t.length&&(t=t[0]),Object.assign(e.pagination,{el:t}),(t=N_(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=N_(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=N_(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=N_(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=N_(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=N_(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=N_(t)).forEach(t=>t.classList.remove(e.params.pagination.paginationDisabledClass)),c(),h(),d()},disable:f,render:h,update:d,init:c,destroy:m})}function SR({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||P())}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):P()};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())}}},P=()=>{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=g_();"hidden"===t.visibilityState&&(c=!0,E(!0)),"visible"===t.visibilityState&&P()}},M=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&&P())};i("init",()=>{e.params.autoplay.enabled&&(e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",M),e.el.addEventListener("pointerleave",A)),g_().addEventListener("visibilitychange",T),k())}),i("destroy",()=>{e.el&&"string"!=typeof e.el&&(e.el.removeEventListener("pointerenter",M),e.el.removeEventListener("pointerleave",A)),g_().removeEventListener("visibilitychange",T),e.autoplay.running&&S()}),i("_freeModeStaticRelease",()=>{(d||c)&&P()}),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&&P(),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:P})}function ER(e,t){var i=I_(t);return i!==t&&(i.style.backfaceVisibility="hidden",i.style["-webkit-backface-visibility"]="hidden"),i}function PR(e,t,i){var n=`swiper-slide-shadow${i?`-${i}`:""} swiper-slide-shadow-${e}`,a=I_(t),r=a.querySelector(`.${n.split(" ").join(".")}`);return r||(r=R_("div",n.split(" ")),a.append(r)),r}function TR({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,P=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(P)<.001&&(P=0);var T=`translate3d(${E}px,${S}px,${w}px) rotateX(${h(b)}deg) rotateY(${h(y)}deg) scale(${P})`;if(ER(0,f).style.transform=T,f.style.zIndex=1-Math.abs(Math.round(g)),r.slideShadows){var M=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");M||(M=PR("coverflow",f,o?"left":"top")),A||(A=PR("coverflow",f,o?"right":"bottom")),M&&(M.style.opacity=g>0?g:0),A&&(A.style.opacity=-g>0?-g:0)}}},setTransition:t=>{e.slides.map(e=>I_(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(gR).forEach(e=>{Object.keys(gR[e]).forEach(t=>{bR.prototype[t]=gR[e][t]})}),bR.use([function({swiper:e,on:t,emit:i}){var n=S_(),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=S_(),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=W_(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 MR,AR,DR=e=>e,xR=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).inFocusedState=!1,e.scaleFactor=1,e.updateSpacing=t=>{e.slideSpacing=t.detail.spacing,e.swiperInstance&&(e.swiperInstance.params.spaceBetween=e.slideSpacing,e.swiperInstance.update())},e}return y(i,fs),m(i,[{key:"connectedCallback",value:function(){M(i,"connectedCallback",this)([]),window.addEventListener("child-spacing",this.updateSpacing,!1)}},{key:"disconnectedCallback",value:function(){M(i,"disconnectedCallback",this)([]),window.removeEventListener("child-spacing",this.updateSpacing,!1)}},{key:"styles",value:function(){var e,i,n,a=this.scaleFactor,r=this.component,o=r.backgroundBlur,s=r.indicator,u=r.activeIndicator,l=r.previousSlidePadding,d=r.nextSlidePadding,h="vertical"===r.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n display: ${r.hidden?"none":"flex"};\n flex-direction: column !important;\n ${Hs(r.position)} \n width: 100%;\n bottom: -1px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n ${o?`backdrop-filter: blur(${o}px);`:""}\n z-index: ${null!==(e=r.zIndex)&&void 0!==e?e:1};\n top: 0px;\n transition: all 0.3s;\n ${Rs(r,a)}\n ${function(e,t){return`\n padding-right: ${Ps(t,e.nextSlidePadding)}px !important;\n padding-left: ${Ps(t,e.previousSlidePadding)}px !important;\n `}(r,a)}\n ${Cs(r)}\n ${xs(r,!1)}\n max-width: 100vw;\n }\n :host(:focus){\n ${xs(r,!0)}\n ${zs(r,a,!0)}\n }\n :host(:focus-visible){\n ${Xs(r)}\n }\n :host > *:not(:first-child) {\n ${h}: ${r.spacing?r.spacing*a:0}px;\n }\n .swiper-container {\n ${Ws(r,a)};\n padding-left: ${null!=l?l:0}px;\n padding-right: ${null!=d?d: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==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:r.indicatorColor} !important;\n }\n .swiper-pagination-bullet-active {\n ${null!=(null==u?void 0:u.width)?`width: ${u.width}px !important;`:""}\n ${null!=(null==u?void 0:u.height)?`height: ${u.height}px !important;`:""}\n ${null!=(null==u?void 0:u.borderRadius)?`border-radius: ${u.borderRadius}px !important;`:""}\n background: ${null!==(n=null==u?void 0:u.fillColor)&&void 0!==n?n:r.activeIndicatorColor} !important;\n }\n `)}},{key:"updated",value:function(){var e,t,i=[kR,SR],n=this.component,a=n.autoplay,r=n.autoplaySeconds,o=n.showIndicators,s=n.slideSpacing,u=n.inactiveSlideScale;u&&i.push(TR),bR.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 bR(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 Gn(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(t){var i,n;if(!t.loopSource)return[];var a,r=this.contextProvider.state,o=r.slides,s=r.selectedProducts,u="string"==typeof t.loopSource?t.loopSource:"",l=Nn(this.contextProvider.productDetails,null!==(i=null===(n=this.contextProvider.getSelectedPaywall())||void 0===n?void 0:n.sku_menus)&&void 0!==i?i:[],u),d=[];e.empty(o)||(d=""!=u?o[u].carouselName:null!==(a=t.loopSource)&&void 0!==a?a:[]);var h=this.contextProvider.filteredSkuMenus.map(e=>e.id);return d.filter(e=>!e.productGroupId||h.includes(e.productGroupId)).map(e=>{var i=l.find(t=>t.id==s[e.productGroupId]);return Gn(t.components,Gn({slide:e},{sku:v({},Bn(null==i?void 0:i.product_details,e,l))}))||[]})}},{key:"render",value:function(){var e=this.getCarouselSlides(this.component),i=this.component,n=i.focusedBorderColor,a=i.focusedFillColor,r=i.fillColor;return!n&&ia(r,a)||(this.tabIndex=0),t.html(MR||(MR=DR`
|
|
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 @@
|
|
|
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),t.html(
|
|
499
|
+
`),e.map(e=>e.map(e=>(e.spacing&&(this.slideSpacing=2*e.spacing),t.html(AR||(AR=DR`
|
|
497
500
|
<div class="swiper-slide">
|
|
498
501
|
${0}
|
|
499
|
-
</div>`),Tu(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))))))}}])}();Ae([ot({type:Object})],
|
|
502
|
+
</div>`),Tu(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))))))}}])}();Ae([ot({type:Object})],xR.prototype,"component",void 0),Ae([ot({type:Boolean})],xR.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],xR.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],xR.prototype,"minSDKVersion",void 0),xR=Ae([Fe("nami-carousel-container")],xR);var CR=function(){function e(){var t;return u(this,e),(t=s(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=()=>{Eo({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 y(e,fs),m(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,i=this.scaleFactor,n="vertical"===e.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${xs(e,!1)}\n ${Cs(e)}\n ${zs(e,i,!1)}\n }\n :host(:focus){\n ${xs(e,!0)}\n ${zs(e,i,!0)}\n }\n :host(:focus-visible){\n ${Xs(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;this.muted=null!==(e=null===(t=So.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=>Tu(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();Ae([ot({type:Object})],CR.prototype,"component",void 0),Ae([ot({type:Boolean})],CR.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],CR.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],CR.prototype,"minSDKVersion",void 0),CR=Ae([Fe("nami-volume-button")],CR);var IR=function(){function e(){var t;return u(this,e),(t=s(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=()=>{Eo({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 y(e,fs),m(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,i=this.scaleFactor,n="vertical"===e.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${xs(e,!1)}\n ${Cs(e)}\n ${zs(e,i,!1)}\n }\n :host(:focus){\n ${xs(e,!0)}\n ${zs(e,i,!0)}\n }\n :host(:focus-visible){\n ${Xs(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;return this.playing=null!==(e=null===(t=So.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=>Tu(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();Ae([ot({type:Object})],IR.prototype,"component",void 0),Ae([ot({type:Boolean})],IR.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],IR.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],IR.prototype,"minSDKVersion",void 0),IR=Ae([Fe("nami-play-pause-button")],IR);var LR=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,fs),m(e,[{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n=this.minSDKVersion,a=e.backgroundBlur,r="vertical"===e.direction,o=r?"width":"height",s=r?"margin-top":"margin-left",u=e.fillImage?t.unsafeCSS(`\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 `):t.unsafeCSS(xs(e,!1));return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${a?`backdrop-filter: blur(${a}px);`:""}\n ${u};\n ${Hs(e.position)}\n ${Cs(e)}\n ${zs(e,i,!1)}\n display: ${e.hidden?"none":"flex"};\n align-items: center;\n justify-content: center;\n }\n :host(:focus){\n ${xs(e,!0)}\n ${zs(e,i,!0)}\n }\n :host(:focus-visible){\n ${Xs(e)}\n }\n :host > *:not(nami-text) {\n position: absolute;\n }\n :host > * {\n ${Ls(n,o)}\n }\n :host > *:not(:first-child) {\n ${s}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t=this.component,i=t.focusedBorderColor,n=t.focusedFillColor,a=t.fillColor;return!i&&ia(a,n)||(this.tabIndex=0),(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>Tu(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();Ae([ot({type:Object})],LR.prototype,"component",void 0),Ae([ot({type:Boolean})],LR.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],LR.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],LR.prototype,"minSDKVersion",void 0),LR=Ae([Fe("nami-stack")],LR);var _R,RR,FR=e=>e,OR="nami-disabled",WR=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).active=!0,e.timeSpentOnPaywall=0,e.activeTemplate=null,e}return y(i,t.LitElement),m(i,[{key:"connectedCallback",value:function(){M(i,"connectedCallback",this)([]),this.minSDKVersion=e.parseToSemver(this.paywall.template.min_sdk_version),this.contextProvider=ut.create(this.paywall,this.context,this.campaign),this.contextConsumer=new rs(this,this.contextProvider),this.flow&&this.contextProvider.setFlow(this.flow),this.contextProvider.setTimeSpentOnPaywall(this.timeSpentOnPaywall),this.contextProvider.state.userInteractionEnabled||this.classList.add(OR),this.teardownEvent=this.contextProvider.onEvent("user-interaction-changed",this.userInteractionListener.bind(this))}},{key:"disconnectedCallback",value:function(){M(i,"disconnectedCallback",this)([]),ut.remove(this.contextProvider),this.teardownEvent(),this.active&&ko()}},{key:"userInteractionListener",value:function(e){this.classList.toggle(OR,!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&&(fo(this.activeTemplate),function(e){if(Wa("setActivePageRenderRoot:enter",{hasRoot:!!e,rootType:e instanceof Element?Na(e):e instanceof DocumentFragment?"document-fragment":String(e),activePageKey:ma,activePageAnnounced:ca,activeElement:Na(Ka())}),ha=e,e&&da&&!ca){var t=Ka();if(t&&"contains"in e&&e.contains(t))vo(t);else if(e instanceof DocumentFragment){var i=e.activeElement;i&&vo(i)}}}(this.renderRoot))}},{key:"postImpression",value:function(){var t,i;null!==(t=this.paywall)&&void 0!==t&&t.id&&(t=>{var i,n,a;S(function(r){for(;;)switch(r.p=r.n){case 0:if(!e.isAnonymousMode()){r.n=1;break}return e.logger.info("Skipping paywall impression - anonymous mode"),r.a(2);case 1:return(i=e.storageService.getSessionId())&&(t.session=i),(n=e.storageService.getLaunchId())&&(t.launch_id=n),t.app_env="production",t.url_params=e.getUrlParams(),e.logger.info("Post paywall impression - segment ",t.segment),r.p=2,r.n=3,o(e.NamiAPI.instance.postImpression(t));case 3:r.n=5;break;case 4:r.p=4,a=r.v,e.logger.error("Error posting impression",a);case 5:return r.a(2)}},null,null,[[2,4]],Promise)})({segment:null===(i=this.campaign)||void 0===i?void 0:i.segment,call_to_action:this.paywall.id})}},{key:"postPaywallScreenData",value:function(){e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,v({},this.contextProvider.getPaywallActionEventData(),{action:e.NamiPaywallAction.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&&fo(a),a}},{key:"render",value:function(){var i,n=this.getTemplate(),a=n.backgroundContainer,r=n.header,o=void 0===r?[]:r,s=n.footer,u=void 0===s?[]:s,l=n.contentContainer,d=null!==(i=this.contextProvider.state.fullScreenPresentation)&&void 0!==i&&i,h=this.contextProvider.getFormFactor(),c=e.getDeviceScaleFactor(h);return t.html(_R||(_R=FR`
|
|
500
503
|
<nami-background-container
|
|
501
504
|
.component=${0}
|
|
502
505
|
.scaleFactor=${0}
|
|
@@ -520,7 +523,7 @@
|
|
|
520
523
|
.scaleFactor=${0}
|
|
521
524
|
.minSDKVersion=${0}
|
|
522
525
|
></nami-footer>
|
|
523
|
-
`),a,c,this.minSDKVersion,o,h,c,d,this.minSDKVersion,l,c,h,this.minSDKVersion,u,c,this.minSDKVersion)}}])}();
|
|
526
|
+
`),a,c,this.minSDKVersion,o,h,c,d,this.minSDKVersion,l,c,h,this.minSDKVersion,u,c,this.minSDKVersion)}}])}();WR.styles=t.css(RR||(RR=FR`
|
|
524
527
|
:host {
|
|
525
528
|
display: flex;
|
|
526
529
|
flex-direction: column;
|
|
@@ -529,15 +532,15 @@
|
|
|
529
532
|
min-height: 0;
|
|
530
533
|
overflow: hidden;
|
|
531
534
|
}
|
|
532
|
-
`)),Ae([ot({type:Object})],RR.prototype,"paywall",void 0),Ae([ot({type:Object})],RR.prototype,"campaign",void 0),Ae([ot({type:Object})],RR.prototype,"context",void 0),Ae([ot({type:Boolean})],RR.prototype,"active",void 0),Ae([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 as(this,{context:e,initialValue:t})),t}};t.constructor.addInitializer(t=>{n.set(t,new as(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=v({},r,{set(e){n.get(this).setValue(e),null==s||s.call(this,e)}})}Object.defineProperty(t,i,a)}}({context:os})],RR.prototype,"contextProvider",void 0),RR=Ae([Fe("nami-paywall-screen")],RR);var FR,OR,WR={};function $R(){return OR?FR:(OR=1,FR=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var NR,jR={},BR={};function zR(){if(NR)return BR;var e;NR=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 BR.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},BR.getSymbolTotalCodewords=function(e){return t[e]},BR.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},BR.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},BR.isKanjiModeEnabled=function(){return void 0!==e},BR.toSJIS=function(t){return e(t)},BR}var UR,HR,GR,VR,KR,XR={};function YR(){return UR||(UR=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}}}(XR)),XR}var qR,JR={};var QR,ZR={};var eF,tF={};var iF,nF={};function aF(){if(iF)return nF;iF=1;var e=YR(),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 nF.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}},nF.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}},nF}var rF,oF,sF,uF,lF={},dF={};function hF(){return oF||(oF=1,function(e){var t=function(){if(rF)return dF;rF=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]}(),dF.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},dF.exp=function(t){return e[t]},dF.mul=function(i,n){return 0===i||0===n?0:e[t[i]+t[n]]},dF}();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}}(lF)),lF}var cF,mF={},fF={},vF={};function pF(){return cF||(cF=1,vF.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),vF}var gF,yF,bF,wF={};function kF(){if(gF)return wF;gF=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]))+";wF.KANJI=new RegExp(t,"g"),wF.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),wF.BYTE=new RegExp(i,"g"),wF.NUMERIC=new RegExp(e,"g"),wF.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var n=new RegExp("^"+t+"$"),a=new RegExp("^"+e+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return wF.testKanji=function(e){return n.test(e)},wF.testNumeric=function(e){return a.test(e)},wF.testAlphanumeric=function(e){return r.test(e)},wF}function SF(){return yF||(yF=1,function(e){var t=pF(),i=kF();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}}}(fF)),fF}function EF(){return bF||(bF=1,function(e){var t=zR(),i=aF(),n=YR(),a=SF(),r=pF(),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}}(mF)),mF}var PF,TF={};var MF,AF,DF,xF,CF,IF,LF,_F,RF={};var FF,OF,WF,$F={exports:{}};function NF(){return FF||(FF=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}($F)),$F.exports}function jF(){return OF||(OF=1,function(e){var t=SF(),i=function(){if(AF)return MF;AF=1;var e=SF();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))},MF=t}(),n=function(){if(xF)return DF;xF=1;var e=SF(),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)},DF=i}(),a=function(){if(IF)return CF;IF=1;var e=SF();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)},CF=t}(),r=function(){if(_F)return LF;_F=1;var e=SF(),t=zR();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)}},LF=i}(),o=kF(),s=zR(),u=NF();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()))}}(RF)),RF}function BF(){if(WF)return jR;WF=1;var e=zR(),t=YR(),i=function(){if(GR)return HR;function e(){this.buffer=[],this.length=0}return GR=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++}},HR=e}(),n=function(){if(KR)return VR;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 KR=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]},VR=e}(),a=(qR||(qR=1,function(e){var t=zR().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}}(JR)),JR),r=function(){if(QR)return ZR;QR=1;var e=zR().getSymbolSize;return ZR.getPositions=function(t){var i=e(t);return[[0,0],[i-7,0],[0,i-7]]},ZR}(),o=(eF||(eF=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}}(tF)),tF),s=aF(),u=function(){if(uF)return sF;uF=1;var e=hF();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},sF=t}(),l=EF(),d=function(){if(PF)return TF;PF=1;var e=zR(),t=e.getBCHDigit(1335);return TF.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)},TF}(),h=SF(),c=jF();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,P,T=new Uint8Array(a),M=0;for(E=0;E<b;E++)for(P=0;P<l;P++)E<g[P].length&&(T[M++]=g[P][E]);for(E=0;E<f;E++)for(P=0;P<l;P++)T[M++]=y[P][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 jR.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)},jR}var zF,UF,HF={},GF={};function VF(){return zF||(zF=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}}}(GF)),GF}function KF(){return UF||(UF=1,function(e){var t=VF();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)}}(HF)),HF}var XF,YF,qF={};function JF(){if(XF)return qF;XF=1;var e=VF();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 qF.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},qF}var QF,ZF,eO=function(){if(YF)return WR;YF=1;var e=$R(),t=BF(),i=KF(),n=JF();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 WR.create=t.create,WR.toCanvas=a.bind(null,i.render),WR.toDataURL=a.bind(null,i.renderToDataURL),WR.toString=a.bind(null,function(e,t,i){return n.render(e,i)}),WR}(),tO=be(eO),iO=e=>e,nO=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).scaleFactor=1,e}return y(i,fs),m(i,[{key:"styles",value:function(){var e;return this.component?t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n ${Ws(this.component,this.scaleFactor)}\n ${Rs(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 ${As(this.component.borderColor||"transparent")}\n border-style: solid;\n display: inline-block;\n }`):t.unsafeCSS(":host { box-sizing: border-box; display: inline-block; }")}},{key:"renderQr",value:function(){var t,i,n,a,r,s,u,l;return S(function(d){for(;;)switch(d.p=d.n){case 0:if((a=this.renderRoot.querySelector("canvas"))&&null!==(t=this.component)&&void 0!==t&&t.url){d.n=1;break}return d.a(2);case 1:return r=this.computedSize,a.width=r,a.height=r,a.style.width=`${r}px`,a.style.height=`${r}px`,s=null!==(i=ta(this.component.color))&&void 0!==i?i:"#000000",u=null!==(n=ta(this.component.fillColor))&&void 0!==n?n:"#ffffff",d.p=2,d.n=3,o(tO.toCanvas(a,this.component.url,{width:r,color:{dark:s,light:u},margin:0}));case 3:d.n=5;break;case 4:d.p=4,l=d.v,e.logger.error(`QR render failed for URL "${this.component.url}":`,l);case 5:return d.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 t.html(QF||(QF=iO`<canvas width="${0}" height="${0}" style="width:${0}px;height:${0}px;"></canvas>`),e,e,e,e)}return t.html(ZF||(ZF=iO`<canvas></canvas>`))}}])}();Ae([ot({type:Object})],nO.prototype,"component",void 0),Ae([ot({type:Number})],nO.prototype,"scaleFactor",void 0),nO=Ae([Fe("nami-qr-code")],nO);var aO,rO=e=>e,oO=function(){function i(){var e;return u(this,i),(e=s(this,i)).inFocusedState=!1,e.scaleFactor=1,e.isActive=!1,e._handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key||e._handleClick()},e}return y(i,fs),m(i,[{key:"connectedCallback",value:function(){M(i,"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(){M(i,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown)}},{key:"_handleClick",value:function(){var t=this.component,i=t.onTap,n=t.disabled,a=t.formId;if(!0!==n){this.component.checked=!this.component.checked,this.isActive=this.component.checked;var r=void 0;r=a?{function:(null==i?void 0:i.function)||"",parameters:v({},null==i?void 0:i.parameters,{formId:a||""})}:i,!this.contextProvider.flow||a?Eo({onTap:r,contextProvider:this.contextProvider}):this.component.id?(e.logger.debug(`Trigger NamiFlow action for component ${this.component.id}`),this.contextProvider.flow.triggerActions(this.component.id)):e.logger.warn("Cannot trigger button hoisting without an id")}}},{key:"styles",value:function(){return t.unsafeCSS(`\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 ${Ws(e,t)};\n ${As(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 ${Ms(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 ${As(n)}\n border-width: ${t?e.activeHandleBorderWidth||0:e.inactiveHandleBorderWidth||0}px !important;\n ${Ns(e.dropShadow)}\n border-style: solid;\n left: ${t?"50%":0};\n ${Ms(i)}\n `}},{key:"render",value:function(){return this.tabIndex=0,this.role="switch",t.html(aO||(aO=rO`
|
|
535
|
+
`)),Ae([ot({type:Object})],WR.prototype,"paywall",void 0),Ae([ot({type:Object})],WR.prototype,"campaign",void 0),Ae([ot({type:Object})],WR.prototype,"context",void 0),Ae([ot({type:Boolean})],WR.prototype,"active",void 0),Ae([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 as(this,{context:e,initialValue:t})),t}};t.constructor.addInitializer(t=>{n.set(t,new as(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=v({},r,{set(e){n.get(this).setValue(e),null==s||s.call(this,e)}})}Object.defineProperty(t,i,a)}}({context:os})],WR.prototype,"contextProvider",void 0),WR=Ae([Fe("nami-paywall-screen")],WR);var $R,NR,jR={};function BR(){return NR?$R:(NR=1,$R=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var zR,UR={},HR={};function GR(){if(zR)return HR;var e;zR=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 HR.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},HR.getSymbolTotalCodewords=function(e){return t[e]},HR.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},HR.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},HR.isKanjiModeEnabled=function(){return void 0!==e},HR.toSJIS=function(t){return e(t)},HR}var VR,KR,XR,YR,qR,JR={};function QR(){return VR||(VR=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}}}(JR)),JR}var ZR,eF={};var tF,iF={};var nF,aF={};var rF,oF={};function sF(){if(rF)return oF;rF=1;var e=QR(),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 oF.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}},oF.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}},oF}var uF,lF,dF,hF,cF={},mF={};function fF(){return lF||(lF=1,function(e){var t=function(){if(uF)return mF;uF=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]}(),mF.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},mF.exp=function(t){return e[t]},mF.mul=function(i,n){return 0===i||0===n?0:e[t[i]+t[n]]},mF}();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}}(cF)),cF}var vF,pF={},gF={},yF={};function bF(){return vF||(vF=1,yF.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),yF}var wF,kF,SF,EF={};function PF(){if(wF)return EF;wF=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]))+";EF.KANJI=new RegExp(t,"g"),EF.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),EF.BYTE=new RegExp(i,"g"),EF.NUMERIC=new RegExp(e,"g"),EF.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var n=new RegExp("^"+t+"$"),a=new RegExp("^"+e+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return EF.testKanji=function(e){return n.test(e)},EF.testNumeric=function(e){return a.test(e)},EF.testAlphanumeric=function(e){return r.test(e)},EF}function TF(){return kF||(kF=1,function(e){var t=bF(),i=PF();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}}}(gF)),gF}function MF(){return SF||(SF=1,function(e){var t=GR(),i=sF(),n=QR(),a=TF(),r=bF(),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}}(pF)),pF}var AF,DF={};var xF,CF,IF,LF,_F,RF,FF,OF,WF={};var $F,NF,jF,BF={exports:{}};function zF(){return $F||($F=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}(BF)),BF.exports}function UF(){return NF||(NF=1,function(e){var t=TF(),i=function(){if(CF)return xF;CF=1;var e=TF();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))},xF=t}(),n=function(){if(LF)return IF;LF=1;var e=TF(),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)},IF=i}(),a=function(){if(RF)return _F;RF=1;var e=TF();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)},_F=t}(),r=function(){if(OF)return FF;OF=1;var e=TF(),t=GR();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)}},FF=i}(),o=PF(),s=GR(),u=zF();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()))}}(WF)),WF}function HF(){if(jF)return UR;jF=1;var e=GR(),t=QR(),i=function(){if(XR)return KR;function e(){this.buffer=[],this.length=0}return XR=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++}},KR=e}(),n=function(){if(qR)return YR;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 qR=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]},YR=e}(),a=(ZR||(ZR=1,function(e){var t=GR().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}}(eF)),eF),r=function(){if(tF)return iF;tF=1;var e=GR().getSymbolSize;return iF.getPositions=function(t){var i=e(t);return[[0,0],[i-7,0],[0,i-7]]},iF}(),o=(nF||(nF=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}}(aF)),aF),s=sF(),u=function(){if(hF)return dF;hF=1;var e=fF();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},dF=t}(),l=MF(),d=function(){if(AF)return DF;AF=1;var e=GR(),t=e.getBCHDigit(1335);return DF.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)},DF}(),h=TF(),c=UF();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,P,T=new Uint8Array(a),M=0;for(E=0;E<b;E++)for(P=0;P<l;P++)E<g[P].length&&(T[M++]=g[P][E]);for(E=0;E<f;E++)for(P=0;P<l;P++)T[M++]=y[P][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 UR.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)},UR}var GF,VF,KF={},XF={};function YF(){return GF||(GF=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}}}(XF)),XF}function qF(){return VF||(VF=1,function(e){var t=YF();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)}}(KF)),KF}var JF,QF,ZF={};function eO(){if(JF)return ZF;JF=1;var e=YF();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 ZF.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},ZF}var tO,iO,nO=function(){if(QF)return jR;QF=1;var e=BR(),t=HF(),i=qF(),n=eO();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 jR.create=t.create,jR.toCanvas=a.bind(null,i.render),jR.toDataURL=a.bind(null,i.renderToDataURL),jR.toString=a.bind(null,function(e,t,i){return n.render(e,i)}),jR}(),aO=be(nO),rO=e=>e,oO=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).scaleFactor=1,e}return y(i,fs),m(i,[{key:"styles",value:function(){var e;return this.component?t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n ${Ws(this.component,this.scaleFactor)}\n ${Rs(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 ${As(this.component.borderColor||"transparent")}\n border-style: solid;\n display: inline-block;\n }`):t.unsafeCSS(":host { box-sizing: border-box; display: inline-block; }")}},{key:"renderQr",value:function(){var t,i,n,a,r,s,u,l;return S(function(d){for(;;)switch(d.p=d.n){case 0:if((a=this.renderRoot.querySelector("canvas"))&&null!==(t=this.component)&&void 0!==t&&t.url){d.n=1;break}return d.a(2);case 1:return r=this.computedSize,a.width=r,a.height=r,a.style.width=`${r}px`,a.style.height=`${r}px`,s=null!==(i=ta(this.component.color))&&void 0!==i?i:"#000000",u=null!==(n=ta(this.component.fillColor))&&void 0!==n?n:"#ffffff",d.p=2,d.n=3,o(aO.toCanvas(a,this.component.url,{width:r,color:{dark:s,light:u},margin:0}));case 3:d.n=5;break;case 4:d.p=4,l=d.v,e.logger.error(`QR render failed for URL "${this.component.url}":`,l);case 5:return d.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 t.html(tO||(tO=rO`<canvas width="${0}" height="${0}" style="width:${0}px;height:${0}px;"></canvas>`),e,e,e,e)}return t.html(iO||(iO=rO`<canvas></canvas>`))}}])}();Ae([ot({type:Object})],oO.prototype,"component",void 0),Ae([ot({type:Number})],oO.prototype,"scaleFactor",void 0),oO=Ae([Fe("nami-qr-code")],oO);var sO,uO=e=>e,lO=function(){function i(){var e;return u(this,i),(e=s(this,i)).inFocusedState=!1,e.scaleFactor=1,e.isActive=!1,e._handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key||e._handleClick()},e}return y(i,fs),m(i,[{key:"connectedCallback",value:function(){M(i,"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(){M(i,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown)}},{key:"_handleClick",value:function(){var t=this.component,i=t.onTap,n=t.disabled,a=t.formId;if(!0!==n){this.component.checked=!this.component.checked,this.isActive=this.component.checked;var r=void 0;r=a?{function:(null==i?void 0:i.function)||"",parameters:v({},null==i?void 0:i.parameters,{formId:a||""})}:i,!this.contextProvider.flow||a?Eo({onTap:r,contextProvider:this.contextProvider}):this.component.id?(e.logger.debug(`Trigger NamiFlow action for component ${this.component.id}`),this.contextProvider.flow.triggerActions(this.component.id)):e.logger.warn("Cannot trigger button hoisting without an id")}}},{key:"styles",value:function(){return t.unsafeCSS(`\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 ${Ws(e,t)};\n ${As(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 ${Ms(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 ${As(n)}\n border-width: ${t?e.activeHandleBorderWidth||0:e.inactiveHandleBorderWidth||0}px !important;\n ${Ns(e.dropShadow)}\n border-style: solid;\n left: ${t?"50%":0};\n ${Ms(i)}\n `}},{key:"render",value:function(){return this.tabIndex=0,this.role="switch",t.html(sO||(sO=uO`
|
|
533
536
|
<div class="toggle-plate">
|
|
534
537
|
<div class="toggle-handle"></div>
|
|
535
538
|
</div>
|
|
536
|
-
`))}}])}();Ae([ot({type:Object})],
|
|
539
|
+
`))}}])}();Ae([ot({type:Object})],lO.prototype,"component",void 0),Ae([ot({type:Boolean})],lO.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],lO.prototype,"scaleFactor",void 0),Ae([ot({type:Boolean})],lO.prototype,"isActive",void 0),lO=Ae([Fe("nami-toggle-switch")],lO);var dO,hO=e=>e,cO=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t.tabIndex=0,t}return y(e,fs),m(e,[{key:"styles",value:function(){var e=this.component;return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n }\n :host .radio-button-wrapper {\n display: flex;\n transition: all 0.3s;\n ${Ws(e,this.scaleFactor)}\n ${As(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 ${As(e.activeBorderColor||"transparent")}\n border-width: ${e.activeBorderWidth||0}px !important;\n ${Ns(e.dropShadow)}\n }\n :host .radio-button-inner {\n ${Ms(e.inactiveFillColor||"transparent")}\n width: 100%;\n height: 100%;\n border-radius: 100%;\n }\n :host .radio-button-wrapper.active .radio-button-inner {\n ${Ms(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 t.html(dO||(dO=hO`
|
|
537
540
|
<div class="radio-button-wrapper ${0}">
|
|
538
541
|
<div class="radio-button-inner"></div>
|
|
539
542
|
</div>
|
|
540
|
-
`),e)}}])}();Ae([ot({type:Object})],
|
|
543
|
+
`),e)}}])}();Ae([ot({type:Object})],cO.prototype,"component",void 0),Ae([ot({type:Boolean})],cO.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],cO.prototype,"scaleFactor",void 0),cO=Ae([Fe("nami-radio-button")],cO);var mO,fO=e=>e,vO=e._internal.NamiFlowManager,pO=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).scaleFactor=1,e.inFocusedState=!1,e.currentWidth=0,e.hasInitialized=!1,e}return y(i,fs),m(i,[{key:"connectedCallback",value:function(){M(i,"connectedCallback",this)([]),e.validateMinSDKVersion(this.minSDKVersion,"ProgressIndicator")}},{key:"firstUpdated",value:function(e){var t;M(i,"firstUpdated",this)([e]),this.currentWidth=100*vO.getLastAnimatedFlowProgress((null===(t=this.component)||void 0===t?void 0:t.id)||"default"),this.hasInitialized=!0,this.animateProgress(!0)}},{key:"updated",value:function(e){M(i,"updated",this)([e]),this.hasInitialized&&this.animateProgress(!1)}},{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n=this.inFocusedState,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;return t.unsafeCSS(`\n :host {\n display: ${e.hidden?"none":"block"};\n ${zs(e,i,n)}\n }\n \n .progress-container {\n ${Ws(e,i)} \n background: ${a||r};\n border-radius: ${o||0}px;\n overflow: hidden;\n position: relative;\n padding: ${h*i}px;\n box-sizing: border-box;\n ${Ns(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 transition: width 0.8s ease-in-out;\n ${Ns(c)}\n }\n `)}},{key:"getProgressPercentage",value:function(){var e,t=null!==(e=this.component.percentage)&&void 0!==e?e:0;return"auto"===t&&(t=vO.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&&vO.setLastAnimatedFlowProgress(i||"default",a/100)};e?requestAnimationFrame(()=>requestAnimationFrame(r)):requestAnimationFrame(r)}}},{key:"render",value:function(){return t.html(mO||(mO=fO`
|
|
541
544
|
<div class="progress-container">
|
|
542
545
|
<div
|
|
543
546
|
class="progress-bar"
|
|
@@ -548,20 +551,20 @@
|
|
|
548
551
|
aria-valuemax="100"
|
|
549
552
|
></div>
|
|
550
553
|
</div>
|
|
551
|
-
`),this.currentWidth,Math.round(this.currentWidth))}}])}();Ae([ot({type:Object})],mO.prototype,"component",void 0),Ae([ot({type:Number})],mO.prototype,"scaleFactor",void 0),Ae([ot({type:Boolean})],mO.prototype,"inFocusedState",void 0),Ae([ot({type:Object})],mO.prototype,"minSDKVersion",void 0),Ae([ot({type:Number})],mO.prototype,"currentWidth",void 0),mO=Ae([Fe("nami-progress-indicator")],mO);var fO=function(){function e(){var t;return u(this,e),(t=s(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 y(e,fs),m(e,[{key:"connectedCallback",value:function(){M(e,"connectedCallback",this)([]),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){M(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:v({},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})};Eo({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,i=this.contextProvider.getCurrentFormId(e.formId||""),n=!0===i||i===e.value;this.inFocusedState=n;var a=n?e.activeFillColor||e.activeFillColorFallback||"transparent":e.inactiveFillColor||e.inactiveFillColorFallback||"transparent",r=n?e.activeBorderColor||"transparent":e.inactiveBorderColor||"transparent";return t.unsafeCSS(`\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 ${zs(e,this.scaleFactor,this.inFocusedState)}\n ${As(r)}\n border-width: ${n?e.activeBorderWidth||0:e.inactiveBorderWidth||0}px !important;\n ${Ns(n?e.activeDropShadow:e.inactiveDropShadow)};\n border-style: solid;\n ${Ms(a)}\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.component.components.map(e=>Tu(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();Ae([ot({type:Object})],fO.prototype,"component",void 0),Ae([ot({type:Boolean})],fO.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],fO.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],fO.prototype,"minSDKVersion",void 0),Ae([ot({type:Boolean})],fO.prototype,"isActive",void 0),fO=Ae([Fe("nami-toggle-button")],fO);var vO,pO,gO,yO,bO,wO,kO,SO,EO,PO=e=>e,TO=EO=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).inFocusedState=!1,e.scaleFactor=1,e.timer=null,e.startTime=0,e.initialDuration=0,e.hasEmittedCompletion=!1,e}return y(i,fs),m(i,[{key:"firstUpdated",value:function(){this.loadTimerState(),this.startTimer()}},{key:"disconnectedCallback",value:function(){M(i,"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(),EO.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||EO.DEFAULT_UNITS,n=i.days,a=i.hours,r=i.minutes,o=i.seconds;return v({},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/EO.SECONDS_PER_DAY):0,n=e-i*EO.SECONDS_PER_DAY,a=t.hours?Math.floor(n/EO.SECONDS_PER_HOUR):0,r=n-a*EO.SECONDS_PER_HOUR,o=t.minutes?Math.floor(r/EO.SECONDS_PER_MINUTE):0,s=r-o*EO.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,e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,v({},this.contextProvider.getPaywallActionEventData(),{action:e.NamiPaywallAction.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,i=e.labels,n=e.separator,a=e.labelPosition,r=void 0===a?"none":a,o=e.direction,s=void 0===o?"horizontal":o,u=e.labelFontSize,l=e.labelFontColor,d=e.labelFontName,h=e.labelSpacing,c=e.spacing,m=e.fontSize,f=e.fontColor,v=e.fontName,p=e.alignment,g="below"===r?"bottom":"above"===r?"top":r,y="vertical"===s,b=i&&(i.days||i.hours||i.minutes||i.seconds)||"none"!==g;return t.unsafeCSS(`\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: ${y?"column":"row"};\n align-items: center;\n justify-content: flex-start;\n ${xs(e,this.inFocusedState)}\n ${Rs(e,this.scaleFactor)}\n ${Os(e,this.scaleFactor,this.inFocusedState)}\n ${Is(e)}\n ${Ws(e,this.scaleFactor)}\n }\n .timer-text {\n display: flex;\n flex-direction: ${y?"column":"row"};\n align-items: center;\n gap: ${y?c?c*this.scaleFactor:4:0}px;\n }\n .timer-unit {\n display: flex;\n flex-direction: ${"top"===g||"bottom"===g?"column":"row"};\n align-items: center;\n ${y?`margin-top: ${c?c*this.scaleFactor:4}px;`:`margin-right: ${c?c*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 ${m?`font-size: ${m*this.scaleFactor}px;`:""}\n ${f?Ds(f):""}\n ${Bs(v)}\n ${p?`text-align: ${p};`:""}\n ${Ns(e.dropShadow,!0)}\n line-height: 1;\n }\n .timer-text-value-label {\n font-size: ${u?u*this.scaleFactor:12*this.scaleFactor}px;\n color: ${l||"inherit"};\n ${Bs(d)}\n ${"top"===g?`margin-bottom: ${h?h*this.scaleFactor:2}px;`:""}\n ${"bottom"===g?`margin-top: ${h?h*this.scaleFactor:2}px;`:""}\n ${b?"":"display: none;"}\n }\n .timer-text-value-separator {\n ${n?`\n display: flex;\n align-items: center;\n ${m?`font-size: ${m*this.scaleFactor}px;`:""}\n ${f?Ds(f):""}\n ${Bs(v)}\n line-height: 1;\n ${y?`margin-top: ${c?c*this.scaleFactor:4}px;`:`margin-right: ${c?c*this.scaleFactor:4}px;`} \n ${"bottom"===g||"top"===g?"align-self: flex-start;":""}\n `:"display: none;"}\n }\n `)}},{key:"render",value:function(){this.tabIndex=0;var e=this.component.showWhenCompleted,i=void 0===e?"zero":e,n=this.calculateTimeValues();if(n.isCompleted&&(this.emitCompletionEvent(),"hidden"===i))return t.html(vO||(vO=PO``));var a=this.buildUnitsToRender(n);return 0===a.length?t.html(pO||(pO=PO`<div class="timer-text"></div>`)):this.renderTimerUnits(a)}},{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?EO.DEFAULT_LABELS[e]:""}},{key:"renderTimerUnits",value:function(e){var i=this.component,n=i.separator,a=i.zeroPad,r=void 0===a||a,o=i.labelPosition,s=void 0===o?"none":o,u=this.component.labels,l=this.normalizeLabelPosition(s),d=u&&(u.days||u.hours||u.minutes||u.seconds),h=Boolean(d||"none"!==l),c=null!=n?n:":";return t.html(gO||(gO=PO`
|
|
554
|
+
`),this.currentWidth,Math.round(this.currentWidth))}}])}();Ae([ot({type:Object})],pO.prototype,"component",void 0),Ae([ot({type:Number})],pO.prototype,"scaleFactor",void 0),Ae([ot({type:Boolean})],pO.prototype,"inFocusedState",void 0),Ae([ot({type:Object})],pO.prototype,"minSDKVersion",void 0),Ae([ot({type:Number})],pO.prototype,"currentWidth",void 0),pO=Ae([Fe("nami-progress-indicator")],pO);var gO=function(){function e(){var t;return u(this,e),(t=s(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 y(e,fs),m(e,[{key:"connectedCallback",value:function(){M(e,"connectedCallback",this)([]),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){M(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:v({},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})};Eo({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,i=this.contextProvider.getCurrentFormId(e.formId||""),n=!0===i||i===e.value;this.inFocusedState=n;var a=n?e.activeFillColor||e.activeFillColorFallback||"transparent":e.inactiveFillColor||e.inactiveFillColorFallback||"transparent",r=n?e.activeBorderColor||"transparent":e.inactiveBorderColor||"transparent";return t.unsafeCSS(`\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 ${zs(e,this.scaleFactor,this.inFocusedState)}\n ${As(r)}\n border-width: ${n?e.activeBorderWidth||0:e.inactiveBorderWidth||0}px !important;\n ${Ns(n?e.activeDropShadow:e.inactiveDropShadow)};\n border-style: solid;\n ${Ms(a)}\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.component.components.map(e=>Tu(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();Ae([ot({type:Object})],gO.prototype,"component",void 0),Ae([ot({type:Boolean})],gO.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],gO.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],gO.prototype,"minSDKVersion",void 0),Ae([ot({type:Boolean})],gO.prototype,"isActive",void 0),gO=Ae([Fe("nami-toggle-button")],gO);var yO,bO,wO,kO,SO,EO,PO,TO,MO,AO=e=>e,DO=MO=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).inFocusedState=!1,e.scaleFactor=1,e.timer=null,e.startTime=0,e.initialDuration=0,e.hasEmittedCompletion=!1,e}return y(i,fs),m(i,[{key:"firstUpdated",value:function(){this.loadTimerState(),this.startTimer()}},{key:"disconnectedCallback",value:function(){M(i,"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 v({},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,e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,v({},this.contextProvider.getPaywallActionEventData(),{action:e.NamiPaywallAction.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,i=e.labels,n=e.separator,a=e.labelPosition,r=void 0===a?"none":a,o=e.direction,s=void 0===o?"horizontal":o,u=e.labelFontSize,l=e.labelFontColor,d=e.labelFontName,h=e.labelSpacing,c=e.spacing,m=e.fontSize,f=e.fontColor,v=e.fontName,p=e.alignment,g="below"===r?"bottom":"above"===r?"top":r,y="vertical"===s,b=i&&(i.days||i.hours||i.minutes||i.seconds)||"none"!==g;return t.unsafeCSS(`\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: ${y?"column":"row"};\n align-items: center;\n justify-content: flex-start;\n ${xs(e,this.inFocusedState)}\n ${Rs(e,this.scaleFactor)}\n ${Os(e,this.scaleFactor,this.inFocusedState)}\n ${Is(e)}\n ${Ws(e,this.scaleFactor)}\n }\n .timer-text {\n display: flex;\n flex-direction: ${y?"column":"row"};\n align-items: center;\n gap: ${y?c?c*this.scaleFactor:4:0}px;\n }\n .timer-unit {\n display: flex;\n flex-direction: ${"top"===g||"bottom"===g?"column":"row"};\n align-items: center;\n ${y?`margin-top: ${c?c*this.scaleFactor:4}px;`:`margin-right: ${c?c*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 ${m?`font-size: ${m*this.scaleFactor}px;`:""}\n ${f?Ds(f):""}\n ${Bs(v)}\n ${p?`text-align: ${p};`:""}\n ${Ns(e.dropShadow,!0)}\n line-height: 1;\n }\n .timer-text-value-label {\n font-size: ${u?u*this.scaleFactor:12*this.scaleFactor}px;\n color: ${l||"inherit"};\n ${Bs(d)}\n ${"top"===g?`margin-bottom: ${h?h*this.scaleFactor:2}px;`:""}\n ${"bottom"===g?`margin-top: ${h?h*this.scaleFactor:2}px;`:""}\n ${b?"":"display: none;"}\n }\n .timer-text-value-separator {\n ${n?`\n display: flex;\n align-items: center;\n ${m?`font-size: ${m*this.scaleFactor}px;`:""}\n ${f?Ds(f):""}\n ${Bs(v)}\n line-height: 1;\n ${y?`margin-top: ${c?c*this.scaleFactor:4}px;`:`margin-right: ${c?c*this.scaleFactor:4}px;`} \n ${"bottom"===g||"top"===g?"align-self: flex-start;":""}\n `:"display: none;"}\n }\n `)}},{key:"render",value:function(){this.tabIndex=0;var e=this.component.showWhenCompleted,i=void 0===e?"zero":e,n=this.calculateTimeValues();if(n.isCompleted&&(this.emitCompletionEvent(),"hidden"===i))return t.html(yO||(yO=AO``));var a=this.buildUnitsToRender(n);return 0===a.length?t.html(bO||(bO=AO`<div class="timer-text"></div>`)):this.renderTimerUnits(a)}},{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 i=this.component,n=i.separator,a=i.zeroPad,r=void 0===a||a,o=i.labelPosition,s=void 0===o?"none":o,u=this.component.labels,l=this.normalizeLabelPosition(s),d=u&&(u.days||u.hours||u.minutes||u.seconds),h=Boolean(d||"none"!==l),c=null!=n?n:":";return t.html(wO||(wO=AO`
|
|
552
555
|
<div class="timer-text">
|
|
553
556
|
${0}
|
|
554
557
|
</div>
|
|
555
|
-
`),e.map((i,n)=>t.html(
|
|
558
|
+
`),e.map((i,n)=>t.html(kO||(kO=AO`
|
|
556
559
|
${0}
|
|
557
560
|
${0}
|
|
558
|
-
`),this.renderUnit(i.value,i.label,i.unitClass,i.showUnit,r,l,h),n<e.length-1&&c?t.html(
|
|
561
|
+
`),this.renderUnit(i.value,i.label,i.unitClass,i.showUnit,r,l,h),n<e.length-1&&c?t.html(SO||(SO=AO`<span class="timer-text-value-separator">${0}</span>`),c):"")))}},{key:"renderUnit",value:function(e,i,n,a,r,o,s){if(!a)return null;var u=Boolean(i&&s);return t.html(EO||(EO=AO`
|
|
559
562
|
<div class="timer-unit">
|
|
560
563
|
${0}
|
|
561
564
|
<span class="${0}">${0}</span>
|
|
562
565
|
${0}
|
|
563
566
|
</div>
|
|
564
|
-
`),u&&"top"===o?t.html(
|
|
567
|
+
`),u&&"top"===o?t.html(PO||(PO=AO`<span class="timer-text-value-label">${0}</span>`),i):"",n,this.formatValue(e,r),u&&"bottom"===o?t.html(TO||(TO=AO`<span class="timer-text-value-label">${0}</span>`),i):"")}}])}();DO.DEFAULT_LABELS={days:"days",hours:"hours",minutes:"minutes",seconds:"seconds"},DO.DEFAULT_UNITS={days:!1,hours:!0,minutes:!0,seconds:!0},DO.SECONDS_PER_DAY=86400,DO.SECONDS_PER_HOUR=3600,DO.SECONDS_PER_MINUTE=60,DO.TIMER_INTERVAL_MS=1e3,Ae([ot({type:Object})],DO.prototype,"component",void 0),Ae([ot({type:Boolean})],DO.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],DO.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],DO.prototype,"minSDKVersion",void 0),DO=MO=Ae([Fe("nami-countdown-timer-text")],DO);var xO,CO=e=>e,IO=e._internal.NamiFlowManager,LO=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).scaleFactor=1,e.inFocusedState=!1,e.currentProgress=0,e.isAnimating=!1,e.screenreaderAnnouncement="",e.hasInitialized=!1,e.delayTimeoutId=null,e.animationFrameId=null,e.animationStartTime=null,e.startPercentage=0,e}return y(i,fs),m(i,[{key:"connectedCallback",value:function(){M(i,"connectedCallback",this)([]),e.validateMinSDKVersion(this.minSDKVersion,"ProgressBar")}},{key:"disconnectedCallback",value:function(){M(i,"disconnectedCallback",this)([]),this.cleanup()}},{key:"firstUpdated",value:function(e){M(i,"firstUpdated",this)([e]),this.hasInitialized=!0,this.startAnimation()}},{key:"updated",value:function(e){M(i,"updated",this)([e]),this.hasInitialized&&e.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=IO.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,i=this.scaleFactor,n=this.inFocusedState,a=e.mode,r=e.inactiveFillColor,o=e.inactiveFillColorFallback,s=e.inactiveBorderRadius,u=e.activeFillColor,l=e.activeFillColorFallback,d=e.activeBorderRadius,h=e.innerPadding,c=void 0===h?0:h,m=e.activeDropShadow,f=e.inactiveDropShadow,v=this.getActiveWidthCss(),p=this.getResolvedDuration(),g=this.isActiveWidthPercent(),y=g&&parseFloat(v)||30,b=(100-y)/y*100,w=g?0:parseFloat(v)||0;return t.unsafeCSS(`\n :host {\n display: ${e.hidden?"none":"block"};\n ${zs(e,i,n)}\n }\n \n .progress-container {\n ${Ws(e,i)} \n background: ${r||o};\n border-radius: ${s||0}px;\n overflow: hidden;\n position: relative;\n padding: ${c*i}px;\n box-sizing: border-box;\n ${Ns(f)}\n }\n \n .progress-bar {\n height: 100%;\n background: ${u||l};\n border-radius: ${d||0}px;\n box-sizing: border-box;\n ${Ns(m)}\n ${"indeterminate"===a?`\n position: absolute;\n left: 0;\n top: ${c*i}px;\n bottom: ${c*i}px;\n width: ${v};\n animation: slide ${p}s linear infinite;\n `:""}\n }\n\n ${"indeterminate"===a?g?`\n @keyframes slide {\n 0% {\n transform: translateX(-${b}%);\n }\n 100% {\n transform: translateX(${b+100}%);\n }\n }\n `:`\n @keyframes slide {\n 0% {\n left: -${w}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 t.html(xO||(xO=CO`
|
|
565
568
|
<div class="progress-container">
|
|
566
569
|
<div
|
|
567
570
|
class="progress-bar"
|
|
@@ -578,4 +581,4 @@
|
|
|
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)}}])}();Ae([ot({type:Object})],
|
|
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)}}])}();Ae([ot({type:Object})],LO.prototype,"component",void 0),Ae([ot({type:Number})],LO.prototype,"scaleFactor",void 0),Ae([ot({type:Boolean})],LO.prototype,"inFocusedState",void 0),Ae([ot({type:Object})],LO.prototype,"minSDKVersion",void 0),Ae([st()],LO.prototype,"currentProgress",void 0),Ae([st()],LO.prototype,"isAnimating",void 0),Ae([st()],LO.prototype,"screenreaderAnnouncement",void 0),LO=Ae([Fe("nami-progress-bar")],LO),Object.defineProperty(exports,"LaunchCampaignError",{enumerable:!0,get:function(){return e.LaunchCampaignError}}),Object.defineProperty(exports,"LogLevel",{enumerable:!0,get:function(){return e.LogLevel}}),Object.defineProperty(exports,"Nami",{enumerable:!0,get:function(){return e.Nami}}),Object.defineProperty(exports,"NamiCampaignManager",{enumerable:!0,get:function(){return e.NamiCampaignManager}}),Object.defineProperty(exports,"NamiCampaignRuleType",{enumerable:!0,get:function(){return e.NamiCampaignRuleType}}),Object.defineProperty(exports,"NamiCustomerManager",{enumerable:!0,get:function(){return e.NamiCustomerManager}}),Object.defineProperty(exports,"NamiEntitlementManager",{enumerable:!0,get:function(){return e.NamiEntitlementManager}}),Object.defineProperty(exports,"NamiFlowManager",{enumerable:!0,get:function(){return e.NamiFlowManager}}),Object.defineProperty(exports,"NamiPaywallAction",{enumerable:!0,get:function(){return e.NamiPaywallAction}}),Object.defineProperty(exports,"NamiPaywallManager",{enumerable:!0,get:function(){return e.NamiPaywallManager}}),Object.defineProperty(exports,"NamiPaywallManagerEvents",{enumerable:!0,get:function(){return e.NamiPaywallManagerEvents}}),Object.defineProperty(exports,"NamiPurchaseManager",{enumerable:!0,get:function(){return e.NamiPurchaseManager}}),Object.defineProperty(exports,"_internal",{enumerable:!0,get:function(){return e._internal}}),Object.defineProperty(exports,"isNamiFlowCampaign",{enumerable:!0,get:function(){return e.isNamiFlowCampaign}});
|