@tempots/beatui 0.25.0 → 0.27.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/dist/{2019-DrrKn54V.js → 2019-Cw6dbOsG.js} +2 -2
- package/dist/{2019-BGvIfJgi.cjs → 2019-DU48Szvf.cjs} +1 -1
- package/dist/{2020-CFnlLHs-.js → 2020-C4Shen9O.js} +2 -2
- package/dist/{2020-BK5C7IVQ.cjs → 2020-Cp1L6hfj.cjs} +1 -1
- package/dist/{ar-BgrUqaxG.js → ar-L29B4drg.js} +1 -1
- package/dist/ar-Xt0B1GBx.cjs +1 -0
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +443 -425
- package/dist/de-BBH6Q1uM.cjs +1 -0
- package/dist/{de-D_sdCcAw.js → de-BL9YMCWJ.js} +1 -1
- package/dist/es-3mljmytv.cjs +1 -0
- package/dist/{es-DczvLqEV.js → es-CS4u7MZp.js} +1 -1
- package/dist/fa-C06uowfA.cjs +1 -0
- package/dist/{fa-DhPP5Tgo.js → fa-_5IxCXGI.js} +1 -1
- package/dist/{fr-D3WwoeQg.js → fr-B-ZWm43Y.js} +1 -1
- package/dist/fr-ZoJsA1s0.cjs +1 -0
- package/dist/he-D-_HCjOB.cjs +1 -0
- package/dist/{he-CFhi-6Rs.js → he-J-Bcrgy9.js} +1 -1
- package/dist/hi-B9yNE6-J.cjs +1 -0
- package/dist/{hi-Cqy8JcS7.js → hi-ClGaIH71.js} +1 -1
- package/dist/{index-CvvASOCn.cjs → index-CLfb1616.cjs} +4 -4
- package/dist/{index-DkuGi1I_.js → index-DxiM_mmQ.js} +15 -15
- package/dist/{index-CNVCqpBH.cjs → index-NUMH-iWq.cjs} +1 -1
- package/dist/{index-BMX9_XgV.js → index-Nv9nZIgS.js} +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +274 -276
- package/dist/it-D-bh7RoG.cjs +1 -0
- package/dist/{it-CtMArqSp.js → it-Dv8tmKm5.js} +1 -1
- package/dist/ja-B4rdImcD.cjs +1 -0
- package/dist/{ja-UFqZT78C.js → ja-BpqiZN5f.js} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +1 -1
- package/dist/{ko-B5LB1_X_.js → ko-Bpa6y038.js} +1 -1
- package/dist/ko-C43-vhJF.cjs +1 -0
- package/dist/modal-DKWKUrDF.cjs +1 -0
- package/dist/{modal-C2Aa-aVN.js → modal-Fect9dc4.js} +1 -1
- package/dist/{nl-DCfHVqzQ.js → nl-B5HYWGRz.js} +1 -1
- package/dist/nl-DDjoZpiU.cjs +1 -0
- package/dist/{translations-GO9sIajX.js → notice-DKO4C8y2.js} +475 -376
- package/dist/{translations-DpZ-btu9.cjs → notice-DrmHRjLV.cjs} +2 -2
- package/dist/pl-CXYiY-nR.cjs +1 -0
- package/dist/{pl-UcTv39q1.js → pl-DksXqLHk.js} +1 -1
- package/dist/{pt-CXsgmVtb.js → pt-7-6UhRtW.js} +1 -1
- package/dist/pt-CnC1YN5K.cjs +1 -0
- package/dist/{ru-C0MvZW2g.js → ru-I676X0Bt.js} +1 -1
- package/dist/ru-_1DUTMUW.cjs +1 -0
- package/dist/{tr-CIIkc1uL.js → tr-CssmRZfH.js} +1 -1
- package/dist/tr-DA-8X7MK.cjs +1 -0
- package/dist/{translations-CB6iJ1Rn.js → translations-BBguPjg9.js} +1 -1
- package/dist/translations-CrqWcCGM.cjs +1 -0
- package/dist/ur-B1YkWWDx.cjs +1 -0
- package/dist/{ur-Cpx9oyTV.js → ur-BCWL2ev1.js} +1 -1
- package/dist/utils-ClYvMRfA.cjs +1 -0
- package/dist/{notice-wSAzLfbl.js → utils-DU4oGQiY.js} +647 -746
- package/dist/{vi-D24AUQ01.js → vi-D5K4x_hN.js} +1 -1
- package/dist/vi-DA-qqgHJ.cjs +1 -0
- package/dist/zh-B4HcAg-5.cjs +1 -0
- package/dist/{zh-25YFRjoV.js → zh-HUwi9F-w.js} +1 -1
- package/package.json +3 -3
- package/dist/ar-BAb4yHZS.cjs +0 -1
- package/dist/de-Dn2CdXgD.cjs +0 -1
- package/dist/es-CEPxKSog.cjs +0 -1
- package/dist/fa-NvkKjIQ6.cjs +0 -1
- package/dist/fr-cR59lx1A.cjs +0 -1
- package/dist/he-CxSHPJMg.cjs +0 -1
- package/dist/hi-DLnz3lCX.cjs +0 -1
- package/dist/it-C7Kv6j-_.cjs +0 -1
- package/dist/ja-BPL80aw5.cjs +0 -1
- package/dist/ko-Cmt_34Xp.cjs +0 -1
- package/dist/modal-UsqvSvHy.cjs +0 -1
- package/dist/nl-B-WL9SX2.cjs +0 -1
- package/dist/notice-DyoWY5tY.cjs +0 -1
- package/dist/pl-TGqkSi2w.cjs +0 -1
- package/dist/pt-Ua_e-1JE.cjs +0 -1
- package/dist/ru-9YWCN6fR.cjs +0 -1
- package/dist/tr-D70Oy8aN.cjs +0 -1
- package/dist/translations-NYxsXjMT.cjs +0 -1
- package/dist/ur-DmxXuJ9O.cjs +0 -1
- package/dist/vi-Cboo_ueb.cjs +0 -1
- package/dist/zh-BXivX7rD.cjs +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const r=require("@tempots/dom"),$=require("@tempots/ui"),Q=require("./colors-Qc1mmmfr.cjs");function F(e,{units:t=["B","KB","MB","GB","TB"],decimalPlaces:n=0,locale:s}={}){if(e===0||e===0n)return new Intl.NumberFormat(s,{style:"unit",unit:"byte",unitDisplay:"short",maximumFractionDigits:0}).format(0).replace("byte",t[0]);let a,o;if(typeof e=="bigint"){let c=e<0n?-e:e;for(a=0;c>=1024n&&a<t.length-1;)c=c/1024n,a++;o=Number(e)/Math.pow(1024,a)}else a=Math.floor(Math.log(Math.abs(e))/Math.log(1024)),a=Math.min(a,t.length-1),o=e/Math.pow(1024,a);return new Intl.NumberFormat(s,{style:"unit",unit:"byte",unitDisplay:"short",minimumFractionDigits:a===0?0:n,maximumFractionDigits:a===0?0:n}).format(o).replace("byte",t[a])}const Y=new Map;function R(e){const t=Y.get(e)??0;return Y.set(e,t+1),`${e}-${t}`}const v={notAsked:{type:"NotAsked"},loading(e=void 0){return{type:"Loading",previousValue:e}},success(e){return{type:"AsyncSuccess",value:e}},failure(e){return{type:"AsyncFailure",error:e}},isSuccess(e){return e.type==="AsyncSuccess"},isFailure(e){return e.type==="AsyncFailure"},isNotAsked(e){return e.type==="NotAsked"},isLoading(e){return e.type==="Loading"},getOrElse(e,t){return v.isSuccess(e)?e.value:t},getOrElseLazy(e,t){return v.isSuccess(e)?e.value:t()},getOrNull(e){return v.isSuccess(e)?e.value:null},getOrUndefined(e){return v.isSuccess(e)?e.value:void 0},getUnsafe:e=>{if(v.isSuccess(e))return e.value;throw v.isFailure(e)?e.error:new Error("Cannot get value from a not-asked or loading result")},match:(e,{success:t,failure:n,loading:s,notAsked:a=s})=>v.isSuccess(e)?t(e.value):v.isFailure(e)?n(e.error):v.isNotAsked(e)?a():s(e.previousValue),whenSuccess:(e,t)=>(v.isSuccess(e)&&t(e.value),e),whenFailure:(e,t)=>(v.isFailure(e)&&t(e.error),e),equals:(e,t,n={valueEquals:(s,a)=>s===a,errorEquals:(s,a)=>s===a})=>e.type==="AsyncSuccess"&&t.type==="AsyncSuccess"?n.valueEquals(e.value,t.value):e.type==="AsyncFailure"&&t.type==="AsyncFailure"?n.errorEquals(e.error,t.error):e.type==="Loading"&&t.type==="Loading"?n.valueEquals(e.previousValue,t.previousValue):e.type==="NotAsked"&&t.type==="NotAsked",all:e=>{const t=[];for(const n of e)if(v.isSuccess(n))t.push(n.value);else return n;return v.success(t)},ofPromise:async e=>{try{const t=await e;return v.success(t)}catch(t){return v.failure(t instanceof Error?t:new Error(String(t)))}}},E=(e,t)=>e===t||e!==e&&t!==t,y={valid:{type:"valid"},invalid(e){return{type:"invalid",error:e}},isValid(e){return e.type==="valid"},isInvalid(e){return e.type==="invalid"},match:(e,t,n)=>y.isValid(e)?t():n(e.error),toResult:(e,t)=>y.match(e,()=>m.success(t),n=>m.failure(n)),whenValid:(e,t)=>(y.isValid(e)&&t(),e),whenInvalid:(e,t)=>(y.isInvalid(e)&&t(e.error),e)},m={success(e){return{type:"Success",value:e}},failure(e){return{type:"Failure",error:e}},map:(e,t)=>e.type==="Success"?m.success(t(e.value)):e,flatMap:(e,t)=>e.type==="Success"?t(e.value):e,toAsync(e){return m.match(e,t=>v.success(t),t=>v.failure(t))},toValidation(e){return m.match(e,()=>y.valid,t=>y.invalid(t))},isSuccess(e){return e.type==="Success"},isFailure(e){return e.type==="Failure"},getOrElse(e,t){return m.isSuccess(e)?e.value:t},getOrElseLazy(e,t){return m.isSuccess(e)?e.value:t()},getOrNull(e){return m.isSuccess(e)?e.value:null},getOrUndefined(e){return m.isSuccess(e)?e.value:void 0},getUnsafe:e=>{if(m.isSuccess(e))return e.value;throw e.error},match:(e,t,n)=>m.isSuccess(e)?t(e.value):n(e.error),whenSuccess:(e,t)=>(m.isSuccess(e)&&t(e.value),e),whenFailure:(e,t)=>(m.isFailure(e)&&t(e.error),e),combine:(e,t,n,s)=>m.match(e,a=>m.match(t,o=>m.success(n(a,o)),o=>m.failure(o)),a=>m.match(t,o=>m.failure(a),o=>m.failure(s(a,o)))),equals:(e,t,n={valueEquals:(s,a)=>s===a,errorEquals:(s,a)=>s===a})=>e.type==="Success"&&t.type==="Success"?n.valueEquals(e.value,t.value):e.type==="Failure"&&t.type==="Failure"?n.errorEquals(e.error,t.error):!1,all:e=>{const t=[];for(const n of e)if(m.isSuccess(n))t.push(n.value);else return n;return m.success(t)}},Z={loadingExtended:"Loading, please wait",loadingShort:"Loading...",locale:"Locale",iconDescription:"Icon",loadingIcon:"Loading icon",failedToLoadIcon:"Failed to load icon",editLabel:"Edit",selectOne:"Select one",selectMany:"Select many",noResults:"No results",passwordPlaceholderText:"Secret Password",togglePasswordVisibility:"Toggle password visibility",toggleMenu:"Toggle menu",toggleAside:"Toggle aside",mainNavigation:"Main navigation",sidebar:"Sidebar",closeDrawer:"Close drawer",closeModal:"Close modal",confirm:"Confirm",cancel:"Cancel",addLabel:"Add",removeItem:"Remove item",currentLocale:"English",ar:"Arabic",de:"German",en:"English",es:"Spanish",fr:"French",hi:"Hindi",it:"Italian",ja:"Japanese",ko:"Korean",nl:"Dutch",pl:"Polish",pt:"Portuguese",ru:"Russian",tr:"Turkish",vi:"Vietnamese",zh:"Chinese",he:"Hebrew",fa:"Persian",ur:"Urdu",emailPlaceholderText:"Enter your email",incrementValue:"Increment value",decrementValue:"Decrement value",dropZoneInstructions:e=>e?"Click to choose or drag files here, or press Enter or Space to open file selector":"Drag files here",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Remove file",clearAllFiles:"Clear all files",clearValue:"Reset",unknownType:"Unknown type",filesInputInstructions:(e,t,n)=>{let s=e==null||e>1?"Click to choose or drag files here":"Click to choose or drag a file here";if(e||t){const a=[];if(e!=null&&e>1&&a.push(`up to ${e} files`),t&&n){const o=F(t,{units:n});a.push(`max ${o} each`)}a.length>0&&(s+=` (${a.join(", ")})`)}else if(t&&n){const a=F(t,{units:n});s+=` (max ${a})`}return s}},Ee=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"})),X=Z,ee="en",te=(e,t,n)=>{const s=e[t];return s?typeof s=="function"?s():Promise.resolve(s):new Promise((a,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},Ve=new Set(["ar","he","fa","ur","ps","sd","ku","dv","yi","ji","iw","in"]);function W(e){if(!e)return"ltr";const t=e.split(/[-_]/)[0].toLowerCase();return Ve.has(t)?"rtl":"ltr"}function re(e,t){return e==="auto"?W(t):e}function Oe(e){return`b-${e}`}function _e(e){return W(e)==="rtl"}function Le(e){return e==="ltr"?"rtl":"ltr"}const ne={ltr:{"inline-start":"left","inline-end":"right","block-start":"top","block-end":"bottom"},rtl:{"inline-start":"right","inline-end":"left","block-start":"top","block-end":"bottom"}};function Te(e,t){return ne[t][e]}const se={mark:r.makeProviderMark("Locale"),create:e=>{const t=r.localStorageProp({defaultValue:navigator.language??"en-US",key:"beatui-locale"}),n=r.localStorageProp({defaultValue:"auto",key:"beatui-direction-preference"}),s=r.computedOf(t,n)((o,i)=>re(i,o));return{value:{locale:t,setLocale:o=>t.set(o),direction:s,directionPreference:n,setDirectionPreference:o=>n.set(o)},dispose:()=>{t.dispose(),n.dispose(),s.dispose()}}}},{variants:Me,special:Ae,overrides:H}=Q.backgroundConfig;function V(e,t){switch(e){case"white":return"var(--color-white)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return Q.getColorVar(e,t)}}function ae(e,t){const n=Ae[e];if(!n)return;if(t==="light")return n;const s=H[e];return s?s[t]:n}function D(e,t,n){const s=H[e];if(s){const o=s[n];if(o)return{backgroundColor:o.backgroundColor,textColor:o.color}}if(t==="solid"){const o=ae(e,n);if(o)return{backgroundColor:o.backgroundColor,textColor:o.color}}const a=Me[t][n];return{backgroundColor:V(e,a.bgShade),textColor:a.textColor}}const Be={light:{shade:600,textColor:"var(--color-white)"},dark:{shade:600,textColor:"var(--text-inverted-dark)"}},qe={light:{shade:300,textColor:"var(--text-normal-light)"},dark:{shade:700,textColor:"var(--text-normal-dark)"}},$e={light:{shade:400,textColor:"var(--text-normal-light)"},dark:{shade:600,textColor:"var(--text-normal-dark)"}};function x(e,t,n){const s=H[e];if(s){const o=s[n];if(o)return{backgroundColor:o.backgroundColor,textColor:o.color}}if(t==="solid"){const o=ae(e,n);if(o)return{backgroundColor:o.backgroundColor,textColor:o.color};const i=Be[n];return{backgroundColor:V(e,i.shade),textColor:i.textColor}}const a=t==="light"?qe[n]:$e[n];return{backgroundColor:V(e,a.shade),textColor:a.textColor}}function j(e,t){const n=t==="light"?500:600;switch(e){case"white":return t==="light"?"var(--text-inverse-light)":"var(--text-inverted-dark)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return V(e,n)}}function P(e,t){return e==="white"?"var(--color-white)":e==="black"?"var(--color-black)":e==="transparent"?"inherit":V(e,t==="light"?800:200)}function J(e,t,n){return t==="soft"?V(e,n==="light"?300:700):V(e,n==="light"?500:600)}const Fe="bui-icons",M=new Map,U=(()=>{try{return typeof indexedDB<"u"&&indexedDB!==null}catch{return!1}})();function je(){return U?new Promise((e,t)=>{const n=indexedDB.open(Fe,1);n.onupgradeneeded=function(s){const a=s.target.result;a.objectStoreNames.contains("icons")||a.createObjectStore("icons")},n.onsuccess=function(){e(n.result)},n.onerror=function(){t(n.error)}}):Promise.reject(new Error("IndexedDB not available"))}const A=U?je():null;function oe(e,t){return new Promise(async(n,s)=>{try{if(A){const o=(await A).transaction("icons","readwrite");o.objectStore("icons").put(t,e),o.oncomplete=n,o.onerror=s}else M.set(e,t),n(void 0)}catch{M.set(e,t),n(void 0)}})}function ie(e){return new Promise(async(t,n)=>{try{if(A){const i=(await A).transaction("icons","readonly").objectStore("icons").get(e);i.onsuccess=function(){t(i.result)},i.onerror=n}else t(M.get(e)||null)}catch{t(M.get(e)||null)}})}async function Ne(e){const t=`https://api.iconify.design/${e}.svg`;return fetch(t).then(n=>{if(n.status===200)return n.text();throw new Error(`Failed to load icon: ${e}`)})}async function Re(e){const t=e.replace(":","/"),n=await ie(t);if(n)return n;const s=await Ne(t);return await oe(t,s),s}function We(e){return["bc-icon",`bc-icon--${e}`].join(" ")}function He(e,t="solid"){if(!e)return"";const n=J(e,t,"light"),s=J(e,t,"dark");return`--icon-color: ${n}; --icon-color-dark: ${s}`}function O({icon:e,size:t="md",color:n,title:s,accessibility:a="auto",tone:o="solid"},...i){const l=r.computedOf(a,s)((c,d)=>c==="decorative"?!1:c==="informative"?!0:d!=null&&d!=="");return r.Use(_,c=>r.html.span(r.attr.class(r.computedOf(t,n)(d=>We(d??"md"))),r.attr.style(r.computedOf(n,o)((d,u)=>He(d??void 0,u??"solid"))),r.When(l,()=>r.Fragment(r.attr.role("img"),r.aria.label(r.coalesce(s,c.$.iconDescription))),()=>r.aria.hidden(!0)),$.WhenInViewport({once:!0},()=>$.Query({request:e,load:({request:d})=>Re(d),convertError:String,success:({value:d})=>r.html.span(r.style.width("100%"),r.style.height("100%"),r.attr.innerHTML(d)),pending:()=>r.html.span(r.attr.class("animate-spin"),r.When(l,()=>r.Fragment(r.attr.role("img"),r.aria.label(c.$.loadingIcon)),()=>r.aria.hidden(!0)),"↻"),failure:({error:d})=>r.html.span(r.attr.title(d),r.attr.class("text-red-500"),r.When(l,()=>r.Fragment(r.attr.role("img"),r.aria.label(c.$.failedToLoadIcon)),()=>r.aria.hidden(!0)),"🚫")})),...i))}function le(e,t,n){const s=["bc-button",`bc-button--size-${e}`,`bc-control--padding-${e}`,`bc-control--rounded-${t}`];return n&&s.push("bc-button--loading"),s.join(" ")}function ce(e,t,n){const s=new Map;s.set("--button-text-shadow","var(--text-shadow-none)"),s.set("--button-text-shadow-dark","var(--text-shadow-none)");const a=(o,i,l,c)=>{n||(s.set("--button-bg-hover",o),s.set("--button-text-hover",l),s.set("--button-bg-hover-dark",i),s.set("--button-text-hover-dark",c))};switch(e){case"filled":{const o=D(t,"solid","light"),i=D(t,"solid","dark");s.set("--button-bg",o.backgroundColor),s.set("--button-text",o.textColor),s.set("--button-bg-dark",i.backgroundColor),s.set("--button-text-dark",i.textColor),s.set("--button-text-shadow","var(--text-shadow-button-filled, var(--text-shadow-sm))"),s.set("--button-text-shadow-dark","var(--text-shadow-button-filled, var(--text-shadow-sm))");const l=x(t,"solid","light"),c=x(t,"solid","dark");a(l.backgroundColor,c.backgroundColor,l.textColor,c.textColor);break}case"light":{const o=D(t,"light","light"),i=D(t,"light","dark");s.set("--button-bg",o.backgroundColor),s.set("--button-text",o.textColor),s.set("--button-bg-dark",i.backgroundColor),s.set("--button-text-dark",i.textColor);const l=x(t,"light","light"),c=x(t,"light","dark");a(l.backgroundColor,c.backgroundColor,l.textColor,c.textColor);break}case"outline":{s.set("--button-bg","transparent"),s.set("--button-bg-dark","transparent"),s.set("--button-border",j(t,"light")),s.set("--button-border-dark",j(t,"dark")),s.set("--button-text",P(t,"light")),s.set("--button-text-dark",P(t,"dark")),s.set("--button-text-shadow","var(--text-shadow-button-light, var(--text-shadow-xs))"),s.set("--button-text-shadow-dark","var(--text-shadow-button-light, var(--text-shadow-xs))");const o=x(t,"light","light"),i=x(t,"light","dark");a(o.backgroundColor,i.backgroundColor,o.textColor,i.textColor);break}case"default":{const o=D("neutral","light","light"),i=D("neutral","light","dark");s.set("--button-bg",o.backgroundColor),s.set("--button-text",P(t,"light")),s.set("--button-bg-dark",i.backgroundColor),s.set("--button-text-dark",P(t,"dark")),s.set("--button-text-shadow","var(--text-shadow-button-default, var(--text-shadow-2xs))"),s.set("--button-text-shadow-dark","var(--text-shadow-button-default, var(--text-shadow-2xs))");const l=x("base","light","light"),c=x("base","light","dark");a(l.backgroundColor,c.backgroundColor,s.get("--button-text")??o.textColor,s.get("--button-text-dark")??i.textColor);break}case"text":{s.set("--button-bg","transparent"),s.set("--button-bg-dark","transparent"),s.set("--button-text",P(t,"light")),s.set("--button-text-dark",P(t,"dark")),n||s.set("--button-hover-decoration","underline");break}}return Array.from(s.entries()).map(([o,i])=>`${o}: ${i}`).join("; ")}function ue({type:e="button",disabled:t,loading:n,variant:s="filled",size:a="md",color:o="base",roundedness:i="sm",onClick:l=()=>{}},...c){const d=r.prop(null);return r.Use(_,u=>r.html.button(r.attr.type(e),r.attr.disabled(r.computedOf(t,n)((h,f)=>h||f)),r.aria.busy(n??!1),r.When(n??!1,()=>r.aria.label(u.$.loadingExtended)),r.attr.class(r.computedOf(a,i,n)((h,f,b)=>le(h??"md",f??"sm",b))),r.attr.style(r.computedOf(s,o,t)((h,f,b)=>ce(h??"filled",f??"base",b))),r.When(n??!1,()=>r.Fragment(r.style.width(d.map(h=>h==null?"":`${h.width}px`)),r.style.height(d.map(h=>h==null?"":`${h.height}px`)),O({icon:"line-md:loading-twotone-loop",size:a??"md"}),r.html.span(r.attr.class("sr-only"),r.aria.live("polite"),u.$.loadingExtended)),()=>r.Fragment(r.on.click(l),...c)),r.When(n!=null,()=>$.ElementRect(h=>r.OnDispose(h.on(f=>{r.Value.get(n??!1)||d.set(f)}))))))}function Ue({size:e="sm",icon:t="line-md:close",disabled:n,roundedness:s="full",color:a="base",onClick:o,label:i},...l){return r.Use(_,c=>{const d=r.coalesce(i,c.$.closeModal);return ue({variant:"text",size:e,roundedness:s,disabled:n,color:a,onClick:o},r.attr.title(d),r.aria.label(d),...l,O({icon:t,size:e??"sm"}))})}function ze(e,t,n){const s=[e?"bc-base-input-container":"bc-input-container"];return t?s.push(e?"bc-base-input-container--disabled":"bc-input-container--disabled"):s.push(e?"bc-base-input-container--default":"bc-input-container--default"),n&&s.push("bc-input-container--error"),s.join(" ")}const T=({baseContainer:e,disabled:t,input:n,before:s,after:a,hasError:o,focusableSelector:i="input, select, textarea",growInput:l=!0},...c)=>{const d=r.Value.map(t??!1,u=>u);return r.html.div(r.WithElement(u=>{const h=()=>{u.querySelector(i)?.focus()};return u.addEventListener("click",h),r.OnDispose(()=>u.removeEventListener("click",h))}),r.attr.class(r.computedOf(e,d,o??!1)((u,h,f)=>ze(u??!1,h??!1,f??!1))),s!=null?r.html.span(r.attr.class("bc-input-container__before"),s):null,r.html.div(r.attr.class("bc-input-container__input"),r.attr.class(r.Value.map(l,u=>u?"bc-input-container__input--grow":"")),n),a!=null?r.html.span(r.attr.class("bc-input-container__after"),a):null,...c)};function B(e){return`bc-label bc-label--${e}`}const Ge=(...e)=>r.html.span(r.attr.class(B("emphasis")),...e),de=(...e)=>r.html.span(r.attr.class(B("default")),...e),he=(...e)=>r.html.span(r.attr.class(B("muted")),...e),Ke=(...e)=>r.html.span(r.attr.class(B("danger")),...e),Ye=e=>{const{value:t,onBlur:n,onChange:s,placeholder:a,disabled:o,id:i,checkedIcon:l,uncheckedIcon:c,iconSize:d="lg"}=e,u=i??R("checkbox"),h=`${u}-label`,f=()=>{if(r.Value.get(o??!1))return;const p=r.Value.get(t);s?.(!p)},b=p=>{r.Value.get(o??!1)||(p.key===" "||p.key==="Enter")&&(p.preventDefault(),f())};return T({baseContainer:!0,growInput:!1,...e,input:r.html.span(r.attr.class("bc-checkbox-input"),r.html.span(r.attr.class("bc-checkbox-input__checkbox"),r.attr.class(r.Value.map(t,p=>p?"bc-checkbox-input__checkbox--checked":"bc-checkbox-input__checkbox--unchecked")),r.attr.class(r.Value.map(o??!1,p=>p?"bc-checkbox-input__checkbox--disabled":"")),r.attr.id(u),r.attr.role("checkbox"),r.attr.tabindex(r.Value.map(o??!1,p=>p?-1:0)),r.aria.checked(t),r.aria.disabled(o),a!=null?r.aria.labelledby(h):r.Empty,r.on.keydown(b),n!=null?r.on.blur(n):r.Empty,O({icon:r.computedOf(t,l,c)((p,g,k)=>p?g??"akar-icons/check-box-fill":k??"akar-icons/box"),accessibility:"decorative",size:d})),a!=null?r.html.label(r.attr.class("bc-checkbox-input__label"),r.attr.id(h),r.attr.for(u),he(a)):r.Empty)},r.on.click(f))},q=({autocomplete:e,autofocus:t,class:n,disabled:s,name:a,placeholder:o,id:i,required:l,hasError:c})=>r.Fragment(r.attr.autocomplete(e),r.attr.autofocus(t),r.attr.class(n),r.attr.disabled(s),r.attr.name(a??i),r.attr.placeholder(o),r.attr.id(i),r.aria.required(l),c!=null?r.aria.invalid(c??!1):null),pe=r.html.span(r.attr.class("bc-input-wrapper__required")," *");function Je(e){const t=["bc-input-wrapper"];return e&&t.push("bc-input-wrapper--horizontal"),t.join(" ")}function Qe(e,t){const n=["bc-input-wrapper__label-text"];return e?n.push("bc-input-wrapper__label-text--error"):t?n.push("bc-input-wrapper__label-text--disabled"):n.push("bc-input-wrapper__label-text--default"),n.join(" ")}const z=({required:e,label:t,labelChildren:n,context:s,description:a,content:o,error:i,labelFor:l,hasError:c,disabled:d,horizontal:u},...h)=>{const f=c??i!=null,b=d??!1,p=u??!1,g=R("input-wrapper"),k=a?`${g}-description`:void 0,C=i!=null?`${g}-error`:void 0;return r.html.div(r.attr.class(r.Value.map(p,w=>Je(w))),t!=null||s!=null?r.html.div(r.attr.class("bc-input-wrapper__header"),r.html.div(r.attr.class("bc-input-wrapper__label-section"),r.html.label(r.attr.class("bc-input-wrapper__label"),l!=null?r.attr.for(l):r.Empty,r.html.span(r.attr.class(r.computedOf(f,b)((w,I)=>Qe(w??!1,I??!1))),t),t!=null&&e?pe:r.Empty),r.When(r.computedOf(p,a)((w,I)=>w&&I!=null),()=>r.html.div(r.attr.class("bc-input-wrapper__description bc-input-wrapper__description--under-label"),r.attr.id(k),a))),s!=null?de(s):r.Empty,n):r.Empty,r.html.div(r.attr.class("bc-input-wrapper__content"),[k,C].filter(Boolean).length>0?r.dataAttr.describedby([k,C].filter(Boolean).join(" ")):r.Empty,e?r.dataAttr.required("true"):r.Empty,r.When(f,()=>r.dataAttr.invalid("true")),o),r.When(r.computedOf(p,a)((w,I)=>!w&&I!=null),()=>r.html.div(r.attr.class("bc-input-wrapper__description"),r.attr.id(k),a)),i!=null?r.When(f,()=>r.html.div(r.attr.class("bc-input-wrapper__error"),r.attr.id(C),r.aria.live("polite"),r.attr.role("alert"),i)):null,...h)};function Ze(...e){return r.html.div(r.attr.class("bc-stack"),...e)}const Xe=e=>{const t={name:"email",autocomplete:"email",...e},{value:n,before:s,onBlur:a,onChange:o,onInput:i,placeholder:l}=t,c=s??O({icon:"line-md:email",size:"sm",color:"neutral"});return r.Use(_,d=>T({...e,before:c,input:r.input.email(q(t),r.attr.placeholder(r.coalesce(l,d.$.emailPlaceholderText)),r.attr.value(n),r.attr.class("bc-input"),a!=null?r.on.blur(r.emitValue(a)):r.Empty,o!=null?r.on.change(r.emitValue(o)):r.Empty,i!=null?r.on.input(r.emitValue(i)):r.Empty)}))},et=e=>{const{value:t,onBlur:n,onChange:s,onInput:a}=e;return T({...e,input:r.input.text(q(e),r.attr.value(t),r.attr.class("bc-input"),n!=null?r.on.blur(r.emitValue(n)):r.Empty,s!=null?r.on.change(r.emitValue(s)):r.Empty,a!=null?r.on.input(r.emitValue(a)):r.Empty)})},tt=e=>{const{value:t,onBlur:n,onChange:s,onInput:a,before:o,after:i,hasError:l,disabled:c,autocomplete:d,placeholder:u,...h}=e,f={name:"password",disabled:c,...h},b=r.prop(!0),p=r.computedOf(b,d)((g,k)=>g?k??"current-password":"off");return r.Use(_,g=>{const k=r.computedOf(g.$.passwordPlaceholderText,b,u)((w,I,Pe)=>I?"•••••••••••••••":Pe??w),C=r.html.button(r.attr.class("bc-input-container__password-toggle"),r.aria.label(g.$.togglePasswordVisibility),r.on.click(()=>b.update(w=>!w)),r.When(b,()=>O({icon:"line-md:watch"}),()=>O({icon:"line-md:watch-off"})));return T({before:o,disabled:c,hasError:l,input:r.html.input(q({...f,autocomplete:p,placeholder:k}),r.When(b,()=>r.Fragment(r.attr.type("password")),()=>r.Fragment(r.attr.type("text"))),r.attr.class("bc-input"),r.attr.value(t),n!=null?r.on.blur(r.emitValue(n)):r.Empty,s!=null?r.on.change(r.emitValue(s)):r.Empty,a!=null?r.on.input(r.emitValue(a)):r.Empty),after:i!=null?r.Fragment(C,i):C})})},fe=(e,t)=>()=>{e.markTouched(),t?.()},me=(e,t)=>n=>{e.change(n),t?.(n)};function G(e,t){const{controller:n,onBlur:s,onChange:a,...o}=t;return e({id:n.name,disabled:n.disabled,value:n.value,hasError:n.errorVisible,...o,onChange:me(n,a),onBlur:fe(n,s)})}function rt(e,t,...n){return z({...t,content:G(e,t)},...n)}function be(e,t){const{toInput:n,fromInput:s,controller:a,...o}=t,i=a.transform(n,s);return G(e,{...o,controller:i})}function nt(e,t,...n){return z({...t,content:be(e,t)},...n)}function st(e){return e.split(".").map(n=>{const s=n.match(/^\[(\d+)\]$/);return s?Number(s[1]):n})}function ge(e){return typeof e=="number"?`[${e}]`:`.${e}`}function ve(e){if(e.length===0)return"";const[t,...n]=e;return[typeof t=="number"?`[${t}]`:t,...n.map(ge)].join("")}function L(e){return function(n){if(n.type==="valid")return n;let s=n.error;for(const a of e)if(s=s?.dependencies?.[a],s==null)return y.valid;return y.invalid(s)}}class S{path;change;value;status;error;hasError;touched;errorVisible;dirty;dependencyErrors;#e={disabled:r.prop(!1),touched:r.prop(!1)};#r;#t=r.prop(void 0);parent;disabled;#n=[];disabledOrHasErrors;constructor(t,n,s,a,o,i=E){this.path=t,this.change=n,this.value=s,this.status=a,this.#r=i,this.#t.set(s.value),this.error=a.map(l=>l?.type==="invalid"?l.error?.message:void 0),this.hasError=this.error.map(l=>l!=null),this.touched=this.#e.touched,o.validationMode?this.errorVisible=r.computedOf(this.hasError,this.touched,o.validationMode)((l,c,d)=>d==="continuous"?!!l:!!l&&!!c):this.errorVisible=r.computedOf(this.hasError,this.touched)((l,c)=>!!l&&!!c),this.dirty=r.computedOf(this.value,this.#t)((l,c)=>!this.#r(l,c)),this.dependencyErrors=a.map(l=>l?.type==="invalid"?l.error?.dependencies:void 0),this.parent=o,this.disabled=r.computedOf(this.#e.disabled,o.disabled)((l,c)=>l||c),this.disabledOrHasErrors=r.computedOf(this.disabled,this.hasError)((l,c)=>l||c),this.onDispose(()=>{this.#e.disabled.dispose(),this.#e.touched.dispose(),this.disabled.dispose(),this.error.dispose(),this.errorVisible.dispose(),this.dirty.dispose(),this.#t.dispose(),this.dependencyErrors.dispose(),this.disabledOrHasErrors.dispose()})}get name(){return ve(this.path)}onDispose=t=>{this.#n.push(t)};dispose=()=>{for(const t of this.#n)try{t()}catch(n){console.error("Error in dispose callback:",n)}this.#n.length=0};setDisabled=t=>{this.#e.disabled.set(t)};disable=()=>this.setDisabled(!0);enable=()=>this.setDisabled(!1);markTouched=()=>{this.#e.touched.set(!0)};resetTouched=()=>{this.#e.touched.set(!1)};markPristine=()=>{this.#t.set(this.value.value)};reset=()=>{this.change(this.#t.value)};array=(t=E)=>new ke(this.path,this.change,this.value,this.status,this.parent,t);object=(t=E)=>new ye(this.path,this.change,this.value,this.status,this.parent,t);transform=(t,n,s=[],a=E)=>new S([...this.path,...s],o=>this.change(n(o)),this.value.map(t,a),this.status.map(L(s)),this.parent,a);asyncTransform=(t,n,s,a=[],o=E)=>new S([...this.path,...a],i=>{n(i).then(l=>this.change(l))},this.value.mapAsync(t,s,void 0,o),this.status.map(L(a)),this.parent,o)}class ye extends S{#e=new Map;#r=new Map;#t=new Map;#n=r.prop(!1);touchedDeep=this.#n;#a=new Map;#s=new Map;#i=r.prop(!1);dirtyDeep=this.#i;#c;#u;#l=()=>{let t=!1;for(const n of this.#r.values())if(n){t=!0;break}this.#n.set(this.touched.value||t)};constructor(t,n,s,a,o,i){super(t,n,s.map(c=>c??{},i),a,o,i),this.#c=this.touched.on(()=>{this.#l()}),this.#u=this.dirty.on(()=>{this.#o()});const l=this.value.on(()=>this.#o());this.onDispose(()=>{for(const c of this.#e.values())c.dispose();this.#e.clear();for(const c of this.#t.values())c();this.#t.clear(),this.#r.clear(),this.#n.dispose();for(const c of this.#s.values())c();this.#s.clear(),this.#a.clear(),this.#i.dispose(),this.#c(),this.#u(),l()})}field=t=>{if(this.#e.has(t))return this.#e.get(t);const n=async i=>{this.change({...this.value.value,[t]:i})},s=new S([...this.path,t],n,this.value.map(i=>i[t]),this.status.map(L([t])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e.set(t,s);const a=s.touched.on(i=>{this.#r.set(t,i),this.#l()});this.#t.set(t,a);const o=s.dirty.on(i=>{this.#a.set(t,i),this.#o()});return this.#s.set(t,o),s};markAllTouched=()=>{this.markTouched();const t=this.value.value;for(const n of Object.keys(t))this.field(n).markTouched();for(const n of this.#e.values())n.markTouched()};markAllPristine=()=>{this.markPristine();const t=this.value.value;for(const n of Object.keys(t))this.field(n).markPristine?.();for(const n of this.#e.values())n.markPristine?.()};#o=()=>{let t=!1;for(const n of this.#a.values())if(n){t=!0;break}this.#i.set(this.dirty.value||t)}}class ke extends S{#e=new Array;length;#r=new Map;#t=new Map;#n=r.prop(!1);touchedDeep=this.#n;#a=new Map;#s=new Map;#i=r.prop(!1);dirtyDeep=this.#i;#c;#u;#l=()=>{let t=!1;for(const n of this.#r.values())if(n){t=!0;break}this.#n.set(this.touched.value||t)};constructor(t,n,s,a,o,i){const l=s.map(u=>u??[],i);super(t,n,l,a,o,i);const c=l.on(u=>{const h=this.#e.length-u.length;h>0&&(this.#e.splice(u.length,h).forEach((f,b)=>{const p=u.length+b;f.dispose(),this.#t.get(p)?.(),this.#t.delete(p),this.#r.delete(p),this.#s.get(p)?.(),this.#s.delete(p),this.#a.delete(p)}),this.#l(),this.#o())});this.length=l.map(u=>u.length),this.#c=this.touched.on(()=>{this.#l()}),this.#u=this.dirty.on(()=>{this.#o()});const d=this.value.on(()=>this.#o());this.onDispose(()=>{for(const u of this.#e)u.dispose();this.length.dispose(),this.#e.length=0,c(),l.dispose();for(const u of this.#t.values())u();this.#t.clear(),this.#r.clear(),this.#n.dispose();for(const u of this.#s.values())u();this.#s.clear(),this.#a.clear(),this.#i.dispose(),this.#c(),this.#u(),d()})}item=t=>{if(this.#e[t])return this.#e[t];const n=async i=>{const l=this.value.value.slice();l[t]=i,this.change(l)},s=new S([...this.path,t],n,this.value.map(i=>i[t]),this.status.map(L([t])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e[t]=s;const a=s.touched.on(i=>{this.#r.set(t,i),this.#l()});this.#t.set(t,a);const o=s.dirty.on(i=>{this.#a.set(t,i),this.#o()});return this.#s.set(t,o),s};push=(...t)=>{this.change([...this.value.value,...t])};pop=()=>{this.splice(this.value.value.length-1,1)};shift=()=>{this.splice(0,1)};unshift=(...t)=>{this.change([...t,...this.value.value])};removeAt=t=>{this.splice(t,1)};splice=(t,n)=>{const s=this.value.value.slice();s.splice(t,n),this.change(s)};move=(t,n,s=1)=>{if(s<1||t===n)return;const a=this.value.value.slice(),o=a.splice(t,s);a.splice(n,0,...o),this.change(a)};markAllTouched=()=>{this.markTouched();const t=this.value.value.length;for(let n=0;n<t;n++)this.item(n).markTouched()};markAllPristine=()=>{this.markPristine();const t=this.value.value.length;for(let n=0;n<t;n++)this.item(n).markPristine?.()};#o=()=>{let t=!1;for(const n of this.#a.values())if(n){t=!0;break}this.#i.set(this.dirty.value||t)}}function we(e){function t(n){return typeof n=="number"?n:n.toString()}return e.map(n=>typeof n=="object"&&n.key!=null?t(n.key):t(n))}function Ce(e){const t=e.filter(a=>a.path==null||a.path.length===0).map(a=>a.message),n=e.filter(a=>a.path!=null&&a.path.length>0).reduce((a,o)=>{const i=we(o.path),l=i.pop();let c=a;for(const d of i)c.dependencies==null&&(c.dependencies={}),c.dependencies[d]==null&&(c.dependencies[d]={}),c=c.dependencies[d];return c.dependencies==null&&(c.dependencies={}),c.dependencies[l]={message:o.message},a},{}),s=t.join(`
|
|
2
|
-
`);return{...n,message:s!=""?s:void 0}}function
|
|
1
|
+
"use strict";const r=require("@tempots/dom"),q=require("@tempots/ui"),Q=require("./colors-Qc1mmmfr.cjs");function F(e,{units:t=["B","KB","MB","GB","TB"],decimalPlaces:n=0,locale:s}={}){if(e===0||e===0n)return new Intl.NumberFormat(s,{style:"unit",unit:"byte",unitDisplay:"short",maximumFractionDigits:0}).format(0).replace("byte",t[0]);let a,o;if(typeof e=="bigint"){let c=e<0n?-e:e;for(a=0;c>=1024n&&a<t.length-1;)c=c/1024n,a++;o=Number(e)/Math.pow(1024,a)}else a=Math.floor(Math.log(Math.abs(e))/Math.log(1024)),a=Math.min(a,t.length-1),o=e/Math.pow(1024,a);return new Intl.NumberFormat(s,{style:"unit",unit:"byte",unitDisplay:"short",minimumFractionDigits:a===0?0:n,maximumFractionDigits:a===0?0:n}).format(o).replace("byte",t[a])}const Y=new Map;function R(e){const t=Y.get(e)??0;return Y.set(e,t+1),`${e}-${t}`}const y={notAsked:{type:"NotAsked"},loading(e=void 0){return{type:"Loading",previousValue:e}},success(e){return{type:"AsyncSuccess",value:e}},failure(e){return{type:"AsyncFailure",error:e}},isSuccess(e){return e.type==="AsyncSuccess"},isFailure(e){return e.type==="AsyncFailure"},isNotAsked(e){return e.type==="NotAsked"},isLoading(e){return e.type==="Loading"},getOrElse(e,t){return y.isSuccess(e)?e.value:t},getOrElseLazy(e,t){return y.isSuccess(e)?e.value:t()},getOrNull(e){return y.isSuccess(e)?e.value:null},getOrUndefined(e){return y.isSuccess(e)?e.value:void 0},getUnsafe:e=>{if(y.isSuccess(e))return e.value;throw y.isFailure(e)?e.error:new Error("Cannot get value from a not-asked or loading result")},match:(e,{success:t,failure:n,loading:s,notAsked:a=s})=>y.isSuccess(e)?t(e.value):y.isFailure(e)?n(e.error):y.isNotAsked(e)?a():s(e.previousValue),whenSuccess:(e,t)=>(y.isSuccess(e)&&t(e.value),e),whenFailure:(e,t)=>(y.isFailure(e)&&t(e.error),e),equals:(e,t,n={valueEquals:(s,a)=>s===a,errorEquals:(s,a)=>s===a})=>e.type==="AsyncSuccess"&&t.type==="AsyncSuccess"?n.valueEquals(e.value,t.value):e.type==="AsyncFailure"&&t.type==="AsyncFailure"?n.errorEquals(e.error,t.error):e.type==="Loading"&&t.type==="Loading"?n.valueEquals(e.previousValue,t.previousValue):e.type==="NotAsked"&&t.type==="NotAsked",all:e=>{const t=[];for(const n of e)if(y.isSuccess(n))t.push(n.value);else return n;return y.success(t)},ofPromise:async e=>{try{const t=await e;return y.success(t)}catch(t){return y.failure(t instanceof Error?t:new Error(String(t)))}}},P=(e,t)=>e===t||e!==e&&t!==t,k={valid:{type:"valid"},invalid(e){return{type:"invalid",error:e}},isValid(e){return e.type==="valid"},isInvalid(e){return e.type==="invalid"},match:(e,t,n)=>k.isValid(e)?t():n(e.error),toResult:(e,t)=>k.match(e,()=>v.success(t),n=>v.failure(n)),whenValid:(e,t)=>(k.isValid(e)&&t(),e),whenInvalid:(e,t)=>(k.isInvalid(e)&&t(e.error),e)},v={success(e){return{type:"Success",value:e}},failure(e){return{type:"Failure",error:e}},map:(e,t)=>e.type==="Success"?v.success(t(e.value)):e,flatMap:(e,t)=>e.type==="Success"?t(e.value):e,toAsync(e){return v.match(e,t=>y.success(t),t=>y.failure(t))},toValidation(e){return v.match(e,()=>k.valid,t=>k.invalid(t))},isSuccess(e){return e.type==="Success"},isFailure(e){return e.type==="Failure"},getOrElse(e,t){return v.isSuccess(e)?e.value:t},getOrElseLazy(e,t){return v.isSuccess(e)?e.value:t()},getOrNull(e){return v.isSuccess(e)?e.value:null},getOrUndefined(e){return v.isSuccess(e)?e.value:void 0},getUnsafe:e=>{if(v.isSuccess(e))return e.value;throw e.error},match:(e,t,n)=>v.isSuccess(e)?t(e.value):n(e.error),whenSuccess:(e,t)=>(v.isSuccess(e)&&t(e.value),e),whenFailure:(e,t)=>(v.isFailure(e)&&t(e.error),e),combine:(e,t,n,s)=>v.match(e,a=>v.match(t,o=>v.success(n(a,o)),o=>v.failure(o)),a=>v.match(t,o=>v.failure(a),o=>v.failure(s(a,o)))),equals:(e,t,n={valueEquals:(s,a)=>s===a,errorEquals:(s,a)=>s===a})=>e.type==="Success"&&t.type==="Success"?n.valueEquals(e.value,t.value):e.type==="Failure"&&t.type==="Failure"?n.errorEquals(e.error,t.error):!1,all:e=>{const t=[];for(const n of e)if(v.isSuccess(n))t.push(n.value);else return n;return v.success(t)}},Z={loadingExtended:"Loading, please wait",loadingShort:"Loading...",locale:"Locale",iconDescription:"Icon",loadingIcon:"Loading icon",failedToLoadIcon:"Failed to load icon",editLabel:"Edit",selectOne:"Select one",selectMany:"Select many",noResults:"No results",passwordPlaceholderText:"Secret Password",togglePasswordVisibility:"Toggle password visibility",toggleMenu:"Toggle menu",toggleAside:"Toggle aside",mainNavigation:"Main navigation",sidebar:"Sidebar",closeDrawer:"Close drawer",closeModal:"Close modal",confirm:"Confirm",cancel:"Cancel",addLabel:"Add",removeItem:"Remove item",currentLocale:"English",ar:"Arabic",de:"German",en:"English",es:"Spanish",fr:"French",hi:"Hindi",it:"Italian",ja:"Japanese",ko:"Korean",nl:"Dutch",pl:"Polish",pt:"Portuguese",ru:"Russian",tr:"Turkish",vi:"Vietnamese",zh:"Chinese",he:"Hebrew",fa:"Persian",ur:"Urdu",emailPlaceholderText:"Enter your email",incrementValue:"Increment value",decrementValue:"Decrement value",dropZoneInstructions:e=>e?"Click to choose or drag files here, or press Enter or Space to open file selector":"Drag files here",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Remove file",clearAllFiles:"Clear all files",clearValue:"Reset",unknownType:"Unknown type",filesInputInstructions:(e,t,n)=>{let s=e==null||e>1?"Click to choose or drag files here":"Click to choose or drag a file here";if(e||t){const a=[];if(e!=null&&e>1&&a.push(`up to ${e} files`),t&&n){const o=F(t,{units:n});a.push(`max ${o} each`)}a.length>0&&(s+=` (${a.join(", ")})`)}else if(t&&n){const a=F(t,{units:n});s+=` (max ${a})`}return s}},Pe=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"})),X=Z,ee="en",te=(e,t,n)=>{const s=e[t];return s?typeof s=="function"?s():Promise.resolve(s):new Promise((a,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},_e=new Set(["ar","he","fa","ur","ps","sd","ku","dv","yi","ji","iw","in"]);function W(e){if(!e)return"ltr";const t=e.split(/[-_]/)[0].toLowerCase();return _e.has(t)?"rtl":"ltr"}function re(e,t){return e==="auto"?W(t):e}function Oe(e){return`b-${e}`}function Te(e){return W(e)==="rtl"}function Le(e){return e==="ltr"?"rtl":"ltr"}const ne={ltr:{"inline-start":"left","inline-end":"right","block-start":"top","block-end":"bottom"},rtl:{"inline-start":"right","inline-end":"left","block-start":"top","block-end":"bottom"}};function Me(e,t){return ne[t][e]}const se={mark:r.makeProviderMark("Locale"),create:e=>{const t=r.localStorageProp({defaultValue:navigator.language??"en-US",key:"beatui-locale"}),n=r.localStorageProp({defaultValue:"auto",key:"beatui-direction-preference"}),s=r.computedOf(t,n)((o,i)=>re(i,o));return{value:{locale:t,setLocale:o=>t.set(o),direction:s,directionPreference:n,setDirectionPreference:o=>n.set(o)},dispose:()=>{t.dispose(),n.dispose(),s.dispose()}}}},{variants:Ae,special:Be,overrides:U}=Q.backgroundConfig;function _(e,t){switch(e){case"white":return"var(--color-white)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return Q.getColorVar(e,t)}}function ae(e,t){const n=Be[e];if(!n)return;if(t==="light")return n;const s=U[e];return s?s[t]:n}function V(e,t,n){const s=U[e];if(s){const o=s[n];if(o)return{backgroundColor:o.backgroundColor,textColor:o.color}}if(t==="solid"){const o=ae(e,n);if(o)return{backgroundColor:o.backgroundColor,textColor:o.color}}const a=Ae[t][n];return{backgroundColor:_(e,a.bgShade),textColor:a.textColor}}const $e={light:{shade:600,textColor:"var(--color-white)"},dark:{shade:600,textColor:"var(--text-inverted-dark)"}},qe={light:{shade:300,textColor:"var(--text-normal-light)"},dark:{shade:700,textColor:"var(--text-normal-dark)"}},Fe={light:{shade:400,textColor:"var(--text-normal-light)"},dark:{shade:600,textColor:"var(--text-normal-dark)"}};function S(e,t,n){const s=U[e];if(s){const o=s[n];if(o)return{backgroundColor:o.backgroundColor,textColor:o.color}}if(t==="solid"){const o=ae(e,n);if(o)return{backgroundColor:o.backgroundColor,textColor:o.color};const i=$e[n];return{backgroundColor:_(e,i.shade),textColor:i.textColor}}const a=t==="light"?qe[n]:Fe[n];return{backgroundColor:_(e,a.shade),textColor:a.textColor}}function j(e,t){const n=t==="light"?500:600;switch(e){case"white":return t==="light"?"var(--text-inverse-light)":"var(--text-inverted-dark)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return _(e,n)}}function E(e,t){return e==="white"?"var(--color-white)":e==="black"?"var(--color-black)":e==="transparent"?"inherit":_(e,t==="light"?800:200)}function J(e,t,n){return t==="soft"?_(e,n==="light"?300:700):_(e,n==="light"?500:600)}const je="bui-icons",M=new Map,H=(()=>{try{return typeof indexedDB<"u"&&indexedDB!==null}catch{return!1}})();function Ne(){return H?new Promise((e,t)=>{const n=indexedDB.open(je,1);n.onupgradeneeded=function(s){const a=s.target.result;a.objectStoreNames.contains("icons")||a.createObjectStore("icons")},n.onsuccess=function(){e(n.result)},n.onerror=function(){t(n.error)}}):Promise.reject(new Error("IndexedDB not available"))}const A=H?Ne():null;function oe(e,t){return new Promise(async(n,s)=>{try{if(A){const o=(await A).transaction("icons","readwrite");o.objectStore("icons").put(t,e),o.oncomplete=n,o.onerror=s}else M.set(e,t),n(void 0)}catch{M.set(e,t),n(void 0)}})}function ie(e){return new Promise(async(t,n)=>{try{if(A){const i=(await A).transaction("icons","readonly").objectStore("icons").get(e);i.onsuccess=function(){t(i.result)},i.onerror=n}else t(M.get(e)||null)}catch{t(M.get(e)||null)}})}async function Re(e){const t=`https://api.iconify.design/${e}.svg`;return fetch(t).then(n=>{if(n.status===200)return n.text();throw new Error(`Failed to load icon: ${e}`)})}async function We(e){const t=e.replace(":","/"),n=await ie(t);if(n)return n;const s=await Re(t);return await oe(t,s),s}function Ue(e){return["bc-icon",`bc-icon--${e}`].join(" ")}function He(e,t="solid"){if(!e)return"";const n=J(e,t,"light"),s=J(e,t,"dark");return`--icon-color: ${n}; --icon-color-dark: ${s}`}function D({icon:e,size:t="md",color:n,title:s,accessibility:a="auto",tone:o="solid"},...i){const l=r.computedOf(a,s)((c,d)=>c==="decorative"?!1:c==="informative"?!0:d!=null&&d!=="");return r.Use(O,c=>r.html.span(r.attr.class(r.computedOf(t,n)(d=>Ue(d??"md"))),r.attr.style(r.computedOf(n,o)((d,u)=>He(d??void 0,u??"solid"))),r.When(l,()=>r.Fragment(r.attr.role("img"),r.aria.label(r.coalesce(s,c.$.iconDescription))),()=>r.aria.hidden(!0)),q.WhenInViewport({once:!0},()=>q.Query({request:e,load:({request:d})=>We(d),convertError:String,success:({value:d})=>r.html.span(r.style.width("100%"),r.style.height("100%"),r.attr.innerHTML(d)),pending:()=>r.html.span(r.attr.class("animate-spin"),r.When(l,()=>r.Fragment(r.attr.role("img"),r.aria.label(c.$.loadingIcon)),()=>r.aria.hidden(!0)),"↻"),failure:({error:d})=>r.html.span(r.attr.title(d),r.attr.class("text-red-500"),r.When(l,()=>r.Fragment(r.attr.role("img"),r.aria.label(c.$.failedToLoadIcon)),()=>r.aria.hidden(!0)),"🚫")})),...i))}function le(e,t,n){const s=["bc-button",`bc-button--size-${e}`,`bc-control--padding-${e}`,`bc-control--rounded-${t}`];return n&&s.push("bc-button--loading"),s.join(" ")}function ce(e,t,n){const s=new Map;s.set("--button-text-shadow","var(--text-shadow-none)"),s.set("--button-text-shadow-dark","var(--text-shadow-none)");const a=(o,i,l,c)=>{n||(s.set("--button-bg-hover",o),s.set("--button-text-hover",l),s.set("--button-bg-hover-dark",i),s.set("--button-text-hover-dark",c))};switch(e){case"filled":{const o=V(t,"solid","light"),i=V(t,"solid","dark");s.set("--button-bg",o.backgroundColor),s.set("--button-text",o.textColor),s.set("--button-bg-dark",i.backgroundColor),s.set("--button-text-dark",i.textColor),s.set("--button-text-shadow","var(--text-shadow-button-filled, var(--text-shadow-sm))"),s.set("--button-text-shadow-dark","var(--text-shadow-button-filled, var(--text-shadow-sm))");const l=S(t,"solid","light"),c=S(t,"solid","dark");a(l.backgroundColor,c.backgroundColor,l.textColor,c.textColor);break}case"light":{const o=V(t,"light","light"),i=V(t,"light","dark");s.set("--button-bg",o.backgroundColor),s.set("--button-text",o.textColor),s.set("--button-bg-dark",i.backgroundColor),s.set("--button-text-dark",i.textColor);const l=S(t,"light","light"),c=S(t,"light","dark");a(l.backgroundColor,c.backgroundColor,l.textColor,c.textColor);break}case"outline":{s.set("--button-bg","transparent"),s.set("--button-bg-dark","transparent"),s.set("--button-border",j(t,"light")),s.set("--button-border-dark",j(t,"dark")),s.set("--button-text",E(t,"light")),s.set("--button-text-dark",E(t,"dark")),s.set("--button-text-shadow","var(--text-shadow-button-light, var(--text-shadow-xs))"),s.set("--button-text-shadow-dark","var(--text-shadow-button-light, var(--text-shadow-xs))");const o=S(t,"light","light"),i=S(t,"light","dark");a(o.backgroundColor,i.backgroundColor,o.textColor,i.textColor);break}case"default":{const o=V("neutral","light","light"),i=V("neutral","light","dark");s.set("--button-bg",o.backgroundColor),s.set("--button-text",E(t,"light")),s.set("--button-bg-dark",i.backgroundColor),s.set("--button-text-dark",E(t,"dark")),s.set("--button-text-shadow","var(--text-shadow-button-default, var(--text-shadow-2xs))"),s.set("--button-text-shadow-dark","var(--text-shadow-button-default, var(--text-shadow-2xs))");const l=S("base","light","light"),c=S("base","light","dark");a(l.backgroundColor,c.backgroundColor,s.get("--button-text")??o.textColor,s.get("--button-text-dark")??i.textColor);break}case"text":{s.set("--button-bg","transparent"),s.set("--button-bg-dark","transparent"),s.set("--button-text",E(t,"light")),s.set("--button-text-dark",E(t,"dark")),n||s.set("--button-hover-decoration","underline");break}}return Array.from(s.entries()).map(([o,i])=>`${o}: ${i}`).join("; ")}function ue({type:e="button",disabled:t,loading:n,variant:s="filled",size:a="md",color:o="base",roundedness:i="sm",onClick:l=()=>{}},...c){const d=r.prop(null);return r.Use(O,u=>r.html.button(r.attr.type(e),r.attr.disabled(r.computedOf(t,n)((h,f)=>h||f)),r.aria.busy(n??!1),r.When(n??!1,()=>r.aria.label(u.$.loadingExtended)),r.attr.class(r.computedOf(a,i,n)((h,f,g)=>le(h??"md",f??"sm",g))),r.attr.style(r.computedOf(s,o,t)((h,f,g)=>ce(h??"filled",f??"base",g))),r.When(n??!1,()=>r.Fragment(r.style.width(d.map(h=>h==null?"":`${h.width}px`)),r.style.height(d.map(h=>h==null?"":`${h.height}px`)),D({icon:"line-md:loading-twotone-loop",size:a??"md"}),r.html.span(r.attr.class("sr-only"),r.aria.live("polite"),u.$.loadingExtended)),()=>r.Fragment(r.on.click(l),...c)),r.When(n!=null,()=>q.ElementRect(h=>r.OnDispose(h.on(f=>{r.Value.get(n??!1)||d.set(f)}))))))}function de({size:e="sm",icon:t="line-md:close",disabled:n,roundedness:s="full",color:a="base",onClick:o,label:i},...l){return r.Use(O,c=>{const d=r.coalesce(i,c.$.closeModal);return ue({variant:"text",size:e,roundedness:s,disabled:n,color:a,onClick:o},r.attr.title(d),r.aria.label(d),...l,D({icon:t,size:e??"sm"}))})}function ze(e,t,n){const s=[e?"bc-base-input-container":"bc-input-container"];return t?s.push(e?"bc-base-input-container--disabled":"bc-input-container--disabled"):s.push(e?"bc-base-input-container--default":"bc-input-container--default"),n&&s.push("bc-input-container--error"),s.join(" ")}const L=({baseContainer:e,disabled:t,input:n,before:s,after:a,hasError:o,focusableSelector:i="input, select, textarea",growInput:l=!0},...c)=>{const d=r.Value.map(t??!1,u=>u);return r.html.div(r.WithElement(u=>{const h=()=>{u.querySelector(i)?.focus()};return u.addEventListener("click",h),r.OnDispose(()=>u.removeEventListener("click",h))}),r.attr.class(r.computedOf(e,d,o??!1)((u,h,f)=>ze(u??!1,h??!1,f??!1))),s!=null?r.html.span(r.attr.class("bc-input-container__before"),s):null,r.html.div(r.attr.class("bc-input-container__input"),r.attr.class(r.Value.map(l,u=>u?"bc-input-container__input--grow":"")),n),a!=null?r.html.span(r.attr.class("bc-input-container__after"),a):null,...c)};function B(e){return`bc-label bc-label--${e}`}const Ge=(...e)=>r.html.span(r.attr.class(B("emphasis")),...e),he=(...e)=>r.html.span(r.attr.class(B("default")),...e),pe=(...e)=>r.html.span(r.attr.class(B("muted")),...e),Ke=(...e)=>r.html.span(r.attr.class(B("danger")),...e),Ye=e=>{const{value:t,onBlur:n,onChange:s,placeholder:a,disabled:o,id:i,checkedIcon:l,uncheckedIcon:c,iconSize:d="lg"}=e,u=i??R("checkbox"),h=`${u}-label`,f=()=>{if(r.Value.get(o??!1))return;const p=r.Value.get(t);s?.(!p)},g=p=>{r.Value.get(o??!1)||(p.key===" "||p.key==="Enter")&&(p.preventDefault(),f())};return L({baseContainer:!0,growInput:!1,...e,input:r.html.span(r.attr.class("bc-checkbox-input"),r.html.span(r.attr.class("bc-checkbox-input__checkbox"),r.attr.class(r.Value.map(t,p=>p?"bc-checkbox-input__checkbox--checked":"bc-checkbox-input__checkbox--unchecked")),r.attr.class(r.Value.map(o??!1,p=>p?"bc-checkbox-input__checkbox--disabled":"")),r.attr.id(u),r.attr.role("checkbox"),r.attr.tabindex(r.Value.map(o??!1,p=>p?-1:0)),r.aria.checked(t),r.aria.disabled(o),a!=null?r.aria.labelledby(h):r.Empty,r.on.keydown(g),n!=null?r.on.blur(n):r.Empty,D({icon:r.computedOf(t,l,c)((p,m,b)=>p?m??"akar-icons/check-box-fill":b??"akar-icons/box"),accessibility:"decorative",size:d})),a!=null?r.html.label(r.attr.class("bc-checkbox-input__label"),r.attr.id(h),r.attr.for(u),pe(a)):r.Empty)},r.on.click(f))},$=({autocomplete:e,autofocus:t,class:n,disabled:s,name:a,placeholder:o,id:i,required:l,hasError:c})=>r.Fragment(r.attr.autocomplete(e),r.attr.autofocus(t),r.attr.class(n),r.attr.disabled(s),r.attr.name(a??i),r.attr.placeholder(o),r.attr.id(i),r.aria.required(l),c!=null?r.aria.invalid(c??!1):null),me=r.html.span(r.attr.class("bc-input-wrapper__required")," *");function Je(e){const t=["bc-input-wrapper"];return e&&t.push("bc-input-wrapper--horizontal"),t.join(" ")}function Qe(e,t){const n=["bc-input-wrapper__label-text"];return e?n.push("bc-input-wrapper__label-text--error"):t?n.push("bc-input-wrapper__label-text--disabled"):n.push("bc-input-wrapper__label-text--default"),n.join(" ")}const z=({required:e,label:t,labelChildren:n,context:s,description:a,content:o,error:i,labelFor:l,hasError:c,disabled:d,horizontal:u},...h)=>{const f=c??i!=null,g=d??!1,p=u??!1,m=R("input-wrapper"),b=a?`${m}-description`:void 0,w=i!=null?`${m}-error`:void 0;return r.html.div(r.attr.class(r.Value.map(p,C=>Je(C))),t!=null||s!=null?r.html.div(r.attr.class("bc-input-wrapper__header"),r.html.div(r.attr.class("bc-input-wrapper__label-section"),r.html.label(r.attr.class("bc-input-wrapper__label"),l!=null?r.attr.for(l):r.Empty,r.html.span(r.attr.class(r.computedOf(f,g)((C,x)=>Qe(C??!1,x??!1))),t),t!=null&&e?me:r.Empty),r.When(r.computedOf(p,a)((C,x)=>C&&x!=null),()=>r.html.div(r.attr.class("bc-input-wrapper__description bc-input-wrapper__description--under-label"),r.attr.id(b),a))),s!=null?he(s):r.Empty,n):r.Empty,r.html.div(r.attr.class("bc-input-wrapper__content"),[b,w].filter(Boolean).length>0?r.dataAttr.describedby([b,w].filter(Boolean).join(" ")):r.Empty,e?r.dataAttr.required("true"):r.Empty,r.When(f,()=>r.dataAttr.invalid("true")),o),r.When(r.computedOf(p,a)((C,x)=>!C&&x!=null),()=>r.html.div(r.attr.class("bc-input-wrapper__description"),r.attr.id(b),a)),i!=null?r.When(f,()=>r.html.div(r.attr.class("bc-input-wrapper__error"),r.attr.id(w),r.aria.live("polite"),r.attr.role("alert"),i)):null,...h)};function Ze(...e){return r.html.div(r.attr.class("bc-stack"),...e)}const Xe=e=>{const t={name:"email",autocomplete:"email",...e},{value:n,before:s,onBlur:a,onChange:o,onInput:i,placeholder:l}=t,c=s??D({icon:"line-md:email",size:"sm",color:"neutral"});return r.Use(O,d=>L({...e,before:c,input:r.input.email($(t),r.attr.placeholder(r.coalesce(l,d.$.emailPlaceholderText)),r.attr.value(n),r.attr.class("bc-input"),a!=null?r.on.blur(r.emitValue(a)):r.Empty,o!=null?r.on.change(r.emitValue(o)):r.Empty,i!=null?r.on.input(r.emitValue(i)):r.Empty)}))},et=e=>{const{value:t,onBlur:n,onChange:s,onInput:a}=e;return L({...e,input:r.input.text($(e),r.attr.value(t),r.attr.class("bc-input"),n!=null?r.on.blur(r.emitValue(n)):r.Empty,s!=null?r.on.change(r.emitValue(s)):r.Empty,a!=null?r.on.input(r.emitValue(a)):r.Empty)})},tt=e=>{const{value:t,onBlur:n,onChange:s,onInput:a,before:o,after:i,hasError:l,disabled:c,autocomplete:d,placeholder:u,...h}=e,f={name:"password",disabled:c,...h},g=r.prop(!0),p=r.computedOf(g,d)((m,b)=>m?b??"current-password":"off");return r.Use(O,m=>{const b=r.computedOf(m.$.passwordPlaceholderText,g,u)((C,x,Ee)=>x?"•••••••••••••••":Ee??C),w=r.html.button(r.attr.class("bc-input-container__password-toggle"),r.aria.label(m.$.togglePasswordVisibility),r.on.click(()=>g.update(C=>!C)),r.When(g,()=>D({icon:"line-md:watch"}),()=>D({icon:"line-md:watch-off"})));return L({before:o,disabled:c,hasError:l,input:r.html.input($({...f,autocomplete:p,placeholder:b}),r.When(g,()=>r.Fragment(r.attr.type("password")),()=>r.Fragment(r.attr.type("text"))),r.attr.class("bc-input"),r.attr.value(t),n!=null?r.on.blur(r.emitValue(n)):r.Empty,s!=null?r.on.change(r.emitValue(s)):r.Empty,a!=null?r.on.input(r.emitValue(a)):r.Empty),after:i!=null?r.Fragment(w,i):w})})},fe=(e,t)=>()=>{e.markTouched(),t?.()},be=(e,t)=>n=>{e.change(n),t?.(n)};function G(e,t){const{controller:n,onBlur:s,onChange:a,...o}=t;return e({id:n.name,disabled:n.disabled,value:n.value,hasError:n.errorVisible,...o,onChange:be(n,a),onBlur:fe(n,s)})}function rt(e,t,...n){return z({...t,content:G(e,t)},...n)}function ge(e,t){const{toInput:n,fromInput:s,controller:a,...o}=t,i=a.transform(n,s);return G(e,{...o,controller:i})}function nt(e,t,...n){return z({...t,content:ge(e,t)},...n)}function st(e){return e.split(".").map(n=>{const s=n.match(/^\[(\d+)\]$/);return s?Number(s[1]):n})}function ve(e){return typeof e=="number"?`[${e}]`:`.${e}`}function ye(e){if(e.length===0)return"";const[t,...n]=e;return[typeof t=="number"?`[${t}]`:t,...n.map(ve)].join("")}function T(e){return function(n){if(n.type==="valid")return n;let s=n.error;for(const a of e)if(s=s?.dependencies?.[a],s==null)return k.valid;return k.invalid(s)}}class I{path;change;value;status;error;hasError;touched;errorVisible;dirty;dependencyErrors;#e={disabled:r.prop(!1),touched:r.prop(!1)};#r;#t=r.prop(void 0);parent;disabled;#n=[];disabledOrHasErrors;constructor(t,n,s,a,o,i=P){this.path=t,this.change=n,this.value=s,this.status=a,this.#r=i,this.#t.set(s.value),this.error=a.map(l=>l?.type==="invalid"?l.error?.message:void 0),this.hasError=this.error.map(l=>l!=null),this.touched=this.#e.touched,o.validationMode?this.errorVisible=r.computedOf(this.hasError,this.touched,o.validationMode)((l,c,d)=>d==="continuous"?!!l:!!l&&!!c):this.errorVisible=r.computedOf(this.hasError,this.touched)((l,c)=>!!l&&!!c),this.dirty=r.computedOf(this.value,this.#t)((l,c)=>!this.#r(l,c)),this.dependencyErrors=a.map(l=>l?.type==="invalid"?l.error?.dependencies:void 0),this.parent=o,this.disabled=r.computedOf(this.#e.disabled,o.disabled)((l,c)=>l||c),this.disabledOrHasErrors=r.computedOf(this.disabled,this.hasError)((l,c)=>l||c),this.onDispose(()=>{this.#e.disabled.dispose(),this.#e.touched.dispose(),this.disabled.dispose(),this.error.dispose(),this.errorVisible.dispose(),this.dirty.dispose(),this.#t.dispose(),this.dependencyErrors.dispose(),this.disabledOrHasErrors.dispose()})}get name(){return ye(this.path)}onDispose=t=>{this.#n.push(t)};dispose=()=>{for(const t of this.#n)try{t()}catch(n){console.error("Error in dispose callback:",n)}this.#n.length=0};setDisabled=t=>{this.#e.disabled.set(t)};disable=()=>this.setDisabled(!0);enable=()=>this.setDisabled(!1);markTouched=()=>{this.#e.touched.set(!0)};resetTouched=()=>{this.#e.touched.set(!1)};markPristine=()=>{this.#t.set(this.value.value)};reset=()=>{this.change(this.#t.value)};array=(t=P)=>new we(this.path,this.change,this.value,this.status,this.parent,t);object=(t=P)=>new ke(this.path,this.change,this.value,this.status,this.parent,t);transform=(t,n,s=[],a=P)=>new I([...this.path,...s],o=>this.change(n(o)),this.value.map(t,a),this.status.map(T(s)),this.parent,a);asyncTransform=(t,n,s,a=[],o=P)=>new I([...this.path,...a],i=>{n(i).then(l=>this.change(l))},this.value.mapAsync(t,s,void 0,o),this.status.map(T(a)),this.parent,o)}class ke extends I{#e=new Map;#r=new Map;#t=new Map;#n=r.prop(!1);touchedDeep=this.#n;#a=new Map;#s=new Map;#i=r.prop(!1);dirtyDeep=this.#i;#c;#u;#l=()=>{let t=!1;for(const n of this.#r.values())if(n){t=!0;break}this.#n.set(this.touched.value||t)};constructor(t,n,s,a,o,i){super(t,n,s.map(c=>c??{},i),a,o,i),this.#c=this.touched.on(()=>{this.#l()}),this.#u=this.dirty.on(()=>{this.#o()});const l=this.value.on(()=>this.#o());this.onDispose(()=>{for(const c of this.#e.values())c.dispose();this.#e.clear();for(const c of this.#t.values())c();this.#t.clear(),this.#r.clear(),this.#n.dispose();for(const c of this.#s.values())c();this.#s.clear(),this.#a.clear(),this.#i.dispose(),this.#c(),this.#u(),l()})}field=t=>{if(this.#e.has(t))return this.#e.get(t);const n=async i=>{this.change({...this.value.value,[t]:i})},s=new I([...this.path,t],n,this.value.map(i=>i[t]),this.status.map(T([t])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e.set(t,s);const a=s.touched.on(i=>{this.#r.set(t,i),this.#l()});this.#t.set(t,a);const o=s.dirty.on(i=>{this.#a.set(t,i),this.#o()});return this.#s.set(t,o),s};markAllTouched=()=>{this.markTouched();const t=this.value.value;for(const n of Object.keys(t))this.field(n).markTouched();for(const n of this.#e.values())n.markTouched()};markAllPristine=()=>{this.markPristine();const t=this.value.value;for(const n of Object.keys(t))this.field(n).markPristine?.();for(const n of this.#e.values())n.markPristine?.()};#o=()=>{let t=!1;for(const n of this.#a.values())if(n){t=!0;break}this.#i.set(this.dirty.value||t)}}class we extends I{#e=new Array;length;#r=new Map;#t=new Map;#n=r.prop(!1);touchedDeep=this.#n;#a=new Map;#s=new Map;#i=r.prop(!1);dirtyDeep=this.#i;#c;#u;#l=()=>{let t=!1;for(const n of this.#r.values())if(n){t=!0;break}this.#n.set(this.touched.value||t)};constructor(t,n,s,a,o,i){const l=s.map(u=>u??[],i);super(t,n,l,a,o,i);const c=l.on(u=>{const h=this.#e.length-u.length;h>0&&(this.#e.splice(u.length,h).forEach((f,g)=>{const p=u.length+g;f.dispose(),this.#t.get(p)?.(),this.#t.delete(p),this.#r.delete(p),this.#s.get(p)?.(),this.#s.delete(p),this.#a.delete(p)}),this.#l(),this.#o())});this.length=l.map(u=>u.length),this.#c=this.touched.on(()=>{this.#l()}),this.#u=this.dirty.on(()=>{this.#o()});const d=this.value.on(()=>this.#o());this.onDispose(()=>{for(const u of this.#e)u.dispose();this.length.dispose(),this.#e.length=0,c(),l.dispose();for(const u of this.#t.values())u();this.#t.clear(),this.#r.clear(),this.#n.dispose();for(const u of this.#s.values())u();this.#s.clear(),this.#a.clear(),this.#i.dispose(),this.#c(),this.#u(),d()})}item=t=>{if(this.#e[t])return this.#e[t];const n=async i=>{const l=this.value.value.slice();l[t]=i,this.change(l)},s=new I([...this.path,t],n,this.value.map(i=>i[t]),this.status.map(T([t])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#e[t]=s;const a=s.touched.on(i=>{this.#r.set(t,i),this.#l()});this.#t.set(t,a);const o=s.dirty.on(i=>{this.#a.set(t,i),this.#o()});return this.#s.set(t,o),s};push=(...t)=>{this.change([...this.value.value,...t])};pop=()=>{this.splice(this.value.value.length-1,1)};shift=()=>{this.splice(0,1)};unshift=(...t)=>{this.change([...t,...this.value.value])};removeAt=t=>{this.splice(t,1)};splice=(t,n)=>{const s=this.value.value.slice();s.splice(t,n),this.change(s)};move=(t,n,s=1)=>{if(s<1||t===n)return;const a=this.value.value.slice(),o=a.splice(t,s);a.splice(n,0,...o),this.change(a)};markAllTouched=()=>{this.markTouched();const t=this.value.value.length;for(let n=0;n<t;n++)this.item(n).markTouched()};markAllPristine=()=>{this.markPristine();const t=this.value.value.length;for(let n=0;n<t;n++)this.item(n).markPristine?.()};#o=()=>{let t=!1;for(const n of this.#a.values())if(n){t=!0;break}this.#i.set(this.dirty.value||t)}}function Ce(e){function t(n){return typeof n=="number"?n:n.toString()}return e.map(n=>typeof n=="object"&&n.key!=null?t(n.key):t(n))}function xe(e){const t=e.filter(a=>a.path==null||a.path.length===0).map(a=>a.message),n=e.filter(a=>a.path!=null&&a.path.length>0).reduce((a,o)=>{const i=Ce(o.path),l=i.pop();let c=a;for(const d of i)c.dependencies==null&&(c.dependencies={}),c.dependencies[d]==null&&(c.dependencies[d]={}),c=c.dependencies[d];return c.dependencies==null&&(c.dependencies={}),c.dependencies[l]={message:o.message},a},{}),s=t.join(`
|
|
2
|
+
`);return{...n,message:s!=""?s:void 0}}function Se({initialValue:e,onChange:t,validate:n,equals:s,validationMode:a,validateDebounceMs:o}){const i=r.Value.deriveProp(e),l=r.prop(k.valid),c=r.prop(!1),d=r.prop(a??"touchedOrSubmit"),u=m=>{l.set(m)};let h;const f=async m=>{if(n!=null){const b=await n(m);u(b)}},g=async m=>{i.set(m),t?.(m);const b=d.value;if(n!=null){if(b==="onSubmit")return;const w=o??0;w>0?(h&&clearTimeout(h),h=setTimeout(()=>{f(m)},w)):await f(m)}},p=new I([],g,i,l,{disabled:c,validationMode:d},s??P);return p.onDispose(()=>{c.dispose(),i.dispose(),l.dispose(),d.dispose(),h&&clearTimeout(h)}),{controller:p,setStatus:u}}function K(e){return r.Fragment(r.attr.disabled(e.disabled),r.attr.name(e.name))}function at(e,{triggerOn:t="change"}={}){return r.Fragment(K(e),r.attr.value(e.value),(t==="input"?r.on.input:r.on.change)(r.emitValue(e.change)))}function ot(e,{triggerOn:t="change"}={}){return r.Fragment(K(e),r.attr.valueAsNumber(e.value),(t==="input"?r.on.input:r.on.change)(r.emitValueAsNumber(e.change)))}function N(e){return e.issues!=null?k.invalid(xe(e.issues)):k.valid}async function it({task:e,errorMessage:t,errorPath:n=["root"],validation:s}){try{const a=await e();return s!=null?s(a):k.valid}catch(a){const o=t??(a instanceof Error?a.message:"Operation failed");return n.length===1&&n[0]==="root"?k.invalid({message:o}):k.invalid({dependencies:Ie(n,o)})}}function Ie(e,t){if(e.length===1)return{[e[0]]:{message:t}};const[n,...s]=e;return{[n]:{dependencies:Ie(s,t)}}}function lt({initialValue:e={},schema:t,onSubmit:n=async()=>k.valid,validationMode:s,validateDebounceMs:a}){const{controller:o,setStatus:i}=Se({initialValue:e,validationMode:s??"touchedOrSubmit",validateDebounceMs:a,validate:(s??"touchedOrSubmit")==="onSubmit"?void 0:async u=>N(await t["~standard"].validate(u))}),l=r.prop(!1),c=o.object();return c.onDispose(l.dispose),{controller:c,setStatus:i,submit:async u=>{if(l.set(!0),u?.preventDefault(),c.markAllTouched(),(s??"touchedOrSubmit")==="onSubmit"){const f=c.value.value,g=N(await t["~standard"].validate(f));if(i(g),g.type==="invalid"){l.set(!1);return}}const h=await n(c.value.value);l.set(!1),h.type==="invalid"&&i(h)},submitting:l}}function ct(e){const t=e.split("-"),n=[e];return t.length>1&&n.push(t[0]),n}function De({locale:e,defaultLocale:t="en-US",defaultMessages:n,localeLoader:s}){const a=r.prop(t),o=r.prop(n),i=e.on(async l=>{if(l===a.value)return;a.set(l);const c=ct(l);for(const d of c)try{const u=await s(d);if(typeof u.default=="object"&&Object.keys(u).length===1){console.error("It appears that you are trying to load a translation module without referencing the default export. Please use `(await import(...)).default` in your loader function.");return}if(l===a.value){o.set(u);return}}catch{continue}console.warn(`No locale found for "${e.value}", using fallback`),l===a.value&&o.set(n)});return{dispose:()=>{i(),a.dispose(),o.dispose()},t:o}}function Ve({defaultLocale:e,defaultMessages:t,localeLoader:n,providerName:s="I18nProvider"}){return{mark:r.makeProviderMark(s),create:(a,o)=>{const{value:{locale:i}}=o.getProvider(se.mark),{t:l,dispose:c}=De({locale:i,defaultMessages:t,defaultLocale:e,localeLoader:n});return{value:l,dispose:c}}}}const O=Ve({defaultLocale:ee,defaultMessages:X,localeLoader:async e=>(await te(Object.assign({"./locales/ar.ts":()=>Promise.resolve().then(()=>require("./ar-Xt0B1GBx.cjs")),"./locales/de.ts":()=>Promise.resolve().then(()=>require("./de-BBH6Q1uM.cjs")),"./locales/en.ts":()=>Promise.resolve().then(()=>Pe),"./locales/es.ts":()=>Promise.resolve().then(()=>require("./es-3mljmytv.cjs")),"./locales/fa.ts":()=>Promise.resolve().then(()=>require("./fa-C06uowfA.cjs")),"./locales/fr.ts":()=>Promise.resolve().then(()=>require("./fr-ZoJsA1s0.cjs")),"./locales/he.ts":()=>Promise.resolve().then(()=>require("./he-D-_HCjOB.cjs")),"./locales/hi.ts":()=>Promise.resolve().then(()=>require("./hi-B9yNE6-J.cjs")),"./locales/it.ts":()=>Promise.resolve().then(()=>require("./it-D-bh7RoG.cjs")),"./locales/ja.ts":()=>Promise.resolve().then(()=>require("./ja-B4rdImcD.cjs")),"./locales/ko.ts":()=>Promise.resolve().then(()=>require("./ko-C43-vhJF.cjs")),"./locales/nl.ts":()=>Promise.resolve().then(()=>require("./nl-DDjoZpiU.cjs")),"./locales/pl.ts":()=>Promise.resolve().then(()=>require("./pl-CXYiY-nR.cjs")),"./locales/pt.ts":()=>Promise.resolve().then(()=>require("./pt-CnC1YN5K.cjs")),"./locales/ru.ts":()=>Promise.resolve().then(()=>require("./ru-_1DUTMUW.cjs")),"./locales/tr.ts":()=>Promise.resolve().then(()=>require("./tr-DA-8X7MK.cjs")),"./locales/ur.ts":()=>Promise.resolve().then(()=>require("./ur-B1YkWWDx.cjs")),"./locales/vi.ts":()=>Promise.resolve().then(()=>require("./vi-DA-qqgHJ.cjs")),"./locales/zh.ts":()=>Promise.resolve().then(()=>require("./zh-B4HcAg-5.cjs"))}),`./locales/${e}.ts`,3)).default,providerName:"BeatUII18n"});function ut(e){switch(e){case"success":return"material-symbols:check-circle-outline";case"warning":return"material-symbols:warning-outline";case"danger":return"material-symbols:error-outline";case"info":default:return"material-symbols:info-outline"}}function dt(e){switch(e){case"success":return"success";case"warning":return"warning";case"danger":return"danger";case"info":default:return"info"}}function ht(e,t,n,s){const a=["bc-notice",`bc-notice--${e}`,`bc-notice--tone-${t}`];return n&&a.push("bc-notice--dismissible"),s&&s.length>0&&a.push(s),a.join(" ")}function pt({variant:e="info",tone:t="subtle",role:n,title:s,icon:a,closable:o=!1,onDismiss:i,class:l},...c){const d=r.Value.map(o,m=>!!m||i!=null),u=r.Value.map(e,m=>m??"info"),h=r.Value.map(t,m=>m??"subtle"),f=r.computedOf(n,u)((m,b)=>m??(b==="danger"?"alert":"status")),g=r.prop(!0),p=r.Use(O,m=>r.html.div(r.attr.class(r.computedOf(u,h,d,l)((b,w,C,x)=>ht(b,w,C,x))),r.attr.role(r.Value.map(f,b=>b)),r.Unless(r.Value.map(a,b=>b===!1),()=>r.html.div(r.attr.class("bc-notice__icon"),D({icon:r.computedOf(a,u)((b,w)=>b===void 0?ut(w):String(b)),size:"md",color:r.Value.map(u,dt)}))),r.html.div(r.attr.class("bc-notice__body"),r.Ensure(s,b=>r.html.div(r.attr.class("bc-notice__title"),b)),r.html.div(r.attr.class("bc-notice__content"),...c)),r.When(d,()=>de({size:"xs",label:m.$.closeModal,onClick:()=>{g.set(!1),i?.()}}))));return r.When(g,()=>p)}exports.ArrayController=we;exports.BaseControl=G;exports.BaseMappedControl=ge;exports.BeatUII18n=O;exports.Button=ue;exports.CheckboxInput=Ye;exports.CloseButton=de;exports.CommonInputAttributes=$;exports.Control=rt;exports.Controller=I;exports.DangerLabel=Ke;exports.EmailInput=Xe;exports.EmphasisLabel=Ge;exports.Icon=D;exports.InputContainer=L;exports.InputWrapper=z;exports.LOGICAL_PROPERTY_MAP=ne;exports.Label=he;exports.Locale=se;exports.MappedControl=nt;exports.MutedLabel=pe;exports.Notice=pt;exports.O=P;exports.ObjectController=ke;exports.PasswordInput=tt;exports.RequiredSymbol=me;exports.Stack=Ze;exports.TextInput=et;exports.__variableDynamicImportRuntimeHelper=te;exports.a=k;exports.backgroundValue=V;exports.borderColorValue=j;exports.connectCommonAttributes=K;exports.connectNumberInput=ot;exports.connectStringInput=at;exports.convertStandardSchemaIssues=xe;exports.convertStandardSchemaPathToPath=Ce;exports.defaultLocale=ee;exports.defaultMessages=X;exports.formatFileSize=F;exports.generateButtonClasses=le;exports.generateButtonStyles=ce;exports.getDirectionClassName=Oe;exports.getDirectionFromLocale=W;exports.getIconLocally=ie;exports.getOppositeDirection=Le;exports.getPhysicalProperty=Me;exports.hoverBackgroundValue=S;exports.isIndexedDBAvailable=H;exports.isRTLLocale=Te;exports.makeI18nProvider=Ve;exports.makeMapValidation=T;exports.makeMessages=De;exports.makeOnBlurHandler=fe;exports.makeOnChangeHandler=be;exports.parsePath=st;exports.pathToString=ye;exports.resolveDirection=re;exports.sessionId=R;exports.standardSchemaResultToValidation=N;exports.storeIconLocally=oe;exports.taskToValidation=it;exports.textColorValue=E;exports.useController=Se;exports.useForm=lt;exports.wrapSegment=ve;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./notice-DrmHRjLV.cjs"),r={loadingExtended:"Ładowanie, proszę czekać",loadingShort:"Ładowanie...",locale:"Język",iconDescription:"Ikona",loadingIcon:"Ikona ładowania",failedToLoadIcon:"Nie udało się załadować ikony",editLabel:"Edytuj",selectOne:"Wybierz jeden",selectMany:"Wybierz wiele",noResults:"Brak wyników",passwordPlaceholderText:"Tajne hasło",togglePasswordVisibility:"Przełącz widoczność hasła",toggleMenu:"Przełącz menu",toggleAside:"Przełącz panel boczny",mainNavigation:"Główna nawigacja",sidebar:"Pasek boczny",closeDrawer:"Zamknij szufladę",closeModal:"Zamknij modal",confirm:"Potwierdź",cancel:"Anuluj",addLabel:"Dodaj",removeItem:"Usuń element",currentLocale:"Polski",ar:"Arabski",de:"Niemiecki",en:"Angielski",es:"Hiszpański",fr:"Francuski",hi:"Hindi",it:"Włoski",ja:"Japoński",ko:"Koreański",nl:"Holenderski",pl:"Polski",pt:"Portugalski",ru:"Rosyjski",tr:"Turecki",vi:"Wietnamski",zh:"Chiński",he:"Hebrajski",fa:"Perski",ur:"Urdu",emailPlaceholderText:"Wprowadź adres e-mail",incrementValue:"Zwiększ wartość",decrementValue:"Zmniejsz wartość",dropZoneInstructions:e=>e?"Kliknij aby wybrać lub przeciągnij pliki tutaj, lub naciśnij Enter lub Spację, aby otworzyć selektor plików":"Przeciągnij pliki tutaj",fileSizeUnits:["Bajty","KB","MB","GB","TB"],removeFile:"Usuń plik",clearAllFiles:"Usuń wszystkie pliki",clearValue:"Wyczyść wartość",unknownType:"Nieznany typ",filesInputInstructions:(e,a,n)=>{let o=e==null||e>1?"Kliknij aby wybrać lub przeciągnij pliki tutaj":"Kliknij aby wybrać lub przeciągnij plik tutaj";if(e||a){const i=[];if(e!=null&&e>1&&i.push(`do ${e} plików`),a&&n){const l=t.formatFileSize(a,{units:n});i.push(`maks ${l} każdy`)}i.length>0&&(o+=` (${i.join(", ")})`)}else if(a&&n){const i=t.formatFileSize(a,{units:n});o+=` (maks ${i})`}return o}};exports.default=r;exports.pl=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./notice-DrmHRjLV.cjs"),l={loadingExtended:"Carregando, por favor aguarde",loadingShort:"Carregando...",locale:"Idioma",iconDescription:"Ícone",loadingIcon:"Ícone de carregamento",failedToLoadIcon:"Falha ao carregar ícone",editLabel:"Editar",selectOne:"Selecionar um",selectMany:"Selecionar vários",noResults:"Sem resultados",passwordPlaceholderText:"Senha Secreta",togglePasswordVisibility:"Alternar visibilidade da senha",toggleMenu:"Alternar menu",toggleAside:"Alternar painel lateral",mainNavigation:"Navegação principal",sidebar:"Barra lateral",closeDrawer:"Fechar gaveta",closeModal:"Fechar modal",confirm:"Confirmar",cancel:"Cancelar",addLabel:"Adicionar",removeItem:"Remover item",currentLocale:"Português",ar:"Árabe",de:"Alemão",en:"Inglês",es:"Espanhol",fr:"Francês",hi:"Hindi",it:"Italiano",ja:"Japonês",ko:"Coreano",nl:"Holandês",pl:"Polonês",pt:"Português",ru:"Russo",tr:"Turco",vi:"Vietnamita",zh:"Chinês",he:"Hebraico",fa:"Persa",ur:"Urdu",emailPlaceholderText:"Digite seu e-mail",incrementValue:"Incrementar valor",decrementValue:"Decrementar valor",dropZoneInstructions:e=>e?"Clique para escolher ou arraste arquivos aqui, ou pressione Enter ou Espaço para abrir o seletor de arquivos":"Arraste arquivos aqui",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Remover arquivo",clearAllFiles:"Limpar todos os arquivos",clearValue:"Limpar valor",unknownType:"Tipo desconhecido",filesInputInstructions:(e,r,o)=>{let n=e==null||e>1?"Clique para escolher ou arraste arquivos aqui":"Clique para escolher ou arraste um arquivo aqui";if(e||r){const a=[];if(e!=null&&e>1&&a.push(`até ${e} arquivos`),r&&o){const i=t.formatFileSize(r,{units:o});a.push(`máx ${i} cada`)}a.length>0&&(n+=` (${a.join(", ")})`)}else if(r&&o){const a=t.formatFileSize(r,{units:o});n+=` (máx ${a})`}return n}};exports.default=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./notice-DrmHRjLV.cjs"),i={loadingExtended:"Загрузка, пожалуйста подождите",loadingShort:"Загрузка...",locale:"Локаль",iconDescription:"Иконка",loadingIcon:"Иконка загрузки",failedToLoadIcon:"Не удалось загрузить иконку",editLabel:"Редактировать",selectOne:"Выберите один",selectMany:"Выберите несколько",noResults:"Нет результатов",passwordPlaceholderText:"Секретный пароль",togglePasswordVisibility:"Переключить видимость пароля",toggleMenu:"Переключить меню",toggleAside:"Переключить боковую панель",mainNavigation:"Основная навигация",sidebar:"Боковая панель",closeDrawer:"Закрыть выдвижную панель",closeModal:"Закрыть модальное окно",confirm:"Подтвердить",cancel:"Отменить",addLabel:"Добавить",removeItem:"Удалить элемент",currentLocale:"Русский",ar:"Арабский",de:"Немецкий",en:"Английский",es:"Испанский",fr:"Французский",hi:"Хинди",it:"Итальянский",ja:"Японский",ko:"Корейский",nl:"Нидерландский",pl:"Польский",pt:"Португальский",ru:"Русский",tr:"Турецкий",vi:"Вьетнамский",zh:"Китайский",he:"Иврит",fa:"Персидский",ur:"Урду",emailPlaceholderText:"Введите электронную почту",incrementValue:"Увеличить значение",decrementValue:"Уменьшить значение",dropZoneInstructions:e=>e?"Нажмите для выбора или перетащите файлы сюда, или нажмите Enter или Пробел, чтобы открыть выбор файлов":"Перетащите файлы сюда",fileSizeUnits:["Байт","КБ","МБ","ГБ","ТБ"],removeFile:"Удалить файл",clearAllFiles:"Очистить все файлы",clearValue:"Очистить значение",unknownType:"Неизвестный тип",filesInputInstructions:(e,o,n)=>{let l=e==null||e>1?"Нажмите для выбора или перетащите файлы сюда":"Нажмите для выбора или перетащите файл сюда";if(e||o){const t=[];if(e!=null&&e>1){let r="файлов";e<=4&&(r="файла"),t.push(`до ${e} ${r}`)}if(o&&n){const r=c.formatFileSize(o,{units:n});t.push(`макс ${r} каждый`)}t.length>0&&(l+=` (${t.join(", ")})`)}else if(o&&n){const t=c.formatFileSize(o,{units:n});l+=` (макс ${t})`}return l}};exports.default=i;exports.ru=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./notice-DrmHRjLV.cjs"),o={loadingExtended:"Yükleniyor, lütfen bekleyin",loadingShort:"Yükleniyor...",locale:"Yerel",iconDescription:"Simge",loadingIcon:"Yükleme simgesi",failedToLoadIcon:"Simge yüklenemedi",editLabel:"Düzenle",selectOne:"Birini seç",selectMany:"Birden fazlasını seç",noResults:"Sonuç yok",passwordPlaceholderText:"Gizli Şifre",togglePasswordVisibility:"Şifre görünürlüğünü değiştir",toggleMenu:"Menüyü değiştir",toggleAside:"Yan paneli değiştir",mainNavigation:"Ana navigasyon",sidebar:"Kenar çubuğu",closeDrawer:"Çekmeceyi kapat",closeModal:"Modalı kapat",confirm:"Onayla",cancel:"İptal",addLabel:"Ekle",removeItem:"Öğeyi kaldır",currentLocale:"Türkçe",ar:"Arapça",de:"Almanca",en:"İngilizce",es:"İspanyolca",fr:"Fransızca",hi:"Hintçe",it:"İtalyanca",ja:"Japonca",ko:"Korece",nl:"Flemenkçe",pl:"Lehçe",pt:"Portekizce",ru:"Rusça",tr:"Türkçe",vi:"Vietnamca",zh:"Çince",he:"İbranice",fa:"Farsça",ur:"Urduca",emailPlaceholderText:"E-postanızı girin",incrementValue:"Değer artır",decrementValue:"Değer azalt",dropZoneInstructions:e=>e?"Seçmek için tıklayın veya dosyaları buraya sürükleyin, veya dosya seçiciyi açmak için Enter veya Boşluk tuşuna basın":"Dosyaları buraya sürükleyin",fileSizeUnits:["Bayt","KB","MB","GB","TB"],removeFile:"Dosyayı kaldır",clearAllFiles:"Tüm dosyaları temizle",clearValue:"Değeri temizle",unknownType:"Bilinmeyen tür",filesInputInstructions:(e,n,i)=>{let r=e==null||e>1?"Seçmek için tıklayın veya dosyaları buraya sürükleyin":"Seçmek için tıklayın veya dosyayı buraya sürükleyin";if(e||n){const a=[];if(e!=null&&e>1&&a.push(`en fazla ${e} dosya`),n&&i){const t=l.formatFileSize(n,{units:i});a.push(`her biri en fazla ${t}`)}a.length>0&&(r+=` (${a.join(", ")})`)}else if(n&&i){const a=l.formatFileSize(n,{units:i});r+=` (en fazla ${a})`}return r}};exports.default=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./notice-DrmHRjLV.cjs"),s={signInTitle:"Sign In",signInButton:"Sign In",emailLabel:"Email",passwordLabel:"Password",rememberMeLabel:"Remember me",forgotPasswordLink:"Forgot password?",noAccountLink:"Don't have an account? Sign up",signUpTitle:"Sign Up",signUpButton:"Sign Up",nameLabel:"Name",confirmPasswordLabel:"Confirm Password",acceptTermsLabel:"I accept the terms and conditions",hasAccountLink:"Already have an account? Sign in",resetPasswordTitle:"Reset Password",resetPasswordButton:"Reset Password",resetPasswordDescription:"Enter your email to reset your password.",backToSignInLink:"Back to sign in",continueWithProvider:e=>`Continue with ${e}`,passwordStrengthWeak:"Weak",passwordStrengthFair:"Fair",passwordStrengthGood:"Good",passwordStrengthStrong:"Strong",orDivider:"or",error:"An error occurred",required:"Required",authenticationTitle:"Authentication"},o=Object.freeze(Object.defineProperty({__proto__:null,default:s},Symbol.toStringTag,{value:"Module"})),t=s,n="en",i=r.makeI18nProvider({defaultLocale:n,defaultMessages:t,localeLoader:async e=>(await r.__variableDynamicImportRuntimeHelper(Object.assign({"./locales/ar.ts":()=>Promise.resolve().then(()=>require("./ar-BsUm-TCn.cjs")),"./locales/de.ts":()=>Promise.resolve().then(()=>require("./de-BUFLEyKr.cjs")),"./locales/en.ts":()=>Promise.resolve().then(()=>o),"./locales/es.ts":()=>Promise.resolve().then(()=>require("./es-BxBeTRCv.cjs")),"./locales/fa.ts":()=>Promise.resolve().then(()=>require("./fa-DxPseW3g.cjs")),"./locales/fr.ts":()=>Promise.resolve().then(()=>require("./fr-Cdyopuz3.cjs")),"./locales/he.ts":()=>Promise.resolve().then(()=>require("./he-DarDNPn0.cjs")),"./locales/hi.ts":()=>Promise.resolve().then(()=>require("./hi-tATwsXJ6.cjs")),"./locales/it.ts":()=>Promise.resolve().then(()=>require("./it-BmFag7j0.cjs")),"./locales/ja.ts":()=>Promise.resolve().then(()=>require("./ja-Dj-bAKLf.cjs")),"./locales/ko.ts":()=>Promise.resolve().then(()=>require("./ko-BomUE-yQ.cjs")),"./locales/nl.ts":()=>Promise.resolve().then(()=>require("./nl-Dr-l6zUy.cjs")),"./locales/pl.ts":()=>Promise.resolve().then(()=>require("./pl-BK0i_yvq.cjs")),"./locales/pt.ts":()=>Promise.resolve().then(()=>require("./pt-oBMmVYcu.cjs")),"./locales/ru.ts":()=>Promise.resolve().then(()=>require("./ru-CtxMmoa6.cjs")),"./locales/tr.ts":()=>Promise.resolve().then(()=>require("./tr-CgJ8uhZu.cjs")),"./locales/ur.ts":()=>Promise.resolve().then(()=>require("./ur-DvqAg9gW.cjs")),"./locales/vi.ts":()=>Promise.resolve().then(()=>require("./vi-D5R3YcU0.cjs")),"./locales/zh.ts":()=>Promise.resolve().then(()=>require("./zh-CCGXcj5r.cjs"))}),`./locales/${e}.ts`,3)).default,providerName:"AuthI18n"});exports.AuthI18n=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./notice-DrmHRjLV.cjs"),a={loadingExtended:"لوڈ ہو رہا ہے، براہ کرم انتظار کریں",loadingShort:"لوڈ ہو رہا ہے...",locale:"زبان",iconDescription:"آئیکن",loadingIcon:"لوڈنگ آئیکن",failedToLoadIcon:"آئیکن لوڈ کرنے میں ناکام",editLabel:"ترمیم",selectOne:"ایک منتخب کریں",selectMany:"متعدد منتخب کریں",noResults:"کوئی نتیجہ نہیں",passwordPlaceholderText:"خفیہ پاس ورڈ",togglePasswordVisibility:"پاس ورڈ کی مرئیت تبدیل کریں",toggleMenu:"مینو ٹوگل کریں",toggleAside:"سائیڈ پینل ٹوگل کریں",mainNavigation:"بنیادی نیویگیشن",sidebar:"سائیڈ بار",closeDrawer:"دراز بند کریں",closeModal:"ماڈل بند کریں",confirm:"تصدیق",cancel:"منسوخ",addLabel:"شامل کریں",removeItem:"آئٹم ہٹائیں",currentLocale:"اردو",ar:"عربی",de:"جرمن",en:"انگریزی",es:"ہسپانوی",fr:"فرانسیسی",he:"عبرانی",hi:"ہندی",it:"اطالوی",ja:"جاپانی",ko:"کوریائی",nl:"ڈچ",pl:"پولش",pt:"پرتگالی",ru:"روسی",tr:"ترکی",vi:"ویتنامی",zh:"چینی",fa:"فارسی",ur:"اردو",emailPlaceholderText:"اپنا ای میل داخل کریں",incrementValue:"قدر اضافہ کریں",decrementValue:"قدر کم کریں",dropZoneInstructions:e=>e?"منتخب کرنے کے لیے کلک کریں یا فائلیں یہاں گھسیٹیں، یا فائل منتخب کرنے کے لیے Enter یا Space دبائیں":"فائلیں یہاں گھسیٹیں",fileSizeUnits:["بائٹس","KB","MB","GB","TB"],removeFile:"فائل حذف کریں",clearAllFiles:"تمام فائلیں صاف کریں",clearValue:"قدر صاف کریں",unknownType:"نامعلوم قسم",filesInputInstructions:(e,o,n)=>{let r=e==null||e>1?"منتخب کرنے کے لیے کلک کریں یا فائلیں یہاں گھسیٹیں":"منتخب کرنے کے لیے کلک کریں یا فائل یہاں گھسیٹیں";if(e||o){const t=[];if(e!=null&&e>1&&t.push(`زیادہ سے زیادہ ${e} فائلیں`),o&&n){const c=l.formatFileSize(o,{units:n});t.push(`ہر ایک زیادہ سے زیادہ ${c}`)}t.length>0&&(r+=` (${t.join("، ")})`)}else if(o&&n){const t=l.formatFileSize(o,{units:n});r+=` (زیادہ سے زیادہ ${t})`}return r}};exports.default=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("@tempots/dom"),Ft=require("./colors-Qc1mmmfr.cjs"),At=require("./timer-BdH4cK6a.cjs"),et=require("@tempots/ui"),b=require("./notice-DrmHRjLV.cjs");class Dt extends Error{constructor(n="Missing implementation"){super(n),this.name="MissingImplementationError"}}const Tt=e=>St(e).split("_").join(" "),St=e=>(e=e.replace(/::/g,"/"),e=e.replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2"),e=e.replace(/([a-z\d])([A-Z])/g,"$1_$2"),e=e.replace(/-/g,"_"),e.toLowerCase()),Bt=e=>e.substring(0,1).toUpperCase()+e.substring(1),Ot=e=>{if(typeof Buffer<"u")return Buffer.from(e,"base64").toString("utf8");if(typeof atob<"u")return atob(e);throw new Dt("No implementation found for base64 decoding")};function Q({onChange:e,value:n,accept:l="*/*",enableClick:a=!0,content:r,disabled:o=!1,allowMultiple:s}){return t.Use(b.BeatUII18n,c=>{const u=t.Value.deriveProp(n??[]),i=t.prop(!1),m=h=>{h.preventDefault(),h.stopPropagation(),i.value=!0},d=h=>{h.preventDefault(),h.stopPropagation(),(!h.currentTarget||!h.currentTarget.contains(h.relatedTarget))&&(i.value=!1)},v=h=>{h.preventDefault(),h.stopPropagation(),i.value=!1;const g=Array.from(h.dataTransfer?.files||[]);g.length>0&&(u.value=g,e(g))},p=h=>{t.Value.get(a)&&h.currentTarget.querySelector('input[type="file"]')?.click()};let x=null;const f=()=>{if(x==null)return;const h=Array.from(x.files??[]);h.length>0&&(u.value=h,e(h)),x.value=""},w=h=>{t.Value.get(a)&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),p(h))};return t.html.div(t.attr.role("button"),t.attr.tabindex(t.Value.map(a,h=>h?0:-1)),t.attr.style("position: relative;"),t.on.dragover(m),t.on.dragleave(d),t.on.drop(v),t.on.click(p),t.on.keydown(w),t.html.input(t.attr.type("file"),t.attr.disabled(o),t.attr.accept(l),t.attr.multiple(s),t.attr.style("position: absolute; left: -9999px; opacity: 0; pointer-events: none;"),t.on.change(f),t.WithElement(h=>(x=h,t.OnDispose(u.on(g=>{const k=globalThis.DataTransfer;if(k!=null){const C=new k;g.forEach(V=>C.items.add(V)),h.files=C.files}}))))),t.aria.label(t.bind(c.$.dropZoneInstructions)(a)),r({files:u,clear:()=>u.value=[],change:u.set}))})}function Ut(e,n){return e.length===n.length&&e.every((l,a)=>l===n[a])}function Nt(e,n){const l=["bc-segmented-control",`bc-segmented-control--size-${e}`];return n&&l.push("bc-segmented-control--disabled"),l.join(" ")}function Lt({options:e,value:n,onChange:l,size:a="md",disabled:r=!1},...o){const s=Ft.f(e).map(([c,u])=>({key:c,label:u}));return t.WithElement(()=>{const c=Object.fromEntries(s.map((i,m)=>[i.key,m])),u=t.prop(s.map(()=>({left:0,width:0})),Ut);return t.html.div(t.attr.class(t.computedOf(a,r)((i,m)=>Nt(i??"md",m??!1))),t.html.div(t.attr.class("bc-segmented-control__container"),t.html.div(t.attr.class("bc-segmented-control__indicator"),t.style.width(t.computedOf(n,u)((i,m)=>{const{width:d}=m[c[i]??0];return`${d}px`})),t.style.left(t.computedOf(n,u)((i,m)=>{const{left:d}=m[c[i]??0];return`${d}px`}))),s.map(({label:i,key:m},d)=>t.html.button(t.on.click(v=>{v.preventDefault(),t.Value.get(r)||l?.(m)}),t.attr.disabled(r),t.attr.class("bc-segmented-control__segment"),t.attr.class(t.Value.map(n,v=>v===m?"bc-segmented-control__segment--active":"bc-segmented-control__segment--inactive")),et.ElementRect(v=>{function p(){u.update(f=>{const w=[...f];return w[d]={width:v.value.width,left:v.value.localLeft},w})}const x=At.g(p);return t.OnDispose(x,v.on(p))}),i))),...o)})}function Rt(e){const n=e.type.toLowerCase();return n.startsWith("image/")&&(n.includes("jpeg")||n.includes("jpg")||n.includes("png")||n.includes("gif")||n.includes("webp")||n.includes("svg"))}function zt(e){const n=e.type.toLowerCase();return n.startsWith("image/")?"vscode-icons:file-type-image":n.startsWith("video/")?"vscode-icons:file-type-video":n.startsWith("audio/")?"vscode-icons:file-type-audio":n.includes("pdf")?"vscode-icons:file-type-pdf2":n.includes("word")||n.includes("document")?"vscode-icons:file-type-word":n.includes("excel")||n.includes("spreadsheet")?"vscode-icons:file-type-excel":n.includes("powerpoint")||n.includes("presentation")?"vscode-icons:file-type-powerpoint":n.includes("zip")||n.includes("archive")?"vscode-icons:file-type-zip":n.includes("text")?"vscode-icons:file-type-text":n.includes("json")?"vscode-icons:file-type-json-official":n.includes("csv")?"vscode-icons:file-type-csv":n.includes("xml")?"vscode-icons:file-type-xml":n.includes("yaml")?"vscode-icons:file-type-yaml-official":"vscode-icons:file-type-binary"}function st(e){return t.When(e.map(Rt),()=>{const n=t.prop(null);return e.on(l=>{n.value&&URL.revokeObjectURL(n.value);const a=URL.createObjectURL(l);n.value=a}),t.html.div(t.attr.class("bc-file-input__thumbnail-container"),t.html.img(t.attr.src(n),t.attr.alt(e.map(l=>l.name)),t.attr.class("bc-file-input__thumbnail"),t.OnDispose(()=>{n.value&&URL.revokeObjectURL(n.value)})))},()=>b.Icon({icon:e.map(zt)}))}const pt=(e,...n)=>{const{value:l=t.prop([]),accept:a="*/*",maxFiles:r,maxFileSize:o,onChange:s,onBlur:c,disabled:u,hasError:i,mode:m="default",showFileList:d=!0,...v}=e,p=l,x=t.Value.map(m,C=>C==="compact"),f=C=>{let V=C;if(r!=null){const I=t.Value.get(r);V=V.slice(0,I)}if(o){const I=t.Value.get(o);V=V.filter(y=>y.size<=I)}s?.(V)},w=C=>{const I=p.value.filter((y,_)=>_!==C);s?.(I)},h=()=>{s?.([])},g=({files:C,clear:V,change:I})=>t.Use(b.BeatUII18n,y=>t.html.div(t.attr.class("bc-file-input__drop-zone"),t.html.div(t.attr.class("bc-file-input__drop-zone-content bc-file-input__drop-zone-content--empty"),b.Icon({icon:"mdi:cloud-upload-outline",size:"xl"}),t.html.div(t.attr.class("bc-file-input__drop-zone-text"),t.bind(y.$.filesInputInstructions)(r,o,y.$.fileSizeUnits.value))))),k=({files:C})=>t.Use(b.BeatUII18n,V=>t.html.div(t.attr.class("bc-file-input__compact-input"),t.When(C.map(I=>I.length>0),()=>t.html.span(t.attr.class("bc-file-input__compact-value"),t.ForEach(C,I=>t.html.span(t.attr.class("bc-file-input__compact-value-item"),st(I),t.html.span(t.attr.class("bc-file-input__compact-value-item-name"),I.$.name)))),()=>t.html.span(t.attr.class("bc-file-input__compact-placeholder"),b.Icon({icon:"mdi:cloud-upload-outline",size:"sm"})," ",t.bind(V.$.filesInputInstructions)(r,o,V.$.fileSizeUnits.value)))));return t.Use(b.BeatUII18n,C=>b.InputContainer({baseContainer:t.Value.map(x,V=>!V),disabled:u,hasError:i,after:t.When(x,()=>t.When(p.map(({length:V})=>V>0),()=>b.CloseButton({size:"sm",label:C.$.clearAllFiles,disabled:u,onClick:h},t.attr.class("bc-file-input__compact-clear")))),...v,input:t.When(x,()=>t.html.div(t.attr.class("bc-file-input bc-file-input--compact"),Q({value:p,accept:a,enableClick:!0,allowMultiple:t.Value.map(r??1/0,V=>V>1),disabled:u,onChange:f,content:k})),()=>t.html.div(t.attr.class("bc-file-input"),Q({value:p,accept:a,enableClick:!0,allowMultiple:t.Value.map(r??1/0,V=>V>1),disabled:u,onChange:f,content:g}),t.When(d,()=>t.NotEmpty(p,()=>t.Fragment(t.html.div(t.attr.class("bc-file-input__file-list"),t.ForEach(p,(V,I)=>{const y=I.index;return t.html.div(t.attr.class("bc-file-input__file-item"),t.html.div(t.attr.class("bc-file-input__file-icon"),st(V)),t.html.div(t.attr.class("bc-file-input__file-info"),t.html.div(t.attr.class("bc-file-input__file-name"),t.attr.title(V.$.name),V.$.name),t.html.div(t.attr.class("bc-file-input__file-meta"),t.computedOf(V.$.size,C.$.fileSizeUnits)((_,M)=>b.formatFileSize(_,{units:M}))," • ",t.computedOf(V.$.type,C.$.unknownType)((_,M)=>_||M))),b.CloseButton({size:"sm",label:C.$.removeFile,disabled:u,onClick:()=>w(y)},t.attr.class("bc-file-input__remove-button")))})),t.When(p.map(({length:V})=>V>1),()=>t.html.div(t.attr.class("bc-file-input__clear-all-button-container"),t.html.button(t.attr.type("button"),t.attr.class("bc-file-input__clear-all-button"),t.attr.disabled(u),C.$.clearAllFiles,t.on.click(V=>{V.preventDefault(),V.stopPropagation(),h()})))))))))},...n))};async function dt(e){return new Promise((n,l)=>{const a=new FileReader;a.readAsDataURL(e),a.onload=()=>{const r=a.result;n(r.split(",")[1])},a.onerror=r=>l(r)})}function Wt(e){return Promise.all(e.map(dt))}function Pt(e){if(e.length>=4){if(e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71)return"image/png";if(e[0]===255&&e[1]===216)return"image/jpeg";if(e[0]===71&&e[1]===73&&e[2]===70)return"image/gif";if(e[0]===82&&e[1]===73&&e[2]===70&&e[3]===70&&e.length>=12&&e[8]===87&&e[9]===69&&e[10]===66&&e[11]===80)return"image/webp"}try{if(new TextDecoder("utf-8").decode(e.slice(0,256)).includes("<svg"))return"image/svg+xml"}catch{}return"application/octet-stream"}function jt(e){const n=Ot(e??""),l=n.length,a=new Uint8Array(l);for(let r=0;r<l;r++)a[r]=n.charCodeAt(r);return a}function mt(e){const{value:n,onChange:l,onInput:a,...r}=e,o=new Map,s=t.Value.toSignal(n).map(m=>m.map((d,v)=>{const p=o.get(d),x=jt(d??""),f=p?.type||Pt(x),w=p?.name??`file-${v}`,h=x.buffer.slice(x.byteOffset,x.byteOffset+x.byteLength),g=new Blob([h],{type:f});return new File([g],w,{type:f})})),c=m=>d=>{m&&Wt(d).then(v=>{for(const[p,x]of v.entries())o.set(x,{name:d[p].name,type:d[p].type});m(v)})},u=c(l),i=c(a);return pt({...r,value:s,onChange:u,onInput:i})}function Ht(e){const{value:n,onInput:l,onChange:a,...r}=e;return mt({...r,maxFiles:1,value:t.Value.map(n,o=>o==null?[]:[o]),onChange:o=>{a?.(o[0])},onInput:o=>{l?.(o[0])}})}function J(e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:[0,0,0]}function K(e,n,l){const a=r=>r.toString(16).padStart(2,"0");return`#${a(Math.max(0,Math.min(255,e)))}${a(Math.max(0,Math.min(255,n)))}${a(Math.max(0,Math.min(255,l)))}`}function Zt(e){if(!e)return[0,0,0,1];const l=e.trim().match(/^#?([a-fA-F0-9]{3,4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$/);if(l){const d=l[1];if(d.length===8){const v=parseInt(d.slice(0,2),16),p=parseInt(d.slice(2,4),16),x=parseInt(d.slice(4,6),16),f=parseInt(d.slice(6,8),16)/255;return[v,p,x,f]}if(d.length===6)return[parseInt(d.slice(0,2),16),parseInt(d.slice(2,4),16),parseInt(d.slice(4,6),16),1];if(d.length===4){const v=parseInt(d[0]+d[0],16),p=parseInt(d[1]+d[1],16),x=parseInt(d[2]+d[2],16),f=parseInt(d[3]+d[3],16)/255;return[v,p,x,f]}if(d.length===3){const v=parseInt(d[0]+d[0],16),p=parseInt(d[1]+d[1],16),x=parseInt(d[2]+d[2],16);return[v,p,x,1]}}const a=e.match(/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0|1|0?\.\d+)\s*\)$/i);if(a)return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10),parseFloat(a[4])];const r=e.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i);if(r)return[parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),1];const o=e.match(/^hsla?\(\s*([+-]?[\d.]+)(?:deg)?\s*[ ,]?\s*([\d.]+)%\s*[ ,]?\s*([\d.]+)%\s*(?:[/,]\s*(\d?(?:\.\d+)?))?\s*\)$/i);if(o){const d=parseFloat(o[1]),v=parseFloat(o[2]),p=parseFloat(o[3]),x=o[4]!=null?parseFloat(o[4]):1,[f,w,h]=ft(d,v/100,p/100);return[f,w,h,x]}const s=e.match(/^hwb\(\s*([+-]?[\d.]+)(?:deg)?\s*[, ]\s*([\d.]+)%\s*[, ]\s*([\d.]+)%\s*(?:[/]\s*(\d?(?:\.\d+)?))?\s*\)$/i);if(s){const d=parseFloat(s[1]),v=parseFloat(s[2])/100,p=parseFloat(s[3])/100,x=s[4]!=null?parseFloat(s[4]):1,[f,w,h]=Xt(d,v,p);return[f,w,h,x]}const c=e.match(/^oklch\(\s*([+-]?[\d.]+%?)\s+([\d.]+)\s+([+-]?[\d.]+)(?:deg)?(?:\s*\/\s*(\d?(?:\.\d+)?))?\s*\)$/i);if(c){const d=c[1],v=parseFloat(c[2]),p=parseFloat(c[3]),x=c[4]!=null?parseFloat(c[4]):1,f=d.endsWith("%")?Math.max(0,Math.min(1,parseFloat(d)/100)):Math.max(0,Math.min(1,parseFloat(d))),[w,h,g]=Qt(f,v,p);return[w,h,g,x]}const[u,i,m]=J(e);return[u,i,m,1]}const qt=(e,n,l,a)=>`rgba(${Math.round(e)}, ${Math.round(n)}, ${Math.round(l)}, ${Math.max(0,Math.min(1,Math.round(a*100)/100))})`;function Yt(e){let n=e+1831565813;return function(){return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}function ft(e,n,l){e=(e%360+360)%360;const a=(1-Math.abs(2*l-1))*n,r=a*(1-Math.abs(e/60%2-1)),o=l-a/2;let s=0,c=0,u=0;return 0<=e&&e<60?[s,c,u]=[a,r,0]:60<=e&&e<120?[s,c,u]=[r,a,0]:120<=e&&e<180?[s,c,u]=[0,a,r]:180<=e&&e<240?[s,c,u]=[0,r,a]:240<=e&&e<300?[s,c,u]=[r,0,a]:[s,c,u]=[a,0,r],[Math.round((s+o)*255),Math.round((c+o)*255),Math.round((u+o)*255)]}function Xt(e,n,l){e=(e%360+360)%360;const a=n+l;a>1&&(n/=a,l/=a);const[r,o,s]=ft(e,1,.5).map(d=>d/255),c=1-n-l,u=r*c+n,i=o*c+n,m=s*c+n;return[Math.round(u*255),Math.round(i*255),Math.round(m*255)]}function tt(e,n,l){e/=255,n/=255,l/=255;const a=Math.max(e,n,l),r=Math.min(e,n,l);let o=0,s=0;const c=(a+r)/2,u=a-r;if(u!==0){switch(s=c>.5?u/(2-a-r):u/(a+r),a){case e:o=(n-l)/u+(n<l?6:0);break;case n:o=(l-e)/u+2;break;default:o=(e-n)/u+4}o*=60}return[Math.round(o),Math.round(s*100),Math.round(c*100)]}function Gt(e,n,l){const[a]=tt(e,n,l),r=e/255,o=n/255,s=l/255,c=Math.min(r,o,s),u=1-Math.max(r,o,s);return[a,Math.round(c*100),Math.round(u*100)]}function Y(e){const n=e/255;return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function X(e){const n=e<=.0031308?12.92*e:1.055*Math.pow(e,.4166666666666667)-.055;return Math.round(Math.max(0,Math.min(1,n))*255)}function Qt(e,n,l){const a=l*Math.PI/180,r=Math.cos(a)*n,o=Math.sin(a)*n,s=e+.3963377774*r+.2158037573*o,c=e-.1055613458*r-.0638541728*o,u=e-.0894841775*r-1.291485548*o,i=s*s*s,m=c*c*c,d=u*u*u,v=4.0767416621*i-3.3077115913*m+.2309699292*d,p=-1.2684380046*i+2.6097574011*m-.3413193965*d,x=-.0041960863*i-.7034186147*m+1.707614701*d;return[X(v),X(p),X(x)]}function Jt(e,n,l){const a=Y(e),r=Y(n),o=Y(l),s=.4122214708*a+.5363325363*r+.0514459929*o,c=.2119034982*a+.6806995451*r+.1073969566*o,u=.0883024619*a+.2817188376*r+.6299787005*o,i=Math.cbrt(s),m=Math.cbrt(c),d=Math.cbrt(u),v=.2104542553*i+.793617785*m-.0040720468*d,p=1.9779984951*i-2.428592205*m+.4505937099*d,x=.0259040371*i+.7827717662*m-.808675766*d,f=Math.sqrt(p*p+x*x);let w=Math.atan2(x,p)*180/Math.PI;return w<0&&(w+=360),[v,f,w]}function W(e,n,l,a,r,o){switch(r){case"hex":if(o){const s=u=>u.toString(16).padStart(2,"0"),c=Math.max(0,Math.min(255,Math.round(a*255)));return`#${s(e)}${s(n)}${s(l)}${s(c)}`}return K(e,n,l);case"rgb":return`rgb(${e}, ${n}, ${l})`;case"rgba":return`rgba(${e}, ${n}, ${l}, ${Math.round(a*100)/100})`;case"hsl":{const[s,c,u]=tt(e,n,l);return`hsl(${s}, ${c}%, ${u}%)`}case"hsla":{const[s,c,u]=tt(e,n,l);return`hsla(${s}, ${c}%, ${u}%, ${Math.round(a*100)/100})`}case"hwb":{const[s,c,u]=Gt(e,n,l);return a<1?`hwb(${s} ${c}% ${u}% / ${Math.round(a*100)/100})`:`hwb(${s} ${c}% ${u}%)`}case"oklch":{const[s,c,u]=Jt(e,n,l),i=(Math.round(s*1e3)/1e3).toFixed(3),m=(Math.round(c*1e3)/1e3).toFixed(3),d=(Math.round(u*10)/10).toFixed(1),v=Math.round(a*100)/100;return o||a<1?`oklch(${i} ${m} ${d} / ${v})`:`oklch(${i} ${m} ${d})`}}}function P(e,n){return n?e==="rgb"?"rgba":e==="hsl"?"hsla":e:e==="rgba"?"rgb":e==="hsla"?"hsl":e}function Kt(e,n){const[l,a,r]=e,o=l<<16^a<<8^r,s=Yt(o),c=6+Math.floor(s()*5),u=.18+s()*.06,i=[];for(let p=0;p<c;p++){const x=p/c*Math.PI*2,f=n*(1+(s()*2-1)*u),w=Math.cos(x)*f,h=Math.sin(x)*f;i.push({x:w,y:h})}const m=(i[0].x+i[c-1].x)/2,d=(i[0].y+i[c-1].y)/2;let v=`M ${m.toFixed(3)} ${d.toFixed(3)}`;for(let p=0;p<c;p++){const x=i[p],f=i[(p+1)%c],w=(x.x+f.x)/2,h=(x.y+f.y)/2;v+=` Q ${x.x.toFixed(3)} ${x.y.toFixed(3)} ${w.toFixed(3)} ${h.toFixed(3)}`}return v+=" Z",v}const te=e=>{const{value:n,onBlur:l,onChange:a,onInput:r,displayValue:o,size:s,withAlpha:c}=e,u=t.Value.map(s??32,I=>I),i=t.Value.map(n,I=>Zt(I??"#000000")),m=t.Value.map(i,([I,y,_])=>[I,y,_]),d=t.Value.map(i,([,,,I])=>I),v=t.prop(t.Value.get(d)??1),p=t.Value.map(c??!1,I=>I),x=t.Value.map(e.colorTextFormat??"rgb",I=>I),f=t.computedOf(m,v,x,p)(([I,y,_],M,E,$)=>W(I,y,_,M??1,P(E,$),$)),w=t.Value.map(e.colorTextFormat??"hex",I=>I),h=t.Value.map(u,I=>`0 0 ${I} ${I}`),g=t.computedOf(m,u)((I,y)=>Kt(I,y/2)),k=t.computedOf(m,v,p)(([I,y,_],M,E)=>E||M<1?qt(I,y,_,M):K(I,y,_)),C=t.html.div(t.attr.class("bc-color-input__control"),t.attr.class(t.Value.map(p,I=>I?"bc-color-input__control--alpha":"")),t.attr.style(t.computedOf(u)(I=>`min-width:${I+2}px;height:${I+2}px`)),t.svg.svg(t.attr.class("bc-color-input__svg"),t.svgAttr.viewBox(h),t.svg.path(t.svgAttr.d(g),t.svgAttr.fill(k))),t.html.input(t.attr.type("color"),b.CommonInputAttributes(e),t.attr.value(t.Value.map(m,([I,y,_])=>K(I,y,_))),t.attr.class("bc-input bc-color-input bc-color-input__native"),l!=null?t.on.blur(l):t.Empty,a!=null?t.on.change(I=>{const y=I.target.value;if(!a)return;const[_,M,E]=J(y),$=t.Value.get(v)??1,F=P(t.Value.get(w),t.Value.get(p)),D=W(_,M,E,$,F,t.Value.get(p));a(D)}):t.Empty,r!=null?t.on.input(I=>{const y=I.target.value;if(!r)return;const[_,M,E]=J(y),$=t.Value.get(v)??1,F=P(t.Value.get(w),t.Value.get(p)),D=W(_,M,E,$,F,t.Value.get(p));r(D)}):t.Empty)),V=t.When(p,()=>t.html.input(t.attr.type("range"),t.attr.class("bc-color-input__alpha"),t.attr.min(0),t.attr.max(1),t.attr.step(.01),t.attr.value(t.Value.map(v,I=>String(I??1))),t.attr.disabled(e.disabled),t.on.input(I=>{const y=parseFloat(I.target.value);v.set(y);const[_,M,E]=t.Value.get(m),$=P(t.Value.get(w),t.Value.get(p)),F=W(_,M,E,y,$,t.Value.get(p));r?.(F)}),t.on.change(I=>{const y=parseFloat(I.target.value);v.set(y);const[_,M,E]=t.Value.get(m),$=P(t.Value.get(w),t.Value.get(p)),F=W(_,M,E,y,$,t.Value.get(p));a?.(F)})));return b.InputContainer({baseContainer:!0,...e,growInput:!1,input:C,after:t.Fragment(t.When(o??!1,()=>t.html.span(t.attr.class("bc-color-input__rgb"),f)),V,e.after)})},nt="$$tts-exp-",ht=(e,n)=>t.WithElement(l=>{const a=`${nt}${e}`;return t.OnDispose(t.Value.on(n,r=>Reflect.set(l,a,r)))}),ee=(e,n)=>{const l=`${nt}${e}`;return a=>{n(Reflect.get(a.target,l))}},gt=(e,n)=>{const l=`${nt}${e}`;return a=>{const r=a.target,o=r.selectedIndex,s=r.options[o];n(Reflect.get(s,l))}};function ne(e,n,l){const a=["bc-card"];return e!=="default"&&a.push(`bc-card--${e}`),n!=="md"&&a.push(`bc-card--padding-${n}`),l!=="lg"&&a.push(`bc-card--rounded-${l}`),a.join(" ")}function ae({variant:e="default",size:n="md",roundedness:l="lg"}={},...a){return t.html.div(t.attr.class(t.computedOf(e,n,l)((r,o,s)=>ne(r??"default",o??"md",s??"lg"))),...a)}function j(...e){return t.html.div(t.attr.class("bc-group"),...e)}const re=({startEditing:e,value:n,onChange:l,placeholder:a,disabled:r})=>{const o=t.Value.deriveProp(e??!1),s=t.prop(!1),c=t.Value.map(r??!1,u=>u);return t.html.div(t.attr.class("bc-editable-text"),t.attr.class(t.Value.map(c,u=>u?"bc-editable-text--disabled":"")),t.aria.disabled(c),t.When(o,()=>t.html.input(t.attr.placeholder(a),t.attr.value(n),t.attr.class("bc-editable-text__input"),et.AutoSelect(),t.on.keydown(u=>{u.key==="Enter"?o.set(!1):u.key==="Escape"&&(s.set(!0),o.set(!1))}),t.on.blur(t.emitValue(u=>{if(o.set(!1),s.value){s.set(!1);return}l(u)}))),()=>t.html.span(t.on.click(()=>{t.Value.get(c)||o.set(!0)}),t.attr.class("bc-editable-text__display"),t.When(t.Value.map(n,u=>u!=null&&u.trim()!==""),()=>t.html.span(t.attr.class("bc-editable-text__text"),n),()=>t.html.span(t.attr.class("bc-editable-text__placeholder"),a)),t.When(t.Value.map(c,u=>!u),()=>t.html.button(t.attr.class("bc-editable-text__edit-button"),t.Use(b.BeatUII18n,u=>t.aria.label(u.$.editLabel)),t.on.click(()=>o.set(!0)),b.Icon({icon:"line-md/pencil",color:"neutral"}))))))},bt=(e,n,l)=>t.Ensure(e,a=>t.OneOfType(a,{value:r=>{const o=t.computedOf(r,l)((s,c)=>n(s.value,c));return t.html.option(t.OnDispose(o.dispose),t.attr.selected(o),ht("value",r.$.value),r.$.label)},group:r=>t.html.optgroup(t.attr.label(r.$.group),t.ForEach(r.$.options,o=>bt(o,n,l))),break:()=>t.html.hr()})),vt=e=>{const{value:n,onBlur:l,onChange:a,options:r,unselectedLabel:o,equality:s=(i,m)=>i===m,after:c}=e;let u;return b.InputContainer({...e,after:t.Fragment(b.Icon({icon:"ph:caret-down-bold",color:"neutral",size:"sm"}),c),input:t.html.select(t.WithElement(i=>{u=i;const m=new MutationObserver(d=>{const{removedNodes:v}=d[0];v.length>0&&(u.selectedIndex=0)});return m.observe(i,{childList:!0}),t.OnDispose(()=>m.disconnect())}),b.CommonInputAttributes(e),t.attr.class("bc-native-select bc-input"),t.Use(b.BeatUII18n,i=>t.html.option(t.attr.hidden("hidden"),t.coalesce(o,i.$.selectOne))),t.ForEach(r,i=>bt(i,s,n)),l!=null?t.on.blur(l):t.Empty,a!=null?t.on.change(gt("value",i=>a(i))):t.Empty)},t.on.click(()=>{u?.focus(),typeof u?.showPicker=="function"&&u.showPicker()}))};function xt(e){const{controller:n,onChange:l,onBlur:a,...r}=e;return vt({...r,value:n.value,onChange:b.makeOnChangeHandler(n,l),onBlur:b.makeOnBlurHandler(n,a)})}function le(e){return b.InputWrapper({...e,content:xt(e)})}function It(e,n,l){const a=e.length.map(r=>r);return t.Fragment(t.OnDispose(()=>a.dispose()),t.Repeat(a,r=>{const o=e.item(r.index),s=[];return t.Fragment(t.OnDispose(()=>{o.dispose(),s.forEach(c=>c())}),n({list:e,item:o,position:r,remove:()=>e.removeAt(r.index),move:c=>{switch(c){case"up":if(r.index===0)return;e.move(r.index,r.index-1);break;case"down":if(r.index===e.length.value-1)return;e.move(r.index,r.index+1);break;case"first":e.move(r.index,0);break;case"last":e.move(r.index,e.length.value-1)}},canMove:c=>{const u=(()=>{switch(c){case"up":return t.signal(r.index>0);case"down":return e.length.map(i=>r.index<i-1)}})();return s.push(()=>u.dispose()),u},cannotMove:c=>{const u=(()=>{switch(c){case"up":return t.signal(r.index===0);case"down":return e.length.map(i=>r.index===i-1)}})();return s.push(()=>u.dispose()),u}}))},l))}const ot={9:{pattern:/^[0-9]$/},A:{pattern:/^[A-Za-z]$/,transform:e=>e.toUpperCase()},"*":{pattern:/^.$/}},se=e=>e instanceof RegExp;function Vt(e,n,l){if(e==null)return[];const a=l?{...ot,...n}:n??ot,r=(s,c)=>{const u=a[c];u?s.push({type:"pattern",name:c,...u}):s.push({type:"literal",char:c})},o=[];if(typeof e=="string"){for(const s of e)r(o,s);return o}for(const s of e)if(typeof s=="string")if(s.length<=1)r(o,s);else for(const c of s)r(o,c);else se(s)?o.push({type:"pattern",pattern:s}):typeof s=="object"&&s&&o.push(s);return o}function oe(e,n){return l=>{switch(e){case"digits":return/[0-9]/.test(l);case"letters":return/[A-Za-z]/.test(l);case"alphanumeric":return/[A-Za-z0-9]/.test(l);case"custom":return n?.(l)??!0;default:return!0}}}function ut(e,n,l,a,r,o){const s={raw:e,previousConformed:n,cursor:r??e.length,completed:!1},c=a.definitions??{},u=typeof l=="function"?l(e,s):l,i=Vt(u,c,a.useDefaultDefinitions??!0),m=oe(a.allowMode,a.allow),d=new Set;for(const $ of i)$.type==="literal"&&d.add($.char);if(a.prefix)for(const $ of a.prefix)d.add($);if(a.suffix)for(const $ of a.suffix)d.add($);const v=Array.from(e).filter($=>m($)&&!d.has($));if(v.length===0)return{value:"",cursor:0,completed:!1};const p=[],x=[];let f=0,w=0,h=0,g=-1;for(const $ of i){if($.type==="literal"){p.push($.char),x.push({kind:"literal",filled:!0});continue}w+=$.optional?0:1;const F=v[f];if(F==null)break;if($.type==="any"){h++,p.push($.transform?$.transform(F):F),x.push({kind:"slot",filled:!0}),g=x.length-1,f++;continue}if($.type==="pattern")if($.pattern.test(F)){h++;const D=$.transform?$.transform(F):F;p.push(D),x.push({kind:"slot",filled:!0}),g=x.length-1,f++}else{f++;continue}}const k=p.join(""),C=(a.prefix??"")+k+(a.suffix??"");let I=(a.prefix??"").length;if(g>=0){let $=g+1;if((o?.policy??"smart")!=="sticky")for(;$<x.length&&x[$].kind==="literal";)$++;I+=$}const y=a.completion?.mode==="min"?(a.completion.minChars??0)<=h:a.completion?.mode==="custom"?!!a.completion.isComplete?.(C):w>0&&h>=w,_=a.pipe?.(C,{...s,completed:y});let M,E=I;return _===!1?(M=n,E=n.length):typeof _=="string"?(M=_,E=_.length):typeof _=="object"&&_?(M=_.value,E=_.cursor??_.value.length):M=C,{value:M,cursor:E,completed:y}}function ue(e,n){const l=n?.strategy??"none";return l==="custom"&&n?.unmask?n.unmask(e):l==="strip"?e.replace(/[^A-Za-z0-9]/g,""):e}const at=e=>{const{value:n,onBlur:l,onChange:a,onInput:r,onAccept:o,onComplete:s,mask:c,definitions:u,useDefaultDefinitions:i,extraLiterals:m,prefix:d,suffix:v,autofix:p,pipe:x,completion:f,unmask:w,allowMode:h,allow:g,placeholder:k,placeholderOptions:C}=e,V=t.computedOf(n,c,u,i,m,d,v,p,f,w,h,k,C)((y,_,M,E,$,F,D,R,z,L,O,H,B)=>_?ut(y??"","",_,{definitions:M??{},useDefaultDefinitions:E??!0,extraLiterals:$??[],autofix:R??"none",completion:z??{mode:"mask"},pipe:x??(A=>A),unmask:L??{strategy:"none"},allowMode:O??"all",allow:g,prefix:F,suffix:D}).value:y??""),I=(y,_)=>{const M=y.value??"",E=t.Value.get(n)??"",$=c!=null?t.Value.get(c):null,F=u!=null?t.Value.get(u):void 0,D=i!=null?t.Value.get(i):void 0,R=m!=null?t.Value.get(m):void 0,z=p!=null?t.Value.get(p):void 0,L=f!=null?t.Value.get(f):void 0,O=w!=null?t.Value.get(w):void 0,H=h!=null?t.Value.get(h):void 0,B=d!=null?t.Value.get(d):void 0,A=v!=null?t.Value.get(v):void 0,{value:U,cursor:q,completed:rt}=$?ut(M,E,$,{definitions:F??{},useDefaultDefinitions:D??!0,extraLiterals:R??[],autofix:z??"none",completion:L??{mode:"mask"},pipe:x??(Et=>Et),unmask:O??{strategy:"none"},allowMode:H??"all",allow:g,prefix:B,suffix:A},y.selectionStart??M.length,e.cursor?t.Value.get(e.cursor):void 0):{value:M,cursor:M.length,completed:!0};if(U!==M){y.value=U;try{y.setSelectionRange(q,q)}catch{}}const lt=ue(U,O);o?.({raw:lt,conformed:U,completed:rt,cursor:q}),_==="input"?r?.(U):(a?.(U),rt&&s?.({raw:lt,conformed:U}))};return b.InputContainer({...e,input:t.input.text(b.CommonInputAttributes(e),t.attr.value(V),t.attr.class("bc-input"),l!=null?t.on.blur(l):t.Empty,t.WithElement(y=>y instanceof HTMLInputElement?t.Fragment(t.on.input(()=>I(y,"input")),t.on.change(()=>I(y,"change")),t.on.keydown(_=>{if(_.key!=="Backspace"||!(e.cursor?t.Value.get(e.cursor)?.backspaceRubberBand??!0:!0))return;const E=y.selectionStart??0,$=y.selectionEnd??E;if(E!==$||E<=0)return;const F=y.value??"",D=c!=null?t.Value.get(c):null;if(!D)return;const R=u!=null?t.Value.get(u):void 0,z=i!=null?t.Value.get(i):!0,L=d!=null?t.Value.get(d):void 0,O=v!=null?t.Value.get(v):void 0,H=Vt(typeof D=="function"?D(F,{raw:F,previousConformed:F,cursor:E,completed:!1}):D,R??{},z??!0),B=new Set;for(const A of H)A.type==="literal"&&B.add(A.char);if(L)for(const A of L)B.add(A);if(O)for(const A of O)B.add(A);if(B.has(F[E-1])){let A=E-1;for(;A>=0&&B.has(F[A]);)A--;A>=0&&(_.preventDefault(),_.stopPropagation(),y.value=F.slice(0,A)+F.slice(A+1),I(y,"input"))}})):t.Empty))})};function S(e,n,l){const a=t.Value.map(e,o=>o!=null),r=b.defaultMessages.clearValue;return t.When(a,()=>t.html.button(t.attr.type("button"),t.attr.class("bc-input-container__reset"),t.aria.label(r),t.attr.title(r),t.attr.disabled(n??!1),b.Icon({icon:"mdi:close",size:"sm"}),t.on.click(o=>{o.preventDefault(),o.stopPropagation(),l?.(null)})))}const ce=e=>{const{value:n,onBlur:l,onChange:a,after:r,disabled:o}=e,s=S(n,o,a);return b.InputContainer({...e,input:t.input.date(b.CommonInputAttributes(e),t.attr.valueAsDate(n),t.attr.class("bc-input"),l!=null?t.on.blur(t.emitValue(l)):t.Empty,a!=null?t.on.change(t.emitValueAsNullableDate(a)):t.Empty),after:r!=null?t.Fragment(s,r):s})},ie=e=>{const n=e.getFullYear(),l=e.getMonth()+1,a=e.getDate(),r=e.getHours(),o=e.getMinutes(),s=e.getSeconds();return`${n}-${l.toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}T${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`},pe=e=>{const{value:n,onBlur:l,onChange:a,after:r,disabled:o}=e,s=t.Value.map(n,u=>u!=null?ie(u):null),c=S(n,o,a);return b.InputContainer({...e,input:t.input["datetime-local"](b.CommonInputAttributes(e),t.attr.value(t.Value.map(s,u=>u??null)),t.attr.class("bc-input"),l!=null?t.on.blur(t.emitValue(l)):t.Empty,a!=null?t.on.change(t.emitValueAsNullableDateTime(a)):t.Empty),after:r!=null?t.Fragment(c,r):c})},T=e=>typeof e=="string"&&e.trim()===""?null:e,N=e=>e??"",de=e=>{const{value:n,onBlur:l,onChange:a,onInput:r,after:o,disabled:s,...c}=e,u=S(n,s,a);return b.TextInput({...c,value:t.Value.map(n,N),onChange:a!=null?i=>a(T(i)):void 0,onInput:r!=null?i=>r(T(i)):void 0,onBlur:l,after:o!=null?t.Fragment(u,o):u})},me=e=>{const{value:n,onBlur:l,onChange:a,onInput:r,after:o,disabled:s,...c}=e,u=S(n,s,a);return b.EmailInput({...c,value:t.Value.map(n,N),onChange:a!=null?i=>a(T(i)):void 0,onInput:r!=null?i=>r(T(i)):void 0,onBlur:l,after:o!=null?t.Fragment(u,o):u})},fe=e=>{const{value:n,onBlur:l,onChange:a,onInput:r,after:o,disabled:s,...c}=e,u=S(n,s,a);return b.PasswordInput({...c,value:t.Value.map(n,N),onChange:a!=null?i=>a(T(i)):void 0,onInput:r!=null?i=>r(T(i)):void 0,onBlur:l,after:o!=null?t.Fragment(u,o):u})},wt=e=>{const{value:n,onBlur:l,onChange:a,onInput:r,rows:o}=e;return b.InputContainer({...e,input:t.html.textarea(b.CommonInputAttributes(e),t.attr.rows(o??3),t.attr.value(n),t.attr.class("bc-input"),l!=null?t.on.blur(t.emitValue(l)):t.Empty,a!=null?t.on.change(t.emitValue(a)):t.Empty,r!=null?t.on.input(t.emitValue(r)):t.Empty)})},he=e=>{const{value:n,onBlur:l,onChange:a,onInput:r,after:o,disabled:s,...c}=e,u=S(n,s,a);return wt({...c,value:t.Value.map(n,N),onChange:a!=null?i=>a(T(i)):void 0,onInput:r!=null?i=>r(T(i)):void 0,onBlur:l,after:o!=null?t.Fragment(u,o):u})},ge=e=>{const{value:n,step:l,min:a,max:r,onBlur:o,onChange:s,onInput:c,after:u}=e,i=v=>{const p=a!=null?t.Value.get(a):void 0,x=r!=null?t.Value.get(r):void 0;return p!=null&&v<p?p:x!=null&&v>x?x:v},m=l!=null?t.Use(b.BeatUII18n,v=>{const p=t.computedOf(n,a)((h,g)=>g==null?!0:(h??0)>g),x=t.computedOf(n,r)((h,g)=>g==null?!0:(h??0)<g),f=h=>{const g=t.Value.get(n)??0,k=t.Value.get(l),C=h?.shiftKey?10:1,V=g-k*C,I=a!=null?t.Value.get(a):void 0;if(I!=null&&V<I)return;const y=i(V);y!==g&&s&&s(y)},w=h=>{const g=t.Value.get(n)??0,k=t.Value.get(l),C=h?.shiftKey?10:1,V=g+k*C,I=r!=null?t.Value.get(r):void 0;if(I!=null&&V>I)return;const y=i(V);y!==g&&s&&s(y)};return b.Stack(t.attr.class("bc-number-input-steppers"),t.html.button(t.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),t.attr.disabled(t.computedOf(x,e.disabled??!1)((h,g)=>!h||g)),t.on.click(h=>w(h)),t.aria.label(v.$.incrementValue),b.Icon({icon:"line-md:plus",size:"xs"})),t.html.button(t.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),t.attr.disabled(t.computedOf(p,e.disabled??!1)((h,g)=>!h||g)),t.on.click(h=>f(h)),t.aria.label(v.$.decrementValue),b.Icon({icon:"line-md:minus",size:"xs"})))}):null,d=u!=null&&m!=null?t.Fragment(m,u):u??m;return b.InputContainer({...e,input:t.input.number(a!=null?t.Fragment(t.attr.min(a),t.OnDispose(t.Value.on(a,v=>{v<t.Value.get(n)}))):t.Empty,r!=null?t.Fragment(t.attr.max(r),t.OnDispose(t.Value.on(r,v=>{v>t.Value.get(n)}))):t.Empty,b.CommonInputAttributes(e),t.attr.valueAsNumber(n),t.attr.step(l),t.attr.class("bc-input bc-number-input"),o!=null?t.on.blur(t.emitValue(o)):t.Empty,s!=null?t.on.change(t.emitValueAsNumber(s)):t.Empty,c!=null?t.on.input(t.emitValueAsNumber(c)):t.Empty,l!=null?t.on.wheel(v=>{v.preventDefault();const p=t.Value.get(n)??0,x=t.Value.get(l),f=v.shiftKey?10:1,w=v.deltaY<0?x*f:-x*f,h=i(p+w);h!==p&&s&&s(h)}):t.Empty),after:d})},ct=e=>{if(e==null||e==="")return null;const n=Number(e);return Number.isNaN(n)?null:n},be=e=>{const{value:n,step:l,min:a,max:r,onBlur:o,onChange:s,onInput:c,after:u}=e,i=p=>{const x=a!=null?t.Value.get(a):void 0,f=r!=null?t.Value.get(r):void 0;return x!=null&&p<x?x:f!=null&&p>f?f:p},m=(()=>{if(l==null)return null;const p=t.computedOf(n,a)((g,k)=>{const C=g??0;return k==null?!0:C>k}),x=t.computedOf(n,r)((g,k)=>{const C=g??0;return k==null?!0:C<k}),f=g=>{const k=t.Value.get(n)??0,C=t.Value.get(l),V=g?.shiftKey?10:1,I=k-C*V,y=a!=null?t.Value.get(a):void 0;if(y!=null&&I<y)return;const _=i(I);_!==k&&s&&s(_)},w=g=>{const k=t.Value.get(n)??0,C=t.Value.get(l),V=g?.shiftKey?10:1,I=k+C*V,y=r!=null?t.Value.get(r):void 0;if(y!=null&&I>y)return;const _=i(I);_!==k&&s&&s(_)};return((g,k)=>b.Stack(t.attr.class("bc-number-input-steppers"),t.html.button(t.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),t.attr.disabled(t.computedOf(x,e.disabled??!1)((C,V)=>!C||V)),t.on.click(C=>w(C)),t.aria.label(g),b.Icon({icon:"line-md:plus",size:"xs"})),t.html.button(t.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),t.attr.disabled(t.computedOf(p,e.disabled??!1)((C,V)=>!C||V)),t.on.click(C=>f(C)),t.aria.label(k),b.Icon({icon:"line-md:minus",size:"xs"}))))(b.defaultMessages.incrementValue,b.defaultMessages.decrementValue)})(),d=S(n,e.disabled,s),v=u!=null&&m!=null?t.Fragment(m,d,u):u!=null?t.Fragment(d,u):m!=null?t.Fragment(m,d):d;return b.InputContainer({...e,input:t.input.number(a!=null?t.Fragment(t.attr.min(a),t.OnDispose(t.Value.on(a,p=>{}))):t.Empty,r!=null?t.Fragment(t.attr.max(r),t.OnDispose(t.Value.on(r,p=>{}))):t.Empty,b.CommonInputAttributes(e),t.attr.value(t.Value.map(n,p=>p==null?"":String(p))),t.attr.step(l),t.attr.class("bc-input bc-number-input"),o!=null?t.on.blur(t.emitValue(o)):t.Empty,s!=null?t.on.change(t.emitValue(p=>{const x=ct(p);s(x)})):t.Empty,c!=null?t.on.input(t.emitValue(p=>{const x=ct(p);c(x)})):t.Empty,l!=null?t.on.wheel(p=>{p.preventDefault();const x=t.Value.get(n)??0,f=t.Value.get(l),w=p.shiftKey?10:1,h=p.deltaY<0?f*w:-f*w,g=i(x+h);g!==x&&s&&s(g)}):t.Empty),after:v})},ve=({value:e,onChange:n,offLabel:l,onLabel:a,label:r,disabled:o=!1,size:s="md",id:c,color:u="primary"})=>{const i=c??b.sessionId("switch"),m=`${i}-label`;function d(f,w){const h=["bc-switch",`bc-switch--size-${w}`,`bc-switch--${w}`];return f&&h.push("bc-switch--disabled"),h.join(" ")}function v(f){const w=f??"primary",h=new Map,g=b.backgroundValue(w,"solid","light"),k=b.backgroundValue(w,"solid","dark");return h.set("--switch-track-on-bg",g.backgroundColor),h.set("--switch-track-on-label",g.textColor),h.set("--switch-track-on-bg-dark",k.backgroundColor),h.set("--switch-track-on-label-dark",k.textColor),h.set("--switch-track-on-border-dark",b.borderColorValue(w,"dark")),Array.from(h.entries()).map(([C,V])=>`${C}: ${V}`).join("; ")}const p=()=>{t.Value.get(o)||n(!t.Value.get(e))},x=f=>{t.Value.get(o)||(f.key===" "||f.key==="Enter")&&(f.preventDefault(),p())};return t.html.div(t.attr.class(t.computedOf(o??!1,s)((f,w)=>d(f??!1,w??"md"))),t.attr.style(t.computedOf(u)(f=>v(f))),t.attr.id(i),t.attr.role("switch"),t.attr.tabindex(t.Value.map(o,f=>f?-1:0)),t.aria.checked(e),t.aria.disabled(o),t.aria.labelledby(r!=null?m:void 0),t.on.click(p),t.on.keydown(x),r!=null?b.Label(t.attr.id(m),t.attr.class(`bc-switch__label bc-switch__label--size-${s} bc-switch__label--nowrap`),r):null,t.html.div(t.attr.class("bc-switch__track"),t.attr.class(t.Value.map(e,f=>f?"bc-switch__track--on":"bc-switch__track--off")),l!=null?t.html.div(t.aria.hidden(!0),t.attr.class("bc-switch__track-label bc-switch__track-label--off"),t.attr.class(t.Value.map(e,f=>f?"bc-switch__track-label--hidden":"bc-switch__track-label--visible")),l):null,a!=null?t.html.div(t.attr.class("bc-switch__track-label bc-switch__track-label--on"),t.attr.class(t.Value.map(e,f=>f?"bc-switch__track-label--visible":"bc-switch__track-label--hidden")),a):null,et.ElementRect(f=>t.Use(b.Locale,({direction:w})=>t.html.div(t.attr.class("bc-switch__thumb"),t.attr.class(t.Value.map(e,h=>h?"bc-switch__thumb--on":"bc-switch__thumb--off")),t.style.transform(t.computedOf(e,f,s,w)((h,{width:g},k,C)=>{const V=(()=>{switch(k){case"xs":return 5;case"sm":return 5.5;case"md":return 6;case"lg":return 7;case"xl":return 8}})(),I=C==="rtl"?`calc((var(--spacing-base) * ${V}) - ${g}px)`:`calc(${g}px - (var(--spacing-base) * ${V}))`;return h?`translateX(${I})`:"translateX(0)"})))))))},yt=e=>{const n={type:"pattern",pattern:/[0-9A-Fa-f]/,transform:a=>a.toLowerCase()};return at({...e,mask:[n,n,n,n,n,n,n,n,"-",n,n,n,n,"-",n,n,n,n,"-",n,n,n,n,"-",n,n,n,n,n,n,n,n,n,n,n,n],placeholder:e.placeholder??"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"})},xe=e=>{const{value:n,onBlur:l,onChange:a,onInput:r,after:o,disabled:s,...c}=e,u=S(n,s,a);return yt({...c,value:t.Value.map(n,N),onChange:a!=null?i=>a(T(i)):void 0,onInput:r!=null?i=>r(T(i)):void 0,onBlur:l,after:o!=null?t.Fragment(u,o):u})},Ie="line-md:star-alt-filled",Ve="line-md:star-alt",Ct=e=>{const{value:n,onChange:l,disabled:a,max:r=5,fullColor:o="yellow",emptyColor:s="neutral",fullIcon:c=Ie,emptyIcon:u=Ve,size:i="md",onBlur:m,rounding:d=1}=e,v=()=>{const g=t.Value.get(d);return g>0?g:1},p=g=>Math.min(Math.max(g,0),t.Value.get(r)),x=(g,k)=>{if(t.Value.get(a??!1))return;const V=g.currentTarget.getBoundingClientRect(),I=(g.clientX-V.left)/V.width,y=k-1+I,_=v(),M=Math.ceil(y/_)*_,E=p(M);l?.(E)},f=g=>{if(t.Value.get(a??!1))return;const k=v(),C=t.Value.get(n)??0;let V;switch(g.key){case"ArrowRight":case"ArrowUp":V=p(C+k);break;case"ArrowLeft":case"ArrowDown":V=p(C-k);break;case"Home":V=0;break;case"End":V=t.Value.get(r);break;default:return}g.preventDefault(),l?.(V)},w=t.Value.map(i,g=>`bc-icon--${g}`),h=({index:g,counter:k})=>t.html.span(t.attr.class("bc-rating-input__icon-container"),t.attr.class(w),b.Icon({icon:u,size:i,color:s,tone:"soft"},t.attr.class("bc-rating-input__icon-empty")),t.html.span(t.attr.class("bc-rating-input__icon-clipper"),t.attr.class(w),t.style.width(t.Value.map(n,C=>{const V=Math.floor(C);return V>g?"100%":V<g?"0%":`${(C-g)*100}%`})),b.Icon({icon:c,size:i,color:o,tone:"soft"},t.attr.class("bc-rating-input__icon-full"))),t.on.click(t.emit(C=>x(C,k),{preventDefault:!0,stopPropagation:!0})));return b.InputContainer({baseContainer:!0,growInput:!1,focusableSelector:'[role="slider"]',...e,input:t.html.div(b.CommonInputAttributes(e),t.attr.class("bc-rating-input"),t.attr.role("slider"),t.attr.tabindex(t.Value.map(a??!1,g=>g?-1:0)),t.aria.disabled(a??!1),t.aria.valuemin(0),t.aria.valuemax(t.Value.map(r,g=>g??0)),t.aria.valuenow(t.Value.map(n,g=>g??0)),t.aria.valuetext(t.computedOf(n,r)((g,k)=>{const C=g??0,V=k??0;return`${String(C)} / ${String(V)}`})),t.on.keydown(f),m!=null?t.on.blur(m):null,t.Repeat(r,h))})},we=e=>{const{value:n,onChange:l,onBlur:a,after:r,disabled:o,...s}=e,c=S(n,o,l);return Ct({...s,value:t.Value.map(n,u=>u??0),onChange:l,onBlur:a,after:r!=null?t.Fragment(c,r):c})},ye=e=>{const{value:n,step:l,min:a,max:r,onBlur:o,onChange:s,onInput:c}=e;return b.InputContainer({...e,focusableSelector:'input[type="range"]',input:t.html.input(t.attr.type("range"),b.CommonInputAttributes(e),t.attr.min(a),t.attr.max(r),t.attr.step(l),t.attr.valueAsNumber(n),t.attr.class("bc-input bc-slider-input"),o!=null?t.on.blur(t.emitValueAsNumber(o)):t.Empty,s!=null?t.on.change(t.emitValueAsNumber(s)):t.Empty,c!=null?t.on.input(t.emitValueAsNumber(c)):t.Empty)})},Ce=e=>{const{value:n,step:l,min:a,max:r,onBlur:o,onChange:s,onInput:c}=e,u=t.Value.map(n,m=>{if(m!=null)return m;const d=a!=null?t.Value.get(a):void 0;return typeof d=="number"?d:0}),i=S(n,e.disabled,m=>{s?.(m)});return b.InputContainer({...e,focusableSelector:'input[type="range"]',after:i,input:t.html.input(t.attr.type("range"),b.CommonInputAttributes(e),t.attr.min(a),t.attr.max(r),t.attr.step(l),t.attr.valueAsNumber(u),t.attr.class("bc-input bc-slider-input"),o!=null?t.on.blur(t.emitValueAsNumber(o)):t.Empty,s!=null?t.on.change(t.emitValueAsNumber(m=>{s(m)})):t.Empty,c!=null?t.on.input(t.emitValueAsNumber(m=>{c(m)})):t.Empty)},t.Fragment())};let G=null;async function Z(){const e=globalThis;return e.Temporal?e.Temporal:(G||(G=Promise.resolve().then(()=>require("./index.esm-DJRz9AE-.cjs")).then(n=>{const l=n.Temporal;return e.Temporal||(e.Temporal=l),l})),G)}const _t=(e,n)=>n?t.Task(Z,{then:e,pending:n.pending,error:n.error}):t.Task(Z,e),_e=/^P(\d+([YMWD]|$)){0,4}(T(\d+([HMS]|$)){0,3})?$/i,ke=/^P(?:(\d+Y)?(\d+M)?(\d+W)?(\d+D)?)(T(\d+H)?(\d+M)?(\d+S)?)?$/i;function kt(e){return{mask:null,allowMode:"custom",allow:n=>/[0-9ptwdhms]/i.test(n),pipe:n=>{const l=n.toUpperCase();return l.length===0?l:!l.startsWith("P")||!_e.test(l)?!1:l},completion:{mode:"custom",isComplete:n=>{const l=n.toUpperCase();if(!ke.test(l))return!1;try{return e(l),!0}catch{return!1}}}}}const it=(e,n)=>{if(e==null)return null;try{return e.Duration.from(n)}catch{return null}},$e=e=>{const{value:n,onChange:l,after:a,disabled:r,onBlur:o}=e,s=()=>{const i=S(n,r,l);return a!=null?t.Fragment(i,a):i},c=e.placeholder!=null?t.Empty:t.attr.placeholder("P0DT0H0M0S");return _t(i=>at({...e,value:t.Value.map(n,m=>m?.toString()??""),onChange:l?m=>l(m===""?null:i.Duration.from(m)):void 0,onInput:void 0,...kt(i.Duration.from),placeholder:"P0DT0H0M0S",after:s()}),{pending:()=>b.InputContainer({...e,input:t.input.text(b.CommonInputAttributes(e),t.attr.value(t.Value.map(n,i=>i?.toString()??"")),t.attr.class("bc-input"),c,o!=null?t.on.blur(()=>o()):t.Empty,l!=null?t.on.change(i=>{const d=i.currentTarget?.value??"";if(d===""){l(null);return}const v=globalThis.Temporal,p=it(v,d);if(p!=null){l(p);return}Z().then(x=>{const f=it(x,d);f!=null&&l(f)}).catch(()=>{})}):t.Empty),after:s()})})},$t=e=>{const{value:n,onBlur:l,onChange:a,onInput:r}=e;return b.InputContainer({...e,input:t.input.url(b.CommonInputAttributes(e),t.attr.value(n),t.attr.class("bc-input"),l!=null?t.on.blur(t.emitValue(l)):t.Empty,a!=null?t.on.change(t.emitValue(a)):t.Empty,r!=null?t.on.input(t.emitValue(r)):t.Empty)})},Me=e=>{const{value:n,onBlur:l,onChange:a,onInput:r,after:o,disabled:s,...c}=e,u=S(n,s,a);return $t({...c,value:t.Value.map(n,N),onChange:a!=null?i=>a(T(i)):void 0,onInput:r!=null?i=>r(T(i)):void 0,onBlur:l,after:o!=null?t.Fragment(u,o):u})},Mt=e=>{const{controller:n,element:l,separator:a,showMove:r=!0,showRemove:o=!0,showAdd:s=!0,createItem:c,addLabel:u,controlsLayout:i="aside",removeDisabled:m,addDisabled:d}=e,v=t.Value.toSignal(i).map(f=>f==="aside"),p=f=>{const w=t.When(r??!1,()=>t.html.div(t.attr.class("bc-group--align-center"),t.attr.class(v.map(g=>g?"bc-group--direction-column bc-group--gap-1":"bc-group--direction-row bc-group--gap-1")),b.Button({size:"xs",roundedness:"full",variant:"text",onClick:()=>f.move("up"),disabled:f.cannotMove("up")},t.Use(b.BeatUII18n,g=>b.Icon({size:"xs",icon:"line-md:arrow-up",title:g.$.incrementValue}))),b.Button({size:"xs",roundedness:"full",variant:"text",onClick:()=>f.move("down"),disabled:f.cannotMove("down")},t.Use(b.BeatUII18n,g=>b.Icon({size:"xs",icon:"line-md:arrow-down",title:g.$.decrementValue}))))),h=t.When(o,()=>t.Use(b.BeatUII18n,g=>b.CloseButton({size:"xs",label:t.Value.map(g.$.removeItem,k=>k.toLowerCase()),color:"danger",disabled:m,onClick:f.remove})));return g=>t.When(v,()=>j(t.attr.class("bc-group--gap-1 bc-group--align-center"),b.Stack(t.attr.class("bc-stack--grow"),g),b.Stack(t.attr.class("bc-stack--align-center"),t.When(n.value.map(k=>k.length>1),()=>w),h)),()=>b.Stack(t.attr.class("bc-stack--gap-2"),g,j(t.attr.class("bc-group--gap-2 bc-group--justify-between"),t.When(n.value.map(k=>k.length>1),()=>w,()=>t.html.div()),h)))},x=t.When(t.computedOf(s,c)((f,w)=>f&&w!=null),()=>j(t.attr.class("bc-group--gap-2 bc-group--align-center bc-group--justify-center"),b.Button({size:"sm",variant:"filled",onClick:()=>n.push(c()),disabled:t.computedOf(n.disabled,d??!1)((f,w)=>f||w)},t.Use(b.BeatUII18n,f=>j(t.attr.class("bc-group--gap-2"),b.Icon({icon:"line-md:plus"}),u??f.$.addLabel)))));return t.Fragment(It(n,f=>p(f)(l(f)),a),x)},Ee=(e,...n)=>{const{controller:l,element:a,separator:r,showMove:o,showRemove:s,showAdd:c,createItem:u,addLabel:i,controlsLayout:m,removeDisabled:d,addDisabled:v,...p}=e;return b.InputWrapper({...p,content:Mt({controller:l,element:a,separator:r,showMove:o,showRemove:s,showAdd:c,createItem:u,addLabel:i,controlsLayout:m,removeDisabled:d,addDisabled:v})},...n)};class Fe extends b.Controller{branches;activeBranch;#e;#t=new Map;constructor(n,l,a,r,o,s,c=b.O){super(n,l,a,r,o,c),this.branches=s;const u=m=>{for(const d of s)if(d.detect(m))return d.key;return s[0]?.key??"unknown"};this.activeBranch=a.map(u,b.O);const i=m=>{if(this.#t.has(m))return this.#t.get(m);const d=s.find(p=>p.key===m);if(!d)throw new Error(`Unknown branch: ${m}`);const v=new b.Controller([...n,m],p=>{this.change(p)},a.map(p=>d.detect(p)?p:d.defaultValue(),c),r.map(b.makeMapValidation([m])),{disabled:this.disabled,validationMode:this.parent.validationMode},c);return this.#t.set(m,v),v};this.#e=this.activeBranch.map(m=>i(m),b.O),this.onDispose(()=>{for(const m of this.#t.values())m.dispose();this.#t.clear(),this.activeBranch.dispose(),this.#e.dispose()})}get activeController(){return t.Value.get(this.#e)}getBranchController(n){const l=this.branches.find(r=>r.key===n);if(!l)throw new Error(`Unknown branch: ${n}`);if(this.#t.has(n))return this.#t.get(n);const a=new b.Controller([...this.path,n],r=>{this.change(r)},this.value.map(r=>l.detect(r)?r:l.defaultValue(),b.O),this.status.map(b.makeMapValidation([n])),{disabled:this.disabled,validationMode:this.parent.validationMode},b.O);return this.#t.set(n,a),a}switchToBranch(n,l=!1){const a=this.branches.find(s=>s.key===n);if(!a)throw new Error(`Unknown branch: ${n}`);const r=t.Value.get(this.value);if(a.detect(r))return!0;if(a.convert){const s=a.convert(r);if(s.ok)return this.change(s.value),!0}if(l&&typeof window=="object"&&typeof window.confirm=="function"&&!window.confirm("Changing type will clear the current value. Continue?"))return!1;const o=a.defaultValue();return this.change(o),!0}get activeBranchDefinition(){const n=t.Value.get(this.activeBranch);return this.branches.find(l=>l.key===n)}}function Ae(e){return e.transform(n=>n??null,n=>n??void 0)}function De(e){return e.transform(n=>n??"",n=>n===""?void 0:n)}function Te(e){return e.transform(n=>n??void 0,n=>n??null)}exports.Base64Input=Ht;exports.Base64sInput=mt;exports.BaseListControl=Mt;exports.BaseNativeSelectControl=xt;exports.Card=ae;exports.ColorInput=te;exports.EditableText=re;exports.Expando=ht;exports.FilesInput=pt;exports.Group=j;exports.ListControl=Ee;exports.ListInput=It;exports.MaskInput=at;exports.NativeSelect=vt;exports.NativeSelectControl=le;exports.NullableDateInput=ce;exports.NullableDateTimeInput=pe;exports.NullableDurationInput=$e;exports.NullableEmailInput=me;exports.NullableNumberInput=be;exports.NullablePasswordInput=fe;exports.NullableRatingInput=we;exports.NullableResetAfter=S;exports.NullableSliderInput=Ce;exports.NullableTextArea=he;exports.NullableTextInput=de;exports.NullableUUIDInput=xe;exports.NullableUrlInput=Me;exports.NumberInput=ge;exports.RatingInput=Ct;exports.SegmentedInput=Lt;exports.SliderInput=ye;exports.Switch=ve;exports.TextArea=wt;exports.UUIDInput=yt;exports.UnionController=Fe;exports.UnstyledDropZone=Q;exports.UrlInput=$t;exports.WithTemporal=_t;exports._t=Bt;exports.durationMaskConfig=kt;exports.emitExpando=ee;exports.emitOptionExpando=gt;exports.emptyToNull=T;exports.ensureTemporal=Z;exports.fileToBase64=dt;exports.gt=Tt;exports.nullToEmpty=N;exports.transformEmptyStringToUndefined=De;exports.transformNullToUndefined=Ae;exports.transformUndefinedToNull=Te;
|