@namiml/web-sdk 3.4.12-dev.202609302217 → 3.4.12-dev.202610060208

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.
@@ -9,6 +9,7 @@ export declare class NamiBackgroundContainer extends NamiElement {
9
9
  minSDKVersion: TSemverObj;
10
10
  connectedCallback(): void;
11
11
  protected styles(): CSSResult;
12
+ private overlayCss;
12
13
  protected updated(): void;
13
14
  render(): any[];
14
15
  }
package/dist/nami-web.cjs CHANGED
@@ -459,7 +459,7 @@
459
459
  `),e,e,e,function(e){return rh[e]||rh.CheckCircleOutlined}(e))}},{key:"render",value:function(){return this.renderSvgIcon(this.shouldRenderCurrentIcon()?this.component.name:this.previousSymbolName)}}])}();Ae([ot({type:Object})],Yk.prototype,"component",void 0),Ae([ot({type:Boolean})],Yk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Yk.prototype,"scaleFactor",void 0),Yk=Ae([Fe("nami-symbol")],Yk);var qk=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n=this.inFocusedState,a=e.hidden,r=e.fontSize,o=e.alignment,s=e.strikethrough,u=e.spacing;return t.unsafeCSS(`\n :host {\n ${Hk(e,i)}\n display: ${a?"none":"grid"};\n overflow-wrap: anywhere;\n width: fit-content;\n ${$s(e,n)}\n ${Vk(e,n)}\n font-size: ${(null!=r?r:zk)*i}px;\n text-align: ${o||"center"};\n ${qs("string"!=typeof s&&s)}\n ${Js(e.fontName)}\n ${eu(e,i,n)}\n ${Bk(e)}\n ${js(e)}\n ${function({alignment:e,horizontalAlignment:t}){return Ms("justify-content",t&&Ts[t]?Ts[t]:e&&Ts[e]?Ts[e]:"center")}(e)}\n }\n :host > :not(:first-child) {\n margin-top: ${u||0}px;\n }\n .anticon {\n text-rendering: optimizelegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: inherit;\n display: inline-block;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -.125em;\n }\n .anticon svg {\n display: inline-block;\n line-height: 1;\n }\n\n :host .bullet-text-wrapper {\n ${Hk(e,i)}\n display: inline;\n overflow-wrap: anywhere;\n width: fit-content;\n ${$s(e,n)}\n ${Vk(e,n)}\n font-size: ${(null!=r?r:zk)*i}px;\n text-align: ${o||"center"};\n ${qs("string"!=typeof s&&s)}\n ${Js(e.fontName)}\n }\n ${Bk(e,":host .bullet-text-wrapper")}\n :host .bullet-text-wrapper p {\n margin: 0;\n /* NAM-1409: re-applied here (not only on the wrapper) so the p's own\n computed default doesn't shadow the inherited value — see NAM-2875. */\n ${Hk(e,i)}\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 \n `)}},{key:"render",value:function(){var e=this.component,i=e.fontColor,n=e.fontSize,a=e.activeFontColor,r=e.bulletComponent,o=e.texts,s=e.spacing,u=r?v({fontColor:i,fontSize:n,activeFontColor:a,spacing:s},r):null;if(!Array.isArray(o))return t.html(Rk||(Rk=jk``));var l=Gk(this.component),d=o.map(e=>e?t.html(Fk||(Fk=jk`<nami-text-list-item-wrapper aria-hidden="${0}" .component=${0} .scaleFactor=${0}>
460
460
  ${0}
461
461
  <div class="bullet-text-wrapper" .innerHTML="${0}"></div>
462
- </nami-text-list-item-wrapper>`),l?"true":t.nothing,this.component,this.scaleFactor,u&&t.html(Ok||(Ok=jk`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),nd(e)):null);return t.html(Wk||(Wk=jk`${0}${0}`),d,l?t.html($k||($k=jk`<span class="sr-only">${0}</span>`),l):t.nothing)}}])}();Ae([ot({type:Object})],qk.prototype,"component",void 0),Ae([ot({type:Boolean})],qk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],qk.prototype,"scaleFactor",void 0),qk=Ae([Fe("nami-text-list")],qk);(()=>{var e,t=!0;try{new RegExp("􏿿","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var i=null===(e=nd.Lexer)||void 0===e?void 0:e.rules,n=null==i?void 0:i.inline;n&&Object.values(n).forEach(e=>{e&&Object.keys(e).forEach(t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",i=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),n=e.flags.replace(/u/g,"");return new RegExp(i,n)})(e[t])})})}})();var Jk=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t.focusWithin=!1,t.handleFocusIn=()=>t.setFocusState(!0),t.handleFocusOut=e=>{var i,n,a=null!==(i=e.relatedTarget)&&void 0!==i?i:null;if(!a)return t.setFocusState(!1);a===t||null!==(n=t.shadowRoot)&&void 0!==n&&n.contains(a)||t.setFocusState(!1)},t.handleFocusChanged=e=>{var i=e.detail;t.setFocusState(!0===(null==i?void 0:i.inFocusedState))},t.addEventListener("focusin",t.handleFocusIn),t.addEventListener("focusout",t.handleFocusOut),t.addEventListener("focus-changed",t.handleFocusChanged),t}return y(e,Es),m(e,[{key:"disconnectedCallback",value:function(){M(e,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{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=t.unsafeCSS(Ns(e)),l=Boolean(e.fillColor||e.fillImage),d=e.roundBorders,h=Array.isArray(d)&&d.length>0&&d.length<4,c=l&&h?"overflow: hidden;":"";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 ${c}\n ${iu(e.position)}\n ${js(e)}\n ${eu(e,i,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${$s(e,!0)}\n ${eu(e,i,!0)}\n }\n :host(:focus-visible){\n ${ou(e)}\n }\n :host > * {\n ${zs(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;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}},{key:"setFocusState",value:function(e){this.focusWithin!==e&&(this.focusWithin=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();function Qk(e,t){return e===t||e!=e&&t!=t}function Zk(e,t){for(var i=e.length;i--;)if(Qk(e[i][0],t))return i;return-1}Ae([ot({type:Object})],Jk.prototype,"component",void 0),Ae([ot({type:Boolean})],Jk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Jk.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],Jk.prototype,"minSDKVersion",void 0),Jk=Ae([Fe("nami-container")],Jk);var eS=Array.prototype.splice;function tS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function iS(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}tS.prototype.clear=function(){this.__data__=[],this.size=0},tS.prototype.delete=function(e){var t=this.__data__,i=Zk(t,e);return!(i<0)&&(i==t.length-1?t.pop():eS.call(t,i,1),--this.size,!0)},tS.prototype.get=function(e){var t=this.__data__,i=Zk(t,e);return i<0?void 0:t[i][1]},tS.prototype.has=function(e){return Zk(this.__data__,e)>-1},tS.prototype.set=function(e,t){var i=this.__data__,n=Zk(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function nS(e){if(!iS(e))return!1;var t=Oi(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var aS,rS=Ai["__core-js_shared__"],oS=(aS=/[^.]+$/.exec(rS&&rS.keys&&rS.keys.IE_PROTO||""))?"Symbol(src)_1."+aS:"";var sS=Function.prototype.toString;function uS(e){if(null!=e){try{return sS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var lS=/^\[object .+?Constructor\]$/,dS=Function.prototype,hS=Object.prototype,cS=dS.toString,mS=hS.hasOwnProperty,fS=RegExp("^"+cS.call(mS).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vS(e){return!(!iS(e)||(t=e,oS&&oS in t))&&(nS(e)?fS:lS).test(uS(e));var t}function pS(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return vS(i)?i:void 0}var gS=pS(Ai,"Map"),yS=pS(Object,"create");var bS=Object.prototype.hasOwnProperty;var wS=Object.prototype.hasOwnProperty;function kS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function SS(e,t){var i,n,a=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?a["string"==typeof t?"string":"hash"]:a.map}function ES(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}kS.prototype.clear=function(){this.__data__=yS?yS(null):{},this.size=0},kS.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},kS.prototype.get=function(e){var t=this.__data__;if(yS){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return bS.call(t,e)?t[e]:void 0},kS.prototype.has=function(e){var t=this.__data__;return yS?void 0!==t[e]:wS.call(t,e)},kS.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=yS&&void 0===t?"__lodash_hash_undefined__":t,this},ES.prototype.clear=function(){this.size=0,this.__data__={hash:new kS,map:new(gS||tS),string:new kS}},ES.prototype.delete=function(e){var t=SS(this,e).delete(e);return this.size-=t?1:0,t},ES.prototype.get=function(e){return SS(this,e).get(e)},ES.prototype.has=function(e){return SS(this,e).has(e)},ES.prototype.set=function(e,t){var i=SS(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function TS(e){var t=this.__data__=new tS(e);this.size=t.size}TS.prototype.clear=function(){this.__data__=new tS,this.size=0},TS.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},TS.prototype.get=function(e){return this.__data__.get(e)},TS.prototype.has=function(e){return this.__data__.has(e)},TS.prototype.set=function(e,t){var i=this.__data__;if(i instanceof tS){var n=i.__data__;if(!gS||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new ES(n)}return i.set(e,t),this.size=i.size,this};function PS(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new ES;++t<i;)this.add(e[t])}function MS(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}PS.prototype.add=PS.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},PS.prototype.has=function(e){return this.__data__.has(e)};function AS(e,t,i,n,a,r){var o=1&i,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var h=-1,c=!0,m=2&i?new PS:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(n)var p=o?n(v,f,h,t,e,r):n(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!MS(t,function(e,t){if(o=t,!m.has(o)&&(f===e||a(f,e,i,n,r)))return m.push(t);var o})){c=!1;break}}else if(f!==v&&!a(f,v,i,n,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var DS=Ai.Uint8Array;function xS(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function CS(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var IS=Di?Di.prototype:void 0,LS=IS?IS.valueOf:void 0;var _S=Object.prototype.propertyIsEnumerable,RS=Object.getOwnPropertySymbols,FS=RS?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,a=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[a++]=o)}return r}(RS(e),function(t){return _S.call(e,t)}))}:function(){return[]};function OS(e){return Wi(e)&&"[object Arguments]"==Oi(e)}var WS=Object.prototype,$S=WS.hasOwnProperty,NS=WS.propertyIsEnumerable,jS=OS(function(){return arguments}())?OS:function(e){return Wi(e)&&$S.call(e,"callee")&&!NS.call(e,"callee")};var BS="object"==typeof exports&&exports&&!exports.nodeType&&exports,zS=BS&&"object"==typeof module&&module&&!module.nodeType&&module,US=zS&&zS.exports===BS?Ai.Buffer:void 0,HS=(US?US.isBuffer:void 0)||function(){return!1},GS=/^(?:0|[1-9]\d*)$/;function VS(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&GS.test(e))&&e>-1&&e%1==0&&e<t}function KS(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var XS={};XS["[object Float32Array]"]=XS["[object Float64Array]"]=XS["[object Int8Array]"]=XS["[object Int16Array]"]=XS["[object Int32Array]"]=XS["[object Uint8Array]"]=XS["[object Uint8ClampedArray]"]=XS["[object Uint16Array]"]=XS["[object Uint32Array]"]=!0,XS["[object Arguments]"]=XS["[object Array]"]=XS["[object ArrayBuffer]"]=XS["[object Boolean]"]=XS["[object DataView]"]=XS["[object Date]"]=XS["[object Error]"]=XS["[object Function]"]=XS["[object Map]"]=XS["[object Number]"]=XS["[object Object]"]=XS["[object RegExp]"]=XS["[object Set]"]=XS["[object String]"]=XS["[object WeakMap]"]=!1;var YS,qS="object"==typeof exports&&exports&&!exports.nodeType&&exports,JS=qS&&"object"==typeof module&&module&&!module.nodeType&&module,QS=JS&&JS.exports===qS&&Pi.process,ZS=function(){try{var e=JS&&JS.require&&JS.require("util").types;return e||QS&&QS.binding&&QS.binding("util")}catch(e){}}(),eE=ZS&&ZS.isTypedArray,tE=eE?(YS=eE,function(e){return YS(e)}):function(e){return Wi(e)&&KS(e.length)&&!!XS[Oi(e)]},iE=Object.prototype.hasOwnProperty;function nE(e,t){var i=xi(e),n=!i&&jS(e),a=!i&&!n&&HS(e),r=!i&&!n&&!a&&tE(e),o=i||n||a||r,s=o?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],u=s.length;for(var l in e)!iE.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||VS(l,u))||s.push(l);return s}var aE=Object.prototype;var rE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),oE=Object.prototype.hasOwnProperty;function sE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||aE))return rE(e);var t,i,n=[];for(var a in Object(e))oE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function uE(e){return null!=(t=e)&&KS(t.length)&&!nS(t)?nE(e):sE(e);var t}function lE(e){return function(e,t,i){var n=t(e);return xi(e)?n:function(e,t){for(var i=-1,n=t.length,a=e.length;++i<n;)e[a+i]=t[i];return e}(n,i(e))}(e,uE,FS)}var dE=Object.prototype.hasOwnProperty;var hE=pS(Ai,"DataView"),cE=pS(Ai,"Promise"),mE=pS(Ai,"Set"),fE=pS(Ai,"WeakMap"),vE="[object Map]",pE="[object Promise]",gE="[object Set]",yE="[object WeakMap]",bE="[object DataView]",wE=uS(hE),kE=uS(gS),SE=uS(cE),EE=uS(mE),TE=uS(fE),PE=Oi;(hE&&PE(new hE(new ArrayBuffer(1)))!=bE||gS&&PE(new gS)!=vE||cE&&PE(cE.resolve())!=pE||mE&&PE(new mE)!=gE||fE&&PE(new fE)!=yE)&&(PE=function(e){var t=Oi(e),i="[object Object]"==t?e.constructor:void 0,n=i?uS(i):"";if(n)switch(n){case wE:return bE;case kE:return vE;case SE:return pE;case EE:return gE;case TE:return yE}return t});var ME="[object Arguments]",AE="[object Array]",DE="[object Object]",xE=Object.prototype.hasOwnProperty;function CE(e,t,i,n,a,r){var o=xi(e),s=xi(t),u=o?AE:PE(e),l=s?AE:PE(t),d=(u=u==ME?DE:u)==DE,h=(l=l==ME?DE:l)==DE,c=u==l;if(c&&HS(e)){if(!HS(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new TS),o||tE(e)?AS(e,t,i,n,a,r):function(e,t,i,n,a,r,o){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new DS(e),new DS(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Qk(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=xS;case"[object Set]":var u=1&n;if(s||(s=CS),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=2,o.set(e,t);var d=AS(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(LS)return LS.call(e)==LS.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&xE.call(e,"__wrapped__"),f=h&&xE.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new TS),a(v,p,i,n,r)}}return!!c&&(r||(r=new TS),function(e,t,i,n,a,r){var o=1&i,s=lE(e),u=s.length;if(u!=lE(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:dE.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(n)var g=o?n(p,v,d,t,e,r):n(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,i,n,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,i,n,a,r))}function IE(e,t,i,n,a){return e===t||(null==e||null==t||!Wi(e)&&!Wi(t)?e!=e&&t!=t:CE(e,t,i,n,IE,a))}function LE(e,t){return IE(e,t)}var _E=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,i="vertical"===this.component.direction,n=i?"width":"height",a=i?"margin-top":"margin-left",r=t.unsafeCSS(Ns(this.component));return t.unsafeCSS(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${r};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${iu(this.component.position)}\n ${js(this.component)}\n ${eu(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${a}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${$s(this.component,!0)}\n ${eu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${ou(this.component)}\n }\n :host > * {\n ${n}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;LE(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout(()=>this.classList.add("fade-in"),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,i,n=this.contextProvider.state,a=n.mediaList,r=n.currentGroupId,o=n.selectedPaywall,s=n.formFactor,u="all"===(null===(e=this.component)||void 0===e?void 0:e.products)?r:(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||r,l=Nn(this.contextProvider.productDetails,null!==(i=null==o?void 0:o.sku_menus)&&void 0!==i?i:[],u);return Xn(this.contextProvider,l,this.component,a).map(([e,t])=>(this.inFocusedState="television"==s?e:this.inFocusedState,t.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();Ae([ot({type:Object})],_E.prototype,"component",void 0),Ae([ot({type:Boolean})],_E.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],_E.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],_E.prototype,"minSDKVersion",void 0),_E=Ae([Fe("nami-product-container")],_E);var RE,FE,OE=e=>e;function WE(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var $E=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e,i=this.component,n=i.imageCropping,a=i.alignment,r=i.height,o=i.width,s=i.rightMargin,u=i.spacing,l=i.hidden,d=i.blur,h="fit"===n,c=this.contextConsumer.state.formFactor,m=Rs(null!=r?r:"100%",this.scaleFactor),f=Rs(null!==(e="fitContent"==o?r:o)&&void 0!==e?e:"100%",this.scaleFactor),v="string"==typeof r&&r.includes("%")||void 0===r,p="phone"===c&&v?"max-height":"height",g=WE(this.component.moveX)||WE(this.component.moveY);return t.unsafeCSS(`\n :host {\n display: ${"television"===c?"flex":"inline-block"};\n ${l?"display:none;":""}\n position: relative;\n ${g?Gs(this.component,this.scaleFactor):""}\n ${p}: ${m};\n width: ${f};\n }\n :host img {\n transition: all 0.3s;\n /* Don't ride the host's text baseline: a strut taller than a small image\n (dots, inline logos) pushes it below the host box. Keep the inline line\n box itself, though — percent-height hosts on phone size from it. */\n vertical-align: top;\n object-fit: ${h?"contain":"cover"};\n object-position: ${a} center;\n ${p}: ${m};\n width: ${f};\n margin-right: ${s||u||0}px;\n ${d?`filter: blur(${d}px);`:""}\n flex-shrink: ${"number"==typeof o?0:1};\n }\n `)}},{key:"render",value:function(){var e,i=this.component,n=i.url,a=i.alt,r=i.title,o=i.focusedBorderColor,s=i.focusedFillColor,u=i.fillColor;return n?(!o&&oa(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=a?a:r)&&void 0!==e?e:"",t.html(RE||(RE=OE`<img src="${0}" alt="${0}" />`),n,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,t.html(FE||(FE=OE``)))}}])}();Ae([ot({type:Object})],$E.prototype,"component",void 0),Ae([ot({type:Boolean})],$E.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],$E.prototype,"scaleFactor",void 0),$E=Ae([Fe("nami-image")],$E);var NE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"connectedCallback",value:function(){M(e,"connectedCallback",this)([]),!!document.querySelector("nami-paywall.nami-half-sheet-mode, nami-paywall.nami-modal-mode")||(document.body.style.background=this.component.fillColor||"transparent")}},{key:"styles",value:function(){var e;if(!this.contextConsumer||!this.component)return t.unsafeCSS("");var i=this.component,n=this.scaleFactor,a=this.contextConsumer.state.formFactor,r=i.backgroundBlur,o="vertical"===i.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n max-height: ${"television"===a?"100vh":""};\n display: ${i.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Bs(i)}\n position: var(--nami-bg-position, fixed);\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(e=i.zIndex)&&void 0!==e?e:1};\n top: 0px;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n ${$s(i,!1)}\n transition: all 0.3s;\n ${Hs(i,n)}\n }\n :host(:focus){\n ${$s(i,!0)}\n }\n :host > *:not(:first-child) {\n ${o}: ${i.spacing?i.spacing*n:0}px;\n }\n `)}},{key:"updated",value:function(){}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>$u(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();Ae([ot({type:Object})],NE.prototype,"component",void 0),Ae([ot({type:Boolean})],NE.prototype,"fullscreen",void 0),Ae([ot({type:Boolean})],NE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],NE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],NE.prototype,"minSDKVersion",void 0),NE=Ae([Fe("nami-background-container")],NE);var jE,BE=e=>e,zE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).zIndex=2,t.inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e,i,n=this.contextConsumer,a=this.component,r=this.zIndex,o=this.scaleFactor;if(!n)return t.css(jE||(jE=BE``));var s=n.state.formFactor,u=a.backgroundBlur,l="phone"!==s?"width: 100%;":"",d=null!==(e=a.width)&&void 0!==e?e:a.fixedWidth,h=null!==(i=a.height)&&void 0!==i?i:a.fixedHeight,c="phone"===s?`max-width:100%;\n ${void 0!==d?`width: ${Rs(d,o)};`:""}\n ${void 0!==h?`height: ${Rs(h,o)};`:""}`:Ks(a,o),m="vertical"===a.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${a.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${js(a)}\n ${c}\n ${l}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?Ts[n]:void 0,s=a?Ts[a]:void 0;return"vertical"===r?(t=null!=s?s:"center",i=null!=o?o:"start"):(t=null!=o?o:"center",i=null!=s?s:"start"),`${Ms("align-items",t)}${Ms("justify-content",i)}`}(a)}\n ${u?`backdrop-filter: blur(${u}px);`:""}\n z-index: ${r};\n transition: all 0.3s;\n overflow-y: ${"television"===s?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${Hs(a,o)}\n /* The footer is position:absolute over this container; inset the\n scroll end by its measured height (--nami-footer-height, set by\n the paywall screen) so bottom content is not hidden behind it. */\n padding-bottom: calc(${_s(o,a.bottomPadding)}px + var(--nami-footer-height, 0px));\n ${$s(a,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${$s(a,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${m}: ${a.spacing?a.spacing*o:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();Ae([ot({type:Object})],zE.prototype,"component",void 0),Ae([ot({type:Number})],zE.prototype,"zIndex",void 0),Ae([ot({type:Boolean})],zE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],zE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],zE.prototype,"minSDKVersion",void 0),zE=Ae([Fe("nami-content-container")],zE);var UE,HE=e=>e,GE=function(){function i(){var e;return u(this,i),(e=s(this,i)).inFocusedState=!1,e.scaleFactor=1,e._anyItemFocused=!1,e._handleClick=t=>{t.preventDefault(),Io({contextProvider:e.contextProvider,onTap:e.component.onTap})},e._handleFocusIn=t=>{var i,n,a=t.target;if("nami-segment-picker-item"===(null===(i=a.tagName)||void 0===i?void 0:i.toLowerCase())){if(e._isTv&&(e._anyItemFocused=!0,!e._cameFromInside(t.relatedTarget))){var r,o=null===(r=e.shadowRoot)||void 0===r?void 0:r.querySelector("nami-segment-picker-item.active");if(o&&o!==a)return void o.focus()}"television"===(null===(n=e.contextProvider)||void 0===n||null===(n=n.state)||void 0===n?void 0:n.formFactor)&&e.contextProvider.clearSelectedProduct(e.contextProvider.getCurrentGroupId())}},e._handleFocusOut=t=>{e._isTv&&(e._cameFromInside(t.relatedTarget)||(e._anyItemFocused=!1))},e.addEventListener("click",e._handleClick),e}return y(i,Es),m(i,[{key:"_isTv",get:function(){return"television"===e.getDeviceFormFactor()}},{key:"firstUpdated",value:function(e){var t,n;M(i,"firstUpdated",this)([e]),null===(t=this.shadowRoot)||void 0===t||t.addEventListener("focusin",this._handleFocusIn),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("focusout",this._handleFocusOut)}},{key:"disconnectedCallback",value:function(){var e,t;M(i,"disconnectedCallback",this)([]),null===(e=this.shadowRoot)||void 0===e||e.removeEventListener("focusin",this._handleFocusIn),null===(t=this.shadowRoot)||void 0===t||t.removeEventListener("focusout",this._handleFocusOut)}},{key:"_cameFromInside",value:function(e){var t,i;return!!e&&("nami-segment-picker-item"===(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase())||!(null===(i=this.shadowRoot)||void 0===i||!i.contains(e)))}},{key:"styles",value:function(){var e,i,n,a=nu("active",this.component.components[0]),r=nu("inactive",this.component.components[0]),o=(null===(e=this.component.components[0])||void 0===e?void 0:e.focusedFillColor)||a.fillColor,s=this._anyItemFocused;return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${js(this.component)}\n /* Keep the container's base fill even when an item is focused. Repainting\n the whole container to the (often light) focused fill washes out the\n inactive item's text — the focused item's own pill is the indicator.\n The focused border still reacts via applyStyles(containerFocused). */\n ${$s(this.component,!1)}\n ${eu(this.component,this.scaleFactor,s)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${$s(this.component,!0)}\n ${eu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${ou(this.component)}\n }\n .toggle{\n ${i=this.component,n=this.scaleFactor,`\n position: absolute;\n top: ${_s(n,i.topPadding)}px;\n bottom: ${_s(n,i.bottomPadding)}px;\n width: calc(50% - ${_s(n,i.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${au(r,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${au(a,this.scaleFactor,!0)}\n }\n\n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${$s(a,!0)}\n ${ru(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${$s(a,!0)}\n ${ru(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(1).focused~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${o?`background-color: ${o} !important;`:""}\n }\n\n nami-segment-picker-item:nth-of-type(2).focused~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${o?`background-color: ${o} !important;`:""}\n }\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return t.html(UE||(UE=HE`${0}<div class="toggle"></div>`),e)}}])}();Ae([ot({type:Object})],GE.prototype,"component",void 0),Ae([ot({type:Boolean})],GE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],GE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],GE.prototype,"minSDKVersion",void 0),Ae([st()],GE.prototype,"_anyItemFocused",void 0),GE=Ae([Fe("nami-segment-picker")],GE);var VE,KE=e=>e,XE=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).inFocusedState=!1,e.scaleFactor=1,e._isFocused=!1,e._handleFocus=()=>{e.inFocusedState=!0,e._isTv&&(e._isFocused=!0,e.classList.add("focused"))},e._handleBlur=()=>{e.inFocusedState=!1,e._isTv&&(e._isFocused=!1,e.classList.remove("focused"))},e._handleKeyDown=t=>{"Enter"===t.key||" "===t.key||142===t.keyCode||195===t.keyCode?e._handleClick():!e._isTv||"ArrowLeft"!==t.key&&"ArrowRight"!==t.key||(e._moveFocusToSibling("ArrowRight"===t.key?1:-1),t.preventDefault())},e._handleClick=()=>{e._updateFormState(),e.requestUpdate("component")},e._handleHover=()=>{e.inFocusedState=!0},e}return y(i,Es),m(i,[{key:"_isTv",get:function(){return"television"===e.getDeviceFormFactor()}},{key:"connectedCallback",value:function(){M(i,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur)}},{key:"disconnectedCallback",value:function(){M(i,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}},{key:"_moveFocusToSibling",value:function(e){var t=this.getRootNode();if(t instanceof ShadowRoot){var i=Array.from(t.querySelectorAll("nami-segment-picker-item")),n=i.indexOf(this);if(!(n<0)){var a=n+e;a>=0&&a<i.length&&i[a].focus()}}}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var i=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(i.formId){var n=this._getParentFormId();n&&this.contextProvider.state.formStates[n]&&(this._isActive=this.contextProvider.state.formStates[n]===i.formId)}else this._isActive=LE(i.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var a=this.getRootNode();if(a instanceof ShadowRoot)a.querySelectorAll("nami-segment-picker-item").forEach(e=>{e!==this&&e.requestUpdate("component",e)})}}}},{key:"styles",value:function(){var e,i,n=nu("active",this.component),a=nu("inactive",this.component),r=this.component.focusedFontColor||n.fontColor||a.fontColor||"";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n /* On television the sliding .toggle pill is the sole active/focus\n indicator, so the item's own background must stay inactive — otherwise\n it double-renders the focus fill and the previously-focused item stays\n lit. On other form factors there is no .focused pill, so the item\n background carries the hover/focus indication. */\n ${au(v({},a,this.component),this.scaleFactor,!this._isTv&&this.inFocusedState)}\n ${Ys(null!==(e=this.component.inactiveDropShadow)&&void 0!==e?e:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${ru(v({},n,this.component),this.scaleFactor)}\n ${Ys(null!==(i=this.component.activeDropShadow)&&void 0!==i?i:this.component.dropShadow)}\n }\n\n :host(.focused) {\n z-index: 2 !important;\n outline: none !important;\n ${r?Ws(r):""}\n }\n\n :host(:focus-visible) {\n outline: none !important;\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",t.html(VE||(VE=KE`<input type="radio"
462
+ </nami-text-list-item-wrapper>`),l?"true":t.nothing,this.component,this.scaleFactor,u&&t.html(Ok||(Ok=jk`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),nd(e)):null);return t.html(Wk||(Wk=jk`${0}${0}`),d,l?t.html($k||($k=jk`<span class="sr-only">${0}</span>`),l):t.nothing)}}])}();Ae([ot({type:Object})],qk.prototype,"component",void 0),Ae([ot({type:Boolean})],qk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],qk.prototype,"scaleFactor",void 0),qk=Ae([Fe("nami-text-list")],qk);(()=>{var e,t=!0;try{new RegExp("􏿿","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var i=null===(e=nd.Lexer)||void 0===e?void 0:e.rules,n=null==i?void 0:i.inline;n&&Object.values(n).forEach(e=>{e&&Object.keys(e).forEach(t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",i=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),n=e.flags.replace(/u/g,"");return new RegExp(i,n)})(e[t])})})}})();var Jk=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t.focusWithin=!1,t.handleFocusIn=()=>t.setFocusState(!0),t.handleFocusOut=e=>{var i,n,a=null!==(i=e.relatedTarget)&&void 0!==i?i:null;if(!a)return t.setFocusState(!1);a===t||null!==(n=t.shadowRoot)&&void 0!==n&&n.contains(a)||t.setFocusState(!1)},t.handleFocusChanged=e=>{var i=e.detail;t.setFocusState(!0===(null==i?void 0:i.inFocusedState))},t.addEventListener("focusin",t.handleFocusIn),t.addEventListener("focusout",t.handleFocusOut),t.addEventListener("focus-changed",t.handleFocusChanged),t}return y(e,Es),m(e,[{key:"disconnectedCallback",value:function(){M(e,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{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=t.unsafeCSS(Ns(e)),l=Boolean(e.fillColor||e.fillImage),d=e.roundBorders,h=Array.isArray(d)&&d.length>0&&d.length<4,c=l&&h?"overflow: hidden;":"";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 ${c}\n ${iu(e.position)}\n ${js(e)}\n ${eu(e,i,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${$s(e,!0)}\n ${eu(e,i,!0)}\n }\n :host(:focus-visible){\n ${ou(e)}\n }\n :host > * {\n ${zs(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;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}},{key:"setFocusState",value:function(e){this.focusWithin!==e&&(this.focusWithin=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();function Qk(e,t){return e===t||e!=e&&t!=t}function Zk(e,t){for(var i=e.length;i--;)if(Qk(e[i][0],t))return i;return-1}Ae([ot({type:Object})],Jk.prototype,"component",void 0),Ae([ot({type:Boolean})],Jk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Jk.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],Jk.prototype,"minSDKVersion",void 0),Jk=Ae([Fe("nami-container")],Jk);var eS=Array.prototype.splice;function tS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function iS(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}tS.prototype.clear=function(){this.__data__=[],this.size=0},tS.prototype.delete=function(e){var t=this.__data__,i=Zk(t,e);return!(i<0)&&(i==t.length-1?t.pop():eS.call(t,i,1),--this.size,!0)},tS.prototype.get=function(e){var t=this.__data__,i=Zk(t,e);return i<0?void 0:t[i][1]},tS.prototype.has=function(e){return Zk(this.__data__,e)>-1},tS.prototype.set=function(e,t){var i=this.__data__,n=Zk(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function nS(e){if(!iS(e))return!1;var t=Oi(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var aS,rS=Ai["__core-js_shared__"],oS=(aS=/[^.]+$/.exec(rS&&rS.keys&&rS.keys.IE_PROTO||""))?"Symbol(src)_1."+aS:"";var sS=Function.prototype.toString;function uS(e){if(null!=e){try{return sS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var lS=/^\[object .+?Constructor\]$/,dS=Function.prototype,hS=Object.prototype,cS=dS.toString,mS=hS.hasOwnProperty,fS=RegExp("^"+cS.call(mS).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vS(e){return!(!iS(e)||(t=e,oS&&oS in t))&&(nS(e)?fS:lS).test(uS(e));var t}function pS(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return vS(i)?i:void 0}var gS=pS(Ai,"Map"),yS=pS(Object,"create");var bS=Object.prototype.hasOwnProperty;var wS=Object.prototype.hasOwnProperty;function kS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function SS(e,t){var i,n,a=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?a["string"==typeof t?"string":"hash"]:a.map}function ES(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}kS.prototype.clear=function(){this.__data__=yS?yS(null):{},this.size=0},kS.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},kS.prototype.get=function(e){var t=this.__data__;if(yS){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return bS.call(t,e)?t[e]:void 0},kS.prototype.has=function(e){var t=this.__data__;return yS?void 0!==t[e]:wS.call(t,e)},kS.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=yS&&void 0===t?"__lodash_hash_undefined__":t,this},ES.prototype.clear=function(){this.size=0,this.__data__={hash:new kS,map:new(gS||tS),string:new kS}},ES.prototype.delete=function(e){var t=SS(this,e).delete(e);return this.size-=t?1:0,t},ES.prototype.get=function(e){return SS(this,e).get(e)},ES.prototype.has=function(e){return SS(this,e).has(e)},ES.prototype.set=function(e,t){var i=SS(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function TS(e){var t=this.__data__=new tS(e);this.size=t.size}TS.prototype.clear=function(){this.__data__=new tS,this.size=0},TS.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},TS.prototype.get=function(e){return this.__data__.get(e)},TS.prototype.has=function(e){return this.__data__.has(e)},TS.prototype.set=function(e,t){var i=this.__data__;if(i instanceof tS){var n=i.__data__;if(!gS||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new ES(n)}return i.set(e,t),this.size=i.size,this};function PS(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new ES;++t<i;)this.add(e[t])}function MS(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}PS.prototype.add=PS.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},PS.prototype.has=function(e){return this.__data__.has(e)};function AS(e,t,i,n,a,r){var o=1&i,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var h=-1,c=!0,m=2&i?new PS:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(n)var p=o?n(v,f,h,t,e,r):n(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!MS(t,function(e,t){if(o=t,!m.has(o)&&(f===e||a(f,e,i,n,r)))return m.push(t);var o})){c=!1;break}}else if(f!==v&&!a(f,v,i,n,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var DS=Ai.Uint8Array;function xS(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function CS(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var IS=Di?Di.prototype:void 0,LS=IS?IS.valueOf:void 0;var _S=Object.prototype.propertyIsEnumerable,RS=Object.getOwnPropertySymbols,FS=RS?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,a=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[a++]=o)}return r}(RS(e),function(t){return _S.call(e,t)}))}:function(){return[]};function OS(e){return Wi(e)&&"[object Arguments]"==Oi(e)}var WS=Object.prototype,$S=WS.hasOwnProperty,NS=WS.propertyIsEnumerable,jS=OS(function(){return arguments}())?OS:function(e){return Wi(e)&&$S.call(e,"callee")&&!NS.call(e,"callee")};var BS="object"==typeof exports&&exports&&!exports.nodeType&&exports,zS=BS&&"object"==typeof module&&module&&!module.nodeType&&module,US=zS&&zS.exports===BS?Ai.Buffer:void 0,HS=(US?US.isBuffer:void 0)||function(){return!1},GS=/^(?:0|[1-9]\d*)$/;function VS(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&GS.test(e))&&e>-1&&e%1==0&&e<t}function KS(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var XS={};XS["[object Float32Array]"]=XS["[object Float64Array]"]=XS["[object Int8Array]"]=XS["[object Int16Array]"]=XS["[object Int32Array]"]=XS["[object Uint8Array]"]=XS["[object Uint8ClampedArray]"]=XS["[object Uint16Array]"]=XS["[object Uint32Array]"]=!0,XS["[object Arguments]"]=XS["[object Array]"]=XS["[object ArrayBuffer]"]=XS["[object Boolean]"]=XS["[object DataView]"]=XS["[object Date]"]=XS["[object Error]"]=XS["[object Function]"]=XS["[object Map]"]=XS["[object Number]"]=XS["[object Object]"]=XS["[object RegExp]"]=XS["[object Set]"]=XS["[object String]"]=XS["[object WeakMap]"]=!1;var YS,qS="object"==typeof exports&&exports&&!exports.nodeType&&exports,JS=qS&&"object"==typeof module&&module&&!module.nodeType&&module,QS=JS&&JS.exports===qS&&Pi.process,ZS=function(){try{var e=JS&&JS.require&&JS.require("util").types;return e||QS&&QS.binding&&QS.binding("util")}catch(e){}}(),eE=ZS&&ZS.isTypedArray,tE=eE?(YS=eE,function(e){return YS(e)}):function(e){return Wi(e)&&KS(e.length)&&!!XS[Oi(e)]},iE=Object.prototype.hasOwnProperty;function nE(e,t){var i=xi(e),n=!i&&jS(e),a=!i&&!n&&HS(e),r=!i&&!n&&!a&&tE(e),o=i||n||a||r,s=o?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],u=s.length;for(var l in e)!iE.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||VS(l,u))||s.push(l);return s}var aE=Object.prototype;var rE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),oE=Object.prototype.hasOwnProperty;function sE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||aE))return rE(e);var t,i,n=[];for(var a in Object(e))oE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function uE(e){return null!=(t=e)&&KS(t.length)&&!nS(t)?nE(e):sE(e);var t}function lE(e){return function(e,t,i){var n=t(e);return xi(e)?n:function(e,t){for(var i=-1,n=t.length,a=e.length;++i<n;)e[a+i]=t[i];return e}(n,i(e))}(e,uE,FS)}var dE=Object.prototype.hasOwnProperty;var hE=pS(Ai,"DataView"),cE=pS(Ai,"Promise"),mE=pS(Ai,"Set"),fE=pS(Ai,"WeakMap"),vE="[object Map]",pE="[object Promise]",gE="[object Set]",yE="[object WeakMap]",bE="[object DataView]",wE=uS(hE),kE=uS(gS),SE=uS(cE),EE=uS(mE),TE=uS(fE),PE=Oi;(hE&&PE(new hE(new ArrayBuffer(1)))!=bE||gS&&PE(new gS)!=vE||cE&&PE(cE.resolve())!=pE||mE&&PE(new mE)!=gE||fE&&PE(new fE)!=yE)&&(PE=function(e){var t=Oi(e),i="[object Object]"==t?e.constructor:void 0,n=i?uS(i):"";if(n)switch(n){case wE:return bE;case kE:return vE;case SE:return pE;case EE:return gE;case TE:return yE}return t});var ME="[object Arguments]",AE="[object Array]",DE="[object Object]",xE=Object.prototype.hasOwnProperty;function CE(e,t,i,n,a,r){var o=xi(e),s=xi(t),u=o?AE:PE(e),l=s?AE:PE(t),d=(u=u==ME?DE:u)==DE,h=(l=l==ME?DE:l)==DE,c=u==l;if(c&&HS(e)){if(!HS(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new TS),o||tE(e)?AS(e,t,i,n,a,r):function(e,t,i,n,a,r,o){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new DS(e),new DS(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Qk(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=xS;case"[object Set]":var u=1&n;if(s||(s=CS),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=2,o.set(e,t);var d=AS(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(LS)return LS.call(e)==LS.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&xE.call(e,"__wrapped__"),f=h&&xE.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new TS),a(v,p,i,n,r)}}return!!c&&(r||(r=new TS),function(e,t,i,n,a,r){var o=1&i,s=lE(e),u=s.length;if(u!=lE(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:dE.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(n)var g=o?n(p,v,d,t,e,r):n(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,i,n,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,i,n,a,r))}function IE(e,t,i,n,a){return e===t||(null==e||null==t||!Wi(e)&&!Wi(t)?e!=e&&t!=t:CE(e,t,i,n,IE,a))}function LE(e,t){return IE(e,t)}var _E=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,i="vertical"===this.component.direction,n=i?"width":"height",a=i?"margin-top":"margin-left",r=t.unsafeCSS(Ns(this.component));return t.unsafeCSS(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${r};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${iu(this.component.position)}\n ${js(this.component)}\n ${eu(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${a}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${$s(this.component,!0)}\n ${eu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${ou(this.component)}\n }\n :host > * {\n ${n}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;LE(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout(()=>this.classList.add("fade-in"),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,i,n=this.contextProvider.state,a=n.mediaList,r=n.currentGroupId,o=n.selectedPaywall,s=n.formFactor,u="all"===(null===(e=this.component)||void 0===e?void 0:e.products)?r:(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||r,l=Nn(this.contextProvider.productDetails,null!==(i=null==o?void 0:o.sku_menus)&&void 0!==i?i:[],u);return Xn(this.contextProvider,l,this.component,a).map(([e,t])=>(this.inFocusedState="television"==s?e:this.inFocusedState,t.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();Ae([ot({type:Object})],_E.prototype,"component",void 0),Ae([ot({type:Boolean})],_E.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],_E.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],_E.prototype,"minSDKVersion",void 0),_E=Ae([Fe("nami-product-container")],_E);var RE,FE,OE=e=>e;function WE(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var $E=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e,i=this.component,n=i.imageCropping,a=i.alignment,r=i.height,o=i.width,s=i.rightMargin,u=i.spacing,l=i.hidden,d=i.blur,h="fit"===n,c=this.contextConsumer.state.formFactor,m=Rs(null!=r?r:"100%",this.scaleFactor),f=Rs(null!==(e="fitContent"==o?r:o)&&void 0!==e?e:"100%",this.scaleFactor),v="string"==typeof r&&r.includes("%")||void 0===r,p="phone"===c&&v?"max-height":"height",g=WE(this.component.moveX)||WE(this.component.moveY);return t.unsafeCSS(`\n :host {\n display: ${"television"===c?"flex":"inline-block"};\n ${l?"display:none;":""}\n position: relative;\n ${g?Gs(this.component,this.scaleFactor):""}\n ${p}: ${m};\n width: ${f};\n }\n :host img {\n transition: all 0.3s;\n /* Don't ride the host's text baseline: a strut taller than a small image\n (dots, inline logos) pushes it below the host box. Keep the inline line\n box itself, though — percent-height hosts on phone size from it. */\n vertical-align: top;\n object-fit: ${h?"contain":"cover"};\n object-position: ${a} center;\n ${p}: ${m};\n width: ${f};\n margin-right: ${s||u||0}px;\n ${d?`filter: blur(${d}px);`:""}\n flex-shrink: ${"number"==typeof o?0:1};\n }\n `)}},{key:"render",value:function(){var e,i=this.component,n=i.url,a=i.alt,r=i.title,o=i.focusedBorderColor,s=i.focusedFillColor,u=i.fillColor;return n?(!o&&oa(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=a?a:r)&&void 0!==e?e:"",t.html(RE||(RE=OE`<img src="${0}" alt="${0}" />`),n,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,t.html(FE||(FE=OE``)))}}])}();Ae([ot({type:Object})],$E.prototype,"component",void 0),Ae([ot({type:Boolean})],$E.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],$E.prototype,"scaleFactor",void 0),$E=Ae([Fe("nami-image")],$E);var NE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"connectedCallback",value:function(){M(e,"connectedCallback",this)([]),!!document.querySelector("nami-paywall.nami-half-sheet-mode, nami-paywall.nami-modal-mode")||(document.body.style.background=this.component.fillColor||"transparent")}},{key:"styles",value:function(){var e;if(!this.contextConsumer||!this.component)return t.unsafeCSS("");var i=this.component,n=this.scaleFactor,a=this.contextConsumer.state.formFactor,r=i.backgroundBlur,o="vertical"===i.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n max-height: ${"television"===a?"100vh":""};\n display: ${i.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Bs(i)}\n position: var(--nami-bg-position, fixed);\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(e=i.zIndex)&&void 0!==e?e:1};\n top: 0px;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n ${$s(i,!1)}\n transition: all 0.3s;\n ${Hs(i,n)}\n }\n :host(:focus){\n ${$s(i,!0)}\n }\n :host > *:not(:first-child) {\n ${o}: ${i.spacing?i.spacing*n:0}px;\n }\n ${this.overlayCss()}\n `)}},{key:"overlayCss",value:function(){var e=this.component,t=this.contextProvider;if(!e.overlayColor&&!e.conditionAttributes)return"";var i=Zn(t,(e.conditionAttributes?Jn(t,e):e).overlayColor);return"string"==typeof i&&i.trim()?`:host::after {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n ${Fs(i)}\n }`:""}},{key:"updated",value:function(){}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>$u(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();Ae([ot({type:Object})],NE.prototype,"component",void 0),Ae([ot({type:Boolean})],NE.prototype,"fullscreen",void 0),Ae([ot({type:Boolean})],NE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],NE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],NE.prototype,"minSDKVersion",void 0),NE=Ae([Fe("nami-background-container")],NE);var jE,BE=e=>e,zE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).zIndex=2,t.inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),m(e,[{key:"styles",value:function(){var e,i,n=this.contextConsumer,a=this.component,r=this.zIndex,o=this.scaleFactor;if(!n)return t.css(jE||(jE=BE``));var s=n.state.formFactor,u=a.backgroundBlur,l="phone"!==s?"width: 100%;":"",d=null!==(e=a.width)&&void 0!==e?e:a.fixedWidth,h=null!==(i=a.height)&&void 0!==i?i:a.fixedHeight,c="phone"===s?`max-width:100%;\n ${void 0!==d?`width: ${Rs(d,o)};`:""}\n ${void 0!==h?`height: ${Rs(h,o)};`:""}`:Ks(a,o),m="vertical"===a.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${a.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${js(a)}\n ${c}\n ${l}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?Ts[n]:void 0,s=a?Ts[a]:void 0;return"vertical"===r?(t=null!=s?s:"center",i=null!=o?o:"start"):(t=null!=o?o:"center",i=null!=s?s:"start"),`${Ms("align-items",t)}${Ms("justify-content",i)}`}(a)}\n ${u?`backdrop-filter: blur(${u}px);`:""}\n z-index: ${r};\n transition: all 0.3s;\n overflow-y: ${"television"===s?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${Hs(a,o)}\n /* The footer is position:absolute over this container; inset the\n scroll end by its measured height (--nami-footer-height, set by\n the paywall screen) so bottom content is not hidden behind it. */\n padding-bottom: calc(${_s(o,a.bottomPadding)}px + var(--nami-footer-height, 0px));\n ${$s(a,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${$s(a,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${m}: ${a.spacing?a.spacing*o:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();Ae([ot({type:Object})],zE.prototype,"component",void 0),Ae([ot({type:Number})],zE.prototype,"zIndex",void 0),Ae([ot({type:Boolean})],zE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],zE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],zE.prototype,"minSDKVersion",void 0),zE=Ae([Fe("nami-content-container")],zE);var UE,HE=e=>e,GE=function(){function i(){var e;return u(this,i),(e=s(this,i)).inFocusedState=!1,e.scaleFactor=1,e._anyItemFocused=!1,e._handleClick=t=>{t.preventDefault(),Io({contextProvider:e.contextProvider,onTap:e.component.onTap})},e._handleFocusIn=t=>{var i,n,a=t.target;if("nami-segment-picker-item"===(null===(i=a.tagName)||void 0===i?void 0:i.toLowerCase())){if(e._isTv&&(e._anyItemFocused=!0,!e._cameFromInside(t.relatedTarget))){var r,o=null===(r=e.shadowRoot)||void 0===r?void 0:r.querySelector("nami-segment-picker-item.active");if(o&&o!==a)return void o.focus()}"television"===(null===(n=e.contextProvider)||void 0===n||null===(n=n.state)||void 0===n?void 0:n.formFactor)&&e.contextProvider.clearSelectedProduct(e.contextProvider.getCurrentGroupId())}},e._handleFocusOut=t=>{e._isTv&&(e._cameFromInside(t.relatedTarget)||(e._anyItemFocused=!1))},e.addEventListener("click",e._handleClick),e}return y(i,Es),m(i,[{key:"_isTv",get:function(){return"television"===e.getDeviceFormFactor()}},{key:"firstUpdated",value:function(e){var t,n;M(i,"firstUpdated",this)([e]),null===(t=this.shadowRoot)||void 0===t||t.addEventListener("focusin",this._handleFocusIn),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("focusout",this._handleFocusOut)}},{key:"disconnectedCallback",value:function(){var e,t;M(i,"disconnectedCallback",this)([]),null===(e=this.shadowRoot)||void 0===e||e.removeEventListener("focusin",this._handleFocusIn),null===(t=this.shadowRoot)||void 0===t||t.removeEventListener("focusout",this._handleFocusOut)}},{key:"_cameFromInside",value:function(e){var t,i;return!!e&&("nami-segment-picker-item"===(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase())||!(null===(i=this.shadowRoot)||void 0===i||!i.contains(e)))}},{key:"styles",value:function(){var e,i,n,a=nu("active",this.component.components[0]),r=nu("inactive",this.component.components[0]),o=(null===(e=this.component.components[0])||void 0===e?void 0:e.focusedFillColor)||a.fillColor,s=this._anyItemFocused;return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${js(this.component)}\n /* Keep the container's base fill even when an item is focused. Repainting\n the whole container to the (often light) focused fill washes out the\n inactive item's text — the focused item's own pill is the indicator.\n The focused border still reacts via applyStyles(containerFocused). */\n ${$s(this.component,!1)}\n ${eu(this.component,this.scaleFactor,s)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${$s(this.component,!0)}\n ${eu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${ou(this.component)}\n }\n .toggle{\n ${i=this.component,n=this.scaleFactor,`\n position: absolute;\n top: ${_s(n,i.topPadding)}px;\n bottom: ${_s(n,i.bottomPadding)}px;\n width: calc(50% - ${_s(n,i.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${au(r,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${au(a,this.scaleFactor,!0)}\n }\n\n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${$s(a,!0)}\n ${ru(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${$s(a,!0)}\n ${ru(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(1).focused~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${o?`background-color: ${o} !important;`:""}\n }\n\n nami-segment-picker-item:nth-of-type(2).focused~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${o?`background-color: ${o} !important;`:""}\n }\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return t.html(UE||(UE=HE`${0}<div class="toggle"></div>`),e)}}])}();Ae([ot({type:Object})],GE.prototype,"component",void 0),Ae([ot({type:Boolean})],GE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],GE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],GE.prototype,"minSDKVersion",void 0),Ae([st()],GE.prototype,"_anyItemFocused",void 0),GE=Ae([Fe("nami-segment-picker")],GE);var VE,KE=e=>e,XE=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).inFocusedState=!1,e.scaleFactor=1,e._isFocused=!1,e._handleFocus=()=>{e.inFocusedState=!0,e._isTv&&(e._isFocused=!0,e.classList.add("focused"))},e._handleBlur=()=>{e.inFocusedState=!1,e._isTv&&(e._isFocused=!1,e.classList.remove("focused"))},e._handleKeyDown=t=>{"Enter"===t.key||" "===t.key||142===t.keyCode||195===t.keyCode?e._handleClick():!e._isTv||"ArrowLeft"!==t.key&&"ArrowRight"!==t.key||(e._moveFocusToSibling("ArrowRight"===t.key?1:-1),t.preventDefault())},e._handleClick=()=>{e._updateFormState(),e.requestUpdate("component")},e._handleHover=()=>{e.inFocusedState=!0},e}return y(i,Es),m(i,[{key:"_isTv",get:function(){return"television"===e.getDeviceFormFactor()}},{key:"connectedCallback",value:function(){M(i,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur)}},{key:"disconnectedCallback",value:function(){M(i,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}},{key:"_moveFocusToSibling",value:function(e){var t=this.getRootNode();if(t instanceof ShadowRoot){var i=Array.from(t.querySelectorAll("nami-segment-picker-item")),n=i.indexOf(this);if(!(n<0)){var a=n+e;a>=0&&a<i.length&&i[a].focus()}}}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var i=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(i.formId){var n=this._getParentFormId();n&&this.contextProvider.state.formStates[n]&&(this._isActive=this.contextProvider.state.formStates[n]===i.formId)}else this._isActive=LE(i.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var a=this.getRootNode();if(a instanceof ShadowRoot)a.querySelectorAll("nami-segment-picker-item").forEach(e=>{e!==this&&e.requestUpdate("component",e)})}}}},{key:"styles",value:function(){var e,i,n=nu("active",this.component),a=nu("inactive",this.component),r=this.component.focusedFontColor||n.fontColor||a.fontColor||"";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n /* On television the sliding .toggle pill is the sole active/focus\n indicator, so the item's own background must stay inactive — otherwise\n it double-renders the focus fill and the previously-focused item stays\n lit. On other form factors there is no .focused pill, so the item\n background carries the hover/focus indication. */\n ${au(v({},a,this.component),this.scaleFactor,!this._isTv&&this.inFocusedState)}\n ${Ys(null!==(e=this.component.inactiveDropShadow)&&void 0!==e?e:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${ru(v({},n,this.component),this.scaleFactor)}\n ${Ys(null!==(i=this.component.activeDropShadow)&&void 0!==i?i:this.component.dropShadow)}\n }\n\n :host(.focused) {\n z-index: 2 !important;\n outline: none !important;\n ${r?Ws(r):""}\n }\n\n :host(:focus-visible) {\n outline: none !important;\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",t.html(VE||(VE=KE`<input type="radio"
463
463
  autocomplete="off"
464
464
  id="${0}"
465
465
  name="${0}"
@@ -234,6 +234,7 @@ declare class NamiBackgroundContainer extends NamiElement {
234
234
  minSDKVersion: TSemverObj;
235
235
  connectedCallback(): void;
236
236
  protected styles(): CSSResult;
237
+ private overlayCss;
237
238
  protected updated(): void;
238
239
  render(): any[];
239
240
  }
package/dist/nami-web.mjs CHANGED
@@ -459,7 +459,7 @@ import{NAMI_SDK_VERSION as e,getExtendedClientInfo as t,PaywallState as i,logger
459
459
  `),e,e,e,function(e){return Jh[e]||Jh.CheckCircleOutlined}(e))}},{key:"render",value:function(){return this.renderSvgIcon(this.shouldRenderCurrentIcon()?this.component.name:this.previousSymbolName)}}])}();bt([Qt({type:Object})],BS.prototype,"component",void 0),bt([Qt({type:Boolean})],BS.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],BS.prototype,"scaleFactor",void 0),BS=bt([At("nami-symbol")],BS);var zS=function(){function e(){var t;return ee(this,e),(t=Z(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return de(e,vu),re(e,[{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i=this.inFocusedState,n=e.hidden,a=e.fontSize,r=e.alignment,o=e.strikethrough,s=e.spacing;return G(`\n :host {\n ${OS(e,t)}\n display: ${n?"none":"grid"};\n overflow-wrap: anywhere;\n width: fit-content;\n ${Cu(e,i)}\n ${$S(e,i)}\n font-size: ${(null!=a?a:RS)*t}px;\n text-align: ${r||"center"};\n ${zu("string"!=typeof o&&o)}\n ${Uu(e.fontName)}\n ${Vu(e,t,i)}\n ${_S(e)}\n ${Lu(e)}\n ${function({alignment:e,horizontalAlignment:t}){return yu("justify-content",t&&pu[t]?pu[t]:e&&pu[e]?pu[e]:"center")}(e)}\n }\n :host > :not(:first-child) {\n margin-top: ${s||0}px;\n }\n .anticon {\n text-rendering: optimizelegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: inherit;\n display: inline-block;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -.125em;\n }\n .anticon svg {\n display: inline-block;\n line-height: 1;\n }\n\n :host .bullet-text-wrapper {\n ${OS(e,t)}\n display: inline;\n overflow-wrap: anywhere;\n width: fit-content;\n ${Cu(e,i)}\n ${$S(e,i)}\n font-size: ${(null!=a?a:RS)*t}px;\n text-align: ${r||"center"};\n ${zu("string"!=typeof o&&o)}\n ${Uu(e.fontName)}\n }\n ${_S(e,":host .bullet-text-wrapper")}\n :host .bullet-text-wrapper p {\n margin: 0;\n /* NAM-1409: re-applied here (not only on the wrapper) so the p's own\n computed default doesn't shadow the inherited value — see NAM-2875. */\n ${OS(e,t)}\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 \n `)}},{key:"render",value:function(){var e=this.component,t=e.fontColor,i=e.fontSize,n=e.activeFontColor,a=e.bulletComponent,r=e.texts,o=e.spacing,s=a?se({fontColor:t,fontSize:i,activeFontColor:n,spacing:o},a):null;if(!Array.isArray(r))return U(PS||(PS=LS``));var u=WS(this.component),l=r.map(e=>e?U(AS||(AS=LS`<nami-text-list-item-wrapper aria-hidden="${0}" .component=${0} .scaleFactor=${0}>
460
460
  ${0}
461
461
  <div class="bullet-text-wrapper" .innerHTML="${0}"></div>
462
- </nami-text-list-item-wrapper>`),u?"true":K,this.component,this.scaleFactor,s&&U(DS||(DS=LS`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),s,this.scaleFactor),Yd(e)):null);return U(xS||(xS=LS`${0}${0}`),l,u?U(CS||(CS=LS`<span class="sr-only">${0}</span>`),u):K)}}])}();bt([Qt({type:Object})],zS.prototype,"component",void 0),bt([Qt({type:Boolean})],zS.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],zS.prototype,"scaleFactor",void 0),zS=bt([At("nami-text-list")],zS);(()=>{var e,t=!0;try{new RegExp("􏿿","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var i=null===(e=Yd.Lexer)||void 0===e?void 0:e.rules,n=null==i?void 0:i.inline;n&&Object.values(n).forEach(e=>{e&&Object.keys(e).forEach(t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",i=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),n=e.flags.replace(/u/g,"");return new RegExp(i,n)})(e[t])})})}})();var US=function(){function e(){var t;return ee(this,e),(t=Z(this,e)).inFocusedState=!1,t.scaleFactor=1,t.focusWithin=!1,t.handleFocusIn=()=>t.setFocusState(!0),t.handleFocusOut=e=>{var i,n,a=null!==(i=e.relatedTarget)&&void 0!==i?i:null;if(!a)return t.setFocusState(!1);a===t||null!==(n=t.shadowRoot)&&void 0!==n&&n.contains(a)||t.setFocusState(!1)},t.handleFocusChanged=e=>{var i=e.detail;t.setFocusState(!0===(null==i?void 0:i.inFocusedState))},t.addEventListener("focusin",t.handleFocusIn),t.addEventListener("focusout",t.handleFocusOut),t.addEventListener("focus-changed",t.handleFocusChanged),t}return de(e,vu),re(e,[{key:"disconnectedCallback",value:function(){ye(e,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i=this.minSDKVersion,n=e.backgroundBlur,a="vertical"===e.direction,r=a?"width":"height",o=a?"margin-top":"margin-left",s=G(Iu(e)),u=Boolean(e.fillColor||e.fillImage),l=e.roundBorders,d=Array.isArray(l)&&l.length>0&&l.length<4,h=u&&d?"overflow: hidden;":"";return G(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${n?`backdrop-filter: blur(${n}px);`:""}\n ${s};\n ${h}\n ${Xu(e.position)}\n ${Lu(e)}\n ${Vu(e,t,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${Cu(e,!0)}\n ${Vu(e,t,!0)}\n }\n :host(:focus-visible){\n ${Qu(e)}\n }\n :host > * {\n ${Ru(i,r)}\n }\n :host > *:not(:first-child) {\n ${o}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>Cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}},{key:"setFocusState",value:function(e){this.focusWithin!==e&&(this.focusWithin=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();function HS(e,t){return e===t||e!=e&&t!=t}function GS(e,t){for(var i=e.length;i--;)if(HS(e[i][0],t))return i;return-1}bt([Qt({type:Object})],US.prototype,"component",void 0),bt([Qt({type:Boolean})],US.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],US.prototype,"scaleFactor",void 0),bt([Qt({type:Object})],US.prototype,"minSDKVersion",void 0),US=bt([At("nami-container")],US);var VS=Array.prototype.splice;function KS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function XS(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}KS.prototype.clear=function(){this.__data__=[],this.size=0},KS.prototype.delete=function(e){var t=this.__data__,i=GS(t,e);return!(i<0)&&(i==t.length-1?t.pop():VS.call(t,i,1),--this.size,!0)},KS.prototype.get=function(e){var t=this.__data__,i=GS(t,e);return i<0?void 0:t[i][1]},KS.prototype.has=function(e){return GS(this.__data__,e)>-1},KS.prototype.set=function(e,t){var i=this.__data__,n=GS(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function YS(e){if(!XS(e))return!1;var t=xn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var qS,JS=wn["__core-js_shared__"],QS=(qS=/[^.]+$/.exec(JS&&JS.keys&&JS.keys.IE_PROTO||""))?"Symbol(src)_1."+qS:"";var ZS=Function.prototype.toString;function eE(e){if(null!=e){try{return ZS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var tE=/^\[object .+?Constructor\]$/,iE=Function.prototype,nE=Object.prototype,aE=iE.toString,rE=nE.hasOwnProperty,oE=RegExp("^"+aE.call(rE).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sE(e){return!(!XS(e)||(t=e,QS&&QS in t))&&(YS(e)?oE:tE).test(eE(e));var t}function uE(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return sE(i)?i:void 0}var lE=uE(wn,"Map"),dE=uE(Object,"create");var hE=Object.prototype.hasOwnProperty;var cE=Object.prototype.hasOwnProperty;function mE(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function fE(e,t){var i,n,a=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?a["string"==typeof t?"string":"hash"]:a.map}function vE(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}mE.prototype.clear=function(){this.__data__=dE?dE(null):{},this.size=0},mE.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},mE.prototype.get=function(e){var t=this.__data__;if(dE){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return hE.call(t,e)?t[e]:void 0},mE.prototype.has=function(e){var t=this.__data__;return dE?void 0!==t[e]:cE.call(t,e)},mE.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=dE&&void 0===t?"__lodash_hash_undefined__":t,this},vE.prototype.clear=function(){this.size=0,this.__data__={hash:new mE,map:new(lE||KS),string:new mE}},vE.prototype.delete=function(e){var t=fE(this,e).delete(e);return this.size-=t?1:0,t},vE.prototype.get=function(e){return fE(this,e).get(e)},vE.prototype.has=function(e){return fE(this,e).has(e)},vE.prototype.set=function(e,t){var i=fE(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function pE(e){var t=this.__data__=new KS(e);this.size=t.size}pE.prototype.clear=function(){this.__data__=new KS,this.size=0},pE.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},pE.prototype.get=function(e){return this.__data__.get(e)},pE.prototype.has=function(e){return this.__data__.has(e)},pE.prototype.set=function(e,t){var i=this.__data__;if(i instanceof KS){var n=i.__data__;if(!lE||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new vE(n)}return i.set(e,t),this.size=i.size,this};function gE(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new vE;++t<i;)this.add(e[t])}function yE(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}gE.prototype.add=gE.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},gE.prototype.has=function(e){return this.__data__.has(e)};function bE(e,t,i,n,a,r){var o=1&i,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var h=-1,c=!0,m=2&i?new gE:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(n)var p=o?n(v,f,h,t,e,r):n(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!yE(t,function(e,t){if(o=t,!m.has(o)&&(f===e||a(f,e,i,n,r)))return m.push(t);var o})){c=!1;break}}else if(f!==v&&!a(f,v,i,n,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var wE=wn.Uint8Array;function kE(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function SE(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var EE=kn?kn.prototype:void 0,TE=EE?EE.valueOf:void 0;var ME=Object.prototype.propertyIsEnumerable,PE=Object.getOwnPropertySymbols,AE=PE?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,a=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[a++]=o)}return r}(PE(e),function(t){return ME.call(e,t)}))}:function(){return[]};function DE(e){return Cn(e)&&"[object Arguments]"==xn(e)}var xE=Object.prototype,CE=xE.hasOwnProperty,IE=xE.propertyIsEnumerable,LE=DE(function(){return arguments}())?DE:function(e){return Cn(e)&&CE.call(e,"callee")&&!IE.call(e,"callee")};var _E="object"==typeof exports&&exports&&!exports.nodeType&&exports,RE=_E&&"object"==typeof module&&module&&!module.nodeType&&module,FE=RE&&RE.exports===_E?wn.Buffer:void 0,OE=(FE?FE.isBuffer:void 0)||function(){return!1},WE=/^(?:0|[1-9]\d*)$/;function $E(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&WE.test(e))&&e>-1&&e%1==0&&e<t}function NE(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var jE={};jE["[object Float32Array]"]=jE["[object Float64Array]"]=jE["[object Int8Array]"]=jE["[object Int16Array]"]=jE["[object Int32Array]"]=jE["[object Uint8Array]"]=jE["[object Uint8ClampedArray]"]=jE["[object Uint16Array]"]=jE["[object Uint32Array]"]=!0,jE["[object Arguments]"]=jE["[object Array]"]=jE["[object ArrayBuffer]"]=jE["[object Boolean]"]=jE["[object DataView]"]=jE["[object Date]"]=jE["[object Error]"]=jE["[object Function]"]=jE["[object Map]"]=jE["[object Number]"]=jE["[object Object]"]=jE["[object RegExp]"]=jE["[object Set]"]=jE["[object String]"]=jE["[object WeakMap]"]=!1;var BE,zE="object"==typeof exports&&exports&&!exports.nodeType&&exports,UE=zE&&"object"==typeof module&&module&&!module.nodeType&&module,HE=UE&&UE.exports===zE&&yn.process,GE=function(){try{var e=UE&&UE.require&&UE.require("util").types;return e||HE&&HE.binding&&HE.binding("util")}catch(e){}}(),VE=GE&&GE.isTypedArray,KE=VE?(BE=VE,function(e){return BE(e)}):function(e){return Cn(e)&&NE(e.length)&&!!jE[xn(e)]},XE=Object.prototype.hasOwnProperty;function YE(e,t){var i=Sn(e),n=!i&&LE(e),a=!i&&!n&&OE(e),r=!i&&!n&&!a&&KE(e),o=i||n||a||r,s=o?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],u=s.length;for(var l in e)!XE.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||$E(l,u))||s.push(l);return s}var qE=Object.prototype;var JE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),QE=Object.prototype.hasOwnProperty;function ZE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||qE))return JE(e);var t,i,n=[];for(var a in Object(e))QE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function eT(e){return null!=(t=e)&&NE(t.length)&&!YS(t)?YE(e):ZE(e);var t}function tT(e){return function(e,t,i){var n=t(e);return Sn(e)?n:function(e,t){for(var i=-1,n=t.length,a=e.length;++i<n;)e[a+i]=t[i];return e}(n,i(e))}(e,eT,AE)}var iT=Object.prototype.hasOwnProperty;var nT=uE(wn,"DataView"),aT=uE(wn,"Promise"),rT=uE(wn,"Set"),oT=uE(wn,"WeakMap"),sT="[object Map]",uT="[object Promise]",lT="[object Set]",dT="[object WeakMap]",hT="[object DataView]",cT=eE(nT),mT=eE(lE),fT=eE(aT),vT=eE(rT),pT=eE(oT),gT=xn;(nT&&gT(new nT(new ArrayBuffer(1)))!=hT||lE&&gT(new lE)!=sT||aT&&gT(aT.resolve())!=uT||rT&&gT(new rT)!=lT||oT&&gT(new oT)!=dT)&&(gT=function(e){var t=xn(e),i="[object Object]"==t?e.constructor:void 0,n=i?eE(i):"";if(n)switch(n){case cT:return hT;case mT:return sT;case fT:return uT;case vT:return lT;case pT:return dT}return t});var yT="[object Arguments]",bT="[object Array]",wT="[object Object]",kT=Object.prototype.hasOwnProperty;function ST(e,t,i,n,a,r){var o=Sn(e),s=Sn(t),u=o?bT:gT(e),l=s?bT:gT(t),d=(u=u==yT?wT:u)==wT,h=(l=l==yT?wT:l)==wT,c=u==l;if(c&&OE(e)){if(!OE(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new pE),o||KE(e)?bE(e,t,i,n,a,r):function(e,t,i,n,a,r,o){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new wE(e),new wE(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return HS(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=kE;case"[object Set]":var u=1&n;if(s||(s=SE),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=2,o.set(e,t);var d=bE(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(TE)return TE.call(e)==TE.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&kT.call(e,"__wrapped__"),f=h&&kT.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new pE),a(v,p,i,n,r)}}return!!c&&(r||(r=new pE),function(e,t,i,n,a,r){var o=1&i,s=tT(e),u=s.length;if(u!=tT(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:iT.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(n)var g=o?n(p,v,d,t,e,r):n(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,i,n,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,i,n,a,r))}function ET(e,t,i,n,a){return e===t||(null==e||null==t||!Cn(e)&&!Cn(t)?e!=e&&t!=t:ST(e,t,i,n,ET,a))}function TT(e,t){return ET(e,t)}var MT=function(){function e(){var t;return ee(this,e),(t=Z(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return de(e,vu),re(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,t="vertical"===this.component.direction,i=t?"width":"height",n=t?"margin-top":"margin-left",a=G(Iu(this.component));return G(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${a};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${Xu(this.component.position)}\n ${Lu(this.component)}\n ${Vu(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${n}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${Cu(this.component,!0)}\n ${Vu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Qu(this.component)}\n }\n :host > * {\n ${i}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;TT(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout(()=>this.classList.add("fade-in"),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,i,n=this.contextProvider.state,a=n.mediaList,r=n.currentGroupId,o=n.selectedPaywall,s=n.formFactor,u="all"===(null===(e=this.component)||void 0===e?void 0:e.products)?r:(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||r,l=Ia(this.contextProvider.productDetails,null!==(i=null==o?void 0:o.sku_menus)&&void 0!==i?i:[],u);return ja(this.contextProvider,l,this.component,a).map(([e,t])=>(this.inFocusedState="television"==s?e:this.inFocusedState,t.map(e=>Cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();bt([Qt({type:Object})],MT.prototype,"component",void 0),bt([Qt({type:Boolean})],MT.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],MT.prototype,"scaleFactor",void 0),bt([Qt({type:Object})],MT.prototype,"minSDKVersion",void 0),MT=bt([At("nami-product-container")],MT);var PT,AT,DT=e=>e;function xT(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var CT=function(){function e(){var t;return ee(this,e),(t=Z(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return de(e,vu),re(e,[{key:"styles",value:function(){var e,t=this.component,i=t.imageCropping,n=t.alignment,a=t.height,r=t.width,o=t.rightMargin,s=t.spacing,u=t.hidden,l=t.blur,d="fit"===i,h=this.contextConsumer.state.formFactor,c=Pu(null!=a?a:"100%",this.scaleFactor),m=Pu(null!==(e="fitContent"==r?a:r)&&void 0!==e?e:"100%",this.scaleFactor),f="string"==typeof a&&a.includes("%")||void 0===a,v="phone"===h&&f?"max-height":"height",p=xT(this.component.moveX)||xT(this.component.moveY);return G(`\n :host {\n display: ${"television"===h?"flex":"inline-block"};\n ${u?"display:none;":""}\n position: relative;\n ${p?Wu(this.component,this.scaleFactor):""}\n ${v}: ${c};\n width: ${m};\n }\n :host img {\n transition: all 0.3s;\n /* Don't ride the host's text baseline: a strut taller than a small image\n (dots, inline logos) pushes it below the host box. Keep the inline line\n box itself, though — percent-height hosts on phone size from it. */\n vertical-align: top;\n object-fit: ${d?"contain":"cover"};\n object-position: ${n} center;\n ${v}: ${c};\n width: ${m};\n margin-right: ${o||s||0}px;\n ${l?`filter: blur(${l}px);`:""}\n flex-shrink: ${"number"==typeof r?0:1};\n }\n `)}},{key:"render",value:function(){var e,t=this.component,i=t.url,n=t.alt,a=t.title,r=t.focusedBorderColor,o=t.focusedFillColor,s=t.fillColor;return i?(!r&&Qa(s,o)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=n?n:a)&&void 0!==e?e:"",U(PT||(PT=DT`<img src="${0}" alt="${0}" />`),i,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,U(AT||(AT=DT``)))}}])}();bt([Qt({type:Object})],CT.prototype,"component",void 0),bt([Qt({type:Boolean})],CT.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],CT.prototype,"scaleFactor",void 0),CT=bt([At("nami-image")],CT);var IT=function(){function e(){var t;return ee(this,e),(t=Z(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return de(e,vu),re(e,[{key:"connectedCallback",value:function(){ye(e,"connectedCallback",this)([]),!!document.querySelector("nami-paywall.nami-half-sheet-mode, nami-paywall.nami-modal-mode")||(document.body.style.background=this.component.fillColor||"transparent")}},{key:"styles",value:function(){var e;if(!this.contextConsumer||!this.component)return G("");var t=this.component,i=this.scaleFactor,n=this.contextConsumer.state.formFactor,a=t.backgroundBlur,r="vertical"===t.direction?"margin-top":"margin-left";return G(`\n :host {\n max-height: ${"television"===n?"100vh":""};\n display: ${t.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${_u(t)}\n position: var(--nami-bg-position, fixed);\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(e=t.zIndex)&&void 0!==e?e:1};\n top: 0px;\n ${a?`backdrop-filter: blur(${a}px);`:""}\n ${Cu(t,!1)}\n transition: all 0.3s;\n ${Ou(t,i)}\n }\n :host(:focus){\n ${Cu(t,!0)}\n }\n :host > *:not(:first-child) {\n ${r}: ${t.spacing?t.spacing*i:0}px;\n }\n `)}},{key:"updated",value:function(){}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>Cl(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();bt([Qt({type:Object})],IT.prototype,"component",void 0),bt([Qt({type:Boolean})],IT.prototype,"fullscreen",void 0),bt([Qt({type:Boolean})],IT.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],IT.prototype,"scaleFactor",void 0),bt([Qt({type:Object})],IT.prototype,"minSDKVersion",void 0),IT=bt([At("nami-background-container")],IT);var LT,_T=e=>e,RT=function(){function e(){var t;return ee(this,e),(t=Z(this,e,arguments)).zIndex=2,t.inFocusedState=!1,t.scaleFactor=1,t}return de(e,vu),re(e,[{key:"styles",value:function(){var e,t,i=this.contextConsumer,n=this.component,a=this.zIndex,r=this.scaleFactor;if(!i)return z(LT||(LT=_T``));var o=i.state.formFactor,s=n.backgroundBlur,u="phone"!==o?"width: 100%;":"",l=null!==(e=n.width)&&void 0!==e?e:n.fixedWidth,d=null!==(t=n.height)&&void 0!==t?t:n.fixedHeight,h="phone"===o?`max-width:100%;\n ${void 0!==l?`width: ${Pu(l,r)};`:""}\n ${void 0!==d?`height: ${Pu(d,r)};`:""}`:Nu(n,r),c="vertical"===n.direction?"margin-top":"margin-left";return G(`\n :host {\n box-sizing: border-box;\n display: ${n.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${Lu(n)}\n ${h}\n ${u}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?pu[n]:void 0,s=a?pu[a]:void 0;return"vertical"===r?(t=null!=s?s:"center",i=null!=o?o:"start"):(t=null!=o?o:"center",i=null!=s?s:"start"),`${yu("align-items",t)}${yu("justify-content",i)}`}(n)}\n ${s?`backdrop-filter: blur(${s}px);`:""}\n z-index: ${a};\n transition: all 0.3s;\n overflow-y: ${"television"===o?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${Ou(n,r)}\n /* The footer is position:absolute over this container; inset the\n scroll end by its measured height (--nami-footer-height, set by\n the paywall screen) so bottom content is not hidden behind it. */\n padding-bottom: calc(${Mu(r,n.bottomPadding)}px + var(--nami-footer-height, 0px));\n ${Cu(n,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${Cu(n,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${c}: ${n.spacing?n.spacing*r:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map(e=>Cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();bt([Qt({type:Object})],RT.prototype,"component",void 0),bt([Qt({type:Number})],RT.prototype,"zIndex",void 0),bt([Qt({type:Boolean})],RT.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],RT.prototype,"scaleFactor",void 0),bt([Qt({type:Object})],RT.prototype,"minSDKVersion",void 0),RT=bt([At("nami-content-container")],RT);var FT,OT=e=>e,WT=function(){function e(){var t;return ee(this,e),(t=Z(this,e)).inFocusedState=!1,t.scaleFactor=1,t._anyItemFocused=!1,t._handleClick=e=>{e.preventDefault(),Es({contextProvider:t.contextProvider,onTap:t.component.onTap})},t._handleFocusIn=e=>{var i,n,a=e.target;if("nami-segment-picker-item"===(null===(i=a.tagName)||void 0===i?void 0:i.toLowerCase())){if(t._isTv&&(t._anyItemFocused=!0,!t._cameFromInside(e.relatedTarget))){var r,o=null===(r=t.shadowRoot)||void 0===r?void 0:r.querySelector("nami-segment-picker-item.active");if(o&&o!==a)return void o.focus()}"television"===(null===(n=t.contextProvider)||void 0===n||null===(n=n.state)||void 0===n?void 0:n.formFactor)&&t.contextProvider.clearSelectedProduct(t.contextProvider.getCurrentGroupId())}},t._handleFocusOut=e=>{t._isTv&&(t._cameFromInside(e.relatedTarget)||(t._anyItemFocused=!1))},t.addEventListener("click",t._handleClick),t}return de(e,vu),re(e,[{key:"_isTv",get:function(){return"television"===f()}},{key:"firstUpdated",value:function(t){var i,n;ye(e,"firstUpdated",this)([t]),null===(i=this.shadowRoot)||void 0===i||i.addEventListener("focusin",this._handleFocusIn),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("focusout",this._handleFocusOut)}},{key:"disconnectedCallback",value:function(){var t,i;ye(e,"disconnectedCallback",this)([]),null===(t=this.shadowRoot)||void 0===t||t.removeEventListener("focusin",this._handleFocusIn),null===(i=this.shadowRoot)||void 0===i||i.removeEventListener("focusout",this._handleFocusOut)}},{key:"_cameFromInside",value:function(e){var t,i;return!!e&&("nami-segment-picker-item"===(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase())||!(null===(i=this.shadowRoot)||void 0===i||!i.contains(e)))}},{key:"styles",value:function(){var e,t,i,n=Yu("active",this.component.components[0]),a=Yu("inactive",this.component.components[0]),r=(null===(e=this.component.components[0])||void 0===e?void 0:e.focusedFillColor)||n.fillColor,o=this._anyItemFocused;return G(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${Lu(this.component)}\n /* Keep the container's base fill even when an item is focused. Repainting\n the whole container to the (often light) focused fill washes out the\n inactive item's text — the focused item's own pill is the indicator.\n The focused border still reacts via applyStyles(containerFocused). */\n ${Cu(this.component,!1)}\n ${Vu(this.component,this.scaleFactor,o)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${Cu(this.component,!0)}\n ${Vu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Qu(this.component)}\n }\n .toggle{\n ${t=this.component,i=this.scaleFactor,`\n position: absolute;\n top: ${Mu(i,t.topPadding)}px;\n bottom: ${Mu(i,t.bottomPadding)}px;\n width: calc(50% - ${Mu(i,t.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${qu(a,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${qu(n,this.scaleFactor,!0)}\n }\n\n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${Cu(n,!0)}\n ${Ju(n,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${Cu(n,!0)}\n ${Ju(n,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(1).focused~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${r?`background-color: ${r} !important;`:""}\n }\n\n nami-segment-picker-item:nth-of-type(2).focused~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${r?`background-color: ${r} !important;`:""}\n }\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>Cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return U(FT||(FT=OT`${0}<div class="toggle"></div>`),e)}}])}();bt([Qt({type:Object})],WT.prototype,"component",void 0),bt([Qt({type:Boolean})],WT.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],WT.prototype,"scaleFactor",void 0),bt([Qt({type:Object})],WT.prototype,"minSDKVersion",void 0),bt([Zt()],WT.prototype,"_anyItemFocused",void 0),WT=bt([At("nami-segment-picker")],WT);var $T,NT=e=>e,jT=function(){function e(){var t;return ee(this,e),(t=Z(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t._isFocused=!1,t._handleFocus=()=>{t.inFocusedState=!0,t._isTv&&(t._isFocused=!0,t.classList.add("focused"))},t._handleBlur=()=>{t.inFocusedState=!1,t._isTv&&(t._isFocused=!1,t.classList.remove("focused"))},t._handleKeyDown=e=>{"Enter"===e.key||" "===e.key||142===e.keyCode||195===e.keyCode?t._handleClick():!t._isTv||"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(t._moveFocusToSibling("ArrowRight"===e.key?1:-1),e.preventDefault())},t._handleClick=()=>{t._updateFormState(),t.requestUpdate("component")},t._handleHover=()=>{t.inFocusedState=!0},t}return de(e,vu),re(e,[{key:"_isTv",get:function(){return"television"===f()}},{key:"connectedCallback",value:function(){ye(e,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur)}},{key:"disconnectedCallback",value:function(){ye(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}},{key:"_moveFocusToSibling",value:function(e){var t=this.getRootNode();if(t instanceof ShadowRoot){var i=Array.from(t.querySelectorAll("nami-segment-picker-item")),n=i.indexOf(this);if(!(n<0)){var a=n+e;a>=0&&a<i.length&&i[a].focus()}}}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var i=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(i.formId){var n=this._getParentFormId();n&&this.contextProvider.state.formStates[n]&&(this._isActive=this.contextProvider.state.formStates[n]===i.formId)}else this._isActive=TT(i.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var a=this.getRootNode();if(a instanceof ShadowRoot)a.querySelectorAll("nami-segment-picker-item").forEach(e=>{e!==this&&e.requestUpdate("component",e)})}}}},{key:"styles",value:function(){var e,t,i=Yu("active",this.component),n=Yu("inactive",this.component),a=this.component.focusedFontColor||i.fontColor||n.fontColor||"";return G(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n /* On television the sliding .toggle pill is the sole active/focus\n indicator, so the item's own background must stay inactive — otherwise\n it double-renders the focus fill and the previously-focused item stays\n lit. On other form factors there is no .focused pill, so the item\n background carries the hover/focus indication. */\n ${qu(se({},n,this.component),this.scaleFactor,!this._isTv&&this.inFocusedState)}\n ${Bu(null!==(e=this.component.inactiveDropShadow)&&void 0!==e?e:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${Ju(se({},i,this.component),this.scaleFactor)}\n ${Bu(null!==(t=this.component.activeDropShadow)&&void 0!==t?t:this.component.dropShadow)}\n }\n\n :host(.focused) {\n z-index: 2 !important;\n outline: none !important;\n ${a?xu(a):""}\n }\n\n :host(:focus-visible) {\n outline: none !important;\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",U($T||($T=NT`<input type="radio"
462
+ </nami-text-list-item-wrapper>`),u?"true":K,this.component,this.scaleFactor,s&&U(DS||(DS=LS`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),s,this.scaleFactor),Yd(e)):null);return U(xS||(xS=LS`${0}${0}`),l,u?U(CS||(CS=LS`<span class="sr-only">${0}</span>`),u):K)}}])}();bt([Qt({type:Object})],zS.prototype,"component",void 0),bt([Qt({type:Boolean})],zS.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],zS.prototype,"scaleFactor",void 0),zS=bt([At("nami-text-list")],zS);(()=>{var e,t=!0;try{new RegExp("􏿿","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var i=null===(e=Yd.Lexer)||void 0===e?void 0:e.rules,n=null==i?void 0:i.inline;n&&Object.values(n).forEach(e=>{e&&Object.keys(e).forEach(t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",i=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),n=e.flags.replace(/u/g,"");return new RegExp(i,n)})(e[t])})})}})();var US=function(){function e(){var t;return ee(this,e),(t=Z(this,e)).inFocusedState=!1,t.scaleFactor=1,t.focusWithin=!1,t.handleFocusIn=()=>t.setFocusState(!0),t.handleFocusOut=e=>{var i,n,a=null!==(i=e.relatedTarget)&&void 0!==i?i:null;if(!a)return t.setFocusState(!1);a===t||null!==(n=t.shadowRoot)&&void 0!==n&&n.contains(a)||t.setFocusState(!1)},t.handleFocusChanged=e=>{var i=e.detail;t.setFocusState(!0===(null==i?void 0:i.inFocusedState))},t.addEventListener("focusin",t.handleFocusIn),t.addEventListener("focusout",t.handleFocusOut),t.addEventListener("focus-changed",t.handleFocusChanged),t}return de(e,vu),re(e,[{key:"disconnectedCallback",value:function(){ye(e,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i=this.minSDKVersion,n=e.backgroundBlur,a="vertical"===e.direction,r=a?"width":"height",o=a?"margin-top":"margin-left",s=G(Iu(e)),u=Boolean(e.fillColor||e.fillImage),l=e.roundBorders,d=Array.isArray(l)&&l.length>0&&l.length<4,h=u&&d?"overflow: hidden;":"";return G(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${n?`backdrop-filter: blur(${n}px);`:""}\n ${s};\n ${h}\n ${Xu(e.position)}\n ${Lu(e)}\n ${Vu(e,t,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${Cu(e,!0)}\n ${Vu(e,t,!0)}\n }\n :host(:focus-visible){\n ${Qu(e)}\n }\n :host > * {\n ${Ru(i,r)}\n }\n :host > *:not(:first-child) {\n ${o}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>Cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}},{key:"setFocusState",value:function(e){this.focusWithin!==e&&(this.focusWithin=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();function HS(e,t){return e===t||e!=e&&t!=t}function GS(e,t){for(var i=e.length;i--;)if(HS(e[i][0],t))return i;return-1}bt([Qt({type:Object})],US.prototype,"component",void 0),bt([Qt({type:Boolean})],US.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],US.prototype,"scaleFactor",void 0),bt([Qt({type:Object})],US.prototype,"minSDKVersion",void 0),US=bt([At("nami-container")],US);var VS=Array.prototype.splice;function KS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function XS(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}KS.prototype.clear=function(){this.__data__=[],this.size=0},KS.prototype.delete=function(e){var t=this.__data__,i=GS(t,e);return!(i<0)&&(i==t.length-1?t.pop():VS.call(t,i,1),--this.size,!0)},KS.prototype.get=function(e){var t=this.__data__,i=GS(t,e);return i<0?void 0:t[i][1]},KS.prototype.has=function(e){return GS(this.__data__,e)>-1},KS.prototype.set=function(e,t){var i=this.__data__,n=GS(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function YS(e){if(!XS(e))return!1;var t=xn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var qS,JS=wn["__core-js_shared__"],QS=(qS=/[^.]+$/.exec(JS&&JS.keys&&JS.keys.IE_PROTO||""))?"Symbol(src)_1."+qS:"";var ZS=Function.prototype.toString;function eE(e){if(null!=e){try{return ZS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var tE=/^\[object .+?Constructor\]$/,iE=Function.prototype,nE=Object.prototype,aE=iE.toString,rE=nE.hasOwnProperty,oE=RegExp("^"+aE.call(rE).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sE(e){return!(!XS(e)||(t=e,QS&&QS in t))&&(YS(e)?oE:tE).test(eE(e));var t}function uE(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return sE(i)?i:void 0}var lE=uE(wn,"Map"),dE=uE(Object,"create");var hE=Object.prototype.hasOwnProperty;var cE=Object.prototype.hasOwnProperty;function mE(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function fE(e,t){var i,n,a=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?a["string"==typeof t?"string":"hash"]:a.map}function vE(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}mE.prototype.clear=function(){this.__data__=dE?dE(null):{},this.size=0},mE.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},mE.prototype.get=function(e){var t=this.__data__;if(dE){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return hE.call(t,e)?t[e]:void 0},mE.prototype.has=function(e){var t=this.__data__;return dE?void 0!==t[e]:cE.call(t,e)},mE.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=dE&&void 0===t?"__lodash_hash_undefined__":t,this},vE.prototype.clear=function(){this.size=0,this.__data__={hash:new mE,map:new(lE||KS),string:new mE}},vE.prototype.delete=function(e){var t=fE(this,e).delete(e);return this.size-=t?1:0,t},vE.prototype.get=function(e){return fE(this,e).get(e)},vE.prototype.has=function(e){return fE(this,e).has(e)},vE.prototype.set=function(e,t){var i=fE(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function pE(e){var t=this.__data__=new KS(e);this.size=t.size}pE.prototype.clear=function(){this.__data__=new KS,this.size=0},pE.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},pE.prototype.get=function(e){return this.__data__.get(e)},pE.prototype.has=function(e){return this.__data__.has(e)},pE.prototype.set=function(e,t){var i=this.__data__;if(i instanceof KS){var n=i.__data__;if(!lE||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new vE(n)}return i.set(e,t),this.size=i.size,this};function gE(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new vE;++t<i;)this.add(e[t])}function yE(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}gE.prototype.add=gE.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},gE.prototype.has=function(e){return this.__data__.has(e)};function bE(e,t,i,n,a,r){var o=1&i,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var h=-1,c=!0,m=2&i?new gE:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(n)var p=o?n(v,f,h,t,e,r):n(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!yE(t,function(e,t){if(o=t,!m.has(o)&&(f===e||a(f,e,i,n,r)))return m.push(t);var o})){c=!1;break}}else if(f!==v&&!a(f,v,i,n,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var wE=wn.Uint8Array;function kE(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function SE(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var EE=kn?kn.prototype:void 0,TE=EE?EE.valueOf:void 0;var ME=Object.prototype.propertyIsEnumerable,PE=Object.getOwnPropertySymbols,AE=PE?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,a=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[a++]=o)}return r}(PE(e),function(t){return ME.call(e,t)}))}:function(){return[]};function DE(e){return Cn(e)&&"[object Arguments]"==xn(e)}var xE=Object.prototype,CE=xE.hasOwnProperty,IE=xE.propertyIsEnumerable,LE=DE(function(){return arguments}())?DE:function(e){return Cn(e)&&CE.call(e,"callee")&&!IE.call(e,"callee")};var _E="object"==typeof exports&&exports&&!exports.nodeType&&exports,RE=_E&&"object"==typeof module&&module&&!module.nodeType&&module,FE=RE&&RE.exports===_E?wn.Buffer:void 0,OE=(FE?FE.isBuffer:void 0)||function(){return!1},WE=/^(?:0|[1-9]\d*)$/;function $E(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&WE.test(e))&&e>-1&&e%1==0&&e<t}function NE(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var jE={};jE["[object Float32Array]"]=jE["[object Float64Array]"]=jE["[object Int8Array]"]=jE["[object Int16Array]"]=jE["[object Int32Array]"]=jE["[object Uint8Array]"]=jE["[object Uint8ClampedArray]"]=jE["[object Uint16Array]"]=jE["[object Uint32Array]"]=!0,jE["[object Arguments]"]=jE["[object Array]"]=jE["[object ArrayBuffer]"]=jE["[object Boolean]"]=jE["[object DataView]"]=jE["[object Date]"]=jE["[object Error]"]=jE["[object Function]"]=jE["[object Map]"]=jE["[object Number]"]=jE["[object Object]"]=jE["[object RegExp]"]=jE["[object Set]"]=jE["[object String]"]=jE["[object WeakMap]"]=!1;var BE,zE="object"==typeof exports&&exports&&!exports.nodeType&&exports,UE=zE&&"object"==typeof module&&module&&!module.nodeType&&module,HE=UE&&UE.exports===zE&&yn.process,GE=function(){try{var e=UE&&UE.require&&UE.require("util").types;return e||HE&&HE.binding&&HE.binding("util")}catch(e){}}(),VE=GE&&GE.isTypedArray,KE=VE?(BE=VE,function(e){return BE(e)}):function(e){return Cn(e)&&NE(e.length)&&!!jE[xn(e)]},XE=Object.prototype.hasOwnProperty;function YE(e,t){var i=Sn(e),n=!i&&LE(e),a=!i&&!n&&OE(e),r=!i&&!n&&!a&&KE(e),o=i||n||a||r,s=o?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],u=s.length;for(var l in e)!XE.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||$E(l,u))||s.push(l);return s}var qE=Object.prototype;var JE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),QE=Object.prototype.hasOwnProperty;function ZE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||qE))return JE(e);var t,i,n=[];for(var a in Object(e))QE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function eT(e){return null!=(t=e)&&NE(t.length)&&!YS(t)?YE(e):ZE(e);var t}function tT(e){return function(e,t,i){var n=t(e);return Sn(e)?n:function(e,t){for(var i=-1,n=t.length,a=e.length;++i<n;)e[a+i]=t[i];return e}(n,i(e))}(e,eT,AE)}var iT=Object.prototype.hasOwnProperty;var nT=uE(wn,"DataView"),aT=uE(wn,"Promise"),rT=uE(wn,"Set"),oT=uE(wn,"WeakMap"),sT="[object Map]",uT="[object Promise]",lT="[object Set]",dT="[object WeakMap]",hT="[object DataView]",cT=eE(nT),mT=eE(lE),fT=eE(aT),vT=eE(rT),pT=eE(oT),gT=xn;(nT&&gT(new nT(new ArrayBuffer(1)))!=hT||lE&&gT(new lE)!=sT||aT&&gT(aT.resolve())!=uT||rT&&gT(new rT)!=lT||oT&&gT(new oT)!=dT)&&(gT=function(e){var t=xn(e),i="[object Object]"==t?e.constructor:void 0,n=i?eE(i):"";if(n)switch(n){case cT:return hT;case mT:return sT;case fT:return uT;case vT:return lT;case pT:return dT}return t});var yT="[object Arguments]",bT="[object Array]",wT="[object Object]",kT=Object.prototype.hasOwnProperty;function ST(e,t,i,n,a,r){var o=Sn(e),s=Sn(t),u=o?bT:gT(e),l=s?bT:gT(t),d=(u=u==yT?wT:u)==wT,h=(l=l==yT?wT:l)==wT,c=u==l;if(c&&OE(e)){if(!OE(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new pE),o||KE(e)?bE(e,t,i,n,a,r):function(e,t,i,n,a,r,o){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new wE(e),new wE(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return HS(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=kE;case"[object Set]":var u=1&n;if(s||(s=SE),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=2,o.set(e,t);var d=bE(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(TE)return TE.call(e)==TE.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&kT.call(e,"__wrapped__"),f=h&&kT.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new pE),a(v,p,i,n,r)}}return!!c&&(r||(r=new pE),function(e,t,i,n,a,r){var o=1&i,s=tT(e),u=s.length;if(u!=tT(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:iT.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(n)var g=o?n(p,v,d,t,e,r):n(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,i,n,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,i,n,a,r))}function ET(e,t,i,n,a){return e===t||(null==e||null==t||!Cn(e)&&!Cn(t)?e!=e&&t!=t:ST(e,t,i,n,ET,a))}function TT(e,t){return ET(e,t)}var MT=function(){function e(){var t;return ee(this,e),(t=Z(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return de(e,vu),re(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,t="vertical"===this.component.direction,i=t?"width":"height",n=t?"margin-top":"margin-left",a=G(Iu(this.component));return G(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${a};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${Xu(this.component.position)}\n ${Lu(this.component)}\n ${Vu(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${n}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${Cu(this.component,!0)}\n ${Vu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Qu(this.component)}\n }\n :host > * {\n ${i}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;TT(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout(()=>this.classList.add("fade-in"),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,i,n=this.contextProvider.state,a=n.mediaList,r=n.currentGroupId,o=n.selectedPaywall,s=n.formFactor,u="all"===(null===(e=this.component)||void 0===e?void 0:e.products)?r:(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||r,l=Ia(this.contextProvider.productDetails,null!==(i=null==o?void 0:o.sku_menus)&&void 0!==i?i:[],u);return ja(this.contextProvider,l,this.component,a).map(([e,t])=>(this.inFocusedState="television"==s?e:this.inFocusedState,t.map(e=>Cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();bt([Qt({type:Object})],MT.prototype,"component",void 0),bt([Qt({type:Boolean})],MT.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],MT.prototype,"scaleFactor",void 0),bt([Qt({type:Object})],MT.prototype,"minSDKVersion",void 0),MT=bt([At("nami-product-container")],MT);var PT,AT,DT=e=>e;function xT(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var CT=function(){function e(){var t;return ee(this,e),(t=Z(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return de(e,vu),re(e,[{key:"styles",value:function(){var e,t=this.component,i=t.imageCropping,n=t.alignment,a=t.height,r=t.width,o=t.rightMargin,s=t.spacing,u=t.hidden,l=t.blur,d="fit"===i,h=this.contextConsumer.state.formFactor,c=Pu(null!=a?a:"100%",this.scaleFactor),m=Pu(null!==(e="fitContent"==r?a:r)&&void 0!==e?e:"100%",this.scaleFactor),f="string"==typeof a&&a.includes("%")||void 0===a,v="phone"===h&&f?"max-height":"height",p=xT(this.component.moveX)||xT(this.component.moveY);return G(`\n :host {\n display: ${"television"===h?"flex":"inline-block"};\n ${u?"display:none;":""}\n position: relative;\n ${p?Wu(this.component,this.scaleFactor):""}\n ${v}: ${c};\n width: ${m};\n }\n :host img {\n transition: all 0.3s;\n /* Don't ride the host's text baseline: a strut taller than a small image\n (dots, inline logos) pushes it below the host box. Keep the inline line\n box itself, though — percent-height hosts on phone size from it. */\n vertical-align: top;\n object-fit: ${d?"contain":"cover"};\n object-position: ${n} center;\n ${v}: ${c};\n width: ${m};\n margin-right: ${o||s||0}px;\n ${l?`filter: blur(${l}px);`:""}\n flex-shrink: ${"number"==typeof r?0:1};\n }\n `)}},{key:"render",value:function(){var e,t=this.component,i=t.url,n=t.alt,a=t.title,r=t.focusedBorderColor,o=t.focusedFillColor,s=t.fillColor;return i?(!r&&Qa(s,o)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=n?n:a)&&void 0!==e?e:"",U(PT||(PT=DT`<img src="${0}" alt="${0}" />`),i,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,U(AT||(AT=DT``)))}}])}();bt([Qt({type:Object})],CT.prototype,"component",void 0),bt([Qt({type:Boolean})],CT.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],CT.prototype,"scaleFactor",void 0),CT=bt([At("nami-image")],CT);var IT=function(){function e(){var t;return ee(this,e),(t=Z(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return de(e,vu),re(e,[{key:"connectedCallback",value:function(){ye(e,"connectedCallback",this)([]),!!document.querySelector("nami-paywall.nami-half-sheet-mode, nami-paywall.nami-modal-mode")||(document.body.style.background=this.component.fillColor||"transparent")}},{key:"styles",value:function(){var e;if(!this.contextConsumer||!this.component)return G("");var t=this.component,i=this.scaleFactor,n=this.contextConsumer.state.formFactor,a=t.backgroundBlur,r="vertical"===t.direction?"margin-top":"margin-left";return G(`\n :host {\n max-height: ${"television"===n?"100vh":""};\n display: ${t.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${_u(t)}\n position: var(--nami-bg-position, fixed);\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(e=t.zIndex)&&void 0!==e?e:1};\n top: 0px;\n ${a?`backdrop-filter: blur(${a}px);`:""}\n ${Cu(t,!1)}\n transition: all 0.3s;\n ${Ou(t,i)}\n }\n :host(:focus){\n ${Cu(t,!0)}\n }\n :host > *:not(:first-child) {\n ${r}: ${t.spacing?t.spacing*i:0}px;\n }\n ${this.overlayCss()}\n `)}},{key:"overlayCss",value:function(){var e=this.component,t=this.contextProvider;if(!e.overlayColor&&!e.conditionAttributes)return"";var i=Ga(t,(e.conditionAttributes?Ua(t,e):e).overlayColor);return"string"==typeof i&&i.trim()?`:host::after {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n ${Au(i)}\n }`:""}},{key:"updated",value:function(){}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>Cl(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();bt([Qt({type:Object})],IT.prototype,"component",void 0),bt([Qt({type:Boolean})],IT.prototype,"fullscreen",void 0),bt([Qt({type:Boolean})],IT.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],IT.prototype,"scaleFactor",void 0),bt([Qt({type:Object})],IT.prototype,"minSDKVersion",void 0),IT=bt([At("nami-background-container")],IT);var LT,_T=e=>e,RT=function(){function e(){var t;return ee(this,e),(t=Z(this,e,arguments)).zIndex=2,t.inFocusedState=!1,t.scaleFactor=1,t}return de(e,vu),re(e,[{key:"styles",value:function(){var e,t,i=this.contextConsumer,n=this.component,a=this.zIndex,r=this.scaleFactor;if(!i)return z(LT||(LT=_T``));var o=i.state.formFactor,s=n.backgroundBlur,u="phone"!==o?"width: 100%;":"",l=null!==(e=n.width)&&void 0!==e?e:n.fixedWidth,d=null!==(t=n.height)&&void 0!==t?t:n.fixedHeight,h="phone"===o?`max-width:100%;\n ${void 0!==l?`width: ${Pu(l,r)};`:""}\n ${void 0!==d?`height: ${Pu(d,r)};`:""}`:Nu(n,r),c="vertical"===n.direction?"margin-top":"margin-left";return G(`\n :host {\n box-sizing: border-box;\n display: ${n.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${Lu(n)}\n ${h}\n ${u}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?pu[n]:void 0,s=a?pu[a]:void 0;return"vertical"===r?(t=null!=s?s:"center",i=null!=o?o:"start"):(t=null!=o?o:"center",i=null!=s?s:"start"),`${yu("align-items",t)}${yu("justify-content",i)}`}(n)}\n ${s?`backdrop-filter: blur(${s}px);`:""}\n z-index: ${a};\n transition: all 0.3s;\n overflow-y: ${"television"===o?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${Ou(n,r)}\n /* The footer is position:absolute over this container; inset the\n scroll end by its measured height (--nami-footer-height, set by\n the paywall screen) so bottom content is not hidden behind it. */\n padding-bottom: calc(${Mu(r,n.bottomPadding)}px + var(--nami-footer-height, 0px));\n ${Cu(n,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${Cu(n,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${c}: ${n.spacing?n.spacing*r:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map(e=>Cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();bt([Qt({type:Object})],RT.prototype,"component",void 0),bt([Qt({type:Number})],RT.prototype,"zIndex",void 0),bt([Qt({type:Boolean})],RT.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],RT.prototype,"scaleFactor",void 0),bt([Qt({type:Object})],RT.prototype,"minSDKVersion",void 0),RT=bt([At("nami-content-container")],RT);var FT,OT=e=>e,WT=function(){function e(){var t;return ee(this,e),(t=Z(this,e)).inFocusedState=!1,t.scaleFactor=1,t._anyItemFocused=!1,t._handleClick=e=>{e.preventDefault(),Es({contextProvider:t.contextProvider,onTap:t.component.onTap})},t._handleFocusIn=e=>{var i,n,a=e.target;if("nami-segment-picker-item"===(null===(i=a.tagName)||void 0===i?void 0:i.toLowerCase())){if(t._isTv&&(t._anyItemFocused=!0,!t._cameFromInside(e.relatedTarget))){var r,o=null===(r=t.shadowRoot)||void 0===r?void 0:r.querySelector("nami-segment-picker-item.active");if(o&&o!==a)return void o.focus()}"television"===(null===(n=t.contextProvider)||void 0===n||null===(n=n.state)||void 0===n?void 0:n.formFactor)&&t.contextProvider.clearSelectedProduct(t.contextProvider.getCurrentGroupId())}},t._handleFocusOut=e=>{t._isTv&&(t._cameFromInside(e.relatedTarget)||(t._anyItemFocused=!1))},t.addEventListener("click",t._handleClick),t}return de(e,vu),re(e,[{key:"_isTv",get:function(){return"television"===f()}},{key:"firstUpdated",value:function(t){var i,n;ye(e,"firstUpdated",this)([t]),null===(i=this.shadowRoot)||void 0===i||i.addEventListener("focusin",this._handleFocusIn),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("focusout",this._handleFocusOut)}},{key:"disconnectedCallback",value:function(){var t,i;ye(e,"disconnectedCallback",this)([]),null===(t=this.shadowRoot)||void 0===t||t.removeEventListener("focusin",this._handleFocusIn),null===(i=this.shadowRoot)||void 0===i||i.removeEventListener("focusout",this._handleFocusOut)}},{key:"_cameFromInside",value:function(e){var t,i;return!!e&&("nami-segment-picker-item"===(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase())||!(null===(i=this.shadowRoot)||void 0===i||!i.contains(e)))}},{key:"styles",value:function(){var e,t,i,n=Yu("active",this.component.components[0]),a=Yu("inactive",this.component.components[0]),r=(null===(e=this.component.components[0])||void 0===e?void 0:e.focusedFillColor)||n.fillColor,o=this._anyItemFocused;return G(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${Lu(this.component)}\n /* Keep the container's base fill even when an item is focused. Repainting\n the whole container to the (often light) focused fill washes out the\n inactive item's text — the focused item's own pill is the indicator.\n The focused border still reacts via applyStyles(containerFocused). */\n ${Cu(this.component,!1)}\n ${Vu(this.component,this.scaleFactor,o)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${Cu(this.component,!0)}\n ${Vu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Qu(this.component)}\n }\n .toggle{\n ${t=this.component,i=this.scaleFactor,`\n position: absolute;\n top: ${Mu(i,t.topPadding)}px;\n bottom: ${Mu(i,t.bottomPadding)}px;\n width: calc(50% - ${Mu(i,t.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${qu(a,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${qu(n,this.scaleFactor,!0)}\n }\n\n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${Cu(n,!0)}\n ${Ju(n,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${Cu(n,!0)}\n ${Ju(n,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(1).focused~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${r?`background-color: ${r} !important;`:""}\n }\n\n nami-segment-picker-item:nth-of-type(2).focused~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${r?`background-color: ${r} !important;`:""}\n }\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>Cl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return U(FT||(FT=OT`${0}<div class="toggle"></div>`),e)}}])}();bt([Qt({type:Object})],WT.prototype,"component",void 0),bt([Qt({type:Boolean})],WT.prototype,"inFocusedState",void 0),bt([Qt({type:Number})],WT.prototype,"scaleFactor",void 0),bt([Qt({type:Object})],WT.prototype,"minSDKVersion",void 0),bt([Zt()],WT.prototype,"_anyItemFocused",void 0),WT=bt([At("nami-segment-picker")],WT);var $T,NT=e=>e,jT=function(){function e(){var t;return ee(this,e),(t=Z(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t._isFocused=!1,t._handleFocus=()=>{t.inFocusedState=!0,t._isTv&&(t._isFocused=!0,t.classList.add("focused"))},t._handleBlur=()=>{t.inFocusedState=!1,t._isTv&&(t._isFocused=!1,t.classList.remove("focused"))},t._handleKeyDown=e=>{"Enter"===e.key||" "===e.key||142===e.keyCode||195===e.keyCode?t._handleClick():!t._isTv||"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(t._moveFocusToSibling("ArrowRight"===e.key?1:-1),e.preventDefault())},t._handleClick=()=>{t._updateFormState(),t.requestUpdate("component")},t._handleHover=()=>{t.inFocusedState=!0},t}return de(e,vu),re(e,[{key:"_isTv",get:function(){return"television"===f()}},{key:"connectedCallback",value:function(){ye(e,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur)}},{key:"disconnectedCallback",value:function(){ye(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}},{key:"_moveFocusToSibling",value:function(e){var t=this.getRootNode();if(t instanceof ShadowRoot){var i=Array.from(t.querySelectorAll("nami-segment-picker-item")),n=i.indexOf(this);if(!(n<0)){var a=n+e;a>=0&&a<i.length&&i[a].focus()}}}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var i=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(i.formId){var n=this._getParentFormId();n&&this.contextProvider.state.formStates[n]&&(this._isActive=this.contextProvider.state.formStates[n]===i.formId)}else this._isActive=TT(i.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var a=this.getRootNode();if(a instanceof ShadowRoot)a.querySelectorAll("nami-segment-picker-item").forEach(e=>{e!==this&&e.requestUpdate("component",e)})}}}},{key:"styles",value:function(){var e,t,i=Yu("active",this.component),n=Yu("inactive",this.component),a=this.component.focusedFontColor||i.fontColor||n.fontColor||"";return G(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n /* On television the sliding .toggle pill is the sole active/focus\n indicator, so the item's own background must stay inactive — otherwise\n it double-renders the focus fill and the previously-focused item stays\n lit. On other form factors there is no .focused pill, so the item\n background carries the hover/focus indication. */\n ${qu(se({},n,this.component),this.scaleFactor,!this._isTv&&this.inFocusedState)}\n ${Bu(null!==(e=this.component.inactiveDropShadow)&&void 0!==e?e:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${Ju(se({},i,this.component),this.scaleFactor)}\n ${Bu(null!==(t=this.component.activeDropShadow)&&void 0!==t?t:this.component.dropShadow)}\n }\n\n :host(.focused) {\n z-index: 2 !important;\n outline: none !important;\n ${a?xu(a):""}\n }\n\n :host(:focus-visible) {\n outline: none !important;\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",U($T||($T=NT`<input type="radio"
463
463
  autocomplete="off"
464
464
  id="${0}"
465
465
  name="${0}"