@isardsat/editorial-admin 6.3.3 → 6.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/build/client/assets/{authSlice-DST6tNnU.js → authSlice-Ck6mjgyY.js} +163 -163
  2. package/build/client/assets/button-D_tNOZW3.js +1 -0
  3. package/build/client/assets/calendar-6ih_JEvR.js +6 -0
  4. package/build/client/assets/chunk-EF7DTUVF-MlADC7xe.js +51 -0
  5. package/build/client/assets/{createLucideIcon-BOhrmKcl.js → createLucideIcon-BJQzFwzJ.js} +1 -1
  6. package/build/client/assets/dashboard-CCf5hKPx.js +1 -0
  7. package/build/client/assets/dashboard._collection-wP1ZB_LW.js +26 -0
  8. package/build/client/assets/dashboard._collection._document-DIZN2iYh.js +1 -0
  9. package/build/client/assets/dashboard._collection.new-CwbH5p80.js +1 -0
  10. package/build/client/assets/dashboard._layout-DvaVEgFX.js +46 -0
  11. package/build/client/assets/dashboard.files-yiR8nzfC.js +1 -0
  12. package/build/client/assets/entry.client-BI4QA1ti.js +29 -0
  13. package/build/client/assets/external-link-D1If5twJ.js +6 -0
  14. package/build/client/assets/files-JeyUc7x_.js +26 -0
  15. package/build/client/assets/home-B0S_vIyA.js +1 -0
  16. package/build/client/assets/index-BCIQh_1v.js +55 -0
  17. package/build/client/assets/index-BKOWzfnu.js +1 -0
  18. package/build/client/assets/index-BkW3jRP3.js +22 -0
  19. package/build/client/assets/index-b67bZzAe.js +1 -0
  20. package/build/client/assets/{index-BnyqKVWo.js → index-xBXWoUIa.js} +1 -1
  21. package/build/client/assets/itemForm-Cmaxg87K.css +1 -0
  22. package/build/client/assets/itemForm-GgzEy97l.js +106 -0
  23. package/build/client/assets/manifest-4c29314e.js +1 -0
  24. package/build/client/assets/root-CB55qcm6.css +1 -0
  25. package/build/client/assets/root-CBzRfVLY.js +1 -0
  26. package/build/client/assets/spinner-C6NBcdtB.js +11 -0
  27. package/build/client/assets/trash-CN5HT_ZJ.js +11 -0
  28. package/build/client/assets/types-DI1nugUt.js +6 -0
  29. package/build/client/assets/upload-CopmcV94.js +11 -0
  30. package/build/client/assets/utils-DN8wQ0jG.js +9 -0
  31. package/build/client/index.html +3 -3
  32. package/package.json +7 -7
  33. package/build/client/assets/button-DjJX-cbR.js +0 -1
  34. package/build/client/assets/chevron-down-CYVLN3e-.js +0 -6
  35. package/build/client/assets/chunk-EF7DTUVF-CZaHNoTs.js +0 -51
  36. package/build/client/assets/dashboard-BjYHjaPP.js +0 -1
  37. package/build/client/assets/dashboard._collection-U37ELAZn.js +0 -16
  38. package/build/client/assets/dashboard._collection._document-Dt2belpf.js +0 -1
  39. package/build/client/assets/dashboard._collection.new-B-0plYyF.js +0 -1
  40. package/build/client/assets/dashboard._layout-CvH5YBY6.js +0 -61
  41. package/build/client/assets/dashboard.files-7tsycrA_.js +0 -36
  42. package/build/client/assets/editorialApi-CqxxtYzA.js +0 -9
  43. package/build/client/assets/entry.client-DxhHtLqO.js +0 -29
  44. package/build/client/assets/home-BkOGwoQz.js +0 -11
  45. package/build/client/assets/index-B0NebLYn.js +0 -1
  46. package/build/client/assets/index-CQvFoK7s.js +0 -22
  47. package/build/client/assets/index-b1VEd5BJ.js +0 -50
  48. package/build/client/assets/input-DA43W1bc.js +0 -6
  49. package/build/client/assets/itemForm-BVtnhZqg.css +0 -1
  50. package/build/client/assets/itemForm-CnzvRzeD.js +0 -95
  51. package/build/client/assets/manifest-e453e863.js +0 -1
  52. package/build/client/assets/root-Cuw5kjHy.js +0 -1
  53. package/build/client/assets/root-DdgoqUZJ.css +0 -1
  54. package/build/client/assets/trash-CYTPibS3.js +0 -6
  55. package/build/client/assets/tslib.es6-De9GV7Vy.js +0 -1
  56. package/build/client/assets/utils-BSDwSRl3.js +0 -1
