import{bn as Te,im as De,dj as ce,di as ke,aL as Ne,aa as Ee,bl as Z,dp as Ve,T as x,dr as oe,du as V,io as xe,gq as Ue,am as b,q as w,dT as ge,a as _,ip as Re,A as I,ci as Be,cj as Fe,dL as Oe,y as E,ai as fe,iq as He,a6 as Pe,dB as We,ir as $e,bE as ve,is as _e,it as Ce,iu as Me,iv as K,iw as we,dJ as ie,ix as j,iy as H,iz as ee,iA as te,iB as Ie,iC as ue,bZ as Q,iD as ze,iE as Ge,n as qe,iF as he,a7 as Ke,iG as Je,fb as Ye,x as je,d_ as Qe,iH as Ze,iI as Xe,iJ as Le,iK as et,iL as tt,iM as nt,bA as ot,iN as pe}from"./app.Dqw-tRcr.js";import{p as W,S as B,u as st,M as be,A as q,a as rt}from"./useSubscribeMessenger.B-vrifHh.js";import{i as at,a as Y,u as de,b as Ae,c as le,d as it,e as ct,A as ut,r as dt,R as lt,f as ft,g as ht,h as pt,j as me}from"./index.CGnG6iPw.js";const mt=e=>{const n=Te(),t=De(),o=ce(),{iframe_token:s,redirect_url:d,transaction_params:c}=ke(),{locale:r}=Ne().i18n,{myshopifyDomain:u}=Ee(),{checkoutSessionIdentifier:a}=Z(),i=Ve();return x(()=>{if(!a)throw new oe("ShopPayCheckoutIdentifierMissingError::ULCFrame");if(!i||!(s&&d))return;const p=new URLSearchParams({shopify_domain:u,checkout_token:a,origin:e,locale:r,iframe_token:s,redirect_url:d,transaction_params:c??"",shop_pay_new_signup_login_variant:i});for(const[k,m]of t.entries())p.set(k,m);e===V.C1InlineModal&&p.set(xe,Ue.ShopPayAsPaymentMethod),o?.email&&p.set("fast_login","true");const h=p.toString(),l=new URL("/pay/transactions/new/email",n.services.payShopifyCom.url);return l.search=h,l.href},[e,u,a,r,s,d,c,i,t,o,n])},ye=10;function yt({x:e,y:n}){const t=window.devicePixelRatio||1;return{x:Math.round(e*t)/t||0,y:Math.round(n*t)/t||0}}function St(e,n,t,o,{offset:s=0,arrowOffset:d=0}={}){let c={x:0,y:0},r={left:0,right:0},u=0;if(!n&&!t)return{offsets:c,spacing:u};if(!o){const{clientWidth:a,clientHeight:i}=document.documentElement;return c={x:a/2-n/2,y:i/2-t/2},{offsets:c,spacing:u}}switch(e){case"blockEnd":c={x:(document?.dir??"ltr")==="rtl"?o.left:o.right-n,y:o.bottom+s};break;case"inlineEnd":c={x:(document?.dir??"ltr")==="rtl"?o.left-n-s:o.right+s,y:o.top+o.height/2-d};break}return r=kt(c,n),r.right&&!r.left?(c.x+=r.right,u=-ye):!r.right&&r.left&&(c.x=0,u=ye),{offsets:c,spacing:u}}function kt(e,n){const t=document.documentElement.clientWidth,o=e.x+n;let s={left:0,right:0};return o>t&&(s={...s,right:t-o}),e.x<0&&(s={...s,left:-e.x}),s}function Et(){const[e,n]=b(null),t=w(o=>{o!==null&&n(o.getBoundingClientRect())},[]);return[e,t]}function gt(e){const[n,t]=b(null),o=w(()=>{e!==null&&t(e.getBoundingClientRect())},[e]);return ge(()=>(o(),window.addEventListener("resize",o),window.addEventListener("scroll",o),()=>{window.removeEventListener("resize",o),window.removeEventListener("scroll",o)}),[o]),n}const Pt="qdHCv",vt={Popper:Pt};function _t({children:e,offset:n,arrowOffset:t,contentWidth:o,contentHeight:s,placement:d="inlineEnd",activator:c,open:r}){const u=gt(c??null),[a,i]=Et(),{offsets:f,spacing:p}=x(()=>r?St(d,(o||a?.width)??0,(s||a?.height)??0,u,{offset:n,arrowOffset:t}):{offsets:{x:0,y:0},spacing:0},[n,t,d,a,u,r,o,s]),{x:h,y:l}=x(()=>r?yt({x:f.x+p+(window.scrollX||window.pageXOffset),y:f.y+(window.scrollY||window.pageYOffset)}):{x:0,y:0},[f,p,r]),k=x(()=>r?(window.devicePixelRatio||1)<2?`translate(${h}px, ${l}px)`:`translate3d(${h}px, ${l}px, 0)`:"none",[r,h,l]);return _(Re,{children:_("div",{className:vt.Popper,style:{...a&&{transform:k,MozTransform:k,WebkitTransform:k}},ref:i,"aria-hidden":!r,children:e})})}const Ct="hgqpU",Mt="axmya",wt="JHj7j",It="hQvGd",Lt="PMbsk",bt="wA8HY",At="xnzQ4",N={Backdrop:Ct,"Backdrop-visible":"LTbS5",BackdropLinearGradient:Mt,Popover:wt,Content:It,PopoverArrow:Lt,PopoverOpen:bt,"Popover-placementInlineEnd":"trTaz","Popover-placementBlockEnd":"KMvI7",Bumper:At},Tt=Fe("Popover");function Dt({children:e,activator:n,open:t,placement:o="inlineEnd",contentWidth:s,contentHeight:d,onClose:c}){const r=I(null),u=I(null),a=I(null),i=Be(void 0,Tt),f=Oe(),p=w(()=>{n?.tagName==="BUTTON"&&(n?.setAttribute("aria-controls",i),n?.setAttribute("aria-expanded",String(t)))},[n,t,i]),h=w(S=>{c?.(S)},[c]),l=w(S=>{S.target instanceof Node&&!n?.contains(S.target)&&document.contains(S.target)&&!a.current?.contains(S.target)&&t&&h(S)},[h,n,t,a]),k=w(S=>{if(t)switch(S.key){case"Escape":case"Esc":h(),n?.focus();break}},[h,n,t]);E(()=>(document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}),[l]),E(()=>(t&&document.addEventListener("keydown",k,!1),()=>{document.removeEventListener("keydown",k,!1)}),[t,k]),E(()=>{p()}),ge(()=>{t&&a.current?.focus({preventScroll:!0})},[t]);const m=S=>{const P=a.current;if(P){const C=S?We(P):$e(P);C?C.focus():P.focus()}},v=fe(N.Popover,N[He("Popover-placement",o)],t&&N.PopoverOpen,n&&N.PopoverArrow);return _(Pe,{children:[_(_t,{activator:n,placement:o,offset:15,arrowOffset:30,open:t,contentWidth:s,contentHeight:d,children:[t&&_("button",{className:N.Bumper,ref:r,"aria-hidden":"true",onFocus:()=>m(!1)}),_("div",{className:v,id:i,ref:a,children:_("div",{className:N.Content,children:e})}),t&&_("button",{className:N.Bumper,ref:u,"aria-hidden":"true",onFocus:()=>m(!0)})]}),_("div",{className:fe(N.Backdrop,t&&N["Backdrop-visible"],t&&f&&N.BackdropLinearGradient)})]})}const Nt="B1y2m",Vt={VerificationIframe:Nt};var ne=(e=>(e.Normal="normal",e.CustomerAccount="customer_account",e.AccountsSameStore="accounts_same_store",e.AccountsCrossStore="accounts_cross_store",e))(ne||{});function xt({email:e,skipVerifyOnLoad:n,iframeReady:t,iframeRef:o,dismissedModalKey:s,readyToDismiss:d,onReadyToDismiss:c,showPopover:r,showToggle:u,popoverActivator:a}){const i=ce(),{inMemoryPayPalParts:{accountStatus:f}}=ve(),{guestDismissedModalKey:p}=_e(),{checkoutSessionIdentifier:h}=Z(),l=Ce(K.ShopPayVerification,{scope:Me}),k=we().current.token;E(()=>{if(n.current&&t){n.current=!1;return}const P=i&&ie(s),C=e&&j(e),U=f.value.status==="connected",T=i&&Ut();if(!(!t||!C||P||U||T)){if(l.peek()===H.Verified){l.value=void 0;return}W(o?.current,{action:B.Create,email:e,flow:ne.Normal,disableAutoFocus:!!sessionStorage.getItem(p)})}},[e,t]);function m(){if(!h)throw new oe("ShopPayCheckoutIdentifierMissingError::GuestCheckout");i&&ie(s)||e&&j(e)&&(d||c(),k&&W(o?.current,{action:B.CheckoutQueueToken,queueToken:k}),ee(K.IdentifiedShopPayUser,escape(h)),te(Ie,"false"),window.dispatchEvent(new Event("shop_pay_user_identified_cookie_set")),l.value=H.Pending,sessionStorage.getItem(p)?u?.(!0):(r(!0,e),u?.(!1)))}function v(){d&&(l.value=H.Dismissed,i&&te(s,"true"),a?.current?.focus(),r(!1),u?.(!0))}function S(){ue(),l.value=H.Verified,Q.value="none"}return{onShow:m,onHidden:v,onLoggedIn:S}}function Ut(){const e=sessionStorage.getItem(ze);if(!e)return!1;const n=Number.parseInt(e,10);return isNaN(n)?!1:Date.now(){s.current&&W(s.current,{action:B.Create,email:"",flow:ne.Normal})},[s]);E(()=>{s.current&&o&&a===V.C1ModalShopPaySignIn&&(W(s.current,{action:B.AllowNoInitialEmail}),v(),W(s.current,{action:B.Ready}))},[o,s,a,v]),E(()=>{i&&(l.current=null)},[i]),E(()=>{k.current&&s.current&&o&&(k.current=!1,v())}),E(()=>{function g(){n&&(m.updateUserVerification({status:"none"}),n(""),u?.current?.focus()),k.current=!0}return window.addEventListener("shop_pay_verification_reset",g),()=>{window.removeEventListener("shop_pay_verification_reset",g)}},[u,r,n,s,m]),E(()=>{if(!o)return;if(t.current){t.current=!1;return}e&&j(e)&&a!==V.C1ModalShopPaySignIn?(m.updateUserVerification({email:e,status:"loading"}),W(s?.current,{action:B.Create,email:e,flow:ne.Normal})):a!==V.C1ModalShopPaySignIn&&(v(),m.updateUserVerification({status:"none"}))},[e,o,t,s,a,m,v,r]);function S(){if(!f)throw new oe("ShopPayCheckoutIdentifierMissingError::ShopPayCheckout");a===V.C1ModalShopPay&&e&&j(e)&&(d||c(),m.updateUserVerification({email:e,status:"found"}),r(!0,e))}function P(){if(a===V.C1ModalShopPay&&!d)return;const g=l.current;n!=null&&g!=null&&(g.status!=="found"||a===V.C1ModalShopPay||!e)&&(n(g.email??""),m.updateUserVerification(g),u?.current?.focus()),m.userVerification.status==="found"?p({type:he.ContinueWithShopPay,email:m.userVerification.email}):u?.current?.focus(),r(!1),l.current=null}function C(g,L,y){if(!(y&&y!==m.userVerification.email)&&(g===be.ShopifyPayUserNotFound&&Rt.includes(L)&&(r(!1),p({type:he.Generic})),y)){const M=L===q.InvalidEmail;m.updateUserVerification({email:y,status:M?"invalid":"new"})}}function U(g,L){g?(l.current||m.userVerification.email!==g)&&(l.current={email:g,status:L?"found":"new"}):l.current={status:"none"}}async function T(g,L){ue(),Q.value="none",g&&(await h({token:g,origin:a,in_checkout_profile_preview:L}),window.location.reload())}return{onShow:S,onHidden:P,onEmailChange:U,onError:C,onLoggedIn:T}}function Ft(e){const n=Ke(),t=I(e),o=t.current,s=e===t.current?void 0:`Callback hook changed from ${t.current.name} to ${e.name} between renders.`;return E(()=>{s&&n.notify(new Je(`${s} Only the original hook is called.`,"ShopPayError::OnlyOriginalHookCalled"),{severity:"warning",errorClass:"ShopPay::ShopPayVerification::useStableHook"})},[s,n]),o}const Ot="shop-pay-verification-iframe",Se=320,Ht=300,Wt=1e3;function $t({email:e,onSetEmail:n,open:t,popoverActivator:o,showPopover:s,showToggle:d,urlOrigin:c=V.C1Modal,updatedOrigin:r=c,onIframeLoaded:u}){const a=Ye({base:"blockEnd",medium:"inlineEnd"}),[i,f]=b(!1),[p,h]=b(Ht),[l,k]=b(!1),m=je(),{checkoutSessionIdentifier:v}=Z(),S=I(null),[P,C]=b(!1),U=Qe.flow.value===Ze.UnauthenticatedUser,T=Xe(e,tt),g=`${v}-${e.replace(/[^a-zA-Z0-9]/g,"")}`,L=Le(),y=I(L),{onShow:M,onHidden:F,onError:R,onEmailChange:O,onLoggedIn:A}=Ft(U?Bt:xt)({email:T,onSetEmail:n,skipVerifyOnLoad:y,iframeReady:i,iframeRef:S,dismissedModalKey:g,readyToDismiss:l,onReadyToDismiss:()=>{setTimeout(()=>k(!0),Wt)},showPopover:s,showToggle:d,popoverActivator:o,origin:r,open:t});rt({targetId:c,onReady:M,onClosed:re,onLoggedIn:A,onHidden:F,onError:ae,onResized:se,onLoaded:()=>{f(!0),u()},onEmailChange:O}),E(()=>{W(S?.current,{action:B.OriginChanged,origin:r})},[r]),E(()=>{const D=t?B.Ready:B.Hidden;W(S?.current,{action:D}),Q.value=t?"shopPayVerification":"none",S.current&&t&&S.current.focus()},[t]);const $=mt(c);if(E(()=>()=>{f(!1)},[$]),!$)return null;const X=t?o?.current:void 0;return _(Dt,{activator:X,open:t,onClose:F,placement:a,contentWidth:Se,contentHeight:p,children:_(et,{active:P||!i,size:"large",children:_("iframe",{id:Ot,title:m("shop_pay.verification.title","Shop Pay Quick Checkout"),ref:S,src:$,height:p,width:Se,className:Vt.VerificationIframe,allow:"publickey-credentials-get *",referrerPolicy:"origin"},$)})});function se(D){!isNaN(D)&&D&&h(D)}function re(){C(!0)}function ae(D,J,z){R?.(D,J,z),D===be.ShopifyPayUserNotFound&&ee(K.IdentifiedShopPayUser,"false"),te(Ie,J===q.LimitExceeded?v||"":"false"),window.dispatchEvent(new Event("shop_pay_user_identified_cookie_set"))}}function zt(){if(!at())return;const e="shop-pay-safari-unzoom",n=Y.getElementById(e);if(n)return n.focus();const t=Y.createElement("input");t.id=e,t.style.fontSize="16px",t.style.width="1px",t.style.height="1px",t.style.position="fixed",t.style.bottom="-1000px",t.style.right="-1000px",t.style.transform="translate(1000px, 1000px)",t.setAttribute("aria-hidden","true"),Y.body.appendChild(t),t.focus({preventScroll:!0})}const Gt=100;function qt({emailInputSelector:e}){const[n,t]=b(),[o,s]=b();return E(()=>{function c(r){this.type==="password"?s(r.timeStamp):t(r.timeStamp)}if(e){const r=Y.querySelector(e);if(r){r.addEventListener("input",c);const u=r.form?.querySelector('input[type="password"]');return u&&u instanceof HTMLInputElement&&u.addEventListener("input",c),()=>{r.removeEventListener("input",c),u&&u.removeEventListener("input",c)}}}},[e]),{isFilledWithPasswordManager:x(()=>n===void 0||o===void 0?!1:Math.abs(n-o)new Set,[]),U=()=>P.current,T=w(async(y,M="",F="")=>{const R=ct(y);if(i&&!C.has("PASSWORD_MANAGER_AUTOFILL_DETECTED")&&(C.add("PASSWORD_MANAGER_AUTOFILL_DETECTED"),a({userAction:"PASSWORD_MANAGER_AUTOFILL_DETECTED"})),R&&!C.has("EMAIL_ENTERED")&&(C.add("EMAIL_ENTERED"),a({userAction:"EMAIL_ENTERED"})),r("email entered",{},"state"),!o.current||c||!d)return;const O=R?y:"";f.current&&!f.current?.signal.aborted&&f.current.abort(),f.current=new AbortController;try{const{open:A,postMessage:$,waitForMessage:X}=o.current;P.current=O,$({firstName:M,lastName:F,type:"namesubmitted"}),$({email:O,hideChange:t===void 0?O.length>0:t,type:"emailsubmitted"}),r("email submitted",{email:O?"redacted":""},"state");const se=X("shop_user_matched",f.current.signal),re=new Promise((ae,D)=>{const J=async()=>{try{const z=await X("error",f.current.signal);z.type==="error"&&z.code==="captcha_challenge"?ae(void 0):J()}catch(z){D(z)}};J()});await Promise.race([se,re]),A("event_shop_user_matched"),S?.current?.blur(),zt(),f.current.abort(),h(void 0)}catch(A){if(A instanceof ut&&A.name==="AbortSignalReceivedError")return;A instanceof Error&&u(new Error(`Error updating user info: ${A.name} - ${A.message}`))}},[t,o,i,r,d,c,u,a,C]),g=it((y,M,F)=>{T(y,M,F)},200);E(()=>{p!==void 0&&d&&g(p,l,m)},[g,p,d,l,m]),E(()=>{if(!n)return;const y=Y.querySelector(n);if(!y)return;S.current=y;const M=()=>{y&&h(y.value)};if(y?.value&&M(),!s){y?.removeEventListener("input",M);return}return y?.addEventListener("input",M),()=>{y?.removeEventListener("input",M)}},[n,s]),E(()=>{e!==void 0&&h(e)},[e]);const L=(y="",M="")=>{k(y),v(M)};return{getSubmittedEmail:U,updateEmailToPost:y=>h(y||""),updateNamesToPost:(y,M)=>L(y,M)}}function Jt({iframeRef:e}){const{loaded:n}=de();async function t(o){if(!e.current)return;const{postMessage:s,waitForMessage:d}=e.current;n||await d("loaded"),s(o)}return{postMessageAfterLoad:t}}function Yt(){const{analyticsData:e,produceMonorailEvent:n}=le();return{trackShopPayModalStateChange:w(({currentState:o,zoom:s})=>{const{analyticsTraceId:d,checkoutToken:c,checkoutVersion:r,shopPermanentDomain:u}=e,a={previousState:"",currentState:o,clientTimestampMs:new Date().getTime(),analyticsTraceId:d,checkoutToken:c||"",checkoutVersion:r||"",shopifyDomain:u||"",zoom:s};n({event:{payload:a,schemaId:"shopify_pay_modal_state_change/1.3"}})},[e,n])}}function jt(e){const{checkoutToken:n,checkoutVersion:t,shopPermanentDomain:o}=e;return{checkoutVersion:t,checkoutToken:n,flow:"checkout_modal",shopPermanentDomain:o}}const Qt=({anchorTo:e,email:n,queueToken:t,...o})=>{const{modalVisible:s}=de(),d=I(null);Kt({email:n,iframeRef:d});const{postMessageAfterLoad:c}=Jt({iframeRef:d}),{trackUserAction:r}=le(),{leaveBreadcrumb:u}=Ae(),a=x(()=>({open:async()=>{s||(d.current?.open("user_button_clicked"),r({userAction:"OPEN_CALLED"}),u("open called",{},"state"))}}),[s,r,u]);ft(a);const{trackShopPayModalStateChange:i}=Yt(),f=w(()=>{i({currentState:"loaded",zoom:`${me.visualViewport?.scale}`})},[i]),p=w(l=>{i({currentState:l?"shown":"hidden",zoom:`${me.visualViewport?.scale}`})},[i]);E(()=>{t&&c({type:"checkoutqueuetokensubmitted",checkoutQueueToken:t})},[c,t]);const{authorizeUrl:h}=ht({analyticsContext:"loginWithShopCheckoutModal",avoidSdkSession:!0,clientId:"",disableSignUp:!0,proxy:!0,redirectType:"iframe",responseType:"code",...o});return _(pt,{anchorTo:e,keepModalOpen:!0,onLoaded:f,onModalVisibleChange:p,proxy:!0,ref:d,src:h,variant:"checkoutModal"})},Zt=()=>dt(({element:e,...n})=>_(lt,{element:e,monorailProps:jt(n),featureName:"ShopCheckoutModal",children:_(Qt,{...n})}),{methods:["open"],name:"shop-checkout-modal",props:{anchorTo:"string",checkoutRedirectUrl:"string",checkoutToken:"string",checkoutVersion:"string",email:"string",queueToken:"string",shopPermanentDomain:"string",transactionParams:"string"},shadow:"open"}),G=({shopCheckoutModal:e,eventName:n,eventListener:t})=>{E(()=>(e?.addEventListener(n,t),()=>e?.removeEventListener(n,t)),[t,n,e])};function Xt({email:e,open:n,popoverActivator:t,showPopover:o,showToggle:s,onIframeLoaded:d}){const c=t?.current,r=I(null),[u,a]=b(!1),i=I(!1),{redirect_url:f,transaction_params:p}=ke(),{myshopifyDomain:h}=Ee(),l=ce(),{inMemoryPayPalParts:{accountStatus:k}}=ve(),{guestDismissedModalKey:m}=_e(),{checkoutSessionIdentifier:v}=Z(),S=we().current.token;E(()=>{customElements.get("shop-checkout-modal")||Zt()},[]);const P=Ce(K.ShopPayVerification,{scope:Me}),C=`${v}-${e.replace(/[^a-zA-Z0-9]/g,"")}`,U=Le(),T=I(U);E(()=>{if(T.current){T.current=!1,a(!1);return}const R=sessionStorage.getItem(m),O=l&&ie(C),A=k.peek().status==="connected";if(R||O||A){a(!1);return}if(P.peek()===H.Verified){P.value=void 0,a(!1);return}a(!0)},[e]);const g=w(()=>{ue(),P.value=H.Verified,Q.value="none"},[P]);G({shopCheckoutModal:r.current,eventName:"completed",eventListener:g});const L=w(()=>{if(!v)throw new oe("ShopPayCheckoutIdentifierMissingError::ShopJSVerification");ee(K.IdentifiedShopPayUser,escape(v)),window.dispatchEvent(new Event("shop_pay_user_identified_cookie_set")),P.value=H.Pending,o?.(!0,e),s?.(!1)},[v,e,P,o,s]);G({shopCheckoutModal:r.current,eventName:"modalopened",eventListener:L});const y=w(()=>{P.value=H.Dismissed,l&&te(C,"true"),o?.(!1),s?.(i.current)},[l,C,P,o,s]);G({shopCheckoutModal:r.current,eventName:"modalclosed",eventListener:y});const M=w(()=>{i.current=!0},[]);G({shopCheckoutModal:r.current,eventName:"shopusermatched",eventListener:M});const F=w(R=>{i.current=!1,ee(K.IdentifiedShopPayUser,"false"),window.dispatchEvent(new Event("shop_pay_user_identified_cookie_set"))},[]);return G({shopCheckoutModal:r.current,eventName:"shopusernotmatched",eventListener:F}),G({shopCheckoutModal:r.current,eventName:"loaded",eventListener:d}),E(()=>{const R=r.current;Q.value=n?"shopPayVerification":"none",c&&n&&(R?.open(),c.blur())},[c,e,n]),f?_("shop-checkout-modal",{"anchor-to":c?.id?`#${c.id}`:"","checkout-redirect-url":f,"checkout-token":v,"checkout-version":"checkout_one",email:n||u?e:"","queue-token":S||"",ref:r,"shop-permanent-domain":h,"transaction-params":p}):null}const en=e=>_(Pe,{children:_(Xt,{...e})}),sn=({email:e,onSetEmail:n,open:t,popoverActivator:o,showPopover:s,showToggle:d,urlOrigin:c=V.C1Modal,updatedOrigin:r=V.C1Modal})=>{const u=nt(),a=ot(),i=x(()=>pe(),[]),f=x(()=>pe(),[]),p=I(!0),h=x(()=>{if(u!==void 0)return{isC1:!0,shopJsVerification:!u}},[u]);E(()=>{j(e)&&(i.mark("start"),p.current=!0)},[i,e]),E(()=>{if(t&&p.current&&i.marks.start&&h){i.mark("open"),p.current=!1;const k=Math.round(i.marks.open-i.marks.start);a.histogram({name:"shop_pay_verification_time_to_interactive",value:k,attributes:h});const m=Math.round(i.marks.open-Math.max(i.marks.start,i.marks.loaded||0));a.histogram({name:"shop_pay_verification_time_to_interactive_after_load",value:m,attributes:h})}},[t,a,i,h]),E(()=>{f.mark("start")},[f]);const l=w(()=>{if(f.marks.start){f.mark("loaded"),i.mark("loaded");const k=Math.round(f.marks.loaded-f.marks.start);a.histogram({name:"shop_pay_verification_iframe_ready_duration",value:k,attributes:h})}},[f,i,a,h]);return u?_($t,{popoverActivator:o,email:e,onSetEmail:n,open:t,showPopover:s,showToggle:d,urlOrigin:c,updatedOrigin:r,onIframeLoaded:l}):_(en,{popoverActivator:o,email:e,open:t,showPopover:s,showToggle:d,onIframeLoaded:l})};export{sn as default};