badgecraft 0.3.0
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/CHANGELOG.md +31 -0
- package/LICENSE +21 -0
- package/README.md +406 -0
- package/cli/index.mjs +143 -0
- package/cli/render.d.ts +20 -0
- package/cli/render.mjs +87 -0
- package/cli/studio.mjs +98 -0
- package/dist/badge-B-g_9WFj.d.ts +79 -0
- package/dist/badge-CCjUxNIG.d.cts +79 -0
- package/dist/chunk-3OMN635U.js +44 -0
- package/dist/chunk-3OMN635U.js.map +1 -0
- package/dist/chunk-BRT5S5PF.cjs +3418 -0
- package/dist/chunk-BRT5S5PF.cjs.map +1 -0
- package/dist/chunk-EBDSIGZR.cjs +48 -0
- package/dist/chunk-EBDSIGZR.cjs.map +1 -0
- package/dist/chunk-RRYBMB25.js +3410 -0
- package/dist/chunk-RRYBMB25.js.map +1 -0
- package/dist/cli-browser.js +526 -0
- package/dist/element.cjs +176 -0
- package/dist/element.cjs.map +1 -0
- package/dist/element.d.cts +31 -0
- package/dist/element.d.ts +31 -0
- package/dist/element.js +174 -0
- package/dist/element.js.map +1 -0
- package/dist/index.cjs +47 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +58 -0
- package/dist/index.d.ts +58 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/react.cjs +60 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.cts +29 -0
- package/dist/react.d.ts +29 -0
- package/dist/react.js +55 -0
- package/dist/react.js.map +1 -0
- package/dist/studio/assets/badge-9Zq6e9Ht.js +524 -0
- package/dist/studio/assets/base-ItCYnbux.css +1 -0
- package/dist/studio/assets/base-LFa9cTPp.js +1 -0
- package/dist/studio/assets/element-CCTxyf61.js +1 -0
- package/dist/studio/assets/index-BVuSTaz-.css +1 -0
- package/dist/studio/assets/index-CTTcx2pV.js +28 -0
- package/dist/studio/assets/option-keys-CKi71y0n.js +1 -0
- package/dist/studio/assets/react-Cq5Erey2.js +9 -0
- package/dist/studio/assets/react-DyJFYpWJ.js +1 -0
- package/dist/studio/assets/studio-C6plMNOe.css +1 -0
- package/dist/studio/assets/studio-DBcSY6tV.js +1 -0
- package/dist/studio/assets/style-C2sJ2Xy3.css +1 -0
- package/dist/studio/assets/vue-BpGwr3iF.js +1 -0
- package/dist/studio/element.html +31 -0
- package/dist/studio/env/studio.hdr +5 -0
- package/dist/studio/index.html +24 -0
- package/dist/studio/logos/apple.svg +1 -0
- package/dist/studio/logos/atlassian.svg +1 -0
- package/dist/studio/logos/google.svg +1 -0
- package/dist/studio/logos/meta.svg +1 -0
- package/dist/studio/react.html +16 -0
- package/dist/studio/studio.html +27 -0
- package/dist/studio/vue.html +15 -0
- package/dist/types-CHM3-ZZV.d.cts +204 -0
- package/dist/types-CHM3-ZZV.d.ts +204 -0
- package/dist/vue.cjs +93 -0
- package/dist/vue.cjs.map +1 -0
- package/dist/vue.d.cts +115 -0
- package/dist/vue.d.ts +115 -0
- package/dist/vue.js +87 -0
- package/dist/vue.js.map +1 -0
- package/docs/cli.md +146 -0
- package/docs/gallery.jpg +0 -0
- package/docs/performance.md +151 -0
- package/docs/render-quality.md +220 -0
- package/docs/studio.jpg +0 -0
- package/package.json +163 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,n as t,r as n,t as r}from"./react-Cq5Erey2.js";import{i,n as a,r as o,t as s}from"./badge-9Zq6e9Ht.js";import{A as c,C as l,D as u,E as d,F as f,I as p,M as ee,N as m,O as h,P as te,S as ne,T as g,_ as re,a as _,b as ie,c as v,d as y,g as b,h as ae,i as oe,j as x,k as S,l as C,m as se,n as ce,o as w,p as T,r as E,s as D,t as le,u as ue,w as de,x as fe,y as pe}from"./base-LFa9cTPp.js";var O=e(),me=n(),k=[{id:`google`,title:`Google`,url:`./logos/google.svg`},{id:`apple`,title:`Apple`,url:`./logos/apple.svg`},{id:`meta`,title:`Meta`,url:`./logos/meta.svg`},{id:`atlassian`,title:`Atlassian`,url:`./logos/atlassian.svg`}],he=k.map(e=>e.id),ge=e=>typeof e==`string`&&he.includes(e);function A(e){let t=f.find(t=>t.id===e)?.options.svg;return k.find(e=>e.url===t)?.id??`google`}var j;function _e(){return j??=Promise.all(k.map(async({id:e,url:t})=>{try{let n=await fetch(t);return n.ok?[e,await n.text()]:null}catch{return null}})).then(e=>Object.fromEntries(e.filter(e=>e!==null))),j}var ve=`badgecraft.studio.v2`,ye=[`metallic-badge.studio.v2`,`metallic-badge.studio.v1`],M={metal:[`metalRoughness`,`metalBrushed`,`metalIridescence`],enamel:[`enamelRoughness`,`enamelClearcoat`,`enamelMetalness`,`enamelFlakes`],base:[`baseColor`]},N=e=>`${Math.round(e*100)}%`,P=e=>`${(e*100).toFixed(1).replace(/\.0$/,``)}%`,F=e=>`${Math.round(e)}°`,I={framePadding:{key:`framePadding`,label:`Artwork inset`,hint:`Gap between the artwork and the frame edge`,min:0,max:.45,step:.01,format:N},innerRing:{key:`innerRing`,label:`Inner ring`,hint:`A second line inside the frame`,min:0,max:.05,step:.002,format:e=>e?N(e/.05):`Off`},metalRoughness:{key:`metalRoughness`,slot:`metal`,label:`Satin`,hint:`Mirror polish to soft satin`,min:0,max:1,step:.01,format:N},metalBrushed:{key:`metalBrushed`,slot:`metal`,label:`Brushed`,hint:`Fine circular grain`,min:0,max:1,step:.01,format:N},metalIridescence:{key:`metalIridescence`,slot:`metal`,label:`Iridescence`,hint:`Oil-slick colour shift`,min:0,max:1,step:.01,format:N},enamelRoughness:{key:`enamelRoughness`,slot:`enamel`,label:`Satin`,hint:`Glossy to matte colour`,min:0,max:1,step:.01,format:N},enamelClearcoat:{key:`enamelClearcoat`,slot:`enamel`,label:`Clear coat`,hint:`Glassy layer on top`,min:0,max:1,step:.01,format:N},enamelMetalness:{key:`enamelMetalness`,slot:`enamel`,label:`Metallic`,hint:`Candy-paint shimmer`,min:0,max:1,step:.01,format:N},enamelFlakes:{key:`enamelFlakes`,slot:`enamel`,label:`Glitter`,hint:`Sparkling flakes`,min:0,max:1,step:.01,format:N},depth:{key:`depth`,label:`Depth`,hint:`How far the metal stands out`,min:.01,max:.12,step:.005,format:e=>N(e/.12)},rim:{key:`rim`,label:`Rim width`,hint:`Metal border around the whole silhouette`,min:0,max:.08,step:.002,format:e=>N(e/.08)},outline:{key:`outline`,label:`Wire width`,hint:`Metal wires between colours. Auto adds them to multi-colour art without strokes.`,min:0,max:.04,step:.001,format:P},bevel:{key:`bevel`,label:`Bevel width`,hint:`Slope along the edges of raised shapes`,min:.002,max:.08,step:.002,format:P},edge:{key:`edge`,label:`Edge rounding`,hint:`Softness of the outer edge`,min:.002,max:.05,step:.001,format:P},enamelLevel:{key:`enamelLevel`,label:`Enamel fill`,hint:`How full the colour pools are`,min:0,max:1,step:.01,format:N},domeWidth:{key:`domeWidth`,label:`Dome spread`,hint:`How far enamel curves up from the walls`,min:.005,max:.15,step:.005,format:P},smoothing:{key:`smoothing`,label:`Smoothing`,hint:`Softens small details in the relief`,min:0,max:4,step:.1,format:e=>e.toFixed(1)},floor:{key:`floor`,label:`Recess`,hint:`Height of the areas between wires`,min:0,max:.8,step:.02,format:e=>N(e/.8)},enamelDome:{key:`enamelDome`,label:`Enamel dome`,hint:`Pillowy colour fields`,min:-.3,max:.4,step:.01,format:e=>(e*100).toFixed(0)},thickness:{key:`thickness`,label:`Edge thickness`,hint:`Side wall of the badge`,min:0,max:.08,step:.002,format:e=>N(e/.08)},ao:{key:`ao`,label:`Contact shadows`,hint:`Darkens creases and corners`,min:0,max:1,step:.01,format:N},environmentRotation:{key:`environmentRotation`,label:`Light direction`,min:-180,max:180,step:1,format:F},exposure:{key:`exposure`,label:`Brightness`,min:.2,max:3,step:.01,format:e=>`${e.toFixed(2)}×`},shadow:{key:`shadow`,label:`Drop shadow`,min:0,max:1,step:.01,format:N},tiltMax:{key:`tiltMax`,label:`Tilt range`,hint:`How far the badge leans toward the pointer`,min:0,max:45,step:1,format:F},poseRoll:{key:`poseRoll`,label:`Rotate`,hint:`Clockwise`,min:-45,max:45,step:1,format:F},poseYaw:{key:`poseYaw`,label:`Turn`,hint:`Left to right`,min:-45,max:45,step:1,format:F},posePitch:{key:`posePitch`,label:`Tip`,hint:`Top to bottom`,min:-45,max:45,step:1,format:F}},L={artwork:`google`,custom:``,customName:``,mode:`auto`,frame:`none`,innerRing:0,framePadding:.22,color:`#ffffff`,metal:`gold`,metalRoughness:null,metalBrushed:null,metalIridescence:null,enamel:`enamel`,enamelRoughness:null,enamelClearcoat:null,enamelMetalness:null,enamelFlakes:null,base:`onyx`,baseColor:null,accent:`silver`,depth:.05,rim:.03,outline:null,fillHoles:!0,floor:.3,enamelDome:.12,thickness:.03,profile:`round`,bevel:.02,edge:.014,enamelLevel:.16,domeWidth:.05,smoothing:.9,ao:.45,environment:`studio`,environmentRotation:0,exposure:1,toneMapping:`neutral`,shadow:.35,interaction:`drag`,idle:`none`,tiltMax:18,poseYaw:-8,posePitch:-5,poseRoll:0,locked:!1,lockedColor:`#3a3a3c`};function R(e=`google`){let t=f.find(t=>t.id===e)??f[0],{metal:n,enamel:r,base:i,accent:a,locked:o,frame:s}=t.options,c={...L,artwork:A(t.id)};return typeof n==`string`&&(c.metal=n),typeof r==`string`&&(c.enamel=r),typeof i==`string`&&(c.base=i),typeof a==`string`&&(c.accent=a),typeof o==`boolean`&&(c.locked=o),typeof s==`string`?c.frame=s:s&&(c.frame=s.shape??`none`,c.innerRing=s.innerRing??0,c.framePadding=s.padding??c.framePadding),c}var be=e=>e!==null&&f.some(t=>t.id===e),xe={mode:[`auto`,`cloisonne`,`embossed`],frame:w,metal:C,enamel:C,base:C,accent:C,profile:[`round`,`soft`,`chamfer`],environment:Object.keys(i),toneMapping:[`neutral`,`aces`,`agx`,`none`],interaction:[`drag`,`tilt`,`none`],idle:[`none`,`float`,`shine`]},Se=I,Ce=[`baseColor`,`color`,`lockedColor`];function we(e){let t=R();if(!e||typeof e!=`object`||Array.isArray(e))return t;let n=e,r=t;for(let e of Object.keys(L)){let t=n[e],i=Se[e],a=xe[e];t===null&&L[e]===null?r[e]=null:a&&typeof t==`string`&&a.includes(t)?r[e]=t:i&&typeof t==`number`&&Number.isFinite(t)?r[e]=Math.max(i.min,Math.min(i.max,t)):(Ce.includes(e)&&typeof t==`string`&&/^#[\da-f]{6}$/i.test(t)||typeof L[e]==`boolean`&&typeof t==`boolean`||(e===`custom`||e===`customName`)&&typeof t==`string`&&t.length<=1048576)&&(r[e]=t)}let i=n.artwork??(n.sample===`custom`?`custom`:typeof n.sample==`string`?A(n.sample):void 0);return(i===`custom`?t.custom:ge(i))&&(t.artwork=i),t}function Te(e){let t=[ve,...ye].map(t=>e.getItem(t)).find(e=>e!==null);return t?we(JSON.parse(t)):null}function Ee(e,t){let n=e[t];if(n!==null)return n;let r=t.startsWith(`metal`)?`metal`:t.startsWith(`enamel`)?`enamel`:`base`,i=t.slice(r.length).replace(/^./,e=>e.toLowerCase()),a=o[e[r]][i];return typeof a==`number`||typeof a==`string`?a:i===`roughness`?.4:i===`color`?`#ffffff`:0}function z(e,t){return Object.fromEntries([[e,t],...M[e].map(e=>[e,null])])}function De(e,t){return M[t].some(t=>e[t]!==null)}function Oe(e){let t=e.trim();if(!t)return`Paste SVG markup or import an .svg file to see your badge.`;if(new Blob([t]).size>1048576)return`Choose an SVG smaller than 1 MB.`;let n=new DOMParser().parseFromString(t,`image/svg+xml`);return n.querySelector(`parsererror`)||n.documentElement.localName!==`svg`?`This SVG could not be read. Check that it has a complete <svg>…</svg> element.`:null}var B=(e,t)=>Object.fromEntries([[`preset`,e[t]],...M[t].filter(t=>e[t]!==null).map(n=>[n.slice(t.length).replace(/^./,e=>e.toLowerCase()),e[n]])]);function ke(e){if(e.frame===`none`)return null;let t={...e.innerRing?{innerRing:e.innerRing}:{},...e.framePadding===L.framePadding?{}:{padding:e.framePadding}};return Object.keys(t).length?{shape:e.frame,...t}:e.frame}function V(e){return{mode:e.mode,color:e.color,frame:ke(e),metal:B(e,`metal`),enamel:B(e,`enamel`),base:B(e,`base`),accent:e.accent,rim:e.rim,outline:e.outline??`auto`,fillHoles:e.fillHoles,relief:{depth:e.depth,floor:e.floor,enamelDome:e.enamelDome,thickness:e.thickness,profile:e.profile,bevel:e.bevel,edge:e.edge,enamelLevel:e.enamelLevel,domeWidth:e.domeWidth,smoothing:e.smoothing,ao:e.ao},environment:e.environment,environmentRotation:e.environmentRotation,exposure:e.exposure,toneMapping:e.toneMapping,shadow:e.shadow,interaction:e.interaction,tiltMax:e.tiltMax,idle:e.idle,pose:{yaw:e.poseYaw,pitch:e.posePitch,roll:e.poseRoll},locked:e.locked,lockedColor:e.lockedColor}}var H=[{id:`react`,label:`React`,install:`npm install badgecraft`,file:`Award.tsx`},{id:`vue`,label:`Vue`,install:`npm install badgecraft`,file:`Award.vue`},{id:`element`,label:`Web Component`,install:`npm install badgecraft`,file:`award.html`},{id:`html`,label:`Plain HTML`,install:null,file:`index.html`},{id:`vanilla`,label:`JavaScript`,install:`npm install badgecraft`,file:`award.js`}];function Ae(e,t){let n=e,r=t,i=Object.fromEntries(Object.entries(n).filter(([e,t])=>JSON.stringify(t)!==JSON.stringify(r[e])));return Object.keys(i).length?i:void 0}function je(e){if(typeof e!=`object`||!e)return e;let t=Object.entries(e).map(([e,t])=>[e,je(t)]);return t.length===1&&t[0][0]===`preset`?t[0][1]:Object.fromEntries(t)}var Me=e=>JSON.stringify(e,null,2).replace(/</g,`\\u003c`).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`),Ne=e=>`\`${e.trim().replace(/\\/g,`\\\\`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${").replace(/<\/(script)/gi,`<\\/$1`)}\``;function Pe(e,t,n){let r=V(e),i={...V(R()),interaction:`tilt`},a=Object.fromEntries(Object.entries(r).map(([e,t])=>[e,e===`relief`||e===`pose`?Ae(t,i[e]):t]).filter(([e,t])=>t!==void 0&&JSON.stringify(t)!==JSON.stringify(i[e])).map(([e,t])=>[e,je(t)])),o=(e=``)=>`const options = ${Me(a)}${e}\n\nconst svg = ${Ne(t)}`;return n===`react`?`import { Badgecraft } from 'badgecraft/react'\n\n${o(` as const`)}\n\nexport default function Award() {\n return <Badgecraft {...options} svg={svg} size={240} alt="Custom badge" />\n}\n`:n===`vue`?`<script setup>\nimport { Badgecraft } from 'badgecraft/vue'\n\n${o()}\n<\/script>\n\n<template>\n <Badgecraft v-bind="options" :svg="svg" :size="240" alt="Custom badge" />\n</template>\n`:n===`element`||n===`html`?`<badge-craft id="award" alt="Custom badge" style="width:240px;height:240px"></badge-craft>\n\n<script type="module">\nimport '${n===`html`?`https://cdn.jsdelivr.net/npm/badgecraft@${p}/dist/element.js`:`badgecraft/element`}'\n\n${o()}\n\ndocument.querySelector('#award').options = { ...options, svg }\n<\/script>\n`:`import { Badgecraft } from 'badgecraft'\n\n${o()}\n\n// HTML: <div id="award" aria-label="Custom badge" style="width:240px;height:240px"></div>\nconst badge = new Badgecraft(document.querySelector('#award'), { ...options, svg })\nawait badge.ready\n\n// When removing this view: badge.destroy()\n`}var U=t();function Fe({open:e,state:t,source:n,onClose:r,notify:i}){let a=(0,O.useRef)(null),o=(0,O.useRef)(null),[s,c]=(0,O.useState)(`react`),[l,u]=(0,O.useState)(null),d=(0,O.useMemo)(()=>e?Pe(t,n,s):``,[e,t,n,s]),f=H.find(e=>e.id===s)??H[0];(0,O.useEffect)(()=>{let t=a.current;t&&(e&&!t.open?t.showModal():!e&&t.open&&t.close())},[e]),(0,O.useEffect)(()=>{if(!l)return;let e=setTimeout(()=>u(null),1800);return()=>clearTimeout(e)},[l]);let p=async(e,t,n)=>{await S(e,n)?(u(t),i(t===`code`?`Code copied. It includes your artwork and settings.`:`Install command copied.`)):i(`Clipboard unavailable. The code is selected: press ⌘C or Ctrl+C.`)};return(0,U.jsx)(`dialog`,{ref:a,className:`code-dialog`,"aria-labelledby":`code-title`,onClose:r,onClick:e=>e.target===e.currentTarget&&r(),children:(0,U.jsxs)(`div`,{className:`code-dialog-inner`,children:[(0,U.jsxs)(`header`,{className:`code-dialog-head`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h2`,{id:`code-title`,children:`Use it in your app`}),(0,U.jsx)(`p`,{children:`Working code with your artwork and settings built in.`})]}),(0,U.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon`,onClick:r,"aria-label":`Close`,children:(0,U.jsx)(se,{})})]}),(0,U.jsx)(`div`,{className:`tabs code-tabs`,role:`tablist`,"aria-label":`Framework`,children:H.map(e=>(0,U.jsxs)(`button`,{type:`button`,role:`tab`,className:`tab`,id:`tab-${e.id}`,"aria-selected":e.id===s,"aria-controls":`code-panel`,onClick:()=>c(e.id),children:[(0,U.jsx)(te,{framework:e.id}),e.label]},e.id))}),(0,U.jsxs)(`div`,{className:`code-step`,children:[(0,U.jsx)(`span`,{className:`code-step-index`,children:`1`}),f.install?(0,U.jsxs)(`div`,{className:`install-line`,children:[(0,U.jsx)(`code`,{children:f.install}),(0,U.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>p(f.install??``,`install`),"aria-label":`Copy install command`,children:l===`install`?(0,U.jsx)(T,{}):(0,U.jsx)(b,{})})]}):(0,U.jsx)(`p`,{className:`code-step-text`,children:`No install needed. It loads from a CDN.`})]}),(0,U.jsxs)(`div`,{className:`code-step code-step-main`,children:[(0,U.jsx)(`span`,{className:`code-step-index`,children:`2`}),(0,U.jsxs)(`div`,{className:`code-file`,id:`code-panel`,role:`tabpanel`,"aria-labelledby":`tab-${s}`,children:[(0,U.jsxs)(`div`,{className:`code-file-head`,children:[(0,U.jsx)(`span`,{children:f.file}),(0,U.jsxs)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:()=>p(d,`code`,o.current),children:[l===`code`?(0,U.jsx)(T,{}):(0,U.jsx)(b,{}),l===`code`?`Copied`:`Copy code`]})]}),(0,U.jsx)(`pre`,{ref:o,className:`code`,id:`code`,tabIndex:0,"aria-label":`Generated code`,children:d})]})]})]})})}async function Ie(e,t){let n=document.createElement(`div`);n.style.cssText=`position:fixed;left:-10000px;top:0;width:${t}px;height:${t}px;pointer-events:none`,n.setAttribute(`aria-hidden`,`true`),document.body.append(n);let r;try{r=new s(n,{...e,interaction:`none`,idle:`none`}),await r.ready;let i=document.createElement(`canvas`);i.width=i.height=t;let a=i.getContext(`2d`);if(!a)throw Error(`A 2D canvas is unavailable.`);a.drawImage(r.canvas,0,0,t,t);let o=await new Promise(e=>i.toBlob(e,`image/png`));if(!o)throw Error(`The browser could not create an image.`);let c=URL.createObjectURL(o),l=document.createElement(`a`);l.href=c,l.download=`badgecraft-${t}.png`,l.click(),setTimeout(()=>URL.revokeObjectURL(c),1e3)}finally{r?.destroy(),n.remove()}}var Le=800;function W(e,t){return e.artwork===`custom`?e.custom:t[e.artwork]??``}function Re(e,t){let n=ze(e,t);return{past:[],present:e,future:[],committed:n?R():e,error:n,lastKey:null,lastAt:0}}function ze(e,t){return e.artwork!==`custom`&&!t[e.artwork]?`This example could not be loaded. Choose another one or import your own SVG.`:Oe(W(e,t))}function G(e,t,n){let r=ze(t,n);return{...e,present:t,error:r,committed:r?e.committed:t}}function Be(e){return(t,n)=>{switch(n.type){case`edit`:{let r={...t.present,...n.patch},i=n.key===t.lastKey&&n.at-t.lastAt<Le?t.past:[...t.past,t.present].slice(-80);return{...G(t,r,e),past:i,future:[],lastKey:n.key,lastAt:n.at}}case`replace`:return{...G(t,n.state,e),past:[...t.past,t.present].slice(-80),future:[],lastKey:null};case`reject`:return{...t,error:n.error};case`undo`:{let n=t.past.at(-1);return n?{...G(t,n,e),past:t.past.slice(0,-1),future:[t.present,...t.future],lastKey:null}:t}case`redo`:{let[n,...r]=t.future;return n?{...G(t,n,e),past:[...t.past,t.present],future:r,lastKey:null}:t}}}}function K({name:e,label:t,value:n,choices:r,onChange:i,note:a}){let o=r.find(e=>e.value===n);return(0,U.jsxs)(`fieldset`,{className:`control`,children:[(0,U.jsxs)(`legend`,{className:`control-head`,children:[(0,U.jsx)(`span`,{className:`control-label`,children:t}),(0,U.jsxs)(`span`,{className:`control-value`,children:[o?.label,a]})]}),(0,U.jsx)(`div`,{className:`swatches`,children:r.map(t=>(0,U.jsxs)(`label`,{className:`swatch`,title:t.label,children:[(0,U.jsx)(`input`,{type:`radio`,name:e,value:t.value,checked:t.value===n,onChange:()=>i(t.value),className:`choice-input`}),(0,U.jsx)(`span`,{className:`swatch-chip`,style:{background:t.swatch},"aria-hidden":`true`}),(0,U.jsx)(`span`,{className:`sr-only`,children:t.label})]},t.value))})]})}function q({name:e,label:t,value:n,choices:r,onChange:i,note:a}){let o=r.every(e=>e.icon);return(0,U.jsxs)(`fieldset`,{className:`control`,children:[(0,U.jsxs)(`legend`,{className:`control-head`,children:[(0,U.jsx)(`span`,{className:`control-label`,children:t}),o?(0,U.jsxs)(`span`,{className:`control-value`,children:[r.find(e=>e.value===n)?.label,a]}):a]}),(0,U.jsx)(`div`,{className:o?`segmented segmented-icons`:`segmented`,children:r.map(t=>(0,U.jsxs)(`label`,{className:`segment`,title:o?t.label:void 0,children:[(0,U.jsx)(`input`,{type:`radio`,name:e,value:t.value,checked:t.value===n,onChange:()=>i(t.value),className:`choice-input`}),(0,U.jsx)(`span`,{className:`segment-face`,children:t.icon??t.label}),o&&(0,U.jsx)(`span`,{className:`sr-only`,children:t.label})]},t.value))})]})}function J({field:e,value:t,onChange:n,onReset:r,overridden:i=!1,disabled:a=!1,label:o=e.label,valueLabel:s,resetLabel:c}){let u=(0,O.useId)(),d=(t-e.min)/(e.max-e.min)*100,f=e.slot?`${e.slot} `:``;return(0,U.jsxs)(`div`,{className:a?`range is-disabled`:`range`,children:[(0,U.jsxs)(`div`,{className:`range-head`,children:[(0,U.jsx)(`label`,{htmlFor:u,className:`control-label`,children:o}),(0,U.jsx)(`output`,{htmlFor:u,className:i?`range-value is-custom`:`range-value`,children:s??(e.format?e.format(t):t)}),r&&(0,U.jsx)(`button`,{type:`button`,className:`range-reset`,onClick:r,disabled:!i,"aria-label":c??`Restore ${f}${e.label.toLowerCase()} to preset`,title:c??`Restore preset value`,children:(0,U.jsx)(l,{width:13,height:13})})]}),(0,U.jsx)(`input`,{id:u,type:`range`,name:e.key,min:e.min,max:e.max,step:e.step,value:t,disabled:a,"aria-label":e.slot?`${e.slot} ${e.label}`:void 0,"aria-describedby":e.hint?`${u}-hint`:void 0,style:{"--fill":`${d}%`},onChange:e=>n(Number(e.currentTarget.value))}),e.hint&&(0,U.jsx)(`p`,{id:`${u}-hint`,className:`range-hint`,children:e.hint})]})}function Ve({name:e,label:t,hint:n,checked:r,onChange:i}){let a=(0,O.useId)();return(0,U.jsxs)(`div`,{className:`switch-row`,children:[(0,U.jsxs)(`label`,{htmlFor:a,children:[(0,U.jsx)(`span`,{className:`control-label`,children:t}),n&&(0,U.jsx)(`span`,{className:`range-hint`,children:n})]}),(0,U.jsx)(`input`,{id:a,type:`checkbox`,role:`switch`,name:e,className:`switch`,checked:r,onChange:e=>i(e.currentTarget.checked)})]})}function Y({title:e,summary:t,children:n,defaultOpen:r=!1}){return(0,U.jsxs)(`details`,{className:`disclosure`,open:r,children:[(0,U.jsxs)(`summary`,{children:[(0,U.jsx)(`span`,{className:`disclosure-title`,children:e}),t&&(0,U.jsx)(`span`,{className:`disclosure-summary`,children:t}),(0,U.jsx)(`svg`,{className:`disclosure-chevron`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,"aria-hidden":`true`,children:(0,U.jsx)(`path`,{d:`m6 9 6 6 6-6`})})]}),(0,U.jsx)(`div`,{className:`disclosure-body`,children:n})]})}function He({name:e,label:t,hint:n,value:r,onChange:i}){let a=(0,O.useId)();return(0,U.jsxs)(`div`,{className:`switch-row`,children:[(0,U.jsxs)(`label`,{htmlFor:a,children:[(0,U.jsx)(`span`,{className:`control-label`,children:t}),n&&(0,U.jsx)(`span`,{className:`range-hint`,children:n})]}),(0,U.jsxs)(`span`,{className:`color-field`,children:[(0,U.jsx)(`code`,{children:r}),(0,U.jsx)(`input`,{id:a,type:`color`,name:e,value:r,onChange:e=>i(e.currentTarget.value)})]})]})}function Ue({state:e,library:t,error:n,edit:r,onFile:i}){return(0,U.jsxs)(`div`,{className:`inspector-scroll`,children:[(0,U.jsxs)(`section`,{className:`step`,"aria-labelledby":`step-artwork`,children:[(0,U.jsx)(X,{id:`step-artwork`,index:1,title:`Artwork`,detail:`Pick an example or bring your own SVG.`}),(0,U.jsx)(Ge,{state:e,library:t,error:n,edit:r,onFile:i})]}),(0,U.jsxs)(`section`,{className:`step`,"aria-labelledby":`step-finish`,children:[(0,U.jsx)(X,{id:`step-finish`,index:2,title:`Finish`,detail:`Choose the metals and the frame.`}),(0,U.jsx)(Je,{state:e,edit:r})]}),(0,U.jsxs)(`section`,{className:`step step-advanced`,"aria-labelledby":`step-refine`,children:[(0,U.jsx)(X,{id:`step-refine`,index:3,title:`Fine-tune`,detail:`Optional. Every change is live and undoable.`}),(0,U.jsx)(Ye,{state:e,edit:r}),(0,U.jsx)(Xe,{state:e,edit:r}),(0,U.jsx)(Ze,{state:e,edit:r}),(0,U.jsx)(Qe,{state:e,edit:r})]})]})}function X({id:e,index:t,title:n,detail:r}){return(0,U.jsxs)(`header`,{className:`step-head`,children:[(0,U.jsx)(`span`,{className:`step-index`,"aria-hidden":`true`,children:t}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h2`,{id:e,children:n}),(0,U.jsx)(`p`,{children:r})]})]})}var We=e=>`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`;function Ge({state:e,library:t,error:n,edit:r,onFile:i}){let a=(0,O.useRef)(null),o=(0,O.useId)(),s=(0,O.useMemo)(()=>e.custom&&!n?We(e.custom):null,[e.custom,n]),c=e=>r({artwork:e},`artwork`);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`fieldset`,{className:`artwork-grid`,children:[(0,U.jsx)(`legend`,{className:`sr-only`,children:`Artwork`}),k.map(n=>(0,U.jsxs)(`label`,{className:`artwork-tile`,title:n.title,children:[(0,U.jsx)(`input`,{type:`radio`,name:`artwork`,value:n.id,checked:e.artwork===n.id,onChange:()=>c(n.id),className:`choice-input`,disabled:!t[n.id]}),(0,U.jsx)(`img`,{src:n.url,alt:``,width:`40`,height:`40`,loading:`lazy`,decoding:`async`}),(0,U.jsx)(`span`,{className:`sr-only`,children:n.title})]},n.id)),e.custom?(0,U.jsxs)(`label`,{className:`artwork-tile artwork-custom`,title:e.customName||`Your SVG`,children:[(0,U.jsx)(`input`,{type:`radio`,name:`artwork`,value:`custom`,checked:e.artwork===`custom`,onChange:()=>c(`custom`),className:`choice-input`}),s?(0,U.jsx)(`img`,{src:s,alt:``,width:`40`,height:`40`}):(0,U.jsx)(`span`,{className:`artwork-custom-mark`,"aria-hidden":`true`,children:`SVG`}),(0,U.jsx)(`span`,{className:`sr-only`,children:`Your SVG`})]}):null]}),(0,U.jsxs)(`div`,{className:`artwork-actions`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`btn artwork-upload`,onClick:()=>a.current?.click(),children:[(0,U.jsx)(h,{}),` Upload SVG`]}),(0,U.jsx)(`span`,{className:`artwork-drop-hint`,children:`or drop it anywhere`}),(0,U.jsx)(`input`,{ref:a,id:`svg-file`,type:`file`,accept:`.svg,image/svg+xml`,className:`sr-only`,tabIndex:-1,"aria-label":`Upload SVG file`,onChange:e=>{i(e.currentTarget.files?.[0]),e.currentTarget.value=``}})]}),n&&(0,U.jsxs)(`p`,{className:`field-error`,role:`alert`,id:`artwork-error`,children:[n,e.artwork===`custom`?` Your last good preview is still shown.`:``]}),(0,U.jsxs)(`details`,{className:`paste`,children:[(0,U.jsxs)(`summary`,{children:[(0,U.jsx)(fe,{width:14,height:14}),` `,e.artwork===`custom`?`Edit SVG code`:`Paste SVG code`]}),(0,U.jsx)(`label`,{htmlFor:o,className:`sr-only`,children:`SVG source`}),(0,U.jsx)(`textarea`,{id:o,name:`custom`,value:e.custom,spellCheck:!1,placeholder:`<svg viewBox="0 0 24 24">…</svg>`,"aria-invalid":e.artwork===`custom`&&n?!0:void 0,"aria-describedby":n?`artwork-error`:void 0,onChange:e=>r({custom:e.currentTarget.value,artwork:`custom`,customName:`Pasted SVG`},`custom`)})]})]})}var Ke=e=>e===`none`?(0,U.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 100 100`,"aria-hidden":`true`,children:(0,U.jsx)(`circle`,{cx:`50`,cy:`50`,r:`40`,fill:`none`,stroke:`currentColor`,strokeWidth:`7`,strokeDasharray:`10 12`})}):(0,U.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 100 100`,"aria-hidden":`true`,children:(0,U.jsx)(`path`,{d:a[e],fill:`currentColor`})}),Z=e=>e.map(e=>({value:e,label:D(e),swatch:ue(e)})),qe=(0,U.jsx)(`span`,{className:`control-note`,children:` · customized`});function Je({state:e,edit:t}){let n=String(Ee(e,`baseColor`));return(0,U.jsxs)(`div`,{className:`stack`,children:[(0,U.jsx)(K,{name:`metal`,label:`Metal`,value:e.metal,choices:Z(y(v,e.metal)),onChange:e=>t(z(`metal`,e),`metal`),note:De(e,`metal`)?qe:null}),(0,U.jsx)(K,{name:`enamel`,label:`Enamel`,value:e.enamel,choices:Z(y(E,e.enamel)),onChange:e=>t(z(`enamel`,e),`enamel`),note:De(e,`enamel`)?qe:null}),(0,U.jsxs)(`div`,{className:`base-row`,children:[(0,U.jsx)(K,{name:`base`,label:`Backplate`,value:e.base,choices:Z(y(ce,e.base)),onChange:e=>t(z(`base`,e),`base`)}),(0,U.jsxs)(`label`,{className:`color-well`,title:`Custom backplate colour`,children:[(0,U.jsx)(`span`,{className:`sr-only`,children:`Backplate colour`}),(0,U.jsx)(`input`,{type:`color`,name:`baseColor`,value:n,onChange:e=>t({baseColor:e.currentTarget.value},`baseColor`)})]})]}),(0,U.jsx)(q,{name:`frame`,label:`Frame`,value:e.frame,choices:w.map(e=>({value:e,label:e===`none`?`No frame`:D(e),icon:Ke(e)})),onChange:e=>t({frame:e},`frame`)}),e.frame!==`none`&&(0,U.jsxs)(`div`,{className:`frame-options`,children:[(0,U.jsx)($,{field:I.framePadding,state:e,edit:t}),(0,U.jsx)($,{field:I.innerRing,state:e,edit:t})]}),(0,U.jsx)(q,{name:`mode`,label:`Style`,value:e.mode,choices:[{value:`auto`,label:`Auto`},{value:`cloisonne`,label:`Enamel & wire`},{value:`embossed`,label:`Solid metal`}],onChange:e=>t({mode:e},`mode`)})]})}function Q({field:e,state:t,edit:n}){return(0,U.jsx)(J,{field:e,value:Number(Ee(t,e.key)),overridden:t[e.key]!==null,onChange:t=>n({[e.key]:t},e.key),onReset:()=>n({[e.key]:null},`${e.key}-reset`)})}function $({field:e,state:t,edit:n,disabled:r}){return(0,U.jsx)(J,{field:e,value:Number(t[e.key]),disabled:r,onChange:t=>n({[e.key]:t},e.key)})}function Ye({state:e,edit:t}){let n=[...M.metal,...M.enamel].filter(t=>e[t]!==null).length;return(0,U.jsxs)(Y,{title:`Materials`,summary:n?`${n} customized`:`${D(e.metal)} · ${D(e.enamel)}`,children:[(0,U.jsx)(He,{name:`color`,label:`Icon colour`,hint:`Fills parts of the SVG that use currentColor`,value:e.color,onChange:e=>t({color:e},`color`)}),(0,U.jsxs)(`h3`,{className:`group-title`,children:[D(e.metal),` metal`]}),(0,U.jsx)(Q,{field:I.metalRoughness,state:e,edit:t}),(0,U.jsx)(Q,{field:I.metalBrushed,state:e,edit:t}),(0,U.jsx)(Q,{field:I.metalIridescence,state:e,edit:t}),(0,U.jsxs)(`h3`,{className:`group-title`,children:[D(e.enamel),` enamel`]}),(0,U.jsx)(Q,{field:I.enamelRoughness,state:e,edit:t}),(0,U.jsx)(Q,{field:I.enamelClearcoat,state:e,edit:t}),(0,U.jsx)(Q,{field:I.enamelMetalness,state:e,edit:t}),(0,U.jsx)(Q,{field:I.enamelFlakes,state:e,edit:t}),(0,U.jsx)(K,{name:`accent`,label:`Accent parts`,value:e.accent,choices:Z(y(le,e.accent)),onChange:e=>t({accent:e},`accent`)}),(0,U.jsxs)(`p`,{className:`range-hint`,children:[`Accent applies to SVG parts marked `,(0,U.jsx)(`code`,{children:`data-material="accent"`}),`.`]})]})}function Xe({state:e,edit:t}){return(0,U.jsxs)(Y,{title:`Shape & depth`,summary:`${D(e.profile)} wire`,children:[(0,U.jsx)(`h3`,{className:`group-title`,children:`Metal`}),(0,U.jsx)($,{field:I.depth,state:e,edit:t}),(0,U.jsx)($,{field:I.rim,state:e,edit:t}),(0,U.jsx)(J,{field:I.outline,value:e.outline??.012,valueLabel:e.outline===null?`Auto`:void 0,overridden:e.outline!==null,onChange:e=>t({outline:e},`outline`),onReset:()=>t({outline:null},`outline-reset`),resetLabel:`Set wire width to automatic`}),(0,U.jsx)($,{field:I.bevel,state:e,edit:t}),(0,U.jsx)(q,{name:`profile`,label:`Wire profile`,value:e.profile,choices:[{value:`round`,label:`Round`},{value:`soft`,label:`Soft`},{value:`chamfer`,label:`Chamfer`}],onChange:e=>t({profile:e},`profile`)}),(0,U.jsx)(`h3`,{className:`group-title`,children:`Enamel`}),(0,U.jsx)($,{field:I.floor,state:e,edit:t}),(0,U.jsx)($,{field:I.enamelLevel,state:e,edit:t}),(0,U.jsx)($,{field:I.enamelDome,state:e,edit:t}),(0,U.jsx)($,{field:I.domeWidth,state:e,edit:t}),(0,U.jsx)(`h3`,{className:`group-title`,children:`Body`}),(0,U.jsx)($,{field:I.thickness,state:e,edit:t}),(0,U.jsx)($,{field:I.edge,state:e,edit:t}),(0,U.jsx)($,{field:I.smoothing,state:e,edit:t}),(0,U.jsx)($,{field:I.ao,state:e,edit:t}),(0,U.jsx)(Ve,{name:`fillHoles`,label:`Fill holes`,hint:`Put a backplate behind gaps enclosed by the artwork`,checked:e.fillHoles,onChange:e=>t({fillHoles:e},`fillHoles`)})]})}function Ze({state:e,edit:t}){return(0,U.jsxs)(Y,{title:`Lighting`,summary:D(e.environment),children:[(0,U.jsx)(K,{name:`environment`,label:`Environment`,value:e.environment,choices:oe.map(e=>({value:e,label:D(e),swatch:_[e]})),onChange:e=>t({environment:e},`environment`)}),(0,U.jsx)($,{field:I.environmentRotation,state:e,edit:t}),(0,U.jsx)($,{field:I.exposure,state:e,edit:t}),(0,U.jsx)($,{field:I.shadow,state:e,edit:t}),(0,U.jsx)(q,{name:`toneMapping`,label:`Colour response`,value:e.toneMapping,choices:[{value:`neutral`,label:`Neutral`},{value:`agx`,label:`Filmic`},{value:`aces`,label:`Punchy`},{value:`none`,label:`Raw`}],onChange:e=>t({toneMapping:e},`toneMapping`)})]})}function Qe({state:e,edit:t}){let n=e.locked?`Locked`:e.interaction===`drag`?`Drag to rotate`:e.interaction===`tilt`?`Tilt on hover`:`Static`;return(0,U.jsxs)(Y,{title:`Motion & state`,summary:n,children:[(0,U.jsx)(q,{name:`interaction`,label:`When touched`,value:e.interaction,choices:[{value:`drag`,label:`Drag to rotate`},{value:`tilt`,label:`Tilt on hover`},{value:`none`,label:`Static`}],onChange:e=>t({interaction:e},`interaction`)}),(0,U.jsx)(q,{name:`idle`,label:`At rest`,value:e.idle,choices:[{value:`none`,label:`Still`},{value:`float`,label:`Float`},{value:`shine`,label:`Shine`}],onChange:e=>t({idle:e},`idle`)}),(0,U.jsx)($,{field:I.tiltMax,state:e,edit:t,disabled:e.interaction!==`tilt`}),(0,U.jsx)(`h3`,{className:`group-title`,children:`Resting angle`}),(0,U.jsx)($,{field:I.poseYaw,state:e,edit:t}),(0,U.jsx)($,{field:I.posePitch,state:e,edit:t}),(0,U.jsx)($,{field:I.poseRoll,state:e,edit:t}),(0,U.jsx)(Ve,{name:`locked`,label:`Locked`,hint:`Show as not yet earned`,checked:e.locked,onChange:e=>t({locked:e},`locked`)}),e.locked&&(0,U.jsx)(He,{name:`lockedColor`,label:`Locked colour`,value:e.lockedColor,onChange:e=>t({lockedColor:e},`lockedColor`)})]})}var $e=[`artwork`,`mode`,`frame`,`profile`,`fillHoles`],et=[`custom`,`color`,`innerRing`,`framePadding`,`rim`,`outline`,`depth`,`floor`,`enamelDome`,`bevel`,`edge`,`enamelLevel`,`domeWidth`,`smoothing`],tt=320;function nt(e,t){let n=ee(e,160),r=m(e,50);return(0,O.useMemo)(()=>{let i=$e.some(t=>e[t]!==n[t]),a=!i&&et.some(t=>e[t]!==n[t]),o=i?e:a?r:n,s=V(e),c=V(o);return{...s,svg:W(o,t),mode:c.mode,color:c.color,frame:c.frame,rim:c.rim,outline:c.outline,fillHoles:c.fillHoles,relief:{...c.relief,thickness:s.relief?.thickness,ao:s.relief?.ao},quality:a?tt:`auto`}},[e,n,r,t])}function rt({state:e,library:t,dropActive:n,onRenderError:i}){let a=(0,O.useRef)(null),[o,s]=(0,O.useState)(!1),c=nt(e,t),l=e.artwork===`custom`?e.customName||`Your SVG`:k.find(t=>t.id===e.artwork)?.title,u=e.locked?`Locked badges stay still`:e.interaction===`drag`?`Drag to rotate`:e.interaction===`tilt`?`Hover to tilt`:`Static badge`,f=e.locked;return(0,U.jsxs)(`section`,{className:o?`stage is-light`:`stage`,"aria-label":`Preview`,children:[(0,U.jsxs)(`div`,{className:`stage-top`,children:[(0,U.jsx)(`span`,{className:`stage-name`,children:l}),(0,U.jsxs)(`button`,{type:`button`,className:`btn btn-ghost stage-theme`,"aria-pressed":o,onClick:()=>s(!o),children:[o?(0,U.jsx)(ie,{}):(0,U.jsx)(d,{}),(0,U.jsxs)(`span`,{children:[o?`Dark`:`Light`,` backdrop`]})]})]}),(0,U.jsx)(`div`,{className:`stage-badge`,children:(0,U.jsx)(`div`,{className:`stage-badge-frame`,children:(0,U.jsx)(r,{ref:a,id:`hero`,size:`100%`,alt:`${l} badge preview`,...c,onReady:x,onError:e=>i(`Could not render this artwork: ${e.message}`)})})}),(0,U.jsxs)(`div`,{className:`stage-dock`,children:[(0,U.jsx)(`span`,{className:`stage-hint`,children:u}),(0,U.jsxs)(`div`,{className:`stage-actions`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:()=>a.current?.spin(),disabled:f,children:[(0,U.jsx)(g,{}),` Spin`]}),(0,U.jsxs)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:()=>a.current?.glint(),disabled:f,children:[(0,U.jsx)(de,{}),` Glint`]})]})]}),n&&(0,U.jsx)(`div`,{className:`drop-overlay`,"aria-hidden":`true`,children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`strong`,{children:`Drop your SVG`}),(0,U.jsx)(`span`,{children:`It stays on this device`})]})})]})}function it(){let e=new URLSearchParams(location.search).get(`sample`);if(be(e)){let t=f.find(t=>t.id===e)?.title;return{state:R(e),message:`Loaded the “${t}” recipe.`,storageOk:!0,fromLink:!0}}try{let e=Te(localStorage);return{state:e??R(),message:e?`Welcome back. Your last draft is restored.`:null,storageOk:!0,fromLink:!1}}catch{return{state:R(),message:null,storageOk:!1,fromLink:!1}}}var at=[128,256,512,1024,2048],ot=c?`⌘`:`Ctrl+`;function st({library:e}){let[t]=(0,O.useState)(it),n=(0,O.useMemo)(()=>Be(e),[e]),[r,i]=(0,O.useReducer)(n,t.state,t=>Re(t,e)),{present:a,committed:o,error:s}=r,[l,d]=(0,O.useState)(t.storageOk),[f,p]=(0,O.useState)(t.message?{id:0,text:t.message}:null),[ee,m]=(0,O.useState)(!1),[h,te]=(0,O.useState)(1024),[g,_]=(0,O.useState)(!1),[ie,v]=(0,O.useState)(!1),y=(0,O.useRef)(0),b=(0,O.useCallback)((e,t=!1)=>p(n=>({id:(n?.id??0)+1,text:e,undo:t})),[]),oe=(0,O.useCallback)((e,t)=>i({type:`edit`,patch:e,key:t,at:performance.now()}),[]),x=W(o,e),S=a!==o,C=(0,O.useCallback)(async e=>{if(!e)return;let t=++y.current;if(!/\.svg$/i.test(e.name)&&e.type!==`image/svg+xml`){i({type:`reject`,error:`Choose an .svg file. Export your artwork as SVG from your design tool first.`});return}if(e.size>1048576){i({type:`reject`,error:`Choose an SVG smaller than 1 MB.`});return}try{let n=await e.text();if(t!==y.current)return;i({type:`edit`,patch:{artwork:`custom`,custom:n,customName:e.name},key:`import`,at:performance.now()})}catch{t===y.current&&i({type:`reject`,error:`Could not read this file. Try importing it again.`})}},[]);(0,O.useEffect)(()=>{let e=0,t=e=>!!e.dataTransfer?.types.includes(`Files`),n=n=>{t(n)&&(e++,v(!0))},r=e=>{t(e)&&e.preventDefault()},i=n=>{t(n)&&(e=Math.max(0,e-1),e===0&&v(!1))},a=n=>{t(n)&&(n.preventDefault(),e=0,v(!1),C(n.dataTransfer?.files[0]))};return window.addEventListener(`dragenter`,n),window.addEventListener(`dragover`,r),window.addEventListener(`dragleave`,i),window.addEventListener(`drop`,a),()=>{window.removeEventListener(`dragenter`,n),window.removeEventListener(`dragover`,r),window.removeEventListener(`dragleave`,i),window.removeEventListener(`drop`,a)}},[C]),(0,O.useEffect)(()=>{let e=e=>{if(!(e.metaKey||e.ctrlKey)||e.altKey||e.target?.matches(`textarea, input[type=text], input:not([type])`))return;let t=e.key.toLowerCase();(t===`z`||t===`y`)&&(e.preventDefault(),i({type:t===`y`||e.shiftKey?`redo`:`undo`}))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,O.useEffect)(()=>{t.fromLink&&window.history.replaceState(null,``,location.pathname)},[t.fromLink]),(0,O.useEffect)(()=>{let e=setTimeout(()=>{try{localStorage.setItem(ve,JSON.stringify(o))}catch{d(!1)}},250);return()=>clearTimeout(e)},[o]),(0,O.useEffect)(()=>{if(!f)return;let e=setTimeout(()=>p(null),f.undo?6e3:3200);return()=>clearTimeout(e)},[f]);let se=async()=>{_(!0),b(`Rendering a ${h} × ${h} PNG…`);try{await Ie({...V(o),svg:x},h),b(`Downloaded a ${h} × ${h} PNG with a transparent background.`)}catch(e){b(`Export failed. ${e instanceof Error?e.message:String(e)}`)}finally{_(!1)}},ce=()=>{i({type:`replace`,state:R()}),b(`Reset to the starting badge.`,!0)},w=l?S?`Fix the artwork to save`:`Saved on this device`:`Not saved: browser storage is blocked`,E=S||!!s;return(0,U.jsxs)(`div`,{className:`studio`,children:[(0,U.jsxs)(`header`,{className:`topbar`,children:[(0,U.jsxs)(`a`,{className:`brand`,href:`./index.html`,"aria-label":`badgecraft home`,children:[(0,U.jsx)(pe,{}),(0,U.jsx)(`span`,{className:`brand-name`,children:`badgecraft`}),(0,U.jsx)(`span`,{className:`brand-tag`,children:`Studio`})]}),(0,U.jsxs)(`div`,{className:`topbar-history`,children:[(0,U.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon`,onClick:()=>i({type:`undo`}),disabled:!r.past.length,"aria-label":`Undo`,title:`Undo (${ot}Z)`,children:(0,U.jsx)(u,{})}),(0,U.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon`,onClick:()=>i({type:`redo`}),disabled:!r.future.length,"aria-label":`Redo`,title:`Redo (${c?`⇧⌘Z`:`Ctrl+Y`})`,children:(0,U.jsx)(ne,{})}),(0,U.jsx)(`button`,{type:`button`,className:`btn btn-ghost topbar-reset`,onClick:ce,children:`Reset`}),(0,U.jsxs)(`span`,{className:l&&!S?`save-state`:`save-state is-warning`,role:`status`,children:[l&&!S&&(0,U.jsx)(T,{width:13,height:13}),(0,U.jsx)(`span`,{children:w})]})]}),(0,U.jsxs)(`div`,{className:`topbar-actions`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`btn`,onClick:()=>m(!0),disabled:E,children:[(0,U.jsx)(ae,{}),` `,(0,U.jsx)(`span`,{children:`Get code`})]}),(0,U.jsxs)(`div`,{className:`split`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`btn btn-primary`,id:`png`,onClick:se,disabled:E||g,children:[(0,U.jsx)(re,{}),` `,(0,U.jsx)(`span`,{children:g?`Rendering…`:`Download PNG`})]}),(0,U.jsxs)(`label`,{className:`split-select`,children:[(0,U.jsx)(`span`,{className:`sr-only`,children:`PNG size`}),(0,U.jsx)(`select`,{id:`export-size`,value:h,onChange:e=>te(Number(e.currentTarget.value)),children:at.map(e=>(0,U.jsxs)(`option`,{value:e,children:[e,`px`]},e))})]})]})]})]}),(0,U.jsxs)(`main`,{className:`workspace`,children:[(0,U.jsx)(rt,{state:o,library:e,dropActive:ie,onRenderError:e=>i({type:`reject`,error:e})}),(0,U.jsxs)(`aside`,{className:`inspector`,"aria-label":`Badge settings`,children:[(0,U.jsx)(Ue,{state:a,library:e,error:s,edit:oe,onFile:C}),(0,U.jsx)(`p`,{className:`privacy-note`,children:`Your artwork never leaves this browser.`})]})]}),(0,U.jsx)(`div`,{className:`toast-region`,role:`status`,"aria-live":`polite`,id:`action-status`,children:f&&(0,U.jsxs)(`div`,{className:`toast`,children:[(0,U.jsx)(`span`,{children:f.text}),f.undo&&(0,U.jsx)(`button`,{type:`button`,className:`toast-action`,onClick:()=>{i({type:`undo`}),p(null)},children:`Undo`})]},f.id)}),(0,U.jsx)(Fe,{open:ee,state:o,source:x,onClose:()=>m(!1),notify:b})]})}var ct=_e(),lt=(0,me.createRoot)(document.getElementById(`root`));ct.then(e=>lt.render((0,U.jsx)(O.StrictMode,{children:(0,U.jsx)(st,{library:e})})));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;color:#f5f5f7;background:#000;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,Segoe UI,Roboto,sans-serif}body{margin:0}main{max-width:980px;margin:0 auto;padding:32px 24px 80px}h1{letter-spacing:-.02em;margin:24px 0 12px;font-size:44px;line-height:1.05}header p{color:#8e8e93;margin:0 0 8px;font-size:17px}nav{color:#8e8e93;margin-bottom:28px;font-size:14px}nav a{color:#b6f24a;text-decoration:none}.grid{grid-template-columns:repeat(auto-fill, minmax(var(--size,200px), 1fr));gap:28px 20px;display:grid}.card{text-align:center;flex-direction:column;align-items:center;display:flex}.card .badge{width:var(--size,200px);height:var(--size,200px)}.card .title{margin-top:6px;font-size:15px}.card .sub{color:#8e8e93;font-size:14px}.light{color:#111;background:#f2f2f7}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./badge-9Zq6e9Ht.js";import{r as t,t as n}from"./option-keys-CKi71y0n.js";/* empty css */function r(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var i={},a=[],o=()=>{},s=()=>!1,c=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),l=e=>e.startsWith(`onUpdate:`),u=Object.assign,d=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},f=Object.prototype.hasOwnProperty,p=(e,t)=>f.call(e,t),m=Array.isArray,h=e=>w(e)===`[object Map]`,g=e=>w(e)===`[object Set]`,_=e=>w(e)===`[object Date]`,v=e=>typeof e==`function`,y=e=>typeof e==`string`,b=e=>typeof e==`symbol`,x=e=>typeof e==`object`&&!!e,S=e=>(x(e)||v(e))&&v(e.then)&&v(e.catch),C=Object.prototype.toString,w=e=>C.call(e),ee=e=>w(e).slice(8,-1),te=e=>w(e)===`[object Object]`,ne=e=>y(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,re=r(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),ie=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ae=/-\w/g,T=ie(e=>e.replace(ae,e=>e.slice(1).toUpperCase())),oe=/\B([A-Z])/g,E=ie(e=>e.replace(oe,`-$1`).toLowerCase()),se=ie(e=>e.charAt(0).toUpperCase()+e.slice(1)),D=ie(e=>e?`on${se(e)}`:``),O=(e,t)=>!Object.is(e,t),ce=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},le=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ue=e=>{let t=parseFloat(e);return isNaN(t)?e:t},de,fe=()=>de||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function pe(e){if(m(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=y(r)?ge(r):pe(r);if(i)for(let e in i)t[e]=i[e]}return t}if(y(e)||x(e))return e}var me=/;(?![^(]*\))/g,k=/:([^]+)/,he=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function ge(e){let t={};return e.replace(he,e=>e.startsWith(`/*`)?``:e).split(me).forEach(e=>{if(e){let n=e.split(k);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function _e(e){let t=``;if(y(e))t=e;else if(m(e))for(let n=0;n<e.length;n++){let r=_e(e[n]);r&&(t+=r+` `)}else if(x(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var ve=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,ye=r(ve);ve+``;function be(e){return!!e||e===``}function xe(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=Te(e[i],t[i],n);return r}function Se(e,t,n){if(e.size!==t.size)return!1;let r=Array.from(t),i=new Uint8Array(r.length);for(let t of e){let e=-1;for(let a=0;a<r.length;a++)if(!i[a]&&Te(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function Ce(e,t,n){let r=h(e),i=h(t);if(r||i||(r=g(e),i=g(t),r||i))return r&&i?Se(e,t,n):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){let i=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(i&&!a||!i&&a||!Te(e[r],t[r],n))return!1}return String(e)===String(t)}function we(e,t,n,r){n||=[new Map,new Map];let[i,a]=n;if(i.has(e)||a.has(t))return i.get(e)===t&&a.get(t)===e;i.set(e,t),a.set(t,e);let o=r(e,t,n);return i.delete(e),a.delete(t),o}function Te(e,t,n){if(e===t)return!0;let r=_(e),i=_(t);return r||i?r&&i?e.getTime()===t.getTime():!1:(r=b(e),i=b(t),r||i?e===t:(r=m(e),i=m(t),r||i?r&&i?we(e,t,n,xe):!1:(r=x(e),i=x(t),r||i?!r||!i?!1:we(e,t,n,Ce):String(e)===String(t))))}function Ee(e,t){return e.findIndex(e=>Te(e,t))}var De=e=>!!(e&&e.__v_isRef===!0),Oe=e=>y(e)?e:e==null?``:m(e)||x(e)&&(e.toString===C||!v(e.toString))?De(e)?Oe(e.value):JSON.stringify(e,ke,2):String(e),ke=(e,t)=>De(t)?ke(e,t.value):h(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Ae(t,r)+` =>`]=n,e),{})}:g(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Ae(e))}:b(t)?Ae(t):x(t)&&!m(t)&&!te(t)?String(t):t,Ae=(e,t=``)=>b(e)?`Symbol(${e.description??t})`:e,A,je=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&A&&(A.active?(this.parent=A,this.index=(A.scopes||(A.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){let t=A;try{return A=this,e()}finally{A=t}}}on(){++this._on===1&&(this.prevScope=A,A=this)}off(){if(this._on>0&&--this._on===0){if(A===this)A=this.prevScope;else{let e=A;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Me(){return A}var j,Ne=new WeakSet,Pe=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,A&&(A.active?A.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ne.has(this)&&(Ne.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Re(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ye(this),Ve(this);let e=j,t=M;j=this,M=!0;try{return this.fn()}finally{He(this),j=e,M=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ge(e);this.deps=this.depsTail=void 0,Ye(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ne.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ue(this)&&this.run()}get dirty(){return Ue(this)}},Fe=0,Ie,Le;function Re(e,t=!1){if(e.flags|=8,t){e.next=Le,Le=e;return}e.next=Ie,Ie=e}function ze(){Fe++}function Be(){if(--Fe>0)return;if(Le){let e=Le;for(Le=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Ie;){let t=Ie;for(Ie=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Ve(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function He(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Ge(r),Ke(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ue(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(We(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function We(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Xe)||(e.globalVersion=Xe,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ue(e))))return;e.flags|=2;let t=e.dep,n=j,r=M;j=e,M=!0;try{Ve(e);let n=e.fn(e._value);(t.version===0||O(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{j=n,M=r,He(e),e.flags&=-3}}function Ge(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ge(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ke(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var M=!0,qe=[];function N(){qe.push(M),M=!1}function Je(){let e=qe.pop();M=e===void 0||e}function Ye(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=j;j=void 0;try{t()}finally{j=e}}}var Xe=0,Ze=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Qe=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!j||!M||j===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==j)t=this.activeLink=new Ze(j,this),j.deps?(t.prevDep=j.depsTail,j.depsTail.nextDep=t,j.depsTail=t):j.deps=j.depsTail=t,$e(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=j.depsTail,t.nextDep=void 0,j.depsTail.nextDep=t,j.depsTail=t,j.deps===t&&(j.deps=e)}return t}trigger(e){this.version++,Xe++,this.notify(e)}notify(e){ze();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Be()}}};function $e(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)$e(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var et=new WeakMap,tt=Symbol(``),nt=Symbol(``),rt=Symbol(``);function P(e,t,n){if(M&&j){let t=et.get(e);t||et.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Qe),r.map=t,r.key=n),r.track()}}function it(e,t,n,r,i,a){let o=et.get(e);if(!o){Xe++;return}let s=e=>{e&&e.trigger()};if(ze(),t===`clear`)o.forEach(s);else{let i=m(e),a=i&&ne(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===rt||!b(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(rt)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(tt)),h(e)&&s(o.get(nt)));break;case`delete`:i||(s(o.get(tt)),h(e)&&s(o.get(nt)));break;case`set`:h(e)&&s(o.get(tt))}}Be()}function at(e){let t=R(e);return t===e||(P(t,`iterate`,rt),L(e))?t:I(e)?Vt(e)?t.map(e=>Wt(z(e))):t.map(Wt):t.map(z)}function ot(e){return P(e=R(e),`iterate`,rt),e}function F(e,t){return I(e)?Wt(Vt(e)?z(t):t):z(t)}var st={__proto__:null,[Symbol.iterator](){return ct(this,Symbol.iterator,e=>F(this,e))},concat(...e){return at(this).concat(...e.map(e=>m(e)?at(e):e))},entries(){return ct(this,`entries`,e=>(e[1]=F(this,e[1]),e))},every(e,t){return ut(this,`every`,e,t,void 0,arguments)},filter(e,t){return ut(this,`filter`,e,t,e=>e.map(e=>F(this,e)),arguments)},find(e,t){return ut(this,`find`,e,t,e=>F(this,e),arguments)},findIndex(e,t){return ut(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return ut(this,`findLast`,e,t,e=>F(this,e),arguments)},findLastIndex(e,t){return ut(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return ut(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ft(this,`includes`,e)},indexOf(...e){return ft(this,`indexOf`,e)},join(e){return at(this).join(e)},lastIndexOf(...e){return ft(this,`lastIndexOf`,e)},map(e,t){return ut(this,`map`,e,t,void 0,arguments)},pop(){return pt(this,`pop`)},push(...e){return pt(this,`push`,e)},reduce(e,...t){return dt(this,`reduce`,e,t)},reduceRight(e,...t){return dt(this,`reduceRight`,e,t)},shift(){return pt(this,`shift`)},some(e,t){return ut(this,`some`,e,t,void 0,arguments)},splice(...e){return pt(this,`splice`,e)},toReversed(){return at(this).toReversed()},toSorted(e){return at(this).toSorted(e)},toSpliced(...e){return at(this).toSpliced(...e)},unshift(...e){return pt(this,`unshift`,e)},values(){return ct(this,`values`,e=>F(this,e))}};function ct(e,t,n){let r=ot(e),i=r[t]();return r!==e&&!L(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var lt=Array.prototype;function ut(e,t,n,r,i,a){let o=ot(e),s=o!==e&&!L(e),c=o[t];if(c!==lt[t]){let t=c.apply(e,a);return s?z(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,F(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function dt(e,t,n,r){let i=ot(e),a=i!==e&&!L(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=F(e,t)),n.call(this,t,F(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?F(e,c):c}function ft(e,t,n){let r=R(e);P(r,`iterate`,rt);let i=r[t](...n);return(i===-1||i===!1)&&Ht(n[0])?(n[0]=R(n[0]),r[t](...n)):i}function pt(e,t,n=[]){N(),ze();let r=R(e)[t].apply(e,n);return Be(),Je(),r}var mt=r(`__proto__,__v_isRef,__isVue`),ht=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(b));function gt(e){b(e)||(e=String(e));let t=R(this);return P(t,`has`,e),t.hasOwnProperty(e)}var _t=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Ft:Pt:i?Nt:Mt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=m(e);if(!r){let e;if(a&&(e=st[t]))return e;if(t===`hasOwnProperty`)return gt}let o=Reflect.get(e,t,B(e)?e:n);if((b(t)?ht.has(t):mt(t))||(r||P(e,`get`,t),i))return o;if(B(o)){let e=a&&ne(t)?o:o.value;return r&&x(e)?zt(e):e}return x(o)?r?zt(o):Lt(o):o}},vt=class extends _t{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=m(e)&&ne(t);if(!this._isShallow){let e=I(i);if(!L(n)&&!I(n)&&(i=R(i),n=R(n)),!a&&B(i)&&!B(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:p(e,t),s=Reflect.set(e,t,n,B(e)?e:r);return e===R(r)&&s&&(o?O(n,i)&&it(e,`set`,t,n,i):it(e,`add`,t,n)),s}deleteProperty(e,t){let n=p(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&it(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!b(t)||!ht.has(t))&&P(e,`has`,t),n}ownKeys(e){return P(e,`iterate`,m(e)?`length`:tt),Reflect.ownKeys(e)}},yt=class extends _t{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},bt=new vt,xt=new yt,St=new vt(!0),Ct=e=>e,wt=e=>Reflect.getPrototypeOf(e);function Tt(e,t,n){return function(...r){let i=this.__v_raw,a=R(i),o=h(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),d=n?Ct:t?Wt:z;return!t&&P(a,`iterate`,c?nt:tt),u(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function Et(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Dt(e,t){let n={get(n){let r=this.__v_raw,i=R(r),a=R(n);e||(O(n,a)&&P(i,`get`,n),P(i,`get`,a));let{has:o}=wt(i),s=t?Ct:e?Wt:z;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&P(R(t),`iterate`,tt),t.size},has(t){let n=this.__v_raw,r=R(n),i=R(t);return e||(O(t,i)&&P(r,`has`,t),P(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=R(a),s=t?Ct:e?Wt:z;return!e&&P(o,`iterate`,tt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return u(n,e?{add:Et(`add`),set:Et(`set`),delete:Et(`delete`),clear:Et(`clear`)}:{add(e){let n=R(this),r=wt(n),i=R(e),a=!t&&!L(e)&&!I(e)?i:e;return r.has.call(n,a)||O(e,a)&&r.has.call(n,e)||O(i,a)&&r.has.call(n,i)||(n.add(a),it(n,`add`,a,a)),this},set(e,n){!t&&!L(n)&&!I(n)&&(n=R(n));let r=R(this),{has:i,get:a}=wt(r),o=i.call(r,e);o||=(e=R(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?O(n,s)&&it(r,`set`,e,n,s):it(r,`add`,e,n),this},delete(e){let t=R(this),{has:n,get:r}=wt(t),i=n.call(t,e);i||=(e=R(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&it(t,`delete`,e,void 0,a),o},clear(){let e=R(this),t=e.size!==0,n=e.clear();return t&&it(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Tt(r,e,t)}),n}function Ot(e,t){let n=Dt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(p(n,r)&&r in t?n:t,r,i)}var kt={get:Ot(!1,!1)},At={get:Ot(!1,!0)},jt={get:Ot(!0,!1)},Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap;function It(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Lt(e){return I(e)?e:Bt(e,!1,bt,kt,Mt)}function Rt(e){return Bt(e,!1,St,At,Nt)}function zt(e){return Bt(e,!0,xt,jt,Pt)}function Bt(e,t,n,r,i){if(!x(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=It(ee(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Vt(e){return I(e)?Vt(e.__v_raw):!!(e&&e.__v_isReactive)}function I(e){return!!(e&&e.__v_isReadonly)}function L(e){return!!(e&&e.__v_isShallow)}function Ht(e){return e?!!e.__v_raw:!1}function R(e){let t=e&&e.__v_raw;return t?R(t):e}function Ut(e){return!p(e,`__v_skip`)&&Object.isExtensible(e)&&le(e,`__v_skip`,!0),e}var z=e=>x(e)?Lt(e):e,Wt=e=>x(e)?zt(e):e;function B(e){return e?e.__v_isRef===!0:!1}function Gt(e){return Kt(e,!1)}function Kt(e,t){return B(e)?e:new qt(e,t)}var qt=class{constructor(e,t){this.dep=new Qe,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:R(e),this._value=t?e:z(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||L(e)||I(e);e=n?e:R(e),O(e,t)&&(this._rawValue=e,this._value=n?e:z(e),this.dep.trigger())}};function Jt(e){return B(e)?e.value:e}var Yt={get:(e,t,n)=>t===`__v_raw`?e:Jt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return B(i)&&!B(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Xt(e){return Vt(e)?e:new Proxy(e,Yt)}var Zt=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Qe(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Xe-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&j!==this)return Re(this,!0),!0}get value(){let e=this.dep.track();return We(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Qt(e,t,n=!1){let r,i;return v(e)?r=e:(r=e.get,i=e.set),new Zt(r,i,n)}var $t={},en=new WeakMap,tn=void 0;function nn(e,t=!1,n=tn){if(n){let t=en.get(n);t||en.set(n,t=[]),t.push(e)}}function rn(e,t,n=i){let{immediate:r,deep:a,once:s,scheduler:c,augmentJob:l,call:u}=n,f=e=>a?e:L(e)||a===!1||a===0?V(e,1):V(e),p,h,g,_,y=!1,b=!1;if(B(e)?(h=()=>e.value,y=L(e)):Vt(e)?(h=()=>f(e),y=!0):m(e)?(b=!0,y=e.some(e=>Vt(e)||L(e)),h=()=>e.map(e=>{if(B(e))return e.value;if(Vt(e))return f(e);if(v(e))return u?u(e,2):e()})):h=v(e)?t?u?()=>u(e,2):e:()=>{if(g){N();try{g()}finally{Je()}}let t=tn;tn=p;try{return u?u(e,3,[_]):e(_)}finally{tn=t}}:o,t&&a){let e=h,t=a===!0?1/0:a;h=()=>V(e(),t)}let x=Me(),S=()=>{p.stop(),x&&x.active&&d(x.effects,p)};if(s&&t){let e=t;t=(...t)=>{let n=e(...t);return S(),n}}let C=b?Array(e.length).fill($t):$t,w=e=>{if(p.flags&1&&(p.dirty||e)){if(t){let n=p.run();if(e||a||y||(b?n.some((e,t)=>O(e,C[t])):O(n,C))){g&&g();let e=tn;tn=p;try{let e=[n,C===$t?void 0:b&&C[0]===$t?[]:C,_];C=n,u?u(t,3,e):t(...e)}finally{tn=e}}}else p.run()}};return l&&l(w),p=new Pe(h),p.scheduler=c?()=>c(w,!1):w,_=e=>nn(e,!1,p),g=p.onStop=()=>{let e=en.get(p);if(e){if(u)u(e,4);else for(let t of e)t();en.delete(p)}},t?r?w(!0):C=p.run():c?c(w.bind(null,!0),!0):p.run(),S.pause=p.pause.bind(p),S.resume=p.resume.bind(p),S.stop=S,S}function V(e,t=1/0,n){if(t<=0||!x(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,B(e))V(e.value,t,n);else if(m(e))for(let r=0;r<e.length;r++)V(e[r],t,n);else if(g(e)||h(e))e.forEach(e=>{V(e,t,n)});else if(te(e)){for(let r in e)V(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&V(e[r],t,n)}return e}function an(e,t,n,r){try{return r?e(...r):e()}catch(e){on(e,t,n)}}function H(e,t,n,r){if(v(e)){let i=an(e,t,n,r);return i&&S(i)&&i.catch(e=>{on(e,t,n)}),i}if(m(e)){let i=[];for(let a=0;a<e.length;a++)i.push(H(e[a],t,n,r));return i}}function on(e,t,n,r=!0){let a=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||i;if(t){let r=t.parent,i=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,a)===!1)return}r=r.parent}if(o){N(),an(o,null,10,[e,i,a]),Je();return}}sn(e,n,a,r,s)}function sn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var U=[],W=-1,cn=[],ln=null,un=0,dn=Promise.resolve(),fn=null;function pn(e){let t=fn||dn;return e?t.then(this?e.bind(this):e):t}function mn(e){let t=W+1,n=U.length;for(;t<n;){let r=t+n>>>1,i=U[r],a=bn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function hn(e){if(!(e.flags&1)){let t=bn(e),n=U[U.length-1];!n||!(e.flags&2)&&t>=bn(n)?U.push(e):U.splice(mn(t),0,e),e.flags|=1,gn()}}function gn(){fn||=dn.then(xn)}function _n(e){if(!m(e))ln&&e.id===-1?ln.splice(un+1,0,e):e.flags&1||(cn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)cn.push(e[t]);gn()}function vn(e,t,n=W+1){for(;n<U.length;n++){let t=U[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;U.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function yn(e){if(cn.length){let e=[...new Set(cn)].sort((e,t)=>bn(e)-bn(t));if(cn.length=0,ln){for(let t=0;t<e.length;t++)ln.push(e[t]);return}for(ln=e,un=0;un<ln.length;un++){let e=ln[un];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}ln=null,un=0}}var bn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function xn(e){try{for(W=0;W<U.length;W++){let e=U[W];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),an(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;W<U.length;W++){let e=U[W];e&&(e.flags&=-2)}W=-1,U.length=0,yn(e),fn=null,(U.length||cn.length)&&xn(e)}}var G=null,Sn=null;function Cn(e){let t=G;return G=e,Sn=e&&e.type.__scopeId||null,t}function wn(e,t=G,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&ji(-1);let i=Cn(t),a=Di.length,o;try{o=e(...n)}finally{for(let e=Di.length;e>a;e--)ki();Cn(i),r._d&&ji(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Tn(e,t){if(G===null)return e;let n=la(G),r=e.dirs||=[];for(let e=0;e<t.length;e++){let[a,o,s,c=i]=t[e];a&&(v(a)&&(a={mounted:a,updated:a}),a.deep&&V(o),r.push({dir:a,instance:n,value:o,oldValue:void 0,arg:s,modifiers:c}))}return e}function En(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(N(),H(c,n,8,[e.el,s,e,t]),Je())}}function Dn(e,t){if($){let n=$.provides,r=$.parent&&$.parent.provides;r===n&&(n=$.provides=Object.create(r)),n[e]=t}}function On(e,t,n=!1){let r=Xi();if(r||Fr){let i=Fr?Fr._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&v(t)?t.call(r&&r.proxy):t}}var kn=Symbol.for(`v-scx`),An=()=>On(kn);function jn(e,t,n){return Mn(e,t,n)}function Mn(e,t,n=i){let{immediate:r,deep:a,flush:s,once:c}=n,l=u({},n),d=t&&r||!t&&s!==`post`,f;if(na){if(s===`sync`){let e=An();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=o,e.resume=o,e.pause=o,e}}let p=$;l.call=(e,t,n)=>H(e,p,t,n);let m=!1;s===`post`?l.scheduler=e=>{q(e,p&&p.suspense)}:s!==`sync`&&(m=!0,l.scheduler=(e,t)=>{t?e():hn(e)}),l.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=rn(e,t,l);return na&&(f?f.push(h):d&&h()),h}function Nn(e,t,n){let r=this.proxy,i=y(e)?e.includes(`.`)?Pn(r,e):()=>r[e]:e.bind(r,r),a;v(t)?a=t:(a=t.handler,n=t);let o=$i(this),s=Mn(i,a.bind(r),n);return o(),s}function Pn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var Fn=Symbol(`_vte`),In=e=>e.__isTeleport,Ln=Symbol(`_leaveCb`);function Rn(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==Ti){t=n;break}}return t}function zn(e){if(!Jn(e))return In(e.type)&&e.children?Rn(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&v(n.default))return n.default()}}function Bn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;Bn(In(n.type)&&zn(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Vn(e,t){return v(e)?u({name:e.name},t,{setup:e}):e}function Hn(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function Un(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var Wn=new WeakMap;function Gn(e,t,n,r,a=!1){if(m(e)){e.forEach((e,i)=>Gn(e,t&&(m(t)?t[i]:t),n,r,a));return}if(qn(r)&&!a){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Gn(e,t,n,r.component.subTree);return}let o=r.shapeFlag&4?la(r.component):r.el,c=a?null:o,{i:l,r:u}=e,f=t&&t.r,h=l.refs===i?l.refs={}:l.refs,g=l.setupState,_=R(g),b=g===i?s:e=>!Un(h,e)&&p(_,e),x=(e,t)=>!(t&&Un(h,t));if(f!=null&&f!==u){if(Kn(t),y(f))h[f]=null,b(f)&&(g[f]=null);else if(B(f)){let e=t;x(f,e.k)&&(f.value=null),e.k&&(h[e.k]=null)}}if(v(u))an(u,l,12,[c,h]);else{let t=y(u),r=B(u);if(t||r){let i=()=>{if(e.f){let n=t?b(u)?g[u]:h[u]:x(u)||!e.k?u.value:h[e.k];if(a)m(n)&&d(n,o);else if(m(n))n.includes(o)||n.push(o);else if(t)h[u]=[o],b(u)&&(g[u]=h[u]);else{let t=[o];x(u,e.k)&&(u.value=t),e.k&&(h[e.k]=t)}}else t?(h[u]=c,b(u)&&(g[u]=c)):r&&(x(u,e.k)&&(u.value=c),e.k&&(h[e.k]=c))};if(c){let t=()=>{i(),Wn.delete(e)};t.id=-1,Wn.set(e,t),q(t,n)}else Kn(e),i()}}}function Kn(e){let t=Wn.get(e);t&&(t.flags|=8,Wn.delete(e))}fe().requestIdleCallback,fe().cancelIdleCallback;var qn=e=>!!e.type.__asyncLoader,Jn=e=>e.type.__isKeepAlive;function Yn(e,t){Zn(e,`a`,t)}function Xn(e,t){Zn(e,`da`,t)}function Zn(e,t,n=$){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if($n(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Jn(e.parent.vnode)&&Qn(r,t,n,e),e=e.parent}}function Qn(e,t,n,r){let i=$n(t,e,r,!0);or(()=>{d(r[t],i)},n)}function $n(e,t,n=$,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{N();let i=$i(n),a=H(t,n,e,r);return i(),Je(),a};return r?i.unshift(a):i.push(a),a}}var er=e=>(t,n=$)=>{(!na||e===`sp`)&&$n(e,(...e)=>t(...e),n)},tr=er(`bm`),nr=er(`m`),rr=er(`bu`),ir=er(`u`),ar=er(`bum`),or=er(`um`),sr=er(`sp`),cr=er(`rtg`),lr=er(`rtc`);function ur(e,t=$){$n(`ec`,e,t)}var dr=Symbol.for(`v-ndc`);function fr(e,t,n,r){let i,a=n&&n[r],o=m(e);if(o||y(e)){let n=o&&Vt(e),r=!1,s=!1;n&&(r=!L(e),s=I(e),e=ot(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?Wt(z(e[n])):z(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(x(e)){if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}}else i=[];return n&&(n[r]=i),i}var pr=e=>e?ta(e)?la(e):pr(e.parent):null,mr=u(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=>pr(e.parent),$root:e=>pr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Cr(e),$forceUpdate:e=>e.f||=()=>{hn(e.update)},$nextTick:e=>e.n||=pn.bind(e.proxy),$watch:e=>Nn.bind(e)}),hr=(e,t)=>e!==i&&!e.__isScriptSetup&&p(e,t),gr={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(t[0]!==`$`){let e=s[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return a[t];case 4:return n[t];case 3:return o[t]}else if(hr(r,t))return s[t]=1,r[t];else if(a!==i&&p(a,t))return s[t]=2,a[t];else if(p(o,t))return s[t]=3,o[t];else if(n!==i&&p(n,t))return s[t]=4,n[t];else vr&&(s[t]=0)}let u=mr[t],d,f;if(u)return t===`$attrs`&&P(e.attrs,`get`,``),u(e);if((d=c.__cssModules)&&(d=d[t]))return d;if(n!==i&&p(n,t))return s[t]=4,n[t];if(f=l.config.globalProperties,p(f,t))return f[t]},set({_:e},t,n){let{data:r,setupState:a,ctx:o}=e;return hr(a,t)?(a[t]=n,!0):r!==i&&p(r,t)?(r[t]=n,!0):p(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:a,props:o,type:s}},c){let l;return!!(n[c]||e!==i&&c[0]!==`$`&&p(e,c)||hr(t,c)||p(o,c)||p(r,c)||p(mr,c)||p(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?p(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function _r(e){return m(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var vr=!0;function yr(e){let t=Cr(e),n=e.proxy,r=e.ctx;vr=!1,t.beforeCreate&&xr(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:s,watch:c,provide:l,inject:u,created:d,beforeMount:f,mounted:p,beforeUpdate:h,updated:g,activated:_,deactivated:y,beforeDestroy:b,beforeUnmount:S,destroyed:C,unmounted:w,render:ee,renderTracked:te,renderTriggered:ne,errorCaptured:re,serverPrefetch:ie,expose:ae,inheritAttrs:T,components:oe,directives:E,filters:se}=t;if(u&&br(u,r,null),s)for(let e in s){let t=s[e];v(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);x(t)&&(e.data=Lt(t))}if(vr=!0,a)for(let e in a){let t=a[e],i=da({get:v(t)?t.bind(n,n):v(t.get)?t.get.bind(n,n):o,set:!v(t)&&v(t.set)?t.set.bind(n):o});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(c)for(let e in c)Sr(c[e],r,n,e);if(l){let e=v(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Dn(t,e[t])})}d&&xr(d,e,`c`);function D(e,t){m(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(D(tr,f),D(nr,p),D(rr,h),D(ir,g),D(Yn,_),D(Xn,y),D(ur,re),D(lr,te),D(cr,ne),D(ar,S),D(or,w),D(sr,ie),m(ae)){if(ae.length){let t=e.exposed||={};ae.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}ee&&e.render===o&&(e.render=ee),T!=null&&(e.inheritAttrs=T),oe&&(e.components=oe),E&&(e.directives=E),ie&&Hn(e)}function br(e,t,n=o){m(e)&&(e=Or(e));for(let n in e){let r=e[n],i;i=x(r)?`default`in r?On(r.from||n,r.default,!0):On(r.from||n):On(r),B(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function xr(e,t,n){H(m(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Sr(e,t,n,r){let i=r.includes(`.`)?Pn(n,r):()=>n[r];if(y(e)){let n=t[e];v(n)&&jn(i,n)}else if(v(e))jn(i,e.bind(n));else if(x(e)){if(m(e))e.forEach(e=>Sr(e,t,n,r));else{let r=v(e.handler)?e.handler.bind(n):t[e.handler];v(r)&&jn(i,r,e)}}}function Cr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>wr(c,e,o,!0)),wr(c,t,o)),x(t)&&a.set(t,c),c}function wr(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&wr(e,a,n,!0),i&&i.forEach(t=>wr(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Tr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Tr={data:Er,props:Ar,emits:Ar,methods:kr,computed:kr,beforeCreate:K,created:K,beforeMount:K,mounted:K,beforeUpdate:K,updated:K,beforeDestroy:K,beforeUnmount:K,destroyed:K,unmounted:K,activated:K,deactivated:K,errorCaptured:K,serverPrefetch:K,components:kr,directives:kr,watch:jr,provide:Er,inject:Dr};function Er(e,t){return t?e?function(){return u(v(e)?e.call(this,this):e,v(t)?t.call(this,this):t)}:t:e}function Dr(e,t){return kr(Or(e),Or(t))}function Or(e){if(m(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function K(e,t){return e?[...new Set([].concat(e,t))]:t}function kr(e,t){return e?u(Object.create(null),e,t):t}function Ar(e,t){return e?m(e)&&m(t)?[...new Set([...e,...t])]:u(Object.create(null),_r(e),_r(t??{})):t}function jr(e,t){if(!e)return t;if(!t)return e;let n=u(Object.create(null),e);for(let r in t)n[r]=K(e[r],t[r]);return n}function Mr(){return{app:null,config:{isNativeTag:s,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}}var Nr=0;function Pr(e,t){return function(n,r=null){v(n)||(n=u({},n)),r!=null&&!x(r)&&(r=null);let i=Mr(),a=new WeakSet,o=[],s=!1,c=i.app={_uid:Nr++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:pa,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&v(e.install)?(a.add(e),e.install(c,...t)):v(e)&&(a.add(e),e(c,...t))),c},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),c},component(e,t){return t?(i.components[e]=t,c):i.components[e]},directive(e,t){return t?(i.directives[e]=t,c):i.directives[e]},mount(a,o,l){if(!s){let u=c._ceVNode||X(n,r);return u.appContext=i,l===!0?l=`svg`:l===!1&&(l=void 0),o&&t?t(u,a):e(u,a,l),s=!0,c._container=a,a.__vue_app__=c,la(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(H(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return i.provides[e]=t,c},runWithContext(e){let t=Fr;Fr=c;try{return e()}finally{Fr=t}}};return c}}var Fr=null,Ir=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${T(t)}Modifiers`]||e[`${E(t)}Modifiers`];function Lr(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||i,a=n,o=t.startsWith(`update:`),s=o&&Ir(r,t.slice(7));s&&(s.trim&&(a=n.map(e=>y(e)?e.trim():e)),s.number&&(a=a.map(ue)));let c,l=r[c=D(t)]||r[c=D(T(t))];!l&&o&&(l=r[c=D(E(t))]),l&&H(l,e,6,a);let u=r[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,H(u,e,6,a)}}var Rr=new WeakMap;function zr(e,t,n=!1){let r=n?Rr:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!v(e)){let r=e=>{let n=zr(e,t,!0);n&&(s=!0,u(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(x(e)&&r.set(e,null),null):(m(a)?a.forEach(e=>o[e]=null):u(o,a),x(e)&&r.set(e,o),o)}function Br(e,t){return!e||!c(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),p(e,t[0].toLowerCase()+t.slice(1))||p(e,E(t))||p(e,t))}function Vr(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=Cn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Z(u.call(t,e,d,f,m,p,h)),y=s}else{let e=t;v=Z(e.length>1?e(f,{attrs:s,slots:o,emit:c}):e(f,null)),y=t.props?s:Hr(s)}}catch(t){Di.length=0,on(t,e,1),v=X(Ti)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(l)&&(y=Ur(y,a)),b=Vi(b,y,!1,!0))}return n.dirs&&(b=Vi(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Bn(In(b.type)&&zn(b)||b,n.transition),v=b,Cn(_),v}var Hr=e=>{let t;for(let n in e)(n===`class`||n===`style`||c(n))&&((t||={})[n]=e[n]);return t},Ur=(e,t)=>{let n={};for(let r in e)(!l(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Wr(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Gr(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(Kr(o,r,n)&&!Br(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||Gr(r,o,l):!!o;return!1}function Gr(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(Kr(t,e,a)&&!Br(n,a))return!0}return!1}function Kr(e,t,n){let r=e[n],i=t[n];return n===`style`&&x(r)&&x(i)?!Te(r,i):r!==i}function qr({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var Jr={},Yr=()=>Object.create(Jr),Xr=e=>Object.getPrototypeOf(e)===Jr;function Zr(e,t,n,r=!1){let i={},a=Yr();e.propsDefaults=Object.create(null),$r(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:Rt(i):e.type.props?i:a,e.attrs=a}function Qr(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=R(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(Br(e.emitsOptions,o))continue;let u=t[o];if(c){if(p(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=T(o);i[t]=ei(c,s,t,u,e,!1)}}else u!==a[o]&&(a[o]=u,l=!0)}}}else{$r(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!p(t,a)&&((r=E(a))===a||!p(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=ei(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!p(t,e))&&(delete a[e],l=!0)}l&&it(e.attrs,`set`,``)}function $r(e,t,n,r){let[a,o]=e.propsOptions,s=!1,c;if(t)for(let i in t){if(re(i))continue;let l=t[i],u;a&&p(a,u=T(i))?!o||!o.includes(u)?n[u]=l:(c||={})[u]=l:Br(e.emitsOptions,i)||(!(i in r)||l!==r[i])&&(r[i]=l,s=!0)}if(o){let t=R(n),r=c||i;for(let i=0;i<o.length;i++){let s=o[i];n[s]=ei(a,t,s,r[s],e,!p(r,s))}}return s}function ei(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=p(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&v(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=$i(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===E(n))&&(r=!0))}return r}var ti=new WeakMap;function ni(e,t,n=!1){let r=n?ti:t.propsCache,o=r.get(e);if(o)return o;let s=e.props,c={},l=[],d=!1;if(!v(e)){let r=e=>{d=!0;let[n,r]=ni(e,t,!0);u(c,n),r&&l.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!s&&!d)return x(e)&&r.set(e,a),a;if(m(s))for(let e=0;e<s.length;e++){let t=T(s[e]);ri(t)&&(c[t]=i)}else if(s)for(let e in s){let t=T(e);if(ri(t)){let n=s[e],r=c[t]=m(n)||v(n)?{type:n}:u({},n),i=r.type,a=!1,o=!0;if(m(i))for(let e=0;e<i.length;++e){let t=i[e],n=v(t)&&t.name;if(n===`Boolean`){a=!0;break}n===`String`&&(o=!1)}else a=v(i)&&i.name===`Boolean`;r[0]=a,r[1]=o,(a||p(r,`default`))&&l.push(t)}}let f=[c,l];return x(e)&&r.set(e,f),f}function ri(e){return e[0]!==`$`&&!re(e)}var ii=e=>e===`_`||e===`_ctx`||e===`$stable`,ai=e=>m(e)?e.map(Z):[Z(e)],oi=(e,t,n)=>{if(t._n)return t;let r=wn((...e)=>ai(t(...e)),n);return r._c=!1,r},si=(e,t,n)=>{let r=e._ctx;for(let n in e){if(ii(n))continue;let i=e[n];if(v(i))t[n]=oi(n,i,r);else if(i!=null){let e=ai(i);t[n]=()=>e}}},ci=(e,t)=>{let n=ai(t);e.slots.default=()=>n},li=(e,t,n)=>{for(let r in t)(n||!ii(r))&&(e[r]=t[r])},ui=(e,t,n)=>{let r=e.slots=Yr();if(e.vnode.shapeFlag&32){let e=t._;e?(li(r,t,n),n&&le(r,`_`,e,!0)):si(t,r)}else t&&ci(e,t)},di=(e,t,n)=>{let{vnode:r,slots:a}=e,o=!0,s=i;if(r.shapeFlag&32){let e=t._;e?n&&e===1?o=!1:li(a,t,n):(o=!t.$stable,si(t,a)),s=t}else t&&(ci(e,t),s={default:1});if(o)for(let e in a)!ii(e)&&s[e]==null&&delete a[e]},q=Ci;function fi(e){return pi(e)}function pi(e,t){let n=fe();n.__VUE__=!0;let{insert:r,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=o,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,o=null,s=void 0,c=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!Fi(e,t)&&(r=ye(e),k(e,i,o,!0),e=null),t.patchFlag===-2&&(l=!1,t.dynamicChildren=null),t.dynamicChildren&&e&&e.dynamicChildren&&e.dynamicChildren.hasOnce&&(t.dynamicChildren===a&&(t.dynamicChildren=[]),t.dynamicChildren.hasOnce=!0);let{type:u,ref:d,shapeFlag:f}=t;switch(u){case wi:y(e,t,n,r);break;case Ti:b(e,t,n,r);break;case Ei:e??x(t,n,r,s);break;case J:oe(e,t,n,r,i,o,s,c,l);break;default:f&1?w(e,t,n,r,i,o,s,c,l):f&6?E(e,t,n,r,i,o,s,c,l):(f&64||f&128)&&u.process(e,t,n,r,i,o,s,c,l,Se)}d!=null&&i?Gn(d,e&&e.ref,o,t||e,!t):d==null&&e&&e.ref!=null&&Gn(e.ref,null,o,e,!0)},y=(e,t,n,i)=>{if(e==null)r(t.el=u(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,i)=>{e==null?r(t.el=d(t.children||``),n,i):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=h(e),r(e,n,i),e=a;r(t,n,i)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)ee(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ie(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},ee=(e,t,n,i,a,o,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,o,m&&m.is,m),h&8?p(d,e.children):h&16&&ne(e.children,d,null,i,a,mi(e,o),s,u),_&&En(e,null,i,`created`),te(d,e,e.scopeId,s,i),m){for(let e in m)e!==`value`&&!re(e)&&c(d,e,null,m[e],o,i);`value`in m&&c(d,`value`,null,m.value,o),(f=m.onVnodeBeforeMount)&&Q(f,i,e)}_&&En(e,null,i,`beforeMount`);let v=gi(a,g);v&&g.beforeEnter(d),r(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&q(()=>{try{f&&Q(f,i,e),v&&g.enter(d),_&&En(e,null,i,`mounted`)}finally{}},a)},te=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||Si(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;te(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},ne=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?Wi(e[l]):Z(e[l]);v(null,c,t,n,r,i,a,o,s)}},ie=(e,t,n,r,a,o,s)=>{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||i,h=t.props||i,g;if(n&&hi(n,!1),(g=h.onVnodeBeforeUpdate)&&Q(g,n,t,e),f&&En(t,e,n,`beforeUpdate`),n&&hi(n,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?ae(e.dynamicChildren,d,l,n,r,mi(t,a),o):s||ue(e,t,l,null,n,r,mi(t,a),o,!1),u>0){if(u&16)T(l,m,h,n,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],i=m[r],o=h[r];(o!==i||r===`value`)&&c(l,r,i,o,a,n)}}u&1&&e.children!==t.children&&p(l,t.children)}else!s&&d==null&&T(l,m,h,n,a);((g=h.onVnodeUpdated)||f)&&q(()=>{g&&Q(g,n,t,e),f&&En(t,e,n,`updated`)},r)},ae=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el&&(c.type===J||!Fi(c,l)||c.shapeFlag&198)?m(c.el):n;v(c,l,u,null,r,i,a,o,!0)}},T=(e,t,n,r,a)=>{if(t!==n){if(t!==i)for(let i in t)!re(i)&&!(i in n)&&c(e,i,t[i],null,a,r);for(let i in n){if(re(i))continue;let o=n[i],s=t[i];o!==s&&i!==`value`&&c(e,i,s,o,a,r)}`value`in n&&c(e,`value`,t.value,n.value,a)}},oe=(e,t,n,i,a,o,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(r(d,n,i),r(f,n,i),ne(t.children||[],n,f,a,o,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(ae(e.dynamicChildren,m,n,a,o,s,c),(t.key!=null||a&&t===a.subTree)&&_i(e,t,!0)):ue(e,t,n,f,a,o,s,c,l)},E=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):se(t,n,r,i,a,o,c):D(e,t,c)},se=(e,t,n,r,i,a,o)=>{let s=e.component=Yi(e,r,i);if(Jn(e)&&(s.ctx.renderer=Se),ra(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,O,o),!e.el){let r=s.subTree=X(Ti);b(null,r,t,n),e.placeholder=r.el}}else O(s,e,t,n,i,a,o)},D=(e,t,n)=>{let r=t.component=e.component;if(Wr(e,t,n)){if(r.asyncDep&&!r.asyncResolved){t.el=e.el,le(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},O=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=yi(e);if(n){t&&(t.el=c.el,le(e,t,o)),n.asyncDep.then(()=>{q(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;hi(e,!1),t?(t.el=c.el,le(e,t,o)):t=c,n&&ce(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&Q(d,s,t,c),hi(e,!0);let f=Vr(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),ye(p),e,i,a),t.el=f.el,u===null&&qr(e,f.el),r&&q(r,i),(d=t.props&&t.props.onVnodeUpdated)&&q(()=>Q(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=qn(t);if(hi(e,!1),l&&ce(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Q(o,d,t),hi(e,!0),s&&we){let t=()=>{e.subTree=Vr(e),we(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Vr(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&q(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;q(()=>Q(o,d,e),i)}(t.shapeFlag&256||d&&qn(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&q(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Pe(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>hn(u),hi(e,!0),l()},le=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Qr(e,t.props,r,n),di(e,t.children,n),N(),vn(e),Je()},ue=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){pe(l,d,n,r,i,a,o,s,c);return}if(f&256){de(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&ve(l,i,a),d!==l&&p(n,d)):u&16?m&16?pe(l,d,n,r,i,a,o,s,c):ve(l,i,a,!0):(u&8&&p(n,``),m&16&&ne(d,n,r,i,a,o,s,c))},de=(e,t,n,r,i,o,s,c,l)=>{e||=a,t||=a;let u=e.length,d=t.length,f=Math.min(u,d),p=0;for(;p<f;p++){let r=t[p]=l?Wi(t[p]):Z(t[p]);v(e[p],r,n,null,i,o,s,c,l)}u>d?ve(e,i,o,!0,!1,f):ne(t,n,r,i,o,s,c,l,f)},pe=(e,t,n,r,i,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],a=t[u]=l?Wi(t[u]):Z(t[u]);if(Fi(r,a))v(r,a,n,null,i,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],a=t[p]=l?Wi(t[p]):Z(t[p]);if(Fi(r,a))v(r,a,n,null,i,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,a=e<d?t[e].el:r;for(;u<=p;)v(null,t[u]=l?Wi(t[u]):Z(t[u]),n,a,i,o,s,c,l),u++}}else if(u>p)for(;u<=f;)k(e[u],i,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?Wi(t[u]):Z(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u<b;u++)C[u]=0;for(u=m;u<=f;u++){let r=e[u];if(y>=b){k(r,i,o,!0);continue}let a;if(r.key!=null)a=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Fi(r,t[_])){a=_;break}a===void 0?k(r,i,o,!0):(C[a-h]=u+1,a>=S?S=a:x=!0,v(r,t[a],n,null,i,o,s,c,l),y++)}let w=x?vi(C):a;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,a=t[e],f=t[e+1],p=e+1<d?f.el||xi(f):r;C[u]===0?v(null,a,n,p,i,o,s,c,l):x&&(_<0||u!==w[_]?me(a,n,p,2):_--)}}},me=(e,t,n,i,a=null)=>{let{el:o,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){me(e.component.subTree,t,n,i);return}if(d&128){e.suspense.move(t,n,i);return}if(d&64){c.move(e,t,n,Se);return}if(c===J){r(o,t,n);for(let e=0;e<u.length;e++)me(u[e],t,n,i);r(e.anchor,t,n);return}if(c===Ei){S(e,t,n);return}if(i!==2&&d&1&&l){if(i===0)l.persisted&&!o[Ln]?r(o,t,n):(l.beforeEnter(o),r(o,t,n),q(()=>l.enter(o),a));else{let{leave:i,delayLeave:a,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(o):r(o,t,n)},d=()=>{let e=o._isLeaving||!!o[Ln];o._isLeaving&&o[Ln](!0),l.persisted&&!e?u():i(o,()=>{u(),c&&c()})};a?a(o,u,d):d()}}else r(o,t,n)},k=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if((d===-2||l&&l.hasOnce)&&(i=!1),s!=null&&(N(),Gn(s,null,n,e,!0),Je()),p!=null&&(!e.ctx||e.ctx===t)&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!qn(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Q(_,t,e),u&6)_e(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&En(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,Se,r):l&&!l.hasOnce&&(a!==J||d>0&&d&64)?ve(l,t,n,!1,!0):(a===J&&d&384||!i&&u&16)&&ve(c,t,n),r&&he(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&q(()=>{_&&Q(_,t,e),h&&En(e,null,t,`unmounted`),v&&(e.el=null)},n)},he=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===J){ge(n,r);return}if(t===Ei){C(e),i&&!i.persisted&&i.afterLeave&&i.afterLeave();return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},ge=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},_e=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;bi(c),bi(l),r&&ce(r),i.stop(),a?(a.flags|=8,k(o,e,t,n)):e.vnode.el&&o&&(o.transition=e.vnode.transition,k(o,e,t,n)),s&&q(s,t),q(()=>{e.isUnmounted=!0},t)},ve=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)k(e[o],t,n,r,i)},ye=e=>{if(e.shapeFlag&6)return ye(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Fn];return n?h(n):t},be=!1,xe=(e,t,n)=>{let r;e==null?t._vnode&&(k(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,be||=(be=!0,vn(r),yn(),!1)},Se={p:v,um:k,m:me,r:he,mt:se,mc:ne,pc:ue,pbc:ae,n:ye,o:e},Ce,we;return t&&([Ce,we]=t(Se)),{render:xe,hydrate:Ce,createApp:Pr(xe,Ce)}}function mi({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 hi({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function gi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function _i(e,t,n=!1){let r=e.children,i=t.children;if(m(r)&&m(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=Wi(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&_i(t,a)),a.type===wi&&(a.patchFlag===-1&&(a=i[e]=Wi(a)),a.el=t.el),a.type===Ti&&!a.el&&(a.el=t.el)}}function vi(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function yi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:yi(t)}function bi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function xi(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?xi(t.subTree):null}var Si=e=>e.__isSuspense;function Ci(e,t){t&&t.pendingBranch?m(e)?t.effects.push(...e):t.effects.push(e):_n(e)}var J=Symbol.for(`v-fgt`),wi=Symbol.for(`v-txt`),Ti=Symbol.for(`v-cmt`),Ei=Symbol.for(`v-stc`),Di=[],Y=null;function Oi(e=!1){Di.push(Y=e?null:[])}function ki(){Di.pop(),Y=Di[Di.length-1]||null}var Ai=1;function ji(e,t=!1){Ai+=e,e<0&&Y&&t&&(Y.hasOnce=!0)}function Mi(e){return e.dynamicChildren=Ai>0?Y||a:null,ki(),Ai>0&&Y&&Y.push(e),e}function Ni(e,t,n,r,i,a){return Mi(Ri(e,t,n,r,i,a,!0))}function Pi(e){return e?e.__v_isVNode===!0:!1}function Fi(e,t){return e.type===t.type&&e.key===t.key}var Ii=({key:e})=>e??null,Li=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:y(e)||B(e)||v(e)?{i:G,r:e,k:t,f:!!n}:e);function Ri(e,t=null,n=null,r=0,i=null,a=e===J?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ii(t),ref:t&&Li(t),scopeId:Sn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:G};return s?(Gi(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=y(n)?8:16),Ai>0&&!o&&Y&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&Y.push(c),c}var X=zi;function zi(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===dr)&&(e=Ti),Pi(e)){let r=Vi(e,t,!0);return n&&Gi(r,n),Ai>0&&!a&&Y&&(r.shapeFlag&6?Y[Y.indexOf(e)]=r:Y.push(r)),r.patchFlag=-2,r}if(ua(e)&&(e=e.__vccOpts),t){t=Bi(t);let{class:e,style:n}=t;e&&!y(e)&&(t.class=_e(e)),x(n)&&(Ht(n)&&!m(n)&&(n=u({},n)),t.style=pe(n))}let o=y(e)?1:Si(e)?128:In(e)?64:x(e)?4:v(e)?2:0;return Ri(e,t,n,r,i,o,a,!0)}function Bi(e){return e?Ht(e)||Xr(e)?u({},e):e:null}function Vi(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Ki(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Ii(l),ref:t&&t.ref?n&&a?m(a)?a.concat(Li(t)):[a,Li(t)]:Li(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==J?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Vi(e.ssContent),ssFallback:e.ssFallback&&Vi(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&r&&Bn(u,c.clone(u)),u}function Hi(e=` `,t=0){return X(wi,null,e,t)}function Ui(e,t){let n=X(Ei,null,e);return n.staticCount=t,n}function Z(e){return e==null||typeof e==`boolean`?X(Ti):m(e)?X(J,null,e.slice()):Pi(e)?Wi(e):X(wi,null,String(e))}function Wi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Vi(e)}function Gi(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(m(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Gi(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!Xr(t)?t._ctx=G:r===3&&G&&(G.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(v(t)){if(r&65){Gi(e,{default:t});return}t={default:t,_ctx:G},n=32}else t=String(t),r&64?(n=16,t=[Hi(t)]):n=8;e.children=t,e.shapeFlag|=n}function Ki(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=_e([t.class,r.class]));else if(e===`style`)t.style=pe([t.style,r.style]);else if(c(e)){let n=t[e],i=r[e];i&&n!==i&&!(m(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!l(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function Q(e,t,n,r=null){H(e,t,7,[n,r])}var qi=Mr(),Ji=0;function Yi(e,t,n){let r=e.type,a=(t?t.appContext:e.appContext)||qi,o={uid:Ji++,vnode:e,type:r,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new je(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ni(r,a),emitsOptions:zr(r,a),emit:null,emitted:null,propsDefaults:i,inheritAttrs:r.inheritAttrs,ctx:i,data:i,props:i,attrs:i,slots:i,refs:i,setupState:i,setupContext: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 o.ctx={_:o},o.root=t?t.root:o,o.emit=Lr.bind(null,o),e.ce&&e.ce(o),o}var $=null,Xi=()=>$||G,Zi,Qi;{let e=fe(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Zi=t(`__VUE_INSTANCE_SETTERS__`,e=>$=e),Qi=t(`__VUE_SSR_SETTERS__`,e=>na=e)}var $i=e=>{let t=$;return Zi(e),e.scope.on(),()=>{e.scope.off(),Zi(t)}},ea=()=>{$&&$.scope.off(),Zi(null)};function ta(e){return e.vnode.shapeFlag&4}var na=!1;function ra(e,t=!1,n=!1){t&&Qi(t);let{props:r,children:i}=e.vnode,a=ta(e);Zr(e,r,a,t),ui(e,i,n||t);let o=a?ia(e,t):void 0;return t&&Qi(!1),o}function ia(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,gr);let{setup:r}=n;if(r){N();let n=e.setupContext=r.length>1?ca(e):null,i=$i(e),a=an(r,e,0,[e.props,n]),o=S(a);if(Je(),i(),(o||e.sp)&&!qn(e)&&Hn(e),o){if(a.then(ea,ea),t)return a.then(n=>{Qi(!0);try{aa(e,n,t)}finally{Qi(!1)}}).catch(t=>{on(t,e,0)});e.asyncDep=a}else aa(e,a,t)}else oa(e,t)}function aa(e,t,n){v(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:x(t)&&(e.setupState=Xt(t)),oa(e,n)}function oa(e,t,n){let r=e.type;e.render||=r.render||o;{let t=$i(e);N();try{yr(e)}finally{Je(),t()}}}var sa={get(e,t){return P(e,`get`,``),e[t]}};function ca(e){return{attrs:new Proxy(e.attrs,sa),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function la(e){return e.exposed?e.exposeProxy||=new Proxy(Xt(Ut(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mr)return mr[n](e)},has(e,t){return t in e||t in mr}}):e.proxy}function ua(e){return v(e)&&`__vccOpts`in e}var da=(e,t)=>Qt(e,t,na);function fa(e,t,n){try{ji(-1);let r=arguments.length;return r===2?x(t)&&!m(t)?Pi(t)?X(e,null,[t]):X(e,t):X(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Pi(n)&&(n=[n]),X(e,t,n))}finally{ji(1)}}var pa=`3.5.43`,ma=void 0,ha=typeof window<`u`&&window.trustedTypes;if(ha)try{ma=ha.createPolicy(`vue`,{createHTML:e=>e})}catch{}var ga=ma?e=>ma.createHTML(e):e=>e,_a=`http://www.w3.org/2000/svg`,va=`http://www.w3.org/1998/Math/MathML`,ya=typeof document<`u`?document:null,ba=ya&&ya.createElement(`template`),xa={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?ya.createElementNS(_a,e):t===`mathml`?ya.createElementNS(va,e):n?ya.createElement(e,{is:n}):ya.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>ya.createTextNode(e),createComment:e=>ya.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ya.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{ba.innerHTML=ga(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=ba.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Sa=Symbol(`_vtc`);function Ca(e,t,n){let r=e[Sa];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var wa=Symbol(`_vod`),Ta=Symbol(`_vsh`),Ea=Symbol(``),Da=/(?:^|;)\s*display\s*:/;function Oa(e,t,n){let r=e.style,i=y(n),a=!1;if(n&&!i){if(t){if(y(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Aa(r,t,``)}else for(let e in t)n[e]??Aa(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Aa(r,i,``):Pa(e,i,!y(t)&&t?t[i]:void 0,o)||Aa(r,i,o)}}else if(i){if(t!==n){let e=r[Ea];e&&(n+=`;`+e),r.cssText=n,a=Da.test(n)}}else t&&e.removeAttribute(`style`);wa in e&&(e[wa]=a?r.display:``,e[Ta]&&(r.display=`none`))}var ka=/\s*!important$/;function Aa(e,t,n){if(m(n))n.forEach(n=>Aa(e,t,n));else if(n??=``,t.startsWith(`--`))ka.test(n)?e.setProperty(t,n.replace(ka,``),`important`):e.setProperty(t,n);else{let r=Na(e,t);ka.test(n)?e.setProperty(E(r),n.replace(ka,``),`important`):e[r]=n}}var ja=[`Webkit`,`Moz`,`ms`],Ma={};function Na(e,t){let n=Ma[t];if(n)return n;let r=T(t);if(r!==`filter`&&r in e)return Ma[t]=r;r=se(r);for(let n=0;n<ja.length;n++){let i=ja[n]+r;if(i in e)return Ma[t]=i}return t}function Pa(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&y(r)&&n===r}var Fa=`http://www.w3.org/1999/xlink`;function Ia(e,t,n,r,i,a=ye(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Fa,t.slice(6,t.length)):e.setAttributeNS(Fa,t,n):n==null||a&&!be(n)?e.removeAttribute(t):e.setAttribute(t,a?``:b(n)?String(n):n)}function La(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?ga(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=be(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Ra(e,t,n,r){e.addEventListener(t,n,r)}function za(e,t,n,r){e.removeEventListener(t,n,r)}var Ba=Symbol(`_vei`);function Va(e,t,n,r,i=null){let a=e[Ba]||(e[Ba]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=Wa(t);r?Ra(e,n,a[t]=Ja(r,i),s):o&&(za(e,n,o,s),a[t]=void 0)}}var Ha=/(Once|Passive|Capture)$/,Ua=/^on:?(?:Once|Passive|Capture)$/;function Wa(e){let t,n;for(;(n=e.match(Ha))&&!Ua.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):E(e.slice(2)),t]}var Ga=0,Ka=Promise.resolve(),qa=()=>Ga||=(Ka.then(()=>Ga=0),Date.now());function Ja(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(m(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&H(e,t,5,a)}}else H(r,t,5,[e])};return n.value=e,n.attached=qa(),n}var Ya=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Xa=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Ca(e,r,o):t===`style`?Oa(e,n,r):c(t)?l(t)||Va(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):Za(e,t,r,o))?(La(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Ia(e,t,r,o,a,t!==`value`)):e._isVueCE&&(Qa(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!y(r)))?La(e,T(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Ia(e,t,r,o))};function Za(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&Ya(t)&&v(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return Ya(t)&&y(n)?!1:t in e}function Qa(e,t){let n=e._def.props;if(!n)return!1;let r=T(t);return Array.isArray(n)?n.some(e=>T(e)===r):Object.keys(n).some(e=>T(e)===r)}var $a=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return m(t)?e=>ce(t,e):t},eo=Symbol(`_assign`),to={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Ra(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?ue(io(e)):io(e)),r=e.multiple,i=r?g(e._modelValue)?new Set(t):t:t[0],a=e._pendingValue=[r,r?m(i)?t.slice():t:i];try{e[eo](i)}finally{pn(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[eo]=$a(r)},mounted(e,{value:t}){ro(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[eo]=$a(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!no(t,n[1],n[0]))&&ro(e,t)}};function no(e,t,n){if(!n||m(e))return Te(e,t);if(g(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function ro(e,t){let n=e.multiple,r=m(t);if(!n||r||g(t)){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=io(a);if(n){if(r){let e=typeof o;a.selected=e===`string`||e===`number`?t.some(e=>String(e)===String(o)):Ee(t,o)>-1}else a.selected=t.has(o)}else if(Te(io(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function io(e){return`_value`in e?e._value:e.value}var ao=u({patchProp:Xa},xa),oo;function so(){return oo||=fi(ao)}var co=((...e)=>{let t=so().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=uo(e);if(!r)return;let i=t._component;!v(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,lo(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function lo(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function uo(e){return y(e)?document.querySelector(e):e}var fo=[String,Object],po={type:Boolean,default:void 0},mo=Vn({name:`Badgecraft`,props:{svg:{type:[String,Object],required:!0},mode:String,metal:fo,enamel:fo,base:fo,accent:fo,color:String,frame:[String,Object],rim:Number,outline:[Number,String],fillHoles:po,relief:Object,environment:[String,Object],environmentRotation:Number,exposure:Number,toneMapping:String,interaction:String,tiltMax:Number,pose:Object,idle:String,locked:po,lockedColor:String,shadow:Number,quality:[Number,String],padding:Number,size:{type:[Number,String],default:160},alt:String},emits:{ready:()=>!0,error:e=>e instanceof Error},setup(r,{emit:i,expose:a}){let o=Gt(),s=null,c=()=>({...t(r),onReady:()=>i(`ready`),onError:e=>i(`error`,e)});return nr(()=>{s=new e(o.value,c())}),jn(c,e=>s?.setOptions(e),{deep:!0}),ar(()=>{s?.destroy(),s=null}),a({spin:e=>s?.spin(e),glint:()=>s?.glint(),toDataURL:(e,t)=>s?.toDataURL(e,t)??``,toBlob:(e,t)=>s?.toBlob(e,t)??Promise.resolve(null),instance:()=>s}),()=>{let e=n(r.size);return fa(`div`,{ref:o,role:`img`,"aria-label":r.alt,style:{display:`inline-block`,position:`relative`,width:e,height:e}})}}}),ho={style:{display:`flex`,gap:`24px`,"align-items":`center`,"flex-wrap":`wrap`}},go={style:{display:`flex`,gap:`8px`,"flex-wrap":`wrap`,"margin-top":`24px`}},_o=[`aria-pressed`,`onClick`],vo=[`value`];co(Vn({__name:`VueDemo`,setup(e){let t=[`gold`,`silver`,`rose-gold`,`copper`,`platinum`,`black-chrome`],n=Gt(`gold`),r=Gt(`studio`),i=Gt(),a=0,o=()=>{a++,a>=3&&(window.__ready=!0)};return(e,a)=>(Oi(),Ni(`main`,null,[a[2]||=Ui(`<header><h1>Vue</h1><p><code><Badgecraft svg="./logos/google.svg" metal="gold" /></code></p><nav><a href="./index.html">Gallery</a> · <a href="./studio.html">Studio</a> · <a href="./react.html">React</a> · <a href="./vue.html">Vue</a> · <a href="./element.html">Web Component</a></nav></header>`,1),Ri(`div`,ho,[X(Jt(mo),{ref_key:`hero`,ref:i,svg:`./logos/google.svg`,metal:n.value,environment:r.value,size:280,idle:`float`,onReady:o},null,8,[`metal`,`environment`]),X(Jt(mo),{svg:`./logos/apple.svg`,frame:`circle`,metal:n.value,environment:r.value,size:200,onReady:o},null,8,[`metal`,`environment`]),X(Jt(mo),{svg:`./logos/meta.svg`,metal:n.value,environment:r.value,relief:{depth:.06,enamelDome:.2},size:200,onReady:o},null,8,[`metal`,`environment`])]),Ri(`p`,go,[(Oi(),Ni(J,null,fr(t,e=>Ri(`button`,{key:e,"aria-pressed":e===n.value,onClick:t=>n.value=e},Oe(e),9,_o)),64)),Tn(Ri(`select`,{"onUpdate:modelValue":a[0]||=e=>r.value=e},[(Oi(),Ni(J,null,fr([`studio`,`soft`,`sunset`,`night`,`neon`],e=>Ri(`option`,{key:e,value:e},Oe(e),9,vo)),64))],512),[[to,r.value]]),Ri(`button`,{onClick:a[1]||=e=>i.value?.spin()},`spin`)])]))}})).mount(`#app`);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>badgecraft · Web Component</title>
|
|
7
|
+
<style>badge-craft{width:220px;height:220px}</style>
|
|
8
|
+
<script type="module" crossorigin src="./assets/element-CCTxyf61.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="./assets/badge-9Zq6e9Ht.js">
|
|
10
|
+
<link rel="stylesheet" crossorigin href="./assets/style-C2sJ2Xy3.css">
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<main>
|
|
14
|
+
<header>
|
|
15
|
+
<h1>Web Component</h1>
|
|
16
|
+
<p>Plain HTML, Svelte, Angular, Solid, Astro… anything that renders DOM.</p>
|
|
17
|
+
<nav><a href="./index.html">Gallery</a> · <a href="./studio.html">Studio</a> · <a href="./react.html">React</a> · <a href="./vue.html">Vue</a> · <a href="./element.html">Web Component</a></nav>
|
|
18
|
+
</header>
|
|
19
|
+
<div style="display: flex; gap: 24px; flex-wrap: wrap; align-items: center">
|
|
20
|
+
<badge-craft src="./logos/google.svg" alt="Google"></badge-craft>
|
|
21
|
+
<badge-craft metal="silver" frame="shield" base='{"preset":"onyx","color":"#14233f"}' alt="Inline icon">
|
|
22
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
|
23
|
+
<path d="M3 17l6-10 4 6 3-4 5 8z" />
|
|
24
|
+
<circle cx="17" cy="6" r="2" />
|
|
25
|
+
</svg>
|
|
26
|
+
</badge-craft>
|
|
27
|
+
<badge-craft src="./logos/apple.svg" metal='{"preset":"gold","roughness":0.12}' environment="night" relief='{"depth":0.06}'></badge-craft>
|
|
28
|
+
</div>
|
|
29
|
+
</main>
|
|
30
|
+
</body>
|
|
31
|
+
</html>
|