@@ -1,11 +0,0 @@
1
- import{a as oe,p as x,w as $e,v as Ve}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{B as Le}from"./button-DjJX-cbR.js";import{g as K,s as J,a as Me,u as Pe,F as ze,b as Y,c as H,d as ce,e as G,I as ue,f as Q,C as De}from"./input-DA43W1bc.js";import{c as Fe}from"./utils-BSDwSRl3.js";import{c as Se}from"./createLucideIcon-BOhrmKcl.js";import{u as Ue,e as ee,l as Be}from"./authSlice-DST6tNnU.js";import"./index-B0NebLYn.js";import"./index-BnyqKVWo.js";import"./tslib.es6-De9GV7Vy.js";import"./editorialApi-CqxxtYzA.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 We=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],qe=Se("loader-circle",We);/**
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 Je=[["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"}]],Ye=Se("loader",Je),Oe=oe.forwardRef(({className:s,...e},t)=>x.jsx(qe,{ref:t,className:Fe(s,"animate-spin"),...e}));Oe.displayName=Ye.displayName;const le=(s,e,t)=>{if(s&&"reportValidity"in s){const r=K(t,e);s.setCustomValidity(r&&r.message||""),s.reportValidity()}},Ae=(s,e)=>{for(const t in e.fields){const r=e.fields[t];r&&r.ref&&"reportValidity"in r.ref?le(r.ref,t,s):r.refs&&r.refs.forEach(a=>le(a,t,s))}},He=(s,e)=>{e.shouldUseNativeValidation&&Ae(s,e);const t={};for(const r in s){const a=K(e.fields,r),n=Object.assign(s[r]||{},{ref:a&&a.ref});if(Ge(e.names||Object.keys(s),r)){const i=Object.assign({},K(t,r));J(i,"root",n),J(t,r,i)}else J(t,r,n)}return t},Ge=(s,e)=>s.some(t=>t.startsWith(e+"."));var Qe=function(s,e){for(var t={};s.length;){var r=s[0],a=r.code,n=r.message,i=r.path.join(".");if(!t[i])if("unionErrors"in r){var o=r.unionErrors[0].errors[0];t[i]={message:o.message,type:o.code}}else t[i]={message:n,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(y){return y.errors.forEach(function(Z){return s.push(Z)})}),e){var u=t[i].types,h=u&&u[r.code];t[i]=Me(i,e,t,a,h?[].concat(h,r.message):r.message)}s.shift()}return t},Xe=function(s,e,t){return t===void 0&&(t={}),function(r,a,n){try{return Promise.resolve(function(i,o){try{var u=Promise.resolve(s[t.mode==="sync"?"parse":"parseAsync"](r,e)).then(function(h){return n.shouldUseNativeValidation&&Ae({},n),{errors:{},values:t.raw?r:h}})}catch(h){return o(h)}return u&&u.then?u.then(void 0,o):u}(0,function(i){if(function(o){return Array.isArray(o==null?void 0:o.errors)}(i))return{values:{},errors:He(Qe(i.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}}},v;(function(s){s.assertEqual=a=>{};function e(a){}s.assertIs=e;function t(a){throw new Error}s.assertNever=t,s.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},s.getValidEnumValues=a=>{const n=s.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),i={};for(const o of n)i[o]=a[o];return s.objectValues(i)},s.objectValues=a=>s.objectKeys(a).map(function(n){return a[n]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},s.find=(a,n)=>{for(const i of a)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=r,s.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(v||(v={}));var he;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(he||(he={}));const l=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),j=s=>{switch(typeof s){case"undefined":return l.undefined;case"string":return l.string;case"number":return Number.isNaN(s)?l.nan:l.number;case"boolean":return l.boolean;case"function":return l.function;case"bigint":return l.bigint;case"symbol":return l.symbol;case"object":return Array.isArray(s)?l.array:s===null?l.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?l.promise:typeof Map<"u"&&s instanceof Map?l.map:typeof Set<"u"&&s instanceof Set?l.set:typeof Date<"u"&&s instanceof Date?l.date:l.object;default:return l.unknown}},d=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class N extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,u=0;for(;u<i.path.length;){const h=i.path[u];u===i.path.length-1?(o[h]=o[h]||{_errors:[]},o[h]._errors.push(t(i))):o[h]=o[h]||{_errors:[]},o=o[h],u++}}};return a(this),r}static assert(e){if(!(e instanceof N))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,v.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},r=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}N.create=s=>new N(s);const te=(s,e)=>{let t;switch(s.code){case d.invalid_type:s.received===l.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,v.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(s.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(s.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(s.options)}, received '${s.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:v.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case d.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case d.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(s)}return{message:t}};let Ke=te;function et(){return Ke}const tt=s=>{const{data:e,path:t,errorMaps:r,issueData:a}=s,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let o="";const u=r.filter(h=>!!h).slice().reverse();for(const h of u)o=h(i,{data:e,defaultError:o}).message;return{...a,path:n,message:o}};function c(s,e){const t=et(),r=tt({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===te?void 0:te].filter(a=>!!a)});s.common.issues.push(r)}class b{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return b.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return m;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),M=s=>({status:"dirty",value:s}),w=s=>({status:"valid",value:s}),fe=s=>s.status==="aborted",me=s=>s.status==="dirty",I=s=>s.status==="valid",F=s=>typeof Promise<"u"&&s instanceof Promise;var f;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(f||(f={}));class O{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const pe=(s,e)=>{if(I(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new N(s.common.issues);return this._error=t,this._error}}};function g(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,o)=>{const{message:u}=s;return i.code==="invalid_enum_value"?{message:u??o.defaultError}:typeof o.data>"u"?{message:u??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:u??t??o.defaultError}},description:a}}class _{get description(){return this._def.description}_getType(e){return j(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:j(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:j(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(F(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)},a=this._parseSync({data:e,path:r.path,parent:r});return pe(r,a)}"~validate"(e){var r,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return I(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(r=n==null?void 0:n.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>I(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(F(a)?a:Promise.resolve(a));return pe(r,n)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),o=()=>n.addIssue({code:d.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new V({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return S.create(this,this._def)}nullable(){return L.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return C.create(this)}promise(){return q.create(this,this._def)}or(e){return B.create([this,e],this._def)}and(e){return W.create(this,e,this._def)}transform(e){return new V({...g(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ae({...g(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new Ct({typeName:p.ZodBranded,type:this,...g(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ne({...g(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return de.create(this,e)}readonly(){return ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const st=/^c[^\s-]{8,}$/i,rt=/^[0-9a-z]+$/,at=/^[0-9A-HJKMNP-TV-Z]{26}$/i,nt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,it=/^[a-z0-9_-]{21}$/i,ot=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,dt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ct=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ut="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let X;const lt=/^(?:(?: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])$/,ht=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ft=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,mt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,pt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,gt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ze="((\\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])))",yt=new RegExp(`^${Ze}$`);function Re(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function _t(s){return new RegExp(`^${Re(s)}$`)}function vt(s){let e=`${Ze}T${Re(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function xt(s,e){return!!((e==="v4"||!e)&&lt.test(s)||(e==="v6"||!e)&&ft.test(s))}function kt(s,e){if(!ot.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function bt(s,e){return!!((e==="v4"||!e)&&ht.test(s)||(e==="v6"||!e)&&mt.test(s))}class T extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==l.string){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:l.string,received:n.parsedType}),m}const r=new b;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.length<n.value;(i||o)&&(a=this._getOrReturnCtx(e,a),i?c(a,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):o&&c(a,{code:d.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),r.dirty())}else if(n.kind==="email")ct.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"email",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="emoji")X||(X=new RegExp(ut,"u")),X.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"emoji",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="uuid")nt.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"uuid",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="nanoid")it.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"nanoid",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid")st.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cuid",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid2")rt.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cuid2",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="ulid")at.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"ulid",code:d.invalid_string,message:n.message}),r.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),c(a,{validation:"url",code:d.invalid_string,message:n.message}),r.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"regex",code:d.invalid_string,message:n.message}),r.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),r.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.invalid_string,validation:{startsWith:n.value},message:n.message}),r.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.invalid_string,validation:{endsWith:n.value},message:n.message}),r.dirty()):n.kind==="datetime"?vt(n).test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.invalid_string,validation:"datetime",message:n.message}),r.dirty()):n.kind==="date"?yt.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.invalid_string,validation:"date",message:n.message}),r.dirty()):n.kind==="time"?_t(n).test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.invalid_string,validation:"time",message:n.message}),r.dirty()):n.kind==="duration"?dt.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"duration",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="ip"?xt(e.data,n.version)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"ip",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="jwt"?kt(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"jwt",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="cidr"?bt(e.data,n.version)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cidr",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="base64"?pt.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"base64",code:d.invalid_string,message:n.message}),r.dirty()):n.kind==="base64url"?gt.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"base64url",code:d.invalid_string,message:n.message}),r.dirty()):v.assertNever(n);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(a=>e.test(a),{validation:t,code:d.invalid_string,...f.errToObj(r)})}_addCheck(e){return new T({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...f.errToObj(e)})}url(e){return this._addCheck({kind:"url",...f.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...f.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...f.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...f.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...f.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...f.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...f.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...f.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...f.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...f.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...f.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...f.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...f.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...f.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...f.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...f.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...f.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...f.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...f.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...f.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...f.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...f.errToObj(t)})}nonempty(e){return this.min(1,f.errToObj(e))}trim(){return new T({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new T({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new T({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}T.create=s=>new T({checks:[],typeName:p.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});function wt(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,n=Number.parseInt(s.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class P extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==l.number){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:l.number,received:n.parsedType}),m}let r;const a=new b;for(const n of this._def.checks)n.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?wt(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_finite,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,f.toString(t))}gt(e,t){return this.setLimit("min",e,!1,f.toString(t))}lte(e,t){return this.setLimit("max",e,!0,f.toString(t))}lt(e,t){return this.setLimit("max",e,!1,f.toString(t))}setLimit(e,t,r,a){return new P({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:f.toString(a)}]})}_addCheck(e){return new P({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:f.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:f.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:f.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:f.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:f.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}P.create=s=>new P({checks:[],typeName:p.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class z extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==l.bigint)return this._getInvalidInput(e);let r;const a=new b;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:l.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,f.toString(t))}gt(e,t){return this.setLimit("min",e,!1,f.toString(t))}lte(e,t){return this.setLimit("max",e,!0,f.toString(t))}lt(e,t){return this.setLimit("max",e,!1,f.toString(t))}setLimit(e,t,r,a){return new z({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:f.toString(a)}]})}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:f.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}z.create=s=>new z({checks:[],typeName:p.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});class se extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==l.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.boolean,received:r.parsedType}),m}return w(e.data)}}se.create=s=>new se({typeName:p.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class U extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==l.date){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:l.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_date}),m}const r=new b;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):v.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:f.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:f.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}U.create=s=>new U({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:p.ZodDate,...g(s)});class ge extends _{_parse(e){if(this._getType(e)!==l.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.symbol,received:r.parsedType}),m}return w(e.data)}}ge.create=s=>new ge({typeName:p.ZodSymbol,...g(s)});class ye extends _{_parse(e){if(this._getType(e)!==l.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.undefined,received:r.parsedType}),m}return w(e.data)}}ye.create=s=>new ye({typeName:p.ZodUndefined,...g(s)});class _e extends _{_parse(e){if(this._getType(e)!==l.null){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.null,received:r.parsedType}),m}return w(e.data)}}_e.create=s=>new _e({typeName:p.ZodNull,...g(s)});class ve extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return w(e.data)}}ve.create=s=>new ve({typeName:p.ZodAny,...g(s)});class xe extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w(e.data)}}xe.create=s=>new xe({typeName:p.ZodUnknown,...g(s)});class A extends _{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:l.never,received:t.parsedType}),m}}A.create=s=>new A({typeName:p.ZodNever,...g(s)});class ke extends _{_parse(e){if(this._getType(e)!==l.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.void,received:r.parsedType}),m}return w(e.data)}}ke.create=s=>new ke({typeName:p.ZodVoid,...g(s)});class C extends _{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==l.array)return c(t,{code:d.invalid_type,expected:l.array,received:t.parsedType}),m;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,o=t.data.length<a.exactLength.value;(i||o)&&(c(t,{code:i?d.too_big:d.too_small,minimum:o?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(c(t,{code:d.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(c(t,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>a.type._parseAsync(new O(t,i,t.path,o)))).then(i=>b.mergeArray(r,i));const n=[...t.data].map((i,o)=>a.type._parseSync(new O(t,i,t.path,o)));return b.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new C({...this._def,minLength:{value:e,message:f.toString(t)}})}max(e,t){return new C({...this._def,maxLength:{value:e,message:f.toString(t)}})}length(e,t){return new C({...this._def,exactLength:{value:e,message:f.toString(t)}})}nonempty(e){return this.min(1,e)}}C.create=(s,e)=>new C({type:s,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,...g(e)});function E(s){if(s instanceof k){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=S.create(E(r))}return new k({...s._def,shape:()=>e})}else return s instanceof C?new C({...s._def,type:E(s.element)}):s instanceof S?S.create(E(s.unwrap())):s instanceof L?L.create(E(s.unwrap())):s instanceof R?R.create(s.items.map(e=>E(e))):s}class k extends _{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==l.object){const h=this._getOrReturnCtx(e);return c(h,{code:d.invalid_type,expected:l.object,received:h.parsedType}),m}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof A&&this._def.unknownKeys==="strip"))for(const h in a.data)i.includes(h)||o.push(h);const u=[];for(const h of i){const y=n[h],Z=a.data[h];u.push({key:{status:"valid",value:h},value:y._parse(new O(a,Z,a.path,h)),alwaysSet:h in a.data})}if(this._def.catchall instanceof A){const h=this._def.unknownKeys;if(h==="passthrough")for(const y of o)u.push({key:{status:"valid",value:y},value:{status:"valid",value:a.data[y]}});else if(h==="strict")o.length>0&&(c(a,{code:d.unrecognized_keys,keys:o}),r.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const y of o){const Z=a.data[y];u.push({key:{status:"valid",value:y},value:h._parse(new O(a,Z,a.path,y)),alwaysSet:y in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const h=[];for(const y of u){const Z=await y.key,Ie=await y.value;h.push({key:Z,value:Ie,alwaysSet:y.alwaysSet})}return h}).then(h=>b.mergeObjectSync(r,h)):b.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(e){return f.errToObj,new k({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:f.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new k({...this._def,unknownKeys:"strip"})}passthrough(){return new k({...this._def,unknownKeys:"passthrough"})}extend(e){return new k({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new k({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new k({...this._def,catchall:e})}pick(e){const t={};for(const r of v.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new k({...this._def,shape:()=>t})}omit(e){const t={};for(const r of v.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new k({...this._def,shape:()=>t})}deepPartial(){return E(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new k({...this._def,shape:()=>t})}required(e){const t={};for(const r of v.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof S;)n=n._def.innerType;t[r]=n}return new k({...this._def,shape:()=>t})}keyof(){return Ee(v.objectKeys(this.shape))}}k.create=(s,e)=>new k({shape:()=>s,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,...g(e)});k.strictCreate=(s,e)=>new k({shape:()=>s,unknownKeys:"strict",catchall:A.create(),typeName:p.ZodObject,...g(e)});k.lazycreate=(s,e)=>new k({shape:s,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,...g(e)});class B extends _{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=n.map(o=>new N(o.ctx.common.issues));return c(t,{code:d.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const u of r){const h={...t,common:{...t.common,issues:[]},parent:null},y=u._parseSync({data:t.data,path:t.path,parent:h});if(y.status==="valid")return y;y.status==="dirty"&&!n&&(n={result:y,ctx:h}),h.common.issues.length&&i.push(h.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const o=i.map(u=>new N(u));return c(t,{code:d.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}B.create=(s,e)=>new B({options:s,typeName:p.ZodUnion,...g(e)});function re(s,e){const t=j(s),r=j(e);if(s===e)return{valid:!0,data:s};if(t===l.object&&r===l.object){const a=v.objectKeys(e),n=v.objectKeys(s).filter(o=>a.indexOf(o)!==-1),i={...s,...e};for(const o of n){const u=re(s[o],e[o]);if(!u.valid)return{valid:!1};i[o]=u.data}return{valid:!0,data:i}}else if(t===l.array&&r===l.array){if(s.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<s.length;n++){const i=s[n],o=e[n],u=re(i,o);if(!u.valid)return{valid:!1};a.push(u.data)}return{valid:!0,data:a}}else return t===l.date&&r===l.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class W extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=(n,i)=>{if(fe(n)||fe(i))return m;const o=re(n.value,i.value);return o.valid?((me(n)||me(i))&&t.dirty(),{status:t.value,value:o.data}):(c(r,{code:d.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}W.create=(s,e,t)=>new W({left:s,right:e,typeName:p.ZodIntersection,...g(t)});class R extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.array)return c(r,{code:d.invalid_type,expected:l.array,received:r.parsedType}),m;if(r.data.length<this._def.items.length)return c(r,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&r.data.length>this._def.items.length&&(c(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((i,o)=>{const u=this._def.items[o]||this._def.rest;return u?u._parse(new O(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>b.mergeArray(t,i)):b.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new R({...this._def,rest:e})}}R.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new R({items:s,typeName:p.ZodTuple,rest:null,...g(e)})};class be extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.map)return c(r,{code:d.invalid_type,expected:l.map,received:r.parsedType}),m;const a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([o,u],h)=>({key:a._parse(new O(r,o,r.path,[h,"key"])),value:n._parse(new O(r,u,r.path,[h,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const u of i){const h=await u.key,y=await u.value;if(h.status==="aborted"||y.status==="aborted")return m;(h.status==="dirty"||y.status==="dirty")&&t.dirty(),o.set(h.value,y.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const u of i){const h=u.key,y=u.value;if(h.status==="aborted"||y.status==="aborted")return m;(h.status==="dirty"||y.status==="dirty")&&t.dirty(),o.set(h.value,y.value)}return{status:t.value,value:o}}}}be.create=(s,e,t)=>new be({valueType:e,keyType:s,typeName:p.ZodMap,...g(t)});class D extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.set)return c(r,{code:d.invalid_type,expected:l.set,received:r.parsedType}),m;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(c(r,{code:d.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(c(r,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(u){const h=new Set;for(const y of u){if(y.status==="aborted")return m;y.status==="dirty"&&t.dirty(),h.add(y.value)}return{status:t.value,value:h}}const o=[...r.data.values()].map((u,h)=>n._parse(new O(r,u,r.path,h)));return r.common.async?Promise.all(o).then(u=>i(u)):i(o)}min(e,t){return new D({...this._def,minSize:{value:e,message:f.toString(t)}})}max(e,t){return new D({...this._def,maxSize:{value:e,message:f.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}D.create=(s,e)=>new D({valueType:s,minSize:null,maxSize:null,typeName:p.ZodSet,...g(e)});class we extends _{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}we.create=(s,e)=>new we({getter:s,typeName:p.ZodLazy,...g(e)});class Ce extends _{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ce.create=(s,e)=>new Ce({value:s,typeName:p.ZodLiteral,...g(e)});function Ee(s,e){return new $({values:s,typeName:p.ZodEnum,...g(e)})}class $ extends _{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{expected:v.joinValues(r),received:t.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{received:t.data,code:d.invalid_enum_value,options:r}),m}return w(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return $.create(e,{...this._def,...t})}exclude(e,t=this._def){return $.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}$.create=Ee;class Ne extends _{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==l.string&&r.parsedType!==l.number){const a=v.objectValues(t);return c(r,{expected:v.joinValues(a),received:r.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=v.objectValues(t);return c(r,{received:r.data,code:d.invalid_enum_value,options:a}),m}return w(e.data)}get enum(){return this._def.values}}Ne.create=(s,e)=>new Ne({values:s,typeName:p.ZodNativeEnum,...g(e)});class q extends _{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:l.promise,received:t.parsedType}),m;const r=t.parsedType===l.promise?t.data:Promise.resolve(t.data);return w(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}q.create=(s,e)=>new q({type:s,typeName:p.ZodPromise,...g(e)});class V extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const u=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return u.status==="aborted"?m:u.status==="dirty"||t.value==="dirty"?M(u.value):u});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?M(o.value):o}}if(a.type==="refinement"){const i=o=>{const u=a.refinement(o,n);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!I(i))return m;const o=a.transform(i.value,n);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>I(i)?Promise.resolve(a.transform(i.value,n)).then(o=>({status:t.value,value:o})):m);v.assertNever(a)}}V.create=(s,e,t)=>new V({schema:s,typeName:p.ZodEffects,effect:e,...g(t)});V.createWithPreprocess=(s,e,t)=>new V({schema:e,effect:{type:"preprocess",transform:s},typeName:p.ZodEffects,...g(t)});class S extends _{_parse(e){return this._getType(e)===l.undefined?w(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}S.create=(s,e)=>new S({innerType:s,typeName:p.ZodOptional,...g(e)});class L extends _{_parse(e){return this._getType(e)===l.null?w(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}L.create=(s,e)=>new L({innerType:s,typeName:p.ZodNullable,...g(e)});class ae extends _{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===l.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ae.create=(s,e)=>new ae({innerType:s,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});class ne extends _{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return F(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new N(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new N(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ne.create=(s,e)=>new ne({innerType:s,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});class je extends _{_parse(e){if(this._getType(e)!==l.nan){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}je.create=s=>new je({typeName:p.ZodNaN,...g(s)});class Ct extends _{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class de extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),M(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new de({in:e,out:t,typeName:p.ZodPipeline})}}class ie extends _{_parse(e){const t=this._def.innerType._parse(e),r=a=>(I(a)&&(a.value=Object.freeze(a.value)),a);return F(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:p.ZodReadonly,...g(e)});var p;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(p||(p={}));const Te=T.create,Nt=se.create;A.create;C.create;const jt=k.create;B.create;W.create;R.create;$.create;q.create;S.create;L.create;const Tt=jt({email:Te().nonempty("Please enter your email").email(),password:Te().nonempty("Please enter your password"),remember:Nt()});function St(){"use no memo";const s=Ue(),e=ee(a=>a.auth.isLoading),t=Pe({resolver:Xe(Tt),disabled:e,defaultValues:{email:"",password:"",remember:!1}}),r=oe.useCallback(({email:a,password:n,remember:i})=>{s(Be({email:a,password:n,remember:i}))},[s]);return x.jsx("div",{className:"flex flex-col",children:x.jsx(ze,{...t,children:x.jsxs("form",{onSubmit:t.handleSubmit(r),className:"space-y-4",children:[x.jsx(Y,{control:t.control,name:"email",rules:{required:!0},render:({field:a})=>x.jsxs(H,{children:[x.jsx(ce,{className:"flex gap-1 items-baseline",children:"Email"}),x.jsx(G,{children:x.jsx(ue,{placeholder:"callasmaria@example.com",...a})}),x.jsx(Q,{})]})}),x.jsx(Y,{name:"password",control:t.control,rules:{required:!0},render:({field:a})=>x.jsxs(H,{children:[x.jsx(ce,{className:"flex gap-1 items-baseline",children:"Password"}),x.jsx(G,{children:x.jsx(ue,{type:"password",...a})}),x.jsx(Q,{})]})}),x.jsx(Y,{name:"remember",control:t.control,render:({field:a})=>x.jsxs(H,{children:[x.jsx(G,{children:x.jsxs("div",{className:"flex items-center space-x-2",children:[x.jsx(De,{id:"remember",checked:a.value,onCheckedChange:a.onChange}),x.jsx("label",{htmlFor:"remember",className:"text-sm leading-none",children:"Remember me"})]})}),x.jsx(Q,{})]})}),x.jsx(Le,{type:"submit",disabled:!t.formState.isValid||e,className:"w-full",children:e?x.jsx(Oe,{className:"absolute"}):"Login"})]})})})}const Pt=$e(function(){const e=Ve(),t=ee(a=>a.auth.user),r=ee(a=>a.auth.isLoading);return oe.useEffect(()=>{t&&e("/admin/dashboard")},[e,t]),r||t?null:x.jsx("div",{className:"flex w-full h-full",children:x.jsxs("div",{className:"self-center space-y-8 w-72 mx-auto",children:[x.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[x.jsx("h1",{className:"text-2xl font-semibold tracking-tight leading-none",children:"Editorial Admin"}),x.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your details below to login"})]}),x.jsx(St,{})]})})});export{Pt as default};
@@ -1 +0,0 @@
1
- import{a as u,p as w,C as P}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{u as A,a as g}from"./button-DjJX-cbR.js";import{a as y}from"./index-BnyqKVWo.js";function j(e,t){const n=u.createContext(t),r=c=>{const{children:s,...i}=c,a=u.useMemo(()=>i,Object.values(i));return w.jsx(n.Provider,{value:a,children:s})};r.displayName=e+"Provider";function o(c){const s=u.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[r,o]}function L(e,t=[]){let n=[];function r(c,s){const i=u.createContext(s),a=n.length;n=[...n,s];const f=d=>{var b;const{scope:m,children:p,...v}=d,h=((b=m==null?void 0:m[e])==null?void 0:b[a])||i,x=u.useMemo(()=>v,Object.values(v));return w.jsx(h.Provider,{value:x,children:p})};f.displayName=c+"Provider";function l(d,m){var h;const p=((h=m==null?void 0:m[e])==null?void 0:h[a])||i,v=u.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${c}\``)}return[f,l]}const o=()=>{const c=n.map(s=>u.createContext(s));return function(i){const a=(i==null?void 0:i[e])||c;return u.useMemo(()=>({[`__scope${e}`]:{...i,[e]:a}}),[i,a])}};return o.scopeName=e,[r,C(o,...t)]}function C(...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(c){const s=r.reduce((i,{useScope:a,scopeName:f})=>{const d=a(c)[`__scope${f}`];return{...i,...d}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function W(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var S=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},M=P[" useInsertionEffect ".trim().toString()]||S;function F({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,c,s]=E({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:o;{const l=u.useRef(e!==void 0);u.useEffect(()=>{const d=l.current;d!==i&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=i},[i,r])}const f=u.useCallback(l=>{var d;if(i){const m=O(l)?l(e):l;m!==e&&((d=s.current)==null||d.call(s,m))}else c(l)},[i,e,c,s]);return[a,f]}function E({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),o=u.useRef(n),c=u.useRef(t);return M(()=>{c.current=t},[t]),u.useEffect(()=>{var s;o.current!==n&&((s=c.current)==null||s.call(c,n),o.current=n)},[n,o]),[n,r,c]}function O(e){return typeof e=="function"}function k(e){const[t,n]=u.useState(void 0);return S(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const c=o[0];let s,i;if("borderBoxSize"in c){const a=c.borderBoxSize,f=Array.isArray(a)?a[0]:a;s=f.inlineSize,i=f.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function R(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var T=e=>{const{present:t,children:n}=e,r=I(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),c=A(r.ref,U(o));return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:c}):null};T.displayName="Presence";function I(e){const[t,n]=u.useState(),r=u.useRef(null),o=u.useRef(e),c=u.useRef("none"),s=e?"mounted":"unmounted",[i,a]=R(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const f=N(r.current);c.current=i==="mounted"?f:"none"},[i]),S(()=>{const f=r.current,l=o.current;if(l!==e){const m=c.current,p=N(f);e?a("MOUNT"):p==="none"||(f==null?void 0:f.display)==="none"?a("UNMOUNT"):a(l&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),S(()=>{if(t){let f;const l=t.ownerDocument.defaultView??window,d=p=>{const h=N(r.current).includes(p.animationName);if(p.target===t&&h&&(a("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",f=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=p=>{p.target===t&&(c.current=N(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{l.clearTimeout(f),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:u.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function N(e){return(e==null?void 0:e.animationName)||"none"}function U(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 $=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],B=$.reduce((e,t)=>{const n=g(`Primitive.${t}`),r=u.forwardRef((o,c)=>{const{asChild:s,...i}=o,a=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...i,ref:c})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function V(e,t){e&&y.flushSync(()=>e.dispatchEvent(t))}export{B as P,W as a,T as b,L as c,S as d,k as e,V as f,j as g,F as u};
@@ -1,22 +0,0 @@
1
- import{p as y,a as X}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{c as E}from"./utils-BSDwSRl3.js";function ut({className:e,...o}){return y.jsx("div",{"data-slot":"table-container",className:"flex relative",children:y.jsx("div",{"data-slot":"table",className:E("flex-1 caption-bottom text-sm",e),...o})})}function at({className:e,...o}){return y.jsx("div",{"data-slot":"table-header",className:E("[&_tr]:border-b",e),...o})}function gt({className:e,...o}){return y.jsx("div",{"data-slot":"table-body",className:E("[&_tr:last-child]:border-0",e),...o})}function dt({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 ct({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 ft({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
- * table-core
3
- *
4
- * Copyright (c) TanStack
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE.md file in the root directory of this source tree.
8
- *
9
- * @license MIT
10
- */function pt(){return{accessor:(e,o)=>typeof e=="function"?{...o,accessorFn:e}:{...o,accessorKey:e},display:e=>e,group:e=>e}}function V(e,o){return typeof e=="function"?e(o):e}function F(e,o){return t=>{o.setState(n=>({...n,[e]:V(t,n[e])}))}}function L(e){return e instanceof Function}function Ce(e){return Array.isArray(e)&&e.every(o=>typeof o=="number")}function Re(e,o){const t=[],n=r=>{r.forEach(i=>{t.push(i);const l=o(i);l!=null&&l.length&&n(l)})};return n(e),t}function S(e,o,t){let n=[],r;return i=>{let l;t.key&&t.debug&&(l=Date.now());const s=e(i);if(!(s.length!==n.length||s.some((c,C)=>n[C]!==c)))return r;n=s;let g;if(t.key&&t.debug&&(g=Date.now()),r=o(...s),t==null||t.onChange==null||t.onChange(r),t.key&&t.debug&&t!=null&&t.debug()){const c=Math.round((Date.now()-l)*100)/100,C=Math.round((Date.now()-g)*100)/100,d=C/16,a=(f,p)=>{for(f=String(f);f.length<p;)f=" "+f;return f};console.info(`%c⏱ ${a(C,5)} /${a(c,5)} ms`,`
11
- font-size: .6rem;
12
- font-weight: bold;
13
- color: hsl(${Math.max(0,Math.min(120-120*d,120))}deg 100% 31%);`,t==null?void 0:t.key)}return r}}function m(e,o,t,n){return{debug:()=>{var r;return(r=e==null?void 0:e.debugAll)!=null?r:e[o]},key:!1,onChange:n}}function we(e,o,t,n){const r=()=>{var l;return(l=i.getValue())!=null?l:e.options.renderFallbackValue},i={id:`${o.id}_${t.id}`,row:o,column:t,getValue:()=>o.getValue(n),renderValue:r,getContext:S(()=>[e,t,o,i],(l,s,u,g)=>({table:l,column:s,row:u,cell:g,getValue:g.getValue,renderValue:g.renderValue}),m(e.options,"debugCells"))};return e._features.forEach(l=>{l.createCell==null||l.createCell(i,t,o,e)},{}),i}function ve(e,o,t,n){var r,i;const s={...e._getDefaultColumnDef(),...o},u=s.accessorKey;let g=(r=(i=s.id)!=null?i:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?r:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:u&&(u.includes(".")?c=d=>{let a=d;for(const p of u.split(".")){var f;a=(f=a)==null?void 0:f[p]}return a}:c=d=>d[s.accessorKey]),!g)throw new Error;let C={id:`${String(g)}`,accessorFn:c,parent:n,depth:t,columnDef:s,columns:[],getFlatColumns:S(()=>[!0],()=>{var d;return[C,...(d=C.columns)==null?void 0:d.flatMap(a=>a.getFlatColumns())]},m(e.options,"debugColumns")),getLeafColumns:S(()=>[e._getOrderColumnsFn()],d=>{var a;if((a=C.columns)!=null&&a.length){let f=C.columns.flatMap(p=>p.getLeafColumns());return d(f)}return[C]},m(e.options,"debugColumns"))};for(const d of e._features)d.createColumn==null||d.createColumn(C,e);return C}const h="debugHeaders";function re(e,o,t){var n;let i={id:(n=t.id)!=null?n:o.id,column:o,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const l=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),l.push(u)};return s(i),l},getContext:()=>({table:e,header:i,column:o})};return e._features.forEach(l=>{l.createHeader==null||l.createHeader(i,e)}),i}const he={createTable:e=>{e.getHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,t,n,r)=>{var i,l;const s=(i=n==null?void 0:n.map(C=>t.find(d=>d.id===C)).filter(Boolean))!=null?i:[],u=(l=r==null?void 0:r.map(C=>t.find(d=>d.id===C)).filter(Boolean))!=null?l:[],g=t.filter(C=>!(n!=null&&n.includes(C.id))&&!(r!=null&&r.includes(C.id)));return G(o,[...s,...g,...u],e)},m(e.options,h)),e.getCenterHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,t,n,r)=>(t=t.filter(i=>!(n!=null&&n.includes(i.id))&&!(r!=null&&r.includes(i.id))),G(o,t,e,"center")),m(e.options,h)),e.getLeftHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(o,t,n)=>{var r;const i=(r=n==null?void 0:n.map(l=>t.find(s=>s.id===l)).filter(Boolean))!=null?r:[];return G(o,i,e,"left")},m(e.options,h)),e.getRightHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(o,t,n)=>{var r;const i=(r=n==null?void 0:n.map(l=>t.find(s=>s.id===l)).filter(Boolean))!=null?r:[];return G(o,i,e,"right")},m(e.options,h)),e.getFooterGroups=S(()=>[e.getHeaderGroups()],o=>[...o].reverse(),m(e.options,h)),e.getLeftFooterGroups=S(()=>[e.getLeftHeaderGroups()],o=>[...o].reverse(),m(e.options,h)),e.getCenterFooterGroups=S(()=>[e.getCenterHeaderGroups()],o=>[...o].reverse(),m(e.options,h)),e.getRightFooterGroups=S(()=>[e.getRightHeaderGroups()],o=>[...o].reverse(),m(e.options,h)),e.getFlatHeaders=S(()=>[e.getHeaderGroups()],o=>o.map(t=>t.headers).flat(),m(e.options,h)),e.getLeftFlatHeaders=S(()=>[e.getLeftHeaderGroups()],o=>o.map(t=>t.headers).flat(),m(e.options,h)),e.getCenterFlatHeaders=S(()=>[e.getCenterHeaderGroups()],o=>o.map(t=>t.headers).flat(),m(e.options,h)),e.getRightFlatHeaders=S(()=>[e.getRightHeaderGroups()],o=>o.map(t=>t.headers).flat(),m(e.options,h)),e.getCenterLeafHeaders=S(()=>[e.getCenterFlatHeaders()],o=>o.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),m(e.options,h)),e.getLeftLeafHeaders=S(()=>[e.getLeftFlatHeaders()],o=>o.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),m(e.options,h)),e.getRightLeafHeaders=S(()=>[e.getRightFlatHeaders()],o=>o.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),m(e.options,h)),e.getLeafHeaders=S(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(o,t,n)=>{var r,i,l,s,u,g;return[...(r=(i=o[0])==null?void 0:i.headers)!=null?r:[],...(l=(s=t[0])==null?void 0:s.headers)!=null?l:[],...(u=(g=n[0])==null?void 0:g.headers)!=null?u:[]].map(c=>c.getLeafHeaders()).flat()},m(e.options,h))}};function G(e,o,t,n){var r,i;let l=0;const s=function(d,a){a===void 0&&(a=1),l=Math.max(l,a),d.filter(f=>f.getIsVisible()).forEach(f=>{var p;(p=f.columns)!=null&&p.length&&s(f.columns,a+1)},0)};s(e);let u=[];const g=(d,a)=>{const f={depth:a,id:[n,`${a}`].filter(Boolean).join("_"),headers:[]},p=[];d.forEach(w=>{const R=[...p].reverse()[0],_=w.column.depth===f.depth;let v,M=!1;if(_&&w.column.parent?v=w.column.parent:(v=w.column,M=!0),R&&(R==null?void 0:R.column)===v)R.subHeaders.push(w);else{const I=re(t,v,{id:[n,a,v.id,w==null?void 0:w.id].filter(Boolean).join("_"),isPlaceholder:M,placeholderId:M?`${p.filter(O=>O.column===v).length}`:void 0,depth:a,index:p.length});I.subHeaders.push(w),p.push(I)}f.headers.push(w),w.headerGroup=f}),u.push(f),a>0&&g(p,a-1)},c=o.map((d,a)=>re(t,d,{depth:l,index:a}));g(c,l-1),u.reverse();const C=d=>d.filter(f=>f.column.getIsVisible()).map(f=>{let p=0,w=0,R=[0];f.subHeaders&&f.subHeaders.length?(R=[],C(f.subHeaders).forEach(v=>{let{colSpan:M,rowSpan:I}=v;p+=M,R.push(I)})):p=1;const _=Math.min(...R);return w=w+_,f.colSpan=p,f.rowSpan=w,{colSpan:p,rowSpan:w}});return C((r=(i=u[0])==null?void 0:i.headers)!=null?r:[]),u}const _e=(e,o,t,n,r,i,l)=>{let s={id:o,index:n,original:t,depth:r,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];const g=e.getColumn(u);if(g!=null&&g.accessorFn)return s._valuesCache[u]=g.accessorFn(s.original,n),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];const g=e.getColumn(u);if(g!=null&&g.accessorFn)return g.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=g.columnDef.getUniqueValues(s.original,n),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var g;return(g=s.getValue(u))!=null?g:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Re(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],g=s;for(;;){const c=g.getParentRow();if(!c)break;u.push(c),g=c}return u.reverse()},getAllCells:S(()=>[e.getAllLeafColumns()],u=>u.map(g=>we(e,s,g,g.id)),m(e.options,"debugRows")),_getAllCellsByColumnId:S(()=>[s.getAllCells()],u=>u.reduce((g,c)=>(g[c.column.id]=c,g),{}),m(e.options,"debugRows"))};for(let u=0;u<e._features.length;u++){const g=e._features[u];g==null||g.createRow==null||g.createRow(s,e)}return s},Fe={createColumn:(e,o)=>{e._getFacetedRowModel=o.options.getFacetedRowModel&&o.options.getFacetedRowModel(o,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():o.getPreFilteredRowModel(),e._getFacetedUniqueValues=o.options.getFacetedUniqueValues&&o.options.getFacetedUniqueValues(o,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=o.options.getFacetedMinMaxValues&&o.options.getFacetedMinMaxValues(o,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},le=(e,o,t)=>{var n,r;const i=t==null||(n=t.toString())==null?void 0:n.toLowerCase();return!!(!((r=e.getValue(o))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(i))};le.autoRemove=e=>$(e);const se=(e,o,t)=>{var n;return!!(!((n=e.getValue(o))==null||(n=n.toString())==null)&&n.includes(t))};se.autoRemove=e=>$(e);const ue=(e,o,t)=>{var n;return((n=e.getValue(o))==null||(n=n.toString())==null?void 0:n.toLowerCase())===(t==null?void 0:t.toLowerCase())};ue.autoRemove=e=>$(e);const ae=(e,o,t)=>{var n;return(n=e.getValue(o))==null?void 0:n.includes(t)};ae.autoRemove=e=>$(e);const ge=(e,o,t)=>!t.some(n=>{var r;return!((r=e.getValue(o))!=null&&r.includes(n))});ge.autoRemove=e=>$(e)||!(e!=null&&e.length);const de=(e,o,t)=>t.some(n=>{var r;return(r=e.getValue(o))==null?void 0:r.includes(n)});de.autoRemove=e=>$(e)||!(e!=null&&e.length);const ce=(e,o,t)=>e.getValue(o)===t;ce.autoRemove=e=>$(e);const fe=(e,o,t)=>e.getValue(o)==t;fe.autoRemove=e=>$(e);const Z=(e,o,t)=>{let[n,r]=t;const i=e.getValue(o);return i>=n&&i<=r};Z.resolveFilterValue=e=>{let[o,t]=e,n=typeof o!="number"?parseFloat(o):o,r=typeof t!="number"?parseFloat(t):t,i=o===null||Number.isNaN(n)?-1/0:n,l=t===null||Number.isNaN(r)?1/0:r;if(i>l){const s=i;i=l,l=s}return[i,l]};Z.autoRemove=e=>$(e)||$(e[0])&&$(e[1]);const x={includesString:le,includesStringSensitive:se,equalsString:ue,arrIncludes:ae,arrIncludesAll:ge,arrIncludesSome:de,equals:ce,weakEquals:fe,inNumberRange:Z};function $(e){return e==null||e===""}const $e={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:F("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,o)=>{e.getAutoFilterFn=()=>{const t=o.getCoreRowModel().flatRows[0],n=t==null?void 0:t.getValue(e.id);return typeof n=="string"?x.includesString:typeof n=="number"?x.inNumberRange:typeof n=="boolean"||n!==null&&typeof n=="object"?x.equals:Array.isArray(n)?x.arrIncludes:x.weakEquals},e.getFilterFn=()=>{var t,n;return L(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(n=o.options.filterFns)==null?void 0:n[e.columnDef.filterFn])!=null?t:x[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,n,r;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((n=o.options.enableColumnFilters)!=null?n:!0)&&((r=o.options.enableFilters)!=null?r:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=o.getState().columnFilters)==null||(t=t.find(n=>n.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,n;return(t=(n=o.getState().columnFilters)==null?void 0:n.findIndex(r=>r.id===e.id))!=null?t:-1},e.setFilterValue=t=>{o.setColumnFilters(n=>{const r=e.getFilterFn(),i=n==null?void 0:n.find(c=>c.id===e.id),l=V(t,i?i.value:void 0);if(ie(r,l,e)){var s;return(s=n==null?void 0:n.filter(c=>c.id!==e.id))!=null?s:[]}const u={id:e.id,value:l};if(i){var g;return(g=n==null?void 0:n.map(c=>c.id===e.id?u:c))!=null?g:[]}return n!=null&&n.length?[...n,u]:[u]})}},createRow:(e,o)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=o=>{const t=e.getAllLeafColumns(),n=r=>{var i;return(i=V(o,r))==null?void 0:i.filter(l=>{const s=t.find(u=>u.id===l.id);if(s){const u=s.getFilterFn();if(ie(u,l.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(n)},e.resetColumnFilters=o=>{var t,n;e.setColumnFilters(o?[]:(t=(n=e.initialState)==null?void 0:n.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function ie(e,o,t){return(e&&e.autoRemove?e.autoRemove(o,t):!1)||typeof o>"u"||typeof o=="string"&&!o}const xe=(e,o,t)=>t.reduce((n,r)=>{const i=r.getValue(e);return n+(typeof i=="number"?i:0)},0),Me=(e,o,t)=>{let n;return t.forEach(r=>{const i=r.getValue(e);i!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}),n},Ve=(e,o,t)=>{let n;return t.forEach(r=>{const i=r.getValue(e);i!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}),n},Pe=(e,o,t)=>{let n,r;return t.forEach(i=>{const l=i.getValue(e);l!=null&&(n===void 0?l>=l&&(n=r=l):(n>l&&(n=l),r<l&&(r=l)))}),[n,r]},Ie=(e,o)=>{let t=0,n=0;if(o.forEach(r=>{let i=r.getValue(e);i!=null&&(i=+i)>=i&&(++t,n+=i)}),t)return n/t},ye=(e,o)=>{if(!o.length)return;const t=o.map(i=>i.getValue(e));if(!Ce(t))return;if(t.length===1)return t[0];const n=Math.floor(t.length/2),r=t.sort((i,l)=>i-l);return t.length%2!==0?r[n]:(r[n-1]+r[n])/2},Ee=(e,o)=>Array.from(new Set(o.map(t=>t.getValue(e))).values()),De=(e,o)=>new Set(o.map(t=>t.getValue(e))).size,He=(e,o)=>o.length,T={sum:xe,min:Me,max:Ve,extent:Pe,mean:Ie,median:ye,unique:Ee,uniqueCount:De,count:He},Ge={getDefaultColumnDef:()=>({aggregatedCell:e=>{var o,t;return(o=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?o:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:F("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,o)=>{e.toggleGrouping=()=>{o.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(n=>n!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,n;return((t=e.columnDef.enableGrouping)!=null?t:!0)&&((n=o.options.enableGrouping)!=null?n:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var t;return(t=o.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=o.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=o.getCoreRowModel().flatRows[0],n=t==null?void 0:t.getValue(e.id);if(typeof n=="number")return T.sum;if(Object.prototype.toString.call(n)==="[object Date]")return T.extent},e.getAggregationFn=()=>{var t,n;if(!e)throw new Error;return L(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(n=o.options.aggregationFns)==null?void 0:n[e.columnDef.aggregationFn])!=null?t:T[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=o=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(o),e.resetGrouping=o=>{var t,n;e.setGrouping(o?[]:(t=(n=e.initialState)==null?void 0:n.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,o)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const n=o.getColumn(t);return n!=null&&n.columnDef.getGroupingValue?(e._groupingValuesCache[t]=n.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,o,t,n)=>{e.getIsGrouped=()=>o.getIsGrouped()&&o.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&o.getIsGrouped(),e.getIsAggregated=()=>{var r;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((r=t.subRows)!=null&&r.length)}}};function Ae(e,o,t){if(!(o!=null&&o.length)||!t)return e;const n=e.filter(i=>!o.includes(i.id));return t==="remove"?n:[...o.map(i=>e.find(l=>l.id===i)).filter(Boolean),...n]}const ze={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:F("columnOrder",e)}),createColumn:(e,o)=>{e.getIndex=S(t=>[H(o,t)],t=>t.findIndex(n=>n.id===e.id),m(o.options,"debugColumns")),e.getIsFirstColumn=t=>{var n;return((n=H(o,t)[0])==null?void 0:n.id)===e.id},e.getIsLastColumn=t=>{var n;const r=H(o,t);return((n=r[r.length-1])==null?void 0:n.id)===e.id}},createTable:e=>{e.setColumnOrder=o=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(o),e.resetColumnOrder=o=>{var t;e.setColumnOrder(o?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=S(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(o,t,n)=>r=>{let i=[];if(!(o!=null&&o.length))i=r;else{const l=[...o],s=[...r];for(;s.length&&l.length;){const u=l.shift(),g=s.findIndex(c=>c.id===u);g>-1&&i.push(s.splice(g,1)[0])}i=[...i,...s]}return Ae(i,t,n)},m(e.options,"debugTable"))}},B=()=>({left:[],right:[]}),Le={getInitialState:e=>({columnPinning:B(),...e}),getDefaultOptions:e=>({onColumnPinningChange:F("columnPinning",e)}),createColumn:(e,o)=>{e.pin=t=>{const n=e.getLeafColumns().map(r=>r.id).filter(Boolean);o.setColumnPinning(r=>{var i,l;if(t==="right"){var s,u;return{left:((s=r==null?void 0:r.left)!=null?s:[]).filter(C=>!(n!=null&&n.includes(C))),right:[...((u=r==null?void 0:r.right)!=null?u:[]).filter(C=>!(n!=null&&n.includes(C))),...n]}}if(t==="left"){var g,c;return{left:[...((g=r==null?void 0:r.left)!=null?g:[]).filter(C=>!(n!=null&&n.includes(C))),...n],right:((c=r==null?void 0:r.right)!=null?c:[]).filter(C=>!(n!=null&&n.includes(C)))}}return{left:((i=r==null?void 0:r.left)!=null?i:[]).filter(C=>!(n!=null&&n.includes(C))),right:((l=r==null?void 0:r.right)!=null?l:[]).filter(C=>!(n!=null&&n.includes(C)))}})},e.getCanPin=()=>e.getLeafColumns().some(n=>{var r,i,l;return((r=n.columnDef.enablePinning)!=null?r:!0)&&((i=(l=o.options.enableColumnPinning)!=null?l:o.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(s=>s.id),{left:n,right:r}=o.getState().columnPinning,i=t.some(s=>n==null?void 0:n.includes(s)),l=t.some(s=>r==null?void 0:r.includes(s));return i?"left":l?"right":!1},e.getPinnedIndex=()=>{var t,n;const r=e.getIsPinned();return r?(t=(n=o.getState().columnPinning)==null||(n=n[r])==null?void 0:n.indexOf(e.id))!=null?t:-1:0}},createRow:(e,o)=>{e.getCenterVisibleCells=S(()=>[e._getAllVisibleCells(),o.getState().columnPinning.left,o.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(l=>!i.includes(l.column.id))},m(o.options,"debugRows")),e.getLeftVisibleCells=S(()=>[e._getAllVisibleCells(),o.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(l=>l.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),m(o.options,"debugRows")),e.getRightVisibleCells=S(()=>[e._getAllVisibleCells(),o.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(l=>l.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),m(o.options,"debugRows"))},createTable:e=>{e.setColumnPinning=o=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(o),e.resetColumnPinning=o=>{var t,n;return e.setColumnPinning(o?B():(t=(n=e.initialState)==null?void 0:n.columnPinning)!=null?t:B())},e.getIsSomeColumnsPinned=o=>{var t;const n=e.getState().columnPinning;if(!o){var r,i;return!!((r=n.left)!=null&&r.length||(i=n.right)!=null&&i.length)}return!!((t=n[o])!=null&&t.length)},e.getLeftLeafColumns=S(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(o,t)=>(t??[]).map(n=>o.find(r=>r.id===n)).filter(Boolean),m(e.options,"debugColumns")),e.getRightLeafColumns=S(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(o,t)=>(t??[]).map(n=>o.find(r=>r.id===n)).filter(Boolean),m(e.options,"debugColumns")),e.getCenterLeafColumns=S(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,t,n)=>{const r=[...t??[],...n??[]];return o.filter(i=>!r.includes(i.id))},m(e.options,"debugColumns"))}};function Oe(e){return e||(typeof document<"u"?document:null)}const A={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},q=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Te={getDefaultColumnDef:()=>A,getInitialState:e=>({columnSizing:{},columnSizingInfo:q(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:F("columnSizing",e),onColumnSizingInfoChange:F("columnSizingInfo",e)}),createColumn:(e,o)=>{e.getSize=()=>{var t,n,r;const i=o.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:A.minSize,(n=i??e.columnDef.size)!=null?n:A.size),(r=e.columnDef.maxSize)!=null?r:A.maxSize)},e.getStart=S(t=>[t,H(o,t),o.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((r,i)=>r+i.getSize(),0),m(o.options,"debugColumns")),e.getAfter=S(t=>[t,H(o,t),o.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((r,i)=>r+i.getSize(),0),m(o.options,"debugColumns")),e.resetSize=()=>{o.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>{var t,n;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((n=o.options.enableColumnResizing)!=null?n:!0)},e.getIsResizing=()=>o.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,o)=>{e.getSize=()=>{let t=0;const n=r=>{if(r.subHeaders.length)r.subHeaders.forEach(n);else{var i;t+=(i=r.column.getSize())!=null?i:0}};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=t=>{const n=o.getColumn(e.column.id),r=n==null?void 0:n.getCanResize();return i=>{if(!n||!r||(i.persist==null||i.persist(),k(i)&&i.touches&&i.touches.length>1))return;const l=e.getSize(),s=e?e.getLeafHeaders().map(R=>[R.column.id,R.column.getSize()]):[[n.id,n.getSize()]],u=k(i)?Math.round(i.touches[0].clientX):i.clientX,g={},c=(R,_)=>{typeof _=="number"&&(o.setColumnSizingInfo(v=>{var M,I;const O=o.options.columnResizeDirection==="rtl"?-1:1,te=(_-((M=v==null?void 0:v.startOffset)!=null?M:0))*O,ne=Math.max(te/((I=v==null?void 0:v.startSize)!=null?I:0),-.999999);return v.columnSizingStart.forEach(Se=>{let[me,oe]=Se;g[me]=Math.round(Math.max(oe+oe*ne,0)*100)/100}),{...v,deltaOffset:te,deltaPercentage:ne}}),(o.options.columnResizeMode==="onChange"||R==="end")&&o.setColumnSizing(v=>({...v,...g})))},C=R=>c("move",R),d=R=>{c("end",R),o.setColumnSizingInfo(_=>({..._,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},a=Oe(t),f={moveHandler:R=>C(R.clientX),upHandler:R=>{a==null||a.removeEventListener("mousemove",f.moveHandler),a==null||a.removeEventListener("mouseup",f.upHandler),d(R.clientX)}},p={moveHandler:R=>(R.cancelable&&(R.preventDefault(),R.stopPropagation()),C(R.touches[0].clientX),!1),upHandler:R=>{var _;a==null||a.removeEventListener("touchmove",p.moveHandler),a==null||a.removeEventListener("touchend",p.upHandler),R.cancelable&&(R.preventDefault(),R.stopPropagation()),d((_=R.touches[0])==null?void 0:_.clientX)}},w=Be()?{passive:!1}:!1;k(i)?(a==null||a.addEventListener("touchmove",p.moveHandler,w),a==null||a.addEventListener("touchend",p.upHandler,w)):(a==null||a.addEventListener("mousemove",f.moveHandler,w),a==null||a.addEventListener("mouseup",f.upHandler,w)),o.setColumnSizingInfo(R=>({...R,startOffset:u,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:n.id}))}}},createTable:e=>{e.setColumnSizing=o=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(o),e.setColumnSizingInfo=o=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(o),e.resetColumnSizing=o=>{var t;e.setColumnSizing(o?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=o=>{var t;e.setColumnSizingInfo(o?q():(t=e.initialState.columnSizingInfo)!=null?t:q())},e.getTotalSize=()=>{var o,t;return(o=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0},e.getLeftTotalSize=()=>{var o,t;return(o=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0},e.getCenterTotalSize=()=>{var o,t;return(o=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0},e.getRightTotalSize=()=>{var o,t;return(o=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0}}};let z=null;function Be(){if(typeof z=="boolean")return z;let e=!1;try{const o={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,o),window.removeEventListener("test",t)}catch{e=!1}return z=e,z}function k(e){return e.type==="touchstart"}const qe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:F("columnVisibility",e)}),createColumn:(e,o)=>{e.toggleVisibility=t=>{e.getCanHide()&&o.setColumnVisibility(n=>({...n,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,n;const r=e.columns;return(t=r.length?r.some(i=>i.getIsVisible()):(n=o.getState().columnVisibility)==null?void 0:n[e.id])!=null?t:!0},e.getCanHide=()=>{var t,n;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((n=o.options.enableHiding)!=null?n:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,o)=>{e._getAllVisibleCells=S(()=>[e.getAllCells(),o.getState().columnVisibility],t=>t.filter(n=>n.column.getIsVisible()),m(o.options,"debugRows")),e.getVisibleCells=S(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,n,r)=>[...t,...n,...r],m(o.options,"debugRows"))},createTable:e=>{const o=(t,n)=>S(()=>[n(),n().filter(r=>r.getIsVisible()).map(r=>r.id).join("_")],r=>r.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),m(e.options,"debugColumns"));e.getVisibleFlatColumns=o("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=o("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=o("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=o("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=o("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:(n=e.initialState.columnVisibility)!=null?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=(n=t)!=null?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((r,i)=>({...r,[i.id]:t||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible((n=t.target)==null?void 0:n.checked)}}};function H(e,o){return o?o==="center"?e.getCenterVisibleLeafColumns():o==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const ke={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},je={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:F("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:o=>{var t;const n=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[o.id])==null?void 0:t.getValue();return typeof n=="string"||typeof n=="number"}}),createColumn:(e,o)=>{e.getCanGlobalFilter=()=>{var t,n,r,i;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((n=o.options.enableGlobalFilter)!=null?n:!0)&&((r=o.options.enableFilters)!=null?r:!0)&&((i=o.options.getColumnCanGlobalFilter==null?void 0:o.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>x.includesString,e.getGlobalFilterFn=()=>{var o,t;const{globalFilterFn:n}=e.options;return L(n)?n:n==="auto"?e.getGlobalAutoFilterFn():(o=(t=e.options.filterFns)==null?void 0:t[n])!=null?o:x[n]},e.setGlobalFilter=o=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(o)},e.resetGlobalFilter=o=>{e.setGlobalFilter(o?void 0:e.initialState.globalFilter)}}},Ne={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:F("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let o=!1,t=!1;e._autoResetExpanded=()=>{var n,r;if(!o){e._queue(()=>{o=!0});return}if((n=(r=e.options.autoResetAll)!=null?r:e.options.autoResetExpanded)!=null?n:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=n=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(n),e.toggleAllRowsExpanded=n=>{n??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=n=>{var r,i;e.setExpanded(n?{}:(r=(i=e.initialState)==null?void 0:i.expanded)!=null?r:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(n=>n.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>n=>{n.persist==null||n.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const n=e.getState().expanded;return n===!0||Object.values(n).some(Boolean)},e.getIsAllRowsExpanded=()=>{const n=e.getState().expanded;return typeof n=="boolean"?n===!0:!(!Object.keys(n).length||e.getRowModel().flatRows.some(r=>!r.getIsExpanded()))},e.getExpandedDepth=()=>{let n=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const l=i.split(".");n=Math.max(n,l.length)}),n},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,o)=>{e.toggleExpanded=t=>{o.setExpanded(n=>{var r;const i=n===!0?!0:!!(n!=null&&n[e.id]);let l={};if(n===!0?Object.keys(o.getRowModel().rowsById).forEach(s=>{l[s]=!0}):l=n,t=(r=t)!=null?r:!i,!i&&t)return{...l,[e.id]:!0};if(i&&!t){const{[e.id]:s,...u}=l;return u}return n})},e.getIsExpanded=()=>{var t;const n=o.getState().expanded;return!!((t=o.options.getIsRowExpanded==null?void 0:o.options.getIsRowExpanded(e))!=null?t:n===!0||n!=null&&n[e.id])},e.getCanExpand=()=>{var t,n,r;return(t=o.options.getRowCanExpand==null?void 0:o.options.getRowCanExpand(e))!=null?t:((n=o.options.enableExpanding)!=null?n:!0)&&!!((r=e.subRows)!=null&&r.length)},e.getIsAllParentsExpanded=()=>{let t=!0,n=e;for(;t&&n.parentId;)n=o.getRow(n.parentId,!0),t=n.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},K=0,J=10,j=()=>({pageIndex:K,pageSize:J}),Ue={getInitialState:e=>({...e,pagination:{...j(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:F("pagination",e)}),createTable:e=>{let o=!1,t=!1;e._autoResetPageIndex=()=>{var n,r;if(!o){e._queue(()=>{o=!0});return}if((n=(r=e.options.autoResetAll)!=null?r:e.options.autoResetPageIndex)!=null?n:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=n=>{const r=i=>V(n,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(r)},e.resetPagination=n=>{var r;e.setPagination(n?j():(r=e.initialState.pagination)!=null?r:j())},e.setPageIndex=n=>{e.setPagination(r=>{let i=V(n,r.pageIndex);const l=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,l)),{...r,pageIndex:i}})},e.resetPageIndex=n=>{var r,i;e.setPageIndex(n?K:(r=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?r:K)},e.resetPageSize=n=>{var r,i;e.setPageSize(n?J:(r=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?r:J)},e.setPageSize=n=>{e.setPagination(r=>{const i=Math.max(1,V(n,r.pageSize)),l=r.pageSize*r.pageIndex,s=Math.floor(l/i);return{...r,pageIndex:s,pageSize:i}})},e.setPageCount=n=>e.setPagination(r=>{var i;let l=V(n,(i=e.options.pageCount)!=null?i:-1);return typeof l=="number"&&(l=Math.max(-1,l)),{...r,pageCount:l}}),e.getPageOptions=S(()=>[e.getPageCount()],n=>{let r=[];return n&&n>0&&(r=[...new Array(n)].fill(null).map((i,l)=>l)),r},m(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:n}=e.getState().pagination,r=e.getPageCount();return r===-1?!0:r===0?!1:n<r-1},e.previousPage=()=>e.setPageIndex(n=>n-1),e.nextPage=()=>e.setPageIndex(n=>n+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var n;return(n=e.options.pageCount)!=null?n:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var n;return(n=e.options.rowCount)!=null?n:e.getPrePaginationRowModel().rows.length}}},N=()=>({top:[],bottom:[]}),Xe={getInitialState:e=>({rowPinning:N(),...e}),getDefaultOptions:e=>({onRowPinningChange:F("rowPinning",e)}),createRow:(e,o)=>{e.pin=(t,n,r)=>{const i=n?e.getLeafRows().map(u=>{let{id:g}=u;return g}):[],l=r?e.getParentRows().map(u=>{let{id:g}=u;return g}):[],s=new Set([...l,e.id,...i]);o.setRowPinning(u=>{var g,c;if(t==="bottom"){var C,d;return{top:((C=u==null?void 0:u.top)!=null?C:[]).filter(p=>!(s!=null&&s.has(p))),bottom:[...((d=u==null?void 0:u.bottom)!=null?d:[]).filter(p=>!(s!=null&&s.has(p))),...Array.from(s)]}}if(t==="top"){var a,f;return{top:[...((a=u==null?void 0:u.top)!=null?a:[]).filter(p=>!(s!=null&&s.has(p))),...Array.from(s)],bottom:((f=u==null?void 0:u.bottom)!=null?f:[]).filter(p=>!(s!=null&&s.has(p)))}}return{top:((g=u==null?void 0:u.top)!=null?g:[]).filter(p=>!(s!=null&&s.has(p))),bottom:((c=u==null?void 0:u.bottom)!=null?c:[]).filter(p=>!(s!=null&&s.has(p)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:n,enablePinning:r}=o.options;return typeof n=="function"?n(e):(t=n??r)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:n,bottom:r}=o.getState().rowPinning,i=t.some(s=>n==null?void 0:n.includes(s)),l=t.some(s=>r==null?void 0:r.includes(s));return i?"top":l?"bottom":!1},e.getPinnedIndex=()=>{var t,n;const r=e.getIsPinned();if(!r)return-1;const i=(t=r==="top"?o.getTopRows():o.getBottomRows())==null?void 0:t.map(l=>{let{id:s}=l;return s});return(n=i==null?void 0:i.indexOf(e.id))!=null?n:-1}},createTable:e=>{e.setRowPinning=o=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(o),e.resetRowPinning=o=>{var t,n;return e.setRowPinning(o?N():(t=(n=e.initialState)==null?void 0:n.rowPinning)!=null?t:N())},e.getIsSomeRowsPinned=o=>{var t;const n=e.getState().rowPinning;if(!o){var r,i;return!!((r=n.top)!=null&&r.length||(i=n.bottom)!=null&&i.length)}return!!((t=n[o])!=null&&t.length)},e._getPinnedRows=(o,t,n)=>{var r;return((r=e.options.keepPinnedRows)==null||r?(t??[]).map(l=>{const s=e.getRow(l,!0);return s.getIsAllParentsExpanded()?s:null}):(t??[]).map(l=>o.find(s=>s.id===l))).filter(Boolean).map(l=>({...l,position:n}))},e.getTopRows=S(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(o,t)=>e._getPinnedRows(o,t,"top"),m(e.options,"debugRows")),e.getBottomRows=S(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(o,t)=>e._getPinnedRows(o,t,"bottom"),m(e.options,"debugRows")),e.getCenterRows=S(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(o,t,n)=>{const r=new Set([...t??[],...n??[]]);return o.filter(i=>!r.has(i.id))},m(e.options,"debugRows"))}},Ke={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:F("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=o=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(o),e.resetRowSelection=o=>{var t;return e.setRowSelection(o?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=o=>{e.setRowSelection(t=>{o=typeof o<"u"?o:!e.getIsAllRowsSelected();const n={...t},r=e.getPreGroupedRowModel().flatRows;return o?r.forEach(i=>{i.getCanSelect()&&(n[i.id]=!0)}):r.forEach(i=>{delete n[i.id]}),n})},e.toggleAllPageRowsSelected=o=>e.setRowSelection(t=>{const n=typeof o<"u"?o:!e.getIsAllPageRowsSelected(),r={...t};return e.getRowModel().rows.forEach(i=>{Q(r,i.id,n,!0,e)}),r}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=S(()=>[e.getState().rowSelection,e.getCoreRowModel()],(o,t)=>Object.keys(o).length?U(e,t):{rows:[],flatRows:[],rowsById:{}},m(e.options,"debugTable")),e.getFilteredSelectedRowModel=S(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(o,t)=>Object.keys(o).length?U(e,t):{rows:[],flatRows:[],rowsById:{}},m(e.options,"debugTable")),e.getGroupedSelectedRowModel=S(()=>[e.getState().rowSelection,e.getSortedRowModel()],(o,t)=>Object.keys(o).length?U(e,t):{rows:[],flatRows:[],rowsById:{}},m(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const o=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let n=!!(o.length&&Object.keys(t).length);return n&&o.some(r=>r.getCanSelect()&&!t[r.id])&&(n=!1),n},e.getIsAllPageRowsSelected=()=>{const o=e.getPaginationRowModel().flatRows.filter(r=>r.getCanSelect()),{rowSelection:t}=e.getState();let n=!!o.length;return n&&o.some(r=>!t[r.id])&&(n=!1),n},e.getIsSomeRowsSelected=()=>{var o;const t=Object.keys((o=e.getState().rowSelection)!=null?o:{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const o=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:o.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>o=>{e.toggleAllRowsSelected(o.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>o=>{e.toggleAllPageRowsSelected(o.target.checked)}},createRow:(e,o)=>{e.toggleSelected=(t,n)=>{const r=e.getIsSelected();o.setRowSelection(i=>{var l;if(t=typeof t<"u"?t:!r,e.getCanSelect()&&r===t)return i;const s={...i};return Q(s,e.id,t,(l=n==null?void 0:n.selectChildren)!=null?l:!0,o),s})},e.getIsSelected=()=>{const{rowSelection:t}=o.getState();return b(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=o.getState();return W(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=o.getState();return W(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof o.options.enableRowSelection=="function"?o.options.enableRowSelection(e):(t=o.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof o.options.enableSubRowSelection=="function"?o.options.enableSubRowSelection(e):(t=o.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof o.options.enableMultiRowSelection=="function"?o.options.enableMultiRowSelection(e):(t=o.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected((r=n.target)==null?void 0:r.checked)}}}},Q=(e,o,t,n,r)=>{var i;const l=r.getRow(o,!0);t?(l.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),l.getCanSelect()&&(e[o]=!0)):delete e[o],n&&(i=l.subRows)!=null&&i.length&&l.getCanSelectSubRows()&&l.subRows.forEach(s=>Q(e,s.id,t,n,r))};function U(e,o){const t=e.getState().rowSelection,n=[],r={},i=function(l,s){return l.map(u=>{var g;const c=b(u,t);if(c&&(n.push(u),r[u.id]=u),(g=u.subRows)!=null&&g.length&&(u={...u,subRows:i(u.subRows)}),c)return u}).filter(Boolean)};return{rows:i(o.rows),flatRows:n,rowsById:r}}function b(e,o){var t;return(t=o[e.id])!=null?t:!1}function W(e,o,t){var n;if(!((n=e.subRows)!=null&&n.length))return!1;let r=!0,i=!1;return e.subRows.forEach(l=>{if(!(i&&!r)&&(l.getCanSelect()&&(b(l,o)?i=!0:r=!1),l.subRows&&l.subRows.length)){const s=W(l,o);s==="all"?i=!0:(s==="some"&&(i=!0),r=!1)}}),r?"all":i?"some":!1}const Y=/([0-9]+)/gm,Je=(e,o,t)=>pe(P(e.getValue(t)).toLowerCase(),P(o.getValue(t)).toLowerCase()),Qe=(e,o,t)=>pe(P(e.getValue(t)),P(o.getValue(t))),We=(e,o,t)=>ee(P(e.getValue(t)).toLowerCase(),P(o.getValue(t)).toLowerCase()),Ye=(e,o,t)=>ee(P(e.getValue(t)),P(o.getValue(t))),Ze=(e,o,t)=>{const n=e.getValue(t),r=o.getValue(t);return n>r?1:n<r?-1:0},be=(e,o,t)=>ee(e.getValue(t),o.getValue(t));function ee(e,o){return e===o?0:e>o?1:-1}function P(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function pe(e,o){const t=e.split(Y).filter(Boolean),n=o.split(Y).filter(Boolean);for(;t.length&&n.length;){const r=t.shift(),i=n.shift(),l=parseInt(r,10),s=parseInt(i,10),u=[l,s].sort();if(isNaN(u[0])){if(r>i)return 1;if(i>r)return-1;continue}if(isNaN(u[1]))return isNaN(l)?-1:1;if(l>s)return 1;if(s>l)return-1}return t.length-n.length}const D={alphanumeric:Je,alphanumericCaseSensitive:Qe,text:We,textCaseSensitive:Ye,datetime:Ze,basic:be},et={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:F("sorting",e),isMultiSortEvent:o=>o.shiftKey}),createColumn:(e,o)=>{e.getAutoSortingFn=()=>{const t=o.getFilteredRowModel().flatRows.slice(10);let n=!1;for(const r of t){const i=r==null?void 0:r.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return D.datetime;if(typeof i=="string"&&(n=!0,i.split(Y).length>1))return D.alphanumeric}return n?D.text:D.basic},e.getAutoSortDir=()=>{const t=o.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,n;if(!e)throw new Error;return L(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(n=o.options.sortingFns)==null?void 0:n[e.columnDef.sortingFn])!=null?t:D[e.columnDef.sortingFn]},e.toggleSorting=(t,n)=>{const r=e.getNextSortingOrder(),i=typeof t<"u"&&t!==null;o.setSorting(l=>{const s=l==null?void 0:l.find(a=>a.id===e.id),u=l==null?void 0:l.findIndex(a=>a.id===e.id);let g=[],c,C=i?t:r==="desc";if(l!=null&&l.length&&e.getCanMultiSort()&&n?s?c="toggle":c="add":l!=null&&l.length&&u!==l.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(i||r||(c="remove")),c==="add"){var d;g=[...l,{id:e.id,desc:C}],g.splice(0,g.length-((d=o.options.maxMultiSortColCount)!=null?d:Number.MAX_SAFE_INTEGER))}else c==="toggle"?g=l.map(a=>a.id===e.id?{...a,desc:C}:a):c==="remove"?g=l.filter(a=>a.id!==e.id):g=[{id:e.id,desc:C}];return g})},e.getFirstSortDir=()=>{var t,n;return((t=(n=e.columnDef.sortDescFirst)!=null?n:o.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var n,r;const i=e.getFirstSortDir(),l=e.getIsSorted();return l?l!==i&&((n=o.options.enableSortingRemoval)==null||n)&&(!(t&&(r=o.options.enableMultiRemove)!=null)||r)?!1:l==="desc"?"asc":"desc":i},e.getCanSort=()=>{var t,n;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((n=o.options.enableSorting)!=null?n:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,n;return(t=(n=e.columnDef.enableMultiSort)!=null?n:o.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const n=(t=o.getState().sorting)==null?void 0:t.find(r=>r.id===e.id);return n?n.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,n;return(t=(n=o.getState().sorting)==null?void 0:n.findIndex(r=>r.id===e.id))!=null?t:-1},e.clearSorting=()=>{o.setSorting(t=>t!=null&&t.length?t.filter(n=>n.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return n=>{t&&(n.persist==null||n.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?o.options.isMultiSortEvent==null?void 0:o.options.isMultiSortEvent(n):!1))}}},createTable:e=>{e.setSorting=o=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(o),e.resetSorting=o=>{var t,n;e.setSorting(o?[]:(t=(n=e.initialState)==null?void 0:n.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},tt=[he,qe,ze,Le,Fe,$e,ke,je,et,Ge,Ne,Ue,Xe,Ke,Te];function nt(e){var o,t;const n=[...tt,...(o=e._features)!=null?o:[]];let r={_features:n};const i=r._features.reduce((d,a)=>Object.assign(d,a.getDefaultOptions==null?void 0:a.getDefaultOptions(r)),{}),l=d=>r.options.mergeOptions?r.options.mergeOptions(i,d):{...i,...d};let u={...{},...(t=e.initialState)!=null?t:{}};r._features.forEach(d=>{var a;u=(a=d.getInitialState==null?void 0:d.getInitialState(u))!=null?a:u});const g=[];let c=!1;const C={_features:n,options:{...i,...e},initialState:u,_queue:d=>{g.push(d),c||(c=!0,Promise.resolve().then(()=>{for(;g.length;)g.shift()();c=!1}).catch(a=>setTimeout(()=>{throw a})))},reset:()=>{r.setState(r.initialState)},setOptions:d=>{const a=V(d,r.options);r.options=l(a)},getState:()=>r.options.state,setState:d=>{r.options.onStateChange==null||r.options.onStateChange(d)},_getRowId:(d,a,f)=>{var p;return(p=r.options.getRowId==null?void 0:r.options.getRowId(d,a,f))!=null?p:`${f?[f.id,a].join("."):a}`},getCoreRowModel:()=>(r._getCoreRowModel||(r._getCoreRowModel=r.options.getCoreRowModel(r)),r._getCoreRowModel()),getRowModel:()=>r.getPaginationRowModel(),getRow:(d,a)=>{let f=(a?r.getPrePaginationRowModel():r.getRowModel()).rowsById[d];if(!f&&(f=r.getCoreRowModel().rowsById[d],!f))throw new Error;return f},_getDefaultColumnDef:S(()=>[r.options.defaultColumn],d=>{var a;return d=(a=d)!=null?a:{},{header:f=>{const p=f.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:f=>{var p,w;return(p=(w=f.renderValue())==null||w.toString==null?void 0:w.toString())!=null?p:null},...r._features.reduce((f,p)=>Object.assign(f,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...d}},m(e,"debugColumns")),_getColumnDefs:()=>r.options.columns,getAllColumns:S(()=>[r._getColumnDefs()],d=>{const a=function(f,p,w){return w===void 0&&(w=0),f.map(R=>{const _=ve(r,R,w,p),v=R;return _.columns=v.columns?a(v.columns,_,w+1):[],_})};return a(d)},m(e,"debugColumns")),getAllFlatColumns:S(()=>[r.getAllColumns()],d=>d.flatMap(a=>a.getFlatColumns()),m(e,"debugColumns")),_getAllFlatColumnsById:S(()=>[r.getAllFlatColumns()],d=>d.reduce((a,f)=>(a[f.id]=f,a),{}),m(e,"debugColumns")),getAllLeafColumns:S(()=>[r.getAllColumns(),r._getOrderColumnsFn()],(d,a)=>{let f=d.flatMap(p=>p.getLeafColumns());return a(f)},m(e,"debugColumns")),getColumn:d=>r._getAllFlatColumnsById()[d]};Object.assign(r,C);for(let d=0;d<r._features.length;d++){const a=r._features[d];a==null||a.createTable==null||a.createTable(r)}return r}function St(){return e=>S(()=>[e.options.data],o=>{const t={rows:[],flatRows:[],rowsById:{}},n=function(r,i,l){i===void 0&&(i=0);const s=[];for(let g=0;g<r.length;g++){const c=_e(e,e._getRowId(r[g],g,l),r[g],g,i,void 0,l==null?void 0:l.id);if(t.flatRows.push(c),t.rowsById[c.id]=c,s.push(c),e.options.getSubRows){var u;c.originalSubRows=e.options.getSubRows(r[g],g),(u=c.originalSubRows)!=null&&u.length&&(c.subRows=n(c.originalSubRows,i+1,c))}}return s};return t.rows=n(o),t},m(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}/**
14
- * react-table
15
- *
16
- * Copyright (c) TanStack
17
- *
18
- * This source code is licensed under the MIT license found in the
19
- * LICENSE.md file in the root directory of this source tree.
20
- *
21
- * @license MIT
22
- */function mt(e,o){return e?ot(e)?X.createElement(e,o):e:null}function ot(e){return rt(e)||typeof e=="function"||it(e)}function rt(e){return typeof e=="function"&&(()=>{const o=Object.getPrototypeOf(e);return o.prototype&&o.prototype.isReactComponent})()}function it(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Ct(e){const o={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=X.useState(()=>({current:nt(o)})),[n,r]=X.useState(()=>t.current.initialState);return t.current.setOptions(i=>({...i,...e,state:{...n,...e.state},onStateChange:l=>{r(l),e.onStateChange==null||e.onStateChange(l)}})),t.current}export{ut as T,at as a,dt as b,pt as c,ct as d,gt as e,mt as f,ft as g,St as h,Ct as u};
@@ -1,50 +0,0 @@
1
- import{c as wr}from"./createLucideIcon-BOhrmKcl.js";import{a as c,C as xr,p as C}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{d as Me,P as F,a as j,f as br,u as tn,c as ct,b as we,g as Er,e as Cr}from"./index-B0NebLYn.js";import{u as K,a as Rr,b as Ar}from"./button-DjJX-cbR.js";import{_ as ee,a as nn,b as Pr}from"./tslib.es6-De9GV7Vy.js";import{R as Sr,a as Tr}from"./index-BnyqKVWo.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 Or=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Bs=wr("external-link",Or);var Dr=xr[" useId ".trim().toString()]||(()=>{}),Lr=0;function Oe(e){const[t,n]=c.useState(Dr());return Me(()=>{n(r=>r??String(Lr++))},[e]),e||(t?`radix-${t}`:"")}function ue(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Nr(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 Mr="DismissableLayer",tt="dismissableLayer.update",_r="dismissableLayer.pointerDownOutside",kr="dismissableLayer.focusOutside",Nt,rn=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lt=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=c.useContext(rn),[f,p]=c.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=c.useState({}),g=K(t,R=>p(R)),d=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=d.indexOf(m),w=f?d.indexOf(f):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=w>=y,E=jr(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())},v),A=Wr(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())},v);return Nr(R=>{w===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},v),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Nt=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Mt(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Nt)}},[f,v,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Mt())},[f,u]),c.useEffect(()=>{const R=()=>h({});return document.addEventListener(tt,R),()=>document.removeEventListener(tt,R)},[]),C.jsx(F.div,{...l,ref:g,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:j(e.onFocusCapture,A.onFocusCapture),onBlurCapture:j(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:j(e.onPointerDownCapture,E.onPointerDownCapture)})});lt.displayName=Mr;var Ir="DismissableLayerBranch",Fr=c.forwardRef((e,t)=>{const n=c.useContext(rn),r=c.useRef(null),o=K(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),C.jsx(F.div,{...e,ref:o})});Fr.displayName=Ir;function jr(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(){on(_r,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 Wr(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&&on(kr,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(tt);document.dispatchEvent(e)}function on(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?br(o,i):o.dispatchEvent(i)}var ze="focusScope.autoFocusOnMount",Ge="focusScope.autoFocusOnUnmount",_t={bubbles:!1,cancelable:!0},Br="FocusScope",sn=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),v=K(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:J(p.current,{select:!0})},m=function(b){if(h.paused||!a)return;const x=b.relatedTarget;x!==null&&(a.contains(x)||J(p.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&J(a)};document.addEventListener("focusin",d),document.addEventListener("focusout",m);const w=new MutationObserver(y);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",m),w.disconnect()}}},[r,a,h.paused]),c.useEffect(()=>{if(a){It.add(h);const d=document.activeElement;if(!a.contains(d)){const y=new CustomEvent(ze,_t);a.addEventListener(ze,u),a.dispatchEvent(y),y.defaultPrevented||(Hr(zr(an(a)),{select:!0}),document.activeElement===d&&J(a))}return()=>{a.removeEventListener(ze,u),setTimeout(()=>{const y=new CustomEvent(Ge,_t);a.addEventListener(Ge,f),a.dispatchEvent(y),y.defaultPrevented||J(d??document.body,{select:!0}),a.removeEventListener(Ge,f),It.remove(h)},0)}}},[a,u,f,h]);const g=c.useCallback(d=>{if(!n&&!r||h.paused)return;const m=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,y=document.activeElement;if(m&&y){const w=d.currentTarget,[b,x]=$r(w);b&&x?!d.shiftKey&&y===x?(d.preventDefault(),n&&J(b,{select:!0})):d.shiftKey&&y===b&&(d.preventDefault(),n&&J(x,{select:!0})):y===w&&d.preventDefault()}},[n,r,h.paused]);return C.jsx(F.div,{tabIndex:-1,...s,ref:v,onKeyDown:g})});sn.displayName=Br;function Hr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(J(r,{select:t}),document.activeElement!==n)return}function $r(e){const t=an(e),n=kt(t,e),r=kt(t.reverse(),e);return[n,r]}function an(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 kt(e,t){for(const n of e)if(!Vr(n,{upTo:t}))return n}function Vr(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 Ur(e){return e instanceof HTMLInputElement&&"select"in e}function J(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ur(e)&&t&&e.select()}}var It=Yr();function Yr(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ft(e,t),e.unshift(t)},remove(t){var n;e=Ft(e,t),(n=e[0])==null||n.resume()}}}function Ft(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function zr(e){return e.filter(t=>t.tagName!=="A")}var Gr="Portal",ut=c.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=c.useState(!1);Me(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Sr.createPortal(C.jsx(F.div,{...r,ref:t}),s):null});ut.displayName=Gr;var Xe=0;function Xr(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??jt()),document.body.insertAdjacentElement("beforeend",e[1]??jt()),Xe++,()=>{Xe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xe--}},[])}function jt(){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 De="right-scroll-bar-position",Le="width-before-scroll-bar",Kr="with-scroll-bars-hidden",qr="--removed-body-scroll-bar-size";function Ke(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Zr(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 Qr=typeof window<"u"?c.useLayoutEffect:c.useEffect,Wt=new WeakMap;function Jr(e,t){var n=Zr(null,function(r){return e.forEach(function(o){return Ke(o,r)})});return Qr(function(){var r=Wt.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||Ke(a,null)}),i.forEach(function(a){o.has(a)||Ke(a,s)})}Wt.set(n,e)},[e]),n}function eo(e){return e}function to(e,t){t===void 0&&(t=eo);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 no(e){e===void 0&&(e={});var t=to(null);return t.options=ee({async:!0,ssr:!1},e),t}var cn=function(e){var t=e.sideCar,n=nn(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,ee({},n))};cn.isSideCarExport=!0;function ro(e,t){return e.useMedium(t),cn}var ln=no(),qe=function(){},We=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:qe,onWheelCapture:qe,onTouchMoveCapture:qe}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,v=e.sideCar,h=e.noRelative,g=e.noIsolation,d=e.inert,m=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,b=e.gapMode,x=nn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,A=Jr([n,t]),R=ee(ee({},x),o);return c.createElement(c.Fragment,null,f&&c.createElement(E,{sideCar:ln,removeScrollBar:u,shards:p,noRelative:h,noIsolation:g,inert:d,setCallbacks:i,allowPinchZoom:!!m,lockRef:n,gapMode:b}),s?c.cloneElement(c.Children.only(a),ee(ee({},R),{ref:A})):c.createElement(w,ee({},R,{className:l,ref:A}),a))});We.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};We.classNames={fullWidth:Le,zeroRight:De};var oo=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function io(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=oo();return t&&e.setAttribute("nonce",t),e}function so(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ao(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var co=function(){var e=0,t=null;return{add:function(n){e==0&&(t=io())&&(so(t,n),ao(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},lo=function(){var e=co();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},un=function(){var e=lo(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},uo={left:0,top:0,right:0,gap:0},Ze=function(e){return parseInt(e||"",10)||0},fo=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[Ze(n),Ze(r),Ze(o)]},po=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return uo;var t=fo(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])}},ho=un(),ce="data-scroll-locked",vo=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
7
- .`.concat(Kr,` {
8
- overflow: hidden `).concat(r,`;
9
- padding-right: `).concat(a,"px ").concat(r,`;
10
- }
11
- body[`).concat(ce,`] {
12
- overflow: hidden `).concat(r,`;
13
- overscroll-behavior: contain;
14
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
15
- padding-left: `.concat(o,`px;
16
- padding-top: `).concat(i,`px;
17
- padding-right: `).concat(s,`px;
18
- margin-left:0;
19
- margin-top:0;
20
- margin-right: `).concat(a,"px ").concat(r,`;
21
- `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
22
- }
23
-
24
- .`).concat(De,` {
25
- right: `).concat(a,"px ").concat(r,`;
26
- }
27
-
28
- .`).concat(Le,` {
29
- margin-right: `).concat(a,"px ").concat(r,`;
30
- }
31
-
32
- .`).concat(De," .").concat(De,` {
33
- right: 0 `).concat(r,`;
34
- }
35
-
36
- .`).concat(Le," .").concat(Le,` {
37
- margin-right: 0 `).concat(r,`;
38
- }
39
-
40
- body[`).concat(ce,`] {
41
- `).concat(qr,": ").concat(a,`px;
42
- }
43
- `)},Bt=function(){var e=parseInt(document.body.getAttribute(ce)||"0",10);return isFinite(e)?e:0},mo=function(){c.useEffect(function(){return document.body.setAttribute(ce,(Bt()+1).toString()),function(){var e=Bt()-1;e<=0?document.body.removeAttribute(ce):document.body.setAttribute(ce,e.toString())}},[])},go=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;mo();var i=c.useMemo(function(){return po(o)},[o]);return c.createElement(ho,{styles:vo(i,!t,o,n?"":"!important")})},nt=!1;if(typeof window<"u")try{var Re=Object.defineProperty({},"passive",{get:function(){return nt=!0,!0}});window.addEventListener("test",Re,Re),window.removeEventListener("test",Re,Re)}catch{nt=!1}var ie=nt?{passive:!1}:!1,yo=function(e){return e.tagName==="TEXTAREA"},fn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!yo(e)&&n[t]==="visible")},wo=function(e){return fn(e,"overflowY")},xo=function(e){return fn(e,"overflowX")},Ht=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=dn(e,r);if(o){var i=pn(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},bo=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Eo=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},dn=function(e,t){return e==="v"?wo(t):xo(t)},pn=function(e,t){return e==="v"?bo(t):Eo(t)},Co=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ro=function(e,t,n,r,o){var i=Co(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),u=!1,f=s>0,p=0,v=0;do{if(!a)break;var h=pn(e,a),g=h[0],d=h[1],m=h[2],y=d-m-i*g;(g||y)&&dn(e,a)&&(p+=y,v+=g);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&Math.abs(p)<1||!f&&Math.abs(v)<1)&&(u=!0),u},Ae=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$t=function(e){return[e.deltaX,e.deltaY]},Vt=function(e){return e&&"current"in e?e.current:e},Ao=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Po=function(e){return`
44
- .block-interactivity-`.concat(e,` {pointer-events: none;}
45
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
46
- `)},So=0,se=[];function To(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(So++)[0],i=c.useState(un)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var d=Pr([e.lockRef.current],(e.shards||[]).map(Vt),!0).filter(Boolean);return d.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),d.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(d,m){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!s.current.allowPinchZoom;var y=Ae(d),w=n.current,b="deltaX"in d?d.deltaX:w[0]-y[0],x="deltaY"in d?d.deltaY:w[1]-y[1],E,A=d.target,R=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in d&&R==="h"&&A.type==="range")return!1;var S=Ht(R,A);if(!S)return!0;if(S?E=R:(E=R==="v"?"h":"v",S=Ht(R,A)),!S)return!1;if(!r.current&&"changedTouches"in d&&(b||x)&&(r.current=E),!E)return!0;var D=r.current||E;return Ro(D,m,d,D==="h"?b:x)},[]),l=c.useCallback(function(d){var m=d;if(!(!se.length||se[se.length-1]!==i)){var y="deltaY"in m?$t(m):Ae(m),w=t.current.filter(function(E){return E.name===m.type&&(E.target===m.target||m.target===E.shadowParent)&&Ao(E.delta,y)})[0];if(w&&w.should){m.cancelable&&m.preventDefault();return}if(!w){var b=(s.current.shards||[]).map(Vt).filter(Boolean).filter(function(E){return E.contains(m.target)}),x=b.length>0?a(m,b[0]):!s.current.noIsolation;x&&m.cancelable&&m.preventDefault()}}},[]),u=c.useCallback(function(d,m,y,w){var b={name:d,delta:m,target:y,should:w,shadowParent:Oo(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),f=c.useCallback(function(d){n.current=Ae(d),r.current=void 0},[]),p=c.useCallback(function(d){u(d.type,$t(d),d.target,a(d,e.lockRef.current))},[]),v=c.useCallback(function(d){u(d.type,Ae(d),d.target,a(d,e.lockRef.current))},[]);c.useEffect(function(){return se.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",l,ie),document.addEventListener("touchmove",l,ie),document.addEventListener("touchstart",f,ie),function(){se=se.filter(function(d){return d!==i}),document.removeEventListener("wheel",l,ie),document.removeEventListener("touchmove",l,ie),document.removeEventListener("touchstart",f,ie)}},[]);var h=e.removeScrollBar,g=e.inert;return c.createElement(c.Fragment,null,g?c.createElement(i,{styles:Po(o)}):null,h?c.createElement(go,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Oo(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Do=ro(ln,To);var hn=c.forwardRef(function(e,t){return c.createElement(We,ee({},e,{ref:t,sideCar:Do}))});hn.classNames=We.classNames;var Lo=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ae=new WeakMap,Pe=new WeakMap,Se={},Qe=0,vn=function(e){return e&&(e.host||vn(e.parentNode))},No=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=vn(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Mo=function(e,t,n,r){var o=No(t,Array.isArray(e)?e:[e]);Se[n]||(Se[n]=new WeakMap);var i=Se[n],s=[],a=new Set,l=new Set(o),u=function(p){!p||a.has(p)||(a.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(v){if(a.has(v))f(v);else try{var h=v.getAttribute(r),g=h!==null&&h!=="false",d=(ae.get(v)||0)+1,m=(i.get(v)||0)+1;ae.set(v,d),i.set(v,m),s.push(v),d===1&&g&&Pe.set(v,!0),m===1&&v.setAttribute(n,"true"),g||v.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return f(t),a.clear(),Qe++,function(){s.forEach(function(p){var v=ae.get(p)-1,h=i.get(p)-1;ae.set(p,v),i.set(p,h),v||(Pe.has(p)||p.removeAttribute(r),Pe.delete(p)),h||p.removeAttribute(n)}),Qe--,Qe||(ae=new WeakMap,ae=new WeakMap,Pe=new WeakMap,Se={})}},_o=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Lo(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Mo(r,o,n,"aria-hidden")):function(){return null}},Be="Dialog",[mn,Hs]=ct(Be),[ko,U]=mn(Be),gn=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=c.useRef(null),l=c.useRef(null),[u,f]=tn({prop:r,defaultProp:o??!1,onChange:i,caller:Be});return C.jsx(ko,{scope:t,triggerRef:a,contentRef:l,contentId:Oe(),titleId:Oe(),descriptionId:Oe(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:s,children:n})};gn.displayName=Be;var yn="DialogTrigger",Io=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=U(yn,n),i=K(t,o.triggerRef);return C.jsx(F.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":pt(o.open),...r,ref:i,onClick:j(e.onClick,o.onOpenToggle)})});Io.displayName=yn;var ft="DialogPortal",[Fo,wn]=mn(ft,{forceMount:void 0}),xn=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=U(ft,t);return C.jsx(Fo,{scope:t,forceMount:n,children:c.Children.map(r,s=>C.jsx(we,{present:n||i.open,children:C.jsx(ut,{asChild:!0,container:o,children:s})}))})};xn.displayName=ft;var _e="DialogOverlay",bn=c.forwardRef((e,t)=>{const n=wn(_e,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=U(_e,e.__scopeDialog);return i.modal?C.jsx(we,{present:r||i.open,children:C.jsx(Wo,{...o,ref:t})}):null});bn.displayName=_e;var jo=Rr("DialogOverlay.RemoveScroll"),Wo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=U(_e,n);return C.jsx(hn,{as:jo,allowPinchZoom:!0,shards:[o.contentRef],children:C.jsx(F.div,{"data-state":pt(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),re="DialogContent",En=c.forwardRef((e,t)=>{const n=wn(re,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=U(re,e.__scopeDialog);return C.jsx(we,{present:r||i.open,children:i.modal?C.jsx(Bo,{...o,ref:t}):C.jsx(Ho,{...o,ref:t})})});En.displayName=re;var Bo=c.forwardRef((e,t)=>{const n=U(re,e.__scopeDialog),r=c.useRef(null),o=K(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return _o(i)},[]),C.jsx(Cn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:j(e.onFocusOutside,i=>i.preventDefault())})}),Ho=c.forwardRef((e,t)=>{const n=U(re,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return C.jsx(Cn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Cn=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=U(re,n),l=c.useRef(null),u=K(t,l);return Xr(),C.jsxs(C.Fragment,{children:[C.jsx(sn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:C.jsx(lt,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":pt(a.open),...s,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),C.jsxs(C.Fragment,{children:[C.jsx($o,{titleId:a.titleId}),C.jsx(Uo,{contentRef:l,descriptionId:a.descriptionId})]})]})}),dt="DialogTitle",Rn=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=U(dt,n);return C.jsx(F.h2,{id:o.titleId,...r,ref:t})});Rn.displayName=dt;var An="DialogDescription",Pn=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=U(An,n);return C.jsx(F.p,{id:o.descriptionId,...r,ref:t})});Pn.displayName=An;var Sn="DialogClose",Tn=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=U(Sn,n);return C.jsx(F.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});Tn.displayName=Sn;function pt(e){return e?"open":"closed"}var On="DialogTitleWarning",[$s,Dn]=Er(On,{contentName:re,titleName:dt,docsSlug:"dialog"}),$o=({titleId:e})=>{const t=Dn(On),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
47
-
48
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
49
-
50
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Vo="DialogDescriptionWarning",Uo=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Dn(Vo).contentName}}.`;return c.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Vs=gn,Us=xn,Ys=bn,zs=En,Gs=Rn,Xs=Pn,Ks=Tn,Yo="Separator",Ut="horizontal",zo=["horizontal","vertical"],Ln=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=Ut,...o}=e,i=Go(r)?r:Ut,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return C.jsx(F.div,{"data-orientation":i,...a,...o,ref:t})});Ln.displayName=Yo;function Go(e){return zo.includes(e)}var qs=Ln;const Xo=["top","right","bottom","left"],te=Math.min,B=Math.max,ke=Math.round,Te=Math.floor,G=e=>({x:e,y:e}),Ko={left:"right",right:"left",bottom:"top",top:"bottom"},qo={start:"end",end:"start"};function rt(e,t,n){return B(e,te(t,n))}function Z(e,t){return typeof e=="function"?e(t):e}function Q(e){return e.split("-")[0]}function pe(e){return e.split("-")[1]}function ht(e){return e==="x"?"y":"x"}function vt(e){return e==="y"?"height":"width"}const Zo=new Set(["top","bottom"]);function z(e){return Zo.has(Q(e))?"y":"x"}function mt(e){return ht(z(e))}function Qo(e,t,n){n===void 0&&(n=!1);const r=pe(e),o=mt(e),i=vt(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ie(s)),[s,Ie(s)]}function Jo(e){const t=Ie(e);return[ot(e),t,ot(t)]}function ot(e){return e.replace(/start|end/g,t=>qo[t])}const Yt=["left","right"],zt=["right","left"],ei=["top","bottom"],ti=["bottom","top"];function ni(e,t,n){switch(e){case"top":case"bottom":return n?t?zt:Yt:t?Yt:zt;case"left":case"right":return t?ei:ti;default:return[]}}function ri(e,t,n,r){const o=pe(e);let i=ni(Q(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ot)))),i}function Ie(e){return e.replace(/left|right|bottom|top/g,t=>Ko[t])}function oi(e){return{top:0,right:0,bottom:0,left:0,...e}}function Nn(e){return typeof e!="number"?oi(e):{top:e,right:e,bottom:e,left:e}}function Fe(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Gt(e,t,n){let{reference:r,floating:o}=e;const i=z(t),s=mt(t),a=vt(s),l=Q(t),u=i==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,v=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-o.width,y:p};break;default:h={x:r.x,y:r.y}}switch(pe(t)){case"start":h[s]-=v*(n&&u?-1:1);break;case"end":h[s]+=v*(n&&u?-1:1);break}return h}const ii=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Gt(u,r,l),v=r,h={},g=0;for(let d=0;d<a.length;d++){const{name:m,fn:y}=a[d],{x:w,y:b,data:x,reset:E}=await y({x:f,y:p,initialPlacement:r,placement:v,strategy:o,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});f=w??f,p=b??p,h={...h,[m]:{...h[m],...x}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(v=E.placement),E.rects&&(u=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:p}=Gt(u,v,l)),d=-1)}return{x:f,y:p,placement:v,strategy:o,middlewareData:h}};async function me(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:v=!1,padding:h=0}=Z(t,e),g=Nn(h),m=a[v?p==="floating"?"reference":"floating":p],y=Fe(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:l})),w=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},E=Fe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:l}):w);return{top:(y.top-E.top+g.top)/x.y,bottom:(E.bottom-y.bottom+g.bottom)/x.y,left:(y.left-E.left+g.left)/x.x,right:(E.right-y.right+g.right)/x.x}}const si=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=Z(e,t)||{};if(u==null)return{};const p=Nn(f),v={x:n,y:r},h=mt(o),g=vt(h),d=await s.getDimensions(u),m=h==="y",y=m?"top":"left",w=m?"bottom":"right",b=m?"clientHeight":"clientWidth",x=i.reference[g]+i.reference[h]-v[h]-i.floating[g],E=v[h]-i.reference[h],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let R=A?A[b]:0;(!R||!await(s.isElement==null?void 0:s.isElement(A)))&&(R=a.floating[b]||i.floating[g]);const S=x/2-E/2,D=R/2-d[g]/2-1,T=te(p[y],D),k=te(p[w],D),I=T,L=R-d[g]-k,O=R/2-d[g]/2+S,W=rt(I,O,L),N=!l.arrow&&pe(o)!=null&&O!==W&&i.reference[g]/2-(O<I?T:k)-d[g]/2<0,M=N?O<I?O-I:O-L:0;return{[h]:v[h]+M,data:{[h]:W,centerOffset:O-W-M,...N&&{alignmentOffset:M}},reset:N}}}),ai=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:d=!0,...m}=Z(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Q(o),w=z(a),b=Q(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=v||(b||!d?[Ie(a)]:Jo(a)),A=g!=="none";!v&&A&&E.push(...ri(a,d,g,x));const R=[a,...E],S=await me(t,m),D=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&D.push(S[y]),p){const O=Qo(o,s,x);D.push(S[O[0]],S[O[1]])}if(T=[...T,{placement:o,overflows:D}],!D.every(O=>O<=0)){var k,I;const O=(((k=i.flip)==null?void 0:k.index)||0)+1,W=R[O];if(W&&(!(p==="alignment"?w!==z(W):!1)||T.every(P=>P.overflows[0]>0&&z(P.placement)===w)))return{data:{index:O,overflows:T},reset:{placement:W}};let N=(I=T.filter(M=>M.overflows[0]<=0).sort((M,P)=>M.overflows[1]-P.overflows[1])[0])==null?void 0:I.placement;if(!N)switch(h){case"bestFit":{var L;const M=(L=T.filter(P=>{if(A){const _=z(P.placement);return _===w||_==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(_=>_>0).reduce((_,Y)=>_+Y,0)]).sort((P,_)=>P[1]-_[1])[0])==null?void 0:L[0];M&&(N=M);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function Xt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Kt(e){return Xo.some(t=>e[t]>=0)}const ci=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Z(e,t);switch(r){case"referenceHidden":{const i=await me(t,{...o,elementContext:"reference"}),s=Xt(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Kt(s)}}}case"escaped":{const i=await me(t,{...o,altBoundary:!0}),s=Xt(i,n.floating);return{data:{escapedOffsets:s,escaped:Kt(s)}}}default:return{}}}}},Mn=new Set(["left","top"]);async function li(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Q(n),a=pe(n),l=z(n)==="y",u=Mn.has(s)?-1:1,f=i&&l?-1:1,p=Z(t,e);let{mainAxis:v,crossAxis:h,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*f,y:v*u}:{x:v*u,y:h*f}}const ui=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await li(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},fi=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:m=>{let{x:y,y:w}=m;return{x:y,y:w}}},...l}=Z(e,t),u={x:n,y:r},f=await me(t,l),p=z(Q(o)),v=ht(p);let h=u[v],g=u[p];if(i){const m=v==="y"?"top":"left",y=v==="y"?"bottom":"right",w=h+f[m],b=h-f[y];h=rt(w,h,b)}if(s){const m=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=g+f[m],b=g-f[y];g=rt(w,g,b)}const d=a.fn({...t,[v]:h,[p]:g});return{...d,data:{x:d.x-n,y:d.y-r,enabled:{[v]:i,[p]:s}}}}}},di=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Z(e,t),f={x:n,y:r},p=z(o),v=ht(p);let h=f[v],g=f[p];const d=Z(a,t),m=typeof d=="number"?{mainAxis:d,crossAxis:0}:{mainAxis:0,crossAxis:0,...d};if(l){const b=v==="y"?"height":"width",x=i.reference[v]-i.floating[b]+m.mainAxis,E=i.reference[v]+i.reference[b]-m.mainAxis;h<x?h=x:h>E&&(h=E)}if(u){var y,w;const b=v==="y"?"width":"height",x=Mn.has(Q(o)),E=i.reference[p]-i.floating[b]+(x&&((y=s.offset)==null?void 0:y[p])||0)+(x?0:m.crossAxis),A=i.reference[p]+i.reference[b]+(x?0:((w=s.offset)==null?void 0:w[p])||0)-(x?m.crossAxis:0);g<E?g=E:g>A&&(g=A)}return{[v]:h,[p]:g}}}},pi=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Z(e,t),f=await me(t,u),p=Q(o),v=pe(o),h=z(o)==="y",{width:g,height:d}=i.floating;let m,y;p==="top"||p==="bottom"?(m=p,y=v===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=p,m=v==="end"?"top":"bottom");const w=d-f.top-f.bottom,b=g-f.left-f.right,x=te(d-f[m],w),E=te(g-f[y],b),A=!t.middlewareData.shift;let R=x,S=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=w),A&&!v){const T=B(f.left,0),k=B(f.right,0),I=B(f.top,0),L=B(f.bottom,0);h?S=g-2*(T!==0||k!==0?T+k:B(f.left,f.right)):R=d-2*(I!==0||L!==0?I+L:B(f.top,f.bottom))}await l({...t,availableWidth:S,availableHeight:R});const D=await s.getDimensions(a.floating);return g!==D.width||d!==D.height?{reset:{rects:!0}}:{}}}};function He(){return typeof window<"u"}function he(e){return _n(e)?(e.nodeName||"").toLowerCase():"#document"}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function q(e){var t;return(t=(_n(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _n(e){return He()?e instanceof Node||e instanceof H(e).Node:!1}function $(e){return He()?e instanceof Element||e instanceof H(e).Element:!1}function X(e){return He()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function qt(e){return!He()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}const hi=new Set(["inline","contents"]);function xe(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!hi.has(o)}const vi=new Set(["table","td","th"]);function mi(e){return vi.has(he(e))}const gi=[":popover-open",":modal"];function $e(e){return gi.some(t=>{try{return e.matches(t)}catch{return!1}})}const yi=["transform","translate","scale","rotate","perspective"],wi=["transform","translate","scale","rotate","perspective","filter"],xi=["paint","layout","strict","content"];function gt(e){const t=yt(),n=$(e)?V(e):e;return yi.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||wi.some(r=>(n.willChange||"").includes(r))||xi.some(r=>(n.contain||"").includes(r))}function bi(e){let t=ne(e);for(;X(t)&&!fe(t);){if(gt(t))return t;if($e(t))return null;t=ne(t)}return null}function yt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ei=new Set(["html","body","#document"]);function fe(e){return Ei.has(he(e))}function V(e){return H(e).getComputedStyle(e)}function Ve(e){return $(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ne(e){if(he(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qt(e)&&e.host||q(e);return qt(t)?t.host:t}function kn(e){const t=ne(e);return fe(t)?e.ownerDocument?e.ownerDocument.body:e.body:X(t)&&xe(t)?t:kn(t)}function ge(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=kn(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=H(o);if(i){const a=it(s);return t.concat(s,s.visualViewport||[],xe(o)?o:[],a&&n?ge(a):[])}return t.concat(o,ge(o,[],n))}function it(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function In(e){const t=V(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=X(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ke(n)!==i||ke(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function wt(e){return $(e)?e:e.contextElement}function le(e){const t=wt(e);if(!X(t))return G(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=In(t);let s=(i?ke(n.width):n.width)/r,a=(i?ke(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Ci=G(0);function Fn(e){const t=H(e);return!yt()||!t.visualViewport?Ci:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ri(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==H(e)?!1:t}function oe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=wt(e);let s=G(1);t&&(r?$(r)&&(s=le(r)):s=le(e));const a=Ri(i,n,r)?Fn(i):G(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(i){const v=H(i),h=r&&$(r)?H(r):r;let g=v,d=it(g);for(;d&&r&&h!==g;){const m=le(d),y=d.getBoundingClientRect(),w=V(d),b=y.left+(d.clientLeft+parseFloat(w.paddingLeft))*m.x,x=y.top+(d.clientTop+parseFloat(w.paddingTop))*m.y;l*=m.x,u*=m.y,f*=m.x,p*=m.y,l+=b,u+=x,g=H(d),d=it(g)}}return Fe({width:f,height:p,x:l,y:u})}function xt(e,t){const n=Ve(e).scrollLeft;return t?t.left+n:oe(q(e)).left+n}function jn(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:xt(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function Ai(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=q(r),a=t?$e(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=G(1);const f=G(0),p=X(r);if((p||!p&&!i)&&((he(r)!=="body"||xe(s))&&(l=Ve(r)),X(r))){const h=oe(r);u=le(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const v=s&&!p&&!i?jn(s,l,!0):G(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+v.x,y:n.y*u.y-l.scrollTop*u.y+f.y+v.y}}function Pi(e){return Array.from(e.getClientRects())}function Si(e){const t=q(e),n=Ve(e),r=e.ownerDocument.body,o=B(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=B(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+xt(e);const a=-n.scrollTop;return V(r).direction==="rtl"&&(s+=B(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Ti(e,t){const n=H(e),r=q(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=yt();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}const Oi=new Set(["absolute","fixed"]);function Di(e,t){const n=oe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=X(e)?le(e):G(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function Zt(e,t,n){let r;if(t==="viewport")r=Ti(e,n);else if(t==="document")r=Si(q(e));else if($(t))r=Di(t,n);else{const o=Fn(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Fe(r)}function Wn(e,t){const n=ne(e);return n===t||!$(n)||fe(n)?!1:V(n).position==="fixed"||Wn(n,t)}function Li(e,t){const n=t.get(e);if(n)return n;let r=ge(e,[],!1).filter(a=>$(a)&&he(a)!=="body"),o=null;const i=V(e).position==="fixed";let s=i?ne(e):e;for(;$(s)&&!fe(s);){const a=V(s),l=gt(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&Oi.has(o.position)||xe(s)&&!l&&Wn(e,s))?r=r.filter(f=>f!==s):o=a,s=ne(s)}return t.set(e,r),r}function Ni(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?$e(t)?[]:Li(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,f)=>{const p=Zt(t,f,o);return u.top=B(p.top,u.top),u.right=te(p.right,u.right),u.bottom=te(p.bottom,u.bottom),u.left=B(p.left,u.left),u},Zt(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Mi(e){const{width:t,height:n}=In(e);return{width:t,height:n}}function _i(e,t,n){const r=X(t),o=q(t),i=n==="fixed",s=oe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=G(0);function u(){l.x=xt(o)}if(r||!r&&!i)if((he(t)!=="body"||xe(o))&&(a=Ve(t)),r){const h=oe(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&u();i&&!r&&o&&u();const f=o&&!r&&!i?jn(o,a):G(0),p=s.left+a.scrollLeft-l.x-f.x,v=s.top+a.scrollTop-l.y-f.y;return{x:p,y:v,width:s.width,height:s.height}}function Je(e){return V(e).position==="static"}function Qt(e,t){if(!X(e)||V(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return q(e)===n&&(n=n.ownerDocument.body),n}function Bn(e,t){const n=H(e);if($e(e))return n;if(!X(e)){let o=ne(e);for(;o&&!fe(o);){if($(o)&&!Je(o))return o;o=ne(o)}return n}let r=Qt(e,t);for(;r&&mi(r)&&Je(r);)r=Qt(r,t);return r&&fe(r)&&Je(r)&&!gt(r)?n:r||bi(e)||n}const ki=async function(e){const t=this.getOffsetParent||Bn,n=this.getDimensions,r=await n(e.floating);return{reference:_i(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ii(e){return V(e).direction==="rtl"}const Fi={convertOffsetParentRelativeRectToViewportRelativeRect:Ai,getDocumentElement:q,getClippingRect:Ni,getOffsetParent:Bn,getElementRects:ki,getClientRects:Pi,getDimensions:Mi,getScale:le,isElement:$,isRTL:Ii};function Hn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ji(e,t){let n=null,r;const o=q(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:f,top:p,width:v,height:h}=u;if(a||t(),!v||!h)return;const g=Te(p),d=Te(o.clientWidth-(f+v)),m=Te(o.clientHeight-(p+h)),y=Te(f),b={rootMargin:-g+"px "+-d+"px "+-m+"px "+-y+"px",threshold:B(0,te(1,l))||1};let x=!0;function E(A){const R=A[0].intersectionRatio;if(R!==l){if(!x)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!Hn(u,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return s(!0),i}function Wi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=wt(e),f=o||i?[...u?ge(u):[],...ge(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const p=u&&a?ji(u,n):null;let v=-1,h=null;s&&(h=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let g,d=l?oe(e):null;l&&m();function m(){const y=oe(e);d&&!Hn(d,y)&&n(),d=y,g=requestAnimationFrame(m)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),p==null||p(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const Bi=ui,Hi=fi,$i=ai,Vi=pi,Ui=ci,Jt=si,Yi=di,zi=(e,t,n)=>{const r=new Map,o={platform:Fi,...n},i={...o.platform,_c:r};return ii(e,t,{...o,platform:i})};var Gi=typeof document<"u",Xi=function(){},Ne=Gi?c.useLayoutEffect:Xi;function je(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!je(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!je(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function $n(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function en(e,t){const n=$n(e);return Math.round(t*n)/n}function et(e){const t=c.useRef(e);return Ne(()=>{t.current=e}),t}function Ki(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,h]=c.useState(r);je(v,r)||h(r);const[g,d]=c.useState(null),[m,y]=c.useState(null),w=c.useCallback(P=>{P!==A.current&&(A.current=P,d(P))},[]),b=c.useCallback(P=>{P!==R.current&&(R.current=P,y(P))},[]),x=i||g,E=s||m,A=c.useRef(null),R=c.useRef(null),S=c.useRef(f),D=l!=null,T=et(l),k=et(o),I=et(u),L=c.useCallback(()=>{if(!A.current||!R.current)return;const P={placement:t,strategy:n,middleware:v};k.current&&(P.platform=k.current),zi(A.current,R.current,P).then(_=>{const Y={..._,isPositioned:I.current!==!1};O.current&&!je(S.current,Y)&&(S.current=Y,Tr.flushSync(()=>{p(Y)}))})},[v,t,n,k,I]);Ne(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,p(P=>({...P,isPositioned:!1})))},[u]);const O=c.useRef(!1);Ne(()=>(O.current=!0,()=>{O.current=!1}),[]),Ne(()=>{if(x&&(A.current=x),E&&(R.current=E),x&&E){if(T.current)return T.current(x,E,L);L()}},[x,E,L,T,D]);const W=c.useMemo(()=>({reference:A,floating:R,setReference:w,setFloating:b}),[w,b]),N=c.useMemo(()=>({reference:x,floating:E}),[x,E]),M=c.useMemo(()=>{const P={position:n,left:0,top:0};if(!N.floating)return P;const _=en(N.floating,f.x),Y=en(N.floating,f.y);return a?{...P,transform:"translate("+_+"px, "+Y+"px)",...$n(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:Y}},[n,a,N.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:L,refs:W,elements:N,floatingStyles:M}),[f,L,W,N,M])}const qi=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Jt({element:r.current,padding:o}).fn(n):{}:r?Jt({element:r,padding:o}).fn(n):{}}}},Zi=(e,t)=>({...Bi(e),options:[e,t]}),Qi=(e,t)=>({...Hi(e),options:[e,t]}),Ji=(e,t)=>({...Yi(e),options:[e,t]}),es=(e,t)=>({...$i(e),options:[e,t]}),ts=(e,t)=>({...Vi(e),options:[e,t]}),ns=(e,t)=>({...Ui(e),options:[e,t]}),rs=(e,t)=>({...qi(e),options:[e,t]});var os="Arrow",Vn=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return C.jsx(F.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});Vn.displayName=os;var is=Vn,bt="Popper",[Un,Yn]=ct(bt),[ss,zn]=Un(bt),Gn=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return C.jsx(ss,{scope:t,anchor:r,onAnchorChange:o,children:n})};Gn.displayName=bt;var Xn="PopperAnchor",Kn=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=zn(Xn,n),s=c.useRef(null),a=K(t,s);return c.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:C.jsx(F.div,{...o,ref:a})});Kn.displayName=Xn;var Et="PopperContent",[as,cs]=Un(Et),qn=c.forwardRef((e,t)=>{var At,Pt,St,Tt,Ot,Dt;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:h="optimized",onPlaced:g,...d}=e,m=zn(Et,n),[y,w]=c.useState(null),b=K(t,ve=>w(ve)),[x,E]=c.useState(null),A=Cr(x),R=(A==null?void 0:A.width)??0,S=(A==null?void 0:A.height)??0,D=r+(i!=="center"?"-"+i:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},k=Array.isArray(u)?u:[u],I=k.length>0,L={padding:T,boundary:k.filter(us),altBoundary:I},{refs:O,floatingStyles:W,placement:N,isPositioned:M,middlewareData:P}=Ki({strategy:"fixed",placement:D,whileElementsMounted:(...ve)=>Wi(...ve,{animationFrame:h==="always"}),elements:{reference:m.anchor},middleware:[Zi({mainAxis:o+S,alignmentAxis:s}),l&&Qi({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Ji():void 0,...L}),l&&es({...L}),ts({...L,apply:({elements:ve,rects:Lt,availableWidth:vr,availableHeight:mr})=>{const{width:gr,height:yr}=Lt.reference,Ce=ve.floating.style;Ce.setProperty("--radix-popper-available-width",`${vr}px`),Ce.setProperty("--radix-popper-available-height",`${mr}px`),Ce.setProperty("--radix-popper-anchor-width",`${gr}px`),Ce.setProperty("--radix-popper-anchor-height",`${yr}px`)}}),x&&rs({element:x,padding:a}),fs({arrowWidth:R,arrowHeight:S}),v&&ns({strategy:"referenceHidden",...L})]}),[_,Y]=Jn(N),Ee=ue(g);Me(()=>{M&&(Ee==null||Ee())},[M,Ee]);const ur=(At=P.arrow)==null?void 0:At.x,fr=(Pt=P.arrow)==null?void 0:Pt.y,dr=((St=P.arrow)==null?void 0:St.centerOffset)!==0,[pr,hr]=c.useState();return Me(()=>{y&&hr(window.getComputedStyle(y).zIndex)},[y]),C.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:M?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pr,"--radix-popper-transform-origin":[(Tt=P.transformOrigin)==null?void 0:Tt.x,(Ot=P.transformOrigin)==null?void 0:Ot.y].join(" "),...((Dt=P.hide)==null?void 0:Dt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(as,{scope:n,placedSide:_,onArrowChange:E,arrowX:ur,arrowY:fr,shouldHideArrow:dr,children:C.jsx(F.div,{"data-side":_,"data-align":Y,...d,ref:b,style:{...d.style,animation:M?void 0:"none"}})})})});qn.displayName=Et;var Zn="PopperArrow",ls={top:"bottom",right:"left",bottom:"top",left:"right"},Qn=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=cs(Zn,r),s=ls[i.placedSide];return C.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:C.jsx(is,{...o,ref:n,style:{...o.style,display:"block"}})})});Qn.displayName=Zn;function us(e){return e!==null}var fs=e=>({name:"transformOrigin",options:e,fn(t){var m,y,w;const{placement:n,rects:r,middlewareData:o}=t,s=((m=o.arrow)==null?void 0:m.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,f]=Jn(n),p={start:"0%",center:"50%",end:"100%"}[f],v=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,h=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let g="",d="";return u==="bottom"?(g=s?p:`${v}px`,d=`${-l}px`):u==="top"?(g=s?p:`${v}px`,d=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,d=s?p:`${h}px`):u==="left"&&(g=`${r.floating.width+l}px`,d=s?p:`${h}px`),{data:{x:g,y:d}}}});function Jn(e){const[t,n="center"]=e.split("-");return[t,n]}var ds=Gn,ps=Kn,hs=qn,vs=Qn,ms=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),gs="VisuallyHidden",er=c.forwardRef((e,t)=>C.jsx(F.span,{...e,ref:t,style:{...ms,...e.style}}));er.displayName=gs;var ys=er,[Ue,Zs]=ct("Tooltip",[Yn]),Ye=Yn(),tr="TooltipProvider",ws=700,st="tooltip.open",[xs,Ct]=Ue(tr),nr=e=>{const{__scopeTooltip:t,delayDuration:n=ws,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=c.useRef(!0),a=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),C.jsx(xs,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:i})};nr.displayName=tr;var ye="Tooltip",[bs,be]=Ue(ye),rr=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=Ct(ye,e.__scopeTooltip),u=Ye(t),[f,p]=c.useState(null),v=Oe(),h=c.useRef(0),g=s??l.disableHoverableContent,d=a??l.delayDuration,m=c.useRef(!1),[y,w]=tn({prop:r,defaultProp:o??!1,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(st))):l.onClose(),i==null||i(R)},caller:ye}),b=c.useMemo(()=>y?m.current?"delayed-open":"instant-open":"closed",[y]),x=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,m.current=!1,w(!0)},[w]),E=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),A=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{m.current=!0,w(!0),h.current=0},d)},[d,w]);return c.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),C.jsx(ds,{...u,children:C.jsx(bs,{scope:t,contentId:v,open:y,stateAttribute:b,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?A():x()},[l.isOpenDelayedRef,A,x]),onTriggerLeave:c.useCallback(()=>{g?E():(window.clearTimeout(h.current),h.current=0)},[E,g]),onOpen:x,onClose:E,disableHoverableContent:g,children:n})})};rr.displayName=ye;var at="TooltipTrigger",or=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=be(at,n),i=Ct(at,n),s=Ye(n),a=c.useRef(null),l=K(t,a,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),C.jsx(ps,{asChild:!0,...s,children:C.jsx(F.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:j(e.onPointerMove,v=>{v.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:j(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:j(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:j(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:j(e.onBlur,o.onClose),onClick:j(e.onClick,o.onClose)})})});or.displayName=at;var Rt="TooltipPortal",[Es,Cs]=Ue(Rt,{forceMount:void 0}),ir=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=be(Rt,t);return C.jsx(Es,{scope:t,forceMount:n,children:C.jsx(we,{present:n||i.open,children:C.jsx(ut,{asChild:!0,container:o,children:r})})})};ir.displayName=Rt;var de="TooltipContent",sr=c.forwardRef((e,t)=>{const n=Cs(de,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=be(de,e.__scopeTooltip);return C.jsx(we,{present:r||s.open,children:s.disableHoverableContent?C.jsx(ar,{side:o,...i,ref:t}):C.jsx(Rs,{side:o,...i,ref:t})})}),Rs=c.forwardRef((e,t)=>{const n=be(de,e.__scopeTooltip),r=Ct(de,e.__scopeTooltip),o=c.useRef(null),i=K(t,o),[s,a]=c.useState(null),{trigger:l,onClose:u}=n,f=o.current,{onPointerInTransitChange:p}=r,v=c.useCallback(()=>{a(null),p(!1)},[p]),h=c.useCallback((g,d)=>{const m=g.currentTarget,y={x:g.clientX,y:g.clientY},w=Ts(y,m.getBoundingClientRect()),b=Os(y,w),x=Ds(d.getBoundingClientRect()),E=Ns([...b,...x]);a(E),p(!0)},[p]);return c.useEffect(()=>()=>v(),[v]),c.useEffect(()=>{if(l&&f){const g=m=>h(m,f),d=m=>h(m,l);return l.addEventListener("pointerleave",g),f.addEventListener("pointerleave",d),()=>{l.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",d)}}},[l,f,h,v]),c.useEffect(()=>{if(s){const g=d=>{const m=d.target,y={x:d.clientX,y:d.clientY},w=(l==null?void 0:l.contains(m))||(f==null?void 0:f.contains(m)),b=!Ls(y,s);w?v():b&&(v(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,f,s,u,v]),C.jsx(ar,{...e,ref:i})}),[As,Ps]=Ue(ye,{isInside:!1}),Ss=Ar("TooltipContent"),ar=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=be(de,n),u=Ye(n),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(st,f),()=>document.removeEventListener(st,f)),[f]),c.useEffect(()=>{if(l.trigger){const p=v=>{const h=v.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,f]),C.jsx(lt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:C.jsxs(hs,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[C.jsx(Ss,{children:r}),C.jsx(As,{scope:n,isInside:!0,children:C.jsx(ys,{id:l.contentId,role:"tooltip",children:o||r})})]})})});sr.displayName=de;var cr="TooltipArrow",lr=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ye(n);return Ps(cr,n).isInside?null:C.jsx(vs,{...o,...r,ref:t})});lr.displayName=cr;function Ts(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Os(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Ds(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Ls(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],u=a.x,f=a.y,p=l.x,v=l.y;f>r!=v>r&&n<(p-u)*(r-f)/(v-f)+u&&(o=!o)}return o}function Ns(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Ms(t)}function Ms(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Qs=nr,Js=rr,ea=or,ta=ir,na=sr,ra=lr;export{ra as A,zs as C,Xs as D,Bs as E,sn as F,Ys as O,Us as P,Vs as R,Gs as T,ms as V,Ks as a,qs as b,Qs as c,Js as d,ea as e,ta as f,na as g,Yn as h,ds as i,ps as j,ut as k,vs as l,_o as m,hn as n,Xr as o,lt as p,hs as q,ue as r,Oe as u};