From ea65dcbd2e63b9750da71768f6777a51c73ae3b1 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 8 Aug 2023 04:07:02 +0000 Subject: [PATCH] deploy: b9e477ed650209da8b33ae212d5099859c348648 --- 404.html | 2 +- .../index.json | 0 .../posts.json | 0 .../posts/deploy.json | 0 .../posts/rider.json | 0 .../posts/vs.json | 0 .../_buildManifest.js | 0 .../_ssgManifest.js | 0 .../{_app-58c283774b3a5cb8.js => _app-c9d15ad7f4a53392.js} | 6 +++--- admin.html | 2 +- bookings-crud.html | 2 +- bookings-crud/create.html | 2 +- bookings-crud/edit.html | 2 +- features.html | 4 ++-- forbidden.html | 2 +- hosting.html | 4 ++-- index.html | 2 +- posts.html | 2 +- posts/deploy.html | 4 ++-- posts/rider.html | 4 ++-- posts/vs.html | 4 ++-- profile.html | 2 +- signin.html | 2 +- signup.html | 2 +- todomvc.html | 4 ++-- 25 files changed, 26 insertions(+), 26 deletions(-) rename _next/data/{HGbGABsCCzUIS1kXhvZ5k => CVnvT3AfJN-nEQpOHzvv6}/index.json (100%) rename _next/data/{HGbGABsCCzUIS1kXhvZ5k => CVnvT3AfJN-nEQpOHzvv6}/posts.json (100%) rename _next/data/{HGbGABsCCzUIS1kXhvZ5k => CVnvT3AfJN-nEQpOHzvv6}/posts/deploy.json (100%) rename _next/data/{HGbGABsCCzUIS1kXhvZ5k => CVnvT3AfJN-nEQpOHzvv6}/posts/rider.json (100%) rename _next/data/{HGbGABsCCzUIS1kXhvZ5k => CVnvT3AfJN-nEQpOHzvv6}/posts/vs.json (100%) rename _next/static/{HGbGABsCCzUIS1kXhvZ5k => CVnvT3AfJN-nEQpOHzvv6}/_buildManifest.js (100%) rename _next/static/{HGbGABsCCzUIS1kXhvZ5k => CVnvT3AfJN-nEQpOHzvv6}/_ssgManifest.js (100%) rename _next/static/chunks/pages/{_app-58c283774b3a5cb8.js => _app-c9d15ad7f4a53392.js} (93%) diff --git a/404.html b/404.html index 5cd9876..166e550 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -Next.js Example with Markdown

Next.js

A statically generated site (SSG) example using Next.js, Markdown & ServiceStack.

loading...
Cover Image for Develop using JetBrains Rider

Setting up & exploring development workflow in Rider.

Author
Author

More Stories

Cover Image for Develop using Visual Studio

Develop using Visual Studio

Exploring development workflow in VS Code and Visual Studio .NET

Author
Author
Cover Image for Deployment with GitHub Actions

Deployment with GitHub Actions

Configuring your GitHub repo for SSH and CDN deployments

Author
Author

Getting Started

Create New Project

$ sh
$ sh
$ sh

Build Client UI & Run Dev Server

$ sh
$ sh

Run Server .NET Project (New Terminal)

$ sh
$ sh

Use npm dev server for UI Development

`npm run build:local` to view in .NET App

\ No newline at end of file +Next.js Example with Markdown

Next.js

A statically generated site (SSG) example using Next.js, Markdown & ServiceStack.

loading...
Cover Image for Develop using JetBrains Rider

Setting up & exploring development workflow in Rider.

Author
Author

More Stories

Cover Image for Develop using Visual Studio

Develop using Visual Studio

Exploring development workflow in VS Code and Visual Studio .NET

Author
Author
Cover Image for Deployment with GitHub Actions

Deployment with GitHub Actions

Configuring your GitHub repo for SSH and CDN deployments

Author
Author

Getting Started

Create New Project

$ sh
$ sh
$ sh

Build Client UI & Run Dev Server

$ sh
$ sh

Run Server .NET Project (New Terminal)

$ sh
$ sh

Use npm dev server for UI Development

`npm run build:local` to view in .NET App

