rebill-web-components-sdk 1.8.13 → 1.8.15

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.
Files changed (41) hide show
  1. package/dist/cjs/card-identification_5.cjs.entry.js +1 -1
  2. package/dist/cjs/{installment-utils-D4qKgjN9.js → installment-utils-CaZDiH-J.js} +10 -7
  3. package/dist/cjs/installment-utils-CaZDiH-J.js.map +1 -0
  4. package/dist/cjs/otp-component_7.cjs.entry.js +1 -1
  5. package/dist/collection/utils/installment-utils.js +8 -5
  6. package/dist/collection/utils/installment-utils.js.map +1 -1
  7. package/dist/components/card-fields-wrapper.js +1 -1
  8. package/dist/components/{p-Y1V1tI5U.js → p-BQYAXUmg.js} +11 -8
  9. package/dist/components/p-BQYAXUmg.js.map +1 -0
  10. package/dist/components/{p-DioD4ps1.js → p-BW4DxIWR.js} +4 -4
  11. package/dist/components/{p-DioD4ps1.js.map → p-BW4DxIWR.js.map} +1 -1
  12. package/dist/components/{p-Ds8iyCAd.js → p-CU82jZID.js} +3 -3
  13. package/dist/components/{p-Ds8iyCAd.js.map → p-CU82jZID.js.map} +1 -1
  14. package/dist/components/{p-BIat5a1z.js → p-D5G2GZlN.js} +3 -3
  15. package/dist/components/{p-BIat5a1z.js.map → p-D5G2GZlN.js.map} +1 -1
  16. package/dist/components/{p-CW7bdfSw.js → p-Sh874KyF.js} +3 -3
  17. package/dist/components/{p-CW7bdfSw.js.map → p-Sh874KyF.js.map} +1 -1
  18. package/dist/components/{p-DG3R157p.js → p-puDOAJZP.js} +3 -3
  19. package/dist/components/{p-DG3R157p.js.map → p-puDOAJZP.js.map} +1 -1
  20. package/dist/components/payment-method-selector.js +1 -1
  21. package/dist/components/rebill-checkout.js +5 -5
  22. package/dist/components/rebill-installments.js +1 -1
  23. package/dist/components/rebill-renewal.js +3 -3
  24. package/dist/components/rebill-summary.js +1 -1
  25. package/dist/components/success-page.js +1 -1
  26. package/dist/esm/card-identification_5.entry.js +1 -1
  27. package/dist/esm/{installment-utils-BCJJSszJ.js → installment-utils-CxQxVtur.js} +10 -7
  28. package/dist/esm/installment-utils-CxQxVtur.js.map +1 -0
  29. package/dist/esm/otp-component_7.entry.js +1 -1
  30. package/dist/rebill-web-components-sdk/{p-c41119c0.entry.js → p-91432c62.entry.js} +2 -2
  31. package/dist/rebill-web-components-sdk/{p-KStTLJ_c.js → p-DKzHMy1G.js} +2 -2
  32. package/dist/rebill-web-components-sdk/p-DKzHMy1G.js.map +1 -0
  33. package/dist/rebill-web-components-sdk/{p-7f487ad7.entry.js → p-ad9bd33b.entry.js} +2 -2
  34. package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
  35. package/package.json +9 -1
  36. package/dist/cjs/installment-utils-D4qKgjN9.js.map +0 -1
  37. package/dist/components/p-Y1V1tI5U.js.map +0 -1
  38. package/dist/esm/installment-utils-BCJJSszJ.js.map +0 -1
  39. package/dist/rebill-web-components-sdk/p-KStTLJ_c.js.map +0 -1
  40. /package/dist/rebill-web-components-sdk/{p-c41119c0.entry.js.map → p-91432c62.entry.js.map} +0 -0
  41. /package/dist/rebill-web-components-sdk/{p-7f487ad7.entry.js.map → p-ad9bd33b.entry.js.map} +0 -0
