PageSourceSearch

https://bluedash.ai/_next/static/chunks/6211-1262cf900dbe3ab3.js

js bluedash.ai collected 2026-10-05 14:57:24 UTC 76,673 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6211],{16211:(e,t,a)=>{a.d(t,{CustomerBuyingFlow:()=>eB});var n=a(95155),i=a(12115),r=a(20063),l=a(63821),o=a(70565),s=a(47889),d=a(37327),c=a(13952),u=a(59364),m=a(35784),x=a(11597),p=a(82339),h=a(76081);function f(e){return!e||"object"!=typeof e||Array.isArray(e)?null:e}function C(e){if(Array.isArray(e))return e.filter(e=>null!==f(e));let t=f(e);if(!t)return[];for(let e of["CONTENT","content","data","records","items"]){let a=t[e];if(Array.isArray(a))return a.filter(e=>null!==f(e))}return[t]}function g(e,t){for(let a of t){let t=e[a];if("string"==typeof t&&t.trim())return t.trim()}return""}let b=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function y(e){return b.test(e.trim())}function v(e){return e.trim().toUpperCase().replace(/[^A-Z]/g,"").slice(0,3)}async function w(){try{var e,t,a;let n=await (0,l.OL)("CURRENCY_TYPE"),i=C(null!=(a=null!=(t=null==(e=f(n.CONTENT))?void 0:e.details)?t:n.CONTENT)?a:n),r=new Map,o="";for(let e of i){let t=g(e,["id","paramDetailId","paramId"]);if(!y(t))continue;o||(o=t);let a=v(g(e,["value","label","code"]));a&&!r.has(a)&&r.set(a,t)}return{byCode:r,fallback:r.get("USD")||o}}catch(e){return{byCode:new Map,fallback:""}}}function j(e,t){if(!t)return null;let a=g(t,["emailAddress","email"]).toLowerCase(),n=g(t,["userId"]),i=e.find(e=>{let t=g(e,["emailAddress","email","userEmail"]).toLowerCase(),i=g(e,["userId","customerUserId","authUserId"]);return a&&t===a||n&&i===n});return i&&g(i,["customerId","customerMasterId","customerProfileId","id"])||null}function N(e){let t=g(e,["type","productType","productTypeLabel","product_type_label","product_type","offerTypeLabel","offer_type_label","offerType","offer_type","entityType","entity_type","referenceType","reference_type","referenceKind","reference_kind"]).toLowerCase();return t.includes("product_bundle")||t.includes("bundle")?"BO":t.includes("community")?"CM":t.includes("course")?"CO":g(e,["communityId","community_id","communityOfferId","community_offer_id"])?"CM":g(e,["productBundleId","product_bundle_id","productBundleMasterId","product_bundle_master_id","bundleId","bundle_id","bundleOfferId","bundle_offer_id"])?"BO":g(e,["courseId","course_id","courseOfferId","course_offer_id"])?"CO":null}async function E(e,t){var a,n,i,r,o,s,d;if(!e||0===t.length)return{recorded:0,skipped:0};let c=t.some(e=>{var t;return!(null==(t=e.offerId)?void 0:t.trim())||!e.offerTypeCode}),[u,m,x]=await Promise.all([(0,l.Rf)(),c?(0,h.WM)():Promise.resolve(null),w()]),p=j(C(null!=(n=u.CONTENT)?n:u),e);if(!p)throw Error("Could not resolve your customer profile.");let b=m?C(null!=(i=null==(a=f(m))?void 0:a.CONTENT)?i:m):[],E=new Date().toISOString(),A=0,B=0;for(let e of t){let t=function(e){let t=null==e?void 0:e.trim().toUpperCase();return"CM"===t?"CM":"BO"===t||"PB"===t?"BO":"CO"===t?"CO":null}(e.offerTypeCode),a=(null==(r=e.offerId)?void 0:r.trim())&&t?{offerId:e.offerId.trim(),offerTypeCode:t,currencyType:(null==(o=e.currencyType)?void 0:o.trim())||"",price:Math.max(0,e.price)}:function(e){var t;if(!e)return null;let a=N(e);if(!a)return null;let n="BO"===a?g(e,["bundleOfferId","bundle_offer_id","offerId","marketPlaceOfferId","id"]):"CM"===a?g(e,["communityOfferId","community_offer_id","offerId","marketPlaceOfferId","id"]):g(e,["courseOfferId","course_offer_id","offerId","marketPlaceOfferId","id"]);return n?{offerId:n,offerTypeCode:a,currencyType:g(e,["currencyType","currencyTypeId","currency_type","currency_type_id","currencyId","currency_id"]),price:null!=(t=function(e,t){for(let a of t){let t=e[a];if("number"==typeof t&&Number.isFinite(t))return t;if("string"==typeof t&&t.trim()){let e=Number(t);if(Number.isFinite(e))return e}}return null}(e,["bundlePrice","bundle_price","price","offerPrice","offer_price","coursePrice","course_price","communityPrice","community_price"]))?t:0}:null}(function(e,t){var a,n,i;let r=t.id.trim();if(!r)return null;let l=null!=(n=e.find(e=>g(e,["id","referenceId","reference_id","courseId","course_id","communityId","community_id","eventId","event_id","productBundleId","product_bundle_id","productBundleMasterId","product_bundle_master_id","bundleId","bundle_id"])===r))?n:null;if(l)return l;let o=null==(a=t.title)?void 0:a.trim().toLowerCase();if(!o)return null;let s="Community"===t.kind?"CM":"Bundle"===t.kind?"BO":"Course"===t.kind?"CO":null;return s&&null!=(i=e.find(e=>
1N(e)===s&&g(e,["label","offerName","title","name","courseTitle","courseName","communityName","bundleName","eventTitle"]).toLowerCase()===o))?i:null}(b,e));if(!a){B+=1;continue}try{let t=await (0,l.nu)({customerId:p,offerId:a.offerId,offerType:a.offerTypeCode,offerStartDate:E,offerEndDate:E}),n=g(null!=(s=f(t.CONTENT))?s:{},["subscribeRecordId","customerSubscribeId","id"])||g(null!=(d=f(t))?d:{},["subscribeRecordId"]),i=function(e,t){var a,n;let i=e.trim();return y(i)?i:(a=v(i),n=t,a&&n.byCode.has(a)?n.byCode.get(a):n.fallback)}(a.currencyType,x);if(n&&i)try{await (0,l.ZP)({subscribeRecordId:n,paymentMode:"CC",price:a.price>0?a.price:Math.max(0,e.price),currencyType:i})}catch(e){}A+=1}catch(e){B+=1}}if(0===A&&t.length>0)throw Error("Could not resolve any valid offer for checkout.");return{recorded:A,skipped:B}}async function A(e){var t;if(!e)return null;let a=await (0,l.Rf)();return j(C(null!=(t=a.CONTENT)?t:a),e)}let B=new Set(["checkout_failed","failed","cancelled","expired","refunded"]);async function k(e){var t,a,n,i,r,o;let s=null==(t=e.customerId)?void 0:t.trim();if(!s)throw Error("customerId is required to start checkout.");let d=null==(a=e.successUrl)?void 0:a.trim(),c=null==(n=e.cancelUrl)?void 0:n.trim();if(!d||!c)throw Error("successUrl and cancelUrl are required to start checkout.");let u={customerId:s,providerCode:null!=(i=e.providerCode)?i:"stripe",successUrl:d,cancelUrl:c},m=(null!=(r=e.items)?r:[]).map(e=>{var t,a;return{offerId:null!=(a=null==(t=e.offerId)?void 0:t.trim())?a:"",offerType:e.offerType}}).filter((e,t,a)=>e.offerId.length>0&&a.findIndex(t=>t.offerId===e.offerId)===t);if(m.length>0)u.items=m;else{let t=null==(o=e.offerId)?void 0:o.trim();if(!t)throw Error("offerId or items is required to start checkout.");u.offerId=t,u.offerType=e.offerType}return(0,l.zb)("/api/v1/payment-gateway/checkout",{method:"POST",body:JSON.stringify(u)})}async function S(e){let t=null==e?void 0:e.trim();if(!t)throw Error("orderId is required to fetch a payment order.");let a=encodeURIComponent(t);return(0,l.zb)("/api/v1/payment-gateway/orders/".concat(a),{method:"GET"})}async function I(e){let{maxAttempts:t=10,intervalMs:a=3e3}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(let r=0;r<t;r+=1){try{var n,i;let t=null!=(i=(await S(e)).CONTENT)?i:null,a=null==t?void 0:t.status,r=null==t||null==(n=t.items)?void 0:n.some(e=>{var t;return null==(t=e.subscribeRecordId)?void 0:t.trim()});if("paid"===a||(null==t?void 0:t.subscribeRecordId)||r)return{paid:!0,status:"paid",order:t};if(a&&B.has(a))return{paid:!1,status:a,order:t}}catch(e){}r<t-1&&await new Promise(e=>setTimeout(e,a))}return{paid:!1,status:"pending",order:null}}var T=a(25016);let M="stack.customer.buying.cart",L="stack.customer.purchases",F="stack.customer.pending-purchase",O="stack.customer.pending-order-id",U="stack.customer.buying.public-site",_=new Set(["stack.win","qa.stack.win","uat.stack.win","stg.stack.win","localhost","127.0.0.1"]),P=u.ad.map(e=>({code:e.iso2,name:"AE"===e.iso2?"UAE":"GB"===e.iso2?"United Kingdom":e.name})),R="/customer-buying-flow";function D(e){return"$".concat(e.toFixed(2*(e%1!=0)))}function G(e){var t,a;let{header:i}=e,r=null==i?void 0:i.data;return r&&el(r.logoImage)?(0,n.jsx)("img",{src:r.logoImage,alt:(null==(a=r.brand)?void 0:a.trim())||"Logo",className:"h-[41px] w-auto max-w-[180px] object-contain"}):(null==r||null==(t=r.brand)?void 0:t.trim())?(0,n.jsx)("span",{className:"text-[20px] font-[700] leading-none text-[#101112]",children:r.brand}):(0,n.jsx)("div",{className:"flex h-[41px] w-[41px] items-center justify-center rounded-full bg-[#101112] text-[25px] font-[700] leading-none text-white",children:"S"})}function Z(e){let{className:t="h-9 w-9"}=e;return(0,n.jsx)("svg",{"aria-hidden":"true",width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,n.jsx)("path",{d:"M10.4628 9.03125C11.5252 9.03125 12.47 9.73502 12.7351 10.765L13.1482 12.3684H26.343C26.6885 12.3684 26.9688 12.6486 26.9688 12.9942C26.9688 13.3398 26.6885 13.6199 26.343 13.6199H26.0684L25.6 17.8427C25.4745 18.9714 25.2733 19.8775 24.6532 20.4809C24.0329 21.0842 23.1216 21.26 21.9898 21.3543L15.0734 21.9303C15.0034 22.0793 14.917 22.2217 14.8143 22.3548L14.4127 22.8738C14.787 23.1691 15.0663 23.5775 15.1997 24.0487H19.9659C20.2385 23.0859 21.1216 22.38 22.1715 22.38C23.4387 22.38 24.4658 23.4072 24.4658 24.6744C24.4658 25.9416 23.4387 26.9688 22.1715 26.9688C21.1216 26.9688 20.2385 26.2627 19.9659 25.3001H15.1997C14.9271 26.2627 14.0441 26.9688 12.9942 26.9688C11.7271 26.9688 10.6999 25.9416 10.6999 24.6744C10.6999 23.4072 11.7271 22.38 12.9942 22.38C13.0653 22.38 13.1357 22.3843 13.2052 22.3906L13.8236 21.5906C14.0172 21.3398 14.0821 21.0215 14.0053 20.7229L11.5236 11.0771C11.4063 10.6215 10.9766 10.2827 10.4628 10.2827H9.65698C9.3114 10.2827 9.03125 10.0026 9.03125 9.65698C9.03125 9.3114 9.3114 9.03125 9.65698 9.03125H10.4628ZM12.9942 23.6315C12.4182 23.6315 11.9513 24.0984 11.9513 24.6744C11.9513 25.2504 12.4182 25.7173 
112.9942 25.7173C13.5701 25.7173 14.0371 25.2504 14.0371 24.6744C14.0371 24.0984 13.5701 23.6315 12.9942 23.6315ZM22.1715 23.6315C21.5955 23.6315 21.1286 24.0984 21.1286 24.6744C21.1286 25.2504 21.5955 25.7173 22.1715 25.7173C22.7475 25.7173 23.2144 25.2504 23.2144 24.6744C23.2144 24.0984 22.7475 23.6315 22.1715 23.6315ZM15.2176 20.4108C15.2387 20.4928 15.254 20.5756 15.2657 20.6585L21.8864 20.1077C23.0307 20.0124 23.5131 19.844 23.7807 19.5839C24.048 19.3237 24.229 18.8461 24.3558 17.705L24.8096 13.6199H13.47L15.2176 20.4108Z",fill:"currentColor"})})}function H(){return(0,n.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.2942 5.04171C14.6029 5.04254 14.8724 5.04668 15.1042 5.0674C15.4117 5.0949 15.6985 5.15446 15.977 5.29898C16.0871 5.35609 16.1923 5.42204 16.2917 5.49618C16.5433 5.6838 16.722 5.91581 16.8809 6.18057C17.0306 6.42999 17.1827 6.7437 17.3617 7.11325L17.7713 7.95817H21.5C21.8452 7.95817 22.125 8.238 22.125 8.58317C22.125 8.92835 21.8452 9.20817 21.5 9.20817H20.8376L20.3554 17.0083C20.2911 18.0482 20.2401 18.8733 20.1356 19.5325C20.0283 20.2085 19.8567 20.7715 19.5133 21.2639C19.1992 21.7143 18.7947 22.0946 18.3257 22.3803C17.8132 22.6926 17.2407 22.8292 16.5593 22.8945C15.895 22.9582 15.0682 22.9582 14.0262 22.9582H13.9616C12.9183 22.9582 12.0905 22.9582 11.4253 22.8944C10.7432 22.8289 10.1701 22.6921 9.65712 22.3793C9.18781 22.093 8.78326 21.7121 8.46926 21.2609C8.12601 20.7677 7.95489 20.2039 7.84847 19.5269C7.74468 18.8668 7.69481 18.0405 7.63194 16.9991L7.16161 9.20817H6.5C6.15483 9.20817 5.875 8.92835 5.875 8.58317C5.875 8.238 6.15483 7.95817 6.5 7.95817H10.3088L10.658 7.19211C10.8326 6.80896 10.9808 6.48396 11.1283 6.22545C11.2848 5.95111 11.4627 5.71024 11.7173 5.51493C11.8178 5.43785 11.9245 5.36922 12.0363 5.30977C12.3196 5.15912 12.6126 5.0971 12.9272 5.06847C13.2236 5.0415 13.5807 5.0415 14.0018 5.0415L14.2942 5.04171ZM19.5852 9.20817H8.41388L8.87772 16.8915C8.94297 17.9723 8.98992 18.7388 9.0833 19.3328C9.1751 19.9168 9.30366 20.2716 9.49526 20.5469C9.71011 20.8556 9.9869 21.1162 10.308 21.3121C10.5944 21.4867 10.9563 21.5937 11.5447 21.6501C12.1432 21.7075 12.9112 21.7082 13.994 21.7082C15.0754 21.7082 15.8423 21.7075 16.44 21.6503C17.0277 21.5938 17.3892 21.4872 17.6754 21.3128C17.9963 21.1173 18.2731 20.8572 18.488 20.5489C18.6797 20.2741 18.8085 19.9198 18.901 19.3367C18.9951 18.7436 19.0431 17.9783 19.1097 16.8988L19.5852 9.20817ZM11.9167 12.1248C12.2618 12.1248 12.5417 12.4047 12.5417 12.7498V17.7498C12.5417 18.095 12.2618 18.3748 11.9167 18.3748C11.5715 18.3748 11.2917 18.095 11.2917 17.7498V12.7498C11.2917 12.4047 11.5715 12.1248 11.9167 12.1248ZM16.0833 12.1248C16.4285 12.1248 16.7083 12.4047 16.7083 12.7498V17.7498C16.7083 18.095 16.4285 18.3748 16.0833 18.3748C15.7382 18.3748 15.4583 18.095 15.4583 17.7498V12.7498C15.4583 12.4047 15.7382 12.1248 16.0833 12.1248ZM14.3743 6.29209L13.715 6.29193C13.4277 6.29309 13.2153 6.29741 13.0405 6.31332C12.8193 6.33346 12.7068 6.36899 12.6232 6.41345C12.5723 6.44047 12.5238 6.47166 12.4782 6.5067C12.4031 6.56433 12.3241 6.65195 12.214 6.8449C12.098 7.04815 11.973 7.32086 11.7842 7.73512L11.6825 7.95817H16.3822L16.2485 7.68224C16.0547 7.28255 15.9267 7.01969 15.8091 6.82387C15.6976 6.63807 15.6188 6.55365 15.5444 6.49818C15.4992 6.46447 15.4514 6.4345 15.4013 6.40854C15.319 6.3658 15.2087 6.33173 14.9928 6.31243C14.8303 6.29789 14.6347 6.29345 14.3743 6.29209Z",fill:"#FB3748"})})}function V(e){let{kind:t,tone:a}=e;return(0,n.jsx)("span",{className:(0,T.cn)("inline-flex h-10 w-10 items-center justify-center rounded-[10px]","orange"===a?"bg-[#FFF0E8] text-[#FF6B2C]":"bg-[#F8E8FB] text-[#D944F5]"),children:(0,n.jsx)("img",{src:"".concat(R,"/").concat("Live Event"===t?"stack-clock-04-fill.svg":"stack-book-04-line.svg"),alt:"",className:"h-5 w-5"})})}function K(){return(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M3.25 3.75H16.75C16.9489 3.75 17.1397 3.82902 17.2803 3.96967C17.421 4.11032 17.5 4.30109 17.5 4.5V15.5C17.5 15.6989 17.421 15.8897 17.2803 16.0303C17.1397 16.171 16.9489 16.25 16.75 16.25H3.25C3.05109 16.25 2.8
16032 16.171 2.71967 16.0303C2.57902 15.8897 2.5 15.6989 2.5 15.5V4.5C2.5 4.30109 2.57902 4.11032 2.71967 3.96967C2.86032 3.82902 3.05109 3.75 3.25 3.75ZM16 6.9285L10.054 12.2535L4 6.912V14.75H16V6.9285ZM4.38325 5.25L10.0457 10.2465L15.6265 5.25H4.38325Z",fill:"#B2B6B8"})})}function W(){return(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M5.16206 12.3639C8.12374 10.6006 11.8774 10.6005 14.839 12.3639C14.9359 12.4216 15.0552 12.4894 15.1906 12.5658C15.7846 12.9009 16.6832 13.4073 17.2984 14.0094C17.6831 14.386 18.0482 14.8826 18.1146 15.4906C18.1853 16.137 17.9032 16.7435 17.3374 17.2826C16.3612 18.2126 15.1897 18.9582 13.6745 18.9582H6.3258C4.81063 18.9581 3.63903 18.2126 2.66286 17.2826C2.09718 16.7435 1.81505 16.137 1.88567 15.4906C1.95213 14.8826 2.31801 14.386 2.70274 14.0094C3.31787 13.4074 4.21575 12.9008 4.80968 12.5658C4.94519 12.4893 5.06516 12.4216 5.16206 12.3639ZM14.1994 13.4382C11.6318 11.9093 8.36933 11.9094 5.80171 13.4382C5.66184 13.5214 5.50815 13.6083 5.34761 13.6994C4.75377 14.0363 4.06018 14.4298 3.57676 14.903C3.2767 15.1967 3.14882 15.4393 3.12836 15.6265C3.11216 15.7751 3.15011 16.02 3.5255 16.3776C4.38865 17.1999 5.26552 17.7081 6.3258 17.7082H13.6745C14.7349 17.7082 15.6124 17.2 16.4756 16.3776C16.8508 16.0201 16.8881 15.7751 16.8719 15.6265C16.8515 15.4392 16.7236 15.1967 16.4235 14.903C15.9401 14.4299 15.2465 14.0363 14.6527 13.6994C14.4923 13.6084 14.3392 13.5214 14.1994 13.4382ZM10.0001 1.0415C12.4164 1.0415 14.3752 3.00026 14.3752 5.4165C14.3752 7.83275 12.4164 9.7915 10.0001 9.7915C7.58388 9.7915 5.62512 7.83275 5.62512 5.4165C5.62512 3.00026 7.58388 1.0415 10.0001 1.0415ZM10.0001 2.2915C8.27424 2.2915 6.87512 3.69061 6.87512 5.4165C6.87512 7.14239 8.27424 8.5415 10.0001 8.5415C11.726 8.5415 13.1252 7.14239 13.1252 5.4165C13.1252 3.69061 11.726 2.2915 10.0001 2.2915Z",fill:"#5D6061"})})}function z(e){let{muted:t=!1}=e;return t?(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M10.0007 1.0415C12.532 1.0415 14.584 3.09353 14.584 5.62484V7.10596C15.8904 7.50576 16.8764 8.65532 17.0636 10.0462C1
17.1871 10.9631 17.2923 11.9265 17.2923 12.9165C17.2923 13.9065 17.1871 14.8699 17.0636 15.7868C16.8373 17.4676 15.4445 18.7963 13.7295 18.8752C12.5392 18.9299 11.3305 18.9582 10.0007 18.9582C8.67084 18.9582 7.46212 18.9299 6.27181 18.8752C4.55676 18.7963 3.16397 17.4676 2.93766 15.7868C2.81422 14.8699 2.70898 13.9065 2.70898 12.9165C2.70898 11.9265 2.81422 10.9631 2.93766 10.0462C3.12493 8.65532 4.11095 7.50576 5.41732 7.10596V5.62484C5.41732 3.09353 7.46935 1.0415 10.0007 1.0415ZM10.0007 11.2498C9.54041 11.2498 9.16732 11.6229 9.16732 12.0832V13.7498C9.16732 14.2101 9.54041 14.5832 10.0007 14.5832C10.4609 14.5832 10.834 14.2101 10.834 13.7498V12.0832C10.834 11.6229 10.4609 11.2498 10.0007 11.2498ZM10.0007 2.70817C8.38982 2.70817 7.08398 4.01401 7.08398 5.62484V6.92529C8.01543 6.89223 8.97179 6.87484 10.0007 6.87484C11.0295 6.87484 11.9859 6.89223 12.9173 6.92529V5.62484C12.9173 4.01401 11.6115 2.70817 10.0007 2.70817Z",fill:"#B2B6B8"})}):(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M9.99967 1.0415C12.4159 1.0415 14.3747 3.00026 14.3747 5.4165V7.04899C15.7837 7.38545 16.8656 8.58227 17.0627 10.0462C17.1861 10.9631 17.2913 11.9265 17.2913 12.9165C17.2913 13.9065 17.1861 14.8699 17.0627 15.7868C16.8364 17.4676 15.4436 18.7963 13.7285 18.8752C12.5382 18.9299 11.3295 18.9582 9.99967 18.9582C8.66987 18.9582 7.46114 18.9299 6.27083 18.8752C4.55579 18.7963 3.16299 17.4676 2.93669 15.7868C2.81325 14.8699 2.70801 13.9065 2.70801 12.9165C2.70801 11.9265 2.81325 10.9631 2.93669 10.0462C3.13379 8.58227 4.21566 7.38545 5.62467 7.04899V5.4165C5.62467 3.00026 7.58343 1.0415 9.99967 1.0415ZM9.99967 8.12484C8.68838 8.12484 7.49847 8.15321 6.3278 8.20703C5.23721 8.25732 4.32391 9.10962 4.17529 10.2122C4.05415 11.112 3.95801 12.0106 3.95801 12.9165C3.95801 13.8224 4.05415 14.721 4.17529 15.6208C4.32391 16.7234 5.23721 17.5757 6.3278 17.626C7.49847 17.6798 8.68838 17.7082 9.99967 17.7082C11.311 17.7082 12.5009 17.6798 13.6715 17.626C14.7621 17.5757 15.6754 16.7234 15.8241 15.6208C15.9452 14.721 16.0413 13.8224 16.0413 12.9165C16.0413 12.0106 15.9452 11.112 15.8241 10.2122C15.6754 9.10962 14.7621 8.25732 13.6715 8.20703C12.5009 8.15321 11.311 8.12484 9.99967 8.12484ZM9.99967 11.4582C10.3449 11.4582 10.6247 11.738 10.6247 12.0832V13.7498C10.6247 14.095 10.3449 14.3748 9.99967 14.3748C9.6545 14.3748 9.37467 14.095 9.37467 13.7498V12.0832C9.37467 11.738 9.6545 11.4582 9.99967 11.4582ZM9.99967 2.2915C8.27378 2.2915 6.87467 3.69061 6.87467 5.4165V6.93343C7.87198 6.89533 8.89396 6.87484 9.99967 6.87484C11.1054 6.87484 12.1274 6.89533 13.1247 6.93343V5.4165C13.1247 3.69061 11.7266 2.2915 9.99967 2.2915Z",fill:"#1A1A1B"})})}function J(){return(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M9.99999 3.25C14.044 3.25 17.4085 6.16 18.1142 10C17.4092 13.84 14.044 16.75 9.99999 16.75C5.95599 16.75 2.59149 13.84 1.88574 10C2.59074 6.16 5.95599 3.25 9.99999 3.25ZM9.99999 15.25C11.5296 15.2497 13.0138 14.7301 14.2096 13.7764C15.4055 12.8226 16.2422 11.4912 16.5827 10C16.2409 8.50998 15.4037 7.18 14.208 6.22752C13.0122 5.27504 11.5287 4.7564 9.99999 4.7564C8.47126 4.7564 6.98776 5.27504 5.79202 6.22752C4.59629 7.18 3.75907 8.50998 3.41724 10C3.75781 11.4912 4.5945 12.8226 5.79035 13.7764C6.9862 14.7301 8.47039 15.2497 9.99999 15.25ZM9.99999 13.375C9.10489 13.375 8.24644 13.0194 7.61351 12.3865C6.98057 11.7536 6.62499 10.8951 6.62499 10C6.62499 9.10489 6.98057 8.24645 7.61351 7.61352C8.24644 6.98058 9.10489 6.625 9.99999 6.625C10.8951 6.625 11.7535 6.98058 12.3865 7.61352C13.0194 8.24645 13.375 9.10489 13.375 10C13.375 10.8951 13.0194 11.7536 12.3865 12.3865C11.7535 13.0194 10.8951 13.375 9.99999 13.375ZM9.99999 11.875C10.4973 11.875 10.9742 11.6775 11.3258 11.3258C11.6774 10.9742 11.875 10.4973 11.875 10C11.875 9.50272 11.6774 9.02581 11.3258 8.67418C10.9742 8.32254 10.4973 8.125 9.99999 8.125C9.50271 8.125 9.0258 8.32254 8.67417 8.67418C8.32254 9.02581 8.12499 9.50272 8.12499 10C8.12499 10.4973 8.32254 10.9742 8.67417 11.3258C9.0258 11.6775 9.50271 11.875 9.99999 11.875Z",fill:"#B2B6B8"})})}function Y(){return(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[(0,n.jsx)("path",{d:"M10.1787 8.40918V11.7978H14.9839C14.7729 12.8876 14.1397 13.8103 13.1901 14.4308L16.0878 16.6342C17.7761 15.107 18.7502 12.8638 18.7502 10.199C18.7502 9.57859 18.6934 8.98195 18.5878 8.40928L10.1787 8.40918Z",fill:"#5D6061"}),(0,n.jsx)("path",{d:"M5.17494 11.6655L4.52138 12.1558L2.20801 13.9217C3.67718 16.7773 6.68835 18.7501 10.1786 18.7501C12.5893 18.7501 14.6104 17.9705 16.0877 16.6342L13.19 14.4308C12.3945 14.9558 11.3799 15.274 10.1786 15.274C7.85718 15.274 5.88482 13.7388 5.17859 11.6706L5.17494 11.6655Z",fill:"#34A853"}),(0,n.jsx)("path",{d:"M2.20773 6.07861C1.59899 7.25583 1.25 8.58426 1.25 10.0001C1.25 11.416 1.59899 12.7444 2.20773 13.9217C2.20773 13.9296 5.1786 11.6626 5.1786 11.6626C5.00003 11.1376 4.89448 10.5808 4.89448 10C4.89448 9.41929 5.00003 8.86251 5.1786 8.33751L2.20773 6.07861Z",fill:"#FBBC05"}),(0,n.jsx)("path",{d:"M10.1788 4.73408C11.4938 4.73408 12.6626 5.17952 13.5961 6.03862L16.1529 3.53298C14.6025 2.1171 12.5896 1.25 10.1788 1.25C6.68854 1.25 3.67718 3.21476 2.20801 6.0784L5.17878 8.33748C5.88492 6.26929 7.85737 4.73408 10.1788 4.73408Z",fill:"#EA4335"})]})}function $(){return(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M8 14C4.6862 14 2 11.3138 2 8C2 4.6862 4.6862 2 8 2C11.3138 2 14 4.6862 14 8C14 11.3138 11.3138 14 8 14ZM7.4018 10.4L11.6438 6.1574L10.7954 5.309L7.4018 8.7032L5.7044 7.0058L4.856 7.8542L7.4018 10.4Z",fill:"#1FC16B"})})}function q(){return(0,n.jsx)("span",{className:"block h-[2px] w-4 bg-current shadow-[0_5px_0_current,0_-5px_0_current]"})}function Q(){return(0,n.jsx)("span",{className:"relative block h-4 w-4 before:absolute before:left-1/2 before:top-0 before:h-4 before:w-[2px] before:-translate-x-1/2 before:rotate-45 before:bg-current after:absolute after:left-1/2 after:top-0 after:h-4 after:w-[2px] after:-translate-x-1/2 after:-rotate-45 after:bg-current"})}function X(){return(0,n.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M3.75 9H14.25M10.125 4.875L14.25 9L10.125 13.125",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function ee(){return(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M8.75 3.5L5.25 7L8.75 10.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function et(){return(0,n.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M7.5 3.125V11.875M3.125 7.5H11.875",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function ea(){return(0,n.jsx)("img",{src:"".concat(R,"/stack-clock-04-fill.svg"),alt:"",className:"h-[14px] w-[14px]","aria-hidden":"true"})}function en(){return(0,n.jsx)("img",{src:"".concat(R,"/stack-book-04-line.svg"),alt:"",className:"h-[14px] w-[14px]","aria-hidden":"true"})}function ei(){return(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M4.66699 6.66675L8.00033 10.0001L11.3337 6.66675",stroke:"#5D6061",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function er(){return(0,n.jsxs)("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",children:[(0,n.jsx)("path",{d:"M2 33C2 15.3269 16.3269 1 34 1C51.6731 1 66 15.3269 66 33C66 50.6731 51.6731 65 34 65C16.3269 65 2 50.6731 2 33Z",fill:"white"}),(0,n.jsx)("path",{d:"M34 1.5C51.397 1.5 65.5 15.603 65.5 33C65.5 50.397 51.397 64.5 34 64.5C16.603 64.5 2.5 50.397 2.5 33C2.5 15.603 16.603 1.5 34 1.5Z",stroke:"#E7EAEC"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M44.2546 24.7024C44.7873 25.2108 44.8069 26.0548 44.2985 26.5875L30.2985 41.2541C30.0506 41.5138 29.7085 41.6626 29.3495 41.6667C28.9905 41.6709 28.645 41.5302 28.3912 41.2763L23.7245 36.6096C23.2038 36.0889 23.2038 35.2447 23.7245 34.724C24.2452 34.2033 25.0894 34.2033 25.6101 34.724L29.3118 38.4257L42.3695 24.7462C42.878 24.2135 43.722 24.1939 44.2546 24.7024Z",fill:"#1FC16B"})]})}function el(e){return!!(null==e?void 0:e.trim())}function eo(e){return e&&"object"==typeof e&&!Array.isArray(e)?e:null}function es(e){return Array.isArray(e)&&e.every(e=>null!==eo(e))}function ed(e){return"string"==typeof e?e.trim():""}function ec(e,t){let a=e;for(let e of t){if(!a||"object"!=typeof a||Array.isArray(a))return null;a=a[e]}return eo(a)}function eu(e){let t=ec(e,["page","Page"]),a=ec(e,["site","Site","siteBuilder"]);for(let n of[e.sections,e.Sections,null==t?void 0:t.sections,null==t?void 0:t.Sections,null==a?void 0:a.sections,null==a?void 0:a.Sections]){let e=function(e,t,a){if(a(e))return e;if("string"==typeof e&&e.trim())try{let n=JSON.parse(e);return a(n)?n:t}catch(e){}return t}(n,[],es);if(e.length>0)return e}return[]}function em(e){var t,a;let n=eo(e),i=function(e){var t,a;let n=function(e){if(Array.isArray(e))return e.map(e=>eo(e)).filter(e=>null!==e);let t=eo(e);return t?[t]:[]}(e);return 0===n.length?null:null!=(a=null==(t=n.map(e=>{let t=ed(e.updatedAt)||ed(e.createdAt)||ed(e.savedAt),a=t?new Date(t).getTime():0;return{record:e,hasSections:+(eu(e).length>0),timestamp:Number.isFinite(a)?a:0}}).sort((e,t)=>
1t.hasSections!==e.hasSections?t.hasSections-e.hasSections:t.timestamp-e.timestamp)[0])?void 0:t.record)?a:n[0]}(null!=(t=null==n?void 0:n.publishedPayload)?t:e);if(!i)return null;let r=eu(i).find(e=>"header"===ed(e.type).toLowerCase());if(!r)return null;let l=null!=(a=eo(r.data))?a:{};return{id:ed(r.id)||"published-header",type:"header",data:Object.fromEntries(Object.entries(l).map(e=>{let[t,a]=e;return[t,"string"==typeof a?a:String(null!=a?a:"")]}))}}function ex(e){let t=eo(e);if(!t)return null;let a=eo(t.data);return a&&"header"===(ed(t.type)||"header").toLowerCase()?{id:ed(t.id)||"published-header",type:"header",data:Object.fromEntries(Object.entries(a).map(e=>{let[t,a]=e;return[t,"string"==typeof a?a:String(null!=a?a:"")]}))}:null}function ep(e){return(e||"").trim().toLowerCase().replace(/^https?:\/\//i,"").replace(/\/.*$/,"").replace(/:[0-9]+$/,"")}function eh(e){var t;let a=null!=(t=null==e?void 0:e.trim())?t:"";if(!a)return"#";if(!a.startsWith("#"))return a;let n=a.slice(1).trim().replace(/\s+/g,"-").replace(/[^A-Za-z0-9\-_:.]/g,"");return n?"#".concat(n):"#"}function ef(e,t){let a=void 0===t||""===t?100:Number(t),n=Math.min(100,Math.max(0,Number.isFinite(a)?a:100))/100,i=e.trim(),r=i.replace("#","");if(/^[0-9a-fA-F]{6}$/.test(r)){let e=Number.parseInt(r.slice(0,2),16),t=Number.parseInt(r.slice(2,4),16),a=Number.parseInt(r.slice(4,6),16);return"rgba(".concat(e,", ").concat(t,", ").concat(a,", ").concat(n,")")}if(/^[0-9a-fA-F]{3}$/.test(r)){let e=Number.parseInt(r[0]+r[0],16),t=Number.parseInt(r[1]+r[1],16),a=Number.parseInt(r[2]+r[2],16);return"rgba(".concat(e,", ").concat(t,", ").concat(a,", ").concat(n,")")}return i}function eC(){let e=window.sessionStorage.getItem(U)||window.localStorage.getItem(U);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}}function eg(e,t){let a=ep(e);return a&&!_.has(a)?"https://".concat(a):t||"/"}function eb(e){let t="string"==typeof(null==e?void 0:e.firstName)?e.firstName:"",a="string"==typeof(null==e?void 0:e.lastName)?e.lastName:"",n="string"==typeof(null==e?void 0:e.emailAddress)?e.emailAddress:"string"==typeof(null==e?void 0:e.email)?e.email:"";return("".concat(t.charAt(0)).concat(a.charAt(0)).trim()||n.slice(0,2)||"JD").toUpperCase()}function ey(e){let t="string"==typeof(null==e?void 0:e.picture)?e.picture.trim():"",a="string"==typeof(null==e?void 0:e.avatarUrl)?e.avatarUrl.trim():"";return t||a||null}function ev(e){return("string"==typeof(null==e?void 0:e.emailAddress)?e.emailAddress:"")||("string"==typeof(null==e?void 0:e.email)?e.email:"")}function ew(){var e,t;return"string"==typeof(null==(t=e=(0,o.aB)())?void 0:t.roleType)&&"CU"===t.roleType.trim()?e:null}function ej(e){return{...e,roleType:"CU"}}function eN(e){let{children:t,className:a}=e;return(0,n.jsx)("div",{className:(0,T.cn)("flex h-10 items-center gap-[10px] rounded-[10px] border border-[#E1E4E7] bg-white px-[12px] text-[14px] text-[#1A1A1B]",a),children:t})}function eE(e){let{code:t,size:a=20}=e;return(0,n.jsx)("span",{className:"inline-flex shrink-0 overflow-hidden rounded-full ring-1 ring-[#E1E4E7]",style:{width:a,height:a},children:(0,n.jsx)("img",{src:(0,u.g0)(t),alt:"",className:"h-full w-full object-cover"})})}function eA(e){let{value:t,options:a,onChange:r}=e,[l,o]=(0,i.useState)(!1),s=(0,i.useRef)(null),d=a.find(e=>e.code===t)||a[0];return(0,i.useEffect)(()=>{if(!l)return;let e=e=>{var t;(null==(t=s.current)?void 0:t.contains(e.target))||o(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[l]),(0,n.jsxs)("div",{ref:s,className:"relative",children:[(0,n.jsxs)(eN,{className:"cursor-pointer justify-between",children:[(0,n.jsxs)("button",{type:"button",onClick:()=>o(e=>!e),className:"flex min-w-0 flex-1 items-center gap-[8px] text-left",children:[(0,n.jsx)(eE,{code:d.code}),(0,n.jsx)("span",{className:"min-w-0 flex-1 truncate",children:d.name})]}),(0,n.jsx)(ei,{})]}),l?(0,n.jsx)("div",{className:"absolute left-0 right-0 top-[calc(100%+6px)] z-30 max-h-[240px] overflow-y-auto rounded-[10px] border border-[#E1E4E7] bg-white py-[6px] shadow-[0_16px_32px_rgba(15,23,42,0.12)] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:a.map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>{r(e.code),o(!1)},className:(0,T.cn)("flex w-full items-center gap-[10px] px-[12px] py-[9px] text-left transition hover:bg-[#F7F8F9]",e.code===t&&"bg-[#F7F8F9]"),children:[(0,n.jsx)(eE,{code:e.code}),(0,n.jsx)("span",{className:"min-w-0 flex-1 truncate text-[14px] text-[#1A1A1B]",children:e.name}),e.code===t?(0,n.jsx)("img",{src:"".concat(R,"/select-box-circle-fill.svg"),alt:"",className:"h-4 w-4 shrink-0","aria-hidden":"true"}):null]},e.code))}):null]})}function eB(){let{domainName:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,r.useRouter)(),a=(0,r.useSearchParams)(),[u,h]=(0,i.useState)("cart"),[f,C]=(0,i.useState)([]),[g,b]=(0,i.useState)([]),[y,v]=(0,i.useState)(null),[w,j]=(0,i.useState)(""),[N,B]=(0,i.useState)(""),[S,R]=(0,i.useState)(""),[ei,es]=(0,i.useState)(""),[ec,eu]=(0,i.useState)(""),[eE,eB]=(0,i.useState)(9),[ek,eS]=(0,i.useState)("AE"),[eI,eT]=(0,i.useState)(""),[eM,eL]=(0,i.useState)(""),[eF,eO]=(0,i.useState)(""),[eU,e_]=(0,i.useState)(""),[eP,eR]=(0,i.useState)(!1),[eD,eG]=(0,i.useState)(!1),[eZ,eH]=(0,i.useState)(!1),[eV,eK]=(0,i.useState)(null),[eW,ez]=(0,i.useState)(!1),[eJ,eY]=(0,i.useState)(!1),[e$,eq]=(0,i.useState)(!1),[eQ,eX]=(0,i.useState)(!1),[e1,e2]=(0,i.useState)(""),[e0,e4]=(0,i.useState)("loading"),[e5,e6]=(0,i.useState)(()=>{let e=eC(),t=ed(null==e?void 0:e.siteUrl),a=ed(null==e?void 0:e.domainName)||ep(t)||ed(null==e?void 0:e.domain);return{header:ex(null==e?void 0:e.header)||em(e),siteUrl:t||eg(a,null)}}),[e8,e7]=(0,i.useState)(!1);(0,i.useEffect)(()=>{C((0,m.h)()),v(ew())},[]),(0,i.useEffect)(()=>{let t=!1,a=window.location.hostname,n=(null==e?void 0:e.trim())||(0,m.iN)()||(_.has(a)?"":a);return(0,x.H)(n).then(e=>{t||b(e.catalog)}),()=>{t=!0}},[e]),(0,i.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/runtime-config",{cache:"no-store"}),t=await e.json(),a=(t.apiBaseUrl||"").replace(/\/+$/,"");if(!e.ok||!a)throw Error(t.error||"API URL is not configured.");e2(a),e4("ready")}catch(e){e4("error"),eK(e instanceof Error?e.message:"Unable to load checkout configuration.")}})()},[]),(0,i.useEffect)(()=>{let t=!1;return(async()=>{let a=new URLSearchParams(window.location.search),n=eC(),i=function(){if("undefined"==typeof document||!document.referrer)return null;try{let e=new URL(document.referrer),t=e.pathname.match(/^\/site\/([^/?#]+)/);return{siteId:e.searchParams.get("siteId")||"",siteName:e.searchParams.get("siteName")||"",domainName:(null==t?void 0:t[1])||ep(e.hostname),url:e.origin+e.pathname}}catch(e){return null}}(),r=ep(window.location.hostname),l=(p=c.py,"undefined"==typeof document?null:null!=(f=null==(h=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith("".concat(p,"="))))?void 0:h.slice(p.length+1))?f:null),o=Object.entries((0,c.g5)(l)),s=1===o.length?o[0]:null,u=ed(null==n?void 0:n.siteUrl),m=ed(null==n?void 0:n.domainName)||ep(u)||ed(null==n?void 0:n.domain),x=ex(null==n?void 0:n.header)||em(n);for(let n of(x&&!t&&e6({header:x,siteUrl:u||(null==i?void 0:i.url)||eg(m,null)}),[e||"",a.get("domainName")||"",a.get("domain")||"",m,(null==i?void 0:i.domainName)||"",!_.has(r)?r:"",(null==s?void 0:s[0])||""].filter(
1Boolean)))try{let e=await (0,d.$1)(n),a=eo(null==e?void 0:e.CONTENT),r=em(a);if(!r)continue;let l=a?eo(a.site):null,o=l?ed(l.siteId):"",s=eg(n,(null==i?void 0:i.url)||u);if(!t){e6({header:r,siteUrl:s});var p,h,f,C={siteId:o,domainName:n,siteUrl:s};let e=JSON.stringify(C);window.sessionStorage.setItem(U,e),window.localStorage.setItem(U,e)}return}catch(e){}t||e6(e=>({header:e.header||x||null,siteUrl:e.siteUrl||(null==i?void 0:i.url)||u||null}))})(),()=>{t=!0}},[]),(0,i.useEffect)(()=>{localStorage.setItem(M,JSON.stringify(f))},[f]),(0,i.useEffect)(()=>{window.history.replaceState({...window.history.state||{},customerCheckoutStep:u},"",window.location.href);let e=e=>{var t;let a=null==(t=e.state)?void 0:t.customerCheckoutStep;("cart"===a||"email"===a||"password"===a||"otp"===a||"payment"===a||"success"===a)&&(eK(null),e7(!1),h(a))};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),(0,i.useEffect)(()=>{if("otp"!==u||eE<=0)return;let e=window.setTimeout(()=>eB(e=>Math.max(0,e-1)),1e3);return()=>window.clearTimeout(e)},[eE,u]);let e9=(0,i.useMemo)(()=>f.reduce((e,t)=>e+t.price,0),[f]),e3=e9+0,te=(0,i.useMemo)(()=>{let e=new Set(f.map(e=>e.id));return g.filter(t=>!e.has(t.id)).slice(0,4)},[g,f]),tt=w.trim().toLowerCase(),ta=/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(tt),tn=[{id:"uppercase",label:"At least 1 uppercase letter",valid:/[A-Z]/.test(S)},{id:"lowercase",label:"At least 1 lowercase letter",valid:/[a-z]/.test(S)},{id:"number",label:"At least 1 number",valid:/\d/.test(S)},{id:"length",label:"Minimum 8 characters",valid:S.length>=8}],ti=tn.every(e=>e.valid),tr=S.length>0&&S===ei,tl=eI.replace(/\D/g,""),to=function(e){if(/^4/.test(e))return"visa";let t=Number(e.slice(0,2)),a=Number(e.slice(0,4));return t>=51&&t<=55||a>=2221&&a<=2720?"mastercard":/^3[47]/.test(e)?"amex":/^(6011|65|64[4-9])/.test(e)?"discover":"unknown"}(tl);("amex"===to?15===tl.length:"visa"===to?[13,16,19].includes(tl.length):"mastercard"===to||"discover"===to?[16,19].includes(tl.length):tl.length>=13&&tl.length<=19)&&function(e){if(!/^\d{13,19}$/.test(e))return;let t=0,a=!1;for(let n=e.length-1;n>=0;n-=1){let i=Number(e[n]);a&&(i*=2)>9&&(i-=9),t+=i,a=!a};}(tl),new RegExp("^\\d{".concat("amex"===to?4:3,"}$")).test(eM),function(e){let t=/^(0[1-9]|1[0-2])\/(\d{2})$/.exec(e);if(!t)return;t[1],t[2];let a=new Date;a.getFullYear(),a.getMonth()}(eF),/^[A-Za-z0-9][A-Za-z0-9 -]{2,11}$/.test(eU.trim());let ts=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];eK(null),h(e),t&&window.history.pushState({...window.history.state||{},customerCheckoutStep:e},"",window.location.href)},td=function(e,t){let a=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=ej(e);(0,o.cR)(n,t),v(n),j(ev(n)),(0,o.$q)(),ts("payment",a)};(0,i.useEffect)(()=>{if(e$)return;let e=a.get("checkoutStep"),n=a.get("token"),i=a.get("path");if("payment"===e&&!n&&!i){let e=(0,o.aB)();if(e){var r;td(e,null!=(r=(0,s.c4)())?r:"",!1),t.replace("/cart",{scroll:!1})}eq(!0);return}(n||i)&&(!i||"loading"!==e0)&&(async()=>{eY(!0),eK(null);try{if(n){var e;let a=n.trim().replace(/^Bearer\s+/i,"").trim();if(!a)throw Error("Unable to verify Google sign-in. Invalid token.");let i=await (0,l.nr)(a),r=null!=(e=i.TOKEN)?e:a;td(i.CONTENT,r,!1),t.replace("/cart",{scroll:!1});return}if(!i)throw Error("Unable to verify Google sign-in. Invalid redirect.");let a=i;try{a=decodeURIComponent(i)}catch(e){a=i}if(!e1)throw Error("API URL is not configured.");let r=/^https?:\/\//i.test(a)?a:"".concat(e1).concat(a.startsWith("/")?a:"/".concat(a)),o=await fetch(r,{method:"GET",cache:"no-store"}),s=o.headers.get("authorization")||o.headers.get("Authorization"),d=s?s.replace(/^Bearer\s+/i,"").trim():null,c=null;try{c=await o.json()}catch(e){c=null}let u=c&&"object"==typeof c&&"SUCCESS"in c?!1!==c.SUCCESS:o.ok;if(!o.ok||!u){let e=c&&"object"==typeof c&&"MESSAGE"in c&&"string"==typeof c.MESSAGE?c.MESSAGE:"Unable to verify Google sign-in.";throw Error(e)}let m=c&&"object"==typeof c&&"CONTENT"in c?c.CONTENT:null;if(!m||"object"!=typeof m)throw Error("Invalid server response while verifying Google sign-in.");let x=(c&&"object"==typeof c&&"TOKEN"in c&&"string"==typeof c.TOKEN?c.TOKEN:void 0)||d;if(!x)throw Error("Authentication token not received from server. Please try signing in again.");td(m,x,!1),t.replace("/cart",{scroll:!1})}catch(e){eK(e instanceof Error?e.message:"Unable to verify Google sign-in.")}finally{eY(!1),eq(!0)}})()},[e1,e0,e$,t,a]);let tc=async()=>
1{if(!(eE>0)&&!eW){ez(!0),eK(null);try{await (0,l.vf)({email:tt,password:S}),eB(9),eK("A new code has been sent.")}catch(e){eK(e instanceof Error?e.message:"Unable to resend code right now.")}finally{ez(!1)}}},tu=async e=>{if(e.preventDefault(),eK(null),!ta)return void eK("Enter a valid email address.");ts("password")},tm=async e=>{if(e.preventDefault(),eK(null),!N.trim())return void eK("Enter your full name.");if(!ti)return void eK("Complete all password requirements.");if(!tr)return void eK("Passwords do not match.");ez(!0);try{await (0,l.vf)({email:tt,password:S}),eB(9),ts("otp")}catch(e){eK(e instanceof Error?e.message:"Unable to create account right now.")}finally{ez(!1)}},tx=async e=>{if(e.preventDefault(),eK(null),!/^\d{6}$/.test(ec))return void eK("Enter the 6-digit code.");ez(!0);try{var t,a;let e=await (0,l.wn)({otpCode:ec}),n=e.TOKEN||e.token||(null==(t=e.CONTENT)?void 0:t.TOKEN)||(null==(a=e.CONTENT)?void 0:a.token),i=e.CONTENT;if(!n){let e=await (0,l.iD)({userName:tt,password:S});n=e.TOKEN||e.token,i=e.CONTENT}if(!n)throw Error("Authentication token was not returned.");let r=ej(i);(0,o.cR)(r,n),v(r),ts("payment")}catch(e){eK(e instanceof Error?e.message:"Verification failed.")}finally{ez(!1)}},tp=e=>e.map(e=>({id:e.id,kind:e.kind,title:e.title,price:e.price,offerId:e.offerId,offerTypeCode:e.offerTypeCode,currencyType:e.currencyType})),th=()=>{var e;(0,m.A)([]),localStorage.removeItem(M),C([]),window.location.href=(null==(e=e5.siteUrl)?void 0:e.trim())||"/"},tf=async()=>{if(!eW){eK(null),ez(!0);try{let i=null!=y?y:ew(),r=async()=>{await E(i,tp(f)),localStorage.setItem(L,JSON.stringify(f)),th()},l=f.filter(e=>Math.round(100*Math.max(0,e.price))>0);if(0===l.length)return void await r();let o=await A(i),s=l.filter(e=>{var t;return!!(null==(t=e.offerId)?void 0:t.trim())}).map(e=>({offerId:e.offerId.trim(),offerType:function(e){let t=(e||"").trim().toUpperCase();return"CM"===t?"CM":"PB"===t||"BO"===t?"BO":"CO"}(e.offerTypeCode)}));if(o&&s.length>0){localStorage.setItem(F,JSON.stringify(f));let i=window.location.origin;try{var e,t,a,n;let r=await k({customerId:o,items:s,providerCode:"stripe",successUrl:"".concat(i,"/cart?checkoutStep=success&orderId={ORDER_ID}"),cancelUrl:"".concat(i,"/cart?checkoutStep=payment&payment=cancelled")}),l=null==(t=r.CONTENT)||null==(e=t.checkoutUrl)?void 0:e.trim();if(l){let e=null==(n=r.CONTENT)||null==(a=n.orderId)?void 0:a.trim();e&&localStorage.setItem(O,e),window.location.href=l;return}}catch(e){console.error("Payment gateway checkout failed:",e)}}eK("We couldn't start the payment checkout. Please try again in a moment."),ez(!1)}catch(e){eK(e instanceof Error?e.message:"Unable to complete your purchase. Please try again."),ez(!1)}}};(0,i.useEffect)(()=>{var e,t,a,n;if(eQ)return;let i=new URLSearchParams(window.location.search);if("success"!==i.get("checkoutStep"))return;let r=null!=(a=null==(e=i.get("orderId"))?void 0:e.trim())?a:"",l=!r||r.startsWith("{")||"null"===r?null!=(n=null==(t=localStorage.getItem(O))?void 0:t.trim())?n:"":r;l&&(eX(!0),(async()=>{ez(!0),eK(null);try{var e,t,a,n;let i=await I(l);if(!i.paid)throw Error("pending"===i.status?"Your payment is still being confirmed. If you were charged, your products will unlock shortly — please refresh in a moment.":"We couldn't confirm your payment. If you were charged, please contact support.");let r=f;try{let e=localStorage.getItem(F);e&&(r=JSON.parse(e))}catch(e){}if(!((null==(t=i.order)||null==(e=t.subscribeRecordId)?void 0:e.trim())||(null==(n=i.order)||null==(a=n.items)?void 0:a.some(e=>{var t;return null==(t=e.subscribeRecordId)?void 0:t.trim()}))))try{let e=null!=y?y:ew();await E(e,tp(r))}catch(e){console.error("Failed to record purchase after payment:",e)}localStorage.setItem(L,JSON.stringify(r)),localStorage.removeItem(F),localStorage.removeItem(O),th()}catch(e){eK(e instanceof Error?e.message:"We couldn't confirm your payment."),ez(!1)}})())},[]);let tC=(e,t)=>{e7(!1);let a=eh(t);if(a.startsWith("#")){e.preventDefault();let t=e5.siteUrl||"/";window.location.href="".concat(t).concat(a);return}(()=>{try{return"/cart"===new URL(a,window.location.origin).pathname.replace(/\/$/,"")}catch(e){return"/cart"===a.replace(/\?.*$/,"").replace(/\/$/,"")}})()&&(e.preventDefault(),ts("cart"))},tg=e=>{e.preventDefault(),e7(!1),ts("email")},tb=()=>{if(e7(!1),e5.siteUrl){window.location.href=e5.siteUrl;return}t.push("/")},ty=()=>{var e,t,a,i;let r=e5.header;
1if(!r)return(0,n.jsx)("header",{className:"border-b border-[#E7EAEC] bg-white",children:(0,n.jsxs)("div",{className:"mx-auto flex min-h-[81px] w-full items-center justify-between px-6",children:[(0,n.jsx)("button",{type:"button",onClick:tb,"aria-label":"Go back",children:(0,n.jsx)(G,{header:e5.header})}),(0,n.jsx)("button",{type:"button",onClick:tb,className:"text-[14px] font-[500] text-[#1A1A1B] transition hover:text-[#5D6061]",children:"Cancel"})]})});let l=r.data,o=function(e){var t,a,n,i;try{let a=JSON.parse(null!=(t=e.navItems)?t:"[]");if(Array.isArray(a))return a.map((e,t)=>{var a,n;return{id:e.id||"nav-".concat(t+1),label:null!=(a=e.label)?a:"",link:null!=(n=e.link)?n:""}}).filter(e=>e.id&&el(e.label))}catch(e){}return[{id:"nav-1",label:null!=(a=e.nav1)?a:"",link:""},{id:"nav-2",label:null!=(n=e.nav2)?n:"",link:""},{id:"nav-3",label:null!=(i=e.nav3)?i:"",link:""}].filter(e=>el(e.label))}(l),s=(e,t)=>el(l[e])?l[e]:t,d=Math.max(0,Number(l.headerNavGap)||24),c=Math.max(0,Number(l.headerBorderWidth)||1),u=Math.max(0,Number(l.headerButtonRadius)||10),m=Math.max(0,Number(l.headerButtonPaddingX)||16),x=Math.max(20,Number(l.headerLogoImageHeight)||36),h=el(l.logoImage),f=s("loginText","Log In"),C=(0,p.lz)(s("loginLink",p.F_),"login"),g=(null==(e=l.signupText)?void 0:e.trim())||((null==(t=l.cta)?void 0:t.trim())&&"Get Started"!==l.cta.trim()?l.cta.trim():"Sign up"),b=(0,p.lz)((null==(a=l.signupLink)?void 0:a.trim())||(null==(i=l.ctaLink)?void 0:i.trim()),"signup"),v=s("cartLink","/cart"),w={backgroundColor:ef(l.sectionBgColor||l.headerBg||"#FFFFFF",l.sectionBgOpacity||l.headerBgOpacity),borderBottomColor:ef(l.headerBorderColor||l.sectionBorderColor||"#E7EAEC",l.headerBorderOpacity||l.sectionBorderOpacity),borderBottomWidth:"".concat(c,"px"),borderBottomStyle:c>0?"solid":"none"},j={color:ef(l.headerNavColor||"#5D6061",l.headerNavOpacity)},N={color:ef(l.headerCartColor||"#1A1A1B",l.headerCartOpacity)},E=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return o.map(t=>{let a=eh(t.link),i=a.startsWith("#")&&e5.siteUrl?"".concat(e5.siteUrl).concat(a):a;return(0,n.jsx)("a",{href:i,className:(0,T.cn)("font-[500] transition hover:opacity-70",e?"text-[13px]":"text-[14px]"),style:j,onClick:e=>tC(e,t.link),children:t.label},t.id)})},A=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,n.jsx)("div",{className:(0,T.cn)(e?"flex flex-col gap-[10px]":"flex items-center gap-[14px]"),children:y?(0,n.jsxs)(n.Fragment,{children:[ey(y)?(0,n.jsx)("img",{src:ey(y),alt:"",title:ev(y)||eb(y),className:"inline-flex h-[40px] w-[40px] rounded-full object-cover ring-1 ring-[#E1E4E7]"}):(0,n.jsx)("span",{title:ev(y)||eb(y),className:"inline-flex h-[40px] w-[40px] items-center justify-center rounded-full bg-[#EDEDED] text-[14px] font-[600] text-[#1A1A1B]",children:eb(y)}),(0,n.jsx)("a",{href:eh(v),onClick:e=>tC(e,v),className:(0,T.cn)("inline-flex items-center justify-center transition hover:opacity-75",e?"h-10 w-full":"h-[38px] w-[38px] rounded-[12px] bg-[#F1F3F4]"),style:N,"aria-label":"Cart",children:(0,n.jsx)(Z,{className:"h-9 w-9"})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("a",{href:eh(v),onClick:e=>tC(e,v),className:(0,T.cn)("inline-flex items-center justify-center transition hover:opacity-75",e?"h-10 w-full":"h-[38px] w-[38px] rounded-[12px] bg-[#F1F3F4]"),style:N,"aria-label":"Cart",children:(0,n.jsx)(Z,{className:"h-9 w-9"})}),(0,n.jsx)("a",{href:eh(C),onClick:tg,className:(0,T.cn)("inline-flex items-center justify-center border bg-transparent text-[14px] font-[500] transition hover:bg-[#F7F8F9]",e?"h-10 w-full":"h-[42px]"),style:{borderRadius:"".concat(u,"px"),borderColor:ef(l.headerLoginBorderColor||"#1A1A1B",l.headerLoginBorderOpacity),paddingLeft:"".concat(Math.max(16,m+1),"px"),paddingRight:"".concat(Math.max(16,m+1),"px"),color:ef(l.headerLoginTextColor||"#1A1A1B",l.headerLoginTextOpacity)},children:f}),(0,n.jsx)("a",{href:eh(b),onClick:tg,className:(0,T.cn)("inline-flex items-center justify-center text-[14px] font-[500] transition hover:opacity-85",e?"h-10 w-full":"h-[42px]"),style:{borderRadius:"".concat(u,"px"),paddingLeft:"".concat(Math.max(18,m+1),"px"),paddingRight:"".concat(Math.max(18,m+1),"px"),backgroundColor:ef(l.headerButtonBg||"#1A1A1B",l.headerButtonBgOpacity),color:ef(l.headerButtonTextColor||"#FFFFFF",l.headerButtonTextOpacity)},children:g})]})})};return(0,n.jsxs)("header",{style:w,className:"border-b",children:[(0,n.jsxs)("div",{className:"mx-auto flex min-h-[81px] w-full max-w-[1312px] items-center justify-between px-5 py-4 sm:px-8 lg:px-[64px]",children:[(0,n.jsx)("a",{href:e5.siteUrl||"/",className:"flex min-w-0 items-center gap-3",onClick:()=>e7(!1),children:h?(0,n.jsx)("img",{src:l.logoImage,alt:s("brand","Website logo"),className:"block max-w-[180px] object-contain sm:max-w-[220px]",style:{height:"".concat(x,"px")}}):(0,n.jsx)("span",{className:"truncate text-[14px] font-[600] leading-none",style:{color:ef(l.headerBrandColor||"#1A1A1B",l.headerBrandOpacity)},children:s("brand","Brand Logo")})}),(0,n.jsxs)("div",{className:"hidden items-center justify-end md:flex",children:[o.length>0?(0,n.jsx)("nav",{className:"flex items-center",style:{columnGap:"".concat(d,"px")},children:E()}):null,(0,n.jsx)("div",{className:"ml-[32px]",children:A()})]}),(0,n.jsx)("button",{type:"button",className:"inline-flex h-10 w-10 items-center justify-center rounded-full border border-[#
1E7EAEC] bg-white/80 text-[#202226] shadow-[0_2px_8px_rgba(15,23,42,0.06)] md:hidden","aria-label":e8?"Close navigation menu":"Open navigation menu",onClick:()=>e7(e=>!e),children:e8?(0,n.jsx)(Q,{}):(0,n.jsx)(q,{})})]}),(0,n.jsxs)("div",{className:(0,T.cn)("mx-5 mb-4 flex-col gap-3 rounded-[18px] border border-[#E7EAEC] bg-white/95 p-4 shadow-[0_10px_25px_rgba(15,23,42,0.06)] md:hidden",e8?"flex":"hidden"),children:[o.length>0?(0,n.jsx)("nav",{className:"flex flex-col gap-3",children:E(!0)}):null,A(!0)]})]})},tv=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,n.jsxs)("aside",{className:"w-full rounded-[18px] bg-[#F7F7F8] px-[24px] py-[26px] lg:w-[476px]",children:[(0,n.jsx)("h2",{className:"text-[24px] font-[600] tracking-[-0.03em] text-[#1A1A1B]",children:"Order Summary"}),(0,n.jsxs)("div",{className:"mt-[34px]",children:[(0,n.jsxs)("p",{className:"text-[16px] font-[600] text-[#1A1A1B]",children:["Products (",f.length,")"]}),(0,n.jsx)("div",{className:"mt-[20px] space-y-[18px]",children:f.map(e=>(0,n.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"rounded-[6px] bg-[#FFF0E8] px-[8px] py-[5px] text-[12px] font-[500] text-[#FF5E00]",children:e.kind}),(0,n.jsx)("p",{className:"mt-[8px] text-[16px] font-[600] text-[#1A1A1B]",children:e.title}),(0,n.jsx)("p",{className:"mt-[4px] text-[14px] text-[#5D6061]",children:e.billing.trim()||"one-time"})]}),(0,n.jsx)("p",{className:"pt-[16px] text-[16px] font-[600] text-[#1A1A1B]",children:D(e.price)})]},e.id))})]}),(0,n.jsxs)("div",{className:"mt-[30px] border-t border-[#E1E4E7] pt-[32px]",children:[(0,n.jsxs)("div",{className:"flex justify-between text-[16px] font-[500] text-[#1A1A1B]",children:[(0,n.jsx)("span",{children:"SubTotal"}),(0,n.jsx)("span",{children:D(e9)})]}),(0,n.jsxs)("div",{className:"mt-[24px] flex justify-between text-[16px] font-[500] text-[#1A1A1B]",children:[(0,n.jsx)("span",{children:"Tax"}),(0,n.jsx)("span",{children:D(0)})]})]}),(0,n.jsxs)("div",{className:"mt-[34px] border-t border-[#E1E4E7] pt-[34px]",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("span",{className:"text-[24px] font-[600] tracking-[-0.03em] text-[#1A1A1B]",children:"Estimated Total"}),(0,n.jsx)("span",{className:"text-[24px] font-[500] text-[#1A1A1B]",children:D(e3)})]}),(0,n.jsx)("button",{type:"button",onClick:tf,disabled:e,className:"mt-[34px] h-[40px] w-full rounded-[9px] bg-[#222324] text-[14px] font-[500] text-white disabled:cursor-not-allowed disabled:bg-transparent disabled:text-[#E1E4E7]",children:"Complete Checkout"}),(0,n.jsx)("p",{className:"mt-[14px] text-center text-[12px] text-[#B2B6B8]",children:"After checkout, your purchased products will be available inside your Stack workspace."})]})]})};return(0,n.jsx)("div",{className:"min-h-screen bg-white font-sans text-[#1A1A1B]",children:"cart"===u?(0,n.jsxs)(n.Fragment,{children:[ty(),(0,n.jsxs)("main",{className:"mx-auto grid max-w-[1066px] grid-cols-1 gap-x-[72px] px-5 pb-[46px] pt-[42px] lg:grid-cols-[1fr_368px] lg:px-0",children:[(0,n.jsxs)("section",{className:"min-w-0",children:[(0,n.jsxs)("button",{type:"button",onClick:()=>{if(document.referrer)try{let e=new URL(document.referrer),a="/cart"===e.pathname.replace(/\/$/,"");if(e.origin===window.location.origin&&!a&&window.history.length>1)return void t.back()}catch(e){}if(e5.siteUrl){window.location.href=e5.siteUrl;return}t.push("/")},className:"mb-[18px] inline-flex items-center gap-[6px] text-[12px] font-[500] text-[#6B6F72] transition hover:text-[#1A1A1B]",children:[(0,n.jsx)(ee,{}),"Back"]}),(0,n.jsx)("h1",{className:"text-[24px] font-[600] leading-tight tracking-[-0.03em] text-[#1A1A1B]",children:"My Cart"}),(0,n.jsxs)("p",{className:"mt-[19px] text-[16px] font-[600] text-[#1A1A1B]",children:["Products in cart (",f.length,")"]}),(0,n.jsxs)("div",{className:"mt-[18px]",children:[f.map(e=>{let[t,a]=e.meta.includes("  -  ")?e.meta.split("  -  "):e.meta.split(" - ");
1return(0,n.jsxs)("article",{className:"flex border-t border-[#E1E4E7] py-[16px]",children:[(0,n.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,n.jsx)("span",{className:"inline-flex rounded-[6px] bg-[#FFF0E8] px-[8px] py-[5px] text-[12px] font-[500] leading-none text-[#FF5E00]",children:e.kind}),(0,n.jsx)("h3",{className:"mt-[11px] text-[20px] font-[600] leading-[1.15] tracking-[-0.02em] text-[#1A1A1B]",children:e.title}),(0,n.jsx)("p",{className:"mt-[7px] max-w-[560px] text-[14px] leading-[1.45] text-[#5D6061]",children:e.description}),(0,n.jsxs)("div",{className:"mt-[8px] flex flex-wrap gap-[6px]",children:[(0,n.jsxs)("span",{className:"inline-flex h-[24px] items-center gap-[4px] rounded-[6px] border border-[#E1E4E7] px-[7px] text-[12px] text-[#5D6061]",children:[(0,n.jsx)(ea,{}),t||e.meta]}),(0,n.jsxs)("span",{className:"inline-flex h-[24px] items-center gap-[4px] rounded-[6px] border border-[#E1E4E7] px-[7px] text-[12px] text-[#5D6061]",children:[(0,n.jsx)(en,{}),a||e.meta]})]})]}),(0,n.jsxs)("div",{className:"flex w-[96px] shrink-0 flex-col items-start pt-[2px] sm:w-[124px]",children:[(0,n.jsx)("p",{className:"text-[30px] font-[500] leading-none tracking-[-0.04em] text-[#1A1A1B]",children:D(e.price)}),(0,n.jsx)("p",{className:"mt-[2px] text-[12px] leading-none text-[#B2B6B8]",children:e.billing})]}),(0,n.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void C(e=>e.filter(e=>e.id!==t))},className:"mt-[1px] flex h-[32px] w-[32px] shrink-0 items-center justify-center transition hover:opacity-70","aria-label":"Remove ".concat(e.title),children:(0,n.jsx)(H,{})})]},e.id)}),0===f.length?(0,n.jsx)("p",{className:"border-t border-[#E1E4E7] py-8 text-[14px] text-[#5D6061]",children:"Your cart is empty."}):null]})]}),(0,n.jsxs)("aside",{className:"mt-8 h-fit rounded-[18px] bg-[#F7F7F8] px-[24px] py-[26px] lg:mt-[-18px]",children:[(0,n.jsxs)("div",{className:"flex justify-between text-[16px] font-[500] text-[#1A1A1B]",children:[(0,n.jsx)("span",{children:"SubTotal"}),(0,n.jsx)("span",{children:D(e9)})]}),(0,n.jsxs)("div",{className:"mt-[26px] flex justify-between text-[16px] font-[500] text-[#1A1A1B]",children:[(0,n.jsx)("span",{children:"Tax"}),(0,n.jsx)("span",{children:D(0)})]}),(0,n.jsxs)("div",{className:"mt-[34px] border-t border-[#E1E4E7] pt-[34px]",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,n.jsx)("span",{className:"text-[24px] font-[600] tracking-[-0.03em]",children:"Estimated Total"}),(0,n.jsx)("span",{className:"text-[24px] font-[500]",children:D(e3)})]}),(0,n.jsxs)("button",{type:"button",onClick:()=>{0!==f.length&&ts(y?"payment":"email")},disabled:0===f.length,className:"mt-[32px] flex h-[40px] w-full items-center justify-center gap-[12px] rounded-[9px] bg-[#222324] text-[14px] font-[500] text-white transition hover:bg-[#111213] disabled:opacity-40",children:["Proceed to Checkout",(0,n.jsx)(X,{})]})]})]}),te.length>0?(0,n.jsxs)("section",{className:"mt-[74px] min-w-0 lg:col-span-2",children:[(0,n.jsx)("div",{className:"flex items-center justify-between gap-4",children:(0,n.jsx)("h2",{className:"text-[24px] font-[600] leading-tight tracking-[-0.03em] text-[#1A1A1B]",children:"You might also like"})}),(0,n.jsx)("div",{className:"mt-[20px] grid grid-cols-1 gap-[18px] md:grid-cols-2",children:te.map(e=>(0,n.jsxs)("article",{className:"rounded-[22px] border border-[#E7EAEC] bg-white px-[24px] pb-[24px] pt-[24px] shadow-[0_1px_2px_rgba(10,13,20,0.03)] transition duration-200 hover:-translate-y-[2px] hover:shadow-[0_10px_24px_rgba(10,13,20,0.08)]",children:[(0,n.jsxs)("div",{className:"flex items-center gap-[12px]",children:[(0,n.jsx)(V,{kind:e.kind,tone:e.iconTone}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-[14px] font-[600] leading-tight text-[#1A1A1B]",children:e.kind}),(0,n.jsx)("p",{className:"mt-[3px] text-[12px] leading-none text-[#B2B6B8]",children:e.meta})]})]}),(0,n.jsx)("h3",{className:"mt-[28px] text-[20px] font-[600] leading-tight tracking-[-0.03em] text-[#1A1A1B]",children:e.title}),(0,n.jsx)("p",{className:"mt-[10px] min-h-[48px] text-[14px] leading-[1.45] text-[#5D6061]",children:e.description}
1),(0,n.jsxs)("div",{className:"mt-[26px] border-t border-[#ECEFF1] pt-[18px]",children:[(0,n.jsx)("p",{className:"text-[34px] font-[500] leading-none tracking-[-0.04em] text-[#1A1A1B]",children:D(e.price)}),(0,n.jsx)("p",{className:"mt-[4px] text-[12px] leading-none text-[#B2B6B8]",children:e.billing}),(0,n.jsxs)("button",{type:"button",onClick:()=>{C(t=>t.some(t=>t.id===e.id)?t:[...t,e])},className:"mt-[12px] flex h-[42px] w-full items-center justify-center gap-[9px] rounded-[10px] bg-[#1F2021] text-[14px] font-[500] text-white transition hover:bg-[#111213]",children:[(0,n.jsx)(et,{}),"Add to cart"]})]})]},e.id))})]}):null]})]}):"email"===u?(0,n.jsxs)(n.Fragment,{children:[ty(),(0,n.jsxs)("main",{className:"mx-auto grid max-w-[1066px] grid-cols-1 gap-[48px] px-5 pt-[44px] lg:grid-cols-[444px_476px] lg:gap-[162px] lg:px-0",children:[(0,n.jsxs)("section",{children:[(0,n.jsx)("h1",{className:"text-[24px] font-[600] tracking-[-0.03em] text-[#1A1A1B]",children:"Checkout"}),(0,n.jsx)("h2",{className:"mt-[24px] text-[16px] font-[600] text-[#1A1A1B]",children:"1. Log in or create an account"}),(0,n.jsxs)("p",{className:"mt-[20px] text-[14px] leading-[1.45] text-[#5D6061]",children:["A Stack account is required to access your purchased courses. Please verify that your email address is correct, as we'll use it to send your order confirmation. By signing up, you agree to our"," ",(0,n.jsx)("span",{className:"underline",children:"Terms of Use"})," and"," ",(0,n.jsx)("span",{className:"underline",children:"Privacy Policy"}),"."]}),(0,n.jsxs)("form",{onSubmit:tu,className:"mt-[18px]",children:[(0,n.jsxs)(eN,{children:[(0,n.jsx)(K,{}),(0,n.jsx)("input",{value:w,onChange:e=>j(e.target.value),className:"min-w-0 flex-1 bg-transparent outline-none placeholder:text-[#B2B6B8]",placeholder:"[email protected]",type:"email",autoComplete:"email"})]}),w&&!ta?(0,n.jsx)("p",{className:"mt-[8px] text-[12px] text-[#FB3748]",children:"Enter a valid email address."}):null,(0,n.jsxs)("div",{className:"my-[16px] flex items-center gap-[10px]",children:[(0,n.jsx)("span",{className:"h-px flex-1 bg-[#E1E4E7]"}),(0,n.jsx)("span",{className:"text-[11px] font-[500] text-[#B2B6B8]",children:"OR CONTINUE WITH"}),(0,n.jsx)("span",{className:"h-px flex-1 bg-[#E1E4E7]"})]}),(0,n.jsxs)("button",{type:"button",onClick:()=>{if(eK(null),"ready"!==e0||!e1)return void eK("Google sign-in is unavailable because the API URL is not configured.");(0,o.By)(),eY(!0);let e=encodeURIComponent("/cart"),t="".concat(e1,"/api/v1/user/google?redirect=").concat(e);try{window.location.href=t}catch(e){eY(!1),eK(e instanceof Error?e.message:"Unable to continue with Google right now.")}},disabled:eW||eJ||"ready"!==e0,className:"flex h-[40px] w-full items-center justify-center gap-[10px] rounded-[10px] border border-[#E1E4E7] bg-white text-[14px] font-[500] text-[#1A1A1B] transition hover:bg-[#F7F8F9] disabled:opacity-60",children:[(0,n.jsx)(Y,{}),eJ?"Redirecting to Google...":"Continue with Google"]}),(0,n.jsx)("button",{disabled:eW,className:"mt-[16px] h-[40px] w-full rounded-[9px] bg-[#222324] text-[14px] font-[500] text-white disabled:opacity-60",children:eW?"Please wait...":"Continue"})]}),eV?(0,n.jsx)("p",{className:"mt-3 text-[13px] text-[#FB3748]",children:eV}):null,(0,n.jsx)("div",{className:"mt-[20px] border-t border-[#E1E4E7] pt-[20px]",children:(0,n.jsxs)("div",{className:"flex items-center justify-between text-[16px] font-[600] text-[#1A1A1B]",children:[(0,n.jsx)("span",{children:"2. Billing address and Payment method"}),(0,n.jsx)(z,{})]})})]}),tv(!0)]})]}):"password"===u?(0,n.jsxs)(n.Fragment,{children:[ty(),(0,n.jsxs)("main",{className:"mx-auto grid max-w-[1066px] grid-cols-1 gap-[48px] px-5 pt-[44px] lg:grid-cols-[444px_476px] lg:gap-[162px] lg:px-0",children:[(0,n.jsxs)("section",{children:[(0,n.jsx)("h1",{className:"text-[24px] font-[600] tracking-[-0.03em] text-[#1A1A1B]",children:"Checkout"}),(0,n.jsx)("h2",{className:"mt-[24px] text-[16px] font-[600] text-[#1A1A1B]",children:"1. Log in or create an account"}),(0,n.jsx)("p",{className:"mt-[20px] text-[14px] leading-[1.45] text-[#5D6061]",children:"Enter your full name and set a password to keep your account secure and regain access."}),(0,n.jsxs)("form",{onSubmit:tm,className:"mt-[18px] space-y-[12px]",children:[(0,n.jsxs)("label",{className:"block text-[14px] font-[500] text-[#1A1A1B]",children:["Full Name*",(0,n.jsxs)(eN,{className:"mt-[6px]",children:[(0,n.jsx)(W,{}),(0,n.jsx)("input",{value:N,onChange:e=>B(e.target.value),className:"min-w-0 flex-1 bg-transparent outline-none",placeholder:"John Doe",autoComplete:"name"})]})]}),(0,n.jsxs)("label",{className:"block text-[14px] font-[500] text-[#1A1A1B]",children:["New Password*",(0,n.jsxs)(eN,{className:"mt-[6px]",children:[(0,n.jsx)(z,{muted:!0}
1),(0,n.jsx)("input",{value:S,onChange:e=>R(e.target.value),className:"min-w-0 flex-1 bg-transparent outline-none",type:eD?"text":"password",autoComplete:"new-password"}),(0,n.jsx)("button",{type:"button",onClick:()=>eG(e=>!e),"aria-label":"Show or hide password",children:(0,n.jsx)(J,{})})]})]}),(0,n.jsxs)("label",{className:"block text-[14px] font-[500] text-[#1A1A1B]",children:["Confirm Password*",(0,n.jsxs)(eN,{className:"mt-[6px]",children:[(0,n.jsx)(z,{muted:!0}),(0,n.jsx)("input",{value:ei,onChange:e=>es(e.target.value),className:"min-w-0 flex-1 bg-transparent outline-none",type:eZ?"text":"password",autoComplete:"new-password"}),(0,n.jsx)("button",{type:"button",onClick:()=>eH(e=>!e),"aria-label":"Show or hide confirm password",children:(0,n.jsx)(J,{})})]})]}),ei&&!tr?(0,n.jsx)("p",{className:"text-[12px] text-[#FB3748]",children:"Passwords do not match."}):null,(0,n.jsxs)("div",{className:"pt-[2px] text-[12px] text-[#5D6061]",children:[(0,n.jsx)("p",{children:"Password must have the following:"}),(0,n.jsx)("div",{className:"mt-[8px] space-y-[6px]",children:tn.map(e=>(0,n.jsxs)("p",{className:(0,T.cn)("flex items-center gap-[6px]",e.valid?"text-[#5D6061]":"text-[#7C8085]"),children:[e.valid?(0,n.jsx)($,{}):(0,n.jsx)("span",{className:"h-4 w-4 rounded-full border border-[#D4D8DA]"}),e.label]},e.id))})]}),(0,n.jsx)("button",{disabled:eW,className:"h-[40px] w-full rounded-[9px] bg-[#222324] text-[14px] font-[500] text-white disabled:opacity-60",children:eW?"Creating...":"Continue"})]}),eV?(0,n.jsx)("p",{className:"mt-3 text-[13px] text-[#FB3748]",children:eV}):null,(0,n.jsx)("div",{className:"mt-[20px] border-t border-[#E1E4E7] pt-[20px]",children:(0,n.jsxs)("div",{className:"flex items-center justify-between text-[16px] font-[600] text-[#1A1A1B]",children:[(0,n.jsx)("span",{children:"2. Billing address and Payment method"}),(0,n.jsx)(z,{})]})})]}),tv(!0)]})]}):"otp"===u?(0,n.jsxs)(n.Fragment,{children:[ty(),(0,n.jsxs)("main",{className:"mx-auto grid max-w-[1066px] grid-cols-1 gap-[48px] px-5 pt-[44px] lg:grid-cols-[444px_476px] lg:gap-[162px] lg:px-0",children:[(0,n.jsxs)("section",{children:[(0,n.jsx)("h1",{className:"text-[24px] font-[600] tracking-[-0.03em] text-[#1A1A1B]",children:"Checkout"}),(0,n.jsx)("h2",{className:"mt-[24px] text-[16px] font-[600] text-[#1A1A1B]",children:"1. Log in or create an account"}),(0,n.jsxs)("p",{className:"mt-[20px] text-[14px] leading-[1.45] text-[#5D6061]",children:["Please enter the 6-digit code we sent to ",w,"."]}),(0,n.jsx)("button",{type:"button",onClick:()=>ts("email"),className:"text-[14px] font-[600] text-[#1A1A1B]",children:"Change email"}),(0,n.jsxs)("form",{onSubmit:tx,className:"mt-[18px]",children:[(0,n.jsxs)(eN,{children:[(0,n.jsx)("input",{value:ec,maxLength:6,onChange:e=>eu(e.target.value.replace(/\D/g,"").slice(0,6)),className:"min-w-0 flex-1 bg-transparent outline-none placeholder:text-[#B2B6B8]",placeholder:"6-digit code",inputMode:"numeric"}),(0,n.jsx)(z,{muted:!0})]}),(0,n.jsx)("button",{disabled:eW,className:"mt-[16px] h-[40px] w-full rounded-[9px] bg-[#222324] text-[14px] font-[500] text-white disabled:opacity-60",children:eW?"Verifying...":"Proceed To Checkout"})]}),(0,n.jsxs)("p",{className:"mt-[18px] text-center text-[14px] text-[#5D6061]",children:["Didn't receive the code?"," ",eE>0?(0,n.jsxs)("span",{className:"text-[#7C8085]",children:["Resend in ",function(e){let t=Math.max(0,e);return"00:".concat(String(t).padStart(2,"0"))}(eE)]}):(0,n.jsx)("button",{type:"button",onClick:tc,className:"font-[500] text-[#1A1A1B] hover:underline",children:"Resend code"})]}),eV?(0,n.jsx)("p",{className:"mt-3 text-[13px] text-[#FB3748]",children:eV}):null,(0,n.jsx)("div",{className:"mt-[20px] border-t border-[#E1E4E7] pt-[20px]",children:(0,n.jsxs)("div",{className:"flex items-center justify-between text-[16px] font-[600] text-[#1A1A1B]",children:[(0,n.jsx)("span",{children:"2. Billing address and Payment method"}),(0,n.jsx)(z,{})]})})]}),tv(!0)]})]}):"payment"===u?(0,n.jsxs)(n.Fragment,{children:[ty(),(0,n.jsxs)("main",{className:"mx-auto grid max-w-[1066px] grid-cols-1 gap-[48px] px-5 pt-[44px] lg:grid-cols-[444px_476px] lg:gap-[162px] lg:px-0",children:[(0,n.jsxs)("section",{children:[(0,n.jsx)("h1",{className:"text-[24px] font-[600] tracking-[-0.03em] text-[#1A1A1B]",children:"Checkout"}),(0,n.jsx)("h2",{className:"mt-[24px] text-[16px] font-[600] text-[#1A1A1B]",children:"Billing address"}),(0,n.jsxs)("label",{className:"mt-[20px] block text-[14px] font-[500] text-[#1A1A1B]",children:["Country",(0,n.jsx)("div",{className:"mt-[6px]",children:(0,n.jsx)(eA,{value:ek,options:P,onChange:eS})})]}),(0,n.jsx)("p",{className:"mt-[18px] text-[14px] leading-[1.45] text-[#5D6061]",children:"Stack is required by law to collect applicable transaction taxes for purchases made in certain tax jurisdictions."}
1),(0,n.jsxs)("div",{className:"mt-[22px] border-t border-[#E1E4E7] pt-[22px]",children:[(0,n.jsx)("h2",{className:"text-[16px] font-[600] text-[#1A1A1B]",children:"Payment"}),(0,n.jsx)("p",{className:"mt-[6px] text-[14px] leading-[1.45] text-[#5D6061]",children:"You'll be securely redirected to Stripe to complete your payment. Your card details are never stored on this site."}),(0,n.jsxs)("div",{className:"mt-[18px] rounded-[14px] border border-[#E1E4E7] bg-[#FAFAFA] px-[16px] py-[14px]",children:[(0,n.jsx)("p",{className:"text-[14px] font-[500] text-[#1A1A1B]",children:"Secure Stripe checkout"}),(0,n.jsxs)("p",{className:"mt-[6px] text-[13px] leading-[1.5] text-[#5D6061]",children:["Click ",(0,n.jsx)("span",{className:"font-[600]",children:"Complete Checkout"})," to pay. After a successful payment your products unlock instantly."]})]})]}),eV?(0,n.jsx)("p",{className:"mt-3 text-[13px] text-[#FB3748]",children:eV}):null]}),tv(eW)]})]}):(0,n.jsxs)(n.Fragment,{children:[ty(),(0,n.jsx)("main",{className:"flex min-h-[calc(100vh-84px)] items-center justify-center pb-[80px]",children:(0,n.jsxs)("section",{className:"w-[360px] -translate-y-[4px] text-center",children:[(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(er,{})}),(0,n.jsx)("h1",{className:"mt-[24px] text-[20px] font-[600] tracking-[-0.03em] text-[#1A1A1B]",children:"Checkout complete"}),(0,n.jsxs)("p",{className:"mt-[10px] text-[16px] leading-[1.45] text-[#5D6061]",children:["You're enrolled successfully",(0,n.jsx)("br",{}),"Your products are now available inside your Stack workspace."]}),(0,n.jsx)("button",{onClick:()=>t.push("/student-area"),className:"mt-[20px] h-[40px] w-full rounded-[9px] bg-[#222324] text-[14px] font-[500] text-white",children:"Go to Student Area"}),(0,n.jsx)("button",{onClick:()=>{e5.siteUrl?window.location.href=e5.siteUrl:t.push("/")},className:"mt-[8px] h-[40px] w-full rounded-[9px] border border-[#E1E4E7] bg-white text-[14px] font-[500] text-[#5D6061]",children:"Continue Exploring"})]})})]})})}},59364:(e,t,a)=>{var n;a.d(t,{ad:()=>i,g0:()=>r,k1:()=>l});let i=[{name:"Afghanistan",iso2:"AF",dialCode:"+93"},{name:"Albania",iso2:"AL",dialCode:"+355"},{name:"Algeria",iso2:"DZ",dialCode:"+213"},{name:"Andorra",iso2:"AD",dialCode:"+376"},{name:"Angola",iso2:"AO",dialCode:"+244"},{name:"Antigua and Barbuda",iso2:"AG",dialCode:"+1268"},{name:"Argentina",iso2:"AR",dialCode:"+54"},{name:"Armenia",iso2:"AM",dialCode:"+374"},{name:"Aruba",iso2:"AW",dialCode:"+297"},{name:"Australia",iso2:"AU",dialCode:"+61"},{name:"Austria",iso2:"AT",dialCode:"+43"},{name:"Azerbaijan",iso2:"AZ",dialCode:"+994"},{name:"Bahamas",iso2:"BS",dialCode:"+1242"},{name:"Bahrain",iso2:"BH",dialCode:"+973"},{name:"Bangladesh",iso2:"BD",dialCode:"+880"},{name:"Barbados",iso2:"BB",dialCode:"+1246"},{name:"Belarus",iso2:"BY",dialCode:"+375"},{name:"Belgium",iso2:"BE",dialCode:"+32"},{name:"Belize",iso2:"BZ",dialCode:"+501"},{name:"Benin",iso2:"BJ",dialCode:"+229"},{name:"Bhutan",iso2:"BT",dialCode:"+975"},{name:"Bolivia",iso2:"BO",dialCode:"+591"},{name:"Bosnia and Herzegovina",iso2:"BA",dialCode:"+387"},{name:"Botswana",iso2:"BW",dialCode:"+267"},{name:"Brazil",iso2:"BR",dialCode:"+55"},{name:"British Indian Ocean Territory",iso2:"IO",dialCode:"+246"},{name:"Brunei",iso2:"BN",dialCode:"+673"},{name:"Bulgaria",iso2:"BG",dialCode:"+359"},{name:"Burkina Faso",iso2:"BF",dialCode:"+226"},{name:"Burundi",iso2:"BI",dialCode:"+257"},{name:"Cambodia",iso2:"KH",dialCode:"+855"},{name:"Cameroon",iso2:"CM",dialCode:"+237"},{name:"Canada",iso2:"CA",dialCode:"+1"},{name:"Cape Verde",iso2:"CV",dialCode:"+238"},{name:"Caribbean Netherlands",iso2:"BQ",dialCode:"+599"},{name:"Central African Republic",iso2:"CF",dialCode:"+236"},{name:"Chad",iso2:"TD",dialCode:"+235"},{name:"Chile",iso2:"CL",dialCode:"+56"},{name:"China",iso2:"CN",dialCode:"+86"},{name:"Colombia",iso2:"CO",dialCode:"+57"},{name:"Comoros",iso2:"KM",dialCode:"+269"},{name:"Congo",iso2:"CD",dialCode:"+243"},{name:"Congo",iso2:"CG",dialCode:"+242"},{name:"Costa Rica",iso2:"CR",dialCode:"+506"},{name:"C\xf4te d’Ivoire",iso2:"CI",dialCode:"+225"},{name:"Croatia",iso2:"HR",dialCode:"+385"},{name:"Cuba",iso2:"CU",dialCode:"+53"},{name:"Cura\xe7ao",iso2:"CW",dialCode:"+599"},{name:"Cyprus",iso2:"CY",dialCode:"+357"},{name:"Czech Republic",iso2:"CZ",dialCode:"+420"},{name:"Denmark",iso2:"DK",dialCode:"+45"},{name:"Djibouti",iso2:"DJ",dialCode:"+253"}
1,{name:"Dominica",iso2:"DM",dialCode:"+1767"},{name:"Dominican Republic",iso2:"DO",dialCode:"+1"},{name:"Ecuador",iso2:"EC",dialCode:"+593"},{name:"Egypt",iso2:"EG",dialCode:"+20"},{name:"El Salvador",iso2:"SV",dialCode:"+503"},{name:"Equatorial Guinea",iso2:"GQ",dialCode:"+240"},{name:"Eritrea",iso2:"ER",dialCode:"+291"},{name:"Estonia",iso2:"EE",dialCode:"+372"},{name:"Ethiopia",iso2:"ET",dialCode:"+251"},{name:"Fiji",iso2:"FJ",dialCode:"+679"},{name:"Finland",iso2:"FI",dialCode:"+358"},{name:"France",iso2:"FR",dialCode:"+33"},{name:"French Guiana",iso2:"GF",dialCode:"+594"},{name:"French Polynesia",iso2:"PF",dialCode:"+689"},{name:"Gabon",iso2:"GA",dialCode:"+241"},{name:"Gambia",iso2:"GM",dialCode:"+220"},{name:"Georgia",iso2:"GE",dialCode:"+995"},{name:"Germany",iso2:"DE",dialCode:"+49"},{name:"Ghana",iso2:"GH",dialCode:"+233"},{name:"Greece",iso2:"GR",dialCode:"+30"},{name:"Grenada",iso2:"GD",dialCode:"+1473"},{name:"Guadeloupe",iso2:"GP",dialCode:"+590"},{name:"Guam",iso2:"GU",dialCode:"+1671"},{name:"Guatemala",iso2:"GT",dialCode:"+502"},{name:"Guinea",iso2:"GN",dialCode:"+224"},{name:"Guinea-Bissau",iso2:"GW",dialCode:"+245"},{name:"Guyana",iso2:"GY",dialCode:"+592"},{name:"Haiti",iso2:"HT",dialCode:"+509"},{name:"Honduras",iso2:"HN",dialCode:"+504"},{name:"Hong Kong",iso2:"HK",dialCode:"+852"},{name:"Hungary",iso2:"HU",dialCode:"+36"},{name:"Iceland",iso2:"IS",dialCode:"+354"},{name:"India",iso2:"IN",dialCode:"+91"},{name:"Indonesia",iso2:"ID",dialCode:"+62"},{name:"Iran",iso2:"IR",dialCode:"+98"},{name:"Iraq",iso2:"IQ",dialCode:"+964"},{name:"Ireland",iso2:"IE",dialCode:"+353"},{name:"Israel",iso2:"IL",dialCode:"+972"},{name:"Italy",iso2:"IT",dialCode:"+39"},{name:"Jamaica",iso2:"JM",dialCode:"+1876"},{name:"Japan",iso2:"JP",dialCode:"+81"},{name:"Jordan",iso2:"JO",dialCode:"+962"},{name:"Kazakhstan",iso2:"KZ",dialCode:"+7"},{name:"Kenya",iso2:"KE",dialCode:"+254"},{name:"Kiribati",iso2:"KI",dialCode:"+686"},{name:"Kosovo",iso2:"XK",dialCode:"+383"},{name:"Kuwait",iso2:"KW",dialCode:"+965"},{name:"Kyrgyzstan",iso2:"KG",dialCode:"+996"},{name:"Laos",iso2:"LA",dialCode:"+856"},{name:"Latvia",iso2:"LV",dialCode:"+371"},{name:"Lebanon",iso2:"LB",dialCode:"+961"},{name:"Lesotho",iso2:"LS",dialCode:"+266"},{name:"Liberia",iso2:"LR",dialCode:"+231"},{name:"Libya",iso2:"LY",dialCode:"+218"},{name:"Liechtenstein",iso2:"LI",dialCode:"+423"},{name:"Lithuania",iso2:"LT",dialCode:"+370"},{name:"Luxembourg",iso2:"LU",dialCode:"+352"},{name:"Macau",iso2:"MO",dialCode:"+853"},{name:"Macedonia",iso2:"MK",dialCode:"+389"},{name:"Madagascar",iso2:"MG",dialCode:"+261"},{name:"Malawi",iso2:"MW",dialCode:"+265"},{name:"Malaysia",iso2:"MY",dialCode:"+60"},{name:"Maldives",iso2:"MV",dialCode:"+960"},{name:"Mali",iso2:"ML",dialCode:"+223"},{name:"Malta",iso2:"MT",dialCode:"+356"},{name:"Marshall Islands",iso2:"MH",dialCode:"+692"},{name:"Martinique",iso2:"MQ",dialCode:"+596"},{name:"Mauritania",iso2:"MR",dialCode:"+222"},{name:"Mauritius",iso2:"MU",dialCode:"+230"},{name:"Mexico",iso2:"MX",dialCode:"+52"},{name:"Micronesia",iso2:"FM",dialCode:"+691"},{name:"Moldova",iso2:"MD",dialCode:"+373"},{name:"Monaco",iso2:"MC",dialCode:"+377"},{name:"Mongolia",iso2:"MN",dialCode:"+976"},{name:"Montenegro",iso2:"ME",dialCode:"+382"},{name:"Morocco",iso2:"MA",dialCode:"+212"},{name:"Mozambique",iso2:"MZ",dialCode:"+258"},{name:"Myanmar",iso2:"MM",dialCode:"+95"},{name:"Namibia",iso2:"NA",dialCode:"+264"},{name:"Nauru",iso2:"NR",dialCode:"+674"},{name:"Nepal",iso2:"NP",dialCode:"+977"},{name:"Netherlands",iso2:"NL",dialCode:"+31"},{name:"New Caledonia",iso2:"NC",dialCode:"+687"},{name:"New Zealand",iso2:"NZ",dialCode:"+64"},{name:"Nicaragua",iso2:"NI",dialCode:"+505"},{name:"Niger",iso2:"NE",dialCode:"+227"},{name:"Nigeria",iso2:"NG",dialCode:"+234"},{name:"North Korea",iso2:"KP",dialCode:"+850"},{name:"Norway",iso2:"NO",dialCode:"+47"},{name:"Oman",iso2:"OM",dialCode:"+968"},{name:"Pakistan",iso2:"PK",dialCode:"+92"},{name:"Palau",iso2:"PW",dialCode:"+680"},{name:"Palestine",iso2:"PS",dialCode:"+970"},{name:"Panama",iso2:"PA",dialCode:"+507"},{name:"Papua New Guinea",iso2:"PG",dialCode:"+675"},{name:"Paraguay",iso2:"PY",dialCode:"+595"},{name:"Peru",iso2:"PE",dialCode:"+51"},{name:"Philippines",iso2:"PH",dialCode:"+63"},{name:"Poland",iso2:"PL",dialCode:"+48"},{name:"Portugal",iso2:"PT",dialCode:"+351"},{name:"Puerto Rico",iso2:"PR",dialCode:"+1"},{name:"Qatar",iso2:"QA",dialCode:"+974"},{name:"R\xe9union",iso2:"RE",dialCode:"+262"},{name:"Romania",iso2:"RO",dialCode:"+40"},{name:"Russia",iso2:"RU",dialCode:"+7"},{name:"Rwanda",iso2:"RW",dialCode:"+250"},{name:"Saint Kitts and Nevis",iso2:"KN",dialCode:"+1869"}
1,{name:"Saint Lucia",iso2:"LC",dialCode:"+1758"},{name:"Saint Vincent and the Grenadines",iso2:"VC",dialCode:"+1784"},{name:"Samoa",iso2:"WS",dialCode:"+685"},{name:"San Marino",iso2:"SM",dialCode:"+378"},{name:"S\xe3o Tom\xe9 and Pr\xedncipe",iso2:"ST",dialCode:"+239"},{name:"Saudi Arabia",iso2:"SA",dialCode:"+966"},{name:"Senegal",iso2:"SN",dialCode:"+221"},{name:"Serbia",iso2:"RS",dialCode:"+381"},{name:"Seychelles",iso2:"SC",dialCode:"+248"},{name:"Sierra Leone",iso2:"SL",dialCode:"+232"},{name:"Singapore",iso2:"SG",dialCode:"+65"},{name:"Slovakia",iso2:"SK",dialCode:"+421"},{name:"Slovenia",iso2:"SI",dialCode:"+386"},{name:"Solomon Islands",iso2:"SB",dialCode:"+677"},{name:"Somalia",iso2:"SO",dialCode:"+252"},{name:"South Africa",iso2:"ZA",dialCode:"+27"},{name:"South Korea",iso2:"KR",dialCode:"+82"},{name:"South Sudan",iso2:"SS",dialCode:"+211"},{name:"Spain",iso2:"ES",dialCode:"+34"},{name:"Sri Lanka",iso2:"LK",dialCode:"+94"},{name:"Sudan",iso2:"SD",dialCode:"+249"},{name:"Suriname",iso2:"SR",dialCode:"+597"},{name:"Swaziland",iso2:"SZ",dialCode:"+268"},{name:"Sweden",iso2:"SE",dialCode:"+46"},{name:"Switzerland",iso2:"CH",dialCode:"+41"},{name:"Syria",iso2:"SY",dialCode:"+963"},{name:"Taiwan",iso2:"TW",dialCode:"+886"},{name:"Tajikistan",iso2:"TJ",dialCode:"+992"},{name:"Tanzania",iso2:"TZ",dialCode:"+255"},{name:"Thailand",iso2:"TH",dialCode:"+66"},{name:"Timor-Leste",iso2:"TL",dialCode:"+670"},{name:"Togo",iso2:"TG",dialCode:"+228"},{name:"Tonga",iso2:"TO",dialCode:"+676"},{name:"Trinidad and Tobago",iso2:"TT",dialCode:"+1868"},{name:"Tunisia",iso2:"TN",dialCode:"+216"},{name:"Turkey",iso2:"TR",dialCode:"+90"},{name:"Turkmenistan",iso2:"TM",dialCode:"+993"},{name:"Tuvalu",iso2:"TV",dialCode:"+688"},{name:"Uganda",iso2:"UG",dialCode:"+256"},{name:"Ukraine",iso2:"UA",dialCode:"+380"},{name:"United Arab Emirates",iso2:"AE",dialCode:"+971"},{name:"United Kingdom",iso2:"GB",dialCode:"+44"},{name:"United States",iso2:"US",dialCode:"+1"},{name:"Uruguay",iso2:"UY",dialCode:"+598"},{name:"Uzbekistan",iso2:"UZ",dialCode:"+998"},{name:"Vanuatu",iso2:"VU",dialCode:"+678"},{name:"Vatican City",iso2:"VA",dialCode:"+39"},{name:"Venezuela",iso2:"VE",dialCode:"+58"},{name:"Vietnam",iso2:"VN",dialCode:"+84"},{name:"Yemen",iso2:"YE",dialCode:"+967"},{name:"Zambia",iso2:"ZM",dialCode:"+260"},{name:"Zimbabwe",iso2:"ZW",dialCode:"+263"}],r=e=>"https://flagcdn.com/24x18/".concat(e.toLowerCase(),".png"),l=null!=(n=i.find(e=>"US"===e.iso2))?n:i[0]}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.