cloudcommerce 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/test-apps.yml +3 -3
- package/CHANGELOG.md +12 -0
- package/action.yml +6 -6
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/package.json +2 -2
- package/packages/api/package.json +1 -1
- package/packages/apps/affiliate-program/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +1 -1
- package/packages/apps/flash-courier/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/galaxpay/package.json +1 -1
- package/packages/apps/google-analytics/package.json +1 -1
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mandae/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +1 -1
- package/packages/apps/pagarme-v5/package.json +1 -1
- package/packages/apps/paghiper/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/ci/bunny-config-base.sh +4 -2
- package/packages/cli/config/firestore.rules +3 -0
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/eslint/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/lib/cron-ssr-save-views.js +11 -5
- package/packages/ssr/lib/lib/cron-ssr-save-views.js.map +1 -1
- package/packages/ssr/package.json +3 -3
- package/packages/ssr/src/lib/cron-ssr-save-views.ts +11 -8
- package/packages/storefront/dist/client/_astro/AccountPage.3-eqV6OR.js +1 -0
- package/packages/storefront/dist/client/_astro/CartSidebar.-Gy6eqIy.js +1 -0
- package/packages/storefront/dist/client/_astro/HeroSlider.ju9TsLrJ.js +1 -0
- package/packages/storefront/dist/client/_astro/PitchBar.yqD9ycx5.js +1 -0
- package/packages/storefront/dist/client/_astro/Prices.xI1rdM1e.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductDetails.ATGXfGhG.js +7 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.b77WjhZZ.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.qbTNzuvn.js +1 -0
- package/packages/storefront/dist/client/_astro/QuantitySelector.v7L8EYOR.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchModal.WzDMBjqi.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchShowcase.9gIA4Cq0.js +1 -0
- package/packages/storefront/dist/client/_astro/ShopHeader.Ee4OJr3q.js +7 -0
- package/packages/storefront/dist/client/_astro/{_plugin-vue_export-helper.SO-0jCqa.js → _plugin-vue_export-helper.xATGHWd9.js} +2 -2
- package/packages/storefront/dist/client/_astro/{_slug_.4W7qhV-L.css → _slug_.WkuZ8tvp.css} +1 -1
- package/packages/storefront/dist/client/_astro/afetch.OifQZgwR.js +1 -0
- package/packages/storefront/dist/client/_astro/client.YJ00ta5M.js +1 -0
- package/packages/storefront/dist/client/_astro/customer-session.dSYHWdP4.js +7 -0
- package/packages/storefront/dist/client/_astro/format-money.1_HtF5S2.js +1 -0
- package/packages/storefront/dist/client/_astro/grid-title.pK2Nn3i-.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.d2SGwVMl.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.x1b7VHef.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.xTPkED8g.js +1 -0
- package/packages/storefront/dist/client/_astro/i18n.zhlBzJt8.js +1 -0
- package/packages/storefront/dist/client/_astro/img.AnjeGdy_.js +1 -0
- package/packages/storefront/dist/client/_astro/index.KfrHdfOH.js +1 -0
- package/packages/storefront/dist/client/_astro/index.ShNlAyu1.js +1 -0
- package/packages/storefront/dist/client/_astro/modules-info.HP6478mG.js +1 -0
- package/packages/storefront/dist/client/_astro/name.VA3MEpe0.js +1 -0
- package/packages/storefront/dist/client/_astro/server-data.4C60Esyt.js +1 -0
- package/packages/storefront/dist/client/_astro/sf-utils.c42cbZ9W.js +13 -0
- package/packages/storefront/dist/client/_astro/shopping-cart.v-dB3kHB.js +1 -0
- package/packages/storefront/dist/client/_astro/use-analytics._ef6TM4P.js +1 -0
- package/packages/storefront/dist/client/_astro/use-product-card.nNtSJVtB.js +1 -0
- package/packages/storefront/dist/client/_astro/use-text-value.0OP9HCfP.js +4 -0
- package/packages/storefront/dist/client/{~fallback/index.html → ~fallback.html} +5 -5
- package/packages/storefront/dist/client/{index.html → ~index.html} +7 -7
- package/packages/storefront/dist/server/_noop-middleware.mjs +3 -0
- package/packages/storefront/dist/server/chunks/{CartSidebar_yYIzwp_R.mjs → CartSidebar_blvgfFa-.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{SearchModal_GvRUZ6ce.mjs → SearchModal_Sktaq643.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/_.._yTK2xBRC.mjs +5 -0
- package/packages/storefront/dist/server/chunks/_page__9PfWVh79.mjs +5 -0
- package/packages/storefront/dist/server/chunks/account_R4bpY7O1.mjs +5 -0
- package/packages/storefront/dist/server/chunks/astro/{assets-service_yXRChsFH.mjs → assets-service_oQ4-9MNg.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{astro_F4pl3toV.mjs → astro_ECsNQeA2.mjs} +18 -14
- package/packages/storefront/dist/server/chunks/index__PeYBuja.mjs +5 -0
- package/packages/storefront/dist/server/chunks/node_njrZIjT6.mjs +5 -0
- package/packages/storefront/dist/server/chunks/pages/{__z8Igc_-f.mjs → __XOsz50la.mjs} +994 -922
- package/packages/storefront/dist/server/chunks/pages/{_page__-V1Q-Ymk.mjs → _page__cIw_KTpN.mjs} +14 -12
- package/packages/storefront/dist/server/chunks/pages/{account_frSUn7gD.mjs → account_l-FHyDJd.mjs} +3 -2
- package/packages/storefront/dist/server/chunks/pages/{index_QqJiJpFy.mjs → index_KP7Gn0ld.mjs} +3 -2
- package/packages/storefront/dist/server/chunks/pages/{node_FoDIj_f7.mjs → node_FoLtkdH1.mjs} +4 -4
- package/packages/storefront/dist/server/chunks/pages/{~fallback_t0lNhRm9.mjs → ~fallback_KPp6Nh_p.mjs} +3 -2
- package/packages/storefront/dist/server/chunks/~fallback_p7P7NIL5.mjs +5 -0
- package/packages/storefront/dist/server/entry.mjs +289 -166
- package/packages/storefront/dist/server/manifest_E6KbHQrT.mjs +202 -0
- package/packages/storefront/dist/server/renderers.mjs +1 -1
- package/packages/storefront/dist/server/static-builds.csv +34 -34
- package/packages/storefront/package.json +3 -3
- package/packages/storefront/src/lib/scripts/git-cms-auth.ts +3 -0
- package/packages/storefront/src/lib/scripts/push-analytics-events.ts +6 -1
- package/packages/storefront/src/lib/scripts/sso-ecom.ts +0 -0
- package/packages/storefront/src/lib/ssr-context.ts +3 -1
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/AccountPage.HcKW6HTE.js +0 -1
- package/packages/storefront/dist/client/_astro/CartSidebar.osvr0MUo.js +0 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.I5mC8JdX.js +0 -1
- package/packages/storefront/dist/client/_astro/PitchBar.xC4J7MDy.js +0 -1
- package/packages/storefront/dist/client/_astro/Prices.Jt09rVKv.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductDetails.oouZY3cL.js +0 -7
- package/packages/storefront/dist/client/_astro/ProductShelf.dYlXuNId.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.vGE0E3Qf.js +0 -1
- package/packages/storefront/dist/client/_astro/QuantitySelector.OL4MN-C_.js +0 -1
- package/packages/storefront/dist/client/_astro/SearchModal.d8lbvLay.js +0 -1
- package/packages/storefront/dist/client/_astro/SearchShowcase.ynowXX4j.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.l4KJGvUd.js +0 -7
- package/packages/storefront/dist/client/_astro/afetch.5c8VmT0-.js +0 -1
- package/packages/storefront/dist/client/_astro/client.ZhEmw4hZ.js +0 -1
- package/packages/storefront/dist/client/_astro/customer-session.TRPGDX3c.js +0 -7
- package/packages/storefront/dist/client/_astro/format-money.iK5LGydz.js +0 -1
- package/packages/storefront/dist/client/_astro/grid-title.vGKBy72g.js +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.8pwSenCN.js +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.SLwcAI01.js +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.gqV7f6f3.js +0 -1
- package/packages/storefront/dist/client/_astro/i18n.Lxnz1oF-.js +0 -1
- package/packages/storefront/dist/client/_astro/img.WnsidxCx.js +0 -1
- package/packages/storefront/dist/client/_astro/index.R7A-Pg5V.js +0 -1
- package/packages/storefront/dist/client/_astro/index.q6KIyKlJ.js +0 -1
- package/packages/storefront/dist/client/_astro/modules-info.WWsUqEPZ.js +0 -1
- package/packages/storefront/dist/client/_astro/name.urFqJ5yn.js +0 -1
- package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.XTSAdOlw.js +0 -13
- package/packages/storefront/dist/client/_astro/sf-utils.luvTU5uS.js +0 -1
- package/packages/storefront/dist/client/_astro/shopping-cart.ATTXCPd0.js +0 -1
- package/packages/storefront/dist/client/_astro/use-analytics.WpkjGsWi.js +0 -1
- package/packages/storefront/dist/client/_astro/use-product-card.BhUXhJIp.js +0 -1
- package/packages/storefront/dist/client/_astro/use-text-value.XE_A2nDM.js +0 -4
- package/packages/storefront/dist/client/app/account/index.html +0 -58
- package/packages/storefront/dist/client/app/index.html +0 -98
- package/packages/storefront/dist/client/blog/1/index.html +0 -86
- package/packages/storefront/dist/client/macbook-apple-pro-15.4-intel-core-i7-2.6ghz-ram-16gb-ssd-512gb-mr972ll/a-prata/index.html +0 -93
- package/packages/storefront/dist/client/monitores-gamer/index.html +0 -95
- package/packages/storefront/dist/client/mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na/index.html +0 -93
- package/packages/storefront/dist/client/p/contato/index.html +0 -90
- package/packages/storefront/dist/client/p/terms/index.html +0 -101
- package/packages/storefront/dist/client/posts/3/index.html +0 -101
- package/packages/storefront/dist/client/posts/4/index.html +0 -101
- package/packages/storefront/dist/server/_empty-middleware.mjs +0 -3
- package/packages/storefront/dist/server/chunks/_.._Lq3r7hpv.mjs +0 -6
- package/packages/storefront/dist/server/chunks/_page__LqbeNfr1.mjs +0 -6
- package/packages/storefront/dist/server/chunks/account_4n4rpirV.mjs +0 -6
- package/packages/storefront/dist/server/chunks/index_SwXtE1IM.mjs +0 -6
- package/packages/storefront/dist/server/chunks/node_Nzz44v5l.mjs +0 -6
- package/packages/storefront/dist/server/chunks/~fallback_EWqi0UyU.mjs +0 -6
- package/packages/storefront/dist/server/manifest_ZHJUD8_m.mjs +0 -196
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const p=e=>Object.values(e).filter(t=>t).length,g=(e=globalThis.$storefront.settings.modules)=>{const t={};if(e){const o=e.list_payments;if(o){const s=o.discount_option;s&&p(s)&&(t.list_payments={discount_option:s});const i=o.installments_option;i?.max_number&&(t.list_payments||(t.list_payments={}),t.list_payments.installments_option=i);const n=o.loyalty_points_programs||{};if(!Object.keys(n).length){const a={...o.loyalty_points_program};if(a?.id&&a.ratio){const{id:c}=a;delete a.id,n[c]=a}}Object.keys(n).length&&(t.list_payments||(t.list_payments={}),t.list_payments.loyalty_points_programs=n)}const r=e.calculate_shipping?.free_shipping_from_value;typeof r=="number"&&(t.calculate_shipping={free_shipping_from_value:r})}return t},y=new Promise(e=>{window.$storefront.modulesInfoPreset=g(),e(window.$storefront.modulesInfoPreset)});let f={};{const e="ecomUtm",t=localStorage.getItem(e),o=Date.now();try{const s=t&&JSON.parse(t)||{};new Date(s.at+1e3*60*60*24*7).getTime()>=o&&(f=s.utm||{})}catch{f={}}let l=!1;const r=new URLSearchParams(window.location.search);["source","medium","campaign","term","content"].forEach(s=>{const i=r.get(`utm_${s}`);i&&(f[s]=i,l=!0)}),l&&localStorage.setItem(e,JSON.stringify({at:o,utm:f}))}const u=f,_=(e,t,o=1e4)=>{let l,r;o&&(l=new AbortController,r=setTimeout(()=>{l.abort()},o));let s;if(t?.body&&(typeof t.body=="object"?(s=JSON.stringify(t.body),t.headers={...t.headers,"Content-Type":"application/json","Content-Length":s.length.toString()}):s=t.body),t?.params&&typeof e=="string"){let n="";Object.keys(t.params).forEach(a=>{const c=t.params[a];if(Array.isArray(c)){c.forEach(m=>{n+=`&${a}=${m}`});return}n+=`&${a}=${c}`}),n&&(e.includes("?")?e+=n:e+=`?${n.slice(1)}`)}const i=fetch(e,{...t,body:s,signal:l?.signal});return i.finally(()=>{r&&clearTimeout(r)}),i};export{_ as a,y as l,u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as F,T as ne,w as ae,c as oe,d as se}from"./_plugin-vue_export-helper.xATGHWd9.js";import{d as C,c,O as y,a0 as A,W as k,$ as b,a1 as Q,P as R,a3 as Z,a4 as ee,S,U as v,a7 as ie,a6 as le,a as E,w as z,aa as V,I as ue,F as ce,ai as de,a8 as fe,R as J,m as $,aj as me}from"./sf-utils.c42cbZ9W.js";import{g as ve}from"./img.AnjeGdy_.js";import{u as pe}from"./index.KfrHdfOH.js";import{g as ge}from"./img-sizes.gxAI9JNh.js";import{i as he}from"./i18n.zhlBzJt8.js";import{f as ye}from"./format-money.1_HtF5S2.js";import{a as _e,b as we}from"./index.ShNlAyu1.js";import"./price.Easct8WC.js";const Se=C({__name:"Fade",props:{speed:{default:"default"},slide:{},isFloating:{type:Boolean,default:!1},isLeaveTo:{type:Boolean,default:!0},isEnterFrom:{type:Boolean,default:!0}},setup(r,{expose:a}){a();const e=r,t=c(()=>e.speed==="default"?"var(--transition, .2s linear)":`var(--transition-${e.speed}, .4s linear)`),i=c(()=>{switch(e.slide){case"down":return"translate3d(0, -100%, 0)";case"left":return"translate3d(-100%, 0, 0)";case"right":return"translate3d(100%, 0, 0)";case"up":return"translate3d(0, 100%, 0)";default:return"none"}}),o=c(()=>i.value!=="none"?.1:0),l=c(()=>e.isEnterFrom?o.value:1),g=c(()=>e.isLeaveTo?o.value:1),P=c(()=>e.isEnterFrom?i.value:"none"),f=c(()=>e.isLeaveTo?i.value:"none"),u=c(()=>e.slide==="down"||e.slide==="up"),_=c(()=>e.isFloating?null:u.value?0:"auto"),T=c(()=>e.isFloating?null:e.slide&&!u.value?0:"auto"),m=c(()=>e.isEnterFrom?_.value:"auto"),x=c(()=>e.isEnterFrom?T.value:"auto"),w=c(()=>{let n="opacity";return i.value!=="none"&&(n+=", transform"),_.value===0&&(n+=", height"),T.value===0&&(n+=", width"),n}),p={props:e,duration:t,transform:i,opacity:o,enterFromOpacity:l,leaveToOpacity:g,enterFromTransform:P,leaveToTransform:f,isSlideY:u,height:_,width:T,enterFromHeight:m,enterFromWidth:x,willChange:w,setInitialStyles:n=>{n.style.setProperty("--fade-will-change",w.value),n.style.setProperty("--fade-duration",t.value),n.style.setProperty("--fade-enter-opacity",String(l.value)),n.style.setProperty("--fade-enter-transform",String(P.value)),n.style.setProperty("--fade-enter-height",String(m.value)),n.style.setProperty("--fade-enter-width",String(x.value)),n.style.setProperty("--fade-leave-opacity",String(g.value)),n.style.setProperty("--fade-leave-transform",String(f.value))},onEnter:n=>{if(e.slide&&!e.isFloating&&e.isEnterFrom){u.value?(n.style.width=getComputedStyle(n).width,n.style.height="auto"):(n.style.width="auto",n.style.height=getComputedStyle(n).height),n.style.position="absolute",n.style.visibility="hidden";const{width:h,height:N}=getComputedStyle(n);n.style.width=u.value?"":"0",n.style.height=u.value?"0":"",n.style.position="",n.style.visibility="",getComputedStyle(n)[u.value?"height":"width"],requestAnimationFrame(()=>{u.value?n.style.height=N:n.style.width=h})}},onAfterEnter:n=>{e.slide&&!e.isFloating&&e.isEnterFrom&&(n.style[u.value?"height":"width"]="")},onLeave:n=>{if(e.slide&&!e.isFloating&&e.isLeaveTo){u.value?n.style.height=getComputedStyle(n).height:n.style.width=getComputedStyle(n).width;const h=u.value?"height":"width";getComputedStyle(n)[h],requestAnimationFrame(()=>{n.style[h]="0"})}}};return Object.defineProperty(p,"__isScriptSetup",{enumerable:!1,value:!0}),p}});function xe(r,a,e,t,i,o){return y(),A(ne,{name:"sf-fade",onBeforeEnter:t.setInitialStyles,onEnter:t.onEnter,onBeforeLeave:t.setInitialStyles,onAfterEnter:t.onAfterEnter,onLeave:t.onLeave},{default:k(()=>[b(r.$slots,"default")]),_:3},8,["onBeforeEnter","onEnter","onBeforeLeave","onAfterEnter","onLeave"])}const be=F(Se,[["render",xe]]),Ce=C({__name:"ALink",props:{href:{},target:{}},setup(r,{expose:a}){a();const e=r,t=c(()=>{if(e.href){if(e.target)return e.target;if(e.href.startsWith("http")){const o=globalThis.$storefront.settings.domain||window.location.host;return e.href.startsWith(`https://${o}`)?void 0:"_blank"}}}),i={props:e,linkTarget:t};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}});function Pe(r,a,e,t,i,o){return y(),A(Q(e.href?"a":"span"),{href:e.href,target:t.linkTarget,rel:t.linkTarget==="_blank"?"noopener":void 0},{default:k(()=>[b(r.$slots,"default")]),_:3},8,["href","target","rel"])}const Te=F(Ce,[["render",Pe]]),Le=C({__name:"AImg",props:{picture:{},loading:{default:"lazy"},decoding:{},alt:{},preferredSize:{}},setup(r,{expose:a}){a();const e=r,t=c(()=>e.picture.url?e.picture:ve(e.picture,void 0,e.preferredSize)||{}),i=c(()=>ge(t.value)),o=c(()=>({src:t.value.url,alt:t.value.alt||e.alt,width:i.value.width||void 0,height:i.value.height||void 0,loading:e.loading,decoding:e.decoding||(i.value.height?"async":void 0)})),l={props:e,image:t,dimensions:i,attrs:o};return Object.defineProperty(l,"__isScriptSetup",{enumerable:!1,value:!0}),l}});function Ee(r,a,e,t,i,o){return y(),R("img",Z(ee(t.attrs)),null,16)}const Fe=F(Le,[["render",Ee]]),q="bg-gray-200 rounded-md dark:bg-gray-700",Be=C({__name:"Skeleton",props:{isBold:{type:Boolean},isLarge:{type:Boolean}},setup(r,{expose:a}){a();const e=r,t=c(()=>`${q} ${e.isBold?"h-8 mb-6":"h-2.5 mb-4"}`),i=c(()=>`${q} ${e.isBold?"h-5 mb-4":"h-2 mb-2.5"}`),o={props:e,rowClassName:q,firstRowClassName:t,nextRowsClassName:i};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}}),ze=S("span",{class:"sr-only"},"Loading...",-1);function Ae(r,a,e,t,i,o){return y(),R("div",{role:"status",class:v(["animate-pulse",e.isLarge?"max-w-4xl":"max-w-sm"])},[S("div",{class:v([t.firstRowClassName,e.isLarge?"w-96":"w-48"])},null,2),S("div",{class:v([t.nextRowsClassName,e.isLarge?"max-w-[680px]":"max-w-[340px]"])},null,2),S("div",{class:v(t.nextRowsClassName)},null,2),S("div",{class:v([t.nextRowsClassName,e.isLarge?"max-w-[660px]":"max-w-[330px]"])},null,2),S("div",{class:v([t.nextRowsClassName,e.isLarge?"max-w-[600px]":"max-w-[300px]"])},null,2),S("div",{class:v([t.nextRowsClassName,e.isLarge?"max-w-[720px]":"max-w-[360px]"])},null,2),ze],2)}const ke=F(Be,[["render",Ae]]),Ie=(r,a=1)=>Number.isInteger(r)?`${r}%`:`${r.toFixed(a)}%`,Ne=r=>{r.use({install:(a,e)=>{a.config.globalProperties.$t=(o,l)=>he(o,l||e?.lang),a.config.globalProperties.$money=ye,a.config.globalProperties.$percentage=Ie;const{settings:t,apiContext:i}=globalThis.$storefront||{};a.config.globalProperties.$settings=t,a.config.globalProperties.$apiContext=i,a.config.globalProperties.$useId=ie}}),r.component("Fade",be),r.component("ALink",Te),r.component("AImg",Fe),r.component("Skeleton",ke)},Oe=C({__name:"CarouselControl",props:{isPrev:{type:Boolean,default:!1}},setup(r,{expose:a}){a();const{axis:e,changeSlide:t}=le(D),o={axis:e,changeSlide:t,isX:e==="x"};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}}),$e=["aria-label","data-carousel-control"];function Re(r,a,e,t,i,o){return y(),R("button",{type:"button","aria-label":e.isPrev?"Anterior":"Próximo",onClick:a[0]||(a[0]=ae(l=>t.changeSlide(e.isPrev?-1:1),["stop","prevent"])),class:v(["group absolute z-[11]",t.isX?`${e.isPrev?"left-0":"right-0"} top-0`:`${e.isPrev?"top-0":"bottom-0"} left-0`]),"data-carousel-control":e.isPrev?"previous":"next"},[b(r.$slots,"default",{},()=>[S("i",{class:v(["m-0 i-chevron-right",{"group-active:translate-x-1":t.isX&&!e.isPrev,"rotate-180 group-active:-translate-x-1":t.isX&&e.isPrev,"rotate-90 group-active:translate-y-1":!t.isX&&!e.isPrev,"-rotate-90 group-active:-translate-y-1":!t.isX&&e.isPrev}])},null,2)])],10,$e)}const te=F(Oe,[["render",Re]]),D=Symbol("carousel"),je=C({__name:"Carousel",props:{as:{default:"ul"},index:{default:0},autoplay:{},axis:{default:"x"},hasControls:{type:Boolean},wrapperKey:{}},emits:["update:index"],setup(r,{expose:a,emit:e}){a();const t=r,i=e,o=E(0);z(V(t,"index"),s=>{if(s!==o.value){const d=s-o.value;h(d,!1)}},{immediate:!0}),z(o,(s,d)=>{s!==d&&i("update:index",s)});const l=E(null),{[t.axis]:g,isScrolling:P,arrivedState:f}=_e(l),u=t.axis==="x",_=c(()=>u?f.left:f.top),T=c(()=>u?f.right:f.bottom),m=E([]),x=E(0),w=E(0),j=()=>{l.value&&(u?(x.value=l.value.scrollWidth,w.value=l.value.offsetWidth):(x.value=l.value.scrollHeight,w.value=l.value.offsetHeight))},H=()=>{if(!l.value)return;let s=[...l.value.children];s.length===1&&s[0].tagName.endsWith("SLOT")&&(s=[...s[0].children]),m.value=s.map(d=>({offset:u?d.offsetLeft:d.offsetTop,size:u?d.offsetWidth:d.offsetHeight}))},X=s=>{let d=o.value+s;if(d>=m.value.length)return 0;d<0&&(d=m.value.length+d);const{offset:B,size:L}=m.value[d]||{};return L?B:0},I=()=>{const s=m.value.findIndex(d=>Math.abs(d.offset-g.value)<=5);s>-1&&(o.value=s||0)};let p;const n=()=>{t.autoplay&&(clearTimeout(p),p=setTimeout(()=>{h(1)},t.autoplay))},h=(s,d=!0)=>{if(m.value.length<2)return;let B=-1;if(g.value+w.value>=x.value)B=0;else{if(d&&(s===1||s===-1)){let L=0,G=0;for(let M=o.value;M<m.value.length;M++){const{size:K}=m.value[M]||{};if(K&&(L+=1,G+=K,G+K*.75>=w.value))break}L&&(s=s>0?L:-L)}B=X(s)}l.value?.scrollTo({[u?"left":"top"]:B,behavior:"smooth"}),n()};z(P,s=>{s?clearTimeout(p):(I(),n())});const N=E(null),U=we(N);z(U,s=>{s?clearTimeout(p):n()});const O=()=>{l.value&&(j(),H(),I())},W=pe(()=>{l.value&&(u?l.value.scrollLeft=0:l.value.scrollTop=0,O())},400);ue(()=>{O(),ce(()=>{l.value&&[...l.value.children].forEach(s=>{s.setAttribute("tabindex","0")})}),n(),window.addEventListener("resize",W)}),z(V(t,"wrapperKey"),O),de(()=>{window.removeEventListener("resize",W),clearTimeout(p)}),fe(D,{autoplay:V(t,"autoplay"),axis:t.axis,changeSlide:h,isBoundStart:_,isBoundEnd:T});const Y={carouselKey:D,props:t,emit:i,activeIndex:o,wrapper:l,currentPos:g,isScrolling:P,arrivedState:f,isX:u,isBoundStart:_,isBoundEnd:T,slideSizes:m,wrapperScrollSize:x,wrapperVisibleSize:w,calcWrapperSize:j,calcSlidesSize:H,calcNextOffset:X,calcCurrentIndex:I,get autoplayTimer(){return p},set autoplayTimer(s){p=s},restartAutoplay:n,changeSlide:h,carousel:N,isHovered:U,calcOnInit:O,onResize:W,CarouselControl:te};return Object.defineProperty(Y,"__isScriptSetup",{enumerable:!1,value:!0}),Y}});function He(r,a,e,t,i,o){return y(),R("div",{ref:"carousel",class:v(`relative ${t.isX?"":"overflow-hidden"}`),"data-carousel":""},[(y(),A(Q(e.as),{ref:"wrapper",class:v(["m-0 flex snap-mandatory list-none scroll-smooth p-0 [&>*]:snap-start [&>*]:outline-none",t.isX?"snap-x overflow-y-hidden overflow-x-scroll":"h-full flex-col snap-y overflow-x-hidden overflow-y-scroll"]),style:{"scrollbar-width":"none","-webkit-overflow-scrolling":"touch","-ms-overflow-style":"none"},"data-carousel-wrapper":""},{default:k(()=>[b(r.$slots,"default")]),_:3},8,["class"])),b(r.$slots,"controls",Z(ee({changeSlide:t.changeSlide,isBoundStart:t.isBoundStart,isBoundEnd:t.isBoundEnd,activeIndex:t.activeIndex})),()=>[t.slideSizes.length>1||e.hasControls?(y(),A(t.CarouselControl,{key:0,"is-prev":""},{default:k(()=>[b(r.$slots,"previous")]),_:3})):J("",!0),t.slideSizes.length>1||e.hasControls?(y(),A(t.CarouselControl,{key:1},{default:k(()=>[b(r.$slots,"next")]),_:3})):J("",!0)])],2)}const Xe=F(je,[["render",He]]),re=r=>{Ne(r),r.component("Carousel",Xe),r.component("CarouselControl",te)},We=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"})),Me=async r=>{"default"in We&&await re(r)},Ke=C({props:{value:String,name:String,hydrate:{type:Boolean,default:!0}},setup({name:r,value:a,hydrate:e}){if(!a)return()=>null;let t=e?"astro-slot":"astro-static-slot";return()=>$(t,{name:r,innerHTML:a})}}),tt=r=>async(a,e,t,{client:i})=>{if(!r.hasAttribute("ssr"))return;const o=a.name?`${a.name} Host`:void 0,l={};for(const[u,_]of Object.entries(t))l[u]=()=>$(Ke,{value:_,name:u==="default"?void 0:u});const g=i!=="only",f=(g?oe:se)({name:o,render(){let u=$(a,e,l);return Ve(a.setup)&&(u=$(me,null,u)),u}});await Me(f),f.mount(r,g),r.addEventListener("astro:unmount",()=>f.unmount(),{once:!0})};function Ve(r){const a=r?.constructor;return a&&a.name==="AsyncFunction"}export{tt as default};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import"./server-data.4C60Esyt.js";import{r as C,c as y,b as B}from"./sf-utils.c42cbZ9W.js";import{h as x}from"./index.KfrHdfOH.js";const K=e=>{if(e){if(e.display_name)return e.display_name;if(e.name&&e.name.given_name)return e.name.given_name}return""},z=K,G="modulepreload",J=function(e){return"/"+e},I={},V=function(a,t,r){let i=Promise.resolve();if(t&&t.length>0){const o=document.getElementsByTagName("link");i=Promise.all(t.map(s=>{if(s=J(s),s in I)return;I[s]=!0;const n=s.endsWith(".css"),f=n?'[rel="stylesheet"]':"";if(!!r)for(let p=o.length-1;p>=0;p--){const g=o[p];if(g.href===s&&(!n||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${f}`))return;const l=document.createElement("link");if(l.rel=n?"stylesheet":G,n||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),n)return new Promise((p,g)=>{l.addEventListener("load",p),l.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${s}`)))})}))}return i.then(()=>a()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})},F=(e,a,t=globalThis.localStorage)=>{if(!t)return C(a);let r;const i=t.getItem(e);if(i)try{r=JSON.parse(i)}catch{r=null,t.removeItem(e)}const o=C(r||a);return x(o,()=>{t.setItem(e,JSON.stringify(o))},{debounce:50}),o};globalThis.__apiCache||(globalThis.__apiCache={});const _=typeof process=="object"&&process?.env||globalThis;class S extends Error{constructor(a,t,r,i=!1){t?(super(t.statusText),this.data=t.data,this.statusCode=t.status):super(r||"Request error"),this.config=a,this.response=t,this.isTimeout=i}}const H={middleware(e){const a={...e.headers};if(!e.isNoAuth)if(e.accessToken)a.Authorization=`Bearer ${e.accessToken}`;else{const o=e.authenticationId||_.ECOM_AUTHENTICATION_ID,s=e.apiKey||_.ECOM_API_KEY;if(o&&s){const n=`${o}:${s}`,f=typeof Buffer=="function"?Buffer.from(n).toString("base64"):btoa(n);a.Authorization=`Basic ${f}`}}let t=e.baseUrl||_.API_BASE_URL||"https://ecomplus.io/v2";const{endpoint:r,params:i}=e;if(r!=="login"&&r!=="authenticate"&&r!=="ask-auth-callback"&&r!=="check-username"){const o=e.storeId||_.ECOM_STORE_ID;if(!o)throw new Error("`storeId` must be set in config or `ECOM_STORE_ID` env var");t+=`/:${o}`;const s=e.lang||_.ECOM_LANG;s&&(t+=`,lang:${s}`)}if(t+=`/${r}`,typeof i=="string")t+=`?${i}`;else{const o=i||{};if(["fields","sort"].forEach(s=>{const n=e[s];n&&!o[s]&&(o[s]=n.join(","))}),["limit","offset","count","buckets","concise","verbose"].forEach(s=>{const n=e[s];n&&!o[s]&&(o[s]=n)}),Object.keys(o).length){const s=new URLSearchParams;Object.keys(o).forEach(n=>{const f=o[n];Array.isArray(f)?f.forEach(b=>{s.append(n,b)}):f!==void 0&&s.append(n,f)}),t+=`?${s.toString()}`}}return{url:t,headers:a}}},c=async(e,a=0)=>{const t=globalThis.$apiMergeConfig?{...globalThis.$apiMergeConfig,...e}:e,{url:r,headers:i}=H.middleware(t),o=t.method?.toUpperCase()||"GET",{timeout:s=2e4,maxRetries:n=3,cacheMaxAge:f=Number(_.API_CACHE_MAX_AGE)||12e4}=t,b=o==="GET"&&t.canCache;let l;if(b){l=`${r}${JSON.stringify(i)}`;const m=globalThis.__apiCache[l];if(m&&Date.now()-m.timestamp<=f)return{...m.res,config:t}}const p=t.body||t.data;let g;p&&(g=JSON.stringify(p),i["Content-Type"]="application/json");const T=new AbortController;let A=!1;const L=setTimeout(()=>{T.abort(),A=!0},s);let u;try{u=await(t.fetch||fetch)(r,{method:o,headers:i,body:g,signal:T.signal})}catch(m){let d=m.message;throw m.cause&&(d+=` - ${m.cause}`),new S(t,u,d,A)}if(clearTimeout(L),u){if(u.ok){const d=u;return d.data=u.status!==204?await u.json():null,b&&l&&(globalThis.__apiCache[l]={timestamp:Date.now(),res:d}),d.config=t,d}const{status:m}=u;if(n<a&&(m===429||m>=500)){const d=u.headers.get("retry-after");return new Promise((M,U)=>{setTimeout(()=>{c(e,a+1).then(M).catch(U)},d&&parseInt(d,10)*1e3||5e3)})}}try{u.data=await u?.json()}catch{}throw new S(t,u)},Y=(e,a)=>c({...a,endpoint:e}),q=(e,a,t)=>c({...t,method:"post",endpoint:e,body:a}),X=(e,a,t)=>c({...t,method:"put",endpoint:e,body:a}),Q=(e,a,t)=>c({...t,method:"patch",endpoint:e,body:a}),N=(e,a)=>c({...a,method:"delete",endpoint:e});c.get=Y;c.post=q;c.put=X;c.patch=Q;c.del=N;c.delete=N;const W="emailForSignIn",P="ecomSession",E={customer:{display_name:"",main_email:""},auth:null},h=F(P,E),v=y(()=>{const{auth:e}=h;return e&&new Date(e.expires).getTime()-Date.now()>1e3*10}),R=y(()=>h.customer),k=y(()=>z(R.value)),O=y({get(){return R.value.main_email},set(e){h.customer.main_email=e}});let w;const ne=y(()=>v.value||!!w?.currentUser?.emailVerified),Z=()=>{h.auth=E.auth,h.customer=E.customer,localStorage.removeItem(P),w.signOut()},j=(e="Not authenticated")=>{const a=new Error(e);throw a.isNoAuth=!0,a},D=async()=>{const e=await w.currentUser?.getIdToken();if(!e){j("Can't get Firebase user ID token");return}const{domain:a}=globalThis.$storefront.settings;try{const t=await fetch(`https://${a}/_api/passport/token`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}});h.auth=await t.json()}catch(t){console.error(t)}},ee=async()=>(v.value||await D(),h.auth?h.auth.access_token:j()),te=async()=>{const e=await ee(),a=h.auth,{data:t}=await c.get(`customers/${a.customer_id}`,{accessToken:e});return h.customer=t,t};let $=!1;const re=e=>{if($)return;e===void 0&&(e=!window.location.pathname.startsWith("/app/")),$=!0;const a=()=>V(()=>import("./firebase-app.VduCDgof.js"),__vite__mapDeps([0,1])).then(({getAuth:t,onAuthStateChanged:r,isSignInWithEmailLink:i,signInWithEmailLink:o})=>{if(w=t(),r(w,async s=>{if(s){if(s.displayName&&!k.value&&(h.customer.display_name=s.displayName),s.email&&(!O.value||s.emailVerified)&&(h.customer.main_email=s.email),s.emailVerified){const n=s.email!==O.value;(n||!v.value)&&(await D(),(n||!k.value)&&await te())}}else Z()}),i(w,window.location.href)){const n=new URLSearchParams(window.location.search).get("email");n&&o(w,n,window.location.href).then(()=>window.localStorage.removeItem(W)).catch(console.error)}}).catch(console.error);e?B(a):a()};export{W as E,V as _,k as a,c as b,R as c,ne as d,re as e,O as f,v as i,Z as l,h as s,F as u};
|
|
2
|
+
function __vite__mapDeps(indexes) {
|
|
3
|
+
if (!__vite__mapDeps.viteFileDeps) {
|
|
4
|
+
__vite__mapDeps.viteFileDeps = ["_astro/firebase-app.VduCDgof.js","_astro/index-dd468b12.fl8bpn8l.js"]
|
|
5
|
+
}
|
|
6
|
+
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"./sf-utils.c42cbZ9W.js";import{g as c}from"./price.Easct8WC.js";const s=(r,o=t.get("currency"),e=t.get("lang"))=>{if(typeof r=="object"?r!==null&&(r=c(r)):typeof r=="string"&&(r=parseFloat(r)),o)try{return r.toLocaleString(e.replace("_","-"),{style:"currency",currency:o})}catch(f){console.error(f)}const n=(o||t.get("currency_symbol"))+" ";return typeof r=="number"?n+r:""},g=s;export{g as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as g}from"./sf-utils.c42cbZ9W.js";import{g as a}from"./name.VA3MEpe0.js";const s=(t,e,i=g.get("lang"))=>{let r;return Array.isArray(e)?r=e.find(o=>o.grid_id===t):console.error("`grids` must be array to get grid title"),r?a(r,i):t},m=s;export{m as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as C,w as V,a as I,e as R,b as Y,t as S}from"./use-analytics._ef6TM4P.js";import{a as $}from"./afetch.OifQZgwR.js";import{u as D}from"./index.KfrHdfOH.js";import"./customer-session.dSYHWdP4.js";import"./server-data.4C60Esyt.js";import"./sf-utils.c42cbZ9W.js";import"./shopping-cart.v-dB3kHB.js";import"./price.Easct8WC.js";import"./name.VA3MEpe0.js";import"./i18n.zhlBzJt8.js";const p={waiting:Promise.resolve(),params:{content_ids:[],content_name:""}},A=(t,e="BRL",n=!1)=>{const a={currency:e,content_category:t.item_category,content_name:t.item_name,value:t.price,content_type:"product"};return n?(a.contents=[{id:t.item_id,quantity:t.quantity}],Number(t.quantity)<0&&(a.value=0)):a.content_ids=[t.item_id],a},F=async({event:t})=>{if(t.name==="page_view")return p.waiting=new Promise(a=>{setTimeout(a,110)}),p.params.content_name=t.params.page_title,[{name:"PageView"}];const{items:e,currency:n}=t.params;if(t.name==="view_item"&&e){const a=e[0];if(a)return a.item_list_id==="product-page"?[{name:"ViewContent",params:A(a,n)}]:(e.forEach(({item_id:i})=>{p.params.content_ids.push(i)}),p.params.content_ids.length>e.length?[{name:null}]:(await p.waiting,[{name:"ViewContent",params:{...p.params,content_type:"product"}}]))}if((t.name==="add_to_cart"||t.name==="remove_from_cart")&&e){const a=t.name==="add_to_cart";return e.map(i=>({name:"AddToCart",params:A({...i,quantity:a?i.quantity||1:-(i.quantity||1)},n,!0)}))}return[{name:null}]},h={waiting:Promise.resolve(),params:{description:"",contents:[]}},w=(t,e=!1)=>{const n={content_id:t.item_id,content_name:t.item_name,price:t.price,content_category:t.item_category,brand:t.item_brand};return e&&(n.quantity=t.quantity),n},H=async({event:t})=>{if(t.name==="page_view")return h.waiting=new Promise(a=>{setTimeout(a,110)}),h.params.description=t.params.page_title,[{name:"PageView"}];const{items:e,currency:n}=t.params;if(t.name==="view_item"&&e){const a=e[0];if(a)return a.item_list_id==="product-page"?[{name:"ViewContent",params:{contents:[w(a)],content_type:"product",currency:n,value:a.price}}]:(e.forEach(i=>{h.params.contents.push(w(i))}),h.params.contents.length>e.length?[{name:null}]:(await h.waiting,[{name:"ViewContent",params:{...h.params,content_type:"product",currency:n}}]))}if((t.name==="add_to_cart"||t.name==="remove_from_cart")&&e){const a=t.name==="add_to_cart";return e.map(i=>{const l=i.quantity||1,{price:u}=i;return{name:"AddToCart",params:{contents:[w({...i,quantity:a?l:-l},!0)],content_type:"product",currency:n,value:a&&typeof u=="number"?l*u:0}}})}return[{name:null}]},M={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1,SITE:"https://demo.ecomplus.app",ASSETS_PREFIX:void 0}.DEPLOY_RAND||"_";let E=[];const O=D(()=>{$("/_analytics",{method:"POST",body:{...I(),events:E}}),E=[]},200),_=t=>{E.push(t),O()};if(!window.location.search.includes(`__isrV=${M}`)){C(),V(async n=>{const{name:a,params:i}=n.event;_({type:"gtag",name:a,params:i});const{gtag:l,dataLayer:u,fbq:s,ttq:c}=window;typeof l=="function"&&l("event",a,i),u&&typeof u.push=="function"&&u.push(["event",a,i]),(await F(n)).forEach(o=>{o.name&&(_({type:"fbq",...o}),typeof s=="function"&&s("track",o.name,o.params))}),(await H(n)).forEach(o=>{o.name&&(_({type:"ttk",...o}),typeof c?.page=="function"&&(o.name==="PageView"?c.page():c.track(o.name,o.params)))})});let t="";const e=()=>{const n=window.location.toString();n!==t&&(R("page_view",{...Y(),page_location:n,client_id:S.g_client_id||S.client_id}),t=n)};e(),window.addEventListener("storefront:apiContext",()=>{try{window.dataLayer.push(function(){this.reset(),e()})}catch{e()}})}const y=t=>history.replaceState(t,""),P=!!document.startViewTransition,g=()=>!!document.querySelector('[name="astro-view-transitions-enabled"]'),k=t=>document.dispatchEvent(new Event(t)),q=()=>k("astro:load"),f="data-astro-transition-persist";let m=history.state?.index||0;!history.state&&g()&&y({index:m,scrollY:0});const W=(t,e)=>{let n=!1,a=!1;return(...i)=>{if(n){a=!0;return}t(...i),n=!0,setTimeout(()=>{a&&(a=!1,t(...i)),n=!1},e)}};async function G(t){const e=await fetch(t),n=await e.text();return{ok:e.ok,html:n}}function L(){const t=document.querySelector('[name="astro-view-transitions-fallback"]');return t?t.getAttribute("content"):"animate"}function x(){for(const t of document.scripts)t.dataset.astroExec=""}function B(){let t=Promise.resolve();for(const e of Array.from(document.scripts)){if(e.dataset.astroExec==="")continue;const n=document.createElement("script");n.innerHTML=e.innerHTML;for(const a of e.attributes){if(a.name==="src"){const i=new Promise(l=>{n.onload=l});t=t.then(()=>i)}n.setAttribute(a.name,a.value)}n.dataset.astroExec="",e.replaceWith(n)}return t}const K=new DOMParser;async function T(t,e,n){const a=K.parseFromString(t,"text/html"),i=s=>{const c=s.getAttribute(f),d=c&&a.head.querySelector(`[${f}="${c}"]`);if(d)return d;if(s.matches("link[rel=stylesheet]")){const r=s.getAttribute("href");return a.head.querySelector(`link[rel=stylesheet][href="${r}"]`)}if(s.tagName==="SCRIPT"){let r=s;for(const o of a.scripts)if(r.textContent&&r.textContent===o.textContent||r.type===o.type&&r.src&&r.src===o.src)return o}return null},l=()=>{a.querySelectorAll("head noscript").forEach(r=>r.remove());const s=document.documentElement,c=[...s.attributes].filter(({name:r})=>(s.removeAttribute(r),r.startsWith("data-astro-")));[...a.documentElement.attributes,...c].forEach(({name:r,value:o})=>s.setAttribute(r,o));for(const r of Array.from(document.head.children)){const o=i(r);o?o.remove():r.remove()}document.head.append(...a.head.children);const d=document.body;document.body.replaceWith(a.body);for(const r of d.querySelectorAll(`[${f}]`)){const o=r.getAttribute(f),b=document.querySelector(`[${f}="${o}"]`);b&&b.replaceWith(r)}if(scrollTo({left:0,top:0,behavior:"instant"}),e?.scrollY===0&&location.hash){const r=decodeURIComponent(location.hash.slice(1)),o=document.getElementById(r);o&&(e.scrollY=o.offsetTop,y(e),o.scrollIntoView())}else e&&e.scrollY!==0&&scrollTo(0,e.scrollY);k("astro:beforeload")},u=[];for(const s of a.querySelectorAll("head link[rel=stylesheet]"))if(!document.querySelector(`[${f}="${s.getAttribute(f)}"], link[rel=stylesheet]`)){const c=document.createElement("link");c.setAttribute("rel","preload"),c.setAttribute("as","style"),c.setAttribute("href",s.getAttribute("href")),u.push(new Promise(d=>{["load","error"].forEach(r=>c.addEventListener(r,d)),document.head.append(c)}))}if(u.length&&await Promise.all(u),n==="animate"){let s=!1;addEventListener("animationstart",()=>s=!0,{once:!0}),document.documentElement.dataset.astroTransitionFallback="old",await new Promise(c=>{const d=()=>{removeEventListener("animationend",d),clearTimeout(r),l(),c(!0),document.documentElement.dataset.astroTransitionFallback="new"};addEventListener("animationend",d,{once:!0});let r=setTimeout(()=>!s&&d())})}else l()}async function v(t,e,n){let a;const{html:i,ok:l}=await G(e);if(!l){location.href=e;return}document.documentElement.dataset.astroTransition=t,P?a=document.startViewTransition(()=>T(i,n)).finished:a=T(i,n,L());try{await a}finally{await B(),x(),q()}}function N(t){if(document.querySelector(`link[rel=prefetch][href="${t}"]`))return;if(navigator.connection){let n=navigator.connection;if(n.saveData||/(2|3)g/.test(n.effectiveType||""))return}let e=document.createElement("link");e.setAttribute("rel","prefetch"),e.setAttribute("href",t),document.head.append(e)}(P||L()!=="none")&&!location.pathname.startsWith("/app/")&&(x(),document.addEventListener("click",t=>{let e=t.target;if(e instanceof Element&&e.tagName!=="A"&&(e=e.closest("a")),!e||!(e instanceof HTMLAnchorElement)||e.dataset.astroReload!==void 0||e.hasAttribute("download")||!e.href||e.pathname.startsWith("/app/")||e.target&&e.target!=="_self"||e.origin!==location.origin||t.button!==0||t.metaKey||t.ctrlKey||t.altKey||t.shiftKey||t.defaultPrevented||!g())return;if(location.pathname===e.pathname&&location.search===e.search){if(e.hash)return;if(t.preventDefault(),y({...history.state,scrollY}),scrollTo({left:0,top:0,behavior:"instant"}),location.hash){const a={index:++m,scrollY:0};history.pushState(a,"",e.href)}return}t.preventDefault(),v("forward",e.href,{index:++m,scrollY:0});const n={index:m,scrollY};y({index:m-1,scrollY}),history.pushState(n,"",e.href)}),addEventListener("popstate",t=>{if(!g()&&t.state){location.reload();return}if(t.state===null)return;const e=history.state,n=e?.index??m+1,a=n>m?"forward":"back";v(a,location.href,e),m=n}),["mouseenter","touchstart","focus"].forEach(t=>{document.addEventListener(t,e=>{if(e.target instanceof HTMLAnchorElement){let n=e.target;n.origin===location.origin&&n.pathname!==location.pathname&&!n.pathname.startsWith("/app/")&&n.dataset.astroReload===void 0&&!n.hasAttribute("download")&&n.role!=="button"&&g()&&N(n.pathname)}},{passive:!0,capture:!0})}),addEventListener("load",q),addEventListener("scroll",W(()=>{history.state&&y({...history.state,scrollY})},300),{passive:!0}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./hoisted.d2SGwVMl.js";import"./afetch.OifQZgwR.js";import"./use-analytics._ef6TM4P.js";import"./customer-session.dSYHWdP4.js";import"./server-data.4C60Esyt.js";import"./sf-utils.c42cbZ9W.js";import"./index.KfrHdfOH.js";import"./shopping-cart.v-dB3kHB.js";import"./price.Easct8WC.js";import"./name.VA3MEpe0.js";import"./i18n.zhlBzJt8.js";const t=window.location.search.includes("status=404")?"404Msg":"5xxMsg";document.getElementById(t).style.display="block";document.getElementById("loadingMsg").style.display="none";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as E,s as b,c as p,a as N}from"./customer-session.dSYHWdP4.js";import{s as w}from"./shopping-cart.v-dB3kHB.js";import{g as v,e as I}from"./use-analytics._ef6TM4P.js";import{u as O}from"./afetch.OifQZgwR.js";import"./index.KfrHdfOH.js";import{w as T}from"./sf-utils.c42cbZ9W.js";import"./hoisted.d2SGwVMl.js";import"./server-data.4C60Esyt.js";import"./price.Easct8WC.js";import"./name.VA3MEpe0.js";import"./i18n.zhlBzJt8.js";const R=o=>{let a="";if(typeof o=="object"&&o!==null){let i=Array.isArray(o.phones)?o.phones[0]:o;i&&i.number&&(i.country_code&&(a=`+${i.country_code} `),a+=i.number)}return a},k=R,M=()=>{const o=window.storefrontApp?.router;if(o){const a=()=>sessionStorage.getItem("st_discount_coupon")||void 0,i=s=>Math.round(s*100)/100,h=[],r=(s,t)=>{h.includes(s)||(h.push(s),t||(t={value:i(w.subtotal||0),items:w.items.map(v)}),s!=="view_cart"&&(t.coupon=a(),h.includes("begin_checkout")||r("begin_checkout")),I(s,t))};let g=!1;const m=(s,t)=>{if(!g){if(localStorage.getItem("gtag.orderIdSent")!==s){let _;if(t)try{_=JSON.parse(t)}catch{}const{amount:l}=_||window.storefrontApp,S={transaction_id:s,value:i(l?.total||w.subtotal||0),items:w.items.map(v),coupon:_?_.extra_discount?.discount_coupon:a()};l&&(l.freight!==void 0&&(S.shipping=i(l.freight)),l.tax!==void 0&&(S.tax=i(l.tax)));let A=1;const{dataLayer:y,__sendGTMExtraPurchaseData:P}=window;if(y&&P){const n={};let e;if(p){n.customerDisplayName=N.value;let c=p.value.name;if(!c?.given_name)try{const f=sessionStorage.getItem("ecomCustomerAccount");if(f){const C=JSON.parse(f);typeof C=="object"&&C&&(c=C.name)}}catch{}c&&(n.customerGivenName=c.given_name,n.customerFamilyName=c.family_name),n.customerEmail=p.value.main_email,n.customerPhone=k(p.value),e=p.value.addresses?.[0]}try{const c=sessionStorage.getItem("ecomCustomerAddress");if(c){const f=JSON.parse(c);typeof e=="object"&&e?Object.assign(e,f):e=f}}catch{}e&&e.zip&&(n.shippingAddrZip=e.zip,n.shippingAddrStreet=e.street,n.shippingAddrNumber=e.number,e.street&&e.number&&(n.shippingAddrStreet+=`, ${e.number}`),n.shippingAddrCity=e.city,n.shippingAddrProvinceCode=e.province_code),y.push({event:"purchaseExtraData",...n}),A=100}setTimeout(()=>I("purchase",S),A),localStorage.setItem("gtag.orderIdSent",s)}g=!0}};let u;const d=({name:s,params:t})=>{switch(s){case"cart":r("view_cart");break;case"checkout":t.step?Number(t.step)===1?r("add_shipping_info"):Number(t.step)===2&&r("add_payment_info"):r("begin_checkout");break;case"confirmation":clearTimeout(u),t.json?m(t.id,decodeURIComponent(t.json)):u=setTimeout(()=>{m(t.id)},1500);break}};o.currentRoute&&d(o.currentRoute),o.afterEach(d)}};{Object.keys(O).length&&sessionStorage.setItem("ecomUtm",JSON.stringify(O));let o=window.location.search;!o&&window.location.hash&&(o="?"+window.location.hash.split("?")[1]);const a=new URLSearchParams(o);a.get("product_id")&&a.get("quantity")==="1"&&(localStorage.setItem("ecomShoppingCart__tmp",JSON.stringify({items:[{product_id:a.get("product_id"),variation_id:a.get("variation_id")||void 0,quantity:1}]})),window.ECOM_CART_STORAGE_KEY="ecomShoppingCart__tmp");const{hostname:i}=window.location,{domain:h}=globalThis.$storefront.settings,r=`https://ecomplus.io/v2/:${window.ECOM_STORE_ID}/`;window.ECOMCLIENT_API_STORE=r,window.ECOMCLIENT_API_STORE_CACHE=r,window.ECOMCLIENT_API_PASSPORT=r,window.ECOMCLIENT_API_SEARCH=`${r}/search/_els/`,window.ECOMCLIENT_API_MODULES=["localhost","127.0.0.1"].includes(i)?`https://${h}/_api/modules/`:"/_api/modules/";const g=()=>{const{ecomPassport:u}=window;T(E,async()=>{E.value?u.setSession({auth:{...b.auth,id:b.auth?.customer_id,level:3},customer:p.value}):u.checkLogin()&&u.logout()},{immediate:!0}),T(p,d=>{(d.display_name||d.main_email)&&u.setCustomer(d)},{immediate:!0}),setTimeout(M,400)},m=document.createElement("script");m.src="https://cdn.jsdelivr.net/npm/@ecomplus/storefront-app@2.0.0-beta.190/dist/lib/js/app.js",m.onload=g,document.body.appendChild(m)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as n,_ as o}from"./sf-utils.c42cbZ9W.js";const t=(e,f=o.get("lang"))=>{if(typeof e=="object"&&e!==null){const p=Object.keys(e)[0];if(/^[a-z]{2}(_[a-z]{2})?$/.test(p))return e[f]||e[n]||e[p];{const r=Array.isArray(e)?[]:{};for(const s in e)e[s]!==void 0&&(r[s]=t(e[s],f));return r}}return e},u=t;export{u as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as n}from"./sf-utils.c42cbZ9W.js";const m=(l,f,o)=>{if(o||(o=n.get("default_img_size")||"normal"),l){let{pictures:a,picture:e}=l;e||a||(Array.isArray(l)?a=l:e=l),Array.isArray(a)&&(e=f&&a.filter(r=>r._id===f)[0]||a[0]);let s;if(typeof e=="object"&&e!==null){if(s=e[o],s&&s.url)return s;let r;switch(o){case"small":r=["normal","big"];break;case"normal":r=["big","zoom","small"];break;case"big":r=["zoom","normal"];break;case"zoom":r=["big"];break;default:r=["big","zoom","normal","small"]}for(let i=0;i<r.length;i++){const t=r[i];if(e[t]&&e[t].url)return e[t]}for(const i in e)if(e[i]&&e[i].url)return e[i]}}},b=m;export{b as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as D,_ as C,w as b,F as T,G as A,a as y,H as F,c as W,I as _,J as I,K as k,L as M}from"./sf-utils.c42cbZ9W.js";D.$ecomConfig||C;function E(e){return k()?(M(e),!0):!1}function $(e,t){if(typeof Symbol<"u"){const n={...e};return Object.defineProperty(n,Symbol.iterator,{enumerable:!1,value(){let o=0;return{next:()=>({value:t[o++],done:o>t.length})}}}),n}else return Object.assign([...t],e)}function m(e){return typeof e=="function"?e():A(e)}const O=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const G=Object.prototype.toString,q=e=>G.call(e)==="[object Object]",l=()=>{},B=L();function L(){var e,t;return O&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function v(e,t){function n(...o){return new Promise((i,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(r)})}return n}const P=e=>e();function x(e,t={}){let n,o,i=l;const r=s=>{clearTimeout(s),i(),i=l};return s=>{const u=m(e),c=m(t.maxWait);return n&&r(n),u<=0||c!==void 0&&c<=0?(o&&(r(o),o=null),Promise.resolve(s())):new Promise((f,p)=>{i=t.rejectOnCancel?p:f,c&&!o&&(o=setTimeout(()=>{n&&r(n),o=null,f(s())},c)),n=setTimeout(()=>{o&&r(o),o=null,f(s())},u)})}}function R(e,t=!0,n=!0,o=!1){let i=0,r,a=!0,s=l,u;const c=()=>{r&&(clearTimeout(r),r=void 0,s(),s=l)};return p=>{const d=m(e),h=Date.now()-i,w=()=>u=p();return c(),d<=0?(i=Date.now(),w()):(h>d&&(n||!a)?(i=Date.now(),w()):t&&(u=new Promise((g,j)=>{s=o?j:g,r=setTimeout(()=>{i=Date.now(),a=!0,g(w()),c()},Math.max(0,d-h))})),!n&&!r&&(r=setTimeout(()=>a=!0,d)),a=!1,u)}}function z(e=P){const t=y(!0);function n(){t.value=!1}function o(){t.value=!0}const i=(...r)=>{t.value&&e(...r)};return{isActive:F(t),pause:n,resume:o,eventFilter:i}}function V(e){const t=Object.create(null);return n=>t[n]||(t[n]=e(n))}const H=/-(\w)/g,N=V(e=>e.replace(H,(t,n)=>n?n.toUpperCase():""));function Q(e,t=!1,n="Timeout"){return new Promise((o,i)=>{setTimeout(t?()=>i(n):o,e)})}function J(e){return e||I()}function X(e,t=200,n={}){return v(x(t,n),e)}function Y(e,t=200,n=!1,o=!0,i=!1){return v(R(t,n,o,i),e)}function S(e,t,n={}){const{eventFilter:o=P,...i}=n;return b(e,v(o,t),i)}function Z(e,t,n={}){const{eventFilter:o,...i}=n,{eventFilter:r,pause:a,resume:s,isActive:u}=z(o);return{stop:S(e,t,{...i,eventFilter:r}),pause:a,resume:s,isActive:u}}function ee(e,t=!0,n){J()?_(e,n):t?e():T(e)}function K(e,t,n={}){const{immediate:o=!0}=n,i=y(!1);let r=null;function a(){r&&(clearTimeout(r),r=null)}function s(){i.value=!1,a()}function u(...c){a(),i.value=!0,r=setTimeout(()=>{i.value=!1,r=null,e(...c)},m(t))}return o&&(i.value=!0,O&&u()),E(s),{isPending:F(i),start:u,stop:s}}function te(e=1e3,t={}){const{controls:n=!1,callback:o}=t,i=K(o??l,e,t),r=W(()=>!i.isPending.value);return n?{ready:r,...i}:r}function ne(e,t,n={}){const{debounce:o=0,maxWait:i=void 0,...r}=n;return S(e,t,{...r,eventFilter:x(o,{maxWait:i})})}function oe(e,t,n){const o=b(e,(...i)=>(T(()=>o()),t(...i)),n);return o}export{q as a,Y as b,N as c,ee as d,B as e,E as f,oe as g,ne as h,O as i,te as j,$ as m,l as n,Q as p,m as t,X as u,Z as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as N,w as X,i as q,n as $,a as z,t as _,c as B,u as Q,b as Y,d as G,e as J,f as Z}from"./index.KfrHdfOH.js";import{s as ee,r as D,w as te,d as W,a as C,c as j}from"./sf-utils.c42cbZ9W.js";function re(t={}){const{inheritAttrs:u=!0}=t,o=ee(),r=W({setup(p,{slots:e}){return()=>{o.value=e.default}}}),b=W({inheritAttrs:u,setup(p,{attrs:e,slots:i}){return()=>{var v;o.value;const f=(v=o.value)==null?void 0:v.call(o,{...oe(e),$slots:i});return u&&f?.length===1?f[0]:f}}});return N({define:r,reuse:b},[r,b])}function oe(t){const u={};for(const o in t)u[B(o)]=t[o];return u}function k(t){var u;const o=_(t);return(u=o?.$el)!=null?u:o}const R=q?window:void 0;function A(...t){let u,o,r,b;if(typeof t[0]=="string"||Array.isArray(t[0])?([o,r,b]=t,u=R):[u,o,r,b]=t,!u)return $;Array.isArray(o)||(o=[o]),Array.isArray(r)||(r=[r]);const p=[],e=()=>{p.forEach(h=>h()),p.length=0},i=(h,y,n,c)=>(h.addEventListener(y,n,c),()=>h.removeEventListener(y,n,c)),v=te(()=>[k(u),_(b)],([h,y])=>{if(e(),!h)return;const n=z(y)?{...y}:y;p.push(...o.flatMap(c=>r.map(m=>i(h,c,m,n))))},{immediate:!0,flush:"post"}),f=()=>{v(),e()};return Z(f),f}let U=!1;function le(t,u,o={}){const{window:r=R,ignore:b=[],capture:p=!0,detectIframe:e=!1}=o;if(!r)return $;J&&!U&&(U=!0,Array.from(r.document.body.children).forEach(n=>n.addEventListener("click",$)),r.document.documentElement.addEventListener("click",$));let i=!0;const v=n=>b.some(c=>{if(typeof c=="string")return Array.from(r.document.querySelectorAll(c)).some(m=>m===n.target||n.composedPath().includes(m));{const m=k(c);return m&&(n.target===m||n.composedPath().includes(m))}}),h=[A(r,"click",n=>{const c=k(t);if(!(!c||c===n.target||n.composedPath().includes(c))){if(n.detail===0&&(i=!v(n)),!i){i=!0;return}u(n)}},{passive:!0,capture:p}),A(r,"pointerdown",n=>{const c=k(t);i=!v(n)&&!!(c&&!n.composedPath().includes(c))},{passive:!0}),e&&A(r,"blur",n=>{setTimeout(()=>{var c;const m=k(t);((c=r.document.activeElement)==null?void 0:c.tagName)==="IFRAME"&&!m?.contains(r.document.activeElement)&&u(n)},0)})].filter(Boolean);return()=>h.forEach(n=>n())}function ae(t,u={}){const{delayEnter:o=0,delayLeave:r=0,window:b=R}=u,p=C(!1);let e;const i=v=>{const f=v?o:r;e&&(clearTimeout(e),e=void 0),f?e=setTimeout(()=>p.value=v,f):p.value=v};return b&&(A(t,"mouseenter",()=>i(!0),{passive:!0}),A(t,"mouseleave",()=>i(!1),{passive:!0})),p}const K=1;function ie(t,u={}){const{throttle:o=0,idle:r=200,onStop:b=$,onScroll:p=$,offset:e={left:0,right:0,top:0,bottom:0},eventListenerOptions:i={capture:!1,passive:!0},behavior:v="auto",window:f=R}=u,h=C(0),y=C(0),n=j({get(){return h.value},set(a){m(a,void 0)}}),c=j({get(){return y.value},set(a){m(void 0,a)}});function m(a,L){var E,x,P;if(!f)return;const S=_(t);S&&((P=S instanceof Document?f.document.body:S)==null||P.scrollTo({top:(E=_(L))!=null?E:c.value,left:(x=_(a))!=null?x:n.value,behavior:_(v)}))}const T=C(!1),w=D({left:!0,right:!1,top:!0,bottom:!1}),s=D({left:!1,right:!1,top:!1,bottom:!1}),l=a=>{T.value&&(T.value=!1,s.left=!1,s.right=!1,s.top=!1,s.bottom=!1,b(a))},d=Q(l,o+r),g=a=>{var L;if(!f)return;const E=a.document?a.document.documentElement:(L=a.documentElement)!=null?L:a,{display:x,flexDirection:P}=getComputedStyle(E),S=E.scrollLeft;s.left=S<h.value,s.right=S>h.value;const M=Math.abs(S)<=0+(e.left||0),F=Math.abs(S)+E.clientWidth>=E.scrollWidth-(e.right||0)-K;x==="flex"&&P==="row-reverse"?(w.left=F,w.right=M):(w.left=M,w.right=F),h.value=S;let O=E.scrollTop;a===f.document&&!O&&(O=f.document.body.scrollTop),s.top=O<y.value,s.bottom=O>y.value;const I=Math.abs(O)<=0+(e.top||0),V=Math.abs(O)+E.clientHeight>=E.scrollHeight-(e.bottom||0)-K;x==="flex"&&P==="column-reverse"?(w.top=V,w.bottom=I):(w.top=I,w.bottom=V),y.value=O},H=a=>{var L;if(!f)return;const E=(L=a.target.documentElement)!=null?L:a.target;g(E),T.value=!0,d(a),p(a)};return A(t,"scroll",o?Y(H,o,!0,!1):H,i),G(()=>{const a=_(t);a&&g(a)}),A(t,"scrollend",l,i),{x:n,y:c,isScrolling:T,arrivedState:w,directions:s,measure(){const a=_(t);f&&a&&g(a)}}}function ce(t="history",u={}){const{initialValue:o={},removeNullishValues:r=!0,removeFalsyValues:b=!1,write:p=!0,window:e=R}=u;if(!e)return D(o);const i=D({});function v(){if(t==="history")return e.location.search||"";if(t==="hash"){const s=e.location.hash||"",l=s.indexOf("?");return l>0?s.slice(l):""}else return(e.location.hash||"").replace(/^#/,"")}function f(s){const l=s.toString();if(t==="history")return`${l?`?${l}`:""}${e.location.hash||""}`;if(t==="hash-params")return`${e.location.search||""}${l?`#${l}`:""}`;const d=e.location.hash||"#",g=d.indexOf("?");return g>0?`${d.slice(0,g)}${l?`?${l}`:""}`:`${d}${l?`?${l}`:""}`}function h(){return new URLSearchParams(v())}function y(s){const l=new Set(Object.keys(i));for(const d of s.keys()){const g=s.getAll(d);i[d]=g.length>1?g:s.get(d)||"",l.delete(d)}Array.from(l).forEach(d=>delete i[d])}const{pause:n,resume:c}=X(i,()=>{const s=new URLSearchParams("");Object.keys(i).forEach(l=>{const d=i[l];Array.isArray(d)?d.forEach(g=>s.append(l,g)):r&&d==null||b&&!d?s.delete(l):s.set(l,d)}),m(s)},{deep:!0});function m(s,l){n(),l&&y(s),e.history.replaceState(e.history.state,e.document.title,e.location.pathname+f(s)),c()}function T(){p&&m(h(),!0)}A(e,"popstate",T,!1),t!=="history"&&A(e,"hashchange",T,!1);const w=h();return w.keys().next().value?y(w):Object.assign(i,o),i}export{ie as a,ae as b,re as c,le as o,ce as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as g,u as h,a as d}from"./afetch.OifQZgwR.js";import"./server-data.4C60Esyt.js";import{r as b,b as v,c as p}from"./sf-utils.c42cbZ9W.js";import{f as O}from"./format-money.1_HtF5S2.js";const I={list_payments:{},calculate_shipping:{},apply_discount:{}},i=b(I);g.then(n=>{Object.assign(i,n)});const S=(n,r)=>{const{hostname:l}=window.location,{domain:o}=globalThis.$storefront.settings,a=l!=="localhost"&&l!=="127.0.0.1"?`https://${o}/_api/modules/`:"/_api/modules/";return d(`${a}${n}`,r)};{const n="MODULES_INFO",r=sessionStorage.getItem(n);if(r)try{const o=JSON.parse(r);o.__timestamp>=Date.now()-1e3*60*5?(delete o.__timestamp,Object.assign(i,o)):sessionStorage.removeItem(n)}catch{sessionStorage.removeItem(n)}v(()=>{const o=[];["list_payments","calculate_shipping"].forEach(a=>{Object.keys(i[a]).length||o.push({modName:a})}),Object.keys(h).length&&o.push({modName:"apply_discount",reqOptions:{method:"POST",body:{utm:h}}}),o.forEach(({modName:a,reqOptions:u})=>{S(a,u).then(async m=>{if(m.ok){const s={};i[a]=s;const{result:f}=await m.json();Array.isArray(f)&&f.forEach(({error:y,response:c})=>{if(!y){let t,e;switch(a){case"calculate_shipping":t="free_shipping_from_value",e=c[t],typeof e=="number"&&(s[t]===void 0||e<s[t])&&(s[t]=e);break;case"list_payments":t="installments_option",e=c[t],e&&(!s[t]||e.monthly_interest<s[t].monthly_interest||e.max_number>s[t].max_number)&&(s[t]=e),t="discount_option",e=c[t],e&&(!s[t]||e.value>s[t].value)&&c.payment_gateways.forEach(({discount:_})=>{_&&_.apply_at!=="freight"&&_.value===e.value&&(s[t]={apply_at:_.apply_at,...e})}),t="loyalty_points_programs",e=c[t],e&&(s[t]={...s[t],...e});break;default:t="available_extra_discount",e=c[t],e&&(!s[t]||e.value>s[t].value)&&(s[t]=e)}}}),sessionStorage.setItem(n,JSON.stringify({...i,__timestamp:Date.now()}))}}).catch(console.error)})})}const j=p(()=>i.calculate_shipping.free_shipping_from_value),$=p(()=>i.list_payments.installments_option),D=p(()=>i.list_payments.discount_option),F=p(()=>i.list_payments.loyalty_points_programs),J=p(()=>i.apply_discount.available_extra_discount),x=(n,r,l,o=O)=>p(()=>{const a=`{${l}}`,u=n.indexOf(a);if(u>-1){const m=i[r][l];if(m){const s=o(m);return n.substring(0,u)+s+n.substring(u+a.length)}return""}return n}),M=n=>x(n,"calculate_shipping","free_shipping_from_value");export{J as a,D as d,j as f,$ as i,F as l,M as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"./sf-utils.c42cbZ9W.js";import{i as n}from"./i18n.zhlBzJt8.js";const r=(e,i=t.get("lang"))=>i&&e.i18n&&e.i18n[i]?e.i18n[i]:e.name||e.title||n(e.i18n,i)||"",a=r;export{a as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let o,s;o=navigator.userAgent,s=document.body?document.body.offsetWidth:window.screen.width;const a=/Android|iPhone|iPad|iPod|webOS/i.test(o),c=s<640,d=s>=1024,i=["whatsapp","instagram","facebook","twitter","youtube","tiktok","pinterest","threads"],n={},r=()=>{if(!globalThis.$storefront)return;const{settings:e}=globalThis.$storefront;i.forEach(t=>{e[t]&&(n[t]=e[t])})};r();export{a,c as b,d as i,n as s};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var gs={};let St,pn;typeof window=="object"&&window?pn=St=window:typeof process=="object"&&gs?(pn=global,St=gs):pn=St=typeof self=="object"&&self||{};const Xr="en_us",zr="USD",el="$",tl="US",nl=1011,sl="5b1abe30a4d4531b8fe40725",rl=e=>{if(typeof document=="object"&&document){const t=document.getElementsByTagName("meta");for(let n=0;n<t.length;n++)if(t[n].getAttribute("name")===e.replace(/_/g,"-")){const s=t[n].getAttribute("content");return e==="ecom_store_id"?parseInt(s,10):s}}return St[e.toUpperCase()]},vn={};["lang","currency","currency_symbol","country_code","store_id","store_object_id"].forEach(e=>{vn[e]=rl("ecom_"+e)});const _o={get(e){const t=vn[e];if(t!=null&&t!=="")return t;switch(e){case"lang":return Xr;case"currency":return zr;case"currency_symbol":return el;case"country_code":return tl;case"store_id":return nl;case"store_object_id":return sl}return null},set(e,t){vn[e]=t}};/**
|
|
2
|
+
* @vue/shared v3.4.15
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/function $n(e,t){const n=new Set(e.split(","));return t?s=>n.has(s.toLowerCase()):s=>n.has(s)}const ee={},nt=[],Te=()=>{},ll=()=>!1,en=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Vs=e=>e.startsWith("onUpdate:"),ue=Object.assign,Vn=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},il=Object.prototype.hasOwnProperty,J=(e,t)=>il.call(e,t),U=Array.isArray,st=e=>wt(e)==="[object Map]",Ds=e=>wt(e)==="[object Set]",ps=e=>wt(e)==="[object Date]",V=e=>typeof e=="function",le=e=>typeof e=="string",De=e=>typeof e=="symbol",z=e=>e!==null&&typeof e=="object",Ks=e=>(z(e)||V(e))&&V(e.then)&&V(e.catch),Ws=Object.prototype.toString,wt=e=>Ws.call(e),ol=e=>wt(e).slice(8,-1),qs=e=>wt(e)==="[object Object]",Dn=e=>le(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,gt=$n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),tn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},cl=/-(\w)/g,Be=tn(e=>e.replace(cl,(t,n)=>n?n.toUpperCase():"")),fl=/\B([A-Z])/g,nn=tn(e=>e.replace(fl,"-$1").toLowerCase()),Kn=tn(e=>e.charAt(0).toUpperCase()+e.slice(1)),_n=tn(e=>e?`on${Kn(e)}`:""),Ke=(e,t)=>!Object.is(e,t),yn=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Wt=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},ul=e=>{const t=parseFloat(e);return isNaN(t)?e:t},al=e=>{const t=le(e)?Number(e):NaN;return isNaN(t)?e:t};let _s;const Gs=()=>_s||(_s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function sn(e){if(U(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=le(s)?pl(s):sn(s);if(r)for(const l in r)t[l]=r[l]}return t}else if(le(e)||z(e))return e}const dl=/;(?![^(]*\))/g,hl=/:([^]+)/,gl=/\/\*[^]*?\*\//g;function pl(e){const t={};return e.replace(gl,"").split(dl).forEach(n=>{if(n){const s=n.split(hl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function rn(e){let t="";if(le(e))t=e;else if(U(e))for(let n=0;n<e.length;n++){const s=rn(e[n]);s&&(t+=s+" ")}else if(z(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function yo(e){if(!e)return null;let{class:t,style:n}=e;return t&&!le(t)&&(e.class=rn(t)),n&&(e.style=sn(n)),e}const _l="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",mo=$n(_l);function bo(e){return!!e||e===""}function yl(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Ys(e[s],t[s]);return n}function Ys(e,t){if(e===t)return!0;let n=ps(e),s=ps(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=De(e),s=De(t),n||s)return e===t;if(n=U(e),s=U(t),n||s)return n&&s?yl(e,t):!1;if(n=z(e),s=z(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,l=Object.keys(t).length;if(r!==l)return!1;for(const i in e){const o=e.hasOwnProperty(i),f=t.hasOwnProperty(i);if(o&&!f||!o&&f||!Ys(e[i],t[i]))return!1}}return String(e)===String(t)}const xo=e=>le(e)?e:e==null?"":U(e)||z(e)&&(e.toString===Ws||!V(e.toString))?JSON.stringify(e,Js,2):String(e),Js=(e,t)=>t&&t.__v_isRef?Js(e,t.value):st(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],l)=>(n[mn(s,l)+" =>"]=r,n),{})}:Ds(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>mn(n))}:De(t)?mn(t):z(t)&&!U(t)&&!qs(t)?String(t):t,mn=(e,t="")=>{var n;return De(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
|
+
* @vue/reactivity v3.4.15
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let me;class ml{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=me,!t&&me&&(this.index=(me.scopes||(me.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=me;try{return me=this,t()}finally{me=n}}}on(){me=this}off(){me=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.scopes)for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function bl(e,t=me){t&&t.active&&t.effects.push(e)}function xl(){return me}function Co(e){me&&me.cleanups.push(e)}let Ze;class Wn{constructor(t,n,s,r){this.fn=t,this.trigger=n,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,bl(this,r)}get dirty(){if(this._dirtyLevel===1){Xe();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(Cl(n.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),ze()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=$e,n=Ze;try{return $e=!0,Ze=this,this._runnings++,ys(this),this.fn()}finally{ms(this),this._runnings--,Ze=n,$e=t}}stop(){var t;this.active&&(ys(this),ms(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function Cl(e){return e.value}function ys(e){e._trackId++,e._depsLength=0}function ms(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Zs(e.deps[t],e);e.deps.length=e._depsLength}}function Zs(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let $e=!0,An=0;const Qs=[];function Xe(){Qs.push($e),$e=!1}function ze(){const e=Qs.pop();$e=e===void 0?!0:e}function qn(){An++}function Gn(){for(An--;!An&&Fn.length;)Fn.shift()()}function Xs(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const s=e.deps[e._depsLength];s!==t?(s&&Zs(s,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Fn=[];function zs(e,t,n){qn();for(const s of e.keys())if(s._dirtyLevel<t&&e.get(s)===s._trackId){const r=s._dirtyLevel;s._dirtyLevel=t,r===0&&(s._shouldSchedule=!0,s.trigger())}er(e),Gn()}function er(e){for(const t of e.keys())t.scheduler&&t._shouldSchedule&&(!t._runnings||t.allowRecurse)&&e.get(t)===t._trackId&&(t._shouldSchedule=!1,Fn.push(t.scheduler))}const tr=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},qt=new WeakMap,Qe=Symbol(""),In=Symbol("");function _e(e,t,n){if($e&&Ze){let s=qt.get(e);s||qt.set(e,s=new Map);let r=s.get(n);r||s.set(n,r=tr(()=>s.delete(n))),Xs(Ze,r)}}function Le(e,t,n,s,r,l){const i=qt.get(e);if(!i)return;let o=[];if(t==="clear")o=[...i.values()];else if(n==="length"&&U(e)){const f=Number(s);i.forEach((a,h)=>{(h==="length"||!De(h)&&h>=f)&&o.push(a)})}else switch(n!==void 0&&o.push(i.get(n)),t){case"add":U(e)?Dn(n)&&o.push(i.get("length")):(o.push(i.get(Qe)),st(e)&&o.push(i.get(In)));break;case"delete":U(e)||(o.push(i.get(Qe)),st(e)&&o.push(i.get(In)));break;case"set":st(e)&&o.push(i.get(Qe));break}qn();for(const f of o)f&&zs(f,2);Gn()}function Tl(e,t){var n;return(n=qt.get(e))==null?void 0:n.get(t)}const wl=$n("__proto__,__v_isRef,__isVue"),nr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(De)),bs=El();function El(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=Z(this);for(let l=0,i=this.length;l<i;l++)_e(s,"get",l+"");const r=s[t](...n);return r===-1||r===!1?s[t](...n.map(Z)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Xe(),qn();const s=Z(this)[t].apply(this,n);return Gn(),ze(),s}}),e}function vl(e){const t=Z(this);return _e(t,"has",e),t.hasOwnProperty(e)}class sr{constructor(t=!1,n=!1){this._isReadonly=t,this._shallow=n}get(t,n,s){const r=this._isReadonly,l=this._shallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return l;if(n==="__v_raw")return s===(r?l?Hl:or:l?ir:lr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=U(t);if(!r){if(i&&J(bs,n))return Reflect.get(bs,n,s);if(n==="hasOwnProperty")return vl}const o=Reflect.get(t,n,s);return(De(n)?nr.has(n):wl(n))||(r||_e(t,"get",n),l)?o:ae(o)?i&&Dn(n)?o:o.value:z(o)?r?cr(o):Zn(o):o}}class rr extends sr{constructor(t=!1){super(!1,t)}set(t,n,s,r){let l=t[n];if(!this._shallow){const f=ct(l);if(!Gt(s)&&!ct(s)&&(l=Z(l),s=Z(s)),!U(t)&&ae(l)&&!ae(s))return f?!1:(l.value=s,!0)}const i=U(t)&&Dn(n)?Number(n)<t.length:J(t,n),o=Reflect.set(t,n,s,r);return t===Z(r)&&(i?Ke(s,l)&&Le(t,"set",n,s):Le(t,"add",n,s)),o}deleteProperty(t,n){const s=J(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&Le(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!De(n)||!nr.has(n))&&_e(t,"has",n),s}ownKeys(t){return _e(t,"iterate",U(t)?"length":Qe),Reflect.ownKeys(t)}}class Al extends sr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Fl=new rr,Il=new Al,Rl=new rr(!0),Yn=e=>e,ln=e=>Reflect.getPrototypeOf(e);function Rt(e,t,n=!1,s=!1){e=e.__v_raw;const r=Z(e),l=Z(t);n||(Ke(t,l)&&_e(r,"get",t),_e(r,"get",l));const{has:i}=ln(r),o=s?Yn:n?Xn:mt;if(i.call(r,t))return o(e.get(t));if(i.call(r,l))return o(e.get(l));e!==r&&e.get(t)}function Ot(e,t=!1){const n=this.__v_raw,s=Z(n),r=Z(e);return t||(Ke(e,r)&&_e(s,"has",e),_e(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function Mt(e,t=!1){return e=e.__v_raw,!t&&_e(Z(e),"iterate",Qe),Reflect.get(e,"size",e)}function xs(e){e=Z(e);const t=Z(this);return ln(t).has.call(t,e)||(t.add(e),Le(t,"add",e,e)),this}function Cs(e,t){t=Z(t);const n=Z(this),{has:s,get:r}=ln(n);let l=s.call(n,e);l||(e=Z(e),l=s.call(n,e));const i=r.call(n,e);return n.set(e,t),l?Ke(t,i)&&Le(n,"set",e,t):Le(n,"add",e,t),this}function Ts(e){const t=Z(this),{has:n,get:s}=ln(t);let r=n.call(t,e);r||(e=Z(e),r=n.call(t,e)),s&&s.call(t,e);const l=t.delete(e);return r&&Le(t,"delete",e,void 0),l}function ws(){const e=Z(this),t=e.size!==0,n=e.clear();return t&&Le(e,"clear",void 0,void 0),n}function Pt(e,t){return function(s,r){const l=this,i=l.__v_raw,o=Z(i),f=t?Yn:e?Xn:mt;return!e&&_e(o,"iterate",Qe),i.forEach((a,h)=>s.call(r,f(a),f(h),l))}}function Lt(e,t,n){return function(...s){const r=this.__v_raw,l=Z(r),i=st(l),o=e==="entries"||e===Symbol.iterator&&i,f=e==="keys"&&i,a=r[e](...s),h=n?Yn:t?Xn:mt;return!t&&_e(l,"iterate",f?In:Qe),{next(){const{value:d,done:_}=a.next();return _?{value:d,done:_}:{value:o?[h(d[0]),h(d[1])]:h(d),done:_}},[Symbol.iterator](){return this}}}}function Ne(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ol(){const e={get(l){return Rt(this,l)},get size(){return Mt(this)},has:Ot,add:xs,set:Cs,delete:Ts,clear:ws,forEach:Pt(!1,!1)},t={get(l){return Rt(this,l,!1,!0)},get size(){return Mt(this)},has:Ot,add:xs,set:Cs,delete:Ts,clear:ws,forEach:Pt(!1,!0)},n={get(l){return Rt(this,l,!0)},get size(){return Mt(this,!0)},has(l){return Ot.call(this,l,!0)},add:Ne("add"),set:Ne("set"),delete:Ne("delete"),clear:Ne("clear"),forEach:Pt(!0,!1)},s={get(l){return Rt(this,l,!0,!0)},get size(){return Mt(this,!0)},has(l){return Ot.call(this,l,!0)},add:Ne("add"),set:Ne("set"),delete:Ne("delete"),clear:Ne("clear"),forEach:Pt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(l=>{e[l]=Lt(l,!1,!1),n[l]=Lt(l,!0,!1),t[l]=Lt(l,!1,!0),s[l]=Lt(l,!0,!0)}),[e,n,t,s]}const[Ml,Pl,Ll,Bl]=Ol();function Jn(e,t){const n=t?e?Bl:Ll:e?Pl:Ml;return(s,r,l)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(J(n,r)&&r in s?n:s,r,l)}const kl={get:Jn(!1,!1)},Nl={get:Jn(!1,!0)},jl={get:Jn(!0,!1)},lr=new WeakMap,ir=new WeakMap,or=new WeakMap,Hl=new WeakMap;function Sl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ul(e){return e.__v_skip||!Object.isExtensible(e)?0:Sl(ol(e))}function Zn(e){return ct(e)?e:Qn(e,!1,Fl,kl,lr)}function $l(e){return Qn(e,!1,Rl,Nl,ir)}function cr(e){return Qn(e,!0,Il,jl,or)}function Qn(e,t,n,s,r){if(!z(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const l=r.get(e);if(l)return l;const i=Ul(e);if(i===0)return e;const o=new Proxy(e,i===2?s:n);return r.set(e,o),o}function rt(e){return ct(e)?rt(e.__v_raw):!!(e&&e.__v_isReactive)}function ct(e){return!!(e&&e.__v_isReadonly)}function Gt(e){return!!(e&&e.__v_isShallow)}function fr(e){return rt(e)||ct(e)}function Z(e){const t=e&&e.__v_raw;return t?Z(t):e}function ur(e){return Wt(e,"__v_skip",!0),e}const mt=e=>z(e)?Zn(e):e,Xn=e=>z(e)?cr(e):e;class ar{constructor(t,n,s,r){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Wn(()=>t(this._value),()=>Ut(this,1),()=>this.dep&&er(this.dep)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=s}get value(){const t=Z(this);return(!t._cacheable||t.effect.dirty)&&Ke(t._value,t._value=t.effect.run())&&Ut(t,2),dr(t),t.effect._dirtyLevel>=1&&Ut(t,1),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Vl(e,t,n=!1){let s,r;const l=V(e);return l?(s=e,r=Te):(s=e.get,r=e.set),new ar(s,r,l||!r,n)}function dr(e){$e&&Ze&&(e=Z(e),Xs(Ze,e.dep||(e.dep=tr(()=>e.dep=void 0,e instanceof ar?e:void 0))))}function Ut(e,t=2,n){e=Z(e);const s=e.dep;s&&zs(s,t)}function ae(e){return!!(e&&e.__v_isRef===!0)}function $t(e){return hr(e,!1)}function To(e){return hr(e,!0)}function hr(e,t){return ae(e)?e:new Dl(e,t)}class Dl{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Z(t),this._value=n?t:mt(t)}get value(){return dr(this),this._value}set value(t){const n=this.__v_isShallow||Gt(t)||ct(t);t=n?t:Z(t),Ke(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:mt(t),Ut(this,2))}}function Kl(e){return ae(e)?e.value:e}const Wl={get:(e,t,n)=>Kl(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ae(r)&&!ae(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function gr(e){return rt(e)?e:new Proxy(e,Wl)}class ql{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Tl(Z(this._object),this._key)}}class Gl{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function wo(e,t,n){return ae(e)?e:V(e)?new Gl(e):z(e)&&arguments.length>1?Yl(e,t,n):$t(e)}function Yl(e,t,n){const s=e[t];return ae(s)?s:new ql(e,t,n)}/**
|
|
10
|
+
* @vue/runtime-core v3.4.15
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/function Ve(e,t,n,s){let r;try{r=s?e(...s):e()}catch(l){at(l,t,n)}return r}function ve(e,t,n,s){if(V(e)){const l=Ve(e,t,n,s);return l&&Ks(l)&&l.catch(i=>{at(i,t,n)}),l}const r=[];for(let l=0;l<e.length;l++)r.push(ve(e[l],t,n,s));return r}function at(e,t,n,s=!0){const r=t?t.vnode:null;if(t){let l=t.parent;const i=t.proxy,o=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const a=l.ec;if(a){for(let h=0;h<a.length;h++)if(a[h](e,i,o)===!1)return}l=l.parent}const f=t.appContext.config.errorHandler;if(f){Ve(f,null,10,[e,i,o]);return}}Jl(e,n,r,s)}function Jl(e,t,n,s=!0){console.error(e)}let bt=!1,Rn=!1;const fe=[];let Re=0;const lt=[];let He=null,Ye=0;const pr=Promise.resolve();let zn=null;function Zl(e){const t=zn||pr;return e?t.then(this?e.bind(this):e):t}function Ql(e){let t=Re+1,n=fe.length;for(;t<n;){const s=t+n>>>1,r=fe[s],l=xt(r);l<e||l===e&&r.pre?t=s+1:n=s}return t}function on(e){(!fe.length||!fe.includes(e,bt&&e.allowRecurse?Re+1:Re))&&(e.id==null?fe.push(e):fe.splice(Ql(e.id),0,e),_r())}function _r(){!bt&&!Rn&&(Rn=!0,zn=pr.then(yr))}function Xl(e){const t=fe.indexOf(e);t>Re&&fe.splice(t,1)}function On(e){U(e)?lt.push(...e):(!He||!He.includes(e,e.allowRecurse?Ye+1:Ye))&<.push(e),_r()}function Es(e,t,n=bt?Re+1:0){for(;n<fe.length;n++){const s=fe[n];if(s&&s.pre){if(e&&s.id!==e.uid)continue;fe.splice(n,1),n--,s()}}}function Yt(e){if(lt.length){const t=[...new Set(lt)].sort((n,s)=>xt(n)-xt(s));if(lt.length=0,He){He.push(...t);return}for(He=t,Ye=0;Ye<He.length;Ye++)He[Ye]();He=null,Ye=0}}const xt=e=>e.id==null?1/0:e.id,zl=(e,t)=>{const n=xt(e)-xt(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function yr(e){Rn=!1,bt=!0,fe.sort(zl);try{for(Re=0;Re<fe.length;Re++){const t=fe[Re];t&&t.active!==!1&&Ve(t,null,14)}}finally{Re=0,fe.length=0,Yt(),bt=!1,zn=null,(fe.length||lt.length)&&yr()}}function ei(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ee;let r=n;const l=t.startsWith("update:"),i=l&&t.slice(7);if(i&&i in s){const h=`${i==="modelValue"?"model":i}Modifiers`,{number:d,trim:_}=s[h]||ee;_&&(r=n.map(v=>le(v)?v.trim():v)),d&&(r=n.map(ul))}let o,f=s[o=_n(t)]||s[o=_n(Be(t))];!f&&l&&(f=s[o=_n(nn(t))]),f&&ve(f,e,6,r);const a=s[o+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[o])return;e.emitted[o]=!0,ve(a,e,6,r)}}function mr(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const l=e.emits;let i={},o=!1;if(!V(e)){const f=a=>{const h=mr(a,t,!0);h&&(o=!0,ue(i,h))};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!l&&!o?(z(e)&&s.set(e,null),null):(U(l)?l.forEach(f=>i[f]=null):ue(i,l),z(e)&&s.set(e,i),i)}function cn(e,t){return!e||!en(t)?!1:(t=t.slice(2).replace(/Once$/,""),J(e,t[0].toLowerCase()+t.slice(1))||J(e,nn(t))||J(e,t))}let re=null,br=null;function Jt(e){const t=re;return re=e,br=e&&e.type.__scopeId||null,t}function ti(e,t=re,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&Ss(-1);const l=Jt(t);let i;try{i=e(...r)}finally{Jt(l),s._d&&Ss(1)}return i};return s._n=!0,s._c=!0,s._d=!0,s}function bn(e){const{type:t,vnode:n,proxy:s,withProxy:r,props:l,propsOptions:[i],slots:o,attrs:f,emit:a,render:h,renderCache:d,data:_,setupState:v,ctx:R,inheritAttrs:P}=e;let S,W;const K=Jt(e);try{if(n.shapeFlag&4){const T=r||s,C=T;S=Ce(h.call(C,T,d,l,v,_,R)),W=f}else{const T=t;S=Ce(T.length>1?T(l,{attrs:f,slots:o,emit:a}):T(l,null)),W=t.props?f:si(f)}}catch(T){yt.length=0,at(T,e,1),S=ne(he)}let g=S;if(W&&P!==!1){const T=Object.keys(W),{shapeFlag:C}=g;T.length&&C&7&&(i&&T.some(Vs)&&(W=ri(W,i)),g=We(g,W))}return n.dirs&&(g=We(g),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&(g.transition=n.transition),S=g,Jt(K),S}function ni(e,t=!0){let n;for(let s=0;s<e.length;s++){const r=e[s];if(Tt(r)){if(r.type!==he||r.children==="v-if"){if(n)return;n=r}}else return}return n}const si=e=>{let t;for(const n in e)(n==="class"||n==="style"||en(n))&&((t||(t={}))[n]=e[n]);return t},ri=(e,t)=>{const n={};for(const s in e)(!Vs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function li(e,t,n){const{props:s,children:r,component:l}=e,{props:i,children:o,patchFlag:f}=t,a=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&f>=0){if(f&1024)return!0;if(f&16)return s?vs(s,i,a):!!i;if(f&8){const h=t.dynamicProps;for(let d=0;d<h.length;d++){const _=h[d];if(i[_]!==s[_]&&!cn(a,_))return!0}}}else return(r||o)&&(!o||!o.$stable)?!0:s===i?!1:s?i?vs(s,i,a):!0:!!i;return!1}function vs(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const l=s[r];if(t[l]!==e[l]&&!cn(n,l))return!0}return!1}function es({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s===e)(e=t.vnode).el=n,t=t.parent;else break}}const ts="components";function Eo(e,t){return Cr(ts,e,!0,t)||e}const xr=Symbol.for("v-ndc");function vo(e){return le(e)?Cr(ts,e,!1)||e:e||xr}function Cr(e,t,n=!0,s=!1){const r=re||oe;if(r){const l=r.type;if(e===ts){const o=co(l,!1);if(o&&(o===t||o===Be(t)||o===Kn(Be(t))))return l}const i=As(r[e]||l[e],t)||As(r.appContext[e],t);return!i&&s?l:i}}function As(e,t){return e&&(e[t]||e[Be(t)]||e[Kn(Be(t))])}const ii=e=>e.__isSuspense;let Mn=0;const oi={name:"Suspense",__isSuspense:!0,process(e,t,n,s,r,l,i,o,f,a){if(e==null)ci(t,n,s,r,l,i,o,f,a);else{if(l&&l.deps>0){t.suspense=e.suspense;return}fi(e,t,n,s,r,i,o,f,a)}},hydrate:ui,create:ns,normalize:ai},Ao=oi;function Ct(e,t){const n=e.props&&e.props[t];V(n)&&n()}function ci(e,t,n,s,r,l,i,o,f){const{p:a,o:{createElement:h}}=f,d=h("div"),_=e.suspense=ns(e,r,s,t,d,n,l,i,o,f);a(null,_.pendingBranch=e.ssContent,d,null,s,_,l,i),_.deps>0?(Ct(e,"onPending"),Ct(e,"onFallback"),a(null,e.ssFallback,t,n,s,null,l,i),it(_,e.ssFallback)):_.resolve(!1,!0)}function fi(e,t,n,s,r,l,i,o,{p:f,um:a,o:{createElement:h}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const _=t.ssContent,v=t.ssFallback,{activeBranch:R,pendingBranch:P,isInFallback:S,isHydrating:W}=d;if(P)d.pendingBranch=_,Oe(_,P)?(f(P,_,d.hiddenContainer,null,r,d,l,i,o),d.deps<=0?d.resolve():S&&(W||(f(R,v,n,s,r,null,l,i,o),it(d,v)))):(d.pendingId=Mn++,W?(d.isHydrating=!1,d.activeBranch=P):a(P,r,d),d.deps=0,d.effects.length=0,d.hiddenContainer=h("div"),S?(f(null,_,d.hiddenContainer,null,r,d,l,i,o),d.deps<=0?d.resolve():(f(R,v,n,s,r,null,l,i,o),it(d,v))):R&&Oe(_,R)?(f(R,_,n,s,r,d,l,i,o),d.resolve(!0)):(f(null,_,d.hiddenContainer,null,r,d,l,i,o),d.deps<=0&&d.resolve()));else if(R&&Oe(_,R))f(R,_,n,s,r,d,l,i,o),it(d,_);else if(Ct(t,"onPending"),d.pendingBranch=_,_.shapeFlag&512?d.pendingId=_.component.suspenseId:d.pendingId=Mn++,f(null,_,d.hiddenContainer,null,r,d,l,i,o),d.deps<=0)d.resolve();else{const{timeout:K,pendingId:g}=d;K>0?setTimeout(()=>{d.pendingId===g&&d.fallback(v)},K):K===0&&d.fallback(v)}}function ns(e,t,n,s,r,l,i,o,f,a,h=!1){const{p:d,m:_,um:v,n:R,o:{parentNode:P,remove:S}}=a;let W;const K=di(e);K&&t?.pendingBranch&&(W=t.pendingId,t.deps++);const g=e.props?al(e.props.timeout):void 0,T=l,C={vnode:e,parent:t,parentComponent:n,namespace:i,container:s,hiddenContainer:r,deps:0,pendingId:Mn++,timeout:typeof g=="number"?g:-1,activeBranch:null,pendingBranch:null,isInFallback:!h,isHydrating:h,isUnmounted:!1,effects:[],resolve(b=!1,B=!1){const{vnode:F,activeBranch:L,pendingBranch:O,pendingId:D,effects:Y,parentComponent:Q,container:ce}=C;let se=!1;C.isHydrating?C.isHydrating=!1:b||(se=L&&O.transition&&O.transition.mode==="out-in",se&&(L.transition.afterLeave=()=>{D===C.pendingId&&(_(O,ce,l===T?R(L):l,0),On(Y))}),L&&(P(L.el)!==C.hiddenContainer&&(l=R(L)),v(L,Q,C,!0)),se||_(O,ce,l,0)),it(C,O),C.pendingBranch=null,C.isInFallback=!1;let k=C.parent,q=!1;for(;k;){if(k.pendingBranch){k.effects.push(...Y),q=!0;break}k=k.parent}!q&&!se&&On(Y),C.effects=[],K&&t&&t.pendingBranch&&W===t.pendingId&&(t.deps--,t.deps===0&&!B&&t.resolve()),Ct(F,"onResolve")},fallback(b){if(!C.pendingBranch)return;const{vnode:B,activeBranch:F,parentComponent:L,container:O,namespace:D}=C;Ct(B,"onFallback");const Y=R(F),Q=()=>{C.isInFallback&&(d(null,b,O,Y,L,null,D,o,f),it(C,b))},ce=b.transition&&b.transition.mode==="out-in";ce&&(F.transition.afterLeave=Q),C.isInFallback=!0,v(F,L,null,!0),ce||Q()},move(b,B,F){C.activeBranch&&_(C.activeBranch,b,B,F),C.container=b},next(){return C.activeBranch&&R(C.activeBranch)},registerDep(b,B){const F=!!C.pendingBranch;F&&C.deps++;const L=b.vnode.el;b.asyncDep.catch(O=>{at(O,b,0)}).then(O=>{if(b.isUnmounted||C.isUnmounted||C.pendingId!==b.suspenseId)return;b.asyncResolved=!0;const{vnode:D}=b;Un(b,O,!1),L&&(D.el=L);const Y=!L&&b.subTree.el;B(b,D,P(L||b.subTree.el),L?null:R(b.subTree),C,i,f),Y&&S(Y),es(b,D.el),F&&--C.deps===0&&C.resolve()})},unmount(b,B){C.isUnmounted=!0,C.activeBranch&&v(C.activeBranch,n,b,B),C.pendingBranch&&v(C.pendingBranch,n,b,B)}};return C}function ui(e,t,n,s,r,l,i,o,f){const a=t.suspense=ns(t,s,n,e.parentNode,document.createElement("div"),null,r,l,i,o,!0),h=f(e,a.pendingBranch=t.ssContent,n,a,l,i);return a.deps===0&&a.resolve(!1,!0),h}function ai(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=Fs(s?n.default:n),e.ssFallback=s?Fs(n.fallback):ne(he)}function Fs(e){let t;if(V(e)){const n=ut&&e._c;n&&(e._d=!1,os()),e=e(),n&&(e._d=!0,t=we,Vr())}return U(e)&&(e=ni(e)),e=Ce(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Tr(e,t){t&&t.pendingBranch?U(e)?t.effects.push(...e):t.effects.push(e):On(e)}function it(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;n.el=r,s&&s.subTree===n&&(s.vnode.el=r,es(s,r))}function di(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}const hi=Symbol.for("v-scx"),gi=()=>Vt(hi);function Fo(e,t){return ss(e,null,t)}const Bt={};function xn(e,t,n){return ss(e,t,n)}function ss(e,t,{immediate:n,deep:s,flush:r,once:l,onTrack:i,onTrigger:o}=ee){if(t&&l){const b=t;t=(...B)=>{b(...B),C()}}const f=oe,a=b=>s===!0?b:Je(b,s===!1?1:void 0);let h,d=!1,_=!1;if(ae(e)?(h=()=>e.value,d=Gt(e)):rt(e)?(h=()=>a(e),d=!0):U(e)?(_=!0,d=e.some(b=>rt(b)||Gt(b)),h=()=>e.map(b=>{if(ae(b))return b.value;if(rt(b))return a(b);if(V(b))return Ve(b,f,2)})):V(e)?t?h=()=>Ve(e,f,2):h=()=>(v&&v(),ve(e,f,3,[R])):h=Te,t&&s){const b=h;h=()=>Je(b())}let v,R=b=>{v=g.onStop=()=>{Ve(b,f,4),v=g.onStop=void 0}},P;if(At)if(R=Te,t?n&&ve(t,f,3,[h(),_?[]:void 0,R]):h(),r==="sync"){const b=gi();P=b.__watcherHandles||(b.__watcherHandles=[])}else return Te;let S=_?new Array(e.length).fill(Bt):Bt;const W=()=>{if(!(!g.active||!g.dirty))if(t){const b=g.run();(s||d||(_?b.some((B,F)=>Ke(B,S[F])):Ke(b,S)))&&(v&&v(),ve(t,f,3,[b,S===Bt?void 0:_&&S[0]===Bt?[]:S,R]),S=b)}else g.run()};W.allowRecurse=!!t;let K;r==="sync"?K=W:r==="post"?K=()=>ge(W,f&&f.suspense):(W.pre=!0,f&&(W.id=f.uid),K=()=>on(W));const g=new Wn(h,Te,K),T=xl(),C=()=>{g.stop(),T&&Vn(T.effects,g)};return t?n?W():S=g.run():r==="post"?ge(g.run.bind(g),f&&f.suspense):g.run(),P&&P.push(C),C}function pi(e,t,n){const s=this.proxy,r=le(e)?e.includes(".")?wr(s,e):()=>s[e]:e.bind(s,s);let l;V(t)?l=t:(l=t.handler,n=t);const i=vt(this),o=ss(r,l.bind(s),n);return i(),o}function wr(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}function Je(e,t,n=0,s){if(!z(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if(s=s||new Set,s.has(e))return e;if(s.add(e),ae(e))Je(e.value,t,n,s);else if(U(e))for(let r=0;r<e.length;r++)Je(e[r],t,n,s);else if(Ds(e)||st(e))e.forEach(r=>{Je(r,t,n,s)});else if(qs(e))for(const r in e)Je(e[r],t,n,s);return e}function Io(e,t){if(re===null)return e;const n=an(re)||re.proxy,s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[l,i,o,f=ee]=t[r];l&&(V(l)&&(l={mounted:l,updated:l}),l.deep&&Je(i),s.push({dir:l,instance:n,value:i,oldValue:void 0,arg:o,modifiers:f}))}return e}function Ie(e,t,n,s){const r=e.dirs,l=t&&t.dirs;for(let i=0;i<r.length;i++){const o=r[i];l&&(o.oldValue=l[i].value);let f=o.dir[s];f&&(Xe(),ve(f,n,8,[e.el,o,e,t]),ze())}}const Se=Symbol("_leaveCb"),kt=Symbol("_enterCb");function _i(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Fr(()=>{e.isMounted=!0}),Ir(()=>{e.isUnmounting=!0}),e}const be=[Function,Array],yi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:be,onEnter:be,onAfterEnter:be,onEnterCancelled:be,onBeforeLeave:be,onLeave:be,onAfterLeave:be,onLeaveCancelled:be,onBeforeAppear:be,onAppear:be,onAfterAppear:be,onAppearCancelled:be},mi={name:"BaseTransition",props:yi,setup(e,{slots:t}){const n=so(),s=_i();let r;return()=>{const l=t.default&&vr(t.default(),!0);if(!l||!l.length)return;let i=l[0];if(l.length>1){for(const P of l)if(P.type!==he){i=P;break}}const o=Z(e),{mode:f}=o;if(s.isLeaving)return Cn(i);const a=Is(i);if(!a)return Cn(i);const h=Pn(a,o,s,n);Ln(a,h);const d=n.subTree,_=d&&Is(d);let v=!1;const{getTransitionKey:R}=a.type;if(R){const P=R();r===void 0?r=P:P!==r&&(r=P,v=!0)}if(_&&_.type!==he&&(!Oe(a,_)||v)){const P=Pn(_,o,s,n);if(Ln(_,P),f==="out-in")return s.isLeaving=!0,P.afterLeave=()=>{s.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Cn(i);f==="in-out"&&a.type!==he&&(P.delayLeave=(S,W,K)=>{const g=Er(s,_);g[String(_.key)]=_,S[Se]=()=>{W(),S[Se]=void 0,delete h.delayedLeave},h.delayedLeave=K})}return i}}},Ro=mi;function Er(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Pn(e,t,n,s){const{appear:r,mode:l,persisted:i=!1,onBeforeEnter:o,onEnter:f,onAfterEnter:a,onEnterCancelled:h,onBeforeLeave:d,onLeave:_,onAfterLeave:v,onLeaveCancelled:R,onBeforeAppear:P,onAppear:S,onAfterAppear:W,onAppearCancelled:K}=t,g=String(e.key),T=Er(n,e),C=(F,L)=>{F&&ve(F,s,9,L)},b=(F,L)=>{const O=L[1];C(F,L),U(F)?F.every(D=>D.length<=1)&&O():F.length<=1&&O()},B={mode:l,persisted:i,beforeEnter(F){let L=o;if(!n.isMounted)if(r)L=P||o;else return;F[Se]&&F[Se](!0);const O=T[g];O&&Oe(e,O)&&O.el[Se]&&O.el[Se](),C(L,[F])},enter(F){let L=f,O=a,D=h;if(!n.isMounted)if(r)L=S||f,O=W||a,D=K||h;else return;let Y=!1;const Q=F[kt]=ce=>{Y||(Y=!0,ce?C(D,[F]):C(O,[F]),B.delayedLeave&&B.delayedLeave(),F[kt]=void 0)};L?b(L,[F,Q]):Q()},leave(F,L){const O=String(e.key);if(F[kt]&&F[kt](!0),n.isUnmounting)return L();C(d,[F]);let D=!1;const Y=F[Se]=Q=>{D||(D=!0,L(),Q?C(R,[F]):C(v,[F]),F[Se]=void 0,T[O]===e&&delete T[O])};T[O]=e,_?b(_,[F,Y]):Y()},clone(F){return Pn(F,t,n,s)}};return B}function Cn(e){if(Et(e))return e=We(e),e.children=null,e}function Is(e){return Et(e)?e.children?e.children[0]:void 0:e}function Ln(e,t){e.shapeFlag&6&&e.component?Ln(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function vr(e,t=!1,n){let s=[],r=0;for(let l=0;l<e.length;l++){let i=e[l];const o=n==null?i.key:String(n)+String(i.key!=null?i.key:l);i.type===pe?(i.patchFlag&128&&r++,s=s.concat(vr(i.children,t,o))):(t||i.type!==he)&&s.push(o!=null?We(i,{key:o}):i)}if(r>1)for(let l=0;l<s.length;l++)s[l].patchFlag=-2;return s}/*! #__NO_SIDE_EFFECTS__ */function bi(e,t){return V(e)?ue({name:e.name},t,{setup:e}):e}const ot=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Oo(e){V(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,timeout:l,suspensible:i=!0,onError:o}=e;let f=null,a,h=0;const d=()=>(h++,f=null,_()),_=()=>{let v;return f||(v=f=t().catch(R=>{if(R=R instanceof Error?R:new Error(String(R)),o)return new Promise((P,S)=>{o(R,()=>P(d()),()=>S(R),h+1)});throw R}).then(R=>v!==f&&f?f:(R&&(R.__esModule||R[Symbol.toStringTag]==="Module")&&(R=R.default),a=R,R)))};return bi({name:"AsyncComponentWrapper",__asyncLoader:_,get __asyncResolved(){return a},setup(){const v=oe;if(a)return()=>Tn(a,v);const R=K=>{f=null,at(K,v,13,!s)};if(i&&v.suspense||At)return _().then(K=>()=>Tn(K,v)).catch(K=>(R(K),()=>s?ne(s,{error:K}):null));const P=$t(!1),S=$t(),W=$t(!!r);return r&&setTimeout(()=>{W.value=!1},r),l!=null&&setTimeout(()=>{if(!P.value&&!S.value){const K=new Error(`Async component timed out after ${l}ms.`);R(K),S.value=K}},l),_().then(()=>{P.value=!0,v.parent&&Et(v.parent.vnode)&&(v.parent.effect.dirty=!0,on(v.parent.update))}).catch(K=>{R(K),S.value=K}),()=>{if(P.value&&a)return Tn(a,v);if(S.value&&s)return ne(s,{error:S.value});if(n&&!W.value)return ne(n)}}})}function Tn(e,t){const{ref:n,props:s,children:r,ce:l}=t.vnode,i=ne(e,s,r);return i.ref=n,i.ce=l,delete t.vnode.ce,i}const Et=e=>e.type.__isKeepAlive;function xi(e,t){Ar(e,"a",t)}function Ci(e,t){Ar(e,"da",t)}function Ar(e,t,n=oe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(fn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Et(r.parent.vnode)&&Ti(s,t,n,r),r=r.parent}}function Ti(e,t,n,s){const r=fn(t,e,s,!0);Rr(()=>{Vn(s[t],r)},n)}function fn(e,t,n=oe,s=!1){if(n){const r=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;Xe();const o=vt(n),f=ve(t,n,e,i);return o(),ze(),f});return s?r.unshift(l):r.push(l),l}}const ke=e=>(t,n=oe)=>(!At||e==="sp")&&fn(e,(...s)=>t(...s),n),wi=ke("bm"),Fr=ke("m"),Ei=ke("bu"),vi=ke("u"),Ir=ke("bum"),Rr=ke("um"),Ai=ke("sp"),Fi=ke("rtg"),Ii=ke("rtc");function Ri(e,t=oe){fn("ec",e,t)}function Mo(e,t,n,s){let r;const l=n&&n[s];if(U(e)||le(e)){r=new Array(e.length);for(let i=0,o=e.length;i<o;i++)r[i]=t(e[i],i,void 0,l&&l[i])}else if(typeof e=="number"){r=new Array(e);for(let i=0;i<e;i++)r[i]=t(i+1,i,void 0,l&&l[i])}else if(z(e))if(e[Symbol.iterator])r=Array.from(e,(i,o)=>t(i,o,void 0,l&&l[o]));else{const i=Object.keys(e);r=new Array(i.length);for(let o=0,f=i.length;o<f;o++){const a=i[o];r[o]=t(e[a],a,o,l&&l[o])}}else r=[];return n&&(n[s]=r),r}function Po(e,t){for(let n=0;n<t.length;n++){const s=t[n];if(U(s))for(let r=0;r<s.length;r++)e[s[r].name]=s[r].fn;else s&&(e[s.name]=s.key?(...r)=>{const l=s.fn(...r);return l&&(l.key=s.key),l}:s.fn)}return e}function Lo(e,t,n={},s,r){if(re.isCE||re.parent&&ot(re.parent)&&re.parent.isCE)return t!=="default"&&(n.name=t),ne("slot",n,s&&s());let l=e[t];l&&l._c&&(l._d=!1),os();const i=l&&Or(l(n)),o=Kr(pe,{key:n.key||i&&i.key||`_${t}`},i||(s?s():[]),i&&e._===1?64:-2);return!r&&o.scopeId&&(o.slotScopeIds=[o.scopeId+"-s"]),l&&l._c&&(l._d=!0),o}function Or(e){return e.some(t=>Tt(t)?!(t.type===he||t.type===pe&&!Or(t.children)):!0)?e:null}const Bn=e=>e?Yr(e)?an(e)||e.proxy:Bn(e.parent):null,pt=ue(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Bn(e.parent),$root:e=>Bn(e.root),$emit:e=>e.emit,$options:e=>rs(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,on(e.update)}),$nextTick:e=>e.n||(e.n=Zl.bind(e.proxy)),$watch:e=>pi.bind(e)}),wn=(e,t)=>e!==ee&&!e.__isScriptSetup&&J(e,t),Oi={get({_:e},t){const{ctx:n,setupState:s,data:r,props:l,accessCache:i,type:o,appContext:f}=e;let a;if(t[0]!=="$"){const v=i[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return l[t]}else{if(wn(s,t))return i[t]=1,s[t];if(r!==ee&&J(r,t))return i[t]=2,r[t];if((a=e.propsOptions[0])&&J(a,t))return i[t]=3,l[t];if(n!==ee&&J(n,t))return i[t]=4,n[t];kn&&(i[t]=0)}}const h=pt[t];let d,_;if(h)return t==="$attrs"&&_e(e,"get",t),h(e);if((d=o.__cssModules)&&(d=d[t]))return d;if(n!==ee&&J(n,t))return i[t]=4,n[t];if(_=f.config.globalProperties,J(_,t))return _[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:l}=e;return wn(r,t)?(r[t]=n,!0):s!==ee&&J(s,t)?(s[t]=n,!0):J(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:l}},i){let o;return!!n[i]||e!==ee&&J(e,i)||wn(t,i)||(o=l[0])&&J(o,i)||J(s,i)||J(pt,i)||J(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:J(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Rs(e){return U(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let kn=!0;function Mi(e){const t=rs(e),n=e.proxy,s=e.ctx;kn=!1,t.beforeCreate&&Os(t.beforeCreate,e,"bc");const{data:r,computed:l,methods:i,watch:o,provide:f,inject:a,created:h,beforeMount:d,mounted:_,beforeUpdate:v,updated:R,activated:P,deactivated:S,beforeDestroy:W,beforeUnmount:K,destroyed:g,unmounted:T,render:C,renderTracked:b,renderTriggered:B,errorCaptured:F,serverPrefetch:L,expose:O,inheritAttrs:D,components:Y,directives:Q,filters:ce}=t;if(a&&Pi(a,s,null),i)for(const q in i){const j=i[q];V(j)&&(s[q]=j.bind(n))}if(r){const q=r.call(n,n);z(q)&&(e.data=Zn(q))}if(kn=!0,l)for(const q in l){const j=l[q],Me=V(j)?j.bind(n,n):V(j.get)?j.get.bind(n,n):Te,Ft=!V(j)&&V(j.set)?j.set.bind(n):Te,qe=uo({get:Me,set:Ft});Object.defineProperty(s,q,{enumerable:!0,configurable:!0,get:()=>qe.value,set:Ae=>qe.value=Ae})}if(o)for(const q in o)Mr(o[q],s,n,q);if(f){const q=V(f)?f.call(n):f;Reflect.ownKeys(q).forEach(j=>{Hi(j,q[j])})}h&&Os(h,e,"c");function k(q,j){U(j)?j.forEach(Me=>q(Me.bind(n))):j&&q(j.bind(n))}if(k(wi,d),k(Fr,_),k(Ei,v),k(vi,R),k(xi,P),k(Ci,S),k(Ri,F),k(Ii,b),k(Fi,B),k(Ir,K),k(Rr,T),k(Ai,L),U(O))if(O.length){const q=e.exposed||(e.exposed={});O.forEach(j=>{Object.defineProperty(q,j,{get:()=>n[j],set:Me=>n[j]=Me})})}else e.exposed||(e.exposed={});C&&e.render===Te&&(e.render=C),D!=null&&(e.inheritAttrs=D),Y&&(e.components=Y),Q&&(e.directives=Q)}function Pi(e,t,n=Te){U(e)&&(e=Nn(e));for(const s in e){const r=e[s];let l;z(r)?"default"in r?l=Vt(r.from||s,r.default,!0):l=Vt(r.from||s):l=Vt(r),ae(l)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>l.value,set:i=>l.value=i}):t[s]=l}}function Os(e,t,n){ve(U(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Mr(e,t,n,s){const r=s.includes(".")?wr(n,s):()=>n[s];if(le(e)){const l=t[e];V(l)&&xn(r,l)}else if(V(e))xn(r,e.bind(n));else if(z(e))if(U(e))e.forEach(l=>Mr(l,t,n,s));else{const l=V(e.handler)?e.handler.bind(n):t[e.handler];V(l)&&xn(r,l,e)}}function rs(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:l,config:{optionMergeStrategies:i}}=e.appContext,o=l.get(t);let f;return o?f=o:!r.length&&!n&&!s?f=t:(f={},r.length&&r.forEach(a=>Zt(f,a,i,!0)),Zt(f,t,i)),z(t)&&l.set(t,f),f}function Zt(e,t,n,s=!1){const{mixins:r,extends:l}=t;l&&Zt(e,l,n,!0),r&&r.forEach(i=>Zt(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const o=Li[i]||n&&n[i];e[i]=o?o(e[i],t[i]):t[i]}return e}const Li={data:Ms,props:Ps,emits:Ps,methods:ht,computed:ht,beforeCreate:de,created:de,beforeMount:de,mounted:de,beforeUpdate:de,updated:de,beforeDestroy:de,beforeUnmount:de,destroyed:de,unmounted:de,activated:de,deactivated:de,errorCaptured:de,serverPrefetch:de,components:ht,directives:ht,watch:ki,provide:Ms,inject:Bi};function Ms(e,t){return t?e?function(){return ue(V(e)?e.call(this,this):e,V(t)?t.call(this,this):t)}:t:e}function Bi(e,t){return ht(Nn(e),Nn(t))}function Nn(e){if(U(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function de(e,t){return e?[...new Set([].concat(e,t))]:t}function ht(e,t){return e?ue(Object.create(null),e,t):t}function Ps(e,t){return e?U(e)&&U(t)?[...new Set([...e,...t])]:ue(Object.create(null),Rs(e),Rs(t??{})):t}function ki(e,t){if(!e)return t;if(!t)return e;const n=ue(Object.create(null),e);for(const s in t)n[s]=de(e[s],t[s]);return n}function Pr(){return{app:null,config:{isNativeTag:ll,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ni=0;function ji(e,t){return function(s,r=null){V(s)||(s=ue({},s)),r!=null&&!z(r)&&(r=null);const l=Pr(),i=new WeakSet;let o=!1;const f=l.app={_uid:Ni++,_component:s,_props:r,_container:null,_context:l,_instance:null,version:ao,get config(){return l.config},set config(a){},use(a,...h){return i.has(a)||(a&&V(a.install)?(i.add(a),a.install(f,...h)):V(a)&&(i.add(a),a(f,...h))),f},mixin(a){return l.mixins.includes(a)||l.mixins.push(a),f},component(a,h){return h?(l.components[a]=h,f):l.components[a]},directive(a,h){return h?(l.directives[a]=h,f):l.directives[a]},mount(a,h,d){if(!o){const _=ne(s,r);return _.appContext=l,d===!0?d="svg":d===!1&&(d=void 0),h&&t?t(_,a):e(_,a,d),o=!0,f._container=a,a.__vue_app__=f,an(_.component)||_.component.proxy}},unmount(){o&&(e(null,f._container),delete f._container.__vue_app__)},provide(a,h){return l.provides[a]=h,f},runWithContext(a){Qt=f;try{return a()}finally{Qt=null}}};return f}}let Qt=null;function Hi(e,t){if(oe){let n=oe.provides;const s=oe.parent&&oe.parent.provides;s===n&&(n=oe.provides=Object.create(s)),n[e]=t}}function Vt(e,t,n=!1){const s=oe||re;if(s||Qt){const r=s?s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:Qt._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&V(t)?t.call(s&&s.proxy):t}}function Si(e,t,n,s=!1){const r={},l={};Wt(l,un,1),e.propsDefaults=Object.create(null),Lr(e,t,r,l);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:$l(r):e.type.props?e.props=r:e.props=l,e.attrs=l}function Ui(e,t,n,s){const{props:r,attrs:l,vnode:{patchFlag:i}}=e,o=Z(r),[f]=e.propsOptions;let a=!1;if((s||i>0)&&!(i&16)){if(i&8){const h=e.vnode.dynamicProps;for(let d=0;d<h.length;d++){let _=h[d];if(cn(e.emitsOptions,_))continue;const v=t[_];if(f)if(J(l,_))v!==l[_]&&(l[_]=v,a=!0);else{const R=Be(_);r[R]=jn(f,o,R,v,e,!1)}else v!==l[_]&&(l[_]=v,a=!0)}}}else{Lr(e,t,r,l)&&(a=!0);let h;for(const d in o)(!t||!J(t,d)&&((h=nn(d))===d||!J(t,h)))&&(f?n&&(n[d]!==void 0||n[h]!==void 0)&&(r[d]=jn(f,o,d,void 0,e,!0)):delete r[d]);if(l!==o)for(const d in l)(!t||!J(t,d))&&(delete l[d],a=!0)}a&&Le(e,"set","$attrs")}function Lr(e,t,n,s){const[r,l]=e.propsOptions;let i=!1,o;if(t)for(let f in t){if(gt(f))continue;const a=t[f];let h;r&&J(r,h=Be(f))?!l||!l.includes(h)?n[h]=a:(o||(o={}))[h]=a:cn(e.emitsOptions,f)||(!(f in s)||a!==s[f])&&(s[f]=a,i=!0)}if(l){const f=Z(n),a=o||ee;for(let h=0;h<l.length;h++){const d=l[h];n[d]=jn(r,f,d,a[d],e,!J(a,d))}}return i}function jn(e,t,n,s,r,l){const i=e[n];if(i!=null){const o=J(i,"default");if(o&&s===void 0){const f=i.default;if(i.type!==Function&&!i.skipFactory&&V(f)){const{propsDefaults:a}=r;if(n in a)s=a[n];else{const h=vt(r);s=a[n]=f.call(null,t),h()}}else s=f}i[0]&&(l&&!o?s=!1:i[1]&&(s===""||s===nn(n))&&(s=!0))}return s}function Br(e,t,n=!1){const s=t.propsCache,r=s.get(e);if(r)return r;const l=e.props,i={},o=[];let f=!1;if(!V(e)){const h=d=>{f=!0;const[_,v]=Br(d,t,!0);ue(i,_),v&&o.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!l&&!f)return z(e)&&s.set(e,nt),nt;if(U(l))for(let h=0;h<l.length;h++){const d=Be(l[h]);Ls(d)&&(i[d]=ee)}else if(l)for(const h in l){const d=Be(h);if(Ls(d)){const _=l[h],v=i[d]=U(_)||V(_)?{type:_}:ue({},_);if(v){const R=Ns(Boolean,v.type),P=Ns(String,v.type);v[0]=R>-1,v[1]=P<0||R<P,(R>-1||J(v,"default"))&&o.push(d)}}}const a=[i,o];return z(e)&&s.set(e,a),a}function Ls(e){return e[0]!=="$"}function Bs(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function ks(e,t){return Bs(e)===Bs(t)}function Ns(e,t){return U(t)?t.findIndex(n=>ks(n,e)):V(t)&&ks(t,e)?0:-1}const kr=e=>e[0]==="_"||e==="$stable",ls=e=>U(e)?e.map(Ce):[Ce(e)],$i=(e,t,n)=>{if(t._n)return t;const s=ti((...r)=>ls(t(...r)),n);return s._c=!1,s},Nr=(e,t,n)=>{const s=e._ctx;for(const r in e){if(kr(r))continue;const l=e[r];if(V(l))t[r]=$i(r,l,s);else if(l!=null){const i=ls(l);t[r]=()=>i}}},jr=(e,t)=>{const n=ls(t);e.slots.default=()=>n},Vi=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Z(t),Wt(t,"_",n)):Nr(t,e.slots={})}else e.slots={},t&&jr(e,t);Wt(e.slots,un,1)},Di=(e,t,n)=>{const{vnode:s,slots:r}=e;let l=!0,i=ee;if(s.shapeFlag&32){const o=t._;o?n&&o===1?l=!1:(ue(r,t),!n&&o===1&&delete r._):(l=!t.$stable,Nr(t,r)),i=t}else t&&(jr(e,t),i={default:1});if(l)for(const o in r)!kr(o)&&i[o]==null&&delete r[o]};function Xt(e,t,n,s,r=!1){if(U(e)){e.forEach((_,v)=>Xt(_,t&&(U(t)?t[v]:t),n,s,r));return}if(ot(s)&&!r)return;const l=s.shapeFlag&4?an(s.component)||s.component.proxy:s.el,i=r?null:l,{i:o,r:f}=e,a=t&&t.r,h=o.refs===ee?o.refs={}:o.refs,d=o.setupState;if(a!=null&&a!==f&&(le(a)?(h[a]=null,J(d,a)&&(d[a]=null)):ae(a)&&(a.value=null)),V(f))Ve(f,o,12,[i,h]);else{const _=le(f),v=ae(f),R=e.f;if(_||v){const P=()=>{if(R){const S=_?J(d,f)?d[f]:h[f]:f.value;r?U(S)&&Vn(S,l):U(S)?S.includes(l)||S.push(l):_?(h[f]=[l],J(d,f)&&(d[f]=h[f])):(f.value=[l],e.k&&(h[e.k]=f.value))}else _?(h[f]=i,J(d,f)&&(d[f]=i)):v&&(f.value=i,e.k&&(h[e.k]=i))};r||R?P():(P.id=-1,ge(P,n))}}}let je=!1;const Ki=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Wi=e=>e.namespaceURI.includes("MathML"),Nt=e=>{if(Ki(e))return"svg";if(Wi(e))return"mathml"},jt=e=>e.nodeType===8;function qi(e){const{mt:t,p:n,o:{patchProp:s,createText:r,nextSibling:l,parentNode:i,remove:o,insert:f,createComment:a}}=e,h=(g,T)=>{if(!T.hasChildNodes()){n(null,g,T),Yt(),T._vnode=g;return}je=!1,d(T.firstChild,g,null,null,null),Yt(),T._vnode=g,je&&console.error("Hydration completed but contains mismatches.")},d=(g,T,C,b,B,F=!1)=>{const L=jt(g)&&g.data==="[",O=()=>P(g,T,C,b,B,L),{type:D,ref:Y,shapeFlag:Q,patchFlag:ce}=T;let se=g.nodeType;T.el=g,ce===-2&&(F=!1,T.dynamicChildren=null);let k=null;switch(D){case ft:se!==3?T.children===""?(f(T.el=r(""),i(g),g),k=g):k=O():(g.data!==T.children&&(je=!0,g.data=T.children),k=l(g));break;case he:K(g)?(k=l(g),W(T.el=g.content.firstChild,g,C)):se!==8||L?k=O():k=l(g);break;case Dt:if(L&&(g=l(g),se=g.nodeType),se===1||se===3){k=g;const q=!T.children.length;for(let j=0;j<T.staticCount;j++)q&&(T.children+=k.nodeType===1?k.outerHTML:k.data),j===T.staticCount-1&&(T.anchor=k),k=l(k);return L?l(k):k}else O();break;case pe:L?k=R(g,T,C,b,B,F):k=O();break;default:if(Q&1)(se!==1||T.type.toLowerCase()!==g.tagName.toLowerCase())&&!K(g)?k=O():k=_(g,T,C,b,B,F);else if(Q&6){T.slotScopeIds=B;const q=i(g);if(L?k=S(g):jt(g)&&g.data==="teleport start"?k=S(g,g.data,"teleport end"):k=l(g),t(T,q,null,C,b,Nt(q),F),ot(T)){let j;L?(j=ne(pe),j.anchor=k?k.previousSibling:q.lastChild):j=g.nodeType===3?Gr(""):ne("div"),j.el=g,T.component.subTree=j}}else Q&64?se!==8?k=O():k=T.type.hydrate(g,T,C,b,B,F,e,v):Q&128&&(k=T.type.hydrate(g,T,C,b,Nt(i(g)),B,F,e,d))}return Y!=null&&Xt(Y,null,b,T),k},_=(g,T,C,b,B,F)=>{F=F||!!T.dynamicChildren;const{type:L,props:O,patchFlag:D,shapeFlag:Y,dirs:Q,transition:ce}=T,se=L==="input"||L==="option";if(se||D!==-1){Q&&Ie(T,null,C,"created");let k=!1;if(K(g)){k=Sr(b,ce)&&C&&C.vnode.props&&C.vnode.props.appear;const j=g.content.firstChild;k&&ce.beforeEnter(j),W(j,g,C),T.el=g=j}if(Y&16&&!(O&&(O.innerHTML||O.textContent))){let j=v(g.firstChild,T,g,C,b,B,F);for(;j;){je=!0;const Me=j;j=j.nextSibling,o(Me)}}else Y&8&&g.textContent!==T.children&&(je=!0,g.textContent=T.children);if(O)if(se||!F||D&48)for(const j in O)(se&&(j.endsWith("value")||j==="indeterminate")||en(j)&&!gt(j)||j[0]===".")&&s(g,j,null,O[j],void 0,void 0,C);else O.onClick&&s(g,"onClick",null,O.onClick,void 0,void 0,C);let q;(q=O&&O.onVnodeBeforeMount)&&xe(q,C,T),Q&&Ie(T,null,C,"beforeMount"),((q=O&&O.onVnodeMounted)||Q||k)&&Tr(()=>{q&&xe(q,C,T),k&&ce.enter(g),Q&&Ie(T,null,C,"mounted")},b)}return g.nextSibling},v=(g,T,C,b,B,F,L)=>{L=L||!!T.dynamicChildren;const O=T.children,D=O.length;for(let Y=0;Y<D;Y++){const Q=L?O[Y]:O[Y]=Ce(O[Y]);if(g)g=d(g,Q,b,B,F,L);else{if(Q.type===ft&&!Q.children)continue;je=!0,n(null,Q,C,null,b,B,Nt(C),F)}}return g},R=(g,T,C,b,B,F)=>{const{slotScopeIds:L}=T;L&&(B=B?B.concat(L):L);const O=i(g),D=v(l(g),T,O,C,b,B,F);return D&&jt(D)&&D.data==="]"?l(T.anchor=D):(je=!0,f(T.anchor=a("]"),O,D),D)},P=(g,T,C,b,B,F)=>{if(je=!0,T.el=null,F){const D=S(g);for(;;){const Y=l(g);if(Y&&Y!==D)o(Y);else break}}const L=l(g),O=i(g);return o(g),n(null,T,O,L,C,b,Nt(O),B),L},S=(g,T="[",C="]")=>{let b=0;for(;g;)if(g=l(g),g&&jt(g)&&(g.data===T&&b++,g.data===C)){if(b===0)return l(g);b--}return g},W=(g,T,C)=>{const b=T.parentNode;b&&b.replaceChild(g,T);let B=C;for(;B;)B.vnode.el===T&&(B.vnode.el=B.subTree.el=g),B=B.parent},K=g=>g.nodeType===1&&g.tagName.toLowerCase()==="template";return[h,d]}const ge=Tr;function Bo(e){return Hr(e)}function ko(e){return Hr(e,qi)}function Hr(e,t){const n=Gs();n.__VUE__=!0;const{insert:s,remove:r,patchProp:l,createElement:i,createText:o,createComment:f,setText:a,setElementText:h,parentNode:d,nextSibling:_,setScopeId:v=Te,insertStaticContent:R}=e,P=(c,u,p,y=null,m=null,E=null,I=void 0,w=null,A=!!u.dynamicChildren)=>{if(c===u)return;c&&!Oe(c,u)&&(y=It(c),Ae(c,m,E,!0),c=null),u.patchFlag===-2&&(A=!1,u.dynamicChildren=null);const{type:x,ref:M,shapeFlag:H}=u;switch(x){case ft:S(c,u,p,y);break;case he:W(c,u,p,y);break;case Dt:c==null&&K(u,p,y,I);break;case pe:Y(c,u,p,y,m,E,I,w,A);break;default:H&1?C(c,u,p,y,m,E,I,w,A):H&6?Q(c,u,p,y,m,E,I,w,A):(H&64||H&128)&&x.process(c,u,p,y,m,E,I,w,A,et)}M!=null&&m&&Xt(M,c&&c.ref,E,u||c,!u)},S=(c,u,p,y)=>{if(c==null)s(u.el=o(u.children),p,y);else{const m=u.el=c.el;u.children!==c.children&&a(m,u.children)}},W=(c,u,p,y)=>{c==null?s(u.el=f(u.children||""),p,y):u.el=c.el},K=(c,u,p,y)=>{[c.el,c.anchor]=R(c.children,u,p,y,c.el,c.anchor)},g=({el:c,anchor:u},p,y)=>{let m;for(;c&&c!==u;)m=_(c),s(c,p,y),c=m;s(u,p,y)},T=({el:c,anchor:u})=>{let p;for(;c&&c!==u;)p=_(c),r(c),c=p;r(u)},C=(c,u,p,y,m,E,I,w,A)=>{u.type==="svg"?I="svg":u.type==="math"&&(I="mathml"),c==null?b(u,p,y,m,E,I,w,A):L(c,u,m,E,I,w,A)},b=(c,u,p,y,m,E,I,w)=>{let A,x;const{props:M,shapeFlag:H,transition:N,dirs:$}=c;if(A=c.el=i(c.type,E,M&&M.is,M),H&8?h(A,c.children):H&16&&F(c.children,A,null,y,m,En(c,E),I,w),$&&Ie(c,null,y,"created"),B(A,c,c.scopeId,I,y),M){for(const X in M)X!=="value"&&!gt(X)&&l(A,X,null,M[X],E,c.children,y,m,Pe);"value"in M&&l(A,"value",null,M.value,E),(x=M.onVnodeBeforeMount)&&xe(x,y,c)}$&&Ie(c,null,y,"beforeMount");const G=Sr(m,N);G&&N.beforeEnter(A),s(A,u,p),((x=M&&M.onVnodeMounted)||G||$)&&ge(()=>{x&&xe(x,y,c),G&&N.enter(A),$&&Ie(c,null,y,"mounted")},m)},B=(c,u,p,y,m)=>{if(p&&v(c,p),y)for(let E=0;E<y.length;E++)v(c,y[E]);if(m){let E=m.subTree;if(u===E){const I=m.vnode;B(c,I,I.scopeId,I.slotScopeIds,m.parent)}}},F=(c,u,p,y,m,E,I,w,A=0)=>{for(let x=A;x<c.length;x++){const M=c[x]=w?Ue(c[x]):Ce(c[x]);P(null,M,u,p,y,m,E,I,w)}},L=(c,u,p,y,m,E,I)=>{const w=u.el=c.el;let{patchFlag:A,dynamicChildren:x,dirs:M}=u;A|=c.patchFlag&16;const H=c.props||ee,N=u.props||ee;let $;if(p&&Ge(p,!1),($=N.onVnodeBeforeUpdate)&&xe($,p,u,c),M&&Ie(u,c,p,"beforeUpdate"),p&&Ge(p,!0),x?O(c.dynamicChildren,x,w,p,y,En(u,m),E):I||j(c,u,w,null,p,y,En(u,m),E,!1),A>0){if(A&16)D(w,u,H,N,p,y,m);else if(A&2&&H.class!==N.class&&l(w,"class",null,N.class,m),A&4&&l(w,"style",H.style,N.style,m),A&8){const G=u.dynamicProps;for(let X=0;X<G.length;X++){const te=G[X],ie=H[te],Ee=N[te];(Ee!==ie||te==="value")&&l(w,te,ie,Ee,m,c.children,p,y,Pe)}}A&1&&c.children!==u.children&&h(w,u.children)}else!I&&x==null&&D(w,u,H,N,p,y,m);(($=N.onVnodeUpdated)||M)&&ge(()=>{$&&xe($,p,u,c),M&&Ie(u,c,p,"updated")},y)},O=(c,u,p,y,m,E,I)=>{for(let w=0;w<u.length;w++){const A=c[w],x=u[w],M=A.el&&(A.type===pe||!Oe(A,x)||A.shapeFlag&70)?d(A.el):p;P(A,x,M,null,y,m,E,I,!0)}},D=(c,u,p,y,m,E,I)=>{if(p!==y){if(p!==ee)for(const w in p)!gt(w)&&!(w in y)&&l(c,w,p[w],null,I,u.children,m,E,Pe);for(const w in y){if(gt(w))continue;const A=y[w],x=p[w];A!==x&&w!=="value"&&l(c,w,x,A,I,u.children,m,E,Pe)}"value"in y&&l(c,"value",p.value,y.value,I)}},Y=(c,u,p,y,m,E,I,w,A)=>{const x=u.el=c?c.el:o(""),M=u.anchor=c?c.anchor:o("");let{patchFlag:H,dynamicChildren:N,slotScopeIds:$}=u;$&&(w=w?w.concat($):$),c==null?(s(x,p,y),s(M,p,y),F(u.children||[],p,M,m,E,I,w,A)):H>0&&H&64&&N&&c.dynamicChildren?(O(c.dynamicChildren,N,p,m,E,I,w),(u.key!=null||m&&u===m.subTree)&&is(c,u,!0)):j(c,u,p,M,m,E,I,w,A)},Q=(c,u,p,y,m,E,I,w,A)=>{u.slotScopeIds=w,c==null?u.shapeFlag&512?m.ctx.activate(u,p,y,I,A):ce(u,p,y,m,E,I,A):se(c,u,A)},ce=(c,u,p,y,m,E,I)=>{const w=c.component=no(c,y,m);if(Et(c)&&(w.ctx.renderer=et),ro(w),w.asyncDep){if(m&&m.registerDep(w,k),!c.el){const A=w.subTree=ne(he);W(null,A,u,p)}}else k(w,c,u,p,m,E,I)},se=(c,u,p)=>{const y=u.component=c.component;if(li(c,u,p))if(y.asyncDep&&!y.asyncResolved){q(y,u,p);return}else y.next=u,Xl(y.update),y.effect.dirty=!0,y.update();else u.el=c.el,y.vnode=u},k=(c,u,p,y,m,E,I)=>{const w=()=>{if(c.isMounted){let{next:M,bu:H,u:N,parent:$,vnode:G}=c;{const tt=Ur(c);if(tt){M&&(M.el=G.el,q(c,M,I)),tt.asyncDep.then(()=>{c.isUnmounted||w()});return}}let X=M,te;Ge(c,!1),M?(M.el=G.el,q(c,M,I)):M=G,H&&yn(H),(te=M.props&&M.props.onVnodeBeforeUpdate)&&xe(te,$,M,G),Ge(c,!0);const ie=bn(c),Ee=c.subTree;c.subTree=ie,P(Ee,ie,d(Ee.el),It(Ee),c,m,E),M.el=ie.el,X===null&&es(c,ie.el),N&&ge(N,m),(te=M.props&&M.props.onVnodeUpdated)&&ge(()=>xe(te,$,M,G),m)}else{let M;const{el:H,props:N}=u,{bm:$,m:G,parent:X}=c,te=ot(u);if(Ge(c,!1),$&&yn($),!te&&(M=N&&N.onVnodeBeforeMount)&&xe(M,X,u),Ge(c,!0),H&&gn){const ie=()=>{c.subTree=bn(c),gn(H,c.subTree,c,m,null)};te?u.type.__asyncLoader().then(()=>!c.isUnmounted&&ie()):ie()}else{const ie=c.subTree=bn(c);P(null,ie,p,y,c,m,E),u.el=ie.el}if(G&&ge(G,m),!te&&(M=N&&N.onVnodeMounted)){const ie=u;ge(()=>xe(M,X,ie),m)}(u.shapeFlag&256||X&&ot(X.vnode)&&X.vnode.shapeFlag&256)&&c.a&&ge(c.a,m),c.isMounted=!0,u=p=y=null}},A=c.effect=new Wn(w,Te,()=>on(x),c.scope),x=c.update=()=>{A.dirty&&A.run()};x.id=c.uid,Ge(c,!0),x()},q=(c,u,p)=>{u.component=c;const y=c.vnode.props;c.vnode=u,c.next=null,Ui(c,u.props,y,p),Di(c,u.children,p),Xe(),Es(c),ze()},j=(c,u,p,y,m,E,I,w,A=!1)=>{const x=c&&c.children,M=c?c.shapeFlag:0,H=u.children,{patchFlag:N,shapeFlag:$}=u;if(N>0){if(N&128){Ft(x,H,p,y,m,E,I,w,A);return}else if(N&256){Me(x,H,p,y,m,E,I,w,A);return}}$&8?(M&16&&Pe(x,m,E),H!==x&&h(p,H)):M&16?$&16?Ft(x,H,p,y,m,E,I,w,A):Pe(x,m,E,!0):(M&8&&h(p,""),$&16&&F(H,p,y,m,E,I,w,A))},Me=(c,u,p,y,m,E,I,w,A)=>{c=c||nt,u=u||nt;const x=c.length,M=u.length,H=Math.min(x,M);let N;for(N=0;N<H;N++){const $=u[N]=A?Ue(u[N]):Ce(u[N]);P(c[N],$,p,null,m,E,I,w,A)}x>M?Pe(c,m,E,!0,!1,H):F(u,p,y,m,E,I,w,A,H)},Ft=(c,u,p,y,m,E,I,w,A)=>{let x=0;const M=u.length;let H=c.length-1,N=M-1;for(;x<=H&&x<=N;){const $=c[x],G=u[x]=A?Ue(u[x]):Ce(u[x]);if(Oe($,G))P($,G,p,null,m,E,I,w,A);else break;x++}for(;x<=H&&x<=N;){const $=c[H],G=u[N]=A?Ue(u[N]):Ce(u[N]);if(Oe($,G))P($,G,p,null,m,E,I,w,A);else break;H--,N--}if(x>H){if(x<=N){const $=N+1,G=$<M?u[$].el:y;for(;x<=N;)P(null,u[x]=A?Ue(u[x]):Ce(u[x]),p,G,m,E,I,w,A),x++}}else if(x>N)for(;x<=H;)Ae(c[x],m,E,!0),x++;else{const $=x,G=x,X=new Map;for(x=G;x<=N;x++){const ye=u[x]=A?Ue(u[x]):Ce(u[x]);ye.key!=null&&X.set(ye.key,x)}let te,ie=0;const Ee=N-G+1;let tt=!1,as=0;const dt=new Array(Ee);for(x=0;x<Ee;x++)dt[x]=0;for(x=$;x<=H;x++){const ye=c[x];if(ie>=Ee){Ae(ye,m,E,!0);continue}let Fe;if(ye.key!=null)Fe=X.get(ye.key);else for(te=G;te<=N;te++)if(dt[te-G]===0&&Oe(ye,u[te])){Fe=te;break}Fe===void 0?Ae(ye,m,E,!0):(dt[Fe-G]=x+1,Fe>=as?as=Fe:tt=!0,P(ye,u[Fe],p,null,m,E,I,w,A),ie++)}const ds=tt?Gi(dt):nt;for(te=ds.length-1,x=Ee-1;x>=0;x--){const ye=G+x,Fe=u[ye],hs=ye+1<M?u[ye+1].el:y;dt[x]===0?P(null,Fe,p,hs,m,E,I,w,A):tt&&(te<0||x!==ds[te]?qe(Fe,p,hs,2):te--)}}},qe=(c,u,p,y,m=null)=>{const{el:E,type:I,transition:w,children:A,shapeFlag:x}=c;if(x&6){qe(c.component.subTree,u,p,y);return}if(x&128){c.suspense.move(u,p,y);return}if(x&64){I.move(c,u,p,et);return}if(I===pe){s(E,u,p);for(let H=0;H<A.length;H++)qe(A[H],u,p,y);s(c.anchor,u,p);return}if(I===Dt){g(c,u,p);return}if(y!==2&&x&1&&w)if(y===0)w.beforeEnter(E),s(E,u,p),ge(()=>w.enter(E),m);else{const{leave:H,delayLeave:N,afterLeave:$}=w,G=()=>s(E,u,p),X=()=>{H(E,()=>{G(),$&&$()})};N?N(E,G,X):X()}else s(E,u,p)},Ae=(c,u,p,y=!1,m=!1)=>{const{type:E,props:I,ref:w,children:A,dynamicChildren:x,shapeFlag:M,patchFlag:H,dirs:N}=c;if(w!=null&&Xt(w,null,p,c,!0),M&256){u.ctx.deactivate(c);return}const $=M&1&&N,G=!ot(c);let X;if(G&&(X=I&&I.onVnodeBeforeUnmount)&&xe(X,u,c),M&6)Qr(c.component,p,y);else{if(M&128){c.suspense.unmount(p,y);return}$&&Ie(c,null,u,"beforeUnmount"),M&64?c.type.remove(c,u,p,m,et,y):x&&(E!==pe||H>0&&H&64)?Pe(x,u,p,!1,!0):(E===pe&&H&384||!m&&M&16)&&Pe(A,u,p),y&&fs(c)}(G&&(X=I&&I.onVnodeUnmounted)||$)&&ge(()=>{X&&xe(X,u,c),$&&Ie(c,null,u,"unmounted")},p)},fs=c=>{const{type:u,el:p,anchor:y,transition:m}=c;if(u===pe){Zr(p,y);return}if(u===Dt){T(c);return}const E=()=>{r(p),m&&!m.persisted&&m.afterLeave&&m.afterLeave()};if(c.shapeFlag&1&&m&&!m.persisted){const{leave:I,delayLeave:w}=m,A=()=>I(p,E);w?w(c.el,E,A):A()}else E()},Zr=(c,u)=>{let p;for(;c!==u;)p=_(c),r(c),c=p;r(u)},Qr=(c,u,p)=>{const{bum:y,scope:m,update:E,subTree:I,um:w}=c;y&&yn(y),m.stop(),E&&(E.active=!1,Ae(I,c,u,p)),w&&ge(w,u),ge(()=>{c.isUnmounted=!0},u),u&&u.pendingBranch&&!u.isUnmounted&&c.asyncDep&&!c.asyncResolved&&c.suspenseId===u.pendingId&&(u.deps--,u.deps===0&&u.resolve())},Pe=(c,u,p,y=!1,m=!1,E=0)=>{for(let I=E;I<c.length;I++)Ae(c[I],u,p,y,m)},It=c=>c.shapeFlag&6?It(c.component.subTree):c.shapeFlag&128?c.suspense.next():_(c.anchor||c.el);let dn=!1;const us=(c,u,p)=>{c==null?u._vnode&&Ae(u._vnode,null,null,!0):P(u._vnode||null,c,u,null,null,null,p),dn||(dn=!0,Es(),Yt(),dn=!1),u._vnode=c},et={p:P,um:Ae,m:qe,r:fs,mt:ce,mc:F,pc:j,pbc:O,n:It,o:e};let hn,gn;return t&&([hn,gn]=t(et)),{render:us,hydrate:hn,createApp:ji(us,hn)}}function En({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ge({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Sr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function is(e,t,n=!1){const s=e.children,r=t.children;if(U(s)&&U(r))for(let l=0;l<s.length;l++){const i=s[l];let o=r[l];o.shapeFlag&1&&!o.dynamicChildren&&((o.patchFlag<=0||o.patchFlag===32)&&(o=r[l]=Ue(r[l]),o.el=i.el),n||is(i,o)),o.type===ft&&(o.el=i.el)}}function Gi(e){const t=e.slice(),n=[0];let s,r,l,i,o;const f=e.length;for(s=0;s<f;s++){const a=e[s];if(a!==0){if(r=n[n.length-1],e[r]<a){t[s]=r,n.push(s);continue}for(l=0,i=n.length-1;l<i;)o=l+i>>1,e[n[o]]<a?l=o+1:i=o;a<e[n[l]]&&(l>0&&(t[s]=n[l-1]),n[l]=s)}}for(l=n.length,i=n[l-1];l-- >0;)n[l]=i,i=t[i];return n}function Ur(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ur(t)}const Yi=e=>e.__isTeleport,_t=e=>e&&(e.disabled||e.disabled===""),js=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Hs=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Hn=(e,t)=>{const n=e&&e.to;return le(n)?t?t(n):null:n},Ji={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,l,i,o,f,a){const{mc:h,pc:d,pbc:_,o:{insert:v,querySelector:R,createText:P,createComment:S}}=a,W=_t(t.props);let{shapeFlag:K,children:g,dynamicChildren:T}=t;if(e==null){const C=t.el=P(""),b=t.anchor=P("");v(C,n,s),v(b,n,s);const B=t.target=Hn(t.props,R),F=t.targetAnchor=P("");B&&(v(F,B),i==="svg"||js(B)?i="svg":(i==="mathml"||Hs(B))&&(i="mathml"));const L=(O,D)=>{K&16&&h(g,O,D,r,l,i,o,f)};W?L(n,b):B&&L(B,F)}else{t.el=e.el;const C=t.anchor=e.anchor,b=t.target=e.target,B=t.targetAnchor=e.targetAnchor,F=_t(e.props),L=F?n:b,O=F?C:B;if(i==="svg"||js(b)?i="svg":(i==="mathml"||Hs(b))&&(i="mathml"),T?(_(e.dynamicChildren,T,L,r,l,i,o),is(e,t,!0)):f||d(e,t,L,O,r,l,i,o,!1),W)F?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ht(t,n,C,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const D=t.target=Hn(t.props,R);D&&Ht(t,D,null,a,0)}else F&&Ht(t,b,B,a,1)}$r(t)},remove(e,t,n,s,{um:r,o:{remove:l}},i){const{shapeFlag:o,children:f,anchor:a,targetAnchor:h,target:d,props:_}=e;if(d&&l(h),i&&l(a),o&16){const v=i||!_t(_);for(let R=0;R<f.length;R++){const P=f[R];r(P,t,n,v,!!P.dynamicChildren)}}},move:Ht,hydrate:Zi};function Ht(e,t,n,{o:{insert:s},m:r},l=2){l===0&&s(e.targetAnchor,t,n);const{el:i,anchor:o,shapeFlag:f,children:a,props:h}=e,d=l===2;if(d&&s(i,t,n),(!d||_t(h))&&f&16)for(let _=0;_<a.length;_++)r(a[_],t,n,2);d&&s(o,t,n)}function Zi(e,t,n,s,r,l,{o:{nextSibling:i,parentNode:o,querySelector:f}},a){const h=t.target=Hn(t.props,f);if(h){const d=h._lpa||h.firstChild;if(t.shapeFlag&16)if(_t(t.props))t.anchor=a(i(e),t,o(e),n,s,r,l),t.targetAnchor=d;else{t.anchor=i(e);let _=d;for(;_;)if(_=i(_),_&&_.nodeType===8&&_.data==="teleport anchor"){t.targetAnchor=_,h._lpa=t.targetAnchor&&i(t.targetAnchor);break}a(d,t,h,n,s,r,l)}$r(t)}return t.anchor&&i(t.anchor)}const No=Ji;function $r(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const pe=Symbol.for("v-fgt"),ft=Symbol.for("v-txt"),he=Symbol.for("v-cmt"),Dt=Symbol.for("v-stc"),yt=[];let we=null;function os(e=!1){yt.push(we=e?null:[])}function Vr(){yt.pop(),we=yt[yt.length-1]||null}let ut=1;function Ss(e){ut+=e}function Dr(e){return e.dynamicChildren=ut>0?we||nt:null,Vr(),ut>0&&we&&we.push(e),e}function jo(e,t,n,s,r,l){return Dr(qr(e,t,n,s,r,l,!0))}function Kr(e,t,n,s,r){return Dr(ne(e,t,n,s,r,!0))}function Tt(e){return e?e.__v_isVNode===!0:!1}function Oe(e,t){return e.type===t.type&&e.key===t.key}const un="__vInternal",Wr=({key:e})=>e??null,Kt=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?le(e)||ae(e)||V(e)?{i:re,r:e,k:t,f:!!n}:e:null);function qr(e,t=null,n=null,s=0,r=null,l=e===pe?0:1,i=!1,o=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Wr(t),ref:t&&Kt(t),scopeId:br,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:re};return o?(cs(f,n),l&128&&e.normalize(f)):n&&(f.shapeFlag|=le(n)?8:16),ut>0&&!i&&we&&(f.patchFlag>0||l&6)&&f.patchFlag!==32&&we.push(f),f}const ne=Qi;function Qi(e,t=null,n=null,s=0,r=null,l=!1){if((!e||e===xr)&&(e=he),Tt(e)){const o=We(e,t,!0);return n&&cs(o,n),ut>0&&!l&&we&&(o.shapeFlag&6?we[we.indexOf(e)]=o:we.push(o)),o.patchFlag|=-2,o}if(fo(e)&&(e=e.__vccOpts),t){t=Xi(t);let{class:o,style:f}=t;o&&!le(o)&&(t.class=rn(o)),z(f)&&(fr(f)&&!U(f)&&(f=ue({},f)),t.style=sn(f))}const i=le(e)?1:ii(e)?128:Yi(e)?64:z(e)?4:V(e)?2:0;return qr(e,t,n,s,r,i,l,!0)}function Xi(e){return e?fr(e)||un in e?ue({},e):e:null}function We(e,t,n=!1){const{props:s,ref:r,patchFlag:l,children:i}=e,o=t?zi(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:o,key:o&&Wr(o),ref:t&&t.ref?n&&r?U(r)?r.concat(Kt(t)):[r,Kt(t)]:Kt(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==pe?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&We(e.ssContent),ssFallback:e.ssFallback&&We(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Gr(e=" ",t=0){return ne(ft,null,e,t)}function Ho(e="",t=!1){return t?(os(),Kr(he,null,e)):ne(he,null,e)}function Ce(e){return e==null||typeof e=="boolean"?ne(he):U(e)?ne(pe,null,e.slice()):typeof e=="object"?Ue(e):ne(ft,null,String(e))}function Ue(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:We(e)}function cs(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(U(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),cs(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(un in t)?t._ctx=re:r===3&&re&&(re.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else V(t)?(t={default:t,_ctx:re},n=32):(t=String(t),s&64?(n=16,t=[Gr(t)]):n=8);e.children=t,e.shapeFlag|=n}function zi(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=rn([t.class,s.class]));else if(r==="style")t.style=sn([t.style,s.style]);else if(en(r)){const l=t[r],i=s[r];i&&l!==i&&!(U(l)&&l.includes(i))&&(t[r]=l?[].concat(l,i):i)}else r!==""&&(t[r]=s[r])}return t}function xe(e,t,n,s=null){ve(e,t,7,[n,s])}const eo=Pr();let to=0;function no(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||eo,l={uid:to++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new ml(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Br(s,r),emitsOptions:mr(s,r),emit:null,emitted:null,propsDefaults:ee,inheritAttrs:s.inheritAttrs,ctx:ee,data:ee,props:ee,attrs:ee,slots:ee,refs:ee,setupState:ee,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=ei.bind(null,l),e.ce&&e.ce(l),l}let oe=null;const so=()=>oe||re;let zt,Sn;{const e=Gs(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),l=>{r.length>1?r.forEach(i=>i(l)):r[0](l)}};zt=t("__VUE_INSTANCE_SETTERS__",n=>oe=n),Sn=t("__VUE_SSR_SETTERS__",n=>At=n)}const vt=e=>{const t=oe;return zt(e),e.scope.on(),()=>{e.scope.off(),zt(t)}},Us=()=>{oe&&oe.scope.off(),zt(null)};function Yr(e){return e.vnode.shapeFlag&4}let At=!1;function ro(e,t=!1){t&&Sn(t);const{props:n,children:s}=e.vnode,r=Yr(e);Si(e,n,r,t),Vi(e,s);const l=r?lo(e,t):void 0;return t&&Sn(!1),l}function lo(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=ur(new Proxy(e.ctx,Oi));const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?oo(e):null,l=vt(e);Xe();const i=Ve(s,e,0,[e.props,r]);if(ze(),l(),Ks(i)){if(i.then(Us,Us),t)return i.then(o=>{Un(e,o,t)}).catch(o=>{at(o,e,0)});e.asyncDep=i}else Un(e,i,t)}else Jr(e,t)}function Un(e,t,n){V(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:z(t)&&(e.setupState=gr(t)),Jr(e,n)}let $s;function Jr(e,t,n){const s=e.type;if(!e.render){if(!t&&$s&&!s.render){const r=s.template||rs(e).template;if(r){const{isCustomElement:l,compilerOptions:i}=e.appContext.config,{delimiters:o,compilerOptions:f}=s,a=ue(ue({isCustomElement:l,delimiters:o},i),f);s.render=$s(r,a)}}e.render=s.render||Te}{const r=vt(e);Xe();try{Mi(e)}finally{ze(),r()}}}function io(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return _e(e,"get","$attrs"),t[n]}}))}function oo(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return io(e)},slots:e.slots,emit:e.emit,expose:t}}function an(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(gr(ur(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in pt)return pt[n](e)},has(t,n){return n in t||n in pt}}))}function co(e,t=!0){return V(e)?e.displayName||e.name:e.name||t&&e.__name}function fo(e){return V(e)&&"__vccOpts"in e}const uo=(e,t)=>Vl(e,t,At);function So(e,t,n){const s=arguments.length;return s===2?z(t)&&!U(t)?Tt(t)?ne(e,null,[t]):ne(e,t):ne(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Tt(n)&&(n=[n]),ne(e,t,n))}const ao="3.4.15";globalThis.__sfIds||(globalThis.__sfIds={});const Uo=(e="_")=>(typeof globalThis.__sfIds[e]!="number"&&(globalThis.__sfIds[e]=-1),`${e}${++globalThis.__sfIds[e]}`),$o=(e,t=300)=>{typeof window.requestIdleCallback=="function"?window.requestIdleCallback(e):setTimeout(e,t)},ho=e=>e.replace(/[ÁáÃãÂâÀà]/g,"a").replace(/[ÉéÊê]/g,"e").replace(/[Íí]/g,"i").replace(/[ÕõÓóÔô]/g,"o").replace(/[Úú]/g,"u").replace(/[Çç]/g,"c"),Vo=e=>ho(e.trim()).toLowerCase().replace(/[\W\r\n]/gm,"-").replace(/-{2,}/g,"-").replace(/(^-)|(-$)/g,""),go=e=>e.toLowerCase().replace(/Á/g,"á").replace(/Ã/g,"ã").replace(/Â/g,"â").replace(/À/g,"à").replace(/É/g,"é").replace(/Ê/g,"ê").replace(/Í/g,"í").replace(/Õ/g,"õ").replace(/Ó/g,"ó").replace(/Ô/g,"ô").replace(/Ú/g,"ú").replace(/Ç/g,"ç"),po=e=>go(e.trim()).replace(/[\r\n]/gm," ").replace(/[^\w-&%áãâàéêíõóôúç]/g," ").replace(/\s{2,}/g," "),Do=(e,t="/s/")=>`${t}${encodeURIComponent(po(e))}`,Ko=(e,t=0)=>{for(;e.offsetParent;)t+=e.offsetTop,e=e.offsetParent;return window.scroll({top:t,behavior:"smooth"})};export{Lo as $,bo as A,Ro as B,ve as C,Xr as D,pn as E,Zl as F,Kl as G,cr as H,Fr as I,so as J,xl as K,Co as L,$l as M,Eo as N,os as O,jo as P,xo as Q,Ho as R,qr as S,Gr as T,rn as U,ne as V,ti as W,Io as X,pe as Y,Mo as Z,_o as _,$t as a,Kr as a0,vo as a1,zi as a2,yo as a3,Xi as a4,Vo as a5,Vt as a6,Uo as a7,Hi as a8,ho as a9,wo as aa,Do as ab,Ss as ac,sn as ad,Rr as ae,Fo as af,Z as ag,Ko as ah,Ir as ai,Ao as aj,No as ak,Oo as al,We as am,Po as an,$o as b,uo as c,bi as d,le as e,Bo as f,ko as g,U as h,V as i,yn as j,Ys as k,ul as l,So as m,ue as n,yi as o,z as p,en as q,Zn as r,To as s,al as t,Vs as u,nn as v,xn as w,Be as x,Kn as y,mo as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as _}from"./customer-session.dSYHWdP4.js";import{u as l}from"./index.KfrHdfOH.js";import{g as y}from"./price.Easct8WC.js";import{c as m,w as g}from"./sf-utils.c42cbZ9W.js";const q=()=>{let i=Math.floor(Math.random()*1e6).toString()+Date.now();for(;i.length<24;)i+="0";return i},h=q;function b(i){return{all:i=i||new Map,on:function(t,r){var o=i.get(t);o?o.push(r):i.set(t,[r])},off:function(t,r){var o=i.get(t);o&&(r?o.splice(o.indexOf(r)>>>0,1):i.set(t,[]))},emit:function(t,r){var o=i.get(t);o&&o.slice().map(function(n){n(r)}),(o=i.get("*"))&&o.slice().map(function(n){n(t,r)})}}}const v=(i,{flags:t})=>!i.flags&&!t?!0:!i.flags||!t||i.flags.length!==t.length?!1:i.flags.every(r=>t.includes(r)),C=(i,t)=>{if(typeof t.product_id!="string"||typeof t.quantity!="number"||!(t.quantity>=0)||typeof t.price!="number"||!(t.price>=0))return null;const{items:r}=i;if(!t.kit_product)for(let n=0;n<r.length;n++){const a=r[n];if(!a.kit_product&&a.product_id===t.product_id&&a.variation_id===t.variation_id&&(!a.customizations||!a.customizations.length)&&v(a,t))return a.quantity+=t.quantity,t.price&&(a.price=t.price),t.final_price&&(a.final_price=t.final_price),a}const o={...t};if((!t._id||t._id===t.variation_id||r.find(({_id:n})=>n===t._id))&&(o._id=h()),t.customizations){const n=[];t.customizations.forEach((a,c)=>{n[c]={...a}}),o.customizations=n}return r.push(o),o},k=(i,t,r)=>{(typeof r!="number"||Number.isNaN(r))&&(r=i.min_quantity||1);const o=i.min_quantity||0,n=t&&i.variations?i.variations.find(({_id:c})=>c===t):void 0,a={product_id:i._id,variation_id:t,sku:n?.sku||i.sku,name:n?.name||i.name,slug:i.slug,production_time:n?.production_time||i.production_time,currency_id:i.currency_id,currency_symbol:i.currency_symbol,base_price:n?.base_price||i.base_price,max_quantity:i.quantity,quantity:o>0?Math.max(o,r):r,price:y(i)};return n?.picture_id&&i.pictures&&(a.picture=i.pictures.find(c=>c._id===n.picture_id)),!a.picture&&i.pictures&&([a.picture]=i.pictures),a},E="ecomShoppingCart",x={subtotal:0,items:[]},s=_(E,x),O=m(()=>s.items.reduce((i,t)=>i+t.quantity,0)),z=i=>{C(s,i)},S=i=>{for(let t=0;t<s.items.length;t++)if(s.items[t]._id===i){s.items.splice(t,1);break}},D=(i,t,r)=>z(k(i,t,r)),f=b(),p=()=>s.items.map(i=>({...i}));let e=p();const N=l(i=>{["addCartItem","removeCartItem"].forEach(t=>{const r=t==="addCartItem",o=r?i:e,n=r?e:i;o.forEach(a=>{if(!a.quantity)return;const u=n.find(({_id:d})=>d===a._id)?.quantity||0;a.quantity>u&&f.emit(t,{...a,quantity:a.quantity-u})})}),e=p()},200);g(s.items,i=>{i.forEach(t=>{let r=t.kit_product?.price&&t.kit_product.pack_quantity?t.kit_product.price/t.kit_product.pack_quantity:t.price;Array.isArray(t.customizations)&&t.customizations.forEach(a=>{if(a.add_to_price){const{type:c,addition:u}=a.add_to_price;r+=c==="fixed"?u:t.price*(u/100)}}),t.final_price=r;const o=t.min_quantity||1,n=t.max_quantity;typeof t.quantity!="number"||Number.isNaN(t.quantity)||t.quantity<o?t.quantity=o:n&&t.quantity>n&&(t.quantity=n)}),s.subtotal=i.reduce((t,r)=>t+r.quantity*(r.final_price||r.price),0),N(i)});const Q={on:f.on,off:f.off};export{D as a,Q as c,k as p,S as r,s,O as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as S,b as $,d as b,c as C}from"./customer-session.dSYHWdP4.js";import{c as T}from"./shopping-cart.v-dB3kHB.js";import{a as u,r as G,c as w,M as E,w as v}from"./sf-utils.c42cbZ9W.js";import{u as N,g as R}from"./index.KfrHdfOH.js";import{u as x}from"./afetch.OifQZgwR.js";import{g as P}from"./name.VA3MEpe0.js";import{g as A}from"./price.Easct8WC.js";const M="ecomSeachHistory",f=S(M,[]);for(let t=0;t<f.length;t++)typeof f[t]!="string"&&(f.splice(t,1),t-=1);const L=async({term:t,params:s,fields:n,url:i="search/v1"})=>{if(typeof t=="string"&&(t=t.trim(),t.length<2))return{data:{result:[],meta:null}};const a=await $.get(i,{fields:n,params:t?{...s,term:t}:s});if(t&&a.data.result.length){const r=t,c=f.findIndex(e=>e.includes(r)&&!e.replace(r,"").includes(" "));if(c>-1){const e=f[c];f.splice(c,1),f.unshift(e)}else{const e=f.findIndex(o=>r.startsWith(o));e>-1&&f.splice(e,1),f.unshift(t)}for(;f.length>20;)f.pop()}return a};class K{fields;term=u(null);isWithCount=u(!0);isWithBuckets=u(!0);params=G({});pageSize=u(24);pageNumber=u(1);#i=u(!1);isFetching=w(()=>this.#i.value);#e=u(!1);wasFetched=w(()=>this.#e.value);#s=u(null);#t;fetching=w(()=>this.#s.value);#a=u(null);fetchError=w(()=>this.#a.value);products=E([]);meta=E({offset:0,limit:0,fields:[],sort:[],query:{}});#n;constructor({fields:s,debounce:n=150}={}){this.fields=s,this.#n=N(i=>(this.#i.value=!0,L(i)),n),v([this.term,this.params,this.pageSize],()=>{this.wasFetched.value&&(this.pageNumber.value=1,this.#e.value=!1)}),v(this.pageNumber,()=>{this.#e.value=!1})}async fetch(s){s!==void 0&&s!==this.term.value&&(this.term.value=s,this.pageNumber.value=1);const n=this.pageSize.value,i=n*(this.pageNumber.value-1);this.#s.value||(this.#s.value=new Promise(r=>{this.#t=r}));let a;try{a=await this.#n({term:this.term.value,params:{...this.params,limit:n,offset:i,count:this.isWithCount.value||void 0,buckets:this.isWithBuckets.value||void 0},fields:this.fields})}catch(r){throw this.#t&&(this.#a.value=r,this.#t()),r}if(a){this.#i.value=!1,this.#e.value=!0;const{data:r}=a;r.meta&&this.setResult(r),this.#t&&this.#t()}}setResult(s){s.meta&&Object.assign(this.meta,s.meta),s.result&&(this.products.splice(0),s.result.forEach(n=>this.products.push(n))),s.meta&&s.result&&setTimeout(()=>{this.#e.value=!0},9)}}const l={},h={},I=()=>{h.resolve||(h.waiting=new Promise(t=>{h.resolve=t}))};I();const B=()=>({page_location:window.location.toString(),language:globalThis.$storefront.settings.lang||"pt_br",page_title:document.title,user_agent:navigator.userAgent}),F=()=>({...h.params||B(),...l,user_id:C.value._id,utm:x}),y="GtagEvent";let d={},g="";const _=async(t,s)=>{const n=s;if(t==="page_view"){d={};const{apiContext:i}=window.$storefront;if(g="",i){const{name:a}=i.doc;switch(i.resource){case"categories":g=`Category: ${a}`;break;case"brands":g=`Brand: ${a}`;break;case"collections":g=`Collection: ${a}`;break}}else{const{pathname:a}=window.location;a==="/"?g="Home":(/^\/s\/?/.test(a)||a==="/search"||a==="/busca")&&(g="Search results")}h.resolve&&(h.params=s,h.resolve(),h.resolve=null)}else h.waiting&&await h.waiting,t==="view_item"&&n.items?.forEach(i=>{if(i.index!==void 0)return;if(!i.item_list_id&&!i.item_list_name){const{apiContext:r}=window.$storefront;r?.doc._id===i.object_id&&(i.item_list_id="product-page",i.item_list_name="Product page")}const a=i.item_list_id||i.item_list_name||g;a&&(d[a]?d[a]+=1:d[a]=1,i.index=d[a],!i.item_list_id&&!i.item_list_name&&(i.item_list_name=a))}),typeof n.value=="number"&&!n.currency&&(n.currency=window.ECOM_CURRENCY||"BRL");try{const i={type:y,...F(),event:{name:t,params:n}};window.postMessage(i,window.origin)}catch(i){console.error(i)}},O=t=>{window.addEventListener("message",({data:s})=>{s.type===y&&t(s)})},V=t=>{const[s,...n]=P(t).split(" / "),i={item_name:s,item_id:t.sku,price:Math.round(A(t)*100)/100,object_id:t._id};n&&n.length?i.item_variant=n.join(" / "):t.variation_id&&(i.item_name=s.replace(window.__customGTMVariantRegex||/\s[^\s]+$/,""),i.item_variant=s.replace(i.item_name,"").trim()),(t.quantity===0||t.quantity&&t.product_id)&&(i.quantity=t.quantity);const{brands:a,categories:r}=t;if(a?.length&&(i.item_brand=a[0].name),r?.length)for(let c=0;c<r.length;c++){const{name:e}=r[c];if(c===0)i.item_category=e;else if(i[`item_category${c+1}`]=e,c===4)break}return i},Y=({experimentId:t=window.AB_EXPERIMENT_ID}={})=>{document.addEventListener("astro:beforeload",I);const{gtag:s,GTAG_TAG_ID:n,GA_TRACKING_ID:i}=window,a=n||i;if(typeof s=="function"){a&&["client_id","session_id","gclid"].forEach(o=>{s("get",a,o,m=>{l[o==="gclid"?o:`g_${o}`]=m})});const{GIT_BRANCH:e}=window;if(e){const o=t?`${t}-${window.GIT_BRANCH}`:e.startsWith("main-")&&e;o&&s("event","experience_impression",{exp_variant_string:o})}}const r=new URL(window.location.toString());["gclid","fbclid","ttclid"].forEach(e=>{const o=l[e]||r.searchParams.get(e);o?(l[e]=o,sessionStorage.setItem(`analytics_${e}`,o)):l[e]=sessionStorage.getItem(`analytics_${e}`)||void 0});const c=["_fbp"];l.fbclid||c.push("_fbc"),l.g_client_id||c.push("_ga"),c.forEach(e=>{document.cookie.split(";").forEach(o=>{const[m,p]=o.split("=");if(m.trim()===e&&p)switch(e){case"_fbp":l.fbp=p;break;case"_fbc":l.fbclid=p;break;case"_ga":l.g_client_id=p.substring(6);break}})}),["client_id","session_id"].forEach(e=>{const o=e==="client_id"?localStorage:sessionStorage,m=o.getItem(`analytics_${e}`);m?l[e]=m:l[e]=l[`g_${e}`]||`${Math.ceil(Math.random()*1e6)}.${Math.ceil(Math.random()*1e6)}`,o.setItem(`analytics_${e}`,l[e])}),b.value?_("login",{}):R(b,()=>_("login",{})),T.on("*",(e,o)=>{_(e==="addCartItem"?"add_to_cart":"remove_from_cart",{items:[V(o)]})}),v(f,()=>{const e=f[0];e&&_("search",{search_term:e})}),window.location.pathname.startsWith("/s")&&setTimeout(()=>{let e=new URLSearchParams(window.location.search).get("q");e||(e=decodeURIComponent(window.location.pathname.split("/")[2])),e&&typeof e=="string"&&_("view_search_results",{search_term:e})},300)};export{K as S,F as a,B as b,_ as e,V as g,f as s,l as t,Y as u,O as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as k}from"./customer-session.dSYHWdP4.js";import"./server-data.4C60Esyt.js";import{a as g,M as p,c as n,a5 as I}from"./sf-utils.c42cbZ9W.js";import{e as P,g as w}from"./use-analytics._ef6TM4P.js";import{g as f,c as N}from"./price.Easct8WC.js";import"./index.KfrHdfOH.js";import{g as q}from"./name.VA3MEpe0.js";import{g as E}from"./img.AnjeGdy_.js";const O=t=>t&&t.min_quantity||1,S=O,$=t=>!t.hasOwnProperty("quantity")||t.quantity>=S(t),G=$,R=t=>{const a=g(!1);let s=null;const c=g(null),{productId:r}=t,e=p({...t.product,_id:t.product?._id||r,price:f(t.product||{})});!t.product&&r&&(a.value=!0,s=(async()=>{try{const{data:i}=await k.get(`products/${r}`);Object.assign(e,i)}catch(i){console.error(i),c.value=i}a.value=!1})());const d=n(()=>q(e)),h=n(()=>{const{slug:i}=e;return typeof i=="string"?`/${i}`:null}),v=n(()=>{const{pictures:i}=e,m=[];return i&&i.forEach(b=>{const l=E(b);l&&m.push(l)}),m}),o=n(()=>G(e)),u=n(()=>o.value&&e.available&&e.visible),_=n(()=>{if(N(e)){const i=e.base_price;return Math.round((i-f(e))*100/i)}return 0}),y=n(()=>e.has_variations?!0:!!e.variations?.length);return P("view_item",{value:u.value?e.price:0,items:[{...w(e),item_list_name:t.listName,item_list_id:t.listId||t.listName&&I(t.listName)}]}),{isFetching:a,fetching:s,fetchError:c,product:e,title:d,link:h,images:v,isInStock:o,isActive:u,discountPercentage:_,hasVariations:y}};export{G as c,R as u};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{_ as J,w as Q,v as Z}from"./_plugin-vue_export-helper.xATGHWd9.js";import{d as V,a as w,w as P,aa as A,c as y,F as W,N as ee,O as g,a0 as _,W as D,U as T,ad as te,$ as j,P as F,R as E,S as B,ak as ne,V as re,X as le,af as k,I as ae,am as oe,m as ie,Y as se,a6 as ue,a8 as ce}from"./sf-utils.c42cbZ9W.js";const de=V({__name:"Drawer",props:{modelValue:{type:Boolean,default:!1},isHidden:{type:Boolean,default:!1},placement:{default:"start"},position:{default:"fixed"},animation:{default:"slide"},hasCloseButton:{type:Boolean,default:!0},anchorEl:{},backdropTarget:{default:"#teleported-top"},canLockScroll:{type:Boolean,default:!0},maxWidth:{},class:{}},emits:["update:modelValue"],setup(e,{expose:n,emit:t}){n();const r=e,a=t,l=()=>a("update:modelValue",!1),o=w(null),i=h=>{if(!o.value?.contains(h.target)){if(r.anchorEl?.contains(h.target))return;l()}},m=h=>{h.key==="Escape"&&l()},s=w(0);P(A(r,"modelValue"),async h=>{h?(r.canLockScroll&&(s.value=window.innerWidth-document.documentElement.clientWidth,document.body.style.overflow="hidden",document.body.style.paddingRight=`${s.value}px`),setTimeout(()=>{document.addEventListener("click",i,{passive:!0}),document.addEventListener("keydown",m,{passive:!0})},500)):(r.canLockScroll&&(document.body.style.overflow="",document.body.style.paddingRight=""),document.removeEventListener("click",i),document.removeEventListener("keydown",m))});const u=y(()=>{if(r.animation!=="slide")return null;switch(r.placement){case"start":return"left";case"end":return"right";case"top":return"down";default:return"up"}}),d=w(null);r.animation==="scale"&&P(A(r,"modelValue"),h=>{h?W(()=>{setTimeout(()=>{d.value="transition",setTimeout(()=>{r.modelValue&&(d.value="")},300)},50)}):d.value="transition scale-90"},{immediate:!0});const p=y(()=>Array.isArray(r.class)?r.class:[r.class]),v=y(()=>r.position==="fixed"),c=y(()=>r.placement==="start"||r.placement==="end"),f={props:r,emit:a,close:l,drawer:o,outsideClickListener:i,escClickListener:m,scrollbarWidth:s,slideTo:u,animationClassName:d,customClassList:p,isFixed:v,isPlacementX:c};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}}),fe=["open","data-drawer"],me={class:"relative h-full"},ve=B("i",{class:"m-0 text-3xl text-base-400 i-close hover:text-base-600"},null,-1),pe={key:0,class:"size-screen fixed left-0 top-0 z-30 bg-black/50","data-drawer-backdrop":""};function he(e,n,t,r,a,l){const o=ee("Fade");return g(),_(o,{slide:r.slideTo,speed:"slow","is-floating":""},{default:D(()=>[t.modelValue?le((g(),F("dialog",{key:0,ref:"drawer",class:T(["z-40 w-screen p-0",[t.position,r.isPlacementX?"m-0":"mx-auto",r.isPlacementX&&!t.maxWidth?"max-w-sm":null,r.isFixed?`top-0 ${r.isPlacementX?"h-screen":"max-h-screen"}`:null,r.isFixed&&t.placement!=="end"?"left-0":null,r.isFixed&&t.placement==="end"?"left-auto right-0":null,r.animationClassName,...r.customClassList]]),style:te({maxWidth:t.maxWidth?`min(${t.maxWidth}, calc(100vw - ${r.scrollbarWidth}px))`:r.isPlacementX?void 0:`calc(100vw - ${r.scrollbarWidth}px)`}),open:t.modelValue,"data-drawer":t.placement},[B("div",me,[t.hasCloseButton?(g(),F("button",{key:0,type:"button","aria-label":"Fechar",onClick:Q(r.close,["prevent"]),class:T(["absolute top-2 z-30 rounded",t.placement==="end"?"left-2":"right-2"]),"data-drawer-close":""},[j(e.$slots,"close",{},()=>[ve])],2)):E("",!0),j(e.$slots,"default")]),t.backdropTarget?(g(),_(ne,{key:0,to:t.backdropTarget},[re(o,null,{default:D(()=>[t.modelValue&&!t.isHidden?(g(),F("div",pe)):E("",!0)]),_:1})],8,["to"])):E("",!0)],14,fe)),[[Z,!t.isHidden]]):E("",!0)]),_:3},8,["slide"])}const Ge=J(de,[["render",he]]);let we=0;function be(){return++we}function qe(){return be()}function b(e){var n;if(e==null||e.value==null)return null;let t=(n=e.value.$el)!=null?n:e.value;return t instanceof Node?t:null}function L(e,n,...t){if(e in n){let a=n[e];return typeof a=="function"?a(...t):a}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(a=>`"${a}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,L),r}var ge=Object.defineProperty,ye=(e,n,t)=>n in e?ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,C=(e,n,t)=>(ye(e,typeof n!="symbol"?n+"":n,t),t);let Ee=class{constructor(){C(this,"current",this.detect()),C(this,"currentId",0)}set(n){this.current!==n&&(this.currentId=0,this.current=n)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},O=new Ee;function R(e){if(O.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let n=b(e);if(n)return n.ownerDocument}return document}let S=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var xe=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(xe||{}),Fe=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Fe||{}),Ne=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Ne||{});function U(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(S)).sort((n,t)=>Math.sign((n.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var X=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(X||{});function z(e,n=0){var t;return e===((t=R(e))==null?void 0:t.body)?!1:L(n,{0(){return e.matches(S)},1(){let r=e;for(;r!==null;){if(r.matches(S))return!0;r=r.parentElement}return!1}})}function Je(e){let n=R(e);W(()=>{n&&!z(n.activeElement,0)&&ke(e)})}var Se=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Se||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function ke(e){e?.focus({preventScroll:!0})}let Le=["textarea","input"].join(",");function Oe(e){var n,t;return(t=(n=e?.matches)==null?void 0:n.call(e,Le))!=null?t:!1}function Pe(e,n=t=>t){return e.slice().sort((t,r)=>{let a=n(t),l=n(r);if(a===null||l===null)return 0;let o=a.compareDocumentPosition(l);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Qe(e,n){return Ae(U(),n,{relativeTo:e})}function Ae(e,n,{sorted:t=!0,relativeTo:r=null,skipElements:a=[]}={}){var l;let o=(l=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e?.ownerDocument)!=null?l:document,i=Array.isArray(e)?t?Pe(e):e:U(e);a.length>0&&i.length>1&&(i=i.filter(c=>!a.includes(c))),r=r??o.activeElement;let m=(()=>{if(n&5)return 1;if(n&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(n&1)return 0;if(n&2)return Math.max(0,i.indexOf(r))-1;if(n&4)return Math.max(0,i.indexOf(r))+1;if(n&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=n&32?{preventScroll:!0}:{},d=0,p=i.length,v;do{if(d>=p||d+p<=0)return 0;let c=s+d;if(n&16)c=(c+p)%p;else{if(c<0)return 3;if(c>=p)return 1}v=i[c],v?.focus(u),d+=m}while(v!==o.activeElement);return n&6&&Oe(v)&&v.select(),2}function _e(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function De(){return/Android/gi.test(window.navigator.userAgent)}function Te(){return _e()||De()}function x(e,n,t){O.isServer||k(r=>{document.addEventListener(e,n,t),r(()=>document.removeEventListener(e,n,t))})}function je(e,n,t){O.isServer||k(r=>{window.addEventListener(e,n,t),r(()=>window.removeEventListener(e,n,t))})}function Ze(e,n,t=y(()=>!0)){function r(l,o){if(!t.value||l.defaultPrevented)return;let i=o(l);if(i===null||!i.getRootNode().contains(i))return;let m=function s(u){return typeof u=="function"?s(u()):Array.isArray(u)||u instanceof Set?u:[u]}(e);for(let s of m){if(s===null)continue;let u=s instanceof HTMLElement?s:b(s);if(u!=null&&u.contains(i)||l.composed&&l.composedPath().includes(u))return}return!z(i,X.Loose)&&i.tabIndex!==-1&&l.preventDefault(),n(l,i)}let a=w(null);x("pointerdown",l=>{var o,i;t.value&&(a.value=((i=(o=l.composedPath)==null?void 0:o.call(l))==null?void 0:i[0])||l.target)},!0),x("mousedown",l=>{var o,i;t.value&&(a.value=((i=(o=l.composedPath)==null?void 0:o.call(l))==null?void 0:i[0])||l.target)},!0),x("click",l=>{Te()||a.value&&(r(l,()=>a.value),a.value=null)},!0),x("touchend",l=>r(l,()=>l.target instanceof HTMLElement?l.target:null),!0),je("blur",l=>r(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function I(e,n){if(e)return e;let t=n??"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function et(e,n){let t=w(I(e.value.type,e.value.as));return ae(()=>{t.value=I(e.value.type,e.value.as)}),k(()=>{var r;t.value||b(n)&&b(n)instanceof HTMLButtonElement&&!((r=b(n))!=null&&r.hasAttribute("type"))&&(t.value="button")}),t}function M(e){return[e.screenX,e.screenY]}function tt(){let e=w([-1,-1]);return{wasMoved(n){let t=M(n);return e.value[0]===t[0]&&e.value[1]===t[1]?!1:(e.value=t,!0)},update(n){e.value=M(n)}}}var Ce=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Ce||{}),Ie=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ie||{});function Me({visible:e=!0,features:n=0,ourProps:t,theirProps:r,...a}){var l;let o=G(r,t),i=Object.assign(a,{props:o});if(e||n&2&&o.static)return N(i);if(n&1){let m=(l=o.unmount)==null||l?0:1;return L(m,{0(){return null},1(){return N({...a,props:{...o,hidden:!0,style:{display:"none"}}})}})}return N(i)}function N({props:e,attrs:n,slots:t,slot:r,name:a}){var l,o;let{as:i,...m}=$e(e,["unmount","static"]),s=(l=t.default)==null?void 0:l.call(t,r),u={};if(r){let d=!1,p=[];for(let[v,c]of Object.entries(r))typeof c=="boolean"&&(d=!0),c===!0&&p.push(v);d&&(u["data-headlessui-state"]=p.join(" "))}if(i==="template"){if(s=K(s??[]),Object.keys(m).length>0||Object.keys(n).length>0){let[d,...p]=s??[];if(!He(d)||p.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${a} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(m).concat(Object.keys(n)).map(f=>f.trim()).filter((f,h,Y)=>Y.indexOf(f)===h).sort((f,h)=>f.localeCompare(h)).map(f=>` - ${f}`).join(`
|
|
2
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(`
|
|
3
|
+
`)].join(`
|
|
4
|
+
`));let v=G((o=d.props)!=null?o:{},m,u),c=oe(d,v,!0);for(let f in v)f.startsWith("on")&&(c.props||(c.props={}),c.props[f]=v[f]);return c}return Array.isArray(s)&&s.length===1?s[0]:s}return ie(i,Object.assign({},m,u),{default:()=>s})}function K(e){return e.flatMap(n=>n.type===se?K(n.children):[n])}function G(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},t={};for(let r of e)for(let a in r)a.startsWith("on")&&typeof r[a]=="function"?(t[a]!=null||(t[a]=[]),t[a].push(r[a])):n[a]=r[a];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(t).map(r=>[r,void 0])));for(let r in t)Object.assign(n,{[r](a,...l){let o=t[r];for(let i of o){if(a instanceof Event&&a.defaultPrevented)return;i(a,...l)}}});return n}function nt(e){let n=Object.assign({},e);for(let t in n)n[t]===void 0&&delete n[t];return n}function $e(e,n=[]){let t=Object.assign({},e);for(let r of n)r in t&&delete t[r];return t}function He(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var Ve=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ve||{});let rt=V({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:n,attrs:t}){return()=>{var r;let{features:a,...l}=e,o={"aria-hidden":(a&2)===2?!0:(r=l["aria-hidden"])!=null?r:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(a&4)===4&&(a&2)!==2&&{display:"none"}}};return Me({ourProps:o,theirProps:l,slot:{},attrs:t,slots:n,name:"Hidden"})}}}),q=Symbol("Context");var We=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(We||{});function lt(){return ue(q,null)}function at(e){ce(q,e)}var Be=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Be||{});function Re(e){throw new Error("Unexpected object: "+e)}var Ue=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Ue||{});function ot(e,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),a=r??-1;switch(e.focus){case 0:{for(let l=0;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 1:{a===-1&&(a=t.length);for(let l=a-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 2:{for(let l=a+1;l<t.length;++l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 3:{for(let l=t.length-1;l>=0;--l)if(!n.resolveDisabled(t[l],l,t))return l;return r}case 4:{for(let l=0;l<t.length;++l)if(n.resolveId(t[l],l,t)===e.id)return l;return r}case 5:return null;default:Re(e)}}let $=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function H(e){var n,t;let r=(n=e.innerText)!=null?n:"",a=e.cloneNode(!0);if(!(a instanceof HTMLElement))return r;let l=!1;for(let i of a.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))i.remove(),l=!0;let o=l?(t=a.innerText)!=null?t:"":r;return $.test(o)&&(o=o.replace($,"")),o}function Xe(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let r=t.split(" ").map(a=>{let l=document.getElementById(a);if(l){let o=l.getAttribute("aria-label");return typeof o=="string"?o.trim():H(l).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return H(e).trim()}function it(e){let n=w(""),t=w("");return()=>{let r=b(e);if(!r)return"";let a=r.innerText;if(n.value===a)return t.value;let l=Xe(r).trim().toLowerCase();return n.value=a,t.value=l,l}}export{Me as A,Ge as D,nt as E,Ce as N,Pe as O,Ae as P,$e as T,Je as _,z as a,rt as b,Ue as c,qe as d,et as e,ot as f,tt as g,X as h,We as i,Be as j,R as k,lt as l,O as m,je as n,b as o,it as p,xe as q,U as r,Ve as s,at as t,L as u,Qe as v,Ze as w,Fe as x};
|