@@ -4,7 +4,7 @@ import { I as I18nService, c as PLAN_FREQUENCY_ENUM, s as state, b as SESSION_IT
4
4
  import { C as COLORS_ENUM } from './color-class-mapper-DA598vBj.js';
5
5
  import { c as copyToClipboard, a as createCountdownTimer } from './clipboard-BIOWiROZ.js';
6
6
  import { B as BREAKPOINT_ENUM, i as isBreakpointBelow, g as getBreakpoint } from './breakpoint-Do_vNuMa.js';
7
- import { g as getInstallmentDescription, a as getInstallmentLabelSummary, E as ENUM_INSTALLMENT_MODEL, b as getRecalculatedInstallmentAmount } from './installment-utils-BCJJSszJ.js';
7
+ import { g as getInstallmentDescription, a as getInstallmentLabelSummary, E as ENUM_INSTALLMENT_MODEL, b as getRecalculatedInstallmentAmount } from './installment-utils-CxQxVtur.js';
8
8
  import { g as getAssetURL } from './assets-B96SyP8A.js';
9
9
  import { g as getCountryPaymentMethods, P as PDFGenerator } from './pdf-generator-B4NHkX8z.js';
10
10
  import { f as formatDateTime } from './date-formatter-Cr2zi4ji.js';
@@ -1,2 +1,2 @@
1
- import{r as e,h as t,g as i,c as a,H as s}from"./p-D8cwEAmw.js";import{a as n}from"./p-CTo1s54i.js";import{I as r,c as o,s as l,b as c,f as d,d as p,e as h,a as b,P as m}from"./p-CP6XOgmg.js";import{C as u}from"./p-DA598vBj.js";import{c as f,a as y}from"./p-BIOWiROZ.js";import{B as g,i as x,g as v}from"./p-Do_vNuMa.js";import{g as _,a as k,E as w,b as C}from"./p-KStTLJ_c.js";import{g as $}from"./p-B96SyP8A.js";import{g as D,P as j}from"./p-cHVoxSaG.js";import{f as T}from"./p-D0e855_t.js";import"./p-E-ZsRS8r.js";import"./p-D339jHg4.js";const z=(e,t,i)=>{const a=document.createElement(e),[s,n]=Array.isArray(t)?[void 0,t]:[t,i];return s&&Object.assign(a,s),n==null||n.forEach((e=>a.appendChild(e))),a},S=(e,t)=>{var i;return t==="left"?e.offsetLeft:(((i=e.offsetParent instanceof HTMLElement?e.offsetParent:null)==null?void 0:i.offsetWidth)??0)-e.offsetWidth-e.offsetLeft},M=e=>e.offsetWidth>0&&e.offsetHeight>0,P=(e,t)=>{!customElements.get(e)&&customElements.define(e,t)};function A(e,t,{reverse:i=false}={}){const a=e.length;for(let s=i?a-1:0;i?s>=0:s<a;i?s--:s++)t(e[s],s)}function L(e,t,i,a){const s=t.formatToParts(e);i&&s.unshift({type:"prefix",value:i}),a&&s.push({type:"suffix",value:a});const n=[],r=[],o=[],l=[],c={},d=e=>`${e}:${c[e]=(c[e]??-1)+1}`;let p="",h=false,b=false;for(const e of s){p+=e.value;const t=e.type==="minusSign"||e.type==="plusSign"?"sign":e.type;t==="integer"?(h=true,r.push(...e.value.split("").map((e=>({type:t,value:parseInt(e)}))))):t==="group"?r.push({type:t,value:e.value}):t==="decimal"?(b=true,o.push({type:t,value:e.value,key:d(t)})):t==="fraction"?o.push(...e.value.split("").map((e=>({type:t,value:parseInt(e),key:d(t),pos:-1-c[t]})))):(h||b?l:n).push({type:t,value:e.value,key:d(t)})}const m=[];for(let e=r.length-1;e>=0;e--){const t=r[e];m.unshift(t.type==="integer"?{...t,key:d(t.type),pos:c[t.type]}:{...t,key:d(t.type)})}return{pre:n,integer:m,fraction:o,post:l,valueAsString:p,value:typeof e=="string"?parseFloat(e):e}}const I=String.raw,N=(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return false}return true})(),E=typeof CSS<"u"&&CSS.supports&&CSS.supports("line-height","mod(1,1)"),R=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):null,B="--_number-flow-d-opacity",F="--_number-flow-d-width",U="--_number-flow-dx",V="--_number-flow-d",W=(()=>{try{return CSS.registerProperty({name:B,syntax:"<number>",inherits:false,initialValue:"0"}),CSS.registerProperty({name:U,syntax:"<length>",inherits:true,initialValue:"0px"}),CSS.registerProperty({name:F,syntax:"<number>",inherits:false,initialValue:"0"}),CSS.registerProperty({name:V,syntax:"<number>",inherits:true,initialValue:"0"}),true}catch{return false}})(),Y="var(--number-flow-char-height, 1em)",X="var(--number-flow-mask-height, 0.25em)",O=`calc(${X} / 2)`,q="var(--number-flow-mask-width, 0.5em)",H=`calc(${q} / var(--scale-x))`,Z="#000 0, transparent 71%",G=I`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:${Y} !important}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${F}) / var(--width));transform:translateX(var(${U})) scaleX(var(--scale-x));margin:0 calc(-1 * ${q});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${H},#000 calc(100% - ${H}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${X},#000 calc(100% - ${X}),transparent 100% ),radial-gradient(at bottom right,${Z}),radial-gradient(at bottom left,${Z}),radial-gradient(at top left,${Z}),radial-gradient(at top right,${Z});-webkit-mask-size:100% calc(100% - ${X} * 2),calc(100% - ${H} * 2) 100%,${H} ${X},${H} ${X},${H} ${X},${H} ${X};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${O} ${q};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${U})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${V})}.digit__num,.number .section::after{padding:${O} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${B}))}`,K=HTMLElement,J=E&&N&&W;let Q;class ee extends K{constructor(){super(),this.created=false,this.batched=false;const{animated:e,...t}=this.constructor.defaultProps;this._animated=this.computedAnimated=e,Object.assign(this,t)}get animated(){return this._animated}set animated(e){var t;this.animated!==e&&(this._animated=e,(t=this.shadowRoot)==null||t.getAnimations().forEach((e=>e.finish())))}set data(e){var t;if(e==null)return;const{pre:i,integer:a,fraction:s,post:n,value:r}=e;if(this.created){const o=this._data;this._data=e,this.computedTrend=typeof this.trend=="function"?this.trend(o.value,r):this.trend,this.computedAnimated=J&&this._animated&&(!this.respectMotionPreference||!(R!=null&&R.matches))&&M(this),(t=this.plugins)==null||t.forEach((t=>{var i;return(i=t.onUpdate)==null?void 0:i.call(t,e,o,this)})),this.batched||this.willUpdate(),this._pre.update(i),this._num.update({integer:a,fraction:s}),this._post.update(n),this.batched||this.didUpdate()}else{this._data=e,this.attachShadow({mode:"open"});try{this._internals??(this._internals=this.attachInternals()),this._internals.role="img"}catch{}if(typeof CSSStyleSheet<"u"&&this.shadowRoot.adoptedStyleSheets)Q||(Q=new CSSStyleSheet,Q.replaceSync(G)),this.shadowRoot.adoptedStyleSheets=[Q];else{const e=document.createElement("style");e.textContent=G,this.shadowRoot.appendChild(e)}this._pre=new se(this,i,{justify:"right",part:"left"}),this.shadowRoot.appendChild(this._pre.el),this._num=new te(this,a,s),this.shadowRoot.appendChild(this._num.el),this._post=new se(this,n,{justify:"left",part:"right"}),this.shadowRoot.appendChild(this._post.el),this.created=true}try{this._internals.ariaLabel=e.valueAsString}catch{}}willUpdate(){this._pre.willUpdate(),this._num.willUpdate(),this._post.willUpdate()}didUpdate(){if(!this.computedAnimated)return;this._abortAnimationsFinish?this._abortAnimationsFinish.abort():this.dispatchEvent(new Event("animationsstart")),this._pre.didUpdate(),this._num.didUpdate(),this._post.didUpdate();const e=new AbortController;Promise.all(this.shadowRoot.getAnimations().map((e=>e.finished))).then((()=>{e.signal.aborted||(this.dispatchEvent(new Event("animationsfinish")),this._abortAnimationsFinish=void 0)})),this._abortAnimationsFinish=e}}ee.defaultProps={transformTiming:{duration:900,easing:"linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)"},spinTiming:void 0,opacityTiming:{duration:450,easing:"ease-out"},animated:true,trend:(e,t)=>Math.sign(t-e),respectMotionPreference:true,plugins:void 0,digits:void 0};class te{constructor(e,t,i,{className:a,...s}={}){this.flow=e,this._integer=new ae(e,t,{justify:"right",part:"integer"}),this._fraction=new ae(e,i,{justify:"left",part:"fraction"}),this._inner=z("span",{className:"number__inner"},[this._integer.el,this._fraction.el]),this.el=z("span",{...s,part:"number",className:`number ${a??""}`},[this._inner])}willUpdate(){this._prevWidth=this.el.offsetWidth,this._prevLeft=this.el.getBoundingClientRect().left,this._integer.willUpdate(),this._fraction.willUpdate()}update({integer:e,fraction:t}){this._integer.update(e),this._fraction.update(t)}didUpdate(){const e=this.el.getBoundingClientRect();this._integer.didUpdate(),this._fraction.didUpdate();const t=this._prevLeft-e.left,i=this.el.offsetWidth,a=this._prevWidth-i;this.el.style.setProperty("--width",String(i)),this.el.animate({[U]:[`${t}px`,"0px"],[F]:[a,0]},{...this.flow.transformTiming,composite:"accumulate"})}}class ie{constructor(e,t,{justify:i,className:a,...s},n){this.flow=e,this.children=new Map,this.onCharRemove=e=>()=>{this.children.delete(e)},this.justify=i;const r=t.map((e=>this.addChar(e).el));this.el=z("span",{...s,className:`section section--justify-${i} ${a??""}`},n?n(r):r)}addChar(e,{startDigitsAtZero:t=false,...i}={}){const a=e.type==="integer"||e.type==="fraction"?new oe(this,e.type,t?0:e.value,e.pos,{...i,onRemove:this.onCharRemove(e.key)}):new le(this,e.type,e.value,{...i,onRemove:this.onCharRemove(e.key)});return this.children.set(e.key,a),a}unpop(e){e.el.removeAttribute("inert"),e.el.style.top="",e.el.style[this.justify]=""}pop(e){e.forEach((e=>{e.el.style.top=`${e.el.offsetTop}px`,e.el.style[this.justify]=`${S(e.el,this.justify)}px`})),e.forEach((e=>{e.el.setAttribute("inert",""),e.present=false}))}addNewAndUpdateExisting(e){const t=new Map,i=new Map,a=this.justify==="left",s=a?"prepend":"append";if(A(e,(e=>{let a;this.children.has(e.key)?(a=this.children.get(e.key),i.set(e,a),this.unpop(a),a.present=true):(a=this.addChar(e,{startDigitsAtZero:true,animateIn:true}),t.set(e,a)),this.el[s](a.el)}),{reverse:a}),this.flow.computedAnimated){const e=this.el.getBoundingClientRect();t.forEach((t=>{t.willUpdate(e)}))}t.forEach(((e,t)=>{e.update(t.value)})),i.forEach(((e,t)=>{e.update(t.value)}))}willUpdate(){const e=this.el.getBoundingClientRect();this._prevOffset=e[this.justify],this.children.forEach((t=>t.willUpdate(e)))}didUpdate(){const e=this.el.getBoundingClientRect();this.children.forEach((t=>t.didUpdate(e)));const t=e[this.justify],i=this._prevOffset-t;i&&this.children.size&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}class ae extends ie{update(e){const t=new Map;this.children.forEach(((i,a)=>{e.find((e=>e.key===a))||t.set(a,i),this.unpop(i)})),this.addNewAndUpdateExisting(e),t.forEach((e=>{e instanceof oe&&e.update(0)})),this.pop(t)}}class se extends ie{update(e){const t=new Map;this.children.forEach(((i,a)=>{e.find((e=>e.key===a))||t.set(a,i)})),this.pop(t),this.addNewAndUpdateExisting(e)}}class ne{constructor(e,t,{onRemove:i,animateIn:a=false}={}){this.flow=e,this.el=t,this._present=true,this._remove=()=>{var e;this.el.remove(),(e=this._onRemove)==null||e.call(this)},this.el.classList.add("animate-presence"),this.flow.computedAnimated&&a&&this.el.animate({[B]:[-.9999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),this._onRemove=i}get present(){return this._present}set present(e){if(this._present!==e){if(this._present=e,e?this.el.removeAttribute("inert"):this.el.setAttribute("inert",""),!this.flow.computedAnimated){e||this._remove();return}this.el.style.setProperty("--_number-flow-d-opacity",e?"0":"-.999"),this.el.animate({[B]:e?[-.9999,0]:[.999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),e?this.flow.removeEventListener("animationsfinish",this._remove):this.flow.addEventListener("animationsfinish",this._remove,{once:true})}}}class re extends ne{constructor(e,t,i,a){super(e.flow,i,a),this.section=e,this.value=t,this.el=i}}class oe extends re{constructor(e,t,i,a,s){var n,r;const o=(((r=(n=e.flow.digits)==null?void 0:n[a])==null?void 0:r.max)??9)+1,l=Array.from({length:o}).map(((e,t)=>{const a=z("span",{className:"digit__num"},[document.createTextNode(String(t))]);return t!==i&&a.setAttribute("inert",""),a.style.setProperty("--n",String(t)),a})),c=z("span",{part:`digit ${t}-digit`,className:"digit"},l);c.style.setProperty("--current",String(i)),c.style.setProperty("--length",String(o)),super(e,i,c,s),this.pos=a,this._onAnimationsFinish=()=>{this.el.classList.remove("is-spinning")},this._numbers=l,this.length=o}willUpdate(e){const t=this.el.getBoundingClientRect();this._prevValue=this.value;const i=t[this.section.justify]-e[this.section.justify],a=t.width/2;this._prevCenter=this.section.justify==="left"?i+a:i-a}update(e){this.el.style.setProperty("--current",String(e)),this._numbers.forEach(((t,i)=>i===e?t.removeAttribute("inert"):t.setAttribute("inert",""))),this.value=e}didUpdate(e){const t=this.el.getBoundingClientRect(),i=t[this.section.justify]-e[this.section.justify],a=t.width/2,s=this.section.justify==="left"?i+a:i-a,n=this._prevCenter-s;n&&this.el.animate({transform:[`translateX(${n}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"});const r=this.getDelta();r&&(this.el.classList.add("is-spinning"),this.el.animate({[V]:[-r,0]},{...this.flow.spinTiming??this.flow.transformTiming,composite:"accumulate"}),this.flow.addEventListener("animationsfinish",this._onAnimationsFinish,{once:true}))}getDelta(){var e;if(this.flow.plugins)for(const t of this.flow.plugins){const i=(e=t.getDelta)==null?void 0:e.call(t,this.value,this._prevValue,this);if(i!=null)return i}const t=this.value-this._prevValue,i=this.flow.computedTrend||Math.sign(t);return i<0&&this.value>this._prevValue?this.value-this.length-this._prevValue:i>0&&this.value<this._prevValue?this.length-this._prevValue+this.value:t}}class le extends re{constructor(e,t,i,a){const s=z("span",{className:"symbol__value",textContent:i});super(e,i,z("span",{part:`symbol ${t}`,className:"symbol"},[s]),a),this.type=t,this._children=new Map,this._onChildRemove=e=>()=>{this._children.delete(e)},this._children.set(i,new ne(this.flow,s,{onRemove:this._onChildRemove(i)}))}willUpdate(e){if(this.type==="decimal")return;const t=this.el.getBoundingClientRect();this._prevOffset=t[this.section.justify]-e[this.section.justify]}update(e){if(this.value!==e){const t=this._children.get(this.value);t&&(t.present=false);const i=this._children.get(e);if(i)i.present=true;else{const t=z("span",{className:"symbol__value",textContent:e});this.el.appendChild(t),this._children.set(e,new ne(this.flow,t,{animateIn:true,onRemove:this._onChildRemove(e)}))}}this.value=e}didUpdate(e){if(this.type==="decimal")return;const t=this.el.getBoundingClientRect()[this.section.justify]-e[this.section.justify],i=this._prevOffset-t;i&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}const ce="number-flow-connect",de="number-flow-update";class pe extends ee{constructor(){super(...arguments),this.connected=false}connectedCallback(){this.connected=true,this.dispatchEvent(new Event(ce,{bubbles:true}))}disconnectedCallback(){this.connected=false}get value(){return this._value}update(e){(!this._formatter||this._prevFormat!==this.format||this._prevLocales!==this.locales)&&(this._formatter=new Intl.NumberFormat(this.locales,this.format),this._prevFormat=this.format,this._prevLocales=this.locales),e!=null&&(this._value=e),this.dispatchEvent(new Event(de,{bubbles:true})),this.data=L(this._value,this._formatter,this.numberPrefix,this.numberSuffix)}}P("number-flow",pe);const he=".summary-container {\n width: 100%;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n gap: 40px;\n background-color: var(--rebill-color-background-right);\n}\n.summary-header {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n}\n\n.trial-pill {\n background-color: var(--rebill-color-green-light-2);\n border-radius: 4px;\n padding: 4px 6px 4px 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.total-amount-container {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n}\n\n@media (max-width: 1024px) {\n .summary-container {\n gap: 1.5rem !important;\n background-color: var(--rebill-color-background);\n }\n .summary-header {\n margin-top: 24px;\n }\n .summary-row.total {\n margin-top: 0 !important;\n }\n}\n\n.summary-card {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 24px;\n padding: 0px;\n background: #ffffff;\n}\n\n.summary-card-info {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n.summary-card-amount {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.summary-details {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n.summary-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n & > :nth-child(2) {\n text-align: right;\n }\n}\n\n.summary-row.total {\n margin-top: 1rem;\n font-weight: bold;\n}\n\n@media (min-width: 1025px) and (max-width: 1450px) {\n .summary-container {\n margin: 0px 10px;\n max-width: 400px;\n }\n}\n";const be=class{constructor(t){e(this,t)}totalAmount;itemTitle;itemDescription;itemAmount;planFrequency;planFrequencyCount;subtotal;discount;currency;displayedComponents=["totalAmount","discount","itemDetails","priceDetails","timelineFreeTrial","timelineDebitDay"];allowCoupon=false;currentBreakpoint=g.DESKTOP;discountApplied=false;totalFlow;discountType;discountedPercentage=0;discountDuration=0;discountAmount=0;getDurationTranslation(e){const t=this.planFrequency||o.MONTH;if(e===1){return r.translate(`summary.${t}_one`)}else{return r.translate(`summary.${t}_other`,{count:e})}}componentDidLoad(){this.updateTotalFlow()}componentDidUpdate(){this.updateTotalFlow()}updateTotalFlow(){if(this.totalFlow){this.totalFlow.format={style:"currency",currency:this.currency};this.totalFlow.update(Number(l.data.pricing.total))}}handleDiscountApplied(e){this.discountApplied=e.detail}getRecalculatedInstallmentAmount(){const e=l.data?.cardInformation?.installments?.selectedInstallment;if(!e){return 0}if(l.data.pricing.discountAmount>0){const t=l.data.pricing.subtotal;const i=l.data.pricing.totalWithoutInstallment;const a=i/t;return Math.round(e.installmentAmount*a*100)/100}return e.installmentAmount}renderTotalForPlan(){return l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.debitStrategy&&t("div",{class:"summary-row total"},t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},r.translate("summary.totalAmountToday")),t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},d(l.data.pricing.total,this.currency)))}renderTotalForPlanGeneral(){return l.data?.itemInformation?.type===c.PLAN&&!l.data?.itemInformation?.trial?.trialPeriodDays&&!l.data?.itemInformation?.debitStrategy&&t("div",{class:"summary-row total"},t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},r.translate("summary.totalAmount")),t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},d(l.data?.pricing?.total,this.currency)))}renderTotalForNonPlan(){return l.data?.itemInformation?.type!==c.PLAN&&t("div",{class:"summary-row total"},t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},r.translate("summary.totalAmount")),t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},d(l.data.pricing.total,this.currency)))}renderTrialPeriod(){return l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.trial?.trialPeriodDays&&t("div",{class:"summary-row"},t("rebill-typography",{variant:"body2"},r.translate("summary.totalAmountLastTrialPeriod")),t("rebill-typography",{variant:"body2"},d(l.data?.pricing?.total,this.currency),`/${r.translate(`summary.${this.planFrequency}`,{count:this.planFrequencyCount||1})} `))}renderDiscountAlertWrapper(){return l.data?.itemInformation?.trial?.trialPeriodDays&&t("div",{class:"summary-row"},t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},r.translate("summary.trialPeriodDaysDetails",{trialDays:l.data?.itemInformation?.trial?.trialPeriodDays,count:l.data?.itemInformation?.trial?.trialPeriodDays})),t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},r.translate("summary.free")))}render(){const e=(e=true,i=true,a=true)=>t("div",{class:"summary-card"},(e||i)&&t("div",{class:"summary-card-info"},e&&t("rebill-typography",{variant:"subtitle-bold",gutterBottom:true},this.itemTitle),i&&this.itemDescription&&t("rebill-typography",{variant:"body2"},this.itemDescription)),a&&t("div",{class:"summary-card-amount"},t("rebill-typography",{variant:"body2"},l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.debitStrategy?d(l.data?.pricing?.planAmount,this.currency):d(this.subtotal,this.currency))));const i=()=>{const e=[this.renderTotalForPlan(),this.renderTotalForPlanGeneral(),this.renderTotalForNonPlan(),this.renderTrialPeriod(),this.renderDiscountAlertWrapper()].filter(Boolean);if(e.length>1){e.splice(e.length-1,0,t("rebill-divider",null))}return t("div",{class:"summary-details"},t("div",{class:"summary-row"},t("rebill-typography",{variant:"body2"},r.translate("summary.subtotal")),t("rebill-typography",{variant:"body2"},l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.debitStrategy?d(l.data.pricing.planAmount,this.currency):d(this.subtotal,this.currency))),l.data.pricing.installments&&t("div",{class:"summary-row"},t("rebill-typography",{variant:"body2"},r.translate("summary.installments")),t("rebill-typography",{variant:"body2"},_(l.data?.pricing?.installments,this.getRecalculatedInstallmentAmount()))),this.allowCoupon&&!x(this.currentBreakpoint,g.DESKTOP)&&t("discount-coupon",null),!l.data?.itemInformation?.trial?.trialPeriodDays&&!l.data?.itemInformation?.debitStrategy&&t("rebill-divider",null),e.map((e=>t("div",{class:"summary-detail-wrapper"},e))))};const a=()=>this.planFrequency&&this.discountApplied&&(this.discountedPercentage>0||this.discountAmount>0)&&t("rebill-alert",{variant:"filled",type:"success",icon:"tag-sale",size:"medium",colorIcon:u.GREEN,message:this.discountDuration?r.translate(`summary.planDiscountDescriptionWithDuration`,{discount:this.discountType===p.PERCENTAGE?`${this.discountedPercentage}%`:d(this.discountAmount,this.currency),duration:this.getDurationTranslation(this.discountDuration)}):r.translate(`summary.planDiscountDescriptionWithoutDuration`,{discount:this.discountType===p.PERCENTAGE?`${this.discountedPercentage}%`:d(this.discountAmount,this.currency)})});return t("div",{class:"summary-container"},this.displayedComponents.includes("totalAmount")&&t("div",{class:"summary-header"},l.data?.itemInformation?.type===c.PLAN&&l.data.itemInformation?.trial?.trialPeriodDays&&t("div",{class:"trial-pill"},t("rebill-typography",{variant:"body2",align:"center",color:u.GREEN_TEXT},r.translate("summary.trialPill",{days:l.data?.itemInformation?.trial?.trialPeriodDays,count:l.data?.itemInformation?.trial?.trialPeriodDays}))),t("div",{class:"total-amount-container"},t("rebill-typography",{variant:"h4-span",align:"center",gutterBottom:true},t("number-flow",{ref:e=>this.totalFlow=e})),this.planFrequency&&t("rebill-typography",{variant:"body1",color:u.SECONDARY,align:"center",gutterBottom:true,style:{fontWeight:"normal"}},`/ ${r.translate(`summary.${this.planFrequency}`,{count:this.planFrequencyCount||1})}`)),l.data?.itemInformation?.type!==c.PLAN&&t("rebill-typography",{variant:"body2",align:"center",gutterBottom:true},r.translate("summary.totalAmount")),this.allowCoupon&&x(this.currentBreakpoint,g.DESKTOP)&&t("discount-coupon",{"hide-label":true})),this.displayedComponents.includes("itemDetails")&&(x(this.currentBreakpoint,g.DESKTOP)?t("collapsible-card",{header:r.translate("summary.details")},e(true,true,true)):t("collapsible-card",{header:this.itemTitle},e(false,!!this.itemDescription,true))),this.displayedComponents.includes("discount")&&x(this.currentBreakpoint,g.DESKTOP)&&!l.data?.itemInformation?.trial?.trialPeriodDays&&!l.data?.itemInformation?.debitStrategy&&a(),this.displayedComponents.includes("timelineFreeTrial")&&l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.trial?.trialPeriodDays&&!x(this.currentBreakpoint,g.DESKTOP)&&t("rebill-timeline-free-trial",{"trial-period-ends-at":l.data?.itemInformation?.trial?.trialPeriodEndsAt,"trial-period-ends-reminder-at":l.data?.itemInformation?.trial?.trialPeriodEndsReminderAt,"trial-period-days":l.data?.itemInformation?.trial?.trialPeriodDays,subtotal:l.data.pricing.subtotal,currency:l.data.pricing.currency,"discount-applied":this.discountApplied,"discount-type":this.discountType,"discounted-percentage":this.discountedPercentage,"discount-duration":this.discountDuration,"discount-amount":this.discountAmount}),this.displayedComponents.includes("timelineDebitDay")&&l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.debitStrategy&&l.data?.itemInformation?.debitDay&&!x(this.currentBreakpoint,g.DESKTOP)&&t("rebill-timeline-debit-day",{"debit-day":l.data?.itemInformation?.debitDay,"total-amount":l.data?.pricing?.total,"plan-amount":l.data?.pricing?.planAmount,currency:l.data?.pricing?.currency,"debit-strategy":l.data?.itemInformation?.debitStrategy,"discount-applied":this.discountApplied,"discount-type":this.discountType,"discounted-percentage":this.discountedPercentage,"discount-duration":this.discountDuration,"discount-amount":this.discountAmount}),this.displayedComponents.includes("priceDetails")&&(x(this.currentBreakpoint,g.DESKTOP)?t("collapsible-card",{header:r.translate("summary.summary")},i()):i()),this.displayedComponents.includes("timelineFreeTrial")&&l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.trial?.trialPeriodDays&&x(this.currentBreakpoint,g.DESKTOP)&&t("rebill-timeline-free-trial",{"trial-period-ends-at":l.data?.itemInformation?.trial?.trialPeriodEndsAt,"trial-period-ends-reminder-at":l.data?.itemInformation?.trial?.trialPeriodEndsReminderAt,"trial-period-days":l.data?.itemInformation?.trial?.trialPeriodDays,subtotal:l.data?.pricing?.subtotal,currency:l.data?.pricing?.currency,"discount-applied":this.discountApplied,"discount-type":this.discountType,"discounted-percentage":this.discountedPercentage,"discount-duration":this.discountDuration,"discount-amount":this.discountAmount}),this.displayedComponents.includes("timelineDebitDay")&&l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.debitStrategy&&l.data?.itemInformation?.debitDay&&x(this.currentBreakpoint,g.DESKTOP)&&t("rebill-timeline-debit-day",{"debit-day":l.data?.itemInformation?.debitDay,"total-amount":l.data?.pricing?.total,"plan-amount":l.data?.pricing?.planAmount,currency:l.data?.pricing?.currency,"debit-strategy":l.data?.itemInformation?.debitStrategy,"discount-applied":this.discountApplied,"discount-type":this.discountType,"discounted-percentage":this.discountedPercentage,"discount-duration":this.discountDuration,"discount-amount":this.discountAmount}),this.displayedComponents.includes("discount")&&!x(this.currentBreakpoint,g.DESKTOP)&&!l.data?.itemInformation?.trial?.trialPeriodDays&&!l.data?.itemInformation?.debitStrategy&&a())}};be.style=he;const me=":host{display:block;position:relative}.test-mode-container{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:8px}.info-icon{margin-right:4px;display:flex;align-items:center}.test-mode-chip{display:flex;min-width:149px;height:40px;background:#ffffff;border:1px solid #e5e7eb;border-radius:20px;box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden;position:relative;z-index:10}.test-mode-chip.expanded{max-width:579px;height:40px;flex-direction:row;border-radius:20px;justify-content:space-between}.test-mode-container.cards-visible .test-mode-chip.expanded{border-radius:0 0 20px 20px;width:579px}.chip-content{display:flex;align-items:center;gap:2px;justify-content:space-between;min-height:24px;flex-shrink:0;margin-left:18px;margin-right:8px}.chip-content .info-icon{display:flex !important;align-items:center !important;vertical-align:middle !important}.chip-content rebill-typography{display:flex !important;align-items:center !important;line-height:1.5 !important}.test-mode-chip.expanded .chip-content{justify-content:flex-start;width:auto;margin-right:12px}.test-mode-panel{display:flex;align-items:center;width:100%;justify-content:space-between;animation:slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.test-mode-panel.closing{animation:slideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.panel-sections{display:flex;align-items:center;gap:12px;flex:1;justify-content:space-between;margin:8px}.cards-section{display:flex;align-items:center;cursor:pointer;border-radius:8px;transition:background-color 0.2s ease}.cards-section .cards-button{display:flex !important;align-items:center !important;justify-content:flex-start !important;margin-left:4px !important}.cards-section .cards-button .card-icon{display:flex !important;align-items:center !important;margin-right:8px !important;vertical-align:middle !important}.cards-section .cards-button rebill-typography{display:flex !important;align-items:center !important;line-height:1 !important}.registration-section{display:flex;align-items:center;gap:2px;cursor:pointer;transition:background-color 0.2s ease;flex:1;min-width:0}.cards-dropdown-panel{position:absolute;bottom:40px;left:0;width:579px;background:#ffffff;border-top:1px solid #e5e7eb;border-left:1px solid #e5e7eb;border-right:1px solid #e5e7eb;border-bottom:none;border-radius:16px 16px 0 0;z-index:15;animation:expandUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);transform-origin:bottom center;transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.cards-dropdown-panel.closing{animation:collapseDown 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.card-section{display:flex;flex-direction:column;justify-content:space-between}.header-content{display:flex;align-items:center;gap:8px;margin:8px}.card-details{background:#fafafa;border-radius:8px;border:1px solid #e5e7eb;margin:8px;min-height:223.7px;display:flex;flex-direction:column;justify-content:space-around;padding:16px}.card-row{display:flex;flex-direction:row;gap:24px;align-items:center;background:#ffffff;justify-content:space-around;border-radius:8px;border:1px solid #e5e7eb;width:531px;height:68px}.card-field{display:flex;flex-direction:column;gap:8px;flex:1}.field-value{display:flex;flex-direction:row;align-items:center;gap:8px;max-height:20px}.copy-button{align-items:center}@keyframes slideIn{from{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes slideOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-20px)}}@keyframes expandUp{from{opacity:0;transform:translateY(10px) scaleY(0.9)}to{opacity:1;transform:translateY(0) scaleY(1)}}@keyframes collapseDown{from{opacity:1;transform:translateY(0) scaleY(1)}to{opacity:0;transform:translateY(10px) scaleY(0.9)}}";const ue=class{constructor(t){e(this,t)}get el(){return i(this)}isPanelVisible=false;isPanelClosing=false;isCardsPanelVisible=false;isCardsPanelClosing=false;currentLanguage=r.getCurrentLanguage();componentWillLoad(){h.on("languageChanged",this.handleLanguageChange)}disconnectedCallback(){h.off("languageChanged",this.handleLanguageChange)}handleLanguageChange=()=>{this.currentLanguage=r.getCurrentLanguage()};togglePanel=()=>{if(this.isPanelVisible){this.isPanelClosing=true;if(this.isCardsPanelVisible){this.isCardsPanelClosing=true}setTimeout((()=>{this.isPanelVisible=false;this.isPanelClosing=false;this.isCardsPanelVisible=false;this.isCardsPanelClosing=false}),300)}else{this.isPanelVisible=true}};togglePanelCards=()=>{if(this.isCardsPanelVisible){this.isCardsPanelClosing=true;setTimeout((()=>{this.isCardsPanelVisible=false;this.isCardsPanelClosing=false}),300)}else{this.isCardsPanelVisible=true}};handleCopy=e=>{f(e);this.isCardsPanelClosing=true;setTimeout((()=>{this.isCardsPanelVisible=false;this.isCardsPanelClosing=false}),300)};handleDocsClick=()=>{window.open("https://v3.docs.rebill.com/sdk/checkout","_blank")};renderBasicChip(){return t("div",{class:"chip-content"},t("div",{class:"info-icon"},t("rebill-icon",{name:"circle-info",size:"16px",color:u.ORANGE})),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK,style:{display:"flex",alignItems:"center",justifyContent:"center"}},r.translate("sandbox.testMode")),!this.isPanelVisible&&t("div",{class:"arrow-icon"},t("rebill-button",{variant:"text",size:"small",onClick:this.togglePanel},t("rebill-icon",{name:"arrow-right-circle"}))))}renderExpandedChip(){return t("div",{class:`test-mode-panel ${this.isPanelClosing?"closing":""}`},t("div",{class:"panel-sections"},t("div",{class:"cards-section",onClick:this.togglePanelCards},t("rebill-button",{variant:"text",size:"small",class:"cards-button"},t("rebill-icon",{name:"card-test",class:"card-icon"}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},`${r.translate("sandbox.cards")} `),t("rebill-icon",{key:this.isCardsPanelVisible?"chevron-up":"chevron-down",name:this.isCardsPanelVisible?"chevron-up":"chevron-down",style:{marginLeft:"8px"}}))),t("div",{class:"docs-section"},t("rebill-button",{variant:"text",size:"small",onClick:this.handleDocsClick},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY},r.translate("sandbox.docs")),t("rebill-icon",{name:"external-link",style:{marginLeft:"8px"}}))),t("rebill-button",{variant:"text",size:"small",onClick:this.togglePanel},t("rebill-icon",{name:"close"}))))}renderCardsPanel(){return t("div",{class:`cards-dropdown-panel ${this.isCardsPanelClosing?"closing":""}`},t("div",{class:"card-details"},t("div",{class:"card-section"},t("div",{class:"header-content"},t("rebill-icon",{name:"succes",color:u.GREEN}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("sandbox.successPayment"))),t("div",{class:"card-row"},t("div",{class:"card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cardNumber")),t("div",{class:"field-value"},t("rebill-icon",{name:"visa"}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"4539148803436467"))),t("div",{class:"card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.expiryDate")),t("div",{class:"field-value"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"01/99"))),t("div",{class:"card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cvv")),t("div",{class:"field-value"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"123"),t("div",{class:"copy-button"},t("rebill-button",{variant:"text",size:"small",onClick:()=>this.handleCopy("4539148803436467 01/99 123")},t("rebill-icon",{name:"copy"}))))))),t("div",{class:"card-section"},t("div",{class:"header-content"},t("rebill-icon",{name:"rejected",color:u.ERROR}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("sandbox.rejectedPayment"))),t("div",{class:"card-row"},t("div",{class:"card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cardNumber")),t("div",{class:"field-value"},t("rebill-icon",{name:"visa"}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"4485364739527352"))),t("div",{class:"card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.expiryDate")),t("div",{class:"field-value"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"01/99"))),t("div",{class:"card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cvv")),t("div",{class:"field-value"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"123"),t("div",{class:"copy-button"},t("rebill-button",{variant:"text",size:"small",onClick:()=>this.handleCopy("4485364739527352 01/99 123")},t("rebill-icon",{name:"copy"})))))))))}render(){return t("div",{key:"fde7a239adcecb9f762a151c7dfc6d4ff8c9fac4",class:`test-mode-container ${this.isCardsPanelVisible||this.isCardsPanelClosing?"cards-visible":""}`},t("div",{key:"d529f91d83bb8f16872e6d388cf60c9e42ba89c9",class:`test-mode-chip ${this.isPanelVisible?"expanded":""}`},this.renderBasicChip(),(this.isPanelVisible||this.isPanelClosing)&&this.renderExpandedChip()),(this.isPanelVisible||this.isCardsPanelClosing)&&(this.isCardsPanelVisible||this.isCardsPanelClosing)&&this.renderCardsPanel())}};ue.style=me;const fe=".otp__otp-container{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;position:relative;margin-top:2rem}.otp__user-information{display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;gap:8px}.otp__otp-description-container{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:4px}.otp__change-email{cursor:pointer;text-decoration:underline;margin-left:0}.otp__change-email:hover{color:var(--rebill-primary-color);text-decoration:underline}.otp__alternative{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:16px;margin:32px;width:100%}.otp__rebill-alert{width:100%}.otp__guest-options{display:flex;flex-direction:column;width:100%;gap:8px;margin-top:auto}.otp__verifying-container{display:flex;align-items:center;justify-content:center;gap:16px;margin:8px 0}.otp__code-resent-container rebill-typography{display:flex;line-height:1}.otp__code-resent-container rebill-icon{flex-shrink:0;display:inline-flex;vertical-align:middle;margin-right:8px}.otp__spinner{width:15px;height:15px;border:2px solid rgba(255, 255, 255, 0.3);border-radius:50%;border-top-color:var(--rebill-color-primary);animation:spin 1s linear infinite;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}@media (max-width: 1024px){.otp__otp-container{min-height:calc(100vh - 40px)}.otp__guest-options{margin-top:32px}}@media (min-width: 1025px){.otp__otp-container{justify-content:flex-start}.otp__guest-options{margin-top:auto;padding-bottom:2rem}}";const ye=class{constructor(t){e(this,t);this.changeEmailClick=a(this,"changeEmailClick");this.returnForm=a(this,"returnForm");this.codeVerified=a(this,"codeVerified")}changeEmailClick;timeLeft=59;isTimerRunning=false;codeResent=false;isVerifying=false;otpValue="";returnForm;codeVerified;error=false;timer=y({duration:59,onTick:e=>{this.timeLeft=e},onComplete:()=>{this.isTimerRunning=false}});messageTimer=y({duration:5,onComplete:()=>{this.codeResent=false}});disconnectedCallback(){this.timer.stop()}startTimer(){this.timer.start();this.isTimerRunning=true}handleResendCode=async()=>{if(!this.isTimerRunning){await n.otp.generate(l.data.sessionId,{email:l.data.userInformation.email});this.codeResent=true;this.messageTimer.start();this.startTimer();this.error=false}};handleOtpChange=e=>{this.otpValue=e;if(e.length===6){this.handleVerifyOtp(e);this.error=false}};handleVerifyOtp=async e=>{this.isVerifying=true;try{const t=await n.otp.verify(l.data.sessionId,{email:l.data.userInformation.email,code:e});this.codeVerified.emit(t.data);b.setUserInformation({...t.data.customer,fullName:`${t.data.customer.firstName} ${t.data.customer.lastName}`.trim(),phoneNumber:{number:t.data.customer.phoneNumbers[0].number,countryCode:t.data.customer.phoneNumbers[0].countryCode},address:{billingAddress:{address:t.data.customer.addresses[0].lineOne,zip:t.data.customer.addresses[0].zipCode,city:t.data.customer.addresses[0].city,state:t.data.customer.addresses[0].state,country:t.data.customer.addresses[0].country}},documentType:t.data.customer.identifications[0].type,documentNumber:t.data.customer.identifications[0].value});b.setAccessToken(t.data.accessToken);b.setCustomerId(t.data.customer.id);this.otpValue="";this.error=false}catch(e){this.error=true}finally{this.isVerifying=false}};render(){return t("div",{key:"2caf50e0462cb4833cb0fc5e1565dc87db3c069f",class:"otp__otp-container"},t("div",{key:"0a7d48f7052803410b1b2b56f53cd1ba80b9c3e1",class:"otp__user-information"},t("div",{key:"5ab3ee4e570365a546a077326a069d78c122f0fb",class:"otp__otp-description-container"},t("rebill-typography",{key:"98b4487e64451bf0ab088753e147d1844adb8a7e",variant:"body2",class:"otp__otp-description"},r.translate("otp.description")),t("rebill-typography",{key:"0c26af0f6c2ec5b73db7729e950f17412567fc7b",variant:"subtitle-bold",class:"otp__otp-description-digits"}," ",t("strong",{key:"8c88db377dc4143fe1e21d3186c5ed6fd9528d06"},r.translate("otp.descriptionDigits"))," "),t("rebill-typography",{key:"09a2044dcfd408684a94d3001c30175a07a8e67a",variant:"body2",class:"otp__otp-description-email"},r.translate("otp.descriptionEmail"))),t("rebill-typography",{key:"2d47d49872d1be37e7db1be79f523a2e25f5f9e1",variant:"body2",class:"otp__otp-email-line"},l.data.userInformation.email," ",!l.data.prefilledData?.email&&t("span",{key:"2a6e5906689bd067d479a630af58f38077d5ee16",class:"otp__change-email",onClick:()=>{this.otpValue="";this.error=false;this.returnForm.emit(false)}},r.translate("otp.change")))),t("input-otp",{key:"4ca95108b6879ffd28ba3ae7b4cea1e96e93d088",otp:this.otpValue,onOtpChange:e=>this.handleOtpChange(e.detail),error:this.error?r.translate("otp.error"):""}),this.isVerifying&&t("div",{key:"9ba200515975990f80fdf8106a06c478e60b9a22",class:"otp__verifying-container"},t("rebill-typography",{key:"47b68cffc40bd7908a9b5f71d3d71b0055517888",variant:"subtitle2",color:u.PRIMARY},r.translate("otp.verifyingCode")),t("div",{key:"a5a8988084664300ad4fb4ea9f1fc7f3414c4927",class:"otp__spinner"})),t("rebill-button",{key:"89919d9d6501a4d8d9995963bf0322fe40bc394a",type:"button",variant:"outline",theme:this.isTimerRunning?"secondary":"primary",disabled:this.isTimerRunning,onClick:this.handleResendCode,size:"small",style:{height:"24px",marginBottom:"8px"}},this.isTimerRunning?`${r.translate("otp.resendCodeIn")} (${this.timer.getFormattedTime()})`:r.translate("otp.resendCode")),this.codeResent&&t("div",{key:"b5c1814c191b43546968a410da45e9a9d408baab",class:"otp__code-resent-container"},t("rebill-typography",{key:"9c22e91bc80d274885ed15676d8aea97f5747c3d",variant:"subtitle2",color:u.GREEN},t("rebill-icon",{key:"77fbf963094591deb8598bea2eef3699b79a4acc",name:"check-radio"}),r.translate("otp.codeResent"))),t("rebill-alert",{key:"985d1a4851d5844d44f814e66c4547326a323a32",class:"otp__rebill-alert",type:"secure",variant:"variant-info",message:r.translate("otp.infoMessage"),icon:"circle-info",alertTitle:r.translate("otp.infoTitle"),colorIcon:u.PRIMARY_DARK_LIGHT}),t("div",{key:"35973091d035ad398d14cb6a090aa6dc1ca5df59",class:"otp__alternative"},t("rebill-typography",{key:"a72bf2f9bacc7ff1a5b2a13acc5e63c29f5eade8",variant:"body2",color:u.PRIMARY_DARK},"o")),t("div",{key:"9372d19cf27f07555deb996fadcbd650962b89dc",class:"otp__guest-options"},t("rebill-button",{key:"56d5c69a58d59d9eb8285844dcac0e9821904793",type:"button",variant:"outline",theme:"secondary",size:"medium",onClick:()=>{this.otpValue="";this.error=false;this.returnForm.emit(false)}},r.translate("otp.continueAsGuest")),t("rebill-alert",{key:"6680fb829d6358d239d5f3491fed6144d9633559",type:"secure",variant:"variant-secure",icon:"lock-outline",message:r.translate("otp.secureMessage")})))}};ye.style=fe;const ge=".modal-overlay{position:fixed;top:0;left:0;right:0;background-color:transparent;display:flex;align-items:center;justify-content:center;z-index:10000;padding:12px 16px;box-sizing:border-box}.modal-content{background:white;border-radius:8px;padding:16px 20px;width:350px;box-shadow:0 4px 12px -2px rgba(0, 0, 0, 0.15),\n 0 2px 4px -1px rgba(0, 0, 0, 0.1);position:relative;display:flex;align-items:center;gap:12px}.modal-content .alert{margin:0;flex:1;padding:0;background:transparent;border:none;box-shadow:none}.modal-content .alert{background-color:transparent !important;border-color:transparent !important}.modal-content .alert-message{display:flex;flex-direction:column;gap:4px}.modal-content .close-button{position:absolute;top:8px;right:8px;width:20px;height:20px;border:none;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:background-color 0.2s ease;padding:0;margin:0;outline:none;box-shadow:none;line-height:1}.modal-content .close-button:focus{outline:none;box-shadow:none}.modal-content .close-button:hover{background-color:#f0f0f0}.modal-content .close-button rebill-icon{width:16px;height:16px;display:flex;align-items:center;justify-content:center}@media (max-width: 768px){.modal-overlay{padding:8px 12px}.modal-content{padding:12px 16px;flex-direction:column;gap:8px;text-align:center}.modal-content .close-button{width:100%}}";const xe=class{constructor(t){e(this,t)}visible=true;languageUpdateTrigger=0;unsubscribeCurrentLocaleStore;autoCloseTimer;componentDidLoad(){this.unsubscribeCurrentLocaleStore=b.onChange("currentLocale",(()=>{this.languageUpdateTrigger++}));this.autoCloseTimer=y({duration:30,onComplete:()=>{this.closeModal()}});this.autoCloseTimer.start()}disconnectedCallback(){if(this.unsubscribeCurrentLocaleStore){this.unsubscribeCurrentLocaleStore()}if(this.autoCloseTimer){this.autoCloseTimer.stop()}}closeModal=()=>{this.visible=false;if(this.autoCloseTimer){this.autoCloseTimer.stop()}};render(){if(!this.visible)return null;return t("div",{class:"modal-overlay"},t("div",{class:"modal-content"},t("div",{class:"alert info filled medium"},t("div",{class:"alert-icon"},t("rebill-icon",{name:"circle-info",size:"16px",color:u.ORANGE})),t("div",{class:"alert-message"},t("div",{class:"alert-title"},t("rebill-typography",{variant:"subtitle-bold",color:u.PRIMARY_DARK},r.translate("session.refreshedTitle"))),t("div",{class:"alert-message-text"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("session.refreshedMessage"))))),t("button",{onClick:this.closeModal,class:"close-button",type:"button"},t("rebill-icon",{name:"close",size:"20px"}))))}};xe.style=ge;const ve=":host{display:flex;position:relative;width:100%;justify-content:center;align-items:center}.mode-sandbox-mobile__test-mode-container{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.mode-sandbox-mobile__overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);z-index:5;animation:fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);pointer-events:auto;cursor:pointer}.mode-sandbox-mobile__test-mode-chip-mobile{display:flex;width:100%;min-width:auto;max-width:100%;height:40px;background:#ffffff;border:1px solid #e5e7eb;border-radius:20px;box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden;position:relative;z-index:20}.mode-sandbox-mobile__chip-content-mobile{display:flex;align-items:center;gap:2px;justify-content:flex-end;min-height:24px;flex-shrink:0;width:100%;margin:8px}.mode-sandbox-mobile__info-icon{display:flex;align-items:center}.mode-sandbox-mobile__test-mode-chip-mobile.expanded .mode-sandbox-mobile__chip-content-mobile{justify-content:flex-end;width:100%}.mode-sandbox-mobile__cards-dropdown-panel-header{display:flex;align-items:center;gap:8px;padding:8px}.mode-sandbox-mobile__docs-section{display:flex;align-items:center;gap:8px;cursor:pointer;margin-left:0;transition:background-color 0.2s ease;justify-content:flex-end;padding:8px;margin-top:8px}.mode-sandbox-mobile__cards-dropdown-panel{position:absolute;top:100%;left:0;right:0;width:100%;background:#ffffff;border-top:none;border-left:1px solid #e5e7eb;border-right:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;margin-top:16px;z-index:25;animation:expandDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);transform-origin:top center}.mode-sandbox-mobile__card-section{display:flex;flex-direction:column;justify-content:space-between}.mode-sandbox-mobile__header-content{display:flex;align-items:center;gap:8px;margin:8px}.mode-sandbox-mobile__card-details{background:#fafafa;border-radius:8px;border:1px solid #e5e7eb;margin:8px;min-height:208px;display:flex;flex-direction:column}.mode-sandbox-mobile__card-row{display:flex;gap:12px;align-items:stretch;background:#ffffff;justify-content:space-around;border-radius:8px;border:1px solid #e5e7eb;height:auto;padding:8px;margin:8px}.mode-sandbox-mobile__card-value{display:flex;flex-direction:column;gap:6px;flex:1}.mode-sandbox-mobile__field-value{display:flex;flex-direction:row;align-items:center;gap:8px;max-height:20px}.mode-sandbox-mobile__copy-button{align-items:center;margin-left:auto;margin-right:0}.mode-sandbox-mobile__icon-button{margin-left:auto;margin-right:16px}@keyframes expandDown{from{opacity:0;transform:translateY(-10px) scaleY(0.9)}to{opacity:1;transform:translateY(0) scaleY(1)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}";const _e=class{constructor(t){e(this,t)}get el(){return i(this)}isPanelVisible=false;currentLanguage=r.getCurrentLanguage();componentWillLoad(){h.on("languageChanged",this.handleLanguageChange)}disconnectedCallback(){h.off("languageChanged",this.handleLanguageChange)}handleLanguageChange=()=>{this.currentLanguage=r.getCurrentLanguage()};togglePanel=()=>{this.isPanelVisible=!this.isPanelVisible};handleCopy=e=>{f(e);this.isPanelVisible=false};handleDocsClick=()=>{window.open("https://v3.docs.rebill.com/sdk/checkout","_blank")};renderBasicChip(){return t("div",{class:"mode-sandbox-mobile__chip-content-mobile"},t("div",{class:"mode-sandbox-mobile__info-icon"},t("rebill-icon",{name:"circle-info",size:"24px",color:u.ORANGE})),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("sandbox.testMode")),t("div",{class:"mode-sandbox-mobile__icon-button"},t("rebill-button",{variant:"text",size:"small",onClick:this.togglePanel},t("rebill-icon",{name:"hamburger"}))))}renderCardsPanel(){return t("div",{class:"mode-sandbox-mobile__cards-dropdown-panel"},t("div",{class:"mode-sandbox-mobile__cards-dropdown-panel-header"},t("rebill-icon",{name:"card-test"}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("sandbox.cardTest"))),t("div",{class:"mode-sandbox-mobile__card-details"},t("div",{class:"mode-sandbox-mobile__card-section"},t("div",{class:"mode-sandbox-mobile__header-content"},t("rebill-icon",{name:"succes",color:u.GREEN}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("sandbox.successPayment"))),t("div",{class:"mode-sandbox-mobile__card-row"},t("div",{class:"mode-sandbox-mobile__card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cardNumber")),t("div",{class:"mode-sandbox-mobile__field-value"},t("rebill-icon",{name:"visa"}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"4539148803436467"))),t("div",{class:"mode-sandbox-mobile__card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.exp")),t("div",{class:"mode-sandbox-mobile__field-value"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"01/99"))),t("div",{class:"mode-sandbox-mobile__card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cvv")),t("div",{class:"mode-sandbox-mobile__field-value mode-sandbox-mobile__field-value-with-copy"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"123"),t("div",{class:"mode-sandbox-mobile__copy-button"},t("rebill-button",{variant:"text",size:"small",onClick:()=>this.handleCopy("4539148803436467 01/99 123")},t("rebill-icon",{name:"copy"}))))))),t("div",{class:"mode-sandbox-mobile__card-section"},t("div",{class:"mode-sandbox-mobile__header-content"},t("rebill-icon",{name:"rejected",color:u.ERROR}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("sandbox.rejectedPayment"))),t("div",{class:"mode-sandbox-mobile__card-row"},t("div",{class:"mode-sandbox-mobile__card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cardNumber")),t("div",{class:"mode-sandbox-mobile__field-value"},t("rebill-icon",{name:"visa"}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"4485364739527352"))),t("div",{class:"mode-sandbox-mobile__card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.exp")),t("div",{class:"mode-sandbox-mobile__field-value"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"01/99"))),t("div",{class:"mode-sandbox-mobile__card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cvv")),t("div",{class:"mode-sandbox-mobile__field-value mode-sandbox-mobile__field-value-with-copy"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"123"),t("div",{class:"mode-sandbox-mobile__copy-button"},t("rebill-button",{variant:"text",size:"small",onClick:()=>this.handleCopy("4485364739527352 01/99 123")},t("rebill-icon",{name:"copy"})))))))),t("div",{class:"mode-sandbox-mobile__docs-section",onClick:this.handleDocsClick},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY},r.translate("sandbox.docs")),t("rebill-icon",{name:"external-link"})))}render(){return t("div",{key:"5797f1ee6f26ef47ba16e103ced89d74574d3ea7",class:`mode-sandbox-mobile__test-mode-container ${this.isPanelVisible?"cards-visible":""}`},this.isPanelVisible&&t("div",{key:"c9ff3977ef585a7abd28f2da25ef9dd18d7f9d00",class:"mode-sandbox-mobile__overlay"}),t("div",{key:"e3dd9ab7e2bfa1573402ef6b80a2ca50947da702",class:`mode-sandbox-mobile__test-mode-chip-mobile ${this.isPanelVisible?"expanded":""}`},this.renderBasicChip()),this.isPanelVisible&&this.renderCardsPanel())}};_e.style=ve;const ke=":root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-hover:#001c4a;--rebill-color-primary-dark-light:rgba(0, 17, 49, 0.1);--rebill-color-error:#ef4444;--rebill-color-error-background:#fef2f2;--rebill-color-error-light:rgba(239, 68, 68, 0.1);--rebill-color-error-dark:#6f101b;--rebill-color-background:#ffffff;--rebill-color-background-left:#fafafa;--rebill-color-background-right:#f4f5f6;--rebill-color-background-secondary:#f7f8fa;--rebill-color-border:#ebedef;--rebill-color-timeline-connector:#c4c8cf;--rebill-color-neutrals-700:#58616e;--rebill-color-neutrals-500:#9ca3af;--rebill-color-border-primary:#e4e4e7;--rebill-color-text-primary:#3b4049;--rebill-color-text-secondary:#6b7280;--rebill-color-grey-700:#7d7d7d;--rebill-color-text-secondary-light:#a1a1aa;--rebill-color-text-on-primary:#ffffff;--rebill-color-disabled:#9ca3af;--rebill-color-shadow:rgba(0, 0, 0, 0.1);--rebill-color-green:#10b981;--rebill-color-green-text:#257c67;--rebill-color-green-light:rgba(183, 233, 221, 0.15);--rebill-color-green-light-2:rgba(183, 233, 221, 1);--rebill-color-info-background:#d5e4ff;--rebill-color-info-border:#0156f6;--rebill-color-info-text:#172b85;--rebill-color-background-secondary-light:#f7f8fa;--rebill-breakpoint-mobile:768px;--rebill-breakpoint-tablet:1024px;--rebill-breakpoint-desktop:1025px;--rebill-color-orange:#ff9400;--rebill-color-black:#1e2025;--rebill-color-grey-300:#3b4049;--rebill-color-grey-100:#aeaeae}.qr-container,.qr-image,.qr-image svg,.qr-image img,[class*='qr-'],[class*='success'],[class*='receipt']{transition:none !important;animation:none !important;will-change:auto !important}button:active,button:focus,button:hover{isolation:isolate}.success-page__text-content{margin-bottom:2rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.success-page__success-content{display:flex;flex-direction:column;align-items:center;gap:1rem;width:100%;overflow-x:hidden;box-sizing:border-box}.success-page__lottie-container{width:80px;height:80px}.success-page__success-content rebill-typography[variant='h3']{margin:0 !important;padding:0 !important}.success-page__success-icon{display:flex;justify-content:center;margin:0.5rem 0}.success-page__info-card{padding:24px;gap:16px;width:100%;max-width:450px;border:1px solid #ebedef;border-radius:8px;display:flex;flex-direction:column;box-sizing:border-box}.success-page__card-row{display:flex;justify-content:space-between;align-items:start;min-height:20px;gap:15%}.success-page__card-row:last-of-type{margin-bottom:0}.success-page__card-value{display:flex;align-items:center;gap:0.5rem}.success-page__payment-method-display{display:flex;align-items:center;gap:8px;justify-content:center}.success-page__payment-method-display rebill-card-icon{display:inline-block;flex-shrink:0;margin-right:8px;vertical-align:middle}.success-page__payment-method-display rebill-card-icon svg{display:block}.success-page__payment-method-display rebill-icon{display:inline-block;vertical-align:middle;margin-right:8px}.success-page__payment-method-display rebill-icon div{display:block}.success-page__card-divider{height:1px;background:#e5e7eb}.success-page__download-container{display:flex;align-items:center;justify-content:flex-start;gap:2px;text-decoration:none;cursor:pointer}.success-page__contact-info{text-align:left}.success-page__reference-number{word-break:break-all;overflow-wrap:break-word;hyphens:auto;max-width:100%;text-align:right}.success-page__total-amount-container{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-direction:row}.success-page__trial-pill{background-color:var(--rebill-color-green-light-2);border-radius:4px;padding:4px 6px 4px 6px;display:flex;align-items:center;justify-content:center}.success-page__next-charge-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px}.success-page__next-charge-details{display:flex;justify-content:space-between;align-items:flex-start}.success-page__next-charge-amount{display:flex;flex-direction:row;align-items:center;gap:4px}.success-page__next-charge-date{text-align:right}.success-page__next-charge-section{margin-top:12px;padding-top:12px}@media (max-width: 1024px){.success-page__success-content{max-width:100%;gap:1.5rem;margin-left:16px;margin-right:16px}.success-page__info-card{width:100%;max-width:100%;padding:12px}.success-page__text-content{gap:12px}}@media (max-width: 767px){.success-page__info-card{padding:12px}.success-page__processing-container{padding:0 16px}}";const we=class{constructor(t){e(this,t);this.successRedirect=a(this,"successRedirect")}typePaymentMethod=m.CARD;country="";bank="";paymentMethodName="";cardLastFour="";paymentDate="";referenceNumber="";trialPeriodDays=0;debitDay=0;planAmount=0;currentLocale=l.currentLocale;breakpoint=g.DESKTOP;successRedirect;loaderProgress=0;isLoadingLottie=true;showRedirectMessage=false;timeToRedirect=3e3;progressInterval;lottieContainer;lottieAnimation;unsubscribeCurrentLocaleStore;successDisplayTimeout;applyStartCaseToBrand=e=>{if(!e)return"";return e.toLowerCase().split(/[\s-]+/).map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")};getPaymentMethodConfig(e){const t=this.country?D(this.country):null;const i=t?.find((t=>t.type===e));const a={[m.CARD]:{key:m.CARD,label:r.translate("paymentMethods.card"),icons:["doblecard"]},[m.CASH]:{key:m.CASH,label:r.translate("paymentMethods.cash"),icons:["pago-facil"]},[m.BANK_TRANSFER]:{key:m.BANK_TRANSFER,label:r.translate("paymentMethods.bank_transfer"),icons:["plus"]}};const s=a[e];return{...s,icons:i?.icons||s.icons}}getPaymentDate=()=>this.paymentDate||"";componentWillLoad(){this.breakpoint=v(window.innerWidth);this.unsubscribeCurrentLocaleStore=b.onChange("currentLocale",(()=>{this.currentLocale=l.currentLocale}));if(l.data?.itemInformation?.redirectSuccess){this.successDisplayTimeout=window.setTimeout((()=>{this.showRedirectMessage=true;this.loadLottieAnimation()}),1500);setTimeout((()=>{let e=l.data?.itemInformation?.redirectSuccess;if(e){this.successRedirect.emit({redirectUrl:e});this.stopLoaderAnimation()}}),this.timeToRedirect)}}componentDidLoad(){window.addEventListener("resize",this.handleResize);if(!l.data?.itemInformation?.redirectSuccess||this.showRedirectMessage){this.loadLottieAnimation()}}disconnectedCallback(){if(this.unsubscribeCurrentLocaleStore){this.unsubscribeCurrentLocaleStore()}if(this.successDisplayTimeout){clearTimeout(this.successDisplayTimeout)}window.removeEventListener("resize",this.handleResize);this.stopLoaderAnimation()}handleResize=()=>{this.breakpoint=v(window.innerWidth)};loadLottieAnimation=async()=>{try{const e=await import("./p-GK75wIKe.js").then((function(e){return e.l}));const t=await fetch($(`loader-redirect1.json`));const i=await t.json();if(this.lottieContainer){this.lottieAnimation=e.default.loadAnimation({container:this.lottieContainer,renderer:"svg",loop:true,autoplay:true,animationData:i})}else{this.startLoaderAnimation()}}catch(e){this.startLoaderAnimation()}};startLoaderAnimation=()=>{const e=3e3;const t=50;const i=t/e*100;this.progressInterval=window.setInterval((()=>{this.loaderProgress=Math.min(this.loaderProgress+i,100);if(this.loaderProgress>=100){this.stopLoaderAnimation()}}),t)};stopLoaderAnimation=()=>{if(this.progressInterval){clearInterval(this.progressInterval);this.progressInterval=undefined}if(this.lottieAnimation){this.lottieAnimation.destroy();this.lottieAnimation=undefined}};handleDownloadReceipt=async()=>{try{await j.generateAndDownloadReceipt({paymentMethod:this.typePaymentMethod===m.CARD?this.textPaymentMethodCard():this.paymentMethodName,...this.typePaymentMethod===m.BANK_TRANSFER&&{bank:this.bank},...this.typePaymentMethod===m.CARD&&{cardBrand:this.applyStartCaseToBrand(l.data.cardInformation?.brand||"")},...this.typePaymentMethod===m.CARD&&{cardLastFour:this.cardLastFour??l.data.cardInformation?.lastFour},paymentDate:T(this.getPaymentDate())||T((new Date).toISOString()),email:l?.data?.userInformation?.email||"",referenceNumber:this.referenceNumber,productTitle:l?.data?.itemInformation?.title||"",subtotal:this.getFormattedSubtotal(),total:this.getFormattedTotal(),currency:l?.data?.pricing?.currency||" ",installments:l?.data?.pricing?.installments&&l?.data?.cardInformation?.installments?.selectedInstallment?`${k(l.data?.cardInformation?.installments?.selectedInstallment?.installment,C(l.data?.cardInformation?.installments?.selectedInstallment?.installmentAmount||0),l.data?.pricing?.currency,l.data?.cardInformation?.installments?.selectedInstallment?.cft,l.data?.cardInformation?.installments?.selectedInstallment?.model)}\n( ${r.translate("processing.purchaseTotal")}: ${this.getFormattedTotal()} )${l.data.cardInformation?.installments?.installments.find((e=>e.installment===l.data.cardInformation?.installments?.selectedInstallment?.installment))?.model===w.CUSTOMER_FINANCED?`\n${r.translate("installments.interest")}`:""}`:"",discountAmount:this.getFormattedDiscountAmount(),trialPeriodDays:this.trialPeriodDays||l.data?.itemInformation?.trial?.trialPeriodDays,debitDay:this.debitDay||l.data?.itemInformation?.debitDay,planAmount:this.getFormattedSubtotal(this.planAmount),trialEndDate:this.hasFreeTrial()?this.getTrialEndDateFormatted():undefined,debitDate:this.hasDebitDay()?this.getDebitDateFormatted():undefined,isBankTransfer:this.typePaymentMethod===m.BANK_TRANSFER})}catch(e){console.error("Error downloading receipt:",e)}};getFormattedDiscountAmount=()=>{if(l?.data?.pricing?.discountAmount>0){const e=d(l.data?.pricing?.discountAmount,l.data?.pricing?.currency);return`-${e}`}return undefined};getFormattedSubtotal=(e=null)=>d(e||l?.data?.pricing?.subtotal,l?.data?.pricing?.currency);getFormattedTotal=()=>{if(this.trialPeriodDays>0){return d(0,l?.data?.pricing?.currency)}return d(l?.data?.pricing?.total,l?.data?.pricing?.currency)};hasFreeTrial=()=>l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.trial?.trialPeriodDays&&l.data?.itemInformation?.trial?.trialPeriodDays>0;hasDebitDay=()=>{const e=l.data?.itemInformation?.debitDay;return e&&e>0};getTrialEndDateFormatted=()=>{const e=l.data?.itemInformation?.trial?.trialPeriodEndsAt;if(!e)return"";const t=new Date(e);const i=r.getCurrentLanguage();const a=i==="es"?"es-ES":i==="pt"?"pt-BR":"en-US";if(i==="en"){return`${t.toLocaleDateString(a,{month:"long"})} ${t.getDate()}`}else{return`${t.getDate()} de ${t.toLocaleDateString(a,{month:"long"})}`}};getDebitDateFormatted=()=>{const e=l.data?.itemInformation?.debitDay;if(!e||e<=0)return"";const t=new Date;const i=new Date(t);const a=r.getCurrentLanguage();const s=a==="es"?"es-ES":a==="pt"?"pt-BR":"en-US";if(e<t.getDate()){i.setMonth(t.getMonth()+1)}i.setDate(e);while(i.getDate()!==e){i.setDate(i.getDate()-1)}if(a==="en"){return`${i.toLocaleDateString(s,{month:"long"})} ${i.getDate()}`}else{return`${i.getDate()} de ${i.toLocaleDateString(s,{month:"long"})}`}};textPaymentMethodCard=()=>{const e=l.data?.cardInformation?.brand;const t=this.cardLastFour||l?.data?.cardInformation?.lastFour;const i=this.applyStartCaseToBrand(e||"");return e&&t?`${i} - ${t}`:i};render(){const e=l.data?.itemInformation?.redirectSuccess;return t("rebill-checkout-single-column",{key:"211b6d795093744fdeb68d3d14014837650a2f2a"},t("div",{key:"3667de834339ce4733dbab7c7d7c7fa0754c21b8",class:"success-page__success-content"},t("rebill-typography",{key:"77d7fd78ac398842db3306a9fb0413774d3c03a9",variant:"h3",color:u.PRIMARY_DARK_TEXT},e&&this.showRedirectMessage?r.translate("processing.redirectMessage"):r.translate("processing.successTitle")),e&&this.showRedirectMessage?t("div",{class:"redirect-message"},t("div",{class:"success-page__lottie-container"},t("div",{ref:e=>this.lottieContainer=e,class:"lottie-animation"}))):t("div",{class:"success-page__success-icon"},t("svg",{width:x(this.breakpoint,g.DESKTOP)?"64":"96",height:x(this.breakpoint,g.DESKTOP)?"64":"96",viewBox:"0 0 96 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.99219 47.998C7.99219 25.9067 25.9008 7.99805 47.9922 7.99805C70.0836 7.99805 87.9922 25.9067 87.9922 47.998C87.9922 70.0894 70.0836 87.998 47.9922 87.998C25.9008 87.998 7.99219 70.0894 7.99219 47.998ZM61.5401 39.2645C62.2396 38.4096 62.1136 37.1496 61.2587 36.4501C60.4038 35.7507 59.1437 35.8767 58.4443 36.7316L41.8437 57.0211L35.4064 50.5838C34.6254 49.8028 33.359 49.8028 32.578 50.5838C31.7969 51.3649 31.7969 52.6312 32.578 53.4123L40.578 61.4123C40.9775 61.8118 41.5275 62.0237 42.0918 61.9956C42.6562 61.9674 43.1823 61.7019 43.5401 61.2645L61.5401 39.2645Z",fill:"#35B093"}))),t("div",{key:"cedc0613b73f32ba2007a436e3d123d5cc402c00",class:"success-page__info-card"},t("div",{key:"9e6cb1205edd9bb55ddc66a2963d04a8e843f9c6",class:"success-page__card-row"},t("rebill-typography",{key:"f85fde7f87dcc552262f474728a4db5f8b26ce8c",variant:"body2",color:u.SECONDARY},r.translate("processing.paymentMethod")),t("div",{key:"3aa38a7ab8bb457c093b2d5f7da66a62a8d1fd91",class:"success-page__card-value"},t("div",{key:"5b0397ca35714f3b3d40febc36960f837f281dae",class:"success-page__payment-method-display"},this.typePaymentMethod===m.CARD&&t(t.Fragment,null,t("rebill-card-icon",{key:"d61b1bc696fe373f357c7b9fe692d13d3683ab85","card-brand":l.data?.cardInformation?.brand||""}),t("rebill-typography",{key:"74624b3e061fea44a6101c3840c36423f019292c",variant:"body2",color:u.PRIMARY_DARK_TEXT},this.textPaymentMethodCard())),this.typePaymentMethod===m.BANK_TRANSFER&&t("div",{key:"27192757f88c8ca46518d8136700fd5512548541",style:{display:"flex",alignItems:"center",gap:"8px"}},t("div",{key:"7a6688ff1b2db3993052a0f75e4602f9fc146c74",style:{display:"flex",alignItems:"center",gap:"8px"}},this.getPaymentMethodConfig(m.BANK_TRANSFER).icons.map((e=>t("rebill-icon",{name:e,size:"24px"})))),t("rebill-typography",{key:"fc3b4da565d59cad2271a787fb35d8573041b9dd",variant:"body2",color:u.PRIMARY_DARK_TEXT},r.translate("paymentMethods.bank_transfer")))))),l?.data?.pricing?.installments&&l?.data?.cardInformation?.installments?.selectedInstallment&&t("div",{key:"318537c8bf80f143dd3c22fd387e8754e65925c1"},t("div",{key:"d925bc2e1020d6c82c42ac4a92780287fa1511d8",class:"success-page__card-row"},t("rebill-typography",{key:"2353ac11401362438d9d9f832be577dd2875ac2c",variant:"body2",color:u.SECONDARY},r.translate("summary.installments")),t("div",{key:"c0e9d5819610daea3e7d1792f0c0c584f5f5ffef",style:{display:"flex",flexDirection:"column",gap:"10px",alignItems:"end"}},t("rebill-typography",{key:"c5e0807246e0032fc34afb213b7b3784c8e4d395",variant:"body2",color:u.PRIMARY_DARK_TEXT,style:{textAlign:"end"}},k(l.data?.cardInformation?.installments?.selectedInstallment?.installment,C(l.data?.cardInformation?.installments?.selectedInstallment?.installmentAmount||0),l.data?.pricing?.currency,l.data?.cardInformation?.installments?.selectedInstallment?.cft,l.data?.cardInformation?.installments?.selectedInstallment?.model)),t("rebill-typography",{key:"a52ddb830767f6bd63fd4b2f08727f572bf171f8",variant:"body2",color:u.PRIMARY_DARK_TEXT},`( ${r.translate("processing.purchaseTotal")}: ${this.getFormattedTotal()} )`),l.data.cardInformation?.installments?.installments.find((e=>e.installment===l.data.cardInformation?.installments?.selectedInstallment?.installment))?.model===w.CUSTOMER_FINANCED&&t("rebill-typography",{key:"8d68d5471e42e2b9d06b3253d17b7db4a168099f",variant:"italic",color:u.SECONDARY,style:{textAlign:"end"}},`${r.translate("installments.interest")}`)))),t("div",{key:"0ddf0cb128d339c853aeac49c2411c7e72b2e305",class:"success-page__card-row"},t("rebill-typography",{key:"b07c0d419defb130e48c50419814328858aac0c1",variant:"body2",color:u.SECONDARY},r.translate("processing.paymentDate")),t("rebill-typography",{key:"b3760068c527c6a665f431f30e92b519c821cad2",variant:"body2",color:u.PRIMARY_DARK_TEXT},T(this.paymentDate||this.getPaymentDate()||l.createdAt)||"")),t("div",{key:"a092b8dc684c9e79ef33547f5479b597914cf0d8",class:"success-page__card-row"},t("rebill-typography",{key:"5618fdcd4f1ac82a5ca6f463cf8c79764ac85a5e",variant:"body2",color:u.SECONDARY},r.translate("processing.paymentEmail")),t("rebill-typography",{key:"34823a0802e7eac4b606cc74fa9d6cbf82e57dfa",variant:"body2",color:u.PRIMARY_DARK_TEXT},l?.data?.userInformation?.email)),t("div",{key:"d0e434d36b46ec5cfd54e59ea0419c724f61cf8a",class:"success-page__card-row"},t("rebill-typography",{key:"700ebbb4f69b4eda9aebf126d9c0361dc5415ff3",variant:"body2",color:u.SECONDARY},r.translate("processing.paymentReference")),t("rebill-typography",{key:"14d58b477ec76c4d62ee447191b306d42b8c18cc",variant:"body2",color:u.PRIMARY_DARK_TEXT,class:"success-page__reference-number"},this.referenceNumber||""))),t("div",{key:"aa1eb45fe62810771a4aa767752c64565a660bd6",class:"success-page__info-card"},t("rebill-typography",{key:"0c7c03507ddfa3217cdddf0f12c9acfb4588c4b5",variant:"subtitle-bold",color:u.PRIMARY_DARK_TEXT},r.translate("processing.purchaseDetails")),t("div",{key:"69d9902ae1d62ca74084671a02302d4689e2b147",class:"success-page__card-row"},t("rebill-typography",{key:"4d4c65278338aa2981029977af929cb06db3ef4c",variant:"body2",color:u.SECONDARY},r.translate("processing.purchaseDetail")),t("rebill-typography",{key:"d149e206559202c2b5f7ae407c8ea818b8a67a2b",variant:"body2",color:u.PRIMARY_DARK_TEXT},l?.data?.itemInformation?.title||"")),!this.trialPeriodDays&&t("div",{key:"0d2f9d7c952d3e77f90e5fa7ed9ce8a318ebafb5",class:"success-page__card-row"},t("rebill-typography",{key:"b3396af88864a05dd5d40857ca521fb594809769",variant:"body2",color:u.SECONDARY},r.translate("processing.purchaseSubtotal")),t("rebill-typography",{key:"2fd1727ac9984a8ece69548b82dd70d4b24b9677",variant:"body2",color:u.PRIMARY_DARK_TEXT},this.getFormattedSubtotal())),l?.data?.pricing?.discountAmount>0&&t("div",{key:"4dc45ce6d4adf10951a32f5be52c48e123c305c7",class:"success-page__card-row"},t("rebill-typography",{key:"ca7f560871600b62294a797a57bca48a24f4a54b",variant:"body2",color:u.SECONDARY},r.translate("summary.discount")),t("rebill-typography",{key:"91bc2b0b8d4a19747e4f376539e98af476be616a",variant:"body2",color:u.PRIMARY_DARK_TEXT},this.getFormattedDiscountAmount())),t("div",{key:"63cc148395787d492d8de587530e4c6c9ecaec89",class:"success-page__card-row"},t("rebill-typography",{key:"b92d407c90c24122e8d9e582b569520cfaec759b",variant:"body2",color:u.SECONDARY},r.translate("processing.purchaseMontoTotal")),t("div",{key:"7c446255c9780c8960662abf768075128f79f6cc",class:"success-page__total-amount-container"},this.trialPeriodDays>0&&t("div",{key:"97007ba0f13a3dbecd0eda3b714f3cbd74947650",class:"success-page__trial-pill"},t("rebill-typography",{key:"9f76794ba7eda00b355aac8d4544ac5ebf042aba",variant:"body2",align:"center",color:u.GREEN_TEXT},r.translate("processing.trialPill",{days:this.trialPeriodDays,count:this.trialPeriodDays}))),t("rebill-typography",{key:"88b60748048b4d5c2f7210fb311b7e9c9c642eae",variant:"body2",color:u.PRIMARY_DARK_TEXT},this.getFormattedTotal()))),(this.trialPeriodDays||this.hasDebitDay())&&t("div",{key:"5907e4ab3c0b87fa52ae3e3947415646e5a99dfd",class:"success-page__card-divider"}),(this.hasFreeTrial()||this.hasDebitDay())&&t("div",{key:"5038824ebaec9c37b775195e67aae056b0c8ccc4",class:"success-page__next-charge-section"},t("div",{key:"f6399e2169b7c643eb919559ab48ed25f5530cb6",class:"success-page__next-charge-header"},t("rebill-typography",{key:"bd5a419ac0792f5eb518f91a57ecc4018d232a16",variant:"subtitle-bold",color:u.PRIMARY_DARK_TEXT},r.translate("processing.nextCharge")),t("rebill-typography",{key:"2e31fe5ef524d4a5124fa40eda34b8d0aa075a52",variant:"subtitle-bold",color:u.PRIMARY_DARK_TEXT},r.translate("processing.onDate",{date:this.hasFreeTrial()?this.getTrialEndDateFormatted():this.getDebitDateFormatted()}))),t("div",{key:"0dc2c3aec26377c525b7c7df53a5675599ddf921",class:"success-page__card-row"},t("rebill-typography",{key:"cca9703b882e5819a723e050482657dc35492a2c",variant:"body2",color:u.PRIMARY_DARK_TEXT},this.hasFreeTrial()?r.translate("processing.atEndOfTrial"):""),t("rebill-typography",{key:"1a94fb9a75123672488960fa1f26b9e5f3529eee",variant:"body2",color:u.PRIMARY_DARK_TEXT},this.getFormattedSubtotal(this.planAmount)," ",r.translate("processing.perMonth")))),t("div",{key:"f0df52f2b5b77f7c991f44dd2403c2f19bb3667c",class:"success-page__card-divider"}),t("div",{key:"163e69fde6e63ccbe6f85fc4716439537461884c",class:"success-page__download-container"},t("svg",{key:"ce30b00a998aa61bf97043a21b3c3e8110732406",class:"download-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"da4eb361ac3c41b590f80fff8d78cc5cab783880",d:"M13.498 9.83333V12.1667C13.498 12.903 12.9011 13.5 12.1647 13.5H3.83138C3.095 13.5 2.49805 12.903 2.49805 12.1667V9.83333M7.99804 10V2.5M7.99804 10L5.66471 7.66667M7.99804 10L10.3314 7.66667",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})),t("rebill-button",{key:"a013144930708f60637ca2978aefc41f0ede7ffd",type:"button",variant:"download",size:"small",onClick:this.handleDownloadReceipt},t("rebill-typography",{key:"1c61ce732648c8f0426bbd353de9ad43385d27bd",variant:"overline",color:u.PRIMARY_DARK_TEXT},r.translate("processing.download")))),t("div",{key:"e0b1266863e88a7077b27cf40c5f105c26602f36",class:"success-page__contact-info"},t("rebill-typography",{key:"ea3ba3f863789ccd1165f1d1797f7ca063a53c17",variant:"information-text",color:u.SECONDARY},r.translate("processing.downloadDescription"))))))}};we.style=ke;const Ce=":host{display:block}.inputs-container{display:flex;flex-direction:column;gap:16px;width:100%}.customer-exists{display:flex;justify-content:flex-end;margin-bottom:16px}";const $e=class{constructor(t){e(this,t);this.onRebillAccountClick=a(this,"onRebillAccountClick")}userInformation={email:"",fullName:"",countryCode:""};errors=null;customerExists=false;disabled=false;onRebillAccountClick;translateError(e){if(!e)return"";if(e.includes("validation.")||e.includes("paymentErrors.")){return r.translate(e)}return e}handleInputChange(e){if(!e.detail)return;const{id:t,value:i}=e.detail;b.setUserInformation({[t]:i})}handleBlur(e){if(!e.detail)return;const{id:t,value:i}=e.detail;b.setUserInformation({[t]:i})}getCardLabels(){const e=[];if(l.data.prefilledData.email){e.push({label:r.translate("userInformation.emailPlaceholder"),value:l.data.prefilledData.email});b.setUserInformation({...l.data.userInformation,email:l.data.prefilledData.email})}if(l.data.prefilledData.fullName){e.push({label:r.translate("userInformation.fullNamePlaceholder"),value:l.data.prefilledData.fullName});b.setUserInformation({...l.data.userInformation,fullName:l.data.prefilledData.fullName})}return e}async handleRebillAccountClick(){n.otp.generate(l.data.sessionId,{email:l.data.userInformation.email});this.onRebillAccountClick.emit(true)}renderInputs(){const e=l.data.prefilledData.email;const i=l.data.prefilledData.fullName;const a=[];if(!e){a.push(t("rebill-input-text",{id:"email",variant:"floating",label:r.translate("userInformation.emailPlaceholder"),placeholder:r.translate("userInformation.emailPlaceholder"),"left-icon":"email",clearable:true,disabled:this.disabled,error:this.translateError(this.errors?.email)}))}if(!i){a.push(t("rebill-input-text",{id:"fullName",variant:"floating",label:r.translate("userInformation.fullNamePlaceholder"),placeholder:r.translate("userInformation.fullNamePlaceholder"),disabled:this.disabled,error:this.translateError(this.errors?.fullName)}))}return a.length>0?t("div",{class:"inputs-container",style:{marginTop:a.length>0&&(e||i)?"1rem":"0"}},a):null}render(){const e=t("div",{key:"2919ec411d9b699b8f97226418226460352ac953",class:"customer-exists"},t("rebill-button",{key:"4b1b82fb5ffd96b2278bebf26456fdc8564078fc",style:{visibility:this.customerExists?"visible":"hidden",opacity:this.customerExists?"1":"0",transition:"opacity 0.3s ease-in-out"},variant:"text",size:"small",onClick:()=>this.handleRebillAccountClick(),icon:"lock"},r.translate("userInformation.rebillAccount"),t("rebill-icon",{key:"41a8282a2aa531f845b451c5e1e461b0e001fe8d",name:"arrow-right"})));const i=l.data.prefilledData.email;const a=l.data.prefilledData.fullName;const n=i||a;return t(s,{key:"7fce91fa4f13ca932a525e0ea29854a14b827cd6"},e,n&&t("rebill-card",{key:"e450171b7617c6ade6b7f76d41f40c2ce8f1966b",cardTitle:r.translate("userInformation.personalInformation"),cardLabels:this.getCardLabels()}),this.renderInputs())}};$e.style=Ce;export{ye as otp_component,xe as rebill_modal_overlay,ue as rebill_mode_sandbox,_e as rebill_mode_sandbox_mobile,be as rebill_summary,we as success_page,$e as user_information};
2
- //# sourceMappingURL=p-c41119c0.entry.js.map
1
+ import{r as e,h as t,g as i,c as a,H as s}from"./p-D8cwEAmw.js";import{a as n}from"./p-CTo1s54i.js";import{I as r,c as o,s as l,b as c,f as d,d as p,e as h,a as b,P as m}from"./p-CP6XOgmg.js";import{C as u}from"./p-DA598vBj.js";import{c as f,a as y}from"./p-BIOWiROZ.js";import{B as g,i as x,g as v}from"./p-Do_vNuMa.js";import{g as _,a as k,E as w,b as C}from"./p-DKzHMy1G.js";import{g as $}from"./p-B96SyP8A.js";import{g as D,P as j}from"./p-cHVoxSaG.js";import{f as T}from"./p-D0e855_t.js";import"./p-E-ZsRS8r.js";import"./p-D339jHg4.js";const z=(e,t,i)=>{const a=document.createElement(e),[s,n]=Array.isArray(t)?[void 0,t]:[t,i];return s&&Object.assign(a,s),n==null||n.forEach((e=>a.appendChild(e))),a},S=(e,t)=>{var i;return t==="left"?e.offsetLeft:(((i=e.offsetParent instanceof HTMLElement?e.offsetParent:null)==null?void 0:i.offsetWidth)??0)-e.offsetWidth-e.offsetLeft},M=e=>e.offsetWidth>0&&e.offsetHeight>0,P=(e,t)=>{!customElements.get(e)&&customElements.define(e,t)};function A(e,t,{reverse:i=false}={}){const a=e.length;for(let s=i?a-1:0;i?s>=0:s<a;i?s--:s++)t(e[s],s)}function L(e,t,i,a){const s=t.formatToParts(e);i&&s.unshift({type:"prefix",value:i}),a&&s.push({type:"suffix",value:a});const n=[],r=[],o=[],l=[],c={},d=e=>`${e}:${c[e]=(c[e]??-1)+1}`;let p="",h=false,b=false;for(const e of s){p+=e.value;const t=e.type==="minusSign"||e.type==="plusSign"?"sign":e.type;t==="integer"?(h=true,r.push(...e.value.split("").map((e=>({type:t,value:parseInt(e)}))))):t==="group"?r.push({type:t,value:e.value}):t==="decimal"?(b=true,o.push({type:t,value:e.value,key:d(t)})):t==="fraction"?o.push(...e.value.split("").map((e=>({type:t,value:parseInt(e),key:d(t),pos:-1-c[t]})))):(h||b?l:n).push({type:t,value:e.value,key:d(t)})}const m=[];for(let e=r.length-1;e>=0;e--){const t=r[e];m.unshift(t.type==="integer"?{...t,key:d(t.type),pos:c[t.type]}:{...t,key:d(t.type)})}return{pre:n,integer:m,fraction:o,post:l,valueAsString:p,value:typeof e=="string"?parseFloat(e):e}}const I=String.raw,N=(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return false}return true})(),E=typeof CSS<"u"&&CSS.supports&&CSS.supports("line-height","mod(1,1)"),R=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):null,B="--_number-flow-d-opacity",F="--_number-flow-d-width",U="--_number-flow-dx",V="--_number-flow-d",W=(()=>{try{return CSS.registerProperty({name:B,syntax:"<number>",inherits:false,initialValue:"0"}),CSS.registerProperty({name:U,syntax:"<length>",inherits:true,initialValue:"0px"}),CSS.registerProperty({name:F,syntax:"<number>",inherits:false,initialValue:"0"}),CSS.registerProperty({name:V,syntax:"<number>",inherits:true,initialValue:"0"}),true}catch{return false}})(),Y="var(--number-flow-char-height, 1em)",X="var(--number-flow-mask-height, 0.25em)",O=`calc(${X} / 2)`,q="var(--number-flow-mask-width, 0.5em)",H=`calc(${q} / var(--scale-x))`,Z="#000 0, transparent 71%",G=I`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:${Y} !important}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${F}) / var(--width));transform:translateX(var(${U})) scaleX(var(--scale-x));margin:0 calc(-1 * ${q});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${H},#000 calc(100% - ${H}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${X},#000 calc(100% - ${X}),transparent 100% ),radial-gradient(at bottom right,${Z}),radial-gradient(at bottom left,${Z}),radial-gradient(at top left,${Z}),radial-gradient(at top right,${Z});-webkit-mask-size:100% calc(100% - ${X} * 2),calc(100% - ${H} * 2) 100%,${H} ${X},${H} ${X},${H} ${X},${H} ${X};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${O} ${q};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${U})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${V})}.digit__num,.number .section::after{padding:${O} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${B}))}`,K=HTMLElement,J=E&&N&&W;let Q;class ee extends K{constructor(){super(),this.created=false,this.batched=false;const{animated:e,...t}=this.constructor.defaultProps;this._animated=this.computedAnimated=e,Object.assign(this,t)}get animated(){return this._animated}set animated(e){var t;this.animated!==e&&(this._animated=e,(t=this.shadowRoot)==null||t.getAnimations().forEach((e=>e.finish())))}set data(e){var t;if(e==null)return;const{pre:i,integer:a,fraction:s,post:n,value:r}=e;if(this.created){const o=this._data;this._data=e,this.computedTrend=typeof this.trend=="function"?this.trend(o.value,r):this.trend,this.computedAnimated=J&&this._animated&&(!this.respectMotionPreference||!(R!=null&&R.matches))&&M(this),(t=this.plugins)==null||t.forEach((t=>{var i;return(i=t.onUpdate)==null?void 0:i.call(t,e,o,this)})),this.batched||this.willUpdate(),this._pre.update(i),this._num.update({integer:a,fraction:s}),this._post.update(n),this.batched||this.didUpdate()}else{this._data=e,this.attachShadow({mode:"open"});try{this._internals??(this._internals=this.attachInternals()),this._internals.role="img"}catch{}if(typeof CSSStyleSheet<"u"&&this.shadowRoot.adoptedStyleSheets)Q||(Q=new CSSStyleSheet,Q.replaceSync(G)),this.shadowRoot.adoptedStyleSheets=[Q];else{const e=document.createElement("style");e.textContent=G,this.shadowRoot.appendChild(e)}this._pre=new se(this,i,{justify:"right",part:"left"}),this.shadowRoot.appendChild(this._pre.el),this._num=new te(this,a,s),this.shadowRoot.appendChild(this._num.el),this._post=new se(this,n,{justify:"left",part:"right"}),this.shadowRoot.appendChild(this._post.el),this.created=true}try{this._internals.ariaLabel=e.valueAsString}catch{}}willUpdate(){this._pre.willUpdate(),this._num.willUpdate(),this._post.willUpdate()}didUpdate(){if(!this.computedAnimated)return;this._abortAnimationsFinish?this._abortAnimationsFinish.abort():this.dispatchEvent(new Event("animationsstart")),this._pre.didUpdate(),this._num.didUpdate(),this._post.didUpdate();const e=new AbortController;Promise.all(this.shadowRoot.getAnimations().map((e=>e.finished))).then((()=>{e.signal.aborted||(this.dispatchEvent(new Event("animationsfinish")),this._abortAnimationsFinish=void 0)})),this._abortAnimationsFinish=e}}ee.defaultProps={transformTiming:{duration:900,easing:"linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)"},spinTiming:void 0,opacityTiming:{duration:450,easing:"ease-out"},animated:true,trend:(e,t)=>Math.sign(t-e),respectMotionPreference:true,plugins:void 0,digits:void 0};class te{constructor(e,t,i,{className:a,...s}={}){this.flow=e,this._integer=new ae(e,t,{justify:"right",part:"integer"}),this._fraction=new ae(e,i,{justify:"left",part:"fraction"}),this._inner=z("span",{className:"number__inner"},[this._integer.el,this._fraction.el]),this.el=z("span",{...s,part:"number",className:`number ${a??""}`},[this._inner])}willUpdate(){this._prevWidth=this.el.offsetWidth,this._prevLeft=this.el.getBoundingClientRect().left,this._integer.willUpdate(),this._fraction.willUpdate()}update({integer:e,fraction:t}){this._integer.update(e),this._fraction.update(t)}didUpdate(){const e=this.el.getBoundingClientRect();this._integer.didUpdate(),this._fraction.didUpdate();const t=this._prevLeft-e.left,i=this.el.offsetWidth,a=this._prevWidth-i;this.el.style.setProperty("--width",String(i)),this.el.animate({[U]:[`${t}px`,"0px"],[F]:[a,0]},{...this.flow.transformTiming,composite:"accumulate"})}}class ie{constructor(e,t,{justify:i,className:a,...s},n){this.flow=e,this.children=new Map,this.onCharRemove=e=>()=>{this.children.delete(e)},this.justify=i;const r=t.map((e=>this.addChar(e).el));this.el=z("span",{...s,className:`section section--justify-${i} ${a??""}`},n?n(r):r)}addChar(e,{startDigitsAtZero:t=false,...i}={}){const a=e.type==="integer"||e.type==="fraction"?new oe(this,e.type,t?0:e.value,e.pos,{...i,onRemove:this.onCharRemove(e.key)}):new le(this,e.type,e.value,{...i,onRemove:this.onCharRemove(e.key)});return this.children.set(e.key,a),a}unpop(e){e.el.removeAttribute("inert"),e.el.style.top="",e.el.style[this.justify]=""}pop(e){e.forEach((e=>{e.el.style.top=`${e.el.offsetTop}px`,e.el.style[this.justify]=`${S(e.el,this.justify)}px`})),e.forEach((e=>{e.el.setAttribute("inert",""),e.present=false}))}addNewAndUpdateExisting(e){const t=new Map,i=new Map,a=this.justify==="left",s=a?"prepend":"append";if(A(e,(e=>{let a;this.children.has(e.key)?(a=this.children.get(e.key),i.set(e,a),this.unpop(a),a.present=true):(a=this.addChar(e,{startDigitsAtZero:true,animateIn:true}),t.set(e,a)),this.el[s](a.el)}),{reverse:a}),this.flow.computedAnimated){const e=this.el.getBoundingClientRect();t.forEach((t=>{t.willUpdate(e)}))}t.forEach(((e,t)=>{e.update(t.value)})),i.forEach(((e,t)=>{e.update(t.value)}))}willUpdate(){const e=this.el.getBoundingClientRect();this._prevOffset=e[this.justify],this.children.forEach((t=>t.willUpdate(e)))}didUpdate(){const e=this.el.getBoundingClientRect();this.children.forEach((t=>t.didUpdate(e)));const t=e[this.justify],i=this._prevOffset-t;i&&this.children.size&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}class ae extends ie{update(e){const t=new Map;this.children.forEach(((i,a)=>{e.find((e=>e.key===a))||t.set(a,i),this.unpop(i)})),this.addNewAndUpdateExisting(e),t.forEach((e=>{e instanceof oe&&e.update(0)})),this.pop(t)}}class se extends ie{update(e){const t=new Map;this.children.forEach(((i,a)=>{e.find((e=>e.key===a))||t.set(a,i)})),this.pop(t),this.addNewAndUpdateExisting(e)}}class ne{constructor(e,t,{onRemove:i,animateIn:a=false}={}){this.flow=e,this.el=t,this._present=true,this._remove=()=>{var e;this.el.remove(),(e=this._onRemove)==null||e.call(this)},this.el.classList.add("animate-presence"),this.flow.computedAnimated&&a&&this.el.animate({[B]:[-.9999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),this._onRemove=i}get present(){return this._present}set present(e){if(this._present!==e){if(this._present=e,e?this.el.removeAttribute("inert"):this.el.setAttribute("inert",""),!this.flow.computedAnimated){e||this._remove();return}this.el.style.setProperty("--_number-flow-d-opacity",e?"0":"-.999"),this.el.animate({[B]:e?[-.9999,0]:[.999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),e?this.flow.removeEventListener("animationsfinish",this._remove):this.flow.addEventListener("animationsfinish",this._remove,{once:true})}}}class re extends ne{constructor(e,t,i,a){super(e.flow,i,a),this.section=e,this.value=t,this.el=i}}class oe extends re{constructor(e,t,i,a,s){var n,r;const o=(((r=(n=e.flow.digits)==null?void 0:n[a])==null?void 0:r.max)??9)+1,l=Array.from({length:o}).map(((e,t)=>{const a=z("span",{className:"digit__num"},[document.createTextNode(String(t))]);return t!==i&&a.setAttribute("inert",""),a.style.setProperty("--n",String(t)),a})),c=z("span",{part:`digit ${t}-digit`,className:"digit"},l);c.style.setProperty("--current",String(i)),c.style.setProperty("--length",String(o)),super(e,i,c,s),this.pos=a,this._onAnimationsFinish=()=>{this.el.classList.remove("is-spinning")},this._numbers=l,this.length=o}willUpdate(e){const t=this.el.getBoundingClientRect();this._prevValue=this.value;const i=t[this.section.justify]-e[this.section.justify],a=t.width/2;this._prevCenter=this.section.justify==="left"?i+a:i-a}update(e){this.el.style.setProperty("--current",String(e)),this._numbers.forEach(((t,i)=>i===e?t.removeAttribute("inert"):t.setAttribute("inert",""))),this.value=e}didUpdate(e){const t=this.el.getBoundingClientRect(),i=t[this.section.justify]-e[this.section.justify],a=t.width/2,s=this.section.justify==="left"?i+a:i-a,n=this._prevCenter-s;n&&this.el.animate({transform:[`translateX(${n}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"});const r=this.getDelta();r&&(this.el.classList.add("is-spinning"),this.el.animate({[V]:[-r,0]},{...this.flow.spinTiming??this.flow.transformTiming,composite:"accumulate"}),this.flow.addEventListener("animationsfinish",this._onAnimationsFinish,{once:true}))}getDelta(){var e;if(this.flow.plugins)for(const t of this.flow.plugins){const i=(e=t.getDelta)==null?void 0:e.call(t,this.value,this._prevValue,this);if(i!=null)return i}const t=this.value-this._prevValue,i=this.flow.computedTrend||Math.sign(t);return i<0&&this.value>this._prevValue?this.value-this.length-this._prevValue:i>0&&this.value<this._prevValue?this.length-this._prevValue+this.value:t}}class le extends re{constructor(e,t,i,a){const s=z("span",{className:"symbol__value",textContent:i});super(e,i,z("span",{part:`symbol ${t}`,className:"symbol"},[s]),a),this.type=t,this._children=new Map,this._onChildRemove=e=>()=>{this._children.delete(e)},this._children.set(i,new ne(this.flow,s,{onRemove:this._onChildRemove(i)}))}willUpdate(e){if(this.type==="decimal")return;const t=this.el.getBoundingClientRect();this._prevOffset=t[this.section.justify]-e[this.section.justify]}update(e){if(this.value!==e){const t=this._children.get(this.value);t&&(t.present=false);const i=this._children.get(e);if(i)i.present=true;else{const t=z("span",{className:"symbol__value",textContent:e});this.el.appendChild(t),this._children.set(e,new ne(this.flow,t,{animateIn:true,onRemove:this._onChildRemove(e)}))}}this.value=e}didUpdate(e){if(this.type==="decimal")return;const t=this.el.getBoundingClientRect()[this.section.justify]-e[this.section.justify],i=this._prevOffset-t;i&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}const ce="number-flow-connect",de="number-flow-update";class pe extends ee{constructor(){super(...arguments),this.connected=false}connectedCallback(){this.connected=true,this.dispatchEvent(new Event(ce,{bubbles:true}))}disconnectedCallback(){this.connected=false}get value(){return this._value}update(e){(!this._formatter||this._prevFormat!==this.format||this._prevLocales!==this.locales)&&(this._formatter=new Intl.NumberFormat(this.locales,this.format),this._prevFormat=this.format,this._prevLocales=this.locales),e!=null&&(this._value=e),this.dispatchEvent(new Event(de,{bubbles:true})),this.data=L(this._value,this._formatter,this.numberPrefix,this.numberSuffix)}}P("number-flow",pe);const he=".summary-container {\n width: 100%;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n gap: 40px;\n background-color: var(--rebill-color-background-right);\n}\n.summary-header {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n}\n\n.trial-pill {\n background-color: var(--rebill-color-green-light-2);\n border-radius: 4px;\n padding: 4px 6px 4px 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.total-amount-container {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n}\n\n@media (max-width: 1024px) {\n .summary-container {\n gap: 1.5rem !important;\n background-color: var(--rebill-color-background);\n }\n .summary-header {\n margin-top: 24px;\n }\n .summary-row.total {\n margin-top: 0 !important;\n }\n}\n\n.summary-card {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 24px;\n padding: 0px;\n background: #ffffff;\n}\n\n.summary-card-info {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n.summary-card-amount {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.summary-details {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n.summary-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n & > :nth-child(2) {\n text-align: right;\n }\n}\n\n.summary-row.total {\n margin-top: 1rem;\n font-weight: bold;\n}\n\n@media (min-width: 1025px) and (max-width: 1450px) {\n .summary-container {\n margin: 0px 10px;\n max-width: 400px;\n }\n}\n";const be=class{constructor(t){e(this,t)}totalAmount;itemTitle;itemDescription;itemAmount;planFrequency;planFrequencyCount;subtotal;discount;currency;displayedComponents=["totalAmount","discount","itemDetails","priceDetails","timelineFreeTrial","timelineDebitDay"];allowCoupon=false;currentBreakpoint=g.DESKTOP;discountApplied=false;totalFlow;discountType;discountedPercentage=0;discountDuration=0;discountAmount=0;getDurationTranslation(e){const t=this.planFrequency||o.MONTH;if(e===1){return r.translate(`summary.${t}_one`)}else{return r.translate(`summary.${t}_other`,{count:e})}}componentDidLoad(){this.updateTotalFlow()}componentDidUpdate(){this.updateTotalFlow()}updateTotalFlow(){if(this.totalFlow){this.totalFlow.format={style:"currency",currency:this.currency};this.totalFlow.update(Number(l.data.pricing.total))}}handleDiscountApplied(e){this.discountApplied=e.detail}getRecalculatedInstallmentAmount(){const e=l.data?.cardInformation?.installments?.selectedInstallment;if(!e){return 0}if(l.data.pricing.discountAmount>0){const t=l.data.pricing.subtotal;const i=l.data.pricing.totalWithoutInstallment;const a=i/t;return Math.round(e.installmentAmount*a*100)/100}return e.installmentAmount}renderTotalForPlan(){return l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.debitStrategy&&t("div",{class:"summary-row total"},t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},r.translate("summary.totalAmountToday")),t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},d(l.data.pricing.total,this.currency)))}renderTotalForPlanGeneral(){return l.data?.itemInformation?.type===c.PLAN&&!l.data?.itemInformation?.trial?.trialPeriodDays&&!l.data?.itemInformation?.debitStrategy&&t("div",{class:"summary-row total"},t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},r.translate("summary.totalAmount")),t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},d(l.data?.pricing?.total,this.currency)))}renderTotalForNonPlan(){return l.data?.itemInformation?.type!==c.PLAN&&t("div",{class:"summary-row total"},t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},r.translate("summary.totalAmount")),t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},d(l.data.pricing.total,this.currency)))}renderTrialPeriod(){return l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.trial?.trialPeriodDays&&t("div",{class:"summary-row"},t("rebill-typography",{variant:"body2"},r.translate("summary.totalAmountLastTrialPeriod")),t("rebill-typography",{variant:"body2"},d(l.data?.pricing?.total,this.currency),`/${r.translate(`summary.${this.planFrequency}`,{count:this.planFrequencyCount||1})} `))}renderDiscountAlertWrapper(){return l.data?.itemInformation?.trial?.trialPeriodDays&&t("div",{class:"summary-row"},t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},r.translate("summary.trialPeriodDaysDetails",{trialDays:l.data?.itemInformation?.trial?.trialPeriodDays,count:l.data?.itemInformation?.trial?.trialPeriodDays})),t("rebill-typography",{variant:x(this.currentBreakpoint,g.DESKTOP)?"subtitle1":"body3",style:{fontWeight:x(this.currentBreakpoint,g.DESKTOP)?"normal":"bold"}},r.translate("summary.free")))}render(){const e=(e=true,i=true,a=true)=>t("div",{class:"summary-card"},(e||i)&&t("div",{class:"summary-card-info"},e&&t("rebill-typography",{variant:"subtitle-bold",gutterBottom:true},this.itemTitle),i&&this.itemDescription&&t("rebill-typography",{variant:"body2"},this.itemDescription)),a&&t("div",{class:"summary-card-amount"},t("rebill-typography",{variant:"body2"},l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.debitStrategy?d(l.data?.pricing?.planAmount,this.currency):d(this.subtotal,this.currency))));const i=()=>{const e=[this.renderTotalForPlan(),this.renderTotalForPlanGeneral(),this.renderTotalForNonPlan(),this.renderTrialPeriod(),this.renderDiscountAlertWrapper()].filter(Boolean);if(e.length>1){e.splice(e.length-1,0,t("rebill-divider",null))}return t("div",{class:"summary-details"},t("div",{class:"summary-row"},t("rebill-typography",{variant:"body2"},r.translate("summary.subtotal")),t("rebill-typography",{variant:"body2"},l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.debitStrategy?d(l.data.pricing.planAmount,this.currency):d(this.subtotal,this.currency))),l.data.pricing.installments&&t("div",{class:"summary-row"},t("rebill-typography",{variant:"body2"},r.translate("summary.installments")),t("rebill-typography",{variant:"body2"},_(l.data?.pricing?.installments,this.getRecalculatedInstallmentAmount()))),this.allowCoupon&&!x(this.currentBreakpoint,g.DESKTOP)&&t("discount-coupon",null),!l.data?.itemInformation?.trial?.trialPeriodDays&&!l.data?.itemInformation?.debitStrategy&&t("rebill-divider",null),e.map((e=>t("div",{class:"summary-detail-wrapper"},e))))};const a=()=>this.planFrequency&&this.discountApplied&&(this.discountedPercentage>0||this.discountAmount>0)&&t("rebill-alert",{variant:"filled",type:"success",icon:"tag-sale",size:"medium",colorIcon:u.GREEN,message:this.discountDuration?r.translate(`summary.planDiscountDescriptionWithDuration`,{discount:this.discountType===p.PERCENTAGE?`${this.discountedPercentage}%`:d(this.discountAmount,this.currency),duration:this.getDurationTranslation(this.discountDuration)}):r.translate(`summary.planDiscountDescriptionWithoutDuration`,{discount:this.discountType===p.PERCENTAGE?`${this.discountedPercentage}%`:d(this.discountAmount,this.currency)})});return t("div",{class:"summary-container"},this.displayedComponents.includes("totalAmount")&&t("div",{class:"summary-header"},l.data?.itemInformation?.type===c.PLAN&&l.data.itemInformation?.trial?.trialPeriodDays&&t("div",{class:"trial-pill"},t("rebill-typography",{variant:"body2",align:"center",color:u.GREEN_TEXT},r.translate("summary.trialPill",{days:l.data?.itemInformation?.trial?.trialPeriodDays,count:l.data?.itemInformation?.trial?.trialPeriodDays}))),t("div",{class:"total-amount-container"},t("rebill-typography",{variant:"h4-span",align:"center",gutterBottom:true},t("number-flow",{ref:e=>this.totalFlow=e})),this.planFrequency&&t("rebill-typography",{variant:"body1",color:u.SECONDARY,align:"center",gutterBottom:true,style:{fontWeight:"normal"}},`/ ${r.translate(`summary.${this.planFrequency}`,{count:this.planFrequencyCount||1})}`)),l.data?.itemInformation?.type!==c.PLAN&&t("rebill-typography",{variant:"body2",align:"center",gutterBottom:true},r.translate("summary.totalAmount")),this.allowCoupon&&x(this.currentBreakpoint,g.DESKTOP)&&t("discount-coupon",{"hide-label":true})),this.displayedComponents.includes("itemDetails")&&(x(this.currentBreakpoint,g.DESKTOP)?t("collapsible-card",{header:r.translate("summary.details")},e(true,true,true)):t("collapsible-card",{header:this.itemTitle},e(false,!!this.itemDescription,true))),this.displayedComponents.includes("discount")&&x(this.currentBreakpoint,g.DESKTOP)&&!l.data?.itemInformation?.trial?.trialPeriodDays&&!l.data?.itemInformation?.debitStrategy&&a(),this.displayedComponents.includes("timelineFreeTrial")&&l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.trial?.trialPeriodDays&&!x(this.currentBreakpoint,g.DESKTOP)&&t("rebill-timeline-free-trial",{"trial-period-ends-at":l.data?.itemInformation?.trial?.trialPeriodEndsAt,"trial-period-ends-reminder-at":l.data?.itemInformation?.trial?.trialPeriodEndsReminderAt,"trial-period-days":l.data?.itemInformation?.trial?.trialPeriodDays,subtotal:l.data.pricing.subtotal,currency:l.data.pricing.currency,"discount-applied":this.discountApplied,"discount-type":this.discountType,"discounted-percentage":this.discountedPercentage,"discount-duration":this.discountDuration,"discount-amount":this.discountAmount}),this.displayedComponents.includes("timelineDebitDay")&&l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.debitStrategy&&l.data?.itemInformation?.debitDay&&!x(this.currentBreakpoint,g.DESKTOP)&&t("rebill-timeline-debit-day",{"debit-day":l.data?.itemInformation?.debitDay,"total-amount":l.data?.pricing?.total,"plan-amount":l.data?.pricing?.planAmount,currency:l.data?.pricing?.currency,"debit-strategy":l.data?.itemInformation?.debitStrategy,"discount-applied":this.discountApplied,"discount-type":this.discountType,"discounted-percentage":this.discountedPercentage,"discount-duration":this.discountDuration,"discount-amount":this.discountAmount}),this.displayedComponents.includes("priceDetails")&&(x(this.currentBreakpoint,g.DESKTOP)?t("collapsible-card",{header:r.translate("summary.summary")},i()):i()),this.displayedComponents.includes("timelineFreeTrial")&&l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.trial?.trialPeriodDays&&x(this.currentBreakpoint,g.DESKTOP)&&t("rebill-timeline-free-trial",{"trial-period-ends-at":l.data?.itemInformation?.trial?.trialPeriodEndsAt,"trial-period-ends-reminder-at":l.data?.itemInformation?.trial?.trialPeriodEndsReminderAt,"trial-period-days":l.data?.itemInformation?.trial?.trialPeriodDays,subtotal:l.data?.pricing?.subtotal,currency:l.data?.pricing?.currency,"discount-applied":this.discountApplied,"discount-type":this.discountType,"discounted-percentage":this.discountedPercentage,"discount-duration":this.discountDuration,"discount-amount":this.discountAmount}),this.displayedComponents.includes("timelineDebitDay")&&l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.debitStrategy&&l.data?.itemInformation?.debitDay&&x(this.currentBreakpoint,g.DESKTOP)&&t("rebill-timeline-debit-day",{"debit-day":l.data?.itemInformation?.debitDay,"total-amount":l.data?.pricing?.total,"plan-amount":l.data?.pricing?.planAmount,currency:l.data?.pricing?.currency,"debit-strategy":l.data?.itemInformation?.debitStrategy,"discount-applied":this.discountApplied,"discount-type":this.discountType,"discounted-percentage":this.discountedPercentage,"discount-duration":this.discountDuration,"discount-amount":this.discountAmount}),this.displayedComponents.includes("discount")&&!x(this.currentBreakpoint,g.DESKTOP)&&!l.data?.itemInformation?.trial?.trialPeriodDays&&!l.data?.itemInformation?.debitStrategy&&a())}};be.style=he;const me=":host{display:block;position:relative}.test-mode-container{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:8px}.info-icon{margin-right:4px;display:flex;align-items:center}.test-mode-chip{display:flex;min-width:149px;height:40px;background:#ffffff;border:1px solid #e5e7eb;border-radius:20px;box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden;position:relative;z-index:10}.test-mode-chip.expanded{max-width:579px;height:40px;flex-direction:row;border-radius:20px;justify-content:space-between}.test-mode-container.cards-visible .test-mode-chip.expanded{border-radius:0 0 20px 20px;width:579px}.chip-content{display:flex;align-items:center;gap:2px;justify-content:space-between;min-height:24px;flex-shrink:0;margin-left:18px;margin-right:8px}.chip-content .info-icon{display:flex !important;align-items:center !important;vertical-align:middle !important}.chip-content rebill-typography{display:flex !important;align-items:center !important;line-height:1.5 !important}.test-mode-chip.expanded .chip-content{justify-content:flex-start;width:auto;margin-right:12px}.test-mode-panel{display:flex;align-items:center;width:100%;justify-content:space-between;animation:slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.test-mode-panel.closing{animation:slideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.panel-sections{display:flex;align-items:center;gap:12px;flex:1;justify-content:space-between;margin:8px}.cards-section{display:flex;align-items:center;cursor:pointer;border-radius:8px;transition:background-color 0.2s ease}.cards-section .cards-button{display:flex !important;align-items:center !important;justify-content:flex-start !important;margin-left:4px !important}.cards-section .cards-button .card-icon{display:flex !important;align-items:center !important;margin-right:8px !important;vertical-align:middle !important}.cards-section .cards-button rebill-typography{display:flex !important;align-items:center !important;line-height:1 !important}.registration-section{display:flex;align-items:center;gap:2px;cursor:pointer;transition:background-color 0.2s ease;flex:1;min-width:0}.cards-dropdown-panel{position:absolute;bottom:40px;left:0;width:579px;background:#ffffff;border-top:1px solid #e5e7eb;border-left:1px solid #e5e7eb;border-right:1px solid #e5e7eb;border-bottom:none;border-radius:16px 16px 0 0;z-index:15;animation:expandUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);transform-origin:bottom center;transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.cards-dropdown-panel.closing{animation:collapseDown 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.card-section{display:flex;flex-direction:column;justify-content:space-between}.header-content{display:flex;align-items:center;gap:8px;margin:8px}.card-details{background:#fafafa;border-radius:8px;border:1px solid #e5e7eb;margin:8px;min-height:223.7px;display:flex;flex-direction:column;justify-content:space-around;padding:16px}.card-row{display:flex;flex-direction:row;gap:24px;align-items:center;background:#ffffff;justify-content:space-around;border-radius:8px;border:1px solid #e5e7eb;width:531px;height:68px}.card-field{display:flex;flex-direction:column;gap:8px;flex:1}.field-value{display:flex;flex-direction:row;align-items:center;gap:8px;max-height:20px}.copy-button{align-items:center}@keyframes slideIn{from{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes slideOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-20px)}}@keyframes expandUp{from{opacity:0;transform:translateY(10px) scaleY(0.9)}to{opacity:1;transform:translateY(0) scaleY(1)}}@keyframes collapseDown{from{opacity:1;transform:translateY(0) scaleY(1)}to{opacity:0;transform:translateY(10px) scaleY(0.9)}}";const ue=class{constructor(t){e(this,t)}get el(){return i(this)}isPanelVisible=false;isPanelClosing=false;isCardsPanelVisible=false;isCardsPanelClosing=false;currentLanguage=r.getCurrentLanguage();componentWillLoad(){h.on("languageChanged",this.handleLanguageChange)}disconnectedCallback(){h.off("languageChanged",this.handleLanguageChange)}handleLanguageChange=()=>{this.currentLanguage=r.getCurrentLanguage()};togglePanel=()=>{if(this.isPanelVisible){this.isPanelClosing=true;if(this.isCardsPanelVisible){this.isCardsPanelClosing=true}setTimeout((()=>{this.isPanelVisible=false;this.isPanelClosing=false;this.isCardsPanelVisible=false;this.isCardsPanelClosing=false}),300)}else{this.isPanelVisible=true}};togglePanelCards=()=>{if(this.isCardsPanelVisible){this.isCardsPanelClosing=true;setTimeout((()=>{this.isCardsPanelVisible=false;this.isCardsPanelClosing=false}),300)}else{this.isCardsPanelVisible=true}};handleCopy=e=>{f(e);this.isCardsPanelClosing=true;setTimeout((()=>{this.isCardsPanelVisible=false;this.isCardsPanelClosing=false}),300)};handleDocsClick=()=>{window.open("https://v3.docs.rebill.com/sdk/checkout","_blank")};renderBasicChip(){return t("div",{class:"chip-content"},t("div",{class:"info-icon"},t("rebill-icon",{name:"circle-info",size:"16px",color:u.ORANGE})),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK,style:{display:"flex",alignItems:"center",justifyContent:"center"}},r.translate("sandbox.testMode")),!this.isPanelVisible&&t("div",{class:"arrow-icon"},t("rebill-button",{variant:"text",size:"small",onClick:this.togglePanel},t("rebill-icon",{name:"arrow-right-circle"}))))}renderExpandedChip(){return t("div",{class:`test-mode-panel ${this.isPanelClosing?"closing":""}`},t("div",{class:"panel-sections"},t("div",{class:"cards-section",onClick:this.togglePanelCards},t("rebill-button",{variant:"text",size:"small",class:"cards-button"},t("rebill-icon",{name:"card-test",class:"card-icon"}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},`${r.translate("sandbox.cards")} `),t("rebill-icon",{key:this.isCardsPanelVisible?"chevron-up":"chevron-down",name:this.isCardsPanelVisible?"chevron-up":"chevron-down",style:{marginLeft:"8px"}}))),t("div",{class:"docs-section"},t("rebill-button",{variant:"text",size:"small",onClick:this.handleDocsClick},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY},r.translate("sandbox.docs")),t("rebill-icon",{name:"external-link",style:{marginLeft:"8px"}}))),t("rebill-button",{variant:"text",size:"small",onClick:this.togglePanel},t("rebill-icon",{name:"close"}))))}renderCardsPanel(){return t("div",{class:`cards-dropdown-panel ${this.isCardsPanelClosing?"closing":""}`},t("div",{class:"card-details"},t("div",{class:"card-section"},t("div",{class:"header-content"},t("rebill-icon",{name:"succes",color:u.GREEN}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("sandbox.successPayment"))),t("div",{class:"card-row"},t("div",{class:"card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cardNumber")),t("div",{class:"field-value"},t("rebill-icon",{name:"visa"}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"4539148803436467"))),t("div",{class:"card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.expiryDate")),t("div",{class:"field-value"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"01/99"))),t("div",{class:"card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cvv")),t("div",{class:"field-value"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"123"),t("div",{class:"copy-button"},t("rebill-button",{variant:"text",size:"small",onClick:()=>this.handleCopy("4539148803436467 01/99 123")},t("rebill-icon",{name:"copy"}))))))),t("div",{class:"card-section"},t("div",{class:"header-content"},t("rebill-icon",{name:"rejected",color:u.ERROR}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("sandbox.rejectedPayment"))),t("div",{class:"card-row"},t("div",{class:"card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cardNumber")),t("div",{class:"field-value"},t("rebill-icon",{name:"visa"}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"4485364739527352"))),t("div",{class:"card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.expiryDate")),t("div",{class:"field-value"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"01/99"))),t("div",{class:"card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cvv")),t("div",{class:"field-value"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"123"),t("div",{class:"copy-button"},t("rebill-button",{variant:"text",size:"small",onClick:()=>this.handleCopy("4485364739527352 01/99 123")},t("rebill-icon",{name:"copy"})))))))))}render(){return t("div",{key:"fde7a239adcecb9f762a151c7dfc6d4ff8c9fac4",class:`test-mode-container ${this.isCardsPanelVisible||this.isCardsPanelClosing?"cards-visible":""}`},t("div",{key:"d529f91d83bb8f16872e6d388cf60c9e42ba89c9",class:`test-mode-chip ${this.isPanelVisible?"expanded":""}`},this.renderBasicChip(),(this.isPanelVisible||this.isPanelClosing)&&this.renderExpandedChip()),(this.isPanelVisible||this.isCardsPanelClosing)&&(this.isCardsPanelVisible||this.isCardsPanelClosing)&&this.renderCardsPanel())}};ue.style=me;const fe=".otp__otp-container{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;position:relative;margin-top:2rem}.otp__user-information{display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;gap:8px}.otp__otp-description-container{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:4px}.otp__change-email{cursor:pointer;text-decoration:underline;margin-left:0}.otp__change-email:hover{color:var(--rebill-primary-color);text-decoration:underline}.otp__alternative{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:16px;margin:32px;width:100%}.otp__rebill-alert{width:100%}.otp__guest-options{display:flex;flex-direction:column;width:100%;gap:8px;margin-top:auto}.otp__verifying-container{display:flex;align-items:center;justify-content:center;gap:16px;margin:8px 0}.otp__code-resent-container rebill-typography{display:flex;line-height:1}.otp__code-resent-container rebill-icon{flex-shrink:0;display:inline-flex;vertical-align:middle;margin-right:8px}.otp__spinner{width:15px;height:15px;border:2px solid rgba(255, 255, 255, 0.3);border-radius:50%;border-top-color:var(--rebill-color-primary);animation:spin 1s linear infinite;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}@media (max-width: 1024px){.otp__otp-container{min-height:calc(100vh - 40px)}.otp__guest-options{margin-top:32px}}@media (min-width: 1025px){.otp__otp-container{justify-content:flex-start}.otp__guest-options{margin-top:auto;padding-bottom:2rem}}";const ye=class{constructor(t){e(this,t);this.changeEmailClick=a(this,"changeEmailClick");this.returnForm=a(this,"returnForm");this.codeVerified=a(this,"codeVerified")}changeEmailClick;timeLeft=59;isTimerRunning=false;codeResent=false;isVerifying=false;otpValue="";returnForm;codeVerified;error=false;timer=y({duration:59,onTick:e=>{this.timeLeft=e},onComplete:()=>{this.isTimerRunning=false}});messageTimer=y({duration:5,onComplete:()=>{this.codeResent=false}});disconnectedCallback(){this.timer.stop()}startTimer(){this.timer.start();this.isTimerRunning=true}handleResendCode=async()=>{if(!this.isTimerRunning){await n.otp.generate(l.data.sessionId,{email:l.data.userInformation.email});this.codeResent=true;this.messageTimer.start();this.startTimer();this.error=false}};handleOtpChange=e=>{this.otpValue=e;if(e.length===6){this.handleVerifyOtp(e);this.error=false}};handleVerifyOtp=async e=>{this.isVerifying=true;try{const t=await n.otp.verify(l.data.sessionId,{email:l.data.userInformation.email,code:e});this.codeVerified.emit(t.data);b.setUserInformation({...t.data.customer,fullName:`${t.data.customer.firstName} ${t.data.customer.lastName}`.trim(),phoneNumber:{number:t.data.customer.phoneNumbers[0].number,countryCode:t.data.customer.phoneNumbers[0].countryCode},address:{billingAddress:{address:t.data.customer.addresses[0].lineOne,zip:t.data.customer.addresses[0].zipCode,city:t.data.customer.addresses[0].city,state:t.data.customer.addresses[0].state,country:t.data.customer.addresses[0].country}},documentType:t.data.customer.identifications[0].type,documentNumber:t.data.customer.identifications[0].value});b.setAccessToken(t.data.accessToken);b.setCustomerId(t.data.customer.id);this.otpValue="";this.error=false}catch(e){this.error=true}finally{this.isVerifying=false}};render(){return t("div",{key:"2caf50e0462cb4833cb0fc5e1565dc87db3c069f",class:"otp__otp-container"},t("div",{key:"0a7d48f7052803410b1b2b56f53cd1ba80b9c3e1",class:"otp__user-information"},t("div",{key:"5ab3ee4e570365a546a077326a069d78c122f0fb",class:"otp__otp-description-container"},t("rebill-typography",{key:"98b4487e64451bf0ab088753e147d1844adb8a7e",variant:"body2",class:"otp__otp-description"},r.translate("otp.description")),t("rebill-typography",{key:"0c26af0f6c2ec5b73db7729e950f17412567fc7b",variant:"subtitle-bold",class:"otp__otp-description-digits"}," ",t("strong",{key:"8c88db377dc4143fe1e21d3186c5ed6fd9528d06"},r.translate("otp.descriptionDigits"))," "),t("rebill-typography",{key:"09a2044dcfd408684a94d3001c30175a07a8e67a",variant:"body2",class:"otp__otp-description-email"},r.translate("otp.descriptionEmail"))),t("rebill-typography",{key:"2d47d49872d1be37e7db1be79f523a2e25f5f9e1",variant:"body2",class:"otp__otp-email-line"},l.data.userInformation.email," ",!l.data.prefilledData?.email&&t("span",{key:"2a6e5906689bd067d479a630af58f38077d5ee16",class:"otp__change-email",onClick:()=>{this.otpValue="";this.error=false;this.returnForm.emit(false)}},r.translate("otp.change")))),t("input-otp",{key:"4ca95108b6879ffd28ba3ae7b4cea1e96e93d088",otp:this.otpValue,onOtpChange:e=>this.handleOtpChange(e.detail),error:this.error?r.translate("otp.error"):""}),this.isVerifying&&t("div",{key:"9ba200515975990f80fdf8106a06c478e60b9a22",class:"otp__verifying-container"},t("rebill-typography",{key:"47b68cffc40bd7908a9b5f71d3d71b0055517888",variant:"subtitle2",color:u.PRIMARY},r.translate("otp.verifyingCode")),t("div",{key:"a5a8988084664300ad4fb4ea9f1fc7f3414c4927",class:"otp__spinner"})),t("rebill-button",{key:"89919d9d6501a4d8d9995963bf0322fe40bc394a",type:"button",variant:"outline",theme:this.isTimerRunning?"secondary":"primary",disabled:this.isTimerRunning,onClick:this.handleResendCode,size:"small",style:{height:"24px",marginBottom:"8px"}},this.isTimerRunning?`${r.translate("otp.resendCodeIn")} (${this.timer.getFormattedTime()})`:r.translate("otp.resendCode")),this.codeResent&&t("div",{key:"b5c1814c191b43546968a410da45e9a9d408baab",class:"otp__code-resent-container"},t("rebill-typography",{key:"9c22e91bc80d274885ed15676d8aea97f5747c3d",variant:"subtitle2",color:u.GREEN},t("rebill-icon",{key:"77fbf963094591deb8598bea2eef3699b79a4acc",name:"check-radio"}),r.translate("otp.codeResent"))),t("rebill-alert",{key:"985d1a4851d5844d44f814e66c4547326a323a32",class:"otp__rebill-alert",type:"secure",variant:"variant-info",message:r.translate("otp.infoMessage"),icon:"circle-info",alertTitle:r.translate("otp.infoTitle"),colorIcon:u.PRIMARY_DARK_LIGHT}),t("div",{key:"35973091d035ad398d14cb6a090aa6dc1ca5df59",class:"otp__alternative"},t("rebill-typography",{key:"a72bf2f9bacc7ff1a5b2a13acc5e63c29f5eade8",variant:"body2",color:u.PRIMARY_DARK},"o")),t("div",{key:"9372d19cf27f07555deb996fadcbd650962b89dc",class:"otp__guest-options"},t("rebill-button",{key:"56d5c69a58d59d9eb8285844dcac0e9821904793",type:"button",variant:"outline",theme:"secondary",size:"medium",onClick:()=>{this.otpValue="";this.error=false;this.returnForm.emit(false)}},r.translate("otp.continueAsGuest")),t("rebill-alert",{key:"6680fb829d6358d239d5f3491fed6144d9633559",type:"secure",variant:"variant-secure",icon:"lock-outline",message:r.translate("otp.secureMessage")})))}};ye.style=fe;const ge=".modal-overlay{position:fixed;top:0;left:0;right:0;background-color:transparent;display:flex;align-items:center;justify-content:center;z-index:10000;padding:12px 16px;box-sizing:border-box}.modal-content{background:white;border-radius:8px;padding:16px 20px;width:350px;box-shadow:0 4px 12px -2px rgba(0, 0, 0, 0.15),\n 0 2px 4px -1px rgba(0, 0, 0, 0.1);position:relative;display:flex;align-items:center;gap:12px}.modal-content .alert{margin:0;flex:1;padding:0;background:transparent;border:none;box-shadow:none}.modal-content .alert{background-color:transparent !important;border-color:transparent !important}.modal-content .alert-message{display:flex;flex-direction:column;gap:4px}.modal-content .close-button{position:absolute;top:8px;right:8px;width:20px;height:20px;border:none;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:background-color 0.2s ease;padding:0;margin:0;outline:none;box-shadow:none;line-height:1}.modal-content .close-button:focus{outline:none;box-shadow:none}.modal-content .close-button:hover{background-color:#f0f0f0}.modal-content .close-button rebill-icon{width:16px;height:16px;display:flex;align-items:center;justify-content:center}@media (max-width: 768px){.modal-overlay{padding:8px 12px}.modal-content{padding:12px 16px;flex-direction:column;gap:8px;text-align:center}.modal-content .close-button{width:100%}}";const xe=class{constructor(t){e(this,t)}visible=true;languageUpdateTrigger=0;unsubscribeCurrentLocaleStore;autoCloseTimer;componentDidLoad(){this.unsubscribeCurrentLocaleStore=b.onChange("currentLocale",(()=>{this.languageUpdateTrigger++}));this.autoCloseTimer=y({duration:30,onComplete:()=>{this.closeModal()}});this.autoCloseTimer.start()}disconnectedCallback(){if(this.unsubscribeCurrentLocaleStore){this.unsubscribeCurrentLocaleStore()}if(this.autoCloseTimer){this.autoCloseTimer.stop()}}closeModal=()=>{this.visible=false;if(this.autoCloseTimer){this.autoCloseTimer.stop()}};render(){if(!this.visible)return null;return t("div",{class:"modal-overlay"},t("div",{class:"modal-content"},t("div",{class:"alert info filled medium"},t("div",{class:"alert-icon"},t("rebill-icon",{name:"circle-info",size:"16px",color:u.ORANGE})),t("div",{class:"alert-message"},t("div",{class:"alert-title"},t("rebill-typography",{variant:"subtitle-bold",color:u.PRIMARY_DARK},r.translate("session.refreshedTitle"))),t("div",{class:"alert-message-text"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("session.refreshedMessage"))))),t("button",{onClick:this.closeModal,class:"close-button",type:"button"},t("rebill-icon",{name:"close",size:"20px"}))))}};xe.style=ge;const ve=":host{display:flex;position:relative;width:100%;justify-content:center;align-items:center}.mode-sandbox-mobile__test-mode-container{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.mode-sandbox-mobile__overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);z-index:5;animation:fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);pointer-events:auto;cursor:pointer}.mode-sandbox-mobile__test-mode-chip-mobile{display:flex;width:100%;min-width:auto;max-width:100%;height:40px;background:#ffffff;border:1px solid #e5e7eb;border-radius:20px;box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden;position:relative;z-index:20}.mode-sandbox-mobile__chip-content-mobile{display:flex;align-items:center;gap:2px;justify-content:flex-end;min-height:24px;flex-shrink:0;width:100%;margin:8px}.mode-sandbox-mobile__info-icon{display:flex;align-items:center}.mode-sandbox-mobile__test-mode-chip-mobile.expanded .mode-sandbox-mobile__chip-content-mobile{justify-content:flex-end;width:100%}.mode-sandbox-mobile__cards-dropdown-panel-header{display:flex;align-items:center;gap:8px;padding:8px}.mode-sandbox-mobile__docs-section{display:flex;align-items:center;gap:8px;cursor:pointer;margin-left:0;transition:background-color 0.2s ease;justify-content:flex-end;padding:8px;margin-top:8px}.mode-sandbox-mobile__cards-dropdown-panel{position:absolute;top:100%;left:0;right:0;width:100%;background:#ffffff;border-top:none;border-left:1px solid #e5e7eb;border-right:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;margin-top:16px;z-index:25;animation:expandDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);transform-origin:top center}.mode-sandbox-mobile__card-section{display:flex;flex-direction:column;justify-content:space-between}.mode-sandbox-mobile__header-content{display:flex;align-items:center;gap:8px;margin:8px}.mode-sandbox-mobile__card-details{background:#fafafa;border-radius:8px;border:1px solid #e5e7eb;margin:8px;min-height:208px;display:flex;flex-direction:column}.mode-sandbox-mobile__card-row{display:flex;gap:12px;align-items:stretch;background:#ffffff;justify-content:space-around;border-radius:8px;border:1px solid #e5e7eb;height:auto;padding:8px;margin:8px}.mode-sandbox-mobile__card-value{display:flex;flex-direction:column;gap:6px;flex:1}.mode-sandbox-mobile__field-value{display:flex;flex-direction:row;align-items:center;gap:8px;max-height:20px}.mode-sandbox-mobile__copy-button{align-items:center;margin-left:auto;margin-right:0}.mode-sandbox-mobile__icon-button{margin-left:auto;margin-right:16px}@keyframes expandDown{from{opacity:0;transform:translateY(-10px) scaleY(0.9)}to{opacity:1;transform:translateY(0) scaleY(1)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}";const _e=class{constructor(t){e(this,t)}get el(){return i(this)}isPanelVisible=false;currentLanguage=r.getCurrentLanguage();componentWillLoad(){h.on("languageChanged",this.handleLanguageChange)}disconnectedCallback(){h.off("languageChanged",this.handleLanguageChange)}handleLanguageChange=()=>{this.currentLanguage=r.getCurrentLanguage()};togglePanel=()=>{this.isPanelVisible=!this.isPanelVisible};handleCopy=e=>{f(e);this.isPanelVisible=false};handleDocsClick=()=>{window.open("https://v3.docs.rebill.com/sdk/checkout","_blank")};renderBasicChip(){return t("div",{class:"mode-sandbox-mobile__chip-content-mobile"},t("div",{class:"mode-sandbox-mobile__info-icon"},t("rebill-icon",{name:"circle-info",size:"24px",color:u.ORANGE})),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("sandbox.testMode")),t("div",{class:"mode-sandbox-mobile__icon-button"},t("rebill-button",{variant:"text",size:"small",onClick:this.togglePanel},t("rebill-icon",{name:"hamburger"}))))}renderCardsPanel(){return t("div",{class:"mode-sandbox-mobile__cards-dropdown-panel"},t("div",{class:"mode-sandbox-mobile__cards-dropdown-panel-header"},t("rebill-icon",{name:"card-test"}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("sandbox.cardTest"))),t("div",{class:"mode-sandbox-mobile__card-details"},t("div",{class:"mode-sandbox-mobile__card-section"},t("div",{class:"mode-sandbox-mobile__header-content"},t("rebill-icon",{name:"succes",color:u.GREEN}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("sandbox.successPayment"))),t("div",{class:"mode-sandbox-mobile__card-row"},t("div",{class:"mode-sandbox-mobile__card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cardNumber")),t("div",{class:"mode-sandbox-mobile__field-value"},t("rebill-icon",{name:"visa"}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"4539148803436467"))),t("div",{class:"mode-sandbox-mobile__card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.exp")),t("div",{class:"mode-sandbox-mobile__field-value"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"01/99"))),t("div",{class:"mode-sandbox-mobile__card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cvv")),t("div",{class:"mode-sandbox-mobile__field-value mode-sandbox-mobile__field-value-with-copy"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"123"),t("div",{class:"mode-sandbox-mobile__copy-button"},t("rebill-button",{variant:"text",size:"small",onClick:()=>this.handleCopy("4539148803436467 01/99 123")},t("rebill-icon",{name:"copy"}))))))),t("div",{class:"mode-sandbox-mobile__card-section"},t("div",{class:"mode-sandbox-mobile__header-content"},t("rebill-icon",{name:"rejected",color:u.ERROR}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},r.translate("sandbox.rejectedPayment"))),t("div",{class:"mode-sandbox-mobile__card-row"},t("div",{class:"mode-sandbox-mobile__card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cardNumber")),t("div",{class:"mode-sandbox-mobile__field-value"},t("rebill-icon",{name:"visa"}),t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"4485364739527352"))),t("div",{class:"mode-sandbox-mobile__card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.exp")),t("div",{class:"mode-sandbox-mobile__field-value"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"01/99"))),t("div",{class:"mode-sandbox-mobile__card-value"},t("rebill-typography",{variant:"subtitle3",color:u.GREY_700},r.translate("sandbox.cvv")),t("div",{class:"mode-sandbox-mobile__field-value mode-sandbox-mobile__field-value-with-copy"},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY_DARK},"123"),t("div",{class:"mode-sandbox-mobile__copy-button"},t("rebill-button",{variant:"text",size:"small",onClick:()=>this.handleCopy("4485364739527352 01/99 123")},t("rebill-icon",{name:"copy"})))))))),t("div",{class:"mode-sandbox-mobile__docs-section",onClick:this.handleDocsClick},t("rebill-typography",{variant:"subtitle2",color:u.PRIMARY},r.translate("sandbox.docs")),t("rebill-icon",{name:"external-link"})))}render(){return t("div",{key:"5797f1ee6f26ef47ba16e103ced89d74574d3ea7",class:`mode-sandbox-mobile__test-mode-container ${this.isPanelVisible?"cards-visible":""}`},this.isPanelVisible&&t("div",{key:"c9ff3977ef585a7abd28f2da25ef9dd18d7f9d00",class:"mode-sandbox-mobile__overlay"}),t("div",{key:"e3dd9ab7e2bfa1573402ef6b80a2ca50947da702",class:`mode-sandbox-mobile__test-mode-chip-mobile ${this.isPanelVisible?"expanded":""}`},this.renderBasicChip()),this.isPanelVisible&&this.renderCardsPanel())}};_e.style=ve;const ke=":root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-hover:#001c4a;--rebill-color-primary-dark-light:rgba(0, 17, 49, 0.1);--rebill-color-error:#ef4444;--rebill-color-error-background:#fef2f2;--rebill-color-error-light:rgba(239, 68, 68, 0.1);--rebill-color-error-dark:#6f101b;--rebill-color-background:#ffffff;--rebill-color-background-left:#fafafa;--rebill-color-background-right:#f4f5f6;--rebill-color-background-secondary:#f7f8fa;--rebill-color-border:#ebedef;--rebill-color-timeline-connector:#c4c8cf;--rebill-color-neutrals-700:#58616e;--rebill-color-neutrals-500:#9ca3af;--rebill-color-border-primary:#e4e4e7;--rebill-color-text-primary:#3b4049;--rebill-color-text-secondary:#6b7280;--rebill-color-grey-700:#7d7d7d;--rebill-color-text-secondary-light:#a1a1aa;--rebill-color-text-on-primary:#ffffff;--rebill-color-disabled:#9ca3af;--rebill-color-shadow:rgba(0, 0, 0, 0.1);--rebill-color-green:#10b981;--rebill-color-green-text:#257c67;--rebill-color-green-light:rgba(183, 233, 221, 0.15);--rebill-color-green-light-2:rgba(183, 233, 221, 1);--rebill-color-info-background:#d5e4ff;--rebill-color-info-border:#0156f6;--rebill-color-info-text:#172b85;--rebill-color-background-secondary-light:#f7f8fa;--rebill-breakpoint-mobile:768px;--rebill-breakpoint-tablet:1024px;--rebill-breakpoint-desktop:1025px;--rebill-color-orange:#ff9400;--rebill-color-black:#1e2025;--rebill-color-grey-300:#3b4049;--rebill-color-grey-100:#aeaeae}.qr-container,.qr-image,.qr-image svg,.qr-image img,[class*='qr-'],[class*='success'],[class*='receipt']{transition:none !important;animation:none !important;will-change:auto !important}button:active,button:focus,button:hover{isolation:isolate}.success-page__text-content{margin-bottom:2rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.success-page__success-content{display:flex;flex-direction:column;align-items:center;gap:1rem;width:100%;overflow-x:hidden;box-sizing:border-box}.success-page__lottie-container{width:80px;height:80px}.success-page__success-content rebill-typography[variant='h3']{margin:0 !important;padding:0 !important}.success-page__success-icon{display:flex;justify-content:center;margin:0.5rem 0}.success-page__info-card{padding:24px;gap:16px;width:100%;max-width:450px;border:1px solid #ebedef;border-radius:8px;display:flex;flex-direction:column;box-sizing:border-box}.success-page__card-row{display:flex;justify-content:space-between;align-items:start;min-height:20px;gap:15%}.success-page__card-row:last-of-type{margin-bottom:0}.success-page__card-value{display:flex;align-items:center;gap:0.5rem}.success-page__payment-method-display{display:flex;align-items:center;gap:8px;justify-content:center}.success-page__payment-method-display rebill-card-icon{display:inline-block;flex-shrink:0;margin-right:8px;vertical-align:middle}.success-page__payment-method-display rebill-card-icon svg{display:block}.success-page__payment-method-display rebill-icon{display:inline-block;vertical-align:middle;margin-right:8px}.success-page__payment-method-display rebill-icon div{display:block}.success-page__card-divider{height:1px;background:#e5e7eb}.success-page__download-container{display:flex;align-items:center;justify-content:flex-start;gap:2px;text-decoration:none;cursor:pointer}.success-page__contact-info{text-align:left}.success-page__reference-number{word-break:break-all;overflow-wrap:break-word;hyphens:auto;max-width:100%;text-align:right}.success-page__total-amount-container{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-direction:row}.success-page__trial-pill{background-color:var(--rebill-color-green-light-2);border-radius:4px;padding:4px 6px 4px 6px;display:flex;align-items:center;justify-content:center}.success-page__next-charge-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px}.success-page__next-charge-details{display:flex;justify-content:space-between;align-items:flex-start}.success-page__next-charge-amount{display:flex;flex-direction:row;align-items:center;gap:4px}.success-page__next-charge-date{text-align:right}.success-page__next-charge-section{margin-top:12px;padding-top:12px}@media (max-width: 1024px){.success-page__success-content{max-width:100%;gap:1.5rem;margin-left:16px;margin-right:16px}.success-page__info-card{width:100%;max-width:100%;padding:12px}.success-page__text-content{gap:12px}}@media (max-width: 767px){.success-page__info-card{padding:12px}.success-page__processing-container{padding:0 16px}}";const we=class{constructor(t){e(this,t);this.successRedirect=a(this,"successRedirect")}typePaymentMethod=m.CARD;country="";bank="";paymentMethodName="";cardLastFour="";paymentDate="";referenceNumber="";trialPeriodDays=0;debitDay=0;planAmount=0;currentLocale=l.currentLocale;breakpoint=g.DESKTOP;successRedirect;loaderProgress=0;isLoadingLottie=true;showRedirectMessage=false;timeToRedirect=3e3;progressInterval;lottieContainer;lottieAnimation;unsubscribeCurrentLocaleStore;successDisplayTimeout;applyStartCaseToBrand=e=>{if(!e)return"";return e.toLowerCase().split(/[\s-]+/).map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")};getPaymentMethodConfig(e){const t=this.country?D(this.country):null;const i=t?.find((t=>t.type===e));const a={[m.CARD]:{key:m.CARD,label:r.translate("paymentMethods.card"),icons:["doblecard"]},[m.CASH]:{key:m.CASH,label:r.translate("paymentMethods.cash"),icons:["pago-facil"]},[m.BANK_TRANSFER]:{key:m.BANK_TRANSFER,label:r.translate("paymentMethods.bank_transfer"),icons:["plus"]}};const s=a[e];return{...s,icons:i?.icons||s.icons}}getPaymentDate=()=>this.paymentDate||"";componentWillLoad(){this.breakpoint=v(window.innerWidth);this.unsubscribeCurrentLocaleStore=b.onChange("currentLocale",(()=>{this.currentLocale=l.currentLocale}));if(l.data?.itemInformation?.redirectSuccess){this.successDisplayTimeout=window.setTimeout((()=>{this.showRedirectMessage=true;this.loadLottieAnimation()}),1500);setTimeout((()=>{let e=l.data?.itemInformation?.redirectSuccess;if(e){this.successRedirect.emit({redirectUrl:e});this.stopLoaderAnimation()}}),this.timeToRedirect)}}componentDidLoad(){window.addEventListener("resize",this.handleResize);if(!l.data?.itemInformation?.redirectSuccess||this.showRedirectMessage){this.loadLottieAnimation()}}disconnectedCallback(){if(this.unsubscribeCurrentLocaleStore){this.unsubscribeCurrentLocaleStore()}if(this.successDisplayTimeout){clearTimeout(this.successDisplayTimeout)}window.removeEventListener("resize",this.handleResize);this.stopLoaderAnimation()}handleResize=()=>{this.breakpoint=v(window.innerWidth)};loadLottieAnimation=async()=>{try{const e=await import("./p-GK75wIKe.js").then((function(e){return e.l}));const t=await fetch($(`loader-redirect1.json`));const i=await t.json();if(this.lottieContainer){this.lottieAnimation=e.default.loadAnimation({container:this.lottieContainer,renderer:"svg",loop:true,autoplay:true,animationData:i})}else{this.startLoaderAnimation()}}catch(e){this.startLoaderAnimation()}};startLoaderAnimation=()=>{const e=3e3;const t=50;const i=t/e*100;this.progressInterval=window.setInterval((()=>{this.loaderProgress=Math.min(this.loaderProgress+i,100);if(this.loaderProgress>=100){this.stopLoaderAnimation()}}),t)};stopLoaderAnimation=()=>{if(this.progressInterval){clearInterval(this.progressInterval);this.progressInterval=undefined}if(this.lottieAnimation){this.lottieAnimation.destroy();this.lottieAnimation=undefined}};handleDownloadReceipt=async()=>{try{await j.generateAndDownloadReceipt({paymentMethod:this.typePaymentMethod===m.CARD?this.textPaymentMethodCard():this.paymentMethodName,...this.typePaymentMethod===m.BANK_TRANSFER&&{bank:this.bank},...this.typePaymentMethod===m.CARD&&{cardBrand:this.applyStartCaseToBrand(l.data.cardInformation?.brand||"")},...this.typePaymentMethod===m.CARD&&{cardLastFour:this.cardLastFour??l.data.cardInformation?.lastFour},paymentDate:T(this.getPaymentDate())||T((new Date).toISOString()),email:l?.data?.userInformation?.email||"",referenceNumber:this.referenceNumber,productTitle:l?.data?.itemInformation?.title||"",subtotal:this.getFormattedSubtotal(),total:this.getFormattedTotal(),currency:l?.data?.pricing?.currency||" ",installments:l?.data?.pricing?.installments&&l?.data?.cardInformation?.installments?.selectedInstallment?`${k(l.data?.cardInformation?.installments?.selectedInstallment?.installment,C(l.data?.cardInformation?.installments?.selectedInstallment?.installmentAmount||0),l.data?.pricing?.currency,l.data?.cardInformation?.installments?.selectedInstallment?.cft,l.data?.cardInformation?.installments?.selectedInstallment?.model)}\n( ${r.translate("processing.purchaseTotal")}: ${this.getFormattedTotal()} )${l.data.cardInformation?.installments?.installments.find((e=>e.installment===l.data.cardInformation?.installments?.selectedInstallment?.installment))?.model===w.CUSTOMER_FINANCED?`\n${r.translate("installments.interest")}`:""}`:"",discountAmount:this.getFormattedDiscountAmount(),trialPeriodDays:this.trialPeriodDays||l.data?.itemInformation?.trial?.trialPeriodDays,debitDay:this.debitDay||l.data?.itemInformation?.debitDay,planAmount:this.getFormattedSubtotal(this.planAmount),trialEndDate:this.hasFreeTrial()?this.getTrialEndDateFormatted():undefined,debitDate:this.hasDebitDay()?this.getDebitDateFormatted():undefined,isBankTransfer:this.typePaymentMethod===m.BANK_TRANSFER})}catch(e){console.error("Error downloading receipt:",e)}};getFormattedDiscountAmount=()=>{if(l?.data?.pricing?.discountAmount>0){const e=d(l.data?.pricing?.discountAmount,l.data?.pricing?.currency);return`-${e}`}return undefined};getFormattedSubtotal=(e=null)=>d(e||l?.data?.pricing?.subtotal,l?.data?.pricing?.currency);getFormattedTotal=()=>{if(this.trialPeriodDays>0){return d(0,l?.data?.pricing?.currency)}return d(l?.data?.pricing?.total,l?.data?.pricing?.currency)};hasFreeTrial=()=>l.data?.itemInformation?.type===c.PLAN&&l.data?.itemInformation?.trial?.trialPeriodDays&&l.data?.itemInformation?.trial?.trialPeriodDays>0;hasDebitDay=()=>{const e=l.data?.itemInformation?.debitDay;return e&&e>0};getTrialEndDateFormatted=()=>{const e=l.data?.itemInformation?.trial?.trialPeriodEndsAt;if(!e)return"";const t=new Date(e);const i=r.getCurrentLanguage();const a=i==="es"?"es-ES":i==="pt"?"pt-BR":"en-US";if(i==="en"){return`${t.toLocaleDateString(a,{month:"long"})} ${t.getDate()}`}else{return`${t.getDate()} de ${t.toLocaleDateString(a,{month:"long"})}`}};getDebitDateFormatted=()=>{const e=l.data?.itemInformation?.debitDay;if(!e||e<=0)return"";const t=new Date;const i=new Date(t);const a=r.getCurrentLanguage();const s=a==="es"?"es-ES":a==="pt"?"pt-BR":"en-US";if(e<t.getDate()){i.setMonth(t.getMonth()+1)}i.setDate(e);while(i.getDate()!==e){i.setDate(i.getDate()-1)}if(a==="en"){return`${i.toLocaleDateString(s,{month:"long"})} ${i.getDate()}`}else{return`${i.getDate()} de ${i.toLocaleDateString(s,{month:"long"})}`}};textPaymentMethodCard=()=>{const e=l.data?.cardInformation?.brand;const t=this.cardLastFour||l?.data?.cardInformation?.lastFour;const i=this.applyStartCaseToBrand(e||"");return e&&t?`${i} - ${t}`:i};render(){const e=l.data?.itemInformation?.redirectSuccess;return t("rebill-checkout-single-column",{key:"211b6d795093744fdeb68d3d14014837650a2f2a"},t("div",{key:"3667de834339ce4733dbab7c7d7c7fa0754c21b8",class:"success-page__success-content"},t("rebill-typography",{key:"77d7fd78ac398842db3306a9fb0413774d3c03a9",variant:"h3",color:u.PRIMARY_DARK_TEXT},e&&this.showRedirectMessage?r.translate("processing.redirectMessage"):r.translate("processing.successTitle")),e&&this.showRedirectMessage?t("div",{class:"redirect-message"},t("div",{class:"success-page__lottie-container"},t("div",{ref:e=>this.lottieContainer=e,class:"lottie-animation"}))):t("div",{class:"success-page__success-icon"},t("svg",{width:x(this.breakpoint,g.DESKTOP)?"64":"96",height:x(this.breakpoint,g.DESKTOP)?"64":"96",viewBox:"0 0 96 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.99219 47.998C7.99219 25.9067 25.9008 7.99805 47.9922 7.99805C70.0836 7.99805 87.9922 25.9067 87.9922 47.998C87.9922 70.0894 70.0836 87.998 47.9922 87.998C25.9008 87.998 7.99219 70.0894 7.99219 47.998ZM61.5401 39.2645C62.2396 38.4096 62.1136 37.1496 61.2587 36.4501C60.4038 35.7507 59.1437 35.8767 58.4443 36.7316L41.8437 57.0211L35.4064 50.5838C34.6254 49.8028 33.359 49.8028 32.578 50.5838C31.7969 51.3649 31.7969 52.6312 32.578 53.4123L40.578 61.4123C40.9775 61.8118 41.5275 62.0237 42.0918 61.9956C42.6562 61.9674 43.1823 61.7019 43.5401 61.2645L61.5401 39.2645Z",fill:"#35B093"}))),t("div",{key:"cedc0613b73f32ba2007a436e3d123d5cc402c00",class:"success-page__info-card"},t("div",{key:"9e6cb1205edd9bb55ddc66a2963d04a8e843f9c6",class:"success-page__card-row"},t("rebill-typography",{key:"f85fde7f87dcc552262f474728a4db5f8b26ce8c",variant:"body2",color:u.SECONDARY},r.translate("processing.paymentMethod")),t("div",{key:"3aa38a7ab8bb457c093b2d5f7da66a62a8d1fd91",class:"success-page__card-value"},t("div",{key:"5b0397ca35714f3b3d40febc36960f837f281dae",class:"success-page__payment-method-display"},this.typePaymentMethod===m.CARD&&t(t.Fragment,null,t("rebill-card-icon",{key:"d61b1bc696fe373f357c7b9fe692d13d3683ab85","card-brand":l.data?.cardInformation?.brand||""}),t("rebill-typography",{key:"74624b3e061fea44a6101c3840c36423f019292c",variant:"body2",color:u.PRIMARY_DARK_TEXT},this.textPaymentMethodCard())),this.typePaymentMethod===m.BANK_TRANSFER&&t("div",{key:"27192757f88c8ca46518d8136700fd5512548541",style:{display:"flex",alignItems:"center",gap:"8px"}},t("div",{key:"7a6688ff1b2db3993052a0f75e4602f9fc146c74",style:{display:"flex",alignItems:"center",gap:"8px"}},this.getPaymentMethodConfig(m.BANK_TRANSFER).icons.map((e=>t("rebill-icon",{name:e,size:"24px"})))),t("rebill-typography",{key:"fc3b4da565d59cad2271a787fb35d8573041b9dd",variant:"body2",color:u.PRIMARY_DARK_TEXT},r.translate("paymentMethods.bank_transfer")))))),l?.data?.pricing?.installments&&l?.data?.cardInformation?.installments?.selectedInstallment&&t("div",{key:"318537c8bf80f143dd3c22fd387e8754e65925c1"},t("div",{key:"d925bc2e1020d6c82c42ac4a92780287fa1511d8",class:"success-page__card-row"},t("rebill-typography",{key:"2353ac11401362438d9d9f832be577dd2875ac2c",variant:"body2",color:u.SECONDARY},r.translate("summary.installments")),t("div",{key:"c0e9d5819610daea3e7d1792f0c0c584f5f5ffef",style:{display:"flex",flexDirection:"column",gap:"10px",alignItems:"end"}},t("rebill-typography",{key:"c5e0807246e0032fc34afb213b7b3784c8e4d395",variant:"body2",color:u.PRIMARY_DARK_TEXT,style:{textAlign:"end"}},k(l.data?.cardInformation?.installments?.selectedInstallment?.installment,C(l.data?.cardInformation?.installments?.selectedInstallment?.installmentAmount||0),l.data?.pricing?.currency,l.data?.cardInformation?.installments?.selectedInstallment?.cft,l.data?.cardInformation?.installments?.selectedInstallment?.model)),t("rebill-typography",{key:"a52ddb830767f6bd63fd4b2f08727f572bf171f8",variant:"body2",color:u.PRIMARY_DARK_TEXT},`( ${r.translate("processing.purchaseTotal")}: ${this.getFormattedTotal()} )`),l.data.cardInformation?.installments?.installments.find((e=>e.installment===l.data.cardInformation?.installments?.selectedInstallment?.installment))?.model===w.CUSTOMER_FINANCED&&t("rebill-typography",{key:"8d68d5471e42e2b9d06b3253d17b7db4a168099f",variant:"italic",color:u.SECONDARY,style:{textAlign:"end"}},`${r.translate("installments.interest")}`)))),t("div",{key:"0ddf0cb128d339c853aeac49c2411c7e72b2e305",class:"success-page__card-row"},t("rebill-typography",{key:"b07c0d419defb130e48c50419814328858aac0c1",variant:"body2",color:u.SECONDARY},r.translate("processing.paymentDate")),t("rebill-typography",{key:"b3760068c527c6a665f431f30e92b519c821cad2",variant:"body2",color:u.PRIMARY_DARK_TEXT},T(this.paymentDate||this.getPaymentDate()||l.createdAt)||"")),t("div",{key:"a092b8dc684c9e79ef33547f5479b597914cf0d8",class:"success-page__card-row"},t("rebill-typography",{key:"5618fdcd4f1ac82a5ca6f463cf8c79764ac85a5e",variant:"body2",color:u.SECONDARY},r.translate("processing.paymentEmail")),t("rebill-typography",{key:"34823a0802e7eac4b606cc74fa9d6cbf82e57dfa",variant:"body2",color:u.PRIMARY_DARK_TEXT},l?.data?.userInformation?.email)),t("div",{key:"d0e434d36b46ec5cfd54e59ea0419c724f61cf8a",class:"success-page__card-row"},t("rebill-typography",{key:"700ebbb4f69b4eda9aebf126d9c0361dc5415ff3",variant:"body2",color:u.SECONDARY},r.translate("processing.paymentReference")),t("rebill-typography",{key:"14d58b477ec76c4d62ee447191b306d42b8c18cc",variant:"body2",color:u.PRIMARY_DARK_TEXT,class:"success-page__reference-number"},this.referenceNumber||""))),t("div",{key:"aa1eb45fe62810771a4aa767752c64565a660bd6",class:"success-page__info-card"},t("rebill-typography",{key:"0c7c03507ddfa3217cdddf0f12c9acfb4588c4b5",variant:"subtitle-bold",color:u.PRIMARY_DARK_TEXT},r.translate("processing.purchaseDetails")),t("div",{key:"69d9902ae1d62ca74084671a02302d4689e2b147",class:"success-page__card-row"},t("rebill-typography",{key:"4d4c65278338aa2981029977af929cb06db3ef4c",variant:"body2",color:u.SECONDARY},r.translate("processing.purchaseDetail")),t("rebill-typography",{key:"d149e206559202c2b5f7ae407c8ea818b8a67a2b",variant:"body2",color:u.PRIMARY_DARK_TEXT},l?.data?.itemInformation?.title||"")),!this.trialPeriodDays&&t("div",{key:"0d2f9d7c952d3e77f90e5fa7ed9ce8a318ebafb5",class:"success-page__card-row"},t("rebill-typography",{key:"b3396af88864a05dd5d40857ca521fb594809769",variant:"body2",color:u.SECONDARY},r.translate("processing.purchaseSubtotal")),t("rebill-typography",{key:"2fd1727ac9984a8ece69548b82dd70d4b24b9677",variant:"body2",color:u.PRIMARY_DARK_TEXT},this.getFormattedSubtotal())),l?.data?.pricing?.discountAmount>0&&t("div",{key:"4dc45ce6d4adf10951a32f5be52c48e123c305c7",class:"success-page__card-row"},t("rebill-typography",{key:"ca7f560871600b62294a797a57bca48a24f4a54b",variant:"body2",color:u.SECONDARY},r.translate("summary.discount")),t("rebill-typography",{key:"91bc2b0b8d4a19747e4f376539e98af476be616a",variant:"body2",color:u.PRIMARY_DARK_TEXT},this.getFormattedDiscountAmount())),t("div",{key:"63cc148395787d492d8de587530e4c6c9ecaec89",class:"success-page__card-row"},t("rebill-typography",{key:"b92d407c90c24122e8d9e582b569520cfaec759b",variant:"body2",color:u.SECONDARY},r.translate("processing.purchaseMontoTotal")),t("div",{key:"7c446255c9780c8960662abf768075128f79f6cc",class:"success-page__total-amount-container"},this.trialPeriodDays>0&&t("div",{key:"97007ba0f13a3dbecd0eda3b714f3cbd74947650",class:"success-page__trial-pill"},t("rebill-typography",{key:"9f76794ba7eda00b355aac8d4544ac5ebf042aba",variant:"body2",align:"center",color:u.GREEN_TEXT},r.translate("processing.trialPill",{days:this.trialPeriodDays,count:this.trialPeriodDays}))),t("rebill-typography",{key:"88b60748048b4d5c2f7210fb311b7e9c9c642eae",variant:"body2",color:u.PRIMARY_DARK_TEXT},this.getFormattedTotal()))),(this.trialPeriodDays||this.hasDebitDay())&&t("div",{key:"5907e4ab3c0b87fa52ae3e3947415646e5a99dfd",class:"success-page__card-divider"}),(this.hasFreeTrial()||this.hasDebitDay())&&t("div",{key:"5038824ebaec9c37b775195e67aae056b0c8ccc4",class:"success-page__next-charge-section"},t("div",{key:"f6399e2169b7c643eb919559ab48ed25f5530cb6",class:"success-page__next-charge-header"},t("rebill-typography",{key:"bd5a419ac0792f5eb518f91a57ecc4018d232a16",variant:"subtitle-bold",color:u.PRIMARY_DARK_TEXT},r.translate("processing.nextCharge")),t("rebill-typography",{key:"2e31fe5ef524d4a5124fa40eda34b8d0aa075a52",variant:"subtitle-bold",color:u.PRIMARY_DARK_TEXT},r.translate("processing.onDate",{date:this.hasFreeTrial()?this.getTrialEndDateFormatted():this.getDebitDateFormatted()}))),t("div",{key:"0dc2c3aec26377c525b7c7df53a5675599ddf921",class:"success-page__card-row"},t("rebill-typography",{key:"cca9703b882e5819a723e050482657dc35492a2c",variant:"body2",color:u.PRIMARY_DARK_TEXT},this.hasFreeTrial()?r.translate("processing.atEndOfTrial"):""),t("rebill-typography",{key:"1a94fb9a75123672488960fa1f26b9e5f3529eee",variant:"body2",color:u.PRIMARY_DARK_TEXT},this.getFormattedSubtotal(this.planAmount)," ",r.translate("processing.perMonth")))),t("div",{key:"f0df52f2b5b77f7c991f44dd2403c2f19bb3667c",class:"success-page__card-divider"}),t("div",{key:"163e69fde6e63ccbe6f85fc4716439537461884c",class:"success-page__download-container"},t("svg",{key:"ce30b00a998aa61bf97043a21b3c3e8110732406",class:"download-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"da4eb361ac3c41b590f80fff8d78cc5cab783880",d:"M13.498 9.83333V12.1667C13.498 12.903 12.9011 13.5 12.1647 13.5H3.83138C3.095 13.5 2.49805 12.903 2.49805 12.1667V9.83333M7.99804 10V2.5M7.99804 10L5.66471 7.66667M7.99804 10L10.3314 7.66667",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})),t("rebill-button",{key:"a013144930708f60637ca2978aefc41f0ede7ffd",type:"button",variant:"download",size:"small",onClick:this.handleDownloadReceipt},t("rebill-typography",{key:"1c61ce732648c8f0426bbd353de9ad43385d27bd",variant:"overline",color:u.PRIMARY_DARK_TEXT},r.translate("processing.download")))),t("div",{key:"e0b1266863e88a7077b27cf40c5f105c26602f36",class:"success-page__contact-info"},t("rebill-typography",{key:"ea3ba3f863789ccd1165f1d1797f7ca063a53c17",variant:"information-text",color:u.SECONDARY},r.translate("processing.downloadDescription"))))))}};we.style=ke;const Ce=":host{display:block}.inputs-container{display:flex;flex-direction:column;gap:16px;width:100%}.customer-exists{display:flex;justify-content:flex-end;margin-bottom:16px}";const $e=class{constructor(t){e(this,t);this.onRebillAccountClick=a(this,"onRebillAccountClick")}userInformation={email:"",fullName:"",countryCode:""};errors=null;customerExists=false;disabled=false;onRebillAccountClick;translateError(e){if(!e)return"";if(e.includes("validation.")||e.includes("paymentErrors.")){return r.translate(e)}return e}handleInputChange(e){if(!e.detail)return;const{id:t,value:i}=e.detail;b.setUserInformation({[t]:i})}handleBlur(e){if(!e.detail)return;const{id:t,value:i}=e.detail;b.setUserInformation({[t]:i})}getCardLabels(){const e=[];if(l.data.prefilledData.email){e.push({label:r.translate("userInformation.emailPlaceholder"),value:l.data.prefilledData.email});b.setUserInformation({...l.data.userInformation,email:l.data.prefilledData.email})}if(l.data.prefilledData.fullName){e.push({label:r.translate("userInformation.fullNamePlaceholder"),value:l.data.prefilledData.fullName});b.setUserInformation({...l.data.userInformation,fullName:l.data.prefilledData.fullName})}return e}async handleRebillAccountClick(){n.otp.generate(l.data.sessionId,{email:l.data.userInformation.email});this.onRebillAccountClick.emit(true)}renderInputs(){const e=l.data.prefilledData.email;const i=l.data.prefilledData.fullName;const a=[];if(!e){a.push(t("rebill-input-text",{id:"email",variant:"floating",label:r.translate("userInformation.emailPlaceholder"),placeholder:r.translate("userInformation.emailPlaceholder"),"left-icon":"email",clearable:true,disabled:this.disabled,error:this.translateError(this.errors?.email)}))}if(!i){a.push(t("rebill-input-text",{id:"fullName",variant:"floating",label:r.translate("userInformation.fullNamePlaceholder"),placeholder:r.translate("userInformation.fullNamePlaceholder"),disabled:this.disabled,error:this.translateError(this.errors?.fullName)}))}return a.length>0?t("div",{class:"inputs-container",style:{marginTop:a.length>0&&(e||i)?"1rem":"0"}},a):null}render(){const e=t("div",{key:"2919ec411d9b699b8f97226418226460352ac953",class:"customer-exists"},t("rebill-button",{key:"4b1b82fb5ffd96b2278bebf26456fdc8564078fc",style:{visibility:this.customerExists?"visible":"hidden",opacity:this.customerExists?"1":"0",transition:"opacity 0.3s ease-in-out"},variant:"text",size:"small",onClick:()=>this.handleRebillAccountClick(),icon:"lock"},r.translate("userInformation.rebillAccount"),t("rebill-icon",{key:"41a8282a2aa531f845b451c5e1e461b0e001fe8d",name:"arrow-right"})));const i=l.data.prefilledData.email;const a=l.data.prefilledData.fullName;const n=i||a;return t(s,{key:"7fce91fa4f13ca932a525e0ea29854a14b827cd6"},e,n&&t("rebill-card",{key:"e450171b7617c6ade6b7f76d41f40c2ce8f1966b",cardTitle:r.translate("userInformation.personalInformation"),cardLabels:this.getCardLabels()}),this.renderInputs())}};$e.style=Ce;export{ye as otp_component,xe as rebill_modal_overlay,ue as rebill_mode_sandbox,_e as rebill_mode_sandbox_mobile,be as rebill_summary,we as success_page,$e as user_information};
2
+ //# sourceMappingURL=p-91432c62.entry.js.map
@@ -1,2 +1,2 @@
1
- import{h as n,j as s,I as t,s as e}from"./p-CP6XOgmg.js";var a;(function(n){n["CUSTOMER_FINANCED"]="customer_financed";n["MERCHANT_FINANCED"]="merchant_financed";n["ISSUER_FINANCED"]="issuer_financed"})(a||(a={}));const i=(s,a)=>t.translate("summary.installmentDescription",{installment:s,amount:n(a,e.data.pricing?.currency)});const l=(n,e)=>{if(e===s.BRL){return t.translate("installments.brazilian")}if(e===s.MXN){return n===1?t.translate("installments.singleMexican"):t.translate("installments.pluralMexican")}return n===1?t.translate("installments.single"):t.translate("installments.plural")};const r=n=>{if(n===s.BRL){return t.translate("installments.selectBrazilian")}if(n===s.MXN){return t.translate("installments.selectMexican")}return t.translate("installments.select")};const c=n=>{if(n===s.BRL){return t.translate("installments.disabledBrazilian")}if(n===s.MXN){return t.translate("installments.disabledMexican")}return t.translate("installments.disabled")};const o=(i,r,c,o,m)=>{const u=l(i,c);const d=o>0&&m===a.CUSTOMER_FINANCED&&e.data.pricing?.currency===s.ARS?`- CFT ${o}% *`:i===1?"":`<span style="background-color: rgba(183, 233, 221, 1); border-radius: 4px; padding: 2px 6px; display: inline-flex; align-items: center; color: #257c67; font-size: 0.75rem; font-weight: 600; margin-left: 4px;">${t.translate("installments.samePrice")}</span>`;return`${i} ${u} ${n(r,c)} ${d}`};const m=(t,i,r,c,o)=>{const m=l(t,r);const u=c>0&&o===a.CUSTOMER_FINANCED&&e.data.pricing?.currency===s.ARS?`- CFT ${c}% *`:"";return`${t} ${m} ${n(i,r)} ${u} `};const u=n=>{if(e.data.pricing.discountAmount>0){const s=e.data.pricing.subtotal;const t=e.data.pricing.totalWithoutInstallment;const a=t/s;return Math.round(n*a*100)/100}return n};export{a as E,m as a,u as b,c,r as d,o as e,i as g};
2
- //# sourceMappingURL=p-KStTLJ_c.js.map
1
+ import{h as n,j as s,I as t,s as e}from"./p-CP6XOgmg.js";var a;(function(n){n["CUSTOMER_FINANCED"]="customer_financed";n["MERCHANT_FINANCED"]="merchant_financed";n["ISSUER_FINANCED"]="issuer_financed"})(a||(a={}));const i=(s,a)=>t.translate("summary.installmentDescription",{installment:s,amount:n(a,e.data.pricing?.currency)});const l=(n,e)=>{if(e===s.BRL){return t.translate("installments.brazilian")}if(e===s.MXN){return n===1?t.translate("installments.singleMexican"):t.translate("installments.pluralMexican")}return n===1?t.translate("installments.single"):t.translate("installments.plural")};const r=n=>{if(n===s.BRL){return t.translate("installments.selectBrazilian")}if(n===s.MXN){return t.translate("installments.selectMexican")}return t.translate("installments.select")};const c=n=>{if(n===s.BRL){return t.translate("installments.disabledBrazilian")}if(n===s.MXN){return t.translate("installments.disabledMexican")}return t.translate("installments.disabled")};const o=(i,r,c,o,m)=>{const u=l(i,c);const d=o>0;const f=m===a.CUSTOMER_FINANCED&&e.data.pricing?.currency===s.ARS;const p=d?f?`- CFT ${o}% *`:"":i===1||c!==s.ARS?"":`<span style="background-color: rgba(183, 233, 221, 1); border-radius: 4px; padding: 2px 6px; display: inline-flex; align-items: center; color: #257c67; font-size: 0.75rem; font-weight: 600; margin-left: 4px;">${t.translate("installments.samePrice")}</span>`;return`${i} ${u} ${n(r,c)} ${p}`};const m=(t,i,r,c,o)=>{const m=l(t,r);const u=c>0&&o===a.CUSTOMER_FINANCED&&e.data.pricing?.currency===s.ARS?`- CFT ${c}% *`:"";return`${t} ${m} ${n(i,r)} ${u} `};const u=n=>{if(e.data.pricing.discountAmount>0){const s=e.data.pricing.subtotal;const t=e.data.pricing.totalWithoutInstallment;const a=t/s;return Math.round(n*a*100)/100}return n};export{a as E,m as a,u as b,c,r as d,o as e,i as g};
2
+ //# sourceMappingURL=p-DKzHMy1G.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p-DKzHMy1G.js","sources":["src/models/enums/installment.enum.ts","src/utils/installment-utils.ts"],"sourcesContent":["export enum ENUM_INSTALLMENT_MODEL {\n CUSTOMER_FINANCED = 'customer_financed',\n MERCHANT_FINANCED = 'merchant_financed',\n ISSUER_FINANCED = 'issuer_financed',\n}\n","import { I18nService } from '../i18n/i18n.service';\nimport { CURRENCY_ENUM } from '../models/enums/currency.enum';\nimport { ENUM_INSTALLMENT_MODEL } from '../models/enums/installment.enum';\nimport { sessionState } from '../store/session.store';\nimport { formatAmountToIntlFormat } from './currency-formatter';\n\n/**\n * Obtiene la descripción de cuotas\n */\nexport const getInstallmentDescription = (installment: number, amount: number): string => {\n return I18nService.translate('summary.installmentDescription', {\n installment,\n amount: formatAmountToIntlFormat(amount, sessionState.data.pricing?.currency),\n });\n};\n\n/**\n * Obtiene el texto de cuota según la moneda\n * @param installment - El número de cuotas\n * @param currency - La moneda para determinar el texto apropiado\n * @returns String del texto de cuota según la moneda\n */\nconst getInstallmentTextByCurrency = (installment: number, currency: CURRENCY_ENUM): string => {\n if (currency === CURRENCY_ENUM.BRL) {\n return I18nService.translate('installments.brazilian');\n }\n\n if (currency === CURRENCY_ENUM.MXN) {\n return installment === 1\n ? I18nService.translate('installments.singleMexican')\n : I18nService.translate('installments.pluralMexican');\n }\n\n return installment === 1\n ? I18nService.translate('installments.single')\n : I18nService.translate('installments.plural');\n};\n\n/**\n * Obtiene el placeholder del selector de cuotas según la moneda\n * @param currency - La moneda para determinar el placeholder apropiado\n * @returns String del placeholder según la moneda\n */\nexport const getInstallmentPlaceholderByCurrency = (currency: CURRENCY_ENUM): string => {\n if (currency === CURRENCY_ENUM.BRL) {\n return I18nService.translate('installments.selectBrazilian');\n }\n\n if (currency === CURRENCY_ENUM.MXN) {\n return I18nService.translate('installments.selectMexican');\n }\n\n return I18nService.translate('installments.select');\n};\n\n/**\n * Obtiene el placeholder disabled del selector de cuotas según la moneda\n * @param currency - La moneda para determinar el placeholder disabled apropiado\n * @returns String del placeholder disabled según la moneda\n */\nexport const getInstallmentDisabledPlaceholderByCurrency = (currency: CURRENCY_ENUM): string => {\n if (currency === CURRENCY_ENUM.BRL) {\n return I18nService.translate('installments.disabledBrazilian');\n }\n\n if (currency === CURRENCY_ENUM.MXN) {\n return I18nService.translate('installments.disabledMexican');\n }\n\n return I18nService.translate('installments.disabled');\n};\n\n/**\n * Genera la etiqueta para una cuota específica\n * @param installment - El número de cuotas\n * @param amount - El monto por cuota\n * @param currency - La moneda a usar para el formateo\n * @param cft - El interés de la cuota\n * @returns String formateado de la etiqueta de cuota\n */\nexport const getInstallmentLabel = (\n installment: number,\n amount: number,\n currency: CURRENCY_ENUM,\n cft: number,\n model: ENUM_INSTALLMENT_MODEL,\n): string => {\n const installmentText = getInstallmentTextByCurrency(installment, currency);\n const hasInterest = cft > 0;\n const isArsCustomerFinanced =\n model === ENUM_INSTALLMENT_MODEL.CUSTOMER_FINANCED &&\n sessionState.data.pricing?.currency === CURRENCY_ENUM.ARS;\n\n const cftText = hasInterest\n ? isArsCustomerFinanced\n ? `- CFT ${cft}% *`\n : ''\n : installment === 1 || currency !== CURRENCY_ENUM.ARS\n ? ''\n : `<span style=\"background-color: rgba(183, 233, 221, 1); border-radius: 4px; padding: 2px 6px; display: inline-flex; align-items: center; color: #257c67; font-size: 0.75rem; font-weight: 600; margin-left: 4px;\">${I18nService.translate('installments.samePrice')}</span>`;\n\n return `${installment} ${installmentText} ${formatAmountToIntlFormat(amount, currency)} ${cftText}`;\n};\n/**\n * Genera la etiqueta para una cuota específica\n * @param installment - El número de cuotas\n * @param amount - El monto por cuota\n * @param currency - La moneda a usar para el formateo\n * @param cft - El interés de la cuota\n * @returns String formateado de la etiqueta de cuota\n */\nexport const getInstallmentLabelSummary = (\n installment: number,\n amount: number,\n currency: CURRENCY_ENUM,\n cft: number,\n model: ENUM_INSTALLMENT_MODEL,\n): string => {\n const installmentText = getInstallmentTextByCurrency(installment, currency);\n const cftText =\n cft > 0 &&\n model === ENUM_INSTALLMENT_MODEL.CUSTOMER_FINANCED &&\n sessionState.data.pricing?.currency === CURRENCY_ENUM.ARS\n ? `- CFT ${cft}% *`\n : '';\n\n return `${installment} ${installmentText} ${formatAmountToIntlFormat(amount, currency)} ${cftText} `;\n};\n\n/**\n * Recalcula el monto de la cuota considerando descuentos aplicados\n * @param installmentAmount - El monto original de la cuota\n * @returns El monto recalculado de la cuota con descuento aplicado\n */\nexport const getRecalculatedInstallmentAmount = (installmentAmount: number): number => {\n // Si hay un descuento aplicado, recalcular el monto de la cuota\n if (sessionState.data.pricing.discountAmount > 0) {\n const originalTotal = sessionState.data.pricing.subtotal;\n const currentTotal = sessionState.data.pricing.totalWithoutInstallment;\n const discountRatio = currentTotal / originalTotal;\n\n return Math.round(installmentAmount * discountRatio * 100) / 100;\n }\n\n return installmentAmount;\n};\n"],"names":["sessionState"],"mappings":";;AAAY,IAAA;AAAZ,CAAA,UAAY,sBAAsB,EAAA;AAChC,IAAA,sBAAA,CAAA,mBAAA,CAAA,GAAA,mBAAuC;AACvC,IAAA,sBAAA,CAAA,mBAAA,CAAA,GAAA,mBAAuC;AACvC,IAAA,sBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC;AACrC,CAAC,EAJW,sBAAsB,KAAtB,sBAAsB,GAIjC,EAAA,CAAA,CAAA;;ACED;;AAEG;MACU,yBAAyB,GAAG,CAAC,WAAmB,EAAE,MAAc,KAAY;AACvF,IAAA,OAAO,WAAW,CAAC,SAAS,CAAC,gCAAgC,EAAE;QAC7D,WAAW;AACX,QAAA,MAAM,EAAE,wBAAwB,CAAC,MAAM,EAAEA,KAAY,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC;AAC9E,KAAA,CAAC;AACJ;AAEA;;;;;AAKG;AACH,MAAM,4BAA4B,GAAG,CAAC,WAAmB,EAAE,QAAuB,KAAY;AAC5F,IAAA,IAAI,QAAQ,KAAK,aAAa,CAAC,GAAG,EAAE;AAClC,QAAA,OAAO,WAAW,CAAC,SAAS,CAAC,wBAAwB,CAAC;;AAGxD,IAAA,IAAI,QAAQ,KAAK,aAAa,CAAC,GAAG,EAAE;QAClC,OAAO,WAAW,KAAK;AACrB,cAAE,WAAW,CAAC,SAAS,CAAC,4BAA4B;AACpD,cAAE,WAAW,CAAC,SAAS,CAAC,4BAA4B,CAAC;;IAGzD,OAAO,WAAW,KAAK;AACrB,UAAE,WAAW,CAAC,SAAS,CAAC,qBAAqB;AAC7C,UAAE,WAAW,CAAC,SAAS,CAAC,qBAAqB,CAAC;AAClD,CAAC;AAED;;;;AAIG;AACU,MAAA,mCAAmC,GAAG,CAAC,QAAuB,KAAY;AACrF,IAAA,IAAI,QAAQ,KAAK,aAAa,CAAC,GAAG,EAAE;AAClC,QAAA,OAAO,WAAW,CAAC,SAAS,CAAC,8BAA8B,CAAC;;AAG9D,IAAA,IAAI,QAAQ,KAAK,aAAa,CAAC,GAAG,EAAE;AAClC,QAAA,OAAO,WAAW,CAAC,SAAS,CAAC,4BAA4B,CAAC;;AAG5D,IAAA,OAAO,WAAW,CAAC,SAAS,CAAC,qBAAqB,CAAC;AACrD;AAEA;;;;AAIG;AACU,MAAA,2CAA2C,GAAG,CAAC,QAAuB,KAAY;AAC7F,IAAA,IAAI,QAAQ,KAAK,aAAa,CAAC,GAAG,EAAE;AAClC,QAAA,OAAO,WAAW,CAAC,SAAS,CAAC,gCAAgC,CAAC;;AAGhE,IAAA,IAAI,QAAQ,KAAK,aAAa,CAAC,GAAG,EAAE;AAClC,QAAA,OAAO,WAAW,CAAC,SAAS,CAAC,8BAA8B,CAAC;;AAG9D,IAAA,OAAO,WAAW,CAAC,SAAS,CAAC,uBAAuB,CAAC;AACvD;AAEA;;;;;;;AAOG;AACI,MAAM,mBAAmB,GAAG,CACjC,WAAmB,EACnB,MAAc,EACd,QAAuB,EACvB,GAAW,EACX,KAA6B,KACnB;IACV,MAAM,eAAe,GAAG,4BAA4B,CAAC,WAAW,EAAE,QAAQ,CAAC;AAC3E,IAAA,MAAM,WAAW,GAAG,GAAG,GAAG,CAAC;AAC3B,IAAA,MAAM,qBAAqB,GACzB,KAAK,KAAK,sBAAsB,CAAC,iBAAiB;QAClDA,KAAY,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,KAAK,aAAa,CAAC,GAAG;IAE3D,MAAM,OAAO,GAAG;AACd,UAAE;cACE,CAAS,MAAA,EAAA,GAAG,CAAK,GAAA;AACnB,cAAE;UACF,WAAW,KAAK,CAAC,IAAI,QAAQ,KAAK,aAAa,CAAC;AAChD,cAAE;cACA,oNAAoN,WAAW,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAA,OAAA,CAAS;AAElR,IAAA,OAAO,CAAG,EAAA,WAAW,CAAI,CAAA,EAAA,eAAe,IAAI,wBAAwB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAI,CAAA,EAAA,OAAO,EAAE;AACrG;AACA;;;;;;;AAOG;AACI,MAAM,0BAA0B,GAAG,CACxC,WAAmB,EACnB,MAAc,EACd,QAAuB,EACvB,GAAW,EACX,KAA6B,KACnB;IACV,MAAM,eAAe,GAAG,4BAA4B,CAAC,WAAW,EAAE,QAAQ,CAAC;AAC3E,IAAA,MAAM,OAAO,GACX,GAAG,GAAG,CAAC;QACP,KAAK,KAAK,sBAAsB,CAAC,iBAAiB;QAClDA,KAAY,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,KAAK,aAAa,CAAC;UAClD,CAAS,MAAA,EAAA,GAAG,CAAK,GAAA;UACjB,EAAE;AAER,IAAA,OAAO,CAAG,EAAA,WAAW,CAAI,CAAA,EAAA,eAAe,IAAI,wBAAwB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAI,CAAA,EAAA,OAAO,GAAG;AACtG;AAEA;;;;AAIG;AACU,MAAA,gCAAgC,GAAG,CAAC,iBAAyB,KAAY;;IAEpF,IAAIA,KAAY,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,GAAG,CAAC,EAAE;QAChD,MAAM,aAAa,GAAGA,KAAY,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ;QACxD,MAAM,YAAY,GAAGA,KAAY,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB;AACtE,QAAA,MAAM,aAAa,GAAG,YAAY,GAAG,aAAa;AAElD,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,GAAG,aAAa,GAAG,GAAG,CAAC,GAAG,GAAG;;AAGlE,IAAA,OAAO,iBAAiB;AAC1B;;;;"}