-
Notifications
You must be signed in to change notification settings - Fork 0
/
servicestack-vue.min.mjs
2 lines (2 loc) · 174 KB
/
servicestack-vue.min.mjs
1
2
var js=Object.defineProperty,Bs=(e,t,l)=>t in e?js(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,ye=(e,t,l)=>(Bs(e,"symbol"!=typeof t?t+"":t,l),l);import{defineComponent as Y,computed as c,openBlock as o,createElementBlock as u,normalizeClass as w,unref as s,createElementVNode as n,createCommentVNode as C,renderSlot as Z,ref as I,toDisplayString as V,inject as Oe,nextTick as ul,isRef as Tn,h as ft,resolveComponent as U,createBlock as X,withCtx as ve,mergeProps as Ce,useAttrs as Rs,createVNode as fe,createTextVNode as he,watchEffect as Sl,normalizeStyle as El,withModifiers as je,Fragment as be,renderList as $e,withDirectives as gt,vModelCheckbox as Hl,withKeys as Es,createStaticVNode as dl,vModelSelect as Hs,useSlots as Nl,onMounted as lt,createSlots as zl,normalizeProps as _t,guardReactiveProps as al,vModelDynamic as Ns,onUnmounted as Ut,watch as At,vModelText as zs,provide as qt,resolveDynamicComponent as Us,resolveDirective as qs}from"vue";import{errorResponseExcept as Qs,dateFmt as In,toTime as Ks,omit as nt,enc as Al,setQueryString as Gs,appendQueryString as Rt,nameOf as Ws,ApiResult as Ze,lastRightPart as pt,leftPart as cl,map as De,toDate as bt,toDateTime as Zs,toCamelCase as Js,mapGet as ce,chop as Xs,humanize as Ie,delaySet as Fn,queryString as Tl,combinePaths as Ys,rightPart as ea,toPascalCase as Ye,errorResponse as dt,trimEnd as ta,$1 as ol,lastLeftPart as la,ResponseStatus as Ll,ResponseError as Ln,HttpMethods as Ul,uniqueKeys as Il,humanify as Pn,fromXsdDuration as Dn,isDate as fl,timeFmt12 as na,apiValue as sa,indexOfAny as aa,each as oa}from"@servicestack/client";const ia={class:"flex items-center"},ra={key:0,class:"flex-shrink-0 mr-3"},ua={key:0,class:"h-5 w-5 text-yellow-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},da=n("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"},null,-1),ca=[da],fa={key:1,class:"h-5 w-5 text-red-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},ma=n("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z","clip-rule":"evenodd"},null,-1),va=[ma],ha={key:2,class:"h-5 w-5 text-blue-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},ga=n("path",{"fill-rule":"evenodd",d:"M19 10.5a8.5 8.5 0 11-17 0 8.5 8.5 0 0117 0zM8.25 9.75A.75.75 0 019 9h.253a1.75 1.75 0 011.709 2.13l-.46 2.066a.25.25 0 00.245.304H11a.75.75 0 010 1.5h-.253a1.75 1.75 0 01-1.709-2.13l.46-2.066a.25.25 0 00-.245-.304H9a.75.75 0 01-.75-.75zM10 7a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1),pa=[ga],ya={key:3,class:"h-5 w-5 text-green-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},ba=n("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1),wa=[ba],xa=Y({__name:"Alert",props:{type:{default:"warn"},hideIcon:{type:Boolean}},setup(l){const e=l,a=c(()=>"info"==e.type?"bg-blue-50 dark:bg-blue-200":"error"==e.type?"bg-red-50 dark:bg-red-200":"success"==e.type?"bg-green-50 dark:bg-green-200":"bg-yellow-50 dark:bg-yellow-200"),r=c(()=>"info"==e.type?"border-blue-400":"error"==e.type?"border-red-400":"success"==e.type?"border-green-400":"border-yellow-400"),i=c(()=>"info"==e.type?"text-blue-700":"error"==e.type?"text-red-700":"success"==e.type?"text-green-700":"text-yellow-700");return(e,t)=>(o(),u("div",{class:w([s(a),s(r),"border-l-4 p-4"])},[n("div",ia,[l.hideIcon?C("",!0):(o(),u("div",ra,["warn"==l.type?(o(),u("svg",ua,ca)):"error"==l.type?(o(),u("svg",fa,va)):"info"==l.type?(o(),u("svg",ha,pa)):"success"==l.type?(o(),u("svg",ya,wa)):C("",!0)])),n("div",null,[n("p",{class:w([s(i),"text-sm"])},[Z(e.$slots,"default")],2)])])],2))}}),ka={key:0,class:"rounded-md bg-green-50 dark:bg-green-200 p-4",role:"alert"},$a={class:"flex"},Ca=n("div",{class:"flex-shrink-0"},[n("svg",{class:"h-5 w-5 text-green-400 dark:text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})])],-1),_a={class:"ml-3"},La={class:"text-sm font-medium text-green-800"},Va={key:0},Ma={class:"ml-auto pl-3"},Sa={class:"-mx-1.5 -my-1.5"},Aa=n("span",{class:"sr-only"},"Dismiss",-1),Ta=n("svg",{class:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[n("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})],-1),Ia=[Aa,Ta],Fa=Y({__name:"AlertSuccess",props:{message:null},setup(l){const a=I(!1);return(e,t)=>a.value?C("",!0):(o(),u("div",ka,[n("div",$a,[Ca,n("div",_a,[n("h3",La,[l.message?(o(),u("span",Va,V(l.message),1)):Z(e.$slots,"default",{key:1})])]),n("div",Ma,[n("div",Sa,[n("button",{type:"button",class:"inline-flex rounded-md bg-green-50 dark:bg-green-200 p-1.5 text-green-500 dark:text-green-600 hover:bg-green-100 dark:hover:bg-green-700 dark:hover:text-white focus:outline-none focus:ring-2 focus:ring-green-600 focus:ring-offset-2 focus:ring-offset-green-50 dark:ring-offset-green-200",onClick:t[0]||(t[0]=e=>a.value=!0)},Ia)])])])]))}}),Pa={class:"flex"},Da=n("div",{class:"flex-shrink-0"},[n("svg",{class:"h-5 w-5 text-red-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[n("path",{fill:"currentColor",d:"M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12S6.47 2 12 2m3.59 5L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41L15.59 7Z"})])],-1),Oa={class:"ml-3"},ja={class:"text-sm text-red-700 dark:text-red-200"},Ba=Y({__name:"ErrorSummary",props:{status:null,except:null,class:null},setup(e){const t=e;let l=Oe("ApiState",void 0);const a=c(()=>t.status||null!=l&&l.error.value?Qs.call({responseStatus:t.status??(null==l?void 0:l.error.value)},t.except??[]):null);return(e,t)=>s(a)?(o(),u("div",{key:0,class:w("bg-red-50 dark:bg-red-900 border-l-4 border-red-400 p-4 "+e.$props.class)},[n("div",Pa,[Da,n("div",Oa,[n("p",ja,V(s(a)),1)])])],2)):C("",!0)}}),Ra=["id","aria-describedby"],Ea=Y({__name:"InputDescription",props:{id:null,description:null},setup(l){return(e,t)=>l.description?(o(),u("div",{key:"description",class:"mt-2 text-sm text-gray-500",id:l.id+"-description","aria-describedby":l.id+"-description"},[n("div",null,V(l.description),1)],8,Ra)):C("",!0)}});function ml(e){return In(e).replace(/\//g,"-")}function On(e){return null==e?"":Ks(e)}function jn(e,t){e.value=null,ul(()=>e.value=t)}function kt(l){return Object.keys(l).forEach(e=>{var t=l[e];l[e]=Tn(t)?s(t):t}),l}function Lt(e,t,l){l?(t.value=e.entering.cls+" "+e.entering.from,setTimeout(()=>t.value=e.entering.cls+" "+e.entering.to,0)):(t.value=e.leaving.cls+" "+e.leaving.from,setTimeout(()=>t.value=e.leaving.cls+" "+e.leaving.to,0))}function tl(){if(!("u"<typeof document)){let t=document.activeElement,e=t&&t.form;var l,a;e&&(l=':not([disabled]):not([tabindex="-1"])',l=e.querySelectorAll(`a:not([disabled]), button${l}, input[type=text]${l}, [tabindex]`+l),-1<(a=(l=Array.prototype.filter.call(l,e=>0<e.offsetWidth||0<e.offsetHeight||e===t)).indexOf(t)))&&(l[a+1]||l[0]).focus()}}function Tt(e){if(!e)return null;if("string"==typeof e)return e;var t="function"==typeof e?new e:"object"==typeof e?e:null;if(!t)throw new Error(`Invalid DTO Type '${typeof e}'`);if("function"!=typeof t.getTypeName)throw new Error(JSON.stringify(t)+" is not a Request DTO");e=t.getTypeName();if(e)return e;throw new Error("DTO Required")}function et(e,t,l){var a=(l=l||{}).cls||l.className||l.class;return a&&((l=nt(l,["cls","class","className"])).class=a),null==t?"<"+e+Fl(l)+"/>":"<"+e+Fl(l)+`>${t||""}</${e}>`}function Fl(l){return Object.keys(l).reduce((e,t)=>`${e} ${t}="${Al(l[t])}"`,"")}function vl(e){return Object.assign({target:"_blank",rel:"noopener",class:"text-blue-600"},e)}function Ct(e){return Gl(e)}let Ha=["string","number","boolean","null","undefined"];function yt(e){return 0<=Ha.indexOf(typeof e)||e instanceof Date}function Et(e){return!yt(e)}class Bn{get length(){return"u"<typeof localStorage?0:localStorage.length}getItem(e){return"u"<typeof localStorage?null:localStorage.getItem(e)}setItem(e,t){"u"<typeof localStorage||localStorage.setItem(e,t)}removeItem(e){"u"<typeof localStorage||localStorage.removeItem(e)}clear(){"u"<typeof localStorage||localStorage.clear()}key(e){return"u"<typeof localStorage?null:localStorage.key(e)}}function il(e){return"string"==typeof e?JSON.parse(e):null}function ql(e){typeof history<"u"&&(e=Gs(location.href,e),history.pushState({},"",e))}function Ql(t,e){if(["function","Function","eval","=>",";"].some(e=>t.includes(e)))throw new Error(`Unsafe script: '${t}'`);e=Object.assign(Object.keys(globalThis).reduce((e,t)=>(e[t]=void 0,e),{}),e);return new Function("with(this) { return ("+t+") }").call(e)}function Pl(e){typeof navigator<"u"&&navigator.clipboard.writeText(e)}function Rn(e){e=ne.config.storage.getItem(e);return e?JSON.parse(e):null}function Kl(e,t){return Rt("swr."+Ws(e),t?Object.assign({},e,t):e)}function Na(e){e.request&&(e=Kl(e.request,e.args),ne.config.storage.removeItem(e))}async function En(e,t,l,a,n){var s=Kl(t,a),e=(l(new Ze({response:Rn(s)})),await e.api(t,a,n));return e.succeeded&&e.response&&(e.response._date=(new Date).valueOf(),t=JSON.stringify(e.response),ne.config.storage.setItem(s,t),l(e)),e}function za(){return{LocalStore:Bn,dateInputFormat:ml,timeInputFormat:On,setRef:jn,unRefs:kt,transition:Lt,focusNextElement:tl,getTypeName:Tt,htmlTag:et,htmlAttrs:Fl,linkAttrs:vl,toAppUrl:Ct,isPrimitive:yt,isComplexType:Et,pushState:ql,scopedExpr:Ql,copyText:Pl,fromCache:Rn,swrCacheKey:Kl,swrClear:Na,swrApi:En}}class ne{}function Ua(e){ne.config=Object.assign(ne.config,e)}function qa(e){ne.autoQueryGridDefaults=Object.assign(ne.autoQueryGridDefaults,e)}function Gl(e){return e&&ne.config.assetsPathResolver?ne.config.assetsPathResolver(e):e}function Qa(e){return e&&ne.config.fallbackPathResolver?ne.config.fallbackPathResolver(e):e}function wt(){return{config:c(()=>ne.config),setConfig:Ua,autoQueryGridDefaults:c(()=>ne.autoQueryGridDefaults),setAutoQueryGridDefaults:qa,assetsPathResolver:Gl,fallbackPathResolver:Qa}}ye(ne,"config",{redirectSignIn:"/signin",redirectSignOut:"/auth/logout",navigate:e=>location.href=e,assetsPathResolver:e=>e,fallbackPathResolver:e=>e,storage:new Bn,tableIcon:{svg:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><g fill='none' stroke='currentColor' stroke-width='1.5'><path d='M5 12v6s0 3 7 3s7-3 7-3v-6'/><path d='M5 6v6s0 3 7 3s7-3 7-3V6'/><path d='M12 3c7 0 7 3 7 3s0 3-7 3s-7-3-7-3s0-3 7-3Z'/></g></svg>"}}),ye(ne,"autoQueryGridDefaults",{deny:[],hide:[],toolbarButtonClass:void 0,tableStyle:"stripedRows",take:25,maxFieldLength:150}),ye(ne,"user",I(null)),ye(ne,"metadata",I(null));const Hn="png,jpg,jpeg,jfif,gif,svg,webp".split(","),Nn={img:"png,jpg,jpeg,gif,svg,webp,png,jpg,jpeg,gif,bmp,tif,tiff,webp,ai,psd,ps".split(","),vid:"avi,m4v,mov,mp4,mpg,mpeg,wmv,webm".split(","),aud:"mp3,mpa,ogg,wav,wma,mid,webm".split(","),ppt:"key,odp,pps,ppt,pptx".split(","),xls:"xls,xlsm,xlsx,ods,csv,tsv".split(","),doc:"doc,docx,pdf,rtf,tex,txt,md,rst,xls,xlsm,xlsx,ods,key,odp,pps,ppt,pptx".split(","),zip:"zip,tar,gz,7z,rar,gzip,deflate,br,iso,dmg,z,lz,lz4,lzh,s7z,apl,arg,jar,war".split(","),exe:"exe,bat,sh,cmd,com,app,msi,run,vb,vbs,js,ws,wsh".split(","),att:"bin,oct,dat".split(",")},Vn=Object.keys(Nn),at=(e,t)=>`<svg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' role='img' preserveAspectRatio='xMidYMid meet' viewBox='${e}'>${t}</svg>`,ll={img:at("4 4 16 16","<path fill='currentColor' d='M20 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2zm-2 0H6v6.38l2.19-2.19l5.23 5.23l1-1a1.59 1.59 0 0 1 2.11.11L18 16V6zm-5 3.5a1.5 1.5 0 1 1 3 0a1.5 1.5 0 0 1-3 0z'/>"),vid:at("0 0 24 24","<path fill='currentColor' d='m14 2l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8m4 18V9h-5V4H6v16h12m-2-2l-2.5-1.7V18H8v-5h5.5v1.7L16 13v5Z'/>"),aud:at("0 0 24 24","<path fill='currentColor' d='M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6zm10-9h-4v3.88a2.247 2.247 0 0 0-3.5 1.87c0 1.24 1.01 2.25 2.25 2.25S13 17.99 13 16.75V13h3v-2z'/>"),ppt:at("0 0 48 48","<g fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='4'><path d='M4 8h40'/><path d='M8 8h32v26H8V8Z' clip-rule='evenodd'/><path d='m22 16l5 5l-5 5m-6 16l8-8l8 8'/></g>"),xls:at("0 0 256 256","<path fill='currentColor' d='M200 26H72a14 14 0 0 0-14 14v26H40a14 14 0 0 0-14 14v96a14 14 0 0 0 14 14h18v26a14 14 0 0 0 14 14h128a14 14 0 0 0 14-14V40a14 14 0 0 0-14-14Zm-42 76h44v52h-44Zm44-62v50h-44V80a14 14 0 0 0-14-14h-2V38h58a2 2 0 0 1 2 2ZM70 40a2 2 0 0 1 2-2h58v28H70ZM38 176V80a2 2 0 0 1 2-2h104a2 2 0 0 1 2 2v96a2 2 0 0 1-2 2H40a2 2 0 0 1-2-2Zm32 40v-26h60v28H72a2 2 0 0 1-2-2Zm130 2h-58v-28h2a14 14 0 0 0 14-14v-10h44v50a2 2 0 0 1-2 2ZM69.2 148.4L84.5 128l-15.3-20.4a6 6 0 1 1 9.6-7.2L92 118l13.2-17.6a6 6 0 0 1 9.6 7.2L99.5 128l15.3 20.4a6 6 0 0 1-9.6 7.2L92 138l-13.2 17.6a6 6 0 1 1-9.6-7.2Z'/>"),doc:at("0 0 32 32","<path fill='currentColor' d='M26 30H11a2.002 2.002 0 0 1-2-2v-6h2v6h15V6h-9V4h9a2.002 2.002 0 0 1 2 2v22a2.002 2.002 0 0 1-2 2Z'/><path fill='currentColor' d='M17 10h7v2h-7zm-1 5h8v2h-8zm-1 5h9v2h-9zm-6-1a5.005 5.005 0 0 1-5-5V3h2v11a3 3 0 0 0 6 0V5a1 1 0 0 0-2 0v10H8V5a3 3 0 0 1 6 0v9a5.005 5.005 0 0 1-5 5z'/>"),zip:at("0 0 16 16","<g fill='currentColor'><path d='M6.5 7.5a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v.938l.4 1.599a1 1 0 0 1-.416 1.074l-.93.62a1 1 0 0 1-1.109 0l-.93-.62a1 1 0 0 1-.415-1.074l.4-1.599V7.5zm2 0h-1v.938a1 1 0 0 1-.03.243l-.4 1.598l.93.62l.93-.62l-.4-1.598a1 1 0 0 1-.03-.243V7.5z'/><path d='M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2zm5.5-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H9v1H8v1h1v1H8v1h1v1H7.5V5h-1V4h1V3h-1V2h1V1z'/></g>"),exe:at("0 0 16 16","<path fill='currentColor' fill-rule='evenodd' d='M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM2.575 15.202H.785v-1.073H2.47v-.606H.785v-1.025h1.79v-.648H0v3.999h2.575v-.647ZM6.31 11.85h-.893l-.823 1.439h-.036l-.832-1.439h-.931l1.227 1.983l-1.239 2.016h.861l.853-1.415h.035l.85 1.415h.908l-1.254-1.992L6.31 11.85Zm1.025 3.352h1.79v.647H6.548V11.85h2.576v.648h-1.79v1.025h1.684v.606H7.334v1.073Z'/>"),att:at("0 0 24 24","<path fill='currentColor' d='M14 0a5 5 0 0 1 5 5v12a7 7 0 1 1-14 0V9h2v8a5 5 0 0 0 10 0V5a3 3 0 1 0-6 0v12a1 1 0 1 0 2 0V6h2v11a3 3 0 1 1-6 0V5a5 5 0 0 1 5-5Z'/>")},Ka=/[\r\n%#()<>?[\\\]^`{|}]/g,Mn=1024,Ga=["Bytes","KB","MB","GB","TB"],Wa=(()=>{const t="application/",e=t+"vnd.openxmlformats-officedocument.",l="image/",a="text/",n="video/",s={jpg:l+"jpeg",tif:l+"tiff",svg:l+"svg+xml",ico:l+"x-icon",ts:a+"typescript",py:a+"x-python",sh:a+"x-sh",mp3:"audio/mpeg3",mpg:n+"mpeg",ogv:n+"ogg",xlsx:e+"spreadsheetml.sheet",xltx:e+"spreadsheetml.template",docx:e+"wordprocessingml.document",dotx:e+"wordprocessingml.template",pptx:e+"presentationml.presentation",potx:e+"presentationml.template",ppsx:e+"presentationml.slideshow",mdb:t+"vnd.ms-access"};function r(e,t){e.split(",").forEach(e=>s[e]=t)}function o(e,t){e.split(",").forEach(e=>s[e]=t(e))}return o("jpeg,gif,png,tiff,bmp,webp",e=>l+e),o("jsx,csv,css",e=>a+e),o("aac,ac3,aiff,m4a,m4b,m4p,mid,midi,wav",e=>"audio/"+e),o("3gpp,avi,dv,divx,ogg,mp4,webm",e=>n+e),o("rtf,pdf",e=>t+e),r("htm,html,shtm",a+"html"),r("js,mjs,cjs",a+"javascript"),r("yml,yaml",t+"yaml"),r("bat,cmd",t+"bat"),r("xml,csproj,fsproj,vbproj",a+"xml"),r("txt,ps1",a+"plain"),r("qt,mov",n+"quicktime"),r("doc,dot",t+"msword"),r("xls,xlt,xla",t+"excel"),r("ppt,oit,pps,ppa",t+"vnd.ms-powerpoint"),r("cer,crt,der",t+"x-x509-ca-cert"),r("gz,tgz,zip,rar,lzh,z",t+"x-compressed"),r("aaf,aca,asd,bin,cab,chm,class,cur,db,dat,deploy,dll,dsp,exe,fla,ics,inf,mix,msi,mso,obj,ocx,prm,prx,psd,psp,qxd,sea,snp,so,sqlite,toc,ttf,u32,xmp,xsn,xtp",t+"octet-stream"),s})();let Dl=[];function zn(e){return(e=(e=(e=e.replace(/"/g,"'")).replace(/>\s+</g,"><")).replace(/\s{2,}/g," ")).replace(Ka,encodeURIComponent)}function Wl(e){return"data:image/svg+xml;utf8,"+zn(e)}function Un(e){e=URL.createObjectURL(e);return Dl.push(e),e}function qn(){Dl.forEach(e=>{try{URL.revokeObjectURL(e)}catch(e){console.error("URL.revokeObjectURL",e)}}),Dl=[]}function Zl(e){return e?(e=cl(e,"?"),pt(e,"/")):null}function Qt(e){e=Zl(e);return null==e||-1===e.indexOf(".")?null:pt(e,".").toLowerCase()}function Jl(e){var t=Qt(e.name);return t&&0<=Hn.indexOf(t)?Un(e):mt(e.name)}function Xl(e){return e&&(!(!e.startsWith("blob:")&&!e.startsWith("data:"))||(e=Qt(e))&&0<=Hn.indexOf(e))||!1}function mt(e){var t;return e?null==(t=Qt(e))||Xl(e)?e:Bt(t)||Wl(ll.doc):null}function Bt(e){e=Qn(e);return e&&Wl(e)||null}function Qn(t){if(ll[t])return ll[t];for(let e=0;e<Vn.length;e++){var l=Vn[e];if(0<=Nn[l].indexOf(t))return ll[l]}return null}function Yl(e,t=2){var l;return 0===e?"0 Bytes":(t=t<0?0:t,l=Math.floor(Math.log(e)/Math.log(Mn)),parseFloat((e/Math.pow(Mn,l)).toFixed(t))+" "+Ga[l])}function Za(e){return e.files&&Array.from(e.files).map(e=>({fileName:e.name,contentLength:e.size,filePath:Jl(e)}))}function hl(e,t){e.onerror=null,e.src=en(e.src,t)||""}function en(e,t){return Bt(pt(e,".").toLowerCase())||(t?Bt(t)||t:null)||Bt("doc")}function Ol(e){if(e)return e=pt(e,".").toLowerCase(),Wa[e]||"application/"+e;throw new Error("fileNameOrExt required")}function Dm(){return{extSvg:Qn,extSrc:Bt,getExt:Qt,encodeSvg:zn,canPreview:Xl,getFileName:Zl,getMimeType:Ol,formatBytes:Yl,filePathUri:mt,svgToDataUri:Wl,fileImageUri:Jl,objectUrl:Un,flush:qn,inputFiles:Za,iconOnError:hl,iconFallbackSrc:en}}class Ja{constructor(e){ye(this,"view"),ye(this,"includeTypes"),Object.assign(this,e)}getTypeName(){return"MetadataApp"}getMethod(){return"GET"}createResponse(){return{}}}const Vt="/metadata/app.json",Xa={Boolean:"checkbox",DateTime:"date",DateOnly:"date",DateTimeOffset:"date",TimeSpan:"time",TimeOnly:"time",Byte:"number",Short:"number",Int64:"number",Int32:"number",UInt16:"number",UInt32:"number",UInt64:"number",Single:"number",Double:"number",Decimal:"number",String:"text",Guid:"text",Uri:"text"},Ya={number:"Int32",checkbox:"Boolean",date:"DateTime","datetime-local":"DateTime",time:"TimeSpan"},jl={Byte:"byte",Int16:"short",Int32:"int",Int64:"long",UInt16:"ushort",Unt32:"uint",UInt64:"ulong",Single:"float",Double:"double",Decimal:"decimal"},eo=([...Object.keys(jl),...Object.values(jl)],{String:"string",Boolean:"bool",...jl});function Yt(e){return eo[e]||e}function Kn(e,t){return e?(t=t||[],"Nullable`1"===e?Yt(t[0])+"?":e.endsWith("[]")?`List<${Yt(e.substring(0,e.length-2))}>`:0===t.length?Yt(e):cl(Yt(e),"`")+"<"+t.join(",")+">"):""}function to(e){return e&&Kn(e.name,e.genericArgs)}class Mt{constructor(){ye(this,"Query"),ye(this,"QueryInto"),ye(this,"Create"),ye(this,"Update"),ye(this,"Patch"),ye(this,"Delete")}get AnyQuery(){return this.Query||this.QueryInto}get AnyUpdate(){return this.Patch||this.Update}toArray(){return[this.Query,this.QueryInto,this.Create,this.Update,this.Patch,this.Delete].filter(e=>!!e).map(e=>e)}get empty(){return!(this.Query||this.QueryInto||this.Create||this.Update||this.Patch||this.Delete)}add(e){Te.isQueryInto(e)&&!this.QueryInto?this.QueryInto=e:Te.isQuery(e)&&!this.Query?this.Query=e:Te.isCreate(e)&&!this.Create?this.Create=e:Te.isUpdate(e)&&!this.Update?this.Update=e:Te.isPatch(e)&&!this.Patch?this.Patch=e:Te.isDelete(e)&&!this.Delete&&(this.Delete=e)}static from(e){const t=new Mt;return e.forEach(e=>{t.add(e)}),t}static forType(l,e){var t;let a=new Mt;return l&&(null!=(e=e??(null==(t=ne.metadata.value)?void 0:t.api))&&e.operations.forEach(e=>{var t;(null==(t=e.dataModel)?void 0:t.name)==l&&a.add(e)})),a}}const Te={Create:"ICreateDb`1",Update:"IUpdateDb`1",Patch:"IPatchDb`1",Delete:"IDeleteDb`1",AnyRead:["QueryDb`1","QueryDb`2"],AnyWrite:["ICreateDb`1","IUpdateDb`1","IPatchDb`1","IDeleteDb`1"],isAnyQuery:e=>De(e.request.inherits,e=>0<=Te.AnyRead.indexOf(e.name)),isQuery:e=>De(e.request.inherits,e=>"QueryDb`1"===e.name),isQueryInto:e=>De(e.request.inherits,e=>"QueryDb`2"===e.name),isCrud:e=>{return null==(e=e.request.implements)?void 0:e.some(e=>0<=Te.AnyWrite.indexOf(e.name))},isCreate:e=>el(e,Te.Create),isUpdate:e=>el(e,Te.Update),isPatch:e=>el(e,Te.Patch),isDelete:e=>el(e,Te.Delete),model:e=>{var t;return e?De(e.inherits,e=>0<=Te.AnyRead.indexOf(e.name))?null==(t=e.inherits)?void 0:t.genericArgs[0]:null==(e=null==(t=e.implements)?void 0:t.find(e=>0<=Te.AnyWrite.indexOf(e.name)))?void 0:e.genericArgs[0]:null}};function lo(e){var t;return(null==(t=e.input)?void 0:t.type)||gl(tn(e))}function Gn(e){return e.endsWith("?")?Xs(e,1):e}function gl(e){return Xa[Gn(e)]}function no(e){return e&&Ya[e]||"String"}function tn(e){return"Nullable`1"===e.type?e.genericArgs[0]:e.type}function Bl(e){return e&&"number"==gl(e)||!1}function Wn(e){return e&&"string"==e.toLowerCase()||!1}function so(e){return"List`1"==e||e.startsWith("List<")||e.endsWith("[]")}function Zn(e){var t;return!(null==e||!e.type||(t=tn(e),e.isValueType&&-1==t.indexOf("`"))||e.isEnum||null!=gl(e.type))}function Jn(e){var t;return!!(null!=e&&e.type&&(t=tn(e),e.isValueType&&-1==t.indexOf("`")||e.isEnum||"file"==(null==(t=e.input)?void 0:t.type)||"tag"==(null==(t=e.input)?void 0:t.type)||"combobox"==(null==(t=e.input)?void 0:t.type)||null!=gl(e.type)))}function Ht(e,t){let l="string"==typeof e?pl(e):e,a=(l||(console.warn("Metadata not found for: "+e),l={request:{name:e}}),function(e){Object.assign(this,e)}),n=(s.prototype.createResponse=function(){return l.returnsVoid?void 0:new a},s.prototype.getTypeName=function(){return l.request.name},s.prototype.getMethod=function(){return l.method||"POST"},s);function s(e){Object.assign(this,e)}return new n(t)}function ao(e,t,l={}){let a=function(e){Object.assign(this,e)},n=(s.prototype.createResponse=function(){return"function"==typeof l.createResponse?l.createResponse():new a},s.prototype.getTypeName=function(){return e},s.prototype.getMethod=function(){return l.method||"POST"},s);function s(e){Object.assign(this,e)}return new n(t)}function nl(l,e){return l?(Object.keys(l).forEach(e=>{var t=l[e];"string"==typeof t&&t.startsWith("/Date")&&(l[e]=ml(bt(t)))}),l):{}}function oo(e,o){let i={};return Array.from(e.elements).forEach(a=>{var n;if(a.id&&null!=a.value&&""!==a.value){const s=a.id.toLowerCase(),r=o&&o.find(e=>e.name.toLowerCase()==s);let e=null==r?void 0:r.type,t=null==(n=null==r?void 0:r.genericArgs)?void 0:n[0],l="checkbox"===a.type?a.checked:a.value;Bl(e)?l=Number(l):"List`1"===e&&"string"==typeof l&&(l=l.split(",").map(e=>Bl(t)?Number(e):e)),i[a.id]=l}}),i}function ln(e){var t;return(null==(t=null==e?void 0:e.api)?void 0:t.operations)&&0<e.api.operations.length}function io(e){if(null!=e&&e.assert&&!ne.metadata.value)throw new Error("useMetadata() not configured, see: https://docs.servicestack.net/vue/use-metadata");return ne.metadata.value}function Nt(e){return!(!e||!ln(e)||(e.date=Zs(new Date),ne.metadata.value=e,typeof localStorage<"u"&&localStorage.setItem(Vt,JSON.stringify(e)),0))}function ro(){ne.metadata.value=null,typeof localStorage<"u"&&localStorage.removeItem(Vt)}function Xn(){if(null!=ne.metadata.value)return!0;var e=globalThis.Server;if(ln(e))Nt(e);else{e=typeof localStorage<"u"?localStorage.getItem(Vt):null;if(e)try{Nt(JSON.parse(e))}catch{console.error(`Could not JSON.parse ${Vt} from localStorage`)}}return null!=ne.metadata.value}async function Sn(e,t){var l,a=t?await t():await fetch(e);a.ok?(l=await a.text(),Nt(JSON.parse(l))):console.error(`Could not download ${t?"AppMetadata":e}: `+a.statusText),ln(ne.metadata.value)||console.warn("AppMetadata is not available")}async function uo(e){var{olderThan:e,resolvePath:t,resolve:l}=e||{};let a=Xn()&&0!==e;if(!(a=a&&e&&(!(n=bt(null==(n=ne.metadata.value)?void 0:n.date))||(new Date).getTime()-n.getTime()>e)?!1:a)){if((t||l)&&await Sn(t||Vt,l),null!=ne.metadata.value)return;var n=Oe("client");if(null!=n&&(e=await n.api(new Ja)).succeeded&&Nt(e.response),null!=ne.metadata.value)return;await Sn(Vt)}return ne.metadata.value}function it(t,l){var e,a=null==(a=ne.metadata.value)?void 0:a.api;return a&&t?a.types.find(e=>e.name.toLowerCase()===t.toLowerCase()&&(!l||e.namespace==l))||((e=pl(t))?e.request:(e=a.operations.find(e=>e.response&&e.response.name.toLowerCase()===t.toLowerCase()&&(!l||e.response.namespace==l)))?e.response:null):null}function pl(t){var e=null==(e=ne.metadata.value)?void 0:e.api;return e?e.operations.find(e=>e.request.name.toLowerCase()===t.toLowerCase()):null}function co({dataModel:e}){var t=null==(t=ne.metadata.value)?void 0:t.api;if(!t)return[];let l=t.operations;if(e){const a="string"==typeof e?it(e):e;l=l.filter(e=>Yn(e.dataModel,a))}return l}function nn(e){return e?it(e.name,e.namespace):null}function Yn(e,t){return e&&t&&e.name===t.name&&(!e.namespace||!t.namespace||e.namespace===t.namespace)}function fo(e,t){e=it(e);return e&&e.properties&&e.properties.find(e=>e.name.toLowerCase()===t.toLowerCase())}function es(e){return ts(it(e))}function ts(t){if(t&&t.isEnum&&null!=t.enumNames){var l={};for(let e=0;e<t.enumNames.length;e++){var a=(t.enumDescriptions?t.enumDescriptions[e]:null)||t.enumNames[e];l[(null!=t.enumValues?t.enumValues[e]:null)||t.enumNames[e]]=a}return l}return null}function ls(e){if(e){var t={},l=e.input&&e.input.allowableEntries;if(l){for(let e=0;e<l.length;e++){var a=l[e];t[a.key]=a.value}return t}var n=e.allowableValues||(e.input?e.input.allowableValues:null);if(n){for(let e=0;e<n.length;e++){var s=n[e];t[s]=s}return t}if(e.isEnum){e=it(e.genericArgs&&1==e.genericArgs.length?e.genericArgs[0]:e.type);if(e)return ts(e)}}return null}function sn(t){if(t){const l=[];return Object.keys(t).forEach(e=>l.push({key:e,value:t[e]})),l}}function mo(e,t){a=e.name,l=(null==t?void 0:t.type)||lo(e)||"text";var l,a=Object.assign({id:a,name:a,type:l},t);return e.isEnum&&(a.type="select",a.allowableEntries=sn(ls(e))),a}function vo(e){let s=[];if(e){const r=Ke(e),t=pl(e.name),o=nn(null==t?void 0:t.dataModel);r.forEach(t=>{var e;if(Jn(t)){const l=mo(t,t.input);if(l.id=Js(l.id),"file"==l.type&&t.uploadTo&&!l.accept&&(e=null==(e=null==(e=ne.metadata.value)?void 0:e.plugins.filesUpload)?void 0:e.locations.find(e=>e.name==t.uploadTo))&&!l.accept&&e.allowExtensions&&(l.accept=e.allowExtensions.map(e=>e.startsWith(".")?e:"."+e).join(",")),o&&(e=null==(e=o.properties)?void 0:e.find(e=>e.name==t.name),t.ref||(t.ref=null==e?void 0:e.ref)),l.options)try{const a={$typeFields:r.map(e=>e.name),$dataModelFields:o?Ke(o).map(e=>e.name):[]},n=Ql(l.options,a);Object.keys(n).forEach(e=>{l[e]=n[e]})}catch{console.error(`failed to evaluate '${l.options}'`)}s.push(l)}})}return s}function Ke(e){if(!e)return[];let t=[],l={};for(;e;)e.properties&&e.properties.forEach(e=>{l[e.name]||(l[e.name]=1,t.push(e))}),e=e.inherits?nn(e.inherits):null;return t.map(e=>e.type.endsWith("[]")?{...e,type:"List`1",genericArgs:[e.type.substring(0,e.type.length-2)]}:e)}function el(e,t){return(null==(e=e.request.implements)?void 0:e.some(e=>e.name===t))||!1}function Kt(e){return e?ns(e,Ke(e)):null}function ns(e,t){var l=t.find(e=>"id"===e.name.toLowerCase());if(l&&l.isPrimaryKey)return l;t=t.find(e=>e.isPrimaryKey)||l;if(!t){l=Te.model(e);if(l)return De(it(l),e=>Kt(e));console.error("Primary Key not found in "+e.name)}return t||null}function ho(e,t){return De(Kt(e),e=>ce(t,e.name))}function ss(e,t,l){return e&&"none"===e.valueType?"":"%In"===l.key||"%Between"===l.key?`(${l.value})`:go(t,l.value)}function go(e,t){return!e||Bl(e=Gn(e))||"Boolean"===e?t:so(e)?`[${t}]`:`'${t}'`}function Je(){var e=c(()=>{var e;return(null==(e=ne.metadata.value)?void 0:e.app)||null}),t=c(()=>{var e;return(null==(e=ne.metadata.value)?void 0:e.api)||null}),l=c(()=>{var e;return(null==(e=ne.metadata.value)?void 0:e.plugins.autoQuery.viewerConventions)||[]});return Xn(),{loadMetadata:uo,getMetadata:io,setMetadata:Nt,clearMetadata:ro,metadataApp:e,metadataApi:t,filterDefinitions:l,typeOf:it,typeOfRef:nn,typeEquals:Yn,apiOf:pl,findApis:co,typeName:to,typeName2:Kn,property:fo,enumOptions:es,propertyOptions:ls,createFormLayout:vo,typeProperties:Ke,supportsProp:Jn,Crud:Te,Apis:Mt,getPrimaryKey:Kt,getPrimaryKeyByProps:ns,getId:ho,createDto:Ht,makeDto:ao,toFormValues:nl,formValues:oo,isComplexProp:Zn,asKvps:sn}}const We=class{static async getOrFetchValue(e,t,l,a,n,s,r){return We.getValue(l,r,n)??(await We.fetchLookupIds(e,t,l,a,n,s,[r]),We.getValue(l,r,n))}static getValue(e,t,l){e=We.Lookup[e];if(e){e=e[t];if(e)return e[l=l.toLowerCase()]}}static setValue(e,t,l,a){e=We.Lookup[e]??(We.Lookup[e]={});(e[t]??(e[t]={}))[l=l.toLowerCase()]=a}static setRefValue(e,t){var l=ce(t,e.refId);return null==l||null==e.refLabel?null:(t=ce(t,e.refLabel),We.setValue(e.model,l,e.refLabel,t),t)}static async fetchLookupIds(e,t,l,a,n,s,r){t=t.operations.find(e=>{return Te.isAnyQuery(e)&&(null==(e=e.dataModel)?void 0:e.name)==l});if(t){const o=We.Lookup[l]??(We.Lookup[l]={}),i=[];Object.keys(o).forEach(e=>{var t=o[e];ce(t,n)&&i.push(e)});var r=r.filter(e=>!i.includes(e));0!=r.length&&(s=s?null:a+","+n,r={[a+"In"]:r.join(",")},s&&(r.fields=s),s=Ht(t,r),(r=await e.api(s,{jsconfig:"edv,eccn"})).succeeded?(ce(r.response,"results")||[]).forEach(e=>{var t,l;ce(e,a)?(t=""+ce(e,a),l=ce(e,n),n=n.toLowerCase(),(o[t]??(o[t]={}))[n]=""+l):console.error(`result[${a}] == null`,e)}):console.error("Failed to call "+t.request.name))}}};let vt=We;ye(vt,"Lookup",{});const as=Y({inheritAttrs:!1,props:{image:Object,svg:String,src:String,alt:String,type:String},setup(n,{attrs:s}){return()=>{let e=n.image;var t,l;n.type&&(l=Je()["typeOf"],(l=l(n.type))||console.warn(`Type ${n.type} does not exist`),null!=l&&l.icon?e=null==l?void 0:l.icon:console.warn(`Type ${n.type} does not have a [Svg] icon`));let a=n.svg||(null==e?void 0:e.svg)||"";return a.startsWith("<svg ")?(l=cl(a,">").indexOf("class="),t=`${(null==e?void 0:e.cls)||""} `+(s.class||""),a=-1==l?`<svg class="${t}" `+a.substring(4):(l=l+6+1,a.substring(0,l)+t+" "+a.substring(l)),ft("span",{innerHTML:a})):ft("img",{class:[null==e?void 0:e.cls,s.class],src:Gl(n.src||(null==e?void 0:e.uri)),onError:e=>hl(e.target)})}}}),po={class:"text-2xl font-semibold text-gray-900 dark:text-gray-300"},yo={class:"flex"},bo=n("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"},null,-1),wo=n("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"},null,-1),xo=[bo,wo],ko=Y({__name:"Loading",props:{imageClass:{default:"w-6 h-6"}},setup(l){return(e,t)=>(o(),u("div",po,[n("div",yo,[(o(),u("svg",{class:w(["self-center inline mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-gray-600 dark:fill-gray-300",l.imageClass]),role:"status",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},xo,2)),n("span",null,[Z(e.$slots,"default")])])]))}}),$o=["href","onClick"],Co=["type"],_o=Y({__name:"OutlineButton",props:{type:{default:"submit"},href:null},setup(a){const s="inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 shadow-sm text-sm font-medium rounded-md text-gray-700 dark:text-gray-200 disabled:text-gray-400 bg-white dark:bg-black hover:bg-gray-50 hover:dark:bg-gray-900 disabled:hover:bg-white dark:disabled:hover:bg-black focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black";return(t,e)=>{var l=U("router-link");return a.href?(o(),X(l,{key:0,to:a.href},{default:ve(({navigate:e})=>[n("button",{class:w(s),href:a.href,onClick:e},[Z(t.$slots,"default")],8,$o)]),_:3},8,["to"])):(o(),u("button",Ce({key:1,type:a.type,class:s},t.$attrs),[Z(t.$slots,"default")],16,Co))}}}),Lo=["href","onClick"],Vo=["type"],Mo=Y({__name:"PrimaryButton",props:{type:{default:"submit"},href:null,color:{default:"indigo"}},setup(a){const e=a,t={blue:"text-white bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 disabled:hover:bg-blue-400 focus:ring-indigo-500 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",purple:"text-white bg-purple-600 hover:bg-purple-700 disabled:bg-purple-400 disabled:hover:bg-purple-400 focus:ring-indigo-500 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",red:"focus:ring-red-500 text-white bg-red-600 hover:bg-red-700 disabled:bg-red-400 disabled:hover:bg-red-400 focus:ring-red-500 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-500",green:"focus:ring-green-300 text-white bg-green-600 hover:bg-green-700 disabled:bg-green-400 disabled:hover:bg-green-400 focus:ring-green-500 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-500",sky:"focus:ring-sky-300 text-white bg-sky-600 hover:bg-sky-700 disabled:bg-sky-400 disabled:hover:bg-sky-400 focus:ring-sky-500 dark:bg-sky-600 dark:hover:bg-sky-700 dark:focus:ring-sky-500",cyan:"focus:ring-cyan-300 text-white bg-cyan-600 hover:bg-cyan-700 disabled:bg-cyan-400 disabled:hover:bg-cyan-400 focus:ring-cyan-500 dark:bg-cyan-600 dark:hover:bg-cyan-700 dark:focus:ring-cyan-500",indigo:"focus:ring-2 focus:ring-offset-2 text-white bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 disabled:hover:bg-indigo-400 focus:ring-indigo-500 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},r=c(()=>"inline-flex justify-center rounded-md border border-transparent py-2 px-4 text-sm font-medium shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 dark:ring-offset-black "+(t[e.color]||t.indigo));return(t,e)=>{var l=U("router-link");return a.href?(o(),X(l,{key:0,to:a.href},{default:ve(({navigate:e})=>[n("button",{class:w(s(r)),href:a.href,onClick:e},[Z(t.$slots,"default")],10,Lo)]),_:3},8,["to"])):(o(),u("button",Ce({key:1,type:a.type,class:s(r)},t.$attrs),[Z(t.$slots,"default")],16,Vo))}}}),So=["type","href","onClick"],Ao=["type"],To=Y({__name:"SecondaryButton",props:{type:null,href:null},setup(a){const s="inline-flex justify-center rounded-md border border-gray-300 py-2 px-4 text-sm font-medium shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-400 dark:hover:text-white hover:bg-gray-50 dark:hover:bg-gray-700 focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:ring-offset-black";return(t,e)=>{var l=U("router-link");return a.href?(o(),X(l,{key:0,to:a.href},{default:ve(({navigate:e})=>[n("button",{type:a.type??"button",class:w(s),href:a.href,onClick:e},[Z(t.$slots,"default")],8,So)]),_:3},8,["to"])):(o(),u("button",Ce({key:1,type:a.type??"button",class:s},t.$attrs),[Z(t.$slots,"default")],16,Ao))}}});function He(e,t){return Array.isArray(e)?0<=e.indexOf(t):e==t||e.includes(t)}const rl={blue:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-200",purple:"text-purple-600 dark:text-purple-400 hover:text-purple-800 dark:hover:text-purple-200",red:"text-red-700 dark:text-red-400 hover:text-red-900 dark:hover:text-red-200",green:"text-green-600 dark:text-green-400 hover:text-green-800 dark:hover:text-green-200",sky:"text-sky-600 dark:text-sky-400 hover:text-sky-800 dark:hover:text-sky-200",cyan:"text-cyan-600 dark:text-cyan-400 hover:text-cyan-800 dark:hover:text-cyan-200",indigo:"text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-200"},ot={base:"block w-full sm:text-sm rounded-md dark:text-white dark:bg-gray-900 disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none",invalid:"pr-10 border-red-300 text-red-900 placeholder-red-300 focus:outline-none focus:ring-red-500 focus:border-red-500",valid:"shadow-sm focus:ring-indigo-500 focus:border-indigo-500 border-gray-300 dark:border-gray-600"},ht={panelClass:"shadow sm:rounded-md",formClass:"space-y-6 bg-white dark:bg-black py-6 px-4 sm:p-6",headingClass:"text-lg font-medium leading-6 text-gray-900 dark:text-gray-100",subHeadingClass:"mt-1 text-sm text-gray-500 dark:text-gray-400"},jt={panelClass:"pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",formClass:"flex h-full flex-col divide-y divide-gray-200 dark:divide-gray-700 shadow-xl bg-white dark:bg-black",titlebarClass:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6",headingClass:"text-lg font-medium text-gray-900 dark:text-gray-100",subHeadingClass:"mt-1 text-sm text-gray-500 dark:text-gray-400",closeButtonClass:"rounded-md bg-gray-50 dark:bg-gray-900 text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:ring-offset-black"},os={sizeClass:"sm:max-w-prose lg:max-w-screen-md xl:max-w-screen-lg 2xl:max-w-screen-xl sm:w-full"},Ue={panelClass(e="slideOver"){return("card"==e?ht:jt).panelClass},formClass(e="slideOver"){return("card"==e?ht:jt).formClass},headingClass(e="slideOver"){return("card"==e?ht:jt).headingClass},subHeadingClass(e="slideOver"){return("card"==e?ht:jt).subHeadingClass},buttonsClass:"mt-4 px-4 py-3 bg-gray-50 dark:bg-gray-900 sm:px-6 flex flex-wrap justify-between",legendClass:"text-base font-medium text-gray-900 dark:text-gray-100 text-center mb-4"},oe={getGridClass(e=0){return oe.gridClass},getGrid2Class(e="stripedRows"){return He(e,"fullWidth")?"overflow-x-auto":oe.grid2Class},getGrid3Class(e="stripedRows"){return He(e,"fullWidth")?"inline-block min-w-full py-2 align-middle":oe.grid3Class},getGrid4Class(e="stripedRows"){return He(e,"whiteBackground")?"":He(e,"fullWidth")?"overflow-hidden shadow-sm ring-1 ring-black ring-opacity-5":oe.grid4Class},getTableClass(e="stripedRows"){return He(e,"fullWidth")||He(e,"verticalLines")?"min-w-full divide-y divide-gray-300":oe.tableClass},getTheadClass(e="stripedRows"){return He(e,"whiteBackground")?"":oe.theadClass},getTheadRowClass(e="stripedRows"){return oe.theadRowClass+(He(e,"verticalLines")?" divide-x divide-gray-200 dark:divide-gray-700":"")},getTheadCellClass(e="stripedRows"){return oe.theadCellClass+(He(e,"uppercaseHeadings")?" uppercase":"")},getTbodyClass(e="stripedRows"){return(He(e,"whiteBackground")||He(e,"verticalLines")?"divide-y divide-gray-200 dark:divide-gray-800":oe.tableClass)+(He(e,"verticalLines")?" bg-white":"")},getTableRowClass(e="stripedRows",t,l,a){return(a?"cursor-pointer ":"")+(l?"bg-indigo-100 dark:bg-blue-800":(a?"hover:bg-yellow-50 dark:hover:bg-blue-900 ":"")+(!He(e,"stripedRows")||t%2==0?"bg-white dark:bg-black":"bg-gray-50 dark:bg-gray-800"))+(He(e,"verticalLines")?" divide-x divide-gray-200 dark:divide-gray-700":"")},gridClass:"flex flex-col",grid2Class:"",grid3Class:"inline-block min-w-full py-2 align-middle",grid4Class:"overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg",tableClass:"min-w-full divide-y divide-gray-200 dark:divide-gray-700",theadClass:"bg-gray-50 dark:bg-gray-900",tableCellClass:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",theadRowClass:"select-none",theadCellClass:"px-6 py-4 text-left text-sm font-medium tracking-wider whitespace-nowrap",toolbarButtonClass:"inline-flex items-center px-2.5 py-1.5 border border-gray-300 dark:border-gray-700 shadow-sm text-sm font-medium rounded text-gray-700 dark:text-gray-300 bg-white dark:bg-black hover:bg-gray-50 dark:hover:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black"},Om=Object.freeze(Object.defineProperty({__proto__:null,a:rl,card:ht,form:Ue,grid:oe,input:ot,modal:os,slideOver:jt},Symbol.toStringTag,{value:"Module"})),Io=Y({__name:"TextLink",props:{color:{default:"blue"}},setup(e){const t=e,l=Rs(),a=c(()=>(rl[t.color]||rl.blue)+(l.href?"":" cursor-pointer"));return(e,t)=>(o(),u("a",{class:w(s(a))},[Z(e.$slots,"default")],2))}}),Fo={class:"flex","aria-label":"Breadcrumb"},Po={role:"list",class:"flex items-center space-x-4"},Do=["href","title"],Oo=n("svg",{class:"h-6 w-6 flex-shrink-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[n("path",{"fill-rule":"evenodd",d:"M9.293 2.293a1 1 0 011.414 0l7 7A1 1 0 0117 11h-1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-3a1 1 0 00-1-1H9a1 1 0 00-1 1v3a1 1 0 01-1 1H5a1 1 0 01-1-1v-6H3a1 1 0 01-.707-1.707l7-7z","clip-rule":"evenodd"})],-1),jo={class:"sr-only"},Bo=Y({__name:"Breadcrumbs",props:{homeHref:{default:"/"},homeLabel:{default:"Home"}},setup(l){return(e,t)=>(o(),u("nav",Fo,[n("ol",Po,[n("li",null,[n("div",null,[n("a",{href:l.homeHref,class:"text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400",title:l.homeLabel},[Oo,n("span",jo,V(l.homeLabel),1)],8,Do)])]),Z(e.$slots,"default")])]))}}),Ro={class:"flex items-center"},Eo=n("svg",{class:"h-6 w-6 flex-shrink-0 text-gray-400 dark:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[n("path",{"fill-rule":"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z","clip-rule":"evenodd"})],-1),Ho=["href","title"],No=["title"],zo=Y({__name:"Breadcrumb",props:{href:null,title:null},setup(l){return(e,t)=>(o(),u("li",null,[n("div",Ro,[Eo,l.href?(o(),u("a",{key:0,href:l.href,class:"ml-4 text-lg font-medium text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300",title:l.title},[Z(e.$slots,"default")],8,Ho)):(o(),u("span",{key:1,class:"ml-4 text-lg font-medium text-gray-700 dark:text-gray-300",title:l.title},[Z(e.$slots,"default")],8,No))])]))}}),Uo={key:0,class:"text-base font-semibold text-gray-500 dark:text-gray-400"},qo={role:"list",class:"mt-4 divide-y divide-gray-200 dark:divide-gray-800 border-t border-b border-gray-200 dark:border-gray-800"},Qo=Y({__name:"NavList",props:{title:null},setup(l){return(e,t)=>(o(),u("div",null,[l.title?(o(),u("h2",Uo,V(l.title),1)):C("",!0),n("ul",qo,[Z(e.$slots,"default")])]))}}),Ko={class:"relative flex items-start space-x-4 py-6"},Go={class:"flex-shrink-0"},Wo={class:"flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-50 dark:bg-indigo-900"},Zo={class:"min-w-0 flex-1"},Jo={class:"text-base font-medium text-gray-900 dark:text-gray-100"},Xo={class:"rounded-sm focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2"},Yo=["href"],ei=n("span",{class:"absolute inset-0","aria-hidden":"true"},null,-1),ti={class:"text-base text-gray-500"},li=n("div",{class:"flex-shrink-0 self-center"},[n("svg",{class:"h-5 w-5 text-gray-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[n("path",{"fill-rule":"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z","clip-rule":"evenodd"})])],-1),ni=Y({__name:"NavListItem",props:{title:null,href:null,icon:null,iconSvg:null,iconSrc:null,iconAlt:null},setup(a){return(e,t)=>{var l=U("Icon");return o(),u("li",Ko,[n("div",Go,[n("span",Wo,[fe(l,{class:"w-6 h-6 text-indigo-700 dark:text-indigo-300",image:a.icon,src:a.iconSrc,svg:a.iconSvg,alt:a.iconAlt},null,8,["image","src","svg","alt"])])]),n("div",Zo,[n("h3",Jo,[n("span",Xo,[n("a",{href:a.href,class:"focus:outline-none"},[ei,he(" "+V(a.title),1)],8,Yo)])]),n("p",ti,[Z(e.$slots,"default")])]),li])}}});function si(e){ne.user.value=e}function ai(){ne.user.value=null}function is(e){var t;return 0<=((null==(t=ne.user.value)?void 0:t.roles)||[]).indexOf(e)}function oi(e){var t;return 0<=((null==(t=ne.user.value)?void 0:t.permissions)||[]).indexOf(e)}function an(){return is("Admin")}function sl(e){if(!e)return!1;if(!e.requiresAuth)return!0;var t=ne.user.value;if(!t)return!1;if(an())return!0;let[l,a]=[t.roles||[],t.permissions||[]],[n,s,r,o]=[e.requiredRoles||[],e.requiredPermissions||[],e.requiresAnyRole||[],e.requiresAnyPermission||[]];return!(!n.every(e=>0<=l.indexOf(e))||0<r.length&&!r.some(e=>0<=l.indexOf(e))||!s.every(e=>0<=a.indexOf(e))||0<o.length&&!o.every(e=>0<=a.indexOf(e)))}function ii(e){if(!e||!e.requiresAuth)return null;var t=ne.user.value;if(!t)return`<b>${e.request.name}</b> requires Authentication`;if(an())return null;let[l,a]=[t.roles||[],t.permissions||[]],[n,s,r,o]=[e.requiredRoles||[],e.requiredPermissions||[],e.requiresAnyRole||[],e.requiresAnyPermission||[]],i=n.filter(e=>l.indexOf(e)<0);return 0<i.length?`Requires ${i.map(e=>"<b>"+e+"</b>").join(", ")} Role`+(1<i.length?"s":""):0<(t=s.filter(e=>a.indexOf(e)<0)).length?`Requires ${t.map(e=>"<b>"+e+"</b>").join(", ")} Permission`+(1<t.length?"s":""):0<r.length&&!r.some(e=>0<=l.indexOf(e))?`Requires any ${r.filter(e=>l.indexOf(e)<0).map(e=>"<b>"+e+"</b>").join(", ")} Role`+(1<i.length?"s":""):0<o.length&&!o.every(e=>0<=a.indexOf(e))?`Requires any ${o.filter(e=>a.indexOf(e)<0).map(e=>"<b>"+e+"</b>").join(", ")} Permission`+(1<t.length?"s":""):null}function on(){return{signIn:si,signOut:ai,user:c(()=>ne.user.value||null),isAuthenticated:c(()=>null!=ne.user.value),hasRole:is,hasPermission:oi,isAdmin:an,canAccess:sl,invalidAccessMessage:ii}}const ri={key:0},ui={class:"md:p-4"},rs=Y({__name:"EnsureAccess",props:{invalidAccess:null,alertClass:null},emits:["done"],setup(r){const i=on()["isAuthenticated"],t=wt()["config"],d=()=>{var e=location.href.substring(location.origin.length)||"/",e=Rt(t.value.redirectSignIn,{redirect:e});t.value.navigate(e)},c=()=>{var e=location.href.substring(location.origin.length)||"/",e=Rt(t.value.redirectSignOut,{ReturnUrl:e});t.value.navigate(e)};return(e,t)=>{var l=U("Alert"),a=U("SecondaryButton");return r.invalidAccess?(o(),u("div",ri,[fe(l,{class:w(r.alertClass),innerHTML:r.invalidAccess},null,8,["class","innerHTML"]),n("div",ui,[s(i)?(o(),X(a,{key:1,onClick:c},{default:ve(()=>[he("Sign Out")]),_:1})):(o(),X(a,{key:0,onClick:d},{default:ve(()=>[he("Sign In")]),_:1}))])])):C("",!0)}}}),di={class:"absolute top-0 right-0 bg-white dark:bg-black border dark:border-gray-800 rounded normal-case text-sm shadow w-80"},ci={class:"p-4"},fi=n("h3",{class:"text-base font-medium mb-3 dark:text-gray-100"},"Sort",-1),mi={class:"flex w-full justify-center"},vi=n("svg",{class:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},[n("g",{fill:"currentColor"},[n("path",{"fill-rule":"evenodd",d:"M10.082 5.629L9.664 7H8.598l1.789-5.332h1.234L13.402 7h-1.12l-.419-1.371h-1.781zm1.57-.785L11 2.687h-.047l-.652 2.157h1.351z"}),n("path",{d:"M12.96 14H9.028v-.691l2.579-3.72v-.054H9.098v-.867h3.785v.691l-2.567 3.72v.054h2.645V14zm-8.46-.5a.5.5 0 0 1-1 0V3.707L2.354 4.854a.5.5 0 1 1-.708-.708l2-1.999l.007-.007a.498.498 0 0 1 .7.006l2 2a.5.5 0 1 1-.707.708L4.5 3.707V13.5z"})])],-1),hi=n("span",null,"ASC",-1),gi=[vi,hi],pi=dl('<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g fill="currentColor"><path d="M12.96 7H9.028v-.691l2.579-3.72v-.054H9.098v-.867h3.785v.691l-2.567 3.72v.054h2.645V7z"></path><path fill-rule="evenodd" d="M10.082 12.629L9.664 14H8.598l1.789-5.332h1.234L13.402 14h-1.12l-.419-1.371h-1.781zm1.57-.785L11 9.688h-.047l-.652 2.156h1.351z"></path><path d="M4.5 2.5a.5.5 0 0 0-1 0v9.793l-1.146-1.147a.5.5 0 0 0-.708.708l2 1.999l.007.007a.497.497 0 0 0 .7-.006l2-2a.5.5 0 0 0-.707-.708L4.5 12.293V2.5z"></path></g></svg><span>DESC</span>',2),yi=[pi],bi=n("h3",{class:"text-base font-medium mt-4 mb-2"}," Filter ",-1),wi={key:0},xi=["id","value"],ki=["for"],$i={key:1},Ci={class:"mb-2"},_i={class:"inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 text-indigo-700"},Li=["onClick"],Vi=n("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[n("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),Mi=[Vi],Si={class:"flex"},Ai=n("svg",{class:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[n("path",{"fill-rule":"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z","clip-rule":"evenodd"})],-1),Ti=[Ai],Ii={class:"bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},rn=Y({__name:"FilterColumn",props:{definitions:null,column:null,topLeft:null},emits:["done","save"],setup(d,{emit:t}){const v=d,p=I(),f=I(""),m=I(""),g=I([]),y=c(()=>1==v.column.meta.isEnum),h=c(()=>1==v.column.meta.isEnum?sn(es(v.column.type)):[]),b=c(()=>{var e;return(null==(e=l(v.column.type))?void 0:e.map(e=>({key:e.value,value:e.name})))||[]}),x=I({filters:[]}),k=c(()=>x.value.filters);function l(e){let t=v.definitions;return t=Wn(e)?t:t.filter(e=>"string"!==e.types)}function L(e,t){return l(e).find(e=>e.value===t)}function M(){var e;f.value&&(e=null==(e=L(v.column.type,f.value))?void 0:e.name)&&(x.value.filters.push({key:f.value,name:e,value:m.value}),f.value=m.value="")}function S(){t("done")}function T(){var e;f.value="%",null!=(e=p.value)&&e.focus()}function A(){var e;m.value&&M(),y.value&&(e=Object.values(g.value).filter(e=>e),x.value.filters=0<e.length?[{key:"%In",name:"In",value:e.join(",")}]:[]),t("save",x.value),t("done")}function j(e){x.value.sort=e===x.value.sort?void 0:e,ul(A)}return Sl(()=>x.value=Object.assign({},v.column.settings,{filters:Array.from(v.column.settings.filters)})),Sl(()=>{var e;return g.value=(null==(e=null==(e=null==(e=v.column.settings.filters)?void 0:e[0])?void 0:e.value)?void 0:e.split(","))||[]}),(e,t)=>{var l=U("SelectInput"),a=U("TextInput"),r=U("PrimaryButton"),i=U("SecondaryButton");return o(),u("div",{class:"fixed z-20 inset-0 overflow-y-auto",onClick:S,onVnodeMounted:T},[n("div",{class:"absolute",style:El(`top:${d.topLeft.y}px;left:${d.topLeft.x}px`),onClick:t[5]||(t[5]=je(()=>{},["stop"]))},[n("div",di,[n("div",ci,[fi,n("div",mi,[n("button",{type:"button",title:"Sort Ascending",onClick:t[0]||(t[0]=e=>j("ASC")),class:w(`${"ASC"===x.value.sort?"bg-indigo-100 border-indigo-500":"bg-white hover:bg-gray-50 border-gray-300"} mr-1 inline-flex items-center px-2.5 py-1.5 border shadow-sm text-sm font-medium rounded text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500`)},gi,2),n("button",{type:"button",title:"Sort Descending",onClick:t[1]||(t[1]=e=>j("DESC")),class:w(`${"DESC"===x.value.sort?"bg-indigo-100 border-indigo-500":"bg-white hover:bg-gray-50 border-gray-300"} ml-1 inline-flex items-center px-2.5 py-1.5 border shadow-sm text-sm font-medium rounded text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500`)},yi,2)]),bi,s(y)?(o(),u("div",wi,[(o(!0),u(be,null,$e(s(h),e=>(o(),u("div",{key:e.key,class:"flex items-center"},[gt(n("input",{type:"checkbox",id:e.key,value:e.key,"onUpdate:modelValue":t[2]||(t[2]=e=>g.value=e),class:"h-4 w-4 border-gray-300 rounded text-indigo-600 focus:ring-indigo-500"},null,8,xi),[[Hl,g.value]]),n("label",{for:e.key,class:"ml-3"},V(e.value),9,ki)]))),128))])):(o(),u("div",$i,[(o(!0),u(be,null,$e(s(k),(e,l)=>{return o(),u("div",Ci,[n("span",_i,[he(V(d.column.name)+" "+V(e.name)+" "+V((e=e,ss(L(v.column.type,e.key),v.column.type,e)))+" ",1),n("button",{type:"button",onClick:e=>{var t;t=l,x.value.filters.splice(t,1)},class:"flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:outline-none focus:bg-indigo-500 focus:text-white"},Mi,8,Li)])])}),256)),n("div",Si,[fe(l,{id:"filterRule",class:"w-32 mr-1",modelValue:f.value,"onUpdate:modelValue":t[3]||(t[3]=e=>f.value=e),entries:s(b),label:"",placeholder:""},null,8,["modelValue","entries"]),"none"!==(null==(l=L(d.column.type,f.value))?void 0:l.valueType)?(o(),X(a,{key:0,ref_key:"txtFilter",ref:p,id:"filterValue",class:"w-32 mr-1",type:"text",modelValue:m.value,"onUpdate:modelValue":t[4]||(t[4]=e=>m.value=e),onKeyup:Es(M,["enter"]),label:"",placeholder:""},null,8,["modelValue","onKeyup"])):C("",!0),n("div",{class:"pt-1"},[n("button",{type:"button",onClick:M,class:"inline-flex items-center p-1 border border-transparent rounded-full shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"},Ti)])])]))]),n("div",Ii,[fe(r,{onClick:A,color:"red",class:"ml-2"},{default:ve(()=>[he(" Save ")]),_:1}),fe(i,{onClick:S},{default:ve(()=>[he(" Cancel ")]),_:1})])])],4)],512)}}}),Fi={class:"px-4 sm:px-6 lg:px-8 text-sm"},Pi={class:"flex flex-wrap"},Di={class:"group pr-4 sm:pr-6 lg:pr-8"},Oi={class:"flex justify-between w-full font-medium"},ji={class:"w-6 flex justify-end"},Bi={class:"hidden group-hover:inline"},Ri=["onClick","title"],Ei=n("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[n("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),Hi=[Ei],Ni={key:0,class:"pt-2"},zi={class:"ml-2"},Ui={key:1},qi={class:"pt-2"},Qi={class:"inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 text-indigo-700"},Ki=["onClick"],Gi=n("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[n("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),Wi=[Gi],Zi=n("span",null,"Clear All",-1),Ji=[Zi],un=Y({__name:"FilterViews",props:{definitions:null,columns:null},emits:["done","change"],setup(e,{emit:r}){const l=e,a=c(()=>l.columns.filter(e=>0<e.settings.filters.length));function i(e,t){return function(e){let t=l.definitions;return t=Wn(e)?t:t.filter(e=>"string"!==e.types)}(e).find(e=>e.value===t)}function d(){l.columns.forEach(e=>{e.settings.filters=[],r("change",e)}),r("done")}return(e,t)=>(o(),u("div",Fi,[n("div",Pi,[(o(!0),u(be,null,$e(s(a),a=>{return o(),u("fieldset",Di,[n("legend",Oi,[n("span",null,V(s(Ie)(a.name)),1),n("span",ji,[n("span",Bi,[n("button",{onClick:e=>{var t;(t=a).settings.filters=[],r("change",t)},title:`Clear all ${s(Ie)(a.name)} filters`,class:"flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-red-600 hover:bg-red-200 hover:text-red-500 focus:outline-none focus:bg-red-500 focus:text-white"},Hi,8,Ri)])])]),a.meta.isEnum?(o(),u("div",Ni,[(o(!0),u(be,null,$e(null==(e=null==(e=null==(e=a.settings.filters)?void 0:e[0])?void 0:e.value)?void 0:e.split(","),e=>(o(),u("div",{key:e,class:"flex items-center"},[n("label",zi,V(e),1)]))),128))])):(o(),u("div",Ui,[(o(!0),u(be,null,$e(a.settings.filters,(e,l)=>{return o(),u("div",qi,[n("span",Qi,[he(V(a.name)+" "+V(e.name)+" "+V((e=e,ss(i((t=a).type,e.value),t.type,e)))+" ",1),n("button",{type:"button",onClick:e=>{var t;(t=a).settings.filters.splice(l,1),r("change",t)},class:"flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:outline-none focus:bg-indigo-500 focus:text-white"},Wi,8,Ki)])]);var t}),256))]))]);var e}),256))]),n("div",{class:"flex justify-center pt-4"},[n("button",{type:"button",onClick:d,class:"inline-flex items-center px-2.5 py-1.5 border border-gray-300 shadow-sm text-sm font-medium rounded text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"},Ji)])]))}}),Xi={class:"bg-white dark:bg-black px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Yi={class:""},er={class:"mt-3 text-center sm:mt-0 sm:mx-4 sm:text-left"},tr=n("h3",{class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-100"},"Query Preferences",-1),lr={class:"mt-4"},nr=["for"],sr=["id"],ar=["value","selected"],or={class:"mt-4 flex items-center py-4 border-b border-gray-200 dark:border-gray-800"},ir=["id","checked"],rr=["for"],ur={class:"mt-4"},dr={class:"pb-2 px-4"},cr={class:""},fr=["id","value"],mr=["for"],vr={class:"bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},dn=Y({__name:"QueryPrefs",props:{id:{default:"QueryPrefs"},columns:null,prefs:null,maxLimit:null},emits:["done","save"],setup(r,{emit:e}){const i=r,t=wt()["autoQueryGridDefaults"],d=I({}),c=(Sl(()=>d.value=Object.assign({take:t.value.take,selectedColumns:[]},i.prefs)),[10,25,50,100,250,500,1e3]);function v(){e("done")}function p(){e("save",d.value)}return(e,t)=>{const l=U("PrimaryButton"),a=U("SecondaryButton"),s=U("ModalDialog");return o(),X(s,{id:r.id,onDone:v,"size-class":"w-full sm:max-w-prose"},{default:ve(()=>[n("div",Xi,[n("div",Yi,[n("div",er,[tr,n("div",lr,[n("label",{for:r.id+"-take",class:"block text-sm font-medium text-gray-700 dark:text-gray-300"},"Results per page",8,nr),gt(n("select",{id:r.id+"-take","onUpdate:modelValue":t[0]||(t[0]=e=>d.value.take=e),class:"mt-1 block w-full pl-3 pr-10 py-2 text-base bg-white dark:bg-black border-gray-300 dark:border-gray-700 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md"},[(o(!0),u(be,null,$e(c.filter(e=>null==i.maxLimit||e<=i.maxLimit),e=>(o(),u("option",{value:e,selected:e===d.value.take},V(e),9,ar))),256))],8,sr),[[Hs,d.value.take]])]),n("div",or,[n("input",{type:"radio",id:r.id+"-allColumns",onClick:t[1]||(t[1]=e=>d.value.selectedColumns=[]),checked:0===d.value.selectedColumns.length,class:"focus:ring-indigo-500 h-4 w-4 bg-white dark:bg-black text-indigo-600 dark:text-indigo-400 border-gray-300 dark:border-gray-700"},null,8,ir),n("label",{class:"ml-3 block text-gray-700 dark:text-gray-300",for:r.id+"-allColumns"},"View all columns",8,rr)]),n("div",ur,[n("div",dr,[n("div",cr,[(o(!0),u(be,null,$e(r.columns,e=>(o(),u("div",{key:e.name,class:"flex items-center"},[gt(n("input",{type:"checkbox",id:e.name,value:e.name,"onUpdate:modelValue":t[2]||(t[2]=e=>d.value.selectedColumns=e),class:"h-4 w-4 bg-white dark:bg-black border-gray-300 dark:border-gray-700 rounded text-indigo-600 dark:text-indigo-400 focus:ring-indigo-500"},null,8,fr),[[Hl,d.value.selectedColumns]]),n("label",{for:e.name,class:"ml-3"},V(e.name),9,mr)]))),128))])])])])])]),n("div",vr,[fe(l,{onClick:p,color:"red",class:"ml-2"},{default:ve(()=>[he(" Save ")]),_:1}),fe(a,{onClick:v},{default:ve(()=>[he(" Cancel ")]),_:1})])]),_:1},8,["id"])}}}),hr={key:0},gr={key:1},pr={key:2,class:"pt-1"},yr={key:0},br={key:1},wr={key:3},xr={class:"pl-1 pt-1 flex flex-wrap"},kr={class:"flex mt-1"},$r=["title"],Cr=n("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[n("g",{"stroke-width":"1.5",fill:"none"},[n("path",{d:"M9 3H3.6a.6.6 0 0 0-.6.6v16.8a.6.6 0 0 0 .6.6H9M9 3v18M9 3h6M9 21h6m0-18h5.4a.6.6 0 0 1 .6.6v16.8a.6.6 0 0 1-.6.6H15m0-18v18",stroke:"currentColor"})])],-1),_r=[Cr],Lr=["disabled"],Vr=n("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[n("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z",fill:"currentColor"})],-1),Mr=[Vr],Sr=["disabled"],Ar=n("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[n("path",{d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z",fill:"currentColor"})],-1),Tr=[Ar],Ir=["disabled"],Fr=n("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[n("path",{d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z",fill:"currentColor"})],-1),Pr=[Fr],Dr=["disabled"],Or=n("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[n("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z",fill:"currentColor"})],-1),jr=[Or],Br={key:0,class:"flex mt-1"},Rr={class:"px-4 text-lg text-black dark:text-white"},Er={key:0},Hr={key:1},Nr=n("span",{class:"hidden xl:inline"}," Showing Results ",-1),zr={key:2},Ur={class:"flex flex-wrap"},qr={key:0,class:"pl-2 mt-1"},Qr=n("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[n("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 20v-5h-5M4 4v5h5m10.938 2A8.001 8.001 0 0 0 5.07 8m-1.008 5a8.001 8.001 0 0 0 14.868 3"})],-1),Kr=[Qr],Gr={key:1,class:"pl-2 mt-1"},Wr=dl('<svg class="w-5 h-5 mr-1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M28.781 4.405h-10.13V2.018L2 4.588v22.527l16.651 2.868v-3.538h10.13A1.162 1.162 0 0 0 30 25.349V5.5a1.162 1.162 0 0 0-1.219-1.095zm.16 21.126H18.617l-.017-1.889h2.487v-2.2h-2.506l-.012-1.3h2.518v-2.2H18.55l-.012-1.3h2.549v-2.2H18.53v-1.3h2.557v-2.2H18.53v-1.3h2.557v-2.2H18.53v-2h10.411z" fill="#20744a" fill-rule="evenodd"></path><path fill="#20744a" d="M22.487 7.439h4.323v2.2h-4.323z"></path><path fill="#20744a" d="M22.487 10.94h4.323v2.2h-4.323z"></path><path fill="#20744a" d="M22.487 14.441h4.323v2.2h-4.323z"></path><path fill="#20744a" d="M22.487 17.942h4.323v2.2h-4.323z"></path><path fill="#20744a" d="M22.487 21.443h4.323v2.2h-4.323z"></path><path fill="#fff" fill-rule="evenodd" d="M6.347 10.673l2.146-.123l1.349 3.709l1.594-3.862l2.146-.123l-2.606 5.266l2.606 5.279l-2.269-.153l-1.532-4.024l-1.533 3.871l-2.085-.184l2.422-4.663l-2.238-4.993z"></path></svg><span class="text-green-900 dark:text-green-100">Excel</span>',2),Zr=[Wr],Jr={key:2,class:"pl-2 mt-1"},Xr={key:0,class:"w-5 h-5 mr-1 text-green-600 dark:text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Yr=n("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1),eu=[Yr],tu={key:1,class:"w-5 h-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},lu=n("g",{fill:"none"},[n("path",{d:"M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),nu=[lu],su=n("span",{class:"whitespace-nowrap"},"Copy URL",-1),au={key:3,class:"pl-2 mt-1"},ou=n("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24"},[n("path",{fill:"currentColor",d:"M6.78 2.72a.75.75 0 0 1 0 1.06L4.56 6h8.69a7.75 7.75 0 1 1-7.75 7.75a.75.75 0 0 1 1.5 0a6.25 6.25 0 1 0 6.25-6.25H4.56l2.22 2.22a.75.75 0 1 1-1.06 1.06l-3.5-3.5a.75.75 0 0 1 0-1.06l3.5-3.5a.75.75 0 0 1 1.06 0Z"})],-1),iu=[ou],ru={key:4,class:"pl-2 mt-1"},uu=n("svg",{class:"flex-none w-5 h-5 mr-2 text-gray-400 dark:text-gray-500 group-hover:text-gray-500","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[n("path",{"fill-rule":"evenodd",d:"M3 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z","clip-rule":"evenodd"})],-1),du={class:"mr-1"},cu={key:0,class:"h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},fu=n("path",{"fill-rule":"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z","clip-rule":"evenodd"},null,-1),mu=[fu],vu={key:1,class:"h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},hu=n("path",{"fill-rule":"evenodd",d:"M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z","clip-rule":"evenodd"},null,-1),gu=[hu],pu={key:5,class:"pl-2 mt-1"},yu=["title"],bu=n("svg",{class:"w-5 h-5 mr-1 text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-50",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[n("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z",fill:"currentColor"})],-1),wu={class:"whitespace-nowrap"},xu={key:7},ku={key:0,class:"cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50"},$u={class:"mr-1 select-none"},Cu={key:1,class:"flex justify-between items-center"},_u={class:"mr-1 select-none"},Lu=Y({__name:"AutoQueryGrid",props:{filterDefinitions:null,id:{default:"AutoQueryGrid"},apis:null,type:null,prefs:null,deny:null,hide:null,selectedColumns:null,toolbarButtonClass:null,tableStyle:null,gridClass:null,grid2Class:null,grid3Class:null,grid4Class:null,tableClass:null,theadClass:null,tbodyClass:null,theadRowClass:null,theadCellClass:null,headerTitle:null,headerTitles:null,visibleFrom:null,rowClass:null,rowStyle:null,apiPrefs:null,canFilter:null,disableKeyBindings:null,configureField:null,skip:{default:0},create:{type:Boolean},edit:null},emits:["headerSelected","rowSelected"],setup(f,{expose:t,emit:q}){const r=f,{config:K,autoQueryGridDefaults:G}=wt(),W=G,J=Oe("client"),l=K.value.storage,i=(t({update:_,search:Ee,createRequestArgs:_e,reset:mt,createDone:Y,createSave:ft,editDone:Q,editSave:pt}),e=>"string"==typeof e?e.split(","):e||[]);function e(e,t){const l=i(t);return e.reduce((e,t)=>(e[t]=!l.includes(t),e),{})}const ee="filtering,queryString,queryFilters".split(","),te="copyApiUrl,downloadCsv,filtersView,newItem,pagingInfo,pagingNav,preferences,refresh,resetPreferences,toolbar".split(","),le=c(()=>r.deny?e(ee,r.deny):e(ee,W.value.deny)),ae=c(()=>r.hide?e(te,r.hide):e(te,W.value.hide));function m(e){return le.value[e]}function g(e){return ae.value[e]}const y=c(()=>r.tableStyle??W.value.tableStyle),ne=c(()=>r.gridClass??oe.getGridClass(y.value)),se=c(()=>r.grid2Class??oe.getGrid2Class(y.value)),re=c(()=>r.grid3Class??oe.getGrid3Class(y.value)),ie=c(()=>r.grid4Class??oe.getGrid4Class(y.value)),ue=c(()=>r.tableClass??oe.getTableClass(y.value)),de=c(()=>r.theadClass??oe.getTheadClass(y.value)),pe=c(()=>r.theadRowClass??oe.getTheadRowClass(y.value)),me=c(()=>r.theadCellClass??oe.getTheadCellClass(y.value)),h=c(()=>r.toolbarButtonClass??oe.toolbarButtonClass);function ge(e,t){var l,a;return r.rowClass?r.rowClass(e,t):(l=!!R.value.AnyUpdate,a=(null!=(a=d.value)&&a.name?ce(e,d.value.name):null)==T.value,oe.getTableRowClass(r.tableStyle,t,a,l))}const b=Nl(),ye=c(()=>{var e;return et((null==(e=R.value.AnyQuery.viewModel)?void 0:e.name)||R.value.AnyQuery.dataModel.name)}),be=c(()=>{const t=Object.keys(b).map(e=>e.toLowerCase());return Ke(ye.value).filter(e=>t.includes(e.name.toLowerCase())||t.includes(e.name.toLowerCase()+"-header")).map(e=>e.name)});const x=c(()=>{var e=(0<(e=i(r.selectedColumns)).length?e:0<be.value.length?be.value:[]).map(e=>e.toLowerCase());const l=Ke(ye.value);return 0<e.length?e.map(t=>l.find(e=>e.name.toLowerCase()===t)).filter(e=>null!=e):l}),we=c(()=>{let e=x.value.map(e=>e.name),t=i(B.value.selectedColumns).map(e=>e.toLowerCase());return 0<t.length?e.filter(e=>t.includes(e.toLowerCase())):e}),k=I([]),L=I(new Ze),xe=I(new Ze),M=I(),S=I(!1),T=I(),A=I(),j=I(!1),O=I(),$=I(r.skip),D=I(!1),a=25,B=I({take:a}),F=I(!1),ke=c(()=>k.value.some(e=>0<e.settings.filters.length||!!e.settings.sort)||B.value.selectedColumns),Ce=c(()=>k.value.map(e=>e.settings.filters.length).reduce((e,t)=>e+t,0)),Ve=c(()=>{var e;return Ke(et(p.value||(null==(e=R.value.AnyQuery)?void 0:e.dataModel.name)))}),d=c(()=>{var e;return Kt(et(p.value||(null==(e=R.value.AnyQuery)?void 0:e.dataModel.name)))}),H=c(()=>B.value.take??a),z=c(()=>L.value.response?ce(L.value.response,"results"):[]),P=c(()=>{var e;return(null==(e=L.value.response)?void 0:e.total)??z.value.length??0}),Le=c(()=>0<$.value),Ie=c(()=>0<$.value),Me=c(()=>z.value.length>=H.value),Se=c(()=>z.value.length>=H.value),Te={NoQuery:"No Query API was found"};function Ae(t){if(t){if(r.canFilter)return r.canFilter(t);var e=Ve.value.find(e=>e.name.toLowerCase()==t.toLowerCase());if(e)return!Zn(e)}}function v(e){m("queryString")&&ql(e)}async function E(e){$.value+=e,$.value<0&&($.value=0);e=Math.floor(P.value/H.value)*H.value;$.value>e&&($.value=e),v({skip:$.value||void 0}),await _()}async function je(e,t){var l,a;A.value=null,T.value=t,e&&t&&(a=Ht(R.value.AnyQuery,{[e]:t}),(a=await J.api(a)).succeeded)&&((a=null==(a=ce(a.response,"results"))?void 0:a[0])||console.warn(`API ${null==(l=R.value.AnyQuery)?void 0:l.request.name}(${e}:${t}) returned no results`),A.value=a)}async function De(e,t){q("rowSelected",e,t);t=null==(t=d.value)?void 0:t.name,e=t?ce(e,t):null;t&&e&&(v({edit:e}),je(t,e))}function Be(t,e){var l,a,n;m("filtering")&&(l=e.target,Ae(t)&&"TD"!==(null==l?void 0:l.tagName)&&(l=null==(l=null==l?void 0:l.closest("TABLE"))?void 0:l.getBoundingClientRect(),a=k.value.find(e=>e.name.toLowerCase()==t.toLowerCase()))&&l&&(n=l.x+318+10,O.value={column:a,topLeft:{x:Math.max(Math.floor(e.clientX+159),n),y:l.y+45}}),q("headerSelected",t,e))}function Ue(){O.value=null}async function Fe(e){var t=null==(t=O.value)?void 0:t.column;t&&(t.settings=e,l.setItem(Ge(t.name),JSON.stringify(t.settings)),await _()),O.value=null}async function He(e){l.setItem(Ge(e.name),JSON.stringify(e.settings)),await _()}async function ze(e){j.value=!1,B.value=e,l.setItem(Xe(),JSON.stringify(e)),await _()}async function _(){await Ee(_e())}async function Pe(){await _()}async function Ee(a){var n=R.value.AnyQuery;if(n){let e=Ht(n,a),t=Fn(e=>{L.value.response=L.value.error=void 0,F.value=e}),l=await J.api(e);t(),ul(()=>L.value=l);n=ce(l.response,"results")||[];l.succeeded&&n.label}else console.error(Te.NoQuery)}function _e(){let a={include:"total",take:H.value},t=i(B.value.selectedColumns||r.selectedColumns);if(0<t.length){var l=d.value;l&&t.includes(l.name)&&(t=[l.name,...t]);const n=Ve.value,s=[];t.forEach(t=>{var e,l=n.find(e=>e.name.toLowerCase()==t.toLowerCase());null!=(e=null==l?void 0:l.ref)&&e.selfId&&s.push(l.ref.selfId),ce(b,t)&&s.push(...n.filter(e=>{return(null==(e=null==(e=e.ref)?void 0:e.selfId)?void 0:e.toLowerCase())==t.toLowerCase()}).map(e=>e.name))}),s.forEach(e=>{t.includes(e)||t.push(e)}),a.fields=t.join(",")}let e=[];if(k.value.forEach(l=>{l.settings.sort&&e.push(("DESC"===l.settings.sort?"-":"")+l.name),l.settings.filters.forEach(e=>{var t=e.key.replace("%",l.name);a[t]=e.value})}),m("queryString")&&m("queryFilters")){let e=Tl(location.search);Object.keys(e).forEach(t=>{x.value.find(e=>e.name===t)&&(a[t]=e[t])}),typeof e.skip<"u"&&(l=parseInt(e.skip),isNaN(l)||($.value=a.skip=l))}return"u"<typeof a.skip&&0<$.value&&(a.skip=$.value),0<e.length&&(a.orderBy=e.join(",")),a}function Ne(){var e=Qe("csv");Pl(e),typeof window<"u"&&window.open(e)}function Re(){Pl(Qe("json")),D.value=!0,setTimeout(()=>D.value=!1,3e3)}function Qe(e="json"){var t=_e(),l="/api/"+(null==(l=R.value.AnyQuery)?void 0:l.request.name),l=Ys(J.baseUrl,Rt(l,{...t,jsconfig:"edv"}));return 0<=l.indexOf("?")?cl(l,"?")+"."+e+"?"+ea(l,"?"):l+".json"}async function Ye(){k.value.forEach(e=>{e.settings={filters:[]},l.removeItem(Ge(e.name))}),B.value={take:a},l.removeItem(Xe()),await _()}function qe(){S.value=!0,v({create:null})}const p=c(()=>Tt(r.type)),N=c(()=>{var e;return p.value||(null==(e=R.value.AnyQuery)?void 0:e.dataModel.name)}),Xe=()=>{var e;return r.id+"/ApiPrefs/"+(p.value||(null==(e=R.value.AnyQuery)?void 0:e.dataModel.name))},Ge=e=>{var t;return`Column/${r.id}:${p.value||(null==(t=R.value.AnyQuery)?void 0:t.dataModel.name)}.`+e},{metadataApi:We,typeOf:et,apiOf:tt,filterDefinitions:at}=Je(),nt=on()["invalidAccessMessage"],st=c(()=>r.filterDefinitions||at.value),R=c(()=>{var e=i(r.apis);return 0<e.length?Mt.from(e.map(e=>tt(e)).filter(e=>null!=e).map(e=>e)):Mt.forType(p.value,We.value)}),rt=e=>`<span class="text-yellow-700">${e}</span>`,ot=c(()=>{var e;return We.value?0<(e=i(r.apis).map(e=>null==tt(e)?e:null).filter(e=>null!=e)).length?rt(`Unknown API${1<e.length?"s":""}: `+e.join(", ")):(e=R.value).empty?rt("Mising DataModel in property 'type' or AutoQuery APIs to use in property 'apis'"):e.AnyQuery?null:rt(Te.NoQuery):rt(`AppMetadata not loaded, see <a class="${rl.blue}" href="https://docs.servicestack.net/vue/use-metadata" target="_blank">useMetadata()</a>`)}),it=c(()=>R.value.AnyQuery&&nt(R.value.AnyQuery)),ut=c(()=>R.value.Create&&nt(R.value.Create)),dt=c(()=>R.value.AnyUpdate&&nt(R.value.AnyUpdate)),ct=c(()=>sl(R.value.Create)),vt=(c(()=>sl(R.value.AnyUpdate)),c(()=>sl(R.value.Delete)));function Q(){A.value=null,T.value=null,v({edit:void 0})}function Y(){S.value=!1,v({create:void 0})}async function pt(){await _(),Q()}async function ft(){await _(),Y()}function mt(){L.value=new Ze,xe.value=new Ze,S.value=!1,T.value=null,A.value=null,j.value=!1,O.value=null,$.value=r.skip,D.value=!1,B.value={take:a},F.value=!1;var e,t=r.prefs||il(l.getItem(Xe())),t=(t&&(B.value=t),k.value=x.value.map(e=>({name:e.name,type:e.type,meta:e,settings:Object.assign({filters:[]},il(l.getItem(Ge(e.name))))})),isNaN(r.skip)||($.value=r.skip),null==(t=d.value)?void 0:t.name);m("queryString")&&(typeof(e=Tl(location.search)).create<"u"?S.value=typeof e.create<"u":!t||"string"!=typeof e.edit&&"number"!=typeof e.edit||je(t,e.edit)),!0===r.create&&(S.value=!0),t&&null!=r.edit&&je(t,r.edit)}return lt(async()=>{mt(),await _()}),(l,e)=>{const t=U("Alert"),a=U("EnsureAccessDialog"),r=U("AutoCreateForm"),i=U("AutoEditForm"),d=U("ErrorSummary"),c=U("Loading"),v=U("SettingsIcons"),p=U("DataGrid");return s(ot)?(o(),u("div",hr,[fe(t,{innerHTML:s(ot)},null,8,["innerHTML"])])):s(it)?(o(),u("div",gr,[fe(rs,{"invalid-access":s(it)},null,8,["invalid-access"])])):(o(),u("div",pr,[S.value&&s(R).Create?(o(),u("div",yr,[s(ut)?(o(),X(a,{key:0,title:"Create "+s(N),"invalid-access":s(ut),"alert-class":"text-yellow-700",onDone:Y},null,8,["title","invalid-access"])):s(b).createform?Z(l.$slots,"createform",{key:1,type:s(R).Create.request.name,configure:f.configureField,done:Y,save:ft}):(o(),X(r,{key:2,type:s(R).Create.request.name,configure:f.configureField,onDone:Y,onSave:ft},{header:ve(()=>[Z(l.$slots,"formheader",{form:"create",apis:s(R),type:s(N)})]),footer:ve(()=>[Z(l.$slots,"formfooter",{form:"create",apis:s(R),type:s(N)})]),_:3},8,["type","configure"]))])):A.value&&s(R).AnyUpdate?(o(),u("div",br,[s(dt)?(o(),X(a,{key:0,title:"Update "+s(N),"invalid-access":s(dt),"alert-class":"text-yellow-700",onDone:Q},null,8,["title","invalid-access"])):s(b).editform?Z(l.$slots,"editform",{key:1,model:A.value,type:s(R).AnyUpdate.request.name,deleteType:s(vt)?s(R).Delete.request.name:null,configure:f.configureField,done:Q,save:pt}):(o(),X(i,{key:2,modelValue:A.value,"onUpdate:modelValue":e[0]||(e[0]=e=>A.value=e),type:s(R).AnyUpdate.request.name,deleteType:s(vt)?s(R).Delete.request.name:null,configure:f.configureField,onDone:Q,onSave:pt,onDelete:pt},{header:ve(()=>[Z(l.$slots,"formheader",{form:"edit",apis:s(R),type:s(N),model:A.value,id:T.value})]),footer:ve(()=>[Z(l.$slots,"formfooter",{form:"edit",apis:s(R),type:s(N),model:A.value,id:T.value})]),_:3},8,["modelValue","type","deleteType","configure"]))])):C("",!0),s(b).toolbar?Z(l.$slots,"toolbar",{key:2}):g("toolbar")?(o(),u("div",wr,[j.value?(o(),X(dn,{key:0,columns:s(x),prefs:B.value,onDone:e[1]||(e[1]=e=>j.value=!1),onSave:ze},null,8,["columns","prefs"])):C("",!0),n("div",xr,[n("div",kr,[g("preferences")?(o(),u("button",{key:0,type:"button",class:"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400",title:s(N)+" Preferences",onClick:e[2]||(e[2]=e=>j.value=!j.value)},_r,8,$r)):C("",!0),g("pagingNav")?(o(),u("button",{key:1,type:"button",class:w(["pl-2",s(Le)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"First page",disabled:!s(Le),onClick:e[3]||(e[3]=e=>E(-s(P)))},Mr,10,Lr)):C("",!0),g("pagingNav")?(o(),u("button",{key:2,type:"button",class:w(["pl-2",s(Ie)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Previous page",disabled:!s(Ie),onClick:e[4]||(e[4]=e=>E(-s(H)))},Tr,10,Sr)):C("",!0),g("pagingNav")?(o(),u("button",{key:3,type:"button",class:w(["pl-2",s(Me)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Next page",disabled:!s(Me),onClick:e[5]||(e[5]=e=>E(s(H)))},Pr,10,Ir)):C("",!0),g("pagingNav")?(o(),u("button",{key:4,type:"button",class:w(["pl-2",s(Se)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Last page",disabled:!s(Se),onClick:e[6]||(e[6]=e=>E(s(P)))},jr,10,Dr)):C("",!0)]),g("pagingInfo")?(o(),u("div",Br,[n("div",Rr,[F.value?(o(),u("span",Er,"Querying...")):C("",!0),s(z).length?(o(),u("span",Hr,[Nr,he(" "+V($.value+1)+" - "+V(Math.min($.value+s(z).length,s(P)))+" ",1),n("span",null," of "+V(s(P)),1)])):L.value.completed?(o(),u("span",zr,"No Results")):C("",!0)])])):C("",!0),n("div",Ur,[g("refresh")?(o(),u("div",qr,[n("button",{type:"button",onClick:Pe,title:"Refresh",class:w(s(h))},Kr,2)])):C("",!0),g("downloadCsv")?(o(),u("div",Gr,[n("button",{type:"button",onClick:Ne,title:"Download CSV",class:w(s(h))},Zr,2)])):C("",!0),g("copyApiUrl")?(o(),u("div",Jr,[n("button",{type:"button",onClick:Re,title:"Copy API URL",class:w(s(h))},[D.value?(o(),u("svg",Xr,eu)):(o(),u("svg",tu,nu)),su],2)])):C("",!0),s(ke)&&g("resetPreferences")?(o(),u("div",au,[n("button",{type:"button",onClick:Ye,title:"Reset Preferences & Filters",class:w(s(h))},iu,2)])):C("",!0),g("filtersView")&&0<s(Ce)?(o(),u("div",ru,[n("button",{type:"button",onClick:e[7]||(e[7]=e=>M.value="filters"==M.value?null:"filters"),class:w(s(h)),"aria-expanded":"false"},[uu,n("span",du,V(s(Ce))+" "+V(1==s(Ce)?"Filter":"Filters"),1),"filters"!=M.value?(o(),u("svg",cu,mu)):(o(),u("svg",vu,gu))],2)])):C("",!0),g("newItem")&&s(R).Create&&s(ct)?(o(),u("div",pu,[n("button",{type:"button",onClick:qe,title:s(N),class:w(s(h))},[bu,n("span",wu,"New "+V(s(N)),1)],10,yu)])):C("",!0),s(b).toolbarbuttons?Z(l.$slots,"toolbarbuttons",{key:6,toolbarButtonClass:s(h)}):C("",!0)])])])):C("",!0),"filters"==M.value?(o(),X(un,{key:4,class:"border-y border-gray-200 dark:border-gray-800 py-8 my-2",definitions:s(st),columns:k.value,onDone:e[8]||(e[8]=e=>M.value=null),onChange:He},null,8,["definitions","columns"])):C("",!0),xe.value.error??L.value.error?(o(),X(d,{key:5,status:xe.value.error??L.value.error},null,8,["status"])):F.value?(o(),X(c,{key:6,class:"p-2"})):C("",!0),O.value?(o(),u("div",xu,[fe(rn,{definitions:s(st),column:O.value.column,"top-left":O.value.topLeft,onDone:Ue,onSave:Fe},null,8,["definitions","column","top-left"])])):C("",!0),s(z).length?(o(),X(p,{key:8,id:f.id,items:s(z),type:f.type,"selected-columns":s(we),class:"mt-1",onFiltersChanged:_,tableStyle:s(y),gridClass:s(ne),grid2Class:s(se),grid3Class:s(re),grid4Class:s(ie),tableClass:s(ue),theadClass:s(de),theadRowClass:s(pe),theadCellClass:s(me),tbodyClass:f.tbodyClass,rowClass:ge,onRowSelected:De,rowStyle:f.rowStyle,headerTitle:f.headerTitle,headerTitles:f.headerTitles,visibleFrom:f.visibleFrom,onHeaderSelected:Be},zl({header:ve(({column:t,label:e})=>{var l;return[m("filtering")&&Ae(t)?(o(),u("div",ku,[n("span",$u,V(e),1),fe(v,{column:k.value.find(e=>e.name.toLowerCase()===t.toLowerCase()),"is-open":(null==(l=O.value)?void 0:l.column.name)===t},null,8,["column","is-open"])])):(o(),u("div",Cu,[n("span",_u,V(e),1)]))]}),_:2},[$e(Object.keys(s(b)),t=>({name:t,fn:ve(e=>[Z(l.$slots,t,_t(al(e)))])}))]),1032,["id","items","type","selected-columns","tableStyle","gridClass","grid2Class","grid3Class","grid4Class","tableClass","theadClass","theadRowClass","theadCellClass","tbodyClass","rowStyle","headerTitle","headerTitles","visibleFrom"])):C("",!0)]))}}}),Vu={class:"flex"},Mu={key:0,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Su=n("g",{fill:"none"},[n("path",{d:"M3 4a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v2.586a1 1 0 0 1-.293.707l-6.414 6.414a1 1 0 0 0-.293.707V17l-4 4v-6.586a1 1 0 0 0-.293-.707L3.293 7.293A1 1 0 0 1 3 6.586V4z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),Au=[Su],Tu=n("path",{d:"M505.5 658.7c3.2 4.4 9.7 4.4 12.9 0l178-246c3.8-5.3 0-12.7-6.5-12.7H643c-10.2 0-19.9 4.9-25.9 13.2L512 558.6L406.8 413.2c-6-8.3-15.6-13.2-25.9-13.2H334c-6.5 0-10.3 7.4-6.5 12.7l178 246z",fill:"currentColor"},null,-1),Iu=n("path",{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z",fill:"currentColor"},null,-1),Fu=[Tu,Iu],Pu={key:2,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Du=n("g",{fill:"none"},[n("path",{d:"M8.998 4.71L6.354 7.354a.5.5 0 1 1-.708-.707L9.115 3.18A.499.499 0 0 1 9.498 3H9.5a.5.5 0 0 1 .354.147l.01.01l3.49 3.49a.5.5 0 1 1-.707.707l-2.65-2.649V16.5a.5.5 0 0 1-1 0V4.71z",fill:"currentColor"})],-1),Ou=[Du],ju={key:3,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Bu=n("g",{fill:"none"},[n("path",{d:"M10.002 15.29l2.645-2.644a.5.5 0 0 1 .707.707L9.886 16.82a.5.5 0 0 1-.384.179h-.001a.5.5 0 0 1-.354-.147l-.01-.01l-3.49-3.49a.5.5 0 1 1 .707-.707l2.648 2.649V3.5a.5.5 0 0 1 1 0v11.79z",fill:"currentColor"})],-1),Ru=[Bu],Eu=Y({__name:"SettingsIcons",props:{column:null,isOpen:{type:Boolean}},setup(a){return(e,t)=>{var l;return o(),u("div",Vu,[null!=(l=null==(l=null==(l=a.column)?void 0:l.settings)?void 0:l.filters)&&l.length?(o(),u("svg",Mu,Au)):(o(),u("svg",{key:1,class:w(["w-4 h-4 transition-transform",a.isOpen?"rotate-180":""]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Fu,2)),"ASC"===(null==(l=null==(l=a.column)?void 0:l.settings)?void 0:l.sort)?(o(),u("svg",Pu,Ou)):"DESC"===(null==(l=null==(l=a.column)?void 0:l.settings)?void 0:l.sort)?(o(),u("svg",ju,Ru)):C("",!0)])}}}),Hu=Y({__name:"EnsureAccessDialog",props:{title:null,subtitle:null,invalidAccess:null,alertClass:null},emits:["done"],setup(n){return(t,e)=>{const l=U("EnsureAccess"),a=U("SlideOver");return n.invalidAccess?(o(),X(a,{key:0,title:n.title,onDone:e[0]||(e[0]=e=>t.$emit("done")),"content-class":"relative flex-1"},zl({default:ve(()=>[fe(l,{alertClass:n.alertClass,invalidAccess:n.invalidAccess},null,8,["alertClass","invalidAccess"])]),_:2},[n.subtitle?{name:"subtitle",fn:ve(()=>[he(V(n.subtitle),1)]),key:"0"}:void 0]),1032,["title"])):C("",!0)}}}),Nu=["for"],zu={class:"mt-1 relative rounded-md shadow-sm"},Uu=["type","name","id","placeholder","value","aria-invalid","aria-describedby"],qu={key:0,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},Qu=n("svg",{class:"h-5 w-5 text-red-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[n("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1),Ku=[Qu],Gu=["id"],Wu=["id"],Zu={inheritAttrs:!1},Ju=Y({...Zu,__name:"TextInput",props:{status:null,id:null,type:null,inputClass:null,label:null,labelClass:null,help:null,placeholder:null,modelValue:null},setup(l,{expose:e}){const t=l,a=(e({focus:function(){var e;null!=(e=a.value)&&e.focus()}}),I());const r=c(()=>t.type||"text"),i=c(()=>t.label??Ie(Ye(t.id))),d=c(()=>t.placeholder??i.value);let v=Oe("ApiState",void 0);const p=c(()=>dt.call({responseStatus:t.status??(null==v?void 0:v.error.value)},t.id)),f=c(()=>[ot.base,p.value?ot.invalid:ot.valid,t.inputClass]);return(t,e)=>(o(),u("div",{class:w([t.$attrs.class])},[s(i)?(o(),u("label",{key:0,for:l.id,class:w("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(l.labelClass??""))},V(s(i)),11,Nu)):C("",!0),n("div",zu,[n("input",Ce({ref_key:"txtInput",ref:a,type:s(r),name:l.id,id:l.id,class:s(f),placeholder:s(d),value:l.modelValue,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=s(p),"aria-describedby":l.id+"-error",step:"any"},s(nt)(t.$attrs,["class"])),null,16,Uu),s(p)?(o(),u("div",qu,Ku)):C("",!0)]),s(p)?(o(),u("p",{key:1,class:"mt-2 text-sm text-red-500",id:l.id+"-error"},V(s(p)),9,Gu)):l.help?(o(),u("p",{key:2,class:"mt-2 text-sm text-gray-500",id:l.id+"-description"},V(l.help),9,Wu)):C("",!0)],2))}}),Xu=["for"],Yu={class:"mt-1 relative rounded-md shadow-sm"},ed=["name","id","placeholder","aria-invalid","aria-describedby"],td=["id"],ld=["id"],nd={inheritAttrs:!1},sd=Y({...nd,__name:"TextareaInput",props:{status:null,id:null,inputClass:null,label:null,labelClass:null,help:null,placeholder:null,modelValue:null},setup(l){const e=l,a=c(()=>e.label??Ie(Ye(e.id))),r=c(()=>e.placeholder??a.value);let t=Oe("ApiState",void 0);const i=c(()=>dt.call({responseStatus:e.status??(null==t?void 0:t.error.value)},e.id)),d=c(()=>["shadow-sm "+ot.base,i.value?"text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300":"text-gray-900 "+ot.valid,e.inputClass]);return(t,e)=>(o(),u("div",{class:w([t.$attrs.class])},[s(a)?(o(),u("label",{key:0,for:l.id,class:w("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(l.labelClass??""))},V(s(a)),11,Xu)):C("",!0),n("div",Yu,[n("textarea",Ce({name:l.id,id:l.id,class:s(d),placeholder:s(r),onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=s(i),"aria-describedby":l.id+"-error"},s(nt)(t.$attrs,["class"])),V(l.modelValue),17,ed)]),s(i)?(o(),u("p",{key:1,class:"mt-2 text-sm text-red-500",id:l.id+"-error"},V(s(i)),9,td)):l.help?(o(),u("p",{key:2,class:"mt-2 text-sm text-gray-500",id:l.id+"-description"},V(l.help),9,ld)):C("",!0)],2))}}),ad=["for"],od=["id","name","value","aria-invalid","aria-describedby"],id=["value"],rd=["id"],ud={inheritAttrs:!1},dd=Y({...ud,__name:"SelectInput",props:{status:null,id:null,modelValue:null,inputClass:null,label:null,labelClass:null,options:null,values:null,entries:null},setup(l){const t=l,a=c(()=>t.label??Ie(Ye(t.id)));let e=Oe("ApiState",void 0);const r=c(()=>dt.call({responseStatus:t.status??(null==e?void 0:e.error.value)},t.id)),i=c(()=>t.entries||(t.values?t.values.map(e=>({key:e,value:e})):t.options?Object.keys(t.options).map(e=>({key:e,value:t.options[e]})):[]));return(t,e)=>(o(),u("div",{class:w([t.$attrs.class])},[s(a)?(o(),u("label",{key:0,for:l.id,class:w("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(l.labelClass??""))},V(s(a)),11,ad)):C("",!0),n("select",Ce({id:l.id,name:l.id,class:["mt-1 block w-full pl-3 pr-10 py-2 text-base focus:outline-none sm:text-sm rounded-md dark:text-white dark:bg-gray-900 dark:border-gray-600",s(r)?"border-red-300 text-red-900 focus:ring-red-500 focus:border-red-500":"border-gray-300 text-gray-900 focus:ring-indigo-500 focus:border-indigo-500",l.inputClass],value:l.modelValue,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=s(r),"aria-describedby":l.id+"-error"},s(nt)(t.$attrs,["class"])),[(o(!0),u(be,null,$e(s(i),e=>(o(),u("option",{value:e.key},V(e.value),9,id))),256))],16,od),s(r)?(o(),u("p",{key:1,class:"mt-2 text-sm text-red-500",id:l.id+"-error"},V(s(r)),9,rd)):C("",!0)],2))}}),cd={class:"flex items-center h-5"},fd=["id","name","checked"],md={class:"ml-3 text-sm"},vd=["for"],hd={key:0,class:"mt-2 text-sm text-red-500",id:"`${id}-error`"},gd={key:1,class:"mt-2 text-sm text-gray-500",id:"`${id}-description`"},pd={inheritAttrs:!1},yd=Y({...pd,__name:"CheckboxInput",props:{modelValue:{type:Boolean},status:null,id:null,inputClass:null,label:null,labelClass:null,help:null},emits:["update:modelValue"],setup(l,{}){const e=l,a=c(()=>e.label??Ie(Ye(e.id)));let t=Oe("ApiState",void 0);const r=c(()=>dt.call({responseStatus:e.status??(null==t?void 0:t.error.value)},e.id));return(t,e)=>(o(),u("div",{class:w(["relative flex items-start",t.$attrs.class])},[n("div",cd,[n("input",Ce({id:l.id,name:l.id,type:"checkbox",checked:l.modelValue,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.checked)),class:["focus:ring-indigo-500 h-4 w-4 text-indigo-600 rounded border-gray-300 dark:border-gray-600 dark:bg-gray-800",l.inputClass]},s(nt)(t.$attrs,["class"])),null,16,fd)]),n("div",md,[n("label",{for:l.id,class:w("font-medium text-gray-700 dark:text-gray-300 "+(l.labelClass??""))},V(s(a)),11,vd),s(r)?(o(),u("p",hd,V(s(r)),1)):l.help?(o(),u("p",gd,V(l.help),1)):C("",!0)])],2))}}),bd=["id"],wd=["for"],xd={class:"mt-1 relative rounded-md shadow-sm"},kd=["id","name","value"],$d=["onClick"],Cd={class:"flex flex-wrap pb-1.5"},_d={class:"pt-1.5 pl-1"},Ld={class:"inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 dark:bg-indigo-800 text-indigo-700 dark:text-indigo-300"},Vd=["onClick"],Md=n("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[n("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),Sd=[Md],Ad={class:"pt-1.5 pl-1 shrink"},Td=["type","name","id","aria-invalid","aria-describedby","onPaste"],Id=["id"],Fd=["onMouseover","onClick"],Pd={class:"block truncate"},Dd={key:1,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},Od=n("svg",{class:"h-5 w-5 text-red-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[n("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1),jd=[Od],Bd=["id"],Rd=["id"],Ed={inheritAttrs:!1},Hd=Y({...Ed,__name:"TagInput",props:{status:null,id:null,type:null,inputClass:null,label:null,labelClass:null,help:null,modelValue:{default:()=>[]},delimiters:{default:()=>[","]},allowableValues:null,string:{type:Boolean}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,r=c(()=>"string"==typeof a.modelValue?0==a.modelValue.trim().length?[]:a.modelValue.split(","):a.modelValue||[]),i=I(),d=I(!1),v=c(()=>a.allowableValues&&0!=a.allowableValues.length?a.allowableValues.filter(e=>!r.value.includes(e)&&e.toLowerCase().includes(f.value.toLowerCase())):[]);const p=I(null),f=I(""),m=c(()=>a.type||"text"),g=c(()=>a.label??Ie(Ye(a.id)));let e=Oe("ApiState",void 0);const y=c(()=>dt.call({responseStatus:a.status??(null==e?void 0:e.error.value)},a.id)),h=c(()=>["w-full cursor-text flex flex-wrap sm:text-sm rounded-md dark:text-white dark:bg-gray-900 border focus-within:border-transparent focus-within:ring-1 focus-within:outline-none",y.value?"pr-10 border-red-300 text-red-900 placeholder-red-300 focus-within:outline-none focus-within:ring-red-500 focus-within:border-red-500":"shadow-sm border-gray-300 dark:border-gray-600 focus-within:ring-indigo-500 focus-within:border-indigo-500",a.inputClass]),b=t=>S(r.value.filter(e=>e!=t));function x(e){document.activeElement===e.target&&null!=(e=p.value)&&e.focus()}const k=I();function L(){d.value=!0,k.value=!0}function M(){B(A()),k.value=!1,setTimeout(()=>{k.value||(d.value=!1)},200)}function S(e){e=a.string?e.join(","):e;t("update:modelValue",e)}function T(e){var t;"Backspace"==e.key&&0==f.value.length&&0<r.value.length&&b(r.value[r.value.length-1]),a.allowableValues&&0!=a.allowableValues.length&&("Escape"==e.code||"Tab"==e.code?d.value=!1:"Home"==e.code?(i.value=v.value[0],$()):"End"==e.code?(i.value=v.value[v.value.length-1],$()):"ArrowDown"==e.code?(d.value=!0,i.value?(t=v.value.indexOf(i.value),i.value=t+1<v.value.length?v.value[t+1]:v.value[0]):i.value=v.value[0],D()):"ArrowUp"==e.code?(i.value?(t=v.value.indexOf(i.value),i.value=0<=t-1?v.value[t-1]:v.value[v.value.length-1]):i.value=v.value[v.value.length-1],D()):"Enter"==e.code?i.value&&d.value?(B(i.value),e.preventDefault()):d.value=!1:d.value=0<v.value.length)}function A(){if(0==f.value.length)return"";let e=ta(f.value.trim(),",");return 0==(e=(e=","==e[0]?e.substring(1):e).trim()).length&&d.value&&0<v.value.length?i.value:e}function j(t){var e,l=A();0<l.length&&((e=a.delimiters.some(e=>e==t.key))&&t.preventDefault(),"Enter"==t.key||"NumpadEnter"==t.key||1==t.key.length&&e)&&B(l)}const O={behavior:"smooth",block:"nearest",inline:"nearest",scrollMode:"if-needed"};function $(){setTimeout(()=>{var e=ol(`#${a.id}-tag li.active`);e&&e.scrollIntoView(O)},0)}function D(){setTimeout(()=>{var e=ol(`#${a.id}-tag li.active`);e&&("scrollIntoViewIfNeeded"in e?e.scrollIntoViewIfNeeded(O):e.scrollIntoView(O))},0)}function B(e){var t;0!==e.length&&(-1==(t=Array.from(r.value)).indexOf(e)&&t.push(e),S(t),f.value="",d.value=!1)}function U(e){e=null==(e=e.clipboardData)?void 0:e.getData("Text");if(e){const t=new RegExp("\\n|\\t|"+a.delimiters.join("|")),l=Array.from(r.value);e.split(t).map(e=>e.trim()).forEach(e=>{-1==l.indexOf(e)&&l.push(e)}),S(l),f.value=""}}return(e,t)=>(o(),u("div",{class:w([e.$attrs.class]),id:l.id+"-tag",onmousemove:"cancelBlur=true"},[s(g)?(o(),u("label",{key:0,for:l.id,class:w("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(l.labelClass??""))},V(s(g)),11,wd)):C("",!0),n("div",xd,[n("input",{type:"hidden",id:l.id,name:l.id,value:s(r).join(",")},null,8,kd),n("button",{class:w(s(h)),onClick:je(x,["prevent"]),onFocus:t[2]||(t[2]=e=>d.value=!0),tabindex:"-1"},[n("div",Cd,[(o(!0),u(be,null,$e(s(r),t=>(o(),u("div",_d,[n("span",Ld,[he(V(t)+" ",1),n("button",{type:"button",onClick:e=>b(t),class:"flex-shrink-0 ml-1 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 dark:text-indigo-500 hover:bg-indigo-200 dark:hover:bg-indigo-800 hover:text-indigo-500 dark:hover:text-indigo-400 focus:outline-none focus:bg-indigo-500 focus:text-white dark:focus:text-black"},Sd,8,Vd)])]))),256)),n("div",Ad,[gt(n("input",Ce({ref_key:"txtInput",ref:p,type:s(m),role:"combobox","aria-controls":"options","aria-expanded":"false",autocomplete:"off",spellcheck:"false",name:l.id,id:l.id,class:"p-0 dark:bg-transparent rounded-md border-none focus:!border-none focus:!outline-none",style:`box-shadow:none !important;width:${f.value.length+1}ch`,"onUpdate:modelValue":t[0]||(t[0]=e=>f.value=e),"aria-invalid":null!=s(y),"aria-describedby":l.id+"-error",onKeydown:T,onKeypress:j,onPaste:je(U,["prevent","stop"]),onFocus:L,onBlur:M,onClick:t[1]||(t[1]=e=>d.value=!0)},s(nt)(e.$attrs,["class"])),null,16,Td),[[Ns,f.value]])])])],42,$d),d.value&&s(v).length?(o(),u("ul",{key:0,class:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white dark:bg-black py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",onKeydown:T,id:l.id+"-options",role:"listbox"},[(o(!0),u(be,null,$e(s(v),l=>(o(),u("li",{class:w([l===i.value?"active bg-indigo-600 text-white":"text-gray-900 dark:text-gray-100","relative cursor-default select-none py-2 pl-3 pr-9"]),onMouseover:e=>{var t;t=l,i.value=t},onClick:e=>B(l),role:"option",tabindex:"-1"},[n("span",Pd,V(l),1)],42,Fd))),256))],40,Id)):C("",!0),s(y)?(o(),u("div",Dd,jd)):C("",!0)]),s(y)?(o(),u("p",{key:1,class:"mt-2 text-sm text-red-500",id:l.id+"-error"},V(s(y)),9,Bd)):l.help?(o(),u("p",{key:2,class:"mt-2 text-sm text-gray-500",id:l.id+"-description"},V(l.help),9,Rd)):C("",!0)],10,bd))}}),Nd={class:"relative w-full"},zd=["for"],Ud={class:"block mt-2"},qd=n("span",{class:"sr-only"},"help ?? useLabel",-1),Qd=["multiple","name","id","placeholder","aria-invalid","aria-describedby"],Kd={key:0,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},Gd=n("svg",{class:"h-5 w-5 text-red-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[n("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1),Wd=[Gd],Zd=["id"],Jd=["id"],Xd={key:0},Yd=["title"],ec=["alt","src"],tc={key:1,class:"mt-3"},lc={class:"w-full"},nc={class:"pr-6 align-bottom pb-2"},sc=["title"],ac=["src","onError"],oc=["href"],ic={key:1,class:"overflow-hidden"},rc={class:"align-top pb-2 whitespace-nowrap"},uc={key:0,class:"text-gray-500 dark:text-gray-400 text-sm bg-white dark:bg-black"},dc=Y({__name:"FileInput",props:{multiple:{type:Boolean},status:null,id:null,inputClass:null,label:null,labelClass:null,help:null,placeholder:null,modelValue:null,values:null,files:null},setup(l){var e;const t=l,a=I(null),{assetsPathResolver:r,fallbackPathResolver:i}=wt(),d={},v=I(),p=I((null==(e=t.files)?void 0:e.map(f))||[]);function f(e){return e.filePath=r(e.filePath),e}t.values&&0<t.values.length&&(p.value=t.values.map(e=>{e=e.replace(/\\/g,"/");return{fileName:la(pt(e,"/"),"."),filePath:e,contentType:Ol(e)}}).map(f));const m=c(()=>t.label??Ie(Ye(t.id))),g=c(()=>t.placeholder??m.value);let y=Oe("ApiState",void 0);const h=c(()=>dt.call({responseStatus:t.status??(null==y?void 0:y.error.value)},t.id)),b=c(()=>["block w-full sm:text-sm rounded-md dark:text-white dark:bg-gray-900 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-violet-50 dark:file:bg-violet-900 file:text-violet-700 dark:file:text-violet-200 hover:file:bg-violet-100 dark:hover:file:bg-violet-800",h.value?"pr-10 border-red-300 text-red-900 placeholder-red-300 focus:outline-none focus:ring-red-500 focus:border-red-500":"text-slate-500 dark:text-slate-400",t.inputClass]),x=e=>{e=e.target;v.value="",p.value=Array.from(e.files||[]).map(e=>({fileName:e.name,filePath:Jl(e),contentLength:e.size,contentType:e.type||Ol(e.name)}))},k=()=>{var e;return null==(e=a.value)?void 0:e.click()},L=e=>null!=e&&(e.startsWith("data:")||e.startsWith("blob:")),M=c(()=>{var e;return 0<p.value.length?p.value[0].filePath:(e="string"==typeof t.modelValue?t.modelValue:t.values&&t.values[0])&&mt(r(e))||null}),S=e=>!e||e.startsWith("data:")||e.endsWith(".svg")?"":"rounded-full object-cover";function T(e){v.value=i(M.value)}return Ut(qn),(e,t)=>(o(),u("div",{class:w(["flex",l.multiple?"flex-col":"justify-between"])},[n("div",Nd,[s(m)?(o(),u("label",{key:0,for:l.id,class:w("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(l.labelClass??""))},V(s(m)),11,zd)):C("",!0),n("div",Ud,[qd,n("input",Ce({ref_key:"input",ref:a,type:"file",multiple:l.multiple,name:l.id,id:l.id,class:s(b),placeholder:s(g),"aria-invalid":null!=s(h),"aria-describedby":l.id+"-error"},e.$attrs,{onChange:x}),null,16,Qd),s(h)?(o(),u("div",Kd,Wd)):C("",!0)]),s(h)?(o(),u("p",{key:1,class:"mt-2 text-sm text-red-500",id:l.id+"-error"},V(s(h)),9,Zd)):l.help?(o(),u("p",{key:2,class:"mt-2 text-sm text-gray-500",id:l.id+"-description"},V(l.help),9,Jd)):C("",!0)]),l.multiple?(o(),u("div",tc,[n("table",lc,[(o(!0),u(be,null,$e(p.value,t=>(o(),u("tr",null,[n("td",nc,[n("div",{class:"flex w-full",title:L(t.filePath)?"":t.filePath},[n("img",{src:d[s(mt)(t.filePath)]||s(r)(s(mt)(t.filePath)),class:w(["mr-2 h-8 w-8",S(t.filePath)]),onError:e=>d[s(mt)(t.filePath)]=s(i)(s(mt)(t.filePath))},null,42,ac),L(t.filePath)?(o(),u("span",ic,V(t.fileName),1)):(o(),u("a",{key:0,href:s(r)(t.filePath||""),target:"_blank",class:"overflow-hidden"},V(t.fileName),9,oc))],8,sc)]),n("td",rc,[t.contentLength&&0<t.contentLength?(o(),u("span",uc,V(s(Yl)(t.contentLength)),1)):C("",!0)])]))),256))])])):(o(),u("div",Xd,[s(M)?(o(),u("div",{key:0,class:"shrink-0 cursor-pointer",title:L(s(M))?"":s(M)},[n("img",{onClick:k,class:w(["h-16 w-16",S(s(M))]),alt:"Current "+s(m),src:v.value||s(r)(s(M)),onError:T},null,42,ec)],8,Yd)):C("",!0)]))],2))}}),cc=["id"],fc=["for"],mc={class:"relative mt-1"},vc=["id","placeholder"],hc=n("svg",{class:"h-5 w-5 text-gray-400 dark:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[n("path",{"fill-rule":"evenodd",d:"M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z","clip-rule":"evenodd"})],-1),gc=[hc],pc=["id"],yc=["onMouseover","onClick"],bc=n("svg",{class:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[n("path",{"fill-rule":"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z","clip-rule":"evenodd"})],-1),wc=[bc],xc={key:2,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",tabindex:"-1"},kc=n("svg",{class:"h-5 w-5 text-red-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[n("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1),$c=[kc],Cc=["id"],_c=["id"],Lc=Y({__name:"Autocomplete",props:{status:null,id:null,type:null,label:null,help:null,placeholder:null,multiple:{type:Boolean,default:!1},options:{default:()=>[]},modelValue:null,match:null,viewCount:{default:100},pageSize:{default:8}},emits:["update:modelValue"],setup(l,{expose:e,emit:a}){const r=l,i=I(!1);function d(e){return Array.isArray(r.modelValue)&&0<=r.modelValue.indexOf(e)}e({toggle:$});const v=c(()=>r.label??Ie(Ye(r.id)));let t=Oe("ApiState",void 0);const p=c(()=>dt.call({responseStatus:r.status??(null==t?void 0:t.error.value)},r.id)),f=c(()=>[ot.base,p.value?ot.invalid:ot.valid]),m=I(null),g=I(""),y=I(null),h=I(r.viewCount),b=I([]),x=c(()=>g.value?r.options.filter(e=>r.match(e,g.value)).slice(0,h.value):r.options),k=["Tab","Escape","ArrowDown","ArrowUp","Enter","PageUp","PageDown","Home","End"];const L=[",",`
`,"\t"];function M(t){var l=null==(t=t.clipboardData)?void 0:t.getData("Text");if(l){t=L.some(e=>l.includes(e));if(r.multiple&&t){if(t){t=new RegExp("\\r|\\n|\\t|,"),t=l.split(t).filter(e=>e.trim()).map(t=>r.options.find(e=>r.match(e,t))).filter(e=>!!e);if(0<t.length){g.value="",i.value=!1,y.value=null;let e=Array.from(r.modelValue||[]);t.forEach(t=>{d(t)?e=e.filter(e=>e!=t):e.push(t)}),a("update:modelValue",e),tl()}}}else{t=r.options.filter(e=>r.match(e,l));1==t.length&&(B(t[0]),i.value=!1,tl())}}}function S(e){k.indexOf(e.code)||D()}function T(e){var t;e.shiftKey||e.ctrlKey||e.altKey||(i.value?"Escape"==e.code||"Tab"==e.code?i.value=!1:"Home"==e.code?(y.value=b.value[0],j()):"End"==e.code?(y.value=b.value[b.value.length-1],j()):"ArrowDown"==e.code?(y.value?(t=b.value.indexOf(y.value),y.value=t+1<b.value.length?b.value[t+1]:b.value[0]):y.value=b.value[0],O()):"ArrowUp"==e.code?(y.value?(t=b.value.indexOf(y.value),y.value=0<=t-1?b.value[t-1]:b.value[b.value.length-1]):y.value=b.value[b.value.length-1],O()):"Enter"==e.code&&(y.value?(B(y.value),r.multiple||(e.preventDefault(),tl())):i.value=!1):"ArrowDown"==e.code&&(i.value=!0,y.value=b.value[0]))}const A={behavior:"smooth",block:"nearest",inline:"nearest",scrollMode:"if-needed"};function j(){setTimeout(()=>{var e=ol(`#${r.id}-autocomplete li.active`);e&&e.scrollIntoView(A)},0)}function O(){setTimeout(()=>{var e=ol(`#${r.id}-autocomplete li.active`);e&&("scrollIntoViewIfNeeded"in e?e.scrollIntoViewIfNeeded(A):e.scrollIntoView(A))},0)}function $(e){(i.value=e)&&(D(),null!=(e=m.value))&&e.focus()}function D(){i.value=!0,U()}function B(t){if(g.value="",i.value=!1,r.multiple){let e=Array.from(r.modelValue||[]);d(t)?e=e.filter(e=>e!=t):e.push(t),y.value=null,a("update:modelValue",e)}else{let e=t;r.modelValue==t&&(e=null),a("update:modelValue",e)}}function U(){b.value=x.value}return At(g,U),(e,t)=>(o(),u("div",{id:l.id+"-autocomplete"},[s(v)?(o(),u("label",{key:0,for:l.id+"-text",class:"block text-sm font-medium text-gray-700 dark:text-gray-300"},V(s(v)),9,fc)):C("",!0),n("div",mc,[gt(n("input",Ce({ref_key:"txtInput",ref:m,id:l.id+"-text",type:"text",role:"combobox","aria-controls":"options","aria-expanded":"false",autocomplete:"off",spellcheck:"false","onUpdate:modelValue":t[0]||(t[0]=e=>g.value=e),class:s(f),placeholder:l.multiple||!l.modelValue?l.placeholder:"",onFocus:t[1]||(t[1]=e=>i.value=!0),onKeydown:T,onKeyup:S,onClick:D,onPaste:M},e.$attrs),null,16,vc),[[zs,g.value]]),n("button",{type:"button",onClick:t[2]||(t[2]=e=>$(!i.value)),class:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",tabindex:"-1"},gc),i.value?(o(),u("ul",{key:0,class:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white dark:bg-black py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",onKeydown:T,id:l.id+"-options",role:"listbox"},[(o(!0),u(be,null,$e(b.value,l=>(o(),u("li",{class:w([l===y.value?"active bg-indigo-600 text-white":"text-gray-900 dark:text-gray-100","relative cursor-default select-none py-2 pl-3 pr-9"]),onMouseover:e=>{return t=l,y.value=t,void(b.value.indexOf(t)>Math.floor(.9*h.value)&&(h.value+=r.viewCount,U()));var t},onClick:e=>B(l),role:"option",tabindex:"-1"},[Z(e.$slots,"item",_t(al(l))),d(l)?(o(),u("span",{key:0,class:w(["absolute inset-y-0 right-0 flex items-center pr-4",l===y.value?"text-white":"text-indigo-600"])},wc,2)):C("",!0)],42,yc))),256))],40,pc)):!l.multiple&&l.modelValue?(o(),u("div",{key:1,onKeydown:T,onClick:t[3]||(t[3]=e=>$(!i.value)),class:"h-8 -mt-8 ml-3 pt-0.5"},[Z(e.$slots,"item",_t(al(l.modelValue)))],32)):C("",!0),s(p)?(o(),u("div",xc,$c)):C("",!0)]),s(p)?(o(),u("p",{key:1,class:"mt-2 text-sm text-red-500",id:l.id+"-error"},V(s(p)),9,Cc)):l.help?(o(),u("p",{key:2,class:"mt-2 text-sm text-gray-500",id:l.id+"-description"},V(l.help),9,_c)):C("",!0)],8,cc))}}),Vc=["id","name","value"],Mc={class:"block truncate"},Sc=Y({__name:"Combobox",props:{id:null,modelValue:null,multiple:{type:Boolean},options:null,values:null,entries:null},emits:["update:modelValue"],setup(a,{expose:e,emit:t}){const l=a;function r(e){t("update:modelValue",e)}e({toggle(e){var t;null!=(t=d.value)&&t.toggle(e)}});const i=c(()=>null!=l.multiple?l.multiple:Array.isArray(l.modelValue)),d=I();function v(e,t){return!t||e.value.toLowerCase().includes(t.toLowerCase())}const p=c(()=>l.entries||(l.values?l.values.map(e=>({key:e,value:e})):l.options?Object.keys(l.options).map(e=>({key:e,value:l.options[e]})):[])),f=I(i.value?[]:null),m=(lt(()=>{null==l.modelValue||""===l.modelValue?f.value=i.value?[]:null:"string"==typeof l.modelValue?f.value=p.value.find(e=>e.key===l.modelValue)||null:Array.isArray(l.modelValue)&&(f.value=p.value.filter(e=>l.modelValue.includes(e.key)))}),c(()=>null==f.value?"":Array.isArray(f.value)?f.value.map(e=>encodeURIComponent(e.key)).join(","):f.value.key));return(e,t)=>{var l=U("Autocomplete");return o(),u(be,null,[n("input",{type:"hidden",id:a.id,name:a.id,value:s(m)},null,8,Vc),fe(l,Ce({ref_key:"input",ref:d,id:a.id,options:s(p),match:v,multiple:s(i)},e.$attrs,{modelValue:f.value,"onUpdate:modelValue":[t[0]||(t[0]=e=>f.value=e),r]}),{item:ve(({value:e})=>[n("span",Mc,V(e),1)]),_:1},16,["id","options","multiple","modelValue"])],64)}}}),Ac=Y({__name:"DynamicInput",props:{input:null,modelValue:null,api:null},emits:["update:modelValue"],setup(v,{emit:e}){const l=v,p=c(()=>l.input.type||"text"),t="ignore,css,options,meta,allowableValues,allowableEntries,op,prop,type,id,name".split(","),f=c(()=>nt(l.input,t)),m=I(De(l.modelValue[l.input.id],e=>"file"===l.input.type?null:"date"===l.input.type&&e instanceof Date?ml(e):"time"===l.input.type?On(e):e)),g=(At(m,()=>{l.modelValue[l.input.id]=m.value,e("update:modelValue",l.modelValue)}),c(()=>{var e=l.modelValue[l.input.id];if("file"!==l.input.type||!e)return[];if("string"==typeof e)return[{filePath:e,fileName:pt(e,"/")}];if(!Array.isArray(e)&&"object"==typeof e)return e;if(Array.isArray(e)){const t=[];return e.forEach(e=>{"string"==typeof e?t.push({filePath:e,fileName:pt(e,"/")}):"object"==typeof e&&t.push(e)}),t}}));return(e,t)=>{var l=U("SelectInput"),a=U("CheckboxInput"),n=U("TagInput"),r=U("Combobox"),i=U("FileInput"),u=U("TextareaInput"),d=U("TextInput");return"select"==s(p)?(o(),X(l,Ce({key:0,id:v.input.id,modelValue:m.value,"onUpdate:modelValue":t[0]||(t[0]=e=>m.value=e),status:null==(l=v.api)?void 0:l.error,"input-class":null==(l=v.input.css)?void 0:l.input,"label-class":null==(l=v.input.css)?void 0:l.label,entries:v.input.allowableEntries,values:v.input.allowableValues},s(f)),null,16,["id","modelValue","status","input-class","label-class","entries","values"])):"checkbox"==s(p)?(o(),X(a,Ce({key:1,id:v.input.id,modelValue:m.value,"onUpdate:modelValue":t[1]||(t[1]=e=>m.value=e),status:null==(l=v.api)?void 0:l.error,"input-class":null==(a=v.input.css)?void 0:a.input,"label-class":null==(l=v.input.css)?void 0:l.label},s(f)),null,16,["id","modelValue","status","input-class","label-class"])):"tag"==s(p)?(o(),X(n,Ce({key:2,id:v.input.id,modelValue:m.value,"onUpdate:modelValue":t[2]||(t[2]=e=>m.value=e),status:null==(a=v.api)?void 0:a.error,"input-class":null==(l=v.input.css)?void 0:l.input,"label-class":null==(n=v.input.css)?void 0:n.label,allowableValues:v.input.allowableValues,string:"String"==(null==(a=v.input.prop)?void 0:a.type)},s(f)),null,16,["id","modelValue","status","input-class","label-class","allowableValues","string"])):"combobox"==s(p)?(o(),X(r,Ce({key:3,id:v.input.id,modelValue:m.value,"onUpdate:modelValue":t[3]||(t[3]=e=>m.value=e),status:null==(l=v.api)?void 0:l.error,"input-class":null==(n=v.input.css)?void 0:n.input,"label-class":null==(a=v.input.css)?void 0:a.label,entries:v.input.allowableEntries,values:v.input.allowableValues},s(f)),null,16,["id","modelValue","status","input-class","label-class","entries","values"])):"file"==s(p)?(o(),X(i,Ce({key:4,id:v.input.id,status:null==(r=v.api)?void 0:r.error,modelValue:m.value,"onUpdate:modelValue":t[4]||(t[4]=e=>m.value=e),"input-class":null==(l=v.input.css)?void 0:l.input,"label-class":null==(n=v.input.css)?void 0:n.label,files:s(g)},s(f)),null,16,["id","status","modelValue","input-class","label-class","files"])):"textarea"==s(p)?(o(),X(u,Ce({key:5,id:v.input.id,modelValue:m.value,"onUpdate:modelValue":t[5]||(t[5]=e=>m.value=e),status:null==(a=v.api)?void 0:a.error,"input-class":null==(i=v.input.css)?void 0:i.input,"label-class":null==(r=v.input.css)?void 0:r.label},s(f)),null,16,["id","modelValue","status","input-class","label-class"])):(o(),X(d,Ce({key:6,type:s(p),id:v.input.id,modelValue:m.value,"onUpdate:modelValue":t[6]||(t[6]=e=>m.value=e),status:null==(l=v.api)?void 0:l.error,"input-class":null==(n=v.input.css)?void 0:n.input,"label-class":null==(u=v.input.css)?void 0:u.label},s(f)),null,16,["type","id","modelValue","status","input-class","label-class"]))}}}),Tc={class:"lookup-field"},Ic=["name","value"],Fc={key:0,class:"flex justify-between"},Pc=["for"],Dc={key:0,class:"flex items-center"},Oc={class:"text-sm text-gray-500 dark:text-gray-400 pr-1"},jc=n("span",{class:"sr-only"},"Clear",-1),Bc=n("svg",{class:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),Rc=[jc,Bc],Ec={key:1,class:"mt-1 relative"},Hc={class:"w-full inline-flex truncate"},Nc={class:"text-blue-700 dark:text-blue-300 flex cursor-pointer"},zc=n("span",{class:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},[n("svg",{class:"h-5 w-5 text-gray-400 dark:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[n("path",{"fill-rule":"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1),Uc=["id"],qc=["id"],Qc=Y({__name:"LookupInput",props:{id:null,status:null,input:null,metadataType:null,modelValue:null,label:null,labelClass:null,help:null},emits:["update:modelValue"],setup(r,{emit:i}){const d=r,t=wt()["config"],v=Je()["metadataApi"],p=c(()=>d.id||d.input.id),f=c(()=>d.label??Ie(Ye(p.value)));let e=Oe("ApiState",void 0);const m=Oe("client"),g=c(()=>dt.call({responseStatus:d.status??(null==e?void 0:e.error.value)},p.value)),y=I(""),h=I(""),b=c(()=>ce(d.modelValue,p.value)),x=c(()=>Ke(d.metadataType).find(e=>e.name.toLowerCase()==p.value.toLowerCase())),k=c(()=>{var e;return(null==(e=it(null==(e=null==(e=x.value)?void 0:e.ref)?void 0:e.model))?void 0:e.icon)||t.value.tableIcon});let L;function M(){d.modelValue[p.value]=null,y.value=""}return lt(async()=>{L=Oe("ModalProvider",void 0);var t,l=d.modelValue;d.modelValue[p.value]||(d.modelValue[p.value]=null);const a=x.value,n=null==a?void 0:a.ref;if(n){y.value="";let e=null==n.selfId?ce(l,a.name):ce(l,n.selfId);null==(e=Et(e)?ce(l,n.refId):e)||null==(null==(t=v.value)?void 0:t.operations.find(e=>{return(null==(e=e.dataModel)?void 0:e.name)==n.model}))||Et(t=ce(l,a.name))||(y.value=""+t,h.value=a.name,null!=n.refLabel&&(null==(t=Ke(d.metadataType).find(e=>e.type==n.model))&&console.warn(`Could not find ${n.model} Property on `+d.metadataType.name),null!=(l=null!=t?ce(l,t.name):null)?(t=ce(l,n.refLabel))&&(y.value=""+t,vt.setValue(n.model,e,n.refLabel,t)):(t=1==(null==(l=a.attributes)?void 0:l.some(e=>"Computed"==e.name)),l=await vt.getOrFetchValue(m,v.value,n.model,n.refId,n.refLabel,t,e),y.value=l||n.model+": "+y.value)))}else console.warn(`No RefInfo for property '${p.value}'`)}),(e,t)=>{var l,a=U("Icon");return o(),u("div",Tc,[n("input",{type:"hidden",name:s(p),value:s(b)},null,8,Ic),s(f)?(o(),u("div",Fc,[n("label",{for:s(p),class:w("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(r.labelClass??""))},V(s(f)),11,Pc),s(b)?(o(),u("div",Dc,[n("span",Oc,V(s(b)),1),n("button",{onClick:M,type:"button",title:"clear",class:"mr-1 rounded-md text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:ring-offset-black"},Rc)])):C("",!0)])):C("",!0),null!=(l=s(x))&&l.ref?(o(),u("div",Ec,[n("button",{type:"button",class:"lookup flex relative w-full bg-white dark:bg-black border border-gray-300 dark:border-gray-700 rounded-md shadow-sm pl-3 pr-10 py-2 text-left focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",onClick:t[0]||(t[0]=e=>{var l;(l=s(x).ref)&&(null==L?console.warn("No ModalProvider required by LookupInput"):L.openModal({name:"ModalLookup",ref:l},e=>{var t;console.debug("openModal",y.value," -> ",e,vt.setRefValue(l,e),l),e&&(t=ce(e,l.refId),y.value=vt.setRefValue(l,e)||t,(e=s(d.modelValue))[p.value]=t,i("update:modelValue",e))}))}),"aria-haspopup":"listbox","aria-expanded":"true","aria-labelledby":"listbox-label"},[n("span",Hc,[n("span",Nc,[fe(a,{class:"mr-1 w-5 h-5",image:s(k)},null,8,["image"]),n("span",null,V(y.value),1)])]),zc])])):C("",!0),s(g)?(o(),u("p",{key:2,class:"mt-2 text-sm text-red-500",id:s(p)+"-error"},V(s(g)),9,Uc)):r.help?(o(),u("p",{key:3,class:"mt-2 text-sm text-gray-500",id:s(p)+"-description"},V(r.help),9,qc)):C("",!0)])}}}),Kc=Y({__name:"AutoFormFields",props:{modelValue:null,type:null,api:null,formLayout:null,configureField:null,hideSummary:{type:Boolean},flexClass:{default:"flex flex-1 flex-col justify-between"},divideClass:{default:"divide-y divide-gray-200 px-4 sm:px-6"},spaceClass:{default:"space-y-6 pt-6 pb-5"},fieldsetClass:{default:"grid grid-cols-12 gap-6"}},emits:["update:modelValue"],setup(d,{emit:v}){const p=d;const{metadataApi:t,apiOf:l,typeOf:e,typeOfRef:a,createFormLayout:i}=Je(),f=c(()=>p.type||Tt(p.modelValue)),m=c(()=>e(f.value)),g=c(()=>{var e;return a(null==(e=null==(e=t.value)?void 0:e.operations.find(e=>e.request.name==f.value))?void 0:e.dataModel)||m.value}),y=c(()=>{var e=m.value;if(!e){if(p.formLayout)return p.formLayout.map(e=>{var t={name:e.id,type:no(e.type)},t=Object.assign({prop:t},e);return p.configureField&&p.configureField(t),t});throw new Error(`MetadataType for ${f.value} not found`)}const a=Ke(e),n=g.value,t=p.formLayout||i(e),s=[],r=l(e.name);return t.forEach(t=>{var e,l=a.find(e=>e.name==t.name);t.ignore||(e=(null==(e=null==n?void 0:n.properties)?void 0:e.find(e=>{return e.name.toLowerCase()==(null==(e=t.name)?void 0:e.toLowerCase())}))??l,l=Object.assign({prop:e,op:r},t),p.configureField&&p.configureField(l),s.push(l))}),s}),h=c(()=>y.value.filter(e=>"hidden"!=e.type).map(e=>e.id));return(t,a)=>{var e;const l=U("ErrorSummary"),r=U("LookupInput"),i=U("DynamicInput");return o(),u(be,null,[d.hideSummary?C("",!0):(o(),X(l,{key:0,status:null==(e=d.api)?void 0:e.error,except:s(h)},null,8,["status","except"])),n("div",{class:w(d.flexClass)},[n("div",{class:w(d.divideClass)},[n("div",{class:w(d.spaceClass)},[n("fieldset",{class:w(d.fieldsetClass)},[(o(!0),u(be,null,$e(s(y),l=>{var e;return o(),u("div",{key:"f.id",class:w(["w-full",(null==(e=l.css)?void 0:e.field)??("textarea"==l.type?"col-span-12":"col-span-12 xl:col-span-6"+("checkbox"==l.type?" flex items-center":"")),"hidden"==l.type?"hidden":""])},[null==(null==(e=l.prop)?void 0:e.ref)||"file"==l.type||l.prop.isPrimaryKey?(o(),X(i,{key:1,input:l,modelValue:d.modelValue,"onUpdate:modelValue":a[0]||(a[0]=e=>t.$emit("update:modelValue",e)),api:d.api},null,8,["input","modelValue","api"])):(o(),X(r,{key:0,metadataType:s(g),input:l,modelValue:d.modelValue,"onUpdate:modelValue":e=>{return t=l,e=e,p.modelValue[t.id]=ce(e,t.id),void v("update:modelValue",p.modelValue);var t},status:null==(e=d.api)?void 0:e.error},null,8,["metadataType","input","modelValue","onUpdate:modelValue","status"]))],2)}),128))],2)],2)],2)],2)],64)}}});function yl(){const n=I(!1),s=I(),r=I(),o=Oe("client");function i({message:e,errorCode:t,fieldName:l,errors:a}){return t=t||"Exception",a=a||[],s.value=new Ll(l?{errorCode:t,message:e,errors:[new Ln({fieldName:l,errorCode:t,message:e})]}:{errorCode:t,message:e,errors:a})}var e={setError:i,addFieldError:function({fieldName:t,message:e,errorCode:l}){var a;l=l||"Exception",s.value?((a=new Ll(s.value)).errors=[...(a.errors||[]).filter(e=>{return(null==(e=e.fieldName)?void 0:e.toLowerCase())!==(null==t?void 0:t.toLowerCase())}),new Ln({fieldName:t,message:e,errorCode:l})],s.value=a):i({fieldName:t,message:e,errorCode:l})},loading:n,error:s,api:async function(e,t,l){return n.value=!0,e=await o.api(kt(e),t,l),n.value=!1,r.value=e.response,s.value=e.error,e},apiVoid:async function(e,t,l){return n.value=!0,e=await o.apiVoid(kt(e),t,l),n.value=!1,r.value=e.response,s.value=e.error,e},apiForm:async function(e,t,l,a){return n.value=!0,e=await o.apiForm(kt(e),t,l,a),n.value=!1,r.value=e.response,s.value=e.error,e},apiFormVoid:async function(e,t,l,a){return n.value=!0,e=await o.apiFormVoid(kt(e),t,l,a),n.value=!1,r.value=e.response,s.value=e.error,e},swr:async function(e,t,l,a){return En(o,e,t,l,a)},unRefs:kt,setRef:jn};return qt("ApiState",e),e}const Gc=["onSubmit"],Wc={key:0},Zc={key:2},Jc=["innerHTML"],Xc=n("input",{type:"submit",class:"hidden"},null,-1),Yc={class:"flex justify-end"},e0=n("div",null,null,-1),t0=Y({__name:"AutoForm",props:{type:null,modelValue:null,heading:null,subHeading:null,showLoading:{type:Boolean,default:!0},jsconfig:{default:"eccn,edv"},configureField:null,bodyClass:null,formClass:{default:"shadow sm:rounded-md"},innerFormClass:null,headerClass:{default:"p-6"},buttonsClass:null,headingClass:null,subHeadingClass:null,submitLabel:{default:"Submit"}},emits:["success","error","update:modelValue"],setup(v,{emit:r}){const i=v,p=(qt("ModalProvider",{openModal:function(e,t){p.value=e,l.value=t}}),I()),l=I();async function f(e){l.value&&l.value(e),p.value=void 0,l.value=void 0}const d=yl(),t=za()["getTypeName"],{typeOf:a,createDto:e}=Je(),m=I(new Ze),g=c(()=>"string"==typeof i.buttonsClass?i.formClass:Ue.buttonsClass),y=c(()=>"string"==typeof i.headingClass?i.formClass:ht.headingClass),h=c(()=>("string"==typeof i.subHeadingClass?i:ht).subHeadingClass),b=c(()=>{var e;return i.type?t(i.type):null!=(e=i.modelValue)&&e.getTypeName?i.modelValue.getTypeName():null}),x=c(()=>a(b.value)),k=I(i.modelValue||S()),L=c(()=>d.loading.value),M=c(()=>{var e;return i.heading||(null==(e=a(b.value))?void 0:e.description)||Ie(b.value)});function S(){return"string"==typeof i.type?e(i.type):i.type?new i.type:i.modelValue}async function T(e){var e=e.target,t=S(),l=De(null==t?void 0:t.getMethod,e=>"function"==typeof e?e():null)||"POST",a=null==De(null==t?void 0:t.createResponse,e=>"function"==typeof e?e():null),n=i.jsconfig;Ul.hasRequestBody(l)?(l=new t.constructor,e=new FormData(e),console.debug("AutoForm.submitForm",l,e),m.value=a?await d.apiFormVoid(l,e,{jsconfig:n}):await d.apiForm(l,e,{jsconfig:n})):(l=new t.constructor(k.value),console.debug("AutoForm.submit",l),m.value=a?await d.apiVoid(l,{jsconfig:n}):await d.api(l,{jsconfig:n})),m.value.succeeded?r("success",m.value.response):r("error",m.value.error)}function A(e){r("update:modelValue",e)}return(e,t)=>{var l;const a=U("AutoFormFields"),r=U("FormLoading"),i=U("PrimaryButton"),d=U("ModalLookup");return s(x)?(o(),u("form",{key:0,onSubmit:je(T,["prevent"]),autocomplete:"off",class:w(v.formClass)},[n("div",{class:w(v.innerFormClass)},[n("div",{class:w(v.bodyClass)},[n("div",{class:w(v.headerClass)},[e.$slots.heading?(o(),u("div",Wc,[Z(e.$slots,"heading")])):(o(),u("h3",{key:1,class:w(s(y))},V(s(M)),3)),e.$slots.subheading?(o(),u("div",Zc,[Z(e.$slots,"subheading")])):v.subHeading?(o(),u("p",{key:3,class:w(s(h))},V(v.subHeading),3)):null!=(l=s(x))&&l.notes?(o(),u("p",{key:4,class:w(["notes",s(h)]),innerHTML:null==(l=s(x))?void 0:l.notes},null,10,Jc)):C("",!0)],2),Z(e.$slots,"header"),Xc,fe(a,{type:v.type,modelValue:k.value,"onUpdate:modelValue":A,api:m.value,configureField:v.configureField},null,8,["type","modelValue","api","configureField"]),Z(e.$slots,"footer")],2),Z(e.$slots,"buttons",{},()=>[n("div",{class:w(s(g))},[n("div",null,[v.showLoading&&s(L)?(o(),X(r,{key:0})):C("",!0)]),n("div",Yc,[e0,fe(i,null,{default:ve(()=>[he(V(v.submitLabel),1)]),_:1})])],2)])],2),"ModalLookup"==(null==(l=p.value)?void 0:l.name)&&p.value.ref?(o(),X(d,{key:0,"ref-info":p.value.ref,onDone:f},null,8,["ref-info"])):C("",!0)],42,Gc)):C("",!0)}}}),l0={key:0},n0={class:"text-red-700"},s0=n("b",null,"type",-1),a0=["onSubmit"],o0={key:0},i0={key:2},r0=["innerHTML"],u0={class:"flex justify-end"},d0={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},c0=n("div",{class:"fixed inset-0"},null,-1),f0={class:"fixed inset-0 overflow-hidden"},m0=["onSubmit"],v0={class:"flex min-h-0 flex-1 flex-col overflow-auto"},h0={class:"flex-1"},g0={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},p0={class:"flex items-start justify-between space-x-3"},y0={class:"space-y-1"},b0={key:0},w0={key:2},x0=["innerHTML"],k0={class:"flex h-7 items-center"},$0={class:"flex justify-end"},C0=Y({__name:"AutoCreateForm",props:{type:null,formStyle:{default:"slideOver"},panelClass:null,formClass:null,headingClass:null,subHeadingClass:null,buttonsClass:null,heading:null,subHeading:null,autosave:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},showCancel:{type:Boolean,default:!0},configureField:null},emits:["done","save","error"],setup(p,{emit:r}){const i=p;function f(e){}qt("ModalProvider",{openModal:function(e,t){m.value=e,l.value=t}});const m=I(),l=I();async function g(e){l.value&&l.value(e),m.value=void 0,l.value=void 0}const{typeOf:t,typeProperties:d,Crud:e,createDto:a,formValues:v}=Je(),y=c(()=>Tt(i.type)),h=c(()=>t(y.value)),b=I("string"==typeof i.type?a(i.type):i.type?new i.type:null),x=c(()=>i.panelClass||Ue.panelClass(i.formStyle)),k=c(()=>i.formClass||Ue.formClass(i.formStyle)),L=c(()=>i.headingClass||Ue.headingClass(i.formStyle)),M=c(()=>i.subHeadingClass||Ue.subHeadingClass(i.formStyle)),S=c(()=>i.buttonsClass||Ue.buttonsClass),T=c(()=>e.model(h.value)),A=c(()=>{var e;return i.heading||(null==(e=t(y.value))?void 0:e.description)||(T.value?"New "+Ie(T.value):Ie(y.value))}),j=I(new Ze);let O=yl(),$=c(()=>O.loading.value);async function D(e){var t,l,a,e=e.target;i.autosave?(l=De(null==(l=b.value)?void 0:l.getMethod,e=>"function"==typeof e?e():null)||"POST",t=null==De(null==(t=b.value)?void 0:t.createResponse,e=>"function"==typeof e?e():null),Ul.hasRequestBody(l)?(l=new b.value.constructor,a=new FormData(e),j.value=t?await O.apiFormVoid(l,a,{jsconfig:"eccn"}):await O.apiForm(l,a,{jsconfig:"eccn"})):(l=v(e,d(h.value)),a=new b.value.constructor(l),j.value=t?await O.apiVoid(a,{jsconfig:"eccn"}):await O.api(a,{jsconfig:"eccn"})),j.value.succeeded?(e.reset(),r("save",j.value.response)):r("error",j.value.error)):r("save",new b.value.constructor(v(e,d(h.value))))}function B(){r("done")}const F=I(!1),H=I(""),z={entering:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-full",to:"translate-x-0"},leaving:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-0",to:"translate-x-full"}};function P(){"slideOver"==i.formStyle?F.value=!1:B()}At(F,()=>{Lt(z,H,F.value),F.value||setTimeout(B,700)}),F.value=!0;const E=e=>{"Escape"===e.key&&P()};return lt(()=>window.addEventListener("keydown",E)),Ut(()=>window.removeEventListener("keydown",E)),(e,t)=>{var l,a=U("AutoFormFields"),r=U("FormLoading"),i=U("SecondaryButton"),d=U("PrimaryButton"),c=U("CloseButton"),v=U("ModalLookup");return o(),u("div",null,[s(h)?"card"==p.formStyle?(o(),u("div",{key:1,class:w(s(x))},[n("form",{onSubmit:je(D,["prevent"])},[n("div",{class:w(s(k))},[n("div",null,[e.$slots.heading?(o(),u("div",o0,[Z(e.$slots,"heading")])):(o(),u("h3",{key:1,class:w(s(L))},V(s(A)),3)),e.$slots.subheading?(o(),u("div",i0,[Z(e.$slots,"subheading")])):p.subHeading?(o(),u("p",{key:3,class:w(s(M))},V(p.subHeading),3)):null!=(l=s(h))&&l.notes?(o(),u("p",{key:4,class:w(["notes",s(M)]),innerHTML:null==(l=s(h))?void 0:l.notes},null,10,r0)):C("",!0)]),Z(e.$slots,"header"),fe(a,{modelValue:b.value,"onUpdate:modelValue":f,api:j.value,configureField:p.configureField},null,8,["modelValue","api","configureField"]),Z(e.$slots,"footer")],2),n("div",{class:w(s(S))},[n("div",null,[p.showLoading&&s($)?(o(),X(r,{key:0})):C("",!0)]),n("div",u0,[p.showCancel?(o(),X(i,{key:0,onClick:P,disabled:s($)},{default:ve(()=>[he("Cancel")]),_:1},8,["disabled"])):C("",!0),fe(d,{type:"submit",class:"ml-4",disabled:s($)},{default:ve(()=>[he("Save")]),_:1},8,["disabled"])])],2)],40,a0)],2)):(o(),u("div",d0,[c0,n("div",f0,[n("div",{onMousedown:P,class:"absolute inset-0 overflow-hidden"},[n("div",{onMousedown:t[0]||(t[0]=je(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[n("div",{class:w(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",H.value])},[n("form",{class:w(s(k)),onSubmit:je(D,["prevent"])},[n("div",v0,[n("div",h0,[n("div",g0,[n("div",p0,[n("div",y0,[e.$slots.heading?(o(),u("div",b0,[Z(e.$slots,"heading")])):(o(),u("h3",{key:1,class:w(s(L))},V(s(A)),3)),e.$slots.subheading?(o(),u("div",w0,[Z(e.$slots,"subheading")])):p.subHeading?(o(),u("p",{key:3,class:w(s(M))},V(p.subHeading),3)):null!=(l=s(h))&&l.notes?(o(),u("p",{key:4,class:w(["notes",s(M)]),innerHTML:null==(t=s(h))?void 0:t.notes},null,10,x0)):C("",!0)]),n("div",k0,[fe(c,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:P})])])]),Z(e.$slots,"header"),fe(a,{modelValue:b.value,"onUpdate:modelValue":f,api:j.value,configureField:p.configureField},null,8,["modelValue","api","configureField"]),Z(e.$slots,"footer")])]),n("div",{class:w(s(S))},[n("div",null,[p.showLoading&&s($)?(o(),X(r,{key:0})):C("",!0)]),n("div",$0,[p.showCancel?(o(),X(i,{key:0,onClick:P,disabled:s($)},{default:ve(()=>[he("Cancel")]),_:1},8,["disabled"])):C("",!0),fe(d,{type:"submit",class:"ml-4",disabled:s($)},{default:ve(()=>[he("Save")]),_:1},8,["disabled"])])],2)],42,m0)],2)],32)],32)])])):(o(),u("div",l0,[n("p",n0,[he("Could not create form for unknown "),s0,he(" "+V(s(y)),1)])])),"ModalLookup"==(null==(l=m.value)?void 0:l.name)&&m.value.ref?(o(),X(v,{key:3,"ref-info":m.value.ref,onDone:g},null,8,["ref-info"])):C("",!0)])}}}),_0={key:0},L0={class:"text-red-700"},V0=n("b",null,"type",-1),M0=["onSubmit"],S0={key:0},A0={key:2},T0=["innerHTML"],I0={class:"flex justify-end"},F0={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},P0=n("div",{class:"fixed inset-0"},null,-1),D0={class:"fixed inset-0 overflow-hidden"},O0=["onSubmit"],j0={class:"flex min-h-0 flex-1 flex-col overflow-auto"},B0={class:"flex-1"},R0={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},E0={class:"flex items-start justify-between space-x-3"},H0={class:"space-y-1"},N0={key:0},z0={key:2},U0=["innerHTML"],q0={class:"flex h-7 items-center"},Q0={class:"flex justify-end"},K0=Y({__name:"AutoEditForm",props:{modelValue:null,type:null,deleteType:null,formStyle:{default:"slideOver"},panelClass:null,formClass:null,headingClass:null,subHeadingClass:null,heading:null,subHeading:null,autosave:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},configureField:null},emits:["done","save","delete","error"],setup(f,{emit:r}){const d=f;function m(e){}qt("ModalProvider",{openModal:function(e,t){g.value=e,l.value=t}});const g=I(),l=I();async function y(e){l.value&&l.value(e),g.value=void 0,l.value=void 0}const{typeOf:t,apiOf:v,typeProperties:i,createFormLayout:p,getPrimaryKey:a,Crud:h,createDto:b,formValues:x}=Je(),k=c(()=>Tt(d.type)),L=c(()=>t(k.value)),M=I("string"==typeof d.type?b(d.type,nl(d.modelValue)):d.type?new d.type(nl(d.modelValue)):null),S=c(()=>d.panelClass||Ue.panelClass(d.formStyle)),T=c(()=>d.formClass||Ue.formClass(d.formStyle)),A=c(()=>d.headingClass||Ue.headingClass(d.formStyle)),j=c(()=>d.subHeadingClass||Ue.subHeadingClass(d.formStyle)),O=c(()=>h.model(L.value)),$=c(()=>{var e;return d.heading||(null==(e=t(k.value))?void 0:e.description)||(O.value?"Update "+Ie(O.value):Ie(k.value))}),D=I(new Ze);let B=yl(),F=c(()=>B.loading.value);const H=()=>De(t(h.model(L.value)),e=>a(e));function z(e){var{op:t,prop:l}=e;t&&(h.isPatch(t)||h.isUpdate(t))&&(e.disabled=null==l?void 0:l.isPrimaryKey),d.configureField&&d.configureField(e)}async function P(a){a=a.target;if(d.autosave){let e=De(null==(n=M.value)?void 0:n.getMethod,e=>"function"==typeof e?e():null)||"POST",t=null==De(null==(n=M.value)?void 0:n.createResponse,e=>"function"==typeof e?e():null),u=H();if(Ul.hasRequestBody(e)){let e=new M.value.constructor,l=ce(d.modelValue,u.name),o=new FormData(a),i=(u&&!Array.from(o.keys()).some(e=>e.toLowerCase()==u.name.toLowerCase())&&o.append(u.name,l),[]);var n=k.value&&v(k.value);if(n&&h.isPatch(n)){let e=nl(d.modelValue),t=p(L.value),r={};if(u&&(r[u.name]=l),t.forEach(a=>{var n=a.id,s=ce(e,n);if(!u||u.name.toLowerCase()!==n.toLowerCase()){let e=o.get(n),t=null!=e,l="checkbox"===a.type?t!=!!s:"file"===a.type?t:e!=s;(l=e||s?l:!1)&&(e?r[n]=e:"file"!==a.type&&i.push(n))}}),Array.from(o.keys()).filter(e=>!r[e]).forEach(e=>o.delete(e)),0==Array.from(o.keys()).filter(e=>e.toLowerCase()!=u.name.toLowerCase()).length&&0==i.length)return void R()}n=0<i.length?{jsconfig:"eccn",reset:i}:{jsconfig:"eccn"};D.value=t?await B.apiFormVoid(e,o,n):await B.apiForm(e,o,n)}else{n=x(a,i(L.value)),n=(u&&!ce(n,u.name)&&(n[u.name]=ce(d.modelValue,u.name)),new M.value.constructor(n));D.value=t?await B.apiVoid(n,{jsconfig:"eccn"}):await B.api(n,{jsconfig:"eccn"})}D.value.succeeded?(a.reset(),r("save",D.value.response)):r("error",D.value.error)}else r("save",new M.value.constructor(x(a,i(L.value))))}async function E(e){var t=H(),l=t?ce(d.modelValue,t.name):null;l?(t={[t.name]:l},l="string"==typeof d.deleteType?b(d.deleteType,t):d.deleteType?new d.deleteType(t):null,null==De(l.createResponse,e=>"function"==typeof e?e():null)?D.value=await B.apiVoid(l):D.value=await B.api(l),D.value.succeeded?r("delete",D.value.response):r("error",D.value.error)):console.error(`Could not find Primary Key for Type ${k.value} (${O.value})`)}function e(){r("done")}const _=I(!1),N=I(""),Y={entering:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-full",to:"translate-x-0"},leaving:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-0",to:"translate-x-full"}};function R(){"slideOver"==d.formStyle?_.value=!1:e()}At(_,()=>{Lt(Y,N,_.value),_.value||setTimeout(e,700)}),_.value=!0;const Q=e=>{"Escape"===e.key&&R()};return lt(()=>window.addEventListener("keydown",Q)),Ut(()=>window.removeEventListener("keydown",Q)),(e,t)=>{var l,a=U("AutoFormFields"),r=U("ConfirmDelete"),i=U("FormLoading"),d=U("SecondaryButton"),c=U("PrimaryButton"),v=U("CloseButton"),p=U("ModalLookup");return o(),u("div",null,[s(L)?"card"==f.formStyle?(o(),u("div",{key:1,class:w(s(S))},[n("form",{onSubmit:je(P,["prevent"])},[n("div",{class:w(s(T))},[n("div",null,[e.$slots.heading?(o(),u("div",S0,[Z(e.$slots,"heading")])):(o(),u("h3",{key:1,class:w(s(A))},V(s($)),3)),e.$slots.subheading?(o(),u("div",A0,[Z(e.$slots,"subheading")])):f.subHeading?(o(),u("p",{key:3,class:w(s(j))},V(f.subHeading),3)):null!=(l=s(L))&&l.notes?(o(),u("p",{key:4,class:w(["notes",s(j)]),innerHTML:null==(l=s(L))?void 0:l.notes},null,10,T0)):C("",!0)]),Z(e.$slots,"header"),fe(a,{modelValue:M.value,"onUpdate:modelValue":m,api:D.value,configureField:f.configureField},null,8,["modelValue","api","configureField"]),Z(e.$slots,"footer")],2),n("div",{class:w(s(Ue).buttonsClass)},[n("div",null,[f.deleteType?(o(),X(r,{key:0,onDelete:E})):C("",!0)]),n("div",null,[f.showLoading&&s(F)?(o(),X(i,{key:0})):C("",!0)]),n("div",I0,[fe(d,{onClick:R,disabled:s(F)},{default:ve(()=>[he("Cancel")]),_:1},8,["disabled"]),fe(c,{type:"submit",class:"ml-4",disabled:s(F)},{default:ve(()=>[he("Save")]),_:1},8,["disabled"])])],2)],40,M0)],2)):(o(),u("div",F0,[P0,n("div",D0,[n("div",{onMousedown:R,class:"absolute inset-0 overflow-hidden"},[n("div",{onMousedown:t[0]||(t[0]=je(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[n("div",{class:w(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",N.value])},[n("form",{class:w(s(T)),onSubmit:je(P,["prevent"])},[n("div",j0,[n("div",B0,[n("div",R0,[n("div",E0,[n("div",H0,[e.$slots.heading?(o(),u("div",N0,[Z(e.$slots,"heading")])):(o(),u("h3",{key:1,class:w(s(A))},V(s($)),3)),e.$slots.subheading?(o(),u("div",z0,[Z(e.$slots,"subheading")])):f.subHeading?(o(),u("p",{key:3,class:w(s(j))},V(f.subHeading),3)):null!=(l=s(L))&&l.notes?(o(),u("p",{key:4,class:w(["notes",s(j)]),innerHTML:null==(t=s(L))?void 0:t.notes},null,10,U0)):C("",!0)]),n("div",q0,[fe(v,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:R})])])]),Z(e.$slots,"header"),fe(a,{modelValue:M.value,"onUpdate:modelValue":m,api:D.value,configureField:z},null,8,["modelValue","api"]),Z(e.$slots,"footer")])]),n("div",{class:w(s(Ue).buttonsClass)},[n("div",null,[f.deleteType?(o(),X(r,{key:0,onDelete:E})):C("",!0)]),n("div",null,[f.showLoading&&s(F)?(o(),X(i,{key:0})):C("",!0)]),n("div",Q0,[fe(d,{onClick:R,disabled:s(F)},{default:ve(()=>[he("Cancel")]),_:1},8,["disabled"]),fe(c,{type:"submit",class:"ml-4",disabled:s(F)},{default:ve(()=>[he("Save")]),_:1},8,["disabled"])])],2)],42,O0)],2)],32)],32)])])):(o(),u("div",_0,[n("p",L0,[he("Could not create form for unknown "),V0,he(" "+V(s(k)),1)])])),"ModalLookup"==(null==(l=g.value)?void 0:l.name)&&g.value.ref?(o(),X(p,{key:3,"ref-info":g.value.ref,onDone:y},null,8,["ref-info"])):C("",!0)])}}}),G0=n("label",{for:"confirmDelete",class:"ml-2 mr-2 select-none"},"confirm",-1),W0=["onClick"],Z0=Y({__name:"ConfirmDelete",emits:["delete"],setup(e,{emit:t}){let l=I(!1);const a=()=>{l.value&&t("delete")},r=c(()=>["select-none inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white",l.value?"cursor-pointer bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500":"bg-red-400"]);return(e,t)=>(o(),u(be,null,[gt(n("input",{id:"confirmDelete",type:"checkbox",class:"focus:ring-indigo-500 h-4 w-4 text-indigo-600 rounded border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:ring-offset-black","onUpdate:modelValue":t[0]||(t[0]=e=>Tn(l)?l.value=e:l=e)},null,512),[[Hl,s(l)]]),G0,n("span",Ce({onClick:je(a,["prevent"]),class:s(r)},e.$attrs),[Z(e.$slots,"default",{},()=>[he("Delete")])],16,W0)],64))}}),J0={class:"flex",title:"loading..."},X0={key:0,xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24px",height:"30px",viewBox:"0 0 24 30"},Y0=dl('<rect x="0" y="10" width="4" height="10" fill="#333" opacity="0.2"><animate attributeName="opacity" attributeType="XML" values="0.2; 1; .2" begin="0s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="height" attributeType="XML" values="10; 20; 10" begin="0s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" attributeType="XML" values="10; 5; 10" begin="0s" dur="0.6s" repeatCount="indefinite"></animate></rect><rect x="8" y="10" width="4" height="10" fill="#333" opacity="0.2"><animate attributeName="opacity" attributeType="XML" values="0.2; 1; .2" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="height" attributeType="XML" values="10; 20; 10" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" attributeType="XML" values="10; 5; 10" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate></rect><rect x="16" y="10" width="4" height="10" fill="#333" opacity="0.2"><animate attributeName="opacity" attributeType="XML" values="0.2; 1; .2" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="height" attributeType="XML" values="10; 20; 10" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" attributeType="XML" values="10; 5; 10" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate></rect>',3),ef=[Y0],tf={class:"ml-2 mt-1 text-gray-400"},lf=Y({__name:"FormLoading",props:{icon:{type:Boolean,default:!0},text:{default:"loading..."}},setup(l){return Oe("ApiState",void 0),(e,t)=>(o(),u("div",J0,[l.icon?(o(),u("svg",X0,ef)):C("",!0),n("span",tf,V(l.text),1)]))}}),nf=["onClick"],sf={key:3,class:"flex justify-between items-center"},af={class:"mr-1 select-none"},of=["onClick"],rf=Y({__name:"DataGrid",props:{items:{default:()=>[]},id:{default:"DataGrid"},type:null,tableStyle:{default:"stripedRows"},selectedColumns:null,gridClass:null,grid2Class:null,grid3Class:null,grid4Class:null,tableClass:null,theadClass:null,tbodyClass:null,theadRowClass:null,theadCellClass:null,isSelected:null,headerTitle:null,headerTitles:null,visibleFrom:null,rowClass:null,rowStyle:null},emits:["headerSelected","rowSelected"],setup(t,{emit:v}){const p=t,l=I(),a=I(null),f=Nl(),m=t=>Object.keys(f).find(e=>e.toLowerCase()==t.toLowerCase()+"-header"),g=t=>Object.keys(f).find(e=>e.toLowerCase()==t.toLowerCase()),r=c(()=>Il(p.items).filter(e=>!(!f[e]&&!f[e+"-header"]))),{typeOf:e,typeProperties:i}=Je(),d=c(()=>Tt(p.type)),y=c(()=>e(d.value)),h=c(()=>i(y.value));function b(e){e=p.headerTitles&&ce(p.headerTitles,e)||e;return p.headerTitle?p.headerTitle(e):Pn(e)}function x(e){const t=e.toLowerCase();return h.value.find(e=>e.name.toLowerCase()==t)}const k={xs:"xs:table-cell",sm:"sm:table-cell",md:"md:table-cell",lg:"lg:table-cell",xl:"xl:table-cell","2xl":"2xl:table-cell",never:""};function L(e){e=p.visibleFrom&&ce(p.visibleFrom,e);return e&&De(k[e],e=>"hidden "+e)}const M=c(()=>p.gridClass??oe.getGridClass(p.tableStyle)),S=c(()=>p.grid2Class??oe.getGrid2Class(p.tableStyle)),T=c(()=>p.grid3Class??oe.getGrid3Class(p.tableStyle)),A=c(()=>p.grid4Class??oe.getGrid4Class(p.tableStyle)),j=c(()=>p.tableClass??oe.getTableClass(p.tableStyle)),O=c(()=>p.tbodyClass??oe.getTbodyClass(p.tbodyClass)),$=c(()=>p.theadClass??oe.getTheadClass(p.tableStyle)),D=c(()=>p.theadRowClass??oe.getTheadRowClass(p.tableStyle)),B=c(()=>p.theadCellClass??oe.getTheadCellClass(p.tableStyle));const F=c(()=>{const e=("string"==typeof p.selectedColumns?p.selectedColumns.split(","):p.selectedColumns)||(0<r.value.length?r.value:Il(p.items)),t=h.value.reduce((e,t)=>(e[t.name.toLowerCase()]=t.format,e),{});return e.filter(e=>{return"hidden"!=(null==(e=t[e.toLowerCase()])?void 0:e.method)})});return(r,e)=>{const i=U("CellFormat"),d=U("PreviewFormat");return t.items.length?(o(),u("div",{key:0,ref_key:"refResults",ref:l,class:w(s(M))},[n("div",{class:w(s(S))},[n("div",{class:w(s(T))},[n("div",{class:w(s(A))},[n("table",{class:w(s(j))},[n("thead",{class:w(s($))},[n("tr",{class:w(s(D))},[(o(!0),u(be,null,$e(s(F),t=>{return o(),u("td",{class:w([L(t),s(B),(e=t,a.value===e?"text-gray-900 dark:text-gray-50":"text-gray-500 dark:text-gray-400")])},[n("div",{onClick:e=>{v("headerSelected",t,e)}},[s(f)[t+"-header"]?Z(r.$slots,t+"-header",{key:0,column:t}):m(t)?Z(r.$slots,m(t),{key:1,column:t}):s(f).header?Z(r.$slots,"header",{key:2,column:t,label:b(t)}):(o(),u("div",sf,[n("span",af,V(b(t)),1)]))],8,nf)],2);var e}),256))],2)],2),n("tbody",{class:w(s(O))},[(o(!0),u(be,null,$e(t.items,(t,e)=>{return o(),u("tr",{class:w((l=t,a=e,p.rowClass?p.rowClass(l,a):oe.getTableRowClass(p.tableStyle,a,!(!p.isSelected||!p.isSelected(l)),null!=p.isSelected))),style:El((a=t,l=e,p.rowStyle?p.rowStyle(a,l):void 0)),onClick:e=>{v("rowSelected",t,e)}},[(o(!0),u(be,null,$e(s(F),e=>{return o(),u("td",{class:w([L(e),s(oe).tableCellClass])},[s(f)[e]?Z(r.$slots,e,_t(Ce({key:0},t))):g(e)?Z(r.$slots,g(e),_t(Ce({key:1},t))):x(e)?(o(),X(i,{key:2,type:s(y),propType:x(e),modelValue:t},null,8,["type","propType","modelValue"])):(o(),X(d,{key:3,value:s(ce)(t,e),format:null!=(e=x(e=e))&&e.format?e.format:"TimeSpan"==(null==e?void 0:e.type)||"TimeOnly"==(null==e?void 0:e.type)?{method:"time"}:null},null,8,["value","format"]))],2)}),256))],14,of);var l,a}),256))],2)],2)],2)],2)],2)],2)):C("",!0)}}});let Rl=()=>(new Date).getTime(),uf=["/","T",":","-"],tt={assumeUtc:!0,date:{method:"Intl.DateTimeFormat",options:"{dateStyle:'medium'}"},maxFieldLength:150,maxNestedFields:2,maxNestedFieldLength:30},df=new Intl.RelativeTimeFormat(tt.locale,{}),An=31536e6,Vl={year:An,month:An/12,day:864e5,hour:36e5,minute:6e4,second:1e3},$t={currency:us,bytes:ds,link:cs,linkTel:fs,linkMailTo:ms,icon:vs,iconRounded:hs,attachment:gs,hidden:ps,time:ys,relativeTime:fn,relativeTimeFromMs:bl,formatDate:It,formatNumber:cn};"iconOnError"in globalThis||(globalThis.iconOnError=hl);class Be{}function cf(e){tt=Object.assign({},tt,e)}function ff(t){Object.keys(t||{}).forEach(e=>{"function"==typeof t[e]&&($t[e]=t[e])})}function Gt(e,t){return t?et("span",e,t):e}function us(e,t){var l=nt(t,["currency"]);return Gt(new Intl.NumberFormat(void 0,{style:"currency",currency:(null==t?void 0:t.currency)||"USD"}).format(e),l)}function ds(e,t){return Gt(Yl(e),t)}function cs(e,t){return et("a",e,vl({...t,href:e}))}function fs(e,t){return et("a",e,vl({...t,href:"tel:"+e}))}function ms(e,t){var{subject:l,body:a}=t=t||{},t=nt(t,["subject","body"]),n={};return l&&(n.subject=l),a&&(n.body=a),et("a",e,vl({...t,href:"mailto:"+Rt(e,n)}))}function vs(e,t){return et("img",void 0,Object.assign({class:"w-6 h-6",title:e,src:Ct(e),onerror:"iconOnError(this)"},t))}function hs(e,t){return et("img",void 0,Object.assign({class:"w-8 h-8 rounded-full",title:e,src:Ct(e),onerror:"iconOnError(this)"},t))}function gs(e,t){var l=Zl(e),a=(null==Qt(l)||Xl(e)?Ct:en)(e),a=Ct(a),n=t&&(t["icon-class"]||t.iconClass),a=et("img",void 0,Object.assign({class:"w-6 h-6",src:a,onerror:"iconOnError(this,'att')"},n?{class:n}:null));return et("a",a+`<span class="pl-1">${l}</span>`,Object.assign({class:"flex",href:Ct(e),title:e},t?nt(t,["icon-class","iconClass"]):null))}function ps(e){return""}function ys(e,t){var l="string"==typeof e?new Date(1e3*Dn(e)):fl(e)?bt(e):null;return Gt(l?na(l):e,t)}function It(e,t){var l,a;return null==e?"":(l="number"==typeof e?new Date(e):"string"==typeof e?bt(e):e,fl(l)?Gt(("function"==typeof(a=tt.date?wl(tt.date):null)?a:In)(l),t):(console.warn(l+" is not a Date value"),null==e?"":""+e))}function cn(e,t){if("number"!=typeof e)return e;let l=tt.number?wl(tt.number):null,a="function"==typeof l?l(e):""+e;return""===a&&(console.warn(`formatNumber(${e}) => `+a,l),a=""+e),Gt(a,t)}function bs(t,l,a){var e=sa(t),n=l?wl(l):null;if("function"!=typeof n)return(null!=e?fl(e)?It(e,a):"number"==typeof e?cn(e,a):e:null)??"";{let e=a;if(null!=l&&l.options)try{e=Ql(l.options,a)}catch(e){console.error(`Could not evaluate '${l.options}'`,e,", with scope:",a)}return n(t,e)}}function zt(e,t,l){return(yt(e)?bs:pf)(e,t,l)}function mf(e){if(null!=e){if("number"==typeof e)return e;if(fl(e))return e.getTime()-Rl();if("string"==typeof e){var t=Number(e);if(!isNaN(t))return t;if("P"===e[0]||e.startsWith("-P"))return 1e3*Dn(e)*-1;if(0<=aa(e,uf))return bt(e).getTime()-Rl()}}return NaN}function bl(e,t){for(var l in Vl)if(Math.abs(e)>Vl[l]||"second"===l)return(t||df).format(Math.round(e/Vl[l]),l)}function fn(e,t){e=mf(e);return isNaN(e)?"":bl(e,t)}function vf(e,t){return bl(e.getTime()-(t?t.getTime():Rl()))}function wl(l){if(l){let{method:e,options:a}=l,n=e+`(${a})`,s=$t[n]||$t[e];if("function"==typeof s)return s;let r=l.locale||tt.locale;if(e.startsWith("Intl.")){l=r?`'${r}'`:"undefined",l=`return new ${e}(${l},${a||"undefined"})`;try{let t=Function(l)();return s="Intl.DateTimeFormat"===e?e=>t.format(bt(e)):"Intl.NumberFormat"===e?e=>t.format(Number(e)):"Intl.RelativeTimeFormat"===e?e=>fn(e,t):e=>t.format(e),$t[n]=s}catch(e){console.error("Invalid format: "+l,e)}}else{let l=globalThis[e];if("function"==typeof l){let t=null!=a?Function("return "+a)():void 0;return s=e=>l(e,t,r),$t[n]=s}console.error(`No '${e}' function exists`,Object.keys($t))}}return null}function ws(e,t){return e?e.length>t?e.substring(0,t)+"...":e:""}function xs(e){return"/Date("===e.substring(0,6)?It(bt(e)):e}function hf(e){return mn(St(e)).replace(/"/g,"")}function ks(e){if(null==e||""===e)return"";if("string"==typeof e)try{return JSON.parse(e)}catch{console.warn("couldn't parse as JSON",e)}return e}function mn(e,t=4){return"object"!=typeof(e=ks(e))?"string"==typeof e?e:""+e:JSON.stringify(e,void 0,t)}function gf(e){return"object"!=typeof(e=ks(e))?"string"==typeof e?e:""+e:mn(e=St(e=Object.assign({},e)))}function St(l){if(null==l)return null;if("string"==typeof l)return xs(l);if(yt(l))return l;if(l instanceof Date)return It(l);if(Array.isArray(l))return l.map(St);if("object"!=typeof l)return l;{let t={};return Object.keys(l).forEach(e=>{"__type"!=e&&(t[e]=St(l[e]))}),t}}function pf(e,t,l){let a=e;if(Array.isArray(e)){if(yt(e[0]))return a.join(",");null!=e[0]&&(a=e[0])}if(null==a)return"";if(a instanceof Date)return It(a,l);var n=Object.keys(a),s=[];for(let e=0;e<Math.min(tt.maxNestedFields,n.length);e++){var r=n[e],o=""+St(a[r]);s.push(`<b class="font-medium">${r}</b>: `+Al(ws(xs(o),tt.maxNestedFieldLength)))}return 2<n.length&&s.push("..."),et("span","{ "+s.join(", ")+" }",Object.assign({title:Al(hf(e))},l))}function jm(){return{Formats:Be,setDefaultFormats:cf,setFormatters:ff,formatValue:zt,formatter:wl,dateInputFormat:ml,currency:us,bytes:ds,link:cs,linkTel:fs,linkMailTo:ms,icon:vs,iconRounded:hs,attachment:gs,hidden:ps,time:ys,relativeTime:fn,relativeTimeFromDate:vf,relativeTimeFromMs:bl,formatDate:It,formatNumber:cn,indentJson:mn,prettyJson:gf,scrub:St,truncate:ws,apiValueFmt:bs,iconOnError:hl}}ye(Be,"currency",{method:"currency"}),ye(Be,"bytes",{method:"bytes"}),ye(Be,"link",{method:"link"}),ye(Be,"linkTel",{method:"linkTel"}),ye(Be,"linkMailTo",{method:"linkMailTo"}),ye(Be,"icon",{method:"icon"}),ye(Be,"iconRounded",{method:"iconRounded"}),ye(Be,"attachment",{method:"attachment"}),ye(Be,"time",{method:"time"}),ye(Be,"relativeTime",{method:"relativeTime"}),ye(Be,"relativeTimeFromMs",{method:"relativeTimeFromMs"}),ye(Be,"date",{method:"formatDate"}),ye(Be,"number",{method:"formatNumber"}),ye(Be,"hidden",{method:"hidden"});const yf=Y({props:{type:Object,propType:Object,modelValue:Object},setup(i,{attrs:u}){const d=Je()["typeOf"];return()=>{var e,t;const l=null!=(e=i.propType)&&e.format?e.format:"TimeSpan"==(null==e?void 0:e.type)||"TimeOnly"==(null==e?void 0:e.type)?{method:"time"}:null,a=ce(i.modelValue,i.propType.name),n=Object.assign({},i,u),s=ft("span",{innerHTML:zt(a,l,n)}),r=Et(a)&&Array.isArray(a)?ft("span",{},[ft("span",{class:"mr-2"},""+a.length),s]):s,o=null==(e=i.propType)?void 0:e.ref;return o&&(e=Ke(i.type).find(e=>e.type===o.model))&&(e=(e=ce(i.modelValue,e.name))&&o.refLabel&&ce(e,o.refLabel))?(t=(t=null==(t=d(o.model))?void 0:t.icon)?ft(as,{image:t,class:"w-5 h-5 mr-1"}):null,ft("span",{class:"flex",title:o.model+" "+a},[t,e])):r}}}),bf={key:0},wf={key:0,class:"mr-2"},xf=["innerHTML"],kf=["innerHTML"],$f={inheritAttrs:!1},Cf=Y({...$f,__name:"PreviewFormat",props:{value:null,format:null,includeIcon:{type:Boolean,default:!0},includeCount:{type:Boolean,default:!0},maxFieldLength:{default:150},maxNestedFields:{default:2},maxNestedFieldLength:{default:30}},setup(l){const e=l,a=c(()=>Array.isArray(e.value));return(e,t)=>s(Et)(l.value)?(o(),u("span",bf,[l.includeCount&&s(a)?(o(),u("span",wf,V(l.value.length),1)):C("",!0),n("span",{innerHTML:s(zt)(l.value,l.format,e.$attrs)},null,8,xf)])):(o(),u("span",{key:1,innerHTML:s(zt)(l.value,l.format,e.$attrs)},null,8,kf))}}),_f=["innerHTML"],Lf={key:0},Vf=n("b",null,null,-1),Mf={key:2},Sf=Y({__name:"HtmlFormat",props:{value:null,depth:{default:0},fieldAttrs:null,classes:{type:Function,default:(e,t,l,a,n)=>a}},setup(r){const t=r,i=c(()=>yt(t.value)),d=c(()=>Array.isArray(t.value)),v=e=>Pn(e),p=e=>t.fieldAttrs?t.fieldAttrs(e):null,f=c(()=>Il(t.value));return(e,t)=>{const l=U("HtmlFormat",!0);return o(),u("div",{class:w(0==r.depth?"prose html-format":"")},[s(i)?(o(),u("div",{key:0,innerHTML:s(zt)(r.value)},null,8,_f)):s(d)?(o(),u("div",{key:1,class:w(r.classes("array","div",r.depth,s(oe).gridClass))},[s(yt)(r.value[0])?(o(),u("div",Lf,"[ "+V(r.value.join(", "))+" ]",1)):(o(),u("div",{key:1,class:w(r.classes("array","div",r.depth,s(oe).grid2Class))},[n("div",{class:w(r.classes("array","div",r.depth,s(oe).grid3Class))},[n("div",{class:w(r.classes("array","div",r.depth,s(oe).grid4Class))},[n("table",{class:w(r.classes("object","table",r.depth,s(oe).tableClass))},[n("thead",{class:w(r.classes("array","thead",r.depth,s(oe).theadClass))},[n("tr",null,[(o(!0),u(be,null,$e(s(f),e=>(o(),u("th",{class:w(r.classes("array","th",r.depth,s(oe).theadCellClass+" whitespace-nowrap"))},[Vf,he(V(v(e)),1)],2))),256))])],2),n("tbody",null,[(o(!0),u(be,null,$e(r.value,(t,e)=>(o(),u("tr",{class:w(r.classes("array","tr",r.depth,e%2==0?"bg-white":"bg-gray-50",e))},[(o(!0),u(be,null,$e(s(f),e=>(o(),u("td",{class:w(r.classes("array","td",r.depth,s(oe).tableCellClass))},[fe(l,Ce({value:t[e],"field-attrs":r.fieldAttrs,depth:r.depth+1,classes:r.classes},p(e)),null,16,["value","field-attrs","depth","classes"])],2))),256))],2))),256))])],2)],2)],2)],2))],2)):(o(),u("div",Mf,[n("table",{class:w(r.classes("object","table",r.depth,"table-object"))},[(o(!0),u(be,null,$e((a=r.value)?Object.keys(a).map(e=>({key:v(e),val:a[e]})):[],e=>(o(),u("tr",{class:w(r.classes("object","tr",r.depth,""))},[n("th",{class:w(r.classes("object","th",r.depth,"align-top py-2 px-4 text-left text-sm font-medium tracking-wider whitespace-nowrap"))},V(e.key),3),n("td",{class:w(r.classes("object","td",r.depth,"align-top py-2 px-4 text-sm"))},[fe(l,Ce({value:e.val,"field-attrs":r.fieldAttrs,depth:r.depth+1,classes:r.classes},p(e.key)),null,16,["value","field-attrs","depth","classes"])],2)],2))),256))],2)]))],2);var a}}}),Af={class:"absolute top-0 right-0 pt-4 pr-4"},Tf=n("span",{class:"sr-only"},"Close",-1),If=n("svg",{class:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),Ff=[Tf,If],Pf=Y({__name:"CloseButton",props:{buttonClass:{default:"bg-white dark:bg-black"}},emits:["close"],setup(l,{}){return(t,e)=>(o(),u("div",Af,[n("button",{type:"button",onClick:e[0]||(e[0]=e=>t.$emit("close")),class:w([l.buttonClass,"rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black"])},Ff,2)]))}}),Df=["id","aria-labelledby"],Of=n("div",{class:"fixed inset-0"},null,-1),jf={class:"fixed inset-0 overflow-hidden"},Bf={class:"flex h-full flex-col bg-white dark:bg-black shadow-xl"},Rf={class:"flex min-h-0 flex-1 flex-col overflow-auto"},Ef={class:"flex-1"},Hf={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},Nf={class:"flex items-start justify-between space-x-3"},zf={class:"space-y-1"},Uf=["id"],qf={key:1,class:"text-sm text-gray-500"},Qf={class:"flex h-7 items-center"},Kf={class:"flex-shrink-0 border-t border-gray-200 dark:border-gray-700 px-4 py-5 sm:px-6"},Gf=Y({__name:"SlideOver",props:{id:{default:"SlideOver"},title:null,contentClass:{default:"relative mt-6 flex-1 px-4 sm:px-6"}},emits:["done"],setup(a,{emit:e}){const t=I(!1),s=I(""),l={entering:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-full",to:"translate-x-0"},leaving:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-0",to:"translate-x-full"}},r=(At(t,()=>{Lt(l,s,t.value),t.value||setTimeout(()=>e("done"),700)}),t.value=!0,()=>t.value=!1),i=e=>{"Escape"===e.key&&r()};return lt(()=>window.addEventListener("keydown",i)),Ut(()=>window.removeEventListener("keydown",i)),(e,t)=>{var l=U("CloseButton");return o(),u("div",{id:a.id,class:"relative z-10","aria-labelledby":a.id+"-title",role:"dialog","aria-modal":"true"},[Of,n("div",jf,[n("div",{onMousedown:r,class:"absolute inset-0 overflow-hidden"},[n("div",{onMousedown:t[0]||(t[0]=je(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[n("div",{class:w(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",s.value])},[n("div",Bf,[n("div",Rf,[n("div",Ef,[n("div",Hf,[n("div",Nf,[n("div",zf,[a.title?(o(),u("h2",{key:0,class:"text-lg font-medium text-gray-900 dark:text-gray-50",id:a.id+"-title"},V(a.title),9,Uf)):C("",!0),e.$slots.subtitle?(o(),u("p",qf,[Z(e.$slots,"subtitle")])):C("",!0)]),n("div",Qf,[fe(l,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:r})])])]),n("div",{class:w(a.contentClass)},[Z(e.$slots,"default")],2)])]),n("div",Kf,[Z(e.$slots,"footer")])])],2)],32)],32)])],8,Df)}}}),Wf=["id","data-transition-for","aria-labelledby"],Zf={class:"fixed inset-0 z-10 overflow-y-auto"},Jf={class:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"},Xf=n("span",{class:"sr-only"},"Close",-1),Yf=n("svg",{class:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),e1=[Xf,Yf],t1=Y({__name:"ModalDialog",props:{id:{default:"ModalDialog"},sizeClass:{default:os.sizeClass}},emits:["done"],setup(a,{emit:e}){const t=I(!1),s=I(""),l={entering:{cls:"ease-out duration-300",from:"opacity-0",to:"opacity-100"},leaving:{cls:"ease-in duration-200",from:"opacity-100",to:"opacity-0"}},r=I(""),i={entering:{cls:"ease-out duration-300",from:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",to:"opacity-100 translate-y-0 sm:scale-100"},leaving:{cls:"ease-in duration-200",from:"opacity-100 translate-y-0 sm:scale-100",to:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"}},d=(At(t,()=>{Lt(l,s,t.value),Lt(i,r,t.value),t.value||setTimeout(()=>e("done"),200)}),t.value=!0,()=>t.value=!1),c=(qt("ModalProvider",{openModal:function(e,t){c.value=e,v.value=t}}),I()),v=I();async function p(e){v.value&&v.value(e),c.value=void 0,v.value=void 0}const f=e=>{"Escape"===e.key&&d()};return lt(()=>window.addEventListener("keydown",f)),Ut(()=>window.removeEventListener("keydown",f)),(e,t)=>{var l=U("ModalLookup");return o(),u("div",{id:a.id,"data-transition-for":a.id,onMousedown:d,class:"relative z-10","aria-labelledby":a.id+"-title",role:"dialog","aria-modal":"true"},[n("div",{class:w(["fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity",s.value])},null,2),n("div",Zf,[n("div",Jf,[n("div",{class:w(["relative transform overflow-hidden rounded-lg bg-white dark:bg-black text-left shadow-xl transition-all sm:my-8",a.sizeClass,r.value]),onMousedown:t[0]||(t[0]=je(()=>{},["stop"]))},[n("div",null,[n("div",{class:"hidden sm:block absolute top-0 right-0 pt-4 pr-4 z-10"},[n("button",{type:"button",onClick:d,class:"bg-white dark:bg-black rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black"},e1)]),Z(e.$slots,"default")])],34)])]),"ModalLookup"==(null==(t=c.value)?void 0:t.name)&&c.value.ref?(o(),X(l,{key:0,"ref-info":c.value.ref,onDone:p},null,8,["ref-info"])):C("",!0)],40,Wf)}}}),l1={class:"pt-2 overflow-auto",style:{"min-height":"620px"}},n1={class:"mt-3 pl-5 flex flex-wrap items-center"},s1={class:"hidden sm:block text-xl leading-6 font-medium text-gray-900 dark:text-gray-50 mr-3"},a1={class:"hidden md:inline"},o1={class:"flex pb-1 sm:pb-0"},i1=["title"],r1=n("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[n("g",{"stroke-width":"1.5",fill:"none"},[n("path",{d:"M9 3H3.6a.6.6 0 0 0-.6.6v16.8a.6.6 0 0 0 .6.6H9M9 3v18M9 3h6M9 21h6m0-18h5.4a.6.6 0 0 1 .6.6v16.8a.6.6 0 0 1-.6.6H15m0-18v18",stroke:"currentColor"})])],-1),u1=[r1],d1=["disabled"],c1=n("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[n("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z",fill:"currentColor"})],-1),f1=[c1],m1=["disabled"],v1=n("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[n("path",{d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z",fill:"currentColor"})],-1),h1=[v1],g1=["disabled"],p1=n("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[n("path",{d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z",fill:"currentColor"})],-1),y1=[p1],b1=["disabled"],w1=n("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[n("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z",fill:"currentColor"})],-1),x1=[w1],k1={key:0,class:"flex pb-1 sm:pb-0"},$1={class:"px-4 text-lg text-black dark:text-white"},C1={key:0},_1={key:1},L1=n("span",{class:"hidden xl:inline"}," Showing Results ",-1),V1={key:2},M1={key:1,class:"pl-2"},S1=n("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24"},[n("path",{fill:"currentColor",d:"M6.78 2.72a.75.75 0 0 1 0 1.06L4.56 6h8.69a7.75 7.75 0 1 1-7.75 7.75a.75.75 0 0 1 1.5 0a6.25 6.25 0 1 0 6.25-6.25H4.56l2.22 2.22a.75.75 0 1 1-1.06 1.06l-3.5-3.5a.75.75 0 0 1 0-1.06l3.5-3.5a.75.75 0 0 1 1.06 0Z"})],-1),A1=[S1],T1={class:"flex pb-1 sm:pb-0"},I1={key:0,class:"pl-2"},F1=n("svg",{class:"flex-none w-5 h-5 mr-2 text-gray-400 dark:text-gray-500 group-hover:text-gray-500","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[n("path",{"fill-rule":"evenodd",d:"M3 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z","clip-rule":"evenodd"})],-1),P1={class:"mr-1"},D1={key:0,class:"h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},O1=n("path",{"fill-rule":"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z","clip-rule":"evenodd"},null,-1),j1=[O1],B1={key:1,class:"h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},R1=n("path",{"fill-rule":"evenodd",d:"M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z","clip-rule":"evenodd"},null,-1),E1=[R1],H1={key:1},N1={key:4},z1={key:0},U1={key:0,class:"cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50"},q1={class:"mr-1 select-none"},Q1={key:1,class:"flex justify-between items-center"},K1={class:"mr-1 select-none"},G1=Y({__name:"ModalLookup",props:{id:{default:"ModalLookup"},refInfo:null,skip:{default:0},prefs:null,selectedColumns:null,allowFiltering:{type:[Boolean,null],default:!0},showPreferences:{type:[Boolean,null],default:!0},showPagingNav:{type:[Boolean,null],default:!0},showPagingInfo:{type:[Boolean,null],default:!0},showResetPreferences:{type:[Boolean,null],default:!0},showFiltersView:{type:[Boolean,null],default:!0},toolbarButtonClass:null,canFilter:null},emits:["done"],setup(v,{emit:l}){const p=v,f=Nl(),e=wt()["config"],{metadataApi:t,filterDefinitions:a}=Je(),r=Oe("client"),i=e.value.storage,m=c(()=>p.toolbarButtonClass??oe.toolbarButtonClass),g=c(()=>a.value),y=I({take:25}),h=I(new Ze),b=I(p.skip),x=I(!1),k=I(),d=e=>"string"==typeof e?e.split(","):e||[];function L(e,t){return oe.getTableRowClass("fullWidth",t,!1,!0)}const M=c(()=>it(p.refInfo.model)),S=c(()=>{var e=(0<(e=d(p.selectedColumns)).length?e:[]).map(e=>e.toLowerCase());const l=Ke(M.value);return 0<e.length?e.map(t=>l.find(e=>e.name.toLowerCase()===t)).filter(e=>null!=e):l}),T=c(()=>{let e=S.value.map(e=>e.name),t=d(y.value.selectedColumns).map(e=>e.toLowerCase());return 0<t.length?e.filter(e=>t.includes(e.toLowerCase())):e}),A=c(()=>y.value.take??25),j=c(()=>h.value.response?ce(h.value.response,"results"):[]),O=c(()=>{var e;return(null==(e=h.value.response)?void 0:e.total)??j.value.length??0}),$=c(()=>0<b.value),D=c(()=>0<b.value),B=c(()=>j.value.length>=A.value),F=c(()=>j.value.length>=A.value),H=I([]),Y=c(()=>H.value.some(e=>0<e.settings.filters.length||!!e.settings.sort)),z=c(()=>H.value.map(e=>e.settings.filters.length).reduce((e,t)=>e+t,0)),q=c(()=>Kt(M.value)),K=c(()=>{var e;return null==(e=t.value)?void 0:e.operations.find(e=>{var t;return(null==(t=e.dataModel)?void 0:t.name)==p.refInfo.model&&Te.isAnyQuery(e)})}),G=I(),P=I(!1),E=I(),_=()=>p.id+"/ApiPrefs/"+p.refInfo.model,N=e=>`Column/${p.id}:${p.refInfo.model}.`+e;async function R(e){b.value+=e,b.value<0&&(b.value=0);e=Math.floor(O.value/A.value)*A.value;b.value>e&&(b.value=e),await Q()}async function W(e,t){l("done",e)}function J(){l("done",null)}function ee(t,e){var l,a=e.target;"TD"!==(null==a?void 0:a.tagName)&&(a=null==(a=null==a?void 0:a.closest("TABLE"))?void 0:a.getBoundingClientRect(),l=H.value.find(e=>e.name.toLowerCase()==t.toLowerCase()))&&a&&(e=("DIV"===(null==(a=e.target)?void 0:a.tagName)?e.target:null==(a=e.target)?void 0:a.closest("DIV")).getBoundingClientRect(),E.value={column:l,topLeft:{x:Math.max(Math.floor(e.x+25),343),y:Math.floor(115)}})}function te(){E.value=null}async function le(e){var t=null==(t=E.value)?void 0:t.column;t&&(t.settings=e,i.setItem(N(t.name),JSON.stringify(t.settings)),await Q()),E.value=null}async function ae(e){i.setItem(N(e.name),JSON.stringify(e.settings)),await Q()}async function ne(e){P.value=!1,y.value=e,i.setItem(_(),JSON.stringify(e)),await Q()}async function Q(){(async function(a){var n=K.value;if(n){let e=Ht(n,a),t=Fn(e=>{h.value.response=h.value.error=void 0,x.value=e}),l=await r.api(e);t(),ul(()=>h.value=l);n=ce(l.response,"results")||[];l.succeeded&&n.label}else console.error("No Query API was found for "+p.refInfo.model)})(function(){let a={include:"total",take:A.value},e=d(y.value.selectedColumns||p.selectedColumns);{var t;0<e.length&&((t=q.value)&&e.includes(t.name)&&(e=[t.name,...e]),a.fields=e.join(","))}let n=[];return H.value.forEach(l=>{l.settings.sort&&n.push(("DESC"===l.settings.sort?"-":"")+l.name),l.settings.filters.forEach(e=>{var t=e.key.replace("%",l.name);a[t]=e.value})}),"u"<typeof a.skip&&0<b.value&&(a.skip=b.value),0<n.length&&(a.orderBy=n.join(",")),a}())}async function se(){H.value.forEach(e=>{e.settings={filters:[]},i.removeItem(N(e.name))}),await Q()}return lt(async()=>{var e=p.prefs||il(i.getItem(_()));e&&(y.value=e),H.value=S.value.map(e=>({name:e.name,type:e.type,meta:e,settings:Object.assign({filters:[]},il(i.getItem(N(e.name))))})),isNaN(p.skip)||(b.value=p.skip),await Q()}),(l,e)=>{const t=U("ErrorSummary"),a=U("Loading"),r=U("SettingsIcons"),i=U("DataGrid"),d=U("ModalDialog");return o(),u(be,null,[v.refInfo?(o(),X(d,{key:0,ref_key:"modalDialog",ref:G,id:v.id,onDone:J},{default:ve(()=>[n("div",l1,[n("div",n1,[n("h3",s1,[he(" Select "),n("span",a1,V(s(Ie)(v.refInfo.model)),1)]),n("div",o1,[v.showPreferences?(o(),u("button",{key:0,type:"button",class:"pl-2 text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400",title:v.refInfo.model+" Preferences",onClick:e[0]||(e[0]=e=>P.value=!P.value)},u1,8,i1)):C("",!0),v.showPagingNav?(o(),u("button",{key:1,type:"button",class:w(["pl-2",s($)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"First page",disabled:!s($),onClick:e[1]||(e[1]=e=>R(-s(O)))},f1,10,d1)):C("",!0),v.showPagingNav?(o(),u("button",{key:2,type:"button",class:w(["pl-2",s(D)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Previous page",disabled:!s(D),onClick:e[2]||(e[2]=e=>R(-s(A)))},h1,10,m1)):C("",!0),v.showPagingNav?(o(),u("button",{key:3,type:"button",class:w(["pl-2",s(B)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Next page",disabled:!s(B),onClick:e[3]||(e[3]=e=>R(s(A)))},y1,10,g1)):C("",!0),v.showPagingNav?(o(),u("button",{key:4,type:"button",class:w(["pl-2",s(F)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Last page",disabled:!s(F),onClick:e[4]||(e[4]=e=>R(s(O)))},x1,10,b1)):C("",!0)]),v.showPagingInfo?(o(),u("div",k1,[n("div",$1,[x.value?(o(),u("span",C1,"Querying...")):C("",!0),s(j).length?(o(),u("span",_1,[L1,he(" "+V(b.value+1)+" - "+V(Math.min(b.value+s(j).length,s(O)))+" ",1),n("span",null," of "+V(s(O)),1)])):h.value.completed?(o(),u("span",V1,"No Results")):C("",!0)])])):C("",!0),s(Y)&&v.showResetPreferences?(o(),u("div",M1,[n("button",{type:"button",onClick:se,title:"Reset Preferences & Filters",class:w(s(m))},A1,2)])):C("",!0),n("div",T1,[v.showFiltersView&&0<s(z)?(o(),u("div",I1,[n("button",{type:"button",onClick:e[5]||(e[5]=e=>k.value="filters"==k.value?null:"filters"),class:w(s(m)),"aria-expanded":"false"},[F1,n("span",P1,V(s(z))+" "+V(1==s(z)?"Filter":"Filters"),1),"filters"!=k.value?(o(),u("svg",D1,j1)):(o(),u("svg",B1,E1))],2)])):C("",!0)])]),"filters"==k.value?(o(),X(un,{key:0,class:"border-y border-gray-200 dark:border-gray-800 py-8 my-2",definitions:s(g),columns:H.value,onDone:e[6]||(e[6]=e=>k.value=null),onChange:ae},null,8,["definitions","columns"])):C("",!0),E.value?(o(),u("div",H1,[fe(rn,{definitions:s(g),column:E.value.column,"top-left":E.value.topLeft,onDone:te,onSave:le},null,8,["definitions","column","top-left"])])):C("",!0),h.value.error?(o(),X(t,{key:2,status:h.value.error},null,8,["status"])):x.value?(o(),X(a,{key:3})):(o(),u("div",N1,[s(j).length?(o(),u("div",z1,[fe(i,{id:v.id,items:s(j),type:v.refInfo.model,"selected-columns":s(T),onFiltersChanged:Q,tableStyle:"fullWidth",rowClass:L,onRowSelected:W,onHeaderSelected:ee},zl({header:ve(({column:t,label:e})=>{return[!v.allowFiltering||p.canFilter&&!p.canFilter(t)?(o(),u("div",Q1,[n("span",K1,V(e),1)])):(o(),u("div",U1,[n("span",q1,V(e),1),fe(r,{column:H.value.find(e=>e.name.toLowerCase()===t.toLowerCase()),"is-open":(null==(e=E.value)?void 0:e.column.name)===t},null,8,["column","is-open"])]))]}),_:2},[$e(Object.keys(s(f)),t=>({name:t,fn:ve(e=>[Z(l.$slots,t,_t(al(e)))])}))]),1032,["id","items","type","selected-columns"])])):C("",!0)]))])]),_:3},8,["id"])):C("",!0),P.value?(o(),X(dn,{key:1,columns:s(S),prefs:y.value,onDone:e[7]||(e[7]=e=>P.value=!1),onSave:ne},null,8,["columns","prefs"])):C("",!0)],64)}}}),W1={class:"sm:hidden"},Z1=["for"],J1=["id","name"],X1=["value"],Y1={class:"hidden sm:block"},em={class:"border-b border-gray-200"},tm={class:"-mb-px flex","aria-label":"Tabs"},lm=["onClick"],nm=Y({__name:"Tabs",props:{tabs:null,id:{default:"tabs"},param:{default:"tab"},label:{type:Function,default:e=>Ie(e)},selected:null,tabClass:null,bodyClass:{default:"p-4"},url:{type:Boolean,default:!0}},setup(l){const t=l,a=c(()=>Object.keys(t.tabs)),r=e=>t.label?t.label(e):Ie(e),i=c(()=>t.id||"tabs"),d=c(()=>t.param||"tab"),v=I();function p(e){v.value=e,t.url&&ql({tab:e===a.value[0]?void 0:e})}const f=c(()=>100/Object.keys(t.tabs).length+"%");return lt(()=>{var e;v.value=Object.keys(t.tabs)[0],t.url&&(e=Tl(location.search)[d.value])&&(v.value=e)}),(e,t)=>(o(),u("div",null,[n("div",W1,[n("label",{for:s(i),class:"sr-only"},"Select a tab",8,Z1),n("select",{id:s(i),name:s(i),class:"block w-full rounded-md border-gray-300 focus:border-indigo-500 focus:ring-indigo-500",onChange:t[0]||(t[0]=e=>{return p(null==(e=e.target)?void 0:e.value)})},[(o(!0),u(be,null,$e(s(a),e=>(o(),u("option",{key:e,value:e},V(r(e)),9,X1))),128))],40,J1)]),n("div",Y1,[n("div",em,[n("nav",tm,[(o(!0),u(be,null,$e(s(a),t=>{return o(),u("a",{href:"#",onClick:je(e=>p(t),["prevent"]),style:El({width:s(f)}),class:w([(e=t,v.value===e?"border-indigo-500 text-indigo-600 py-4 px-1 text-center border-b-2 font-medium text-sm":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 py-4 px-1 text-center border-b-2 font-medium text-sm"),l.tabClass])},V(r(t)),15,lm);var e}),256))])])]),n("div",{class:w(l.bodyClass)},[(o(),X(Us(l.tabs[v.value])))],2)]))}}),sm=n("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 text-gray-400",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 32 32"},[n("path",{fill:"currentColor",d:"M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3Z"})],-1),am=[sm],om=n("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 text-indigo-600",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 32 32"},[n("path",{fill:"currentColor",d:"M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6ZM5.394 6.813L6.81 5.399l3.505 3.506L8.9 10.319zM2 15.005h5v2H2zm3.394 10.193L8.9 21.692l1.414 1.414l-3.505 3.506zM15 25.005h2v5h-2zm6.687-1.9l1.414-1.414l3.506 3.506l-1.414 1.414zm3.313-8.1h5v2h-5zm-3.313-6.101l3.506-3.506l1.414 1.414l-3.506 3.506zM15 2.005h2v5h-2z"})],-1),im=[om],rm=Y({__name:"DarkModeToggle",setup(e){const l=typeof document<"u"?document.querySelector("html"):null;let a=I(null==l?void 0:l.classList.contains("dark"));return(e,t)=>(o(),u("button",{type:"button",class:"bg-gray-200 dark:bg-gray-700 relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black",role:"switch","aria-checked":"false",onClick:t[0]||(t[0]=e=>{a.value?null!=l&&l.classList.remove("dark"):null!=l&&l.classList.add("dark"),a.value=!a.value,localStorage.setItem("color-scheme",a.value?"dark":"light")})},[n("span",{class:w(`${s(a)?"translate-x-0":"translate-x-5"} pointer-events-none relative inline-block h-5 w-5 rounded-full bg-white dark:bg-black shadow transform ring-0 transition ease-in-out duration-200`)},[n("span",{class:w(`${s(a)?"opacity-100 ease-in duration-200":"opacity-0 ease-out duration-100"} absolute inset-0 h-full w-full flex items-center justify-center transition-opacity`),"aria-hidden":"true"},am,2),n("span",{class:w(`${s(a)?"opacity-0 ease-out duration-100":"opacity-100 ease-in duration-200"} absolute inset-0 h-full w-full flex items-center justify-center transition-opacity`),"aria-hidden":"true"},im,2)],2)]))}}),um={key:0},dm={key:1,class:"min-h-full flex flex-col justify-center py-12 sm:px-6 lg:px-8"},cm={class:"sm:mx-auto sm:w-full sm:max-w-md"},fm={class:"mt-6 text-center text-3xl font-extrabold text-gray-900"},mm={key:0,class:"mt-4 text-center text-sm text-gray-600"},vm={class:"relative z-0 inline-flex shadow-sm rounded-md"},hm={class:"mt-8 sm:mx-auto sm:w-full sm:max-w-md"},gm={class:"bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10"},pm=["onSubmit"],ym={class:"mt-8"},bm={key:1,class:"mt-6"},wm=dl('<div class="relative"><div class="absolute inset-0 flex items-center"><div class="w-full border-t border-gray-300"></div></div><div class="relative flex justify-center text-sm"><span class="px-2 bg-white text-gray-500"> Or continue with </span></div></div>',1),xm={class:"mt-6 grid grid-cols-3 gap-3"},km=["href","title"],$m={key:1,class:"h-5 w-5 text-gray-700",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},Cm=n("path",{d:"M16 8a5 5 0 1 0 5 5a5 5 0 0 0-5-5z",fill:"currentColor"},null,-1),_m=n("path",{d:"M16 2a14 14 0 1 0 14 14A14.016 14.016 0 0 0 16 2zm7.992 22.926A5.002 5.002 0 0 0 19 20h-6a5.002 5.002 0 0 0-4.992 4.926a12 12 0 1 1 15.985 0z",fill:"currentColor"},null,-1),Lm=[Cm,_m],Vm=Y({__name:"SignIn",props:{provider:null,title:{default:"Sign In"},tabs:{type:[Boolean,String],default:!0},oauth:{type:[Boolean,String],default:!0}},emits:["login"],setup(v,{emit:t}){const l=v,{getMetadata:e,createDto:a}=Je(),r=yl(),i=on()["signIn"],d=e({assert:!0}),p=d.plugins.auth,f=document.baseURI,m=d.app.baseUrl,g=I(a("Authenticate")),y=I(new Ze),h=(lt(()=>{null!=p&&p.authProviders.map(e=>e.formLayout).filter(e=>e).forEach(e=>e.forEach(e=>g.value[e.id]=""))}),c(()=>(null==p?void 0:p.authProviders.filter(e=>e.formLayout))||[])),b=c(()=>h.value[0]||{}),x=c(()=>h.value[Math.max(h.value.length-1,0)]||{}),k=c(()=>(l.provider?null==p?void 0:p.authProviders.find(e=>e.name===l.provider):null)??b.value),L=e=>!1===e||"false"===e;function M(e){return e.label||e.navItem&&e.navItem.label}const S=c(()=>{var e;return((null==(e=k.value)?void 0:e.formLayout)||[]).map(e=>{var t;return Object.assign({},e,{type:null==(t=e.type)?void 0:t.toLowerCase(),autocomplete:e.autocomplete||("password"===(null==(t=e.type)?void 0:t.toLowerCase())?"current-password":void 0)||("username"===e.id.toLowerCase()?"username":void 0),css:Object.assign({field:"col-span-12"},e.css)})})}),T=c(()=>!L(l.oauth)&&(null==p?void 0:p.authProviders.filter(e=>"oauth"===e.type))||[]),A=c(()=>{let e=oa(null==p?void 0:p.authProviders.filter(e=>e.formLayout&&0<e.formLayout.length),(e,t)=>{e[M(t)||Ye(t.name)]=t.name===b.value.name?"":t.name});var t=k.value;return e=t&&L(l.tabs)?{[M(t)||Ye(t.name)]:t}:e}),j=c(()=>{var e=S.value.map(e=>e.id).filter(e=>e);return y.value.summaryMessage(e)});async function O(){var e;g.value.provider=k.value.name,y.value=await r.api(g.value),y.value.succeeded&&(e=y.value.response,i(e),t("login",e),y.value=new Ze,g.value=a("Authenticate"))}return(e,t)=>{const l=U("ErrorSummary"),a=U("AutoFormFields"),r=U("PrimaryButton"),i=U("Icon"),d=qs("href");return s(p)?(o(),u("div",dm,[n("div",cm,[n("h2",fm,V(v.title),1),1<Object.keys(s(A)).length?(o(),u("p",mm,[n("span",vm,[(o(!0),u(be,null,$e(s(A),(e,t)=>gt((o(),u("a",{class:w([""===e||e===s(b).name?"rounded-l-md":e===s(x).name?"rounded-r-md -ml-px":"-ml-px",v.provider===e?"z-10 outline-none ring-1 ring-indigo-500 border-indigo-500":"","cursor-pointer relative inline-flex items-center px-4 py-1 border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50"])},[he(V(t),1)],2)),[[d,{provider:e}]])),256))])])):C("",!0)]),n("div",hm,[s(j)?(o(),X(l,{key:0,class:"mb-3",errorSummary:s(j)},null,8,["errorSummary"])):C("",!0),n("div",gm,[s(S).length?(o(),u("form",{key:0,onSubmit:je(O,["prevent"])},[fe(a,{modelValue:g.value,formLayout:s(S),api:y.value,hideSummary:!0,"divide-class":"","space-class":"space-y-6"},null,8,["modelValue","formLayout","api"]),n("div",ym,[fe(r,{class:"w-full"},{default:ve(()=>[he("Sign In")]),_:1})])],40,pm)):C("",!0),s(T).length?(o(),u("div",bm,[wm,n("div",xm,[(o(!0),u(be,null,$e(s(T),e=>(o(),u("div",null,[n("a",{href:s(m)+e.navItem.href+"?continue="+s(f),title:M(e),class:"w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"},[e.icon?(o(),X(i,{key:0,image:e.icon,class:"h-5 w-5 text-gray-700"},null,8,["image"])):(o(),u("svg",$m,Lm))],8,km)]))),256))])])):C("",!0)])])])):(o(),u("div",um,"No Auth Plugin"))}}}),Mm={Alert:xa,AlertSuccess:Fa,ErrorSummary:Ba,InputDescription:Ea,Icon:as,Loading:ko,OutlineButton:_o,PrimaryButton:Mo,SecondaryButton:To,TextLink:Io,Breadcrumbs:Bo,Breadcrumb:zo,NavList:Qo,NavListItem:ni,AutoQueryGrid:Lu,SettingsIcons:Eu,FilterViews:un,FilterColumn:rn,QueryPrefs:dn,EnsureAccess:rs,EnsureAccessDialog:Hu,TextInput:Ju,TextareaInput:sd,SelectInput:dd,CheckboxInput:yd,TagInput:Hd,FileInput:dc,Autocomplete:Lc,Combobox:Sc,DynamicInput:Ac,LookupInput:Qc,AutoFormFields:Kc,AutoForm:t0,AutoCreateForm:C0,AutoEditForm:K0,ConfirmDelete:Z0,FormLoading:lf,DataGrid:rf,CellFormat:yf,PreviewFormat:Cf,HtmlFormat:Sf,CloseButton:Pf,SlideOver:Gf,ModalDialog:t1,ModalLookup:G1,Tabs:nm,DarkModeToggle:rm,SignIn:Vm},Sm=["onClick","title"],Am=Y({__name:"RouterLink",props:{to:null},setup(l){const e=l,t=wt()["config"],a=()=>t.value.navigate(e.to??"/");return(e,t)=>(o(),u("a",Ce({onClick:je(a,["prevent"]),title:l.to,href:"javascript:void(0)"},e.$attrs),[Z(e.$slots,"default")],16,Sm))}}),Tm={RouterLink:Am},Ml=Mm,Bm={install(t){Object.keys(Ml).forEach(e=>{t.component(e,Ml[e])})},component(e){return e&&(Ml[e]||Tm[e])||null}};export{Om as css,Bm as default,on as useAuth,yl as useClient,wt as useConfig,Dm as useFiles,jm as useFormatters,Je as useMetadata,za as useUtils};