diff --git a/MyApp/wwwroot/lib/mjs/servicestack-client.min.mjs b/MyApp/wwwroot/lib/mjs/servicestack-client.min.mjs index a02d760..10baa79 100644 --- a/MyApp/wwwroot/lib/mjs/servicestack-client.min.mjs +++ b/MyApp/wwwroot/lib/mjs/servicestack-client.min.mjs @@ -1 +1 @@ -class ResponseStatus{constructor(e){Object.assign(this,e)}errorCode;message;stackTrace;errors;meta}class ResponseError{constructor(e){Object.assign(this,e)}errorCode;fieldName;message;meta}class ErrorResponse{constructor(e){Object.assign(this,e)}type;responseStatus}class EmptyResponse{constructor(e){Object.assign(this,e)}responseStatus}class NavItem{label;href;exact;id;className;iconClass;show;hide;children;meta;constructor(e){Object.assign(this,e)}}class GetNavItems{constructor(e){Object.assign(this,e)}createResponse(){return new GetNavItemsResponse}getTypeName(){return"GetNavItems"}getMethod(){return"GET"}}class GetNavItemsResponse{baseUrl;results;navItemsMap;meta;responseStatus;constructor(e){Object.assign(this,e)}}class MetadataTypesConfig{baseUrl;defaultNamespaces;defaultImports;includeTypes;excludeTypes;treatTypesAsStrings;globalNamespace;ignoreTypes;exportTypes;exportAttributes;ignoreTypesInNamespaces;constructor(e){Object.assign(this,e)}}class MetadataRoute{path;verbs;notes;summary;constructor(e){Object.assign(this,e)}}class MetadataOperationType{request;response;actions;returnsVoid;returnType;routes;dataModel;viewModel;requiresAuth;requiredRoles;requiresAnyRole;requiredPermissions;requiresAnyPermission;tags;constructor(e){Object.assign(this,e)}}class MetadataTypes{config;namespaces;types;operations;constructor(e){Object.assign(this,e)}}class MetadataTypeName{name;namespace;genericArgs;constructor(e){Object.assign(this,e)}}class MetadataDataContract{name;namespace;constructor(e){Object.assign(this,e)}}class MetadataDataMember{name;order;isRequired;emitDefaultValue;constructor(e){Object.assign(this,e)}}class MetadataAttribute{name;constructorArgs;args;constructor(e){Object.assign(this,e)}}class MetadataPropertyType{name;type;isValueType;isSystemType;isEnum;isPrimaryKey;typeNamespace;genericArgs;value;description;dataMember;readOnly;paramType;displayType;isRequired;allowableValues;allowableMin;allowableMax;attributes;constructor(e){Object.assign(this,e)}}class MetadataType{name;namespace;genericArgs;inherits;implements;displayType;description;isNested;isEnum;isEnumInt;isInterface;isAbstract;dataContract;properties;attributes;innerTypes;enumNames;enumValues;enumMemberValues;enumDescriptions;meta;constructor(e){Object.assign(this,e)}}class NewInstanceResolver{tryResolve(e){return new e}}class SingletonInstanceResolver{tryResolve(e){return e.instance||(e.instance=new e)}}function eventMessageType(e){switch(e){case"onConnect":return"ServerEventConnect";case"onHeartbeat":return"ServerEventHeartbeat";case"onJoin":return"ServerEventJoin";case"onLeave":return"ServerEventLeave";case"onUpdate":return"ServerEventUpdate"}return null}var ReadyState,Types;!function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSED=2]="CLOSED"}(ReadyState=ReadyState||{});class ServerEventsClient{channels;options;eventSource;static UnknownChannel="*";eventStreamUri;updateSubscriberUrl;connectionInfo;serviceClient;stopped;resolver;listeners;EventSource;withCredentials;constructor(e,t,r={},s=null){if(this.channels=t,this.options=r,this.eventSource=s,0===this.channels.length)throw"at least 1 channel is required";this.resolver=this.options.resolver||new NewInstanceResolver,this.eventStreamUri=combinePaths(e,"event-stream")+"?",this.updateChannels(t),this.serviceClient=new JsonServiceClient(e),this.listeners={},this.withCredentials=!0,this.options.handlers||(this.options.handlers={})}onMessage=e=>{if("undefined"==typeof document){var t,r,s,n=e.data?e.data.indexOf("\n"):-1;if(0<=n)return t=e.data,s=e.lastEventId,r=Object.assign({},{lastEventId:s,data:t.substring(0,n)}),s=Object.assign({},{lastEventId:s,data:t.substring(n+1)}),this._onMessage(r),void this._onMessage(s)}this._onMessage(e)};_onMessage=a=>{if(!this.stopped){let n=this.options;void 0===o&&(o={querySelectorAll:e=>[]});var o,i=splitOnFirst(a.data," ");let e=null,t=i[0];var l=splitOnFirst(t,"@"),l=(1{if(this.eventSource.readyState===EventSource.CLOSED)clearInterval(n.heartbeat),null!=(e=n.handlers.onStop)&&e.apply(this.eventSource),this.reconnectServerEvents({error:new Error("EventSource is CLOSED")});else{var e=new Request(n.heartbeatUrl,{method:"POST",mode:"cors",headers:s,credentials:this.serviceClient.credentials});try{var t,r=await fetch(e);r.ok?await r.text():(t=new Error(r.status+" - "+r.statusText),this.reconnectServerEvents({error:t}))}catch(e){this.reconnectServerEvents({error:e})}}},this.connectionInfo&&this.connectionInfo.heartbeatIntervalMs||n.heartbeatIntervalMs||1e4)),n.unRegisterUrl&&"undefined"!=typeof window&&(window.onunload=()=>{navigator.sendBeacon?(this.stopped=!0,this.eventSource&&this.eventSource.close(),navigator.sendBeacon(n.unRegisterUrl)):this.stop()}),this.updateSubscriberUrl=n.updateSubscriberUrl,this.updateChannels((n.channels||"").split(","))}else{p="onJoin"==h||"onLeave"==h||"onUpdate"==h;let e=n.handlers[h];e?p?e.call(f||o.body,l):e.call(f||o.body,r,a):p||(c=n.receivers&&n.receivers.cmd,this.invokeReceiver(c,h,f,a,"cmd")),p&&(e=n.handlers.onCommand)&&e.call(f||o.body,l)}else"trigger"===u?this.raiseEvent(i,a):"css"===u&&css(d||$$("body"),h,r);c=n.receivers&&n.receivers[u];this.invokeReceiver(c,h,f,a,u),eventMessageType(h)||(p=n.handlers.onMessage)&&p.call(f||o.body,l),n.onTick&&n.onTick()}}};onError=e=>{var t;this.stopped||(e=e||event,null!=(t=this.options.onException)&&t.call(this.eventSource,e),this.options.onTick&&this.options.onTick())};getEventSourceOptions(){return{withCredentials:this.withCredentials}}reconnectServerEvents(t={}){if(!this.stopped){t.error&&this.onError(t.error);const n=this.eventSource;let e=t.url||this.eventStreamUri||n.url;null!=this.options.resolveStreamUrl&&(e=this.options.resolveStreamUrl(e));var r=new(this.EventSource||EventSource)(e,this.getEventSourceOptions()),s=(r.addEventListener("error",e=>(t.onerror||n.onerror||this.onError)(e)),r.addEventListener("message",t.onmessage||n.onmessage||this.onMessage),this.options.onReconnect);return null!=s&&s.call(r,t.error),n.removeEventListener&&(n.removeEventListener("error",this.onError),n.removeEventListener("message",this.onMessage)),n.close(),this.eventSource=r}}start(){if(this.stopped=!1,null==this.eventSource||this.eventSource.readyState===EventSource.CLOSED){let e=this.eventStreamUri;null!=this.options.resolveStreamUrl&&(e=this.options.resolveStreamUrl(e)),this.eventSource=new(this.EventSource||EventSource)(e,this.getEventSourceOptions()),this.eventSource.addEventListener("error",this.onError),this.eventSource.addEventListener("message",e=>this.onMessage(e))}return this}stop(){this.stopped=!0,this.eventSource&&this.eventSource.close();var e=this.options,e=(e&&e.heartbeat&&clearInterval(e.heartbeat),this.connectionInfo);return null==e||null==e.unRegisterUrl?new Promise((e,t)=>e()):(this.connectionInfo=null,fetch(new Request(e.unRegisterUrl,{method:"POST",mode:"cors",credentials:this.serviceClient.credentials})).then(e=>{if(!e.ok)throw new Error(e.status+" - "+e.statusText)}).catch(this.onError))}invokeReceiver(r,e,s,n,t){if(r)if("function"==typeof r&&(r=this.resolver.tryResolve(r)),e=e.replace("-",""),r.client=this,r.request=n,"function"==typeof r[e])r[e].call(s||r,n.body,n);else if(e in r)r[e]=n.body;else{var a=Object.getOwnPropertyDescriptor(r,e);if(null!=a)a.set?a.set(n.body):a.writable&&(r[e]=n.body);else{let t=e.toLowerCase();getAllMembers(r).forEach(e=>{e.toLowerCase()==t&&("function"==typeof r[e]?r[e].call(s||r,n.body,n):r[e]=n.body)});a=r.noSuchMethod;"function"==typeof a&&a.call(s||r,n.target,n)}}}hasConnected(){return null!=this.connectionInfo}registerHandler(e,t){return this.options.handlers||(this.options.handlers={}),this.options.handlers[e]=t,this}setResolver(e){return this.options.resolver=e,this}registerReceiver(e){return this.registerNamedReceiver("cmd",e)}registerNamedReceiver(e,t){return this.options.receivers||(this.options.receivers={}),this.options.receivers[e]=t,this}unregisterReceiver(e="cmd"){return this.options.receivers&&delete this.options.receivers[e],this}updateChannels(e){this.channels=e;var t=null!=this.eventSource?this.eventSource.url:this.eventStreamUri;this.eventStreamUri=t.substring(0,Math.min(t.indexOf("?"),t.length))+"?channels="+e.join(",")+"&t="+(new Date).getTime()}update(e,t){var r,s="string"==typeof e?e.split(","):e,n="string"==typeof t?t.split(","):t,a=[];for(r in this.channels){var o=this.channels[r];null!=n&&-1!==n.indexOf(o)||a.push(o)}if(s)for(var i in s){i=s[i];-1===a.indexOf(i)&&a.push(i)}this.updateChannels(a)}addListener(e,t){return(this.listeners[e]||(this.listeners[e]=[])).push(t),this}removeListener(e,t){e=this.listeners[e];return e&&0<=(t=e.indexOf(t))&&e.splice(t,1),this}raiseEvent(e,t){e=this.listeners[e];e&&e.forEach(e=>{try{e(t)}catch(e){this.onError(e)}})}getConnectionInfo(){if(null==this.connectionInfo)throw"Not Connected";return this.connectionInfo}getSubscriptionId(){return this.getConnectionInfo().id}updateSubscriber(t){return null==t.id&&(t.id=this.getSubscriptionId()),this.serviceClient.post(t).then(e=>{this.update(t.subscribeChannels,t.unsubscribeChannels)}).catch(this.onError)}subscribeToChannels(...t){var e=new UpdateEventSubscriber;return e.id=this.getSubscriptionId(),e.subscribeChannels=t,this.serviceClient.post(e).then(e=>{this.update(t,null)}).catch(this.onError)}unsubscribeFromChannels(...t){var e=new UpdateEventSubscriber;return e.id=this.getSubscriptionId(),e.unsubscribeChannels=t,this.serviceClient.post(e).then(e=>{this.update(null,t)}).catch(this.onError)}getChannelSubscribers(){var e=new GetEventSubscribers;return e.channels=this.channels,this.serviceClient.get(e).then(e=>e.map(e=>this.toServerEventUser(e))).catch(e=>(this.onError(e),[]))}toServerEventUser(e){var t,r=e.channels,s=new ServerEventUser;for(t in s.userId=e.userId,s.displayName=e.displayName,s.profileUrl=e.profileUrl,s.channels=r?r.split(","):null,e)"userId"!=t&&"displayName"!=t&&"profileUrl"!=t&&"channels"!=t&&(null==s.meta&&(s.meta={}),s.meta[t]=e[t]);return s}}function getAllMembers(e){let s=[];do{var t=Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e).map(e=>e.toString())).sort().filter((e,t,r)=>"constructor"!==e&&(0==t||e!==r[t-1])&&-1===s.indexOf(e));s=s.concat(t)}while((e=Object.getPrototypeOf(e))&&Object.getPrototypeOf(e));return s}class ServerEventReceiver{client;request;noSuchMethod(e,t){}}class UpdateEventSubscriber{id;subscribeChannels;unsubscribeChannels;createResponse(){return new UpdateEventSubscriberResponse}getTypeName(){return"UpdateEventSubscriber"}}class UpdateEventSubscriberResponse{responseStatus}class GetEventSubscribers{channels;createResponse(){return[]}getTypeName(){return"GetEventSubscribers"}}class ServerEventUser{userId;displayName;profileUrl;channels;meta}class HttpMethods{static Get="GET";static Post="POST";static Put="PUT";static Delete="DELETE";static Patch="PATCH";static Head="HEAD";static Options="OPTIONS";static hasRequestBody=e=>!("GET"===e||"DELETE"===e||"HEAD"===e||"OPTIONS"===e)}class GetAccessToken{constructor(e){Object.assign(this,e)}refreshToken;useTokenCookie;createResponse(){return new GetAccessTokenResponse}getTypeName(){return"GetAccessToken"}getMethod(){return"POST"}}class GetAccessTokenResponse{accessToken;responseStatus}class JsonServiceClient{baseUrl;replyBaseUrl;oneWayBaseUrl;mode;credentials;headers;userName;password;bearerToken;refreshToken;refreshTokenUri;useTokenCookie;enableAutoRefreshToken;requestFilter;static globalRequestFilter;responseFilter;static globalResponseFilter;exceptionFilter;urlFilter;onAuthenticationRequired;manageCookies;cookies;parseJson;static toBase64;constructor(e="/"){this.baseUrl=e,this.mode="cors",this.credentials="include",this.headers=new Headers,this.headers.set("Content-Type","application/json"),this.manageCookies="undefined"==typeof document,this.cookies={},this.enableAutoRefreshToken=!0,this.basePath="api"}setCredentials(e,t){this.userName=e,this.password=t}useBasePath(e){return this.basePath=e,this}set basePath(e){e?(this.replyBaseUrl=combinePaths(this.baseUrl,e)+"/",this.oneWayBaseUrl=combinePaths(this.baseUrl,e)+"/"):(this.replyBaseUrl=combinePaths(this.baseUrl,"json","reply")+"/",this.oneWayBaseUrl=combinePaths(this.baseUrl,"json","oneway")+"/")}apply(e){return e(this),this}get(e,t){return"string"!=typeof e?this.fetch(HttpMethods.Get,e,t):this.fetch(HttpMethods.Get,null,t,this.toAbsoluteUrl(e))}delete(e,t){return"string"!=typeof e?this.fetch(HttpMethods.Delete,e,t):this.fetch(HttpMethods.Delete,null,t,this.toAbsoluteUrl(e))}post(e,t){return this.fetch(HttpMethods.Post,e,t)}postToUrl(e,t,r){return this.fetch(HttpMethods.Post,t,r,this.toAbsoluteUrl(e))}postBody(e,t,r){return this.fetchBody(HttpMethods.Post,e,t,r)}put(e,t){return this.fetch(HttpMethods.Put,e,t)}putToUrl(e,t,r){return this.fetch(HttpMethods.Put,t,r,this.toAbsoluteUrl(e))}putBody(e,t,r){return this.fetchBody(HttpMethods.Put,e,t,r)}patch(e,t){return this.fetch(HttpMethods.Patch,e,t)}patchToUrl(e,t,r){return this.fetch(HttpMethods.Patch,t,r,this.toAbsoluteUrl(e))}patchBody(e,t,r){return this.fetchBody(HttpMethods.Patch,e,t,r)}publish(e,t){return this.sendOneWay(e,t)}sendOneWay(e,t){var r=combinePaths(this.oneWayBaseUrl,nameOf(e));return this.fetch(HttpMethods.Post,e,null,r)}sendAll(e){var t;return 0==e.length?Promise.resolve([]):(t=combinePaths(this.replyBaseUrl,nameOf(e[0])+"[]"),this.fetch(HttpMethods.Post,e,null,t))}sendAllOneWay(e){var t;return 0==e.length?Promise.resolve(void 0):(t=combinePaths(this.oneWayBaseUrl,nameOf(e[0])+"[]"),this.fetch(HttpMethods.Post,e,null,t).then(e=>{}))}createUrlFromDto(e,t){let r=combinePaths(this.replyBaseUrl,nameOf(t));e=HttpMethods.hasRequestBody(e);return r=e?r:appendQueryString(r,t)}toAbsoluteUrl(e){return e.startsWith("http://")||e.startsWith("https://")?e:combinePaths(this.baseUrl,e)}deleteCookie(e){this.manageCookies?delete this.cookies[e]:document&&(document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/")}createRequest({method:e,request:t,url:r,args:s,body:n}){r=r||this.createUrlFromDto(e,t),s&&(r=appendQueryString(r,s)),null!=this.bearerToken?this.headers.set("Authorization","Bearer "+this.bearerToken):null!=this.userName&&this.headers.set("Authorization","Basic "+JsonServiceClient.toBase64(this.userName+":"+this.password)),this.manageCookies&&(0<(s=Object.keys(this.cookies).map(e=>{e=this.cookies[e];return e.expires&&e.expires0{"set-cookie"===t.toLowerCase()&&e.split(",").forEach(e=>r.push(e))}),r.forEach(e=>{e=parseCookie(e);e&&(this.cookies[e.name]=e)})}e.headers.forEach((e,t)=>{"x-cookies"===t.toLowerCase()&&0<=e.split(",").indexOf("ss-reftok")&&(this.useTokenCookie=!0)}),this.applyResponseFilters(e);let r=t&&"string"!=typeof t&&"function"==typeof t.createResponse?t.createResponse():null;if("string"==typeof r)return e.text().then(e=>e);t=e.headers.get("content-type"),t=t&&-1!==t.indexOf("application/json");if(t)return this.json(e).then(e=>e);if("undefined"!=typeof Uint8Array&&r instanceof Uint8Array){if("function"!=typeof e.arrayBuffer)throw new Error("This fetch polyfill does not implement 'arrayBuffer'");return e.arrayBuffer().then(e=>new Uint8Array(e))}if("function"==typeof Blob&&r instanceof Blob){if("function"!=typeof e.blob)throw new Error("This fetch polyfill does not implement 'blob'");return e.blob().then(e=>e)}var s=e.headers.get("content-length");return"0"===s||null==s&&!t?e.text().then(e=>r):this.json(e).then(e=>e)}handleError(e,r,t=null){if(r instanceof Error)throw this.raiseError(e,r);if(r.bodyUsed)throw this.raiseError(r,createErrorResponse(r.status,r.statusText,t));return void 0===r.json&&r.responseStatus?new Promise((e,t)=>t(this.raiseError(null,r))):this.json(r).then(e=>{e=sanitize(e);if(e.responseStatus)throw null!=t&&(e.type=t),e;throw createErrorResponse(r.status,r.statusText,t)}).catch(e=>{if(e instanceof Error||"undefined"!=typeof window&&window.DOMException&&e instanceof window.DOMException)throw this.raiseError(r,createErrorResponse(r.status,r.statusText,t));throw this.raiseError(r,e)})}fetch(e,t,r,s){return this.sendRequest({method:e,request:t,args:r,url:s})}fetchBody(e,t,r,s){var n=combinePaths(this.replyBaseUrl,nameOf(t));return this.sendRequest({method:e,request:r,body:"string"==typeof r||isFormData(r)?r:JSON.stringify(r),url:appendQueryString(n,t),args:s,returns:t})}sendRequest(t){var e=this.createRequest(t);const r=t.returns||t.request;let n=null;const a=()=>{var e=this.createRequest(t);return this.urlFilter&&this.urlFilter(e.url),fetch(e.url,e).then(e=>this.createResponse(e,r)).catch(e=>this.handleError(n,e))};return this.urlFilter&&this.urlFilter(e.url),fetch(e.url,e).then(e=>{return n=e,this.createResponse(e,r)}).catch(e=>{if(401===e.status){if(this.enableAutoRefreshToken&&(this.refreshToken||this.useTokenCookie||null!=this.cookies["ss-reftok"])){const s=new GetAccessToken({refreshToken:this.refreshToken,useTokenCookie:!!this.useTokenCookie});var t=this.refreshTokenUri||this.createUrlFromDto(HttpMethods.Post,s),r=(this.useTokenCookie&&(this.bearerToken=null,this.headers.delete("Authorization")),this.createRequest({method:HttpMethods.Post,request:s,args:null,url:t}));return fetch(t,r).then(e=>this.createResponse(e,s).then(e=>(this.bearerToken=e?.accessToken||null,a()))).catch(e=>this.onAuthenticationRequired?this.onAuthenticationRequired().then(a).catch(e=>this.handleError(n,e,"RefreshTokenException")):this.handleError(n,e,"RefreshTokenException"))}if(this.onAuthenticationRequired)return this.onAuthenticationRequired().then(a)}return this.handleError(n,e)})}raiseError(e,t){return null!=this.exceptionFilter&&this.exceptionFilter(e,t),t}send(e,t,r){return this.sendRequest({method:getMethod(e),request:e,args:t,url:r})}sendVoid(e,t,r){return this.sendRequest({method:getMethod(e),request:e,args:t,url:r})}async api(e,t,r){try{var s=await this.fetch(getMethod(e,r),e,t);return new ApiResult({response:s})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}async apiVoid(e,t,r){try{var s=await this.fetch(getMethod(e,r),e,t);return new ApiResult({response:s??new EmptyResponse})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}async apiForm(e,t,r,s){try{var n=await this.fetchBody(getMethod(e,s),e,t,r);return new ApiResult({response:n})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}async apiFormVoid(e,t,r,s){try{var n=await this.fetchBody(getMethod(e,s),e,t,r);return new ApiResult({response:n??new EmptyResponse})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}}class JsonApiClient{static create(e="/",t){return new JsonServiceClient(e).apply(e=>{e.basePath="/api",e.headers=new Headers,e.enableAutoRefreshToken=!1,t&&t(e)})}}function getMethod(e,t){return t??("function"==typeof e.getMethod?e.getMethod():HttpMethods.Post)}function getResponseStatus(e){return e.responseStatus??e.ResponseStatus??(e.errorCode?e:e.message?createErrorStatus(e.message,e.errorCode):null)}class ApiResult{response;error;constructor(e){Object.assign(this,e)}get completed(){return null!=this.response||null!=this.error}get failed(){return null!=this.error?.errorCode||null!=this.error?.message}get succeeded(){return!this.failed&&null!=this.response}get errorMessage(){return this.error?.message}get errorCode(){return this.error?.errorCode}get errors(){return this.error?.errors??[]}get errorSummary(){return null!=this.error&&0==this.errors.length?this.errorMessage:null}fieldError(e){let t=e.toLowerCase();return this.errors?.find(e=>e.fieldName.toLowerCase()==t)}fieldErrorMessage(e){return this.fieldError(e)?.message}hasFieldError(e){return null!=this.fieldError(e)}showSummary(e=[]){return!!this.failed&&e.every(e=>!this.hasFieldError(e))}summaryMessage(e=[]){if(this.showSummary(e)){let t=e.map(e=>e.toLowerCase());return t.find(e=>-1==t.indexOf(e.toLowerCase()))??this.errorMessage}}addFieldError(e,t,r="Exception"){this.error||(this.error=new ResponseStatus);var s=this.fieldError(e);null!=s?(s.errorCode=r,s.message=t):this.error.errors.push(new ResponseError({fieldName:e,errorCode:r,message:t}))}}function createErrorStatus(e,t="Exception"){return new ResponseStatus({errorCode:t,message:e})}function createFieldError(e,t,r="Exception"){return new ResponseStatus({errors:[new ResponseError({fieldName:e,errorCode:r,message:t})]})}function isFormData(e){return"undefined"!=typeof window&&e instanceof FormData}function createErrorResponse(t,r,s=null){return apply(new ErrorResponse,e=>{null!=s&&(e.type=s),e.responseStatus=apply(new ResponseStatus,e=>{e.errorCode=t&&t.toString(),e.message=r})})}function createError(e,t,r){return new ErrorResponse({responseStatus:new ResponseStatus({errorCode:e,message:t,errors:r?[new ResponseError({errorCode:e,message:t,fieldName:r})]:void 0})})}function toCamelCase(e){return e&&e.charAt(0).toLowerCase()+e.substring(1)}function toPascalCase(e){return e&&e.charAt(0).toUpperCase()+e.substring(1)}function toKebabCase(e){return(e||"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function map(e,t){return null==e?null:t(e)}function camelCaseAny(e){if(!e||!(e instanceof Object)||Array.isArray(e))return e;var t,r,s,n={};for(t in e)e.hasOwnProperty(t)&&(r=toCamelCase(t),s=e[t],Array.isArray(s)?n[r]=s.map(e=>camelCaseAny(e)):s instanceof Object?n[r]=camelCaseAny(s):n[r]=s);return n}function sanitize(e){return sanitize&&(e.responseStatus||e.errors?e:camelCaseAny(e))}function nameOf(e){if(!e)return"null";if("function"==typeof e.getTypeName)return e.getTypeName();var t=e&&e.constructor;if(null==t)throw e+" doesn't have constructor";return t.name||(e=t.toString()).substring(9,e.indexOf("("))}function log(e,t="LOG"){return console.log(t,e),e}function css(e,t,r){var s="string"==typeof e?document.querySelectorAll(e):e;for(let e=0;er[e]=t[e]),r}function splitCase(e){return"string"!=typeof e?e:e.replace(/([A-Z]|[0-9]+)/g," $1").replace(/_/g," ").trim()}function humanize(e){return!e||0<=e.indexOf(" ")?e:splitCase(toPascalCase(e))}const ucFirst=e=>e.charAt(0).toUpperCase()+e.substring(1),isUpper=e=>"A"<=e&&e<="Z",isLower=e=>"a"<=e&&e<="z",isDigit=e=>"0"<=e&&e<="9",upperOrDigit=e=>isUpper(e)||isDigit(e);function splitTitleCase(t){var r=[];if("string"!=typeof t)return r;let s=0;for(let e=0;e!!e)}function humanify(e){return!e||0<=e.indexOf(" ")?e:ucFirst(splitTitleCase(e).join(" "))}function queryString(e){if(!e||-1===e.indexOf("?"))return{};var t=rightPart(e,"?").split("&"),r={};for(let e=0;e>>e&24),2!=e&&n.length-s!=1||(a+=String.fromCharCode(uint6ToB64(r>>>18&63),uint6ToB64(r>>>12&63),uint6ToB64(r>>>6&63),uint6ToB64(63&r)),r=0);return 0==e?a:a.substring(0,a.length-e)+(1==e?"=":"==")}function uint6ToB64(e){return e<26?e+65:e<52?e+71:e<62?e-4:62===e?43:63===e?47:65}function _btoa(e){return"function"==typeof btoa?btoa(e):Buffer.from(e).toString("base64")}function _atob(e){return"function"==typeof atob?atob(e):Buffer.from(e,"base64").toString()}function stripQuotes(e){return e&&'"'==e[0]&&'"'==e[e.length]?e.slice(1,-1):e}function tryDecode(t){try{return decodeURIComponent(t)}catch(e){return t}}function parseCookie(e){if(!e)return null;let t=null;var r=e.split(/; */);for(let e=0;enormalizeKey(e)===normalizeKey(t))[0]||""]}function parseResponseStatus(t,r=null){try{var e=JSON.parse(t);return sanitize(e.ResponseStatus||e.responseStatus)}catch(e){return{message:r||e.message||e,__error:{error:e,json:t}}}}function toFormData(e){if("undefined"!=typeof window){var t,r=new FormData;for(t in e)r.append(t,e[t]);return r}}function toObject(e){const t={};if(e){if("object"!=typeof e)throw new Error("keys must be an Array of object keys");Array.prototype.slice.call(e).forEach(e=>{this[e]&&(t[e]=this[e])})}return t}function errorResponseSummary(){var e=this.responseStatus||this.ResponseStatus;return null==e||(e=e.ErrorCode?sanitize(e):e).errors&&0!=e.errors.length?void 0:e.message||e.errorCode}function errorResponseExcept(e){var t=this.responseStatus||this.ResponseStatus;if(null!=t){t=t.ErrorCode?sanitize(t):t,e=toVarNames(e);if(e&&null!=t.errors&&0!=t.errors.length){var r,s,n=e.map(e=>(e||"").toLowerCase());for(r of t.errors)if(-1!==n.indexOf((r.fieldName||"").toLowerCase()))return;for(s of t.errors)if(-1===n.indexOf((s.fieldName||"").toLowerCase()))return s.message||s.errorCode}return t.message||t.errorCode||void 0}}function errorResponse(t){var e;return null==t?errorResponseSummary.call(this):null!=(e=this.responseStatus||this.ResponseStatus)&&null!=(e=e.ErrorCode?sanitize(e):e).errors&&0!=e.errors.length&&(e=e.errors.find(e=>(e.fieldName||"").toLowerCase()==t.toLowerCase()))?e.message||e.errorCode:void 0}function isDate(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function toDate(e){return e?isDate(e)?e:"/"==e[0]?new Date(parseFloat(/Date\(([^)]+)\)/.exec(e)[1])):new Date(e):null}function toDateFmt(e){return dateFmt(toDate(e))}function padInt(e){return e<10?"0"+e:e}function dateFmt(e=new Date){return e.getFullYear()+"/"+padInt(e.getMonth()+1)+"/"+padInt(e.getDate())}function dateFmtHM(e=new Date){return e.getFullYear()+"/"+padInt(e.getMonth()+1)+"/"+padInt(e.getDate())+" "+padInt(e.getHours())+":"+padInt(e.getMinutes())}function timeFmt12(e=new Date){return padInt((e.getHours()+24)%12||12)+":"+padInt(e.getMinutes())+":"+padInt(e.getSeconds())+" "+(12'+e+""}function attr(e,t){return e.getAttribute(t)}function sattr(e,t,r){return e.setAttribute(t,r)}function rattr(e,t){return e.removeAttribute(t)}function createElement(e,t){var r={className:"class",htmlFor:"for"},s=document.createElement(e);if(t?.attrs)for(const n in t.attrs)sattr(s,r[n]||n,t.attrs[n]);return t?.events&&on(s,t.events),t&&t.insertAfter&&t.insertAfter.parentNode.insertBefore(s,t.insertAfter.nextSibling),s}function showInvalidInputs(){var e,t,r,s=attr(this,"data-invalid");s&&(e=(r="checkbox"===this.type||"radio"===this.type||hasClass(this,"form-check"))?parent(this,"form-check"):null,r?addClass(e||this.parentElement,"is-invalid form-control"):addClass(this,"is-invalid"),(null!=(r=!(t=this.nextElementSibling)||attr(t,"for")!==this.id&&"SMALL"!==t.tagName?this:r?e||t.parentElement:t)&&r.nextElementSibling&&hasClass(r.nextElementSibling,"invalid-feedback")?r.nextElementSibling:createElement("div",{insertAfter:r,attrs:{className:"invalid-feedback"}})).innerHTML=s)}function parent(e,t){for(;null!=e&&!hasClass(e,t);)e=e.parentElement;return e}function hasClass(e,t){return!!e&&(e.classList?e.classList.contains(t):-1<(" "+e.className+" ").replace(/[\n\t\r]/g," ").indexOf(" "+t+" "))}function addClass(e,t){return e?e.classList?e.classList.add(...t.split(" ")):hasClass(e,t)?null:e.className=(e.className+" "+t).trim():null}function remClass(e,t){return e?e.classList?e.classList.remove(t):hasClass(e,t)?e.className=e.className.replace(/(\s|^)someclass(\s|$)/," "):null:null}function isElement(e){return"undefined"!=typeof window&&(e instanceof window.Element||e==window.document)}function $1(e,t){return"string"==typeof e?(t||document).querySelector(e):e||null}function $$(e,t){return"string"==typeof e?Array.from((t||"undefined"!=typeof document?document:null)?.querySelectorAll(e)??[]):Array.isArray(e)?e.flatMap(e=>$$(e,t)):[e]}function on(e,s){return $$(e).forEach(r=>{Object.keys(s).forEach(function(e){var t=s[e];"string"==typeof e&&"function"==typeof t&&r.addEventListener(e,s[e]=t.bind(r))})}),s}function addScript(r){return new Promise((e,t)=>{document.body.appendChild(createElement("script",{attrs:{src:r},events:{load:e,error:t}}))})}function delaySet(e,t){t=t&&t.duration||300;let r=setTimeout(()=>e(!0),t);return()=>{clearTimeout(r),e(!1)}}function bootstrap(e){var t=(e||document).querySelectorAll("[data-invalid]");for(let e=0;ehandleEvent(t,r,e)):["click","dblclick","change","focus","blur","focusin","focusout","select","keydown","keypress","keyup","hover","toggle","input"].forEach(e=>{r.querySelector(`[data-${e}]`)&&handleEvent(t,r,e)})}function bootstrapForm(t,r){t&&(r.model&&populateForm(t,r.model),t.onsubmit=function(e){return e.preventDefault(),r.type="bootstrap-v4",ajaxSubmit(t,r)})}function applyErrors(e,r,t){var s={overrideMessages:!1,messages:{NotEmpty:"Required",NotNull:"Required",Email:"Invalid email",AlreadyExists:"Already exists"},errorFilter:function(e,t,r){return this.overrideMessages?this.messages[t]||e||splitCase(t):e||splitCase(t)}};if(clearErrors(e),r){r=sanitize(r),addClass(e,"has-errors");const h=t&&"bootstrap-v4"===t.type;var s={...s,...t},o=(t.messages&&(s.overrideMessages=!0),s.errorFilter.bind(s)),t=r.errors;if(t&&t.length){let n={},a={};$$("input,textarea,select,button").forEach(e=>{var t=e.previousElementSibling,r=e.nextElementSibling,s=("radio"===e.type||"checkbox"===e.type?null:e.id)||attr(e,"name");s&&(s=s.toLowerCase(),n[s]=e,h||(hasClass(t,"help-inline")||hasClass(t,"help-block")?a[s]=t:(hasClass(r,"help-inline")||hasClass(r,"help-block"))&&(a[s]=r)))}),$$(".help-inline[data-for],.help-block[data-for]").forEach(e=>{var t=attr(e,"data-for").toLowerCase();a[t]=e});for(var i of t){var l=(i.fieldName||"").toLowerCase(),u=n[l],c=(u&&(h?("radio"!==(c=attr(u,"type"))&&"checkbox"!==c&&addClass(u,"is-invalid"),sattr(u,"data-invalid",o(i.message,i.errorCode,"field"))):(addClass(u,"error"),addClass(u.parentElement,"has-error"))),a[l]);c&&(addClass(c,"error"),c.innerHTML=o(i.message,i.errorCode,"field"),c.style.display="block")}$$("[data-validation-summary]").forEach(e=>{var t=attr(e,"data-validation-summary").split(","),t=errorResponseExcept.call(r,t);t&&(e.innerHTML=bsAlert(t))})}else{const n=o(r.message||splitCase(r.errorCode),r.errorCode,"summary");h?$$("[data-validation-summary]").forEach(e=>e.innerHTML="<"===n[0]?n:bsAlert(n)):$$(".error-summary").forEach(e=>{e.innerHTML=n(e).style.display="block"})}return e}}function clearErrors(e){remClass(e,"has-errors"),$$(".error-summary").forEach(e=>{e.innerHTML="",e.style.display="none"}),$$("[data-validation-summary]").forEach(e=>{e.innerHTML=""}),$$(".error").forEach(e=>remClass(e,"error")),$$(".form-check.is-invalid [data-invalid]").forEach(e=>{rattr(e,"data-invalid")}),$$(".form-check.is-invalid").forEach(e=>remClass(e,"form-control")),$$(".is-invalid").forEach(e=>{remClass(e,"is-invalid"),rattr(e,"data-invalid")}),$$(".is-valid").forEach(e=>remClass(e,"is-valid"))}function toVarNames(e){return e?isArray(e)?e:e.split(",").map(e=>e.trim()):[]}function formSubmit(e={}){const r=this;var t=attr(r,"enctype")||Types.UrlEncoded;if(t==Types.MultiPart&&void 0===window.FormData)throw new Error(`FormData Type is needed to send '${Types.MultiPart}' Content Types`);let s;try{s=serializeForm(r,t)}catch(e){throw new Error(""+(e.message||e))}var n=new Headers,t=(n.set("Accept",Types.Json),n.set("Content-Type",t),{method:attr(r,"method")||"POST",credentials:"include",mode:"cors",headers:n,body:s});return e.requestFilter&&e.requestFilter(t),fetch(new Request(e.url||attr(r,"action"),t)).catch(e=>{throw new Error(`Network is unreachable (${e.message||e})`)}).then(t=>(e.responseFilter&&e.responseFilter(t),t.ok?(handleHeaderBehaviors(r,t),fromResponse(t)):t.json().catch(e=>{throw new Error("The request failed with "+(t.statusText||t.status))}).then(e=>{throw Object.assign(new ErrorResponse,sanitize(e))})))}function handleHeaderBehaviors(e,t){var r=t.headers.get("X-Location"),r=(r&&(location.href=r),t.headers.get("X-Trigger"));r&&triggerEvent(e,0<=(t=r.indexOf(":"))?r.substring(0,t):r,(e=0<=t?r.substring(t+1):null)?[e]:[])}function ajaxSubmit(s,n={}){const a="bootstrap-v4"===n.type;clearErrors(s);try{if(n.validate&&!1===n.validate.call(s))return!1}catch(e){return!1}addClass(s,"loading");const e=null==n.onSubmitDisable?"[type=submit]":n.onSubmitDisable,t=null!=e&&""!=e;function r(e,t=null){var r;t?applyErrors(s,t.ResponseStatus||t.responseStatus,{...n}):e&&(addClass(s,"has-errors"),(r=$$(".error-summary")[0])&&(r.innerHTML=e),a)&&(r=$$("[data-validation-summary]")[0])&&(r.innerHTML=bsAlert(e)),n.error&&n.error.call(s,t),a&&$$("[data-invalid]").forEach(e=>showInvalidInputs.call(e))}return t&&$$(e).forEach(e=>{sattr(e,"disabled","disabled")}),(n.submit||formSubmit).call(s,n).then(e=>(n.success&&n.success.call(s,e),!1)).catch(e=>{e.responseStatus?r(null,e):r(""+(e.message||e),null)}).finally(()=>{remClass(s,"loading"),t&&$$(e).forEach(e=>{rattr(e,"disabled")}),n.complete&&n.complete.call(s)})}function fromResponse(e){var t,r=e.headers.get("content-type"),r=r&&-1!==r.indexOf(Types.Json);return!r&&("0"===(t=e.headers.get("content-length"))||null==t&&!r)?null:e.json()}function serializeForm(e,t=null){return t===Types.MultiPart?new FormData(e):t==Types.Json?JSON.stringify(serializeToObject(e)):serializeToUrlEncoded(e)}function formEntries(e,r,s){var n,a=e,o=a.elements.length;for(let t=0;te[t]=r)}function serializeToUrlEncoded(e){return formEntries(e,[],(e,t,r)=>"string"==typeof r?e.push(encodeURIComponent(t)+"="+encodeURIComponent(r)):null).join("&").replace(/%20/g,"+")}function serializeToFormData(e){return formEntries(e,new FormData,(e,t,r)=>e.append(t,r))}function sanitizeFormData(e){for(var[t,r]of e)"object"==typeof r&&0===r.size&&e.delete(t);return e}function triggerEvent(e,t,r=null){var s;document.createEvent?((s=document.createEvent("click"==t||t.startsWith("mouse")?"MouseEvents":"HTMLEvents")).initEvent(t,!0,!0),s.data=r,e.dispatchEvent(s)):(r=document.createEventObject(),e.fireEvent("on"+t,r))}function populateForm(r,s){if(s){var n;for(let e in s){let t=s[e];void 0!==t&&null!==t||(t="");var a=r.elements.namedItem(e)||r.elements.namedItem((n=e)&&(n[0]===n[0].toUpperCase()?toCamelCase(n):n[0]===n[0].toLowerCase()?toPascalCase(n):n)),o=a;if(a)switch(o.type||a[0].type){case"radio":case"checkbox":var i=a.length;for(let e=0;e{0<=r.indexOf(e)&&(s[e]=t[e])}),s}function omit(t,r){const s={};return t&&Object.keys(t).forEach(e=>{r.indexOf(e)<0&&(s[e]=t[e])}),s}function omitEmpty(r){const s={};return r&&Object.keys(r).forEach(e=>{var t=r[e];null!=t&&""!==t&&(s[e]=t)}),s}function apply(e,t){return t(e),e}function each(e,r,t){return e.reduce((e,t)=>(r(e,t),e),t||{})}function resolve(e,t){e="function"==typeof e?e():e;return"function"==typeof t?t(e):e}function mapGet(e,r){if(!e||!r)return null;var s=e[r];if(s)return s;if("object"!=typeof e)return null;{let t=r.toLowerCase();s=Object.keys(e).find(e=>e.toLowerCase()===t);return s?e[s]:null}}function apiValue(e){return null==e?"":"string"==typeof e?"/Date("===e.substring(0,6)?toDate(e):e.trim():e}function apiValueFmt(e){e=apiValue(e);return(null!=e?isDate(e)?dateFmt(e):e:null)||""}function activeClassNav(e,t){return null!=e.href&&(e.exact||t.length<=1?trimEnd(t,"/").toLowerCase()===trimEnd(e.href,"/").toLowerCase():trimEnd(t,"/").toLowerCase().startsWith(trimEnd(e.href,"/").toLowerCase()))?"active":null}function activeClass(e,t,r){return null!=e&&(r||t.length<=1?trimEnd(t,"/").toLowerCase()===trimEnd(e,"/").toLowerCase():trimEnd(t,"/").toLowerCase().startsWith(trimEnd(e,"/").toLowerCase()))?"active":null}function bootstrapColors(){return["primary","secondary","success","info","warning","danger","light","dark"]}JsonServiceClient.toBase64=e=>_btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(new Number("0x"+t).valueOf()))),"undefined"!=typeof window&&void 0!==window.Element&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){let t=this;do{if(t.matches(e))return t}while(null!==(t=t.parentElement||t.parentNode)&&1===t.nodeType);return null})),function(e){e.MultiPart="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Json="application/json"}(Types=Types||{});const BootstrapColors=bootstrapColors();function btnColorClass(e){for(const t of bootstrapColors()){if(e[t])return"btn-"+t;if(e["outline-"+t])return"btn-outline-"+t}return null}function bootstrapSizes(){return["xs","sm","md","lg"]}const BootstrapSizes=bootstrapSizes();function btnSizeClass(e){for(const t of bootstrapSizes())if(e[t])return"btn-"+t;return null}function btnClasses(e){var t=[],r=btnColorClass(e),r=(r&&t.push(r),btnSizeClass(e));return r&&t.push(r),e.block&&t.push("btn-block"),t}class NavDefaults{static navClass="nav";static navItemClass="nav-item";static navLinkClass="nav-link";static childNavItemClass="nav-item dropdown";static childNavLinkClass="nav-link dropdown-toggle";static childNavMenuClass="dropdown-menu";static childNavMenuItemClass="dropdown-item";static create(){return new NavOptions}static forNav(e){return e||NavDefaults.create()}static overrideDefaults(e,t){return null==e?t:((e=Object.assign({},e)).navClass===NavDefaults.navClass&&null!=t.navClass&&(e.navClass=t.navClass),e.navItemClass===NavDefaults.navItemClass&&null!=t.navItemClass&&(e.navItemClass=t.navItemClass),e.navLinkClass===NavDefaults.navLinkClass&&null!=t.navLinkClass&&(e.navLinkClass=t.navLinkClass),e.childNavItemClass===NavDefaults.childNavItemClass&&null!=t.childNavItemClass&&(e.childNavItemClass=t.childNavItemClass),e.childNavLinkClass===NavDefaults.childNavLinkClass&&null!=t.childNavLinkClass&&(e.childNavLinkClass=t.childNavLinkClass),e.childNavMenuClass===NavDefaults.childNavMenuClass&&null!=t.childNavMenuClass&&(e.childNavMenuClass=t.childNavMenuClass),e.childNavMenuItemClass===NavDefaults.childNavMenuItemClass&&null!=t.childNavMenuItemClass&&(e.childNavMenuItemClass=t.childNavMenuItemClass),e)}static showNav(e,t){return null==t||0===t.length?null==e.show:!(null!=e.show&&t.indexOf(e.show)<0||null!=e.hide&&0<=t.indexOf(e.hide))}}class NavLinkDefaults{static forNavLink(e){return e||NavDefaults.create()}}class NavbarDefaults{static navClass="navbar-nav";static create(){return new NavOptions({navClass:NavbarDefaults.navClass})}static forNavbar(e){return NavDefaults.overrideDefaults(e,NavbarDefaults.create())}}class NavButtonGroupDefaults{static navClass="btn-group";static navItemClass="btn btn-primary";static create(){return new NavOptions({navClass:NavButtonGroupDefaults.navClass,navItemClass:NavButtonGroupDefaults.navItemClass})}static forNavButtonGroup(e){return NavDefaults.overrideDefaults(e,NavButtonGroupDefaults.create())}}class LinkButtonDefaults{static navItemClass="btn";static create(){return new NavOptions({navItemClass:LinkButtonDefaults.navItemClass})}static forLinkButton(e){return NavDefaults.overrideDefaults(e||null,LinkButtonDefaults.create())}}class UserAttributes{static fromSession(e){var t=[];return null!=e&&(t.push("auth"),e.roles&&t.push(...e.roles.map(e=>"role:"+e)),e.permissions)&&t.push(...e.permissions.map(e=>"perm:"+e)),t}}class NavOptions{static fromSession(e,t){return(t=t||new NavOptions).attributes=UserAttributes.fromSession(e),t}attributes;activePath;baseHref;navClass;navItemClass;navLinkClass;childNavItemClass;childNavLinkClass;childNavMenuClass;childNavMenuItemClass;constructor(e){this.attributes=[],this.navClass=NavDefaults.navClass,this.navItemClass=NavDefaults.navItemClass,this.navLinkClass=NavDefaults.navLinkClass,this.childNavItemClass=NavDefaults.childNavItemClass,this.childNavLinkClass=NavDefaults.childNavLinkClass,this.childNavMenuClass=NavDefaults.childNavMenuClass,this.childNavMenuItemClass=NavDefaults.childNavMenuItemClass,Object.assign(this,e)}}function classNames(...t){var r=[];for(let e=0;ee.concat(r(t)),[])}function uniq(e){return Array.from(new Set(e)).sort((e,t)=>t/g,">").replace(/'/g,"'").replace(/"/g,"""):""+e}function htmlAttrs(t){let r=[];return Object.keys(t).forEach(e=>{0Object.keys(e).forEach(e=>{-1===t.indexOf(e)&&t.push(e)})),t}function alignLeft(e,t,r=" "){return t<0?"":t+1-e.length<=0?e:r+e+r.repeat(t+1-e.length)}function alignCenter(e,t,r=" "){var s,n;return t<0?"":(n=(e=e||"").length,s=Math.floor(t/2-n/2),n=Math.abs(n%2-t%2),r.repeat(s+1)+e+r.repeat(s+1+n))}function alignRight(e,t,r=" "){return t<0?"":t+1-e.length<=0?e:r.repeat(t+1-e.length)+e+r}function alignAuto(e,t,r=" "){var s=""+e;return s.length<=t?("number"==typeof e?alignRight:alignLeft)(s,t,r):s}function EventBus(){var{subscribe:e,publish:t}=createBus();this.subscribe=e,this.publish=t}function createBus(){let s={};return{subscribe:function(e,t){let r=Symbol("id");return s[e]||(s[e]={}),s[e][r]=t,{unsubscribe:function(){delete s[e][r],0===Object.getOwnPropertySymbols(s[e]).length&&delete s[e]}}},publish:function(t,r){s[t]&&Object.getOwnPropertySymbols(s[t]).forEach(e=>s[t][e](r))}}}class Inspect{static async vars(n){if("object"==typeof process){let s=process.env.INSPECT_VARS;if(s&&n){const e=e=>"node:"+e;await import(e("fs")).then(async r=>{await import(e("path")).then(e=>{var t=s.replace(/\\/g,"/");0<=t.indexOf("/")&&(e=e.dirname(t),r.existsSync(e)||r.mkdirSync(e)),r.writeFileSync(t,JSON.stringify(n))})})}}}static dump(e){return JSON.stringify(e,null,4).replace(/"/g,"")}static printDump(e){console.log(Inspect.dump(e))}static dumpTable(e){let s=e,n=uniqueKeys(s),a={};n.forEach(t=>{let r=t.length;s.forEach(e=>{var e=e[t];null!=e&&(e=(""+e).length)>r&&(r=e)}),a[t]=r});e=Object.keys(a).length,e=Object.keys(a).map(e=>a[e]).reduce((e,t)=>e+t,0)+2*e+(e+1);let o=[],t=(o.push(`+${"-".repeat(e-2)}+`),"|");return n.forEach(e=>t+=alignCenter(e,a[e])+"|"),o.push(t),o.push(`|${"-".repeat(e-2)}|`),s.forEach(t=>{let r="|";n.forEach(e=>r+=alignAuto(t[e],a[e])+"|"),o.push(r)}),o.push(`+${"-".repeat(e-2)}+`),o.join("\n")}static printDumpTable(e){console.log(Inspect.dumpTable(e))}}export{ResponseStatus,ResponseError,ErrorResponse,EmptyResponse,NavItem,GetNavItems,GetNavItemsResponse,MetadataTypesConfig,MetadataRoute,MetadataOperationType,MetadataTypes,MetadataTypeName,MetadataDataContract,MetadataDataMember,MetadataAttribute,MetadataPropertyType,MetadataType,NewInstanceResolver,SingletonInstanceResolver,ReadyState,ServerEventsClient,getAllMembers,ServerEventReceiver,UpdateEventSubscriber,UpdateEventSubscriberResponse,GetEventSubscribers,ServerEventUser,HttpMethods,GetAccessTokenResponse,JsonServiceClient,JsonApiClient,getMethod,getResponseStatus,ApiResult,createErrorStatus,createFieldError,isFormData,createError,toCamelCase,toPascalCase,toKebabCase,map,camelCaseAny,sanitize,nameOf,css,splitOnFirst,splitOnLast,leftPart,rightPart,lastLeftPart,lastRightPart,chop,onlyProps,humanize,ucFirst,isUpper,isLower,isDigit,splitTitleCase,humanify,queryString,combinePaths,createPath,createUrl,appendQueryString,setQueryString,bytesToBase64,stripQuotes,tryDecode,parseCookie,normalizeKey,normalize,getField,parseResponseStatus,toFormData,toObject,errorResponseSummary,errorResponseExcept,errorResponse,isDate,toDate,toDateFmt,padInt,dateFmt,dateFmtHM,timeFmt12,toLocalISOString,toTime,msToTime,padStart,createElement,isElement,$1,$$,on,addScript,delaySet,bootstrap,bindHandlers,bootstrapForm,toVarNames,formSubmit,ajaxSubmit,serializeForm,serializeToObject,serializeToUrlEncoded,serializeToFormData,sanitizeFormData,triggerEvent,populateForm,trimEnd,safeVarName,pick,omit,omitEmpty,apply,each,resolve,mapGet,apiValue,apiValueFmt,activeClassNav,activeClass,BootstrapColors,btnColorClass,BootstrapSizes,btnSizeClass,btnClasses,NavDefaults,NavLinkDefaults,NavbarDefaults,NavButtonGroupDefaults,LinkButtonDefaults,UserAttributes,NavOptions,classNames,fromXsdDuration,toXsdDuration,toTimeSpanFmt,flatMap,uniq,enc,htmlAttrs,indexOfAny,isNullOrEmpty,fromDateTime,toDateTime,fromTimeSpan,toTimeSpan,fromGuid,toGuid,fromByteArray,toByteArray,toBase64String,StringBuffer,JSV,uniqueKeys,alignLeft,alignCenter,alignRight,alignAuto,EventBus,createBus,Inspect}; \ No newline at end of file +class ResponseStatus{constructor(e){Object.assign(this,e)}errorCode;message;stackTrace;errors;meta}class ResponseError{constructor(e){Object.assign(this,e)}errorCode;fieldName;message;meta}class ErrorResponse{constructor(e){Object.assign(this,e)}type;responseStatus}class EmptyResponse{constructor(e){Object.assign(this,e)}responseStatus}class NavItem{label;href;exact;id;className;iconClass;show;hide;children;meta;constructor(e){Object.assign(this,e)}}class GetNavItems{constructor(e){Object.assign(this,e)}createResponse(){return new GetNavItemsResponse}getTypeName(){return"GetNavItems"}getMethod(){return"GET"}}class GetNavItemsResponse{baseUrl;results;navItemsMap;meta;responseStatus;constructor(e){Object.assign(this,e)}}class MetadataTypesConfig{baseUrl;defaultNamespaces;defaultImports;includeTypes;excludeTypes;treatTypesAsStrings;globalNamespace;ignoreTypes;exportTypes;exportAttributes;ignoreTypesInNamespaces;constructor(e){Object.assign(this,e)}}class MetadataRoute{path;verbs;notes;summary;constructor(e){Object.assign(this,e)}}class MetadataOperationType{request;response;actions;returnsVoid;returnType;routes;dataModel;viewModel;requiresAuth;requiredRoles;requiresAnyRole;requiredPermissions;requiresAnyPermission;tags;constructor(e){Object.assign(this,e)}}class MetadataTypes{config;namespaces;types;operations;constructor(e){Object.assign(this,e)}}class MetadataTypeName{name;namespace;genericArgs;constructor(e){Object.assign(this,e)}}class MetadataDataContract{name;namespace;constructor(e){Object.assign(this,e)}}class MetadataDataMember{name;order;isRequired;emitDefaultValue;constructor(e){Object.assign(this,e)}}class MetadataAttribute{name;constructorArgs;args;constructor(e){Object.assign(this,e)}}class MetadataPropertyType{name;type;isValueType;isSystemType;isEnum;isPrimaryKey;typeNamespace;genericArgs;value;description;dataMember;readOnly;paramType;displayType;isRequired;allowableValues;allowableMin;allowableMax;attributes;constructor(e){Object.assign(this,e)}}class MetadataType{name;namespace;genericArgs;inherits;implements;displayType;description;isNested;isEnum;isEnumInt;isInterface;isAbstract;dataContract;properties;attributes;innerTypes;enumNames;enumValues;enumMemberValues;enumDescriptions;meta;constructor(e){Object.assign(this,e)}}class NewInstanceResolver{tryResolve(e){return new e}}class SingletonInstanceResolver{tryResolve(e){return e.instance||(e.instance=new e)}}function eventMessageType(e){switch(e){case"onConnect":return"ServerEventConnect";case"onHeartbeat":return"ServerEventHeartbeat";case"onJoin":return"ServerEventJoin";case"onLeave":return"ServerEventLeave";case"onUpdate":return"ServerEventUpdate"}return null}var ReadyState,Types;(e=>{e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSED=2]="CLOSED"})(ReadyState=ReadyState||{});class ServerEventsClient{channels;options;eventSource;static UnknownChannel="*";eventStreamUri;updateSubscriberUrl;connectionInfo;serviceClient;stopped;resolver;listeners;EventSource;withCredentials;constructor(e,t,r={},s=null){if(this.channels=t,this.options=r,this.eventSource=s,0===this.channels.length)throw"at least 1 channel is required";this.resolver=this.options.resolver||new NewInstanceResolver,this.eventStreamUri=combinePaths(e,"event-stream")+"?",this.updateChannels(t),this.serviceClient=new JsonServiceClient(e),this.listeners={},this.withCredentials=!0,this.options.handlers||(this.options.handlers={})}onMessage=e=>{if("undefined"==typeof document){var t,r,s,n=e.data?e.data.indexOf("\n"):-1;if(0<=n)return t=e.data,s=e.lastEventId,r=Object.assign({},{lastEventId:s,data:t.substring(0,n)}),s=Object.assign({},{lastEventId:s,data:t.substring(n+1)}),this._onMessage(r),void this._onMessage(s)}this._onMessage(e)};_onMessage=a=>{if(!this.stopped){let n=this.options;void 0===o&&(o={querySelectorAll:e=>[]});var o,i=splitOnFirst(a.data," ");let e=null,t=i[0];var l=splitOnFirst(t,"@"),l=(1{if(this.eventSource.readyState===EventSource.CLOSED)clearInterval(n.heartbeat),null!=(e=n.handlers.onStop)&&e.apply(this.eventSource),this.reconnectServerEvents({error:new Error("EventSource is CLOSED")});else{var e=new Request(n.heartbeatUrl,{method:"POST",mode:"cors",headers:s,credentials:this.serviceClient.credentials});try{var t,r=await fetch(e);r.ok?await r.text():(t=new Error(r.status+" - "+r.statusText),this.reconnectServerEvents({error:t}))}catch(e){this.reconnectServerEvents({error:e})}}},this.connectionInfo&&this.connectionInfo.heartbeatIntervalMs||n.heartbeatIntervalMs||1e4)),n.unRegisterUrl&&"undefined"!=typeof window&&(window.onunload=()=>{navigator.sendBeacon?(this.stopped=!0,this.eventSource&&this.eventSource.close(),navigator.sendBeacon(n.unRegisterUrl)):this.stop()}),this.updateSubscriberUrl=n.updateSubscriberUrl,this.updateChannels((n.channels||"").split(","))}else{p="onJoin"==h||"onLeave"==h||"onUpdate"==h;let e=n.handlers[h];e?p?e.call(f||o.body,l):e.call(f||o.body,r,a):p||(c=n.receivers&&n.receivers.cmd,this.invokeReceiver(c,h,f,a,"cmd")),p&&(e=n.handlers.onCommand)&&e.call(f||o.body,l)}else"trigger"===u?this.raiseEvent(i,a):"css"===u&&css(d||$$("body"),h,r);c=n.receivers&&n.receivers[u];this.invokeReceiver(c,h,f,a,u),eventMessageType(h)||(p=n.handlers.onMessage)&&p.call(f||o.body,l),n.onTick&&n.onTick()}}};onError=e=>{var t;this.stopped||(e=e||event,null!=(t=this.options.onException)&&t.call(this.eventSource,e),this.options.onTick&&this.options.onTick())};getEventSourceOptions(){return{withCredentials:this.withCredentials}}reconnectServerEvents(r={}){if(!this.stopped){r.error&&this.onError(r.error);let t=this.eventSource,e=r.url||this.eventStreamUri||t.url;null!=this.options.resolveStreamUrl&&(e=this.options.resolveStreamUrl(e));var s=new(this.EventSource||EventSource)(e,this.getEventSourceOptions()),n=(s.addEventListener("error",e=>(r.onerror||t.onerror||this.onError)(e)),s.addEventListener("message",r.onmessage||t.onmessage||this.onMessage),this.options.onReconnect);return null!=n&&n.call(s,r.error),t.removeEventListener&&(t.removeEventListener("error",this.onError),t.removeEventListener("message",this.onMessage)),t.close(),this.eventSource=s}}start(){if(this.stopped=!1,null==this.eventSource||this.eventSource.readyState===EventSource.CLOSED){let e=this.eventStreamUri;null!=this.options.resolveStreamUrl&&(e=this.options.resolveStreamUrl(e)),this.eventSource=new(this.EventSource||EventSource)(e,this.getEventSourceOptions()),this.eventSource.addEventListener("error",this.onError),this.eventSource.addEventListener("message",e=>this.onMessage(e))}return this}stop(){this.stopped=!0,this.eventSource&&this.eventSource.close();var e=this.options,e=(e&&e.heartbeat&&clearInterval(e.heartbeat),this.connectionInfo);return null==e||null==e.unRegisterUrl?new Promise((e,t)=>e()):(this.connectionInfo=null,fetch(new Request(e.unRegisterUrl,{method:"POST",mode:"cors",credentials:this.serviceClient.credentials})).then(e=>{if(!e.ok)throw new Error(e.status+" - "+e.statusText)}).catch(this.onError))}invokeReceiver(r,e,s,n,t){if(r)if("function"==typeof r&&(r=this.resolver.tryResolve(r)),e=e.replace("-",""),r.client=this,r.request=n,"function"==typeof r[e])r[e].call(s||r,n.body,n);else if(e in r)r[e]=n.body;else{var a=Object.getOwnPropertyDescriptor(r,e);if(null!=a)a.set?a.set(n.body):a.writable&&(r[e]=n.body);else{let t=e.toLowerCase();getAllMembers(r).forEach(e=>{e.toLowerCase()==t&&("function"==typeof r[e]?r[e].call(s||r,n.body,n):r[e]=n.body)});a=r.noSuchMethod;"function"==typeof a&&a.call(s||r,n.target,n)}}}hasConnected(){return null!=this.connectionInfo}registerHandler(e,t){return this.options.handlers||(this.options.handlers={}),this.options.handlers[e]=t,this}setResolver(e){return this.options.resolver=e,this}registerReceiver(e){return this.registerNamedReceiver("cmd",e)}registerNamedReceiver(e,t){return this.options.receivers||(this.options.receivers={}),this.options.receivers[e]=t,this}unregisterReceiver(e="cmd"){return this.options.receivers&&delete this.options.receivers[e],this}updateChannels(e){this.channels=e;var t=null!=this.eventSource?this.eventSource.url:this.eventStreamUri;this.eventStreamUri=t.substring(0,Math.min(t.indexOf("?"),t.length))+"?channels="+e.join(",")+"&t="+(new Date).getTime()}update(e,t){var r,s="string"==typeof e?e.split(","):e,n="string"==typeof t?t.split(","):t,a=[];for(r in this.channels){var o=this.channels[r];null!=n&&-1!==n.indexOf(o)||a.push(o)}if(s)for(var i in s){i=s[i];-1===a.indexOf(i)&&a.push(i)}this.updateChannels(a)}addListener(e,t){return(this.listeners[e]||(this.listeners[e]=[])).push(t),this}removeListener(e,t){e=this.listeners[e];return e&&0<=(t=e.indexOf(t))&&e.splice(t,1),this}raiseEvent(e,t){e=this.listeners[e];e&&e.forEach(e=>{try{e(t)}catch(e){this.onError(e)}})}getConnectionInfo(){if(null==this.connectionInfo)throw"Not Connected";return this.connectionInfo}getSubscriptionId(){return this.getConnectionInfo().id}updateSubscriber(t){return null==t.id&&(t.id=this.getSubscriptionId()),this.serviceClient.post(t).then(e=>{this.update(t.subscribeChannels,t.unsubscribeChannels)}).catch(this.onError)}subscribeToChannels(...t){var e=new UpdateEventSubscriber;return e.id=this.getSubscriptionId(),e.subscribeChannels=t,this.serviceClient.post(e).then(e=>{this.update(t,null)}).catch(this.onError)}unsubscribeFromChannels(...t){var e=new UpdateEventSubscriber;return e.id=this.getSubscriptionId(),e.unsubscribeChannels=t,this.serviceClient.post(e).then(e=>{this.update(null,t)}).catch(this.onError)}getChannelSubscribers(){var e=new GetEventSubscribers;return e.channels=this.channels,this.serviceClient.get(e).then(e=>e.map(e=>this.toServerEventUser(e))).catch(e=>(this.onError(e),[]))}toServerEventUser(e){var t,r=e.channels,s=new ServerEventUser;for(t in s.userId=e.userId,s.displayName=e.displayName,s.profileUrl=e.profileUrl,s.channels=r?r.split(","):null,e)"userId"!=t&&"displayName"!=t&&"profileUrl"!=t&&"channels"!=t&&(null==s.meta&&(s.meta={}),s.meta[t]=e[t]);return s}}function getAllMembers(e){let s=[];do{var t=Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e).map(e=>e.toString())).sort().filter((e,t,r)=>"constructor"!==e&&(0==t||e!==r[t-1])&&-1===s.indexOf(e));s=s.concat(t)}while((e=Object.getPrototypeOf(e))&&Object.getPrototypeOf(e));return s}class ServerEventReceiver{client;request;noSuchMethod(e,t){}}class UpdateEventSubscriber{id;subscribeChannels;unsubscribeChannels;createResponse(){return new UpdateEventSubscriberResponse}getTypeName(){return"UpdateEventSubscriber"}}class UpdateEventSubscriberResponse{responseStatus}class GetEventSubscribers{channels;createResponse(){return[]}getTypeName(){return"GetEventSubscribers"}}class ServerEventUser{userId;displayName;profileUrl;channels;meta}class HttpMethods{static Get="GET";static Post="POST";static Put="PUT";static Delete="DELETE";static Patch="PATCH";static Head="HEAD";static Options="OPTIONS";static hasRequestBody=e=>!("GET"===e||"DELETE"===e||"HEAD"===e||"OPTIONS"===e)}class GetAccessToken{constructor(e){Object.assign(this,e)}refreshToken;useTokenCookie;createResponse(){return new GetAccessTokenResponse}getTypeName(){return"GetAccessToken"}getMethod(){return"POST"}}class GetAccessTokenResponse{accessToken;responseStatus}class JsonServiceClient{baseUrl;replyBaseUrl;oneWayBaseUrl;mode;credentials;headers;userName;password;bearerToken;refreshToken;refreshTokenUri;useTokenCookie;enableAutoRefreshToken;requestFilter;static globalRequestFilter;responseFilter;static globalResponseFilter;exceptionFilter;urlFilter;onAuthenticationRequired;manageCookies;cookies;parseJson;static toBase64;constructor(e="/"){this.baseUrl=e,this.mode="cors",this.credentials="include",this.headers=new Headers,this.headers.set("Content-Type","application/json"),this.manageCookies="undefined"==typeof document,this.cookies={},this.enableAutoRefreshToken=!0,this.basePath="api"}setCredentials(e,t){this.userName=e,this.password=t}useBasePath(e){return this.basePath=e,this}set basePath(e){e?(this.replyBaseUrl=combinePaths(this.baseUrl,e)+"/",this.oneWayBaseUrl=combinePaths(this.baseUrl,e)+"/"):(this.replyBaseUrl=combinePaths(this.baseUrl,"json","reply")+"/",this.oneWayBaseUrl=combinePaths(this.baseUrl,"json","oneway")+"/")}apply(e){return e(this),this}get(e,t){return"string"!=typeof e?this.fetch(HttpMethods.Get,e,t):this.fetch(HttpMethods.Get,null,t,this.toAbsoluteUrl(e))}delete(e,t){return"string"!=typeof e?this.fetch(HttpMethods.Delete,e,t):this.fetch(HttpMethods.Delete,null,t,this.toAbsoluteUrl(e))}post(e,t){return this.fetch(HttpMethods.Post,e,t)}postToUrl(e,t,r){return this.fetch(HttpMethods.Post,t,r,this.toAbsoluteUrl(e))}postBody(e,t,r){return this.fetchBody(HttpMethods.Post,e,t,r)}put(e,t){return this.fetch(HttpMethods.Put,e,t)}putToUrl(e,t,r){return this.fetch(HttpMethods.Put,t,r,this.toAbsoluteUrl(e))}putBody(e,t,r){return this.fetchBody(HttpMethods.Put,e,t,r)}patch(e,t){return this.fetch(HttpMethods.Patch,e,t)}patchToUrl(e,t,r){return this.fetch(HttpMethods.Patch,t,r,this.toAbsoluteUrl(e))}patchBody(e,t,r){return this.fetchBody(HttpMethods.Patch,e,t,r)}publish(e,t){return this.sendOneWay(e,t)}sendOneWay(e,t){var r=combinePaths(this.oneWayBaseUrl,nameOf(e));return this.fetch(HttpMethods.Post,e,null,r)}sendAll(e){var t;return 0==e.length?Promise.resolve([]):(t=combinePaths(this.replyBaseUrl,nameOf(e[0])+"[]"),this.fetch(HttpMethods.Post,e,null,t))}sendAllOneWay(e){var t;return 0==e.length?Promise.resolve(void 0):(t=combinePaths(this.oneWayBaseUrl,nameOf(e[0])+"[]"),this.fetch(HttpMethods.Post,e,null,t).then(e=>{}))}createUrlFromDto(e,t){let r=combinePaths(this.replyBaseUrl,nameOf(t));e=HttpMethods.hasRequestBody(e);return r=e?r:appendQueryString(r,t)}toAbsoluteUrl(e){return e.startsWith("http://")||e.startsWith("https://")?e:combinePaths(this.baseUrl,e)}deleteCookie(e){this.manageCookies?delete this.cookies[e]:document&&(document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/")}createRequest({method:e,request:t,url:r,args:s,body:n}){r=r||this.createUrlFromDto(e,t),s&&(r=appendQueryString(r,s)),null!=this.bearerToken?this.headers.set("Authorization","Bearer "+this.bearerToken):null!=this.userName&&this.headers.set("Authorization","Basic "+JsonServiceClient.toBase64(this.userName+":"+this.password)),this.manageCookies&&(0<(s=Object.keys(this.cookies).map(e=>{e=this.cookies[e];return e.expires&&e.expires0{"set-cookie"===t.toLowerCase()&&e.split(",").forEach(e=>r.push(e))}),r.forEach(e=>{e=parseCookie(e);e&&(this.cookies[e.name]=e)})}e.headers.forEach((e,t)=>{"x-cookies"===t.toLowerCase()&&0<=e.split(",").indexOf("ss-reftok")&&(this.useTokenCookie=!0)}),this.applyResponseFilters(e);let r=t&&"string"!=typeof t&&"function"==typeof t.createResponse?t.createResponse():null;if("string"==typeof r)return e.text().then(e=>e);t=e.headers.get("content-type"),t=t&&-1!==t.indexOf("application/json");if(t)return this.json(e).then(e=>e);if("undefined"!=typeof Uint8Array&&r instanceof Uint8Array){if("function"!=typeof e.arrayBuffer)throw new Error("This fetch polyfill does not implement 'arrayBuffer'");return e.arrayBuffer().then(e=>new Uint8Array(e))}if("function"==typeof Blob&&r instanceof Blob){if("function"!=typeof e.blob)throw new Error("This fetch polyfill does not implement 'blob'");return e.blob().then(e=>e)}var s=e.headers.get("content-length");return"0"===s||null==s&&!t?e.text().then(e=>r):this.json(e).then(e=>e)}handleError(e,r,t=null){if(r instanceof Error)throw this.raiseError(e,r);if(r.bodyUsed)throw this.raiseError(r,createErrorResponse(r.status,r.statusText,t));return void 0===r.json&&r.responseStatus?new Promise((e,t)=>t(this.raiseError(null,r))):this.json(r).then(e=>{e=sanitize(e);if(e.responseStatus)throw null!=t&&(e.type=t),e;throw createErrorResponse(r.status,r.statusText,t)}).catch(e=>{if(e instanceof Error||"undefined"!=typeof window&&window.DOMException&&e instanceof window.DOMException)throw this.raiseError(r,createErrorResponse(r.status,r.statusText,t));throw this.raiseError(r,e)})}fetch(e,t,r,s){return this.sendRequest({method:e,request:t,args:r,url:s})}fetchBody(e,t,r,s){var n=combinePaths(this.replyBaseUrl,nameOf(t));return this.sendRequest({method:e,request:r,body:"string"==typeof r||isFormData(r)?r:JSON.stringify(r),url:appendQueryString(n,t),args:s,returns:t})}sendRequest(t){var e=this.createRequest(t);let r=t.returns||t.request,n=null,a=()=>{var e=this.createRequest(t);return this.urlFilter&&this.urlFilter(e.url),fetch(e.url,e).then(e=>this.createResponse(e,r)).catch(e=>this.handleError(n,e))};return this.urlFilter&&this.urlFilter(e.url),fetch(e.url,e).then(e=>(n=e,this.createResponse(e,r))).catch(e=>{if(401===e.status){if(this.enableAutoRefreshToken&&(this.refreshToken||this.useTokenCookie||null!=this.cookies["ss-reftok"])){let t=new GetAccessToken({refreshToken:this.refreshToken,useTokenCookie:!!this.useTokenCookie});var r=this.refreshTokenUri||this.createUrlFromDto(HttpMethods.Post,t),s=(this.useTokenCookie&&(this.bearerToken=null,this.headers.delete("Authorization")),this.createRequest({method:HttpMethods.Post,request:t,args:null,url:r}));return fetch(r,s).then(e=>this.createResponse(e,t).then(e=>(this.bearerToken=e?.accessToken||null,a()))).catch(e=>this.onAuthenticationRequired?this.onAuthenticationRequired().then(a).catch(e=>this.handleError(n,e,"RefreshTokenException")):this.handleError(n,e,"RefreshTokenException"))}if(this.onAuthenticationRequired)return this.onAuthenticationRequired().then(a)}return this.handleError(n,e)})}raiseError(e,t){return null!=this.exceptionFilter&&this.exceptionFilter(e,t),t}send(e,t,r){return this.sendRequest({method:getMethod(e),request:e,args:t,url:r})}sendVoid(e,t,r){return this.sendRequest({method:getMethod(e),request:e,args:t,url:r})}async api(e,t,r){try{var s=await this.fetch(getMethod(e,r),e,t);return new ApiResult({response:s})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}async apiVoid(e,t,r){try{var s=await this.fetch(getMethod(e,r),e,t);return new ApiResult({response:s??new EmptyResponse})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}async apiForm(e,t,r,s){try{var n=await this.fetchBody(getMethod(e,s),e,t,r);return new ApiResult({response:n})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}async apiFormVoid(e,t,r,s){try{var n=await this.fetchBody(getMethod(e,s),e,t,r);return new ApiResult({response:n??new EmptyResponse})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}}class JsonApiClient{static create(e="/",t){return new JsonServiceClient(e).apply(e=>{e.basePath="/api",e.headers=new Headers,e.enableAutoRefreshToken=!1,t&&t(e)})}}function getMethod(e,t){return t??("function"==typeof e.getMethod?e.getMethod():HttpMethods.Post)}function getResponseStatus(e){return e.responseStatus??e.ResponseStatus??(e.errorCode?e:e.message?createErrorStatus(e.message,e.errorCode):null)}class ApiResult{response;error;constructor(e){Object.assign(this,e)}get completed(){return null!=this.response||null!=this.error}get failed(){return null!=this.error?.errorCode||null!=this.error?.message}get succeeded(){return!this.failed&&null!=this.response}get errorMessage(){return this.error?.message}get errorCode(){return this.error?.errorCode}get errors(){return this.error?.errors??[]}get errorSummary(){return null!=this.error&&0==this.errors.length?this.errorMessage:null}fieldError(e){let t=e.toLowerCase();return this.errors?.find(e=>e.fieldName.toLowerCase()==t)}fieldErrorMessage(e){return this.fieldError(e)?.message}hasFieldError(e){return null!=this.fieldError(e)}showSummary(e=[]){return!!this.failed&&e.every(e=>!this.hasFieldError(e))}summaryMessage(e=[]){if(this.showSummary(e)){let t=e.map(e=>e.toLowerCase());return t.find(e=>-1==t.indexOf(e.toLowerCase()))??this.errorMessage}}addFieldError(e,t,r="Exception"){this.error||(this.error=new ResponseStatus);var s=this.fieldError(e);null!=s?(s.errorCode=r,s.message=t):this.error.errors.push(new ResponseError({fieldName:e,errorCode:r,message:t}))}}function createErrorStatus(e,t="Exception"){return new ResponseStatus({errorCode:t,message:e})}function createFieldError(e,t,r="Exception"){return new ResponseStatus({errors:[new ResponseError({fieldName:e,errorCode:r,message:t})]})}function isFormData(e){return"undefined"!=typeof window&&e instanceof FormData}function createErrorResponse(t,r,s=null){return apply(new ErrorResponse,e=>{null!=s&&(e.type=s),e.responseStatus=apply(new ResponseStatus,e=>{e.errorCode=t&&t.toString(),e.message=r})})}function createError(e,t,r){return new ErrorResponse({responseStatus:new ResponseStatus({errorCode:e,message:t,errors:r?[new ResponseError({errorCode:e,message:t,fieldName:r})]:void 0})})}function toCamelCase(e){return e&&e.charAt(0).toLowerCase()+e.substring(1)}function toPascalCase(e){return e&&e.charAt(0).toUpperCase()+e.substring(1)}function toKebabCase(e){return(e||"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function map(e,t){return null==e?null:t(e)}function camelCaseAny(e){if(!e||!(e instanceof Object)||Array.isArray(e))return e;var t,r,s,n={};for(t in e)e.hasOwnProperty(t)&&(r=toCamelCase(t),s=e[t],Array.isArray(s)?n[r]=s.map(e=>camelCaseAny(e)):s instanceof Object?n[r]=camelCaseAny(s):n[r]=s);return n}function sanitize(e){return sanitize&&(e.responseStatus||e.errors?e:camelCaseAny(e))}function nameOf(e){if(!e)return"null";if("function"==typeof e.getTypeName)return e.getTypeName();var t=e&&e.constructor;if(null==t)throw e+" doesn't have constructor";return t.name||(e=t.toString()).substring(9,e.indexOf("("))}function log(e,t="LOG"){return console.log(t,e),e}function css(e,t,r){var s="string"==typeof e?document.querySelectorAll(e):e;for(let e=0;er[e]=t[e]),r}function splitCase(e){return"string"!=typeof e?e:e.replace(/([A-Z]|[0-9]+)/g," $1").replace(/_/g," ").trim()}function humanize(e){return!e||0<=e.indexOf(" ")?e:splitCase(toPascalCase(e))}let ucFirst=e=>e.charAt(0).toUpperCase()+e.substring(1),isUpper=e=>"A"<=e&&e<="Z",isLower=e=>"a"<=e&&e<="z",isDigit=e=>"0"<=e&&e<="9",upperOrDigit=e=>isUpper(e)||isDigit(e);function splitTitleCase(t){var r=[];if("string"!=typeof t)return r;let s=0;for(let e=0;e!!e)}function humanify(e){return!e||0<=indexOfAny(e,[" ",",",".",":","-"])?e:ucFirst(splitTitleCase(e).join(" "))}function queryString(e){if(!e||-1===e.indexOf("?"))return{};var t=rightPart(e,"?").split("&"),r={};for(let e=0;e>>e&24),2!=e&&n.length-s!=1||(a+=String.fromCharCode(uint6ToB64(r>>>18&63),uint6ToB64(r>>>12&63),uint6ToB64(r>>>6&63),uint6ToB64(63&r)),r=0);return 0==e?a:a.substring(0,a.length-e)+(1==e?"=":"==")}function uint6ToB64(e){return e<26?e+65:e<52?e+71:e<62?e-4:62===e?43:63===e?47:65}function _btoa(e){return"function"==typeof btoa?btoa(e):Buffer.from(e).toString("base64")}function _atob(e){return"function"==typeof atob?atob(e):Buffer.from(e,"base64").toString()}function stripQuotes(e){return e&&'"'==e[0]&&'"'==e[e.length]?e.slice(1,-1):e}function tryDecode(t){try{return decodeURIComponent(t)}catch(e){return t}}function parseCookie(e){if(!e)return null;let t=null;var r=e.split(/; */);for(let e=0;enormalizeKey(e)===normalizeKey(t))[0]||""]}function parseResponseStatus(t,r=null){try{var e=JSON.parse(t);return sanitize(e.ResponseStatus||e.responseStatus)}catch(e){return{message:r||e.message||e,__error:{error:e,json:t}}}}function toFormData(e){if("undefined"!=typeof window){var t,r=new FormData;for(t in e)r.append(t,e[t]);return r}}function toObject(e){let t={};if(e){if("object"!=typeof e)throw new Error("keys must be an Array of object keys");Array.prototype.slice.call(e).forEach(e=>{this[e]&&(t[e]=this[e])})}return t}function errorResponseSummary(){var e=this.responseStatus||this.ResponseStatus;return null==e||(e=e.ErrorCode?sanitize(e):e).errors&&0!=e.errors.length?void 0:e.message||e.errorCode}function errorResponseExcept(e){var t=this.responseStatus||this.ResponseStatus;if(null!=t){t=t.ErrorCode?sanitize(t):t,e=toVarNames(e);if(e&&null!=t.errors&&0!=t.errors.length){var r,s,n=e.map(e=>(e||"").toLowerCase());for(r of t.errors)if(-1!==n.indexOf((r.fieldName||"").toLowerCase()))return;for(s of t.errors)if(-1===n.indexOf((s.fieldName||"").toLowerCase()))return s.message||s.errorCode}return t.message||t.errorCode||void 0}}function errorResponse(t){var e;return null==t?errorResponseSummary.call(this):null!=(e=this.responseStatus||this.ResponseStatus)&&null!=(e=e.ErrorCode?sanitize(e):e).errors&&0!=e.errors.length&&(e=e.errors.find(e=>(e.fieldName||"").toLowerCase()==t.toLowerCase()))?e.message||e.errorCode:void 0}function isDate(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function toDate(e){return e?isDate(e)?e:"/"==e[0]?new Date(parseFloat(/Date\(([^)]+)\)/.exec(e)[1])):new Date(e):null}function toDateFmt(e){return dateFmt(toDate(e))}function padInt(e){return e<10?"0"+e:e}function dateFmt(e=new Date){return e.getFullYear()+"/"+padInt(e.getMonth()+1)+"/"+padInt(e.getDate())}function dateFmtHM(e=new Date){return e.getFullYear()+"/"+padInt(e.getMonth()+1)+"/"+padInt(e.getDate())+" "+padInt(e.getHours())+":"+padInt(e.getMinutes())}function timeFmt12(e=new Date){return padInt((e.getHours()+24)%12||12)+":"+padInt(e.getMinutes())+":"+padInt(e.getSeconds())+" "+(12'+e+""}function attr(e,t){return e.getAttribute(t)}function sattr(e,t,r){return e.setAttribute(t,r)}function rattr(e,t){return e.removeAttribute(t)}function createElement(e,t){var r={className:"class",htmlFor:"for"},s=document.createElement(e);if(t?.attrs)for(var n in t.attrs)sattr(s,r[n]||n,t.attrs[n]);return t?.events&&on(s,t.events),t&&t.insertAfter&&t.insertAfter.parentNode.insertBefore(s,t.insertAfter.nextSibling),s}function showInvalidInputs(){var e,t,r,s=attr(this,"data-invalid");s&&(e=(r="checkbox"===this.type||"radio"===this.type||hasClass(this,"form-check"))?parent(this,"form-check"):null,r?addClass(e||this.parentElement,"is-invalid form-control"):addClass(this,"is-invalid"),(null!=(r=!(t=this.nextElementSibling)||attr(t,"for")!==this.id&&"SMALL"!==t.tagName?this:r?e||t.parentElement:t)&&r.nextElementSibling&&hasClass(r.nextElementSibling,"invalid-feedback")?r.nextElementSibling:createElement("div",{insertAfter:r,attrs:{className:"invalid-feedback"}})).innerHTML=s)}function parent(e,t){for(;null!=e&&!hasClass(e,t);)e=e.parentElement;return e}function hasClass(e,t){return!!e&&(e.classList?e.classList.contains(t):-1<(" "+e.className+" ").replace(/[\n\t\r]/g," ").indexOf(" "+t+" "))}function addClass(e,t){return e?e.classList?e.classList.add(...t.split(" ")):hasClass(e,t)?null:e.className=(e.className+" "+t).trim():null}function remClass(e,t){return e?e.classList?e.classList.remove(t):hasClass(e,t)?e.className=e.className.replace(/(\s|^)someclass(\s|$)/," "):null:null}function isElement(e){return"undefined"!=typeof window&&(e instanceof window.Element||e==window.document)}function $1(e,t){return"string"==typeof e?(t||document).querySelector(e):e||null}function $$(e,t){return"string"==typeof e?Array.from((t||"undefined"!=typeof document?document:null)?.querySelectorAll(e)??[]):Array.isArray(e)?e.flatMap(e=>$$(e,t)):[e]}function on(e,s){return $$(e).forEach(r=>{Object.keys(s).forEach(function(e){var t=s[e];"string"==typeof e&&"function"==typeof t&&r.addEventListener(e,s[e]=t.bind(r))})}),s}function addScript(r){return new Promise((e,t)=>{document.body.appendChild(createElement("script",{attrs:{src:r},events:{load:e,error:t}}))})}function delaySet(e,t){t=t&&t.duration||300;let r=setTimeout(()=>e(!0),t);return()=>{clearTimeout(r),e(!1)}}function bootstrap(e){var t=(e||document).querySelectorAll("[data-invalid]");for(let e=0;ehandleEvent(t,r,e)):["click","dblclick","change","focus","blur","focusin","focusout","select","keydown","keypress","keyup","hover","toggle","input"].forEach(e=>{r.querySelector(`[data-${e}]`)&&handleEvent(t,r,e)})}function bootstrapForm(t,r){t&&(r.model&&populateForm(t,r.model),t.onsubmit=function(e){return e.preventDefault(),r.type="bootstrap-v4",ajaxSubmit(t,r)})}function applyErrors(e,r,t){var s={overrideMessages:!1,messages:{NotEmpty:"Required",NotNull:"Required",Email:"Invalid email",AlreadyExists:"Already exists"},errorFilter:function(e,t,r){return this.overrideMessages?this.messages[t]||e||splitCase(t):e||splitCase(t)}};if(clearErrors(e),r){r=sanitize(r),addClass(e,"has-errors");let o=t&&"bootstrap-v4"===t.type;var s={...s,...t},i=(t.messages&&(s.overrideMessages=!0),s.errorFilter.bind(s)),t=r.errors;if(t&&t.length){let n={},a={};$$("input,textarea,select,button").forEach(e=>{var t=e.previousElementSibling,r=e.nextElementSibling,s=("radio"===e.type||"checkbox"===e.type?null:e.id)||attr(e,"name");s&&(s=s.toLowerCase(),n[s]=e,o||(hasClass(t,"help-inline")||hasClass(t,"help-block")?a[s]=t:(hasClass(r,"help-inline")||hasClass(r,"help-block"))&&(a[s]=r)))}),$$(".help-inline[data-for],.help-block[data-for]").forEach(e=>{var t=attr(e,"data-for").toLowerCase();a[t]=e});for(var l of t){var u=(l.fieldName||"").toLowerCase(),c=n[u],h=(c&&(o?("radio"!==(h=attr(c,"type"))&&"checkbox"!==h&&addClass(c,"is-invalid"),sattr(c,"data-invalid",i(l.message,l.errorCode,"field"))):(addClass(c,"error"),addClass(c.parentElement,"has-error"))),a[u]);h&&(addClass(h,"error"),h.innerHTML=i(l.message,l.errorCode,"field"),h.style.display="block")}$$("[data-validation-summary]").forEach(e=>{var t=attr(e,"data-validation-summary").split(","),t=errorResponseExcept.call(r,t);t&&(e.innerHTML=bsAlert(t))})}else{let t=i(r.message||splitCase(r.errorCode),r.errorCode,"summary");o?$$("[data-validation-summary]").forEach(e=>e.innerHTML="<"===t[0]?t:bsAlert(t)):$$(".error-summary").forEach(e=>{e.innerHTML=t(e).style.display="block"})}return e}}function clearErrors(e){remClass(e,"has-errors"),$$(".error-summary").forEach(e=>{e.innerHTML="",e.style.display="none"}),$$("[data-validation-summary]").forEach(e=>{e.innerHTML=""}),$$(".error").forEach(e=>remClass(e,"error")),$$(".form-check.is-invalid [data-invalid]").forEach(e=>{rattr(e,"data-invalid")}),$$(".form-check.is-invalid").forEach(e=>remClass(e,"form-control")),$$(".is-invalid").forEach(e=>{remClass(e,"is-invalid"),rattr(e,"data-invalid")}),$$(".is-valid").forEach(e=>remClass(e,"is-valid"))}function toVarNames(e){return e?isArray(e)?e:e.split(",").map(e=>e.trim()):[]}function formSubmit(e={}){let r=this;var t=attr(r,"enctype")||Types.UrlEncoded;if(t==Types.MultiPart&&void 0===window.FormData)throw new Error(`FormData Type is needed to send '${Types.MultiPart}' Content Types`);let s;try{s=serializeForm(r,t)}catch(e){throw new Error(""+(e.message||e))}var n=new Headers,t=(n.set("Accept",Types.Json),n.set("Content-Type",t),{method:attr(r,"method")||"POST",credentials:"include",mode:"cors",headers:n,body:s});return e.requestFilter&&e.requestFilter(t),fetch(new Request(e.url||attr(r,"action"),t)).catch(e=>{throw new Error(`Network is unreachable (${e.message||e})`)}).then(t=>(e.responseFilter&&e.responseFilter(t),t.ok?(handleHeaderBehaviors(r,t),fromResponse(t)):t.json().catch(e=>{throw new Error("The request failed with "+(t.statusText||t.status))}).then(e=>{throw Object.assign(new ErrorResponse,sanitize(e))})))}function handleHeaderBehaviors(e,t){var r=t.headers.get("X-Location"),r=(r&&(location.href=r),t.headers.get("X-Trigger"));r&&triggerEvent(e,0<=(t=r.indexOf(":"))?r.substring(0,t):r,(e=0<=t?r.substring(t+1):null)?[e]:[])}function ajaxSubmit(s,n={}){let a="bootstrap-v4"===n.type;clearErrors(s);try{if(n.validate&&!1===n.validate.call(s))return!1}catch(e){return!1}addClass(s,"loading");let e=null==n.onSubmitDisable?"[type=submit]":n.onSubmitDisable,t=null!=e&&""!=e;function r(e,t=null){var r;t?applyErrors(s,t.ResponseStatus||t.responseStatus,{...n}):e&&(addClass(s,"has-errors"),(r=$$(".error-summary")[0])&&(r.innerHTML=e),a)&&(r=$$("[data-validation-summary]")[0])&&(r.innerHTML=bsAlert(e)),n.error&&n.error.call(s,t),a&&$$("[data-invalid]").forEach(e=>showInvalidInputs.call(e))}return t&&$$(e).forEach(e=>{sattr(e,"disabled","disabled")}),(n.submit||formSubmit).call(s,n).then(e=>(n.success&&n.success.call(s,e),!1)).catch(e=>{e.responseStatus?r(null,e):r(""+(e.message||e),null)}).finally(()=>{remClass(s,"loading"),t&&$$(e).forEach(e=>{rattr(e,"disabled")}),n.complete&&n.complete.call(s)})}function fromResponse(e){var t,r=e.headers.get("content-type"),r=r&&-1!==r.indexOf(Types.Json);return!r&&("0"===(t=e.headers.get("content-length"))||null==t&&!r)?null:e.json()}function serializeForm(e,t=null){return t===Types.MultiPart?new FormData(e):t==Types.Json?JSON.stringify(serializeToObject(e)):serializeToUrlEncoded(e)}function formEntries(e,r,s){var n,a=e,o=a.elements.length;for(let t=0;te[t]=r)}function serializeToUrlEncoded(e){return formEntries(e,[],(e,t,r)=>"string"==typeof r?e.push(encodeURIComponent(t)+"="+encodeURIComponent(r)):null).join("&").replace(/%20/g,"+")}function serializeToFormData(e){return formEntries(e,new FormData,(e,t,r)=>e.append(t,r))}function sanitizeFormData(e){for(var[t,r]of e)"object"==typeof r&&0===r.size&&e.delete(t);return e}function triggerEvent(e,t,r=null){var s;document.createEvent?((s=document.createEvent("click"==t||t.startsWith("mouse")?"MouseEvents":"HTMLEvents")).initEvent(t,!0,!0),s.data=r,e.dispatchEvent(s)):(r=document.createEventObject(),e.fireEvent("on"+t,r))}function populateForm(r,s){if(s){var n;for(let e in s){let t=s[e];null==t&&(t="");var a=r.elements.namedItem(e)||r.elements.namedItem((n=e)&&(n[0]===n[0].toUpperCase()?toCamelCase(n):n[0]===n[0].toLowerCase()?toPascalCase(n):n)),o=a;if(a)switch(o.type||a[0].type){case"radio":case"checkbox":var i=a.length;for(let e=0;e{0<=r.indexOf(e)&&(s[e]=t[e])}),s}function omit(t,r){let s={};return t&&Object.keys(t).forEach(e=>{r.indexOf(e)<0&&(s[e]=t[e])}),s}function omitEmpty(r){let s={};return r&&Object.keys(r).forEach(e=>{var t=r[e];null!=t&&""!==t&&(s[e]=t)}),s}function apply(e,t){return t(e),e}function each(e,r,t){return e.reduce((e,t)=>(r(e,t),e),t||{})}function resolve(e,t){e="function"==typeof e?e():e;return"function"==typeof t?t(e):e}function mapGet(e,r){if(!e||!r)return null;var s=e[r];if(s)return s;if("object"!=typeof e)return null;{let t=r.toLowerCase();s=Object.keys(e).find(e=>e.toLowerCase()===t);return s?e[s]:null}}function apiValue(e){return null==e?"":"string"==typeof e?"/Date("===e.substring(0,6)?toDate(e):e.trim():e}function apiValueFmt(e){e=apiValue(e);return(null!=e?isDate(e)?dateFmt(e):e:null)||""}function activeClassNav(e,t){return null!=e.href&&(e.exact||t.length<=1?trimEnd(t,"/").toLowerCase()===trimEnd(e.href,"/").toLowerCase():trimEnd(t,"/").toLowerCase().startsWith(trimEnd(e.href,"/").toLowerCase()))?"active":null}function activeClass(e,t,r){return null!=e&&(r||t.length<=1?trimEnd(t,"/").toLowerCase()===trimEnd(e,"/").toLowerCase():trimEnd(t,"/").toLowerCase().startsWith(trimEnd(e,"/").toLowerCase()))?"active":null}function bootstrapColors(){return["primary","secondary","success","info","warning","danger","light","dark"]}JsonServiceClient.toBase64=e=>_btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(new Number("0x"+t).valueOf()))),"undefined"!=typeof window&&void 0!==window.Element&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){let t=this;do{if(t.matches(e))return t}while(null!==(t=t.parentElement||t.parentNode)&&1===t.nodeType);return null})),(e=>{e.MultiPart="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Json="application/json"})(Types=Types||{});let BootstrapColors=bootstrapColors();function btnColorClass(e){for(var t of bootstrapColors()){if(e[t])return"btn-"+t;if(e["outline-"+t])return"btn-outline-"+t}return null}function bootstrapSizes(){return["xs","sm","md","lg"]}let BootstrapSizes=bootstrapSizes();function btnSizeClass(e){for(var t of bootstrapSizes())if(e[t])return"btn-"+t;return null}function btnClasses(e){var t=[],r=btnColorClass(e),r=(r&&t.push(r),btnSizeClass(e));return r&&t.push(r),e.block&&t.push("btn-block"),t}class NavDefaults{static navClass="nav";static navItemClass="nav-item";static navLinkClass="nav-link";static childNavItemClass="nav-item dropdown";static childNavLinkClass="nav-link dropdown-toggle";static childNavMenuClass="dropdown-menu";static childNavMenuItemClass="dropdown-item";static create(){return new NavOptions}static forNav(e){return e||NavDefaults.create()}static overrideDefaults(e,t){return null==e?t:((e=Object.assign({},e)).navClass===NavDefaults.navClass&&null!=t.navClass&&(e.navClass=t.navClass),e.navItemClass===NavDefaults.navItemClass&&null!=t.navItemClass&&(e.navItemClass=t.navItemClass),e.navLinkClass===NavDefaults.navLinkClass&&null!=t.navLinkClass&&(e.navLinkClass=t.navLinkClass),e.childNavItemClass===NavDefaults.childNavItemClass&&null!=t.childNavItemClass&&(e.childNavItemClass=t.childNavItemClass),e.childNavLinkClass===NavDefaults.childNavLinkClass&&null!=t.childNavLinkClass&&(e.childNavLinkClass=t.childNavLinkClass),e.childNavMenuClass===NavDefaults.childNavMenuClass&&null!=t.childNavMenuClass&&(e.childNavMenuClass=t.childNavMenuClass),e.childNavMenuItemClass===NavDefaults.childNavMenuItemClass&&null!=t.childNavMenuItemClass&&(e.childNavMenuItemClass=t.childNavMenuItemClass),e)}static showNav(e,t){return null==t||0===t.length?null==e.show:!(null!=e.show&&t.indexOf(e.show)<0||null!=e.hide&&0<=t.indexOf(e.hide))}}class NavLinkDefaults{static forNavLink(e){return e||NavDefaults.create()}}class NavbarDefaults{static navClass="navbar-nav";static create(){return new NavOptions({navClass:NavbarDefaults.navClass})}static forNavbar(e){return NavDefaults.overrideDefaults(e,NavbarDefaults.create())}}class NavButtonGroupDefaults{static navClass="btn-group";static navItemClass="btn btn-primary";static create(){return new NavOptions({navClass:NavButtonGroupDefaults.navClass,navItemClass:NavButtonGroupDefaults.navItemClass})}static forNavButtonGroup(e){return NavDefaults.overrideDefaults(e,NavButtonGroupDefaults.create())}}class LinkButtonDefaults{static navItemClass="btn";static create(){return new NavOptions({navItemClass:LinkButtonDefaults.navItemClass})}static forLinkButton(e){return NavDefaults.overrideDefaults(e||null,LinkButtonDefaults.create())}}class UserAttributes{static fromSession(e){var t=[];return null!=e&&(t.push("auth"),e.roles&&t.push(...e.roles.map(e=>"role:"+e)),e.permissions)&&t.push(...e.permissions.map(e=>"perm:"+e)),t}}class NavOptions{static fromSession(e,t){return(t=t||new NavOptions).attributes=UserAttributes.fromSession(e),t}attributes;activePath;baseHref;navClass;navItemClass;navLinkClass;childNavItemClass;childNavLinkClass;childNavMenuClass;childNavMenuItemClass;constructor(e){this.attributes=[],this.navClass=NavDefaults.navClass,this.navItemClass=NavDefaults.navItemClass,this.navLinkClass=NavDefaults.navLinkClass,this.childNavItemClass=NavDefaults.childNavItemClass,this.childNavLinkClass=NavDefaults.childNavLinkClass,this.childNavMenuClass=NavDefaults.childNavMenuClass,this.childNavMenuItemClass=NavDefaults.childNavMenuItemClass,Object.assign(this,e)}}function classNames(...t){var r=[];for(let e=0;ee.concat(r(t)),[])}function uniq(e){return Array.from(new Set(e)).sort((e,t)=>t/g,">").replace(/'/g,"'").replace(/"/g,"""):""+e}function htmlAttrs(t){let r=[];return Object.keys(t).forEach(e=>{0Object.keys(e).forEach(e=>{-1===t.indexOf(e)&&t.push(e)})),t}function alignLeft(e,t,r=" "){return t<0?"":t+1-e.length<=0?e:r+e+r.repeat(t+1-e.length)}function alignCenter(e,t,r=" "){var s,n;return t<0?"":(n=(e=e||"").length,s=Math.floor(t/2-n/2),n=Math.abs(n%2-t%2),r.repeat(s+1)+e+r.repeat(s+1+n))}function alignRight(e,t,r=" "){return t<0?"":t+1-e.length<=0?e:r.repeat(t+1-e.length)+e+r}function alignAuto(e,t,r=" "){var s=""+e;return s.length<=t?("number"==typeof e?alignRight:alignLeft)(s,t,r):s}function EventBus(){var{subscribe:e,publish:t}=createBus();this.subscribe=e,this.publish=t}function createBus(){let s={};return{subscribe:function(e,t){let r=Symbol("id");return s[e]||(s[e]={}),s[e][r]=t,{unsubscribe:function(){delete s[e][r],0===Object.getOwnPropertySymbols(s[e]).length&&delete s[e]}}},publish:function(t,r){s[t]&&Object.getOwnPropertySymbols(s[t]).forEach(e=>s[t][e](r))}}}class Inspect{static async vars(n){if("object"==typeof process){let s=process.env.INSPECT_VARS;if(s&&n){let e=e=>"node:"+e;await import(e("fs")).then(async r=>{await import(e("path")).then(e=>{var t=s.replace(/\\/g,"/");0<=t.indexOf("/")&&(e=e.dirname(t),r.existsSync(e)||r.mkdirSync(e)),r.writeFileSync(t,JSON.stringify(n))})})}}}static dump(e){return JSON.stringify(e,null,4).replace(/"/g,"")}static printDump(e){console.log(Inspect.dump(e))}static dumpTable(e){let s=e,n=uniqueKeys(s),a={};n.forEach(t=>{let r=t.length;s.forEach(e=>{var e=e[t];null!=e&&(e=(""+e).length)>r&&(r=e)}),a[t]=r});e=Object.keys(a).length,e=Object.keys(a).map(e=>a[e]).reduce((e,t)=>e+t,0)+2*e+(e+1);let o=[],t=(o.push(`+${"-".repeat(e-2)}+`),"|");return n.forEach(e=>t+=alignCenter(e,a[e])+"|"),o.push(t),o.push(`|${"-".repeat(e-2)}|`),s.forEach(t=>{let r="|";n.forEach(e=>r+=alignAuto(t[e],a[e])+"|"),o.push(r)}),o.push(`+${"-".repeat(e-2)}+`),o.join("\n")}static printDumpTable(e){console.log(Inspect.dumpTable(e))}}export{ResponseStatus,ResponseError,ErrorResponse,EmptyResponse,NavItem,GetNavItems,GetNavItemsResponse,MetadataTypesConfig,MetadataRoute,MetadataOperationType,MetadataTypes,MetadataTypeName,MetadataDataContract,MetadataDataMember,MetadataAttribute,MetadataPropertyType,MetadataType,NewInstanceResolver,SingletonInstanceResolver,ReadyState,ServerEventsClient,getAllMembers,ServerEventReceiver,UpdateEventSubscriber,UpdateEventSubscriberResponse,GetEventSubscribers,ServerEventUser,HttpMethods,GetAccessTokenResponse,JsonServiceClient,JsonApiClient,getMethod,getResponseStatus,ApiResult,createErrorStatus,createFieldError,isFormData,createError,toCamelCase,toPascalCase,toKebabCase,map,camelCaseAny,sanitize,nameOf,css,splitOnFirst,splitOnLast,leftPart,rightPart,lastLeftPart,lastRightPart,chop,onlyProps,humanize,ucFirst,isUpper,isLower,isDigit,splitTitleCase,humanify,queryString,combinePaths,createPath,createUrl,appendQueryString,setQueryString,bytesToBase64,stripQuotes,tryDecode,parseCookie,normalizeKey,normalize,getField,parseResponseStatus,toFormData,toObject,errorResponseSummary,errorResponseExcept,errorResponse,isDate,toDate,toDateFmt,padInt,dateFmt,dateFmtHM,timeFmt12,toLocalISOString,toTime,msToTime,padStart,createElement,isElement,$1,$$,on,addScript,delaySet,bootstrap,bindHandlers,bootstrapForm,toVarNames,formSubmit,ajaxSubmit,serializeForm,serializeToObject,serializeToUrlEncoded,serializeToFormData,sanitizeFormData,triggerEvent,populateForm,trimEnd,safeVarName,pick,omit,omitEmpty,apply,each,resolve,mapGet,apiValue,apiValueFmt,activeClassNav,activeClass,BootstrapColors,btnColorClass,BootstrapSizes,btnSizeClass,btnClasses,NavDefaults,NavLinkDefaults,NavbarDefaults,NavButtonGroupDefaults,LinkButtonDefaults,UserAttributes,NavOptions,classNames,fromXsdDuration,toXsdDuration,toTimeSpanFmt,flatMap,uniq,enc,htmlAttrs,indexOfAny,isNullOrEmpty,fromDateTime,toDateTime,fromTimeSpan,toTimeSpan,fromGuid,toGuid,fromByteArray,toByteArray,toBase64String,StringBuffer,JSV,uniqueKeys,alignLeft,alignCenter,alignRight,alignAuto,EventBus,createBus,Inspect}; \ No newline at end of file diff --git a/MyApp/wwwroot/lib/mjs/servicestack-client.mjs b/MyApp/wwwroot/lib/mjs/servicestack-client.mjs index 2abff8d..f132bc9 100644 --- a/MyApp/wwwroot/lib/mjs/servicestack-client.mjs +++ b/MyApp/wwwroot/lib/mjs/servicestack-client.mjs @@ -1361,7 +1361,11 @@ export function splitTitleCase(s) { to.push(s.substring(lastSplit, s.length)); return to.filter(x => !!x); } -export function humanify(s) { return !s || s.indexOf(' ') >= 0 ? s : ucFirst(splitTitleCase(s).join(' ')); } +export function humanify(s) { + return !s || indexOfAny(s, [' ', ',', '.', ':', '-']) >= 0 + ? s + : ucFirst(splitTitleCase(s).join(' ')); +} export function queryString(url) { if (!url || url.indexOf('?') === -1) return {}; diff --git a/MyApp/wwwroot/lib/mjs/servicestack-vue.min.mjs b/MyApp/wwwroot/lib/mjs/servicestack-vue.min.mjs index a55ad22..f4cb0cc 100644 --- a/MyApp/wwwroot/lib/mjs/servicestack-vue.min.mjs +++ b/MyApp/wwwroot/lib/mjs/servicestack-vue.min.mjs @@ -1,37 +1,37 @@ -var po=Object.defineProperty,mo=(e,t,l)=>t in e?po(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,Le=(e,t,l)=>(mo(e,"symbol"!=typeof t?t+"":t,l),l);import{defineComponent as ce,computed as v,openBlock as o,createElementBlock as i,normalizeClass as b,createElementVNode as l,createCommentVNode as x,renderSlot as K,ref as I,toDisplayString as P,inject as Ue,nextTick as $t,isRef as ln,unref as te,mergeProps as Ae,withModifiers as qe,h as yt,resolveComponent as G,createBlock as ae,withCtx as Ce,useAttrs as ho,createVNode as xe,createTextVNode as ke,watchEffect as ws,normalizeStyle as nl,Fragment as Ie,renderList as De,withDirectives as Ct,vModelCheckbox as ol,withKeys as nn,createStaticVNode as xs,vModelSelect as go,useSlots as al,getCurrentInstance as Be,onMounted as st,createSlots as rl,normalizeProps as Ot,guardReactiveProps as ks,vModelDynamic as yo,onUnmounted as zt,watch as St,vModelText as bo,resolveDynamicComponent as on,provide as ss,resolveDirective as wo}from"vue";import{errorResponseExcept as ko,dateFmt as an,toTime as _o,omit as ft,enc as Ks,appendQueryString as Bt,lastLeftPart as rn,setQueryString as $o,nameOf as Co,ApiResult as Xe,lastRightPart as xt,leftPart as Ls,map as Qe,toDate as Mt,toDateTime as xo,toCamelCase as Lo,mapGet as be,chop as Vo,fromXsdDuration as un,isDate as Vs,timeFmt12 as So,apiValue as Mo,indexOfAny as Ao,createBus as To,toKebabCase as Zl,sanitize as Fo,humanize as ze,delaySet as dn,rightPart as ms,queryString as Zs,combinePaths as Io,toPascalCase as ot,errorResponse as pt,trimEnd as Do,$1 as _s,ResponseStatus as Us,ResponseError as Wl,HttpMethods as il,omitEmpty as Po,uniqueKeys as Ws,humanify as cn,each as jo}from"@servicestack/client";const Oo={class:"flex items-center"},Bo={key:0,class:"flex-shrink-0 mr-3"},Ro={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"},Eo=l("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),Ho=[Eo],zo={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"},No=l("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),Uo=[No],qo={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"},Qo=l("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),Ko=[Qo],Zo={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"},Wo=l("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),Go=[Wo],Jo=ce({__name:"Alert",props:{type:{default:"warn"},hideIcon:{type:Boolean}},setup(e){const t=e,a=v(()=>"info"==t.type?"bg-blue-50 dark:bg-blue-200":"error"==t.type?"bg-red-50 dark:bg-red-200":"success"==t.type?"bg-green-50 dark:bg-green-200":"bg-yellow-50 dark:bg-yellow-200"),n=v(()=>"info"==t.type?"border-blue-400":"error"==t.type?"border-red-400":"success"==t.type?"border-green-400":"border-yellow-400"),s=v(()=>"info"==t.type?"text-blue-700":"error"==t.type?"text-red-700":"success"==t.type?"text-green-700":"text-yellow-700");return(e,t)=>(o(),i("div",{class:b([a.value,n.value,"border-l-4 p-4"])},[l("div",Oo,[e.hideIcon?x("",!0):(o(),i("div",Bo,["warn"==e.type?(o(),i("svg",Ro,Ho)):"error"==e.type?(o(),i("svg",zo,Uo)):"info"==e.type?(o(),i("svg",qo,Ko)):"success"==e.type?(o(),i("svg",Zo,Go)):x("",!0)])),l("div",null,[l("p",{class:b([s.value,"text-sm"])},[K(e.$slots,"default")],2)])])],2))}}),Xo={key:0,class:"rounded-md bg-green-50 dark:bg-green-200 p-4",role:"alert"},Yo={class:"flex"},ea=l("div",{class:"flex-shrink-0"},[l("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"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})])],-1),ta={class:"ml-3"},sa={class:"text-sm font-medium text-green-800"},la={key:0},na={class:"ml-auto pl-3"},oa={class:"-mx-1.5 -my-1.5"},aa=l("span",{class:"sr-only"},"Dismiss",-1),ra=l("svg",{class:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[l("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,ra],ua=ce({__name:"AlertSuccess",props:{message:{}},setup(e){const a=I(!1);return(e,t)=>a.value?x("",!0):(o(),i("div",Xo,[l("div",Yo,[ea,l("div",ta,[l("h3",sa,[e.message?(o(),i("span",la,P(e.message),1)):K(e.$slots,"default",{key:1})])]),l("div",na,[l("div",oa,[l("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)])])])]))}}),da={class:"flex"},ca=l("div",{class:"flex-shrink-0"},[l("svg",{class:"h-5 w-5 text-red-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("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),fa={class:"ml-3"},va={class:"text-sm text-red-700 dark:text-red-200"},pa=ce({__name:"ErrorSummary",props:{status:{},except:{},class:{}},setup(e){const t=e;let a=Ue("ApiState",void 0);const n=v(()=>t.status||null!=a&&a.error.value?ko.call({responseStatus:t.status??(null==a?void 0:a.error.value)},t.except??[]):null);return(e,t)=>n.value?(o(),i("div",{key:0,class:b("bg-red-50 dark:bg-red-900 border-l-4 border-red-400 p-4 "+e.$props.class)},[l("div",da,[ca,l("div",fa,[l("p",va,P(n.value),1)])])],2)):x("",!0)}}),ma=["id","aria-describedby"],ha=ce({__name:"InputDescription",props:{id:{},description:{}},setup(e){return(e,t)=>e.description?(o(),i("div",{key:"description",class:"mt-2 text-sm text-gray-500",id:e.id+"-description","aria-describedby":e.id+"-description"},[l("div",null,P(e.description),1)],8,ma)):x("",!0)}});function Ss(e){return an(e).replace(/\//g,"-")}function fn(e){return null==e?"":_o(e)}function vn(e,t){e.value=null,$t(()=>e.value=t)}function It(l){return Object.keys(l).forEach(e=>{var t=l[e];l[e]=ln(t)?te(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 hs(l){if(!("u"0":"<"+e+Gs(l)+`>${t||""}`}function Gs(l){return Object.keys(l).reduce((e,t)=>`${e} ${t}="${Ks(l[t])}"`,"")}function Ms(e){return Object.assign({target:"_blank",rel:"noopener",class:"text-blue-600"},e)}function jt(e){return Vl(e)}let ga=["string","number","boolean","null","undefined"];function Vt(e){return 0<=ga.indexOf(typeof e)||e instanceof Date}function Xt(e){return!Vt(e)}class pn{get length(){return"u"",";"].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 Js(e){typeof navigator<"u"&&navigator.clipboard.writeText(e)}function cl(e){e=Y.config.storage.getItem(e);return e?JSON.parse(e):null}function As(e,t){return Bt("swr."+Co(e),t?Object.assign({},e,t):e)}function ya(e){e.request&&(e=As(e.request,e.args),Y.config.storage.removeItem(e))}async function mn(e,t,l,a,n){var s=As(t,a),e=(l(new Xe({response:cl(s)})),await e.api(t,a,n));return e.succeeded&&e.response&&(e.response._date=(new Date).valueOf(),t=JSON.stringify(e.response),Y.config.storage.setItem(s,t),l(e)),e}function hn(t,l){let a=null;return(...e)=>{a&&clearTimeout(a),a=setTimeout(()=>{t(...e)},l||100)}}function bt(e){return"string"==typeof e?e.split(","):e||[]}function _t(e,t){const l=bt(t);return e.reduce((e,t)=>(e[t]=!l.includes(t),e),{})}function gn(){return{LocalStore:pn,dateInputFormat:Ss,timeInputFormat:fn,setRef:vn,unRefs:It,transition:Lt,focusNextElement:hs,getTypeName:Nt,htmlTag:dt,htmlAttrs:Gs,linkAttrs:Ms,toAppUrl:jt,isPrimitive:Vt,isComplexType:Xt,pushState:ul,scopedExpr:dl,copyText:Js,fromCache:cl,swrCacheKey:As,swrClear:ya,swrApi:mn,asStrings:bt,asOptions:_t,createDebounce:hn}}const yn="png,jpg,jpeg,jfif,gif,svg,webp".split(","),bn={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(",")},Gl=Object.keys(bn),vt=(e,t)=>``,gs={img:vt("4 4 16 16",""),vid:vt("0 0 24 24",""),aud:vt("0 0 24 24",""),ppt:vt("0 0 48 48",""),xls:vt("0 0 256 256",""),doc:vt("0 0 32 32",""),zip:vt("0 0 16 16",""),exe:vt("0 0 16 16",""),att:vt("0 0 24 24","")},ba=/[\r\n%#()<>?[\\\]^`{|}]/g,Jl=1024,wa=["Bytes","KB","MB","GB","TB"],ka=(()=>{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 o(e,t){e.split(",").forEach(e=>s[e]=t)}function r(e,t){e.split(",").forEach(e=>s[e]=t(e))}return r("jpeg,gif,png,tiff,bmp,webp",e=>l+e),r("jsx,csv,css",e=>a+e),r("aac,ac3,aiff,m4a,m4b,m4p,mid,midi,wav",e=>"audio/"+e),r("3gpp,avi,dv,divx,ogg,mp4,webm",e=>n+e),r("rtf,pdf",e=>t+e),o("htm,html,shtm",a+"html"),o("js,mjs,cjs",a+"javascript"),o("yml,yaml",t+"yaml"),o("bat,cmd",t+"bat"),o("xml,csproj,fsproj,vbproj",a+"xml"),o("txt,ps1",a+"plain"),o("qt,mov",n+"quicktime"),o("doc,dot",t+"msword"),o("xls,xlt,xla",t+"excel"),o("ppt,oit,pps,ppa",t+"vnd.ms-powerpoint"),o("cer,crt,der",t+"x-x509-ca-cert"),o("gz,tgz,zip,rar,lzh,z",t+"x-compressed"),o("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 Xs=[];function wn(e){return(e=(e=(e=e.replace(/"/g,"'")).replace(/>\s+<")).replace(/\s{2,}/g," ")).replace(ba,encodeURIComponent)}function fl(e){return"data:image/svg+xml;utf8,"+wn(e)}function kn(e){e=URL.createObjectURL(e);return Xs.push(e),e}function _n(){Xs.forEach(e=>{try{URL.revokeObjectURL(e)}catch(e){console.error("URL.revokeObjectURL",e)}}),Xs=[]}function vl(e){return e?(e=Ls(e,"?"),xt(e,"/")):null}function ls(e){e=vl(e);return null==e||-1===e.indexOf(".")?null:xt(e,".").toLowerCase()}function pl(e){var t=ls(e.name);return t&&0<=yn.indexOf(t)?kn(e):wt(e.name)}function ml(e){return e&&(!(!e.startsWith("blob:")&&!e.startsWith("data:"))||(e=ls(e))&&0<=yn.indexOf(e))||!1}function wt(e){var t;return e?null==(t=ls(e))||ml(e)?e:Jt(t)||fl(gs.doc):null}function Jt(e){e=$n(e);return e&&fl(e)||null}function $n(t){if(gs[t])return gs[t];for(let e=0;e({fileName:e.name,contentLength:e.size,filePath:pl(e)}))}function Ts(e,t){e.onerror=null,e.src=gl(e.src,t)||""}function gl(e,t){return Jt(xt(e,".").toLowerCase())||(t?Jt(t)||t:null)||Jt("doc")}function Ys(e){if(e)return e=xt(e,".").toLowerCase(),ka[e]||"application/"+e;throw new Error("fileNameOrExt required")}function Mm(){return{extSvg:$n,extSrc:Jt,getExt:ls,encodeSvg:wn,canPreview:ml,getFileName:vl,getMimeType:Ys,formatBytes:hl,filePathUri:wt,svgToDataUri:fl,fileImageUri:pl,objectUrl:kn,flush:_n,inputFiles:_a,iconOnError:Ts,iconFallbackSrc:gl}}class $a{constructor(e){Le(this,"view"),Le(this,"includeTypes"),Object.assign(this,e)}getTypeName(){return"MetadataApp"}getMethod(){return"GET"}createResponse(){return{}}}const Rt="/metadata/app.json",Ca={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"},xa={number:"Int32",checkbox:"Boolean",date:"DateTime","datetime-local":"DateTime",time:"TimeSpan"},el={Byte:"byte",Int16:"short",Int32:"int",Int64:"long",UInt16:"ushort",Unt32:"uint",UInt64:"ulong",Single:"float",Double:"double",Decimal:"decimal"},La=([...Object.keys(el),...Object.values(el)],{String:"string",Boolean:"bool",...el});function fs(e){return La[e]||e}function Cn(e,t){return e?(t=t||[],"Nullable`1"===e?fs(t[0])+"?":e.endsWith("[]")?`List<${fs(e.substring(0,e.length-2))}>`:0===t.length?fs(e):Ls(fs(e),"`")+"<"+t.join(",")+">"):""}function Va(e){return e&&Cn(e.name,e.genericArgs)}class Et{constructor(){Le(this,"Query"),Le(this,"QueryInto"),Le(this,"Create"),Le(this,"Update"),Le(this,"Patch"),Le(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){Ne.isQueryInto(e)&&!this.QueryInto?this.QueryInto=e:Ne.isQuery(e)&&!this.Query?this.Query=e:Ne.isCreate(e)&&!this.Create?this.Create=e:Ne.isUpdate(e)&&!this.Update?this.Update=e:Ne.isPatch(e)&&!this.Patch?this.Patch=e:Ne.isDelete(e)&&!this.Delete&&(this.Delete=e)}static from(e){const t=new Et;return e.forEach(e=>{t.add(e)}),t}static forType(l,e){var t;let a=new Et;return Y.config.apisResolver&&l&&(t=Y.config.apisResolver(l,e))&&(a.Query=t.Query,a.QueryInto=t.QueryInto,a.Create=t.Create,a.Update=t.Update,a.Patch=t.Patch,a.Delete=t.Delete),l&&(null!=(e=e??(null==(t=Y.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 Ne={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=>Qe(e.request.inherits,e=>0<=Ne.AnyRead.indexOf(e.name)),isQuery:e=>Qe(e.request.inherits,e=>"QueryDb`1"===e.name),isQueryInto:e=>Qe(e.request.inherits,e=>"QueryDb`2"===e.name),isCrud:e=>{return null==(e=e.request.implements)?void 0:e.some(e=>0<=Ne.AnyWrite.indexOf(e.name))},isCreate:e=>vs(e,Ne.Create),isUpdate:e=>vs(e,Ne.Update),isPatch:e=>vs(e,Ne.Patch),isDelete:e=>vs(e,Ne.Delete),model:e=>{var t;return e?Qe(e.inherits,e=>0<=Ne.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<=Ne.AnyWrite.indexOf(e.name)))?void 0:e.genericArgs[0]:null}};function Sa(e){var t;return(null==(t=e.input)?void 0:t.type)||Fs(yl(e))}function xn(e){return e.endsWith("?")?Vo(e,1):e}function Fs(e){return Ca[xn(e)]}function Ma(e){return e&&xa[e]||"String"}function yl(e){return"Nullable`1"===e.type?e.genericArgs[0]:e.type}function tl(e){return e&&"number"==Fs(e)||!1}function Ln(e){return e&&"string"==e.toLowerCase()||!1}function Aa(e){return"List`1"==e||e.startsWith("List<")||e.endsWith("[]")}function Vn(e){var t;return!(null==e||!e.type||(t=yl(e),e.isValueType&&-1==t.indexOf("`"))||e.isEnum||null!=Fs(e.type))}function Sn(e){var t;return!!(null!=e&&e.type&&(t=yl(e),e.isValueType&&-1==t.indexOf("`")||e.isEnum||"hidden"==(null==(t=e.input)?void 0:t.type)||"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!=Fs(e.type)))}function Yt(e,t){let l="string"==typeof e?Is(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 Ta(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 ys(l,e){return l?(Object.keys(l).forEach(e=>{var t=l[e];"string"==typeof t?t.startsWith("/Date")&&(l[e]=Ss(Mt(t))):null!=t&&"object"==typeof t&&(Array.isArray(t)?l[e]=Array.from(t):l[e]=Object.assign({},t))}),l):{}}function Fa(e,r){let i={};return Array.from(e.elements).forEach(a=>{var n;if(a.id&&null!=a.value&&""!==a.value){const s=a.id.toLowerCase(),o=r&&r.find(e=>e.name.toLowerCase()==s);let e=null==o?void 0:o.type,t=null==(n=null==o?void 0:o.genericArgs)?void 0:n[0],l="checkbox"===a.type?a.checked:a.value;tl(e)?l=Number(l):"List`1"===e&&"string"==typeof l&&(l=l.split(",").map(e=>tl(t)?Number(e):e)),i[a.id]=l}}),i}function bl(e){var t;return(null==(t=null==e?void 0:e.api)?void 0:t.operations)&&0e)?!1:a)){if((t||l)&&(await Xl(t||Rt,l),null!=Y.metadata.value))return;var n=Ue("client");if(null!=n&&(e=await n.api(new $a)).succeeded&&es(e.response),null!=Y.metadata.value)return;await Xl(Rt)}return Y.metadata.value}function at(t,l){if(Y.config.typeResolver){var e=Y.config.typeResolver(t,l);if(e)return e}var a,e=null==(e=Y.metadata.value)?void 0:e.api;return e&&t?e.types.find(e=>e.name.toLowerCase()===t.toLowerCase()&&(!l||e.namespace==l))||((a=Is(t))?a.request:(a=e.operations.find(e=>e.response&&e.response.name.toLowerCase()===t.toLowerCase()&&(!l||e.response.namespace==l)))?a.response:null):null}function Is(t){if(Y.config.apiResolver){var e=Y.config.apiResolver(t);if(e)return e}e=null==(e=Y.metadata.value)?void 0:e.api;return e?e.operations.find(e=>e.request.name.toLowerCase()===t.toLowerCase()):null}function ja({dataModel:e}){var t=null==(t=Y.metadata.value)?void 0:t.api;if(!t)return[];let l=t.operations;if(e){const a="string"==typeof e?at(e):e;l=l.filter(e=>Mn(e.dataModel,a))}return l}function kl(e){return e?at(e.name,e.namespace):null}function Mn(e,t){return e&&t&&e.name===t.name&&(!e.namespace||!t.namespace||e.namespace===t.namespace)}function Oa(e,t){e=at(e);return e&&e.properties&&e.properties.find(e=>e.name.toLowerCase()===t.toLowerCase())}function An(e){return Tn(at(e))}function Tn(t){if(t&&t.isEnum&&null!=t.enumNames){var l={};for(let e=0;el.push({key:e,value:t[e]})),l}}function Ba(e,t){a=e.name,l=(null==t?void 0:t.type)||Sa(e)||"text";var l,a=Object.assign({id:a,name:a,type:l},t);return e.isEnum&&(a.type="select",a.allowableEntries=_l(Fn(e))),a}function Ra(e){let s=[];if(e){const o=tt(e),t=Is(e.name),r=kl(null==t?void 0:t.dataModel);o.forEach(t=>{var e;if(Sn(t)){const l=Ba(t,t.input);if(l.id=Lo(l.id),"file"==l.type&&t.uploadTo&&!l.accept&&(e=null==(e=null==(e=Y.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(",")),r&&(e=null==(e=r.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={input:l,$typeFields:o.map(e=>e.name),$dataModelFields:r?tt(r).map(e=>e.name):[],...Y.config.scopeWhitelist},n=dl(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 $l(t,e){if(!e.type)return console.error("enumDescriptions missing {type:'EnumType'} options"),[""+t];var l=at(e.type);if(null==l||!l.enumValues)return console.error("Could not find metadata for "+e.type),[""+t];var a=[];for(let e=0;e"number"==typeof e?$l(e,{type:t}):e}function tt(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?kl(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 vs(e,t){return(null==(e=e.request.implements)?void 0:e.some(e=>e.name===t))||!1}function ns(e){return e?Dn(e,tt(e)):null}function Dn(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=Ne.model(e);if(l)return Qe(at(l),e=>ns(e));console.error("Primary Key not found in "+e.name)}return t||null}function Ea(e,t){return Qe(ns(e),e=>be(t,e.name))}function Pn(e,t,l){return e&&"none"===e.valueType?"":"%In"===l.key||"%Between"===l.key?`(${l.value})`:Ha(t,l.value)}function Ha(e,t){return!e||tl(e=xn(e))||"Boolean"===e?t:Aa(e)?`[${t}]`:`'${t}'`}function ht(e,t){return{name:e,value:t}}const za=[ht("=","%"),ht("!=","%!"),ht(">=",">%"),ht(">","%>"),ht("<=","%<"),ht("<","<%"),ht("In","%In"),ht("Between","%Between"),{name:"Starts With",value:"%StartsWith",types:"string"},{name:"Contains",value:"%Contains",types:"string"},{name:"Ends With",value:"%EndsWith",types:"string"},{name:"Exists",value:"%IsNotNull",valueType:"none"},{name:"Not Exists",value:"%IsNull",valueType:"none"}];function rt(){var e=v(()=>{var e;return(null==(e=Y.metadata.value)?void 0:e.app)||null}),t=v(()=>{var e;return(null==(e=Y.metadata.value)?void 0:e.api)||null}),l=v(()=>{var e;return(null==(e=null==(e=null==(e=Y.metadata.value)?void 0:e.plugins)?void 0:e.autoQuery)?void 0:e.viewerConventions)||za});return wl(),{loadMetadata:Pa,getMetadata:Ia,setMetadata:es,clearMetadata:Da,metadataApp:e,metadataApi:t,filterDefinitions:l,typeOf:at,typeOfRef:kl,typeEquals:Mn,apiOf:Is,findApis:ja,typeName:Va,typeName2:Cn,property:Oa,enumOptions:An,propertyOptions:Fn,createFormLayout:Ra,typeProperties:tt,supportsProp:Sn,Crud:Ne,Apis:Et,getPrimaryKey:ns,getPrimaryKeyByProps:Dn,getId:Ea,createDto:Yt,makeDto:Ta,toFormValues:ys,formValues:Fa,isComplexProp:Vn,asKvps:_l,expandEnumFlags:$l,enumFlagsConverter:In}}const Ye=class Ye{static async getOrFetchValue(e,t,l,a,n,s,o){return Ye.getValue(l,o,n)??(await Ye.fetchLookupIds(e,t,l,a,n,s,[o]),Ye.getValue(l,o,n))}static getValue(e,t,l){e=Ye.Lookup[e];if(e){e=e[t];if(e)return e[l=l.toLowerCase()]}}static setValue(e,t,l,a){e=Ye.Lookup[e]??(Ye.Lookup[e]={});(e[t]??(e[t]={}))[l=l.toLowerCase()]=a}static setRefValue(e,t){var l=be(t,e.refId);return null==l||null==e.refLabel?null:(t=be(t,e.refLabel),Ye.setValue(e.model,l,e.refLabel,t),t)}static async fetchLookupIds(e,t,l,a,n,s,o){t=t.operations.find(e=>{return Ne.isAnyQuery(e)&&(null==(e=e.dataModel)?void 0:e.name)==l});if(t){const r=Ye.Lookup[l]??(Ye.Lookup[l]={}),i=[];Object.keys(r).forEach(e=>{var t=r[e];be(t,n)&&i.push(e)});var o=o.filter(e=>!i.includes(e));0!=o.length&&(s=s?null:a+","+n,o={[a+"In"]:o.join(",")},s&&(o.fields=s),s=Yt(t,o),(o=await e.api(s,{jsconfig:"edv,eccn"})).succeeded?(be(o.response,"results")||[]).forEach(e=>{var t,l;be(e,a)?(t=""+be(e,a),l=be(e,n),n=n.toLowerCase(),(r[t]??(r[t]={}))[n]=""+l):console.error(`result[${a}] == null`,e)}):console.error("Failed to call "+t.request.name))}}};Le(Ye,"Lookup",{});let Dt=Ye,sl=()=>(new Date).getTime(),Na=["/","T",":","-"],ct={assumeUtc:!0,date:{method:"Intl.DateTimeFormat",options:"{dateStyle:'medium'}"},maxFieldLength:150,maxNestedFields:2,maxNestedFieldLength:30},Ua=new Intl.RelativeTimeFormat(ct.locale,{}),Yl=31536e6,qs={year:Yl,month:Yl/12,day:864e5,hour:36e5,minute:6e4,second:1e3},kt={currency:On,bytes:Bn,link:Rn,linkTel:En,linkMailTo:Hn,icon:zn,iconRounded:Nn,attachment:Un,hidden:qn,time:Qn,relativeTime:xl,relativeTimeFromMs:Ds,enumFlags:Zn,formatDate:Ut,formatNumber:Cl};"iconOnError"in globalThis||(globalThis.iconOnError=Ts);class Ke{}function qa(e){ct=Object.assign({},ct,e)}function Qa(t){Object.keys(t||{}).forEach(e=>{"function"==typeof t[e]&&(kt[e]=t[e])})}function jn(){return kt}function os(e,t){return t?dt("span",e,t):e}function On(e,t){var l=ft(t,["currency"]);return os(new Intl.NumberFormat(void 0,{style:"currency",currency:(null==t?void 0:t.currency)||"USD"}).format(e),l)}function Bn(e,t){return os(hl(e),t)}function Rn(e,t){return dt("a",e,Ms({...t,href:e}))}function En(e,t){return dt("a",e,Ms({...t,href:"tel:"+e}))}function Hn(e,t){var{subject:l,body:a}=t=t||{},t=ft(t,["subject","body"]),n={};return l&&(n.subject=l),a&&(n.body=a),dt("a",e,Ms({...t,href:"mailto:"+Bt(e,n)}))}function zn(e,t){return dt("img",void 0,Object.assign({class:"w-6 h-6",title:e,src:jt(e),onerror:"iconOnError(this)"},t))}function Nn(e,t){return dt("img",void 0,Object.assign({class:"w-8 h-8 rounded-full",title:e,src:jt(e),onerror:"iconOnError(this)"},t))}function Un(e,t){var l=vl(e),a=(null==ls(l)||ml(e)?jt:gl)(e),a=jt(a),n=t&&(t["icon-class"]||t.iconClass),a=dt("img",void 0,Object.assign({class:"w-6 h-6",src:a,onerror:"iconOnError(this,'att')"},n?{class:n}:null));return dt("a",a+`${l}`,Object.assign({class:"flex",href:jt(e),title:e},t?ft(t,["icon-class","iconClass"]):null))}function qn(e){return""}function Qn(e,t){var l="string"==typeof e?new Date(1e3*un(e)):Vs(e)?Mt(e):null;return os(l?So(l):e,t)}function Ut(e,t){var l,a;return null==e?"":(l="number"==typeof e?new Date(e):"string"==typeof e?Mt(e):e,Vs(l)?os(("function"==typeof(a=ct.date?Ps(ct.date):null)?a:an)(l),t):(console.warn(l+" is not a Date value"),null==e?"":""+e))}function Cl(e,t){if("number"!=typeof e)return e;let l=ct.number?Ps(ct.number):null,a="function"==typeof l?l(e):""+e;return""===a&&(console.warn(`formatNumber(${e}) => `+a,l),a=""+e),os(a,t)}function Kn(t,l,a){var e=Mo(t),n=l?Ps(l):null;if("function"!=typeof n)return(null!=e?Vs(e)?Ut(e,a):"number"==typeof e?Cl(e,a):e:null)??"";{let e=a;if(null!=l&&l.options)try{e=dl(l.options,a)}catch(e){console.error(`Could not evaluate '${l.options}'`,e,", with scope:",a)}return n(t,e)}}function ts(e,t,l){return(Vt(e)?Kn:Ja)(e,t,l)}function Ka(e){if(null!=e){if("number"==typeof e)return e;if(Vs(e))return e.getTime()-sl();if("string"==typeof e){var t=Number(e);if(!isNaN(t))return t;if("P"===e[0]||e.startsWith("-P"))return 1e3*un(e)*-1;if(0<=Ao(e,Na))return Mt(e).getTime()-sl()}}return NaN}function Ds(e,t){for(var l in qs)if(Math.abs(e)>qs[l]||"second"===l)return(t||Ua).format(Math.round(e/qs[l]),l)}function xl(e,t){e=Ka(e);return isNaN(e)?"":Ds(e,t)}function Za(e,t){return Ds(e.getTime()-(t?t.getTime():sl()))}function Zn(e,t){return $l(e,t).join(", ")}function Ps(l){if(l){let{method:e,options:a}=l,n=e+`(${a})`,s=kt[n]||kt[e];if("function"==typeof s)return s;let o=l.locale||ct.locale;if(e.startsWith("Intl.")){l=o?`'${o}'`:"undefined",l=`return new ${e}(${l},${a||"undefined"})`;try{let t=Function(l)();return s="Intl.DateTimeFormat"===e?e=>t.format(Mt(e)):"Intl.NumberFormat"===e?e=>t.format(Number(e)):"Intl.RelativeTimeFormat"===e?e=>xl(e,t):e=>t.format(e),kt[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,o),kt[n]=s}console.error(`No '${e}' function exists`,Object.keys(kt))}}return null}function Wn(e,t){return e?e.length>t?e.substring(0,t)+"...":e:""}function Gn(e){return"/Date("===e.substring(0,6)?Ut(Mt(e)):e}function Wa(e){return Ll(Ht(e)).replace(/"/g,"")}function Jn(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 Ll(e,t=4){return"object"!=typeof(e=Jn(e))?"string"==typeof e?e:""+e:JSON.stringify(e,void 0,t)}function Ga(e){return"object"!=typeof(e=Jn(e))?"string"==typeof e?e:""+e:Ll(e=Ht(e=Object.assign({},e)))}function Ht(l){if(null==l)return null;if("string"==typeof l)return Gn(l);if(Vt(l))return l;if(l instanceof Date)return Ut(l);if(Array.isArray(l))return l.map(Ht);if("object"!=typeof l)return l;{let t={};return Object.keys(l).forEach(e=>{"__type"!=e&&(t[e]=Ht(l[e]))}),t}}function Ja(e,t,l){let a=e;if(Array.isArray(e)){if(Vt(e[0]))return a.join(",");null!=e[0]&&(a=e[0])}if(null==a)return"";if(a instanceof Date)return Ut(a,l);var n=Object.keys(a),s=[];for(let e=0;e${o}: `+Ks(Wn(Gn(r),ct.maxNestedFieldLength)))}return 2l.value.navigate(t.to??"/");return(e,t)=>(o(),i("a",Ae({onClick:qe(a,["prevent"]),title:e.to,href:"javascript:void(0)"},e.$attrs),[K(e.$slots,"default")],16,Xa))}});class er{constructor(){Le(this,"callbacks",{})}register(e,t){this.callbacks[e]=t}has(e){return!!this.callbacks[e]}invoke(e,t){var l=this.callbacks[e];"function"==typeof l&&l(e,t)}}const et=class et{static component(e){var t=et.components[e];if(t)return t;const l=Zl(e),a=Object.keys(et.components).find(e=>Zl(e)===l);return a&&et.components[a]||null}};Le(et,"config",{redirectSignIn:"/signin",redirectSignOut:"/auth/logout",navigate:e=>location.href=e,assetsPathResolver:e=>e,fallbackPathResolver:e=>e,storage:new pn,tableIcon:{svg:""},scopeWhitelist:{enumFlagsConverter:In,...jn()}}),Le(et,"autoQueryGridDefaults",{deny:[],hide:[],toolbarButtonClass:void 0,tableStyle:"stripedRows",take:25,maxFieldLength:150}),Le(et,"events",To()),Le(et,"user",I(null)),Le(et,"metadata",I(null)),Le(et,"components",{RouterLink:Ya}),Le(et,"interceptors",new er);let Y=et;function tr(e){Y.config=Object.assign(Y.config,e)}function sr(e){Y.autoQueryGridDefaults=Object.assign(Y.autoQueryGridDefaults,e)}function Vl(e){return e&&Y.config.assetsPathResolver?Y.config.assetsPathResolver(e):e}function lr(e){return e&&Y.config.fallbackPathResolver?Y.config.fallbackPathResolver(e):e}function nr(e,t){Y.interceptors.register(e,t)}function At(){var e=v(()=>Y.config),t=v(()=>Y.autoQueryGridDefaults);return{config:e,setConfig:tr,events:Y.events,autoQueryGridDefaults:t,setAutoQueryGridDefaults:sr,assetsPathResolver:Vl,fallbackPathResolver:lr,registerInterceptor:nr}}const Xn=ce({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=rt()["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("").indexOf("class="),t=`${(null==e?void 0:e.cls)||""} `+(s.class||""),a=-1==l?`Ts(e.target)})}}}),or={class:"text-2xl font-semibold text-gray-900 dark:text-gray-300"},ar={class:"flex"},rr=l("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),ir=l("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),ur=[rr,ir],dr=ce({__name:"Loading",props:{imageClass:{default:"w-6 h-6"}},setup(e){return(e,t)=>(o(),i("div",or,[l("div",ar,[(o(),i("svg",{class:b(["self-center inline mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-gray-600 dark:fill-gray-300",e.imageClass]),role:"status",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ur,2)),l("span",null,[K(e.$slots,"default")])])]))}}),cr=["href","onClick"],fr=["type"],en="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",vr=ce({__name:"OutlineButton",props:{type:{default:"submit"},href:{}},setup(e){return(t,e)=>{var a=G("router-link");return t.href?(o(),ae(a,{key:0,to:t.href},{default:Ce(({navigate:e})=>[l("button",{class:b(en),href:t.href,onClick:e},[K(t.$slots,"default")],8,cr)]),_:3},8,["to"])):(o(),i("button",Ae({key:1,type:t.type,class:en},t.$attrs),[K(t.$slots,"default")],16,fr))}}}),pr=["href","onClick"],mr=["type"],hr=ce({__name:"PrimaryButton",props:{type:{default:"submit"},href:{},color:{default:"indigo"}},setup(e){const t=e,a={blue:"focus:ring-indigo-500 bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 disabled:hover:bg-blue-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",purple:"focus:ring-indigo-500 bg-purple-600 hover:bg-purple-700 disabled:bg-purple-400 disabled:hover:bg-purple-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",red:"focus:ring-red-500 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-500 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-500 bg-sky-600 hover:bg-sky-700 disabled:bg-sky-400 disabled:hover:bg-sky-400 dark:bg-sky-600 dark:hover:bg-sky-700 dark:focus:ring-sky-500",cyan:"focus:ring-cyan-500 bg-cyan-600 hover:bg-cyan-700 disabled:bg-cyan-400 disabled:hover:bg-cyan-400 dark:bg-cyan-600 dark:hover:bg-cyan-700 dark:focus:ring-cyan-500",indigo:"focus:ring-indigo-500 bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 disabled:hover:bg-indigo-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},n=v(()=>"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 text-white "+(a[t.color]||a.indigo));return(t,e)=>{var a=G("router-link");return t.href?(o(),ae(a,{key:0,to:t.href},{default:Ce(({navigate:e})=>[l("button",{class:b(n.value),href:t.href,onClick:e},[K(t.$slots,"default")],10,pr)]),_:3},8,["to"])):(o(),i("button",Ae({key:1,type:t.type,class:n.value},t.$attrs),[K(t.$slots,"default")],16,mr))}}}),gr=["type","href","onClick"],yr=["type"],tn="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",br=ce({__name:"SecondaryButton",props:{type:{},href:{}},setup(e){return(t,e)=>{var a=G("router-link");return t.href?(o(),ae(a,{key:0,to:t.href},{default:Ce(({navigate:e})=>[l("button",{type:t.type??"button",class:b(tn),href:t.href,onClick:e},[K(t.$slots,"default")],8,gr)]),_:3},8,["to"])):(o(),i("button",Ae({key:1,type:t.type??"button",class:tn},t.$attrs),[K(t.$slots,"default")],16,yr))}}});function Ge(e,t){return Array.isArray(e)?0<=e.indexOf(t):e==t||e.includes(t)}const Cs={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"},nt={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"},Gt={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"},Pt={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"},ll={modalClass:"relative transform overflow-hidden rounded-lg bg-white dark:bg-black text-left shadow-xl transition-all sm:my-8",sizeClass:"sm:max-w-prose lg:max-w-screen-md xl:max-w-screen-lg 2xl:max-w-screen-xl sm:w-full"},Ze={panelClass(e="slideOver"){return("card"==e?Gt:Pt).panelClass},formClass(e="slideOver"){return("card"==e?Gt:Pt).formClass},headingClass(e="slideOver"){return("card"==e?Gt:Pt).headingClass},subHeadingClass(e="slideOver"){return("card"==e?Gt:Pt).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"},he={getGridClass(e=0){return he.gridClass},getGrid2Class(e="stripedRows"){return Ge(e,"fullWidth")?"overflow-x-auto":he.grid2Class},getGrid3Class(e="stripedRows"){return Ge(e,"fullWidth")?"inline-block min-w-full py-2 align-middle":he.grid3Class},getGrid4Class(e="stripedRows"){return Ge(e,"whiteBackground")?"":Ge(e,"fullWidth")?"overflow-hidden shadow-sm ring-1 ring-black ring-opacity-5":he.grid4Class},getTableClass(e="stripedRows"){return Ge(e,"fullWidth")||Ge(e,"verticalLines")?"min-w-full divide-y divide-gray-300":he.tableClass},getTheadClass(e="stripedRows"){return Ge(e,"whiteBackground")?"":he.theadClass},getTheadRowClass(e="stripedRows"){return he.theadRowClass+(Ge(e,"verticalLines")?" divide-x divide-gray-200 dark:divide-gray-700":"")},getTheadCellClass(e="stripedRows"){return he.theadCellClass+(Ge(e,"uppercaseHeadings")?" uppercase":"")},getTbodyClass(e="stripedRows"){return(Ge(e,"whiteBackground")||Ge(e,"verticalLines")?"divide-y divide-gray-200 dark:divide-gray-800":he.tableClass)+(Ge(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 ":"")+(!Ge(e,"stripedRows")||t%2==0?"bg-white dark:bg-black":"bg-gray-50 dark:bg-gray-800"))+(Ge(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"},wr={colspans:"col-span-3 sm:col-span-3"},Tm=Object.freeze(Object.defineProperty({__proto__:null,a:Cs,card:Gt,dummy:wr,form:Ze,grid:he,input:nt,modal:ll,slideOver:Pt},Symbol.toStringTag,{value:"Module"})),kr=ce({__name:"TextLink",props:{color:{default:"blue"}},setup(e){const t=ho(),l=e,a=v(()=>(Cs[l.color]||Cs.blue)+(t.href?"":" cursor-pointer"));return(e,t)=>(o(),i("a",{class:b(a.value)},[K(e.$slots,"default")],2))}}),_r={class:"flex","aria-label":"Breadcrumb"},$r={role:"list",class:"flex items-center space-x-4"},Cr=["href","title"],xr=l("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"},[l("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),Lr={class:"sr-only"},Vr=ce({__name:"Breadcrumbs",props:{homeHref:{default:"/"},homeLabel:{default:"Home"}},setup(e){return(e,t)=>(o(),i("nav",_r,[l("ol",$r,[l("li",null,[l("div",null,[l("a",{href:e.homeHref,class:"text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400",title:e.homeLabel},[xr,l("span",Lr,P(e.homeLabel),1)],8,Cr)])]),K(e.$slots,"default")])]))}}),Sr={class:"flex items-center"},Mr=l("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"},[l("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),Ar=["href","title"],Tr=["title"],Fr=ce({__name:"Breadcrumb",props:{href:{},title:{}},setup(e){return(e,t)=>(o(),i("li",null,[l("div",Sr,[Mr,e.href?(o(),i("a",{key:0,href:e.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:e.title},[K(e.$slots,"default")],8,Ar)):(o(),i("span",{key:1,class:"ml-4 text-lg font-medium text-gray-700 dark:text-gray-300",title:e.title},[K(e.$slots,"default")],8,Tr))])]))}}),Ir={key:0,class:"text-base font-semibold text-gray-500 dark:text-gray-400"},Dr={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"},Pr=ce({__name:"NavList",props:{title:{}},setup(e){return(e,t)=>(o(),i("div",null,[e.title?(o(),i("h2",Ir,P(e.title),1)):x("",!0),l("ul",Dr,[K(e.$slots,"default")])]))}}),jr={class:"relative flex items-start space-x-4 py-6"},Or={class:"flex-shrink-0"},Br={class:"flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-50 dark:bg-indigo-900"},Rr={class:"min-w-0 flex-1"},Er={class:"text-base font-medium text-gray-900 dark:text-gray-100"},Hr={class:"rounded-sm focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2"},zr=["href"],Nr=l("span",{class:"absolute inset-0","aria-hidden":"true"},null,-1),Ur={class:"text-base text-gray-500"},qr=l("div",{class:"flex-shrink-0 self-center"},[l("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"},[l("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),Qr=ce({__name:"NavListItem",props:{title:{},href:{},icon:{},iconSvg:{},iconSrc:{},iconAlt:{}},setup(e){return(e,t)=>{var a=G("Icon");return o(),i("li",jr,[l("div",Or,[l("span",Br,[xe(a,{class:"w-6 h-6 text-indigo-700 dark:text-indigo-300",image:e.icon,src:e.iconSrc,svg:e.iconSvg,alt:e.iconAlt},null,8,["image","src","svg","alt"])])]),l("div",Rr,[l("h3",Er,[l("span",Hr,[l("a",{href:e.href,class:"focus:outline-none"},[Nr,ke(" "+P(e.title),1)],8,zr)])]),l("p",Ur,[K(e.$slots,"default")])]),qr])}}});function Yn(e){return e&&e.SessionId?Fo(e):e}function Kr(e){Y.user.value=Yn(e),Y.events.publish("signIn",e)}function Zr(){Y.user.value=null,Y.events.publish("signOut",null)}const Sl=e=>(null==e?void 0:e.roles)||[],Ml=e=>(null==e?void 0:e.permissions)||[];function eo(e){return 0<=Sl(Y.user.value).indexOf(e)}function Wr(e){return 0<=Ml(Y.user.value).indexOf(e)}function Al(){return eo("Admin")}function bs(e){if(!e)return!1;if(!e.requiresAuth)return!0;var t=Y.user.value;if(!t)return!1;if(Al())return!0;let[l,a]=[Sl(t),Ml(t)],[n,s,o,r]=[e.requiredRoles||[],e.requiredPermissions||[],e.requiresAnyRole||[],e.requiresAnyPermission||[]];return!(!n.every(e=>0<=l.indexOf(e))||00<=l.indexOf(e))||!s.every(e=>0<=a.indexOf(e))||00<=a.indexOf(e)))}function Gr(e){if(!e||!e.requiresAuth)return null;var t=Y.user.value;if(!t)return`${e.request.name} requires Authentication`;if(Al())return null;let[l,a]=[Sl(t),Ml(t)],[n,s,o,r]=[e.requiredRoles||[],e.requiredPermissions||[],e.requiresAnyRole||[],e.requiresAnyPermission||[]],i=n.filter(e=>l.indexOf(e)<0);return 0""+e+"").join(", ")} Role`+(1a.indexOf(e)<0)).length?`Requires ${t.map(e=>""+e+"").join(", ")} Permission`+(10<=l.indexOf(e))?`Requires any ${o.filter(e=>l.indexOf(e)<0).map(e=>""+e+"").join(", ")} Role`+(10<=a.indexOf(e))?`Requires any ${r.filter(e=>a.indexOf(e)<0).map(e=>""+e+"").join(", ")} Permission`+(1Y.user.value||null),toAuth:Yn,isAuthenticated:v(()=>null!=Y.user.value),hasRole:eo,hasPermission:Wr,isAdmin:Al,canAccess:bs,invalidAccessMessage:Gr}}const Jr={key:0},Xr={class:"md:p-4"},to=ce({__name:"EnsureAccess",props:{invalidAccess:{},alertClass:{}},emits:["done"],setup(e){const s=Tl()["isAuthenticated"],t=At()["config"],r=()=>{var e=location.href.substring(location.origin.length)||"/",e=Bt(t.value.redirectSignIn,{redirect:e});t.value.navigate(e)},u=()=>{var e=location.href.substring(location.origin.length)||"/",e=Bt(t.value.redirectSignOut,{ReturnUrl:e});t.value.navigate(e)};return(e,t)=>{var a=G("Alert"),n=G("SecondaryButton");return e.invalidAccess?(o(),i("div",Jr,[xe(a,{class:b(e.alertClass),innerHTML:e.invalidAccess},null,8,["class","innerHTML"]),l("div",Xr,[te(s)?(o(),ae(n,{key:1,onClick:u},{default:Ce(()=>[ke("Sign Out")]),_:1})):(o(),ae(n,{key:0,onClick:r},{default:Ce(()=>[ke("Sign In")]),_:1}))])])):x("",!0)}}}),Yr={class:"absolute top-0 right-0 bg-white dark:bg-black border dark:border-gray-800 rounded normal-case text-sm shadow w-80"},ei={class:"p-4"},ti=l("h3",{class:"text-base font-medium mb-3 dark:text-gray-100"},"Sort",-1),si={class:"flex w-full justify-center"},li=l("svg",{class:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},[l("g",{fill:"currentColor"},[l("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"}),l("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),ni=l("span",null,"ASC",-1),oi=[li,ni],ai=xs('DESC',2),ri=[ai],ii=l("h3",{class:"text-base font-medium mt-4 mb-2"}," Filter ",-1),ui={key:0},di=["id","value"],ci=["for"],fi={key:1},vi={class:"mb-2"},pi={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"},mi=["onClick"],hi=l("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[l("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),gi=[hi],yi={class:"flex"},bi=l("svg",{class:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[l("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),wi=[bi],ki={class:"bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},Fl=ce({__name:"FilterColumn",props:{definitions:{},column:{},topLeft:{}},emits:["done","save"],setup(e,{emit:t}){const u=e,a=t,d=I(),c=I(""),p=I(""),f=I([]),m=v(()=>1==u.column.meta.isEnum),n=v(()=>at("Nullable`1"===u.column.meta.type?u.column.meta.genericArgs[0]:u.column.meta.type)),g=v(()=>1==u.column.meta.isEnum?_l(An(n.value.name)):[]),y=v(()=>{var e;return(null==(e=s(u.column.type))?void 0:e.map(e=>({key:e.value,value:e.name})))||[]}),h=I({filters:[]}),w=v(()=>h.value.filters);function s(e){let t=u.definitions;return t=Ln(e)?t:t.filter(e=>"string"!==e.types)}function k(e,t){return s(e).find(e=>e.value===t)}function C(){var e;c.value&&(e=null==(e=k(u.column.type,c.value))?void 0:e.name)&&(h.value.filters.push({key:c.value,name:e,value:p.value}),c.value=p.value="")}function L(){a("done")}function V(){var e;c.value="%",null!=(e=d.value)&&e.focus()}function S(){var e,t;p.value&&C(),m.value&&(t=Object.values(f.value).filter(e=>e),h.value.filters=0parseInt(e)).reduce((e,t)=>e+t,0).toString()}]:[{key:"%In",name:"In",value:t.join(",")}]:[]),a("save",h.value),a("done")}function M(e){h.value.sort=e===h.value.sort?void 0:e,$t(S)}return ws(()=>h.value=Object.assign({},u.column.settings,{filters:Array.from(u.column.settings.filters)})),ws(()=>{var e;let t=(null==(e=null==(e=null==(e=u.column.settings.filters)?void 0:e[0])?void 0:e.value)?void 0:e.split(","))||[];if(00<(l&parseInt(e))))||[]}f.value=t}),(t,a)=>{var e=G("SelectInput"),n=G("TextInput"),s=G("PrimaryButton"),r=G("SecondaryButton");return o(),i("div",{class:"fixed z-20 inset-0 overflow-y-auto",onClick:L,onVnodeMounted:V},[l("div",{class:"absolute",style:nl(`top:${t.topLeft.y}px;left:${t.topLeft.x}px`),onClick:a[5]||(a[5]=qe(()=>{},["stop"]))},[l("div",Yr,[l("div",ei,[ti,l("div",si,[l("button",{type:"button",title:"Sort Ascending",onClick:a[0]||(a[0]=e=>M("ASC")),class:b(`${"ASC"===h.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`)},oi,2),l("button",{type:"button",title:"Sort Descending",onClick:a[1]||(a[1]=e=>M("DESC")),class:b(`${"DESC"===h.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`)},ri,2)]),ii,m.value?(o(),i("div",ui,[(o(!0),i(Ie,null,De(g.value,e=>(o(),i("div",{key:e.key,class:"flex items-center"},[Ct(l("input",{type:"checkbox",id:e.key,value:e.key,"onUpdate:modelValue":a[2]||(a[2]=e=>f.value=e),class:"h-4 w-4 border-gray-300 rounded text-indigo-600 focus:ring-indigo-500"},null,8,di),[[ol,f.value]]),l("label",{for:e.key,class:"ml-3"},P(e.value),9,ci)]))),128))])):(o(),i("div",fi,[(o(!0),i(Ie,null,De(w.value,(e,a)=>{return o(),i("div",vi,[l("span",pi,[ke(P(t.column.name)+" "+P(e.name)+" "+P((e=e,Pn(k(u.column.type,e.key),u.column.type,e)))+" ",1),l("button",{type:"button",onClick:e=>{var t;t=a,h.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"},gi,8,mi)])])}),256)),l("div",yi,[xe(e,{id:"filterRule",class:"w-32 mr-1",modelValue:c.value,"onUpdate:modelValue":a[3]||(a[3]=e=>c.value=e),entries:y.value,label:"",placeholder:""},null,8,["modelValue","entries"]),"none"!==(null==(e=k(t.column.type,c.value))?void 0:e.valueType)?(o(),ae(n,{key:0,ref_key:"txtFilter",ref:d,id:"filterValue",class:"w-32 mr-1",type:"text",modelValue:p.value,"onUpdate:modelValue":a[4]||(a[4]=e=>p.value=e),onKeyup:nn(C,["enter"]),label:"",placeholder:""},null,8,["modelValue"])):x("",!0),l("div",{class:"pt-1"},[l("button",{type:"button",onClick:C,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"},wi)])])]))]),l("div",ki,[xe(s,{onClick:S,color:"red",class:"ml-2"},{default:Ce(()=>[ke(" Save ")]),_:1}),xe(r,{onClick:L},{default:Ce(()=>[ke(" Cancel ")]),_:1})])])],4)],512)}}}),_i={class:"px-4 sm:px-6 lg:px-8 text-sm"},$i={class:"flex flex-wrap"},Ci={class:"group pr-4 sm:pr-6 lg:pr-8"},xi={class:"flex justify-between w-full font-medium"},Li={class:"w-6 flex justify-end"},Vi={class:"hidden group-hover:inline"},Si=["onClick","title"],Mi=l("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[l("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),Ai=[Mi],Ti={key:0,class:"pt-2"},Fi={class:"ml-2"},Ii={key:1},Di={class:"pt-2"},Pi={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"},ji=["onClick"],Oi=l("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[l("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),Bi=[Oi],Ri=l("span",null,"Clear All",-1),Ei=[Ri],Il=ce({__name:"FilterViews",props:{definitions:{},columns:{}},emits:["done","change"],setup(e,{emit:t}){const a=e,s=t,n=v(()=>a.columns.filter(e=>0"string"!==e.types)}(e).find(e=>e.value===t)}function u(){a.columns.forEach(e=>{e.settings.filters=[],s("change",e)}),s("done")}return(e,t)=>(o(),i("div",_i,[l("div",$i,[(o(!0),i(Ie,null,De(n.value,n=>{return o(),i("fieldset",Ci,[l("legend",xi,[l("span",null,P(te(ze)(n.name)),1),l("span",Li,[l("span",Vi,[l("button",{onClick:e=>{var t;(t=n).settings.filters=[],s("change",t)},title:`Clear all ${te(ze)(n.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"},Ai,8,Si)])])]),n.meta.isEnum?(o(),i("div",Ti,[(o(!0),i(Ie,null,De(null==(e=null==(e=null==(e=n.settings.filters)?void 0:e[0])?void 0:e.value)?void 0:e.split(","),e=>(o(),i("div",{key:e,class:"flex items-center"},[l("label",Fi,P(e),1)]))),128))])):(o(),i("div",Ii,[(o(!0),i(Ie,null,De(n.settings.filters,(e,a)=>{return o(),i("div",Di,[l("span",Pi,[ke(P(n.name)+" "+P(e.name)+" "+P((e=e,Pn(r((t=n).type,e.value),t.type,e)))+" ",1),l("button",{type:"button",onClick:e=>{var t;(t=n).settings.filters.splice(a,1),s("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"},Bi,8,ji)])]);var t}),256))]))]);var e}),256))]),l("div",{class:"flex justify-center pt-4"},[l("button",{type:"button",onClick:u,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"},Ei)])]))}}),Hi={class:"bg-white dark:bg-black px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},zi={class:""},Ni={class:"mt-3 text-center sm:mt-0 sm:mx-4 sm:text-left"},Ui=l("h3",{class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-100"},"Query Preferences",-1),qi={class:"mt-4"},Qi=["for"],Ki=["id"],Zi=["value","selected"],Wi={class:"mt-4 flex items-center py-4 border-b border-gray-200 dark:border-gray-800"},Gi=["id","checked"],Ji=["for"],Xi={class:"mt-4"},Yi={class:"pb-2 px-4"},eu={class:""},tu=["id","value"],su=["for"],lu={class:"bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},Dl=ce({__name:"QueryPrefs",props:{id:{default:"QueryPrefs"},columns:{},prefs:{},maxLimit:{}},emits:["done","save"],setup(e,{emit:t}){const a=At()["autoQueryGridDefaults"],r=e,n=t,u=I({}),d=(ws(()=>u.value=Object.assign({take:a.value.take,selectedColumns:[]},r.prefs)),[10,25,50,100,250,500,1e3]);function c(){n("done")}function v(){n("save",u.value)}return(e,t)=>{const a=G("PrimaryButton"),n=G("SecondaryButton"),s=G("ModalDialog");return o(),ae(s,{id:e.id,onDone:c,"size-class":"w-full sm:max-w-prose"},{default:Ce(()=>[l("div",Hi,[l("div",zi,[l("div",Ni,[Ui,l("div",qi,[l("label",{for:e.id+"-take",class:"block text-sm font-medium text-gray-700 dark:text-gray-300"},"Results per page",8,Qi),Ct(l("select",{id:e.id+"-take","onUpdate:modelValue":t[0]||(t[0]=e=>u.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),i(Ie,null,De(d.filter(e=>null==r.maxLimit||e<=r.maxLimit),e=>(o(),i("option",{value:e,selected:e===u.value.take},P(e),9,Zi))),256))],8,Ki),[[go,u.value.take]])]),l("div",Wi,[l("input",{type:"radio",id:e.id+"-allColumns",onClick:t[1]||(t[1]=e=>u.value.selectedColumns=[]),checked:0===u.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,Gi),l("label",{class:"ml-3 block text-gray-700 dark:text-gray-300",for:e.id+"-allColumns"},"View all columns",8,Ji)]),l("div",Xi,[l("div",Yi,[l("div",eu,[(o(!0),i(Ie,null,De(e.columns,e=>(o(),i("div",{key:e.name,class:"flex items-center"},[Ct(l("input",{type:"checkbox",id:e.name,value:e.name,"onUpdate:modelValue":t[2]||(t[2]=e=>u.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,tu),[[ol,u.value.selectedColumns]]),l("label",{for:e.name,class:"ml-3"},P(e.name),9,su)]))),128))])])])])])]),l("div",lu,[xe(a,{onClick:v,color:"red",class:"ml-2"},{default:Ce(()=>[ke(" Save ")]),_:1}),xe(n,{onClick:c},{default:Ce(()=>[ke(" Cancel ")]),_:1})])]),_:1},8,["id"])}}}),nu={key:0},ou={key:1},au={key:2,class:"pt-1"},ru={key:0},iu={key:1},uu={key:3},du={class:"pl-1 pt-1 flex flex-wrap"},cu={class:"flex mt-1"},fu=["title"],vu=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("g",{"stroke-width":"1.5",fill:"none"},[l("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),pu=[vu],mu=["disabled"],hu=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z",fill:"currentColor"})],-1),gu=[hu],yu=["disabled"],bu=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z",fill:"currentColor"})],-1),wu=[bu],ku=["disabled"],_u=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z",fill:"currentColor"})],-1),$u=[_u],Cu=["disabled"],xu=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z",fill:"currentColor"})],-1),Lu=[xu],Vu={key:0,class:"flex mt-1"},Su={class:"px-4 text-lg text-black dark:text-white"},Mu={key:0},Au={key:1},Tu=l("span",{class:"hidden xl:inline"}," Showing Results ",-1),Fu={key:2},Iu={class:"flex flex-wrap"},Du={key:0,class:"pl-2 mt-1"},Pu=l("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("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),ju=[Pu],Ou={key:1,class:"pl-2 mt-1"},Bu=xs('Excel',2),Ru=[Bu],Eu={key:2,class:"pl-2 mt-1"},Hu={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"},zu=l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1),Nu=[zu],Uu={key:1,class:"w-5 h-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},qu=l("g",{fill:"none"},[l("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"}),l("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),Qu=[qu],Ku=l("span",{class:"whitespace-nowrap"},"Copy URL",-1),Zu={key:3,class:"pl-2 mt-1"},Wu=l("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24"},[l("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),Gu=[Wu],Ju={key:4,class:"pl-2 mt-1"},Xu=l("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"},[l("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),Yu={class:"mr-1"},ed={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"},td=l("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),sd=[td],ld={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"},nd=l("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),od=[nd],ad={key:5,class:"pl-2 mt-1"},rd=["title"],id=l("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"},[l("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z",fill:"currentColor"})],-1),ud={class:"whitespace-nowrap"},dd={key:7},cd={key:0,class:"cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50"},fd={class:"mr-1 select-none"},vd={key:1,class:"flex justify-between items-center"},pd={class:"mr-1 select-none"},ps=25,md=ce({__name:"AutoQueryGrid",props:{filterDefinitions:{},id:{default:"AutoQueryGrid"},apis:{},type:{},prefs:{},deny:{},hide:{},selectedColumns:{},toolbarButtonClass:{},tableStyle:{},gridClass:{},grid2Class:{},grid3Class:{},grid4Class:{},tableClass:{},theadClass:{},tbodyClass:{},theadRowClass:{},theadCellClass:{},headerTitle:{},headerTitles:{},visibleFrom:{},rowClass:{},rowStyle:{},modelTitle:{},newButtonLabel:{},apiPrefs:{},canFilter:{},disableKeyBindings:{},configureField:{},skip:{default:0},create:{type:Boolean},edit:{},filters:{}},emits:["headerSelected","rowSelected","nav"],setup(e,{expose:t,emit:c}){const{config:Z,autoQueryGridDefaults:J}=At(),W=J,a=Z.value.storage,r=e,X=c,ee=Ue("client"),le="filtering,queryString,queryFilters".split(","),ne="copyApiUrl,downloadCsv,filtersView,newItem,pagingInfo,pagingNav,preferences,refresh,resetPreferences,toolbar".split(","),se=v(()=>r.deny?_t(le,r.deny):_t(le,W.value.deny)),oe=v(()=>r.hide?_t(ne,r.hide):_t(ne,W.value.hide));function p(e){return se.value[e]}function f(e){return oe.value[e]}const m=v(()=>r.tableStyle??W.value.tableStyle),re=v(()=>r.gridClass??he.getGridClass(m.value)),ie=v(()=>r.grid2Class??he.getGrid2Class(m.value)),ue=v(()=>r.grid3Class??he.getGrid3Class(m.value)),de=v(()=>r.grid4Class??he.getGrid4Class(m.value)),ce=v(()=>r.tableClass??he.getTableClass(m.value)),ve=v(()=>r.theadClass??he.getTheadClass(m.value)),pe=v(()=>r.theadRowClass??he.getTheadRowClass(m.value)),fe=v(()=>r.theadCellClass??he.getTheadCellClass(m.value)),g=v(()=>r.toolbarButtonClass??he.toolbarButtonClass);function me(e,t){var l,a;return r.rowClass?r.rowClass(e,t):(l=!!U.value.AnyUpdate,a=(null!=(a=u.value)&&a.name?be(e,u.value.name):null)==V.value,he.getTableRowClass(r.tableStyle,t,a,l))}const y=al(),ge=v(()=>{var e;return ut((null==(e=U.value.AnyQuery.viewModel)?void 0:e.name)||U.value.AnyQuery.dataModel.name)}),ye=v(()=>{const t=Object.keys(y).map(e=>e.toLowerCase());return tt(ge.value).filter(e=>t.includes(e.name.toLowerCase())||t.includes(e.name.toLowerCase()+"-header")).map(e=>e.name)});const h=v(()=>{var e=(0<(e=bt(r.selectedColumns)).length?e:0e.toLowerCase());const l=tt(ge.value);return 0l.find(e=>e.name.toLowerCase()===t)).filter(e=>null!=e):l}),we=v(()=>{let e=h.value.map(e=>e.name),t=bt(D.value.selectedColumns).map(e=>e.toLowerCase());return 0t.includes(e.toLowerCase())):e}),w=I([]),k=I(new Xe),Le=I(new Xe),C=I(),L=I(!1),V=I(),S=I(),M=I(!1),A=I(),T=I(r.skip),F=I(!1),D=I({take:ps}),j=I(!1),Ie=v(()=>w.value.some(e=>0w.value.map(e=>e.settings.filters.length).reduce((e,t)=>e+t,0)),Se=v(()=>{var e;return tt(ut(s.value||(null==(e=U.value.AnyQuery)?void 0:e.dataModel.name)))}),u=v(()=>{var e;return ns(ut(s.value||(null==(e=U.value.AnyQuery)?void 0:e.dataModel.name)))}),B=v(()=>D.value.take??ps),$=v(()=>k.value.response?be(k.value.response,"results"):[]),O=v(()=>{var e;return((null==(e=k.value.response)?void 0:e.total)||$.value.length)??0}),Me=v(()=>00$.value.length>=B.value),Pe=v(()=>$.value.length>=B.value),E=I(),z=I(),Fe={NoQuery:"No Query API was found"};function je(t){if(t){if(r.canFilter)return r.canFilter(t);var e=Se.value.find(e=>e.name.toLowerCase()==t.toLowerCase());if(e)return!Vn(e)}}function n(e){X("nav",e),p("queryString")&&ul(e)}async function H(e){T.value+=e,T.value<0&&(T.value=0);e=Math.floor(O.value/B.value)*B.value;T.value>e&&(T.value=e),n({skip:T.value||void 0}),await _()}async function $e(e,t){var l,a;S.value=null,V.value=t,e&&t&&(a=Yt(U.value.AnyQuery,{[e]:t}),(a=await ee.api(a)).succeeded)&&((a=null==(a=be(a.response,"results"))?void 0:a[0])||console.warn(`API ${null==(l=U.value.AnyQuery)?void 0:l.request.name}(${e}:${t}) returned no results`),S.value=a)}async function Oe(e,t){X("rowSelected",e,t);t=null==(t=u.value)?void 0:t.name,e=t?be(e,t):null;t&&e&&(n({edit:e}),$e(t,e))}function Ee(t,e){var l,a,n;p("filtering")&&(l=e.target,je(t)&&"TD"!==(null==l?void 0:l.tagName)&&(l=null==(l=null==l?void 0:l.closest("TABLE"))?void 0:l.getBoundingClientRect(),a=w.value.find(e=>e.name.toLowerCase()==t.toLowerCase()))&&l&&(n=l.x+318+10,A.value={column:a,topLeft:{x:Math.max(Math.floor(e.clientX+159),n),y:l.y+45}}),X("headerSelected",t,e))}function ze(){A.value=null}async function He(e){var t=null==(t=A.value)?void 0:t.column;t&&(t.settings=e,a.setItem(d(t.name),JSON.stringify(t.settings)),await _()),A.value=null}async function _e(e){a.setItem(d(e.name),JSON.stringify(e.settings)),await _()}async function Re(e){M.value=!1,D.value=e,a.setItem(ot(),JSON.stringify(e)),await _()}function Ne(e){var t;E.value&&(Object.assign(null==(t=E.value)?void 0:t.model,e),Ge())}function Ke(e){Object.assign(S.value,e),Ge()}function Ge(){null!=(e=E.value)&&e.forceUpdate(),null!=(e=z.value)&&e.forceUpdate();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}async function _(){await Ye(Ze())}async function qe(){await _()}t({update:_,search:Ye,createRequestArgs:Ze,reset:Lt,createDone:Q,createSave:Ct,editDone:q,editSave:kt,forceUpdate:Ge,setEdit:Ke,edit:S,createForm:E,editForm:z,apiPrefs:D,results:$,skip:T,take:B,total:O}),Y.interceptors.has("AutoQueryGrid.new")&&Y.interceptors.invoke("AutoQueryGrid.new",{props:r});const Qe=/iPad|iPhone|iPod/.test(navigator.userAgent);async function Ye(l){var a=U.value.AnyQuery;if(a){let e=Yt(a,l),t=await ee.api(e);dn(e=>{k.value.response=k.value.error=void 0,j.value=e,Qe?$t(()=>k.value=t):k.value=t})();a=be(t.response,"results")||[];t.succeeded&&a.label}else console.error(Fe.NoQuery)}function Ze(){let a={include:"total",take:B.value},t=bt(D.value.selectedColumns||r.selectedColumns);if(0{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),be(y,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(w.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})}),r.filters&&Object.keys(r.filters).forEach(e=>{a[e]=r.filters[e]}),p("queryString")&&p("queryFilters")){var l=location.search||(location.hash.includes("?")?"?"+ms(location.hash,"?"):"");let e=Zs(l);Object.keys(e).forEach(t=>{h.value.find(e=>e.name.toLowerCase()===t.toLowerCase())&&(a[t]=e[t])}),typeof e.skip<"u"&&(l=parseInt(e.skip),isNaN(l)||(T.value=a.skip=l))}return"u"F.value=!1,3e3)}function et(e="json"){var t=Ze(),l="/api/"+(null==(l=U.value.AnyQuery)?void 0:l.request.name),l=Io(ee.baseUrl,Bt(l,{...t,jsconfig:"edv"}));return 0<=l.indexOf("?")?Ls(l,"?")+"."+e+"?"+ms(l,"?"):l+".json"}async function lt(){w.value.forEach(e=>{e.settings={filters:[]},a.removeItem(d(e.name))}),D.value={take:ps},a.removeItem(ot()),await _()}function at(){L.value=!0,n({create:null})}const s=v(()=>Nt(r.type)),R=v(()=>{var e;return s.value||(null==(e=U.value.AnyQuery)?void 0:e.dataModel.name)}),N=v(()=>r.modelTitle||R.value),nt=v(()=>r.newButtonLabel||"New "+N.value),ot=()=>{var e;return r.id+"/ApiPrefs/"+(s.value||(null==(e=U.value.AnyQuery)?void 0:e.dataModel.name))},d=e=>{var t;return`Column/${r.id}:${s.value||(null==(t=U.value.AnyQuery)?void 0:t.dataModel.name)}.`+e},{metadataApi:it,typeOf:ut,apiOf:dt,filterDefinitions:ct}=rt(),vt=Tl()["invalidAccessMessage"],pt=v(()=>r.filterDefinitions||ct.value),U=v(()=>{var e=bt(r.apis);return 0dt(e)).filter(e=>null!=e).map(e=>e)):Et.forType(s.value,it.value)}),ft=e=>`${e}`,mt=v(()=>{var e;return it.value?0<(e=bt(r.apis).map(e=>null==dt(e)?e:null).filter(e=>null!=e)).length?ft(`Unknown API${1useMetadata()`)}),gt=v(()=>U.value.AnyQuery&&vt(U.value.AnyQuery)),yt=v(()=>U.value.Create&&vt(U.value.Create)),ht=v(()=>U.value.AnyUpdate&&vt(U.value.AnyUpdate)),xt=v(()=>bs(U.value.Create)),wt=(v(()=>bs(U.value.AnyUpdate)),v(()=>bs(U.value.Delete)));function q(){S.value=null,V.value=null,n({edit:void 0})}function Q(){L.value=!1,n({create:void 0})}async function kt(){await _(),q()}async function Ct(){await _(),Q()}function Lt(){k.value=new Xe,Le.value=new Xe,L.value=!1,V.value=null,S.value=null,M.value=!1,A.value=null,T.value=r.skip,F.value=!1,D.value={take:ps},j.value=!1;var e,t=r.prefs||$s(a.getItem(ot())),t=(t&&(D.value=t),w.value=h.value.map(e=>({name:e.name,type:e.type,meta:e,settings:Object.assign({filters:[]},$s(a.getItem(d(e.name))))})),isNaN(r.skip)||(T.value=r.skip),null==(t=u.value)?void 0:t.name);p("queryString")&&(e=location.search||(location.hash.includes("?")?"?"+ms(location.hash,"?"):""),typeof(e=Zs(e)).create<"u"?L.value=typeof e.create<"u":!t||"string"!=typeof e.edit&&"number"!=typeof e.edit||$e(t,e.edit)),!0===r.create&&(L.value=!0),t&&null!=r.edit&&$e(t,r.edit)}return st(async()=>{Lt(),await _()}),(a,e)=>{const t=G("Alert"),n=G("EnsureAccessDialog"),s=G("AutoCreateForm"),r=G("AutoEditForm"),u=G("ErrorSummary"),d=G("Loading"),c=G("SettingsIcons"),v=G("DataGrid");return mt.value?(o(),i("div",nu,[xe(t,{innerHTML:mt.value},null,8,["innerHTML"])])):gt.value?(o(),i("div",ou,[xe(to,{"invalid-access":gt.value},null,8,["invalid-access"])])):(o(),i("div",au,[L.value&&U.value.Create?(o(),i("div",ru,[yt.value?(o(),ae(n,{key:0,title:"Create "+N.value,"invalid-access":yt.value,"alert-class":"text-yellow-700",onDone:Q},null,8,["title","invalid-access"])):te(y).createform?K(a.$slots,"createform",{key:1,type:U.value.Create.request.name,configure:a.configureField,done:Q,save:Ct}):(o(),ae(s,{key:2,ref_key:"createForm",ref:E,type:U.value.Create.request.name,configure:a.configureField,onDone:Q,onSave:Ct},{header:Ce(()=>[K(a.$slots,"formheader",{form:"create",formInstance:E.value,apis:U.value,type:R.value,updateModel:Ne})]),footer:Ce(()=>[K(a.$slots,"formfooter",{form:"create",formInstance:E.value,apis:U.value,type:R.value,updateModel:Ne})]),_:3},8,["type","configure"]))])):S.value&&U.value.AnyUpdate?(o(),i("div",iu,[ht.value?(o(),ae(n,{key:0,title:"Update "+N.value,"invalid-access":ht.value,"alert-class":"text-yellow-700",onDone:q},null,8,["title","invalid-access"])):te(y).editform?K(a.$slots,"editform",{key:1,model:S.value,type:U.value.AnyUpdate.request.name,deleteType:wt.value?U.value.Delete.request.name:null,configure:a.configureField,done:q,save:kt}):(o(),ae(r,{key:2,ref_key:"editForm",ref:z,modelValue:S.value,"onUpdate:modelValue":e[0]||(e[0]=e=>S.value=e),type:U.value.AnyUpdate.request.name,deleteType:wt.value?U.value.Delete.request.name:null,configure:a.configureField,onDone:q,onSave:kt,onDelete:kt},{header:Ce(()=>[K(a.$slots,"formheader",{form:"edit",formInstance:z.value,apis:U.value,type:R.value,model:S.value,id:V.value,updateModel:Ke})]),footer:Ce(()=>[K(a.$slots,"formfooter",{form:"edit",formInstance:z.value,apis:U.value,type:R.value,model:S.value,id:V.value,updateModel:Ke})]),_:3},8,["modelValue","type","deleteType","configure"]))])):x("",!0),te(y).toolbar?K(a.$slots,"toolbar",{key:2}):f("toolbar")?(o(),i("div",uu,[M.value?(o(),ae(Dl,{key:0,columns:h.value,prefs:D.value,onDone:e[1]||(e[1]=e=>M.value=!1),onSave:Re},null,8,["columns","prefs"])):x("",!0),l("div",du,[l("div",cu,[f("preferences")?(o(),i("button",{key:0,type:"button",class:"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400",title:N.value+" Preferences",onClick:e[2]||(e[2]=e=>M.value=!M.value)},pu,8,fu)):x("",!0),f("pagingNav")?(o(),i("button",{key:1,type:"button",class:b(["pl-2",Me.value?"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:!Me.value,onClick:e[3]||(e[3]=e=>H(-O.value))},gu,10,mu)):x("",!0),f("pagingNav")?(o(),i("button",{key:2,type:"button",class:b(["pl-2",Ae.value?"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:!Ae.value,onClick:e[4]||(e[4]=e=>H(-B.value))},wu,10,yu)):x("",!0),f("pagingNav")?(o(),i("button",{key:3,type:"button",class:b(["pl-2",Te.value?"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:!Te.value,onClick:e[5]||(e[5]=e=>H(B.value))},$u,10,ku)):x("",!0),f("pagingNav")?(o(),i("button",{key:4,type:"button",class:b(["pl-2",Pe.value?"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:!Pe.value,onClick:e[6]||(e[6]=e=>H(O.value))},Lu,10,Cu)):x("",!0)]),f("pagingInfo")?(o(),i("div",Vu,[l("div",Su,[j.value?(o(),i("span",Mu,"Querying...")):x("",!0),$.value.length?(o(),i("span",Au,[Tu,ke(" "+P(T.value+1)+" - "+P(Math.min(T.value+$.value.length,O.value))+" ",1),l("span",null," of "+P(O.value),1)])):k.value.completed?(o(),i("span",Fu,"No Results")):x("",!0)])])):x("",!0),l("div",Iu,[f("refresh")?(o(),i("div",Du,[l("button",{type:"button",onClick:qe,title:"Refresh",class:b(g.value)},ju,2)])):x("",!0),f("downloadCsv")?(o(),i("div",Ou,[l("button",{type:"button",onClick:Je,title:"Download CSV",class:b(g.value)},Ru,2)])):x("",!0),f("copyApiUrl")?(o(),i("div",Eu,[l("button",{type:"button",onClick:We,title:"Copy API URL",class:b(g.value)},[F.value?(o(),i("svg",Hu,Nu)):(o(),i("svg",Uu,Qu)),Ku],2)])):x("",!0),Ie.value&&f("resetPreferences")?(o(),i("div",Zu,[l("button",{type:"button",onClick:lt,title:"Reset Preferences & Filters",class:b(g.value)},Gu,2)])):x("",!0),f("filtersView")&&0C.value="filters"==C.value?null:"filters"),class:b(g.value),"aria-expanded":"false"},[Xu,l("span",Yu,P(Ve.value)+" "+P(1==Ve.value?"Filter":"Filters"),1),"filters"!=C.value?(o(),i("svg",ed,sd)):(o(),i("svg",ld,od))],2)])):x("",!0),f("newItem")&&U.value.Create&&xt.value?(o(),i("div",ad,[l("button",{type:"button",onClick:at,title:N.value,class:b(g.value)},[id,l("span",ud,P(nt.value),1)],10,rd)])):x("",!0),te(y).toolbarbuttons?K(a.$slots,"toolbarbuttons",{key:6,toolbarButtonClass:g.value}):x("",!0)])])])):x("",!0),"filters"==C.value?(o(),ae(Il,{key:4,class:"border-y border-gray-200 dark:border-gray-800 py-8 my-2",definitions:pt.value,columns:w.value,onDone:e[8]||(e[8]=e=>C.value=null),onChange:_e},null,8,["definitions","columns"])):x("",!0),Le.value.error??k.value.error?(o(),ae(u,{key:5,status:Le.value.error??k.value.error},null,8,["status"])):j.value?(o(),ae(d,{key:6,class:"p-2"})):x("",!0),A.value?(o(),i("div",dd,[xe(Fl,{definitions:pt.value,column:A.value.column,"top-left":A.value.topLeft,onDone:ze,onSave:He},null,8,["definitions","column","top-left"])])):x("",!0),$.value.length?(o(),ae(v,{key:8,id:a.id,items:$.value,type:a.type,"selected-columns":we.value,class:"mt-1",onFiltersChanged:_,tableStyle:m.value,gridClass:re.value,grid2Class:ie.value,grid3Class:ue.value,grid4Class:de.value,tableClass:ce.value,theadClass:ve.value,theadRowClass:pe.value,theadCellClass:fe.value,tbodyClass:a.tbodyClass,rowClass:me,onRowSelected:Oe,rowStyle:a.rowStyle,headerTitle:a.headerTitle,headerTitles:a.headerTitles,visibleFrom:a.visibleFrom,onHeaderSelected:Ee},rl({header:Ce(({column:t,label:e})=>{var a;return[p("filtering")&&je(t)?(o(),i("div",cd,[l("span",fd,P(e),1),xe(c,{column:w.value.find(e=>e.name.toLowerCase()===t.toLowerCase()),"is-open":(null==(a=A.value)?void 0:a.column.name)===t},null,8,["column","is-open"])])):(o(),i("div",vd,[l("span",pd,P(e),1)]))]}),_:2},[De(Object.keys(te(y)),t=>({name:t,fn:Ce(e=>[K(a.$slots,t,Ot(ks(e)))])}))]),1032,["id","items","type","selected-columns","tableStyle","gridClass","grid2Class","grid3Class","grid4Class","tableClass","theadClass","theadRowClass","theadCellClass","tbodyClass","rowStyle","headerTitle","headerTitles","visibleFrom"])):x("",!0)]))}}}),hd={class:"flex"},gd={key:0,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},yd=l("g",{fill:"none"},[l("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),bd=[yd],wd=l("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),kd=l("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),_d=[wd,kd],$d={key:2,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Cd=l("g",{fill:"none"},[l("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),xd=[Cd],Ld={key:3,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Vd=l("g",{fill:"none"},[l("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),Sd=[Vd],Md=ce({__name:"SettingsIcons",props:{column:{},isOpen:{type:Boolean}},setup(e){return(e,t)=>{var l;return o(),i("div",hd,[null!=(l=null==(l=null==(l=e.column)?void 0:l.settings)?void 0:l.filters)&&l.length?(o(),i("svg",gd,bd)):(o(),i("svg",{key:1,class:b(["w-4 h-4 transition-transform",e.isOpen?"rotate-180":""]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},_d,2)),"ASC"===(null==(l=null==(l=e.column)?void 0:l.settings)?void 0:l.sort)?(o(),i("svg",$d,xd)):"DESC"===(null==(e=null==(l=e.column)?void 0:l.settings)?void 0:e.sort)?(o(),i("svg",Ld,Sd)):x("",!0)])}}}),Ad=ce({__name:"EnsureAccessDialog",props:{title:{},subtitle:{},invalidAccess:{},alertClass:{}},emits:["done"],setup(e){return(t,e)=>{const l=G("EnsureAccess"),a=G("SlideOver");return t.invalidAccess?(o(),ae(a,{key:0,title:t.title,onDone:e[0]||(e[0]=e=>t.$emit("done")),"content-class":"relative flex-1"},rl({default:Ce(()=>[xe(l,{alertClass:t.alertClass,invalidAccess:t.invalidAccess},null,8,["alertClass","invalidAccess"])]),_:2},[t.subtitle?{name:"subtitle",fn:Ce(()=>[ke(P(t.subtitle),1)]),key:"0"}:void 0]),1032,["title"])):x("",!0)}}}),Td=["for"],Fd={class:"mt-1 relative rounded-md shadow-sm"},Id=["type","name","id","placeholder","value","aria-invalid","aria-describedby"],Dd={key:0,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},Pd=l("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"},[l("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=[Pd],Od=["id"],Bd=["id"],Rd={inheritAttrs:!1},Ed=ce({...Rd,__name:"TextInput",props:{status:{},id:{},type:{},inputClass:{},label:{},labelClass:{},help:{},placeholder:{},modelValue:{}},setup(e,{expose:t}){const a=e,n=(t({focus:function(){var e;null!=(e=n.value)&&e.focus()}}),I());const s=v(()=>a.type||"text"),r=v(()=>a.label??ze(ot(a.id))),u=v(()=>a.placeholder??r.value);let d=Ue("ApiState",void 0);const c=v(()=>pt.call({responseStatus:a.status??(null==d?void 0:d.error.value)},a.id)),p=v(()=>[nt.base,c.value?nt.invalid:nt.valid,a.inputClass]);return(t,e)=>(o(),i("div",{class:b([t.$attrs.class])},[K(t.$slots,"header",Ae({inputElement:n.value,id:t.id,modelValue:t.modelValue,status:t.status},t.$attrs)),r.value?(o(),i("label",{key:0,for:t.id,class:b("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(t.labelClass??""))},P(r.value),11,Td)):x("",!0),l("div",Fd,[l("input",Ae({ref_key:"inputElement",ref:n,type:s.value,name:t.id,id:t.id,class:p.value,placeholder:u.value,value:t.modelValue,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=c.value,"aria-describedby":t.id+"-error",step:"any"},te(ft)(t.$attrs,["class"])),null,16,Id),c.value?(o(),i("div",Dd,jd)):x("",!0)]),c.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:t.id+"-error"},P(c.value),9,Od)):t.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:t.id+"-description"},P(t.help),9,Bd)):x("",!0),K(t.$slots,"footer",Ae({inputElement:n.value,id:t.id,modelValue:t.modelValue,status:t.status},t.$attrs))],2))}}),Hd=["for"],zd={class:"mt-1 relative rounded-md shadow-sm"},Nd=["name","id","placeholder","aria-invalid","aria-describedby"],Ud=["id"],qd=["id"],Qd={inheritAttrs:!1},Kd=ce({...Qd,__name:"TextareaInput",props:{status:{},id:{},inputClass:{},label:{},labelClass:{},help:{},placeholder:{},modelValue:{}},setup(e){const t=e,a=v(()=>t.label??ze(ot(t.id))),n=v(()=>t.placeholder??a.value);let s=Ue("ApiState",void 0);const r=v(()=>pt.call({responseStatus:t.status??(null==s?void 0:s.error.value)},t.id)),u=v(()=>["shadow-sm "+nt.base,r.value?"text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300":"text-gray-900 "+nt.valid,t.inputClass]);return(t,e)=>(o(),i("div",{class:b([t.$attrs.class])},[a.value?(o(),i("label",{key:0,for:t.id,class:b("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(t.labelClass??""))},P(a.value),11,Hd)):x("",!0),l("div",zd,[l("textarea",Ae({name:t.id,id:t.id,class:u.value,placeholder:n.value,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=r.value,"aria-describedby":t.id+"-error"},te(ft)(t.$attrs,["class"])),P(t.modelValue),17,Nd)]),r.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:t.id+"-error"},P(r.value),9,Ud)):t.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:t.id+"-description"},P(t.help),9,qd)):x("",!0)],2))}}),Zd=["for"],Wd=["id","name","value","aria-invalid","aria-describedby"],Gd=["value"],Jd=["id"],Xd={inheritAttrs:!1},Yd=ce({...Xd,__name:"SelectInput",props:{status:{},id:{},modelValue:{},inputClass:{},label:{},labelClass:{},options:{},values:{},entries:{}},setup(e){const t=e,a=v(()=>t.label??ze(ot(t.id)));let n=Ue("ApiState",void 0);const s=v(()=>pt.call({responseStatus:t.status??(null==n?void 0:n.error.value)},t.id)),r=v(()=>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(),i("div",{class:b([t.$attrs.class])},[a.value?(o(),i("label",{key:0,for:t.id,class:b("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(t.labelClass??""))},P(a.value),11,Zd)):x("",!0),l("select",Ae({id:t.id,name:t.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.value?"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",t.inputClass],value:t.modelValue,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=s.value,"aria-describedby":t.id+"-error"},te(ft)(t.$attrs,["class"])),[(o(!0),i(Ie,null,De(r.value,e=>(o(),i("option",{value:e.key},P(e.value),9,Gd))),256))],16,Wd),s.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:t.id+"-error"},P(s.value),9,Jd)):x("",!0)],2))}}),ec={class:"flex items-center h-5"},tc=["id","name","checked"],sc={class:"ml-3 text-sm"},lc=["for"],nc={key:0,class:"mt-2 text-sm text-red-500",id:"`${id}-error`"},oc={key:1,class:"mt-2 text-sm text-gray-500",id:"`${id}-description`"},ac={inheritAttrs:!1},rc=ce({...ac,__name:"CheckboxInput",props:{modelValue:{type:Boolean},status:{},id:{},inputClass:{},label:{},labelClass:{},help:{}},emits:["update:modelValue"],setup(e,{}){const t=e,a=v(()=>t.label??ze(ot(t.id)));let n=Ue("ApiState",void 0);const s=v(()=>pt.call({responseStatus:t.status??(null==n?void 0:n.error.value)},t.id));return(t,e)=>(o(),i("div",{class:b(["relative flex items-start",t.$attrs.class])},[l("div",ec,[l("input",Ae({id:t.id,name:t.id,type:"checkbox",checked:t.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",t.inputClass]},te(ft)(t.$attrs,["class"])),null,16,tc)]),l("div",sc,[l("label",{for:t.id,class:b("font-medium text-gray-700 dark:text-gray-300 "+(t.labelClass??""))},P(a.value),11,lc),s.value?(o(),i("p",nc,P(s.value),1)):t.help?(o(),i("p",oc,P(t.help),1)):x("",!0)])],2))}}),ic=["id"],uc=["for"],dc={class:"mt-1 relative rounded-md shadow-sm"},cc=["id","name","value"],fc={class:"flex flex-wrap pb-1.5"},vc={class:"pt-1.5 pl-1"},pc={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"},mc=["onClick"],hc=l("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[l("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),gc=[hc],yc={class:"pt-1.5 pl-1 shrink"},bc=["type","name","id","aria-invalid","aria-describedby"],wc=["id"],kc=["onMouseover","onClick"],_c={class:"block truncate"},$c={key:1,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},Cc=l("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"},[l("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),xc=[Cc],Lc=["id"],Vc=["id"],Sc={inheritAttrs:!1},Mc=ce({...Sc,__name:"TagInput",props:{status:{},id:{},type:{},inputClass:{},label:{},labelClass:{},help:{},modelValue:{default:()=>[]},delimiters:{default:()=>[","]},allowableValues:{},string:{type:Boolean},maxVisibleItems:{default:300},converter:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t;const s=v(()=>{return Qe((e=a.modelValue,a.converter?a.converter(e):e),e=>"string"==typeof e?0==e.trim().length?[]:e.split(","):e)||[];var e}),r=I(),u=I(!1),d=v(()=>{const t=p.value.toLowerCase();return a.allowableValues&&0!=a.allowableValues.length?a.allowableValues.length<1e3?a.allowableValues.filter(e=>!s.value.includes(e)&&e.toLowerCase().includes(t)):a.allowableValues.filter(e=>!s.value.includes(e)&&e.startsWith(t)):[]});const c=I(null),p=I(""),f=v(()=>a.type||"text"),m=v(()=>a.label??ze(ot(a.id)));let g=Ue("ApiState",void 0);const y=v(()=>pt.call({responseStatus:a.status??(null==g?void 0:g.error.value)},a.id)),h=v(()=>["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]),w=t=>S(s.value.filter(e=>e!=t));function k(e){document.activeElement===e.target&&null!=(e=c.value)&&e.focus()}const C=I();function L(){u.value=!0,C.value=!0}function V(){B(A()),C.value=!1,setTimeout(()=>{C.value||(u.value=!1)},200)}function S(e){e=a.string?e.join(","):e;n("update:modelValue",e)}function M(e){var t;"Backspace"==e.key&&0==p.value.length&&0e==t.key))&&t.preventDefault(),"Enter"==t.key||"NumpadEnter"==t.key||1==t.key.length&&e)&&B(l)}const F={behavior:"smooth",block:"nearest",inline:"nearest",scrollMode:"if-needed"};function D(){setTimeout(()=>{var e=_s(`#${a.id}-tag li.active`);e&&e.scrollIntoView(F)},0)}function j(){setTimeout(()=>{var e=_s(`#${a.id}-tag li.active`);e&&("scrollIntoViewIfNeeded"in e?e.scrollIntoViewIfNeeded(F):e.scrollIntoView(F))},0)}function B(e){var t;0!==e.length&&(-1==(t=Array.from(s.value)).indexOf(e)&&t.push(e),S(t),p.value="",u.value=!1)}function $(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(s.value);e.split(t).map(e=>e.trim()).forEach(e=>{-1==l.indexOf(e)&&l.push(e)}),S(l),p.value=""}}return(e,t)=>(o(),i("div",{class:b([e.$attrs.class]),id:e.id+"-tag",onmousemove:"cancelBlur=true"},[m.value?(o(),i("label",{key:0,for:e.id,class:b("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(e.labelClass??""))},P(m.value),11,uc)):x("",!0),l("div",dc,[l("input",{type:"hidden",id:e.id,name:e.id,value:s.value.join(",")},null,8,cc),l("button",{class:b(h.value),onClick:qe(k,["prevent"]),onFocus:t[2]||(t[2]=e=>u.value=!0),tabindex:"-1"},[l("div",fc,[(o(!0),i(Ie,null,De(s.value,t=>(o(),i("div",vc,[l("span",pc,[ke(P(t)+" ",1),l("button",{type:"button",onClick:e=>w(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"},gc,8,mc)])]))),256)),l("div",yc,[Ct(l("input",Ae({ref_key:"txtInput",ref:c,type:f.value,role:"combobox","aria-controls":"options","aria-expanded":"false",autocomplete:"off",spellcheck:"false",name:e.id+"-txt",id:e.id+"-txt",class:"p-0 dark:bg-transparent rounded-md border-none focus:!border-none focus:!outline-none",style:`box-shadow:none !important;width:${p.value.length+1}ch`,"onUpdate:modelValue":t[0]||(t[0]=e=>p.value=e),"aria-invalid":null!=y.value,"aria-describedby":e.id+"-error",onKeydown:M,onKeypress:T,onPaste:qe($,["prevent","stop"]),onFocus:L,onBlur:V,onClick:t[1]||(t[1]=e=>u.value=!0)},te(ft)(e.$attrs,["class","required"])),null,16,bc),[[yo,p.value]])])])],34),u.value&&d.value.length?(o(),i("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:M,id:e.id+"-options",role:"listbox"},[(o(!0),i(Ie,null,De(d.value.slice(0,e.maxVisibleItems),a=>(o(),i("li",{class:b([a===r.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=a,r.value=t},onClick:e=>B(a),role:"option",tabindex:"-1"},[l("span",_c,P(a),1)],42,kc))),256))],40,wc)):x("",!0),y.value?(o(),i("div",$c,xc)):x("",!0)]),y.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:e.id+"-error"},P(y.value),9,Lc)):e.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:e.id+"-description"},P(e.help),9,Vc)):x("",!0)],10,ic))}}),Ac={class:"relative flex-grow mr-2 sm:mr-4"},Tc=["for"],Fc={class:"block mt-2"},Ic={class:"sr-only"},Dc=["multiple","name","id","placeholder","aria-invalid","aria-describedby"],Pc={key:0,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},jc=l("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"},[l("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),Oc=[jc],Bc=["id"],Rc=["id"],Ec={key:0},Hc=["title"],zc=["alt","src"],Nc={key:1,class:"mt-3"},Uc={class:"w-full"},qc={class:"pr-6 align-bottom pb-2"},Qc=["title"],Kc=["src","onError"],Zc=["href"],Wc={key:1,class:"overflow-hidden"},Gc={class:"align-top pb-2 whitespace-nowrap"},Jc={key:0,class:"text-gray-500 dark:text-gray-400 text-sm bg-white dark:bg-black"},Xc=ce({__name:"FileInput",props:{multiple:{type:Boolean},status:{},id:{},inputClass:{},label:{},labelClass:{},help:{},placeholder:{},modelValue:{},values:{},files:{}},setup(e){const t=e,a=I(null),{assetsPathResolver:n,fallbackPathResolver:s}=At(),r={},u=I(),d=I((null==(e=t.files)?void 0:e.map(c))||[]);function c(e){return e.filePath=n(e.filePath),e}t.values&&0{e=e.replace(/\\/g,"/");return{fileName:rn(xt(e,"/"),"."),filePath:e,contentType:Ys(e)}}).map(c));const p=v(()=>t.label??ze(ot(t.id))),f=v(()=>t.placeholder??p.value);let m=Ue("ApiState",void 0);const g=v(()=>pt.call({responseStatus:t.status??(null==m?void 0:m.error.value)},t.id)),y=v(()=>["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",g.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]),h=e=>{e=e.target;u.value="",d.value=Array.from(e.files||[]).map(e=>({fileName:e.name,filePath:pl(e),contentLength:e.size,contentType:e.type||Ys(e.name)}))},w=()=>{var e;return null==(e=a.value)?void 0:e.click()},k=e=>null!=e&&(e.startsWith("data:")||e.startsWith("blob:")),C=v(()=>{var e;return 0!e||e.startsWith("data:")||e.endsWith(".svg")?"":"rounded-full object-cover";function V(e){u.value=s(C.value)}return zt(_n),(e,t)=>(o(),i("div",{class:b(["flex",e.multiple?"flex-col":"justify-between"])},[l("div",Ac,[p.value?(o(),i("label",{key:0,for:e.id,class:b("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(e.labelClass??""))},P(p.value),11,Tc)):x("",!0),l("div",Fc,[l("span",Ic,P(e.help??p.value),1),l("input",Ae({ref_key:"input",ref:a,type:"file",multiple:e.multiple,name:e.id,id:e.id,class:y.value,placeholder:f.value,"aria-invalid":null!=g.value,"aria-describedby":e.id+"-error"},e.$attrs,{onChange:h}),null,16,Dc),g.value?(o(),i("div",Pc,Oc)):x("",!0)]),g.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:e.id+"-error"},P(g.value),9,Bc)):e.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:e.id+"-description"},P(e.help),9,Rc)):x("",!0)]),e.multiple?(o(),i("div",Nc,[l("table",Uc,[(o(!0),i(Ie,null,De(d.value,t=>(o(),i("tr",null,[l("td",qc,[l("div",{class:"flex w-full",title:k(t.filePath)?"":t.filePath},[l("img",{src:r[te(wt)(t.filePath)]||te(n)(te(wt)(t.filePath)),class:b(["mr-2 h-8 w-8",L(t.filePath)]),onError:e=>r[te(wt)(t.filePath)]=te(s)(te(wt)(t.filePath))},null,42,Kc),k(t.filePath)?(o(),i("span",Wc,P(t.fileName),1)):(o(),i("a",{key:0,href:te(n)(t.filePath||""),target:"_blank",class:"overflow-hidden"},P(t.fileName),9,Zc))],8,Qc)]),l("td",Gc,[t.contentLength&&0[]},modelValue:{},match:{},viewCount:{default:100},pageSize:{default:8}},emits:["update:modelValue"],setup(e,{expose:t,emit:a}){const n=I(!1),s=e,r=a;function u(e){return Array.isArray(s.modelValue)&&0<=s.modelValue.indexOf(e)}t({toggle:D});const d=v(()=>s.label??ze(ot(s.id)));let c=Ue("ApiState",void 0);const p=v(()=>pt.call({responseStatus:s.status??(null==c?void 0:c.error.value)},s.id)),f=v(()=>[nt.base,p.value?nt.invalid:nt.valid]),m=I(null),g=I(""),y=I(null),h=I(s.viewCount),w=I([]),k=v(()=>g.value?s.options.filter(e=>s.match(e,g.value)).slice(0,h.value):s.options),C=["Tab","Escape","ArrowDown","ArrowUp","Enter","PageUp","PageDown","Home","End"];const L=[",",` -`,"\t"];function V(t){var l=null==(t=t.clipboardData)?void 0:t.getData("Text");if(l){t=L.some(e=>l.includes(e));if(s.multiple&&t){if(t){t=new RegExp("\\r|\\n|\\t|,"),t=l.split(t).filter(e=>e.trim()).map(t=>s.options.find(e=>s.match(e,t))).filter(e=>!!e);if(0{u(t)?e=e.filter(e=>e!=t):e.push(t)}),r("update:modelValue",e),hs()}}}else{t=s.options.filter(e=>s.match(e,l));1==t.length&&(B(t[0]),n.value=!1,hs())}}}function S(e){C.indexOf(e.code)||j()}function M(e){var t;e.shiftKey||e.ctrlKey||e.altKey||(n.value?"Escape"==e.code?n.value&&(e.stopPropagation(),n.value=!1):"Tab"==e.code?n.value=!1:"Home"==e.code?(y.value=w.value[0],T()):"End"==e.code?(y.value=w.value[w.value.length-1],T()):"ArrowDown"==e.code?(y.value?(t=w.value.indexOf(y.value),y.value=t+1{var e=_s(`#${s.id}-autocomplete li.active`);e&&e.scrollIntoView(A)},0)}function F(){setTimeout(()=>{var e=_s(`#${s.id}-autocomplete li.active`);e&&("scrollIntoViewIfNeeded"in e?e.scrollIntoViewIfNeeded(A):e.scrollIntoView(A))},0)}function D(e){(n.value=e)&&(j(),null!=(e=m.value))&&e.focus()}function j(){n.value=!0,$()}function B(t){if(g.value="",n.value=!1,s.multiple){let e=Array.from(s.modelValue||[]);u(t)?e=e.filter(e=>e!=t):e.push(t),y.value=null,r("update:modelValue",e)}else{let e=t;s.modelValue==t&&(e=null),r("update:modelValue",e)}}function $(){w.value=k.value}return St(g,$),(e,t)=>(o(),i("div",{id:e.id+"-autocomplete"},[d.value?(o(),i("label",{key:0,for:e.id+"-text",class:"block text-sm font-medium text-gray-700 dark:text-gray-300"},P(d.value),9,e0)):x("",!0),l("div",t0,[Ct(l("input",Ae({ref_key:"txtInput",ref:m,id:e.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:f.value,placeholder:e.multiple||!e.modelValue?e.placeholder:"",onFocus:j,onKeydown:M,onKeyup:S,onClick:j,onPaste:V,required:!1},e.$attrs),null,16,s0),[[bo,g.value]]),l("button",{type:"button",onClick:t[1]||(t[1]=e=>D(!n.value)),class:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",tabindex:"-1"},n0),n.value?(o(),i("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:M,id:e.id+"-options",role:"listbox"},[(o(!0),i(Ie,null,De(w.value,l=>(o(),i("li",{class:b([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(w.value.indexOf(t)>Math.floor(.9*h.value)&&(h.value+=s.viewCount,$()));var t},onClick:e=>B(l),role:"option",tabindex:"-1"},[K(e.$slots,"item",Ot(ks(l))),u(l)?(o(),i("span",{key:0,class:b(["absolute inset-y-0 right-0 flex items-center pr-4",l===y.value?"text-white":"text-indigo-600"])},i0,2)):x("",!0)],42,a0))),256))],40,o0)):!e.multiple&&e.modelValue?(o(),i("div",{key:1,onKeydown:M,onClick:t[2]||(t[2]=e=>D(!n.value)),class:"h-8 -mt-8 ml-3 pt-0.5"},[K(e.$slots,"item",Ot(ks(e.modelValue)))],32)):x("",!0),p.value?(o(),i("div",u0,c0)):x("",!0)]),p.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:e.id+"-error"},P(p.value),9,f0)):e.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:e.id+"-description"},P(e.help),9,v0)):x("",!0)],8,Yc))}}),m0=["id","name","value"],h0={class:"block truncate"},g0=ce({__name:"Combobox",props:{id:{},modelValue:{},multiple:{type:Boolean},options:{},values:{},entries:{}},emits:["update:modelValue"],setup(e,{expose:t,emit:a}){const n=e,s=(t({toggle(e){var t;null!=(t=d.value)&&t.toggle(e)}}),a);function r(e){s("update:modelValue",e)}const u=v(()=>null!=n.multiple?n.multiple:Array.isArray(n.modelValue)),d=I();function c(e,t){return!t||e.value.toLowerCase().includes(t.toLowerCase())}const p=v(()=>n.entries||(n.values?n.values.map(e=>({key:e,value:e})):n.options?Object.keys(n.options).map(e=>({key:e,value:n.options[e]})):[])),f=I(u.value?[]:null);st(function(){let t=n.modelValue&&"object"==typeof n.modelValue?n.modelValue.key:n.modelValue;null==t||""===t?f.value=u.value?[]:null:"string"==typeof t?f.value=p.value.find(e=>e.key===t)||null:Array.isArray(t)&&(f.value=p.value.filter(e=>t.includes(e.key)))});const m=v(()=>null==f.value?"":Array.isArray(f.value)?f.value.map(e=>encodeURIComponent(e.key)).join(","):f.value.key);return(e,t)=>{var a=G("Autocomplete");return o(),i(Ie,null,[l("input",{type:"hidden",id:e.id,name:e.id,value:m.value},null,8,m0),xe(a,Ae({ref_key:"input",ref:d,id:e.id,options:p.value,match:c,multiple:u.value},e.$attrs,{modelValue:f.value,"onUpdate:modelValue":[t[0]||(t[0]=e=>f.value=e),r]}),{item:Ce(({value:e})=>[l("span",h0,P(e),1)]),_:1},16,["id","options","multiple","modelValue"])],64)}}}),y0=ce({__name:"DynamicInput",props:{input:{},modelValue:{},api:{}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=t,p=v(()=>l.input.type||"text"),n="ignore,css,options,meta,allowableValues,allowableEntries,op,prop,type,id,name".split(","),f=v(()=>ft(l.input,n)),m=I(Qe(l.modelValue[l.input.id],e=>"file"===l.input.type?null:"date"===l.input.type&&e instanceof Date?Ss(e):"time"===l.input.type?fn(e):e)),g=(St(m,()=>{l.modelValue[l.input.id]=m.value,a("update:modelValue",l.modelValue)}),v(()=>{var e=l.modelValue[l.input.id];if("file"!==l.input.type||!e)return[];if("string"==typeof e)return[{filePath:e,fileName:xt(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:xt(e,"/")}):"object"==typeof e&&t.push(e)}),t}}));return(e,t)=>{var l,a=G("SelectInput"),n=G("CheckboxInput"),s=G("TagInput"),r=G("Combobox"),i=G("FileInput"),u=G("TextareaInput"),d=G("MarkdownInput"),c=G("TextInput");return te(Y).component(p.value)?(o(),ae(on(te(Y).component(p.value)),Ae({key:0,id:e.input.id,modelValue:m.value,"onUpdate:modelValue":t[0]||(t[0]=e=>m.value=e),status:null==(l=e.api)?void 0:l.error,"input-class":null==(l=e.input.css)?void 0:l.input,"label-class":null==(l=e.input.css)?void 0:l.label},f.value),null,16,["id","modelValue","status","input-class","label-class"])):"select"==p.value?(o(),ae(a,Ae({key:1,id:e.input.id,modelValue:m.value,"onUpdate:modelValue":t[1]||(t[1]=e=>m.value=e),status:null==(l=e.api)?void 0:l.error,"input-class":null==(a=e.input.css)?void 0:a.input,"label-class":null==(l=e.input.css)?void 0:l.label,entries:e.input.allowableEntries,values:e.input.allowableValues},f.value),null,16,["id","modelValue","status","input-class","label-class","entries","values"])):"checkbox"==p.value?(o(),ae(n,Ae({key:2,id:e.input.id,modelValue:m.value,"onUpdate:modelValue":t[2]||(t[2]=e=>m.value=e),status:null==(a=e.api)?void 0:a.error,"input-class":null==(l=e.input.css)?void 0:l.input,"label-class":null==(n=e.input.css)?void 0:n.label},f.value),null,16,["id","modelValue","status","input-class","label-class"])):"tag"==p.value?(o(),ae(s,Ae({key:3,id:e.input.id,modelValue:m.value,"onUpdate:modelValue":t[3]||(t[3]=e=>m.value=e),status:null==(a=e.api)?void 0:a.error,"input-class":null==(l=e.input.css)?void 0:l.input,"label-class":null==(n=e.input.css)?void 0:n.label,allowableValues:e.input.allowableValues,string:"String"==(null==(s=e.input.prop)?void 0:s.type)},f.value),null,16,["id","modelValue","status","input-class","label-class","allowableValues","string"])):"combobox"==p.value?(o(),ae(r,Ae({key:4,id:e.input.id,modelValue:m.value,"onUpdate:modelValue":t[4]||(t[4]=e=>m.value=e),status:null==(a=e.api)?void 0:a.error,"input-class":null==(l=e.input.css)?void 0:l.input,"label-class":null==(n=e.input.css)?void 0:n.label,entries:e.input.allowableEntries,values:e.input.allowableValues},f.value),null,16,["id","modelValue","status","input-class","label-class","entries","values"])):"file"==p.value?(o(),ae(i,Ae({key:5,id:e.input.id,status:null==(s=e.api)?void 0:s.error,modelValue:m.value,"onUpdate:modelValue":t[5]||(t[5]=e=>m.value=e),"input-class":null==(r=e.input.css)?void 0:r.input,"label-class":null==(a=e.input.css)?void 0:a.label,files:g.value},f.value),null,16,["id","status","modelValue","input-class","label-class","files"])):"textarea"==p.value?(o(),ae(u,Ae({key:6,id:e.input.id,modelValue:m.value,"onUpdate:modelValue":t[6]||(t[6]=e=>m.value=e),status:null==(l=e.api)?void 0:l.error,"input-class":null==(n=e.input.css)?void 0:n.input,"label-class":null==(i=e.input.css)?void 0:i.label},f.value),null,16,["id","modelValue","status","input-class","label-class"])):"MarkdownInput"==p.value?(o(),ae(d,Ae({key:7,id:e.input.id,modelValue:m.value,"onUpdate:modelValue":t[7]||(t[7]=e=>m.value=e),status:null==(s=e.api)?void 0:s.error,"input-class":null==(r=e.input.css)?void 0:r.input,"label-class":null==(a=e.input.css)?void 0:a.label},f.value),null,16,["id","modelValue","status","input-class","label-class"])):(o(),ae(c,Ae({key:8,type:p.value,id:e.input.id,modelValue:m.value,"onUpdate:modelValue":t[8]||(t[8]=e=>m.value=e),status:null==(u=e.api)?void 0:u.error,"input-class":null==(l=e.input.css)?void 0:l.input,"label-class":null==(n=e.input.css)?void 0:n.label},f.value),null,16,["type","id","modelValue","status","input-class","label-class"]))}}}),b0={class:"lookup-field"},w0=["name","value"],k0={key:0,class:"flex justify-between"},_0=["for"],$0={key:0,class:"flex items-center"},C0={class:"text-sm text-gray-500 dark:text-gray-400 pr-1"},x0=l("span",{class:"sr-only"},"Clear",-1),L0=l("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"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),V0=[x0,L0],S0={key:1,class:"mt-1 relative"},M0={class:"w-full inline-flex truncate"},A0={class:"text-blue-700 dark:text-blue-300 flex cursor-pointer"},T0=l("span",{class:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},[l("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"},[l("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),F0=["id"],I0=["id"],D0=ce({__name:"LookupInput",props:{id:{},status:{},input:{},metadataType:{},modelValue:{},label:{},labelClass:{},help:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=At()["config"],s=rt()["metadataApi"],r=e,u=t,d=v(()=>r.id||r.input.id),c=v(()=>r.label??ze(ot(d.value)));let n=Ue("ApiState",void 0);const p=Ue("client"),f=v(()=>pt.call({responseStatus:r.status??(null==n?void 0:n.error.value)},d.value)),m=I(""),g=I(""),y=v(()=>be(r.modelValue,d.value)),h=v(()=>tt(r.metadataType).find(e=>e.name.toLowerCase()==d.value.toLowerCase())),w=v(()=>{var e;return(null==(e=at(null==(e=null==(e=h.value)?void 0:e.ref)?void 0:e.model))?void 0:e.icon)||a.value.tableIcon});let k;function C(){r.modelValue[d.value]=null,m.value=""}return st(async()=>{k=Ue("ModalProvider",void 0);var t,l=r.modelValue;r.modelValue[d.value]||(r.modelValue[d.value]=null);const a=h.value,n=null==a?void 0:a.ref;if(n){m.value="";let e=null==n.selfId?be(l,a.name):be(l,n.selfId);null==(e=Xt(e)?be(l,n.refId):e)||null==(null==(t=s.value)?void 0:t.operations.find(e=>{return(null==(e=e.dataModel)?void 0:e.name)==n.model}))||Xt(t=be(l,a.name))||(m.value=""+t,g.value=a.name,null!=n.refLabel&&(null==(t=tt(r.metadataType).find(e=>e.type==n.model))&&console.warn(`Could not find ${n.model} Property on `+r.metadataType.name),null!=(l=null!=t?be(l,t.name):null)?(t=be(l,n.refLabel))&&(m.value=""+t,Dt.setValue(n.model,e,n.refLabel,t)):(t=1==(null==(l=a.attributes)?void 0:l.some(e=>"Computed"==e.name)),l=await Dt.getOrFetchValue(p,s.value,n.model,n.refId,n.refLabel,t,e),m.value=l||n.model+": "+m.value)))}else console.warn(`No RefInfo for property '${d.value}'`)}),(e,t)=>{var a,n=G("Icon");return o(),i("div",b0,[l("input",{type:"hidden",name:d.value,value:y.value},null,8,w0),c.value?(o(),i("div",k0,[l("label",{for:d.value,class:b("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(e.labelClass??""))},P(c.value),11,_0),y.value?(o(),i("div",$0,[l("span",C0,P(y.value),1),l("button",{onClick:C,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"},V0)])):x("",!0)])):x("",!0),null!=(a=h.value)&&a.ref?(o(),i("div",S0,[l("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=h.value.ref)&&(null==k?console.warn("No ModalProvider required by LookupInput"):k.openModal({name:"ModalLookup",ref:l},e=>{var t;console.debug("openModal",m.value," -> ",e,Dt.setRefValue(l,e),l),e&&(t=be(e,l.refId),m.value=Dt.setRefValue(l,e)||t,(e=te(r.modelValue))[d.value]=t,u("update:modelValue",e))}))}),"aria-haspopup":"listbox","aria-expanded":"true","aria-labelledby":"listbox-label"},[l("span",M0,[l("span",A0,[xe(n,{class:"mr-1 w-5 h-5",image:w.value},null,8,["image"]),l("span",null,P(m.value),1)])]),T0])])):x("",!0),f.value?(o(),i("p",{key:2,class:"mt-2 text-sm text-red-500",id:d.value+"-error"},P(f.value),9,F0)):e.help?(o(),i("p",{key:3,class:"mt-2 text-sm text-gray-500",id:d.value+"-description"},P(e.help),9,I0)):x("",!0)])}}}),P0=ce({__name:"AutoFormFields",props:{modelValue:{},type:{},metaType:{},api:{},formLayout:{},configureField:{},configureFormLayout:{},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(e,{expose:t,emit:a}){const r=e,n=a;function s(){var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}function u(e,t){r.modelValue[e]=t,n("update:modelValue",r.modelValue),s()}t({forceUpdate:s,props:r,updateValue:u});const{metadataApi:d,apiOf:c,typeOf:p,typeOfRef:f,createFormLayout:m}=rt(),g=v(()=>r.type||Nt(r.modelValue)),y=v(()=>r.metaType??p(g.value)),h=v(()=>{var e;return f(null==(e=null==(e=d.value)?void 0:e.operations.find(e=>e.request.name==g.value))?void 0:e.dataModel)||y.value}),w=v(()=>{var e,t=y.value;if(!t){if(r.formLayout)return e=r.formLayout.map(e=>{var t={name:e.id,type:Ma(e.type)},t=Object.assign({prop:t},e);return r.configureField&&r.configureField(t),t}),r.configureFormLayout&&r.configureFormLayout(e),e;throw new Error(`MetadataType for ${g.value} not found`)}const a=tt(t),n=h.value,l=r.formLayout||m(t),s=[],o=c(t.name);return l.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:o},t),r.configureField&&r.configureField(l),s.push(l))}),r.configureFormLayout&&r.configureFormLayout(s),s}),k=v(()=>w.value.filter(e=>"hidden"!=e.type).map(e=>e.id));return(a,n)=>{var e;const t=G("ErrorSummary"),s=G("LookupInput"),r=G("DynamicInput");return o(),i(Ie,null,[a.hideSummary?x("",!0):(o(),ae(t,{key:0,status:null==(e=a.api)?void 0:e.error,except:k.value},null,8,["status","except"])),l("div",{class:b(a.flexClass)},[l("div",{class:b(a.divideClass)},[l("div",{class:b(a.spaceClass)},[l("fieldset",{class:b(a.fieldsetClass)},[(o(!0),i(Ie,null,De(w.value,t=>{var e;return o(),i("div",{key:t.id,class:b(["w-full",(null==(e=t.css)?void 0:e.field)??("textarea"==t.type?"col-span-12":"col-span-12 xl:col-span-6"+("checkbox"==t.type?" flex items-center":"")),"hidden"==t.type?"hidden":""])},[null==(null==(e=t.prop)?void 0:e.ref)||"file"==t.type||t.prop.isPrimaryKey?(o(),ae(r,{key:1,input:t,modelValue:a.modelValue,"onUpdate:modelValue":n[0]||(n[0]=e=>a.$emit("update:modelValue",e)),api:a.api},null,8,["input","modelValue","api"])):(o(),ae(s,{key:0,metadataType:h.value,input:t,modelValue:a.modelValue,"onUpdate:modelValue":e=>{u(t.id,be(e,t.id))},status:null==(e=a.api)?void 0:e.error},null,8,["metadataType","input","modelValue","onUpdate:modelValue","status"]))],2)}),128))],2)],2)],2)],2)],64)}}});function js(e){const n=I(!1),s=I(),o=I(),r=e??Ue("client");function i({message:e,errorCode:t,fieldName:l,errors:a}){return t=t||"Exception",a=a||[],s.value=new Us(l?{errorCode:t,message:e,errors:[new Wl({fieldName:l,errorCode:t,message:e})]}:{errorCode:t,message:e,errors:a})}e={setError:i,addFieldError:function({fieldName:t,message:e,errorCode:l}){var a;l=l||"Exception",s.value?((a=new Us(s.value)).errors=[...(a.errors||[]).filter(e=>{return(null==(e=e.fieldName)?void 0:e.toLowerCase())!==(null==t?void 0:t.toLowerCase())}),new Wl({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 r.api(It(e),t,l),n.value=!1,o.value=e.response,s.value=e.error,e},apiVoid:async function(e,t,l){return n.value=!0,e=await r.apiVoid(It(e),t,l),n.value=!1,o.value=e.response,s.value=e.error,e},apiForm:async function(e,t,l,a){return n.value=!0,e=await r.apiForm(It(e),t,l,a),n.value=!1,o.value=e.response,s.value=e.error,e},apiFormVoid:async function(e,t,l,a){return n.value=!0,e=await r.apiFormVoid(It(e),t,l,a),n.value=!1,o.value=e.response,s.value=e.error,e},swr:async function(e,t,l,a){return mn(r,e,t,l,a)},swrEffect:function(l,a){const n=I(new Xe),s=hn(async e=>{n.value=await r.api(e)},null==a?void 0:a.delayMs);return ws(async()=>{var e=l(),t=cl(As(e));t&&(n.value=new Xe({response:t})),0===(null==a?void 0:a.delayMs)?n.value=await r.api(e):s(e)}),(async()=>n.value=await r.api(l(),null==a?void 0:a.args,null==a?void 0:a.method))(),n},unRefs:It,setRef:vn};return ss("ApiState",e),e}const j0={key:0},O0={class:"text-red-700"},B0=l("b",null,"type",-1),R0={key:0},E0={key:2},H0=["innerHTML"],z0=l("input",{type:"submit",class:"hidden"},null,-1),N0={class:"flex justify-end"},U0=l("div",null,null,-1),q0={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},Q0=l("div",{class:"fixed inset-0"},null,-1),K0={class:"fixed inset-0 overflow-hidden"},Z0={class:"flex min-h-0 flex-1 flex-col overflow-auto"},W0={class:"flex-1"},G0={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},J0={class:"flex items-start justify-between space-x-3"},X0={class:"space-y-1"},Y0={key:0},ef={key:2},tf=["innerHTML"],sf={class:"flex h-7 items-center"},lf={class:"flex justify-end"},nf=ce({__name:"AutoForm",props:{type:{},modelValue:{},heading:{},subHeading:{},showLoading:{type:Boolean,default:!0},jsconfig:{default:"eccn,edv"},formStyle:{default:"card"},metaType:{},configureField:{},configureFormLayout:{},panelClass:{},bodyClass:{},formClass:{},innerFormClass:{},headerClass:{default:"p-6"},buttonsClass:{},headingClass:{},subHeadingClass:{},submitLabel:{default:"Submit"},allowSubmit:{}},emits:["success","error","update:modelValue","done"],setup(e,{expose:t,emit:a}){const r=e,u=a,p=I(),f=I(1),m=I();function n(){f.value++,D.value=F();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}ss("ModalProvider",{openModal:function(e,t){g.value=e,s.value=t}});const g=I(),s=I();async function y(e){s.value&&s.value(e),g.value=void 0,s.value=void 0}const d=js(),c=gn()["getTypeName"],{typeOf:h,createDto:w}=rt(),k=I(new Xe),C=v(()=>r.panelClass||Ze.panelClass(r.formStyle)),L=v(()=>r.formClass||"card"==r.formStyle?"shadow sm:rounded-md":Pt.formClass),V=v(()=>r.headingClass||Ze.headingClass(r.formStyle)),S=v(()=>r.subHeadingClass||Ze.subHeadingClass(r.formStyle)),M=v(()=>("string"==typeof r.buttonsClass?r:Ze).buttonsClass),A=v(()=>{var e;return r.type?c(r.type):null!=(e=r.modelValue)&&e.getTypeName?r.modelValue.getTypeName():null}),T=v(()=>r.metaType??h(A.value)),F=()=>r.modelValue||$(),D=I(F()),j=v(()=>d.loading.value),B=v(()=>{var e;return null!=r.heading?r.heading:(null==(e=T.value)?void 0:e.description)||ze(A.value)});function $(){return"string"==typeof r.type?w(r.type):r.type?new r.type:r.modelValue}async function O(e){var t,l,a,n,s;e&&"FORM"==e.tagName?(t=$(),s=Qe(null==t?void 0:t.getMethod,e=>"function"==typeof e?e():null)||"POST",l=null==Qe(null==t?void 0:t.createResponse,e=>"function"==typeof e?e():null),a=r.jsconfig,il.hasRequestBody(s)?(s=new t.constructor,n=new FormData(e),k.value=l?await d.apiFormVoid(s,n,{jsconfig:a}):await d.apiForm(s,n,{jsconfig:a})):(s=new t.constructor(Po(D.value)),console.debug("AutoForm.submit",s),k.value=l?await d.apiVoid(s,{jsconfig:a}):await d.api(s,{jsconfig:a})),k.value.succeeded?(u("success",k.value.response),R()):u("error",k.value.error)):console.error("Not a valid form",e)}function E(e){u("update:modelValue",e)}function z(){u("done")}t({forceUpdate:n,props:r,setModel:async function(e){Object.assign(D.value,e),n(),await $t(()=>null)},formFields:p,submit:async function(){O(m.value)},close:R,model:D});const H=I(!1),_=I(""),U={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"==r.formStyle?H.value=!1:z()}St(H,()=>{Lt(U,_,H.value),H.value||setTimeout(z,700)}),H.value=!0;const N=e=>{"Escape"===e.key&&R()};return st(()=>window.addEventListener("keydown",N)),zt(()=>window.removeEventListener("keydown",N)),(t,e)=>{var a;const n=G("AutoFormFields"),s=G("FormLoading"),r=G("PrimaryButton"),u=G("CloseButton"),d=G("SecondaryButton"),c=G("ModalLookup");return o(),i("div",null,[T.value?"card"==t.formStyle?(o(),i("div",{key:1,class:b(C.value)},[l("form",{ref_key:"elForm",ref:m,onSubmit:e[0]||(e[0]=qe(e=>O(e.target),["prevent"])),autocomplete:"off",class:b(t.innerFormClass)},[l("div",{class:b(t.bodyClass)},[l("div",{class:b(t.headerClass)},[t.$slots.heading?(o(),i("div",R0,[K(t.$slots,"heading")])):(o(),i("h3",{key:1,class:b(V.value)},P(B.value),3)),t.$slots.subheading?(o(),i("div",E0,[K(t.$slots,"subheading")])):t.subHeading?(o(),i("p",{key:3,class:b(S.value)},P(t.subHeading),3)):null!=(a=T.value)&&a.notes?(o(),i("p",{key:4,class:b(["notes",S.value]),innerHTML:null==(a=T.value)?void 0:a.notes},null,10,H0)):x("",!0)],2),K(t.$slots,"header",{instance:null==(a=Be())?void 0:a.exposed,model:D.value}),z0,(o(),ae(n,{ref_key:"formFields",ref:p,key:f.value,type:t.type,modelValue:D.value,"onUpdate:modelValue":E,api:k.value,configureField:t.configureField,configureFormLayout:t.configureFormLayout},null,8,["type","modelValue","api","configureField","configureFormLayout"])),K(t.$slots,"footer",{instance:null==(a=Be())?void 0:a.exposed,model:D.value})],2),K(t.$slots,"buttons",{},()=>{var e;return[l("div",{class:b(M.value)},[l("div",null,[K(t.$slots,"leftbuttons",{instance:null==(e=Be())?void 0:e.exposed,model:D.value})]),l("div",null,[t.showLoading&&j.value?(o(),ae(s,{key:0})):x("",!0)]),l("div",N0,[U0,xe(r,{disabled:!!t.allowSubmit&&!t.allowSubmit(D.value)},{default:Ce(()=>[ke(P(t.submitLabel),1)]),_:1},8,["disabled"]),K(t.$slots,"rightbuttons",{instance:null==(e=Be())?void 0:e.exposed,model:D.value})])],2)]})],34)],2)):(o(),i("div",q0,[Q0,l("div",K0,[l("div",{onMousedown:R,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:e[2]||(e[2]=qe(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:b(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",_.value])},[l("form",{ref_key:"elForm",ref:m,class:b(L.value),onSubmit:e[1]||(e[1]=qe(e=>O(e.target),["prevent"]))},[l("div",Z0,[l("div",W0,[l("div",G0,[l("div",J0,[l("div",X0,[t.$slots.heading?(o(),i("div",Y0,[K(t.$slots,"heading")])):(o(),i("h3",{key:1,class:b(V.value)},P(B.value),3)),t.$slots.subheading?(o(),i("div",ef,[K(t.$slots,"subheading")])):t.subHeading?(o(),i("p",{key:3,class:b(S.value)},P(t.subHeading),3)):null!=(a=T.value)&&a.notes?(o(),i("p",{key:4,class:b(["notes",S.value]),innerHTML:null==(e=T.value)?void 0:e.notes},null,10,tf)):x("",!0)]),l("div",sf,[xe(u,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:R})])])]),K(t.$slots,"header",{instance:null==(a=Be())?void 0:a.exposed,model:D.value}),(o(),ae(n,{ref_key:"formFields",ref:p,key:f.value,type:t.type,modelValue:D.value,"onUpdate:modelValue":E,api:k.value,configureField:t.configureField,configureFormLayout:t.configureFormLayout},null,8,["type","modelValue","api","configureField","configureFormLayout"])),K(t.$slots,"footer",{instance:null==(e=Be())?void 0:e.exposed,model:D.value})])]),l("div",{class:b(M.value)},[l("div",null,[K(t.$slots,"leftbuttons",{instance:null==(a=Be())?void 0:a.exposed,model:D.value})]),l("div",null,[t.showLoading&&j.value?(o(),ae(s,{key:0})):x("",!0)]),l("div",lf,[xe(d,{onClick:R,disabled:j.value},{default:Ce(()=>[ke("Cancel")]),_:1},8,["disabled"]),xe(r,{class:"ml-4",disabled:!!t.allowSubmit&&!t.allowSubmit(D.value)},{default:Ce(()=>[ke(P(t.submitLabel),1)]),_:1},8,["disabled"]),K(t.$slots,"rightbuttons",{instance:null==(e=Be())?void 0:e.exposed,model:D.value})])],2)],34)],2)],32)],32)])])):(o(),i("div",j0,[l("p",O0,[ke("Could not create form for unknown "),B0,ke(" "+P(A.value),1)])])),"ModalLookup"==(null==(a=g.value)?void 0:a.name)&&g.value.ref?(o(),ae(c,{key:3,"ref-info":g.value.ref,onDone:y},null,8,["ref-info"])):x("",!0)])}}}),of={key:0},af={class:"text-red-700"},rf=l("b",null,"type",-1),uf={key:0},df={key:2},cf=["innerHTML"],ff={class:"flex justify-end"},vf={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},pf=l("div",{class:"fixed inset-0"},null,-1),mf={class:"fixed inset-0 overflow-hidden"},hf={class:"flex min-h-0 flex-1 flex-col overflow-auto"},gf={class:"flex-1"},yf={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},bf={class:"flex items-start justify-between space-x-3"},wf={class:"space-y-1"},kf={key:0},_f={key:2},$f=["innerHTML"],Cf={class:"flex h-7 items-center"},xf={class:"flex justify-end"},Lf=ce({__name:"AutoCreateForm",props:{type:{},formStyle:{default:"slideOver"},panelClass:{},formClass:{},headingClass:{},subHeadingClass:{},buttonsClass:{},heading:{},subHeading:{},autosave:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},showCancel:{type:Boolean,default:!0},configureField:{},configureFormLayout:{}},emits:["done","save","error"],setup(e,{expose:t,emit:a}){const n=e,s=a,p=I(),f=I(1);function r(){f.value++,null!=(e=p.value)&&e.forceUpdate();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}function m(e){}ss("ModalProvider",{openModal:function(e,t){g.value=e,u.value=t}});const g=I(),u=I();async function y(e){u.value&&u.value(e),g.value=void 0,u.value=void 0}const{typeOf:d,typeProperties:c,Crud:h,createDto:w,formValues:k}=rt(),C=v(()=>Nt(n.type)),L=v(()=>d(C.value)),V=I("string"==typeof n.type?w(n.type):n.type?new n.type:null),S=(t({forceUpdate:r,props:n,setModel:function(e){Object.assign(V.value,e),r()},formFields:p,model:V}),v(()=>n.panelClass||Ze.panelClass(n.formStyle))),M=v(()=>n.formClass||Ze.formClass(n.formStyle)),A=v(()=>n.headingClass||Ze.headingClass(n.formStyle)),T=v(()=>n.subHeadingClass||Ze.subHeadingClass(n.formStyle)),F=v(()=>n.buttonsClass||Ze.buttonsClass),D=v(()=>h.model(L.value)),j=v(()=>{var e;return n.heading||(null==(e=d(C.value))?void 0:e.description)||(D.value?"New "+ze(D.value):ze(C.value))}),B=I(new Xe);let $=js(),O=v(()=>$.loading.value);async function E(e){var t,l,a,e=e.target;n.autosave?(l=Qe(null==(l=V.value)?void 0:l.getMethod,e=>"function"==typeof e?e():null)||"POST",t=null==Qe(null==(t=V.value)?void 0:t.createResponse,e=>"function"==typeof e?e():null),il.hasRequestBody(l)?(l=new V.value.constructor,a=new FormData(e),B.value=t?await $.apiFormVoid(l,a,{jsconfig:"eccn"}):await $.apiForm(l,a,{jsconfig:"eccn"})):(l=k(e,c(L.value)),a=new V.value.constructor(l),B.value=t?await $.apiVoid(a,{jsconfig:"eccn"}):await $.api(a,{jsconfig:"eccn"})),B.value.succeeded?(e.reset(),s("save",B.value.response)):s("error",B.value.error)):s("save",new V.value.constructor(k(e,c(L.value))))}function z(){s("done")}Y.interceptors.has("AutoCreateForm.new")&&Y.interceptors.invoke("AutoCreateForm.new",{props:n,model:V});const H=I(!1),_=I(""),U={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"==n.formStyle?H.value=!1:z()}St(H,()=>{Lt(U,_,H.value),H.value||setTimeout(z,700)}),H.value=!0;const N=e=>{"Escape"===e.key&&R()};return st(()=>window.addEventListener("keydown",N)),zt(()=>window.removeEventListener("keydown",N)),(e,t)=>{var a,n=G("AutoFormFields"),s=G("FormLoading"),r=G("SecondaryButton"),u=G("PrimaryButton"),d=G("CloseButton"),c=G("ModalLookup");return o(),i("div",null,[L.value?"card"==e.formStyle?(o(),i("div",{key:1,class:b(S.value)},[l("form",{onSubmit:qe(E,["prevent"])},[l("div",{class:b(M.value)},[l("div",null,[e.$slots.heading?(o(),i("div",uf,[K(e.$slots,"heading")])):(o(),i("h3",{key:1,class:b(A.value)},P(j.value),3)),e.$slots.subheading?(o(),i("div",df,[K(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:b(T.value)},P(e.subHeading),3)):null!=(a=L.value)&&a.notes?(o(),i("p",{key:4,class:b(["notes",T.value]),innerHTML:null==(a=L.value)?void 0:a.notes},null,10,cf)):x("",!0)]),K(e.$slots,"header",{formInstance:null==(a=Be())?void 0:a.exposed,model:V.value}),(o(),ae(n,{ref_key:"formFields",ref:p,key:f.value,modelValue:V.value,"onUpdate:modelValue":m,api:B.value,configureField:e.configureField,configureFormLayout:e.configureFormLayout},null,8,["modelValue","api","configureField","configureFormLayout"])),K(e.$slots,"footer",{formInstance:null==(a=Be())?void 0:a.exposed,model:V.value})],2),l("div",{class:b(F.value)},[l("div",null,[e.showLoading&&te(O)?(o(),ae(s,{key:0})):x("",!0)]),l("div",ff,[e.showCancel?(o(),ae(r,{key:0,onClick:R,disabled:te(O)},{default:Ce(()=>[ke("Cancel")]),_:1},8,["disabled"])):x("",!0),xe(u,{type:"submit",class:"ml-4",disabled:te(O)},{default:Ce(()=>[ke("Save")]),_:1},8,["disabled"])])],2)],32)],2)):(o(),i("div",vf,[pf,l("div",mf,[l("div",{onMousedown:R,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:t[0]||(t[0]=qe(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:b(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",_.value])},[l("form",{class:b(M.value),onSubmit:qe(E,["prevent"])},[l("div",hf,[l("div",gf,[l("div",yf,[l("div",bf,[l("div",wf,[e.$slots.heading?(o(),i("div",kf,[K(e.$slots,"heading")])):(o(),i("h3",{key:1,class:b(A.value)},P(j.value),3)),e.$slots.subheading?(o(),i("div",_f,[K(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:b(T.value)},P(e.subHeading),3)):null!=(a=L.value)&&a.notes?(o(),i("p",{key:4,class:b(["notes",T.value]),innerHTML:null==(t=L.value)?void 0:t.notes},null,10,$f)):x("",!0)]),l("div",Cf,[xe(d,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:R})])])]),K(e.$slots,"header",{formInstance:null==(a=Be())?void 0:a.exposed,model:V.value}),(o(),ae(n,{ref_key:"formFields",ref:p,key:f.value,modelValue:V.value,"onUpdate:modelValue":m,api:B.value,configureField:e.configureField,configureFormLayout:e.configureFormLayout},null,8,["modelValue","api","configureField","configureFormLayout"])),K(e.$slots,"footer",{formInstance:null==(t=Be())?void 0:t.exposed,model:V.value})])]),l("div",{class:b(F.value)},[l("div",null,[e.showLoading&&te(O)?(o(),ae(s,{key:0})):x("",!0)]),l("div",xf,[e.showCancel?(o(),ae(r,{key:0,onClick:R,disabled:te(O)},{default:Ce(()=>[ke("Cancel")]),_:1},8,["disabled"])):x("",!0),xe(u,{type:"submit",class:"ml-4",disabled:te(O)},{default:Ce(()=>[ke("Save")]),_:1},8,["disabled"])])],2)],34)],2)],32)],32)])])):(o(),i("div",of,[l("p",af,[ke("Could not create form for unknown "),rf,ke(" "+P(C.value),1)])])),"ModalLookup"==(null==(d=g.value)?void 0:d.name)&&g.value.ref?(o(),ae(c,{key:3,"ref-info":g.value.ref,onDone:y},null,8,["ref-info"])):x("",!0)])}}}),Vf={key:0},Sf={class:"text-red-700"},Mf=l("b",null,"type",-1),Af={key:0},Tf={key:2},Ff=["innerHTML"],If={class:"flex justify-end"},Df={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},Pf=l("div",{class:"fixed inset-0"},null,-1),jf={class:"fixed inset-0 overflow-hidden"},Of={class:"flex min-h-0 flex-1 flex-col overflow-auto"},Bf={class:"flex-1"},Rf={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},Ef={class:"flex items-start justify-between space-x-3"},Hf={class:"space-y-1"},zf={key:0},Nf={key:2},Uf=["innerHTML"],qf={class:"flex h-7 items-center"},Qf={class:"flex justify-end"},Kf=ce({__name:"AutoEditForm",props:{modelValue:{},type:{},deleteType:{},formStyle:{default:"slideOver"},panelClass:{},formClass:{},headingClass:{},subHeadingClass:{},heading:{},subHeading:{},autosave:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},configureField:{},configureFormLayout:{}},emits:["done","save","delete","error"],setup(e,{expose:t,emit:a}){const s=e,r=a,p=I(),f=I(1);function m(e){}ss("ModalProvider",{openModal:function(e,t){g.value=e,n.value=t}});const g=I(),n=I();async function U(e){n.value&&n.value(e),g.value=void 0,n.value=void 0}const{typeOf:u,apiOf:q,typeProperties:c,createFormLayout:Q,getPrimaryKey:Z,Crud:y,createDto:d,formValues:h}=rt(),w=v(()=>Nt(s.type)),k=v(()=>u(w.value)),C=()=>"string"==typeof s.type?d(s.type,ys(s.modelValue)):s.type?new s.type(ys(s.modelValue)):null,L=I(C()),J=(t({forceUpdate:function(){f.value++,L.value=C();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()},props:s,setModel:function(e){Object.assign(L.value,e)},formFields:p,model:L}),v(()=>s.panelClass||Ze.panelClass(s.formStyle))),V=v(()=>s.formClass||Ze.formClass(s.formStyle)),S=v(()=>s.headingClass||Ze.headingClass(s.formStyle)),M=v(()=>s.subHeadingClass||Ze.subHeadingClass(s.formStyle)),A=v(()=>y.model(k.value)),T=v(()=>{var e;return s.heading||(null==(e=u(w.value))?void 0:e.description)||(A.value?"Update "+ze(A.value):ze(w.value))}),F=I(new Xe);let D=Object.assign({},ys(s.modelValue)),j=(Y.interceptors.has("AutoEditForm.new")&&Y.interceptors.invoke("AutoEditForm.new",{props:s,model:L,origModel:D}),js()),B=v(()=>j.loading.value);const $=()=>Qe(u(y.model(k.value)),e=>Z(e));function W(e){var{op:t,prop:l}=e;t&&(y.isPatch(t)||y.isUpdate(t))&&(e.disabled=null==l?void 0:l.isPrimaryKey),s.configureField&&s.configureField(e)}async function O(a){a=a.target;if(s.autosave){let e=Qe(null==(n=L.value)?void 0:n.getMethod,e=>"function"==typeof e?e():null)||"POST",l=null==Qe(null==(n=L.value)?void 0:n.createResponse,e=>"function"==typeof e?e():null),d=$();if(il.hasRequestBody(e)){let e=new L.value.constructor,t=be(s.modelValue,d.name),i=new FormData(a),u=(d&&!Array.from(i.keys()).some(e=>e.toLowerCase()==d.name.toLowerCase())&&i.append(d.name,t),[]);var n=w.value&&q(w.value);if(n&&y.isPatch(n)){let o=Q(k.value),r={};if(d&&(r[d.name]=t),o.forEach(l=>{var a=l.id,n=be(D,a);if(!d||d.name.toLowerCase()!==a.toLowerCase()){var s=i.get(a);Y.interceptors.has("AutoEditForm.save.formLayout")&&Y.interceptors.invoke("AutoEditForm.save.formLayout",{origValue:n,formLayout:o,input:l,newValue:s});let e=null!=s,t="checkbox"===l.type?e!=!!n:"file"===l.type?e:s!=n;(t=s||n?t:!1)&&(s?r[a]=s:"file"!==l.type&&u.push(a))}}),Y.interceptors.has("AutoEditForm.save")&&Y.interceptors.invoke("AutoEditForm.save",{origModel:D,formLayout:o,dirtyValues:r}),Array.from(i.keys()).filter(e=>!r[e]).forEach(e=>i.delete(e)),0==Array.from(i.keys()).filter(e=>e.toLowerCase()!=d.name.toLowerCase()).length&&0==u.length)return void R()}n=0"function"==typeof e?e():null)?F.value=await j.apiVoid(l):F.value=await j.api(l),F.value.succeeded?r("delete",F.value.response):r("error",F.value.error)):console.error(`Could not find Primary Key for Type ${w.value} (${A.value})`)}function z(){r("done")}const H=I(!1),_=I(""),X={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"==s.formStyle?H.value=!1:z()}St(H,()=>{Lt(X,_,H.value),H.value||setTimeout(z,700)}),H.value=!0;const N=e=>{"Escape"===e.key&&R()};return st(()=>window.addEventListener("keydown",N)),zt(()=>window.removeEventListener("keydown",N)),(e,t)=>{var a,n=G("AutoFormFields"),s=G("ConfirmDelete"),r=G("FormLoading"),u=G("SecondaryButton"),d=G("PrimaryButton"),c=G("CloseButton"),v=G("ModalLookup");return o(),i("div",null,[k.value?"card"==e.formStyle?(o(),i("div",{key:1,class:b(J.value)},[l("form",{onSubmit:qe(O,["prevent"])},[l("div",{class:b(V.value)},[l("div",null,[e.$slots.heading?(o(),i("div",Af,[K(e.$slots,"heading")])):(o(),i("h3",{key:1,class:b(S.value)},P(T.value),3)),e.$slots.subheading?(o(),i("div",Tf,[K(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:b(M.value)},P(e.subHeading),3)):null!=(a=k.value)&&a.notes?(o(),i("p",{key:4,class:b(["notes",M.value]),innerHTML:null==(a=k.value)?void 0:a.notes},null,10,Ff)):x("",!0)]),K(e.$slots,"header",{formInstance:null==(a=Be())?void 0:a.exposed,model:L.value}),(o(),ae(n,{ref_key:"formFields",ref:p,key:f.value,modelValue:L.value,"onUpdate:modelValue":m,api:F.value,configureField:e.configureField,configureFormLayout:e.configureFormLayout},null,8,["modelValue","api","configureField","configureFormLayout"])),K(e.$slots,"footer",{formInstance:null==(a=Be())?void 0:a.exposed,model:L.value})],2),l("div",{class:b(te(Ze).buttonsClass)},[l("div",null,[e.deleteType?(o(),ae(s,{key:0,onDelete:E})):x("",!0)]),l("div",null,[e.showLoading&&te(B)?(o(),ae(r,{key:0})):x("",!0)]),l("div",If,[xe(u,{onClick:R,disabled:te(B)},{default:Ce(()=>[ke("Cancel")]),_:1},8,["disabled"]),xe(d,{type:"submit",class:"ml-4",disabled:te(B)},{default:Ce(()=>[ke("Save")]),_:1},8,["disabled"])])],2)],32)],2)):(o(),i("div",Df,[Pf,l("div",jf,[l("div",{onMousedown:R,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:t[0]||(t[0]=qe(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:b(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",_.value])},[l("form",{class:b(V.value),onSubmit:qe(O,["prevent"])},[l("div",Of,[l("div",Bf,[l("div",Rf,[l("div",Ef,[l("div",Hf,[e.$slots.heading?(o(),i("div",zf,[K(e.$slots,"heading")])):(o(),i("h3",{key:1,class:b(S.value)},P(T.value),3)),e.$slots.subheading?(o(),i("div",Nf,[K(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:b(M.value)},P(e.subHeading),3)):null!=(a=k.value)&&a.notes?(o(),i("p",{key:4,class:b(["notes",M.value]),innerHTML:null==(t=k.value)?void 0:t.notes},null,10,Uf)):x("",!0)]),l("div",qf,[xe(c,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:R})])])]),K(e.$slots,"header",{formInstance:null==(a=Be())?void 0:a.exposed,model:L.value}),(o(),ae(n,{ref_key:"formFields",ref:p,key:f.value,modelValue:L.value,"onUpdate:modelValue":m,api:F.value,configureField:W,configureFormLayout:e.configureFormLayout},null,8,["modelValue","api","configureFormLayout"])),K(e.$slots,"footer",{formInstance:null==(t=Be())?void 0:t.exposed,model:L.value})])]),l("div",{class:b(te(Ze).buttonsClass)},[l("div",null,[e.deleteType?(o(),ae(s,{key:0,onDelete:E})):x("",!0)]),l("div",null,[e.showLoading&&te(B)?(o(),ae(r,{key:0})):x("",!0)]),l("div",Qf,[xe(u,{onClick:R,disabled:te(B)},{default:Ce(()=>[ke("Cancel")]),_:1},8,["disabled"]),xe(d,{type:"submit",class:"ml-4",disabled:te(B)},{default:Ce(()=>[ke("Save")]),_:1},8,["disabled"])])],2)],34)],2)],32)],32)])])):(o(),i("div",Vf,[l("p",Sf,[ke("Could not create form for unknown "),Mf,ke(" "+P(w.value),1)])])),"ModalLookup"==(null==(c=g.value)?void 0:c.name)&&g.value.ref?(o(),ae(v,{key:3,"ref-info":g.value.ref,onDone:U},null,8,["ref-info"])):x("",!0)])}}}),Zf=l("label",{for:"confirmDelete",class:"ml-2 mr-2 select-none"},"confirm",-1),Wf=ce({__name:"ConfirmDelete",emits:["delete"],setup(e,{emit:t}){let a=I(!1);const n=t,s=()=>{a.value&&n("delete")},r=v(()=>["select-none inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white",a.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(),i(Ie,null,[Ct(l("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=>ln(a)?a.value=e:a=e)},null,512),[[ol,te(a)]]),Zf,l("span",Ae({onClick:qe(s,["prevent"]),class:r.value},e.$attrs),[K(e.$slots,"default",{},()=>[ke("Delete")])],16)],64))}}),Gf={class:"flex",title:"loading..."},Jf={key:0,xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24px",height:"30px",viewBox:"0 0 24 30"},Xf=xs('',3),Yf=[Xf],ev={class:"ml-2 mt-1 text-gray-400"},tv=ce({__name:"FormLoading",props:{icon:{type:Boolean,default:!0},text:{default:"loading..."}},setup(e){return Ue("ApiState",void 0),(e,t)=>(o(),i("div",Gf,[e.icon?(o(),i("svg",Jf,Yf)):x("",!0),l("span",ev,P(e.text),1)]))}}),sv=["onClick"],lv={key:3,class:"flex justify-between items-center"},nv={class:"mr-1 select-none"},ov=["onClick"],av=ce({__name:"DataGrid",props:{items:{default:()=>[]},id:{default:"DataGrid"},type:{},tableStyle:{default:"stripedRows"},selectedColumns:{},gridClass:{},grid2Class:{},grid3Class:{},grid4Class:{},tableClass:{},theadClass:{},tbodyClass:{},theadRowClass:{},theadCellClass:{},isSelected:{},headerTitle:{},headerTitles:{},visibleFrom:{},rowClass:{},rowStyle:{}},emits:["headerSelected","rowSelected"],setup(e,{emit:t}){const u=e,d=t,a=I(),c=I(null),p=al(),f=t=>Object.keys(p).find(e=>e.toLowerCase()==t.toLowerCase()+"-header"),m=t=>Object.keys(p).find(e=>e.toLowerCase()==t.toLowerCase()),n=v(()=>Ws(u.items).filter(e=>!(!p[e]&&!p[e+"-header"]))),{typeOf:s,typeProperties:r}=rt(),g=v(()=>Nt(u.type)),y=v(()=>s(g.value)),h=v(()=>r(y.value));function w(e){e=u.headerTitles&&be(u.headerTitles,e)||e;return u.headerTitle?u.headerTitle(e):cn(e)}function k(e){const t=e.toLowerCase();return h.value.find(e=>e.name.toLowerCase()==t)}const C={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=u.visibleFrom&&be(u.visibleFrom,e);return e&&Qe(C[e],e=>"hidden "+e)}const V=v(()=>u.gridClass??he.getGridClass(u.tableStyle)),S=v(()=>u.grid2Class??he.getGrid2Class(u.tableStyle)),M=v(()=>u.grid3Class??he.getGrid3Class(u.tableStyle)),A=v(()=>u.grid4Class??he.getGrid4Class(u.tableStyle)),T=v(()=>u.tableClass??he.getTableClass(u.tableStyle)),F=v(()=>u.tbodyClass??he.getTbodyClass(u.tbodyClass)),D=v(()=>u.theadClass??he.getTheadClass(u.tableStyle)),j=v(()=>u.theadRowClass??he.getTheadRowClass(u.tableStyle)),B=v(()=>u.theadCellClass??he.getTheadCellClass(u.tableStyle));const $=v(()=>{const e=("string"==typeof u.selectedColumns?u.selectedColumns.split(","):u.selectedColumns)||(0(e[t.name.toLowerCase()]=t.format,e),{});return e.filter(e=>{return"hidden"!=(null==(e=t[e.toLowerCase()])?void 0:e.method)})});return(n,e)=>{const s=G("CellFormat"),r=G("PreviewFormat");return n.items.length?(o(),i("div",{key:0,ref_key:"refResults",ref:a,class:b(V.value)},[l("div",{class:b(S.value)},[l("div",{class:b(M.value)},[l("div",{class:b(A.value)},[l("table",{class:b(T.value)},[l("thead",{class:b(D.value)},[l("tr",{class:b(j.value)},[(o(!0),i(Ie,null,De($.value,a=>{return o(),i("td",{class:b([L(a),B.value,(e=a,c.value===e?"text-gray-900 dark:text-gray-50":"text-gray-500 dark:text-gray-400")])},[l("div",{onClick:e=>{var t;e=e,t=a,d("headerSelected",t,e)}},[te(p)[a+"-header"]?K(n.$slots,a+"-header",{key:0,column:a}):f(a)?K(n.$slots,f(a),{key:1,column:a}):te(p).header?K(n.$slots,"header",{key:2,column:a,label:w(a)}):(o(),i("div",lv,[l("span",nv,P(w(a)),1)]))],8,sv)],2);var e}),256))],2)],2),l("tbody",{class:b(F.value)},[(o(!0),i(Ie,null,De(n.items,(l,e)=>{return o(),i("tr",{class:b((t=l,a=e,u.rowClass?u.rowClass(t,a):he.getTableRowClass(u.tableStyle,a,!(!u.isSelected||!u.isSelected(t)),null!=u.isSelected))),style:nl((a=l,t=e,u.rowStyle?u.rowStyle(a,t):void 0)),onClick:e=>{var t;e=e,t=l,d("rowSelected",t,e)}},[(o(!0),i(Ie,null,De($.value,e=>{return o(),i("td",{class:b([L(e),te(he).tableCellClass])},[te(p)[e]?K(n.$slots,e,Ot(Ae({key:0},l))):m(e)?K(n.$slots,m(e),Ot(Ae({key:1},l))):k(e)?(o(),ae(s,{key:2,type:y.value,propType:k(e),modelValue:l},null,8,["type","propType","modelValue"])):(o(),ae(r,{key:3,value:te(be)(l,e),format:null!=(e=k(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,ov);var t,a}),256))],2)],2)],2)],2)],2)],2)):x("",!0)}}}),rv=ce({props:{type:Object,propType:Object,modelValue:Object},setup(i,{attrs:u}){const d=rt()["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=be(i.modelValue,i.propType.name),n=Object.assign({},i,u),s=yt("span",{innerHTML:ts(a,l,n)}),o=Xt(a)&&Array.isArray(a)?yt("span",{},[yt("span",{class:"mr-2"},""+a.length),s]):s,r=null==(e=i.propType)?void 0:e.ref;return r&&(e=tt(i.type).find(e=>e.type===r.model))&&(e=(e=be(i.modelValue,e.name))&&r.refLabel&&be(e,r.refLabel))?(t=(t=null==(t=d(r.model))?void 0:t.icon)?yt(Xn,{image:t,class:"w-5 h-5 mr-1"}):null,yt("span",{class:"flex",title:r.model+" "+a},[t,e])):o}}}),iv={key:0},uv={key:0,class:"mr-2"},dv=["innerHTML"],cv=["innerHTML"],fv={inheritAttrs:!1},vv=ce({...fv,__name:"PreviewFormat",props:{value:{},format:{},includeIcon:{type:Boolean,default:!0},includeCount:{type:Boolean,default:!0},maxFieldLength:{default:150},maxNestedFields:{default:2},maxNestedFieldLength:{default:30}},setup(e){const t=e,a=v(()=>Array.isArray(t.value));return(e,t)=>te(Xt)(e.value)?(o(),i("span",iv,[e.includeCount&&a.value?(o(),i("span",uv,P(e.value.length),1)):x("",!0),l("span",{innerHTML:te(ts)(e.value,e.format,e.$attrs)},null,8,dv)])):(o(),i("span",{key:1,innerHTML:te(ts)(e.value,e.format,e.$attrs)},null,8,cv))}}),pv=["innerHTML"],mv={key:0},hv=l("b",null,null,-1),gv={key:2},yv=ce({__name:"HtmlFormat",props:{value:{},depth:{default:0},fieldAttrs:{},classes:{type:Function,default:(e,t,l,a,n)=>a}},setup(e){const t=e,s=v(()=>Vt(t.value)),r=v(()=>Array.isArray(t.value)),u=e=>cn(e),d=e=>t.fieldAttrs?t.fieldAttrs(e):null,c=v(()=>Ws(t.value));return(a,e)=>{const n=G("HtmlFormat",!0);return o(),i("div",{class:b(0==a.depth?"prose html-format":"")},[s.value?(o(),i("div",{key:0,innerHTML:te(ts)(a.value)},null,8,pv)):r.value?(o(),i("div",{key:1,class:b(a.classes("array","div",a.depth,te(he).gridClass))},[te(Vt)(a.value[0])?(o(),i("div",mv,"[ "+P(a.value.join(", "))+" ]",1)):(o(),i("div",{key:1,class:b(a.classes("array","div",a.depth,te(he).grid2Class))},[l("div",{class:b(a.classes("array","div",a.depth,te(he).grid3Class))},[l("div",{class:b(a.classes("array","div",a.depth,te(he).grid4Class))},[l("table",{class:b(a.classes("object","table",a.depth,te(he).tableClass))},[l("thead",{class:b(a.classes("array","thead",a.depth,te(he).theadClass))},[l("tr",null,[(o(!0),i(Ie,null,De(c.value,e=>(o(),i("th",{class:b(a.classes("array","th",a.depth,te(he).theadCellClass+" whitespace-nowrap"))},[hv,ke(P(u(e)),1)],2))),256))])],2),l("tbody",null,[(o(!0),i(Ie,null,De(a.value,(t,e)=>(o(),i("tr",{class:b(a.classes("array","tr",a.depth,e%2==0?"bg-white":"bg-gray-50",e))},[(o(!0),i(Ie,null,De(c.value,e=>(o(),i("td",{class:b(a.classes("array","td",a.depth,te(he).tableCellClass))},[xe(n,Ae({value:t[e],"field-attrs":a.fieldAttrs,depth:a.depth+1,classes:a.classes},d(e)),null,16,["value","field-attrs","depth","classes"])],2))),256))],2))),256))])],2)],2)],2)],2))],2)):(o(),i("div",gv,[l("table",{class:b(a.classes("object","table",a.depth,"table-object"))},[(o(!0),i(Ie,null,De((t=a.value)?Object.keys(t).map(e=>({key:u(e),val:t[e]})):[],e=>(o(),i("tr",{class:b(a.classes("object","tr",a.depth,""))},[l("th",{class:b(a.classes("object","th",a.depth,"align-top py-2 px-4 text-left text-sm font-medium tracking-wider whitespace-nowrap"))},P(e.key),3),l("td",{class:b(a.classes("object","td",a.depth,"align-top py-2 px-4 text-sm"))},[xe(n,Ae({value:e.val,"field-attrs":a.fieldAttrs,depth:a.depth+1,classes:a.classes},d(e.key)),null,16,["value","field-attrs","depth","classes"])],2)],2))),256))],2)]))],2);var t}}}),bv={class:"absolute top-0 right-0 pt-4 pr-4"},wv=l("span",{class:"sr-only"},"Close",-1),kv=l("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"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),_v=[wv,kv],$v=ce({__name:"CloseButton",props:{buttonClass:{default:"bg-white dark:bg-black"}},emits:["close"],setup(e,{}){return(t,e)=>(o(),i("div",bv,[l("button",{type:"button",onClick:e[0]||(e[0]=e=>t.$emit("close")),class:b([t.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"])},_v,2)]))}}),Cv=["id","aria-labelledby"],xv=l("div",{class:"fixed inset-0"},null,-1),Lv={class:"fixed inset-0 overflow-hidden"},Vv={class:"flex h-full flex-col bg-white dark:bg-black shadow-xl"},Sv={class:"flex min-h-0 flex-1 flex-col overflow-auto"},Mv={class:"flex-1"},Av={class:"relative bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},Tv={class:"flex items-start justify-between space-x-3"},Fv={class:"space-y-1"},Iv={key:0},Dv=["id"],Pv={key:2,class:"text-sm text-gray-500"},jv={class:"flex h-7 items-center"},Ov={key:0,class:"flex-shrink-0 border-t border-gray-200 dark:border-gray-700 px-4 py-5 sm:px-6"},Bv=ce({__name:"SlideOver",props:{id:{default:"SlideOver"},title:{},contentClass:{default:"relative mt-6 flex-1 px-4 sm:px-6"}},emits:["done"],setup(e,{emit:t}){const a=t,n=I(!1),s=I(""),r={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"}},u=(St(n,()=>{Lt(r,s,n.value),n.value||setTimeout(()=>a("done"),700)}),n.value=!0,()=>n.value=!1),d=e=>{"Escape"===e.key&&u()};return st(()=>window.addEventListener("keydown",d)),zt(()=>window.removeEventListener("keydown",d)),(e,t)=>{var a=G("CloseButton");return o(),i("div",{id:e.id,class:"relative z-10","aria-labelledby":e.id+"-title",role:"dialog","aria-modal":"true"},[xv,l("div",Lv,[l("div",{onMousedown:u,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:t[0]||(t[0]=qe(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:b(["panel pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",s.value])},[l("div",Vv,[l("div",Sv,[l("div",Mv,[l("div",Av,[l("div",Tv,[l("div",Fv,[e.$slots.title?(o(),i("div",Iv,[K(e.$slots,"title")])):x("",!0),e.title?(o(),i("h2",{key:1,class:"text-lg font-medium text-gray-900 dark:text-gray-50",id:e.id+"-title"},P(e.title),9,Dv)):x("",!0),e.$slots.subtitle?(o(),i("p",Pv,[K(e.$slots,"subtitle")])):x("",!0)]),l("div",jv,[xe(a,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:u})])])]),l("div",{class:b(e.contentClass)},[K(e.$slots,"default")],2)])]),e.$slots.footer?(o(),i("div",Ov,[K(e.$slots,"footer")])):x("",!0)])],2)],32)],32)])],8,Cv)}}}),Rv=["id","data-transition-for","aria-labelledby"],Ev={class:"fixed inset-0 z-10 overflow-y-auto"},Hv={class:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"},zv=l("span",{class:"sr-only"},"Close",-1),Nv=l("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"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),Uv=[zv,Nv],qv=ce({__name:"ModalDialog",props:{id:{default:"ModalDialog"},modalClass:{default:ll.modalClass},sizeClass:{default:ll.sizeClass}},emits:["done"],setup(e,{emit:t}){const a=t,n=I(!1),s=I(""),r={entering:{cls:"ease-out duration-300",from:"opacity-0",to:"opacity-100"},leaving:{cls:"ease-in duration-200",from:"opacity-100",to:"opacity-0"}},u=I(""),d={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"}},c=(St(n,()=>{Lt(r,s,n.value),Lt(d,u,n.value),n.value||setTimeout(()=>a("done"),200)}),n.value=!0,()=>n.value=!1),v=(ss("ModalProvider",{openModal:function(e,t){v.value=e,p.value=t}}),I()),p=I();async function f(e){p.value&&p.value(e),v.value=void 0,p.value=void 0}const m=e=>{"Escape"===e.key&&c()};return st(()=>window.addEventListener("keydown",m)),zt(()=>window.removeEventListener("keydown",m)),(e,t)=>{var a=G("ModalLookup");return o(),i("div",{id:e.id,"data-transition-for":e.id,onMousedown:c,class:"relative z-10","aria-labelledby":e.id+"-title",role:"dialog","aria-modal":"true"},[l("div",{class:b(["fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity",s.value])},null,2),l("div",Ev,[l("div",Hv,[l("div",{class:b([e.modalClass,e.sizeClass,u.value]),onMousedown:t[0]||(t[0]=qe(()=>{},["stop"]))},[l("div",null,[l("div",{class:"hidden sm:block absolute top-0 right-0 pt-4 pr-4 z-10"},[l("button",{type:"button",onClick:c,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"},Uv)]),K(e.$slots,"default")])],34)])]),"ModalLookup"==(null==(t=v.value)?void 0:t.name)&&v.value.ref?(o(),ae(a,{key:0,"ref-info":v.value.ref,onDone:f},null,8,["ref-info"])):x("",!0)],40,Rv)}}}),Qv={class:"pt-2 overflow-auto",style:{"min-height":"620px"}},Kv={class:"mt-3 pl-5 flex flex-wrap items-center"},Zv={class:"hidden sm:block text-xl leading-6 font-medium text-gray-900 dark:text-gray-50 mr-3"},Wv={class:"hidden md:inline"},Gv={class:"flex pb-1 sm:pb-0"},Jv=["title"],Xv=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("g",{"stroke-width":"1.5",fill:"none"},[l("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),Yv=[Xv],ep=["disabled"],tp=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z",fill:"currentColor"})],-1),sp=[tp],lp=["disabled"],np=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z",fill:"currentColor"})],-1),op=[np],ap=["disabled"],rp=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z",fill:"currentColor"})],-1),ip=[rp],up=["disabled"],dp=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z",fill:"currentColor"})],-1),cp=[dp],fp={key:0,class:"flex pb-1 sm:pb-0"},vp={class:"px-4 text-lg text-black dark:text-white"},pp={key:0},mp={key:1},hp=l("span",{class:"hidden xl:inline"}," Showing Results ",-1),gp={key:2},yp={key:1,class:"pl-2"},bp=l("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24"},[l("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),wp=[bp],kp={class:"flex pb-1 sm:pb-0"},_p={key:0,class:"pl-2"},$p=l("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"},[l("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),Cp={class:"mr-1"},xp={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"},Lp=l("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),Vp=[Lp],Sp={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"},Mp=l("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),Ap=[Mp],Tp={key:1},Fp={key:4},Ip={key:0},Dp={key:0,class:"cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50"},Pp={class:"mr-1 select-none"},jp={key:1,class:"flex justify-between items-center"},Op={class:"mr-1 select-none"},sn=25,Bp=ce({__name:"ModalLookup",props:{id:{default:"ModalLookup"},refInfo:{},skip:{default:0},prefs:{},selectedColumns:{},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:{},canFilter:{}},emits:["done"],setup(e,{emit:t}){const d=e,a=t,c=al(),n=At()["config"],{metadataApi:s,filterDefinitions:r}=rt(),u=Ue("client"),p=n.value.storage,f=v(()=>d.toolbarButtonClass??he.toolbarButtonClass),m=v(()=>r.value),g=I({take:sn}),y=I(new Xe),h=I(d.skip),w=I(!1),k=I(),C=e=>"string"==typeof e?e.split(","):e||[];function L(e,t){return he.getTableRowClass("fullWidth",t,!1,!0)}const V=v(()=>at(d.refInfo.model)),S=v(()=>{var e=(0<(e=C(d.selectedColumns)).length?e:[]).map(e=>e.toLowerCase());const l=tt(V.value);return 0l.find(e=>e.name.toLowerCase()===t)).filter(e=>null!=e):l}),U=v(()=>{let e=S.value.map(e=>e.name),t=C(g.value.selectedColumns).map(e=>e.toLowerCase());return 0t.includes(e.toLowerCase())):e}),M=v(()=>g.value.take??sn),A=v(()=>y.value.response?be(y.value.response,"results"):[]),T=v(()=>{var e;return(null==(e=y.value.response)?void 0:e.total)??A.value.length??0}),F=v(()=>00A.value.length>=M.value),B=v(()=>A.value.length>=M.value),$=I([]),q=v(()=>$.value.some(e=>0$.value.map(e=>e.settings.filters.length).reduce((e,t)=>e+t,0)),Q=v(()=>ns(V.value)),Y=v(()=>{var e;return null==(e=s.value)?void 0:e.operations.find(e=>{var t;return(null==(t=e.dataModel)?void 0:t.name)==d.refInfo.model&&Ne.isAnyQuery(e)})}),Z=I(),E=I(!1),z=I(),H=()=>d.id+"/ApiPrefs/"+d.refInfo.model,_=e=>`Column/${d.id}:${d.refInfo.model}.`+e;async function R(e){h.value+=e,h.value<0&&(h.value=0);e=Math.floor(T.value/M.value)*M.value;h.value>e&&(h.value=e),await N()}async function J(e,t){a("done",e)}function W(){a("done",null)}function X(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=$.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(),z.value={column:l,topLeft:{x:Math.max(Math.floor(e.x+25),343),y:Math.floor(115)}})}function ee(){z.value=null}async function le(e){var t=null==(t=z.value)?void 0:t.column;t&&(t.settings=e,p.setItem(_(t.name),JSON.stringify(t.settings)),await N()),z.value=null}async function ne(e){p.setItem(_(e.name),JSON.stringify(e.settings)),await N()}async function se(e){E.value=!1,g.value=e,p.setItem(H(),JSON.stringify(e)),await N()}async function N(){(async function(a){var n=Y.value;if(n){let e=Yt(n,a),t=dn(e=>{y.value.response=y.value.error=void 0,w.value=e}),l=await u.api(e);t(),$t(()=>y.value=l);n=be(l.response,"results")||[];l.succeeded&&n.label}else console.error("No Query API was found for "+d.refInfo.model)})(function(){let a={include:"total",take:M.value},e=C(g.value.selectedColumns||d.selectedColumns);{var t;0{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"{e.settings={filters:[]},p.removeItem(_(e.name))}),await N()}return st(async()=>{var e=d.prefs||$s(p.getItem(H()));e&&(g.value=e),$.value=S.value.map(e=>({name:e.name,type:e.type,meta:e,settings:Object.assign({filters:[]},$s(p.getItem(_(e.name))))})),isNaN(d.skip)||(h.value=d.skip),await N()}),(a,e)=>{const t=G("ErrorSummary"),n=G("Loading"),s=G("SettingsIcons"),r=G("DataGrid"),u=G("ModalDialog");return o(),i(Ie,null,[a.refInfo?(o(),ae(u,{key:0,ref_key:"modalDialog",ref:Z,id:a.id,onDone:W},{default:Ce(()=>[l("div",Qv,[l("div",Kv,[l("h3",Zv,[ke(" Select "),l("span",Wv,P(te(ze)(a.refInfo.model)),1)]),l("div",Gv,[a.showPreferences?(o(),i("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:a.refInfo.model+" Preferences",onClick:e[0]||(e[0]=e=>E.value=!E.value)},Yv,8,Jv)):x("",!0),a.showPagingNav?(o(),i("button",{key:1,type:"button",class:b(["pl-2",F.value?"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:!F.value,onClick:e[1]||(e[1]=e=>R(-T.value))},sp,10,ep)):x("",!0),a.showPagingNav?(o(),i("button",{key:2,type:"button",class:b(["pl-2",D.value?"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:!D.value,onClick:e[2]||(e[2]=e=>R(-M.value))},op,10,lp)):x("",!0),a.showPagingNav?(o(),i("button",{key:3,type:"button",class:b(["pl-2",j.value?"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:!j.value,onClick:e[3]||(e[3]=e=>R(M.value))},ip,10,ap)):x("",!0),a.showPagingNav?(o(),i("button",{key:4,type:"button",class:b(["pl-2",B.value?"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:!B.value,onClick:e[4]||(e[4]=e=>R(T.value))},cp,10,up)):x("",!0)]),a.showPagingInfo?(o(),i("div",fp,[l("div",vp,[w.value?(o(),i("span",pp,"Querying...")):x("",!0),A.value.length?(o(),i("span",mp,[hp,ke(" "+P(h.value+1)+" - "+P(Math.min(h.value+A.value.length,T.value))+" ",1),l("span",null," of "+P(T.value),1)])):y.value.completed?(o(),i("span",gp,"No Results")):x("",!0)])])):x("",!0),q.value&&a.showResetPreferences?(o(),i("div",yp,[l("button",{type:"button",onClick:oe,title:"Reset Preferences & Filters",class:b(f.value)},wp,2)])):x("",!0),l("div",kp,[a.showFiltersView&&0k.value="filters"==k.value?null:"filters"),class:b(f.value),"aria-expanded":"false"},[$p,l("span",Cp,P(O.value)+" "+P(1==O.value?"Filter":"Filters"),1),"filters"!=k.value?(o(),i("svg",xp,Vp)):(o(),i("svg",Sp,Ap))],2)])):x("",!0)])]),"filters"==k.value?(o(),ae(Il,{key:0,class:"border-y border-gray-200 dark:border-gray-800 py-8 my-2",definitions:m.value,columns:$.value,onDone:e[6]||(e[6]=e=>k.value=null),onChange:ne},null,8,["definitions","columns"])):x("",!0),z.value?(o(),i("div",Tp,[xe(Fl,{definitions:m.value,column:z.value.column,"top-left":z.value.topLeft,onDone:ee,onSave:le},null,8,["definitions","column","top-left"])])):x("",!0),y.value.error?(o(),ae(t,{key:2,status:y.value.error},null,8,["status"])):w.value?(o(),ae(n,{key:3})):(o(),i("div",Fp,[A.value.length?(o(),i("div",Ip,[xe(r,{id:a.id,items:A.value,type:a.refInfo.model,"selected-columns":U.value,onFiltersChanged:N,tableStyle:"fullWidth",rowClass:L,onRowSelected:J,onHeaderSelected:X},rl({header:Ce(({column:t,label:e})=>{return[!a.allowFiltering||d.canFilter&&!d.canFilter(t)?(o(),i("div",jp,[l("span",Op,P(e),1)])):(o(),i("div",Dp,[l("span",Pp,P(e),1),xe(s,{column:$.value.find(e=>e.name.toLowerCase()===t.toLowerCase()),"is-open":(null==(e=z.value)?void 0:e.column.name)===t},null,8,["column","is-open"])]))]}),_:2},[De(Object.keys(te(c)),t=>({name:t,fn:Ce(e=>[K(a.$slots,t,Ot(ks(e)))])}))]),1032,["id","items","type","selected-columns"])])):x("",!0)]))])]),_:3},8,["id"])):x("",!0),E.value?(o(),ae(Dl,{key:1,columns:S.value,prefs:g.value,onDone:e[7]||(e[7]=e=>E.value=!1),onSave:se},null,8,["columns","prefs"])):x("",!0)],64)}}}),Rp={class:"sm:hidden"},Ep=["for"],Hp=["id","name"],zp=["value"],Np={class:"hidden sm:block"},Up={class:"border-b border-gray-200"},qp={class:"-mb-px flex","aria-label":"Tabs"},Qp=["onClick"],Kp=ce({__name:"Tabs",props:{tabs:{},id:{default:"tabs"},param:{default:"tab"},label:{type:Function,default:e=>ze(e)},selected:{},tabClass:{},bodyClass:{default:"p-4"},url:{type:Boolean,default:!0},clearQuery:{type:Boolean,default:!1}},setup(e){const t=e,n=v(()=>Object.keys(t.tabs)),s=e=>t.label?t.label(e):ze(e),r=v(()=>t.id||"tabs"),a=v(()=>t.param||"tab"),u=I();function d(e){u.value=e,t.url&&ul({tab:e===n.value[0]?void 0:e},t.clearQuery)}const c=v(()=>100/Object.keys(t.tabs).length+"%");return st(()=>{var e;u.value=t.selected||Object.keys(t.tabs)[0],t.url&&(e=location.search||(location.hash.includes("?")?"?"+ms(location.hash,"?"):""),e=Zs(e)[a.value])&&(u.value=e)}),(a,e)=>(o(),i("div",null,[l("div",Rp,[l("label",{for:r.value,class:"sr-only"},"Select a tab",8,Ep),l("select",{id:r.value,name:r.value,class:"block w-full rounded-md border-gray-300 focus:border-indigo-500 focus:ring-indigo-500",onChange:e[0]||(e[0]=e=>{return d(null==(e=e.target)?void 0:e.value)})},[(o(!0),i(Ie,null,De(n.value,e=>(o(),i("option",{key:e,value:e},P(s(e)),9,zp))),128))],40,Hp)]),l("div",Np,[l("div",Up,[l("nav",qp,[(o(!0),i(Ie,null,De(n.value,t=>{return o(),i("a",{href:"#",onClick:qe(e=>d(t),["prevent"]),style:nl({width:c.value}),class:b([(e=t,u.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"),a.tabClass])},P(s(t)),15,Qp);var e}),256))])])]),l("div",{class:b(a.bodyClass)},[(o(),ae(on(a.tabs[u.value])))],2)]))}}),Zp=l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 text-gray-400",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 32 32"},[l("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),Wp=[Zp],Gp=l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 text-indigo-600",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 32 32"},[l("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),Jp=[Gp],Xp=ce({__name:"DarkModeToggle",setup(e){const a=typeof document<"u"?document.documentElement:null,n=()=>!(null==a||!a.classList.contains("dark")),s=I("dark"==localStorage.getItem("color-scheme"));return(e,t)=>(o(),i("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=>{n()?null!=a&&a.classList.remove("dark"):null!=a&&a.classList.add("dark"),s.value=n(),localStorage.setItem("color-scheme",s.value?"dark":"light")})},[l("span",{class:b(`${s.value?"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`)},[l("span",{class:b(`${s.value?"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"},Wp,2),l("span",{class:b(`${s.value?"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"},Jp,2)],2)]))}}),Yp={key:0},e1={key:1,class:"min-h-full flex flex-col justify-center py-12 sm:px-6 lg:px-8"},t1={class:"sm:mx-auto sm:w-full sm:max-w-md"},s1={class:"mt-6 text-center text-3xl font-extrabold text-gray-900"},l1={key:0,class:"mt-4 text-center text-sm text-gray-600"},n1={class:"relative z-0 inline-flex shadow-sm rounded-md"},o1=["onClick"],a1={class:"mt-8 sm:mx-auto sm:w-full sm:max-w-md"},r1={class:"bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10"},i1={class:"mt-8"},u1={key:1,class:"mt-6"},d1=xs('
Or continue with
',1),c1={class:"mt-6 grid grid-cols-3 gap-3"},f1=["href","title"],v1={key:1,class:"h-5 w-5 text-gray-700",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},p1=l("path",{d:"M16 8a5 5 0 1 0 5 5a5 5 0 0 0-5-5z",fill:"currentColor"},null,-1),m1=l("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),h1=[p1,m1],g1=ce({__name:"SignIn",props:{provider:{},title:{default:"Sign In"},tabs:{type:[Boolean,String],default:!0},oauth:{type:[Boolean,String],default:!0}},emits:["login"],setup(e,{emit:t}){const a=e,n=t,{getMetadata:s,createDto:r}=rt(),u=js(),d=Ue("client"),c=Tl()["signIn"],p=s({assert:!0}),f=p.plugins.auth,m=document.baseURI,g=p.app.baseUrl,y=I(r("Authenticate")),h=I(new Xe),w=I(a.provider),k=(st(()=>{null!=f&&f.authProviders.map(e=>e.formLayout).filter(e=>e).forEach(e=>e.forEach(e=>y.value[e.id]="checkbox"!==e.type&&""))}),v(()=>(null==f?void 0:f.authProviders.filter(e=>e.formLayout))||[])),C=v(()=>k.value[0]||{}),L=v(()=>k.value[Math.max(k.value.length-1,0)]||{}),V=v(()=>(w.value?null==f?void 0:f.authProviders.find(e=>e.name===w.value):null)??C.value),S=e=>!1===e||"false"===e;function M(e){return e.label||e.navItem&&e.navItem.label}const A=v(()=>{var e;return((null==(e=V.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=v(()=>!S(a.oauth)&&(null==f?void 0:f.authProviders.filter(e=>"oauth"===e.type))||[]),F=v(()=>{let e=jo(null==f?void 0:f.authProviders.filter(e=>e.formLayout&&0{e[M(t)||ot(t.name)]=t.name===C.value.name?"":t.name});var t=V.value;return e=t&&S(a.tabs)?{[M(t)||ot(t.name)]:t}:e}),D=v(()=>{var e=A.value.map(e=>e.id).filter(e=>e);return h.value.summaryMessage(e)});async function j(){var e;y.value.provider=V.value.name,"authsecret"===V.value.name?(d.headers.set("authsecret",y.value.authsecret),y.value=r("Authenticate")):"basic"===V.value.name?(d.setCredentials(y.value.UserName,y.value.Password),y.value=r("Authenticate"),y.value.UserName=null,y.value.Password=null):"Bearer"!==V.value.type&&"jwt"!==V.value.name||(d.bearerToken=y.value.BearerToken,y.value=r("Authenticate")),h.value=await u.api(y.value),h.value.succeeded&&(e=h.value.response,c(e),n("login",e),h.value=new Xe,y.value=r("Authenticate"))}return(e,t)=>{const a=G("ErrorSummary"),n=G("AutoFormFields"),s=G("PrimaryButton"),r=G("Icon"),u=wo("href");return te(f)?(o(),i("div",e1,[l("div",t1,[l("h2",s1,P(e.title),1),1Ct((o(),i("a",{onClick:e=>w.value=t,class:b([""===t||t===C.value.name?"rounded-l-md":t===L.value.name?"rounded-r-md -ml-px":"-ml-px",w.value===t?"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"])},[ke(P(e),1)],10,o1)),[[u,{provider:t}]])),256))])])):x("",!0)]),l("div",a1,[D.value?(o(),ae(a,{key:0,class:"mb-3",errorSummary:D.value},null,8,["errorSummary"])):x("",!0),l("div",r1,[A.value.length?(o(),i("form",{key:0,onSubmit:qe(j,["prevent"])},[xe(n,{modelValue:y.value,formLayout:A.value,api:h.value,hideSummary:!0,"divide-class":"","space-class":"space-y-6"},null,8,["modelValue","formLayout","api"]),l("div",i1,[xe(s,{class:"w-full"},{default:Ce(()=>[ke("Sign In")]),_:1})])],32)):x("",!0),T.value.length?(o(),i("div",u1,[d1,l("div",c1,[(o(!0),i(Ie,null,De(T.value,e=>(o(),i("div",null,[l("a",{href:te(g)+e.navItem.href+"?continue="+te(m),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(),ae(r,{key:0,image:e.icon,class:"h-5 w-5 text-gray-700"},null,8,["image"])):(o(),i("svg",v1,h1))],8,f1)]))),256))])])):x("",!0)])])])):(o(),i("div",Yp,"No Auth Plugin"))}}}),y1=["for"],b1={key:1,class:"border border-gray-200 flex justify-between"},w1={class:"p-2 flex flex-wrap gap-x-4"},k1=l("title",null,"Bold text (CTRL+B)",-1),_1=l("path",{fill:"currentColor",d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79c0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79c0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"},null,-1),$1=[k1,_1],C1=l("title",null,"Italics (CTRL+I)",-1),x1=l("path",{fill:"currentColor",d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4h-8z"},null,-1),L1=[C1,x1],V1=l("title",null,"Insert Link (CTRL+K)",-1),S1=l("path",{fill:"currentColor",d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7a5 5 0 0 0-5 5a5 5 0 0 0 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8v2m9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1c0 1.71-1.39 3.1-3.1 3.1h-4V17h4a5 5 0 0 0 5-5a5 5 0 0 0-5-5Z"},null,-1),M1=[V1,S1],A1=l("title",null,"Blockquote (CTRL+Q)",-1),T1=l("path",{fill:"currentColor",d:"m15 17l2-4h-4V6h7v7l-2 4h-3Zm-9 0l2-4H4V6h7v7l-2 4H6Z"},null,-1),F1=[A1,T1],I1=l("title",null,"Insert Image (CTRL+SHIFT+L)",-1),D1=l("path",{fill:"currentColor",d:"M2.992 21A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992ZM20 15V5H4v14L14 9l6 6Zm0 2.828l-6-6L6.828 19H20v-1.172ZM8 11a2 2 0 1 1 0-4a2 2 0 0 1 0 4Z"},null,-1),P1=[I1,D1],j1=l("title",null,"Insert Code (CTRL+<)",-1),O1=l("path",{fill:"currentColor",d:"m8 18l-6-6l6-6l1.425 1.425l-4.6 4.6L9.4 16.6L8 18Zm8 0l-1.425-1.425l4.6-4.6L14.6 7.4L16 6l6 6l-6 6Z"},null,-1),B1=[j1,O1],R1=l("title",null,"H2 Heading (CTRL+H)",-1),E1=l("path",{fill:"currentColor",d:"M7 20V7H2V4h13v3h-5v13H7Zm9 0v-8h-3V9h9v3h-3v8h-3Z"},null,-1),H1=[R1,E1],z1=l("title",null,"Numbered List (ALT+1)",-1),N1=l("path",{fill:"currentColor",d:"M3 22v-1.5h2.5v-.75H4v-1.5h1.5v-.75H3V16h3q.425 0 .713.288T7 17v1q0 .425-.288.713T6 19q.425 0 .713.288T7 20v1q0 .425-.288.713T6 22H3Zm0-7v-2.75q0-.425.288-.713T4 11.25h1.5v-.75H3V9h3q.425 0 .713.288T7 10v1.75q0 .425-.288.713T6 12.75H4.5v.75H7V15H3Zm1.5-7V3.5H3V2h3v6H4.5ZM9 19v-2h12v2H9Zm0-6v-2h12v2H9Zm0-6V5h12v2H9Z"},null,-1),U1=[z1,N1],q1=l("title",null,"Bulleted List (ALT+-)",-1),Q1=l("path",{fill:"currentColor",d:"M9 19v-2h12v2H9Zm0-6v-2h12v2H9Zm0-6V5h12v2H9ZM5 20q-.825 0-1.413-.588T3 18q0-.825.588-1.413T5 16q.825 0 1.413.588T7 18q0 .825-.588 1.413T5 20Zm0-6q-.825 0-1.413-.588T3 12q0-.825.588-1.413T5 10q.825 0 1.413.588T7 12q0 .825-.588 1.413T5 14Zm0-6q-.825 0-1.413-.588T3 6q0-.825.588-1.413T5 4q.825 0 1.413.588T7 6q0 .825-.588 1.413T5 8Z"},null,-1),K1=[q1,Q1],Z1=l("title",null,"Strike Through (ALT+S)",-1),W1=l("path",{fill:"currentColor",d:"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"},null,-1),G1=[Z1,W1],J1=l("title",null,"Undo (CTRL+Z)",-1),X1=l("path",{fill:"currentColor",d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"},null,-1),Y1=[J1,X1],em=l("title",null,"Redo (CTRL+SHIFT+Z)",-1),tm=l("path",{fill:"currentColor",d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"},null,-1),sm=[em,tm],lm={key:0,class:"p-2 flex flex-wrap gap-x-4"},nm=["href"],om=l("path",{fill:"currentColor",d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5c0-2.21-1.79-4-4-4z"},null,-1),am=[om],rm={class:""},im=["name","id","label","value","rows","disabled"],um=["id"],dm=["id"],Je="w-5 h-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400",cm=ce({__name:"MarkdownInput",props:{status:{},id:{},inputClass:{},label:{},labelClass:{},help:{},placeholder:{},modelValue:{},counter:{type:Boolean},rows:{},errorMessages:{},lang:{},autoFocus:{type:Boolean},disabled:{type:Boolean},helpUrl:{default:"https://guides.github.com/features/mastering-markdown/"},hide:{}},emits:["update:modelValue","close"],setup(e,{expose:t,emit:a}){const n=e,s=a;let g=[],y=[],r=Ue("ApiState",void 0);const u=v(()=>pt.call({responseStatus:n.status??(null==r?void 0:r.error.value)},n.id)),d=v(()=>n.label??ze(ot(n.id))),c="bold,italics,link,image,blockquote,code,heading,orderedList,unorderedList,strikethrough,undo,redo,help".split(","),p=v(()=>n.hide?_t(c,n.hide):_t(c,[]));function f(e){return p.value[e]}const m=v(()=>["shadow-sm font-mono"+nt.base.replace("rounded-md",""),u.value?"text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300":"text-gray-900 "+nt.valid,n.inputClass]),h=I();function w(e){s("update:modelValue",e)}function k(){return h.value.selectionStart!==h.value.selectionEnd}function C(){var e=h.value;return e.value.substring(e.selectionStart,e.selectionEnd)||""}function L(){var e=h.value,t=e.value,l=e.selectionStart,e=t.substring(l,e.selectionEnd)||"",a=t.substring(0,l),n=a.lastIndexOf(` -`);return{value:t,sel:e,selPos:l,beforeSel:a,afterSel:t.substring(l),prevCRPos:n,beforeCR:0<=n?a.substring(0,n+1):"",afterCR:0<=n?a.substring(n+1):""}}function V({value:e,selectionStart:t,selectionEnd:l}){null==l&&(l=t),w(e),$t(()=>{h.value.focus(),h.value.setSelectionRange(t,l)})}function S(e,t,l="",{selectionAtEnd:a,offsetStart:n,offsetEnd:s,filterValue:o,filterSelection:r}={}){const i=h.value;let u=i.value,d=i.selectionEnd;g.push({value:u,selectionStart:i.selectionStart,selectionEnd:i.selectionEnd}),y=[];var c=i.selectionStart,v=i.selectionEnd,p=u.substring(0,c),f=u.substring(v),m=e&&p.endsWith(e)&&f.startsWith(t);c==v?(m?(u=p.substring(0,p.length-e.length)+f.substring(t.length),d+=-t.length):(u=p+e+l+t+f,d+=e.length,n=0,s=(null==l?void 0:l.length)||0,a&&(d+=s,s=0)),o&&(l={pos:d},u=o(u,l),d=l.pos)):(a=u.substring(c,v),r&&(a=r(a)),m?(u=p.substring(0,p.length-e.length)+a+f.substring(t.length),n=-a.length-e.length,s=a.length):(u=p+e+a+t+f,n?d+=(e+t).length:(d=c,n=e.length,s=a.length))),w(u),$t(()=>{i.focus(),n=d+(n||0),s=(n||0)+(s||0),i.setSelectionRange(n,s)})}t({props:n,textarea:h,updateModelValue:w,selection:C,hasSelection:k,selectionInfo:L,insert:S,replace:V});const M=()=>S("**","**","bold"),A=()=>S("_","_","italics"),T=()=>S("~~","~~","strikethrough"),F=()=>S("[","](https://)","",{offsetStart:-9,offsetEnd:8}),D=()=>S(` +var ho=Object.defineProperty,go=(e,l,t)=>l in e?ho(e,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[l]=t,Le=(e,l,t)=>(go(e,"symbol"!=typeof l?l+"":l,t),t);import{defineComponent as de,computed as v,openBlock as o,createElementBlock as i,normalizeClass as y,createElementVNode as l,createCommentVNode as x,renderSlot as U,ref as O,toDisplayString as F,inject as Qe,nextTick as St,isRef as nn,unref as X,mergeProps as Te,withModifiers as Ue,h as $t,resolveComponent as Z,createBlock as ae,withCtx as xe,useAttrs as yo,createVNode as ye,createTextVNode as ke,watchEffect as ws,normalizeStyle as nl,Fragment as Me,renderList as je,withDirectives as Mt,vModelCheckbox as ol,withKeys as on,createStaticVNode as xs,vModelSelect as bo,useSlots as al,getCurrentInstance as Be,onMounted as Ye,createSlots as rl,normalizeProps as Rt,guardReactiveProps as ks,vModelDynamic as wo,onUnmounted as Ft,watch as bt,vModelText as ko,resolveDynamicComponent as an,provide as ss,resolveDirective as _o}from"vue";import{errorResponseExcept as $o,toDate as pt,toTime as Co,omit as ft,enc as Ks,appendQueryString as Et,lastLeftPart as rn,setQueryString as xo,nameOf as Lo,ApiResult as Xe,lastRightPart as At,leftPart as Ls,map as Ze,toDateTime as Vo,toCamelCase as So,mapGet as _e,chop as Mo,fromXsdDuration as un,isDate as Vs,timeFmt12 as Ao,dateFmt as To,apiValue as Fo,indexOfAny as Io,createBus as jo,toKebabCase as Wl,sanitize as Oo,humanize as Pe,delaySet as dn,rightPart as ms,queryString as Zs,combinePaths as Do,toPascalCase as at,errorResponse as mt,trimEnd as Po,$1 as _s,ResponseStatus as Us,ResponseError as Gl,HttpMethods as il,omitEmpty as Bo,uniqueKeys as Ws,humanify as cn,each as Ho}from"@servicestack/client";let Ro={class:"flex items-center"},Eo={key:0,class:"flex-shrink-0 mr-3"},zo={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"},No=l("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),Uo=[No],qo={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"},Qo=l("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),Ko=[Qo],Zo={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"},Wo=l("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),Go=[Wo],Jo={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"},Xo=l("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),Yo=[Xo],ea=de({__name:"Alert",props:{type:{default:"warn"},hideIcon:{type:Boolean}},setup(e){let t=e,a=v(()=>"info"==t.type?"bg-blue-50 dark:bg-blue-200":"error"==t.type?"bg-red-50 dark:bg-red-200":"success"==t.type?"bg-green-50 dark:bg-green-200":"bg-yellow-50 dark:bg-yellow-200"),n=v(()=>"info"==t.type?"border-blue-400":"error"==t.type?"border-red-400":"success"==t.type?"border-green-400":"border-yellow-400"),r=v(()=>"info"==t.type?"text-blue-700":"error"==t.type?"text-red-700":"success"==t.type?"text-green-700":"text-yellow-700");return(e,t)=>(o(),i("div",{class:y([a.value,n.value,"border-l-4 p-4"])},[l("div",Ro,[e.hideIcon?x("",!0):(o(),i("div",Eo,["warn"==e.type?(o(),i("svg",zo,Uo)):"error"==e.type?(o(),i("svg",qo,Ko)):"info"==e.type?(o(),i("svg",Zo,Go)):"success"==e.type?(o(),i("svg",Jo,Yo)):x("",!0)])),l("div",null,[l("p",{class:y([r.value,"text-sm"])},[U(e.$slots,"default")],2)])])],2))}}),ta={key:0,class:"rounded-md bg-green-50 dark:bg-green-200 p-4",role:"alert"},sa={class:"flex"},la=l("div",{class:"flex-shrink-0"},[l("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"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})])],-1),na={class:"ml-3"},oa={class:"text-sm font-medium text-green-800"},aa={key:0},ra={class:"ml-auto pl-3"},ia={class:"-mx-1.5 -my-1.5"},ua=l("span",{class:"sr-only"},"Dismiss",-1),da=l("svg",{class:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[l("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),ca=[ua,da],fa=de({__name:"AlertSuccess",props:{message:{}},setup(e){let a=O(!1);return(e,t)=>a.value?x("",!0):(o(),i("div",ta,[l("div",sa,[la,l("div",na,[l("h3",oa,[e.message?(o(),i("span",aa,F(e.message),1)):U(e.$slots,"default",{key:1})])]),l("div",ra,[l("div",ia,[l("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)},ca)])])])]))}}),va={class:"flex"},pa=l("div",{class:"flex-shrink-0"},[l("svg",{class:"h-5 w-5 text-red-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("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),ma={class:"ml-3"},ha={class:"text-sm text-red-700 dark:text-red-200"},ga=de({__name:"ErrorSummary",props:{status:{},except:{},class:{}},setup(e){let t=e,a=Qe("ApiState",void 0),n=v(()=>t.status||null!=a&&a.error.value?$o.call({responseStatus:t.status??(null==a?void 0:a.error.value)},t.except??[]):null);return(e,t)=>n.value?(o(),i("div",{key:0,class:y("bg-red-50 dark:bg-red-900 border-l-4 border-red-400 p-4 "+e.$props.class)},[l("div",va,[pa,l("div",ma,[l("p",ha,F(n.value),1)])])],2)):x("",!0)}}),ya=["id","aria-describedby"],ba=de({__name:"InputDescription",props:{id:{},description:{}},setup(e){return(e,t)=>e.description?(o(),i("div",{key:"description",class:"mt-2 text-sm text-gray-500",id:e.id+"-description","aria-describedby":e.id+"-description"},[l("div",null,F(e.description),1)],8,ya)):x("",!0)}});function Ss(e){var l;return null==e||"object"==typeof e||null==(l=pt(e))||"Invalid Date"==l.toString()?"":l.toISOString().substring(0,10)??""}function fn(e){var l;return null==e||"object"==typeof e||null==(l=pt(e))||"Invalid Date"==l.toString()?"":l.toISOString().substring(0,19)??""}function vn(e){return null==e?"":Co(e)}function pn(e,l){var t,a;return G.config.inputValue?G.config.inputValue(e,l):(t=typeof(a="date"===e?Ss(l):"datetime-local"===e?fn(l):"time"===e?vn(l):l),null==a?"":"boolean"==t||"number"==t?""+a:a)}function mn(e,l){e.value=null,St(()=>e.value=l)}function Dt(t){return Object.keys(t).forEach(e=>{var l=t[e];t[e]=nn(l)?X(l):l}),t}function yt(e,l,t){t?(l.value=e.entering.cls+" "+e.entering.from,setTimeout(()=>l.value=e.entering.cls+" "+e.entering.to,0)):(l.value=e.leaving.cls+" "+e.leaving.from,setTimeout(()=>l.value=e.leaving.cls+" "+e.leaving.to,0))}function hs(t){if(!("u"0":"<"+e+Gs(t)+`>${l||""}`}function Gs(t){return Object.keys(t).reduce((e,l)=>`${e} ${l}="${Ks(t[l])}"`,"")}function Ms(e){return Object.assign({target:"_blank",rel:"noopener",class:"text-blue-600"},e)}function Ht(e){return Vl(e)}let wa=["string","number","boolean","null","undefined"];function Tt(e){return 0<=wa.indexOf(typeof e)||e instanceof Date}function Xt(e){return!Tt(e)}class hn{get length(){return"u"",";"].some(e=>l.includes(e)))throw new Error(`Unsafe script: '${l}'`);var t=Object.assign(Object.keys(globalThis).reduce((e,l)=>(e[l]=void 0,e),{}),e);return new Function("with(this) { return ("+l+") }").call(t)}function Js(e){typeof navigator<"u"&&navigator.clipboard.writeText(e)}function cl(e){var l=G.config.storage.getItem(e);return l?JSON.parse(l):null}function As(e,l){return Et("swr."+Lo(e),l?Object.assign({},e,l):e)}function ka(e){var l;e.request&&(l=As(e.request,e.args),G.config.storage.removeItem(l))}async function gn(e,l,t,a,n){var r,s=As(l,a),o=(t(new Xe({response:cl(s)})),await e.api(l,a,n));return o.succeeded&&o.response&&(o.response._date=(new Date).valueOf(),r=JSON.stringify(o.response),G.config.storage.setItem(s,r),t(o)),o}function yn(l,t){let a=null;return(...e)=>{a&&clearTimeout(a),a=setTimeout(()=>{l(...e)},t||100)}}function Ct(e){return"string"==typeof e?e.split(","):e||[]}function Vt(e,l){let t=Ct(l);return e.reduce((e,l)=>(e[l]=!t.includes(l),e),{})}function bn(){return{LocalStore:hn,dateInputFormat:Ss,dateTimeInputFormat:fn,timeInputFormat:vn,textInputValue:pn,setRef:mn,unRefs:Dt,transition:yt,focusNextElement:hs,getTypeName:qt,htmlTag:dt,htmlAttrs:Gs,linkAttrs:Ms,toAppUrl:Ht,isPrimitive:Tt,isComplexType:Xt,pushState:ul,scopedExpr:dl,copyText:Js,fromCache:cl,swrCacheKey:As,swrClear:ka,swrApi:gn,asStrings:Ct,asOptions:Vt,createDebounce:yn}}let wn="png,jpg,jpeg,jfif,gif,svg,webp".split(","),kn={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(",")},Jl=Object.keys(kn),vt=(e,l)=>``,gs={img:vt("4 4 16 16",""),vid:vt("0 0 24 24",""),aud:vt("0 0 24 24",""),ppt:vt("0 0 48 48",""),xls:vt("0 0 256 256",""),doc:vt("0 0 32 32",""),zip:vt("0 0 16 16",""),exe:vt("0 0 16 16",""),att:vt("0 0 24 24","")},_a=/[\r\n%#()<>?[\\\]^`{|}]/g,Xl=1024,$a=["Bytes","KB","MB","GB","TB"],Ca=(()=>{let l="application/",e=l+"vnd.openxmlformats-officedocument.",t="image/",a="text/",n="video/",r={jpg:t+"jpeg",tif:t+"tiff",svg:t+"svg+xml",ico:t+"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:l+"vnd.ms-access"};function s(e,l){e.split(",").forEach(e=>r[e]=l)}function o(e,l){e.split(",").forEach(e=>r[e]=l(e))}return o("jpeg,gif,png,tiff,bmp,webp",e=>t+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=>l+e),s("htm,html,shtm",a+"html"),s("js,mjs,cjs",a+"javascript"),s("yml,yaml",l+"yaml"),s("bat,cmd",l+"bat"),s("xml,csproj,fsproj,vbproj",a+"xml"),s("txt,ps1",a+"plain"),s("qt,mov",n+"quicktime"),s("doc,dot",l+"msword"),s("xls,xlt,xla",l+"excel"),s("ppt,oit,pps,ppa",l+"vnd.ms-powerpoint"),s("cer,crt,der",l+"x-x509-ca-cert"),s("gz,tgz,zip,rar,lzh,z",l+"x-compressed"),s("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",l+"octet-stream"),r})(),Xs=[];function _n(e){return(e=(e=(e=e.replace(/"/g,"'")).replace(/>\s+<")).replace(/\s{2,}/g," ")).replace(_a,encodeURIComponent)}function fl(e){return"data:image/svg+xml;utf8,"+_n(e)}function $n(e){var l=URL.createObjectURL(e);return Xs.push(l),l}function Cn(){Xs.forEach(e=>{try{URL.revokeObjectURL(e)}catch(e){console.error("URL.revokeObjectURL",e)}}),Xs=[]}function vl(e){var l;return e?(l=Ls(e,"?"),At(l,"/")):null}function ls(e){var l=vl(e);return null==l||-1===l.indexOf(".")?null:At(l,".").toLowerCase()}function pl(e){var l=ls(e.name);return l&&0<=wn.indexOf(l)?$n(e):xt(e.name)}function ml(e){var l;return e&&(!(!e.startsWith("blob:")&&!e.startsWith("data:"))||(l=ls(e))&&0<=wn.indexOf(l))||!1}function xt(e){var l;return e?null==(l=ls(e))||ml(e)?e:Jt(l)||fl(gs.doc):null}function Jt(e){var l=xn(e);return l&&fl(l)||null}function xn(e){if(gs[e])return gs[e];for(let t=0;t({fileName:e.name,contentLength:e.size,filePath:pl(e)}))}function Ts(e,l){e.onerror=null,e.src=gl(e.src,l)||""}function gl(e,l){return Jt(At(e,".").toLowerCase())||(l?Jt(l)||l:null)||Jt("doc")}function Ys(e){var l;if(e)return l=At(e,".").toLowerCase(),Ca[l]||"application/"+l;throw new Error("fileNameOrExt required")}function La(){return{extSvg:xn,extSrc:Jt,getExt:ls,encodeSvg:_n,canPreview:ml,getFileName:vl,getMimeType:Ys,formatBytes:hl,filePathUri:xt,svgToDataUri:fl,fileImageUri:pl,objectUrl:$n,flush:Cn,inputFiles:xa,iconOnError:Ts,iconFallbackSrc:gl}}class Va{constructor(e){Le(this,"view"),Le(this,"includeTypes"),Object.assign(this,e)}getTypeName(){return"MetadataApp"}getMethod(){return"GET"}createResponse(){return{}}}let zt="/metadata/app.json",Sa={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"},Ma={number:"Int32",checkbox:"Boolean",date:"DateTime","datetime-local":"DateTime",time:"TimeSpan"},el={Byte:"byte",Int16:"short",Int32:"int",Int64:"long",UInt16:"ushort",Unt32:"uint",UInt64:"ulong",Single:"float",Double:"double",Decimal:"decimal"},Aa=([...Object.keys(el),...Object.values(el)],{String:"string",Boolean:"bool",...el});function fs(e){return Aa[e]||e}function Ln(e,l){return e?(l=l||[],"Nullable`1"===e?fs(l[0])+"?":e.endsWith("[]")?`List<${fs(e.substring(0,e.length-2))}>`:0===l.length?fs(e):Ls(fs(e),"`")+"<"+l.join(",")+">"):""}function Ta(e){return e&&Ln(e.name,e.genericArgs)}class Nt{constructor(){Le(this,"Query"),Le(this,"QueryInto"),Le(this,"Create"),Le(this,"Update"),Le(this,"Patch"),Le(this,"Delete")}get AnyQuery(){return this.Query||this.QueryInto}get AnyUpdate(){return this.Patch||this.Update}get dataModel(){var e;return null==(e=this.AnyQuery)?void 0:e.dataModel}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){qe.isQueryInto(e)&&!this.QueryInto?this.QueryInto=e:qe.isQuery(e)&&!this.Query?this.Query=e:qe.isCreate(e)&&!this.Create?this.Create=e:qe.isUpdate(e)&&!this.Update?this.Update=e:qe.isPatch(e)&&!this.Patch?this.Patch=e:qe.isDelete(e)&&!this.Delete&&(this.Delete=e)}static from(e){let l=new Nt;return e.forEach(e=>{l.add(e)}),l}static forType(t,e){let l,a=new Nt;var n;return G.config.apisResolver&&t&&(n=G.config.apisResolver(t,e))&&(a.Query=n.Query,a.QueryInto=n.QueryInto,a.Create=n.Create,a.Update=n.Update,a.Patch=n.Patch,a.Delete=n.Delete),t&&(null!=(e=e??(null==(l=G.metadata.value)?void 0:l.api))&&e.operations.forEach(e=>{var l;(null==(l=e.dataModel)?void 0:l.name)==t&&a.add(e)})),a}}let qe={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=>Ze(e.request.inherits,e=>0<=qe.AnyRead.indexOf(e.name)),isQuery:e=>Ze(e.request.inherits,e=>"QueryDb`1"===e.name),isQueryInto:e=>Ze(e.request.inherits,e=>"QueryDb`2"===e.name),isCrud:e=>{var l;return null==(l=e.request.implements)?void 0:l.some(e=>0<=qe.AnyWrite.indexOf(e.name))},isCreate:e=>vs(e,qe.Create),isUpdate:e=>vs(e,qe.Update),isPatch:e=>vs(e,qe.Patch),isDelete:e=>vs(e,qe.Delete),model:e=>{var l;return e?Ze(e.inherits,e=>0<=qe.AnyRead.indexOf(e.name))?null==(l=e.inherits)?void 0:l.genericArgs[0]:null==(l=null==(l=e.implements)?void 0:l.find(e=>0<=qe.AnyWrite.indexOf(e.name)))?void 0:l.genericArgs[0]:null}};function Fa(e){var l;return(null==(l=e.input)?void 0:l.type)||Fs(yl(e))}function Vn(e){return e.endsWith("?")?Mo(e,1):e}function Fs(e){return Sa[Vn(e)]}function Ia(e){return e&&Ma[e]||"String"}function yl(e){return"Nullable`1"===e.type?e.genericArgs[0]:e.type}function tl(e){return e&&"number"==Fs(e)||!1}function Sn(e){return e&&"string"==e.toLowerCase()||!1}function ja(e){return"List`1"==e||e.startsWith("List<")||e.endsWith("[]")}function Mn(e){var l;return!(null==e||!e.type||(l=yl(e),e.isValueType&&-1==l.indexOf("`"))||e.isEnum||null!=Fs(e.type))}function An(e){var l;return!!(null!=e&&e.type&&(l=yl(e),e.isValueType&&-1==l.indexOf("`")||e.isEnum||"hidden"==(null==(l=e.input)?void 0:l.type)||"file"==(null==(l=e.input)?void 0:l.type)||"tag"==(null==(l=e.input)?void 0:l.type)||"combobox"==(null==(l=e.input)?void 0:l.type)||null!=Fs(e.type)))}function Yt(e,l){let t="string"==typeof e?Is(e):e,a=(t||(console.warn("Metadata not found for: "+e),t={request:{name:e}}),function(e){Object.assign(this,e)}),n=(r.prototype.createResponse=function(){return t.returnsVoid?void 0:new a},r.prototype.getTypeName=function(){return t.request.name},r.prototype.getMethod=function(){return t.method||"POST"},r);function r(e){Object.assign(this,e)}return new n(l)}function Oa(e,l,t={}){let a=function(e){Object.assign(this,e)},n=(r.prototype.createResponse=function(){return"function"==typeof t.createResponse?t.createResponse():new a},r.prototype.getTypeName=function(){return e},r.prototype.getMethod=function(){return t.method||"POST"},r);function r(e){Object.assign(this,e)}return new n(l)}function ys(t,e){return t?(Object.keys(t).forEach(e=>{var l=t[e];"string"==typeof l?l.startsWith("/Date")&&(t[e]=Ss(pt(l))):null!=l&&"object"==typeof l&&(Array.isArray(l)?t[e]=Array.from(l):t[e]=Object.assign({},l))}),t):{}}function Da(e,o){let i={};return Array.from(e.elements).forEach(e=>{var r,s=e;if(s.id&&null!=s.value&&""!==s.value){let l=s.id.toLowerCase(),e=o&&o.find(e=>e.name.toLowerCase()==l),t=null==e?void 0:e.type,a=null==(r=null==e?void 0:e.genericArgs)?void 0:r[0],n="checkbox"===s.type?s.checked:s.value;tl(t)?n=Number(n):"List`1"===t&&"string"==typeof n&&(n=n.split(",").map(e=>tl(a)?Number(e):e)),i[s.id]=n}}),i}function bl(e){var l;return(null==(l=null==e?void 0:e.api)?void 0:l.operations)&&0l)?!1:n)){if((t||a)&&(await Yl(t||zt,a),null!=G.metadata.value))return;var r=Qe("client");if(null!=r&&(l=await r.api(new Va)).succeeded&&es(l.response),null!=G.metadata.value)return;await Yl(zt)}return G.metadata.value}function rt(l,t){if(G.config.typeResolver){var e=G.config.typeResolver(l,t);if(e)return e}var a,e=null==(e=G.metadata.value)?void 0:e.api;return e&&l?e.types.find(e=>e.name.toLowerCase()===l.toLowerCase()&&(!t||e.namespace==t))||((a=Is(l))?a.request:(a=e.operations.find(e=>e.response&&e.response.name.toLowerCase()===l.toLowerCase()&&(!t||e.response.namespace==t)))?a.response:null):null}function Is(l){if(G.config.apiResolver){var e=G.config.apiResolver(l);if(e)return e}e=null==(e=G.metadata.value)?void 0:e.api;return e?e.operations.find(e=>e.request.name.toLowerCase()===l.toLowerCase()):null}function Ra({dataModel:e}){var l=null==(l=G.metadata.value)?void 0:l.api;if(!l)return[];let t=l.operations;if(e){let l="string"==typeof e?rt(e):e;t=t.filter(e=>Tn(e.dataModel,l))}return t}function kl(e){return e?rt(e.name,e.namespace):null}function Tn(e,l){return e&&l&&e.name===l.name&&(!e.namespace||!l.namespace||e.namespace===l.namespace)}function Ea(e,l){var t=rt(e);return t&&t.properties&&t.properties.find(e=>e.name.toLowerCase()===l.toLowerCase())}function Fn(e){return In(rt(e))}function In(l){if(l&&l.isEnum&&null!=l.enumNames){var t={};for(let e=0;el.push({key:e,value:t[e]})),l}}function za(e,l){t=e.name,a=(null==l?void 0:l.type)||Fa(e)||"text";var t,a,n=Object.assign({id:t,name:t,type:a},l);return e.isEnum&&(n.type="select",n.allowableEntries=_l(jn(e))),n}function Na(l){let r=[];if(l){let a=st(l),e=Is(l.name),n=kl(null==e?void 0:e.dataModel);a.forEach(l=>{var e;if(An(l)){let t=za(l,l.input);if(t.id=So(t.id),"file"==t.type&&l.uploadTo&&!t.accept&&(e=null==(e=null==(e=G.metadata.value)?void 0:e.plugins.filesUpload)?void 0:e.locations.find(e=>e.name==l.uploadTo))&&!t.accept&&e.allowExtensions&&(t.accept=e.allowExtensions.map(e=>e.startsWith(".")?e:"."+e).join(",")),n&&(e=null==(e=n.properties)?void 0:e.find(e=>e.name==l.name),l.ref||(l.ref=null==e?void 0:e.ref)),t.options)try{let e={input:t,$typeFields:a.map(e=>e.name),$dataModelFields:n?st(n).map(e=>e.name):[],...G.config.scopeWhitelist},l=dl(t.options,e);Object.keys(l).forEach(e=>{t[e]=l[e]})}catch{console.error(`failed to evaluate '${t.options}'`)}r.push(t)}})}return r}function $l(e,l){if(!l.type)return console.error("enumDescriptions missing {type:'EnumType'} options"),[""+e];var t=rt(l.type);if(null==t||!t.enumValues)return console.error("Could not find metadata for "+l.type),[""+e];var a=[];for(let r=0;r"number"==typeof e?$l(e,{type:l}):e}function st(e){if(!e)return[];let l=[],t={};for(;e;)e.properties&&e.properties.forEach(e=>{t[e.name]||(t[e.name]=1,l.push(e))}),e=e.inherits?kl(e.inherits):null;return l.map(e=>e.type.endsWith("[]")?{...e,type:"List`1",genericArgs:[e.type.substring(0,e.type.length-2)]}:e)}function vs(e,l){var t;return(null==(t=e.request.implements)?void 0:t.some(e=>e.name===l))||!1}function ns(e){return e?Dn(e,st(e)):null}function Dn(e,l){var t=l.find(e=>"id"===e.name.toLowerCase());if(t&&t.isPrimaryKey)return t;t=l.find(e=>e.isPrimaryKey)||t;if(!t){var a=qe.model(e);if(a)return Ze(rt(a),e=>ns(e));console.error("Primary Key not found in "+e.name)}return t||null}function Ua(e,l){return Ze(ns(e),e=>_e(l,e.name))}function Pn(e,l,t){return e&&"none"===e.valueType?"":"%In"===t.key||"%Between"===t.key?`(${t.value})`:qa(l,t.value)}function qa(e,l){return!e||tl(e=Vn(e))||"Boolean"===e?l:ja(e)?`[${l}]`:`'${l}'`}function gt(e,l){return{name:e,value:l}}let Qa=[gt("=","%"),gt("!=","%!"),gt(">=",">%"),gt(">","%>"),gt("<=","%<"),gt("<","<%"),gt("In","%In"),gt("Between","%Between"),{name:"Starts With",value:"%StartsWith",types:"string"},{name:"Contains",value:"%Contains",types:"string"},{name:"Ends With",value:"%EndsWith",types:"string"},{name:"Exists",value:"%IsNotNull",valueType:"none"},{name:"Not Exists",value:"%IsNull",valueType:"none"}];function lt(){var e=v(()=>{var e;return(null==(e=G.metadata.value)?void 0:e.app)||null}),l=v(()=>{var e;return(null==(e=G.metadata.value)?void 0:e.api)||null}),t=v(()=>{var e;return(null==(e=null==(e=null==(e=G.metadata.value)?void 0:e.plugins)?void 0:e.autoQuery)?void 0:e.viewerConventions)||Qa});return wl(),{loadMetadata:Ha,getMetadata:Pa,setMetadata:es,clearMetadata:Ba,metadataApp:e,metadataApi:l,filterDefinitions:t,typeOf:rt,typeOfRef:kl,typeEquals:Tn,apiOf:Is,findApis:Ra,typeName:Ta,typeName2:Ln,property:Ea,enumOptions:Fn,propertyOptions:jn,createFormLayout:Na,typeProperties:st,supportsProp:An,Crud:qe,Apis:Nt,getPrimaryKey:ns,getPrimaryKeyByProps:Dn,getId:Ua,createDto:Yt,makeDto:Oa,toFormValues:ys,formValues:Da,isComplexProp:Mn,asKvps:_l,expandEnumFlags:$l,enumFlagsConverter:On}}let et=class et{static async getOrFetchValue(e,l,t,a,n,r,s){return et.getValue(t,s,n)??(await et.fetchLookupIds(e,l,t,a,n,r,[s]),et.getValue(t,s,n))}static getValue(e,l,t){var a=et.Lookup[e];if(a){a=a[l];if(a)return a[t=t.toLowerCase()]}}static setValue(e,l,t,a){var n=et.Lookup[e]??(et.Lookup[e]={});(n[l]??(n[l]={}))[t=t.toLowerCase()]=a}static setRefValue(e,l){var t,a=_e(l,e.refId);return null==a||null==e.refLabel?null:(t=_e(l,e.refLabel),et.setValue(e.model,a,e.refLabel,t),t)}static async fetchLookupIds(e,l,n,r,s,o,i){var u=l.operations.find(e=>{var l;return qe.isAnyQuery(e)&&(null==(l=e.dataModel)?void 0:l.name)==n});if(u){let a=et.Lookup[n]??(et.Lookup[n]={}),t=[];Object.keys(a).forEach(e=>{var l=a[e];_e(l,s)&&t.push(e)});var d,v=i.filter(e=>!t.includes(e));0!=v.length&&(d=o?null:r+","+s,v={[r+"In"]:v.join(",")},d&&(v.fields=d),d=Yt(u,v),(v=await e.api(d,{jsconfig:"edv,eccn"})).succeeded?(_e(v.response,"results")||[]).forEach(e=>{var l,t;_e(e,r)?(l=""+_e(e,r),t=_e(e,s),s=s.toLowerCase(),(a[l]??(a[l]={}))[s]=""+t):console.error(`result[${r}] == null`,e)}):console.error("Failed to call "+u.request.name))}}},Pt=(Le(et,"Lookup",{}),et),sl=()=>(new Date).getTime(),Ka=["/","T",":","-"],ct={assumeUtc:!0,date:{method:"Intl.DateTimeFormat",options:"{dateStyle:'medium'}"},maxFieldLength:150,maxNestedFields:2,maxNestedFieldLength:30},Za=new Intl.RelativeTimeFormat(ct.locale,{}),en=31536e6,qs={year:en,month:en/12,day:864e5,hour:36e5,minute:6e4,second:1e3},Lt={currency:Hn,bytes:Rn,link:En,linkTel:zn,linkMailTo:Nn,icon:Un,iconRounded:qn,attachment:Qn,hidden:Kn,time:Zn,relativeTime:xl,relativeTimeFromMs:js,enumFlags:Gn,formatDate:Qt,formatNumber:Cl};"iconOnError"in globalThis||(globalThis.iconOnError=Ts);class Ke{}function Wa(e){ct=Object.assign({},ct,e)}function Ga(l){Object.keys(l||{}).forEach(e=>{"function"==typeof l[e]&&(Lt[e]=l[e])})}function Bn(){return Lt}function os(e,l){return l?dt("span",e,l):e}function Hn(e,l){var t=ft(l,["currency"]);return os(new Intl.NumberFormat(void 0,{style:"currency",currency:(null==l?void 0:l.currency)||"USD"}).format(e),t)}function Rn(e,l){return os(hl(e),l)}function En(e,l){return dt("a",e,Ms({...l,href:e}))}function zn(e,l){return dt("a",e,Ms({...l,href:"tel:"+e}))}function Nn(e,l){var{subject:t,body:a}=l=l||{},n=ft(l,["subject","body"]),r={};return t&&(r.subject=t),a&&(r.body=a),dt("a",e,Ms({...n,href:"mailto:"+Et(e,r)}))}function Un(e,l){return dt("img",void 0,Object.assign({class:"w-6 h-6",title:e,src:Ht(e),onerror:"iconOnError(this)"},l))}function qn(e,l){return dt("img",void 0,Object.assign({class:"w-8 h-8 rounded-full",title:e,src:Ht(e),onerror:"iconOnError(this)"},l))}function Qn(e,l){var t=vl(e),a=(null==ls(t)||ml(e)?Ht:gl)(e),a=Ht(a),n=l&&(l["icon-class"]||l.iconClass),a=dt("img",void 0,Object.assign({class:"w-6 h-6",src:a,onerror:"iconOnError(this,'att')"},n?{class:n}:null));return dt("a",a+`${t}`,Object.assign({class:"flex",href:Ht(e),title:e},l?ft(l,["icon-class","iconClass"]):null))}function Kn(e){return""}function Zn(e,l){var t="string"==typeof e?new Date(1e3*un(e)):Vs(e)?pt(e):null;return os(t?Ao(t):e,l)}function Qt(e,l){var t,a;return null==e?"":(t="number"==typeof e?new Date(e):"string"==typeof e?pt(e):e,Vs(t)?os(("function"==typeof(a=ct.date?Os(ct.date):null)?a:To)(t),l):(console.warn(t+" is not a Date value"),null==e?"":""+e))}function Cl(e,l){if("number"!=typeof e)return e;let t=ct.number?Os(ct.number):null,a="function"==typeof t?t(e):""+e;return""===a&&(console.warn(`formatNumber(${e}) => `+a,t),a=""+e),os(a,l)}function Wn(l,t,a){var e=Fo(l),n=t?Os(t):null;if("function"!=typeof n)return(null!=e?Vs(e)?Qt(e,a):"number"==typeof e?Cl(e,a):e:null)??"";{let e=a;if(null!=t&&t.options)try{e=dl(t.options,a)}catch(e){console.error(`Could not evaluate '${t.options}'`,e,", with scope:",a)}return n(l,e)}}function ts(e,l,t){return(Tt(e)?Wn:tr)(e,l,t)}function Ja(e){if(null!=e){if("number"==typeof e)return e;if(Vs(e))return e.getTime()-sl();if("string"==typeof e){var l=Number(e);if(!isNaN(l))return l;if("P"===e[0]||e.startsWith("-P"))return 1e3*un(e)*-1;if(0<=Io(e,Ka))return pt(e).getTime()-sl()}}return NaN}function js(e,l){for(var t in qs)if(Math.abs(e)>qs[t]||"second"===t)return(l||Za).format(Math.round(e/qs[t]),t)}function xl(e,l){var t=Ja(e);return isNaN(t)?"":js(t,l)}function Xa(e,l){return js(e.getTime()-(l?l.getTime():sl()))}function Gn(e,l){return $l(e,l).join(", ")}function Os(l){if(l){let{method:e,options:a}=l,n=e+`(${a})`,r=Lt[n]||Lt[e];if("function"==typeof r)return r;let s=l.locale||ct.locale;if(e.startsWith("Intl.")){var t=s?`'${s}'`:"undefined",t=`return new ${e}(${t},${a||"undefined"})`;try{let l=Function(t)();return r="Intl.DateTimeFormat"===e?e=>l.format(pt(e)):"Intl.NumberFormat"===e?e=>l.format(Number(e)):"Intl.RelativeTimeFormat"===e?e=>xl(e,l):e=>l.format(e),Lt[n]=r}catch(e){console.error("Invalid format: "+t,e)}}else{let t=globalThis[e];if("function"==typeof t){let l=null!=a?Function("return "+a)():void 0;return r=e=>t(e,l,s),Lt[n]=r}console.error(`No '${e}' function exists`,Object.keys(Lt))}}return null}function Jn(e,l){return e?e.length>l?e.substring(0,l)+"...":e:""}function Xn(e){return"/Date("===e.substring(0,6)?Qt(pt(e)):e}function Ya(e){return Ll(Ut(e)).replace(/"/g,"")}function Yn(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 Ll(e,l=4){return"object"!=typeof(e=Yn(e))?"string"==typeof e?e:""+e:JSON.stringify(e,void 0,l)}function er(e){return"object"!=typeof(e=Yn(e))?"string"==typeof e?e:""+e:Ll(e=Ut(e=Object.assign({},e)))}function Ut(t){if(null==t)return null;if("string"==typeof t)return Xn(t);if(Tt(t))return t;if(t instanceof Date)return Qt(t);if(Array.isArray(t))return t.map(Ut);if("object"!=typeof t)return t;{let l={};return Object.keys(t).forEach(e=>{"__type"!=e&&(l[e]=Ut(t[e]))}),l}}function tr(e,l,t){let a=e;if(Array.isArray(e)){if(Tt(e[0]))return a.join(",");null!=e[0]&&(a=e[0])}if(null==a)return"";if(a instanceof Date)return Qt(a,t);var n=Object.keys(a),r=[];for(let i=0;i${s}: `+Ks(Jn(Xn(o),ct.maxNestedFieldLength)))}return 2t.value.navigate(l.to??"/");return(e,l)=>(o(),i("a",Te({onClick:Ue(a,["prevent"]),title:e.to,href:"javascript:void(0)"},e.$attrs),[U(e.$slots,"default")],16,sr))}});class nr{constructor(){Le(this,"callbacks",{})}register(e,l){this.callbacks[e]=l}has(e){return!!this.callbacks[e]}invoke(e,l){var t=this.callbacks[e];"function"==typeof t&&t(e,l)}}let tt=class tt{static component(e){var l=tt.components[e];if(l)return l;let t=Wl(e),a=Object.keys(tt.components).find(e=>Wl(e)===t);return a&&tt.components[a]||null}},G=(Le(tt,"config",{redirectSignIn:"/signin",redirectSignOut:"/auth/logout",navigate:e=>location.href=e,assetsPathResolver:e=>e,fallbackPathResolver:e=>e,storage:new hn,tableIcon:{svg:""},scopeWhitelist:{enumFlagsConverter:On,...Bn()}}),Le(tt,"autoQueryGridDefaults",{deny:[],hide:[],toolbarButtonClass:void 0,tableStyle:"stripedRows",take:25,maxFieldLength:150}),Le(tt,"events",jo()),Le(tt,"user",O(null)),Le(tt,"metadata",O(null)),Le(tt,"components",{RouterLink:lr}),Le(tt,"interceptors",new nr),tt);function or(e){G.config=Object.assign(G.config,e)}function ar(e){G.autoQueryGridDefaults=Object.assign(G.autoQueryGridDefaults,e)}function Vl(e){return e&&G.config.assetsPathResolver?G.config.assetsPathResolver(e):e}function rr(e){return e&&G.config.fallbackPathResolver?G.config.fallbackPathResolver(e):e}function ir(e,l){G.interceptors.register(e,l)}function It(){var e=v(()=>G.config),l=v(()=>G.autoQueryGridDefaults);return{config:e,setConfig:or,events:G.events,autoQueryGridDefaults:l,setAutoQueryGridDefaults:ar,assetsPathResolver:Vl,fallbackPathResolver:rr,registerInterceptor:ir}}let eo=de({inheritAttrs:!1,props:{image:Object,svg:String,src:String,alt:String,type:String},setup(n,{attrs:r}){return()=>{let e=n.image;var l,t;n.type&&(t=lt().typeOf,(t=t(n.type))||console.warn(`Type ${n.type} does not exist`),null!=t&&t.icon?e=null==t?void 0:t.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("").indexOf("class="),l=`${(null==e?void 0:e.cls)||""} `+(r.class||""),a=-1==t?`Ts(e.target)})}}}),ur={class:"text-2xl font-semibold text-gray-900 dark:text-gray-300"},dr={class:"flex"},cr=l("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),fr=l("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),vr=[cr,fr],pr=de({__name:"Loading",props:{imageClass:{default:"w-6 h-6"}},setup(e){return(e,t)=>(o(),i("div",ur,[l("div",dr,[(o(),i("svg",{class:y(["self-center inline mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-gray-600 dark:fill-gray-300",e.imageClass]),role:"status",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},vr,2)),l("span",null,[U(e.$slots,"default")])])]))}}),mr=["href","onClick"],hr=["type"],tn="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",gr=de({__name:"OutlineButton",props:{type:{default:"submit"},href:{}},setup(e){return(t,e)=>{var a=Z("router-link");return t.href?(o(),ae(a,{key:0,to:t.href},{default:xe(({navigate:e})=>[l("button",{class:y(tn),href:t.href,onClick:e},[U(t.$slots,"default")],8,mr)]),_:3},8,["to"])):(o(),i("button",Te({key:1,type:t.type,class:tn},t.$attrs),[U(t.$slots,"default")],16,hr))}}}),yr=["href","onClick"],br=["type"],wr=de({__name:"PrimaryButton",props:{type:{default:"submit"},href:{},color:{default:"indigo"}},setup(e){let t=e,a={blue:"focus:ring-indigo-500 bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 disabled:hover:bg-blue-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",purple:"focus:ring-indigo-500 bg-purple-600 hover:bg-purple-700 disabled:bg-purple-400 disabled:hover:bg-purple-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",red:"focus:ring-red-500 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-500 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-500 bg-sky-600 hover:bg-sky-700 disabled:bg-sky-400 disabled:hover:bg-sky-400 dark:bg-sky-600 dark:hover:bg-sky-700 dark:focus:ring-sky-500",cyan:"focus:ring-cyan-500 bg-cyan-600 hover:bg-cyan-700 disabled:bg-cyan-400 disabled:hover:bg-cyan-400 dark:bg-cyan-600 dark:hover:bg-cyan-700 dark:focus:ring-cyan-500",indigo:"focus:ring-indigo-500 bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 disabled:hover:bg-indigo-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},n=v(()=>"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 text-white "+(a[t.color]||a.indigo));return(t,e)=>{var a=Z("router-link");return t.href?(o(),ae(a,{key:0,to:t.href},{default:xe(({navigate:e})=>[l("button",{class:y(n.value),href:t.href,onClick:e},[U(t.$slots,"default")],10,yr)]),_:3},8,["to"])):(o(),i("button",Te({key:1,type:t.type,class:n.value},t.$attrs),[U(t.$slots,"default")],16,br))}}}),kr=["type","href","onClick"],_r=["type"],sn="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",$r=de({__name:"SecondaryButton",props:{type:{},href:{}},setup(e){return(t,e)=>{var a=Z("router-link");return t.href?(o(),ae(a,{key:0,to:t.href},{default:xe(({navigate:e})=>[l("button",{type:t.type??"button",class:y(sn),href:t.href,onClick:e},[U(t.$slots,"default")],8,kr)]),_:3},8,["to"])):(o(),i("button",Te({key:1,type:t.type??"button",class:sn},t.$attrs),[U(t.$slots,"default")],16,_r))}}});function Ge(e,l){return Array.isArray(e)?0<=e.indexOf(l):e==l||e.includes(l)}let Cs={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"},Gt={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"},Bt={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"},ll={modalClass:"relative transform overflow-hidden rounded-lg bg-white dark:bg-black text-left shadow-xl transition-all sm:my-8",sizeClass:"sm:max-w-prose lg:max-w-screen-md xl:max-w-screen-lg 2xl:max-w-screen-xl sm:w-full"},Ee={panelClass(e="slideOver"){return("card"==e?Gt:Bt).panelClass},formClass(e="slideOver"){return("card"==e?Gt:Bt).formClass},headingClass(e="slideOver"){return("card"==e?Gt:Bt).headingClass},subHeadingClass(e="slideOver"){return("card"==e?Gt:Bt).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"},he={getGridClass(e=0){return he.gridClass},getGrid2Class(e="stripedRows"){return Ge(e,"fullWidth")?"overflow-x-auto":he.grid2Class},getGrid3Class(e="stripedRows"){return Ge(e,"fullWidth")?"inline-block min-w-full py-2 align-middle":he.grid3Class},getGrid4Class(e="stripedRows"){return Ge(e,"whiteBackground")?"":Ge(e,"fullWidth")?"overflow-hidden shadow-sm ring-1 ring-black ring-opacity-5":he.grid4Class},getTableClass(e="stripedRows"){return Ge(e,"fullWidth")||Ge(e,"verticalLines")?"min-w-full divide-y divide-gray-300":he.tableClass},getTheadClass(e="stripedRows"){return Ge(e,"whiteBackground")?"":he.theadClass},getTheadRowClass(e="stripedRows"){return he.theadRowClass+(Ge(e,"verticalLines")?" divide-x divide-gray-200 dark:divide-gray-700":"")},getTheadCellClass(e="stripedRows"){return he.theadCellClass+(Ge(e,"uppercaseHeadings")?" uppercase":"")},getTbodyClass(e="stripedRows"){return(Ge(e,"whiteBackground")||Ge(e,"verticalLines")?"divide-y divide-gray-200 dark:divide-gray-800":he.tableClass)+(Ge(e,"verticalLines")?" bg-white":"")},getTableRowClass(e="stripedRows",l,t,a){return(a?"cursor-pointer ":"")+(t?"bg-indigo-100 dark:bg-blue-800":(a?"hover:bg-yellow-50 dark:hover:bg-blue-900 ":"")+(!Ge(e,"stripedRows")||l%2==0?"bg-white dark:bg-black":"bg-gray-50 dark:bg-gray-800"))+(Ge(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"},Cr={colspans:"col-span-3 sm:col-span-3"},fh=Object.freeze(Object.defineProperty({__proto__:null,a:Cs,card:Gt,dummy:Cr,form:Ee,grid:he,input:ot,modal:ll,slideOver:Bt},Symbol.toStringTag,{value:"Module"})),xr=de({__name:"TextLink",props:{color:{default:"blue"}},setup(e){let l=yo(),t=e,a=v(()=>(Cs[t.color]||Cs.blue)+(l.href?"":" cursor-pointer"));return(e,l)=>(o(),i("a",{class:y(a.value)},[U(e.$slots,"default")],2))}}),Lr={class:"flex","aria-label":"Breadcrumb"},Vr={role:"list",class:"flex items-center space-x-4"},Sr=["href","title"],Mr=l("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"},[l("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),Ar={class:"sr-only"},Tr=de({__name:"Breadcrumbs",props:{homeHref:{default:"/"},homeLabel:{default:"Home"}},setup(e){return(e,t)=>(o(),i("nav",Lr,[l("ol",Vr,[l("li",null,[l("div",null,[l("a",{href:e.homeHref,class:"text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400",title:e.homeLabel},[Mr,l("span",Ar,F(e.homeLabel),1)],8,Sr)])]),U(e.$slots,"default")])]))}}),Fr={class:"flex items-center"},Ir=l("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"},[l("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),jr=["href","title"],Or=["title"],Dr=de({__name:"Breadcrumb",props:{href:{},title:{}},setup(e){return(e,t)=>(o(),i("li",null,[l("div",Fr,[Ir,e.href?(o(),i("a",{key:0,href:e.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:e.title},[U(e.$slots,"default")],8,jr)):(o(),i("span",{key:1,class:"ml-4 text-lg font-medium text-gray-700 dark:text-gray-300",title:e.title},[U(e.$slots,"default")],8,Or))])]))}}),Pr={key:0,class:"text-base font-semibold text-gray-500 dark:text-gray-400"},Br={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"},Hr=de({__name:"NavList",props:{title:{}},setup(e){return(e,t)=>(o(),i("div",null,[e.title?(o(),i("h2",Pr,F(e.title),1)):x("",!0),l("ul",Br,[U(e.$slots,"default")])]))}}),Rr={class:"relative flex items-start space-x-4 py-6"},Er={class:"flex-shrink-0"},zr={class:"flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-50 dark:bg-indigo-900"},Nr={class:"min-w-0 flex-1"},Ur={class:"text-base font-medium text-gray-900 dark:text-gray-100"},qr={class:"rounded-sm focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2"},Qr=["href"],Kr=l("span",{class:"absolute inset-0","aria-hidden":"true"},null,-1),Zr={class:"text-base text-gray-500"},Wr=l("div",{class:"flex-shrink-0 self-center"},[l("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"},[l("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),Gr=de({__name:"NavListItem",props:{title:{},href:{},icon:{},iconSvg:{},iconSrc:{},iconAlt:{}},setup(e){return(e,t)=>{var a=Z("Icon");return o(),i("li",Rr,[l("div",Er,[l("span",zr,[ye(a,{class:"w-6 h-6 text-indigo-700 dark:text-indigo-300",image:e.icon,src:e.iconSrc,svg:e.iconSvg,alt:e.iconAlt},null,8,["image","src","svg","alt"])])]),l("div",Nr,[l("h3",Ur,[l("span",qr,[l("a",{href:e.href,class:"focus:outline-none"},[Kr,ke(" "+F(e.title),1)],8,Qr)])]),l("p",Zr,[U(e.$slots,"default")])]),Wr])}}});function to(e){return e&&e.SessionId?Oo(e):e}function Jr(e){G.user.value=to(e),G.events.publish("signIn",e)}function Xr(){G.user.value=null,G.events.publish("signOut",null)}let Sl=e=>(null==e?void 0:e.roles)||[],Ml=e=>(null==e?void 0:e.permissions)||[];function so(e){return 0<=Sl(G.user.value).indexOf(e)}function Yr(e){return 0<=Ml(G.user.value).indexOf(e)}function Al(){return so("Admin")}function bs(e){if(!e)return!1;if(!e.requiresAuth)return!0;var l=G.user.value;if(!l)return!1;if(Al())return!0;let[t,a]=[Sl(l),Ml(l)],[n,r,s,o]=[e.requiredRoles||[],e.requiredPermissions||[],e.requiresAnyRole||[],e.requiresAnyPermission||[]];return!(!n.every(e=>0<=t.indexOf(e))||00<=t.indexOf(e))||!r.every(e=>0<=a.indexOf(e))||00<=a.indexOf(e)))}function ei(e){if(!e||!e.requiresAuth)return null;var l=G.user.value;if(!l)return`${e.request.name} requires Authentication`;if(Al())return null;let[t,a]=[Sl(l),Ml(l)],[n,r,s,o]=[e.requiredRoles||[],e.requiredPermissions||[],e.requiresAnyRole||[],e.requiresAnyPermission||[]],i=n.filter(e=>t.indexOf(e)<0);return 0""+e+"").join(", ")} Role`+(1a.indexOf(e)<0)).length?`Requires ${l.map(e=>""+e+"").join(", ")} Permission`+(10<=t.indexOf(e))?`Requires any ${s.filter(e=>t.indexOf(e)<0).map(e=>""+e+"").join(", ")} Role`+(10<=a.indexOf(e))?`Requires any ${o.filter(e=>a.indexOf(e)<0).map(e=>""+e+"").join(", ")} Permission`+(1G.user.value||null),toAuth:to,isAuthenticated:v(()=>null!=G.user.value),hasRole:so,hasPermission:Yr,isAdmin:Al,canAccess:bs,invalidAccessMessage:ei}}let ti={key:0},si={class:"md:p-4"},lo=de({__name:"EnsureAccess",props:{invalidAccess:{},alertClass:{}},emits:["done"],setup(e){let r=Tl().isAuthenticated,t=It().config,s=()=>{var e=location.href.substring(location.origin.length)||"/",e=Et(t.value.redirectSignIn,{redirect:e});t.value.navigate(e)},u=()=>{var e=location.href.substring(location.origin.length)||"/",e=Et(t.value.redirectSignOut,{ReturnUrl:e});t.value.navigate(e)};return(e,t)=>{var a=Z("Alert"),n=Z("SecondaryButton");return e.invalidAccess?(o(),i("div",ti,[ye(a,{class:y(e.alertClass),innerHTML:e.invalidAccess},null,8,["class","innerHTML"]),l("div",si,[X(r)?(o(),ae(n,{key:1,onClick:u},{default:xe(()=>[ke("Sign Out")]),_:1})):(o(),ae(n,{key:0,onClick:s},{default:xe(()=>[ke("Sign In")]),_:1}))])])):x("",!0)}}}),li={class:"absolute top-0 right-0 bg-white dark:bg-black border dark:border-gray-800 rounded normal-case text-sm shadow w-80"},ni={class:"p-4"},oi=l("h3",{class:"text-base font-medium mb-3 dark:text-gray-100"},"Sort",-1),ai={class:"flex w-full justify-center"},ri=l("svg",{class:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},[l("g",{fill:"currentColor"},[l("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"}),l("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),ii=l("span",null,"ASC",-1),ui=[ri,ii],di=xs('DESC',2),ci=[di],fi=l("h3",{class:"text-base font-medium mt-4 mb-2"}," Filter ",-1),vi={key:0},pi=["id","value"],mi=["for"],hi={key:1},gi={class:"mb-2"},yi={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"},bi=["onClick"],wi=l("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[l("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),ki=[wi],_i={class:"flex"},$i=l("svg",{class:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[l("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),Ci=[$i],xi={class:"bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},Fl=de({__name:"FilterColumn",props:{definitions:{},column:{},topLeft:{}},emits:["done","save"],setup(e,{emit:t}){let u=e,a=t,d=O(),c=O(""),p=O(""),f=O([]),m=v(()=>1==u.column.meta.isEnum),s=v(()=>rt("Nullable`1"===u.column.meta.type?u.column.meta.genericArgs[0]:u.column.meta.type)),g=v(()=>1==u.column.meta.isEnum?_l(Fn(s.value.name)):[]),h=v(()=>{var e;return(null==(e=n(u.column.type))?void 0:e.map(e=>({key:e.value,value:e.name})))||[]}),b=O({filters:[]}),w=v(()=>b.value.filters);function n(e){let l=u.definitions;return l=Sn(e)?l:l.filter(e=>"string"!==e.types)}function k(e,l){return n(e).find(e=>e.value===l)}function C(){var e;c.value&&(e=null==(e=k(u.column.type,c.value))?void 0:e.name)&&(b.value.filters.push({key:c.value,name:e,value:p.value}),c.value=p.value="")}function L(){a("done")}function M(){var e;c.value="%",null!=(e=d.value)&&e.focus()}function V(){var e,l;p.value&&C(),m.value&&(l=Object.values(f.value).filter(e=>e),b.value.filters=0parseInt(e)).reduce((e,l)=>e+l,0).toString()}]:[{key:"%In",name:"In",value:l.join(",")}]:[]),a("save",b.value),a("done")}function S(e){b.value.sort=e===b.value.sort?void 0:e,St(V)}return ws(()=>b.value=Object.assign({},u.column.settings,{filters:Array.from(u.column.settings.filters)})),ws(()=>{let e,l,t,a,n,r=(null==(t=null==(l=null==(e=u.column.settings.filters)?void 0:e[0])?void 0:l.value)?void 0:t.split(","))||[];if(00<(l&parseInt(e))))||[]}f.value=r}),(a,t)=>{var e=Z("SelectInput"),n=Z("TextInput"),r=Z("PrimaryButton"),s=Z("SecondaryButton");return o(),i("div",{class:"fixed z-20 inset-0 overflow-y-auto",onClick:L,onVnodeMounted:M},[l("div",{class:"absolute",style:nl(`top:${a.topLeft.y}px;left:${a.topLeft.x}px`),onClick:t[5]||(t[5]=Ue(()=>{},["stop"]))},[l("div",li,[l("div",ni,[oi,l("div",ai,[l("button",{type:"button",title:"Sort Ascending",onClick:t[0]||(t[0]=e=>S("ASC")),class:y(`${"ASC"===b.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`)},ui,2),l("button",{type:"button",title:"Sort Descending",onClick:t[1]||(t[1]=e=>S("DESC")),class:y(`${"DESC"===b.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`)},ci,2)]),fi,m.value?(o(),i("div",vi,[(o(!0),i(Me,null,je(g.value,e=>(o(),i("div",{key:e.key,class:"flex items-center"},[Mt(l("input",{type:"checkbox",id:e.key,value:e.key,"onUpdate:modelValue":t[2]||(t[2]=e=>f.value=e),class:"h-4 w-4 border-gray-300 rounded text-indigo-600 focus:ring-indigo-500"},null,8,pi),[[ol,f.value]]),l("label",{for:e.key,class:"ml-3"},F(e.value),9,mi)]))),128))])):(o(),i("div",hi,[(o(!0),i(Me,null,je(w.value,(e,t)=>(o(),i("div",gi,[l("span",yi,[ke(F(a.column.name)+" "+F(e.name)+" "+F((e=e,Pn(k(u.column.type,e.key),u.column.type,e)))+" ",1),l("button",{type:"button",onClick:e=>{var l;l=t,b.value.filters.splice(l,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"},ki,8,bi)])]))),256)),l("div",_i,[ye(e,{id:"filterRule",class:"w-32 mr-1",modelValue:c.value,"onUpdate:modelValue":t[3]||(t[3]=e=>c.value=e),entries:h.value,label:"",placeholder:""},null,8,["modelValue","entries"]),"none"!==(null==(e=k(a.column.type,c.value))?void 0:e.valueType)?(o(),ae(n,{key:0,ref_key:"txtFilter",ref:d,id:"filterValue",class:"w-32 mr-1",type:"text",modelValue:p.value,"onUpdate:modelValue":t[4]||(t[4]=e=>p.value=e),onKeyup:on(C,["enter"]),label:"",placeholder:""},null,8,["modelValue"])):x("",!0),l("div",{class:"pt-1"},[l("button",{type:"button",onClick:C,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"},Ci)])])]))]),l("div",xi,[ye(r,{onClick:V,color:"red",class:"ml-2"},{default:xe(()=>[ke(" Save ")]),_:1}),ye(s,{onClick:L},{default:xe(()=>[ke(" Cancel ")]),_:1})])])],4)],512)}}}),Li={class:"px-4 sm:px-6 lg:px-8 text-sm"},Vi={class:"flex flex-wrap"},Si={class:"group pr-4 sm:pr-6 lg:pr-8"},Mi={class:"flex justify-between w-full font-medium"},Ai={class:"w-6 flex justify-end"},Ti={class:"hidden group-hover:inline"},Fi=["onClick","title"],Ii=l("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[l("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),ji=[Ii],Oi={key:0,class:"pt-2"},Di={class:"ml-2"},Pi={key:1},Bi={class:"pt-2"},Hi={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"},Ri=["onClick"],Ei=l("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[l("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),zi=[Ei],Ni=l("span",null,"Clear All",-1),Ui=[Ni],Il=de({__name:"FilterViews",props:{definitions:{},columns:{}},emits:["done","change"],setup(e,{emit:t}){let a=e,r=t,n=v(()=>a.columns.filter(e=>0{let l=a.definitions;return l=Sn(e)?l:l.filter(e=>"string"!==e.types)})(e).find(e=>e.value===l)}function u(){a.columns.forEach(e=>{e.settings.filters=[],r("change",e)}),r("done")}return(e,t)=>(o(),i("div",Li,[l("div",Vi,[(o(!0),i(Me,null,je(n.value,n=>{return o(),i("fieldset",Si,[l("legend",Mi,[l("span",null,F(X(Pe)(n.name)),1),l("span",Ai,[l("span",Ti,[l("button",{onClick:e=>{var l;(l=n).settings.filters=[],r("change",l)},title:`Clear all ${X(Pe)(n.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"},ji,8,Fi)])])]),n.meta.isEnum?(o(),i("div",Oi,[(o(!0),i(Me,null,je((e=n.settings.filters,null==(t=null==(t=null==e?void 0:e[0])?void 0:t.value)?void 0:t.split(",")),e=>(o(),i("div",{key:e,class:"flex items-center"},[l("label",Di,F(e),1)]))),128))])):(o(),i("div",Pi,[(o(!0),i(Me,null,je(n.settings.filters,(e,t)=>{return o(),i("div",Bi,[l("span",Hi,[ke(F(n.name)+" "+F(e.name)+" "+F((e=e,Pn(s((a=n).type,e.value),a.type,e)))+" ",1),l("button",{type:"button",onClick:e=>{var l;(l=n).settings.filters.splice(t,1),r("change",l)},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"},zi,8,Ri)])]);var a}),256))]))]);var e,t}),256))]),l("div",{class:"flex justify-center pt-4"},[l("button",{type:"button",onClick:u,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"},Ui)])]))}}),qi={class:"bg-white dark:bg-black px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Qi={class:""},Ki={class:"mt-3 text-center sm:mt-0 sm:mx-4 sm:text-left"},Zi=l("h3",{class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-100"},"Query Preferences",-1),Wi={class:"mt-4"},Gi=["for"],Ji=["id"],Xi=["value","selected"],Yi={class:"mt-4 flex items-center py-4 border-b border-gray-200 dark:border-gray-800"},eu=["id","checked"],tu=["for"],su={class:"mt-4"},lu={class:"pb-2 px-4"},nu={class:""},ou=["id","value"],au=["for"],ru={class:"bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},jl=de({__name:"QueryPrefs",props:{id:{default:"QueryPrefs"},columns:{},prefs:{},maxLimit:{}},emits:["done","save"],setup(e,{emit:t}){let a=It().autoQueryGridDefaults,s=e,n=t,u=O({}),d=(ws(()=>u.value=Object.assign({take:a.value.take,selectedColumns:[]},s.prefs)),[10,25,50,100,250,500,1e3]);function v(){n("done")}function c(){n("save",u.value)}return(e,t)=>{let a=Z("PrimaryButton"),n=Z("SecondaryButton"),r=Z("ModalDialog");return o(),ae(r,{id:e.id,onDone:v,"size-class":"w-full sm:max-w-prose"},{default:xe(()=>[l("div",qi,[l("div",Qi,[l("div",Ki,[Zi,l("div",Wi,[l("label",{for:e.id+"-take",class:"block text-sm font-medium text-gray-700 dark:text-gray-300"},"Results per page",8,Gi),Mt(l("select",{id:e.id+"-take","onUpdate:modelValue":t[0]||(t[0]=e=>u.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),i(Me,null,je(d.filter(e=>null==s.maxLimit||e<=s.maxLimit),e=>(o(),i("option",{value:e,selected:e===u.value.take},F(e),9,Xi))),256))],8,Ji),[[bo,u.value.take]])]),l("div",Yi,[l("input",{type:"radio",id:e.id+"-allColumns",onClick:t[1]||(t[1]=e=>u.value.selectedColumns=[]),checked:0===u.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,eu),l("label",{class:"ml-3 block text-gray-700 dark:text-gray-300",for:e.id+"-allColumns"},"View all columns",8,tu)]),l("div",su,[l("div",lu,[l("div",nu,[(o(!0),i(Me,null,je(e.columns,e=>(o(),i("div",{key:e.name,class:"flex items-center"},[Mt(l("input",{type:"checkbox",id:e.name,value:e.name,"onUpdate:modelValue":t[2]||(t[2]=e=>u.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,ou),[[ol,u.value.selectedColumns]]),l("label",{for:e.name,class:"ml-3"},F(e.name),9,au)]))),128))])])])])])]),l("div",ru,[ye(a,{onClick:c,color:"red",class:"ml-2"},{default:xe(()=>[ke(" Save ")]),_:1}),ye(n,{onClick:v},{default:xe(()=>[ke(" Cancel ")]),_:1})])]),_:1},8,["id"])}}}),iu={key:0},uu={key:1},du={key:2,class:"pt-1"},cu={key:0},fu={key:1},vu={key:2},pu={key:4},mu={class:"pl-1 pt-1 flex flex-wrap"},hu={class:"flex mt-1"},gu=["title"],yu=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("g",{"stroke-width":"1.5",fill:"none"},[l("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),bu=[yu],wu=["disabled"],ku=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z",fill:"currentColor"})],-1),_u=[ku],$u=["disabled"],Cu=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z",fill:"currentColor"})],-1),xu=[Cu],Lu=["disabled"],Vu=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z",fill:"currentColor"})],-1),Su=[Vu],Mu=["disabled"],Au=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z",fill:"currentColor"})],-1),Tu=[Au],Fu={key:0,class:"flex mt-1"},Iu={class:"px-4 text-lg text-black dark:text-white"},ju={key:0},Ou={key:1},Du=l("span",{class:"hidden xl:inline"}," Showing Results ",-1),Pu={key:2},Bu={class:"flex flex-wrap"},Hu={key:0,class:"pl-2 mt-1"},Ru=l("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("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),Eu=[Ru],zu={key:1,class:"pl-2 mt-1"},Nu=xs('Excel',2),Uu=[Nu],qu={key:2,class:"pl-2 mt-1"},Qu={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"},Ku=l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1),Zu=[Ku],Wu={key:1,class:"w-5 h-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Gu=l("g",{fill:"none"},[l("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"}),l("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),Ju=[Gu],Xu=l("span",{class:"whitespace-nowrap"},"Copy URL",-1),Yu={key:3,class:"pl-2 mt-1"},ed=l("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24"},[l("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),td=[ed],sd={key:4,class:"pl-2 mt-1"},ld=l("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"},[l("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),nd={class:"mr-1"},od={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"},ad=l("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),rd=[ad],id={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"},ud=l("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),dd=[ud],cd={key:5,class:"pl-2 mt-1"},fd=["title"],vd=l("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"},[l("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z",fill:"currentColor"})],-1),pd={class:"whitespace-nowrap"},md={key:8},hd={key:0,class:"cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50"},gd={class:"mr-1 select-none"},yd={key:1,class:"flex justify-between items-center"},bd={class:"mr-1 select-none"},ps=25,wd=de({__name:"AutoQueryGrid",props:{filterDefinitions:{},id:{default:"AutoQueryGrid"},apis:{},type:{},prefs:{},deny:{},hide:{},selectedColumns:{},toolbarButtonClass:{},tableStyle:{},gridClass:{},grid2Class:{},grid3Class:{},grid4Class:{},tableClass:{},theadClass:{},tbodyClass:{},theadRowClass:{},theadCellClass:{},headerTitle:{},headerTitles:{},visibleFrom:{},rowClass:{},rowStyle:{},modelTitle:{},newButtonLabel:{},apiPrefs:{},canFilter:{},disableKeyBindings:{},configureField:{},skip:{default:0},create:{type:Boolean},edit:{},filters:{}},emits:["headerSelected","rowSelected","nav"],setup(e,{expose:d,emit:c}){let{config:p,autoQueryGridDefaults:J}=It(),Y=J,t=p.value.storage,n=e,ee=c,le=Qe("client"),te="filtering,queryString,queryFilters".split(","),ne="copyApiUrl,downloadCsv,filtersView,newItem,pagingInfo,pagingNav,preferences,refresh,resetPreferences,toolbar".split(","),re=v(()=>n.deny?Vt(te,n.deny):Vt(te,Y.value.deny)),se=v(()=>n.hide?Vt(ne,n.hide):Vt(ne,Y.value.hide));function f(e){return re.value[e]}function m(e){return se.value[e]}let g=v(()=>n.tableStyle??Y.value.tableStyle),oe=v(()=>n.gridClass??he.getGridClass(g.value)),ie=v(()=>n.grid2Class??he.getGrid2Class(g.value)),ue=v(()=>n.grid3Class??he.getGrid3Class(g.value)),de=v(()=>n.grid4Class??he.getGrid4Class(g.value)),ve=v(()=>n.tableClass??he.getTableClass(g.value)),ce=v(()=>n.theadClass??he.getTheadClass(g.value)),pe=v(()=>n.theadRowClass??he.getTheadRowClass(g.value)),fe=v(()=>n.theadCellClass??he.getTheadCellClass(g.value)),h=v(()=>n.toolbarButtonClass??he.toolbarButtonClass);function me(e,l){var t,a;return n.rowClass?n.rowClass(e,l):(t=!!Q.value.AnyUpdate,a=(null!=(a=s.value)&&a.name?_e(e,s.value.name):null)==V.value,he.getTableRowClass(n.tableStyle,l,a,t))}let b=al(),ge=v(()=>{var e;return dl((null==(e=Q.value.AnyQuery.viewModel)?void 0:e.name)||Q.value.AnyQuery.dataModel.name)}),be=v(()=>{let l=Object.keys(b).map(e=>e.toLowerCase());return st(ge.value).filter(e=>l.includes(e.name.toLowerCase())||l.includes(e.name.toLowerCase()+"-header")).map(e=>e.name)});let w=v(()=>{var e=(0<(e=Ct(n.selectedColumns)).length?e:0e.toLowerCase());let t=st(ge.value);return 0t.find(e=>e.name.toLowerCase()===l)).filter(e=>null!=e):t}),we=v(()=>{let e=w.value.map(e=>e.name),l=Ct($.value.selectedColumns).map(e=>e.toLowerCase());return 0l.includes(e.toLowerCase())):e}),k=O([]),C=O(new Xe),Ce=O(new Xe),L=O(),M=O(!1),V=O(),S=O(),T=O(!1),A=O(),I=O(n.skip),j=O(!1),$=O({take:ps}),B=O(!1),Le=v(()=>k.value.some(e=>0k.value.map(e=>e.settings.filters.length).reduce((e,l)=>e+l,0)),Ve=v(()=>{var e;return st(dl(a.value||(null==(e=Q.value.AnyQuery)?void 0:e.dataModel.name)))}),s=v(()=>{var e;return ns(dl(a.value||(null==(e=Q.value.AnyQuery)?void 0:e.dataModel.name)))}),E=v(()=>$.value.take??ps),_=v(()=>C.value.response?_e(C.value.response,"results"):[]),D=v(()=>{var e;return((null==(e=C.value.response)?void 0:e.total)||_.value.length)??0}),Fe=v(()=>00_.value.length>=E.value),Oe=v(()=>_.value.length>=E.value),H=O(),P=O(),Ae={NoQuery:"No Query API was found"};function Ie(l){if(l){if(n.canFilter)return n.canFilter(l);var e=Ve.value.find(e=>e.name.toLowerCase()==l.toLowerCase());if(e)return!Mn(e)}}function r(e){ee("nav",e),f("queryString")&&ul(e)}async function R(e){I.value+=e,I.value<0&&(I.value=0);var l=Math.floor(D.value/E.value)*E.value;I.value>l&&(I.value=l),r({skip:I.value||void 0}),await z()}async function $e(e,l){var t,a;S.value=null,V.value=l,e&&l&&(a=Yt(Q.value.AnyQuery,{[e]:l}),(a=await le.api(a)).succeeded)&&((a=null==(a=_e(a.response,"results"))?void 0:a[0])||console.warn(`API ${null==(t=Q.value.AnyQuery)?void 0:t.request.name}(${e}:${l}) returned no results`),S.value=a)}async function Ue(e,l){ee("rowSelected",e,l);var t=null==(t=s.value)?void 0:t.name,a=t?_e(e,t):null;t&&a&&(r({edit:a}),$e(t,a))}function Ee(l,e){var t,a,n;f("filtering")&&(t=e.target,Ie(l)&&"TD"!==(null==t?void 0:t.tagName)&&(t=null==(t=null==t?void 0:t.closest("TABLE"))?void 0:t.getBoundingClientRect(),a=k.value.find(e=>e.name.toLowerCase()==l.toLowerCase()))&&t&&(n=t.x+318+10,A.value={column:a,topLeft:{x:Math.max(Math.floor(e.clientX+159),n),y:t.y+45}}),ee("headerSelected",l,e))}function De(){A.value=null}async function He(e){var l=null==(l=A.value)?void 0:l.column;l&&(l.settings=e,t.setItem(u(l.name),JSON.stringify(l.settings)),await z()),A.value=null}async function Pe(e){t.setItem(u(e.name),JSON.stringify(e.settings)),await z()}async function Re(e){T.value=!1,$.value=e,t.setItem(ol(),JSON.stringify(e)),await z()}function ze(e){var l;H.value&&(Object.assign(null==(l=H.value)?void 0:l.model,e),Ze())}function Ne(e){Object.assign(S.value,e),Ze()}function Ze(){null!=(e=H.value)&&e.forceUpdate(),null!=(e=P.value)&&e.forceUpdate();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}async function z(){await Ke(We())}async function Ge(){await z()}d({update:z,search:Ke,createRequestArgs:We,reset:Ll,createDone:W,createSave:Cl,editDone:K,editSave:kl,forceUpdate:Ze,setEdit:Ne,edit:S,createForm:H,editForm:P,apiPrefs:$,results:_,skip:I,take:E,total:D}),G.interceptors.has("AutoQueryGrid.new")&&G.interceptors.invoke("AutoQueryGrid.new",{props:n});let qe=/iPad|iPhone|iPod/.test(navigator.userAgent);async function Ke(t){var a=Q.value.AnyQuery;if(a){let e=Yt(a,t),l=await le.api(e);dn(e=>{C.value.response=C.value.error=void 0,B.value=e,qe?St(()=>C.value=l):C.value=l})();a=_e(l.response,"results")||[];l.succeeded&&a.label}else console.error(Ae.NoQuery)}function We(){let r={include:"total",take:E.value},l=Ct($.value.selectedColumns||n.selectedColumns);if(0{var e,l=a.find(e=>e.name.toLowerCase()==t.toLowerCase());null!=(e=null==l?void 0:l.ref)&&e.selfId&&n.push(l.ref.selfId),_e(b,t)&&n.push(...a.filter(e=>{var l;return(null==(l=null==(l=e.ref)?void 0:l.selfId)?void 0:l.toLowerCase())==t.toLowerCase()}).map(e=>e.name))}),n.forEach(e=>{l.includes(e)||l.push(e)}),r.fields=l.join(",")}let e=[];if(k.value.forEach(t=>{t.settings.sort&&e.push(("DESC"===t.settings.sort?"-":"")+t.name),t.settings.filters.forEach(e=>{var l=e.key.replace("%",t.name);r[l]=e.value})}),n.filters&&Object.keys(n.filters).forEach(e=>{r[e]=n.filters[e]}),f("queryString")&&f("queryFilters")){var t=location.search||(location.hash.includes("?")?"?"+ms(location.hash,"?"):"");let e=Zs(t);Object.keys(e).forEach(l=>{w.value.find(e=>e.name.toLowerCase()===l.toLowerCase())&&(r[l]=e[l])}),typeof e.skip<"u"&&(t=parseInt(e.skip),isNaN(t)||(I.value=r.skip=t))}return"u"j.value=!1,3e3)}function ll(e="json"){var l=We(),t="/api/"+(null==(t=Q.value.AnyQuery)?void 0:t.request.name),t=Do(le.baseUrl,Et(t,{...l,jsconfig:"edv"}));return 0<=t.indexOf("?")?Ls(t,"?")+"."+e+"?"+ms(t,"?"):t+".json"}async function tl(){k.value.forEach(e=>{e.settings={filters:[]},t.removeItem(u(e.name))}),$.value={take:ps},t.removeItem(ol()),await z()}function nl(){M.value=!0,r({create:null})}let a=v(()=>qt(n.type)),N=v(()=>{var e;return a.value||(null==(e=Q.value.AnyQuery)?void 0:e.dataModel.name)}),q=v(()=>n.modelTitle||N.value),sl=v(()=>n.newButtonLabel||"New "+q.value),ol=()=>{var e;return n.id+"/ApiPrefs/"+(a.value||(null==(e=Q.value.AnyQuery)?void 0:e.dataModel.name))},u=e=>{var l;return`Column/${n.id}:${a.value||(null==(l=Q.value.AnyQuery)?void 0:l.dataModel.name)}.`+e},{metadataApi:il,typeOf:dl,apiOf:vl,filterDefinitions:cl}=lt(),pl=Tl().invalidAccessMessage,fl=v(()=>n.filterDefinitions||cl.value),Q=v(()=>{var e=Ct(n.apis);return 0vl(e)).filter(e=>null!=e).map(e=>e)):Nt.forType(a.value,il.value)}),ml=e=>`${e}`,gl=v(()=>{var e;return il.value?0<(e=Ct(n.apis).map(e=>null==vl(e)?e:null).filter(e=>null!=e)).length?ml(`Unknown API${1useMetadata()`)}),yl=v(()=>Q.value.AnyQuery&&pl(Q.value.AnyQuery)),hl=v(()=>Q.value.Create&&pl(Q.value.Create)),bl=v(()=>Q.value.AnyUpdate&&pl(Q.value.AnyUpdate)),xl=v(()=>bs(Q.value.Create)),wl=(v(()=>bs(Q.value.AnyUpdate)),v(()=>bs(Q.value.Delete)));function K(){S.value=null,V.value=null,r({edit:void 0})}function W(){M.value=!1,r({create:void 0})}async function kl(){await z(),K()}async function Cl(){await z(),W()}function Ll(){C.value=new Xe,Ce.value=new Xe,M.value=!1,V.value=null,S.value=null,T.value=!1,A.value=null,I.value=n.skip,j.value=!1,$.value={take:ps},B.value=!1;var e,l=n.prefs||$s(t.getItem(ol())),l=(l&&($.value=l),k.value=w.value.map(e=>({name:e.name,type:e.type,meta:e,settings:Object.assign({filters:[]},$s(t.getItem(u(e.name))))})),isNaN(n.skip)||(I.value=n.skip),null==(l=s.value)?void 0:l.name);f("queryString")&&(e=location.search||(location.hash.includes("?")?"?"+ms(location.hash,"?"):""),typeof(e=Zs(e)).create<"u"?M.value=typeof e.create<"u":!l||"string"!=typeof e.edit&&"number"!=typeof e.edit||$e(l,e.edit)),!0===n.create&&(M.value=!0),l&&null!=n.edit&&$e(l,n.edit)}return Ye(async()=>{Ll(),await z()}),(t,e)=>{let a=Z("Alert"),n=Z("EnsureAccessDialog"),r=Z("AutoCreateForm"),s=Z("AutoEditForm"),u=Z("AutoViewForm"),d=Z("ErrorSummary"),v=Z("Loading"),c=Z("SettingsIcons"),p=Z("DataGrid");return gl.value?(o(),i("div",iu,[ye(a,{innerHTML:gl.value},null,8,["innerHTML"])])):yl.value?(o(),i("div",uu,[ye(lo,{"invalid-access":yl.value},null,8,["invalid-access"])])):(o(),i("div",du,[M.value&&Q.value.Create?(o(),i("div",cu,[hl.value?(o(),ae(n,{key:0,title:"Create "+q.value,"invalid-access":hl.value,"alert-class":"text-yellow-700",onDone:W},null,8,["title","invalid-access"])):X(b).createform?U(t.$slots,"createform",{key:1,type:Q.value.Create.request.name,configure:t.configureField,done:W,save:Cl}):(o(),ae(r,{key:2,ref_key:"createForm",ref:H,type:Q.value.Create.request.name,configure:t.configureField,onDone:W,onSave:Cl},{header:xe(()=>[U(t.$slots,"formheader",{form:"create",formInstance:H.value,apis:Q.value,type:N.value,updateModel:ze})]),footer:xe(()=>[U(t.$slots,"formfooter",{form:"create",formInstance:H.value,apis:Q.value,type:N.value,updateModel:ze})]),_:3},8,["type","configure"]))])):S.value&&Q.value.AnyUpdate?(o(),i("div",fu,[bl.value?(o(),ae(n,{key:0,title:"Update "+q.value,"invalid-access":bl.value,"alert-class":"text-yellow-700",onDone:K},null,8,["title","invalid-access"])):X(b).editform?U(t.$slots,"editform",{key:1,model:S.value,type:Q.value.AnyUpdate.request.name,deleteType:wl.value?Q.value.Delete.request.name:null,configure:t.configureField,done:K,save:kl}):(o(),ae(s,{key:2,ref_key:"editForm",ref:P,modelValue:S.value,"onUpdate:modelValue":e[0]||(e[0]=e=>S.value=e),type:Q.value.AnyUpdate.request.name,deleteType:wl.value?Q.value.Delete.request.name:null,configure:t.configureField,onDone:K,onSave:kl,onDelete:kl},{header:xe(()=>[U(t.$slots,"formheader",{form:"edit",formInstance:P.value,apis:Q.value,type:N.value,model:S.value,id:V.value,updateModel:Ne})]),footer:xe(()=>[U(t.$slots,"formfooter",{form:"edit",formInstance:P.value,apis:Q.value,type:N.value,model:S.value,id:V.value,updateModel:Ne})]),_:3},8,["modelValue","type","deleteType","configure"]))])):S.value?(o(),i("div",vu,[X(b).viewform?U(t.$slots,"viewform",{key:0,model:S.value,apis:Q.value,done:K}):(o(),ae(u,{key:1,model:S.value,apis:Q.value,done:K},null,8,["model","apis"]))])):x("",!0),X(b).toolbar?U(t.$slots,"toolbar",{key:3}):m("toolbar")?(o(),i("div",pu,[T.value?(o(),ae(jl,{key:0,columns:w.value,prefs:$.value,onDone:e[1]||(e[1]=e=>T.value=!1),onSave:Re},null,8,["columns","prefs"])):x("",!0),l("div",mu,[l("div",hu,[m("preferences")?(o(),i("button",{key:0,type:"button",class:"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400",title:q.value+" Preferences",onClick:e[2]||(e[2]=e=>T.value=!T.value)},bu,8,gu)):x("",!0),m("pagingNav")?(o(),i("button",{key:1,type:"button",class:y(["pl-2",Fe.value?"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:!Fe.value,onClick:e[3]||(e[3]=e=>R(-D.value))},_u,10,wu)):x("",!0),m("pagingNav")?(o(),i("button",{key:2,type:"button",class:y(["pl-2",Se.value?"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:!Se.value,onClick:e[4]||(e[4]=e=>R(-E.value))},xu,10,$u)):x("",!0),m("pagingNav")?(o(),i("button",{key:3,type:"button",class:y(["pl-2",Te.value?"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:!Te.value,onClick:e[5]||(e[5]=e=>R(E.value))},Su,10,Lu)):x("",!0),m("pagingNav")?(o(),i("button",{key:4,type:"button",class:y(["pl-2",Oe.value?"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:!Oe.value,onClick:e[6]||(e[6]=e=>R(D.value))},Tu,10,Mu)):x("",!0)]),m("pagingInfo")?(o(),i("div",Fu,[l("div",Iu,[B.value?(o(),i("span",ju,"Querying...")):x("",!0),_.value.length?(o(),i("span",Ou,[Du,ke(" "+F(I.value+1)+" - "+F(Math.min(I.value+_.value.length,D.value))+" ",1),l("span",null," of "+F(D.value),1)])):C.value.completed?(o(),i("span",Pu,"No Results")):x("",!0)])])):x("",!0),l("div",Bu,[m("refresh")?(o(),i("div",Hu,[l("button",{type:"button",onClick:Ge,title:"Refresh",class:y(h.value)},Eu,2)])):x("",!0),m("downloadCsv")?(o(),i("div",zu,[l("button",{type:"button",onClick:Je,title:"Download CSV",class:y(h.value)},Uu,2)])):x("",!0),m("copyApiUrl")?(o(),i("div",qu,[l("button",{type:"button",onClick:el,title:"Copy API URL",class:y(h.value)},[j.value?(o(),i("svg",Qu,Zu)):(o(),i("svg",Wu,Ju)),Xu],2)])):x("",!0),Le.value&&m("resetPreferences")?(o(),i("div",Yu,[l("button",{type:"button",onClick:tl,title:"Reset Preferences & Filters",class:y(h.value)},td,2)])):x("",!0),m("filtersView")&&0L.value="filters"==L.value?null:"filters"),class:y(h.value),"aria-expanded":"false"},[ld,l("span",nd,F(Me.value)+" "+F(1==Me.value?"Filter":"Filters"),1),"filters"!=L.value?(o(),i("svg",od,rd)):(o(),i("svg",id,dd))],2)])):x("",!0),m("newItem")&&Q.value.Create&&xl.value?(o(),i("div",cd,[l("button",{type:"button",onClick:nl,title:q.value,class:y(h.value)},[vd,l("span",pd,F(sl.value),1)],10,fd)])):x("",!0),X(b).toolbarbuttons?U(t.$slots,"toolbarbuttons",{key:6,toolbarButtonClass:h.value}):x("",!0)])])])):x("",!0),"filters"==L.value?(o(),ae(Il,{key:5,class:"border-y border-gray-200 dark:border-gray-800 py-8 my-2",definitions:fl.value,columns:k.value,onDone:e[8]||(e[8]=e=>L.value=null),onChange:Pe},null,8,["definitions","columns"])):x("",!0),Ce.value.error??C.value.error?(o(),ae(d,{key:6,status:Ce.value.error??C.value.error},null,8,["status"])):B.value?(o(),ae(v,{key:7,class:"p-2"})):x("",!0),A.value?(o(),i("div",md,[ye(Fl,{definitions:fl.value,column:A.value.column,"top-left":A.value.topLeft,onDone:De,onSave:He},null,8,["definitions","column","top-left"])])):x("",!0),_.value.length?(o(),ae(p,{key:9,id:t.id,items:_.value,type:t.type,"selected-columns":we.value,class:"mt-1",onFiltersChanged:z,tableStyle:g.value,gridClass:oe.value,grid2Class:ie.value,grid3Class:ue.value,grid4Class:de.value,tableClass:ve.value,theadClass:ce.value,theadRowClass:pe.value,theadCellClass:fe.value,tbodyClass:t.tbodyClass,rowClass:me,onRowSelected:Ue,rowStyle:t.rowStyle,headerTitle:t.headerTitle,headerTitles:t.headerTitles,visibleFrom:t.visibleFrom,onHeaderSelected:Ee},rl({header:xe(({column:t,label:e})=>{var a;return[f("filtering")&&Ie(t)?(o(),i("div",hd,[l("span",gd,F(e),1),ye(c,{column:k.value.find(e=>e.name.toLowerCase()===t.toLowerCase()),"is-open":(null==(a=A.value)?void 0:a.column.name)===t},null,8,["column","is-open"])])):(o(),i("div",yd,[l("span",bd,F(e),1)]))]}),_:2},[je(Object.keys(X(b)),l=>({name:l,fn:xe(e=>[U(t.$slots,l,Rt(ks(e)))])}))]),1032,["id","items","type","selected-columns","tableStyle","gridClass","grid2Class","grid3Class","grid4Class","tableClass","theadClass","theadRowClass","theadCellClass","tbodyClass","rowStyle","headerTitle","headerTitles","visibleFrom"])):x("",!0)]))}}}),kd={class:"flex"},_d={key:0,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},$d=l("g",{fill:"none"},[l("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),Cd=[$d],xd=l("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),Ld=l("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),Vd=[xd,Ld],Sd={key:2,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Md=l("g",{fill:"none"},[l("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),Ad=[Md],Td={key:3,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Fd=l("g",{fill:"none"},[l("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),Id=[Fd],jd=de({__name:"SettingsIcons",props:{column:{},isOpen:{type:Boolean}},setup(e){return(e,l)=>{var t;return o(),i("div",kd,[null!=(t=null==(t=null==(t=e.column)?void 0:t.settings)?void 0:t.filters)&&t.length?(o(),i("svg",_d,Cd)):(o(),i("svg",{key:1,class:y(["w-4 h-4 transition-transform",e.isOpen?"rotate-180":""]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Vd,2)),"ASC"===(null==(t=null==(t=e.column)?void 0:t.settings)?void 0:t.sort)?(o(),i("svg",Sd,Ad)):"DESC"===(null==(t=null==(t=e.column)?void 0:t.settings)?void 0:t.sort)?(o(),i("svg",Td,Id)):x("",!0)])}}}),Od=de({__name:"EnsureAccessDialog",props:{title:{},subtitle:{},invalidAccess:{},alertClass:{}},emits:["done"],setup(e){return(l,e)=>{let t=Z("EnsureAccess"),a=Z("SlideOver");return l.invalidAccess?(o(),ae(a,{key:0,title:l.title,onDone:e[0]||(e[0]=e=>l.$emit("done")),"content-class":"relative flex-1"},rl({default:xe(()=>[ye(t,{alertClass:l.alertClass,invalidAccess:l.invalidAccess},null,8,["alertClass","invalidAccess"])]),_:2},[l.subtitle?{name:"subtitle",fn:xe(()=>[ke(F(l.subtitle),1)]),key:"0"}:void 0]),1032,["title"])):x("",!0)}}}),Dd=["for"],Pd={class:"mt-1 relative rounded-md shadow-sm"},Bd=["type","name","id","placeholder","value","aria-invalid","aria-describedby"],Hd={key:0,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},Rd=l("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"},[l("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),Ed=[Rd],zd=["id"],Nd=["id"],Ud={inheritAttrs:!1},qd=de({...Ud,__name:"TextInput",props:{status:{},id:{},type:{},inputClass:{},label:{},labelClass:{},help:{},placeholder:{},modelValue:{}},setup(e,{expose:t}){let a=e,n=(t({focus:function(){var e;null!=(e=n.value)&&e.focus()}}),O());let r=v(()=>a.type||"text"),s=v(()=>a.label??Pe(at(a.id))),u=v(()=>a.placeholder??s.value),d=Qe("ApiState",void 0),c=v(()=>mt.call({responseStatus:a.status??(null==d?void 0:d.error.value)},a.id)),p=v(()=>[ot.base,c.value?ot.invalid:ot.valid,a.inputClass]);return(t,e)=>(o(),i("div",{class:y([t.$attrs.class])},[U(t.$slots,"header",Te({inputElement:n.value,id:t.id,modelValue:t.modelValue,status:t.status},t.$attrs)),s.value?(o(),i("label",{key:0,for:t.id,class:y("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(t.labelClass??""))},F(s.value),11,Dd)):x("",!0),l("div",Pd,[l("input",Te({ref_key:"inputElement",ref:n,type:r.value,name:t.id,id:t.id,class:p.value,placeholder:u.value,value:X(pn)(r.value,t.modelValue),onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=c.value,"aria-describedby":t.id+"-error",step:"any"},X(ft)(t.$attrs,["class","value"])),null,16,Bd),c.value?(o(),i("div",Hd,Ed)):x("",!0)]),c.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:t.id+"-error"},F(c.value),9,zd)):t.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:t.id+"-description"},F(t.help),9,Nd)):x("",!0),U(t.$slots,"footer",Te({inputElement:n.value,id:t.id,modelValue:t.modelValue,status:t.status},t.$attrs))],2))}}),Qd=["for"],Kd={class:"mt-1 relative rounded-md shadow-sm"},Zd=["name","id","placeholder","aria-invalid","aria-describedby"],Wd=["id"],Gd=["id"],Jd={inheritAttrs:!1},Xd=de({...Jd,__name:"TextareaInput",props:{status:{},id:{},inputClass:{},label:{},labelClass:{},help:{},placeholder:{},modelValue:{}},setup(e){let t=e,a=v(()=>t.label??Pe(at(t.id))),n=v(()=>t.placeholder??a.value),r=Qe("ApiState",void 0),s=v(()=>mt.call({responseStatus:t.status??(null==r?void 0:r.error.value)},t.id)),u=v(()=>["shadow-sm "+ot.base,s.value?"text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300":"text-gray-900 "+ot.valid,t.inputClass]);return(t,e)=>(o(),i("div",{class:y([t.$attrs.class])},[a.value?(o(),i("label",{key:0,for:t.id,class:y("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(t.labelClass??""))},F(a.value),11,Qd)):x("",!0),l("div",Kd,[l("textarea",Te({name:t.id,id:t.id,class:u.value,placeholder:n.value,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=s.value,"aria-describedby":t.id+"-error"},X(ft)(t.$attrs,["class"])),F(t.modelValue),17,Zd)]),s.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:t.id+"-error"},F(s.value),9,Wd)):t.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:t.id+"-description"},F(t.help),9,Gd)):x("",!0)],2))}}),Yd=["for"],ec=["id","name","value","aria-invalid","aria-describedby"],tc=["value"],sc=["id"],lc={inheritAttrs:!1},nc=de({...lc,__name:"SelectInput",props:{status:{},id:{},modelValue:{},inputClass:{},label:{},labelClass:{},options:{},values:{},entries:{}},setup(e){let t=e,a=v(()=>t.label??Pe(at(t.id))),n=Qe("ApiState",void 0),r=v(()=>mt.call({responseStatus:t.status??(null==n?void 0:n.error.value)},t.id)),s=v(()=>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(),i("div",{class:y([t.$attrs.class])},[a.value?(o(),i("label",{key:0,for:t.id,class:y("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(t.labelClass??""))},F(a.value),11,Yd)):x("",!0),l("select",Te({id:t.id,name:t.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",r.value?"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",t.inputClass],value:t.modelValue,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=r.value,"aria-describedby":t.id+"-error"},X(ft)(t.$attrs,["class"])),[(o(!0),i(Me,null,je(s.value,e=>(o(),i("option",{value:e.key},F(e.value),9,tc))),256))],16,ec),r.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:t.id+"-error"},F(r.value),9,sc)):x("",!0)],2))}}),oc={class:"flex items-center h-5"},ac=["id","name","checked"],rc={class:"ml-3 text-sm"},ic=["for"],uc={key:0,class:"mt-2 text-sm text-red-500",id:"`${id}-error`"},dc={key:1,class:"mt-2 text-sm text-gray-500",id:"`${id}-description`"},cc={inheritAttrs:!1},fc=de({...cc,__name:"CheckboxInput",props:{modelValue:{type:Boolean},status:{},id:{},inputClass:{},label:{},labelClass:{},help:{}},emits:["update:modelValue"],setup(e,{}){let t=e,a=v(()=>t.label??Pe(at(t.id))),n=Qe("ApiState",void 0),r=v(()=>mt.call({responseStatus:t.status??(null==n?void 0:n.error.value)},t.id));return(t,e)=>(o(),i("div",{class:y(["relative flex items-start",t.$attrs.class])},[l("div",oc,[l("input",Te({id:t.id,name:t.id,type:"checkbox",checked:t.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",t.inputClass]},X(ft)(t.$attrs,["class"])),null,16,ac)]),l("div",rc,[l("label",{for:t.id,class:y("font-medium text-gray-700 dark:text-gray-300 "+(t.labelClass??""))},F(a.value),11,ic),r.value?(o(),i("p",uc,F(r.value),1)):t.help?(o(),i("p",dc,F(t.help),1)):x("",!0)])],2))}}),vc=["id"],pc=["for"],mc={class:"mt-1 relative rounded-md shadow-sm"},hc=["id","name","value"],gc={class:"flex flex-wrap pb-1.5"},yc={class:"pt-1.5 pl-1"},bc={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"},wc=["onClick"],kc=l("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[l("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),_c=[kc],$c={class:"pt-1.5 pl-1 shrink"},Cc=["type","name","id","aria-invalid","aria-describedby"],xc=["id"],Lc=["onMouseover","onClick"],Vc={class:"block truncate"},Sc={key:1,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},Mc=l("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"},[l("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),Ac=[Mc],Tc=["id"],Fc=["id"],Ic={inheritAttrs:!1},jc=de({...Ic,__name:"TagInput",props:{status:{},id:{},type:{},inputClass:{},label:{},labelClass:{},help:{},modelValue:{default:()=>[]},delimiters:{default:()=>[","]},allowableValues:{},string:{type:Boolean},maxVisibleItems:{default:300},converter:{}},emits:["update:modelValue"],setup(e,{emit:t}){let a=e,n=t;let r=v(()=>{return Ze((e=a.modelValue,a.converter?a.converter(e):e),e=>"string"==typeof e?0==e.trim().length?[]:e.split(","):e)||[];var e}),s=O(),u=O(!1),d=v(()=>{let l=p.value.toLowerCase();return a.allowableValues&&0!=a.allowableValues.length?a.allowableValues.length<1e3?a.allowableValues.filter(e=>!r.value.includes(e)&&e.toLowerCase().includes(l)):a.allowableValues.filter(e=>!r.value.includes(e)&&e.startsWith(l)):[]});let c=O(null),p=O(""),f=v(()=>a.type||"text"),m=v(()=>a.label??Pe(at(a.id))),g=Qe("ApiState",void 0),h=v(()=>mt.call({responseStatus:a.status??(null==g?void 0:g.error.value)},a.id)),b=v(()=>["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",h.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]),w=l=>V(r.value.filter(e=>e!=l));function k(e){var l;document.activeElement===e.target&&null!=(l=c.value)&&l.focus()}let C=O();function L(){u.value=!0,C.value=!0}function M(){B(T()),C.value=!1,setTimeout(()=>{C.value||(u.value=!1)},200)}function V(e){var l=a.string?e.join(","):e;n("update:modelValue",l)}function S(e){var l;"Backspace"==e.key&&0==p.value.length&&0e==l.key))&&l.preventDefault(),"Enter"==l.key||"NumpadEnter"==l.key||1==l.key.length&&e)&&B(t)}let I={behavior:"smooth",block:"nearest",inline:"nearest",scrollMode:"if-needed"};function j(){setTimeout(()=>{var e=_s(`#${a.id}-tag li.active`);e&&e.scrollIntoView(I)},0)}function $(){setTimeout(()=>{var e=_s(`#${a.id}-tag li.active`);e&&("scrollIntoViewIfNeeded"in e?e.scrollIntoViewIfNeeded(I):e.scrollIntoView(I))},0)}function B(e){var l;0!==e.length&&(-1==(l=Array.from(r.value)).indexOf(e)&&l.push(e),V(l),p.value="",u.value=!1)}function U(t){var e,t=null==(e=t.clipboardData)?void 0:e.getData("Text");if(t){let e=new RegExp("\\n|\\t|"+a.delimiters.join("|")),l=Array.from(r.value);t.split(e).map(e=>e.trim()).forEach(e=>{-1==l.indexOf(e)&&l.push(e)}),V(l),p.value=""}}return(e,t)=>(o(),i("div",{class:y([e.$attrs.class]),id:e.id+"-tag",onmousemove:"cancelBlur=true"},[m.value?(o(),i("label",{key:0,for:e.id,class:y("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(e.labelClass??""))},F(m.value),11,pc)):x("",!0),l("div",mc,[l("input",{type:"hidden",id:e.id,name:e.id,value:r.value.join(",")},null,8,hc),l("button",{class:y(b.value),onClick:Ue(k,["prevent"]),onFocus:t[2]||(t[2]=e=>u.value=!0),tabindex:"-1"},[l("div",gc,[(o(!0),i(Me,null,je(r.value,t=>(o(),i("div",yc,[l("span",bc,[ke(F(t)+" ",1),l("button",{type:"button",onClick:e=>w(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"},_c,8,wc)])]))),256)),l("div",$c,[Mt(l("input",Te({ref_key:"txtInput",ref:c,type:f.value,role:"combobox","aria-controls":"options","aria-expanded":"false",autocomplete:"off",spellcheck:"false",name:e.id+"-txt",id:e.id+"-txt",class:"p-0 dark:bg-transparent rounded-md border-none focus:!border-none focus:!outline-none",style:`box-shadow:none !important;width:${p.value.length+1}ch`,"onUpdate:modelValue":t[0]||(t[0]=e=>p.value=e),"aria-invalid":null!=h.value,"aria-describedby":e.id+"-error",onKeydown:S,onKeypress:A,onPaste:Ue(U,["prevent","stop"]),onFocus:L,onBlur:M,onClick:t[1]||(t[1]=e=>u.value=!0)},X(ft)(e.$attrs,["class","required"])),null,16,Cc),[[wo,p.value]])])])],34),u.value&&d.value.length?(o(),i("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:S,id:e.id+"-options",role:"listbox"},[(o(!0),i(Me,null,je(d.value.slice(0,e.maxVisibleItems),t=>(o(),i("li",{class:y([t===s.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 l;l=t,s.value=l},onClick:e=>B(t),role:"option",tabindex:"-1"},[l("span",Vc,F(t),1)],42,Lc))),256))],40,xc)):x("",!0),h.value?(o(),i("div",Sc,Ac)):x("",!0)]),h.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:e.id+"-error"},F(h.value),9,Tc)):e.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:e.id+"-description"},F(e.help),9,Fc)):x("",!0)],10,vc))}}),Oc={class:"relative flex-grow mr-2 sm:mr-4"},Dc=["for"],Pc={class:"block mt-2"},Bc={class:"sr-only"},Hc=["multiple","name","id","placeholder","aria-invalid","aria-describedby"],Rc={key:0,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},Ec=l("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"},[l("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),zc=[Ec],Nc=["id"],Uc=["id"],qc={key:0},Qc=["title"],Kc=["alt","src"],Zc={key:1,class:"mt-3"},Wc={class:"w-full"},Gc={class:"pr-6 align-bottom pb-2"},Jc=["title"],Xc=["src","onError"],Yc=["href"],e0={key:1,class:"overflow-hidden"},t0={class:"align-top pb-2 whitespace-nowrap"},s0={key:0,class:"text-gray-500 dark:text-gray-400 text-sm bg-white dark:bg-black"},l0=de({__name:"FileInput",props:{multiple:{type:Boolean},status:{},id:{},inputClass:{},label:{},labelClass:{},help:{},placeholder:{},modelValue:{},values:{},files:{}},setup(e){let t,a=e,n=O(null),{assetsPathResolver:r,fallbackPathResolver:s}=It(),u={},d=O(),c=O((null==(t=a.files)?void 0:t.map(p))||[]);function p(e){return e.filePath=r(e.filePath),e}a.values&&0{var l=e.replace(/\\/g,"/");return{fileName:rn(At(l,"/"),"."),filePath:l,contentType:Ys(l)}}).map(p));let f=v(()=>a.label??Pe(at(a.id))),m=v(()=>a.placeholder??f.value),g=Qe("ApiState",void 0),h=v(()=>mt.call({responseStatus:a.status??(null==g?void 0:g.error.value)},a.id)),b=v(()=>["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",a.inputClass]),w=e=>{var l=e.target;d.value="",c.value=Array.from(l.files||[]).map(e=>({fileName:e.name,filePath:pl(e),contentLength:e.size,contentType:e.type||Ys(e.name)}))},k=()=>{var e;return null==(e=n.value)?void 0:e.click()},C=e=>null!=e&&(e.startsWith("data:")||e.startsWith("blob:")),L=v(()=>{var e;return 0!e||e.startsWith("data:")||e.endsWith(".svg")?"":"rounded-full object-cover";function V(e){d.value=s(L.value)}return Ft(Cn),(e,t)=>(o(),i("div",{class:y(["flex",e.multiple?"flex-col":"justify-between"])},[l("div",Oc,[f.value?(o(),i("label",{key:0,for:e.id,class:y("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(e.labelClass??""))},F(f.value),11,Dc)):x("",!0),l("div",Pc,[l("span",Bc,F(e.help??f.value),1),l("input",Te({ref_key:"input",ref:n,type:"file",multiple:e.multiple,name:e.id,id:e.id,class:b.value,placeholder:m.value,"aria-invalid":null!=h.value,"aria-describedby":e.id+"-error"},e.$attrs,{onChange:w}),null,16,Hc),h.value?(o(),i("div",Rc,zc)):x("",!0)]),h.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:e.id+"-error"},F(h.value),9,Nc)):e.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:e.id+"-description"},F(e.help),9,Uc)):x("",!0)]),e.multiple?(o(),i("div",Zc,[l("table",Wc,[(o(!0),i(Me,null,je(c.value,t=>(o(),i("tr",null,[l("td",Gc,[l("div",{class:"flex w-full",title:C(t.filePath)?"":t.filePath},[l("img",{src:u[X(xt)(t.filePath)]||X(r)(X(xt)(t.filePath)),class:y(["mr-2 h-8 w-8",M(t.filePath)]),onError:e=>u[X(xt)(t.filePath)]=X(s)(X(xt)(t.filePath))},null,42,Xc),C(t.filePath)?(o(),i("span",e0,F(t.fileName),1)):(o(),i("a",{key:0,href:X(r)(t.filePath||""),target:"_blank",class:"overflow-hidden"},F(t.fileName),9,Yc))],8,Jc)]),l("td",t0,[t.contentLength&&0[]},modelValue:{},match:{},viewCount:{default:100},pageSize:{default:8}},emits:["update:modelValue"],setup(e,{expose:t,emit:a}){let n=O(!1),r=e,s=a;function u(e){return Array.isArray(r.modelValue)&&0<=r.modelValue.indexOf(e)}t({toggle:j});let d=v(()=>r.label??Pe(at(r.id))),c=Qe("ApiState",void 0),p=v(()=>mt.call({responseStatus:r.status??(null==c?void 0:c.error.value)},r.id)),f=v(()=>[ot.base,p.value?ot.invalid:ot.valid]),m=O(null),g=O(""),h=O(null),b=O(r.viewCount),w=O([]),k=v(()=>g.value?r.options.filter(e=>r.match(e,g.value)).slice(0,b.value):r.options),C=["Tab","Escape","ArrowDown","ArrowUp","Enter","PageUp","PageDown","Home","End"];let L=[",",` +`,"\t"];function M(e){var l=null==(t=e.clipboardData)?void 0:t.getData("Text");if(l){var 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(l=>r.options.find(e=>r.match(e,l))).filter(e=>!!e);if(0{u(l)?e=e.filter(e=>e!=l):e.push(l)}),s("update:modelValue",e),hs()}}}else{t=r.options.filter(e=>r.match(e,l));1==t.length&&(B(t[0]),n.value=!1,hs())}}}function V(e){C.indexOf(e.code)||$()}function S(e){var l;e.shiftKey||e.ctrlKey||e.altKey||(n.value?"Escape"==e.code?n.value&&(e.stopPropagation(),n.value=!1):"Tab"==e.code?n.value=!1:"Home"==e.code?(h.value=w.value[0],A()):"End"==e.code?(h.value=w.value[w.value.length-1],A()):"ArrowDown"==e.code?(h.value?(l=w.value.indexOf(h.value),h.value=l+1{var e=_s(`#${r.id}-autocomplete li.active`);e&&e.scrollIntoView(T)},0)}function I(){setTimeout(()=>{var e=_s(`#${r.id}-autocomplete li.active`);e&&("scrollIntoViewIfNeeded"in e?e.scrollIntoViewIfNeeded(T):e.scrollIntoView(T))},0)}function j(e){var l;(n.value=e)&&($(),null!=(l=m.value))&&l.focus()}function $(){n.value=!0,E()}function B(l){if(g.value="",n.value=!1,r.multiple){let e=Array.from(r.modelValue||[]);u(l)?e=e.filter(e=>e!=l):e.push(l),h.value=null,s("update:modelValue",e)}else{let e=l;r.modelValue==l&&(e=null),s("update:modelValue",e)}}function E(){w.value=k.value}return bt(g,E),(e,t)=>(o(),i("div",{id:e.id+"-autocomplete"},[d.value?(o(),i("label",{key:0,for:e.id+"-text",class:"block text-sm font-medium text-gray-700 dark:text-gray-300"},F(d.value),9,o0)):x("",!0),l("div",a0,[Mt(l("input",Te({ref_key:"txtInput",ref:m,id:e.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:f.value,placeholder:e.multiple||!e.modelValue?e.placeholder:"",onFocus:$,onKeydown:S,onKeyup:V,onClick:$,onPaste:M,required:!1},e.$attrs),null,16,r0),[[ko,g.value]]),l("button",{type:"button",onClick:t[1]||(t[1]=e=>j(!n.value)),class:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",tabindex:"-1"},u0),n.value?(o(),i("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:S,id:e.id+"-options",role:"listbox"},[(o(!0),i(Me,null,je(w.value,t=>(o(),i("li",{class:y([t===h.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 l=t,h.value=l,void(w.value.indexOf(l)>Math.floor(.9*b.value)&&(b.value+=r.viewCount,E()));var l},onClick:e=>B(t),role:"option",tabindex:"-1"},[U(e.$slots,"item",Rt(ks(t))),u(t)?(o(),i("span",{key:0,class:y(["absolute inset-y-0 right-0 flex items-center pr-4",t===h.value?"text-white":"text-indigo-600"])},v0,2)):x("",!0)],42,c0))),256))],40,d0)):!e.multiple&&e.modelValue?(o(),i("div",{key:1,onKeydown:S,onClick:t[2]||(t[2]=e=>j(!n.value)),class:"h-8 -mt-8 ml-3 pt-0.5"},[U(e.$slots,"item",Rt(ks(e.modelValue)))],32)):x("",!0),p.value?(o(),i("div",p0,h0)):x("",!0)]),p.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:e.id+"-error"},F(p.value),9,g0)):e.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:e.id+"-description"},F(e.help),9,y0)):x("",!0)],8,n0))}}),w0=["id","name","value"],k0={class:"block truncate"},_0=de({__name:"Combobox",props:{id:{},modelValue:{},multiple:{type:Boolean},options:{},values:{},entries:{}},emits:["update:modelValue"],setup(e,{expose:t,emit:a}){let n=e,r=(t({toggle(e){var l;null!=(l=d.value)&&l.toggle(e)}}),a);function s(e){r("update:modelValue",e)}let u=v(()=>null!=n.multiple?n.multiple:Array.isArray(n.modelValue)),d=O();function c(e,l){return!l||e.value.toLowerCase().includes(l.toLowerCase())}let p=v(()=>n.entries||(n.values?n.values.map(e=>({key:e,value:e})):n.options?Object.keys(n.options).map(e=>({key:e,value:n.options[e]})):[])),f=O(u.value?[]:null);Ye(function(){let l=n.modelValue&&"object"==typeof n.modelValue?n.modelValue.key:n.modelValue;null==l||""===l?f.value=u.value?[]:null:"string"==typeof l?f.value=p.value.find(e=>e.key===l)||null:Array.isArray(l)&&(f.value=p.value.filter(e=>l.includes(e.key)))});let m=v(()=>null==f.value?"":Array.isArray(f.value)?f.value.map(e=>encodeURIComponent(e.key)).join(","):f.value.key);return(e,t)=>{var a=Z("Autocomplete");return o(),i(Me,null,[l("input",{type:"hidden",id:e.id,name:e.id,value:m.value},null,8,w0),ye(a,Te({ref_key:"input",ref:d,id:e.id,options:p.value,match:c,multiple:u.value},e.$attrs,{modelValue:f.value,"onUpdate:modelValue":[t[0]||(t[0]=e=>f.value=e),s]}),{item:xe(({value:e})=>[l("span",k0,F(e),1)]),_:1},16,["id","options","multiple","modelValue"])],64)}}}),$0=de({__name:"DynamicInput",props:{input:{},modelValue:{},api:{}},emits:["update:modelValue"],setup(e,{emit:l}){let t=e,a=l,c=v(()=>t.input.type||"text"),n="ignore,css,options,meta,allowableValues,allowableEntries,op,prop,type,id,name".split(","),p=v(()=>ft(t.input,n)),f=O("file"===c.value?null:t.modelValue[t.input.id]),m=(bt(f,()=>{t.modelValue[t.input.id]=f.value,a("update:modelValue",t.modelValue)}),v(()=>{var e=t.modelValue[t.input.id];if("file"!==t.input.type||!e)return[];if("string"==typeof e)return[{filePath:e,fileName:At(e,"/")}];if(!Array.isArray(e)&&"object"==typeof e)return e;if(Array.isArray(e)){let l=[];return e.forEach(e=>{"string"==typeof e?l.push({filePath:e,fileName:At(e,"/")}):"object"==typeof e&&l.push(e)}),l}}));return(e,l)=>{var t,a=Z("SelectInput"),n=Z("CheckboxInput"),r=Z("TagInput"),s=Z("Combobox"),i=Z("FileInput"),u=Z("TextareaInput"),d=Z("MarkdownInput"),v=Z("TextInput");return X(G).component(c.value)?(o(),ae(an(X(G).component(c.value)),Te({key:0,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=e=>f.value=e),status:null==(t=e.api)?void 0:t.error,"input-class":null==(t=e.input.css)?void 0:t.input,"label-class":null==(t=e.input.css)?void 0:t.label},p.value),null,16,["id","modelValue","status","input-class","label-class"])):"select"==c.value?(o(),ae(a,Te({key:1,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[1]||(l[1]=e=>f.value=e),status:null==(t=e.api)?void 0:t.error,"input-class":null==(a=e.input.css)?void 0:a.input,"label-class":null==(t=e.input.css)?void 0:t.label,entries:e.input.allowableEntries,values:e.input.allowableValues},p.value),null,16,["id","modelValue","status","input-class","label-class","entries","values"])):"checkbox"==c.value?(o(),ae(n,Te({key:2,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[2]||(l[2]=e=>f.value=e),status:null==(a=e.api)?void 0:a.error,"input-class":null==(t=e.input.css)?void 0:t.input,"label-class":null==(n=e.input.css)?void 0:n.label},p.value),null,16,["id","modelValue","status","input-class","label-class"])):"tag"==c.value?(o(),ae(r,Te({key:3,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[3]||(l[3]=e=>f.value=e),status:null==(a=e.api)?void 0:a.error,"input-class":null==(t=e.input.css)?void 0:t.input,"label-class":null==(n=e.input.css)?void 0:n.label,allowableValues:e.input.allowableValues,string:"String"==(null==(r=e.input.prop)?void 0:r.type)},p.value),null,16,["id","modelValue","status","input-class","label-class","allowableValues","string"])):"combobox"==c.value?(o(),ae(s,Te({key:4,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[4]||(l[4]=e=>f.value=e),status:null==(a=e.api)?void 0:a.error,"input-class":null==(t=e.input.css)?void 0:t.input,"label-class":null==(n=e.input.css)?void 0:n.label,entries:e.input.allowableEntries,values:e.input.allowableValues},p.value),null,16,["id","modelValue","status","input-class","label-class","entries","values"])):"file"==c.value?(o(),ae(i,Te({key:5,id:e.input.id,status:null==(r=e.api)?void 0:r.error,modelValue:f.value,"onUpdate:modelValue":l[5]||(l[5]=e=>f.value=e),"input-class":null==(s=e.input.css)?void 0:s.input,"label-class":null==(a=e.input.css)?void 0:a.label,files:m.value},p.value),null,16,["id","status","modelValue","input-class","label-class","files"])):"textarea"==c.value?(o(),ae(u,Te({key:6,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[6]||(l[6]=e=>f.value=e),status:null==(t=e.api)?void 0:t.error,"input-class":null==(n=e.input.css)?void 0:n.input,"label-class":null==(i=e.input.css)?void 0:i.label},p.value),null,16,["id","modelValue","status","input-class","label-class"])):"MarkdownInput"==c.value?(o(),ae(d,Te({key:7,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[7]||(l[7]=e=>f.value=e),status:null==(r=e.api)?void 0:r.error,"input-class":null==(s=e.input.css)?void 0:s.input,"label-class":null==(a=e.input.css)?void 0:a.label},p.value),null,16,["id","modelValue","status","input-class","label-class"])):(o(),ae(v,Te({key:8,type:c.value,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[8]||(l[8]=e=>f.value=e),status:null==(u=e.api)?void 0:u.error,"input-class":null==(t=e.input.css)?void 0:t.input,"label-class":null==(n=e.input.css)?void 0:n.label},p.value),null,16,["type","id","modelValue","status","input-class","label-class"]))}}}),C0={class:"lookup-field"},x0=["name","value"],L0={key:0,class:"flex justify-between"},V0=["for"],S0={key:0,class:"flex items-center"},M0={class:"text-sm text-gray-500 dark:text-gray-400 pr-1"},A0=l("span",{class:"sr-only"},"Clear",-1),T0=l("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"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),F0=[A0,T0],I0={key:1,class:"mt-1 relative"},j0={class:"w-full inline-flex truncate"},O0={class:"text-blue-700 dark:text-blue-300 flex cursor-pointer"},D0=l("span",{class:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},[l("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"},[l("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),P0=["id"],B0=["id"],H0=de({__name:"LookupInput",props:{id:{},status:{},input:{},metadataType:{},modelValue:{},label:{},labelClass:{},help:{}},emits:["update:modelValue"],setup(e,{emit:t}){let a=It().config,r=lt().metadataApi,s=e,u=t,d=v(()=>s.id||s.input.id),c=v(()=>s.label??Pe(at(d.value))),n=Qe("ApiState",void 0),p=Qe("client"),f=v(()=>mt.call({responseStatus:s.status??(null==n?void 0:n.error.value)},d.value)),m=O(""),g=O(""),h=v(()=>_e(s.modelValue,d.value)),b=v(()=>st(s.metadataType).find(e=>e.name.toLowerCase()==d.value.toLowerCase())),w=v(()=>{var e;return(null==(e=rt(null==(e=null==(e=b.value)?void 0:e.ref)?void 0:e.model))?void 0:e.icon)||a.value.tableIcon}),k;function C(){s.modelValue[d.value]=null,m.value=""}return Ye(async()=>{k=Qe("ModalProvider",void 0);var l,t=s.modelValue;s.modelValue[d.value]||(s.modelValue[d.value]=null);let a=b.value,n=null==a?void 0:a.ref;if(n){m.value="";let e=null==n.selfId?_e(t,a.name):_e(t,n.selfId);null==(e=Xt(e)?_e(t,n.refId):e)||null==(null==(l=r.value)?void 0:l.operations.find(e=>{var l;return(null==(l=e.dataModel)?void 0:l.name)==n.model}))||Xt(l=_e(t,a.name))||(m.value=""+l,g.value=a.name,null!=n.refLabel&&(null==(l=st(s.metadataType).find(e=>e.type==n.model))&&console.warn(`Could not find ${n.model} Property on `+s.metadataType.name),null!=(t=null!=l?_e(t,l.name):null)?(l=_e(t,n.refLabel))&&(m.value=""+l,Pt.setValue(n.model,e,n.refLabel,l)):(l=1==(null==(t=a.attributes)?void 0:t.some(e=>"Computed"==e.name)),t=await Pt.getOrFetchValue(p,r.value,n.model,n.refId,n.refLabel,l,e),m.value=t||n.model+": "+m.value)))}else console.warn(`No RefInfo for property '${d.value}'`)}),(e,t)=>{var a,n=Z("Icon");return o(),i("div",C0,[l("input",{type:"hidden",name:d.value,value:h.value},null,8,x0),c.value?(o(),i("div",L0,[l("label",{for:d.value,class:y("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(e.labelClass??""))},F(c.value),11,V0),h.value?(o(),i("div",S0,[l("span",M0,F(h.value),1),l("button",{onClick:C,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"},F0)])):x("",!0)])):x("",!0),null!=(a=b.value)&&a.ref?(o(),i("div",I0,[l("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 a;(a=b.value.ref)&&(null==k?console.warn("No ModalProvider required by LookupInput"):k.openModal({name:"ModalLookup",ref:a},e=>{var l,t;console.debug("openModal",m.value," -> ",e,Pt.setRefValue(a,e),a),e&&(l=_e(e,a.refId),m.value=Pt.setRefValue(a,e)||l,(t=X(s.modelValue))[d.value]=l,u("update:modelValue",t))}))}),"aria-haspopup":"listbox","aria-expanded":"true","aria-labelledby":"listbox-label"},[l("span",j0,[l("span",O0,[ye(n,{class:"mr-1 w-5 h-5",image:w.value},null,8,["image"]),l("span",null,F(m.value),1)])]),D0])])):x("",!0),f.value?(o(),i("p",{key:2,class:"mt-2 text-sm text-red-500",id:d.value+"-error"},F(f.value),9,P0)):e.help?(o(),i("p",{key:3,class:"mt-2 text-sm text-gray-500",id:d.value+"-description"},F(e.help),9,B0)):x("",!0)])}}}),R0=de({__name:"AutoFormFields",props:{modelValue:{},type:{},metaType:{},api:{},formLayout:{},configureField:{},configureFormLayout:{},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(e,{expose:t,emit:a}){let u=e,n=a;function r(){var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}function d(e,l){u.modelValue[e]=l,n("update:modelValue",u.modelValue),r()}t({forceUpdate:r,props:u,updateValue:d});let{metadataApi:s,apiOf:c,typeOf:p,typeOfRef:f,createFormLayout:m}=lt(),g=v(()=>u.type||qt(u.modelValue)),h=v(()=>u.metaType??p(g.value)),b=v(()=>{var e;return f(null==(e=null==(e=s.value)?void 0:e.operations.find(e=>e.request.name==g.value))?void 0:e.dataModel)||h.value});function w(){var e,l=h.value;if(!l){if(u.formLayout)return e=u.formLayout.map(e=>{var l={name:e.id,type:Ia(e.type)},l=Object.assign({prop:l},e);return u.configureField&&u.configureField(l),l}),u.configureFormLayout&&u.configureFormLayout(e),e;throw new Error(`MetadataType for ${g.value} not found`)}let a=st(l),n=b.value,t=u.formLayout?Array.from(u.formLayout):m(l),r=[],s=c(l.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=>{var l;return e.name.toLowerCase()==(null==(l=t.name)?void 0:l.toLowerCase())}))??l,l=Object.assign({prop:e,op:s},t),u.configureField&&u.configureField(l),r.push(l))}),u.configureFormLayout&&u.configureFormLayout(r),r}return(t,a)=>{let e,n=Z("ErrorSummary"),r=Z("LookupInput"),s=Z("DynamicInput");return o(),i(Me,null,[t.hideSummary?x("",!0):(o(),ae(n,{key:0,status:null==(e=t.api)?void 0:e.error,except:w().filter(e=>"hidden"!=e.type).map(e=>e.id)},null,8,["status","except"])),l("div",{class:y(t.flexClass)},[l("div",{class:y(t.divideClass)},[l("div",{class:y(t.spaceClass)},[l("fieldset",{class:y(t.fieldsetClass)},[(o(!0),i(Me,null,je(w(),l=>{var e;return o(),i("div",{key:l.id,class:y(["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(),ae(s,{key:1,input:l,modelValue:t.modelValue,"onUpdate:modelValue":a[0]||(a[0]=e=>t.$emit("update:modelValue",e)),api:t.api},null,8,["input","modelValue","api"])):(o(),ae(r,{key:0,metadataType:b.value,input:l,modelValue:t.modelValue,"onUpdate:modelValue":e=>{d(l.id,_e(e,l.id))},status:null==(e=t.api)?void 0:e.error},null,8,["metadataType","input","modelValue","onUpdate:modelValue","status"]))],2)}),128))],2)],2)],2)],2)],64)}}});function Ds(e){let r=O(!1),s=O(),o=O(),i=e??Qe("client");function n({message:e,errorCode:l,fieldName:t,errors:a}){return l=l||"Exception",a=a||[],s.value=new Us(t?{errorCode:l,message:e,errors:[new Gl({fieldName:t,errorCode:l,message:e})]}:{errorCode:l,message:e,errors:a})}var l={setError:n,addFieldError:function({fieldName:t,message:e,errorCode:l}){var a;l=l||"Exception",s.value?((a=new Us(s.value)).errors=[...(a.errors||[]).filter(e=>{var l;return(null==(l=e.fieldName)?void 0:l.toLowerCase())!==(null==t?void 0:t.toLowerCase())}),new Gl({fieldName:t,message:e,errorCode:l})],s.value=a):n({fieldName:t,message:e,errorCode:l})},loading:r,error:s,api:async function(e,l,t){r.value=!0;var a=await i.api(Dt(e),l,t);return r.value=!1,o.value=a.response,s.value=a.error,a},apiVoid:async function(e,l,t){r.value=!0;var a=await i.apiVoid(Dt(e),l,t);return r.value=!1,o.value=a.response,s.value=a.error,a},apiForm:async function(e,l,t,a){r.value=!0;var n=await i.apiForm(Dt(e),l,t,a);return r.value=!1,o.value=n.response,s.value=n.error,n},apiFormVoid:async function(e,l,t,a){r.value=!0;var n=await i.apiFormVoid(Dt(e),l,t,a);return r.value=!1,o.value=n.response,s.value=n.error,n},swr:async function(e,l,t,a){return gn(i,e,l,t,a)},swrEffect:function(t,a){let n=O(new Xe),r=yn(async e=>{n.value=await i.api(e)},null==a?void 0:a.delayMs);return ws(async()=>{var e=t(),l=cl(As(e));l&&(n.value=new Xe({response:l})),0===(null==a?void 0:a.delayMs)?n.value=await i.api(e):r(e)}),(async()=>n.value=await i.api(t(),null==a?void 0:a.args,null==a?void 0:a.method))(),n},unRefs:Dt,setRef:mn};return ss("ApiState",l),l}let E0={key:0},z0={class:"text-red-700"},N0=l("b",null,"type",-1),U0={key:0},q0={key:2},Q0=["innerHTML"],K0=l("input",{type:"submit",class:"hidden"},null,-1),Z0={class:"flex justify-end"},W0=l("div",null,null,-1),G0={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},J0=l("div",{class:"fixed inset-0"},null,-1),X0={class:"fixed inset-0 overflow-hidden"},Y0={class:"flex min-h-0 flex-1 flex-col overflow-auto"},ef={class:"flex-1"},tf={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},sf={class:"flex items-start justify-between space-x-3"},lf={class:"space-y-1"},nf={key:0},of={key:2},af=["innerHTML"],rf={class:"flex h-7 items-center"},uf={class:"flex justify-end"},df=de({__name:"AutoForm",props:{type:{},modelValue:{},heading:{},subHeading:{},showLoading:{type:Boolean,default:!0},jsconfig:{default:"eccn,edv"},formStyle:{default:"card"},metaType:{},configureField:{},configureFormLayout:{},panelClass:{},bodyClass:{},formClass:{},innerFormClass:{},headerClass:{default:"p-6"},buttonsClass:{},headingClass:{},subHeadingClass:{},submitLabel:{default:"Submit"},allowSubmit:{}},emits:["success","error","update:modelValue","done"],setup(e,{expose:t,emit:a}){let s=e,u=a,L=O(),M=O(1),V=O();function n(){M.value++,H.value=m();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}ss("ModalProvider",{openModal:function(e,l){S.value=e,r.value=l}});let S=O(),r=O();async function T(e){r.value&&r.value(e),S.value=void 0,r.value=void 0}let d=Ds(),c=bn().getTypeName,{typeOf:p,createDto:f}=lt(),A=O(new Xe),I=v(()=>s.panelClass||Ee.panelClass(s.formStyle)),j=v(()=>s.formClass||"card"==s.formStyle?"shadow sm:rounded-md":Bt.formClass),$=v(()=>s.headingClass||Ee.headingClass(s.formStyle)),B=v(()=>s.subHeadingClass||Ee.subHeadingClass(s.formStyle)),E=v(()=>("string"==typeof s.buttonsClass?s:Ee).buttonsClass),_=v(()=>{var e;return s.type?c(s.type):null!=(e=s.modelValue)&&e.getTypeName?s.modelValue.getTypeName():null}),D=v(()=>s.metaType??p(_.value)),m=()=>s.modelValue||g(),H=O(m()),P=v(()=>d.loading.value),R=v(()=>{var e;return null!=s.heading?s.heading:(null==(e=D.value)?void 0:e.description)||Pe(_.value)});function g(){return"string"==typeof s.type?f(s.type):s.type?new s.type:s.modelValue}async function z(e){var l,t,a,n,r;e&&"FORM"==e.tagName?(l=g(),r=Ze(null==l?void 0:l.getMethod,e=>"function"==typeof e?e():null)||"POST",t=null==Ze(null==l?void 0:l.createResponse,e=>"function"==typeof e?e():null),a=s.jsconfig,il.hasRequestBody(r)?(r=new l.constructor,n=new FormData(e),A.value=t?await d.apiFormVoid(r,n,{jsconfig:a}):await d.apiForm(r,n,{jsconfig:a})):(r=new l.constructor(Bo(H.value)),console.debug("AutoForm.submit",r),A.value=t?await d.apiVoid(r,{jsconfig:a}):await d.api(r,{jsconfig:a})),A.value.succeeded?(u("success",A.value.response),q()):u("error",A.value.error)):console.error("Not a valid form",e)}function N(e){u("update:modelValue",e)}function h(){u("done")}t({forceUpdate:n,props:s,setModel:async function(e){Object.assign(H.value,e),n(),await St(()=>null)},formFields:L,submit:async function(){z(V.value)},close:q,model:H});let b=O(!1),G=O(""),k={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 q(){"slideOver"==s.formStyle?b.value=!1:h()}bt(b,()=>{yt(k,G,b.value),b.value||setTimeout(h,700)}),b.value=!0;let w=e=>{"Escape"===e.key&&q()};return Ye(()=>window.addEventListener("keydown",w)),Ft(()=>window.removeEventListener("keydown",w)),(t,e)=>{let a,n,r,s,u,d,v,c,p,f,m,g=Z("AutoFormFields"),h=Z("FormLoading"),b=Z("PrimaryButton"),w=Z("CloseButton"),k=Z("SecondaryButton"),C=Z("ModalLookup");return o(),i("div",null,[D.value?"card"==t.formStyle?(o(),i("div",{key:1,class:y(I.value)},[l("form",{ref_key:"elForm",ref:V,onSubmit:e[0]||(e[0]=Ue(e=>z(e.target),["prevent"])),autocomplete:"off",class:y(t.innerFormClass)},[l("div",{class:y(t.bodyClass)},[l("div",{class:y(t.headerClass)},[t.$slots.heading?(o(),i("div",U0,[U(t.$slots,"heading")])):(o(),i("h3",{key:1,class:y($.value)},F(R.value),3)),t.$slots.subheading?(o(),i("div",q0,[U(t.$slots,"subheading")])):t.subHeading?(o(),i("p",{key:3,class:y(B.value)},F(t.subHeading),3)):null!=(a=D.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",B.value]),innerHTML:null==(n=D.value)?void 0:n.notes},null,10,Q0)):x("",!0)],2),U(t.$slots,"header",{instance:null==(r=Be())?void 0:r.exposed,model:H.value}),K0,(o(),ae(g,{ref_key:"formFields",ref:L,key:M.value,type:t.type,modelValue:H.value,"onUpdate:modelValue":N,api:A.value,configureField:t.configureField,configureFormLayout:t.configureFormLayout},null,8,["type","modelValue","api","configureField","configureFormLayout"])),U(t.$slots,"footer",{instance:null==(s=Be())?void 0:s.exposed,model:H.value})],2),U(t.$slots,"buttons",{},()=>{var e;return[l("div",{class:y(E.value)},[l("div",null,[U(t.$slots,"leftbuttons",{instance:null==(e=Be())?void 0:e.exposed,model:H.value})]),l("div",null,[t.showLoading&&P.value?(o(),ae(h,{key:0})):x("",!0)]),l("div",Z0,[W0,ye(b,{disabled:!!t.allowSubmit&&!t.allowSubmit(H.value)},{default:xe(()=>[ke(F(t.submitLabel),1)]),_:1},8,["disabled"]),U(t.$slots,"rightbuttons",{instance:null==(e=Be())?void 0:e.exposed,model:H.value})])],2)]})],34)],2)):(o(),i("div",G0,[J0,l("div",X0,[l("div",{onMousedown:q,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:e[2]||(e[2]=Ue(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",G.value])},[l("form",{ref_key:"elForm",ref:V,class:y(j.value),onSubmit:e[1]||(e[1]=Ue(e=>z(e.target),["prevent"]))},[l("div",Y0,[l("div",ef,[l("div",tf,[l("div",sf,[l("div",lf,[t.$slots.heading?(o(),i("div",nf,[U(t.$slots,"heading")])):(o(),i("h3",{key:1,class:y($.value)},F(R.value),3)),t.$slots.subheading?(o(),i("div",of,[U(t.$slots,"subheading")])):t.subHeading?(o(),i("p",{key:3,class:y(B.value)},F(t.subHeading),3)):null!=(u=D.value)&&u.notes?(o(),i("p",{key:4,class:y(["notes",B.value]),innerHTML:null==(d=D.value)?void 0:d.notes},null,10,af)):x("",!0)]),l("div",rf,[ye(w,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:q})])])]),U(t.$slots,"header",{instance:null==(v=Be())?void 0:v.exposed,model:H.value}),(o(),ae(g,{ref_key:"formFields",ref:L,key:M.value,type:t.type,modelValue:H.value,"onUpdate:modelValue":N,api:A.value,configureField:t.configureField,configureFormLayout:t.configureFormLayout},null,8,["type","modelValue","api","configureField","configureFormLayout"])),U(t.$slots,"footer",{instance:null==(c=Be())?void 0:c.exposed,model:H.value})])]),l("div",{class:y(E.value)},[l("div",null,[U(t.$slots,"leftbuttons",{instance:null==(p=Be())?void 0:p.exposed,model:H.value})]),l("div",null,[t.showLoading&&P.value?(o(),ae(h,{key:0})):x("",!0)]),l("div",uf,[ye(k,{onClick:q,disabled:P.value},{default:xe(()=>[ke("Cancel")]),_:1},8,["disabled"]),ye(b,{class:"ml-4",disabled:!!t.allowSubmit&&!t.allowSubmit(H.value)},{default:xe(()=>[ke(F(t.submitLabel),1)]),_:1},8,["disabled"]),U(t.$slots,"rightbuttons",{instance:null==(f=Be())?void 0:f.exposed,model:H.value})])],2)],34)],2)],32)],32)])])):(o(),i("div",E0,[l("p",z0,[ke("Could not create form for unknown "),N0,ke(" "+F(_.value),1)])])),"ModalLookup"==(null==(m=S.value)?void 0:m.name)&&S.value.ref?(o(),ae(C,{key:3,"ref-info":S.value.ref,onDone:T},null,8,["ref-info"])):x("",!0)])}}}),cf={key:0},ff={class:"text-red-700"},vf=l("b",null,"type",-1),pf={key:0},mf={key:2},hf=["innerHTML"],gf={class:"flex justify-end"},yf={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},bf=l("div",{class:"fixed inset-0"},null,-1),wf={class:"fixed inset-0 overflow-hidden"},kf={class:"flex min-h-0 flex-1 flex-col overflow-auto"},_f={class:"flex-1"},$f={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},Cf={class:"flex items-start justify-between space-x-3"},xf={class:"space-y-1"},Lf={key:0},Vf={key:2},Sf=["innerHTML"],Mf={class:"flex h-7 items-center"},Af={class:"flex justify-end"},Tf=de({__name:"AutoCreateForm",props:{type:{},formStyle:{default:"slideOver"},panelClass:{},formClass:{},headingClass:{},subHeadingClass:{},buttonsClass:{},heading:{},subHeading:{},autosave:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},showCancel:{type:Boolean,default:!0},configureField:{},configureFormLayout:{}},emits:["done","save","error"],setup(e,{expose:t,emit:a}){let r=e,s=a,c=O(),p=O(1);function n(){p.value++,null!=(e=c.value)&&e.forceUpdate();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}function f(e){}ss("ModalProvider",{openModal:function(e,l){m.value=e,u.value=l}});let m=O(),u=O();async function g(e){u.value&&u.value(e),m.value=void 0,u.value=void 0}let{typeOf:d,typeProperties:h,Crud:b,createDto:w,formValues:k}=lt(),C=v(()=>qt(r.type)),L=v(()=>d(C.value)),M=O("string"==typeof r.type?w(r.type):r.type?new r.type:null),V=(t({forceUpdate:n,props:r,setModel:function(e){Object.assign(M.value,e),n()},formFields:c,model:M}),v(()=>r.panelClass||Ee.panelClass(r.formStyle))),S=v(()=>r.formClass||Ee.formClass(r.formStyle)),T=v(()=>r.headingClass||Ee.headingClass(r.formStyle)),A=v(()=>r.subHeadingClass||Ee.subHeadingClass(r.formStyle)),I=v(()=>r.buttonsClass||Ee.buttonsClass),j=v(()=>b.model(L.value)),$=v(()=>{var e;return r.heading||(null==(e=d(C.value))?void 0:e.description)||(j.value?"New "+Pe(j.value):Pe(C.value))}),B=O(new Xe),E=Ds(),_=v(()=>E.loading.value);async function D(e){var l,t,a,n=e.target;r.autosave?(t=Ze(null==(t=M.value)?void 0:t.getMethod,e=>"function"==typeof e?e():null)||"POST",l=null==Ze(null==(l=M.value)?void 0:l.createResponse,e=>"function"==typeof e?e():null),il.hasRequestBody(t)?(t=new M.value.constructor,a=new FormData(n),B.value=l?await E.apiFormVoid(t,a,{jsconfig:"eccn"}):await E.apiForm(t,a,{jsconfig:"eccn"})):(t=k(n,h(L.value)),a=new M.value.constructor(t),B.value=l?await E.apiVoid(a,{jsconfig:"eccn"}):await E.api(a,{jsconfig:"eccn"})),B.value.succeeded?(n.reset(),s("save",B.value.response)):s("error",B.value.error)):s("save",new M.value.constructor(k(n,h(L.value))))}function H(){s("done")}G.interceptors.has("AutoCreateForm.new")&&G.interceptors.invoke("AutoCreateForm.new",{props:r,model:M});let P=O(!1),R=O(""),q={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 z(){"slideOver"==r.formStyle?P.value=!1:H()}bt(P,()=>{yt(q,R,P.value),P.value||setTimeout(H,700)}),P.value=!0;let N=e=>{"Escape"===e.key&&z()};return Ye(()=>window.addEventListener("keydown",N)),Ft(()=>window.removeEventListener("keydown",N)),(e,t)=>{var a,n=Z("AutoFormFields"),r=Z("FormLoading"),s=Z("SecondaryButton"),u=Z("PrimaryButton"),d=Z("CloseButton"),v=Z("ModalLookup");return o(),i("div",null,[L.value?"card"==e.formStyle?(o(),i("div",{key:1,class:y(V.value)},[l("form",{onSubmit:Ue(D,["prevent"])},[l("div",{class:y(S.value)},[l("div",null,[e.$slots.heading?(o(),i("div",pf,[U(e.$slots,"heading")])):(o(),i("h3",{key:1,class:y(T.value)},F($.value),3)),e.$slots.subheading?(o(),i("div",mf,[U(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:y(A.value)},F(e.subHeading),3)):null!=(a=L.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",A.value]),innerHTML:null==(a=L.value)?void 0:a.notes},null,10,hf)):x("",!0)]),U(e.$slots,"header",{formInstance:null==(a=Be())?void 0:a.exposed,model:M.value}),(o(),ae(n,{ref_key:"formFields",ref:c,key:p.value,modelValue:M.value,"onUpdate:modelValue":f,api:B.value,configureField:e.configureField,configureFormLayout:e.configureFormLayout},null,8,["modelValue","api","configureField","configureFormLayout"])),U(e.$slots,"footer",{formInstance:null==(a=Be())?void 0:a.exposed,model:M.value})],2),l("div",{class:y(I.value)},[l("div",null,[e.showLoading&&X(_)?(o(),ae(r,{key:0})):x("",!0)]),l("div",gf,[e.showCancel?(o(),ae(s,{key:0,onClick:z,disabled:X(_)},{default:xe(()=>[ke("Cancel")]),_:1},8,["disabled"])):x("",!0),ye(u,{type:"submit",class:"ml-4",disabled:X(_)},{default:xe(()=>[ke("Save")]),_:1},8,["disabled"])])],2)],32)],2)):(o(),i("div",yf,[bf,l("div",wf,[l("div",{onMousedown:z,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:t[0]||(t[0]=Ue(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",R.value])},[l("form",{class:y(S.value),onSubmit:Ue(D,["prevent"])},[l("div",kf,[l("div",_f,[l("div",$f,[l("div",Cf,[l("div",xf,[e.$slots.heading?(o(),i("div",Lf,[U(e.$slots,"heading")])):(o(),i("h3",{key:1,class:y(T.value)},F($.value),3)),e.$slots.subheading?(o(),i("div",Vf,[U(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:y(A.value)},F(e.subHeading),3)):null!=(a=L.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",A.value]),innerHTML:null==(a=L.value)?void 0:a.notes},null,10,Sf)):x("",!0)]),l("div",Mf,[ye(d,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:z})])])]),U(e.$slots,"header",{formInstance:null==(a=Be())?void 0:a.exposed,model:M.value}),(o(),ae(n,{ref_key:"formFields",ref:c,key:p.value,modelValue:M.value,"onUpdate:modelValue":f,api:B.value,configureField:e.configureField,configureFormLayout:e.configureFormLayout},null,8,["modelValue","api","configureField","configureFormLayout"])),U(e.$slots,"footer",{formInstance:null==(d=Be())?void 0:d.exposed,model:M.value})])]),l("div",{class:y(I.value)},[l("div",null,[e.showLoading&&X(_)?(o(),ae(r,{key:0})):x("",!0)]),l("div",Af,[e.showCancel?(o(),ae(s,{key:0,onClick:z,disabled:X(_)},{default:xe(()=>[ke("Cancel")]),_:1},8,["disabled"])):x("",!0),ye(u,{type:"submit",class:"ml-4",disabled:X(_)},{default:xe(()=>[ke("Save")]),_:1},8,["disabled"])])],2)],34)],2)],32)],32)])])):(o(),i("div",cf,[l("p",ff,[ke("Could not create form for unknown "),vf,ke(" "+F(C.value),1)])])),"ModalLookup"==(null==(a=m.value)?void 0:a.name)&&m.value.ref?(o(),ae(v,{key:3,"ref-info":m.value.ref,onDone:g},null,8,["ref-info"])):x("",!0)])}}}),Ff={key:0},If={class:"text-red-700"},jf=l("b",null,"type",-1),Of={key:0},Df={key:2},Pf=["innerHTML"],Bf={class:"flex justify-end"},Hf={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},Rf=l("div",{class:"fixed inset-0"},null,-1),Ef={class:"fixed inset-0 overflow-hidden"},zf={class:"flex min-h-0 flex-1 flex-col overflow-auto"},Nf={class:"flex-1"},Uf={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},qf={class:"flex items-start justify-between space-x-3"},Qf={class:"space-y-1"},Kf={key:0},Zf={key:2},Wf=["innerHTML"],Gf={class:"flex h-7 items-center"},Jf={class:"flex justify-end"},Xf=de({__name:"AutoEditForm",props:{modelValue:{},type:{},deleteType:{},formStyle:{default:"slideOver"},panelClass:{},formClass:{},headingClass:{},subHeadingClass:{},heading:{},subHeading:{},autosave:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},configureField:{},configureFormLayout:{}},emits:["done","save","delete","error"],setup(e,{expose:t,emit:a}){let r=e,s=a,p=O(),f=O(1);function m(e){}ss("ModalProvider",{openModal:function(e,l){g.value=e,n.value=l}});let g=O(),n=O();async function q(e){n.value&&n.value(e),g.value=void 0,n.value=void 0}let{typeOf:u,apiOf:Q,typeProperties:c,createFormLayout:K,getPrimaryKey:W,Crud:h,createDto:d,formValues:b}=lt(),w=v(()=>qt(r.type)),k=v(()=>u(w.value)),C=()=>"string"==typeof r.type?d(r.type,ys(r.modelValue)):r.type?new r.type(ys(r.modelValue)):null,L=O(C()),J=(t({forceUpdate:function(){f.value++,L.value=C();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()},props:r,setModel:function(e){Object.assign(L.value,e)},formFields:p,model:L}),v(()=>r.panelClass||Ee.panelClass(r.formStyle))),M=v(()=>r.formClass||Ee.formClass(r.formStyle)),V=v(()=>r.headingClass||Ee.headingClass(r.formStyle)),S=v(()=>r.subHeadingClass||Ee.subHeadingClass(r.formStyle)),T=v(()=>h.model(k.value)),A=v(()=>{var e;return r.heading||(null==(e=u(w.value))?void 0:e.description)||(T.value?"Update "+Pe(T.value):Pe(w.value))}),I=O(new Xe),j=Object.assign({},ys(r.modelValue)),$=(G.interceptors.has("AutoEditForm.new")&&G.interceptors.invoke("AutoEditForm.new",{props:r,model:L,origModel:j}),Ds()),B=v(()=>$.loading.value),E=()=>Ze(u(h.model(k.value)),e=>W(e));function Y(e){var{op:l,prop:t}=e;l&&(h.isPatch(l)||h.isUpdate(l))&&(e.disabled=null==t?void 0:t.isPrimaryKey),r.configureField&&r.configureField(e)}async function _(e){var a=e.target;if(r.autosave){let e=Ze(null==(n=L.value)?void 0:n.getMethod,e=>"function"==typeof e?e():null)||"POST",t=null==Ze(null==(n=L.value)?void 0:n.createResponse,e=>"function"==typeof e?e():null),d=E();if(il.hasRequestBody(e)){let e=new L.value.constructor,l=_e(r.modelValue,d.name),i=new FormData(a),u=(d&&!Array.from(i.keys()).some(e=>e.toLowerCase()==d.name.toLowerCase())&&i.append(d.name,l),[]);var n=w.value&&Q(w.value);if(n&&h.isPatch(n)){let s=K(k.value),o={};if(d&&(o[d.name]=l),s.forEach(t=>{var a=t.id,n=_e(j,a);if(!d||d.name.toLowerCase()!==a.toLowerCase()){var r=i.get(a);G.interceptors.has("AutoEditForm.save.formLayout")&&G.interceptors.invoke("AutoEditForm.save.formLayout",{origValue:n,formLayout:s,input:t,newValue:r});let e=null!=r,l="checkbox"===t.type?e!=!!n:"file"===t.type?e:r!=n;(l=r||n?l:!1)&&(r?o[a]=r:"file"!==t.type&&u.push(a))}}),G.interceptors.has("AutoEditForm.save")&&G.interceptors.invoke("AutoEditForm.save",{origModel:j,formLayout:s,dirtyValues:o}),Array.from(i.keys()).filter(e=>!o[e]).forEach(e=>i.delete(e)),0==Array.from(i.keys()).filter(e=>e.toLowerCase()!=d.name.toLowerCase()).length&&0==u.length)return void z()}n=0"function"==typeof e?e():null)?I.value=await $.apiVoid(t):I.value=await $.api(t),I.value.succeeded?s("delete",I.value.response):s("error",I.value.error)):console.error(`Could not find Primary Key for Type ${w.value} (${T.value})`)}function H(){s("done")}let P=O(!1),R=O(""),ee={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 z(){"slideOver"==r.formStyle?P.value=!1:H()}bt(P,()=>{yt(ee,R,P.value),P.value||setTimeout(H,700)}),P.value=!0;let N=e=>{"Escape"===e.key&&z()};return Ye(()=>window.addEventListener("keydown",N)),Ft(()=>window.removeEventListener("keydown",N)),(e,t)=>{var a,n=Z("AutoFormFields"),r=Z("ConfirmDelete"),s=Z("FormLoading"),u=Z("SecondaryButton"),d=Z("PrimaryButton"),v=Z("CloseButton"),c=Z("ModalLookup");return o(),i("div",null,[k.value?"card"==e.formStyle?(o(),i("div",{key:1,class:y(J.value)},[l("form",{onSubmit:Ue(_,["prevent"])},[l("div",{class:y(M.value)},[l("div",null,[e.$slots.heading?(o(),i("div",Of,[U(e.$slots,"heading")])):(o(),i("h3",{key:1,class:y(V.value)},F(A.value),3)),e.$slots.subheading?(o(),i("div",Df,[U(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:y(S.value)},F(e.subHeading),3)):null!=(a=k.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",S.value]),innerHTML:null==(a=k.value)?void 0:a.notes},null,10,Pf)):x("",!0)]),U(e.$slots,"header",{formInstance:null==(a=Be())?void 0:a.exposed,model:L.value}),(o(),ae(n,{ref_key:"formFields",ref:p,key:f.value,modelValue:L.value,"onUpdate:modelValue":m,api:I.value,configureField:e.configureField,configureFormLayout:e.configureFormLayout},null,8,["modelValue","api","configureField","configureFormLayout"])),U(e.$slots,"footer",{formInstance:null==(a=Be())?void 0:a.exposed,model:L.value})],2),l("div",{class:y(X(Ee).buttonsClass)},[l("div",null,[e.deleteType?(o(),ae(r,{key:0,onDelete:D})):x("",!0)]),l("div",null,[e.showLoading&&X(B)?(o(),ae(s,{key:0})):x("",!0)]),l("div",Bf,[ye(u,{onClick:z,disabled:X(B)},{default:xe(()=>[ke("Cancel")]),_:1},8,["disabled"]),ye(d,{type:"submit",class:"ml-4",disabled:X(B)},{default:xe(()=>[ke("Save")]),_:1},8,["disabled"])])],2)],32)],2)):(o(),i("div",Hf,[Rf,l("div",Ef,[l("div",{onMousedown:z,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:t[0]||(t[0]=Ue(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",R.value])},[l("form",{class:y(M.value),onSubmit:Ue(_,["prevent"])},[l("div",zf,[l("div",Nf,[l("div",Uf,[l("div",qf,[l("div",Qf,[e.$slots.heading?(o(),i("div",Kf,[U(e.$slots,"heading")])):(o(),i("h3",{key:1,class:y(V.value)},F(A.value),3)),e.$slots.subheading?(o(),i("div",Zf,[U(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:y(S.value)},F(e.subHeading),3)):null!=(a=k.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",S.value]),innerHTML:null==(a=k.value)?void 0:a.notes},null,10,Wf)):x("",!0)]),l("div",Gf,[ye(v,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:z})])])]),U(e.$slots,"header",{formInstance:null==(a=Be())?void 0:a.exposed,model:L.value}),(o(),ae(n,{ref_key:"formFields",ref:p,key:f.value,modelValue:L.value,"onUpdate:modelValue":m,api:I.value,configureField:Y,configureFormLayout:e.configureFormLayout},null,8,["modelValue","api","configureFormLayout"])),U(e.$slots,"footer",{formInstance:null==(v=Be())?void 0:v.exposed,model:L.value})])]),l("div",{class:y(X(Ee).buttonsClass)},[l("div",null,[e.deleteType?(o(),ae(r,{key:0,onDelete:D})):x("",!0)]),l("div",null,[e.showLoading&&X(B)?(o(),ae(s,{key:0})):x("",!0)]),l("div",Jf,[ye(u,{onClick:z,disabled:X(B)},{default:xe(()=>[ke("Cancel")]),_:1},8,["disabled"]),ye(d,{type:"submit",class:"ml-4",disabled:X(B)},{default:xe(()=>[ke("Save")]),_:1},8,["disabled"])])],2)],34)],2)],32)],32)])])):(o(),i("div",Ff,[l("p",If,[ke("Could not create form for unknown "),jf,ke(" "+F(w.value),1)])])),"ModalLookup"==(null==(a=g.value)?void 0:a.name)&&g.value.ref?(o(),ae(c,{key:3,"ref-info":g.value.ref,onDone:q},null,8,["ref-info"])):x("",!0)])}}}),Yf={key:0},ev={class:"text-red-700"},tv=l("b",null,"type",-1),sv={key:0},lv={key:2},nv=["innerHTML"],ov={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},av=l("div",{class:"fixed inset-0"},null,-1),rv={class:"fixed inset-0 overflow-hidden"},iv={class:"flex min-h-0 flex-1 flex-col overflow-auto"},uv={class:"flex-1"},dv={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},cv={class:"flex items-start justify-between space-x-3"},fv={class:"space-y-1"},vv={key:0},pv={key:2},mv=["innerHTML"],hv={class:"flex h-7 items-center"},gv=de({__name:"AutoViewForm",props:{model:{},apis:{},typeName:{},done:{},formStyle:{default:"slideOver"},panelClass:{},formClass:{},headingClass:{},subHeadingClass:{},heading:{},subHeading:{}},emits:["done"],setup(e,{}){let t=e,a=lt().typeOf,s=v(()=>t.typeName??t.apis.dataModel.name),u=v(()=>a(s.value)),d=v(()=>t.panelClass||Ee.panelClass(t.formStyle)),c=v(()=>t.formClass||Ee.formClass(t.formStyle)),p=v(()=>t.headingClass||Ee.headingClass(t.formStyle)),f=v(()=>t.subHeadingClass||Ee.subHeadingClass(t.formStyle)),m=v(()=>{var e;return t.heading||(null==(e=a(s.value))?void 0:e.description)||(null!=(e=t.model)&&e.id?Pe(s.value)+" "+t.model.id:"View "+Pe(s.value))});function n(){t.done&&t.done()}G.interceptors.has("AutoViewForm.new")&&G.interceptors.invoke("AutoViewForm.new",{props:t});let r=O(!1),g=O(""),h={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 b(){"slideOver"==t.formStyle?r.value=!1:n()}bt(r,()=>{yt(h,g,r.value),r.value||setTimeout(n,700)}),r.value=!0;let w=e=>{"Escape"===e.key&&b()};return Ye(()=>window.addEventListener("keydown",w)),Ft(()=>window.removeEventListener("keydown",w)),(e,t)=>{var a,n=Z("MarkupModel"),r=Z("CloseButton");return o(),i("div",null,[s.value?"card"==e.formStyle?(o(),i("div",{key:1,class:y(d.value)},[l("div",{class:y(c.value)},[l("div",null,[e.$slots.heading?(o(),i("div",sv,[U(e.$slots,"heading")])):(o(),i("h3",{key:1,class:y(p.value)},F(m.value),3)),e.$slots.subheading?(o(),i("div",lv,[U(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:y(f.value)},F(e.subHeading),3)):null!=(a=u.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",f.value]),innerHTML:null==(a=u.value)?void 0:a.notes},null,10,nv)):x("",!0)]),ye(n,{value:e.model},null,8,["value"])],2)],2)):(o(),i("div",ov,[av,l("div",rv,[l("div",{onMousedown:b,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:t[0]||(t[0]=Ue(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",g.value])},[l("div",{class:y(c.value)},[l("div",iv,[l("div",uv,[l("div",dv,[l("div",cv,[l("div",fv,[e.$slots.heading?(o(),i("div",vv,[U(e.$slots,"heading")])):(o(),i("h3",{key:1,class:y(p.value)},F(m.value),3)),e.$slots.subheading?(o(),i("div",pv,[U(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:y(f.value)},F(e.subHeading),3)):null!=(a=u.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",f.value]),innerHTML:null==(a=u.value)?void 0:a.notes},null,10,mv)):x("",!0)]),l("div",hv,[ye(r,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:b})])])]),ye(n,{value:e.model},null,8,["value"])])])],2)],2)],32)],32)])])):(o(),i("div",Yf,[l("p",ev,[ke("Could not create view for unknown "),tv,ke(" "+F(s.value),1)])]))])}}}),yv=l("label",{for:"confirmDelete",class:"ml-2 mr-2 select-none"},"confirm",-1),bv=de({__name:"ConfirmDelete",emits:["delete"],setup(e,{emit:t}){let a=O(!1),n=t,r=()=>{a.value&&n("delete")},s=v(()=>["select-none inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white",a.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(),i(Me,null,[Mt(l("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=>nn(a)?a.value=e:a=e)},null,512),[[ol,X(a)]]),yv,l("span",Te({onClick:Ue(r,["prevent"]),class:s.value},e.$attrs),[U(e.$slots,"default",{},()=>[ke("Delete")])],16)],64))}}),wv={class:"flex",title:"loading..."},kv={key:0,xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24px",height:"30px",viewBox:"0 0 24 30"},_v=xs('',3),$v=[_v],Cv={class:"ml-2 mt-1 text-gray-400"},xv=de({__name:"FormLoading",props:{icon:{type:Boolean,default:!0},text:{default:"loading..."}},setup(e){return Qe("ApiState",void 0),(e,t)=>(o(),i("div",wv,[e.icon?(o(),i("svg",kv,$v)):x("",!0),l("span",Cv,F(e.text),1)]))}}),Lv=["onClick"],Vv={key:3,class:"flex justify-between items-center"},Sv={class:"mr-1 select-none"},Mv=["onClick"],Av=de({__name:"DataGrid",props:{items:{default:()=>[]},id:{default:"DataGrid"},type:{},tableStyle:{default:"stripedRows"},selectedColumns:{},gridClass:{},grid2Class:{},grid3Class:{},grid4Class:{},tableClass:{},theadClass:{},tbodyClass:{},theadRowClass:{},theadCellClass:{},isSelected:{},headerTitle:{},headerTitles:{},visibleFrom:{},rowClass:{},rowStyle:{}},emits:["headerSelected","rowSelected"],setup(e,{emit:t}){let u=e,d=t,a=O(),c=O(null),p=al(),f=l=>Object.keys(p).find(e=>e.toLowerCase()==l.toLowerCase()+"-header"),m=l=>Object.keys(p).find(e=>e.toLowerCase()==l.toLowerCase()),n=v(()=>Ws(u.items).filter(e=>!(!p[e]&&!p[e+"-header"]))),{typeOf:r,typeProperties:s}=lt(),g=v(()=>qt(u.type)),h=v(()=>r(g.value)),b=v(()=>s(h.value));function w(e){var l=u.headerTitles&&_e(u.headerTitles,e)||e;return u.headerTitle?u.headerTitle(l):cn(l)}function k(e){let l=e.toLowerCase();return b.value.find(e=>e.name.toLowerCase()==l)}let C={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){var l=u.visibleFrom&&_e(u.visibleFrom,e);return l&&Ze(C[l],e=>"hidden "+e)}let M=v(()=>u.gridClass??he.getGridClass(u.tableStyle)),V=v(()=>u.grid2Class??he.getGrid2Class(u.tableStyle)),S=v(()=>u.grid3Class??he.getGrid3Class(u.tableStyle)),T=v(()=>u.grid4Class??he.getGrid4Class(u.tableStyle)),A=v(()=>u.tableClass??he.getTableClass(u.tableStyle)),I=v(()=>u.tbodyClass??he.getTbodyClass(u.tbodyClass)),j=v(()=>u.theadClass??he.getTheadClass(u.tableStyle)),$=v(()=>u.theadRowClass??he.getTheadRowClass(u.tableStyle)),B=v(()=>u.theadCellClass??he.getTheadCellClass(u.tableStyle));let E=v(()=>{let e=("string"==typeof u.selectedColumns?u.selectedColumns.split(","):u.selectedColumns)||(0(e[l.name.toLowerCase()]=l.format,e),{});return e.filter(e=>{var l;return"hidden"!=(null==(l=t[e.toLowerCase()])?void 0:l.method)})});return(n,e)=>{let r=Z("CellFormat"),s=Z("PreviewFormat");return n.items.length?(o(),i("div",{key:0,ref_key:"refResults",ref:a,class:y(M.value)},[l("div",{class:y(V.value)},[l("div",{class:y(S.value)},[l("div",{class:y(T.value)},[l("table",{class:y(A.value)},[l("thead",{class:y(j.value)},[l("tr",{class:y($.value)},[(o(!0),i(Me,null,je(E.value,t=>{return o(),i("td",{class:y([L(t),B.value,(e=t,c.value===e?"text-gray-900 dark:text-gray-50":"text-gray-500 dark:text-gray-400")])},[l("div",{onClick:e=>{var l;e=e,l=t,d("headerSelected",l,e)}},[X(p)[t+"-header"]?U(n.$slots,t+"-header",{key:0,column:t}):f(t)?U(n.$slots,f(t),{key:1,column:t}):X(p).header?U(n.$slots,"header",{key:2,column:t,label:w(t)}):(o(),i("div",Vv,[l("span",Sv,F(w(t)),1)]))],8,Lv)],2);var e}),256))],2)],2),l("tbody",{class:y(I.value)},[(o(!0),i(Me,null,je(n.items,(t,e)=>{return o(),i("tr",{class:y((l=t,a=e,u.rowClass?u.rowClass(l,a):he.getTableRowClass(u.tableStyle,a,!(!u.isSelected||!u.isSelected(l)),null!=u.isSelected))),style:nl((a=t,l=e,u.rowStyle?u.rowStyle(a,l):void 0)),onClick:e=>{var l;e=e,l=t,d("rowSelected",l,e)}},[(o(!0),i(Me,null,je(E.value,e=>{return o(),i("td",{class:y([L(e),X(he).tableCellClass])},[X(p)[e]?U(n.$slots,e,Rt(Te({key:0},t))):m(e)?U(n.$slots,m(e),Rt(Te({key:1},t))):k(e)?(o(),ae(r,{key:2,type:h.value,propType:k(e),modelValue:t},null,8,["type","propType","modelValue"])):(o(),ae(s,{key:3,value:X(_e)(t,e),format:null!=(l=k(e))&&l.format?l.format:"TimeSpan"==(null==l?void 0:l.type)||"TimeOnly"==(null==l?void 0:l.type)?{method:"time"}:null},null,8,["value","format"]))],2);var l}),256))],14,Mv);var l,a}),256))],2)],2)],2)],2)],2)],2)):x("",!0)}}}),Tv=de({props:{type:Object,propType:Object,modelValue:Object},setup(d,{attrs:v}){let c=lt().typeOf;return()=>{let e,l=null!=(o=d.propType)&&o.format?o.format:"TimeSpan"==(null==o?void 0:o.type)||"TimeOnly"==(null==o?void 0:o.type)?{method:"time"}:null,t=_e(d.modelValue,d.propType.name),a=Object.assign({},d,v),n=$t("span",{innerHTML:ts(t,l,a)}),r=Xt(t)&&Array.isArray(t)?$t("span",{},[$t("span",{class:"mr-2"},""+t.length),n]):n,s=null==(e=d.propType)?void 0:e.ref;var o,i,u;return s&&(i=st(d.type).find(e=>e.type===s.model))&&(i=(i=_e(d.modelValue,i.name))&&s.refLabel&&_e(i,s.refLabel))?(u=(u=null==(u=c(s.model))?void 0:u.icon)?$t(eo,{image:u,class:"w-5 h-5 mr-1"}):null,$t("span",{class:"flex",title:s.model+" "+t},[u,i])):r}}}),Fv={key:0},Iv={key:0,class:"mr-2"},jv=["innerHTML"],Ov=["innerHTML"],Dv={inheritAttrs:!1},Pv=de({...Dv,__name:"PreviewFormat",props:{value:{},format:{},includeIcon:{type:Boolean,default:!0},includeCount:{type:Boolean,default:!0},maxFieldLength:{default:150},maxNestedFields:{default:2},maxNestedFieldLength:{default:30}},setup(e){let t=e,a=v(()=>Array.isArray(t.value));return(e,t)=>X(Xt)(e.value)?(o(),i("span",Fv,[e.includeCount&&a.value?(o(),i("span",Iv,F(e.value.length),1)):x("",!0),l("span",{innerHTML:X(ts)(e.value,e.format,e.$attrs)},null,8,jv)])):(o(),i("span",{key:1,innerHTML:X(ts)(e.value,e.format,e.$attrs)},null,8,Ov))}}),Bv=["innerHTML"],Hv={key:0},Rv=l("b",null,null,-1),Ev={key:2},zv=de({__name:"HtmlFormat",props:{value:{},depth:{default:0},fieldAttrs:{},classes:{type:Function,default:(e,l,t,a,n)=>a}},setup(e){let t=e,r=v(()=>Tt(t.value)),s=v(()=>Array.isArray(t.value)),u=e=>cn(e),d=e=>t.fieldAttrs?t.fieldAttrs(e):null,c=v(()=>Ws(t.value));return(t,e)=>{let a=Z("HtmlFormat",!0);return o(),i("div",{class:y(0==t.depth?"prose html-format":"")},[r.value?(o(),i("div",{key:0,innerHTML:X(ts)(t.value)},null,8,Bv)):s.value?(o(),i("div",{key:1,class:y(t.classes("array","div",t.depth,X(he).gridClass))},[X(Tt)(t.value[0])?(o(),i("div",Hv,"[ "+F(t.value.join(", "))+" ]",1)):(o(),i("div",{key:1,class:y(t.classes("array","div",t.depth,X(he).grid2Class))},[l("div",{class:y(t.classes("array","div",t.depth,X(he).grid3Class))},[l("div",{class:y(t.classes("array","div",t.depth,X(he).grid4Class))},[l("table",{class:y(t.classes("object","table",t.depth,X(he).tableClass))},[l("thead",{class:y(t.classes("array","thead",t.depth,X(he).theadClass))},[l("tr",null,[(o(!0),i(Me,null,je(c.value,e=>(o(),i("th",{class:y(t.classes("array","th",t.depth,X(he).theadCellClass+" whitespace-nowrap"))},[Rv,ke(F(u(e)),1)],2))),256))])],2),l("tbody",null,[(o(!0),i(Me,null,je(t.value,(l,e)=>(o(),i("tr",{class:y(t.classes("array","tr",t.depth,e%2==0?"bg-white":"bg-gray-50",e))},[(o(!0),i(Me,null,je(c.value,e=>(o(),i("td",{class:y(t.classes("array","td",t.depth,X(he).tableCellClass))},[ye(a,Te({value:l[e],"field-attrs":t.fieldAttrs,depth:t.depth+1,classes:t.classes},d(e)),null,16,["value","field-attrs","depth","classes"])],2))),256))],2))),256))])],2)],2)],2)],2))],2)):(o(),i("div",Ev,[l("table",{class:y(t.classes("object","table",t.depth,"table-object"))},[(o(!0),i(Me,null,je((n=t.value)?Object.keys(n).map(e=>({key:u(e),val:n[e]})):[],e=>(o(),i("tr",{class:y(t.classes("object","tr",t.depth,""))},[l("th",{class:y(t.classes("object","th",t.depth,"align-top py-2 px-4 text-left text-sm font-medium tracking-wider whitespace-nowrap"))},F(e.key),3),l("td",{class:y(t.classes("object","td",t.depth,"align-top py-2 px-4 text-sm"))},[ye(a,Te({value:e.val,"field-attrs":t.fieldAttrs,depth:t.depth+1,classes:t.classes},d(e.key)),null,16,["value","field-attrs","depth","classes"])],2)],2))),256))],2)]))],2);var n}}}),Nv=["href"],Uv=["href","title"],qv=de({__name:"MarkupFormat",props:{value:{},imageClass:{default:"w-8 h-8"}},setup(e){var l=e,t=La().getMimeType,a=l.value;let n=typeof l.value;l="string"===n&&a.length?t(a):null;return"string"===n&&a.length&&(((t=a.startsWith("https://")||a.startsWith("http://"))||"/"===a[0])&&null!=l&&l.startsWith("image/")?n="image":t&&(n="link")),(e,l)=>{var t=Z("Icon"),a=Z("HtmlFormat");return"link"==X(n)?(o(),i("a",{key:0,href:e.value,class:"text-indigo-600"},F(e.value),9,Nv)):"image"==X(n)?(o(),i("a",{key:1,href:e.value,title:e.value,class:"inline-block"},[ye(t,{src:e.value,class:y(e.imageClass)},null,8,["src","class"])],8,Uv)):(o(),ae(a,{key:2,value:e.value},null,8,["value"]))}}}),Qv={class:"my-2 w-full"},Kv={class:"leading-7"},Zv={class:"px-2 text-left align-top"},Wv={colspan:"align-top"},Gv={class:"my-2 leading-7"},Jv={colspan:"2",class:"px-2 bg-indigo-700 text-white"},Xv={class:"leading-7"},Yv={colspan:"2",class:"px-2 align-top"},ep=de({__name:"MarkupModel",props:{value:{},imageClass:{}},setup(e){let a=e,t=Object.keys(a.value),n={},r={};return t.forEach(e=>{var l=a.value[e],t=typeof l;null==l||"function"==t||"symbol"==t?n[e]=`(${null==l?"null":"t"})`:"object"==t?r[e]=l:n[e]=l}),(e,t)=>{let a=Z("MarkupFormat");return o(),i("table",Qv,[(o(),i(Me,null,je(n,(e,t)=>l("tr",Kv,[l("th",Zv,F(X(Pe)(t)),1),l("td",Wv,[ye(a,{value:e},null,8,["value"])])])),64)),(o(),i(Me,null,je(r,(e,t)=>(o(),i(Me,null,[l("tr",Gv,[l("td",Jv,F(X(Pe)(t)),1)]),l("tr",Xv,[l("td",Yv,[ye(a,{value:e},null,8,["value"])])])],64))),64))])}}}),tp={class:"absolute top-0 right-0 pt-4 pr-4"},sp=l("span",{class:"sr-only"},"Close",-1),lp=l("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"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),np=[sp,lp],op=de({__name:"CloseButton",props:{buttonClass:{default:"bg-white dark:bg-black"}},emits:["close"],setup(e,{}){return(t,e)=>(o(),i("div",tp,[l("button",{type:"button",onClick:e[0]||(e[0]=e=>t.$emit("close")),class:y([t.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"])},np,2)]))}}),ap=["id","aria-labelledby"],rp=l("div",{class:"fixed inset-0"},null,-1),ip={class:"fixed inset-0 overflow-hidden"},up={class:"flex h-full flex-col bg-white dark:bg-black shadow-xl"},dp={class:"flex min-h-0 flex-1 flex-col overflow-auto"},cp={class:"flex-1"},fp={class:"relative bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},vp={class:"flex items-start justify-between space-x-3"},pp={class:"space-y-1"},mp={key:0},hp=["id"],gp={key:2,class:"text-sm text-gray-500"},yp={class:"flex h-7 items-center"},bp={key:0,class:"flex-shrink-0 border-t border-gray-200 dark:border-gray-700 px-4 py-5 sm:px-6"},wp=de({__name:"SlideOver",props:{id:{default:"SlideOver"},title:{},contentClass:{default:"relative mt-6 flex-1 px-4 sm:px-6"}},emits:["done"],setup(e,{emit:t}){let a=t,n=O(!1),r=O(""),s={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"}},u=(bt(n,()=>{yt(s,r,n.value),n.value||setTimeout(()=>a("done"),700)}),n.value=!0,()=>n.value=!1),d=e=>{"Escape"===e.key&&u()};return Ye(()=>window.addEventListener("keydown",d)),Ft(()=>window.removeEventListener("keydown",d)),(e,t)=>{var a=Z("CloseButton");return o(),i("div",{id:e.id,class:"relative z-10","aria-labelledby":e.id+"-title",role:"dialog","aria-modal":"true"},[rp,l("div",ip,[l("div",{onMousedown:u,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:t[0]||(t[0]=Ue(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:y(["panel pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",r.value])},[l("div",up,[l("div",dp,[l("div",cp,[l("div",fp,[l("div",vp,[l("div",pp,[e.$slots.title?(o(),i("div",mp,[U(e.$slots,"title")])):x("",!0),e.title?(o(),i("h2",{key:1,class:"text-lg font-medium text-gray-900 dark:text-gray-50",id:e.id+"-title"},F(e.title),9,hp)):x("",!0),e.$slots.subtitle?(o(),i("p",gp,[U(e.$slots,"subtitle")])):x("",!0)]),l("div",yp,[ye(a,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:u})])])]),l("div",{class:y(e.contentClass)},[U(e.$slots,"default")],2)])]),e.$slots.footer?(o(),i("div",bp,[U(e.$slots,"footer")])):x("",!0)])],2)],32)],32)])],8,ap)}}}),kp=["id","data-transition-for","aria-labelledby"],_p={class:"fixed inset-0 z-10 overflow-y-auto"},$p={class:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"},Cp=l("span",{class:"sr-only"},"Close",-1),xp=l("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"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),Lp=[Cp,xp],Vp=de({__name:"ModalDialog",props:{id:{default:"ModalDialog"},modalClass:{default:ll.modalClass},sizeClass:{default:ll.sizeClass}},emits:["done"],setup(e,{emit:t}){let a=t,n=O(!1),r=O(""),s={entering:{cls:"ease-out duration-300",from:"opacity-0",to:"opacity-100"},leaving:{cls:"ease-in duration-200",from:"opacity-100",to:"opacity-0"}},u=O(""),d={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"}},v=(bt(n,()=>{yt(s,r,n.value),yt(d,u,n.value),n.value||setTimeout(()=>a("done"),200)}),n.value=!0,()=>n.value=!1),c=(ss("ModalProvider",{openModal:function(e,l){c.value=e,p.value=l}}),O()),p=O();async function f(e){p.value&&p.value(e),c.value=void 0,p.value=void 0}let m=e=>{"Escape"===e.key&&v()};return Ye(()=>window.addEventListener("keydown",m)),Ft(()=>window.removeEventListener("keydown",m)),(e,t)=>{var a,n=Z("ModalLookup");return o(),i("div",{id:e.id,"data-transition-for":e.id,onMousedown:v,class:"relative z-10","aria-labelledby":e.id+"-title",role:"dialog","aria-modal":"true"},[l("div",{class:y(["fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity",r.value])},null,2),l("div",_p,[l("div",$p,[l("div",{class:y([e.modalClass,e.sizeClass,u.value]),onMousedown:t[0]||(t[0]=Ue(()=>{},["stop"]))},[l("div",null,[l("div",{class:"hidden sm:block absolute top-0 right-0 pt-4 pr-4 z-10"},[l("button",{type:"button",onClick:v,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"},Lp)]),U(e.$slots,"default")])],34)])]),"ModalLookup"==(null==(a=c.value)?void 0:a.name)&&c.value.ref?(o(),ae(n,{key:0,"ref-info":c.value.ref,onDone:f},null,8,["ref-info"])):x("",!0)],40,kp)}}}),Sp={class:"pt-2 overflow-auto",style:{"min-height":"620px"}},Mp={class:"mt-3 pl-5 flex flex-wrap items-center"},Ap={class:"hidden sm:block text-xl leading-6 font-medium text-gray-900 dark:text-gray-50 mr-3"},Tp={class:"hidden md:inline"},Fp={class:"flex pb-1 sm:pb-0"},Ip=["title"],jp=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("g",{"stroke-width":"1.5",fill:"none"},[l("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),Op=[jp],Dp=["disabled"],Pp=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z",fill:"currentColor"})],-1),Bp=[Pp],Hp=["disabled"],Rp=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z",fill:"currentColor"})],-1),Ep=[Rp],zp=["disabled"],Np=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z",fill:"currentColor"})],-1),Up=[Np],qp=["disabled"],Qp=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z",fill:"currentColor"})],-1),Kp=[Qp],Zp={key:0,class:"flex pb-1 sm:pb-0"},Wp={class:"px-4 text-lg text-black dark:text-white"},Gp={key:0},Jp={key:1},Xp=l("span",{class:"hidden xl:inline"}," Showing Results ",-1),Yp={key:2},em={key:1,class:"pl-2"},tm=l("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24"},[l("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),sm=[tm],lm={class:"flex pb-1 sm:pb-0"},nm={key:0,class:"pl-2"},om=l("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"},[l("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),am={class:"mr-1"},rm={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"},im=l("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),um=[im],dm={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"},cm=l("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),fm=[cm],vm={key:1},pm={key:4},mm={key:0},hm={key:0,class:"cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50"},gm={class:"mr-1 select-none"},ym={key:1,class:"flex justify-between items-center"},bm={class:"mr-1 select-none"},ln=25,wm=de({__name:"ModalLookup",props:{id:{default:"ModalLookup"},refInfo:{},skip:{default:0},prefs:{},selectedColumns:{},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:{},canFilter:{}},emits:["done"],setup(e,{emit:t}){let d=e,a=t,c=al(),n=It().config,{metadataApi:r,filterDefinitions:s}=lt(),u=Qe("client"),p=n.value.storage,f=v(()=>d.toolbarButtonClass??he.toolbarButtonClass),m=v(()=>s.value),g=O({take:ln}),h=O(new Xe),b=O(d.skip),w=O(!1),k=O(),C=e=>"string"==typeof e?e.split(","):e||[];function L(e,l){return he.getTableRowClass("fullWidth",l,!1,!0)}let M=v(()=>rt(d.refInfo.model)),V=v(()=>{var e=(0<(e=C(d.selectedColumns)).length?e:[]).map(e=>e.toLowerCase());let t=st(M.value);return 0t.find(e=>e.name.toLowerCase()===l)).filter(e=>null!=e):t}),G=v(()=>{let e=V.value.map(e=>e.name),l=C(g.value.selectedColumns).map(e=>e.toLowerCase());return 0l.includes(e.toLowerCase())):e}),S=v(()=>g.value.take??ln),T=v(()=>h.value.response?_e(h.value.response,"results"):[]),A=v(()=>{var e;return(null==(e=h.value.response)?void 0:e.total)??T.value.length??0}),I=v(()=>00T.value.length>=S.value),B=v(()=>T.value.length>=S.value),E=O([]),q=v(()=>E.value.some(e=>0E.value.map(e=>e.settings.filters.length).reduce((e,l)=>e+l,0)),Q=v(()=>ns(M.value)),K=v(()=>{var e;return null==(e=r.value)?void 0:e.operations.find(e=>{var l;return(null==(l=e.dataModel)?void 0:l.name)==d.refInfo.model&&qe.isAnyQuery(e)})}),W=O(),D=O(!1),H=O(),P=()=>d.id+"/ApiPrefs/"+d.refInfo.model,R=e=>`Column/${d.id}:${d.refInfo.model}.`+e;async function z(e){b.value+=e,b.value<0&&(b.value=0);var l=Math.floor(A.value/S.value)*S.value;b.value>l&&(b.value=l),await N()}async function J(e,l){a("done",e)}function Y(){a("done",null)}function ee(l,e){var t,a=e.target;"TD"!==(null==a?void 0:a.tagName)&&(a=null==(a=null==a?void 0:a.closest("TABLE"))?void 0:a.getBoundingClientRect(),t=E.value.find(e=>e.name.toLowerCase()==l.toLowerCase()))&&a&&(a=("DIV"===(null==(a=e.target)?void 0:a.tagName)?e.target:null==(a=e.target)?void 0:a.closest("DIV")).getBoundingClientRect(),H.value={column:t,topLeft:{x:Math.max(Math.floor(a.x+25),343),y:Math.floor(115)}})}function le(){H.value=null}async function te(e){var l=null==(l=H.value)?void 0:l.column;l&&(l.settings=e,p.setItem(R(l.name),JSON.stringify(l.settings)),await N()),H.value=null}async function ne(e){p.setItem(R(e.name),JSON.stringify(e.settings)),await N()}async function re(e){D.value=!1,g.value=e,p.setItem(P(),JSON.stringify(e)),await N()}async function N(){var a=(()=>{let a={include:"total",take:S.value},e=C(g.value.selectedColumns||d.selectedColumns);var l;0{t.settings.sort&&n.push(("DESC"===t.settings.sort?"-":"")+t.name),t.settings.filters.forEach(e=>{var l=e.key.replace("%",t.name);a[l]=e.value})}),"u"{h.value.response=h.value.error=void 0,w.value=e}),t=await u.api(e);l(),St(()=>h.value=t);n=_e(t.response,"results")||[];t.succeeded&&n.label}else console.error("No Query API was found for "+d.refInfo.model)}async function se(){E.value.forEach(e=>{e.settings={filters:[]},p.removeItem(R(e.name))}),await N()}return Ye(async()=>{var e=d.prefs||$s(p.getItem(P()));e&&(g.value=e),E.value=V.value.map(e=>({name:e.name,type:e.type,meta:e,settings:Object.assign({filters:[]},$s(p.getItem(R(e.name))))})),isNaN(d.skip)||(b.value=d.skip),await N()}),(n,e)=>{let t=Z("ErrorSummary"),a=Z("Loading"),r=Z("SettingsIcons"),s=Z("DataGrid"),u=Z("ModalDialog");return o(),i(Me,null,[n.refInfo?(o(),ae(u,{key:0,ref_key:"modalDialog",ref:W,id:n.id,onDone:Y},{default:xe(()=>[l("div",Sp,[l("div",Mp,[l("h3",Ap,[ke(" Select "),l("span",Tp,F(X(Pe)(n.refInfo.model)),1)]),l("div",Fp,[n.showPreferences?(o(),i("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:n.refInfo.model+" Preferences",onClick:e[0]||(e[0]=e=>D.value=!D.value)},Op,8,Ip)):x("",!0),n.showPagingNav?(o(),i("button",{key:1,type:"button",class:y(["pl-2",I.value?"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:!I.value,onClick:e[1]||(e[1]=e=>z(-A.value))},Bp,10,Dp)):x("",!0),n.showPagingNav?(o(),i("button",{key:2,type:"button",class:y(["pl-2",j.value?"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:!j.value,onClick:e[2]||(e[2]=e=>z(-S.value))},Ep,10,Hp)):x("",!0),n.showPagingNav?(o(),i("button",{key:3,type:"button",class:y(["pl-2",$.value?"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:!$.value,onClick:e[3]||(e[3]=e=>z(S.value))},Up,10,zp)):x("",!0),n.showPagingNav?(o(),i("button",{key:4,type:"button",class:y(["pl-2",B.value?"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:!B.value,onClick:e[4]||(e[4]=e=>z(A.value))},Kp,10,qp)):x("",!0)]),n.showPagingInfo?(o(),i("div",Zp,[l("div",Wp,[w.value?(o(),i("span",Gp,"Querying...")):x("",!0),T.value.length?(o(),i("span",Jp,[Xp,ke(" "+F(b.value+1)+" - "+F(Math.min(b.value+T.value.length,A.value))+" ",1),l("span",null," of "+F(A.value),1)])):h.value.completed?(o(),i("span",Yp,"No Results")):x("",!0)])])):x("",!0),q.value&&n.showResetPreferences?(o(),i("div",em,[l("button",{type:"button",onClick:se,title:"Reset Preferences & Filters",class:y(f.value)},sm,2)])):x("",!0),l("div",lm,[n.showFiltersView&&0<_.value?(o(),i("div",nm,[l("button",{type:"button",onClick:e[5]||(e[5]=e=>k.value="filters"==k.value?null:"filters"),class:y(f.value),"aria-expanded":"false"},[om,l("span",am,F(_.value)+" "+F(1==_.value?"Filter":"Filters"),1),"filters"!=k.value?(o(),i("svg",rm,um)):(o(),i("svg",dm,fm))],2)])):x("",!0)])]),"filters"==k.value?(o(),ae(Il,{key:0,class:"border-y border-gray-200 dark:border-gray-800 py-8 my-2",definitions:m.value,columns:E.value,onDone:e[6]||(e[6]=e=>k.value=null),onChange:ne},null,8,["definitions","columns"])):x("",!0),H.value?(o(),i("div",vm,[ye(Fl,{definitions:m.value,column:H.value.column,"top-left":H.value.topLeft,onDone:le,onSave:te},null,8,["definitions","column","top-left"])])):x("",!0),h.value.error?(o(),ae(t,{key:2,status:h.value.error},null,8,["status"])):w.value?(o(),ae(a,{key:3})):(o(),i("div",pm,[T.value.length?(o(),i("div",mm,[ye(s,{id:n.id,items:T.value,type:n.refInfo.model,"selected-columns":G.value,onFiltersChanged:N,tableStyle:"fullWidth",rowClass:L,onRowSelected:J,onHeaderSelected:ee},rl({header:xe(({column:t,label:e})=>{var a;return[!n.allowFiltering||d.canFilter&&!d.canFilter(t)?(o(),i("div",ym,[l("span",bm,F(e),1)])):(o(),i("div",hm,[l("span",gm,F(e),1),ye(r,{column:E.value.find(e=>e.name.toLowerCase()===t.toLowerCase()),"is-open":(null==(a=H.value)?void 0:a.column.name)===t},null,8,["column","is-open"])]))]}),_:2},[je(Object.keys(X(c)),l=>({name:l,fn:xe(e=>[U(n.$slots,l,Rt(ks(e)))])}))]),1032,["id","items","type","selected-columns"])])):x("",!0)]))])]),_:3},8,["id"])):x("",!0),D.value?(o(),ae(jl,{key:1,columns:V.value,prefs:g.value,onDone:e[7]||(e[7]=e=>D.value=!1),onSave:re},null,8,["columns","prefs"])):x("",!0)],64)}}}),km={class:"sm:hidden"},_m=["for"],$m=["id","name"],Cm=["value"],xm={class:"hidden sm:block"},Lm={class:"border-b border-gray-200"},Vm={class:"-mb-px flex","aria-label":"Tabs"},Sm=["onClick"],Mm=de({__name:"Tabs",props:{tabs:{},id:{default:"tabs"},param:{default:"tab"},label:{type:Function,default:e=>Pe(e)},selected:{},tabClass:{},bodyClass:{default:"p-4"},url:{type:Boolean,default:!0},clearQuery:{type:Boolean,default:!1}},setup(e){let t=e,a=v(()=>Object.keys(t.tabs)),n=e=>t.label?t.label(e):Pe(e),r=v(()=>t.id||"tabs"),s=v(()=>t.param||"tab"),u=O();function d(e){u.value=e,t.url&&ul({tab:e===a.value[0]?void 0:e},t.clearQuery)}let c=v(()=>100/Object.keys(t.tabs).length+"%");return Ye(()=>{var e;u.value=t.selected||Object.keys(t.tabs)[0],t.url&&(e=location.search||(location.hash.includes("?")?"?"+ms(location.hash,"?"):""),e=Zs(e)[s.value])&&(u.value=e)}),(t,e)=>(o(),i("div",null,[l("div",km,[l("label",{for:r.value,class:"sr-only"},"Select a tab",8,_m),l("select",{id:r.value,name:r.value,class:"block w-full rounded-md border-gray-300 focus:border-indigo-500 focus:ring-indigo-500",onChange:e[0]||(e[0]=e=>{var l;return d(null==(l=e.target)?void 0:l.value)})},[(o(!0),i(Me,null,je(a.value,e=>(o(),i("option",{key:e,value:e},F(n(e)),9,Cm))),128))],40,$m)]),l("div",xm,[l("div",Lm,[l("nav",Vm,[(o(!0),i(Me,null,je(a.value,l=>{return o(),i("a",{href:"#",onClick:Ue(e=>d(l),["prevent"]),style:nl({width:c.value}),class:y([(e=l,u.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"),t.tabClass])},F(n(l)),15,Sm);var e}),256))])])]),l("div",{class:y(t.bodyClass)},[(o(),ae(an(t.tabs[u.value])))],2)]))}}),Am=l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 text-gray-400",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 32 32"},[l("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),Tm=[Am],Fm=l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 text-indigo-600",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 32 32"},[l("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=[Fm],jm=de({__name:"DarkModeToggle",setup(e){let a=typeof document<"u"?document.documentElement:null,n=()=>!(null==a||!a.classList.contains("dark")),r=O("dark"==localStorage.getItem("color-scheme"));return(e,t)=>(o(),i("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=>{n()?null!=a&&a.classList.remove("dark"):null!=a&&a.classList.add("dark"),r.value=n(),localStorage.setItem("color-scheme",r.value?"dark":"light")})},[l("span",{class:y(`${r.value?"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`)},[l("span",{class:y(`${r.value?"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"},Tm,2),l("span",{class:y(`${r.value?"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)]))}}),Om={key:0},Dm={key:1,class:"min-h-full flex flex-col justify-center py-12 sm:px-6 lg:px-8"},Pm={class:"sm:mx-auto sm:w-full sm:max-w-md"},Bm={class:"mt-6 text-center text-3xl font-extrabold text-gray-900"},Hm={key:0,class:"mt-4 text-center text-sm text-gray-600"},Rm={class:"relative z-0 inline-flex shadow-sm rounded-md"},Em=["onClick"],zm={class:"mt-8 sm:mx-auto sm:w-full sm:max-w-md"},Nm={class:"bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10"},Um={class:"mt-8"},qm={key:1,class:"mt-6"},Qm=xs('
Or continue with
',1),Km={class:"mt-6 grid grid-cols-3 gap-3"},Zm=["href","title"],Wm={key:1,class:"h-5 w-5 text-gray-700",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},Gm=l("path",{d:"M16 8a5 5 0 1 0 5 5a5 5 0 0 0-5-5z",fill:"currentColor"},null,-1),Jm=l("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),Xm=[Gm,Jm],Ym=de({__name:"SignIn",props:{provider:{},title:{default:"Sign In"},tabs:{type:[Boolean,String],default:!0},oauth:{type:[Boolean,String],default:!0}},emits:["login"],setup(e,{emit:t}){let a=e,n=t,{getMetadata:r,createDto:s}=lt(),u=Ds(),d=Qe("client"),c=Tl().signIn,p=r({assert:!0}),f=p.plugins.auth,m=document.baseURI,g=p.app.baseUrl,h=O(s("Authenticate")),b=O(new Xe),w=O(a.provider),k=(Ye(()=>{null!=f&&f.authProviders.map(e=>e.formLayout).filter(e=>e).forEach(e=>e.forEach(e=>h.value[e.id]="checkbox"!==e.type&&""))}),v(()=>(null==f?void 0:f.authProviders.filter(e=>e.formLayout))||[])),C=v(()=>k.value[0]||{}),L=v(()=>k.value[Math.max(k.value.length-1,0)]||{}),M=v(()=>(w.value?null==f?void 0:f.authProviders.find(e=>e.name===w.value):null)??C.value),V=e=>!1===e||"false"===e;function S(e){return e.label||e.navItem&&e.navItem.label}let T=v(()=>{var e;return((null==(e=M.value)?void 0:e.formLayout)||[]).map(e=>{var l;return Object.assign({},e,{type:null==(l=e.type)?void 0:l.toLowerCase(),autocomplete:e.autocomplete||("password"===(null==(l=e.type)?void 0:l.toLowerCase())?"current-password":void 0)||("username"===e.id.toLowerCase()?"username":void 0),css:Object.assign({field:"col-span-12"},e.css)})})}),A=v(()=>!V(a.oauth)&&(null==f?void 0:f.authProviders.filter(e=>"oauth"===e.type))||[]),I=v(()=>{let e=Ho(null==f?void 0:f.authProviders.filter(e=>e.formLayout&&0{e[S(l)||at(l.name)]=l.name===C.value.name?"":l.name});var l=M.value;return e=l&&V(a.tabs)?{[S(l)||at(l.name)]:l}:e}),j=v(()=>{var e=T.value.map(e=>e.id).filter(e=>e);return b.value.summaryMessage(e)});async function $(){var e;h.value.provider=M.value.name,"authsecret"===M.value.name?(d.headers.set("authsecret",h.value.authsecret),h.value=s("Authenticate")):"basic"===M.value.name?(d.setCredentials(h.value.UserName,h.value.Password),h.value=s("Authenticate"),h.value.UserName=null,h.value.Password=null):"Bearer"!==M.value.type&&"jwt"!==M.value.name||(d.bearerToken=h.value.BearerToken,h.value=s("Authenticate")),b.value=await u.api(h.value),b.value.succeeded&&(e=b.value.response,c(e),n("login",e),b.value=new Xe,h.value=s("Authenticate"))}return(e,t)=>{let a=Z("ErrorSummary"),n=Z("AutoFormFields"),r=Z("PrimaryButton"),s=Z("Icon"),u=_o("href");return X(f)?(o(),i("div",Dm,[l("div",Pm,[l("h2",Bm,F(e.title),1),1Mt((o(),i("a",{onClick:e=>w.value=l,class:y([""===l||l===C.value.name?"rounded-l-md":l===L.value.name?"rounded-r-md -ml-px":"-ml-px",w.value===l?"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"])},[ke(F(e),1)],10,Em)),[[u,{provider:l}]])),256))])])):x("",!0)]),l("div",zm,[j.value?(o(),ae(a,{key:0,class:"mb-3",errorSummary:j.value},null,8,["errorSummary"])):x("",!0),l("div",Nm,[T.value.length?(o(),i("form",{key:0,onSubmit:Ue($,["prevent"])},[ye(n,{modelValue:h.value,formLayout:T.value,api:b.value,hideSummary:!0,"divide-class":"","space-class":"space-y-6"},null,8,["modelValue","formLayout","api"]),l("div",Um,[ye(r,{class:"w-full"},{default:xe(()=>[ke("Sign In")]),_:1})])],32)):x("",!0),A.value.length?(o(),i("div",qm,[Qm,l("div",Km,[(o(!0),i(Me,null,je(A.value,e=>(o(),i("div",null,[l("a",{href:X(g)+e.navItem.href+"?continue="+X(m),title:S(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(),ae(s,{key:0,image:e.icon,class:"h-5 w-5 text-gray-700"},null,8,["image"])):(o(),i("svg",Wm,Xm))],8,Zm)]))),256))])])):x("",!0)])])])):(o(),i("div",Om,"No Auth Plugin"))}}}),e1=["for"],t1={key:1,class:"border border-gray-200 flex justify-between"},s1={class:"p-2 flex flex-wrap gap-x-4"},l1=l("title",null,"Bold text (CTRL+B)",-1),n1=l("path",{fill:"currentColor",d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79c0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79c0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"},null,-1),o1=[l1,n1],a1=l("title",null,"Italics (CTRL+I)",-1),r1=l("path",{fill:"currentColor",d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4h-8z"},null,-1),i1=[a1,r1],u1=l("title",null,"Insert Link (CTRL+K)",-1),d1=l("path",{fill:"currentColor",d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7a5 5 0 0 0-5 5a5 5 0 0 0 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8v2m9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1c0 1.71-1.39 3.1-3.1 3.1h-4V17h4a5 5 0 0 0 5-5a5 5 0 0 0-5-5Z"},null,-1),c1=[u1,d1],f1=l("title",null,"Blockquote (CTRL+Q)",-1),v1=l("path",{fill:"currentColor",d:"m15 17l2-4h-4V6h7v7l-2 4h-3Zm-9 0l2-4H4V6h7v7l-2 4H6Z"},null,-1),p1=[f1,v1],m1=l("title",null,"Insert Image (CTRL+SHIFT+L)",-1),h1=l("path",{fill:"currentColor",d:"M2.992 21A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992ZM20 15V5H4v14L14 9l6 6Zm0 2.828l-6-6L6.828 19H20v-1.172ZM8 11a2 2 0 1 1 0-4a2 2 0 0 1 0 4Z"},null,-1),g1=[m1,h1],y1=l("title",null,"Insert Code (CTRL+<)",-1),b1=l("path",{fill:"currentColor",d:"m8 18l-6-6l6-6l1.425 1.425l-4.6 4.6L9.4 16.6L8 18Zm8 0l-1.425-1.425l4.6-4.6L14.6 7.4L16 6l6 6l-6 6Z"},null,-1),w1=[y1,b1],k1=l("title",null,"H2 Heading (CTRL+H)",-1),_1=l("path",{fill:"currentColor",d:"M7 20V7H2V4h13v3h-5v13H7Zm9 0v-8h-3V9h9v3h-3v8h-3Z"},null,-1),$1=[k1,_1],C1=l("title",null,"Numbered List (ALT+1)",-1),x1=l("path",{fill:"currentColor",d:"M3 22v-1.5h2.5v-.75H4v-1.5h1.5v-.75H3V16h3q.425 0 .713.288T7 17v1q0 .425-.288.713T6 19q.425 0 .713.288T7 20v1q0 .425-.288.713T6 22H3Zm0-7v-2.75q0-.425.288-.713T4 11.25h1.5v-.75H3V9h3q.425 0 .713.288T7 10v1.75q0 .425-.288.713T6 12.75H4.5v.75H7V15H3Zm1.5-7V3.5H3V2h3v6H4.5ZM9 19v-2h12v2H9Zm0-6v-2h12v2H9Zm0-6V5h12v2H9Z"},null,-1),L1=[C1,x1],V1=l("title",null,"Bulleted List (ALT+-)",-1),S1=l("path",{fill:"currentColor",d:"M9 19v-2h12v2H9Zm0-6v-2h12v2H9Zm0-6V5h12v2H9ZM5 20q-.825 0-1.413-.588T3 18q0-.825.588-1.413T5 16q.825 0 1.413.588T7 18q0 .825-.588 1.413T5 20Zm0-6q-.825 0-1.413-.588T3 12q0-.825.588-1.413T5 10q.825 0 1.413.588T7 12q0 .825-.588 1.413T5 14Zm0-6q-.825 0-1.413-.588T3 6q0-.825.588-1.413T5 4q.825 0 1.413.588T7 6q0 .825-.588 1.413T5 8Z"},null,-1),M1=[V1,S1],A1=l("title",null,"Strike Through (ALT+S)",-1),T1=l("path",{fill:"currentColor",d:"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"},null,-1),F1=[A1,T1],I1=l("title",null,"Undo (CTRL+Z)",-1),j1=l("path",{fill:"currentColor",d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"},null,-1),O1=[I1,j1],D1=l("title",null,"Redo (CTRL+SHIFT+Z)",-1),P1=l("path",{fill:"currentColor",d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"},null,-1),B1=[D1,P1],H1={key:0,class:"p-2 flex flex-wrap gap-x-4"},R1=["href"],E1=l("path",{fill:"currentColor",d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5c0-2.21-1.79-4-4-4z"},null,-1),z1=[E1],N1={class:""},U1=["name","id","label","value","rows","disabled"],q1=["id"],Q1=["id"],Je="w-5 h-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400",K1=de({__name:"MarkdownInput",props:{status:{},id:{},inputClass:{},label:{},labelClass:{},help:{},placeholder:{},modelValue:{},counter:{type:Boolean},rows:{},errorMessages:{},lang:{},autoFocus:{type:Boolean},disabled:{type:Boolean},helpUrl:{default:"https://guides.github.com/features/mastering-markdown/"},hide:{}},emits:["update:modelValue","close"],setup(e,{expose:t,emit:a}){let n=e,r=a,h=[],b=[],s=Qe("ApiState",void 0),u=v(()=>mt.call({responseStatus:n.status??(null==s?void 0:s.error.value)},n.id)),d=v(()=>n.label??Pe(at(n.id))),c="bold,italics,link,image,blockquote,code,heading,orderedList,unorderedList,strikethrough,undo,redo,help".split(","),p=v(()=>n.hide?Vt(c,n.hide):Vt(c,[]));function f(e){return p.value[e]}let m=v(()=>["shadow-sm font-mono"+ot.base.replace("rounded-md",""),u.value?"text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300":"text-gray-900 "+ot.valid,n.inputClass]),w=O();function k(e){r("update:modelValue",e)}function g(){return w.value.selectionStart!==w.value.selectionEnd}function C(){var e=w.value;return e.value.substring(e.selectionStart,e.selectionEnd)||""}function L(){var e=w.value,l=e.value,t=e.selectionStart,e=l.substring(t,e.selectionEnd)||"",a=l.substring(0,t),n=a.lastIndexOf(` +`);return{value:l,sel:e,selPos:t,beforeSel:a,afterSel:l.substring(t),prevCRPos:n,beforeCR:0<=n?a.substring(0,n+1):"",afterCR:0<=n?a.substring(n+1):""}}function M({value:e,selectionStart:l,selectionEnd:t}){null==t&&(t=l),k(e),St(()=>{w.value.focus(),w.value.setSelectionRange(l,t)})}function V(e,l,t="",{selectionAtEnd:a,offsetStart:n,offsetEnd:r,filterValue:s,filterSelection:o}={}){let i=w.value,u=i.value,d=i.selectionEnd;h.push({value:u,selectionStart:i.selectionStart,selectionEnd:i.selectionEnd}),b=[];var v,c=i.selectionStart,p=i.selectionEnd,f=u.substring(0,c),m=u.substring(p),g=e&&f.endsWith(e)&&m.startsWith(l);c==p?(g?(u=f.substring(0,f.length-e.length)+m.substring(l.length),d+=-l.length):(u=f+e+t+l+m,d+=e.length,n=0,r=(null==t?void 0:t.length)||0,a&&(d+=r,r=0)),s&&(v={pos:d},u=s(u,v),d=v.pos)):(v=u.substring(c,p),o&&(v=o(v)),g?(u=f.substring(0,f.length-e.length)+v+m.substring(l.length),n=-v.length-e.length,r=v.length):(u=f+e+v+l+m,n?d+=(e+l).length:(d=c,n=e.length,r=v.length))),k(u),St(()=>{i.focus(),n=d+(n||0),r=(n||0)+(r||0),i.setSelectionRange(n,r)})}t({props:n,textarea:w,updateModelValue:k,selection:C,hasSelection:g,selectionInfo:L,insert:V,replace:M});let S=()=>V("**","**","bold"),T=()=>V("_","_","italics"),A=()=>V("~~","~~","strikethrough"),I=()=>V("[","](https://)","",{offsetStart:-9,offsetEnd:8}),j=()=>V(` > `,` -`,"Blockquote",{}),j=()=>S("![](",")");function B(e){var t=C();t&&!e.shiftKey?S("`","`","code"):(e=n.lang||"js",-1===t.indexOf(` -`)?S("\n```"+e+` -`,"\n```\n","// code"):S("```"+e+` -`,"```\n",""))}function $(){if(k()){let{sel:e,beforeSel:a,afterSel:n,prevCRPos:s,beforeCR:o,afterCR:r}=L();if(-1===e.indexOf(` -`))S(` +`,"Blockquote",{}),$=()=>V("![](",")");function B(e){var l,t=C();t&&!e.shiftKey?V("`","`","code"):(l=n.lang||"js",-1===t.indexOf(` +`)?V("\n```"+l+` +`,"\n```\n","// code"):V("```"+l+` +`,"```\n",""))}function E(){if(g()){let{sel:e,beforeSel:a,afterSel:n,prevCRPos:r,beforeCR:s,afterCR:o}=L();if(-1===e.indexOf(` +`))V(` 1. `,` -`);else if(e.startsWith(" 1. "))S("","","",{filterValue:(e,t)=>{var l;return 0<=s&&(l=r.replace(/^ - /,""),a=o+l,t.pos-=r.length-l.length),a+n},filterSelection:e=>e.replace(/^ 1. /g,"").replace(/\n \d+. /g,` -`)});else{let t=1;S("",""," - ",{selectionAtEnd:!0,filterSelection:e=>" 1. "+e.replace(/\n$/,"").replace(/\n/g,e=>` - ${++t}. `)+` -`})}}else S(` +`);else if(e.startsWith(" 1. "))V("","","",{filterValue:(e,l)=>{var t;return 0<=r&&(t=o.replace(/^ - /,""),a=s+t,l.pos-=o.length-t.length),a+n},filterSelection:e=>e.replace(/^ 1. /g,"").replace(/\n \d+. /g,` +`)});else{let l=1;V("",""," - ",{selectionAtEnd:!0,filterSelection:e=>" 1. "+e.replace(/\n$/,"").replace(/\n/g,e=>` + ${++l}. `)+` +`})}}else V(` 1. `,` -`,"List Item",{offsetStart:-10,offsetEnd:9})}function O(){if(k()){let{sel:e,beforeSel:a,afterSel:n,prevCRPos:s,beforeCR:o,afterCR:r}=L();-1===e.indexOf(` -`)?S(` +`,"List Item",{offsetStart:-10,offsetEnd:9})}function _(){if(g()){let{sel:e,beforeSel:a,afterSel:n,prevCRPos:r,beforeCR:s,afterCR:o}=L();-1===e.indexOf(` +`)?V(` - `,` -`):e.startsWith(" - ")?S("","","",{filterValue:(e,t)=>{var l;return 0<=s&&(l=r.replace(/^ - /,""),a=o+l,t.pos-=r.length-l.length),a+n},filterSelection:e=>e.replace(/^ - /g,"").replace(/\n - /g,` -`)}):S("",""," - ",{selectionAtEnd:!0,filterSelection:e=>" - "+e.replace(/\n$/,"").replace(/\n/g,` +`):e.startsWith(" - ")?V("","","",{filterValue:(e,l)=>{var t;return 0<=r&&(t=o.replace(/^ - /,""),a=s+t,l.pos-=o.length-t.length),a+n},filterSelection:e=>e.replace(/^ - /g,"").replace(/\n - /g,` +`)}):V("",""," - ",{selectionAtEnd:!0,filterSelection:e=>" - "+e.replace(/\n$/,"").replace(/\n/g,` - `)+` -`})}else S(` +`})}else V(` - `,` -`,"List Item",{offsetStart:-10,offsetEnd:9})}function E(){var e=C(),t=-1===e.indexOf(` -`);e?t?S(` +`,"List Item",{offsetStart:-10,offsetEnd:9})}function D(){var e=C(),l=-1===e.indexOf(` +`);e?l?V(` ## `,` -`,""):S("## ","",""):S(` +`,""):V("## ","",""):V(` ## `,` -`,"Heading",{offsetStart:-8,offsetEnd:7})}function z(){var e,t;return 0!==g.length&&(e=h.value,t=g.pop(),y.push({value:e.value,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}),V(t),!0)}function H(){var e,t;return 0!==y.length&&(e=h.value,t=y.pop(),g.push({value:e.value,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}),V(t),!0)}const _=()=>null;return st(()=>{g=[],y=[],h.value.onkeydown=e=>{if("Escape"===e.key||27===e.keyCode)s("close");else{var t=String.fromCharCode(e.keyCode).toLowerCase();if("\t"===t)e.shiftKey?S("","","",{filterValue:(e,t)=>{let{beforeSel:l,afterSel:a,prevCRPos:n,beforeCR:s,afterCR:o}=L();var r;return 0<=n&&(r=o.replace(/\t/g," ").replace(/^ ? ? ? ?/,""),l=s+r,t.pos-=o.length-r.length),l+a},filterSelection:e=>e.replace(/\t/g," ").replace(/^ ? ? ? ?/g,"").replace(/\n /g,` -`)}):S("",""," ",{selectionAtEnd:!0,filterSelection:e=>" "+e.replace(/\n$/,"").replace(/\n/g,` +`,"Heading",{offsetStart:-8,offsetEnd:7})}function H(){var e,l;return 0!==h.length&&(e=w.value,l=h.pop(),b.push({value:e.value,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}),M(l),!0)}function P(){var e,l;return 0!==b.length&&(e=w.value,l=b.pop(),h.push({value:e.value,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}),M(l),!0)}let R=()=>null;return Ye(()=>{h=[],b=[],w.value.onkeydown=e=>{if("Escape"===e.key||27===e.keyCode)r("close");else{var l=String.fromCharCode(e.keyCode).toLowerCase();if("\t"===l)e.shiftKey?V("","","",{filterValue:(e,l)=>{let{beforeSel:t,afterSel:a,prevCRPos:n,beforeCR:r,afterCR:s}=L();var o;return 0<=n&&(o=s.replace(/\t/g," ").replace(/^ ? ? ? ?/,""),t=r+o,l.pos-=s.length-o.length),t+a},filterSelection:e=>e.replace(/\t/g," ").replace(/^ ? ? ? ?/g,"").replace(/\n /g,` +`)}):V("",""," ",{selectionAtEnd:!0,filterSelection:e=>" "+e.replace(/\n$/,"").replace(/\n/g,` `)+` -`}),e.preventDefault();else if(e.ctrlKey)if("z"===t)e.shiftKey?H()&&e.preventDefault():z()&&e.preventDefault();else if("b"!==t||e.shiftKey)if("h"!==t||e.shiftKey)if("i"!==t||e.shiftKey)if("q"!==t||e.shiftKey)if("k"===t)(e.shiftKey?j:F)(),e.preventDefault();else if(","===t||"<"===e.key||">"===e.key||188===e.keyCode)B(e),e.preventDefault();else if("/"!==t&&"/"!==e.key)"?"!==t&&"?"!==e.key||!e.shiftKey||(S(`/* +`}),e.preventDefault();else if(e.ctrlKey)if("z"===l)e.shiftKey?P()&&e.preventDefault():H()&&e.preventDefault();else if("b"!==l||e.shiftKey)if("h"!==l||e.shiftKey)if("i"!==l||e.shiftKey)if("q"!==l||e.shiftKey)if("k"===l)(e.shiftKey?$:I)(),e.preventDefault();else if(","===l||"<"===e.key||">"===e.key||188===e.keyCode)B(e),e.preventDefault();else if("/"!==l&&"/"!==e.key)"?"!==l&&"?"!==e.key||!e.shiftKey||(V(`/* `,`*/ -`,""),e.preventDefault());else{{let{sel:e,selPos:t,beforeSel:a,afterSel:n,prevCRPos:s,beforeCR:o,afterCR:r}=L();e.startsWith("//")||r.startsWith("//")?S("","","",{filterValue:(e,t)=>{var l;return 0<=s&&(l=r.replace(/^\/\//,""),a=o+l,t.pos-=r.length-l.length),a+n},filterSelection:e=>e.replace(/^\/\//g,"").replace(/\n\/\//g,` -`)}):e?S("","","//",{selectionAtEnd:!0,filterSelection:e=>"//"+e.replace(/\n$/,"").replace(/\n/g,` +`,""),e.preventDefault());else{{let{sel:e,selPos:l,beforeSel:a,afterSel:n,prevCRPos:r,beforeCR:s,afterCR:o}=L();e.startsWith("//")||o.startsWith("//")?V("","","",{filterValue:(e,l)=>{var t;return 0<=r&&(t=o.replace(/^\/\//,""),a=s+t,l.pos-=o.length-t.length),a+n},filterSelection:e=>e.replace(/^\/\//g,"").replace(/\n\/\//g,` +`)}):e?V("","","//",{selectionAtEnd:!0,filterSelection:e=>"//"+e.replace(/\n$/,"").replace(/\n/g,` //`)+` -`}):V({value:o+"//"+r+n,selectionStart:t+2})}e.preventDefault()}else D(),e.preventDefault();else A(),e.preventDefault();else E(),e.preventDefault();else M(),e.preventDefault();else e.altKey&&("1"===e.key||"0"===e.key?($(),e.preventDefault()):"-"===e.key?(O(),e.preventDefault()):"s"===e.key&&(T(),e.preventDefault()))}}}),(e,t)=>{var a;return o(),i("div",null,[K(e.$slots,"header",Ae({inputElement:h.value,id:e.id,modelValue:e.modelValue,status:e.status},e.$attrs)),d.value?(o(),i("label",{key:0,for:e.id,class:b("mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300 "+(e.labelClass??""))},P(d.value),11,y1)):x("",!0),e.disabled?x("",!0):(o(),i("div",b1,[l("div",w1,[f("bold")?(o(),i("svg",{key:0,class:b(Je),onClick:M,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},$1)):x("",!0),f("italics")?(o(),i("svg",{key:1,class:b(Je),onClick:A,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},L1)):x("",!0),f("link")?(o(),i("svg",{key:2,class:b(Je),onClick:F,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},M1)):x("",!0),f("blockquote")?(o(),i("svg",{key:3,class:b(Je),onClick:D,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},F1)):x("",!0),f("image")?(o(),i("svg",{key:4,class:b(Je),onClick:j,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},P1)):x("",!0),f("code")?(o(),i("svg",{key:5,class:b(Je),onClick:B,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},B1)):x("",!0),f("heading")?(o(),i("svg",{key:6,class:b(Je),onClick:E,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},H1)):x("",!0),f("orderedList")?(o(),i("svg",{key:7,class:b(Je),icon:"",onClick:$,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},U1)):x("",!0),f("unorderedList")?(o(),i("svg",{key:8,class:b(Je),onClick:O,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},K1)):x("",!0),f("strikethrough")?(o(),i("svg",{key:9,class:b(Je),onClick:T,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},G1)):x("",!0),f("undo")?(o(),i("svg",{key:10,class:b(Je),onClick:z,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Y1)):x("",!0),f("redo")?(o(),i("svg",{key:11,class:b(Je),onClick:H,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},sm)):x("",!0),K(e.$slots,"toolbarbuttons",{instance:null==(a=Be())?void 0:a.exposed})]),f("help")&&e.helpUrl?(o(),i("div",lm,[l("a",{title:"formatting help",target:"_blank",href:e.helpUrl,tabindex:"-1"},[(o(),i("svg",{class:b(Je),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},am))],8,nm)])):x("",!0)])),l("div",rm,[l("textarea",{ref_key:"txt",ref:h,name:e.id,id:e.id,class:b(m.value),label:e.label,value:e.modelValue,rows:e.rows||6,disabled:e.disabled,onInput:t[0]||(t[0]=e=>{return w((null==(e=e.target)?void 0:e.value)||"")}),onKeydown:nn(_,["tab"])},null,42,im)]),u.value?(o(),i("p",{key:2,class:"mt-2 text-sm text-red-500",id:e.id+"-error"},P(u.value),9,um)):e.help?(o(),i("p",{key:3,class:"mt-2 text-sm text-gray-500",id:e.id+"-description"},P(e.help),9,dm)):x("",!0),K(e.$slots,"footer",Ae({inputElement:h.value,id:e.id,modelValue:e.modelValue,status:e.status},e.$attrs))])}}}),fm={key:0,class:"relative z-10 lg:hidden",role:"dialog","aria-modal":"true"},vm={class:"fixed inset-0 flex"},pm=l("span",{class:"sr-only"},"Close sidebar",-1),mm=l("svg",{class:"h-6 w-6 text-white dark:text-black",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),hm=[pm,mm],gm={class:"flex grow flex-col gap-y-5 overflow-y-auto bg-white dark:bg-black px-6 pb-2"},ym={class:"hidden lg:fixed lg:inset-y-0 lg:z-10 lg:flex lg:w-72 lg:flex-col"},bm={class:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 dark:border-gray-700 bg-white dark:bg-black px-6"},wm={class:b(["sticky top-0 flex items-center gap-x-6 bg-white dark:bg-black px-4 py-4 shadow-sm sm:px-6 lg:hidden"])},km=l("span",{class:"sr-only"},"Open sidebar",-1),_m=l("svg",{class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})],-1),$m=[km,_m],Cm=ce({__name:"SidebarLayout",setup(e,{expose:t}){const a=gn()["transition"],n=I(!0),s=I(""),r={entering:{cls:"transition-opacity ease-linear duration-300",from:"opacity-0",to:"opacity-100"},leaving:{cls:"transition-opacity ease-linear duration-300",from:"opacity-100",to:"opacity-0"}},u=I(""),d={entering:{cls:"transition ease-in-out duration-300 transform",from:"-translate-x-full",to:"translate-x-0"},leaving:{cls:"transition ease-in-out duration-300 transform",from:"translate-x-0",to:"-translate-x-full"}},c=I(""),v={entering:{cls:"ease-in-out duration-300",from:"opacity-0",to:"opacity-100"},leaving:{cls:"ease-in-out duration-300",from:"opacity-100",to:"opacity-0"}};function p(e){a(r,s,e),a(d,u,e),a(v,c,e),setTimeout(()=>n.value=e,300)}function f(){p(!0)}function m(){p(!1)}return t({show:f,hide:m,toggle:p}),(e,t)=>(o(),i("div",null,[n.value?(o(),i("div",fm,[l("div",{class:b(["fixed inset-0 bg-gray-900/80",s.value])},null,2),l("div",vm,[l("div",{class:b(["relative mr-16 flex w-full max-w-xs flex-1",u.value])},[l("div",{class:b(["absolute left-full top-0 flex w-16 justify-center pt-5",c.value])},[l("button",{type:"button",onClick:m,class:"-m-2.5 p-2.5"},hm)],2),l("div",gm,[K(e.$slots,"default")])],2)])])):x("",!0),l("div",ym,[l("div",bm,[K(e.$slots,"default")])]),l("div",wm,[l("button",{type:"button",onClick:f,class:"-m-2.5 p-2.5 text-gray-700 dark:text-gray-200 lg:hidden"},$m),K(e.$slots,"mobiletitlebar")])]))}}),xm={Alert:Jo,AlertSuccess:ua,ErrorSummary:pa,InputDescription:ha,Icon:Xn,Loading:dr,OutlineButton:vr,PrimaryButton:hr,SecondaryButton:br,TextLink:kr,Breadcrumbs:Vr,Breadcrumb:Fr,NavList:Pr,NavListItem:Qr,AutoQueryGrid:md,SettingsIcons:Md,FilterViews:Il,FilterColumn:Fl,QueryPrefs:Dl,EnsureAccess:to,EnsureAccessDialog:Ad,TextInput:Ed,TextareaInput:Kd,SelectInput:Yd,CheckboxInput:rc,TagInput:Mc,FileInput:Xc,Autocomplete:p0,Combobox:g0,DynamicInput:y0,LookupInput:D0,AutoFormFields:P0,AutoForm:nf,AutoCreateForm:Lf,AutoEditForm:Kf,ConfirmDelete:Wf,FormLoading:tv,DataGrid:av,CellFormat:rv,PreviewFormat:vv,HtmlFormat:yv,CloseButton:$v,SlideOver:Bv,ModalDialog:qv,ModalLookup:Bp,Tabs:Kp,DarkModeToggle:Xp,SignIn:g1,MarkdownInput:cm,SidebarLayout:Cm},Qs=xm,Fm={install(t){function l(t){var e=Object.keys(t).filter(e=>t[e]).map(e=>encodeURIComponent(e)+"="+encodeURIComponent(t[e])).join("&");return e?"?"+e:"./"}Object.keys(Qs).forEach(e=>{t.component(e,Qs[e])}),t.directive("href",function(e,t){e.href=l(t.value),e.onclick=e=>{e.preventDefault(),history.pushState(t.value,"",l(t.value))}})},component(e,t){return e?t?Y.components[e]=t:Y.components[e]||Qs[e]||null:null}};export{Tm as css,Fm as default,Tl as useAuth,js as useClient,At as useConfig,Mm as useFiles,Am as useFormatters,rt as useMetadata,gn as useUtils}; \ No newline at end of file +`}):M({value:s+"//"+o+n,selectionStart:l+2})}e.preventDefault()}else j(),e.preventDefault();else T(),e.preventDefault();else D(),e.preventDefault();else S(),e.preventDefault();else e.altKey&&("1"===e.key||"0"===e.key?(E(),e.preventDefault()):"-"===e.key?(_(),e.preventDefault()):"s"===e.key&&(A(),e.preventDefault()))}}}),(e,t)=>{var a;return o(),i("div",null,[U(e.$slots,"header",Te({inputElement:w.value,id:e.id,modelValue:e.modelValue,status:e.status},e.$attrs)),d.value?(o(),i("label",{key:0,for:e.id,class:y("mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300 "+(e.labelClass??""))},F(d.value),11,e1)):x("",!0),e.disabled?x("",!0):(o(),i("div",t1,[l("div",s1,[f("bold")?(o(),i("svg",{key:0,class:y(Je),onClick:S,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},o1)):x("",!0),f("italics")?(o(),i("svg",{key:1,class:y(Je),onClick:T,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},i1)):x("",!0),f("link")?(o(),i("svg",{key:2,class:y(Je),onClick:I,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},c1)):x("",!0),f("blockquote")?(o(),i("svg",{key:3,class:y(Je),onClick:j,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},p1)):x("",!0),f("image")?(o(),i("svg",{key:4,class:y(Je),onClick:$,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},g1)):x("",!0),f("code")?(o(),i("svg",{key:5,class:y(Je),onClick:B,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},w1)):x("",!0),f("heading")?(o(),i("svg",{key:6,class:y(Je),onClick:D,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},$1)):x("",!0),f("orderedList")?(o(),i("svg",{key:7,class:y(Je),icon:"",onClick:E,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},L1)):x("",!0),f("unorderedList")?(o(),i("svg",{key:8,class:y(Je),onClick:_,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},M1)):x("",!0),f("strikethrough")?(o(),i("svg",{key:9,class:y(Je),onClick:A,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},F1)):x("",!0),f("undo")?(o(),i("svg",{key:10,class:y(Je),onClick:H,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},O1)):x("",!0),f("redo")?(o(),i("svg",{key:11,class:y(Je),onClick:P,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},B1)):x("",!0),U(e.$slots,"toolbarbuttons",{instance:null==(a=Be())?void 0:a.exposed})]),f("help")&&e.helpUrl?(o(),i("div",H1,[l("a",{title:"formatting help",target:"_blank",href:e.helpUrl,tabindex:"-1"},[(o(),i("svg",{class:y(Je),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},z1))],8,R1)])):x("",!0)])),l("div",N1,[l("textarea",{ref_key:"txt",ref:w,name:e.id,id:e.id,class:y(m.value),label:e.label,value:e.modelValue,rows:e.rows||6,disabled:e.disabled,onInput:t[0]||(t[0]=e=>{var l;return k((null==(l=e.target)?void 0:l.value)||"")}),onKeydown:on(R,["tab"])},null,42,U1)]),u.value?(o(),i("p",{key:2,class:"mt-2 text-sm text-red-500",id:e.id+"-error"},F(u.value),9,q1)):e.help?(o(),i("p",{key:3,class:"mt-2 text-sm text-gray-500",id:e.id+"-description"},F(e.help),9,Q1)):x("",!0),U(e.$slots,"footer",Te({inputElement:w.value,id:e.id,modelValue:e.modelValue,status:e.status},e.$attrs))])}}}),Z1={key:0,class:"relative z-10 lg:hidden",role:"dialog","aria-modal":"true"},W1={class:"fixed inset-0 flex"},G1=l("span",{class:"sr-only"},"Close sidebar",-1),J1=l("svg",{class:"h-6 w-6 text-white dark:text-black",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),X1=[G1,J1],Y1={class:"flex grow flex-col gap-y-5 overflow-y-auto bg-white dark:bg-black px-6 pb-2"},eh={class:"hidden lg:fixed lg:inset-y-0 lg:z-10 lg:flex lg:w-72 lg:flex-col"},th={class:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 dark:border-gray-700 bg-white dark:bg-black px-6"},sh={class:y(["sticky top-0 flex items-center gap-x-6 bg-white dark:bg-black px-4 py-4 shadow-sm sm:px-6 lg:hidden"])},lh=l("span",{class:"sr-only"},"Open sidebar",-1),nh=l("svg",{class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})],-1),oh=[lh,nh],ah=de({__name:"SidebarLayout",setup(e,{expose:t}){let a=bn().transition,n=O(!0),r=O(""),s={entering:{cls:"transition-opacity ease-linear duration-300",from:"opacity-0",to:"opacity-100"},leaving:{cls:"transition-opacity ease-linear duration-300",from:"opacity-100",to:"opacity-0"}},u=O(""),d={entering:{cls:"transition ease-in-out duration-300 transform",from:"-translate-x-full",to:"translate-x-0"},leaving:{cls:"transition ease-in-out duration-300 transform",from:"translate-x-0",to:"-translate-x-full"}},v=O(""),c={entering:{cls:"ease-in-out duration-300",from:"opacity-0",to:"opacity-100"},leaving:{cls:"ease-in-out duration-300",from:"opacity-100",to:"opacity-0"}};function p(e){a(s,r,e),a(d,u,e),a(c,v,e),setTimeout(()=>n.value=e,300)}function f(){p(!0)}function m(){p(!1)}return t({show:f,hide:m,toggle:p}),(e,t)=>(o(),i("div",null,[n.value?(o(),i("div",Z1,[l("div",{class:y(["fixed inset-0 bg-gray-900/80",r.value])},null,2),l("div",W1,[l("div",{class:y(["relative mr-16 flex w-full max-w-xs flex-1",u.value])},[l("div",{class:y(["absolute left-full top-0 flex w-16 justify-center pt-5",v.value])},[l("button",{type:"button",onClick:m,class:"-m-2.5 p-2.5"},X1)],2),l("div",Y1,[U(e.$slots,"default")])],2)])])):x("",!0),l("div",eh,[l("div",th,[U(e.$slots,"default")])]),l("div",sh,[l("button",{type:"button",onClick:f,class:"-m-2.5 p-2.5 text-gray-700 dark:text-gray-200 lg:hidden"},oh),U(e.$slots,"mobiletitlebar")])]))}}),rh={Alert:ea,AlertSuccess:fa,ErrorSummary:ga,InputDescription:ba,Icon:eo,Loading:pr,OutlineButton:gr,PrimaryButton:wr,SecondaryButton:$r,TextLink:xr,Breadcrumbs:Tr,Breadcrumb:Dr,NavList:Hr,NavListItem:Gr,AutoQueryGrid:wd,SettingsIcons:jd,FilterViews:Il,FilterColumn:Fl,QueryPrefs:jl,EnsureAccess:lo,EnsureAccessDialog:Od,TextInput:qd,TextareaInput:Xd,SelectInput:nc,CheckboxInput:fc,TagInput:jc,FileInput:l0,Autocomplete:b0,Combobox:_0,DynamicInput:$0,LookupInput:H0,AutoFormFields:R0,AutoForm:df,AutoCreateForm:Tf,AutoEditForm:Xf,AutoViewForm:gv,ConfirmDelete:bv,FormLoading:xv,DataGrid:Av,CellFormat:Tv,PreviewFormat:Pv,HtmlFormat:zv,MarkupFormat:qv,MarkupModel:ep,CloseButton:op,SlideOver:wp,ModalDialog:Vp,ModalLookup:wm,Tabs:Mm,DarkModeToggle:jm,SignIn:Ym,MarkdownInput:K1,SidebarLayout:ah},Qs=rh,vh={install(l){function t(l){var e=Object.keys(l).filter(e=>l[e]).map(e=>encodeURIComponent(e)+"="+encodeURIComponent(l[e])).join("&");return e?"?"+e:"./"}Object.keys(Qs).forEach(e=>{l.component(e,Qs[e])}),l.directive("href",function(e,l){e.href=t(l.value),e.onclick=e=>{e.preventDefault(),history.pushState(l.value,"",t(l.value))}})},component(e,l){return e?l?G.components[e]=l:G.components[e]||Qs[e]||null:null}};export{fh as css,vh as default,Tl as useAuth,Ds as useClient,It as useConfig,La as useFiles,ch as useFormatters,lt as useMetadata,bn as useUtils}; \ No newline at end of file diff --git a/MyApp/wwwroot/lib/mjs/servicestack-vue.mjs b/MyApp/wwwroot/lib/mjs/servicestack-vue.mjs index fb93850..346d68f 100644 --- a/MyApp/wwwroot/lib/mjs/servicestack-vue.mjs +++ b/MyApp/wwwroot/lib/mjs/servicestack-vue.mjs @@ -1,64 +1,64 @@ -var po = Object.defineProperty; -var mo = (e, t, s) => t in e ? po(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s; -var Le = (e, t, s) => (mo(e, typeof t != "symbol" ? t + "" : t, s), s); -import { defineComponent as ce, computed as v, openBlock as o, createElementBlock as i, normalizeClass as b, createElementVNode as l, createCommentVNode as x, renderSlot as K, ref as I, toDisplayString as P, inject as Ue, nextTick as $t, isRef as ln, unref as te, mergeProps as Ae, withModifiers as qe, h as yt, resolveComponent as G, createBlock as ae, withCtx as Ce, useAttrs as ho, createVNode as xe, createTextVNode as ke, watchEffect as ws, normalizeStyle as nl, Fragment as Ie, renderList as De, withDirectives as Ct, vModelCheckbox as ol, withKeys as nn, createStaticVNode as xs, vModelSelect as go, useSlots as al, getCurrentInstance as Be, onMounted as st, createSlots as rl, normalizeProps as Ot, guardReactiveProps as ks, vModelDynamic as yo, onUnmounted as zt, watch as St, vModelText as bo, resolveDynamicComponent as on, provide as ss, resolveDirective as wo } from "vue"; -import { errorResponseExcept as ko, dateFmt as an, toTime as _o, omit as ft, enc as Ks, appendQueryString as Bt, lastLeftPart as rn, setQueryString as $o, nameOf as Co, ApiResult as Xe, lastRightPart as xt, leftPart as Ls, map as Qe, toDate as Mt, toDateTime as xo, toCamelCase as Lo, mapGet as be, chop as Vo, fromXsdDuration as un, isDate as Vs, timeFmt12 as So, apiValue as Mo, indexOfAny as Ao, createBus as To, toKebabCase as Zl, sanitize as Fo, humanize as ze, delaySet as dn, rightPart as ms, queryString as Zs, combinePaths as Io, toPascalCase as ot, errorResponse as pt, trimEnd as Do, $1 as _s, ResponseStatus as Us, ResponseError as Wl, HttpMethods as il, omitEmpty as Po, uniqueKeys as Ws, humanify as cn, each as jo } from "@servicestack/client"; -const Oo = { class: "flex items-center" }, Bo = { +var ho = Object.defineProperty; +var go = (e, t, s) => t in e ? ho(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s; +var Le = (e, t, s) => (go(e, typeof t != "symbol" ? t + "" : t, s), s); +import { defineComponent as de, computed as v, openBlock as o, createElementBlock as i, normalizeClass as y, createElementVNode as l, createCommentVNode as x, renderSlot as U, ref as O, toDisplayString as F, inject as Qe, nextTick as St, isRef as nn, unref as X, mergeProps as Te, withModifiers as Ue, h as $t, resolveComponent as Z, createBlock as ae, withCtx as xe, useAttrs as yo, createVNode as ye, createTextVNode as ke, watchEffect as ws, normalizeStyle as nl, Fragment as Me, renderList as je, withDirectives as Mt, vModelCheckbox as ol, withKeys as on, createStaticVNode as xs, vModelSelect as bo, useSlots as al, getCurrentInstance as Be, onMounted as Ye, createSlots as rl, normalizeProps as Rt, guardReactiveProps as ks, vModelDynamic as wo, onUnmounted as Ft, watch as bt, vModelText as ko, resolveDynamicComponent as an, provide as ss, resolveDirective as _o } from "vue"; +import { errorResponseExcept as $o, toDate as pt, toTime as Co, omit as ft, enc as Ks, appendQueryString as Et, lastLeftPart as rn, setQueryString as xo, nameOf as Lo, ApiResult as Xe, lastRightPart as At, leftPart as Ls, map as Ze, toDateTime as Vo, toCamelCase as So, mapGet as _e, chop as Mo, fromXsdDuration as un, isDate as Vs, timeFmt12 as Ao, dateFmt as To, apiValue as Fo, indexOfAny as Io, createBus as jo, toKebabCase as Wl, sanitize as Oo, humanize as Pe, delaySet as dn, rightPart as ms, queryString as Zs, combinePaths as Do, toPascalCase as at, errorResponse as mt, trimEnd as Po, $1 as _s, ResponseStatus as Us, ResponseError as Gl, HttpMethods as il, omitEmpty as Bo, uniqueKeys as Ws, humanify as cn, each as Ho } from "@servicestack/client"; +const Ro = { class: "flex items-center" }, Eo = { key: 0, class: "flex-shrink-0 mr-3" -}, Ro = { +}, zo = { 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" -}, Eo = /* @__PURE__ */ l("path", { +}, No = /* @__PURE__ */ l("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), Ho = [ - Eo -], zo = { +}, null, -1), Uo = [ + No +], qo = { 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" -}, No = /* @__PURE__ */ l("path", { +}, Qo = /* @__PURE__ */ l("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), Uo = [ - No -], qo = { +}, null, -1), Ko = [ + Qo +], Zo = { 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" -}, Qo = /* @__PURE__ */ l("path", { +}, Wo = /* @__PURE__ */ l("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), Ko = [ - Qo -], Zo = { +}, null, -1), Go = [ + Wo +], Jo = { 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" -}, Wo = /* @__PURE__ */ l("path", { +}, Xo = /* @__PURE__ */ l("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), Go = [ - Wo -], Jo = /* @__PURE__ */ ce({ +}, null, -1), Yo = [ + Xo +], ea = /* @__PURE__ */ de({ __name: "Alert", props: { type: { default: "warn" }, @@ -66,28 +66,28 @@ const Oo = { class: "flex items-center" }, Bo = { }, setup(e) { const t = e, s = v(() => t.type == "info" ? "bg-blue-50 dark:bg-blue-200" : t.type == "error" ? "bg-red-50 dark:bg-red-200" : t.type == "success" ? "bg-green-50 dark:bg-green-200" : "bg-yellow-50 dark:bg-yellow-200"), n = v(() => t.type == "info" ? "border-blue-400" : t.type == "error" ? "border-red-400" : t.type == "success" ? "border-green-400" : "border-yellow-400"), a = v(() => t.type == "info" ? "text-blue-700" : t.type == "error" ? "text-red-700" : t.type == "success" ? "text-green-700" : "text-yellow-700"); - return (r, d) => (o(), i("div", { - class: b([s.value, n.value, "border-l-4 p-4"]) + return (r, u) => (o(), i("div", { + class: y([s.value, n.value, "border-l-4 p-4"]) }, [ - l("div", Oo, [ - r.hideIcon ? x("", !0) : (o(), i("div", Bo, [ - r.type == "warn" ? (o(), i("svg", Ro, Ho)) : r.type == "error" ? (o(), i("svg", zo, Uo)) : r.type == "info" ? (o(), i("svg", qo, Ko)) : r.type == "success" ? (o(), i("svg", Zo, Go)) : x("", !0) + l("div", Ro, [ + r.hideIcon ? x("", !0) : (o(), i("div", Eo, [ + r.type == "warn" ? (o(), i("svg", zo, Uo)) : r.type == "error" ? (o(), i("svg", qo, Ko)) : r.type == "info" ? (o(), i("svg", Zo, Go)) : r.type == "success" ? (o(), i("svg", Jo, Yo)) : x("", !0) ])), l("div", null, [ l("p", { - class: b([a.value, "text-sm"]) + class: y([a.value, "text-sm"]) }, [ - K(r.$slots, "default") + U(r.$slots, "default") ], 2) ]) ]) ], 2)); } -}), Xo = { +}), ta = { key: 0, class: "rounded-md bg-green-50 dark:bg-green-200 p-4", role: "alert" -}, Yo = { class: "flex" }, ea = /* @__PURE__ */ l("div", { class: "flex-shrink-0" }, [ +}, sa = { class: "flex" }, la = /* @__PURE__ */ l("div", { class: "flex-shrink-0" }, [ /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-green-400 dark:text-green-500", fill: "none", @@ -102,7 +102,7 @@ const Oo = { class: "flex items-center" }, Bo = { d: "M5 13l4 4L19 7" }) ]) -], -1), ta = { class: "ml-3" }, sa = { class: "text-sm font-medium text-green-800" }, la = { key: 0 }, na = { class: "ml-auto pl-3" }, oa = { class: "-mx-1.5 -my-1.5" }, aa = /* @__PURE__ */ l("span", { class: "sr-only" }, "Dismiss", -1), ra = /* @__PURE__ */ l("svg", { +], -1), na = { class: "ml-3" }, oa = { class: "text-sm font-medium text-green-800" }, aa = { key: 0 }, ra = { class: "ml-auto pl-3" }, ia = { class: "-mx-1.5 -my-1.5" }, ua = /* @__PURE__ */ l("span", { class: "sr-only" }, "Dismiss", -1), da = /* @__PURE__ */ l("svg", { class: "h-5 w-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", @@ -110,37 +110,37 @@ const Oo = { class: "flex items-center" }, Bo = { "aria-hidden": "true" }, [ /* @__PURE__ */ l("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, - ra -], ua = /* @__PURE__ */ ce({ +], -1), ca = [ + ua, + da +], fa = /* @__PURE__ */ de({ __name: "AlertSuccess", props: { message: {} }, setup(e) { - const t = I(!1); - return (s, n) => t.value ? x("", !0) : (o(), i("div", Xo, [ - l("div", Yo, [ - ea, - l("div", ta, [ - l("h3", sa, [ - s.message ? (o(), i("span", la, P(s.message), 1)) : K(s.$slots, "default", { key: 1 }) + const t = O(!1); + return (s, n) => t.value ? x("", !0) : (o(), i("div", ta, [ + l("div", sa, [ + la, + l("div", na, [ + l("h3", oa, [ + s.message ? (o(), i("span", aa, F(s.message), 1)) : U(s.$slots, "default", { key: 1 }) ]) ]), - l("div", na, [ - l("div", oa, [ + l("div", ra, [ + l("div", ia, [ l("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: n[0] || (n[0] = (a) => t.value = !0) - }, ia) + }, ca) ]) ]) ]) ])); } -}), da = { class: "flex" }, ca = /* @__PURE__ */ l("div", { class: "flex-shrink-0" }, [ +}), va = { class: "flex" }, pa = /* @__PURE__ */ l("div", { class: "flex-shrink-0" }, [ /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-red-400", xmlns: "http://www.w3.org/2000/svg", @@ -151,7 +151,7 @@ const Oo = { class: "flex items-center" }, Bo = { 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), fa = { class: "ml-3" }, va = { class: "text-sm text-red-700 dark:text-red-200" }, pa = /* @__PURE__ */ ce({ +], -1), ma = { class: "ml-3" }, ha = { class: "text-sm text-red-700 dark:text-red-200" }, ga = /* @__PURE__ */ de({ __name: "ErrorSummary", props: { status: {}, @@ -160,21 +160,21 @@ const Oo = { class: "flex items-center" }, Bo = { }, setup(e) { const t = e; - let s = Ue("ApiState", void 0); - const n = v(() => t.status || s != null && s.error.value ? ko.call({ responseStatus: t.status ?? (s == null ? void 0 : s.error.value) }, t.except ?? []) : null); + let s = Qe("ApiState", void 0); + const n = v(() => t.status || s != null && s.error.value ? $o.call({ responseStatus: t.status ?? (s == null ? void 0 : s.error.value) }, t.except ?? []) : null); return (a, r) => n.value ? (o(), i("div", { key: 0, - class: b(`bg-red-50 dark:bg-red-900 border-l-4 border-red-400 p-4 ${a.$props.class}`) + class: y(`bg-red-50 dark:bg-red-900 border-l-4 border-red-400 p-4 ${a.$props.class}`) }, [ - l("div", da, [ - ca, - l("div", fa, [ - l("p", va, P(n.value), 1) + l("div", va, [ + pa, + l("div", ma, [ + l("p", ha, F(n.value), 1) ]) ]) ], 2)) : x("", !0); } -}), ma = ["id", "aria-describedby"], ha = /* @__PURE__ */ ce({ +}), ya = ["id", "aria-describedby"], ba = /* @__PURE__ */ de({ __name: "InputDescription", props: { id: {}, @@ -187,26 +187,42 @@ const Oo = { class: "flex items-center" }, Bo = { id: `${t.id}-description`, "aria-describedby": `${t.id}-description` }, [ - l("div", null, P(t.description), 1) - ], 8, ma)) : x("", !0); + l("div", null, F(t.description), 1) + ], 8, ya)) : x("", !0); } }); function Ss(e) { - return an(e).replace(/\//g, "-"); + if (e == null || typeof e == "object") + return ""; + const t = pt(e); + return t == null || t.toString() == "Invalid Date" ? "" : t.toISOString().substring(0, 10) ?? ""; } function fn(e) { - return e == null ? "" : _o(e); + if (e == null || typeof e == "object") + return ""; + const t = pt(e); + return t == null || t.toString() == "Invalid Date" ? "" : t.toISOString().substring(0, 19) ?? ""; +} +function vn(e) { + return e == null ? "" : Co(e); +} +function pn(e, t) { + if (G.config.inputValue) + return G.config.inputValue(e, t); + let s = e === "date" ? Ss(t) : e === "datetime-local" ? fn(t) : e === "time" ? vn(t) : t; + const n = typeof s; + return s = s == null ? "" : n == "boolean" || n == "number" ? `${s}` : s, s; } -function vn(e, t) { - e.value = null, $t(() => e.value = t); +function mn(e, t) { + e.value = null, St(() => e.value = t); } -function It(e) { +function Dt(e) { return Object.keys(e).forEach((t) => { const s = e[t]; - e[t] = ln(s) ? te(s) : s; + e[t] = nn(s) ? X(s) : s; }), e; } -function Lt(e, t, s) { +function yt(e, t, s) { s ? (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 hs(e) { @@ -216,12 +232,12 @@ function hs(e) { if (s) { let n = ':not([disabled]):not([tabindex="-1"])', a = s.querySelectorAll(`a:not([disabled]), button${n}, input[type=text]${n}, [tabindex]${n}`), r = Array.prototype.filter.call( a, - (u) => u.offsetWidth > 0 || u.offsetHeight > 0 || u === t - ), d = r.indexOf(t); - d > -1 && (r[d + 1] || r[0]).focus(); + (d) => d.offsetWidth > 0 || d.offsetHeight > 0 || d === t + ), u = r.indexOf(t); + u > -1 && (r[u + 1] || r[0]).focus(); } } -function Nt(e) { +function qt(e) { if (!e) return null; if (typeof e == "string") @@ -247,17 +263,17 @@ function Gs(e) { function Ms(e) { return Object.assign({ target: "_blank", rel: "noopener", class: "text-blue-600" }, e); } -function jt(e) { +function Ht(e) { return Vl(e); } -let ga = ["string", "number", "boolean", "null", "undefined"]; -function Vt(e) { - return ga.indexOf(typeof e) >= 0 || e instanceof Date; +let wa = ["string", "number", "boolean", "null", "undefined"]; +function Tt(e) { + return wa.indexOf(typeof e) >= 0 || e instanceof Date; } function Xt(e) { - return !Vt(e); + return !Tt(e); } -class pn { +class hn { get length() { return typeof localStorage > "u" ? 0 : localStorage.length; } @@ -282,7 +298,7 @@ function $s(e) { } function ul(e, t) { if (typeof history < "u") { - const s = t ? Bt(rn(location.href, "?"), e) : $o(location.href, e); + const s = t ? Et(rn(location.href, "?"), e) : xo(location.href, e); history.pushState({}, "", s); } } @@ -299,30 +315,30 @@ function Js(e) { typeof navigator < "u" && navigator.clipboard.writeText(e); } function cl(e) { - const t = Y.config.storage.getItem(e); + const t = G.config.storage.getItem(e); return t ? JSON.parse(t) : null; } function As(e, t) { - return Bt(`swr.${Co(e)}`, t ? Object.assign({}, e, t) : e); + return Et(`swr.${Lo(e)}`, t ? Object.assign({}, e, t) : e); } -function ya(e) { +function ka(e) { if (e.request) { const t = As(e.request, e.args); - Y.config.storage.removeItem(t); + G.config.storage.removeItem(t); } } -async function mn(e, t, s, n, a) { +async function gn(e, t, s, n, a) { const r = As(t, n); s(new Xe({ response: cl(r) })); - const d = await e.api(t, n, a); - if (d.succeeded && d.response) { - d.response._date = (/* @__PURE__ */ new Date()).valueOf(); - const u = JSON.stringify(d.response); - Y.config.storage.setItem(r, u), s(d); + const u = await e.api(t, n, a); + if (u.succeeded && u.response) { + u.response._date = (/* @__PURE__ */ new Date()).valueOf(); + const d = JSON.stringify(u.response); + G.config.storage.setItem(r, d), s(u); } - return d; + return u; } -function hn(e, t) { +function yn(e, t) { let s = null; return (...n) => { s && clearTimeout(s), s = setTimeout(() => { @@ -330,42 +346,44 @@ function hn(e, t) { }, t || 100); }; } -function bt(e) { +function Ct(e) { return typeof e == "string" ? e.split(",") : e || []; } -function _t(e, t) { - const s = bt(t); +function Vt(e, t) { + const s = Ct(t); return e.reduce((n, a) => (n[a] = !s.includes(a), n), {}); } -function gn() { +function bn() { return { - LocalStore: pn, + LocalStore: hn, dateInputFormat: Ss, - timeInputFormat: fn, - setRef: vn, - unRefs: It, - transition: Lt, + dateTimeInputFormat: fn, + timeInputFormat: vn, + textInputValue: pn, + setRef: mn, + unRefs: Dt, + transition: yt, focusNextElement: hs, - getTypeName: Nt, + getTypeName: qt, htmlTag: dt, htmlAttrs: Gs, linkAttrs: Ms, - toAppUrl: jt, - isPrimitive: Vt, + toAppUrl: Ht, + isPrimitive: Tt, isComplexType: Xt, pushState: ul, scopedExpr: dl, copyText: Js, fromCache: cl, swrCacheKey: As, - swrClear: ya, - swrApi: mn, - asStrings: bt, - asOptions: _t, - createDebounce: hn + swrClear: ka, + swrApi: gn, + asStrings: Ct, + asOptions: Vt, + createDebounce: yn }; } -const yn = "png,jpg,jpeg,jfif,gif,svg,webp".split(","), bn = { +const wn = "png,jpg,jpeg,jfif,gif,svg,webp".split(","), kn = { 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(","), @@ -376,7 +394,7 @@ const yn = "png,jpg,jpeg,jfif,gif,svg,webp".split(","), bn = { exe: "exe,bat,sh,cmd,com,app,msi,run,vb,vbs,js,ws,wsh".split(","), att: "bin,oct,dat".split(",") //attachment -}, Gl = Object.keys(bn), vt = (e, t) => ``, gs = { +}, Jl = Object.keys(kn), vt = (e, t) => ``, gs = { img: vt("4 4 16 16", ""), vid: vt("0 0 24 24", ""), aud: vt("0 0 24 24", ""), @@ -386,8 +404,8 @@ const yn = "png,jpg,jpeg,jfif,gif,svg,webp".split(","), bn = { zip: vt("0 0 16 16", ""), exe: vt("0 0 16 16", ""), att: vt("0 0 24 24", "") -}, ba = /[\r\n%#()<>?[\\\]^`{|}]/g, Jl = 1024, wa = ["Bytes", "KB", "MB", "GB", "TB"], ka = (() => { - const e = "application/", t = e + "vnd.openxmlformats-officedocument.", s = "image/", n = "text/", a = "audio/", r = "video/", d = { +}, _a = /[\r\n%#()<>?[\\\]^`{|}]/g, Xl = 1024, $a = ["Bytes", "KB", "MB", "GB", "TB"], Ca = (() => { + const e = "application/", t = e + "vnd.openxmlformats-officedocument.", s = "image/", n = "text/", a = "audio/", r = "video/", u = { jpg: s + "jpeg", tif: s + "tiff", svg: s + "svg+xml", @@ -407,26 +425,26 @@ const yn = "png,jpg,jpeg,jfif,gif,svg,webp".split(","), bn = { ppsx: t + "presentationml.slideshow", mdb: e + "vnd.ms-access" }; - function u(f, p) { - f.split(",").forEach(($) => d[$] = p); + function d(f, p) { + f.split(",").forEach(($) => u[$] = p); } function c(f, p) { - f.split(",").forEach(($) => d[$] = p($)); + f.split(",").forEach(($) => u[$] = p($)); } - return c("jpeg,gif,png,tiff,bmp,webp", (f) => s + f), c("jsx,csv,css", (f) => n + f), c("aac,ac3,aiff,m4a,m4b,m4p,mid,midi,wav", (f) => a + f), c("3gpp,avi,dv,divx,ogg,mp4,webm", (f) => r + f), c("rtf,pdf", (f) => e + f), u("htm,html,shtm", n + "html"), u("js,mjs,cjs", n + "javascript"), u("yml,yaml", e + "yaml"), u("bat,cmd", e + "bat"), u("xml,csproj,fsproj,vbproj", n + "xml"), u("txt,ps1", n + "plain"), u("qt,mov", r + "quicktime"), u("doc,dot", e + "msword"), u("xls,xlt,xla", e + "excel"), u("ppt,oit,pps,ppa", e + "vnd.ms-powerpoint"), u("cer,crt,der", e + "x-x509-ca-cert"), u("gz,tgz,zip,rar,lzh,z", e + "x-compressed"), u("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", e + "octet-stream"), d; + return c("jpeg,gif,png,tiff,bmp,webp", (f) => s + f), c("jsx,csv,css", (f) => n + f), c("aac,ac3,aiff,m4a,m4b,m4p,mid,midi,wav", (f) => a + f), c("3gpp,avi,dv,divx,ogg,mp4,webm", (f) => r + f), c("rtf,pdf", (f) => e + f), d("htm,html,shtm", n + "html"), d("js,mjs,cjs", n + "javascript"), d("yml,yaml", e + "yaml"), d("bat,cmd", e + "bat"), d("xml,csproj,fsproj,vbproj", n + "xml"), d("txt,ps1", n + "plain"), d("qt,mov", r + "quicktime"), d("doc,dot", e + "msword"), d("xls,xlt,xla", e + "excel"), d("ppt,oit,pps,ppa", e + "vnd.ms-powerpoint"), d("cer,crt,der", e + "x-x509-ca-cert"), d("gz,tgz,zip,rar,lzh,z", e + "x-compressed"), d("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", e + "octet-stream"), u; })(); let Xs = []; -function wn(e) { - return e = e.replace(/"/g, "'"), e = e.replace(/>\s+<"), e = e.replace(/\s{2,}/g, " "), e.replace(ba, encodeURIComponent); +function _n(e) { + return e = e.replace(/"/g, "'"), e = e.replace(/>\s+<"), e = e.replace(/\s{2,}/g, " "), e.replace(_a, encodeURIComponent); } function fl(e) { - return "data:image/svg+xml;utf8," + wn(e); + return "data:image/svg+xml;utf8," + _n(e); } -function kn(e) { +function $n(e) { let t = URL.createObjectURL(e); return Xs.push(t), t; } -function _n() { +function Cn() { Xs.forEach((e) => { try { URL.revokeObjectURL(e); @@ -439,15 +457,15 @@ function vl(e) { if (!e) return null; let t = Ls(e, "?"); - return xt(t, "/"); + return At(t, "/"); } function ls(e) { let t = vl(e); - return t == null || t.indexOf(".") === -1 ? null : xt(t, ".").toLowerCase(); + return t == null || t.indexOf(".") === -1 ? null : At(t, ".").toLowerCase(); } function pl(e) { let t = ls(e.name); - return t && yn.indexOf(t) >= 0 ? kn(e) : wt(e.name); + return t && wn.indexOf(t) >= 0 ? $n(e) : xt(e.name); } function ml(e) { if (!e) @@ -455,24 +473,24 @@ function ml(e) { if (e.startsWith("blob:") || e.startsWith("data:")) return !0; let t = ls(e); - return t && yn.indexOf(t) >= 0 || !1; + return t && wn.indexOf(t) >= 0 || !1; } -function wt(e) { +function xt(e) { if (!e) return null; let t = ls(e); return t == null || ml(e) ? e : Jt(t) || fl(gs.doc); } function Jt(e) { - let t = $n(e); + let t = xn(e); return t && fl(t) || null; } -function $n(e) { +function xn(e) { if (gs[e]) return gs[e]; - for (let t = 0; t < Gl.length; t++) { - let s = Gl[t]; - if (bn[s].indexOf(e) >= 0) + for (let t = 0; t < Jl.length; t++) { + let s = Jl[t]; + if (kn[s].indexOf(e) >= 0) return gs[s]; } return null; @@ -480,45 +498,45 @@ function $n(e) { function hl(e, t = 2) { if (e === 0) return "0 Bytes"; - const s = t < 0 ? 0 : t, n = Math.floor(Math.log(e) / Math.log(Jl)); - return parseFloat((e / Math.pow(Jl, n)).toFixed(s)) + " " + wa[n]; + const s = t < 0 ? 0 : t, n = Math.floor(Math.log(e) / Math.log(Xl)); + return parseFloat((e / Math.pow(Xl, n)).toFixed(s)) + " " + $a[n]; } -function _a(e) { +function xa(e) { return e.files && Array.from(e.files).map((t) => ({ fileName: t.name, contentLength: t.size, filePath: pl(t) })); } function Ts(e, t) { e.onerror = null, e.src = gl(e.src, t) || ""; } function gl(e, t) { - return Jt(xt(e, ".").toLowerCase()) || (t ? Jt(t) || t : null) || Jt("doc"); + return Jt(At(e, ".").toLowerCase()) || (t ? Jt(t) || t : null) || Jt("doc"); } function Ys(e) { if (!e) throw new Error("fileNameOrExt required"); - const t = xt(e, ".").toLowerCase(); - return ka[t] || "application/" + t; + const t = At(e, ".").toLowerCase(); + return Ca[t] || "application/" + t; } -function Mm() { +function La() { return { - extSvg: $n, + extSvg: xn, extSrc: Jt, getExt: ls, - encodeSvg: wn, + encodeSvg: _n, canPreview: ml, getFileName: vl, getMimeType: Ys, formatBytes: hl, - filePathUri: wt, + filePathUri: xt, svgToDataUri: fl, fileImageUri: pl, - objectUrl: kn, - flush: _n, - inputFiles: _a, + objectUrl: $n, + flush: Cn, + inputFiles: xa, iconOnError: Ts, iconFallbackSrc: gl }; } -class $a { +class Va { constructor(t) { Le(this, "view"); Le(this, "includeTypes"); @@ -534,7 +552,7 @@ class $a { return {}; } } -const Rt = "/metadata/app.json", Ca = { +const zt = "/metadata/app.json", Sa = { Boolean: "checkbox", DateTime: "date", DateOnly: "date", @@ -554,7 +572,7 @@ const Rt = "/metadata/app.json", Ca = { String: "text", Guid: "text", Uri: "text" -}, xa = { +}, Ma = { number: "Int32", checkbox: "Boolean", date: "DateTime", @@ -573,21 +591,21 @@ const Rt = "/metadata/app.json", Ca = { Decimal: "decimal" }; [...Object.keys(el), ...Object.values(el)]; -const La = { +const Aa = { String: "string", Boolean: "bool", ...el }; function fs(e) { - return La[e] || e; + return Aa[e] || e; } -function Cn(e, t) { +function Ln(e, t) { return e ? (t || (t = []), e === "Nullable`1" ? fs(t[0]) + "?" : e.endsWith("[]") ? `List<${fs(e.substring(0, e.length - 2))}>` : t.length === 0 ? fs(e) : Ls(fs(e), "`") + "<" + t.join(",") + ">") : ""; } -function Va(e) { - return e && Cn(e.name, e.genericArgs); +function Ta(e) { + return e && Ln(e.name, e.genericArgs); } -class Et { +class Nt { constructor() { Le(this, "Query"); Le(this, "QueryInto"); @@ -602,6 +620,10 @@ class Et { get AnyUpdate() { return this.Patch || this.Update; } + get dataModel() { + var t; + return (t = this.AnyQuery) == null ? void 0 : t.dataModel; + } toArray() { return [this.Query, this.QueryInto, this.Create, this.Update, this.Patch, this.Delete].filter((s) => !!s).map((s) => s); } @@ -609,62 +631,62 @@ class Et { return !this.Query && !this.QueryInto && !this.Create && !this.Update && !this.Patch && !this.Delete; } add(t) { - Ne.isQueryInto(t) && !this.QueryInto ? this.QueryInto = t : Ne.isQuery(t) && !this.Query ? this.Query = t : Ne.isCreate(t) && !this.Create ? this.Create = t : Ne.isUpdate(t) && !this.Update ? this.Update = t : Ne.isPatch(t) && !this.Patch ? this.Patch = t : Ne.isDelete(t) && !this.Delete && (this.Delete = t); + qe.isQueryInto(t) && !this.QueryInto ? this.QueryInto = t : qe.isQuery(t) && !this.Query ? this.Query = t : qe.isCreate(t) && !this.Create ? this.Create = t : qe.isUpdate(t) && !this.Update ? this.Update = t : qe.isPatch(t) && !this.Patch ? this.Patch = t : qe.isDelete(t) && !this.Delete && (this.Delete = t); } static from(t) { - const s = new Et(); + const s = new Nt(); return t.forEach((n) => { s.add(n); }), s; } static forType(t, s) { var a; - let n = new Et(); - if (Y.config.apisResolver && t) { - const r = Y.config.apisResolver(t, s); + let n = new Nt(); + if (G.config.apisResolver && t) { + const r = G.config.apisResolver(t, s); r && (n.Query = r.Query, n.QueryInto = r.QueryInto, n.Create = r.Create, n.Update = r.Update, n.Patch = r.Patch, n.Delete = r.Delete); } - return t && (s ?? (s = (a = Y.metadata.value) == null ? void 0 : a.api), s == null || s.operations.forEach((r) => { - var d; - ((d = r.dataModel) == null ? void 0 : d.name) == t && n.add(r); + return t && (s ?? (s = (a = G.metadata.value) == null ? void 0 : a.api), s == null || s.operations.forEach((r) => { + var u; + ((u = r.dataModel) == null ? void 0 : u.name) == t && n.add(r); })), n; } } -const Ne = { +const qe = { 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) => Qe(e.request.inherits, (t) => Ne.AnyRead.indexOf(t.name) >= 0), - isQuery: (e) => Qe(e.request.inherits, (t) => t.name === "QueryDb`1"), - isQueryInto: (e) => Qe(e.request.inherits, (t) => t.name === "QueryDb`2"), + isAnyQuery: (e) => Ze(e.request.inherits, (t) => qe.AnyRead.indexOf(t.name) >= 0), + isQuery: (e) => Ze(e.request.inherits, (t) => t.name === "QueryDb`1"), + isQueryInto: (e) => Ze(e.request.inherits, (t) => t.name === "QueryDb`2"), isCrud: (e) => { var t; - return (t = e.request.implements) == null ? void 0 : t.some((s) => Ne.AnyWrite.indexOf(s.name) >= 0); + return (t = e.request.implements) == null ? void 0 : t.some((s) => qe.AnyWrite.indexOf(s.name) >= 0); }, - isCreate: (e) => vs(e, Ne.Create), - isUpdate: (e) => vs(e, Ne.Update), - isPatch: (e) => vs(e, Ne.Patch), - isDelete: (e) => vs(e, Ne.Delete), + isCreate: (e) => vs(e, qe.Create), + isUpdate: (e) => vs(e, qe.Update), + isPatch: (e) => vs(e, qe.Patch), + isDelete: (e) => vs(e, qe.Delete), model: (e) => { var t, s, n; - return e ? Qe(e.inherits, (a) => Ne.AnyRead.indexOf(a.name) >= 0) ? (t = e.inherits) == null ? void 0 : t.genericArgs[0] : (n = (s = e.implements) == null ? void 0 : s.find((a) => Ne.AnyWrite.indexOf(a.name) >= 0)) == null ? void 0 : n.genericArgs[0] : null; + return e ? Ze(e.inherits, (a) => qe.AnyRead.indexOf(a.name) >= 0) ? (t = e.inherits) == null ? void 0 : t.genericArgs[0] : (n = (s = e.implements) == null ? void 0 : s.find((a) => qe.AnyWrite.indexOf(a.name) >= 0)) == null ? void 0 : n.genericArgs[0] : null; } }; -function Sa(e) { +function Fa(e) { var t; return ((t = e.input) == null ? void 0 : t.type) || Fs(yl(e)); } -function xn(e) { - return e.endsWith("?") ? Vo(e, 1) : e; +function Vn(e) { + return e.endsWith("?") ? Mo(e, 1) : e; } function Fs(e) { - return Ca[xn(e)]; + return Sa[Vn(e)]; } -function Ma(e) { - return e && xa[e] || "String"; +function Ia(e) { + return e && Ma[e] || "String"; } function yl(e) { return e.type === "Nullable`1" ? e.genericArgs[0] : e.type; @@ -672,19 +694,19 @@ function yl(e) { function tl(e) { return e && Fs(e) == "number" || !1; } -function Ln(e) { +function Sn(e) { return e && e.toLowerCase() == "string" || !1; } -function Aa(e) { +function ja(e) { return e == "List`1" || e.startsWith("List<") || e.endsWith("[]"); } -function Vn(e) { +function Mn(e) { if (!(e != null && e.type)) return !1; const t = yl(e); return e.isValueType && t.indexOf("`") == -1 || e.isEnum ? !1 : Fs(e.type) == null; } -function Sn(e) { +function An(e) { var s, n, a, r; if (!(e != null && e.type)) return !1; @@ -704,8 +726,8 @@ function Yt(e, t) { ), a = ( /** @class */ function() { - function r(d) { - Object.assign(this, d); + function r(u) { + Object.assign(this, u); } return r.prototype.createResponse = function() { return s.returnsVoid ? void 0 : new n(); @@ -718,7 +740,7 @@ function Yt(e, t) { ); return new a(t); } -function Ta(e, t, s = {}) { +function Oa(e, t, s = {}) { let n = ( /** @class */ function() { @@ -729,8 +751,8 @@ function Ta(e, t, s = {}) { ), a = ( /** @class */ function() { - function r(d) { - Object.assign(this, d); + function r(u) { + Object.assign(this, u); } return r.prototype.createResponse = function() { return typeof s.createResponse == "function" ? s.createResponse() : new n(); @@ -746,139 +768,139 @@ function Ta(e, t, s = {}) { function ys(e, t) { return e ? (Object.keys(e).forEach((s) => { let n = e[s]; - typeof n == "string" ? n.startsWith("/Date") && (e[s] = Ss(Mt(n))) : n != null && typeof n == "object" && (Array.isArray(n) ? e[s] = Array.from(n) : e[s] = Object.assign({}, n)); + typeof n == "string" ? n.startsWith("/Date") && (e[s] = Ss(pt(n))) : n != null && typeof n == "object" && (Array.isArray(n) ? e[s] = Array.from(n) : e[s] = Object.assign({}, n)); }), e) : {}; } -function Fa(e, t) { +function Da(e, t) { let s = {}; return Array.from(e.elements).forEach((n) => { var p; let a = n; if (!a.id || a.value == null || a.value === "") return; - const r = a.id.toLowerCase(), d = t && t.find(($) => $.name.toLowerCase() == r); - let u = d == null ? void 0 : d.type, c = (p = d == null ? void 0 : d.genericArgs) == null ? void 0 : p[0], f = a.type === "checkbox" ? a.checked : a.value; - tl(u) ? f = Number(f) : u === "List`1" && typeof f == "string" && (f = f.split(",").map(($) => tl(c) ? Number($) : $)), s[a.id] = f; + const r = a.id.toLowerCase(), u = t && t.find(($) => $.name.toLowerCase() == r); + let d = u == null ? void 0 : u.type, c = (p = u == null ? void 0 : u.genericArgs) == null ? void 0 : p[0], f = a.type === "checkbox" ? a.checked : a.value; + tl(d) ? f = Number(f) : d === "List`1" && typeof f == "string" && (f = f.split(",").map(($) => tl(c) ? Number($) : $)), s[a.id] = f; }), s; } function bl(e) { var t; return ((t = e == null ? void 0 : e.api) == null ? void 0 : t.operations) && e.api.operations.length > 0; } -function Ia(e) { - if (!wl() && (e != null && e.assert) && !Y.metadata.value) +function Pa(e) { + if (!wl() && (e != null && e.assert) && !G.metadata.value) throw new Error("useMetadata() not configured, see: https://docs.servicestack.net/vue/use-metadata"); - return Y.metadata.value; + return G.metadata.value; } function es(e) { - return e && bl(e) ? (e.date = xo(/* @__PURE__ */ new Date()), Y.metadata.value = e, typeof localStorage < "u" && localStorage.setItem(Rt, JSON.stringify(e)), !0) : !1; + return e && bl(e) ? (e.date = Vo(/* @__PURE__ */ new Date()), G.metadata.value = e, typeof localStorage < "u" && localStorage.setItem(zt, JSON.stringify(e)), !0) : !1; } -function Da() { - Y.metadata.value = null, typeof localStorage < "u" && localStorage.removeItem(Rt); +function Ba() { + G.metadata.value = null, typeof localStorage < "u" && localStorage.removeItem(zt); } function wl() { - if (Y.metadata.value != null) + if (G.metadata.value != null) return !0; let e = globalThis.Server; if (bl(e)) es(e); else { - const t = typeof localStorage < "u" ? localStorage.getItem(Rt) : null; + const t = typeof localStorage < "u" ? localStorage.getItem(zt) : null; if (t) try { es(JSON.parse(t)); } catch { - console.error(`Could not JSON.parse ${Rt} from localStorage`); + console.error(`Could not JSON.parse ${zt} from localStorage`); } } - return Y.metadata.value != null; + return G.metadata.value != null; } -async function Xl(e, t) { +async function Yl(e, t) { let s = t ? await t() : await fetch(e); if (s.ok) { let n = await s.text(); es(JSON.parse(n)); } else console.error(`Could not download ${t ? "AppMetadata" : e}: ${s.statusText}`); - bl(Y.metadata.value) || console.warn("AppMetadata is not available"); + bl(G.metadata.value) || console.warn("AppMetadata is not available"); } -async function Pa(e) { +async function Ha(e) { var r; const { olderThan: t, resolvePath: s, resolve: n } = e || {}; let a = wl() && t !== 0; if (a && t) { - let d = Mt((r = Y.metadata.value) == null ? void 0 : r.date); - (!d || (/* @__PURE__ */ new Date()).getTime() - d.getTime() > t) && (a = !1); + let u = pt((r = G.metadata.value) == null ? void 0 : r.date); + (!u || (/* @__PURE__ */ new Date()).getTime() - u.getTime() > t) && (a = !1); } if (!a) { - if ((s || n) && (await Xl(s || Rt, n), Y.metadata.value != null)) + if ((s || n) && (await Yl(s || zt, n), G.metadata.value != null)) return; - const d = Ue("client"); - if (d != null) { - const u = await d.api(new $a()); - u.succeeded && es(u.response); + const u = Qe("client"); + if (u != null) { + const d = await u.api(new Va()); + d.succeeded && es(d.response); } - if (Y.metadata.value != null) + if (G.metadata.value != null) return; - await Xl(Rt); + await Yl(zt); } - return Y.metadata.value; -} -function at(e, t) { - var d; - if (Y.config.typeResolver) { - let u = Y.config.typeResolver(e, t); - if (u) - return u; + return G.metadata.value; +} +function rt(e, t) { + var u; + if (G.config.typeResolver) { + let d = G.config.typeResolver(e, t); + if (d) + return d; } - let s = (d = Y.metadata.value) == null ? void 0 : d.api; + let s = (u = G.metadata.value) == null ? void 0 : u.api; if (!s || !e) return null; - let n = s.types.find((u) => u.name.toLowerCase() === e.toLowerCase() && (!t || u.namespace == t)); + let n = s.types.find((d) => d.name.toLowerCase() === e.toLowerCase() && (!t || d.namespace == t)); if (n) return n; let a = Is(e); if (a) return a.request; - let r = s.operations.find((u) => u.response && u.response.name.toLowerCase() === e.toLowerCase() && (!t || u.response.namespace == t)); + let r = s.operations.find((d) => d.response && d.response.name.toLowerCase() === e.toLowerCase() && (!t || d.response.namespace == t)); return r ? r.response : null; } function Is(e) { var n; - if (Y.config.apiResolver) { - const a = Y.config.apiResolver(e); + if (G.config.apiResolver) { + const a = G.config.apiResolver(e); if (a) return a; } - let t = (n = Y.metadata.value) == null ? void 0 : n.api; + let t = (n = G.metadata.value) == null ? void 0 : n.api; return t ? t.operations.find((a) => a.request.name.toLowerCase() === e.toLowerCase()) : null; } -function ja({ dataModel: e }) { +function Ra({ dataModel: e }) { var n; - const t = (n = Y.metadata.value) == null ? void 0 : n.api; + const t = (n = G.metadata.value) == null ? void 0 : n.api; if (!t) return []; let s = t.operations; if (e) { - const a = typeof e == "string" ? at(e) : e; - s = s.filter((r) => Mn(r.dataModel, a)); + const a = typeof e == "string" ? rt(e) : e; + s = s.filter((r) => Tn(r.dataModel, a)); } return s; } function kl(e) { - return e ? at(e.name, e.namespace) : null; + return e ? rt(e.name, e.namespace) : null; } -function Mn(e, t) { +function Tn(e, t) { return e && t && e.name === t.name && (!e.namespace || !t.namespace || e.namespace === t.namespace); } -function Oa(e, t) { - let s = at(e); +function Ea(e, t) { + let s = rt(e); return s && s.properties && s.properties.find((a) => a.name.toLowerCase() === t.toLowerCase()); } -function An(e) { - return Tn(at(e)); +function Fn(e) { + return In(rt(e)); } -function Tn(e) { +function In(e) { if (e && e.isEnum && e.enumNames != null) { let t = {}; for (let s = 0; s < e.enumNames.length; s++) { @@ -889,7 +911,7 @@ function Tn(e) { } return null; } -function Fn(e) { +function jn(e) { if (!e) return null; let t = {}, s = e.input && e.input.allowableEntries; @@ -909,9 +931,9 @@ function Fn(e) { return t; } if (e.isEnum) { - const a = e.genericArgs && e.genericArgs.length == 1 ? e.genericArgs[0] : e.type, r = at(a); + const a = e.genericArgs && e.genericArgs.length == 1 ? e.genericArgs[0] : e.type, r = rt(a); if (r) - return Tn(r); + return In(r); } return null; } @@ -921,46 +943,46 @@ function _l(e) { const t = []; return Object.keys(e).forEach((s) => t.push({ key: s, value: e[s] })), t; } -function Ba(e, t) { +function za(e, t) { const n = ((a, r) => Object.assign({ id: a, name: a, type: r - }, t))(e.name, (t == null ? void 0 : t.type) || Sa(e) || "text"); - return e.isEnum && (n.type = "select", n.allowableEntries = _l(Fn(e))), n; + }, t))(e.name, (t == null ? void 0 : t.type) || Fa(e) || "text"); + return e.isEnum && (n.type = "select", n.allowableEntries = _l(jn(e))), n; } -function Ra(e) { +function Na(e) { let t = []; if (e) { - const s = tt(e), n = Is(e.name), a = kl(n == null ? void 0 : n.dataModel); + const s = st(e), n = Is(e.name), a = kl(n == null ? void 0 : n.dataModel); s.forEach((r) => { - var u, c, f; - if (!Sn(r)) + var d, c, f; + if (!An(r)) return; - const d = Ba(r, r.input); - if (d.id = Lo(d.id), d.type == "file" && r.uploadTo && !d.accept) { - const p = (c = (u = Y.metadata.value) == null ? void 0 : u.plugins.filesUpload) == null ? void 0 : c.locations.find(($) => $.name == r.uploadTo); - p && !d.accept && p.allowExtensions && (d.accept = p.allowExtensions.map(($) => $.startsWith(".") ? $ : `.${$}`).join(",")); + const u = za(r, r.input); + if (u.id = So(u.id), u.type == "file" && r.uploadTo && !u.accept) { + const p = (c = (d = G.metadata.value) == null ? void 0 : d.plugins.filesUpload) == null ? void 0 : c.locations.find(($) => $.name == r.uploadTo); + p && !u.accept && p.allowExtensions && (u.accept = p.allowExtensions.map(($) => $.startsWith(".") ? $ : `.${$}`).join(",")); } if (a) { const p = (f = a.properties) == null ? void 0 : f.find(($) => $.name == r.name); r.ref || (r.ref = p == null ? void 0 : p.ref); } - if (d.options) + if (u.options) try { const p = { - input: d, + input: u, $typeFields: s.map((m) => m.name), - $dataModelFields: a ? tt(a).map((m) => m.name) : [], - ...Y.config.scopeWhitelist - }, $ = dl(d.options, p); + $dataModelFields: a ? st(a).map((m) => m.name) : [], + ...G.config.scopeWhitelist + }, $ = dl(u.options, p); Object.keys($).forEach((m) => { - d[m] = $[m]; + u[m] = $[m]; }); } catch { - console.error(`failed to evaluate '${d.options}'`); + console.error(`failed to evaluate '${u.options}'`); } - t.push(d); + t.push(u); }); } return t; @@ -969,20 +991,20 @@ function $l(e, t) { var a, r; if (!t.type) return console.error("enumDescriptions missing {type:'EnumType'} options"), [`${e}`]; - const s = at(t.type); + const s = rt(t.type); if (!(s != null && s.enumValues)) return console.error(`Could not find metadata for ${t.type}`), [`${e}`]; const n = []; - for (let d = 0; d < s.enumValues.length; d++) { - const u = parseInt(s.enumValues[d]); - u > 0 && (u & e) === u && n.push(((a = s.enumDescriptions) == null ? void 0 : a[d]) || ((r = s.enumNames) == null ? void 0 : r[d]) || `${e}`); + for (let u = 0; u < s.enumValues.length; u++) { + const d = parseInt(s.enumValues[u]); + d > 0 && (d & e) === d && n.push(((a = s.enumDescriptions) == null ? void 0 : a[u]) || ((r = s.enumNames) == null ? void 0 : r[u]) || `${e}`); } return n; } -function In(e) { +function On(e) { return (t) => typeof t == "number" ? $l(t, { type: e }) : t; } -function tt(e) { +function st(e) { if (!e) return []; let t = [], s = {}; @@ -1000,7 +1022,7 @@ function vs(e, t) { return ((s = e.request.implements) == null ? void 0 : s.some((n) => n.name === t)) || !1; } function ns(e) { - return e ? Dn(e, tt(e)) : null; + return e ? Dn(e, st(e)) : null; } function Dn(e, t) { let s = t.find((r) => r.name.toLowerCase() === "id"); @@ -1008,94 +1030,94 @@ function Dn(e, t) { return s; let a = t.find((r) => r.isPrimaryKey) || s; if (!a) { - let r = Ne.model(e); + let r = qe.model(e); if (r) - return Qe(at(r), (d) => ns(d)); + return Ze(rt(r), (u) => ns(u)); console.error(`Primary Key not found in ${e.name}`); } return a || null; } -function Ea(e, t) { - return Qe(ns(e), (s) => be(t, s.name)); +function Ua(e, t) { + return Ze(ns(e), (s) => _e(t, s.name)); } function Pn(e, t, s) { - return e && e.valueType === "none" ? "" : s.key === "%In" || s.key === "%Between" ? `(${s.value})` : Ha(t, s.value); + return e && e.valueType === "none" ? "" : s.key === "%In" || s.key === "%Between" ? `(${s.value})` : qa(t, s.value); } -function Ha(e, t) { - return e ? (e = xn(e), tl(e) || e === "Boolean" ? t : Aa(e) ? `[${t}]` : `'${t}'`) : t; +function qa(e, t) { + return e ? (e = Vn(e), tl(e) || e === "Boolean" ? t : ja(e) ? `[${t}]` : `'${t}'`) : t; } -function ht(e, t) { +function gt(e, t) { return { name: e, value: t }; } -const za = [ - ht("=", "%"), - ht("!=", "%!"), - ht(">=", ">%"), - ht(">", "%>"), - ht("<=", "%<"), - ht("<", "<%"), - ht("In", "%In"), - ht("Between", "%Between"), +const Qa = [ + gt("=", "%"), + gt("!=", "%!"), + gt(">=", ">%"), + gt(">", "%>"), + gt("<=", "%<"), + gt("<", "<%"), + gt("In", "%In"), + gt("Between", "%Between"), { name: "Starts With", value: "%StartsWith", types: "string" }, { name: "Contains", value: "%Contains", types: "string" }, { name: "Ends With", value: "%EndsWith", types: "string" }, { name: "Exists", value: "%IsNotNull", valueType: "none" }, { name: "Not Exists", value: "%IsNull", valueType: "none" } ]; -function rt() { +function lt() { const e = v(() => { var n; - return ((n = Y.metadata.value) == null ? void 0 : n.app) || null; + return ((n = G.metadata.value) == null ? void 0 : n.app) || null; }), t = v(() => { var n; - return ((n = Y.metadata.value) == null ? void 0 : n.api) || null; + return ((n = G.metadata.value) == null ? void 0 : n.api) || null; }), s = v(() => { var n, a, r; - return ((r = (a = (n = Y.metadata.value) == null ? void 0 : n.plugins) == null ? void 0 : a.autoQuery) == null ? void 0 : r.viewerConventions) || za; + return ((r = (a = (n = G.metadata.value) == null ? void 0 : n.plugins) == null ? void 0 : a.autoQuery) == null ? void 0 : r.viewerConventions) || Qa; }); return wl(), { - loadMetadata: Pa, - getMetadata: Ia, + loadMetadata: Ha, + getMetadata: Pa, setMetadata: es, - clearMetadata: Da, + clearMetadata: Ba, metadataApp: e, metadataApi: t, filterDefinitions: s, - typeOf: at, + typeOf: rt, typeOfRef: kl, - typeEquals: Mn, + typeEquals: Tn, apiOf: Is, - findApis: ja, - typeName: Va, - typeName2: Cn, - property: Oa, - enumOptions: An, - propertyOptions: Fn, - createFormLayout: Ra, - typeProperties: tt, - supportsProp: Sn, - Crud: Ne, - Apis: Et, + findApis: Ra, + typeName: Ta, + typeName2: Ln, + property: Ea, + enumOptions: Fn, + propertyOptions: jn, + createFormLayout: Na, + typeProperties: st, + supportsProp: An, + Crud: qe, + Apis: Nt, getPrimaryKey: ns, getPrimaryKeyByProps: Dn, - getId: Ea, + getId: Ua, createDto: Yt, - makeDto: Ta, + makeDto: Oa, toFormValues: ys, - formValues: Fa, - isComplexProp: Vn, + formValues: Da, + isComplexProp: Mn, asKvps: _l, expandEnumFlags: $l, - enumFlagsConverter: In + enumFlagsConverter: On }; } -const Ye = class Ye { - static async getOrFetchValue(t, s, n, a, r, d, u) { - const c = Ye.getValue(n, u, r); - return c ?? (await Ye.fetchLookupIds(t, s, n, a, r, d, [u]), Ye.getValue(n, u, r)); +const et = class et { + static async getOrFetchValue(t, s, n, a, r, u, d) { + const c = et.getValue(n, d, r); + return c ?? (await et.fetchLookupIds(t, s, n, a, r, u, [d]), et.getValue(n, d, r)); } static getValue(t, s, n) { - const a = Ye.Lookup[t]; + const a = et.Lookup[t]; if (a) { const r = a[s]; if (r) @@ -1103,45 +1125,45 @@ const Ye = class Ye { } } static setValue(t, s, n, a) { - const r = Ye.Lookup[t] ?? (Ye.Lookup[t] = {}), d = r[s] ?? (r[s] = {}); - n = n.toLowerCase(), d[n] = a; + const r = et.Lookup[t] ?? (et.Lookup[t] = {}), u = r[s] ?? (r[s] = {}); + n = n.toLowerCase(), u[n] = a; } static setRefValue(t, s) { - const n = be(s, t.refId); + const n = _e(s, t.refId); if (n == null || t.refLabel == null) return null; - const a = be(s, t.refLabel); - return Ye.setValue(t.model, n, t.refLabel, a), a; + const a = _e(s, t.refLabel); + return et.setValue(t.model, n, t.refLabel, a), a; } - static async fetchLookupIds(t, s, n, a, r, d, u) { + static async fetchLookupIds(t, s, n, a, r, u, d) { const c = s.operations.find((f) => { var p; - return Ne.isAnyQuery(f) && ((p = f.dataModel) == null ? void 0 : p.name) == n; + return qe.isAnyQuery(f) && ((p = f.dataModel) == null ? void 0 : p.name) == n; }); if (c) { - const f = Ye.Lookup[n] ?? (Ye.Lookup[n] = {}), p = []; - Object.keys(f).forEach((j) => { - const H = f[j]; - be(H, r) && p.push(j); + const f = et.Lookup[n] ?? (et.Lookup[n] = {}), p = []; + Object.keys(f).forEach((P) => { + const I = f[P]; + _e(I, r) && p.push(P); }); - const $ = u.filter((j) => !p.includes(j)); + const $ = d.filter((P) => !p.includes(P)); if ($.length == 0) return; - const m = d ? null : `${a},${r}`, k = { + const m = u ? null : `${a},${r}`, k = { [a + "In"]: $.join(",") }; m && (k.fields = m); - const g = Yt(c, k), w = await t.api(g, { jsconfig: "edv,eccn" }); - if (w.succeeded) - (be(w.response, "results") || []).forEach((H) => { - if (!be(H, a)) { - console.error(`result[${a}] == null`, H); + const g = Yt(c, k), b = await t.api(g, { jsconfig: "edv,eccn" }); + if (b.succeeded) + (_e(b.response, "results") || []).forEach((I) => { + if (!_e(I, a)) { + console.error(`result[${a}] == null`, I); return; } - const re = `${be(H, a)}`, F = be(H, r); + const se = `${_e(I, a)}`, j = _e(I, r); r = r.toLowerCase(); - const T = f[re] ?? (f[re] = {}); - T[r] = `${F}`; + const T = f[se] ?? (f[se] = {}); + T[r] = `${j}`; }); else { console.error(`Failed to call ${c.request.name}`); @@ -1150,8 +1172,8 @@ const Ye = class Ye { } } }; -Le(Ye, "Lookup", {}); -let Dt = Ye, sl = () => (/* @__PURE__ */ new Date()).getTime(), Na = ["/", "T", ":", "-"], ct = { +Le(et, "Lookup", {}); +let Pt = et, sl = () => (/* @__PURE__ */ new Date()).getTime(), Ka = ["/", "T", ":", "-"], ct = { //locale: null, assumeUtc: !0, //number: null, @@ -1162,119 +1184,119 @@ let Dt = Ye, sl = () => (/* @__PURE__ */ new Date()).getTime(), Na = ["/", "T", maxFieldLength: 150, maxNestedFields: 2, maxNestedFieldLength: 30 -}, Ua = new Intl.RelativeTimeFormat(ct.locale, {}), Yl = 24 * 60 * 60 * 1e3 * 365, qs = { - year: Yl, - month: Yl / 12, +}, Za = new Intl.RelativeTimeFormat(ct.locale, {}), en = 24 * 60 * 60 * 1e3 * 365, qs = { + year: en, + month: en / 12, day: 24 * 60 * 60 * 1e3, hour: 60 * 60 * 1e3, minute: 60 * 1e3, second: 1e3 -}, kt = { - currency: On, - bytes: Bn, - link: Rn, - linkTel: En, - linkMailTo: Hn, - icon: zn, - iconRounded: Nn, - attachment: Un, - hidden: qn, - time: Qn, +}, Lt = { + currency: Hn, + bytes: Rn, + link: En, + linkTel: zn, + linkMailTo: Nn, + icon: Un, + iconRounded: qn, + attachment: Qn, + hidden: Kn, + time: Zn, relativeTime: xl, - relativeTimeFromMs: Ds, - enumFlags: Zn, - formatDate: Ut, + relativeTimeFromMs: js, + enumFlags: Gn, + formatDate: Qt, formatNumber: Cl }; "iconOnError" in globalThis || (globalThis.iconOnError = Ts); class Ke { } Le(Ke, "currency", { method: "currency" }), Le(Ke, "bytes", { method: "bytes" }), Le(Ke, "link", { method: "link" }), Le(Ke, "linkTel", { method: "linkTel" }), Le(Ke, "linkMailTo", { method: "linkMailTo" }), Le(Ke, "icon", { method: "icon" }), Le(Ke, "iconRounded", { method: "iconRounded" }), Le(Ke, "attachment", { method: "attachment" }), Le(Ke, "time", { method: "time" }), Le(Ke, "relativeTime", { method: "relativeTime" }), Le(Ke, "relativeTimeFromMs", { method: "relativeTimeFromMs" }), Le(Ke, "date", { method: "formatDate" }), Le(Ke, "number", { method: "formatNumber" }), Le(Ke, "hidden", { method: "hidden" }), Le(Ke, "enumFlags", { method: "enumFlags" }); -function qa(e) { +function Wa(e) { ct = Object.assign({}, ct, e); } -function Qa(e) { +function Ga(e) { Object.keys(e || {}).forEach((t) => { - typeof e[t] == "function" && (kt[t] = e[t]); + typeof e[t] == "function" && (Lt[t] = e[t]); }); } -function jn() { - return kt; +function Bn() { + return Lt; } function os(e, t) { return t ? dt("span", e, t) : e; } -function On(e, t) { +function Hn(e, t) { const s = ft(t, ["currency"]); return os(new Intl.NumberFormat(void 0, { style: "currency", currency: (t == null ? void 0 : t.currency) || "USD" }).format(e), s); } -function Bn(e, t) { +function Rn(e, t) { return os(hl(e), t); } -function Rn(e, t) { +function En(e, t) { return dt("a", e, Ms({ ...t, href: e })); } -function En(e, t) { +function zn(e, t) { return dt("a", e, Ms({ ...t, href: `tel:${e}` })); } -function Hn(e, t) { +function Nn(e, t) { t || (t = {}); let { subject: s, body: n } = t, a = ft(t, ["subject", "body"]), r = {}; - return s && (r.subject = s), n && (r.body = n), dt("a", e, Ms({ ...a, href: `mailto:${Bt(e, r)}` })); + return s && (r.subject = s), n && (r.body = n), dt("a", e, Ms({ ...a, href: `mailto:${Et(e, r)}` })); } -function zn(e, t) { - return dt("img", void 0, Object.assign({ class: "w-6 h-6", title: e, src: jt(e), onerror: "iconOnError(this)" }, t)); +function Un(e, t) { + return dt("img", void 0, Object.assign({ class: "w-6 h-6", title: e, src: Ht(e), onerror: "iconOnError(this)" }, t)); } -function Nn(e, t) { - return dt("img", void 0, Object.assign({ class: "w-8 h-8 rounded-full", title: e, src: jt(e), onerror: "iconOnError(this)" }, t)); +function qn(e, t) { + return dt("img", void 0, Object.assign({ class: "w-8 h-8 rounded-full", title: e, src: Ht(e), onerror: "iconOnError(this)" }, t)); } -function Un(e, t) { - let s = vl(e), a = ls(s) == null || ml(e) ? jt(e) : gl(e); - const r = jt(a); - let d = t && (t["icon-class"] || t.iconClass), u = dt("img", void 0, Object.assign({ class: "w-6 h-6", src: r, onerror: "iconOnError(this,'att')" }, d ? { class: d } : null)), c = `${s}`; - return dt("a", u + c, Object.assign({ class: "flex", href: jt(e), title: e }, t ? ft(t, ["icon-class", "iconClass"]) : null)); +function Qn(e, t) { + let s = vl(e), a = ls(s) == null || ml(e) ? Ht(e) : gl(e); + const r = Ht(a); + let u = t && (t["icon-class"] || t.iconClass), d = dt("img", void 0, Object.assign({ class: "w-6 h-6", src: r, onerror: "iconOnError(this,'att')" }, u ? { class: u } : null)), c = `${s}`; + return dt("a", d + c, Object.assign({ class: "flex", href: Ht(e), title: e }, t ? ft(t, ["icon-class", "iconClass"]) : null)); } -function qn(e) { +function Kn(e) { return ""; } -function Qn(e, t) { - let s = typeof e == "string" ? new Date(un(e) * 1e3) : Vs(e) ? Mt(e) : null; - return os(s ? So(s) : e, t); +function Zn(e, t) { + let s = typeof e == "string" ? new Date(un(e) * 1e3) : Vs(e) ? pt(e) : null; + return os(s ? Ao(s) : e, t); } -function Ut(e, t) { +function Qt(e, t) { if (e == null) return ""; - let s = typeof e == "number" ? new Date(e) : typeof e == "string" ? Mt(e) : e; + let s = typeof e == "number" ? new Date(e) : typeof e == "string" ? pt(e) : e; if (!Vs(s)) return console.warn(`${s} is not a Date value`), e == null ? "" : `${e}`; - let n = ct.date ? Ps(ct.date) : null; - return os(typeof n == "function" ? n(s) : an(s), t); + let n = ct.date ? Os(ct.date) : null; + return os(typeof n == "function" ? n(s) : To(s), t); } function Cl(e, t) { if (typeof e != "number") return e; - let s = ct.number ? Ps(ct.number) : null, n = typeof s == "function" ? s(e) : `${e}`; + let s = ct.number ? Os(ct.number) : null, n = typeof s == "function" ? s(e) : `${e}`; return n === "" && (console.warn(`formatNumber(${e}) => ${n}`, s), n = `${e}`), os(n, t); } -function Kn(e, t, s) { - let n = Mo(e), a = t ? Ps(t) : null; +function Wn(e, t, s) { + let n = Fo(e), a = t ? Os(t) : null; if (typeof a == "function") { - let d = s; + let u = s; if (t != null && t.options) try { - d = dl(t.options, s); - } catch (u) { - console.error(`Could not evaluate '${t.options}'`, u, ", with scope:", s); + u = dl(t.options, s); + } catch (d) { + console.error(`Could not evaluate '${t.options}'`, d, ", with scope:", s); } - return a(e, d); + return a(e, u); } - let r = n != null ? Vs(n) ? Ut(n, s) : typeof n == "number" ? Cl(n, s) : n : null; + let r = n != null ? Vs(n) ? Qt(n, s) : typeof n == "number" ? Cl(n, s) : n : null; return r ?? ""; } function ts(e, t, s) { - return Vt(e) ? Kn(e, t, s) : Ja(e, t, s); + return Tt(e) ? Wn(e, t, s) : tr(e, t, s); } -function Ka(e) { +function Ja(e) { if (e == null) return NaN; if (typeof e == "number") @@ -1287,61 +1309,61 @@ function Ka(e) { return t; if (e[0] === "P" || e.startsWith("-P")) return un(e) * 1e3 * -1; - if (Ao(e, Na) >= 0) - return Mt(e).getTime() - sl(); + if (Io(e, Ka) >= 0) + return pt(e).getTime() - sl(); } return NaN; } -function Ds(e, t) { +function js(e, t) { for (let s in qs) if (Math.abs(e) > qs[s] || s === "second") - return (t || Ua).format(Math.round(e / qs[s]), s); + return (t || Za).format(Math.round(e / qs[s]), s); } function xl(e, t) { - let s = Ka(e); - return isNaN(s) ? "" : Ds(s, t); + let s = Ja(e); + return isNaN(s) ? "" : js(s, t); } -function Za(e, t) { - return Ds(e.getTime() - (t ? t.getTime() : sl())); +function Xa(e, t) { + return js(e.getTime() - (t ? t.getTime() : sl())); } -function Zn(e, t) { +function Gn(e, t) { return $l(e, t).join(", "); } -function Ps(e) { +function Os(e) { if (!e) return null; - let { method: t, options: s } = e, n = `${t}(${s})`, a = kt[n] || kt[t]; + let { method: t, options: s } = e, n = `${t}(${s})`, a = Lt[n] || Lt[t]; if (typeof a == "function") return a; let r = e.locale || ct.locale; if (t.startsWith("Intl.")) { - let d = r ? `'${r}'` : "undefined", u = `return new ${t}(${d},${s || "undefined"})`; + let u = r ? `'${r}'` : "undefined", d = `return new ${t}(${u},${s || "undefined"})`; try { - let c = Function(u)(); - return a = t === "Intl.DateTimeFormat" ? (f) => c.format(Mt(f)) : t === "Intl.NumberFormat" ? (f) => c.format(Number(f)) : t === "Intl.RelativeTimeFormat" ? (f) => xl(f, c) : (f) => c.format(f), kt[n] = a; + let c = Function(d)(); + return a = t === "Intl.DateTimeFormat" ? (f) => c.format(pt(f)) : t === "Intl.NumberFormat" ? (f) => c.format(Number(f)) : t === "Intl.RelativeTimeFormat" ? (f) => xl(f, c) : (f) => c.format(f), Lt[n] = a; } catch (c) { - console.error(`Invalid format: ${u}`, c); + console.error(`Invalid format: ${d}`, c); } } else { - let d = globalThis[t]; - if (typeof d == "function") { - let u = s != null ? Function("return " + s)() : void 0; - return a = (c) => d(c, u, r), kt[n] = a; + let u = globalThis[t]; + if (typeof u == "function") { + let d = s != null ? Function("return " + s)() : void 0; + return a = (c) => u(c, d, r), Lt[n] = a; } - console.error(`No '${t}' function exists`, Object.keys(kt)); + console.error(`No '${t}' function exists`, Object.keys(Lt)); } return null; } -function Wn(e, t) { +function Jn(e, t) { return e ? e.length > t ? e.substring(0, t) + "..." : e : ""; } -function Gn(e) { - return e.substring(0, 6) === "/Date(" ? Ut(Mt(e)) : e; +function Xn(e) { + return e.substring(0, 6) === "/Date(" ? Qt(pt(e)) : e; } -function Wa(e) { - return Ll(Ht(e)).replace(/"/g, ""); +function Ya(e) { + return Ll(Ut(e)).replace(/"/g, ""); } -function Jn(e) { +function Yn(e) { if (e == null || e === "") return ""; if (typeof e == "string") @@ -1353,98 +1375,98 @@ function Jn(e) { return e; } function Ll(e, t = 4) { - return e = Jn(e), typeof e != "object" ? typeof e == "string" ? e : `${e}` : JSON.stringify(e, void 0, t); + return e = Yn(e), typeof e != "object" ? typeof e == "string" ? e : `${e}` : JSON.stringify(e, void 0, t); } -function Ga(e) { - return e = Jn(e), typeof e != "object" ? typeof e == "string" ? e : `${e}` : (e = Object.assign({}, e), e = Ht(e), Ll(e)); +function er(e) { + return e = Yn(e), typeof e != "object" ? typeof e == "string" ? e : `${e}` : (e = Object.assign({}, e), e = Ut(e), Ll(e)); } -function Ht(e) { +function Ut(e) { if (e == null) return null; if (typeof e == "string") - return Gn(e); - if (Vt(e)) + return Xn(e); + if (Tt(e)) return e; if (e instanceof Date) - return Ut(e); + return Qt(e); if (Array.isArray(e)) - return e.map(Ht); + return e.map(Ut); if (typeof e == "object") { let t = {}; return Object.keys(e).forEach((s) => { - s != "__type" && (t[s] = Ht(e[s])); + s != "__type" && (t[s] = Ut(e[s])); }), t; } return e; } -function Ja(e, t, s) { +function tr(e, t, s) { let n = e; if (Array.isArray(e)) { - if (Vt(e[0])) + if (Tt(e[0])) return n.join(","); e[0] != null && (n = e[0]); } if (n == null) return ""; if (n instanceof Date) - return Ut(n, s); + return Qt(n, s); let a = Object.keys(n), r = []; - for (let d = 0; d < Math.min(ct.maxNestedFields, a.length); d++) { - let u = a[d], c = `${Ht(n[u])}`; - r.push(`${u}: ${Ks(Wn(Gn(c), ct.maxNestedFieldLength))}`); + for (let u = 0; u < Math.min(ct.maxNestedFields, a.length); u++) { + let d = a[u], c = `${Ut(n[d])}`; + r.push(`${d}: ${Ks(Jn(Xn(c), ct.maxNestedFieldLength))}`); } - return a.length > 2 && r.push("..."), dt("span", "{ " + r.join(", ") + " }", Object.assign({ title: Ks(Wa(e)) }, s)); + return a.length > 2 && r.push("..."), dt("span", "{ " + r.join(", ") + " }", Object.assign({ title: Ks(Ya(e)) }, s)); } -function Am() { +function ch() { return { Formats: Ke, - setDefaultFormats: qa, - getFormatters: jn, - setFormatters: Qa, + setDefaultFormats: Wa, + getFormatters: Bn, + setFormatters: Ga, formatValue: ts, - formatter: Ps, + formatter: Os, dateInputFormat: Ss, - currency: On, - bytes: Bn, - link: Rn, - linkTel: En, - linkMailTo: Hn, - icon: zn, - iconRounded: Nn, - attachment: Un, - hidden: qn, - time: Qn, + currency: Hn, + bytes: Rn, + link: En, + linkTel: zn, + linkMailTo: Nn, + icon: Un, + iconRounded: qn, + attachment: Qn, + hidden: Kn, + time: Zn, relativeTime: xl, - relativeTimeFromDate: Za, - relativeTimeFromMs: Ds, - enumFlags: Zn, - formatDate: Ut, + relativeTimeFromDate: Xa, + relativeTimeFromMs: js, + enumFlags: Gn, + formatDate: Qt, formatNumber: Cl, indentJson: Ll, - prettyJson: Ga, - scrub: Ht, - truncate: Wn, - apiValueFmt: Kn, + prettyJson: er, + scrub: Ut, + truncate: Jn, + apiValueFmt: Wn, iconOnError: Ts }; } -const Xa = ["title"], Ya = /* @__PURE__ */ ce({ +const sr = ["title"], lr = /* @__PURE__ */ de({ __name: "RouterLink", props: { to: {} }, setup(e) { - const t = e, { config: s } = At(), n = () => s.value.navigate(t.to ?? "/"); - return (a, r) => (o(), i("a", Ae({ - onClick: qe(n, ["prevent"]), + const t = e, { config: s } = It(), n = () => s.value.navigate(t.to ?? "/"); + return (a, r) => (o(), i("a", Te({ + onClick: Ue(n, ["prevent"]), title: a.to, href: "javascript:void(0)" }, a.$attrs), [ - K(a.$slots, "default") - ], 16, Xa)); + U(a.$slots, "default") + ], 16, sr)); } }); -class er { +class nr { constructor() { Le(this, "callbacks", {}); } @@ -1459,67 +1481,67 @@ class er { typeof n == "function" && n(t, s); } } -const et = class et { +const tt = class tt { static component(t) { - const s = et.components[t]; + const s = tt.components[t]; if (s) return s; - const n = Zl(t), a = Object.keys(et.components).find((r) => Zl(r) === n); - return a && et.components[a] || null; + const n = Wl(t), a = Object.keys(tt.components).find((r) => Wl(r) === n); + return a && tt.components[a] || null; } }; -Le(et, "config", { +Le(tt, "config", { redirectSignIn: "/signin", redirectSignOut: "/auth/logout", navigate: (t) => location.href = t, assetsPathResolver: (t) => t, fallbackPathResolver: (t) => t, - storage: new pn(), + storage: new hn(), tableIcon: { svg: "" }, scopeWhitelist: { - enumFlagsConverter: In, - ...jn() + enumFlagsConverter: On, + ...Bn() } -}), Le(et, "autoQueryGridDefaults", { +}), Le(tt, "autoQueryGridDefaults", { deny: [], hide: [], toolbarButtonClass: void 0, tableStyle: "stripedRows", take: 25, maxFieldLength: 150 -}), Le(et, "events", To()), Le(et, "user", I(null)), Le(et, "metadata", I(null)), Le(et, "components", { - RouterLink: Ya -}), Le(et, "interceptors", new er()); -let Y = et; -function tr(e) { - Y.config = Object.assign(Y.config, e); +}), Le(tt, "events", jo()), Le(tt, "user", O(null)), Le(tt, "metadata", O(null)), Le(tt, "components", { + RouterLink: lr +}), Le(tt, "interceptors", new nr()); +let G = tt; +function or(e) { + G.config = Object.assign(G.config, e); } -function sr(e) { - Y.autoQueryGridDefaults = Object.assign(Y.autoQueryGridDefaults, e); +function ar(e) { + G.autoQueryGridDefaults = Object.assign(G.autoQueryGridDefaults, e); } function Vl(e) { - return e && Y.config.assetsPathResolver ? Y.config.assetsPathResolver(e) : e; + return e && G.config.assetsPathResolver ? G.config.assetsPathResolver(e) : e; } -function lr(e) { - return e && Y.config.fallbackPathResolver ? Y.config.fallbackPathResolver(e) : e; +function rr(e) { + return e && G.config.fallbackPathResolver ? G.config.fallbackPathResolver(e) : e; } -function nr(e, t) { - Y.interceptors.register(e, t); +function ir(e, t) { + G.interceptors.register(e, t); } -function At() { - const e = v(() => Y.config), t = v(() => Y.autoQueryGridDefaults), s = Y.events; +function It() { + const e = v(() => G.config), t = v(() => G.autoQueryGridDefaults), s = G.events; return { config: e, - setConfig: tr, + setConfig: or, events: s, autoQueryGridDefaults: t, - setAutoQueryGridDefaults: sr, + setAutoQueryGridDefaults: ar, assetsPathResolver: Vl, - fallbackPathResolver: lr, - registerInterceptor: nr + fallbackPathResolver: rr, + registerInterceptor: ir }; } -const Xn = ce({ +const eo = de({ inheritAttrs: !1, props: { image: Object, @@ -1532,58 +1554,58 @@ const Xn = ce({ return () => { let s = e.image; if (e.type) { - const { typeOf: r } = rt(), d = r(e.type); - d || console.warn(`Type ${e.type} does not exist`), d != null && d.icon ? s = d == null ? void 0 : d.icon : console.warn(`Type ${e.type} does not have a [Svg] icon`); + const { typeOf: r } = lt(), u = r(e.type); + u || console.warn(`Type ${e.type} does not exist`), u != null && u.icon ? s = u == null ? void 0 : u.icon : console.warn(`Type ${e.type} does not have a [Svg] icon`); } let n = e.svg || (s == null ? void 0 : s.svg) || ""; if (n.startsWith("").indexOf("class="), u = `${(s == null ? void 0 : s.cls) || ""} ${t.class || ""}`; - if (d == -1) - n = `").indexOf("class="), d = `${(s == null ? void 0 : s.cls) || ""} ${t.class || ""}`; + if (u == -1) + n = ` Ts(r.target) }); }; } -}), or = { class: "text-2xl font-semibold text-gray-900 dark:text-gray-300" }, ar = { class: "flex" }, rr = /* @__PURE__ */ l("path", { +}), ur = { class: "text-2xl font-semibold text-gray-900 dark:text-gray-300" }, dr = { class: "flex" }, cr = /* @__PURE__ */ l("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), ir = /* @__PURE__ */ l("path", { +}, null, -1), fr = /* @__PURE__ */ l("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), ur = [ - rr, - ir -], dr = /* @__PURE__ */ ce({ +}, null, -1), vr = [ + cr, + fr +], pr = /* @__PURE__ */ de({ __name: "Loading", props: { imageClass: { default: "w-6 h-6" } }, setup(e) { - return (t, s) => (o(), i("div", or, [ - l("div", ar, [ + return (t, s) => (o(), i("div", ur, [ + l("div", dr, [ (o(), i("svg", { - class: b(["self-center inline mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-gray-600 dark:fill-gray-300", t.imageClass]), + class: y(["self-center inline mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-gray-600 dark:fill-gray-300", t.imageClass]), role: "status", viewBox: "0 0 100 101", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, ur, 2)), + }, vr, 2)), l("span", null, [ - K(t.$slots, "default") + U(t.$slots, "default") ]) ]) ])); } -}), cr = ["href", "onClick"], fr = ["type"], en = "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", vr = /* @__PURE__ */ ce({ +}), mr = ["href", "onClick"], hr = ["type"], tn = "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", gr = /* @__PURE__ */ de({ __name: "OutlineButton", props: { type: { default: "submit" }, @@ -1591,31 +1613,31 @@ const Xn = ce({ }, setup(e) { return (t, s) => { - const n = G("router-link"); + const n = Z("router-link"); return t.href ? (o(), ae(n, { key: 0, to: t.href }, { - default: Ce(({ navigate: a }) => [ + default: xe(({ navigate: a }) => [ l("button", { - class: b(en), + class: y(tn), href: t.href, onClick: a }, [ - K(t.$slots, "default") - ], 8, cr) + U(t.$slots, "default") + ], 8, mr) ]), _: 3 - }, 8, ["to"])) : (o(), i("button", Ae({ + }, 8, ["to"])) : (o(), i("button", Te({ key: 1, type: t.type, - class: en + class: tn }, t.$attrs), [ - K(t.$slots, "default") - ], 16, fr)); + U(t.$slots, "default") + ], 16, hr)); }; } -}), pr = ["href", "onClick"], mr = ["type"], hr = /* @__PURE__ */ ce({ +}), yr = ["href", "onClick"], br = ["type"], wr = /* @__PURE__ */ de({ __name: "PrimaryButton", props: { type: { default: "submit" }, @@ -1633,31 +1655,31 @@ const Xn = ce({ indigo: "focus:ring-indigo-500 bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 disabled:hover:bg-indigo-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" }, n = v(() => "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 text-white " + (s[t.color] || s.indigo)); return (a, r) => { - const d = G("router-link"); - return a.href ? (o(), ae(d, { + const u = Z("router-link"); + return a.href ? (o(), ae(u, { key: 0, to: a.href }, { - default: Ce(({ navigate: u }) => [ + default: xe(({ navigate: d }) => [ l("button", { - class: b(n.value), + class: y(n.value), href: a.href, - onClick: u + onClick: d }, [ - K(a.$slots, "default") - ], 10, pr) + U(a.$slots, "default") + ], 10, yr) ]), _: 3 - }, 8, ["to"])) : (o(), i("button", Ae({ + }, 8, ["to"])) : (o(), i("button", Te({ key: 1, type: a.type, class: n.value }, a.$attrs), [ - K(a.$slots, "default") - ], 16, mr)); + U(a.$slots, "default") + ], 16, br)); }; } -}), gr = ["type", "href", "onClick"], yr = ["type"], tn = "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", br = /* @__PURE__ */ ce({ +}), kr = ["type", "href", "onClick"], _r = ["type"], sn = "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", $r = /* @__PURE__ */ de({ __name: "SecondaryButton", props: { type: {}, @@ -1665,29 +1687,29 @@ const Xn = ce({ }, setup(e) { return (t, s) => { - const n = G("router-link"); + const n = Z("router-link"); return t.href ? (o(), ae(n, { key: 0, to: t.href }, { - default: Ce(({ navigate: a }) => [ + default: xe(({ navigate: a }) => [ l("button", { type: t.type ?? "button", - class: b(tn), + class: y(sn), href: t.href, onClick: a }, [ - K(t.$slots, "default") - ], 8, gr) + U(t.$slots, "default") + ], 8, kr) ]), _: 3 - }, 8, ["to"])) : (o(), i("button", Ae({ + }, 8, ["to"])) : (o(), i("button", Te({ key: 1, type: t.type ?? "button", - class: tn + class: sn }, t.$attrs), [ - K(t.$slots, "default") - ], 16, yr)); + U(t.$slots, "default") + ], 16, _r)); }; } }); @@ -1702,7 +1724,7 @@ const Cs = { 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" -}, nt = { +}, 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" @@ -1711,7 +1733,7 @@ const Cs = { 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" -}, Pt = { +}, Bt = { 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", @@ -1721,18 +1743,18 @@ const Cs = { }, ll = { modalClass: "relative transform overflow-hidden rounded-lg bg-white dark:bg-black text-left shadow-xl transition-all sm:my-8", sizeClass: "sm:max-w-prose lg:max-w-screen-md xl:max-w-screen-lg 2xl:max-w-screen-xl sm:w-full" -}, Ze = { +}, Ee = { panelClass(e = "slideOver") { - return e == "card" ? Gt.panelClass : Pt.panelClass; + return e == "card" ? Gt.panelClass : Bt.panelClass; }, formClass(e = "slideOver") { - return e == "card" ? Gt.formClass : Pt.formClass; + return e == "card" ? Gt.formClass : Bt.formClass; }, headingClass(e = "slideOver") { - return e == "card" ? Gt.headingClass : Pt.headingClass; + return e == "card" ? Gt.headingClass : Bt.headingClass; }, subHeadingClass(e = "slideOver") { - return e == "card" ? Gt.subHeadingClass : Pt.subHeadingClass; + return e == "card" ? Gt.subHeadingClass : Bt.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" @@ -1780,38 +1802,38 @@ const Cs = { 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" -}, wr = { +}, Cr = { colspans: "col-span-3 sm:col-span-3" -}, Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +}, fh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, a: Cs, card: Gt, - dummy: wr, - form: Ze, + dummy: Cr, + form: Ee, grid: he, - input: nt, + input: ot, modal: ll, - slideOver: Pt -}, Symbol.toStringTag, { value: "Module" })), kr = /* @__PURE__ */ ce({ + slideOver: Bt +}, Symbol.toStringTag, { value: "Module" })), xr = /* @__PURE__ */ de({ __name: "TextLink", props: { color: { default: "blue" } }, setup(e) { - const t = ho(), s = e, n = v(() => (Cs[s.color] || Cs.blue) + (t.href ? "" : " cursor-pointer")); + const t = yo(), s = e, n = v(() => (Cs[s.color] || Cs.blue) + (t.href ? "" : " cursor-pointer")); return (a, r) => (o(), i("a", { - class: b(n.value) + class: y(n.value) }, [ - K(a.$slots, "default") + U(a.$slots, "default") ], 2)); } -}), _r = { +}), Lr = { class: "flex", "aria-label": "Breadcrumb" -}, $r = { +}, Vr = { role: "list", class: "flex items-center space-x-4" -}, Cr = ["href", "title"], xr = /* @__PURE__ */ l("svg", { +}, Sr = ["href", "title"], Mr = /* @__PURE__ */ l("svg", { class: "h-6 w-6 flex-shrink-0", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", @@ -1823,15 +1845,15 @@ const Cs = { 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), Lr = { class: "sr-only" }, Vr = /* @__PURE__ */ ce({ +], -1), Ar = { class: "sr-only" }, Tr = /* @__PURE__ */ de({ __name: "Breadcrumbs", props: { homeHref: { default: "/" }, homeLabel: { default: "Home" } }, setup(e) { - return (t, s) => (o(), i("nav", _r, [ - l("ol", $r, [ + return (t, s) => (o(), i("nav", Lr, [ + l("ol", Vr, [ l("li", null, [ l("div", null, [ l("a", { @@ -1839,16 +1861,16 @@ const Cs = { class: "text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400", title: t.homeLabel }, [ - xr, - l("span", Lr, P(t.homeLabel), 1) - ], 8, Cr) + Mr, + l("span", Ar, F(t.homeLabel), 1) + ], 8, Sr) ]) ]), - K(t.$slots, "default") + U(t.$slots, "default") ]) ])); } -}), Sr = { class: "flex items-center" }, Mr = /* @__PURE__ */ l("svg", { +}), Fr = { class: "flex items-center" }, Ir = /* @__PURE__ */ l("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", @@ -1860,7 +1882,7 @@ const Cs = { 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), Ar = ["href", "title"], Tr = ["title"], Fr = /* @__PURE__ */ ce({ +], -1), jr = ["href", "title"], Or = ["title"], Dr = /* @__PURE__ */ de({ __name: "Breadcrumb", props: { href: {}, @@ -1868,48 +1890,48 @@ const Cs = { }, setup(e) { return (t, s) => (o(), i("li", null, [ - l("div", Sr, [ - Mr, + l("div", Fr, [ + Ir, t.href ? (o(), i("a", { key: 0, href: t.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: t.title }, [ - K(t.$slots, "default") - ], 8, Ar)) : (o(), i("span", { + U(t.$slots, "default") + ], 8, jr)) : (o(), i("span", { key: 1, class: "ml-4 text-lg font-medium text-gray-700 dark:text-gray-300", title: t.title }, [ - K(t.$slots, "default") - ], 8, Tr)) + U(t.$slots, "default") + ], 8, Or)) ]) ])); } -}), Ir = { +}), Pr = { key: 0, class: "text-base font-semibold text-gray-500 dark:text-gray-400" -}, Dr = { +}, Br = { 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" -}, Pr = /* @__PURE__ */ ce({ +}, Hr = /* @__PURE__ */ de({ __name: "NavList", props: { title: {} }, setup(e) { return (t, s) => (o(), i("div", null, [ - t.title ? (o(), i("h2", Ir, P(t.title), 1)) : x("", !0), - l("ul", Dr, [ - K(t.$slots, "default") + t.title ? (o(), i("h2", Pr, F(t.title), 1)) : x("", !0), + l("ul", Br, [ + U(t.$slots, "default") ]) ])); } -}), jr = { class: "relative flex items-start space-x-4 py-6" }, Or = { class: "flex-shrink-0" }, Br = { class: "flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-50 dark:bg-indigo-900" }, Rr = { class: "min-w-0 flex-1" }, Er = { class: "text-base font-medium text-gray-900 dark:text-gray-100" }, Hr = { class: "rounded-sm focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2" }, zr = ["href"], Nr = /* @__PURE__ */ l("span", { +}), Rr = { class: "relative flex items-start space-x-4 py-6" }, Er = { class: "flex-shrink-0" }, zr = { class: "flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-50 dark:bg-indigo-900" }, Nr = { class: "min-w-0 flex-1" }, Ur = { class: "text-base font-medium text-gray-900 dark:text-gray-100" }, qr = { class: "rounded-sm focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2" }, Qr = ["href"], Kr = /* @__PURE__ */ l("span", { class: "absolute inset-0", "aria-hidden": "true" -}, null, -1), Ur = { class: "text-base text-gray-500" }, qr = /* @__PURE__ */ l("div", { class: "flex-shrink-0 self-center" }, [ +}, null, -1), Zr = { class: "text-base text-gray-500" }, Wr = /* @__PURE__ */ l("div", { class: "flex-shrink-0 self-center" }, [ /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-gray-400", xmlns: "http://www.w3.org/2000/svg", @@ -1923,7 +1945,7 @@ const Cs = { "clip-rule": "evenodd" }) ]) -], -1), Qr = /* @__PURE__ */ ce({ +], -1), Gr = /* @__PURE__ */ de({ __name: "NavListItem", props: { title: {}, @@ -1935,11 +1957,11 @@ const Cs = { }, setup(e) { return (t, s) => { - const n = G("Icon"); - return o(), i("li", jr, [ - l("div", Or, [ - l("span", Br, [ - xe(n, { + const n = Z("Icon"); + return o(), i("li", Rr, [ + l("div", Er, [ + l("span", zr, [ + ye(n, { class: "w-6 h-6 text-indigo-700 dark:text-indigo-300", image: t.icon, src: t.iconSrc, @@ -1948,73 +1970,73 @@ const Cs = { }, null, 8, ["image", "src", "svg", "alt"]) ]) ]), - l("div", Rr, [ - l("h3", Er, [ - l("span", Hr, [ + l("div", Nr, [ + l("h3", Ur, [ + l("span", qr, [ l("a", { href: t.href, class: "focus:outline-none" }, [ - Nr, - ke(" " + P(t.title), 1) - ], 8, zr) + Kr, + ke(" " + F(t.title), 1) + ], 8, Qr) ]) ]), - l("p", Ur, [ - K(t.$slots, "default") + l("p", Zr, [ + U(t.$slots, "default") ]) ]), - qr + Wr ]); }; } }); -function Yn(e) { - return e && e.SessionId ? Fo(e) : e; +function to(e) { + return e && e.SessionId ? Oo(e) : e; } -function Kr(e) { - Y.user.value = Yn(e), Y.events.publish("signIn", e); +function Jr(e) { + G.user.value = to(e), G.events.publish("signIn", e); } -function Zr() { - Y.user.value = null, Y.events.publish("signOut", null); +function Xr() { + G.user.value = null, G.events.publish("signOut", null); } const Sl = (e) => (e == null ? void 0 : e.roles) || [], Ml = (e) => (e == null ? void 0 : e.permissions) || []; -function eo(e) { - return Sl(Y.user.value).indexOf(e) >= 0; +function so(e) { + return Sl(G.user.value).indexOf(e) >= 0; } -function Wr(e) { - return Ml(Y.user.value).indexOf(e) >= 0; +function Yr(e) { + return Ml(G.user.value).indexOf(e) >= 0; } function Al() { - return eo("Admin"); + return so("Admin"); } function bs(e) { if (!e) return !1; if (!e.requiresAuth) return !0; - const t = Y.user.value; + const t = G.user.value; if (!t) return !1; if (Al()) return !0; - let [s, n] = [Sl(t), Ml(t)], [a, r, d, u] = [ + let [s, n] = [Sl(t), Ml(t)], [a, r, u, d] = [ e.requiredRoles || [], e.requiredPermissions || [], e.requiresAnyRole || [], e.requiresAnyPermission || [] ]; - return !(!a.every((c) => s.indexOf(c) >= 0) || d.length > 0 && !d.some((c) => s.indexOf(c) >= 0) || !r.every((c) => n.indexOf(c) >= 0) || u.length > 0 && !u.every((c) => n.indexOf(c) >= 0)); + return !(!a.every((c) => s.indexOf(c) >= 0) || u.length > 0 && !u.some((c) => s.indexOf(c) >= 0) || !r.every((c) => n.indexOf(c) >= 0) || d.length > 0 && !d.every((c) => n.indexOf(c) >= 0)); } -function Gr(e) { +function ei(e) { if (!e || !e.requiresAuth) return null; - const t = Y.user.value; + const t = G.user.value; if (!t) return `${e.request.name} requires Authentication`; if (Al()) return null; - let [s, n] = [Sl(t), Ml(t)], [a, r, d, u] = [ + let [s, n] = [Sl(t), Ml(t)], [a, r, u, d] = [ e.requiredRoles || [], e.requiredPermissions || [], e.requiresAnyRole || [], @@ -2023,13 +2045,13 @@ function Gr(e) { if (c.length > 0) return `Requires ${c.map((p) => "" + p + "").join(", ")} Role` + (c.length > 1 ? "s" : ""); let f = r.filter((p) => n.indexOf(p) < 0); - return f.length > 0 ? `Requires ${f.map((p) => "" + p + "").join(", ")} Permission` + (f.length > 1 ? "s" : "") : d.length > 0 && !d.some((p) => s.indexOf(p) >= 0) ? `Requires any ${d.filter((p) => s.indexOf(p) < 0).map((p) => "" + p + "").join(", ")} Role` + (c.length > 1 ? "s" : "") : u.length > 0 && !u.every((p) => n.indexOf(p) >= 0) ? `Requires any ${u.filter((p) => n.indexOf(p) < 0).map((p) => "" + p + "").join(", ")} Permission` + (f.length > 1 ? "s" : "") : null; + return f.length > 0 ? `Requires ${f.map((p) => "" + p + "").join(", ")} Permission` + (f.length > 1 ? "s" : "") : u.length > 0 && !u.some((p) => s.indexOf(p) >= 0) ? `Requires any ${u.filter((p) => s.indexOf(p) < 0).map((p) => "" + p + "").join(", ")} Role` + (c.length > 1 ? "s" : "") : d.length > 0 && !d.every((p) => n.indexOf(p) >= 0) ? `Requires any ${d.filter((p) => n.indexOf(p) < 0).map((p) => "" + p + "").join(", ")} Permission` + (f.length > 1 ? "s" : "") : null; } function Tl() { - const e = v(() => Y.user.value || null), t = v(() => Y.user.value != null); - return { signIn: Kr, signOut: Zr, user: e, toAuth: Yn, isAuthenticated: t, hasRole: eo, hasPermission: Wr, isAdmin: Al, canAccess: bs, invalidAccessMessage: Gr }; + const e = v(() => G.user.value || null), t = v(() => G.user.value != null); + return { signIn: Jr, signOut: Xr, user: e, toAuth: to, isAuthenticated: t, hasRole: so, hasPermission: Yr, isAdmin: Al, canAccess: bs, invalidAccessMessage: ei }; } -const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ +const ti = { key: 0 }, si = { class: "md:p-4" }, lo = /* @__PURE__ */ de({ __name: "EnsureAccess", props: { invalidAccess: {}, @@ -2037,28 +2059,28 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }, emits: ["done"], setup(e) { - const { isAuthenticated: t } = Tl(), { config: s } = At(), n = () => { + const { isAuthenticated: t } = Tl(), { config: s } = It(), n = () => { let r = location.href.substring(location.origin.length) || "/"; - const d = Bt(s.value.redirectSignIn, { redirect: r }); - s.value.navigate(d); + const u = Et(s.value.redirectSignIn, { redirect: r }); + s.value.navigate(u); }, a = () => { let r = location.href.substring(location.origin.length) || "/"; - const d = Bt(s.value.redirectSignOut, { ReturnUrl: r }); - s.value.navigate(d); + const u = Et(s.value.redirectSignOut, { ReturnUrl: r }); + s.value.navigate(u); }; - return (r, d) => { - const u = G("Alert"), c = G("SecondaryButton"); - return r.invalidAccess ? (o(), i("div", Jr, [ - xe(u, { - class: b(r.alertClass), + return (r, u) => { + const d = Z("Alert"), c = Z("SecondaryButton"); + return r.invalidAccess ? (o(), i("div", ti, [ + ye(d, { + class: y(r.alertClass), innerHTML: r.invalidAccess }, null, 8, ["class", "innerHTML"]), - l("div", Xr, [ - te(t) ? (o(), ae(c, { + l("div", si, [ + X(t) ? (o(), ae(c, { key: 1, onClick: a }, { - default: Ce(() => [ + default: xe(() => [ ke("Sign Out") ]), _: 1 @@ -2066,7 +2088,7 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ key: 0, onClick: n }, { - default: Ce(() => [ + default: xe(() => [ ke("Sign In") ]), _: 1 @@ -2075,7 +2097,7 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ ])) : x("", !0); }; } -}), Yr = { class: "absolute top-0 right-0 bg-white dark:bg-black border dark:border-gray-800 rounded normal-case text-sm shadow w-80" }, ei = { class: "p-4" }, ti = /* @__PURE__ */ l("h3", { class: "text-base font-medium mb-3 dark:text-gray-100" }, "Sort", -1), si = { class: "flex w-full justify-center" }, li = /* @__PURE__ */ l("svg", { +}), li = { class: "absolute top-0 right-0 bg-white dark:bg-black border dark:border-gray-800 rounded normal-case text-sm shadow w-80" }, ni = { class: "p-4" }, oi = /* @__PURE__ */ l("h3", { class: "text-base font-medium mb-3 dark:text-gray-100" }, "Sort", -1), ai = { class: "flex w-full justify-center" }, ri = /* @__PURE__ */ l("svg", { class: "w-6 h-6", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16" @@ -2087,12 +2109,12 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }), /* @__PURE__ */ l("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), ni = /* @__PURE__ */ l("span", null, "ASC", -1), oi = [ - li, - ni -], ai = /* @__PURE__ */ xs('DESC', 2), ri = [ - ai -], ii = /* @__PURE__ */ l("h3", { class: "text-base font-medium mt-4 mb-2" }, " Filter ", -1), ui = { key: 0 }, di = ["id", "value"], ci = ["for"], fi = { key: 1 }, vi = { class: "mb-2" }, pi = { 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" }, mi = ["onClick"], hi = /* @__PURE__ */ l("svg", { +], -1), ii = /* @__PURE__ */ l("span", null, "ASC", -1), ui = [ + ri, + ii +], di = /* @__PURE__ */ xs('DESC', 2), ci = [ + di +], fi = /* @__PURE__ */ l("h3", { class: "text-base font-medium mt-4 mb-2" }, " Filter ", -1), vi = { key: 0 }, pi = ["id", "value"], mi = ["for"], hi = { key: 1 }, gi = { class: "mb-2" }, yi = { 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" }, bi = ["onClick"], wi = /* @__PURE__ */ l("svg", { class: "h-2 w-2", stroke: "currentColor", fill: "none", @@ -2103,9 +2125,9 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ "stroke-width": "1.5", d: "M1 1l6 6m0-6L1 7" }) -], -1), gi = [ - hi -], yi = { class: "flex" }, bi = /* @__PURE__ */ l("svg", { +], -1), ki = [ + wi +], _i = { class: "flex" }, $i = /* @__PURE__ */ l("svg", { class: "h-6 w-6", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", @@ -2117,9 +2139,9 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ 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), wi = [ - bi -], ki = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, Fl = /* @__PURE__ */ ce({ +], -1), Ci = [ + $i +], xi = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, Fl = /* @__PURE__ */ de({ __name: "FilterColumn", props: { definitions: {}, @@ -2128,167 +2150,167 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }, emits: ["done", "save"], setup(e, { emit: t }) { - const s = e, n = t, a = I(), r = I(""), d = I(""), u = I([]), c = v(() => s.column.meta.isEnum == !0), f = v(() => at(s.column.meta.type === "Nullable`1" ? s.column.meta.genericArgs[0] : s.column.meta.type)), p = v(() => s.column.meta.isEnum == !0 ? _l(An(f.value.name)) : []), $ = v(() => { - var V; - return ((V = g(s.column.type)) == null ? void 0 : V.map((z) => ({ key: z.value, value: z.name }))) || []; - }), m = I({ filters: [] }), k = v(() => m.value.filters); + const s = e, n = t, a = O(), r = O(""), u = O(""), d = O([]), c = v(() => s.column.meta.isEnum == !0), f = v(() => rt(s.column.meta.type === "Nullable`1" ? s.column.meta.genericArgs[0] : s.column.meta.type)), p = v(() => s.column.meta.isEnum == !0 ? _l(Fn(f.value.name)) : []), $ = v(() => { + var L; + return ((L = g(s.column.type)) == null ? void 0 : L.map((z) => ({ key: z.value, value: z.name }))) || []; + }), m = O({ filters: [] }), k = v(() => m.value.filters); ws(() => m.value = Object.assign({}, s.column.settings, { filters: Array.from(s.column.settings.filters) })), ws(() => { - var z, Q, se, R, Z; - let V = ((se = (Q = (z = s.column.settings.filters) == null ? void 0 : z[0]) == null ? void 0 : Q.value) == null ? void 0 : se.split(",")) || []; - if (V.length > 0 && ((R = f.value) != null && R.isEnumInt)) { - const J = parseInt(V[0]); - V = ((Z = f.value.enumValues) == null ? void 0 : Z.filter((U) => (J & parseInt(U)) > 0)) || []; + var z, K, le, R, W; + let L = ((le = (K = (z = s.column.settings.filters) == null ? void 0 : z[0]) == null ? void 0 : K.value) == null ? void 0 : le.split(",")) || []; + if (L.length > 0 && ((R = f.value) != null && R.isEnumInt)) { + const ee = parseInt(L[0]); + L = ((W = f.value.enumValues) == null ? void 0 : W.filter((q) => (ee & parseInt(q)) > 0)) || []; } - u.value = V; + d.value = L; }); - function g(V) { + function g(L) { let z = s.definitions; - return Ln(V) || (z = z.filter((Q) => Q.types !== "string")), z; + return Sn(L) || (z = z.filter((K) => K.types !== "string")), z; } - function w(V, z) { - return g(V).find((Q) => Q.value === z); + function b(L, z) { + return g(L).find((K) => K.value === z); } - function j() { + function P() { var z; if (!r.value) return; - let V = (z = w(s.column.type, r.value)) == null ? void 0 : z.name; - V && (m.value.filters.push({ key: r.value, name: V, value: d.value }), r.value = d.value = ""); + let L = (z = b(s.column.type, r.value)) == null ? void 0 : z.name; + L && (m.value.filters.push({ key: r.value, name: L, value: u.value }), r.value = u.value = ""); } - function H(V) { - m.value.filters.splice(V, 1); + function I(L) { + m.value.filters.splice(L, 1); } - function re(V) { - return Pn(w(s.column.type, V.key), s.column.type, V); + function se(L) { + return Pn(b(s.column.type, L.key), s.column.type, L); } - function F() { + function j() { n("done"); } function T() { - var V; - r.value = "%", (V = a.value) == null || V.focus(); + var L; + r.value = "%", (L = a.value) == null || L.focus(); } - function A() { - var V; - if (d.value && j(), c.value) { - let z = Object.values(u.value).filter((Q) => Q); - m.value.filters = z.length > 0 ? (V = f.value) != null && V.isEnumInt ? [{ key: "%HasAny", name: "HasAny", value: z.map((Q) => parseInt(Q)).reduce((Q, se) => Q + se, 0).toString() }] : [{ key: "%In", name: "In", value: z.join(",") }] : []; + function M() { + var L; + if (u.value && P(), c.value) { + let z = Object.values(d.value).filter((K) => K); + m.value.filters = z.length > 0 ? (L = f.value) != null && L.isEnumInt ? [{ key: "%HasAny", name: "HasAny", value: z.map((K) => parseInt(K)).reduce((K, le) => K + le, 0).toString() }] : [{ key: "%In", name: "In", value: z.join(",") }] : []; } n("save", m.value), n("done"); } - function ue(V) { - m.value.sort = V === m.value.sort ? void 0 : V, $t(A); + function ie(L) { + m.value.sort = L === m.value.sort ? void 0 : L, St(M); } - return (V, z) => { - var J; - const Q = G("SelectInput"), se = G("TextInput"), R = G("PrimaryButton"), Z = G("SecondaryButton"); + return (L, z) => { + var ee; + const K = Z("SelectInput"), le = Z("TextInput"), R = Z("PrimaryButton"), W = Z("SecondaryButton"); return o(), i("div", { class: "fixed z-20 inset-0 overflow-y-auto", - onClick: F, + onClick: j, onVnodeMounted: T }, [ l("div", { class: "absolute", - style: nl(`top:${V.topLeft.y}px;left:${V.topLeft.x}px`), - onClick: z[5] || (z[5] = qe(() => { + style: nl(`top:${L.topLeft.y}px;left:${L.topLeft.x}px`), + onClick: z[5] || (z[5] = Ue(() => { }, ["stop"])) }, [ - l("div", Yr, [ - l("div", ei, [ - ti, - l("div", si, [ + l("div", li, [ + l("div", ni, [ + oi, + l("div", ai, [ l("button", { type: "button", title: "Sort Ascending", - onClick: z[0] || (z[0] = (U) => ue("ASC")), - class: b(`${m.value.sort === "ASC" ? "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`) - }, oi, 2), + onClick: z[0] || (z[0] = (q) => ie("ASC")), + class: y(`${m.value.sort === "ASC" ? "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`) + }, ui, 2), l("button", { type: "button", title: "Sort Descending", - onClick: z[1] || (z[1] = (U) => ue("DESC")), - class: b(`${m.value.sort === "DESC" ? "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`) - }, ri, 2) + onClick: z[1] || (z[1] = (q) => ie("DESC")), + class: y(`${m.value.sort === "DESC" ? "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`) + }, ci, 2) ]), - ii, - c.value ? (o(), i("div", ui, [ - (o(!0), i(Ie, null, De(p.value, (U) => (o(), i("div", { - key: U.key, + fi, + c.value ? (o(), i("div", vi, [ + (o(!0), i(Me, null, je(p.value, (q) => (o(), i("div", { + key: q.key, class: "flex items-center" }, [ - Ct(l("input", { + Mt(l("input", { type: "checkbox", - id: U.key, - value: U.key, - "onUpdate:modelValue": z[2] || (z[2] = (M) => u.value = M), + id: q.key, + value: q.key, + "onUpdate:modelValue": z[2] || (z[2] = (A) => d.value = A), class: "h-4 w-4 border-gray-300 rounded text-indigo-600 focus:ring-indigo-500" - }, null, 8, di), [ - [ol, u.value] + }, null, 8, pi), [ + [ol, d.value] ]), l("label", { - for: U.key, + for: q.key, class: "ml-3" - }, P(U.value), 9, ci) + }, F(q.value), 9, mi) ]))), 128)) - ])) : (o(), i("div", fi, [ - (o(!0), i(Ie, null, De(k.value, (U, M) => (o(), i("div", vi, [ - l("span", pi, [ - ke(P(V.column.name) + " " + P(U.name) + " " + P(re(U)) + " ", 1), + ])) : (o(), i("div", hi, [ + (o(!0), i(Me, null, je(k.value, (q, A) => (o(), i("div", gi, [ + l("span", yi, [ + ke(F(L.column.name) + " " + F(q.name) + " " + F(se(q)) + " ", 1), l("button", { type: "button", - onClick: (ee) => H(M), + onClick: (te) => I(A), 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" - }, gi, 8, mi) + }, ki, 8, bi) ]) ]))), 256)), - l("div", yi, [ - xe(Q, { + l("div", _i, [ + ye(K, { id: "filterRule", class: "w-32 mr-1", modelValue: r.value, - "onUpdate:modelValue": z[3] || (z[3] = (U) => r.value = U), + "onUpdate:modelValue": z[3] || (z[3] = (q) => r.value = q), entries: $.value, label: "", placeholder: "" }, null, 8, ["modelValue", "entries"]), - ((J = w(V.column.type, r.value)) == null ? void 0 : J.valueType) !== "none" ? (o(), ae(se, { + ((ee = b(L.column.type, r.value)) == null ? void 0 : ee.valueType) !== "none" ? (o(), ae(le, { key: 0, ref_key: "txtFilter", ref: a, id: "filterValue", class: "w-32 mr-1", type: "text", - modelValue: d.value, - "onUpdate:modelValue": z[4] || (z[4] = (U) => d.value = U), - onKeyup: nn(j, ["enter"]), + modelValue: u.value, + "onUpdate:modelValue": z[4] || (z[4] = (q) => u.value = q), + onKeyup: on(P, ["enter"]), label: "", placeholder: "" }, null, 8, ["modelValue"])) : x("", !0), l("div", { class: "pt-1" }, [ l("button", { type: "button", - onClick: j, + onClick: P, 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" - }, wi) + }, Ci) ]) ]) ])) ]), - l("div", ki, [ - xe(R, { - onClick: A, + l("div", xi, [ + ye(R, { + onClick: M, color: "red", class: "ml-2" }, { - default: Ce(() => [ + default: xe(() => [ ke(" Save ") ]), _: 1 }), - xe(Z, { onClick: F }, { - default: Ce(() => [ + ye(W, { onClick: j }, { + default: xe(() => [ ke(" Cancel ") ]), _: 1 @@ -2299,7 +2321,7 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ ], 512); }; } -}), _i = { class: "px-4 sm:px-6 lg:px-8 text-sm" }, $i = { class: "flex flex-wrap" }, Ci = { class: "group pr-4 sm:pr-6 lg:pr-8" }, xi = { class: "flex justify-between w-full font-medium" }, Li = { class: "w-6 flex justify-end" }, Vi = { class: "hidden group-hover:inline" }, Si = ["onClick", "title"], Mi = /* @__PURE__ */ l("svg", { +}), Li = { class: "px-4 sm:px-6 lg:px-8 text-sm" }, Vi = { class: "flex flex-wrap" }, Si = { class: "group pr-4 sm:pr-6 lg:pr-8" }, Mi = { class: "flex justify-between w-full font-medium" }, Ai = { class: "w-6 flex justify-end" }, Ti = { class: "hidden group-hover:inline" }, Fi = ["onClick", "title"], Ii = /* @__PURE__ */ l("svg", { class: "h-2 w-2", stroke: "currentColor", fill: "none", @@ -2310,12 +2332,12 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ "stroke-width": "1.5", d: "M1 1l6 6m0-6L1 7" }) -], -1), Ai = [ - Mi -], Ti = { +], -1), ji = [ + Ii +], Oi = { key: 0, class: "pt-2" -}, Fi = { class: "ml-2" }, Ii = { key: 1 }, Di = { class: "pt-2" }, Pi = { 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" }, ji = ["onClick"], Oi = /* @__PURE__ */ l("svg", { +}, Di = { class: "ml-2" }, Pi = { key: 1 }, Bi = { class: "pt-2" }, Hi = { 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" }, Ri = ["onClick"], Ei = /* @__PURE__ */ l("svg", { class: "h-2 w-2", stroke: "currentColor", fill: "none", @@ -2326,11 +2348,11 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ "stroke-width": "1.5", d: "M1 1l6 6m0-6L1 7" }) -], -1), Bi = [ - Oi -], Ri = /* @__PURE__ */ l("span", null, "Clear All", -1), Ei = [ - Ri -], Il = /* @__PURE__ */ ce({ +], -1), zi = [ + Ei +], Ni = /* @__PURE__ */ l("span", null, "Clear All", -1), Ui = [ + Ni +], Il = /* @__PURE__ */ de({ __name: "FilterViews", props: { definitions: {}, @@ -2343,15 +2365,15 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ var k, g; return (g = (k = m == null ? void 0 : m[0]) == null ? void 0 : k.value) == null ? void 0 : g.split(","); } - function d(m) { + function u(m) { let k = s.definitions; - return Ln(m) || (k = k.filter((g) => g.types !== "string")), k; + return Sn(m) || (k = k.filter((g) => g.types !== "string")), k; } - function u(m, k) { - return d(m).find((g) => g.value === k); + function d(m, k) { + return u(m).find((g) => g.value === k); } function c(m, k) { - return Pn(u(m.type, k.value), m.type, k); + return Pn(d(m.type, k.value), m.type, k); } function f(m) { m.settings.filters = [], n("change", m); @@ -2364,37 +2386,37 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ m.settings.filters = [], n("change", m); }), n("done"); } - return (m, k) => (o(), i("div", _i, [ - l("div", $i, [ - (o(!0), i(Ie, null, De(a.value, (g) => (o(), i("fieldset", Ci, [ - l("legend", xi, [ - l("span", null, P(te(ze)(g.name)), 1), - l("span", Li, [ - l("span", Vi, [ + return (m, k) => (o(), i("div", Li, [ + l("div", Vi, [ + (o(!0), i(Me, null, je(a.value, (g) => (o(), i("fieldset", Si, [ + l("legend", Mi, [ + l("span", null, F(X(Pe)(g.name)), 1), + l("span", Ai, [ + l("span", Ti, [ l("button", { - onClick: (w) => f(g), - title: `Clear all ${te(ze)(g.name)} filters`, + onClick: (b) => f(g), + title: `Clear all ${X(Pe)(g.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" - }, Ai, 8, Si) + }, ji, 8, Fi) ]) ]) ]), - g.meta.isEnum ? (o(), i("div", Ti, [ - (o(!0), i(Ie, null, De(r(g.settings.filters), (w) => (o(), i("div", { - key: w, + g.meta.isEnum ? (o(), i("div", Oi, [ + (o(!0), i(Me, null, je(r(g.settings.filters), (b) => (o(), i("div", { + key: b, class: "flex items-center" }, [ - l("label", Fi, P(w), 1) + l("label", Di, F(b), 1) ]))), 128)) - ])) : (o(), i("div", Ii, [ - (o(!0), i(Ie, null, De(g.settings.filters, (w, j) => (o(), i("div", Di, [ - l("span", Pi, [ - ke(P(g.name) + " " + P(w.name) + " " + P(c(g, w)) + " ", 1), + ])) : (o(), i("div", Pi, [ + (o(!0), i(Me, null, je(g.settings.filters, (b, P) => (o(), i("div", Bi, [ + l("span", Hi, [ + ke(F(g.name) + " " + F(b.name) + " " + F(c(g, b)) + " ", 1), l("button", { type: "button", - onClick: (H) => p(g, j), + onClick: (I) => p(g, P), 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" - }, Bi, 8, ji) + }, zi, 8, Ri) ]) ]))), 256)) ])) @@ -2405,11 +2427,11 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ type: "button", onClick: $, 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" - }, Ei) + }, Ui) ]) ])); } -}), Hi = { class: "bg-white dark:bg-black px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, zi = { class: "" }, Ni = { class: "mt-3 text-center sm:mt-0 sm:mx-4 sm:text-left" }, Ui = /* @__PURE__ */ l("h3", { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-100" }, "Query Preferences", -1), qi = { class: "mt-4" }, Qi = ["for"], Ki = ["id"], Zi = ["value", "selected"], Wi = { class: "mt-4 flex items-center py-4 border-b border-gray-200 dark:border-gray-800" }, Gi = ["id", "checked"], Ji = ["for"], Xi = { class: "mt-4" }, Yi = { class: "pb-2 px-4" }, eu = { class: "" }, tu = ["id", "value"], su = ["for"], lu = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, Dl = /* @__PURE__ */ ce({ +}), qi = { class: "bg-white dark:bg-black px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Qi = { class: "" }, Ki = { class: "mt-3 text-center sm:mt-0 sm:mx-4 sm:text-left" }, Zi = /* @__PURE__ */ l("h3", { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-100" }, "Query Preferences", -1), Wi = { class: "mt-4" }, Gi = ["for"], Ji = ["id"], Xi = ["value", "selected"], Yi = { class: "mt-4 flex items-center py-4 border-b border-gray-200 dark:border-gray-800" }, eu = ["id", "checked"], tu = ["for"], su = { class: "mt-4" }, lu = { class: "pb-2 px-4" }, nu = { class: "" }, ou = ["id", "value"], au = ["for"], ru = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, jl = /* @__PURE__ */ de({ __name: "QueryPrefs", props: { id: { default: "QueryPrefs" }, @@ -2419,81 +2441,81 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }, emits: ["done", "save"], setup(e, { emit: t }) { - const { autoQueryGridDefaults: s } = At(), n = e, a = t, r = I({}); + const { autoQueryGridDefaults: s } = It(), n = e, a = t, r = O({}); ws(() => r.value = Object.assign({ take: s.value.take, selectedColumns: [] }, n.prefs)); - const d = [10, 25, 50, 100, 250, 500, 1e3]; - function u() { + const u = [10, 25, 50, 100, 250, 500, 1e3]; + function d() { a("done"); } function c() { a("save", r.value); } return (f, p) => { - const $ = G("PrimaryButton"), m = G("SecondaryButton"), k = G("ModalDialog"); + const $ = Z("PrimaryButton"), m = Z("SecondaryButton"), k = Z("ModalDialog"); return o(), ae(k, { id: f.id, - onDone: u, + onDone: d, "size-class": "w-full sm:max-w-prose" }, { - default: Ce(() => [ - l("div", Hi, [ - l("div", zi, [ - l("div", Ni, [ - Ui, - l("div", qi, [ + default: xe(() => [ + l("div", qi, [ + l("div", Qi, [ + l("div", Ki, [ + Zi, + l("div", Wi, [ l("label", { for: `${f.id}-take`, class: "block text-sm font-medium text-gray-700 dark:text-gray-300" - }, "Results per page", 8, Qi), - Ct(l("select", { + }, "Results per page", 8, Gi), + Mt(l("select", { id: `${f.id}-take`, "onUpdate:modelValue": p[0] || (p[0] = (g) => r.value.take = g), 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), i(Ie, null, De(d.filter((g) => n.maxLimit == null || g <= n.maxLimit), (g) => (o(), i("option", { + (o(!0), i(Me, null, je(u.filter((g) => n.maxLimit == null || g <= n.maxLimit), (g) => (o(), i("option", { value: g, selected: g === r.value.take - }, P(g), 9, Zi))), 256)) - ], 8, Ki), [ - [go, r.value.take] + }, F(g), 9, Xi))), 256)) + ], 8, Ji), [ + [bo, r.value.take] ]) ]), - l("div", Wi, [ + l("div", Yi, [ l("input", { type: "radio", id: `${f.id}-allColumns`, onClick: p[1] || (p[1] = (g) => r.value.selectedColumns = []), checked: r.value.selectedColumns.length === 0, 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, Gi), + }, null, 8, eu), l("label", { class: "ml-3 block text-gray-700 dark:text-gray-300", for: `${f.id}-allColumns` - }, "View all columns", 8, Ji) + }, "View all columns", 8, tu) ]), - l("div", Xi, [ - l("div", Yi, [ - l("div", eu, [ - (o(!0), i(Ie, null, De(f.columns, (g) => (o(), i("div", { + l("div", su, [ + l("div", lu, [ + l("div", nu, [ + (o(!0), i(Me, null, je(f.columns, (g) => (o(), i("div", { key: g.name, class: "flex items-center" }, [ - Ct(l("input", { + Mt(l("input", { type: "checkbox", id: g.name, value: g.name, - "onUpdate:modelValue": p[2] || (p[2] = (w) => r.value.selectedColumns = w), + "onUpdate:modelValue": p[2] || (p[2] = (b) => r.value.selectedColumns = b), 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, tu), [ + }, null, 8, ou), [ [ol, r.value.selectedColumns] ]), l("label", { for: g.name, class: "ml-3" - }, P(g.name), 9, su) + }, F(g.name), 9, au) ]))), 128)) ]) ]) @@ -2501,19 +2523,19 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ ]) ]) ]), - l("div", lu, [ - xe($, { + l("div", ru, [ + ye($, { onClick: c, color: "red", class: "ml-2" }, { - default: Ce(() => [ + default: xe(() => [ ke(" Save ") ]), _: 1 }), - xe(m, { onClick: u }, { - default: Ce(() => [ + ye(m, { onClick: d }, { + default: xe(() => [ ke(" Cancel ") ]), _: 1 @@ -2524,10 +2546,10 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }, 8, ["id"]); }; } -}), nu = { key: 0 }, ou = { key: 1 }, au = { +}), iu = { key: 0 }, uu = { key: 1 }, du = { key: 2, class: "pt-1" -}, ru = { key: 0 }, iu = { key: 1 }, uu = { key: 3 }, du = { class: "pl-1 pt-1 flex flex-wrap" }, cu = { class: "flex mt-1" }, fu = ["title"], vu = /* @__PURE__ */ l("svg", { +}, cu = { key: 0 }, fu = { key: 1 }, vu = { key: 2 }, pu = { key: 4 }, mu = { class: "pl-1 pt-1 flex flex-wrap" }, hu = { class: "flex mt-1" }, gu = ["title"], yu = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" @@ -2541,9 +2563,9 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ stroke: "currentColor" }) ]) -], -1), pu = [ - vu -], mu = ["disabled"], hu = /* @__PURE__ */ l("svg", { +], -1), bu = [ + yu +], wu = ["disabled"], ku = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" @@ -2552,9 +2574,9 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ d: "M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z", fill: "currentColor" }) -], -1), gu = [ - hu -], yu = ["disabled"], bu = /* @__PURE__ */ l("svg", { +], -1), _u = [ + ku +], $u = ["disabled"], Cu = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" @@ -2563,9 +2585,9 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ d: "M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z", fill: "currentColor" }) -], -1), wu = [ - bu -], ku = ["disabled"], _u = /* @__PURE__ */ l("svg", { +], -1), xu = [ + Cu +], Lu = ["disabled"], Vu = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" @@ -2574,9 +2596,9 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ d: "M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z", fill: "currentColor" }) -], -1), $u = [ - _u -], Cu = ["disabled"], xu = /* @__PURE__ */ l("svg", { +], -1), Su = [ + Vu +], Mu = ["disabled"], Au = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" @@ -2585,15 +2607,15 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ d: "M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z", fill: "currentColor" }) -], -1), Lu = [ - xu -], Vu = { +], -1), Tu = [ + Au +], Fu = { key: 0, class: "flex mt-1" -}, Su = { class: "px-4 text-lg text-black dark:text-white" }, Mu = { key: 0 }, Au = { key: 1 }, Tu = /* @__PURE__ */ l("span", { class: "hidden xl:inline" }, " Showing Results ", -1), Fu = { key: 2 }, Iu = { class: "flex flex-wrap" }, Du = { +}, Iu = { class: "px-4 text-lg text-black dark:text-white" }, ju = { key: 0 }, Ou = { key: 1 }, Du = /* @__PURE__ */ l("span", { class: "hidden xl:inline" }, " Showing Results ", -1), Pu = { key: 2 }, Bu = { class: "flex flex-wrap" }, Hu = { key: 0, class: "pl-2 mt-1" -}, Pu = /* @__PURE__ */ l("svg", { +}, Ru = /* @__PURE__ */ l("svg", { class: "w-5 h-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" @@ -2606,36 +2628,36 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ "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), ju = [ - Pu -], Ou = { +], -1), Eu = [ + Ru +], zu = { key: 1, class: "pl-2 mt-1" -}, Bu = /* @__PURE__ */ xs('Excel', 2), Ru = [ - Bu -], Eu = { +}, Nu = /* @__PURE__ */ xs('Excel', 2), Uu = [ + Nu +], qu = { key: 2, class: "pl-2 mt-1" -}, Hu = { +}, Qu = { 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" -}, zu = /* @__PURE__ */ l("path", { +}, Ku = /* @__PURE__ */ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M5 13l4 4L19 7" -}, null, -1), Nu = [ - zu -], Uu = { +}, null, -1), Zu = [ + Ku +], Wu = { key: 1, class: "w-5 h-5 mr-1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, qu = /* @__PURE__ */ l("g", { fill: "none" }, [ +}, Gu = /* @__PURE__ */ l("g", { fill: "none" }, [ /* @__PURE__ */ l("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", @@ -2650,12 +2672,12 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ "stroke-linecap": "round", "stroke-linejoin": "round" }) -], -1), Qu = [ - qu -], Ku = /* @__PURE__ */ l("span", { class: "whitespace-nowrap" }, "Copy URL", -1), Zu = { +], -1), Ju = [ + Gu +], Xu = /* @__PURE__ */ l("span", { class: "whitespace-nowrap" }, "Copy URL", -1), Yu = { key: 3, class: "pl-2 mt-1" -}, Wu = /* @__PURE__ */ l("svg", { +}, ed = /* @__PURE__ */ l("svg", { class: "w-5 h-5", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", @@ -2665,12 +2687,12 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ 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), Gu = [ - Wu -], Ju = { +], -1), td = [ + ed +], sd = { key: 4, class: "pl-2 mt-1" -}, Xu = /* @__PURE__ */ l("svg", { +}, ld = /* @__PURE__ */ l("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", @@ -2682,36 +2704,36 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ 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), Yu = { class: "mr-1" }, ed = { +], -1), nd = { class: "mr-1" }, od = { 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" -}, td = /* @__PURE__ */ l("path", { +}, ad = /* @__PURE__ */ l("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), sd = [ - td -], ld = { +}, null, -1), rd = [ + ad +], id = { 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" -}, nd = /* @__PURE__ */ l("path", { +}, ud = /* @__PURE__ */ l("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), od = [ - nd -], ad = { +}, null, -1), dd = [ + ud +], cd = { key: 5, class: "pl-2 mt-1" -}, rd = ["title"], id = /* @__PURE__ */ l("svg", { +}, fd = ["title"], vd = /* @__PURE__ */ l("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" @@ -2720,13 +2742,13 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z", fill: "currentColor" }) -], -1), ud = { class: "whitespace-nowrap" }, dd = { key: 7 }, cd = { +], -1), pd = { class: "whitespace-nowrap" }, md = { key: 8 }, hd = { key: 0, class: "cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50" -}, fd = { class: "mr-1 select-none" }, vd = { +}, gd = { class: "mr-1 select-none" }, yd = { key: 1, class: "flex justify-between items-center" -}, pd = { class: "mr-1 select-none" }, ps = 25, md = /* @__PURE__ */ ce({ +}, bd = { class: "mr-1 select-none" }, ps = 25, wd = /* @__PURE__ */ de({ __name: "AutoQueryGrid", props: { filterDefinitions: {}, @@ -2766,604 +2788,616 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }, emits: ["headerSelected", "rowSelected", "nav"], setup(e, { expose: t, emit: s }) { - const { config: n, autoQueryGridDefaults: a } = At(), r = a, d = n.value.storage, u = e, c = s, f = Ue("client"), p = "filtering,queryString,queryFilters".split(","), $ = "copyApiUrl,downloadCsv,filtersView,newItem,pagingInfo,pagingNav,preferences,refresh,resetPreferences,toolbar".split(","), m = v(() => u.deny ? _t(p, u.deny) : _t(p, r.value.deny)), k = v(() => u.hide ? _t($, u.hide) : _t($, r.value.hide)); + const { config: n, autoQueryGridDefaults: a } = It(), r = a, u = n.value.storage, d = e, c = s, f = Qe("client"), p = "filtering,queryString,queryFilters".split(","), $ = "copyApiUrl,downloadCsv,filtersView,newItem,pagingInfo,pagingNav,preferences,refresh,resetPreferences,toolbar".split(","), m = v(() => d.deny ? Vt(p, d.deny) : Vt(p, r.value.deny)), k = v(() => d.hide ? Vt($, d.hide) : Vt($, r.value.hide)); function g(_) { return m.value[_]; } - function w(_) { + function b(_) { return k.value[_]; } - const j = v(() => u.tableStyle ?? r.value.tableStyle), H = v(() => u.gridClass ?? he.getGridClass(j.value)), re = v(() => u.grid2Class ?? he.getGrid2Class(j.value)), F = v(() => u.grid3Class ?? he.getGrid3Class(j.value)), T = v(() => u.grid4Class ?? he.getGrid4Class(j.value)), A = v(() => u.tableClass ?? he.getTableClass(j.value)), ue = v(() => u.theadClass ?? he.getTheadClass(j.value)), V = v(() => u.theadRowClass ?? he.getTheadRowClass(j.value)), z = v(() => u.theadCellClass ?? he.getTheadCellClass(j.value)), Q = v(() => u.toolbarButtonClass ?? he.toolbarButtonClass); - function se(_, O) { - var Fe; - if (u.rowClass) - return u.rowClass(_, O); - const ve = !!we.value.AnyUpdate, $e = ((Fe = Ve.value) != null && Fe.name ? be(_, Ve.value.name) : null) == W.value; - return he.getTableRowClass(u.tableStyle, O, $e, ve); + const P = v(() => d.tableStyle ?? r.value.tableStyle), I = v(() => d.gridClass ?? he.getGridClass(P.value)), se = v(() => d.grid2Class ?? he.getGrid2Class(P.value)), j = v(() => d.grid3Class ?? he.getGrid3Class(P.value)), T = v(() => d.grid4Class ?? he.getGrid4Class(P.value)), M = v(() => d.tableClass ?? he.getTableClass(P.value)), ie = v(() => d.theadClass ?? he.getTheadClass(P.value)), L = v(() => d.theadRowClass ?? he.getTheadRowClass(P.value)), z = v(() => d.theadCellClass ?? he.getTheadCellClass(P.value)), K = v(() => d.toolbarButtonClass ?? he.toolbarButtonClass); + function le(_, B) { + var Ie; + if (d.rowClass) + return d.rowClass(_, B); + const ve = !!we.value.AnyUpdate, Ce = ((Ie = Ve.value) != null && Ie.name ? _e(_, Ve.value.name) : null) == Y.value; + return he.getTableRowClass(d.tableStyle, B, Ce, ve); } - const R = al(), Z = v(() => { + const R = al(), W = v(() => { var _; - return Hs(((_ = we.value.AnyQuery.viewModel) == null ? void 0 : _.name) || we.value.AnyQuery.dataModel.name); - }), J = v(() => { - const _ = Object.keys(R).map((O) => O.toLowerCase()); - return tt(Z.value).filter((O) => _.includes(O.name.toLowerCase()) || _.includes(O.name.toLowerCase() + "-header")).map((O) => O.name); - }); - function U() { - let _ = bt(u.selectedColumns); - return _.length > 0 ? _ : J.value.length > 0 ? J.value : []; - } - const M = v(() => { - let O = U().map((oe) => oe.toLowerCase()); - const ve = tt(Z.value); - return O.length > 0 ? O.map((oe) => ve.find(($e) => $e.name.toLowerCase() === oe)).filter((oe) => oe != null) : ve; + return Es(((_ = we.value.AnyQuery.viewModel) == null ? void 0 : _.name) || we.value.AnyQuery.dataModel.name); }), ee = v(() => { - let _ = M.value.map((ve) => ve.name), O = bt(pe.value.selectedColumns).map((ve) => ve.toLowerCase()); - return O.length > 0 ? _.filter((ve) => O.includes(ve.toLowerCase())) : _; - }), y = I([]), N = I(new Xe()), E = I(new Xe()), h = I(), C = I(!1), W = I(), X = I(), le = I(!1), D = I(), L = I(u.skip), fe = I(!1), pe = I({ take: ps }), ie = I(!1), me = v(() => y.value.some((_) => _.settings.filters.length > 0 || !!_.settings.sort) || pe.value.selectedColumns), S = v(() => y.value.map((_) => _.settings.filters.length).reduce((_, O) => _ + O, 0)), de = v(() => { + const _ = Object.keys(R).map((B) => B.toLowerCase()); + return st(W.value).filter((B) => _.includes(B.name.toLowerCase()) || _.includes(B.name.toLowerCase() + "-header")).map((B) => B.name); + }); + function q() { + let _ = Ct(d.selectedColumns); + return _.length > 0 ? _ : ee.value.length > 0 ? ee.value : []; + } + const A = v(() => { + let B = q().map((re) => re.toLowerCase()); + const ve = st(W.value); + return B.length > 0 ? B.map((re) => ve.find((Ce) => Ce.name.toLowerCase() === re)).filter((re) => re != null) : ve; + }), te = v(() => { + let _ = A.value.map((ve) => ve.name), B = Ct(pe.value.selectedColumns).map((ve) => ve.toLowerCase()); + return B.length > 0 ? _.filter((ve) => B.includes(ve.toLowerCase())) : _; + }), w = O([]), N = O(new Xe()), E = O(new Xe()), h = O(), C = O(!1), Y = O(), J = O(), ne = O(!1), D = O(), V = O(d.skip), fe = O(!1), pe = O({ take: ps }), ue = O(!1), me = v(() => w.value.some((_) => _.settings.filters.length > 0 || !!_.settings.sort) || pe.value.selectedColumns), S = v(() => w.value.map((_) => _.settings.filters.length).reduce((_, B) => _ + B, 0)), ce = v(() => { var _; - return tt(Hs(Ft.value || ((_ = we.value.AnyQuery) == null ? void 0 : _.dataModel.name))); + return st(Es(Ot.value || ((_ = we.value.AnyQuery) == null ? void 0 : _.dataModel.name))); }), Ve = v(() => { var _; - return ns(Hs(Ft.value || ((_ = we.value.AnyQuery) == null ? void 0 : _.dataModel.name))); - }), Se = v(() => pe.value.take ?? ps), ge = v(() => N.value.response ? be(N.value.response, "results") : []), B = v(() => { + return ns(Es(Ot.value || ((_ = we.value.AnyQuery) == null ? void 0 : _.dataModel.name))); + }), Se = v(() => pe.value.take ?? ps), ge = v(() => N.value.response ? _e(N.value.response, "results") : []), H = v(() => { var _; return (((_ = N.value.response) == null ? void 0 : _.total) || ge.value.length) ?? 0; - }), q = v(() => L.value > 0), ne = v(() => L.value > 0), ye = v(() => ge.value.length >= Se.value), _e = v(() => ge.value.length >= Se.value), Me = I(), Re = I(), Te = { + }), Q = v(() => V.value > 0), oe = v(() => V.value > 0), be = v(() => ge.value.length >= Se.value), $e = v(() => ge.value.length >= Se.value), Ae = O(), He = O(), Fe = { NoQuery: "No Query API was found" }; t({ - update: lt, - search: jl, - createRequestArgs: Rs, + update: nt, + search: Dl, + createRequestArgs: Hs, reset: Ql, - createDone: Zt, + createDone: Wt, createSave: Ns, - editDone: Kt, + editDone: wt, editSave: ds, forceUpdate: Bs, - setEdit: Os, - edit: X, - createForm: Me, - editForm: Re, + setEdit: Ps, + edit: J, + createForm: Ae, + editForm: He, apiPrefs: pe, results: ge, - skip: L, + skip: V, take: Se, - total: B - }), Y.interceptors.has("AutoQueryGrid.new") && Y.interceptors.invoke("AutoQueryGrid.new", { props: u }); - function je(_) { + total: H + }), G.interceptors.has("AutoQueryGrid.new") && G.interceptors.invoke("AutoQueryGrid.new", { props: d }); + function De(_) { if (_) { - if (u.canFilter) - return u.canFilter(_); - const O = de.value.find((ve) => ve.name.toLowerCase() == _.toLowerCase()); - if (O) - return !Vn(O); + if (d.canFilter) + return d.canFilter(_); + const B = ce.value.find((ve) => ve.name.toLowerCase() == _.toLowerCase()); + if (B) + return !Mn(B); } return !1; } - function Pe(_) { + function Oe(_) { c("nav", _), g("queryString") && ul(_); } async function We(_) { - L.value += _, L.value < 0 && (L.value = 0); - const O = Math.floor(B.value / Se.value) * Se.value; - L.value > O && (L.value = O), Pe({ skip: L.value || void 0 }), await lt(); + V.value += _, V.value < 0 && (V.value = 0); + const B = Math.floor(H.value / Se.value) * Se.value; + V.value > B && (V.value = B), Oe({ skip: V.value || void 0 }), await nt(); } - async function Ee(_, O) { - var $e, Fe; - if (X.value = null, W.value = O, !_ || !O) + async function Re(_, B) { + var Ce, Ie; + if (J.value = null, Y.value = B, !_ || !B) return; - let ve = Yt(we.value.AnyQuery, { [_]: O }); - const oe = await f.api(ve); - if (oe.succeeded) { - let He = ($e = be(oe.response, "results")) == null ? void 0 : $e[0]; - He || console.warn(`API ${(Fe = we.value.AnyQuery) == null ? void 0 : Fe.request.name}(${_}:${O}) returned no results`), X.value = He; + let ve = Yt(we.value.AnyQuery, { [_]: B }); + const re = await f.api(ve); + if (re.succeeded) { + let ze = (Ce = _e(re.response, "results")) == null ? void 0 : Ce[0]; + ze || console.warn(`API ${(Ie = we.value.AnyQuery) == null ? void 0 : Ie.request.name}(${_}:${B}) returned no results`), J.value = ze; } } - async function it(_, O) { - var $e; - c("rowSelected", _, O); - const ve = ($e = Ve.value) == null ? void 0 : $e.name, oe = ve ? be(_, ve) : null; - !ve || !oe || (Pe({ edit: oe }), Ee(ve, oe)); + async function it(_, B) { + var Ce; + c("rowSelected", _, B); + const ve = (Ce = Ve.value) == null ? void 0 : Ce.name, re = ve ? _e(_, ve) : null; + !ve || !re || (Oe({ edit: re }), Re(ve, re)); } - function Tt(_, O) { - var oe; + function jt(_, B) { + var re; if (!g("filtering")) return; - let ve = O.target; - if (je(_) && (ve == null ? void 0 : ve.tagName) !== "TD") { - let $e = (oe = ve == null ? void 0 : ve.closest("TABLE")) == null ? void 0 : oe.getBoundingClientRect(), Fe = y.value.find((He) => He.name.toLowerCase() == _.toLowerCase()); - if (Fe && $e) { - let He = 318, ut = $e.x + He + 10; + let ve = B.target; + if (De(_) && (ve == null ? void 0 : ve.tagName) !== "TD") { + let Ce = (re = ve == null ? void 0 : ve.closest("TABLE")) == null ? void 0 : re.getBoundingClientRect(), Ie = w.value.find((ze) => ze.name.toLowerCase() == _.toLowerCase()); + if (Ie && Ce) { + let ze = 318, ut = Ce.x + ze + 10; D.value = { - column: Fe, + column: Ie, topLeft: { - x: Math.max(Math.floor(O.clientX + He / 2), ut), - y: $e.y + 45 + x: Math.max(Math.floor(B.clientX + ze / 2), ut), + y: Ce.y + 45 } }; } } - c("headerSelected", _, O); + c("headerSelected", _, B); } - function mt() { + function ht() { D.value = null; } async function as(_) { var ve; - let O = (ve = D.value) == null ? void 0 : ve.column; - O && (O.settings = _, d.setItem(is(O.name), JSON.stringify(O.settings)), await lt()), D.value = null; + let B = (ve = D.value) == null ? void 0 : ve.column; + B && (B.settings = _, u.setItem(is(B.name), JSON.stringify(B.settings)), await nt()), D.value = null; } async function rs(_) { - d.setItem(is(_.name), JSON.stringify(_.settings)), await lt(); + u.setItem(is(_.name), JSON.stringify(_.settings)), await nt(); } - async function so(_) { - le.value = !1, pe.value = _, d.setItem(Es(), JSON.stringify(_)), await lt(); + async function no(_) { + ne.value = !1, pe.value = _, u.setItem(Rs(), JSON.stringify(_)), await nt(); } - function Pl(_) { - var O; - Me.value && (Object.assign((O = Me.value) == null ? void 0 : O.model, _), Bs()); + function Ol(_) { + var B; + Ae.value && (Object.assign((B = Ae.value) == null ? void 0 : B.model, _), Bs()); } - function Os(_) { - Object.assign(X.value, _), Bs(); + function Ps(_) { + Object.assign(J.value, _), Bs(); } function Bs() { - var O, ve, oe; - (O = Me.value) == null || O.forceUpdate(), (ve = Re.value) == null || ve.forceUpdate(); + var B, ve, re; + (B = Ae.value) == null || B.forceUpdate(), (ve = He.value) == null || ve.forceUpdate(); const _ = Be(); - (oe = _ == null ? void 0 : _.proxy) == null || oe.$forceUpdate(); + (re = _ == null ? void 0 : _.proxy) == null || re.$forceUpdate(); } - async function lt() { - await jl(Rs()); + async function nt() { + await Dl(Hs()); } - async function lo() { - await lt(); + async function oo() { + await nt(); } - const no = /iPad|iPhone|iPod/.test(navigator.userAgent); - async function jl(_) { - const O = we.value.AnyQuery; - if (!O) { - console.error(Te.NoQuery); + const ao = /iPad|iPhone|iPod/.test(navigator.userAgent); + async function Dl(_) { + const B = we.value.AnyQuery; + if (!B) { + console.error(Fe.NoQuery); return; } - let ve = Yt(O, _), oe = await f.api(ve); - dn((He) => { - N.value.response = N.value.error = void 0, ie.value = He, no ? $t(() => N.value = oe) : N.value = oe; + let ve = Yt(B, _), re = await f.api(ve); + dn((ze) => { + N.value.response = N.value.error = void 0, ue.value = ze, ao ? St(() => N.value = re) : N.value = re; })(); - let Fe = be(oe.response, "results") || []; - !oe.succeeded || Fe.label == 0; + let Ie = _e(re.response, "results") || []; + !re.succeeded || Ie.label == 0; } - function Rs() { + function Hs() { let _ = { include: "total", take: Se.value - }, O = bt(pe.value.selectedColumns || u.selectedColumns); - if (O.length > 0) { - let oe = Ve.value; - oe && !O.includes(oe.name) && (O = [oe.name, ...O]); - const $e = de.value, Fe = []; - O.forEach((He) => { + }, B = Ct(pe.value.selectedColumns || d.selectedColumns); + if (B.length > 0) { + let re = Ve.value; + re && !B.includes(re.name) && (B = [re.name, ...B]); + const Ce = ce.value, Ie = []; + B.forEach((ze) => { var cs; - const ut = $e.find((Oe) => Oe.name.toLowerCase() == He.toLowerCase()); - (cs = ut == null ? void 0 : ut.ref) != null && cs.selfId && Fe.push(ut.ref.selfId), be(R, He) && Fe.push(...$e.filter((Oe) => { - var gt, Wt; - return ((Wt = (gt = Oe.ref) == null ? void 0 : gt.selfId) == null ? void 0 : Wt.toLowerCase()) == He.toLowerCase(); - }).map((Oe) => Oe.name)); - }), Fe.forEach((He) => { - O.includes(He) || O.push(He); - }), _.fields = O.join(","); + const ut = Ce.find((kt) => kt.name.toLowerCase() == ze.toLowerCase()); + (cs = ut == null ? void 0 : ut.ref) != null && cs.selfId && Ie.push(ut.ref.selfId), _e(R, ze) && Ie.push(...Ce.filter((kt) => { + var Ne, _t; + return ((_t = (Ne = kt.ref) == null ? void 0 : Ne.selfId) == null ? void 0 : _t.toLowerCase()) == ze.toLowerCase(); + }).map((kt) => kt.name)); + }), Ie.forEach((ze) => { + B.includes(ze) || B.push(ze); + }), _.fields = B.join(","); } let ve = []; - if (y.value.forEach((oe) => { - oe.settings.sort && ve.push((oe.settings.sort === "DESC" ? "-" : "") + oe.name), oe.settings.filters.forEach(($e) => { - let Fe = $e.key.replace("%", oe.name); - _[Fe] = $e.value; + if (w.value.forEach((re) => { + re.settings.sort && ve.push((re.settings.sort === "DESC" ? "-" : "") + re.name), re.settings.filters.forEach((Ce) => { + let Ie = Ce.key.replace("%", re.name); + _[Ie] = Ce.value; }); - }), u.filters && Object.keys(u.filters).forEach((oe) => { - _[oe] = u.filters[oe]; + }), d.filters && Object.keys(d.filters).forEach((re) => { + _[re] = d.filters[re]; }), g("queryString") && g("queryFilters")) { - const oe = location.search ? location.search : location.hash.includes("?") ? "?" + ms(location.hash, "?") : ""; - let $e = Zs(oe); - if (Object.keys($e).forEach((Fe) => { - M.value.find((ut) => ut.name.toLowerCase() === Fe.toLowerCase()) && (_[Fe] = $e[Fe]); - }), typeof $e.skip < "u") { - const Fe = parseInt($e.skip); - isNaN(Fe) || (L.value = _.skip = Fe); + const re = location.search ? location.search : location.hash.includes("?") ? "?" + ms(location.hash, "?") : ""; + let Ce = Zs(re); + if (Object.keys(Ce).forEach((Ie) => { + A.value.find((ut) => ut.name.toLowerCase() === Ie.toLowerCase()) && (_[Ie] = Ce[Ie]); + }), typeof Ce.skip < "u") { + const Ie = parseInt(Ce.skip); + isNaN(Ie) || (V.value = _.skip = Ie); } } - return typeof _.skip > "u" && L.value > 0 && (_.skip = L.value), ve.length > 0 && (_.orderBy = ve.join(",")), _; + return typeof _.skip > "u" && V.value > 0 && (_.skip = V.value), ve.length > 0 && (_.orderBy = ve.join(",")), _; } - function oo() { - const _ = Ol("csv"); + function ro() { + const _ = Pl("csv"); Js(_), typeof window < "u" && window.open(_); } - function ao() { - const _ = Ol("json"); + function io() { + const _ = Pl("json"); Js(_), fe.value = !0, setTimeout(() => fe.value = !1, 3e3); } - function Ol(_ = "json") { - var Fe; - const O = Rs(), ve = `/api/${(Fe = we.value.AnyQuery) == null ? void 0 : Fe.request.name}`, oe = Io(f.baseUrl, Bt(ve, { ...O, jsconfig: "edv" })); - return oe.indexOf("?") >= 0 ? Ls(oe, "?") + "." + _ + "?" + ms(oe, "?") : oe + ".json"; + function Pl(_ = "json") { + var Ie; + const B = Hs(), ve = `/api/${(Ie = we.value.AnyQuery) == null ? void 0 : Ie.request.name}`, re = Do(f.baseUrl, Et(ve, { ...B, jsconfig: "edv" })); + return re.indexOf("?") >= 0 ? Ls(re, "?") + "." + _ + "?" + ms(re, "?") : re + ".json"; } - async function ro() { - y.value.forEach((_) => { - _.settings = { filters: [] }, d.removeItem(is(_.name)); - }), pe.value = { take: ps }, d.removeItem(Es()), await lt(); + async function uo() { + w.value.forEach((_) => { + _.settings = { filters: [] }, u.removeItem(is(_.name)); + }), pe.value = { take: ps }, u.removeItem(Rs()), await nt(); } - function io() { - C.value = !0, Pe({ create: null }); + function co() { + C.value = !0, Oe({ create: null }); } - const Ft = v(() => Nt(u.type)), qt = v(() => { + const Ot = v(() => qt(d.type)), Kt = v(() => { var _; - return Ft.value || ((_ = we.value.AnyQuery) == null ? void 0 : _.dataModel.name); - }), Qt = v(() => u.modelTitle || qt.value), uo = v(() => u.newButtonLabel || `New ${Qt.value}`), Es = () => { + return Ot.value || ((_ = we.value.AnyQuery) == null ? void 0 : _.dataModel.name); + }), Zt = v(() => d.modelTitle || Kt.value), fo = v(() => d.newButtonLabel || `New ${Zt.value}`), Rs = () => { var _; - return `${u.id}/ApiPrefs/${Ft.value || ((_ = we.value.AnyQuery) == null ? void 0 : _.dataModel.name)}`; + return `${d.id}/ApiPrefs/${Ot.value || ((_ = we.value.AnyQuery) == null ? void 0 : _.dataModel.name)}`; }, is = (_) => { - var O; - return `Column/${u.id}:${Ft.value || ((O = we.value.AnyQuery) == null ? void 0 : O.dataModel.name)}.${_}`; - }, { metadataApi: Bl, typeOf: Hs, apiOf: Rl, filterDefinitions: co } = rt(), { invalidAccessMessage: zs } = Tl(), El = v(() => u.filterDefinitions || co.value), we = v(() => { - let _ = bt(u.apis); - return _.length > 0 ? Et.from(_.map((O) => Rl(O)).filter((O) => O != null).map((O) => O)) : Et.forType(Ft.value, Bl.value); - }), us = (_) => `${_}`, Hl = v(() => { + var B; + return `Column/${d.id}:${Ot.value || ((B = we.value.AnyQuery) == null ? void 0 : B.dataModel.name)}.${_}`; + }, { metadataApi: Bl, typeOf: Es, apiOf: Hl, filterDefinitions: vo } = lt(), { invalidAccessMessage: zs } = Tl(), Rl = v(() => d.filterDefinitions || vo.value), we = v(() => { + let _ = Ct(d.apis); + return _.length > 0 ? Nt.from(_.map((B) => Hl(B)).filter((B) => B != null).map((B) => B)) : Nt.forType(Ot.value, Bl.value); + }), us = (_) => `${_}`, El = v(() => { if (!Bl.value) return us(`AppMetadata not loaded, see useMetadata()`); - let O = bt(u.apis).map((oe) => Rl(oe) == null ? oe : null).filter((oe) => oe != null); - if (O.length > 0) - return us(`Unknown API${O.length > 1 ? "s" : ""}: ${O.join(", ")}`); + let B = Ct(d.apis).map((re) => Hl(re) == null ? re : null).filter((re) => re != null); + if (B.length > 0) + return us(`Unknown API${B.length > 1 ? "s" : ""}: ${B.join(", ")}`); let ve = we.value; - return ve.empty ? us("Mising DataModel in property 'type' or AutoQuery APIs to use in property 'apis'") : ve.AnyQuery ? null : us(Te.NoQuery); - }), zl = v(() => we.value.AnyQuery && zs(we.value.AnyQuery)), Nl = v(() => we.value.Create && zs(we.value.Create)), Ul = v(() => we.value.AnyUpdate && zs(we.value.AnyUpdate)), fo = v(() => bs(we.value.Create)); + return ve.empty ? us("Mising DataModel in property 'type' or AutoQuery APIs to use in property 'apis'") : ve.AnyQuery ? null : us(Fe.NoQuery); + }), zl = v(() => we.value.AnyQuery && zs(we.value.AnyQuery)), Nl = v(() => we.value.Create && zs(we.value.Create)), Ul = v(() => we.value.AnyUpdate && zs(we.value.AnyUpdate)), po = v(() => bs(we.value.Create)); v(() => bs(we.value.AnyUpdate)); const ql = v(() => bs(we.value.Delete)); - function Kt() { - X.value = null, W.value = null, Pe({ edit: void 0 }); + function wt() { + J.value = null, Y.value = null, Oe({ edit: void 0 }); } - function Zt() { - C.value = !1, Pe({ create: void 0 }); + function Wt() { + C.value = !1, Oe({ create: void 0 }); } async function ds() { - await lt(), Kt(); + await nt(), wt(); } async function Ns() { - await lt(), Zt(); + await nt(), Wt(); } function Ql() { var ve; - N.value = new Xe(), E.value = new Xe(), C.value = !1, W.value = null, X.value = null, le.value = !1, D.value = null, L.value = u.skip, fe.value = !1, pe.value = { take: ps }, ie.value = !1; - const _ = u.prefs || $s(d.getItem(Es())); - _ && (pe.value = _), y.value = M.value.map((oe) => ({ - name: oe.name, - type: oe.type, - meta: oe, + N.value = new Xe(), E.value = new Xe(), C.value = !1, Y.value = null, J.value = null, ne.value = !1, D.value = null, V.value = d.skip, fe.value = !1, pe.value = { take: ps }, ue.value = !1; + const _ = d.prefs || $s(u.getItem(Rs())); + _ && (pe.value = _), w.value = A.value.map((re) => ({ + name: re.name, + type: re.type, + meta: re, settings: Object.assign( { filters: [] }, - $s(d.getItem(is(oe.name))) + $s(u.getItem(is(re.name))) ) - })), isNaN(u.skip) || (L.value = u.skip); - let O = (ve = Ve.value) == null ? void 0 : ve.name; + })), isNaN(d.skip) || (V.value = d.skip); + let B = (ve = Ve.value) == null ? void 0 : ve.name; if (g("queryString")) { - const oe = location.search ? location.search : location.hash.includes("?") ? "?" + ms(location.hash, "?") : ""; - let $e = Zs(oe); - typeof $e.create < "u" ? C.value = typeof $e.create < "u" : O && (typeof $e.edit == "string" || typeof $e.edit == "number") && Ee(O, $e.edit); + const re = location.search ? location.search : location.hash.includes("?") ? "?" + ms(location.hash, "?") : ""; + let Ce = Zs(re); + typeof Ce.create < "u" ? C.value = typeof Ce.create < "u" : B && (typeof Ce.edit == "string" || typeof Ce.edit == "number") && Re(B, Ce.edit); } - u.create === !0 && (C.value = !0), O && u.edit != null && Ee(O, u.edit); - } - return st(async () => { - Ql(), await lt(); - }), (_, O) => { - const ve = G("Alert"), oe = G("EnsureAccessDialog"), $e = G("AutoCreateForm"), Fe = G("AutoEditForm"), He = G("ErrorSummary"), ut = G("Loading"), Kl = G("SettingsIcons"), cs = G("DataGrid"); - return Hl.value ? (o(), i("div", nu, [ - xe(ve, { innerHTML: Hl.value }, null, 8, ["innerHTML"]) - ])) : zl.value ? (o(), i("div", ou, [ - xe(to, { "invalid-access": zl.value }, null, 8, ["invalid-access"]) - ])) : (o(), i("div", au, [ - C.value && we.value.Create ? (o(), i("div", ru, [ - Nl.value ? (o(), ae(oe, { + d.create === !0 && (C.value = !0), B && d.edit != null && Re(B, d.edit); + } + return Ye(async () => { + Ql(), await nt(); + }), (_, B) => { + const ve = Z("Alert"), re = Z("EnsureAccessDialog"), Ce = Z("AutoCreateForm"), Ie = Z("AutoEditForm"), ze = Z("AutoViewForm"), ut = Z("ErrorSummary"), Kl = Z("Loading"), cs = Z("SettingsIcons"), kt = Z("DataGrid"); + return El.value ? (o(), i("div", iu, [ + ye(ve, { innerHTML: El.value }, null, 8, ["innerHTML"]) + ])) : zl.value ? (o(), i("div", uu, [ + ye(lo, { "invalid-access": zl.value }, null, 8, ["invalid-access"]) + ])) : (o(), i("div", du, [ + C.value && we.value.Create ? (o(), i("div", cu, [ + Nl.value ? (o(), ae(re, { key: 0, - title: `Create ${Qt.value}`, + title: `Create ${Zt.value}`, "invalid-access": Nl.value, "alert-class": "text-yellow-700", - onDone: Zt - }, null, 8, ["title", "invalid-access"])) : te(R).createform ? K(_.$slots, "createform", { + onDone: Wt + }, null, 8, ["title", "invalid-access"])) : X(R).createform ? U(_.$slots, "createform", { key: 1, type: we.value.Create.request.name, configure: _.configureField, - done: Zt, + done: Wt, save: Ns - }) : (o(), ae($e, { + }) : (o(), ae(Ce, { key: 2, ref_key: "createForm", - ref: Me, + ref: Ae, type: we.value.Create.request.name, configure: _.configureField, - onDone: Zt, + onDone: Wt, onSave: Ns }, { - header: Ce(() => [ - K(_.$slots, "formheader", { + header: xe(() => [ + U(_.$slots, "formheader", { form: "create", - formInstance: Me.value, + formInstance: Ae.value, apis: we.value, - type: qt.value, - updateModel: Pl + type: Kt.value, + updateModel: Ol }) ]), - footer: Ce(() => [ - K(_.$slots, "formfooter", { + footer: xe(() => [ + U(_.$slots, "formfooter", { form: "create", - formInstance: Me.value, + formInstance: Ae.value, apis: we.value, - type: qt.value, - updateModel: Pl + type: Kt.value, + updateModel: Ol }) ]), _: 3 }, 8, ["type", "configure"])) - ])) : X.value && we.value.AnyUpdate ? (o(), i("div", iu, [ - Ul.value ? (o(), ae(oe, { + ])) : J.value && we.value.AnyUpdate ? (o(), i("div", fu, [ + Ul.value ? (o(), ae(re, { key: 0, - title: `Update ${Qt.value}`, + title: `Update ${Zt.value}`, "invalid-access": Ul.value, "alert-class": "text-yellow-700", - onDone: Kt - }, null, 8, ["title", "invalid-access"])) : te(R).editform ? K(_.$slots, "editform", { + onDone: wt + }, null, 8, ["title", "invalid-access"])) : X(R).editform ? U(_.$slots, "editform", { key: 1, - model: X.value, + model: J.value, type: we.value.AnyUpdate.request.name, deleteType: ql.value ? we.value.Delete.request.name : null, configure: _.configureField, - done: Kt, + done: wt, save: ds - }) : (o(), ae(Fe, { + }) : (o(), ae(Ie, { key: 2, ref_key: "editForm", - ref: Re, - modelValue: X.value, - "onUpdate:modelValue": O[0] || (O[0] = (Oe) => X.value = Oe), + ref: He, + modelValue: J.value, + "onUpdate:modelValue": B[0] || (B[0] = (Ne) => J.value = Ne), type: we.value.AnyUpdate.request.name, deleteType: ql.value ? we.value.Delete.request.name : null, configure: _.configureField, - onDone: Kt, + onDone: wt, onSave: ds, onDelete: ds }, { - header: Ce(() => [ - K(_.$slots, "formheader", { + header: xe(() => [ + U(_.$slots, "formheader", { form: "edit", - formInstance: Re.value, + formInstance: He.value, apis: we.value, - type: qt.value, - model: X.value, - id: W.value, - updateModel: Os + type: Kt.value, + model: J.value, + id: Y.value, + updateModel: Ps }) ]), - footer: Ce(() => [ - K(_.$slots, "formfooter", { + footer: xe(() => [ + U(_.$slots, "formfooter", { form: "edit", - formInstance: Re.value, + formInstance: He.value, apis: we.value, - type: qt.value, - model: X.value, - id: W.value, - updateModel: Os + type: Kt.value, + model: J.value, + id: Y.value, + updateModel: Ps }) ]), _: 3 }, 8, ["modelValue", "type", "deleteType", "configure"])) + ])) : J.value ? (o(), i("div", vu, [ + X(R).viewform ? U(_.$slots, "viewform", { + key: 0, + model: J.value, + apis: we.value, + done: wt + }) : (o(), ae(ze, { + key: 1, + model: J.value, + apis: we.value, + done: wt + }, null, 8, ["model", "apis"])) ])) : x("", !0), - te(R).toolbar ? K(_.$slots, "toolbar", { key: 2 }) : w("toolbar") ? (o(), i("div", uu, [ - le.value ? (o(), ae(Dl, { + X(R).toolbar ? U(_.$slots, "toolbar", { key: 3 }) : b("toolbar") ? (o(), i("div", pu, [ + ne.value ? (o(), ae(jl, { key: 0, - columns: M.value, + columns: A.value, prefs: pe.value, - onDone: O[1] || (O[1] = (Oe) => le.value = !1), - onSave: so + onDone: B[1] || (B[1] = (Ne) => ne.value = !1), + onSave: no }, null, 8, ["columns", "prefs"])) : x("", !0), - l("div", du, [ - l("div", cu, [ - w("preferences") ? (o(), i("button", { + l("div", mu, [ + l("div", hu, [ + b("preferences") ? (o(), i("button", { key: 0, type: "button", class: "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400", - title: `${Qt.value} Preferences`, - onClick: O[2] || (O[2] = (Oe) => le.value = !le.value) - }, pu, 8, fu)) : x("", !0), - w("pagingNav") ? (o(), i("button", { + title: `${Zt.value} Preferences`, + onClick: B[2] || (B[2] = (Ne) => ne.value = !ne.value) + }, bu, 8, gu)) : x("", !0), + b("pagingNav") ? (o(), i("button", { key: 1, type: "button", - class: b(["pl-2", q.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", Q.value ? "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: !q.value, - onClick: O[3] || (O[3] = (Oe) => We(-B.value)) - }, gu, 10, mu)) : x("", !0), - w("pagingNav") ? (o(), i("button", { + disabled: !Q.value, + onClick: B[3] || (B[3] = (Ne) => We(-H.value)) + }, _u, 10, wu)) : x("", !0), + b("pagingNav") ? (o(), i("button", { key: 2, type: "button", - class: b(["pl-2", ne.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", oe.value ? "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: !ne.value, - onClick: O[4] || (O[4] = (Oe) => We(-Se.value)) - }, wu, 10, yu)) : x("", !0), - w("pagingNav") ? (o(), i("button", { + disabled: !oe.value, + onClick: B[4] || (B[4] = (Ne) => We(-Se.value)) + }, xu, 10, $u)) : x("", !0), + b("pagingNav") ? (o(), i("button", { key: 3, type: "button", - class: b(["pl-2", ye.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", be.value ? "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: !ye.value, - onClick: O[5] || (O[5] = (Oe) => We(Se.value)) - }, $u, 10, ku)) : x("", !0), - w("pagingNav") ? (o(), i("button", { + disabled: !be.value, + onClick: B[5] || (B[5] = (Ne) => We(Se.value)) + }, Su, 10, Lu)) : x("", !0), + b("pagingNav") ? (o(), i("button", { key: 4, type: "button", - class: b(["pl-2", _e.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", $e.value ? "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: !_e.value, - onClick: O[6] || (O[6] = (Oe) => We(B.value)) - }, Lu, 10, Cu)) : x("", !0) + disabled: !$e.value, + onClick: B[6] || (B[6] = (Ne) => We(H.value)) + }, Tu, 10, Mu)) : x("", !0) ]), - w("pagingInfo") ? (o(), i("div", Vu, [ - l("div", Su, [ - ie.value ? (o(), i("span", Mu, "Querying...")) : x("", !0), - ge.value.length ? (o(), i("span", Au, [ - Tu, - ke(" " + P(L.value + 1) + " - " + P(Math.min(L.value + ge.value.length, B.value)) + " ", 1), - l("span", null, " of " + P(B.value), 1) - ])) : N.value.completed ? (o(), i("span", Fu, "No Results")) : x("", !0) + b("pagingInfo") ? (o(), i("div", Fu, [ + l("div", Iu, [ + ue.value ? (o(), i("span", ju, "Querying...")) : x("", !0), + ge.value.length ? (o(), i("span", Ou, [ + Du, + ke(" " + F(V.value + 1) + " - " + F(Math.min(V.value + ge.value.length, H.value)) + " ", 1), + l("span", null, " of " + F(H.value), 1) + ])) : N.value.completed ? (o(), i("span", Pu, "No Results")) : x("", !0) ]) ])) : x("", !0), - l("div", Iu, [ - w("refresh") ? (o(), i("div", Du, [ + l("div", Bu, [ + b("refresh") ? (o(), i("div", Hu, [ l("button", { type: "button", - onClick: lo, + onClick: oo, title: "Refresh", - class: b(Q.value) - }, ju, 2) + class: y(K.value) + }, Eu, 2) ])) : x("", !0), - w("downloadCsv") ? (o(), i("div", Ou, [ + b("downloadCsv") ? (o(), i("div", zu, [ l("button", { type: "button", - onClick: oo, + onClick: ro, title: "Download CSV", - class: b(Q.value) - }, Ru, 2) + class: y(K.value) + }, Uu, 2) ])) : x("", !0), - w("copyApiUrl") ? (o(), i("div", Eu, [ + b("copyApiUrl") ? (o(), i("div", qu, [ l("button", { type: "button", - onClick: ao, + onClick: io, title: "Copy API URL", - class: b(Q.value) + class: y(K.value) }, [ - fe.value ? (o(), i("svg", Hu, Nu)) : (o(), i("svg", Uu, Qu)), - Ku + fe.value ? (o(), i("svg", Qu, Zu)) : (o(), i("svg", Wu, Ju)), + Xu ], 2) ])) : x("", !0), - me.value && w("resetPreferences") ? (o(), i("div", Zu, [ + me.value && b("resetPreferences") ? (o(), i("div", Yu, [ l("button", { type: "button", - onClick: ro, + onClick: uo, title: "Reset Preferences & Filters", - class: b(Q.value) - }, Gu, 2) + class: y(K.value) + }, td, 2) ])) : x("", !0), - w("filtersView") && S.value > 0 ? (o(), i("div", Ju, [ + b("filtersView") && S.value > 0 ? (o(), i("div", sd, [ l("button", { type: "button", - onClick: O[7] || (O[7] = (Oe) => h.value = h.value == "filters" ? null : "filters"), - class: b(Q.value), + onClick: B[7] || (B[7] = (Ne) => h.value = h.value == "filters" ? null : "filters"), + class: y(K.value), "aria-expanded": "false" }, [ - Xu, - l("span", Yu, P(S.value) + " " + P(S.value == 1 ? "Filter" : "Filters"), 1), - h.value != "filters" ? (o(), i("svg", ed, sd)) : (o(), i("svg", ld, od)) + ld, + l("span", nd, F(S.value) + " " + F(S.value == 1 ? "Filter" : "Filters"), 1), + h.value != "filters" ? (o(), i("svg", od, rd)) : (o(), i("svg", id, dd)) ], 2) ])) : x("", !0), - w("newItem") && we.value.Create && fo.value ? (o(), i("div", ad, [ + b("newItem") && we.value.Create && po.value ? (o(), i("div", cd, [ l("button", { type: "button", - onClick: io, - title: Qt.value, - class: b(Q.value) + onClick: co, + title: Zt.value, + class: y(K.value) }, [ - id, - l("span", ud, P(uo.value), 1) - ], 10, rd) + vd, + l("span", pd, F(fo.value), 1) + ], 10, fd) ])) : x("", !0), - te(R).toolbarbuttons ? K(_.$slots, "toolbarbuttons", { + X(R).toolbarbuttons ? U(_.$slots, "toolbarbuttons", { key: 6, - toolbarButtonClass: Q.value + toolbarButtonClass: K.value }) : x("", !0) ]) ]) ])) : x("", !0), h.value == "filters" ? (o(), ae(Il, { - key: 4, + key: 5, class: "border-y border-gray-200 dark:border-gray-800 py-8 my-2", - definitions: El.value, - columns: y.value, - onDone: O[8] || (O[8] = (Oe) => h.value = null), + definitions: Rl.value, + columns: w.value, + onDone: B[8] || (B[8] = (Ne) => h.value = null), onChange: rs }, null, 8, ["definitions", "columns"])) : x("", !0), - E.value.error ?? N.value.error ? (o(), ae(He, { - key: 5, - status: E.value.error ?? N.value.error - }, null, 8, ["status"])) : ie.value ? (o(), ae(ut, { + E.value.error ?? N.value.error ? (o(), ae(ut, { key: 6, + status: E.value.error ?? N.value.error + }, null, 8, ["status"])) : ue.value ? (o(), ae(Kl, { + key: 7, class: "p-2" })) : x("", !0), - D.value ? (o(), i("div", dd, [ - xe(Fl, { - definitions: El.value, + D.value ? (o(), i("div", md, [ + ye(Fl, { + definitions: Rl.value, column: D.value.column, "top-left": D.value.topLeft, - onDone: mt, + onDone: ht, onSave: as }, null, 8, ["definitions", "column", "top-left"]) ])) : x("", !0), - ge.value.length ? (o(), ae(cs, { - key: 8, + ge.value.length ? (o(), ae(kt, { + key: 9, id: _.id, items: ge.value, type: _.type, - "selected-columns": ee.value, + "selected-columns": te.value, class: "mt-1", - onFiltersChanged: lt, - tableStyle: j.value, - gridClass: H.value, - grid2Class: re.value, - grid3Class: F.value, + onFiltersChanged: nt, + tableStyle: P.value, + gridClass: I.value, + grid2Class: se.value, + grid3Class: j.value, grid4Class: T.value, - tableClass: A.value, - theadClass: ue.value, - theadRowClass: V.value, + tableClass: M.value, + theadClass: ie.value, + theadRowClass: L.value, theadCellClass: z.value, tbodyClass: _.tbodyClass, - rowClass: se, + rowClass: le, onRowSelected: it, rowStyle: _.rowStyle, headerTitle: _.headerTitle, headerTitles: _.headerTitles, visibleFrom: _.visibleFrom, - onHeaderSelected: Tt + onHeaderSelected: jt }, rl({ - header: Ce(({ column: Oe, label: gt }) => { - var Wt; + header: xe(({ column: Ne, label: _t }) => { + var Zl; return [ - g("filtering") && je(Oe) ? (o(), i("div", cd, [ - l("span", fd, P(gt), 1), - xe(Kl, { - column: y.value.find((vo) => vo.name.toLowerCase() === Oe.toLowerCase()), - "is-open": ((Wt = D.value) == null ? void 0 : Wt.column.name) === Oe + g("filtering") && De(Ne) ? (o(), i("div", hd, [ + l("span", gd, F(_t), 1), + ye(cs, { + column: w.value.find((mo) => mo.name.toLowerCase() === Ne.toLowerCase()), + "is-open": ((Zl = D.value) == null ? void 0 : Zl.column.name) === Ne }, null, 8, ["column", "is-open"]) - ])) : (o(), i("div", vd, [ - l("span", pd, P(gt), 1) + ])) : (o(), i("div", yd, [ + l("span", bd, F(_t), 1) ])) ]; }), _: 2 }, [ - De(Object.keys(te(R)), (Oe) => ({ - name: Oe, - fn: Ce((gt) => [ - K(_.$slots, Oe, Ot(ks(gt))) + je(Object.keys(X(R)), (Ne) => ({ + name: Ne, + fn: xe((_t) => [ + U(_.$slots, Ne, Rt(ks(_t))) ]) })) ]), 1032, ["id", "items", "type", "selected-columns", "tableStyle", "gridClass", "grid2Class", "grid3Class", "grid4Class", "tableClass", "theadClass", "theadRowClass", "theadCellClass", "tbodyClass", "rowStyle", "headerTitle", "headerTitles", "visibleFrom"])) : x("", !0) ])); }; } -}), hd = { class: "flex" }, gd = { +}), kd = { class: "flex" }, _d = { key: 0, class: "w-4 h-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, yd = /* @__PURE__ */ l("g", { fill: "none" }, [ +}, $d = /* @__PURE__ */ l("g", { fill: "none" }, [ /* @__PURE__ */ l("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", @@ -3371,42 +3405,42 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ "stroke-linecap": "round", "stroke-linejoin": "round" }) -], -1), bd = [ - yd -], wd = /* @__PURE__ */ l("path", { +], -1), Cd = [ + $d +], xd = /* @__PURE__ */ l("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), kd = /* @__PURE__ */ l("path", { +}, null, -1), Ld = /* @__PURE__ */ l("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), _d = [ - wd, - kd -], $d = { +}, null, -1), Vd = [ + xd, + Ld +], Sd = { key: 2, class: "w-4 h-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20" -}, Cd = /* @__PURE__ */ l("g", { fill: "none" }, [ +}, Md = /* @__PURE__ */ l("g", { fill: "none" }, [ /* @__PURE__ */ l("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), xd = [ - Cd -], Ld = { +], -1), Ad = [ + Md +], Td = { key: 3, class: "w-4 h-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20" -}, Vd = /* @__PURE__ */ l("g", { fill: "none" }, [ +}, Fd = /* @__PURE__ */ l("g", { fill: "none" }, [ /* @__PURE__ */ l("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), Sd = [ - Vd -], Md = /* @__PURE__ */ ce({ +], -1), Id = [ + Fd +], jd = /* @__PURE__ */ de({ __name: "SettingsIcons", props: { column: {}, @@ -3414,19 +3448,19 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }, setup(e) { return (t, s) => { - var n, a, r, d, u, c, f; - return o(), i("div", hd, [ - (r = (a = (n = t.column) == null ? void 0 : n.settings) == null ? void 0 : a.filters) != null && r.length ? (o(), i("svg", gd, bd)) : (o(), i("svg", { + var n, a, r, u, d, c, f; + return o(), i("div", kd, [ + (r = (a = (n = t.column) == null ? void 0 : n.settings) == null ? void 0 : a.filters) != null && r.length ? (o(), i("svg", _d, Cd)) : (o(), i("svg", { key: 1, - class: b(["w-4 h-4 transition-transform", t.isOpen ? "rotate-180" : ""]), + class: y(["w-4 h-4 transition-transform", t.isOpen ? "rotate-180" : ""]), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" - }, _d, 2)), - ((u = (d = t.column) == null ? void 0 : d.settings) == null ? void 0 : u.sort) === "ASC" ? (o(), i("svg", $d, xd)) : ((f = (c = t.column) == null ? void 0 : c.settings) == null ? void 0 : f.sort) === "DESC" ? (o(), i("svg", Ld, Sd)) : x("", !0) + }, Vd, 2)), + ((d = (u = t.column) == null ? void 0 : u.settings) == null ? void 0 : d.sort) === "ASC" ? (o(), i("svg", Sd, Ad)) : ((f = (c = t.column) == null ? void 0 : c.settings) == null ? void 0 : f.sort) === "DESC" ? (o(), i("svg", Td, Id)) : x("", !0) ]); }; } -}), Ad = /* @__PURE__ */ ce({ +}), Od = /* @__PURE__ */ de({ __name: "EnsureAccessDialog", props: { title: {}, @@ -3437,15 +3471,15 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ emits: ["done"], setup(e) { return (t, s) => { - const n = G("EnsureAccess"), a = G("SlideOver"); + const n = Z("EnsureAccess"), a = Z("SlideOver"); return t.invalidAccess ? (o(), ae(a, { key: 0, title: t.title, onDone: s[0] || (s[0] = (r) => t.$emit("done")), "content-class": "relative flex-1" }, rl({ - default: Ce(() => [ - xe(n, { + default: xe(() => [ + ye(n, { alertClass: t.alertClass, invalidAccess: t.invalidAccess }, null, 8, ["alertClass", "invalidAccess"]) @@ -3454,18 +3488,18 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }, [ t.subtitle ? { name: "subtitle", - fn: Ce(() => [ - ke(P(t.subtitle), 1) + fn: xe(() => [ + ke(F(t.subtitle), 1) ]), key: "0" } : void 0 ]), 1032, ["title"])) : x("", !0); }; } -}), Td = ["for"], Fd = { class: "mt-1 relative rounded-md shadow-sm" }, Id = ["type", "name", "id", "placeholder", "value", "aria-invalid", "aria-describedby"], Dd = { +}), Dd = ["for"], Pd = { class: "mt-1 relative rounded-md shadow-sm" }, Bd = ["type", "name", "id", "placeholder", "value", "aria-invalid", "aria-describedby"], Hd = { key: 0, class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none" -}, Pd = /* @__PURE__ */ l("svg", { +}, Rd = /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-red-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", @@ -3477,12 +3511,12 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ 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 = [ - Pd -], Od = ["id"], Bd = ["id"], Rd = { +], -1), Ed = [ + Rd +], zd = ["id"], Nd = ["id"], Ud = { inheritAttrs: !1 -}, Ed = /* @__PURE__ */ ce({ - ...Rd, +}, qd = /* @__PURE__ */ de({ + ...Ud, __name: "TextInput", props: { status: {}, @@ -3500,55 +3534,55 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ t({ focus: r }); - const a = I(); + const a = O(); function r() { var m; (m = a.value) == null || m.focus(); } - const d = v(() => n.type || "text"), u = v(() => n.label ?? ze(ot(n.id))), c = v(() => n.placeholder ?? u.value); - let f = Ue("ApiState", void 0); - const p = v(() => pt.call({ responseStatus: n.status ?? (f == null ? void 0 : f.error.value) }, n.id)), $ = v(() => [nt.base, p.value ? nt.invalid : nt.valid, n.inputClass]); + const u = v(() => n.type || "text"), d = v(() => n.label ?? Pe(at(n.id))), c = v(() => n.placeholder ?? d.value); + let f = Qe("ApiState", void 0); + const p = v(() => mt.call({ responseStatus: n.status ?? (f == null ? void 0 : f.error.value) }, n.id)), $ = v(() => [ot.base, p.value ? ot.invalid : ot.valid, n.inputClass]); return (m, k) => (o(), i("div", { - class: b([m.$attrs.class]) + class: y([m.$attrs.class]) }, [ - K(m.$slots, "header", Ae({ + U(m.$slots, "header", Te({ inputElement: a.value, id: m.id, modelValue: m.modelValue, status: m.status }, m.$attrs)), - u.value ? (o(), i("label", { + d.value ? (o(), i("label", { key: 0, for: m.id, - class: b(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${m.labelClass ?? ""}`) - }, P(u.value), 11, Td)) : x("", !0), - l("div", Fd, [ - l("input", Ae({ + class: y(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${m.labelClass ?? ""}`) + }, F(d.value), 11, Dd)) : x("", !0), + l("div", Pd, [ + l("input", Te({ ref_key: "inputElement", ref: a, - type: d.value, + type: u.value, name: m.id, id: m.id, class: $.value, placeholder: c.value, - value: m.modelValue, + value: X(pn)(u.value, m.modelValue), onInput: k[0] || (k[0] = (g) => m.$emit("update:modelValue", s(g.target))), "aria-invalid": p.value != null, "aria-describedby": `${m.id}-error`, step: "any" - }, te(ft)(m.$attrs, ["class"])), null, 16, Id), - p.value ? (o(), i("div", Dd, jd)) : x("", !0) + }, X(ft)(m.$attrs, ["class", "value"])), null, 16, Bd), + p.value ? (o(), i("div", Hd, Ed)) : x("", !0) ]), p.value ? (o(), i("p", { key: 1, class: "mt-2 text-sm text-red-500", id: `${m.id}-error` - }, P(p.value), 9, Od)) : m.help ? (o(), i("p", { + }, F(p.value), 9, zd)) : m.help ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-gray-500", id: `${m.id}-description` - }, P(m.help), 9, Bd)) : x("", !0), - K(m.$slots, "footer", Ae({ + }, F(m.help), 9, Nd)) : x("", !0), + U(m.$slots, "footer", Te({ inputElement: a.value, id: m.id, modelValue: m.modelValue, @@ -3556,10 +3590,10 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }, m.$attrs)) ], 2)); } -}), Hd = ["for"], zd = { class: "mt-1 relative rounded-md shadow-sm" }, Nd = ["name", "id", "placeholder", "aria-invalid", "aria-describedby"], Ud = ["id"], qd = ["id"], Qd = { +}), Qd = ["for"], Kd = { class: "mt-1 relative rounded-md shadow-sm" }, Zd = ["name", "id", "placeholder", "aria-invalid", "aria-describedby"], Wd = ["id"], Gd = ["id"], Jd = { inheritAttrs: !1 -}, Kd = /* @__PURE__ */ ce({ - ...Qd, +}, Xd = /* @__PURE__ */ de({ + ...Jd, __name: "TextareaInput", props: { status: {}, @@ -3572,43 +3606,43 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ modelValue: {} }, setup(e) { - const t = (c) => c.value, s = e, n = v(() => s.label ?? ze(ot(s.id))), a = v(() => s.placeholder ?? n.value); - let r = Ue("ApiState", void 0); - const d = v(() => pt.call({ responseStatus: s.status ?? (r == null ? void 0 : r.error.value) }, s.id)), u = v(() => ["shadow-sm " + nt.base, d.value ? "text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300" : "text-gray-900 " + nt.valid, s.inputClass]); + const t = (c) => c.value, s = e, n = v(() => s.label ?? Pe(at(s.id))), a = v(() => s.placeholder ?? n.value); + let r = Qe("ApiState", void 0); + const u = v(() => mt.call({ responseStatus: s.status ?? (r == null ? void 0 : r.error.value) }, s.id)), d = v(() => ["shadow-sm " + ot.base, u.value ? "text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300" : "text-gray-900 " + ot.valid, s.inputClass]); return (c, f) => (o(), i("div", { - class: b([c.$attrs.class]) + class: y([c.$attrs.class]) }, [ n.value ? (o(), i("label", { key: 0, for: c.id, - class: b(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${c.labelClass ?? ""}`) - }, P(n.value), 11, Hd)) : x("", !0), - l("div", zd, [ - l("textarea", Ae({ + class: y(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${c.labelClass ?? ""}`) + }, F(n.value), 11, Qd)) : x("", !0), + l("div", Kd, [ + l("textarea", Te({ name: c.id, id: c.id, - class: u.value, + class: d.value, placeholder: a.value, onInput: f[0] || (f[0] = (p) => c.$emit("update:modelValue", t(p.target))), - "aria-invalid": d.value != null, + "aria-invalid": u.value != null, "aria-describedby": `${c.id}-error` - }, te(ft)(c.$attrs, ["class"])), P(c.modelValue), 17, Nd) + }, X(ft)(c.$attrs, ["class"])), F(c.modelValue), 17, Zd) ]), - d.value ? (o(), i("p", { + u.value ? (o(), i("p", { key: 1, class: "mt-2 text-sm text-red-500", id: `${c.id}-error` - }, P(d.value), 9, Ud)) : c.help ? (o(), i("p", { + }, F(u.value), 9, Wd)) : c.help ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-gray-500", id: `${c.id}-description` - }, P(c.help), 9, qd)) : x("", !0) + }, F(c.help), 9, Gd)) : x("", !0) ], 2)); } -}), Zd = ["for"], Wd = ["id", "name", "value", "aria-invalid", "aria-describedby"], Gd = ["value"], Jd = ["id"], Xd = { +}), Yd = ["for"], ec = ["id", "name", "value", "aria-invalid", "aria-describedby"], tc = ["value"], sc = ["id"], lc = { inheritAttrs: !1 -}, Yd = /* @__PURE__ */ ce({ - ...Xd, +}, nc = /* @__PURE__ */ de({ + ...lc, __name: "SelectInput", props: { status: {}, @@ -3622,53 +3656,53 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ entries: {} }, setup(e) { - const t = (u) => u.value, s = e, n = v(() => s.label ?? ze(ot(s.id))); - let a = Ue("ApiState", void 0); - const r = v(() => pt.call({ responseStatus: s.status ?? (a == null ? void 0 : a.error.value) }, s.id)), d = v(() => s.entries || (s.values ? s.values.map((u) => ({ key: u, value: u })) : s.options ? Object.keys(s.options).map((u) => ({ key: u, value: s.options[u] })) : [])); - return (u, c) => (o(), i("div", { - class: b([u.$attrs.class]) + const t = (d) => d.value, s = e, n = v(() => s.label ?? Pe(at(s.id))); + let a = Qe("ApiState", void 0); + const r = v(() => mt.call({ responseStatus: s.status ?? (a == null ? void 0 : a.error.value) }, s.id)), u = v(() => s.entries || (s.values ? s.values.map((d) => ({ key: d, value: d })) : s.options ? Object.keys(s.options).map((d) => ({ key: d, value: s.options[d] })) : [])); + return (d, c) => (o(), i("div", { + class: y([d.$attrs.class]) }, [ n.value ? (o(), i("label", { key: 0, - for: u.id, - class: b(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${u.labelClass ?? ""}`) - }, P(n.value), 11, Zd)) : x("", !0), - l("select", Ae({ - id: u.id, - name: u.id, + for: d.id, + class: y(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${d.labelClass ?? ""}`) + }, F(n.value), 11, Yd)) : x("", !0), + l("select", Te({ + id: d.id, + name: d.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", r.value ? "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", - u.inputClass + d.inputClass ], - value: u.modelValue, - onInput: c[0] || (c[0] = (f) => u.$emit("update:modelValue", t(f.target))), + value: d.modelValue, + onInput: c[0] || (c[0] = (f) => d.$emit("update:modelValue", t(f.target))), "aria-invalid": r.value != null, - "aria-describedby": `${u.id}-error` - }, te(ft)(u.$attrs, ["class"])), [ - (o(!0), i(Ie, null, De(d.value, (f) => (o(), i("option", { + "aria-describedby": `${d.id}-error` + }, X(ft)(d.$attrs, ["class"])), [ + (o(!0), i(Me, null, je(u.value, (f) => (o(), i("option", { value: f.key - }, P(f.value), 9, Gd))), 256)) - ], 16, Wd), + }, F(f.value), 9, tc))), 256)) + ], 16, ec), r.value ? (o(), i("p", { key: 1, class: "mt-2 text-sm text-red-500", - id: `${u.id}-error` - }, P(r.value), 9, Jd)) : x("", !0) + id: `${d.id}-error` + }, F(r.value), 9, sc)) : x("", !0) ], 2)); } -}), ec = { class: "flex items-center h-5" }, tc = ["id", "name", "checked"], sc = { class: "ml-3 text-sm" }, lc = ["for"], nc = { +}), oc = { class: "flex items-center h-5" }, ac = ["id", "name", "checked"], rc = { class: "ml-3 text-sm" }, ic = ["for"], uc = { key: 0, class: "mt-2 text-sm text-red-500", id: "`${id}-error`" -}, oc = { +}, dc = { key: 1, class: "mt-2 text-sm text-gray-500", id: "`${id}-description`" -}, ac = { +}, cc = { inheritAttrs: !1 -}, rc = /* @__PURE__ */ ce({ - ...ac, +}, fc = /* @__PURE__ */ de({ + ...cc, __name: "CheckboxInput", props: { modelValue: { type: Boolean }, @@ -3681,32 +3715,32 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }, emits: ["update:modelValue"], setup(e, { emit: t }) { - const s = e, n = v(() => s.label ?? ze(ot(s.id))); - let a = Ue("ApiState", void 0); - const r = v(() => pt.call({ responseStatus: s.status ?? (a == null ? void 0 : a.error.value) }, s.id)); - return (d, u) => (o(), i("div", { - class: b(["relative flex items-start", d.$attrs.class]) + const s = e, n = v(() => s.label ?? Pe(at(s.id))); + let a = Qe("ApiState", void 0); + const r = v(() => mt.call({ responseStatus: s.status ?? (a == null ? void 0 : a.error.value) }, s.id)); + return (u, d) => (o(), i("div", { + class: y(["relative flex items-start", u.$attrs.class]) }, [ - l("div", ec, [ - l("input", Ae({ - id: d.id, - name: d.id, + l("div", oc, [ + l("input", Te({ + id: u.id, + name: u.id, type: "checkbox", - checked: d.modelValue, - onInput: u[0] || (u[0] = (c) => d.$emit("update:modelValue", c.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", d.inputClass] - }, te(ft)(d.$attrs, ["class"])), null, 16, tc) + checked: u.modelValue, + onInput: d[0] || (d[0] = (c) => u.$emit("update:modelValue", c.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", u.inputClass] + }, X(ft)(u.$attrs, ["class"])), null, 16, ac) ]), - l("div", sc, [ + l("div", rc, [ l("label", { - for: d.id, - class: b(`font-medium text-gray-700 dark:text-gray-300 ${d.labelClass ?? ""}`) - }, P(n.value), 11, lc), - r.value ? (o(), i("p", nc, P(r.value), 1)) : d.help ? (o(), i("p", oc, P(d.help), 1)) : x("", !0) + for: u.id, + class: y(`font-medium text-gray-700 dark:text-gray-300 ${u.labelClass ?? ""}`) + }, F(n.value), 11, ic), + r.value ? (o(), i("p", uc, F(r.value), 1)) : u.help ? (o(), i("p", dc, F(u.help), 1)) : x("", !0) ]) ], 2)); } -}), ic = ["id"], uc = ["for"], dc = { class: "mt-1 relative rounded-md shadow-sm" }, cc = ["id", "name", "value"], fc = { class: "flex flex-wrap pb-1.5" }, vc = { class: "pt-1.5 pl-1" }, pc = { 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" }, mc = ["onClick"], hc = /* @__PURE__ */ l("svg", { +}), vc = ["id"], pc = ["for"], mc = { class: "mt-1 relative rounded-md shadow-sm" }, hc = ["id", "name", "value"], gc = { class: "flex flex-wrap pb-1.5" }, yc = { class: "pt-1.5 pl-1" }, bc = { 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" }, wc = ["onClick"], kc = /* @__PURE__ */ l("svg", { class: "h-2 w-2", stroke: "currentColor", fill: "none", @@ -3717,12 +3751,12 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ "stroke-width": "1.5", d: "M1 1l6 6m0-6L1 7" }) -], -1), gc = [ - hc -], yc = { class: "pt-1.5 pl-1 shrink" }, bc = ["type", "name", "id", "aria-invalid", "aria-describedby"], wc = ["id"], kc = ["onMouseover", "onClick"], _c = { class: "block truncate" }, $c = { +], -1), _c = [ + kc +], $c = { class: "pt-1.5 pl-1 shrink" }, Cc = ["type", "name", "id", "aria-invalid", "aria-describedby"], xc = ["id"], Lc = ["onMouseover", "onClick"], Vc = { class: "block truncate" }, Sc = { key: 1, class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none" -}, Cc = /* @__PURE__ */ l("svg", { +}, Mc = /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-red-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", @@ -3734,12 +3768,12 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ 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), xc = [ - Cc -], Lc = ["id"], Vc = ["id"], Sc = { +], -1), Ac = [ + Mc +], Tc = ["id"], Fc = ["id"], Ic = { inheritAttrs: !1 -}, Mc = /* @__PURE__ */ ce({ - ...Sc, +}, jc = /* @__PURE__ */ de({ + ...Ic, __name: "TagInput", props: { status: {}, @@ -3759,154 +3793,154 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ emits: ["update:modelValue"], setup(e, { emit: t }) { const s = e, n = t; - function a(y) { - return s.converter ? s.converter(y) : y; + function a(w) { + return s.converter ? s.converter(w) : w; } - const r = v(() => Qe(a(s.modelValue), (y) => typeof y == "string" ? y.trim().length == 0 ? [] : y.split(",") : y) || []), d = I(), u = I(!1), c = v(() => { - const y = $.value.toLowerCase(); - return !s.allowableValues || s.allowableValues.length == 0 ? [] : s.allowableValues.length < 1e3 ? s.allowableValues.filter((N) => !r.value.includes(N) && N.toLowerCase().includes(y)) : s.allowableValues.filter((N) => !r.value.includes(N) && N.startsWith(y)); + const r = v(() => Ze(a(s.modelValue), (w) => typeof w == "string" ? w.trim().length == 0 ? [] : w.split(",") : w) || []), u = O(), d = O(!1), c = v(() => { + const w = $.value.toLowerCase(); + return !s.allowableValues || s.allowableValues.length == 0 ? [] : s.allowableValues.length < 1e3 ? s.allowableValues.filter((N) => !r.value.includes(N) && N.toLowerCase().includes(w)) : s.allowableValues.filter((N) => !r.value.includes(N) && N.startsWith(w)); }); - function f(y) { - d.value = y; + function f(w) { + u.value = w; } - const p = I(null), $ = I(""), m = v(() => s.type || "text"), k = v(() => s.label ?? ze(ot(s.id))); - let g = Ue("ApiState", void 0); - const w = v(() => pt.call({ responseStatus: s.status ?? (g == null ? void 0 : g.error.value) }, s.id)), j = v(() => [ + const p = O(null), $ = O(""), m = v(() => s.type || "text"), k = v(() => s.label ?? Pe(at(s.id))); + let g = Qe("ApiState", void 0); + const b = v(() => mt.call({ responseStatus: s.status ?? (g == null ? void 0 : g.error.value) }, s.id)), P = v(() => [ "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", - w.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", + b.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", s.inputClass - ]), H = (y) => V(r.value.filter((N) => N != y)); - function re(y) { + ]), I = (w) => L(r.value.filter((N) => N != w)); + function se(w) { var N; - document.activeElement === y.target && ((N = p.value) == null || N.focus()); + document.activeElement === w.target && ((N = p.value) == null || N.focus()); } - const F = I(); + const j = O(); function T() { - u.value = !0, F.value = !0; + d.value = !0, j.value = !0; } - function A() { + function M() { T(); } - function ue() { - U(Q()), F.value = !1, setTimeout(() => { - F.value || (u.value = !1); + function ie() { + q(K()), j.value = !1, setTimeout(() => { + j.value || (d.value = !1); }, 200); } - function V(y) { - const N = s.string ? y.join(",") : y; + function L(w) { + const N = s.string ? w.join(",") : w; n("update:modelValue", N); } - function z(y) { - if (y.key == "Backspace" && $.value.length == 0 && r.value.length > 0 && H(r.value[r.value.length - 1]), !(!s.allowableValues || s.allowableValues.length == 0)) - if (y.code == "Escape" || y.code == "Tab") - u.value = !1; - else if (y.code == "Home") - d.value = c.value[0], Z(); - else if (y.code == "End") - d.value = c.value[c.value.length - 1], Z(); - else if (y.code == "ArrowDown") { - if (u.value = !0, !d.value) - d.value = c.value[0]; + function z(w) { + if (w.key == "Backspace" && $.value.length == 0 && r.value.length > 0 && I(r.value[r.value.length - 1]), !(!s.allowableValues || s.allowableValues.length == 0)) + if (w.code == "Escape" || w.code == "Tab") + d.value = !1; + else if (w.code == "Home") + u.value = c.value[0], W(); + else if (w.code == "End") + u.value = c.value[c.value.length - 1], W(); + else if (w.code == "ArrowDown") { + if (d.value = !0, !u.value) + u.value = c.value[0]; else { - const N = c.value.indexOf(d.value); - d.value = N + 1 < c.value.length ? c.value[N + 1] : c.value[0]; + const N = c.value.indexOf(u.value); + u.value = N + 1 < c.value.length ? c.value[N + 1] : c.value[0]; } - J(); - } else if (y.code == "ArrowUp") { - if (!d.value) - d.value = c.value[c.value.length - 1]; + ee(); + } else if (w.code == "ArrowUp") { + if (!u.value) + u.value = c.value[c.value.length - 1]; else { - const N = c.value.indexOf(d.value); - d.value = N - 1 >= 0 ? c.value[N - 1] : c.value[c.value.length - 1]; + const N = c.value.indexOf(u.value); + u.value = N - 1 >= 0 ? c.value[N - 1] : c.value[c.value.length - 1]; } - J(); + ee(); } else - y.code == "Enter" ? d.value && u.value ? (U(d.value), y.preventDefault()) : u.value = !1 : u.value = c.value.length > 0; + w.code == "Enter" ? u.value && d.value ? (q(u.value), w.preventDefault()) : d.value = !1 : d.value = c.value.length > 0; } - function Q() { + function K() { if ($.value.length == 0) return ""; - let y = Do($.value.trim(), ","); - return y[0] == "," && (y = y.substring(1)), y = y.trim(), y.length == 0 && u.value && c.value.length > 0 ? d.value : y; + let w = Po($.value.trim(), ","); + return w[0] == "," && (w = w.substring(1)), w = w.trim(), w.length == 0 && d.value && c.value.length > 0 ? u.value : w; } - function se(y) { - const N = Q(); + function le(w) { + const N = K(); if (N.length > 0) { - const E = s.delimiters.some((C) => C == y.key); - if (E && y.preventDefault(), y.key == "Enter" || y.key == "NumpadEnter" || y.key.length == 1 && E) { - U(N); + const E = s.delimiters.some((C) => C == w.key); + if (E && w.preventDefault(), w.key == "Enter" || w.key == "NumpadEnter" || w.key.length == 1 && E) { + q(N); return; } } } const R = { behavior: "smooth", block: "nearest", inline: "nearest", scrollMode: "if-needed" }; - function Z() { + function W() { setTimeout(() => { - let y = _s(`#${s.id}-tag li.active`); - y && y.scrollIntoView(R); + let w = _s(`#${s.id}-tag li.active`); + w && w.scrollIntoView(R); }, 0); } - function J() { + function ee() { setTimeout(() => { - let y = _s(`#${s.id}-tag li.active`); - y && ("scrollIntoViewIfNeeded" in y ? y.scrollIntoViewIfNeeded(R) : y.scrollIntoView(R)); + let w = _s(`#${s.id}-tag li.active`); + w && ("scrollIntoViewIfNeeded" in w ? w.scrollIntoViewIfNeeded(R) : w.scrollIntoView(R)); }, 0); } - function U(y) { - if (y.length === 0) + function q(w) { + if (w.length === 0) return; const N = Array.from(r.value); - N.indexOf(y) == -1 && N.push(y), V(N), $.value = "", u.value = !1; + N.indexOf(w) == -1 && N.push(w), L(N), $.value = "", d.value = !1; } - function M(y) { + function A(w) { var E; - const N = (E = y.clipboardData) == null ? void 0 : E.getData("Text"); - ee(N); + const N = (E = w.clipboardData) == null ? void 0 : E.getData("Text"); + te(N); } - function ee(y) { - if (!y) + function te(w) { + if (!w) return; const N = new RegExp(`\\n|\\t|${s.delimiters.join("|")}`), E = Array.from(r.value); - y.split(N).map((C) => C.trim()).forEach((C) => { + w.split(N).map((C) => C.trim()).forEach((C) => { E.indexOf(C) == -1 && E.push(C); - }), V(E), $.value = ""; + }), L(E), $.value = ""; } - return (y, N) => (o(), i("div", { - class: b([y.$attrs.class]), - id: `${y.id}-tag`, + return (w, N) => (o(), i("div", { + class: y([w.$attrs.class]), + id: `${w.id}-tag`, onmousemove: "cancelBlur=true" }, [ k.value ? (o(), i("label", { key: 0, - for: y.id, - class: b(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${y.labelClass ?? ""}`) - }, P(k.value), 11, uc)) : x("", !0), - l("div", dc, [ + for: w.id, + class: y(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${w.labelClass ?? ""}`) + }, F(k.value), 11, pc)) : x("", !0), + l("div", mc, [ l("input", { type: "hidden", - id: y.id, - name: y.id, + id: w.id, + name: w.id, value: r.value.join(",") - }, null, 8, cc), + }, null, 8, hc), l("button", { - class: b(j.value), - onClick: qe(re, ["prevent"]), - onFocus: N[2] || (N[2] = (E) => u.value = !0), + class: y(P.value), + onClick: Ue(se, ["prevent"]), + onFocus: N[2] || (N[2] = (E) => d.value = !0), tabindex: "-1" }, [ - l("div", fc, [ - (o(!0), i(Ie, null, De(r.value, (E) => (o(), i("div", vc, [ - l("span", pc, [ - ke(P(E) + " ", 1), + l("div", gc, [ + (o(!0), i(Me, null, je(r.value, (E) => (o(), i("div", yc, [ + l("span", bc, [ + ke(F(E) + " ", 1), l("button", { type: "button", - onClick: (h) => H(E), + onClick: (h) => I(E), 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" - }, gc, 8, mc) + }, _c, 8, wc) ]) ]))), 256)), - l("div", yc, [ - Ct(l("input", Ae({ + l("div", $c, [ + Mt(l("input", Te({ ref_key: "txtInput", ref: p, type: m.value, @@ -3915,59 +3949,59 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ "aria-expanded": "false", autocomplete: "off", spellcheck: "false", - name: `${y.id}-txt`, - id: `${y.id}-txt`, + name: `${w.id}-txt`, + id: `${w.id}-txt`, class: "p-0 dark:bg-transparent rounded-md border-none focus:!border-none focus:!outline-none", style: `box-shadow:none !important;width:${$.value.length + 1}ch`, "onUpdate:modelValue": N[0] || (N[0] = (E) => $.value = E), - "aria-invalid": w.value != null, - "aria-describedby": `${y.id}-error`, + "aria-invalid": b.value != null, + "aria-describedby": `${w.id}-error`, onKeydown: z, - onKeypress: se, - onPaste: qe(M, ["prevent", "stop"]), - onFocus: A, - onBlur: ue, - onClick: N[1] || (N[1] = (E) => u.value = !0) - }, te(ft)(y.$attrs, ["class", "required"])), null, 16, bc), [ - [yo, $.value] + onKeypress: le, + onPaste: Ue(A, ["prevent", "stop"]), + onFocus: M, + onBlur: ie, + onClick: N[1] || (N[1] = (E) => d.value = !0) + }, X(ft)(w.$attrs, ["class", "required"])), null, 16, Cc), [ + [wo, $.value] ]) ]) ]) ], 34), - u.value && c.value.length ? (o(), i("ul", { + d.value && c.value.length ? (o(), i("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: z, - id: `${y.id}-options`, + id: `${w.id}-options`, role: "listbox" }, [ - (o(!0), i(Ie, null, De(c.value.slice(0, y.maxVisibleItems), (E) => (o(), i("li", { - class: b([E === d.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"]), + (o(!0), i(Me, null, je(c.value.slice(0, w.maxVisibleItems), (E) => (o(), i("li", { + class: y([E === u.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: (h) => f(E), - onClick: (h) => U(E), + onClick: (h) => q(E), role: "option", tabindex: "-1" }, [ - l("span", _c, P(E), 1) - ], 42, kc))), 256)) - ], 40, wc)) : x("", !0), - w.value ? (o(), i("div", $c, xc)) : x("", !0) + l("span", Vc, F(E), 1) + ], 42, Lc))), 256)) + ], 40, xc)) : x("", !0), + b.value ? (o(), i("div", Sc, Ac)) : x("", !0) ]), - w.value ? (o(), i("p", { + b.value ? (o(), i("p", { key: 1, class: "mt-2 text-sm text-red-500", - id: `${y.id}-error` - }, P(w.value), 9, Lc)) : y.help ? (o(), i("p", { + id: `${w.id}-error` + }, F(b.value), 9, Tc)) : w.help ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-gray-500", - id: `${y.id}-description` - }, P(y.help), 9, Vc)) : x("", !0) - ], 10, ic)); + id: `${w.id}-description` + }, F(w.help), 9, Fc)) : x("", !0) + ], 10, vc)); } -}), Ac = { class: "relative flex-grow mr-2 sm:mr-4" }, Tc = ["for"], Fc = { class: "block mt-2" }, Ic = { class: "sr-only" }, Dc = ["multiple", "name", "id", "placeholder", "aria-invalid", "aria-describedby"], Pc = { +}), Oc = { class: "relative flex-grow mr-2 sm:mr-4" }, Dc = ["for"], Pc = { class: "block mt-2" }, Bc = { class: "sr-only" }, Hc = ["multiple", "name", "id", "placeholder", "aria-invalid", "aria-describedby"], Rc = { key: 0, class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none" -}, jc = /* @__PURE__ */ l("svg", { +}, Ec = /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-red-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", @@ -3979,18 +4013,18 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ 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), Oc = [ - jc -], Bc = ["id"], Rc = ["id"], Ec = { key: 0 }, Hc = ["title"], zc = ["alt", "src"], Nc = { +], -1), zc = [ + Ec +], Nc = ["id"], Uc = ["id"], qc = { key: 0 }, Qc = ["title"], Kc = ["alt", "src"], Zc = { key: 1, class: "mt-3" -}, Uc = { class: "w-full" }, qc = { class: "pr-6 align-bottom pb-2" }, Qc = ["title"], Kc = ["src", "onError"], Zc = ["href"], Wc = { +}, Wc = { class: "w-full" }, Gc = { class: "pr-6 align-bottom pb-2" }, Jc = ["title"], Xc = ["src", "onError"], Yc = ["href"], e0 = { key: 1, class: "overflow-hidden" -}, Gc = { class: "align-top pb-2 whitespace-nowrap" }, Jc = { +}, t0 = { class: "align-top pb-2 whitespace-nowrap" }, s0 = { key: 0, class: "text-gray-500 dark:text-gray-400 text-sm bg-white dark:bg-black" -}, Xc = /* @__PURE__ */ ce({ +}, l0 = /* @__PURE__ */ de({ __name: "FileInput", props: { multiple: { type: Boolean }, @@ -4007,119 +4041,119 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }, setup(e) { var T; - const t = e, s = I(null), { assetsPathResolver: n, fallbackPathResolver: a } = At(), r = {}, d = I(), u = I(((T = t.files) == null ? void 0 : T.map(c)) || []); - function c(A) { - return A.filePath = n(A.filePath), A; + const t = e, s = O(null), { assetsPathResolver: n, fallbackPathResolver: a } = It(), r = {}, u = O(), d = O(((T = t.files) == null ? void 0 : T.map(c)) || []); + function c(M) { + return M.filePath = n(M.filePath), M; } - t.values && t.values.length > 0 && (u.value = t.values.map((A) => { - let ue = A.replace(/\\/g, "/"); - return { fileName: rn(xt(ue, "/"), "."), filePath: ue, contentType: Ys(ue) }; + t.values && t.values.length > 0 && (d.value = t.values.map((M) => { + let ie = M.replace(/\\/g, "/"); + return { fileName: rn(At(ie, "/"), "."), filePath: ie, contentType: Ys(ie) }; }).map(c)); - const f = v(() => t.label ?? ze(ot(t.id))), p = v(() => t.placeholder ?? f.value); - let $ = Ue("ApiState", void 0); - const m = v(() => pt.call({ responseStatus: t.status ?? ($ == null ? void 0 : $.error.value) }, t.id)), k = v(() => [ + const f = v(() => t.label ?? Pe(at(t.id))), p = v(() => t.placeholder ?? f.value); + let $ = Qe("ApiState", void 0); + const m = v(() => mt.call({ responseStatus: t.status ?? ($ == null ? void 0 : $.error.value) }, t.id)), k = v(() => [ "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", m.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 - ]), g = (A) => { - let ue = A.target; - d.value = "", u.value = Array.from(ue.files || []).map((V) => ({ - fileName: V.name, - filePath: pl(V), - contentLength: V.size, - contentType: V.type || Ys(V.name) + ]), g = (M) => { + let ie = M.target; + u.value = "", d.value = Array.from(ie.files || []).map((L) => ({ + fileName: L.name, + filePath: pl(L), + contentLength: L.size, + contentType: L.type || Ys(L.name) })); - }, w = () => { - var A; - return (A = s.value) == null ? void 0 : A.click(); - }, j = (A) => A == null ? !1 : A.startsWith("data:") || A.startsWith("blob:"), H = v(() => { - if (u.value.length > 0) - return u.value[0].filePath; - let A = typeof t.modelValue == "string" ? t.modelValue : t.values && t.values[0]; - return A && wt(n(A)) || null; - }), re = (A) => !A || A.startsWith("data:") || A.endsWith(".svg") ? "" : "rounded-full object-cover"; - function F(A) { - d.value = a(H.value); - } - return zt(_n), (A, ue) => (o(), i("div", { - class: b(["flex", A.multiple ? "flex-col" : "justify-between"]) + }, b = () => { + var M; + return (M = s.value) == null ? void 0 : M.click(); + }, P = (M) => M == null ? !1 : M.startsWith("data:") || M.startsWith("blob:"), I = v(() => { + if (d.value.length > 0) + return d.value[0].filePath; + let M = typeof t.modelValue == "string" ? t.modelValue : t.values && t.values[0]; + return M && xt(n(M)) || null; + }), se = (M) => !M || M.startsWith("data:") || M.endsWith(".svg") ? "" : "rounded-full object-cover"; + function j(M) { + u.value = a(I.value); + } + return Ft(Cn), (M, ie) => (o(), i("div", { + class: y(["flex", M.multiple ? "flex-col" : "justify-between"]) }, [ - l("div", Ac, [ + l("div", Oc, [ f.value ? (o(), i("label", { key: 0, - for: A.id, - class: b(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${A.labelClass ?? ""}`) - }, P(f.value), 11, Tc)) : x("", !0), - l("div", Fc, [ - l("span", Ic, P(A.help ?? f.value), 1), - l("input", Ae({ + for: M.id, + class: y(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${M.labelClass ?? ""}`) + }, F(f.value), 11, Dc)) : x("", !0), + l("div", Pc, [ + l("span", Bc, F(M.help ?? f.value), 1), + l("input", Te({ ref_key: "input", ref: s, type: "file", - multiple: A.multiple, - name: A.id, - id: A.id, + multiple: M.multiple, + name: M.id, + id: M.id, class: k.value, placeholder: p.value, "aria-invalid": m.value != null, - "aria-describedby": `${A.id}-error` - }, A.$attrs, { onChange: g }), null, 16, Dc), - m.value ? (o(), i("div", Pc, Oc)) : x("", !0) + "aria-describedby": `${M.id}-error` + }, M.$attrs, { onChange: g }), null, 16, Hc), + m.value ? (o(), i("div", Rc, zc)) : x("", !0) ]), m.value ? (o(), i("p", { key: 1, class: "mt-2 text-sm text-red-500", - id: `${A.id}-error` - }, P(m.value), 9, Bc)) : A.help ? (o(), i("p", { + id: `${M.id}-error` + }, F(m.value), 9, Nc)) : M.help ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-gray-500", - id: `${A.id}-description` - }, P(A.help), 9, Rc)) : x("", !0) + id: `${M.id}-description` + }, F(M.help), 9, Uc)) : x("", !0) ]), - A.multiple ? (o(), i("div", Nc, [ - l("table", Uc, [ - (o(!0), i(Ie, null, De(u.value, (V) => (o(), i("tr", null, [ - l("td", qc, [ + M.multiple ? (o(), i("div", Zc, [ + l("table", Wc, [ + (o(!0), i(Me, null, je(d.value, (L) => (o(), i("tr", null, [ + l("td", Gc, [ l("div", { class: "flex w-full", - title: j(V.filePath) ? "" : V.filePath + title: P(L.filePath) ? "" : L.filePath }, [ l("img", { - src: r[te(wt)(V.filePath)] || te(n)(te(wt)(V.filePath)), - class: b(["mr-2 h-8 w-8", re(V.filePath)]), - onError: (z) => r[te(wt)(V.filePath)] = te(a)(te(wt)(V.filePath)) - }, null, 42, Kc), - j(V.filePath) ? (o(), i("span", Wc, P(V.fileName), 1)) : (o(), i("a", { + src: r[X(xt)(L.filePath)] || X(n)(X(xt)(L.filePath)), + class: y(["mr-2 h-8 w-8", se(L.filePath)]), + onError: (z) => r[X(xt)(L.filePath)] = X(a)(X(xt)(L.filePath)) + }, null, 42, Xc), + P(L.filePath) ? (o(), i("span", e0, F(L.fileName), 1)) : (o(), i("a", { key: 0, - href: te(n)(V.filePath || ""), + href: X(n)(L.filePath || ""), target: "_blank", class: "overflow-hidden" - }, P(V.fileName), 9, Zc)) - ], 8, Qc) + }, F(L.fileName), 9, Yc)) + ], 8, Jc) ]), - l("td", Gc, [ - V.contentLength && V.contentLength > 0 ? (o(), i("span", Jc, P(te(hl)(V.contentLength)), 1)) : x("", !0) + l("td", t0, [ + L.contentLength && L.contentLength > 0 ? (o(), i("span", s0, F(X(hl)(L.contentLength)), 1)) : x("", !0) ]) ]))), 256)) ]) - ])) : (o(), i("div", Ec, [ - H.value ? (o(), i("div", { + ])) : (o(), i("div", qc, [ + I.value ? (o(), i("div", { key: 0, class: "shrink-0 cursor-pointer", - title: j(H.value) ? "" : H.value + title: P(I.value) ? "" : I.value }, [ l("img", { - onClick: w, - class: b(["h-16 w-16", re(H.value)]), + onClick: b, + class: y(["h-16 w-16", se(I.value)]), alt: `Current ${f.value ?? ""}`, - src: d.value || te(n)(H.value), - onError: F - }, null, 42, zc) - ], 8, Hc)) : x("", !0) + src: u.value || X(n)(I.value), + onError: j + }, null, 42, Kc) + ], 8, Qc)) : x("", !0) ])) ], 2)); } -}), Yc = ["id"], e0 = ["for"], t0 = { class: "relative mt-1" }, s0 = ["id", "placeholder"], l0 = /* @__PURE__ */ l("svg", { +}), n0 = ["id"], o0 = ["for"], a0 = { class: "relative mt-1" }, r0 = ["id", "placeholder"], i0 = /* @__PURE__ */ l("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", @@ -4131,9 +4165,9 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ 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), n0 = [ - l0 -], o0 = ["id"], a0 = ["onMouseover", "onClick"], r0 = /* @__PURE__ */ l("svg", { +], -1), u0 = [ + i0 +], d0 = ["id"], c0 = ["onMouseover", "onClick"], f0 = /* @__PURE__ */ l("svg", { class: "h-5 w-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", @@ -4145,13 +4179,13 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ 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), i0 = [ - r0 -], u0 = { +], -1), v0 = [ + f0 +], p0 = { key: 2, class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", tabindex: "-1" -}, d0 = /* @__PURE__ */ l("svg", { +}, m0 = /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-red-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", @@ -4163,9 +4197,9 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ 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), c0 = [ - d0 -], f0 = ["id"], v0 = ["id"], p0 = /* @__PURE__ */ ce({ +], -1), h0 = [ + m0 +], g0 = ["id"], y0 = ["id"], b0 = /* @__PURE__ */ de({ __name: "Autocomplete", props: { status: {}, @@ -4184,190 +4218,190 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }, emits: ["update:modelValue"], setup(e, { expose: t, emit: s }) { - const n = I(!1), a = e, r = s; + const n = O(!1), a = e, r = s; t({ toggle: R }); - function d(M) { - return Array.isArray(a.modelValue) && a.modelValue.indexOf(M) >= 0; + function u(A) { + return Array.isArray(a.modelValue) && a.modelValue.indexOf(A) >= 0; } - const u = v(() => a.label ?? ze(ot(a.id))); - let c = Ue("ApiState", void 0); - const f = v(() => pt.call({ responseStatus: a.status ?? (c == null ? void 0 : c.error.value) }, a.id)), p = v(() => [nt.base, f.value ? nt.invalid : nt.valid]), $ = I(null), m = I(""), k = I(null), g = I(a.viewCount), w = I([]), j = v(() => m.value ? a.options.filter((ee) => a.match(ee, m.value)).slice(0, g.value) : a.options), H = ["Tab", "Escape", "ArrowDown", "ArrowUp", "Enter", "PageUp", "PageDown", "Home", "End"]; - function re(M) { - k.value = M, w.value.indexOf(M) > Math.floor(g.value * 0.9) && (g.value += a.viewCount, U()); + const d = v(() => a.label ?? Pe(at(a.id))); + let c = Qe("ApiState", void 0); + const f = v(() => mt.call({ responseStatus: a.status ?? (c == null ? void 0 : c.error.value) }, a.id)), p = v(() => [ot.base, f.value ? ot.invalid : ot.valid]), $ = O(null), m = O(""), k = O(null), g = O(a.viewCount), b = O([]), P = v(() => m.value ? a.options.filter((te) => a.match(te, m.value)).slice(0, g.value) : a.options), I = ["Tab", "Escape", "ArrowDown", "ArrowUp", "Enter", "PageUp", "PageDown", "Home", "End"]; + function se(A) { + k.value = A, b.value.indexOf(A) > Math.floor(g.value * 0.9) && (g.value += a.viewCount, q()); } - const F = [",", ` + const j = [",", ` `, " "]; - function T(M) { - var y; - const ee = (y = M.clipboardData) == null ? void 0 : y.getData("Text"); - A(ee); + function T(A) { + var w; + const te = (w = A.clipboardData) == null ? void 0 : w.getData("Text"); + M(te); } - function A(M) { - if (!M) + function M(A) { + if (!A) return; - const ee = F.some((y) => M.includes(y)); - if (!a.multiple || !ee) { - const y = a.options.filter((N) => a.match(N, M)); - y.length == 1 && (J(y[0]), n.value = !1, hs()); - } else if (ee) { - const y = new RegExp("\\r|\\n|\\t|,"), E = M.split(y).filter((h) => h.trim()).map((h) => a.options.find((C) => a.match(C, h))).filter((h) => !!h); + const te = j.some((w) => A.includes(w)); + if (!a.multiple || !te) { + const w = a.options.filter((N) => a.match(N, A)); + w.length == 1 && (ee(w[0]), n.value = !1, hs()); + } else if (te) { + const w = new RegExp("\\r|\\n|\\t|,"), E = A.split(w).filter((h) => h.trim()).map((h) => a.options.find((C) => a.match(C, h))).filter((h) => !!h); if (E.length > 0) { m.value = "", n.value = !1, k.value = null; let h = Array.from(a.modelValue || []); E.forEach((C) => { - d(C) ? h = h.filter((W) => W != C) : h.push(C); + u(C) ? h = h.filter((Y) => Y != C) : h.push(C); }), r("update:modelValue", h), hs(); } } } - function ue(M) { - H.indexOf(M.code) || Z(); + function ie(A) { + I.indexOf(A.code) || W(); } - function V(M) { - if (!(M.shiftKey || M.ctrlKey || M.altKey)) { + function L(A) { + if (!(A.shiftKey || A.ctrlKey || A.altKey)) { if (!n.value) { - M.code == "ArrowDown" && (n.value = !0, k.value = w.value[0]); + A.code == "ArrowDown" && (n.value = !0, k.value = b.value[0]); return; } - if (M.code == "Escape") - n.value && (M.stopPropagation(), n.value = !1); - else if (M.code == "Tab") + if (A.code == "Escape") + n.value && (A.stopPropagation(), n.value = !1); + else if (A.code == "Tab") n.value = !1; - else if (M.code == "Home") - k.value = w.value[0], Q(); - else if (M.code == "End") - k.value = w.value[w.value.length - 1], Q(); - else if (M.code == "ArrowDown") { + else if (A.code == "Home") + k.value = b.value[0], K(); + else if (A.code == "End") + k.value = b.value[b.value.length - 1], K(); + else if (A.code == "ArrowDown") { if (!k.value) - k.value = w.value[0]; + k.value = b.value[0]; else { - const ee = w.value.indexOf(k.value); - k.value = ee + 1 < w.value.length ? w.value[ee + 1] : w.value[0]; + const te = b.value.indexOf(k.value); + k.value = te + 1 < b.value.length ? b.value[te + 1] : b.value[0]; } - se(); - } else if (M.code == "ArrowUp") { + le(); + } else if (A.code == "ArrowUp") { if (!k.value) - k.value = w.value[w.value.length - 1]; + k.value = b.value[b.value.length - 1]; else { - const ee = w.value.indexOf(k.value); - k.value = ee - 1 >= 0 ? w.value[ee - 1] : w.value[w.value.length - 1]; + const te = b.value.indexOf(k.value); + k.value = te - 1 >= 0 ? b.value[te - 1] : b.value[b.value.length - 1]; } - se(); + le(); } else - M.code == "Enter" && (k.value ? (J(k.value), a.multiple || (M.preventDefault(), hs())) : n.value = !1); + A.code == "Enter" && (k.value ? (ee(k.value), a.multiple || (A.preventDefault(), hs())) : n.value = !1); } } const z = { behavior: "smooth", block: "nearest", inline: "nearest", scrollMode: "if-needed" }; - function Q() { + function K() { setTimeout(() => { - let M = _s(`#${a.id}-autocomplete li.active`); - M && M.scrollIntoView(z); + let A = _s(`#${a.id}-autocomplete li.active`); + A && A.scrollIntoView(z); }, 0); } - function se() { + function le() { setTimeout(() => { - let M = _s(`#${a.id}-autocomplete li.active`); - M && ("scrollIntoViewIfNeeded" in M ? M.scrollIntoViewIfNeeded(z) : M.scrollIntoView(z)); + let A = _s(`#${a.id}-autocomplete li.active`); + A && ("scrollIntoViewIfNeeded" in A ? A.scrollIntoViewIfNeeded(z) : A.scrollIntoView(z)); }, 0); } - function R(M) { - var ee; - n.value = M, M && (Z(), (ee = $.value) == null || ee.focus()); + function R(A) { + var te; + n.value = A, A && (W(), (te = $.value) == null || te.focus()); } - function Z() { - n.value = !0, U(); + function W() { + n.value = !0, q(); } - function J(M) { + function ee(A) { if (m.value = "", n.value = !1, a.multiple) { - let ee = Array.from(a.modelValue || []); - d(M) ? ee = ee.filter((y) => y != M) : ee.push(M), k.value = null, r("update:modelValue", ee); + let te = Array.from(a.modelValue || []); + u(A) ? te = te.filter((w) => w != A) : te.push(A), k.value = null, r("update:modelValue", te); } else { - let ee = M; - a.modelValue == M && (ee = null), r("update:modelValue", ee); + let te = A; + a.modelValue == A && (te = null), r("update:modelValue", te); } } - function U() { - w.value = j.value; + function q() { + b.value = P.value; } - return St(m, U), (M, ee) => (o(), i("div", { - id: `${M.id}-autocomplete` + return bt(m, q), (A, te) => (o(), i("div", { + id: `${A.id}-autocomplete` }, [ - u.value ? (o(), i("label", { + d.value ? (o(), i("label", { key: 0, - for: `${M.id}-text`, + for: `${A.id}-text`, class: "block text-sm font-medium text-gray-700 dark:text-gray-300" - }, P(u.value), 9, e0)) : x("", !0), - l("div", t0, [ - Ct(l("input", Ae({ + }, F(d.value), 9, o0)) : x("", !0), + l("div", a0, [ + Mt(l("input", Te({ ref_key: "txtInput", ref: $, - id: `${M.id}-text`, + id: `${A.id}-text`, type: "text", role: "combobox", "aria-controls": "options", "aria-expanded": "false", autocomplete: "off", spellcheck: "false", - "onUpdate:modelValue": ee[0] || (ee[0] = (y) => m.value = y), + "onUpdate:modelValue": te[0] || (te[0] = (w) => m.value = w), class: p.value, - placeholder: M.multiple || !M.modelValue ? M.placeholder : "", - onFocus: Z, - onKeydown: V, - onKeyup: ue, - onClick: Z, + placeholder: A.multiple || !A.modelValue ? A.placeholder : "", + onFocus: W, + onKeydown: L, + onKeyup: ie, + onClick: W, onPaste: T, required: !1 - }, M.$attrs), null, 16, s0), [ - [bo, m.value] + }, A.$attrs), null, 16, r0), [ + [ko, m.value] ]), l("button", { type: "button", - onClick: ee[1] || (ee[1] = (y) => R(!n.value)), + onClick: te[1] || (te[1] = (w) => R(!n.value)), class: "absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none", tabindex: "-1" - }, n0), + }, u0), n.value ? (o(), i("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: V, - id: `${M.id}-options`, + onKeydown: L, + id: `${A.id}-options`, role: "listbox" }, [ - (o(!0), i(Ie, null, De(w.value, (y) => (o(), i("li", { - class: b([y === k.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: (N) => re(y), - onClick: (N) => J(y), + (o(!0), i(Me, null, je(b.value, (w) => (o(), i("li", { + class: y([w === k.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: (N) => se(w), + onClick: (N) => ee(w), role: "option", tabindex: "-1" }, [ - K(M.$slots, "item", Ot(ks(y))), - d(y) ? (o(), i("span", { + U(A.$slots, "item", Rt(ks(w))), + u(w) ? (o(), i("span", { key: 0, - class: b(["absolute inset-y-0 right-0 flex items-center pr-4", y === k.value ? "text-white" : "text-indigo-600"]) - }, i0, 2)) : x("", !0) - ], 42, a0))), 256)) - ], 40, o0)) : !M.multiple && M.modelValue ? (o(), i("div", { + class: y(["absolute inset-y-0 right-0 flex items-center pr-4", w === k.value ? "text-white" : "text-indigo-600"]) + }, v0, 2)) : x("", !0) + ], 42, c0))), 256)) + ], 40, d0)) : !A.multiple && A.modelValue ? (o(), i("div", { key: 1, - onKeydown: V, - onClick: ee[2] || (ee[2] = (y) => R(!n.value)), + onKeydown: L, + onClick: te[2] || (te[2] = (w) => R(!n.value)), class: "h-8 -mt-8 ml-3 pt-0.5" }, [ - K(M.$slots, "item", Ot(ks(M.modelValue))) + U(A.$slots, "item", Rt(ks(A.modelValue))) ], 32)) : x("", !0), - f.value ? (o(), i("div", u0, c0)) : x("", !0) + f.value ? (o(), i("div", p0, h0)) : x("", !0) ]), f.value ? (o(), i("p", { key: 1, class: "mt-2 text-sm text-red-500", - id: `${M.id}-error` - }, P(f.value), 9, f0)) : M.help ? (o(), i("p", { + id: `${A.id}-error` + }, F(f.value), 9, g0)) : A.help ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-gray-500", - id: `${M.id}-description` - }, P(M.help), 9, v0)) : x("", !0) - ], 8, Yc)); + id: `${A.id}-description` + }, F(A.help), 9, y0)) : x("", !0) + ], 8, n0)); } -}), m0 = ["id", "name", "value"], h0 = { class: "block truncate" }, g0 = /* @__PURE__ */ ce({ +}), w0 = ["id", "name", "value"], k0 = { class: "block truncate" }, _0 = /* @__PURE__ */ de({ __name: "Combobox", props: { id: {}, @@ -4383,56 +4417,56 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ t({ toggle(k) { var g; - (g = u.value) == null || g.toggle(k); + (g = d.value) == null || g.toggle(k); } }); const a = s; function r(k) { a("update:modelValue", k); } - const d = v(() => n.multiple != null ? n.multiple : Array.isArray(n.modelValue)), u = I(); + const u = v(() => n.multiple != null ? n.multiple : Array.isArray(n.modelValue)), d = O(); function c(k, g) { return !g || k.value.toLowerCase().includes(g.toLowerCase()); } - const f = v(() => n.entries || (n.values ? n.values.map((k) => ({ key: k, value: k })) : n.options ? Object.keys(n.options).map((k) => ({ key: k, value: n.options[k] })) : [])), p = I(d.value ? [] : null); + const f = v(() => n.entries || (n.values ? n.values.map((k) => ({ key: k, value: k })) : n.options ? Object.keys(n.options).map((k) => ({ key: k, value: n.options[k] })) : [])), p = O(u.value ? [] : null); function $() { let k = n.modelValue && typeof n.modelValue == "object" ? n.modelValue.key : n.modelValue; - k == null || k === "" ? p.value = d.value ? [] : null : typeof k == "string" ? p.value = f.value.find((g) => g.key === k) || null : Array.isArray(k) && (p.value = f.value.filter((g) => k.includes(g.key))); + k == null || k === "" ? p.value = u.value ? [] : null : typeof k == "string" ? p.value = f.value.find((g) => g.key === k) || null : Array.isArray(k) && (p.value = f.value.filter((g) => k.includes(g.key))); } - st($); + Ye($); const m = v(() => p.value == null ? "" : Array.isArray(p.value) ? p.value.map((k) => encodeURIComponent(k.key)).join(",") : p.value.key); return (k, g) => { - const w = G("Autocomplete"); - return o(), i(Ie, null, [ + const b = Z("Autocomplete"); + return o(), i(Me, null, [ l("input", { type: "hidden", id: k.id, name: k.id, value: m.value - }, null, 8, m0), - xe(w, Ae({ + }, null, 8, w0), + ye(b, Te({ ref_key: "input", - ref: u, + ref: d, id: k.id, options: f.value, match: c, - multiple: d.value + multiple: u.value }, k.$attrs, { modelValue: p.value, "onUpdate:modelValue": [ - g[0] || (g[0] = (j) => p.value = j), + g[0] || (g[0] = (P) => p.value = P), r ] }), { - item: Ce(({ key: j, value: H }) => [ - l("span", h0, P(H), 1) + item: xe(({ key: P, value: I }) => [ + l("span", k0, F(I), 1) ]), _: 1 }, 16, ["id", "options", "multiple", "modelValue"]) ], 64); }; } -}), y0 = /* @__PURE__ */ ce({ +}), $0 = /* @__PURE__ */ de({ __name: "DynamicInput", props: { input: {}, @@ -4441,121 +4475,118 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }, emits: ["update:modelValue"], setup(e, { emit: t }) { - const s = e, n = t, a = v(() => s.input.type || "text"), r = "ignore,css,options,meta,allowableValues,allowableEntries,op,prop,type,id,name".split(","), d = v(() => ft(s.input, r)), u = I(Qe( - s.modelValue[s.input.id], - (f) => s.input.type === "file" ? null : s.input.type === "date" && f instanceof Date ? Ss(f) : s.input.type === "time" ? fn(f) : f - )); - St(u, () => { - s.modelValue[s.input.id] = u.value, n("update:modelValue", s.modelValue); + const s = e, n = t, a = v(() => s.input.type || "text"), r = "ignore,css,options,meta,allowableValues,allowableEntries,op,prop,type,id,name".split(","), u = v(() => ft(s.input, r)), d = O(a.value === "file" ? null : s.modelValue[s.input.id]); + bt(d, () => { + s.modelValue[s.input.id] = d.value, n("update:modelValue", s.modelValue); }); const c = v(() => { const f = s.modelValue[s.input.id]; if (s.input.type !== "file" || !f) return []; if (typeof f == "string") - return [{ filePath: f, fileName: xt(f, "/") }]; + return [{ filePath: f, fileName: At(f, "/") }]; if (!Array.isArray(f) && typeof f == "object") return f; if (Array.isArray(f)) { const p = []; return f.forEach(($) => { - typeof $ == "string" ? p.push({ filePath: $, fileName: xt($, "/") }) : typeof $ == "object" && p.push($); + typeof $ == "string" ? p.push({ filePath: $, fileName: At($, "/") }) : typeof $ == "object" && p.push($); }), p; } }); return (f, p) => { - var F, T, A, ue, V, z, Q, se, R, Z, J, U, M, ee, y, N, E, h, C, W, X, le, D, L, fe, pe, ie, me; - const $ = G("SelectInput"), m = G("CheckboxInput"), k = G("TagInput"), g = G("Combobox"), w = G("FileInput"), j = G("TextareaInput"), H = G("MarkdownInput"), re = G("TextInput"); - return te(Y).component(a.value) ? (o(), ae(on(te(Y).component(a.value)), Ae({ + var j, T, M, ie, L, z, K, le, R, W, ee, q, A, te, w, N, E, h, C, Y, J, ne, D, V, fe, pe, ue, me; + const $ = Z("SelectInput"), m = Z("CheckboxInput"), k = Z("TagInput"), g = Z("Combobox"), b = Z("FileInput"), P = Z("TextareaInput"), I = Z("MarkdownInput"), se = Z("TextInput"); + return X(G).component(a.value) ? (o(), ae(an(X(G).component(a.value)), Te({ key: 0, id: f.input.id, - modelValue: u.value, - "onUpdate:modelValue": p[0] || (p[0] = (S) => u.value = S), - status: (F = f.api) == null ? void 0 : F.error, + modelValue: d.value, + "onUpdate:modelValue": p[0] || (p[0] = (S) => d.value = S), + status: (j = f.api) == null ? void 0 : j.error, "input-class": (T = f.input.css) == null ? void 0 : T.input, - "label-class": (A = f.input.css) == null ? void 0 : A.label - }, d.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : a.value == "select" ? (o(), ae($, Ae({ + "label-class": (M = f.input.css) == null ? void 0 : M.label + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : a.value == "select" ? (o(), ae($, Te({ key: 1, id: f.input.id, - modelValue: u.value, - "onUpdate:modelValue": p[1] || (p[1] = (S) => u.value = S), - status: (ue = f.api) == null ? void 0 : ue.error, - "input-class": (V = f.input.css) == null ? void 0 : V.input, + modelValue: d.value, + "onUpdate:modelValue": p[1] || (p[1] = (S) => d.value = S), + status: (ie = f.api) == null ? void 0 : ie.error, + "input-class": (L = f.input.css) == null ? void 0 : L.input, "label-class": (z = f.input.css) == null ? void 0 : z.label, entries: f.input.allowableEntries, values: f.input.allowableValues - }, d.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class", "entries", "values"])) : a.value == "checkbox" ? (o(), ae(m, Ae({ + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class", "entries", "values"])) : a.value == "checkbox" ? (o(), ae(m, Te({ key: 2, id: f.input.id, - modelValue: u.value, - "onUpdate:modelValue": p[2] || (p[2] = (S) => u.value = S), - status: (Q = f.api) == null ? void 0 : Q.error, - "input-class": (se = f.input.css) == null ? void 0 : se.input, + modelValue: d.value, + "onUpdate:modelValue": p[2] || (p[2] = (S) => d.value = S), + status: (K = f.api) == null ? void 0 : K.error, + "input-class": (le = f.input.css) == null ? void 0 : le.input, "label-class": (R = f.input.css) == null ? void 0 : R.label - }, d.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : a.value == "tag" ? (o(), ae(k, Ae({ + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : a.value == "tag" ? (o(), ae(k, Te({ key: 3, id: f.input.id, - modelValue: u.value, - "onUpdate:modelValue": p[3] || (p[3] = (S) => u.value = S), - status: (Z = f.api) == null ? void 0 : Z.error, - "input-class": (J = f.input.css) == null ? void 0 : J.input, - "label-class": (U = f.input.css) == null ? void 0 : U.label, + modelValue: d.value, + "onUpdate:modelValue": p[3] || (p[3] = (S) => d.value = S), + status: (W = f.api) == null ? void 0 : W.error, + "input-class": (ee = f.input.css) == null ? void 0 : ee.input, + "label-class": (q = f.input.css) == null ? void 0 : q.label, allowableValues: f.input.allowableValues, - string: ((M = f.input.prop) == null ? void 0 : M.type) == "String" - }, d.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class", "allowableValues", "string"])) : a.value == "combobox" ? (o(), ae(g, Ae({ + string: ((A = f.input.prop) == null ? void 0 : A.type) == "String" + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class", "allowableValues", "string"])) : a.value == "combobox" ? (o(), ae(g, Te({ key: 4, id: f.input.id, - modelValue: u.value, - "onUpdate:modelValue": p[4] || (p[4] = (S) => u.value = S), - status: (ee = f.api) == null ? void 0 : ee.error, - "input-class": (y = f.input.css) == null ? void 0 : y.input, + modelValue: d.value, + "onUpdate:modelValue": p[4] || (p[4] = (S) => d.value = S), + status: (te = f.api) == null ? void 0 : te.error, + "input-class": (w = f.input.css) == null ? void 0 : w.input, "label-class": (N = f.input.css) == null ? void 0 : N.label, entries: f.input.allowableEntries, values: f.input.allowableValues - }, d.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class", "entries", "values"])) : a.value == "file" ? (o(), ae(w, Ae({ + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class", "entries", "values"])) : a.value == "file" ? (o(), ae(b, Te({ key: 5, id: f.input.id, status: (E = f.api) == null ? void 0 : E.error, - modelValue: u.value, - "onUpdate:modelValue": p[5] || (p[5] = (S) => u.value = S), + modelValue: d.value, + "onUpdate:modelValue": p[5] || (p[5] = (S) => d.value = S), "input-class": (h = f.input.css) == null ? void 0 : h.input, "label-class": (C = f.input.css) == null ? void 0 : C.label, files: c.value - }, d.value), null, 16, ["id", "status", "modelValue", "input-class", "label-class", "files"])) : a.value == "textarea" ? (o(), ae(j, Ae({ + }, u.value), null, 16, ["id", "status", "modelValue", "input-class", "label-class", "files"])) : a.value == "textarea" ? (o(), ae(P, Te({ key: 6, id: f.input.id, - modelValue: u.value, - "onUpdate:modelValue": p[6] || (p[6] = (S) => u.value = S), - status: (W = f.api) == null ? void 0 : W.error, - "input-class": (X = f.input.css) == null ? void 0 : X.input, - "label-class": (le = f.input.css) == null ? void 0 : le.label - }, d.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : a.value == "MarkdownInput" ? (o(), ae(H, Ae({ + modelValue: d.value, + "onUpdate:modelValue": p[6] || (p[6] = (S) => d.value = S), + status: (Y = f.api) == null ? void 0 : Y.error, + "input-class": (J = f.input.css) == null ? void 0 : J.input, + "label-class": (ne = f.input.css) == null ? void 0 : ne.label + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : a.value == "MarkdownInput" ? (o(), ae(I, Te({ key: 7, id: f.input.id, - modelValue: u.value, - "onUpdate:modelValue": p[7] || (p[7] = (S) => u.value = S), + modelValue: d.value, + "onUpdate:modelValue": p[7] || (p[7] = (S) => d.value = S), status: (D = f.api) == null ? void 0 : D.error, - "input-class": (L = f.input.css) == null ? void 0 : L.input, + "input-class": (V = f.input.css) == null ? void 0 : V.input, "label-class": (fe = f.input.css) == null ? void 0 : fe.label - }, d.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : (o(), ae(re, Ae({ + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : (o(), ae(se, Te({ key: 8, type: a.value, id: f.input.id, - modelValue: u.value, - "onUpdate:modelValue": p[8] || (p[8] = (S) => u.value = S), + modelValue: d.value, + "onUpdate:modelValue": p[8] || (p[8] = (S) => d.value = S), status: (pe = f.api) == null ? void 0 : pe.error, - "input-class": (ie = f.input.css) == null ? void 0 : ie.input, + "input-class": (ue = f.input.css) == null ? void 0 : ue.input, "label-class": (me = f.input.css) == null ? void 0 : me.label - }, d.value), null, 16, ["type", "id", "modelValue", "status", "input-class", "label-class"])); + }, u.value), null, 16, ["type", "id", "modelValue", "status", "input-class", "label-class"])); }; } -}), b0 = { class: "lookup-field" }, w0 = ["name", "value"], k0 = { +}), C0 = { class: "lookup-field" }, x0 = ["name", "value"], L0 = { key: 0, class: "flex justify-between" -}, _0 = ["for"], $0 = { +}, V0 = ["for"], S0 = { key: 0, class: "flex items-center" -}, C0 = { class: "text-sm text-gray-500 dark:text-gray-400 pr-1" }, x0 = /* @__PURE__ */ l("span", { class: "sr-only" }, "Clear", -1), L0 = /* @__PURE__ */ l("svg", { +}, M0 = { class: "text-sm text-gray-500 dark:text-gray-400 pr-1" }, A0 = /* @__PURE__ */ l("span", { class: "sr-only" }, "Clear", -1), T0 = /* @__PURE__ */ l("svg", { class: "h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", @@ -4569,13 +4600,13 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" }) -], -1), V0 = [ - x0, - L0 -], S0 = { +], -1), F0 = [ + A0, + T0 +], I0 = { key: 1, class: "mt-1 relative" -}, M0 = { class: "w-full inline-flex truncate" }, A0 = { class: "text-blue-700 dark:text-blue-300 flex cursor-pointer" }, T0 = /* @__PURE__ */ l("span", { class: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none" }, [ +}, j0 = { class: "w-full inline-flex truncate" }, O0 = { class: "text-blue-700 dark:text-blue-300 flex cursor-pointer" }, D0 = /* @__PURE__ */ l("span", { class: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none" }, [ /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-gray-400 dark:text-gray-500", xmlns: "http://www.w3.org/2000/svg", @@ -4589,7 +4620,7 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ "clip-rule": "evenodd" }) ]) -], -1), F0 = ["id"], I0 = ["id"], D0 = /* @__PURE__ */ ce({ +], -1), P0 = ["id"], B0 = ["id"], H0 = /* @__PURE__ */ de({ __name: "LookupInput", props: { id: {}, @@ -4603,125 +4634,125 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }, emits: ["update:modelValue"], setup(e, { emit: t }) { - const { config: s } = At(), { metadataApi: n } = rt(), a = e, r = t, d = v(() => a.id || a.input.id), u = v(() => a.label ?? ze(ot(d.value))); - let c = Ue("ApiState", void 0); - const f = Ue("client"), p = v(() => pt.call({ responseStatus: a.status ?? (c == null ? void 0 : c.error.value) }, d.value)), $ = I(""), m = I(""), k = v(() => be(a.modelValue, d.value)), g = v(() => tt(a.metadataType).find((F) => F.name.toLowerCase() == d.value.toLowerCase())), w = v(() => { - var F, T, A; - return ((A = at((T = (F = g.value) == null ? void 0 : F.ref) == null ? void 0 : T.model)) == null ? void 0 : A.icon) || s.value.tableIcon; + const { config: s } = It(), { metadataApi: n } = lt(), a = e, r = t, u = v(() => a.id || a.input.id), d = v(() => a.label ?? Pe(at(u.value))); + let c = Qe("ApiState", void 0); + const f = Qe("client"), p = v(() => mt.call({ responseStatus: a.status ?? (c == null ? void 0 : c.error.value) }, u.value)), $ = O(""), m = O(""), k = v(() => _e(a.modelValue, u.value)), g = v(() => st(a.metadataType).find((j) => j.name.toLowerCase() == u.value.toLowerCase())), b = v(() => { + var j, T, M; + return ((M = rt((T = (j = g.value) == null ? void 0 : j.ref) == null ? void 0 : T.model)) == null ? void 0 : M.icon) || s.value.tableIcon; }); - let j; - function H(F) { - if (F) { - if (j == null) { + let P; + function I(j) { + if (j) { + if (P == null) { console.warn("No ModalProvider required by LookupInput"); return; } - j.openModal({ name: "ModalLookup", ref: F }, (T) => { - if (console.debug("openModal", $.value, " -> ", T, Dt.setRefValue(F, T), F), T) { - const A = be(T, F.refId); - $.value = Dt.setRefValue(F, T) || A; - const ue = te(a.modelValue); - ue[d.value] = A, r("update:modelValue", ue); + P.openModal({ name: "ModalLookup", ref: j }, (T) => { + if (console.debug("openModal", $.value, " -> ", T, Pt.setRefValue(j, T), j), T) { + const M = _e(T, j.refId); + $.value = Pt.setRefValue(j, T) || M; + const ie = X(a.modelValue); + ie[u.value] = M, r("update:modelValue", ie); } }); } } - function re() { - a.modelValue[d.value] = null, $.value = ""; - } - return st(async () => { - var Q, se; - j = Ue("ModalProvider", void 0); - const F = a.modelValue; - a.modelValue[d.value] || (a.modelValue[d.value] = null); - const T = g.value, A = T == null ? void 0 : T.ref; - if (!A) { - console.warn(`No RefInfo for property '${d.value}'`); + function se() { + a.modelValue[u.value] = null, $.value = ""; + } + return Ye(async () => { + var K, le; + P = Qe("ModalProvider", void 0); + const j = a.modelValue; + a.modelValue[u.value] || (a.modelValue[u.value] = null); + const T = g.value, M = T == null ? void 0 : T.ref; + if (!M) { + console.warn(`No RefInfo for property '${u.value}'`); return; } $.value = ""; - let ue = A.selfId == null ? be(F, T.name) : be(F, A.selfId); - if (Xt(ue) && (ue = be(F, A.refId)), ue == null) + let ie = M.selfId == null ? _e(j, T.name) : _e(j, M.selfId); + if (Xt(ie) && (ie = _e(j, M.refId)), ie == null) return; - if (((Q = n.value) == null ? void 0 : Q.operations.find((R) => { - var Z; - return ((Z = R.dataModel) == null ? void 0 : Z.name) == A.model; + if (((K = n.value) == null ? void 0 : K.operations.find((R) => { + var W; + return ((W = R.dataModel) == null ? void 0 : W.name) == M.model; })) != null) { - const R = be(F, T.name); + const R = _e(j, T.name); if (Xt(R)) return; - if ($.value = `${R}`, m.value = T.name, A.refLabel != null) { - const Z = tt(a.metadataType).find((U) => U.type == A.model); - Z == null && console.warn(`Could not find ${A.model} Property on ${a.metadataType.name}`); - const J = Z != null ? be(F, Z.name) : null; - if (J != null) { - let U = be(J, A.refLabel); - U && ($.value = `${U}`, Dt.setValue(A.model, ue, A.refLabel, U)); + if ($.value = `${R}`, m.value = T.name, M.refLabel != null) { + const W = st(a.metadataType).find((q) => q.type == M.model); + W == null && console.warn(`Could not find ${M.model} Property on ${a.metadataType.name}`); + const ee = W != null ? _e(j, W.name) : null; + if (ee != null) { + let q = _e(ee, M.refLabel); + q && ($.value = `${q}`, Pt.setValue(M.model, ie, M.refLabel, q)); } else { - const U = ((se = T.attributes) == null ? void 0 : se.some((ee) => ee.name == "Computed")) == !0; - let M = await Dt.getOrFetchValue(f, n.value, A.model, A.refId, A.refLabel, U, ue); - $.value = M || `${A.model}: ${$.value}`; + const q = ((le = T.attributes) == null ? void 0 : le.some((te) => te.name == "Computed")) == !0; + let A = await Pt.getOrFetchValue(f, n.value, M.model, M.refId, M.refLabel, q, ie); + $.value = A || `${M.model}: ${$.value}`; } } } - }), (F, T) => { - var ue; - const A = G("Icon"); - return o(), i("div", b0, [ + }), (j, T) => { + var ie; + const M = Z("Icon"); + return o(), i("div", C0, [ l("input", { type: "hidden", - name: d.value, + name: u.value, value: k.value - }, null, 8, w0), - u.value ? (o(), i("div", k0, [ + }, null, 8, x0), + d.value ? (o(), i("div", L0, [ l("label", { - for: d.value, - class: b(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${F.labelClass ?? ""}`) - }, P(u.value), 11, _0), - k.value ? (o(), i("div", $0, [ - l("span", C0, P(k.value), 1), + for: u.value, + class: y(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${j.labelClass ?? ""}`) + }, F(d.value), 11, V0), + k.value ? (o(), i("div", S0, [ + l("span", M0, F(k.value), 1), l("button", { - onClick: re, + onClick: se, 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" - }, V0) + }, F0) ])) : x("", !0) ])) : x("", !0), - (ue = g.value) != null && ue.ref ? (o(), i("div", S0, [ + (ie = g.value) != null && ie.ref ? (o(), i("div", I0, [ l("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] = (V) => H(g.value.ref)), + onClick: T[0] || (T[0] = (L) => I(g.value.ref)), "aria-haspopup": "listbox", "aria-expanded": "true", "aria-labelledby": "listbox-label" }, [ - l("span", M0, [ - l("span", A0, [ - xe(A, { + l("span", j0, [ + l("span", O0, [ + ye(M, { class: "mr-1 w-5 h-5", - image: w.value + image: b.value }, null, 8, ["image"]), - l("span", null, P($.value), 1) + l("span", null, F($.value), 1) ]) ]), - T0 + D0 ]) ])) : x("", !0), p.value ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-red-500", - id: `${d.value}-error` - }, P(p.value), 9, F0)) : F.help ? (o(), i("p", { + id: `${u.value}-error` + }, F(p.value), 9, P0)) : j.help ? (o(), i("p", { key: 3, class: "mt-2 text-sm text-gray-500", - id: `${d.value}-description` - }, P(F.help), 9, I0)) : x("", !0) + id: `${u.value}-description` + }, F(j.help), 9, B0)) : x("", !0) ]); }; } -}), P0 = /* @__PURE__ */ ce({ +}), R0 = /* @__PURE__ */ de({ __name: "AutoFormFields", props: { modelValue: {}, @@ -4740,90 +4771,92 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ emits: ["update:modelValue"], setup(e, { expose: t, emit: s }) { const n = e, a = s; - t({ forceUpdate: r, props: n, updateValue: u }); + t({ forceUpdate: r, props: n, updateValue: d }); function r() { var T; - const F = Be(); - (T = F == null ? void 0 : F.proxy) == null || T.$forceUpdate(); + const j = Be(); + (T = j == null ? void 0 : j.proxy) == null || T.$forceUpdate(); } - function d(F, T) { - u(F.id, be(T, F.id)); + function u(j, T) { + d(j.id, _e(T, j.id)); } - function u(F, T) { - n.modelValue[F] = T, a("update:modelValue", n.modelValue), r(); + function d(j, T) { + n.modelValue[j] = T, a("update:modelValue", n.modelValue), r(); } - const { metadataApi: c, apiOf: f, typeOf: p, typeOfRef: $, createFormLayout: m, Crud: k } = rt(), g = v(() => n.type || Nt(n.modelValue)), w = v(() => n.metaType ?? p(g.value)), j = v(() => { - var F, T; - return $((T = (F = c.value) == null ? void 0 : F.operations.find((A) => A.request.name == g.value)) == null ? void 0 : T.dataModel) || w.value; - }), H = v(() => { - const F = w.value; - if (!F) { + const { metadataApi: c, apiOf: f, typeOf: p, typeOfRef: $, createFormLayout: m, Crud: k } = lt(), g = v(() => n.type || qt(n.modelValue)), b = v(() => n.metaType ?? p(g.value)), P = v(() => { + var j, T; + return $((T = (j = c.value) == null ? void 0 : j.operations.find((M) => M.request.name == g.value)) == null ? void 0 : T.dataModel) || b.value; + }); + function I() { + const j = b.value; + if (!j) { if (n.formLayout) { - const Q = n.formLayout.map((se) => { - const R = { name: se.id, type: Ma(se.type) }, Z = Object.assign({ prop: R }, se); - return n.configureField && n.configureField(Z), Z; + const K = n.formLayout.map((le) => { + const R = { name: le.id, type: Ia(le.type) }, W = Object.assign({ prop: R }, le); + return n.configureField && n.configureField(W), W; }); - return n.configureFormLayout && n.configureFormLayout(Q), Q; + return n.configureFormLayout && n.configureFormLayout(K), K; } throw new Error(`MetadataType for ${g.value} not found`); } - const T = tt(F), A = j.value, ue = n.formLayout ? n.formLayout : m(F), V = [], z = f(F.name); - return ue.forEach((Q) => { - var J; - const se = T.find((U) => U.name == Q.name); - if (Q.ignore) + const T = st(j), M = P.value, ie = n.formLayout ? Array.from(n.formLayout) : m(j), L = [], z = f(j.name); + return ie.forEach((K) => { + var ee; + const le = T.find((q) => q.name == K.name); + if (K.ignore) return; - const R = ((J = A == null ? void 0 : A.properties) == null ? void 0 : J.find((U) => { - var M; - return U.name.toLowerCase() == ((M = Q.name) == null ? void 0 : M.toLowerCase()); - })) ?? se, Z = Object.assign({ prop: R, op: z }, Q); - n.configureField && n.configureField(Z), V.push(Z); - }), n.configureFormLayout && n.configureFormLayout(V), V; - }), re = v(() => H.value.filter((F) => F.type != "hidden").map((F) => F.id)); - return (F, T) => { + const R = ((ee = M == null ? void 0 : M.properties) == null ? void 0 : ee.find((q) => { + var A; + return q.name.toLowerCase() == ((A = K.name) == null ? void 0 : A.toLowerCase()); + })) ?? le, W = Object.assign({ prop: R, op: z }, K); + n.configureField && n.configureField(W), L.push(W); + }), n.configureFormLayout && n.configureFormLayout(L), L; + } + const se = () => I().filter((j) => j.type != "hidden").map((j) => j.id); + return (j, T) => { var z; - const A = G("ErrorSummary"), ue = G("LookupInput"), V = G("DynamicInput"); - return o(), i(Ie, null, [ - F.hideSummary ? x("", !0) : (o(), ae(A, { + const M = Z("ErrorSummary"), ie = Z("LookupInput"), L = Z("DynamicInput"); + return o(), i(Me, null, [ + j.hideSummary ? x("", !0) : (o(), ae(M, { key: 0, - status: (z = F.api) == null ? void 0 : z.error, - except: re.value + status: (z = j.api) == null ? void 0 : z.error, + except: se() }, null, 8, ["status", "except"])), l("div", { - class: b(F.flexClass) + class: y(j.flexClass) }, [ l("div", { - class: b(F.divideClass) + class: y(j.divideClass) }, [ l("div", { - class: b(F.spaceClass) + class: y(j.spaceClass) }, [ l("fieldset", { - class: b(F.fieldsetClass) + class: y(j.fieldsetClass) }, [ - (o(!0), i(Ie, null, De(H.value, (Q) => { - var se, R, Z; + (o(!0), i(Me, null, je(I(), (K) => { + var le, R, W; return o(), i("div", { - key: Q.id, - class: b([ + key: K.id, + class: y([ "w-full", - ((se = Q.css) == null ? void 0 : se.field) ?? (Q.type == "textarea" ? "col-span-12" : "col-span-12 xl:col-span-6" + (Q.type == "checkbox" ? " flex items-center" : "")), - Q.type == "hidden" ? "hidden" : "" + ((le = K.css) == null ? void 0 : le.field) ?? (K.type == "textarea" ? "col-span-12" : "col-span-12 xl:col-span-6" + (K.type == "checkbox" ? " flex items-center" : "")), + K.type == "hidden" ? "hidden" : "" ]) }, [ - ((R = Q.prop) == null ? void 0 : R.ref) != null && Q.type != "file" && !Q.prop.isPrimaryKey ? (o(), ae(ue, { + ((R = K.prop) == null ? void 0 : R.ref) != null && K.type != "file" && !K.prop.isPrimaryKey ? (o(), ae(ie, { key: 0, - metadataType: j.value, - input: Q, - modelValue: F.modelValue, - "onUpdate:modelValue": (J) => d(Q, J), - status: (Z = F.api) == null ? void 0 : Z.error - }, null, 8, ["metadataType", "input", "modelValue", "onUpdate:modelValue", "status"])) : (o(), ae(V, { + metadataType: P.value, + input: K, + modelValue: j.modelValue, + "onUpdate:modelValue": (ee) => u(K, ee), + status: (W = j.api) == null ? void 0 : W.error + }, null, 8, ["metadataType", "input", "modelValue", "onUpdate:modelValue", "status"])) : (o(), ae(L, { key: 1, - input: Q, - modelValue: F.modelValue, - "onUpdate:modelValue": T[0] || (T[0] = (J) => F.$emit("update:modelValue", J)), - api: F.api + input: K, + modelValue: j.modelValue, + "onUpdate:modelValue": T[0] || (T[0] = (ee) => j.$emit("update:modelValue", ee)), + api: j.api }, null, 8, ["input", "modelValue", "api"])) ], 2); }), 128)) @@ -4835,74 +4868,74 @@ const Jr = { key: 0 }, Xr = { class: "md:p-4" }, to = /* @__PURE__ */ ce({ }; } }); -function js(e) { - const t = I(!1), s = I(), n = I(), a = e ?? Ue("client"); - function r({ message: g, errorCode: w, fieldName: j, errors: H }) { - return w || (w = "Exception"), H || (H = []), s.value = j ? new Us({ - errorCode: w, +function Ds(e) { + const t = O(!1), s = O(), n = O(), a = e ?? Qe("client"); + function r({ message: g, errorCode: b, fieldName: P, errors: I }) { + return b || (b = "Exception"), I || (I = []), s.value = P ? new Us({ + errorCode: b, message: g, - errors: [new Wl({ fieldName: j, errorCode: w, message: g })] - }) : new Us({ errorCode: w, message: g, errors: H }); + errors: [new Gl({ fieldName: P, errorCode: b, message: g })] + }) : new Us({ errorCode: b, message: g, errors: I }); } - function d({ fieldName: g, message: w, errorCode: j }) { - if (j || (j = "Exception"), !s.value) - r({ fieldName: g, message: w, errorCode: j }); + function u({ fieldName: g, message: b, errorCode: P }) { + if (P || (P = "Exception"), !s.value) + r({ fieldName: g, message: b, errorCode: P }); else { - let H = new Us(s.value); - H.errors = [ - ...(H.errors || []).filter((re) => { - var F; - return ((F = re.fieldName) == null ? void 0 : F.toLowerCase()) !== (g == null ? void 0 : g.toLowerCase()); + let I = new Us(s.value); + I.errors = [ + ...(I.errors || []).filter((se) => { + var j; + return ((j = se.fieldName) == null ? void 0 : j.toLowerCase()) !== (g == null ? void 0 : g.toLowerCase()); }), - new Wl({ fieldName: g, message: w, errorCode: j }) - ], s.value = H; + new Gl({ fieldName: g, message: b, errorCode: P }) + ], s.value = I; } } - async function u(g, w, j) { + async function d(g, b, P) { t.value = !0; - let H = await a.api(It(g), w, j); - return t.value = !1, n.value = H.response, s.value = H.error, H; + let I = await a.api(Dt(g), b, P); + return t.value = !1, n.value = I.response, s.value = I.error, I; } - async function c(g, w, j) { + async function c(g, b, P) { t.value = !0; - let H = await a.apiVoid(It(g), w, j); - return t.value = !1, n.value = H.response, s.value = H.error, H; + let I = await a.apiVoid(Dt(g), b, P); + return t.value = !1, n.value = I.response, s.value = I.error, I; } - async function f(g, w, j, H) { + async function f(g, b, P, I) { t.value = !0; - let re = await a.apiForm(It(g), w, j, H); - return t.value = !1, n.value = re.response, s.value = re.error, re; + let se = await a.apiForm(Dt(g), b, P, I); + return t.value = !1, n.value = se.response, s.value = se.error, se; } - async function p(g, w, j, H) { + async function p(g, b, P, I) { t.value = !0; - let re = await a.apiFormVoid(It(g), w, j, H); - return t.value = !1, n.value = re.response, s.value = re.error, re; + let se = await a.apiFormVoid(Dt(g), b, P, I); + return t.value = !1, n.value = se.response, s.value = se.error, se; } - async function $(g, w, j, H) { - return mn(a, g, w, j, H); + async function $(g, b, P, I) { + return gn(a, g, b, P, I); } - function m(g, w) { - const j = I(new Xe()), H = hn(async (re) => { - j.value = await a.api(re); - }, w == null ? void 0 : w.delayMs); + function m(g, b) { + const P = O(new Xe()), I = yn(async (se) => { + P.value = await a.api(se); + }, b == null ? void 0 : b.delayMs); return ws(async () => { - const re = g(), F = cl(As(re)); - F && (j.value = new Xe({ response: F })), (w == null ? void 0 : w.delayMs) === 0 ? j.value = await a.api(re) : H(re); - }), (async () => j.value = await a.api(g(), w == null ? void 0 : w.args, w == null ? void 0 : w.method))(), j; + const se = g(), j = cl(As(se)); + j && (P.value = new Xe({ response: j })), (b == null ? void 0 : b.delayMs) === 0 ? P.value = await a.api(se) : I(se); + }), (async () => P.value = await a.api(g(), b == null ? void 0 : b.args, b == null ? void 0 : b.method))(), P; } - let k = { setError: r, addFieldError: d, loading: t, error: s, api: u, apiVoid: c, apiForm: f, apiFormVoid: p, swr: $, swrEffect: m, unRefs: It, setRef: vn }; + let k = { setError: r, addFieldError: u, loading: t, error: s, api: d, apiVoid: c, apiForm: f, apiFormVoid: p, swr: $, swrEffect: m, unRefs: Dt, setRef: mn }; return ss("ApiState", k), k; } -const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b", null, "type", -1), R0 = { key: 0 }, E0 = { key: 2 }, H0 = ["innerHTML"], z0 = /* @__PURE__ */ l("input", { +const E0 = { key: 0 }, z0 = { class: "text-red-700" }, N0 = /* @__PURE__ */ l("b", null, "type", -1), U0 = { key: 0 }, q0 = { key: 2 }, Q0 = ["innerHTML"], K0 = /* @__PURE__ */ l("input", { type: "submit", class: "hidden" -}, null, -1), N0 = { class: "flex justify-end" }, U0 = /* @__PURE__ */ l("div", null, null, -1), q0 = { +}, null, -1), Z0 = { class: "flex justify-end" }, W0 = /* @__PURE__ */ l("div", null, null, -1), G0 = { key: 2, class: "relative z-10", "aria-labelledby": "slide-over-title", role: "dialog", "aria-modal": "true" -}, Q0 = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), K0 = { class: "fixed inset-0 overflow-hidden" }, Z0 = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, W0 = { class: "flex-1" }, G0 = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, J0 = { class: "flex items-start justify-between space-x-3" }, X0 = { class: "space-y-1" }, Y0 = { key: 0 }, ef = { key: 2 }, tf = ["innerHTML"], sf = { class: "flex h-7 items-center" }, lf = { class: "flex justify-end" }, nf = /* @__PURE__ */ ce({ +}, J0 = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), X0 = { class: "fixed inset-0 overflow-hidden" }, Y0 = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, ef = { class: "flex-1" }, tf = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, sf = { class: "flex items-start justify-between space-x-3" }, lf = { class: "space-y-1" }, nf = { key: 0 }, of = { key: 2 }, af = ["innerHTML"], rf = { class: "flex h-7 items-center" }, uf = { class: "flex justify-end" }, df = /* @__PURE__ */ de({ __name: "AutoForm", props: { type: {}, @@ -4928,275 +4961,275 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b }, emits: ["success", "error", "update:modelValue", "done"], setup(e, { expose: t, emit: s }) { - const n = e, a = s, r = I(), d = I(1), u = I(); + const n = e, a = s, r = O(), u = O(1), d = O(); function c() { var fe; - d.value++, J.value = Z(); - const L = Be(); - (fe = L == null ? void 0 : L.proxy) == null || fe.$forceUpdate(); + u.value++, ee.value = W(); + const V = Be(); + (fe = V == null ? void 0 : V.proxy) == null || fe.$forceUpdate(); } - async function f(L) { - Object.assign(J.value, L), c(), await $t(() => null); + async function f(V) { + Object.assign(ee.value, V), c(), await St(() => null); } ss("ModalProvider", { openModal: k }); - const $ = I(), m = I(); - function k(L, fe) { - $.value = L, m.value = fe; + const $ = O(), m = O(); + function k(V, fe) { + $.value = V, m.value = fe; } - async function g(L) { - m.value && m.value(L), $.value = void 0, m.value = void 0; + async function g(V) { + m.value && m.value(V), $.value = void 0, m.value = void 0; } - const w = js(), { getTypeName: j } = gn(), { typeOf: H, Crud: re, createDto: F } = rt(), T = I(new Xe()), A = v(() => n.panelClass || Ze.panelClass(n.formStyle)), ue = v(() => n.formClass || n.formStyle == "card" ? "shadow sm:rounded-md" : Pt.formClass), V = v(() => n.headingClass || Ze.headingClass(n.formStyle)), z = v(() => n.subHeadingClass || Ze.subHeadingClass(n.formStyle)), Q = v(() => typeof n.buttonsClass == "string" ? n.buttonsClass : Ze.buttonsClass), se = v(() => { - var L; - return n.type ? j(n.type) : (L = n.modelValue) != null && L.getTypeName ? n.modelValue.getTypeName() : null; - }), R = v(() => n.metaType ?? H(se.value)), Z = () => n.modelValue || ee(), J = I(Z()), U = v(() => w.loading.value), M = v(() => { - var L; - return n.heading != null ? n.heading : ((L = R.value) == null ? void 0 : L.description) || ze(se.value); + const b = Ds(), { getTypeName: P } = bn(), { typeOf: I, Crud: se, createDto: j } = lt(), T = O(new Xe()), M = v(() => n.panelClass || Ee.panelClass(n.formStyle)), ie = v(() => n.formClass || n.formStyle == "card" ? "shadow sm:rounded-md" : Bt.formClass), L = v(() => n.headingClass || Ee.headingClass(n.formStyle)), z = v(() => n.subHeadingClass || Ee.subHeadingClass(n.formStyle)), K = v(() => typeof n.buttonsClass == "string" ? n.buttonsClass : Ee.buttonsClass), le = v(() => { + var V; + return n.type ? P(n.type) : (V = n.modelValue) != null && V.getTypeName ? n.modelValue.getTypeName() : null; + }), R = v(() => n.metaType ?? I(le.value)), W = () => n.modelValue || te(), ee = O(W()), q = v(() => b.loading.value), A = v(() => { + var V; + return n.heading != null ? n.heading : ((V = R.value) == null ? void 0 : V.description) || Pe(le.value); }); - t({ forceUpdate: c, props: n, setModel: f, formFields: r, submit: N, close: le, model: J }); - function ee() { - return typeof n.type == "string" ? F(n.type) : n.type ? new n.type() : n.modelValue; + t({ forceUpdate: c, props: n, setModel: f, formFields: r, submit: N, close: ne, model: ee }); + function te() { + return typeof n.type == "string" ? j(n.type) : n.type ? new n.type() : n.modelValue; } - async function y(L) { - if (!L || L.tagName != "FORM") { - console.error("Not a valid form", L); + async function w(V) { + if (!V || V.tagName != "FORM") { + console.error("Not a valid form", V); return; } - const fe = ee(); - let pe = Qe(fe == null ? void 0 : fe.getMethod, (S) => typeof S == "function" ? S() : null) || "POST", ie = Qe(fe == null ? void 0 : fe.createResponse, (S) => typeof S == "function" ? S() : null) == null; + const fe = te(); + let pe = Ze(fe == null ? void 0 : fe.getMethod, (S) => typeof S == "function" ? S() : null) || "POST", ue = Ze(fe == null ? void 0 : fe.createResponse, (S) => typeof S == "function" ? S() : null) == null; const me = n.jsconfig; if (il.hasRequestBody(pe)) { - let S = new fe.constructor(), de = new FormData(L); - ie ? T.value = await w.apiFormVoid(S, de, { jsconfig: me }) : T.value = await w.apiForm(S, de, { jsconfig: me }); + let S = new fe.constructor(), ce = new FormData(V); + ue ? T.value = await b.apiFormVoid(S, ce, { jsconfig: me }) : T.value = await b.apiForm(S, ce, { jsconfig: me }); } else { - let S = new fe.constructor(Po(J.value)); - console.debug("AutoForm.submit", S), ie ? T.value = await w.apiVoid(S, { jsconfig: me }) : T.value = await w.api(S, { jsconfig: me }); + let S = new fe.constructor(Bo(ee.value)); + console.debug("AutoForm.submit", S), ue ? T.value = await b.apiVoid(S, { jsconfig: me }) : T.value = await b.api(S, { jsconfig: me }); } - T.value.succeeded ? (a("success", T.value.response), le()) : a("error", T.value.error); + T.value.succeeded ? (a("success", T.value.response), ne()) : a("error", T.value.error); } async function N() { - y(u.value); + w(d.value); } - function E(L) { - a("update:modelValue", L); + function E(V) { + a("update:modelValue", V); } function h() { a("done"); } - const C = I(!1), W = I(""), X = { + const C = O(!1), Y = O(""), J = { 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" } }; - St(C, () => { - Lt(X, W, C.value), C.value || setTimeout(h, 700); + bt(C, () => { + yt(J, Y, C.value), C.value || setTimeout(h, 700); }), C.value = !0; - function le() { + function ne() { n.formStyle == "slideOver" ? C.value = !1 : h(); } - const D = (L) => { - L.key === "Escape" && le(); + const D = (V) => { + V.key === "Escape" && ne(); }; - return st(() => window.addEventListener("keydown", D)), zt(() => window.removeEventListener("keydown", D)), (L, fe) => { - var Se, ge, B, q, ne, ye, _e, Me, Re, Te, je; - const pe = G("AutoFormFields"), ie = G("FormLoading"), me = G("PrimaryButton"), S = G("CloseButton"), de = G("SecondaryButton"), Ve = G("ModalLookup"); + return Ye(() => window.addEventListener("keydown", D)), Ft(() => window.removeEventListener("keydown", D)), (V, fe) => { + var Se, ge, H, Q, oe, be, $e, Ae, He, Fe, De; + const pe = Z("AutoFormFields"), ue = Z("FormLoading"), me = Z("PrimaryButton"), S = Z("CloseButton"), ce = Z("SecondaryButton"), Ve = Z("ModalLookup"); return o(), i("div", null, [ - R.value ? L.formStyle == "card" ? (o(), i("div", { + R.value ? V.formStyle == "card" ? (o(), i("div", { key: 1, - class: b(A.value) + class: y(M.value) }, [ l("form", { ref_key: "elForm", - ref: u, - onSubmit: fe[0] || (fe[0] = qe((Pe) => y(Pe.target), ["prevent"])), + ref: d, + onSubmit: fe[0] || (fe[0] = Ue((Oe) => w(Oe.target), ["prevent"])), autocomplete: "off", - class: b(L.innerFormClass) + class: y(V.innerFormClass) }, [ l("div", { - class: b(L.bodyClass) + class: y(V.bodyClass) }, [ l("div", { - class: b(L.headerClass) + class: y(V.headerClass) }, [ - L.$slots.heading ? (o(), i("div", R0, [ - K(L.$slots, "heading") + V.$slots.heading ? (o(), i("div", U0, [ + U(V.$slots, "heading") ])) : (o(), i("h3", { key: 1, - class: b(V.value) - }, P(M.value), 3)), - L.$slots.subheading ? (o(), i("div", E0, [ - K(L.$slots, "subheading") - ])) : L.subHeading ? (o(), i("p", { + class: y(L.value) + }, F(A.value), 3)), + V.$slots.subheading ? (o(), i("div", q0, [ + U(V.$slots, "subheading") + ])) : V.subHeading ? (o(), i("p", { key: 3, - class: b(z.value) - }, P(L.subHeading), 3)) : (Se = R.value) != null && Se.notes ? (o(), i("p", { + class: y(z.value) + }, F(V.subHeading), 3)) : (Se = R.value) != null && Se.notes ? (o(), i("p", { key: 4, - class: b(["notes", z.value]), + class: y(["notes", z.value]), innerHTML: (ge = R.value) == null ? void 0 : ge.notes - }, null, 10, H0)) : x("", !0) + }, null, 10, Q0)) : x("", !0) ], 2), - K(L.$slots, "header", { - instance: (B = Be()) == null ? void 0 : B.exposed, - model: J.value + U(V.$slots, "header", { + instance: (H = Be()) == null ? void 0 : H.exposed, + model: ee.value }), - z0, + K0, (o(), ae(pe, { ref_key: "formFields", ref: r, - key: d.value, - type: L.type, - modelValue: J.value, + key: u.value, + type: V.type, + modelValue: ee.value, "onUpdate:modelValue": E, api: T.value, - configureField: L.configureField, - configureFormLayout: L.configureFormLayout + configureField: V.configureField, + configureFormLayout: V.configureFormLayout }, null, 8, ["type", "modelValue", "api", "configureField", "configureFormLayout"])), - K(L.$slots, "footer", { - instance: (q = Be()) == null ? void 0 : q.exposed, - model: J.value + U(V.$slots, "footer", { + instance: (Q = Be()) == null ? void 0 : Q.exposed, + model: ee.value }) ], 2), - K(L.$slots, "buttons", {}, () => { - var Pe, We; + U(V.$slots, "buttons", {}, () => { + var Oe, We; return [ l("div", { - class: b(Q.value) + class: y(K.value) }, [ l("div", null, [ - K(L.$slots, "leftbuttons", { - instance: (Pe = Be()) == null ? void 0 : Pe.exposed, - model: J.value + U(V.$slots, "leftbuttons", { + instance: (Oe = Be()) == null ? void 0 : Oe.exposed, + model: ee.value }) ]), l("div", null, [ - L.showLoading && U.value ? (o(), ae(ie, { key: 0 })) : x("", !0) + V.showLoading && q.value ? (o(), ae(ue, { key: 0 })) : x("", !0) ]), - l("div", N0, [ - U0, - xe(me, { - disabled: L.allowSubmit ? !L.allowSubmit(J.value) : !1 + l("div", Z0, [ + W0, + ye(me, { + disabled: V.allowSubmit ? !V.allowSubmit(ee.value) : !1 }, { - default: Ce(() => [ - ke(P(L.submitLabel), 1) + default: xe(() => [ + ke(F(V.submitLabel), 1) ]), _: 1 }, 8, ["disabled"]), - K(L.$slots, "rightbuttons", { + U(V.$slots, "rightbuttons", { instance: (We = Be()) == null ? void 0 : We.exposed, - model: J.value + model: ee.value }) ]) ], 2) ]; }) ], 34) - ], 2)) : (o(), i("div", q0, [ - Q0, - l("div", K0, [ + ], 2)) : (o(), i("div", G0, [ + J0, + l("div", X0, [ l("div", { - onMousedown: le, + onMousedown: ne, class: "absolute inset-0 overflow-hidden" }, [ l("div", { - onMousedown: fe[2] || (fe[2] = qe(() => { + onMousedown: fe[2] || (fe[2] = Ue(() => { }, ["stop"])), class: "pointer-events-none fixed inset-y-0 right-0 flex pl-10" }, [ l("div", { - class: b(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", W.value]) + class: y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", Y.value]) }, [ l("form", { ref_key: "elForm", - ref: u, - class: b(ue.value), - onSubmit: fe[1] || (fe[1] = qe((Pe) => y(Pe.target), ["prevent"])) + ref: d, + class: y(ie.value), + onSubmit: fe[1] || (fe[1] = Ue((Oe) => w(Oe.target), ["prevent"])) }, [ - l("div", Z0, [ - l("div", W0, [ - l("div", G0, [ - l("div", J0, [ - l("div", X0, [ - L.$slots.heading ? (o(), i("div", Y0, [ - K(L.$slots, "heading") + l("div", Y0, [ + l("div", ef, [ + l("div", tf, [ + l("div", sf, [ + l("div", lf, [ + V.$slots.heading ? (o(), i("div", nf, [ + U(V.$slots, "heading") ])) : (o(), i("h3", { key: 1, - class: b(V.value) - }, P(M.value), 3)), - L.$slots.subheading ? (o(), i("div", ef, [ - K(L.$slots, "subheading") - ])) : L.subHeading ? (o(), i("p", { + class: y(L.value) + }, F(A.value), 3)), + V.$slots.subheading ? (o(), i("div", of, [ + U(V.$slots, "subheading") + ])) : V.subHeading ? (o(), i("p", { key: 3, - class: b(z.value) - }, P(L.subHeading), 3)) : (ne = R.value) != null && ne.notes ? (o(), i("p", { + class: y(z.value) + }, F(V.subHeading), 3)) : (oe = R.value) != null && oe.notes ? (o(), i("p", { key: 4, - class: b(["notes", z.value]), - innerHTML: (ye = R.value) == null ? void 0 : ye.notes - }, null, 10, tf)) : x("", !0) + class: y(["notes", z.value]), + innerHTML: (be = R.value) == null ? void 0 : be.notes + }, null, 10, af)) : x("", !0) ]), - l("div", sf, [ - xe(S, { + l("div", rf, [ + ye(S, { "button-class": "bg-gray-50 dark:bg-gray-900", - onClose: le + onClose: ne }) ]) ]) ]), - K(L.$slots, "header", { - instance: (_e = Be()) == null ? void 0 : _e.exposed, - model: J.value + U(V.$slots, "header", { + instance: ($e = Be()) == null ? void 0 : $e.exposed, + model: ee.value }), (o(), ae(pe, { ref_key: "formFields", ref: r, - key: d.value, - type: L.type, - modelValue: J.value, + key: u.value, + type: V.type, + modelValue: ee.value, "onUpdate:modelValue": E, api: T.value, - configureField: L.configureField, - configureFormLayout: L.configureFormLayout + configureField: V.configureField, + configureFormLayout: V.configureFormLayout }, null, 8, ["type", "modelValue", "api", "configureField", "configureFormLayout"])), - K(L.$slots, "footer", { - instance: (Me = Be()) == null ? void 0 : Me.exposed, - model: J.value + U(V.$slots, "footer", { + instance: (Ae = Be()) == null ? void 0 : Ae.exposed, + model: ee.value }) ]) ]), l("div", { - class: b(Q.value) + class: y(K.value) }, [ l("div", null, [ - K(L.$slots, "leftbuttons", { - instance: (Re = Be()) == null ? void 0 : Re.exposed, - model: J.value + U(V.$slots, "leftbuttons", { + instance: (He = Be()) == null ? void 0 : He.exposed, + model: ee.value }) ]), l("div", null, [ - L.showLoading && U.value ? (o(), ae(ie, { key: 0 })) : x("", !0) + V.showLoading && q.value ? (o(), ae(ue, { key: 0 })) : x("", !0) ]), - l("div", lf, [ - xe(de, { - onClick: le, - disabled: U.value + l("div", uf, [ + ye(ce, { + onClick: ne, + disabled: q.value }, { - default: Ce(() => [ + default: xe(() => [ ke("Cancel") ]), _: 1 }, 8, ["disabled"]), - xe(me, { + ye(me, { class: "ml-4", - disabled: L.allowSubmit ? !L.allowSubmit(J.value) : !1 + disabled: V.allowSubmit ? !V.allowSubmit(ee.value) : !1 }, { - default: Ce(() => [ - ke(P(L.submitLabel), 1) + default: xe(() => [ + ke(F(V.submitLabel), 1) ]), _: 1 }, 8, ["disabled"]), - K(L.$slots, "rightbuttons", { - instance: (Te = Be()) == null ? void 0 : Te.exposed, - model: J.value + U(V.$slots, "rightbuttons", { + instance: (Fe = Be()) == null ? void 0 : Fe.exposed, + model: ee.value }) ]) ], 2) @@ -5205,14 +5238,14 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ], 32) ], 32) ]) - ])) : (o(), i("div", j0, [ - l("p", O0, [ + ])) : (o(), i("div", E0, [ + l("p", z0, [ ke("Could not create form for unknown "), - B0, - ke(" " + P(se.value), 1) + N0, + ke(" " + F(le.value), 1) ]) ])), - ((je = $.value) == null ? void 0 : je.name) == "ModalLookup" && $.value.ref ? (o(), ae(Ve, { + ((De = $.value) == null ? void 0 : De.name) == "ModalLookup" && $.value.ref ? (o(), ae(Ve, { key: 3, "ref-info": $.value.ref, onDone: g @@ -5220,13 +5253,13 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ]); }; } -}), of = { key: 0 }, af = { class: "text-red-700" }, rf = /* @__PURE__ */ l("b", null, "type", -1), uf = { key: 0 }, df = { key: 2 }, cf = ["innerHTML"], ff = { class: "flex justify-end" }, vf = { +}), cf = { key: 0 }, ff = { class: "text-red-700" }, vf = /* @__PURE__ */ l("b", null, "type", -1), pf = { key: 0 }, mf = { key: 2 }, hf = ["innerHTML"], gf = { class: "flex justify-end" }, yf = { key: 2, class: "relative z-10", "aria-labelledby": "slide-over-title", role: "dialog", "aria-modal": "true" -}, pf = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), mf = { class: "fixed inset-0 overflow-hidden" }, hf = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, gf = { class: "flex-1" }, yf = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, bf = { class: "flex items-start justify-between space-x-3" }, wf = { class: "space-y-1" }, kf = { key: 0 }, _f = { key: 2 }, $f = ["innerHTML"], Cf = { class: "flex h-7 items-center" }, xf = { class: "flex justify-end" }, Lf = /* @__PURE__ */ ce({ +}, bf = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), wf = { class: "fixed inset-0 overflow-hidden" }, kf = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, _f = { class: "flex-1" }, $f = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, Cf = { class: "flex items-start justify-between space-x-3" }, xf = { class: "space-y-1" }, Lf = { key: 0 }, Vf = { key: 2 }, Sf = ["innerHTML"], Mf = { class: "flex h-7 items-center" }, Af = { class: "flex justify-end" }, Tf = /* @__PURE__ */ de({ __name: "AutoCreateForm", props: { type: {}, @@ -5246,143 +5279,143 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b }, emits: ["done", "save", "error"], setup(e, { expose: t, emit: s }) { - const n = e, a = s, r = I(), d = I(1); - function u() { - var L, fe; - d.value++, (L = r.value) == null || L.forceUpdate(); + const n = e, a = s, r = O(), u = O(1); + function d() { + var V, fe; + u.value++, (V = r.value) == null || V.forceUpdate(); const D = Be(); (fe = D == null ? void 0 : D.proxy) == null || fe.$forceUpdate(); } function c(D) { - Object.assign(V.value, D), u(); + Object.assign(L.value, D), d(); } function f(D) { } ss("ModalProvider", { openModal: k }); - const $ = I(), m = I(); - function k(D, L) { - $.value = D, m.value = L; + const $ = O(), m = O(); + function k(D, V) { + $.value = D, m.value = V; } async function g(D) { m.value && m.value(D), $.value = void 0, m.value = void 0; } - const { typeOf: w, typeProperties: j, Crud: H, createDto: re, formValues: F } = rt(), T = v(() => Nt(n.type)), A = v(() => w(T.value)), V = I((() => typeof n.type == "string" ? re(n.type) : n.type ? new n.type() : null)()); - t({ forceUpdate: u, props: n, setModel: c, formFields: r, model: V }); - const z = v(() => n.panelClass || Ze.panelClass(n.formStyle)), Q = v(() => n.formClass || Ze.formClass(n.formStyle)), se = v(() => n.headingClass || Ze.headingClass(n.formStyle)), R = v(() => n.subHeadingClass || Ze.subHeadingClass(n.formStyle)), Z = v(() => n.buttonsClass || Ze.buttonsClass), J = v(() => H.model(A.value)), U = v(() => { + const { typeOf: b, typeProperties: P, Crud: I, createDto: se, formValues: j } = lt(), T = v(() => qt(n.type)), M = v(() => b(T.value)), L = O((() => typeof n.type == "string" ? se(n.type) : n.type ? new n.type() : null)()); + t({ forceUpdate: d, props: n, setModel: c, formFields: r, model: L }); + const z = v(() => n.panelClass || Ee.panelClass(n.formStyle)), K = v(() => n.formClass || Ee.formClass(n.formStyle)), le = v(() => n.headingClass || Ee.headingClass(n.formStyle)), R = v(() => n.subHeadingClass || Ee.subHeadingClass(n.formStyle)), W = v(() => n.buttonsClass || Ee.buttonsClass), ee = v(() => I.model(M.value)), q = v(() => { var D; - return n.heading || ((D = w(T.value)) == null ? void 0 : D.description) || (J.value ? `New ${ze(J.value)}` : ze(T.value)); - }), M = I(new Xe()); - let ee = js(), y = v(() => ee.loading.value); - Y.interceptors.has("AutoCreateForm.new") && Y.interceptors.invoke("AutoCreateForm.new", { props: n, model: V }); + return n.heading || ((D = b(T.value)) == null ? void 0 : D.description) || (ee.value ? `New ${Pe(ee.value)}` : Pe(T.value)); + }), A = O(new Xe()); + let te = Ds(), w = v(() => te.loading.value); + G.interceptors.has("AutoCreateForm.new") && G.interceptors.invoke("AutoCreateForm.new", { props: n, model: L }); async function N(D) { - var ie, me; - let L = D.target; + var ue, me; + let V = D.target; if (!n.autosave) { - a("save", new V.value.constructor(F(L, j(A.value)))); + a("save", new L.value.constructor(j(V, P(M.value)))); return; } - let fe = Qe((ie = V.value) == null ? void 0 : ie.getMethod, (S) => typeof S == "function" ? S() : null) || "POST", pe = Qe((me = V.value) == null ? void 0 : me.createResponse, (S) => typeof S == "function" ? S() : null) == null; + let fe = Ze((ue = L.value) == null ? void 0 : ue.getMethod, (S) => typeof S == "function" ? S() : null) || "POST", pe = Ze((me = L.value) == null ? void 0 : me.createResponse, (S) => typeof S == "function" ? S() : null) == null; if (il.hasRequestBody(fe)) { - let S = new V.value.constructor(), de = new FormData(L); - pe ? M.value = await ee.apiFormVoid(S, de, { jsconfig: "eccn" }) : M.value = await ee.apiForm(S, de, { jsconfig: "eccn" }); + let S = new L.value.constructor(), ce = new FormData(V); + pe ? A.value = await te.apiFormVoid(S, ce, { jsconfig: "eccn" }) : A.value = await te.apiForm(S, ce, { jsconfig: "eccn" }); } else { - let S = F(L, j(A.value)), de = new V.value.constructor(S); - pe ? M.value = await ee.apiVoid(de, { jsconfig: "eccn" }) : M.value = await ee.api(de, { jsconfig: "eccn" }); + let S = j(V, P(M.value)), ce = new L.value.constructor(S); + pe ? A.value = await te.apiVoid(ce, { jsconfig: "eccn" }) : A.value = await te.api(ce, { jsconfig: "eccn" }); } - M.value.succeeded ? (L.reset(), a("save", M.value.response)) : a("error", M.value.error); + A.value.succeeded ? (V.reset(), a("save", A.value.response)) : a("error", A.value.error); } function E() { a("done"); } - const h = I(!1), C = I(""), W = { + const h = O(!1), C = O(""), 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" } }; - St(h, () => { - Lt(W, C, h.value), h.value || setTimeout(E, 700); + bt(h, () => { + yt(Y, C, h.value), h.value || setTimeout(E, 700); }), h.value = !0; - function X() { + function J() { n.formStyle == "slideOver" ? h.value = !1 : E(); } - const le = (D) => { - D.key === "Escape" && X(); + const ne = (D) => { + D.key === "Escape" && J(); }; - return st(() => window.addEventListener("keydown", le)), zt(() => window.removeEventListener("keydown", le)), (D, L) => { - var Ve, Se, ge, B, q, ne, ye, _e, Me; - const fe = G("AutoFormFields"), pe = G("FormLoading"), ie = G("SecondaryButton"), me = G("PrimaryButton"), S = G("CloseButton"), de = G("ModalLookup"); + return Ye(() => window.addEventListener("keydown", ne)), Ft(() => window.removeEventListener("keydown", ne)), (D, V) => { + var Ve, Se, ge, H, Q, oe, be, $e, Ae; + const fe = Z("AutoFormFields"), pe = Z("FormLoading"), ue = Z("SecondaryButton"), me = Z("PrimaryButton"), S = Z("CloseButton"), ce = Z("ModalLookup"); return o(), i("div", null, [ - A.value ? D.formStyle == "card" ? (o(), i("div", { + M.value ? D.formStyle == "card" ? (o(), i("div", { key: 1, - class: b(z.value) + class: y(z.value) }, [ l("form", { - onSubmit: qe(N, ["prevent"]) + onSubmit: Ue(N, ["prevent"]) }, [ l("div", { - class: b(Q.value) + class: y(K.value) }, [ l("div", null, [ - D.$slots.heading ? (o(), i("div", uf, [ - K(D.$slots, "heading") + D.$slots.heading ? (o(), i("div", pf, [ + U(D.$slots, "heading") ])) : (o(), i("h3", { key: 1, - class: b(se.value) - }, P(U.value), 3)), - D.$slots.subheading ? (o(), i("div", df, [ - K(D.$slots, "subheading") + class: y(le.value) + }, F(q.value), 3)), + D.$slots.subheading ? (o(), i("div", mf, [ + U(D.$slots, "subheading") ])) : D.subHeading ? (o(), i("p", { key: 3, - class: b(R.value) - }, P(D.subHeading), 3)) : (Ve = A.value) != null && Ve.notes ? (o(), i("p", { + class: y(R.value) + }, F(D.subHeading), 3)) : (Ve = M.value) != null && Ve.notes ? (o(), i("p", { key: 4, - class: b(["notes", R.value]), - innerHTML: (Se = A.value) == null ? void 0 : Se.notes - }, null, 10, cf)) : x("", !0) + class: y(["notes", R.value]), + innerHTML: (Se = M.value) == null ? void 0 : Se.notes + }, null, 10, hf)) : x("", !0) ]), - K(D.$slots, "header", { + U(D.$slots, "header", { formInstance: (ge = Be()) == null ? void 0 : ge.exposed, - model: V.value + model: L.value }), (o(), ae(fe, { ref_key: "formFields", ref: r, - key: d.value, - modelValue: V.value, + key: u.value, + modelValue: L.value, "onUpdate:modelValue": f, - api: M.value, + api: A.value, configureField: D.configureField, configureFormLayout: D.configureFormLayout }, null, 8, ["modelValue", "api", "configureField", "configureFormLayout"])), - K(D.$slots, "footer", { - formInstance: (B = Be()) == null ? void 0 : B.exposed, - model: V.value + U(D.$slots, "footer", { + formInstance: (H = Be()) == null ? void 0 : H.exposed, + model: L.value }) ], 2), l("div", { - class: b(Z.value) + class: y(W.value) }, [ l("div", null, [ - D.showLoading && te(y) ? (o(), ae(pe, { key: 0 })) : x("", !0) + D.showLoading && X(w) ? (o(), ae(pe, { key: 0 })) : x("", !0) ]), - l("div", ff, [ - D.showCancel ? (o(), ae(ie, { + l("div", gf, [ + D.showCancel ? (o(), ae(ue, { key: 0, - onClick: X, - disabled: te(y) + onClick: J, + disabled: X(w) }, { - default: Ce(() => [ + default: xe(() => [ ke("Cancel") ]), _: 1 }, 8, ["disabled"])) : x("", !0), - xe(me, { + ye(me, { type: "submit", class: "ml-4", - disabled: te(y) + disabled: X(w) }, { - default: Ce(() => [ + default: xe(() => [ ke("Save") ]), _: 1 @@ -5390,98 +5423,98 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ]) ], 2) ], 32) - ], 2)) : (o(), i("div", vf, [ - pf, - l("div", mf, [ + ], 2)) : (o(), i("div", yf, [ + bf, + l("div", wf, [ l("div", { - onMousedown: X, + onMousedown: J, class: "absolute inset-0 overflow-hidden" }, [ l("div", { - onMousedown: L[0] || (L[0] = qe(() => { + onMousedown: V[0] || (V[0] = Ue(() => { }, ["stop"])), class: "pointer-events-none fixed inset-y-0 right-0 flex pl-10" }, [ l("div", { - class: b(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", C.value]) + class: y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", C.value]) }, [ l("form", { - class: b(Q.value), - onSubmit: qe(N, ["prevent"]) + class: y(K.value), + onSubmit: Ue(N, ["prevent"]) }, [ - l("div", hf, [ - l("div", gf, [ - l("div", yf, [ - l("div", bf, [ - l("div", wf, [ - D.$slots.heading ? (o(), i("div", kf, [ - K(D.$slots, "heading") + l("div", kf, [ + l("div", _f, [ + l("div", $f, [ + l("div", Cf, [ + l("div", xf, [ + D.$slots.heading ? (o(), i("div", Lf, [ + U(D.$slots, "heading") ])) : (o(), i("h3", { key: 1, - class: b(se.value) - }, P(U.value), 3)), - D.$slots.subheading ? (o(), i("div", _f, [ - K(D.$slots, "subheading") + class: y(le.value) + }, F(q.value), 3)), + D.$slots.subheading ? (o(), i("div", Vf, [ + U(D.$slots, "subheading") ])) : D.subHeading ? (o(), i("p", { key: 3, - class: b(R.value) - }, P(D.subHeading), 3)) : (q = A.value) != null && q.notes ? (o(), i("p", { + class: y(R.value) + }, F(D.subHeading), 3)) : (Q = M.value) != null && Q.notes ? (o(), i("p", { key: 4, - class: b(["notes", R.value]), - innerHTML: (ne = A.value) == null ? void 0 : ne.notes - }, null, 10, $f)) : x("", !0) + class: y(["notes", R.value]), + innerHTML: (oe = M.value) == null ? void 0 : oe.notes + }, null, 10, Sf)) : x("", !0) ]), - l("div", Cf, [ - xe(S, { + l("div", Mf, [ + ye(S, { "button-class": "bg-gray-50 dark:bg-gray-900", - onClose: X + onClose: J }) ]) ]) ]), - K(D.$slots, "header", { - formInstance: (ye = Be()) == null ? void 0 : ye.exposed, - model: V.value + U(D.$slots, "header", { + formInstance: (be = Be()) == null ? void 0 : be.exposed, + model: L.value }), (o(), ae(fe, { ref_key: "formFields", ref: r, - key: d.value, - modelValue: V.value, + key: u.value, + modelValue: L.value, "onUpdate:modelValue": f, - api: M.value, + api: A.value, configureField: D.configureField, configureFormLayout: D.configureFormLayout }, null, 8, ["modelValue", "api", "configureField", "configureFormLayout"])), - K(D.$slots, "footer", { - formInstance: (_e = Be()) == null ? void 0 : _e.exposed, - model: V.value + U(D.$slots, "footer", { + formInstance: ($e = Be()) == null ? void 0 : $e.exposed, + model: L.value }) ]) ]), l("div", { - class: b(Z.value) + class: y(W.value) }, [ l("div", null, [ - D.showLoading && te(y) ? (o(), ae(pe, { key: 0 })) : x("", !0) + D.showLoading && X(w) ? (o(), ae(pe, { key: 0 })) : x("", !0) ]), - l("div", xf, [ - D.showCancel ? (o(), ae(ie, { + l("div", Af, [ + D.showCancel ? (o(), ae(ue, { key: 0, - onClick: X, - disabled: te(y) + onClick: J, + disabled: X(w) }, { - default: Ce(() => [ + default: xe(() => [ ke("Cancel") ]), _: 1 }, 8, ["disabled"])) : x("", !0), - xe(me, { + ye(me, { type: "submit", class: "ml-4", - disabled: te(y) + disabled: X(w) }, { - default: Ce(() => [ + default: xe(() => [ ke("Save") ]), _: 1 @@ -5493,14 +5526,14 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ], 32) ], 32) ]) - ])) : (o(), i("div", of, [ - l("p", af, [ + ])) : (o(), i("div", cf, [ + l("p", ff, [ ke("Could not create form for unknown "), - rf, - ke(" " + P(T.value), 1) + vf, + ke(" " + F(T.value), 1) ]) ])), - ((Me = $.value) == null ? void 0 : Me.name) == "ModalLookup" && $.value.ref ? (o(), ae(de, { + ((Ae = $.value) == null ? void 0 : Ae.name) == "ModalLookup" && $.value.ref ? (o(), ae(ce, { key: 3, "ref-info": $.value.ref, onDone: g @@ -5508,13 +5541,13 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ]); }; } -}), Vf = { key: 0 }, Sf = { class: "text-red-700" }, Mf = /* @__PURE__ */ l("b", null, "type", -1), Af = { key: 0 }, Tf = { key: 2 }, Ff = ["innerHTML"], If = { class: "flex justify-end" }, Df = { +}), Ff = { key: 0 }, If = { class: "text-red-700" }, jf = /* @__PURE__ */ l("b", null, "type", -1), Of = { key: 0 }, Df = { key: 2 }, Pf = ["innerHTML"], Bf = { class: "flex justify-end" }, Hf = { key: 2, class: "relative z-10", "aria-labelledby": "slide-over-title", role: "dialog", "aria-modal": "true" -}, Pf = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), jf = { class: "fixed inset-0 overflow-hidden" }, Of = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, Bf = { class: "flex-1" }, Rf = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, Ef = { class: "flex items-start justify-between space-x-3" }, Hf = { class: "space-y-1" }, zf = { key: 0 }, Nf = { key: 2 }, Uf = ["innerHTML"], qf = { class: "flex h-7 items-center" }, Qf = { class: "flex justify-end" }, Kf = /* @__PURE__ */ ce({ +}, Rf = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), Ef = { class: "fixed inset-0 overflow-hidden" }, zf = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, Nf = { class: "flex-1" }, Uf = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, qf = { class: "flex items-start justify-between space-x-3" }, Qf = { class: "space-y-1" }, Kf = { key: 0 }, Zf = { key: 2 }, Wf = ["innerHTML"], Gf = { class: "flex h-7 items-center" }, Jf = { class: "flex justify-end" }, Xf = /* @__PURE__ */ de({ __name: "AutoEditForm", props: { modelValue: {}, @@ -5534,185 +5567,185 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b }, emits: ["done", "save", "delete", "error"], setup(e, { expose: t, emit: s }) { - const n = e, a = s, r = I(), d = I(1); - function u() { - var de; - d.value++, se.value = Q(); + const n = e, a = s, r = O(), u = O(1); + function d() { + var ce; + u.value++, le.value = K(); const S = Be(); - (de = S == null ? void 0 : S.proxy) == null || de.$forceUpdate(); + (ce = S == null ? void 0 : S.proxy) == null || ce.$forceUpdate(); } function c(S) { - Object.assign(se.value, S); + Object.assign(le.value, S); } function f(S) { } ss("ModalProvider", { openModal: k }); - const $ = I(), m = I(); - function k(S, de) { - $.value = S, m.value = de; + const $ = O(), m = O(); + function k(S, ce) { + $.value = S, m.value = ce; } async function g(S) { m.value && m.value(S), $.value = void 0, m.value = void 0; } - const { typeOf: w, apiOf: j, typeProperties: H, createFormLayout: re, getPrimaryKey: F, Crud: T, createDto: A, formValues: ue } = rt(), V = v(() => Nt(n.type)), z = v(() => w(V.value)), Q = () => typeof n.type == "string" ? A(n.type, ys(n.modelValue)) : n.type ? new n.type(ys(n.modelValue)) : null, se = I(Q()); - t({ forceUpdate: u, props: n, setModel: c, formFields: r, model: se }); - const R = v(() => n.panelClass || Ze.panelClass(n.formStyle)), Z = v(() => n.formClass || Ze.formClass(n.formStyle)), J = v(() => n.headingClass || Ze.headingClass(n.formStyle)), U = v(() => n.subHeadingClass || Ze.subHeadingClass(n.formStyle)), M = v(() => T.model(z.value)), ee = v(() => { + const { typeOf: b, apiOf: P, typeProperties: I, createFormLayout: se, getPrimaryKey: j, Crud: T, createDto: M, formValues: ie } = lt(), L = v(() => qt(n.type)), z = v(() => b(L.value)), K = () => typeof n.type == "string" ? M(n.type, ys(n.modelValue)) : n.type ? new n.type(ys(n.modelValue)) : null, le = O(K()); + t({ forceUpdate: d, props: n, setModel: c, formFields: r, model: le }); + const R = v(() => n.panelClass || Ee.panelClass(n.formStyle)), W = v(() => n.formClass || Ee.formClass(n.formStyle)), ee = v(() => n.headingClass || Ee.headingClass(n.formStyle)), q = v(() => n.subHeadingClass || Ee.subHeadingClass(n.formStyle)), A = v(() => T.model(z.value)), te = v(() => { var S; - return n.heading || ((S = w(V.value)) == null ? void 0 : S.description) || (M.value ? `Update ${ze(M.value)}` : ze(V.value)); - }), y = I(new Xe()); + return n.heading || ((S = b(L.value)) == null ? void 0 : S.description) || (A.value ? `Update ${Pe(A.value)}` : Pe(L.value)); + }), w = O(new Xe()); let N = Object.assign({}, ys(n.modelValue)); - Y.interceptors.has("AutoEditForm.new") && Y.interceptors.invoke("AutoEditForm.new", { props: n, model: se, origModel: N }); - let E = js(), h = v(() => E.loading.value); - const C = () => Qe(w(T.model(z.value)), (S) => F(S)); - function W(S) { - const { op: de, prop: Ve } = S; - de && (T.isPatch(de) || T.isUpdate(de)) && (S.disabled = Ve == null ? void 0 : Ve.isPrimaryKey), n.configureField && n.configureField(S); - } - async function X(S) { - var B, q; - let de = S.target; + G.interceptors.has("AutoEditForm.new") && G.interceptors.invoke("AutoEditForm.new", { props: n, model: le, origModel: N }); + let E = Ds(), h = v(() => E.loading.value); + const C = () => Ze(b(T.model(z.value)), (S) => j(S)); + function Y(S) { + const { op: ce, prop: Ve } = S; + ce && (T.isPatch(ce) || T.isUpdate(ce)) && (S.disabled = Ve == null ? void 0 : Ve.isPrimaryKey), n.configureField && n.configureField(S); + } + async function J(S) { + var H, Q; + let ce = S.target; if (!n.autosave) { - a("save", new se.value.constructor(ue(de, H(z.value)))); + a("save", new le.value.constructor(ie(ce, I(z.value)))); return; } - let Ve = Qe((B = se.value) == null ? void 0 : B.getMethod, (ne) => typeof ne == "function" ? ne() : null) || "POST", Se = Qe((q = se.value) == null ? void 0 : q.createResponse, (ne) => typeof ne == "function" ? ne() : null) == null, ge = C(); + let Ve = Ze((H = le.value) == null ? void 0 : H.getMethod, (oe) => typeof oe == "function" ? oe() : null) || "POST", Se = Ze((Q = le.value) == null ? void 0 : Q.createResponse, (oe) => typeof oe == "function" ? oe() : null) == null, ge = C(); if (il.hasRequestBody(Ve)) { - let ne = new se.value.constructor(), ye = be(n.modelValue, ge.name), _e = new FormData(de); - ge && !Array.from(_e.keys()).some((je) => je.toLowerCase() == ge.name.toLowerCase()) && _e.append(ge.name, ye); - let Me = []; - const Re = V.value && j(V.value); - if (Re && T.isPatch(Re)) { - let je = re(z.value), Pe = {}; - if (ge && (Pe[ge.name] = ye), je.forEach((Ee) => { - let it = Ee.id, Tt = be(N, it); + let oe = new le.value.constructor(), be = _e(n.modelValue, ge.name), $e = new FormData(ce); + ge && !Array.from($e.keys()).some((De) => De.toLowerCase() == ge.name.toLowerCase()) && $e.append(ge.name, be); + let Ae = []; + const He = L.value && P(L.value); + if (He && T.isPatch(He)) { + let De = se(z.value), Oe = {}; + if (ge && (Oe[ge.name] = be), De.forEach((Re) => { + let it = Re.id, jt = _e(N, it); if (ge && ge.name.toLowerCase() === it.toLowerCase()) return; - let mt = _e.get(it); - Y.interceptors.has("AutoEditForm.save.formLayout") && Y.interceptors.invoke("AutoEditForm.save.formLayout", { origValue: Tt, formLayout: je, input: Ee, newValue: mt }); - let as = mt != null, rs = Ee.type === "checkbox" ? as !== !!Tt : Ee.type === "file" ? as : mt != Tt; - !mt && !Tt && (rs = !1), rs && (mt ? Pe[it] = mt : Ee.type !== "file" && Me.push(it)); - }), Y.interceptors.has("AutoEditForm.save") && Y.interceptors.invoke("AutoEditForm.save", { origModel: N, formLayout: je, dirtyValues: Pe }), Array.from(_e.keys()).filter((Ee) => !Pe[Ee]).forEach((Ee) => _e.delete(Ee)), Array.from(_e.keys()).filter((Ee) => Ee.toLowerCase() != ge.name.toLowerCase()).length == 0 && Me.length == 0) { - ie(); + let ht = $e.get(it); + G.interceptors.has("AutoEditForm.save.formLayout") && G.interceptors.invoke("AutoEditForm.save.formLayout", { origValue: jt, formLayout: De, input: Re, newValue: ht }); + let as = ht != null, rs = Re.type === "checkbox" ? as !== !!jt : Re.type === "file" ? as : ht != jt; + !ht && !jt && (rs = !1), rs && (ht ? Oe[it] = ht : Re.type !== "file" && Ae.push(it)); + }), G.interceptors.has("AutoEditForm.save") && G.interceptors.invoke("AutoEditForm.save", { origModel: N, formLayout: De, dirtyValues: Oe }), Array.from($e.keys()).filter((Re) => !Oe[Re]).forEach((Re) => $e.delete(Re)), Array.from($e.keys()).filter((Re) => Re.toLowerCase() != ge.name.toLowerCase()).length == 0 && Ae.length == 0) { + ue(); return; } } - const Te = Me.length > 0 ? { jsconfig: "eccn", reset: Me } : { jsconfig: "eccn" }; - Se ? y.value = await E.apiFormVoid(ne, _e, Te) : y.value = await E.apiForm(ne, _e, Te); + const Fe = Ae.length > 0 ? { jsconfig: "eccn", reset: Ae } : { jsconfig: "eccn" }; + Se ? w.value = await E.apiFormVoid(oe, $e, Fe) : w.value = await E.apiForm(oe, $e, Fe); } else { - let ne = ue(de, H(z.value)); - ge && !be(ne, ge.name) && (ne[ge.name] = be(n.modelValue, ge.name)); - let ye = new se.value.constructor(ne); - Se ? y.value = await E.apiVoid(ye, { jsconfig: "eccn" }) : y.value = await E.api(ye, { jsconfig: "eccn" }); + let oe = ie(ce, I(z.value)); + ge && !_e(oe, ge.name) && (oe[ge.name] = _e(n.modelValue, ge.name)); + let be = new le.value.constructor(oe); + Se ? w.value = await E.apiVoid(be, { jsconfig: "eccn" }) : w.value = await E.api(be, { jsconfig: "eccn" }); } - y.value.succeeded ? (de.reset(), a("save", y.value.response)) : a("error", y.value.error); + w.value.succeeded ? (ce.reset(), a("save", w.value.response)) : a("error", w.value.error); } - async function le(S) { - let de = C(); - const Ve = de ? be(n.modelValue, de.name) : null; + async function ne(S) { + let ce = C(); + const Ve = ce ? _e(n.modelValue, ce.name) : null; if (!Ve) { - console.error(`Could not find Primary Key for Type ${V.value} (${M.value})`); + console.error(`Could not find Primary Key for Type ${L.value} (${A.value})`); return; } - const Se = { [de.name]: Ve }, ge = typeof n.deleteType == "string" ? A(n.deleteType, Se) : n.deleteType ? new n.deleteType(Se) : null; - Qe(ge.createResponse, (q) => typeof q == "function" ? q() : null) == null ? y.value = await E.apiVoid(ge) : y.value = await E.api(ge), y.value.succeeded ? a("delete", y.value.response) : a("error", y.value.error); + const Se = { [ce.name]: Ve }, ge = typeof n.deleteType == "string" ? M(n.deleteType, Se) : n.deleteType ? new n.deleteType(Se) : null; + Ze(ge.createResponse, (Q) => typeof Q == "function" ? Q() : null) == null ? w.value = await E.apiVoid(ge) : w.value = await E.api(ge), w.value.succeeded ? a("delete", w.value.response) : a("error", w.value.error); } function D() { a("done"); } - const L = I(!1), fe = I(""), pe = { + const V = O(!1), fe = O(""), pe = { 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" } }; - St(L, () => { - Lt(pe, fe, L.value), L.value || setTimeout(D, 700); - }), L.value = !0; - function ie() { - n.formStyle == "slideOver" ? L.value = !1 : D(); + bt(V, () => { + yt(pe, fe, V.value), V.value || setTimeout(D, 700); + }), V.value = !0; + function ue() { + n.formStyle == "slideOver" ? V.value = !1 : D(); } const me = (S) => { - S.key === "Escape" && ie(); + S.key === "Escape" && ue(); }; - return st(() => window.addEventListener("keydown", me)), zt(() => window.removeEventListener("keydown", me)), (S, de) => { - var _e, Me, Re, Te, je, Pe, We, Ee, it; - const Ve = G("AutoFormFields"), Se = G("ConfirmDelete"), ge = G("FormLoading"), B = G("SecondaryButton"), q = G("PrimaryButton"), ne = G("CloseButton"), ye = G("ModalLookup"); + return Ye(() => window.addEventListener("keydown", me)), Ft(() => window.removeEventListener("keydown", me)), (S, ce) => { + var $e, Ae, He, Fe, De, Oe, We, Re, it; + const Ve = Z("AutoFormFields"), Se = Z("ConfirmDelete"), ge = Z("FormLoading"), H = Z("SecondaryButton"), Q = Z("PrimaryButton"), oe = Z("CloseButton"), be = Z("ModalLookup"); return o(), i("div", null, [ z.value ? S.formStyle == "card" ? (o(), i("div", { key: 1, - class: b(R.value) + class: y(R.value) }, [ l("form", { - onSubmit: qe(X, ["prevent"]) + onSubmit: Ue(J, ["prevent"]) }, [ l("div", { - class: b(Z.value) + class: y(W.value) }, [ l("div", null, [ - S.$slots.heading ? (o(), i("div", Af, [ - K(S.$slots, "heading") + S.$slots.heading ? (o(), i("div", Of, [ + U(S.$slots, "heading") ])) : (o(), i("h3", { key: 1, - class: b(J.value) - }, P(ee.value), 3)), - S.$slots.subheading ? (o(), i("div", Tf, [ - K(S.$slots, "subheading") + class: y(ee.value) + }, F(te.value), 3)), + S.$slots.subheading ? (o(), i("div", Df, [ + U(S.$slots, "subheading") ])) : S.subHeading ? (o(), i("p", { key: 3, - class: b(U.value) - }, P(S.subHeading), 3)) : (_e = z.value) != null && _e.notes ? (o(), i("p", { + class: y(q.value) + }, F(S.subHeading), 3)) : ($e = z.value) != null && $e.notes ? (o(), i("p", { key: 4, - class: b(["notes", U.value]), - innerHTML: (Me = z.value) == null ? void 0 : Me.notes - }, null, 10, Ff)) : x("", !0) + class: y(["notes", q.value]), + innerHTML: (Ae = z.value) == null ? void 0 : Ae.notes + }, null, 10, Pf)) : x("", !0) ]), - K(S.$slots, "header", { - formInstance: (Re = Be()) == null ? void 0 : Re.exposed, - model: se.value + U(S.$slots, "header", { + formInstance: (He = Be()) == null ? void 0 : He.exposed, + model: le.value }), (o(), ae(Ve, { ref_key: "formFields", ref: r, - key: d.value, - modelValue: se.value, + key: u.value, + modelValue: le.value, "onUpdate:modelValue": f, - api: y.value, + api: w.value, configureField: S.configureField, configureFormLayout: S.configureFormLayout }, null, 8, ["modelValue", "api", "configureField", "configureFormLayout"])), - K(S.$slots, "footer", { - formInstance: (Te = Be()) == null ? void 0 : Te.exposed, - model: se.value + U(S.$slots, "footer", { + formInstance: (Fe = Be()) == null ? void 0 : Fe.exposed, + model: le.value }) ], 2), l("div", { - class: b(te(Ze).buttonsClass) + class: y(X(Ee).buttonsClass) }, [ l("div", null, [ S.deleteType ? (o(), ae(Se, { key: 0, - onDelete: le + onDelete: ne })) : x("", !0) ]), l("div", null, [ - S.showLoading && te(h) ? (o(), ae(ge, { key: 0 })) : x("", !0) + S.showLoading && X(h) ? (o(), ae(ge, { key: 0 })) : x("", !0) ]), - l("div", If, [ - xe(B, { - onClick: ie, - disabled: te(h) + l("div", Bf, [ + ye(H, { + onClick: ue, + disabled: X(h) }, { - default: Ce(() => [ + default: xe(() => [ ke("Cancel") ]), _: 1 }, 8, ["disabled"]), - xe(q, { + ye(Q, { type: "submit", class: "ml-4", - disabled: te(h) + disabled: X(h) }, { - default: Ce(() => [ + default: xe(() => [ ke("Save") ]), _: 1 @@ -5720,103 +5753,103 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ]) ], 2) ], 32) - ], 2)) : (o(), i("div", Df, [ - Pf, - l("div", jf, [ + ], 2)) : (o(), i("div", Hf, [ + Rf, + l("div", Ef, [ l("div", { - onMousedown: ie, + onMousedown: ue, class: "absolute inset-0 overflow-hidden" }, [ l("div", { - onMousedown: de[0] || (de[0] = qe(() => { + onMousedown: ce[0] || (ce[0] = Ue(() => { }, ["stop"])), class: "pointer-events-none fixed inset-y-0 right-0 flex pl-10" }, [ l("div", { - class: b(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", fe.value]) + class: y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", fe.value]) }, [ l("form", { - class: b(Z.value), - onSubmit: qe(X, ["prevent"]) + class: y(W.value), + onSubmit: Ue(J, ["prevent"]) }, [ - l("div", Of, [ - l("div", Bf, [ - l("div", Rf, [ - l("div", Ef, [ - l("div", Hf, [ - S.$slots.heading ? (o(), i("div", zf, [ - K(S.$slots, "heading") + l("div", zf, [ + l("div", Nf, [ + l("div", Uf, [ + l("div", qf, [ + l("div", Qf, [ + S.$slots.heading ? (o(), i("div", Kf, [ + U(S.$slots, "heading") ])) : (o(), i("h3", { key: 1, - class: b(J.value) - }, P(ee.value), 3)), - S.$slots.subheading ? (o(), i("div", Nf, [ - K(S.$slots, "subheading") + class: y(ee.value) + }, F(te.value), 3)), + S.$slots.subheading ? (o(), i("div", Zf, [ + U(S.$slots, "subheading") ])) : S.subHeading ? (o(), i("p", { key: 3, - class: b(U.value) - }, P(S.subHeading), 3)) : (je = z.value) != null && je.notes ? (o(), i("p", { + class: y(q.value) + }, F(S.subHeading), 3)) : (De = z.value) != null && De.notes ? (o(), i("p", { key: 4, - class: b(["notes", U.value]), - innerHTML: (Pe = z.value) == null ? void 0 : Pe.notes - }, null, 10, Uf)) : x("", !0) + class: y(["notes", q.value]), + innerHTML: (Oe = z.value) == null ? void 0 : Oe.notes + }, null, 10, Wf)) : x("", !0) ]), - l("div", qf, [ - xe(ne, { + l("div", Gf, [ + ye(oe, { "button-class": "bg-gray-50 dark:bg-gray-900", - onClose: ie + onClose: ue }) ]) ]) ]), - K(S.$slots, "header", { + U(S.$slots, "header", { formInstance: (We = Be()) == null ? void 0 : We.exposed, - model: se.value + model: le.value }), (o(), ae(Ve, { ref_key: "formFields", ref: r, - key: d.value, - modelValue: se.value, + key: u.value, + modelValue: le.value, "onUpdate:modelValue": f, - api: y.value, - configureField: W, + api: w.value, + configureField: Y, configureFormLayout: S.configureFormLayout }, null, 8, ["modelValue", "api", "configureFormLayout"])), - K(S.$slots, "footer", { - formInstance: (Ee = Be()) == null ? void 0 : Ee.exposed, - model: se.value + U(S.$slots, "footer", { + formInstance: (Re = Be()) == null ? void 0 : Re.exposed, + model: le.value }) ]) ]), l("div", { - class: b(te(Ze).buttonsClass) + class: y(X(Ee).buttonsClass) }, [ l("div", null, [ S.deleteType ? (o(), ae(Se, { key: 0, - onDelete: le + onDelete: ne })) : x("", !0) ]), l("div", null, [ - S.showLoading && te(h) ? (o(), ae(ge, { key: 0 })) : x("", !0) + S.showLoading && X(h) ? (o(), ae(ge, { key: 0 })) : x("", !0) ]), - l("div", Qf, [ - xe(B, { - onClick: ie, - disabled: te(h) + l("div", Jf, [ + ye(H, { + onClick: ue, + disabled: X(h) }, { - default: Ce(() => [ + default: xe(() => [ ke("Cancel") ]), _: 1 }, 8, ["disabled"]), - xe(q, { + ye(Q, { type: "submit", class: "ml-4", - disabled: te(h) + disabled: X(h) }, { - default: Ce(() => [ + default: xe(() => [ ke("Save") ]), _: 1 @@ -5828,14 +5861,14 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ], 32) ], 32) ]) - ])) : (o(), i("div", Vf, [ - l("p", Sf, [ + ])) : (o(), i("div", Ff, [ + l("p", If, [ ke("Could not create form for unknown "), - Mf, - ke(" " + P(V.value), 1) + jf, + ke(" " + F(L.value), 1) ]) ])), - ((it = $.value) == null ? void 0 : it.name) == "ModalLookup" && $.value.ref ? (o(), ae(ye, { + ((it = $.value) == null ? void 0 : it.name) == "ModalLookup" && $.value.ref ? (o(), ae(be, { key: 3, "ref-info": $.value.ref, onDone: g @@ -5843,44 +5876,185 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ]); }; } -}), Zf = /* @__PURE__ */ l("label", { +}), Yf = { key: 0 }, ev = { class: "text-red-700" }, tv = /* @__PURE__ */ l("b", null, "type", -1), sv = { key: 0 }, lv = { key: 2 }, nv = ["innerHTML"], ov = { + key: 2, + class: "relative z-10", + "aria-labelledby": "slide-over-title", + role: "dialog", + "aria-modal": "true" +}, av = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), rv = { class: "fixed inset-0 overflow-hidden" }, iv = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, uv = { class: "flex-1" }, dv = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, cv = { class: "flex items-start justify-between space-x-3" }, fv = { class: "space-y-1" }, vv = { key: 0 }, pv = { key: 2 }, mv = ["innerHTML"], hv = { class: "flex h-7 items-center" }, gv = /* @__PURE__ */ de({ + __name: "AutoViewForm", + props: { + model: {}, + apis: {}, + typeName: {}, + done: {}, + formStyle: { default: "slideOver" }, + panelClass: {}, + formClass: {}, + headingClass: {}, + subHeadingClass: {}, + heading: {}, + subHeading: {} + }, + emits: ["done"], + setup(e, { emit: t }) { + const s = e, { typeOf: n } = lt(), a = v(() => s.typeName ?? s.apis.dataModel.name), r = v(() => n(a.value)), u = v(() => s.panelClass || Ee.panelClass(s.formStyle)), d = v(() => s.formClass || Ee.formClass(s.formStyle)), c = v(() => s.headingClass || Ee.headingClass(s.formStyle)), f = v(() => s.subHeadingClass || Ee.subHeadingClass(s.formStyle)), p = v(() => { + var I, se; + return s.heading || ((I = n(a.value)) == null ? void 0 : I.description) || ((se = s.model) != null && se.id ? `${Pe(a.value)} ${s.model.id}` : "View " + Pe(a.value)); + }); + G.interceptors.has("AutoViewForm.new") && G.interceptors.invoke("AutoViewForm.new", { props: s }); + function $() { + s.done && s.done(); + } + const m = O(!1), k = O(""), g = { + 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" } + }; + bt(m, () => { + yt(g, k, m.value), m.value || setTimeout($, 700); + }), m.value = !0; + function b() { + s.formStyle == "slideOver" ? m.value = !1 : $(); + } + const P = (I) => { + I.key === "Escape" && b(); + }; + return Ye(() => window.addEventListener("keydown", P)), Ft(() => window.removeEventListener("keydown", P)), (I, se) => { + var M, ie, L, z; + const j = Z("MarkupModel"), T = Z("CloseButton"); + return o(), i("div", null, [ + a.value ? I.formStyle == "card" ? (o(), i("div", { + key: 1, + class: y(u.value) + }, [ + l("div", { + class: y(d.value) + }, [ + l("div", null, [ + I.$slots.heading ? (o(), i("div", sv, [ + U(I.$slots, "heading") + ])) : (o(), i("h3", { + key: 1, + class: y(c.value) + }, F(p.value), 3)), + I.$slots.subheading ? (o(), i("div", lv, [ + U(I.$slots, "subheading") + ])) : I.subHeading ? (o(), i("p", { + key: 3, + class: y(f.value) + }, F(I.subHeading), 3)) : (M = r.value) != null && M.notes ? (o(), i("p", { + key: 4, + class: y(["notes", f.value]), + innerHTML: (ie = r.value) == null ? void 0 : ie.notes + }, null, 10, nv)) : x("", !0) + ]), + ye(j, { value: I.model }, null, 8, ["value"]) + ], 2) + ], 2)) : (o(), i("div", ov, [ + av, + l("div", rv, [ + l("div", { + onMousedown: b, + class: "absolute inset-0 overflow-hidden" + }, [ + l("div", { + onMousedown: se[0] || (se[0] = Ue(() => { + }, ["stop"])), + class: "pointer-events-none fixed inset-y-0 right-0 flex pl-10" + }, [ + l("div", { + class: y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", k.value]) + }, [ + l("div", { + class: y(d.value) + }, [ + l("div", iv, [ + l("div", uv, [ + l("div", dv, [ + l("div", cv, [ + l("div", fv, [ + I.$slots.heading ? (o(), i("div", vv, [ + U(I.$slots, "heading") + ])) : (o(), i("h3", { + key: 1, + class: y(c.value) + }, F(p.value), 3)), + I.$slots.subheading ? (o(), i("div", pv, [ + U(I.$slots, "subheading") + ])) : I.subHeading ? (o(), i("p", { + key: 3, + class: y(f.value) + }, F(I.subHeading), 3)) : (L = r.value) != null && L.notes ? (o(), i("p", { + key: 4, + class: y(["notes", f.value]), + innerHTML: (z = r.value) == null ? void 0 : z.notes + }, null, 10, mv)) : x("", !0) + ]), + l("div", hv, [ + ye(T, { + "button-class": "bg-gray-50 dark:bg-gray-900", + onClose: b + }) + ]) + ]) + ]), + ye(j, { value: I.model }, null, 8, ["value"]) + ]) + ]) + ], 2) + ], 2) + ], 32) + ], 32) + ]) + ])) : (o(), i("div", Yf, [ + l("p", ev, [ + ke("Could not create view for unknown "), + tv, + ke(" " + F(a.value), 1) + ]) + ])) + ]); + }; + } +}), yv = /* @__PURE__ */ l("label", { for: "confirmDelete", class: "ml-2 mr-2 select-none" -}, "confirm", -1), Wf = /* @__PURE__ */ ce({ +}, "confirm", -1), bv = /* @__PURE__ */ de({ __name: "ConfirmDelete", emits: ["delete"], setup(e, { emit: t }) { - let s = I(!1); + let s = O(!1); const n = t, a = () => { s.value && n("delete"); }, r = v(() => [ "select-none inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white", s.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 (d, u) => (o(), i(Ie, null, [ - Ct(l("input", { + return (u, d) => (o(), i(Me, null, [ + Mt(l("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": u[0] || (u[0] = (c) => ln(s) ? s.value = c : s = c) + "onUpdate:modelValue": d[0] || (d[0] = (c) => nn(s) ? s.value = c : s = c) }, null, 512), [ - [ol, te(s)] + [ol, X(s)] ]), - Zf, - l("span", Ae({ - onClick: qe(a, ["prevent"]), + yv, + l("span", Te({ + onClick: Ue(a, ["prevent"]), class: r.value - }, d.$attrs), [ - K(d.$slots, "default", {}, () => [ + }, u.$attrs), [ + U(u.$slots, "default", {}, () => [ ke("Delete") ]) ], 16) ], 64)); } -}), Gf = { +}), wv = { class: "flex", title: "loading..." -}, Jf = { +}, kv = { key: 0, xmlns: "http://www.w3.org/2000/svg", x: "0px", @@ -5888,24 +6062,24 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b width: "24px", height: "30px", viewBox: "0 0 24 30" -}, Xf = /* @__PURE__ */ xs('', 3), Yf = [ - Xf -], ev = { class: "ml-2 mt-1 text-gray-400" }, tv = /* @__PURE__ */ ce({ +}, _v = /* @__PURE__ */ xs('', 3), $v = [ + _v +], Cv = { class: "ml-2 mt-1 text-gray-400" }, xv = /* @__PURE__ */ de({ __name: "FormLoading", props: { icon: { type: Boolean, default: !0 }, text: { default: "loading..." } }, setup(e) { - return Ue("ApiState", void 0), (t, s) => (o(), i("div", Gf, [ - t.icon ? (o(), i("svg", Jf, Yf)) : x("", !0), - l("span", ev, P(t.text), 1) + return Qe("ApiState", void 0), (t, s) => (o(), i("div", wv, [ + t.icon ? (o(), i("svg", kv, $v)) : x("", !0), + l("span", Cv, F(t.text), 1) ])); } -}), sv = ["onClick"], lv = { +}), Lv = ["onClick"], Vv = { key: 3, class: "flex justify-between items-center" -}, nv = { class: "mr-1 select-none" }, ov = ["onClick"], av = /* @__PURE__ */ ce({ +}, Sv = { class: "mr-1 select-none" }, Mv = ["onClick"], Av = /* @__PURE__ */ de({ __name: "DataGrid", props: { items: { default: () => [] }, @@ -5931,20 +6105,20 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b }, emits: ["headerSelected", "rowSelected"], setup(e, { emit: t }) { - const s = e, n = t, a = I(), r = I(null), d = (E) => r.value === E, u = al(), c = (E) => Object.keys(u).find((h) => h.toLowerCase() == E.toLowerCase() + "-header"), f = (E) => Object.keys(u).find((h) => h.toLowerCase() == E.toLowerCase()), p = v(() => Ws(s.items).filter((E) => !!(u[E] || u[E + "-header"]))), { typeOf: $, typeProperties: m } = rt(), k = v(() => Nt(s.type)), g = v(() => $(k.value)), w = v(() => m(g.value)); - function j(E) { - const h = s.headerTitles && be(s.headerTitles, E) || E; + const s = e, n = t, a = O(), r = O(null), u = (E) => r.value === E, d = al(), c = (E) => Object.keys(d).find((h) => h.toLowerCase() == E.toLowerCase() + "-header"), f = (E) => Object.keys(d).find((h) => h.toLowerCase() == E.toLowerCase()), p = v(() => Ws(s.items).filter((E) => !!(d[E] || d[E + "-header"]))), { typeOf: $, typeProperties: m } = lt(), k = v(() => qt(s.type)), g = v(() => $(k.value)), b = v(() => m(g.value)); + function P(E) { + const h = s.headerTitles && _e(s.headerTitles, E) || E; return s.headerTitle ? s.headerTitle(h) : cn(h); } - function H(E) { + function I(E) { const h = E.toLowerCase(); - return w.value.find((C) => C.name.toLowerCase() == h); + return b.value.find((C) => C.name.toLowerCase() == h); } - function re(E) { - const h = H(E); + function se(E) { + const h = I(E); return h != null && h.format ? h.format : (h == null ? void 0 : h.type) == "TimeSpan" || (h == null ? void 0 : h.type) == "TimeOnly" ? { method: "time" } : null; } - const F = { + const j = { xs: "xs:table-cell", sm: "sm:table-cell", md: "md:table-cell", @@ -5954,101 +6128,101 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b never: "" }; function T(E) { - const h = s.visibleFrom && be(s.visibleFrom, E); - return h && Qe(F[h], (C) => `hidden ${C}`); + const h = s.visibleFrom && _e(s.visibleFrom, E); + return h && Ze(j[h], (C) => `hidden ${C}`); } - const A = v(() => s.gridClass ?? he.getGridClass(s.tableStyle)), ue = v(() => s.grid2Class ?? he.getGrid2Class(s.tableStyle)), V = v(() => s.grid3Class ?? he.getGrid3Class(s.tableStyle)), z = v(() => s.grid4Class ?? he.getGrid4Class(s.tableStyle)), Q = v(() => s.tableClass ?? he.getTableClass(s.tableStyle)), se = v(() => s.tbodyClass ?? he.getTbodyClass(s.tbodyClass)), R = v(() => s.theadClass ?? he.getTheadClass(s.tableStyle)), Z = v(() => s.theadRowClass ?? he.getTheadRowClass(s.tableStyle)), J = v(() => s.theadCellClass ?? he.getTheadCellClass(s.tableStyle)); - function U(E, h) { + const M = v(() => s.gridClass ?? he.getGridClass(s.tableStyle)), ie = v(() => s.grid2Class ?? he.getGrid2Class(s.tableStyle)), L = v(() => s.grid3Class ?? he.getGrid3Class(s.tableStyle)), z = v(() => s.grid4Class ?? he.getGrid4Class(s.tableStyle)), K = v(() => s.tableClass ?? he.getTableClass(s.tableStyle)), le = v(() => s.tbodyClass ?? he.getTbodyClass(s.tbodyClass)), R = v(() => s.theadClass ?? he.getTheadClass(s.tableStyle)), W = v(() => s.theadRowClass ?? he.getTheadRowClass(s.tableStyle)), ee = v(() => s.theadCellClass ?? he.getTheadCellClass(s.tableStyle)); + function q(E, h) { return s.rowClass ? s.rowClass(E, h) : he.getTableRowClass(s.tableStyle, h, !!(s.isSelected && s.isSelected(E)), s.isSelected != null); } - function M(E, h) { + function A(E, h) { return s.rowStyle ? s.rowStyle(E, h) : void 0; } - const ee = v(() => { - const E = (typeof s.selectedColumns == "string" ? s.selectedColumns.split(",") : s.selectedColumns) || (p.value.length > 0 ? p.value : Ws(s.items)), h = w.value.reduce((C, W) => (C[W.name.toLowerCase()] = W.format, C), {}); + const te = v(() => { + const E = (typeof s.selectedColumns == "string" ? s.selectedColumns.split(",") : s.selectedColumns) || (p.value.length > 0 ? p.value : Ws(s.items)), h = b.value.reduce((C, Y) => (C[Y.name.toLowerCase()] = Y.format, C), {}); return E.filter((C) => { - var W; - return ((W = h[C.toLowerCase()]) == null ? void 0 : W.method) != "hidden"; + var Y; + return ((Y = h[C.toLowerCase()]) == null ? void 0 : Y.method) != "hidden"; }); }); - function y(E, h) { + function w(E, h) { n("headerSelected", h, E); } function N(E, h, C) { n("rowSelected", C, E); } return (E, h) => { - const C = G("CellFormat"), W = G("PreviewFormat"); + const C = Z("CellFormat"), Y = Z("PreviewFormat"); return E.items.length ? (o(), i("div", { key: 0, ref_key: "refResults", ref: a, - class: b(A.value) + class: y(M.value) }, [ l("div", { - class: b(ue.value) + class: y(ie.value) }, [ l("div", { - class: b(V.value) + class: y(L.value) }, [ l("div", { - class: b(z.value) + class: y(z.value) }, [ l("table", { - class: b(Q.value) + class: y(K.value) }, [ l("thead", { - class: b(R.value) + class: y(R.value) }, [ l("tr", { - class: b(Z.value) + class: y(W.value) }, [ - (o(!0), i(Ie, null, De(ee.value, (X) => (o(), i("td", { - class: b([T(X), J.value, d(X) ? "text-gray-900 dark:text-gray-50" : "text-gray-500 dark:text-gray-400"]) + (o(!0), i(Me, null, je(te.value, (J) => (o(), i("td", { + class: y([T(J), ee.value, u(J) ? "text-gray-900 dark:text-gray-50" : "text-gray-500 dark:text-gray-400"]) }, [ l("div", { - onClick: (le) => y(le, X) + onClick: (ne) => w(ne, J) }, [ - te(u)[X + "-header"] ? K(E.$slots, X + "-header", { + X(d)[J + "-header"] ? U(E.$slots, J + "-header", { key: 0, - column: X - }) : c(X) ? K(E.$slots, c(X), { + column: J + }) : c(J) ? U(E.$slots, c(J), { key: 1, - column: X - }) : te(u).header ? K(E.$slots, "header", { + column: J + }) : X(d).header ? U(E.$slots, "header", { key: 2, - column: X, - label: j(X) - }) : (o(), i("div", lv, [ - l("span", nv, P(j(X)), 1) + column: J, + label: P(J) + }) : (o(), i("div", Vv, [ + l("span", Sv, F(P(J)), 1) ])) - ], 8, sv) + ], 8, Lv) ], 2))), 256)) ], 2) ], 2), l("tbody", { - class: b(se.value) + class: y(le.value) }, [ - (o(!0), i(Ie, null, De(E.items, (X, le) => (o(), i("tr", { - class: b(U(X, le)), - style: nl(M(X, le)), - onClick: (D) => N(D, le, X) + (o(!0), i(Me, null, je(E.items, (J, ne) => (o(), i("tr", { + class: y(q(J, ne)), + style: nl(A(J, ne)), + onClick: (D) => N(D, ne, J) }, [ - (o(!0), i(Ie, null, De(ee.value, (D) => (o(), i("td", { - class: b([T(D), te(he).tableCellClass]) + (o(!0), i(Me, null, je(te.value, (D) => (o(), i("td", { + class: y([T(D), X(he).tableCellClass]) }, [ - te(u)[D] ? K(E.$slots, D, Ot(Ae({ key: 0 }, X))) : f(D) ? K(E.$slots, f(D), Ot(Ae({ key: 1 }, X))) : H(D) ? (o(), ae(C, { + X(d)[D] ? U(E.$slots, D, Rt(Te({ key: 0 }, J))) : f(D) ? U(E.$slots, f(D), Rt(Te({ key: 1 }, J))) : I(D) ? (o(), ae(C, { key: 2, type: g.value, - propType: H(D), - modelValue: X - }, null, 8, ["type", "propType", "modelValue"])) : (o(), ae(W, { + propType: I(D), + modelValue: J + }, null, 8, ["type", "propType", "modelValue"])) : (o(), ae(Y, { key: 3, - value: te(be)(X, D), - format: re(D) + value: X(_e)(J, D), + format: se(D) }, null, 8, ["value", "format"])) ], 2))), 256)) - ], 14, ov))), 256)) + ], 14, Mv))), 256)) ], 2) ], 2) ], 2) @@ -6057,45 +6231,45 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ], 2)) : x("", !0); }; } -}), rv = ce({ +}), Tv = de({ props: { type: Object, propType: Object, modelValue: Object }, setup(e, { attrs: t }) { - const { typeOf: s } = rt(); + const { typeOf: s } = lt(); function n(a) { return a != null && a.format ? a.format : (a == null ? void 0 : a.type) == "TimeSpan" || (a == null ? void 0 : a.type) == "TimeOnly" ? { method: "time" } : null; } return () => { - var H; - const a = n(e.propType), r = be(e.modelValue, e.propType.name), d = Object.assign({}, e, t), u = yt("span", { innerHTML: ts(r, a, d) }), c = Xt(r) && Array.isArray(r) ? yt("span", {}, [ - yt("span", { class: "mr-2" }, `${r.length}`), - u - ]) : u, f = (H = e.propType) == null ? void 0 : H.ref; + var I; + const a = n(e.propType), r = _e(e.modelValue, e.propType.name), u = Object.assign({}, e, t), d = $t("span", { innerHTML: ts(r, a, u) }), c = Xt(r) && Array.isArray(r) ? $t("span", {}, [ + $t("span", { class: "mr-2" }, `${r.length}`), + d + ]) : d, f = (I = e.propType) == null ? void 0 : I.ref; if (!f) return c; - const $ = tt(e.type).find((re) => re.type === f.model); + const $ = st(e.type).find((se) => se.type === f.model); if (!$) return c; - const m = be(e.modelValue, $.name), k = m && f.refLabel && be(m, f.refLabel); + const m = _e(e.modelValue, $.name), k = m && f.refLabel && _e(m, f.refLabel); if (!k) return c; - const g = s(f.model), w = g == null ? void 0 : g.icon, j = w ? yt(Xn, { image: w, class: "w-5 h-5 mr-1" }) : null; - return yt("span", { class: "flex", title: `${f.model} ${r}` }, [ - j, + const g = s(f.model), b = g == null ? void 0 : g.icon, P = b ? $t(eo, { image: b, class: "w-5 h-5 mr-1" }) : null; + return $t("span", { class: "flex", title: `${f.model} ${r}` }, [ + P, k ]); }; } -}), iv = { key: 0 }, uv = { +}), Fv = { key: 0 }, Iv = { key: 0, class: "mr-2" -}, dv = ["innerHTML"], cv = ["innerHTML"], fv = { +}, jv = ["innerHTML"], Ov = ["innerHTML"], Dv = { inheritAttrs: !1 -}, vv = /* @__PURE__ */ ce({ - ...fv, +}, Pv = /* @__PURE__ */ de({ + ...Dv, __name: "PreviewFormat", props: { value: {}, @@ -6108,17 +6282,17 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b }, setup(e) { const t = e, s = v(() => Array.isArray(t.value)); - return (n, a) => te(Xt)(n.value) ? (o(), i("span", iv, [ - n.includeCount && s.value ? (o(), i("span", uv, P(n.value.length), 1)) : x("", !0), + return (n, a) => X(Xt)(n.value) ? (o(), i("span", Fv, [ + n.includeCount && s.value ? (o(), i("span", Iv, F(n.value.length), 1)) : x("", !0), l("span", { - innerHTML: te(ts)(n.value, n.format, n.$attrs) - }, null, 8, dv) + innerHTML: X(ts)(n.value, n.format, n.$attrs) + }, null, 8, jv) ])) : (o(), i("span", { key: 1, - innerHTML: te(ts)(n.value, n.format, n.$attrs) - }, null, 8, cv)); + innerHTML: X(ts)(n.value, n.format, n.$attrs) + }, null, 8, Ov)); } -}), pv = ["innerHTML"], mv = { key: 0 }, hv = /* @__PURE__ */ l("b", null, null, -1), gv = { key: 2 }, yv = /* @__PURE__ */ ce({ +}), Bv = ["innerHTML"], Hv = { key: 0 }, Rv = /* @__PURE__ */ l("b", null, null, -1), Ev = { key: 2 }, zv = /* @__PURE__ */ de({ __name: "HtmlFormat", props: { value: {}, @@ -6127,52 +6301,52 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b classes: { type: Function, default: (e, t, s, n, a) => n } }, setup(e) { - const t = e, s = v(() => Vt(t.value)), n = v(() => Array.isArray(t.value)), a = (c) => cn(c), r = (c) => t.fieldAttrs ? t.fieldAttrs(c) : null, d = v(() => Ws(t.value)), u = (c) => c ? Object.keys(c).map((f) => ({ key: a(f), val: c[f] })) : []; + const t = e, s = v(() => Tt(t.value)), n = v(() => Array.isArray(t.value)), a = (c) => cn(c), r = (c) => t.fieldAttrs ? t.fieldAttrs(c) : null, u = v(() => Ws(t.value)), d = (c) => c ? Object.keys(c).map((f) => ({ key: a(f), val: c[f] })) : []; return (c, f) => { - const p = G("HtmlFormat", !0); + const p = Z("HtmlFormat", !0); return o(), i("div", { - class: b(c.depth == 0 ? "prose html-format" : "") + class: y(c.depth == 0 ? "prose html-format" : "") }, [ s.value ? (o(), i("div", { key: 0, - innerHTML: te(ts)(c.value) - }, null, 8, pv)) : n.value ? (o(), i("div", { + innerHTML: X(ts)(c.value) + }, null, 8, Bv)) : n.value ? (o(), i("div", { key: 1, - class: b(c.classes("array", "div", c.depth, te(he).gridClass)) + class: y(c.classes("array", "div", c.depth, X(he).gridClass)) }, [ - te(Vt)(c.value[0]) ? (o(), i("div", mv, "[ " + P(c.value.join(", ")) + " ]", 1)) : (o(), i("div", { + X(Tt)(c.value[0]) ? (o(), i("div", Hv, "[ " + F(c.value.join(", ")) + " ]", 1)) : (o(), i("div", { key: 1, - class: b(c.classes("array", "div", c.depth, te(he).grid2Class)) + class: y(c.classes("array", "div", c.depth, X(he).grid2Class)) }, [ l("div", { - class: b(c.classes("array", "div", c.depth, te(he).grid3Class)) + class: y(c.classes("array", "div", c.depth, X(he).grid3Class)) }, [ l("div", { - class: b(c.classes("array", "div", c.depth, te(he).grid4Class)) + class: y(c.classes("array", "div", c.depth, X(he).grid4Class)) }, [ l("table", { - class: b(c.classes("object", "table", c.depth, te(he).tableClass)) + class: y(c.classes("object", "table", c.depth, X(he).tableClass)) }, [ l("thead", { - class: b(c.classes("array", "thead", c.depth, te(he).theadClass)) + class: y(c.classes("array", "thead", c.depth, X(he).theadClass)) }, [ l("tr", null, [ - (o(!0), i(Ie, null, De(d.value, ($) => (o(), i("th", { - class: b(c.classes("array", "th", c.depth, te(he).theadCellClass + " whitespace-nowrap")) + (o(!0), i(Me, null, je(u.value, ($) => (o(), i("th", { + class: y(c.classes("array", "th", c.depth, X(he).theadCellClass + " whitespace-nowrap")) }, [ - hv, - ke(P(a($)), 1) + Rv, + ke(F(a($)), 1) ], 2))), 256)) ]) ], 2), l("tbody", null, [ - (o(!0), i(Ie, null, De(c.value, ($, m) => (o(), i("tr", { - class: b(c.classes("array", "tr", c.depth, m % 2 == 0 ? "bg-white" : "bg-gray-50", m)) + (o(!0), i(Me, null, je(c.value, ($, m) => (o(), i("tr", { + class: y(c.classes("array", "tr", c.depth, m % 2 == 0 ? "bg-white" : "bg-gray-50", m)) }, [ - (o(!0), i(Ie, null, De(d.value, (k) => (o(), i("td", { - class: b(c.classes("array", "td", c.depth, te(he).tableCellClass)) + (o(!0), i(Me, null, je(u.value, (k) => (o(), i("td", { + class: y(c.classes("array", "td", c.depth, X(he).tableCellClass)) }, [ - xe(p, Ae({ + ye(p, Te({ value: $[k], "field-attrs": c.fieldAttrs, depth: c.depth + 1, @@ -6185,20 +6359,20 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ], 2) ], 2) ], 2)) - ], 2)) : (o(), i("div", gv, [ + ], 2)) : (o(), i("div", Ev, [ l("table", { - class: b(c.classes("object", "table", c.depth, "table-object")) + class: y(c.classes("object", "table", c.depth, "table-object")) }, [ - (o(!0), i(Ie, null, De(u(c.value), ($) => (o(), i("tr", { - class: b(c.classes("object", "tr", c.depth, "")) + (o(!0), i(Me, null, je(d(c.value), ($) => (o(), i("tr", { + class: y(c.classes("object", "tr", c.depth, "")) }, [ l("th", { - class: b(c.classes("object", "th", c.depth, "align-top py-2 px-4 text-left text-sm font-medium tracking-wider whitespace-nowrap")) - }, P($.key), 3), + class: y(c.classes("object", "th", c.depth, "align-top py-2 px-4 text-left text-sm font-medium tracking-wider whitespace-nowrap")) + }, F($.key), 3), l("td", { - class: b(c.classes("object", "td", c.depth, "align-top py-2 px-4 text-sm")) + class: y(c.classes("object", "td", c.depth, "align-top py-2 px-4 text-sm")) }, [ - xe(p, Ae({ + ye(p, Te({ value: $.val, "field-attrs": c.fieldAttrs, depth: c.depth + 1, @@ -6211,7 +6385,82 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ], 2); }; } -}), bv = { class: "absolute top-0 right-0 pt-4 pr-4" }, wv = /* @__PURE__ */ l("span", { class: "sr-only" }, "Close", -1), kv = /* @__PURE__ */ l("svg", { +}), Nv = ["href"], Uv = ["href", "title"], qv = /* @__PURE__ */ de({ + __name: "MarkupFormat", + props: { + value: {}, + imageClass: { default: "w-8 h-8" } + }, + setup(e) { + const t = e, { getMimeType: s } = La(), n = t.value; + let a = typeof t.value; + const r = a === "string" && n.length ? s(n) : null; + if (a === "string" && n.length) { + const u = n.startsWith("https://") || n.startsWith("http://"); + (u || n[0] === "/") && (r != null && r.startsWith("image/")) ? a = "image" : u && (a = "link"); + } + return (u, d) => { + const c = Z("Icon"), f = Z("HtmlFormat"); + return X(a) == "link" ? (o(), i("a", { + key: 0, + href: u.value, + class: "text-indigo-600" + }, F(u.value), 9, Nv)) : X(a) == "image" ? (o(), i("a", { + key: 1, + href: u.value, + title: u.value, + class: "inline-block" + }, [ + ye(c, { + src: u.value, + class: y(u.imageClass) + }, null, 8, ["src", "class"]) + ], 8, Uv)) : (o(), ae(f, { + key: 2, + value: u.value + }, null, 8, ["value"])); + }; + } +}), Qv = { class: "my-2 w-full" }, Kv = { class: "leading-7" }, Zv = { class: "px-2 text-left align-top" }, Wv = { colspan: "align-top" }, Gv = { class: "my-2 leading-7" }, Jv = { + colspan: "2", + class: "px-2 bg-indigo-700 text-white" +}, Xv = { class: "leading-7" }, Yv = { + colspan: "2", + class: "px-2 align-top" +}, ep = /* @__PURE__ */ de({ + __name: "MarkupModel", + props: { + value: {}, + imageClass: {} + }, + setup(e) { + const t = e, s = Object.keys(t.value), n = {}, a = {}; + return s.forEach((r) => { + const u = t.value[r], d = typeof u; + u == null || d === "function" || d === "symbol" ? n[r] = `(${u == null ? "null" : "t"})` : d === "object" ? a[r] = u : n[r] = u; + }), (r, u) => { + const d = Z("MarkupFormat"); + return o(), i("table", Qv, [ + (o(), i(Me, null, je(n, (c, f) => l("tr", Kv, [ + l("th", Zv, F(X(Pe)(f)), 1), + l("td", Wv, [ + ye(d, { value: c }, null, 8, ["value"]) + ]) + ])), 64)), + (o(), i(Me, null, je(a, (c, f) => (o(), i(Me, null, [ + l("tr", Gv, [ + l("td", Jv, F(X(Pe)(f)), 1) + ]), + l("tr", Xv, [ + l("td", Yv, [ + ye(d, { value: c }, null, 8, ["value"]) + ]) + ]) + ], 64))), 64)) + ]); + }; + } +}), tp = { class: "absolute top-0 right-0 pt-4 pr-4" }, sp = /* @__PURE__ */ l("span", { class: "sr-only" }, "Close", -1), lp = /* @__PURE__ */ l("svg", { class: "h-6 w-6", xmlns: "http://www.w3.org/2000/svg", fill: "none", @@ -6225,31 +6474,31 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b "stroke-width": "2", d: "M6 18L18 6M6 6l12 12" }) -], -1), _v = [ - wv, - kv -], $v = /* @__PURE__ */ ce({ +], -1), np = [ + sp, + lp +], op = /* @__PURE__ */ de({ __name: "CloseButton", props: { buttonClass: { default: "bg-white dark:bg-black" } }, emits: ["close"], setup(e, { emit: t }) { - return (s, n) => (o(), i("div", bv, [ + return (s, n) => (o(), i("div", tp, [ l("button", { type: "button", onClick: n[0] || (n[0] = (a) => s.$emit("close")), - class: b([s.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"]) - }, _v, 2) + class: y([s.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"]) + }, np, 2) ])); } -}), Cv = ["id", "aria-labelledby"], xv = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), Lv = { class: "fixed inset-0 overflow-hidden" }, Vv = { class: "flex h-full flex-col bg-white dark:bg-black shadow-xl" }, Sv = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, Mv = { class: "flex-1" }, Av = { class: "relative bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, Tv = { class: "flex items-start justify-between space-x-3" }, Fv = { class: "space-y-1" }, Iv = { key: 0 }, Dv = ["id"], Pv = { +}), ap = ["id", "aria-labelledby"], rp = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), ip = { class: "fixed inset-0 overflow-hidden" }, up = { class: "flex h-full flex-col bg-white dark:bg-black shadow-xl" }, dp = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, cp = { class: "flex-1" }, fp = { class: "relative bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, vp = { class: "flex items-start justify-between space-x-3" }, pp = { class: "space-y-1" }, mp = { key: 0 }, hp = ["id"], gp = { key: 2, class: "text-sm text-gray-500" -}, jv = { class: "flex h-7 items-center" }, Ov = { +}, yp = { class: "flex h-7 items-center" }, bp = { key: 0, class: "flex-shrink-0 border-t border-gray-200 dark:border-gray-700 px-4 py-5 sm:px-6" -}, Bv = /* @__PURE__ */ ce({ +}, wp = /* @__PURE__ */ de({ __name: "SlideOver", props: { id: { default: "SlideOver" }, @@ -6258,18 +6507,18 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b }, emits: ["done"], setup(e, { emit: t }) { - const s = t, n = I(!1), a = I(""), r = { + const s = t, n = O(!1), a = O(""), r = { 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" } }; - St(n, () => { - Lt(r, a, n.value), n.value || setTimeout(() => s("done"), 700); + bt(n, () => { + yt(r, a, n.value), n.value || setTimeout(() => s("done"), 700); }), n.value = !0; - const d = () => n.value = !1, u = (c) => { - c.key === "Escape" && d(); + const u = () => n.value = !1, d = (c) => { + c.key === "Escape" && u(); }; - return st(() => window.addEventListener("keydown", u)), zt(() => window.removeEventListener("keydown", u)), (c, f) => { - const p = G("CloseButton"); + return Ye(() => window.addEventListener("keydown", d)), Ft(() => window.removeEventListener("keydown", d)), (c, f) => { + const p = Z("CloseButton"); return o(), i("div", { id: c.id, class: "relative z-10", @@ -6277,65 +6526,65 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b role: "dialog", "aria-modal": "true" }, [ - xv, - l("div", Lv, [ + rp, + l("div", ip, [ l("div", { - onMousedown: d, + onMousedown: u, class: "absolute inset-0 overflow-hidden" }, [ l("div", { - onMousedown: f[0] || (f[0] = qe(() => { + onMousedown: f[0] || (f[0] = Ue(() => { }, ["stop"])), class: "pointer-events-none fixed inset-y-0 right-0 flex pl-10" }, [ l("div", { - class: b(["panel pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", a.value]) + class: y(["panel pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", a.value]) }, [ - l("div", Vv, [ - l("div", Sv, [ - l("div", Mv, [ - l("div", Av, [ - l("div", Tv, [ - l("div", Fv, [ - c.$slots.title ? (o(), i("div", Iv, [ - K(c.$slots, "title") + l("div", up, [ + l("div", dp, [ + l("div", cp, [ + l("div", fp, [ + l("div", vp, [ + l("div", pp, [ + c.$slots.title ? (o(), i("div", mp, [ + U(c.$slots, "title") ])) : x("", !0), c.title ? (o(), i("h2", { key: 1, class: "text-lg font-medium text-gray-900 dark:text-gray-50", id: c.id + "-title" - }, P(c.title), 9, Dv)) : x("", !0), - c.$slots.subtitle ? (o(), i("p", Pv, [ - K(c.$slots, "subtitle") + }, F(c.title), 9, hp)) : x("", !0), + c.$slots.subtitle ? (o(), i("p", gp, [ + U(c.$slots, "subtitle") ])) : x("", !0) ]), - l("div", jv, [ - xe(p, { + l("div", yp, [ + ye(p, { "button-class": "bg-gray-50 dark:bg-gray-900", - onClose: d + onClose: u }) ]) ]) ]), l("div", { - class: b(c.contentClass) + class: y(c.contentClass) }, [ - K(c.$slots, "default") + U(c.$slots, "default") ], 2) ]) ]), - c.$slots.footer ? (o(), i("div", Ov, [ - K(c.$slots, "footer") + c.$slots.footer ? (o(), i("div", bp, [ + U(c.$slots, "footer") ])) : x("", !0) ]) ], 2) ], 32) ], 32) ]) - ], 8, Cv); + ], 8, ap); }; } -}), Rv = ["id", "data-transition-for", "aria-labelledby"], Ev = { class: "fixed inset-0 z-10 overflow-y-auto" }, Hv = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, zv = /* @__PURE__ */ l("span", { class: "sr-only" }, "Close", -1), Nv = /* @__PURE__ */ l("svg", { +}), kp = ["id", "data-transition-for", "aria-labelledby"], _p = { class: "fixed inset-0 z-10 overflow-y-auto" }, $p = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, Cp = /* @__PURE__ */ l("span", { class: "sr-only" }, "Close", -1), xp = /* @__PURE__ */ l("svg", { class: "h-6 w-6", xmlns: "http://www.w3.org/2000/svg", fill: "none", @@ -6349,10 +6598,10 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b "stroke-width": "2", d: "M6 18L18 6M6 6l12 12" }) -], -1), Uv = [ - zv, - Nv -], qv = /* @__PURE__ */ ce({ +], -1), Lp = [ + Cp, + xp +], Vp = /* @__PURE__ */ de({ __name: "ModalDialog", props: { id: { default: "ModalDialog" }, @@ -6361,50 +6610,50 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b }, emits: ["done"], setup(e, { emit: t }) { - const s = t, n = I(!1), a = I(""), r = { + const s = t, n = O(!1), a = O(""), r = { entering: { cls: "ease-out duration-300", from: "opacity-0", to: "opacity-100" }, leaving: { cls: "ease-in duration-200", from: "opacity-100", to: "opacity-0" } - }, d = I(""), u = { + }, u = O(""), d = { 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" } }; - St(n, () => { - Lt(r, a, n.value), Lt(u, d, n.value), n.value || setTimeout(() => s("done"), 200); + bt(n, () => { + yt(r, a, n.value), yt(d, u, n.value), n.value || setTimeout(() => s("done"), 200); }), n.value = !0; const c = () => n.value = !1; ss("ModalProvider", { openModal: m }); - const p = I(), $ = I(); - function m(w, j) { - p.value = w, $.value = j; + const p = O(), $ = O(); + function m(b, P) { + p.value = b, $.value = P; } - async function k(w) { - $.value && $.value(w), p.value = void 0, $.value = void 0; + async function k(b) { + $.value && $.value(b), p.value = void 0, $.value = void 0; } - const g = (w) => { - w.key === "Escape" && c(); + const g = (b) => { + b.key === "Escape" && c(); }; - return st(() => window.addEventListener("keydown", g)), zt(() => window.removeEventListener("keydown", g)), (w, j) => { - var re; - const H = G("ModalLookup"); + return Ye(() => window.addEventListener("keydown", g)), Ft(() => window.removeEventListener("keydown", g)), (b, P) => { + var se; + const I = Z("ModalLookup"); return o(), i("div", { - id: w.id, - "data-transition-for": w.id, + id: b.id, + "data-transition-for": b.id, onMousedown: c, class: "relative z-10", - "aria-labelledby": `${w.id}-title`, + "aria-labelledby": `${b.id}-title`, role: "dialog", "aria-modal": "true" }, [ l("div", { - class: b(["fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity", a.value]) + class: y(["fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity", a.value]) }, null, 2), - l("div", Ev, [ - l("div", Hv, [ + l("div", _p, [ + l("div", $p, [ l("div", { - class: b([w.modalClass, w.sizeClass, d.value]), - onMousedown: j[0] || (j[0] = qe(() => { + class: y([b.modalClass, b.sizeClass, u.value]), + onMousedown: P[0] || (P[0] = Ue(() => { }, ["stop"])) }, [ l("div", null, [ @@ -6413,25 +6662,25 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b type: "button", onClick: c, 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" - }, Uv) + }, Lp) ]), - K(w.$slots, "default") + U(b.$slots, "default") ]) ], 34) ]) ]), - ((re = p.value) == null ? void 0 : re.name) == "ModalLookup" && p.value.ref ? (o(), ae(H, { + ((se = p.value) == null ? void 0 : se.name) == "ModalLookup" && p.value.ref ? (o(), ae(I, { key: 0, "ref-info": p.value.ref, onDone: k }, null, 8, ["ref-info"])) : x("", !0) - ], 40, Rv); + ], 40, kp); }; } -}), Qv = { +}), Sp = { class: "pt-2 overflow-auto", style: { "min-height": "620px" } -}, Kv = { class: "mt-3 pl-5 flex flex-wrap items-center" }, Zv = { class: "hidden sm:block text-xl leading-6 font-medium text-gray-900 dark:text-gray-50 mr-3" }, Wv = { class: "hidden md:inline" }, Gv = { class: "flex pb-1 sm:pb-0" }, Jv = ["title"], Xv = /* @__PURE__ */ l("svg", { +}, Mp = { class: "mt-3 pl-5 flex flex-wrap items-center" }, Ap = { class: "hidden sm:block text-xl leading-6 font-medium text-gray-900 dark:text-gray-50 mr-3" }, Tp = { class: "hidden md:inline" }, Fp = { class: "flex pb-1 sm:pb-0" }, Ip = ["title"], jp = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" @@ -6445,9 +6694,9 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b stroke: "currentColor" }) ]) -], -1), Yv = [ - Xv -], ep = ["disabled"], tp = /* @__PURE__ */ l("svg", { +], -1), Op = [ + jp +], Dp = ["disabled"], Pp = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" @@ -6456,9 +6705,9 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b d: "M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z", fill: "currentColor" }) -], -1), sp = [ - tp -], lp = ["disabled"], np = /* @__PURE__ */ l("svg", { +], -1), Bp = [ + Pp +], Hp = ["disabled"], Rp = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" @@ -6467,9 +6716,9 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b d: "M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z", fill: "currentColor" }) -], -1), op = [ - np -], ap = ["disabled"], rp = /* @__PURE__ */ l("svg", { +], -1), Ep = [ + Rp +], zp = ["disabled"], Np = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" @@ -6478,9 +6727,9 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b d: "M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z", fill: "currentColor" }) -], -1), ip = [ - rp -], up = ["disabled"], dp = /* @__PURE__ */ l("svg", { +], -1), Up = [ + Np +], qp = ["disabled"], Qp = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" @@ -6489,15 +6738,15 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b d: "M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z", fill: "currentColor" }) -], -1), cp = [ - dp -], fp = { +], -1), Kp = [ + Qp +], Zp = { key: 0, class: "flex pb-1 sm:pb-0" -}, vp = { class: "px-4 text-lg text-black dark:text-white" }, pp = { key: 0 }, mp = { key: 1 }, hp = /* @__PURE__ */ l("span", { class: "hidden xl:inline" }, " Showing Results ", -1), gp = { key: 2 }, yp = { +}, Wp = { class: "px-4 text-lg text-black dark:text-white" }, Gp = { key: 0 }, Jp = { key: 1 }, Xp = /* @__PURE__ */ l("span", { class: "hidden xl:inline" }, " Showing Results ", -1), Yp = { key: 2 }, em = { key: 1, class: "pl-2" -}, bp = /* @__PURE__ */ l("svg", { +}, tm = /* @__PURE__ */ l("svg", { class: "w-5 h-5", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", @@ -6507,12 +6756,12 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b 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), wp = [ - bp -], kp = { class: "flex pb-1 sm:pb-0" }, _p = { +], -1), sm = [ + tm +], lm = { class: "flex pb-1 sm:pb-0" }, nm = { key: 0, class: "pl-2" -}, $p = /* @__PURE__ */ l("svg", { +}, om = /* @__PURE__ */ l("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", @@ -6524,39 +6773,39 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b 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), Cp = { class: "mr-1" }, xp = { +], -1), am = { class: "mr-1" }, rm = { 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" -}, Lp = /* @__PURE__ */ l("path", { +}, im = /* @__PURE__ */ l("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), Vp = [ - Lp -], Sp = { +}, null, -1), um = [ + im +], dm = { 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" -}, Mp = /* @__PURE__ */ l("path", { +}, cm = /* @__PURE__ */ l("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), Ap = [ - Mp -], Tp = { key: 1 }, Fp = { key: 4 }, Ip = { key: 0 }, Dp = { +}, null, -1), fm = [ + cm +], vm = { key: 1 }, pm = { key: 4 }, mm = { key: 0 }, hm = { key: 0, class: "cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50" -}, Pp = { class: "mr-1 select-none" }, jp = { +}, gm = { class: "mr-1 select-none" }, ym = { key: 1, class: "flex justify-between items-center" -}, Op = { class: "mr-1 select-none" }, sn = 25, Bp = /* @__PURE__ */ ce({ +}, bm = { class: "mr-1 select-none" }, ln = 25, wm = /* @__PURE__ */ de({ __name: "ModalLookup", props: { id: { default: "ModalLookup" }, @@ -6575,53 +6824,53 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b }, emits: ["done"], setup(e, { emit: t }) { - const s = e, n = t, a = al(), { config: r } = At(), { metadataApi: d, filterDefinitions: u } = rt(), c = Ue("client"), f = r.value.storage, p = v(() => s.toolbarButtonClass ?? he.toolbarButtonClass), $ = v(() => u.value), m = I({ take: sn }), k = I(new Xe()), g = I(s.skip), w = I(!1), j = I(), H = (B) => typeof B == "string" ? B.split(",") : B || []; - function re(B, q) { - return he.getTableRowClass("fullWidth", q, !1, !0); - } - function F() { - let B = H(s.selectedColumns); - return B.length > 0 ? B : []; - } - const T = v(() => at(s.refInfo.model)), A = v(() => { - let q = F().map((ye) => ye.toLowerCase()); - const ne = tt(T.value); - return q.length > 0 ? q.map((ye) => ne.find((_e) => _e.name.toLowerCase() === ye)).filter((ye) => ye != null) : ne; - }), ue = v(() => { - let B = A.value.map((ne) => ne.name), q = H(m.value.selectedColumns).map((ne) => ne.toLowerCase()); - return q.length > 0 ? B.filter((ne) => q.includes(ne.toLowerCase())) : B; - }), V = v(() => m.value.take ?? sn), z = v(() => k.value.response ? be(k.value.response, "results") : []), Q = v(() => { - var B; - return ((B = k.value.response) == null ? void 0 : B.total) ?? z.value.length ?? 0; - }), se = v(() => g.value > 0), R = v(() => g.value > 0), Z = v(() => z.value.length >= V.value), J = v(() => z.value.length >= V.value), U = I([]), M = v(() => U.value.some((B) => B.settings.filters.length > 0 || !!B.settings.sort)), ee = v(() => U.value.map((B) => B.settings.filters.length).reduce((B, q) => B + q, 0)), y = v(() => ns(T.value)), N = v(() => { - var B; - return (B = d.value) == null ? void 0 : B.operations.find((q) => { - var ne; - return ((ne = q.dataModel) == null ? void 0 : ne.name) == s.refInfo.model && Ne.isAnyQuery(q); + const s = e, n = t, a = al(), { config: r } = It(), { metadataApi: u, filterDefinitions: d } = lt(), c = Qe("client"), f = r.value.storage, p = v(() => s.toolbarButtonClass ?? he.toolbarButtonClass), $ = v(() => d.value), m = O({ take: ln }), k = O(new Xe()), g = O(s.skip), b = O(!1), P = O(), I = (H) => typeof H == "string" ? H.split(",") : H || []; + function se(H, Q) { + return he.getTableRowClass("fullWidth", Q, !1, !0); + } + function j() { + let H = I(s.selectedColumns); + return H.length > 0 ? H : []; + } + const T = v(() => rt(s.refInfo.model)), M = v(() => { + let Q = j().map((be) => be.toLowerCase()); + const oe = st(T.value); + return Q.length > 0 ? Q.map((be) => oe.find(($e) => $e.name.toLowerCase() === be)).filter((be) => be != null) : oe; + }), ie = v(() => { + let H = M.value.map((oe) => oe.name), Q = I(m.value.selectedColumns).map((oe) => oe.toLowerCase()); + return Q.length > 0 ? H.filter((oe) => Q.includes(oe.toLowerCase())) : H; + }), L = v(() => m.value.take ?? ln), z = v(() => k.value.response ? _e(k.value.response, "results") : []), K = v(() => { + var H; + return ((H = k.value.response) == null ? void 0 : H.total) ?? z.value.length ?? 0; + }), le = v(() => g.value > 0), R = v(() => g.value > 0), W = v(() => z.value.length >= L.value), ee = v(() => z.value.length >= L.value), q = O([]), A = v(() => q.value.some((H) => H.settings.filters.length > 0 || !!H.settings.sort)), te = v(() => q.value.map((H) => H.settings.filters.length).reduce((H, Q) => H + Q, 0)), w = v(() => ns(T.value)), N = v(() => { + var H; + return (H = u.value) == null ? void 0 : H.operations.find((Q) => { + var oe; + return ((oe = Q.dataModel) == null ? void 0 : oe.name) == s.refInfo.model && qe.isAnyQuery(Q); }); - }), E = I(), h = I(!1), C = I(), W = () => `${s.id}/ApiPrefs/${s.refInfo.model}`, X = (B) => `Column/${s.id}:${s.refInfo.model}.${B}`; - async function le(B) { - g.value += B, g.value < 0 && (g.value = 0); - var q = Math.floor(Q.value / V.value) * V.value; - g.value > q && (g.value = q), await de(); + }), E = O(), h = O(!1), C = O(), Y = () => `${s.id}/ApiPrefs/${s.refInfo.model}`, J = (H) => `Column/${s.id}:${s.refInfo.model}.${H}`; + async function ne(H) { + g.value += H, g.value < 0 && (g.value = 0); + var Q = Math.floor(K.value / L.value) * L.value; + g.value > Q && (g.value = Q), await ce(); } - async function D(B, q) { - n("done", B); + async function D(H, Q) { + n("done", H); } - function L() { + function V() { n("done", null); } - function fe(B, q) { - var ye, _e, Me; - let ne = q.target; - if ((ne == null ? void 0 : ne.tagName) !== "TD") { - let Re = (ye = ne == null ? void 0 : ne.closest("TABLE")) == null ? void 0 : ye.getBoundingClientRect(), Te = U.value.find((je) => je.name.toLowerCase() == B.toLowerCase()); - if (Te && Re) { - let je = 318, We = (((_e = q.target) == null ? void 0 : _e.tagName) === "DIV" ? q.target : (Me = q.target) == null ? void 0 : Me.closest("DIV")).getBoundingClientRect(), Ee = je + 25; + function fe(H, Q) { + var be, $e, Ae; + let oe = Q.target; + if ((oe == null ? void 0 : oe.tagName) !== "TD") { + let He = (be = oe == null ? void 0 : oe.closest("TABLE")) == null ? void 0 : be.getBoundingClientRect(), Fe = q.value.find((De) => De.name.toLowerCase() == H.toLowerCase()); + if (Fe && He) { + let De = 318, We = ((($e = Q.target) == null ? void 0 : $e.tagName) === "DIV" ? Q.target : (Ae = Q.target) == null ? void 0 : Ae.closest("DIV")).getBoundingClientRect(), Re = De + 25; C.value = { - column: Te, + column: Fe, topLeft: { - x: Math.max(Math.floor(We.x + 25), Ee), + x: Math.max(Math.floor(We.x + 25), Re), y: Math.floor(115) } }; @@ -6631,212 +6880,212 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b function pe() { C.value = null; } - async function ie(B) { - var ne; - let q = (ne = C.value) == null ? void 0 : ne.column; - q && (q.settings = B, f.setItem(X(q.name), JSON.stringify(q.settings)), await de()), C.value = null; + async function ue(H) { + var oe; + let Q = (oe = C.value) == null ? void 0 : oe.column; + Q && (Q.settings = H, f.setItem(J(Q.name), JSON.stringify(Q.settings)), await ce()), C.value = null; } - async function me(B) { - f.setItem(X(B.name), JSON.stringify(B.settings)), await de(); + async function me(H) { + f.setItem(J(H.name), JSON.stringify(H.settings)), await ce(); } - async function S(B) { - h.value = !1, m.value = B, f.setItem(W(), JSON.stringify(B)), await de(); + async function S(H) { + h.value = !1, m.value = H, f.setItem(Y(), JSON.stringify(H)), await ce(); } - async function de() { + async function ce() { await Ve(Se()); } - async function Ve(B) { - const q = N.value; - if (!q) { + async function Ve(H) { + const Q = N.value; + if (!Q) { console.error(`No Query API was found for ${s.refInfo.model}`); return; } - let ne = Yt(q, B), ye = dn((Re) => { - k.value.response = k.value.error = void 0, w.value = Re; - }), _e = await c.api(ne); - ye(), $t(() => k.value = _e); - let Me = be(_e.response, "results") || []; - !_e.succeeded || Me.label == 0; + let oe = Yt(Q, H), be = dn((He) => { + k.value.response = k.value.error = void 0, b.value = He; + }), $e = await c.api(oe); + be(), St(() => k.value = $e); + let Ae = _e($e.response, "results") || []; + !$e.succeeded || Ae.label == 0; } function Se() { - let B = { + let H = { include: "total", - take: V.value - }, q = H(m.value.selectedColumns || s.selectedColumns); - if (q.length > 0) { - let ye = y.value; - ye && q.includes(ye.name) && (q = [ye.name, ...q]), B.fields = q.join(","); + take: L.value + }, Q = I(m.value.selectedColumns || s.selectedColumns); + if (Q.length > 0) { + let be = w.value; + be && Q.includes(be.name) && (Q = [be.name, ...Q]), H.fields = Q.join(","); } - let ne = []; - return U.value.forEach((ye) => { - ye.settings.sort && ne.push((ye.settings.sort === "DESC" ? "-" : "") + ye.name), ye.settings.filters.forEach((_e) => { - let Me = _e.key.replace("%", ye.name); - B[Me] = _e.value; + let oe = []; + return q.value.forEach((be) => { + be.settings.sort && oe.push((be.settings.sort === "DESC" ? "-" : "") + be.name), be.settings.filters.forEach(($e) => { + let Ae = $e.key.replace("%", be.name); + H[Ae] = $e.value; }); - }), typeof B.skip > "u" && g.value > 0 && (B.skip = g.value), ne.length > 0 && (B.orderBy = ne.join(",")), B; + }), typeof H.skip > "u" && g.value > 0 && (H.skip = g.value), oe.length > 0 && (H.orderBy = oe.join(",")), H; } async function ge() { - U.value.forEach((B) => { - B.settings = { filters: [] }, f.removeItem(X(B.name)); - }), await de(); - } - return st(async () => { - const B = s.prefs || $s(f.getItem(W())); - B && (m.value = B), U.value = A.value.map((q) => ({ - name: q.name, - type: q.type, - meta: q, + q.value.forEach((H) => { + H.settings = { filters: [] }, f.removeItem(J(H.name)); + }), await ce(); + } + return Ye(async () => { + const H = s.prefs || $s(f.getItem(Y())); + H && (m.value = H), q.value = M.value.map((Q) => ({ + name: Q.name, + type: Q.type, + meta: Q, settings: Object.assign( { filters: [] }, - $s(f.getItem(X(q.name))) + $s(f.getItem(J(Q.name))) ) - })), isNaN(s.skip) || (g.value = s.skip), await de(); - }), (B, q) => { - const ne = G("ErrorSummary"), ye = G("Loading"), _e = G("SettingsIcons"), Me = G("DataGrid"), Re = G("ModalDialog"); - return o(), i(Ie, null, [ - B.refInfo ? (o(), ae(Re, { + })), isNaN(s.skip) || (g.value = s.skip), await ce(); + }), (H, Q) => { + const oe = Z("ErrorSummary"), be = Z("Loading"), $e = Z("SettingsIcons"), Ae = Z("DataGrid"), He = Z("ModalDialog"); + return o(), i(Me, null, [ + H.refInfo ? (o(), ae(He, { key: 0, ref_key: "modalDialog", ref: E, - id: B.id, - onDone: L + id: H.id, + onDone: V }, { - default: Ce(() => [ - l("div", Qv, [ - l("div", Kv, [ - l("h3", Zv, [ + default: xe(() => [ + l("div", Sp, [ + l("div", Mp, [ + l("h3", Ap, [ ke(" Select "), - l("span", Wv, P(te(ze)(B.refInfo.model)), 1) + l("span", Tp, F(X(Pe)(H.refInfo.model)), 1) ]), - l("div", Gv, [ - B.showPreferences ? (o(), i("button", { + l("div", Fp, [ + H.showPreferences ? (o(), i("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: `${B.refInfo.model} Preferences`, - onClick: q[0] || (q[0] = (Te) => h.value = !h.value) - }, Yv, 8, Jv)) : x("", !0), - B.showPagingNav ? (o(), i("button", { + title: `${H.refInfo.model} Preferences`, + onClick: Q[0] || (Q[0] = (Fe) => h.value = !h.value) + }, Op, 8, Ip)) : x("", !0), + H.showPagingNav ? (o(), i("button", { key: 1, type: "button", - class: b(["pl-2", se.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", le.value ? "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: !se.value, - onClick: q[1] || (q[1] = (Te) => le(-Q.value)) - }, sp, 10, ep)) : x("", !0), - B.showPagingNav ? (o(), i("button", { + disabled: !le.value, + onClick: Q[1] || (Q[1] = (Fe) => ne(-K.value)) + }, Bp, 10, Dp)) : x("", !0), + H.showPagingNav ? (o(), i("button", { key: 2, type: "button", - class: b(["pl-2", R.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", R.value ? "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: !R.value, - onClick: q[2] || (q[2] = (Te) => le(-V.value)) - }, op, 10, lp)) : x("", !0), - B.showPagingNav ? (o(), i("button", { + onClick: Q[2] || (Q[2] = (Fe) => ne(-L.value)) + }, Ep, 10, Hp)) : x("", !0), + H.showPagingNav ? (o(), i("button", { key: 3, type: "button", - class: b(["pl-2", Z.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", W.value ? "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: !Z.value, - onClick: q[3] || (q[3] = (Te) => le(V.value)) - }, ip, 10, ap)) : x("", !0), - B.showPagingNav ? (o(), i("button", { + disabled: !W.value, + onClick: Q[3] || (Q[3] = (Fe) => ne(L.value)) + }, Up, 10, zp)) : x("", !0), + H.showPagingNav ? (o(), i("button", { key: 4, type: "button", - class: b(["pl-2", J.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", ee.value ? "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: !J.value, - onClick: q[4] || (q[4] = (Te) => le(Q.value)) - }, cp, 10, up)) : x("", !0) + disabled: !ee.value, + onClick: Q[4] || (Q[4] = (Fe) => ne(K.value)) + }, Kp, 10, qp)) : x("", !0) ]), - B.showPagingInfo ? (o(), i("div", fp, [ - l("div", vp, [ - w.value ? (o(), i("span", pp, "Querying...")) : x("", !0), - z.value.length ? (o(), i("span", mp, [ - hp, - ke(" " + P(g.value + 1) + " - " + P(Math.min(g.value + z.value.length, Q.value)) + " ", 1), - l("span", null, " of " + P(Q.value), 1) - ])) : k.value.completed ? (o(), i("span", gp, "No Results")) : x("", !0) + H.showPagingInfo ? (o(), i("div", Zp, [ + l("div", Wp, [ + b.value ? (o(), i("span", Gp, "Querying...")) : x("", !0), + z.value.length ? (o(), i("span", Jp, [ + Xp, + ke(" " + F(g.value + 1) + " - " + F(Math.min(g.value + z.value.length, K.value)) + " ", 1), + l("span", null, " of " + F(K.value), 1) + ])) : k.value.completed ? (o(), i("span", Yp, "No Results")) : x("", !0) ]) ])) : x("", !0), - M.value && B.showResetPreferences ? (o(), i("div", yp, [ + A.value && H.showResetPreferences ? (o(), i("div", em, [ l("button", { type: "button", onClick: ge, title: "Reset Preferences & Filters", - class: b(p.value) - }, wp, 2) + class: y(p.value) + }, sm, 2) ])) : x("", !0), - l("div", kp, [ - B.showFiltersView && ee.value > 0 ? (o(), i("div", _p, [ + l("div", lm, [ + H.showFiltersView && te.value > 0 ? (o(), i("div", nm, [ l("button", { type: "button", - onClick: q[5] || (q[5] = (Te) => j.value = j.value == "filters" ? null : "filters"), - class: b(p.value), + onClick: Q[5] || (Q[5] = (Fe) => P.value = P.value == "filters" ? null : "filters"), + class: y(p.value), "aria-expanded": "false" }, [ - $p, - l("span", Cp, P(ee.value) + " " + P(ee.value == 1 ? "Filter" : "Filters"), 1), - j.value != "filters" ? (o(), i("svg", xp, Vp)) : (o(), i("svg", Sp, Ap)) + om, + l("span", am, F(te.value) + " " + F(te.value == 1 ? "Filter" : "Filters"), 1), + P.value != "filters" ? (o(), i("svg", rm, um)) : (o(), i("svg", dm, fm)) ], 2) ])) : x("", !0) ]) ]), - j.value == "filters" ? (o(), ae(Il, { + P.value == "filters" ? (o(), ae(Il, { key: 0, class: "border-y border-gray-200 dark:border-gray-800 py-8 my-2", definitions: $.value, - columns: U.value, - onDone: q[6] || (q[6] = (Te) => j.value = null), + columns: q.value, + onDone: Q[6] || (Q[6] = (Fe) => P.value = null), onChange: me }, null, 8, ["definitions", "columns"])) : x("", !0), - C.value ? (o(), i("div", Tp, [ - xe(Fl, { + C.value ? (o(), i("div", vm, [ + ye(Fl, { definitions: $.value, column: C.value.column, "top-left": C.value.topLeft, onDone: pe, - onSave: ie + onSave: ue }, null, 8, ["definitions", "column", "top-left"]) ])) : x("", !0), - k.value.error ? (o(), ae(ne, { + k.value.error ? (o(), ae(oe, { key: 2, status: k.value.error - }, null, 8, ["status"])) : w.value ? (o(), ae(ye, { key: 3 })) : (o(), i("div", Fp, [ - z.value.length ? (o(), i("div", Ip, [ - xe(Me, { - id: B.id, + }, null, 8, ["status"])) : b.value ? (o(), ae(be, { key: 3 })) : (o(), i("div", pm, [ + z.value.length ? (o(), i("div", mm, [ + ye(Ae, { + id: H.id, items: z.value, - type: B.refInfo.model, - "selected-columns": ue.value, - onFiltersChanged: de, + type: H.refInfo.model, + "selected-columns": ie.value, + onFiltersChanged: ce, tableStyle: "fullWidth", - rowClass: re, + rowClass: se, onRowSelected: D, onHeaderSelected: fe }, rl({ - header: Ce(({ column: Te, label: je }) => { - var Pe; + header: xe(({ column: Fe, label: De }) => { + var Oe; return [ - B.allowFiltering && (!s.canFilter || s.canFilter(Te)) ? (o(), i("div", Dp, [ - l("span", Pp, P(je), 1), - xe(_e, { - column: U.value.find((We) => We.name.toLowerCase() === Te.toLowerCase()), - "is-open": ((Pe = C.value) == null ? void 0 : Pe.column.name) === Te + H.allowFiltering && (!s.canFilter || s.canFilter(Fe)) ? (o(), i("div", hm, [ + l("span", gm, F(De), 1), + ye($e, { + column: q.value.find((We) => We.name.toLowerCase() === Fe.toLowerCase()), + "is-open": ((Oe = C.value) == null ? void 0 : Oe.column.name) === Fe }, null, 8, ["column", "is-open"]) - ])) : (o(), i("div", jp, [ - l("span", Op, P(je), 1) + ])) : (o(), i("div", ym, [ + l("span", bm, F(De), 1) ])) ]; }), _: 2 }, [ - De(Object.keys(te(a)), (Te) => ({ - name: Te, - fn: Ce((je) => [ - K(B.$slots, Te, Ot(ks(je))) + je(Object.keys(X(a)), (Fe) => ({ + name: Fe, + fn: xe((De) => [ + U(H.$slots, Fe, Rt(ks(De))) ]) })) ]), 1032, ["id", "items", "type", "selected-columns"]) @@ -6846,26 +7095,26 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ]), _: 3 }, 8, ["id"])) : x("", !0), - h.value ? (o(), ae(Dl, { + h.value ? (o(), ae(jl, { key: 1, - columns: A.value, + columns: M.value, prefs: m.value, - onDone: q[7] || (q[7] = (Te) => h.value = !1), + onDone: Q[7] || (Q[7] = (Fe) => h.value = !1), onSave: S }, null, 8, ["columns", "prefs"])) : x("", !0) ], 64); }; } -}), Rp = { class: "sm:hidden" }, Ep = ["for"], Hp = ["id", "name"], zp = ["value"], Np = { class: "hidden sm:block" }, Up = { class: "border-b border-gray-200" }, qp = { +}), km = { class: "sm:hidden" }, _m = ["for"], $m = ["id", "name"], Cm = ["value"], xm = { class: "hidden sm:block" }, Lm = { class: "border-b border-gray-200" }, Vm = { class: "-mb-px flex", "aria-label": "Tabs" -}, Qp = ["onClick"], Kp = /* @__PURE__ */ ce({ +}, Sm = ["onClick"], Mm = /* @__PURE__ */ de({ __name: "Tabs", props: { tabs: {}, id: { default: "tabs" }, param: { default: "tab" }, - label: { type: Function, default: (e) => ze(e) }, + label: { type: Function, default: (e) => Pe(e) }, selected: {}, tabClass: {}, bodyClass: { default: "p-4" }, @@ -6873,63 +7122,63 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b clearQuery: { type: Boolean, default: !1 } }, setup(e) { - const t = e, s = v(() => Object.keys(t.tabs)), n = (p) => t.label ? t.label(p) : ze(p), a = v(() => t.id || "tabs"), r = v(() => t.param || "tab"), d = I(); - function u(p) { - if (d.value = p, t.url) { + const t = e, s = v(() => Object.keys(t.tabs)), n = (p) => t.label ? t.label(p) : Pe(p), a = v(() => t.id || "tabs"), r = v(() => t.param || "tab"), u = O(); + function d(p) { + if (u.value = p, t.url) { const $ = s.value[0]; ul({ tab: p === $ ? void 0 : p }, t.clearQuery); } } function c(p) { - return d.value === p; + return u.value === p; } const f = v(() => `${100 / Object.keys(t.tabs).length}%`); - return st(() => { - if (d.value = t.selected || Object.keys(t.tabs)[0], t.url) { + return Ye(() => { + if (u.value = t.selected || Object.keys(t.tabs)[0], t.url) { const p = location.search ? location.search : location.hash.includes("?") ? "?" + ms(location.hash, "?") : "", m = Zs(p)[r.value]; - m && (d.value = m); + m && (u.value = m); } }), (p, $) => (o(), i("div", null, [ - l("div", Rp, [ + l("div", km, [ l("label", { for: a.value, class: "sr-only" - }, "Select a tab", 8, Ep), + }, "Select a tab", 8, _m), l("select", { id: a.value, name: a.value, class: "block w-full rounded-md border-gray-300 focus:border-indigo-500 focus:ring-indigo-500", onChange: $[0] || ($[0] = (m) => { var k; - return u((k = m.target) == null ? void 0 : k.value); + return d((k = m.target) == null ? void 0 : k.value); }) }, [ - (o(!0), i(Ie, null, De(s.value, (m) => (o(), i("option", { + (o(!0), i(Me, null, je(s.value, (m) => (o(), i("option", { key: m, value: m - }, P(n(m)), 9, zp))), 128)) - ], 40, Hp) + }, F(n(m)), 9, Cm))), 128)) + ], 40, $m) ]), - l("div", Np, [ - l("div", Up, [ - l("nav", qp, [ - (o(!0), i(Ie, null, De(s.value, (m) => (o(), i("a", { + l("div", xm, [ + l("div", Lm, [ + l("nav", Vm, [ + (o(!0), i(Me, null, je(s.value, (m) => (o(), i("a", { href: "#", - onClick: qe((k) => u(m), ["prevent"]), + onClick: Ue((k) => d(m), ["prevent"]), style: nl({ width: f.value }), - class: b([c(m) ? "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", p.tabClass]) - }, P(n(m)), 15, Qp))), 256)) + class: y([c(m) ? "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", p.tabClass]) + }, F(n(m)), 15, Sm))), 256)) ]) ]) ]), l("div", { - class: b(p.bodyClass) + class: y(p.bodyClass) }, [ - (o(), ae(on(p.tabs[d.value]))) + (o(), ae(an(p.tabs[u.value]))) ], 2) ])); } -}), Zp = /* @__PURE__ */ l("svg", { +}), Am = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-4 w-4 text-gray-400", preserveAspectRatio: "xMidYMid meet", @@ -6939,9 +7188,9 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b 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), Wp = [ - Zp -], Gp = /* @__PURE__ */ l("svg", { +], -1), Tm = [ + Am +], Fm = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-4 w-4 text-indigo-600", preserveAspectRatio: "xMidYMid meet", @@ -6951,60 +7200,60 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b 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), Jp = [ - Gp -], Xp = /* @__PURE__ */ ce({ +], -1), Im = [ + Fm +], jm = /* @__PURE__ */ de({ __name: "DarkModeToggle", setup(e) { - const t = typeof document < "u" ? document.documentElement : null, s = () => !!(t != null && t.classList.contains("dark")), n = I(localStorage.getItem("color-scheme") == "dark"); + const t = typeof document < "u" ? document.documentElement : null, s = () => !!(t != null && t.classList.contains("dark")), n = O(localStorage.getItem("color-scheme") == "dark"); function a() { s() ? t == null || t.classList.remove("dark") : t == null || t.classList.add("dark"), n.value = s(), localStorage.setItem("color-scheme", n.value ? "dark" : "light"); } - return (r, d) => (o(), i("button", { + return (r, u) => (o(), i("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: d[0] || (d[0] = (u) => a()) + onClick: u[0] || (u[0] = (d) => a()) }, [ l("span", { - class: b(`${n.value ? "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`) + class: y(`${n.value ? "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`) }, [ l("span", { - class: b(`${n.value ? "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`), + class: y(`${n.value ? "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" - }, Wp, 2), + }, Tm, 2), l("span", { - class: b(`${n.value ? "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`), + class: y(`${n.value ? "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" - }, Jp, 2) + }, Im, 2) ], 2) ])); } -}), Yp = { key: 0 }, e1 = { +}), Om = { key: 0 }, Dm = { key: 1, class: "min-h-full flex flex-col justify-center py-12 sm:px-6 lg:px-8" -}, t1 = { class: "sm:mx-auto sm:w-full sm:max-w-md" }, s1 = { class: "mt-6 text-center text-3xl font-extrabold text-gray-900" }, l1 = { +}, Pm = { class: "sm:mx-auto sm:w-full sm:max-w-md" }, Bm = { class: "mt-6 text-center text-3xl font-extrabold text-gray-900" }, Hm = { key: 0, class: "mt-4 text-center text-sm text-gray-600" -}, n1 = { class: "relative z-0 inline-flex shadow-sm rounded-md" }, o1 = ["onClick"], a1 = { class: "mt-8 sm:mx-auto sm:w-full sm:max-w-md" }, r1 = { class: "bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10" }, i1 = { class: "mt-8" }, u1 = { +}, Rm = { class: "relative z-0 inline-flex shadow-sm rounded-md" }, Em = ["onClick"], zm = { class: "mt-8 sm:mx-auto sm:w-full sm:max-w-md" }, Nm = { class: "bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10" }, Um = { class: "mt-8" }, qm = { key: 1, class: "mt-6" -}, d1 = /* @__PURE__ */ xs('
Or continue with
', 1), c1 = { class: "mt-6 grid grid-cols-3 gap-3" }, f1 = ["href", "title"], v1 = { +}, Qm = /* @__PURE__ */ xs('
Or continue with
', 1), Km = { class: "mt-6 grid grid-cols-3 gap-3" }, Zm = ["href", "title"], Wm = { key: 1, class: "h-5 w-5 text-gray-700", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" -}, p1 = /* @__PURE__ */ l("path", { +}, Gm = /* @__PURE__ */ l("path", { d: "M16 8a5 5 0 1 0 5 5a5 5 0 0 0-5-5z", fill: "currentColor" -}, null, -1), m1 = /* @__PURE__ */ l("path", { +}, null, -1), Jm = /* @__PURE__ */ l("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), h1 = [ - p1, - m1 -], g1 = /* @__PURE__ */ ce({ +}, null, -1), Xm = [ + Gm, + Jm +], Ym = /* @__PURE__ */ de({ __name: "SignIn", props: { provider: {}, @@ -7014,203 +7263,203 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b }, emits: ["login"], setup(e, { emit: t }) { - const s = e, n = t, { getMetadata: a, createDto: r } = rt(), d = js(), u = Ue("client"), { signIn: c } = Tl(), f = a({ assert: !0 }), p = f.plugins.auth, $ = document.baseURI, m = f.app.baseUrl, k = I(r("Authenticate")), g = I(new Xe()), w = I(s.provider); - st(() => { + const s = e, n = t, { getMetadata: a, createDto: r } = lt(), u = Ds(), d = Qe("client"), { signIn: c } = Tl(), f = a({ assert: !0 }), p = f.plugins.auth, $ = document.baseURI, m = f.app.baseUrl, k = O(r("Authenticate")), g = O(new Xe()), b = O(s.provider); + Ye(() => { p == null || p.authProviders.map((R) => R.formLayout).filter((R) => R).forEach((R) => R.forEach( - (Z) => k.value[Z.id] = Z.type === "checkbox" ? !1 : "" + (W) => k.value[W.id] = W.type === "checkbox" ? !1 : "" )); }); - const j = v(() => (p == null ? void 0 : p.authProviders.filter((R) => R.formLayout)) || []), H = v(() => j.value[0] || {}), re = v(() => j.value[Math.max(j.value.length - 1, 0)] || {}), F = v(() => (w.value ? p == null ? void 0 : p.authProviders.find((R) => R.name === w.value) : null) ?? H.value), T = (R) => R === !1 || R === "false"; - function A(R) { + const P = v(() => (p == null ? void 0 : p.authProviders.filter((R) => R.formLayout)) || []), I = v(() => P.value[0] || {}), se = v(() => P.value[Math.max(P.value.length - 1, 0)] || {}), j = v(() => (b.value ? p == null ? void 0 : p.authProviders.find((R) => R.name === b.value) : null) ?? I.value), T = (R) => R === !1 || R === "false"; + function M(R) { return R.label || R.navItem && R.navItem.label; } - const ue = v(() => { + const ie = v(() => { var R; - return (((R = F.value) == null ? void 0 : R.formLayout) || []).map((Z) => { - var J, U; - return Object.assign({}, Z, { - type: (J = Z.type) == null ? void 0 : J.toLowerCase(), - autocomplete: Z.autocomplete || (((U = Z.type) == null ? void 0 : U.toLowerCase()) === "password" ? "current-password" : void 0) || (Z.id.toLowerCase() === "username" ? "username" : void 0), - css: Object.assign({ field: "col-span-12" }, Z.css) + return (((R = j.value) == null ? void 0 : R.formLayout) || []).map((W) => { + var ee, q; + return Object.assign({}, W, { + type: (ee = W.type) == null ? void 0 : ee.toLowerCase(), + autocomplete: W.autocomplete || (((q = W.type) == null ? void 0 : q.toLowerCase()) === "password" ? "current-password" : void 0) || (W.id.toLowerCase() === "username" ? "username" : void 0), + css: Object.assign({ field: "col-span-12" }, W.css) }); }); - }), V = v(() => T(s.oauth) ? [] : (p == null ? void 0 : p.authProviders.filter((R) => R.type === "oauth")) || []), z = v(() => { - let R = jo( - p == null ? void 0 : p.authProviders.filter((J) => J.formLayout && J.formLayout.length > 0), - (J, U) => { - let M = A(U) || ot(U.name); - J[M] = U.name === H.value.name ? "" : U.name; + }), L = v(() => T(s.oauth) ? [] : (p == null ? void 0 : p.authProviders.filter((R) => R.type === "oauth")) || []), z = v(() => { + let R = Ho( + p == null ? void 0 : p.authProviders.filter((ee) => ee.formLayout && ee.formLayout.length > 0), + (ee, q) => { + let A = M(q) || at(q.name); + ee[A] = q.name === I.value.name ? "" : q.name; } ); - const Z = F.value; - return Z && T(s.tabs) && (R = { [A(Z) || ot(Z.name)]: Z }), R; - }), Q = v(() => { - let R = ue.value.map((Z) => Z.id).filter((Z) => Z); + const W = j.value; + return W && T(s.tabs) && (R = { [M(W) || at(W.name)]: W }), R; + }), K = v(() => { + let R = ie.value.map((W) => W.id).filter((W) => W); return g.value.summaryMessage(R); }); - async function se() { - if (k.value.provider = F.value.name, F.value.name === "authsecret" ? (u.headers.set("authsecret", k.value.authsecret), k.value = r("Authenticate")) : F.value.name === "basic" ? (u.setCredentials(k.value.UserName, k.value.Password), k.value = r("Authenticate"), k.value.UserName = null, k.value.Password = null) : (F.value.type === "Bearer" || F.value.name === "jwt") && (u.bearerToken = k.value.BearerToken, k.value = r("Authenticate")), g.value = await d.api(k.value), g.value.succeeded) { + async function le() { + if (k.value.provider = j.value.name, j.value.name === "authsecret" ? (d.headers.set("authsecret", k.value.authsecret), k.value = r("Authenticate")) : j.value.name === "basic" ? (d.setCredentials(k.value.UserName, k.value.Password), k.value = r("Authenticate"), k.value.UserName = null, k.value.Password = null) : (j.value.type === "Bearer" || j.value.name === "jwt") && (d.bearerToken = k.value.BearerToken, k.value = r("Authenticate")), g.value = await u.api(k.value), g.value.succeeded) { const R = g.value.response; c(R), n("login", R), g.value = new Xe(), k.value = r("Authenticate"); } } - return (R, Z) => { - const J = G("ErrorSummary"), U = G("AutoFormFields"), M = G("PrimaryButton"), ee = G("Icon"), y = wo("href"); - return te(p) ? (o(), i("div", e1, [ - l("div", t1, [ - l("h2", s1, P(R.title), 1), - Object.keys(z.value).length > 1 ? (o(), i("p", l1, [ - l("span", n1, [ - (o(!0), i(Ie, null, De(z.value, (N, E) => Ct((o(), i("a", { - onClick: (h) => w.value = N, - class: b([ - N === "" || N === H.value.name ? "rounded-l-md" : N === re.value.name ? "rounded-r-md -ml-px" : "-ml-px", - w.value === N ? "z-10 outline-none ring-1 ring-indigo-500 border-indigo-500" : "", + return (R, W) => { + const ee = Z("ErrorSummary"), q = Z("AutoFormFields"), A = Z("PrimaryButton"), te = Z("Icon"), w = _o("href"); + return X(p) ? (o(), i("div", Dm, [ + l("div", Pm, [ + l("h2", Bm, F(R.title), 1), + Object.keys(z.value).length > 1 ? (o(), i("p", Hm, [ + l("span", Rm, [ + (o(!0), i(Me, null, je(z.value, (N, E) => Mt((o(), i("a", { + onClick: (h) => b.value = N, + class: y([ + N === "" || N === I.value.name ? "rounded-l-md" : N === se.value.name ? "rounded-r-md -ml-px" : "-ml-px", + b.value === N ? "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" ]) }, [ - ke(P(E), 1) - ], 10, o1)), [ - [y, { provider: N }] + ke(F(E), 1) + ], 10, Em)), [ + [w, { provider: N }] ])), 256)) ]) ])) : x("", !0) ]), - l("div", a1, [ - Q.value ? (o(), ae(J, { + l("div", zm, [ + K.value ? (o(), ae(ee, { key: 0, class: "mb-3", - errorSummary: Q.value + errorSummary: K.value }, null, 8, ["errorSummary"])) : x("", !0), - l("div", r1, [ - ue.value.length ? (o(), i("form", { + l("div", Nm, [ + ie.value.length ? (o(), i("form", { key: 0, - onSubmit: qe(se, ["prevent"]) + onSubmit: Ue(le, ["prevent"]) }, [ - xe(U, { + ye(q, { modelValue: k.value, - formLayout: ue.value, + formLayout: ie.value, api: g.value, hideSummary: !0, "divide-class": "", "space-class": "space-y-6" }, null, 8, ["modelValue", "formLayout", "api"]), - l("div", i1, [ - xe(M, { class: "w-full" }, { - default: Ce(() => [ + l("div", Um, [ + ye(A, { class: "w-full" }, { + default: xe(() => [ ke("Sign In") ]), _: 1 }) ]) ], 32)) : x("", !0), - V.value.length ? (o(), i("div", u1, [ - d1, - l("div", c1, [ - (o(!0), i(Ie, null, De(V.value, (N) => (o(), i("div", null, [ + L.value.length ? (o(), i("div", qm, [ + Qm, + l("div", Km, [ + (o(!0), i(Me, null, je(L.value, (N) => (o(), i("div", null, [ l("a", { - href: te(m) + N.navItem.href + "?continue=" + te($), - title: A(N), + href: X(m) + N.navItem.href + "?continue=" + X($), + title: M(N), 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" }, [ - N.icon ? (o(), ae(ee, { + N.icon ? (o(), ae(te, { key: 0, image: N.icon, class: "h-5 w-5 text-gray-700" - }, null, 8, ["image"])) : (o(), i("svg", v1, h1)) - ], 8, f1) + }, null, 8, ["image"])) : (o(), i("svg", Wm, Xm)) + ], 8, Zm) ]))), 256)) ]) ])) : x("", !0) ]) ]) - ])) : (o(), i("div", Yp, "No Auth Plugin")); + ])) : (o(), i("div", Om, "No Auth Plugin")); }; } -}), y1 = ["for"], b1 = { +}), e1 = ["for"], t1 = { key: 1, class: "border border-gray-200 flex justify-between" -}, w1 = { class: "p-2 flex flex-wrap gap-x-4" }, k1 = /* @__PURE__ */ l("title", null, "Bold text (CTRL+B)", -1), _1 = /* @__PURE__ */ l("path", { +}, s1 = { class: "p-2 flex flex-wrap gap-x-4" }, l1 = /* @__PURE__ */ l("title", null, "Bold text (CTRL+B)", -1), n1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79c0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79c0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z" -}, null, -1), $1 = [ - k1, - _1 -], C1 = /* @__PURE__ */ l("title", null, "Italics (CTRL+I)", -1), x1 = /* @__PURE__ */ l("path", { +}, null, -1), o1 = [ + l1, + n1 +], a1 = /* @__PURE__ */ l("title", null, "Italics (CTRL+I)", -1), r1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4h-8z" -}, null, -1), L1 = [ - C1, - x1 -], V1 = /* @__PURE__ */ l("title", null, "Insert Link (CTRL+K)", -1), S1 = /* @__PURE__ */ l("path", { +}, null, -1), i1 = [ + a1, + r1 +], u1 = /* @__PURE__ */ l("title", null, "Insert Link (CTRL+K)", -1), d1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7a5 5 0 0 0-5 5a5 5 0 0 0 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8v2m9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1c0 1.71-1.39 3.1-3.1 3.1h-4V17h4a5 5 0 0 0 5-5a5 5 0 0 0-5-5Z" -}, null, -1), M1 = [ - V1, - S1 -], A1 = /* @__PURE__ */ l("title", null, "Blockquote (CTRL+Q)", -1), T1 = /* @__PURE__ */ l("path", { +}, null, -1), c1 = [ + u1, + d1 +], f1 = /* @__PURE__ */ l("title", null, "Blockquote (CTRL+Q)", -1), v1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "m15 17l2-4h-4V6h7v7l-2 4h-3Zm-9 0l2-4H4V6h7v7l-2 4H6Z" -}, null, -1), F1 = [ - A1, - T1 -], I1 = /* @__PURE__ */ l("title", null, "Insert Image (CTRL+SHIFT+L)", -1), D1 = /* @__PURE__ */ l("path", { +}, null, -1), p1 = [ + f1, + v1 +], m1 = /* @__PURE__ */ l("title", null, "Insert Image (CTRL+SHIFT+L)", -1), h1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M2.992 21A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992ZM20 15V5H4v14L14 9l6 6Zm0 2.828l-6-6L6.828 19H20v-1.172ZM8 11a2 2 0 1 1 0-4a2 2 0 0 1 0 4Z" -}, null, -1), P1 = [ - I1, - D1 -], j1 = /* @__PURE__ */ l("title", null, "Insert Code (CTRL+<)", -1), O1 = /* @__PURE__ */ l("path", { +}, null, -1), g1 = [ + m1, + h1 +], y1 = /* @__PURE__ */ l("title", null, "Insert Code (CTRL+<)", -1), b1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "m8 18l-6-6l6-6l1.425 1.425l-4.6 4.6L9.4 16.6L8 18Zm8 0l-1.425-1.425l4.6-4.6L14.6 7.4L16 6l6 6l-6 6Z" -}, null, -1), B1 = [ - j1, - O1 -], R1 = /* @__PURE__ */ l("title", null, "H2 Heading (CTRL+H)", -1), E1 = /* @__PURE__ */ l("path", { +}, null, -1), w1 = [ + y1, + b1 +], k1 = /* @__PURE__ */ l("title", null, "H2 Heading (CTRL+H)", -1), _1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M7 20V7H2V4h13v3h-5v13H7Zm9 0v-8h-3V9h9v3h-3v8h-3Z" -}, null, -1), H1 = [ - R1, - E1 -], z1 = /* @__PURE__ */ l("title", null, "Numbered List (ALT+1)", -1), N1 = /* @__PURE__ */ l("path", { +}, null, -1), $1 = [ + k1, + _1 +], C1 = /* @__PURE__ */ l("title", null, "Numbered List (ALT+1)", -1), x1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M3 22v-1.5h2.5v-.75H4v-1.5h1.5v-.75H3V16h3q.425 0 .713.288T7 17v1q0 .425-.288.713T6 19q.425 0 .713.288T7 20v1q0 .425-.288.713T6 22H3Zm0-7v-2.75q0-.425.288-.713T4 11.25h1.5v-.75H3V9h3q.425 0 .713.288T7 10v1.75q0 .425-.288.713T6 12.75H4.5v.75H7V15H3Zm1.5-7V3.5H3V2h3v6H4.5ZM9 19v-2h12v2H9Zm0-6v-2h12v2H9Zm0-6V5h12v2H9Z" -}, null, -1), U1 = [ - z1, - N1 -], q1 = /* @__PURE__ */ l("title", null, "Bulleted List (ALT+-)", -1), Q1 = /* @__PURE__ */ l("path", { +}, null, -1), L1 = [ + C1, + x1 +], V1 = /* @__PURE__ */ l("title", null, "Bulleted List (ALT+-)", -1), S1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M9 19v-2h12v2H9Zm0-6v-2h12v2H9Zm0-6V5h12v2H9ZM5 20q-.825 0-1.413-.588T3 18q0-.825.588-1.413T5 16q.825 0 1.413.588T7 18q0 .825-.588 1.413T5 20Zm0-6q-.825 0-1.413-.588T3 12q0-.825.588-1.413T5 10q.825 0 1.413.588T7 12q0 .825-.588 1.413T5 14Zm0-6q-.825 0-1.413-.588T3 6q0-.825.588-1.413T5 4q.825 0 1.413.588T7 6q0 .825-.588 1.413T5 8Z" -}, null, -1), K1 = [ - q1, - Q1 -], Z1 = /* @__PURE__ */ l("title", null, "Strike Through (ALT+S)", -1), W1 = /* @__PURE__ */ l("path", { +}, null, -1), M1 = [ + V1, + S1 +], A1 = /* @__PURE__ */ l("title", null, "Strike Through (ALT+S)", -1), T1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z" -}, null, -1), G1 = [ - Z1, - W1 -], J1 = /* @__PURE__ */ l("title", null, "Undo (CTRL+Z)", -1), X1 = /* @__PURE__ */ l("path", { +}, null, -1), F1 = [ + A1, + T1 +], I1 = /* @__PURE__ */ l("title", null, "Undo (CTRL+Z)", -1), j1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z" -}, null, -1), Y1 = [ - J1, - X1 -], em = /* @__PURE__ */ l("title", null, "Redo (CTRL+SHIFT+Z)", -1), tm = /* @__PURE__ */ l("path", { +}, null, -1), O1 = [ + I1, + j1 +], D1 = /* @__PURE__ */ l("title", null, "Redo (CTRL+SHIFT+Z)", -1), P1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z" -}, null, -1), sm = [ - em, - tm -], lm = { +}, null, -1), B1 = [ + D1, + P1 +], H1 = { key: 0, class: "p-2 flex flex-wrap gap-x-4" -}, nm = ["href"], om = /* @__PURE__ */ l("path", { +}, R1 = ["href"], E1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5c0-2.21-1.79-4-4-4z" -}, null, -1), am = [ - om -], rm = { class: "" }, im = ["name", "id", "label", "value", "rows", "disabled"], um = ["id"], dm = ["id"], Je = "w-5 h-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400", cm = /* @__PURE__ */ ce({ +}, null, -1), z1 = [ + E1 +], N1 = { class: "" }, U1 = ["name", "id", "label", "value", "rows", "disabled"], q1 = ["id"], Q1 = ["id"], Je = "w-5 h-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400", K1 = /* @__PURE__ */ de({ __name: "MarkdownInput", props: { status: {}, @@ -7233,103 +7482,103 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b emits: ["update:modelValue", "close"], setup(e, { expose: t, emit: s }) { const n = e, a = s; - let r = [], d = [], u = Ue("ApiState", void 0); - const c = v(() => pt.call({ responseStatus: n.status ?? (u == null ? void 0 : u.error.value) }, n.id)), f = v(() => n.label ?? ze(ot(n.id))), p = "bold,italics,link,image,blockquote,code,heading,orderedList,unorderedList,strikethrough,undo,redo,help".split(","), $ = v(() => n.hide ? _t(p, n.hide) : _t(p, [])); + let r = [], u = [], d = Qe("ApiState", void 0); + const c = v(() => mt.call({ responseStatus: n.status ?? (d == null ? void 0 : d.error.value) }, n.id)), f = v(() => n.label ?? Pe(at(n.id))), p = "bold,italics,link,image,blockquote,code,heading,orderedList,unorderedList,strikethrough,undo,redo,help".split(","), $ = v(() => n.hide ? Vt(p, n.hide) : Vt(p, [])); function m(h) { return $.value[h]; } - const k = v(() => ["shadow-sm font-mono" + nt.base.replace("rounded-md", ""), c.value ? "text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300" : "text-gray-900 " + nt.valid, n.inputClass]), g = I(); - t({ props: n, textarea: g, updateModelValue: w, selection: H, hasSelection: j, selectionInfo: re, insert: T, replace: F }); - function w(h) { + const k = v(() => ["shadow-sm font-mono" + ot.base.replace("rounded-md", ""), c.value ? "text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300" : "text-gray-900 " + ot.valid, n.inputClass]), g = O(); + t({ props: n, textarea: g, updateModelValue: b, selection: I, hasSelection: P, selectionInfo: se, insert: T, replace: j }); + function b(h) { a("update:modelValue", h); } - function j() { + function P() { return g.value.selectionStart !== g.value.selectionEnd; } - function H() { + function I() { const h = g.value; return h.value.substring(h.selectionStart, h.selectionEnd) || ""; } - function re() { - const h = g.value, C = h.value, W = h.selectionStart, X = C.substring(W, h.selectionEnd) || "", le = C.substring(0, W), D = le.lastIndexOf(` + function se() { + const h = g.value, C = h.value, Y = h.selectionStart, J = C.substring(Y, h.selectionEnd) || "", ne = C.substring(0, Y), D = ne.lastIndexOf(` `); return { value: C, - sel: X, - selPos: W, - beforeSel: le, - afterSel: C.substring(W), + sel: J, + selPos: Y, + beforeSel: ne, + afterSel: C.substring(Y), prevCRPos: D, - beforeCR: D >= 0 ? le.substring(0, D + 1) : "", - afterCR: D >= 0 ? le.substring(D + 1) : "" + beforeCR: D >= 0 ? ne.substring(0, D + 1) : "", + afterCR: D >= 0 ? ne.substring(D + 1) : "" }; } - function F({ value: h, selectionStart: C, selectionEnd: W }) { - W == null && (W = C), w(h), $t(() => { - g.value.focus(), g.value.setSelectionRange(C, W); + function j({ value: h, selectionStart: C, selectionEnd: Y }) { + Y == null && (Y = C), b(h), St(() => { + g.value.focus(), g.value.setSelectionRange(C, Y); }); } - function T(h, C, W = "", { selectionAtEnd: X, offsetStart: le, offsetEnd: D, filterValue: L, filterSelection: fe } = {}) { + function T(h, C, Y = "", { selectionAtEnd: J, offsetStart: ne, offsetEnd: D, filterValue: V, filterSelection: fe } = {}) { const pe = g.value; - let ie = pe.value, me = pe.selectionEnd; - r.push({ value: ie, selectionStart: pe.selectionStart, selectionEnd: pe.selectionEnd }), d = []; - const S = pe.selectionStart, de = pe.selectionEnd; - let Ve = ie.substring(0, S), Se = ie.substring(de); + let ue = pe.value, me = pe.selectionEnd; + r.push({ value: ue, selectionStart: pe.selectionStart, selectionEnd: pe.selectionEnd }), u = []; + const S = pe.selectionStart, ce = pe.selectionEnd; + let Ve = ue.substring(0, S), Se = ue.substring(ce); const ge = h && Ve.endsWith(h) && Se.startsWith(C); - if (S == de) { - if (ge ? (ie = Ve.substring(0, Ve.length - h.length) + Se.substring(C.length), me += -C.length) : (ie = Ve + h + W + C + Se, me += h.length, le = 0, D = (W == null ? void 0 : W.length) || 0, X && (me += D, D = 0)), L) { - var q = { pos: me }; - ie = L(ie, q), me = q.pos; + if (S == ce) { + if (ge ? (ue = Ve.substring(0, Ve.length - h.length) + Se.substring(C.length), me += -C.length) : (ue = Ve + h + Y + C + Se, me += h.length, ne = 0, D = (Y == null ? void 0 : Y.length) || 0, J && (me += D, D = 0)), V) { + var Q = { pos: me }; + ue = V(ue, Q), me = Q.pos; } } else { - var ne = ie.substring(S, de); - fe && (ne = fe(ne)), ge ? (ie = Ve.substring(0, Ve.length - h.length) + ne + Se.substring(C.length), le = -ne.length - h.length, D = ne.length) : (ie = Ve + h + ne + C + Se, le ? me += (h + C).length : (me = S, le = h.length, D = ne.length)); + var oe = ue.substring(S, ce); + fe && (oe = fe(oe)), ge ? (ue = Ve.substring(0, Ve.length - h.length) + oe + Se.substring(C.length), ne = -oe.length - h.length, D = oe.length) : (ue = Ve + h + oe + C + Se, ne ? me += (h + C).length : (me = S, ne = h.length, D = oe.length)); } - w(ie), $t(() => { - pe.focus(), le = me + (le || 0), D = (le || 0) + (D || 0), pe.setSelectionRange(le, D); + b(ue), St(() => { + pe.focus(), ne = me + (ne || 0), D = (ne || 0) + (D || 0), pe.setSelectionRange(ne, D); }); } - const A = () => T("**", "**", "bold"), ue = () => T("_", "_", "italics"), V = () => T("~~", "~~", "strikethrough"), z = () => T("[", "](https://)", "", { offsetStart: -9, offsetEnd: 8 }), Q = () => T(` + const M = () => T("**", "**", "bold"), ie = () => T("_", "_", "italics"), L = () => T("~~", "~~", "strikethrough"), z = () => T("[", "](https://)", "", { offsetStart: -9, offsetEnd: 8 }), K = () => T(` > `, ` -`, "Blockquote", {}), se = () => T("![](", ")"); +`, "Blockquote", {}), le = () => T("![](", ")"); function R(h) { - const C = H(); + const C = I(); if (C && !h.shiftKey) T("`", "`", "code"); else { - const W = n.lang || "js"; + const Y = n.lang || "js"; C.indexOf(` -`) === -1 ? T("\n```" + W + ` -`, "\n```\n", "// code") : T("```" + W + ` +`) === -1 ? T("\n```" + Y + ` +`, "\n```\n", "// code") : T("```" + Y + ` `, "```\n", ""); } } - function Z() { - if (j()) { - let { sel: h, selPos: C, beforeSel: W, afterSel: X, prevCRPos: le, beforeCR: D, afterCR: L } = re(); + function W() { + if (P()) { + let { sel: h, selPos: C, beforeSel: Y, afterSel: J, prevCRPos: ne, beforeCR: D, afterCR: V } = se(); if (h.indexOf(` `) === -1) T(` 1. `, ` `); else if (!h.startsWith(" 1. ")) { - let ie = 1; + let ue = 1; T("", "", " - ", { selectionAtEnd: !0, filterSelection: (me) => " 1. " + me.replace(/\n$/, "").replace(/\n/g, (S) => ` - ${++ie}. `) + ` + ${++ue}. `) + ` ` }); } else T("", "", "", { - filterValue: (ie, me) => { - if (le >= 0) { - let S = L.replace(/^ - /, ""); - W = D + S, me.pos -= L.length - S.length; + filterValue: (ue, me) => { + if (ne >= 0) { + let S = V.replace(/^ - /, ""); + Y = D + S, me.pos -= V.length - S.length; } - return W + X; + return Y + J; }, - filterSelection: (ie) => ie.replace(/^ 1. /g, "").replace(/\n \d+. /g, ` + filterSelection: (ue) => ue.replace(/^ 1. /g, "").replace(/\n \d+. /g, ` `) }); } else @@ -7337,26 +7586,26 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b 1. `, ` `, "List Item", { offsetStart: -10, offsetEnd: 9 }); } - function J() { - if (j()) { - let { sel: h, selPos: C, beforeSel: W, afterSel: X, prevCRPos: le, beforeCR: D, afterCR: L } = re(); + function ee() { + if (P()) { + let { sel: h, selPos: C, beforeSel: Y, afterSel: J, prevCRPos: ne, beforeCR: D, afterCR: V } = se(); h.indexOf(` `) === -1 ? T(` - `, ` `) : !h.startsWith(" - ") ? T("", "", " - ", { selectionAtEnd: !0, - filterSelection: (ie) => " - " + ie.replace(/\n$/, "").replace(/\n/g, ` + filterSelection: (ue) => " - " + ue.replace(/\n$/, "").replace(/\n/g, ` - `) + ` ` }) : T("", "", "", { - filterValue: (ie, me) => { - if (le >= 0) { - let S = L.replace(/^ - /, ""); - W = D + S, me.pos -= L.length - S.length; + filterValue: (ue, me) => { + if (ne >= 0) { + let S = V.replace(/^ - /, ""); + Y = D + S, me.pos -= V.length - S.length; } - return W + X; + return Y + J; }, - filterSelection: (ie) => ie.replace(/^ - /g, "").replace(/\n - /g, ` + filterSelection: (ue) => ue.replace(/^ - /g, "").replace(/\n - /g, ` `) }); } else @@ -7364,8 +7613,8 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b - `, ` `, "List Item", { offsetStart: -10, offsetEnd: 9 }); } - function U() { - const h = H(), C = h.indexOf(` + function q() { + const h = I(), C = h.indexOf(` `) === -1; h ? C ? T(` ## `, ` @@ -7373,75 +7622,75 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ## `, ` `, "Heading", { offsetStart: -8, offsetEnd: 7 }); } - function M() { - let { sel: h, selPos: C, beforeSel: W, afterSel: X, prevCRPos: le, beforeCR: D, afterCR: L } = re(); - !h.startsWith("//") && !L.startsWith("//") ? h ? T("", "", "//", { + function A() { + let { sel: h, selPos: C, beforeSel: Y, afterSel: J, prevCRPos: ne, beforeCR: D, afterCR: V } = se(); + !h.startsWith("//") && !V.startsWith("//") ? h ? T("", "", "//", { selectionAtEnd: !0, filterSelection: (pe) => "//" + pe.replace(/\n$/, "").replace(/\n/g, ` //`) + ` ` - }) : F({ - value: D + "//" + L + X, + }) : j({ + value: D + "//" + V + J, selectionStart: C + 2 }) : T("", "", "", { - filterValue: (pe, ie) => { - if (le >= 0) { - let me = L.replace(/^\/\//, ""); - W = D + me, ie.pos -= L.length - me.length; + filterValue: (pe, ue) => { + if (ne >= 0) { + let me = V.replace(/^\/\//, ""); + Y = D + me, ue.pos -= V.length - me.length; } - return W + X; + return Y + J; }, filterSelection: (pe) => pe.replace(/^\/\//g, "").replace(/\n\/\//g, ` `) }); } - const ee = () => T(`/* + const te = () => T(`/* `, `*/ `, ""); - function y() { + function w() { if (r.length === 0) return !1; const h = g.value, C = r.pop(); - return d.push({ value: h.value, selectionStart: h.selectionStart, selectionEnd: h.selectionEnd }), F(C), !0; + return u.push({ value: h.value, selectionStart: h.selectionStart, selectionEnd: h.selectionEnd }), j(C), !0; } function N() { - if (d.length === 0) + if (u.length === 0) return !1; - const h = g.value, C = d.pop(); - return r.push({ value: h.value, selectionStart: h.selectionStart, selectionEnd: h.selectionEnd }), F(C), !0; + const h = g.value, C = u.pop(); + return r.push({ value: h.value, selectionStart: h.selectionStart, selectionEnd: h.selectionEnd }), j(C), !0; } const E = () => null; - return st(() => { - r = [], d = []; + return Ye(() => { + r = [], u = []; const h = g.value; h.onkeydown = (C) => { if (C.key === "Escape" || C.keyCode === 27) { a("close"); return; } - const W = String.fromCharCode(C.keyCode).toLowerCase(); - W === " " ? (!C.shiftKey ? T("", "", " ", { + const Y = String.fromCharCode(C.keyCode).toLowerCase(); + Y === " " ? (!C.shiftKey ? T("", "", " ", { selectionAtEnd: !0, - filterSelection: (le) => " " + le.replace(/\n$/, "").replace(/\n/g, ` + filterSelection: (ne) => " " + ne.replace(/\n$/, "").replace(/\n/g, ` `) + ` ` }) : T("", "", "", { - filterValue: (le, D) => { - let { selPos: L, beforeSel: fe, afterSel: pe, prevCRPos: ie, beforeCR: me, afterCR: S } = re(); - if (ie >= 0) { - let de = S.replace(/\t/g, " ").replace(/^ ? ? ? ?/, ""); - fe = me + de, D.pos -= S.length - de.length; + filterValue: (ne, D) => { + let { selPos: V, beforeSel: fe, afterSel: pe, prevCRPos: ue, beforeCR: me, afterCR: S } = se(); + if (ue >= 0) { + let ce = S.replace(/\t/g, " ").replace(/^ ? ? ? ?/, ""); + fe = me + ce, D.pos -= S.length - ce.length; } return fe + pe; }, - filterSelection: (le) => le.replace(/\t/g, " ").replace(/^ ? ? ? ?/g, "").replace(/\n /g, ` + filterSelection: (ne) => ne.replace(/\t/g, " ").replace(/^ ? ? ? ?/g, "").replace(/\n /g, ` `) - }), C.preventDefault()) : C.ctrlKey ? W === "z" ? C.shiftKey ? N() && C.preventDefault() : y() && C.preventDefault() : W === "b" && !C.shiftKey ? (A(), C.preventDefault()) : W === "h" && !C.shiftKey ? (U(), C.preventDefault()) : W === "i" && !C.shiftKey ? (ue(), C.preventDefault()) : W === "q" && !C.shiftKey ? (Q(), C.preventDefault()) : W === "k" ? C.shiftKey ? (se(), C.preventDefault()) : (z(), C.preventDefault()) : W === "," || C.key === "<" || C.key === ">" || C.keyCode === 188 ? (R(C), C.preventDefault()) : W === "/" || C.key === "/" ? (M(), C.preventDefault()) : (W === "?" || C.key === "?") && C.shiftKey && (ee(), C.preventDefault()) : C.altKey && (C.key === "1" || C.key === "0" ? (Z(), C.preventDefault()) : C.key === "-" ? (J(), C.preventDefault()) : C.key === "s" && (V(), C.preventDefault())); + }), C.preventDefault()) : C.ctrlKey ? Y === "z" ? C.shiftKey ? N() && C.preventDefault() : w() && C.preventDefault() : Y === "b" && !C.shiftKey ? (M(), C.preventDefault()) : Y === "h" && !C.shiftKey ? (q(), C.preventDefault()) : Y === "i" && !C.shiftKey ? (ie(), C.preventDefault()) : Y === "q" && !C.shiftKey ? (K(), C.preventDefault()) : Y === "k" ? C.shiftKey ? (le(), C.preventDefault()) : (z(), C.preventDefault()) : Y === "," || C.key === "<" || C.key === ">" || C.keyCode === 188 ? (R(C), C.preventDefault()) : Y === "/" || C.key === "/" ? (A(), C.preventDefault()) : (Y === "?" || C.key === "?") && C.shiftKey && (te(), C.preventDefault()) : C.altKey && (C.key === "1" || C.key === "0" ? (W(), C.preventDefault()) : C.key === "-" ? (ee(), C.preventDefault()) : C.key === "s" && (L(), C.preventDefault())); }; }), (h, C) => { - var W; + var Y; return o(), i("div", null, [ - K(h.$slots, "header", Ae({ + U(h.$slots, "header", Te({ inputElement: g.value, id: h.id, modelValue: h.modelValue, @@ -7450,124 +7699,124 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b f.value ? (o(), i("label", { key: 0, for: h.id, - class: b(`mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300 ${h.labelClass ?? ""}`) - }, P(f.value), 11, y1)) : x("", !0), - h.disabled ? x("", !0) : (o(), i("div", b1, [ - l("div", w1, [ + class: y(`mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300 ${h.labelClass ?? ""}`) + }, F(f.value), 11, e1)) : x("", !0), + h.disabled ? x("", !0) : (o(), i("div", t1, [ + l("div", s1, [ m("bold") ? (o(), i("svg", { key: 0, - class: b(Je), - onClick: A, + class: y(Je), + onClick: M, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, $1)) : x("", !0), + }, o1)) : x("", !0), m("italics") ? (o(), i("svg", { key: 1, - class: b(Je), - onClick: ue, + class: y(Je), + onClick: ie, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, L1)) : x("", !0), + }, i1)) : x("", !0), m("link") ? (o(), i("svg", { key: 2, - class: b(Je), + class: y(Je), onClick: z, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, M1)) : x("", !0), + }, c1)) : x("", !0), m("blockquote") ? (o(), i("svg", { key: 3, - class: b(Je), - onClick: Q, + class: y(Je), + onClick: K, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, F1)) : x("", !0), + }, p1)) : x("", !0), m("image") ? (o(), i("svg", { key: 4, - class: b(Je), - onClick: se, + class: y(Je), + onClick: le, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, P1)) : x("", !0), + }, g1)) : x("", !0), m("code") ? (o(), i("svg", { key: 5, - class: b(Je), + class: y(Je), onClick: R, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, B1)) : x("", !0), + }, w1)) : x("", !0), m("heading") ? (o(), i("svg", { key: 6, - class: b(Je), - onClick: U, + class: y(Je), + onClick: q, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, H1)) : x("", !0), + }, $1)) : x("", !0), m("orderedList") ? (o(), i("svg", { key: 7, - class: b(Je), + class: y(Je), icon: "", - onClick: Z, + onClick: W, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, U1)) : x("", !0), + }, L1)) : x("", !0), m("unorderedList") ? (o(), i("svg", { key: 8, - class: b(Je), - onClick: J, + class: y(Je), + onClick: ee, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, K1)) : x("", !0), + }, M1)) : x("", !0), m("strikethrough") ? (o(), i("svg", { key: 9, - class: b(Je), - onClick: V, + class: y(Je), + onClick: L, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, G1)) : x("", !0), + }, F1)) : x("", !0), m("undo") ? (o(), i("svg", { key: 10, - class: b(Je), - onClick: y, + class: y(Je), + onClick: w, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, Y1)) : x("", !0), + }, O1)) : x("", !0), m("redo") ? (o(), i("svg", { key: 11, - class: b(Je), + class: y(Je), onClick: N, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, sm)) : x("", !0), - K(h.$slots, "toolbarbuttons", { - instance: (W = Be()) == null ? void 0 : W.exposed + }, B1)) : x("", !0), + U(h.$slots, "toolbarbuttons", { + instance: (Y = Be()) == null ? void 0 : Y.exposed }) ]), - m("help") && h.helpUrl ? (o(), i("div", lm, [ + m("help") && h.helpUrl ? (o(), i("div", H1, [ l("a", { title: "formatting help", target: "_blank", @@ -7575,43 +7824,43 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b tabindex: "-1" }, [ (o(), i("svg", { - class: b(Je), + class: y(Je), xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, am)) - ], 8, nm) + }, z1)) + ], 8, R1) ])) : x("", !0) ])), - l("div", rm, [ + l("div", N1, [ l("textarea", { ref_key: "txt", ref: g, name: h.id, id: h.id, - class: b(k.value), + class: y(k.value), label: h.label, value: h.modelValue, rows: h.rows || 6, disabled: h.disabled, - onInput: C[0] || (C[0] = (X) => { - var le; - return w(((le = X.target) == null ? void 0 : le.value) || ""); + onInput: C[0] || (C[0] = (J) => { + var ne; + return b(((ne = J.target) == null ? void 0 : ne.value) || ""); }), - onKeydown: nn(E, ["tab"]) - }, null, 42, im) + onKeydown: on(E, ["tab"]) + }, null, 42, U1) ]), c.value ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-red-500", id: `${h.id}-error` - }, P(c.value), 9, um)) : h.help ? (o(), i("p", { + }, F(c.value), 9, q1)) : h.help ? (o(), i("p", { key: 3, class: "mt-2 text-sm text-gray-500", id: `${h.id}-description` - }, P(h.help), 9, dm)) : x("", !0), - K(h.$slots, "footer", Ae({ + }, F(h.help), 9, Q1)) : x("", !0), + U(h.$slots, "footer", Te({ inputElement: g.value, id: h.id, modelValue: h.modelValue, @@ -7620,12 +7869,12 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b ]); }; } -}), fm = { +}), Z1 = { key: 0, class: "relative z-10 lg:hidden", role: "dialog", "aria-modal": "true" -}, vm = { class: "fixed inset-0 flex" }, pm = /* @__PURE__ */ l("span", { class: "sr-only" }, "Close sidebar", -1), mm = /* @__PURE__ */ l("svg", { +}, W1 = { class: "fixed inset-0 flex" }, G1 = /* @__PURE__ */ l("span", { class: "sr-only" }, "Close sidebar", -1), J1 = /* @__PURE__ */ l("svg", { class: "h-6 w-6 text-white dark:text-black", fill: "none", viewBox: "0 0 24 24", @@ -7638,12 +7887,12 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" }) -], -1), hm = [ - pm, - mm -], gm = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white dark:bg-black px-6 pb-2" }, ym = { class: "hidden lg:fixed lg:inset-y-0 lg:z-10 lg:flex lg:w-72 lg:flex-col" }, bm = { class: "flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 dark:border-gray-700 bg-white dark:bg-black px-6" }, wm = { - class: /* @__PURE__ */ b(["sticky top-0 flex items-center gap-x-6 bg-white dark:bg-black px-4 py-4 shadow-sm sm:px-6 lg:hidden"]) -}, km = /* @__PURE__ */ l("span", { class: "sr-only" }, "Open sidebar", -1), _m = /* @__PURE__ */ l("svg", { +], -1), X1 = [ + G1, + J1 +], Y1 = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white dark:bg-black px-6 pb-2" }, eh = { class: "hidden lg:fixed lg:inset-y-0 lg:z-10 lg:flex lg:w-72 lg:flex-col" }, th = { class: "flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 dark:border-gray-700 bg-white dark:bg-black px-6" }, sh = { + class: /* @__PURE__ */ y(["sticky top-0 flex items-center gap-x-6 bg-white dark:bg-black px-4 py-4 shadow-sm sm:px-6 lg:hidden"]) +}, lh = /* @__PURE__ */ l("span", { class: "sr-only" }, "Open sidebar", -1), nh = /* @__PURE__ */ l("svg", { class: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", @@ -7656,24 +7905,24 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b "stroke-linejoin": "round", d: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" }) -], -1), $m = [ - km, - _m -], Cm = /* @__PURE__ */ ce({ +], -1), oh = [ + lh, + nh +], ah = /* @__PURE__ */ de({ __name: "SidebarLayout", setup(e, { expose: t }) { - const { transition: s } = gn(), n = I(!0), a = I(""), r = { + const { transition: s } = bn(), n = O(!0), a = O(""), r = { entering: { cls: "transition-opacity ease-linear duration-300", from: "opacity-0", to: "opacity-100" }, leaving: { cls: "transition-opacity ease-linear duration-300", from: "opacity-100", to: "opacity-0" } - }, d = I(""), u = { + }, u = O(""), d = { entering: { cls: "transition ease-in-out duration-300 transform", from: "-translate-x-full", to: "translate-x-0" }, leaving: { cls: "transition ease-in-out duration-300 transform", from: "translate-x-0", to: "-translate-x-full" } - }, c = I(""), f = { + }, c = O(""), f = { entering: { cls: "ease-in-out duration-300", from: "opacity-0", to: "opacity-100" }, leaving: { cls: "ease-in-out duration-300", from: "opacity-100", to: "opacity-0" } }; function p(k) { - s(r, a, k), s(u, d, k), s(f, c, k), setTimeout(() => n.value = k, 300); + s(r, a, k), s(d, u, k), s(f, c, k), setTimeout(() => n.value = k, 300); } function $() { p(!0); @@ -7682,96 +7931,99 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b p(!1); } return t({ show: $, hide: m, toggle: p }), (k, g) => (o(), i("div", null, [ - n.value ? (o(), i("div", fm, [ + n.value ? (o(), i("div", Z1, [ l("div", { - class: b(["fixed inset-0 bg-gray-900/80", a.value]) + class: y(["fixed inset-0 bg-gray-900/80", a.value]) }, null, 2), - l("div", vm, [ + l("div", W1, [ l("div", { - class: b(["relative mr-16 flex w-full max-w-xs flex-1", d.value]) + class: y(["relative mr-16 flex w-full max-w-xs flex-1", u.value]) }, [ l("div", { - class: b(["absolute left-full top-0 flex w-16 justify-center pt-5", c.value]) + class: y(["absolute left-full top-0 flex w-16 justify-center pt-5", c.value]) }, [ l("button", { type: "button", onClick: m, class: "-m-2.5 p-2.5" - }, hm) + }, X1) ], 2), - l("div", gm, [ - K(k.$slots, "default") + l("div", Y1, [ + U(k.$slots, "default") ]) ], 2) ]) ])) : x("", !0), - l("div", ym, [ - l("div", bm, [ - K(k.$slots, "default") + l("div", eh, [ + l("div", th, [ + U(k.$slots, "default") ]) ]), - l("div", wm, [ + l("div", sh, [ l("button", { type: "button", onClick: $, class: "-m-2.5 p-2.5 text-gray-700 dark:text-gray-200 lg:hidden" - }, $m), - K(k.$slots, "mobiletitlebar") + }, oh), + U(k.$slots, "mobiletitlebar") ]) ])); } -}), xm = { - Alert: Jo, - AlertSuccess: ua, - ErrorSummary: pa, - InputDescription: ha, - Icon: Xn, - Loading: dr, - OutlineButton: vr, - PrimaryButton: hr, - SecondaryButton: br, - TextLink: kr, - Breadcrumbs: Vr, - Breadcrumb: Fr, - NavList: Pr, - NavListItem: Qr, - AutoQueryGrid: md, - SettingsIcons: Md, +}), rh = { + Alert: ea, + AlertSuccess: fa, + ErrorSummary: ga, + InputDescription: ba, + Icon: eo, + Loading: pr, + OutlineButton: gr, + PrimaryButton: wr, + SecondaryButton: $r, + TextLink: xr, + Breadcrumbs: Tr, + Breadcrumb: Dr, + NavList: Hr, + NavListItem: Gr, + AutoQueryGrid: wd, + SettingsIcons: jd, FilterViews: Il, FilterColumn: Fl, - QueryPrefs: Dl, - EnsureAccess: to, - EnsureAccessDialog: Ad, - TextInput: Ed, - TextareaInput: Kd, - SelectInput: Yd, - CheckboxInput: rc, - TagInput: Mc, - FileInput: Xc, - Autocomplete: p0, - Combobox: g0, - DynamicInput: y0, - LookupInput: D0, - AutoFormFields: P0, - AutoForm: nf, - AutoCreateForm: Lf, - AutoEditForm: Kf, - ConfirmDelete: Wf, - FormLoading: tv, - DataGrid: av, - CellFormat: rv, - PreviewFormat: vv, - HtmlFormat: yv, - CloseButton: $v, - SlideOver: Bv, - ModalDialog: qv, - ModalLookup: Bp, - Tabs: Kp, - DarkModeToggle: Xp, - SignIn: g1, - MarkdownInput: cm, - SidebarLayout: Cm -}, Qs = xm, Fm = { + QueryPrefs: jl, + EnsureAccess: lo, + EnsureAccessDialog: Od, + TextInput: qd, + TextareaInput: Xd, + SelectInput: nc, + CheckboxInput: fc, + TagInput: jc, + FileInput: l0, + Autocomplete: b0, + Combobox: _0, + DynamicInput: $0, + LookupInput: H0, + AutoFormFields: R0, + AutoForm: df, + AutoCreateForm: Tf, + AutoEditForm: Xf, + AutoViewForm: gv, + ConfirmDelete: bv, + FormLoading: xv, + DataGrid: Av, + CellFormat: Tv, + PreviewFormat: Pv, + HtmlFormat: zv, + MarkupFormat: qv, + MarkupModel: ep, + CloseButton: op, + SlideOver: wp, + ModalDialog: Vp, + ModalLookup: wm, + Tabs: Mm, + DarkModeToggle: jm, + SignIn: Ym, + MarkdownInput: K1, + SidebarLayout: ah +}, Qs = rh, vh = { install(e) { Object.keys(Qs).forEach((s) => { e.component(s, Qs[s]); @@ -7787,17 +8039,17 @@ const j0 = { key: 0 }, O0 = { class: "text-red-700" }, B0 = /* @__PURE__ */ l("b }); }, component(e, t) { - return e ? t ? Y.components[e] = t : Y.components[e] || Qs[e] || null : null; + return e ? t ? G.components[e] = t : G.components[e] || Qs[e] || null : null; } }; export { - Tm as css, - Fm as default, + fh as css, + vh as default, Tl as useAuth, - js as useClient, - At as useConfig, - Mm as useFiles, - Am as useFormatters, - rt as useMetadata, - gn as useUtils + Ds as useClient, + It as useConfig, + La as useFiles, + ch as useFormatters, + lt as useMetadata, + bn as useUtils }; diff --git a/MyApp/wwwroot/lib/mjs/vue.min.mjs b/MyApp/wwwroot/lib/mjs/vue.min.mjs index 706d05e..284b786 100644 --- a/MyApp/wwwroot/lib/mjs/vue.min.mjs +++ b/MyApp/wwwroot/lib/mjs/vue.min.mjs @@ -1,9 +1,9 @@ /** -* vue v3.5.4 +* vue v3.5.11 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */let e,t,n,r,i,l,s,o,a,c,u,d;function p(e){let t=/* @__PURE__ */Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let f={},h=[],m=()=>{},g=()=>!1,y=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),b=e=>e.startsWith("onUpdate:"),_=Object.assign,S=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},x=Object.prototype.hasOwnProperty,C=(e,t)=>x.call(e,t),k=Array.isArray,T=e=>"[object Map]"===D(e),w=e=>"[object Set]"===D(e),E=e=>"[object Date]"===D(e),N=e=>"[object RegExp]"===D(e),A=e=>"function"==typeof e,R=e=>"string"==typeof e,I=e=>"symbol"==typeof e,O=e=>null!==e&&"object"==typeof e,P=e=>(O(e)||A(e))&&A(e.then)&&A(e.catch),M=Object.prototype.toString,D=e=>M.call(e),L=e=>D(e).slice(8,-1),$=e=>"[object Object]"===D(e),F=e=>R(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,V=/* @__PURE__ */p(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),B=/* @__PURE__ */p("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),U=e=>{let t=/* @__PURE__ */Object.create(null);return n=>t[n]||(t[n]=e(n))},j=/-(\w)/g,H=U(e=>e.replace(j,(e,t)=>t?t.toUpperCase():"")),q=/\B([A-Z])/g,W=U(e=>e.replace(q,"-$1").toLowerCase()),K=U(e=>e.charAt(0).toUpperCase()+e.slice(1)),z=U(e=>e?`on${K(e)}`:""),G=(e,t)=>!Object.is(e,t),J=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},X=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Z=e=>{let t=R(e)?Number(e):NaN;return isNaN(t)?e:t},Y=()=>e||(e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),ee=/* @__PURE__ */p("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function et(e){if(k(e)){let t={};for(let n=0;n{if(e){let n=e.split(er);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function es(e){let t="";if(R(e))t=e;else if(k(e))for(let n=0;nef(e,t))}let em=e=>!!(e&&!0===e.__v_isRef),eg=e=>R(e)?e:null==e?"":k(e)||O(e)&&(e.toString===M||!A(e.toString))?em(e)?eg(e.value):JSON.stringify(e,ey,2):String(e),ey=(e,t)=>em(t)?ey(e,t.value):T(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[ev(t,r)+" =>"]=n,e),{})}:w(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>ev(e))}:I(t)?ev(t):!O(t)||k(t)||$(t)?t:String(t),ev=(e,t="")=>{var n;return I(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class eb{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=t,!e&&t&&(this.index=(t.scopes||(t.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e0)){for(;r;){let t=r;for(r=void 0;t;){let n=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eE(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function eN(e){let t;let n=e.depsTail;for(let e=n;e;e=e.prevDep)-1===e.version?(e===n&&(n=e.prevDep),eI(e),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(e)):t=e,e.dep.activeLink=e.prevActiveLink,e.prevActiveLink=void 0;e.deps=t,e.depsTail=n}function eA(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&eR(t.dep.computed)||t.dep.version!==t.version)return!0;return!!e._dirty}function eR(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eV))return;e.globalVersion=eV;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!eA(e)){e.flags&=-3;return}let r=n,i=eM;n=e,eM=!0;try{eE(e);let n=e.fn(e._value);(0===t.version||G(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{n=r,eM=i,eN(e),e.flags&=-3}}function eI(e){let{dep:t,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),t.subs===e&&(t.subs=n),!t.subs&&t.computed){t.computed.flags&=-5;for(let e=t.computed.deps;e;e=e.nextDep)eI(e)}}function eO(e,t){e.effect instanceof ek&&(e=e.effect.fn);let n=new ek(e);t&&_(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r}function eP(e){e.effect.stop()}let eM=!0,eD=[];function eL(){eD.push(eM),eM=!1}function e$(){let e=eD.pop();eM=void 0===e||e}function eF(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=n;n=void 0;try{t()}finally{n=e}}}let eV=0;class eB{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0}track(e){if(!n||!eM||n===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==n)t=this.activeLink={dep:this,sub:n,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},n.deps?(t.prevDep=n.depsTail,n.depsTail.nextDep=t,n.depsTail=t):n.deps=n.depsTail=t,4&n.flags&&function e(t){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=n.depsTail,t.nextDep=void 0,n.depsTail.nextDep=t,n.depsTail=t,n.deps===t&&(n.deps=e)}return t}trigger(e){this.version++,eV++,this.notify(e)}notify(e){eT++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()}finally{ew()}}}let eU=/* @__PURE__ */new WeakMap,ej=Symbol(""),eH=Symbol(""),eq=Symbol("");function eW(e,t,r){if(eM&&n){let t=eU.get(e);t||eU.set(e,t=/* @__PURE__ */new Map);let n=t.get(r);n||t.set(r,n=new eB),n.track()}}function eK(e,t,n,r,i,l){let s=eU.get(e);if(!s){eV++;return}let o=e=>{e&&e.trigger()};if(eT++,"clear"===t)s.forEach(o);else{let i=k(e),l=i&&F(n);if(i&&"length"===n){let e=Number(r);s.forEach((t,n)=>{("length"===n||n===eq||!I(n)&&n>=e)&&o(t)})}else switch(void 0!==n&&o(s.get(n)),l&&o(s.get(eq)),t){case"add":i?l&&o(s.get("length")):(o(s.get(ej)),T(e)&&o(s.get(eH)));break;case"delete":!i&&(o(s.get(ej)),T(e)&&o(s.get(eH)));break;case"set":T(e)&&o(s.get(ej))}}ew()}function ez(e){let t=tL(e);return t===e?t:(eW(t,"iterate",eq),tM(e)?t:t.map(tF))}function eG(e){return eW(e=tL(e),"iterate",eq),e}let eJ={__proto__:null,[Symbol.iterator](){return eQ(this,Symbol.iterator,tF)},concat(...e){return ez(this).concat(...e.map(e=>k(e)?ez(e):e))},entries(){return eQ(this,"entries",e=>(e[1]=tF(e[1]),e))},every(e,t){return eZ(this,"every",e,t,void 0,arguments)},filter(e,t){return eZ(this,"filter",e,t,e=>e.map(tF),arguments)},find(e,t){return eZ(this,"find",e,t,tF,arguments)},findIndex(e,t){return eZ(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eZ(this,"findLast",e,t,tF,arguments)},findLastIndex(e,t){return eZ(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eZ(this,"forEach",e,t,void 0,arguments)},includes(...e){return e0(this,"includes",e)},indexOf(...e){return e0(this,"indexOf",e)},join(e){return ez(this).join(e)},lastIndexOf(...e){return e0(this,"lastIndexOf",e)},map(e,t){return eZ(this,"map",e,t,void 0,arguments)},pop(){return e1(this,"pop")},push(...e){return e1(this,"push",e)},reduce(e,...t){return eY(this,"reduce",e,t)},reduceRight(e,...t){return eY(this,"reduceRight",e,t)},shift(){return e1(this,"shift")},some(e,t){return eZ(this,"some",e,t,void 0,arguments)},splice(...e){return e1(this,"splice",e)},toReversed(){return ez(this).toReversed()},toSorted(e){return ez(this).toSorted(e)},toSpliced(...e){return ez(this).toSpliced(...e)},unshift(...e){return e1(this,"unshift",e)},values(){return eQ(this,"values",tF)}};function eQ(e,t,n){let r=eG(e),i=r[t]();return r===e||tM(e)||(i._next=i.next,i.next=()=>{let e=i._next();return e.value&&(e.value=n(e.value)),e}),i}let eX=Array.prototype;function eZ(e,t,n,r,i,l){let s=eG(e),o=s!==e&&!tM(e),a=s[t];if(a!==eX[t]){let t=a.apply(e,l);return o?tF(t):t}let c=n;s!==e&&(o?c=function(t,r){return n.call(this,tF(t),r,e)}:n.length>2&&(c=function(t,r){return n.call(this,t,r,e)}));let u=a.call(s,c,r);return o&&i?i(u):u}function eY(e,t,n,r){let i=eG(e),l=n;return i!==e&&(tM(e)?n.length>3&&(l=function(t,r,i){return n.call(this,t,r,i,e)}):l=function(t,r,i){return n.call(this,t,tF(r),i,e)}),i[t](l,...r)}function e0(e,t,n){let r=tL(e);eW(r,"iterate",eq);let i=r[t](...n);return(-1===i||!1===i)&&tD(n[0])?(n[0]=tL(n[0]),r[t](...n)):i}function e1(e,t,n=[]){eL(),eT++;let r=tL(e)[t].apply(e,n);return ew(),e$(),r}let e2=/* @__PURE__ */p("__proto__,__v_isRef,__isVue"),e6=new Set(/* @__PURE__ */Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(I));function e3(e){I(e)||(e=String(e));let t=tL(this);return eW(t,"has",e),t.hasOwnProperty(e)}class e4{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){let r=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(r?i?tw:tT:i?tk:tC).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let l=k(e);if(!r){let e;if(l&&(e=eJ[t]))return e;if("hasOwnProperty"===t)return e3}let s=Reflect.get(e,t,tB(e)?e:n);return(I(t)?e6.has(t):e2(t))?s:(r||eW(e,"get",t),i)?s:tB(s)?l&&F(t)?s:s.value:O(s)?r?tA(s):tE(s):s}}class e8 extends e4{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t];if(!this._isShallow){let t=tP(i);if(tM(n)||tP(n)||(i=tL(i),n=tL(n)),!k(e)&&tB(i)&&!tB(n))return!t&&(i.value=n,!0)}let l=k(e)&&F(t)?Number(t)e,tr=e=>Reflect.getPrototypeOf(e);function ti(e,t,n=!1,r=!1){let i=tL(e=e.__v_raw),l=tL(t);n||(G(t,l)&&eW(i,"get",t),eW(i,"get",l));let{has:s}=tr(i),o=r?tn:n?tV:tF;return s.call(i,t)?o(e.get(t)):s.call(i,l)?o(e.get(l)):void(e!==i&&e.get(t))}function tl(e,t=!1){let n=this.__v_raw,r=tL(n),i=tL(e);return t||(G(e,i)&&eW(r,"has",e),eW(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function ts(e,t=!1){return e=e.__v_raw,t||eW(tL(e),"iterate",ej),Reflect.get(e,"size",e)}function to(e,t=!1){t||tM(e)||tP(e)||(e=tL(e));let n=tL(this);return tr(n).has.call(n,e)||(n.add(e),eK(n,"add",e,e)),this}function ta(e,t,n=!1){n||tM(t)||tP(t)||(t=tL(t));let r=tL(this),{has:i,get:l}=tr(r),s=i.call(r,e);s||(e=tL(e),s=i.call(r,e));let o=l.call(r,e);return r.set(e,t),s?G(t,o)&&eK(r,"set",e,t):eK(r,"add",e,t),this}function tc(e){let t=tL(this),{has:n,get:r}=tr(t),i=n.call(t,e);i||(e=tL(e),i=n.call(t,e)),r&&r.call(t,e);let l=t.delete(e);return i&&eK(t,"delete",e,void 0),l}function tu(){let e=tL(this),t=0!==e.size,n=e.clear();return t&&eK(e,"clear",void 0,void 0),n}function td(e,t){return function(n,r){let i=this,l=i.__v_raw,s=tL(l),o=t?tn:e?tV:tF;return e||eW(s,"iterate",ej),l.forEach((e,t)=>n.call(r,o(e),o(t),i))}}function tp(e,t,n){return function(...r){let i=this.__v_raw,l=tL(i),s=T(l),o="entries"===e||e===Symbol.iterator&&s,a=i[e](...r),c=n?tn:t?tV:tF;return t||eW(l,"iterate","keys"===e&&s?eH:ej),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[c(e[0]),c(e[1])]:c(e),done:t}},[Symbol.iterator](){return this}}}}function tf(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}let[th,tm,tg,ty]=/* @__PURE__ */function(){let e={get(e){return ti(this,e)},get size(){return ts(this)},has:tl,add:to,set:ta,delete:tc,clear:tu,forEach:td(!1,!1)},t={get(e){return ti(this,e,!1,!0)},get size(){return ts(this)},has:tl,add(e){return to.call(this,e,!0)},set(e,t){return ta.call(this,e,t,!0)},delete:tc,clear:tu,forEach:td(!1,!0)},n={get(e){return ti(this,e,!0)},get size(){return ts(this,!0)},has(e){return tl.call(this,e,!0)},add:tf("add"),set:tf("set"),delete:tf("delete"),clear:tf("clear"),forEach:td(!0,!1)},r={get(e){return ti(this,e,!0,!0)},get size(){return ts(this,!0)},has(e){return tl.call(this,e,!0)},add:tf("add"),set:tf("set"),delete:tf("delete"),clear:tf("clear"),forEach:td(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=tp(i,!1,!1),n[i]=tp(i,!0,!1),t[i]=tp(i,!1,!0),r[i]=tp(i,!0,!0)}),[e,n,t,r]}();function tv(e,t){let n=t?e?ty:tg:e?tm:th;return(t,r,i)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(C(n,r)&&r in t?n:t,r,i)}let tb={get:/* @__PURE__ */tv(!1,!1)},t_={get:/* @__PURE__ */tv(!1,!0)},tS={get:/* @__PURE__ */tv(!0,!1)},tx={get:/* @__PURE__ */tv(!0,!0)},tC=/* @__PURE__ */new WeakMap,tk=/* @__PURE__ */new WeakMap,tT=/* @__PURE__ */new WeakMap,tw=/* @__PURE__ */new WeakMap;function tE(e){return tP(e)?e:tI(e,!1,e9,tb,tC)}function tN(e){return tI(e,!1,te,t_,tk)}function tA(e){return tI(e,!0,e7,tS,tT)}function tR(e){return tI(e,!0,tt,tx,tw)}function tI(e,t,n,r,i){if(!O(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let l=i.get(e);if(l)return l;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(L(e));if(0===s)return e;let o=new Proxy(e,2===s?r:n);return i.set(e,o),o}function tO(e){return tP(e)?tO(e.__v_raw):!!(e&&e.__v_isReactive)}function tP(e){return!!(e&&e.__v_isReadonly)}function tM(e){return!!(e&&e.__v_isShallow)}function tD(e){return!!e&&!!e.__v_raw}function tL(e){let t=e&&e.__v_raw;return t?tL(t):e}function t$(e){return!C(e,"__v_skip")&&Object.isExtensible(e)&&Q(e,"__v_skip",!0),e}let tF=e=>O(e)?tE(e):e,tV=e=>O(e)?tA(e):e;function tB(e){return!!e&&!0===e.__v_isRef}function tU(e){return tH(e,!1)}function tj(e){return tH(e,!0)}function tH(e,t){return tB(e)?e:new tq(e,t)}class tq{constructor(e,t){this.dep=new eB,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:tL(e),this._value=t?e:tF(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||tM(e)||tP(e);G(e=n?e:tL(e),t)&&(this._rawValue=e,this._value=n?e:tF(e),this.dep.trigger())}}function tW(e){e.dep.trigger()}function tK(e){return tB(e)?e.value:e}function tz(e){return A(e)?e():tK(e)}let tG={get:(e,t,n)=>"__v_raw"===t?e:tK(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return tB(i)&&!tB(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function tJ(e){return tO(e)?e:new Proxy(e,tG)}class tQ{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new eB,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}function tX(e){return new tQ(e)}function tZ(e){let t=k(e)?Array(e.length):{};for(let n in e)t[n]=t2(e,n);return t}class tY{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){var e,t,n;return e=tL(this._object),t=this._key,null==(n=eU.get(e))?void 0:n.get(t)}}class t0{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function t1(e,t,n){return tB(e)?e:A(e)?new t0(e):O(e)&&arguments.length>1?t2(e,t,n):tU(e)}function t2(e,t,n){let r=e[t];return tB(r)?r:new tY(e,t,n)}class t6{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eB(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eV-1,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){this.flags|=16,n!==this&&this.dep.notify()}get value(){let e=this.dep.track();return eR(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let t3={GET:"get",HAS:"has",ITERATE:"iterate"},t4={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},t8={},t5=/* @__PURE__ */new WeakMap;function t9(){return u}function t7(e,t=!1,n=u){if(n){let t=t5.get(n);t||t5.set(n,t=[]),t.push(e)}}function ne(e,t=1/0,n){if(t<=0||!O(e)||e.__v_skip||(n=n||/* @__PURE__ */new Set).has(e))return e;if(n.add(e),t--,tB(e))ne(e.value,t,n);else if(k(e))for(let r=0;r{ne(e,t,n)});else if($(e)){for(let r in e)ne(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&ne(e[r],t,n)}return e}function nt(e,t){}let nn={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"};function nr(e,t,n,r){try{return r?e(...r):e()}catch(e){nl(e,t,n)}}function ni(e,t,n,r){if(A(e)){let i=nr(e,t,n,r);return i&&P(i)&&i.catch(e=>{nl(e,t,n)}),i}if(k(e)){let i=[];for(let l=0;l=nS(n)?na.push(e):na.splice(function(e){let t=ns?nc+1:0,n=na.length;for(;t>>1,i=na[r],l=nS(i);lnS(e)-nS(t));if(nu.length=0,nd){nd.push(...e);return}for(np=0,nd=e;npnull==e.id?2&e.flags?-1:1/0:e.id,nx=null,nC=null;function nk(e){let t=nx;return nx=e,nC=e&&e.type.__scopeId||null,t}function nT(e){nC=e}function nw(){nC=null}let nE=e=>nN;function nN(e,t=nx,n){if(!t||e._n)return e;let r=(...n)=>{let i;r._d&&lm(-1);let l=nk(t);try{i=e(...n)}finally{nk(l),r._d&&lm(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function nA(e,t){if(null===nx)return e;let n=lZ(nx),r=e.dirs||(e.dirs=[]);for(let e=0;ee.__isTeleport,nP=e=>e&&(e.disabled||""===e.disabled),nM=e=>e&&(e.defer||""===e.defer),nD=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,nL=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,n$=(e,t)=>{let n=e&&e.to;return R(n)?t?t(n):null:n};function nF(e,t,n,{o:{insert:r},m:i},l=2){0===l&&r(e.targetAnchor,t,n);let{el:s,anchor:o,shapeFlag:a,children:c,props:u}=e,d=2===l;if(d&&r(s,t,n),(!d||nP(u))&&16&a)for(let e=0;e{16&b&&u(_,e,t,i,l,s,o,a)},p=()=>{let e=t.target=n$(t.props,h),n=nU(e,t,m,f);e&&("svg"!==s&&nD(e)?s="svg":"mathml"!==s&&nL(e)&&(s="mathml"),y||(d(e,n),nB(t)))};y&&(d(n,c),nB(t)),nM(t.props)?iD(p,l):p()}else{t.el=e.el,t.targetStart=e.targetStart;let r=t.anchor=e.anchor,u=t.target=e.target,f=t.targetAnchor=e.targetAnchor,m=nP(e.props),g=m?n:u;if("svg"===s||nD(u)?s="svg":("mathml"===s||nL(u))&&(s="mathml"),S?(p(e.dynamicChildren,S,g,i,l,s,o),ij(e,t,!0)):a||d(e,t,g,m?r:f,i,l,s,o,!1),y)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):nF(t,n,r,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=n$(t.props,h);e&&nF(t,e,null,c,0)}else m&&nF(t,u,f,c,1);nB(t)}},remove(e,t,n,{um:r,o:{remove:i}},l){let{shapeFlag:s,children:o,anchor:a,targetStart:c,targetAnchor:u,target:d,props:p}=e;if(d&&(i(c),i(u)),l&&i(a),16&s){let e=l||!nP(p);for(let i=0;i{e.isMounted=!0}),rN(()=>{e.isUnmounting=!0}),e}let nW=[Function,Array],nK={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nW,onEnter:nW,onAfterEnter:nW,onEnterCancelled:nW,onBeforeLeave:nW,onLeave:nW,onAfterLeave:nW,onLeaveCancelled:nW,onBeforeAppear:nW,onAppear:nW,onAfterAppear:nW,onAppearCancelled:nW},nz=e=>{let t=e.subTree;return t.component?nz(t.component):t};function nG(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==la){t=n;break}}return t}let nJ={name:"BaseTransition",props:nK,setup(e,{slots:t}){let n=lB(),r=nq();return()=>{let i=t.default&&n1(t.default(),!0);if(!i||!i.length)return;let l=nG(i),s=tL(e),{mode:o}=s;if(r.isLeaving)return nZ(l);let a=nY(l);if(!a)return nZ(l);let c=nX(a,s,r,n,e=>c=e);a.type!==la&&n0(a,c);let u=n.subTree,d=u&&nY(u);if(d&&d.type!==la&&!l_(a,d)&&nz(n).type!==la){let e=nX(d,s,r,n);if(n0(d,e),"out-in"===o&&a.type!==la)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave},nZ(l);"in-out"===o&&a.type!==la&&(e.delayLeave=(e,t,n)=>{nQ(r,d)[String(d.key)]=d,e[nj]=()=>{t(),e[nj]=void 0,delete c.delayedLeave},c.delayedLeave=n})}return l}}};function nQ(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=/* @__PURE__ */Object.create(null),n.set(t.type,r)),r}function nX(e,t,n,r,i){let{appear:l,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:f,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:g,onAppear:y,onAfterAppear:b,onAppearCancelled:_}=t,S=String(e.key),x=nQ(n,e),C=(e,t)=>{e&&ni(e,r,9,t)},T=(e,t)=>{let n=t[1];C(e,t),k(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},w={mode:s,persisted:o,beforeEnter(t){let r=a;if(!n.isMounted){if(!l)return;r=g||a}t[nj]&&t[nj](!0);let i=x[S];i&&l_(e,i)&&i.el[nj]&&i.el[nj](),C(r,[t])},enter(e){let t=c,r=u,i=d;if(!n.isMounted){if(!l)return;t=y||c,r=b||u,i=_||d}let s=!1,o=e[nH]=t=>{s||(s=!0,t?C(i,[e]):C(r,[e]),w.delayedLeave&&w.delayedLeave(),e[nH]=void 0)};t?T(t,[e,o]):o()},leave(t,r){let i=String(e.key);if(t[nH]&&t[nH](!0),n.isUnmounting)return r();C(p,[t]);let l=!1,s=t[nj]=n=>{l||(l=!0,r(),n?C(m,[t]):C(h,[t]),t[nj]=void 0,x[i]!==e||delete x[i])};x[i]=e,f?T(f,[t,s]):s()},clone(e){let l=nX(e,t,n,r,i);return i&&i(l),l}};return w}function nZ(e){if(rh(e))return(e=lE(e)).children=null,e}function nY(e){if(!rh(e))return nO(e.type)&&e.children?nG(e.children):e;let{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&A(n.default))return n.default()}}function n0(e,t){6&e.shapeFlag&&e.component?(e.transition=t,n0(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function n1(e,t=!1,n){let r=[],i=0;for(let l=0;l1)for(let e=0;en.value,set:e=>n.value=e}),n}function n8(e,t,n,r,i=!1){if(k(e)){e.forEach((e,l)=>n8(e,t&&(k(t)?t[l]:t),n,r,i));return}if(rd(r)&&!i)return;let l=4&r.shapeFlag?lZ(r.component):r.el,s=i?null:l,{i:o,r:a}=e,c=t&&t.r,u=o.refs===f?o.refs={}:o.refs,d=o.setupState,p=tL(d),h=d===f?()=>!1:e=>C(p,e);if(null!=c&&c!==a&&(R(c)?(u[c]=null,h(c)&&(d[c]=null)):tB(c)&&(c.value=null)),A(a))nr(a,o,12,[s,u]);else{let t=R(a),r=tB(a);if(t||r){let o=()=>{if(e.f){let n=t?h(a)?d[a]:u[a]:a.value;i?k(n)&&S(n,l):k(n)?n.includes(l)||n.push(l):t?(u[a]=[l],h(a)&&(d[a]=u[a])):(a.value=[l],e.k&&(u[e.k]=a.value))}else t?(u[a]=s,h(a)&&(d[a]=s)):r&&(a.value=s,e.k&&(u[e.k]=s))};s?(o.id=-1,iD(o,n)):o()}}}let n5=!1,n9=()=>{n5||(console.error("Hydration completed but contains mismatches."),n5=!0)},n7=e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName,re=e=>e.namespaceURI.includes("MathML"),rt=e=>{if(1===e.nodeType){if(n7(e))return"svg";if(re(e))return"mathml"}},rn=e=>8===e.nodeType;function rr(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:l,parentNode:s,remove:o,insert:a,createComment:c}}=e,u=(n,r,o,c,y,_=!1)=>{_=_||!!r.dynamicChildren;let S=rn(n)&&"["===n.data,x=()=>h(n,r,o,c,y,S),{type:C,ref:k,shapeFlag:T,patchFlag:w}=r,E=n.nodeType;r.el=n,-2===w&&(_=!1,r.dynamicChildren=null);let N=null;switch(C){case lo:3!==E?""===r.children?(a(r.el=i(""),s(n),n),N=n):N=x():(n.data!==r.children&&(n9(),n.data=r.children),N=l(n));break;case la:b(n)?(N=l(n),g(r.el=n.content.firstChild,n,o)):N=8!==E||S?x():l(n);break;case lc:if(S&&(E=(n=l(n)).nodeType),1===E||3===E){N=n;let e=!r.children.length;for(let t=0;t{s=s||!!t.dynamicChildren;let{type:a,props:c,patchFlag:u,shapeFlag:d,dirs:f,transition:h}=t,m="input"===a||"option"===a;if(m||-1!==u){let a;f&&nR(t,null,n,"created");let _=!1;if(b(e)){_=iU(i,h)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;_&&h.beforeEnter(r),g(r,e,n),t.el=e=r}if(16&d&&!(c&&(c.innerHTML||c.textContent))){let r=p(e.firstChild,t,e,n,i,l,s);for(;r;){rs(e,1)||n9();let t=r;r=r.nextSibling,o(t)}}else 8&d&&e.textContent!==t.children&&(rs(e,0)||n9(),e.textContent=t.children);if(c){if(m||!s||48&u){let t=e.tagName.includes("-");for(let i in c)(m&&(i.endsWith("value")||"indeterminate"===i)||y(i)&&!V(i)||"."===i[0]||t)&&r(e,i,null,c[i],void 0,n)}else if(c.onClick)r(e,"onClick",null,c.onClick,void 0,n);else if(4&u&&tO(c.style))for(let e in c.style)c.style[e]}(a=c&&c.onVnodeBeforeMount)&&lD(a,n,t),f&&nR(t,null,n,"beforeMount"),((a=c&&c.onVnodeMounted)||f||_)&&li(()=>{a&&lD(a,n,t),_&&h.enter(e),f&&nR(t,null,n,"mounted")},i)}return e.nextSibling},p=(e,t,r,s,o,c,d)=>{d=d||!!t.dynamicChildren;let p=t.children,f=p.length;for(let t=0;t{let{slotScopeIds:u}=t;u&&(i=i?i.concat(u):u);let d=s(e),f=p(l(e),t,d,n,r,i,o);return f&&rn(f)&&"]"===f.data?l(t.anchor=f):(n9(),a(t.anchor=c("]"),d,f),f)},h=(e,t,r,i,a,c)=>{if(rs(e.parentElement,1)||n9(),t.el=null,c){let t=m(e);for(;;){let n=l(e);if(n&&n!==t)o(n);else break}}let u=l(e),d=s(e);return o(e),n(null,t,d,u,r,i,rt(d),a),u},m=(e,t="[",n="]")=>{let r=0;for(;e;)if((e=l(e))&&rn(e)&&(e.data===t&&r++,e.data===n)){if(0===r)return l(e);r--}return e},g=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},b=e=>1===e.nodeType&&"template"===e.tagName.toLowerCase();return[(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),n_(),t._vnode=e;return}u(t.firstChild,e,null,null,null),n_(),t._vnode=e},u]}let ri="data-allow-mismatch",rl={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function rs(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(ri);)e=e.parentElement;let n=e&&e.getAttribute(ri);if(null==n)return!1;if(""===n)return!0;{let e=n.split(",");return!!(0===t&&e.includes("children"))||n.split(",").includes(rl[t])}}let ro=(e=1e4)=>t=>{let n=requestIdleCallback(t,{timeout:e});return()=>cancelIdleCallback(n)},ra=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>r.observe(e)),()=>r.disconnect()},rc=e=>t=>{if(e){let n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},ru=(e=[])=>(t,n)=>{R(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,l(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},l=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),l},rd=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function rp(e){let t;A(e)&&(e={loader:e});let{loader:n,loadingComponent:r,errorComponent:i,delay:l=200,hydrate:s,timeout:o,suspensible:a=!0,onError:c}=e,u=null,d=0,p=()=>(d++,u=null,f()),f=()=>{let e;return u||(e=u=n().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(p()),()=>n(e),d+1)});throw e}).then(n=>e!==u&&u?u:(n&&(n.__esModule||"Module"===n[Symbol.toStringTag])&&(n=n.default),t=n,n)))};return n2({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(e,n,r){let i=s?()=>{let t=s(r,t=>(function(e,t){if(rn(e)&&"["===e.data){let n=1,r=e.nextSibling;for(;r;){if(1===r.nodeType)t(r);else if(rn(r)){if("]"===r.data){if(0==--n)break}else"["===r.data&&n++}r=r.nextSibling}}else t(e)})(e,t));t&&(n.bum||(n.bum=[])).push(t)}:r;t?i():f().then(()=>!n.isUnmounted&&i())},get __asyncResolved(){return t},setup(){let e=lV;if(n3(e),t)return()=>rf(t,e);let n=t=>{u=null,nl(t,e,13,!i)};if(a&&e.suspense||lq)return f().then(t=>()=>rf(t,e)).catch(e=>(n(e),()=>i?lT(i,{error:e}):null));let s=tU(!1),c=tU(),d=tU(!!l);return l&&setTimeout(()=>{d.value=!1},l),null!=o&&setTimeout(()=>{if(!s.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);n(e),c.value=e}},o),f().then(()=>{s.value=!0,e.parent&&rh(e.parent.vnode)&&ng(e.parent.update)}).catch(e=>{n(e),c.value=e}),()=>s.value&&t?rf(t,e):c.value&&i?lT(i,{error:c.value}):r&&!d.value?lT(r):void 0}})}function rf(e,t){let{ref:n,props:r,children:i,ce:l}=t.vnode,s=lT(e,r,i);return s.ref=n,s.ce=l,delete t.vnode.ce,s}let rh=e=>e.type.__isKeepAlive,rm={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=lB(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&1===e.length?e[0]:e};let i=/* @__PURE__ */new Map,l=/* @__PURE__ */new Set,s=null,o=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=r,p=d("div");function f(e){r_(e),u(e,n,o,!0)}function h(e){i.forEach((t,n)=>{let r=lY(t.type);r&&!e(r)&&m(n)})}function m(e){let t=i.get(e);!t||s&&l_(t,s)?s&&r_(s):f(t),i.delete(e),l.delete(e)}r.activate=(e,t,n,r,i)=>{let l=e.component;c(e,t,n,0,o),a(l.vnode,e,t,n,l,o,r,e.slotScopeIds,i),iD(()=>{l.isDeactivated=!1,l.a&&J(l.a);let t=e.props&&e.props.onVnodeMounted;t&&lD(t,l.parent,e)},o)},r.deactivate=e=>{let t=e.component;iH(t.m),iH(t.a),c(e,p,null,1,o),iD(()=>{t.da&&J(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&lD(n,t.parent,e),t.isDeactivated=!0},o)},iJ(()=>[e.include,e.exclude],([e,t])=>{e&&h(t=>rg(e,t)),t&&h(e=>!rg(t,e))},{flush:"post",deep:!0});let g=null,y=()=>{null!=g&&(i9(n.subTree.type)?iD(()=>{i.set(g,rS(n.subTree))},n.subTree.suspense):i.set(g,rS(n.subTree)))};return rT(y),rE(y),rN(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=rS(t);if(e.type===i.type&&e.key===i.key){r_(i);let e=i.component.da;e&&iD(e,r);return}f(e)})}),()=>{if(g=null,!t.default)return s=null;let n=t.default(),r=n[0];if(n.length>1)return s=null,n;if(!lb(r)||!(4&r.shapeFlag)&&!(128&r.shapeFlag))return s=null,r;let o=rS(r);if(o.type===la)return s=null,o;let a=o.type,c=lY(rd(o)?o.type.__asyncResolved||{}:a),{include:u,exclude:d,max:p}=e;if(u&&(!c||!rg(u,c))||d&&c&&rg(d,c))return o.shapeFlag&=-257,s=o,r;let f=null==o.key?a:o.key,h=i.get(f);return o.el&&(o=lE(o),128&r.shapeFlag&&(r.ssContent=o)),g=f,h?(o.el=h.el,o.component=h.component,o.transition&&n0(o,o.transition),o.shapeFlag|=512,l.delete(f),l.add(f)):(l.add(f),p&&l.size>parseInt(p,10)&&m(l.values().next().value)),o.shapeFlag|=256,s=o,i9(r.type)?r:o}}};function rg(e,t){return k(e)?e.some(e=>rg(e,t)):R(e)?e.split(",").includes(t):!!N(e)&&(e.lastIndex=0,e.test(t))}function ry(e,t){rb(e,"a",t)}function rv(e,t){rb(e,"da",t)}function rb(e,t,n=lV){let r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(rx(t,r,n),n){let e=n.parent;for(;e&&e.parent;)rh(e.parent.vnode)&&function(e,t,n,r){let i=rx(t,e,r,!0);rA(()=>{S(r[t],i)},n)}(r,t,n,e),e=e.parent}}function r_(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function rS(e){return 128&e.shapeFlag?e.ssContent:e}function rx(e,t,n=lV,r=!1){if(n){let i=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...r)=>{eL();let i=lU(n),l=ni(t,n,e,r);return i(),e$(),l});return r?i.unshift(l):i.push(l),l}}let rC=e=>(t,n=lV)=>{lq&&"sp"!==e||rx(e,(...e)=>t(...e),n)},rk=rC("bm"),rT=rC("m"),rw=rC("bu"),rE=rC("u"),rN=rC("bum"),rA=rC("um"),rR=rC("sp"),rI=rC("rtg"),rO=rC("rtc");function rP(e,t=lV){rx("ec",e,t)}let rM="components";function rD(e,t){return rV(rM,e,!0,t)||e}let rL=Symbol.for("v-ndc");function r$(e){return R(e)?rV(rM,e,!1)||e:e||rL}function rF(e){return rV("directives",e)}function rV(e,t,n=!0,r=!1){let i=nx||lV;if(i){let n=i.type;if(e===rM){let e=lY(n,!1);if(e&&(e===t||e===H(t)||e===K(H(t))))return n}let l=rB(i[e]||n[e],t)||rB(i.appContext[e],t);return!l&&r?n:l}}function rB(e,t){return e&&(e[t]||e[H(t)]||e[K(H(t))])}function rU(e,t,n,r){let i;let l=n&&n[r],s=k(e);if(s||R(e)){let n=s&&tO(e),r=!1;n&&(r=!tM(e),e=eG(e)),i=Array(e.length);for(let n=0,s=e.length;nt(e,n,void 0,l&&l[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,s=n.length;r{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function rH(e,t,n={},r,i){if(nx.ce||nx.parent&&rd(nx.parent)&&nx.parent.ce)return"default"!==t&&(n.name=t),lp(),lv(ls,null,[lT("slot",n,r&&r())],64);let l=e[t];l&&l._c&&(l._d=!1),lp();let s=l&&rq(l(n)),o=lv(ls,{key:(n.key||s&&s.key||`_${t}`)+(!s&&r?"_fb":"")},s||(r?r():[]),s&&1===e._?64:-2);return!i&&o.scopeId&&(o.slotScopeIds=[o.scopeId+"-s"]),l&&l._c&&(l._d=!0),o}function rq(e){return e.some(e=>!lb(e)||!!(e.type!==la&&(e.type!==ls||rq(e.children))))?e:null}function rW(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:z(r)]=e[r];return n}let rK=e=>e?lH(e)?lZ(e):rK(e.parent):null,rz=/* @__PURE__ */_(/* @__PURE__ */Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>rK(e.parent),$root:e=>rK(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>il(e),$forceUpdate:e=>e.f||(e.f=()=>{ng(e.update)}),$nextTick:e=>e.n||(e.n=nm.bind(e.proxy)),$watch:e=>iX.bind(e)}),rG=(e,t)=>e!==f&&!e.__isScriptSetup&&C(e,t),rJ={get({_:e},t){let n,r,i;if("__v_skip"===t)return!0;let{ctx:l,setupState:s,data:o,props:a,accessCache:c,type:u,appContext:d}=e;if("$"!==t[0]){let r=c[t];if(void 0!==r)switch(r){case 1:return s[t];case 2:return o[t];case 4:return l[t];case 3:return a[t]}else{if(rG(s,t))return c[t]=1,s[t];if(o!==f&&C(o,t))return c[t]=2,o[t];if((n=e.propsOptions[0])&&C(n,t))return c[t]=3,a[t];if(l!==f&&C(l,t))return c[t]=4,l[t];ir&&(c[t]=0)}}let p=rz[t];return p?("$attrs"===t&&eW(e.attrs,"get",""),p(e)):(r=u.__cssModules)&&(r=r[t])?r:l!==f&&C(l,t)?(c[t]=4,l[t]):C(i=d.config.globalProperties,t)?i[t]:void 0},set({_:e},t,n){let{data:r,setupState:i,ctx:l}=e;return rG(i,t)?(i[t]=n,!0):r!==f&&C(r,t)?(r[t]=n,!0):!C(e.props,t)&&!("$"===t[0]&&t.slice(1) in e)&&(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:l}},s){let o;return!!n[s]||e!==f&&C(e,s)||rG(t,s)||(o=l[0])&&C(o,s)||C(r,s)||C(rz,s)||C(i.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:C(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},rQ=/* @__PURE__ */_({},rJ,{get(e,t){if(t!==Symbol.unscopables)return rJ.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!ee(t)});function rX(){return null}function rZ(){return null}function rY(e){}function r0(e){}function r1(){return null}function r2(){}function r6(e,t){return null}function r3(){return r8().slots}function r4(){return r8().attrs}function r8(){let e=lB();return e.setupContext||(e.setupContext=lX(e))}function r5(e){return k(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function r9(e,t){let n=r5(e);for(let e in t){if(e.startsWith("__skip"))continue;let r=n[e];r?k(r)||A(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:null===r&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function r7(e,t){return e&&t?k(e)&&k(t)?e.concat(t):_({},r5(e),r5(t)):e||t}function ie(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function it(e){let t=lB(),n=e();return lj(),P(n)&&(n=n.catch(e=>{throw lU(t),e})),[n,()=>lU(t)]}let ir=!0;function ii(e,t,n){ni(k(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function il(e){let t;let n=e.type,{mixins:r,extends:i}=n,{mixins:l,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:l.length||r||i?(t={},l.length&&l.forEach(e=>is(t,e,o,!0)),is(t,n,o)):t=n,O(n)&&s.set(n,t),t}function is(e,t,n,r=!1){let{mixins:i,extends:l}=t;for(let s in l&&is(e,l,n,!0),i&&i.forEach(t=>is(e,t,n,!0)),t)if(r&&"expose"===s);else{let r=io[s]||n&&n[s];e[s]=r?r(e[s],t[s]):t[s]}return e}let io={data:ia,props:ip,emits:ip,methods:id,computed:id,beforeCreate:iu,created:iu,beforeMount:iu,mounted:iu,beforeUpdate:iu,updated:iu,beforeDestroy:iu,beforeUnmount:iu,destroyed:iu,unmounted:iu,activated:iu,deactivated:iu,errorCaptured:iu,serverPrefetch:iu,components:id,directives:id,watch:function(e,t){if(!e)return t;if(!t)return e;let n=_(/* @__PURE__ */Object.create(null),e);for(let r in t)n[r]=iu(e[r],t[r]);return n},provide:ia,inject:function(e,t){return id(ic(e),ic(t))}};function ia(e,t){return t?e?function(){return _(A(e)?e.call(this,this):e,A(t)?t.call(this,this):t)}:t:e}function ic(e){if(k(e)){let t={};for(let n=0;n1)return n&&A(t)?t.call(r&&r.proxy):t}}function ib(){return!!(lV||nx||ig)}let i_={},iS=()=>Object.create(i_),ix=e=>Object.getPrototypeOf(e)===i_;function iC(e,t,n,r){let i;let[l,s]=e.propsOptions,o=!1;if(t)for(let a in t){let c;if(V(a))continue;let u=t[a];l&&C(l,c=H(a))?s&&s.includes(c)?(i||(i={}))[c]=u:n[c]=u:i2(e.emitsOptions,a)||a in r&&u===r[a]||(r[a]=u,o=!0)}if(s){let t=tL(n),r=i||f;for(let i=0;i"_"===e[0]||"$stable"===e,iN=e=>k(e)?e.map(lI):[lI(e)],iA=(e,t,n)=>{if(t._n)return t;let r=nN((...e)=>iN(t(...e)),n);return r._c=!1,r},iR=(e,t,n)=>{let r=e._ctx;for(let n in e){if(iE(n))continue;let i=e[n];if(A(i))t[n]=iA(n,i,r);else if(null!=i){let e=iN(i);t[n]=()=>e}}},iI=(e,t)=>{let n=iN(t);e.slots.default=()=>n},iO=(e,t,n)=>{for(let r in t)(n||"_"!==r)&&(e[r]=t[r])},iP=(e,t,n)=>{let r=e.slots=iS();if(32&e.vnode.shapeFlag){let e=t._;e?(iO(r,t,n),n&&Q(r,"_",e,!0)):iR(t,r)}else t&&iI(e,t)},iM=(e,t,n)=>{let{vnode:r,slots:i}=e,l=!0,s=f;if(32&r.shapeFlag){let e=t._;e?n&&1===e?l=!1:iO(i,t,n):(l=!t.$stable,iR(t,i)),s=t}else t&&(iI(e,t),s={default:1});if(l)for(let e in i)iE(e)||null!=s[e]||delete i[e]},iD=li;function iL(e){return iF(e)}function i$(e){return iF(e,rr)}function iF(e,t){var n;let r,i;Y().__VUE__=!0;let{insert:l,remove:s,patchProp:o,createElement:a,createText:c,createComment:u,setText:d,setElementText:p,parentNode:g,nextSibling:y,setScopeId:b=m,insertStaticContent:S}=e,x=(e,t,n,r=null,i=null,l=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!l_(e,t)&&(r=ei(e),Z(e,i,l,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:c,ref:u,shapeFlag:d}=t;switch(c){case lo:k(e,t,n,r);break;case la:T(e,t,n,r);break;case lc:null==e&&w(t,n,r,s);break;case ls:F(e,t,n,r,i,l,s,o,a);break;default:1&d?R(e,t,n,r,i,l,s,o,a):6&d?B(e,t,n,r,i,l,s,o,a):64&d?c.process(e,t,n,r,i,l,s,o,a,eo):128&d&&c.process(e,t,n,r,i,l,s,o,a,eo)}null!=u&&i&&n8(u,e&&e.ref,l,t||e,!t)},k=(e,t,n,r)=>{if(null==e)l(t.el=c(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&d(n,t.children)}},T=(e,t,n,r)=>{null==e?l(t.el=u(t.children||""),n,r):t.el=e.el},w=(e,t,n,r)=>{[e.el,e.anchor]=S(e.children,t,n,r,e.el,e.anchor)},E=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=y(e),l(e,n,r),e=i;l(t,n,r)},N=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=y(e),s(e),e=n;s(t)},R=(e,t,n,r,i,l,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?I(t,n,r,i,l,s,o,a):D(e,t,i,l,s,o,a)},I=(e,t,n,r,i,s,c,u)=>{let d,f;let{props:h,shapeFlag:m,transition:g,dirs:y}=e;if(d=e.el=a(e.type,s,h&&h.is,h),8&m?p(d,e.children):16&m&&M(e.children,d,null,r,i,iV(e,s),c,u),y&&nR(e,null,r,"created"),P(d,e,e.scopeId,c,r),h){for(let e in h)"value"===e||V(e)||o(d,e,null,h[e],s,r);"value"in h&&o(d,"value",null,h.value,s),(f=h.onVnodeBeforeMount)&&lD(f,r,e)}y&&nR(e,null,r,"beforeMount");let b=iU(i,g);b&&g.beforeEnter(d),l(d,t,n),((f=h&&h.onVnodeMounted)||b||y)&&iD(()=>{f&&lD(f,r,e),b&&g.enter(d),y&&nR(e,null,r,"mounted")},i)},P=(e,t,n,r,i)=>{if(n&&b(e,n),r)for(let t=0;t{for(let c=a;c{let a;let c=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:h}=t;u|=16&e.patchFlag;let m=e.props||f,g=t.props||f;if(n&&iB(n,!1),(a=g.onVnodeBeforeUpdate)&&lD(a,n,t,e),h&&nR(t,e,n,"beforeUpdate"),n&&iB(n,!0),(m.innerHTML&&null==g.innerHTML||m.textContent&&null==g.textContent)&&p(c,""),d?L(e.dynamicChildren,d,c,n,r,iV(t,i),l):s||z(e,t,c,null,n,r,iV(t,i),l,!1),u>0){if(16&u)$(c,m,g,n,i);else if(2&u&&m.class!==g.class&&o(c,"class",null,g.class,i),4&u&&o(c,"style",m.style,g.style,i),8&u){let e=t.dynamicProps;for(let t=0;t{a&&lD(a,n,t,e),h&&nR(t,e,n,"updated")},r)},L=(e,t,n,r,i,l,s)=>{for(let o=0;o{if(t!==n){if(t!==f)for(let l in t)V(l)||l in n||o(e,l,t[l],null,i,r);for(let l in n){if(V(l))continue;let s=n[l],a=t[l];s!==a&&"value"!==l&&o(e,l,a,s,i,r)}"value"in n&&o(e,"value",t.value,n.value,i)}},F=(e,t,n,r,i,s,o,a,u)=>{let d=t.el=e?e.el:c(""),p=t.anchor=e?e.anchor:c(""),{patchFlag:f,dynamicChildren:h,slotScopeIds:m}=t;m&&(a=a?a.concat(m):m),null==e?(l(d,n,r),l(p,n,r),M(t.children||[],n,p,i,s,o,a,u)):f>0&&64&f&&h&&e.dynamicChildren?(L(e.dynamicChildren,h,n,i,s,o,a),(null!=t.key||i&&t===i.subTree)&&ij(e,t,!0)):z(e,t,n,p,i,s,o,a,u)},B=(e,t,n,r,i,l,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?i.ctx.activate(t,n,r,s,a):U(t,n,r,i,l,s,a):j(e,t,a)},U=(e,t,n,r,i,l,s)=>{let o=e.component=lF(e,r,i);rh(e)&&(o.ctx.renderer=eo),lW(o,!1,s),o.asyncDep?(i&&i.registerDep(o,q,s),e.el||T(null,o.subTree=lT(la),t,n)):q(o,e,t,n,i,l,s)},j=(e,t,n)=>{let r=t.component=e.component;if(function(e,t,n){let{props:r,children:i,component:l}=e,{props:s,children:o,patchFlag:a}=t,c=l.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!i||!!o)&&(!o||!o.$stable)||r!==s&&(r?!s||i8(r,s,c):!!s);if(1024&a)return!0;if(16&a)return r?i8(r,s,c):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t{let a=()=>{if(e.isMounted){let t,{next:n,bu:r,u:i,parent:c,vnode:u}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=u.el,K(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let d=n;iB(e,!1),n?(n.el=u.el,K(e,n,o)):n=u,r&&J(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&lD(t,c,n,u),iB(e,!0);let p=i6(e),f=e.subTree;e.subTree=p,x(f,p,g(f.el),ei(f),e,l,s),n.el=p.el,null===d&&i5(e,p.el),i&&iD(i,l),(t=n.props&&n.props.onVnodeUpdated)&&iD(()=>lD(t,c,n,u),l)}else{let o;let{el:a,props:c}=t,{bm:u,m:d,parent:p,root:f,type:h}=e,m=rd(t);if(iB(e,!1),u&&J(u),!m&&(o=c&&c.onVnodeBeforeMount)&&lD(o,p,t),iB(e,!0),a&&i){let t=()=>{e.subTree=i6(e),i(a,e.subTree,e,l,null)};m&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{f.ce&&f.ce._injectChildStyle(h);let i=e.subTree=i6(e);x(null,i,n,r,e,l,s),t.el=i.el}if(d&&iD(d,l),!m&&(o=c&&c.onVnodeMounted)){let e=t;iD(()=>lD(o,p,e),l)}(256&t.shapeFlag||p&&rd(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&iD(e.a,l),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new ek(a);e.scope.off();let u=e.update=c.run.bind(c),d=e.job=c.runIfDirty.bind(c);d.i=e,d.id=e.uid,c.scheduler=()=>ng(d),iB(e,!0),u()},K=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){let{props:i,attrs:l,vnode:{patchFlag:s}}=e,o=tL(i),[a]=e.propsOptions,c=!1;if((r||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let r=0;r{let c=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:h}=t;if(f>0){if(128&f){Q(c,d,n,r,i,l,s,o,a);return}if(256&f){G(c,d,n,r,i,l,s,o,a);return}}8&h?(16&u&&er(c,i,l),d!==c&&p(n,d)):16&u?16&h?Q(c,d,n,r,i,l,s,o,a):er(c,i,l,!0):(8&u&&p(n,""),16&h&&M(d,n,r,i,l,s,o,a))},G=(e,t,n,r,i,l,s,o,a)=>{let c;e=e||h,t=t||h;let u=e.length,d=t.length,p=Math.min(u,d);for(c=0;cd?er(e,i,l,!0,!1,p):M(t,n,r,i,l,s,o,a,p)},Q=(e,t,n,r,i,l,s,o,a)=>{let c=0,u=t.length,d=e.length-1,p=u-1;for(;c<=d&&c<=p;){let r=e[c],u=t[c]=a?lO(t[c]):lI(t[c]);if(l_(r,u))x(r,u,n,null,i,l,s,o,a);else break;c++}for(;c<=d&&c<=p;){let r=e[d],c=t[p]=a?lO(t[p]):lI(t[p]);if(l_(r,c))x(r,c,n,null,i,l,s,o,a);else break;d--,p--}if(c>d){if(c<=p){let e=p+1,d=ep)for(;c<=d;)Z(e[c],i,l,!0),c++;else{let f;let m=c,g=c,y=/* @__PURE__ */new Map;for(c=g;c<=p;c++){let e=t[c]=a?lO(t[c]):lI(t[c]);null!=e.key&&y.set(e.key,c)}let b=0,_=p-g+1,S=!1,C=0,k=Array(_);for(c=0;c<_;c++)k[c]=0;for(c=m;c<=d;c++){let r;let u=e[c];if(b>=_){Z(u,i,l,!0);continue}if(null!=u.key)r=y.get(u.key);else for(f=g;f<=p;f++)if(0===k[f-g]&&l_(u,t[f])){r=f;break}void 0===r?Z(u,i,l,!0):(k[r-g]=c+1,r>=C?C=r:S=!0,x(u,t[r],n,null,i,l,s,o,a),b++)}let T=S?function(e){let t,n,r,i,l;let s=e.slice(),o=[0],a=e.length;for(t=0;t>1]]0&&(s[t]=o[r-1]),o[r]=t)}}for(r=o.length,i=o[r-1];r-- >0;)o[r]=i,i=s[i];return o}(k):h;for(f=T.length-1,c=_-1;c>=0;c--){let e=g+c,d=t[e],p=e+1{let{el:s,type:o,transition:a,children:c,shapeFlag:u}=e;if(6&u){X(e.component.subTree,t,n,r);return}if(128&u){e.suspense.move(t,n,r);return}if(64&u){o.move(e,t,n,eo);return}if(o===ls){l(s,t,n);for(let e=0;ea.enter(s),i);else{let{leave:e,delayLeave:r,afterLeave:i}=a,o=()=>l(s,t,n),c=()=>{e(s,()=>{o(),i&&i()})};r?r(s,o,c):c()}}else l(s,t,n)},Z=(e,t,n,r=!1,i=!1)=>{let l;let{type:s,props:o,ref:a,children:c,dynamicChildren:u,shapeFlag:d,patchFlag:p,dirs:f,cacheIndex:h}=e;if(-2===p&&(i=!1),null!=a&&n8(a,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&d){t.ctx.deactivate(e);return}let m=1&d&&f,g=!rd(e);if(g&&(l=o&&o.onVnodeBeforeUnmount)&&lD(l,t,e),6&d)en(e.component,n,r);else{if(128&d){e.suspense.unmount(n,r);return}m&&nR(e,null,t,"beforeUnmount"),64&d?e.type.remove(e,t,n,eo,r):u&&!u.hasOnce&&(s!==ls||p>0&&64&p)?er(u,t,n,!1,!0):(s===ls&&384&p||!i&&16&d)&&er(c,t,n),r&&ee(e)}(g&&(l=o&&o.onVnodeUnmounted)||m)&&iD(()=>{l&&lD(l,t,e),m&&nR(e,null,t,"unmounted")},n)},ee=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===ls){et(n,r);return}if(t===lc){N(e);return}let l=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,s=()=>t(n,l);r?r(e.el,l,s):s()}else l()},et=(e,t)=>{let n;for(;e!==t;)n=y(e),s(e),e=n;s(t)},en=(e,t,n)=>{let{bum:r,scope:i,job:l,subTree:s,um:o,m:a,a:c}=e;iH(a),iH(c),r&&J(r),i.stop(),l&&(l.flags|=8,Z(s,e,t,n)),o&&iD(o,t),iD(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},er=(e,t,n,r=!1,i=!1,l=0)=>{for(let s=l;s{if(6&e.shapeFlag)return ei(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=y(e.anchor||e.el),n=t&&t[nI];return n?y(n):t},el=!1,es=(e,t,n)=>{null==e?t._vnode&&Z(t._vnode,null,null,!0):x(t._vnode||null,e,t,null,null,null,n),t._vnode=e,el||(el=!0,nb(),n_(),el=!1)},eo={p:x,um:Z,m:X,r:ee,mt:U,mc:M,pc:z,pbc:L,n:ei,o:e};return t&&([r,i]=t(eo)),{render:es,hydrate:r,createApp:(n=r,function(e,t=null){A(e)||(e=_({},e)),null==t||O(t)||(t=null);let r=ih(),i=/* @__PURE__ */new WeakSet,l=[],s=!1,o=r.app={_uid:im++,_component:e,_props:t,_container:null,_context:r,_instance:null,version:l4,get config(){return r.config},set config(v){},use:(e,...t)=>(i.has(e)||(e&&A(e.install)?(i.add(e),e.install(o,...t)):A(e)&&(i.add(e),e(o,...t))),o),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),o),component:(e,t)=>t?(r.components[e]=t,o):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,o):r.directives[e],mount(i,l,a){if(!s){let c=o._ceVNode||lT(e,t);return c.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),l&&n?n(c,i):es(c,i,a),s=!0,o._container=i,i.__vue_app__=o,lZ(c.component)}},onUnmount(e){l.push(e)},unmount(){s&&(ni(l,o._instance,16),es(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,o),runWithContext(e){let t=ig;ig=o;try{return e()}finally{ig=t}}};return o})}}function iV({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function iB({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function iU(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ij(e,t,n=!1){let r=e.children,i=t.children;if(k(r)&&k(i))for(let e=0;eiv(iq);function iK(e,t){return iQ(e,null,t)}function iz(e,t){return iQ(e,null,{flush:"post"})}function iG(e,t){return iQ(e,null,{flush:"sync"})}function iJ(e,t,n){return iQ(e,t,n)}function iQ(e,t,n=f){let r;let{immediate:i,deep:l,flush:s,once:o}=n,a=_({},n);if(lq){if("sync"===s){let e=iW();r=e.__watcherHandles||(e.__watcherHandles=[])}else{if(t&&!i)return{stop:m,resume:m,pause:m};a.once=!0}}let c=lV;a.call=(e,t,n)=>ni(e,c,t,n);let d=!1;"post"===s?a.scheduler=e=>{iD(e,c&&c.suspense)}:"sync"!==s&&(d=!0,a.scheduler=(e,t)=>{t?e():ng(e)}),a.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,c&&(e.id=c.uid,e.i=c))};let p=function(e,t,n=f){let r,i,l,s;let{immediate:o,deep:a,once:c,scheduler:d,augmentJob:p,call:h}=n,g=e=>a?e:tM(e)||!1===a||0===a?ne(e,1):ne(e),y=!1,b=!1;if(tB(e)?(i=()=>e.value,y=tM(e)):tO(e)?(i=()=>g(e),y=!0):k(e)?(b=!0,y=e.some(e=>tO(e)||tM(e)),i=()=>e.map(e=>tB(e)?e.value:tO(e)?g(e):A(e)?h?h(e,2):e():void 0)):i=A(e)?t?h?()=>h(e,2):e:()=>{if(l){eL();try{l()}finally{e$()}}let t=u;u=r;try{return h?h(e,3,[s]):e(s)}finally{u=t}}:m,t&&a){let e=i,t=!0===a?1/0:a;i=()=>ne(e(),t)}let _=eS(),x=()=>{r.stop(),_&&S(_.effects,r)};if(c){if(t){let e=t;t=(...t)=>{e(...t),x()}}else{let e=i;i=()=>{e(),x()}}}let C=b?Array(e.length).fill(t8):t8,T=e=>{if(1&r.flags&&(r.dirty||e)){if(t){let e=r.run();if(a||y||(b?e.some((e,t)=>G(e,C[t])):G(e,C))){l&&l();let n=u;u=r;try{let n=[e,C===t8?void 0:b&&C[0]===t8?[]:C,s];h?h(t,3,n):t(...n),C=e}finally{u=n}}}else r.run()}};return p&&p(T),(r=new ek(i)).scheduler=d?()=>d(T,!1):T,s=e=>t7(e,!1,r),l=r.onStop=()=>{let e=t5.get(r);if(e){if(h)h(e,4);else for(let t of e)t();t5.delete(r)}},t?o?T(!0):C=r.run():d?d(T.bind(null,!0),!0):r.run(),x.pause=r.pause.bind(r),x.resume=r.resume.bind(r),x.stop=x,x}(e,t,a);return r&&r.push(p),p}function iX(e,t,n){let r;let i=this.proxy,l=R(e)?e.includes(".")?iZ(i,e):()=>i[e]:e.bind(i,i);A(t)?r=t:(r=t.handler,n=t);let s=lU(this),o=iQ(l,r.bind(i),n);return s(),o}function iZ(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e{let a,c;let u=f;return iG(()=>{let n=e[t];G(a,n)&&(a=n,o())}),{get:()=>(s(),n.get?n.get(a):a),set(e){let s=n.set?n.set(e):e;if(!G(s,a)&&!(u!==f&&G(e,u)))return;let d=r.vnode.props;d&&(t in d||i in d||l in d)&&(`onUpdate:${t}` in d||`onUpdate:${i}` in d||`onUpdate:${l}` in d)||(a=e,o()),r.emit(`update:${t}`,s),G(e,s)&&G(e,u)&&!G(s,c)&&o(),u=e,c=s}}});return o[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?s||f:o,done:!1}:{done:!0}}},o}let i0=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${H(t)}Modifiers`]||e[`${W(t)}Modifiers`];function i1(e,t,...n){let r;if(e.isUnmounted)return;let i=e.vnode.props||f,l=n,s=t.startsWith("update:"),o=s&&i0(i,t.slice(7));o&&(o.trim&&(l=n.map(e=>R(e)?e.trim():e)),o.number&&(l=n.map(X)));let a=i[r=z(t)]||i[r=z(H(t))];!a&&s&&(a=i[r=z(W(t))]),a&&ni(a,e,6,l);let c=i[r+"Once"];if(c){if(e.emitted){if(e.emitted[r])return}else e.emitted={};e.emitted[r]=!0,ni(c,e,6,l)}}function i2(e,t){return!!(e&&y(t))&&(C(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||C(e,W(t))||C(e,t))}function i6(e){let t,n;let{type:r,vnode:i,proxy:l,withProxy:s,propsOptions:[o],slots:a,attrs:c,emit:u,render:d,renderCache:p,props:f,data:h,setupState:m,ctx:g,inheritAttrs:y}=e,_=nk(e);try{if(4&i.shapeFlag){let e=s||l;t=lI(d.call(e,e,p,f,m,h,g)),n=c}else t=lI(r.length>1?r(f,{attrs:c,slots:a,emit:u}):r(f,null)),n=r.props?c:i3(c)}catch(n){lu.length=0,nl(n,e,1),t=lT(la)}let S=t;if(n&&!1!==y){let e=Object.keys(n),{shapeFlag:t}=S;e.length&&7&t&&(o&&e.some(b)&&(n=i4(n,o)),S=lE(S,n,!1,!0))}return i.dirs&&((S=lE(S,null,!1,!0)).dirs=S.dirs?S.dirs.concat(i.dirs):i.dirs),i.transition&&n0(S,i.transition),t=S,nk(_),t}let i3=e=>{let t;for(let n in e)("class"===n||"style"===n||y(n))&&((t||(t={}))[n]=e[n]);return t},i4=(e,t)=>{let n={};for(let r in e)b(r)&&r.slice(9) in t||(n[r]=e[r]);return n};function i8(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;ie.__isSuspense,i7=0,le={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,l,s,o,a,c){if(null==e)!function(e,t,n,r,i,l,s,o,a){let{p:c,o:{createElement:u}}=a,d=u("div"),p=e.suspense=ln(e,i,r,t,d,n,l,s,o,a);c(null,p.pendingBranch=e.ssContent,d,null,r,p,l,s),p.deps>0?(lt(e,"onPending"),lt(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,l,s),ll(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,r,i,l,s,o,a,c);else{if(l&&l.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}!function(e,t,n,r,i,l,s,o,{p:a,um:c,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let p=t.ssContent,f=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:y}=d;if(m)d.pendingBranch=p,l_(p,m)?(a(m,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0?d.resolve():g&&!y&&(a(h,f,n,r,i,null,l,s,o),ll(d,f))):(d.pendingId=i7++,y?(d.isHydrating=!1,d.activeBranch=m):c(m,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),g?(a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0?d.resolve():(a(h,f,n,r,i,null,l,s,o),ll(d,f))):h&&l_(p,h)?(a(h,p,n,r,i,d,l,s,o),d.resolve(!0)):(a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0&&d.resolve()));else if(h&&l_(p,h))a(h,p,n,r,i,d,l,s,o),ll(d,p);else if(lt(t,"onPending"),d.pendingBranch=p,512&p.shapeFlag?d.pendingId=p.component.suspenseId:d.pendingId=i7++,a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(f)},e):0===e&&d.fallback(f)}}(e,t,n,r,i,s,o,a,c)}},hydrate:function(e,t,n,r,i,l,s,o,a){let c=t.suspense=ln(t,r,n,e.parentNode,document.createElement("div"),null,i,l,s,o,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,l,s);return 0===c.deps&&c.resolve(!1,!0),u},normalize:function(e){let{shapeFlag:t,children:n}=e,r=32&t;e.ssContent=lr(r?n.default:n),e.ssFallback=r?lr(n.fallback):lT(la)}};function lt(e,t){let n=e.props&&e.props[t];A(n)&&n()}function ln(e,t,n,r,i,l,s,o,a,c,u=!1){let d;let{p:p,m:f,um:h,n:m,o:{parentNode:g,remove:y}}=c,b=function(e){let t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);b&&t&&t.pendingBranch&&(d=t.pendingId,t.deps++);let _=e.props?Z(e.props.timeout):void 0,S=l,x={vnode:e,parent:t,parentComponent:n,namespace:s,container:r,hiddenContainer:i,deps:0,pendingId:i7++,timeout:"number"==typeof _?_:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:s,pendingId:o,effects:a,parentComponent:c,container:u}=x,p=!1;x.isHydrating?x.isHydrating=!1:e||((p=i&&s.transition&&"out-in"===s.transition.mode)&&(i.transition.afterLeave=()=>{o===x.pendingId&&(f(s,u,l===S?m(i):l,0),nv(a))}),i&&(g(i.el)===u&&(l=m(i)),h(i,c,x,!0)),p||f(s,u,l,0)),ll(x,s),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,_=!1;for(;y;){if(y.pendingBranch){y.effects.push(...a),_=!0;break}y=y.parent}_||p||nv(a),x.effects=[],b&&t&&t.pendingBranch&&d===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),lt(r,"onResolve")},fallback(e){if(!x.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:l}=x;lt(t,"onFallback");let s=m(n),c=()=>{x.isInFallback&&(p(null,e,i,s,r,null,l,o,a),ll(x,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=c),x.isInFallback=!0,h(n,r,null,!0),u||c()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next:()=>x.activeBranch&&m(x.activeBranch),registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{nl(t,e,0)}).then(l=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:o}=e;lK(e,l,!1),i&&(o.el=i);let a=!i&&e.subTree.el;t(e,o,g(i||e.subTree.el),i?null:m(e.subTree),x,s,n),a&&y(a),i5(e,o.el),r&&0==--x.deps&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&h(x.activeBranch,n,e,t),x.pendingBranch&&h(x.pendingBranch,n,e,t)}};return x}function lr(e){let t;if(A(e)){let n=lh&&e._c;n&&(e._d=!1,lp()),e=e(),n&&(e._d=!0,t=ld,lf())}return k(e)&&(e=function(e,t=!0){let n;for(let t=0;tt!==e)),e}function li(e,t){t&&t.pendingBranch?k(e)?t.effects.push(...e):t.effects.push(e):nv(e)}function ll(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)i=(t=t.component.subTree).el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,i5(r,i))}let ls=Symbol.for("v-fgt"),lo=Symbol.for("v-txt"),la=Symbol.for("v-cmt"),lc=Symbol.for("v-stc"),lu=[],ld=null;function lp(e=!1){lu.push(ld=e?null:[])}function lf(){lu.pop(),ld=lu[lu.length-1]||null}let lh=1;function lm(e){lh+=e,e<0&&ld&&(ld.hasOnce=!0)}function lg(e){return e.dynamicChildren=lh>0?ld||h:null,lf(),lh>0&&ld&&ld.push(e),e}function ly(e,t,n,r,i,l){return lg(lk(e,t,n,r,i,l,!0))}function lv(e,t,n,r,i){return lg(lT(e,t,n,r,i,!0))}function lb(e){return!!e&&!0===e.__v_isVNode}function l_(e,t){return e.type===t.type&&e.key===t.key}function lS(e){}let lx=({key:e})=>null!=e?e:null,lC=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?R(e)||tB(e)||A(e)?{i:nx,r:e,k:t,f:!!n}:e:null);function lk(e,t=null,n=null,r=0,i=null,l=e===ls?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&lx(t),ref:t&&lC(t),scopeId:nC,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:nx};return o?(lP(a,n),128&l&&e.normalize(a)):n&&(a.shapeFlag|=R(n)?8:16),lh>0&&!s&&ld&&(a.patchFlag>0||6&l)&&32!==a.patchFlag&&ld.push(a),a}let lT=function(e,t=null,n=null,r=0,i=null,l=!1){var s;if(e&&e!==rL||(e=la),lb(e)){let r=lE(e,t,!0);return n&&lP(r,n),lh>0&&!l&&ld&&(6&r.shapeFlag?ld[ld.indexOf(e)]=r:ld.push(r)),r.patchFlag=-2,r}if(A(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=lw(t);e&&!R(e)&&(t.class=es(e)),O(n)&&(tD(n)&&!k(n)&&(n=_({},n)),t.style=et(n))}let o=R(e)?1:i9(e)?128:nO(e)?64:O(e)?4:A(e)?2:0;return lk(e,t,n,r,i,o,l,!0)};function lw(e){return e?tD(e)||ix(e)?_({},e):e:null}function lE(e,t,n=!1,r=!1){let{props:i,ref:l,patchFlag:s,children:o,transition:a}=e,c=t?lM(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&lx(c),ref:t&&t.ref?n&&l?k(l)?l.concat(lC(t)):[l,lC(t)]:lC(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ls?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&lE(e.ssContent),ssFallback:e.ssFallback&&lE(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&r&&n0(u,a.clone(u)),u}function lN(e=" ",t=0){return lT(lo,null,e,t)}function lA(e,t){let n=lT(lc,null,e);return n.staticCount=t,n}function lR(e="",t=!1){return t?(lp(),lv(la,null,e)):lT(la,null,e)}function lI(e){return null==e||"boolean"==typeof e?lT(la):k(e)?lT(ls,null,e.slice()):"object"==typeof e?lO(e):lT(lo,null,String(e))}function lO(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:lE(e)}function lP(e,t){let n=0,{shapeFlag:r}=e;if(null==t)t=null;else if(k(t))n=16;else if("object"==typeof t){if(65&r){let n=t.default;n&&(n._c&&(n._d=!1),lP(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;r||ix(t)?3===r&&nx&&(1===nx.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=nx}}else A(t)?(t={default:t,_ctx:nx},n=32):(t=String(t),64&r?(n=16,t=[lN(t)]):n=8);e.children=t,e.shapeFlag|=n}function lM(...e){let t={};for(let n=0;n{c=!0;let[r,i]=e(t,n,!0);_(o,r),i&&a.push(...i)};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}if(!s&&!c)return O(t)&&i.set(t,h),h;if(k(s))for(let e=0;e{let r=e(t,n,!0);r&&(a=!0,_(o,r))};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}return s||a?(k(s)?s.forEach(e=>o[e]=null):_(o,s),O(t)&&i.set(t,o),o):(O(t)&&i.set(t,null),null)}(r,i),emit:null,emitted:null,propsDefaults:f,inheritAttrs:r.inheritAttrs,ctx:f,data:f,props:f,attrs:f,slots:f,refs:f,setupState:f,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=i1.bind(null,l),e.ce&&e.ce(l),l}let lV=null,lB=()=>lV||nx;{let e=Y(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};i=t("__VUE_INSTANCE_SETTERS__",e=>lV=e),l=t("__VUE_SSR_SETTERS__",e=>lq=e)}let lU=e=>{let t=lV;return i(e),e.scope.on(),()=>{e.scope.off(),i(t)}},lj=()=>{lV&&lV.scope.off(),i(null)};function lH(e){return 4&e.vnode.shapeFlag}let lq=!1;function lW(e,t=!1,n=!1){t&&l(t);let{props:r,children:i}=e.vnode,s=lH(e);!function(e,t,n,r=!1){let i={},l=iS();for(let n in e.propsDefaults=/* @__PURE__ */Object.create(null),iC(e,t,i,l),e.propsOptions[0])n in i||(i[n]=void 0);n?e.props=r?i:tN(i):e.type.props?e.props=i:e.props=l,e.attrs=l}(e,r,s,t),iP(e,i,n);let o=s?function(e,t){let n=e.type;e.accessCache=/* @__PURE__ */Object.create(null),e.proxy=new Proxy(e.ctx,rJ);let{setup:r}=n;if(r){let n=e.setupContext=r.length>1?lX(e):null,i=lU(e);eL();let l=nr(r,e,0,[e.props,n]);if(e$(),i(),P(l)){if(rd(e)||n3(e),l.then(lj,lj),t)return l.then(n=>{lK(e,n,t)}).catch(t=>{nl(t,e,0)});e.asyncDep=l}else lK(e,l,t)}else lJ(e,t)}(e,t):void 0;return t&&l(!1),o}function lK(e,t,n){A(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:O(t)&&(e.setupState=tJ(t)),lJ(e,n)}function lz(e){s=e,o=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,rQ))}}let lG=()=>!s;function lJ(e,t,n){let r=e.type;if(!e.render){if(!t&&s&&!r.render){let t=r.template||il(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:o}=r,a=_(_({isCustomElement:n,delimiters:l},i),o);r.render=s(t,a)}}e.render=r.render||m,o&&o(e)}{let t=lU(e);eL();try{!function(e){let t=il(e),n=e.proxy,r=e.ctx;ir=!1,t.beforeCreate&&ii(t.beforeCreate,e,"bc");let{data:i,computed:l,methods:s,watch:o,provide:a,inject:c,created:u,beforeMount:d,mounted:p,beforeUpdate:f,updated:h,activated:g,deactivated:y,beforeDestroy:b,beforeUnmount:_,destroyed:S,unmounted:x,render:C,renderTracked:T,renderTriggered:w,errorCaptured:E,serverPrefetch:N,expose:I,inheritAttrs:P,components:M,directives:D,filters:L}=t;if(c&&function(e,t,n=m){for(let n in k(e)&&(e=ic(e)),e){let r;let i=e[n];tB(r=O(i)?"default"in i?iv(i.from||n,i.default,!0):iv(i.from||n):iv(i))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[n]=r}}(c,r,null),s)for(let e in s){let t=s[e];A(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);O(t)&&(e.data=tE(t))}if(ir=!0,l)for(let e in l){let t=l[e],i=A(t)?t.bind(n,n):A(t.get)?t.get.bind(n,n):m,s=l0({get:i,set:!A(t)&&A(t.set)?t.set.bind(n):m});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,r,i){let l=i.includes(".")?iZ(r,i):()=>r[i];if(R(t)){let e=n[t];A(e)&&iJ(l,e)}else if(A(t))iJ(l,t.bind(r));else if(O(t)){if(k(t))t.forEach(t=>e(t,n,r,i));else{let e=A(t.handler)?t.handler.bind(r):n[t.handler];A(e)&&iJ(l,e,t)}}}(o[e],r,n,e);if(a){let e=A(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{iy(t,e[t])})}function $(e,t){k(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(u&&ii(u,e,"c"),$(rk,d),$(rT,p),$(rw,f),$(rE,h),$(ry,g),$(rv,y),$(rP,E),$(rO,T),$(rI,w),$(rN,_),$(rA,x),$(rR,N),k(I)){if(I.length){let t=e.exposed||(e.exposed={});I.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}C&&e.render===m&&(e.render=C),null!=P&&(e.inheritAttrs=P),M&&(e.components=M),D&&(e.directives=D),N&&n3(e)}(e)}finally{e$(),t()}}}let lQ={get:(e,t)=>(eW(e,"get",""),e[t])};function lX(e){return{attrs:new Proxy(e.attrs,lQ),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function lZ(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tJ(t$(e.exposed)),{get:(t,n)=>n in t?t[n]:n in rz?rz[n](e):void 0,has:(e,t)=>t in e||t in rz})):e.proxy}function lY(e,t=!0){return A(e)?e.displayName||e.name:e.name||t&&e.__name}let l0=(e,t)=>(function(e,t,n=!1){let r,i;return A(e)?r=e:(r=e.get,i=e.set),new t6(r,i,n)})(e,0,lq);function l1(e,t,n){let r=arguments.length;return 2!==r?(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&lb(n)&&(n=[n]),lT(e,t,n)):!O(t)||k(t)?lT(e,null,t):lb(t)?lT(e,null,[t]):lT(e,t)}function l2(){}function l6(e,t,n,r){let i=n[r];if(i&&l3(i,e))return i;let l=t();return l.memo=e.slice(),l.cacheIndex=r,n[r]=l}function l3(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&ld&&ld.push(e),!0}let l4="3.5.4",l8=m,l5=null,l9=void 0,l7=m,se={createComponentInstance:lF,setupComponent:lW,renderComponentRoot:i6,setCurrentRenderingInstance:nk,isVNode:lb,normalizeVNode:lI,getComponentPublicInstance:lZ,ensureValidVNode:rq,pushWarningContext:function(e){},popWarningContext:function(){}},st=null,sn=null,sr=null,si="undefined"!=typeof window&&window.trustedTypes;if(si)try{d=/* @__PURE__ */si.createPolicy("vue",{createHTML:e=>e})}catch(e){}let sl=d?e=>d.createHTML(e):e=>e,ss="undefined"!=typeof document?document:null,so=ss&&/* @__PURE__ */ss.createElement("template"),sa="transition",sc="animation",su=Symbol("_vtc"),sd={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},sp=/* @__PURE__ */_({},nK,sd),sf=((oR=(e,{slots:t})=>l1(nJ,sg(e),t)).displayName="Transition",oR.props=sp,oR),sh=(e,t=[])=>{k(e)?e.forEach(e=>e(...t)):e&&e(...t)},sm=e=>!!e&&(k(e)?e.some(e=>e.length>1):e.length>1);function sg(e){let t={};for(let n in e)n in sd||(t[n]=e[n]);if(!1===e.css)return t;let{name:n="v",type:r,duration:i,enterFromClass:l=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:a=l,appearActiveClass:c=s,appearToClass:u=o,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(O(e))return[Z(e.enter),Z(e.leave)];{let t=Z(e);return[t,t]}}(i),m=h&&h[0],g=h&&h[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:S,onLeave:x,onLeaveCancelled:C,onBeforeAppear:k=y,onAppear:T=b,onAppearCancelled:w=S}=t,E=(e,t,n)=>{sv(e,t?u:o),sv(e,t?c:s),n&&n()},N=(e,t)=>{e._isLeaving=!1,sv(e,d),sv(e,f),sv(e,p),t&&t()},A=e=>(t,n)=>{let i=e?T:b,s=()=>E(t,e,n);sh(i,[t,s]),sb(()=>{sv(t,e?a:l),sy(t,e?u:o),sm(i)||sS(t,r,m,s)})};return _(t,{onBeforeEnter(e){sh(y,[e]),sy(e,l),sy(e,s)},onBeforeAppear(e){sh(k,[e]),sy(e,a),sy(e,c)},onEnter:A(!1),onAppear:A(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>N(e,t);sy(e,d),sy(e,p),sT(),sb(()=>{e._isLeaving&&(sv(e,d),sy(e,f),sm(x)||sS(e,r,g,n))}),sh(x,[e,n])},onEnterCancelled(e){E(e,!1),sh(S,[e])},onAppearCancelled(e){E(e,!0),sh(w,[e])},onLeaveCancelled(e){N(e),sh(C,[e])}})}function sy(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[su]||(e[su]=/* @__PURE__ */new Set)).add(t)}function sv(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[su];n&&(n.delete(t),n.size||(e[su]=void 0))}function sb(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let s_=0;function sS(e,t,n,r){let i=e._endId=++s_,l=()=>{i===e._endId&&r()};if(n)return setTimeout(l,n);let{type:s,timeout:o,propCount:a}=sx(e,t);if(!s)return r();let c=s+"end",u=0,d=()=>{e.removeEventListener(c,p),l()},p=t=>{t.target===e&&++u>=a&&d()};setTimeout(()=>{u(n[e]||"").split(", "),i=r(`${sa}Delay`),l=r(`${sa}Duration`),s=sC(i,l),o=r(`${sc}Delay`),a=r(`${sc}Duration`),c=sC(o,a),u=null,d=0,p=0;t===sa?s>0&&(u=sa,d=s,p=l.length):t===sc?c>0&&(u=sc,d=c,p=a.length):p=(u=(d=Math.max(s,c))>0?s>c?sa:sc:null)?u===sa?l.length:a.length:0;let f=u===sa&&/\b(transform|all)(,|$)/.test(r(`${sa}Property`).toString());return{type:u,timeout:d,propCount:p,hasTransform:f}}function sC(e,t){for(;e.lengthsk(t)+sk(e[n])))}function sk(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function sT(){return document.body.offsetHeight}let sw=Symbol("_vod"),sE=Symbol("_vsh"),sN={beforeMount(e,{value:t},{transition:n}){e[sw]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):sA(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),sA(e,!0),r.enter(e)):r.leave(e,()=>{sA(e,!1)}):sA(e,t))},beforeUnmount(e,{value:t}){sA(e,t)}};function sA(e,t){e.style.display=t?e[sw]:"none",e[sE]=!t}let sR=Symbol("");function sI(e){let t=lB();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>sO(e,n))},r=()=>{let r=e(t.proxy);t.ce?sO(t.ce,r):function e(t,n){if(128&t.shapeFlag){let r=t.suspense;t=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{e(r.activeBranch,n)})}for(;t.component;)t=t.component.subTree;if(1&t.shapeFlag&&t.el)sO(t.el,n);else if(t.type===ls)t.children.forEach(t=>e(t,n));else if(t.type===lc){let{el:e,anchor:r}=t;for(;e&&(sO(e,n),e!==r);)e=e.nextSibling}}(t.subTree,r),n(r)};rk(()=>{iz(r)}),rT(()=>{let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),rA(()=>e.disconnect())})}function sO(e,t){if(1===e.nodeType){let n=e.style,r="";for(let e in t)n.setProperty(`--${e}`,t[e]),r+=`--${e}: ${t[e]};`;n[sR]=r}}let sP=/(^|;)\s*display\s*:/,sM=/\s*!important$/;function sD(e,t,n){if(k(n))n.forEach(n=>sD(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let r=function(e,t){let n=s$[t];if(n)return n;let r=H(t);if("filter"!==r&&r in e)return s$[t]=r;r=K(r);for(let n=0;nsH||(sq.then(()=>sH=0),sH=Date.now()),sK=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2),sz={};/*! #__NO_SIDE_EFFECTS__ */function sG(e,t,n){let r=n2(e,t);$(r)&&_(r,t);class i extends sX{constructor(e){super(r,e,n)}}return i.def=r,i}/*! #__NO_SIDE_EFFECTS__ */let sJ=(e,t)=>/* @__PURE__ */sG(e,t,oT),sQ="undefined"!=typeof HTMLElement?HTMLElement:class{};class sX extends sQ{constructor(e,t={},n=ok){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=/* @__PURE__ */new WeakSet,this._ob=null,this.shadowRoot&&n!==ok?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof sX){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,nm(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance.ce=void 0,this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{let n;this._resolved=!0,this._pendingResolve=void 0;let{props:r,styles:i}=e;if(r&&!k(r))for(let e in r){let t=r[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=Z(this._props[e])),(n||(n=/* @__PURE__ */Object.create(null)))[H(e)]=!0)}this._numberProps=n,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(i),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)C(this,e)||Object.defineProperty(this,e,{get:()=>tK(t[e])})}_resolveProps(e){let{props:t}=e,n=k(t)?t:Object.keys(t||{});for(let e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(H))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):sz,r=H(e);t&&this._numberProps&&this._numberProps[r]&&(n=Z(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){t!==this._props[e]&&(t===sz?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(W(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(W(e),t+""):t||this.removeAttribute(W(e))))}_update(){ox(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=lT(this._def,_(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,$(t[0])?_({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),W(e)!==e&&t(W(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let r=document.createElement("style");n&&r.setAttribute("nonce",n),r.textContent=e[t],this.shadowRoot.prepend(r)}}_parseSlots(){let e;let t=this._slots={};for(;e=this.firstChild;){let n=1===e.nodeType&&e.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(e),this.removeChild(e)}}_renderSlots(){let e=this.querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n{if(!n.length)return;let t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){let r=e.cloneNode(),i=e[su];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display="none";let l=1===t.nodeType?t:t.parentNode;l.appendChild(r);let{hasTransform:s}=sx(r);return l.removeChild(r),s}(n[0].el,i.vnode.el,t))return;n.forEach(s8),n.forEach(s5);let r=n.filter(s9);sT(),r.forEach(e=>{let n=e.el,r=n.style;sy(n,t),r.transform=r.webkitTransform=r.transitionDuration="";let i=n[s6]=e=>{(!e||e.target===n)&&(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener("transitionend",i),n[s6]=null,sv(n,t))};n.addEventListener("transitionend",i)})}),()=>{let s=tL(e),o=sg(s),a=s.tag||ls;if(n=[],r)for(let e=0;e{let t=e.props["onUpdate:modelValue"]||!1;return k(t)?e=>J(t,e):t};function oe(e){e.target.composing=!0}function ot(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let on=Symbol("_assign"),or={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[on]=s7(i);let l=r||i.props&&"number"===i.props.type;sB(e,t?"change":"input",t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),l&&(r=X(r)),e[on](r)}),n&&sB(e,"change",()=>{e.value=e.value.trim()}),t||(sB(e,"compositionstart",oe),sB(e,"compositionend",ot),sB(e,"change",ot))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:l}},s){if(e[on]=s7(s),e.composing)return;let o=(l||"number"===e.type)&&!/^0\d/.test(e.value)?X(e.value):e.value,a=null==t?"":t;o===a||document.activeElement===e&&"range"!==e.type&&(r&&t===n||i&&e.value.trim()===a)||(e.value=a)}},oi={deep:!0,created(e,t,n){e[on]=s7(n),sB(e,"change",()=>{let t=e._modelValue,n=oc(e),r=e.checked,i=e[on];if(k(t)){let e=eh(t,n),l=-1!==e;if(r&&!l)i(t.concat(n));else if(!r&&l){let n=[...t];n.splice(e,1),i(n)}}else if(w(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(ou(e,r))})},mounted:ol,beforeUpdate(e,t,n){e[on]=s7(n),ol(e,t,n)}};function ol(e,{value:t},n){let r;e._modelValue=t,r=k(t)?eh(t,n.props.value)>-1:w(t)?t.has(n.props.value):ef(t,ou(e,!0)),e.checked!==r&&(e.checked=r)}let os={created(e,{value:t},n){e.checked=ef(t,n.props.value),e[on]=s7(n),sB(e,"change",()=>{e[on](oc(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[on]=s7(r),t!==n&&(e.checked=ef(t,r.props.value))}},oo={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=w(t);sB(e,"change",()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?X(oc(e)):oc(e));e[on](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,nm(()=>{e._assigning=!1})}),e[on]=s7(r)},mounted(e,{value:t}){oa(e,t)},beforeUpdate(e,t,n){e[on]=s7(n)},updated(e,{value:t}){e._assigning||oa(e,t)}};function oa(e,t,n){let r=e.multiple,i=k(t);if(!r||i||w(t)){for(let n=0,l=e.options.length;nString(e)===String(s)):l.selected=eh(t,s)>-1}else l.selected=t.has(s)}else if(ef(oc(l),t)){e.selectedIndex!==n&&(e.selectedIndex=n);return}}r||-1===e.selectedIndex||(e.selectedIndex=-1)}}function oc(e){return"_value"in e?e._value:e.value}function ou(e,t){let n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}let od={created(e,t,n){of(e,t,n,null,"created")},mounted(e,t,n){of(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){of(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){of(e,t,n,r,"updated")}};function op(e,t){switch(e){case"SELECT":return oo;case"TEXTAREA":return or;default:switch(t){case"checkbox":return oi;case"radio":return os;default:return or}}}function of(e,t,n,r,i){let l=op(e.tagName,n.props&&n.props.type)[i];l&&l(e,t,n,r)}let oh=["ctrl","shift","alt","meta"],om={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>oh.some(n=>e[`${n}Key`]&&!t.includes(n))},og=(e,t)=>{let n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(n,...r)=>{for(let e=0;e{let n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=n=>{if(!("key"in n))return;let r=W(n.key);if(t.some(e=>e===r||oy[e]===r))return e(n)})},ob=/* @__PURE__ */_({patchProp:(e,t,n,r,i,l)=>{let s="svg"===i;"class"===t?function(e,t,n){let r=e[su];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,s):"style"===t?function(e,t,n){let r=e.style,i=R(n),l=!1;if(n&&!i){if(t){if(R(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&sD(r,t,"")}else for(let e in t)null==n[e]&&sD(r,e,"")}for(let e in n)"display"===e&&(l=!0),sD(r,e,n[e])}else if(i){if(t!==n){let e=r[sR];e&&(n+=";"+e),r.cssText=n,l=sP.test(n)}}else t&&e.removeAttribute("style");sw in e&&(e[sw]=l?r.display:"",e[sE]&&(r.display="none"))}(e,n,r):y(t)?b(t)||function(e,t,n,r,i=null){let l=e[sU]||(e[sU]={}),s=l[t];if(r&&s)s.value=r;else{let[n,o]=function(e){let t;if(sj.test(e)){let n;for(t={};n=e.match(sj);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):W(e.slice(2)),t]}(t);r?sB(e,n,l[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();ni(function(e,t){if(!k(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=sW(),n}(r,i),o):s&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,s,o),l[t]=void 0)}}(e,t,0,r,l):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,r){if(r)return!!("innerHTML"===t||"textContent"===t||t in e&&sK(t)&&A(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(sK(t)&&R(n))&&!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!R(n)))}(e,t,r,s))?("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),sV(e,t,r,s)):(!function(e,t,n,r){if("innerHTML"===t||"textContent"===t){null!=n&&(e[t]="innerHTML"===t?sl(n):n);return}let i=e.tagName;if("value"===t&&"PROGRESS"!==i&&!i.includes("-")){let r="OPTION"===i?e.getAttribute("value")||"":e.value,l=null==n?"checkbox"===e.type?"on":"":String(n);r===l&&"_value"in e||(e.value=l),null==n&&e.removeAttribute(t),e._value=n;return}let l=!1;if(""===n||null==n){let r=typeof e[t];if("boolean"===r){var s;n=!!(s=n)||""===s}else null==n&&"string"===r?(n="",l=!0):"number"===r&&(n=0,l=!0)}try{e[t]=n}catch(e){}l&&e.removeAttribute(t)}(e,t,r),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||sV(e,t,r,s,l,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i="svg"===t?ss.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?ss.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?ss.createElement(e,{is:n}):ss.createElement(e);return"select"===e&&r&&null!=r.multiple&&i.setAttribute("multiple",r.multiple),i},createText:e=>ss.createTextNode(e),createComment:e=>ss.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ss.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,l){let s=n?n.previousSibling:t.lastChild;if(i&&(i===l||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==l&&(i=i.nextSibling););else{so.innerHTML=sl("svg"===r?`${e}`:"mathml"===r?`${e}`:e);let i=so.content;if("svg"===r||"mathml"===r){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),o_=!1;function oS(){return a=o_?a:i$(ob),o_=!0,a}let ox=(...e)=>{(a||(a=iL(ob))).render(...e)},oC=(...e)=>{oS().hydrate(...e)},ok=(...e)=>{let t=(a||(a=iL(ob))).createApp(...e),{mount:n}=t;return t.mount=e=>{let r=oE(e);if(!r)return;let i=t._component;A(i)||i.render||i.template||(i.template=r.innerHTML),1===r.nodeType&&(r.textContent="");let l=n(r,!1,ow(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t},oT=(...e)=>{let t=oS().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=oE(e);if(t)return n(t,!0,ow(t))},t};function ow(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function oE(e){return R(e)?document.querySelector(e):e}let oN=!1,oA=()=>{oN||(oN=!0,or.getSSRProps=({value:e})=>({value:e}),os.getSSRProps=({value:e},t)=>{if(t.props&&ef(t.props.value,e))return{checked:!0}},oi.getSSRProps=({value:e},t)=>{if(k(e)){if(t.props&&eh(e,t.props.value)>-1)return{checked:!0}}else if(w(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},od.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;let n=op(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)},sN.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})};var oR,oI,oO=/*#__PURE__*/Object.freeze({__proto__:null,BaseTransition:nJ,BaseTransitionPropsValidators:nK,Comment:la,DeprecationTypes:sr,EffectScope:eb,ErrorCodes:nn,ErrorTypeStrings:l5,Fragment:ls,KeepAlive:rm,ReactiveEffect:ek,Static:lc,Suspense:le,Teleport:nV,Text:lo,TrackOpTypes:t3,Transition:sf,TransitionGroup:s4,TriggerOpTypes:t4,VueElement:sX,assertNumber:nt,callWithAsyncErrorHandling:ni,callWithErrorHandling:nr,camelize:H,capitalize:K,cloneVNode:lE,compatUtils:sn,computed:l0,createApp:ok,createBlock:lv,createCommentVNode:lR,createElementBlock:ly,createElementVNode:lk,createHydrationRenderer:i$,createPropsRestProxy:ie,createRenderer:iL,createSSRApp:oT,createSlots:rj,createStaticVNode:lA,createTextVNode:lN,createVNode:lT,customRef:tX,defineAsyncComponent:rp,defineComponent:n2,defineCustomElement:sG,defineEmits:rZ,defineExpose:rY,defineModel:r2,defineOptions:r0,defineProps:rX,defineSSRCustomElement:sJ,defineSlots:r1,devtools:l9,effect:eO,effectScope:e_,getCurrentInstance:lB,getCurrentScope:eS,getCurrentWatcher:t9,getTransitionRawChildren:n1,guardReactiveProps:lw,h:l1,handleError:nl,hasInjectionContext:ib,hydrate:oC,hydrateOnIdle:ro,hydrateOnInteraction:ru,hydrateOnMediaQuery:rc,hydrateOnVisible:ra,initCustomFormatter:l2,initDirectivesForSSR:oA,inject:iv,isMemoSame:l3,isProxy:tD,isReactive:tO,isReadonly:tP,isRef:tB,isRuntimeOnly:lG,isShallow:tM,isVNode:lb,markRaw:t$,mergeDefaults:r9,mergeModels:r7,mergeProps:lM,nextTick:nm,normalizeClass:es,normalizeProps:eo,normalizeStyle:et,onActivated:ry,onBeforeMount:rk,onBeforeUnmount:rN,onBeforeUpdate:rw,onDeactivated:rv,onErrorCaptured:rP,onMounted:rT,onRenderTracked:rO,onRenderTriggered:rI,onScopeDispose:ex,onServerPrefetch:rR,onUnmounted:rA,onUpdated:rE,onWatcherCleanup:t7,openBlock:lp,popScopeId:nw,provide:iy,proxyRefs:tJ,pushScopeId:nT,queuePostFlushCb:nv,reactive:tE,readonly:tA,ref:tU,registerRuntimeCompiler:lz,render:ox,renderList:rU,renderSlot:rH,resolveComponent:rD,resolveDirective:rF,resolveDynamicComponent:r$,resolveFilter:st,resolveTransitionHooks:nX,setBlockTracking:lm,setDevtoolsHook:l7,setTransitionHooks:n0,shallowReactive:tN,shallowReadonly:tR,shallowRef:tj,ssrContextKey:iq,ssrUtils:se,stop:eP,toDisplayString:eg,toHandlerKey:z,toHandlers:rW,toRaw:tL,toRef:t1,toRefs:tZ,toValue:tz,transformVNodeArgs:lS,triggerRef:tW,unref:tK,useAttrs:r4,useCssModule:s0,useCssVars:sI,useHost:sZ,useId:n6,useModel:iY,useSSRContext:iW,useShadowRoot:sY,useSlots:r3,useTemplateRef:n4,useTransitionState:nq,vModelCheckbox:oi,vModelDynamic:od,vModelRadio:os,vModelSelect:oo,vModelText:or,vShow:sN,version:l4,warn:l8,watch:iJ,watchEffect:iK,watchPostEffect:iz,watchSyncEffect:iG,withAsyncContext:it,withCtx:nN,withDefaults:r6,withDirectives:nA,withKeys:ov,withMemo:l6,withModifiers:og,withScopeId:nE});let oP=Symbol(""),oM=Symbol(""),oD=Symbol(""),oL=Symbol(""),o$=Symbol(""),oF=Symbol(""),oV=Symbol(""),oB=Symbol(""),oU=Symbol(""),oj=Symbol(""),oH=Symbol(""),oq=Symbol(""),oW=Symbol(""),oK=Symbol(""),oz=Symbol(""),oG=Symbol(""),oJ=Symbol(""),oQ=Symbol(""),oX=Symbol(""),oZ=Symbol(""),oY=Symbol(""),o0=Symbol(""),o1=Symbol(""),o2=Symbol(""),o6=Symbol(""),o3=Symbol(""),o4=Symbol(""),o8=Symbol(""),o5=Symbol(""),o9=Symbol(""),o7=Symbol(""),ae=Symbol(""),at=Symbol(""),an=Symbol(""),ar=Symbol(""),ai=Symbol(""),al=Symbol(""),as=Symbol(""),ao=Symbol(""),aa={[oP]:"Fragment",[oM]:"Teleport",[oD]:"Suspense",[oL]:"KeepAlive",[o$]:"BaseTransition",[oF]:"openBlock",[oV]:"createBlock",[oB]:"createElementBlock",[oU]:"createVNode",[oj]:"createElementVNode",[oH]:"createCommentVNode",[oq]:"createTextVNode",[oW]:"createStaticVNode",[oK]:"resolveComponent",[oz]:"resolveDynamicComponent",[oG]:"resolveDirective",[oJ]:"resolveFilter",[oQ]:"withDirectives",[oX]:"renderList",[oZ]:"renderSlot",[oY]:"createSlots",[o0]:"toDisplayString",[o1]:"mergeProps",[o2]:"normalizeClass",[o6]:"normalizeStyle",[o3]:"normalizeProps",[o4]:"guardReactiveProps",[o8]:"toHandlers",[o5]:"camelize",[o9]:"capitalize",[o7]:"toHandlerKey",[ae]:"setBlockTracking",[at]:"pushScopeId",[an]:"popScopeId",[ar]:"withCtx",[ai]:"unref",[al]:"isRef",[as]:"withMemo",[ao]:"isMemoSame"},ac={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function au(e,t,n,r,i,l,s,o=!1,a=!1,c=!1,u=ac){return e&&(o?(e.helper(oF),e.helper(e.inSSR||c?oV:oB)):e.helper(e.inSSR||c?oU:oj),s&&e.helper(oQ)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:l,directives:s,isBlock:o,disableTracking:a,isComponent:c,loc:u}}function ad(e,t=ac){return{type:17,loc:t,elements:e}}function ap(e,t=ac){return{type:15,loc:t,properties:e}}function af(e,t){return{type:16,loc:ac,key:R(e)?ah(e,!0):e,value:t}}function ah(e,t=!1,n=ac,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function am(e,t=ac){return{type:8,loc:t,children:e}}function ag(e,t=[],n=ac){return{type:14,loc:n,callee:e,arguments:t}}function ay(e,t,n=!1,r=!1,i=ac){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function av(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:ac}}function ab(e,{helper:t,removeHelper:n,inSSR:r}){if(!e.isBlock){var i,l;e.isBlock=!0,n((i=e.isComponent,r||i?oU:oj)),t(oF),t((l=e.isComponent,r||l?oV:oB))}}let a_=new Uint8Array([123,123]),aS=new Uint8Array([125,125]);function ax(e){return e>=97&&e<=122||e>=65&&e<=90}function aC(e){return 32===e||10===e||9===e||12===e||13===e}function ak(e){return 47===e||62===e||aC(e)}function aT(e){let t=new Uint8Array(e.length);for(let n=0;n4===e.type&&e.isStatic;function aI(e){switch(e){case"Teleport":case"teleport":return oM;case"Suspense":case"suspense":return oD;case"KeepAlive":case"keep-alive":return oL;case"BaseTransition":case"base-transition":return o$}}let aO=/^\d|[^\$\w\xA0-\uFFFF]/,aP=e=>!aO.test(e),aM=/[A-Za-z_$\xA0-\uFFFF]/,aD=/[\.\?\w$\xA0-\uFFFF]/,aL=/\s+[.[]\s*|\s*[.[]\s+/g,a$=e=>4===e.type?e.content:e.loc.source,aF=e=>{let t=a$(e).trim().replace(aL,e=>e.trim()),n=0,r=[],i=0,l=0,s=null;for(let e=0;e|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,aB=e=>aV.test(a$(e));function aU(e,t,n=!1){for(let r=0;r4===e.key.type&&e.key.content===r)}return n}function aX(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>"-"===t?"_":e.charCodeAt(n).toString())}`}let aZ=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,aY={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:g,isPreTag:g,isCustomElement:g,onError:aE,onWarn:aN,comments:!1,prefixIdentifiers:!1},a0=aY,a1=null,a2="",a6=null,a3=null,a4="",a8=-1,a5=-1,a9=0,a7=!1,ce=null,ct=[],cn=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=a_,this.delimiterClose=aS,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=a_,this.delimiterClose=aS}getPos(e){let t=1,n=e+1;for(let r=this.newlines.length-1;r>=0;r--){let i=this.newlines[r];if(e>i){t=r+2,n=e-i;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex]){if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++}else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(t?ak(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t){this.sequenceIndex++;return}}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||aC(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart=e||(28===this.state?this.currentSequence===aw.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(ct,{onerr:cv,ontext(e,t){co(cl(e,t),e,t)},ontextentity(e,t,n){co(e,t,n)},oninterpolation(e,t){if(a7)return co(cl(e,t),e,t);let n=e+cn.delimiterOpen.length,r=t-cn.delimiterClose.length;for(;aC(a2.charCodeAt(n));)n++;for(;aC(a2.charCodeAt(r-1));)r--;let i=cl(n,r);i.includes("&")&&(i=a0.decodeEntities(i,!1)),ch({type:5,content:cy(i,!1,cm(n,r)),loc:cm(e,t)})},onopentagname(e,t){let n=cl(e,t);a6={type:1,tag:n,ns:a0.getNamespace(n,ct[0],a0.ns),tagType:0,props:[],children:[],loc:cm(e-1,t),codegenNode:void 0}},onopentagend(e){cs(e)},onclosetag(e,t){let n=cl(e,t);if(!a0.isVoidTag(n)){let r=!1;for(let e=0;e0&&/* @__PURE__ *//*@__PURE__*/ct[0].loc.start.offset;for(let n=0;n<=e;n++)ca(ct.shift(),t,n(7===e.type?e.rawName:e.name)===t)},onattribend(e,t){a6&&a3&&(cg(a3.loc,t),0!==e&&(a4.includes("&")&&(a4=a0.decodeEntities(a4,!0)),6===a3.type?("class"===a3.name&&(a4=cf(a4).trim()),a3.value={type:2,content:a4,loc:1===e?cm(a8,a5):cm(a8-1,a5+1)},cn.inSFCRoot&&"template"===a6.tag&&"lang"===a3.name&&a4&&"html"!==a4&&cn.enterRCDATA(aT("{let i=t.start.offset+n,l=i+e.length;return cy(e,!1,cm(i,l),0,r?1:0)},o={source:s(l.trim(),n.indexOf(l,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1},a=i.trim().replace(ci,"").trim(),c=i.indexOf(a),u=a.match(cr);if(u){let e;a=a.replace(cr,"").trim();let t=u[1].trim();if(t&&(e=n.indexOf(t,c+a.length),o.key=s(t,e,!0)),u[2]){let r=u[2].trim();r&&(o.index=s(r,n.indexOf(r,o.key?e+t.length:c+a.length),!0))}}return a&&(o.value=s(a,c,!0)),o}(a3.exp)))),(7!==a3.type||"pre"!==a3.name)&&a6.props.push(a3)),a4="",a8=a5=-1},oncomment(e,t){a0.comments&&ch({type:3,content:cl(e,t),loc:cm(e-4,t+3)})},onend(){let e=a2.length;for(let t=0;t64&&n<91||aI(e)||a0.isBuiltInComponent&&a0.isBuiltInComponent(e)||a0.isNativeTag&&!a0.isNativeTag(e))return!0;for(let e=0;e=0;)n--;return n}let cu=/* @__PURE__ */new Set(["if","else","else-if","for","slot"]),cd=/\r\n/g;function cp(e,t){let n="preserve"!==a0.whitespace,r=!1;for(let t=0;t1)for(let i=0;i{n--};for(;nt===e:t=>e.test(t);return(e,r)=>{if(1===e.type){let{props:i}=e;if(3===e.tagType&&i.some(aW))return;let l=[];for(let s=0;s`${aa[e]}: _${aa[e]}`;function cN(e,t,{helper:n,push:r,newline:i,isTS:l}){let s=n("component"===t?oK:oG);for(let n=0;n3;t.push("["),n&&t.indent(),cR(e,t,n),n&&t.deindent(),t.push("]")}function cR(e,t,n=!1,r=!0){let{push:i,newline:l}=t;for(let s=0;se||"null")}([s,o,a,n,u]),t),r(")"),p&&r(")"),d&&(r(", "),cI(d,t),r(")"))}(e,t);break;case 14:!function(e,t){let{push:n,helper:r,pure:i}=t,l=R(e.callee)?e.callee:r(e.callee);i&&n(cw),n(l+"(",-2,e),cR(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){let{push:n,indent:r,deindent:i,newline:l}=t,{properties:s}=e;if(!s.length){n("{}",-2,e);return}let o=s.length>1;n(o?"{":"{ "),o&&r();for(let e=0;e "),(a||o)&&(n("{"),r()),s?(a&&n("return "),k(s)?cA(s,t):cI(s,t)):o&&cI(o,t),(a||o)&&(i(),n("}")),c&&n(")")}(e,t);break;case 19:!function(e,t){let{test:n,consequent:r,alternate:i,newline:l}=e,{push:s,indent:o,deindent:a,newline:c}=t;if(4===n.type){let e=!aP(n.content);e&&s("("),cO(n,t),e&&s(")")}else s("("),cI(n,t),s(")");l&&o(),t.indentLevel++,l||s(" "),s("? "),cI(r,t),t.indentLevel--,l&&c(),l||s(" "),s(": ");let u=19===i.type;!u&&t.indentLevel++,cI(i,t),!u&&t.indentLevel--,l&&a(!0)}(e,t);break;case 20:!function(e,t){let{push:n,helper:r,indent:i,deindent:l,newline:s}=t,{needPauseTracking:o,needArraySpread:a}=e;a&&n("[...("),n(`_cache[${e.index}] || (`),o&&(i(),n(`${r(ae)}(-1),`),s(),n("(")),n(`_cache[${e.index}] = `),cI(e.value,t),o&&(n(`).cacheIndex = ${e.index},`),s(),n(`${r(ae)}(1),`),s(),n(`_cache[${e.index}]`),l()),n(")"),a&&n(")]")}(e,t);break;case 21:cR(e.body,t,!0,!1)}}function cO(e,t){let{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,-3,e)}function cP(e,t){for(let n=0;n(function(e,t,n,r){if("else"!==t.name&&(!t.exp||!t.exp.content.trim())){let r=t.exp?t.exp.loc:e.loc;n.onError(/* @__PURE__ *//*@__PURE__*/aA(28,t.loc)),t.exp=ah("true",!1,r)}if("if"===t.name){let i=cD(e,t),l={type:9,loc:e.loc,branches:[i]};if(n.replaceNode(l),r)return r(l,i,!0)}else{let i=n.parent.children,l=i.indexOf(e);for(;l-- >=-1;){let s=i[l];if(s&&3===s.type||s&&2===s.type&&!s.content.trim().length){n.removeNode(s);continue}if(s&&9===s.type){"else-if"===t.name&&void 0===s.branches[s.branches.length-1].condition&&n.onError(/* @__PURE__ *//*@__PURE__*/aA(30,e.loc)),n.removeNode();let i=cD(e,t);s.branches.push(i);let l=r&&r(s,i,!1);ck(i,n),l&&l(),n.currentNode=null}else n.onError(/* @__PURE__ *//*@__PURE__*/aA(30,e.loc));break}}})(e,t,n,(e,t,r)=>{let i=n.parent.children,l=i.indexOf(e),s=0;for(;l-- >=0;){let e=i[l];e&&9===e.type&&(s+=e.branches.length)}return()=>{r?e.codegenNode=cL(t,s,n):function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode).alternate=cL(t,s+e.branches.length-1,n)}}));function cD(e,t){let n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!aU(e,"for")?e.children:[e],userKey:aj(e,"key"),isTemplateIf:n}}function cL(e,t,n){return e.condition?av(e.condition,c$(e,t,n),ag(n.helper(oH),['""',"true"])):c$(e,t,n)}function c$(e,t,n){let{helper:r}=n,i=af("key",ah(`${t}`,!1,ac,2)),{children:l}=e,s=l[0];if(1!==l.length||1!==s.type){if(1!==l.length||11!==s.type)return au(n,r(oP),ap([i]),l,64,void 0,void 0,!0,!1,!1,e.loc);{let e=s.codegenNode;return aJ(e,i,n),e}}{let e=s.codegenNode,t=14===e.type&&e.callee===as?e.arguments[1].returns:e;return 13===t.type&&ab(t,n),aJ(t,i,n),e}}let cF=(e,t,n)=>{let{modifiers:r,loc:i}=e,l=e.arg,{exp:s}=e;if(s&&4===s.type&&!s.content.trim()&&(s=void 0),!s){if(4!==l.type||!l.isStatic)return n.onError(aA(52,l.loc)),{props:[af(l,ah("",!0,i))]};cV(e),s=e.exp}return 4!==l.type?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=`${l.content} || ""`),r.some(e=>"camel"===e.content)&&(4===l.type?l.isStatic?l.content=H(l.content):l.content=`${n.helperString(o5)}(${l.content})`:(l.children.unshift(`${n.helperString(o5)}(`),l.children.push(")"))),!n.inSSR&&(r.some(e=>"prop"===e.content)&&cB(l,"."),r.some(e=>"attr"===e.content)&&cB(l,"^")),{props:[af(l,s)]}},cV=(e,t)=>{let n=e.arg,r=H(n.content);e.exp=ah(r,!1,n.loc)},cB=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},cU=cT("for",(e,t,n)=>{let{helper:r,removeHelper:i}=n;return function(e,t,n,r){if(!t.exp){n.onError(/* @__PURE__ *//*@__PURE__*/aA(31,t.loc));return}let i=t.forParseResult;if(!i){n.onError(/* @__PURE__ *//*@__PURE__*/aA(32,t.loc));return}cj(i);let{addIdentifiers:l,removeIdentifiers:s,scopes:o}=n,{source:a,value:c,key:u,index:d}=i,p={type:11,loc:t.loc,source:a,valueAlias:c,keyAlias:u,objectIndexAlias:d,parseResult:i,children:aK(e)?e.children:[e]};n.replaceNode(p),o.vFor++;let f=r&&r(p);return()=>{o.vFor--,f&&f()}}(e,t,n,t=>{let l=ag(r(oX),[t.source]),s=aK(e),o=aU(e,"memo"),a=aj(e,"key",!1,!0);a&&7===a.type&&!a.exp&&cV(a);let c=a&&(6===a.type?a.value?ah(a.value.content,!0):void 0:a.exp),u=a&&c?af("key",c):null,d=4===t.source.type&&t.source.constType>0,p=d?64:a?128:256;return t.codegenNode=au(n,r(oP),void 0,l,p,void 0,void 0,!0,!d,!1,e.loc),()=>{let a;let{children:p}=t,f=1!==p.length||1!==p[0].type,h=az(e)?e:s&&1===e.children.length&&az(e.children[0])?e.children[0]:null;if(h)a=h.codegenNode,s&&u&&aJ(a,u,n);else if(f)a=au(n,r(oP),u?ap([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1);else{var m,g,y,b,_,S,x,C;a=p[0].codegenNode,s&&u&&aJ(a,u,n),!d!==a.isBlock&&(a.isBlock?(i(oF),i((m=n.inSSR,g=a.isComponent,m||g?oV:oB))):i((y=n.inSSR,b=a.isComponent,y||b?oU:oj))),(a.isBlock=!d,a.isBlock)?(r(oF),r((_=n.inSSR,S=a.isComponent,_||S?oV:oB))):r((x=n.inSSR,C=a.isComponent,x||C?oU:oj))}if(o){let e=ay(cH(t.parseResult,[ah("_cached")]));e.body={type:21,body:[am(["const _memo = (",o.exp,")"]),am(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(ao)}(_cached, _memo)) return _cached`]),am(["const _item = ",a]),ah("_item.memo = _memo"),ah("return _item")],loc:ac},l.arguments.push(e,ah("_cache"),ah(String(n.cached.length))),n.cached.push(null)}else l.arguments.push(ay(cH(t.parseResult),a,!0))}})});function cj(e,t){e.finalized||(e.finalized=!0)}function cH({value:e,key:t,index:n},r=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||ah("_".repeat(t+1),!1))}([e,t,n,...r])}let cq=ah("undefined",!1),cW=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){let n=aU(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},cK=(e,t,n,r)=>ay(e,n,!1,!0,n.length?n[0].loc:r);function cz(e,t,n){let r=[af("name",e),af("fn",t)];return null!=n&&r.push(af("key",ah(String(n),!0))),ap(r)}let cG=/* @__PURE__ */new WeakMap,cJ=(e,t)=>function(){let n,r,i,l,s;if(!(1===(e=t.currentNode).type&&(0===e.tagType||1===e.tagType)))return;let{tag:o,props:a}=e,c=1===e.tagType,u=c?function(e,t,n=!1){let{tag:r}=e,i=cZ(r),l=aj(e,"is",!1,!0);if(l){if(i){let e;if(6===l.type?e=l.value&&ah(l.value.content,!0):(e=l.exp)||(e=ah("is",!1,l.arg.loc)),e)return ag(t.helper(oz),[e])}else 6===l.type&&l.value.content.startsWith("vue:")&&(r=l.value.content.slice(4))}let s=aI(r)||t.isBuiltInComponent(r);return s?(n||t.helper(s),s):(t.helper(oK),t.components.add(r),aX(r,"component"))}(e,t):`"${o}"`,d=O(u)&&u.callee===oz,p=0,f=d||u===oM||u===oD||!c&&("svg"===o||"foreignObject"===o||"math"===o);if(a.length>0){let r=cQ(e,t,void 0,c,d);n=r.props,p=r.patchFlag,l=r.dynamicPropNames;let i=r.directives;s=i&&i.length?ad(i.map(e=>(function(e,t){let n=[],r=cG.get(e);r?n.push(t.helperString(r)):(t.helper(oG),t.directives.add(e.name),n.push(aX(e.name,"directive")));let{loc:i}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));let t=ah("true",!1,i);n.push(ap(e.modifiers.map(e=>af(e,t)),i))}return ad(n,e.loc)})(e,t))):void 0,r.shouldUseBlock&&(f=!0)}if(e.children.length>0){if(u===oL&&(f=!0,p|=1024),c&&u!==oM&&u!==oL){let{slots:n,hasDynamicSlots:i}=function(e,t,n=cK){t.helper(ar);let{children:r,loc:i}=e,l=[],s=[],o=t.scopes.vSlot>0||t.scopes.vFor>0,a=aU(e,"slot",!0);if(a){let{arg:e,exp:t}=a;e&&!aR(e)&&(o=!0),l.push(af(e||ah("default",!0),n(t,void 0,r,i)))}let c=!1,u=!1,d=[],p=/* @__PURE__ */new Set,f=0;for(let e=0;eaf("default",n(e,void 0,t,i));c?d.length&&d.some(e=>(function e(t){return 2!==t.type&&12!==t.type||(2===t.type?!!t.content.trim():e(t.content))})(e))&&(u?t.onError(aA(39,d[0].loc)):l.push(e(void 0,d))):l.push(e(void 0,r))}let h=o?2:!function e(t){for(let n=0;n0,h=!1,m=0,g=!1,b=!1,_=!1,S=!1,x=!1,C=!1,k=[],T=e=>{u.length&&(d.push(ap(cX(u),a)),u=[]),e&&d.push(e)},w=()=>{t.scopes.vFor>0&&u.push(af(ah("ref_for",!0),ah("true")))},E=({key:e,value:n})=>{if(aR(e)){let l=e.content,s=y(l);s&&(!r||i)&&"onclick"!==l.toLowerCase()&&"onUpdate:modelValue"!==l&&!V(l)&&(S=!0),s&&V(l)&&(C=!0),s&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&c_(n,t)>0||("ref"===l?g=!0:"class"===l?b=!0:"style"===l?_=!0:"key"===l||k.includes(l)||k.push(l),r&&("class"===l||"style"===l)&&!k.includes(l)&&k.push(l))}else x=!0};for(let i=0;i"prop"===e.content)&&(m|=32);let S=t.directiveTransforms[n];if(S){let{props:n,needRuntime:r}=S(s,e,t);l||n.forEach(E),_&&i&&!aR(i)?T(ap(n,a)):u.push(...n),r&&(p.push(s),I(r)&&cG.set(s,r))}else!B(n)&&(p.push(s),f&&(h=!0))}}if(d.length?(T(),s=d.length>1?ag(t.helper(o1),d,a):d[0]):u.length&&(s=ap(cX(u),a)),x?m|=16:(b&&!r&&(m|=2),_&&!r&&(m|=4),k.length&&(m|=8),S&&(m|=32)),!h&&(0===m||32===m)&&(g||C||p.length>0)&&(m|=512),!t.inSSR&&s)switch(s.type){case 15:let N=-1,A=-1,R=!1;for(let e=0;e{if(az(e)){let{children:n,loc:r}=e,{slotName:i,slotProps:l}=function(e,t){let n,r='"default"',i=[];for(let t=0;t0){let{props:r,directives:l}=cQ(e,t,i,!1,!1);n=r,l.length&&t.onError(aA(36,l[0].loc))}return{slotName:r,slotProps:n}}(e,t),s=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"],o=2;l&&(s[2]=l,o=3),n.length&&(s[3]=ay([],n,!1,!1,r),o=4),t.scopeId&&!t.slotted&&(o=5),s.splice(o),e.codegenNode=ag(t.helper(oZ),s,r)}},c0=(e,t,n,r)=>{let i;let{loc:l,modifiers:s,arg:o}=e;if(e.exp||s.length,4===o.type){if(o.isStatic){let e=o.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),i=ah(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?z(H(e)):`on:${e}`,!0,o.loc)}else i=am([`${n.helperString(o7)}(`,o,")"])}else(i=o).children.unshift(`${n.helperString(o7)}(`),i.children.push(")");let a=e.exp;a&&!a.content.trim()&&(a=void 0);let c=n.cacheHandlers&&!a&&!n.inVOnce;if(a){let e=aF(a),t=!(e||aB(a)),n=a.content.includes(";");(t||c&&e)&&(a=am([`${t?"$event":"(...args)"} => ${n?"{":"("}`,a,n?"}":")"]))}let u={props:[af(i,a||ah("() => {}",!1,l))]};return r&&(u=r(u)),c&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(e=>e.key.isHandlerKey=!0),u},c1=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{let n;let r=e.children,i=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name]))))for(let e=0;e{if(1===e.type&&aU(e,"once",!0)&&!c2.has(e)&&!t.inVOnce&&!t.inSSR)return c2.add(e),t.inVOnce=!0,t.helper(ae),()=>{t.inVOnce=!1;let e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}},c3=(e,t,n)=>{let r;let{exp:i,arg:l}=e;if(!i)return n.onError(/* @__PURE__ *//*@__PURE__*/aA(41,e.loc)),c4();let s=i.loc.source,o=4===i.type?i.content:s,a=n.bindingMetadata[s];if("props"===a||"props-aliased"===a)return /* @__PURE__ */i.loc,c4();if(!o.trim()||!aF(i))return n.onError(/* @__PURE__ *//*@__PURE__*/aA(42,i.loc)),c4();let c=l||ah("modelValue",!0),u=l?aR(l)?`onUpdate:${H(l.content)}`:am(['"onUpdate:" + ',l]):"onUpdate:modelValue",d=n.isTS?"($event: any)":"$event";r=am([`${d} => ((`,i,") = $event)"]);let p=[af(c,e.exp),af(u,r)];if(e.modifiers.length&&1===t.tagType){let t=e.modifiers.map(e=>e.content).map(e=>(aP(e)?e:JSON.stringify(e))+": true").join(", "),n=l?aR(l)?`${l.content}Modifiers`:am([l,' + "Modifiers"']):"modelModifiers";p.push(af(n,ah(`{ ${t} }`,!1,e.loc,2)))}return c4(p)};function c4(e=[]){return{props:e}}let c8=/* @__PURE__ */new WeakSet,c5=(e,t)=>{if(1===e.type){let n=aU(e,"memo");if(!(!n||c8.has(e)))return c8.add(e),()=>{let r=e.codegenNode||t.currentNode.codegenNode;r&&13===r.type&&(1!==e.tagType&&ab(r,t),e.codegenNode=ag(t.helper(as),[n.exp,ay(void 0,r),"_cache",String(t.cached.length)]),t.cached.push(null))}}},c9=Symbol(""),c7=Symbol(""),ue=Symbol(""),ut=Symbol(""),un=Symbol(""),ur=Symbol(""),ui=Symbol(""),ul=Symbol(""),us=Symbol(""),uo=Symbol("");!function(e){Object.getOwnPropertySymbols(e).forEach(t=>{aa[t]=e[t]})}({[c9]:"vModelRadio",[c7]:"vModelCheckbox",[ue]:"vModelText",[ut]:"vModelSelect",[un]:"vModelDynamic",[ur]:"withModifiers",[ui]:"withKeys",[ul]:"vShow",[us]:"Transition",[uo]:"TransitionGroup"});let ua={parseMode:"html",isVoidTag:ed,isNativeTag:e=>ea(e)||ec(e)||eu(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return(c||(c=document.createElement("div")),t)?(c.innerHTML=`
`,c.children[0].getAttribute("foo")):(c.innerHTML=e,c.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?us:"TransitionGroup"===e||"transition-group"===e?uo:void 0,getNamespace(e,t,n){let r=t?t.ns:n;if(t&&2===r){if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some(e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content))&&(r=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(r=0)}else t&&1===r&&("foreignObject"===t.tag||"desc"===t.tag||"title"===t.tag)&&(r=0);if(0===r){if("svg"===e)return 1;if("math"===e)return 2}return r}},uc=(e,t)=>ah(JSON.stringify(el(e)),!1,t,3),uu=/* @__PURE__ */p("passive,once,capture"),ud=/* @__PURE__ */p("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),up=/* @__PURE__ */p("left,right"),uf=/* @__PURE__ */p("onkeyup,onkeydown,onkeypress"),uh=(e,t,n,r)=>{let i=[],l=[],s=[];for(let n=0;naR(e)&&"onclick"===e.content.toLowerCase()?ah(t,!0):4!==e.type?am(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,ug=(e,t)=>{1===e.type&&0===e.tagType&&("script"===e.tag||"style"===e.tag)&&t.removeNode()},uy=[e=>{1===e.type&&e.props.forEach((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:ah("style",!0,t.loc),exp:uc(t.value.content,t.loc),modifiers:[],loc:t.loc})})}],uv={cloak:()=>({props:[]}),html:(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(aA(53,i)),t.children.length&&(n.onError(aA(54,i)),t.children.length=0),{props:[af(ah("innerHTML",!0,i),r||ah("",!0))]}},text:(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(aA(55,i)),t.children.length&&(n.onError(aA(56,i)),t.children.length=0),{props:[af(ah("textContent",!0),r?c_(r,n)>0?r:ag(n.helperString(o0),[r],i):ah("",!0))]}},model:(e,t,n)=>{let r=c3(e,t,n);if(!r.props.length||1===t.tagType)return r;e.arg&&n.onError(aA(58,e.arg.loc));let{tag:i}=t,l=n.isCustomElement(i);if("input"===i||"textarea"===i||"select"===i||l){let s=ue,o=!1;if("input"===i||l){let r=aj(t,"type");if(r){if(7===r.type)s=un;else if(r.value)switch(r.value.content){case"radio":s=c9;break;case"checkbox":s=c7;break;case"file":o=!0,n.onError(aA(59,e.loc))}}else t.props.some(e=>7===e.type&&"bind"===e.name&&(!e.arg||4!==e.arg.type||!e.arg.isStatic))&&(s=un)}else"select"===i&&(s=ut);o||(r.needRuntime=n.helper(s))}else n.onError(aA(57,e.loc));return r.props=r.props.filter(e=>!(4===e.key.type&&"modelValue"===e.key.content)),r},on:(e,t,n)=>c0(e,t,n,t=>{let{modifiers:r}=e;if(!r.length)return t;let{key:i,value:l}=t.props[0],{keyModifiers:s,nonKeyModifiers:o,eventOptionModifiers:a}=uh(i,r,n,e.loc);if(o.includes("right")&&(i=um(i,"onContextmenu")),o.includes("middle")&&(i=um(i,"onMouseup")),o.length&&(l=ag(n.helper(ur),[l,JSON.stringify(o)])),s.length&&(!aR(i)||uf(i.content.toLowerCase()))&&(l=ag(n.helper(ui),[l,JSON.stringify(s)])),a.length){let e=a.map(K).join("");i=aR(i)?ah(`${i.content}${e}`,!0):am(["(",i,`) + "${e}"`])}return{props:[af(i,l)]}}),show:(e,t,n)=>{let{exp:r,loc:i}=e;return!r&&n.onError(aA(61,i)),{props:[],needRuntime:n.helper(ul)}}},ub=/* @__PURE__ */new WeakMap;function u_(e,t){let n;if(!R(e)){if(!e.nodeType)return m;e=e.innerHTML}let r=e,i=((n=ub.get(null!=t?t:f))||(n=/* @__PURE__ */Object.create(null),ub.set(null!=t?t:f,n)),n),l=i[r];if(l)return l;if("#"===e[0]){let t=document.querySelector(e);e=t?t.innerHTML:""}let s=_({hoistStatic:!0,onError:void 0,onWarn:m},t);s.isCustomElement||"undefined"==typeof customElements||(s.isCustomElement=e=>!!customElements.get(e));let{code:o}=function(e,t={}){return function(e,t={}){let n=t.onError||aE,r="module"===t.mode;!0===t.prefixIdentifiers?n(/* @__PURE__ *//*@__PURE__*/aA(47)):r&&n(/* @__PURE__ *//*@__PURE__*/aA(48)),t.cacheHandlers&&n(/* @__PURE__ *//*@__PURE__*/aA(49)),t.scopeId&&!r&&n(/* @__PURE__ *//*@__PURE__*/aA(50));let i=_({},t,{prefixIdentifiers:!1}),l=R(e)?function(e,t){if(cn.reset(),a6=null,a3=null,a4="",a8=-1,a5=-1,ct.length=0,a2=e,a0=_({},aY),t){let e;for(e in t)null!=t[e]&&(a0[e]=t[e])}cn.mode="html"===a0.parseMode?1:"sfc"===a0.parseMode?2:0,cn.inXML=1===a0.ns||2===a0.ns;let n=t&&t.delimiters;n&&(cn.delimiterOpen=aT(n[0]),cn.delimiterClose=aT(n[1]));let r=a1=function(e,t=""){return{type:0,source:t,children:e,helpers:/* @__PURE__ */new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:ac}}([],e);return cn.parse(a2),r.loc=cm(0,e.length),r.children=cp(r.children),a1=null,r}(e,i):e,[s,o]=[[c6,cM,c5,cU,cY,cJ,cW,c1],{on:c0,bind:cF,model:c3}];return!function(e,t){let n=function(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:r=!1,hmr:i=!1,cacheHandlers:l=!1,nodeTransforms:s=[],directiveTransforms:o={},transformHoist:a=null,isBuiltInComponent:c=m,isCustomElement:u=m,expressionPlugins:d=[],scopeId:p=null,slotted:h=!0,ssr:g=!1,inSSR:y=!1,ssrCssVars:b="",bindingMetadata:_=f,inline:S=!1,isTS:x=!1,onError:C=aE,onWarn:k=aN,compatConfig:T}){let w=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),E={filename:t,selfName:w&&K(H(w[1])),prefixIdentifiers:n,hoistStatic:r,hmr:i,cacheHandlers:l,nodeTransforms:s,directiveTransforms:o,transformHoist:a,isBuiltInComponent:c,isCustomElement:u,expressionPlugins:d,scopeId:p,slotted:h,ssr:g,inSSR:y,ssrCssVars:b,bindingMetadata:_,inline:S,isTS:x,onError:C,onWarn:k,compatConfig:T,root:e,helpers:/* @__PURE__ */new Map,components:/* @__PURE__ */new Set,directives:/* @__PURE__ */new Set,hoists:[],imports:[],cached:[],constantCache:/* @__PURE__ */new WeakMap,temps:0,identifiers:/* @__PURE__ */Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){let t=E.helpers.get(e)||0;return E.helpers.set(e,t+1),e},removeHelper(e){let t=E.helpers.get(e);if(t){let n=t-1;n?E.helpers.set(e,n):E.helpers.delete(e)}},helperString:e=>`_${aa[E.helper(e)]}`,replaceNode(e){E.parent.children[E.childIndex]=E.currentNode=e},removeNode(e){let t=E.parent.children,n=e?t.indexOf(e):E.currentNode?E.childIndex:-1;e&&e!==E.currentNode?E.childIndex>n&&(E.childIndex--,E.onNodeRemoved()):(E.currentNode=null,E.onNodeRemoved()),E.parent.children.splice(n,1)},onNodeRemoved:m,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){R(e)&&(e=ah(e)),E.hoists.push(e);let t=ah(`_hoisted_${E.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1){let n=function(e,t,n=!1){return{type:20,index:e,value:t,needPauseTracking:n,needArraySpread:!1,loc:ac}}(E.cached.length,e,t);return E.cached.push(n),n}};return E}(e,t);ck(e,n),t.hoistStatic&&function e(t,n,r,i=!1,l=!1){let{children:s}=t,o=[];for(let n=0;n0){if(e>=2){a.codegenNode.patchFlag=-1,o.push(a);continue}}else{let e=a.codegenNode;if(13===e.type){let t=e.patchFlag;if((void 0===t||512===t||1===t)&&cx(a,r)>=2){let t=cC(a);t&&(e.props=r.hoist(t))}e.dynamicProps&&(e.dynamicProps=r.hoist(e.dynamicProps))}}}else if(12===a.type&&(i?0:c_(a,r))>=2){o.push(a);continue}if(1===a.type){let n=1===a.tagType;n&&r.scopes.vSlot++,e(a,t,r,!1,l),n&&r.scopes.vSlot--}else if(11===a.type)e(a,t,r,1===a.children.length,!0);else if(9===a.type)for(let n=0;ne.key===t||e.key.content===t);return n&&n.value}}o.length&&r.transformHoist&&r.transformHoist(s,r,t)}(e,void 0,n,cb(e,e.children[0])),t.ssr||function(e,t){let{helper:n}=t,{children:r}=e;if(1===r.length){let n=r[0];if(cb(e,n)&&n.codegenNode){let r=n.codegenNode;13===r.type&&ab(r,t),e.codegenNode=r}else e.codegenNode=n}else r.length>1&&(e.codegenNode=au(t,n(oP),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}(e,n),e.helpers=/* @__PURE__ */new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0}(l,_({},i,{nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:_({},o,t.directiveTransforms||{})})),function(e,t={}){let n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:r=!1,filename:i="template.vue.html",scopeId:l=null,optimizeImports:s=!1,runtimeGlobalName:o="Vue",runtimeModuleName:a="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:p=!1}){let f={mode:t,prefixIdentifiers:n,sourceMap:r,filename:i,scopeId:l,optimizeImports:s,runtimeGlobalName:o,runtimeModuleName:a,ssrRuntimeModuleName:c,ssr:u,isTS:d,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${aa[e]}`,push(e,t=-2,n){f.code+=e},indent(){h(++f.indentLevel)},deindent(e=!1){e?--f.indentLevel:h(--f.indentLevel)},newline(){h(f.indentLevel)}};function h(e){f.push("\n"+" ".repeat(e),0)}return f}(e,t);t.onContextCreated&&t.onContextCreated(n);let{mode:r,push:i,prefixIdentifiers:l,indent:s,deindent:o,newline:a,scopeId:c,ssr:u}=n,d=Array.from(e.helpers),p=d.length>0,f=!l&&"module"!==r;(function(e,t){let{ssr:n,prefixIdentifiers:r,push:i,newline:l,runtimeModuleName:s,runtimeGlobalName:o,ssrRuntimeModuleName:a}=t,c=Array.from(e.helpers);if(c.length>0&&(i(`const _Vue = ${o} -`,-1),e.hoists.length)){let e=[oU,oj,oH,oq,oW].filter(e=>c.includes(e)).map(cE).join(", ");i(`const { ${e} } = _Vue -`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;let{push:n,newline:r}=t;r();for(let i=0;i0)&&a()),e.directives.length&&(cN(e.directives,"directive",n),e.temps>0&&a()),e.temps>0){i("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i(` -`,0),a()),u||i("return "),e.codegenNode?cI(e.codegenNode,n):i("null"),f&&(o(),i("}")),o(),i("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}(l,i)}(e,_({},ua,t,{nodeTransforms:[ug,...uy,...t.nodeTransforms||[]],directiveTransforms:_({},uv,t.directiveTransforms||{}),transformHoist:null}))}(e,s),a=Function("Vue",o)(oO);return a._rc=!0,i[r]=a}lz(u_);export{nJ as BaseTransition,nK as BaseTransitionPropsValidators,la as Comment,sr as DeprecationTypes,eb as EffectScope,nn as ErrorCodes,l5 as ErrorTypeStrings,ls as Fragment,rm as KeepAlive,ek as ReactiveEffect,lc as Static,le as Suspense,nV as Teleport,lo as Text,t3 as TrackOpTypes,sf as Transition,s4 as TransitionGroup,t4 as TriggerOpTypes,sX as VueElement,nt as assertNumber,ni as callWithAsyncErrorHandling,nr as callWithErrorHandling,H as camelize,K as capitalize,lE as cloneVNode,sn as compatUtils,u_ as compile,l0 as computed,ok as createApp,lv as createBlock,lR as createCommentVNode,ly as createElementBlock,lk as createElementVNode,i$ as createHydrationRenderer,ie as createPropsRestProxy,iL as createRenderer,oT as createSSRApp,rj as createSlots,lA as createStaticVNode,lN as createTextVNode,lT as createVNode,tX as customRef,rp as defineAsyncComponent,n2 as defineComponent,sG as defineCustomElement,rZ as defineEmits,rY as defineExpose,r2 as defineModel,r0 as defineOptions,rX as defineProps,sJ as defineSSRCustomElement,r1 as defineSlots,l9 as devtools,eO as effect,e_ as effectScope,lB as getCurrentInstance,eS as getCurrentScope,t9 as getCurrentWatcher,n1 as getTransitionRawChildren,lw as guardReactiveProps,l1 as h,nl as handleError,ib as hasInjectionContext,oC as hydrate,ro as hydrateOnIdle,ru as hydrateOnInteraction,rc as hydrateOnMediaQuery,ra as hydrateOnVisible,l2 as initCustomFormatter,oA as initDirectivesForSSR,iv as inject,l3 as isMemoSame,tD as isProxy,tO as isReactive,tP as isReadonly,tB as isRef,lG as isRuntimeOnly,tM as isShallow,lb as isVNode,t$ as markRaw,r9 as mergeDefaults,r7 as mergeModels,lM as mergeProps,nm as nextTick,es as normalizeClass,eo as normalizeProps,et as normalizeStyle,ry as onActivated,rk as onBeforeMount,rN as onBeforeUnmount,rw as onBeforeUpdate,rv as onDeactivated,rP as onErrorCaptured,rT as onMounted,rO as onRenderTracked,rI as onRenderTriggered,ex as onScopeDispose,rR as onServerPrefetch,rA as onUnmounted,rE as onUpdated,t7 as onWatcherCleanup,lp as openBlock,nw as popScopeId,iy as provide,tJ as proxyRefs,nT as pushScopeId,nv as queuePostFlushCb,tE as reactive,tA as readonly,tU as ref,lz as registerRuntimeCompiler,ox as render,rU as renderList,rH as renderSlot,rD as resolveComponent,rF as resolveDirective,r$ as resolveDynamicComponent,st as resolveFilter,nX as resolveTransitionHooks,lm as setBlockTracking,l7 as setDevtoolsHook,n0 as setTransitionHooks,tN as shallowReactive,tR as shallowReadonly,tj as shallowRef,iq as ssrContextKey,se as ssrUtils,eP as stop,eg as toDisplayString,z as toHandlerKey,rW as toHandlers,tL as toRaw,t1 as toRef,tZ as toRefs,tz as toValue,lS as transformVNodeArgs,tW as triggerRef,tK as unref,r4 as useAttrs,s0 as useCssModule,sI as useCssVars,sZ as useHost,n6 as useId,iY as useModel,iW as useSSRContext,sY as useShadowRoot,r3 as useSlots,n4 as useTemplateRef,nq as useTransitionState,oi as vModelCheckbox,od as vModelDynamic,os as vModelRadio,oo as vModelSelect,or as vModelText,sN as vShow,l4 as version,l8 as warn,iJ as watch,iK as watchEffect,iz as watchPostEffect,iG as watchSyncEffect,it as withAsyncContext,nN as withCtx,r6 as withDefaults,nA as withDirectives,ov as withKeys,l6 as withMemo,og as withModifiers,nE as withScopeId}; +**//*! #__NO_SIDE_EFFECTS__ */let e,t,n,r,i,l,s,o,a,c,u,d,p;function f(e){let t=/* @__PURE__ */Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let h={},m=[],g=()=>{},y=()=>!1,b=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),_=e=>e.startsWith("onUpdate:"),S=Object.assign,x=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},C=Object.prototype.hasOwnProperty,T=(e,t)=>C.call(e,t),k=Array.isArray,w=e=>"[object Map]"===L(e),N=e=>"[object Set]"===L(e),E=e=>"[object Date]"===L(e),A=e=>"[object RegExp]"===L(e),R=e=>"function"==typeof e,I=e=>"string"==typeof e,O=e=>"symbol"==typeof e,P=e=>null!==e&&"object"==typeof e,M=e=>(P(e)||R(e))&&R(e.then)&&R(e.catch),D=Object.prototype.toString,L=e=>D.call(e),$=e=>L(e).slice(8,-1),F=e=>"[object Object]"===L(e),V=e=>I(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,B=/* @__PURE__ */f(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),U=/* @__PURE__ */f("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),j=e=>{let t=/* @__PURE__ */Object.create(null);return n=>t[n]||(t[n]=e(n))},H=/-(\w)/g,q=j(e=>e.replace(H,(e,t)=>t?t.toUpperCase():"")),W=/\B([A-Z])/g,K=j(e=>e.replace(W,"-$1").toLowerCase()),z=j(e=>e.charAt(0).toUpperCase()+e.slice(1)),J=j(e=>e?`on${z(e)}`:""),G=(e,t)=>!Object.is(e,t),Q=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Z=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Y=e=>{let t=I(e)?Number(e):NaN;return isNaN(t)?e:t},ee=()=>e||(e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),et=/* @__PURE__ */f("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function en(e){if(k(e)){let t={};for(let n=0;n{if(e){let n=e.split(ei);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function eo(e){let t="";if(I(e))t=e;else if(k(e))for(let n=0;neh(e,t))}let eg=e=>!!(e&&!0===e.__v_isRef),ey=e=>I(e)?e:null==e?"":k(e)||P(e)&&(e.toString===D||!R(e.toString))?eg(e)?ey(e.value):JSON.stringify(e,ev,2):String(e),ev=(e,t)=>eg(t)?ev(e,t.value):w(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[eb(t,r)+" =>"]=n,e),{})}:N(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>eb(e))}:O(t)?eb(t):!P(t)||k(t)||F(t)?t:String(t),eb=(e,t="")=>{var n;return O(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class e_{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=t,!e&&t&&(this.index=(t.scopes||(t.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e0)){if(i){let e=i;for(i=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;r;){let t=r;for(r=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eA(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function eR(e){let t;let n=e.depsTail,r=n;for(;r;){let e=r.prevDep;-1===r.version?(r===n&&(n=e),eP(r),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function eI(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(eO(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function eO(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eU))return;e.globalVersion=eU;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!eI(e)){e.flags&=-3;return}let r=n,i=eL;n=e,eL=!0;try{eA(e);let n=e.fn(e._value);(0===t.version||G(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{n=r,eL=i,eR(e),e.flags&=-3}}function eP(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r),!n.subs&&n.computed){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)eP(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function eM(e,t){e.effect instanceof ek&&(e=e.effect.fn);let n=new ek(e);t&&S(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r}function eD(e){e.effect.stop()}let eL=!0,e$=[];function eF(){e$.push(eL),eL=!1}function eV(){let e=e$.pop();eL=void 0===e||e}function eB(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=n;n=void 0;try{t()}finally{n=e}}}let eU=0;class ej{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eH{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!n||!eL||n===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==n)t=this.activeLink=new ej(n,this),n.deps?(t.prevDep=n.depsTail,n.depsTail.nextDep=t,n.depsTail=t):n.deps=n.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=n.depsTail,t.nextDep=void 0,n.depsTail.nextDep=t,n.depsTail=t,n.deps===t&&(n.deps=e)}return t}trigger(e){this.version++,eU++,this.notify(e)}notify(e){ew++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{eE()}}}let eq=/* @__PURE__ */new WeakMap,eW=Symbol(""),eK=Symbol(""),ez=Symbol("");function eJ(e,t,r){if(eL&&n){let t=eq.get(e);t||eq.set(e,t=/* @__PURE__ */new Map);let n=t.get(r);n||(t.set(r,n=new eH),n.map=t,n.key=r),n.track()}}function eG(e,t,n,r,i,l){let s=eq.get(e);if(!s){eU++;return}let o=e=>{e&&e.trigger()};if(ew++,"clear"===t)s.forEach(o);else{let i=k(e),l=i&&V(n);if(i&&"length"===n){let e=Number(r);s.forEach((t,n)=>{("length"===n||n===ez||!O(n)&&n>=e)&&o(t)})}else switch(void 0!==n&&o(s.get(n)),l&&o(s.get(ez)),t){case"add":i?l&&o(s.get("length")):(o(s.get(eW)),w(e)&&o(s.get(eK)));break;case"delete":!i&&(o(s.get(eW)),w(e)&&o(s.get(eK)));break;case"set":w(e)&&o(s.get(eW))}}eE()}function eQ(e){let t=tV(e);return t===e?t:(eJ(t,"iterate",ez),t$(e)?t:t.map(tU))}function eX(e){return eJ(e=tV(e),"iterate",ez),e}let eZ={__proto__:null,[Symbol.iterator](){return eY(this,Symbol.iterator,tU)},concat(...e){return eQ(this).concat(...e.map(e=>k(e)?eQ(e):e))},entries(){return eY(this,"entries",e=>(e[1]=tU(e[1]),e))},every(e,t){return e1(this,"every",e,t,void 0,arguments)},filter(e,t){return e1(this,"filter",e,t,e=>e.map(tU),arguments)},find(e,t){return e1(this,"find",e,t,tU,arguments)},findIndex(e,t){return e1(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return e1(this,"findLast",e,t,tU,arguments)},findLastIndex(e,t){return e1(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return e1(this,"forEach",e,t,void 0,arguments)},includes(...e){return e6(this,"includes",e)},indexOf(...e){return e6(this,"indexOf",e)},join(e){return eQ(this).join(e)},lastIndexOf(...e){return e6(this,"lastIndexOf",e)},map(e,t){return e1(this,"map",e,t,void 0,arguments)},pop(){return e3(this,"pop")},push(...e){return e3(this,"push",e)},reduce(e,...t){return e2(this,"reduce",e,t)},reduceRight(e,...t){return e2(this,"reduceRight",e,t)},shift(){return e3(this,"shift")},some(e,t){return e1(this,"some",e,t,void 0,arguments)},splice(...e){return e3(this,"splice",e)},toReversed(){return eQ(this).toReversed()},toSorted(e){return eQ(this).toSorted(e)},toSpliced(...e){return eQ(this).toSpliced(...e)},unshift(...e){return e3(this,"unshift",e)},values(){return eY(this,"values",tU)}};function eY(e,t,n){let r=eX(e),i=r[t]();return r===e||t$(e)||(i._next=i.next,i.next=()=>{let e=i._next();return e.value&&(e.value=n(e.value)),e}),i}let e0=Array.prototype;function e1(e,t,n,r,i,l){let s=eX(e),o=s!==e&&!t$(e),a=s[t];if(a!==e0[t]){let t=a.apply(e,l);return o?tU(t):t}let c=n;s!==e&&(o?c=function(t,r){return n.call(this,tU(t),r,e)}:n.length>2&&(c=function(t,r){return n.call(this,t,r,e)}));let u=a.call(s,c,r);return o&&i?i(u):u}function e2(e,t,n,r){let i=eX(e),l=n;return i!==e&&(t$(e)?n.length>3&&(l=function(t,r,i){return n.call(this,t,r,i,e)}):l=function(t,r,i){return n.call(this,t,tU(r),i,e)}),i[t](l,...r)}function e6(e,t,n){let r=tV(e);eJ(r,"iterate",ez);let i=r[t](...n);return(-1===i||!1===i)&&tF(n[0])?(n[0]=tV(n[0]),r[t](...n)):i}function e3(e,t,n=[]){eF(),ew++;let r=tV(e)[t].apply(e,n);return eE(),eV(),r}let e4=/* @__PURE__ */f("__proto__,__v_isRef,__isVue"),e8=new Set(/* @__PURE__ */Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(O));function e5(e){O(e)||(e=String(e));let t=tV(this);return eJ(t,"has",e),t.hasOwnProperty(e)}class e9{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){let r=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(r?i?tA:tE:i?tN:tw).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let l=k(e);if(!r){let e;if(l&&(e=eZ[t]))return e;if("hasOwnProperty"===t)return e5}let s=Reflect.get(e,t,tH(e)?e:n);return(O(t)?e8.has(t):e4(t))?s:(r||eJ(e,"get",t),i)?s:tH(s)?l&&V(t)?s:s.value:P(s)?r?tO(s):tR(s):s}}class e7 extends e9{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t];if(!this._isShallow){let t=tL(i);if(t$(n)||tL(n)||(i=tV(i),n=tV(n)),!k(e)&&tH(i)&&!tH(n))return!t&&(i.value=n,!0)}let l=k(e)&&V(t)?Number(t)e,ts=e=>Reflect.getPrototypeOf(e);function to(e,t,n=!1,r=!1){let i=tV(e=e.__v_raw),l=tV(t);n||(G(t,l)&&eJ(i,"get",t),eJ(i,"get",l));let{has:s}=ts(i),o=r?tl:n?tj:tU;return s.call(i,t)?o(e.get(t)):s.call(i,l)?o(e.get(l)):void(e!==i&&e.get(t))}function ta(e,t=!1){let n=this.__v_raw,r=tV(n),i=tV(e);return t||(G(e,i)&&eJ(r,"has",e),eJ(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function tc(e,t=!1){return e=e.__v_raw,t||eJ(tV(e),"iterate",eW),Reflect.get(e,"size",e)}function tu(e,t=!1){t||t$(e)||tL(e)||(e=tV(e));let n=tV(this);return ts(n).has.call(n,e)||(n.add(e),eG(n,"add",e,e)),this}function td(e,t,n=!1){n||t$(t)||tL(t)||(t=tV(t));let r=tV(this),{has:i,get:l}=ts(r),s=i.call(r,e);s||(e=tV(e),s=i.call(r,e));let o=l.call(r,e);return r.set(e,t),s?G(t,o)&&eG(r,"set",e,t):eG(r,"add",e,t),this}function tp(e){let t=tV(this),{has:n,get:r}=ts(t),i=n.call(t,e);i||(e=tV(e),i=n.call(t,e)),r&&r.call(t,e);let l=t.delete(e);return i&&eG(t,"delete",e,void 0),l}function tf(){let e=tV(this),t=0!==e.size,n=e.clear();return t&&eG(e,"clear",void 0,void 0),n}function th(e,t){return function(n,r){let i=this,l=i.__v_raw,s=tV(l),o=t?tl:e?tj:tU;return e||eJ(s,"iterate",eW),l.forEach((e,t)=>n.call(r,o(e),o(t),i))}}function tm(e,t,n){return function(...r){let i=this.__v_raw,l=tV(i),s=w(l),o="entries"===e||e===Symbol.iterator&&s,a=i[e](...r),c=n?tl:t?tj:tU;return t||eJ(l,"iterate","keys"===e&&s?eK:eW),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[c(e[0]),c(e[1])]:c(e),done:t}},[Symbol.iterator](){return this}}}}function tg(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}let[ty,tv,tb,t_]=/* @__PURE__ */function(){let e={get(e){return to(this,e)},get size(){return tc(this)},has:ta,add:tu,set:td,delete:tp,clear:tf,forEach:th(!1,!1)},t={get(e){return to(this,e,!1,!0)},get size(){return tc(this)},has:ta,add(e){return tu.call(this,e,!0)},set(e,t){return td.call(this,e,t,!0)},delete:tp,clear:tf,forEach:th(!1,!0)},n={get(e){return to(this,e,!0)},get size(){return tc(this,!0)},has(e){return ta.call(this,e,!0)},add:tg("add"),set:tg("set"),delete:tg("delete"),clear:tg("clear"),forEach:th(!0,!1)},r={get(e){return to(this,e,!0,!0)},get size(){return tc(this,!0)},has(e){return ta.call(this,e,!0)},add:tg("add"),set:tg("set"),delete:tg("delete"),clear:tg("clear"),forEach:th(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=tm(i,!1,!1),n[i]=tm(i,!0,!1),t[i]=tm(i,!1,!0),r[i]=tm(i,!0,!0)}),[e,n,t,r]}();function tS(e,t){let n=t?e?t_:tb:e?tv:ty;return(t,r,i)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(T(n,r)&&r in t?n:t,r,i)}let tx={get:/* @__PURE__ */tS(!1,!1)},tC={get:/* @__PURE__ */tS(!1,!0)},tT={get:/* @__PURE__ */tS(!0,!1)},tk={get:/* @__PURE__ */tS(!0,!0)},tw=/* @__PURE__ */new WeakMap,tN=/* @__PURE__ */new WeakMap,tE=/* @__PURE__ */new WeakMap,tA=/* @__PURE__ */new WeakMap;function tR(e){return tL(e)?e:tM(e,!1,tt,tx,tw)}function tI(e){return tM(e,!1,tr,tC,tN)}function tO(e){return tM(e,!0,tn,tT,tE)}function tP(e){return tM(e,!0,ti,tk,tA)}function tM(e,t,n,r,i){if(!P(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let l=i.get(e);if(l)return l;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}($(e));if(0===s)return e;let o=new Proxy(e,2===s?r:n);return i.set(e,o),o}function tD(e){return tL(e)?tD(e.__v_raw):!!(e&&e.__v_isReactive)}function tL(e){return!!(e&&e.__v_isReadonly)}function t$(e){return!!(e&&e.__v_isShallow)}function tF(e){return!!e&&!!e.__v_raw}function tV(e){let t=e&&e.__v_raw;return t?tV(t):e}function tB(e){return!T(e,"__v_skip")&&Object.isExtensible(e)&&X(e,"__v_skip",!0),e}let tU=e=>P(e)?tR(e):e,tj=e=>P(e)?tO(e):e;function tH(e){return!!e&&!0===e.__v_isRef}function tq(e){return tK(e,!1)}function tW(e){return tK(e,!0)}function tK(e,t){return tH(e)?e:new tz(e,t)}class tz{constructor(e,t){this.dep=new eH,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:tV(e),this._value=t?e:tU(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||t$(e)||tL(e);G(e=n?e:tV(e),t)&&(this._rawValue=e,this._value=n?e:tU(e),this.dep.trigger())}}function tJ(e){e.dep&&e.dep.trigger()}function tG(e){return tH(e)?e.value:e}function tQ(e){return R(e)?e():tG(e)}let tX={get:(e,t,n)=>"__v_raw"===t?e:tG(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return tH(i)&&!tH(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function tZ(e){return tD(e)?e:new Proxy(e,tX)}class tY{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new eH,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}function t0(e){return new tY(e)}function t1(e){let t=k(e)?Array(e.length):{};for(let n in e)t[n]=t4(e,n);return t}class t2{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let n=eq.get(e);return n&&n.get(t)}(tV(this._object),this._key)}}class t6{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function t3(e,t,n){return tH(e)?e:R(e)?new t6(e):P(e)&&arguments.length>1?t4(e,t,n):tq(e)}function t4(e,t,n){let r=e[t];return tH(r)?r:new t2(e,t,n)}class t8{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eH(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eU-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&n!==this)return eN(this,!0),!0}get value(){let e=this.dep.track();return eO(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let t5={GET:"get",HAS:"has",ITERATE:"iterate"},t9={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},t7={},ne=/* @__PURE__ */new WeakMap;function nt(){return d}function nn(e,t=!1,n=d){if(n){let t=ne.get(n);t||ne.set(n,t=[]),t.push(e)}}function nr(e,t=1/0,n){if(t<=0||!P(e)||e.__v_skip||(n=n||/* @__PURE__ */new Set).has(e))return e;if(n.add(e),t--,tH(e))nr(e.value,t,n);else if(k(e))for(let r=0;r{nr(e,t,n)});else if(F(e)){for(let r in e)nr(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&nr(e[r],t,n)}return e}function ni(e,t){}let nl={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"};function ns(e,t,n,r){try{return r?e(...r):e()}catch(e){na(e,t,n)}}function no(e,t,n,r){if(R(e)){let i=ns(e,t,n,r);return i&&M(i)&&i.catch(e=>{na(e,t,n)}),i}if(k(e)){let i=[];for(let l=0;l=nx(n)?nc.push(e):nc.splice(function(e){let t=nu+1,n=nc.length;for(;t>>1,i=nc[r],l=nx(i);lnx(e)-nx(t));if(nd.length=0,np){np.push(...e);return}for(nf=0,np=e;nfnull==e.id?2&e.flags?-1:1/0:e.id,nC=null,nT=null;function nk(e){let t=nC;return nC=e,nT=e&&e.type.__scopeId||null,t}function nw(e){nT=e}function nN(){nT=null}let nE=e=>nA;function nA(e,t=nC,n){if(!t||e._n)return e;let r=(...n)=>{let i;r._d&&lg(-1);let l=nk(t);try{i=e(...n)}finally{nk(l),r._d&&lg(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function nR(e,t){if(null===nC)return e;let n=lY(nC),r=e.dirs||(e.dirs=[]);for(let e=0;ee.__isTeleport,nM=e=>e&&(e.disabled||""===e.disabled),nD=e=>e&&(e.defer||""===e.defer),nL=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,n$=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,nF=(e,t)=>{let n=e&&e.to;return I(n)?t?t(n):null:n};function nV(e,t,n,{o:{insert:r},m:i},l=2){0===l&&r(e.targetAnchor,t,n);let{el:s,anchor:o,shapeFlag:a,children:c,props:u}=e,d=2===l;if(d&&r(s,t,n),(!d||nM(u))&&16&a)for(let e=0;e{16&b&&(i&&i.isCE&&(i.ce._teleportTarget=e),u(_,e,t,i,l,s,o,a))},p=()=>{let e=t.target=nF(t.props,h),n=nj(e,t,m,f);e&&("svg"!==s&&nL(e)?s="svg":"mathml"!==s&&n$(e)&&(s="mathml"),y||(d(e,n),nU(t)))};y&&(d(n,c),nU(t)),nD(t.props)?iL(p,l):p()}else{t.el=e.el,t.targetStart=e.targetStart;let r=t.anchor=e.anchor,u=t.target=e.target,f=t.targetAnchor=e.targetAnchor,m=nM(e.props),g=m?n:u;if("svg"===s||nL(u)?s="svg":("mathml"===s||n$(u))&&(s="mathml"),S?(p(e.dynamicChildren,S,g,i,l,s,o),iH(e,t,!0)):a||d(e,t,g,m?r:f,i,l,s,o,!1),y)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):nV(t,n,r,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=nF(t.props,h);e&&nV(t,e,null,c,0)}else m&&nV(t,u,f,c,1);nU(t)}},remove(e,t,n,{um:r,o:{remove:i}},l){let{shapeFlag:s,children:o,anchor:a,targetStart:c,targetAnchor:u,target:d,props:p}=e;if(d&&(i(c),i(u)),l&&i(a),16&s){let e=l||!nM(p);for(let i=0;i{e.isMounted=!0}),rA(()=>{e.isUnmounting=!0}),e}let nK=[Function,Array],nz={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nK,onEnter:nK,onAfterEnter:nK,onEnterCancelled:nK,onBeforeLeave:nK,onLeave:nK,onAfterLeave:nK,onLeaveCancelled:nK,onBeforeAppear:nK,onAppear:nK,onAfterAppear:nK,onAppearCancelled:nK},nJ=e=>{let t=e.subTree;return t.component?nJ(t.component):t};function nG(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==lc){t=n;break}}return t}let nQ={name:"BaseTransition",props:nz,setup(e,{slots:t}){let n=lU(),r=nW();return()=>{let i=t.default&&n2(t.default(),!0);if(!i||!i.length)return;let l=nG(i),s=tV(e),{mode:o}=s;if(r.isLeaving)return nY(l);let a=n0(l);if(!a)return nY(l);let c=nZ(a,s,r,n,e=>c=e);a.type!==lc&&n1(a,c);let u=n.subTree,d=u&&n0(u);if(d&&d.type!==lc&&!lS(a,d)&&nJ(n).type!==lc){let e=nZ(d,s,r,n);if(n1(d,e),"out-in"===o&&a.type!==lc)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave},nY(l);"in-out"===o&&a.type!==lc&&(e.delayLeave=(e,t,n)=>{nX(r,d)[String(d.key)]=d,e[nH]=()=>{t(),e[nH]=void 0,delete c.delayedLeave},c.delayedLeave=n})}return l}}};function nX(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=/* @__PURE__ */Object.create(null),n.set(t.type,r)),r}function nZ(e,t,n,r,i){let{appear:l,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:f,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:g,onAppear:y,onAfterAppear:b,onAppearCancelled:_}=t,S=String(e.key),x=nX(n,e),C=(e,t)=>{e&&no(e,r,9,t)},T=(e,t)=>{let n=t[1];C(e,t),k(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},w={mode:s,persisted:o,beforeEnter(t){let r=a;if(!n.isMounted){if(!l)return;r=g||a}t[nH]&&t[nH](!0);let i=x[S];i&&lS(e,i)&&i.el[nH]&&i.el[nH](),C(r,[t])},enter(e){let t=c,r=u,i=d;if(!n.isMounted){if(!l)return;t=y||c,r=b||u,i=_||d}let s=!1,o=e[nq]=t=>{s||(s=!0,t?C(i,[e]):C(r,[e]),w.delayedLeave&&w.delayedLeave(),e[nq]=void 0)};t?T(t,[e,o]):o()},leave(t,r){let i=String(e.key);if(t[nq]&&t[nq](!0),n.isUnmounting)return r();C(p,[t]);let l=!1,s=t[nH]=n=>{l||(l=!0,r(),n?C(m,[t]):C(h,[t]),t[nH]=void 0,x[i]!==e||delete x[i])};x[i]=e,f?T(f,[t,s]):s()},clone(e){let l=nZ(e,t,n,r,i);return i&&i(l),l}};return w}function nY(e){if(rm(e))return(e=lE(e)).children=null,e}function n0(e){if(!rm(e))return nP(e.type)&&e.children?nG(e.children):e;let{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&R(n.default))return n.default()}}function n1(e,t){6&e.shapeFlag&&e.component?(e.transition=t,n1(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function n2(e,t=!1,n){let r=[],i=0;for(let l=0;l1)for(let e=0;en.value,set:e=>n.value=e}),n}function n5(e,t,n,r,i=!1){if(k(e)){e.forEach((e,l)=>n5(e,t&&(k(t)?t[l]:t),n,r,i));return}if(rp(r)&&!i)return;let l=4&r.shapeFlag?lY(r.component):r.el,s=i?null:l,{i:o,r:a}=e,c=t&&t.r,u=o.refs===h?o.refs={}:o.refs,d=o.setupState,p=tV(d),f=d===h?()=>!1:e=>T(p,e);if(null!=c&&c!==a&&(I(c)?(u[c]=null,f(c)&&(d[c]=null)):tH(c)&&(c.value=null)),R(a))ns(a,o,12,[s,u]);else{let t=I(a),r=tH(a);if(t||r){let o=()=>{if(e.f){let n=t?f(a)?d[a]:u[a]:a.value;i?k(n)&&x(n,l):k(n)?n.includes(l)||n.push(l):t?(u[a]=[l],f(a)&&(d[a]=u[a])):(a.value=[l],e.k&&(u[e.k]=a.value))}else t?(u[a]=s,f(a)&&(d[a]=s)):r&&(a.value=s,e.k&&(u[e.k]=s))};s?(o.id=-1,iL(o,n)):o()}}}let n9=!1,n7=()=>{n9||(console.error("Hydration completed but contains mismatches."),n9=!0)},re=e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName,rt=e=>e.namespaceURI.includes("MathML"),rn=e=>{if(1===e.nodeType){if(re(e))return"svg";if(rt(e))return"mathml"}},rr=e=>8===e.nodeType;function ri(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:l,parentNode:s,remove:o,insert:a,createComment:c}}=e,u=(n,r,o,c,b,_=!1)=>{_=_||!!r.dynamicChildren;let S=rr(n)&&"["===n.data,x=()=>h(n,r,o,c,b,S),{type:C,ref:T,shapeFlag:k,patchFlag:w}=r,N=n.nodeType;r.el=n,-2===w&&(_=!1,r.dynamicChildren=null);let E=null;switch(C){case la:3!==N?""===r.children?(a(r.el=i(""),s(n),n),E=n):E=x():(n.data!==r.children&&(n7(),n.data=r.children),E=l(n));break;case lc:y(n)?(E=l(n),g(r.el=n.content.firstChild,n,o)):E=8!==N||S?x():l(n);break;case lu:if(S&&(N=(n=l(n)).nodeType),1===N||3===N){E=n;let e=!r.children.length;for(let t=0;t{s=s||!!t.dynamicChildren;let{type:a,props:c,patchFlag:u,shapeFlag:d,dirs:f,transition:h}=t,m="input"===a||"option"===a;if(m||-1!==u){let a;f&&nI(t,null,n,"created");let _=!1;if(y(e)){_=ij(i,h)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;_&&h.beforeEnter(r),g(r,e,n),t.el=e=r}if(16&d&&!(c&&(c.innerHTML||c.textContent))){let r=p(e.firstChild,t,e,n,i,l,s);for(;r;){ro(e,1)||n7();let t=r;r=r.nextSibling,o(t)}}else if(8&d){let n=t.children;"\n"===n[0]&&("PRE"===e.tagName||"TEXTAREA"===e.tagName)&&(n=n.slice(1)),e.textContent!==n&&(ro(e,0)||n7(),e.textContent=t.children)}if(c){if(m||!s||48&u){let t=e.tagName.includes("-");for(let i in c)(m&&(i.endsWith("value")||"indeterminate"===i)||b(i)&&!B(i)||"."===i[0]||t)&&r(e,i,null,c[i],void 0,n)}else if(c.onClick)r(e,"onClick",null,c.onClick,void 0,n);else if(4&u&&tD(c.style))for(let e in c.style)c.style[e]}(a=c&&c.onVnodeBeforeMount)&&lL(a,n,t),f&&nI(t,null,n,"beforeMount"),((a=c&&c.onVnodeMounted)||f||_)&&ll(()=>{a&&lL(a,n,t),_&&h.enter(e),f&&nI(t,null,n,"mounted")},i)}return e.nextSibling},p=(e,t,r,s,o,c,d)=>{d=d||!!t.dynamicChildren;let p=t.children,f=p.length;for(let t=0;t{let{slotScopeIds:u}=t;u&&(i=i?i.concat(u):u);let d=s(e),f=p(l(e),t,d,n,r,i,o);return f&&rr(f)&&"]"===f.data?l(t.anchor=f):(n7(),a(t.anchor=c("]"),d,f),f)},h=(e,t,r,i,a,c)=>{if(ro(e.parentElement,1)||n7(),t.el=null,c){let t=m(e);for(;;){let n=l(e);if(n&&n!==t)o(n);else break}}let u=l(e),d=s(e);return o(e),n(null,t,d,u,r,i,rn(d),a),u},m=(e,t="[",n="]")=>{let r=0;for(;e;)if((e=l(e))&&rr(e)&&(e.data===t&&r++,e.data===n)){if(0===r)return l(e);r--}return e},g=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),nS(),t._vnode=e;return}u(t.firstChild,e,null,null,null),nS(),t._vnode=e},u]}let rl="data-allow-mismatch",rs={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function ro(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(rl);)e=e.parentElement;let n=e&&e.getAttribute(rl);if(null==n)return!1;if(""===n)return!0;{let e=n.split(",");return!!(0===t&&e.includes("children"))||n.split(",").includes(rs[t])}}let ra=(e=1e4)=>t=>{let n=requestIdleCallback(t,{timeout:e});return()=>cancelIdleCallback(n)},rc=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(function(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:l,innerWidth:s}=window;return(t>0&&t0&&r0&&n0&&ir.disconnect()},ru=e=>t=>{if(e){let n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},rd=(e=[])=>(t,n)=>{I(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,l(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},l=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),l},rp=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function rf(e){let t;R(e)&&(e={loader:e});let{loader:n,loadingComponent:r,errorComponent:i,delay:l=200,hydrate:s,timeout:o,suspensible:a=!0,onError:c}=e,u=null,d=0,p=()=>(d++,u=null,f()),f=()=>{let e;return u||(e=u=n().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(p()),()=>n(e),d+1)});throw e}).then(n=>e!==u&&u?u:(n&&(n.__esModule||"Module"===n[Symbol.toStringTag])&&(n=n.default),t=n,n)))};return n6({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(e,n,r){let i=s?()=>{let t=s(r,t=>(function(e,t){if(rr(e)&&"["===e.data){let n=1,r=e.nextSibling;for(;r;){if(1===r.nodeType){if(!1===t(r))break}else if(rr(r)){if("]"===r.data){if(0==--n)break}else"["===r.data&&n++}r=r.nextSibling}}else t(e)})(e,t));t&&(n.bum||(n.bum=[])).push(t)}:r;t?i():f().then(()=>!n.isUnmounted&&i())},get __asyncResolved(){return t},setup(){let e=lB;if(n4(e),t)return()=>rh(t,e);let n=t=>{u=null,na(t,e,13,!i)};if(a&&e.suspense||lW)return f().then(t=>()=>rh(t,e)).catch(e=>(n(e),()=>i?lw(i,{error:e}):null));let s=tq(!1),c=tq(),d=tq(!!l);return l&&setTimeout(()=>{d.value=!1},l),null!=o&&setTimeout(()=>{if(!s.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);n(e),c.value=e}},o),f().then(()=>{s.value=!0,e.parent&&rm(e.parent.vnode)&&e.parent.update()}).catch(e=>{n(e),c.value=e}),()=>s.value&&t?rh(t,e):c.value&&i?lw(i,{error:c.value}):r&&!d.value?lw(r):void 0}})}function rh(e,t){let{ref:n,props:r,children:i,ce:l}=t.vnode,s=lw(e,r,i);return s.ref=n,s.ce=l,delete t.vnode.ce,s}let rm=e=>e.type.__isKeepAlive,rg={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=lU(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&1===e.length?e[0]:e};let i=/* @__PURE__ */new Map,l=/* @__PURE__ */new Set,s=null,o=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=r,p=d("div");function f(e){rS(e),u(e,n,o,!0)}function h(e){i.forEach((t,n)=>{let r=l0(t.type);r&&!e(r)&&m(n)})}function m(e){let t=i.get(e);!t||s&&lS(t,s)?s&&rS(s):f(t),i.delete(e),l.delete(e)}r.activate=(e,t,n,r,i)=>{let l=e.component;c(e,t,n,0,o),a(l.vnode,e,t,n,l,o,r,e.slotScopeIds,i),iL(()=>{l.isDeactivated=!1,l.a&&Q(l.a);let t=e.props&&e.props.onVnodeMounted;t&&lL(t,l.parent,e)},o)},r.deactivate=e=>{let t=e.component;iq(t.m),iq(t.a),c(e,p,null,1,o),iL(()=>{t.da&&Q(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&lL(n,t.parent,e),t.isDeactivated=!0},o)},iQ(()=>[e.include,e.exclude],([e,t])=>{e&&h(t=>ry(e,t)),t&&h(e=>!ry(t,e))},{flush:"post",deep:!0});let g=null,y=()=>{null!=g&&(i7(n.subTree.type)?iL(()=>{i.set(g,rx(n.subTree))},n.subTree.suspense):i.set(g,rx(n.subTree)))};return rw(y),rE(y),rA(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=rx(t);if(e.type===i.type&&e.key===i.key){rS(i);let e=i.component.da;e&&iL(e,r);return}f(e)})}),()=>{if(g=null,!t.default)return s=null;let n=t.default(),r=n[0];if(n.length>1)return s=null,n;if(!l_(r)||!(4&r.shapeFlag)&&!(128&r.shapeFlag))return s=null,r;let o=rx(r);if(o.type===lc)return s=null,o;let a=o.type,c=l0(rp(o)?o.type.__asyncResolved||{}:a),{include:u,exclude:d,max:p}=e;if(u&&(!c||!ry(u,c))||d&&c&&ry(d,c))return o.shapeFlag&=-257,s=o,r;let f=null==o.key?a:o.key,h=i.get(f);return o.el&&(o=lE(o),128&r.shapeFlag&&(r.ssContent=o)),g=f,h?(o.el=h.el,o.component=h.component,o.transition&&n1(o,o.transition),o.shapeFlag|=512,l.delete(f),l.add(f)):(l.add(f),p&&l.size>parseInt(p,10)&&m(l.values().next().value)),o.shapeFlag|=256,s=o,i7(r.type)?r:o}}};function ry(e,t){return k(e)?e.some(e=>ry(e,t)):I(e)?e.split(",").includes(t):!!A(e)&&(e.lastIndex=0,e.test(t))}function rv(e,t){r_(e,"a",t)}function rb(e,t){r_(e,"da",t)}function r_(e,t,n=lB){let r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(rC(t,r,n),n){let e=n.parent;for(;e&&e.parent;)rm(e.parent.vnode)&&function(e,t,n,r){let i=rC(t,e,r,!0);rR(()=>{x(r[t],i)},n)}(r,t,n,e),e=e.parent}}function rS(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function rx(e){return 128&e.shapeFlag?e.ssContent:e}function rC(e,t,n=lB,r=!1){if(n){let i=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...r)=>{eF();let i=lj(n),l=no(t,n,e,r);return i(),eV(),l});return r?i.unshift(l):i.push(l),l}}let rT=e=>(t,n=lB)=>{lW&&"sp"!==e||rC(e,(...e)=>t(...e),n)},rk=rT("bm"),rw=rT("m"),rN=rT("bu"),rE=rT("u"),rA=rT("bum"),rR=rT("um"),rI=rT("sp"),rO=rT("rtg"),rP=rT("rtc");function rM(e,t=lB){rC("ec",e,t)}let rD="components";function rL(e,t){return rB(rD,e,!0,t)||e}let r$=Symbol.for("v-ndc");function rF(e){return I(e)?rB(rD,e,!1)||e:e||r$}function rV(e){return rB("directives",e)}function rB(e,t,n=!0,r=!1){let i=nC||lB;if(i){let n=i.type;if(e===rD){let e=l0(n,!1);if(e&&(e===t||e===q(t)||e===z(q(t))))return n}let l=rU(i[e]||n[e],t)||rU(i.appContext[e],t);return!l&&r?n:l}}function rU(e,t){return e&&(e[t]||e[q(t)]||e[z(q(t))])}function rj(e,t,n,r){let i;let l=n&&n[r],s=k(e);if(s||I(e)){let n=s&&tD(e),r=!1;n&&(r=!t$(e),e=eX(e)),i=Array(e.length);for(let n=0,s=e.length;nt(e,n,void 0,l&&l[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,s=n.length;r{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function rq(e,t,n={},r,i){if(nC.ce||nC.parent&&rp(nC.parent)&&nC.parent.ce)return"default"!==t&&(n.name=t),lf(),lb(lo,null,[lw("slot",n,r&&r())],64);let l=e[t];l&&l._c&&(l._d=!1),lf();let s=l&&rW(l(n)),o=lb(lo,{key:(n.key||s&&s.key||`_${t}`)+(!s&&r?"_fb":"")},s||(r?r():[]),s&&1===e._?64:-2);return!i&&o.scopeId&&(o.slotScopeIds=[o.scopeId+"-s"]),l&&l._c&&(l._d=!0),o}function rW(e){return e.some(e=>!l_(e)||!!(e.type!==lc&&(e.type!==lo||rW(e.children))))?e:null}function rK(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:J(r)]=e[r];return n}let rz=e=>e?lq(e)?lY(e):rz(e.parent):null,rJ=/* @__PURE__ */S(/* @__PURE__ */Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>rz(e.parent),$root:e=>rz(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>is(e),$forceUpdate:e=>e.f||(e.f=()=>{ny(e.update)}),$nextTick:e=>e.n||(e.n=ng.bind(e.proxy)),$watch:e=>iZ.bind(e)}),rG=(e,t)=>e!==h&&!e.__isScriptSetup&&T(e,t),rQ={get({_:e},t){let n,r,i;if("__v_skip"===t)return!0;let{ctx:l,setupState:s,data:o,props:a,accessCache:c,type:u,appContext:d}=e;if("$"!==t[0]){let r=c[t];if(void 0!==r)switch(r){case 1:return s[t];case 2:return o[t];case 4:return l[t];case 3:return a[t]}else{if(rG(s,t))return c[t]=1,s[t];if(o!==h&&T(o,t))return c[t]=2,o[t];if((n=e.propsOptions[0])&&T(n,t))return c[t]=3,a[t];if(l!==h&&T(l,t))return c[t]=4,l[t];ii&&(c[t]=0)}}let p=rJ[t];return p?("$attrs"===t&&eJ(e.attrs,"get",""),p(e)):(r=u.__cssModules)&&(r=r[t])?r:l!==h&&T(l,t)?(c[t]=4,l[t]):T(i=d.config.globalProperties,t)?i[t]:void 0},set({_:e},t,n){let{data:r,setupState:i,ctx:l}=e;return rG(i,t)?(i[t]=n,!0):r!==h&&T(r,t)?(r[t]=n,!0):!T(e.props,t)&&!("$"===t[0]&&t.slice(1) in e)&&(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:l}},s){let o;return!!n[s]||e!==h&&T(e,s)||rG(t,s)||(o=l[0])&&T(o,s)||T(r,s)||T(rJ,s)||T(i.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:T(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},rX=/* @__PURE__ */S({},rQ,{get(e,t){if(t!==Symbol.unscopables)return rQ.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!et(t)});function rZ(){return null}function rY(){return null}function r0(e){}function r1(e){}function r2(){return null}function r6(){}function r3(e,t){return null}function r4(){return r5().slots}function r8(){return r5().attrs}function r5(){let e=lU();return e.setupContext||(e.setupContext=lZ(e))}function r9(e){return k(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function r7(e,t){let n=r9(e);for(let e in t){if(e.startsWith("__skip"))continue;let r=n[e];r?k(r)||R(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:null===r&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function ie(e,t){return e&&t?k(e)&&k(t)?e.concat(t):S({},r9(e),r9(t)):e||t}function it(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function ir(e){let t=lU(),n=e();return lH(),M(n)&&(n=n.catch(e=>{throw lj(t),e})),[n,()=>lj(t)]}let ii=!0;function il(e,t,n){no(k(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function is(e){let t;let n=e.type,{mixins:r,extends:i}=n,{mixins:l,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:l.length||r||i?(t={},l.length&&l.forEach(e=>io(t,e,o,!0)),io(t,n,o)):t=n,P(n)&&s.set(n,t),t}function io(e,t,n,r=!1){let{mixins:i,extends:l}=t;for(let s in l&&io(e,l,n,!0),i&&i.forEach(t=>io(e,t,n,!0)),t)if(r&&"expose"===s);else{let r=ia[s]||n&&n[s];e[s]=r?r(e[s],t[s]):t[s]}return e}let ia={data:ic,props:ih,emits:ih,methods:ip,computed:ip,beforeCreate:id,created:id,beforeMount:id,mounted:id,beforeUpdate:id,updated:id,beforeDestroy:id,beforeUnmount:id,destroyed:id,unmounted:id,activated:id,deactivated:id,errorCaptured:id,serverPrefetch:id,components:ip,directives:ip,watch:function(e,t){if(!e)return t;if(!t)return e;let n=S(/* @__PURE__ */Object.create(null),e);for(let r in t)n[r]=id(e[r],t[r]);return n},provide:ic,inject:function(e,t){return ip(iu(e),iu(t))}};function ic(e,t){return t?e?function(){return S(R(e)?e.call(this,this):e,R(t)?t.call(this,this):t)}:t:e}function iu(e){if(k(e)){let t={};for(let n=0;n1)return n&&R(t)?t.call(r&&r.proxy):t}}function i_(){return!!(lB||nC||iy)}let iS={},ix=()=>Object.create(iS),iC=e=>Object.getPrototypeOf(e)===iS;function iT(e,t,n,r){let i;let[l,s]=e.propsOptions,o=!1;if(t)for(let a in t){let c;if(B(a))continue;let u=t[a];l&&T(l,c=q(a))?s&&s.includes(c)?(i||(i={}))[c]=u:n[c]=u:i6(e.emitsOptions,a)||a in r&&u===r[a]||(r[a]=u,o=!0)}if(s){let t=tV(n),r=i||h;for(let i=0;i"_"===e[0]||"$stable"===e,iA=e=>k(e)?e.map(lO):[lO(e)],iR=(e,t,n)=>{if(t._n)return t;let r=nA((...e)=>iA(t(...e)),n);return r._c=!1,r},iI=(e,t,n)=>{let r=e._ctx;for(let n in e){if(iE(n))continue;let i=e[n];if(R(i))t[n]=iR(n,i,r);else if(null!=i){let e=iA(i);t[n]=()=>e}}},iO=(e,t)=>{let n=iA(t);e.slots.default=()=>n},iP=(e,t,n)=>{for(let r in t)(n||"_"!==r)&&(e[r]=t[r])},iM=(e,t,n)=>{let r=e.slots=ix();if(32&e.vnode.shapeFlag){let e=t._;e?(iP(r,t,n),n&&X(r,"_",e,!0)):iI(t,r)}else t&&iO(e,t)},iD=(e,t,n)=>{let{vnode:r,slots:i}=e,l=!0,s=h;if(32&r.shapeFlag){let e=t._;e?n&&1===e?l=!1:iP(i,t,n):(l=!t.$stable,iI(t,i)),s=t}else t&&(iO(e,t),s={default:1});if(l)for(let e in i)iE(e)||null!=s[e]||delete i[e]},iL=ll;function i$(e){return iV(e)}function iF(e){return iV(e,ri)}function iV(e,t){var n;let r,i;ee().__VUE__=!0;let{insert:l,remove:s,patchProp:o,createElement:a,createText:c,createComment:u,setText:d,setElementText:p,parentNode:f,nextSibling:y,setScopeId:b=g,insertStaticContent:_}=e,x=(e,t,n,r=null,i=null,l=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!lS(e,t)&&(r=ei(e),Z(e,i,l,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:c,ref:u,shapeFlag:d}=t;switch(c){case la:C(e,t,n,r);break;case lc:k(e,t,n,r);break;case lu:null==e&&w(t,n,r,s);break;case lo:F(e,t,n,r,i,l,s,o,a);break;default:1&d?A(e,t,n,r,i,l,s,o,a):6&d?V(e,t,n,r,i,l,s,o,a):64&d?c.process(e,t,n,r,i,l,s,o,a,eo):128&d&&c.process(e,t,n,r,i,l,s,o,a,eo)}null!=u&&i&&n5(u,e&&e.ref,l,t||e,!t)},C=(e,t,n,r)=>{if(null==e)l(t.el=c(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&d(n,t.children)}},k=(e,t,n,r)=>{null==e?l(t.el=u(t.children||""),n,r):t.el=e.el},w=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},N=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=y(e),l(e,n,r),e=i;l(t,n,r)},E=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=y(e),s(e),e=n;s(t)},A=(e,t,n,r,i,l,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?I(t,n,r,i,l,s,o,a):D(e,t,i,l,s,o,a)},I=(e,t,n,r,i,s,c,u)=>{let d,f;let{props:h,shapeFlag:m,transition:g,dirs:y}=e;if(d=e.el=a(e.type,s,h&&h.is,h),8&m?p(d,e.children):16&m&&M(e.children,d,null,r,i,iB(e,s),c,u),y&&nI(e,null,r,"created"),O(d,e,e.scopeId,c,r),h){for(let e in h)"value"===e||B(e)||o(d,e,null,h[e],s,r);"value"in h&&o(d,"value",null,h.value,s),(f=h.onVnodeBeforeMount)&&lL(f,r,e)}y&&nI(e,null,r,"beforeMount");let b=ij(i,g);b&&g.beforeEnter(d),l(d,t,n),((f=h&&h.onVnodeMounted)||b||y)&&iL(()=>{f&&lL(f,r,e),b&&g.enter(d),y&&nI(e,null,r,"mounted")},i)},O=(e,t,n,r,i)=>{if(n&&b(e,n),r)for(let t=0;t{for(let c=a;c{let a;let c=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=16&e.patchFlag;let m=e.props||h,g=t.props||h;if(n&&iU(n,!1),(a=g.onVnodeBeforeUpdate)&&lL(a,n,t,e),f&&nI(t,e,n,"beforeUpdate"),n&&iU(n,!0),(m.innerHTML&&null==g.innerHTML||m.textContent&&null==g.textContent)&&p(c,""),d?L(e.dynamicChildren,d,c,n,r,iB(t,i),l):s||z(e,t,c,null,n,r,iB(t,i),l,!1),u>0){if(16&u)$(c,m,g,n,i);else if(2&u&&m.class!==g.class&&o(c,"class",null,g.class,i),4&u&&o(c,"style",m.style,g.style,i),8&u){let e=t.dynamicProps;for(let t=0;t{a&&lL(a,n,t,e),f&&nI(t,e,n,"updated")},r)},L=(e,t,n,r,i,l,s)=>{for(let o=0;o{if(t!==n){if(t!==h)for(let l in t)B(l)||l in n||o(e,l,t[l],null,i,r);for(let l in n){if(B(l))continue;let s=n[l],a=t[l];s!==a&&"value"!==l&&o(e,l,a,s,i,r)}"value"in n&&o(e,"value",t.value,n.value,i)}},F=(e,t,n,r,i,s,o,a,u)=>{let d=t.el=e?e.el:c(""),p=t.anchor=e?e.anchor:c(""),{patchFlag:f,dynamicChildren:h,slotScopeIds:m}=t;m&&(a=a?a.concat(m):m),null==e?(l(d,n,r),l(p,n,r),M(t.children||[],n,p,i,s,o,a,u)):f>0&&64&f&&h&&e.dynamicChildren?(L(e.dynamicChildren,h,n,i,s,o,a),(null!=t.key||i&&t===i.subTree)&&iH(e,t,!0)):z(e,t,n,p,i,s,o,a,u)},V=(e,t,n,r,i,l,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?i.ctx.activate(t,n,r,s,a):U(t,n,r,i,l,s,a):j(e,t,a)},U=(e,t,n,r,i,l,s)=>{let o=e.component=lV(e,r,i);rm(e)&&(o.ctx.renderer=eo),lK(o,!1,s),o.asyncDep?(i&&i.registerDep(o,H,s),e.el||k(null,o.subTree=lw(lc),t,n)):H(o,e,t,n,i,l,s)},j=(e,t,n)=>{let r=t.component=e.component;if(function(e,t,n){let{props:r,children:i,component:l}=e,{props:s,children:o,patchFlag:a}=t,c=l.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!i||!!o)&&(!o||!o.$stable)||r!==s&&(r?!s||i5(r,s,c):!!s);if(1024&a)return!0;if(16&a)return r?i5(r,s,c):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t{let a=()=>{if(e.isMounted){let t,{next:n,bu:r,u:i,parent:c,vnode:u}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=u.el,W(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let d=n;iU(e,!1),n?(n.el=u.el,W(e,n,o)):n=u,r&&Q(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&lL(t,c,n,u),iU(e,!0);let p=i3(e),h=e.subTree;e.subTree=p,x(h,p,f(h.el),ei(h),e,l,s),n.el=p.el,null===d&&i9(e,p.el),i&&iL(i,l),(t=n.props&&n.props.onVnodeUpdated)&&iL(()=>lL(t,c,n,u),l)}else{let o;let{el:a,props:c}=t,{bm:u,m:d,parent:p,root:f,type:h}=e,m=rp(t);if(iU(e,!1),u&&Q(u),!m&&(o=c&&c.onVnodeBeforeMount)&&lL(o,p,t),iU(e,!0),a&&i){let t=()=>{e.subTree=i3(e),i(a,e.subTree,e,l,null)};m&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{f.ce&&f.ce._injectChildStyle(h);let i=e.subTree=i3(e);x(null,i,n,r,e,l,s),t.el=i.el}if(d&&iL(d,l),!m&&(o=c&&c.onVnodeMounted)){let e=t;iL(()=>lL(o,p,e),l)}(256&t.shapeFlag||p&&rp(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&iL(e.a,l),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new ek(a);e.scope.off();let u=e.update=c.run.bind(c),d=e.job=c.runIfDirty.bind(c);d.i=e,d.id=e.uid,c.scheduler=()=>ny(d),iU(e,!0),u()},W=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){let{props:i,attrs:l,vnode:{patchFlag:s}}=e,o=tV(i),[a]=e.propsOptions,c=!1;if((r||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let r=0;r{let c=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:h}=t;if(f>0){if(128&f){G(c,d,n,r,i,l,s,o,a);return}if(256&f){J(c,d,n,r,i,l,s,o,a);return}}8&h?(16&u&&er(c,i,l),d!==c&&p(n,d)):16&u?16&h?G(c,d,n,r,i,l,s,o,a):er(c,i,l,!0):(8&u&&p(n,""),16&h&&M(d,n,r,i,l,s,o,a))},J=(e,t,n,r,i,l,s,o,a)=>{let c;e=e||m,t=t||m;let u=e.length,d=t.length,p=Math.min(u,d);for(c=0;cd?er(e,i,l,!0,!1,p):M(t,n,r,i,l,s,o,a,p)},G=(e,t,n,r,i,l,s,o,a)=>{let c=0,u=t.length,d=e.length-1,p=u-1;for(;c<=d&&c<=p;){let r=e[c],u=t[c]=a?lP(t[c]):lO(t[c]);if(lS(r,u))x(r,u,n,null,i,l,s,o,a);else break;c++}for(;c<=d&&c<=p;){let r=e[d],c=t[p]=a?lP(t[p]):lO(t[p]);if(lS(r,c))x(r,c,n,null,i,l,s,o,a);else break;d--,p--}if(c>d){if(c<=p){let e=p+1,d=ep)for(;c<=d;)Z(e[c],i,l,!0),c++;else{let f;let h=c,g=c,y=/* @__PURE__ */new Map;for(c=g;c<=p;c++){let e=t[c]=a?lP(t[c]):lO(t[c]);null!=e.key&&y.set(e.key,c)}let b=0,_=p-g+1,S=!1,C=0,T=Array(_);for(c=0;c<_;c++)T[c]=0;for(c=h;c<=d;c++){let r;let u=e[c];if(b>=_){Z(u,i,l,!0);continue}if(null!=u.key)r=y.get(u.key);else for(f=g;f<=p;f++)if(0===T[f-g]&&lS(u,t[f])){r=f;break}void 0===r?Z(u,i,l,!0):(T[r-g]=c+1,r>=C?C=r:S=!0,x(u,t[r],n,null,i,l,s,o,a),b++)}let k=S?function(e){let t,n,r,i,l;let s=e.slice(),o=[0],a=e.length;for(t=0;t>1]]0&&(s[t]=o[r-1]),o[r]=t)}}for(r=o.length,i=o[r-1];r-- >0;)o[r]=i,i=s[i];return o}(T):m;for(f=k.length-1,c=_-1;c>=0;c--){let e=g+c,d=t[e],p=e+1{let{el:s,type:o,transition:a,children:c,shapeFlag:u}=e;if(6&u){X(e.component.subTree,t,n,r);return}if(128&u){e.suspense.move(t,n,r);return}if(64&u){o.move(e,t,n,eo);return}if(o===lo){l(s,t,n);for(let e=0;ea.enter(s),i);else{let{leave:e,delayLeave:r,afterLeave:i}=a,o=()=>l(s,t,n),c=()=>{e(s,()=>{o(),i&&i()})};r?r(s,o,c):c()}}else l(s,t,n)},Z=(e,t,n,r=!1,i=!1)=>{let l;let{type:s,props:o,ref:a,children:c,dynamicChildren:u,shapeFlag:d,patchFlag:p,dirs:f,cacheIndex:h}=e;if(-2===p&&(i=!1),null!=a&&n5(a,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&d){t.ctx.deactivate(e);return}let m=1&d&&f,g=!rp(e);if(g&&(l=o&&o.onVnodeBeforeUnmount)&&lL(l,t,e),6&d)en(e.component,n,r);else{if(128&d){e.suspense.unmount(n,r);return}m&&nI(e,null,t,"beforeUnmount"),64&d?e.type.remove(e,t,n,eo,r):u&&!u.hasOnce&&(s!==lo||p>0&&64&p)?er(u,t,n,!1,!0):(s===lo&&384&p||!i&&16&d)&&er(c,t,n),r&&Y(e)}(g&&(l=o&&o.onVnodeUnmounted)||m)&&iL(()=>{l&&lL(l,t,e),m&&nI(e,null,t,"unmounted")},n)},Y=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===lo){et(n,r);return}if(t===lu){E(e);return}let l=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,s=()=>t(n,l);r?r(e.el,l,s):s()}else l()},et=(e,t)=>{let n;for(;e!==t;)n=y(e),s(e),e=n;s(t)},en=(e,t,n)=>{let{bum:r,scope:i,job:l,subTree:s,um:o,m:a,a:c}=e;iq(a),iq(c),r&&Q(r),i.stop(),l&&(l.flags|=8,Z(s,e,t,n)),o&&iL(o,t),iL(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},er=(e,t,n,r=!1,i=!1,l=0)=>{for(let s=l;s{if(6&e.shapeFlag)return ei(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=y(e.anchor||e.el),n=t&&t[nO];return n?y(n):t},el=!1,es=(e,t,n)=>{null==e?t._vnode&&Z(t._vnode,null,null,!0):x(t._vnode||null,e,t,null,null,null,n),t._vnode=e,el||(el=!0,n_(),nS(),el=!1)},eo={p:x,um:Z,m:X,r:Y,mt:U,mc:M,pc:z,pbc:L,n:ei,o:e};return t&&([r,i]=t(eo)),{render:es,hydrate:r,createApp:(n=r,function(e,t=null){R(e)||(e=S({},e)),null==t||P(t)||(t=null);let r=im(),i=/* @__PURE__ */new WeakSet,l=[],s=!1,o=r.app={_uid:ig++,_component:e,_props:t,_container:null,_context:r,_instance:null,version:l8,get config(){return r.config},set config(v){},use:(e,...t)=>(i.has(e)||(e&&R(e.install)?(i.add(e),e.install(o,...t)):R(e)&&(i.add(e),e(o,...t))),o),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),o),component:(e,t)=>t?(r.components[e]=t,o):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,o):r.directives[e],mount(i,l,a){if(!s){let c=o._ceVNode||lw(e,t);return c.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),l&&n?n(c,i):es(c,i,a),s=!0,o._container=i,i.__vue_app__=o,lY(c.component)}},onUnmount(e){l.push(e)},unmount(){s&&(no(l,o._instance,16),es(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,o),runWithContext(e){let t=iy;iy=o;try{return e()}finally{iy=t}}};return o})}}function iB({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function iU({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ij(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function iH(e,t,n=!1){let r=e.children,i=t.children;if(k(r)&&k(i))for(let e=0;eib(iW);function iz(e,t){return iX(e,null,t)}function iJ(e,t){return iX(e,null,{flush:"post"})}function iG(e,t){return iX(e,null,{flush:"sync"})}function iQ(e,t,n){return iX(e,t,n)}function iX(e,t,n=h){let r;let{immediate:i,deep:l,flush:s,once:o}=n,a=S({},n);if(lW){if("sync"===s){let e=iK();r=e.__watcherHandles||(e.__watcherHandles=[])}else if(!t||i)a.once=!0;else{let e=()=>{};return e.stop=g,e.resume=g,e.pause=g,e}}let c=lB;a.call=(e,t,n)=>no(e,c,t,n);let u=!1;"post"===s?a.scheduler=e=>{iL(e,c&&c.suspense)}:"sync"!==s&&(u=!0,a.scheduler=(e,t)=>{t?e():ny(e)}),a.augmentJob=e=>{t&&(e.flags|=4),u&&(e.flags|=2,c&&(e.id=c.uid,e.i=c))};let p=function(e,t,n=h){let r,i,l,s;let{immediate:o,deep:a,once:c,scheduler:u,augmentJob:p,call:f}=n,m=e=>a?e:t$(e)||!1===a||0===a?nr(e,1):nr(e),y=!1,b=!1;if(tH(e)?(i=()=>e.value,y=t$(e)):tD(e)?(i=()=>m(e),y=!0):k(e)?(b=!0,y=e.some(e=>tD(e)||t$(e)),i=()=>e.map(e=>tH(e)?e.value:tD(e)?m(e):R(e)?f?f(e,2):e():void 0)):i=R(e)?t?f?()=>f(e,2):e:()=>{if(l){eF();try{l()}finally{eV()}}let t=d;d=r;try{return f?f(e,3,[s]):e(s)}finally{d=t}}:g,t&&a){let e=i,t=!0===a?1/0:a;i=()=>nr(e(),t)}let _=ex(),S=()=>{r.stop(),_&&x(_.effects,r)};if(c&&t){let e=t;t=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(t7):t7,T=e=>{if(1&r.flags&&(r.dirty||e)){if(t){let e=r.run();if(a||y||(b?e.some((e,t)=>G(e,C[t])):G(e,C))){l&&l();let n=d;d=r;try{let n=[e,C===t7?void 0:b&&C[0]===t7?[]:C,s];f?f(t,3,n):t(...n),C=e}finally{d=n}}}else r.run()}};return p&&p(T),(r=new ek(i)).scheduler=u?()=>u(T,!1):T,s=e=>nn(e,!1,r),l=r.onStop=()=>{let e=ne.get(r);if(e){if(f)f(e,4);else for(let t of e)t();ne.delete(r)}},t?o?T(!0):C=r.run():u?u(T.bind(null,!0),!0):r.run(),S.pause=r.pause.bind(r),S.resume=r.resume.bind(r),S.stop=S,S}(e,t,a);return r&&r.push(p),p}function iZ(e,t,n){let r;let i=this.proxy,l=I(e)?e.includes(".")?iY(i,e):()=>i[e]:e.bind(i,i);R(t)?r=t:(r=t.handler,n=t);let s=lj(this),o=iX(l,r.bind(i),n);return s(),o}function iY(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e{let a,c;let u=h;return iG(()=>{let n=e[t];G(a,n)&&(a=n,o())}),{get:()=>(s(),n.get?n.get(a):a),set(e){let s=n.set?n.set(e):e;if(!G(s,a)&&!(u!==h&&G(e,u)))return;let d=r.vnode.props;d&&(t in d||i in d||l in d)&&(`onUpdate:${t}` in d||`onUpdate:${i}` in d||`onUpdate:${l}` in d)||(a=e,o()),r.emit(`update:${t}`,s),G(e,s)&&G(e,u)&&!G(s,c)&&o(),u=e,c=s}}});return o[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?s||h:o,done:!1}:{done:!0}}},o}let i1=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${q(t)}Modifiers`]||e[`${K(t)}Modifiers`];function i2(e,t,...n){let r;if(e.isUnmounted)return;let i=e.vnode.props||h,l=n,s=t.startsWith("update:"),o=s&&i1(i,t.slice(7));o&&(o.trim&&(l=n.map(e=>I(e)?e.trim():e)),o.number&&(l=n.map(Z)));let a=i[r=J(t)]||i[r=J(q(t))];!a&&s&&(a=i[r=J(K(t))]),a&&no(a,e,6,l);let c=i[r+"Once"];if(c){if(e.emitted){if(e.emitted[r])return}else e.emitted={};e.emitted[r]=!0,no(c,e,6,l)}}function i6(e,t){return!!(e&&b(t))&&(T(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||T(e,K(t))||T(e,t))}function i3(e){let t,n;let{type:r,vnode:i,proxy:l,withProxy:s,propsOptions:[o],slots:a,attrs:c,emit:u,render:d,renderCache:p,props:f,data:h,setupState:m,ctx:g,inheritAttrs:y}=e,b=nk(e);try{if(4&i.shapeFlag){let e=s||l;t=lO(d.call(e,e,p,f,m,h,g)),n=c}else t=lO(r.length>1?r(f,{attrs:c,slots:a,emit:u}):r(f,null)),n=r.props?c:i4(c)}catch(n){ld.length=0,na(n,e,1),t=lw(lc)}let S=t;if(n&&!1!==y){let e=Object.keys(n),{shapeFlag:t}=S;e.length&&7&t&&(o&&e.some(_)&&(n=i8(n,o)),S=lE(S,n,!1,!0))}return i.dirs&&((S=lE(S,null,!1,!0)).dirs=S.dirs?S.dirs.concat(i.dirs):i.dirs),i.transition&&n1(S,i.transition),t=S,nk(b),t}let i4=e=>{let t;for(let n in e)("class"===n||"style"===n||b(n))&&((t||(t={}))[n]=e[n]);return t},i8=(e,t)=>{let n={};for(let r in e)_(r)&&r.slice(9) in t||(n[r]=e[r]);return n};function i5(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;ie.__isSuspense,le=0,lt={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,l,s,o,a,c){if(null==e)!function(e,t,n,r,i,l,s,o,a){let{p:c,o:{createElement:u}}=a,d=u("div"),p=e.suspense=lr(e,i,r,t,d,n,l,s,o,a);c(null,p.pendingBranch=e.ssContent,d,null,r,p,l,s),p.deps>0?(ln(e,"onPending"),ln(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,l,s),ls(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,r,i,l,s,o,a,c);else{if(l&&l.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}!function(e,t,n,r,i,l,s,o,{p:a,um:c,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let p=t.ssContent,f=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:y}=d;if(m)d.pendingBranch=p,lS(p,m)?(a(m,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0?d.resolve():g&&!y&&(a(h,f,n,r,i,null,l,s,o),ls(d,f))):(d.pendingId=le++,y?(d.isHydrating=!1,d.activeBranch=m):c(m,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),g?(a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0?d.resolve():(a(h,f,n,r,i,null,l,s,o),ls(d,f))):h&&lS(p,h)?(a(h,p,n,r,i,d,l,s,o),d.resolve(!0)):(a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0&&d.resolve()));else if(h&&lS(p,h))a(h,p,n,r,i,d,l,s,o),ls(d,p);else if(ln(t,"onPending"),d.pendingBranch=p,512&p.shapeFlag?d.pendingId=p.component.suspenseId:d.pendingId=le++,a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(f)},e):0===e&&d.fallback(f)}}(e,t,n,r,i,s,o,a,c)}},hydrate:function(e,t,n,r,i,l,s,o,a){let c=t.suspense=lr(t,r,n,e.parentNode,document.createElement("div"),null,i,l,s,o,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,l,s);return 0===c.deps&&c.resolve(!1,!0),u},normalize:function(e){let{shapeFlag:t,children:n}=e,r=32&t;e.ssContent=li(r?n.default:n),e.ssFallback=r?li(n.fallback):lw(lc)}};function ln(e,t){let n=e.props&&e.props[t];R(n)&&n()}function lr(e,t,n,r,i,l,s,o,a,c,u=!1){let d;let{p:p,m:f,um:h,n:m,o:{parentNode:g,remove:y}}=c,b=function(e){let t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);b&&t&&t.pendingBranch&&(d=t.pendingId,t.deps++);let _=e.props?Y(e.props.timeout):void 0,S=l,x={vnode:e,parent:t,parentComponent:n,namespace:s,container:r,hiddenContainer:i,deps:0,pendingId:le++,timeout:"number"==typeof _?_:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:s,pendingId:o,effects:a,parentComponent:c,container:u}=x,p=!1;x.isHydrating?x.isHydrating=!1:e||((p=i&&s.transition&&"out-in"===s.transition.mode)&&(i.transition.afterLeave=()=>{o===x.pendingId&&(f(s,u,l===S?m(i):l,0),nb(a))}),i&&(g(i.el)===u&&(l=m(i)),h(i,c,x,!0)),p||f(s,u,l,0)),ls(x,s),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,_=!1;for(;y;){if(y.pendingBranch){y.effects.push(...a),_=!0;break}y=y.parent}_||p||nb(a),x.effects=[],b&&t&&t.pendingBranch&&d===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),ln(r,"onResolve")},fallback(e){if(!x.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:l}=x;ln(t,"onFallback");let s=m(n),c=()=>{x.isInFallback&&(p(null,e,i,s,r,null,l,o,a),ls(x,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=c),x.isInFallback=!0,h(n,r,null,!0),u||c()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next:()=>x.activeBranch&&m(x.activeBranch),registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{na(t,e,0)}).then(l=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:o}=e;lz(e,l,!1),i&&(o.el=i);let a=!i&&e.subTree.el;t(e,o,g(i||e.subTree.el),i?null:m(e.subTree),x,s,n),a&&y(a),i9(e,o.el),r&&0==--x.deps&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&h(x.activeBranch,n,e,t),x.pendingBranch&&h(x.pendingBranch,n,e,t)}};return x}function li(e){let t;if(R(e)){let n=lm&&e._c;n&&(e._d=!1,lf()),e=e(),n&&(e._d=!0,t=lp,lh())}return k(e)&&(e=function(e,t=!0){let n;for(let t=0;tt!==e)),e}function ll(e,t){t&&t.pendingBranch?k(e)?t.effects.push(...e):t.effects.push(e):nb(e)}function ls(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)i=(t=t.component.subTree).el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,i9(r,i))}let lo=Symbol.for("v-fgt"),la=Symbol.for("v-txt"),lc=Symbol.for("v-cmt"),lu=Symbol.for("v-stc"),ld=[],lp=null;function lf(e=!1){ld.push(lp=e?null:[])}function lh(){ld.pop(),lp=ld[ld.length-1]||null}let lm=1;function lg(e){lm+=e,e<0&&lp&&(lp.hasOnce=!0)}function ly(e){return e.dynamicChildren=lm>0?lp||m:null,lh(),lm>0&&lp&&lp.push(e),e}function lv(e,t,n,r,i,l){return ly(lk(e,t,n,r,i,l,!0))}function lb(e,t,n,r,i){return ly(lw(e,t,n,r,i,!0))}function l_(e){return!!e&&!0===e.__v_isVNode}function lS(e,t){return e.type===t.type&&e.key===t.key}function lx(e){}let lC=({key:e})=>null!=e?e:null,lT=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?I(e)||tH(e)||R(e)?{i:nC,r:e,k:t,f:!!n}:e:null);function lk(e,t=null,n=null,r=0,i=null,l=e===lo?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&lC(t),ref:t&&lT(t),scopeId:nT,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:nC};return o?(lM(a,n),128&l&&e.normalize(a)):n&&(a.shapeFlag|=I(n)?8:16),lm>0&&!s&&lp&&(a.patchFlag>0||6&l)&&32!==a.patchFlag&&lp.push(a),a}let lw=function(e,t=null,n=null,r=0,i=null,l=!1){var s;if(e&&e!==r$||(e=lc),l_(e)){let r=lE(e,t,!0);return n&&lM(r,n),lm>0&&!l&&lp&&(6&r.shapeFlag?lp[lp.indexOf(e)]=r:lp.push(r)),r.patchFlag=-2,r}if(R(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=lN(t);e&&!I(e)&&(t.class=eo(e)),P(n)&&(tF(n)&&!k(n)&&(n=S({},n)),t.style=en(n))}let o=I(e)?1:i7(e)?128:nP(e)?64:P(e)?4:R(e)?2:0;return lk(e,t,n,r,i,o,l,!0)};function lN(e){return e?tF(e)||iC(e)?S({},e):e:null}function lE(e,t,n=!1,r=!1){let{props:i,ref:l,patchFlag:s,children:o,transition:a}=e,c=t?lD(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&lC(c),ref:t&&t.ref?n&&l?k(l)?l.concat(lT(t)):[l,lT(t)]:lT(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==lo?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&lE(e.ssContent),ssFallback:e.ssFallback&&lE(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&r&&n1(u,a.clone(u)),u}function lA(e=" ",t=0){return lw(la,null,e,t)}function lR(e,t){let n=lw(lu,null,e);return n.staticCount=t,n}function lI(e="",t=!1){return t?(lf(),lb(lc,null,e)):lw(lc,null,e)}function lO(e){return null==e||"boolean"==typeof e?lw(lc):k(e)?lw(lo,null,e.slice()):l_(e)?lP(e):lw(la,null,String(e))}function lP(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:lE(e)}function lM(e,t){let n=0,{shapeFlag:r}=e;if(null==t)t=null;else if(k(t))n=16;else if("object"==typeof t){if(65&r){let n=t.default;n&&(n._c&&(n._d=!1),lM(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;r||iC(t)?3===r&&nC&&(1===nC.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=nC}}else R(t)?(t={default:t,_ctx:nC},n=32):(t=String(t),64&r?(n=16,t=[lA(t)]):n=8);e.children=t,e.shapeFlag|=n}function lD(...e){let t={};for(let n=0;n{c=!0;let[r,i]=e(t,n,!0);S(o,r),i&&a.push(...i)};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}if(!s&&!c)return P(t)&&i.set(t,m),m;if(k(s))for(let e=0;e{let r=e(t,n,!0);r&&(a=!0,S(o,r))};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}return s||a?(k(s)?s.forEach(e=>o[e]=null):S(o,s),P(t)&&i.set(t,o),o):(P(t)&&i.set(t,null),null)}(r,i),emit:null,emitted:null,propsDefaults:h,inheritAttrs:r.inheritAttrs,ctx:h,data:h,props:h,attrs:h,slots:h,refs:h,setupState:h,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=i2.bind(null,l),e.ce&&e.ce(l),l}let lB=null,lU=()=>lB||nC;{let e=ee(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};l=t("__VUE_INSTANCE_SETTERS__",e=>lB=e),s=t("__VUE_SSR_SETTERS__",e=>lW=e)}let lj=e=>{let t=lB;return l(e),e.scope.on(),()=>{e.scope.off(),l(t)}},lH=()=>{lB&&lB.scope.off(),l(null)};function lq(e){return 4&e.vnode.shapeFlag}let lW=!1;function lK(e,t=!1,n=!1){t&&s(t);let{props:r,children:i}=e.vnode,l=lq(e);!function(e,t,n,r=!1){let i={},l=ix();for(let n in e.propsDefaults=/* @__PURE__ */Object.create(null),iT(e,t,i,l),e.propsOptions[0])n in i||(i[n]=void 0);n?e.props=r?i:tI(i):e.type.props?e.props=i:e.props=l,e.attrs=l}(e,r,l,t),iM(e,i,n);let o=l?function(e,t){let n=e.type;e.accessCache=/* @__PURE__ */Object.create(null),e.proxy=new Proxy(e.ctx,rQ);let{setup:r}=n;if(r){let n=e.setupContext=r.length>1?lZ(e):null,i=lj(e);eF();let l=ns(r,e,0,[e.props,n]);if(eV(),i(),M(l)){if(rp(e)||n4(e),l.then(lH,lH),t)return l.then(n=>{lz(e,n,t)}).catch(t=>{na(t,e,0)});e.asyncDep=l}else lz(e,l,t)}else lQ(e,t)}(e,t):void 0;return t&&s(!1),o}function lz(e,t,n){R(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:P(t)&&(e.setupState=tZ(t)),lQ(e,n)}function lJ(e){o=e,a=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,rX))}}let lG=()=>!o;function lQ(e,t,n){let r=e.type;if(!e.render){if(!t&&o&&!r.render){let t=r.template||is(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:s}=r,a=S(S({isCustomElement:n,delimiters:l},i),s);r.render=o(t,a)}}e.render=r.render||g,a&&a(e)}{let t=lj(e);eF();try{!function(e){let t=is(e),n=e.proxy,r=e.ctx;ii=!1,t.beforeCreate&&il(t.beforeCreate,e,"bc");let{data:i,computed:l,methods:s,watch:o,provide:a,inject:c,created:u,beforeMount:d,mounted:p,beforeUpdate:f,updated:h,activated:m,deactivated:y,beforeDestroy:b,beforeUnmount:_,destroyed:S,unmounted:x,render:C,renderTracked:T,renderTriggered:w,errorCaptured:N,serverPrefetch:E,expose:A,inheritAttrs:O,components:M,directives:D,filters:L}=t;if(c&&function(e,t,n=g){for(let n in k(e)&&(e=iu(e)),e){let r;let i=e[n];tH(r=P(i)?"default"in i?ib(i.from||n,i.default,!0):ib(i.from||n):ib(i))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[n]=r}}(c,r,null),s)for(let e in s){let t=s[e];R(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);P(t)&&(e.data=tR(t))}if(ii=!0,l)for(let e in l){let t=l[e],i=R(t)?t.bind(n,n):R(t.get)?t.get.bind(n,n):g,s=l1({get:i,set:!R(t)&&R(t.set)?t.set.bind(n):g});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,r,i){let l=i.includes(".")?iY(r,i):()=>r[i];if(I(t)){let e=n[t];R(e)&&iQ(l,e)}else if(R(t))iQ(l,t.bind(r));else if(P(t)){if(k(t))t.forEach(t=>e(t,n,r,i));else{let e=R(t.handler)?t.handler.bind(r):n[t.handler];R(e)&&iQ(l,e,t)}}}(o[e],r,n,e);if(a){let e=R(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{iv(t,e[t])})}function $(e,t){k(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(u&&il(u,e,"c"),$(rk,d),$(rw,p),$(rN,f),$(rE,h),$(rv,m),$(rb,y),$(rM,N),$(rP,T),$(rO,w),$(rA,_),$(rR,x),$(rI,E),k(A)){if(A.length){let t=e.exposed||(e.exposed={});A.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}C&&e.render===g&&(e.render=C),null!=O&&(e.inheritAttrs=O),M&&(e.components=M),D&&(e.directives=D),E&&n4(e)}(e)}finally{eV(),t()}}}let lX={get:(e,t)=>(eJ(e,"get",""),e[t])};function lZ(e){return{attrs:new Proxy(e.attrs,lX),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function lY(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tZ(tB(e.exposed)),{get:(t,n)=>n in t?t[n]:n in rJ?rJ[n](e):void 0,has:(e,t)=>t in e||t in rJ})):e.proxy}function l0(e,t=!0){return R(e)?e.displayName||e.name:e.name||t&&e.__name}let l1=(e,t)=>(function(e,t,n=!1){let r,i;return R(e)?r=e:(r=e.get,i=e.set),new t8(r,i,n)})(e,0,lW);function l2(e,t,n){let r=arguments.length;return 2!==r?(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&l_(n)&&(n=[n]),lw(e,t,n)):!P(t)||k(t)?lw(e,null,t):l_(t)?lw(e,null,[t]):lw(e,t)}function l6(){}function l3(e,t,n,r){let i=n[r];if(i&&l4(i,e))return i;let l=t();return l.memo=e.slice(),l.cacheIndex=r,n[r]=l}function l4(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&lp&&lp.push(e),!0}let l8="3.5.11",l5=g,l9=null,l7=void 0,se=g,st={createComponentInstance:lV,setupComponent:lK,renderComponentRoot:i3,setCurrentRenderingInstance:nk,isVNode:l_,normalizeVNode:lO,getComponentPublicInstance:lY,ensureValidVNode:rW,pushWarningContext:function(e){},popWarningContext:function(){}},sn=null,sr=null,si=null,sl="undefined"!=typeof window&&window.trustedTypes;if(sl)try{p=/* @__PURE__ */sl.createPolicy("vue",{createHTML:e=>e})}catch(e){}let ss=p?e=>p.createHTML(e):e=>e,so="undefined"!=typeof document?document:null,sa=so&&/* @__PURE__ */so.createElement("template"),sc="transition",su="animation",sd=Symbol("_vtc"),sp={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},sf=/* @__PURE__ */S({},nz,sp),sh=((oO=(e,{slots:t})=>l2(nQ,sy(e),t)).displayName="Transition",oO.props=sf,oO),sm=(e,t=[])=>{k(e)?e.forEach(e=>e(...t)):e&&e(...t)},sg=e=>!!e&&(k(e)?e.some(e=>e.length>1):e.length>1);function sy(e){let t={};for(let n in e)n in sp||(t[n]=e[n]);if(!1===e.css)return t;let{name:n="v",type:r,duration:i,enterFromClass:l=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:a=l,appearActiveClass:c=s,appearToClass:u=o,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(P(e))return[Y(e.enter),Y(e.leave)];{let t=Y(e);return[t,t]}}(i),m=h&&h[0],g=h&&h[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:_,onLeave:x,onLeaveCancelled:C,onBeforeAppear:T=y,onAppear:k=b,onAppearCancelled:w=_}=t,N=(e,t,n)=>{sb(e,t?u:o),sb(e,t?c:s),n&&n()},E=(e,t)=>{e._isLeaving=!1,sb(e,d),sb(e,f),sb(e,p),t&&t()},A=e=>(t,n)=>{let i=e?k:b,s=()=>N(t,e,n);sm(i,[t,s]),s_(()=>{sb(t,e?a:l),sv(t,e?u:o),sg(i)||sx(t,r,m,s)})};return S(t,{onBeforeEnter(e){sm(y,[e]),sv(e,l),sv(e,s)},onBeforeAppear(e){sm(T,[e]),sv(e,a),sv(e,c)},onEnter:A(!1),onAppear:A(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>E(e,t);sv(e,d),sv(e,p),sw(),s_(()=>{e._isLeaving&&(sb(e,d),sv(e,f),sg(x)||sx(e,r,g,n))}),sm(x,[e,n])},onEnterCancelled(e){N(e,!1),sm(_,[e])},onAppearCancelled(e){N(e,!0),sm(w,[e])},onLeaveCancelled(e){E(e),sm(C,[e])}})}function sv(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[sd]||(e[sd]=/* @__PURE__ */new Set)).add(t)}function sb(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[sd];n&&(n.delete(t),n.size||(e[sd]=void 0))}function s_(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let sS=0;function sx(e,t,n,r){let i=e._endId=++sS,l=()=>{i===e._endId&&r()};if(null!=n)return setTimeout(l,n);let{type:s,timeout:o,propCount:a}=sC(e,t);if(!s)return r();let c=s+"end",u=0,d=()=>{e.removeEventListener(c,p),l()},p=t=>{t.target===e&&++u>=a&&d()};setTimeout(()=>{u(n[e]||"").split(", "),i=r(`${sc}Delay`),l=r(`${sc}Duration`),s=sT(i,l),o=r(`${su}Delay`),a=r(`${su}Duration`),c=sT(o,a),u=null,d=0,p=0;t===sc?s>0&&(u=sc,d=s,p=l.length):t===su?c>0&&(u=su,d=c,p=a.length):p=(u=(d=Math.max(s,c))>0?s>c?sc:su:null)?u===sc?l.length:a.length:0;let f=u===sc&&/\b(transform|all)(,|$)/.test(r(`${sc}Property`).toString());return{type:u,timeout:d,propCount:p,hasTransform:f}}function sT(e,t){for(;e.lengthsk(t)+sk(e[n])))}function sk(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function sw(){return document.body.offsetHeight}let sN=Symbol("_vod"),sE=Symbol("_vsh"),sA={beforeMount(e,{value:t},{transition:n}){e[sN]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):sR(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),sR(e,!0),r.enter(e)):r.leave(e,()=>{sR(e,!1)}):sR(e,t))},beforeUnmount(e,{value:t}){sR(e,t)}};function sR(e,t){e.style.display=t?e[sN]:"none",e[sE]=!t}let sI=Symbol("");function sO(e){let t=lU();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>sP(e,n))},r=()=>{let r=e(t.proxy);t.ce?sP(t.ce,r):function e(t,n){if(128&t.shapeFlag){let r=t.suspense;t=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{e(r.activeBranch,n)})}for(;t.component;)t=t.component.subTree;if(1&t.shapeFlag&&t.el)sP(t.el,n);else if(t.type===lo)t.children.forEach(t=>e(t,n));else if(t.type===lu){let{el:e,anchor:r}=t;for(;e&&(sP(e,n),e!==r);)e=e.nextSibling}}(t.subTree,r),n(r)};rk(()=>{iJ(r)}),rw(()=>{let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),rR(()=>e.disconnect())})}function sP(e,t){if(1===e.nodeType){let n=e.style,r="";for(let e in t)n.setProperty(`--${e}`,t[e]),r+=`--${e}: ${t[e]};`;n[sI]=r}}let sM=/(^|;)\s*display\s*:/,sD=/\s*!important$/;function sL(e,t,n){if(k(n))n.forEach(n=>sL(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let r=function(e,t){let n=sF[t];if(n)return n;let r=q(t);if("filter"!==r&&r in e)return sF[t]=r;r=z(r);for(let n=0;nsW||(sK.then(()=>sW=0),sW=Date.now()),sJ=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2),sG={};/*! #__NO_SIDE_EFFECTS__ */function sQ(e,t,n){let r=n6(e,t);F(r)&&S(r,t);class i extends sY{constructor(e){super(r,e,n)}}return i.def=r,i}/*! #__NO_SIDE_EFFECTS__ */let sX=(e,t)=>/* @__PURE__ */sQ(e,t,oN),sZ="undefined"!=typeof HTMLElement?HTMLElement:class{};class sY extends sZ{constructor(e,t={},n=ow){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=/* @__PURE__ */new WeakSet,this._ob=null,this.shadowRoot&&n!==ow?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof sY){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,ng(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{let n;this._resolved=!0,this._pendingResolve=void 0;let{props:r,styles:i}=e;if(r&&!k(r))for(let e in r){let t=r[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=Y(this._props[e])),(n||(n=/* @__PURE__ */Object.create(null)))[q(e)]=!0)}this._numberProps=n,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(i),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)T(this,e)||Object.defineProperty(this,e,{get:()=>tG(t[e])})}_resolveProps(e){let{props:t}=e,n=k(t)?t:Object.keys(t||{});for(let e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(q))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):sG,r=q(e);t&&this._numberProps&&this._numberProps[r]&&(n=Y(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){t!==this._props[e]&&(t===sG?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(K(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(K(e),t+""):t||this.removeAttribute(K(e))))}_update(){oT(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=lw(this._def,S(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,F(t[0])?S({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),K(e)!==e&&t(K(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let r=document.createElement("style");n&&r.setAttribute("nonce",n),r.textContent=e[t],this.shadowRoot.prepend(r)}}_parseSlots(){let e;let t=this._slots={};for(;e=this.firstChild;){let n=1===e.nodeType&&e.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(e),this.removeChild(e)}}_renderSlots(){let e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n{if(!n.length)return;let t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){let r=e.cloneNode(),i=e[sd];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display="none";let l=1===t.nodeType?t:t.parentNode;l.appendChild(r);let{hasTransform:s}=sC(r);return l.removeChild(r),s}(n[0].el,i.vnode.el,t))return;n.forEach(s9),n.forEach(s7);let r=n.filter(oe);sw(),r.forEach(e=>{let n=e.el,r=n.style;sv(n,t),r.transform=r.webkitTransform=r.transitionDuration="";let i=n[s4]=e=>{(!e||e.target===n)&&(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener("transitionend",i),n[s4]=null,sb(n,t))};n.addEventListener("transitionend",i)})}),()=>{let s=tV(e),o=sy(s),a=s.tag||lo;if(n=[],r)for(let e=0;e{let t=e.props["onUpdate:modelValue"]||!1;return k(t)?e=>Q(t,e):t};function on(e){e.target.composing=!0}function or(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let oi=Symbol("_assign"),ol={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[oi]=ot(i);let l=r||i.props&&"number"===i.props.type;sj(e,t?"change":"input",t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),l&&(r=Z(r)),e[oi](r)}),n&&sj(e,"change",()=>{e.value=e.value.trim()}),t||(sj(e,"compositionstart",on),sj(e,"compositionend",or),sj(e,"change",or))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:l}},s){if(e[oi]=ot(s),e.composing)return;let o=(l||"number"===e.type)&&!/^0\d/.test(e.value)?Z(e.value):e.value,a=null==t?"":t;o===a||document.activeElement===e&&"range"!==e.type&&(r&&t===n||i&&e.value.trim()===a)||(e.value=a)}},os={deep:!0,created(e,t,n){e[oi]=ot(n),sj(e,"change",()=>{let t=e._modelValue,n=od(e),r=e.checked,i=e[oi];if(k(t)){let e=em(t,n),l=-1!==e;if(r&&!l)i(t.concat(n));else if(!r&&l){let n=[...t];n.splice(e,1),i(n)}}else if(N(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(op(e,r))})},mounted:oo,beforeUpdate(e,t,n){e[oi]=ot(n),oo(e,t,n)}};function oo(e,{value:t},n){let r;e._modelValue=t,r=k(t)?em(t,n.props.value)>-1:N(t)?t.has(n.props.value):eh(t,op(e,!0)),e.checked!==r&&(e.checked=r)}let oa={created(e,{value:t},n){e.checked=eh(t,n.props.value),e[oi]=ot(n),sj(e,"change",()=>{e[oi](od(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[oi]=ot(r),t!==n&&(e.checked=eh(t,r.props.value))}},oc={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=N(t);sj(e,"change",()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Z(od(e)):od(e));e[oi](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,ng(()=>{e._assigning=!1})}),e[oi]=ot(r)},mounted(e,{value:t}){ou(e,t)},beforeUpdate(e,t,n){e[oi]=ot(n)},updated(e,{value:t}){e._assigning||ou(e,t)}};function ou(e,t){let n=e.multiple,r=k(t);if(!n||r||N(t)){for(let i=0,l=e.options.length;iString(e)===String(s)):l.selected=em(t,s)>-1}else l.selected=t.has(s)}else if(eh(od(l),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function od(e){return"_value"in e?e._value:e.value}function op(e,t){let n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}let of={created(e,t,n){om(e,t,n,null,"created")},mounted(e,t,n){om(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){om(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){om(e,t,n,r,"updated")}};function oh(e,t){switch(e){case"SELECT":return oc;case"TEXTAREA":return ol;default:switch(t){case"checkbox":return os;case"radio":return oa;default:return ol}}}function om(e,t,n,r,i){let l=oh(e.tagName,n.props&&n.props.type)[i];l&&l(e,t,n,r)}let og=["ctrl","shift","alt","meta"],oy={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>og.some(n=>e[`${n}Key`]&&!t.includes(n))},ov=(e,t)=>{let n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(n,...r)=>{for(let e=0;e{let n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=n=>{if(!("key"in n))return;let r=K(n.key);if(t.some(e=>e===r||ob[e]===r))return e(n)})},oS=/* @__PURE__ */S({patchProp:(e,t,n,r,i,l)=>{let s="svg"===i;"class"===t?function(e,t,n){let r=e[sd];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,s):"style"===t?function(e,t,n){let r=e.style,i=I(n),l=!1;if(n&&!i){if(t){if(I(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&sL(r,t,"")}else for(let e in t)null==n[e]&&sL(r,e,"")}for(let e in n)"display"===e&&(l=!0),sL(r,e,n[e])}else if(i){if(t!==n){let e=r[sI];e&&(n+=";"+e),r.cssText=n,l=sM.test(n)}}else t&&e.removeAttribute("style");sN in e&&(e[sN]=l?r.display:"",e[sE]&&(r.display="none"))}(e,n,r):b(t)?_(t)||function(e,t,n,r,i=null){let l=e[sH]||(e[sH]={}),s=l[t];if(r&&s)s.value=r;else{let[n,o]=function(e){let t;if(sq.test(e)){let n;for(t={};n=e.match(sq);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):K(e.slice(2)),t]}(t);r?sj(e,n,l[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();no(function(e,t){if(!k(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=sz(),n}(r,i),o):s&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,s,o),l[t]=void 0)}}(e,t,0,r,l):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,r){if(r)return!!("innerHTML"===t||"textContent"===t||t in e&&sJ(t)&&R(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(sJ(t)&&I(n))&&t in e}(e,t,r,s))?e._isVueCE&&(/[A-Z]/.test(t)||!I(r))?sU(e,q(t),r):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),sB(e,t,r,s)):(sU(e,t,r),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||sB(e,t,r,s,l,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i="svg"===t?so.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?so.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?so.createElement(e,{is:n}):so.createElement(e);return"select"===e&&r&&null!=r.multiple&&i.setAttribute("multiple",r.multiple),i},createText:e=>so.createTextNode(e),createComment:e=>so.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>so.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,l){let s=n?n.previousSibling:t.lastChild;if(i&&(i===l||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==l&&(i=i.nextSibling););else{sa.innerHTML=ss("svg"===r?`${e}`:"mathml"===r?`${e}`:e);let i=sa.content;if("svg"===r||"mathml"===r){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),ox=!1;function oC(){return c=ox?c:iF(oS),ox=!0,c}let oT=(...e)=>{(c||(c=i$(oS))).render(...e)},ok=(...e)=>{oC().hydrate(...e)},ow=(...e)=>{let t=(c||(c=i$(oS))).createApp(...e),{mount:n}=t;return t.mount=e=>{let r=oA(e);if(!r)return;let i=t._component;R(i)||i.render||i.template||(i.template=r.innerHTML),1===r.nodeType&&(r.textContent="");let l=n(r,!1,oE(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t},oN=(...e)=>{let t=oC().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=oA(e);if(t)return n(t,!0,oE(t))},t};function oE(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function oA(e){return I(e)?document.querySelector(e):e}let oR=!1,oI=()=>{oR||(oR=!0,ol.getSSRProps=({value:e})=>({value:e}),oa.getSSRProps=({value:e},t)=>{if(t.props&&eh(t.props.value,e))return{checked:!0}},os.getSSRProps=({value:e},t)=>{if(k(e)){if(t.props&&em(e,t.props.value)>-1)return{checked:!0}}else if(N(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},of.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;let n=oh(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)},sA.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})};var oO,oP,oM=/*#__PURE__*/Object.freeze({__proto__:null,BaseTransition:nQ,BaseTransitionPropsValidators:nz,Comment:lc,DeprecationTypes:si,EffectScope:e_,ErrorCodes:nl,ErrorTypeStrings:l9,Fragment:lo,KeepAlive:rg,ReactiveEffect:ek,Static:lu,Suspense:lt,Teleport:nB,Text:la,TrackOpTypes:t5,Transition:sh,TransitionGroup:s5,TriggerOpTypes:t9,VueElement:sY,assertNumber:ni,callWithAsyncErrorHandling:no,callWithErrorHandling:ns,camelize:q,capitalize:z,cloneVNode:lE,compatUtils:sr,computed:l1,createApp:ow,createBlock:lb,createCommentVNode:lI,createElementBlock:lv,createElementVNode:lk,createHydrationRenderer:iF,createPropsRestProxy:it,createRenderer:i$,createSSRApp:oN,createSlots:rH,createStaticVNode:lR,createTextVNode:lA,createVNode:lw,customRef:t0,defineAsyncComponent:rf,defineComponent:n6,defineCustomElement:sQ,defineEmits:rY,defineExpose:r0,defineModel:r6,defineOptions:r1,defineProps:rZ,defineSSRCustomElement:sX,defineSlots:r2,devtools:l7,effect:eM,effectScope:eS,getCurrentInstance:lU,getCurrentScope:ex,getCurrentWatcher:nt,getTransitionRawChildren:n2,guardReactiveProps:lN,h:l2,handleError:na,hasInjectionContext:i_,hydrate:ok,hydrateOnIdle:ra,hydrateOnInteraction:rd,hydrateOnMediaQuery:ru,hydrateOnVisible:rc,initCustomFormatter:l6,initDirectivesForSSR:oI,inject:ib,isMemoSame:l4,isProxy:tF,isReactive:tD,isReadonly:tL,isRef:tH,isRuntimeOnly:lG,isShallow:t$,isVNode:l_,markRaw:tB,mergeDefaults:r7,mergeModels:ie,mergeProps:lD,nextTick:ng,normalizeClass:eo,normalizeProps:ea,normalizeStyle:en,onActivated:rv,onBeforeMount:rk,onBeforeUnmount:rA,onBeforeUpdate:rN,onDeactivated:rb,onErrorCaptured:rM,onMounted:rw,onRenderTracked:rP,onRenderTriggered:rO,onScopeDispose:eC,onServerPrefetch:rI,onUnmounted:rR,onUpdated:rE,onWatcherCleanup:nn,openBlock:lf,popScopeId:nN,provide:iv,proxyRefs:tZ,pushScopeId:nw,queuePostFlushCb:nb,reactive:tR,readonly:tO,ref:tq,registerRuntimeCompiler:lJ,render:oT,renderList:rj,renderSlot:rq,resolveComponent:rL,resolveDirective:rV,resolveDynamicComponent:rF,resolveFilter:sn,resolveTransitionHooks:nZ,setBlockTracking:lg,setDevtoolsHook:se,setTransitionHooks:n1,shallowReactive:tI,shallowReadonly:tP,shallowRef:tW,ssrContextKey:iW,ssrUtils:st,stop:eD,toDisplayString:ey,toHandlerKey:J,toHandlers:rK,toRaw:tV,toRef:t3,toRefs:t1,toValue:tQ,transformVNodeArgs:lx,triggerRef:tJ,unref:tG,useAttrs:r8,useCssModule:s2,useCssVars:sO,useHost:s0,useId:n3,useModel:i0,useSSRContext:iK,useShadowRoot:s1,useSlots:r4,useTemplateRef:n8,useTransitionState:nW,vModelCheckbox:os,vModelDynamic:of,vModelRadio:oa,vModelSelect:oc,vModelText:ol,vShow:sA,version:l8,warn:l5,watch:iQ,watchEffect:iz,watchPostEffect:iJ,watchSyncEffect:iG,withAsyncContext:ir,withCtx:nA,withDefaults:r3,withDirectives:nR,withKeys:o_,withMemo:l3,withModifiers:ov,withScopeId:nE});let oD=Symbol(""),oL=Symbol(""),o$=Symbol(""),oF=Symbol(""),oV=Symbol(""),oB=Symbol(""),oU=Symbol(""),oj=Symbol(""),oH=Symbol(""),oq=Symbol(""),oW=Symbol(""),oK=Symbol(""),oz=Symbol(""),oJ=Symbol(""),oG=Symbol(""),oQ=Symbol(""),oX=Symbol(""),oZ=Symbol(""),oY=Symbol(""),o0=Symbol(""),o1=Symbol(""),o2=Symbol(""),o6=Symbol(""),o3=Symbol(""),o4=Symbol(""),o8=Symbol(""),o5=Symbol(""),o9=Symbol(""),o7=Symbol(""),ae=Symbol(""),at=Symbol(""),an=Symbol(""),ar=Symbol(""),ai=Symbol(""),al=Symbol(""),as=Symbol(""),ao=Symbol(""),aa=Symbol(""),ac=Symbol(""),au={[oD]:"Fragment",[oL]:"Teleport",[o$]:"Suspense",[oF]:"KeepAlive",[oV]:"BaseTransition",[oB]:"openBlock",[oU]:"createBlock",[oj]:"createElementBlock",[oH]:"createVNode",[oq]:"createElementVNode",[oW]:"createCommentVNode",[oK]:"createTextVNode",[oz]:"createStaticVNode",[oJ]:"resolveComponent",[oG]:"resolveDynamicComponent",[oQ]:"resolveDirective",[oX]:"resolveFilter",[oZ]:"withDirectives",[oY]:"renderList",[o0]:"renderSlot",[o1]:"createSlots",[o2]:"toDisplayString",[o6]:"mergeProps",[o3]:"normalizeClass",[o4]:"normalizeStyle",[o8]:"normalizeProps",[o5]:"guardReactiveProps",[o9]:"toHandlers",[o7]:"camelize",[ae]:"capitalize",[at]:"toHandlerKey",[an]:"setBlockTracking",[ar]:"pushScopeId",[ai]:"popScopeId",[al]:"withCtx",[as]:"unref",[ao]:"isRef",[aa]:"withMemo",[ac]:"isMemoSame"},ad={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function ap(e,t,n,r,i,l,s,o=!1,a=!1,c=!1,u=ad){return e&&(o?(e.helper(oB),e.helper(e.inSSR||c?oU:oj)):e.helper(e.inSSR||c?oH:oq),s&&e.helper(oZ)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:l,directives:s,isBlock:o,disableTracking:a,isComponent:c,loc:u}}function af(e,t=ad){return{type:17,loc:t,elements:e}}function ah(e,t=ad){return{type:15,loc:t,properties:e}}function am(e,t){return{type:16,loc:ad,key:I(e)?ag(e,!0):e,value:t}}function ag(e,t=!1,n=ad,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function ay(e,t=ad){return{type:8,loc:t,children:e}}function av(e,t=[],n=ad){return{type:14,loc:n,callee:e,arguments:t}}function ab(e,t,n=!1,r=!1,i=ad){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function a_(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:ad}}function aS(e,{helper:t,removeHelper:n,inSSR:r}){if(!e.isBlock){var i,l;e.isBlock=!0,n((i=e.isComponent,r||i?oH:oq)),t(oB),t((l=e.isComponent,r||l?oU:oj))}}let ax=new Uint8Array([123,123]),aC=new Uint8Array([125,125]);function aT(e){return e>=97&&e<=122||e>=65&&e<=90}function ak(e){return 32===e||10===e||9===e||12===e||13===e}function aw(e){return 47===e||62===e||ak(e)}function aN(e){let t=new Uint8Array(e.length);for(let n=0;n4===e.type&&e.isStatic;function aP(e){switch(e){case"Teleport":case"teleport":return oL;case"Suspense":case"suspense":return o$;case"KeepAlive":case"keep-alive":return oF;case"BaseTransition":case"base-transition":return oV}}let aM=/^\d|[^\$\w\xA0-\uFFFF]/,aD=e=>!aM.test(e),aL=/[A-Za-z_$\xA0-\uFFFF]/,a$=/[\.\?\w$\xA0-\uFFFF]/,aF=/\s+[.[]\s*|\s*[.[]\s+/g,aV=e=>4===e.type?e.content:e.loc.source,aB=e=>{let t=aV(e).trim().replace(aF,e=>e.trim()),n=0,r=[],i=0,l=0,s=null;for(let e=0;e|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,aj=e=>aU.test(aV(e));function aH(e,t,n=!1){for(let r=0;r4===e.key.type&&e.key.content===r)}return n}function aY(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>"-"===t?"_":e.charCodeAt(n).toString())}`}let a0=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,a1={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:y,isPreTag:y,isIgnoreNewlineTag:y,isCustomElement:y,onError:aA,onWarn:aR,comments:!1,prefixIdentifiers:!1},a2=a1,a6=null,a3="",a4=null,a8=null,a5="",a9=-1,a7=-1,ce=0,ct=!1,cn=null,cr=[],ci=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=ax,this.delimiterClose=aC,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=ax,this.delimiterClose=aC}getPos(e){let t=1,n=e+1;for(let r=this.newlines.length-1;r>=0;r--){let i=this.newlines[r];if(e>i){t=r+2,n=e-i;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex]){if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++}else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(t?aw(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t){this.sequenceIndex++;return}}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||ak(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart=e||(28===this.state?this.currentSequence===aE.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(cr,{onerr:c_,ontext(e,t){cc(co(e,t),e,t)},ontextentity(e,t,n){cc(e,t,n)},oninterpolation(e,t){if(ct)return cc(co(e,t),e,t);let n=e+ci.delimiterOpen.length,r=t-ci.delimiterClose.length;for(;ak(a3.charCodeAt(n));)n++;for(;ak(a3.charCodeAt(r-1));)r--;let i=co(n,r);i.includes("&")&&(i=a2.decodeEntities(i,!1)),cg({type:5,content:cb(i,!1,cy(n,r)),loc:cy(e,t)})},onopentagname(e,t){let n=co(e,t);a4={type:1,tag:n,ns:a2.getNamespace(n,cr[0],a2.ns),tagType:0,props:[],children:[],loc:cy(e-1,t),codegenNode:void 0}},onopentagend(e){ca(e)},onclosetag(e,t){let n=co(e,t);if(!a2.isVoidTag(n)){let r=!1;for(let e=0;e0&&/* @__PURE__ *//*@__PURE__*/cr[0].loc.start.offset;for(let n=0;n<=e;n++)cu(cr.shift(),t,n(7===e.type?e.rawName:e.name)===t)},onattribend(e,t){a4&&a8&&(cv(a8.loc,t),0!==e&&(a5.includes("&")&&(a5=a2.decodeEntities(a5,!0)),6===a8.type?("class"===a8.name&&(a5=cm(a5).trim()),a8.value={type:2,content:a5,loc:1===e?cy(a9,a7):cy(a9-1,a7+1)},ci.inSFCRoot&&"template"===a4.tag&&"lang"===a8.name&&a5&&"html"!==a5&&ci.enterRCDATA(aN("{let i=t.start.offset+n,l=i+e.length;return cb(e,!1,cy(i,l),0,r?1:0)},o={source:s(l.trim(),n.indexOf(l,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1},a=i.trim().replace(cs,"").trim(),c=i.indexOf(a),u=a.match(cl);if(u){let e;a=a.replace(cl,"").trim();let t=u[1].trim();if(t&&(e=n.indexOf(t,c+a.length),o.key=s(t,e,!0)),u[2]){let r=u[2].trim();r&&(o.index=s(r,n.indexOf(r,o.key?e+t.length:c+a.length),!0))}}return a&&(o.value=s(a,c,!0)),o}(a8.exp)))),(7!==a8.type||"pre"!==a8.name)&&a4.props.push(a8)),a5="",a9=a7=-1},oncomment(e,t){a2.comments&&cg({type:3,content:co(e,t),loc:cy(e-4,t+3)})},onend(){let e=a3.length;for(let t=0;t64&&n<91||aP(e)||a2.isBuiltInComponent&&a2.isBuiltInComponent(e)||a2.isNativeTag&&!a2.isNativeTag(e))return!0;for(let e=0;e=0;)n--;return n}let cp=/* @__PURE__ */new Set(["if","else","else-if","for","slot"]),cf=/\r\n/g;function ch(e,t){let n="preserve"!==a2.whitespace,r=!1;for(let t=0;t1)for(let i=0;i{n--};for(;nt===e:t=>e.test(t);return(e,r)=>{if(1===e.type){let{props:i}=e;if(3===e.tagType&&i.some(az))return;let l=[];for(let s=0;s`${au[e]}: _${au[e]}`;function cR(e,t,{helper:n,push:r,newline:i,isTS:l}){let s=n("component"===t?oJ:oQ);for(let n=0;n3;t.push("["),n&&t.indent(),cO(e,t,n),n&&t.deindent(),t.push("]")}function cO(e,t,n=!1,r=!0){let{push:i,newline:l}=t;for(let s=0;se||"null")}([s,o,a,n,u]),t),r(")"),p&&r(")"),d&&(r(", "),cP(d,t),r(")"))}(e,t);break;case 14:!function(e,t){let{push:n,helper:r,pure:i}=t,l=I(e.callee)?e.callee:r(e.callee);i&&n(cE),n(l+"(",-2,e),cO(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){let{push:n,indent:r,deindent:i,newline:l}=t,{properties:s}=e;if(!s.length){n("{}",-2,e);return}let o=s.length>1;n(o?"{":"{ "),o&&r();for(let e=0;e "),(a||o)&&(n("{"),r()),s?(a&&n("return "),k(s)?cI(s,t):cP(s,t)):o&&cP(o,t),(a||o)&&(i(),n("}")),c&&n(")")}(e,t);break;case 19:!function(e,t){let{test:n,consequent:r,alternate:i,newline:l}=e,{push:s,indent:o,deindent:a,newline:c}=t;if(4===n.type){let e=!aD(n.content);e&&s("("),cM(n,t),e&&s(")")}else s("("),cP(n,t),s(")");l&&o(),t.indentLevel++,l||s(" "),s("? "),cP(r,t),t.indentLevel--,l&&c(),l||s(" "),s(": ");let u=19===i.type;!u&&t.indentLevel++,cP(i,t),!u&&t.indentLevel--,l&&a(!0)}(e,t);break;case 20:!function(e,t){let{push:n,helper:r,indent:i,deindent:l,newline:s}=t,{needPauseTracking:o,needArraySpread:a}=e;a&&n("[...("),n(`_cache[${e.index}] || (`),o&&(i(),n(`${r(an)}(-1),`),s(),n("(")),n(`_cache[${e.index}] = `),cP(e.value,t),o&&(n(`).cacheIndex = ${e.index},`),s(),n(`${r(an)}(1),`),s(),n(`_cache[${e.index}]`),l()),n(")"),a&&n(")]")}(e,t);break;case 21:cO(e.body,t,!0,!1)}}function cM(e,t){let{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,-3,e)}function cD(e,t){for(let n=0;n(function(e,t,n,r){if("else"!==t.name&&(!t.exp||!t.exp.content.trim())){let r=t.exp?t.exp.loc:e.loc;n.onError(/* @__PURE__ *//*@__PURE__*/aI(28,t.loc)),t.exp=ag("true",!1,r)}if("if"===t.name){let i=c$(e,t),l={type:9,loc:e.loc,branches:[i]};if(n.replaceNode(l),r)return r(l,i,!0)}else{let i=n.parent.children,l=i.indexOf(e);for(;l-- >=-1;){let s=i[l];if(s&&3===s.type||s&&2===s.type&&!s.content.trim().length){n.removeNode(s);continue}if(s&&9===s.type){"else-if"===t.name&&void 0===s.branches[s.branches.length-1].condition&&n.onError(/* @__PURE__ *//*@__PURE__*/aI(30,e.loc)),n.removeNode();let i=c$(e,t);s.branches.push(i);let l=r&&r(s,i,!1);cw(i,n),l&&l(),n.currentNode=null}else n.onError(/* @__PURE__ *//*@__PURE__*/aI(30,e.loc));break}}})(e,t,n,(e,t,r)=>{let i=n.parent.children,l=i.indexOf(e),s=0;for(;l-- >=0;){let e=i[l];e&&9===e.type&&(s+=e.branches.length)}return()=>{r?e.codegenNode=cF(t,s,n):function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode).alternate=cF(t,s+e.branches.length-1,n)}}));function c$(e,t){let n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!aH(e,"for")?e.children:[e],userKey:aq(e,"key"),isTemplateIf:n}}function cF(e,t,n){return e.condition?a_(e.condition,cV(e,t,n),av(n.helper(oW),['""',"true"])):cV(e,t,n)}function cV(e,t,n){let{helper:r}=n,i=am("key",ag(`${t}`,!1,ad,2)),{children:l}=e,s=l[0];if(1!==l.length||1!==s.type){if(1!==l.length||11!==s.type)return ap(n,r(oD),ah([i]),l,64,void 0,void 0,!0,!1,!1,e.loc);{let e=s.codegenNode;return aX(e,i,n),e}}{let e=s.codegenNode,t=14===e.type&&e.callee===aa?e.arguments[1].returns:e;return 13===t.type&&aS(t,n),aX(t,i,n),e}}let cB=(e,t,n)=>{let{modifiers:r,loc:i}=e,l=e.arg,{exp:s}=e;if(s&&4===s.type&&!s.content.trim()&&(s=void 0),!s){if(4!==l.type||!l.isStatic)return n.onError(aI(52,l.loc)),{props:[am(l,ag("",!0,i))]};cU(e),s=e.exp}return 4!==l.type?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=`${l.content} || ""`),r.some(e=>"camel"===e.content)&&(4===l.type?l.isStatic?l.content=q(l.content):l.content=`${n.helperString(o7)}(${l.content})`:(l.children.unshift(`${n.helperString(o7)}(`),l.children.push(")"))),!n.inSSR&&(r.some(e=>"prop"===e.content)&&cj(l,"."),r.some(e=>"attr"===e.content)&&cj(l,"^")),{props:[am(l,s)]}},cU=(e,t)=>{let n=e.arg,r=q(n.content);e.exp=ag(r,!1,n.loc)},cj=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},cH=cN("for",(e,t,n)=>{let{helper:r,removeHelper:i}=n;return function(e,t,n,r){if(!t.exp){n.onError(/* @__PURE__ *//*@__PURE__*/aI(31,t.loc));return}let i=t.forParseResult;if(!i){n.onError(/* @__PURE__ *//*@__PURE__*/aI(32,t.loc));return}cq(i);let{addIdentifiers:l,removeIdentifiers:s,scopes:o}=n,{source:a,value:c,key:u,index:d}=i,p={type:11,loc:t.loc,source:a,valueAlias:c,keyAlias:u,objectIndexAlias:d,parseResult:i,children:aJ(e)?e.children:[e]};n.replaceNode(p),o.vFor++;let f=r&&r(p);return()=>{o.vFor--,f&&f()}}(e,t,n,t=>{let l=av(r(oY),[t.source]),s=aJ(e),o=aH(e,"memo"),a=aq(e,"key",!1,!0);a&&7===a.type&&!a.exp&&cU(a);let c=a&&(6===a.type?a.value?ag(a.value.content,!0):void 0:a.exp),u=a&&c?am("key",c):null,d=4===t.source.type&&t.source.constType>0,p=d?64:a?128:256;return t.codegenNode=ap(n,r(oD),void 0,l,p,void 0,void 0,!0,!d,!1,e.loc),()=>{let a;let{children:p}=t,f=1!==p.length||1!==p[0].type,h=aG(e)?e:s&&1===e.children.length&&aG(e.children[0])?e.children[0]:null;if(h)a=h.codegenNode,s&&u&&aX(a,u,n);else if(f)a=ap(n,r(oD),u?ah([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1);else{var m,g,y,b,_,S,x,C;a=p[0].codegenNode,s&&u&&aX(a,u,n),!d!==a.isBlock&&(a.isBlock?(i(oB),i((m=n.inSSR,g=a.isComponent,m||g?oU:oj))):i((y=n.inSSR,b=a.isComponent,y||b?oH:oq))),(a.isBlock=!d,a.isBlock)?(r(oB),r((_=n.inSSR,S=a.isComponent,_||S?oU:oj))):r((x=n.inSSR,C=a.isComponent,x||C?oH:oq))}if(o){let e=ab(cW(t.parseResult,[ag("_cached")]));e.body={type:21,body:[ay(["const _memo = (",o.exp,")"]),ay(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(ac)}(_cached, _memo)) return _cached`]),ay(["const _item = ",a]),ag("_item.memo = _memo"),ag("return _item")],loc:ad},l.arguments.push(e,ag("_cache"),ag(String(n.cached.length))),n.cached.push(null)}else l.arguments.push(ab(cW(t.parseResult),a,!0))}})});function cq(e,t){e.finalized||(e.finalized=!0)}function cW({value:e,key:t,index:n},r=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||ag("_".repeat(t+1),!1))}([e,t,n,...r])}let cK=ag("undefined",!1),cz=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){let n=aH(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},cJ=(e,t,n,r)=>ab(e,n,!1,!0,n.length?n[0].loc:r);function cG(e,t,n){let r=[am("name",e),am("fn",t)];return null!=n&&r.push(am("key",ag(String(n),!0))),ah(r)}let cQ=/* @__PURE__ */new WeakMap,cX=(e,t)=>function(){let n,r,i,l,s;if(!(1===(e=t.currentNode).type&&(0===e.tagType||1===e.tagType)))return;let{tag:o,props:a}=e,c=1===e.tagType,u=c?function(e,t,n=!1){let{tag:r}=e,i=c0(r),l=aq(e,"is",!1,!0);if(l){if(i){let e;if(6===l.type?e=l.value&&ag(l.value.content,!0):(e=l.exp)||(e=ag("is",!1,l.arg.loc)),e)return av(t.helper(oG),[e])}else 6===l.type&&l.value.content.startsWith("vue:")&&(r=l.value.content.slice(4))}let s=aP(r)||t.isBuiltInComponent(r);return s?(n||t.helper(s),s):(t.helper(oJ),t.components.add(r),aY(r,"component"))}(e,t):`"${o}"`,d=P(u)&&u.callee===oG,p=0,f=d||u===oL||u===o$||!c&&("svg"===o||"foreignObject"===o||"math"===o);if(a.length>0){let r=cZ(e,t,void 0,c,d);n=r.props,p=r.patchFlag,l=r.dynamicPropNames;let i=r.directives;s=i&&i.length?af(i.map(e=>(function(e,t){let n=[],r=cQ.get(e);r?n.push(t.helperString(r)):(t.helper(oQ),t.directives.add(e.name),n.push(aY(e.name,"directive")));let{loc:i}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));let t=ag("true",!1,i);n.push(ah(e.modifiers.map(e=>am(e,t)),i))}return af(n,e.loc)})(e,t))):void 0,r.shouldUseBlock&&(f=!0)}if(e.children.length>0){if(u===oF&&(f=!0,p|=1024),c&&u!==oL&&u!==oF){let{slots:n,hasDynamicSlots:i}=function(e,t,n=cJ){t.helper(al);let{children:r,loc:i}=e,l=[],s=[],o=t.scopes.vSlot>0||t.scopes.vFor>0,a=aH(e,"slot",!0);if(a){let{arg:e,exp:t}=a;e&&!aO(e)&&(o=!0),l.push(am(e||ag("default",!0),n(t,void 0,r,i)))}let c=!1,u=!1,d=[],p=/* @__PURE__ */new Set,f=0;for(let e=0;eam("default",n(e,void 0,t,i));c?d.length&&d.some(e=>(function e(t){return 2!==t.type&&12!==t.type||(2===t.type?!!t.content.trim():e(t.content))})(e))&&(u?t.onError(aI(39,d[0].loc)):l.push(e(void 0,d))):l.push(e(void 0,r))}let h=o?2:!function e(t){for(let n=0;n0,h=!1,m=0,g=!1,y=!1,_=!1,S=!1,x=!1,C=!1,T=[],k=e=>{u.length&&(d.push(ah(cY(u),a)),u=[]),e&&d.push(e)},w=()=>{t.scopes.vFor>0&&u.push(am(ag("ref_for",!0),ag("true")))},N=({key:e,value:n})=>{if(aO(e)){let l=e.content,s=b(l);s&&(!r||i)&&"onclick"!==l.toLowerCase()&&"onUpdate:modelValue"!==l&&!B(l)&&(S=!0),s&&B(l)&&(C=!0),s&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&cx(n,t)>0||("ref"===l?g=!0:"class"===l?y=!0:"style"===l?_=!0:"key"===l||T.includes(l)||T.push(l),r&&("class"===l||"style"===l)&&!T.includes(l)&&T.push(l))}else x=!0};for(let i=0;i"prop"===e.content)&&(m|=32);let S=t.directiveTransforms[n];if(S){let{props:n,needRuntime:r}=S(s,e,t);l||n.forEach(N),_&&i&&!aO(i)?k(ah(n,a)):u.push(...n),r&&(p.push(s),O(r)&&cQ.set(s,r))}else!U(n)&&(p.push(s),f&&(h=!0))}}if(d.length?(k(),s=d.length>1?av(t.helper(o6),d,a):d[0]):u.length&&(s=ah(cY(u),a)),x?m|=16:(y&&!r&&(m|=2),_&&!r&&(m|=4),T.length&&(m|=8),S&&(m|=32)),!h&&(0===m||32===m)&&(g||C||p.length>0)&&(m|=512),!t.inSSR&&s)switch(s.type){case 15:let E=-1,A=-1,R=!1;for(let e=0;e{if(aG(e)){let{children:n,loc:r}=e,{slotName:i,slotProps:l}=function(e,t){let n,r='"default"',i=[];for(let t=0;t0){let{props:r,directives:l}=cZ(e,t,i,!1,!1);n=r,l.length&&t.onError(aI(36,l[0].loc))}return{slotName:r,slotProps:n}}(e,t),s=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"],o=2;l&&(s[2]=l,o=3),n.length&&(s[3]=ab([],n,!1,!1,r),o=4),t.scopeId&&!t.slotted&&(o=5),s.splice(o),e.codegenNode=av(t.helper(o0),s,r)}},c2=(e,t,n,r)=>{let i;let{loc:l,modifiers:s,arg:o}=e;if(e.exp||s.length,4===o.type){if(o.isStatic){let e=o.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),i=ag(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?J(q(e)):`on:${e}`,!0,o.loc)}else i=ay([`${n.helperString(at)}(`,o,")"])}else(i=o).children.unshift(`${n.helperString(at)}(`),i.children.push(")");let a=e.exp;a&&!a.content.trim()&&(a=void 0);let c=n.cacheHandlers&&!a&&!n.inVOnce;if(a){let e=aB(a),t=!(e||aj(a)),n=a.content.includes(";");(t||c&&e)&&(a=ay([`${t?"$event":"(...args)"} => ${n?"{":"("}`,a,n?"}":")"]))}let u={props:[am(i,a||ag("() => {}",!1,l))]};return r&&(u=r(u)),c&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(e=>e.key.isHandlerKey=!0),u},c6=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{let n;let r=e.children,i=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name]))))for(let e=0;e{if(1===e.type&&aH(e,"once",!0)&&!c3.has(e)&&!t.inVOnce&&!t.inSSR)return c3.add(e),t.inVOnce=!0,t.helper(an),()=>{t.inVOnce=!1;let e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}},c8=(e,t,n)=>{let r;let{exp:i,arg:l}=e;if(!i)return n.onError(/* @__PURE__ *//*@__PURE__*/aI(41,e.loc)),c5();let s=i.loc.source.trim(),o=4===i.type?i.content:s,a=n.bindingMetadata[s];if("props"===a||"props-aliased"===a)return /* @__PURE__ */i.loc,c5();if(!o.trim()||!aB(i))return n.onError(/* @__PURE__ *//*@__PURE__*/aI(42,i.loc)),c5();let c=l||ag("modelValue",!0),u=l?aO(l)?`onUpdate:${q(l.content)}`:ay(['"onUpdate:" + ',l]):"onUpdate:modelValue",d=n.isTS?"($event: any)":"$event";r=ay([`${d} => ((`,i,") = $event)"]);let p=[am(c,e.exp),am(u,r)];if(e.modifiers.length&&1===t.tagType){let t=e.modifiers.map(e=>e.content).map(e=>(aD(e)?e:JSON.stringify(e))+": true").join(", "),n=l?aO(l)?`${l.content}Modifiers`:ay([l,' + "Modifiers"']):"modelModifiers";p.push(am(n,ag(`{ ${t} }`,!1,e.loc,2)))}return c5(p)};function c5(e=[]){return{props:e}}let c9=/* @__PURE__ */new WeakSet,c7=(e,t)=>{if(1===e.type){let n=aH(e,"memo");if(!(!n||c9.has(e)))return c9.add(e),()=>{let r=e.codegenNode||t.currentNode.codegenNode;r&&13===r.type&&(1!==e.tagType&&aS(r,t),e.codegenNode=av(t.helper(aa),[n.exp,ab(void 0,r),"_cache",String(t.cached.length)]),t.cached.push(null))}}},ue=Symbol(""),ut=Symbol(""),un=Symbol(""),ur=Symbol(""),ui=Symbol(""),ul=Symbol(""),us=Symbol(""),uo=Symbol(""),ua=Symbol(""),uc=Symbol("");!function(e){Object.getOwnPropertySymbols(e).forEach(t=>{au[t]=e[t]})}({[ue]:"vModelRadio",[ut]:"vModelCheckbox",[un]:"vModelText",[ur]:"vModelSelect",[ui]:"vModelDynamic",[ul]:"withModifiers",[us]:"withKeys",[uo]:"vShow",[ua]:"Transition",[uc]:"TransitionGroup"});let uu={parseMode:"html",isVoidTag:ep,isNativeTag:e=>ec(e)||eu(e)||ed(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(e,t=!1){return(u||(u=document.createElement("div")),t)?(u.innerHTML=`
`,u.children[0].getAttribute("foo")):(u.innerHTML=e,u.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?ua:"TransitionGroup"===e||"transition-group"===e?uc:void 0,getNamespace(e,t,n){let r=t?t.ns:n;if(t&&2===r){if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some(e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content))&&(r=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(r=0)}else t&&1===r&&("foreignObject"===t.tag||"desc"===t.tag||"title"===t.tag)&&(r=0);if(0===r){if("svg"===e)return 1;if("math"===e)return 2}return r}},ud=(e,t)=>ag(JSON.stringify(es(e)),!1,t,3),up=/* @__PURE__ */f("passive,once,capture"),uf=/* @__PURE__ */f("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),uh=/* @__PURE__ */f("left,right"),um=/* @__PURE__ */f("onkeyup,onkeydown,onkeypress"),ug=(e,t,n,r)=>{let i=[],l=[],s=[];for(let n=0;naO(e)&&"onclick"===e.content.toLowerCase()?ag(t,!0):4!==e.type?ay(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,uv=(e,t)=>{1===e.type&&0===e.tagType&&("script"===e.tag||"style"===e.tag)&&t.removeNode()},ub=[e=>{1===e.type&&e.props.forEach((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:ag("style",!0,t.loc),exp:ud(t.value.content,t.loc),modifiers:[],loc:t.loc})})}],u_={cloak:()=>({props:[]}),html:(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(aI(53,i)),t.children.length&&(n.onError(aI(54,i)),t.children.length=0),{props:[am(ag("innerHTML",!0,i),r||ag("",!0))]}},text:(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(aI(55,i)),t.children.length&&(n.onError(aI(56,i)),t.children.length=0),{props:[am(ag("textContent",!0),r?cx(r,n)>0?r:av(n.helperString(o2),[r],i):ag("",!0))]}},model:(e,t,n)=>{let r=c8(e,t,n);if(!r.props.length||1===t.tagType)return r;e.arg&&n.onError(aI(58,e.arg.loc));let{tag:i}=t,l=n.isCustomElement(i);if("input"===i||"textarea"===i||"select"===i||l){let s=un,o=!1;if("input"===i||l){let r=aq(t,"type");if(r){if(7===r.type)s=ui;else if(r.value)switch(r.value.content){case"radio":s=ue;break;case"checkbox":s=ut;break;case"file":o=!0,n.onError(aI(59,e.loc))}}else t.props.some(e=>7===e.type&&"bind"===e.name&&(!e.arg||4!==e.arg.type||!e.arg.isStatic))&&(s=ui)}else"select"===i&&(s=ur);o||(r.needRuntime=n.helper(s))}else n.onError(aI(57,e.loc));return r.props=r.props.filter(e=>!(4===e.key.type&&"modelValue"===e.key.content)),r},on:(e,t,n)=>c2(e,t,n,t=>{let{modifiers:r}=e;if(!r.length)return t;let{key:i,value:l}=t.props[0],{keyModifiers:s,nonKeyModifiers:o,eventOptionModifiers:a}=ug(i,r,n,e.loc);if(o.includes("right")&&(i=uy(i,"onContextmenu")),o.includes("middle")&&(i=uy(i,"onMouseup")),o.length&&(l=av(n.helper(ul),[l,JSON.stringify(o)])),s.length&&(!aO(i)||um(i.content.toLowerCase()))&&(l=av(n.helper(us),[l,JSON.stringify(s)])),a.length){let e=a.map(z).join("");i=aO(i)?ag(`${i.content}${e}`,!0):ay(["(",i,`) + "${e}"`])}return{props:[am(i,l)]}}),show:(e,t,n)=>{let{exp:r,loc:i}=e;return!r&&n.onError(aI(61,i)),{props:[],needRuntime:n.helper(uo)}}},uS=/* @__PURE__ */Object.create(null);function ux(e,t){if(!I(e)){if(!e.nodeType)return g;e=e.innerHTML}let n=e+JSON.stringify(t,(e,t)=>"function"==typeof t?t.toString():t),r=uS[n];if(r)return r;if("#"===e[0]){let t=document.querySelector(e);e=t?t.innerHTML:""}let i=S({hoistStatic:!0,onError:void 0,onWarn:g},t);i.isCustomElement||"undefined"==typeof customElements||(i.isCustomElement=e=>!!customElements.get(e));let{code:l}=function(e,t={}){return function(e,t={}){let n=t.onError||aA,r="module"===t.mode;!0===t.prefixIdentifiers?n(/* @__PURE__ *//*@__PURE__*/aI(47)):r&&n(/* @__PURE__ *//*@__PURE__*/aI(48)),t.cacheHandlers&&n(/* @__PURE__ *//*@__PURE__*/aI(49)),t.scopeId&&!r&&n(/* @__PURE__ *//*@__PURE__*/aI(50));let i=S({},t,{prefixIdentifiers:!1}),l=I(e)?function(e,t){if(ci.reset(),a4=null,a8=null,a5="",a9=-1,a7=-1,cr.length=0,a3=e,a2=S({},a1),t){let e;for(e in t)null!=t[e]&&(a2[e]=t[e])}ci.mode="html"===a2.parseMode?1:"sfc"===a2.parseMode?2:0,ci.inXML=1===a2.ns||2===a2.ns;let n=t&&t.delimiters;n&&(ci.delimiterOpen=aN(n[0]),ci.delimiterClose=aN(n[1]));let r=a6=function(e,t=""){return{type:0,source:t,children:e,helpers:/* @__PURE__ */new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:ad}}([],e);return ci.parse(a3),r.loc=cy(0,e.length),r.children=ch(r.children),a6=null,r}(e,i):e,[s,o]=[[c4,cL,c7,cH,c1,cX,cz,c6],{on:c2,bind:cB,model:c8}];return!function(e,t){let n=function(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:r=!1,hmr:i=!1,cacheHandlers:l=!1,nodeTransforms:s=[],directiveTransforms:o={},transformHoist:a=null,isBuiltInComponent:c=g,isCustomElement:u=g,expressionPlugins:d=[],scopeId:p=null,slotted:f=!0,ssr:m=!1,inSSR:y=!1,ssrCssVars:b="",bindingMetadata:_=h,inline:S=!1,isTS:x=!1,onError:C=aA,onWarn:T=aR,compatConfig:k}){let w=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),N={filename:t,selfName:w&&z(q(w[1])),prefixIdentifiers:n,hoistStatic:r,hmr:i,cacheHandlers:l,nodeTransforms:s,directiveTransforms:o,transformHoist:a,isBuiltInComponent:c,isCustomElement:u,expressionPlugins:d,scopeId:p,slotted:f,ssr:m,inSSR:y,ssrCssVars:b,bindingMetadata:_,inline:S,isTS:x,onError:C,onWarn:T,compatConfig:k,root:e,helpers:/* @__PURE__ */new Map,components:/* @__PURE__ */new Set,directives:/* @__PURE__ */new Set,hoists:[],imports:[],cached:[],constantCache:/* @__PURE__ */new WeakMap,temps:0,identifiers:/* @__PURE__ */Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){let t=N.helpers.get(e)||0;return N.helpers.set(e,t+1),e},removeHelper(e){let t=N.helpers.get(e);if(t){let n=t-1;n?N.helpers.set(e,n):N.helpers.delete(e)}},helperString:e=>`_${au[N.helper(e)]}`,replaceNode(e){N.parent.children[N.childIndex]=N.currentNode=e},removeNode(e){let t=N.parent.children,n=e?t.indexOf(e):N.currentNode?N.childIndex:-1;e&&e!==N.currentNode?N.childIndex>n&&(N.childIndex--,N.onNodeRemoved()):(N.currentNode=null,N.onNodeRemoved()),N.parent.children.splice(n,1)},onNodeRemoved:g,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){I(e)&&(e=ag(e)),N.hoists.push(e);let t=ag(`_hoisted_${N.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1){let n=function(e,t,n=!1){return{type:20,index:e,value:t,needPauseTracking:n,needArraySpread:!1,loc:ad}}(N.cached.length,e,t);return N.cached.push(n),n}};return N}(e,t);cw(e,n),t.hoistStatic&&function e(t,n,r,i=!1,l=!1){let{children:s}=t,o=[];for(let n=0;n0){if(e>=2){a.codegenNode.patchFlag=-1,o.push(a);continue}}else{let e=a.codegenNode;if(13===e.type){let t=e.patchFlag;if((void 0===t||512===t||1===t)&&cT(a,r)>=2){let t=ck(a);t&&(e.props=r.hoist(t))}e.dynamicProps&&(e.dynamicProps=r.hoist(e.dynamicProps))}}}else if(12===a.type&&(i?0:cx(a,r))>=2){o.push(a);continue}if(1===a.type){let n=1===a.tagType;n&&r.scopes.vSlot++,e(a,t,r,!1,l),n&&r.scopes.vSlot--}else if(11===a.type)e(a,t,r,1===a.children.length,!0);else if(9===a.type)for(let n=0;ne.key===t||e.key.content===t);return n&&n.value}}o.length&&r.transformHoist&&r.transformHoist(s,r,t)}(e,void 0,n,cS(e,e.children[0])),t.ssr||function(e,t){let{helper:n}=t,{children:r}=e;if(1===r.length){let n=r[0];if(cS(e,n)&&n.codegenNode){let r=n.codegenNode;13===r.type&&aS(r,t),e.codegenNode=r}else e.codegenNode=n}else r.length>1&&(e.codegenNode=ap(t,n(oD),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}(e,n),e.helpers=/* @__PURE__ */new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0}(l,S({},i,{nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:S({},o,t.directiveTransforms||{})})),function(e,t={}){let n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:r=!1,filename:i="template.vue.html",scopeId:l=null,optimizeImports:s=!1,runtimeGlobalName:o="Vue",runtimeModuleName:a="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:p=!1}){let f={mode:t,prefixIdentifiers:n,sourceMap:r,filename:i,scopeId:l,optimizeImports:s,runtimeGlobalName:o,runtimeModuleName:a,ssrRuntimeModuleName:c,ssr:u,isTS:d,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${au[e]}`,push(e,t=-2,n){f.code+=e},indent(){h(++f.indentLevel)},deindent(e=!1){e?--f.indentLevel:h(--f.indentLevel)},newline(){h(f.indentLevel)}};function h(e){f.push("\n"+" ".repeat(e),0)}return f}(e,t);t.onContextCreated&&t.onContextCreated(n);let{mode:r,push:i,prefixIdentifiers:l,indent:s,deindent:o,newline:a,scopeId:c,ssr:u}=n,d=Array.from(e.helpers),p=d.length>0,f=!l&&"module"!==r;(function(e,t){let{ssr:n,prefixIdentifiers:r,push:i,newline:l,runtimeModuleName:s,runtimeGlobalName:o,ssrRuntimeModuleName:a}=t,c=Array.from(e.helpers);if(c.length>0&&(i(`const _Vue = ${o} +`,-1),e.hoists.length)){let e=[oH,oq,oW,oK,oz].filter(e=>c.includes(e)).map(cA).join(", ");i(`const { ${e} } = _Vue +`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;let{push:n,newline:r}=t;r();for(let i=0;i0)&&a()),e.directives.length&&(cR(e.directives,"directive",n),e.temps>0&&a()),e.temps>0){i("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i(` +`,0),a()),u||i("return "),e.codegenNode?cP(e.codegenNode,n):i("null"),f&&(o(),i("}")),o(),i("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}(l,i)}(e,S({},uu,t,{nodeTransforms:[uv,...ub,...t.nodeTransforms||[]],directiveTransforms:S({},u_,t.directiveTransforms||{}),transformHoist:null}))}(e,i),s=Function("Vue",l)(oM);return s._rc=!0,uS[n]=s}lJ(ux);export{nQ as BaseTransition,nz as BaseTransitionPropsValidators,lc as Comment,si as DeprecationTypes,e_ as EffectScope,nl as ErrorCodes,l9 as ErrorTypeStrings,lo as Fragment,rg as KeepAlive,ek as ReactiveEffect,lu as Static,lt as Suspense,nB as Teleport,la as Text,t5 as TrackOpTypes,sh as Transition,s5 as TransitionGroup,t9 as TriggerOpTypes,sY as VueElement,ni as assertNumber,no as callWithAsyncErrorHandling,ns as callWithErrorHandling,q as camelize,z as capitalize,lE as cloneVNode,sr as compatUtils,ux as compile,l1 as computed,ow as createApp,lb as createBlock,lI as createCommentVNode,lv as createElementBlock,lk as createElementVNode,iF as createHydrationRenderer,it as createPropsRestProxy,i$ as createRenderer,oN as createSSRApp,rH as createSlots,lR as createStaticVNode,lA as createTextVNode,lw as createVNode,t0 as customRef,rf as defineAsyncComponent,n6 as defineComponent,sQ as defineCustomElement,rY as defineEmits,r0 as defineExpose,r6 as defineModel,r1 as defineOptions,rZ as defineProps,sX as defineSSRCustomElement,r2 as defineSlots,l7 as devtools,eM as effect,eS as effectScope,lU as getCurrentInstance,ex as getCurrentScope,nt as getCurrentWatcher,n2 as getTransitionRawChildren,lN as guardReactiveProps,l2 as h,na as handleError,i_ as hasInjectionContext,ok as hydrate,ra as hydrateOnIdle,rd as hydrateOnInteraction,ru as hydrateOnMediaQuery,rc as hydrateOnVisible,l6 as initCustomFormatter,oI as initDirectivesForSSR,ib as inject,l4 as isMemoSame,tF as isProxy,tD as isReactive,tL as isReadonly,tH as isRef,lG as isRuntimeOnly,t$ as isShallow,l_ as isVNode,tB as markRaw,r7 as mergeDefaults,ie as mergeModels,lD as mergeProps,ng as nextTick,eo as normalizeClass,ea as normalizeProps,en as normalizeStyle,rv as onActivated,rk as onBeforeMount,rA as onBeforeUnmount,rN as onBeforeUpdate,rb as onDeactivated,rM as onErrorCaptured,rw as onMounted,rP as onRenderTracked,rO as onRenderTriggered,eC as onScopeDispose,rI as onServerPrefetch,rR as onUnmounted,rE as onUpdated,nn as onWatcherCleanup,lf as openBlock,nN as popScopeId,iv as provide,tZ as proxyRefs,nw as pushScopeId,nb as queuePostFlushCb,tR as reactive,tO as readonly,tq as ref,lJ as registerRuntimeCompiler,oT as render,rj as renderList,rq as renderSlot,rL as resolveComponent,rV as resolveDirective,rF as resolveDynamicComponent,sn as resolveFilter,nZ as resolveTransitionHooks,lg as setBlockTracking,se as setDevtoolsHook,n1 as setTransitionHooks,tI as shallowReactive,tP as shallowReadonly,tW as shallowRef,iW as ssrContextKey,st as ssrUtils,eD as stop,ey as toDisplayString,J as toHandlerKey,rK as toHandlers,tV as toRaw,t3 as toRef,t1 as toRefs,tQ as toValue,lx as transformVNodeArgs,tJ as triggerRef,tG as unref,r8 as useAttrs,s2 as useCssModule,sO as useCssVars,s0 as useHost,n3 as useId,i0 as useModel,iK as useSSRContext,s1 as useShadowRoot,r4 as useSlots,n8 as useTemplateRef,nW as useTransitionState,os as vModelCheckbox,of as vModelDynamic,oa as vModelRadio,oc as vModelSelect,ol as vModelText,sA as vShow,l8 as version,l5 as warn,iQ as watch,iz as watchEffect,iJ as watchPostEffect,iG as watchSyncEffect,ir as withAsyncContext,nA as withCtx,r3 as withDefaults,nR as withDirectives,o_ as withKeys,l3 as withMemo,ov as withModifiers,nE as withScopeId}; diff --git a/MyApp/wwwroot/lib/mjs/vue.mjs b/MyApp/wwwroot/lib/mjs/vue.mjs index e27c8e8..440c6ec 100644 --- a/MyApp/wwwroot/lib/mjs/vue.mjs +++ b/MyApp/wwwroot/lib/mjs/vue.mjs @@ -1,5 +1,5 @@ /** -* vue v3.5.4 +* vue v3.5.11 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ @@ -106,6 +106,12 @@ let _globalThis; const getGlobalThis = () => { return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; +function genCacheKey(source, options) { + return source + JSON.stringify( + options, + (_, val) => typeof val === "function" ? val.toString() : val + ); +} const PatchFlagNames = { [1]: `TEXT`, @@ -532,7 +538,7 @@ class ReactiveEffect { /** * @internal */ - this.nextEffect = void 0; + this.next = void 0; /** * @internal */ @@ -562,9 +568,7 @@ class ReactiveEffect { return; } if (!(this.flags & 8)) { - this.flags |= 8; - this.nextEffect = batchedEffect; - batchedEffect = this; + batch(this); } } run() { @@ -625,7 +629,18 @@ class ReactiveEffect { } } let batchDepth = 0; -let batchedEffect; +let batchedSub; +let batchedComputed; +function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; +} function startBatch() { batchDepth++; } @@ -633,16 +648,27 @@ function endBatch() { if (--batchDepth > 0) { return; } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } let error; - while (batchedEffect) { - let e = batchedEffect; - batchedEffect = void 0; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; while (e) { - const next = e.nextEffect; - e.nextEffect = void 0; + const next = e.next; + e.next = void 0; e.flags &= ~8; if (e.flags & 1) { try { + ; e.trigger(); } catch (err) { if (!error) error = err; @@ -663,9 +689,11 @@ function prepareDeps(sub) { function cleanupDeps(sub) { let head; let tail = sub.depsTail; - for (let link = tail; link; link = link.prevDep) { + let link = tail; + while (link) { + const prev = link.prevDep; if (link.version === -1) { - if (link === tail) tail = link.prevDep; + if (link === tail) tail = prev; removeSub(link); removeDep(link); } else { @@ -673,13 +701,14 @@ function cleanupDeps(sub) { } link.dep.activeLink = link.prevActiveLink; link.prevActiveLink = void 0; + link = prev; } sub.deps = head; sub.depsTail = tail; } function isDirty(sub) { for (let link = sub.deps; link; link = link.nextDep) { - if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) || link.dep.version !== link.version) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { return true; } } @@ -699,7 +728,7 @@ function refreshComputed(computed) { computed.globalVersion = globalVersion; const dep = computed.dep; computed.flags |= 2; - if (dep.version > 0 && !computed.isSSR && !isDirty(computed)) { + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { computed.flags &= ~2; return; } @@ -724,7 +753,7 @@ function refreshComputed(computed) { computed.flags &= ~2; } } -function removeSub(link) { +function removeSub(link, soft = false) { const { dep, prevSub, nextSub } = link; if (prevSub) { prevSub.nextSub = nextSub; @@ -737,12 +766,18 @@ function removeSub(link) { if (dep.subs === link) { dep.subs = prevSub; } + if (dep.subsHead === link) { + dep.subsHead = nextSub; + } if (!dep.subs && dep.computed) { dep.computed.flags &= ~4; for (let l = dep.computed.deps; l; l = l.nextDep) { - removeSub(l); + removeSub(l, true); } } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } } function removeDep(link) { const { prevDep, nextDep } = link; @@ -801,6 +836,14 @@ function cleanupEffect(e) { } let globalVersion = 0; +class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } +} class Dep { constructor(computed) { this.computed = computed; @@ -813,6 +856,15 @@ class Dep { * Doubly linked list representing the subscribing effects (tail) */ this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; { this.subsHead = void 0; } @@ -823,16 +875,7 @@ class Dep { } let link = this.activeLink; if (link === void 0 || link.sub !== activeSub) { - link = this.activeLink = { - dep: this, - sub: activeSub, - version: this.version, - nextDep: void 0, - prevDep: void 0, - nextSub: void 0, - prevSub: void 0, - prevActiveLink: void 0 - }; + link = this.activeLink = new Link(activeSub, this); if (!activeSub.deps) { activeSub.deps = activeSub.depsTail = link; } else { @@ -840,9 +883,7 @@ class Dep { activeSub.depsTail.nextDep = link; activeSub.depsTail = link; } - if (activeSub.flags & 4) { - addSub(link); - } + addSub(link); } else if (link.version === -1) { link.version = this.version; if (link.nextDep) { @@ -895,7 +936,10 @@ class Dep { } } for (let link = this.subs; link; link = link.prevSub) { - link.sub.notify(); + if (link.sub.notify()) { + ; + link.sub.dep.notify(); + } } } finally { endBatch(); @@ -903,22 +947,25 @@ class Dep { } } function addSub(link) { - const computed = link.dep.computed; - if (computed && !link.dep.subs) { - computed.flags |= 4 | 16; - for (let l = computed.deps; l; l = l.nextDep) { - addSub(l); + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + if (link.dep.subsHead === void 0) { + link.dep.subsHead = link; + } + link.dep.subs = link; } - const currentTail = link.dep.subs; - if (currentTail !== link) { - link.prevSub = currentTail; - if (currentTail) currentTail.nextSub = link; - } - if (link.dep.subsHead === void 0) { - link.dep.subsHead = link; - } - link.dep.subs = link; } const targetMap = /* @__PURE__ */ new WeakMap(); const ITERATE_KEY = Symbol( @@ -939,6 +986,8 @@ function track(target, type, key) { let dep = depsMap.get(key); if (!dep) { depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; } { dep.track({ @@ -1019,8 +1068,8 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) { endBatch(); } function getDepFromReactive(object, key) { - var _a; - return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); + const depMap = targetMap.get(object); + return depMap && depMap.get(key); } function reactiveReadArray(array) { @@ -1815,13 +1864,15 @@ class RefImpl { } } function triggerRef(ref2) { - { - ref2.dep.trigger({ - target: ref2, - type: "set", - key: "value", - newValue: ref2._value - }); + if (ref2.dep) { + { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } } } function unref(ref2) { @@ -1954,6 +2005,10 @@ class ComputedRefImpl { * @internal */ this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; // for backwards compat this.effect = this; this["__v_isReadonly"] = !setter; @@ -1964,8 +2019,10 @@ class ComputedRefImpl { */ notify() { this.flags |= 16; - if (activeSub !== this) { - this.dep.notify(); + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; } } get value() { @@ -2113,20 +2170,12 @@ function watch$1(source, cb, options = EMPTY_OBJ) { remove(scope.effects, effect); } }; - if (once) { - if (cb) { - const _cb = cb; - cb = (...args) => { - _cb(...args); - watchHandle(); - }; - } else { - const _getter = getter; - getter = () => { - _getter(); - watchHandle(); - }; - } + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; } let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; const job = (immediateFirstRun) => { @@ -2494,10 +2543,8 @@ function logError(err, type, contextVNode, throwInDev = true, throwInProd = fals } } -let isFlushing = false; -let isFlushPending = false; const queue = []; -let flushIndex = 0; +let flushIndex = -1; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; @@ -2509,7 +2556,7 @@ function nextTick(fn) { return fn ? p.then(this ? fn.bind(this) : fn) : p; } function findInsertionIndex(id) { - let start = isFlushing ? flushIndex + 1 : 0; + let start = flushIndex + 1; let end = queue.length; while (start < end) { const middle = start + end >>> 1; @@ -2538,8 +2585,7 @@ function queueJob(job) { } } function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; + if (!currentFlushPromise) { currentFlushPromise = resolvedPromise.then(flushJobs); } } @@ -2556,7 +2602,7 @@ function queuePostFlushCb(cb) { } queueFlush(); } -function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { +function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { { seen = seen || /* @__PURE__ */ new Map(); } @@ -2575,7 +2621,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { cb.flags &= ~1; } cb(); - cb.flags &= ~1; + if (!(cb.flags & 4)) { + cb.flags &= ~1; + } } } } @@ -2610,8 +2658,6 @@ function flushPostFlushCbs(seen) { } const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; function flushJobs(seen) { - isFlushPending = false; - isFlushing = true; { seen = seen || /* @__PURE__ */ new Map(); } @@ -2631,7 +2677,9 @@ function flushJobs(seen) { job.i, job.i ? 15 : 14 ); - job.flags &= ~1; + if (!(job.flags & 4)) { + job.flags &= ~1; + } } } } finally { @@ -2641,10 +2689,9 @@ function flushJobs(seen) { job.flags &= ~1; } } - flushIndex = 0; + flushIndex = -1; queue.length = 0; flushPostFlushCbs(seen); - isFlushing = false; currentFlushPromise = null; if (queue.length || pendingPostFlushCbs.length) { flushJobs(seen); @@ -2745,7 +2792,9 @@ function reload(id, newComp) { dirtyInstances.delete(instance); } else if (instance.parent) { queueJob(() => { + isHmrUpdating = true; instance.parent.update(); + isHmrUpdating = false; dirtyInstances.delete(instance); }); } else if (instance.appContext.reload) { @@ -3036,6 +3085,9 @@ const TeleportImpl = { insert(mainAnchor, container, anchor); const mount = (container2, anchor2) => { if (shapeFlag & 16) { + if (parentComponent && parentComponent.isCE) { + parentComponent.ce._teleportTarget = container2; + } mountChildren( children, container2, @@ -3667,6 +3719,7 @@ function useId() { `useId() is called when there is no active component instance to be associated with.` ); } + return ""; } function markAsyncBoundary(instance) { instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; @@ -4066,7 +4119,11 @@ Server rendered element contains more child nodes than client vdom.` remove(cur); } } else if (shapeFlag & 8) { - if (el.textContent !== vnode.children) { + let clientText = vnode.children; + if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { + clientText = clientText.slice(1); + } + if (el.textContent !== clientText) { if (!isMismatchAllowed(el, 0 /* TEXT */)) { warn$1( `Hydration text content mismatch on`, @@ -4265,7 +4322,7 @@ Server rendered element contains fewer child nodes than client vdom.` } }; const isTemplateNode = (node) => { - return node.nodeType === 1 && node.tagName.toLowerCase() === "template"; + return node.nodeType === 1 && node.tagName === "TEMPLATE"; }; return [hydrate, hydrateNode]; } @@ -4421,6 +4478,11 @@ const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { const id = requestIdleCallback(hydrate, { timeout }); return () => cancelIdleCallback(id); }; +function elementIsVisibleInViewport(el) { + const { top, left, bottom, right } = el.getBoundingClientRect(); + const { innerHeight, innerWidth } = window; + return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); +} const hydrateOnVisible = (opts) => (hydrate, forEach) => { const ob = new IntersectionObserver((entries) => { for (const e of entries) { @@ -4430,7 +4492,15 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => { break; } }, opts); - forEach((el) => ob.observe(el)); + forEach((el) => { + if (!(el instanceof Element)) return; + if (elementIsVisibleInViewport(el)) { + hydrate(); + ob.disconnect(); + return false; + } + ob.observe(el); + }); return () => ob.disconnect(); }; const hydrateOnMediaQuery = (query) => (hydrate) => { @@ -4475,7 +4545,10 @@ function forEachElement(node, cb) { let next = node.nextSibling; while (next) { if (next.nodeType === 1) { - cb(next); + const result = cb(next); + if (result === false) { + break; + } } else if (isComment(next)) { if (next.data === "]") { if (--depth === 0) break; @@ -4617,7 +4690,7 @@ function defineAsyncComponent(source) { load().then(() => { loaded.value = true; if (instance.parent && isKeepAlive(instance.parent.vnode)) { - queueJob(instance.parent.update); + instance.parent.update(); } }).catch((err) => { onError(err); @@ -7299,6 +7372,7 @@ function baseCreateRenderer(options, createHydrationFns) { } } if (instance.asyncDep) { + if (isHmrUpdating) initialVNode.el = null; parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); if (!initialVNode.el) { const placeholder = instance.subTree = createVNode(Comment); @@ -8261,11 +8335,12 @@ function doWatch(source, cb, options = EMPTY_OBJ) { } else if (!cb || immediate) { baseWatchOptions.once = true; } else { - return { - stop: NOOP, - resume: NOOP, - pause: NOOP + const watchStopHandle = () => { }; + watchStopHandle.stop = NOOP; + watchStopHandle.resume = NOOP; + watchStopHandle.pause = NOOP; + return watchStopHandle; } } const instance = currentInstance; @@ -9705,7 +9780,7 @@ function normalizeVNode(child) { // #3666, avoid reference pollution when reusing vnode child.slice() ); - } else if (typeof child === "object") { + } else if (isVNode(child)) { return cloneIfMounted(child); } else { return createVNode(Text, null, String(child)); @@ -10450,7 +10525,7 @@ function isMemoSame(cached, memo) { return true; } -const version = "3.5.4"; +const version = "3.5.11"; const warn = warn$1 ; const ErrorTypeStrings = ErrorTypeStrings$1 ; const devtools = devtools$1 ; @@ -10749,7 +10824,7 @@ function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { resolve(); } }; - if (explicitTimeout) { + if (explicitTimeout != null) { return setTimeout(resolveIfNotStale, explicitTimeout); } const { type, timeout, propCount } = getTransitionInfo(el, expectedType); @@ -11237,6 +11312,11 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); } + } else if ( + // #11081 force set props for possible async custom element + el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) + ) { + patchDOMProp(el, camelize(key), nextValue); } else { if (key === "true-value") { el._trueValue = nextValue; @@ -11277,13 +11357,7 @@ function shouldSetAsProp(el, key, value, isSVG) { if (isNativeOn(key) && isString(value)) { return false; } - if (key in el) { - return true; - } - if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) { - return true; - } - return false; + return key in el; } const REMOVAL = {}; @@ -11350,6 +11424,7 @@ class VueElement extends BaseClass { } } connectedCallback() { + if (!this.isConnected) return; if (!this.shadowRoot) { this._parseSlots(); } @@ -11392,7 +11467,7 @@ class VueElement extends BaseClass { this._ob = null; } this._app && this._app.unmount(); - this._instance.ce = void 0; + if (this._instance) this._instance.ce = void 0; this._app = this._instance = null; } }); @@ -11611,7 +11686,7 @@ class VueElement extends BaseClass { } } /** - * Only called when shaddowRoot is false + * Only called when shadowRoot is false */ _parseSlots() { const slots = this._slots = {}; @@ -11623,10 +11698,10 @@ class VueElement extends BaseClass { } } /** - * Only called when shaddowRoot is false + * Only called when shadowRoot is false */ _renderSlots() { - const outlets = this.querySelectorAll("slot"); + const outlets = (this._teleportTarget || this).querySelectorAll("slot"); const scopeId = this._instance.type.__scopeId; for (let i = 0; i < outlets.length; i++) { const o = outlets[i]; @@ -11805,7 +11880,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({ child, resolveTransitionHooks(child, cssTransitionProps, state, instance) ); - } else { + } else if (child.type !== Text) { warn(` children must be keyed.`); } } @@ -11959,7 +12034,7 @@ const vModelCheckbox = { setChecked(el, binding, vnode); } }; -function setChecked(el, { value, oldValue }, vnode) { +function setChecked(el, { value }, vnode) { el._modelValue = value; let checked; if (isArray(value)) { @@ -12009,19 +12084,19 @@ const vModelSelect = { }, // set value in mounted & updated because