@isardsat/editorial-admin 6.0.2 → 6.0.4
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/build/client/assets/{authSlice-KDhecIDl.js → authSlice-B3Tyl-Nw.js} +1 -1
- package/build/client/assets/button-Da66T3Bb.js +1 -0
- package/build/client/assets/chevron-down-8tTu7uK2.js +6 -0
- package/build/client/assets/chunk-KNED5TY2-DAA_sFzt.js +51 -0
- package/build/client/assets/{createLucideIcon-TQsNVzYU.js → createLucideIcon-R2-3a7hN.js} +1 -1
- package/build/client/assets/dashboard-BTu7-8Ba.js +1 -0
- package/build/client/assets/{dashboard._collection-DCypgAsP.js → dashboard._collection-MtSHvYYW.js} +4 -4
- package/build/client/assets/dashboard._collection._document-CRkC98aa.js +1 -0
- package/build/client/assets/dashboard._collection.new-BFe8yV0Z.js +1 -0
- package/build/client/assets/{dashboard._layout-BdJ3SrSw.js → dashboard._layout-fM4SW8Or.js} +2 -2
- package/build/client/assets/{dashboard.files-DVCxRHOl.js → dashboard.files-ieQA7EmW.js} +3 -3
- package/build/client/assets/editorialApi-fQchmMa9.js +1 -0
- package/build/client/assets/entry.client-BGu2H8xv.js +34 -0
- package/build/client/assets/home-oYP3wzz9.js +36 -0
- package/build/client/assets/{index-C-iH5ItK.js → index-Bd1u2_LZ.js} +1 -1
- package/build/client/assets/{index-B_FOxFgA.js → index-BvKqmqc2.js} +1 -1
- package/build/client/assets/index-C-vcF2DZ.js +9 -0
- package/build/client/assets/{index-DrhM6FV9.js → index-DeO5nu0f.js} +1 -1
- package/build/client/assets/{input-BH49oaMa.js → input-BmmdOdbj.js} +1 -1
- package/build/client/assets/itemForm-DlRBjBsd.js +90 -0
- package/build/client/assets/manifest-9974ee04.js +1 -0
- package/build/client/assets/react-redux-kbMjYGuQ.js +9 -0
- package/build/client/assets/root-wKvfXBjk.js +1 -0
- package/build/client/assets/{trash-B3lfbu-5.js → trash-wq_ppIxP.js} +1 -1
- package/build/client/index.html +4 -4
- package/package.json +11 -9
- package/build/client/assets/button-O0EDocjF.js +0 -1
- package/build/client/assets/chevron-down-BMtosYlL.js +0 -6
- package/build/client/assets/chunk-KNED5TY2-CXj9yqcQ.js +0 -51
- package/build/client/assets/dashboard-Binq3-uL.js +0 -1
- package/build/client/assets/dashboard._collection._document-B9dEIw39.js +0 -1
- package/build/client/assets/dashboard._collection.new-QbdwRouF.js +0 -1
- package/build/client/assets/editorialApi-DCnC5eM9.js +0 -1
- package/build/client/assets/entry.client-B5Ca3clj.js +0 -34
- package/build/client/assets/home-wnsWYgD_.js +0 -11
- package/build/client/assets/index-B7e3fQ32.js +0 -9
- package/build/client/assets/index-G-cqIhgh.js +0 -9
- package/build/client/assets/itemForm-dtoqbEoC.js +0 -90
- package/build/client/assets/manifest-a309df9e.js +0 -1
- package/build/client/assets/root-DHDQPxhg.js +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import{w as en}from"./react-redux-kbMjYGuQ.js";import{a as ie,n as h,q as nn}from"./chunk-KNED5TY2-DAA_sFzt.js";import{B as tn}from"./button-Da66T3Bb.js";import{g as Q,s as q,a as rn,u as on,F as sn,b as G,c as X,d as fe,e as Y,I as me,f as H,C as cn}from"./input-BmmdOdbj.js";import{c as un}from"./utils-DslUJpbf.js";import{c as Te}from"./createLucideIcon-R2-3a7hN.js";import{u as an,d as ee,l as ln}from"./authSlice-B3Tyl-Nw.js";import"./index-BvKqmqc2.js";import"./index-C-vcF2DZ.js";import"./tslib.es6-CDuPK5Eb.js";/**
|
|
2
|
+
* @license lucide-react v0.487.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const dn=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],pn=Te("loader-circle",dn);/**
|
|
7
|
+
* @license lucide-react v0.487.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const hn=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],fn=Te("loader",hn),Re=ie.forwardRef(({className:e,...n},t)=>h.jsx(pn,{ref:t,className:un(e,"animate-spin"),...n}));Re.displayName=fn.displayName;const _e=(e,n,t)=>{if(e&&"reportValidity"in e){const r=Q(t,n);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Ce=(e,n)=>{for(const t in n.fields){const r=n.fields[t];r&&r.ref&&"reportValidity"in r.ref?_e(r.ref,t,e):r.refs&&r.refs.forEach(o=>_e(o,t,e))}},mn=(e,n)=>{n.shouldUseNativeValidation&&Ce(e,n);const t={};for(const r in e){const o=Q(n.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(_n(n.names||Object.keys(e),r)){const s=Object.assign({},Q(t,r));q(s,"root",i),q(t,r,s)}else q(t,r,i)}return t},_n=(e,n)=>e.some(t=>t.startsWith(n+"."));var gn=function(e,n){for(var t={};e.length;){var r=e[0],o=r.code,i=r.message,s=r.path.join(".");if(!t[s])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];t[s]={message:u.message,type:u.code}}else t[s]={message:i,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(w){return w.errors.forEach(function(p){return e.push(p)})}),n){var a=t[s].types,d=a&&a[r.code];t[s]=rn(s,n,t,o,d?[].concat(d,r.message):r.message)}e.shift()}return t},vn=function(e,n,t){return t===void 0&&(t={}),function(r,o,i){try{return Promise.resolve(function(s,u){try{var a=Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](r,n)).then(function(d){return i.shouldUseNativeValidation&&Ce({},i),{errors:{},values:t.raw?r:d}})}catch(d){return u(d)}return a&&a.then?a.then(void 0,u):a}(0,function(s){if(function(u){return Array.isArray(u==null?void 0:u.errors)}(s))return{values:{},errors:mn(gn(s.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw s}))}catch(s){return Promise.reject(s)}}};function c(e,n,t){function r(u,a){var d;Object.defineProperty(u,"_zod",{value:u._zod??{},enumerable:!1}),(d=u._zod).traits??(d.traits=new Set),u._zod.traits.add(e),n(u,a);for(const w in s.prototype)w in u||Object.defineProperty(u,w,{value:s.prototype[w].bind(u)});u._zod.constr=s,u._zod.def=a}const o=(t==null?void 0:t.Parent)??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(u){var a;const d=t!=null&&t.Parent?new i:this;r(d,u),(a=d._zod).deferred??(a.deferred=[]);for(const w of d._zod.deferred)w();return d}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:u=>{var a,d;return t!=null&&t.Parent&&u instanceof t.Parent?!0:(d=(a=u==null?void 0:u._zod)==null?void 0:a.traits)==null?void 0:d.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}class T extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const De={};function E(e){return De}function zn(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>n.indexOf(+r)===-1).map(([r,o])=>o)}function wn(e,n){return typeof n=="bigint"?n.toString():n}function Ue(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function se(e){return e==null}function ce(e){const n=e.startsWith("^")?1:0,t=e.endsWith("$")?e.length-1:e.length;return e.slice(n,t)}function _(e,n,t){Object.defineProperty(e,n,{get(){{const r=t();return e[n]=r,r}},set(r){Object.defineProperty(e,n,{value:r})},configurable:!0})}function ue(e,n,t){Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})}function S(e){return JSON.stringify(e)}const Ne=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function ne(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Zn=Ue(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const n=Function;return new n(""),!0}catch{return!1}});function te(e){if(ne(e)===!1)return!1;const n=e.constructor;if(n===void 0)return!0;const t=n.prototype;return!(ne(t)===!1||Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)}const $n=new Set(["string","number","symbol"]);function W(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function I(e,n,t){const r=new e._zod.constr(n??e._zod.def);return(!n||t!=null&&t.parent)&&(r._zod.parent=e),r}function l(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if((n==null?void 0:n.message)!==void 0){if((n==null?void 0:n.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function kn(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}function bn(e,n){const t={},r=e._zod.def;for(const o in n){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(t[o]=r.shape[o])}return I(e,{...e._zod.def,shape:t,checks:[]})}function yn(e,n){const t={...e._zod.def.shape},r=e._zod.def;for(const o in n){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);n[o]&&delete t[o]}return I(e,{...e._zod.def,shape:t,checks:[]})}function jn(e,n){if(!te(n))throw new Error("Invalid input to extend: expected a plain object");const t={...e._zod.def,get shape(){const r={...e._zod.def.shape,...n};return ue(this,"shape",r),r},checks:[]};return I(e,t)}function xn(e,n){return I(e,{...e._zod.def,get shape(){const t={...e._zod.def.shape,...n._zod.def.shape};return ue(this,"shape",t),t},catchall:n._zod.def.catchall,checks:[]})}function En(e,n,t){const r=n._zod.def.shape,o={...r};if(t)for(const i in t){if(!(i in r))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(o[i]=e?new e({type:"optional",innerType:r[i]}):r[i])}else for(const i in r)o[i]=e?new e({type:"optional",innerType:r[i]}):r[i];return I(n,{...n._zod.def,shape:o,checks:[]})}function Pn(e,n,t){const r=n._zod.def.shape,o={...r};if(t)for(const i in t){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(o[i]=new e({type:"nonoptional",innerType:r[i]}))}else for(const i in r)o[i]=new e({type:"nonoptional",innerType:r[i]});return I(n,{...n._zod.def,shape:o,checks:[]})}function A(e,n=0){var t;for(let r=n;r<e.issues.length;r++)if(((t=e.issues[r])==null?void 0:t.continue)!==!0)return!0;return!1}function ae(e,n){return n.map(t=>{var r;return(r=t).path??(r.path=[]),t.path.unshift(e),t})}function N(e){return typeof e=="string"?e:e==null?void 0:e.message}function P(e,n,t){var o,i,s,u,a,d;const r={...e,path:e.path??[]};if(!e.message){const w=N((s=(i=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:i.error)==null?void 0:s.call(i,e))??N((u=n==null?void 0:n.error)==null?void 0:u.call(n,e))??N((a=t.customError)==null?void 0:a.call(t,e))??N((d=t.localeError)==null?void 0:d.call(t,e))??"Invalid input";r.message=w}return delete r.inst,delete r.continue,n!=null&&n.reportInput||delete r.input,r}function le(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function R(...e){const[n,t,r]=e;return typeof n=="string"?{message:n,code:"custom",input:t,inst:r}:{...n}}const Le=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(n,wn,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fe=c("$ZodError",Le),Ve=c("$ZodError",Le,{Parent:Error});function In(e,n=t=>t.message){const t={},r=[];for(const o of e.issues)o.path.length>0?(t[o.path[0]]=t[o.path[0]]||[],t[o.path[0]].push(n(o))):r.push(n(o));return{formErrors:r,fieldErrors:t}}function On(e,n){const t=n||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>o({issues:u}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)r._errors.push(t(s));else{let u=r,a=0;for(;a<s.path.length;){const d=s.path[a];a===s.path.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(t(s))):u[d]=u[d]||{_errors:[]},u=u[d],a++}}};return o(e),r}const Sn=e=>(n,t,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=n._zod.run({value:t,issues:[]},i);if(s instanceof Promise)throw new T;if(s.issues.length){const u=new((o==null?void 0:o.Err)??e)(s.issues.map(a=>P(a,i,E())));throw Ne(u,o==null?void 0:o.callee),u}return s.value},An=e=>async(n,t,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=n._zod.run({value:t,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const u=new((o==null?void 0:o.Err)??e)(s.issues.map(a=>P(a,i,E())));throw Ne(u,o==null?void 0:o.callee),u}return s.value},Me=e=>(n,t,r)=>{const o=r?{...r,async:!1}:{async:!1},i=n._zod.run({value:t,issues:[]},o);if(i instanceof Promise)throw new T;return i.issues.length?{success:!1,error:new(e??Fe)(i.issues.map(s=>P(s,o,E())))}:{success:!0,data:i.value}},Tn=Me(Ve),We=e=>async(n,t,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=n._zod.run({value:t,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>P(s,o,E())))}:{success:!0,data:i.value}},Rn=We(Ve),Cn=/^[cC][^\s-]{8,}$/,Dn=/^[0-9a-z]+$/,Un=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Nn=/^[0-9a-vA-V]{20}$/,Ln=/^[A-Za-z0-9]{27}$/,Fn=/^[a-zA-Z0-9_-]{21}$/,Vn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Mn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ge=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,Wn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Bn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Kn(){return new RegExp(Bn,"u")}const Jn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,Gn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Xn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Yn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Be=/^[A-Za-z0-9_-]*$/,Hn=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Qn=/^\+(?:[0-9]){6,14}[0-9]$/,Ke="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",et=new RegExp(`^${Ke}$`);function Je(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function nt(e){return new RegExp(`^${Je(e)}$`)}function tt(e){const n=Je({precision:e.precision}),t=["Z"];e.local&&t.push(""),e.offset&&t.push("([+-]\\d{2}:\\d{2})");const r=`${n}(?:${t.join("|")})`;return new RegExp(`^${Ke}T(?:${r})$`)}const rt=e=>{const n=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},ot=/true|false/i,it=/^[^A-Z]*$/,st=/^[^a-z]*$/,j=c("$ZodCheck",(e,n)=>{var t;e._zod??(e._zod={}),e._zod.def=n,(t=e._zod).onattach??(t.onattach=[])}),ct=c("$ZodCheckMaxLength",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!se(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<o&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=n.maximum)return;const s=le(o);r.issues.push({origin:s,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),ut=c("$ZodCheckMinLength",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!se(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>o&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=n.minimum)return;const s=le(o);r.issues.push({origin:s,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),at=c("$ZodCheckLengthEquals",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!se(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=n.length,o.maximum=n.length,o.length=n.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===n.length)return;const s=le(o),u=i>n.length;r.issues.push({origin:s,...u?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),B=c("$ZodCheckStringFormat",(e,n)=>{var t,r;j.init(e,n),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=n.format,n.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(n.pattern))}),n.pattern?(t=e._zod).check??(t.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),lt=c("$ZodCheckRegex",(e,n)=>{B.init(e,n),e._zod.check=t=>{n.pattern.lastIndex=0,!n.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),dt=c("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=it),B.init(e,n)}),pt=c("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=st),B.init(e,n)}),ht=c("$ZodCheckIncludes",(e,n)=>{j.init(e,n);const t=W(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position}}${t}`:t);n.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:e,continue:!n.abort})}}),ft=c("$ZodCheckStartsWith",(e,n)=>{j.init(e,n);const t=new RegExp(`^${W(n.prefix)}.*`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),mt=c("$ZodCheckEndsWith",(e,n)=>{j.init(e,n);const t=new RegExp(`.*${W(n.suffix)}$`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}}),_t=c("$ZodCheckOverwrite",(e,n)=>{j.init(e,n),e._zod.check=t=>{t.value=n.tx(t.value)}});class gt{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const r=n.split(`
|
|
12
|
+
`).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const n=Function,t=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new n(...t,o.join(`
|
|
13
|
+
`))}}const vt={major:4,minor:0,patch:2},Z=c("$ZodType",(e,n)=>{var o;var t;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=vt;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const s of i._zod.onattach)s(e);if(r.length===0)(t=e._zod).deferred??(t.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const i=(s,u,a)=>{let d=A(s),w;for(const p of u){if(p._zod.def.when){if(!p._zod.def.when(s))continue}else if(d)continue;const f=s.issues.length,m=p._zod.check(s);if(m instanceof Promise&&(a==null?void 0:a.async)===!1)throw new T;if(w||m instanceof Promise)w=(w??Promise.resolve()).then(async()=>{await m,s.issues.length!==f&&(d||(d=A(s,f)))});else{if(s.issues.length===f)continue;d||(d=A(s,f))}}return w?w.then(()=>s):s};e._zod.run=(s,u)=>{const a=e._zod.parse(s,u);if(a instanceof Promise){if(u.async===!1)throw new T;return a.then(d=>i(d,r,u))}return i(a,r,u)}}e["~standard"]={validate:i=>{var s;try{const u=Tn(e,i);return u.success?{value:u.data}:{issues:(s=u.error)==null?void 0:s.issues}}catch{return Rn(e,i).then(a=>{var d;return a.success?{value:a.data}:{issues:(d=a.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}}),de=c("$ZodString",(e,n)=>{var t;Z.init(e,n),e._zod.pattern=[...((t=e==null?void 0:e._zod.bag)==null?void 0:t.patterns)??[]].pop()??rt(e._zod.bag),e._zod.parse=(r,o)=>{if(n.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),g=c("$ZodStringFormat",(e,n)=>{B.init(e,n),de.init(e,n)}),zt=c("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=Mn),g.init(e,n)}),wt=c("$ZodUUID",(e,n)=>{if(n.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(r===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=ge(r))}else n.pattern??(n.pattern=ge());g.init(e,n)}),Zt=c("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=Wn),g.init(e,n)}),$t=c("$ZodURL",(e,n)=>{g.init(e,n),e._zod.check=t=>{try{const r=t.value,o=new URL(r),i=o.href;n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(o.hostname)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Hn.source,input:t.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:t.value,inst:e,continue:!n.abort})),!r.endsWith("/")&&i.endsWith("/")?t.value=i.slice(0,-1):t.value=i;return}catch{t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:e,continue:!n.abort})}}}),kt=c("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=Kn()),g.init(e,n)}),bt=c("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=Fn),g.init(e,n)}),yt=c("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=Cn),g.init(e,n)}),jt=c("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=Dn),g.init(e,n)}),xt=c("$ZodULID",(e,n)=>{n.pattern??(n.pattern=Un),g.init(e,n)}),Et=c("$ZodXID",(e,n)=>{n.pattern??(n.pattern=Nn),g.init(e,n)}),Pt=c("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=Ln),g.init(e,n)}),It=c("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=tt(n)),g.init(e,n)}),Ot=c("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=et),g.init(e,n)}),St=c("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=nt(n)),g.init(e,n)}),At=c("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=Vn),g.init(e,n)}),Tt=c("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=Jn),g.init(e,n),e._zod.onattach.push(t=>{const r=t._zod.bag;r.format="ipv4"})}),Rt=c("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=qn),g.init(e,n),e._zod.onattach.push(t=>{const r=t._zod.bag;r.format="ipv6"}),e._zod.check=t=>{try{new URL(`http://[${t.value}]`)}catch{t.issues.push({code:"invalid_format",format:"ipv6",input:t.value,inst:e,continue:!n.abort})}}}),Ct=c("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=Gn),g.init(e,n)}),Dt=c("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=Xn),g.init(e,n),e._zod.check=t=>{const[r,o]=t.value.split("/");try{if(!o)throw new Error;const i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${r}]`)}catch{t.issues.push({code:"invalid_format",format:"cidrv6",input:t.value,inst:e,continue:!n.abort})}}});function qe(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Ut=c("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=Yn),g.init(e,n),e._zod.onattach.push(t=>{t._zod.bag.contentEncoding="base64"}),e._zod.check=t=>{qe(t.value)||t.issues.push({code:"invalid_format",format:"base64",input:t.value,inst:e,continue:!n.abort})}});function Nt(e){if(!Be.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),t=n.padEnd(Math.ceil(n.length/4)*4,"=");return qe(t)}const Lt=c("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Be),g.init(e,n),e._zod.onattach.push(t=>{t._zod.bag.contentEncoding="base64url"}),e._zod.check=t=>{Nt(t.value)||t.issues.push({code:"invalid_format",format:"base64url",input:t.value,inst:e,continue:!n.abort})}}),Ft=c("$ZodE164",(e,n)=>{n.pattern??(n.pattern=Qn),g.init(e,n)});function Vt(e,n=null){try{const t=e.split(".");if(t.length!==3)return!1;const[r]=t;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const Mt=c("$ZodJWT",(e,n)=>{g.init(e,n),e._zod.check=t=>{Vt(t.value,n.alg)||t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:e,continue:!n.abort})}}),Wt=c("$ZodBoolean",(e,n)=>{Z.init(e,n),e._zod.pattern=ot,e._zod.parse=(t,r)=>{if(n.coerce)try{t.value=!!t.value}catch{}const o=t.value;return typeof o=="boolean"||t.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),t}}),Bt=c("$ZodUnknown",(e,n)=>{Z.init(e,n),e._zod.parse=t=>t}),Kt=c("$ZodNever",(e,n)=>{Z.init(e,n),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function ve(e,n,t){e.issues.length&&n.issues.push(...ae(t,e.issues)),n.value[t]=e.value}const Jt=c("$ZodArray",(e,n)=>{Z.init(e,n),e._zod.parse=(t,r)=>{const o=t.value;if(!Array.isArray(o))return t.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),t;t.value=Array(o.length);const i=[];for(let s=0;s<o.length;s++){const u=o[s],a=n.element._zod.run({value:u,issues:[]},r);a instanceof Promise?i.push(a.then(d=>ve(d,t,s))):ve(a,t,s)}return i.length?Promise.all(i).then(()=>t):t}});function L(e,n,t){e.issues.length&&n.issues.push(...ae(t,e.issues)),n.value[t]=e.value}function ze(e,n,t,r){e.issues.length?r[t]===void 0?t in r?n.value[t]=void 0:n.value[t]=e.value:n.issues.push(...ae(t,e.issues)):e.value===void 0?t in r&&(n.value[t]=void 0):n.value[t]=e.value}const qt=c("$ZodObject",(e,n)=>{Z.init(e,n);const t=Ue(()=>{const p=Object.keys(n.shape);for(const m of p)if(!(n.shape[m]instanceof Z))throw new Error(`Invalid element at key "${m}": expected a Zod schema`);const f=kn(n.shape);return{shape:n.shape,keys:p,keySet:new Set(p),numKeys:p.length,optionalKeys:new Set(f)}});_(e._zod,"propValues",()=>{const p=n.shape,f={};for(const m in p){const y=p[m]._zod;if(y.values){f[m]??(f[m]=new Set);for(const x of y.values)f[m].add(x)}}return f});const r=p=>{const f=new gt(["shape","payload","ctx"]),m=t.value,y=b=>{const v=S(b);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};f.write("const input = payload.value;");const x=Object.create(null);let J=0;for(const b of m.keys)x[b]=`key_${J++}`;f.write("const newResult = {}");for(const b of m.keys)if(m.optionalKeys.has(b)){const v=x[b];f.write(`const ${v} = ${y(b)};`);const $=S(b);f.write(`
|
|
14
|
+
if (${v}.issues.length) {
|
|
15
|
+
if (input[${$}] === undefined) {
|
|
16
|
+
if (${$} in input) {
|
|
17
|
+
newResult[${$}] = undefined;
|
|
18
|
+
}
|
|
19
|
+
} else {
|
|
20
|
+
payload.issues = payload.issues.concat(
|
|
21
|
+
${v}.issues.map((iss) => ({
|
|
22
|
+
...iss,
|
|
23
|
+
path: iss.path ? [${$}, ...iss.path] : [${$}],
|
|
24
|
+
}))
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
} else if (${v}.value === undefined) {
|
|
28
|
+
if (${$} in input) newResult[${$}] = undefined;
|
|
29
|
+
} else {
|
|
30
|
+
newResult[${$}] = ${v}.value;
|
|
31
|
+
}
|
|
32
|
+
`)}else{const v=x[b];f.write(`const ${v} = ${y(b)};`),f.write(`
|
|
33
|
+
if (${v}.issues.length) payload.issues = payload.issues.concat(${v}.issues.map(iss => ({
|
|
34
|
+
...iss,
|
|
35
|
+
path: iss.path ? [${S(b)}, ...iss.path] : [${S(b)}]
|
|
36
|
+
})));`),f.write(`newResult[${S(b)}] = ${v}.value`)}f.write("payload.value = newResult;"),f.write("return payload;");const D=f.compile();return(b,v)=>D(p,b,v)};let o;const i=ne,s=!De.jitless,a=s&&Zn.value,d=n.catchall;let w;e._zod.parse=(p,f)=>{w??(w=t.value);const m=p.value;if(!i(m))return p.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),p;const y=[];if(s&&a&&(f==null?void 0:f.async)===!1&&f.jitless!==!0)o||(o=r(n.shape)),p=o(p,f);else{p.value={};const v=w.shape;for(const $ of w.keys){const O=v[$],U=O._zod.run({value:m[$],issues:[]},f),pe=O._zod.optin==="optional"&&O._zod.optout==="optional";U instanceof Promise?y.push(U.then(he=>pe?ze(he,p,$,m):L(he,p,$))):pe?ze(U,p,$,m):L(U,p,$)}}if(!d)return y.length?Promise.all(y).then(()=>p):p;const x=[],J=w.keySet,D=d._zod,b=D.def.type;for(const v of Object.keys(m)){if(J.has(v))continue;if(b==="never"){x.push(v);continue}const $=D.run({value:m[v],issues:[]},f);$ instanceof Promise?y.push($.then(O=>L(O,p,v))):L($,p,v)}return x.length&&p.issues.push({code:"unrecognized_keys",keys:x,input:m,inst:e}),y.length?Promise.all(y).then(()=>p):p}});function we(e,n,t,r){for(const o of e)if(o.issues.length===0)return n.value=o.value,n;return n.issues.push({code:"invalid_union",input:n.value,inst:t,errors:e.map(o=>o.issues.map(i=>P(i,r,E())))}),n}const Gt=c("$ZodUnion",(e,n)=>{Z.init(e,n),_(e._zod,"optin",()=>n.options.some(t=>t._zod.optin==="optional")?"optional":void 0),_(e._zod,"optout",()=>n.options.some(t=>t._zod.optout==="optional")?"optional":void 0),_(e._zod,"values",()=>{if(n.options.every(t=>t._zod.values))return new Set(n.options.flatMap(t=>Array.from(t._zod.values)))}),_(e._zod,"pattern",()=>{if(n.options.every(t=>t._zod.pattern)){const t=n.options.map(r=>r._zod.pattern);return new RegExp(`^(${t.map(r=>ce(r.source)).join("|")})$`)}}),e._zod.parse=(t,r)=>{let o=!1;const i=[];for(const s of n.options){const u=s._zod.run({value:t.value,issues:[]},r);if(u instanceof Promise)i.push(u),o=!0;else{if(u.issues.length===0)return u;i.push(u)}}return o?Promise.all(i).then(s=>we(s,t,e,r)):we(i,t,e,r)}}),Xt=c("$ZodIntersection",(e,n)=>{Z.init(e,n),e._zod.parse=(t,r)=>{const o=t.value,i=n.left._zod.run({value:o,issues:[]},r),s=n.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([a,d])=>Ze(t,a,d)):Ze(t,i,s)}});function re(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(te(e)&&te(n)){const t=Object.keys(n),r=Object.keys(e).filter(i=>t.indexOf(i)!==-1),o={...e,...n};for(const i of r){const s=re(e[i],n[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let r=0;r<e.length;r++){const o=e[r],i=n[r],s=re(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};t.push(s.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function Ze(e,n,t){if(n.issues.length&&e.issues.push(...n.issues),t.issues.length&&e.issues.push(...t.issues),A(e))return e;const r=re(n.value,t.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const Yt=c("$ZodEnum",(e,n)=>{Z.init(e,n);const t=zn(n.entries);e._zod.values=new Set(t),e._zod.pattern=new RegExp(`^(${t.filter(r=>$n.has(typeof r)).map(r=>typeof r=="string"?W(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return e._zod.values.has(i)||r.issues.push({code:"invalid_value",values:t,input:i,inst:e}),r}}),Ht=c("$ZodTransform",(e,n)=>{Z.init(e,n),e._zod.parse=(t,r)=>{const o=n.transform(t.value,t);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(t.value=s,t));if(o instanceof Promise)throw new T;return t.value=o,t}}),Qt=c("$ZodOptional",(e,n)=>{Z.init(e,n),e._zod.optin="optional",e._zod.optout="optional",_(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),_(e._zod,"pattern",()=>{const t=n.innerType._zod.pattern;return t?new RegExp(`^(${ce(t.source)})?$`):void 0}),e._zod.parse=(t,r)=>n.innerType._zod.optin==="optional"?n.innerType._zod.run(t,r):t.value===void 0?t:n.innerType._zod.run(t,r)}),er=c("$ZodNullable",(e,n)=>{Z.init(e,n),_(e._zod,"optin",()=>n.innerType._zod.optin),_(e._zod,"optout",()=>n.innerType._zod.optout),_(e._zod,"pattern",()=>{const t=n.innerType._zod.pattern;return t?new RegExp(`^(${ce(t.source)}|null)$`):void 0}),_(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(t,r)=>t.value===null?t:n.innerType._zod.run(t,r)}),nr=c("$ZodDefault",(e,n)=>{Z.init(e,n),e._zod.optin="optional",_(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>{if(t.value===void 0)return t.value=n.defaultValue,t;const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>$e(i,n)):$e(o,n)}});function $e(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const tr=c("$ZodPrefault",(e,n)=>{Z.init(e,n),e._zod.optin="optional",_(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>(t.value===void 0&&(t.value=n.defaultValue),n.innerType._zod.run(t,r))}),rr=c("$ZodNonOptional",(e,n)=>{Z.init(e,n),_(e._zod,"values",()=>{const t=n.innerType._zod.values;return t?new Set([...t].filter(r=>r!==void 0)):void 0}),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>ke(i,e)):ke(o,e)}});function ke(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const or=c("$ZodCatch",(e,n)=>{Z.init(e,n),e._zod.optin="optional",_(e._zod,"optout",()=>n.innerType._zod.optout),_(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>(t.value=i.value,i.issues.length&&(t.value=n.catchValue({...t,error:{issues:i.issues.map(s=>P(s,r,E()))},input:t.value}),t.issues=[]),t)):(t.value=o.value,o.issues.length&&(t.value=n.catchValue({...t,error:{issues:o.issues.map(i=>P(i,r,E()))},input:t.value}),t.issues=[]),t)}}),ir=c("$ZodPipe",(e,n)=>{Z.init(e,n),_(e._zod,"values",()=>n.in._zod.values),_(e._zod,"optin",()=>n.in._zod.optin),_(e._zod,"optout",()=>n.out._zod.optout),e._zod.parse=(t,r)=>{const o=n.in._zod.run(t,r);return o instanceof Promise?o.then(i=>be(i,n,r)):be(o,n,r)}});function be(e,n,t){return A(e)?e:n.out._zod.run({value:e.value,issues:e.issues},t)}const sr=c("$ZodReadonly",(e,n)=>{Z.init(e,n),_(e._zod,"propValues",()=>n.innerType._zod.propValues),_(e._zod,"values",()=>n.innerType._zod.values),_(e._zod,"optin",()=>n.innerType._zod.optin),_(e._zod,"optout",()=>n.innerType._zod.optout),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(ye):ye(o)}});function ye(e){return e.value=Object.freeze(e.value),e}const cr=c("$ZodCustom",(e,n)=>{j.init(e,n),Z.init(e,n),e._zod.parse=(t,r)=>t,e._zod.check=t=>{const r=t.value,o=n.fn(r);if(o instanceof Promise)return o.then(i=>je(i,t,r,e));je(o,t,r,e)}});function je(e,n,t,r){if(!e){const o={code:"custom",input:t,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),n.issues.push(R(o))}}class ur{constructor(){this._map=new Map,this._idmap=new Map}add(n,...t){const r=t[0];if(this._map.set(n,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,n)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(n){const t=this._map.get(n);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(n),this}get(n){const t=n._zod.parent;if(t){const r={...this.get(t)??{}};return delete r.id,{...r,...this._map.get(n)}}return this._map.get(n)}has(n){return this._map.has(n)}}function ar(){return new ur}const F=ar();function lr(e,n){return new e({type:"string",...l(n)})}function dr(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...l(n)})}function xe(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...l(n)})}function pr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...l(n)})}function hr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...l(n)})}function fr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...l(n)})}function mr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...l(n)})}function _r(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...l(n)})}function gr(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...l(n)})}function vr(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...l(n)})}function zr(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...l(n)})}function wr(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...l(n)})}function Zr(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...l(n)})}function $r(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...l(n)})}function kr(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...l(n)})}function br(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...l(n)})}function yr(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...l(n)})}function jr(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...l(n)})}function xr(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...l(n)})}function Er(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...l(n)})}function Pr(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...l(n)})}function Ir(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...l(n)})}function Or(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...l(n)})}function Sr(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...l(n)})}function Ar(e,n){return new e({type:"string",format:"date",check:"string_format",...l(n)})}function Tr(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...l(n)})}function Rr(e,n){return new e({type:"string",format:"duration",check:"string_format",...l(n)})}function Cr(e,n){return new e({type:"boolean",...l(n)})}function Dr(e){return new e({type:"unknown"})}function Ur(e,n){return new e({type:"never",...l(n)})}function Ge(e,n){return new ct({check:"max_length",...l(n),maximum:e})}function M(e,n){return new ut({check:"min_length",...l(n),minimum:e})}function Xe(e,n){return new at({check:"length_equals",...l(n),length:e})}function Nr(e,n){return new lt({check:"string_format",format:"regex",...l(n),pattern:e})}function Lr(e){return new dt({check:"string_format",format:"lowercase",...l(e)})}function Fr(e){return new pt({check:"string_format",format:"uppercase",...l(e)})}function Vr(e,n){return new ht({check:"string_format",format:"includes",...l(n),includes:e})}function Mr(e,n){return new ft({check:"string_format",format:"starts_with",...l(n),prefix:e})}function Wr(e,n){return new mt({check:"string_format",format:"ends_with",...l(n),suffix:e})}function C(e){return new _t({check:"overwrite",tx:e})}function Br(e){return C(n=>n.normalize(e))}function Kr(){return C(e=>e.trim())}function Jr(){return C(e=>e.toLowerCase())}function qr(){return C(e=>e.toUpperCase())}function Gr(e,n,t){return new e({type:"array",element:n,...l(t)})}function Xr(e,n,t){return new e({type:"custom",check:"custom",fn:n,...l(t)})}const Yr=c("ZodISODateTime",(e,n)=>{It.init(e,n),z.init(e,n)});function Hr(e){return Sr(Yr,e)}const Qr=c("ZodISODate",(e,n)=>{Ot.init(e,n),z.init(e,n)});function eo(e){return Ar(Qr,e)}const no=c("ZodISOTime",(e,n)=>{St.init(e,n),z.init(e,n)});function to(e){return Tr(no,e)}const ro=c("ZodISODuration",(e,n)=>{At.init(e,n),z.init(e,n)});function oo(e){return Rr(ro,e)}const io=(e,n)=>{Fe.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>On(e,t)},flatten:{value:t=>In(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get(){return e.issues.length===0}}})},K=c("ZodError",io,{Parent:Error}),so=Sn(K),co=An(K),uo=Me(K),ao=We(K),k=c("ZodType",(e,n)=>(Z.init(e,n),e.def=n,Object.defineProperty(e,"_def",{value:n}),e.check=(...t)=>e.clone({...n,checks:[...n.checks??[],...t.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),e.clone=(t,r)=>I(e,t,r),e.brand=()=>e,e.register=(t,r)=>(t.add(e,r),e),e.parse=(t,r)=>so(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>uo(e,t,r),e.parseAsync=async(t,r)=>co(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>ao(e,t,r),e.spa=e.safeParseAsync,e.refine=(t,r)=>e.check(oi(t,r)),e.superRefine=t=>e.check(ii(t)),e.overwrite=t=>e.check(C(t)),e.optional=()=>Oe(e),e.nullable=()=>Se(e),e.nullish=()=>Oe(Se(e)),e.nonoptional=t=>Xo(e,t),e.array=()=>Ro(e),e.or=t=>No([e,t]),e.and=t=>Fo(e,t),e.transform=t=>Ae(e,Wo(t)),e.default=t=>Jo(e,t),e.prefault=t=>Go(e,t),e.catch=t=>Ho(e,t),e.pipe=t=>Ae(e,t),e.readonly=()=>ni(e),e.describe=t=>{const r=e.clone();return F.add(r,{description:t}),r},Object.defineProperty(e,"description",{get(){var t;return(t=F.get(e))==null?void 0:t.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return F.get(e);const r=e.clone();return F.add(r,t[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Ye=c("_ZodString",(e,n)=>{de.init(e,n),k.init(e,n);const t=e._zod.bag;e.format=t.format??null,e.minLength=t.minimum??null,e.maxLength=t.maximum??null,e.regex=(...r)=>e.check(Nr(...r)),e.includes=(...r)=>e.check(Vr(...r)),e.startsWith=(...r)=>e.check(Mr(...r)),e.endsWith=(...r)=>e.check(Wr(...r)),e.min=(...r)=>e.check(M(...r)),e.max=(...r)=>e.check(Ge(...r)),e.length=(...r)=>e.check(Xe(...r)),e.nonempty=(...r)=>e.check(M(1,...r)),e.lowercase=r=>e.check(Lr(r)),e.uppercase=r=>e.check(Fr(r)),e.trim=()=>e.check(Kr()),e.normalize=(...r)=>e.check(Br(...r)),e.toLowerCase=()=>e.check(Jr()),e.toUpperCase=()=>e.check(qr())}),lo=c("ZodString",(e,n)=>{de.init(e,n),Ye.init(e,n),e.email=t=>e.check(dr(po,t)),e.url=t=>e.check(_r(ho,t)),e.jwt=t=>e.check(Or(Eo,t)),e.emoji=t=>e.check(gr(fo,t)),e.guid=t=>e.check(xe(Pe,t)),e.uuid=t=>e.check(pr(V,t)),e.uuidv4=t=>e.check(hr(V,t)),e.uuidv6=t=>e.check(fr(V,t)),e.uuidv7=t=>e.check(mr(V,t)),e.nanoid=t=>e.check(vr(mo,t)),e.guid=t=>e.check(xe(Pe,t)),e.cuid=t=>e.check(zr(_o,t)),e.cuid2=t=>e.check(wr(go,t)),e.ulid=t=>e.check(Zr(vo,t)),e.base64=t=>e.check(Er(yo,t)),e.base64url=t=>e.check(Pr(jo,t)),e.xid=t=>e.check($r(zo,t)),e.ksuid=t=>e.check(kr(wo,t)),e.ipv4=t=>e.check(br(Zo,t)),e.ipv6=t=>e.check(yr($o,t)),e.cidrv4=t=>e.check(jr(ko,t)),e.cidrv6=t=>e.check(xr(bo,t)),e.e164=t=>e.check(Ir(xo,t)),e.datetime=t=>e.check(Hr(t)),e.date=t=>e.check(eo(t)),e.time=t=>e.check(to(t)),e.duration=t=>e.check(oo(t))});function Ee(e){return lr(lo,e)}const z=c("ZodStringFormat",(e,n)=>{g.init(e,n),Ye.init(e,n)}),po=c("ZodEmail",(e,n)=>{Zt.init(e,n),z.init(e,n)}),Pe=c("ZodGUID",(e,n)=>{zt.init(e,n),z.init(e,n)}),V=c("ZodUUID",(e,n)=>{wt.init(e,n),z.init(e,n)}),ho=c("ZodURL",(e,n)=>{$t.init(e,n),z.init(e,n)}),fo=c("ZodEmoji",(e,n)=>{kt.init(e,n),z.init(e,n)}),mo=c("ZodNanoID",(e,n)=>{bt.init(e,n),z.init(e,n)}),_o=c("ZodCUID",(e,n)=>{yt.init(e,n),z.init(e,n)}),go=c("ZodCUID2",(e,n)=>{jt.init(e,n),z.init(e,n)}),vo=c("ZodULID",(e,n)=>{xt.init(e,n),z.init(e,n)}),zo=c("ZodXID",(e,n)=>{Et.init(e,n),z.init(e,n)}),wo=c("ZodKSUID",(e,n)=>{Pt.init(e,n),z.init(e,n)}),Zo=c("ZodIPv4",(e,n)=>{Tt.init(e,n),z.init(e,n)}),$o=c("ZodIPv6",(e,n)=>{Rt.init(e,n),z.init(e,n)}),ko=c("ZodCIDRv4",(e,n)=>{Ct.init(e,n),z.init(e,n)}),bo=c("ZodCIDRv6",(e,n)=>{Dt.init(e,n),z.init(e,n)}),yo=c("ZodBase64",(e,n)=>{Ut.init(e,n),z.init(e,n)}),jo=c("ZodBase64URL",(e,n)=>{Lt.init(e,n),z.init(e,n)}),xo=c("ZodE164",(e,n)=>{Ft.init(e,n),z.init(e,n)}),Eo=c("ZodJWT",(e,n)=>{Mt.init(e,n),z.init(e,n)}),Po=c("ZodBoolean",(e,n)=>{Wt.init(e,n),k.init(e,n)});function Io(e){return Cr(Po,e)}const Oo=c("ZodUnknown",(e,n)=>{Bt.init(e,n),k.init(e,n)});function Ie(){return Dr(Oo)}const So=c("ZodNever",(e,n)=>{Kt.init(e,n),k.init(e,n)});function Ao(e){return Ur(So,e)}const To=c("ZodArray",(e,n)=>{Jt.init(e,n),k.init(e,n),e.element=n.element,e.min=(t,r)=>e.check(M(t,r)),e.nonempty=t=>e.check(M(1,t)),e.max=(t,r)=>e.check(Ge(t,r)),e.length=(t,r)=>e.check(Xe(t,r)),e.unwrap=()=>e.element});function Ro(e,n){return Gr(To,e,n)}const Co=c("ZodObject",(e,n)=>{qt.init(e,n),k.init(e,n),_(e,"shape",()=>n.shape),e.keyof=()=>Vo(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ie()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ie()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ao()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>jn(e,t),e.merge=t=>xn(e,t),e.pick=t=>bn(e,t),e.omit=t=>yn(e,t),e.partial=(...t)=>En(He,e,t[0]),e.required=(...t)=>Pn(Qe,e,t[0])});function Do(e,n){const t={type:"object",get shape(){return ue(this,"shape",{...e}),this.shape},...l(n)};return new Co(t)}const Uo=c("ZodUnion",(e,n)=>{Gt.init(e,n),k.init(e,n),e.options=n.options});function No(e,n){return new Uo({type:"union",options:e,...l(n)})}const Lo=c("ZodIntersection",(e,n)=>{Xt.init(e,n),k.init(e,n)});function Fo(e,n){return new Lo({type:"intersection",left:e,right:n})}const oe=c("ZodEnum",(e,n)=>{Yt.init(e,n),k.init(e,n),e.enum=n.entries,e.options=Object.values(n.entries);const t=new Set(Object.keys(n.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(t.has(s))i[s]=n.entries[s];else throw new Error(`Key ${s} not found in enum`);return new oe({...n,checks:[],...l(o),entries:i})},e.exclude=(r,o)=>{const i={...n.entries};for(const s of r)if(t.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new oe({...n,checks:[],...l(o),entries:i})}});function Vo(e,n){const t=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new oe({type:"enum",entries:t,...l(n)})}const Mo=c("ZodTransform",(e,n)=>{Ht.init(e,n),k.init(e,n),e._zod.parse=(t,r)=>{t.addIssue=i=>{if(typeof i=="string")t.issues.push(R(i,t.value,n));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=t.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),t.issues.push(R(s))}};const o=n.transform(t.value,t);return o instanceof Promise?o.then(i=>(t.value=i,t)):(t.value=o,t)}});function Wo(e){return new Mo({type:"transform",transform:e})}const He=c("ZodOptional",(e,n)=>{Qt.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Oe(e){return new He({type:"optional",innerType:e})}const Bo=c("ZodNullable",(e,n)=>{er.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Se(e){return new Bo({type:"nullable",innerType:e})}const Ko=c("ZodDefault",(e,n)=>{nr.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Jo(e,n){return new Ko({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():n}})}const qo=c("ZodPrefault",(e,n)=>{tr.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Go(e,n){return new qo({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():n}})}const Qe=c("ZodNonOptional",(e,n)=>{rr.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Xo(e,n){return new Qe({type:"nonoptional",innerType:e,...l(n)})}const Yo=c("ZodCatch",(e,n)=>{or.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ho(e,n){return new Yo({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const Qo=c("ZodPipe",(e,n)=>{ir.init(e,n),k.init(e,n),e.in=n.in,e.out=n.out});function Ae(e,n){return new Qo({type:"pipe",in:e,out:n})}const ei=c("ZodReadonly",(e,n)=>{sr.init(e,n),k.init(e,n)});function ni(e){return new ei({type:"readonly",innerType:e})}const ti=c("ZodCustom",(e,n)=>{cr.init(e,n),k.init(e,n)});function ri(e){const n=new j({check:"custom"});return n._zod.check=e,n}function oi(e,n={}){return Xr(ti,e,n)}function ii(e){const n=ri(t=>(t.addIssue=r=>{if(typeof r=="string")t.issues.push(R(r,t.value,n._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=t.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),t.issues.push(R(o))}},e(t.value,t)));return n}const si=Do({email:Ee().nonempty("Please enter your email").email(),password:Ee().nonempty("Please enter your password"),remember:Io()});function ci(){"use no memo";const e=an(),n=ee(o=>o.auth.isLoading),t=on({resolver:vn(si),defaultValues:{email:"",password:"",remember:!1}}),r=ie.useCallback(({email:o,password:i,remember:s})=>{e(ln({email:o,password:i,remember:s}))},[e]);return h.jsx("div",{className:"flex flex-col",children:h.jsx(sn,{...t,children:h.jsxs("form",{onSubmit:t.handleSubmit(r),className:"space-y-4",children:[h.jsx(G,{control:t.control,name:"email",rules:{required:!0},render:({field:o})=>h.jsxs(X,{children:[h.jsx(fe,{className:"flex gap-1 items-baseline",children:"Email"}),h.jsx(Y,{children:h.jsx(me,{placeholder:"callasmaria@example.com",...o})}),h.jsx(H,{})]})}),h.jsx(G,{name:"password",control:t.control,rules:{required:!0},render:({field:o})=>h.jsxs(X,{children:[h.jsx(fe,{className:"flex gap-1 items-baseline",children:"Password"}),h.jsx(Y,{children:h.jsx(me,{type:"password",...o})}),h.jsx(H,{})]})}),h.jsx(G,{name:"remember",control:t.control,render:({field:o})=>h.jsxs(X,{children:[h.jsx(Y,{children:h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx(cn,{id:"remember",checked:o.value,onCheckedChange:o.onChange}),h.jsx("label",{htmlFor:"remember",className:"text-sm leading-none",children:"Remember me"})]})}),h.jsx(H,{})]})}),h.jsx(tn,{type:"submit",disabled:!t.formState.isValid||n,className:"w-full",children:n?h.jsx(Re,{className:"absolute"}):"Login"})]})})})}const vi=en(function(){const n=nn(),t=ee(o=>o.auth.user),r=ee(o=>o.auth.isLoading);return ie.useEffect(()=>{t&&n("/admin/dashboard")},[n,t]),r||t?null:h.jsx("div",{className:"flex w-full h-full",children:h.jsxs("div",{className:"self-center space-y-8 w-72 mx-auto",children:[h.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[h.jsx("h1",{className:"text-2xl font-semibold tracking-tight leading-none",children:"Editorial Admin"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your details below to login"})]}),h.jsx(ci,{})]})})});export{vi as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,x as hr,l as C}from"./chunk-KNED5TY2-CXj9yqcQ.js";import{d as Ne,e as ue,P as W,a as I,g as mr,u as Qt,c as at,b as ye,h as vr,f as gr}from"./index-B_FOxFgA.js";import{u as G,a as yr,b as wr}from"./button-O0EDocjF.js";import{a as J,_ as Jt,b as xr}from"./tslib.es6-CDuPK5Eb.js";import{R as br,r as Er}from"./index-B7e3fQ32.js";var Cr=hr[" useId ".trim().toString()]||(()=>{}),Rr=0;function Te(e){const[t,n]=c.useState(Cr());return Ne(()=>{n(r=>r??String(Rr++))},[e]),e||(t?`radix-${t}`:"")}function Ar(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Pr="DismissableLayer",et="dismissableLayer.update",Sr="dismissableLayer.pointerDownOutside",Tr="dismissableLayer.focusOutside",Nt,en=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ct=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=c.useContext(en),[f,p]=c.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=c.useState({}),g=G(t,R=>p(R)),d=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=d.indexOf(v),w=f?d.indexOf(f):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=w>=y,E=Lr(R=>{const S=R.target,D=[...u.branches].some(T=>T.contains(S));!x||D||(o==null||o(R),s==null||s(R),R.defaultPrevented||a==null||a())},m),A=Nr(R=>{const S=R.target;[...u.branches].some(T=>T.contains(S))||(i==null||i(R),s==null||s(R),R.defaultPrevented||a==null||a())},m);return Ar(R=>{w===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},m),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Nt=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Mt(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Nt)}},[f,m,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Mt())},[f,u]),c.useEffect(()=>{const R=()=>h({});return document.addEventListener(et,R),()=>document.removeEventListener(et,R)},[]),C.jsx(W.div,{...l,ref:g,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,A.onFocusCapture),onBlurCapture:I(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,E.onPointerDownCapture)})});ct.displayName=Pr;var Or="DismissableLayerBranch",Dr=c.forwardRef((e,t)=>{const n=c.useContext(en),r=c.useRef(null),o=G(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),C.jsx(W.div,{...e,ref:o})});Dr.displayName=Or;function Lr(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){tn(Sr,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Nr(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&tn(Tr,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Mt(){const e=new CustomEvent(et);document.dispatchEvent(e)}function tn(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mr(o,i):o.dispatchEvent(i)}var Ue="focusScope.autoFocusOnMount",ze="focusScope.autoFocusOnUnmount",kt={bubbles:!1,cancelable:!0},Mr="FocusScope",nn=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=c.useState(null),u=ue(o),f=ue(i),p=c.useRef(null),m=G(t,d=>l(d)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let d=function(b){if(h.paused||!a)return;const x=b.target;a.contains(x)?p.current=x:Q(p.current,{select:!0})},v=function(b){if(h.paused||!a)return;const x=b.relatedTarget;x!==null&&(a.contains(x)||Q(p.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&Q(a)};document.addEventListener("focusin",d),document.addEventListener("focusout",v);const w=new MutationObserver(y);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",v),w.disconnect()}}},[r,a,h.paused]),c.useEffect(()=>{if(a){Ft.add(h);const d=document.activeElement;if(!a.contains(d)){const y=new CustomEvent(Ue,kt);a.addEventListener(Ue,u),a.dispatchEvent(y),y.defaultPrevented||(kr(jr(rn(a)),{select:!0}),document.activeElement===d&&Q(a))}return()=>{a.removeEventListener(Ue,u),setTimeout(()=>{const y=new CustomEvent(ze,kt);a.addEventListener(ze,f),a.dispatchEvent(y),y.defaultPrevented||Q(d??document.body,{select:!0}),a.removeEventListener(ze,f),Ft.remove(h)},0)}}},[a,u,f,h]);const g=c.useCallback(d=>{if(!n&&!r||h.paused)return;const v=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,y=document.activeElement;if(v&&y){const w=d.currentTarget,[b,x]=_r(w);b&&x?!d.shiftKey&&y===x?(d.preventDefault(),n&&Q(b,{select:!0})):d.shiftKey&&y===b&&(d.preventDefault(),n&&Q(x,{select:!0})):y===w&&d.preventDefault()}},[n,r,h.paused]);return C.jsx(W.div,{tabIndex:-1,...s,ref:m,onKeyDown:g})});nn.displayName=Mr;function kr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Q(r,{select:t}),document.activeElement!==n)return}function _r(e){const t=rn(e),n=_t(t,e),r=_t(t.reverse(),e);return[n,r]}function rn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _t(e,t){for(const n of e)if(!Fr(n,{upTo:t}))return n}function Fr(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ir(e){return e instanceof HTMLInputElement&&"select"in e}function Q(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ir(e)&&t&&e.select()}}var Ft=Wr();function Wr(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=It(e,t),e.unshift(t)},remove(t){var n;e=It(e,t),(n=e[0])==null||n.resume()}}}function It(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jr(e){return e.filter(t=>t.tagName!=="A")}var Br="Portal",lt=c.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=c.useState(!1);Ne(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?br.createPortal(C.jsx(W.div,{...r,ref:t}),s):null});lt.displayName=Br;var Xe=0;function Hr(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Wt()),document.body.insertAdjacentElement("beforeend",e[1]??Wt()),Xe++,()=>{Xe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xe--}},[])}function Wt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Oe="right-scroll-bar-position",De="width-before-scroll-bar",$r="with-scroll-bars-hidden",Vr="--removed-body-scroll-bar-size";function Ge(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yr(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Ur=typeof window<"u"?c.useLayoutEffect:c.useEffect,jt=new WeakMap;function zr(e,t){var n=Yr(null,function(r){return e.forEach(function(o){return Ge(o,r)})});return Ur(function(){var r=jt.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||Ge(a,null)}),i.forEach(function(a){o.has(a)||Ge(a,s)})}jt.set(n,e)},[e]),n}function Xr(e){return e}function Gr(e,t){t===void 0&&(t=Xr);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var f=s;s=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),n}}}};return o}function Kr(e){e===void 0&&(e={});var t=Gr(null);return t.options=J({async:!0,ssr:!1},e),t}var on=function(e){var t=e.sideCar,n=Jt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,J({},n))};on.isSideCarExport=!0;function qr(e,t){return e.useMedium(t),on}var sn=Kr(),Ke=function(){},We=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Ke,onWheelCapture:Ke,onTouchMoveCapture:Ke}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,h=e.noIsolation,g=e.inert,d=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,w=e.gapMode,b=Jt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=m,E=zr([n,t]),A=J(J({},b),o);return c.createElement(c.Fragment,null,f&&c.createElement(x,{sideCar:sn,removeScrollBar:u,shards:p,noIsolation:h,inert:g,setCallbacks:i,allowPinchZoom:!!d,lockRef:n,gapMode:w}),s?c.cloneElement(c.Children.only(a),J(J({},A),{ref:E})):c.createElement(y,J({},A,{className:l,ref:E}),a))});We.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};We.classNames={fullWidth:De,zeroRight:Oe};var Zr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Qr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Zr();return t&&e.setAttribute("nonce",t),e}function Jr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eo(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var to=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Qr())&&(Jr(t,n),eo(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},no=function(){var e=to();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},an=function(){var e=no(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ro={left:0,top:0,right:0,gap:0},qe=function(e){return parseInt(e||"",10)||0},oo=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qe(n),qe(r),qe(o)]},io=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ro;var t=oo(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},so=an(),ce="data-scroll-locked",ao=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
1
|
+
import{a as c,y as hr,n as C}from"./chunk-KNED5TY2-DAA_sFzt.js";import{d as Ne,e as ue,P as W,a as I,g as mr,u as Qt,c as at,b as ye,h as vr,f as gr}from"./index-BvKqmqc2.js";import{u as G,a as yr,b as wr}from"./button-Da66T3Bb.js";import{a as J,_ as Jt,b as xr}from"./tslib.es6-CDuPK5Eb.js";import{R as br,a as Er}from"./index-C-vcF2DZ.js";var Cr=hr[" useId ".trim().toString()]||(()=>{}),Rr=0;function Te(e){const[t,n]=c.useState(Cr());return Ne(()=>{n(r=>r??String(Rr++))},[e]),e||(t?`radix-${t}`:"")}function Ar(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Pr="DismissableLayer",et="dismissableLayer.update",Sr="dismissableLayer.pointerDownOutside",Tr="dismissableLayer.focusOutside",Nt,en=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ct=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=c.useContext(en),[f,p]=c.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=c.useState({}),g=G(t,R=>p(R)),d=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=d.indexOf(v),w=f?d.indexOf(f):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=w>=y,E=Lr(R=>{const S=R.target,D=[...u.branches].some(T=>T.contains(S));!x||D||(o==null||o(R),s==null||s(R),R.defaultPrevented||a==null||a())},m),A=Nr(R=>{const S=R.target;[...u.branches].some(T=>T.contains(S))||(i==null||i(R),s==null||s(R),R.defaultPrevented||a==null||a())},m);return Ar(R=>{w===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},m),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Nt=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Mt(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Nt)}},[f,m,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Mt())},[f,u]),c.useEffect(()=>{const R=()=>h({});return document.addEventListener(et,R),()=>document.removeEventListener(et,R)},[]),C.jsx(W.div,{...l,ref:g,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,A.onFocusCapture),onBlurCapture:I(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,E.onPointerDownCapture)})});ct.displayName=Pr;var Or="DismissableLayerBranch",Dr=c.forwardRef((e,t)=>{const n=c.useContext(en),r=c.useRef(null),o=G(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),C.jsx(W.div,{...e,ref:o})});Dr.displayName=Or;function Lr(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){tn(Sr,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Nr(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&tn(Tr,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Mt(){const e=new CustomEvent(et);document.dispatchEvent(e)}function tn(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mr(o,i):o.dispatchEvent(i)}var Ue="focusScope.autoFocusOnMount",ze="focusScope.autoFocusOnUnmount",kt={bubbles:!1,cancelable:!0},Mr="FocusScope",nn=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=c.useState(null),u=ue(o),f=ue(i),p=c.useRef(null),m=G(t,d=>l(d)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let d=function(b){if(h.paused||!a)return;const x=b.target;a.contains(x)?p.current=x:Q(p.current,{select:!0})},v=function(b){if(h.paused||!a)return;const x=b.relatedTarget;x!==null&&(a.contains(x)||Q(p.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&Q(a)};document.addEventListener("focusin",d),document.addEventListener("focusout",v);const w=new MutationObserver(y);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",v),w.disconnect()}}},[r,a,h.paused]),c.useEffect(()=>{if(a){Ft.add(h);const d=document.activeElement;if(!a.contains(d)){const y=new CustomEvent(Ue,kt);a.addEventListener(Ue,u),a.dispatchEvent(y),y.defaultPrevented||(kr(jr(rn(a)),{select:!0}),document.activeElement===d&&Q(a))}return()=>{a.removeEventListener(Ue,u),setTimeout(()=>{const y=new CustomEvent(ze,kt);a.addEventListener(ze,f),a.dispatchEvent(y),y.defaultPrevented||Q(d??document.body,{select:!0}),a.removeEventListener(ze,f),Ft.remove(h)},0)}}},[a,u,f,h]);const g=c.useCallback(d=>{if(!n&&!r||h.paused)return;const v=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,y=document.activeElement;if(v&&y){const w=d.currentTarget,[b,x]=_r(w);b&&x?!d.shiftKey&&y===x?(d.preventDefault(),n&&Q(b,{select:!0})):d.shiftKey&&y===b&&(d.preventDefault(),n&&Q(x,{select:!0})):y===w&&d.preventDefault()}},[n,r,h.paused]);return C.jsx(W.div,{tabIndex:-1,...s,ref:m,onKeyDown:g})});nn.displayName=Mr;function kr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Q(r,{select:t}),document.activeElement!==n)return}function _r(e){const t=rn(e),n=_t(t,e),r=_t(t.reverse(),e);return[n,r]}function rn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _t(e,t){for(const n of e)if(!Fr(n,{upTo:t}))return n}function Fr(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ir(e){return e instanceof HTMLInputElement&&"select"in e}function Q(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ir(e)&&t&&e.select()}}var Ft=Wr();function Wr(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=It(e,t),e.unshift(t)},remove(t){var n;e=It(e,t),(n=e[0])==null||n.resume()}}}function It(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jr(e){return e.filter(t=>t.tagName!=="A")}var Br="Portal",lt=c.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=c.useState(!1);Ne(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?br.createPortal(C.jsx(W.div,{...r,ref:t}),s):null});lt.displayName=Br;var Xe=0;function Hr(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Wt()),document.body.insertAdjacentElement("beforeend",e[1]??Wt()),Xe++,()=>{Xe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xe--}},[])}function Wt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Oe="right-scroll-bar-position",De="width-before-scroll-bar",$r="with-scroll-bars-hidden",Vr="--removed-body-scroll-bar-size";function Ge(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yr(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Ur=typeof window<"u"?c.useLayoutEffect:c.useEffect,jt=new WeakMap;function zr(e,t){var n=Yr(null,function(r){return e.forEach(function(o){return Ge(o,r)})});return Ur(function(){var r=jt.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||Ge(a,null)}),i.forEach(function(a){o.has(a)||Ge(a,s)})}jt.set(n,e)},[e]),n}function Xr(e){return e}function Gr(e,t){t===void 0&&(t=Xr);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var f=s;s=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),n}}}};return o}function Kr(e){e===void 0&&(e={});var t=Gr(null);return t.options=J({async:!0,ssr:!1},e),t}var on=function(e){var t=e.sideCar,n=Jt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,J({},n))};on.isSideCarExport=!0;function qr(e,t){return e.useMedium(t),on}var sn=Kr(),Ke=function(){},We=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Ke,onWheelCapture:Ke,onTouchMoveCapture:Ke}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,h=e.noIsolation,g=e.inert,d=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,w=e.gapMode,b=Jt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=m,E=zr([n,t]),A=J(J({},b),o);return c.createElement(c.Fragment,null,f&&c.createElement(x,{sideCar:sn,removeScrollBar:u,shards:p,noIsolation:h,inert:g,setCallbacks:i,allowPinchZoom:!!d,lockRef:n,gapMode:w}),s?c.cloneElement(c.Children.only(a),J(J({},A),{ref:E})):c.createElement(y,J({},A,{className:l,ref:E}),a))});We.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};We.classNames={fullWidth:De,zeroRight:Oe};var Zr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Qr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Zr();return t&&e.setAttribute("nonce",t),e}function Jr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eo(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var to=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Qr())&&(Jr(t,n),eo(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},no=function(){var e=to();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},an=function(){var e=no(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ro={left:0,top:0,right:0,gap:0},qe=function(e){return parseInt(e||"",10)||0},oo=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qe(n),qe(r),qe(o)]},io=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ro;var t=oo(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},so=an(),ce="data-scroll-locked",ao=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
2
2
|
.`.concat($r,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(a,"px ").concat(r,`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as i,n as P}from"./chunk-KNED5TY2-DAA_sFzt.js";import{u as C,a as g}from"./button-Da66T3Bb.js";import{a as w}from"./index-C-vcF2DZ.js";function D(e,t){const n=i.createContext(t),r=s=>{const{children:c,...u}=s,a=i.useMemo(()=>u,Object.values(u));return P.jsx(n.Provider,{value:a,children:c})};r.displayName=e+"Provider";function o(s){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function $(e,t=[]){let n=[];function r(s,c){const u=i.createContext(c),a=n.length;n=[...n,c];const f=d=>{var b;const{scope:m,children:l,...h}=d,v=((b=m==null?void 0:m[e])==null?void 0:b[a])||u,S=i.useMemo(()=>h,Object.values(h));return P.jsx(v.Provider,{value:S,children:l})};f.displayName=s+"Provider";function p(d,m){var v;const l=((v=m==null?void 0:m[e])==null?void 0:v[a])||u,h=i.useContext(l);if(h)return h;if(c!==void 0)return c;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[f,p]}const o=()=>{const s=n.map(c=>i.createContext(c));return function(u){const a=(u==null?void 0:u[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...u,[e]:a}}),[u,a])}};return o.scopeName=e,[r,y(o,...t)]}function y(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const c=r.reduce((u,{useScope:a,scopeName:f})=>{const d=a(s)[`__scope${f}`];return{...u,...d}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function j(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function A(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function L({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=M({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:r,u=A(n),a=i.useCallback(f=>{if(s){const d=typeof f=="function"?f(e):f;d!==e&&u(d)}else o(f)},[s,e,o,u]);return[c,a]}function M({defaultProp:e,onChange:t}){const n=i.useState(e),[r]=n,o=i.useRef(r),s=A(t);return i.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var x=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{};function W(e){const[t,n]=i.useState(void 0);return x(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let c,u;if("borderBoxSize"in s){const a=s.borderBoxSize,f=Array.isArray(a)?a[0]:a;c=f.inlineSize,u=f.blockSize}else c=e.offsetWidth,u=e.offsetHeight;n({width:c,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function O(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var E=e=>{const{present:t,children:n}=e,r=R(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=C(r.ref,T(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null};E.displayName="Presence";function R(e){const[t,n]=i.useState(),r=i.useRef({}),o=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[u,a]=O(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const f=N(r.current);s.current=u==="mounted"?f:"none"},[u]),x(()=>{const f=r.current,p=o.current;if(p!==e){const m=s.current,l=N(f);e?a("MOUNT"):l==="none"||(f==null?void 0:f.display)==="none"?a("UNMOUNT"):a(p&&m!==l?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),x(()=>{if(t){let f;const p=t.ownerDocument.defaultView??window,d=l=>{const v=N(r.current).includes(l.animationName);if(l.target===t&&v&&(a("ANIMATION_END"),!o.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",f=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},m=l=>{l.target===t&&(s.current=N(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{p.clearTimeout(f),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:i.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function N(e){return(e==null?void 0:e.animationName)||"none"}function T(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var U=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],F=U.reduce((e,t)=>{const n=g(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:c,...u}=o,a=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),P.jsx(a,{...u,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function k(e,t){e&&w.flushSync(()=>e.dispatchEvent(t))}export{F as P,j as a,E as b,$ as c,x as d,A as e,W as f,k as g,D as h,L as u};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as O,x as S}from"./chunk-KNED5TY2-DAA_sFzt.js";var d={exports:{}},n={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-dom.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var l;function R(){if(l)return n;l=1;var u=O();function g(e){var r="https://react.dev/errors/"+e;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var t=2;t<arguments.length;t++)r+="&args[]="+encodeURIComponent(arguments[t])}return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var i={d:{f:a,r:function(){throw Error(g(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},m=Symbol.for("react.portal");function v(e,r,t){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:c==null?null:""+c,children:e,containerInfo:r,implementation:t}}var f=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(e,r){if(e==="font")return"";if(typeof r=="string")return r==="use-credentials"?r:""}return n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,n.createPortal=function(e,r){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)throw Error(g(299));return v(e,r,null,t)},n.flushSync=function(e){var r=f.T,t=i.p;try{if(f.T=null,i.p=2,e)return e()}finally{f.T=r,i.p=t,i.d.f()}},n.preconnect=function(e,r){typeof e=="string"&&(r?(r=r.crossOrigin,r=typeof r=="string"?r==="use-credentials"?r:"":void 0):r=null,i.d.C(e,r))},n.prefetchDNS=function(e){typeof e=="string"&&i.d.D(e)},n.preinit=function(e,r){if(typeof e=="string"&&r&&typeof r.as=="string"){var t=r.as,c=s(t,r.crossOrigin),y=typeof r.integrity=="string"?r.integrity:void 0,o=typeof r.fetchPriority=="string"?r.fetchPriority:void 0;t==="style"?i.d.S(e,typeof r.precedence=="string"?r.precedence:void 0,{crossOrigin:c,integrity:y,fetchPriority:o}):t==="script"&&i.d.X(e,{crossOrigin:c,integrity:y,fetchPriority:o,nonce:typeof r.nonce=="string"?r.nonce:void 0})}},n.preinitModule=function(e,r){if(typeof e=="string")if(typeof r=="object"&&r!==null){if(r.as==null||r.as==="script"){var t=s(r.as,r.crossOrigin);i.d.M(e,{crossOrigin:t,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0})}}else r==null&&i.d.M(e)},n.preload=function(e,r){if(typeof e=="string"&&typeof r=="object"&&r!==null&&typeof r.as=="string"){var t=r.as,c=s(t,r.crossOrigin);i.d.L(e,t,{crossOrigin:c,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0,type:typeof r.type=="string"?r.type:void 0,fetchPriority:typeof r.fetchPriority=="string"?r.fetchPriority:void 0,referrerPolicy:typeof r.referrerPolicy=="string"?r.referrerPolicy:void 0,imageSrcSet:typeof r.imageSrcSet=="string"?r.imageSrcSet:void 0,imageSizes:typeof r.imageSizes=="string"?r.imageSizes:void 0,media:typeof r.media=="string"?r.media:void 0})}},n.preloadModule=function(e,r){if(typeof e=="string")if(r){var t=s(r.as,r.crossOrigin);i.d.m(e,{as:typeof r.as=="string"&&r.as!=="script"?r.as:void 0,crossOrigin:t,integrity:typeof r.integrity=="string"?r.integrity:void 0})}else i.d.m(e)},n.requestFormReset=function(e){i.d.r(e)},n.unstable_batchedUpdates=function(e,r){return e(r)},n.useFormState=function(e,r,t){return f.H.useFormState(e,r,t)},n.useFormStatus=function(){return f.H.useHostTransitionStatus()},n.version="19.0.0",n}var _;function E(){if(_)return d.exports;_=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(g){console.error(g)}}return u(),d.exports=R(),d.exports}var T=E();const h=S(T);export{h as R,T as a,E as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{n as y,a as X}from"./chunk-KNED5TY2-DAA_sFzt.js";import{c as E}from"./utils-DslUJpbf.js";function st({className:e,...o}){return y.jsx("div",{"data-slot":"table-container",className:"relative w-full",children:y.jsx("div",{"data-slot":"table",className:E("w-full caption-bottom text-sm",e),...o})})}function ut({className:e,...o}){return y.jsx("div",{"data-slot":"table-header",className:E("[&_tr]:border-b",e),...o})}function at({className:e,...o}){return y.jsx("div",{"data-slot":"table-body",className:E("[&_tr:last-child]:border-0",e),...o})}function gt({className:e,...o}){return y.jsx("div",{"data-slot":"table-row",className:E("hover:bg-muted/50 data-[state=selected]:bg-muted transition-colors",e),...o})}function dt({className:e,...o}){return y.jsx("div",{"data-slot":"table-head",className:E("flex items-center text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap border-b [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...o})}function ct({className:e,...o}){return y.jsx("div",{"data-slot":"table-cell",className:E("p-2 align-middle whitespace-nowrap border-b [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...o})}/**
|
|
2
2
|
* table-core
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) TanStack
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as O,n as R,w as V}from"./chunk-KNED5TY2-DAA_sFzt.js";import{u as Ut,S as jt}from"./button-Da66T3Bb.js";import{u as Bt,c as qt,P as Ne,a as Ze,b as $t,f as Ht}from"./index-BvKqmqc2.js";import{c as ae}from"./utils-DslUJpbf.js";import{c as Wt}from"./createLucideIcon-R2-3a7hN.js";function zt(e){const r=O.useRef({value:e,previous:e});return O.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}var Te="Checkbox",[Kt,Er]=qt(Te),[Xt,Gt]=Kt(Te),lt=O.forwardRef((e,r)=>{const{__scopeCheckbox:t,name:i,checked:a,defaultChecked:o,required:c,disabled:h,value:x="on",onCheckedChange:C,form:b,...v}=e,[A,B]=O.useState(null),I=Ut(r,D=>B(D)),L=O.useRef(!1),U=A?b||!!A.closest("form"):!0,[q=!1,F]=Bt({prop:a,defaultProp:o,onChange:C}),G=O.useRef(q);return O.useEffect(()=>{const D=A==null?void 0:A.form;if(D){const w=()=>F(G.current);return D.addEventListener("reset",w),()=>D.removeEventListener("reset",w)}},[A,F]),R.jsxs(Xt,{scope:t,state:q,disabled:h,children:[R.jsx(Ne.button,{type:"button",role:"checkbox","aria-checked":se(q)?"mixed":q,"aria-required":c,"data-state":ft(q),"data-disabled":h?"":void 0,disabled:h,value:x,...v,ref:I,onKeyDown:Ze(e.onKeyDown,D=>{D.key==="Enter"&&D.preventDefault()}),onClick:Ze(e.onClick,D=>{F(w=>se(w)?!0:!w),U&&(L.current=D.isPropagationStopped(),L.current||D.stopPropagation())})}),U&&R.jsx(Yt,{control:A,bubbles:!L.current,name:i,value:x,checked:q,required:c,disabled:h,form:b,style:{transform:"translateX(-100%)"},defaultChecked:se(o)?!1:o})]})});lt.displayName=Te;var ct="CheckboxIndicator",dt=O.forwardRef((e,r)=>{const{__scopeCheckbox:t,forceMount:i,...a}=e,o=Gt(ct,t);return R.jsx($t,{present:i||se(o.state)||o.state===!0,children:R.jsx(Ne.span,{"data-state":ft(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:r,style:{pointerEvents:"none",...e.style}})})});dt.displayName=ct;var Yt=e=>{const{control:r,checked:t,bubbles:i=!0,defaultChecked:a,...o}=e,c=O.useRef(null),h=zt(t),x=Ht(r);O.useEffect(()=>{const b=c.current,v=window.HTMLInputElement.prototype,B=Object.getOwnPropertyDescriptor(v,"checked").set;if(h!==t&&B){const I=new Event("click",{bubbles:i});b.indeterminate=se(t),B.call(b,se(t)?!1:t),b.dispatchEvent(I)}},[h,t,i]);const C=O.useRef(se(t)?!1:t);return R.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??C.current,...o,tabIndex:-1,ref:c,style:{...e.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function se(e){return e==="indeterminate"}function ft(e){return se(e)?"indeterminate":e?"checked":"unchecked"}var Jt=lt,Qt=dt;/**
|
|
2
2
|
* @license lucide-react v0.487.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|