\ No newline at end of file diff --git a/_next/data/HGbGABsCCzUIS1kXhvZ5k/index.json b/_next/data/CVnvT3AfJN-nEQpOHzvv6/index.json similarity index 100% rename from _next/data/HGbGABsCCzUIS1kXhvZ5k/index.json rename to _next/data/CVnvT3AfJN-nEQpOHzvv6/index.json diff --git a/_next/data/HGbGABsCCzUIS1kXhvZ5k/posts.json b/_next/data/CVnvT3AfJN-nEQpOHzvv6/posts.json similarity index 100% rename from _next/data/HGbGABsCCzUIS1kXhvZ5k/posts.json rename to _next/data/CVnvT3AfJN-nEQpOHzvv6/posts.json diff --git a/_next/data/HGbGABsCCzUIS1kXhvZ5k/posts/deploy.json b/_next/data/CVnvT3AfJN-nEQpOHzvv6/posts/deploy.json similarity index 100% rename from _next/data/HGbGABsCCzUIS1kXhvZ5k/posts/deploy.json rename to _next/data/CVnvT3AfJN-nEQpOHzvv6/posts/deploy.json diff --git a/_next/data/HGbGABsCCzUIS1kXhvZ5k/posts/rider.json b/_next/data/CVnvT3AfJN-nEQpOHzvv6/posts/rider.json similarity index 100% rename from _next/data/HGbGABsCCzUIS1kXhvZ5k/posts/rider.json rename to _next/data/CVnvT3AfJN-nEQpOHzvv6/posts/rider.json diff --git a/_next/data/HGbGABsCCzUIS1kXhvZ5k/posts/vs.json b/_next/data/CVnvT3AfJN-nEQpOHzvv6/posts/vs.json similarity index 100% rename from _next/data/HGbGABsCCzUIS1kXhvZ5k/posts/vs.json rename to _next/data/CVnvT3AfJN-nEQpOHzvv6/posts/vs.json diff --git a/_next/static/HGbGABsCCzUIS1kXhvZ5k/_buildManifest.js b/_next/static/CVnvT3AfJN-nEQpOHzvv6/_buildManifest.js similarity index 100% rename from _next/static/HGbGABsCCzUIS1kXhvZ5k/_buildManifest.js rename to _next/static/CVnvT3AfJN-nEQpOHzvv6/_buildManifest.js diff --git a/_next/static/HGbGABsCCzUIS1kXhvZ5k/_ssgManifest.js b/_next/static/CVnvT3AfJN-nEQpOHzvv6/_ssgManifest.js similarity index 100% rename from _next/static/HGbGABsCCzUIS1kXhvZ5k/_ssgManifest.js rename to _next/static/CVnvT3AfJN-nEQpOHzvv6/_ssgManifest.js diff --git a/_next/static/chunks/pages/_app-58c283774b3a5cb8.js b/_next/static/chunks/pages/_app-c9d15ad7f4a53392.js similarity index 93% rename from _next/static/chunks/pages/_app-58c283774b3a5cb8.js rename to _next/static/chunks/pages/_app-c9d15ad7f4a53392.js index fb0306c..a642243 100644 --- a/_next/static/chunks/pages/_app-58c283774b3a5cb8.js +++ b/_next/static/chunks/pages/_app-c9d15ad7f4a53392.js @@ -1,9 +1,9 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{5548:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var ReadyState,Types,Buffer=__webpack_require__(1876).Buffer,process=__webpack_require__(3454),__awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){e.done?r(e.value):i(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.lastRightPart=exports.lastLeftPart=exports.rightPart=exports.leftPart=exports.splitOnLast=exports.splitOnFirst=exports.css=exports.nameOf=exports.sanitize=exports.map=exports.toKebabCase=exports.toPascalCase=exports.toCamelCase=exports.createError=exports.isFormData=exports.createFieldError=exports.createErrorStatus=exports.ApiResult=exports.getResponseStatus=exports.getMethod=exports.JsonServiceClient=exports.GetAccessTokenResponse=exports.HttpMethods=exports.ServerEventUser=exports.GetEventSubscribers=exports.UpdateEventSubscriberResponse=exports.UpdateEventSubscriber=exports.ServerEventReceiver=exports.getAllMembers=exports.ServerEventsClient=exports.ReadyState=exports.SingletonInstanceResolver=exports.NewInstanceResolver=exports.MetadataType=exports.MetadataPropertyType=exports.MetadataAttribute=exports.MetadataDataMember=exports.MetadataDataContract=exports.MetadataTypeName=exports.MetadataTypes=exports.MetadataOperationType=exports.MetadataRoute=exports.MetadataTypesConfig=exports.GetNavItemsResponse=exports.GetNavItems=exports.NavItem=exports.EmptyResponse=exports.ErrorResponse=exports.ResponseError=exports.ResponseStatus=void 0,exports.serializeToFormData=exports.serializeToUrlEncoded=exports.serializeToObject=exports.serializeForm=exports.ajaxSubmit=exports.formSubmit=exports.toVarNames=exports.bootstrapForm=exports.bindHandlers=exports.bootstrap=exports.delaySet=exports.on=exports.$$=exports.$1=exports.createElement=exports.toLocalISOString=exports.timeFmt12=exports.dateFmtHM=exports.dateFmt=exports.padInt=exports.toDateFmt=exports.toDate=exports.isDate=exports.errorResponse=exports.errorResponseExcept=exports.errorResponseSummary=exports.toObject=exports.toFormData=exports.parseResponseStatus=exports.getField=exports.normalize=exports.normalizeKey=exports.parseCookie=exports.tryDecode=exports.stripQuotes=exports.bytesToBase64=exports.appendQueryString=exports.createUrl=exports.createPath=exports.combinePaths=exports.queryString=exports.humanify=exports.splitTitleCase=exports.isDigit=exports.isLower=exports.isUpper=exports.ucFirst=exports.humanize=exports.onlyProps=exports.chop=void 0,exports.alignLeft=exports.uniqueKeys=exports.JSV=exports.StringBuffer=exports.toBase64String=exports.toByteArray=exports.fromByteArray=exports.toGuid=exports.fromGuid=exports.toTimeSpan=exports.fromTimeSpan=exports.toDateTime=exports.fromDateTime=exports.isNullOrEmpty=exports.indexOfAny=exports.htmlAttrs=exports.enc=exports.uniq=exports.flatMap=exports.toTimeSpanFmt=exports.toXsdDuration=exports.fromXsdDuration=exports.classNames=exports.NavOptions=exports.UserAttributes=exports.LinkButtonDefaults=exports.NavButtonGroupDefaults=exports.NavbarDefaults=exports.NavLinkDefaults=exports.NavDefaults=exports.btnClasses=exports.btnSizeClass=exports.BootstrapSizes=exports.btnColorClass=exports.BootstrapColors=exports.activeClass=exports.activeClassNav=exports.apiValueFmt=exports.apiValue=exports.mapGet=exports.resolve=exports.each=exports.apply=exports.omit=exports.pick=exports.safeVarName=exports.trimEnd=exports.populateForm=exports.triggerEvent=exports.sanitizeFormData=void 0,exports.Inspect=exports.createBus=exports.EventBus=exports.alignAuto=exports.alignRight=exports.alignCenter=void 0;class ResponseStatus{constructor(e){Object.assign(this,e)}}exports.ResponseStatus=ResponseStatus;class ResponseError{constructor(e){Object.assign(this,e)}}exports.ResponseError=ResponseError;class ErrorResponse{constructor(e){Object.assign(this,e)}}exports.ErrorResponse=ErrorResponse;class EmptyResponse{constructor(e){Object.assign(this,e)}}exports.EmptyResponse=EmptyResponse;class NavItem{constructor(e){Object.assign(this,e)}}exports.NavItem=NavItem;class GetNavItems{constructor(e){Object.assign(this,e)}createResponse(){return new GetNavItemsResponse}getTypeName(){return"GetNavItems"}getMethod(){return"GET"}}exports.GetNavItems=GetNavItems;class GetNavItemsResponse{constructor(e){Object.assign(this,e)}}exports.GetNavItemsResponse=GetNavItemsResponse;class MetadataTypesConfig{constructor(e){Object.assign(this,e)}}exports.MetadataTypesConfig=MetadataTypesConfig;class MetadataRoute{constructor(e){Object.assign(this,e)}}exports.MetadataRoute=MetadataRoute;class MetadataOperationType{constructor(e){Object.assign(this,e)}}exports.MetadataOperationType=MetadataOperationType;class MetadataTypes{constructor(e){Object.assign(this,e)}}exports.MetadataTypes=MetadataTypes;class MetadataTypeName{constructor(e){Object.assign(this,e)}}exports.MetadataTypeName=MetadataTypeName;class MetadataDataContract{constructor(e){Object.assign(this,e)}}exports.MetadataDataContract=MetadataDataContract;class MetadataDataMember{constructor(e){Object.assign(this,e)}}exports.MetadataDataMember=MetadataDataMember;class MetadataAttribute{constructor(e){Object.assign(this,e)}}exports.MetadataAttribute=MetadataAttribute;class MetadataPropertyType{constructor(e){Object.assign(this,e)}}exports.MetadataPropertyType=MetadataPropertyType;class MetadataType{constructor(e){Object.assign(this,e)}}exports.MetadataType=MetadataType;class NewInstanceResolver{tryResolve(e){return new e}}exports.NewInstanceResolver=NewInstanceResolver;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}exports.SingletonInstanceResolver=SingletonInstanceResolver,function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSED=2]="CLOSED"}(ReadyState=exports.ReadyState||(exports.ReadyState={}));class ServerEventsClient{constructor(e,t,r={},n=null){if(this.channels=t,this.options=r,this.eventSource=n,this.onMessage=e=>{if("undefined"==typeof document){let t=e.data?e.data.indexOf("\n"):-1;if(t>=0){let r=e.data,n=e.lastEventId,i=Object.assign({},{lastEventId:n,data:r.substring(0,t)}),s=Object.assign({},{lastEventId:n,data:r.substring(t+1)});this._onMessage(i),this._onMessage(s);return}}this._onMessage(e)},this._onMessage=e=>{if(this.stopped)return;let t=this.options;if(void 0===r)var r={querySelectorAll:e=>[]};let n=r.querySelectorAll.bind(r),i=splitOnFirst(e.data," "),s=null,o=i[0],a=splitOnFirst(o,"@");a.length>1&&(s=a[0],o=a[1]);let l=i[1],u=null;try{u=l?JSON.parse(l):null}catch(e){}if((i=splitOnFirst(o,".")).length<=1)throw"invalid selector format: "+o;let c=i[0],f=i[1].replace(/%20/g," "),h=splitOnFirst(f,"$"),[p,d]=h,g=d&&n(d),y=g&&g[0],v=parseInt(e.lastEventId),m=e.data,b=eventMessageType(p)||"ServerEventMessage",w={eventId:v,data:m,type:b,channel:s,selector:o,json:l,body:u,op:c,target:h[0],cssSelector:d,meta:{}},E="object"==typeof u?Object.assign({},w,u):w;if(t.validate&&!1===t.validate(w))return;let S=new Headers;if(S.set("Content-Type","text/plain"),"cmd"===c){if("onConnect"===p){this.connectionInfo=E,"string"==typeof u.heartbeatIntervalMs&&(this.connectionInfo.heartbeatIntervalMs=parseInt(u.heartbeatIntervalMs)),"string"==typeof u.idleTimeoutMs&&(this.connectionInfo.idleTimeoutMs=parseInt(u.idleTimeoutMs)),Object.assign(t,u);let e=t.handlers.onConnect;if(e&&(e.call(y||r.body,this.connectionInfo,w),this.stopped))return;t.heartbeatUrl&&(t.heartbeat&&clearInterval(t.heartbeat),t.heartbeat=setInterval(()=>{if(this.eventSource.readyState===EventSource.CLOSED){clearInterval(t.heartbeat);let e=t.handlers.onStop;null!=e&&e.apply(this.eventSource),this.reconnectServerEvents({error:Error("EventSource is CLOSED")});return}fetch(new Request(t.heartbeatUrl,{method:"POST",mode:"cors",headers:S,credentials:this.serviceClient.credentials})).then(e=>{if(!e.ok)throw Error(`${e.status} - ${e.statusText}`)}).catch(e=>this.reconnectServerEvents({error:e}))},this.connectionInfo&&this.connectionInfo.heartbeatIntervalMs||t.heartbeatIntervalMs||1e4)),t.unRegisterUrl&&"undefined"!=typeof window&&(window.onunload=()=>{navigator.sendBeacon?(this.stopped=!0,this.eventSource&&this.eventSource.close(),navigator.sendBeacon(t.unRegisterUrl)):this.stop()}),this.updateSubscriberUrl=t.updateSubscriberUrl,this.updateChannels((t.channels||"").split(","))}else{let e="onJoin"==p||"onLeave"==p||"onUpdate"==p,n=t.handlers[p];if(n)e?n.call(y||r.body,E):n.call(y||r.body,u,w);else if(!e){let e=t.receivers&&t.receivers.cmd;this.invokeReceiver(e,p,y,w,"cmd")}e&&(n=t.handlers.onCommand)&&n.call(y||r.body,E)}}else"trigger"===c?this.raiseEvent(f,w):"css"===c&&css(g||n("body"),p,u);let C=t.receivers&&t.receivers[c];if(this.invokeReceiver(C,p,y,w,c),!eventMessageType(p)){let e=t.handlers.onMessage;e&&e.call(y||r.body,E)}t.onTick&&t.onTick()},this.onError=e=>{if(this.stopped)return;e||(e=event);let t=this.options.onException;null!=t&&t.call(this.eventSource,e),this.options.onTick&&this.options.onTick()},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={})}getEventSourceOptions(){return{withCredentials:this.withCredentials}}reconnectServerEvents(e={}){if(this.stopped)return;e.error&&this.onError(e.error);let t=this.eventSource,r=e.url||this.eventStreamUri||t.url;null!=this.options.resolveStreamUrl&&(r=this.options.resolveStreamUrl(r));let n=this.EventSource?new this.EventSource(r,this.getEventSourceOptions()):new EventSource(r,this.getEventSourceOptions());n.addEventListener("error",r=>(e.onerror||t.onerror||this.onError)(r)),n.addEventListener("message",e.onmessage||t.onmessage||this.onMessage);let i=this.options.onReconnect;return null!=i&&i.call(n,e.error),t.removeEventListener&&(t.removeEventListener("error",this.onError),t.removeEventListener("message",this.onMessage)),t.close(),this.eventSource=n}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=this.EventSource?new this.EventSource(e,this.getEventSourceOptions()):new 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();let e=this.options;e&&e.heartbeat&&clearInterval(e.heartbeat);let t=this.connectionInfo;return null==t||null==t.unRegisterUrl?new Promise((e,t)=>e()):(this.connectionInfo=null,fetch(new Request(t.unRegisterUrl,{method:"POST",mode:"cors",credentials:this.serviceClient.credentials})).then(e=>{if(!e.ok)throw Error(`${e.status} - ${e.statusText}`)}).catch(this.onError))}invokeReceiver(e,t,r,n,i){if(e){if("function"==typeof e&&(e=this.resolver.tryResolve(e)),t=t.replace("-",""),e.client=this,e.request=n,"function"==typeof e[t])e[t].call(r||e,n.body,n);else if(t in e)e[t]=n.body;else{let i=Object.getOwnPropertyDescriptor(e,t);if(null!=i){i.set?i.set(n.body):i.writable&&(e[t]=n.body);return}let s=t.toLowerCase();getAllMembers(e).forEach(t=>{if(t.toLowerCase()==s){"function"==typeof e[t]?e[t].call(r||e,n.body,n):e[t]=n.body;return}});let o=e.noSuchMethod;"function"==typeof o&&o.call(r||e,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;let 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){let r="string"==typeof e?e.split(","):e,n="string"==typeof t?t.split(","):t,i=[];for(let e in this.channels){let t=this.channels[e];(null==n||-1===n.indexOf(t))&&i.push(t)}if(r)for(let e in r){let t=r[e];-1===i.indexOf(t)&&i.push(t)}this.updateChannels(i)}addListener(e,t){return(this.listeners[e]||(this.listeners[e]=[])).push(t),this}removeListener(e,t){let r=this.listeners[e];if(r){let e=r.indexOf(t);e>=0&&r.splice(e,1)}return this}raiseEvent(e,t){let r=this.listeners[e];r&&r.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(e){return null==e.id&&(e.id=this.getSubscriptionId()),this.serviceClient.post(e).then(t=>{this.update(e.subscribeChannels,e.unsubscribeChannels)}).catch(this.onError)}subscribeToChannels(...e){let t=new UpdateEventSubscriber;return t.id=this.getSubscriptionId(),t.subscribeChannels=e,this.serviceClient.post(t).then(t=>{this.update(e,null)}).catch(this.onError)}unsubscribeFromChannels(...e){let t=new UpdateEventSubscriber;return t.id=this.getSubscriptionId(),t.unsubscribeChannels=e,this.serviceClient.post(t).then(t=>{this.update(null,e)}).catch(this.onError)}getChannelSubscribers(){let 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){let t=e.channels,r=new ServerEventUser;for(let n in r.userId=e.userId,r.displayName=e.displayName,r.profileUrl=e.profileUrl,r.channels=t?t.split(","):null,e)"userId"!=n&&"displayName"!=n&&"profileUrl"!=n&&"channels"!=n&&(null==r.meta&&(r.meta={}),r.meta[n]=e[n]);return r}}function getAllMembers(e){let t=[];do{let r=Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e).map(e=>e.toString())).sort().filter((e,r,n)=>"constructor"!==e&&(0==r||e!==n[r-1])&&-1===t.indexOf(e));t=t.concat(r)}while((e=Object.getPrototypeOf(e))&&Object.getPrototypeOf(e));return t}exports.ServerEventsClient=ServerEventsClient,ServerEventsClient.UnknownChannel="*",exports.getAllMembers=getAllMembers;class ServerEventReceiver{noSuchMethod(e,t){}}exports.ServerEventReceiver=ServerEventReceiver;class UpdateEventSubscriber{createResponse(){return new UpdateEventSubscriberResponse}getTypeName(){return"UpdateEventSubscriber"}}exports.UpdateEventSubscriber=UpdateEventSubscriber;class UpdateEventSubscriberResponse{}exports.UpdateEventSubscriberResponse=UpdateEventSubscriberResponse;class GetEventSubscribers{createResponse(){return[]}getTypeName(){return"GetEventSubscribers"}}exports.GetEventSubscribers=GetEventSubscribers;class ServerEventUser{}exports.ServerEventUser=ServerEventUser;class HttpMethods{}exports.HttpMethods=HttpMethods,HttpMethods.Get="GET",HttpMethods.Post="POST",HttpMethods.Put="PUT",HttpMethods.Delete="DELETE",HttpMethods.Patch="PATCH",HttpMethods.Head="HEAD",HttpMethods.Options="OPTIONS",HttpMethods.hasRequestBody=e=>!("GET"===e||"DELETE"===e||"HEAD"===e||"OPTIONS"===e);class GetAccessToken{constructor(e){Object.assign(this,e)}createResponse(){return new GetAccessTokenResponse}getTypeName(){return"GetAccessToken"}getMethod(){return"POST"}}class GetAccessTokenResponse{}exports.GetAccessTokenResponse=GetAccessTokenResponse;class JsonServiceClient{constructor(e="/"){this.baseUrl=e,this.replyBaseUrl=combinePaths(e,"json","reply")+"/",this.oneWayBaseUrl=combinePaths(e,"json","oneway")+"/",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}setCredentials(e,t){this.userName=e,this.password=t}useBasePath(e){return this.basePath=e,this}set basePath(e){e?("/"!=e[0]&&(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){let r=combinePaths(this.oneWayBaseUrl,nameOf(e));return this.fetch(HttpMethods.Post,e,null,r)}sendAll(e){if(0==e.length)return Promise.resolve([]);let t=combinePaths(this.replyBaseUrl,nameOf(e[0])+"[]");return this.fetch(HttpMethods.Post,e,null,t)}sendAllOneWay(e){if(0==e.length)return Promise.resolve(void 0);let t=combinePaths(this.oneWayBaseUrl,nameOf(e[0])+"[]");return this.fetch(HttpMethods.Post,e,null,t).then(e=>void 0)}createUrlFromDto(e,t){let r=combinePaths(this.replyBaseUrl,nameOf(t)),n=HttpMethods.hasRequestBody(e);return n||(r=appendQueryString(r,t)),r}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:n,body:i}){if(r||(r=this.createUrlFromDto(e,t)),n&&(r=appendQueryString(r,n)),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){let e=Object.keys(this.cookies).map(e=>{let t=this.cookies[e];return t.expires&&t.expires!!e);e.length>0?this.headers.set("Cookie",e.join("; ")):this.headers.delete("Cookie")}let s=new Headers(this.headers),o=HttpMethods.hasRequestBody(e),a={url:r,method:e,mode:this.mode,credentials:this.credentials,headers:s,compress:!1};return o&&(a.body=i||JSON.stringify(t),isFormData(i)&&(a.body=sanitizeFormData(i),s.delete("Content-Type"))),null!=this.requestFilter&&this.requestFilter(a),null!=JsonServiceClient.globalRequestFilter&&JsonServiceClient.globalRequestFilter(a),a}json(e){return this.parseJson?this.parseJson(e):e.text().then(e=>e.length>0?JSON.parse(e):null)}applyResponseFilters(e){null!=this.responseFilter&&this.responseFilter(e),null!=JsonServiceClient.globalResponseFilter&&JsonServiceClient.globalResponseFilter(e)}createResponse(e,t){if(!e.ok)throw this.applyResponseFilters(e),e;if(this.manageCookies){let t=[];e.headers.forEach((e,r)=>{"set-cookie"===r.toLowerCase()&&e.split(",").forEach(e=>t.push(e))}),t.forEach(e=>{let t=parseCookie(e);t&&(this.cookies[t.name]=t)})}e.headers.forEach((e,t)=>{"x-cookies"===t.toLowerCase()&&e.split(",").indexOf("ss-reftok")>=0&&(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);let n=e.headers.get("content-type"),i=n&&-1!==n.indexOf("application/json");if(i)return this.json(e).then(e=>e);if("undefined"!=typeof Uint8Array&&r instanceof Uint8Array){if("function"!=typeof e.arrayBuffer)throw 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 Error("This fetch polyfill does not implement 'blob'");return e.blob().then(e=>e)}let s=e.headers.get("content-length");return"0"!==s&&(null!=s||i)?this.json(e).then(e=>e):r}handleError(e,t,r=null){if(t instanceof Error)throw this.raiseError(e,t);if(t.bodyUsed)throw this.raiseError(t,createErrorResponse(t.status,t.statusText,r));return void 0===t.json&&t.responseStatus?new Promise((e,r)=>r(this.raiseError(null,t))):this.json(t).then(e=>{let n=sanitize(e);if(!n.responseStatus)throw createErrorResponse(t.status,t.statusText,r);throw null!=r&&(n.type=r),n}).catch(e=>{if(e instanceof Error||"undefined"!=typeof window&&e instanceof window.DOMException)throw this.raiseError(t,createErrorResponse(t.status,t.statusText,r));throw this.raiseError(t,e)})}fetch(e,t,r,n){return this.sendRequest({method:e,request:t,args:r,url:n})}fetchBody(e,t,r,n){let i=combinePaths(this.replyBaseUrl,nameOf(t));return this.sendRequest({method:e,request:r,body:"string"==typeof r?r:isFormData(r)?r:JSON.stringify(r),url:appendQueryString(i,t),args:n,returns:t})}sendRequest(e){let t=this.createRequest(e),r=e.returns||e.request,n=null,i=()=>{let t=this.createRequest(e);return this.urlFilter&&this.urlFilter(t.url),fetch(t.url,t).then(e=>this.createResponse(e,r)).catch(e=>this.handleError(n,e))};return this.urlFilter&&this.urlFilter(t.url),fetch(t.url,t).then(e=>{n=e;let t=this.createResponse(e,r);return t}).catch(e=>{if(401===e.status){if(this.enableAutoRefreshToken&&(this.refreshToken||this.useTokenCookie||null!=this.cookies["ss-reftok"])){let e=new GetAccessToken({refreshToken:this.refreshToken,useTokenCookie:!!this.useTokenCookie}),t=this.refreshTokenUri||this.createUrlFromDto(HttpMethods.Post,e);this.useTokenCookie&&(this.bearerToken=null,this.headers.delete("Authorization"));let r=this.createRequest({method:HttpMethods.Post,request:e,args:null,url:t});return fetch(t,r).then(t=>this.createResponse(t,e).then(e=>(this.bearerToken=e.accessToken||null,i()))).catch(e=>this.onAuthenticationRequired?this.onAuthenticationRequired().then(i).catch(e=>this.handleError(n,e,"RefreshTokenException")):this.handleError(n,e,"RefreshTokenException"))}if(this.onAuthenticationRequired)return this.onAuthenticationRequired().then(i)}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})}api(e,t,r){return __awaiter(this,void 0,void 0,function*(){try{let n=yield this.fetch(getMethod(e,r),e,t);return new ApiResult({response:n})}catch(e){return new ApiResult({error:getResponseStatus(e)})}})}apiVoid(e,t,r){return __awaiter(this,void 0,void 0,function*(){try{let n=yield this.fetch(getMethod(e,r),e,t);return new ApiResult({response:null!=n?n:new EmptyResponse})}catch(e){return new ApiResult({error:getResponseStatus(e)})}})}apiForm(e,t,r,n){return __awaiter(this,void 0,void 0,function*(){try{let i=yield this.fetchBody(getMethod(e,n),e,t,r);return new ApiResult({response:i})}catch(e){return new ApiResult({error:getResponseStatus(e)})}})}apiFormVoid(e,t,r,n){return __awaiter(this,void 0,void 0,function*(){try{let i=yield this.fetchBody(getMethod(e,n),e,t,r);return new ApiResult({response:null!=i?i:new EmptyResponse})}catch(e){return new ApiResult({error:getResponseStatus(e)})}})}}function getMethod(e,t){return(null!=t?t:"function"==typeof e.getMethod)?e.getMethod():HttpMethods.Post}function getResponseStatus(e){var t,r;return null!==(r=null!==(t=e.responseStatus)&&void 0!==t?t:e.ResponseStatus)&&void 0!==r?r:e.errorCode?e:e.message?createErrorStatus(e.message,e.errorCode):null}exports.JsonServiceClient=JsonServiceClient,exports.getMethod=getMethod,exports.getResponseStatus=getResponseStatus;class ApiResult{constructor(e){Object.assign(this,e)}get completed(){return null!=this.response||null!=this.error}get failed(){var e,t;return(null===(e=this.error)||void 0===e?void 0:e.errorCode)!=null||(null===(t=this.error)||void 0===t?void 0:t.message)!=null}get succeeded(){return!this.failed&&null!=this.response}get errorMessage(){var e;return null===(e=this.error)||void 0===e?void 0:e.message}get errorCode(){var e;return null===(e=this.error)||void 0===e?void 0:e.errorCode}get errors(){var e,t;return null!==(t=null===(e=this.error)||void 0===e?void 0:e.errors)&&void 0!==t?t:[]}get errorSummary(){return null!=this.error&&0==this.errors.length?this.errorMessage:null}fieldError(e){var t;let r=e.toLowerCase();return null===(t=this.errors)||void 0===t?void 0:t.find(e=>e.fieldName.toLowerCase()==r)}fieldErrorMessage(e){var t;return null===(t=this.fieldError(e))||void 0===t?void 0:t.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()),r=t.find(e=>-1==t.indexOf(e.toLowerCase()));return null!=r?r:this.errorMessage}}addFieldError(e,t,r="Exception"){this.error||(this.error=new ResponseStatus);let n=this.fieldError(e);null!=n?(n.errorCode=r,n.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(e,t,r=null){let n=apply(new ErrorResponse,n=>{null!=r&&(n.type=r),n.responseStatus=apply(new ResponseStatus,r=>{r.errorCode=e&&e.toString(),r.message=t})});return n}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):e}function toPascalCase(e){return e?e.charAt(0).toUpperCase()+e.substring(1):e}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 sanitize(e){if(e.responseStatus||e.errors)return e;let t={};for(let r in e)e.hasOwnProperty(r)&&(e[r]instanceof Object?t[toCamelCase(r)]=sanitize(e[r]):t[toCamelCase(r)]=e[r]);if(t.errors=[],null!=e.Errors)for(let r=0,n=e.Errors.length;r=0?[e.substring(0,r),e.substring(r+1)]:[e]}function splitOnLast(e,t){if(!e)return[e];let r=e.lastIndexOf(t);return r>=0?[e.substring(0,r),e.substring(r+1)]:[e]}function leftPart(e,t){if(null==e)return null;let r=e.indexOf(t);return -1==r?e:e.substring(0,r)}function rightPart(e,t){if(null==e)return null;let r=e.indexOf(t);return -1==r?e:e.substring(r+t.length)}function lastLeftPart(e,t){if(null==e)return null;let r=e.lastIndexOf(t);return -1==r?e:e.substring(0,r)}function lastRightPart(e,t){if(null==e)return null;let r=e.lastIndexOf(t);return -1==r?e:e.substring(r+t.length)}function chop(e,t=1){return t=Math.abs(t),e?tr[t]=e[t]),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||e.indexOf(" ")>=0?e:splitCase(toPascalCase(e))}exports.ApiResult=ApiResult,exports.createErrorStatus=createErrorStatus,exports.createFieldError=createFieldError,exports.isFormData=isFormData,exports.createError=createError,exports.toCamelCase=toCamelCase,exports.toPascalCase=toPascalCase,exports.toKebabCase=toKebabCase,exports.map=map,exports.sanitize=sanitize,exports.nameOf=nameOf,exports.css=css,exports.splitOnFirst=splitOnFirst,exports.splitOnLast=splitOnLast,exports.leftPart=leftPart,exports.rightPart=rightPart,exports.lastLeftPart=lastLeftPart,exports.lastRightPart=lastRightPart,exports.chop=chop,exports.onlyProps=onlyProps,exports.humanize=humanize;let ucFirst=e=>e.charAt(0).toUpperCase()+e.substring(1);exports.ucFirst=ucFirst;let isUpper=e=>e>="A"&&e<="Z";exports.isUpper=isUpper;let isLower=e=>e>="a"&&e<="z";exports.isLower=isLower;let isDigit=e=>e>="0"&&e<="9";exports.isDigit=isDigit;let upperOrDigit=e=>(0,exports.isUpper)(e)||(0,exports.isDigit)(e);function splitTitleCase(e){let t=[];if("string"!=typeof e)return t;let r=0;for(let n=0;n0?e[n-1]:null,o=n+1!!e)}exports.splitTitleCase=splitTitleCase;let humanify=e=>!e||e.indexOf(" ")>=0?e:(0,exports.ucFirst)(splitTitleCase(e).join(" "));function queryString(e){if(!e||-1===e.indexOf("?"))return{};let t=splitOnFirst(e,"?")[1].split("&"),r={};for(let e=0;e1?decodeURIComponent(n[1].replace(/\+/g," ")):null}return r}function combinePaths(...e){let t=[],r,n;for(r=0,n=e.length;r0&&(i+="/"),i+=s}return i}function createUrl(e,t){return appendQueryString(createPath(e,t),t)}function appendQueryString(e,t){for(let r in t)if(t.hasOwnProperty(r)){let n=t[r];if(void 0===n)continue;e+=(e.indexOf("?")>=0?"&":"?")+r+"="+qsValue(n)}return e}function qsValue(e){return null==e?"":"undefined"!=typeof Uint8Array&&e instanceof Uint8Array?bytesToBase64(e):encodeURIComponent(e)||""}function bytesToBase64(e){let t=(3-e.length%3)%3,r="";for(let t,n=e.length,i=0,s=0;s>>t&24),(2===t||e.length-s==1)&&(r+=String.fromCharCode(uint6ToB64(i>>>18&63),uint6ToB64(i>>>12&63),uint6ToB64(i>>>6&63),uint6ToB64(63&i)),i=0);return 0===t?r:r.substring(0,r.length-t)+(1===t?"=":"==")}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(e){try{return decodeURIComponent(e)}catch(t){return e}}function parseCookie(e){if(!e)return null;let t=null,r=e.split(/; */);for(let e=0;e1?tryDecode(stripQuotes(n[1].trim())):null;if(0==e)t={name:i,value:s,path:"/"};else{let e=i.toLowerCase();"httponly"==e?t.httpOnly=!0:"secure"==e?t.secure=!0:"expires"==e?(t.expires=new Date(s),"Invalid Date"===t.expires.toString()&&(t.expires=new Date(s.replace(/-/g," ")))):t[i]=s}}return t}function normalizeKey(e){return e.toLowerCase().replace(/_/g,"")}function isArray(e){return"[object Array]"===Object.prototype.toString.call(e)}function normalize(e,t){if(isArray(e)){if(!t)return e;let r=[];for(let n=0;nnormalizeKey(e)===normalizeKey(t))[0]||""]}function parseResponseStatus(e,t=null){try{let t=JSON.parse(e);return sanitize(t.ResponseStatus||t.responseStatus)}catch(r){return{message:t||r.message||r,__error:{error:r,json:e}}}}function toFormData(e){if("undefined"==typeof window)return;let t=new FormData;for(let r in e)t.append(r,e[r]);return t}function toObject(e){let t={};if(!e)return t;if("object"!=typeof e)throw Error("keys must be an Array of object keys");let r=Array.prototype.slice.call(e);return r.forEach(e=>{this[e]&&(t[e]=this[e])}),t}function errorResponseSummary(){let e=this.responseStatus||this.ResponseStatus;if(null==e)return;let t=e.ErrorCode?sanitize(e):e;return t.errors&&0!=t.errors.length?void 0:t.message||t.errorCode}function errorResponseExcept(e){let t=this.responseStatus||this.ResponseStatus;if(null==t)return;let r=t.ErrorCode?sanitize(t):t,n=toVarNames(e);if(n&&!(null==r.errors||0==r.errors.length)){let e=n.map(e=>(e||"").toLowerCase());for(let t of r.errors)if(-1!==e.indexOf((t.fieldName||"").toLowerCase()))return;for(let t of r.errors)if(-1===e.indexOf((t.fieldName||"").toLowerCase()))return t.message||t.errorCode}return r.message||r.errorCode||void 0}function errorResponse(e){if(null==e)return errorResponseSummary.call(this);let t=this.responseStatus||this.ResponseStatus;if(null==t)return;let r=t.ErrorCode?sanitize(t):t;if(null==r.errors||0==r.errors.length)return;let n=r.errors.find(t=>(t.fieldName||"").toLowerCase()==e.toLowerCase());return n?n.message||n.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:new Date("/"==e[0]?parseFloat(/Date\(([^)]+)\)/.exec(e)[1]):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())+" "+(e.getHours()>12?"PM":"AM")}function toLocalISOString(e=new Date){return`${e.getFullYear()}-${padInt(e.getMonth()+1)}-${padInt(e.getDate())}T${padInt(e.getHours())}:${padInt(e.getMinutes())}:${padInt(e.getSeconds())}`}function bsAlert(e){return'
'+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,r){let n={className:"class",htmlFor:"for"},i=document.createElement(e);if(r)for(let e in r)sattr(i,n[e]||e,r[e]);return t&&t.insertAfter&&t.insertAfter.parentNode.insertBefore(i,t.insertAfter.nextSibling),i}function showInvalidInputs(){let e=attr(this,"data-invalid");if(e){let t="checkbox"===this.type||"radio"===this.type||hasClass(this,"form-check"),r=t?parent(this,"form-check"):null;t?addClass(r||this.parentElement,"is-invalid form-control"):addClass(this,"is-invalid");let n=this.nextElementSibling,i=n&&(attr(n,"for")===this.id||"SMALL"===n.tagName)?t?r||n.parentElement:n:this,s=null!=i&&i.nextElementSibling&&hasClass(i.nextElementSibling,"invalid-feedback")?i.nextElementSibling:createElement("div",{insertAfter:i},{className:"invalid-feedback"});s.innerHTML=e}}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):(" "+e.className+" ").replace(/[\n\t\r]/g," ").indexOf(" "+t+" ")>-1)}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 $1(e,t){return"string"==typeof e?(t||document).querySelector(e):e||null}function $$(e,t){return"string"==typeof e?Array.prototype.slice.call((t||document).querySelectorAll(e)):Array.isArray(e)?e:[e]}function on(e,t){$$(e).forEach(e=>{Object.keys(t).forEach(function(r){let n=t[r];"string"==typeof r&&"function"==typeof n&&e.addEventListener(r,n.bind(e))})})}function delaySet(e,t){let r=setTimeout(()=>e(!0),t&&t.duration||300);return()=>{clearTimeout(r),e(!1)}}function bootstrap(e){let t=(e||document).querySelectorAll("[data-invalid]");for(let e=0;e=0){let t=s.substring(0,o),r=s.substring(o+1),n=e[t];n&&n.apply(i,r.split(","))}else{let t=e[s];t&&t.apply(i,[].slice.call(arguments))}})}function bindHandlers(e,t=document,r=null){r&&r.events?r.events.forEach(r=>handleEvent(e,t,r)):["click","dblclick","change","focus","blur","focusin","focusout","select","keydown","keypress","keyup","hover","toggle","input"].forEach(r=>{t.querySelector(`[data-${r}]`)&&handleEvent(e,t,r)})}function bootstrapForm(e,t){e&&(t.model&&populateForm(e,t.model),e.onsubmit=function(r){return r.preventDefault(),t.type="bootstrap-v4",ajaxSubmit(e,t)})}function applyErrors(e,t,r){let n={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),!t)return;t=sanitize(t),addClass(e,"has-errors");let i=r&&"bootstrap-v4"===r.type,s=Object.assign(Object.assign({},n),r);r.messages&&(s.overrideMessages=!0);let o=s.errorFilter.bind(s),a=t.errors,l=e.querySelectorAll.bind(e);if(a&&a.length){let e={},r={};for(let t of(l("input,textarea,select,button").forEach(t=>{let n=t,s=n.previousElementSibling,o=n.nextElementSibling,a="radio"===n.type||"checkbox"===n.type,l=(a?null:n.id)||attr(n,"name");if(!l)return;let u=l.toLowerCase();e[u]=n,!i&&(hasClass(s,"help-inline")||hasClass(s,"help-block")?r[u]=s:(hasClass(o,"help-inline")||hasClass(o,"help-block"))&&(r[u]=o))}),l(".help-inline[data-for],.help-block[data-for]").forEach(e=>{let t=attr(e,"data-for").toLowerCase();r[t]=e}),a)){let n=(t.fieldName||"").toLowerCase(),s=e[n];if(s){if(i){let e=attr(s,"type"),r="radio"===e||"checkbox"===e;r||addClass(s,"is-invalid"),sattr(s,"data-invalid",o(t.message,t.errorCode,"field"))}else addClass(s,"error"),addClass(s.parentElement,"has-error")}let a=r[n];a&&(addClass(a,"error"),a.innerHTML=o(t.message,t.errorCode,"field"),a.style.display="block")}l("[data-validation-summary]").forEach(e=>{let r=attr(e,"data-validation-summary").split(","),n=errorResponseExcept.call(t,r);n&&(e.innerHTML=bsAlert(n))})}else{let e=o(t.message||splitCase(t.errorCode),t.errorCode,"summary");i?l("[data-validation-summary]").forEach(t=>t.innerHTML="<"===e[0]?e:bsAlert(e)):l(".error-summary").forEach(t=>{t.innerHTML=e(t).style.display="block"})}return e}function clearErrors(e){remClass(e,"has-errors");let t=e.querySelectorAll.bind(e);t(".error-summary").forEach(e=>{e.innerHTML="",e.style.display="none"}),t("[data-validation-summary]").forEach(e=>{e.innerHTML=""}),t(".error").forEach(e=>remClass(e,"error")),t(".form-check.is-invalid [data-invalid]").forEach(e=>{rattr(e,"data-invalid")}),t(".form-check.is-invalid").forEach(e=>remClass(e,"form-control")),t(".is-invalid").forEach(e=>{remClass(e,"is-invalid"),rattr(e,"data-invalid")}),t(".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 t;let r=this,n=attr(r,"enctype")||Types.UrlEncoded;if(n==Types.MultiPart&&void 0===window.FormData)throw Error(`FormData Type is needed to send '${Types.MultiPart}' Content Types`);try{t=serializeForm(r,n)}catch(e){throw Error(`${e.message||e}`)}let i=new Headers;i.set("Accept",Types.Json),i.set("Content-Type",n);let s={method:attr(r,"method")||"POST",credentials:"include",mode:"cors",headers:i,body:t};return e.requestFilter&&e.requestFilter(s),fetch(new Request(e.url||attr(r,"action"),s)).catch(e=>{throw 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 Error("The request failed with "+(t.statusText||t.status))}).then(e=>{throw Object.assign(new ErrorResponse,sanitize(e))}))}function handleHeaderBehaviors(e,t){let r=t.headers.get("X-Location");r&&(location.href=r);let n=t.headers.get("X-Trigger");if(n){let t=n.indexOf(":"),r=t>=0?n.substring(0,t):n,i=t>=0?n.substring(t+1):null;triggerEvent(e,r,i?[i]:[])}}function ajaxSubmit(e,t={}){let n=t.type,i="bootstrap-v4"===n;clearErrors(e);try{if(t.validate&&!1===t.validate.call(e))return!1}catch(e){return!1}let s=e.querySelectorAll.bind(e);addClass(e,"loading");let o=null==t.onSubmitDisable?"[type=submit]":t.onSubmitDisable,a=null!=o&&""!=o;function r(r,n=null){if(n)applyErrors(e,n.ResponseStatus||n.responseStatus,Object.assign({},t));else if(r){addClass(e,"has-errors");let t=s(".error-summary")[0];if(t&&(t.innerHTML=r),i){let e=s("[data-validation-summary]")[0];e&&(e.innerHTML=bsAlert(r))}}t.error&&t.error.call(e,n),i&&s("[data-invalid]").forEach(e=>showInvalidInputs.call(e))}a&&s(o).forEach(e=>{sattr(e,"disabled","disabled")});let l=t.submit||formSubmit;return l.call(e,t).then(r=>(t.success&&t.success.call(e,r),!1)).catch(e=>{e.responseStatus?r(null,e):r(`${e.message||e}`,null)}).finally(()=>{remClass(e,"loading"),a&&s(o).forEach(e=>{rattr(e,"disabled")}),t.complete&&t.complete.call(e)})}function fromResponse(e){let t=e.headers.get("content-type"),r=t&&-1!==t.indexOf(Types.Json);if(r)return e.json();let n=e.headers.get("content-length");return"0"!==n&&(null!=n||r)?e.json():null}function serializeForm(e,t=null){return t===Types.MultiPart?new FormData(e):t==Types.Json?JSON.stringify(serializeToObject(e)):serializeToUrlEncoded(e)}function formEntries(e,t,r){let n,i=e,s=i.elements.length;for(let e=0;e=0;s--)n.options[s].selected&&r(t,n.name,n.options[s].value);else("checkbox"!=n.type&&"radio"!=n.type||n.checked)&&r(t,n.name,n.value)}return t}function serializeToObject(e){return formEntries(e,{},(e,t,r)=>e[t]=r)}function serializeToUrlEncoded(e){let t=formEntries(e,[],(e,t,r)=>"string"==typeof r?e.push(encodeURIComponent(t)+"="+encodeURIComponent(r)):null);return t.join("&").replace(/%20/g,"+")}function serializeToFormData(e){return formEntries(e,new FormData,(e,t,r)=>e.append(t,r))}function sanitizeFormData(e){for(let[t,r]of e)"object"==typeof r&&0===r.size&&e.delete(t);return e}function triggerEvent(e,t,r=null){if(document.createEvent){let n=document.createEvent("click"==t||t.startsWith("mouse")?"MouseEvents":"HTMLEvents");n.initEvent(t,!0,!0),n.data=r,e.dispatchEvent(n)}else{let r=document.createEventObject();e.fireEvent("on"+t,r)}}function populateForm(e,t){if(!t)return;let r=e=>e?e[0]===e[0].toUpperCase()?toCamelCase(e):e[0]===e[0].toLowerCase()?toPascalCase(e):e:e;for(let n in t){let i=t[n];null==i&&(i="");let s=e.elements.namedItem(n)||e.elements.namedItem(r(n)),o=s;if(!s)continue;let a=o.type||s[0].type;switch(a){case"radio":case"checkbox":let l=s.length;for(let e=0;e-1;break;case"select-multiple":let u=isArray(i)?i:[i],c=s;for(let e=0;e-1;break;case"select":case"select-one":o.value=i.toString()||i;break;case"date":let f=toDate(i);f&&(o.value=f.toISOString().split("T")[0]);break;default:o.value=i}}}function trimEnd(e,t){let r=e.length;for(;r>0&&e[r-1]===t;)--r;return r=0&&(r[n]=e[n]);return r}function omit(e,t){let r={};for(let n in e)e.hasOwnProperty(n)&&0>t.indexOf(n)&&(r[n]=e[n]);return r}function apply(e,t){return t(e),e}function each(e,t,r){return e.reduce((e,r)=>(t(e,r),e),r||{})}function resolve(e,t){let r="function"==typeof e?e():e;return"function"==typeof t?t(r):r}function mapGet(e,t){if(!e||!t)return null;let r=e[t];if(r)return r;if("object"==typeof e){let r=t.toLowerCase(),n=Object.keys(e).find(e=>e.toLowerCase()===r);return n?e[n]:null}return null}function apiValue(e){return null==e?"":"string"==typeof e?"/Date("===e.substring(0,6)?toDate(e):e.trim():e}function apiValueFmt(e){let t=apiValue(e);return(null!=t?isDate(t)?dateFmt(t):t: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"]}function btnColorClass(e){for(let 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"]}function btnSizeClass(e){for(let t of bootstrapSizes())if(e[t])return"btn-"+t;return null}function btnClasses(e){let t=[],r=btnColorClass(e);r&&t.push(r);let n=btnSizeClass(e);return n&&t.push(n),e.block&&t.push("btn-block"),t}exports.humanify=humanify,exports.queryString=queryString,exports.combinePaths=combinePaths,exports.createPath=createPath,exports.createUrl=createUrl,exports.appendQueryString=appendQueryString,exports.bytesToBase64=bytesToBase64,JsonServiceClient.toBase64=e=>_btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(new Number("0x"+t).valueOf()))),exports.stripQuotes=stripQuotes,exports.tryDecode=tryDecode,exports.parseCookie=parseCookie,exports.normalizeKey=normalizeKey,exports.normalize=normalize,exports.getField=getField,exports.parseResponseStatus=parseResponseStatus,exports.toFormData=toFormData,exports.toObject=toObject,exports.errorResponseSummary=errorResponseSummary,exports.errorResponseExcept=errorResponseExcept,exports.errorResponse=errorResponse,exports.isDate=isDate,exports.toDate=toDate,exports.toDateFmt=toDateFmt,exports.padInt=padInt,exports.dateFmt=dateFmt,exports.dateFmtHM=dateFmtHM,exports.timeFmt12=timeFmt12,exports.toLocalISOString=toLocalISOString,exports.createElement=createElement,exports.$1=$1,exports.$$=$$,exports.on=on,exports.delaySet=delaySet,exports.bootstrap=bootstrap,"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;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null})),exports.bindHandlers=bindHandlers,exports.bootstrapForm=bootstrapForm,function(e){e.MultiPart="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Json="application/json"}(Types||(Types={})),exports.toVarNames=toVarNames,exports.formSubmit=formSubmit,exports.ajaxSubmit=ajaxSubmit,exports.serializeForm=serializeForm,exports.serializeToObject=serializeToObject,exports.serializeToUrlEncoded=serializeToUrlEncoded,exports.serializeToFormData=serializeToFormData,exports.sanitizeFormData=sanitizeFormData,exports.triggerEvent=triggerEvent,exports.populateForm=populateForm,exports.trimEnd=trimEnd,exports.safeVarName=safeVarName,exports.pick=pick,exports.omit=omit,exports.apply=apply,exports.each=each,exports.resolve=resolve,exports.mapGet=mapGet,exports.apiValue=apiValue,exports.apiValueFmt=apiValueFmt,exports.activeClassNav=activeClassNav,exports.activeClass=activeClass,exports.BootstrapColors=bootstrapColors(),exports.btnColorClass=btnColorClass,exports.BootstrapSizes=bootstrapSizes(),exports.btnSizeClass=btnSizeClass,exports.btnClasses=btnClasses;class NavDefaults{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&&0>t.indexOf(e.show)||null!=e.hide&&t.indexOf(e.hide)>=0)}}exports.NavDefaults=NavDefaults,NavDefaults.navClass="nav",NavDefaults.navItemClass="nav-item",NavDefaults.navLinkClass="nav-link",NavDefaults.childNavItemClass="nav-item dropdown",NavDefaults.childNavLinkClass="nav-link dropdown-toggle",NavDefaults.childNavMenuClass="dropdown-menu",NavDefaults.childNavMenuItemClass="dropdown-item";class NavLinkDefaults{static forNavLink(e){return e||NavDefaults.create()}}exports.NavLinkDefaults=NavLinkDefaults;class NavbarDefaults{static create(){return new NavOptions({navClass:NavbarDefaults.navClass})}static forNavbar(e){return NavDefaults.overrideDefaults(e,NavbarDefaults.create())}}exports.NavbarDefaults=NavbarDefaults,NavbarDefaults.navClass="navbar-nav";class NavButtonGroupDefaults{static create(){return new NavOptions({navClass:NavButtonGroupDefaults.navClass,navItemClass:NavButtonGroupDefaults.navItemClass})}static forNavButtonGroup(e){return NavDefaults.overrideDefaults(e,NavButtonGroupDefaults.create())}}exports.NavButtonGroupDefaults=NavButtonGroupDefaults,NavButtonGroupDefaults.navClass="btn-group",NavButtonGroupDefaults.navItemClass="btn btn-primary";class LinkButtonDefaults{static create(){return new NavOptions({navItemClass:LinkButtonDefaults.navItemClass})}static forLinkButton(e){return NavDefaults.overrideDefaults(e||null,LinkButtonDefaults.create())}}exports.LinkButtonDefaults=LinkButtonDefaults,LinkButtonDefaults.navItemClass="btn";class UserAttributes{static fromSession(e){let 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}}exports.UserAttributes=UserAttributes;class NavOptions{static fromSession(e,t){return(t=t||new NavOptions).attributes=UserAttributes.fromSession(e),t}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(...e){let t=[];for(let r=0;r=60?i%60:i,o=(i/=60)>=60?i%60:i,a=(i/=60)>=24?i%24:i,l=i/24,u=s+(r-n),c=t?"P":"";if(t){if((0|l)>0&&(c+=`${0|l}D`),0==l||a+o+s+u>0){if(c+="T",(0|a)>0&&(c+=`${0|a}H`),(0|o)>0&&(c+=`${0|o}M`),u>0){let e=u.toFixed(7);c+=`${e=trimEnd(trimEnd(e,"0"),".")}S`}else 2==c.length&&(c+="0S")}}else if((0|l)>0&&(c+=`${0|l}:`),c+=`${padInt(0|a)}:${padInt(0|o)}:`,u>0){let e=u.toFixed(7);e=trimEnd(trimEnd(e,"0"),"."),c+=u>=10?`${e}`:`0${e}`}else c+="00";return c}function toXsdDuration(e){return timeFmt(e,!0)}function toTimeSpanFmt(e){return timeFmt(e,!1)}function flatMap(e,t){return t.reduce((t,r)=>t.concat(e(r)),[])}function uniq(e){return Array.from(new Set(e)).sort((e,t)=>e>t?1:-1)}function enc(e){return null==e?null:"string"==typeof e?e.replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""):`${e}`}function htmlAttrs(e){let t=[];return Object.keys(e).forEach(r=>{t.length>0&&t.push(" "),t.push(r),t.push('="'),t.push(enc(e[r])),t.push('"')}),t.join("")}function indexOfAny(e,t){for(let r=0,n=t.length;r=0)return n}return -1}function isNullOrEmpty(e){return null==e||""===e}function fromDateTime(e){return toDate(e)}function toDateTime(e){return`/Date(${e.getTime()})/`}function fromTimeSpan(e){return e}function toTimeSpan(e){return e}function fromGuid(e){return e}function toGuid(e){return e}function fromByteArray(e){let t=_atob(e),r=t.length,n=new Uint8Array(r);for(let e=0;e=0?'"'+e+'"':e)}static encodeArray(e){let t,r=new StringBuffer;for(let n=0,i=e.length;n0&&r.append(","),r.append(JSV.stringify(t)));return`[${r.toString()}]`}static encodeObject(e){let t,r=new StringBuffer;for(let n in e)t=e[n],!e.hasOwnProperty(n)||isNullOrEmpty(t)||"function"==typeof t||(r.getLength()>0&&r.append(","),r.append(JSV.encodeString(n)),r.append(":"),r.append(JSV.stringify(t)));return`{${r.toString()}}`}static stringify(e){if(null==e)return null;let t=typeof e;if("function"===t||"symbol"===t)return null;if("object"===t){let t=e.constructor.toString().toLowerCase();return t.indexOf("string")>=0?JSV.encodeString(e):t.indexOf("boolean")>=0?e?"true":"false":t.indexOf("number")>=0?e:t.indexOf("date")>=0?JSV.encodeString(toLocalISOString(e)):t.indexOf("array")>=0?JSV.encodeArray(e):JSV.encodeObject(e)}switch(t){case"string":return JSV.encodeString(e);case"boolean":return e?"true":"false";default:return e}}}function uniqueKeys(e){let t=[];return e.forEach(e=>Object.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=" "){if(t<0)return"";e||(e="");let n=e.length,i=Math.floor(t/2-n/2),s=Math.abs(n%2-t%2);return r.repeat(i+1)+e+r.repeat(i+1+s)}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=" "){let n=`${e}`;return n.length<=t?"number"==typeof e?alignRight(n,t,r):alignLeft(n,t,r):n}function EventBus(){let{subscribe:e,publish:t}=createBus();this.subscribe=e,this.publish=t}function createBus(){let r={};function e(e,t){let n=Symbol("id");return r[e]||(r[e]={}),r[e][n]=t,{unsubscribe:function(){delete r[e][n],0===Object.getOwnPropertySymbols(r[e]).length&&delete r[e]}}}function t(e,t){r[e]&&Object.getOwnPropertySymbols(r[e]).forEach(n=>r[e][n](t))}return{subscribe:e,publish:t}}exports.JSV=JSV,JSV.ESCAPE_CHARS=['"',":",",","{","}","[","]","\r","\n"],exports.uniqueKeys=uniqueKeys,exports.alignLeft=alignLeft,exports.alignCenter=alignCenter,exports.alignRight=alignRight,exports.alignAuto=alignAuto,exports.EventBus=EventBus,exports.createBus=createBus;class Inspect{static vars(obj){let inspectVarsPath="object"==typeof process&&process.env.INSPECT_VARS;if(!inspectVarsPath||!obj)return;let R=null;try{let isNode="object"==typeof process&&"object"==typeof process.versions&&void 0!==process.versions.node;if(!isNode)return;R=eval("require")}catch(e){return}let fs=R("fs"),varsPath=inspectVarsPath.replace(/\\/g,"/");if(varsPath.indexOf("/")>=0){let dir=R("path").dirname(varsPath);fs.existsSync(dir)||fs.mkdirSync(dir)}fs.writeFileSync(varsPath,JSON.stringify(obj))}static dump(e){return JSON.stringify(e,null,4).replace(/"/g,"")}static printDump(e){console.log(Inspect.dump(e))}static dumpTable(e){let t=e,r=uniqueKeys(t),n={};r.forEach(e=>{let r=e.length;t.forEach(t=>{let n=t[e];if(null!=n){let e=`${n}`.length;e>r&&(r=e)}}),n[e]=r});let i=Object.keys(n).length,s=Object.keys(n).map(e=>n[e]).reduce((e,t)=>e+t,0)+2*i+(i+1),o=[];o.push(`+${"-".repeat(s-2)}+`);let a="|";return r.forEach(e=>a+=alignCenter(e,n[e])+"|"),o.push(a),o.push(`|${"-".repeat(s-2)}|`),t.forEach(e=>{let t="|";r.forEach(r=>t+=""+alignAuto(e[r],n[r])+"|"),o.push(t)}),o.push(`+${"-".repeat(s-2)}+`),o.join("\n")}static printDumpTable(e){console.log(Inspect.dumpTable(e))}}exports.Inspect=Inspect},3454:function(e,t,r){"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(7663)},6840:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(3847)}])},9285:function(e,t,r){"use strict";r.d(t,{GS:function(){return l},Lp:function(){return a},PD:function(){return p},Z5:function(){return o},m8:function(){return u},qD:function(){return f}});var n=r(5548),i=r(7294),s=r(9734);let o={signin:e=>e?"/signin?redirect=".concat(e):"/signin",forbidden:()=>"/forbidden"},a=new n.JsonServiceClient("https://$DEPLOY_API").apply(e=>{e.basePath="/api",e.headers=new Headers}),l=(0,i.createContext)({});function u(){let[e,t]=(0,i.useState)(),[r,s]=(0,i.useState)(!1),o=e=>{let{message:r,errorCode:i,fieldName:s,errors:o}=e;return null!=i||(i="Exception"),null!=o||(o=[]),t(new n.ResponseStatus(s?{errorCode:i,message:r,errors:[new n.ResponseError({fieldName:s,errorCode:i,message:r})]}:{errorCode:i,message:r,errors:o}))},l=t=>{let{fieldName:r,message:i,errorCode:s}=t;if(null!=s||(s="Exception"),e){var a;let t=new n.ResponseStatus(e);t.errors=[...(null!==(a=t.errors)&&void 0!==a?a:[]).filter(e=>e.fieldName.toLowerCase()!=r.toLowerCase()),new n.ResponseError({fieldName:r,message:i,errorCode:s})]}else o({fieldName:r,message:i,errorCode:s})};async function u(e,r,n){s(!0);let i=await a.api(e);return s(!1),t(i.error),i}async function c(e,r,n){s(!0);let i=await a.apiVoid(e);return s(!1),t(i.error),i}return{loading:r,error:e,setError:o,addFieldError:l,api:u,apiVoid:c}}let c={};function f(){let e=async e=>{if(c.metadata&&!e)return;let t=await fetch((0,n.combinePaths)(a.baseUrl,"/types/metadata.json"));if(t.ok){let e=await t.text();c.metadata=JSON.parse(e)}else c.error=(0,n.createErrorStatus)(t.statusText)},t=e=>{var t,r;return null===(t=c.metadata)||void 0===t?void 0:null===(r=t.types)||void 0===r?void 0:r.find(t=>{var r;return(null===(r=t.name)||void 0===r?void 0:r.toLowerCase())==e.toLowerCase()})},r=e=>{let r={},n=t(e);if(n&&n.isEnum&&null!=n.enumNames)for(let e=0;e{let t=e();return(0,n.appendQueryString)("SwrClient:".concat((0,n.nameOf)(t)),t)},t=>this.client.get(e()))}constructor(e){this.client=e}}let p=new h(a)},3847:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return o}});var n=r(5893);r(953),r(8098);var i=r(9285),s=r(7294);function o(e){let{Component:t,pageProps:r}=e;return(0,s.useEffect)(()=>{(async()=>(0,i.qD)().load())()},[]),(0,n.jsx)(t,{...r})}},1876:function(e){var t="/";!function(){var r={675:function(e,t){"use strict";t.byteLength=u,t.toByteArray=f,t.fromByteArray=d;for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function u(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n}function c(e,t,r){return(t+r)*3/4-r}function f(e){var t,r,s=l(e),o=s[0],a=s[1],u=new i(c(e,o,a)),f=0,h=a>0?o-4:o;for(r=0;r>16&255,u[f++]=t>>8&255,u[f++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[f++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t),u}function h(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function p(e,t,r){for(var n=[],i=t;il?l:a+o));return 1===i?s.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&s.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},72:function(e,t,r){"use strict";/*! +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{5548:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var ReadyState,Types,Buffer=__webpack_require__(1876).Buffer,process=__webpack_require__(3454),__awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){e.done?r(e.value):i(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.lastRightPart=exports.lastLeftPart=exports.rightPart=exports.leftPart=exports.splitOnLast=exports.splitOnFirst=exports.css=exports.nameOf=exports.sanitize=exports.map=exports.toKebabCase=exports.toPascalCase=exports.toCamelCase=exports.createError=exports.isFormData=exports.createFieldError=exports.createErrorStatus=exports.ApiResult=exports.getResponseStatus=exports.getMethod=exports.JsonServiceClient=exports.GetAccessTokenResponse=exports.HttpMethods=exports.ServerEventUser=exports.GetEventSubscribers=exports.UpdateEventSubscriberResponse=exports.UpdateEventSubscriber=exports.ServerEventReceiver=exports.getAllMembers=exports.ServerEventsClient=exports.ReadyState=exports.SingletonInstanceResolver=exports.NewInstanceResolver=exports.MetadataType=exports.MetadataPropertyType=exports.MetadataAttribute=exports.MetadataDataMember=exports.MetadataDataContract=exports.MetadataTypeName=exports.MetadataTypes=exports.MetadataOperationType=exports.MetadataRoute=exports.MetadataTypesConfig=exports.GetNavItemsResponse=exports.GetNavItems=exports.NavItem=exports.EmptyResponse=exports.ErrorResponse=exports.ResponseError=exports.ResponseStatus=void 0,exports.serializeToFormData=exports.serializeToUrlEncoded=exports.serializeToObject=exports.serializeForm=exports.ajaxSubmit=exports.formSubmit=exports.toVarNames=exports.bootstrapForm=exports.bindHandlers=exports.bootstrap=exports.delaySet=exports.on=exports.$$=exports.$1=exports.createElement=exports.toLocalISOString=exports.timeFmt12=exports.dateFmtHM=exports.dateFmt=exports.padInt=exports.toDateFmt=exports.toDate=exports.isDate=exports.errorResponse=exports.errorResponseExcept=exports.errorResponseSummary=exports.toObject=exports.toFormData=exports.parseResponseStatus=exports.getField=exports.normalize=exports.normalizeKey=exports.parseCookie=exports.tryDecode=exports.stripQuotes=exports.bytesToBase64=exports.appendQueryString=exports.createUrl=exports.createPath=exports.combinePaths=exports.queryString=exports.humanify=exports.splitTitleCase=exports.isDigit=exports.isLower=exports.isUpper=exports.ucFirst=exports.humanize=exports.onlyProps=exports.chop=void 0,exports.alignLeft=exports.uniqueKeys=exports.JSV=exports.StringBuffer=exports.toBase64String=exports.toByteArray=exports.fromByteArray=exports.toGuid=exports.fromGuid=exports.toTimeSpan=exports.fromTimeSpan=exports.toDateTime=exports.fromDateTime=exports.isNullOrEmpty=exports.indexOfAny=exports.htmlAttrs=exports.enc=exports.uniq=exports.flatMap=exports.toTimeSpanFmt=exports.toXsdDuration=exports.fromXsdDuration=exports.classNames=exports.NavOptions=exports.UserAttributes=exports.LinkButtonDefaults=exports.NavButtonGroupDefaults=exports.NavbarDefaults=exports.NavLinkDefaults=exports.NavDefaults=exports.btnClasses=exports.btnSizeClass=exports.BootstrapSizes=exports.btnColorClass=exports.BootstrapColors=exports.activeClass=exports.activeClassNav=exports.apiValueFmt=exports.apiValue=exports.mapGet=exports.resolve=exports.each=exports.apply=exports.omit=exports.pick=exports.safeVarName=exports.trimEnd=exports.populateForm=exports.triggerEvent=exports.sanitizeFormData=void 0,exports.Inspect=exports.createBus=exports.EventBus=exports.alignAuto=exports.alignRight=exports.alignCenter=void 0;class ResponseStatus{constructor(e){Object.assign(this,e)}}exports.ResponseStatus=ResponseStatus;class ResponseError{constructor(e){Object.assign(this,e)}}exports.ResponseError=ResponseError;class ErrorResponse{constructor(e){Object.assign(this,e)}}exports.ErrorResponse=ErrorResponse;class EmptyResponse{constructor(e){Object.assign(this,e)}}exports.EmptyResponse=EmptyResponse;class NavItem{constructor(e){Object.assign(this,e)}}exports.NavItem=NavItem;class GetNavItems{constructor(e){Object.assign(this,e)}createResponse(){return new GetNavItemsResponse}getTypeName(){return"GetNavItems"}getMethod(){return"GET"}}exports.GetNavItems=GetNavItems;class GetNavItemsResponse{constructor(e){Object.assign(this,e)}}exports.GetNavItemsResponse=GetNavItemsResponse;class MetadataTypesConfig{constructor(e){Object.assign(this,e)}}exports.MetadataTypesConfig=MetadataTypesConfig;class MetadataRoute{constructor(e){Object.assign(this,e)}}exports.MetadataRoute=MetadataRoute;class MetadataOperationType{constructor(e){Object.assign(this,e)}}exports.MetadataOperationType=MetadataOperationType;class MetadataTypes{constructor(e){Object.assign(this,e)}}exports.MetadataTypes=MetadataTypes;class MetadataTypeName{constructor(e){Object.assign(this,e)}}exports.MetadataTypeName=MetadataTypeName;class MetadataDataContract{constructor(e){Object.assign(this,e)}}exports.MetadataDataContract=MetadataDataContract;class MetadataDataMember{constructor(e){Object.assign(this,e)}}exports.MetadataDataMember=MetadataDataMember;class MetadataAttribute{constructor(e){Object.assign(this,e)}}exports.MetadataAttribute=MetadataAttribute;class MetadataPropertyType{constructor(e){Object.assign(this,e)}}exports.MetadataPropertyType=MetadataPropertyType;class MetadataType{constructor(e){Object.assign(this,e)}}exports.MetadataType=MetadataType;class NewInstanceResolver{tryResolve(e){return new e}}exports.NewInstanceResolver=NewInstanceResolver;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}exports.SingletonInstanceResolver=SingletonInstanceResolver,function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSED=2]="CLOSED"}(ReadyState=exports.ReadyState||(exports.ReadyState={}));class ServerEventsClient{constructor(e,t,r={},n=null){if(this.channels=t,this.options=r,this.eventSource=n,this.onMessage=e=>{if("undefined"==typeof document){let t=e.data?e.data.indexOf("\n"):-1;if(t>=0){let r=e.data,n=e.lastEventId,i=Object.assign({},{lastEventId:n,data:r.substring(0,t)}),s=Object.assign({},{lastEventId:n,data:r.substring(t+1)});this._onMessage(i),this._onMessage(s);return}}this._onMessage(e)},this._onMessage=e=>{if(this.stopped)return;let t=this.options;if(void 0===r)var r={querySelectorAll:e=>[]};let n=r.querySelectorAll.bind(r),i=splitOnFirst(e.data," "),s=null,o=i[0],a=splitOnFirst(o,"@");a.length>1&&(s=a[0],o=a[1]);let l=i[1],u=null;try{u=l?JSON.parse(l):null}catch(e){}if((i=splitOnFirst(o,".")).length<=1)throw"invalid selector format: "+o;let c=i[0],f=i[1].replace(/%20/g," "),h=splitOnFirst(f,"$"),[p,d]=h,g=d&&n(d),y=g&&g[0],v=parseInt(e.lastEventId),m=e.data,b=eventMessageType(p)||"ServerEventMessage",w={eventId:v,data:m,type:b,channel:s,selector:o,json:l,body:u,op:c,target:h[0],cssSelector:d,meta:{}},E="object"==typeof u?Object.assign({},w,u):w;if(t.validate&&!1===t.validate(w))return;let S=new Headers;if(S.set("Content-Type","text/plain"),"cmd"===c){if("onConnect"===p){this.connectionInfo=E,"string"==typeof u.heartbeatIntervalMs&&(this.connectionInfo.heartbeatIntervalMs=parseInt(u.heartbeatIntervalMs)),"string"==typeof u.idleTimeoutMs&&(this.connectionInfo.idleTimeoutMs=parseInt(u.idleTimeoutMs)),Object.assign(t,u);let e=t.handlers.onConnect;if(e&&(e.call(y||r.body,this.connectionInfo,w),this.stopped))return;t.heartbeatUrl&&(t.heartbeat&&clearInterval(t.heartbeat),t.heartbeat=setInterval(()=>{if(this.eventSource.readyState===EventSource.CLOSED){clearInterval(t.heartbeat);let e=t.handlers.onStop;null!=e&&e.apply(this.eventSource),this.reconnectServerEvents({error:Error("EventSource is CLOSED")});return}fetch(new Request(t.heartbeatUrl,{method:"POST",mode:"cors",headers:S,credentials:this.serviceClient.credentials})).then(e=>{if(!e.ok)throw Error(`${e.status} - ${e.statusText}`)}).catch(e=>this.reconnectServerEvents({error:e}))},this.connectionInfo&&this.connectionInfo.heartbeatIntervalMs||t.heartbeatIntervalMs||1e4)),t.unRegisterUrl&&"undefined"!=typeof window&&(window.onunload=()=>{navigator.sendBeacon?(this.stopped=!0,this.eventSource&&this.eventSource.close(),navigator.sendBeacon(t.unRegisterUrl)):this.stop()}),this.updateSubscriberUrl=t.updateSubscriberUrl,this.updateChannels((t.channels||"").split(","))}else{let e="onJoin"==p||"onLeave"==p||"onUpdate"==p,n=t.handlers[p];if(n)e?n.call(y||r.body,E):n.call(y||r.body,u,w);else if(!e){let e=t.receivers&&t.receivers.cmd;this.invokeReceiver(e,p,y,w,"cmd")}e&&(n=t.handlers.onCommand)&&n.call(y||r.body,E)}}else"trigger"===c?this.raiseEvent(f,w):"css"===c&&css(g||n("body"),p,u);let C=t.receivers&&t.receivers[c];if(this.invokeReceiver(C,p,y,w,c),!eventMessageType(p)){let e=t.handlers.onMessage;e&&e.call(y||r.body,E)}t.onTick&&t.onTick()},this.onError=e=>{if(this.stopped)return;e||(e=event);let t=this.options.onException;null!=t&&t.call(this.eventSource,e),this.options.onTick&&this.options.onTick()},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={})}getEventSourceOptions(){return{withCredentials:this.withCredentials}}reconnectServerEvents(e={}){if(this.stopped)return;e.error&&this.onError(e.error);let t=this.eventSource,r=e.url||this.eventStreamUri||t.url;null!=this.options.resolveStreamUrl&&(r=this.options.resolveStreamUrl(r));let n=this.EventSource?new this.EventSource(r,this.getEventSourceOptions()):new EventSource(r,this.getEventSourceOptions());n.addEventListener("error",r=>(e.onerror||t.onerror||this.onError)(r)),n.addEventListener("message",e.onmessage||t.onmessage||this.onMessage);let i=this.options.onReconnect;return null!=i&&i.call(n,e.error),t.removeEventListener&&(t.removeEventListener("error",this.onError),t.removeEventListener("message",this.onMessage)),t.close(),this.eventSource=n}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=this.EventSource?new this.EventSource(e,this.getEventSourceOptions()):new 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();let e=this.options;e&&e.heartbeat&&clearInterval(e.heartbeat);let t=this.connectionInfo;return null==t||null==t.unRegisterUrl?new Promise((e,t)=>e()):(this.connectionInfo=null,fetch(new Request(t.unRegisterUrl,{method:"POST",mode:"cors",credentials:this.serviceClient.credentials})).then(e=>{if(!e.ok)throw Error(`${e.status} - ${e.statusText}`)}).catch(this.onError))}invokeReceiver(e,t,r,n,i){if(e){if("function"==typeof e&&(e=this.resolver.tryResolve(e)),t=t.replace("-",""),e.client=this,e.request=n,"function"==typeof e[t])e[t].call(r||e,n.body,n);else if(t in e)e[t]=n.body;else{let i=Object.getOwnPropertyDescriptor(e,t);if(null!=i){i.set?i.set(n.body):i.writable&&(e[t]=n.body);return}let s=t.toLowerCase();getAllMembers(e).forEach(t=>{if(t.toLowerCase()==s){"function"==typeof e[t]?e[t].call(r||e,n.body,n):e[t]=n.body;return}});let o=e.noSuchMethod;"function"==typeof o&&o.call(r||e,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;let 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){let r="string"==typeof e?e.split(","):e,n="string"==typeof t?t.split(","):t,i=[];for(let e in this.channels){let t=this.channels[e];(null==n||-1===n.indexOf(t))&&i.push(t)}if(r)for(let e in r){let t=r[e];-1===i.indexOf(t)&&i.push(t)}this.updateChannels(i)}addListener(e,t){return(this.listeners[e]||(this.listeners[e]=[])).push(t),this}removeListener(e,t){let r=this.listeners[e];if(r){let e=r.indexOf(t);e>=0&&r.splice(e,1)}return this}raiseEvent(e,t){let r=this.listeners[e];r&&r.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(e){return null==e.id&&(e.id=this.getSubscriptionId()),this.serviceClient.post(e).then(t=>{this.update(e.subscribeChannels,e.unsubscribeChannels)}).catch(this.onError)}subscribeToChannels(...e){let t=new UpdateEventSubscriber;return t.id=this.getSubscriptionId(),t.subscribeChannels=e,this.serviceClient.post(t).then(t=>{this.update(e,null)}).catch(this.onError)}unsubscribeFromChannels(...e){let t=new UpdateEventSubscriber;return t.id=this.getSubscriptionId(),t.unsubscribeChannels=e,this.serviceClient.post(t).then(t=>{this.update(null,e)}).catch(this.onError)}getChannelSubscribers(){let 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){let t=e.channels,r=new ServerEventUser;for(let n in r.userId=e.userId,r.displayName=e.displayName,r.profileUrl=e.profileUrl,r.channels=t?t.split(","):null,e)"userId"!=n&&"displayName"!=n&&"profileUrl"!=n&&"channels"!=n&&(null==r.meta&&(r.meta={}),r.meta[n]=e[n]);return r}}function getAllMembers(e){let t=[];do{let r=Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e).map(e=>e.toString())).sort().filter((e,r,n)=>"constructor"!==e&&(0==r||e!==n[r-1])&&-1===t.indexOf(e));t=t.concat(r)}while((e=Object.getPrototypeOf(e))&&Object.getPrototypeOf(e));return t}exports.ServerEventsClient=ServerEventsClient,ServerEventsClient.UnknownChannel="*",exports.getAllMembers=getAllMembers;class ServerEventReceiver{noSuchMethod(e,t){}}exports.ServerEventReceiver=ServerEventReceiver;class UpdateEventSubscriber{createResponse(){return new UpdateEventSubscriberResponse}getTypeName(){return"UpdateEventSubscriber"}}exports.UpdateEventSubscriber=UpdateEventSubscriber;class UpdateEventSubscriberResponse{}exports.UpdateEventSubscriberResponse=UpdateEventSubscriberResponse;class GetEventSubscribers{createResponse(){return[]}getTypeName(){return"GetEventSubscribers"}}exports.GetEventSubscribers=GetEventSubscribers;class ServerEventUser{}exports.ServerEventUser=ServerEventUser;class HttpMethods{}exports.HttpMethods=HttpMethods,HttpMethods.Get="GET",HttpMethods.Post="POST",HttpMethods.Put="PUT",HttpMethods.Delete="DELETE",HttpMethods.Patch="PATCH",HttpMethods.Head="HEAD",HttpMethods.Options="OPTIONS",HttpMethods.hasRequestBody=e=>!("GET"===e||"DELETE"===e||"HEAD"===e||"OPTIONS"===e);class GetAccessToken{constructor(e){Object.assign(this,e)}createResponse(){return new GetAccessTokenResponse}getTypeName(){return"GetAccessToken"}getMethod(){return"POST"}}class GetAccessTokenResponse{}exports.GetAccessTokenResponse=GetAccessTokenResponse;class JsonServiceClient{constructor(e="/"){this.baseUrl=e,this.replyBaseUrl=combinePaths(e,"json","reply")+"/",this.oneWayBaseUrl=combinePaths(e,"json","oneway")+"/",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}setCredentials(e,t){this.userName=e,this.password=t}useBasePath(e){return this.basePath=e,this}set basePath(e){e?("/"!=e[0]&&(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){let r=combinePaths(this.oneWayBaseUrl,nameOf(e));return this.fetch(HttpMethods.Post,e,null,r)}sendAll(e){if(0==e.length)return Promise.resolve([]);let t=combinePaths(this.replyBaseUrl,nameOf(e[0])+"[]");return this.fetch(HttpMethods.Post,e,null,t)}sendAllOneWay(e){if(0==e.length)return Promise.resolve(void 0);let t=combinePaths(this.oneWayBaseUrl,nameOf(e[0])+"[]");return this.fetch(HttpMethods.Post,e,null,t).then(e=>void 0)}createUrlFromDto(e,t){let r=combinePaths(this.replyBaseUrl,nameOf(t)),n=HttpMethods.hasRequestBody(e);return n||(r=appendQueryString(r,t)),r}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:n,body:i}){if(r||(r=this.createUrlFromDto(e,t)),n&&(r=appendQueryString(r,n)),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){let e=Object.keys(this.cookies).map(e=>{let t=this.cookies[e];return t.expires&&t.expires!!e);e.length>0?this.headers.set("Cookie",e.join("; ")):this.headers.delete("Cookie")}let s=new Headers(this.headers),o=HttpMethods.hasRequestBody(e),a={url:r,method:e,mode:this.mode,credentials:this.credentials,headers:s,compress:!1};return o&&(a.body=i||JSON.stringify(t),isFormData(i)&&(a.body=sanitizeFormData(i),s.delete("Content-Type"))),null!=this.requestFilter&&this.requestFilter(a),null!=JsonServiceClient.globalRequestFilter&&JsonServiceClient.globalRequestFilter(a),a}json(e){return this.parseJson?this.parseJson(e):e.text().then(e=>e.length>0?JSON.parse(e):null)}applyResponseFilters(e){null!=this.responseFilter&&this.responseFilter(e),null!=JsonServiceClient.globalResponseFilter&&JsonServiceClient.globalResponseFilter(e)}createResponse(e,t){if(!e.ok)throw this.applyResponseFilters(e),e;if(this.manageCookies){let t=[];e.headers.forEach((e,r)=>{"set-cookie"===r.toLowerCase()&&e.split(",").forEach(e=>t.push(e))}),t.forEach(e=>{let t=parseCookie(e);t&&(this.cookies[t.name]=t)})}e.headers.forEach((e,t)=>{"x-cookies"===t.toLowerCase()&&e.split(",").indexOf("ss-reftok")>=0&&(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);let n=e.headers.get("content-type"),i=n&&-1!==n.indexOf("application/json");if(i)return this.json(e).then(e=>e);if("undefined"!=typeof Uint8Array&&r instanceof Uint8Array){if("function"!=typeof e.arrayBuffer)throw 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 Error("This fetch polyfill does not implement 'blob'");return e.blob().then(e=>e)}let s=e.headers.get("content-length");return"0"!==s&&(null!=s||i)?this.json(e).then(e=>e):r}handleError(e,t,r=null){if(t instanceof Error)throw this.raiseError(e,t);if(t.bodyUsed)throw this.raiseError(t,createErrorResponse(t.status,t.statusText,r));return void 0===t.json&&t.responseStatus?new Promise((e,r)=>r(this.raiseError(null,t))):this.json(t).then(e=>{let n=sanitize(e);if(!n.responseStatus)throw createErrorResponse(t.status,t.statusText,r);throw null!=r&&(n.type=r),n}).catch(e=>{if(e instanceof Error||"undefined"!=typeof window&&e instanceof window.DOMException)throw this.raiseError(t,createErrorResponse(t.status,t.statusText,r));throw this.raiseError(t,e)})}fetch(e,t,r,n){return this.sendRequest({method:e,request:t,args:r,url:n})}fetchBody(e,t,r,n){let i=combinePaths(this.replyBaseUrl,nameOf(t));return this.sendRequest({method:e,request:r,body:"string"==typeof r?r:isFormData(r)?r:JSON.stringify(r),url:appendQueryString(i,t),args:n,returns:t})}sendRequest(e){let t=this.createRequest(e),r=e.returns||e.request,n=null,i=()=>{let t=this.createRequest(e);return this.urlFilter&&this.urlFilter(t.url),fetch(t.url,t).then(e=>this.createResponse(e,r)).catch(e=>this.handleError(n,e))};return this.urlFilter&&this.urlFilter(t.url),fetch(t.url,t).then(e=>{n=e;let t=this.createResponse(e,r);return t}).catch(e=>{if(401===e.status){if(this.enableAutoRefreshToken&&(this.refreshToken||this.useTokenCookie||null!=this.cookies["ss-reftok"])){let e=new GetAccessToken({refreshToken:this.refreshToken,useTokenCookie:!!this.useTokenCookie}),t=this.refreshTokenUri||this.createUrlFromDto(HttpMethods.Post,e);this.useTokenCookie&&(this.bearerToken=null,this.headers.delete("Authorization"));let r=this.createRequest({method:HttpMethods.Post,request:e,args:null,url:t});return fetch(t,r).then(t=>this.createResponse(t,e).then(e=>(this.bearerToken=e.accessToken||null,i()))).catch(e=>this.onAuthenticationRequired?this.onAuthenticationRequired().then(i).catch(e=>this.handleError(n,e,"RefreshTokenException")):this.handleError(n,e,"RefreshTokenException"))}if(this.onAuthenticationRequired)return this.onAuthenticationRequired().then(i)}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})}api(e,t,r){return __awaiter(this,void 0,void 0,function*(){try{let n=yield this.fetch(getMethod(e,r),e,t);return new ApiResult({response:n})}catch(e){return new ApiResult({error:getResponseStatus(e)})}})}apiVoid(e,t,r){return __awaiter(this,void 0,void 0,function*(){try{let n=yield this.fetch(getMethod(e,r),e,t);return new ApiResult({response:null!=n?n:new EmptyResponse})}catch(e){return new ApiResult({error:getResponseStatus(e)})}})}apiForm(e,t,r,n){return __awaiter(this,void 0,void 0,function*(){try{let i=yield this.fetchBody(getMethod(e,n),e,t,r);return new ApiResult({response:i})}catch(e){return new ApiResult({error:getResponseStatus(e)})}})}apiFormVoid(e,t,r,n){return __awaiter(this,void 0,void 0,function*(){try{let i=yield this.fetchBody(getMethod(e,n),e,t,r);return new ApiResult({response:null!=i?i:new EmptyResponse})}catch(e){return new ApiResult({error:getResponseStatus(e)})}})}}function getMethod(e,t){return(null!=t?t:"function"==typeof e.getMethod)?e.getMethod():HttpMethods.Post}function getResponseStatus(e){var t,r;return null!==(r=null!==(t=e.responseStatus)&&void 0!==t?t:e.ResponseStatus)&&void 0!==r?r:e.errorCode?e:e.message?createErrorStatus(e.message,e.errorCode):null}exports.JsonServiceClient=JsonServiceClient,exports.getMethod=getMethod,exports.getResponseStatus=getResponseStatus;class ApiResult{constructor(e){Object.assign(this,e)}get completed(){return null!=this.response||null!=this.error}get failed(){var e,t;return(null===(e=this.error)||void 0===e?void 0:e.errorCode)!=null||(null===(t=this.error)||void 0===t?void 0:t.message)!=null}get succeeded(){return!this.failed&&null!=this.response}get errorMessage(){var e;return null===(e=this.error)||void 0===e?void 0:e.message}get errorCode(){var e;return null===(e=this.error)||void 0===e?void 0:e.errorCode}get errors(){var e,t;return null!==(t=null===(e=this.error)||void 0===e?void 0:e.errors)&&void 0!==t?t:[]}get errorSummary(){return null!=this.error&&0==this.errors.length?this.errorMessage:null}fieldError(e){var t;let r=e.toLowerCase();return null===(t=this.errors)||void 0===t?void 0:t.find(e=>e.fieldName.toLowerCase()==r)}fieldErrorMessage(e){var t;return null===(t=this.fieldError(e))||void 0===t?void 0:t.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()),r=t.find(e=>-1==t.indexOf(e.toLowerCase()));return null!=r?r:this.errorMessage}}addFieldError(e,t,r="Exception"){this.error||(this.error=new ResponseStatus);let n=this.fieldError(e);null!=n?(n.errorCode=r,n.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(e,t,r=null){let n=apply(new ErrorResponse,n=>{null!=r&&(n.type=r),n.responseStatus=apply(new ResponseStatus,r=>{r.errorCode=e&&e.toString(),r.message=t})});return n}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):e}function toPascalCase(e){return e?e.charAt(0).toUpperCase()+e.substring(1):e}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 sanitize(e){if(e.responseStatus||e.errors)return e;let t={};for(let r in e)e.hasOwnProperty(r)&&(e[r]instanceof Object?t[toCamelCase(r)]=sanitize(e[r]):t[toCamelCase(r)]=e[r]);if(t.errors=[],null!=e.Errors)for(let r=0,n=e.Errors.length;r=0?[e.substring(0,r),e.substring(r+1)]:[e]}function splitOnLast(e,t){if(!e)return[e];let r=e.lastIndexOf(t);return r>=0?[e.substring(0,r),e.substring(r+1)]:[e]}function leftPart(e,t){if(null==e)return null;let r=e.indexOf(t);return -1==r?e:e.substring(0,r)}function rightPart(e,t){if(null==e)return null;let r=e.indexOf(t);return -1==r?e:e.substring(r+t.length)}function lastLeftPart(e,t){if(null==e)return null;let r=e.lastIndexOf(t);return -1==r?e:e.substring(0,r)}function lastRightPart(e,t){if(null==e)return null;let r=e.lastIndexOf(t);return -1==r?e:e.substring(r+t.length)}function chop(e,t=1){return t=Math.abs(t),e?tr[t]=e[t]),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||e.indexOf(" ")>=0?e:splitCase(toPascalCase(e))}exports.ApiResult=ApiResult,exports.createErrorStatus=createErrorStatus,exports.createFieldError=createFieldError,exports.isFormData=isFormData,exports.createError=createError,exports.toCamelCase=toCamelCase,exports.toPascalCase=toPascalCase,exports.toKebabCase=toKebabCase,exports.map=map,exports.sanitize=sanitize,exports.nameOf=nameOf,exports.css=css,exports.splitOnFirst=splitOnFirst,exports.splitOnLast=splitOnLast,exports.leftPart=leftPart,exports.rightPart=rightPart,exports.lastLeftPart=lastLeftPart,exports.lastRightPart=lastRightPart,exports.chop=chop,exports.onlyProps=onlyProps,exports.humanize=humanize;let ucFirst=e=>e.charAt(0).toUpperCase()+e.substring(1);exports.ucFirst=ucFirst;let isUpper=e=>e>="A"&&e<="Z";exports.isUpper=isUpper;let isLower=e=>e>="a"&&e<="z";exports.isLower=isLower;let isDigit=e=>e>="0"&&e<="9";exports.isDigit=isDigit;let upperOrDigit=e=>(0,exports.isUpper)(e)||(0,exports.isDigit)(e);function splitTitleCase(e){let t=[];if("string"!=typeof e)return t;let r=0;for(let n=0;n0?e[n-1]:null,o=n+1!!e)}exports.splitTitleCase=splitTitleCase;let humanify=e=>!e||e.indexOf(" ")>=0?e:(0,exports.ucFirst)(splitTitleCase(e).join(" "));function queryString(e){if(!e||-1===e.indexOf("?"))return{};let t=splitOnFirst(e,"?")[1].split("&"),r={};for(let e=0;e1?decodeURIComponent(n[1].replace(/\+/g," ")):null}return r}function combinePaths(...e){let t=[],r,n;for(r=0,n=e.length;r0&&(i+="/"),i+=s}return i}function createUrl(e,t){return appendQueryString(createPath(e,t),t)}function appendQueryString(e,t){for(let r in t)if(t.hasOwnProperty(r)){let n=t[r];if(void 0===n)continue;e+=(e.indexOf("?")>=0?"&":"?")+r+"="+qsValue(n)}return e}function qsValue(e){return null==e?"":"undefined"!=typeof Uint8Array&&e instanceof Uint8Array?bytesToBase64(e):encodeURIComponent(e)||""}function bytesToBase64(e){let t=(3-e.length%3)%3,r="";for(let t,n=e.length,i=0,s=0;s>>t&24),(2===t||e.length-s==1)&&(r+=String.fromCharCode(uint6ToB64(i>>>18&63),uint6ToB64(i>>>12&63),uint6ToB64(i>>>6&63),uint6ToB64(63&i)),i=0);return 0===t?r:r.substring(0,r.length-t)+(1===t?"=":"==")}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(e){try{return decodeURIComponent(e)}catch(t){return e}}function parseCookie(e){if(!e)return null;let t=null,r=e.split(/; */);for(let e=0;e1?tryDecode(stripQuotes(n[1].trim())):null;if(0==e)t={name:i,value:s,path:"/"};else{let e=i.toLowerCase();"httponly"==e?t.httpOnly=!0:"secure"==e?t.secure=!0:"expires"==e?(t.expires=new Date(s),"Invalid Date"===t.expires.toString()&&(t.expires=new Date(s.replace(/-/g," ")))):t[i]=s}}return t}function normalizeKey(e){return e.toLowerCase().replace(/_/g,"")}function isArray(e){return"[object Array]"===Object.prototype.toString.call(e)}function normalize(e,t){if(isArray(e)){if(!t)return e;let r=[];for(let n=0;nnormalizeKey(e)===normalizeKey(t))[0]||""]}function parseResponseStatus(e,t=null){try{let t=JSON.parse(e);return sanitize(t.ResponseStatus||t.responseStatus)}catch(r){return{message:t||r.message||r,__error:{error:r,json:e}}}}function toFormData(e){if("undefined"==typeof window)return;let t=new FormData;for(let r in e)t.append(r,e[r]);return t}function toObject(e){let t={};if(!e)return t;if("object"!=typeof e)throw Error("keys must be an Array of object keys");let r=Array.prototype.slice.call(e);return r.forEach(e=>{this[e]&&(t[e]=this[e])}),t}function errorResponseSummary(){let e=this.responseStatus||this.ResponseStatus;if(null==e)return;let t=e.ErrorCode?sanitize(e):e;return t.errors&&0!=t.errors.length?void 0:t.message||t.errorCode}function errorResponseExcept(e){let t=this.responseStatus||this.ResponseStatus;if(null==t)return;let r=t.ErrorCode?sanitize(t):t,n=toVarNames(e);if(n&&!(null==r.errors||0==r.errors.length)){let e=n.map(e=>(e||"").toLowerCase());for(let t of r.errors)if(-1!==e.indexOf((t.fieldName||"").toLowerCase()))return;for(let t of r.errors)if(-1===e.indexOf((t.fieldName||"").toLowerCase()))return t.message||t.errorCode}return r.message||r.errorCode||void 0}function errorResponse(e){if(null==e)return errorResponseSummary.call(this);let t=this.responseStatus||this.ResponseStatus;if(null==t)return;let r=t.ErrorCode?sanitize(t):t;if(null==r.errors||0==r.errors.length)return;let n=r.errors.find(t=>(t.fieldName||"").toLowerCase()==e.toLowerCase());return n?n.message||n.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:new Date("/"==e[0]?parseFloat(/Date\(([^)]+)\)/.exec(e)[1]):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())+" "+(e.getHours()>12?"PM":"AM")}function toLocalISOString(e=new Date){return`${e.getFullYear()}-${padInt(e.getMonth()+1)}-${padInt(e.getDate())}T${padInt(e.getHours())}:${padInt(e.getMinutes())}:${padInt(e.getSeconds())}`}function bsAlert(e){return'
'+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,r){let n={className:"class",htmlFor:"for"},i=document.createElement(e);if(r)for(let e in r)sattr(i,n[e]||e,r[e]);return t&&t.insertAfter&&t.insertAfter.parentNode.insertBefore(i,t.insertAfter.nextSibling),i}function showInvalidInputs(){let e=attr(this,"data-invalid");if(e){let t="checkbox"===this.type||"radio"===this.type||hasClass(this,"form-check"),r=t?parent(this,"form-check"):null;t?addClass(r||this.parentElement,"is-invalid form-control"):addClass(this,"is-invalid");let n=this.nextElementSibling,i=n&&(attr(n,"for")===this.id||"SMALL"===n.tagName)?t?r||n.parentElement:n:this,s=null!=i&&i.nextElementSibling&&hasClass(i.nextElementSibling,"invalid-feedback")?i.nextElementSibling:createElement("div",{insertAfter:i},{className:"invalid-feedback"});s.innerHTML=e}}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):(" "+e.className+" ").replace(/[\n\t\r]/g," ").indexOf(" "+t+" ")>-1)}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 $1(e,t){return"string"==typeof e?(t||document).querySelector(e):e||null}function $$(e,t){return"string"==typeof e?Array.prototype.slice.call((t||document).querySelectorAll(e)):Array.isArray(e)?e:[e]}function on(e,t){$$(e).forEach(e=>{Object.keys(t).forEach(function(r){let n=t[r];"string"==typeof r&&"function"==typeof n&&e.addEventListener(r,n.bind(e))})})}function delaySet(e,t){let r=setTimeout(()=>e(!0),t&&t.duration||300);return()=>{clearTimeout(r),e(!1)}}function bootstrap(e){let t=(e||document).querySelectorAll("[data-invalid]");for(let e=0;e=0){let t=s.substring(0,o),r=s.substring(o+1),n=e[t];n&&n.apply(i,r.split(","))}else{let t=e[s];t&&t.apply(i,[].slice.call(arguments))}})}function bindHandlers(e,t=document,r=null){r&&r.events?r.events.forEach(r=>handleEvent(e,t,r)):["click","dblclick","change","focus","blur","focusin","focusout","select","keydown","keypress","keyup","hover","toggle","input"].forEach(r=>{t.querySelector(`[data-${r}]`)&&handleEvent(e,t,r)})}function bootstrapForm(e,t){e&&(t.model&&populateForm(e,t.model),e.onsubmit=function(r){return r.preventDefault(),t.type="bootstrap-v4",ajaxSubmit(e,t)})}function applyErrors(e,t,r){let n={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),!t)return;t=sanitize(t),addClass(e,"has-errors");let i=r&&"bootstrap-v4"===r.type,s=Object.assign(Object.assign({},n),r);r.messages&&(s.overrideMessages=!0);let o=s.errorFilter.bind(s),a=t.errors,l=e.querySelectorAll.bind(e);if(a&&a.length){let e={},r={};for(let t of(l("input,textarea,select,button").forEach(t=>{let n=t,s=n.previousElementSibling,o=n.nextElementSibling,a="radio"===n.type||"checkbox"===n.type,l=(a?null:n.id)||attr(n,"name");if(!l)return;let u=l.toLowerCase();e[u]=n,!i&&(hasClass(s,"help-inline")||hasClass(s,"help-block")?r[u]=s:(hasClass(o,"help-inline")||hasClass(o,"help-block"))&&(r[u]=o))}),l(".help-inline[data-for],.help-block[data-for]").forEach(e=>{let t=attr(e,"data-for").toLowerCase();r[t]=e}),a)){let n=(t.fieldName||"").toLowerCase(),s=e[n];if(s){if(i){let e=attr(s,"type"),r="radio"===e||"checkbox"===e;r||addClass(s,"is-invalid"),sattr(s,"data-invalid",o(t.message,t.errorCode,"field"))}else addClass(s,"error"),addClass(s.parentElement,"has-error")}let a=r[n];a&&(addClass(a,"error"),a.innerHTML=o(t.message,t.errorCode,"field"),a.style.display="block")}l("[data-validation-summary]").forEach(e=>{let r=attr(e,"data-validation-summary").split(","),n=errorResponseExcept.call(t,r);n&&(e.innerHTML=bsAlert(n))})}else{let e=o(t.message||splitCase(t.errorCode),t.errorCode,"summary");i?l("[data-validation-summary]").forEach(t=>t.innerHTML="<"===e[0]?e:bsAlert(e)):l(".error-summary").forEach(t=>{t.innerHTML=e(t).style.display="block"})}return e}function clearErrors(e){remClass(e,"has-errors");let t=e.querySelectorAll.bind(e);t(".error-summary").forEach(e=>{e.innerHTML="",e.style.display="none"}),t("[data-validation-summary]").forEach(e=>{e.innerHTML=""}),t(".error").forEach(e=>remClass(e,"error")),t(".form-check.is-invalid [data-invalid]").forEach(e=>{rattr(e,"data-invalid")}),t(".form-check.is-invalid").forEach(e=>remClass(e,"form-control")),t(".is-invalid").forEach(e=>{remClass(e,"is-invalid"),rattr(e,"data-invalid")}),t(".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 t;let r=this,n=attr(r,"enctype")||Types.UrlEncoded;if(n==Types.MultiPart&&void 0===window.FormData)throw Error(`FormData Type is needed to send '${Types.MultiPart}' Content Types`);try{t=serializeForm(r,n)}catch(e){throw Error(`${e.message||e}`)}let i=new Headers;i.set("Accept",Types.Json),i.set("Content-Type",n);let s={method:attr(r,"method")||"POST",credentials:"include",mode:"cors",headers:i,body:t};return e.requestFilter&&e.requestFilter(s),fetch(new Request(e.url||attr(r,"action"),s)).catch(e=>{throw 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 Error("The request failed with "+(t.statusText||t.status))}).then(e=>{throw Object.assign(new ErrorResponse,sanitize(e))}))}function handleHeaderBehaviors(e,t){let r=t.headers.get("X-Location");r&&(location.href=r);let n=t.headers.get("X-Trigger");if(n){let t=n.indexOf(":"),r=t>=0?n.substring(0,t):n,i=t>=0?n.substring(t+1):null;triggerEvent(e,r,i?[i]:[])}}function ajaxSubmit(e,t={}){let n=t.type,i="bootstrap-v4"===n;clearErrors(e);try{if(t.validate&&!1===t.validate.call(e))return!1}catch(e){return!1}let s=e.querySelectorAll.bind(e);addClass(e,"loading");let o=null==t.onSubmitDisable?"[type=submit]":t.onSubmitDisable,a=null!=o&&""!=o;function r(r,n=null){if(n)applyErrors(e,n.ResponseStatus||n.responseStatus,Object.assign({},t));else if(r){addClass(e,"has-errors");let t=s(".error-summary")[0];if(t&&(t.innerHTML=r),i){let e=s("[data-validation-summary]")[0];e&&(e.innerHTML=bsAlert(r))}}t.error&&t.error.call(e,n),i&&s("[data-invalid]").forEach(e=>showInvalidInputs.call(e))}a&&s(o).forEach(e=>{sattr(e,"disabled","disabled")});let l=t.submit||formSubmit;return l.call(e,t).then(r=>(t.success&&t.success.call(e,r),!1)).catch(e=>{e.responseStatus?r(null,e):r(`${e.message||e}`,null)}).finally(()=>{remClass(e,"loading"),a&&s(o).forEach(e=>{rattr(e,"disabled")}),t.complete&&t.complete.call(e)})}function fromResponse(e){let t=e.headers.get("content-type"),r=t&&-1!==t.indexOf(Types.Json);if(r)return e.json();let n=e.headers.get("content-length");return"0"!==n&&(null!=n||r)?e.json():null}function serializeForm(e,t=null){return t===Types.MultiPart?new FormData(e):t==Types.Json?JSON.stringify(serializeToObject(e)):serializeToUrlEncoded(e)}function formEntries(e,t,r){let n,i=e,s=i.elements.length;for(let e=0;e=0;s--)n.options[s].selected&&r(t,n.name,n.options[s].value);else("checkbox"!=n.type&&"radio"!=n.type||n.checked)&&r(t,n.name,n.value)}return t}function serializeToObject(e){return formEntries(e,{},(e,t,r)=>e[t]=r)}function serializeToUrlEncoded(e){let t=formEntries(e,[],(e,t,r)=>"string"==typeof r?e.push(encodeURIComponent(t)+"="+encodeURIComponent(r)):null);return t.join("&").replace(/%20/g,"+")}function serializeToFormData(e){return formEntries(e,new FormData,(e,t,r)=>e.append(t,r))}function sanitizeFormData(e){for(let[t,r]of e)"object"==typeof r&&0===r.size&&e.delete(t);return e}function triggerEvent(e,t,r=null){if(document.createEvent){let n=document.createEvent("click"==t||t.startsWith("mouse")?"MouseEvents":"HTMLEvents");n.initEvent(t,!0,!0),n.data=r,e.dispatchEvent(n)}else{let r=document.createEventObject();e.fireEvent("on"+t,r)}}function populateForm(e,t){if(!t)return;let r=e=>e?e[0]===e[0].toUpperCase()?toCamelCase(e):e[0]===e[0].toLowerCase()?toPascalCase(e):e:e;for(let n in t){let i=t[n];null==i&&(i="");let s=e.elements.namedItem(n)||e.elements.namedItem(r(n)),o=s;if(!s)continue;let a=o.type||s[0].type;switch(a){case"radio":case"checkbox":let l=s.length;for(let e=0;e-1;break;case"select-multiple":let u=isArray(i)?i:[i],c=s;for(let e=0;e-1;break;case"select":case"select-one":o.value=i.toString()||i;break;case"date":let f=toDate(i);f&&(o.value=f.toISOString().split("T")[0]);break;default:o.value=i}}}function trimEnd(e,t){let r=e.length;for(;r>0&&e[r-1]===t;)--r;return r=0&&(r[n]=e[n]);return r}function omit(e,t){let r={};for(let n in e)e.hasOwnProperty(n)&&0>t.indexOf(n)&&(r[n]=e[n]);return r}function apply(e,t){return t(e),e}function each(e,t,r){return e.reduce((e,r)=>(t(e,r),e),r||{})}function resolve(e,t){let r="function"==typeof e?e():e;return"function"==typeof t?t(r):r}function mapGet(e,t){if(!e||!t)return null;let r=e[t];if(r)return r;if("object"==typeof e){let r=t.toLowerCase(),n=Object.keys(e).find(e=>e.toLowerCase()===r);return n?e[n]:null}return null}function apiValue(e){return null==e?"":"string"==typeof e?"/Date("===e.substring(0,6)?toDate(e):e.trim():e}function apiValueFmt(e){let t=apiValue(e);return(null!=t?isDate(t)?dateFmt(t):t: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"]}function btnColorClass(e){for(let 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"]}function btnSizeClass(e){for(let t of bootstrapSizes())if(e[t])return"btn-"+t;return null}function btnClasses(e){let t=[],r=btnColorClass(e);r&&t.push(r);let n=btnSizeClass(e);return n&&t.push(n),e.block&&t.push("btn-block"),t}exports.humanify=humanify,exports.queryString=queryString,exports.combinePaths=combinePaths,exports.createPath=createPath,exports.createUrl=createUrl,exports.appendQueryString=appendQueryString,exports.bytesToBase64=bytesToBase64,JsonServiceClient.toBase64=e=>_btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(new Number("0x"+t).valueOf()))),exports.stripQuotes=stripQuotes,exports.tryDecode=tryDecode,exports.parseCookie=parseCookie,exports.normalizeKey=normalizeKey,exports.normalize=normalize,exports.getField=getField,exports.parseResponseStatus=parseResponseStatus,exports.toFormData=toFormData,exports.toObject=toObject,exports.errorResponseSummary=errorResponseSummary,exports.errorResponseExcept=errorResponseExcept,exports.errorResponse=errorResponse,exports.isDate=isDate,exports.toDate=toDate,exports.toDateFmt=toDateFmt,exports.padInt=padInt,exports.dateFmt=dateFmt,exports.dateFmtHM=dateFmtHM,exports.timeFmt12=timeFmt12,exports.toLocalISOString=toLocalISOString,exports.createElement=createElement,exports.$1=$1,exports.$$=$$,exports.on=on,exports.delaySet=delaySet,exports.bootstrap=bootstrap,"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;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null})),exports.bindHandlers=bindHandlers,exports.bootstrapForm=bootstrapForm,function(e){e.MultiPart="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Json="application/json"}(Types||(Types={})),exports.toVarNames=toVarNames,exports.formSubmit=formSubmit,exports.ajaxSubmit=ajaxSubmit,exports.serializeForm=serializeForm,exports.serializeToObject=serializeToObject,exports.serializeToUrlEncoded=serializeToUrlEncoded,exports.serializeToFormData=serializeToFormData,exports.sanitizeFormData=sanitizeFormData,exports.triggerEvent=triggerEvent,exports.populateForm=populateForm,exports.trimEnd=trimEnd,exports.safeVarName=safeVarName,exports.pick=pick,exports.omit=omit,exports.apply=apply,exports.each=each,exports.resolve=resolve,exports.mapGet=mapGet,exports.apiValue=apiValue,exports.apiValueFmt=apiValueFmt,exports.activeClassNav=activeClassNav,exports.activeClass=activeClass,exports.BootstrapColors=bootstrapColors(),exports.btnColorClass=btnColorClass,exports.BootstrapSizes=bootstrapSizes(),exports.btnSizeClass=btnSizeClass,exports.btnClasses=btnClasses;class NavDefaults{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&&0>t.indexOf(e.show)||null!=e.hide&&t.indexOf(e.hide)>=0)}}exports.NavDefaults=NavDefaults,NavDefaults.navClass="nav",NavDefaults.navItemClass="nav-item",NavDefaults.navLinkClass="nav-link",NavDefaults.childNavItemClass="nav-item dropdown",NavDefaults.childNavLinkClass="nav-link dropdown-toggle",NavDefaults.childNavMenuClass="dropdown-menu",NavDefaults.childNavMenuItemClass="dropdown-item";class NavLinkDefaults{static forNavLink(e){return e||NavDefaults.create()}}exports.NavLinkDefaults=NavLinkDefaults;class NavbarDefaults{static create(){return new NavOptions({navClass:NavbarDefaults.navClass})}static forNavbar(e){return NavDefaults.overrideDefaults(e,NavbarDefaults.create())}}exports.NavbarDefaults=NavbarDefaults,NavbarDefaults.navClass="navbar-nav";class NavButtonGroupDefaults{static create(){return new NavOptions({navClass:NavButtonGroupDefaults.navClass,navItemClass:NavButtonGroupDefaults.navItemClass})}static forNavButtonGroup(e){return NavDefaults.overrideDefaults(e,NavButtonGroupDefaults.create())}}exports.NavButtonGroupDefaults=NavButtonGroupDefaults,NavButtonGroupDefaults.navClass="btn-group",NavButtonGroupDefaults.navItemClass="btn btn-primary";class LinkButtonDefaults{static create(){return new NavOptions({navItemClass:LinkButtonDefaults.navItemClass})}static forLinkButton(e){return NavDefaults.overrideDefaults(e||null,LinkButtonDefaults.create())}}exports.LinkButtonDefaults=LinkButtonDefaults,LinkButtonDefaults.navItemClass="btn";class UserAttributes{static fromSession(e){let 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}}exports.UserAttributes=UserAttributes;class NavOptions{static fromSession(e,t){return(t=t||new NavOptions).attributes=UserAttributes.fromSession(e),t}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(...e){let t=[];for(let r=0;r=60?i%60:i,o=(i/=60)>=60?i%60:i,a=(i/=60)>=24?i%24:i,l=i/24,u=s+(r-n),c=t?"P":"";if(t){if((0|l)>0&&(c+=`${0|l}D`),0==l||a+o+s+u>0){if(c+="T",(0|a)>0&&(c+=`${0|a}H`),(0|o)>0&&(c+=`${0|o}M`),u>0){let e=u.toFixed(7);c+=`${e=trimEnd(trimEnd(e,"0"),".")}S`}else 2==c.length&&(c+="0S")}}else if((0|l)>0&&(c+=`${0|l}:`),c+=`${padInt(0|a)}:${padInt(0|o)}:`,u>0){let e=u.toFixed(7);e=trimEnd(trimEnd(e,"0"),"."),c+=u>=10?`${e}`:`0${e}`}else c+="00";return c}function toXsdDuration(e){return timeFmt(e,!0)}function toTimeSpanFmt(e){return timeFmt(e,!1)}function flatMap(e,t){return t.reduce((t,r)=>t.concat(e(r)),[])}function uniq(e){return Array.from(new Set(e)).sort((e,t)=>e>t?1:-1)}function enc(e){return null==e?null:"string"==typeof e?e.replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""):`${e}`}function htmlAttrs(e){let t=[];return Object.keys(e).forEach(r=>{t.length>0&&t.push(" "),t.push(r),t.push('="'),t.push(enc(e[r])),t.push('"')}),t.join("")}function indexOfAny(e,t){for(let r=0,n=t.length;r=0)return n}return -1}function isNullOrEmpty(e){return null==e||""===e}function fromDateTime(e){return toDate(e)}function toDateTime(e){return`/Date(${e.getTime()})/`}function fromTimeSpan(e){return e}function toTimeSpan(e){return e}function fromGuid(e){return e}function toGuid(e){return e}function fromByteArray(e){let t=_atob(e),r=t.length,n=new Uint8Array(r);for(let e=0;e=0?'"'+e+'"':e)}static encodeArray(e){let t,r=new StringBuffer;for(let n=0,i=e.length;n0&&r.append(","),r.append(JSV.stringify(t)));return`[${r.toString()}]`}static encodeObject(e){let t,r=new StringBuffer;for(let n in e)t=e[n],!e.hasOwnProperty(n)||isNullOrEmpty(t)||"function"==typeof t||(r.getLength()>0&&r.append(","),r.append(JSV.encodeString(n)),r.append(":"),r.append(JSV.stringify(t)));return`{${r.toString()}}`}static stringify(e){if(null==e)return null;let t=typeof e;if("function"===t||"symbol"===t)return null;if("object"===t){let t=e.constructor.toString().toLowerCase();return t.indexOf("string")>=0?JSV.encodeString(e):t.indexOf("boolean")>=0?e?"true":"false":t.indexOf("number")>=0?e:t.indexOf("date")>=0?JSV.encodeString(toLocalISOString(e)):t.indexOf("array")>=0?JSV.encodeArray(e):JSV.encodeObject(e)}switch(t){case"string":return JSV.encodeString(e);case"boolean":return e?"true":"false";default:return e}}}function uniqueKeys(e){let t=[];return e.forEach(e=>Object.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=" "){if(t<0)return"";e||(e="");let n=e.length,i=Math.floor(t/2-n/2),s=Math.abs(n%2-t%2);return r.repeat(i+1)+e+r.repeat(i+1+s)}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=" "){let n=`${e}`;return n.length<=t?"number"==typeof e?alignRight(n,t,r):alignLeft(n,t,r):n}function EventBus(){let{subscribe:e,publish:t}=createBus();this.subscribe=e,this.publish=t}function createBus(){let r={};function e(e,t){let n=Symbol("id");return r[e]||(r[e]={}),r[e][n]=t,{unsubscribe:function(){delete r[e][n],0===Object.getOwnPropertySymbols(r[e]).length&&delete r[e]}}}function t(e,t){r[e]&&Object.getOwnPropertySymbols(r[e]).forEach(n=>r[e][n](t))}return{subscribe:e,publish:t}}exports.JSV=JSV,JSV.ESCAPE_CHARS=['"',":",",","{","}","[","]","\r","\n"],exports.uniqueKeys=uniqueKeys,exports.alignLeft=alignLeft,exports.alignCenter=alignCenter,exports.alignRight=alignRight,exports.alignAuto=alignAuto,exports.EventBus=EventBus,exports.createBus=createBus;class Inspect{static vars(obj){let inspectVarsPath="object"==typeof process&&process.env.INSPECT_VARS;if(!inspectVarsPath||!obj)return;let R=null;try{let isNode="object"==typeof process&&"object"==typeof process.versions&&void 0!==process.versions.node;if(!isNode)return;R=eval("require")}catch(e){return}let fs=R("fs"),varsPath=inspectVarsPath.replace(/\\/g,"/");if(varsPath.indexOf("/")>=0){let dir=R("path").dirname(varsPath);fs.existsSync(dir)||fs.mkdirSync(dir)}fs.writeFileSync(varsPath,JSON.stringify(obj))}static dump(e){return JSON.stringify(e,null,4).replace(/"/g,"")}static printDump(e){console.log(Inspect.dump(e))}static dumpTable(e){let t=e,r=uniqueKeys(t),n={};r.forEach(e=>{let r=e.length;t.forEach(t=>{let n=t[e];if(null!=n){let e=`${n}`.length;e>r&&(r=e)}}),n[e]=r});let i=Object.keys(n).length,s=Object.keys(n).map(e=>n[e]).reduce((e,t)=>e+t,0)+2*i+(i+1),o=[];o.push(`+${"-".repeat(s-2)}+`);let a="|";return r.forEach(e=>a+=alignCenter(e,n[e])+"|"),o.push(a),o.push(`|${"-".repeat(s-2)}|`),t.forEach(e=>{let t="|";r.forEach(r=>t+=""+alignAuto(e[r],n[r])+"|"),o.push(t)}),o.push(`+${"-".repeat(s-2)}+`),o.join("\n")}static printDumpTable(e){console.log(Inspect.dumpTable(e))}}exports.Inspect=Inspect},3454:function(e,t,r){"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(7663)},6840:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(3847)}])},9285:function(e,t,r){"use strict";r.d(t,{GS:function(){return l},Lp:function(){return a},PD:function(){return p},Z5:function(){return o},m8:function(){return u},qD:function(){return f}});var n=r(5548),i=r(7294),s=r(9734);let o={signin:e=>e?"/signin?redirect=".concat(e):"/signin",forbidden:()=>"/forbidden"},a=new n.JsonServiceClient("https://nextjs-api.jamstacks.net").apply(e=>{e.basePath="/api",e.headers=new Headers}),l=(0,i.createContext)({});function u(){let[e,t]=(0,i.useState)(),[r,s]=(0,i.useState)(!1),o=e=>{let{message:r,errorCode:i,fieldName:s,errors:o}=e;return null!=i||(i="Exception"),null!=o||(o=[]),t(new n.ResponseStatus(s?{errorCode:i,message:r,errors:[new n.ResponseError({fieldName:s,errorCode:i,message:r})]}:{errorCode:i,message:r,errors:o}))},l=t=>{let{fieldName:r,message:i,errorCode:s}=t;if(null!=s||(s="Exception"),e){var a;let t=new n.ResponseStatus(e);t.errors=[...(null!==(a=t.errors)&&void 0!==a?a:[]).filter(e=>e.fieldName.toLowerCase()!=r.toLowerCase()),new n.ResponseError({fieldName:r,message:i,errorCode:s})]}else o({fieldName:r,message:i,errorCode:s})};async function u(e,r,n){s(!0);let i=await a.api(e);return s(!1),t(i.error),i}async function c(e,r,n){s(!0);let i=await a.apiVoid(e);return s(!1),t(i.error),i}return{loading:r,error:e,setError:o,addFieldError:l,api:u,apiVoid:c}}let c={};function f(){let e=async e=>{if(c.metadata&&!e)return;let t=await fetch((0,n.combinePaths)(a.baseUrl,"/types/metadata.json"));if(t.ok){let e=await t.text();c.metadata=JSON.parse(e)}else c.error=(0,n.createErrorStatus)(t.statusText)},t=e=>{var t,r;return null===(t=c.metadata)||void 0===t?void 0:null===(r=t.types)||void 0===r?void 0:r.find(t=>{var r;return(null===(r=t.name)||void 0===r?void 0:r.toLowerCase())==e.toLowerCase()})},r=e=>{let r={},n=t(e);if(n&&n.isEnum&&null!=n.enumNames)for(let e=0;e{let t=e();return(0,n.appendQueryString)("SwrClient:".concat((0,n.nameOf)(t)),t)},t=>this.client.get(e()))}constructor(e){this.client=e}}let p=new h(a)},3847:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return o}});var n=r(5893);r(953),r(8098);var i=r(9285),s=r(7294);function o(e){let{Component:t,pageProps:r}=e;return(0,s.useEffect)(()=>{(async()=>(0,i.qD)().load())()},[]),(0,n.jsx)(t,{...r})}},1876:function(e){var t="/";!function(){var r={675:function(e,t){"use strict";t.byteLength=u,t.toByteArray=f,t.fromByteArray=d;for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function u(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n}function c(e,t,r){return(t+r)*3/4-r}function f(e){var t,r,s=l(e),o=s[0],a=s[1],u=new i(c(e,o,a)),f=0,h=a>0?o-4:o;for(r=0;r>16&255,u[f++]=t>>8&255,u[f++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[f++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t),u}function h(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function p(e,t,r){for(var n=[],i=t;il?l:a+o));return 1===i?s.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&s.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},72:function(e,t,r){"use strict";/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */var n=r(675),i=r(783),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=b,t.INSPECT_MAX_BYTES=50;var o=2147483647;function a(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}function l(e){if(e>o)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return p(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return d(e,t);if(ArrayBuffer.isView(e))return g(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return y(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);var i=v(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function h(e,t,r){return(f(e),e<=0)?l(e):void 0!==t?"string"==typeof r?l(e).fill(t,r):l(e).fill(t):l(e)}function p(e){return f(e),l(e<0?0:0|m(e))}function d(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!u.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|w(e,t),n=l(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function g(e){for(var t=e.length<0?0:0|m(e.length),r=l(t),n=0;n=o)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function b(e){return+e!=e&&(e=0),u.alloc(+e)}function w(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(e).length;default:if(i)return n?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function E(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return j(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function S(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function C(e,t,r,n,i){if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),K(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:O(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):O(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function O(e,t,r,n,i){var s,o=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;o=2,a/=2,l/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(s=r;sa&&(r=a-l),s=r;s>=0;s--){for(var f=!0,h=0;hi&&(n=i):n=i;var s=t.length;n>s/2&&(n=s/2);for(var o=0;o239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(c=u);break;case 2:(192&(s=e[i+1]))==128&&(l=(31&u)<<6|63&s)>127&&(c=l);break;case 3:s=e[i+1],o=e[i+2],(192&s)==128&&(192&o)==128&&(l=(15&u)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],(192&s)==128&&(192&o)==128&&(192&a)==128&&(l=(15&u)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return U(n)}t.kMaxLength=o,u.TYPED_ARRAY_SUPPORT=a(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return h(e,t,r)},u.allocUnsafe=function(e){return p(e)},u.allocUnsafeSlow=function(e){return p(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);ir&&(e+=" ... "),""},s&&(u.prototype[s]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var s=i-n,o=r-t,a=Math.min(s,o),l=this.slice(n,i),c=e.slice(t,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return T(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":return k(this,e,t,r);case"latin1":case"binary":return L(this,e,t,r);case"base64":return R(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,r);default:if(s)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function U(e){var t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",s=t;sr)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,i,s){if(!u.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function q(e,t,r,n,i,s){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function $(e,t,r,n,s){return t=+t,r>>>=0,s||q(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function V(e,t,r,n,s){return t=+t,r>>>=0,s||q(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||F(e,t,this.length);for(var n=this[e],i=1,s=0;++s>>=0,t>>>=0,r||F(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);for(var n=this[e],i=1,s=0;++s=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},u.prototype.readInt8=function(e,t){return(e>>>=0,t||F(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var s=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var s=r-1,o=1;for(this[t+s]=255&e;--s>=0&&(o*=256);)this[t+s]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,r){return $(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return $(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return V(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return V(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--s)e[s+t]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,s=e.charCodeAt(0);("utf8"===n&&s<128||"latin1"===n)&&(e=s)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!i){if(r>56319||o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return s}function J(e){for(var t=[],r=0;r>8,i.push(r%256),i.push(n);return i}function Y(e){return n.toByteArray(H(e))}function X(e,t,r,n){for(var i=0;i=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}var Q=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},783:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,r,n,i){var s,o,a=8*i-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,p=e[t+f];for(f+=h,s=p&(1<<-c)-1,p>>=-c,c+=a;c>0;s=256*s+e[t+f],f+=h,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=n;c>0;o=256*o+e[t+f],f+=h,c-=8);if(0===s)s=1-u;else{if(s===l)return o?NaN:(p?-1:1)*(1/0);o+=Math.pow(2,n),s-=u}return(p?-1:1)*o*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var o,a,l,u=8*s-i-1,c=(1<>1,h=23===i?5960464477539062e-23:0,p=n?0:s-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(a=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(a=0,o=c):o+f>=1?(a=(t*l-1)*Math.pow(2,i),o+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=d,o/=256,u-=8);e[r+p-d]|=128*g}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={exports:{}},o=!0;try{r[e](s,s.exports,i),o=!1}finally{o&&delete n[e]}return s.exports}i.ab=t+"/";var s=i(72);e.exports=s}()},953:function(){},8098:function(){},7663:function(e){var t="/";!function(){var r={229:function(e){var t,r,n,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}function l(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var u=[],c=!1,f=-1;function h(){c&&n&&(c=!1,n.length?u=n.concat(u):f=-1,u.length&&p())}function p(){if(!c){var e=a(h);c=!0;for(var t=u.length;t;){for(n=u,u=[];++f1)for(var r=1;ro)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return p(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return d(e,t);if(ArrayBuffer.isView(e))return g(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return y(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);var i=v(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function h(e,t,r){return(f(e),e<=0)?l(e):void 0!==t?"string"==typeof r?l(e).fill(t,r):l(e).fill(t):l(e)}function p(e){return f(e),l(e<0?0:0|m(e))}function d(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!u.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|w(e,t),n=l(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function g(e){for(var t=e.length<0?0:0|m(e.length),r=l(t),n=0;n=o)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function b(e){return+e!=e&&(e=0),u.alloc(+e)}function w(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return X(e).length;default:if(i)return n?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function E(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return I(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return j(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function S(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function C(e,t,r,n,i){if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),K(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:O(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):O(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function O(e,t,r,n,i){var s,o=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;o=2,a/=2,l/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(s=r;sa&&(r=a-l),s=r;s>=0;s--){for(var f=!0,h=0;hi&&(n=i):n=i;var s=t.length;n>s/2&&(n=s/2);for(var o=0;o239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(c=u);break;case 2:(192&(s=e[i+1]))==128&&(l=(31&u)<<6|63&s)>127&&(c=l);break;case 3:s=e[i+1],o=e[i+2],(192&s)==128&&(192&o)==128&&(l=(15&u)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],(192&s)==128&&(192&o)==128&&(192&a)==128&&(l=(15&u)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return U(n)}t.kMaxLength=o,u.TYPED_ARRAY_SUPPORT=a(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return h(e,t,r)},u.allocUnsafe=function(e){return p(e)},u.allocUnsafeSlow=function(e){return p(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);ir&&(e+=" ... "),""},s&&(u.prototype[s]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var s=i-n,o=r-t,a=Math.min(s,o),l=this.slice(n,i),c=e.slice(t,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return T(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":return k(this,e,t,r);case"latin1":case"binary":return R(this,e,t,r);case"base64":return L(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,r);default:if(s)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function U(e){var t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",s=t;sr)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,i,s){if(!u.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function q(e,t,r,n,i,s){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function $(e,t,r,n,s){return t=+t,r>>>=0,s||q(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function V(e,t,r,n,s){return t=+t,r>>>=0,s||q(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||F(e,t,this.length);for(var n=this[e],i=1,s=0;++s>>=0,t>>>=0,r||F(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);for(var n=this[e],i=1,s=0;++s=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},u.prototype.readInt8=function(e,t){return(e>>>=0,t||F(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var s=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var s=r-1,o=1;for(this[t+s]=255&e;--s>=0&&(o*=256);)this[t+s]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,r){return $(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return $(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return V(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return V(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--s)e[s+t]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,s=e.charCodeAt(0);("utf8"===n&&s<128||"latin1"===n)&&(e=s)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!i){if(r>56319||o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return s}function J(e){for(var t=[],r=0;r>8,i.push(r%256),i.push(n);return i}function X(e){return n.toByteArray(H(e))}function Y(e,t,r,n){for(var i=0;i=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}var Q=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},783:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,r,n,i){var s,o,a=8*i-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,p=e[t+f];for(f+=h,s=p&(1<<-c)-1,p>>=-c,c+=a;c>0;s=256*s+e[t+f],f+=h,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=n;c>0;o=256*o+e[t+f],f+=h,c-=8);if(0===s)s=1-u;else{if(s===l)return o?NaN:(p?-1:1)*(1/0);o+=Math.pow(2,n),s-=u}return(p?-1:1)*o*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var o,a,l,u=8*s-i-1,c=(1<>1,h=23===i?5960464477539062e-23:0,p=n?0:s-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(a=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(a=0,o=c):o+f>=1?(a=(t*l-1)*Math.pow(2,i),o+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=d,o/=256,u-=8);e[r+p-d]|=128*g}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={exports:{}},o=!0;try{r[e](s,s.exports,i),o=!1}finally{o&&delete n[e]}return s.exports}i.ab=t+"/";var s=i(72);e.exports=s}()},953:function(){},8098:function(){},7663:function(e){var t="/";!function(){var r={229:function(e){var t,r,n,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}function l(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var u=[],c=!1,f=-1;function h(){c&&n&&(c=!1,n.length?u=n.concat(u):f=-1,u.length&&p())}function p(){if(!c){var e=a(h);c=!0;for(var t=u.length;t;){for(n=u,u=[];++f1)for(var r=1;r{},l=a(),u=Object,c=e=>e===l,f=e=>"function"==typeof e,h=(e,t)=>({...e,...t}),p="undefined",d=typeof window!=p,g=typeof document!=p,y=()=>d&&typeof window.requestAnimationFrame!=p,v=(e,t)=>{let r=s.get(e);return[()=>e.get(t)||o,n=>{let i=e.get(t);r[5](t,h(i,n),i||o)},r[6]]},m=new WeakMap,b=0,w=e=>{let t,r;let n=typeof e,i=e&&e.constructor,s=i==Date;if(u(e)!==e||s||i==RegExp)t=s?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=m.get(e))return t;if(t=++b+"~",m.set(e,t),i==Array){for(r=0,t="@";rE,[C,O]=d&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[a,a],T=()=>{let e=g&&document.visibilityState;return c(e)||"hidden"!==e},A=e=>(g&&document.addEventListener("visibilitychange",e),C("focus",e),()=>{g&&document.removeEventListener("visibilitychange",e),O("focus",e)}),k=e=>{let t=()=>{E=!0,e()},r=()=>{E=!1};return C("online",t),C("offline",r),()=>{O("online",t),O("offline",r)}},L={isOnline:S,isVisible:T},R={initFocus:A,initReconnect:k},N=!n.useId,I=!d||"Deno"in window,x=e=>y()?window.requestAnimationFrame(e):setTimeout(e,1),M=I?n.useEffect:n.useLayoutEffect,U="undefined"!=typeof navigator&&navigator.connection,B=!I&&U&&(["slow-2g","2g"].includes(U.effectiveType)||U.saveData),j=e=>{if(f(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?w(e):"",t]},D=0,P=()=>++D,F=0,_=1,q=2;var $={__proto__:null,FOCUS_EVENT:F,RECONNECT_EVENT:_,MUTATE_EVENT:q};async function V(...e){let[t,r,n,i]=e,o=h({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),a=o.populateCache,u=o.rollbackOnError,p=o.optimisticData,d=!1!==o.revalidate,g=e=>"function"==typeof u?u(e):!1!==u,y=o.throwOnError;if(f(r)){let e=r,n=[],i=t.keys();for(let r=i.next();!r.done;r=i.next()){let i=r.value;!i.startsWith("$inf$")&&e(t.get(i)._k)&&n.push(i)}return Promise.all(n.map(m))}return m(r);async function m(r){let i;let[o]=j(r);if(!o)return;let[u,h]=v(t,o),[m,b,w]=s.get(t),E=m[o],S=()=>d&&(delete w[o],E&&E[0])?E[0](q).then(()=>u().data):u().data;if(e.length<3)return S();let C=n,O=P();b[o]=[O,0];let T=!c(p),A=u(),k=A.data,L=A._c,R=c(L)?k:L;if(T&&h({data:p=f(p)?p(R):p,_c:R}),f(C))try{C=C(R)}catch(e){i=e}if(C&&f(C.then)){if(C=await C.catch(e=>{i=e}),O!==b[o][0]){if(i)throw i;return C}i&&T&&g(i)&&(a=!0,C=R,h({data:C,_c:l}))}a&&!i&&(f(a)&&(C=a(C,R)),h({data:C,_c:l})),b[o][1]=P();let N=await S();if(h({_c:l}),i){if(y)throw i;return}return a?N:C}}let z=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},H=(e,t)=>{if(!s.has(e)){let r=h(R,t),n={},i=V.bind(l,e),o=a,u={},c=(e,t)=>{let r=u[e]||[];return u[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},f=(t,r,n)=>{e.set(t,r);let i=u[t];if(i)for(let e=i.length;e--;)i[e](n,r)},p=()=>{if(!s.has(e)&&(s.set(e,[n,{},{},{},i,f,c]),!I)){let t=r.initFocus(setTimeout.bind(l,z.bind(l,n,F))),i=r.initReconnect(setTimeout.bind(l,z.bind(l,n,_)));o=()=>{t&&t(),i&&i(),s.delete(e)}}};return p(),[e,i,p,o]}return[e,s.get(e)[4]]},G=(e,t,r,n,i)=>{let s=r.errorRetryCount,o=i.retryCount,a=~~((Math.random()+.5)*(1<<(o<8?o:8)))*r.errorRetryInterval;(c(s)||!(o>s))&&setTimeout(n,a,i)},J=(e,t)=>w(e)==w(t),[W,Y]=H(new Map),X=h({onLoadingSlow:a,onSuccess:a,onError:a,onErrorRetry:G,onDiscarded:a,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:B?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:B?5e3:3e3,compare:J,isPaused:()=>!1,cache:W,mutate:Y,fallback:{}},L),Z=(e,t)=>{let r=h(e,t);if(t){let{use:n,fallback:i}=e,{use:s,fallback:o}=t;n&&s&&(r.use=n.concat(s)),i&&o&&(r.fallback=h(i,o))}return r},K=(0,n.createContext)({}),Q=e=>{let{value:t}=e,r=(0,n.useContext)(K),i=f(t),s=(0,n.useMemo)(()=>i?t(r):t,[i,r,t]),o=(0,n.useMemo)(()=>i?s:Z(r,s),[i,r,s]),a=s&&s.provider,[u]=(0,n.useState)(()=>a?H(a(o.cache||W),s):l);return u&&(o.cache=u[0],o.mutate=u[1]),M(()=>{if(u)return u[2]&&u[2](),u[3]},[]),(0,n.createElement)(K.Provider,h(e,{value:o}))},ee=d&&window.__SWR_DEVTOOLS_USE__,et=ee?window.__SWR_DEVTOOLS_USE__:[],er=()=>{ee&&(window.__SWR_DEVTOOLS_REACT__=n)},en=e=>f(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],ei=()=>h(X,(0,n.useContext)(K)),es=e=>(t,r,n)=>{let i=r&&((...e)=>{let n=j(t)[0],[,,,i]=s.get(W),o=i[n];return o?(delete i[n],o):r(...e)});return e(t,i,n)},eo=et.concat(es),ea=e=>function(...t){let r=ei(),[n,i,s]=en(t),o=Z(r,s),a=e,{use:l}=o,u=(l||[]).concat(eo);for(let e=u.length;e--;)a=u[e](a);return a(n,i||o.fetcher||null,o)},el=(e,t,r)=>{let n=t[e]||(t[e]=[]);return n.push(r),()=>{let e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}};er();let eu={dedupe:!0},ec=(e,t,r)=>{let{cache:o,compare:a,suspense:u,fallbackData:p,revalidateOnMount:d,refreshInterval:g,refreshWhenHidden:y,refreshWhenOffline:m,keepPreviousData:b}=r,[w,E,S]=s.get(o),[C,O]=j(e),T=(0,n.useRef)(!1),A=(0,n.useRef)(!1),k=(0,n.useRef)(C),L=(0,n.useRef)(t),R=(0,n.useRef)(r),U=()=>R.current,B=()=>U().isVisible()&&U().isOnline(),[D,F,_]=v(o,C),q=(0,n.useRef)({}).current,z=c(p)?r.fallback[C]:p,H=(e,t)=>{let r=!0;for(let n in q){let i=n;a(t[i],e[i])||"data"===i&&c(e[i])&&a(t[i],Q)||(r=!1)}return r},G=(0,n.useMemo)(()=>{let e=!!C&&!!t&&(c(d)?!U().isPaused()&&!u:d),r=()=>{let t=D(),r=h(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=r();return()=>{let e=r();return H(e,n)?n:n=e}},[o,C]),J=(0,i.useSyncExternalStore)((0,n.useCallback)(e=>_(C,(t,r)=>{H(t,r)||e()}),[o,C]),G,G),W=!T.current,Y=J.data,X=c(Y)?z:Y,Z=J.error,K=(0,n.useRef)(X),Q=b?c(Y)?K.current:Y:X,ee=W&&!c(d)?d:!U().isPaused()&&(u?!c(X)&&r.revalidateIfStale:c(X)||r.revalidateIfStale),et=!!(C&&t&&W&&ee),er=c(J.isValidating)?et:J.isValidating,en=c(J.isLoading)?et:J.isLoading,ei=(0,n.useCallback)(async e=>{let t,n;let i=L.current;if(!C||!i||A.current||U().isPaused())return!1;let s=!0,o=e||{},u=!S[C]||!o.dedupe,h=()=>N?!A.current&&C===k.current&&T.current:C===k.current,p={isValidating:!1,isLoading:!1},d=()=>{F(p)},g=()=>{let e=S[C];e&&e[1]===n&&delete S[C]},y={isValidating:!0};c(D().data)&&(y.isLoading=!0);try{if(u&&(F(y),r.loadingTimeout&&c(D().data)&&setTimeout(()=>{s&&h()&&U().onLoadingSlow(C,r)},r.loadingTimeout),S[C]=[i(O),P()]),[t,n]=S[C],t=await t,u&&setTimeout(g,r.dedupingInterval),!S[C]||S[C][1]!==n)return u&&h()&&U().onDiscarded(C),!1;p.error=l;let e=E[C];if(!c(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return d(),u&&h()&&U().onDiscarded(C),!1;let o=D().data;p.data=a(o,t)?o:t,u&&h()&&U().onSuccess(t,C,r)}catch(r){g();let e=U(),{shouldRetryOnError:t}=e;!e.isPaused()&&(p.error=r,u&&h()&&(e.onError(r,C,e),(!0===t||f(t)&&t(r))&&B()&&e.onErrorRetry(r,C,e,ei,{retryCount:(o.retryCount||0)+1,dedupe:!0})))}return s=!1,d(),!0},[C,o]),es=(0,n.useCallback)((...e)=>V(o,k.current,...e),[]);if(M(()=>{L.current=t,R.current=r,c(Y)||(K.current=Y)}),M(()=>{if(!C)return;let e=ei.bind(l,eu),t=0,r=r=>{if(r==$.FOCUS_EVENT){let r=Date.now();U().revalidateOnFocus&&r>t&&B()&&(t=r+U().focusThrottleInterval,e())}else if(r==$.RECONNECT_EVENT)U().revalidateOnReconnect&&B()&&e();else if(r==$.MUTATE_EVENT)return ei()},n=el(C,w,r);return A.current=!1,k.current=C,T.current=!0,F({_k:O}),ee&&(c(X)||I?e():x(e)),()=>{A.current=!0,n()}},[C]),M(()=>{let e;function t(){let t=f(g)?g(X):g;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!D().error&&(y||U().isVisible())&&(m||U().isOnline())?ei(eu).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,y,m,C]),(0,n.useDebugValue)(Q),u&&c(X)&&C){if(!N&&I)throw Error("Fallback data is required when using suspense in SSR.");throw L.current=t,R.current=r,A.current=!1,c(Z)?ei(eu):Z}return{mutate:es,get data(){return q.data=!0,Q},get error(){return q.error=!0,Z},get isValidating(){return q.isValidating=!0,er},get isLoading(){return q.isLoading=!0,en}}};u.defineProperty(Q,"defaultValue",{value:X});var ef=ea(ec)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[774,179],function(){return t(6840),t(880)}),_N_E=e.O()}]); \ No newline at end of file + */var n=r(7294);function i(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var s="function"==typeof Object.is?Object.is:i,o=n.useState,a=n.useEffect,l=n.useLayoutEffect,u=n.useDebugValue;function c(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,s=n[1];return l(function(){i.value=r,i.getSnapshot=t,f(i)&&s({inst:i})},[e,r,t]),a(function(){return f(i)&&s({inst:i}),e(function(){f(i)&&s({inst:i})})},[e]),u(r),r}function f(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!s(e,r)}catch(e){return!0}}function h(e,t){return t()}var p="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?h:c;t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:p},1688:function(e,t,r){"use strict";e.exports=r(3250)},9734:function(e,t,r){"use strict";r.d(t,{ZP:function(){return ef},kY:function(){return ei}});var n=r(7294),i=r(1688);let s=new WeakMap,o={},a=()=>{},l=a(),u=Object,c=e=>e===l,f=e=>"function"==typeof e,h=(e,t)=>({...e,...t}),p="undefined",d=typeof window!=p,g=typeof document!=p,y=()=>d&&typeof window.requestAnimationFrame!=p,v=(e,t)=>{let r=s.get(e);return[()=>e.get(t)||o,n=>{let i=e.get(t);r[5](t,h(i,n),i||o)},r[6]]},m=new WeakMap,b=0,w=e=>{let t,r;let n=typeof e,i=e&&e.constructor,s=i==Date;if(u(e)!==e||s||i==RegExp)t=s?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=m.get(e))return t;if(t=++b+"~",m.set(e,t),i==Array){for(r=0,t="@";rE,[C,O]=d&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[a,a],T=()=>{let e=g&&document.visibilityState;return c(e)||"hidden"!==e},A=e=>(g&&document.addEventListener("visibilitychange",e),C("focus",e),()=>{g&&document.removeEventListener("visibilitychange",e),O("focus",e)}),k=e=>{let t=()=>{E=!0,e()},r=()=>{E=!1};return C("online",t),C("offline",r),()=>{O("online",t),O("offline",r)}},R={isOnline:S,isVisible:T},L={initFocus:A,initReconnect:k},N=!n.useId,x=!d||"Deno"in window,I=e=>y()?window.requestAnimationFrame(e):setTimeout(e,1),M=x?n.useEffect:n.useLayoutEffect,U="undefined"!=typeof navigator&&navigator.connection,B=!x&&U&&(["slow-2g","2g"].includes(U.effectiveType)||U.saveData),j=e=>{if(f(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?w(e):"",t]},D=0,P=()=>++D,F=0,_=1,q=2;var $={__proto__:null,FOCUS_EVENT:F,RECONNECT_EVENT:_,MUTATE_EVENT:q};async function V(...e){let[t,r,n,i]=e,o=h({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),a=o.populateCache,u=o.rollbackOnError,p=o.optimisticData,d=!1!==o.revalidate,g=e=>"function"==typeof u?u(e):!1!==u,y=o.throwOnError;if(f(r)){let e=r,n=[],i=t.keys();for(let r=i.next();!r.done;r=i.next()){let i=r.value;!i.startsWith("$inf$")&&e(t.get(i)._k)&&n.push(i)}return Promise.all(n.map(m))}return m(r);async function m(r){let i;let[o]=j(r);if(!o)return;let[u,h]=v(t,o),[m,b,w]=s.get(t),E=m[o],S=()=>d&&(delete w[o],E&&E[0])?E[0](q).then(()=>u().data):u().data;if(e.length<3)return S();let C=n,O=P();b[o]=[O,0];let T=!c(p),A=u(),k=A.data,R=A._c,L=c(R)?k:R;if(T&&h({data:p=f(p)?p(L):p,_c:L}),f(C))try{C=C(L)}catch(e){i=e}if(C&&f(C.then)){if(C=await C.catch(e=>{i=e}),O!==b[o][0]){if(i)throw i;return C}i&&T&&g(i)&&(a=!0,C=L,h({data:C,_c:l}))}a&&!i&&(f(a)&&(C=a(C,L)),h({data:C,_c:l})),b[o][1]=P();let N=await S();if(h({_c:l}),i){if(y)throw i;return}return a?N:C}}let z=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},H=(e,t)=>{if(!s.has(e)){let r=h(L,t),n={},i=V.bind(l,e),o=a,u={},c=(e,t)=>{let r=u[e]||[];return u[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},f=(t,r,n)=>{e.set(t,r);let i=u[t];if(i)for(let e=i.length;e--;)i[e](n,r)},p=()=>{if(!s.has(e)&&(s.set(e,[n,{},{},{},i,f,c]),!x)){let t=r.initFocus(setTimeout.bind(l,z.bind(l,n,F))),i=r.initReconnect(setTimeout.bind(l,z.bind(l,n,_)));o=()=>{t&&t(),i&&i(),s.delete(e)}}};return p(),[e,i,p,o]}return[e,s.get(e)[4]]},G=(e,t,r,n,i)=>{let s=r.errorRetryCount,o=i.retryCount,a=~~((Math.random()+.5)*(1<<(o<8?o:8)))*r.errorRetryInterval;(c(s)||!(o>s))&&setTimeout(n,a,i)},J=(e,t)=>w(e)==w(t),[W,X]=H(new Map),Y=h({onLoadingSlow:a,onSuccess:a,onError:a,onErrorRetry:G,onDiscarded:a,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:B?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:B?5e3:3e3,compare:J,isPaused:()=>!1,cache:W,mutate:X,fallback:{}},R),Z=(e,t)=>{let r=h(e,t);if(t){let{use:n,fallback:i}=e,{use:s,fallback:o}=t;n&&s&&(r.use=n.concat(s)),i&&o&&(r.fallback=h(i,o))}return r},K=(0,n.createContext)({}),Q=e=>{let{value:t}=e,r=(0,n.useContext)(K),i=f(t),s=(0,n.useMemo)(()=>i?t(r):t,[i,r,t]),o=(0,n.useMemo)(()=>i?s:Z(r,s),[i,r,s]),a=s&&s.provider,[u]=(0,n.useState)(()=>a?H(a(o.cache||W),s):l);return u&&(o.cache=u[0],o.mutate=u[1]),M(()=>{if(u)return u[2]&&u[2](),u[3]},[]),(0,n.createElement)(K.Provider,h(e,{value:o}))},ee=d&&window.__SWR_DEVTOOLS_USE__,et=ee?window.__SWR_DEVTOOLS_USE__:[],er=()=>{ee&&(window.__SWR_DEVTOOLS_REACT__=n)},en=e=>f(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],ei=()=>h(Y,(0,n.useContext)(K)),es=e=>(t,r,n)=>{let i=r&&((...e)=>{let n=j(t)[0],[,,,i]=s.get(W),o=i[n];return o?(delete i[n],o):r(...e)});return e(t,i,n)},eo=et.concat(es),ea=e=>function(...t){let r=ei(),[n,i,s]=en(t),o=Z(r,s),a=e,{use:l}=o,u=(l||[]).concat(eo);for(let e=u.length;e--;)a=u[e](a);return a(n,i||o.fetcher||null,o)},el=(e,t,r)=>{let n=t[e]||(t[e]=[]);return n.push(r),()=>{let e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}};er();let eu={dedupe:!0},ec=(e,t,r)=>{let{cache:o,compare:a,suspense:u,fallbackData:p,revalidateOnMount:d,refreshInterval:g,refreshWhenHidden:y,refreshWhenOffline:m,keepPreviousData:b}=r,[w,E,S]=s.get(o),[C,O]=j(e),T=(0,n.useRef)(!1),A=(0,n.useRef)(!1),k=(0,n.useRef)(C),R=(0,n.useRef)(t),L=(0,n.useRef)(r),U=()=>L.current,B=()=>U().isVisible()&&U().isOnline(),[D,F,_]=v(o,C),q=(0,n.useRef)({}).current,z=c(p)?r.fallback[C]:p,H=(e,t)=>{let r=!0;for(let n in q){let i=n;a(t[i],e[i])||"data"===i&&c(e[i])&&a(t[i],Q)||(r=!1)}return r},G=(0,n.useMemo)(()=>{let e=!!C&&!!t&&(c(d)?!U().isPaused()&&!u:d),r=()=>{let t=D(),r=h(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=r();return()=>{let e=r();return H(e,n)?n:n=e}},[o,C]),J=(0,i.useSyncExternalStore)((0,n.useCallback)(e=>_(C,(t,r)=>{H(t,r)||e()}),[o,C]),G,G),W=!T.current,X=J.data,Y=c(X)?z:X,Z=J.error,K=(0,n.useRef)(Y),Q=b?c(X)?K.current:X:Y,ee=W&&!c(d)?d:!U().isPaused()&&(u?!c(Y)&&r.revalidateIfStale:c(Y)||r.revalidateIfStale),et=!!(C&&t&&W&&ee),er=c(J.isValidating)?et:J.isValidating,en=c(J.isLoading)?et:J.isLoading,ei=(0,n.useCallback)(async e=>{let t,n;let i=R.current;if(!C||!i||A.current||U().isPaused())return!1;let s=!0,o=e||{},u=!S[C]||!o.dedupe,h=()=>N?!A.current&&C===k.current&&T.current:C===k.current,p={isValidating:!1,isLoading:!1},d=()=>{F(p)},g=()=>{let e=S[C];e&&e[1]===n&&delete S[C]},y={isValidating:!0};c(D().data)&&(y.isLoading=!0);try{if(u&&(F(y),r.loadingTimeout&&c(D().data)&&setTimeout(()=>{s&&h()&&U().onLoadingSlow(C,r)},r.loadingTimeout),S[C]=[i(O),P()]),[t,n]=S[C],t=await t,u&&setTimeout(g,r.dedupingInterval),!S[C]||S[C][1]!==n)return u&&h()&&U().onDiscarded(C),!1;p.error=l;let e=E[C];if(!c(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return d(),u&&h()&&U().onDiscarded(C),!1;let o=D().data;p.data=a(o,t)?o:t,u&&h()&&U().onSuccess(t,C,r)}catch(r){g();let e=U(),{shouldRetryOnError:t}=e;!e.isPaused()&&(p.error=r,u&&h()&&(e.onError(r,C,e),(!0===t||f(t)&&t(r))&&B()&&e.onErrorRetry(r,C,e,ei,{retryCount:(o.retryCount||0)+1,dedupe:!0})))}return s=!1,d(),!0},[C,o]),es=(0,n.useCallback)((...e)=>V(o,k.current,...e),[]);if(M(()=>{R.current=t,L.current=r,c(X)||(K.current=X)}),M(()=>{if(!C)return;let e=ei.bind(l,eu),t=0,r=r=>{if(r==$.FOCUS_EVENT){let r=Date.now();U().revalidateOnFocus&&r>t&&B()&&(t=r+U().focusThrottleInterval,e())}else if(r==$.RECONNECT_EVENT)U().revalidateOnReconnect&&B()&&e();else if(r==$.MUTATE_EVENT)return ei()},n=el(C,w,r);return A.current=!1,k.current=C,T.current=!0,F({_k:O}),ee&&(c(Y)||x?e():I(e)),()=>{A.current=!0,n()}},[C]),M(()=>{let e;function t(){let t=f(g)?g(Y):g;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!D().error&&(y||U().isVisible())&&(m||U().isOnline())?ei(eu).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,y,m,C]),(0,n.useDebugValue)(Q),u&&c(Y)&&C){if(!N&&x)throw Error("Fallback data is required when using suspense in SSR.");throw R.current=t,L.current=r,A.current=!1,c(Z)?ei(eu):Z}return{mutate:es,get data(){return q.data=!0,Q},get error(){return q.error=!0,Z},get isValidating(){return q.isValidating=!0,er},get isLoading(){return q.isLoading=!0,en}}};u.defineProperty(Q,"defaultValue",{value:Y});var ef=ea(ec)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[774,179],function(){return t(6840),t(880)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/admin.html b/admin.html index c518a80..2776823 100644 --- a/admin.html +++ b/admin.html @@ -1 +1 @@ -
redirecting ...
\ No newline at end of file +
redirecting ...
\ No newline at end of file diff --git a/bookings-crud.html b/bookings-crud.html index e04fee0..46788ac 100644 --- a/bookings-crud.html +++ b/bookings-crud.html @@ -1 +1 @@ -
redirecting ...
\ No newline at end of file +
redirecting ...
\ No newline at end of file diff --git a/bookings-crud/create.html b/bookings-crud/create.html index e4f7617..0d49914 100644 --- a/bookings-crud/create.html +++ b/bookings-crud/create.html @@ -1 +1 @@ -
New Booking
create.tsx
\ No newline at end of file +
New Booking
create.tsx
\ No newline at end of file diff --git a/bookings-crud/edit.html b/bookings-crud/edit.html index 9f3feb6..4f296ff 100644 --- a/bookings-crud/edit.html +++ b/bookings-crud/edit.html @@ -1 +1 @@ -
Edit Booking
Delete
edit.tsx
\ No newline at end of file +
Edit Booking
Delete
edit.tsx
\ No newline at end of file diff --git a/features.html b/features.html index 2bae7be..a454a6c 100644 --- a/features.html +++ b/features.html @@ -1,4 +1,4 @@ -Template Features

This template contains our essential recommendations for a modern Vue Single Page App optimal for both +Template Features

This template contains our essential recommendations for a modern Vue Single Page App optimal for both productivity and performance.

Next.jsThe premier React Jamstack framework, commercially backed by Vercel
TailwindcssProductive responsive-first utility-based css framework with growing rich component ecosystem
TypeScriptAdvanced type-safety, static analysis and richer IDE tooling
IconifyUnified registry to access 100k+ high quality SVG icons from 100+ icon sets
MarkdownNative mdx Markdown integration with advanced featureset supporting embedded HTML & React JSX Components
SWRstale-while-revalidate library utilizing React's hooks API enabling optimal end-user UX for API integrations

App Features

@@ -27,4 +27,4 @@

Stale While Revalidate

The primary UX benefits are realized when re-making an existing request in which a locally-cached stale version is immediately returned and displayed whilst a new API Request is made behind the scenes, which updates the UI when completed.

Ultimately this provides the optimal end-user UX with the UI being immediately updated with stale results initially, -before being re-updated with the latest UI when the new API Request is completed.

\ No newline at end of file +before being re-updated with the latest UI when the new API Request is completed.

\ No newline at end of file diff --git a/forbidden.html b/forbidden.html index 47a7dd7..52abd2f 100644 --- a/forbidden.html +++ b/forbidden.html @@ -1 +1 @@ -

403

You do not have access to this page.

\ No newline at end of file +

403

You do not have access to this page.

\ No newline at end of file diff --git a/hosting.html b/hosting.html index a7df7a8..707d8af 100644 --- a/hosting.html +++ b/hosting.html @@ -1,4 +1,4 @@ -Hosting Costs
+Hosting Costs

The modern jamstack.org approach for developing websites is primarily concerned with adopting the architecture yielding the best performance and superior UX by minimizing the time to first byte from serving pre-built static assets from CDN edge caches.

@@ -44,4 +44,4 @@

Jamstack Benefits

Best of all the Jamstack approach fits perfectly with ServiceStack's recommended API First Development model which encourages development of reusable message-based APIs where the same System APIs can be reused from all Web, Mobile & Desktop Apps -from multiple HTTP, MQ or gRPC endpoints.

\ No newline at end of file +from multiple HTTP, MQ or gRPC endpoints.

\ No newline at end of file diff --git a/index.html b/index.html index 5cd9876..166e550 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Next.js Example with Markdown

Next.js

A statically generated site (SSG) example using Next.js, Markdown & ServiceStack.

loading...
Cover Image for Develop using JetBrains Rider

Setting up & exploring development workflow in Rider.

Author
Author

More Stories

Cover Image for Develop using Visual Studio

Develop using Visual Studio

Exploring development workflow in VS Code and Visual Studio .NET

Author
Author
Cover Image for Deployment with GitHub Actions

Deployment with GitHub Actions

Configuring your GitHub repo for SSH and CDN deployments

Author
Author

Getting Started

Create New Project

$ sh
$ sh
$ sh

Build Client UI & Run Dev Server

$ sh
$ sh

Run Server .NET Project (New Terminal)

$ sh
$ sh

Use npm dev server for UI Development

`npm run build:local` to view in .NET App

\ No newline at end of file +Next.js Example with Markdown

Next.js

A statically generated site (SSG) example using Next.js, Markdown & ServiceStack.

loading...
Cover Image for Develop using JetBrains Rider

Setting up & exploring development workflow in Rider.

Author
Author

More Stories

Cover Image for Develop using Visual Studio

Develop using Visual Studio

Exploring development workflow in VS Code and Visual Studio .NET

Author
Author
Cover Image for Deployment with GitHub Actions

Deployment with GitHub Actions

Configuring your GitHub repo for SSH and CDN deployments

Author
Author

Getting Started

Create New Project

$ sh
$ sh
$ sh

Build Client UI & Run Dev Server

$ sh
$ sh

Run Server .NET Project (New Terminal)

$ sh
$ sh

Use npm dev server for UI Development

`npm run build:local` to view in .NET App

\ No newline at end of file diff --git a/posts.html b/posts.html index f1847d9..5e52f45 100644 --- a/posts.html +++ b/posts.html @@ -1 +1 @@ -

List of Markdown Posts in /pages

Deployment with GitHub Actions

Configuring your GitHub repo for SSH and CDN deployments

Develop using JetBrains Rider

Setting up & exploring development workflow in Rider.

Develop using Visual Studio

Exploring development workflow in VS Code and Visual Studio .NET

\ No newline at end of file +

List of Markdown Posts in /pages

Deployment with GitHub Actions

Configuring your GitHub repo for SSH and CDN deployments

Develop using JetBrains Rider

Setting up & exploring development workflow in Rider.

Develop using Visual Studio

Exploring development workflow in VS Code and Visual Studio .NET

\ No newline at end of file diff --git a/posts/deploy.html b/posts/deploy.html index 970827f..89d1ddd 100644 --- a/posts/deploy.html +++ b/posts/deploy.html @@ -1,4 +1,4 @@ -Deployment with GitHub Actions | Next.js Example with Markdown

MyApp.

Deployment with GitHub Actions

Cover Image for Deployment with GitHub Actions
Author
Author

ServiceStack GitHub Action Deployments

+Deployment with GitHub Actions | Next.js Example with Markdown

MyApp.

Deployment with GitHub Actions

Cover Image for Deployment with GitHub Actions
Author
Author

ServiceStack GitHub Action Deployments

The release.yml in this template enables GitHub Actions CI deployment to a dedicated server with SSH access.

Overview

@@ -131,4 +131,4 @@

Using a CDN Proxy

No CDN

Of course the easiest solution is to not need CORS in the first place by not deploying to a CDN and serving both /api and UI from your .NET App. But this would forgo all the performance & UX benefits that has made -Jamstack approach so popular.

\ No newline at end of file +Jamstack approach so popular.

\ No newline at end of file diff --git a/posts/rider.html b/posts/rider.html index 243526c..2e11d8c 100644 --- a/posts/rider.html +++ b/posts/rider.html @@ -1,4 +1,4 @@ -Develop using JetBrains Rider | Next.js Example with Markdown

MyApp.

Develop using JetBrains Rider

Cover Image for Develop using JetBrains Rider
Author
Author
+Develop using JetBrains Rider | Next.js Example with Markdown

MyApp.

Develop using JetBrains Rider

Cover Image for Develop using JetBrains Rider
Author
Author

JetBrains Rider is our recommended IDE for any C# + npm SPA development as it @@ -63,4 +63,4 @@

Get Started

Type Definitions with their libraries that development IDEs like Rider take full advantage of that's used to power its type-safe & productive intelli-sense dev UX.

If you're new to React a good place to start is -React Getting Started.

\ No newline at end of file +React Getting Started.

\ No newline at end of file diff --git a/posts/vs.html b/posts/vs.html index f80d4e9..1abea2f 100644 --- a/posts/vs.html +++ b/posts/vs.html @@ -1,4 +1,4 @@ -Develop using Visual Studio | Next.js Example with Markdown

MyApp.

Develop using Visual Studio

Cover Image for Develop using Visual Studio
Author
Author

A popular alternative development environment to our preferred JetBrains Rider IDE is to use +Develop using Visual Studio | Next.js Example with Markdown

MyApp.

Develop using Visual Studio

Cover Image for Develop using Visual Studio
Author
Author

A popular alternative development environment to our preferred JetBrains Rider IDE is to use Visual Studio, the primary issue with this is that VS Code is a better IDE with richer support for npm projects whilst Visual Studio is a better IDE for C# Projects.

Essentially this is why we recommend Rider where it's best at both, where both C# and npm TypeScript projects can @@ -52,4 +52,4 @@

Get Started

Type Definitions with their libraries that development IDEs like Rider take full advantage of that's used to power its type-safe & productive intelli-sense dev UX.

If you're new to React a good place to start is -React Getting Started.

\ No newline at end of file +React Getting Started.

\ No newline at end of file diff --git a/profile.html b/profile.html index 9317821..c5a3621 100644 --- a/profile.html +++ b/profile.html @@ -1 +1 @@ -
redirecting ...
\ No newline at end of file +
redirecting ...
\ No newline at end of file diff --git a/signin.html b/signin.html index 45ad913..caa2567 100644 --- a/signin.html +++ b/signin.html @@ -1 +1 @@ -Sign In

Email you signed up with

6 characters or more

\ No newline at end of file +Sign In

Email you signed up with

6 characters or more

\ No newline at end of file diff --git a/signup.html b/signup.html index 3635d68..165222b 100644 --- a/signup.html +++ b/signup.html @@ -1 +1 @@ -Sign Up

Your first and last name

6 characters or more

Quick Links

\ No newline at end of file +Sign Up

Your first and last name

6 characters or more

Quick Links

\ No newline at end of file diff --git a/todomvc.html b/todomvc.html index df66bec..eae4943 100644 --- a/todomvc.html +++ b/todomvc.html @@ -1,7 +1,7 @@ -Todos Application
    0 left
    Todos Application \ No newline at end of file + dark:text-white dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-blue-500 dark:focus:text-white text-gray-900 hover:text-blue-700 dark:bg-gray-700 rounded-r-md border">Completed
    \ No newline at end of file