@nmshd/runtime 1.2.16 → 1.2.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  /*! For license information please see nmshd.runtime.min.js.LICENSE.txt */
2
- var NMSHDRuntime;(()=>{var e={6984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Runtime=void 0;const n=r(75172),i=r(3850),a=r(19663),o=r(7071),s=r(34086),c=r(42205),l=r(5200),u=r(986),d=r(60485),f=r(32746);t.Runtime=class Runtime{constructor(e){this._isInitialized=!1,this._isStarted=!1,this.runtimeConfig=e,this._eventBus=new n.EventEmitter2EventBus}isLoggedIn(){return!!this._accountController}getAccountController(){if(!this._accountController)throw d.RuntimeErrors.startup.noActiveAccount();return this._accountController}getConsumptionController(){if(!this._consumptionController)throw d.RuntimeErrors.startup.noActiveConsumptionController();return this._consumptionController}getDataViewExpander(){if(!this._expander)throw d.RuntimeErrors.startup.noActiveExpander();return this._expander}login(e,t){return this._accountController=e,this._transportServices=o.Container.get(l.TransportServices),this._consumptionController=t,this._consumptionServices=o.Container.get(l.ConsumptionServices),this._expander=o.Container.get(s.DataViewExpander),this}get modules(){return this._modules}get transportServices(){return this._transportServices}get consumptionServices(){return this._consumptionServices}get anonymousServices(){return this._anonymousServices}get eventBus(){return this._eventBus}get isInitialized(){return this._isInitialized}async init(){if(this._isInitialized)throw d.RuntimeErrors.general.alreadyInitialized();this.eventBus.publish(new c.RuntimeInitializingEvent),this.loggerFactory=await this.createLoggerFactory(),await this.initDIContainer(),await this.initTransportLibrary(),await this.initAccount(),this._modules=new l.RuntimeModuleRegistry,await this.loadModules(),await this.initInfrastructure(),await this.initModules(),this._isInitialized=!0,this.eventBus.publish(new c.RuntimeInitializedEvent)}initInfrastructure(){}async getSupportInformation(){return{health:await this.getHealth(),configuration:JSON.parse(JSON.stringify(this.runtimeConfig))}}async initTransportLibrary(){this.eventBus.publish(new c.TransportLibraryInitializingEvent),this.logger.debug("Initializing Database connection... ");const e=await this.createDatabaseConnection();this.transport=new a.Transport(e,this.runtimeConfig.transportLibrary,this.loggerFactory),this.logger.debug("Initializing Transport Library..."),this.logger.debug("Transport Library configuration: ",this.runtimeConfig.transportLibrary),await this.transport.init(),this.logger.debug("Finished initialization of Transport Library."),this._anonymousServices=o.Container.get(l.AnonymousServices),this.eventBus.publish(new c.TransportLibraryInitializedEvent)}async initDIContainer(){o.Container.bind(n.EventBus).factory((()=>this.eventBus)).scope(o.Scope.Singleton),o.Container.bind(u.RuntimeLoggerFactory).factory((()=>this.loggerFactory)).scope(o.Scope.Singleton),o.Container.bind(a.AccountController).factory((()=>this.getAccountController())).scope(o.Scope.Request),o.Container.bind(a.DevicesController).factory((()=>this.getAccountController().devices)).scope(o.Scope.Request),o.Container.bind(a.DeviceController).factory((()=>this.getAccountController().activeDevice)).scope(o.Scope.Request),o.Container.bind(a.FileController).factory((()=>this.getAccountController().files)).scope(o.Scope.Request),o.Container.bind(a.IdentityController).factory((()=>this.getAccountController().identity)).scope(o.Scope.Request),o.Container.bind(a.MessageController).factory((()=>this.getAccountController().messages)).scope(o.Scope.Request),o.Container.bind(a.RelationshipTemplateController).factory((()=>this.getAccountController().relationshipTemplates)).scope(o.Scope.Request),o.Container.bind(a.RelationshipsController).factory((()=>this.getAccountController().relationships)).scope(o.Scope.Request),o.Container.bind(a.TokenController).factory((()=>this.getAccountController().tokens)).scope(o.Scope.Request),o.Container.bind(i.ConsumptionController).factory((()=>this.getConsumptionController())).scope(o.Scope.Request),o.Container.bind(i.ConsumptionAttributesController).factory((()=>this.getConsumptionController().attributes)).scope(o.Scope.Request),o.Container.bind(i.DraftsController).factory((()=>this.getConsumptionController().drafts)).scope(o.Scope.Request),o.Container.bind(i.RelationshipInfoController).factory((()=>this.getConsumptionController().relationshipInfo)).scope(o.Scope.Request),o.Container.bind(i.RequestsController).factory((()=>this.getConsumptionController().requests)).scope(o.Scope.Request),o.Container.bind(i.SettingsController).factory((()=>this.getConsumptionController().settings)).scope(o.Scope.Request),o.Container.bind(i.SharedItemsController).factory((()=>this.getConsumptionController().sharedItems)).scope(o.Scope.Request),o.Container.bind(a.AnonymousTokenController).factory((()=>new a.AnonymousTokenController(this.transport.config))).scope(o.Scope.Singleton);const e=new f.SchemaRepository;await e.loadSchemas(),o.Container.bind(f.SchemaRepository).factory((()=>e)).scope(o.Scope.Singleton)}async loadModules(){this.logger.info("Loading modules...");for(const e in this.runtimeConfig.modules){const t=this.runtimeConfig.modules[e];t.name=e,t.enabled?t.location?await this.loadModule(t):this.logger.error(`Skip loading module '${this.getModuleName(t)}' because has no location.`):this.logger.info(`Skip loading module '${this.getModuleName(t)}' because it is not enabled.`)}this.eventBus.publish(new c.ModulesLoadedEvent)}async initModules(){this.logger.info("Initializing modules...");for(const e of this.modules.toArray())try{await e.init(),this.logger.info(`Module '${this.getModuleName(e)}' was initialized successfully.`)}catch(t){throw this.logger.error(`Module '${this.getModuleName(e)}' could not be initialized.`,t),t}this.eventBus.publish(new c.ModulesInitializedEvent)}get isStarted(){return this._isStarted}async start(){if(!this._isInitialized)throw d.RuntimeErrors.general.notInitialized();if(this._isStarted)throw d.RuntimeErrors.general.alreadyStarted();await this.startInfrastructure(),await this.startModules(),this._isStarted=!0}startInfrastructure(){}async stop(){var e;if(!this._isInitialized)throw d.RuntimeErrors.general.notInitialized();if(!this._isStarted)throw d.RuntimeErrors.general.notStarted();await this.stopModules(),await this.stopInfrastructure(),this.logger.info("Closing AccountController..."),await(null===(e=this._accountController)||void 0===e?void 0:e.close()),this._accountController=void 0,this.logger.info("AccountController was closed successfully."),this._isInitialized=!1,this._isStarted=!1}stopInfrastructure(){}async stopModules(){this.logger.info("Stopping modules...");for(const e of this.modules.toArray())try{await e.stop(),this.logger.info(`Module '${this.getModuleName(e)}' was stopped successfully.`)}catch(t){this.logger.error(`An Error occured while stopping module '${this.getModuleName(e)}': `,t)}this.logger.info("Stopped all modules.")}async startModules(){this.logger.info("Starting modules...");for(const e of this.modules.toArray())try{await e.start(),this.logger.info(`Module '${this.getModuleName(e)}' was started successfully.`)}catch(t){throw this.logger.error(`Module '${this.getModuleName(e)}' could not be started.`,t),t}this.eventBus.publish(new c.ModulesStartedEvent),this.logger.info("Started all modules.")}getModuleName(e){return e.displayName||e.name||JSON.stringify(e)}}},59757:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},986:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeLoggerFactory=void 0;t.RuntimeLoggerFactory=class RuntimeLoggerFactory{}},2500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildInformation=void 0;const n=r(90194),i=r(3850),a=r(25030),o=r(82890),s=r(19663);t.buildInformation={version:"1.2.16",build:"31",date:"2022-01-21T10:36:06+00:00",commit:"2a31bb2f8d8166ef9ed7e7c318d9ec99ddf95c18",dependencies:{"@js-soft/docdb-querytranslator":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"1.0.2","@js-soft/ts-utils":"^1.1.1","@nmshd/consumption":"1.0.12","@nmshd/content":"1.1.3","@nmshd/crypto":"1.0.7","@nmshd/transport":"1.1.6",ajv:"^8.9.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","fluent-ts-validator":"3.0.2","json-stringify-safe":"^5.0.1",luxon:"^2.3.0",qrcode:"1.5.0","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},libraries:{serval:n.buildInformation,consumption:i.buildInformation,content:a.buildInformation,crypto:o.buildInformation,transport:s.buildInformation}}},64869:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DataViewExpander=void 0;const o=r(19663),s=r(7071),c=r(5200),l=r(4629),u=r(60485),d=r(32043),f=r(91335),p=r(82466);let h=class DataViewExpander{constructor(e,t,r){this.transport=e,this.consumption=t,this.identityController=r}async expand(e,t){let r=t;if(e["@type"]&&(r=e["@type"]),e instanceof Array){if(!(e.length>0))return[];r=e[0]["@type"]}if(!r)throw u.RuntimeErrors.general.invalidPayload("No type found.");switch(r){case"Message":return e instanceof Array?await this.expandMessageDTOs(e):await this.expandMessageDTO(e);case"Request":return e instanceof Array?await this.expandUnknownRequests(e):await this.expandUnknownRequest(e);case"AttributesShareRequest":return e instanceof Array?await this.expandAttributesShareRequests(e):await this.expandAttributesShareRequest(e);case"AttributesChangeRequest":return e instanceof Array?await this.expandAttributesChangeRequests(e):await this.expandAttributesChangeRequest(e);case"Attribute":return e instanceof Array?await this.expandAttributes(e):this.expandAttribute(e);case"AttributeName":return e instanceof Array?await this.expandAttributeNames(e):await this.expandAttributeName(e);case"Address":return e instanceof Array?await this.expandAddresses(e):await this.expandAddress(e);case"FileId":return e instanceof Array?await this.expandFileIds(e):await this.expandFileId(e);case"File":return e instanceof Array?await this.expandFileDTOs(e):await this.expandFileDTO(e);case"Recipient":return e instanceof Array?await this.expandRecipients(e):await this.expandAddress(e);case"Relationship":return e instanceof Array?await this.expandRelationshipDTOs(e):await this.expandRelationshipDTO(e);case"ConsumptionAttribute":return e instanceof Array?await this.expandConsumptionAttributes(e):this.expandConsumptionAttribute(e);default:throw u.RuntimeErrors.general.notImplemented()}}async expandMessageDTO(e){const t=await this.expandRecipients(e.recipients),r={};t.forEach((e=>r[e.id]=e));const n=await this.expandAddress(e.createdBy),i=[],a=[];for(const t of e.attachments)"string"==typeof t?(a.push(this.expandFileId(t)),i.push(t)):(a.push(this.expandFileDTO(t)),i.push(t.id));const s=await Promise.all(a),c=this.identityController.isMe(o.CoreAddress.from(e.createdBy));let l,u=f.MessageStatus.Received;if(c){u=e.recipients.every((e=>!!e.receivedAt))?f.MessageStatus.Delivered:f.MessageStatus.Delivering,l={...t[0],type:"IdentityDVO"}}else l=n;const p=d.DataViewTranslateable.transport.messageName,h={id:e.id,name:p,date:e.createdAt,type:"MessageDVO",createdByDevice:e.createdByDevice,createdAt:e.createdAt,createdBy:n,recipients:t,attachments:s,isOwn:c,recipientCount:e.recipients.length,attachmentCount:e.attachments.length,status:u,statusText:`i18n://dvo.message.${u}`,image:"",peer:l};if("Mail"===e.content["@type"]||"RequestMail"===e.content["@type"]){const t=e.content,n=t.to.map((e=>r[e]));let i=[];t.cc&&(i=t.cc.map((e=>r[e])));const a={...h,type:"MailDVO",name:t.subject?t.subject:d.DataViewTranslateable.consumption.mails.mailSubjectFallback,subject:t.subject,body:t.body,to:n,toCount:t.to.length,cc:i,ccCount:i.length};if("RequestMail"===t["@type"]){const t=e.content;return{...a,type:"RequestMailDVO",name:t.subject?t.subject:d.DataViewTranslateable.consumption.mails.requestMailSubjectFallback,requests:await this.expandUnknownRequests(t.requests),requestCount:t.requests.length}}return a}return h}async expandMessageDTOs(e){const t=e.map((e=>this.expandMessageDTO(e)));return await Promise.all(t)}async expandUnknownRequest(e){switch(e["@type"]){case"AttributesRequest":return await this.expandAttributesRequest(e);case"AttributesShareRequest":return await this.expandAttributesShareRequest(e);case"AttributesChangeRequest":return await this.expandAttributesChangeRequest(e)}return{id:e.id?e.id:"",name:`${e["@type"]} ${e.key}`,description:"i18n://dvo.request.unknownType",type:"RequestDVO",date:e.expiresAt,...e}}expandRequest(e){return{id:e.id?e.id:"",name:`${e["@type"]} ${e.key}`,type:"RequestDVO",date:e.expiresAt,...e}}async expandUnknownRequests(e){const t=e.map((e=>this.expandUnknownRequest(e)));return await Promise.all(t)}async expandAttributesShareRequest(e){var t,r;const n=this.expandRequest(e),i=[];let a=0;for(const t of e.recipients){if(this.identityController.isMe(o.CoreAddress.from(t)))continue;const e=await this.expandIdentityForAddress(t);e.hasRelationship&&(i.push(e),a++)}if(0===i.length){n.errorCount=(null!==(t=n.errorCount)&&void 0!==t?t:0)+1;const e={code:"error.dvo.request.AttributeShareRequest.noRelationship",message:"There are no relationships to any of the recipients of this request."};n.errors||(n.errors=[]),n.errors.push(e)}else if(i.length!==a){n.warningCount=(null!==(r=n.warningCount)&&void 0!==r?r:0)+1;const e={code:"warning.dvo.request.AttributeShareRequest.onlyRelationships",message:"Not to every recipient of this request exist a relationship."};n.warnings||(n.warnings=[]),n.warnings.push(e)}const s=[];for(const t of e.attributes){const e=await this.expandAttributeName(t);s.push(e)}let c;return c=s.length>1?d.DataViewTranslateable.consumption.requests.attributesShareRequestNamePlural:d.DataViewTranslateable.consumption.requests.attributesShareRequestName,{...n,name:c,type:"AttributesShareRequestDVO",attributes:s,attributeCount:s.length,recipients:i,recipientCount:i.length,possibleRecipientCount:a}}expandConsumptionAttribute(e){return{type:"StoredAttributeDVO",id:e.id,name:e.content.name,value:e.content.value,date:e.createdAt,isOwn:!0,sharedItems:[],sharedItemCount:0}}async expandConsumptionAttributes(e){const t=e.map((e=>this.expandConsumptionAttribute(e)));return await Promise.all(t)}async expandAttributeName(e){const t=await this.consumption.attributes.getAttributeByName({name:e});let r,n=[];return t.isSuccess&&(n=[this.expandConsumptionAttribute(t.value)]),n.length>0&&(r=n[0]),{type:"MatchedAttributesDVO",id:e,name:e,matches:n,matchCount:n.length,bestMatch:r}}async expandAttributeNames(e){const t=e.map((e=>this.expandAttributeName(e)));return await Promise.all(t)}expandAttribute(e){return{type:"AttributeDVO",id:e.name,name:e.name,value:e.value,isOwn:!1}}async expandAttributes(e){const t=e.map((e=>this.expandAttribute(e)));return await Promise.all(t)}async expandAttributesChangeRequest(e){const t=this.expandRequest(e);let r,n;r=e.applyTo?await this.expandIdentityForAddress(e.applyTo):this.expandSelf();const i=[];for(const t of e.attributes){const e=this.expandAttribute(t);i.push(e)}const a=await this.expandAttributeNames(i.map((e=>e.id)));n=i.length>1?d.DataViewTranslateable.consumption.requests.attributesChangeRequestNamePlural:d.DataViewTranslateable.consumption.requests.attributesChangeRequestName;const o=[];return i.forEach(((e,t)=>{o.push({oldAttribute:a[t],newAttribute:e})})),{...t,type:"AttributesChangeRequestDVO",name:n,newAttributes:i,newAttributeCount:i.length,oldAttributes:a,oldAttributeCount:a.length,applyTo:r,changes:o,changeCount:o.length}}async expandAttributesRequest(e){const t=this.expandRequest(e);let r;const n=await this.expandAttributeNames(e.names);return r=n.length>1?d.DataViewTranslateable.consumption.requests.attributesChangeRequestNamePlural:d.DataViewTranslateable.consumption.requests.attributesChangeRequestName,{...t,type:"AttributesRequestDVO",names:e.names,nameCount:e.names.length,name:r,attributes:n,attributeCount:n.length,required:e.required}}expandSelf(){return{id:this.identityController.address.toString(),type:"IdentityDVO",name:"i18n://dvo.identity.self.name",initials:"i18n://dvo.identity.self.initials",realm:o.Realm.Prod,description:"i18n://dvo.identity.self.description",isSelf:!0,hasRelationship:!1}}expandUnknown(e){var t;const r=e.substring(3,9),n=(null!==(t=r.match(/\b\w/g))&&void 0!==t?t:[]).join("");return{id:this.identityController.address.toString(),type:"IdentityDVO",name:r,initials:n,realm:o.Realm.Prod,description:"i18n://dvo.identity.unknown.description",isSelf:!1,hasRelationship:!1}}async expandAttributesShareRequests(e){const t=e.map((e=>this.expandAttributesShareRequest(e)));return await Promise.all(t)}async expandAttributesChangeRequests(e){const t=e.map((e=>this.expandAttributesChangeRequest(e)));return await Promise.all(t)}async expandAddress(e){if(this.identityController.isMe(o.CoreAddress.from(e)))return this.expandSelf();const t=await this.transport.relationships.getRelationshipByAddress({address:e});return t.isError?this.expandUnknown(e):await this.expandRelationshipDTO(t.value)}async expandAddresses(e){const t=e.map((e=>this.expandAddress(e)));return await Promise.all(t)}async expandRecipient(e){return{...await this.expandAddress(e.address),type:"RecipientDVO",receivedAt:e.receivedAt,receivedByDevice:e.receivedByDevice}}async expandRecipients(e){const t=e.map((e=>this.expandRecipient(e)));return await Promise.all(t)}expandRelationshipChange(e,t){const r=t.response?t.response.createdAt:t.request.createdAt;let n,i=!1;return this.identityController.isMe(o.CoreAddress.from(t.request.createdBy))&&(i=!0),t.response&&(n={...t.response,id:`${t.id}_response`,name:"i18n://dvo.relationshipChange.response.name",type:"RelationshipChangeResponseDVO"}),Promise.resolve({type:"RelationshipChangeDVO",id:t.id,name:"",date:r,status:t.status,statusText:`i18n://dvo.relationshipChange.${t.status}`,changeType:t.type,changeTypeText:`i18n://dvo.relationshipChange.${t.type}`,isOwn:i,request:{...t.request,id:`${t.id}_request`,name:"i18n://dvo.relationshipChange.request.name",type:"RelationshipChangeRequestDVO"},response:n})}async expandRelationshipChanges(e){const t=e.changes.map((t=>this.expandRelationshipChange(e,t)));return await Promise.all(t)}async createRelationshipDVO(e,t){var r,n,i,a;if(!t){t=(await this.consumption.relationshipInfo.getRelationshipInfoByRelationship({relationshipId:e.id})).value}let s=p.RelationshipDirection.Incoming;this.identityController.isMe(o.CoreAddress.from(e.changes[0].request.createdBy))&&(s=p.RelationshipDirection.Outgoing);let c="";e.status===o.RelationshipStatus.Pending&&s===p.RelationshipDirection.Outgoing?c=d.DataViewTranslateable.transport.relationshipOutgoing:e.status===o.RelationshipStatus.Pending?c=d.DataViewTranslateable.transport.relationshipIncoming:e.status===o.RelationshipStatus.Rejected?c=d.DataViewTranslateable.transport.relationshipRejected:e.status===o.RelationshipStatus.Revoked?c=d.DataViewTranslateable.transport.relationshipRevoked:e.status===o.RelationshipStatus.Active&&(c=d.DataViewTranslateable.transport.relationshipActive);const l=await this.expandRelationshipChanges(e);return{id:e.id,name:t.userTitle?t.userTitle:t.title,description:t.userDescription?t.userDescription:t.description,date:e.changes[0].request.createdAt,image:"",type:"RelationshipDVO",status:e.status,statusText:c,direction:s,isPinned:t.isPinned,theme:{image:null===(r=t.theme)||void 0===r?void 0:r.image,headerImage:null===(n=t.theme)||void 0===n?void 0:n.imageBar,backgroundColor:null===(i=t.theme)||void 0===i?void 0:i.backgroundColor,foregroundColor:null===(a=t.theme)||void 0===a?void 0:a.foregroundColor},changes:l,changeCount:l.length}}async expandRelationshipDTO(e){var t;const r=(await this.consumption.relationshipInfo.getRelationshipInfoByRelationship({relationshipId:e.id})).value,n=r.userTitle?r.userTitle:r.title;let i=r.userDescription?r.userDescription:r.description;const a=(null!==(t=n.match(/\b\w/g))&&void 0!==t?t:[]).join(""),o=await this.createRelationshipDVO(e,r);return i||(i=o.statusText),{type:"IdentityDVO",id:e.peer,name:n,date:o.date,description:i,publicKey:e.peerIdentity.publicKey,realm:e.peerIdentity.realm,initials:a,isSelf:!1,hasRelationship:!0,relationship:o}}async expandIdentityForAddress(e){var t;if(e===this.identityController.address.toString())return this.expandSelf();const r=await this.transport.relationships.getRelationshipByAddress({address:e});if(r.isSuccess)return await this.expandRelationshipDTO(r.value);if(r.error.code!==u.RuntimeErrors.general.recordNotFound(o.Relationship).code)throw r.error;const n=e.substring(3,9),i=(null!==(t=n.match(/\b\w/g))&&void 0!==t?t:[]).join("");return{id:e,type:"IdentityDVO",name:n,initials:i,publicKey:"i18n://dvo.identity.publicKey.unknown",realm:this.identityController.realm.toString(),description:"i18n://dvo.identity.unknown",isSelf:!1,hasRelationship:!1}}async expandIdentity(e){return await this.expandIdentityForAddress(e.address)}async expandRelationshipDTOs(e){const t=e.map((e=>this.expandRelationshipDTO(e)));return await Promise.all(t)}async expandFileId(e){const t=await this.transport.files.getFile({id:e});if(t.isError)throw t.error;return await this.expandFileDTO(t.value)}async expandFileIds(e){const t=e.map((e=>this.expandFileId(e)));return await Promise.all(t)}async expandFileDTO(e){return{...e,type:"FileDVO",id:e.id,name:e.title?e.title:e.filename,date:e.createdAt,image:"",filename:e.filename,filesize:e.filesize,createdBy:await this.expandAddress(e.createdBy),deletedBy:e.deletedBy?await this.expandAddress(e.deletedBy):void 0}}async expandFileDTOs(e){const t=e.map((e=>this.expandFileDTO(e)));return await Promise.all(t)}};h=n([a(0,s.Inject),a(1,s.Inject),a(2,s.Inject),i("design:paramtypes",[c.TransportServices,l.ConsumptionServices,o.IdentityController])],h),t.DataViewExpander=h},9121:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},32043:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataViewTranslateable=void 0;class DataViewTranslateable{}t.DataViewTranslateable=DataViewTranslateable,DataViewTranslateable.prefix="i18n://dvo.",DataViewTranslateable.transport={messageName:`${DataViewTranslateable.prefix}message.name`,relationshipOutgoing:`${DataViewTranslateable.prefix}relationship.Outgoing`,relationshipIncoming:`${DataViewTranslateable.prefix}relationship.Incoming`,relationshipRejected:`${DataViewTranslateable.prefix}relationship.Rejected`,relationshipRevoked:`${DataViewTranslateable.prefix}relationship.Revoked`,relationshipActive:`${DataViewTranslateable.prefix}relationship.Active`,fileName:`${DataViewTranslateable.prefix}file.name`},DataViewTranslateable.consumption={mails:{mailSubjectFallback:`${DataViewTranslateable.prefix}mails.mailSubjectFallback`,requestMailSubjectFallback:`${DataViewTranslateable.prefix}mails.requestMailSubjectFallback`},attributes:{unknownAttributeName:`${DataViewTranslateable.prefix}attributes.UnknownAttributeName`},requests:{attributesShareRequestName:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.name`,attributesShareRequestNamePlural:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.namePlural`,attributesShareRequestNoRelationship:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.noRelationship`,attributesShareRequestOnlyRelationships:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.onlyRelationships`,attributesChangeRequestName:`${DataViewTranslateable.prefix}requests.AttributesChangeRequest.name`,attributesChangeRequestNamePlural:`${DataViewTranslateable.prefix}requests.AttributesChangeRequest.namePlural`},identities:{self:`${DataViewTranslateable.prefix}identities.self.name`}}},89248:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18928:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},48306:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(89248),t),i(r(18928),t)},39427:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89542:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(39427),t)},33112:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},36519:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},63522:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},80166:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(33112),t),i(r(36519),t),i(r(63522),t)},34086:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(48306),t),i(r(89542),t),i(r(80166),t),i(r(64869),t),i(r(9121),t),i(r(32043),t),i(r(56574),t)},84457:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},56342:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},91335:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageStatus=void 0,function(e){e.Received="Received",e.Delivering="Delivering",e.Delivered="Delivered"}(t.MessageStatus||(t.MessageStatus={}))},82466:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipDirection=void 0,function(e){e.Outgoing="Outgoing",e.Incoming="Incoming"}(t.RelationshipDirection||(t.RelationshipDirection={}))},49893:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},56574:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(84457),t),i(r(56342),t),i(r(91335),t),i(r(82466),t),i(r(49893),t)},21291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataEvent=void 0;const n=r(44584);class DataEvent extends n.Event{constructor(e,t,r){super(e),this.eventTargetAddress=t,this.data=r}}t.DataEvent=DataEvent},44584:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;t.Event=class Event{constructor(e){this.namespace=e}}},34209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MailReceivedEvent=void 0;const n=r(21291);class MailReceivedEvent extends n.DataEvent{constructor(e,t,r){super(MailReceivedEvent.namespace,e,r),this.mail=t}}t.MailReceivedEvent=MailReceivedEvent,MailReceivedEvent.namespace="consumption.mailReceived"},87834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipEvent=void 0;const n=r(21291);class RelationshipEvent extends n.DataEvent{constructor(e,t,r){super(RelationshipEvent.namespace+r.id,e,r),this.event=t}}t.RelationshipEvent=RelationshipEvent,RelationshipEvent.namespace="consumption.relationshipEvent."},49935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestMailReceivedEvent=void 0;const n=r(21291);class RequestMailReceivedEvent extends n.DataEvent{constructor(e,t,r){super(RequestMailReceivedEvent.namespace,e,r),this.requestMail=t}}t.RequestMailReceivedEvent=RequestMailReceivedEvent,RequestMailReceivedEvent.namespace="consumption.requestMailReceived"},66589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestReceivedEvent=void 0;const n=r(21291);class RequestReceivedEvent extends n.DataEvent{constructor(e,t,r){super(RequestReceivedEvent.namespace,e,r),this.request=t}}t.RequestReceivedEvent=RequestReceivedEvent,RequestReceivedEvent.namespace="consumption.requestReceived"},42205:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(21291),t),i(r(44584),t),i(r(76762),t),i(r(188),t),i(r(84737),t),i(r(52866),t),i(r(62937),t),i(r(48994),t),i(r(4769),t),i(r(11690),t),i(r(95049),t),i(r(17194),t)},76762:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesInitializedEvent=void 0;const n=r(44584);class ModulesInitializedEvent extends n.Event{constructor(){super(ModulesInitializedEvent.namespace)}}t.ModulesInitializedEvent=ModulesInitializedEvent,ModulesInitializedEvent.namespace="runtime.modulesInitialized"},188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesLoadedEvent=void 0;const n=r(44584);class ModulesLoadedEvent extends n.Event{constructor(){super(ModulesLoadedEvent.namespace)}}t.ModulesLoadedEvent=ModulesLoadedEvent,ModulesLoadedEvent.namespace="runtime.modulesLoaded"},84737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesStartedEvent=void 0;const n=r(44584);class ModulesStartedEvent extends n.Event{constructor(){super(ModulesStartedEvent.namespace)}}t.ModulesStartedEvent=ModulesStartedEvent,ModulesStartedEvent.namespace="runtime.modulesStarted"},52866:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeInitializedEvent=void 0;const n=r(44584);class RuntimeInitializedEvent extends n.Event{constructor(){super(RuntimeInitializedEvent.namespace)}}t.RuntimeInitializedEvent=RuntimeInitializedEvent,RuntimeInitializedEvent.namespace="runtime.initialized"},62937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeInitializingEvent=void 0;const n=r(44584);class RuntimeInitializingEvent extends n.Event{constructor(){super(RuntimeInitializingEvent.namespace)}}t.RuntimeInitializingEvent=RuntimeInitializingEvent,RuntimeInitializingEvent.namespace="runtime.initializing"},48994:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageReceivedEvent=void 0;const n=r(21291);class MessageReceivedEvent extends n.DataEvent{constructor(e,t){super(MessageReceivedEvent.namespace,e,t)}}t.MessageReceivedEvent=MessageReceivedEvent,MessageReceivedEvent.namespace="transport.messageReceived"},4769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageSentEvent=void 0;const n=r(21291);class MessageSentEvent extends n.DataEvent{constructor(e,t){super(MessageSentEvent.namespace,e,t)}}t.MessageSentEvent=MessageSentEvent,MessageSentEvent.namespace="transport.messageSent"},11690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipChangedEvent=void 0;const n=r(21291);class RelationshipChangedEvent extends n.DataEvent{constructor(e,t){super(RelationshipChangedEvent.namespace,e,t)}}t.RelationshipChangedEvent=RelationshipChangedEvent,RelationshipChangedEvent.namespace="transport.relationshipChanged"},95049:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransportLibraryInitializedEvent=void 0;const n=r(44584);class TransportLibraryInitializedEvent extends n.Event{constructor(){super(TransportLibraryInitializedEvent.namespace)}}t.TransportLibraryInitializedEvent=TransportLibraryInitializedEvent,TransportLibraryInitializedEvent.namespace="transport.initialized"},17194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransportLibraryInitializingEvent=void 0;const n=r(44584);class TransportLibraryInitializingEvent extends n.Event{constructor(){super(TransportLibraryInitializingEvent.namespace)}}t.TransportLibraryInitializingEvent=TransportLibraryInitializingEvent,TransportLibraryInitializingEvent.namespace="transport.initializing"},27371:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousServices=void 0;const o=r(7071),s=r(38346);let c=class AnonymousServices{constructor(e){this.tokens=e}};c=n([a(0,o.Inject),i("design:paramtypes",[s.AnonymousTokensFacade])],c),t.AnonymousServices=c},4629:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsumptionServices=void 0;const o=r(7071),s=r(26013);let c=class ConsumptionServices{constructor(e,t,r,n,i){this.attributes=e,this.drafts=t,this.settings=r,this.sharedItems=n,this.relationshipInfo=i}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),i("design:paramtypes",[s.AttributesFacade,s.DraftsFacade,s.SettingsFacade,s.SharedItemsFacade,s.RelationshipInfoFacade])],c),t.ConsumptionServices=c},34164:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TransportServices=void 0;const o=r(7071),s=r(19728);let c=class TransportServices{constructor(e,t,r,n,i,a,o){this.files=e,this.messages=t,this.relationships=r,this.relationshipTemplates=n,this.tokens=i,this.account=a,this.devices=o}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),a(5,o.Inject),a(6,o.Inject),i("design:paramtypes",[s.FilesFacade,s.MessagesFacade,s.RelationshipsFacade,s.RelationshipTemplatesFacade,s.TokensFacade,s.AccountFacade,s.DevicesFacade])],c),t.TransportServices=c},37306:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousTokensFacade=void 0;const o=r(7071),s=r(60485);let c=class AnonymousTokensFacade{constructor(e,t){this.loadPeerTokenByTruncatedReferenceUseCase=e,this.loadPeerTokenByIdAndKeyUseCase=t}async loadPeerTokenByTruncatedReference(e){return await this.loadPeerTokenByTruncatedReferenceUseCase.execute(e)}async loadPeerTokenByIdAndKey(e){return await this.loadPeerTokenByIdAndKeyUseCase.execute(e)}};c=n([a(0,o.Inject),a(1,o.Inject),i("design:paramtypes",[s.LoadPeerTokenAnonymousByTruncatedReferenceUseCase,s.LoadPeerTokenAnonymousByIdAndKeyUseCase])],c),t.AnonymousTokensFacade=c},38346:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(37306),t)},12534:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AttributesFacade=void 0;const o=r(7071),s=r(60485);let c=class AttributesFacade{constructor(e,t,r,n,i,a,o,s,c,l,u){this.createAttributeUseCase=e,this.deleteAttributeUseCase=t,this.deleteAttributeByNameUseCase=r,this.getAllValidUseCase=n,this.getAttributeUseCase=i,this.getAttributeByNameUseCase=a,this.getAttributesUseCase=o,this.getAttributesByNamesUseCase=s,this.getHistoryByNameUseCase=c,this.succeedAttributeUseCase=l,this.updateAttributeUseCase=u}async createAttribute(e){return await this.createAttributeUseCase.execute(e)}async deleteAttribute(e){return await this.deleteAttributeUseCase.execute(e)}async deleteAttributeByName(e){return await this.deleteAttributeByNameUseCase.execute(e)}async getAllValid(){return await this.getAllValidUseCase.execute()}async getAttribute(e){return await this.getAttributeUseCase.execute(e)}async getAttributeByName(e){return await this.getAttributeByNameUseCase.execute(e)}async getAttributes(e){return await this.getAttributesUseCase.execute(e)}async getAttributesByNames(e){return await this.getAttributesByNamesUseCase.execute(e)}async getHistoryByName(e){return await this.getHistoryByNameUseCase.execute(e)}async succeedAttribute(e){return await this.succeedAttributeUseCase.execute(e)}async updateAttribute(e){return await this.updateAttributeUseCase.execute(e)}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),a(5,o.Inject),a(6,o.Inject),a(7,o.Inject),a(8,o.Inject),a(9,o.Inject),a(10,o.Inject),i("design:paramtypes",[s.CreateAttributeUseCase,s.DeleteAttributeUseCase,s.DeleteAttributeByNameUseCase,s.GetAllValidUseCase,s.GetAttributeUseCase,s.GetAttributeByNameUseCase,s.GetAttributesUseCase,s.GetAttributesByNamesUseCase,s.GetHistoryByNameUseCase,s.SucceedAttributeUseCase,s.UpdateAttributeUseCase])],c),t.AttributesFacade=c},13514:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DraftsFacade=void 0;const o=r(7071),s=r(60485);let c=class DraftsFacade{constructor(e,t,r,n,i){this.createDraftUseCase=e,this.deleteDraftUseCase=t,this.getDraftUseCase=r,this.getDraftsUseCase=n,this.updateDraftUseCase=i}async createDraft(e){return await this.createDraftUseCase.execute(e)}async deleteDraft(e){return await this.deleteDraftUseCase.execute(e)}async getDraft(e){return await this.getDraftUseCase.execute(e)}async getDrafts(e){return await this.getDraftsUseCase.execute(e)}async updateDraft(e){return await this.updateDraftUseCase.execute(e)}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),i("design:paramtypes",[s.CreateDraftUseCase,s.DeleteDraftUseCase,s.GetDraftUseCase,s.GetDraftsUseCase,s.UpdateDraftUseCase])],c),t.DraftsFacade=c},74786:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipInfoFacade=void 0;const o=r(7071),s=r(60485);let c=class RelationshipInfoFacade{constructor(e,t,r,n,i,a){this.createRelationshipInfoUseCase=e,this.deleteRelationshipInfoUseCase=t,this.deleteRelationshipInfoByRelationshipUseCase=r,this.getRelationshipInfoUseCase=n,this.getRelationshipInfoByRelationshipUseCase=i,this.updateRelationshipInfoUseCase=a}async createRelationshipInfo(e){return await this.createRelationshipInfoUseCase.execute(e)}async deleteRelationshipInfo(e){return await this.deleteRelationshipInfoUseCase.execute(e)}async deleteRelationshipInfoByRelationship(e){return await this.deleteRelationshipInfoByRelationshipUseCase.execute(e)}async getRelationshipInfo(e){return await this.getRelationshipInfoUseCase.execute(e)}async getRelationshipInfoByRelationship(e){return await this.getRelationshipInfoByRelationshipUseCase.execute(e)}async updateRelationshipInfo(e){return await this.updateRelationshipInfoUseCase.execute(e)}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),a(5,o.Inject),i("design:paramtypes",[s.CreateRelationshipInfoUseCase,s.DeleteRelationshipInfoUseCase,s.DeleteRelationshipInfoByRelationshipUseCase,s.GetRelationshipInfoUseCase,s.GetRelationshipInfoByRelationshipUseCase,s.UpdateRelationshipInfoUseCase])],c),t.RelationshipInfoFacade=c},16615:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFacade=void 0;const o=r(7071),s=r(60485);let c=class SettingsFacade{constructor(e,t,r,n,i){this.createSettingUseCase=e,this.updateSettingUseCase=t,this.deleteSettingUseCase=r,this.getSettingsUseCase=n,this.getSettingUseCase=i}async createSetting(e){return await this.createSettingUseCase.execute(e)}async getSetting(e){return await this.getSettingUseCase.execute(e)}async getSettings(e){return await this.getSettingsUseCase.execute(e)}async deleteSetting(e){return await this.deleteSettingUseCase.execute(e)}async updateSetting(e){return await this.updateSettingUseCase.execute(e)}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),i("design:paramtypes",[s.CreateSettingUseCase,s.UpdateSettingUseCase,s.DeleteSettingUseCase,s.GetSettingsUseCase,s.GetSettingUseCase])],c),t.SettingsFacade=c},89558:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SharedItemsFacade=void 0;const o=r(7071),s=r(60485);let c=class SharedItemsFacade{constructor(e,t,r,n,i,a,o,s,c){this.createSharedItemUseCase=e,this.deleteSharedItemUseCase=t,this.getSharedItemUseCase=r,this.getSharedItemsUseCase=n,this.getSharedItemsByAddressUseCase=i,this.getSharedItemsByReferenceUseCase=a,this.getSharedItemsSharedByAddressUseCase=o,this.getSharedItemsSharedWithAddressUseCase=s,this.updateSharedItemUseCase=c}async createSharedItem(e){return await this.createSharedItemUseCase.execute(e)}async deleteSharedItem(e){return await this.deleteSharedItemUseCase.execute(e)}async getSharedItem(e){return await this.getSharedItemUseCase.execute(e)}async getSharedItems(e){return await this.getSharedItemsUseCase.execute(e)}async getSharedItemsByAddress(e){return await this.getSharedItemsByAddressUseCase.execute(e)}async getSharedItemsByReference(e){return await this.getSharedItemsByReferenceUseCase.execute(e)}async getSharedItemsSharedByAddress(e){return await this.getSharedItemsSharedByAddressUseCase.execute(e)}async getSharedItemsSharedWithAddress(e){return await this.getSharedItemsSharedWithAddressUseCase.execute(e)}async updateSharedItem(e){return await this.updateSharedItemUseCase.execute(e)}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),a(5,o.Inject),a(6,o.Inject),a(7,o.Inject),a(8,o.Inject),i("design:paramtypes",[s.CreateSharedItemUseCase,s.DeleteSharedItemUseCase,s.GetSharedItemUseCase,s.GetSharedItemsUseCase,s.GetSharedItemsByAddressUseCase,s.GetSharedItemsByReferenceUseCase,s.GetSharedItemsSharedByAddressUseCase,s.GetSharedItemsSharedWithAddressUseCase,s.UpdateSharedItemUseCase])],c),t.SharedItemsFacade=c},26013:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(12534),t),i(r(13514),t),i(r(74786),t),i(r(16615),t),i(r(89558),t)},30941:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AccountFacade=void 0;const o=r(7071),s=r(60485);let c=class AccountFacade{constructor(e,t,r,n,i,a,o,s){this.getIdentityInfoUseCase=e,this.getDeviceInfoUseCase=t,this.registerPushNotificationTokenUseCase=r,this.syncDatawalletUseCase=n,this.syncEverythingUseCase=i,this.getSyncInfoUseCase=a,this.disableAutoSyncUseCase=o,this.enableAutoSyncUseCase=s}async getIdentityInfo(){return await this.getIdentityInfoUseCase.execute()}async getDeviceInfo(){return await this.getDeviceInfoUseCase.execute()}createDeviceBackup(){throw s.RuntimeErrors.general.notImplemented()}recoverDevice(){throw s.RuntimeErrors.general.notImplemented()}async registerPushNotificationToken(e){return await this.registerPushNotificationTokenUseCase.execute(e)}async syncDatawallet(){return await this.syncDatawalletUseCase.execute()}async syncEverything(){return await this.syncEverythingUseCase.execute()}async getSyncInfo(){return await this.getSyncInfoUseCase.execute()}async enableAutoSync(){return await this.enableAutoSyncUseCase.execute()}async disableAutoSync(){return await this.disableAutoSyncUseCase.execute()}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),a(5,o.Inject),a(6,o.Inject),a(7,o.Inject),i("design:paramtypes",[s.GetIdentityInfoUseCase,s.GetDeviceInfoUseCase,s.RegisterPushNotificationTokenUseCase,s.SyncDatawalletUseCase,s.SyncEverythingUseCase,s.GetSyncInfoUseCase,s.DisableAutoSyncUseCase,s.EnableAutoSyncUseCase])],c),t.AccountFacade=c},17974:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DevicesFacade=void 0;const o=r(7071),s=r(60485);let c=class DevicesFacade{constructor(e,t,r,n,i,a,o){this.getDeviceUseCase=e,this.getDevicesUseCase=t,this.createDeviceUseCase=r,this.updateDeviceUseCase=n,this.deleteDeviceUseCase=i,this.getDeviceOnboardingInfoUseCase=a,this.getDeviceOnboardingTokenUseCase=o}async getDevice(e){return await this.getDeviceUseCase.execute(e)}async getDevices(){return await this.getDevicesUseCase.execute()}async createDevice(e){return await this.createDeviceUseCase.execute(e)}async getDeviceOnboardingInfo(e){return await this.getDeviceOnboardingInfoUseCase.execute(e)}async getDeviceOnboardingToken(e){return await this.getDeviceOnboardingTokenUseCase.execute(e)}async updateDevice(e){return await this.updateDeviceUseCase.execute(e)}async deleteDevice(e){return await this.deleteDeviceUseCase.execute(e)}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),a(5,o.Inject),a(6,o.Inject),i("design:paramtypes",[s.GetDeviceUseCase,s.GetDevicesUseCase,s.CreateDeviceUseCase,s.UpdateDeviceUseCase,s.DeleteDeviceUseCase,s.GetDeviceOnboardingInfoUseCase,s.CreateDeviceOnboardingTokenUseCase])],c),t.DevicesFacade=c},50360:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.FilesFacade=void 0;const o=r(7071),s=r(60485);let c=class FilesFacade{constructor(e,t,r,n,i,a,o){this.uploadOwnFileUseCase=e,this.loadPeerFileUseCase=t,this.getFilesUseCase=r,this.downloadFileUseCase=n,this.getFileUseCase=i,this.createTokenForFileUseCase=a,this.createTokenQrCodeForFileUseCase=o}async getFiles(e){return await this.getFilesUseCase.execute(e)}async loadPeerFile(e){return await this.loadPeerFileUseCase.execute(e)}async downloadFile(e){return await this.downloadFileUseCase.execute(e)}async getFile(e){return await this.getFileUseCase.execute(e)}async uploadOwnFile(e){return await this.uploadOwnFileUseCase.execute(e)}async createTokenForFile(e){return await this.createTokenForFileUseCase.execute(e)}async createTokenQrCodeForFile(e){return await this.createTokenQrCodeForFileUseCase.execute(e)}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),a(5,o.Inject),a(6,o.Inject),i("design:paramtypes",[s.UploadOwnFileUseCase,s.LoadPeerFileUseCase,s.GetFilesUseCase,s.DownloadFileUseCase,s.GetFileUseCase,s.CreateTokenForFileUseCase,s.CreateTokenQrCodeForFileUseCase])],c),t.FilesFacade=c},91106:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityFacade=void 0;const o=r(7071),s=r(60485);let c=class IdentityFacade{constructor(e){this.checkIdentityUseCase=e}async checkIdentity(e){return await this.checkIdentityUseCase.execute(e)}};c=n([a(0,o.Inject),i("design:paramtypes",[s.CheckIdentityUseCase])],c),t.IdentityFacade=c},81532:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MessagesFacade=void 0;const o=r(7071),s=r(60485);let c=class MessagesFacade{constructor(e,t,r,n,i){this.getMessagesUseCase=e,this.getMessageUseCase=t,this.sendMessageUseCase=r,this.downloadAttachmentUseCase=n,this.getAttachmentMetadataUseCase=i}async sendMessage(e){return await this.sendMessageUseCase.execute(e)}async getMessages(e){return await this.getMessagesUseCase.execute(e)}async getMessage(e){return await this.getMessageUseCase.execute(e)}async downloadAttachment(e){return await this.downloadAttachmentUseCase.execute(e)}async getAttachmentMetadata(e){return await this.getAttachmentMetadataUseCase.execute(e)}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),i("design:paramtypes",[s.GetMessagesUseCase,s.GetMessageUseCase,s.SendMessageUseCase,s.DownloadAttachmentUseCase,s.GetAttachmentMetadataUseCase])],c),t.MessagesFacade=c},47349:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplatesFacade=void 0;const o=r(7071),s=r(60485);let c=class RelationshipTemplatesFacade{constructor(e,t,r,n,i,a){this.createOwnRelationshipTemplateUseCase=e,this.loadPeerRelationshipTemplateUseCase=t,this.getRealtionshipTemplatesUseCase=r,this.getRelationshipTemplateUseCase=n,this.createTokenQrCodeForOwnTemplateUseCase=i,this.createTokenForOwnTemplateUseCase=a}async createOwnRelationshipTemplate(e){return await this.createOwnRelationshipTemplateUseCase.execute(e)}async loadPeerRelationshipTemplate(e){return await this.loadPeerRelationshipTemplateUseCase.execute(e)}async getRelationshipTemplates(e){return await this.getRealtionshipTemplatesUseCase.execute(e)}async getRelationshipTemplate(e){return await this.getRelationshipTemplateUseCase.execute(e)}async createTokenQrCodeForOwnTemplate(e){return await this.createTokenQrCodeForOwnTemplateUseCase.execute(e)}async createTokenForOwnTemplate(e){return await this.createTokenForOwnTemplateUseCase.execute(e)}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),a(5,o.Inject),i("design:paramtypes",[s.CreateOwnRelationshipTemplateUseCase,s.LoadPeerRelationshipTemplateUseCase,s.GetRelationshipTemplatesUseCase,s.GetRelationshipTemplateUseCase,s.CreateTokenQrCodeForOwnTemplateUseCase,s.CreateTokenForOwnTemplateUseCase])],c),t.RelationshipTemplatesFacade=c},98586:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipsFacade=void 0;const o=r(7071),s=r(60485);let c=class RelationshipsFacade{constructor(e,t,r,n,i,a,o,s){this.getRelationshipsUseCase=e,this.getRelationshipUseCase=t,this.getRelationshipByAddressUseCase=r,this.createRelationshipUseCase=n,this.createRelationshipChangeUseCase=i,this.acceptRelationshipChangeUseCase=a,this.rejectRelationshipChangeUseCase=o,this.revokeRelationshipChangeUseCase=s}async getRelationships(e){return await this.getRelationshipsUseCase.execute(e)}async getRelationship(e){return await this.getRelationshipUseCase.execute(e)}async getRelationshipByAddress(e){return await this.getRelationshipByAddressUseCase.execute(e)}async createRelationship(e){return await this.createRelationshipUseCase.execute(e)}async createRelationshipChange(e){return await this.createRelationshipChangeUseCase.execute(e)}async acceptRelationshipChange(e){return await this.acceptRelationshipChangeUseCase.execute(e)}async rejectRelationshipChange(e){return await this.rejectRelationshipChangeUseCase.execute(e)}async revokeRelationshipChange(e){return await this.revokeRelationshipChangeUseCase.execute(e)}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),a(5,o.Inject),a(6,o.Inject),a(7,o.Inject),i("design:paramtypes",[s.GetRelationshipsUseCase,s.GetRelationshipUseCase,s.GetRelationshipByAddressUseCase,s.CreateRelationshipUseCase,s.CreateRelationshipChangeUseCase,s.AcceptRelationshipChangeUseCase,s.RejectRelationshipChangeUseCase,s.RevokeRelationshipChangeUseCase])],c),t.RelationshipsFacade=c},75392:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TokensFacade=void 0;const o=r(7071),s=r(60485);let c=class TokensFacade{constructor(e,t,r,n,i){this.createOwnTokenUseCase=e,this.loadPeerTokenUseCase=t,this.getTokensUseCase=r,this.getTokenUseCase=n,this.getQRCodeForTokenUseCase=i}async createOwnToken(e){return await this.createOwnTokenUseCase.execute(e)}async loadPeerToken(e){return await this.loadPeerTokenUseCase.execute(e)}async getTokens(e){return await this.getTokensUseCase.execute(e)}async getToken(e){return await this.getTokenUseCase.execute(e)}async getQRCodeForToken(e){return await this.getQRCodeForTokenUseCase.execute(e)}};c=n([a(0,o.Inject),a(1,o.Inject),a(2,o.Inject),a(3,o.Inject),a(4,o.Inject),i("design:paramtypes",[s.CreateOwnTokenUseCase,s.LoadPeerTokenUseCase,s.GetTokensUseCase,s.GetTokenUseCase,s.GetQRCodeForTokenUseCase])],c),t.TokensFacade=c},19728:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(30941),t),i(r(17974),t),i(r(50360),t),i(r(91106),t),i(r(81532),t),i(r(98586),t),i(r(47349),t),i(r(75392),t)},5200:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(27371),t),i(r(4629),t),i(r(22432),t),i(r(55372),t),i(r(34164),t)},22432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeModule=void 0;t.RuntimeModule=class RuntimeModule{get name(){return this.configuration.name}get displayName(){return this.configuration.displayName}}},55372:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesIterator=t.RuntimeModuleRegistry=void 0;class RuntimeModuleRegistry{constructor(){this.modules=[]}getByName(e){return this.modules.find((t=>t.name.toLowerCase()===e.toLowerCase()))}add(e){this.modules.push(e)}toArray(){return this.modules.slice()}[Symbol.iterator](){return new ModulesIterator(this.modules)}}t.RuntimeModuleRegistry=RuntimeModuleRegistry;class ModulesIterator{constructor(e){this.items=e,this.currentIndex=0}next(e){return{value:this.items[this.currentIndex++],done:this.currentIndex>this.items.length}}}t.ModulesIterator=ModulesIterator},65590:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(2500),t),i(r(34086),t),i(r(42205),t),i(r(5200),t),i(r(49662),t),i(r(6984),t),i(r(59757),t),i(r(986),t),i(r(83377),t),i(r(60485),t)},86432:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(25030),i=r(42205),a=r(34209),o=r(87834),s=r(49935),c=r(66589),l=r(22432);class MessageModule extends l.RuntimeModule{init(){}start(){this.messageReceivedSubscription=this.runtime.eventBus.subscribe(i.MessageReceivedEvent,this.handleMessageReceived)}async handleMessageReceived(e){const t=e.data;this.logger.trace(`Incoming MessageReceivedEvent for ${t.id}`);let r;switch(t.content["@type"]){case"Mail":const i=await n.Mail.from(t.content);r=new a.MailReceivedEvent(e.eventTargetAddress,i,t),this.runtime.eventBus.publish(r),this.logger.trace(`Published MailReceivedEvent for ${t.id}`);break;case"RequestMail":const o=await n.RequestMail.from(t.content);r=new s.RequestMailReceivedEvent(e.eventTargetAddress,o,t),this.runtime.eventBus.publish(r),this.logger.trace(`Published RequestMailReceivedEvent for ${t.id}`);let l=0;for(const r of o.requests)this.runtime.eventBus.publish(new c.RequestReceivedEvent(e.eventTargetAddress,r,t)),this.logger.trace(`Published RequestReceivedEvent request #${l} of RequestMail ${t.id}`),l++;break;default:return}const i=await this.runtime.transportServices.relationships.getRelationshipByAddress({address:t.createdBy});if(!i.isSuccess)return void this.logger.error(`Could not find relationship for address '${t.createdBy}'.`,i.error);const l=i.value;this.runtime.eventBus.publish(new o.RelationshipEvent(e.eventTargetAddress,r,l)),this.logger.trace(`Published RelationshipEvent for ${t.id} to ${l.id}`)}stop(){this.runtime.eventBus.unsubscribe(i.MessageReceivedEvent,this.messageReceivedSubscription)}}t.default=MessageModule},49662:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(86432),t)},25953:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},61776:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5292:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},58162:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},13899:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},77744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},17564:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},34009:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},87946:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(61776),t),i(r(5292),t),i(r(58162),t),i(r(13899),t),i(r(77744),t),i(r(17564),t),i(r(34009),t)},83377:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(87946),t),i(r(25953),t),i(r(70450),t)},77891:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},59475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},13462:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},46261:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},40641:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},55968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},82944:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipChangeType=t.RelationshipChangeStatus=void 0,function(e){e.Pending="Pending",e.Rejected="Rejected",e.Revoked="Revoked",e.Accepted="Accepted"}(t.RelationshipChangeStatus||(t.RelationshipChangeStatus={})),function(e){e.Creation="Creation",e.Termination="Termination",e.TerminationCancellation="TerminationCancellation"}(t.RelationshipChangeType||(t.RelationshipChangeType={}))},2220:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipStatus=void 0,function(e){e.Pending="Pending",e.Active="Active",e.Rejected="Rejected",e.Revoked="Revoked",e.Terminating="Terminating",e.Terminated="Terminated"}(t.RelationshipStatus||(t.RelationshipStatus={}))},16081:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},44561:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},70450:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(77891),t),i(r(59475),t),i(r(13462),t),i(r(46261),t),i(r(86623),t),i(r(40641),t),i(r(55968),t),i(r(82944),t),i(r(2220),t),i(r(16081),t),i(r(44561),t)},49365:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(7771),t)},70807:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenAnonymousByIdAndKeyUseCase=void 0;const o=r(75172),s=r(82890),c=r(19663),l=r(7071),u=r(7049),d=r(57121);class LoadPeerTokenAnonymousByIdAndKeyRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(u.IdValidator.required(c.BackboneIds.token)),this.validateIfString((e=>e.secretKey)).isNotNull()}}let f=class LoadPeerTokenAnonymousByIdAndKeyUseCase extends u.UseCase{constructor(e,t){super(t),this.anonymousTokenController=e}async executeInternal(e){const t=await s.CryptoSecretKey.fromBase64(e.secretKey),r=await this.anonymousTokenController.loadPeerToken(c.CoreId.from(e.id),t);return o.Result.ok(await d.TokenMapper.toTokenDTO(r,!0))}};f=n([a(0,l.Inject),a(1,l.Inject),i("design:paramtypes",[c.AnonymousTokenController,LoadPeerTokenAnonymousByIdAndKeyRequestValidator])],f),t.LoadPeerTokenAnonymousByIdAndKeyUseCase=f},86297:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(57121);class LoadPeerTokenAnonymousByTruncatedReferenceRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.reference)).isNotNull()}}let d=class LoadPeerTokenAnonymousByTruncatedReferenceUseCase extends l.UseCase{constructor(e,t){super(t),this.anonymousTokenController=e}async executeInternal(e){const t=await this.anonymousTokenController.loadPeerTokenByTruncated(e.reference);return o.Result.ok(await u.TokenMapper.toTokenDTO(t,!0))}};d=n([a(0,c.Inject),a(1,c.Inject),i("design:paramtypes",[s.AnonymousTokenController,LoadPeerTokenAnonymousByTruncatedReferenceRequestValidator])],d),t.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=d},7771:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(70807),t),i(r(86297),t)},56819:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OwnerRestriction=void 0,function(e){e.Own="o",e.Peer="p"}(t.OwnerRestriction||(t.OwnerRestriction={}))},48728:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformErrorCodes=void 0;class PlatformErrorCodes{static isNotFoundError(e){return e.code===PlatformErrorCodes.NOT_FOUND}static isValidationError(e){return e.code.startsWith("error.platform.validation")}static isUnexpectedError(e){return e.code.startsWith("error.platform.validation")}}t.PlatformErrorCodes=PlatformErrorCodes,PlatformErrorCodes.NOT_FOUND="error.platform.recordNotFound",PlatformErrorCodes.UNAUTHORIZED="error.platform.unauthorized",PlatformErrorCodes.FORBIDDEN="error.platform.forbidden",PlatformErrorCodes.INVALID_PROPERTY_VALUE="error.platform.invalidPropertyValue",PlatformErrorCodes.UNEXPECTED="error.platform.unexpected"},73832:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.QRCode=void 0;const o=a(r(92592));class QRCode{constructor(e){this.base64=e}asBase64(){return this.base64}static async from(e){const t=(await o.toDataURL(`nmshd://qr#${e}`)).split(",")[1];return new QRCode(t)}}t.QRCode=QRCode},6595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeErrors=void 0;const n=r(75172);class RuntimeErrors{}t.RuntimeErrors=RuntimeErrors,RuntimeErrors.general=new class General{unknown(e,t){return new n.ApplicationError("error.runtime.unknown",e,t)}alreadyInitialized(){return new n.ApplicationError("error.runtime.alreadyInitialized","The runtime is already initialized. The init method can only be executed once.")}notInitialized(){return new n.ApplicationError("error.runtime.notInitialized","The runtime is not initialized. You must run init before you can start or stop the runtime.")}alreadyStarted(){return new n.ApplicationError("error.runtime.alreadyStarted","The runtime is already started. You should stop it first for a restart.")}notStarted(){return new n.ApplicationError("error.runtime.notStarted","The runtime is not started. You should start it before stopping.")}recordNotFound(e){return this.recordNotFoundWithMessage(`${e instanceof Function?e.name:e} not found. Make sure the ID exists and the record is not expired.`)}recordNotFoundWithMessage(e){return new n.ApplicationError("error.runtime.recordNotFound",e)}unauthorized(){return new n.ApplicationError("error.runtime.unauthorized","Unauthorized.")}missingRequiredProperty(e){return new n.ApplicationError("error.runtime.validation.missingRequiredProperty",`'${e}' must not be empty.`)}invalidPropertyValue(e,t){return new n.ApplicationError("error.runtime.validation.invalidPropertyValue",null!=t?t:`The value of '${e}' is not valid.`)}invalidPayload(e){return new n.ApplicationError("error.runtime.validation.invalidPayload",null!=e?e:"The given combination of properties in the payload is not supported.")}notImplemented(){return new n.ApplicationError("error.runtime.methodNotImplemented","The requested method is not yet implemented.")}invalidTokenContent(){return new n.ApplicationError("error.runtime.invalidTokenContent","The given token has an invalid content for this route.")}cacheEmpty(e,t){return new n.ApplicationError("error.runtime.cacheEmpty",`The cache of ${e instanceof Function?e.name:e} with id '${t}' is empty.`)}},RuntimeErrors.serval=new class Serval{unknownType(e){return new n.ApplicationError("error.runtime.unknownType",e)}general(e){return new n.ApplicationError("error.runtime.servalError",e)}requestDeserialization(e){return new n.ApplicationError("error.runtime.requestDeserialization",e)}},RuntimeErrors.startup=new class Startup{noIdentityFound(){return new n.ApplicationError("error.runtime.startup.noIdentityFound","No identity information could be found. Please check your database integrity.")}noActiveAccount(){return new n.ApplicationError("error.runtime.startup.noActiveAccount","No AccountController could be found. You might have to login first.")}noActiveConsumptionController(){return new n.ApplicationError("error.runtime.startup.noActiveConsumptionController","No ConsumptionController could be found. You might have to login first.")}noActiveExpander(){return new n.ApplicationError("error.runtime.startup.noActiveExpander","No DataViewExpander could be found. You might have to login first.")}noDatabaseDefined(){return new n.ApplicationError("error.runtime.startup.noDatabaseDefined","No database is defined. Please check the database configuration.")}noPlatformConnection(){return new n.ApplicationError("error.runtime.startup.noPlatformConnection","No platform connection could be established. Please check you network connectivity.")}privateDeviceKeyInvalid(){return new n.ApplicationError("error.runtime.startup.privateDeviceKeyInvalid","The private key of this device seems to be invalid. You should check your config or database connection.")}},RuntimeErrors.database=new class Database{unknown(){return new n.ApplicationError("error.runtime.database.unknown","An unknown database error occured. Please check the logs.")}connectionError(){return new n.ApplicationError("error.runtime.database.connectionError","Connection to database could not be established. Please check the database credentials.")}quotaExceeded(){return new n.ApplicationError("error.runtime.database.quotaExceeded","It seems that the database quota exceeded. Please increase the database size.")}},RuntimeErrors.relationshipTemplates=new class RelationshipTemplates{cannotCreateTokenForPeerTemplate(){return new n.ApplicationError("error.runtime.relationshipRequests.cannotCreateTokenForPeerTemplate","You cannot create a token for a peer template.")}},RuntimeErrors.messages=new class Messages{fileNotFoundInMessage(e){return new n.ApplicationError("error.runtime.messages.fileNotFoundInMessage",`The requested file '${e}' was not found in the given message.`)}},RuntimeErrors.relationshipInfo=new class RelationshipInfo{relationshipInfoExists(e){return new n.ApplicationError("error.runtime.relationshipInfo.relationshipInfoExists",`RelationshipInfo for RelationshipId ${e} already exists. Try to update the RelationshipInfo instead.`)}}},71683:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeValidator=void 0;const n=r(36347);class RuntimeValidator extends n.AbstractValidator{constructor(){super(),this.validateIfAny((e=>e)).isDefined().withFailureMessage("request is undefined")}}t.RuntimeValidator=RuntimeValidator},32746:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonSchema=t.SchemaRepository=void 0;const s=o(r(1581)),c=o(r(33351)),l=o(r(5477)),u={fileId:"FIL[A-z0-9]{17}",relationshipId:"REL[A-z0-9]{17}",messageId:"MSG[A-z0-9]{17}",relationshipTemplateId:"RLT[A-z0-9]{17}",tokenId:"TOK[A-z0-9]{17}",relationshipChangeId:"RCH[A-z0-9]{17}",deviceId:"DVC[A-z0-9]{17}"};t.SchemaRepository=class SchemaRepository{constructor(){this.jsonSchemas=new Map,this.compiler=new s.default({allErrors:!0}),(0,l.default)(this.compiler),(0,c.default)(this.compiler),this.addCustomFormats()}addCustomFormats(){Object.entries(u).forEach((([e,t])=>{this.compiler.addFormat(e,t)}))}async loadSchemas(){this.schemaDefinitions=await Promise.resolve().then((()=>a(r(11873))))}getSchema(e){return this.jsonSchemas.has(e)||this.jsonSchemas.set(e,new JsonSchema(this.getValidationFunction(e))),this.jsonSchemas.get(e)}getValidationFunction(e){return this.compiler.compile(this.getSchemaDefinition(e))}getSchemaDefinition(e){const t=this.schemaDefinitions[e];if(!t)throw new Error(`Schema ${e} not found`);return t}};class JsonSchema{constructor(e){this.validateSchema=e}validate(e){return{isValid:this.validateSchema(e),errors:this.validateSchema.errors?[...this.validateSchema.errors]:void 0}}}t.JsonSchema=JsonSchema},11873:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetFilesRequest=t.GetFileRequest=t.CreateTokenQrCodeForFileRequest=t.CreateTokenForFileRequest=t.UpdateDeviceRequest=t.GetDeviceOnboardingInfoRequest=t.GetDeviceRequest=t.DeleteDeviceRequest=t.CreateDeviceOnboardingTokenRequest=t.CreateDeviceRequest=t.DownloadAttachmentRequest=t.DownloadFileRequest=t.RegisterPushNotificationTokenRequest=t.UpdateSharedItemRequest=t.GetSharedItemsSharedWithAddressRequest=t.GetSharedItemsSharedByAddressRequest=t.GetSharedItemsByReferenceRequest=t.GetSharedItemsByAddressRequest=t.GetSharedItemsRequest=t.GetSharedItemRequest=t.DeleteSharedItemRequest=t.CreateSharedItemRequest=t.UpdateSettingRequest=t.GetSettingsRequest=t.GetSettingRequest=t.DeleteSettingRequest=t.CreateSettingRequest=t.UpdateRelationshipInfoRequest=t.GetRelationshipInfoByRelationshipRequest=t.GetRelationshipInfoRequest=t.DeleteRelationshipInfoByRelationshipRequest=t.DeleteRelationshipInfoRequest=t.CreateRelationshipInfoRequest=t.UpdateDraftRequest=t.GetDraftsRequest=t.GetDraftRequest=t.DeleteDraftRequest=t.CreateDraftRequest=t.UpdateAttributeRequest=t.SucceedAttributeRequest=t.GetHistoryByNameRequest=t.GetAttributesRequest=t.GetAttributeByNameRequest=t.GetAttributeRequest=t.DeleteAttributeByNameRequest=t.DeleteAttributeRequest=t.CreateAttributeRequest=t.GetAttributesByNamesRequest=t.LoadPeerTokenAnonymousByTruncatedReferenceRequest=t.LoadPeerTokenAnonymousByIdAndKeyRequest=void 0,t.LoadPeerTokenRequest=t.GetTokensRequest=t.GetTokenRequest=t.GetQRCodeForTokenRequest=t.CreateOwnTokenRequest=t.LoadPeerRelationshipTemplateRequest=t.GetRelationshipTemplatesRequest=t.GetRelationshipTemplateRequest=t.CreateTokenQrCodeForOwnTemplateRequest=t.CreateTokenForOwnTemplateRequest=t.CreateOwnRelationshipTemplateRequest=t.RevokeRelationshipChangeRequest=t.RejectRelationshipChangeRequest=t.GetRelationshipsRequest=t.GetRelationshipByAddressRequest=t.GetRelationshipRequest=t.CreateRelationshipChangeRequest=t.CreateRelationshipRequest=t.AcceptRelationshipChangeRequest=t.SendMessageRequest=t.GetMessagesRequest=t.GetMessageRequest=t.GetAttachmentMetadataRequest=t.CheckIdentityRequest=t.UploadOwnFileRequest=t.LoadPeerFileRequest=t.LoadPeerFileViaReferenceRequest=t.LoadPeerFileViaSecretRequest=void 0,t.LoadPeerTokenAnonymousByIdAndKeyRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenAnonymousByIdAndKeyRequest",definitions:{LoadPeerTokenAnonymousByIdAndKeyRequest:{type:"object",properties:{id:{type:"string"},secretKey:{type:"string"}},required:["id","secretKey"],additionalProperties:!1}}},t.LoadPeerTokenAnonymousByTruncatedReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenAnonymousByTruncatedReferenceRequest",definitions:{LoadPeerTokenAnonymousByTruncatedReferenceRequest:{type:"object",properties:{reference:{type:"string"}},required:["reference"],additionalProperties:!1}}},t.GetAttributesByNamesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributesByNamesRequest",definitions:{GetAttributesByNamesRequest:{type:"object",additionalProperties:!1}}},t.CreateAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateAttributeRequest",definitions:{CreateAttributeRequest:{type:"object",properties:{attribute:{$ref:"#/definitions/IAttribute"}},required:["attribute"],additionalProperties:!1},IAttribute:{type:"object",properties:{name:{type:"string"},value:{},validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"}},required:["name","value"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1}}},t.DeleteAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteAttributeRequest",definitions:{DeleteAttributeRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.DeleteAttributeByNameRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteAttributeByNameRequest",definitions:{DeleteAttributeByNameRequest:{type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1}}},t.GetAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributeRequest",definitions:{GetAttributeRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetAttributeByNameRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributeByNameRequest",definitions:{GetAttributeByNameRequest:{type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1}}},t.GetAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributesRequest",definitions:{GetAttributesRequest:{type:"object",additionalProperties:!1}}},t.GetHistoryByNameRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetHistoryByNameRequest",definitions:{GetHistoryByNameRequest:{type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1}}},t.SucceedAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SucceedAttributeRequest",definitions:{SucceedAttributeRequest:{type:"object",properties:{attribute:{$ref:"#/definitions/IAttribute"},validFrom:{type:"string"}},required:["attribute"],additionalProperties:!1},IAttribute:{type:"object",properties:{name:{type:"string"},value:{},validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"}},required:["name","value"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1}}},t.UpdateAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateAttributeRequest",definitions:{UpdateAttributeRequest:{type:"object",properties:{id:{type:"string"},attribute:{$ref:"#/definitions/IAttribute"}},required:["id","attribute"],additionalProperties:!1},IAttribute:{type:"object",properties:{name:{type:"string"},value:{},validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"}},required:["name","value"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1}}},t.CreateDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDraftRequest",definitions:{CreateDraftRequest:{type:"object",properties:{content:{},type:{type:"string"}},required:["content"],additionalProperties:!1}}},t.DeleteDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteDraftRequest",definitions:{DeleteDraftRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDraftRequest",definitions:{GetDraftRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetDraftsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDraftsRequest",definitions:{GetDraftsRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},t.UpdateDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateDraftRequest",definitions:{UpdateDraftRequest:{type:"object",properties:{id:{type:"string"},content:{}},required:["id","content"],additionalProperties:!1}}},t.CreateRelationshipInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipInfoRequest",definitions:{CreateRelationshipInfoRequest:{type:"object",properties:{relationshipId:{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/RelationshipAttributeDTO"}},isPinned:{type:"boolean"},title:{type:"string"},description:{type:"string"},userTitle:{type:"string"},userDescription:{type:"string"},theme:{$ref:"#/definitions/RelationshipThemeDTO"}},required:["relationshipId","attributes","isPinned","title"],additionalProperties:!1},RelationshipAttributeDTO:{type:"object",properties:{name:{type:"string"},content:{$ref:"#/definitions/AttributeJSON"},sharedItem:{type:"string"}},required:["name","content","sharedItem"],additionalProperties:!1},AttributeJSON:{type:"object",properties:{"@type":{type:"string"},"@schema":{type:"string"},name:{type:"string"},value:{},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","name","value"],additionalProperties:!1},RelationshipThemeDTO:{type:"object",properties:{image:{type:"string"},imageBar:{type:"string"},backgroundColor:{type:"string"},foregroundColor:{type:"string"}},required:["image","imageBar","backgroundColor","foregroundColor"],additionalProperties:!1}}},t.DeleteRelationshipInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteRelationshipInfoRequest",definitions:{DeleteRelationshipInfoRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.DeleteRelationshipInfoByRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteRelationshipInfoByRelationshipRequest",definitions:{DeleteRelationshipInfoByRelationshipRequest:{type:"object",properties:{relationshipId:{type:"string"}},required:["relationshipId"],additionalProperties:!1}}},t.GetRelationshipInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipInfoRequest",definitions:{GetRelationshipInfoRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetRelationshipInfoByRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipInfoByRelationshipRequest",definitions:{GetRelationshipInfoByRelationshipRequest:{type:"object",properties:{relationshipId:{type:"string"}},required:["relationshipId"],additionalProperties:!1}}},t.UpdateRelationshipInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateRelationshipInfoRequest",definitions:{UpdateRelationshipInfoRequest:{type:"object",properties:{id:{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/RelationshipAttributeDTO"}},isPinned:{type:"boolean"},title:{type:"string"},description:{type:"string"},userTitle:{type:"string"},userDescription:{type:"string"},theme:{$ref:"#/definitions/RelationshipThemeDTO"}},required:["id"],additionalProperties:!1,description:"Overwrite a RelationshipInfo's attributes with the request's corresponding fields. Undefined fields in the request will leave the corresponding RelationshipInfo's attributes untouched."},RelationshipAttributeDTO:{type:"object",properties:{name:{type:"string"},content:{$ref:"#/definitions/AttributeJSON"},sharedItem:{type:"string"}},required:["name","content","sharedItem"],additionalProperties:!1},AttributeJSON:{type:"object",properties:{"@type":{type:"string"},"@schema":{type:"string"},name:{type:"string"},value:{},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","name","value"],additionalProperties:!1},RelationshipThemeDTO:{type:"object",properties:{image:{type:"string"},imageBar:{type:"string"},backgroundColor:{type:"string"},foregroundColor:{type:"string"}},required:["image","imageBar","backgroundColor","foregroundColor"],additionalProperties:!1}}},t.CreateSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateSettingRequest",definitions:{CreateSettingRequest:{type:"object",properties:{key:{type:"string"},value:{},reference:{type:"string"},scope:{type:"string"},succeedsAt:{type:"string"},succeedsItem:{type:"string"}},required:["key","value"],additionalProperties:!1}}},t.DeleteSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteSettingRequest",definitions:{DeleteSettingRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingRequest",definitions:{GetSettingRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetSettingsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingsRequest",definitions:{GetSettingsRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},t.UpdateSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateSettingRequest",definitions:{UpdateSettingRequest:{type:"object",properties:{id:{type:"string"},value:{}},required:["id","value"],additionalProperties:!1}}},t.CreateSharedItemRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateSharedItemRequest",definitions:{CreateSharedItemRequest:{type:"object",properties:{tags:{type:"array",items:{type:"string"}},sharedBy:{type:"string"},sharedWith:{type:"string"},sharedAt:{type:"string"},reference:{type:"string"},content:{},succeedsItem:{type:"string"},succeedsAt:{type:"string"},expiresAt:{type:"string"}},required:["sharedBy","sharedWith","sharedAt","content"],additionalProperties:!1}}},t.DeleteSharedItemRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteSharedItemRequest",definitions:{DeleteSharedItemRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetSharedItemRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedItemRequest",definitions:{GetSharedItemRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetSharedItemsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedItemsRequest",definitions:{GetSharedItemsRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},t.GetSharedItemsByAddressRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedItemsByAddressRequest",definitions:{GetSharedItemsByAddressRequest:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1}}},t.GetSharedItemsByReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedItemsByReferenceRequest",definitions:{GetSharedItemsByReferenceRequest:{type:"object",properties:{reference:{type:"string"}},required:["reference"],additionalProperties:!1}}},t.GetSharedItemsSharedByAddressRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedItemsSharedByAddressRequest",definitions:{GetSharedItemsSharedByAddressRequest:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1}}},t.GetSharedItemsSharedWithAddressRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedItemsSharedWithAddressRequest",definitions:{GetSharedItemsSharedWithAddressRequest:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1}}},t.UpdateSharedItemRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateSharedItemRequest",definitions:{UpdateSharedItemRequest:{type:"object",properties:{id:{type:"string"},content:{}},required:["id","content"],additionalProperties:!1}}},t.RegisterPushNotificationTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RegisterPushNotificationTokenRequest",definitions:{RegisterPushNotificationTokenRequest:{type:"object",properties:{handle:{type:"string"},installationId:{type:"string"},platform:{type:"string"}},required:["handle","installationId","platform"],additionalProperties:!1}}},t.DownloadFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DownloadFileRequest",definitions:{DownloadFileRequest:{type:"object",properties:{id:{type:"string",format:"fileId"}},required:["id"],additionalProperties:!1}}},t.DownloadAttachmentRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DownloadAttachmentRequest",definitions:{DownloadAttachmentRequest:{type:"object",properties:{id:{type:"string"},attachmentId:{type:"string"}},required:["id","attachmentId"],additionalProperties:!1}}},t.CreateDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceRequest",definitions:{CreateDeviceRequest:{type:"object",properties:{name:{type:"string"},description:{type:"string"},isAdmin:{type:"boolean"}},additionalProperties:!1}}},t.CreateDeviceOnboardingTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceOnboardingTokenRequest",definitions:{CreateDeviceOnboardingTokenRequest:{type:"object",properties:{id:{type:"string"},expiresAt:{type:"string"}},required:["id"],additionalProperties:!1}}},t.DeleteDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteDeviceRequest",definitions:{DeleteDeviceRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDeviceRequest",definitions:{GetDeviceRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetDeviceOnboardingInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDeviceOnboardingInfoRequest",definitions:{GetDeviceOnboardingInfoRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.UpdateDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateDeviceRequest",definitions:{UpdateDeviceRequest:{type:"object",properties:{id:{type:"string"},name:{type:"string"},description:{type:"string"}},required:["id"],additionalProperties:!1}}},t.CreateTokenForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenForFileRequest",definitions:{CreateTokenForFileRequest:{type:"object",properties:{fileId:{type:"string",format:"fileId"},expiresAt:{type:"string",format:"date-time"},ephemeral:{type:"boolean"}},required:["fileId"],additionalProperties:!1}}},t.CreateTokenQrCodeForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenQrCodeForFileRequest",definitions:{CreateTokenQrCodeForFileRequest:{type:"object",properties:{fileId:{type:"string",format:"fileId"},expiresAt:{type:"string",format:"date-time"}},required:["fileId"],additionalProperties:!1}}},t.GetFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetFileRequest",definitions:{GetFileRequest:{type:"object",properties:{id:{type:"string",format:"fileId"}},required:["id"],additionalProperties:!1}}},t.GetFilesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetFilesRequest",definitions:{GetFilesRequest:{type:"object",properties:{query:{},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.LoadPeerFileViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerFileViaSecretRequest",definitions:{LoadPeerFileViaSecretRequest:{type:"object",properties:{id:{type:"string",format:"fileId"},secretKey:{type:"string",minLength:100}},required:["id","secretKey"],additionalProperties:!1}}},t.LoadPeerFileViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerFileViaReferenceRequest",definitions:{LoadPeerFileViaReferenceRequest:{type:"object",properties:{reference:{type:"string",pattern:"VE9L.{84}"}},required:["reference"],additionalProperties:!1,errorMessage:"token reference invalid"}}},t.LoadPeerFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerFileRequest",definitions:{LoadPeerFileRequest:{anyOf:[{$ref:"#/definitions/LoadPeerFileViaSecretRequest"},{$ref:"#/definitions/LoadPeerFileViaReferenceRequest"}]},LoadPeerFileViaSecretRequest:{type:"object",properties:{id:{type:"string",format:"fileId"},secretKey:{type:"string",minLength:100}},required:["id","secretKey"],additionalProperties:!1},LoadPeerFileViaReferenceRequest:{type:"object",properties:{reference:{type:"string",pattern:"VE9L.{84}"}},required:["reference"],additionalProperties:!1,errorMessage:"token reference invalid"}}},t.UploadOwnFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UploadOwnFileRequest",definitions:{UploadOwnFileRequest:{type:"object",properties:{content:{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}},filename:{type:"string"},mimetype:{type:"string"},expiresAt:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["content","filename","mimetype","expiresAt","title"],additionalProperties:!1}}},t.CheckIdentityRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CheckIdentityRequest",definitions:{CheckIdentityRequest:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1}}},t.GetAttachmentMetadataRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttachmentMetadataRequest",definitions:{GetAttachmentMetadataRequest:{type:"object",properties:{id:{type:"string"},attachmentId:{type:"string"}},required:["id","attachmentId"],additionalProperties:!1}}},t.GetMessageRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetMessageRequest",definitions:{GetMessageRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetMessagesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetMessagesRequest",definitions:{GetMessagesRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},t.SendMessageRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SendMessageRequest",definitions:{SendMessageRequest:{type:"object",properties:{recipients:{type:"array",items:{type:"string"}},content:{},attachments:{type:"array",items:{type:"string"}}},required:["recipients","content"],additionalProperties:!1}}},t.AcceptRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/AcceptRelationshipChangeRequest",definitions:{AcceptRelationshipChangeRequest:{type:"object",properties:{relationshipId:{type:"string"},changeId:{type:"string"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1}}},t.CreateRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipRequest",definitions:{CreateRelationshipRequest:{type:"object",properties:{templateId:{type:"string"},content:{}},required:["templateId","content"],additionalProperties:!1}}},t.CreateRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipChangeRequest",definitions:{CreateRelationshipChangeRequest:{type:"object",properties:{id:{type:"string"},content:{}},required:["id"],additionalProperties:!1}}},t.GetRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipRequest",definitions:{GetRelationshipRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetRelationshipByAddressRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipByAddressRequest",definitions:{GetRelationshipByAddressRequest:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1}}},t.GetRelationshipsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipsRequest",definitions:{GetRelationshipsRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},t.RejectRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RejectRelationshipChangeRequest",definitions:{RejectRelationshipChangeRequest:{type:"object",properties:{relationshipId:{type:"string"},changeId:{type:"string"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1}}},t.RevokeRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RevokeRelationshipChangeRequest",definitions:{RevokeRelationshipChangeRequest:{type:"object",properties:{relationshipId:{type:"string"},changeId:{type:"string"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1}}},t.CreateOwnRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOwnRelationshipTemplateRequest",definitions:{CreateOwnRelationshipTemplateRequest:{type:"object",properties:{expiresAt:{type:"string"},content:{},maxNumberOfRelationships:{type:"number"}},required:["expiresAt","content"],additionalProperties:!1}}},t.CreateTokenForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenForOwnTemplateRequest",definitions:{CreateTokenForOwnTemplateRequest:{type:"object",properties:{templateId:{type:"string"},expiresAt:{type:"string"},ephemeral:{type:"boolean"}},required:["templateId"],additionalProperties:!1}}},t.CreateTokenQrCodeForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenQrCodeForOwnTemplateRequest",definitions:{CreateTokenQrCodeForOwnTemplateRequest:{type:"object",properties:{templateId:{type:"string"},expiresAt:{type:"string"}},required:["templateId"],additionalProperties:!1}}},t.GetRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipTemplateRequest",definitions:{GetRelationshipTemplateRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetRelationshipTemplatesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipTemplatesRequest",definitions:{GetRelationshipTemplatesRequest:{type:"object",properties:{query:{},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.LoadPeerRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateRequest",definitions:{LoadPeerRelationshipTemplateRequest:{type:"object",properties:{id:{type:"string"},secretKey:{type:"string"},reference:{type:"string"}},additionalProperties:!1}}},t.CreateOwnTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOwnTokenRequest",definitions:{CreateOwnTokenRequest:{type:"object",properties:{content:{},expiresAt:{type:"string"},ephemeral:{type:"boolean"}},required:["content","expiresAt","ephemeral"],additionalProperties:!1}}},t.GetQRCodeForTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetQRCodeForTokenRequest",definitions:{GetQRCodeForTokenRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetTokenRequest",definitions:{GetTokenRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},t.GetTokensRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetTokensRequest",definitions:{GetTokensRequest:{type:"object",properties:{query:{},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.LoadPeerTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenRequest",definitions:{LoadPeerTokenRequest:{type:"object",properties:{id:{type:"string"},secretKey:{type:"string"},reference:{type:"string"},ephemeral:{type:"boolean"}},required:["ephemeral"],additionalProperties:!1}}}},45420:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UseCase=void 0;const i=r(90194),a=r(75172),o=r(19663),s=n(r(64530)),c=r(48728),l=r(6595);t.UseCase=class UseCase{constructor(e){this.requestValidator=e}async execute(e){if(this.requestValidator){const t=this.requestValidator.validate(e);if(t.isInvalid())return this.validationFailed(t)}try{return await this.executeInternal(e)}catch(e){return this.failingResultFromUnknownError(e)}}failingResultFromUnknownError(e){return e instanceof Error?e instanceof o.RequestError?this.handleRequestError(e):e instanceof i.ServalError?this.handleServalError(e):e instanceof a.ApplicationError?a.Result.fail(e):a.Result.fail(l.RuntimeErrors.general.unknown(`An error was thrown in a UseCase: ${e.message}`,e)):a.Result.fail(l.RuntimeErrors.general.unknown(`An unknown object was thrown in a UseCase: ${(0,s.default)(e)}`,e))}handleServalError(e){let t;return t=e instanceof i.ParsingError||e instanceof i.ValidationError?l.RuntimeErrors.serval.requestDeserialization(e.message):e.message.match(/Type '.+' was not found within reflection classes. You might have to install a module first./)?l.RuntimeErrors.serval.unknownType(e.message):l.RuntimeErrors.serval.general(e.message),t.stack=e.stack,a.Result.fail(t)}handleRequestError(e){return c.PlatformErrorCodes.isNotFoundError(e)?a.Result.fail(l.RuntimeErrors.general.recordNotFoundWithMessage(e.reason)):c.PlatformErrorCodes.isValidationError(e)||c.PlatformErrorCodes.isUnexpectedError(e)?a.Result.fail(new a.ApplicationError(e.code,e.message)):a.Result.fail(e)}validationFailed(e){var t,r,n;const i=e.getFailures()[0],o=null!==(t=i.code)&&void 0!==t?t:l.RuntimeErrors.general.invalidPropertyValue().code,s=null!==(n=null===(r=i.message)||void 0===r?void 0:r.replace(/\$propertyName/g,i.propertyName))&&void 0!==n?n:l.RuntimeErrors.general.invalidPropertyValue(i.propertyName).message;return a.Result.fail(new a.ApplicationError(o,s))}}},7049:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(56819),t),i(r(73832),t),i(r(6595),t),i(r(71683),t),i(r(32746),t),i(r(45420),t),i(r(20263),t),i(r(43492),t),i(r(43519),t),i(r(16648),t),i(r(53800),t)},20263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressValidator=void 0;const n=r(36347);class AddressValidator extends n.AbstractValidator{constructor(e){super();let t=this.validateIfString((e=>e));e||(t=t.isNotNull()),t=t.hasLengthBetween(35,36),e&&t.whenNotNull()}static required(){return new AddressValidator(!1)}static optional(){return new AddressValidator(!0)}}t.AddressValidator=AddressValidator},43492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateValidator=void 0;const n=r(36347),i=r(99490);class DateValidator extends n.AbstractValidator{constructor(e){super();let t=this.validateIfString((e=>e));e||(t=t.isNotNull()),t=t.fulfills((e=>i.DateTime.fromISO(e).isValid)),e&&t.whenNotNull()}static required(){return new DateValidator(!1)}static optional(){return new DateValidator(!0)}}t.DateValidator=DateValidator},43519:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdValidator=void 0;const n=r(36347);class IdValidator extends n.AbstractValidator{constructor(e,t){super();let r=this.validateIfString((e=>e));e||(r=r.isNotNull()),r=r.fulfills((e=>t.validate(e))),e&&r.whenNotNull()}static required(e){return new IdValidator(!1,e)}static optional(e){return new IdValidator(!0,e)}}t.IdValidator=IdValidator},16648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipAttributeDTOValidator=void 0;const n=r(3850),i=r(36347);class RelationshipAttributeDTOValidator extends i.AbstractValidator{constructor(){super(),this.validateIfString((e=>e.sharedItem)).fulfills((e=>n.ConsumptionIds.sharedItem.validate(e)))}static required(){return new RelationshipAttributeDTOValidator}}t.RelationshipAttributeDTOValidator=RelationshipAttributeDTOValidator},53800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaValidator=void 0;const n=r(36347);t.SchemaValidator=class SchemaValidator{constructor(e){this.schema=e}validate(e){const t=this.schema.validate(e);return this.convertValidationResult(t)}convertValidationResult(e){const t=new n.ValidationResult;return e.isValid||t.addFailures(e.errors.map(this.schemaErrorToValidationFailure)),t}schemaErrorToValidationFailure(e){const t=`${e.instancePath} ${e.message}`.replace(/^\//,"").replace(/"/g,"").trim();return new n.ValidationFailure(void 0,e.instancePath,void 0,void 0,t)}}},41192:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMapper=void 0;class AttributeMapper{static toAttributeDTO(e){return{id:e.id.toString(),content:e.content.toJSON(),createdAt:e.createdAt.toString()}}static toAttributeDTOList(e){return e.map((e=>this.toAttributeDTO(e)))}static toGetAttributesByNamesResponse(e){const t={};for(const r in e)t[r]=AttributeMapper.toAttributeDTO(e[r]);return t}}t.AttributeMapper=AttributeMapper},17716:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateAttributeUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049),d=r(41192);class CreateAttributeRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIf((e=>e.attribute)).isDefined(),this.validateIfString((e=>e.attribute.name)).isNotEmpty()}}let f=class CreateAttributeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=await s.ConsumptionAttribute.fromAttribute(e.attribute),r=await this.attributeController.createAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(d.AttributeMapper.toAttributeDTO(r))}};f=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.ConsumptionAttributesController,c.AccountController,CreateAttributeRequestValidator])],f),t.CreateAttributeUseCase=f},26899:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteAttributeUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049);class DeleteAttributeRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(u.IdValidator.required(s.ConsumptionIds.attribute))}}let d=class DeleteAttributeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=await this.attributeController.getAttribute(c.CoreId.from(e.id));return t?(await this.attributeController.deleteAttribute(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.ConsumptionAttribute))}};d=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.ConsumptionAttributesController,c.AccountController,DeleteAttributeRequestValidator])],d),t.DeleteAttributeUseCase=d},14856:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteAttributeByNameUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049);class DeleteAttributeByNameRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.name)).isDefined()}}let d=class DeleteAttributeByNameUseCase extends u.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=await this.attributeController.getAttributeByName(e.name);return t?(await this.attributeController.deleteAttribute(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.ConsumptionAttribute))}};d=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.ConsumptionAttributesController,c.AccountController,DeleteAttributeByNameRequestValidator])],d),t.DeleteAttributeByNameUseCase=d},14746:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAllValidUseCase=void 0;const o=r(75172),s=r(3850),c=r(7071),l=r(7049),u=r(41192);let d=class GetAllValidUseCase extends l.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(){const e=await this.attributeController.getValidAttributes();return o.Result.ok(u.AttributeMapper.toAttributeDTOList(e))}};d=n([a(0,c.Inject),i("design:paramtypes",[s.ConsumptionAttributesController])],d),t.GetAllValidUseCase=d},73421:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeUseCase=void 0;const o=r(75172),s=r(3850),c=r(25030),l=r(19663),u=r(7071),d=r(7049),f=r(41192);class GetAttributeRequestValidator extends d.RuntimeValidator{constructor(){super(),this.validateIf((e=>e.id)).fulfills(d.IdValidator.required(s.ConsumptionIds.attribute))}}let p=class GetAttributeUseCase extends d.UseCase{constructor(e,t){super(t),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.getAttribute(l.CoreId.from(e.id));return t?o.Result.ok(f.AttributeMapper.toAttributeDTO(t)):o.Result.fail(d.RuntimeErrors.general.recordNotFound(c.Attribute))}};p=n([a(0,u.Inject),a(1,u.Inject),i("design:paramtypes",[s.ConsumptionAttributesController,GetAttributeRequestValidator])],p),t.GetAttributeUseCase=p},5519:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeByNameUseCase=void 0;const o=r(75172),s=r(3850),c=r(25030),l=r(7071),u=r(7049),d=r(41192);class GetAttributeByNameRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.name)).isNotEmpty()}}let f=class GetAttributeByNameUseCase extends u.UseCase{constructor(e,t){super(t),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.getAttributeByName(e.name);return t?o.Result.ok(d.AttributeMapper.toAttributeDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(c.Attribute))}};f=n([a(0,l.Inject),a(1,l.Inject),i("design:paramtypes",[s.ConsumptionAttributesController,GetAttributeByNameRequestValidator])],f),t.GetAttributeByNameUseCase=f},99536:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributesUseCase=void 0;const o=r(75172),s=r(3850),c=r(7071),l=r(7049),u=r(41192);class GetAttributesRequestValidator extends l.RuntimeValidator{constructor(){super()}}let d=class GetAttributesUseCase extends l.UseCase{constructor(e,t){super(t),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.getAttributes();return o.Result.ok(u.AttributeMapper.toAttributeDTOList(t))}};d=n([a(0,c.Inject),a(1,c.Inject),i("design:paramtypes",[s.ConsumptionAttributesController,GetAttributesRequestValidator])],d),t.GetAttributesUseCase=d},18796:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributesByNamesUseCase=void 0;const o=r(75172),s=r(3850),c=r(7071),l=r(7049),u=r(41192);class GetAttributesByNamesRequestValidator extends l.RuntimeValidator{constructor(){super()}}let d=class GetAttributesByNamesUseCase extends l.UseCase{constructor(e,t){super(t),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.getAttributesByName();return o.Result.ok(u.AttributeMapper.toGetAttributesByNamesResponse(t))}};d=n([a(0,c.Inject),a(1,c.Inject),i("design:paramtypes",[s.ConsumptionAttributesController,GetAttributesByNamesRequestValidator])],d),t.GetAttributesByNamesUseCase=d},16932:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetHistoryByNameUseCase=void 0;const o=r(75172),s=r(3850),c=r(25030),l=r(7071),u=r(7049),d=r(41192);class GetHistoryByNameRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.name)).isDefined()}}let f=class GetHistoryByNameUseCase extends u.UseCase{constructor(e,t){super(t),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.getAttributeHistoryByName(e.name);return 0===t.length?o.Result.fail(u.RuntimeErrors.general.recordNotFound(c.Attribute)):o.Result.ok(d.AttributeMapper.toAttributeDTOList(t))}};f=n([a(0,l.Inject),a(1,l.Inject),i("design:paramtypes",[s.ConsumptionAttributesController,GetHistoryByNameRequestValidator])],f),t.GetHistoryByNameUseCase=f},4415:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SucceedAttributeUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049),d=r(41192);class SucceedAttributeRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIf((e=>e.validFrom)).fulfills(u.DateValidator.optional()),this.validateIf((e=>e.attribute)).isDefined(),this.validateIf((e=>e.attribute.name)).isNotEmpty()}}let f=class SucceedAttributeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=await s.ConsumptionAttribute.fromAttribute(e.attribute),r=await this.attributeController.succeedAttribute(t,e.validFrom?c.CoreDate.from(e.validFrom):void 0);return await this.accountController.syncDatawallet(),o.Result.ok(d.AttributeMapper.toAttributeDTO(r))}};f=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.ConsumptionAttributesController,c.AccountController,SucceedAttributeRequestValidator])],f),t.SucceedAttributeUseCase=f},9660:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateAttributeUseCase=void 0;const o=r(75172),s=r(3850),c=r(25030),l=r(19663),u=r(7071),d=r(7049),f=r(41192);class UpdateAttributeRequestValidator extends d.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(d.IdValidator.required(s.ConsumptionIds.attribute)),this.validateIf((e=>e.attribute)).isDefined(),this.validateIf((e=>e.attribute.name)).isNotEmpty()}}let p=class UpdateAttributeUseCase extends d.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=await this.attributeController.getAttribute(l.CoreId.from(e.id));if(!t)return o.Result.fail(d.RuntimeErrors.general.recordNotFound(s.ConsumptionAttribute));t.content=c.Attribute.from(e.attribute);const r=await this.attributeController.updateAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(f.AttributeMapper.toAttributeDTO(r))}};p=n([a(0,u.Inject),a(1,u.Inject),a(2,u.Inject),i("design:paramtypes",[s.ConsumptionAttributesController,l.AccountController,UpdateAttributeRequestValidator])],p),t.UpdateAttributeUseCase=p},20099:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(41192),t),i(r(17716),t),i(r(26899),t),i(r(14856),t),i(r(14746),t),i(r(73421),t),i(r(5519),t),i(r(99536),t),i(r(18796),t),i(r(16932),t),i(r(4415),t),i(r(9660),t)},37372:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDraftUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049),d=r(50660);class CreateDraftRequestValidator extends u.RuntimeValidator{constructor(){super()}}let f=class CreateDraftUseCase extends u.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.createDraft(e.content,e.type);return await this.accountController.syncDatawallet(),o.Result.ok(d.DraftMapper.toDraftDTO(t))}};f=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.DraftsController,c.AccountController,CreateDraftRequestValidator])],f),t.CreateDraftUseCase=f},69696:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteDraftUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049);class DeleteDraftRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfAny((e=>e.id)).fulfills(u.IdValidator.required(s.ConsumptionIds.draft))}}let d=class DeleteDraftUseCase extends u.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.getDraft(c.CoreId.from(e.id));return t?(await this.draftController.deleteDraft(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.Draft))}};d=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.DraftsController,c.AccountController,DeleteDraftRequestValidator])],d),t.DeleteDraftUseCase=d},50660:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DraftMapper=void 0;t.DraftMapper=class DraftMapper{static toDraftDTO(e){return{id:e.id.toString(),type:e.type,createdAt:e.createdAt.toString(),lastModifiedAt:e.lastModifiedAt.toISOString(),content:e.content.toJSON()}}static toDraftDTOList(e){return e.map((e=>this.toDraftDTO(e)))}}},23165:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDraftUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049),d=r(50660);class GetDraftRequestValidator extends u.RuntimeValidator{constructor(){super()}}let f=class GetDraftUseCase extends u.UseCase{constructor(e,t){super(t),this.draftController=e}async executeInternal(e){const t=await this.draftController.getDraft(c.CoreId.from(e.id));return t?o.Result.ok(d.DraftMapper.toDraftDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.Draft))}};f=n([a(0,l.Inject),a(1,l.Inject),i("design:paramtypes",[s.DraftsController,GetDraftRequestValidator])],f),t.GetDraftUseCase=f},46863:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDraftsUseCase=void 0;const o=r(92937),s=r(75172),c=r(3850),l=r(94714),u=r(7071),d=r(7049),f=r(50660);let p=class GetDraftsUseCase extends d.UseCase{constructor(e,t){super(t),this.draftController=e}async executeInternal(e){const t=GetDraftsUseCase.queryTranslator.parse(e.query),r=await this.draftController.getDrafts(t);return s.Result.ok(f.DraftMapper.toDraftDTOList(r))}};p.queryTranslator=new o.QueryTranslator({whitelist:{[(0,l.nameof)((e=>e.type))]:!0,[(0,l.nameof)((e=>e.createdAt))]:!0,[(0,l.nameof)((e=>e.lastModifiedAt))]:!0}}),p=n([a(0,u.Inject),a(1,u.Inject),i("design:paramtypes",[c.DraftsController,d.RuntimeValidator])],p),t.GetDraftsUseCase=p},65760:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateDraftUseCase=void 0;const o=r(90194),s=r(75172),c=r(3850),l=r(19663),u=r(7071),d=r(7049),f=r(50660);class UpdateDraftRequestValidator extends d.RuntimeValidator{constructor(){super()}}let p=class UpdateDraftUseCase extends d.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.getDraft(l.CoreId.from(e.id));return t?(t.content=await o.SerializableAsync.fromUnknown(e.content),await this.draftController.updateDraft(t),await this.accountController.syncDatawallet(),s.Result.ok(f.DraftMapper.toDraftDTO(t))):s.Result.fail(d.RuntimeErrors.general.recordNotFound(c.Draft))}};p=n([a(0,u.Inject),a(1,u.Inject),a(2,u.Inject),i("design:paramtypes",[c.DraftsController,l.AccountController,UpdateDraftRequestValidator])],p),t.UpdateDraftUseCase=p},75966:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(37372),t),i(r(69696),t),i(r(50660),t),i(r(23165),t),i(r(46863),t),i(r(65760),t)},23742:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(20099),t),i(r(75966),t),i(r(94938),t),i(r(21394),t),i(r(90710),t)},71979:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateRelationshipInfoUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049),d=r(45420),f=r(56618);class CreateRelationshipInfoRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfAny((e=>e.relationshipId)).fulfills(u.IdValidator.required(c.BackboneIds.relationship)),this.validateIfEach((e=>e.attributes)).fulfills(u.RelationshipAttributeDTOValidator.required())}}let p=class CreateRelationshipInfoUseCase extends d.UseCase{constructor(e,t,r){super(r),this.relationshipInfoController=e,this.accountController=t}async executeInternal(e){const t=c.CoreId.from(e.relationshipId);if(void 0!==await this.relationshipInfoController.getRelationshipInfoByRelationship(t))return o.Result.fail(u.RuntimeErrors.relationshipInfo.relationshipInfoExists(t.toString()));const r=await Promise.all(e.attributes.map((e=>s.RelationshipAttribute.from({name:e.name,content:e.content,sharedItem:c.CoreId.from(e.sharedItem)})))),n=void 0===e.theme?void 0:await s.RelationshipTheme.from(e.theme),i=await s.RelationshipInfo.from({id:await s.ConsumptionIds.relationshipInfo.generate(),relationshipId:t,attributes:r,isPinned:e.isPinned,title:e.title,description:e.description,userTitle:e.userTitle,userDescription:e.userDescription,theme:n});return await this.relationshipInfoController.createRelationshipInfo(i),await this.accountController.syncDatawallet(),o.Result.ok(f.RelationshipInfoMapper.toRelationshipInfoDTO(i))}};p=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.RelationshipInfoController,c.AccountController,CreateRelationshipInfoRequestValidator])],p),t.CreateRelationshipInfoUseCase=p},11788:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteRelationshipInfoUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049),d=r(6595),f=r(45420);class DeleteRelationshipInfoRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfAny((e=>e.id)).fulfills(u.IdValidator.required(s.ConsumptionIds.relationshipInfo))}}let p=class DeleteRelationshipInfoUseCase extends f.UseCase{constructor(e,t,r){super(r),this.relationshipInfoController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipInfoController.getRelationshipInfo(c.CoreId.from(e.id));return t?(await this.relationshipInfoController.deleteRelationshipInfo(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(d.RuntimeErrors.general.recordNotFound(s.RelationshipInfo))}};p=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.RelationshipInfoController,c.AccountController,DeleteRelationshipInfoRequestValidator])],p),t.DeleteRelationshipInfoUseCase=p},42212:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteRelationshipInfoByRelationshipUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049),d=r(6595),f=r(45420);class DeleteRelationshipInfoByRelationshipRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfAny((e=>e.relationshipId)).fulfills(u.IdValidator.required(c.BackboneIds.relationship))}}let p=class DeleteRelationshipInfoByRelationshipUseCase extends f.UseCase{constructor(e,t,r){super(r),this.relationshipInfoController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipInfoController.getRelationshipInfoByRelationship(c.CoreId.from(e.relationshipId));return t?(await this.relationshipInfoController.deleteRelationshipInfo(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(d.RuntimeErrors.general.recordNotFound(s.RelationshipInfo))}};p=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.RelationshipInfoController,c.AccountController,DeleteRelationshipInfoByRelationshipRequestValidator])],p),t.DeleteRelationshipInfoByRelationshipUseCase=p},25116:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipInfoUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(36347),u=r(7071),d=r(7049),f=r(6595),p=r(45420),h=r(56618);class GetRelationshipInfoRequestValidator extends l.AbstractValidator{constructor(){super(),this.validateIfAny((e=>e.id)).fulfills(d.IdValidator.required(s.ConsumptionIds.relationshipInfo))}}let m=class GetRelationshipInfoUseCase extends p.UseCase{constructor(e,t){super(t),this.relationshipInfoController=e}async executeInternal(e){const t=await this.relationshipInfoController.getRelationshipInfo(c.CoreId.from(e.id));return t?o.Result.ok(h.RelationshipInfoMapper.toRelationshipInfoDTO(t)):o.Result.fail(f.RuntimeErrors.general.recordNotFound(s.RelationshipInfo))}};m=n([a(0,u.Inject),a(1,u.Inject),i("design:paramtypes",[s.RelationshipInfoController,GetRelationshipInfoRequestValidator])],m),t.GetRelationshipInfoUseCase=m},27170:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipInfoByRelationshipUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049),d=r(6595),f=r(45420),p=r(56618);class GetRelationshipInfoRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfAny((e=>e.relationshipId)).fulfills(u.IdValidator.required(c.BackboneIds.relationship))}}let h=class GetRelationshipInfoByRelationshipUseCase extends f.UseCase{constructor(e,t){super(t),this.relationshipInfoController=e}async executeInternal(e){const t=await this.relationshipInfoController.getRelationshipInfoByRelationship(c.CoreId.from(e.relationshipId));return t?o.Result.ok(p.RelationshipInfoMapper.toRelationshipInfoDTO(t)):o.Result.fail(d.RuntimeErrors.general.recordNotFound(s.RelationshipInfo))}};h=n([a(0,l.Inject),a(1,l.Inject),i("design:paramtypes",[s.RelationshipInfoController,GetRelationshipInfoRequestValidator])],h),t.GetRelationshipInfoByRelationshipUseCase=h},16616:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipAttributeMapper=void 0;t.RelationshipAttributeMapper=class RelationshipAttributeMapper{static toRelationshipAttributeDTO(e){return{name:e.name,content:e.content.toJSON(),sharedItem:e.sharedItem.toString()}}static toRelationshipAttributeDTOList(e){return e.map((e=>this.toRelationshipAttributeDTO(e)))}}},56618:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipInfoMapper=void 0;const n=r(16616),i=r(51711);t.RelationshipInfoMapper=class RelationshipInfoMapper{static toRelationshipInfoDTO(e){return{id:e.id.toString(),relationshipId:e.relationshipId.toString(),attributes:n.RelationshipAttributeMapper.toRelationshipAttributeDTOList(e.attributes),isPinned:e.isPinned,title:e.title,description:e.description,userTitle:e.userTitle,userDescription:e.userDescription,theme:e.theme?i.RelationshipThemeMapper.toRelationshipThemeDTO(e.theme):void 0}}static toRelationshipInfoDTOList(e){return e.map((e=>this.toRelationshipInfoDTO(e)))}}},51711:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipThemeMapper=void 0;t.RelationshipThemeMapper=class RelationshipThemeMapper{static toRelationshipThemeDTO(e){return{image:e.image,imageBar:e.imageBar,backgroundColor:e.backgroundColor,foregroundColor:e.foregroundColor}}static toRelationshipThemeDTOList(e){return e.map((e=>this.toRelationshipThemeDTO(e)))}}},75341:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateRelationshipInfoUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049),d=r(6595),f=r(45420),p=r(56618);class UpdateRelationshipInfoRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfAny((e=>e.id)).fulfills(u.IdValidator.required(s.ConsumptionIds.relationshipInfo)),this.validateIfEachAny((e=>e.attributes)).fulfills(u.RelationshipAttributeDTOValidator.required())}}let h=class UpdateRelationshipInfoUseCase extends f.UseCase{constructor(e,t,r){super(r),this.relationshipInfoController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipInfoController.getRelationshipInfo(c.CoreId.from(e.id));return t?(void 0!==e.attributes&&(t.attributes=await Promise.all(e.attributes.map((e=>s.RelationshipAttribute.from({name:e.name,content:e.content,sharedItem:c.CoreId.from(e.sharedItem)}))))),t.isPinned=void 0===e.isPinned?t.isPinned:e.isPinned,t.title=void 0===e.title?t.title:e.title,t.description=void 0===e.description?t.description:e.description,t.userTitle=void 0===e.userTitle?t.userTitle:e.userTitle,t.userDescription=void 0===e.userDescription?t.userDescription:e.userDescription,t.theme=void 0===e.theme?t.theme:await s.RelationshipTheme.from(e.theme),await this.relationshipInfoController.updateRelationshipInfo(t),await this.accountController.syncDatawallet(),o.Result.ok(p.RelationshipInfoMapper.toRelationshipInfoDTO(t))):o.Result.fail(d.RuntimeErrors.general.recordNotFound(s.RelationshipInfo))}};h=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.RelationshipInfoController,c.AccountController,UpdateRelationshipInfoRequestValidator])],h),t.UpdateRelationshipInfoUseCase=h},94938:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(71979),t),i(r(11788),t),i(r(42212),t),i(r(25116),t),i(r(27170),t),i(r(75341),t)},83951:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateSettingUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049),d=r(96950);class CreateSettingRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.key)).isDefined(),this.validateIfAny((e=>e.value)).isDefined(),this.validateIfString((e=>e.reference)).fulfills(u.IdValidator.optional(c.TransportIds.generic)),this.validateIfString((e=>e.scope)).isIn([s.SettingScope.Device,s.SettingScope.Identity,s.SettingScope.Relationship]).whenDefined(),this.validateIfString((e=>e.succeedsAt)).fulfills(u.DateValidator.optional()),this.validateIfString((e=>e.succeedsItem)).fulfills(u.IdValidator.optional(s.ConsumptionIds.setting))}}let f=class CreateSettingUseCase extends u.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.createSetting({key:e.key,value:e.value,reference:e.reference?c.CoreId.from(e.reference):void 0,scope:e.scope,succeedsAt:e.succeedsAt?c.CoreDate.from(e.succeedsAt):void 0,succeedsItem:e.succeedsItem?c.CoreId.from(e.succeedsItem):void 0});return await this.accountController.syncDatawallet(),o.Result.ok(d.SettingMapper.toSettingDTO(t))}};f=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.SettingsController,c.AccountController,CreateSettingRequestValidator])],f),t.CreateSettingUseCase=f},80678:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteSettingUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(60485),d=r(7049);class DeleteSettingRequestValidator extends d.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(d.IdValidator.required(s.ConsumptionIds.setting))}}let f=class DeleteSettingUseCase extends d.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.getSetting(c.CoreId.from(e.id));return t?(await this.settingController.deleteSetting(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.Setting))}};f=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.SettingsController,c.AccountController,DeleteSettingRequestValidator])],f),t.DeleteSettingUseCase=f},86798:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSettingUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049),d=r(96950);class GetSettingRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(u.IdValidator.required(s.ConsumptionIds.setting))}}let f=class GetSettingUseCase extends u.UseCase{constructor(e,t){super(t),this.settingController=e}async executeInternal(e){const t=await this.settingController.getSetting(c.CoreId.from(e.id));return t?o.Result.ok(d.SettingMapper.toSettingDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.Setting))}};f=n([a(0,l.Inject),a(1,l.Inject),i("design:paramtypes",[s.SettingsController,GetSettingRequestValidator])],f),t.GetSettingUseCase=f},26101:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSettingsUseCase=void 0;const o=r(92937),s=r(75172),c=r(3850),l=r(94714),u=r(7071),d=r(7049),f=r(96950);let p=class GetSettingsUseCase extends d.UseCase{constructor(e,t){super(t),this.settingController=e}async executeInternal(e){const t=GetSettingsUseCase.queryTranslator.parse(e.query),r=await this.settingController.getSettings(t);return s.Result.ok(f.SettingMapper.toSettingDTOList(r))}};p.queryTranslator=new o.QueryTranslator({whitelist:{[(0,l.nameof)((e=>e.key))]:!0,[(0,l.nameof)((e=>e.scope))]:!0,[(0,l.nameof)((e=>e.reference))]:!0,[(0,l.nameof)((e=>e.createdAt))]:!0,[(0,l.nameof)((e=>e.deletedAt))]:!0,[(0,l.nameof)((e=>e.succeedsItem))]:!0,[(0,l.nameof)((e=>e.succeedsAt))]:!0}}),p=n([a(0,u.Inject),a(1,u.Inject),i("design:paramtypes",[c.SettingsController,d.RuntimeValidator])],p),t.GetSettingsUseCase=p},96950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingMapper=void 0;t.SettingMapper=class SettingMapper{static toSettingDTO(e){var t,r,n,i;return{id:e.id.toString(),key:e.key,scope:e.scope.toString(),reference:null===(t=e.reference)||void 0===t?void 0:t.toString(),value:e.value.toJSON(),createdAt:e.createdAt.toISOString(),deletedAt:null===(r=e.deletedAt)||void 0===r?void 0:r.toISOString(),succeedsItem:null===(n=e.succeedsItem)||void 0===n?void 0:n.toString(),succeedsAt:null===(i=e.succeedsAt)||void 0===i?void 0:i.toString()}}static toSettingDTOList(e){return e.map((e=>this.toSettingDTO(e)))}}},1853:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateSettingUseCase=void 0;const o=r(90194),s=r(75172),c=r(3850),l=r(19663),u=r(7071),d=r(60485),f=r(7049),p=r(96950);class UpdateSettingRequestValidator extends f.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(f.IdValidator.required(c.ConsumptionIds.setting)),this.validateIfAny((e=>e.value)).isDefined()}}let h=class UpdateSettingUseCase extends f.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.getSetting(l.CoreId.from(e.id));return t?(t.value=await o.SerializableAsync.from(e.value),await this.settingController.updateSetting(t),await this.accountController.syncDatawallet(),s.Result.ok(p.SettingMapper.toSettingDTO(t))):s.Result.fail(d.RuntimeErrors.general.recordNotFound(c.Setting))}};h=n([a(0,u.Inject),a(1,u.Inject),a(2,u.Inject),i("design:paramtypes",[c.SettingsController,l.AccountController,UpdateSettingRequestValidator])],h),t.UpdateSettingUseCase=h},21394:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(83951),t),i(r(80678),t),i(r(86798),t),i(r(26101),t),i(r(96950),t),i(r(1853),t)},45382:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateSharedItemUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049),d=r(99443);class CreateSharedItemRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfEachString((e=>e.tags)).isDefined().whenDefined(),this.validateIfString((e=>e.sharedBy)).fulfills(u.AddressValidator.required()),this.validateIfString((e=>e.sharedWith)).fulfills(u.AddressValidator.required()),this.validateIfString((e=>e.sharedAt)).fulfills(u.DateValidator.required()),this.validateIfString((e=>e.reference)).fulfills(u.IdValidator.optional(c.TransportIds.generic)),this.validateIfString((e=>e.content)).isDefined(),this.validateIfString((e=>e.succeedsItem)).fulfills(u.IdValidator.optional(s.ConsumptionIds.sharedItem)),this.validateIfString((e=>e.succeedsAt)).fulfills(u.DateValidator.optional()),this.validateIfString((e=>e.expiresAt)).fulfills(u.DateValidator.optional())}}let f=class CreateSharedItemUseCase extends u.UseCase{constructor(e,t,r){super(r),this.sharedItemsController=e,this.accountController=t}async executeInternal(e){const t=await s.SharedItem.from({id:await s.ConsumptionIds.sharedItem.generate(),tags:e.tags,sharedBy:c.CoreAddress.from(e.sharedBy),sharedWith:c.CoreAddress.from(e.sharedWith),sharedAt:c.CoreDate.from(e.sharedAt),reference:e.reference?c.CoreId.from(e.reference):void 0,content:e.content,succeedsItem:e.succeedsItem?c.CoreId.from(e.succeedsItem):void 0,succeedsAt:e.succeedsAt?c.CoreDate.from(e.succeedsAt):void 0,expiresAt:e.expiresAt?c.CoreDate.from(e.expiresAt):void 0});return await this.sharedItemsController.createSharedItem(t),await this.accountController.syncDatawallet(),o.Result.ok(d.SharedItemsMapper.toSharedItemDTO(t))}};f=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.SharedItemsController,c.AccountController,CreateSharedItemRequestValidator])],f),t.CreateSharedItemUseCase=f},71872:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteSharedItemUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(60485),d=r(7049);class DeleteSharedItemRequestValidator extends d.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(d.IdValidator.required(s.ConsumptionIds.sharedItem))}}let f=class DeleteSharedItemUseCase extends d.UseCase{constructor(e,t,r){super(r),this.sharedItemsController=e,this.accountController=t}async executeInternal(e){const t=await this.sharedItemsController.getSharedItem(c.CoreId.from(e.id));return t?(await this.sharedItemsController.deleteSharedItem(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.SharedItem))}};f=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.SharedItemsController,c.AccountController,DeleteSharedItemRequestValidator])],f),t.DeleteSharedItemUseCase=f},26081:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSharedItemUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(7071),u=r(7049),d=r(99443);class GetSharedItemRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(u.IdValidator.required(s.ConsumptionIds.sharedItem))}}let f=class GetSharedItemUseCase extends u.UseCase{constructor(e,t){super(t),this.sharedItemsController=e}async executeInternal(e){const t=await this.sharedItemsController.getSharedItem(c.CoreId.from(e.id));return t?o.Result.ok(d.SharedItemsMapper.toSharedItemDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.SharedItem))}};f=n([a(0,l.Inject),a(1,l.Inject),i("design:paramtypes",[s.SharedItemsController,GetSharedItemRequestValidator])],f),t.GetSharedItemUseCase=f},98796:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSharedItemsUseCase=void 0;const o=r(92937),s=r(75172),c=r(3850),l=r(94714),u=r(7071),d=r(7049),f=r(99443);let p=class GetSharedItemsUseCase extends d.UseCase{constructor(e,t){super(t),this.sharedItemsController=e}async executeInternal(e){const t=GetSharedItemsUseCase.queryTranslator.parse(e.query),r=await this.sharedItemsController.getSharedItems(t);return s.Result.ok(f.SharedItemsMapper.toSharedItemDTOList(r))}};p.queryTranslator=new o.QueryTranslator({whitelist:{[(0,l.nameof)((e=>e.tags))]:!0,[(0,l.nameof)((e=>e.sharedBy))]:!0,[(0,l.nameof)((e=>e.sharedWith))]:!0,[(0,l.nameof)((e=>e.sharedAt))]:!0,[(0,l.nameof)((e=>e.reference))]:!0,[(0,l.nameof)((e=>e.succeedsItem))]:!0,[(0,l.nameof)((e=>e.succeedsAt))]:!0,[(0,l.nameof)((e=>e.expiresAt))]:!0},custom:{tags:(e,t)=>{e.tags={$contains:t}}}}),p=n([a(0,u.Inject),a(1,u.Inject),i("design:paramtypes",[c.SharedItemsController,d.RuntimeValidator])],p),t.GetSharedItemsUseCase=p},4408:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSharedItemsByAddressUseCase=void 0;const o=r(75172),s=r(3850),c=r(94714),l=r(7071),u=r(7049),d=r(99443);class GetSharedItemsByAddressRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.address)).fulfills(u.AddressValidator.required())}}let f=class GetSharedItemsByAddressUseCase extends u.UseCase{constructor(e,t){super(t),this.sharedItemsController=e}async executeInternal(e){const t=await this.sharedItemsController.getSharedItems({$or:[{[(0,c.nameof)((e=>e.sharedBy))]:e.address},{[(0,c.nameof)((e=>e.sharedWith))]:e.address}]});return o.Result.ok(d.SharedItemsMapper.toSharedItemDTOList(t))}};f=n([a(0,l.Inject),a(1,l.Inject),i("design:paramtypes",[s.SharedItemsController,GetSharedItemsByAddressRequestValidator])],f),t.GetSharedItemsByAddressUseCase=f},14042:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSharedItemsByReferenceUseCase=void 0;const o=r(75172),s=r(3850),c=r(19663),l=r(94714),u=r(7071),d=r(7049),f=r(99443);class GetSharedItemsByReferenceRequestValidator extends d.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.reference)).fulfills(d.IdValidator.required(c.TransportIds.generic))}}let p=class GetSharedItemsByReferenceUseCase extends d.UseCase{constructor(e,t){super(t),this.sharedItemsController=e}async executeInternal(e){const t=await this.sharedItemsController.getSharedItems({[(0,l.nameof)((e=>e.reference))]:e.reference});return o.Result.ok(f.SharedItemsMapper.toSharedItemDTOList(t))}};p=n([a(0,u.Inject),a(1,u.Inject),i("design:paramtypes",[s.SharedItemsController,GetSharedItemsByReferenceRequestValidator])],p),t.GetSharedItemsByReferenceUseCase=p},55402:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSharedItemsSharedByAddressUseCase=void 0;const o=r(75172),s=r(3850),c=r(94714),l=r(7071),u=r(7049),d=r(99443);class GetSharedItemsSharedByAddressRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.address)).fulfills(u.AddressValidator.required())}}let f=class GetSharedItemsSharedByAddressUseCase extends u.UseCase{constructor(e,t){super(t),this.sharedItemsController=e}async executeInternal(e){const t=await this.sharedItemsController.getSharedItems({[(0,c.nameof)((e=>e.sharedBy))]:e.address});return o.Result.ok(d.SharedItemsMapper.toSharedItemDTOList(t))}};f=n([a(0,l.Inject),a(1,l.Inject),i("design:paramtypes",[s.SharedItemsController,GetSharedItemsSharedByAddressRequestValidator])],f),t.GetSharedItemsSharedByAddressUseCase=f},6652:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSharedItemsSharedWithAddressUseCase=void 0;const o=r(75172),s=r(3850),c=r(94714),l=r(7071),u=r(7049),d=r(99443);class GetSharedItemsSharedWithAddressRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.address)).fulfills(u.AddressValidator.required())}}let f=class GetSharedItemsSharedWithAddressUseCase extends u.UseCase{constructor(e,t){super(t),this.sharedItemsController=e}async executeInternal(e){const t=await this.sharedItemsController.getSharedItems({[(0,c.nameof)((e=>e.sharedWith))]:e.address});return o.Result.ok(d.SharedItemsMapper.toSharedItemDTOList(t))}};f=n([a(0,l.Inject),a(1,l.Inject),i("design:paramtypes",[s.SharedItemsController,GetSharedItemsSharedWithAddressRequestValidator])],f),t.GetSharedItemsSharedWithAddressUseCase=f},99443:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedItemsMapper=void 0;t.SharedItemsMapper=class SharedItemsMapper{static toSharedItemDTO(e){var t,r,n,i;return{id:e.id.toString(),tags:e.tags,sharedBy:e.sharedBy.toString(),sharedWith:e.sharedWith.toString(),sharedAt:e.sharedAt.toString(),reference:null===(t=e.reference)||void 0===t?void 0:t.toString(),content:e.content.toJSON(),succeedsItem:null===(r=e.succeedsItem)||void 0===r?void 0:r.toString(),succeedsAt:null===(n=e.succeedsAt)||void 0===n?void 0:n.toString(),expiresAt:null===(i=e.expiresAt)||void 0===i?void 0:i.toString()}}static toSharedItemDTOList(e){return e.map((e=>this.toSharedItemDTO(e)))}}},40466:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateSharedItemUseCase=void 0;const o=r(90194),s=r(75172),c=r(3850),l=r(19663),u=r(7071),d=r(60485),f=r(7049),p=r(99443);class UpdateSharedItemRequestValidator extends f.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(f.IdValidator.required(c.ConsumptionIds.sharedItem)),this.validateIfAny((e=>e.content)).isDefined()}}let h=class UpdateSharedItemUseCase extends f.UseCase{constructor(e,t,r){super(r),this.sharedItemsController=e,this.accountController=t}async executeInternal(e){const t=await this.sharedItemsController.getSharedItem(l.CoreId.from(e.id));return t?(t.content=o.Serializable.fromUnknown(e.content),await this.sharedItemsController.updateSharedItem(t),await this.accountController.syncDatawallet(),s.Result.ok(p.SharedItemsMapper.toSharedItemDTO(t))):s.Result.fail(d.RuntimeErrors.general.recordNotFound(c.SharedItem))}};h=n([a(0,u.Inject),a(1,u.Inject),a(2,u.Inject),i("design:paramtypes",[c.SharedItemsController,l.AccountController,UpdateSharedItemRequestValidator])],h),t.UpdateSharedItemUseCase=h},90710:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(45382),t),i(r(71872),t),i(r(26081),t),i(r(98796),t),i(r(4408),t),i(r(14042),t),i(r(55402),t),i(r(6652),t),i(r(99443),t),i(r(40466),t)},60485:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(49365),t),i(r(56819),t),i(r(6595),t),i(r(23742),t),i(r(29667),t)},72737:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DisableAutoSyncUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049);let u=class DisableAutoSyncUseCase extends l.UseCase{constructor(e){super(),this.accountController=e}executeInternal(){return this.accountController.disableAutoSync(),o.Result.ok(void 0)}};u=n([a(0,c.Inject),i("design:paramtypes",[s.AccountController])],u),t.DisableAutoSyncUseCase=u},89710:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.EnableAutoSyncUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049);let u=class EnableAutoSyncUseCase extends l.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(){return await this.accountController.enableAutoSync(),o.Result.ok(void 0)}};u=n([a(0,c.Inject),i("design:paramtypes",[s.AccountController])],u),t.EnableAutoSyncUseCase=u},60569:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceInfoUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(83067);let d=class GetDeviceInfoUseCase extends l.UseCase{constructor(e){super(),this.deviceController=e}executeInternal(){const e=this.deviceController.device;return o.Result.ok(u.DeviceMapper.toDeviceDTO(e))}};d=n([a(0,c.Inject),i("design:paramtypes",[s.DeviceController])],d),t.GetDeviceInfoUseCase=d},73378:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetIdentityInfoUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049);let u=class GetIdentityInfoUseCase extends l.UseCase{constructor(e){super(),this.identityController=e}executeInternal(){const e=this.identityController.identity;return o.Result.ok({address:e.address.toString(),publicKey:e.publicKey.toString()})}};u=n([a(0,c.Inject),i("design:paramtypes",[s.IdentityController])],u),t.GetIdentityInfoUseCase=u},68562:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSyncInfoUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049);let u=class GetSyncInfoUseCase extends l.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(){const e=await this.accountController.getLastCompletedSyncTime(),t=await this.accountController.getLastCompletedDatawalletSyncTime();return o.Result.ok({lastSyncRun:e?{completedAt:e.toISOString()}:void 0,lastDatawalletSync:t?{completedAt:t.toISOString()}:void 0})}};u=n([a(0,c.Inject),i("design:paramtypes",[s.AccountController])],u),t.GetSyncInfoUseCase=u},63826:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterPushNotificationTokenUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049);class Validator extends l.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.handle)).isDefined().isNotEmpty(),this.validateIfString((e=>e.installationId)).isDefined().isNotEmpty(),this.validateIfString((e=>e.platform)).isDefined().isNotEmpty()}}let u=class RegisterPushNotificationTokenUseCase extends l.UseCase{constructor(e,t){super(t),this.accountController=e}async executeInternal(e){return await this.accountController.registerPushNotificationToken({handle:e.handle,installationId:e.installationId,platform:e.platform}),o.Result.ok(void 0)}};u=n([a(0,c.Inject),a(1,c.Inject),i("design:paramtypes",[s.AccountController,Validator])],u),t.RegisterPushNotificationTokenUseCase=u},54204:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncDatawalletUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049);let u=class SyncDatawalletUseCase extends l.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(){return await this.accountController.syncDatawallet(!0),o.Result.ok(void 0)}};u=n([a(0,c.Inject),i("design:paramtypes",[s.AccountController])],u),t.SyncDatawalletUseCase=u},84773:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncEverythingUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(42205),u=r(986),d=r(7049),f=r(76881),p=r(94316);let h=class SyncEverythingUseCase extends d.UseCase{constructor(e,t,r,n){super(),this.accountController=e,this.identityController=t,this.eventBus=r,this.logger=n.getLogger(SyncEverythingUseCase)}async executeInternal(){if(this.currentSync)return await this.currentSync;this.currentSync=this._executeInternal();try{return await this.currentSync}finally{this.currentSync=void 0}}async _executeInternal(){const e=await this.accountController.syncEverything(),t=e.messages.map((e=>f.MessageMapper.toMessageDTO(e))),r=e.relationships.map((e=>p.RelationshipMapper.toRelationshipDTO(e))),n=this.identityController.identity.address.toString();return this.processNewMessages(t,n),this.processNewRelationships(r,n),o.Result.ok({messages:t,relationships:r})}processNewRelationships(e,t){if(0!==e.length){this.logger.debug(`Found ${e.length} relationship(s) with changes. Start publishing on event bus...`);for(const r of e)this.eventBus.publish(new l.RelationshipChangedEvent(t,r));this.logger.debug("Finished publishing relationship changes on event bus.")}}processNewMessages(e,t){if(0!==e.length){this.logger.debug(`Found ${e.length} new message(s). Start publishing on event bus...`);for(const r of e)this.eventBus.publish(new l.MessageReceivedEvent(t,r));this.logger.debug("Finished publishing message changes on event bus.")}}};h=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),a(3,c.Inject),i("design:paramtypes",[s.AccountController,s.IdentityController,o.EventBus,u.RuntimeLoggerFactory])],h),t.SyncEverythingUseCase=h},69276:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(72737),t),i(r(89710),t),i(r(60569),t),i(r(73378),t),i(r(68562),t),i(r(63826),t),i(r(54204),t),i(r(84773),t)},5188:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDeviceUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(83067);class CreateDeviceRequestValidator extends l.RuntimeValidator{constructor(){super()}}let d=class CreateDeviceUseCase extends l.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.accountController=t}async executeInternal(e){const t=await this.devicesController.sendDevice(e);return await this.accountController.syncDatawallet(),o.Result.ok(u.DeviceMapper.toDeviceDTO(t))}};d=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),i("design:paramtypes",[s.DevicesController,s.AccountController,CreateDeviceRequestValidator])],d),t.CreateDeviceUseCase=d},20795:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDeviceOnboardingTokenUseCase=void 0;const o=r(75172),s=r(19663),c=r(99490),l=r(7071),u=r(7049),d=r(57121);class CreateDeviceOnboardingTokenRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(u.IdValidator.required(s.BackboneIds.device)),this.validateIf((e=>e.expiresAt)).fulfills((e=>c.DateTime.fromISO(e)>c.DateTime.utc())).whenNotNull().withFailureMessage("'$propertyName' must be in the future.")}}let f=class CreateDeviceOnboardingTokenUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.tokenController=t}async executeInternal(e){const t=await this.devicesController.getSharedSecret(s.CoreId.from(e.id)),r=e.expiresAt?s.CoreDate.from(e.expiresAt):s.CoreDate.utc().add({minutes:5}),n=await s.TokenContentDeviceSharedSecret.from({sharedSecret:t}),i=await this.tokenController.sendToken({content:n,expiresAt:r,ephemeral:!0});return o.Result.ok(await d.TokenMapper.toTokenDTO(i,!0))}};f=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.DevicesController,s.TokenController,CreateDeviceOnboardingTokenRequestValidator])],f),t.CreateDeviceOnboardingTokenUseCase=f},2137:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteDeviceUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049);class DeleteDeviceRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIf((e=>e.id)).fulfills(l.IdValidator.required(s.BackboneIds.device))}}let u=class DeleteDeviceUseCase extends l.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.accountController=t}async executeInternal(e){const t=await this.devicesController.get(s.CoreId.from(e.id));return t?(await this.devicesController.delete(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.Device))}};u=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),i("design:paramtypes",[s.DevicesController,s.AccountController,DeleteDeviceRequestValidator])],u),t.DeleteDeviceUseCase=u},83067:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceMapper=void 0;const n=r(82890),i=r(19663);t.DeviceMapper=class DeviceMapper{static toDeviceDTO(e){var t,r;return{id:e.id.toString(),createdAt:e.createdAt.toString(),createdByDevice:e.createdByDevice.toString(),name:e.name,type:e.type.toString(),username:e.username,certificate:e.certificate,description:e.description,lastLoginAt:null===(t=e.lastLoginAt)||void 0===t?void 0:t.toString(),operatingSystem:e.operatingSystem,publicKey:null===(r=e.publicKey)||void 0===r?void 0:r.toString()}}static toDeviceOnboardingInfoDTO(e){return{id:e.id.toString(),createdAt:e.createdAt.toString(),createdByDevice:e.createdByDevice.toString(),name:e.name,description:e.description,secretBaseKey:e.secretBaseKey.toBase64(),deviceIndex:e.deviceIndex,synchronizationKey:e.synchronizationKey.toBase64(),identityPrivateKey:e.identityPrivateKey?e.identityPrivateKey.toString():void 0,identity:{address:e.identity.address.toString(),publicKey:e.identity.publicKey.toString(),realm:e.identity.realm.toString()},password:e.password,username:e.username}}static async toDeviceSharedSecret(e){return await i.DeviceSharedSecret.from({id:i.CoreId.from(e.id),createdAt:i.CoreDate.from(e.createdAt),createdByDevice:i.CoreId.from(e.createdByDevice),name:e.name,description:e.description,secretBaseKey:await n.CryptoSecretKey.fromBase64(e.secretBaseKey),deviceIndex:e.deviceIndex,synchronizationKey:await n.CryptoSecretKey.fromBase64(e.synchronizationKey),identityPrivateKey:e.identityPrivateKey?await n.CryptoSignaturePrivateKey.deserialize(e.identityPrivateKey):void 0,identity:{address:i.CoreAddress.from(e.identity.address),publicKey:await n.CryptoSignaturePublicKey.deserialize(e.identity.publicKey),realm:e.identity.realm},password:e.password,username:e.username})}}},40770:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(83067);class GetDeviceRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIf((e=>e.id)).fulfills(l.IdValidator.required(s.BackboneIds.device))}}let d=class GetDeviceUseCase extends l.UseCase{constructor(e,t){super(t),this.devicesController=e}async executeInternal(e){const t=await this.devicesController.get(s.CoreId.from(e.id));return t?o.Result.ok(u.DeviceMapper.toDeviceDTO(t)):o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.Device))}};d=n([a(0,c.Inject),a(1,c.Inject),i("design:paramtypes",[s.DevicesController,GetDeviceRequestValidator])],d),t.GetDeviceUseCase=d},8283:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceOnboardingInfoUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(83067);let d=class GetDeviceOnboardingInfoUseCase extends l.UseCase{constructor(e,t){super(t),this.devicesController=e}async executeInternal(e){const t=await this.devicesController.getSharedSecret(s.CoreId.from(e.id));return o.Result.ok(u.DeviceMapper.toDeviceOnboardingInfoDTO(t))}};d=n([a(0,c.Inject),a(1,c.Inject),i("design:paramtypes",[s.DevicesController,l.RuntimeValidator])],d),t.GetDeviceOnboardingInfoUseCase=d},93341:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDevicesUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(83067);let d=class GetDevicesUseCase extends l.UseCase{constructor(e){super(),this.devicesController=e}async executeInternal(){const e=(await this.devicesController.list()).map((e=>u.DeviceMapper.toDeviceDTO(e)));return o.Result.ok(e)}};d=n([a(0,c.Inject),i("design:paramtypes",[s.DevicesController])],d),t.GetDevicesUseCase=d},80189:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateDeviceUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(97802),u=r(7049);class UpdateDeviceRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIf((e=>e.id)).fulfills(u.IdValidator.required(s.BackboneIds.device))}}let d=class UpdateDeviceUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.accountController=t}async executeInternal(e){const t=await this.devicesController.get(s.CoreId.from(e.id));return t?(e.name&&(t.name=e.name),t.description=e.description,await this.devicesController.update(t),await this.accountController.syncDatawallet(),o.Result.ok(l.DeviceMapper.toDeviceDTO(t))):o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.Device))}};d=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),i("design:paramtypes",[s.DevicesController,s.AccountController,UpdateDeviceRequestValidator])],d),t.UpdateDeviceUseCase=d},97802:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(5188),t),i(r(20795),t),i(r(2137),t),i(r(83067),t),i(r(40770),t),i(r(8283),t),i(r(93341),t),i(r(80189),t)},10542:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenForFileUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(57121);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenForFileRequest"))}};d=n([a(0,c.Inject),i("design:paramtypes",[l.SchemaRepository])],d);let f=class CreateTokenForFileUseCase extends l.UseCase{constructor(e,t,r,n){super(n),this.fileController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){var t,r,n;const i=await this.fileController.getFile(s.CoreId.from(e.fileId));if(!i)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.File));const a=await s.TokenContentFile.from({fileId:i.id,secretKey:i.secretKey}),c=null===(t=e.ephemeral)||void 0===t||t,d=null!==(n=null===(r=i.cache)||void 0===r?void 0:r.expiresAt)&&void 0!==n?n:s.CoreDate.utc().add({days:12}),f=e.expiresAt?s.CoreDate.from(e.expiresAt):d,p=await this.tokenController.sendToken({content:a,expiresAt:f,ephemeral:c});return c||await this.accountController.syncDatawallet(),o.Result.ok(await u.TokenMapper.toTokenDTO(p,c))}};f=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),a(3,c.Inject),i("design:paramtypes",[s.FileController,s.TokenController,s.AccountController,d])],f),t.CreateTokenForFileUseCase=f},6913:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenQrCodeForFileUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049);let u=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenQrCodeForFileRequest"))}};u=n([a(0,c.Inject),i("design:paramtypes",[l.SchemaRepository])],u);let d=class CreateTokenQrCodeForFileUseCase extends l.UseCase{constructor(e,t,r){super(r),this.fileController=e,this.tokenController=t}async executeInternal(e){var t,r;const n=await this.fileController.getFile(s.CoreId.from(e.fileId));if(!n)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.File));const i=await s.TokenContentFile.from({fileId:n.id,secretKey:n.secretKey}),a=null!==(r=null===(t=n.cache)||void 0===t?void 0:t.expiresAt)&&void 0!==r?r:s.CoreDate.utc().add({days:12}),c=e.expiresAt?s.CoreDate.from(e.expiresAt):a,u=await this.tokenController.sendToken({content:i,expiresAt:c,ephemeral:!0}),d=await l.QRCode.from(await u.truncate());return o.Result.ok({qrCodeBytes:d.asBase64()})}};d=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),i("design:paramtypes",[s.FileController,s.TokenController,u])],d),t.CreateTokenQrCodeForFileUseCase=d},68516:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadFileUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(35076);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("DownloadFileRequest"))}};d=n([a(0,c.Inject),i("design:paramtypes",[l.SchemaRepository])],d);let f=class DownloadFileUseCase extends l.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=s.CoreId.from(e.id),r=await this.fileController.getFile(t);if(!r)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.File));const n=await this.fileController.downloadFileContent(r.id);return o.Result.ok(u.FileMapper.toDownloadFileResponse(n,r))}};f=n([a(0,c.Inject),a(1,c.Inject),i("design:paramtypes",[s.FileController,d])],f),t.DownloadFileUseCase=f},35076:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileMapper=void 0;const n=r(19663),i=r(7049);t.FileMapper=class FileMapper{static toDownloadFileResponse(e,t){if(!t.cache)throw i.RuntimeErrors.general.cacheEmpty(n.File,t.id.toString());return{content:e.buffer,filename:t.cache.filename?t.cache.filename:t.id.toString(),mimetype:t.cache.mimetype}}static toFileDTO(e){var t,r,a,o;if(!e.cache)throw i.RuntimeErrors.general.cacheEmpty(n.File,e.id.toString());return{id:e.id.toString(),filename:e.cache.filename,filesize:e.cache.filesize,createdAt:e.cache.createdAt.toString(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),expiresAt:e.cache.expiresAt.toString(),mimetype:e.cache.mimetype,isOwn:e.isOwn,title:null!==(t=e.cache.title)&&void 0!==t?t:"",secretKey:e.secretKey.toBase64(),description:e.cache.description,deletedAt:null===(r=e.cache.deletedAt)||void 0===r?void 0:r.toString(),deletedBy:null===(a=e.cache.deletedBy)||void 0===a?void 0:a.toString(),deletedByDevice:null===(o=e.cache.deletedByDevice)||void 0===o?void 0:o.toString()}}static toFileDTOList(e){return e.map((e=>this.toFileDTO(e)))}}},13520:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetFileUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(35076);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetFileRequest"))}};d=n([a(0,c.Inject),i("design:paramtypes",[l.SchemaRepository])],d);let f=class GetFileUseCase extends l.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=await this.fileController.getFile(s.CoreId.from(e.id));return t?o.Result.ok(u.FileMapper.toFileDTO(t)):o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.File))}};f=n([a(0,c.Inject),a(1,c.Inject),i("design:paramtypes",[s.FileController,d])],f),t.GetFileUseCase=f},35911:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetFilesUseCase=void 0;const o=r(92937),s=r(75172),c=r(19663),l=r(94714),u=r(7071),d=r(7049),f=r(35076);let p=class GetFilesUseCase extends d.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=GetFilesUseCase.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,l.nameof)((e=>e.isOwn))]=e.ownerRestriction===d.OwnerRestriction.Own);const r=await this.fileController.getFiles(t);return s.Result.ok(f.FileMapper.toFileDTOList(r))}};p.queryTranslator=new o.QueryTranslator({whitelist:{[(0,l.nameof)((e=>e.createdAt))]:!0,[(0,l.nameof)((e=>e.createdBy))]:!0,[(0,l.nameof)((e=>e.createdByDevice))]:!0,[(0,l.nameof)((e=>e.deletedAt))]:!0,[(0,l.nameof)((e=>e.deletedBy))]:!0,[(0,l.nameof)((e=>e.deletedByDevice))]:!0,[(0,l.nameof)((e=>e.description))]:!0,[(0,l.nameof)((e=>e.expiresAt))]:!0,[(0,l.nameof)((e=>e.filename))]:!0,[(0,l.nameof)((e=>e.filesize))]:!0,[(0,l.nameof)((e=>e.mimetype))]:!0,[(0,l.nameof)((e=>e.title))]:!0,[(0,l.nameof)((e=>e.isOwn))]:!0},alias:{[(0,l.nameof)((e=>e.createdAt))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.createdAt))}`,[(0,l.nameof)((e=>e.createdBy))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.createdBy))}`,[(0,l.nameof)((e=>e.createdByDevice))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.createdByDevice))}`,[(0,l.nameof)((e=>e.deletedAt))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.deletedAt))}`,[(0,l.nameof)((e=>e.deletedBy))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.deletedBy))}`,[(0,l.nameof)((e=>e.deletedByDevice))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.deletedByDevice))}`,[(0,l.nameof)((e=>e.description))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.description))}`,[(0,l.nameof)((e=>e.expiresAt))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.expiresAt))}`,[(0,l.nameof)((e=>e.filename))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.filename))}`,[(0,l.nameof)((e=>e.filesize))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.filesize))}`,[(0,l.nameof)((e=>e.mimetype))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.mimetype))}`,[(0,l.nameof)((e=>e.title))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.title))}`,[(0,l.nameof)((e=>e.isOwn))]:(0,l.nameof)((e=>e.isOwn))}}),p=n([a(0,u.Inject),a(1,u.Inject),i("design:paramtypes",[c.FileController,d.RuntimeValidator])],p),t.GetFilesUseCase=p},67435:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerFileUseCase=void 0;const o=r(75172),s=r(82890),c=r(19663),l=r(36347),u=r(7071),d=r(7049),f=r(35076);function isLoadPeerFileViaSecret(e){return"id"in e&&"secretKey"in e}function isLoadPeerFileViaReference(e){return"reference"in e}let p=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerFileRequest")),this.loadViaSecretSchema=e.getSchema("LoadPeerFileViaSecretRequest"),this.loadViaReferenceSchema=e.getSchema("LoadPeerFileViaReferenceRequest")}validate(e){if(this.schema.validate(e).isValid)return new l.ValidationResult;if(isLoadPeerFileViaReference(e))return this.convertValidationResult(this.loadViaReferenceSchema.validate(e));if(isLoadPeerFileViaSecret(e))return this.convertValidationResult(this.loadViaSecretSchema.validate(e));const t=new l.ValidationResult;return t.addFailures([new l.ValidationFailure(void 0,"",void 0,d.RuntimeErrors.general.invalidPayload().code,d.RuntimeErrors.general.invalidPayload().message)]),t}};p=n([a(0,u.Inject),i("design:paramtypes",[d.SchemaRepository])],p);let h=class LoadPeerFileUseCase extends d.UseCase{constructor(e,t,r,n){super(n),this.fileController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){let t;if(isLoadPeerFileViaSecret(e)){const r=await s.CryptoSecretKey.fromBase64(e.secretKey);t=await this.loadFile(c.CoreId.from(e.id),r)}else{if(!isLoadPeerFileViaReference(e))throw new Error("Invalid request format.");t=await this.createFileFromTokenReferenceRequest(e.reference)}return await this.accountController.syncDatawallet(),t}async createFileFromTokenReferenceRequest(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw d.RuntimeErrors.general.cacheEmpty(c.Token,t.id.toString());if(!(t.cache.content instanceof c.TokenContentFile))return o.Result.fail(d.RuntimeErrors.general.invalidTokenContent());const r=t.cache.content;return await this.loadFile(r.fileId,r.secretKey)}async loadFile(e,t){const r=await this.fileController.loadPeerFile(e,t);return o.Result.ok(f.FileMapper.toFileDTO(r))}};h=n([a(0,u.Inject),a(1,u.Inject),a(2,u.Inject),a(3,u.Inject),i("design:paramtypes",[c.FileController,c.TokenController,c.AccountController,p])],h),t.LoadPeerFileUseCase=h},32109:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UploadOwnFileUseCase=void 0;const o=r(75172),s=r(82890),c=r(19663),l=r(99490),u=r(7071),d=r(7049),f=r(35076);class UploadOwnFileRequestValidator extends d.RuntimeValidator{constructor(){super(),this.validateIf((e=>e.content)).isNotNull().fulfills((e=>e.length>0)).withFailureMessage("file content is empty"),this.validateIf((e=>e.content)).isNotNull().fulfills((e=>e.byteLength<=this._maxFileSize)).withFailureMessage("file content is too large"),this.validateIf((e=>e.filename)).isNotNull(),this.validateIf((e=>e.mimetype)).isNotNull(),this.validateIf((e=>e.title)).isNotNull(),this.validateIf((e=>e.expiresAt)).isNotNull(),this.validateIf((e=>e.expiresAt)).fulfills((e=>l.DateTime.fromISO(e)>l.DateTime.utc())).withFailureMessage("'$propertyName' must be in the future.")}set maxFileSize(e){this._maxFileSize=e}}let p=class UploadOwnFileUseCase extends d.UseCase{constructor(e,t,r){super(r),this.fileController=e,this.accountController=t,r.maxFileSize=e.config.platformMaxUnencryptedFileSize}async executeInternal(e){var t;const r=await this.fileController.sendFile({buffer:s.CoreBuffer.from(e.content),title:e.title,description:null!==(t=e.description)&&void 0!==t?t:"",filename:e.filename,mimetype:e.mimetype,expiresAt:c.CoreDate.from(e.expiresAt)});return await this.accountController.syncDatawallet(),o.Result.ok(f.FileMapper.toFileDTO(r))}};p=n([a(0,u.Inject),a(1,u.Inject),a(2,u.Inject),i("design:paramtypes",[c.FileController,c.AccountController,UploadOwnFileRequestValidator])],p),t.UploadOwnFileUseCase=p},20098:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(10542),t),i(r(6913),t),i(r(68516),t),i(r(35076),t),i(r(13520),t),i(r(35911),t),i(r(67435),t),i(r(32109),t)},54824:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CheckIdentityUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(94316);class CheckIdentityRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.address)).fulfills(l.AddressValidator.required())}}let d=class CheckIdentityUseCase extends l.UseCase{constructor(e,t,r){super(r),this.identityController=e,this.relationshipsController=t}async executeInternal(e){const t=s.CoreAddress.from(e.address);if(this.identityController.isMe(t))return o.Result.ok({self:!0});const r=await this.relationshipsController.getRelationshipToIdentity(t);if(r){const e=u.RelationshipMapper.toRelationshipDTO(r);return r.status===s.RelationshipStatus.Pending?o.Result.ok({peer:!0,relationshipPending:!0,relationship:e}):r.status===s.RelationshipStatus.Active||r.status===s.RelationshipStatus.Terminating?o.Result.ok({peer:!0,relationshipActive:!0,relationship:e}):o.Result.ok({peer:!0,relationshipTerminated:!0,relationship:e})}return o.Result.ok({unknown:!0})}};d=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),i("design:paramtypes",[s.IdentityController,s.RelationshipsController,CheckIdentityRequestValidator])],d),t.CheckIdentityUseCase=d},74847:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(54824),t)},29667:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(69276),t),i(r(97802),t),i(r(20098),t),i(r(74847),t),i(r(92290),t),i(r(7831),t),i(r(43084),t),i(r(25631),t)},64860:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadAttachmentUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(76881);class DownloadAttachmentRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIf((e=>e.id)).fulfills(l.IdValidator.required(s.BackboneIds.message)),this.validateIf((e=>e.attachmentId)).fulfills(l.IdValidator.required(s.BackboneIds.file))}}let d=class DownloadAttachmentUseCase extends l.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(s.CoreId.from(e.id));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.Message));if(!t.cache)throw l.RuntimeErrors.general.cacheEmpty(s.Message,t.id.toString());const r=t.cache.attachments.find((t=>t.equals(s.CoreId.from(e.attachmentId))));if(!r)return o.Result.fail(l.RuntimeErrors.messages.fileNotFoundInMessage(e.attachmentId));const n=await this.fileController.getFile(r);if(!n)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.File));const i=await this.fileController.downloadFileContent(r);return o.Result.ok(u.MessageMapper.toDownloadAttachmentResponse(i,n))}};d=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),i("design:paramtypes",[s.MessageController,s.FileController,DownloadAttachmentRequestValidator])],d),t.DownloadAttachmentUseCase=d},19558:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttachmentMetadataUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(35076);class GetAttachmentMetadataRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIf((e=>e.id)).fulfills(l.IdValidator.required(s.BackboneIds.message)),this.validateIf((e=>e.attachmentId)).fulfills(l.IdValidator.required(s.BackboneIds.file))}}let d=class GetAttachmentMetadataUseCase extends l.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(s.CoreId.from(e.id));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.Message));if(!t.cache)throw l.RuntimeErrors.general.cacheEmpty(s.Message,t.id.toString());const r=t.cache.attachments.find((t=>t.equals(s.CoreId.from(e.attachmentId))));if(!r)return o.Result.fail(l.RuntimeErrors.messages.fileNotFoundInMessage(e.attachmentId));const n=await this.fileController.getFile(r);return n?o.Result.ok(u.FileMapper.toFileDTO(n)):o.Result.fail(l.RuntimeErrors.general.recordNotFound(File))}};d=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),i("design:paramtypes",[s.MessageController,s.FileController,GetAttachmentMetadataRequestValidator])],d),t.GetAttachmentMetadataUseCase=d},40978:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetMessageUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(76881);class GetMessageRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIf((e=>e.id)).fulfills(l.IdValidator.required(s.BackboneIds.message))}}let d=class GetMessageUseCase extends l.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(s.CoreId.from(e.id));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.Message));if(!t.cache)return o.Result.fail(l.RuntimeErrors.general.cacheEmpty(s.Message,t.id.toString()));const r=await Promise.all(t.cache.attachments.map((e=>this.fileController.getFile(e))));if(r.some((e=>!e)))throw new Error("A file could not be fetched.");return o.Result.ok(u.MessageMapper.toMessageWithAttachmentsDTO(t,r))}};d=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),i("design:paramtypes",[s.MessageController,s.FileController,GetMessageRequestValidator])],d),t.GetMessageUseCase=d},79231:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetMessagesUseCase=void 0;const o=r(92937),s=r(75172),c=r(19663),l=r(94714),u=r(7071),d=r(7049),f=r(76881);class GetMessagesRequestValidator extends d.RuntimeValidator{constructor(){super()}}let p=class GetMessagesUseCase extends d.UseCase{constructor(e,t){super(t),this.messageController=e}async executeInternal(e){const t=GetMessagesUseCase.queryTranslator.parse(e.query),r=await this.messageController.getMessages(t);return s.Result.ok(f.MessageMapper.toMessageDTOList(r))}};p.queryTranslator=new o.QueryTranslator({whitelist:{[(0,l.nameof)((e=>e.createdBy))]:!0,[(0,l.nameof)((e=>e.createdByDevice))]:!0,[(0,l.nameof)((e=>e.createdAt))]:!0,[`${(0,l.nameof)((e=>e.recipients))}.${(0,l.nameof)((e=>e.address))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.@type`]:!0,[`${(0,l.nameof)((e=>e.content))}.body`]:!0,[`${(0,l.nameof)((e=>e.content))}.subject`]:!0,[(0,l.nameof)((e=>e.attachments))]:!0,[(0,l.nameof)((e=>e.relationshipIds))]:!0,participant:!0},alias:{[(0,l.nameof)((e=>e.createdBy))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.createdBy))}`,[(0,l.nameof)((e=>e.createdByDevice))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.createdByDevice))}`,[(0,l.nameof)((e=>e.createdAt))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.createdAt))}`,[`${(0,l.nameof)((e=>e.recipients))}.${(0,l.nameof)((e=>e.address))}`]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.recipients))}.${(0,l.nameof)((e=>e.address))}`,[`${(0,l.nameof)((e=>e.content))}.@type`]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.content))}.@type`,[`${(0,l.nameof)((e=>e.content))}.body`]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.content))}.body`,[`${(0,l.nameof)((e=>e.content))}.subject`]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.content))}.subject`,[(0,l.nameof)((e=>e.attachments))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.attachments))}`},custom:{relationshipIds:(e,t)=>{e.relationshipIds={$contains:t}},participant:(e,t)=>{let r;if(Array.isArray(t)){if(0===t.length)return;r={};for(const e of t){const t=p.queryTranslator.parseString(e,!0);switch(t.field){case"$in":case"$nin":r[t.field]=r[t.field]||[],r[t.field].push(t.value);break;default:r[t.field]=t.value}}}else r=p.queryTranslator.parseStringVal(t);e.$or=[{[`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.createdBy))}`]:r},{[`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.recipients))}.${(0,l.nameof)((e=>e.address))}`]:r}]}}}),p=n([a(0,u.Inject),a(1,u.Inject),i("design:paramtypes",[c.MessageController,GetMessagesRequestValidator])],p),t.GetMessagesUseCase=p},76881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageMapper=void 0;const n=r(19663),i=r(7049),a=r(35076);t.MessageMapper=class MessageMapper{static toDownloadAttachmentResponse(e,t){if(!t.cache)throw i.RuntimeErrors.general.cacheEmpty(n.File,t.id.toString());return{content:e.buffer,filename:t.cache.filename?t.cache.filename:t.id.toString(),mimetype:t.cache.mimetype}}static toMessageWithAttachmentsDTO(e,t){if(!e.cache)throw i.RuntimeErrors.general.cacheEmpty(n.Message,e.id.toString());return{id:e.id.toString(),content:e.cache.content.toJSON(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),recipients:e.cache.recipients.map((e=>this.toRecipient(e))),createdAt:e.cache.createdAt.toString(),relationshipIds:e.relationshipIds.map((e=>e.toString())),attachments:t.map((e=>a.FileMapper.toFileDTO(e)))}}static toMessageDTO(e){if(!e.cache)throw i.RuntimeErrors.general.cacheEmpty(n.Message,e.id.toString());return{id:e.id.toString(),content:e.cache.content.toJSON(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),recipients:e.cache.recipients.map((e=>this.toRecipient(e))),relationshipIds:e.relationshipIds.map((e=>e.toString())),createdAt:e.cache.createdAt.toString(),attachments:e.cache.attachments.map((e=>e.toString()))}}static toMessageDTOList(e){return e.map((e=>this.toMessageDTO(e)))}static toRecipient(e){var t,r;return{address:e.address.toString(),receivedAt:null===(t=e.receivedAt)||void 0===t?void 0:t.toString(),receivedByDevice:null===(r=e.receivedByDevice)||void 0===r?void 0:r.toString()}}}},38400:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SendMessageUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(42205),u=r(7049),d=r(76881);class SendMessageRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfIterable((e=>e.recipients)).isNotEmpty(),this.validateIfEachString((e=>e.recipients)).fulfills(u.AddressValidator.required()),this.validateIfAny((e=>e.content)).isNotNull(),this.validateIfEachString((e=>e.attachments)).fulfills(u.IdValidator.required(s.BackboneIds.file))}}let f=class SendMessageUseCase extends u.UseCase{constructor(e,t,r,n,i,a){super(a),this.messageController=e,this.fileController=t,this.accountController=r,this.identityController=n,this.eventBus=i}async executeInternal(e){const t=await this.transformAttachments(e.attachments);if(t.isError)return o.Result.fail(t.error);const r=await this.messageController.sendMessage({recipients:e.recipients.map((e=>s.CoreAddress.from(e))),content:e.content,attachments:t.value}),n=d.MessageMapper.toMessageDTO(r);return this.eventBus.publish(new l.MessageSentEvent(this.identityController.identity.address.toString(),n)),await this.accountController.syncDatawallet(),o.Result.ok(d.MessageMapper.toMessageDTO(r))}async transformAttachments(e){if(!e||0===e.length)return o.Result.ok([]);const t=[];for(const r of e){const e=await this.fileController.getFile(s.CoreId.from(r));if(!e)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.File));t.push(e)}return o.Result.ok(t)}};f=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),a(3,c.Inject),a(4,c.Inject),a(5,c.Inject),i("design:paramtypes",[s.MessageController,s.FileController,s.AccountController,s.IdentityController,o.EventBus,SendMessageRequestValidator])],f),t.SendMessageUseCase=f},92290:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(64860),t),i(r(19558),t),i(r(40978),t),i(r(79231),t),i(r(76881),t),i(r(38400),t)},88580:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOwnRelationshipTemplateUseCase=void 0;const o=r(75172),s=r(19663),c=r(99490),l=r(7071),u=r(7049),d=r(58434);class CreateOwnRelationshipTemplateRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIf((e=>e.expiresAt)).fulfills((e=>c.DateTime.fromISO(e)>c.DateTime.utc())).withFailureMessage("'$propertyName' must be in the future."),this.validateIfAny((e=>e.content)).isNotNull(),this.validateIfNumber((e=>e.maxNumberOfRelationships)).isGreaterThanOrEqual(1).whenNotNull()}}let f=class CreateOwnRelationshipTemplateUseCase extends u.UseCase{constructor(e,t,r){super(r),this.templateController=e,this.accountController=t}async executeInternal(e){const t=await this.templateController.sendRelationshipTemplate({content:e.content,expiresAt:s.CoreDate.from(e.expiresAt),maxNumberOfRelationships:e.maxNumberOfRelationships});return await this.accountController.syncDatawallet(),o.Result.ok(d.RelationshipTemplateMapper.toRelationshipTemplateDTO(t))}};f=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[s.RelationshipTemplateController,s.AccountController,CreateOwnRelationshipTemplateRequestValidator])],f),t.CreateOwnRelationshipTemplateUseCase=f},17255:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenForOwnTemplateUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(57121);class CreateTokenForOwnTemplateRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.templateId)).fulfills(l.IdValidator.required(s.BackboneIds.relationshipTemplate)),this.validateIfString((e=>e.expiresAt)).fulfills(l.DateValidator.optional())}}let d=class CreateTokenForOwnTemplateUseCase extends l.UseCase{constructor(e,t,r,n){super(n),this.templateController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){var t,r,n;const i=await this.templateController.getRelationshipTemplate(s.CoreId.from(e.templateId));if(!i)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.RelationshipTemplate));if(!i.isOwn)return o.Result.fail(l.RuntimeErrors.relationshipTemplates.cannotCreateTokenForPeerTemplate());const a=await s.TokenContentRelationshipTemplate.from({templateId:i.id,secretKey:i.secretKey}),c=null===(t=e.ephemeral)||void 0===t||t,d=null!==(n=null===(r=i.cache)||void 0===r?void 0:r.expiresAt)&&void 0!==n?n:s.CoreDate.utc().add({days:12}),f=e.expiresAt?s.CoreDate.from(e.expiresAt):d,p=await this.tokenController.sendToken({content:a,expiresAt:f,ephemeral:c});return c||await this.accountController.syncDatawallet(),o.Result.ok(await u.TokenMapper.toTokenDTO(p,c))}};d=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),a(3,c.Inject),i("design:paramtypes",[s.RelationshipTemplateController,s.TokenController,s.AccountController,CreateTokenForOwnTemplateRequestValidator])],d),t.CreateTokenForOwnTemplateUseCase=d},13683:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenQrCodeForOwnTemplateUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049);class CreateTokenQrCodeForOwnTemplateRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.templateId)).fulfills(l.IdValidator.required(s.BackboneIds.relationshipTemplate)),this.validateIfString((e=>e.expiresAt)).fulfills(l.DateValidator.optional())}}let u=class CreateTokenQrCodeForOwnTemplateUseCase extends l.UseCase{constructor(e,t,r){super(r),this.templateController=e,this.tokenController=t}async executeInternal(e){var t,r;const n=await this.templateController.getRelationshipTemplate(s.CoreId.from(e.templateId));if(!n)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.RelationshipTemplate));if(!n.isOwn)return o.Result.fail(l.RuntimeErrors.relationshipTemplates.cannotCreateTokenForPeerTemplate());const i=await s.TokenContentRelationshipTemplate.from({templateId:n.id,secretKey:n.secretKey}),a=null!==(r=null===(t=n.cache)||void 0===t?void 0:t.expiresAt)&&void 0!==r?r:s.CoreDate.utc().add({days:12}),c=e.expiresAt?s.CoreDate.from(e.expiresAt):a,u=await this.tokenController.sendToken({content:i,expiresAt:c,ephemeral:!0}),d=await l.QRCode.from(await u.truncate());return o.Result.ok({qrCodeBytes:d.asBase64()})}};u=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),i("design:paramtypes",[s.RelationshipTemplateController,s.TokenController,CreateTokenQrCodeForOwnTemplateRequestValidator])],u),t.CreateTokenQrCodeForOwnTemplateUseCase=u},72603:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipTemplateUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(58434);class GetRelationshipTemplateRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(l.IdValidator.required(s.BackboneIds.relationshipTemplate))}}let d=class GetRelationshipTemplateUseCase extends l.UseCase{constructor(e,t){super(t),this.relationshipTemplateController=e}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(s.CoreId.from(e.id));return t?o.Result.ok(u.RelationshipTemplateMapper.toRelationshipTemplateDTO(t)):o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.RelationshipTemplate))}};d=n([a(0,c.Inject),a(1,c.Inject),i("design:paramtypes",[s.RelationshipTemplateController,GetRelationshipTemplateRequestValidator])],d),t.GetRelationshipTemplateUseCase=d},1371:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipTemplatesUseCase=void 0;const o=r(92937),s=r(75172),c=r(19663),l=r(94714),u=r(7071),d=r(7049),f=r(58434);let p=class GetRelationshipTemplatesUseCase extends d.UseCase{constructor(e,t){super(t),this.relationshipTemplateController=e}async executeInternal(e){const t=GetRelationshipTemplatesUseCase.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,l.nameof)((e=>e.isOwn))]=e.ownerRestriction===d.OwnerRestriction.Own);const r=await this.relationshipTemplateController.getRelationshipTemplates(t);return s.Result.ok(f.RelationshipTemplateMapper.toRelationshipTemplateDTOList(r))}};p.queryTranslator=new o.QueryTranslator({whitelist:{[(0,l.nameof)((e=>e.isOwn))]:!0,[(0,l.nameof)((e=>e.createdAt))]:!0,[(0,l.nameof)((e=>e.expiresAt))]:!0,[(0,l.nameof)((e=>e.createdBy))]:!0,[(0,l.nameof)((e=>e.createdByDevice))]:!0,[(0,l.nameof)((e=>e.maxNumberOfRelationships))]:!0},alias:{[(0,l.nameof)((e=>e.isOwn))]:(0,l.nameof)((e=>e.isOwn)),[(0,l.nameof)((e=>e.createdAt))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.createdAt))}`,[(0,l.nameof)((e=>e.expiresAt))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.expiresAt))}`,[(0,l.nameof)((e=>e.createdBy))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.createdBy))}`,[(0,l.nameof)((e=>e.createdByDevice))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.createdByDevice))}`,[(0,l.nameof)((e=>e.maxNumberOfRelationships))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.maxNumberOfRelationships))}`}}),p=n([a(0,u.Inject),a(1,u.Inject),i("design:paramtypes",[c.RelationshipTemplateController,d.RuntimeValidator])],p),t.GetRelationshipTemplatesUseCase=p},73186:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerRelationshipTemplateUseCase=void 0;const o=r(75172),s=r(82890),c=r(19663),l=r(7071),u=r(7049),d=r(58434);class LoadPeerRelationshipTemplateRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIf((e=>e)).fulfills((e=>this.isCreateRelationshipTemplateFromIdAndKeyRequest(e)||this.isCreateRelationshipTemplateFromTokenReferenceRequest(e))).withFailureCode(u.RuntimeErrors.general.invalidPayload().code).withFailureMessage(u.RuntimeErrors.general.invalidPayload().message),this.setupRulesForCreateRelationshipTemplateFromIdAndKeyRequest(),this.setupRulesForCreateRelationshipTemplateFromTokenReferenceRequest()}setupRulesForCreateRelationshipTemplateFromIdAndKeyRequest(){this.validateIfString((e=>e.id)).fulfills(u.IdValidator.required(c.BackboneIds.relationshipTemplate)).when(this.isCreateRelationshipTemplateFromIdAndKeyRequest),this.validateIfString((e=>e.secretKey)).isNotNull().when(this.isCreateRelationshipTemplateFromIdAndKeyRequest)}setupRulesForCreateRelationshipTemplateFromTokenReferenceRequest(){this.validateIfString((e=>e.reference)).isNotNull().when(this.isCreateRelationshipTemplateFromTokenReferenceRequest)}isCreateRelationshipTemplateFromIdAndKeyRequest(e){return!!e.id&&!!e.secretKey}isCreateRelationshipTemplateFromTokenReferenceRequest(e){return!!e.reference}}let f=class LoadPeerRelationshipTemplateUseCase extends u.UseCase{constructor(e,t,r,n){super(n),this.templateController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){let t;if(e.id&&e.secretKey){const r=await s.CryptoSecretKey.fromBase64(e.secretKey);t=await this.loadTemplate(c.CoreId.from(e.id),r)}else{if(!e.reference)throw new Error("Invalid request format.");t=await this.createRelationshipTemplateFromTokenReferenceRequest(e.reference)}return await this.accountController.syncDatawallet(),t}async createRelationshipTemplateFromTokenReferenceRequest(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw u.RuntimeErrors.general.cacheEmpty(c.Token,t.id.toString());if(!(t.cache.content instanceof c.TokenContentRelationshipTemplate))return o.Result.fail(u.RuntimeErrors.general.invalidTokenContent());const r=t.cache.content;return await this.loadTemplate(r.templateId,r.secretKey)}async loadTemplate(e,t){const r=await this.templateController.loadPeerRelationshipTemplate(e,t);return o.Result.ok(d.RelationshipTemplateMapper.toRelationshipTemplateDTO(r))}};f=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),a(3,l.Inject),i("design:paramtypes",[c.RelationshipTemplateController,c.TokenController,c.AccountController,LoadPeerRelationshipTemplateRequestValidator])],f),t.LoadPeerRelationshipTemplateUseCase=f},58434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplateMapper=void 0;const n=r(19663),i=r(7049);t.RelationshipTemplateMapper=class RelationshipTemplateMapper{static toRelationshipTemplateDTO(e){var t;if(!e.cache)throw i.RuntimeErrors.general.cacheEmpty(n.RelationshipTemplate,e.id.toString());return{id:e.id.toString(),isOwn:e.isOwn,createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),createdAt:e.cache.createdAt.toString(),content:e.cache.content.toJSON(),expiresAt:null===(t=e.cache.expiresAt)||void 0===t?void 0:t.toString(),maxNumberOfRelationships:e.cache.maxNumberOfRelationships}}static toRelationshipTemplateDTOList(e){return e.map((e=>this.toRelationshipTemplateDTO(e)))}}},43084:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88580),t),i(r(17255),t),i(r(13683),t),i(r(72603),t),i(r(1371),t),i(r(73186),t),i(r(58434),t)},63018:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptRelationshipChangeUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(42205),u=r(7049),d=r(94316);class AcceptRelationshipChangeRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.relationshipId)).fulfills(u.IdValidator.required(s.BackboneIds.relationship)),this.validateIfString((e=>e.changeId)).fulfills(u.IdValidator.required(s.BackboneIds.relationshipChange))}}let f=class AcceptRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r,n,i){super(i),this.relationshipsController=e,this.accountController=t,this.identityController=r,this.eventBus=n}async executeInternal(e){const t=await this.relationshipsController.getRelationship(s.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(s.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.RelationshipChange));const n=await this.relationshipsController.acceptChange(r,e.content),i=d.RelationshipMapper.toRelationshipDTO(n);return this.eventBus.publish(new l.RelationshipChangedEvent(this.identityController.identity.address.toString(),i)),await this.accountController.syncDatawallet(),o.Result.ok(i)}};f=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),a(3,c.Inject),a(4,c.Inject),i("design:paramtypes",[s.RelationshipsController,s.AccountController,s.IdentityController,o.EventBus,AcceptRelationshipChangeRequestValidator])],f),t.AcceptRelationshipChangeUseCase=f},83986:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateRelationshipUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(42205),u=r(7049),d=r(94316);class CreateRelationshipRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.templateId)).fulfills(u.IdValidator.required(s.BackboneIds.relationshipTemplate)),this.validateIf((e=>e.content)).isDefined()}}let f=class CreateRelationshipUseCase extends u.UseCase{constructor(e,t,r,n,i,a){super(a),this.relationshipsController=e,this.relationshipTemplateController=t,this.accountController=r,this.identityController=n,this.eventBus=i}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(s.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.RelationshipTemplate));const r=await this.relationshipsController.sendRelationship({template:t,content:e.content}),n=d.RelationshipMapper.toRelationshipDTO(r);return this.eventBus.publish(new l.RelationshipChangedEvent(this.identityController.identity.address.toString(),n)),await this.accountController.syncDatawallet(),o.Result.ok(n)}};f=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),a(3,c.Inject),a(4,c.Inject),a(5,c.Inject),i("design:paramtypes",[s.RelationshipsController,s.RelationshipTemplateController,s.AccountController,s.IdentityController,o.EventBus,CreateRelationshipRequestValidator])],f),t.CreateRelationshipUseCase=f},57619:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateRelationshipChangeUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049);class CreateRelationshipChangeRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(l.IdValidator.required(s.BackboneIds.relationship)),this.validateIf((e=>e.content)).isDefined()}}let u=class CreateRelationshipChangeUseCase extends l.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.accountController=t}async executeInternal(e){return o.Result.fail(l.RuntimeErrors.general.notImplemented())}};u=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),i("design:paramtypes",[s.RelationshipsController,s.AccountController,CreateRelationshipChangeRequestValidator])],u),t.CreateRelationshipChangeUseCase=u},59456:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(94316);class GetRelationshipRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(l.IdValidator.required(s.BackboneIds.relationship))}}let d=class GetRelationshipUseCase extends l.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=await this.relationshipsController.getRelationship(s.CoreId.from(e.id));return t?o.Result.ok(u.RelationshipMapper.toRelationshipDTO(t)):o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.Relationship))}};d=n([a(0,c.Inject),a(1,c.Inject),i("design:paramtypes",[s.RelationshipsController,GetRelationshipRequestValidator])],d),t.GetRelationshipUseCase=d},90215:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipByAddressUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(94316);class GetRelationshipByAddressRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.address)).fulfills(l.AddressValidator.required())}}let d=class GetRelationshipByAddressUseCase extends l.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=await this.relationshipsController.getRelationshipToIdentity(s.CoreAddress.from(e.address));return t?o.Result.ok(u.RelationshipMapper.toRelationshipDTO(t)):o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.Relationship))}};d=n([a(0,c.Inject),a(1,c.Inject),i("design:paramtypes",[s.RelationshipsController,GetRelationshipByAddressRequestValidator])],d),t.GetRelationshipByAddressUseCase=d},73457:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipsUseCase=void 0;const o=r(92937),s=r(75172),c=r(19663),l=r(94714),u=r(7071),d=r(7049),f=r(94316);let p=class GetRelationshipsUseCase extends d.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=GetRelationshipsUseCase.queryTranslator.parse(e.query),r=await this.relationshipsController.getRelationships(t);return s.Result.ok(f.RelationshipMapper.toRelationshipDTOList(r))}};p.queryTranslator=new o.QueryTranslator({whitelist:{[(0,l.nameof)((e=>e.lastMessageReceivedAt))]:!0,[(0,l.nameof)((e=>e.lastMessageSentAt))]:!0,[(0,l.nameof)((e=>e.peer))]:!0,[(0,l.nameof)((e=>e.status))]:!0,[`${(0,l.nameof)((e=>e.template))}.${(0,l.nameof)((e=>e.id))}`]:!0},alias:{[(0,l.nameof)((e=>e.lastMessageReceivedAt))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.lastMessageReceivedAt))}`,[(0,l.nameof)((e=>e.lastMessageSentAt))]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.lastMessageSentAt))}`,[`${(0,l.nameof)((e=>e.template))}.${(0,l.nameof)((e=>e.id))}`]:`${(0,l.nameof)((e=>e.cache))}.${(0,l.nameof)((e=>e.template))}.${(0,l.nameof)((e=>e.id))}`,[(0,l.nameof)((e=>e.peer))]:(0,l.nameof)((e=>e.peer)),[(0,l.nameof)((e=>e.status))]:(0,l.nameof)((e=>e.status)),[(0,l.nameof)((e=>e.peer))]:`${(0,l.nameof)((e=>e.peer))}.${(0,l.nameof)((e=>e.address))}`}}),p=n([a(0,u.Inject),a(1,u.Inject),i("design:paramtypes",[c.RelationshipsController,d.RuntimeValidator])],p),t.GetRelationshipsUseCase=p},42214:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RejectRelationshipChangeUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(42205),u=r(7049),d=r(94316);class RejectRelationshipChangeRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.relationshipId)).fulfills(u.IdValidator.required(s.BackboneIds.relationship)),this.validateIfString((e=>e.changeId)).fulfills(u.IdValidator.required(s.BackboneIds.relationshipChange))}}let f=class RejectRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r,n,i){super(i),this.relationshipsController=e,this.accountController=t,this.identityController=r,this.eventBus=n}async executeInternal(e){const t=await this.relationshipsController.getRelationship(s.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(s.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.RelationshipChange));const n=await this.relationshipsController.rejectChange(r,e.content),i=d.RelationshipMapper.toRelationshipDTO(n);return this.eventBus.publish(new l.RelationshipChangedEvent(this.identityController.identity.address.toString(),i)),await this.accountController.syncDatawallet(),o.Result.ok(i)}};f=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),a(3,c.Inject),a(4,c.Inject),i("design:paramtypes",[s.RelationshipsController,s.AccountController,s.IdentityController,o.EventBus,RejectRelationshipChangeRequestValidator])],f),t.RejectRelationshipChangeUseCase=f},94316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipMapper=void 0;const n=r(19663),i=r(7049),a=r(58434);t.RelationshipMapper=class RelationshipMapper{static toRelationshipDTO(e){var t,r;if(!e.cache)throw i.RuntimeErrors.general.cacheEmpty(n.Relationship,e.id.toString());return{id:e.id.toString(),template:a.RelationshipTemplateMapper.toRelationshipTemplateDTO(e.cache.template),status:e.status,peer:e.peer.address.toString(),peerIdentity:{address:e.peer.address.toString(),publicKey:e.peer.publicKey.toString(),realm:e.peer.realm},changes:e.cache.changes.map((e=>this.toRelationshipChangeDTO(e))),lastMessageSentAt:null===(t=e.cache.lastMessageSentAt)||void 0===t?void 0:t.toString(),lastMessageReceivedAt:null===(r=e.cache.lastMessageReceivedAt)||void 0===r?void 0:r.toString()}}static toRelationshipDTOList(e){return e.map((e=>this.toRelationshipDTO(e)))}static toRelationshipChangeRequestDTO(e){var t;return{createdBy:e.createdBy.toString(),createdByDevice:e.createdByDevice.toString(),createdAt:e.createdAt.toString(),content:null===(t=e.content)||void 0===t?void 0:t.toJSON()}}static toRelationshipChangeResponseDTO(e){var t;return{createdBy:e.createdBy.toString(),createdByDevice:e.createdByDevice.toString(),createdAt:e.createdAt.toString(),content:null===(t=e.content)||void 0===t?void 0:t.toJSON()}}static toRelationshipChangeDTO(e){return{id:e.id.toString(),request:this.toRelationshipChangeRequestDTO(e.request),status:e.status,type:e.type,response:e.response?this.toRelationshipChangeResponseDTO(e.response):void 0}}}},17389:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RevokeRelationshipChangeUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(42205),u=r(7049),d=r(94316);class RevokeRelationshipChangeRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.relationshipId)).fulfills(u.IdValidator.required(s.BackboneIds.relationship)),this.validateIfString((e=>e.changeId)).fulfills(u.IdValidator.required(s.BackboneIds.relationshipChange))}}let f=class RevokeRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r,n,i){super(i),this.relationshipsController=e,this.accountController=t,this.eventBus=r,this.identityController=n}async executeInternal(e){const t=await this.relationshipsController.getRelationship(s.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(s.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(s.RelationshipChange));const n=await this.relationshipsController.revokeChange(r,e.content),i=d.RelationshipMapper.toRelationshipDTO(n);return this.eventBus.publish(new l.RelationshipChangedEvent(this.identityController.identity.address.toString(),i)),await this.accountController.syncDatawallet(),o.Result.ok(i)}};f=n([a(0,c.Inject),a(1,c.Inject),a(2,c.Inject),a(3,c.Inject),a(4,c.Inject),i("design:paramtypes",[s.RelationshipsController,s.AccountController,o.EventBus,s.IdentityController,RevokeRelationshipChangeRequestValidator])],f),t.RevokeRelationshipChangeUseCase=f},7831:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(63018),t),i(r(83986),t),i(r(57619),t),i(r(59456),t),i(r(90215),t),i(r(73457),t),i(r(42214),t),i(r(94316),t),i(r(17389),t)},10429:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOwnTokenUseCase=void 0;const o=r(90194),s=r(75172),c=r(19663),l=r(99490),u=r(7071),d=r(7049),f=r(57121);class CreateOwnTokenRequestValidator extends d.RuntimeValidator{constructor(){super(),this.validateIfAny((e=>e.content)).isNotNull(),this.validateIf((e=>e.expiresAt)).isNotNull(),this.validateIf((e=>e.expiresAt)).fulfills((e=>l.DateTime.fromISO(e)>l.DateTime.utc())).withFailureMessage("'$propertyName' must be in the future."),this.validateIfAny((e=>e.ephemeral)).isNotNull()}}let p=class CreateOwnTokenUseCase extends d.UseCase{constructor(e,t,r){super(r),this.tokenController=e,this.accountController=t}async executeInternal(e){let t;try{t=await o.SerializableAsync.from(e.content)}catch{throw d.RuntimeErrors.general.invalidTokenContent()}const r=await this.tokenController.sendToken({content:t,expiresAt:c.CoreDate.from(e.expiresAt),ephemeral:e.ephemeral});return e.ephemeral||await this.accountController.syncDatawallet(),s.Result.ok(await f.TokenMapper.toTokenDTO(r,e.ephemeral))}};p=n([a(0,u.Inject),a(1,u.Inject),a(2,u.Inject),i("design:paramtypes",[c.TokenController,c.AccountController,CreateOwnTokenRequestValidator])],p),t.CreateOwnTokenUseCase=p},37896:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetQRCodeForTokenUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049);class GetQRCodeForTokenRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(l.IdValidator.required(s.BackboneIds.token))}}let u=class GetQRCodeForTokenUseCase extends l.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=await this.tokenController.getToken(s.CoreId.from(e.id));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(s.Token));const r=await l.QRCode.from(await t.truncate());return o.Result.ok({qrCodeBytes:r.asBase64()})}};u=n([a(0,c.Inject),a(1,c.Inject),i("design:paramtypes",[s.TokenController,GetQRCodeForTokenRequestValidator])],u),t.GetQRCodeForTokenUseCase=u},50858:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetTokenUseCase=void 0;const o=r(75172),s=r(19663),c=r(7071),l=r(7049),u=r(57121);class GetTokenRequestValidator extends l.RuntimeValidator{constructor(){super(),this.validateIfString((e=>e.id)).fulfills(l.IdValidator.required(s.BackboneIds.token))}}let d=class GetTokenUseCase extends l.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=await this.tokenController.getToken(s.CoreId.from(e.id));return t?o.Result.ok(await u.TokenMapper.toTokenDTO(t,!1)):o.Result.fail(l.RuntimeErrors.general.recordNotFound("Token"))}};d=n([a(0,c.Inject),a(1,c.Inject),i("design:paramtypes",[s.TokenController,GetTokenRequestValidator])],d),t.GetTokenUseCase=d},82093:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetTokensUseCase=void 0;const o=r(92937),s=r(75172),c=r(19663),l=r(94714),u=r(7071),d=r(7049),f=r(57121);let p=class GetTokensUseCase extends d.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=GetTokensUseCase.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,l.nameof)((e=>e.isOwn))]=e.ownerRestriction===d.OwnerRestriction.Own);const r=await this.tokenController.getTokens(t);return s.Result.ok(await f.TokenMapper.toTokenDTOList(r,!1))}};p.queryTranslator=new o.QueryTranslator({whitelist:{[(0,l.nameof)((e=>e.createdAt))]:!0,[(0,l.nameof)((e=>e.createdBy))]:!0,[(0,l.nameof)((e=>e.createdByDevice))]:!0,[(0,l.nameof)((e=>e.expiresAt))]:!0},alias:{[(0,l.nameof)((e=>e.createdAt))]:`${(0,l.nameof)((e=>e.cache))}.${[(0,l.nameof)((e=>e.createdAt))]}`,[(0,l.nameof)((e=>e.createdBy))]:`${(0,l.nameof)((e=>e.cache))}.${[(0,l.nameof)((e=>e.createdBy))]}`,[(0,l.nameof)((e=>e.createdByDevice))]:`${(0,l.nameof)((e=>e.cache))}.${[(0,l.nameof)((e=>e.createdByDevice))]}`,[(0,l.nameof)((e=>e.expiresAt))]:`${(0,l.nameof)((e=>e.cache))}.${[(0,l.nameof)((e=>e.expiresAt))]}`}}),p=n([a(0,u.Inject),a(1,u.Inject),i("design:paramtypes",[c.TokenController,d.RuntimeValidator])],p),t.GetTokensUseCase=p},28442:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenUseCase=void 0;const o=r(75172),s=r(82890),c=r(19663),l=r(7071),u=r(7049),d=r(57121);class LoadPeerTokenRequestValidator extends u.RuntimeValidator{constructor(){super(),this.validateIf((e=>e)).fulfills((e=>isCreateTokenFromIdAndKeyRequest(e)||isCreateTokenFromReferenceRequest(e))).withFailureCode(u.RuntimeErrors.general.invalidPayload().code).withFailureMessage(u.RuntimeErrors.general.invalidPayload().message),this.setupRulesForCreateTokenFromReferenceRequest(),this.setupRulesForCreateTokenFromIdAndKeyRequest(),this.validateIfAny((e=>e.ephemeral)).isNotNull()}setupRulesForCreateTokenFromReferenceRequest(){this.validateIfString((e=>e.reference)).isNotNull().when(isCreateTokenFromReferenceRequest)}setupRulesForCreateTokenFromIdAndKeyRequest(){this.validateIfString((e=>e.id)).fulfills(u.IdValidator.required(c.BackboneIds.token)).when(isCreateTokenFromIdAndKeyRequest),this.validateIfString((e=>e.secretKey)).isNotNull().when(isCreateTokenFromIdAndKeyRequest)}}function isCreateTokenFromReferenceRequest(e){return!!e.reference}function isCreateTokenFromIdAndKeyRequest(e){return!!e.id&&!!e.secretKey}let f=class LoadPeerTokenUseCase extends u.UseCase{constructor(e,t,r){super(r),this.tokenController=e,this.accountController=t}async executeInternal(e){let t;if(e.id&&e.secretKey){const r=await s.CryptoSecretKey.fromBase64(e.secretKey);t=await this.tokenController.loadPeerToken(c.CoreId.from(e.id),r,e.ephemeral)}else{if(!e.reference)return o.Result.fail(u.RuntimeErrors.general.invalidPayload());t=await this.tokenController.loadPeerTokenByTruncated(e.reference,e.ephemeral)}return e.ephemeral||await this.accountController.syncDatawallet(),o.Result.ok(await d.TokenMapper.toTokenDTO(t,e.ephemeral))}};f=n([a(0,l.Inject),a(1,l.Inject),a(2,l.Inject),i("design:paramtypes",[c.TokenController,c.AccountController,LoadPeerTokenRequestValidator])],f),t.LoadPeerTokenUseCase=f},57121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenMapper=void 0;const n=r(19663),i=r(7049);class TokenMapper{static async toTokenDTO(e,t){if(!e.cache)throw i.RuntimeErrors.general.cacheEmpty(n.Token,e.id.toString());const r=await e.toTokenReference();return{id:e.id.toString(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),content:e.cache.content.toJSON(),createdAt:e.cache.createdAt.toString(),expiresAt:e.cache.expiresAt.toString(),secretKey:e.secretKey.toBase64(),truncatedReference:r.truncate(),isEphemeral:t}}static async toTokenDTOList(e,t){return await Promise.all(e.map((e=>TokenMapper.toTokenDTO(e,t))))}}t.TokenMapper=TokenMapper},25631:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(10429),t),i(r(37896),t),i(r(50858),t),i(r(82093),t),i(r(28442),t),i(r(57121),t)},79126:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryTranslator=void 0;class QueryTranslator{static defaultKeyRegex=/^[A-z_@][A-z@0-9-_]*(\.[A-z_@][A-z@0-9-_]*)*$/;static defaultValRegex=void 0;static defaultArrRegex=/^[a-zæøå0-9-_.]+(\[])?$/i;ops;alias;blacklist;whitelist;custom;string;keyRegex;valRegex;arrRegex;constructor(e={}){this.ops=e.ops??["!","^","$","~",">","<","$in"],this.alias=e.alias??{},this.blacklist=e.blacklist??{},this.whitelist=e.whitelist??{},this.custom=e.custom??{},e.string=e.string??{},this.string=e.string,this.string.toBoolean="boolean"!=typeof e.string.toBoolean||e.string.toBoolean,this.string.toNumber="boolean"!=typeof e.string.toNumber||e.string.toNumber,this.keyRegex=e.keyRegex??QueryTranslator.defaultKeyRegex,this.valRegex=e.valRegex??QueryTranslator.defaultValRegex,this.arrRegex=e.arrRegex??QueryTranslator.defaultArrRegex}static setDefaultKeyRegex(e){QueryTranslator.defaultKeyRegex=e}static setDefaultValRegex(e){QueryTranslator.defaultValRegex=e}static setDefaultArrRegex(e){QueryTranslator.defaultArrRegex=e}parseString(e,t){let r=e[0]||"";const n="="===e[1];let i=e.substr(n?2:1)||"";const a=this.parseStringVal(i),o={op:r,org:i,value:a};switch(r){case"!":t?o.field="$nin":""===i?(o.field="$exists",o.value=!1):o.field="$ne";break;case">":o.field=n?"$gte":"$gt";break;case"<":o.field=n?"$lte":"$lt";break;case"^":case"$":case"~":switch(o.field="$regex",o.options="i",o.value=this.valRegex?i.replace(this.valRegex,""):o.value.toString(),r){case"^":o.value=`^${a}`;break;case"$":o.value=`${a}$`}break;default:o.org=i=r+i,o.op=r="",o.value=this.parseStringVal(i),t?o.field="$in":""===i?(o.field="$exists",o.value=!0):o.field="$eq"}return o.parsed={},o.parsed[o.field]=o.value,o.options&&(o.parsed.$options=o.options),o}parseStringVal(e){return!(!this.string.toBoolean||"true"!==e.toLowerCase())||(!this.string.toBoolean||"false"!==e.toLowerCase())&&(this.string.toNumber&&!isNaN(parseInt(e,10))&&+e-+e+1>=0?parseFloat(e):e)}parse(e){if(!e)return{};const t={};for(let r of Object.keys(e)){const n=e[r];if(Array.isArray(n)&&(r=r.replace(/\[]$/,"")),(!Object.keys(this.whitelist).length||this.whitelist[r])&&!this.blacklist[r]&&(this.alias[r]&&(r=this.alias[r]),("string"!=typeof n||this.keyRegex.test(r))&&(!Array.isArray(n)||this.arrRegex.test(r))))if("function"!=typeof this.custom[r])if(Array.isArray(n)){if(this.ops.includes("$in")&&n.length>0){t[r]={};for(const e of n)if(this.ops.includes(e[0])){const n=this.parseString(e,!0);switch(n.field){case"$in":case"$nin":t[r][n.field]=t[r][n.field]||[],t[r][n.field].push(n.value);break;case"$regex":t[r].$regex=n.value,t[r].$options=n.options;break;default:t[r][n.field]=n.value}}else t[r].$in=t[r].$in||[],t[r].$in.push(this.parseStringVal(e))}}else"string"==typeof n&&(n?this.ops.includes(n[0])?t[r]=this.parseString(n).parsed:t[r]=this.parseStringVal(n):t[r]={$exists:!0});else this.custom[r].apply(null,[t,n])}return t}}t.QueryTranslator=QueryTranslator},92937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryTranslator=void 0;var n=r(79126);Object.defineProperty(t,"QueryTranslator",{enumerable:!0,get:function(){return n.QueryTranslator}})},71174:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},29159:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventNamespaceFromObject=t.EventBus=void 0;t.EventBus=class EventBus{},t.getEventNamespaceFromObject=function getEventNamespaceFromObject(e){return e.namespace}},95970:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionTargetInfo=void 0;class SubscriptionTargetInfo{namespace;constructor(e){this.namespace=e}static from(e){return e instanceof Function?new ConstructorSubscriptionTargetInfo(e):new NamespaceSubscriptionTargetInfo(e)}}t.SubscriptionTargetInfo=SubscriptionTargetInfo;class ConstructorSubscriptionTargetInfo extends SubscriptionTargetInfo{constructorFunction;constructor(e){super(function getEventNamespaceFromClass(e){return e.namespace}(e)),this.constructorFunction=e}isCompatibleWith(e){return e instanceof this.constructorFunction}}class NamespaceSubscriptionTargetInfo extends SubscriptionTargetInfo{constructor(e){super(e)}isCompatibleWith(e){return!0}}},69729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter2EventBus=void 0;const n=r(56387);r(28660);const i=r(29159),a=r(95970);t.EventEmitter2EventBus=class EventEmitter2EventBus{emitter;wrappers=new Map;nextId=0;constructor(){this.emitter=new n.EventEmitter2({wildcard:!0,maxListeners:50,verboseMemoryLeak:!0})}subscribe(e,t){return this.registerHandler(e,t)}subscribeOnce(e,t){return this.registerHandler(e,t,!0)}unsubscribe(e,t){return this.unregisterHandler(e,t)}registerHandler(e,t,r=!1){const n=a.SubscriptionTargetInfo.from(e),i=this.nextId++,handlerWrapper=a=>{n.isCompatibleWith(a)&&(t(a),r&&this.unsubscribe(e,i))};return this.wrappers.set(i,handlerWrapper),this.emitter.on(n.namespace,handlerWrapper),i}unregisterHandler(e,t){const r=a.SubscriptionTargetInfo.from(e),n=this.wrappers.get(t);return!!n&&(this.emitter.off(r.namespace,n),this.wrappers.delete(t),!0)}publish(e){const t=(0,i.getEventNamespaceFromObject)(e);if(!t)throw Error("The event needs a namespace. Use the EventNamespace-decorator in order to define a namespace for a event.");this.emitter.emit(t,e)}}},9256:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(29159),t),i(r(69729),t)},35917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataEvent=void 0;const n=r(28267);class DataEvent extends n.Event{data;constructor(e,t){super(e),this.data=t}}t.DataEvent=DataEvent},28267:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;t.Event=class Event{namespace;constructor(e){this.namespace=e}}},42636:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(35917),t),i(r(28267),t)},75172:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(9256),t),i(r(42636),t),i(r(9855),t),i(r(81809),t),i(r(44569),t),i(r(71174),t),i(r(17226),t),i(r(77374),t)},9855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=void 0,t.log=function log(e,t,r){const n=r.value;return r.value=function(...e){const r=e.map((e=>JSON.stringify(e))).join();try{const i=n.apply(this,e),a=JSON.stringify(i);return console.log(`Call: ${t}(${r}) => ${a}`),i}catch(e){throw console.log(e),e}},r}},81809:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.measureExcecutionTime=void 0,t.measureExcecutionTime=function measureExcecutionTime(e,t,r){const n=r.value;return r.value=async function(...e){const t=Date.now(),r=await n.apply(this,e),i=Date.now();return console.info(`Execution time: ${i-t}ms`),r},r}},44569:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomString=void 0,t.randomString=function randomString(e,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){let r="";const n=t.length;for(let i=0;i<e;i++)r+=t.charAt(Math.floor(Math.random()*n));return r}},77807:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationError=void 0;class ApplicationError extends Error{code;data;constructor(e,t,r){super(t),this.code=e,this.data=r}equals(e){return this.code===e.code}}t.ApplicationError=ApplicationError},19278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Result=void 0;class Result{_isSuccess;_error;_value;constructor(e,t,r){if(e&&r)throw new Error("InvalidOperation: A result cannot be successful and contain an error");if(!e&&!r)throw new Error("InvalidOperation: A failing result needs to contain an error");if(void 0!==t&&!e)throw new Error("InvalidOperation: A value is only useful in case of a success.");this._value=t,this._isSuccess=e,this._error=r}get isSuccess(){return this._isSuccess}get isError(){return!this._isSuccess}get error(){return this._error}get value(){if(!this.isSuccess)throw new Error("Can't get the value of an error result. Use 'error' instead.");return this._value}static ok(e){return new Result(!0,e)}static fail(e){return new Result(!1,void 0,e)}}t.Result=Result},17226:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(77807),t),i(r(19278),t)},77374:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=void 0,t.sleep=function sleep(e){return new Promise((t=>{setTimeout(t,e)}))}},33351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1581),i=r(93487),a=r(57023),o=r(74815),s=r(4181),c=r(22141),l="errorMessage",u=new n.Name("emUsed"),d={required:"missingProperty",dependencies:"property",dependentRequired:"property"},f=/\$\{[^}]+\}/,p=/\$\{([^}]+)\}/g,h=/^""\s*\+\s*|\s*\+\s*""$/g;function errorMessage(e){return{keyword:l,schemaType:["string","object"],post:!0,code(t){const{gen:r,data:m,schema:y,schemaValue:g,it:v}=t;if(!1===v.createErrors)return;const b=y,R=i.strConcat(c.default.instancePath,v.errorPath);function matchKeywordError(e,t){return i.and(n._`${e}.keyword !== ${l}`,n._`!${e}.${u}`,n._`${e}.instancePath === ${R}`,n._`${e}.keyword in ${t}`,n._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,n._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${v.errSchemaPath.length}))`)}function getTemplatesCode(e,t){const n=[];for(const r in e){const e=t[r];f.test(e)&&n.push([r,templateFunc(e)])}return r.object(...n)}function templateExpr(e){return f.test(e)?new a._Code(a.safeStringify(e).replace(p,((e,t)=>`" + JSON.stringify(${o.getData(t,v)}) + "`)).replace(h,"")):n.stringify(e)}function templateFunc(e){return n._`function(){return ${templateExpr(e)}}`}r.if(n._`${c.default.errors} > 0`,(()=>{if("object"==typeof b){const[a,o]=function keywordErrorsConfig(e){let t,r;for(const n in e){if("properties"===n||"items"===n)continue;const i=e[n];if("object"==typeof i){t||(t={});const e=t[n]={};for(const t in i)e[t]=[]}else r||(r={}),r[n]=[]}return[t,r]}(b);o&&function processKeywordErrors(i){const a=r.const("emErrors",n.stringify(i)),o=r.const("templates",getTemplatesCode(i,y));r.forOf("err",c.default.vErrors,(e=>r.if(matchKeywordError(e,a),(()=>r.code(n._`${a}[${e}.keyword].push(${e})`).assign(n._`${e}.${u}`,!0)))));const{singleError:l}=e;if(l){const e=r.let("message",n._`""`),i=r.let("paramsErrors",n._`[]`);loopErrors((t=>{r.if(e,(()=>r.code(n._`${e} += ${"string"==typeof l?l:";"}`))),r.code(n._`${e} += ${errMessage(t)}`),r.assign(i,n._`${i}.concat(${a}[${t}])`)})),s.reportError(t,{message:e,params:n._`{errors: ${i}}`})}else loopErrors((e=>s.reportError(t,{message:errMessage(e),params:n._`{errors: ${a}[${e}]}`})));function loopErrors(e){r.forIn("key",a,(t=>r.if(n._`${a}[${t}].length`,(()=>e(t)))))}function errMessage(e){return n._`${e} in ${o} ? ${o}[${e}]() : ${g}[${e}]`}}(o),a&&function processKeywordPropErrors(e){const i=r.const("emErrors",n.stringify(e)),a=[];for(const t in e)a.push([t,getTemplatesCode(e[t],y[t])]);const o=r.const("templates",r.object(...a)),l=r.scopeValue("obj",{ref:d,code:n.stringify(d)}),f=r.let("emPropParams"),p=r.let("emParamsErrors");r.forOf("err",c.default.vErrors,(e=>r.if(matchKeywordError(e,i),(()=>{r.assign(f,n._`${l}[${e}.keyword]`),r.assign(p,n._`${i}[${e}.keyword][${e}.params[${f}]]`),r.if(p,(()=>r.code(n._`${p}.push(${e})`).assign(n._`${e}.${u}`,!0)))})))),r.forIn("key",i,(e=>r.forIn("keyProp",n._`${i}[${e}]`,(a=>{r.assign(p,n._`${i}[${e}][${a}]`),r.if(n._`${p}.length`,(()=>{const i=r.const("tmpl",n._`${o}[${e}] && ${o}[${e}][${a}]`);s.reportError(t,{message:n._`${i} ? ${i}() : ${g}[${e}][${a}]`,params:n._`{errors: ${p}}`})}))}))))}(a),function processChildErrors(e){const{props:a,items:o}=e;if(!a&&!o)return;const d=n._`typeof ${m} == "object"`,f=n._`Array.isArray(${m})`,p=r.let("emErrors");let h,v;const b=r.let("templates");a&&o?(h=r.let("emChildKwd"),r.if(d),r.if(f,(()=>{init(o,y.items),r.assign(h,n.str`items`)}),(()=>{init(a,y.properties),r.assign(h,n.str`properties`)})),v=n._`[${h}]`):o?(r.if(f),init(o,y.items),v=n._`.items`):a&&(r.if(i.and(d,i.not(f))),init(a,y.properties),v=n._`.properties`);function init(e,t){r.assign(p,n.stringify(e)),r.assign(b,getTemplatesCode(e,t))}r.forOf("err",c.default.vErrors,(e=>function ifMatchesChildError(e,t,a){r.if(i.and(n._`${e}.keyword !== ${l}`,n._`!${e}.${u}`,n._`${e}.instancePath.indexOf(${R}) === 0`),(()=>{const i=r.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:n._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),o=r.const("emMatches",n._`${i}.exec(${e}.instancePath.slice(${R}.length))`),s=r.const("emChild",n._`${o} && ${o}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);r.if(n._`${s} !== undefined && ${s} in ${t}`,(()=>a(s)))}))}(e,p,(t=>r.code(n._`${p}[${t}].push(${e})`).assign(n._`${e}.${u}`,!0))))),r.forIn("key",p,(e=>r.if(n._`${p}[${e}].length`,(()=>{s.reportError(t,{message:n._`${e} in ${b} ? ${b}[${e}]() : ${g}${v}[${e}]`,params:n._`{errors: ${p}[${e}]}`}),r.assign(n._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,n._`${R} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),r.endIf()}(function childErrorsConfig({properties:e,items:t}){const r={};if(e){r.props={};for(const t in e)r.props[t]=[]}if(t){r.items={};for(let e=0;e<t.length;e++)r.items[e]=[]}return r}(b))}const a="string"==typeof b?b:b._;a&&function processAllErrors(e){const a=r.const("emErrs",n._`[]`);r.forOf("err",c.default.vErrors,(e=>r.if(function matchAnyError(e){return i.and(n._`${e}.keyword !== ${l}`,n._`!${e}.${u}`,i.or(n._`${e}.instancePath === ${R}`,i.and(n._`${e}.instancePath.indexOf(${R}) === 0`,n._`${e}.instancePath[${R}.length] === "/"`)),n._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,n._`${e}.schemaPath[${v.errSchemaPath}.length] === "/"`)}(e),(()=>r.code(n._`${a}.push(${e})`).assign(n._`${e}.${u}`,!0))))),r.if(n._`${a}.length`,(()=>s.reportError(t,{message:templateExpr(e),params:n._`{errors: ${a}}`})))}(a),e.keepErrors||function removeUsedErrors(){const e=r.const("emErrs",n._`[]`);r.forOf("err",c.default.vErrors,(t=>r.if(n._`!${t}.${u}`,(()=>r.code(n._`${e}.push(${t})`))))),r.assign(c.default.vErrors,e).assign(c.default.errors,n._`${e}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const ajvErrors=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(errorMessage(t))};t.default=ajvErrors,e.exports=ajvErrors,e.exports.default=ajvErrors},16870:(e,t)=>{"use strict";function fmtDef(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(time,compareTime),"date-time":fmtDef((function date_time(e){const t=e.split(a);return 2===t.length&&date(t[0])&&time(t[1],!0)}),compareDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function uri(e){return o.test(e)&&s.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function regex(e){if(l.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function byte(e){return c.lastIndex=0,c.test(e)},int32:{type:"number",validate:function validateInt32(e){return Number.isInteger(e)&&e<=2147483647&&e>=-2147483648}},int64:{type:"number",validate:function validateInt64(e){return Number.isInteger(e)}},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(e){const t=r.exec(e);if(!t)return!1;const i=+t[1],a=+t[2],o=+t[3];return a>=1&&a<=12&&o>=1&&o<=(2===a&&function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}(i)?29:n[a])}function compareDate(e,t){if(e&&t)return e>t?1:e<t?-1:0}const i=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function time(e,t){const r=i.exec(e);if(!r)return!1;const n=+r[1],a=+r[2],o=+r[3],s=r[5];return(n<=23&&a<=59&&o<=59||23===n&&59===a&&60===o)&&(!t||""!==s)}function compareTime(e,t){if(!e||!t)return;const r=i.exec(e),n=i.exec(t);return r&&n?(e=r[1]+r[2]+r[3]+(r[4]||""))>(t=n[1]+n[2]+n[3]+(n[4]||""))?1:e<t?-1:0:void 0}const a=/t|\s/i;function compareDateTime(e,t){if(!e||!t)return;const[r,n]=e.split(a),[i,o]=t.split(a),s=compareDate(r,i);return void 0!==s?s||compareTime(n,o):void 0}const o=/\/|:/,s=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;const c=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function validateNumber(){return!0}const l=/[^\\]\\Z/},5477:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(16870),i=r(57963),a=r(93487),o=new a.Name("fullFormats"),s=new a.Name("fastFormats"),formatsPlugin=(e,t={keywords:!0})=>{if(Array.isArray(t))return addFormats(e,t,n.fullFormats,o),e;const[r,a]="fast"===t.mode?[n.fastFormats,s]:[n.fullFormats,o];return addFormats(e,t.formats||n.formatNames,r,a),t.keywords&&i.default(e),e};function addFormats(e,t,r,n){var i,o;null!==(i=(o=e.opts.code).formats)&&void 0!==i||(o.formats=a._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}formatsPlugin.get=(e,t="full")=>{const r=("fast"===t?n.fastFormats:n.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=formatsPlugin,Object.defineProperty(t,"__esModule",{value:!0}),t.default=formatsPlugin},57963:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(1581),i=r(93487),a=i.operators,o={formatMaximum:{okStr:"<=",ok:a.LTE,fail:a.GT},formatMinimum:{okStr:">=",ok:a.GTE,fail:a.LT},formatExclusiveMaximum:{okStr:"<",ok:a.LT,fail:a.GTE},formatExclusiveMinimum:{okStr:">",ok:a.GT,fail:a.LTE}},s={message:({keyword:e,schemaCode:t})=>i.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>i._`{comparison: ${o[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(e){const{gen:t,data:r,schemaCode:a,keyword:s,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;const d=new n.KeywordCxt(c,u.RULES.all.format.definition,"format");function compareCode(e){return i._`${e}.compare(${r}, ${a}) ${o[s].fail} 0`}d.$data?function validate$DataFormat(){const r=t.scopeValue("formats",{ref:u.formats,code:l.code.formats}),n=t.const("fmt",i._`${r}[${d.schemaCode}]`);e.fail$data(i.or(i._`typeof ${n} != "object"`,i._`${n} instanceof RegExp`,i._`typeof ${n}.compare != "function"`,compareCode(n)))}():function validateFormat(){const r=d.schema,n=u.formats[r];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${s}": format "${r}" does not define "compare" function`);const a=t.scopeValue("formats",{key:r,ref:n,code:l.code.formats?i._`${l.code.formats}${i.getProperty(r)}`:void 0});e.fail$data(compareCode(a))}()},dependencies:["format"]};t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},1581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(27159),i=r(93924),a=r(1240),o=r(98),s=["/properties"],c="http://json-schema.org/draft-07/schema";class Ajv extends n.default{_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=Ajv,Object.defineProperty(t,"__esModule",{value:!0}),t.default=Ajv;var l=r(74815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=r(93487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}})},57023:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class _CodeOrName{}t._CodeOrName=_CodeOrName,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=Name;class _Code extends _CodeOrName{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof Name&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function _(e,...t){const r=[e[0]];let n=0;for(;n<t.length;)addCodeArg(r,t[n]),r.push(e[++n]);return new _Code(r)}t._Code=_Code,t.nil=new _Code(""),t._=_;const r=new _Code("+");function str(e,...t){const n=[safeStringify(e[0])];let i=0;for(;i<t.length;)n.push(r),addCodeArg(n,t[i]),n.push(r,safeStringify(e[++i]));return function optimize(e){let t=1;for(;t<e.length-1;){if(e[t]===r){const r=mergeExprItems(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(n),new _Code(n)}function addCodeArg(e,t){t instanceof _Code?e.push(...t._items):t instanceof Name?e.push(t):e.push(function interpolate(e){return"number"==typeof e||"boolean"==typeof e||null===e?e:safeStringify(Array.isArray(e)?e.join(","):e)}(t))}function mergeExprItems(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof Name||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof Name?void 0:`"${e}${t.slice(1)}`}function safeStringify(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=str,t.addCodeArg=addCodeArg,t.strConcat=function strConcat(e,t){return t.emptyStr()?e:e.emptyStr()?t:str`${e}${t}`},t.stringify=function stringify(e){return new _Code(safeStringify(e))},t.safeStringify=safeStringify,t.getProperty=function getProperty(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new _Code(`.${e}`):_`[${e}]`},t.getEsmExportName=function getEsmExportName(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new _Code(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function regexpCode(e){return new _Code(e.toString())}},93487:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(57023),i=r(98490);var a=r(57023);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return a._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return a.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return a.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return a.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return a.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return a.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return a.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return a.Name}});var o=r(98490);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class Node{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Def extends Node{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?i.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=optimizeExpr(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=optimizeExpr(this.rhs,e,t),this}get names(){return addExprNames(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class AssignOp extends Assign{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Label extends Node{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class Break extends Node{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Throw extends Node{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class AnyCode extends Node{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=optimizeExpr(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const i=r[n];i.optimizeNames(e,t)||(subtractNames(e,i.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>addNames(e,t.names)),{})}}class BlockNode extends ParentNode{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new Else(e):e}return t?!1===e?t instanceof If?t:t.nodes:this.nodes.length?this:new If(not(e),t instanceof If?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=optimizeExpr(this.condition,e,t),this}get names(){const e=super.names;return addExprNames(e,this.condition),this.else&&addNames(e,this.else.names),e}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=optimizeExpr(this.iteration,e,t),this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:a}=this;return`for(${t} ${r}=${n}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){const e=addExprNames(super.names,this.from);return addExprNames(e,this.to)}}class ForIter extends For{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=optimizeExpr(this.iterable,e,t),this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}Func.kind="func";class Return extends ParentNode{render(e){return"return "+super.render(e)}}Return.kind="return";class Try extends BlockNode{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&addNames(e,this.catch.names),this.finally&&addNames(e,this.finally.names),e}}class Catch extends BlockNode{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Catch.kind="catch";class Finally extends BlockNode{render(e){return"finally"+super.render(e)}}Finally.kind="finally";function addNames(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function addExprNames(e,t){return t instanceof n._CodeOrName?addNames(e,t.names):e}function optimizeExpr(e,t,r){return e instanceof n.Name?replaceName(e):function canOptimize(e){return e instanceof n._Code&&e._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))}(e)?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=replaceName(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;function replaceName(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function subtractNames(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function not(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${par(e)}`}t.CodeGen=class CodeGen{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const i=this._scope.toName(t);return void 0!==r&&n&&(this._constants[i.str]=r),this._leafNode(new Def(e,i,r)),i}const(e,t,r){return this._def(i.varKinds.const,e,t,r)}let(e,t,r){return this._def(i.varKinds.let,e,t,r)}var(e,t,r){return this._def(i.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Assign(e,t,r))}add(e,r){return this._leafNode(new AssignOp(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new AnyCode(e)),this}object(...e){const t=["{"];for(const[r,i]of e)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,i));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new If(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new If(e))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new ForLoop(e),t)}forRange(e,t,r,n,a=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const o=this._scope.toName(e);return this._for(new ForRange(a,o,t,r),(()=>n(o)))}forOf(e,t,r,a=i.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(o,n._`${e}[${t}]`),r(o)}))}return this._for(new ForIter("of",a,o,t),(()=>r(o)))}forIn(e,t,r,a=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const o=this._scope.toName(e);return this._for(new ForIter("in",a,o,t),(()=>r(o)))}endFor(){return this._endBlockNode(For)}label(e){return this._leafNode(new Label(e))}break(e){return this._leafNode(new Break(e))}return(e){const t=new Return;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new Try;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new Catch(e),t(e)}return r&&(this._currNode=n.finally=new Finally,this.code(r)),this._endBlockNode(Catch,Finally)}throw(e){return this._leafNode(new Throw(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,i){return this._blockNode(new Func(e,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Func)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof If))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=not;const s=mappend(t.operators.AND);t.and=function and(...e){return e.reduce(s)};const c=mappend(t.operators.OR);function mappend(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${par(t)} ${e} ${par(r)}`}function par(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function or(...e){return e.reduce(c)}},98490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(57023);class ValueError extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var i;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(i=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class Scope{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=Scope;class ValueScopeName extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=ValueScopeName;const a=n._`\n`;t.ValueScope=class ValueScope extends Scope{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?a:n.nil}}get(){return this._scope}name(e){return new ValueScopeName(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:i}=n,a=null!==(r=t.key)&&void 0!==r?r:t.ref;let o=this._values[i];if(o){const e=o.get(a);if(e)return e}else o=this._values[i]=new Map;o.set(a,n);const s=this._scope[i]||(this._scope[i]=[]),c=s.length;return s[c]=t.ref,n.setValue(t,{property:i,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,a={},o){let s=n.nil;for(const c in e){const l=e[c];if(!l)continue;const u=a[c]=a[c]||new Map;l.forEach((e=>{if(u.has(e))return;u.set(e,i.Started);let a=r(e);if(a){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;s=n._`${s}${r} ${e} = ${a};${this.opts._n}`}else{if(!(a=null==o?void 0:o(e)))throw new ValueError(e);s=n._`${s}${a}${this.opts._n}`}u.set(e,i.Completed)}))}return s}}},4181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(93487),i=r(76776),a=r(22141);function addError(e,t){const r=e.const("err",t);e.if(n._`${a.default.vErrors} === null`,(()=>e.assign(a.default.vErrors,n._`[${r}]`)),n._`${a.default.vErrors}.push(${r})`),e.code(n._`${a.default.errors}++`)}function returnErrors(e,t){const{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${i}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function reportError(e,r=t.keywordError,i,a){const{it:o}=e,{gen:s,compositeRule:c,allErrors:l}=o,u=errorObjectCode(e,r,i);(null!=a?a:c||l)?addError(s,u):returnErrors(o,n._`[${u}]`)},t.reportExtraError=function reportExtraError(e,r=t.keywordError,n){const{it:i}=e,{gen:o,compositeRule:s,allErrors:c}=i;addError(o,errorObjectCode(e,r,n)),s||c||returnErrors(i,a.default.vErrors)},t.resetErrorsCount=function resetErrorsCount(e,t){e.assign(a.default.errors,t),e.if(n._`${a.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${a.default.vErrors}.length`,t)),(()=>e.assign(a.default.vErrors,null)))))},t.extendErrors=function extendErrors({gen:e,keyword:t,schemaValue:r,data:i,errsCount:o,it:s}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,a.default.errors,(o=>{e.const(c,n._`${a.default.vErrors}[${o}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(a.default.instancePath,s.errorPath)))),e.assign(n._`${c}.schemaPath`,n.str`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign(n._`${c}.schema`,r),e.assign(n._`${c}.data`,i))}))};const o={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function errorObjectCode(e,t,r){const{createErrors:i}=e.it;return!1===i?n._`{}`:function errorObject(e,t,r={}){const{gen:i,it:s}=e,c=[errorInstancePath(s,r),errorSchemaPath(e,r)];return function extraErrorProps(e,{params:t,message:r},i){const{keyword:s,data:c,schemaValue:l,it:u}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:h}=u;i.push([o.keyword,s],[o.params,"function"==typeof t?t(e):t||n._`{}`]),d.messages&&i.push([o.message,"function"==typeof r?r(e):r]);d.verbose&&i.push([o.schema,l],[o.parentSchema,n._`${p}${h}`],[a.default.data,c]);f&&i.push([o.propertyName,f])}(e,t,c),i.object(...c)}(e,t,r)}function errorInstancePath({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[a.default.instancePath,(0,n.strConcat)(a.default.instancePath,r)]}function errorSchemaPath({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:a}){let s=a?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,i.getErrorPath)(r,i.Type.Str)}`),[o.schemaPath,s]}},25173:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(93487),i=r(67426),a=r(22141),o=r(32531),s=r(76776),c=r(74815),l=r(60540);class SchemaEnv{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,o.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function compileSchema(e){const t=getCompilingSchema.call(this,e);if(t)return t;const r=(0,o.getFullPath)(e.root.baseId),{es5:s,lines:l}=this.opts.code,{ownProperties:u}=this.opts,d=new n.CodeGen(this.scope,{es5:s,lines:l,ownProperties:u});let f;e.$async&&(f=d.scopeValue("Error",{ref:i.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const p=d.scopeName("validate");e.validateName=p;const h={gen:d,allErrors:this.opts.allErrors,data:a.default.data,parentData:a.default.parentData,parentDataProperty:a.default.parentDataProperty,dataNames:[a.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let m;try{this._compilations.add(e),(0,c.validateFunctionCode)(h),d.optimize(this.opts.code.optimize);const t=d.toString();m=`${d.scopeRefs(a.default.scope)}return ${t}`,this.opts.code.process&&(m=this.opts.code.process(m,e));const r=new Function(`${a.default.self}`,`${a.default.scope}`,m)(this,this.scope.get());if(this.scope.value(p,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:p,validateCode:t,scopeValues:d._values}),this.opts.unevaluated){const{props:e,items:t}=h;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,m&&this.logger.error("Error compiling schema, function code:",m),t}finally{this._compilations.delete(e)}}function inlineOrCompile(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:compileSchema.call(this,e)}function getCompilingSchema(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function resolve(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||resolveSchema.call(this,e,t)}function resolveSchema(e,t){const r=l.parse(t),n=(0,o._getFullPath)(r);let i=(0,o.getFullPath)(e.baseId);if(Object.keys(e.schema).length>0&&n===i)return getJsonPointer.call(this,r,e);const a=(0,o.normalizeId)(n),s=this.refs[a]||this.schemas[a];if("string"==typeof s){const t=resolveSchema.call(this,e,s);if("object"!=typeof(null==t?void 0:t.schema))return;return getJsonPointer.call(this,r,t)}if("object"==typeof(null==s?void 0:s.schema)){if(s.validate||compileSchema.call(this,s),a===(0,o.normalizeId)(t)){const{schema:t}=s,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,o.resolveUrl)(i,n)),new SchemaEnv({schema:t,schemaId:r,root:e,baseId:i})}return getJsonPointer.call(this,r,s)}}t.SchemaEnv=SchemaEnv,t.compileSchema=compileSchema,t.resolveRef=function resolveRef(e,t,r){var n;r=(0,o.resolveUrl)(t,r);const i=e.refs[r];if(i)return i;let a=resolve.call(this,e,r);if(void 0===a){const i=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:o}=this.opts;i&&(a=new SchemaEnv({schema:i,schemaId:o,root:e,baseId:t}))}return void 0!==a?e.refs[r]=inlineOrCompile.call(this,a):void 0},t.getCompilingSchema=getCompilingSchema,t.resolveSchema=resolveSchema;const u=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,{baseId:t,schema:r,root:n}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,s.unescapeFragment)(n)];if(void 0===e)return;const i="object"==typeof(r=e)&&r[this.opts.schemaId];!u.has(n)&&i&&(t=(0,o.resolveUrl)(t,i))}let a;if("boolean"!=typeof r&&r.$ref&&!(0,s.schemaHasRulesButRef)(r,this.RULES)){const e=(0,o.resolveUrl)(t,r.$ref);a=resolveSchema.call(this,n,e)}const{schemaId:c}=this.opts;return a=a||new SchemaEnv({schema:r,schemaId:c,root:n,baseId:t}),a.schema!==a.root.schema?a:void 0}},22141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=i},6646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(32531);class MissingRefError extends Error{constructor(e,t,r){super(r||`can't resolve reference ${t} from id ${e}`),this.missingRef=(0,n.resolveUrl)(e,t),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(this.missingRef))}}t.default=MissingRefError},32531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(76776),i=r(64063),a=r(49461),o=r(60540),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function inlineRef(e,t=!0){return"boolean"==typeof e||(!0===t?!hasRef(e):!!t&&countKeys(e)<=t)};const c=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(e){for(const t in e){if(c.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(hasRef))return!0;if("object"==typeof r&&hasRef(r))return!0}return!1}function countKeys(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=countKeys(e))),t===1/0))return 1/0}return t}function getFullPath(e="",t){!1!==t&&(e=normalizeId(e));return _getFullPath(o.parse(e))}function _getFullPath(e){return o.serialize(e).split("#")[0]+"#"}t.getFullPath=getFullPath,t._getFullPath=_getFullPath;const l=/#\/?$/;function normalizeId(e){return e?e.replace(l,""):""}t.normalizeId=normalizeId,t.resolveUrl=function resolveUrl(e,t){return t=normalizeId(t),o.resolve(e,t)};const u=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function getSchemaRefs(e,t){if("boolean"==typeof e)return{};const{schemaId:r}=this.opts,n=normalizeId(e[r]||t),s={"":n},c=getFullPath(n,!1),l={},d=new Set;return a(e,{allKeys:!0},((e,t,n,i)=>{if(void 0===i)return;const a=c+t;let f=s[i];function addRef(t){if(t=normalizeId(f?o.resolve(f,t):t),d.has(t))throw ambiguos(t);d.add(t);let r=this.refs[t];return"string"==typeof r&&(r=this.refs[r]),"object"==typeof r?checkAmbiguosRef(e,r.schema,t):t!==normalizeId(a)&&("#"===t[0]?(checkAmbiguosRef(e,l[t],t),l[t]=e):this.refs[t]=a),t}function addAnchor(e){if("string"==typeof e){if(!u.test(e))throw new Error(`invalid anchor "${e}"`);addRef.call(this,`#${e}`)}}"string"==typeof e[r]&&(f=addRef.call(this,e[r])),addAnchor.call(this,e.$anchor),addAnchor.call(this,e.$dynamicAnchor),s[t]=f})),l;function checkAmbiguosRef(e,t,r){if(void 0!==t&&!i(e,t))throw ambiguos(r)}function ambiguos(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},13141:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function isJSONType(e){return"string"==typeof e&&r.has(e)},t.getRules=function getRules(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},76776:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(93487),i=r(57023);function checkUnknownRules(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const i=n.RULES.keywords;for(const r in t)i[r]||checkStrictMode(e,`unknown keyword: "${r}"`)}function schemaHasRules(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function escapeJsonPointer(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function makeMergeEvaluated({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{const l=void 0===s?o:s instanceof n.Name?(o instanceof n.Name?e(a,o,s):t(a,o,s),s):o instanceof n.Name?(t(a,s,o),o):r(o,s);return c!==n.Name||l instanceof n.Name?l:i(a,l)}}function evaluatedPropsToName(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&setEvaluated(e,r,t),r}function setEvaluated(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function toHash(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function alwaysValidSchema(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(checkUnknownRules(e,t),!schemaHasRules(t,e.self.RULES.all))},t.checkUnknownRules=checkUnknownRules,t.schemaHasRules=schemaHasRules,t.schemaHasRulesButRef=function schemaHasRulesButRef(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function schemaRefOrVal({topSchemaRef:e,schemaPath:t},r,i,a){if(!a){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(i)}`},t.unescapeFragment=function unescapeFragment(e){return unescapeJsonPointer(decodeURIComponent(e))},t.escapeFragment=function escapeFragment(e){return encodeURIComponent(escapeJsonPointer(e))},t.escapeJsonPointer=escapeJsonPointer,t.unescapeJsonPointer=unescapeJsonPointer,t.eachItem=function eachItem(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),setEvaluated(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=evaluatedPropsToName,t.setEvaluated=setEvaluated;const a={};var o;function checkStrictMode(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function useFunc(e,t){return e.scopeValue("func",{ref:t,code:a[t.code]||(a[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(o=t.Type||(t.Type={})),t.getErrorPath=function getErrorPath(e,t,r){if(e instanceof n.Name){const i=t===o.Num;return r?i?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:i?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+escapeJsonPointer(e)},t.checkStrictMode=checkStrictMode},58876:(e,t)=>{"use strict";function shouldUseGroup(e,t){return t.rules.some((t=>shouldUseRule(e,t)))}function shouldUseRule(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function schemaHasRulesForType({schema:e,self:t},r){const n=t.RULES.types[r];return n&&!0!==n&&shouldUseGroup(e,n)},t.shouldUseGroup=shouldUseGroup,t.shouldUseRule=shouldUseRule},55667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(4181),i=r(93487),a=r(22141),o={message:"boolean schema is false"};function falseSchemaError(e,t){const{gen:r,data:i}=e,a={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(a,o,void 0,t)}t.topBoolOrEmptySchema=function topBoolOrEmptySchema(e){const{gen:t,schema:r,validateName:n}=e;!1===r?falseSchemaError(e,!1):"object"==typeof r&&!0===r.$async?t.return(a.default.data):(t.assign(i._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function boolOrEmptySchema(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),falseSchemaError(e)):r.var(t,!0)}},50453:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(13141),i=r(58876),a=r(4181),o=r(93487),s=r(76776);var c;function getJSONTypes(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function getSchemaTypes(e){const t=getJSONTypes(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=getJSONTypes,t.coerceAndCheckDataType=function coerceAndCheckDataType(e,t){const{gen:r,data:n,opts:a}=e,s=function coerceToTypes(e,t){return t?e.filter((e=>l.has(e)||"array"===t&&"array"===e)):[]}(t,a.coerceTypes),u=t.length>0&&!(0===s.length&&1===t.length&&(0,i.schemaHasRulesForType)(e,t[0]));if(u){const i=checkDataTypes(t,n,a.strictNumbers,c.Wrong);r.if(i,(()=>{s.length?function coerceData(e,t,r){const{gen:n,data:i,opts:a}=e,s=n.let("dataType",o._`typeof ${i}`),c=n.let("coerced",o._`undefined`);"array"===a.coerceTypes&&n.if(o._`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,(()=>n.assign(i,o._`${i}[0]`).assign(s,o._`typeof ${i}`).if(checkDataTypes(t,i,a.strictNumbers),(()=>n.assign(c,i)))));n.if(o._`${c} !== undefined`);for(const e of r)(l.has(e)||"array"===e&&"array"===a.coerceTypes)&&coerceSpecificType(e);function coerceSpecificType(e){switch(e){case"string":return void n.elseIf(o._`${s} == "number" || ${s} == "boolean"`).assign(c,o._`"" + ${i}`).elseIf(o._`${i} === null`).assign(c,o._`""`);case"number":return void n.elseIf(o._`${s} == "boolean" || ${i} === null
3
- || (${s} == "string" && ${i} && ${i} == +${i})`).assign(c,o._`+${i}`);case"integer":return void n.elseIf(o._`${s} === "boolean" || ${i} === null
4
- || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(c,o._`+${i}`);case"boolean":return void n.elseIf(o._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(c,!1).elseIf(o._`${i} === "true" || ${i} === 1`).assign(c,!0);case"null":return n.elseIf(o._`${i} === "" || ${i} === 0 || ${i} === false`),void n.assign(c,null);case"array":n.elseIf(o._`${s} === "string" || ${s} === "number"
5
- || ${s} === "boolean" || ${i} === null`).assign(c,o._`[${i}]`)}}n.else(),reportTypeError(e),n.endIf(),n.if(o._`${c} !== undefined`,(()=>{n.assign(i,c),function assignParentData({gen:e,parentData:t,parentDataProperty:r},n){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${r}]`,n)))}(e,c)}))}(e,t,s):reportTypeError(e)}))}return u};const l=new Set(["string","number","integer","boolean","null"]);function checkDataType(e,t,r,n=c.Correct){const i=n===c.Correct?o.operators.EQ:o.operators.NEQ;let a;switch(e){case"null":return o._`${t} ${i} null`;case"array":a=o._`Array.isArray(${t})`;break;case"object":a=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=numCond(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=numCond();break;default:return o._`typeof ${t} ${i} ${e}`}return n===c.Correct?a:(0,o.not)(a);function numCond(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,r?o._`isFinite(${t})`:o.nil)}}function checkDataTypes(e,t,r,n){if(1===e.length)return checkDataType(e[0],t,r,n);let i;const a=(0,s.toHash)(e);if(a.array&&a.object){const e=o._`typeof ${t} != "object"`;i=a.null?e:o._`!${t} || ${e}`,delete a.null,delete a.array,delete a.object}else i=o.nil;a.number&&delete a.integer;for(const e in a)i=(0,o.and)(i,checkDataType(e,t,r,n));return i}t.checkDataType=checkDataType,t.checkDataTypes=checkDataTypes;const u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function reportTypeError(e){const t=function getTypeErrorContext(e){const{gen:t,data:r,schema:n}=e,i=(0,s.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,a.reportError)(t,u)}t.reportTypeError=reportTypeError},90313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(93487),i=r(76776);function assignDefault(e,t,r){const{gen:a,compositeRule:o,data:s,opts:c}=e;if(void 0===r)return;const l=n._`${s}${(0,n.getProperty)(t)}`;if(o)return void(0,i.checkStrictMode)(e,`default is ignored for: ${l}`);let u=n._`${l} === undefined`;"empty"===c.useDefaults&&(u=n._`${u} || ${l} === null || ${l} === ""`),a.if(u,n._`${l} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function assignDefaults(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)assignDefault(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>assignDefault(e,r,t.default)))}},74815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(55667),i=r(50453),a=r(58876),o=r(50453),s=r(90313),c=r(95005),l=r(13099),u=r(93487),d=r(22141),f=r(32531),p=r(76776),h=r(4181);function validateFunction({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},a){i.code.es5?e.func(t,u._`${d.default.data}, ${d.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${funcSourceUrl(r,i)}`),function destructureValCxtES5(e,t){e.if(d.default.valCxt,(()=>{e.var(d.default.instancePath,u._`${d.default.valCxt}.${d.default.instancePath}`),e.var(d.default.parentData,u._`${d.default.valCxt}.${d.default.parentData}`),e.var(d.default.parentDataProperty,u._`${d.default.valCxt}.${d.default.parentDataProperty}`),e.var(d.default.rootData,u._`${d.default.valCxt}.${d.default.rootData}`),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`${d.default.valCxt}.${d.default.dynamicAnchors}`)}),(()=>{e.var(d.default.instancePath,u._`""`),e.var(d.default.parentData,u._`undefined`),e.var(d.default.parentDataProperty,u._`undefined`),e.var(d.default.rootData,d.default.data),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`{}`)}))}(e,i),e.code(a)})):e.func(t,u._`${d.default.data}, ${function destructureValCxt(e){return u._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${e.dynamicRef?u._`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}(i)}`,n.$async,(()=>e.code(funcSourceUrl(r,i)).code(a)))}function funcSourceUrl(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function subschemaCode(e,t){isSchemaObj(e)&&(checkKeywords(e),schemaCxtHasRules(e))?function subSchemaObjCode(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&commentKeyword(e);(function updateContext(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,f.resolveUrl)(e.baseId,t))})(e),function checkAsyncSchema(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const a=n.const("_errs",d.default.errors);typeAndKeywords(e,a),n.var(t,u._`${a} === ${d.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}function schemaCxtHasRules({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function isSchemaObj(e){return"boolean"!=typeof e.schema}function checkKeywords(e){(0,p.checkUnknownRules)(e),function checkRefsAndKeywords(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function typeAndKeywords(e,t){if(e.opts.jtd)return schemaKeywords(e,[],!1,t);const r=(0,i.getSchemaTypes)(e.schema);schemaKeywords(e,r,!(0,i.coerceAndCheckDataType)(e,r),t)}function commentKeyword({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const a=r.$comment;if(!0===i.$comment)e.code(u._`${d.default.self}.logger.log(${a})`);else if("function"==typeof i.$comment){const r=u.str`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(u._`${d.default.self}.opts.$comment(${a}, ${r}, ${i}.schema)`)}}function schemaKeywords(e,t,r,n){const{gen:i,schema:s,data:c,allErrors:l,opts:f,self:h}=e,{RULES:m}=h;function groupKeywords(p){(0,a.shouldUseGroup)(s,p)&&(p.type?(i.if((0,o.checkDataType)(p.type,c,f.strictNumbers)),iterateKeywords(e,p),1===t.length&&t[0]===p.type&&r&&(i.else(),(0,o.reportTypeError)(e)),i.endIf()):iterateKeywords(e,p),l||i.if(u._`${d.default.errors} === ${n||0}`))}!s.$ref||!f.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(s,m)?(f.jtd||function checkStrictTypes(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function checkContextTypes(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{includesType(e.dataTypes,t)||strictTypesError(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),e.dataTypes=e.dataTypes.filter((e=>includesType(t,e)))})(e,t),e.opts.allowUnionTypes||function checkMultipleTypes(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&strictTypesError(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function checkKeywordTypes(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if("object"==typeof i&&(0,a.shouldUseRule)(e.schema,i)){const{type:r}=i.definition;r.length&&!r.some((e=>hasApplicableType(t,e)))&&strictTypesError(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes)}(e,t),i.block((()=>{for(const e of m.rules)groupKeywords(e);groupKeywords(m.post)}))):i.block((()=>keywordCode(e,"$ref",m.all.$ref.definition)))}function iterateKeywords(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,s.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,a.shouldUseRule)(n,r)&&keywordCode(e,r.keyword,r.definition,t.type)}))}function hasApplicableType(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function includesType(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function strictTypesError(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function validateFunctionCode(e){isSchemaObj(e)&&(checkKeywords(e),schemaCxtHasRules(e))?function topSchemaObjCode(e){const{schema:t,opts:r,gen:n}=e;return void validateFunction(e,(()=>{r.$comment&&t.$comment&&commentKeyword(e),function checkNoDefault(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(d.default.vErrors,null),n.let(d.default.errors,0),r.unevaluated&&function resetEvaluated(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),typeAndKeywords(e),function returnResults(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:a}=e;r.$async?t.if(u._`${d.default.errors} === 0`,(()=>t.return(d.default.data)),(()=>t.throw(u._`new ${i}(${d.default.vErrors})`))):(t.assign(u._`${n}.errors`,d.default.vErrors),a.unevaluated&&function assignEvaluated({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r);n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${d.default.errors} === 0`))}(e)}))}(e):validateFunction(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class KeywordCxt{constructor(e,t,r){if((0,c.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",getData(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",d.default.errors))}result(e,t,r){this.failResult((0,u.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=u.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:a}=this;r.if((0,u.or)(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(i.length||a.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,u.or)(function wrong$DataType(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${(0,o.checkDataTypes)(e,t,i.opts.strictNumbers,o.DataType.Wrong)}`}return u.nil}(),function invalid$DataSchema(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t){const r=(0,l.getSubschema)(this.it,e);(0,l.extendSubschemaData)(r,this.it,e),(0,l.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return subschemaCode(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=p.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function keywordCode(e,t,r,n){const i=new KeywordCxt(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,c.funcKeywordCode)(i,r):"macro"in r?(0,c.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(i,r)}t.KeywordCxt=KeywordCxt;const m=/^\/(?:[^~]|~0|~1)*$/,y=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,a;if(""===e)return d.default.rootData;if("/"===e[0]){if(!m.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,a=d.default.rootData}else{const o=y.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const s=+o[1];if(i=o[2],"#"===i){if(s>=t)throw new Error(errorMsg("property/index",s));return n[t-s]}if(s>t)throw new Error(errorMsg("data",s));if(a=r[t-s],!i)return a}let o=a;const s=i.split("/");for(const e of s)e&&(a=u._`${a}${(0,u.getProperty)((0,p.unescapeJsonPointer)(e))}`,o=u._`${o} && ${a}`);return o;function errorMsg(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=getData},95005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(93487),i=r(22141),a=r(10412),o=r(4181);function modifyData(e){const{gen:t,data:r,it:i}=e;t.if(i.parentData,(()=>t.assign(r,n._`${i.parentData}[${i.parentDataProperty}]`)))}function useKeyword(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function macroKeywordCode(e,t){const{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=t.macro.call(s.self,a,o,s),l=useKeyword(r,i,c);!1!==s.opts.validateSchema&&s.self.validateSchema(c,!0);const u=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},u),e.pass(u,(()=>e.error(!0)))},t.funcKeywordCode=function funcKeywordCode(e,t){var r;const{gen:s,keyword:c,schema:l,parentSchema:u,$data:d,it:f}=e;!function checkAsyncKeyword({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(f,t);const p=!d&&t.compile?t.compile.call(f.self,l,u,f):t.validate,h=useKeyword(s,c,p),m=s.let("valid");function assignValid(r=(t.async?n._`await `:n.nil)){const o=f.opts.passContext?i.default.this:i.default.self,c=!("compile"in t&&!d||!1===t.schema);s.assign(m,n._`${r}${(0,a.callValidateCode)(e,h,o,c)}`,t.modifying)}function reportErrs(e){var r;s.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:m),e)}e.block$data(m,(function validateKeyword(){if(!1===t.errors)assignValid(),t.modifying&&modifyData(e),reportErrs((()=>e.error()));else{const r=t.async?function validateAsync(){const e=s.let("ruleErrs",null);return s.try((()=>assignValid(n._`await `)),(t=>s.assign(m,!1).if(n._`${t} instanceof ${f.ValidationError}`,(()=>s.assign(e,n._`${t}.errors`)),(()=>s.throw(t))))),e}():function validateSync(){const e=n._`${h}.errors`;return s.assign(e,null),assignValid(n.nil),e}();t.modifying&&modifyData(e),reportErrs((()=>function addErrs(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,n._`${i.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:m)},t.validSchemaType=function validSchemaType(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function validateKeywordUsage({schema:e,opts:t,self:r,errSchemaPath:n},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw new Error("ajv implementation error");const o=i.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${a}: ${o.join(",")}`);if(i.validateSchema){if(!i.validateSchema(e[a])){const e=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}}},13099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(93487),i=r(76776);t.getSubschema=function getSubschema(e,{keyword:t,schemaProp:r,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(void 0!==t&&void 0!==a)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const a=e.schema[t];return void 0===r?{schema:a,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==a){if(void 0===o||void 0===s||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function extendSubschemaData(e,t,{dataProp:r,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(void 0!==o&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=t;if(void 0!==r){const{errorPath:o,dataPathArr:s,opts:c}=t;dataContextProps(l.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${o}${(0,i.getErrorPath)(r,a,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...s,e.parentDataProperty]}if(void 0!==o){dataContextProps(o instanceof n.Name?o:l.let("data",o,!0)),void 0!==c&&(e.propertyName=c)}function dataContextProps(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}s&&(e.dataTypes=s)},t.extendSubschemaMode=function extendSubschemaMode(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:a}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==a&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=r}},27159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(74815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=r(93487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const a=r(67426),o=r(6646),s=r(13141),c=r(25173),l=r(93487),u=r(32531),d=r(50453),f=r(76776),p=r(64775),defaultRegExp=(e,t)=>new RegExp(e,t);defaultRegExp.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function requiredOptions(e){var t,r,n,i,a,o,s,c,l,u,d,f,p,h,m,y,g,v,b,R,C,w,I,O;const S=e.strict,j=null===(t=e.code)||void 0===t?void 0:t.optimize,T=!0===j||void 0===j?1:j||0,P=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:defaultRegExp;return{strictSchema:null===(a=null!==(i=e.strictSchema)&&void 0!==i?i:S)||void 0===a||a,strictNumbers:null===(s=null!==(o=e.strictNumbers)&&void 0!==o?o:S)||void 0===s||s,strictTypes:null!==(l=null!==(c=e.strictTypes)&&void 0!==c?c:S)&&void 0!==l?l:"log",strictTuples:null!==(d=null!==(u=e.strictTuples)&&void 0!==u?u:S)&&void 0!==d?d:"log",strictRequired:null!==(p=null!==(f=e.strictRequired)&&void 0!==f?f:S)&&void 0!==p&&p,code:e.code?{...e.code,optimize:T,regExp:P}:{optimize:T,regExp:P},loopRequired:null!==(h=e.loopRequired)&&void 0!==h?h:200,loopEnum:null!==(m=e.loopEnum)&&void 0!==m?m:200,meta:null===(y=e.meta)||void 0===y||y,messages:null===(g=e.messages)||void 0===g||g,inlineRefs:null===(v=e.inlineRefs)||void 0===v||v,schemaId:null!==(b=e.schemaId)&&void 0!==b?b:"$id",addUsedSchema:null===(R=e.addUsedSchema)||void 0===R||R,validateSchema:null===(C=e.validateSchema)||void 0===C||C,validateFormats:null===(w=e.validateFormats)||void 0===w||w,unicodeRegExp:null===(I=e.unicodeRegExp)||void 0===I||I,int32range:null===(O=e.int32range)||void 0===O||O}}class Ajv{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...requiredOptions(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function getLogger(e){if(!1===e)return v;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,s.getRules)(),checkOptions.call(this,y,e,"NOT SUPPORTED"),checkOptions.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=getMetaSchemaOptions.call(this),e.formats&&addInitialFormats.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&addInitialKeywords.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),addInitialSchemas.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=p;"id"===r&&(n={...p},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return runCompileAsync.call(this,e,t);async function runCompileAsync(e,t){await loadMetaSchema.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||_compileAsync.call(this,r)}async function loadMetaSchema(e){e&&!this.getSchema(e)&&await runCompileAsync.call(this,{$ref:e},!0)}async function _compileAsync(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return checkLoaded.call(this,t),await loadMissingSchema.call(this,t.missingSchema),_compileAsync.call(this,e)}}function checkLoaded({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function loadMissingSchema(e){const r=await _loadSchema.call(this,e);this.refs[e]||await loadMetaSchema.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function _loadSchema(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=getSchEnv.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=getSchEnv.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,u.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(checkKeyword.call(this,r,t),!t)return(0,f.eachItem)(r,(e=>addRule.call(this,e))),this;keywordMetaschema.call(this,t);const n={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,f.eachItem)(r,0===n.type.length?e=>addRule.call(this,e,n):e=>n.type.forEach((t=>addRule.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,a=i[e];n&&a&&(i[e]=schemaOrData(a))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let a;const{schemaId:o}=this.opts;if("object"==typeof e)a=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let s=this._cache.get(e);if(void 0!==s)return s;r=(0,u.normalizeId)(a||r);const l=u.getSchemaRefs.call(this,e,r);return s=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:l}),this._cache.set(s.schema,s),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=s),n&&this.validateSchema(e,!0),s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function checkOptions(e,t,r,n="error"){for(const i in e){const a=i;a in t&&this.logger[n](`${r}: option ${i}. ${e[a]}`)}}function getSchEnv(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function addInitialSchemas(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function addInitialFormats(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function addInitialKeywords(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function getMetaSchemaOptions(){const e={...this.opts};for(const t of h)delete e[t];return e}t.default=Ajv,Ajv.ValidationError=a.default,Ajv.MissingRefError=o.default;const v={log(){},warn(){},error(){}};const b=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(e,t){const{RULES:r}=this;if((0,f.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!b.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function addRule(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:a}=this;let o=i?a.post:a.rules.find((({type:e})=>e===r));if(o||(o={type:r,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;const s={keyword:e,definition:{...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)}};t.before?addBeforeRule.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function addBeforeRule(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function keywordMetaschema(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=schemaOrData(t)),e.validateSchema=this.compile(t,!0))}const R={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(e){return{anyOf:[e,R]}}},43510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(64063);n.code='require("ajv/dist/runtime/equal").default',t.default=n},74499:(e,t)=>{"use strict";function ucs2length(e){const t=e.length;let r,n=0,i=0;for(;i<t;)n++,r=e.charCodeAt(i++),r>=55296&&r<=56319&&i<t&&(r=e.charCodeAt(i),56320==(64512&r)&&i++);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=ucs2length,ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},67426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class ValidationError extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=ValidationError},4783:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(93487),i=r(76776),a={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?validateAdditionalItems(e,n):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function validateAdditionalItems(e,t){const{gen:r,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;const l=r.const("len",n._`${o}.length`);if(!1===a)e.setParams({len:t.length}),e.pass(n._`${l} <= ${t.length}`);else if("object"==typeof a&&!(0,i.alwaysValidSchema)(c,a)){const a=r.var("valid",n._`${l} <= ${t.length}`);r.if((0,n.not)(a),(()=>function validateItems(a){r.forRange("i",t.length,l,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:i.Type.Num},a),c.allErrors||r.if((0,n.not)(a),(()=>r.break()))}))}(a))),e.ok(a)}}t.validateAdditionalItems=validateAdditionalItems,t.default=a},69351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),i=r(93487),a=r(22141),o=r(76776),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:d,opts:f}=u;if(u.props=!0,"all"!==f.removeAdditional&&(0,o.alwaysValidSchema)(u,r))return;const p=(0,n.allSchemaProperties)(s.properties),h=(0,n.allSchemaProperties)(s.patternProperties);function deleteAdditional(e){t.code(i._`delete ${c}[${e}]`)}function additionalPropertyCode(n){if("all"===f.removeAdditional||f.removeAdditional&&!1===r)deleteAdditional(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(d||t.break());if("object"==typeof r&&!(0,o.alwaysValidSchema)(u,r)){const r=t.name("valid");"failing"===f.removeAdditional?(applyAdditionalSchema(n,r,!1),t.if((0,i.not)(r),(()=>{e.reset(),deleteAdditional(n)}))):(applyAdditionalSchema(n,r),d||t.if((0,i.not)(r),(()=>t.break())))}}}function applyAdditionalSchema(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}!function checkAdditionalProperties(){t.forIn("key",c,(r=>{p.length||h.length?t.if(function isAdditional(r){let a;if(p.length>8){const e=(0,o.schemaRefOrVal)(u,s.properties,"properties");a=(0,n.isOwnProperty)(t,e,r)}else a=p.length?(0,i.or)(...p.map((e=>i._`${r} === ${e}`))):i.nil;h.length&&(a=(0,i.or)(a,...h.map((t=>i._`${(0,n.usePattern)(e,t)}.test(${r})`))));return(0,i.not)(a)}(r),(()=>additionalPropertyCode(r))):additionalPropertyCode(r)}))}(),e.ok(i._`${l} === ${a.default.errors}`)}};t.default=s},71125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76776),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const a=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(i,t))return;const o=e.subschema({keyword:"allOf",schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)}))}};t.default=i},50019:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(10412).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},79864:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),a={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:o,it:s}=e;let c,l;const{minContains:u,maxContains:d}=a;s.opts.next?(c=void 0===u?1:u,l=d):c=1;const f=t.const("len",n._`${o}.length`);if(e.setParams({min:c,max:l}),void 0===l&&0===c)return void(0,i.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==l&&c>l)return(0,i.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(s,r)){let t=n._`${f} >= ${c}`;return void 0!==l&&(t=n._`${t} && ${f} <= ${l}`),void e.pass(t)}s.items=!0;const p=t.name("valid");function validateItemsWithCount(){const e=t.name("_valid"),r=t.let("count",0);validateItems(e,(()=>t.if(e,(()=>function checkLimits(e){t.code(n._`${e}++`),void 0===l?t.if(n._`${e} >= ${c}`,(()=>t.assign(p,!0).break())):(t.if(n._`${e} > ${l}`,(()=>t.assign(p,!1).break())),1===c?t.assign(p,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(p,!0))))}(r)))))}function validateItems(r,n){t.forRange("i",0,f,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},r),n()}))}void 0===l&&1===c?validateItems(p,(()=>t.if(p,(()=>t.break())))):0===c?(t.let(p,!0),void 0!==l&&t.if(n._`${o}.length > 0`,validateItemsWithCount)):(t.let(p,!1),validateItemsWithCount()),e.result(p,(()=>e.reset()))}};t.default=a},67772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(93487),i=r(76776),a=r(10412);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const i=1===t?"property":"properties";return n.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>n._`{property: ${e},
6
- missingProperty: ${i},
7
- depsCount: ${t},
8
- deps: ${r}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function splitDependencies({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);validatePropertyDeps(e,t),validateSchemaDeps(e,r)}};function validatePropertyDeps(e,t=e.schema){const{gen:r,data:i,it:o}=e;if(0===Object.keys(t).length)return;const s=r.let("missing");for(const c in t){const l=t[c];if(0===l.length)continue;const u=(0,a.propertyInData)(r,i,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),o.allErrors?r.if(u,(()=>{for(const t of l)(0,a.checkReportMissingProp)(e,t)})):(r.if(n._`${u} && (${(0,a.checkMissingProp)(e,l,s)})`),(0,a.reportMissingProp)(e,s),r.else())}}function validateSchemaDeps(e,t=e.schema){const{gen:r,data:n,keyword:o,it:s}=e,c=r.name("valid");for(const l in t)(0,i.alwaysValidSchema)(s,t[l])||(r.if((0,a.propertyInData)(r,n,l,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=validatePropertyDeps,t.validateSchemaDeps=validateSchemaDeps,t.default=o},89434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),a={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:a}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(a,'"if" without "then" and "else" is ignored');const o=hasSchema(a,"then"),s=hasSchema(a,"else");if(!o&&!s)return;const c=t.let("valid",!0),l=t.name("_valid");if(function validateIf(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),o&&s){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,validateClause("then",r),validateClause("else",r))}else o?t.if(l,validateClause("then")):t.if((0,n.not)(l),validateClause("else"));function validateClause(r,i){return()=>{const a=e.subschema({keyword:r},l);t.assign(c,l),e.mergeValidEvaluated(a,c),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function hasSchema(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=a},8200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4783),i=r(72924),a=r(64665),o=r(1119),s=r(79864),c=r(67772),l=r(33708),u=r(69351),d=r(76239),f=r(12296),p=r(15697),h=r(50019),m=r(14200),y=r(71125),g=r(89434),v=r(66552);t.default=function getApplicator(e=!1){const t=[p.default,h.default,m.default,y.default,g.default,v.default,l.default,u.default,c.default,d.default,f.default];return e?t.push(i.default,o.default):t.push(n.default,a.default),t.push(s.default),t}},64665:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(93487),i=r(76776),a=r(10412),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return validateTuple(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,a.validateArray)(e))}};function validateTuple(e,t,r=e.schema){const{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;!function checkStrictTuple(e){const{opts:n,errSchemaPath:a}=l,o=r.length,s=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(n.strictTuples&&!s){const e=`"${c}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${a}"`;(0,i.checkStrictMode)(l,e,n.strictTuples)}}(o),l.opts.unevaluated&&r.length&&!0!==l.items&&(l.items=i.mergeEvaluated.items(a,r.length,l.items));const u=a.name("valid"),d=a.const("len",n._`${s}.length`);r.forEach(((t,r)=>{(0,i.alwaysValidSchema)(l,t)||(a.if(n._`${d} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=validateTuple,t.default=o},1119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),a=r(10412),o=r(4783),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(s?(0,o.validateAdditionalItems)(e,s):e.ok((0,a.validateArray)(e)))}};t.default=s},15697:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76776),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return void e.fail();const a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},14200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),a={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:a,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&a.discriminator)return;const s=r,c=t.let("valid",!1),l=t.let("passing",null),u=t.name("_valid");e.setParams({passing:l}),t.block((function validateOneOf(){s.forEach(((r,a)=>{let s;(0,i.alwaysValidSchema)(o,r)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:a,compositeRule:!0},u),a>0&&t.if(n._`${u} && ${c}`).assign(c,!1).assign(l,n._`[${l}, ${a}]`).else(),t.if(u,(()=>{t.assign(c,!0),t.assign(l,a),s&&e.mergeEvaluated(s,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=a},12296:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),i=r(93487),a=r(76776),o=r(76776),s={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,n.allSchemaProperties)(r),f=d.filter((e=>(0,a.alwaysValidSchema)(l,r[e])));if(0===d.length||f.length===d.length&&(!l.opts.unevaluated||!0===l.props))return;const p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,h=t.name("valid");!0===l.props||l.props instanceof i.Name||(l.props=(0,o.evaluatedPropsToName)(t,l.props));const{props:m}=l;function checkMatchingProperties(e){for(const t in p)new RegExp(e).test(t)&&(0,a.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function validateProperties(r){t.forIn("key",s,(a=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${a})`,(()=>{const n=f.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:a,dataPropType:o.Type.Str},h),l.opts.unevaluated&&!0!==m?t.assign(i._`${m}[${a}]`,!0):n||l.allErrors||t.if((0,i.not)(h),(()=>t.break()))}))}))}!function validatePatternProperties(){for(const e of d)p&&checkMatchingProperties(e),l.allErrors?validateProperties(e):(t.var(h,!0),validateProperties(e),t.if(h))}()}};t.default=s},72924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(64665),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},76239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(74815),i=r(10412),a=r(76776),o=r(69351),s={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:s,data:c,it:l}=e;"all"===l.opts.removeAdditional&&void 0===s.additionalProperties&&o.default.code(new n.KeywordCxt(l,o.default,"additionalProperties"));const u=(0,i.allSchemaProperties)(r);for(const e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&!0!==l.props&&(l.props=a.mergeEvaluated.props(t,(0,a.toHash)(u),l.props));const d=u.filter((e=>!(0,a.alwaysValidSchema)(l,r[e])));if(0===d.length)return;const f=t.name("valid");for(const r of d)hasDefault(r)?applyPropertySchema(r):(t.if((0,i.propertyInData)(t,c,r,l.opts.ownProperties)),applyPropertySchema(r),l.allErrors||t.else().var(f,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(f);function hasDefault(e){return l.opts.useDefaults&&!l.compositeRule&&void 0!==r[e].default}function applyPropertySchema(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},f)}}};t.default=s},33708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),a={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:a,it:o}=e;if((0,i.alwaysValidSchema)(o,r))return;const s=t.name("valid");t.forIn("key",a,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),t.if((0,n.not)(s),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(s)}};t.default=a},66552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76776),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=i},10412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(93487),i=r(76776),a=r(22141),o=r(76776);function hasPropFunc(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function isOwnProperty(e,t,r){return n._`${hasPropFunc(e)}.call(${t}, ${r})`}function noPropertyInData(e,t,r,i){const a=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(a,(0,n.not)(isOwnProperty(e,t,r))):a}function allSchemaProperties(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function checkReportMissingProp(e,t){const{gen:r,data:i,it:a}=e;r.if(noPropertyInData(r,i,t,a.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function checkMissingProp({gen:e,data:t,it:{opts:r}},i,a){return(0,n.or)(...i.map((i=>(0,n.and)(noPropertyInData(e,t,i,r.ownProperties),n._`${a} = ${i}`))))},t.reportMissingProp=function reportMissingProp(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=hasPropFunc,t.isOwnProperty=isOwnProperty,t.propertyInData=function propertyInData(e,t,r,i){const a=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${a} && ${isOwnProperty(e,t,r)}`:a},t.noPropertyInData=noPropertyInData,t.allSchemaProperties=allSchemaProperties,t.schemaProperties=function schemaProperties(e,t){return allSchemaProperties(t).filter((r=>!(0,i.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function callValidateCode({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:o,errorPath:s},it:c},l,u,d){const f=d?n._`${e}, ${t}, ${i}${o}`:t,p=[[a.default.instancePath,(0,n.strConcat)(a.default.instancePath,s)],[a.default.parentData,c.parentData],[a.default.parentDataProperty,c.parentDataProperty],[a.default.rootData,a.default.rootData]];c.opts.dynamicRef&&p.push([a.default.dynamicAnchors,a.default.dynamicAnchors]);const h=n._`${f}, ${r.object(...p)}`;return u!==n.nil?n._`${l}.call(${u}, ${h})`:n._`${l}(${h})`};const s=n._`new RegExp`;t.usePattern=function usePattern({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:a}=t.code,c=a(r,i);return e.scopeValue("pattern",{key:c.toString(),ref:c,code:n._`${"new RegExp"===a.code?s:(0,o.useFunc)(e,a)}(${r}, ${i})`})},t.validateArray=function validateArray(e){const{gen:t,data:r,keyword:a,it:o}=e,s=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return validateItems((()=>t.assign(e,!1))),e}return t.var(s,!0),validateItems((()=>t.break())),s;function validateItems(o){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:a,dataProp:r,dataPropType:i.Type.Num},s),t.if((0,n.not)(s),o)}))}},t.validateUnion=function validateUnion(e){const{gen:t,schema:r,keyword:a,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const s=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);t.assign(s,n._`${s} || ${c}`);e.mergeValidEvaluated(o,c)||t.if((0,n.not)(s))})))),e.result(s,(()=>e.reset()),(()=>e.error(!0)))}},78386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},95684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(78386),i=r(28280),a=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=a},28280:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(6646),i=r(10412),a=r(93487),o=r(22141),s=r(25173),c=r(76776),l={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:o,schemaEnv:c,validateName:l,opts:u,self:d}=i,{root:f}=c;if(("#"===r||"#/"===r)&&o===f.baseId)return function callRootRef(){if(c===f)return callRef(e,l,c,c.$async);const r=t.scopeValue("root",{ref:f});return callRef(e,a._`${r}.validate`,f,f.$async)}();const p=s.resolveRef.call(d,f,o,r);if(void 0===p)throw new n.default(o,r);return p instanceof s.SchemaEnv?function callValidate(t){const r=getValidate(e,t);callRef(e,r,t,t.$async)}(p):function inlineRefSchema(n){const i=t.scopeValue("schema",!0===u.code.source?{ref:n,code:(0,a.stringify)(n)}:{ref:n}),o=t.name("valid"),s=e.subschema({schema:n,dataTypes:[],schemaPath:a.nil,topSchemaRef:i,errSchemaPath:r},o);e.mergeEvaluated(s),e.ok(o)}(p)}};function getValidate(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):a._`${r.scopeValue("wrapper",{ref:t})}.validate`}function callRef(e,t,r,n){const{gen:s,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?o.default.this:a.nil;function addErrorsFrom(e){const t=a._`${e}.errors`;s.assign(o.default.vErrors,a._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),s.assign(o.default.errors,a._`${o.default.vErrors}.length`)}function addEvaluatedFrom(e){var t;if(!l.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==l.props)if(n&&!n.dynamicProps)void 0!==n.props&&(l.props=c.mergeEvaluated.props(s,n.props,l.props));else{const t=s.var("props",a._`${e}.evaluated.props`);l.props=c.mergeEvaluated.props(s,t,l.props,a.Name)}if(!0!==l.items)if(n&&!n.dynamicItems)void 0!==n.items&&(l.items=c.mergeEvaluated.items(s,n.items,l.items));else{const t=s.var("items",a._`${e}.evaluated.items`);l.items=c.mergeEvaluated.items(s,t,l.items,a.Name)}}n?function callAsyncRef(){if(!d.$async)throw new Error("async schema referenced by sync schema");const r=s.let("valid");s.try((()=>{s.code(a._`await ${(0,i.callValidateCode)(e,t,p)}`),addEvaluatedFrom(t),u||s.assign(r,!0)}),(e=>{s.if(a._`!(${e} instanceof ${l.ValidationError})`,(()=>s.throw(e))),addErrorsFrom(e),u||s.assign(r,!1)})),e.ok(r)}():function callSyncRef(){e.result((0,i.callValidateCode)(e,t,p),(()=>addEvaluatedFrom(t)),(()=>addErrorsFrom(t)))}()}t.getValidate=getValidate,t.callRef=callRef,t.default=l},1240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(89306),a=r(25173),o=r(76776),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:s,parentSchema:c,it:l}=e,{oneOf:u}=c;if(!l.opts.discriminator)throw new Error("discriminator: requires discriminator option");const d=s.propertyName;if("string"!=typeof d)throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",!1),p=t.const("tag",n._`${r}${(0,n.getProperty)(d)}`);function applyTagSchema(r){const i=t.name("valid"),a=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(a,n.Name),i}t.if(n._`typeof ${p} == "string"`,(()=>function validateMapping(){const r=function getMapping(){var e;const t={},r=hasRequired(c);let n=!0;for(let t=0;t<u.length;t++){let i=u[t];(null==i?void 0:i.$ref)&&!(0,o.schemaHasRulesButRef)(i,l.self.RULES)&&(i=a.resolveRef.call(l.self,l.schemaEnv,l.baseId,null==i?void 0:i.$ref),i instanceof a.SchemaEnv&&(i=i.schema));const s=null===(e=null==i?void 0:i.properties)||void 0===e?void 0:e[d];if("object"!=typeof s)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${d}"`);n=n&&(r||hasRequired(i)),addMappings(s,t)}if(!n)throw new Error(`discriminator: "${d}" must be required`);return t;function hasRequired({required:e}){return Array.isArray(e)&&e.includes(d)}function addMappings(e,t){if(e.const)addMapping(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${d}" must have "const" or "enum"`);for(const r of e.enum)addMapping(r,t)}}function addMapping(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${d}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${p} === ${e}`),t.assign(f,applyTagSchema(r[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:p,tagName:d}),t.endIf()}()),(()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:p,tagName:d}))),e.ok(f)}};t.default=s},89306:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))},93924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(95684),i=r(62649),a=r(8200),o=r(39502),s=r(66167),c=[n.default,i.default,(0,a.default)(),o.default,s.metadataVocabulary,s.contentVocabulary];t.default=c},89651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;l.validateFormats&&(a?function validate$DataFormat(){const a=r.scopeValue("formats",{ref:f.formats,code:l.code.formats}),o=r.const("fDef",n._`${a}[${s}]`),c=r.let("fType"),u=r.let("format");r.if(n._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(c,n._`${o}.type || "string"`).assign(u,n._`${o}.validate`)),(()=>r.assign(c,n._`"string"`).assign(u,o))),e.fail$data((0,n.or)(function unknownFmt(){return!1===l.strictSchema?n.nil:n._`${s} && !${u}`}(),function invalidFmt(){const e=d.$async?n._`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:n._`${u}(${i})`,r=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return n._`${u} && ${u} !== true && ${c} === ${t} && !${r}`}()))}():function validateFormat(){const a=f.formats[o];if(!a)return void function unknownFormat(){if(!1===l.strictSchema)return void f.logger.warn(unknownMsg());throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${o}" ignored in schema at path "${u}"`}}();if(!0===a)return;const[s,c,p]=function getFormat(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):l.code.formats?n._`${l.code.formats}${(0,n.getProperty)(o)}`:void 0,i=r.scopeValue("formats",{key:o,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,n._`${i}.validate`];return["string",e,i]}(a);s===t&&e.pass(function validCondition(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw new Error("async format in sync schema");return n._`await ${p}(${i})`}return"function"==typeof c?n._`${p}(${i})`:n._`${p}.test(${i})`}())}())}};t.default=i},39502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(89651).default];t.default=n},66167:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},64693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),a=r(43510),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:o,schemaCode:s,schema:c}=e;o||c&&"object"==typeof c?e.fail$data(n._`!${(0,i.useFunc)(t,a.default)}(${r}, ${s})`):e.fail(n._`${c} !== ${r}`)}};t.default=o},30966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),a=r(43510),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&0===s.length)throw new Error("enum must have non-empty array");const u=s.length>=l.opts.loopEnum,d=(0,i.useFunc)(t,a.default);let f;if(u||o)f=t.let("valid"),e.block$data(f,(function loopEnum(){t.assign(f,!1),t.forOf("v",c,(e=>t.if(n._`${d}(${r}, ${e})`,(()=>t.assign(f,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const e=t.const("vSchema",c);f=(0,n.or)(...s.map(((t,i)=>function equalCode(e,t){const i=s[t];return"object"==typeof i&&null!==i?n._`${d}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(f)}};t.default=o},62649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(83983),i=r(90430),a=r(93229),o=r(74336),s=r(90498),c=r(33301),l=r(31687),u=r(82958),d=r(64693),f=r(30966),p=[n.default,i.default,a.default,o.default,s.default,c.default,l.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,f.default];t.default=p},31687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,a="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${a} ${i}`)}};t.default=i},93229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=r(76776),a=r(74499),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o,it:s}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,l=!1===s.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,a.default)}(${r})`;e.fail$data(n._`${l} ${c} ${o}`)}};t.default=o},83983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i=n.operators,a={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},o={message:({keyword:e,schemaCode:t})=>n.str`must be ${a[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${a[e].okStr}, limit: ${t}}`},s={keyword:Object.keys(a),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${a[t].fail} ${i} || isNaN(${r})`)}};t.default=s},90498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,a="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${a} ${i}`)}};t.default=i},90430:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=t.let("res"),c=o?n._`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:n._`${s} !== parseInt(${s})`;e.fail$data(n._`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}};t.default=i},74336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),i=r(93487),a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:a,schemaCode:o,it:s}=e,c=s.opts.unicodeRegExp?"u":"",l=r?i._`(new RegExp(${o}, ${c}))`:(0,n.usePattern)(e,a);e.fail$data(i._`!${l}.test(${t})`)}};t.default=a},33301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),i=r(93487),a=r(76776),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&0===r.length)return;const d=r.length>=u.loopRequired;if(l.allErrors?function allErrorsMode(){if(d||c)e.block$data(i.nil,loopAllRequired);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function exitOnErrorMode(){const a=t.let("missing");if(d||c){const r=t.let("valid",!0);e.block$data(r,(()=>function loopUntilMissing(r,a){e.setParams({missingProperty:r}),t.forOf(r,o,(()=>{t.assign(a,(0,n.propertyInData)(t,s,r,u.ownProperties)),t.if((0,i.not)(a),(()=>{e.error(),t.break()}))}),i.nil)}(a,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,a)),(0,n.reportMissingProp)(e,a),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,a.checkStrictMode)(l,t,l.opts.strictRequired)}}function loopAllRequired(){t.forOf("prop",o,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,s,r,u.ownProperties),(()=>e.error()))}))}}};t.default=o},82958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(50453),i=r(93487),a=r(76776),o=r(43510),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>i.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>i._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;const f=t.let("valid"),p=l.items?(0,n.getSchemaTypes)(l.items):[];function loopN(a,o){const s=t.name("item"),c=(0,n.checkDataTypes)(p,s,d.opts.strictNumbers,n.DataType.Wrong),l=t.const("indices",i._`{}`);t.for(i._`;${a}--;`,(()=>{t.let(s,i._`${r}[${a}]`),t.if(c,i._`continue`),p.length>1&&t.if(i._`typeof ${s} == "string"`,i._`${s} += "_"`),t.if(i._`typeof ${l}[${s}] == "number"`,(()=>{t.assign(o,i._`${l}[${s}]`),e.error(),t.assign(f,!1).break()})).code(i._`${l}[${s}] = ${a}`)}))}function loopN2(n,s){const c=(0,a.useFunc)(t,o.default),l=t.name("outer");t.label(l).for(i._`;${n}--;`,(()=>t.for(i._`${s} = ${n}; ${s}--;`,(()=>t.if(i._`${c}(${r}[${n}], ${r}[${s}])`,(()=>{e.error(),t.assign(f,!1).break(l)}))))))}e.block$data(f,(function validateUniqueItems(){const n=t.let("i",i._`${r}.length`),a=t.let("j");e.setParams({i:n,j:a}),t.assign(f,!0),t.if(i._`${n} > 1`,(()=>(function canOptimize(){return p.length>0&&!p.some((e=>"object"===e||"array"===e))}()?loopN:loopN2)(n,a)))}),i._`${u} === false`),e.ok(f)}};t.default=s},65987:e=>{"use strict";var t={single_source_shortest_paths:function(e,r,n){var i={},a={};a[r]=0;var o,s,c,l,u,d,f,p=t.PriorityQueue.make();for(p.push(r,0);!p.empty();)for(c in s=(o=p.pop()).value,l=o.cost,u=e[s]||{})u.hasOwnProperty(c)&&(d=l+u[c],f=a[c],(void 0===a[c]||f>d)&&(a[c]=d,p.push(c,d),i[c]=s));if(void 0!==n&&void 0===a[n]){var h=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(h)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t;n;)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,r,n){var i=t.single_source_shortest_paths(e,r,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(e){var r,n=t.PriorityQueue,i={};for(r in e=e||{},n)n.hasOwnProperty(r)&&(i[r]=n[r]);return i.queue=[],i.sorter=e.sorter||n.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},62378:e=>{"use strict";e.exports=function encodeUtf8(e){for(var t=[],r=e.length,n=0;n<r;n++){var i=e.charCodeAt(n);if(i>=55296&&i<=56319&&r>n+1){var a=e.charCodeAt(n+1);a>=56320&&a<=57343&&(i=1024*(i-55296)+a-56320+65536,n+=1)}i<128?t.push(i):i<2048?(t.push(i>>6|192),t.push(63&i|128)):i<55296||i>=57344&&i<65536?(t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128)):i>=65536&&i<=1114111?(t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},56387:(e,t,r)=>{var n;!function(i){var a=Object.hasOwnProperty,o=Array.isArray?Array.isArray:function _isArray(e){return"[object Array]"===Object.prototype.toString.call(e)},s="object"==typeof process&&"function"==typeof process.nextTick,c="function"==typeof Symbol,l="object"==typeof Reflect,u="function"==typeof setImmediate?setImmediate:setTimeout,d=c?l&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function init(){this._events={},this._conf&&configure.call(this,this._conf)}function configure(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==i&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function logPossibleMemoryLeak(e,t){var r="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(r+=" Event name: "+t+"."),"undefined"!=typeof process&&process.emitWarning){var n=new Error(r);n.name="MaxListenersExceededWarning",n.emitter=this,n.count=e,process.emitWarning(n)}else console.error(r),console.trace&&console.trace()}var toArray=function(e,t,r){var n=arguments.length;switch(n){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,r];default:for(var i=new Array(n);n--;)i[n]=arguments[n];return i}};function toObject(e,t){for(var r={},n=e.length,a=t?value.length:0,o=0;o<n;o++)r[e[o]]=o<a?t[o]:i;return r}function TargetObserver(e,t,r){var n,i;if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(r.on||r.off)&&(n=r.on,i=r.off),t.addEventListener?(n=t.addEventListener,i=t.removeEventListener):t.addListener?(n=t.addListener,i=t.removeListener):t.on&&(n=t.on,i=t.off),!n&&!i)throw Error("target does not implement any known event API");if("function"!=typeof n)throw TypeError("on method must be a function");if("function"!=typeof i)throw TypeError("off method must be a function");this._on=n,this._off=i;var a=e._observers;a?a.push(this):e._observers=[this]}function resolveOptions(e,t,r,n){var o=Object.assign({},t);if(!e)return o;if("object"!=typeof e)throw TypeError("options must be an object");var s,c,l,u=Object.keys(e),d=u.length;function reject(e){throw Error('Invalid "'+s+'" option value'+(e?". Reason: "+e:""))}for(var f=0;f<d;f++){if(s=u[f],!n&&!a.call(t,s))throw Error('Unknown "'+s+'" option');(c=e[s])!==i&&(l=r[s],o[s]=l?l(c,reject):c)}return o}function constructorReducer(e,t){return"function"==typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function makeTypeReducer(e){var t="value must be type of "+e.join("|"),r=e.length,n=e[0],i=e[1];return 1===r?function(e,r){if(typeof e===n)return e;r(t)}:2===r?function(e,r){var a=typeof e;if(a===n||a===i)return e;r(t)}:function(n,i){for(var a=typeof n,o=r;o-- >0;)if(a===e[o])return n;i(t)}}Object.assign(TargetObserver.prototype,{subscribe:function(e,t,r){var n=this,i=this._target,a=this._emitter,o=this._listeners,handler=function(){var n=toArray.apply(null,arguments),o={data:n,name:t,original:e};if(r){var s=r.call(i,o);!1!==s&&a.emit.apply(a,[o.name].concat(n))}else a.emit.apply(a,[t].concat(n))};if(o[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,a._newListener&&a._removeListener&&!n._onNewListener?(this._onNewListener=function(r){r===t&&null===o[e]&&(o[e]=handler,n._on.call(i,e,handler))},a.on("newListener",this._onNewListener),this._onRemoveListener=function(r){r===t&&!a.hasListeners(r)&&o[e]&&(o[e]=null,n._off.call(i,e,handler))},o[e]=null,a.on("removeListener",this._onRemoveListener)):(o[e]=handler,n._on.call(i,e,handler))},unsubscribe:function(e){var t,r,n,i=this,a=this._listeners,o=this._emitter,s=this._off,c=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function clearRefs(){i._onNewListener&&(o.off("newListener",i._onNewListener),o.off("removeListener",i._onRemoveListener),i._onNewListener=null,i._onRemoveListener=null);var e=findTargetIndex.call(o,i);o._observers.splice(e,1)}if(e){if(!(t=a[e]))return;s.call(c,e,t),delete a[e],--this._listenersCount||clearRefs()}else{for(n=(r=d(a)).length;n-- >0;)e=r[n],s.call(c,e,a[e]);this._listeners={},this._listenersCount=0,clearRefs()}}});var f=makeTypeReducer(["function"]),p=makeTypeReducer(["object","function"]);function makeCancelablePromise(e,t,r){var n,i,a,o=0,s=new e((function(c,l,u){function cleanup(){i&&(i=null),o&&(clearTimeout(o),o=0)}r=resolveOptions(r,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}}),n=!r.overload&&"function"==typeof e.prototype.cancel&&"function"==typeof u;var _resolve=function(e){cleanup(),c(e)},_reject=function(e){cleanup(),l(e)};n?t(_resolve,_reject,u):(i=[function(e){_reject(e||Error("canceled"))}],t(_resolve,_reject,(function(e){if(a)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");i.push(e)})),a=!0),r.timeout>0&&(o=setTimeout((function(){var e=Error("timeout");e.code="ETIMEDOUT",o=0,s.cancel(e),l(e)}),r.timeout))}));return n||(s.cancel=function(e){if(i){for(var t=i.length,r=1;r<t;r++)i[r](e);i[0](e),i=null}}),s}function findTargetIndex(e){var t=this._observers;if(!t)return-1;for(var r=t.length,n=0;n<r;n++)if(t[n]._target===e)return n;return-1}function searchListenerTree(e,t,r,n,i){if(!r)return null;if(0===n){var a=typeof t;if("string"===a){var o,s,c=0,l=0,u=this.delimiter,f=u.length;if(-1!==(s=t.indexOf(u))){o=new Array(5);do{o[c++]=t.slice(l,s),l=s+f}while(-1!==(s=t.indexOf(u,l)));o[c++]=t.slice(l),t=o,i=c}else t=[t],i=1}else"object"===a?i=t.length:(t=[t],i=1)}var p,h,m,y,g,v,b,R=null,C=t[n],w=t[n+1];if(n===i)r._listeners&&("function"==typeof r._listeners?(e&&e.push(r._listeners),R=[r]):(e&&e.push.apply(e,r._listeners),R=[r]));else{if("*"===C){for(s=(v=d(r)).length;s-- >0;)"_listeners"!==(p=v[s])&&(b=searchListenerTree(e,t,r[p],n+1,i))&&(R?R.push.apply(R,b):R=b);return R}if("**"===C){for((g=n+1===i||n+2===i&&"*"===w)&&r._listeners&&(R=searchListenerTree(e,t,r,i,i)),s=(v=d(r)).length;s-- >0;)"_listeners"!==(p=v[s])&&("*"===p||"**"===p?(r[p]._listeners&&!g&&(b=searchListenerTree(e,t,r[p],i,i))&&(R?R.push.apply(R,b):R=b),b=searchListenerTree(e,t,r[p],n,i)):b=searchListenerTree(e,t,r[p],p===w?n+2:n,i),b&&(R?R.push.apply(R,b):R=b));return R}r[C]&&(R=searchListenerTree(e,t,r[C],n+1,i))}if((h=r["*"])&&searchListenerTree(e,t,h,n+1,i),m=r["**"])if(n<i)for(m._listeners&&searchListenerTree(e,t,m,i,i),s=(v=d(m)).length;s-- >0;)"_listeners"!==(p=v[s])&&(p===w?searchListenerTree(e,t,m[p],n+2,i):p===C?searchListenerTree(e,t,m[p],n+1,i):((y={})[p]=m[p],searchListenerTree(e,t,{"**":y},n+1,i)));else m._listeners?searchListenerTree(e,t,m,i,i):m["*"]&&m["*"]._listeners&&searchListenerTree(e,t,m["*"],i,i);return R}function growListenerTree(e,t,r){var n,i,a=0,o=0,s=this.delimiter,c=s.length;if("string"==typeof e)if(-1!==(n=e.indexOf(s))){i=new Array(5);do{i[a++]=e.slice(o,n),o=n+c}while(-1!==(n=e.indexOf(s,o)));i[a++]=e.slice(o)}else i=[e],a=1;else i=e,a=e.length;if(a>1)for(n=0;n+1<a;n++)if("**"===i[n]&&"**"===i[n+1])return;var l,u=this.listenerTree;for(n=0;n<a;n++)if(u=u[l=i[n]]||(u[l]={}),n===a-1)return u._listeners?("function"==typeof u._listeners&&(u._listeners=[u._listeners]),r?u._listeners.unshift(t):u._listeners.push(t),!u._listeners.warned&&this._maxListeners>0&&u._listeners.length>this._maxListeners&&(u._listeners.warned=!0,logPossibleMemoryLeak.call(this,u._listeners.length,l))):u._listeners=t,!0;return!0}function collectTreeEvents(e,t,r,n){for(var i,a,o,s,c=d(e),l=c.length,u=e._listeners;l-- >0;)i=e[a=c[l]],o="_listeners"===a?r:r?r.concat(a):[a],s=n||"symbol"==typeof a,u&&t.push(s?o:o.join(this.delimiter)),"object"==typeof i&&collectTreeEvents.call(this,i,t,o,s);return t}function recursivelyGarbageCollect(e){for(var t,r,n,i=d(e),a=i.length;a-- >0;)(t=e[r=i[a]])&&(n=!0,"_listeners"===r||recursivelyGarbageCollect(t)||delete e[r]);return n}function Listener(e,t,r){this.emitter=e,this.event=t,this.listener=r}function setupListener(e,t,r){if(!0===r)a=!0;else if(!1===r)n=!0;else{if(!r||"object"!=typeof r)throw TypeError("options should be an object or true");var n=r.async,a=r.promisify,o=r.nextTick,c=r.objectify}if(n||o||a){var l=t,d=t._origin||t;if(o&&!s)throw Error("process.nextTick is not supported");a===i&&(a="AsyncFunction"===t.constructor.name),t=function(){var e=arguments,t=this,r=this.event;return a?o?Promise.resolve():new Promise((function(e){u(e)})).then((function(){return t.event=r,l.apply(t,e)})):(o?process.nextTick:u)((function(){t.event=r,l.apply(t,e)}))},t._async=!0,t._origin=d}return[t,c?new Listener(this,e,t):this]}function EventEmitter(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,configure.call(this,e)}Listener.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},EventEmitter.EventEmitter2=EventEmitter,EventEmitter.prototype.listenTo=function(e,t,r){if("object"!=typeof e)throw TypeError("target musts be an object");var n=this;function listen(t){if("object"!=typeof t)throw TypeError("events must be an object");var i,a=r.reducers,o=findTargetIndex.call(n,e);i=-1===o?new TargetObserver(n,e,r):n._observers[o];for(var s,c=d(t),l=c.length,u="function"==typeof a,f=0;f<l;f++)s=c[f],i.subscribe(s,t[s]||s,u?a:a&&a[s])}return r=resolveOptions(r,{on:i,off:i,reducers:i},{on:f,off:f,reducers:p}),o(t)?listen(toObject(t)):listen("string"==typeof t?toObject(t.split(/\s+/)):t),this},EventEmitter.prototype.stopListeningTo=function(e,t){var r=this._observers;if(!r)return!1;var n,i=r.length,a=!1;if(e&&"object"!=typeof e)throw TypeError("target should be an object");for(;i-- >0;)n=r[i],e&&n._target!==e||(n.unsubscribe(t),a=!0);return a},EventEmitter.prototype.delimiter=".",EventEmitter.prototype.setMaxListeners=function(e){e!==i&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},EventEmitter.prototype.getMaxListeners=function(){return this._maxListeners},EventEmitter.prototype.event="",EventEmitter.prototype.once=function(e,t,r){return this._once(e,t,!1,r)},EventEmitter.prototype.prependOnceListener=function(e,t,r){return this._once(e,t,!0,r)},EventEmitter.prototype._once=function(e,t,r,n){return this._many(e,1,t,r,n)},EventEmitter.prototype.many=function(e,t,r,n){return this._many(e,t,r,!1,n)},EventEmitter.prototype.prependMany=function(e,t,r,n){return this._many(e,t,r,!0,n)},EventEmitter.prototype._many=function(e,t,r,n,i){var a=this;if("function"!=typeof r)throw new Error("many only accepts instances of Function");function listener(){return 0==--t&&a.off(e,listener),r.apply(this,arguments)}return listener._origin=r,this._on(e,listener,n,i)},EventEmitter.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||init.call(this);var e,t,r,n,i,a,o=arguments[0],s=this.wildcard;if("newListener"===o&&!this._newListener&&!this._events.newListener)return!1;if(s&&(e=o,"newListener"!==o&&"removeListener"!==o&&"object"==typeof o)){if(r=o.length,c)for(n=0;n<r;n++)if("symbol"==typeof o[n]){a=!0;break}a||(o=o.join(this.delimiter))}var l,u=arguments.length;if(this._all&&this._all.length)for(n=0,r=(l=this._all.slice()).length;n<r;n++)switch(this.event=o,u){case 1:l[n].call(this,o);break;case 2:l[n].call(this,o,arguments[1]);break;case 3:l[n].call(this,o,arguments[1],arguments[2]);break;default:l[n].apply(this,arguments)}if(s)l=[],searchListenerTree.call(this,l,e,this.listenerTree,0,r);else{if("function"==typeof(l=this._events[o])){switch(this.event=o,u){case 1:l.call(this);break;case 2:l.call(this,arguments[1]);break;case 3:l.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(u-1),i=1;i<u;i++)t[i-1]=arguments[i];l.apply(this,t)}return!0}l&&(l=l.slice())}if(l&&l.length){if(u>3)for(t=new Array(u-1),i=1;i<u;i++)t[i-1]=arguments[i];for(n=0,r=l.length;n<r;n++)switch(this.event=o,u){case 1:l[n].call(this);break;case 2:l[n].call(this,arguments[1]);break;case 3:l[n].call(this,arguments[1],arguments[2]);break;default:l[n].apply(this,t)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===o)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},EventEmitter.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||init.call(this);var e,t,r,n,i,a,o=arguments[0],s=this.wildcard;if("newListener"===o&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(s&&(e=o,"newListener"!==o&&"removeListener"!==o&&"object"==typeof o)){if(n=o.length,c)for(i=0;i<n;i++)if("symbol"==typeof o[i]){t=!0;break}t||(o=o.join(this.delimiter))}var l,u=[],d=arguments.length;if(this._all)for(i=0,n=this._all.length;i<n;i++)switch(this.event=o,d){case 1:u.push(this._all[i].call(this,o));break;case 2:u.push(this._all[i].call(this,o,arguments[1]));break;case 3:u.push(this._all[i].call(this,o,arguments[1],arguments[2]));break;default:u.push(this._all[i].apply(this,arguments))}if(s?(l=[],searchListenerTree.call(this,l,e,this.listenerTree,0)):l=this._events[o],"function"==typeof l)switch(this.event=o,d){case 1:u.push(l.call(this));break;case 2:u.push(l.call(this,arguments[1]));break;case 3:u.push(l.call(this,arguments[1],arguments[2]));break;default:for(r=new Array(d-1),a=1;a<d;a++)r[a-1]=arguments[a];u.push(l.apply(this,r))}else if(l&&l.length){if(l=l.slice(),d>3)for(r=new Array(d-1),a=1;a<d;a++)r[a-1]=arguments[a];for(i=0,n=l.length;i<n;i++)switch(this.event=o,d){case 1:u.push(l[i].call(this));break;case 2:u.push(l[i].call(this,arguments[1]));break;case 3:u.push(l[i].call(this,arguments[1],arguments[2]));break;default:u.push(l[i].apply(this,r))}}else if(!this.ignoreErrors&&!this._all&&"error"===o)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(u)},EventEmitter.prototype.on=function(e,t,r){return this._on(e,t,!1,r)},EventEmitter.prototype.prependListener=function(e,t,r){return this._on(e,t,!0,r)},EventEmitter.prototype.onAny=function(e){return this._onAny(e,!1)},EventEmitter.prototype.prependAny=function(e){return this._onAny(e,!0)},EventEmitter.prototype.addListener=EventEmitter.prototype.on,EventEmitter.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},EventEmitter.prototype._on=function(e,t,r,n){if("function"==typeof e)return this._onAny(e,t),this;if("function"!=typeof t)throw new Error("on only accepts instances of Function");this._events||init.call(this);var a,o=this;return n!==i&&(t=(a=setupListener.call(this,e,t,n))[0],o=a[1]),this._newListener&&this.emit("newListener",e,t),this.wildcard?(growListenerTree.call(this,e,t,r),o):(this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),r?this._events[e].unshift(t):this._events[e].push(t),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,logPossibleMemoryLeak.call(this,this._events[e].length,e))):this._events[e]=t,o)},EventEmitter.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var r,n=[];if(this.wildcard){var i="string"==typeof e?e.split(this.delimiter):e.slice();if(!(n=searchListenerTree.call(this,null,i,this.listenerTree,0)))return this}else{if(!this._events[e])return this;r=this._events[e],n.push({_listeners:r})}for(var a=0;a<n.length;a++){var s=n[a];if(r=s._listeners,o(r)){for(var c=-1,l=0,u=r.length;l<u;l++)if(r[l]===t||r[l].listener&&r[l].listener===t||r[l]._origin&&r[l]._origin===t){c=l;break}if(c<0)continue;return this.wildcard?s._listeners.splice(c,1):this._events[e].splice(c,1),0===r.length&&(this.wildcard?delete s._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(r===t||r.listener&&r.listener===t||r._origin&&r._origin===t)&&(this.wildcard?delete s._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&recursivelyGarbageCollect(this.listenerTree),this},EventEmitter.prototype.offAny=function(e){var t,r=0,n=0;if(e&&this._all&&this._all.length>0){for(r=0,n=(t=this._all).length;r<n;r++)if(e===t[r])return t.splice(r,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(r=0,n=t.length;r<n;r++)this.emit("removeListenerAny",t[r]);this._all=[]}return this},EventEmitter.prototype.removeListener=EventEmitter.prototype.off,EventEmitter.prototype.removeAllListeners=function(e){if(e===i)return!this._events||init.call(this),this;if(this.wildcard){var t,r=searchListenerTree.call(this,null,e,this.listenerTree,0);if(!r)return this;for(t=0;t<r.length;t++)r[t]._listeners=null;this.listenerTree&&recursivelyGarbageCollect(this.listenerTree)}else this._events&&(this._events[e]=null);return this},EventEmitter.prototype.listeners=function(e){var t,r,n,a,o,s=this._events;if(e===i){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!s)return[];for(a=(t=d(s)).length,n=[];a-- >0;)"function"==typeof(r=s[t[a]])?n.push(r):n.push.apply(n,r);return n}if(this.wildcard){if(!(o=this.listenerTree))return[];var c=[],l="string"==typeof e?e.split(this.delimiter):e.slice();return searchListenerTree.call(this,c,l,o,0),c}return s&&(r=s[e])?"function"==typeof r?[r]:r:[]},EventEmitter.prototype.eventNames=function(e){var t=this._events;return this.wildcard?collectTreeEvents.call(this,this.listenerTree,[],null,e):t?d(t):[]},EventEmitter.prototype.listenerCount=function(e){return this.listeners(e).length},EventEmitter.prototype.hasListeners=function(e){if(this.wildcard){var t=[],r="string"==typeof e?e.split(this.delimiter):e.slice();return searchListenerTree.call(this,t,r,this.listenerTree,0),t.length>0}var n=this._events,a=this._all;return!!(a&&a.length||n&&(e===i?d(n).length:n[e]))},EventEmitter.prototype.listenersAny=function(){return this._all?this._all:[]},EventEmitter.prototype.waitFor=function(e,t){var r=this,n=typeof t;return"number"===n?t={timeout:t}:"function"===n&&(t={filter:t}),makeCancelablePromise((t=resolveOptions(t,{timeout:0,filter:i,handleError:!1,Promise,overload:!1},{filter:f,Promise:constructorReducer})).Promise,(function(n,i,a){function listener(){var a=t.filter;if(!a||a.apply(r,arguments))if(r.off(e,listener),t.handleError){var o=arguments[0];o?i(o):n(toArray.apply(null,arguments).slice(1))}else n(toArray.apply(null,arguments))}a((function(){r.off(e,listener)})),r._on(e,listener,!1)}),{timeout:t.timeout,overload:t.overload})};var h=EventEmitter.prototype;Object.defineProperties(EventEmitter,{defaultMaxListeners:{get:function(){return h._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");h._maxListeners=e},enumerable:!0},once:{value:function once(e,t,r){return makeCancelablePromise((r=resolveOptions(r,{Promise,timeout:0,overload:!1},{Promise:constructorReducer})).Promise,(function(r,n,i){var a;if("function"==typeof e.addEventListener)return a=function(){r(toArray.apply(null,arguments))},i((function(){e.removeEventListener(t,a)})),void e.addEventListener(t,a,{once:!0});var o,eventListener=function(){o&&e.removeListener("error",o),r(toArray.apply(null,arguments))};"error"!==t&&(o=function(r){e.removeListener(t,eventListener),n(r)},e.once("error",o)),i((function(){o&&e.removeListener("error",o),e.removeListener(t,eventListener)})),e.once(t,eventListener)}),{timeout:r.timeout,overload:r.overload})},writable:!0,configurable:!0}}),Object.defineProperties(h,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),(n=function(){return EventEmitter}.call(t,r,t,e))===i||(e.exports=n)}()},64063:e=>{"use strict";e.exports=function equal(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var r,n,i;if(Array.isArray(e)){if((r=e.length)!=t.length)return!1;for(n=r;0!=n--;)if(!equal(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((r=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){var a=i[n];if(!equal(e[a],t[a]))return!1}return!0}return e!=e&&t!=t}},6548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10993),i=r(35140),a=r(76023);t.AbstractValidator=class AbstractValidator{constructor(){this.rules=[]}validateIf(e){const t=this.registerRule(new a.ValidationRule(e));return new n.CommonValidatorBuilderImpl(t)}validateIfAny(e){const t=this.registerRule(new a.ValidationRule(e));return new n.TypeValidatorBuilderImpl(t)}validateIfNumber(e){const t=this.registerRule(new a.ValidationRule(e));return new n.NumberValidatorBuilderImpl(t)}validateIfDate(e){const t=this.registerRule(new a.ValidationRule(e));return new n.DateValidatorBuilderImpl(t)}validateIfString(e){const t=this.registerRule(new a.ValidationRule(e));return new n.StringValidatorBuilderImpl(t)}validateIfEach(e){const t=this.registerRule(new a.CollectionValidationRule(e));return new n.CommonValidatorBuilderImpl(t)}validateIfEachAny(e){const t=this.registerRule(new a.CollectionValidationRule(e));return new n.TypeValidatorBuilderImpl(t)}validateIfEachNumber(e){const t=this.registerRule(new a.CollectionValidationRule(e));return new n.NumberValidatorBuilderImpl(t)}validateIfEachDate(e){const t=this.registerRule(new a.CollectionValidationRule(e));return new n.DateValidatorBuilderImpl(t)}validateIfEachString(e){const t=this.registerRule(new a.CollectionValidationRule(e));return new n.StringValidatorBuilderImpl(t)}validateIfIterable(e){const t=this.registerRule(new a.ValidationRule(e));return new n.SizedIterableValidatorBuilderImpl(t)}registerRule(e){return this.rules.push(e),e}validate(e){const t=new i.ValidationResult;return this.rules.forEach((r=>{const n=r.apply(e);n.isFailure()&&t.addFailures(n.getValidationFailures())})),t}validateAsync(e){return new Promise((t=>{const r=this.createPromiseForEachRule(e,this.rules);Promise.all(r).then((e=>{t(this.buildValidationResultFrom(e))}))}))}createPromiseForEachRule(e,t){const r=[];return t.forEach((t=>{r.push(this.applyRuleAsync(t,e))})),r}applyRuleAsync(e,t){return new Promise((r=>{r(e.apply(t))}))}buildValidationResultFrom(e){const t=new i.ValidationResult;return e.forEach((e=>{e.isFailure()&&t.addFailures(e.getValidationFailures())})),t}}},54946:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76023),i=r(67241);t.CommonValidatorBuilderImpl=class CommonValidatorBuilderImpl{constructor(e){this.validationRule=e}withFailureCode(e){return this.validationRule.setErrorCode(e),this}withFailureMessage(e){return this.validationRule.setErrorMessage(e),this}withSeverity(e){return this.validationRule.setSeverity(e),this}withPropertyName(e){return this.validationRule.setPropertyName(e),this}whenDefined(){return this.validationRule.addCondition(new n.WhenDefinedCondition(this.validationRule.lambdaExpression)),this}whenNotNull(){return this.validationRule.addCondition(new n.WhenNotNullCondition(this.validationRule.lambdaExpression)),this}when(e){return this.validationRule.addCondition(new n.WhenCondition(e)),this}unless(e){return this.validationRule.addCondition(new n.UnlessCondition(e)),this}onFailure(e){return this.validationRule.onFailure(e),this}fulfills(e){return"object"==typeof e?this.validationRule.addValidator({isValid:function(t){return e.validate(t).isValid()}}):this.validationRule.addValidator({isValid:function(t){return e(t)}}),this}isDefined(){return this.validationRule.addValidator(new i.IsDefinedValidator),this}isUndefined(){return this.validationRule.addValidator(new i.IsUndefinedValidator),this}isNull(){return this.validationRule.addValidator(new i.IsNullValidator),this}isNotNull(){return this.validationRule.addValidator(new i.IsNotNullValidator),this}isEmpty(){return this.validationRule.addValidator(new i.IsEmptyValidator),this}isNotEmpty(){return this.validationRule.addValidator(new i.IsNotEmptyValidator),this}isEqualTo(e){return this.validationRule.addValidator(new i.IsEqualValidator(e)),this}isNotEqualTo(e){return this.validationRule.addValidator(new i.IsNotEqualValidator(e)),this}isIn(e){return this.validationRule.addValidator(new i.IsInValidator(e)),this}isNotIn(e){return this.validationRule.addValidator(new i.IsNotInValidator(e)),this}}},61852:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10993),i=r(31474);class DateValidatorBuilderImpl extends n.CommonValidatorBuilderImpl{constructor(e){super(e)}buildRuleWith(e){return this.validationRule.addValidator(e),this}isBefore(e){return this.buildRuleWith(new i.IsBeforeValidator(e))}isSameAs(e){return this.buildRuleWith(new i.IsSameAsValidator(e))}isAfter(e){return this.buildRuleWith(new i.IsAfterValidator(e))}isSameOrBefore(e){return this.buildRuleWith(new i.IsSameOrBeforeValidator(e))}isSameOrAfter(e){return this.buildRuleWith(new i.IsSameOrAfterValidator(e))}isBetween(e,t,r="(",n=")"){return this.buildRuleWith(new i.IsBetweenValidator(e,t,r,n))}}t.DateValidatorBuilderImpl=DateValidatorBuilderImpl},55203:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10993),i=r(79157);class NumberValidatorBuilderImpl extends n.CommonValidatorBuilderImpl{constructor(e){super(e)}buildRuleWith(e){return this.validationRule.addValidator(e),this}isPositive(){return this.buildRuleWith(new i.IsPositiveValidator)}isNegative(){return this.buildRuleWith(new i.IsNegativeValidator)}isGreaterThan(e){return this.buildRuleWith(new i.IsGreaterThanValidator(e))}isGreaterThanOrEqual(e){return this.buildRuleWith(new i.IsGreaterThanOrEqualToValidator(e))}isLessThan(e){return this.buildRuleWith(new i.IsLessThanValidator(e))}isLessThanOrEqual(e){return this.buildRuleWith(new i.IsLessThanOrEqualToValidator(e))}}t.NumberValidatorBuilderImpl=NumberValidatorBuilderImpl},29444:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(80069),i=r(54946),a=r(33025);class SizedIterableValidatorBuilderImpl extends i.CommonValidatorBuilderImpl{constructor(e){super(e)}whenNotEmpty(){return this.validationRule.addCondition(new a.WhenNotEmptyCondition(this.validationRule.lambdaExpression)),this}contains(e){return this.validationRule.addValidator(new n.ContainsElementValidator(e)),this}doesNotContain(e){return this.validationRule.addValidator(new n.DoesNotContainElementValidator(e)),this}isEmpty(){return this.validationRule.addValidator(new n.IsEmptyValidator),this}isNotEmpty(){return this.validationRule.addValidator(new n.IsNotEmptyValidator),this}hasNumberOfElements(e){return this.validationRule.addValidator(new n.HasNumberOfElementsValidator(e)),this}hasMinNumberOfElements(e){return this.validationRule.addValidator(new n.HasMinNumberOfElementsValidator(e)),this}hasMaxNumberOfElements(e){return this.validationRule.addValidator(new n.HasMaxNumberOfElementsValidator(e)),this}hasNumberOfElementsBetween(e,t){return this.validationRule.addValidator(new n.HasMinMaxNumberOfElementsValidator(e,t)),this}}t.SizedIterableValidatorBuilderImpl=SizedIterableValidatorBuilderImpl},19667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10993),i=r(76023),a=r(89712),o=r(98199);class StringValidatorBuilderImpl extends n.CommonValidatorBuilderImpl{constructor(e){super(e)}buildRuleWith(e){return this.validationRule.addValidator(e),this}whenNotEmpty(){return this.validationRule.addCondition(new i.WhenNotEmptyCondition(this.validationRule.lambdaExpression)),this}isBooleanString(){return this.buildRuleWith(new a.IsBooleanStringValidator)}isNumericString(){return this.buildRuleWith(new a.IsNumericStringValidator)}isAlpha(e){return this.buildRuleWith(new a.IsAlphaValidator(e))}isAlphanumeric(e){return this.buildRuleWith(new a.IsAlphanumericValidator(e))}contains(e){return this.buildRuleWith(new a.ContainsValidator(e))}isAscii(){return this.buildRuleWith(new a.IsAsciiValidator)}isBase64(){return this.buildRuleWith(new a.IsBase64Validator)}isCurrency(e){return this.buildRuleWith(new a.IsCurrencyValidator(e))}isDecimalString(){return this.buildRuleWith(new a.IsDecimalStringValidator)}isEmail(e){return this.buildRuleWith(new a.IsEmailValidator(e))}isFqdn(e){return this.buildRuleWith(new a.IsFqdnValidator(e))}isHexadecimal(){return this.buildRuleWith(new a.IsHexadecimalValidator)}isIso8601(){return this.buildRuleWith(new a.IsIso8601Validator)}isJson(){return this.buildRuleWith(new a.IsJsonValidator)}isPostalCode(e){return this.buildRuleWith(new a.IsPostalCodeValidator(e))}hasLength(e){return this.buildRuleWith(new a.HasLengthValidator({min:e,max:e}))}hasLengthBetween(e,t){return this.buildRuleWith(new a.HasLengthValidator({min:e,max:t}))}hasMinLength(e){return this.buildRuleWith(new a.HasLengthValidator({min:e}))}hasMaxLength(e){return this.buildRuleWith(new a.HasLengthValidator({max:e}))}isLatLong(){return this.buildRuleWith(new o.IsLatLongValidator)}isLowercase(){return this.buildRuleWith(new a.IsLowercaseValidator)}isMobilePhoneNo(e){return this.buildRuleWith(new a.IsMobilePhoneValidator(e))}isUppercase(){return this.buildRuleWith(new a.IsUppercaseValidator)}isUrl(e){return this.buildRuleWith(new a.IsUrlValidator(e))}isUuid(e){return this.buildRuleWith(new a.IsUuidValidator(e))}matches(e,t){return this.buildRuleWith(new a.RegExValidator(e,t))}}t.StringValidatorBuilderImpl=StringValidatorBuilderImpl},57221:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10993),i=r(98031);class TypeValidatorBuilderImpl extends n.CommonValidatorBuilderImpl{constructor(e){super(e)}isArray(){return this.validationRule.addValidator(new i.IsArrayValidator),new n.CommonValidatorBuilderImpl(this.validationRule)}isBoolean(){return this.validationRule.addValidator(new i.IsBooleanValidator),new n.CommonValidatorBuilderImpl(this.validationRule)}isDate(){return this.validationRule.addValidator(new i.IsDateValidator),new n.DateValidatorBuilderImpl(this.validationRule)}isNumber(){return this.validationRule.addValidator(new i.IsNumberValidator),new n.NumberValidatorBuilderImpl(this.validationRule)}isString(){return this.validationRule.addValidator(new i.IsStringValidator),new n.StringValidatorBuilderImpl(this.validationRule)}}t.TypeValidatorBuilderImpl=TypeValidatorBuilderImpl},10993:(e,t,r)=>{"use strict";function __export(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),__export(r(29444)),__export(r(54946)),__export(r(61852)),__export(r(55203)),__export(r(19667)),__export(r(57221))},36347:(e,t,r)=>{"use strict";function __export(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),__export(r(35140)),__export(r(6548))},29129:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasLength=function hasLength(e){return null!=e&&void 0!==e.length}},13749:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasSize=function hasSize(e){return null!=e&&void 0!==e.size}},30798:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=function isIterable(e){return!!e&&void 0!==e[Symbol.iterator]}},84614:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterableEmtpy=function isIterableEmtpy(e){if(e)for(let t of e)return!1;return!0}},79701:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.ERROR=0]="ERROR",e[e.WARNING=1]="WARNING",e[e.INFO=2]="INFO"}(t.Severity||(t.Severity={}))},1633:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(79701);t.ValidationFailure=class ValidationFailure{constructor(e,t,r,i,a,o=n.Severity.ERROR){this.target=e,this.propertyName=t,this.attemptedValue=r,this.code=i,this.message=a,this.severity=n.Severity[o]}}},50695:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ValidationResult=class ValidationResult{constructor(){this.failures=[]}isValid(){return 0===this.failures.length}isInvalid(){return!this.isValid()}addFailures(e){e&&(this.failures=this.failures.concat(e))}getFailures(){return this.failures.slice(0)}getFailureMessages(){return this.failures.filter((e=>e.message)).map((e=>e.message))}getFailureCodes(){return this.failures.filter((e=>e.code)).map((e=>e.code))}}},35140:(e,t,r)=>{"use strict";function __export(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),__export(r(79701)),__export(r(50695)),__export(r(1633)),__export(r(29129)),__export(r(13749)),__export(r(30798)),__export(r(84614))},90164:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76023),i=r(10919);class CollectionValidationRule extends n.ValidationRule{apply(e){const t=new i.RuleApplicationOutcome,r=this.lambdaExpressionResultWith(e);if(this.isNoValidationRequired(e)||null==r)return t;for(let n of r)this.processElementValidation(e,n,t);return t}processElementValidation(e,t,r){if(this.validators.some((e=>!1===e.isValid(t)))){const n=this.createValidationFailure(e,t);this.invokeCallbackWith(n),r.addValidationFailure(n)}}}t.CollectionValidationRule=CollectionValidationRule},10919:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.RuleApplicationOutcome=class RuleApplicationOutcome{constructor(e){this.validationFailure=e,this.failures=[],e&&this.addValidationFailure(e)}isSuccess(){return 0===this.failures.length}isFailure(){return!this.isSuccess()}addValidationFailure(e){this.failures.push(e)}getValidationFailures(){return this.failures.slice(0)}}},82387:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.UnlessCondition=class UnlessCondition{constructor(e){this.expression=e}shouldDoValidation(e){return!this.expression(e)}}},40572:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(35140),i=r(10919),a=new i.RuleApplicationOutcome;t.ValidationRule=class ValidationRule{constructor(e){this.lambdaExpression=e,this.validators=[],this.conditions=[];let t=e.toString().match("\\s+\\w+\\.(\\w+(\\.\\w+)*)");this.propertyName=t&&t.length>1?t[1]:e.toString(),this.errorMessage=`${this.propertyName} is invalid`}setPropertyName(e){this.propertyName=e}addValidator(e){this.validators.push(e)}setErrorCode(e){this.errorCode=e}setErrorMessage(e){this.errorMessage=e}setSeverity(e){this.severity=e}addCondition(e){e&&this.conditions.push(e)}onFailure(e){this.callback=e}apply(e){const t=this.lambdaExpressionResultWith(e);if(this.isValid(e,t))return a;const r=this.createValidationFailure(e,t);return this.invokeCallbackWith(r),new i.RuleApplicationOutcome(r)}lambdaExpressionResultWith(e){try{return this.lambdaExpression(e)}catch(e){return}}isValid(e,t){return this.isNoValidationRequired(e)||this.allValidatorsAreValid(t)}isNoValidationRequired(e){return!this.isValidationRequired(e)}isValidationRequired(e){return 0===this.conditions.length||this.conditions.every((t=>t.shouldDoValidation(e)))}allValidatorsAreValid(e){return this.validators.every((t=>t.isValid(e)))}createValidationFailure(e,t){return new n.ValidationFailure(e,this.propertyName,t,this.errorCode,this.errorMessage,this.severity)}invokeCallbackWith(e){this.callback&&this.callback(e)}}},50077:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.WhenCondition=class WhenCondition{constructor(e){this.expression=e}shouldDoValidation(e){return this.expression(e)}}},93982:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.WhenDefinedCondition=class WhenDefinedCondition{constructor(e){this.expression=e}shouldDoValidation(e){try{return void 0!==this.expression(e)}catch(e){return!1}}}},33025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(35140);t.WhenNotEmptyCondition=class WhenNotEmptyCondition{constructor(e){this.expression=e}shouldDoValidation(e){const t=this.lambdaExprResultFor(e);return n.isIterable(t)?!n.isIterableEmtpy(t):!!t}lambdaExprResultFor(e){try{return this.expression(e)}catch(e){return}}}},73796:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.WhenNotNullCondition=class WhenNotNullCondition{constructor(e){this.expression=e}shouldDoValidation(e){try{return null!=this.expression(e)}catch(e){return!1}}}},76023:(e,t,r)=>{"use strict";function __export(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),__export(r(40572)),__export(r(90164)),__export(r(10919)),__export(r(50077)),__export(r(93982)),__export(r(73796)),__export(r(33025)),__export(r(82387))},62493:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ContainsElementValidator=class ContainsElementValidator{constructor(e){this.seed=e}isValid(e){if(e)for(let t of e)if(t===this.seed)return!0;return!1}}},83675:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.DoesNotContainElementValidator=class DoesNotContainElementValidator{constructor(e){this.nonSeed=e}isValid(e){if(e){for(let t of e)if(t===this.nonSeed)return!1;return!0}return!1}}},29798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29129),i=r(13749);t.HasMaxNumberOfElementsValidator=class HasMaxNumberOfElementsValidator{constructor(e){this.maxElementCount=e}isValid(e){return n.hasLength(e)?e.length<=this.maxElementCount:!!i.hasSize(e)&&e.size<=this.maxElementCount}}},62624:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(11146),i=r(29798);t.HasMinMaxNumberOfElementsValidator=class HasMinMaxNumberOfElementsValidator{constructor(e,t){this.minValidator=new n.HasMinNumberOfElementsValidator(e),this.maxValidator=new i.HasMaxNumberOfElementsValidator(t)}isValid(e){return this.minValidator.isValid(e)&&this.maxValidator.isValid(e)}}},11146:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29129),i=r(13749);t.HasMinNumberOfElementsValidator=class HasMinNumberOfElementsValidator{constructor(e){this.minElementCount=e}isValid(e){return n.hasLength(e)?e.length>=this.minElementCount:!!i.hasSize(e)&&e.size>=this.minElementCount}}},80072:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29129),i=r(13749);t.HasNumberOfElementsValidator=class HasNumberOfElementsValidator{constructor(e){this.numberOfElements=e}isValid(e){return n.hasLength(e)?e.length===this.numberOfElements:!!i.hasSize(e)&&e.size===this.numberOfElements}}},11908:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29129),i=r(13749);t.IsEmptyValidator=class IsEmptyValidator{isValid(e){return n.hasLength(e)?0===e.length:!!i.hasSize(e)&&0===e.size}}},29500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(29129),i=r(13749);t.IsNotEmptyValidator=class IsNotEmptyValidator{isValid(e){return n.hasLength(e)?e.length>0:!!i.hasSize(e)&&e.size>0}}},80069:(e,t,r)=>{"use strict";function __export(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),__export(r(62493)),__export(r(83675)),__export(r(11908)),__export(r(29500)),__export(r(80072)),__export(r(11146)),__export(r(29798)),__export(r(62624))},54513:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsDefinedValidator=class IsDefinedValidator{isValid(e){return void 0!==e}}},29933:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(35140);t.IsEmptyValidator=class IsEmptyValidator{isValid(e){return""===e||null==e||this.isEmptyCollection(e)}isEmptyCollection(e){return!!n.isIterable(e)&&n.isIterableEmtpy(e)}}},80951:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsEqualValidator=class IsEqualValidator{constructor(e){this.comparison=e}isValid(e){return this.comparison===e}}},5261:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(30798);t.IsInValidator=class IsInValidator{constructor(e){this.obj=e}isValid(e){return n.isIterable(this.obj)?this.isElementOfIterable(e):this.isValueInObject(e)}isElementOfIterable(e){for(let t of this.obj)if(t===e)return!0;return!1}isValueInObject(e){return null!=Object.keys(this.obj).find((t=>this.obj[t]===e))}}},13329:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(67241);t.IsNotEmptyValidator=class IsNotEmptyValidator{constructor(){this.isEmptyValidator=new n.IsEmptyValidator}isValid(e){return!this.isEmptyValidator.isValid(e)}}},54231:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsNotEqualValidator=class IsNotEqualValidator{constructor(e){this.comparison=e}isValid(e){return this.comparison!==e}}},82495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(30798);t.IsNotInValidator=class IsNotInValidator{constructor(e){this.obj=e}isValid(e){return n.isIterable(this.obj)?this.isElementNotInIterable(e):this.isValueNotInObject(e)}isElementNotInIterable(e){for(let t of this.obj)if(t===e)return!1;return!0}isValueNotInObject(e){return null==Object.keys(this.obj).find((t=>this.obj[t]===e))}}},42093:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsNotNullValidator=class IsNotNullValidator{isValid(e){return null!=e}}},34980:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsNullValidator=class IsNullValidator{isValid(e){return null===e}}},2478:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsUndefinedValidator=class IsUndefinedValidator{isValid(e){return void 0===e}}},67241:(e,t,r)=>{"use strict";function __export(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),__export(r(54513)),__export(r(2478)),__export(r(34980)),__export(r(42093)),__export(r(29933)),__export(r(13329)),__export(r(80951)),__export(r(54231)),__export(r(5261)),__export(r(82495))},13987:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsAfterValidator=class IsAfterValidator{constructor(e){this.date=e}isValid(e){return!!e&&e.getTime()>this.date.getTime()}}},52772:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsBeforeValidator=class IsBeforeValidator{constructor(e){this.date=e}isValid(e){return!!e&&e.getTime()<this.date.getTime()}}},66849:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsBetweenValidator=class IsBetweenValidator{constructor(e,t,r="(",n=")"){this.lowerDate=e,this.upperDate=t,this.lowerBoundary=r,this.upperBoundary=n}isValid(e){return null!=e&&("["===this.lowerBoundary&&"]"===this.upperBoundary?this.lowerDate.getTime()<=e.getTime()&&e.getTime()<=this.upperDate.getTime():"["===this.lowerBoundary&&")"===this.upperBoundary?this.lowerDate.getTime()<=e.getTime()&&e.getTime()<this.upperDate.getTime():"("===this.lowerBoundary&&"]"===this.upperBoundary?this.lowerDate.getTime()<e.getTime()&&e.getTime()<=this.upperDate.getTime():this.lowerDate.getTime()<e.getTime()&&e.getTime()<this.upperDate.getTime())}}},83140:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsSameAsValidator=class IsSameAsValidator{constructor(e){this.date=e}isValid(e){return!!e&&e.getTime()===this.date.getTime()}}},61667:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsSameOrAfterValidator=class IsSameOrAfterValidator{constructor(e){this.date=e}isValid(e){return!!e&&e.getTime()>=this.date.getTime()}}},85929:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsSameOrBeforeValidator=class IsSameOrBeforeValidator{constructor(e){this.date=e}isValid(e){return!!e&&e.getTime()<=this.date.getTime()}}},31474:(e,t,r)=>{"use strict";function __export(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),__export(r(52772)),__export(r(13987)),__export(r(83140)),__export(r(85929)),__export(r(61667)),__export(r(66849))},18977:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsGreaterThanOrEqualToValidator=class IsGreaterThanOrEqualToValidator{constructor(e){this.threshold=e}isValid(e){return null!=e&&e>=this.threshold}}},57261:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsGreaterThanValidator=class IsGreaterThanValidator{constructor(e){this.threshold=e}isValid(e){return!!e&&e>this.threshold}}},83670:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsLessThanOrEqualToValidator=class IsLessThanOrEqualToValidator{constructor(e){this.threshold=e}isValid(e){return null!=e&&e<=this.threshold}}},42260:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsLessThanValidator=class IsLessThanValidator{constructor(e){this.threshold=e}isValid(e){return null!=e&&e<this.threshold}}},62216:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsNegativeValidator=class IsNegativeValidator{isValid(e){return!!e&&e<0}}},85100:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsPositiveValidator=class IsPositiveValidator{isValid(e){return!!e&&e>0}}},79157:(e,t,r)=>{"use strict";function __export(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),__export(r(85100)),__export(r(62216)),__export(r(57261)),__export(r(18977)),__export(r(42260)),__export(r(83670))},81751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.ContainsValidator=class ContainsValidator{constructor(e){this.seed=e}isValid(e){return!!e&&n.contains(e,this.seed)}}},3614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.HasLengthValidator=class HasLengthValidator{constructor(e){this.options=e}isValid(e){return null!=e&&n.isLength(e,this.options)}}},28463:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsAlphaValidator=class IsAlphaValidator{constructor(e){this.locale=e}isValid(e){return!!e&&n.isAlpha(e,this.locale)}}},62445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsAlphanumericValidator=class IsAlphanumericValidator{constructor(e){this.locale=e}isValid(e){return!!e&&n.isAlphanumeric(e,this.locale)}}},59655:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsAsciiValidator=class IsAsciiValidator{isValid(e){return!!e&&n.isAscii(e)}}},28458:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsBase64Validator=class IsBase64Validator{isValid(e){return!!e&&n.isBase64(e)}}},66410:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsBooleanStringValidator=class IsBooleanStringValidator{isValid(e){return!!e&&n.isBoolean(e)}}},25042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsCurrencyValidator=class IsCurrencyValidator{constructor(e){this.options=e}isValid(e){return!!e&&n.isCurrency(e,this.options)}}},56528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsDecimalStringValidator=class IsDecimalStringValidator{isValid(e){return!!e&&n.isDecimal(e)}}},7267:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsEmailValidator=class IsEmailValidator{constructor(e){this.options=e}isValid(e){return!!e&&n.isEmail(e,this.options)}}},46702:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsFqdnValidator=class IsFqdnValidator{constructor(e){this.options=e}isValid(e){return!!e&&n.isFQDN(e,this.options)}}},195:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsHexadecimalValidator=class IsHexadecimalValidator{isValid(e){return!!e&&n.isHexadecimal(e)}}},14700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsIso8601Validator=class IsIso8601Validator{isValid(e){return!!e&&n.isISO8601(e)}}},6149:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsJsonValidator=class IsJsonValidator{isValid(e){return!!e&&n.isJSON(e)}}},98199:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsLatLongValidator=class IsLatLongValidator{isValid(e){return!!e&&n.isLatLong(e)}}},61668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsLowercaseValidator=class IsLowercaseValidator{isValid(e){return null!=e&&n.isLowercase(e)}}},32601:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsMobilePhoneValidator=class IsMobilePhoneValidator{constructor(e){this.locale=e}isValid(e){return!!e&&n.isMobilePhone(e,this.locale)}}},89934:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsNumericStringValidator=class IsNumericStringValidator{isValid(e){return!!e&&n.isNumeric(e)}}},52696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsPostalCodeValidator=class IsPostalCodeValidator{constructor(e){this.locale=e}isValid(e){return!!e&&n.isPostalCode(e,this.locale)}}},96015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsUppercaseValidator=class IsUppercaseValidator{isValid(e){return null!=e&&n.isUppercase(e)}}},12804:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsUrlValidator=class IsUrlValidator{constructor(e){this.urlOptions=e}isValid(e){return!!e&&n.isURL(e,this.urlOptions)}}},5090:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.IsUuidValidator=class IsUuidValidator{constructor(e){this.version=e}isValid(e){return!!e&&n.isUUID(e,this.version)}}},49113:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(48966);t.RegExValidator=class RegExValidator{constructor(e,t){this.pattern=e,this.modifiers=t}isValid(e){return null!=e&&n.matches(e,this.pattern,this.modifiers)}}},89712:(e,t,r)=>{"use strict";function __export(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),__export(r(81751)),__export(r(62445)),__export(r(28463)),__export(r(59655)),__export(r(28458)),__export(r(66410)),__export(r(25042)),__export(r(56528)),__export(r(7267)),__export(r(46702)),__export(r(195)),__export(r(14700)),__export(r(6149)),__export(r(3614)),__export(r(61668)),__export(r(32601)),__export(r(89934)),__export(r(12804)),__export(r(96015)),__export(r(5090)),__export(r(49113)),__export(r(52696))},8393:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsArrayValidator=class IsArrayValidator{isValid(e){return e instanceof Array}}},74822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsBooleanValidator=class IsBooleanValidator{isValid(e){return e instanceof Boolean||"boolean"==typeof e}}},22165:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsDateValidator=class IsDateValidator{isValid(e){return e instanceof Date}}},6256:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsNumberValidator=class IsNumberValidator{isValid(e){return e instanceof Number||"number"==typeof e}}},48196:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IsStringValidator=class IsStringValidator{isValid(e){return e instanceof String||"string"==typeof e}}},98031:(e,t,r)=>{"use strict";function __export(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),__export(r(8393)),__export(r(74822)),__export(r(22165)),__export(r(6256)),__export(r(48196))},49461:e=>{"use strict";var t=e.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),_traverse(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function _traverse(e,r,n,i,a,o,s,c,l,u){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var d in r(i,a,o,s,c,l,u),i){var f=i[d];if(Array.isArray(f)){if(d in t.arrayKeywords)for(var p=0;p<f.length;p++)_traverse(e,r,n,f[p],a+"/"+d+"/"+p,o,a,d,i,p)}else if(d in t.propsKeywords){if(f&&"object"==typeof f)for(var h in f)_traverse(e,r,n,f[h],a+"/"+d+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),o,a,d,i,h)}else(d in t.keywords||e.allKeys&&!(d in t.skipKeywords))&&_traverse(e,r,n,f,a+"/"+d,o,a,d,i)}n(i,a,o,s,c,l,u)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},64530:(e,t)=>{function serializer(e,t){var r=[],n=[];return null==t&&(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]"}),function(i,a){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?n.splice(o,1/0,i):n.push(i),~r.indexOf(a)&&(a=t.call(this,i,a))}else r.push(a);return null==e?a:e.call(this,i,a)}}(e.exports=function stringify(e,t,r,n){return JSON.stringify(e,serializer(t,n),r)}).getSerialize=serializer},29208:e=>{var t="__lodash_hash_undefined__",r="[object Function]",n="[object GeneratorFunction]",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,o=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,l=/^\[object .+?Constructor\]$/,u="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,f=u||d||Function("return this")();var p,h=Array.prototype,m=Function.prototype,y=Object.prototype,g=f["__core-js_shared__"],v=(p=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",b=m.toString,R=y.hasOwnProperty,C=y.toString,w=RegExp("^"+b.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),I=f.Symbol,O=h.splice,S=getNative(f,"Map"),j=getNative(Object,"create"),T=I?I.prototype:void 0,P=T?T.toString:void 0;function Hash(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ListCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function MapCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}function baseGet(e,t){t=function isKey(e,t){if(x(e))return!1;var r=typeof e;if("number"==r||"symbol"==r||"boolean"==r||null==e||isSymbol(e))return!0;return a.test(e)||!i.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function castPath(e){return x(e)?e:D(e)}(t);for(var r=0,n=t.length;null!=e&&r<n;)e=e[toKey(t[r++])];return r&&r==n?e:void 0}function baseIsNative(e){if(!isObject(e)||function isMasked(e){return!!v&&v in e}(e))return!1;var t=function isFunction(e){var t=isObject(e)?C.call(e):"";return t==r||t==n}(e)||function isHostObject(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?w:l;return t.test(function toSource(e){if(null!=e){try{return b.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function getMapData(e,t){var r=e.__data__;return function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function getNative(e,t){var r=function getValue(e,t){return null==e?void 0:e[t]}(e,t);return baseIsNative(r)?r:void 0}Hash.prototype.clear=function hashClear(){this.__data__=j?j(null):{}},Hash.prototype.delete=function hashDelete(e){return this.has(e)&&delete this.__data__[e]},Hash.prototype.get=function hashGet(e){var r=this.__data__;if(j){var n=r[e];return n===t?void 0:n}return R.call(r,e)?r[e]:void 0},Hash.prototype.has=function hashHas(e){var t=this.__data__;return j?void 0!==t[e]:R.call(t,e)},Hash.prototype.set=function hashSet(e,r){return this.__data__[e]=j&&void 0===r?t:r,this},ListCache.prototype.clear=function listCacheClear(){this.__data__=[]},ListCache.prototype.delete=function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():O.call(t,r,1),!0)},ListCache.prototype.get=function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]},ListCache.prototype.has=function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1},ListCache.prototype.set=function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},MapCache.prototype.clear=function mapCacheClear(){this.__data__={hash:new Hash,map:new(S||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(e){return getMapData(this,e).delete(e)},MapCache.prototype.get=function mapCacheGet(e){return getMapData(this,e).get(e)},MapCache.prototype.has=function mapCacheHas(e){return getMapData(this,e).has(e)},MapCache.prototype.set=function mapCacheSet(e,t){return getMapData(this,e).set(e,t),this};var D=memoize((function(e){e=function toString(e){return null==e?"":function baseToString(e){if("string"==typeof e)return e;if(isSymbol(e))return P?P.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(e);var t=[];return o.test(e)&&t.push(""),e.replace(s,(function(e,r,n,i){t.push(n?i.replace(c,"$1"):r||e)})),t}));function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function memoize(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var memoized=function(){var r=arguments,n=t?t.apply(this,r):r[0],i=memoized.cache;if(i.has(n))return i.get(n);var a=e.apply(this,r);return memoized.cache=i.set(n,a),a};return memoized.cache=new(memoize.Cache||MapCache),memoized}function eq(e,t){return e===t||e!=e&&t!=t}memoize.Cache=MapCache;var x=Array.isArray;function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isSymbol(e){return"symbol"==typeof e||function isObjectLike(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==C.call(e)}e.exports=function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}},31468:e=>{var t="__lodash_hash_undefined__",r="[object Function]",n="[object GeneratorFunction]",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,o=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,l=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,d="object"==typeof global&&global&&global.Object===Object&&global,f="object"==typeof self&&self&&self.Object===Object&&self,p=d||f||Function("return this")();var h,m=Array.prototype,y=Function.prototype,g=Object.prototype,v=p["__core-js_shared__"],b=(h=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+h:"",R=y.toString,C=g.hasOwnProperty,w=g.toString,I=RegExp("^"+R.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=p.Symbol,S=m.splice,j=getNative(p,"Map"),T=getNative(Object,"create"),P=O?O.prototype:void 0,D=P?P.toString:void 0;function Hash(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ListCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function MapCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function assignValue(e,t,r){var n=e[t];C.call(e,t)&&eq(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}function baseIsNative(e){if(!isObject(e)||function isMasked(e){return!!b&&b in e}(e))return!1;var t=function isFunction(e){var t=isObject(e)?w.call(e):"";return t==r||t==n}(e)||function isHostObject(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?I:l;return t.test(function toSource(e){if(null!=e){try{return R.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function baseSet(e,t,r,n){if(!isObject(e))return e;t=function isKey(e,t){if(E(e))return!1;var r=typeof e;if("number"==r||"symbol"==r||"boolean"==r||null==e||isSymbol(e))return!0;return a.test(e)||!i.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function castPath(e){return E(e)?e:x(e)}(t);for(var o=-1,s=t.length,c=s-1,l=e;null!=l&&++o<s;){var u=toKey(t[o]),d=r;if(o!=c){var f=l[u];void 0===(d=n?n(f,u,l):void 0)&&(d=isObject(f)?f:isIndex(t[o+1])?[]:{})}assignValue(l,u,d),l=l[u]}return e}function getMapData(e,t){var r=e.__data__;return function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function getNative(e,t){var r=function getValue(e,t){return null==e?void 0:e[t]}(e,t);return baseIsNative(r)?r:void 0}function isIndex(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||u.test(e))&&e>-1&&e%1==0&&e<t}Hash.prototype.clear=function hashClear(){this.__data__=T?T(null):{}},Hash.prototype.delete=function hashDelete(e){return this.has(e)&&delete this.__data__[e]},Hash.prototype.get=function hashGet(e){var r=this.__data__;if(T){var n=r[e];return n===t?void 0:n}return C.call(r,e)?r[e]:void 0},Hash.prototype.has=function hashHas(e){var t=this.__data__;return T?void 0!==t[e]:C.call(t,e)},Hash.prototype.set=function hashSet(e,r){return this.__data__[e]=T&&void 0===r?t:r,this},ListCache.prototype.clear=function listCacheClear(){this.__data__=[]},ListCache.prototype.delete=function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():S.call(t,r,1),!0)},ListCache.prototype.get=function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]},ListCache.prototype.has=function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1},ListCache.prototype.set=function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},MapCache.prototype.clear=function mapCacheClear(){this.__data__={hash:new Hash,map:new(j||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(e){return getMapData(this,e).delete(e)},MapCache.prototype.get=function mapCacheGet(e){return getMapData(this,e).get(e)},MapCache.prototype.has=function mapCacheHas(e){return getMapData(this,e).has(e)},MapCache.prototype.set=function mapCacheSet(e,t){return getMapData(this,e).set(e,t),this};var x=memoize((function(e){e=function toString(e){return null==e?"":function baseToString(e){if("string"==typeof e)return e;if(isSymbol(e))return D?D.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(e);var t=[];return o.test(e)&&t.push(""),e.replace(s,(function(e,r,n,i){t.push(n?i.replace(c,"$1"):r||e)})),t}));function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function memoize(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var memoized=function(){var r=arguments,n=t?t.apply(this,r):r[0],i=memoized.cache;if(i.has(n))return i.get(n);var a=e.apply(this,r);return memoized.cache=i.set(n,a),a};return memoized.cache=new(memoize.Cache||MapCache),memoized}function eq(e,t){return e===t||e!=e&&t!=t}memoize.Cache=MapCache;var E=Array.isArray;function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isSymbol(e){return"symbol"==typeof e||function isObjectLike(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function set(e,t,r){return null==e?e:baseSet(e,t,r)}},99490:(e,t)=>{"use strict";function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_extends.apply(this,arguments)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_setPrototypeOf(e,t)}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _construct(e,t,r){return _construct=_isNativeReflectConstruct()?Reflect.construct:function _construct(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&_setPrototypeOf(i,r.prototype),i},_construct.apply(null,arguments)}function _wrapNativeSuper(e){var t="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function _wrapNativeSuper(e){if(null===e||!function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,Wrapper)}function Wrapper(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,e)},_wrapNativeSuper(e)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _createForOfIteratorHelperLoose(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function LuxonError(){return e.apply(this,arguments)||this}return _inheritsLoose(LuxonError,e),LuxonError}(_wrapNativeSuper(Error)),n=function(e){function InvalidDateTimeError(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return _inheritsLoose(InvalidDateTimeError,e),InvalidDateTimeError}(r),i=function(e){function InvalidIntervalError(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return _inheritsLoose(InvalidIntervalError,e),InvalidIntervalError}(r),a=function(e){function InvalidDurationError(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return _inheritsLoose(InvalidDurationError,e),InvalidDurationError}(r),o=function(e){function ConflictingSpecificationError(){return e.apply(this,arguments)||this}return _inheritsLoose(ConflictingSpecificationError,e),ConflictingSpecificationError}(r),s=function(e){function InvalidUnitError(t){return e.call(this,"Invalid unit "+t)||this}return _inheritsLoose(InvalidUnitError,e),InvalidUnitError}(r),c=function(e){function InvalidArgumentError(){return e.apply(this,arguments)||this}return _inheritsLoose(InvalidArgumentError,e),InvalidArgumentError}(r),l=function(e){function ZoneIsAbstractError(){return e.call(this,"Zone is an abstract class")||this}return _inheritsLoose(ZoneIsAbstractError,e),ZoneIsAbstractError}(r),u="numeric",d="short",f="long",p={year:u,month:u,day:u},h={year:u,month:d,day:u},m={year:u,month:d,day:u,weekday:d},y={year:u,month:f,day:u},g={year:u,month:f,day:u,weekday:f},v={hour:u,minute:u},b={hour:u,minute:u,second:u},R={hour:u,minute:u,second:u,timeZoneName:d},C={hour:u,minute:u,second:u,timeZoneName:f},w={hour:u,minute:u,hourCycle:"h23"},I={hour:u,minute:u,second:u,hourCycle:"h23"},O={hour:u,minute:u,second:u,hourCycle:"h23",timeZoneName:d},S={hour:u,minute:u,second:u,hourCycle:"h23",timeZoneName:f},j={year:u,month:u,day:u,hour:u,minute:u},T={year:u,month:u,day:u,hour:u,minute:u,second:u},P={year:u,month:d,day:u,hour:u,minute:u},D={year:u,month:d,day:u,hour:u,minute:u,second:u},x={year:u,month:d,day:u,weekday:d,hour:u,minute:u},E={year:u,month:f,day:u,hour:u,minute:u,timeZoneName:d},$={year:u,month:f,day:u,hour:u,minute:u,second:u,timeZoneName:d},M={year:u,month:f,day:u,weekday:f,hour:u,minute:u,timeZoneName:f},A={year:u,month:f,day:u,weekday:f,hour:u,minute:u,second:u,timeZoneName:f};function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e}function isInteger(e){return"number"==typeof e&&e%1==0}function hasRelative(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function bestBy(e,t,r){if(0!==e.length)return e.reduce((function(e,n){var i=[t(n),n];return e&&r(e[0],i[0])===e[0]?e:i}),null)[1]}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function integerBetween(e,t,r){return isInteger(e)&&e>=t&&e<=r}function padStart(e,t){return void 0===t&&(t=2),e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0")}function parseInteger(e){return isUndefined(e)||null===e||""===e?void 0:parseInt(e,10)}function parseFloating(e){return isUndefined(e)||null===e||""===e?void 0:parseFloat(e)}function parseMillis(e){if(!isUndefined(e)&&null!==e&&""!==e){var t=1e3*parseFloat("0."+e);return Math.floor(t)}}function roundTo(e,t,r){void 0===r&&(r=!1);var n=Math.pow(10,t);return(r?Math.trunc:Math.round)(e*n)/n}function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){var r=function floorMod(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===r?isLeapYear(e+(t-r)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function objToLocalTS(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function weeksInWeekYear(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,r=e-1,n=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return 4===t||3===n?53:52}function untruncateYear(e){return e>99?e:e>60?1900+e:2e3+e}function parseZoneInfo(e,t,r,n){void 0===n&&(n=null);var i=new Date(e),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(a.timeZone=n);var o=_extends({timeZoneName:t},a),s=new Intl.DateTimeFormat(r,o).formatToParts(i).find((function(e){return"timezonename"===e.type.toLowerCase()}));return s?s.value:null}function signedOffset(e,t){var r=parseInt(e,10);Number.isNaN(r)&&(r=0);var n=parseInt(t,10)||0;return 60*r+(r<0||Object.is(r,-0)?-n:n)}function asNumber(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new c("Invalid unit value "+e);return t}function normalizeObject(e,t){var r={};for(var n in e)if(hasOwnProperty(e,n)){var i=e[n];if(null==i)continue;r[t(n)]=asNumber(i)}return r}function formatOffset(e,t){var r=Math.trunc(Math.abs(e/60)),n=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return""+i+padStart(r,2)+":"+padStart(n,2);case"narrow":return""+i+r+(n>0?":"+n:"");case"techie":return""+i+padStart(r,2)+padStart(n,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function timeObject(e){return function pick(e,t){return t.reduce((function(t,r){return t[r]=e[r],t}),{})}(e,["hour","minute","second","millisecond"])}var k=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z0-9_+-]{1,256}(\/[A-Za-z0-9_+-]{1,256})?)?/,N=["January","February","March","April","May","June","July","August","September","October","November","December"],q=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],V=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(e){switch(e){case"narrow":return[].concat(V);case"short":return[].concat(q);case"long":return[].concat(N);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var F=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],U=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],B=["M","T","W","T","F","S","S"];function weekdays(e){switch(e){case"narrow":return[].concat(B);case"short":return[].concat(U);case"long":return[].concat(F);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var L=["AM","PM"],G=["Before Christ","Anno Domini"],z=["BC","AD"],K=["B","A"];function eras(e){switch(e){case"narrow":return[].concat(K);case"short":return[].concat(z);case"long":return[].concat(G);default:return null}}function stringifyTokens(e,t){for(var r,n="",i=_createForOfIteratorHelperLoose(e);!(r=i()).done;){var a=r.value;a.literal?n+=a.val:n+=t(a.val)}return n}var H={D:p,DD:h,DDD:y,DDDD:g,t:v,tt:b,ttt:R,tttt:C,T:w,TT:I,TTT:O,TTTT:S,f:j,ff:P,fff:E,ffff:M,F:T,FF:D,FFF:$,FFFF:A},Z=function(){function Formatter(e,t){this.opts=t,this.loc=e,this.systemLoc=null}Formatter.create=function create(e,t){return void 0===t&&(t={}),new Formatter(e,t)},Formatter.parseFormat=function parseFormat(e){for(var t=null,r="",n=!1,i=[],a=0;a<e.length;a++){var o=e.charAt(a);"'"===o?(r.length>0&&i.push({literal:n,val:r}),t=null,r="",n=!n):n||o===t?r+=o:(r.length>0&&i.push({literal:!1,val:r}),r=o,t=o)}return r.length>0&&i.push({literal:n,val:r}),i},Formatter.macroTokenToFormatOpts=function macroTokenToFormatOpts(e){return H[e]};var e=Formatter.prototype;return e.formatWithSystemDefault=function formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,_extends({},this.opts,t)).format()},e.formatDateTime=function formatDateTime(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,_extends({},this.opts,t)).format()},e.formatDateTimeParts=function formatDateTimeParts(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,_extends({},this.opts,t)).formatToParts()},e.resolvedOptions=function resolvedOptions(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,_extends({},this.opts,t)).resolvedOptions()},e.num=function num(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return padStart(e,t);var r=_extends({},this.opts);return t>0&&(r.padTo=t),this.loc.numberFormatter(r).format(e)},e.formatDateTimeFromString=function formatDateTimeFromString(e,t){var r=this,n="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,a=function string(t,n){return r.loc.extract(e,t,n)},o=function formatOffset(t){return e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):""},s=function meridiem(){return n?function meridiemForDateTime(e){return L[e.hour<12?0:1]}(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod")},c=function month(t,r){return n?function monthForDateTime(e,t){return months(t)[e.month-1]}(e,t):a(r?{month:t}:{month:t,day:"numeric"},"month")},l=function weekday(t,r){return n?function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}(e,t):a(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday")},u=function era(t){return n?function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}(e,t):a({era:t},"era")};return stringifyTokens(Formatter.parseFormat(t),(function tokenToString(t){switch(t){case"S":return r.num(e.millisecond);case"u":case"SSS":return r.num(e.millisecond,3);case"s":return r.num(e.second);case"ss":return r.num(e.second,2);case"uu":return r.num(Math.floor(e.millisecond/10),2);case"uuu":return r.num(Math.floor(e.millisecond/100));case"m":return r.num(e.minute);case"mm":return r.num(e.minute,2);case"h":return r.num(e.hour%12==0?12:e.hour%12);case"hh":return r.num(e.hour%12==0?12:e.hour%12,2);case"H":return r.num(e.hour);case"HH":return r.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return o({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:r.loc.locale});case"z":return e.zoneName;case"a":return s();case"d":return i?a({day:"numeric"},"day"):r.num(e.day);case"dd":return i?a({day:"2-digit"},"day"):r.num(e.day,2);case"c":case"E":return r.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return i?a({month:"numeric",day:"numeric"},"month"):r.num(e.month);case"LL":return i?a({month:"2-digit",day:"numeric"},"month"):r.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return i?a({month:"numeric"},"month"):r.num(e.month);case"MM":return i?a({month:"2-digit"},"month"):r.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return i?a({year:"numeric"},"year"):r.num(e.year);case"yy":return i?a({year:"2-digit"},"year"):r.num(e.year.toString().slice(-2),2);case"yyyy":return i?a({year:"numeric"},"year"):r.num(e.year,4);case"yyyyyy":return i?a({year:"numeric"},"year"):r.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return r.num(e.weekYear.toString().slice(-2),2);case"kkkk":return r.num(e.weekYear,4);case"W":return r.num(e.weekNumber);case"WW":return r.num(e.weekNumber,2);case"o":return r.num(e.ordinal);case"ooo":return r.num(e.ordinal,3);case"q":return r.num(e.quarter);case"qq":return r.num(e.quarter,2);case"X":return r.num(Math.floor(e.ts/1e3));case"x":return r.num(e.ts);default:return function maybeMacro(t){var n=Formatter.macroTokenToFormatOpts(t);return n?r.formatWithSystemDefault(e,n):t}(t)}}))},e.formatDurationFromString=function formatDurationFromString(e,t){var r=this,n=function tokenToField(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},i=Formatter.parseFormat(t),a=i.reduce((function(e,t){var r=t.literal,n=t.val;return r?e:e.concat(n)}),[]);return stringifyTokens(i,function tokenToString(e){return function(t){var i=n(t);return i?r.num(e.get(i),t.length):t}}(e.shiftTo.apply(e,a.map(n).filter((function(e){return e})))))},Formatter}(),W=function(){function Invalid(e,t){this.reason=e,this.explanation=t}return Invalid.prototype.toMessage=function toMessage(){return this.explanation?this.reason+": "+this.explanation:this.reason},Invalid}(),J=function(){function Zone(){}var e=Zone.prototype;return e.offsetName=function offsetName(e,t){throw new l},e.formatOffset=function formatOffset(e,t){throw new l},e.offset=function offset(e){throw new l},e.equals=function equals(e){throw new l},_createClass(Zone,[{key:"type",get:function get(){throw new l}},{key:"name",get:function get(){throw new l}},{key:"isUniversal",get:function get(){throw new l}},{key:"isValid",get:function get(){throw new l}}]),Zone}(),Q=null,Y=function(e){function SystemZone(){return e.apply(this,arguments)||this}_inheritsLoose(SystemZone,e);var t=SystemZone.prototype;return t.offsetName=function offsetName(e,t){return parseZoneInfo(e,t.format,t.locale)},t.formatOffset=function formatOffset$1(e,t){return formatOffset(this.offset(e),t)},t.offset=function offset(e){return-new Date(e).getTimezoneOffset()},t.equals=function equals(e){return"system"===e.type},_createClass(SystemZone,[{key:"type",get:function get(){return"system"}},{key:"name",get:function get(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}},{key:"isUniversal",get:function get(){return!1}},{key:"isValid",get:function get(){return!0}}],[{key:"instance",get:function get(){return null===Q&&(Q=new SystemZone),Q}}]),SystemZone}(J),X=RegExp("^"+k.source+"$"),ee={};var te={year:0,month:1,day:2,hour:3,minute:4,second:5};var re={},ne=function(e){function IANAZone(t){var r;return(r=e.call(this)||this).zoneName=t,r.valid=IANAZone.isValidZone(t),r}_inheritsLoose(IANAZone,e),IANAZone.create=function create(e){return re[e]||(re[e]=new IANAZone(e)),re[e]},IANAZone.resetCache=function resetCache(){re={},ee={}},IANAZone.isValidSpecifier=function isValidSpecifier(e){return!(!e||!e.match(X))},IANAZone.isValidZone=function isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}};var t=IANAZone.prototype;return t.offsetName=function offsetName(e,t){return parseZoneInfo(e,t.format,t.locale,this.name)},t.formatOffset=function formatOffset$1(e,t){return formatOffset(this.offset(e),t)},t.offset=function offset(e){var t=new Date(e);if(isNaN(t))return NaN;var r=function makeDTF(e){return ee[e]||(ee[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),ee[e]}(this.name),n=r.formatToParts?function partsOffset(e,t){for(var r=e.formatToParts(t),n=[],i=0;i<r.length;i++){var a=r[i],o=a.type,s=a.value,c=te[o];isUndefined(c)||(n[c]=parseInt(s,10))}return n}(r,t):function hackyOffset(e,t){var r=e.format(t).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(r),i=n[1],a=n[2];return[n[3],i,a,n[4],n[5],n[6]]}(r,t),i=n[0],a=n[1],o=n[2],s=n[3],c=+t,l=c%1e3;return(objToLocalTS({year:i,month:a,day:o,hour:24===s?0:s,minute:n[4],second:n[5],millisecond:0})-(c-=l>=0?l:1e3+l))/6e4},t.equals=function equals(e){return"iana"===e.type&&e.name===this.name},_createClass(IANAZone,[{key:"type",get:function get(){return"iana"}},{key:"name",get:function get(){return this.zoneName}},{key:"isUniversal",get:function get(){return!1}},{key:"isValid",get:function get(){return this.valid}}]),IANAZone}(J),ie=null,ae=function(e){function FixedOffsetZone(t){var r;return(r=e.call(this)||this).fixed=t,r}_inheritsLoose(FixedOffsetZone,e),FixedOffsetZone.instance=function instance(e){return 0===e?FixedOffsetZone.utcInstance:new FixedOffsetZone(e)},FixedOffsetZone.parseSpecifier=function parseSpecifier(e){if(e){var t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new FixedOffsetZone(signedOffset(t[1],t[2]))}return null};var t=FixedOffsetZone.prototype;return t.offsetName=function offsetName(){return this.name},t.formatOffset=function formatOffset$1(e,t){return formatOffset(this.fixed,t)},t.offset=function offset(){return this.fixed},t.equals=function equals(e){return"fixed"===e.type&&e.fixed===this.fixed},_createClass(FixedOffsetZone,[{key:"type",get:function get(){return"fixed"}},{key:"name",get:function get(){return 0===this.fixed?"UTC":"UTC"+formatOffset(this.fixed,"narrow")}},{key:"isUniversal",get:function get(){return!0}},{key:"isValid",get:function get(){return!0}}],[{key:"utcInstance",get:function get(){return null===ie&&(ie=new FixedOffsetZone(0)),ie}}]),FixedOffsetZone}(J),oe=function(e){function InvalidZone(t){var r;return(r=e.call(this)||this).zoneName=t,r}_inheritsLoose(InvalidZone,e);var t=InvalidZone.prototype;return t.offsetName=function offsetName(){return null},t.formatOffset=function formatOffset(){return""},t.offset=function offset(){return NaN},t.equals=function equals(){return!1},_createClass(InvalidZone,[{key:"type",get:function get(){return"invalid"}},{key:"name",get:function get(){return this.zoneName}},{key:"isUniversal",get:function get(){return!1}},{key:"isValid",get:function get(){return!1}}]),InvalidZone}(J);function normalizeZone(e,t){if(isUndefined(e)||null===e)return t;if(e instanceof J)return e;if(function isString(e){return"string"==typeof e}(e)){var r=e.toLowerCase();return"local"===r||"system"===r?t:"utc"===r||"gmt"===r?ae.utcInstance:ne.isValidSpecifier(r)?ne.create(e):ae.parseSpecifier(r)||new oe(e)}return isNumber(e)?ae.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new oe(e)}var se,ce=function now(){return Date.now()},le="system",ue=null,de=null,fe=null,pe=function(){function Settings(){}return Settings.resetCaches=function resetCaches(){Ie.resetCache(),ne.resetCache()},_createClass(Settings,null,[{key:"now",get:function get(){return ce},set:function set(e){ce=e}},{key:"defaultZone",get:function get(){return normalizeZone(le,Y.instance)},set:function set(e){le=e}},{key:"defaultLocale",get:function get(){return ue},set:function set(e){ue=e}},{key:"defaultNumberingSystem",get:function get(){return de},set:function set(e){de=e}},{key:"defaultOutputCalendar",get:function get(){return fe},set:function set(e){fe=e}},{key:"throwOnInvalid",get:function get(){return se},set:function set(e){se=e}}]),Settings}(),he=["base"],me=["padTo","floor"],ye={};var ge={};function getCachedDTF(e,t){void 0===t&&(t={});var r=JSON.stringify([e,t]),n=ge[r];return n||(n=new Intl.DateTimeFormat(e,t),ge[r]=n),n}var ve={};var _e={};var be=null;function listStuff(e,t,r,n,i){var a=e.listingMode(r);return"error"===a?null:"en"===a?n(t):i(t)}var Re=function(){function PolyNumberFormatter(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1,r.padTo,r.floor;var n=_objectWithoutPropertiesLoose(r,me);if(!t||Object.keys(n).length>0){var i=_extends({useGrouping:!1},r);r.padTo>0&&(i.minimumIntegerDigits=r.padTo),this.inf=function getCachedINF(e,t){void 0===t&&(t={});var r=JSON.stringify([e,t]),n=ve[r];return n||(n=new Intl.NumberFormat(e,t),ve[r]=n),n}(e,i)}}return PolyNumberFormatter.prototype.format=function format(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return padStart(this.floor?Math.floor(e):roundTo(e,3),this.padTo)},PolyNumberFormatter}(),Ce=function(){function PolyDateFormatter(e,t,r){var n;if(this.opts=r,e.zone.isUniversal){var i=e.offset/60*-1,a=i>=0?"Etc/GMT+"+i:"Etc/GMT"+i;0!==e.offset&&ne.create(a).valid?(n=a,this.dt=e):(n="UTC",r.timeZoneName?this.dt=e:this.dt=0===e.offset?e:jt.fromMillis(e.ts+60*e.offset*1e3))}else"system"===e.zone.type?this.dt=e:(this.dt=e,n=e.zone.name);var o=_extends({},this.opts);n&&(o.timeZone=n),this.dtf=getCachedDTF(t,o)}var e=PolyDateFormatter.prototype;return e.format=function format(){return this.dtf.format(this.dt.toJSDate())},e.formatToParts=function formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())},e.resolvedOptions=function resolvedOptions(){return this.dtf.resolvedOptions()},PolyDateFormatter}(),we=function(){function PolyRelFormatter(e,t,r){this.opts=_extends({style:"long"},r),!t&&hasRelative()&&(this.rtf=function getCachedRTF(e,t){void 0===t&&(t={});var r=t;r.base;var n=_objectWithoutPropertiesLoose(r,he),i=JSON.stringify([e,n]),a=_e[i];return a||(a=new Intl.RelativeTimeFormat(e,t),_e[i]=a),a}(e,r))}var e=PolyRelFormatter.prototype;return e.format=function format(e,t){return this.rtf?this.rtf.format(e,t):function formatRelativeTime(e,t,r,n){void 0===r&&(r="always"),void 0===n&&(n=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===r&&a){var o="days"===e;switch(t){case 1:return o?"tomorrow":"next "+i[e][0];case-1:return o?"yesterday":"last "+i[e][0];case 0:return o?"today":"this "+i[e][0]}}var s=Object.is(t,-0)||t<0,c=Math.abs(t),l=1===c,u=i[e],d=n?l?u[1]:u[2]||u[1]:l?i[e][0]:e;return s?c+" "+d+" ago":"in "+c+" "+d}(t,e,this.opts.numeric,"long"!==this.opts.style)},e.formatToParts=function formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},PolyRelFormatter}(),Ie=function(){function Locale(e,t,r,n){var i=function parseLocaleString(e){var t=e.indexOf("-u-");if(-1===t)return[e];var r,n=e.substring(0,t);try{r=getCachedDTF(e).resolvedOptions()}catch(e){r=getCachedDTF(n).resolvedOptions()}var i=r;return[n,i.numberingSystem,i.calendar]}(e),a=i[0],o=i[1],s=i[2];this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=r||s||null,this.intl=function intlConfigString(e,t,r){return r||t?(e+="-u",r&&(e+="-ca-"+r),t&&(e+="-nu-"+t),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}Locale.fromOpts=function fromOpts(e){return Locale.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},Locale.create=function create(e,t,r,n){void 0===n&&(n=!1);var i=e||pe.defaultLocale;return new Locale(i||(n?"en-US":function systemLocale(){return be||(be=(new Intl.DateTimeFormat).resolvedOptions().locale)}()),t||pe.defaultNumberingSystem,r||pe.defaultOutputCalendar,i)},Locale.resetCache=function resetCache(){be=null,ge={},ve={},_e={}},Locale.fromObject=function fromObject(e){var t=void 0===e?{}:e,r=t.locale,n=t.numberingSystem,i=t.outputCalendar;return Locale.create(r,n,i)};var e=Locale.prototype;return e.listingMode=function listingMode(){var e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"},e.clone=function clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?Locale.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function redefaultToEN(e){return void 0===e&&(e={}),this.clone(_extends({},e,{defaultToEN:!0}))},e.redefaultToSystem=function redefaultToSystem(e){return void 0===e&&(e={}),this.clone(_extends({},e,{defaultToEN:!1}))},e.months=function months$1(e,t,r){var n=this;return void 0===t&&(t=!1),void 0===r&&(r=!0),listStuff(this,e,r,months,(function(){var r=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return n.monthsCache[i][e]||(n.monthsCache[i][e]=function mapMonths(e){for(var t=[],r=1;r<=12;r++){var n=jt.utc(2016,r,1);t.push(e(n))}return t}((function(e){return n.extract(e,r,"month")}))),n.monthsCache[i][e]}))},e.weekdays=function weekdays$1(e,t,r){var n=this;return void 0===t&&(t=!1),void 0===r&&(r=!0),listStuff(this,e,r,weekdays,(function(){var r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return n.weekdaysCache[i][e]||(n.weekdaysCache[i][e]=function mapWeekdays(e){for(var t=[],r=1;r<=7;r++){var n=jt.utc(2016,11,13+r);t.push(e(n))}return t}((function(e){return n.extract(e,r,"weekday")}))),n.weekdaysCache[i][e]}))},e.meridiems=function meridiems$1(e){var t=this;return void 0===e&&(e=!0),listStuff(this,void 0,e,(function(){return L}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hourCycle:"h12"};t.meridiemCache=[jt.utc(2016,11,13,9),jt.utc(2016,11,13,19)].map((function(r){return t.extract(r,e,"dayperiod")}))}return t.meridiemCache}))},e.eras=function eras$1(e,t){var r=this;return void 0===t&&(t=!0),listStuff(this,e,t,eras,(function(){var t={era:e};return r.eraCache[e]||(r.eraCache[e]=[jt.utc(-40,1,1),jt.utc(2017,1,1)].map((function(e){return r.extract(e,t,"era")}))),r.eraCache[e]}))},e.extract=function extract(e,t,r){var n=this.dtFormatter(e,t).formatToParts().find((function(e){return e.type.toLowerCase()===r}));return n?n.value:null},e.numberFormatter=function numberFormatter(e){return void 0===e&&(e={}),new Re(this.intl,e.forceSimple||this.fastNumbers,e)},e.dtFormatter=function dtFormatter(e,t){return void 0===t&&(t={}),new Ce(e,this.intl,t)},e.relFormatter=function relFormatter(e){return void 0===e&&(e={}),new we(this.intl,this.isEnglish(),e)},e.listFormatter=function listFormatter(e){return void 0===e&&(e={}),function getCachedLF(e,t){void 0===t&&(t={});var r=JSON.stringify([e,t]),n=ye[r];return n||(n=new Intl.ListFormat(e,t),ye[r]=n),n}(this.intl,e)},e.isEnglish=function isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},_createClass(Locale,[{key:"fastNumbers",get:function get(){return null==this.fastNumbersCached&&(this.fastNumbersCached=function supportsFastNumbers(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}(this)),this.fastNumbersCached}}]),Locale}();function combineRegexes(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.reduce((function(e,t){return e+t.source}),"");return RegExp("^"+n+"$")}function combineExtractors(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduce((function(t,r){var n=t[0],i=t[1],a=t[2],o=r(e,a),s=o[0],c=o[1],l=o[2];return[_extends({},n,s),i||c,l]}),[{},null,1]).slice(0,2)}}function parse(e){if(null==e)return[null,null];for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(var i=0,a=r;i<a.length;i++){var o=a[i],s=o[0],c=o[1],l=s.exec(e);if(l)return c(l)}return[null,null]}function simpleParse(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,r){var n,i={};for(n=0;n<t.length;n++)i[t[n]]=parseInteger(e[r+n]);return[i,null,r+n]}}var Oe=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Se=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,je=RegExp(""+Se.source+Oe.source+"?"),Te=RegExp("(?:T"+je.source+")?"),Pe=simpleParse("weekYear","weekNumber","weekDay"),De=simpleParse("year","ordinal"),xe=RegExp(Se.source+" ?(?:"+Oe.source+"|("+k.source+"))?"),Ee=RegExp("(?: "+xe.source+")?");function int(e,t,r){var n=e[t];return isUndefined(n)?r:parseInteger(n)}function extractISOYmd(e,t){return[{year:int(e,t),month:int(e,t+1,1),day:int(e,t+2,1)},null,t+3]}function extractISOTime(e,t){return[{hours:int(e,t,0),minutes:int(e,t+1,0),seconds:int(e,t+2,0),milliseconds:parseMillis(e[t+3])},null,t+4]}function extractISOOffset(e,t){var r=!e[t]&&!e[t+1],n=signedOffset(e[t+1],e[t+2]);return[{},r?null:ae.instance(n),t+3]}function extractIANAZone(e,t){return[{},e[t]?ne.create(e[t]):null,t+1]}var $e=RegExp("^T?"+Se.source+"$"),Me=/^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function extractISODuration(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u="-"===t[0],d=c&&"-"===c[0],f=function maybeNegate(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&u)?-e:e};return[{years:f(parseFloating(r)),months:f(parseFloating(n)),weeks:f(parseFloating(i)),days:f(parseFloating(a)),hours:f(parseFloating(o)),minutes:f(parseFloating(s)),seconds:f(parseFloating(c),"-0"===c),milliseconds:f(parseMillis(l),d)}]}var Ae={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(e,t,r,n,i,a,o){var s={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:q.indexOf(r)+1,day:parseInteger(n),hour:parseInteger(i),minute:parseInteger(a)};return o&&(s.second=parseInteger(o)),e&&(s.weekday=e.length>3?F.indexOf(e)+1:U.indexOf(e)+1),s}var ke=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(e){var t,r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=e[9],d=e[10],f=e[11],p=fromStrings(r,a,i,n,o,s,c);return t=l?Ae[l]:u?0:signedOffset(d,f),[p,new ae(t)]}var Ne=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,qe=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ve=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){var t=e[1],r=e[2],n=e[3];return[fromStrings(t,e[4],n,r,e[5],e[6],e[7]),ae.utcInstance]}function extractASCII(e){var t=e[1],r=e[2],n=e[3],i=e[4],a=e[5],o=e[6];return[fromStrings(t,e[7],r,n,i,a,o),ae.utcInstance]}var Fe=combineRegexes(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Te),Ue=combineRegexes(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Te),Be=combineRegexes(/(\d{4})-?(\d{3})/,Te),Le=combineRegexes(je),Ge=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset),ze=combineExtractors(Pe,extractISOTime,extractISOOffset),Ke=combineExtractors(De,extractISOTime,extractISOOffset),He=combineExtractors(extractISOTime,extractISOOffset);var Ze=combineExtractors(extractISOTime);var We=combineRegexes(/(\d{4})-(\d\d)-(\d\d)/,Ee),Je=combineRegexes(xe),Qe=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone),Ye=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);var Xe={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},et=_extends({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},Xe),tt=365.2425,rt=30.436875,nt=_extends({years:{quarters:4,months:12,weeks:52.1775,days:tt,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:rt,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},Xe),it=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],at=it.slice(0).reverse();function clone$1(e,t,r){void 0===r&&(r=!1);var n={values:r?t.values:_extends({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new ot(n)}function convert(e,t,r,n,i){var a=e[i][r],o=t[r]/a,s=!(Math.sign(o)===Math.sign(n[i]))&&0!==n[i]&&Math.abs(o)<=1?function antiTrunc(e){return e<0?Math.floor(e):Math.ceil(e)}(o):Math.trunc(o);n[i]+=s,t[r]-=s*a}var ot=function(){function Duration(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||Ie.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?nt:et,this.isLuxonDuration=!0}Duration.fromMillis=function fromMillis(e,t){return Duration.fromObject({milliseconds:e},t)},Duration.fromObject=function fromObject(e,t){if(void 0===t&&(t={}),null==e||"object"!=typeof e)throw new c("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Duration({values:normalizeObject(e,Duration.normalizeUnit),loc:Ie.fromObject(t),conversionAccuracy:t.conversionAccuracy})},Duration.fromDurationLike=function fromDurationLike(e){if(isNumber(e))return Duration.fromMillis(e);if(Duration.isDuration(e))return e;if("object"==typeof e)return Duration.fromObject(e);throw new c("Unknown duration argument "+e+" of type "+typeof e)},Duration.fromISO=function fromISO(e,t){var r=function parseISODuration(e){return parse(e,[Me,extractISODuration])}(e),n=r[0];return n?Duration.fromObject(n,t):Duration.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},Duration.fromISOTime=function fromISOTime(e,t){var r=function parseISOTimeOnly(e){return parse(e,[$e,Ze])}(e),n=r[0];return n?Duration.fromObject(n,t):Duration.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},Duration.invalid=function invalid(e,t){if(void 0===t&&(t=null),!e)throw new c("need to specify a reason the Duration is invalid");var invalid=e instanceof W?e:new W(e,t);if(pe.throwOnInvalid)throw new a(invalid);return new Duration({invalid})},Duration.normalizeUnit=function normalizeUnit(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new s(e);return t},Duration.isDuration=function isDuration(e){return e&&e.isLuxonDuration||!1};var e=Duration.prototype;return e.toFormat=function toFormat(e,t){void 0===t&&(t={});var r=_extends({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Z.create(this.loc,r).formatDurationFromString(this,e):"Invalid Duration"},e.toHuman=function toHuman(e){var t=this;void 0===e&&(e={});var r=it.map((function(r){var n=t.values[r];return isUndefined(n)?null:t.loc.numberFormatter(_extends({style:"unit",unitDisplay:"long"},e,{unit:r.slice(0,-1)})).format(n)})).filter((function(e){return e}));return this.loc.listFormatter(_extends({type:"conjunction",style:e.listStyle||"narrow"},e)).format(r)},e.toObject=function toObject(){return this.isValid?_extends({},this.values):{}},e.toISO=function toISO(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},e.toISOTime=function toISOTime(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||t>=864e5)return null;e=_extends({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var r=this.shiftTo("hours","minutes","seconds","milliseconds"),n="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===r.seconds&&0===r.milliseconds||(n+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===r.milliseconds||(n+=".SSS"));var i=r.toFormat(n);return e.includePrefix&&(i="T"+i),i},e.toJSON=function toJSON(){return this.toISO()},e.toString=function toString(){return this.toISO()},e.toMillis=function toMillis(){return this.as("milliseconds")},e.valueOf=function valueOf(){return this.toMillis()},e.plus=function plus(e){if(!this.isValid)return this;for(var t,r=Duration.fromDurationLike(e),n={},i=_createForOfIteratorHelperLoose(it);!(t=i()).done;){var a=t.value;(hasOwnProperty(r.values,a)||hasOwnProperty(this.values,a))&&(n[a]=r.get(a)+this.get(a))}return clone$1(this,{values:n},!0)},e.minus=function minus(e){if(!this.isValid)return this;var t=Duration.fromDurationLike(e);return this.plus(t.negate())},e.mapUnits=function mapUnits(e){if(!this.isValid)return this;for(var t={},r=0,n=Object.keys(this.values);r<n.length;r++){var i=n[r];t[i]=asNumber(e(this.values[i],i))}return clone$1(this,{values:t},!0)},e.get=function get(e){return this[Duration.normalizeUnit(e)]},e.set=function set(e){return this.isValid?clone$1(this,{values:_extends({},this.values,normalizeObject(e,Duration.normalizeUnit))}):this},e.reconfigure=function reconfigure(e){var t=void 0===e?{}:e,r=t.locale,n=t.numberingSystem,i=t.conversionAccuracy,a={loc:this.loc.clone({locale:r,numberingSystem:n})};return i&&(a.conversionAccuracy=i),clone$1(this,a)},e.as=function as(e){return this.isValid?this.shiftTo(e).get(e):NaN},e.normalize=function normalize(){if(!this.isValid)return this;var e=this.toObject();return function normalizeValues(e,t){at.reduce((function(r,n){return isUndefined(t[n])?r:(r&&convert(e,t,r,t,n),n)}),null)}(this.matrix,e),clone$1(this,{values:e},!0)},e.shiftTo=function shiftTo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!this.isValid)return this;if(0===t.length)return this;t=t.map((function(e){return Duration.normalizeUnit(e)}));for(var n,i,a={},o={},s=this.toObject(),c=_createForOfIteratorHelperLoose(it);!(i=c()).done;){var l=i.value;if(t.indexOf(l)>=0){n=l;var u=0;for(var d in o)u+=this.matrix[d][l]*o[d],o[d]=0;isNumber(s[l])&&(u+=s[l]);var f=Math.trunc(u);for(var p in a[l]=f,o[l]=(1e3*u-1e3*f)/1e3,s)it.indexOf(p)>it.indexOf(l)&&convert(this.matrix,s,p,a,l)}else isNumber(s[l])&&(o[l]=s[l])}for(var h in o)0!==o[h]&&(a[n]+=h===n?o[h]:o[h]/this.matrix[n][h]);return clone$1(this,{values:a},!0).normalize()},e.negate=function negate(){if(!this.isValid)return this;for(var e={},t=0,r=Object.keys(this.values);t<r.length;t++){var n=r[t];e[n]=-this.values[n]}return clone$1(this,{values:e},!0)},e.equals=function equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,r=_createForOfIteratorHelperLoose(it);!(t=r()).done;){var n=t.value;if(i=this.values[n],a=e.values[n],!(void 0===i||0===i?void 0===a||0===a:i===a))return!1}var i,a;return!0},_createClass(Duration,[{key:"locale",get:function get(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function get(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function get(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function get(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function get(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function get(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function get(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function get(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function get(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function get(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function get(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function get(){return null===this.invalid}},{key:"invalidReason",get:function get(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function get(){return this.invalid?this.invalid.explanation:null}}]),Duration}(),st="Invalid Interval";function validateStartEnd(e,t){return e&&e.isValid?t&&t.isValid?t<e?ct.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:ct.invalid("missing or invalid end"):ct.invalid("missing or invalid start")}var ct=function(){function Interval(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}Interval.invalid=function invalid(e,t){if(void 0===t&&(t=null),!e)throw new c("need to specify a reason the Interval is invalid");var invalid=e instanceof W?e:new W(e,t);if(pe.throwOnInvalid)throw new i(invalid);return new Interval({invalid})},Interval.fromDateTimes=function fromDateTimes(e,t){var r=friendlyDateTime(e),n=friendlyDateTime(t),i=validateStartEnd(r,n);return null==i?new Interval({start:r,end:n}):i},Interval.after=function after(e,t){var r=ot.fromDurationLike(t),n=friendlyDateTime(e);return Interval.fromDateTimes(n,n.plus(r))},Interval.before=function before(e,t){var r=ot.fromDurationLike(t),n=friendlyDateTime(e);return Interval.fromDateTimes(n.minus(r),n)},Interval.fromISO=function fromISO(e,t){var r=(e||"").split("/",2),n=r[0],i=r[1];if(n&&i){var a,o,s,c;try{o=(a=jt.fromISO(n,t)).isValid}catch(i){o=!1}try{c=(s=jt.fromISO(i,t)).isValid}catch(i){c=!1}if(o&&c)return Interval.fromDateTimes(a,s);if(o){var l=ot.fromISO(i,t);if(l.isValid)return Interval.after(a,l)}else if(c){var u=ot.fromISO(n,t);if(u.isValid)return Interval.before(s,u)}}return Interval.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},Interval.isInterval=function isInterval(e){return e&&e.isLuxonInterval||!1};var e=Interval.prototype;return e.length=function length(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},e.count=function count(e){if(void 0===e&&(e="milliseconds"),!this.isValid)return NaN;var t=this.start.startOf(e),r=this.end.startOf(e);return Math.floor(r.diff(t,e).get(e))+1},e.hasSame=function hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},e.isEmpty=function isEmpty(){return this.s.valueOf()===this.e.valueOf()},e.isAfter=function isAfter(e){return!!this.isValid&&this.s>e},e.isBefore=function isBefore(e){return!!this.isValid&&this.e<=e},e.contains=function contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)},e.set=function set(e){var t=void 0===e?{}:e,r=t.start,n=t.end;return this.isValid?Interval.fromDateTimes(r||this.s,n||this.e):this},e.splitAt=function splitAt(){var e=this;if(!this.isValid)return[];for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var i=r.map(friendlyDateTime).filter((function(t){return e.contains(t)})).sort(),a=[],o=this.s,s=0;o<this.e;){var c=i[s]||this.e,l=+c>+this.e?this.e:c;a.push(Interval.fromDateTimes(o,l)),o=l,s+=1}return a},e.splitBy=function splitBy(e){var t=ot.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];for(var r,n=this.s,i=1,a=[];n<this.e;){var o=this.start.plus(t.mapUnits((function(e){return e*i})));r=+o>+this.e?this.e:o,a.push(Interval.fromDateTimes(n,r)),n=r,i+=1}return a},e.divideEqually=function divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},e.overlaps=function overlaps(e){return this.e>e.s&&this.s<e.e},e.abutsStart=function abutsStart(e){return!!this.isValid&&+this.e==+e.s},e.abutsEnd=function abutsEnd(e){return!!this.isValid&&+e.e==+this.s},e.engulfs=function engulfs(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},e.equals=function equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},e.intersection=function intersection(e){if(!this.isValid)return this;var t=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return t>=r?null:Interval.fromDateTimes(t,r)},e.union=function union(e){if(!this.isValid)return this;var t=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return Interval.fromDateTimes(t,r)},Interval.merge=function merge(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var r=e[0],n=e[1];return n?n.overlaps(t)||n.abutsStart(t)?[r,n.union(t)]:[r.concat([n]),t]:[r,t]}),[[],null]),r=t[0],n=t[1];return n&&r.push(n),r},Interval.xor=function xor(e){for(var t,r,n=null,i=0,a=[],o=e.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),s=_createForOfIteratorHelperLoose((t=Array.prototype).concat.apply(t,o).sort((function(e,t){return e.time-t.time})));!(r=s()).done;){var c=r.value;1===(i+="s"===c.type?1:-1)?n=c.time:(n&&+n!=+c.time&&a.push(Interval.fromDateTimes(n,c.time)),n=null)}return Interval.merge(a)},e.difference=function difference(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Interval.xor([this].concat(r)).map((function(t){return e.intersection(t)})).filter((function(e){return e&&!e.isEmpty()}))},e.toString=function toString(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":st},e.toISO=function toISO(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):st},e.toISODate=function toISODate(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():st},e.toISOTime=function toISOTime(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):st},e.toFormat=function toFormat(e,t){var r=(void 0===t?{}:t).separator,n=void 0===r?" – ":r;return this.isValid?""+this.s.toFormat(e)+n+this.e.toFormat(e):st},e.toDuration=function toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ot.invalid(this.invalidReason)},e.mapEndpoints=function mapEndpoints(e){return Interval.fromDateTimes(e(this.s),e(this.e))},_createClass(Interval,[{key:"start",get:function get(){return this.isValid?this.s:null}},{key:"end",get:function get(){return this.isValid?this.e:null}},{key:"isValid",get:function get(){return null===this.invalidReason}},{key:"invalidReason",get:function get(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function get(){return this.invalid?this.invalid.explanation:null}}]),Interval}(),lt=function(){function Info(){}return Info.hasDST=function hasDST(e){void 0===e&&(e=pe.defaultZone);var t=jt.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset},Info.isValidIANAZone=function isValidIANAZone(e){return ne.isValidSpecifier(e)&&ne.isValidZone(e)},Info.normalizeZone=function normalizeZone$1(e){return normalizeZone(e,pe.defaultZone)},Info.months=function months(e,t){void 0===e&&(e="long");var r=void 0===t?{}:t,n=r.locale,i=void 0===n?null:n,a=r.numberingSystem,o=void 0===a?null:a,s=r.locObj,c=void 0===s?null:s,l=r.outputCalendar,u=void 0===l?"gregory":l;return(c||Ie.create(i,o,u)).months(e)},Info.monthsFormat=function monthsFormat(e,t){void 0===e&&(e="long");var r=void 0===t?{}:t,n=r.locale,i=void 0===n?null:n,a=r.numberingSystem,o=void 0===a?null:a,s=r.locObj,c=void 0===s?null:s,l=r.outputCalendar,u=void 0===l?"gregory":l;return(c||Ie.create(i,o,u)).months(e,!0)},Info.weekdays=function weekdays(e,t){void 0===e&&(e="long");var r=void 0===t?{}:t,n=r.locale,i=void 0===n?null:n,a=r.numberingSystem,o=void 0===a?null:a,s=r.locObj;return((void 0===s?null:s)||Ie.create(i,o,null)).weekdays(e)},Info.weekdaysFormat=function weekdaysFormat(e,t){void 0===e&&(e="long");var r=void 0===t?{}:t,n=r.locale,i=void 0===n?null:n,a=r.numberingSystem,o=void 0===a?null:a,s=r.locObj;return((void 0===s?null:s)||Ie.create(i,o,null)).weekdays(e,!0)},Info.meridiems=function meridiems(e){var t=(void 0===e?{}:e).locale,r=void 0===t?null:t;return Ie.create(r).meridiems()},Info.eras=function eras(e,t){void 0===e&&(e="short");var r=(void 0===t?{}:t).locale,n=void 0===r?null:r;return Ie.create(n,null,"gregory").eras(e)},Info.features=function features(){return{relative:hasRelative()}},Info}();function dayDiff(e,t){var r=function utcDayStart(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()},n=r(t)-r(e);return Math.floor(ot.fromMillis(n).as("days"))}function _diff(e,t,r,n){var i=function highOrderDiffs(e,t,r){for(var n,i,a={},o=0,s=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){var r=dayDiff(e,t);return(r-r%7)/7}],["days",dayDiff]];o<s.length;o++){var c=s[o],l=c[0],u=c[1];if(r.indexOf(l)>=0){var d;n=l;var f,p=u(e,t);(i=e.plus(((d={})[l]=p,d)))>t?(e=e.plus(((f={})[l]=p-1,f)),p-=1):e=i,a[l]=p}}return[e,a,i,n]}(e,t,r),a=i[0],o=i[1],s=i[2],c=i[3],l=t-a,u=r.filter((function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0}));if(0===u.length){var d;if(s<t)s=a.plus(((d={})[c]=1,d));s!==a&&(o[c]=(o[c]||0)+l/(s-a))}var f,p=ot.fromObject(o,n);return u.length>0?(f=ot.fromMillis(l,n)).shiftTo.apply(f,u).plus(p):p}var ut={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},dt={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ft=ut.hanidec.replace(/[\[|\]]/g,"").split("");function digitRegex(e,t){var r=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+ut[r||"latn"]+t)}function intUnit(e,t){return void 0===t&&(t=function post(e){return e}),{regex:e,deser:function deser(e){var r=e[0];return t(function parseDigits(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var r=0;r<e.length;r++){var n=e.charCodeAt(r);if(-1!==e[r].search(ut.hanidec))t+=ft.indexOf(e[r]);else for(var i in dt){var a=dt[i],o=a[0],s=a[1];n>=o&&n<=s&&(t+=n-o)}}return parseInt(t,10)}return t}(r))}}}var pt="( |"+String.fromCharCode(160)+")",ht=new RegExp(pt,"g");function fixListRegex(e){return e.replace(/\./g,"\\.?").replace(ht,pt)}function stripInsensitivities(e){return e.replace(/\./g,"").replace(ht," ").toLowerCase()}function oneOf(e,t){return null===e?null:{regex:RegExp(e.map(fixListRegex).join("|")),deser:function deser(r){var n=r[0];return e.findIndex((function(e){return stripInsensitivities(n)===stripInsensitivities(e)}))+t}}}function offset(e,t){return{regex:e,deser:function deser(e){return signedOffset(e[1],e[2])},groups:t}}function simple(e){return{regex:e,deser:function deser(e){return e[0]}}}function escapeToken(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var mt={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};var yt=null;function maybeExpandMacroToken(e,t){if(e.literal)return e;var r=Z.macroTokenToFormatOpts(e.val);if(!r)return e;var n=Z.create(t,r).formatDateTimeParts(function getDummyDateTime(){return yt||(yt=jt.fromMillis(1555555555555)),yt}()).map((function(e){return function tokenForPart(e,t,r){var n=e.type,i=e.value;if("literal"===n)return{literal:!0,val:i};var a=r[n],o=mt[n];return"object"==typeof o&&(o=o[a]),o?{literal:!1,val:o}:void 0}(e,0,r)}));return n.includes(void 0)?e:n}function explainFromTokens(e,t,r){var n=function expandMacroTokens(e,t){var r;return(r=Array.prototype).concat.apply(r,e.map((function(e){return maybeExpandMacroToken(e,t)})))}(Z.parseFormat(r),e),i=n.map((function(t){return function unitForToken(e,t){var r=digitRegex(t),n=digitRegex(t,"{2}"),i=digitRegex(t,"{3}"),a=digitRegex(t,"{4}"),o=digitRegex(t,"{6}"),s=digitRegex(t,"{1,2}"),c=digitRegex(t,"{1,3}"),l=digitRegex(t,"{1,6}"),u=digitRegex(t,"{1,9}"),d=digitRegex(t,"{2,4}"),f=digitRegex(t,"{4,6}"),p=function literal(e){return{regex:RegExp(escapeToken(e.val)),deser:function deser(e){return e[0]},literal:!0}},h=function unitate(h){if(e.literal)return p(h);switch(h.val){case"G":return oneOf(t.eras("short",!1),0);case"GG":return oneOf(t.eras("long",!1),0);case"y":return intUnit(l);case"yy":case"kk":return intUnit(d,untruncateYear);case"yyyy":case"kkkk":return intUnit(a);case"yyyyy":return intUnit(f);case"yyyyyy":return intUnit(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return intUnit(s);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return intUnit(n);case"MMM":return oneOf(t.months("short",!0,!1),1);case"MMMM":return oneOf(t.months("long",!0,!1),1);case"LLL":return oneOf(t.months("short",!1,!1),1);case"LLLL":return oneOf(t.months("long",!1,!1),1);case"o":case"S":return intUnit(c);case"ooo":case"SSS":return intUnit(i);case"u":return simple(u);case"uu":return simple(s);case"uuu":case"E":case"c":return intUnit(r);case"a":return oneOf(t.meridiems(),0);case"EEE":return oneOf(t.weekdays("short",!1,!1),1);case"EEEE":return oneOf(t.weekdays("long",!1,!1),1);case"ccc":return oneOf(t.weekdays("short",!0,!1),1);case"cccc":return oneOf(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return offset(new RegExp("([+-]"+s.source+")(?::("+n.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+s.source+")("+n.source+")?"),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return p(h)}}(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return h.token=e,h}(t,e)})),a=i.find((function(e){return e.invalidReason}));if(a)return{input:t,tokens:n,invalidReason:a.invalidReason};var s=function buildRegex(e){return["^"+e.map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"")+"$",e]}(i),c=s[0],l=s[1],u=RegExp(c,"i"),d=function match(e,t,r){var n=e.match(t);if(n){var i={},a=1;for(var o in r)if(hasOwnProperty(r,o)){var s=r[o],c=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(n.slice(a,a+c))),a+=c}return[n,i]}return[n,{}]}(t,u,l),f=d[0],p=d[1],h=p?function dateTimeFromMatches(e){var t,r=null;return isUndefined(e.z)||(r=ne.create(e.z)),isUndefined(e.Z)||(r||(r=new ae(e.Z)),t=e.Z),isUndefined(e.q)||(e.M=3*(e.q-1)+1),isUndefined(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),isUndefined(e.u)||(e.S=parseMillis(e.u)),[Object.keys(e).reduce((function(t,r){var n=function toField(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(r);return n&&(t[n]=e[r]),t}),{}),r,t]}(p):[null,null,void 0],m=h[0],y=h[1],g=h[2];if(hasOwnProperty(p,"a")&&hasOwnProperty(p,"H"))throw new o("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:n,regex:u,rawMatches:f,matches:p,result:m,zone:y,specificOffset:g}}var gt=[0,31,59,90,120,151,181,212,243,273,304,334],vt=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new W("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function dayOfWeek(e,t,r){var n=new Date(Date.UTC(e,t-1,r)).getUTCDay();return 0===n?7:n}function computeOrdinal(e,t,r){return r+(isLeapYear(e)?vt:gt)[t-1]}function uncomputeOrdinal(e,t){var r=isLeapYear(e)?vt:gt,n=r.findIndex((function(e){return e<t}));return{month:n+1,day:t-r[n]}}function gregorianToWeek(e){var t,r=e.year,n=e.month,i=e.day,a=computeOrdinal(r,n,i),o=dayOfWeek(r,n,i),s=Math.floor((a-o+10)/7);return s<1?s=weeksInWeekYear(t=r-1):s>weeksInWeekYear(r)?(t=r+1,s=1):t=r,_extends({weekYear:t,weekNumber:s,weekday:o},timeObject(e))}function weekToGregorian(e){var t,r=e.weekYear,n=e.weekNumber,i=e.weekday,a=dayOfWeek(r,1,4),o=daysInYear(r),s=7*n+i-a-3;s<1?s+=daysInYear(t=r-1):s>o?(t=r+1,s-=daysInYear(r)):t=r;var c=uncomputeOrdinal(t,s);return _extends({year:t,month:c.month,day:c.day},timeObject(e))}function gregorianToOrdinal(e){var t=e.year;return _extends({year:t,ordinal:computeOrdinal(t,e.month,e.day)},timeObject(e))}function ordinalToGregorian(e){var t=e.year,r=uncomputeOrdinal(t,e.ordinal);return _extends({year:t,month:r.month,day:r.day},timeObject(e))}function hasInvalidGregorianData(e){var t=isInteger(e.year),r=integerBetween(e.month,1,12),n=integerBetween(e.day,1,daysInMonth(e.year,e.month));return t?r?!n&&unitOutOfRange("day",e.day):unitOutOfRange("month",e.month):unitOutOfRange("year",e.year)}function hasInvalidTimeData(e){var t=e.hour,r=e.minute,n=e.second,i=e.millisecond,a=integerBetween(t,0,23)||24===t&&0===r&&0===n&&0===i,o=integerBetween(r,0,59),s=integerBetween(n,0,59),c=integerBetween(i,0,999);return a?o?s?!c&&unitOutOfRange("millisecond",i):unitOutOfRange("second",n):unitOutOfRange("minute",r):unitOutOfRange("hour",t)}var _t="Invalid DateTime",bt=864e13;function unsupportedZone(e){return new W("unsupported zone",'the zone "'+e.name+'" is not supported')}function possiblyCachedWeekData(e){return null===e.weekData&&(e.weekData=gregorianToWeek(e.c)),e.weekData}function clone(e,t){var r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new jt(_extends({},r,t,{old:r}))}function fixOffset(e,t,r){var n=e-60*t*1e3,i=r.offset(n);if(t===i)return[n,t];n-=60*(i-t)*1e3;var a=r.offset(n);return i===a?[n,i]:[e-60*Math.min(i,a)*1e3,Math.max(i,a)]}function tsToObj(e,t){var r=new Date(e+=60*t*1e3);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function objToTS(e,t,r){return fixOffset(objToLocalTS(e),t,r)}function adjustTime(e,t){var r=e.o,n=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),a=_extends({},e.c,{year:n,month:i,day:Math.min(e.c.day,daysInMonth(n,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),o=ot.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=fixOffset(objToLocalTS(a),r,e.zone),c=s[0],l=s[1];return 0!==o&&(c+=o,l=e.zone.offset(c)),{ts:c,o:l}}function parseDataToDateTime(e,t,r,n,i,a){var o=r.setZone,s=r.zone;if(e&&0!==Object.keys(e).length){var c=t||s,l=jt.fromObject(e,_extends({},r,{zone:c,specificOffset:a}));return o?l:l.setZone(s)}return jt.invalid(new W("unparsable",'the input "'+i+"\" can't be parsed as "+n))}function toTechFormat(e,t,r){return void 0===r&&(r=!0),e.isValid?Z.create(Ie.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,t):null}function _toISODate(e,t){var r=e.c.year>9999||e.c.year<0,n="";return r&&e.c.year>=0&&(n+="+"),n+=padStart(e.c.year,r?6:4),t?(n+="-",n+=padStart(e.c.month),n+="-",n+=padStart(e.c.day)):(n+=padStart(e.c.month),n+=padStart(e.c.day)),n}function _toISOTime(e,t,r,n,i){var a=padStart(e.c.hour);return t?(a+=":",a+=padStart(e.c.minute),0===e.c.second&&r||(a+=":")):a+=padStart(e.c.minute),0===e.c.second&&r||(a+=padStart(e.c.second),0===e.c.millisecond&&n||(a+=".",a+=padStart(e.c.millisecond,3))),i&&(e.isOffsetFixed&&0===e.offset?a+="Z":e.o<0?(a+="-",a+=padStart(Math.trunc(-e.o/60)),a+=":",a+=padStart(Math.trunc(-e.o%60))):(a+="+",a+=padStart(Math.trunc(e.o/60)),a+=":",a+=padStart(Math.trunc(e.o%60)))),a}var Rt={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Ct={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},wt={ordinal:1,hour:0,minute:0,second:0,millisecond:0},It=["year","month","day","hour","minute","second","millisecond"],Ot=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],St=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new s(e);return t}function quickDT(e,t){var r,n,i=normalizeZone(t.zone,pe.defaultZone),a=Ie.fromObject(t),o=pe.now();if(isUndefined(e.year))r=o;else{for(var s,c=_createForOfIteratorHelperLoose(It);!(s=c()).done;){var l=s.value;isUndefined(e[l])&&(e[l]=Rt[l])}var u=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(u)return jt.invalid(u);var d=objToTS(e,i.offset(o),i);r=d[0],n=d[1]}return new jt({ts:r,zone:i,loc:a,o:n})}function diffRelative(e,t,r){var n=!!isUndefined(r.round)||r.round,i=function format(e,i){return e=roundTo(e,n||r.calendary?0:2,!0),t.loc.clone(r).relFormatter(r).format(e,i)},a=function differ(n){return r.calendary?t.hasSame(e,n)?0:t.startOf(n).diff(e.startOf(n),n).get(n):t.diff(e,n).get(n)};if(r.unit)return i(a(r.unit),r.unit);for(var o,s=_createForOfIteratorHelperLoose(r.units);!(o=s()).done;){var c=o.value,l=a(c);if(Math.abs(l)>=1)return i(l,c)}return i(e>t?-0:0,r.units[r.units.length-1])}function lastOpts(e){var t,r={};return e.length>0&&"object"==typeof e[e.length-1]?(r=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[r,t]}var jt=function(){function DateTime(e){var t=e.zone||pe.defaultZone,r=e.invalid||(Number.isNaN(e.ts)?new W("invalid input"):null)||(t.isValid?null:unsupportedZone(t));this.ts=isUndefined(e.ts)?pe.now():e.ts;var n=null,i=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var a=[e.old.c,e.old.o];n=a[0],i=a[1]}else{var o=t.offset(this.ts);n=tsToObj(this.ts,o),n=(r=Number.isNaN(n.year)?new W("invalid input"):null)?null:n,i=r?null:o}this._zone=t,this.loc=e.loc||Ie.create(),this.invalid=r,this.weekData=null,this.c=n,this.o=i,this.isLuxonDateTime=!0}DateTime.now=function now(){return new DateTime({})},DateTime.local=function local(){var e=lastOpts(arguments),t=e[0],r=e[1],n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],c=r[5],l=r[6];return quickDT({year:n,month:i,day:a,hour:o,minute:s,second:c,millisecond:l},t)},DateTime.utc=function utc(){var e=lastOpts(arguments),t=e[0],r=e[1],n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],c=r[5],l=r[6];return t.zone=ae.utcInstance,quickDT({year:n,month:i,day:a,hour:o,minute:s,second:c,millisecond:l},t)},DateTime.fromJSDate=function fromJSDate(e,t){void 0===t&&(t={});var r=function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}(e)?e.valueOf():NaN;if(Number.isNaN(r))return DateTime.invalid("invalid input");var n=normalizeZone(t.zone,pe.defaultZone);return n.isValid?new DateTime({ts:r,zone:n,loc:Ie.fromObject(t)}):DateTime.invalid(unsupportedZone(n))},DateTime.fromMillis=function fromMillis(e,t){if(void 0===t&&(t={}),isNumber(e))return e<-bt||e>bt?DateTime.invalid("Timestamp out of range"):new DateTime({ts:e,zone:normalizeZone(t.zone,pe.defaultZone),loc:Ie.fromObject(t)});throw new c("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},DateTime.fromSeconds=function fromSeconds(e,t){if(void 0===t&&(t={}),isNumber(e))return new DateTime({ts:1e3*e,zone:normalizeZone(t.zone,pe.defaultZone),loc:Ie.fromObject(t)});throw new c("fromSeconds requires a numerical input")},DateTime.fromObject=function fromObject(e,t){void 0===t&&(t={}),e=e||{};var r=normalizeZone(t.zone,pe.defaultZone);if(!r.isValid)return DateTime.invalid(unsupportedZone(r));var n=pe.now(),i=isUndefined(t.specificOffset)?r.offset(n):t.specificOffset,a=normalizeObject(e,normalizeUnit),s=!isUndefined(a.ordinal),c=!isUndefined(a.year),l=!isUndefined(a.month)||!isUndefined(a.day),u=c||l,d=a.weekYear||a.weekNumber,f=Ie.fromObject(t);if((u||s)&&d)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new o("Can't mix ordinal dates with month/day");var p,h,m=d||a.weekday&&!u,y=tsToObj(n,i);m?(p=Ot,h=Ct,y=gregorianToWeek(y)):s?(p=St,h=wt,y=gregorianToOrdinal(y)):(p=It,h=Rt);for(var g,v=!1,b=_createForOfIteratorHelperLoose(p);!(g=b()).done;){var R=g.value;isUndefined(a[R])?a[R]=v?h[R]:y[R]:v=!0}var C=m?function hasInvalidWeekData(e){var t=isInteger(e.weekYear),r=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear)),n=integerBetween(e.weekday,1,7);return t?r?!n&&unitOutOfRange("weekday",e.weekday):unitOutOfRange("week",e.week):unitOutOfRange("weekYear",e.weekYear)}(a):s?function hasInvalidOrdinalData(e){var t=isInteger(e.year),r=integerBetween(e.ordinal,1,daysInYear(e.year));return t?!r&&unitOutOfRange("ordinal",e.ordinal):unitOutOfRange("year",e.year)}(a):hasInvalidGregorianData(a),w=C||hasInvalidTimeData(a);if(w)return DateTime.invalid(w);var I=objToTS(m?weekToGregorian(a):s?ordinalToGregorian(a):a,i,r),O=new DateTime({ts:I[0],zone:r,o:I[1],loc:f});return a.weekday&&u&&e.weekday!==O.weekday?DateTime.invalid("mismatched weekday","you can't specify both a weekday of "+a.weekday+" and a date of "+O.toISO()):O},DateTime.fromISO=function fromISO(e,t){void 0===t&&(t={});var r=function parseISODate(e){return parse(e,[Fe,Ge],[Ue,ze],[Be,Ke],[Le,He])}(e);return parseDataToDateTime(r[0],r[1],t,"ISO 8601",e)},DateTime.fromRFC2822=function fromRFC2822(e,t){void 0===t&&(t={});var r=function parseRFC2822Date(e){return parse(function preprocessRFC2822(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[ke,extractRFC2822])}(e);return parseDataToDateTime(r[0],r[1],t,"RFC 2822",e)},DateTime.fromHTTP=function fromHTTP(e,t){void 0===t&&(t={});var r=function parseHTTPDate(e){return parse(e,[Ne,extractRFC1123Or850],[qe,extractRFC1123Or850],[Ve,extractASCII])}(e);return parseDataToDateTime(r[0],r[1],t,"HTTP",t)},DateTime.fromFormat=function fromFormat(e,t,r){if(void 0===r&&(r={}),isUndefined(e)||isUndefined(t))throw new c("fromFormat requires an input string and a format");var n=r,i=n.locale,a=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,l=function parseFromTokens(e,t,r){var n=explainFromTokens(e,t,r);return[n.result,n.zone,n.specificOffset,n.invalidReason]}(Ie.fromOpts({locale:a,numberingSystem:s,defaultToEN:!0}),e,t),u=l[0],d=l[1],f=l[2],p=l[3];return p?DateTime.invalid(p):parseDataToDateTime(u,d,r,"format "+t,e,f)},DateTime.fromString=function fromString(e,t,r){return void 0===r&&(r={}),DateTime.fromFormat(e,t,r)},DateTime.fromSQL=function fromSQL(e,t){void 0===t&&(t={});var r=function parseSQL(e){return parse(e,[We,Qe],[Je,Ye])}(e);return parseDataToDateTime(r[0],r[1],t,"SQL",e)},DateTime.invalid=function invalid(e,t){if(void 0===t&&(t=null),!e)throw new c("need to specify a reason the DateTime is invalid");var invalid=e instanceof W?e:new W(e,t);if(pe.throwOnInvalid)throw new n(invalid);return new DateTime({invalid})},DateTime.isDateTime=function isDateTime(e){return e&&e.isLuxonDateTime||!1};var e=DateTime.prototype;return e.get=function get(e){return this[e]},e.resolvedLocaleOptions=function resolvedLocaleOptions(e){void 0===e&&(e={});var t=Z.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},e.toUTC=function toUTC(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(ae.instance(e),t)},e.toLocal=function toLocal(){return this.setZone(pe.defaultZone)},e.setZone=function setZone(e,t){var r=void 0===t?{}:t,n=r.keepLocalTime,i=void 0!==n&&n,a=r.keepCalendarTime,o=void 0!==a&&a;if((e=normalizeZone(e,pe.defaultZone)).equals(this.zone))return this;if(e.isValid){var s=this.ts;if(i||o){var c=e.offset(this.ts);s=objToTS(this.toObject(),c,e)[0]}return clone(this,{ts:s,zone:e})}return DateTime.invalid(unsupportedZone(e))},e.reconfigure=function reconfigure(e){var t=void 0===e?{}:e,r=t.locale,n=t.numberingSystem,i=t.outputCalendar;return clone(this,{loc:this.loc.clone({locale:r,numberingSystem:n,outputCalendar:i})})},e.setLocale=function setLocale(e){return this.reconfigure({locale:e})},e.set=function set(e){if(!this.isValid)return this;var t,r=normalizeObject(e,normalizeUnit),n=!isUndefined(r.weekYear)||!isUndefined(r.weekNumber)||!isUndefined(r.weekday),i=!isUndefined(r.ordinal),a=!isUndefined(r.year),s=!isUndefined(r.month)||!isUndefined(r.day),c=a||s,l=r.weekYear||r.weekNumber;if((c||i)&&l)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&i)throw new o("Can't mix ordinal dates with month/day");n?t=weekToGregorian(_extends({},gregorianToWeek(this.c),r)):isUndefined(r.ordinal)?(t=_extends({},this.toObject(),r),isUndefined(r.day)&&(t.day=Math.min(daysInMonth(t.year,t.month),t.day))):t=ordinalToGregorian(_extends({},gregorianToOrdinal(this.c),r));var u=objToTS(t,this.o,this.zone);return clone(this,{ts:u[0],o:u[1]})},e.plus=function plus(e){return this.isValid?clone(this,adjustTime(this,ot.fromDurationLike(e))):this},e.minus=function minus(e){return this.isValid?clone(this,adjustTime(this,ot.fromDurationLike(e).negate())):this},e.startOf=function startOf(e){if(!this.isValid)return this;var t={},r=ot.normalizeUnit(e);switch(r){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===r&&(t.weekday=1),"quarters"===r){var n=Math.ceil(this.month/3);t.month=3*(n-1)+1}return this.set(t)},e.endOf=function endOf(e){var t;return this.isValid?this.plus((t={},t[e]=1,t)).startOf(e).minus(1):this},e.toFormat=function toFormat(e,t){return void 0===t&&(t={}),this.isValid?Z.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):_t},e.toLocaleString=function toLocaleString(e,t){return void 0===e&&(e=p),void 0===t&&(t={}),this.isValid?Z.create(this.loc.clone(t),e).formatDateTime(this):_t},e.toLocaleParts=function toLocaleParts(e){return void 0===e&&(e={}),this.isValid?Z.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},e.toISO=function toISO(e){var t=void 0===e?{}:e,r=t.format,n=void 0===r?"extended":r,i=t.suppressSeconds,a=void 0!==i&&i,o=t.suppressMilliseconds,s=void 0!==o&&o,c=t.includeOffset,l=void 0===c||c;if(!this.isValid)return null;var u="extended"===n,d=_toISODate(this,u);return d+="T",d+=_toISOTime(this,u,a,s,l)},e.toISODate=function toISODate(e){var t=(void 0===e?{}:e).format,r=void 0===t?"extended":t;return this.isValid?_toISODate(this,"extended"===r):null},e.toISOWeekDate=function toISOWeekDate(){return toTechFormat(this,"kkkk-'W'WW-c")},e.toISOTime=function toISOTime(e){var t=void 0===e?{}:e,r=t.suppressMilliseconds,n=void 0!==r&&r,i=t.suppressSeconds,a=void 0!==i&&i,o=t.includeOffset,s=void 0===o||o,c=t.includePrefix,l=void 0!==c&&c,u=t.format,d=void 0===u?"extended":u;return this.isValid?(l?"T":"")+_toISOTime(this,"extended"===d,a,n,s):null},e.toRFC2822=function toRFC2822(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function toHTTP(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function toSQLDate(){return this.isValid?_toISODate(this,!0):null},e.toSQLTime=function toSQLTime(e){var t=void 0===e?{}:e,r=t.includeOffset,n=void 0===r||r,i=t.includeZone,a=void 0!==i&&i,o="HH:mm:ss.SSS";return(a||n)&&(o+=" ",a?o+="z":n&&(o+="ZZ")),toTechFormat(this,o,!0)},e.toSQL=function toSQL(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},e.toString=function toString(){return this.isValid?this.toISO():_t},e.valueOf=function valueOf(){return this.toMillis()},e.toMillis=function toMillis(){return this.isValid?this.ts:NaN},e.toSeconds=function toSeconds(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function toJSON(){return this.toISO()},e.toBSON=function toBSON(){return this.toJSDate()},e.toObject=function toObject(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=_extends({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toJSDate=function toJSDate(){return new Date(this.isValid?this.ts:NaN)},e.diff=function diff(e,t,r){if(void 0===t&&(t="milliseconds"),void 0===r&&(r={}),!this.isValid||!e.isValid)return ot.invalid("created by diffing an invalid DateTime");var n=_extends({locale:this.locale,numberingSystem:this.numberingSystem},r),i=function maybeArray(e){return Array.isArray(e)?e:[e]}(t).map(ot.normalizeUnit),a=e.valueOf()>this.valueOf(),o=_diff(a?this:e,a?e:this,i,n);return a?o.negate():o},e.diffNow=function diffNow(e,t){return void 0===e&&(e="milliseconds"),void 0===t&&(t={}),this.diff(DateTime.now(),e,t)},e.until=function until(e){return this.isValid?ct.fromDateTimes(this,e):this},e.hasSame=function hasSame(e,t){if(!this.isValid)return!1;var r=e.valueOf(),n=this.setZone(e.zone,{keepLocalTime:!0});return n.startOf(t)<=r&&r<=n.endOf(t)},e.equals=function equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},e.toRelative=function toRelative(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=e.base||DateTime.fromObject({},{zone:this.zone}),r=e.padding?this<t?-e.padding:e.padding:0,n=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(n=e.unit,i=void 0),diffRelative(t,this.plus(r),_extends({},e,{numeric:"always",units:n,unit:i}))},e.toRelativeCalendar=function toRelativeCalendar(e){return void 0===e&&(e={}),this.isValid?diffRelative(e.base||DateTime.fromObject({},{zone:this.zone}),this,_extends({},e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},DateTime.min=function min(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!t.every(DateTime.isDateTime))throw new c("min requires all arguments be DateTimes");return bestBy(t,(function(e){return e.valueOf()}),Math.min)},DateTime.max=function max(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!t.every(DateTime.isDateTime))throw new c("max requires all arguments be DateTimes");return bestBy(t,(function(e){return e.valueOf()}),Math.max)},DateTime.fromFormatExplain=function fromFormatExplain(e,t,r){void 0===r&&(r={});var n=r,i=n.locale,a=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o;return explainFromTokens(Ie.fromOpts({locale:a,numberingSystem:s,defaultToEN:!0}),e,t)},DateTime.fromStringExplain=function fromStringExplain(e,t,r){return void 0===r&&(r={}),DateTime.fromFormatExplain(e,t,r)},_createClass(DateTime,[{key:"isValid",get:function get(){return null===this.invalid}},{key:"invalidReason",get:function get(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function get(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function get(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function get(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function get(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function get(){return this._zone}},{key:"zoneName",get:function get(){return this.isValid?this.zone.name:null}},{key:"year",get:function get(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function get(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function get(){return this.isValid?this.c.month:NaN}},{key:"day",get:function get(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function get(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function get(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function get(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function get(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function get(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}},{key:"weekNumber",get:function get(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}},{key:"weekday",get:function get(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}},{key:"ordinal",get:function get(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}},{key:"monthShort",get:function get(){return this.isValid?lt.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function get(){return this.isValid?lt.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function get(){return this.isValid?lt.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function get(){return this.isValid?lt.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function get(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function get(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function get(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function get(){return this.isValid?this.zone.isUniversal:null}},{key:"isInDST",get:function get(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function get(){return isLeapYear(this.year)}},{key:"daysInMonth",get:function get(){return daysInMonth(this.year,this.month)}},{key:"daysInYear",get:function get(){return this.isValid?daysInYear(this.year):NaN}},{key:"weeksInWeekYear",get:function get(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function get(){return p}},{key:"DATE_MED",get:function get(){return h}},{key:"DATE_MED_WITH_WEEKDAY",get:function get(){return m}},{key:"DATE_FULL",get:function get(){return y}},{key:"DATE_HUGE",get:function get(){return g}},{key:"TIME_SIMPLE",get:function get(){return v}},{key:"TIME_WITH_SECONDS",get:function get(){return b}},{key:"TIME_WITH_SHORT_OFFSET",get:function get(){return R}},{key:"TIME_WITH_LONG_OFFSET",get:function get(){return C}},{key:"TIME_24_SIMPLE",get:function get(){return w}},{key:"TIME_24_WITH_SECONDS",get:function get(){return I}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function get(){return O}},{key:"TIME_24_WITH_LONG_OFFSET",get:function get(){return S}},{key:"DATETIME_SHORT",get:function get(){return j}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function get(){return T}},{key:"DATETIME_MED",get:function get(){return P}},{key:"DATETIME_MED_WITH_SECONDS",get:function get(){return D}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function get(){return x}},{key:"DATETIME_FULL",get:function get(){return E}},{key:"DATETIME_FULL_WITH_SECONDS",get:function get(){return $}},{key:"DATETIME_HUGE",get:function get(){return M}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function get(){return A}}]),DateTime}();function friendlyDateTime(e){if(jt.isDateTime(e))return e;if(e&&e.valueOf&&isNumber(e.valueOf()))return jt.fromJSDate(e);if(e&&"object"==typeof e)return jt.fromObject(e);throw new c("Unknown datetime argument: "+e+", of type "+typeof e)}t.DateTime=jt,t.Duration=ot,t.FixedOffsetZone=ae,t.IANAZone=ne,t.Info=lt,t.Interval=ct,t.InvalidZone=oe,t.Settings=pe,t.SystemZone=Y,t.VERSION="2.3.0",t.Zone=J},92592:(e,t,r)=>{const n=r(47138),i=r(95115),a=r(6907),o=r(93776);function renderCanvas(e,t,r,a,o){const s=[].slice.call(arguments,1),c=s.length,l="function"==typeof s[c-1];if(!l&&!n())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(r=t,t=a=void 0):2!==c||t.getContext||(a=r,r=t,t=void 0),new Promise((function(n,o){try{const o=i.create(r,a);n(e(o,t,a))}catch(e){o(e)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(o=r,r=t,t=a=void 0):3===c&&(t.getContext&&void 0===o?(o=a,a=void 0):(o=a,a=r,r=t,t=void 0));try{const n=i.create(r,a);o(null,e(n,t,a))}catch(e){o(e)}}t.create=i.create,t.toCanvas=renderCanvas.bind(null,a.render),t.toDataURL=renderCanvas.bind(null,a.renderToDataURL),t.toString=renderCanvas.bind(null,(function(e,t,r){return o.render(e,r)}))},47138:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},21845:(e,t,r)=>{const n=r(10242).getSymbolSize;t.getRowColCoords=function getRowColCoords(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=n(e),i=145===r?26:2*Math.ceil((r-13)/(2*t-2)),a=[r-7];for(let e=1;e<t-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},t.getPositions=function getPositions(e){const r=[],n=t.getRowColCoords(e),i=n.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)0===e&&0===t||0===e&&t===i-1||e===i-1&&0===t||r.push([n[e],n[t]]);return r}},8260:(e,t,r)=>{const n=r(76910),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function AlphanumericData(e){this.mode=n.ALPHANUMERIC,this.data=e}AlphanumericData.getBitsLength=function getBitsLength(e){return 11*Math.floor(e/2)+e%2*6},AlphanumericData.prototype.getLength=function getLength(){return this.data.length},AlphanumericData.prototype.getBitsLength=function getBitsLength(){return AlphanumericData.getBitsLength(this.data.length)},AlphanumericData.prototype.write=function write(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*i.indexOf(this.data[t]);r+=i.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=AlphanumericData},97245:e=>{function BitBuffer(){this.buffer=[],this.length=0}BitBuffer.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=BitBuffer},73280:e=>{function BitMatrix(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}BitMatrix.prototype.set=function(e,t,r,n){const i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)},BitMatrix.prototype.get=function(e,t){return this.data[e*this.size+t]},BitMatrix.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},BitMatrix.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=BitMatrix},43424:(e,t,r)=>{const n=r(62378),i=r(76910);function ByteData(e){this.mode=i.BYTE,this.data=new Uint8Array(n(e))}ByteData.getBitsLength=function getBitsLength(e){return 8*e},ByteData.prototype.getLength=function getLength(){return this.data.length},ByteData.prototype.getBitsLength=function getBitsLength(){return ByteData.getBitsLength(this.data.length)},ByteData.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},e.exports=ByteData},35393:(e,t,r)=>{const n=r(64908),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],a=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function getBlocksCount(e,t){switch(t){case n.L:return i[4*(e-1)+0];case n.M:return i[4*(e-1)+1];case n.Q:return i[4*(e-1)+2];case n.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function getTotalCodewordsCount(e,t){switch(t){case n.L:return a[4*(e-1)+0];case n.M:return a[4*(e-1)+1];case n.Q:return a[4*(e-1)+2];case n.H:return a[4*(e-1)+3];default:return}}},64908:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function isValid(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function from(e,r){if(t.isValid(e))return e;try{return function fromString(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return r}}},76526:(e,t,r)=>{const n=r(10242).getSymbolSize;t.getPositions=function getPositions(e){const t=n(e);return[[0,0],[t-7,0],[0,t-7]]}},61642:(e,t,r)=>{const n=r(10242),i=n.getBCHDigit(1335);t.getEncodedBits=function getEncodedBits(e,t){const r=e.bit<<3|t;let a=r<<10;for(;n.getBCHDigit(a)-i>=0;)a^=1335<<n.getBCHDigit(a)-i;return 21522^(r<<10|a)}},72577:(e,t)=>{const r=new Uint8Array(512),n=new Uint8Array(256);!function initTables(){let e=1;for(let t=0;t<255;t++)r[t]=e,n[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)r[e]=r[e-255]}(),t.log=function log(e){if(e<1)throw new Error("log("+e+")");return n[e]},t.exp=function exp(e){return r[e]},t.mul=function mul(e,t){return 0===e||0===t?0:r[n[e]+n[t]]}},35442:(e,t,r)=>{const n=r(76910),i=r(10242);function KanjiData(e){this.mode=n.KANJI,this.data=e}KanjiData.getBitsLength=function getBitsLength(e){return 13*e},KanjiData.prototype.getLength=function getLength(){return this.data.length},KanjiData.prototype.getBitsLength=function getBitsLength(){return KanjiData.getBitsLength(this.data.length)},KanjiData.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=i.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},e.exports=KanjiData},27126:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const r=3,n=3,i=40,a=10;function getMaskAt(e,r,n){switch(e){case t.Patterns.PATTERN000:return(r+n)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return n%3==0;case t.Patterns.PATTERN011:return(r+n)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2==0;case t.Patterns.PATTERN101:return r*n%2+r*n%3==0;case t.Patterns.PATTERN110:return(r*n%2+r*n%3)%2==0;case t.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function isValid(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function from(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function getPenaltyN1(e){const t=e.size;let n=0,i=0,a=0,o=null,s=null;for(let c=0;c<t;c++){i=a=0,o=s=null;for(let l=0;l<t;l++){let t=e.get(c,l);t===o?i++:(i>=5&&(n+=r+(i-5)),o=t,i=1),t=e.get(l,c),t===s?a++:(a>=5&&(n+=r+(a-5)),s=t,a=1)}i>=5&&(n+=r+(i-5)),a>=5&&(n+=r+(a-5))}return n},t.getPenaltyN2=function getPenaltyN2(e){const t=e.size;let r=0;for(let n=0;n<t-1;n++)for(let i=0;i<t-1;i++){const t=e.get(n,i)+e.get(n,i+1)+e.get(n+1,i)+e.get(n+1,i+1);4!==t&&0!==t||r++}return r*n},t.getPenaltyN3=function getPenaltyN3(e){const t=e.size;let r=0,n=0,a=0;for(let i=0;i<t;i++){n=a=0;for(let o=0;o<t;o++)n=n<<1&2047|e.get(i,o),o>=10&&(1488===n||93===n)&&r++,a=a<<1&2047|e.get(o,i),o>=10&&(1488===a||93===a)&&r++}return r*i},t.getPenaltyN4=function getPenaltyN4(e){let t=0;const r=e.data.length;for(let n=0;n<r;n++)t+=e.data[n];return Math.abs(Math.ceil(100*t/r/5)-10)*a},t.applyMask=function applyMask(e,t){const r=t.size;for(let n=0;n<r;n++)for(let i=0;i<r;i++)t.isReserved(i,n)||t.xor(i,n,getMaskAt(e,i,n))},t.getBestMask=function getBestMask(e,r){const n=Object.keys(t.Patterns).length;let i=0,a=1/0;for(let o=0;o<n;o++){r(o),t.applyMask(o,e);const n=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(o,e),n<a&&(a=n,i=o)}return i}},76910:(e,t,r)=>{const n=r(43114),i=r(7007);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function getCharCountIndicator(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!n.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function getBestModeForData(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function toString(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function isValid(e){return e&&e.bit&&e.ccBits},t.from=function from(e,r){if(t.isValid(e))return e;try{return function fromString(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return r}}},41085:(e,t,r)=>{const n=r(76910);function NumericData(e){this.mode=n.NUMERIC,this.data=e.toString()}NumericData.getBitsLength=function getBitsLength(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},NumericData.prototype.getLength=function getLength(){return this.data.length},NumericData.prototype.getBitsLength=function getBitsLength(){return NumericData.getBitsLength(this.data.length)},NumericData.prototype.write=function write(e){let t,r,n;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),n=parseInt(r,10),e.put(n,10);const i=this.data.length-t;i>0&&(r=this.data.substr(t),n=parseInt(r,10),e.put(n,3*i+1))},e.exports=NumericData},26143:(e,t,r)=>{const n=r(72577);t.mul=function mul(e,t){const r=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<t.length;a++)r[i+a]^=n.mul(e[i],t[a]);return r},t.mod=function mod(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){const e=r[0];for(let i=0;i<t.length;i++)r[i]^=n.mul(t[i],e);let i=0;for(;i<r.length&&0===r[i];)i++;r=r.slice(i)}return r},t.generateECPolynomial=function generateECPolynomial(e){let r=new Uint8Array([1]);for(let i=0;i<e;i++)r=t.mul(r,new Uint8Array([1,n.exp(i)]));return r}},95115:(e,t,r)=>{const n=r(10242),i=r(64908),a=r(97245),o=r(73280),s=r(21845),c=r(76526),l=r(27126),u=r(35393),d=r(52882),f=r(23103),p=r(61642),h=r(76910),m=r(16130);function setupFormatInfo(e,t,r){const n=e.size,i=p.getEncodedBits(t,r);let a,o;for(a=0;a<15;a++)o=1==(i>>a&1),a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(n-15+a,8,o,!0),a<8?e.set(8,n-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(n-8,8,1,!0)}function createData(e,t,r){const i=new a;r.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),h.getCharCountIndicator(t.mode,e)),t.write(i)}));const o=8*(n.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const s=(o-i.getLengthInBits())/8;for(let e=0;e<s;e++)i.put(e%2?17:236,8);return function createCodewords(e,t,r){const i=n.getSymbolTotalCodewords(t),a=u.getTotalCodewordsCount(t,r),o=i-a,s=u.getBlocksCount(t,r),c=s-i%s,l=Math.floor(i/s),f=Math.floor(o/s),p=f+1,h=l-f,m=new d(h);let y=0;const g=new Array(s),v=new Array(s);let b=0;const R=new Uint8Array(e.buffer);for(let e=0;e<s;e++){const t=e<c?f:p;g[e]=R.slice(y,y+t),v[e]=m.encode(g[e]),y+=t,b=Math.max(b,t)}const C=new Uint8Array(i);let w,I,O=0;for(w=0;w<b;w++)for(I=0;I<s;I++)w<g[I].length&&(C[O++]=g[I][w]);for(w=0;w<h;w++)for(I=0;I<s;I++)C[O++]=v[I][w];return C}(i,e,t)}function createSymbol(e,t,r,i){let a;if(Array.isArray(e))a=m.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let n=t;if(!n){const t=m.rawSplit(e);n=f.getBestVersionForData(t,r)}a=m.fromString(e,n||40)}}const u=f.getBestVersionForData(a,r);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else t=u;const d=createData(t,r,a),p=n.getSymbolSize(t),h=new o(p);return function setupFinderPattern(e,t){const r=e.size,n=c.getPositions(t);for(let t=0;t<n.length;t++){const i=n[t][0],a=n[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||r<=i+t))for(let n=-1;n<=7;n++)a+n<=-1||r<=a+n||(t>=0&&t<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===t||6===t)||t>=2&&t<=4&&n>=2&&n<=4?e.set(i+t,a+n,!0,!0):e.set(i+t,a+n,!1,!0))}}(h,t),function setupTimingPattern(e){const t=e.size;for(let r=8;r<t-8;r++){const t=r%2==0;e.set(r,6,t,!0),e.set(6,r,t,!0)}}(h),function setupAlignmentPattern(e,t){const r=s.getPositions(t);for(let t=0;t<r.length;t++){const n=r[t][0],i=r[t][1];for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)-2===t||2===t||-2===r||2===r||0===t&&0===r?e.set(n+t,i+r,!0,!0):e.set(n+t,i+r,!1,!0)}}(h,t),setupFormatInfo(h,r,0),t>=7&&function setupVersionInfo(e,t){const r=e.size,n=f.getEncodedBits(t);let i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+r-8-3,o=1==(n>>t&1),e.set(i,a,o,!0),e.set(a,i,o,!0)}(h,t),function setupData(e,t){const r=e.size;let n=-1,i=r-1,a=7,o=0;for(let s=r-1;s>0;s-=2)for(6===s&&s--;;){for(let r=0;r<2;r++)if(!e.isReserved(i,s-r)){let n=!1;o<t.length&&(n=1==(t[o]>>>a&1)),e.set(i,s-r,n),a--,-1===a&&(o++,a=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}(h,d),isNaN(i)&&(i=l.getBestMask(h,setupFormatInfo.bind(null,h,r))),l.applyMask(i,h),setupFormatInfo(h,r,i),{modules:h,version:t,errorCorrectionLevel:r,maskPattern:i,segments:a}}t.create=function create(e,t){if(void 0===e||""===e)throw new Error("No input text");let r,a,o=i.M;return void 0!==t&&(o=i.from(t.errorCorrectionLevel,i.M),r=f.from(t.version),a=l.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),createSymbol(e,r,o,a)}},52882:(e,t,r)=>{const n=r(26143);function ReedSolomonEncoder(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}ReedSolomonEncoder.prototype.initialize=function initialize(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},ReedSolomonEncoder.prototype.encode=function encode(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(r,i),e}return r},e.exports=ReedSolomonEncoder},7007:(e,t)=>{const r="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";t.KANJI=new RegExp(n,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(r,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const a=new RegExp("^"+n+"$"),o=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function testKanji(e){return a.test(e)},t.testNumeric=function testNumeric(e){return o.test(e)},t.testAlphanumeric=function testAlphanumeric(e){return s.test(e)}},16130:(e,t,r)=>{const n=r(76910),i=r(41085),a=r(8260),o=r(43424),s=r(35442),c=r(7007),l=r(10242),u=r(65987);function getStringByteLength(e){return unescape(encodeURIComponent(e)).length}function getSegments(e,t,r){const n=[];let i;for(;null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function getSegmentsFromString(e){const t=getSegments(c.NUMERIC,n.NUMERIC,e),r=getSegments(c.ALPHANUMERIC,n.ALPHANUMERIC,e);let i,a;l.isKanjiModeEnabled()?(i=getSegments(c.BYTE,n.BYTE,e),a=getSegments(c.KANJI,n.KANJI,e)):(i=getSegments(c.BYTE_KANJI,n.BYTE,e),a=[]);return t.concat(r,i,a).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function getSegmentBitsLength(e,t){switch(t){case n.NUMERIC:return i.getBitsLength(e);case n.ALPHANUMERIC:return a.getBitsLength(e);case n.KANJI:return s.getBitsLength(e);case n.BYTE:return o.getBitsLength(e)}}function buildSingleSegment(e,t){let r;const c=n.getBestModeForData(e);if(r=n.from(t,c),r!==n.BYTE&&r.bit<c.bit)throw new Error('"'+e+'" cannot be encoded with mode '+n.toString(r)+".\n Suggested mode is: "+n.toString(c));switch(r!==n.KANJI||l.isKanjiModeEnabled()||(r=n.BYTE),r){case n.NUMERIC:return new i(e);case n.ALPHANUMERIC:return new a(e);case n.KANJI:return new s(e);case n.BYTE:return new o(e)}}t.fromArray=function fromArray(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(buildSingleSegment(t,null)):t.data&&e.push(buildSingleSegment(t.data,t.mode)),e}),[])},t.fromString=function fromString(e,r){const i=function buildNodes(e){const t=[];for(let r=0;r<e.length;r++){const i=e[r];switch(i.mode){case n.NUMERIC:t.push([i,{data:i.data,mode:n.ALPHANUMERIC,length:i.length},{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.ALPHANUMERIC:t.push([i,{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.KANJI:t.push([i,{data:i.data,mode:n.BYTE,length:getStringByteLength(i.data)}]);break;case n.BYTE:t.push([{data:i.data,mode:n.BYTE,length:getStringByteLength(i.data)}])}}return t}(getSegmentsFromString(e,l.isKanjiModeEnabled())),a=function buildGraph(e,t){const r={},i={start:{}};let a=["start"];for(let o=0;o<e.length;o++){const s=e[o],c=[];for(let e=0;e<s.length;e++){const l=s[e],u=""+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){const o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=getSegmentBitsLength(r[o].lastCount+l.length,l.mode)-getSegmentBitsLength(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=getSegmentBitsLength(l.length,l.mode)+4+n.getCharCountIndicator(l.mode,t))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}(i,r),o=u.find_path(a.map,"start","end"),s=[];for(let e=1;e<o.length-1;e++)s.push(a.table[o[e]].node);return t.fromArray(function mergeSegments(e){return e.reduce((function(e,t){const r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(s))},t.rawSplit=function rawSplit(e){return t.fromArray(getSegmentsFromString(e,l.isKanjiModeEnabled()))}},10242:(e,t)=>{let r;const n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function getSymbolSize(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function getSymbolTotalCodewords(e){return n[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function setToSJISFunction(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return void 0!==r},t.toSJIS=function toSJIS(e){return r(e)}},43114:(e,t)=>{t.isValid=function isValid(e){return!isNaN(e)&&e>=1&&e<=40}},23103:(e,t,r)=>{const n=r(10242),i=r(35393),a=r(64908),o=r(76910),s=r(43114),c=n.getBCHDigit(7973);function getReservedBitsCount(e,t){return o.getCharCountIndicator(e,t)+4}function getTotalBitsFromDataArray(e,t){let r=0;return e.forEach((function(e){const n=getReservedBitsCount(e.mode,t);r+=n+e.getBitsLength()})),r}t.from=function from(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function getCapacity(e,t,r){if(!s.isValid(e))throw new Error("Invalid QR Code version");void 0===r&&(r=o.BYTE);const a=8*(n.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(r===o.MIXED)return a;const c=a-getReservedBitsCount(r,e);switch(r){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function getBestVersionForData(e,r){let n;const i=a.from(r,a.M);if(Array.isArray(e)){if(e.length>1)return function getBestVersionForMixedData(e,r){for(let n=1;n<=40;n++)if(getTotalBitsFromDataArray(e,n)<=t.getCapacity(n,r,o.MIXED))return n}(e,i);if(0===e.length)return 1;n=e[0]}else n=e;return function getBestVersionForDataLength(e,r,n){for(let i=1;i<=40;i++)if(r<=t.getCapacity(i,n,e))return i}(n.mode,n.getLength(),i)},t.getEncodedBits=function getEncodedBits(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;n.getBCHDigit(t)-c>=0;)t^=7973<<n.getBCHDigit(t)-c;return e<<12|t}},6907:(e,t,r)=>{const n=r(89653);t.render=function render(e,t,r){let i=r,a=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(a=function getCanvasElement(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=n.getOptions(i);const o=n.getImageWidth(e.modules.size,i),s=a.getContext("2d"),c=s.createImageData(o,o);return n.qrToImageData(c.data,e,i),function clearCanvas(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(s,a,o),s.putImageData(c,0,0),a},t.renderToDataURL=function renderToDataURL(e,r,n){let i=n;void 0!==i||r&&r.getContext||(i=r,r=void 0),i||(i={});const a=t.render(e,r,i),o=i.type||"image/png",s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}},93776:(e,t,r)=>{const n=r(89653);function getColorAttrib(e,t){const r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function svgCmd(e,t,r){let n=e+t;return void 0!==r&&(n+=" "+r),n}t.render=function render(e,t,r){const i=n.getOptions(t),a=e.modules.size,o=e.modules.data,s=a+2*i.margin,c=i.color.light.a?"<path "+getColorAttrib(i.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",l="<path "+getColorAttrib(i.color.dark,"stroke")+' d="'+function qrToPath(e,t,r){let n="",i=0,a=!1,o=0;for(let s=0;s<e.length;s++){const c=Math.floor(s%t),l=Math.floor(s/t);c||a||(a=!0),e[s]?(o++,s>0&&c>0&&e[s-1]||(n+=a?svgCmd("M",c+r,.5+l+r):svgCmd("m",i,0),i=0,a=!1),c+1<t&&e[s+1]||(n+=svgCmd("h",o),o=0)):i++}return n}(o,a,i.margin)+'"/>',u='viewBox="0 0 '+s+" "+s+'"',d='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+u+' shape-rendering="crispEdges">'+c+l+"</svg>\n";return"function"==typeof r&&r(null,d),d}},89653:(e,t)=>{function hex2rgba(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function getOptions(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,n=e.scale||4;return{width:r,scale:r?4:n,margin:t,color:{dark:hex2rgba(e.color.dark||"#000000ff"),light:hex2rgba(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function getScale(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function getImageWidth(e,r){const n=t.getScale(e,r);return Math.floor((e+2*r.margin)*n)},t.qrToImageData=function qrToImageData(e,r,n){const i=r.modules.size,a=r.modules.data,o=t.getScale(i,n),s=Math.floor((i+2*n.margin)*o),c=n.margin*o,l=[n.color.light,n.color.dark];for(let t=0;t<s;t++)for(let r=0;r<s;r++){let u=4*(t*s+r),d=n.color.light;if(t>=c&&r>=c&&t<s-c&&r<s-c){d=l[a[Math.floor((t-c)/o)*i+Math.floor((r-c)/o)]?1:0]}e[u++]=d.r,e[u++]=d.g,e[u++]=d.b,e[u]=d.a}}},28660:()=>{var e;!function(e){!function(t){var r="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),n=makeExporter(e);function makeExporter(e,t){return function(r,n){"function"!=typeof e[r]&&Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0===r.Reflect?r.Reflect=e:n=makeExporter(r.Reflect,n),function(e){var t=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,n=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,o={__proto__:[]}instanceof Array,s=!a&&!o,c={create:a?function(){return MakeDictionary(Object.create(null))}:o?function(){return MakeDictionary({__proto__:null})}:function(){return MakeDictionary({})},has:s?function(e,r){return t.call(e,r)}:function(e,t){return t in e},get:s?function(e,r){return t.call(e,r)?e[r]:void 0}:function(e,t){return e[t]}},l=Object.getPrototypeOf(Function),u="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,d=u||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?CreateMapPolyfill():Map,f=u||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?CreateSetPolyfill():Set,p=new(u||"function"!=typeof WeakMap?CreateWeakMapPolyfill():WeakMap);function decorate(e,t,r,n){if(IsUndefined(r)){if(!IsArray(e))throw new TypeError;if(!IsConstructor(t))throw new TypeError;return DecorateConstructor(e,t)}if(!IsArray(e))throw new TypeError;if(!IsObject(t))throw new TypeError;if(!IsObject(n)&&!IsUndefined(n)&&!IsNull(n))throw new TypeError;return IsNull(n)&&(n=void 0),DecorateProperty(e,t,r=ToPropertyKey(r),n)}function metadata(e,t){function decorator(r,n){if(!IsObject(r))throw new TypeError;if(!IsUndefined(n)&&!IsPropertyKey(n))throw new TypeError;OrdinaryDefineOwnMetadata(e,t,r,n)}return decorator}function defineMetadata(e,t,r,n){if(!IsObject(r))throw new TypeError;return IsUndefined(n)||(n=ToPropertyKey(n)),OrdinaryDefineOwnMetadata(e,t,r,n)}function hasMetadata(e,t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryHasMetadata(e,t,r)}function hasOwnMetadata(e,t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryHasOwnMetadata(e,t,r)}function getMetadata(e,t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryGetMetadata(e,t,r)}function getOwnMetadata(e,t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryGetOwnMetadata(e,t,r)}function getMetadataKeys(e,t){if(!IsObject(e))throw new TypeError;return IsUndefined(t)||(t=ToPropertyKey(t)),OrdinaryMetadataKeys(e,t)}function getOwnMetadataKeys(e,t){if(!IsObject(e))throw new TypeError;return IsUndefined(t)||(t=ToPropertyKey(t)),OrdinaryOwnMetadataKeys(e,t)}function deleteMetadata(e,t,r){if(!IsObject(t))throw new TypeError;IsUndefined(r)||(r=ToPropertyKey(r));var n=GetOrCreateMetadataMap(t,r,!1);if(IsUndefined(n))return!1;if(!n.delete(e))return!1;if(n.size>0)return!0;var i=p.get(t);return i.delete(r),i.size>0||p.delete(t),!0}function DecorateConstructor(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!IsUndefined(n)&&!IsNull(n)){if(!IsConstructor(n))throw new TypeError;t=n}}return t}function DecorateProperty(e,t,r,n){for(var i=e.length-1;i>=0;--i){var a=(0,e[i])(t,r,n);if(!IsUndefined(a)&&!IsNull(a)){if(!IsObject(a))throw new TypeError;n=a}}return n}function GetOrCreateMetadataMap(e,t,r){var n=p.get(e);if(IsUndefined(n)){if(!r)return;n=new d,p.set(e,n)}var i=n.get(t);if(IsUndefined(i)){if(!r)return;i=new d,n.set(t,i)}return i}function OrdinaryHasMetadata(e,t,r){if(OrdinaryHasOwnMetadata(e,t,r))return!0;var n=OrdinaryGetPrototypeOf(t);return!IsNull(n)&&OrdinaryHasMetadata(e,n,r)}function OrdinaryHasOwnMetadata(e,t,r){var n=GetOrCreateMetadataMap(t,r,!1);return!IsUndefined(n)&&ToBoolean(n.has(e))}function OrdinaryGetMetadata(e,t,r){if(OrdinaryHasOwnMetadata(e,t,r))return OrdinaryGetOwnMetadata(e,t,r);var n=OrdinaryGetPrototypeOf(t);return IsNull(n)?void 0:OrdinaryGetMetadata(e,n,r)}function OrdinaryGetOwnMetadata(e,t,r){var n=GetOrCreateMetadataMap(t,r,!1);if(!IsUndefined(n))return n.get(e)}function OrdinaryDefineOwnMetadata(e,t,r,n){GetOrCreateMetadataMap(r,n,!0).set(e,t)}function OrdinaryMetadataKeys(e,t){var r=OrdinaryOwnMetadataKeys(e,t),n=OrdinaryGetPrototypeOf(e);if(null===n)return r;var i=OrdinaryMetadataKeys(n,t);if(i.length<=0)return r;if(r.length<=0)return i;for(var a=new f,o=[],s=0,c=r;s<c.length;s++){var l=c[s];a.has(l)||(a.add(l),o.push(l))}for(var u=0,d=i;u<d.length;u++){l=d[u];a.has(l)||(a.add(l),o.push(l))}return o}function OrdinaryOwnMetadataKeys(e,t){var r=[],n=GetOrCreateMetadataMap(e,t,!1);if(IsUndefined(n))return r;for(var i=GetIterator(n.keys()),a=0;;){var o=IteratorStep(i);if(!o)return r.length=a,r;var s=IteratorValue(o);try{r[a]=s}catch(e){try{IteratorClose(i)}finally{throw e}}a++}}function Type(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function IsUndefined(e){return void 0===e}function IsNull(e){return null===e}function IsSymbol(e){return"symbol"==typeof e}function IsObject(e){return"object"==typeof e?null!==e:"function"==typeof e}function ToPrimitive(e,t){switch(Type(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",i=GetMethod(e,n);if(void 0!==i){var a=i.call(e,r);if(IsObject(a))throw new TypeError;return a}return OrdinaryToPrimitive(e,"default"===r?"number":r)}function OrdinaryToPrimitive(e,t){if("string"===t){var r=e.toString;if(IsCallable(r))if(!IsObject(i=r.call(e)))return i;if(IsCallable(n=e.valueOf))if(!IsObject(i=n.call(e)))return i}else{var n;if(IsCallable(n=e.valueOf))if(!IsObject(i=n.call(e)))return i;var i,a=e.toString;if(IsCallable(a))if(!IsObject(i=a.call(e)))return i}throw new TypeError}function ToBoolean(e){return!!e}function ToString(e){return""+e}function ToPropertyKey(e){var t=ToPrimitive(e,3);return IsSymbol(t)?t:ToString(t)}function IsArray(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function IsCallable(e){return"function"==typeof e}function IsConstructor(e){return"function"==typeof e}function IsPropertyKey(e){switch(Type(e)){case 3:case 4:return!0;default:return!1}}function GetMethod(e,t){var r=e[t];if(null!=r){if(!IsCallable(r))throw new TypeError;return r}}function GetIterator(e){var t=GetMethod(e,i);if(!IsCallable(t))throw new TypeError;var r=t.call(e);if(!IsObject(r))throw new TypeError;return r}function IteratorValue(e){return e.value}function IteratorStep(e){var t=e.next();return!t.done&&t}function IteratorClose(e){var t=e.return;t&&t.call(e)}function OrdinaryGetPrototypeOf(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===l)return t;if(t!==l)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var i=n.constructor;return"function"!=typeof i||i===e?t:i}function CreateMapPolyfill(){var e={},t=[],r=function(){function MapIterator(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return MapIterator.prototype["@@iterator"]=function(){return this},MapIterator.prototype[i]=function(){return this},MapIterator.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},MapIterator.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},MapIterator.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},MapIterator}();return function(){function Map(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(Map.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Map.prototype.has=function(e){return this._find(e,!1)>=0},Map.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},Map.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},Map.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,i=r+1;i<n;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},Map.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},Map.prototype.keys=function(){return new r(this._keys,this._values,getKey)},Map.prototype.values=function(){return new r(this._keys,this._values,getValue)},Map.prototype.entries=function(){return new r(this._keys,this._values,getEntry)},Map.prototype["@@iterator"]=function(){return this.entries()},Map.prototype[i]=function(){return this.entries()},Map.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},Map}();function getKey(e,t){return e}function getValue(e,t){return t}function getEntry(e,t){return[e,t]}}function CreateSetPolyfill(){return function(){function Set(){this._map=new d}return Object.defineProperty(Set.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),Set.prototype.has=function(e){return this._map.has(e)},Set.prototype.add=function(e){return this._map.set(e,e),this},Set.prototype.delete=function(e){return this._map.delete(e)},Set.prototype.clear=function(){this._map.clear()},Set.prototype.keys=function(){return this._map.keys()},Set.prototype.values=function(){return this._map.values()},Set.prototype.entries=function(){return this._map.entries()},Set.prototype["@@iterator"]=function(){return this.keys()},Set.prototype[i]=function(){return this.keys()},Set}()}function CreateWeakMapPolyfill(){var e=16,r=c.create(),n=CreateUniqueKey();return function(){function WeakMap(){this._key=CreateUniqueKey()}return WeakMap.prototype.has=function(e){var t=GetOrCreateWeakMapTable(e,!1);return void 0!==t&&c.has(t,this._key)},WeakMap.prototype.get=function(e){var t=GetOrCreateWeakMapTable(e,!1);return void 0!==t?c.get(t,this._key):void 0},WeakMap.prototype.set=function(e,t){return GetOrCreateWeakMapTable(e,!0)[this._key]=t,this},WeakMap.prototype.delete=function(e){var t=GetOrCreateWeakMapTable(e,!1);return void 0!==t&&delete t[this._key]},WeakMap.prototype.clear=function(){this._key=CreateUniqueKey()},WeakMap}();function CreateUniqueKey(){var e;do{e="@@WeakMap@@"+CreateUUID()}while(c.has(r,e));return r[e]=!0,e}function GetOrCreateWeakMapTable(e,r){if(!t.call(e,n)){if(!r)return;Object.defineProperty(e,n,{value:c.create()})}return e[n]}function FillRandomBytes(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function GenRandomBytes(e){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):FillRandomBytes(new Uint8Array(e),e):FillRandomBytes(new Array(e),e)}function CreateUUID(){var t=GenRandomBytes(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var r="",n=0;n<e;++n){var i=t[n];4!==n&&6!==n&&8!==n||(r+="-"),i<16&&(r+="0"),r+=i.toString(16).toLowerCase()}return r}}function MakeDictionary(e){return e.__=void 0,delete e.__,e}e("decorate",decorate),e("metadata",metadata),e("defineMetadata",defineMetadata),e("hasMetadata",hasMetadata),e("hasOwnMetadata",hasOwnMetadata),e("getMetadata",getMetadata),e("getOwnMetadata",getOwnMetadata),e("getMetadataKeys",getMetadataKeys),e("getOwnMetadataKeys",getOwnMetadataKeys),e("deleteMetadata",deleteMetadata)}(n)}()}(e||(e={}))},94714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nameof=void 0;var n=r(6898);Object.defineProperty(t,"nameof",{enumerable:!0,get:function(){return n.nameof}})},6898:(e,t)=>{"use strict";function cleanseAssertionOperators(e){return e.replace(/[?!]/g,"")}Object.defineProperty(t,"__esModule",{value:!0}),t.nameof=void 0,t.nameof=function nameof(e,t){var r=e.toString();if(r.startsWith("class ")&&!r.startsWith("class =>"))return cleanseAssertionOperators(r.substring("class ".length,r.indexOf(" {")));if(r.includes("=>"))return cleanseAssertionOperators(r.substring(r.indexOf(".")+1));var n=r.match(/function\s*\(\w+\)\s*\{[\r\n\s]*return\s+\w+\.((\w+\.)*(\w+))/i);if(n)return t&&t.lastProp?n[3]:n[1];if(r.startsWith("function "))return cleanseAssertionOperators(r.substring("function ".length,r.indexOf("(")));throw new Error("ts-simple-nameof: Invalid function.")}},51694:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(25519),i=r(22866),a=r(29208),o=r(31468);class IoCBindConfig{constructor(e,t,r){this.source=e,this.instanceFactory=t,this.valueFactory=r}to(e){n.InjectorHandler.checkType(e);const t=n.InjectorHandler.getConstructorFromType(e);return this.targetSource=t,this.source===t?this.factory((t=>{const r=this.getParameters(t),n=this.decoratedConstructor||e;return r?new n(...r):new n})):this.factory((t=>this.instanceFactory(e,t))),this}factory(e){return this.iocFactory=t=>{const r=n.InjectorHandler.unblockInstantiation(),i=this.decoratedConstructor||this.targetSource||this.source;n.InjectorHandler.injectContext(i,t);const a=e(t);return n.InjectorHandler.removeContext(i),n.InjectorHandler.injectContext(a,t),n.InjectorHandler.blockInstantiation(r),a},this.iocScope&&this.iocScope.reset(this.source),this}scope(e){return this.iocScope&&this.iocScope!==e&&this.iocScope.finish(this.source),this.iocScope=e,this.iocScope&&this.iocScope.init(this.source),this}withParams(...e){return this.paramTypes=e,this}instrumentConstructor(){const e=n.InjectorHandler.instrumentConstructor(this.source);return this.decoratedConstructor=e,this.source.constructor=e,this}getInstance(e){return this.iocScope||this.scope(i.Scope.Local),this.iocScope.resolve(this.iocFactory,this.source,e)}clone(){const e=new IoCBindConfig(this.source,this.instanceFactory,this.valueFactory);return e.iocFactory=this.iocFactory,e.iocScope=this.iocScope,e.targetSource=this.targetSource,e.paramTypes=this.paramTypes,e.decoratedConstructor=this.decoratedConstructor,e}getParameters(e){return this.paramTypes?this.paramTypes.map((t=>"string"==typeof t||t instanceof String?this.valueFactory(t):this.instanceFactory(t,e))):null}}t.IoCBindConfig=IoCBindConfig;class IoCBindValueConfig{constructor(e){this.name=e}to(e){return this.path?(this.value=this.value||{},o(this.value,this.path,e)):this.value=e,this}getValue(){return this.path?a(this.value,this.path):this.value}clone(){const e=new IoCBindValueConfig(this.name);return e.path=this.path,e.value=this.value,e}}t.IoCBindValueConfig=IoCBindValueConfig;class PropertyPath{constructor(e,t){this.name=e,this.path=t}static parse(e){const t=e.indexOf(".");if(t<0)return new PropertyPath(e);if(0===t)throw new TypeError(`Invalid value [${e}] passed to Container.bindName`);return t+1<e.length?new PropertyPath(e.substring(0,t),e.substring(t+1)):new PropertyPath(e.substring(0,t))}}t.PropertyPath=PropertyPath},26878:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ContainerNamespaces=class ContainerNamespaces{constructor(){this.defaultNamespace=new NamespaceBindings(null),this.namespaces=new Map}get(e){let t;return this.currentNamespace&&(t=this.currentNamespace.get(e),t)?t:this.defaultNamespace.get(e)}set(e,t){(this.currentNamespace||this.defaultNamespace).set(e,t)}getValue(e){let t;return this.currentNamespace&&(t=this.currentNamespace.getValue(e),t)?t:this.defaultNamespace.getValue(e)}setValue(e,t){(this.currentNamespace||this.defaultNamespace).setValue(e,t)}selectNamespace(e){if(e){let t=this.namespaces.get(e);t||(t=new NamespaceBindings(e),this.namespaces.set(e,t)),this.currentNamespace=t}else this.currentNamespace=null}removeNamespace(e){const t=this.namespaces.get(e);t&&(this.currentNamespace&&t.name===this.currentNamespace.name&&(this.currentNamespace=null),t.clear(),this.namespaces.delete(e))}selectedNamespace(){return this.currentNamespace?this.currentNamespace.name:null}};class NamespaceBindings{constructor(e){this.bindings=new Map,this.values=new Map,this.name=e}get(e){return this.bindings.get(e)}set(e,t){t.namespace=this.name,this.bindings.set(e,t)}getValue(e){return this.values.get(e)}setValue(e,t){t.namespace=this.name,this.values.set(e,t)}clear(){this.bindings.clear(),this.values.clear()}}},45729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(25519),i=r(51694),a=r(26878);class IoCContainer{static bind(e,t=!1){n.InjectorHandler.checkType(e);const r=n.InjectorHandler.getConstructorFromType(e);let a=IoCContainer.namespaces.get(r);return a?t||a.namespace===IoCContainer.namespaces.selectedNamespace()||(a=a.clone(),IoCContainer.namespaces.set(r,a)):(a=new i.IoCBindConfig(r,IoCContainer.get,IoCContainer.getValue),a.to(e),IoCContainer.namespaces.set(r,a)),a}static bindName(e,t=!1){n.InjectorHandler.checkName(e);const r=i.PropertyPath.parse(e);let a=IoCContainer.namespaces.getValue(r.name);return a?t||a.namespace===IoCContainer.namespaces.selectedNamespace()||(a=a.clone(),IoCContainer.namespaces.setValue(r.name,a)):(a=new i.IoCBindValueConfig(r.name),IoCContainer.namespaces.setValue(r.name,a)),a.path=r.path,a}static get(e,t){const r=IoCContainer.bind(e,!0);return r.iocFactory||r.to(r.source),r.getInstance(t)}static getValue(e){return IoCContainer.bindName(e,!0).getValue()}static getType(e){n.InjectorHandler.checkType(e);const t=n.InjectorHandler.getConstructorFromType(e),r=IoCContainer.namespaces.get(t);if(!r)throw new TypeError(`The type ${e.name} hasn't been registered with the IOC Container`);return r.targetSource||r.source}static namespace(e){return IoCContainer.namespaces.selectNamespace(e),{remove:()=>{e&&IoCContainer.namespaces.removeNamespace(e)}}}static selectedNamespace(){return IoCContainer.namespaces.selectedNamespace()}static injectProperty(e,t,r){n.InjectorHandler.injectProperty(e,t,r,IoCContainer.get)}static injectValueProperty(e,t,r){n.InjectorHandler.injectValueProperty(e,t,r,IoCContainer.getValue)}static snapshot(){const e="_snapshot-"+IoCContainer.snapshotsCount++,t=IoCContainer.namespace(e);return{restore:()=>t.remove(),select:()=>IoCContainer.namespace(e)}}}t.IoCContainer=IoCContainer,IoCContainer.namespaces=new a.ContainerNamespaces,IoCContainer.snapshotsCount=0},25519:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class InjectorHandler{static instrumentConstructor(e){let t;return t=class ioc_wrapper extends e{constructor(...e){super(...e),InjectorHandler.assertInstantiable()}},t.__parent=e,t}static blockInstantiation(e){InjectorHandler.instantiationsBlocked=e}static unblockInstantiation(){const e=InjectorHandler.instantiationsBlocked;return InjectorHandler.instantiationsBlocked=!1,e}static getConstructorFromType(e){let t=e;if(this.hasNamedConstructor(t))return t;for(t=t.__parent;t;){if(this.hasNamedConstructor(t))return t;t=t.__parent}throw TypeError("Can not identify the base Type for requested target "+e.toString())}static checkType(e){if(!e)throw new TypeError("Invalid type requested to IoC container. Type is not defined.")}static checkName(e){if(!e)throw new TypeError("Invalid name requested to IoC container. Name is not defined.")}static injectContext(e,t){e.__BuildContext=t}static removeContext(e){delete e.__BuildContext}static injectProperty(e,t,r,n){const i=`__${t}`;Object.defineProperty(e.prototype,t,{enumerable:!0,get:function(){const t=this.__BuildContext||e.__BuildContext;return this[i]?this[i]:this[i]=n(r,t)},set:function(e){this[i]=e}})}static injectValueProperty(e,t,r,n){const i=`__${t}`;Object.defineProperty(e.prototype,t,{enumerable:!0,get:function(){return this[i]?this[i]:this[i]=n(r)},set:function(e){this[i]=e}})}static hasNamedConstructor(e){if(e.name)return"ioc_wrapper"!==e.name;try{const t=e.prototype.constructor.toString().match(this.constructorNameRegEx)[1];return t&&"ioc_wrapper"!==t}catch(e){}return!1}static assertInstantiable(){if(InjectorHandler.instantiationsBlocked)throw new TypeError("Can not instantiate it. The instantiation is blocked for this class. Ask Container for it, using Container.get")}}t.InjectorHandler=InjectorHandler,InjectorHandler.constructorNameRegEx=/function (\w*)/,InjectorHandler.instantiationsBlocked=!0},63415:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(28660);const n=r(45729),i=r(22866);function InjectPropertyDecorator(e,t){let r=Reflect.getMetadata("design:type",e,t);r||(r=Reflect.getMetadata("design:type",e.constructor,t)),n.IoCContainer.injectProperty(e.constructor,t,r)}function InjectParamDecorator(e,t,r){if(!t){const t=n.IoCContainer.bind(e);t.paramTypes=t.paramTypes||[];const i=Reflect.getMetadata("design:paramtypes",e);t.paramTypes.unshift(i[r])}}function InjectValuePropertyDecorator(e,t,r){n.IoCContainer.injectValueProperty(e.constructor,t,r)}function InjectValueParamDecorator(e,t,r,i){if(!t){const t=n.IoCContainer.bind(e);t.paramTypes=t.paramTypes||[],t.paramTypes.unshift(i)}}t.InRequestScope=function InRequestScope(e){n.IoCContainer.bind(e).scope(i.Scope.Request)},t.Singleton=function Singleton(e){n.IoCContainer.bind(e).scope(i.Scope.Singleton)},t.OnlyInstantiableByContainer=function OnlyInstantiableByContainer(e){return n.IoCContainer.bind(e).instrumentConstructor().decoratedConstructor},t.Scoped=function Scoped(e){return t=>{n.IoCContainer.bind(t).scope(e)}},t.Factory=function Factory(e){return t=>{n.IoCContainer.bind(t).factory(e)}},t.Inject=function Inject(...e){if(2===e.length||3===e.length&&void 0===e[2])return InjectPropertyDecorator.apply(this,e);if(3===e.length&&"number"==typeof e[2])return InjectParamDecorator.apply(this,e);throw new TypeError("Invalid @Inject Decorator declaration.")},t.InjectValue=function InjectValue(e){return(...t)=>{if(2===t.length||3===t.length&&void 0===t[2]){const r=[...t,e].filter((e=>!!e));return InjectValuePropertyDecorator.apply(this,r)}if(3===t.length&&"number"==typeof t[2])return InjectValueParamDecorator.apply(this,[...t,e]);throw new TypeError("Invalid @InjectValue Decorator declaration.")}}},22866:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Scope=class Scope{reset(e){}init(e){}finish(e){}};t.BuildContext=class BuildContext{}},52464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(25519),i=r(22866);class LocalScope extends i.Scope{resolve(e,t,r){return e(r)}}t.LocalScope=LocalScope;class SingletonScope extends i.Scope{resolve(e,t,r){let n=SingletonScope.instances.get(t);return n||(n=e(r),SingletonScope.instances.set(t,n)),n}reset(e){SingletonScope.instances.delete(n.InjectorHandler.getConstructorFromType(e))}init(e){this.reset(e)}finish(e){this.reset(e)}}t.SingletonScope=SingletonScope,SingletonScope.instances=new Map;class RequestScope extends i.Scope{resolve(e,t,r){return this.ensureContext(r),r.build(t,e)}ensureContext(e){if(!e)throw new TypeError("IoC Container can not handle this request. When using @InRequestScope in any dependent type, you should be askking to Container to create the instances through Container.get and not calling the type constructor directly.")}}t.RequestScope=RequestScope},7071:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(28660);const n=r(22866);t.Scope=n.Scope,t.BuildContext=n.BuildContext;const i=r(45729),a=r(52464);var o=r(63415);t.Inject=o.Inject,t.Factory=o.Factory,t.Singleton=o.Singleton,t.Scoped=o.Scoped,t.OnlyInstantiableByContainer=o.OnlyInstantiableByContainer,t.InRequestScope=o.InRequestScope,t.InjectValue=o.InjectValue,n.Scope.Local=new a.LocalScope,n.Scope.Singleton=new a.SingletonScope,n.Scope.Request=new a.RequestScope;class Container{static bind(e){return i.IoCContainer.bind(e)}static get(e){return i.IoCContainer.get(e,new ContainerBuildContext)}static getType(e){return i.IoCContainer.getType(e)}static bindName(e){return i.IoCContainer.bindName(e)}static getValue(e){return i.IoCContainer.getValue(e)}static namespace(e){return i.IoCContainer.namespace(e)}static environment(e){return Container.namespace(e)}static snapshot(e){return i.IoCContainer.snapshot()}static configure(...e){e.forEach((e=>{e.bind?Container.configureType(e):e.bindName?Container.configureConstant(e):(e.env||e.namespace)&&Container.configureNamespace(e)}))}static configureNamespace(e){const t=i.IoCContainer.selectedNamespace(),r=e.env||e.namespace;Object.keys(r).forEach((e=>{Container.namespace(e);const t=r[e];Container.configure(...t)})),Container.namespace(t)}static configureConstant(e){const t=i.IoCContainer.bindName(e.bindName);t&&e.to&&t.to(e.to)}static configureType(e){const t=i.IoCContainer.bind(e.bind);t&&(e.to?t.to(e.to):e.factory&&t.factory(e.factory),e.scope&&t.scope(e.scope),e.withParams&&t.withParams(e.withParams))}}t.Container=Container;class ContainerBuildContext extends n.BuildContext{constructor(){super(...arguments),this.context=new Map}build(e,t){let r=this.context.get(e);return r||(r=t(this),this.context.set(e,r)),r}resolve(e){return i.IoCContainer.get(e,this)}}},60540:function(e,t){!function(e){"use strict";function merge(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function subexp(e){return"(?:"+e+")"}function typeOf(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(e){return e.toUpperCase()}function toArray(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function assign(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function buildExps(e){var t="[A-Za-z]",r="[0-9]",n=merge(r,"[A-Fa-f]"),i=subexp(subexp("%[EFef]"+n+"%"+n+n+"%"+n+n)+"|"+subexp("%[89A-Fa-f]"+n+"%"+n+n)+"|"+subexp("%"+n+n)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",o=merge("[\\:\\/\\?\\#\\[\\]\\@]",a),s=e?"[\\uE000-\\uF8FF]":"[]",c=merge(t,r,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),l=subexp(t+merge(t,r,"[\\+\\-\\.]")+"*"),u=subexp(subexp(i+"|"+merge(c,a,"[\\:]"))+"*"),d=(subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+r)+"|"+subexp("1"+r+r)+"|"+subexp("[1-9]"+r)+"|"+r),subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+r)+"|"+subexp("1"+r+r)+"|"+subexp("0?[1-9]"+r)+"|0?0?"+r)),f=subexp(d+"\\."+d+"\\."+d+"\\."+d),p=subexp(n+"{1,4}"),h=subexp(subexp(p+"\\:"+p)+"|"+f),m=subexp(subexp(p+"\\:")+"{6}"+h),y=subexp("\\:\\:"+subexp(p+"\\:")+"{5}"+h),g=subexp(subexp(p)+"?\\:\\:"+subexp(p+"\\:")+"{4}"+h),v=subexp(subexp(subexp(p+"\\:")+"{0,1}"+p)+"?\\:\\:"+subexp(p+"\\:")+"{3}"+h),b=subexp(subexp(subexp(p+"\\:")+"{0,2}"+p)+"?\\:\\:"+subexp(p+"\\:")+"{2}"+h),R=subexp(subexp(subexp(p+"\\:")+"{0,3}"+p)+"?\\:\\:"+p+"\\:"+h),C=subexp(subexp(subexp(p+"\\:")+"{0,4}"+p)+"?\\:\\:"+h),w=subexp(subexp(subexp(p+"\\:")+"{0,5}"+p)+"?\\:\\:"+p),I=subexp(subexp(subexp(p+"\\:")+"{0,6}"+p)+"?\\:\\:"),O=subexp([m,y,g,v,b,R,C,w,I].join("|")),S=subexp(subexp(c+"|"+i)+"+"),j=(subexp(O+"\\%25"+S),subexp(O+subexp("\\%25|\\%(?!"+n+"{2})")+S)),T=subexp("[vV]"+n+"+\\."+merge(c,a,"[\\:]")+"+"),P=subexp("\\["+subexp(j+"|"+O+"|"+T)+"\\]"),D=subexp(subexp(i+"|"+merge(c,a))+"*"),x=subexp(P+"|"+f+"(?!"+D+")|"+D),E=subexp(r+"*"),$=subexp(subexp(u+"@")+"?"+x+subexp("\\:"+E)+"?"),M=subexp(i+"|"+merge(c,a,"[\\:\\@]")),A=subexp(M+"*"),k=subexp(M+"+"),N=subexp(subexp(i+"|"+merge(c,a,"[\\@]"))+"+"),q=subexp(subexp("\\/"+A)+"*"),V=subexp("\\/"+subexp(k+q)+"?"),F=subexp(N+q),U=subexp(k+q),B="(?!"+M+")",L=(subexp(q+"|"+V+"|"+F+"|"+U+"|"+B),subexp(subexp(M+"|"+merge("[\\/\\?]",s))+"*")),G=subexp(subexp(M+"|[\\/\\?]")+"*"),z=subexp(subexp("\\/\\/"+$+q)+"|"+V+"|"+U+"|"+B),K=subexp(l+"\\:"+z+subexp("\\?"+L)+"?"+subexp("\\#"+G)+"?"),H=subexp(subexp("\\/\\/"+$+q)+"|"+V+"|"+F+"|"+B),Z=subexp(H+subexp("\\?"+L)+"?"+subexp("\\#"+G)+"?");return subexp(K+"|"+Z),subexp(l+"\\:"+z+subexp("\\?"+L)+"?"),subexp(subexp("\\/\\/("+subexp("("+u+")@")+"?("+x+")"+subexp("\\:("+E+")")+"?)")+"?("+q+"|"+V+"|"+U+"|"+B+")"),subexp("\\?("+L+")"),subexp("\\#("+G+")"),subexp(subexp("\\/\\/("+subexp("("+u+")@")+"?("+x+")"+subexp("\\:("+E+")")+"?)")+"?("+q+"|"+V+"|"+F+"|"+B+")"),subexp("\\?("+L+")"),subexp("\\#("+G+")"),subexp(subexp("\\/\\/("+subexp("("+u+")@")+"?("+x+")"+subexp("\\:("+E+")")+"?)")+"?("+q+"|"+V+"|"+U+"|"+B+")"),subexp("\\?("+L+")"),subexp("\\#("+G+")"),subexp("("+u+")@"),subexp("\\:("+E+")"),{NOT_SCHEME:new RegExp(merge("[^]",t,r,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",c,a),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",c,a),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",c,a),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",c,a),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",c,a,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",c,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",c,a),"g"),UNRESERVED:new RegExp(c,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",c,o),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+subexp(subexp("\\%25|\\%(?!"+n+"{2})")+"("+S+")")+"?\\]?$")}}var t=buildExps(!1),r=buildExps(!0),n=function(){function sliceIterator(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return sliceIterator(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},i=2147483647,a=36,o=1,s=26,c=38,l=700,u=72,d=128,f="-",p=/^xn--/,h=/[^\0-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=a-o,v=Math.floor,b=String.fromCharCode;function error$1(e){throw new RangeError(y[e])}function map(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function mapDomain(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+map((e=e.replace(m,".")).split("."),t).join(".")}function ucs2decode(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),r--)}else t.push(i)}return t}var R=function basicToDigit(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:a},C=function digitToBasic(e,t){return e+22+75*(e<26)-((0!=t)<<5)},w=function adapt(e,t,r){var n=0;for(e=r?v(e/l):e>>1,e+=v(e/t);e>g*s>>1;n+=a)e=v(e/g);return v(n+(g+1)*e/(e+c))},I=function decode(e){var t=[],r=e.length,n=0,c=d,l=u,p=e.lastIndexOf(f);p<0&&(p=0);for(var h=0;h<p;++h)e.charCodeAt(h)>=128&&error$1("not-basic"),t.push(e.charCodeAt(h));for(var m=p>0?p+1:0;m<r;){for(var y=n,g=1,b=a;;b+=a){m>=r&&error$1("invalid-input");var C=R(e.charCodeAt(m++));(C>=a||C>v((i-n)/g))&&error$1("overflow"),n+=C*g;var I=b<=l?o:b>=l+s?s:b-l;if(C<I)break;var O=a-I;g>v(i/O)&&error$1("overflow"),g*=O}var S=t.length+1;l=w(n-y,S,0==y),v(n/S)>i-c&&error$1("overflow"),c+=v(n/S),n%=S,t.splice(n++,0,c)}return String.fromCodePoint.apply(String,t)},O=function encode(e){var t=[],r=(e=ucs2decode(e)).length,n=d,c=0,l=u,p=!0,h=!1,m=void 0;try{for(var y,g=e[Symbol.iterator]();!(p=(y=g.next()).done);p=!0){var R=y.value;R<128&&t.push(b(R))}}catch(e){h=!0,m=e}finally{try{!p&&g.return&&g.return()}finally{if(h)throw m}}var I=t.length,O=I;for(I&&t.push(f);O<r;){var S=i,j=!0,T=!1,P=void 0;try{for(var D,x=e[Symbol.iterator]();!(j=(D=x.next()).done);j=!0){var E=D.value;E>=n&&E<S&&(S=E)}}catch(e){T=!0,P=e}finally{try{!j&&x.return&&x.return()}finally{if(T)throw P}}var $=O+1;S-n>v((i-c)/$)&&error$1("overflow"),c+=(S-n)*$,n=S;var M=!0,A=!1,k=void 0;try{for(var N,q=e[Symbol.iterator]();!(M=(N=q.next()).done);M=!0){var V=N.value;if(V<n&&++c>i&&error$1("overflow"),V==n){for(var F=c,U=a;;U+=a){var B=U<=l?o:U>=l+s?s:U-l;if(F<B)break;var L=F-B,G=a-B;t.push(b(C(B+L%G,0))),F=v(L/G)}t.push(b(C(F,0))),l=w(c,$,O==I),c=0,++O}}}catch(e){A=!0,k=e}finally{try{!M&&q.return&&q.return()}finally{if(A)throw k}}++c,++n}return t.join("")},S=function toUnicode(e){return mapDomain(e,(function(e){return p.test(e)?I(e.slice(4).toLowerCase()):e}))},j=function toASCII(e){return mapDomain(e,(function(e){return h.test(e)?"xn--"+O(e):e}))},T={version:"2.1.0",ucs2:{decode:ucs2decode,encode:function ucs2encode(e){return String.fromCodePoint.apply(String,toConsumableArray(e))}},decode:I,encode:O,toASCII:j,toUnicode:S},P={};function pctEncChar(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function pctDecChars(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&a)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var o=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function _normalizeComponentEncoding(e,t){function decodeUnreserved(e){var r=pctDecChars(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_USERINFO,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_HOST,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,decodeUnreserved).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_QUERY,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_FRAGMENT,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,t){var r=e.match(t.IPV4ADDRESS)||[],i=n(r,2)[1];return i?i.split(".").map(_stripLeadingZeros).join("."):e}function _normalizeIPv6(e,t){var r=e.match(t.IPV6ADDRESS)||[],i=n(r,3),a=i[1],o=i[2];if(a){for(var s=a.toLowerCase().split("::").reverse(),c=n(s,2),l=c[0],u=c[1],d=u?u.split(":").map(_stripLeadingZeros):[],f=l.split(":").map(_stripLeadingZeros),p=t.IPV4ADDRESS.test(f[f.length-1]),h=p?7:8,m=f.length-h,y=Array(h),g=0;g<h;++g)y[g]=d[g]||f[m+g]||"";p&&(y[h-1]=_normalizeIPv4(y[h-1],t));var v=y.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(v&&v.length>1){var R=y.slice(0,v.index),C=y.slice(v.index+v.length);b=R.join(":")+"::"+C.join(":")}else b=y.join(":");return o&&(b+="%"+o),b}return e}var D=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,x=void 0==="".match(/(){0}/)[1];function parse(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={},a=!1!==n.iri?r:t;"suffix"===n.reference&&(e=(n.scheme?n.scheme+":":"")+"//"+e);var o=e.match(D);if(o){x?(i.scheme=o[1],i.userinfo=o[3],i.host=o[4],i.port=parseInt(o[5],10),i.path=o[6]||"",i.query=o[7],i.fragment=o[8],isNaN(i.port)&&(i.port=o[5])):(i.scheme=o[1]||void 0,i.userinfo=-1!==e.indexOf("@")?o[3]:void 0,i.host=-1!==e.indexOf("//")?o[4]:void 0,i.port=parseInt(o[5],10),i.path=o[6]||"",i.query=-1!==e.indexOf("?")?o[7]:void 0,i.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(i.port)&&(i.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),i.host&&(i.host=_normalizeIPv6(_normalizeIPv4(i.host,a),a)),void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||i.path||void 0!==i.query?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",n.reference&&"suffix"!==n.reference&&n.reference!==i.reference&&(i.error=i.error||"URI is not a "+n.reference+" reference.");var s=P[(n.scheme||i.scheme||"").toLowerCase()];if(n.unicodeSupport||s&&s.unicodeSupport)_normalizeComponentEncoding(i,a);else{if(i.host&&(n.domainHost||s&&s.domainHost))try{i.host=T.toASCII(i.host.replace(a.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII via punycode: "+e}_normalizeComponentEncoding(i,t)}s&&s.parse&&s.parse(i,n)}else i.error=i.error||"URI can not be parsed.";return i}function _recomposeAuthority(e,n){var i=!1!==n.iri?r:t,a=[];return void 0!==e.userinfo&&(a.push(e.userinfo),a.push("@")),void 0!==e.host&&a.push(_normalizeIPv6(_normalizeIPv4(String(e.host),i),i).replace(i.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(a.push(":"),a.push(String(e.port))),a.length?a.join(""):void 0}var E=/^\.\.?\//,$=/^\/\.(\/|$)/,M=/^\/\.\.(\/|$)/,A=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){for(var t=[];e.length;)if(e.match(E))e=e.replace(E,"");else if(e.match($))e=e.replace($,"/");else if(e.match(M))e=e.replace(M,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(A);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function serialize(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.iri?r:t,a=[],o=P[(n.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,n),e.host)if(i.IPV6ADDRESS.test(e.host));else if(n.domainHost||o&&o.domainHost)try{e.host=n.iri?T.toUnicode(e.host):T.toASCII(e.host.replace(i.PCT_ENCODED,pctDecChars).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(n.iri?"Unicode":"ASCII")+" via punycode: "+t}_normalizeComponentEncoding(e,i),"suffix"!==n.reference&&e.scheme&&(a.push(e.scheme),a.push(":"));var s=_recomposeAuthority(e,n);if(void 0!==s&&("suffix"!==n.reference&&a.push("//"),a.push(s),e.path&&"/"!==e.path.charAt(0)&&a.push("/")),void 0!==e.path){var c=e.path;n.absolutePath||o&&o.absolutePath||(c=removeDotSegments(c)),void 0===s&&(c=c.replace(/^\/\//,"/%2F")),a.push(c)}return void 0!==e.query&&(a.push("?"),a.push(e.query)),void 0!==e.fragment&&(a.push("#"),a.push(e.fragment)),a.join("")}function resolveComponents(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=parse(serialize(e,r),r),t=parse(serialize(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=removeDotSegments(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=removeDotSegments(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=removeDotSegments(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=removeDotSegments(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function resolve(e,t,r){var n=assign({scheme:"null"},r);return serialize(resolveComponents(parse(e,n),parse(t,n),n,!0),n)}function normalize(e,t){return"string"==typeof e?e=serialize(parse(e,t),t):"object"===typeOf(e)&&(e=parse(serialize(e,t),t)),e}function equal(e,t,r){return"string"==typeof e?e=serialize(parse(e,r),r):"object"===typeOf(e)&&(e=serialize(e,r)),"string"==typeof t?t=serialize(parse(t,r),r):"object"===typeOf(t)&&(t=serialize(t,r)),e===t}function escapeComponent(e,n){return e&&e.toString().replace(n&&n.iri?r.ESCAPE:t.ESCAPE,pctEncChar)}function unescapeComponent(e,n){return e&&e.toString().replace(n&&n.iri?r.PCT_ENCODED:t.PCT_ENCODED,pctDecChars)}var k={scheme:"http",domainHost:!0,parse:function parse(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function serialize(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},N={scheme:"https",domainHost:k.domainHost,parse:k.parse,serialize:k.serialize};function isSecure(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var q={scheme:"ws",domainHost:!0,parse:function parse(e,t){var r=e;return r.secure=isSecure(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function serialize(e,t){if(e.port!==(isSecure(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),i=n(r,2),a=i[0],o=i[1];e.path=a&&"/"!==a?a:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},V={scheme:"wss",domainHost:q.domainHost,parse:q.parse,serialize:q.serialize},F={},U="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",B="[0-9A-Fa-f]",L=subexp(subexp("%[EFef]"+B+"%"+B+B+"%"+B+B)+"|"+subexp("%[89A-Fa-f]"+B+"%"+B+B)+"|"+subexp("%"+B+B)),G="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",z=merge("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),K="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",H=new RegExp(U,"g"),Z=new RegExp(L,"g"),W=new RegExp(merge("[^]",G,"[\\.]",'[\\"]',z),"g"),J=new RegExp(merge("[^]",U,K),"g"),Q=J;function decodeUnreserved(e){var t=pctDecChars(e);return t.match(H)?t:e}var Y={scheme:"mailto",parse:function parse$$1(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,a={},o=r.query.split("&"),s=0,c=o.length;s<c;++s){var l=o[s].split("=");switch(l[0]){case"to":for(var u=l[1].split(","),d=0,f=u.length;d<f;++d)n.push(u[d]);break;case"subject":r.subject=unescapeComponent(l[1],t);break;case"body":r.body=unescapeComponent(l[1],t);break;default:i=!0,a[unescapeComponent(l[0],t)]=unescapeComponent(l[1],t)}}i&&(r.headers=a)}r.query=void 0;for(var p=0,h=n.length;p<h;++p){var m=n[p].split("@");if(m[0]=unescapeComponent(m[0]),t.unicodeSupport)m[1]=unescapeComponent(m[1],t).toLowerCase();else try{m[1]=T.toASCII(unescapeComponent(m[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[p]=m.join("@")}return r},serialize:function serialize$$1(e,t){var r=e,n=toArray(e.to);if(n){for(var i=0,a=n.length;i<a;++i){var o=String(n[i]),s=o.lastIndexOf("@"),c=o.slice(0,s).replace(Z,decodeUnreserved).replace(Z,toUpperCase).replace(W,pctEncChar),l=o.slice(s+1);try{l=t.iri?T.toUnicode(l):T.toASCII(unescapeComponent(l,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=c+"@"+l}r.path=n.join(",")}var u=e.headers=e.headers||{};e.subject&&(u.subject=e.subject),e.body&&(u.body=e.body);var d=[];for(var f in u)u[f]!==F[f]&&d.push(f.replace(Z,decodeUnreserved).replace(Z,toUpperCase).replace(J,pctEncChar)+"="+u[f].replace(Z,decodeUnreserved).replace(Z,toUpperCase).replace(Q,pctEncChar));return d.length&&(r.query=d.join("&")),r}},X=/^([^\:]+)\:(.*)/,ee={scheme:"urn",parse:function parse$$1(e,t){var r=e.path&&e.path.match(X),n=e;if(r){var i=t.scheme||n.scheme||"urn",a=r[1].toLowerCase(),o=r[2],s=i+":"+(t.nid||a),c=P[s];n.nid=a,n.nss=o,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function serialize$$1(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),a=P[i];a&&(e=a.serialize(e,t));var o=e,s=e.nss;return o.path=(n||t.nid)+":"+s,o}},te=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,re={scheme:"urn:uuid",parse:function parse(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(te)||(r.error=r.error||"UUID is not valid."),r},serialize:function serialize(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};P[k.scheme]=k,P[N.scheme]=N,P[q.scheme]=q,P[V.scheme]=V,P[Y.scheme]=Y,P[ee.scheme]=ee,P[re.scheme]=re,e.SCHEMES=P,e.pctEncChar=pctEncChar,e.pctDecChars=pctDecChars,e.parse=parse,e.removeDotSegments=removeDotSegments,e.serialize=serialize,e.resolveComponents=resolveComponents,e.resolve=resolve,e.normalize=normalize,e.equal=equal,e.escapeComponent=escapeComponent,e.unescapeComponent=unescapeComponent,Object.defineProperty(e,"__esModule",{value:!0})}(t)},48966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=_interopRequireDefault(r(8469)),i=_interopRequireDefault(r(77536)),a=_interopRequireDefault(r(21359)),o=_interopRequireDefault(r(557)),s=_interopRequireDefault(r(2315)),c=_interopRequireDefault(r(89466)),l=_interopRequireDefault(r(30661)),u=_interopRequireDefault(r(83868)),d=_interopRequireDefault(r(2492)),f=_interopRequireDefault(r(28999)),p=_interopRequireDefault(r(61028)),h=_interopRequireDefault(r(10221)),m=_interopRequireDefault(r(99493)),y=_interopRequireDefault(r(19234)),g=_interopRequireDefault(r(94583)),v=_interopRequireDefault(r(24986)),b=_interopRequireDefault(r(43928)),R=_interopRequireDefault(r(57245)),C=_interopRequireDefault(r(64094)),w=_interopRequireDefault(r(77146)),I=_interopRequireDefault(r(82941)),O=_interopRequireDefault(r(49019)),S=_interopRequireDefault(r(13590)),j=_interopRequireDefault(r(72828)),T=_interopRequireDefault(r(20937)),P=_interopRequireDefault(r(79146)),D=_interopRequireDefault(r(85218)),x=_interopRequireDefault(r(77117)),E=_interopRequireDefault(r(58335)),$=_interopRequireDefault(r(96298)),M=_interopRequireDefault(r(34339)),A=_interopRequireDefault(r(90368)),k=_interopRequireDefault(r(81008)),N=_interopRequireDefault(r(54069)),q=_interopRequireDefault(r(20661)),V=_interopRequireDefault(r(93235)),F=_interopRequireDefault(r(57278)),U=_interopRequireDefault(r(19131)),B=_interopRequireDefault(r(93315)),L=_interopRequireDefault(r(51464)),G=_interopRequireDefault(r(27228)),z=_interopRequireDefault(r(682)),K=_interopRequireDefault(r(57148)),H=_interopRequireDefault(r(87612)),Z=_interopRequireDefault(r(29887)),W=_interopRequireDefault(r(28355)),J=_interopRequireDefault(r(90094)),Q=_interopRequireDefault(r(65061)),Y=_interopRequireDefault(r(2689)),X=_interopRequireDefault(r(98983)),ee=_interopRequireDefault(r(90478)),te=_interopRequireDefault(r(78140)),re=_interopRequireDefault(r(14959)),ne=_interopRequireDefault(r(29778)),ie=_interopRequireDefault(r(24790)),ae=_interopRequireDefault(r(5152)),oe=_interopRequireDefault(r(94816)),se=_interopRequireDefault(r(8035)),ce=_interopRequireDefault(r(34714)),le=_interopRequireDefault(r(44928)),ue=_interopRequireDefault(r(88346)),de=_interopRequireDefault(r(2900)),fe=_interopRequireDefault(r(31913));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var pe={version:"8.1.0",toDate:n.default,toFloat:i.default,toInt:a.default,toBoolean:o.default,equals:s.default,contains:c.default,matches:l.default,isEmail:u.default,isURL:d.default,isMACAddress:f.default,isIP:p.default,isFQDN:h.default,isBoolean:m.default,isAlpha:y.default,isAlphanumeric:g.default,isNumeric:v.default,isLowercase:b.default,isUppercase:R.default,isAscii:C.default,isFullWidth:w.default,isHalfWidth:I.default,isVariableWidth:O.default,isMultibyte:S.default,isSurrogatePair:j.default,isInt:T.default,isFloat:P.default,isDecimal:D.default,isHexadecimal:x.default,isDivisibleBy:E.default,isHexColor:$.default,isISRC:M.default,isMD5:A.default,isJSON:k.default,isEmpty:N.default,isLength:q.default,isByteLength:V.default,isUUID:F.default,isMongoId:U.default,isAfter:B.default,isBefore:L.default,isIn:G.default,isCreditCard:z.default,isISIN:K.default,isISBN:H.default,isISSN:Z.default,isMobilePhone:W.default,isPostalCode:te.default,isCurrency:J.default,isISO8601:Q.default,isBase64:Y.default,isDataURI:X.default,isLatLong:ee.default,ltrim:re.default,rtrim:ne.default,trim:ie.default,escape:ae.default,unescape:oe.default,stripLow:se.default,whitelist:ce.default,blacklist:le.default,isWhitelisted:ue.default,normalizeEmail:de.default,toString:fe.default};t.default=pe,e.exports=t.default},60079:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});for(var r,n=t.alpha={"en-US":/^[A-Z]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÉËÏÓÖÜ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},i=t.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nb-NO":/^[0-9A-ZÆØÅ]+$/i,"nl-NL":/^[0-9A-ZÉËÏÓÖÜ]+$/i,"nn-NO":/^[0-9A-ZÆØÅ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},a=t.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"],o=0;o<a.length;o++)n[r="en-"+a[o]]=n["en-US"],i[r]=i["en-US"];n["pt-BR"]=n["pt-PT"],i["pt-BR"]=i["pt-PT"];for(var s,c=t.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"],l=0;l<c.length;l++)n[s="ar-"+c[l]]=n.ar,i[s]=i.ar},44928:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function blacklist(e,t){return(0,n.default)(e),e.replace(new RegExp("["+t+"]+","g"),"")};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},89466:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function contains(e,t){return(0,n.default)(e),e.indexOf((0,i.default)(t))>=0};var n=_interopRequireDefault(r(65571)),i=_interopRequireDefault(r(31913));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},2315:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function equals(e,t){return(0,n.default)(e),e===t};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},5152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function escape(e){return(0,n.default)(e),e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\//g,"&#x2F;").replace(/\\/g,"&#x5C;").replace(/`/g,"&#96;")};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},93315:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isAfter(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:String(new Date);(0,n.default)(e);var r=(0,i.default)(t),a=(0,i.default)(e);return!!(a&&r&&a>r)};var n=_interopRequireDefault(r(65571)),i=_interopRequireDefault(r(8469));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},19234:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isAlpha(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";if((0,n.default)(e),t in i.alpha)return i.alpha[t].test(e);throw new Error("Invalid locale '"+t+"'")};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571)),i=r(60079);e.exports=t.default},94583:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isAlphanumeric(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";if((0,n.default)(e),t in i.alphanumeric)return i.alphanumeric[t].test(e);throw new Error("Invalid locale '"+t+"'")};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571)),i=r(60079);e.exports=t.default},64094:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isAscii(e){return(0,n.default)(e),i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^[\x00-\x7F]+$/;e.exports=t.default},2689:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isBase64(e){(0,n.default)(e);var t=e.length;if(!t||t%4!=0||i.test(e))return!1;var r=e.indexOf("=");return-1===r||r===t-1||r===t-2&&"="===e[t-1]};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/[^A-Z0-9+\/=]/i;e.exports=t.default},51464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isBefore(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:String(new Date);(0,n.default)(e);var r=(0,i.default)(t),a=(0,i.default)(e);return!!(a&&r&&a<r)};var n=_interopRequireDefault(r(65571)),i=_interopRequireDefault(r(8469));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},99493:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isBoolean(e){return(0,n.default)(e),["true","false","1","0"].indexOf(e)>=0};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},93235:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function isByteLength(e,t){(0,i.default)(e);var r=void 0,a=void 0;"object"===(void 0===t?"undefined":n(t))?(r=t.min||0,a=t.max):(r=arguments[1],a=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=r&&(void 0===a||o<=a)};var i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},682:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isCreditCard(e){(0,n.default)(e);var t=e.replace(/[- ]+/g,"");if(!i.test(t))return!1;for(var r=0,a=void 0,o=void 0,s=void 0,c=t.length-1;c>=0;c--)a=t.substring(c,c+1),o=parseInt(a,10),r+=s&&(o*=2)>=10?o%10+1:o,s=!s;return!(r%10!=0||!t)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|62[0-9]{14})$/;e.exports=t.default},90094:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isCurrency(e,t){return(0,i.default)(e),function currencyRegex(e){var t="(\\"+e.symbol.replace(/\./g,"\\.")+")"+(e.require_symbol?"":"?"),r="-?",n="[1-9]\\d{0,2}(\\"+e.thousands_separator+"\\d{3})*",i="("+["0","[1-9]\\d*",n].join("|")+")?",a="(\\"+e.decimal_separator+"\\d{2})?",o=i+a;e.allow_negatives&&!e.parens_for_negatives&&(e.negative_sign_after_digits?o+=r:e.negative_sign_before_digits&&(o=r+o));e.allow_negative_sign_placeholder?o="( (?!\\-))?"+o:e.allow_space_after_symbol?o=" ?"+o:e.allow_space_after_digits&&(o+="( (?!$))?");e.symbol_after_digits?o+=t:o=t+o;e.allow_negatives&&(e.parens_for_negatives?o="(\\("+o+"\\)|"+o+")":e.negative_sign_before_digits||e.negative_sign_after_digits||(o=r+o));return new RegExp("^(?!-? )(?=.*\\d)"+o+"$")}(t=(0,n.default)(t,a)).test(e)};var n=_interopRequireDefault(r(84808)),i=_interopRequireDefault(r(65571));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_space_after_digits:!1};e.exports=t.default},98983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isDataURI(e){return(0,n.default)(e),i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^\s*data:([a-z]+\/[a-z0-9\-\+]+(;[a-z\-]+=[a-z0-9\-]+)?)?(;base64)?,[a-z0-9!\$&',\(\)\*\+,;=\-\._~:@\/\?%\s]*\s*$/i;e.exports=t.default},85218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isDecimal(e){return(0,n.default)(e),""!==e&&i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^[-+]?([0-9]+|\.[0-9]+|[0-9]+\.[0-9]+)$/;e.exports=t.default},58335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isDivisibleBy(e,t){return(0,n.default)(e),(0,i.default)(e)%parseInt(t,10)==0};var n=_interopRequireDefault(r(65571)),i=_interopRequireDefault(r(77536));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},83868:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isEmail(e,t){if((0,n.default)(e),(t=(0,i.default)(t,s)).require_display_name||t.allow_display_name){var r=e.match(c);if(r)e=r[1];else if(t.require_display_name)return!1}var p=e.split("@"),h=p.pop(),m=p.join("@"),y=h.toLowerCase();"gmail.com"!==y&&"googlemail.com"!==y||(m=m.replace(/\./g,"").toLowerCase());if(!(0,a.default)(m,{max:64})||!(0,a.default)(h,{max:254}))return!1;if(!(0,o.default)(h,{require_tld:t.require_tld}))return!1;if('"'===m[0])return m=m.slice(1,m.length-1),t.allow_utf8_local_part?f.test(m):u.test(m);for(var g=t.allow_utf8_local_part?d:l,v=m.split("."),b=0;b<v.length;b++)if(!g.test(v[b]))return!1;return!0};var n=_interopRequireDefault(r(65571)),i=_interopRequireDefault(r(84808)),a=_interopRequireDefault(r(93235)),o=_interopRequireDefault(r(10221));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var s={allow_display_name:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},c=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\,\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,l=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,u=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,d=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,f=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;e.exports=t.default},54069:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isEmpty(e){return(0,n.default)(e),0===e.length};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},10221:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isFDQN(e,t){(0,n.default)(e),(t=(0,i.default)(t,a)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));var r=e.split(".");if(t.require_tld){var o=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(o))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(o))return!1}for(var s,c=0;c<r.length;c++){if(s=r[c],t.allow_underscores&&(s=s.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(s))return!1;if(/[\uff01-\uff5e]/.test(s))return!1;if("-"===s[0]||"-"===s[s.length-1])return!1}return!0};var n=_interopRequireDefault(r(65571)),i=_interopRequireDefault(r(84808));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1};e.exports=t.default},79146:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isFloat(e,t){if((0,n.default)(e),t=t||{},""===e||"."===e)return!1;return i.test(e)&&(!t.hasOwnProperty("min")||e>=t.min)&&(!t.hasOwnProperty("max")||e<=t.max)&&(!t.hasOwnProperty("lt")||e<t.lt)&&(!t.hasOwnProperty("gt")||e>t.gt)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^(?:[-+])?(?:[0-9]+)?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/;e.exports=t.default},77146:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fullWidth=void 0,t.default=function isFullWidth(e){return(0,n.default)(e),i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=t.fullWidth=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/},82941:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.halfWidth=void 0,t.default=function isHalfWidth(e){return(0,n.default)(e),i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=t.halfWidth=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/},96298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isHexColor(e){return(0,n.default)(e),i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i;e.exports=t.default},77117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isHexadecimal(e){return(0,n.default)(e),i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^[0-9A-F]+$/i;e.exports=t.default},61028:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isIP(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,n.default)(e),!(t=String(t)))return isIP(e,4)||isIP(e,6);if("4"===t){if(!i.test(e))return!1;var r=e.split(".").sort((function(e,t){return e-t}));return r[3]<=255}if("6"===t){var o=e.split(":"),s=!1,c=isIP(o[o.length-1],4),l=c?7:8;if(o.length>l)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(o.shift(),o.shift(),s=!0):"::"===e.substr(e.length-2)&&(o.pop(),o.pop(),s=!0);for(var u=0;u<o.length;++u)if(""===o[u]&&u>0&&u<o.length-1){if(s)return!1;s=!0}else if(c&&u===o.length-1);else if(!a.test(o[u]))return!1;return s?o.length>=1:o.length===l}return!1};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,a=/^[0-9A-F]{1,4}$/i;e.exports=t.default},87612:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isISBN(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,n.default)(e),!(t=String(t)))return isISBN(e,10)||isISBN(e,13);var r=e.replace(/[\s-]+/g,""),s=0,c=void 0;if("10"===t){if(!i.test(r))return!1;for(c=0;c<9;c++)s+=(c+1)*r.charAt(c);if("X"===r.charAt(9)?s+=100:s+=10*r.charAt(9),s%11==0)return!!r}else if("13"===t){if(!a.test(r))return!1;for(c=0;c<12;c++)s+=o[c%2]*r.charAt(c);if(r.charAt(12)-(10-s%10)%10==0)return!!r}return!1};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^(?:[0-9]{9}X|[0-9]{10})$/,a=/^(?:[0-9]{13})$/,o=[1,3];e.exports=t.default},57148:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isISIN(e){if((0,n.default)(e),!i.test(e))return!1;for(var t=e.replace(/[A-Z]/g,(function(e){return parseInt(e,36)})),r=0,a=void 0,o=void 0,s=!0,c=t.length-2;c>=0;c--)a=t.substring(c,c+1),o=parseInt(a,10),r+=s&&(o*=2)>=10?o+1:o,s=!s;return parseInt(e.substr(e.length-1),10)===(1e4-r)%10};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;e.exports=t.default},65061:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isISO8601(e){return(0,n.default)(e),i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;e.exports=t.default},34339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isISRC(e){return(0,n.default)(e),i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;e.exports=t.default},29887:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isISSN(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.default)(e);var r=i;if(r=t.require_hyphen?r.replace("?",""):r,!(r=t.case_sensitive?new RegExp(r):new RegExp(r,"i")).test(e))return!1;var a=e.replace("-",""),o=8,s=0,c=!0,l=!1,u=void 0;try{for(var d,f=a[Symbol.iterator]();!(c=(d=f.next()).done);c=!0){var p=d.value,h="X"===p.toUpperCase()?10:+p;s+=h*o,--o}}catch(e){l=!0,u=e}finally{try{!c&&f.return&&f.return()}finally{if(l)throw u}}return s%11==0};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i="^\\d{4}-?\\d{3}[\\dX]$";e.exports=t.default},27228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function isIn(e,t){(0,i.default)(e);var r=void 0;if("[object Array]"===Object.prototype.toString.call(t)){var o=[];for(r in t)({}).hasOwnProperty.call(t,r)&&(o[r]=(0,a.default)(t[r]));return o.indexOf(e)>=0}if("object"===(void 0===t?"undefined":n(t)))return t.hasOwnProperty(e);if(t&&"function"==typeof t.indexOf)return t.indexOf(e)>=0;return!1};var i=_interopRequireDefault(r(65571)),a=_interopRequireDefault(r(31913));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},20937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isInt(e,t){(0,n.default)(e);var r=(t=t||{}).hasOwnProperty("allow_leading_zeroes")&&!t.allow_leading_zeroes?i:a,o=!t.hasOwnProperty("min")||e>=t.min,s=!t.hasOwnProperty("max")||e<=t.max,c=!t.hasOwnProperty("lt")||e<t.lt,l=!t.hasOwnProperty("gt")||e>t.gt;return r.test(e)&&o&&s&&c&&l};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,a=/^[-+]?[0-9]+$/;e.exports=t.default},81008:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function isJSON(e){(0,i.default)(e);try{var t=JSON.parse(e);return!!t&&"object"===(void 0===t?"undefined":n(t))}catch(e){}return!1};var i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},90478:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e),!e.includes(","))return!1;var t=e.split(",");return i.test(t[0])&&a.test(t[1])};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,a=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/;e.exports=t.default},20661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function isLength(e,t){(0,i.default)(e);var r=void 0,a=void 0;"object"===(void 0===t?"undefined":n(t))?(r=t.min||0,a=t.max):(r=arguments[1],a=arguments[2]);var o=e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],s=e.length-o.length;return s>=r&&(void 0===a||s<=a)};var i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},43928:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isLowercase(e){return(0,n.default)(e),e===e.toLowerCase()};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},28999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isMACAddress(e){return(0,n.default)(e),i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/;e.exports=t.default},90368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isMD5(e){return(0,n.default)(e),i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^[a-f0-9]{32}$/;e.exports=t.default},28355:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isMobilePhone(e,t){if((0,n.default)(e),t in i)return i[t].test(e);if("any"===t){for(var r in i){if(i.hasOwnProperty(r))if(i[r].test(e))return!0}return!1}throw new Error("Invalid locale '"+t+"'")};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i={"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"en-US":/^(\+?1)?[2-9]\d{2}[2-9](?!11)\d{6}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"de-DE":/^(\+?49[ \.\-])?([\(]{1}[0-9]{1,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,"da-DK":/^(\+?45)?(\d{8})$/,"el-GR":/^(\+?30)?(69\d{8})$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-HK":/^(\+?852\-?)?[569]\d{3}\-?\d{4}$/,"en-IN":/^(\+?91|0)?[789]\d{9}$/,"en-KE":/^(\+?254|0)?[7]\d{8}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)2\d{7,9}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"es-ES":/^(\+?34)?(6\d{1}|7[1234])\d{7}$/,"fi-FI":/^(\+?358|0)\s?(4(0|1|2|4|5|6)?|50)\s?(\d\s?){4,8}\d$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"he-IL":/^(\+972|0)([23489]|5[0248]|77)[1-9]\d{6}/,"hu-HU":/^(\+?36)(20|30|70)\d{7}$/,"lt-LT":/^(\+370|8)\d{8}$/,"id-ID":/^(\+?62|0[1-9])[\s|\d]+$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ja-JP":/^(\+?81|0)\d{1,4}[ \-]?\d{1,4}[ \-]?\d{4}$/,"ms-MY":/^(\+?6?01){1}(([145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"nl-BE":/^(\+?32|0)4?\d{8}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^(\+?55|0)\-?[1-9]{2}\-?[2-9]{1}\d{3,4}\-?\d{4}$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"ro-RO":/^(\+?4?0)\s?7\d{2}(\/|\s|\.|\-)?\d{3}(\s|\.|\-)?\d{3}$/,"en-PK":/^((\+92)|(0092))-{0,1}\d{3}-{0,1}\d{7}$|^\d{11}$|^\d{4}-\d{7}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"vi-VN":/^(\+?84|0)?((1(2([0-9])|6([2-9])|88|99))|(9((?!5)[0-9])))([0-9]{7})$/,"zh-CN":/^(\+?0?86\-?)?1[345789]\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/};i["en-CA"]=i["en-US"],i["fr-BE"]=i["nl-BE"],i["zh-HK"]=i["en-HK"],e.exports=t.default},19131:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isMongoId(e){return(0,n.default)(e),(0,i.default)(e)&&24===e.length};var n=_interopRequireDefault(r(65571)),i=_interopRequireDefault(r(77117));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},13590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isMultibyte(e){return(0,n.default)(e),i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/[^\x00-\x7F]/;e.exports=t.default},24986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isNumeric(e){return(0,n.default)(e),i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^[-+]?[0-9]+$/;e.exports=t.default},78140:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t in s)return s[t].test(e);if("any"===t){for(var r in s){if(s.hasOwnProperty(r))if(s[r].test(e))return!0}return!1}throw new Error("Invalid locale '"+t+"'")};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/^\d{4}$/,a=/^\d{5}$/,o=/^\d{6}$/,s={AT:i,AU:o,BE:i,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:i,CZ:/^\d{3}\s?\d{2}$/,DE:a,DK:i,DZ:a,ES:a,FI:a,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,IL:a,IN:o,IS:/^\d{3}$/,IT:a,JP:/^\d{3}\-\d{4}$/,KE:a,LI:/^(948[5-9]|949[0-7])$/,MX:a,NL:/^\d{4}\s?[a-z]{2}$/i,NO:i,PL:/^\d{2}\-\d{3}$/,PT:/^\d{4}(\-\d{3})?$/,RO:o,RU:o,SA:a,SE:/^\d{3}\s?\d{2}$/,TW:/^\d{3}(\d{2})?$/,US:/^\d{5}(-\d{4})?$/,ZA:i,ZM:a};e.exports=t.default},72828:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isSurrogatePair(e){return(0,n.default)(e),i.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/;e.exports=t.default},2492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isURL(e,t){if((0,n.default)(e),!e||e.length>=2083||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;t=(0,o.default)(t,s);var r=void 0,l=void 0,u=void 0,d=void 0,f=void 0,p=void 0,h=void 0,m=void 0;if(h=e.split("#"),e=h.shift(),h=e.split("?"),e=h.shift(),(h=e.split("://")).length>1){if(r=h.shift(),t.require_valid_protocol&&-1===t.protocols.indexOf(r))return!1}else{if(t.require_protocol)return!1;t.allow_protocol_relative_urls&&"//"===e.substr(0,2)&&(h[0]=e.substr(2))}if(""===(e=h.join("://")))return!1;if(h=e.split("/"),""===(e=h.shift())&&!t.require_host)return!0;if((h=e.split("@")).length>1&&(l=h.shift()).indexOf(":")>=0&&l.split(":").length>2)return!1;d=h.join("@"),p=null,m=null;var y=d.match(c);y?(u="",m=y[1],p=y[2]||null):(h=d.split(":"),u=h.shift(),h.length&&(p=h.join(":")));if(null!==p&&(f=parseInt(p,10),!/^[0-9]+$/.test(p)||f<=0||f>65535))return!1;if(!((0,a.default)(u)||(0,i.default)(u,t)||m&&(0,a.default)(m,6)))return!1;if(u=u||m,t.host_whitelist&&!checkHost(u,t.host_whitelist))return!1;if(t.host_blacklist&&checkHost(u,t.host_blacklist))return!1;return!0};var n=_interopRequireDefault(r(65571)),i=_interopRequireDefault(r(10221)),a=_interopRequireDefault(r(61028)),o=_interopRequireDefault(r(84808));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var s={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},c=/^\[([^\]]+)\](?::([0-9]+))?$/;function checkHost(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(e===n||(i=n,"[object RegExp]"===Object.prototype.toString.call(i)&&n.test(e)))return!0}var i;return!1}e.exports=t.default},57278:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isUUID(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";(0,n.default)(e);var r=i[t];return r&&r.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));var i={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};e.exports=t.default},57245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isUppercase(e){return(0,n.default)(e),e===e.toUpperCase()};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},49019:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isVariableWidth(e){return(0,n.default)(e),i.fullWidth.test(e)&&a.halfWidth.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571)),i=r(77146),a=r(82941);e.exports=t.default},88346:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function isWhitelisted(e,t){(0,n.default)(e);for(var r=e.length-1;r>=0;r--)if(-1===t.indexOf(e[r]))return!1;return!0};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},14959:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function ltrim(e,t){(0,n.default)(e);var r=t?new RegExp("^["+t+"]+","g"):/^\s+/g;return e.replace(r,"")};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},30661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function matches(e,t,r){(0,n.default)(e),"[object RegExp]"!==Object.prototype.toString.call(t)&&(t=new RegExp(t,r));return t.test(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},2900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function normalizeEmail(e,t){if(t=(0,i.default)(t,a),!(0,n.default)(e))return!1;var r=e.split("@"),l=r.pop(),u=[r.join("@"),l];if(u[1]=u[1].toLowerCase(),"gmail.com"===u[1]||"googlemail.com"===u[1]){if(t.gmail_remove_subaddress&&(u[0]=u[0].split("+")[0]),t.gmail_remove_dots&&(u[0]=u[0].replace(/\./g,"")),!u[0].length)return!1;(t.all_lowercase||t.gmail_lowercase)&&(u[0]=u[0].toLowerCase()),u[1]=t.gmail_convert_googlemaildotcom?"gmail.com":u[1]}else if(~o.indexOf(u[1])){if(t.icloud_remove_subaddress&&(u[0]=u[0].split("+")[0]),!u[0].length)return!1;(t.all_lowercase||t.icloud_lowercase)&&(u[0]=u[0].toLowerCase())}else if(~s.indexOf(u[1])){if(t.outlookdotcom_remove_subaddress&&(u[0]=u[0].split("+")[0]),!u[0].length)return!1;(t.all_lowercase||t.outlookdotcom_lowercase)&&(u[0]=u[0].toLowerCase())}else if(~c.indexOf(u[1])){if(t.yahoo_remove_subaddress){var d=u[0].split("-");u[0]=d.length>1?d.slice(0,-1).join("-"):d[0]}if(!u[0].length)return!1;(t.all_lowercase||t.yahoo_lowercase)&&(u[0]=u[0].toLowerCase())}else t.all_lowercase&&(u[0]=u[0].toLowerCase());return u.join("@")};var n=_interopRequireDefault(r(83868)),i=_interopRequireDefault(r(84808));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var a={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},o=["icloud.com","me.com"],s=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],c=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"];e.exports=t.default},29778:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function rtrim(e,t){(0,n.default)(e);var r=t?new RegExp("["+t+"]"):/\s/,i=e.length-1;for(;i>=0&&r.test(e[i]);)i--;return i<e.length?e.substr(0,i+1):e};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},8035:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function stripLow(e,t){(0,n.default)(e);var r=t?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return(0,i.default)(e,r)};var n=_interopRequireDefault(r(65571)),i=_interopRequireDefault(r(44928));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},557:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function toBoolean(e,t){if((0,n.default)(e),t)return"1"===e||"true"===e;return"0"!==e&&"false"!==e&&""!==e};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},8469:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function toDate(e){return(0,n.default)(e),e=Date.parse(e),isNaN(e)?null:new Date(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},77536:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function toFloat(e){return(0,n.default)(e),parseFloat(e)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},21359:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function toInt(e,t){return(0,n.default)(e),parseInt(e,t||10)};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},24790:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function trim(e,t){return(0,n.default)((0,i.default)(e,t),t)};var n=_interopRequireDefault(r(29778)),i=_interopRequireDefault(r(14959));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},94816:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function unescape(e){return(0,n.default)(e),e.replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#x2F;/g,"/").replace(/&#x5C;/g,"\\").replace(/&#96;/g,"`")};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},65571:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function assertString(e){if(!("string"==typeof e||e instanceof String))throw new TypeError("This library (validator.js) validates strings only")},e.exports=t.default},84808:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function merge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default},31913:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function toString(e){"object"===(void 0===e?"undefined":r(e))&&null!==e?e="function"==typeof e.toString?e.toString():"[object Object]":(null==e||isNaN(e)&&!e.length)&&(e="");return String(e)},e.exports=t.default},34714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function whitelist(e,t){return(0,n.default)(e),e.replace(new RegExp("[^"+t+"]+","g"),"")};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r(65571));e.exports=t.default},3850:e=>{"use strict";e.exports=NMSHDConsumption},25030:e=>{"use strict";e.exports=NMSHDContent},82890:e=>{"use strict";e.exports=NMSHDCrypto},19663:e=>{"use strict";e.exports=NMSHDTransport},90194:e=>{"use strict";e.exports=TSServal},64775:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},98:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},t={};var r=function __webpack_require__(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,__webpack_require__),i.exports}(65590);NMSHDRuntime=r})();
2
+ var NMSHDRuntime;(()=>{var t={6984:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Runtime=void 0;const i=a(75172),o=a(3850),c=a(19663),l=a(7071),u=a(34086),d=a(42205),p=a(5200),h=a(986),m=a(60485),y=a(32746);r.Runtime=class Runtime{constructor(t){this._isInitialized=!1,this._isStarted=!1,this.runtimeConfig=t,this._eventBus=new i.EventEmitter2EventBus}isLoggedIn(){return!!this._accountController}getAccountController(){if(!this._accountController)throw m.RuntimeErrors.startup.noActiveAccount();return this._accountController}getConsumptionController(){if(!this._consumptionController)throw m.RuntimeErrors.startup.noActiveConsumptionController();return this._consumptionController}getDataViewExpander(){if(!this._expander)throw m.RuntimeErrors.startup.noActiveExpander();return this._expander}login(t,r){return this._accountController=t,this._transportServices=l.Container.get(p.TransportServices),this._consumptionController=r,this._consumptionServices=l.Container.get(p.ConsumptionServices),this._expander=l.Container.get(u.DataViewExpander),this}get modules(){return this._modules}get transportServices(){return this._transportServices}get consumptionServices(){return this._consumptionServices}get anonymousServices(){return this._anonymousServices}get eventBus(){return this._eventBus}get isInitialized(){return this._isInitialized}async init(){if(this._isInitialized)throw m.RuntimeErrors.general.alreadyInitialized();this.eventBus.publish(new d.RuntimeInitializingEvent),this.loggerFactory=await this.createLoggerFactory(),await this.initDIContainer(),await this.initTransportLibrary(),await this.initAccount(),this._modules=new p.RuntimeModuleRegistry,await this.loadModules(),await this.initInfrastructure(),await this.initModules(),this._isInitialized=!0,this.eventBus.publish(new d.RuntimeInitializedEvent)}initInfrastructure(){}async getSupportInformation(){return{health:await this.getHealth(),configuration:JSON.parse(JSON.stringify(this.runtimeConfig))}}async initTransportLibrary(){this.eventBus.publish(new d.TransportLibraryInitializingEvent),this.logger.debug("Initializing Database connection... ");const t=await this.createDatabaseConnection();this.transport=new c.Transport(t,this.runtimeConfig.transportLibrary,this.loggerFactory),this.logger.debug("Initializing Transport Library..."),await this.transport.init(),this.logger.debug("Finished initialization of Transport Library."),this._anonymousServices=l.Container.get(p.AnonymousServices),this.eventBus.publish(new d.TransportLibraryInitializedEvent)}async initDIContainer(){l.Container.bind(i.EventBus).factory((()=>this.eventBus)).scope(l.Scope.Singleton),l.Container.bind(h.RuntimeLoggerFactory).factory((()=>this.loggerFactory)).scope(l.Scope.Singleton),l.Container.bind(c.AccountController).factory((()=>this.getAccountController())).scope(l.Scope.Request),l.Container.bind(c.DevicesController).factory((()=>this.getAccountController().devices)).scope(l.Scope.Request),l.Container.bind(c.DeviceController).factory((()=>this.getAccountController().activeDevice)).scope(l.Scope.Request),l.Container.bind(c.FileController).factory((()=>this.getAccountController().files)).scope(l.Scope.Request),l.Container.bind(c.IdentityController).factory((()=>this.getAccountController().identity)).scope(l.Scope.Request),l.Container.bind(c.MessageController).factory((()=>this.getAccountController().messages)).scope(l.Scope.Request),l.Container.bind(c.RelationshipTemplateController).factory((()=>this.getAccountController().relationshipTemplates)).scope(l.Scope.Request),l.Container.bind(c.RelationshipsController).factory((()=>this.getAccountController().relationships)).scope(l.Scope.Request),l.Container.bind(c.TokenController).factory((()=>this.getAccountController().tokens)).scope(l.Scope.Request),l.Container.bind(o.ConsumptionController).factory((()=>this.getConsumptionController())).scope(l.Scope.Request),l.Container.bind(o.ConsumptionAttributesController).factory((()=>this.getConsumptionController().attributes)).scope(l.Scope.Request),l.Container.bind(o.DraftsController).factory((()=>this.getConsumptionController().drafts)).scope(l.Scope.Request),l.Container.bind(o.RelationshipInfoController).factory((()=>this.getConsumptionController().relationshipInfo)).scope(l.Scope.Request),l.Container.bind(o.RequestsController).factory((()=>this.getConsumptionController().requests)).scope(l.Scope.Request),l.Container.bind(o.SettingsController).factory((()=>this.getConsumptionController().settings)).scope(l.Scope.Request),l.Container.bind(o.SharedItemsController).factory((()=>this.getConsumptionController().sharedItems)).scope(l.Scope.Request),l.Container.bind(c.AnonymousTokenController).factory((()=>new c.AnonymousTokenController(this.transport.config))).scope(l.Scope.Singleton);const t=new y.SchemaRepository;await t.loadSchemas(),l.Container.bind(y.SchemaRepository).factory((()=>t)).scope(l.Scope.Singleton)}async loadModules(){this.logger.info("Loading modules...");for(const t in this.runtimeConfig.modules){const r=this.runtimeConfig.modules[t];r.name=t,r.enabled?r.location?await this.loadModule(r):this.logger.error(`Skip loading module '${this.getModuleName(r)}' because has no location.`):this.logger.info(`Skip loading module '${this.getModuleName(r)}' because it is not enabled.`)}this.eventBus.publish(new d.ModulesLoadedEvent)}async initModules(){this.logger.info("Initializing modules...");for(const t of this.modules.toArray())try{await t.init(),this.logger.info(`Module '${this.getModuleName(t)}' was initialized successfully.`)}catch(r){throw this.logger.error(`Module '${this.getModuleName(t)}' could not be initialized.`,r),r}this.eventBus.publish(new d.ModulesInitializedEvent)}get isStarted(){return this._isStarted}async start(){if(!this._isInitialized)throw m.RuntimeErrors.general.notInitialized();if(this._isStarted)throw m.RuntimeErrors.general.alreadyStarted();await this.startInfrastructure(),await this.startModules(),this._isStarted=!0}startInfrastructure(){}async stop(){var t;if(!this._isInitialized)throw m.RuntimeErrors.general.notInitialized();if(!this._isStarted)throw m.RuntimeErrors.general.notStarted();await this.stopModules(),await this.stopInfrastructure(),this.logger.info("Closing AccountController..."),await(null===(t=this._accountController)||void 0===t?void 0:t.close()),this._accountController=void 0,this.logger.info("AccountController was closed successfully."),this._isInitialized=!1,this._isStarted=!1}stopInfrastructure(){}async stopModules(){this.logger.info("Stopping modules...");for(const t of this.modules.toArray())try{await t.stop(),this.logger.info(`Module '${this.getModuleName(t)}' was stopped successfully.`)}catch(r){this.logger.error(`An Error occured while stopping module '${this.getModuleName(t)}': `,r)}this.logger.info("Stopped all modules.")}async startModules(){this.logger.info("Starting modules...");for(const t of this.modules.toArray())try{await t.start(),this.logger.info(`Module '${this.getModuleName(t)}' was started successfully.`)}catch(r){throw this.logger.error(`Module '${this.getModuleName(t)}' could not be started.`,r),r}this.eventBus.publish(new d.ModulesStartedEvent),this.logger.info("Started all modules.")}getModuleName(t){return t.displayName||t.name||JSON.stringify(t)}}},59757:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},986:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RuntimeLoggerFactory=void 0;r.RuntimeLoggerFactory=class RuntimeLoggerFactory{}},2500:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.buildInformation=void 0;const i=a(90194),o=a(3850),c=a(25030),l=a(82890),u=a(19663);r.buildInformation={version:"1.2.20",build:"35",date:"2022-02-02T14:06:50+00:00",commit:"5c3b3a26e826804830cf798195022083a9135191",dependencies:{"@js-soft/docdb-querytranslator":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"1.0.2","@js-soft/ts-utils":"^1.1.1","@nmshd/consumption":"1.0.13","@nmshd/content":"1.1.4","@nmshd/crypto":"1.0.8","@nmshd/transport":"1.1.8",ajv:"^8.9.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","fluent-ts-validator":"3.0.3","json-stringify-safe":"^5.0.1",luxon:"^2.3.0",qrcode:"1.5.0","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},libraries:{serval:i.buildInformation,consumption:o.buildInformation,content:c.buildInformation,crypto:l.buildInformation,transport:u.buildInformation}}},64869:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DataViewExpander=void 0;const l=a(19663),u=a(7071),d=a(5200),p=a(4629),h=a(60485),m=a(32043),y=a(14700),g=a(82466);let v=class DataViewExpander{constructor(t,r,a){this.transport=t,this.consumption=r,this.identityController=a}async expand(t,r){let a=r;if(t["@type"]&&(a=t["@type"]),t instanceof Array){if(!(t.length>0))return[];a=t[0]["@type"]}if(!a)throw h.RuntimeErrors.general.invalidPayload("No type found.");switch(a){case"Message":return t instanceof Array?await this.expandMessageDTOs(t):await this.expandMessageDTO(t);case"Request":return t instanceof Array?await this.expandUnknownRequests(t):await this.expandUnknownRequest(t);case"AttributesShareRequest":return t instanceof Array?await this.expandAttributesShareRequests(t):await this.expandAttributesShareRequest(t);case"AttributesChangeRequest":return t instanceof Array?await this.expandAttributesChangeRequests(t):await this.expandAttributesChangeRequest(t);case"Attribute":return t instanceof Array?await this.expandAttributes(t):this.expandAttribute(t);case"AttributeName":return t instanceof Array?await this.expandAttributeNames(t):await this.expandAttributeName(t);case"Address":return t instanceof Array?await this.expandAddresses(t):await this.expandAddress(t);case"FileId":return t instanceof Array?await this.expandFileIds(t):await this.expandFileId(t);case"File":return t instanceof Array?await this.expandFileDTOs(t):await this.expandFileDTO(t);case"Recipient":return t instanceof Array?await this.expandRecipients(t):await this.expandAddress(t);case"Relationship":return t instanceof Array?await this.expandRelationshipDTOs(t):await this.expandRelationshipDTO(t);case"ConsumptionAttribute":return t instanceof Array?await this.expandConsumptionAttributes(t):this.expandConsumptionAttribute(t);default:throw h.RuntimeErrors.general.notImplemented()}}async expandMessageDTO(t){const r=await this.expandRecipients(t.recipients),a={};r.forEach((t=>a[t.id]=t));const i=await this.expandAddress(t.createdBy),o=[],c=[];for(const r of t.attachments)"string"==typeof r?(c.push(this.expandFileId(r)),o.push(r)):(c.push(this.expandFileDTO(r)),o.push(r.id));const u=await Promise.all(c),d=this.identityController.isMe(l.CoreAddress.from(t.createdBy));let p,h=y.MessageStatus.Received;if(d){h=t.recipients.every((t=>!!t.receivedAt))?y.MessageStatus.Delivered:y.MessageStatus.Delivering,p={...r[0],type:"IdentityDVO"}}else p=i;const g=m.DataViewTranslateable.transport.messageName,v={id:t.id,name:g,date:t.createdAt,type:"MessageDVO",createdByDevice:t.createdByDevice,createdAt:t.createdAt,createdBy:i,recipients:r,attachments:u,isOwn:d,recipientCount:t.recipients.length,attachmentCount:t.attachments.length,status:h,statusText:`i18n://dvo.message.${h}`,image:"",peer:p};if("Mail"===t.content["@type"]||"RequestMail"===t.content["@type"]){const r=t.content,i=r.to.map((t=>a[t]));let o=[];r.cc&&(o=r.cc.map((t=>a[t])));const c={...v,type:"MailDVO",name:r.subject?r.subject:m.DataViewTranslateable.consumption.mails.mailSubjectFallback,subject:r.subject,body:r.body,to:i,toCount:r.to.length,cc:o,ccCount:o.length};if("RequestMail"===r["@type"]){const r=t.content;return{...c,type:"RequestMailDVO",name:r.subject?r.subject:m.DataViewTranslateable.consumption.mails.requestMailSubjectFallback,requests:await this.expandUnknownRequests(r.requests),requestCount:r.requests.length}}return c}return v}async expandMessageDTOs(t){const r=t.map((t=>this.expandMessageDTO(t)));return await Promise.all(r)}async expandUnknownRequest(t){switch(t["@type"]){case"AttributesRequest":return await this.expandAttributesRequest(t);case"AttributesShareRequest":return await this.expandAttributesShareRequest(t);case"AttributesChangeRequest":return await this.expandAttributesChangeRequest(t)}return{id:t.id?t.id:"",name:`${t["@type"]} ${t.key}`,description:"i18n://dvo.request.unknownType",type:"RequestDVO",date:t.expiresAt,...t}}expandRequest(t){return{id:t.id?t.id:"",name:`${t["@type"]} ${t.key}`,type:"RequestDVO",date:t.expiresAt,...t}}async expandUnknownRequests(t){const r=t.map((t=>this.expandUnknownRequest(t)));return await Promise.all(r)}async expandAttributesShareRequest(t){var r,a;const i=this.expandRequest(t),o=[];let c=0;for(const r of t.recipients){if(this.identityController.isMe(l.CoreAddress.from(r)))continue;const t=await this.expandIdentityForAddress(r);t.hasRelationship&&(o.push(t),c++)}if(0===o.length){i.errorCount=(null!==(r=i.errorCount)&&void 0!==r?r:0)+1;const t={code:"error.dvo.request.AttributeShareRequest.noRelationship",message:"There are no relationships to any of the recipients of this request."};i.errors||(i.errors=[]),i.errors.push(t)}else if(o.length!==c){i.warningCount=(null!==(a=i.warningCount)&&void 0!==a?a:0)+1;const t={code:"warning.dvo.request.AttributeShareRequest.onlyRelationships",message:"Not to every recipient of this request exist a relationship."};i.warnings||(i.warnings=[]),i.warnings.push(t)}const u=[];for(const r of t.attributes){const t=await this.expandAttributeName(r);u.push(t)}let d;return d=u.length>1?m.DataViewTranslateable.consumption.requests.attributesShareRequestNamePlural:m.DataViewTranslateable.consumption.requests.attributesShareRequestName,{...i,name:d,type:"AttributesShareRequestDVO",attributes:u,attributeCount:u.length,recipients:o,recipientCount:o.length,possibleRecipientCount:c}}expandConsumptionAttribute(t){return{type:"StoredAttributeDVO",id:t.id,name:t.content.name,value:t.content.value,date:t.createdAt,isOwn:!0,sharedItems:[],sharedItemCount:0}}async expandConsumptionAttributes(t){const r=t.map((t=>this.expandConsumptionAttribute(t)));return await Promise.all(r)}async expandAttributeName(t){const r=await this.consumption.attributes.getAttributeByName({name:t});let a,i=[];return r.isSuccess&&(i=[this.expandConsumptionAttribute(r.value)]),i.length>0&&(a=i[0]),{type:"MatchedAttributesDVO",id:t,name:t,matches:i,matchCount:i.length,bestMatch:a}}async expandAttributeNames(t){const r=t.map((t=>this.expandAttributeName(t)));return await Promise.all(r)}expandAttribute(t){return{type:"AttributeDVO",id:t.name,name:t.name,value:t.value,isOwn:!1}}async expandAttributes(t){const r=t.map((t=>this.expandAttribute(t)));return await Promise.all(r)}async expandAttributesChangeRequest(t){const r=this.expandRequest(t);let a,i;a=t.applyTo?await this.expandIdentityForAddress(t.applyTo):this.expandSelf();const o=[];for(const r of t.attributes){const t=this.expandAttribute(r);o.push(t)}const c=await this.expandAttributeNames(o.map((t=>t.id)));i=o.length>1?m.DataViewTranslateable.consumption.requests.attributesChangeRequestNamePlural:m.DataViewTranslateable.consumption.requests.attributesChangeRequestName;const l=[];return o.forEach(((t,r)=>{l.push({oldAttribute:c[r],newAttribute:t})})),{...r,type:"AttributesChangeRequestDVO",name:i,newAttributes:o,newAttributeCount:o.length,oldAttributes:c,oldAttributeCount:c.length,applyTo:a,changes:l,changeCount:l.length}}async expandAttributesRequest(t){const r=this.expandRequest(t);let a;const i=await this.expandAttributeNames(t.names);return a=i.length>1?m.DataViewTranslateable.consumption.requests.attributesChangeRequestNamePlural:m.DataViewTranslateable.consumption.requests.attributesChangeRequestName,{...r,type:"AttributesRequestDVO",names:t.names,nameCount:t.names.length,name:a,attributes:i,attributeCount:i.length,required:t.required}}expandSelf(){return{id:this.identityController.address.toString(),type:"IdentityDVO",name:"i18n://dvo.identity.self.name",initials:"i18n://dvo.identity.self.initials",realm:l.Realm.Prod,description:"i18n://dvo.identity.self.description",isSelf:!0,hasRelationship:!1}}expandUnknown(t){var r;const a=t.substring(3,9),i=(null!==(r=a.match(/\b\w/g))&&void 0!==r?r:[]).join("");return{id:this.identityController.address.toString(),type:"IdentityDVO",name:a,initials:i,realm:l.Realm.Prod,description:"i18n://dvo.identity.unknown.description",isSelf:!1,hasRelationship:!1}}async expandAttributesShareRequests(t){const r=t.map((t=>this.expandAttributesShareRequest(t)));return await Promise.all(r)}async expandAttributesChangeRequests(t){const r=t.map((t=>this.expandAttributesChangeRequest(t)));return await Promise.all(r)}async expandAddress(t){if(this.identityController.isMe(l.CoreAddress.from(t)))return this.expandSelf();const r=await this.transport.relationships.getRelationshipByAddress({address:t});return r.isError?this.expandUnknown(t):await this.expandRelationshipDTO(r.value)}async expandAddresses(t){const r=t.map((t=>this.expandAddress(t)));return await Promise.all(r)}async expandRecipient(t){return{...await this.expandAddress(t.address),type:"RecipientDVO",receivedAt:t.receivedAt,receivedByDevice:t.receivedByDevice}}async expandRecipients(t){const r=t.map((t=>this.expandRecipient(t)));return await Promise.all(r)}expandRelationshipChange(t,r){const a=r.response?r.response.createdAt:r.request.createdAt;let i,o=!1;return this.identityController.isMe(l.CoreAddress.from(r.request.createdBy))&&(o=!0),r.response&&(i={...r.response,id:`${r.id}_response`,name:"i18n://dvo.relationshipChange.response.name",type:"RelationshipChangeResponseDVO"}),Promise.resolve({type:"RelationshipChangeDVO",id:r.id,name:"",date:a,status:r.status,statusText:`i18n://dvo.relationshipChange.${r.status}`,changeType:r.type,changeTypeText:`i18n://dvo.relationshipChange.${r.type}`,isOwn:o,request:{...r.request,id:`${r.id}_request`,name:"i18n://dvo.relationshipChange.request.name",type:"RelationshipChangeRequestDVO"},response:i})}async expandRelationshipChanges(t){const r=t.changes.map((r=>this.expandRelationshipChange(t,r)));return await Promise.all(r)}async createRelationshipDVO(t,r){var a,i,o,c;if(!r){r=(await this.consumption.relationshipInfo.getRelationshipInfoByRelationship({relationshipId:t.id})).value}let u=g.RelationshipDirection.Incoming;this.identityController.isMe(l.CoreAddress.from(t.changes[0].request.createdBy))&&(u=g.RelationshipDirection.Outgoing);let d="";t.status===l.RelationshipStatus.Pending&&u===g.RelationshipDirection.Outgoing?d=m.DataViewTranslateable.transport.relationshipOutgoing:t.status===l.RelationshipStatus.Pending?d=m.DataViewTranslateable.transport.relationshipIncoming:t.status===l.RelationshipStatus.Rejected?d=m.DataViewTranslateable.transport.relationshipRejected:t.status===l.RelationshipStatus.Revoked?d=m.DataViewTranslateable.transport.relationshipRevoked:t.status===l.RelationshipStatus.Active&&(d=m.DataViewTranslateable.transport.relationshipActive);const p=await this.expandRelationshipChanges(t);return{id:t.id,name:r.userTitle?r.userTitle:r.title,description:r.userDescription?r.userDescription:r.description,date:t.changes[0].request.createdAt,image:"",type:"RelationshipDVO",status:t.status,statusText:d,direction:u,isPinned:r.isPinned,theme:{image:null===(a=r.theme)||void 0===a?void 0:a.image,headerImage:null===(i=r.theme)||void 0===i?void 0:i.imageBar,backgroundColor:null===(o=r.theme)||void 0===o?void 0:o.backgroundColor,foregroundColor:null===(c=r.theme)||void 0===c?void 0:c.foregroundColor},changes:p,changeCount:p.length}}async expandRelationshipDTO(t){var r;const a=(await this.consumption.relationshipInfo.getRelationshipInfoByRelationship({relationshipId:t.id})).value,i=a.userTitle?a.userTitle:a.title;let o=a.userDescription?a.userDescription:a.description;const c=(null!==(r=i.match(/\b\w/g))&&void 0!==r?r:[]).join(""),l=await this.createRelationshipDVO(t,a);return o||(o=l.statusText),{type:"IdentityDVO",id:t.peer,name:i,date:l.date,description:o,publicKey:t.peerIdentity.publicKey,realm:t.peerIdentity.realm,initials:c,isSelf:!1,hasRelationship:!0,relationship:l}}async expandIdentityForAddress(t){var r;if(t===this.identityController.address.toString())return this.expandSelf();const a=await this.transport.relationships.getRelationshipByAddress({address:t});if(a.isSuccess)return await this.expandRelationshipDTO(a.value);if(a.error.code!==h.RuntimeErrors.general.recordNotFound(l.Relationship).code)throw a.error;const i=t.substring(3,9),o=(null!==(r=i.match(/\b\w/g))&&void 0!==r?r:[]).join("");return{id:t,type:"IdentityDVO",name:i,initials:o,publicKey:"i18n://dvo.identity.publicKey.unknown",realm:this.identityController.realm.toString(),description:"i18n://dvo.identity.unknown",isSelf:!1,hasRelationship:!1}}async expandIdentity(t){return await this.expandIdentityForAddress(t.address)}async expandRelationshipDTOs(t){const r=t.map((t=>this.expandRelationshipDTO(t)));return await Promise.all(r)}async expandFileId(t){const r=await this.transport.files.getFile({id:t});if(r.isError)throw r.error;return await this.expandFileDTO(r.value)}async expandFileIds(t){const r=t.map((t=>this.expandFileId(t)));return await Promise.all(r)}async expandFileDTO(t){return{...t,type:"FileDVO",id:t.id,name:t.title?t.title:t.filename,date:t.createdAt,image:"",filename:t.filename,filesize:t.filesize,createdBy:await this.expandAddress(t.createdBy),deletedBy:t.deletedBy?await this.expandAddress(t.deletedBy):void 0}}async expandFileDTOs(t){const r=t.map((t=>this.expandFileDTO(t)));return await Promise.all(r)}};v=i([c(0,u.Inject),c(1,u.Inject),c(2,u.Inject),o("design:paramtypes",[d.TransportServices,p.ConsumptionServices,l.IdentityController])],v),r.DataViewExpander=v},9121:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},32043:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DataViewTranslateable=void 0;class DataViewTranslateable{}r.DataViewTranslateable=DataViewTranslateable,DataViewTranslateable.prefix="i18n://dvo.",DataViewTranslateable.transport={messageName:`${DataViewTranslateable.prefix}message.name`,relationshipOutgoing:`${DataViewTranslateable.prefix}relationship.Outgoing`,relationshipIncoming:`${DataViewTranslateable.prefix}relationship.Incoming`,relationshipRejected:`${DataViewTranslateable.prefix}relationship.Rejected`,relationshipRevoked:`${DataViewTranslateable.prefix}relationship.Revoked`,relationshipActive:`${DataViewTranslateable.prefix}relationship.Active`,fileName:`${DataViewTranslateable.prefix}file.name`},DataViewTranslateable.consumption={mails:{mailSubjectFallback:`${DataViewTranslateable.prefix}mails.mailSubjectFallback`,requestMailSubjectFallback:`${DataViewTranslateable.prefix}mails.requestMailSubjectFallback`},attributes:{unknownAttributeName:`${DataViewTranslateable.prefix}attributes.UnknownAttributeName`},requests:{attributesShareRequestName:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.name`,attributesShareRequestNamePlural:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.namePlural`,attributesShareRequestNoRelationship:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.noRelationship`,attributesShareRequestOnlyRelationships:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.onlyRelationships`,attributesChangeRequestName:`${DataViewTranslateable.prefix}requests.AttributesChangeRequest.name`,attributesChangeRequestNamePlural:`${DataViewTranslateable.prefix}requests.AttributesChangeRequest.namePlural`},identities:{self:`${DataViewTranslateable.prefix}identities.self.name`}}},89248:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},18928:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},48306:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(89248),r),o(a(18928),r)},39427:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},89542:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(39427),r)},33112:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},36519:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},63522:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},80166:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(33112),r),o(a(36519),r),o(a(63522),r)},34086:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(48306),r),o(a(89542),r),o(a(80166),r),o(a(64869),r),o(a(9121),r),o(a(32043),r),o(a(56574),r)},84457:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},56342:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},14700:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MessageStatus=void 0,function(t){t.Received="Received",t.Delivering="Delivering",t.Delivered="Delivered"}(r.MessageStatus||(r.MessageStatus={}))},82466:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipDirection=void 0,function(t){t.Outgoing="Outgoing",t.Incoming="Incoming"}(r.RelationshipDirection||(r.RelationshipDirection={}))},49893:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},56574:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(84457),r),o(a(56342),r),o(a(14700),r),o(a(82466),r),o(a(49893),r)},21291:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DataEvent=void 0;const i=a(44584);class DataEvent extends i.Event{constructor(t,r,a){super(t),this.eventTargetAddress=r,this.data=a}}r.DataEvent=DataEvent},44584:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Event=void 0;r.Event=class Event{constructor(t){this.namespace=t}}},34209:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MailReceivedEvent=void 0;const i=a(21291);class MailReceivedEvent extends i.DataEvent{constructor(t,r,a){super(MailReceivedEvent.namespace,t,a),this.mail=r}}r.MailReceivedEvent=MailReceivedEvent,MailReceivedEvent.namespace="consumption.mailReceived"},87834:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipEvent=void 0;const i=a(21291);class RelationshipEvent extends i.DataEvent{constructor(t,r,a){super(RelationshipEvent.namespace+a.id,t,a),this.event=r}}r.RelationshipEvent=RelationshipEvent,RelationshipEvent.namespace="consumption.relationshipEvent."},49935:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RequestMailReceivedEvent=void 0;const i=a(21291);class RequestMailReceivedEvent extends i.DataEvent{constructor(t,r,a){super(RequestMailReceivedEvent.namespace,t,a),this.requestMail=r}}r.RequestMailReceivedEvent=RequestMailReceivedEvent,RequestMailReceivedEvent.namespace="consumption.requestMailReceived"},66589:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RequestReceivedEvent=void 0;const i=a(21291);class RequestReceivedEvent extends i.DataEvent{constructor(t,r,a){super(RequestReceivedEvent.namespace,t,a),this.request=r}}r.RequestReceivedEvent=RequestReceivedEvent,RequestReceivedEvent.namespace="consumption.requestReceived"},42205:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(21291),r),o(a(44584),r),o(a(76762),r),o(a(188),r),o(a(84737),r),o(a(52866),r),o(a(62937),r),o(a(48994),r),o(a(4769),r),o(a(11690),r),o(a(95049),r),o(a(17194),r)},76762:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ModulesInitializedEvent=void 0;const i=a(44584);class ModulesInitializedEvent extends i.Event{constructor(){super(ModulesInitializedEvent.namespace)}}r.ModulesInitializedEvent=ModulesInitializedEvent,ModulesInitializedEvent.namespace="runtime.modulesInitialized"},188:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ModulesLoadedEvent=void 0;const i=a(44584);class ModulesLoadedEvent extends i.Event{constructor(){super(ModulesLoadedEvent.namespace)}}r.ModulesLoadedEvent=ModulesLoadedEvent,ModulesLoadedEvent.namespace="runtime.modulesLoaded"},84737:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ModulesStartedEvent=void 0;const i=a(44584);class ModulesStartedEvent extends i.Event{constructor(){super(ModulesStartedEvent.namespace)}}r.ModulesStartedEvent=ModulesStartedEvent,ModulesStartedEvent.namespace="runtime.modulesStarted"},52866:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RuntimeInitializedEvent=void 0;const i=a(44584);class RuntimeInitializedEvent extends i.Event{constructor(){super(RuntimeInitializedEvent.namespace)}}r.RuntimeInitializedEvent=RuntimeInitializedEvent,RuntimeInitializedEvent.namespace="runtime.initialized"},62937:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RuntimeInitializingEvent=void 0;const i=a(44584);class RuntimeInitializingEvent extends i.Event{constructor(){super(RuntimeInitializingEvent.namespace)}}r.RuntimeInitializingEvent=RuntimeInitializingEvent,RuntimeInitializingEvent.namespace="runtime.initializing"},48994:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MessageReceivedEvent=void 0;const i=a(21291);class MessageReceivedEvent extends i.DataEvent{constructor(t,r){super(MessageReceivedEvent.namespace,t,r)}}r.MessageReceivedEvent=MessageReceivedEvent,MessageReceivedEvent.namespace="transport.messageReceived"},4769:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MessageSentEvent=void 0;const i=a(21291);class MessageSentEvent extends i.DataEvent{constructor(t,r){super(MessageSentEvent.namespace,t,r)}}r.MessageSentEvent=MessageSentEvent,MessageSentEvent.namespace="transport.messageSent"},11690:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipChangedEvent=void 0;const i=a(21291);class RelationshipChangedEvent extends i.DataEvent{constructor(t,r){super(RelationshipChangedEvent.namespace,t,r)}}r.RelationshipChangedEvent=RelationshipChangedEvent,RelationshipChangedEvent.namespace="transport.relationshipChanged"},95049:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TransportLibraryInitializedEvent=void 0;const i=a(44584);class TransportLibraryInitializedEvent extends i.Event{constructor(){super(TransportLibraryInitializedEvent.namespace)}}r.TransportLibraryInitializedEvent=TransportLibraryInitializedEvent,TransportLibraryInitializedEvent.namespace="transport.initialized"},17194:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TransportLibraryInitializingEvent=void 0;const i=a(44584);class TransportLibraryInitializingEvent extends i.Event{constructor(){super(TransportLibraryInitializingEvent.namespace)}}r.TransportLibraryInitializingEvent=TransportLibraryInitializingEvent,TransportLibraryInitializingEvent.namespace="transport.initializing"},27371:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AnonymousServices=void 0;const l=a(7071),u=a(38346);let d=class AnonymousServices{constructor(t){this.tokens=t}};d=i([c(0,l.Inject),o("design:paramtypes",[u.AnonymousTokensFacade])],d),r.AnonymousServices=d},4629:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.ConsumptionServices=void 0;const l=a(7071),u=a(26013);let d=class ConsumptionServices{constructor(t,r,a,i,o){this.attributes=t,this.drafts=r,this.settings=a,this.sharedItems=i,this.relationshipInfo=o}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),o("design:paramtypes",[u.AttributesFacade,u.DraftsFacade,u.SettingsFacade,u.SharedItemsFacade,u.RelationshipInfoFacade])],d),r.ConsumptionServices=d},34164:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.TransportServices=void 0;const l=a(7071),u=a(19728);let d=class TransportServices{constructor(t,r,a,i,o,c,l){this.files=t,this.messages=r,this.relationships=a,this.relationshipTemplates=i,this.tokens=o,this.account=c,this.devices=l}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),c(5,l.Inject),c(6,l.Inject),o("design:paramtypes",[u.FilesFacade,u.MessagesFacade,u.RelationshipsFacade,u.RelationshipTemplatesFacade,u.TokensFacade,u.AccountFacade,u.DevicesFacade])],d),r.TransportServices=d},37306:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AnonymousTokensFacade=void 0;const l=a(7071),u=a(60485);let d=class AnonymousTokensFacade{constructor(t,r){this.loadPeerTokenByTruncatedReferenceUseCase=t,this.loadPeerTokenByIdAndKeyUseCase=r}async loadPeerTokenByTruncatedReference(t){return await this.loadPeerTokenByTruncatedReferenceUseCase.execute(t)}async loadPeerTokenByIdAndKey(t){return await this.loadPeerTokenByIdAndKeyUseCase.execute(t)}};d=i([c(0,l.Inject),c(1,l.Inject),o("design:paramtypes",[u.LoadPeerTokenAnonymousByTruncatedReferenceUseCase,u.LoadPeerTokenAnonymousByIdAndKeyUseCase])],d),r.AnonymousTokensFacade=d},38346:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(37306),r)},12534:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AttributesFacade=void 0;const l=a(7071),u=a(60485);let d=class AttributesFacade{constructor(t,r,a,i,o,c,l,u,d,p,h){this.createAttributeUseCase=t,this.deleteAttributeUseCase=r,this.deleteAttributeByNameUseCase=a,this.getAllValidUseCase=i,this.getAttributeUseCase=o,this.getAttributeByNameUseCase=c,this.getAttributesUseCase=l,this.getAttributesByNamesUseCase=u,this.getHistoryByNameUseCase=d,this.succeedAttributeUseCase=p,this.updateAttributeUseCase=h}async createAttribute(t){return await this.createAttributeUseCase.execute(t)}async deleteAttribute(t){return await this.deleteAttributeUseCase.execute(t)}async deleteAttributeByName(t){return await this.deleteAttributeByNameUseCase.execute(t)}async getAllValid(){return await this.getAllValidUseCase.execute()}async getAttribute(t){return await this.getAttributeUseCase.execute(t)}async getAttributeByName(t){return await this.getAttributeByNameUseCase.execute(t)}async getAttributes(t){return await this.getAttributesUseCase.execute(t)}async getAttributesByNames(t){return await this.getAttributesByNamesUseCase.execute(t)}async getHistoryByName(t){return await this.getHistoryByNameUseCase.execute(t)}async succeedAttribute(t){return await this.succeedAttributeUseCase.execute(t)}async updateAttribute(t){return await this.updateAttributeUseCase.execute(t)}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),c(5,l.Inject),c(6,l.Inject),c(7,l.Inject),c(8,l.Inject),c(9,l.Inject),c(10,l.Inject),o("design:paramtypes",[u.CreateAttributeUseCase,u.DeleteAttributeUseCase,u.DeleteAttributeByNameUseCase,u.GetAllValidUseCase,u.GetAttributeUseCase,u.GetAttributeByNameUseCase,u.GetAttributesUseCase,u.GetAttributesByNamesUseCase,u.GetHistoryByNameUseCase,u.SucceedAttributeUseCase,u.UpdateAttributeUseCase])],d),r.AttributesFacade=d},13514:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DraftsFacade=void 0;const l=a(7071),u=a(60485);let d=class DraftsFacade{constructor(t,r,a,i,o){this.createDraftUseCase=t,this.deleteDraftUseCase=r,this.getDraftUseCase=a,this.getDraftsUseCase=i,this.updateDraftUseCase=o}async createDraft(t){return await this.createDraftUseCase.execute(t)}async deleteDraft(t){return await this.deleteDraftUseCase.execute(t)}async getDraft(t){return await this.getDraftUseCase.execute(t)}async getDrafts(t){return await this.getDraftsUseCase.execute(t)}async updateDraft(t){return await this.updateDraftUseCase.execute(t)}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),o("design:paramtypes",[u.CreateDraftUseCase,u.DeleteDraftUseCase,u.GetDraftUseCase,u.GetDraftsUseCase,u.UpdateDraftUseCase])],d),r.DraftsFacade=d},74786:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipInfoFacade=void 0;const l=a(7071),u=a(60485);let d=class RelationshipInfoFacade{constructor(t,r,a,i,o,c){this.createRelationshipInfoUseCase=t,this.deleteRelationshipInfoUseCase=r,this.deleteRelationshipInfoByRelationshipUseCase=a,this.getRelationshipInfoUseCase=i,this.getRelationshipInfoByRelationshipUseCase=o,this.updateRelationshipInfoUseCase=c}async createRelationshipInfo(t){return await this.createRelationshipInfoUseCase.execute(t)}async deleteRelationshipInfo(t){return await this.deleteRelationshipInfoUseCase.execute(t)}async deleteRelationshipInfoByRelationship(t){return await this.deleteRelationshipInfoByRelationshipUseCase.execute(t)}async getRelationshipInfo(t){return await this.getRelationshipInfoUseCase.execute(t)}async getRelationshipInfoByRelationship(t){return await this.getRelationshipInfoByRelationshipUseCase.execute(t)}async updateRelationshipInfo(t){return await this.updateRelationshipInfoUseCase.execute(t)}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),c(5,l.Inject),o("design:paramtypes",[u.CreateRelationshipInfoUseCase,u.DeleteRelationshipInfoUseCase,u.DeleteRelationshipInfoByRelationshipUseCase,u.GetRelationshipInfoUseCase,u.GetRelationshipInfoByRelationshipUseCase,u.UpdateRelationshipInfoUseCase])],d),r.RelationshipInfoFacade=d},16615:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SettingsFacade=void 0;const l=a(7071),u=a(60485);let d=class SettingsFacade{constructor(t,r,a,i,o){this.createSettingUseCase=t,this.updateSettingUseCase=r,this.deleteSettingUseCase=a,this.getSettingsUseCase=i,this.getSettingUseCase=o}async createSetting(t){return await this.createSettingUseCase.execute(t)}async getSetting(t){return await this.getSettingUseCase.execute(t)}async getSettings(t){return await this.getSettingsUseCase.execute(t)}async deleteSetting(t){return await this.deleteSettingUseCase.execute(t)}async updateSetting(t){return await this.updateSettingUseCase.execute(t)}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),o("design:paramtypes",[u.CreateSettingUseCase,u.UpdateSettingUseCase,u.DeleteSettingUseCase,u.GetSettingsUseCase,u.GetSettingUseCase])],d),r.SettingsFacade=d},89558:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SharedItemsFacade=void 0;const l=a(7071),u=a(60485);let d=class SharedItemsFacade{constructor(t,r,a,i,o,c,l,u,d){this.createSharedItemUseCase=t,this.deleteSharedItemUseCase=r,this.getSharedItemUseCase=a,this.getSharedItemsUseCase=i,this.getSharedItemsByAddressUseCase=o,this.getSharedItemsByReferenceUseCase=c,this.getSharedItemsSharedByAddressUseCase=l,this.getSharedItemsSharedWithAddressUseCase=u,this.updateSharedItemUseCase=d}async createSharedItem(t){return await this.createSharedItemUseCase.execute(t)}async deleteSharedItem(t){return await this.deleteSharedItemUseCase.execute(t)}async getSharedItem(t){return await this.getSharedItemUseCase.execute(t)}async getSharedItems(t){return await this.getSharedItemsUseCase.execute(t)}async getSharedItemsByAddress(t){return await this.getSharedItemsByAddressUseCase.execute(t)}async getSharedItemsByReference(t){return await this.getSharedItemsByReferenceUseCase.execute(t)}async getSharedItemsSharedByAddress(t){return await this.getSharedItemsSharedByAddressUseCase.execute(t)}async getSharedItemsSharedWithAddress(t){return await this.getSharedItemsSharedWithAddressUseCase.execute(t)}async updateSharedItem(t){return await this.updateSharedItemUseCase.execute(t)}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),c(5,l.Inject),c(6,l.Inject),c(7,l.Inject),c(8,l.Inject),o("design:paramtypes",[u.CreateSharedItemUseCase,u.DeleteSharedItemUseCase,u.GetSharedItemUseCase,u.GetSharedItemsUseCase,u.GetSharedItemsByAddressUseCase,u.GetSharedItemsByReferenceUseCase,u.GetSharedItemsSharedByAddressUseCase,u.GetSharedItemsSharedWithAddressUseCase,u.UpdateSharedItemUseCase])],d),r.SharedItemsFacade=d},26013:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(12534),r),o(a(13514),r),o(a(74786),r),o(a(16615),r),o(a(89558),r)},30941:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccountFacade=void 0;const l=a(7071),u=a(60485);let d=class AccountFacade{constructor(t,r,a,i,o,c,l,u){this.getIdentityInfoUseCase=t,this.getDeviceInfoUseCase=r,this.registerPushNotificationTokenUseCase=a,this.syncDatawalletUseCase=i,this.syncEverythingUseCase=o,this.getSyncInfoUseCase=c,this.disableAutoSyncUseCase=l,this.enableAutoSyncUseCase=u}async getIdentityInfo(){return await this.getIdentityInfoUseCase.execute()}async getDeviceInfo(){return await this.getDeviceInfoUseCase.execute()}createDeviceBackup(){throw u.RuntimeErrors.general.notImplemented()}recoverDevice(){throw u.RuntimeErrors.general.notImplemented()}async registerPushNotificationToken(t){return await this.registerPushNotificationTokenUseCase.execute(t)}async syncDatawallet(){return await this.syncDatawalletUseCase.execute()}async syncEverything(){return await this.syncEverythingUseCase.execute()}async getSyncInfo(){return await this.getSyncInfoUseCase.execute()}async enableAutoSync(){return await this.enableAutoSyncUseCase.execute()}async disableAutoSync(){return await this.disableAutoSyncUseCase.execute()}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),c(5,l.Inject),c(6,l.Inject),c(7,l.Inject),o("design:paramtypes",[u.GetIdentityInfoUseCase,u.GetDeviceInfoUseCase,u.RegisterPushNotificationTokenUseCase,u.SyncDatawalletUseCase,u.SyncEverythingUseCase,u.GetSyncInfoUseCase,u.DisableAutoSyncUseCase,u.EnableAutoSyncUseCase])],d),r.AccountFacade=d},17974:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DevicesFacade=void 0;const l=a(7071),u=a(60485);let d=class DevicesFacade{constructor(t,r,a,i,o,c,l){this.getDeviceUseCase=t,this.getDevicesUseCase=r,this.createDeviceUseCase=a,this.updateDeviceUseCase=i,this.deleteDeviceUseCase=o,this.getDeviceOnboardingInfoUseCase=c,this.getDeviceOnboardingTokenUseCase=l}async getDevice(t){return await this.getDeviceUseCase.execute(t)}async getDevices(){return await this.getDevicesUseCase.execute()}async createDevice(t){return await this.createDeviceUseCase.execute(t)}async getDeviceOnboardingInfo(t){return await this.getDeviceOnboardingInfoUseCase.execute(t)}async getDeviceOnboardingToken(t){return await this.getDeviceOnboardingTokenUseCase.execute(t)}async updateDevice(t){return await this.updateDeviceUseCase.execute(t)}async deleteDevice(t){return await this.deleteDeviceUseCase.execute(t)}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),c(5,l.Inject),c(6,l.Inject),o("design:paramtypes",[u.GetDeviceUseCase,u.GetDevicesUseCase,u.CreateDeviceUseCase,u.UpdateDeviceUseCase,u.DeleteDeviceUseCase,u.GetDeviceOnboardingInfoUseCase,u.CreateDeviceOnboardingTokenUseCase])],d),r.DevicesFacade=d},50360:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.FilesFacade=void 0;const l=a(7071),u=a(60485);let d=class FilesFacade{constructor(t,r,a,i,o,c,l){this.uploadOwnFileUseCase=t,this.loadPeerFileUseCase=r,this.getFilesUseCase=a,this.downloadFileUseCase=i,this.getFileUseCase=o,this.createTokenForFileUseCase=c,this.createTokenQrCodeForFileUseCase=l}async getFiles(t){return await this.getFilesUseCase.execute(t)}async loadPeerFile(t){return await this.loadPeerFileUseCase.execute(t)}async downloadFile(t){return await this.downloadFileUseCase.execute(t)}async getFile(t){return await this.getFileUseCase.execute(t)}async uploadOwnFile(t){return await this.uploadOwnFileUseCase.execute(t)}async createTokenForFile(t){return await this.createTokenForFileUseCase.execute(t)}async createTokenQrCodeForFile(t){return await this.createTokenQrCodeForFileUseCase.execute(t)}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),c(5,l.Inject),c(6,l.Inject),o("design:paramtypes",[u.UploadOwnFileUseCase,u.LoadPeerFileUseCase,u.GetFilesUseCase,u.DownloadFileUseCase,u.GetFileUseCase,u.CreateTokenForFileUseCase,u.CreateTokenQrCodeForFileUseCase])],d),r.FilesFacade=d},91106:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.IdentityFacade=void 0;const l=a(7071),u=a(60485);let d=class IdentityFacade{constructor(t){this.checkIdentityUseCase=t}async checkIdentity(t){return await this.checkIdentityUseCase.execute(t)}};d=i([c(0,l.Inject),o("design:paramtypes",[u.CheckIdentityUseCase])],d),r.IdentityFacade=d},81532:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.MessagesFacade=void 0;const l=a(7071),u=a(60485);let d=class MessagesFacade{constructor(t,r,a,i,o){this.getMessagesUseCase=t,this.getMessageUseCase=r,this.sendMessageUseCase=a,this.downloadAttachmentUseCase=i,this.getAttachmentMetadataUseCase=o}async sendMessage(t){return await this.sendMessageUseCase.execute(t)}async getMessages(t){return await this.getMessagesUseCase.execute(t)}async getMessage(t){return await this.getMessageUseCase.execute(t)}async downloadAttachment(t){return await this.downloadAttachmentUseCase.execute(t)}async getAttachmentMetadata(t){return await this.getAttachmentMetadataUseCase.execute(t)}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),o("design:paramtypes",[u.GetMessagesUseCase,u.GetMessageUseCase,u.SendMessageUseCase,u.DownloadAttachmentUseCase,u.GetAttachmentMetadataUseCase])],d),r.MessagesFacade=d},47349:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipTemplatesFacade=void 0;const l=a(7071),u=a(60485);let d=class RelationshipTemplatesFacade{constructor(t,r,a,i,o,c){this.createOwnRelationshipTemplateUseCase=t,this.loadPeerRelationshipTemplateUseCase=r,this.getRealtionshipTemplatesUseCase=a,this.getRelationshipTemplateUseCase=i,this.createTokenQrCodeForOwnTemplateUseCase=o,this.createTokenForOwnTemplateUseCase=c}async createOwnRelationshipTemplate(t){return await this.createOwnRelationshipTemplateUseCase.execute(t)}async loadPeerRelationshipTemplate(t){return await this.loadPeerRelationshipTemplateUseCase.execute(t)}async getRelationshipTemplates(t){return await this.getRealtionshipTemplatesUseCase.execute(t)}async getRelationshipTemplate(t){return await this.getRelationshipTemplateUseCase.execute(t)}async createTokenQrCodeForOwnTemplate(t){return await this.createTokenQrCodeForOwnTemplateUseCase.execute(t)}async createTokenForOwnTemplate(t){return await this.createTokenForOwnTemplateUseCase.execute(t)}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),c(5,l.Inject),o("design:paramtypes",[u.CreateOwnRelationshipTemplateUseCase,u.LoadPeerRelationshipTemplateUseCase,u.GetRelationshipTemplatesUseCase,u.GetRelationshipTemplateUseCase,u.CreateTokenQrCodeForOwnTemplateUseCase,u.CreateTokenForOwnTemplateUseCase])],d),r.RelationshipTemplatesFacade=d},98586:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipsFacade=void 0;const l=a(7071),u=a(60485);let d=class RelationshipsFacade{constructor(t,r,a,i,o,c,l,u){this.getRelationshipsUseCase=t,this.getRelationshipUseCase=r,this.getRelationshipByAddressUseCase=a,this.createRelationshipUseCase=i,this.createRelationshipChangeUseCase=o,this.acceptRelationshipChangeUseCase=c,this.rejectRelationshipChangeUseCase=l,this.revokeRelationshipChangeUseCase=u}async getRelationships(t){return await this.getRelationshipsUseCase.execute(t)}async getRelationship(t){return await this.getRelationshipUseCase.execute(t)}async getRelationshipByAddress(t){return await this.getRelationshipByAddressUseCase.execute(t)}async createRelationship(t){return await this.createRelationshipUseCase.execute(t)}async createRelationshipChange(t){return await this.createRelationshipChangeUseCase.execute(t)}async acceptRelationshipChange(t){return await this.acceptRelationshipChangeUseCase.execute(t)}async rejectRelationshipChange(t){return await this.rejectRelationshipChangeUseCase.execute(t)}async revokeRelationshipChange(t){return await this.revokeRelationshipChangeUseCase.execute(t)}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),c(5,l.Inject),c(6,l.Inject),c(7,l.Inject),o("design:paramtypes",[u.GetRelationshipsUseCase,u.GetRelationshipUseCase,u.GetRelationshipByAddressUseCase,u.CreateRelationshipUseCase,u.CreateRelationshipChangeUseCase,u.AcceptRelationshipChangeUseCase,u.RejectRelationshipChangeUseCase,u.RevokeRelationshipChangeUseCase])],d),r.RelationshipsFacade=d},75392:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.TokensFacade=void 0;const l=a(7071),u=a(60485);let d=class TokensFacade{constructor(t,r,a,i,o){this.createOwnTokenUseCase=t,this.loadPeerTokenUseCase=r,this.getTokensUseCase=a,this.getTokenUseCase=i,this.getQRCodeForTokenUseCase=o}async createOwnToken(t){return await this.createOwnTokenUseCase.execute(t)}async loadPeerToken(t){return await this.loadPeerTokenUseCase.execute(t)}async getTokens(t){return await this.getTokensUseCase.execute(t)}async getToken(t){return await this.getTokenUseCase.execute(t)}async getQRCodeForToken(t){return await this.getQRCodeForTokenUseCase.execute(t)}};d=i([c(0,l.Inject),c(1,l.Inject),c(2,l.Inject),c(3,l.Inject),c(4,l.Inject),o("design:paramtypes",[u.CreateOwnTokenUseCase,u.LoadPeerTokenUseCase,u.GetTokensUseCase,u.GetTokenUseCase,u.GetQRCodeForTokenUseCase])],d),r.TokensFacade=d},19728:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(30941),r),o(a(17974),r),o(a(50360),r),o(a(91106),r),o(a(81532),r),o(a(98586),r),o(a(47349),r),o(a(75392),r)},5200:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(27371),r),o(a(4629),r),o(a(22432),r),o(a(55372),r),o(a(34164),r)},22432:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RuntimeModule=void 0;r.RuntimeModule=class RuntimeModule{get name(){return this.configuration.name}get displayName(){return this.configuration.displayName}}},55372:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ModulesIterator=r.RuntimeModuleRegistry=void 0;class RuntimeModuleRegistry{constructor(){this.modules=[]}getByName(t){return this.modules.find((r=>r.name.toLowerCase()===t.toLowerCase()))}add(t){this.modules.push(t)}toArray(){return this.modules.slice()}[Symbol.iterator](){return new ModulesIterator(this.modules)}}r.RuntimeModuleRegistry=RuntimeModuleRegistry;class ModulesIterator{constructor(t){this.items=t,this.currentIndex=0}next(t){return{value:this.items[this.currentIndex++],done:this.currentIndex>this.items.length}}}r.ModulesIterator=ModulesIterator},65590:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(2500),r),o(a(34086),r),o(a(42205),r),o(a(5200),r),o(a(49662),r),o(a(6984),r),o(a(59757),r),o(a(986),r),o(a(83377),r),o(a(60485),r)},86432:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(25030),o=a(42205),c=a(34209),l=a(87834),u=a(49935),d=a(66589),p=a(22432);class MessageModule extends p.RuntimeModule{init(){}start(){this.messageReceivedSubscription=this.runtime.eventBus.subscribe(o.MessageReceivedEvent,this.handleMessageReceived)}async handleMessageReceived(t){const r=t.data;this.logger.trace(`Incoming MessageReceivedEvent for ${r.id}`);let a;switch(r.content["@type"]){case"Mail":const o=await i.Mail.from(r.content);a=new c.MailReceivedEvent(t.eventTargetAddress,o,r),this.runtime.eventBus.publish(a),this.logger.trace(`Published MailReceivedEvent for ${r.id}`);break;case"RequestMail":const l=await i.RequestMail.from(r.content);a=new u.RequestMailReceivedEvent(t.eventTargetAddress,l,r),this.runtime.eventBus.publish(a),this.logger.trace(`Published RequestMailReceivedEvent for ${r.id}`);let p=0;for(const a of l.requests)this.runtime.eventBus.publish(new d.RequestReceivedEvent(t.eventTargetAddress,a,r)),this.logger.trace(`Published RequestReceivedEvent request #${p} of RequestMail ${r.id}`),p++;break;default:return}const o=await this.runtime.transportServices.relationships.getRelationshipByAddress({address:r.createdBy});if(!o.isSuccess)return void this.logger.error(`Could not find relationship for address '${r.createdBy}'.`,o.error);const p=o.value;this.runtime.eventBus.publish(new l.RelationshipEvent(t.eventTargetAddress,a,p)),this.logger.trace(`Published RelationshipEvent for ${r.id} to ${p.id}`)}stop(){this.runtime.eventBus.unsubscribe(o.MessageReceivedEvent,this.messageReceivedSubscription)}}r.default=MessageModule},49662:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(86432),r)},25953:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},61776:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},5292:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},58162:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},13899:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},77744:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},17564:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},34009:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},87946:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(61776),r),o(a(5292),r),o(a(58162),r),o(a(13899),r),o(a(77744),r),o(a(17564),r),o(a(34009),r)},83377:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(87946),r),o(a(25953),r),o(a(70450),r)},77891:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},59475:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},13462:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},46261:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},86623:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},40641:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},55968:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},82944:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipChangeType=r.RelationshipChangeStatus=void 0,function(t){t.Pending="Pending",t.Rejected="Rejected",t.Revoked="Revoked",t.Accepted="Accepted"}(r.RelationshipChangeStatus||(r.RelationshipChangeStatus={})),function(t){t.Creation="Creation",t.Termination="Termination",t.TerminationCancellation="TerminationCancellation"}(r.RelationshipChangeType||(r.RelationshipChangeType={}))},2220:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipStatus=void 0,function(t){t.Pending="Pending",t.Active="Active",t.Rejected="Rejected",t.Revoked="Revoked",t.Terminating="Terminating",t.Terminated="Terminated"}(r.RelationshipStatus||(r.RelationshipStatus={}))},16081:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},44561:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},70450:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(77891),r),o(a(59475),r),o(a(13462),r),o(a(46261),r),o(a(86623),r),o(a(40641),r),o(a(55968),r),o(a(82944),r),o(a(2220),r),o(a(16081),r),o(a(44561),r)},49365:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(7771),r)},70807:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.LoadPeerTokenAnonymousByIdAndKeyUseCase=void 0;const l=a(75172),u=a(82890),d=a(19663),p=a(7071),h=a(7049),m=a(57121);class LoadPeerTokenAnonymousByIdAndKeyRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(h.IdValidator.required(d.BackboneIds.token)),this.validateIfString((t=>t.secretKey)).isNotNull()}}let y=class LoadPeerTokenAnonymousByIdAndKeyUseCase extends h.UseCase{constructor(t,r){super(r),this.anonymousTokenController=t}async executeInternal(t){const r=await u.CryptoSecretKey.fromBase64(t.secretKey),a=await this.anonymousTokenController.loadPeerToken(d.CoreId.from(t.id),r);return l.Result.ok(await m.TokenMapper.toTokenDTO(a,!0))}};y=i([c(0,p.Inject),c(1,p.Inject),o("design:paramtypes",[d.AnonymousTokenController,LoadPeerTokenAnonymousByIdAndKeyRequestValidator])],y),r.LoadPeerTokenAnonymousByIdAndKeyUseCase=y},86297:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(57121);class LoadPeerTokenAnonymousByTruncatedReferenceRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.reference)).isNotNull()}}let m=class LoadPeerTokenAnonymousByTruncatedReferenceUseCase extends p.UseCase{constructor(t,r){super(r),this.anonymousTokenController=t}async executeInternal(t){const r=await this.anonymousTokenController.loadPeerTokenByTruncated(t.reference);return l.Result.ok(await h.TokenMapper.toTokenDTO(r,!0))}};m=i([c(0,d.Inject),c(1,d.Inject),o("design:paramtypes",[u.AnonymousTokenController,LoadPeerTokenAnonymousByTruncatedReferenceRequestValidator])],m),r.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=m},7771:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(70807),r),o(a(86297),r)},56819:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.OwnerRestriction=void 0,function(t){t.Own="o",t.Peer="p"}(r.OwnerRestriction||(r.OwnerRestriction={}))},48728:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.PlatformErrorCodes=void 0;class PlatformErrorCodes{static isNotFoundError(t){return t.code===PlatformErrorCodes.NOT_FOUND}static isValidationError(t){return t.code.startsWith("error.platform.validation")}static isUnexpectedError(t){return t.code.startsWith("error.platform.validation")}}r.PlatformErrorCodes=PlatformErrorCodes,PlatformErrorCodes.NOT_FOUND="error.platform.recordNotFound",PlatformErrorCodes.UNAUTHORIZED="error.platform.unauthorized",PlatformErrorCodes.FORBIDDEN="error.platform.forbidden",PlatformErrorCodes.INVALID_PROPERTY_VALUE="error.platform.invalidPropertyValue",PlatformErrorCodes.UNEXPECTED="error.platform.unexpected"},73832:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:!0,value:r})}:function(t,r){t.default=r}),c=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(null!=t)for(var a in t)"default"!==a&&Object.prototype.hasOwnProperty.call(t,a)&&i(r,t,a);return o(r,t),r};Object.defineProperty(r,"__esModule",{value:!0}),r.QRCode=void 0;const l=c(a(92592));class QRCode{constructor(t){this.base64=t}asBase64(){return this.base64}static async from(t){const r=(await l.toDataURL(`nmshd://qr#${t}`)).split(",")[1];return new QRCode(r)}}r.QRCode=QRCode},6595:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RuntimeErrors=void 0;const i=a(75172);class RuntimeErrors{}r.RuntimeErrors=RuntimeErrors,RuntimeErrors.general=new class General{unknown(t,r){return new i.ApplicationError("error.runtime.unknown",t,r)}alreadyInitialized(){return new i.ApplicationError("error.runtime.alreadyInitialized","The runtime is already initialized. The init method can only be executed once.")}notInitialized(){return new i.ApplicationError("error.runtime.notInitialized","The runtime is not initialized. You must run init before you can start or stop the runtime.")}alreadyStarted(){return new i.ApplicationError("error.runtime.alreadyStarted","The runtime is already started. You should stop it first for a restart.")}notStarted(){return new i.ApplicationError("error.runtime.notStarted","The runtime is not started. You should start it before stopping.")}recordNotFound(t){return this.recordNotFoundWithMessage(`${t instanceof Function?t.name:t} not found. Make sure the ID exists and the record is not expired.`)}recordNotFoundWithMessage(t){return new i.ApplicationError("error.runtime.recordNotFound",t)}unauthorized(){return new i.ApplicationError("error.runtime.unauthorized","Unauthorized.")}missingRequiredProperty(t){return new i.ApplicationError("error.runtime.validation.missingRequiredProperty",`'${t}' must not be empty.`)}invalidPropertyValue(t,r){return new i.ApplicationError("error.runtime.validation.invalidPropertyValue",null!=r?r:`The value of '${t}' is not valid.`)}invalidPayload(t){return new i.ApplicationError("error.runtime.validation.invalidPayload",null!=t?t:"The given combination of properties in the payload is not supported.")}notImplemented(){return new i.ApplicationError("error.runtime.methodNotImplemented","The requested method is not yet implemented.")}invalidTokenContent(){return new i.ApplicationError("error.runtime.invalidTokenContent","The given token has an invalid content for this route.")}cacheEmpty(t,r){return new i.ApplicationError("error.runtime.cacheEmpty",`The cache of ${t instanceof Function?t.name:t} with id '${r}' is empty.`)}},RuntimeErrors.serval=new class Serval{unknownType(t){return new i.ApplicationError("error.runtime.unknownType",t)}general(t){return new i.ApplicationError("error.runtime.servalError",t)}requestDeserialization(t){return new i.ApplicationError("error.runtime.requestDeserialization",t)}},RuntimeErrors.startup=new class Startup{noIdentityFound(){return new i.ApplicationError("error.runtime.startup.noIdentityFound","No identity information could be found. Please check your database integrity.")}noActiveAccount(){return new i.ApplicationError("error.runtime.startup.noActiveAccount","No AccountController could be found. You might have to login first.")}noActiveConsumptionController(){return new i.ApplicationError("error.runtime.startup.noActiveConsumptionController","No ConsumptionController could be found. You might have to login first.")}noActiveExpander(){return new i.ApplicationError("error.runtime.startup.noActiveExpander","No DataViewExpander could be found. You might have to login first.")}noDatabaseDefined(){return new i.ApplicationError("error.runtime.startup.noDatabaseDefined","No database is defined. Please check the database configuration.")}noPlatformConnection(){return new i.ApplicationError("error.runtime.startup.noPlatformConnection","No platform connection could be established. Please check you network connectivity.")}privateDeviceKeyInvalid(){return new i.ApplicationError("error.runtime.startup.privateDeviceKeyInvalid","The private key of this device seems to be invalid. You should check your config or database connection.")}},RuntimeErrors.database=new class Database{unknown(){return new i.ApplicationError("error.runtime.database.unknown","An unknown database error occured. Please check the logs.")}connectionError(){return new i.ApplicationError("error.runtime.database.connectionError","Connection to database could not be established. Please check the database credentials.")}quotaExceeded(){return new i.ApplicationError("error.runtime.database.quotaExceeded","It seems that the database quota exceeded. Please increase the database size.")}},RuntimeErrors.relationshipTemplates=new class RelationshipTemplates{cannotCreateTokenForPeerTemplate(){return new i.ApplicationError("error.runtime.relationshipRequests.cannotCreateTokenForPeerTemplate","You cannot create a token for a peer template.")}},RuntimeErrors.messages=new class Messages{fileNotFoundInMessage(t){return new i.ApplicationError("error.runtime.messages.fileNotFoundInMessage",`The requested file '${t}' was not found in the given message.`)}},RuntimeErrors.relationshipInfo=new class RelationshipInfo{relationshipInfoExists(t){return new i.ApplicationError("error.runtime.relationshipInfo.relationshipInfoExists",`RelationshipInfo for RelationshipId ${t} already exists. Try to update the RelationshipInfo instead.`)}}},71683:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RuntimeValidator=void 0;const i=a(63586);class RuntimeValidator extends i.AbstractValidator{constructor(){super(),this.validateIfAny((t=>t)).isDefined().withFailureMessage("request is undefined")}}r.RuntimeValidator=RuntimeValidator},32746:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:!0,value:r})}:function(t,r){t.default=r}),c=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(null!=t)for(var a in t)"default"!==a&&Object.prototype.hasOwnProperty.call(t,a)&&i(r,t,a);return o(r,t),r},l=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.JsonSchema=r.SchemaRepository=void 0;const u=l(a(1581)),d=l(a(33351)),p=l(a(5477)),h={fileId:"FIL[A-z0-9]{17}",relationshipId:"REL[A-z0-9]{17}",messageId:"MSG[A-z0-9]{17}",relationshipTemplateId:"RLT[A-z0-9]{17}",tokenId:"TOK[A-z0-9]{17}",relationshipChangeId:"RCH[A-z0-9]{17}",deviceId:"DVC[A-z0-9]{17}"};r.SchemaRepository=class SchemaRepository{constructor(){this.jsonSchemas=new Map,this.compiler=new u.default({allErrors:!0}),(0,p.default)(this.compiler),(0,d.default)(this.compiler),this.addCustomFormats()}addCustomFormats(){Object.entries(h).forEach((([t,r])=>{this.compiler.addFormat(t,r)}))}async loadSchemas(){this.schemaDefinitions=await Promise.resolve().then((()=>c(a(11873))))}getSchema(t){return this.jsonSchemas.has(t)||this.jsonSchemas.set(t,new JsonSchema(this.getValidationFunction(t))),this.jsonSchemas.get(t)}getValidationFunction(t){return this.compiler.compile(this.getSchemaDefinition(t))}getSchemaDefinition(t){const r=this.schemaDefinitions[t];if(!r)throw new Error(`Schema ${t} not found`);return r}};class JsonSchema{constructor(t){this.validateSchema=t}validate(t){return{isValid:this.validateSchema(t),errors:this.validateSchema.errors?[...this.validateSchema.errors]:void 0}}}r.JsonSchema=JsonSchema},11873:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.GetFilesRequest=r.GetFileRequest=r.CreateTokenQrCodeForFileRequest=r.CreateTokenForFileRequest=r.UpdateDeviceRequest=r.GetDeviceOnboardingInfoRequest=r.GetDeviceRequest=r.DeleteDeviceRequest=r.CreateDeviceOnboardingTokenRequest=r.CreateDeviceRequest=r.DownloadAttachmentRequest=r.DownloadFileRequest=r.RegisterPushNotificationTokenRequest=r.UpdateSharedItemRequest=r.GetSharedItemsSharedWithAddressRequest=r.GetSharedItemsSharedByAddressRequest=r.GetSharedItemsByReferenceRequest=r.GetSharedItemsByAddressRequest=r.GetSharedItemsRequest=r.GetSharedItemRequest=r.DeleteSharedItemRequest=r.CreateSharedItemRequest=r.UpdateSettingRequest=r.GetSettingsRequest=r.GetSettingRequest=r.DeleteSettingRequest=r.CreateSettingRequest=r.UpdateRelationshipInfoRequest=r.GetRelationshipInfoByRelationshipRequest=r.GetRelationshipInfoRequest=r.DeleteRelationshipInfoByRelationshipRequest=r.DeleteRelationshipInfoRequest=r.CreateRelationshipInfoRequest=r.UpdateDraftRequest=r.GetDraftsRequest=r.GetDraftRequest=r.DeleteDraftRequest=r.CreateDraftRequest=r.UpdateAttributeRequest=r.SucceedAttributeRequest=r.GetHistoryByNameRequest=r.GetAttributesRequest=r.GetAttributeByNameRequest=r.GetAttributeRequest=r.DeleteAttributeByNameRequest=r.DeleteAttributeRequest=r.CreateAttributeRequest=r.GetAttributesByNamesRequest=r.LoadPeerTokenAnonymousByTruncatedReferenceRequest=r.LoadPeerTokenAnonymousByIdAndKeyRequest=void 0,r.LoadPeerTokenRequest=r.GetTokensRequest=r.GetTokenRequest=r.GetQRCodeForTokenRequest=r.CreateOwnTokenRequest=r.LoadPeerRelationshipTemplateRequest=r.GetRelationshipTemplatesRequest=r.GetRelationshipTemplateRequest=r.CreateTokenQrCodeForOwnTemplateRequest=r.CreateTokenForOwnTemplateRequest=r.CreateOwnRelationshipTemplateRequest=r.RevokeRelationshipChangeRequest=r.RejectRelationshipChangeRequest=r.GetRelationshipsRequest=r.GetRelationshipByAddressRequest=r.GetRelationshipRequest=r.CreateRelationshipChangeRequest=r.CreateRelationshipRequest=r.AcceptRelationshipChangeRequest=r.SendMessageRequest=r.GetMessagesRequest=r.GetMessageRequest=r.GetAttachmentMetadataRequest=r.CheckIdentityRequest=r.UploadOwnFileRequest=r.LoadPeerFileRequest=r.LoadPeerFileViaReferenceRequest=r.LoadPeerFileViaSecretRequest=void 0,r.LoadPeerTokenAnonymousByIdAndKeyRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenAnonymousByIdAndKeyRequest",definitions:{LoadPeerTokenAnonymousByIdAndKeyRequest:{type:"object",properties:{id:{type:"string"},secretKey:{type:"string"}},required:["id","secretKey"],additionalProperties:!1}}},r.LoadPeerTokenAnonymousByTruncatedReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenAnonymousByTruncatedReferenceRequest",definitions:{LoadPeerTokenAnonymousByTruncatedReferenceRequest:{type:"object",properties:{reference:{type:"string"}},required:["reference"],additionalProperties:!1}}},r.GetAttributesByNamesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributesByNamesRequest",definitions:{GetAttributesByNamesRequest:{type:"object",additionalProperties:!1}}},r.CreateAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateAttributeRequest",definitions:{CreateAttributeRequest:{type:"object",properties:{attribute:{$ref:"#/definitions/IAttribute"}},required:["attribute"],additionalProperties:!1},IAttribute:{type:"object",properties:{name:{type:"string"},value:{},validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"}},required:["name","value"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1}}},r.DeleteAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteAttributeRequest",definitions:{DeleteAttributeRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.DeleteAttributeByNameRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteAttributeByNameRequest",definitions:{DeleteAttributeByNameRequest:{type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1}}},r.GetAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributeRequest",definitions:{GetAttributeRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetAttributeByNameRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributeByNameRequest",definitions:{GetAttributeByNameRequest:{type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1}}},r.GetAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributesRequest",definitions:{GetAttributesRequest:{type:"object",additionalProperties:!1}}},r.GetHistoryByNameRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetHistoryByNameRequest",definitions:{GetHistoryByNameRequest:{type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1}}},r.SucceedAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SucceedAttributeRequest",definitions:{SucceedAttributeRequest:{type:"object",properties:{attribute:{$ref:"#/definitions/IAttribute"},validFrom:{type:"string"}},required:["attribute"],additionalProperties:!1},IAttribute:{type:"object",properties:{name:{type:"string"},value:{},validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"}},required:["name","value"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1}}},r.UpdateAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateAttributeRequest",definitions:{UpdateAttributeRequest:{type:"object",properties:{id:{type:"string"},attribute:{$ref:"#/definitions/IAttribute"}},required:["id","attribute"],additionalProperties:!1},IAttribute:{type:"object",properties:{name:{type:"string"},value:{},validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"}},required:["name","value"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1}}},r.CreateDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDraftRequest",definitions:{CreateDraftRequest:{type:"object",properties:{content:{},type:{type:"string"}},required:["content"],additionalProperties:!1}}},r.DeleteDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteDraftRequest",definitions:{DeleteDraftRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDraftRequest",definitions:{GetDraftRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetDraftsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDraftsRequest",definitions:{GetDraftsRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},r.UpdateDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateDraftRequest",definitions:{UpdateDraftRequest:{type:"object",properties:{id:{type:"string"},content:{}},required:["id","content"],additionalProperties:!1}}},r.CreateRelationshipInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipInfoRequest",definitions:{CreateRelationshipInfoRequest:{type:"object",properties:{relationshipId:{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/RelationshipAttributeDTO"}},isPinned:{type:"boolean"},title:{type:"string"},description:{type:"string"},userTitle:{type:"string"},userDescription:{type:"string"},theme:{$ref:"#/definitions/RelationshipThemeDTO"}},required:["relationshipId","attributes","isPinned","title"],additionalProperties:!1},RelationshipAttributeDTO:{type:"object",properties:{name:{type:"string"},content:{$ref:"#/definitions/AttributeJSON"},sharedItem:{type:"string"}},required:["name","content","sharedItem"],additionalProperties:!1},AttributeJSON:{type:"object",properties:{"@type":{type:"string"},"@schema":{type:"string"},name:{type:"string"},value:{},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","name","value"],additionalProperties:!1},RelationshipThemeDTO:{type:"object",properties:{image:{type:"string"},imageBar:{type:"string"},backgroundColor:{type:"string"},foregroundColor:{type:"string"}},required:["image","imageBar","backgroundColor","foregroundColor"],additionalProperties:!1}}},r.DeleteRelationshipInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteRelationshipInfoRequest",definitions:{DeleteRelationshipInfoRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.DeleteRelationshipInfoByRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteRelationshipInfoByRelationshipRequest",definitions:{DeleteRelationshipInfoByRelationshipRequest:{type:"object",properties:{relationshipId:{type:"string"}},required:["relationshipId"],additionalProperties:!1}}},r.GetRelationshipInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipInfoRequest",definitions:{GetRelationshipInfoRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetRelationshipInfoByRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipInfoByRelationshipRequest",definitions:{GetRelationshipInfoByRelationshipRequest:{type:"object",properties:{relationshipId:{type:"string"}},required:["relationshipId"],additionalProperties:!1}}},r.UpdateRelationshipInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateRelationshipInfoRequest",definitions:{UpdateRelationshipInfoRequest:{type:"object",properties:{id:{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/RelationshipAttributeDTO"}},isPinned:{type:"boolean"},title:{type:"string"},description:{type:"string"},userTitle:{type:"string"},userDescription:{type:"string"},theme:{$ref:"#/definitions/RelationshipThemeDTO"}},required:["id"],additionalProperties:!1,description:"Overwrite a RelationshipInfo's attributes with the request's corresponding fields. Undefined fields in the request will leave the corresponding RelationshipInfo's attributes untouched."},RelationshipAttributeDTO:{type:"object",properties:{name:{type:"string"},content:{$ref:"#/definitions/AttributeJSON"},sharedItem:{type:"string"}},required:["name","content","sharedItem"],additionalProperties:!1},AttributeJSON:{type:"object",properties:{"@type":{type:"string"},"@schema":{type:"string"},name:{type:"string"},value:{},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","name","value"],additionalProperties:!1},RelationshipThemeDTO:{type:"object",properties:{image:{type:"string"},imageBar:{type:"string"},backgroundColor:{type:"string"},foregroundColor:{type:"string"}},required:["image","imageBar","backgroundColor","foregroundColor"],additionalProperties:!1}}},r.CreateSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateSettingRequest",definitions:{CreateSettingRequest:{type:"object",properties:{key:{type:"string"},value:{},reference:{type:"string"},scope:{type:"string"},succeedsAt:{type:"string"},succeedsItem:{type:"string"}},required:["key","value"],additionalProperties:!1}}},r.DeleteSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteSettingRequest",definitions:{DeleteSettingRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingRequest",definitions:{GetSettingRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetSettingsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingsRequest",definitions:{GetSettingsRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},r.UpdateSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateSettingRequest",definitions:{UpdateSettingRequest:{type:"object",properties:{id:{type:"string"},value:{}},required:["id","value"],additionalProperties:!1}}},r.CreateSharedItemRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateSharedItemRequest",definitions:{CreateSharedItemRequest:{type:"object",properties:{tags:{type:"array",items:{type:"string"}},sharedBy:{type:"string"},sharedWith:{type:"string"},sharedAt:{type:"string"},reference:{type:"string"},content:{},succeedsItem:{type:"string"},succeedsAt:{type:"string"},expiresAt:{type:"string"}},required:["sharedBy","sharedWith","sharedAt","content"],additionalProperties:!1}}},r.DeleteSharedItemRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteSharedItemRequest",definitions:{DeleteSharedItemRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetSharedItemRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedItemRequest",definitions:{GetSharedItemRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetSharedItemsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedItemsRequest",definitions:{GetSharedItemsRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},r.GetSharedItemsByAddressRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedItemsByAddressRequest",definitions:{GetSharedItemsByAddressRequest:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1}}},r.GetSharedItemsByReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedItemsByReferenceRequest",definitions:{GetSharedItemsByReferenceRequest:{type:"object",properties:{reference:{type:"string"}},required:["reference"],additionalProperties:!1}}},r.GetSharedItemsSharedByAddressRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedItemsSharedByAddressRequest",definitions:{GetSharedItemsSharedByAddressRequest:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1}}},r.GetSharedItemsSharedWithAddressRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedItemsSharedWithAddressRequest",definitions:{GetSharedItemsSharedWithAddressRequest:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1}}},r.UpdateSharedItemRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateSharedItemRequest",definitions:{UpdateSharedItemRequest:{type:"object",properties:{id:{type:"string"},content:{}},required:["id","content"],additionalProperties:!1}}},r.RegisterPushNotificationTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RegisterPushNotificationTokenRequest",definitions:{RegisterPushNotificationTokenRequest:{type:"object",properties:{handle:{type:"string"},installationId:{type:"string"},platform:{type:"string"}},required:["handle","installationId","platform"],additionalProperties:!1}}},r.DownloadFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DownloadFileRequest",definitions:{DownloadFileRequest:{type:"object",properties:{id:{type:"string",format:"fileId"}},required:["id"],additionalProperties:!1}}},r.DownloadAttachmentRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DownloadAttachmentRequest",definitions:{DownloadAttachmentRequest:{type:"object",properties:{id:{type:"string"},attachmentId:{type:"string"}},required:["id","attachmentId"],additionalProperties:!1}}},r.CreateDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceRequest",definitions:{CreateDeviceRequest:{type:"object",properties:{name:{type:"string"},description:{type:"string"},isAdmin:{type:"boolean"}},additionalProperties:!1}}},r.CreateDeviceOnboardingTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceOnboardingTokenRequest",definitions:{CreateDeviceOnboardingTokenRequest:{type:"object",properties:{id:{type:"string"},expiresAt:{type:"string"}},required:["id"],additionalProperties:!1}}},r.DeleteDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteDeviceRequest",definitions:{DeleteDeviceRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDeviceRequest",definitions:{GetDeviceRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetDeviceOnboardingInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDeviceOnboardingInfoRequest",definitions:{GetDeviceOnboardingInfoRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.UpdateDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateDeviceRequest",definitions:{UpdateDeviceRequest:{type:"object",properties:{id:{type:"string"},name:{type:"string"},description:{type:"string"}},required:["id"],additionalProperties:!1}}},r.CreateTokenForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenForFileRequest",definitions:{CreateTokenForFileRequest:{type:"object",properties:{fileId:{type:"string",format:"fileId"},expiresAt:{type:"string",format:"date-time"},ephemeral:{type:"boolean"}},required:["fileId"],additionalProperties:!1}}},r.CreateTokenQrCodeForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenQrCodeForFileRequest",definitions:{CreateTokenQrCodeForFileRequest:{type:"object",properties:{fileId:{type:"string",format:"fileId"},expiresAt:{type:"string",format:"date-time"}},required:["fileId"],additionalProperties:!1}}},r.GetFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetFileRequest",definitions:{GetFileRequest:{type:"object",properties:{id:{type:"string",format:"fileId"}},required:["id"],additionalProperties:!1}}},r.GetFilesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetFilesRequest",definitions:{GetFilesRequest:{type:"object",properties:{query:{},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},r.LoadPeerFileViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerFileViaSecretRequest",definitions:{LoadPeerFileViaSecretRequest:{type:"object",properties:{id:{type:"string",format:"fileId"},secretKey:{type:"string",minLength:100}},required:["id","secretKey"],additionalProperties:!1}}},r.LoadPeerFileViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerFileViaReferenceRequest",definitions:{LoadPeerFileViaReferenceRequest:{type:"object",properties:{reference:{type:"string",pattern:"VE9L.{84}"}},required:["reference"],additionalProperties:!1,errorMessage:"token reference invalid"}}},r.LoadPeerFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerFileRequest",definitions:{LoadPeerFileRequest:{anyOf:[{$ref:"#/definitions/LoadPeerFileViaSecretRequest"},{$ref:"#/definitions/LoadPeerFileViaReferenceRequest"}]},LoadPeerFileViaSecretRequest:{type:"object",properties:{id:{type:"string",format:"fileId"},secretKey:{type:"string",minLength:100}},required:["id","secretKey"],additionalProperties:!1},LoadPeerFileViaReferenceRequest:{type:"object",properties:{reference:{type:"string",pattern:"VE9L.{84}"}},required:["reference"],additionalProperties:!1,errorMessage:"token reference invalid"}}},r.UploadOwnFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UploadOwnFileRequest",definitions:{UploadOwnFileRequest:{type:"object",properties:{content:{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}},filename:{type:"string"},mimetype:{type:"string"},expiresAt:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["content","filename","mimetype","expiresAt","title"],additionalProperties:!1}}},r.CheckIdentityRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CheckIdentityRequest",definitions:{CheckIdentityRequest:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1}}},r.GetAttachmentMetadataRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttachmentMetadataRequest",definitions:{GetAttachmentMetadataRequest:{type:"object",properties:{id:{type:"string"},attachmentId:{type:"string"}},required:["id","attachmentId"],additionalProperties:!1}}},r.GetMessageRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetMessageRequest",definitions:{GetMessageRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetMessagesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetMessagesRequest",definitions:{GetMessagesRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},r.SendMessageRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SendMessageRequest",definitions:{SendMessageRequest:{type:"object",properties:{recipients:{type:"array",items:{type:"string"}},content:{},attachments:{type:"array",items:{type:"string"}}},required:["recipients","content"],additionalProperties:!1}}},r.AcceptRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/AcceptRelationshipChangeRequest",definitions:{AcceptRelationshipChangeRequest:{type:"object",properties:{relationshipId:{type:"string"},changeId:{type:"string"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1}}},r.CreateRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipRequest",definitions:{CreateRelationshipRequest:{type:"object",properties:{templateId:{type:"string"},content:{}},required:["templateId","content"],additionalProperties:!1}}},r.CreateRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipChangeRequest",definitions:{CreateRelationshipChangeRequest:{type:"object",properties:{id:{type:"string"},content:{}},required:["id"],additionalProperties:!1}}},r.GetRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipRequest",definitions:{GetRelationshipRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetRelationshipByAddressRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipByAddressRequest",definitions:{GetRelationshipByAddressRequest:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1}}},r.GetRelationshipsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipsRequest",definitions:{GetRelationshipsRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},r.RejectRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RejectRelationshipChangeRequest",definitions:{RejectRelationshipChangeRequest:{type:"object",properties:{relationshipId:{type:"string"},changeId:{type:"string"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1}}},r.RevokeRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RevokeRelationshipChangeRequest",definitions:{RevokeRelationshipChangeRequest:{type:"object",properties:{relationshipId:{type:"string"},changeId:{type:"string"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1}}},r.CreateOwnRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOwnRelationshipTemplateRequest",definitions:{CreateOwnRelationshipTemplateRequest:{type:"object",properties:{expiresAt:{type:"string"},content:{},maxNumberOfRelationships:{type:"number"}},required:["expiresAt","content"],additionalProperties:!1}}},r.CreateTokenForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenForOwnTemplateRequest",definitions:{CreateTokenForOwnTemplateRequest:{type:"object",properties:{templateId:{type:"string"},expiresAt:{type:"string"},ephemeral:{type:"boolean"}},required:["templateId"],additionalProperties:!1}}},r.CreateTokenQrCodeForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenQrCodeForOwnTemplateRequest",definitions:{CreateTokenQrCodeForOwnTemplateRequest:{type:"object",properties:{templateId:{type:"string"},expiresAt:{type:"string"}},required:["templateId"],additionalProperties:!1}}},r.GetRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipTemplateRequest",definitions:{GetRelationshipTemplateRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetRelationshipTemplatesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipTemplatesRequest",definitions:{GetRelationshipTemplatesRequest:{type:"object",properties:{query:{},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},r.LoadPeerRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateRequest",definitions:{LoadPeerRelationshipTemplateRequest:{type:"object",properties:{id:{type:"string"},secretKey:{type:"string"},reference:{type:"string"}},additionalProperties:!1}}},r.CreateOwnTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOwnTokenRequest",definitions:{CreateOwnTokenRequest:{type:"object",properties:{content:{},expiresAt:{type:"string"},ephemeral:{type:"boolean"}},required:["content","expiresAt","ephemeral"],additionalProperties:!1}}},r.GetQRCodeForTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetQRCodeForTokenRequest",definitions:{GetQRCodeForTokenRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetTokenRequest",definitions:{GetTokenRequest:{type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1}}},r.GetTokensRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetTokensRequest",definitions:{GetTokensRequest:{type:"object",properties:{query:{},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},r.LoadPeerTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenRequest",definitions:{LoadPeerTokenRequest:{type:"object",properties:{id:{type:"string"},secretKey:{type:"string"},reference:{type:"string"},ephemeral:{type:"boolean"}},required:["ephemeral"],additionalProperties:!1}}}},45420:function(t,r,a){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.UseCase=void 0;const o=a(90194),c=a(75172),l=a(19663),u=i(a(64530)),d=a(48728),p=a(6595);r.UseCase=class UseCase{constructor(t){this.requestValidator=t}async execute(t){if(this.requestValidator){const r=this.requestValidator.validate(t);if(r.isInvalid())return this.validationFailed(r)}try{return await this.executeInternal(t)}catch(t){return this.failingResultFromUnknownError(t)}}failingResultFromUnknownError(t){return t instanceof Error?t instanceof l.RequestError?this.handleRequestError(t):t instanceof o.ServalError?this.handleServalError(t):t instanceof c.ApplicationError?c.Result.fail(t):c.Result.fail(p.RuntimeErrors.general.unknown(`An error was thrown in a UseCase: ${t.message}`,t)):c.Result.fail(p.RuntimeErrors.general.unknown(`An unknown object was thrown in a UseCase: ${(0,u.default)(t)}`,t))}handleServalError(t){let r;return r=t instanceof o.ParsingError||t instanceof o.ValidationError?p.RuntimeErrors.serval.requestDeserialization(t.message):t.message.match(/Type '.+' was not found within reflection classes. You might have to install a module first./)?p.RuntimeErrors.serval.unknownType(t.message):p.RuntimeErrors.serval.general(t.message),r.stack=t.stack,c.Result.fail(r)}handleRequestError(t){return d.PlatformErrorCodes.isNotFoundError(t)?c.Result.fail(p.RuntimeErrors.general.recordNotFoundWithMessage(t.reason)):d.PlatformErrorCodes.isValidationError(t)||d.PlatformErrorCodes.isUnexpectedError(t)?c.Result.fail(new c.ApplicationError(t.code,t.message)):c.Result.fail(t)}validationFailed(t){var r,a,i;const o=t.getFailures()[0],l=null!==(r=o.code)&&void 0!==r?r:p.RuntimeErrors.general.invalidPropertyValue().code,u=null!==(i=null===(a=o.message)||void 0===a?void 0:a.replace(/\$propertyName/g,o.propertyName))&&void 0!==i?i:p.RuntimeErrors.general.invalidPropertyValue(o.propertyName).message;return c.Result.fail(new c.ApplicationError(l,u))}}},7049:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(56819),r),o(a(73832),r),o(a(6595),r),o(a(71683),r),o(a(32746),r),o(a(45420),r),o(a(20263),r),o(a(43492),r),o(a(43519),r),o(a(96665),r),o(a(53800),r)},20263:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AddressValidator=void 0;const i=a(63586);class AddressValidator extends i.AbstractValidator{constructor(t){super();let r=this.validateIfString((t=>t));t||(r=r.isNotNull()),r=r.hasLengthBetween(35,36),t&&r.whenNotNull()}static required(){return new AddressValidator(!1)}static optional(){return new AddressValidator(!0)}}r.AddressValidator=AddressValidator},43492:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DateValidator=void 0;const i=a(63586),o=a(99490);class DateValidator extends i.AbstractValidator{constructor(t){super();let r=this.validateIfString((t=>t));t||(r=r.isNotNull()),r=r.fulfills((t=>o.DateTime.fromISO(t).isValid)),t&&r.whenNotNull()}static required(){return new DateValidator(!1)}static optional(){return new DateValidator(!0)}}r.DateValidator=DateValidator},43519:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.IdValidator=void 0;const i=a(63586);class IdValidator extends i.AbstractValidator{constructor(t,r){super();let a=this.validateIfString((t=>t));t||(a=a.isNotNull()),a=a.fulfills((t=>r.validate(t))),t&&a.whenNotNull()}static required(t){return new IdValidator(!1,t)}static optional(t){return new IdValidator(!0,t)}}r.IdValidator=IdValidator},96665:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipAttributeDTOValidator=void 0;const i=a(3850),o=a(63586);class RelationshipAttributeDTOValidator extends o.AbstractValidator{constructor(){super(),this.validateIfString((t=>t.sharedItem)).fulfills((t=>i.ConsumptionIds.sharedItem.validate(t)))}static required(){return new RelationshipAttributeDTOValidator}}r.RelationshipAttributeDTOValidator=RelationshipAttributeDTOValidator},53800:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SchemaValidator=void 0;const i=a(63586);r.SchemaValidator=class SchemaValidator{constructor(t){this.schema=t}validate(t){const r=this.schema.validate(t);return this.convertValidationResult(r)}convertValidationResult(t){const r=new i.ValidationResult;return t.isValid||r.addFailures(t.errors.map(this.schemaErrorToValidationFailure)),r}schemaErrorToValidationFailure(t){const r=`${t.instancePath} ${t.message}`.replace(/^\//,"").replace(/"/g,"").trim();return new i.ValidationFailure(void 0,t.instancePath,void 0,void 0,r)}}},41192:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AttributeMapper=void 0;class AttributeMapper{static toAttributeDTO(t){return{id:t.id.toString(),content:t.content.toJSON(),createdAt:t.createdAt.toString()}}static toAttributeDTOList(t){return t.map((t=>this.toAttributeDTO(t)))}static toGetAttributesByNamesResponse(t){const r={};for(const a in t)r[a]=AttributeMapper.toAttributeDTO(t[a]);return r}}r.AttributeMapper=AttributeMapper},17716:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateAttributeUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049),m=a(41192);class CreateAttributeRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIf((t=>t.attribute)).isDefined(),this.validateIfString((t=>t.attribute.name)).isNotEmpty()}}let y=class CreateAttributeUseCase extends h.UseCase{constructor(t,r,a){super(a),this.attributeController=t,this.accountController=r}async executeInternal(t){const r=await u.ConsumptionAttribute.fromAttribute(t.attribute),a=await this.attributeController.createAttribute(r);return await this.accountController.syncDatawallet(),l.Result.ok(m.AttributeMapper.toAttributeDTO(a))}};y=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.ConsumptionAttributesController,d.AccountController,CreateAttributeRequestValidator])],y),r.CreateAttributeUseCase=y},24946:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DeleteAttributeUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049);class DeleteAttributeRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(h.IdValidator.required(u.ConsumptionIds.attribute))}}let m=class DeleteAttributeUseCase extends h.UseCase{constructor(t,r,a){super(a),this.attributeController=t,this.accountController=r}async executeInternal(t){const r=await this.attributeController.getAttribute(d.CoreId.from(t.id));return r?(await this.attributeController.deleteAttribute(r),await this.accountController.syncDatawallet(),l.Result.ok(void 0)):l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.ConsumptionAttribute))}};m=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.ConsumptionAttributesController,d.AccountController,DeleteAttributeRequestValidator])],m),r.DeleteAttributeUseCase=m},14856:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DeleteAttributeByNameUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049);class DeleteAttributeByNameRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.name)).isDefined()}}let m=class DeleteAttributeByNameUseCase extends h.UseCase{constructor(t,r,a){super(a),this.attributeController=t,this.accountController=r}async executeInternal(t){const r=await this.attributeController.getAttributeByName(t.name);return r?(await this.attributeController.deleteAttribute(r),await this.accountController.syncDatawallet(),l.Result.ok(void 0)):l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.ConsumptionAttribute))}};m=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.ConsumptionAttributesController,d.AccountController,DeleteAttributeByNameRequestValidator])],m),r.DeleteAttributeByNameUseCase=m},14746:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetAllValidUseCase=void 0;const l=a(75172),u=a(3850),d=a(7071),p=a(7049),h=a(41192);let m=class GetAllValidUseCase extends p.UseCase{constructor(t){super(),this.attributeController=t}async executeInternal(){const t=await this.attributeController.getValidAttributes();return l.Result.ok(h.AttributeMapper.toAttributeDTOList(t))}};m=i([c(0,d.Inject),o("design:paramtypes",[u.ConsumptionAttributesController])],m),r.GetAllValidUseCase=m},73421:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetAttributeUseCase=void 0;const l=a(75172),u=a(3850),d=a(25030),p=a(19663),h=a(7071),m=a(7049),y=a(41192);class GetAttributeRequestValidator extends m.RuntimeValidator{constructor(){super(),this.validateIf((t=>t.id)).fulfills(m.IdValidator.required(u.ConsumptionIds.attribute))}}let g=class GetAttributeUseCase extends m.UseCase{constructor(t,r){super(r),this.attributeController=t}async executeInternal(t){const r=await this.attributeController.getAttribute(p.CoreId.from(t.id));return r?l.Result.ok(y.AttributeMapper.toAttributeDTO(r)):l.Result.fail(m.RuntimeErrors.general.recordNotFound(d.Attribute))}};g=i([c(0,h.Inject),c(1,h.Inject),o("design:paramtypes",[u.ConsumptionAttributesController,GetAttributeRequestValidator])],g),r.GetAttributeUseCase=g},5519:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetAttributeByNameUseCase=void 0;const l=a(75172),u=a(3850),d=a(25030),p=a(7071),h=a(7049),m=a(41192);class GetAttributeByNameRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.name)).isNotEmpty()}}let y=class GetAttributeByNameUseCase extends h.UseCase{constructor(t,r){super(r),this.attributeController=t}async executeInternal(t){const r=await this.attributeController.getAttributeByName(t.name);return r?l.Result.ok(m.AttributeMapper.toAttributeDTO(r)):l.Result.fail(h.RuntimeErrors.general.recordNotFound(d.Attribute))}};y=i([c(0,p.Inject),c(1,p.Inject),o("design:paramtypes",[u.ConsumptionAttributesController,GetAttributeByNameRequestValidator])],y),r.GetAttributeByNameUseCase=y},99536:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetAttributesUseCase=void 0;const l=a(75172),u=a(3850),d=a(7071),p=a(7049),h=a(41192);class GetAttributesRequestValidator extends p.RuntimeValidator{constructor(){super()}}let m=class GetAttributesUseCase extends p.UseCase{constructor(t,r){super(r),this.attributeController=t}async executeInternal(t){const r=await this.attributeController.getAttributes();return l.Result.ok(h.AttributeMapper.toAttributeDTOList(r))}};m=i([c(0,d.Inject),c(1,d.Inject),o("design:paramtypes",[u.ConsumptionAttributesController,GetAttributesRequestValidator])],m),r.GetAttributesUseCase=m},18796:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetAttributesByNamesUseCase=void 0;const l=a(75172),u=a(3850),d=a(7071),p=a(7049),h=a(41192);class GetAttributesByNamesRequestValidator extends p.RuntimeValidator{constructor(){super()}}let m=class GetAttributesByNamesUseCase extends p.UseCase{constructor(t,r){super(r),this.attributeController=t}async executeInternal(t){const r=await this.attributeController.getAttributesByName();return l.Result.ok(h.AttributeMapper.toGetAttributesByNamesResponse(r))}};m=i([c(0,d.Inject),c(1,d.Inject),o("design:paramtypes",[u.ConsumptionAttributesController,GetAttributesByNamesRequestValidator])],m),r.GetAttributesByNamesUseCase=m},16932:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetHistoryByNameUseCase=void 0;const l=a(75172),u=a(3850),d=a(25030),p=a(7071),h=a(7049),m=a(41192);class GetHistoryByNameRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.name)).isDefined()}}let y=class GetHistoryByNameUseCase extends h.UseCase{constructor(t,r){super(r),this.attributeController=t}async executeInternal(t){const r=await this.attributeController.getAttributeHistoryByName(t.name);return 0===r.length?l.Result.fail(h.RuntimeErrors.general.recordNotFound(d.Attribute)):l.Result.ok(m.AttributeMapper.toAttributeDTOList(r))}};y=i([c(0,p.Inject),c(1,p.Inject),o("design:paramtypes",[u.ConsumptionAttributesController,GetHistoryByNameRequestValidator])],y),r.GetHistoryByNameUseCase=y},4415:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SucceedAttributeUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049),m=a(41192);class SucceedAttributeRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIf((t=>t.validFrom)).fulfills(h.DateValidator.optional()),this.validateIf((t=>t.attribute)).isDefined(),this.validateIf((t=>t.attribute.name)).isNotEmpty()}}let y=class SucceedAttributeUseCase extends h.UseCase{constructor(t,r,a){super(a),this.attributeController=t,this.accountController=r}async executeInternal(t){const r=await u.ConsumptionAttribute.fromAttribute(t.attribute),a=await this.attributeController.succeedAttribute(r,t.validFrom?d.CoreDate.from(t.validFrom):void 0);return await this.accountController.syncDatawallet(),l.Result.ok(m.AttributeMapper.toAttributeDTO(a))}};y=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.ConsumptionAttributesController,d.AccountController,SucceedAttributeRequestValidator])],y),r.SucceedAttributeUseCase=y},9660:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.UpdateAttributeUseCase=void 0;const l=a(75172),u=a(3850),d=a(25030),p=a(19663),h=a(7071),m=a(7049),y=a(41192);class UpdateAttributeRequestValidator extends m.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(m.IdValidator.required(u.ConsumptionIds.attribute)),this.validateIf((t=>t.attribute)).isDefined(),this.validateIf((t=>t.attribute.name)).isNotEmpty()}}let g=class UpdateAttributeUseCase extends m.UseCase{constructor(t,r,a){super(a),this.attributeController=t,this.accountController=r}async executeInternal(t){const r=await this.attributeController.getAttribute(p.CoreId.from(t.id));if(!r)return l.Result.fail(m.RuntimeErrors.general.recordNotFound(u.ConsumptionAttribute));r.content=d.Attribute.from(t.attribute);const a=await this.attributeController.updateAttribute(r);return await this.accountController.syncDatawallet(),l.Result.ok(y.AttributeMapper.toAttributeDTO(a))}};g=i([c(0,h.Inject),c(1,h.Inject),c(2,h.Inject),o("design:paramtypes",[u.ConsumptionAttributesController,p.AccountController,UpdateAttributeRequestValidator])],g),r.UpdateAttributeUseCase=g},20099:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(41192),r),o(a(17716),r),o(a(24946),r),o(a(14856),r),o(a(14746),r),o(a(73421),r),o(a(5519),r),o(a(99536),r),o(a(18796),r),o(a(16932),r),o(a(4415),r),o(a(9660),r)},37372:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateDraftUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049),m=a(50660);class CreateDraftRequestValidator extends h.RuntimeValidator{constructor(){super()}}let y=class CreateDraftUseCase extends h.UseCase{constructor(t,r,a){super(a),this.draftController=t,this.accountController=r}async executeInternal(t){const r=await this.draftController.createDraft(t.content,t.type);return await this.accountController.syncDatawallet(),l.Result.ok(m.DraftMapper.toDraftDTO(r))}};y=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.DraftsController,d.AccountController,CreateDraftRequestValidator])],y),r.CreateDraftUseCase=y},69696:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DeleteDraftUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049);class DeleteDraftRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfAny((t=>t.id)).fulfills(h.IdValidator.required(u.ConsumptionIds.draft))}}let m=class DeleteDraftUseCase extends h.UseCase{constructor(t,r,a){super(a),this.draftController=t,this.accountController=r}async executeInternal(t){const r=await this.draftController.getDraft(d.CoreId.from(t.id));return r?(await this.draftController.deleteDraft(r),await this.accountController.syncDatawallet(),l.Result.ok(void 0)):l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.Draft))}};m=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.DraftsController,d.AccountController,DeleteDraftRequestValidator])],m),r.DeleteDraftUseCase=m},50660:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DraftMapper=void 0;r.DraftMapper=class DraftMapper{static toDraftDTO(t){return{id:t.id.toString(),type:t.type,createdAt:t.createdAt.toString(),lastModifiedAt:t.lastModifiedAt.toISOString(),content:t.content.toJSON()}}static toDraftDTOList(t){return t.map((t=>this.toDraftDTO(t)))}}},23165:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetDraftUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049),m=a(50660);class GetDraftRequestValidator extends h.RuntimeValidator{constructor(){super()}}let y=class GetDraftUseCase extends h.UseCase{constructor(t,r){super(r),this.draftController=t}async executeInternal(t){const r=await this.draftController.getDraft(d.CoreId.from(t.id));return r?l.Result.ok(m.DraftMapper.toDraftDTO(r)):l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.Draft))}};y=i([c(0,p.Inject),c(1,p.Inject),o("design:paramtypes",[u.DraftsController,GetDraftRequestValidator])],y),r.GetDraftUseCase=y},46863:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetDraftsUseCase=void 0;const l=a(92937),u=a(75172),d=a(3850),p=a(94714),h=a(7071),m=a(7049),y=a(50660);let g=class GetDraftsUseCase extends m.UseCase{constructor(t,r){super(r),this.draftController=t}async executeInternal(t){const r=GetDraftsUseCase.queryTranslator.parse(t.query),a=await this.draftController.getDrafts(r);return u.Result.ok(y.DraftMapper.toDraftDTOList(a))}};g.queryTranslator=new l.QueryTranslator({whitelist:{[(0,p.nameof)((t=>t.type))]:!0,[(0,p.nameof)((t=>t.createdAt))]:!0,[(0,p.nameof)((t=>t.lastModifiedAt))]:!0}}),g=i([c(0,h.Inject),c(1,h.Inject),o("design:paramtypes",[d.DraftsController,m.RuntimeValidator])],g),r.GetDraftsUseCase=g},65760:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.UpdateDraftUseCase=void 0;const l=a(90194),u=a(75172),d=a(3850),p=a(19663),h=a(7071),m=a(7049),y=a(50660);class UpdateDraftRequestValidator extends m.RuntimeValidator{constructor(){super()}}let g=class UpdateDraftUseCase extends m.UseCase{constructor(t,r,a){super(a),this.draftController=t,this.accountController=r}async executeInternal(t){const r=await this.draftController.getDraft(p.CoreId.from(t.id));return r?(r.content=await l.SerializableAsync.fromUnknown(t.content),await this.draftController.updateDraft(r),await this.accountController.syncDatawallet(),u.Result.ok(y.DraftMapper.toDraftDTO(r))):u.Result.fail(m.RuntimeErrors.general.recordNotFound(d.Draft))}};g=i([c(0,h.Inject),c(1,h.Inject),c(2,h.Inject),o("design:paramtypes",[d.DraftsController,p.AccountController,UpdateDraftRequestValidator])],g),r.UpdateDraftUseCase=g},75966:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(37372),r),o(a(69696),r),o(a(50660),r),o(a(23165),r),o(a(46863),r),o(a(65760),r)},23742:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(20099),r),o(a(75966),r),o(a(94938),r),o(a(21394),r),o(a(90710),r)},71979:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateRelationshipInfoUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049),m=a(45420),y=a(56618);class CreateRelationshipInfoRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfAny((t=>t.relationshipId)).fulfills(h.IdValidator.required(d.BackboneIds.relationship)),this.validateIfEach((t=>t.attributes)).fulfills(h.RelationshipAttributeDTOValidator.required())}}let g=class CreateRelationshipInfoUseCase extends m.UseCase{constructor(t,r,a){super(a),this.relationshipInfoController=t,this.accountController=r}async executeInternal(t){const r=d.CoreId.from(t.relationshipId);if(void 0!==await this.relationshipInfoController.getRelationshipInfoByRelationship(r))return l.Result.fail(h.RuntimeErrors.relationshipInfo.relationshipInfoExists(r.toString()));const a=await Promise.all(t.attributes.map((t=>u.RelationshipAttribute.from({name:t.name,content:t.content,sharedItem:d.CoreId.from(t.sharedItem)})))),i=void 0===t.theme?void 0:await u.RelationshipTheme.from(t.theme),o=await u.RelationshipInfo.from({id:await u.ConsumptionIds.relationshipInfo.generate(),relationshipId:r,attributes:a,isPinned:t.isPinned,title:t.title,description:t.description,userTitle:t.userTitle,userDescription:t.userDescription,theme:i});return await this.relationshipInfoController.createRelationshipInfo(o),await this.accountController.syncDatawallet(),l.Result.ok(y.RelationshipInfoMapper.toRelationshipInfoDTO(o))}};g=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.RelationshipInfoController,d.AccountController,CreateRelationshipInfoRequestValidator])],g),r.CreateRelationshipInfoUseCase=g},11788:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DeleteRelationshipInfoUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049),m=a(6595),y=a(45420);class DeleteRelationshipInfoRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfAny((t=>t.id)).fulfills(h.IdValidator.required(u.ConsumptionIds.relationshipInfo))}}let g=class DeleteRelationshipInfoUseCase extends y.UseCase{constructor(t,r,a){super(a),this.relationshipInfoController=t,this.accountController=r}async executeInternal(t){const r=await this.relationshipInfoController.getRelationshipInfo(d.CoreId.from(t.id));return r?(await this.relationshipInfoController.deleteRelationshipInfo(r),await this.accountController.syncDatawallet(),l.Result.ok(void 0)):l.Result.fail(m.RuntimeErrors.general.recordNotFound(u.RelationshipInfo))}};g=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.RelationshipInfoController,d.AccountController,DeleteRelationshipInfoRequestValidator])],g),r.DeleteRelationshipInfoUseCase=g},42212:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DeleteRelationshipInfoByRelationshipUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049),m=a(6595),y=a(45420);class DeleteRelationshipInfoByRelationshipRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfAny((t=>t.relationshipId)).fulfills(h.IdValidator.required(d.BackboneIds.relationship))}}let g=class DeleteRelationshipInfoByRelationshipUseCase extends y.UseCase{constructor(t,r,a){super(a),this.relationshipInfoController=t,this.accountController=r}async executeInternal(t){const r=await this.relationshipInfoController.getRelationshipInfoByRelationship(d.CoreId.from(t.relationshipId));return r?(await this.relationshipInfoController.deleteRelationshipInfo(r),await this.accountController.syncDatawallet(),l.Result.ok(void 0)):l.Result.fail(m.RuntimeErrors.general.recordNotFound(u.RelationshipInfo))}};g=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.RelationshipInfoController,d.AccountController,DeleteRelationshipInfoByRelationshipRequestValidator])],g),r.DeleteRelationshipInfoByRelationshipUseCase=g},25116:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetRelationshipInfoUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(63586),h=a(7071),m=a(7049),y=a(6595),g=a(45420),v=a(56618);class GetRelationshipInfoRequestValidator extends p.AbstractValidator{constructor(){super(),this.validateIfAny((t=>t.id)).fulfills(m.IdValidator.required(u.ConsumptionIds.relationshipInfo))}}let b=class GetRelationshipInfoUseCase extends g.UseCase{constructor(t,r){super(r),this.relationshipInfoController=t}async executeInternal(t){const r=await this.relationshipInfoController.getRelationshipInfo(d.CoreId.from(t.id));return r?l.Result.ok(v.RelationshipInfoMapper.toRelationshipInfoDTO(r)):l.Result.fail(y.RuntimeErrors.general.recordNotFound(u.RelationshipInfo))}};b=i([c(0,h.Inject),c(1,h.Inject),o("design:paramtypes",[u.RelationshipInfoController,GetRelationshipInfoRequestValidator])],b),r.GetRelationshipInfoUseCase=b},27170:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetRelationshipInfoByRelationshipUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049),m=a(6595),y=a(45420),g=a(56618);class GetRelationshipInfoRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfAny((t=>t.relationshipId)).fulfills(h.IdValidator.required(d.BackboneIds.relationship))}}let v=class GetRelationshipInfoByRelationshipUseCase extends y.UseCase{constructor(t,r){super(r),this.relationshipInfoController=t}async executeInternal(t){const r=await this.relationshipInfoController.getRelationshipInfoByRelationship(d.CoreId.from(t.relationshipId));return r?l.Result.ok(g.RelationshipInfoMapper.toRelationshipInfoDTO(r)):l.Result.fail(m.RuntimeErrors.general.recordNotFound(u.RelationshipInfo))}};v=i([c(0,p.Inject),c(1,p.Inject),o("design:paramtypes",[u.RelationshipInfoController,GetRelationshipInfoRequestValidator])],v),r.GetRelationshipInfoByRelationshipUseCase=v},16616:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipAttributeMapper=void 0;r.RelationshipAttributeMapper=class RelationshipAttributeMapper{static toRelationshipAttributeDTO(t){return{name:t.name,content:t.content.toJSON(),sharedItem:t.sharedItem.toString()}}static toRelationshipAttributeDTOList(t){return t.map((t=>this.toRelationshipAttributeDTO(t)))}}},56618:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipInfoMapper=void 0;const i=a(16616),o=a(51711);r.RelationshipInfoMapper=class RelationshipInfoMapper{static toRelationshipInfoDTO(t){return{id:t.id.toString(),relationshipId:t.relationshipId.toString(),attributes:i.RelationshipAttributeMapper.toRelationshipAttributeDTOList(t.attributes),isPinned:t.isPinned,title:t.title,description:t.description,userTitle:t.userTitle,userDescription:t.userDescription,theme:t.theme?o.RelationshipThemeMapper.toRelationshipThemeDTO(t.theme):void 0}}static toRelationshipInfoDTOList(t){return t.map((t=>this.toRelationshipInfoDTO(t)))}}},51711:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipThemeMapper=void 0;r.RelationshipThemeMapper=class RelationshipThemeMapper{static toRelationshipThemeDTO(t){return{image:t.image,imageBar:t.imageBar,backgroundColor:t.backgroundColor,foregroundColor:t.foregroundColor}}static toRelationshipThemeDTOList(t){return t.map((t=>this.toRelationshipThemeDTO(t)))}}},75341:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.UpdateRelationshipInfoUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049),m=a(6595),y=a(45420),g=a(56618);class UpdateRelationshipInfoRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfAny((t=>t.id)).fulfills(h.IdValidator.required(u.ConsumptionIds.relationshipInfo)),this.validateIfEachAny((t=>t.attributes)).fulfills(h.RelationshipAttributeDTOValidator.required())}}let v=class UpdateRelationshipInfoUseCase extends y.UseCase{constructor(t,r,a){super(a),this.relationshipInfoController=t,this.accountController=r}async executeInternal(t){const r=await this.relationshipInfoController.getRelationshipInfo(d.CoreId.from(t.id));return r?(void 0!==t.attributes&&(r.attributes=await Promise.all(t.attributes.map((t=>u.RelationshipAttribute.from({name:t.name,content:t.content,sharedItem:d.CoreId.from(t.sharedItem)}))))),r.isPinned=void 0===t.isPinned?r.isPinned:t.isPinned,r.title=void 0===t.title?r.title:t.title,r.description=void 0===t.description?r.description:t.description,r.userTitle=void 0===t.userTitle?r.userTitle:t.userTitle,r.userDescription=void 0===t.userDescription?r.userDescription:t.userDescription,r.theme=void 0===t.theme?r.theme:await u.RelationshipTheme.from(t.theme),await this.relationshipInfoController.updateRelationshipInfo(r),await this.accountController.syncDatawallet(),l.Result.ok(g.RelationshipInfoMapper.toRelationshipInfoDTO(r))):l.Result.fail(m.RuntimeErrors.general.recordNotFound(u.RelationshipInfo))}};v=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.RelationshipInfoController,d.AccountController,UpdateRelationshipInfoRequestValidator])],v),r.UpdateRelationshipInfoUseCase=v},94938:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(71979),r),o(a(11788),r),o(a(42212),r),o(a(25116),r),o(a(27170),r),o(a(75341),r)},83951:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateSettingUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049),m=a(96950);class CreateSettingRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.key)).isDefined(),this.validateIfAny((t=>t.value)).isDefined(),this.validateIfString((t=>t.reference)).fulfills(h.IdValidator.optional(d.TransportIds.generic)),this.validateIfString((t=>t.scope)).isIn([u.SettingScope.Device,u.SettingScope.Identity,u.SettingScope.Relationship]).whenDefined(),this.validateIfString((t=>t.succeedsAt)).fulfills(h.DateValidator.optional()),this.validateIfString((t=>t.succeedsItem)).fulfills(h.IdValidator.optional(u.ConsumptionIds.setting))}}let y=class CreateSettingUseCase extends h.UseCase{constructor(t,r,a){super(a),this.settingController=t,this.accountController=r}async executeInternal(t){const r=await this.settingController.createSetting({key:t.key,value:t.value,reference:t.reference?d.CoreId.from(t.reference):void 0,scope:t.scope,succeedsAt:t.succeedsAt?d.CoreDate.from(t.succeedsAt):void 0,succeedsItem:t.succeedsItem?d.CoreId.from(t.succeedsItem):void 0});return await this.accountController.syncDatawallet(),l.Result.ok(m.SettingMapper.toSettingDTO(r))}};y=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.SettingsController,d.AccountController,CreateSettingRequestValidator])],y),r.CreateSettingUseCase=y},80678:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DeleteSettingUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(60485),m=a(7049);class DeleteSettingRequestValidator extends m.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(m.IdValidator.required(u.ConsumptionIds.setting))}}let y=class DeleteSettingUseCase extends m.UseCase{constructor(t,r,a){super(a),this.settingController=t,this.accountController=r}async executeInternal(t){const r=await this.settingController.getSetting(d.CoreId.from(t.id));return r?(await this.settingController.deleteSetting(r),await this.accountController.syncDatawallet(),l.Result.ok(void 0)):l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.Setting))}};y=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.SettingsController,d.AccountController,DeleteSettingRequestValidator])],y),r.DeleteSettingUseCase=y},86798:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetSettingUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049),m=a(96950);class GetSettingRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(h.IdValidator.required(u.ConsumptionIds.setting))}}let y=class GetSettingUseCase extends h.UseCase{constructor(t,r){super(r),this.settingController=t}async executeInternal(t){const r=await this.settingController.getSetting(d.CoreId.from(t.id));return r?l.Result.ok(m.SettingMapper.toSettingDTO(r)):l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.Setting))}};y=i([c(0,p.Inject),c(1,p.Inject),o("design:paramtypes",[u.SettingsController,GetSettingRequestValidator])],y),r.GetSettingUseCase=y},26101:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetSettingsUseCase=void 0;const l=a(92937),u=a(75172),d=a(3850),p=a(94714),h=a(7071),m=a(7049),y=a(96950);let g=class GetSettingsUseCase extends m.UseCase{constructor(t,r){super(r),this.settingController=t}async executeInternal(t){const r=GetSettingsUseCase.queryTranslator.parse(t.query),a=await this.settingController.getSettings(r);return u.Result.ok(y.SettingMapper.toSettingDTOList(a))}};g.queryTranslator=new l.QueryTranslator({whitelist:{[(0,p.nameof)((t=>t.key))]:!0,[(0,p.nameof)((t=>t.scope))]:!0,[(0,p.nameof)((t=>t.reference))]:!0,[(0,p.nameof)((t=>t.createdAt))]:!0,[(0,p.nameof)((t=>t.deletedAt))]:!0,[(0,p.nameof)((t=>t.succeedsItem))]:!0,[(0,p.nameof)((t=>t.succeedsAt))]:!0}}),g=i([c(0,h.Inject),c(1,h.Inject),o("design:paramtypes",[d.SettingsController,m.RuntimeValidator])],g),r.GetSettingsUseCase=g},96950:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SettingMapper=void 0;r.SettingMapper=class SettingMapper{static toSettingDTO(t){var r,a,i,o;return{id:t.id.toString(),key:t.key,scope:t.scope.toString(),reference:null===(r=t.reference)||void 0===r?void 0:r.toString(),value:t.value.toJSON(),createdAt:t.createdAt.toISOString(),deletedAt:null===(a=t.deletedAt)||void 0===a?void 0:a.toISOString(),succeedsItem:null===(i=t.succeedsItem)||void 0===i?void 0:i.toString(),succeedsAt:null===(o=t.succeedsAt)||void 0===o?void 0:o.toString()}}static toSettingDTOList(t){return t.map((t=>this.toSettingDTO(t)))}}},1853:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.UpdateSettingUseCase=void 0;const l=a(90194),u=a(75172),d=a(3850),p=a(19663),h=a(7071),m=a(60485),y=a(7049),g=a(96950);class UpdateSettingRequestValidator extends y.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(y.IdValidator.required(d.ConsumptionIds.setting)),this.validateIfAny((t=>t.value)).isDefined()}}let v=class UpdateSettingUseCase extends y.UseCase{constructor(t,r,a){super(a),this.settingController=t,this.accountController=r}async executeInternal(t){const r=await this.settingController.getSetting(p.CoreId.from(t.id));return r?(r.value=await l.SerializableAsync.from(t.value),await this.settingController.updateSetting(r),await this.accountController.syncDatawallet(),u.Result.ok(g.SettingMapper.toSettingDTO(r))):u.Result.fail(m.RuntimeErrors.general.recordNotFound(d.Setting))}};v=i([c(0,h.Inject),c(1,h.Inject),c(2,h.Inject),o("design:paramtypes",[d.SettingsController,p.AccountController,UpdateSettingRequestValidator])],v),r.UpdateSettingUseCase=v},21394:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(83951),r),o(a(80678),r),o(a(86798),r),o(a(26101),r),o(a(96950),r),o(a(1853),r)},45382:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateSharedItemUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049),m=a(99443);class CreateSharedItemRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfEachString((t=>t.tags)).isDefined().whenDefined(),this.validateIfString((t=>t.sharedBy)).fulfills(h.AddressValidator.required()),this.validateIfString((t=>t.sharedWith)).fulfills(h.AddressValidator.required()),this.validateIfString((t=>t.sharedAt)).fulfills(h.DateValidator.required()),this.validateIfString((t=>t.reference)).fulfills(h.IdValidator.optional(d.TransportIds.generic)),this.validateIfString((t=>t.content)).isDefined(),this.validateIfString((t=>t.succeedsItem)).fulfills(h.IdValidator.optional(u.ConsumptionIds.sharedItem)),this.validateIfString((t=>t.succeedsAt)).fulfills(h.DateValidator.optional()),this.validateIfString((t=>t.expiresAt)).fulfills(h.DateValidator.optional())}}let y=class CreateSharedItemUseCase extends h.UseCase{constructor(t,r,a){super(a),this.sharedItemsController=t,this.accountController=r}async executeInternal(t){const r=await u.SharedItem.from({id:await u.ConsumptionIds.sharedItem.generate(),tags:t.tags,sharedBy:d.CoreAddress.from(t.sharedBy),sharedWith:d.CoreAddress.from(t.sharedWith),sharedAt:d.CoreDate.from(t.sharedAt),reference:t.reference?d.CoreId.from(t.reference):void 0,content:t.content,succeedsItem:t.succeedsItem?d.CoreId.from(t.succeedsItem):void 0,succeedsAt:t.succeedsAt?d.CoreDate.from(t.succeedsAt):void 0,expiresAt:t.expiresAt?d.CoreDate.from(t.expiresAt):void 0});return await this.sharedItemsController.createSharedItem(r),await this.accountController.syncDatawallet(),l.Result.ok(m.SharedItemsMapper.toSharedItemDTO(r))}};y=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.SharedItemsController,d.AccountController,CreateSharedItemRequestValidator])],y),r.CreateSharedItemUseCase=y},71872:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DeleteSharedItemUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(60485),m=a(7049);class DeleteSharedItemRequestValidator extends m.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(m.IdValidator.required(u.ConsumptionIds.sharedItem))}}let y=class DeleteSharedItemUseCase extends m.UseCase{constructor(t,r,a){super(a),this.sharedItemsController=t,this.accountController=r}async executeInternal(t){const r=await this.sharedItemsController.getSharedItem(d.CoreId.from(t.id));return r?(await this.sharedItemsController.deleteSharedItem(r),await this.accountController.syncDatawallet(),l.Result.ok(void 0)):l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.SharedItem))}};y=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.SharedItemsController,d.AccountController,DeleteSharedItemRequestValidator])],y),r.DeleteSharedItemUseCase=y},26081:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetSharedItemUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(7071),h=a(7049),m=a(99443);class GetSharedItemRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(h.IdValidator.required(u.ConsumptionIds.sharedItem))}}let y=class GetSharedItemUseCase extends h.UseCase{constructor(t,r){super(r),this.sharedItemsController=t}async executeInternal(t){const r=await this.sharedItemsController.getSharedItem(d.CoreId.from(t.id));return r?l.Result.ok(m.SharedItemsMapper.toSharedItemDTO(r)):l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.SharedItem))}};y=i([c(0,p.Inject),c(1,p.Inject),o("design:paramtypes",[u.SharedItemsController,GetSharedItemRequestValidator])],y),r.GetSharedItemUseCase=y},98796:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetSharedItemsUseCase=void 0;const l=a(92937),u=a(75172),d=a(3850),p=a(94714),h=a(7071),m=a(7049),y=a(99443);let g=class GetSharedItemsUseCase extends m.UseCase{constructor(t,r){super(r),this.sharedItemsController=t}async executeInternal(t){const r=GetSharedItemsUseCase.queryTranslator.parse(t.query),a=await this.sharedItemsController.getSharedItems(r);return u.Result.ok(y.SharedItemsMapper.toSharedItemDTOList(a))}};g.queryTranslator=new l.QueryTranslator({whitelist:{[(0,p.nameof)((t=>t.tags))]:!0,[(0,p.nameof)((t=>t.sharedBy))]:!0,[(0,p.nameof)((t=>t.sharedWith))]:!0,[(0,p.nameof)((t=>t.sharedAt))]:!0,[(0,p.nameof)((t=>t.reference))]:!0,[(0,p.nameof)((t=>t.succeedsItem))]:!0,[(0,p.nameof)((t=>t.succeedsAt))]:!0,[(0,p.nameof)((t=>t.expiresAt))]:!0},custom:{tags:(t,r)=>{t.tags={$contains:r}}}}),g=i([c(0,h.Inject),c(1,h.Inject),o("design:paramtypes",[d.SharedItemsController,m.RuntimeValidator])],g),r.GetSharedItemsUseCase=g},4408:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetSharedItemsByAddressUseCase=void 0;const l=a(75172),u=a(3850),d=a(94714),p=a(7071),h=a(7049),m=a(99443);class GetSharedItemsByAddressRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.address)).fulfills(h.AddressValidator.required())}}let y=class GetSharedItemsByAddressUseCase extends h.UseCase{constructor(t,r){super(r),this.sharedItemsController=t}async executeInternal(t){const r=await this.sharedItemsController.getSharedItems({$or:[{[(0,d.nameof)((t=>t.sharedBy))]:t.address},{[(0,d.nameof)((t=>t.sharedWith))]:t.address}]});return l.Result.ok(m.SharedItemsMapper.toSharedItemDTOList(r))}};y=i([c(0,p.Inject),c(1,p.Inject),o("design:paramtypes",[u.SharedItemsController,GetSharedItemsByAddressRequestValidator])],y),r.GetSharedItemsByAddressUseCase=y},14042:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetSharedItemsByReferenceUseCase=void 0;const l=a(75172),u=a(3850),d=a(19663),p=a(94714),h=a(7071),m=a(7049),y=a(99443);class GetSharedItemsByReferenceRequestValidator extends m.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.reference)).fulfills(m.IdValidator.required(d.TransportIds.generic))}}let g=class GetSharedItemsByReferenceUseCase extends m.UseCase{constructor(t,r){super(r),this.sharedItemsController=t}async executeInternal(t){const r=await this.sharedItemsController.getSharedItems({[(0,p.nameof)((t=>t.reference))]:t.reference});return l.Result.ok(y.SharedItemsMapper.toSharedItemDTOList(r))}};g=i([c(0,h.Inject),c(1,h.Inject),o("design:paramtypes",[u.SharedItemsController,GetSharedItemsByReferenceRequestValidator])],g),r.GetSharedItemsByReferenceUseCase=g},55402:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetSharedItemsSharedByAddressUseCase=void 0;const l=a(75172),u=a(3850),d=a(94714),p=a(7071),h=a(7049),m=a(99443);class GetSharedItemsSharedByAddressRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.address)).fulfills(h.AddressValidator.required())}}let y=class GetSharedItemsSharedByAddressUseCase extends h.UseCase{constructor(t,r){super(r),this.sharedItemsController=t}async executeInternal(t){const r=await this.sharedItemsController.getSharedItems({[(0,d.nameof)((t=>t.sharedBy))]:t.address});return l.Result.ok(m.SharedItemsMapper.toSharedItemDTOList(r))}};y=i([c(0,p.Inject),c(1,p.Inject),o("design:paramtypes",[u.SharedItemsController,GetSharedItemsSharedByAddressRequestValidator])],y),r.GetSharedItemsSharedByAddressUseCase=y},6652:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetSharedItemsSharedWithAddressUseCase=void 0;const l=a(75172),u=a(3850),d=a(94714),p=a(7071),h=a(7049),m=a(99443);class GetSharedItemsSharedWithAddressRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.address)).fulfills(h.AddressValidator.required())}}let y=class GetSharedItemsSharedWithAddressUseCase extends h.UseCase{constructor(t,r){super(r),this.sharedItemsController=t}async executeInternal(t){const r=await this.sharedItemsController.getSharedItems({[(0,d.nameof)((t=>t.sharedWith))]:t.address});return l.Result.ok(m.SharedItemsMapper.toSharedItemDTOList(r))}};y=i([c(0,p.Inject),c(1,p.Inject),o("design:paramtypes",[u.SharedItemsController,GetSharedItemsSharedWithAddressRequestValidator])],y),r.GetSharedItemsSharedWithAddressUseCase=y},99443:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SharedItemsMapper=void 0;r.SharedItemsMapper=class SharedItemsMapper{static toSharedItemDTO(t){var r,a,i,o;return{id:t.id.toString(),tags:t.tags,sharedBy:t.sharedBy.toString(),sharedWith:t.sharedWith.toString(),sharedAt:t.sharedAt.toString(),reference:null===(r=t.reference)||void 0===r?void 0:r.toString(),content:t.content.toJSON(),succeedsItem:null===(a=t.succeedsItem)||void 0===a?void 0:a.toString(),succeedsAt:null===(i=t.succeedsAt)||void 0===i?void 0:i.toString(),expiresAt:null===(o=t.expiresAt)||void 0===o?void 0:o.toString()}}static toSharedItemDTOList(t){return t.map((t=>this.toSharedItemDTO(t)))}}},40466:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.UpdateSharedItemUseCase=void 0;const l=a(90194),u=a(75172),d=a(3850),p=a(19663),h=a(7071),m=a(60485),y=a(7049),g=a(99443);class UpdateSharedItemRequestValidator extends y.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(y.IdValidator.required(d.ConsumptionIds.sharedItem)),this.validateIfAny((t=>t.content)).isDefined()}}let v=class UpdateSharedItemUseCase extends y.UseCase{constructor(t,r,a){super(a),this.sharedItemsController=t,this.accountController=r}async executeInternal(t){const r=await this.sharedItemsController.getSharedItem(p.CoreId.from(t.id));return r?(r.content=l.Serializable.fromUnknown(t.content),await this.sharedItemsController.updateSharedItem(r),await this.accountController.syncDatawallet(),u.Result.ok(g.SharedItemsMapper.toSharedItemDTO(r))):u.Result.fail(m.RuntimeErrors.general.recordNotFound(d.SharedItem))}};v=i([c(0,h.Inject),c(1,h.Inject),c(2,h.Inject),o("design:paramtypes",[d.SharedItemsController,p.AccountController,UpdateSharedItemRequestValidator])],v),r.UpdateSharedItemUseCase=v},90710:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(45382),r),o(a(71872),r),o(a(26081),r),o(a(98796),r),o(a(4408),r),o(a(14042),r),o(a(55402),r),o(a(6652),r),o(a(99443),r),o(a(40466),r)},60485:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(49365),r),o(a(56819),r),o(a(6595),r),o(a(23742),r),o(a(29667),r)},72737:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DisableAutoSyncUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049);let h=class DisableAutoSyncUseCase extends p.UseCase{constructor(t){super(),this.accountController=t}executeInternal(){return this.accountController.disableAutoSync(),l.Result.ok(void 0)}};h=i([c(0,d.Inject),o("design:paramtypes",[u.AccountController])],h),r.DisableAutoSyncUseCase=h},89710:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.EnableAutoSyncUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049);let h=class EnableAutoSyncUseCase extends p.UseCase{constructor(t){super(),this.accountController=t}async executeInternal(){return await this.accountController.enableAutoSync(),l.Result.ok(void 0)}};h=i([c(0,d.Inject),o("design:paramtypes",[u.AccountController])],h),r.EnableAutoSyncUseCase=h},60569:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetDeviceInfoUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(83067);let m=class GetDeviceInfoUseCase extends p.UseCase{constructor(t){super(),this.deviceController=t}executeInternal(){const t=this.deviceController.device;return l.Result.ok(h.DeviceMapper.toDeviceDTO(t))}};m=i([c(0,d.Inject),o("design:paramtypes",[u.DeviceController])],m),r.GetDeviceInfoUseCase=m},73378:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetIdentityInfoUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049);let h=class GetIdentityInfoUseCase extends p.UseCase{constructor(t){super(),this.identityController=t}executeInternal(){const t=this.identityController.identity;return l.Result.ok({address:t.address.toString(),publicKey:t.publicKey.toString()})}};h=i([c(0,d.Inject),o("design:paramtypes",[u.IdentityController])],h),r.GetIdentityInfoUseCase=h},68562:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetSyncInfoUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049);let h=class GetSyncInfoUseCase extends p.UseCase{constructor(t){super(),this.accountController=t}async executeInternal(){const t=await this.accountController.getLastCompletedSyncTime(),r=await this.accountController.getLastCompletedDatawalletSyncTime();return l.Result.ok({lastSyncRun:t?{completedAt:t.toISOString()}:void 0,lastDatawalletSync:r?{completedAt:r.toISOString()}:void 0})}};h=i([c(0,d.Inject),o("design:paramtypes",[u.AccountController])],h),r.GetSyncInfoUseCase=h},63826:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RegisterPushNotificationTokenUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049);class Validator extends p.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.handle)).isDefined().isNotEmpty(),this.validateIfString((t=>t.installationId)).isDefined().isNotEmpty(),this.validateIfString((t=>t.platform)).isDefined().isNotEmpty()}}let h=class RegisterPushNotificationTokenUseCase extends p.UseCase{constructor(t,r){super(r),this.accountController=t}async executeInternal(t){return await this.accountController.registerPushNotificationToken({handle:t.handle,installationId:t.installationId,platform:t.platform}),l.Result.ok(void 0)}};h=i([c(0,d.Inject),c(1,d.Inject),o("design:paramtypes",[u.AccountController,Validator])],h),r.RegisterPushNotificationTokenUseCase=h},54204:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SyncDatawalletUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049);let h=class SyncDatawalletUseCase extends p.UseCase{constructor(t){super(),this.accountController=t}async executeInternal(){return await this.accountController.syncDatawallet(!0),l.Result.ok(void 0)}};h=i([c(0,d.Inject),o("design:paramtypes",[u.AccountController])],h),r.SyncDatawalletUseCase=h},84773:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SyncEverythingUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(42205),h=a(986),m=a(7049),y=a(76881),g=a(94316);let v=class SyncEverythingUseCase extends m.UseCase{constructor(t,r,a,i){super(),this.accountController=t,this.identityController=r,this.eventBus=a,this.logger=i.getLogger(SyncEverythingUseCase)}async executeInternal(){if(this.currentSync)return await this.currentSync;this.currentSync=this._executeInternal();try{return await this.currentSync}finally{this.currentSync=void 0}}async _executeInternal(){const t=await this.accountController.syncEverything(),r=t.messages.map((t=>y.MessageMapper.toMessageDTO(t))),a=t.relationships.map((t=>g.RelationshipMapper.toRelationshipDTO(t))),i=this.identityController.identity.address.toString();return this.processNewMessages(r,i),this.processNewRelationships(a,i),l.Result.ok({messages:r,relationships:a})}processNewRelationships(t,r){if(0!==t.length){this.logger.debug(`Found ${t.length} relationship(s) with changes. Start publishing on event bus...`);for(const a of t)this.eventBus.publish(new p.RelationshipChangedEvent(r,a));this.logger.debug("Finished publishing relationship changes on event bus.")}}processNewMessages(t,r){if(0!==t.length){this.logger.debug(`Found ${t.length} new message(s). Start publishing on event bus...`);for(const a of t)this.eventBus.publish(new p.MessageReceivedEvent(r,a));this.logger.debug("Finished publishing message changes on event bus.")}}};v=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),c(3,d.Inject),o("design:paramtypes",[u.AccountController,u.IdentityController,l.EventBus,h.RuntimeLoggerFactory])],v),r.SyncEverythingUseCase=v},69276:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(72737),r),o(a(89710),r),o(a(60569),r),o(a(73378),r),o(a(68562),r),o(a(63826),r),o(a(54204),r),o(a(84773),r)},5188:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateDeviceUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(83067);class CreateDeviceRequestValidator extends p.RuntimeValidator{constructor(){super()}}let m=class CreateDeviceUseCase extends p.UseCase{constructor(t,r,a){super(a),this.devicesController=t,this.accountController=r}async executeInternal(t){const r=await this.devicesController.sendDevice(t);return await this.accountController.syncDatawallet(),l.Result.ok(h.DeviceMapper.toDeviceDTO(r))}};m=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),o("design:paramtypes",[u.DevicesController,u.AccountController,CreateDeviceRequestValidator])],m),r.CreateDeviceUseCase=m},20795:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateDeviceOnboardingTokenUseCase=void 0;const l=a(75172),u=a(19663),d=a(99490),p=a(7071),h=a(7049),m=a(57121);class CreateDeviceOnboardingTokenRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(h.IdValidator.required(u.BackboneIds.device)),this.validateIf((t=>t.expiresAt)).fulfills(h.DateValidator.optional()),this.validateIf((t=>t.expiresAt)).fulfills((t=>d.DateTime.fromISO(t)>d.DateTime.utc())).whenNotNull().withFailureMessage("'$propertyName' must be in the future.")}}let y=class CreateDeviceOnboardingTokenUseCase extends h.UseCase{constructor(t,r,a){super(a),this.devicesController=t,this.tokenController=r}async executeInternal(t){const r=await this.devicesController.getSharedSecret(u.CoreId.from(t.id)),a=t.expiresAt?u.CoreDate.from(t.expiresAt):u.CoreDate.utc().add({minutes:5}),i=await u.TokenContentDeviceSharedSecret.from({sharedSecret:r}),o=await this.tokenController.sendToken({content:i,expiresAt:a,ephemeral:!0});return l.Result.ok(await m.TokenMapper.toTokenDTO(o,!0))}};y=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.DevicesController,u.TokenController,CreateDeviceOnboardingTokenRequestValidator])],y),r.CreateDeviceOnboardingTokenUseCase=y},2137:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DeleteDeviceUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049);class DeleteDeviceRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIf((t=>t.id)).fulfills(p.IdValidator.required(u.BackboneIds.device))}}let h=class DeleteDeviceUseCase extends p.UseCase{constructor(t,r,a){super(a),this.devicesController=t,this.accountController=r}async executeInternal(t){const r=await this.devicesController.get(u.CoreId.from(t.id));return r?(await this.devicesController.delete(r),await this.accountController.syncDatawallet(),l.Result.ok(void 0)):l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.Device))}};h=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),o("design:paramtypes",[u.DevicesController,u.AccountController,DeleteDeviceRequestValidator])],h),r.DeleteDeviceUseCase=h},83067:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DeviceMapper=void 0;const i=a(82890),o=a(19663);r.DeviceMapper=class DeviceMapper{static toDeviceDTO(t){var r,a;return{id:t.id.toString(),createdAt:t.createdAt.toString(),createdByDevice:t.createdByDevice.toString(),name:t.name,type:t.type.toString(),username:t.username,certificate:t.certificate,description:t.description,lastLoginAt:null===(r=t.lastLoginAt)||void 0===r?void 0:r.toString(),operatingSystem:t.operatingSystem,publicKey:null===(a=t.publicKey)||void 0===a?void 0:a.toString()}}static toDeviceOnboardingInfoDTO(t){return{id:t.id.toString(),createdAt:t.createdAt.toString(),createdByDevice:t.createdByDevice.toString(),name:t.name,description:t.description,secretBaseKey:t.secretBaseKey.toBase64(),deviceIndex:t.deviceIndex,synchronizationKey:t.synchronizationKey.toBase64(),identityPrivateKey:t.identityPrivateKey?t.identityPrivateKey.toString():void 0,identity:{address:t.identity.address.toString(),publicKey:t.identity.publicKey.toString(),realm:t.identity.realm.toString()},password:t.password,username:t.username}}static async toDeviceSharedSecret(t){return await o.DeviceSharedSecret.from({id:o.CoreId.from(t.id),createdAt:o.CoreDate.from(t.createdAt),createdByDevice:o.CoreId.from(t.createdByDevice),name:t.name,description:t.description,secretBaseKey:await i.CryptoSecretKey.fromBase64(t.secretBaseKey),deviceIndex:t.deviceIndex,synchronizationKey:await i.CryptoSecretKey.fromBase64(t.synchronizationKey),identityPrivateKey:t.identityPrivateKey?await i.CryptoSignaturePrivateKey.deserialize(t.identityPrivateKey):void 0,identity:{address:o.CoreAddress.from(t.identity.address),publicKey:await i.CryptoSignaturePublicKey.deserialize(t.identity.publicKey),realm:t.identity.realm},password:t.password,username:t.username})}}},40770:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetDeviceUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(83067);class GetDeviceRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIf((t=>t.id)).fulfills(p.IdValidator.required(u.BackboneIds.device))}}let m=class GetDeviceUseCase extends p.UseCase{constructor(t,r){super(r),this.devicesController=t}async executeInternal(t){const r=await this.devicesController.get(u.CoreId.from(t.id));return r?l.Result.ok(h.DeviceMapper.toDeviceDTO(r)):l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.Device))}};m=i([c(0,d.Inject),c(1,d.Inject),o("design:paramtypes",[u.DevicesController,GetDeviceRequestValidator])],m),r.GetDeviceUseCase=m},8283:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetDeviceOnboardingInfoUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(83067);let m=class GetDeviceOnboardingInfoUseCase extends p.UseCase{constructor(t,r){super(r),this.devicesController=t}async executeInternal(t){const r=await this.devicesController.getSharedSecret(u.CoreId.from(t.id));return l.Result.ok(h.DeviceMapper.toDeviceOnboardingInfoDTO(r))}};m=i([c(0,d.Inject),c(1,d.Inject),o("design:paramtypes",[u.DevicesController,p.RuntimeValidator])],m),r.GetDeviceOnboardingInfoUseCase=m},93341:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetDevicesUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(83067);let m=class GetDevicesUseCase extends p.UseCase{constructor(t){super(),this.devicesController=t}async executeInternal(){const t=(await this.devicesController.list()).map((t=>h.DeviceMapper.toDeviceDTO(t)));return l.Result.ok(t)}};m=i([c(0,d.Inject),o("design:paramtypes",[u.DevicesController])],m),r.GetDevicesUseCase=m},80189:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.UpdateDeviceUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(97802),h=a(7049);class UpdateDeviceRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIf((t=>t.id)).fulfills(h.IdValidator.required(u.BackboneIds.device))}}let m=class UpdateDeviceUseCase extends h.UseCase{constructor(t,r,a){super(a),this.devicesController=t,this.accountController=r}async executeInternal(t){const r=await this.devicesController.get(u.CoreId.from(t.id));return r?(t.name&&(r.name=t.name),r.description=t.description,await this.devicesController.update(r),await this.accountController.syncDatawallet(),l.Result.ok(p.DeviceMapper.toDeviceDTO(r))):l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.Device))}};m=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),o("design:paramtypes",[u.DevicesController,u.AccountController,UpdateDeviceRequestValidator])],m),r.UpdateDeviceUseCase=m},97802:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(5188),r),o(a(20795),r),o(a(2137),r),o(a(83067),r),o(a(40770),r),o(a(8283),r),o(a(93341),r),o(a(80189),r)},10542:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateTokenForFileUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(57121);let m=class Validator extends p.SchemaValidator{constructor(t){super(t.getSchema("CreateTokenForFileRequest"))}};m=i([c(0,d.Inject),o("design:paramtypes",[p.SchemaRepository])],m);let y=class CreateTokenForFileUseCase extends p.UseCase{constructor(t,r,a,i){super(i),this.fileController=t,this.tokenController=r,this.accountController=a}async executeInternal(t){var r,a,i;const o=await this.fileController.getFile(u.CoreId.from(t.fileId));if(!o)return l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.File));const c=await u.TokenContentFile.from({fileId:o.id,secretKey:o.secretKey}),d=null===(r=t.ephemeral)||void 0===r||r,m=null!==(i=null===(a=o.cache)||void 0===a?void 0:a.expiresAt)&&void 0!==i?i:u.CoreDate.utc().add({days:12}),y=t.expiresAt?u.CoreDate.from(t.expiresAt):m,g=await this.tokenController.sendToken({content:c,expiresAt:y,ephemeral:d});return d||await this.accountController.syncDatawallet(),l.Result.ok(await h.TokenMapper.toTokenDTO(g,d))}};y=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),c(3,d.Inject),o("design:paramtypes",[u.FileController,u.TokenController,u.AccountController,m])],y),r.CreateTokenForFileUseCase=y},6913:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateTokenQrCodeForFileUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049);let h=class Validator extends p.SchemaValidator{constructor(t){super(t.getSchema("CreateTokenQrCodeForFileRequest"))}};h=i([c(0,d.Inject),o("design:paramtypes",[p.SchemaRepository])],h);let m=class CreateTokenQrCodeForFileUseCase extends p.UseCase{constructor(t,r,a){super(a),this.fileController=t,this.tokenController=r}async executeInternal(t){var r,a;const i=await this.fileController.getFile(u.CoreId.from(t.fileId));if(!i)return l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.File));const o=await u.TokenContentFile.from({fileId:i.id,secretKey:i.secretKey}),c=null!==(a=null===(r=i.cache)||void 0===r?void 0:r.expiresAt)&&void 0!==a?a:u.CoreDate.utc().add({days:12}),d=t.expiresAt?u.CoreDate.from(t.expiresAt):c,h=await this.tokenController.sendToken({content:o,expiresAt:d,ephemeral:!0}),m=await p.QRCode.from(await h.truncate());return l.Result.ok({qrCodeBytes:m.asBase64()})}};m=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),o("design:paramtypes",[u.FileController,u.TokenController,h])],m),r.CreateTokenQrCodeForFileUseCase=m},68516:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DownloadFileUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(35076);let m=class Validator extends p.SchemaValidator{constructor(t){super(t.getSchema("DownloadFileRequest"))}};m=i([c(0,d.Inject),o("design:paramtypes",[p.SchemaRepository])],m);let y=class DownloadFileUseCase extends p.UseCase{constructor(t,r){super(r),this.fileController=t}async executeInternal(t){const r=u.CoreId.from(t.id),a=await this.fileController.getFile(r);if(!a)return l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.File));const i=await this.fileController.downloadFileContent(a.id);return l.Result.ok(h.FileMapper.toDownloadFileResponse(i,a))}};y=i([c(0,d.Inject),c(1,d.Inject),o("design:paramtypes",[u.FileController,m])],y),r.DownloadFileUseCase=y},35076:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.FileMapper=void 0;const i=a(19663),o=a(7049);r.FileMapper=class FileMapper{static toDownloadFileResponse(t,r){if(!r.cache)throw o.RuntimeErrors.general.cacheEmpty(i.File,r.id.toString());return{content:t.buffer,filename:r.cache.filename?r.cache.filename:r.id.toString(),mimetype:r.cache.mimetype}}static toFileDTO(t){var r,a,c,l;if(!t.cache)throw o.RuntimeErrors.general.cacheEmpty(i.File,t.id.toString());return{id:t.id.toString(),filename:t.cache.filename,filesize:t.cache.filesize,createdAt:t.cache.createdAt.toString(),createdBy:t.cache.createdBy.toString(),createdByDevice:t.cache.createdByDevice.toString(),expiresAt:t.cache.expiresAt.toString(),mimetype:t.cache.mimetype,isOwn:t.isOwn,title:null!==(r=t.cache.title)&&void 0!==r?r:"",secretKey:t.secretKey.toBase64(),description:t.cache.description,deletedAt:null===(a=t.cache.deletedAt)||void 0===a?void 0:a.toString(),deletedBy:null===(c=t.cache.deletedBy)||void 0===c?void 0:c.toString(),deletedByDevice:null===(l=t.cache.deletedByDevice)||void 0===l?void 0:l.toString()}}static toFileDTOList(t){return t.map((t=>this.toFileDTO(t)))}}},13520:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetFileUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(35076);let m=class Validator extends p.SchemaValidator{constructor(t){super(t.getSchema("GetFileRequest"))}};m=i([c(0,d.Inject),o("design:paramtypes",[p.SchemaRepository])],m);let y=class GetFileUseCase extends p.UseCase{constructor(t,r){super(r),this.fileController=t}async executeInternal(t){const r=await this.fileController.getFile(u.CoreId.from(t.id));return r?l.Result.ok(h.FileMapper.toFileDTO(r)):l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.File))}};y=i([c(0,d.Inject),c(1,d.Inject),o("design:paramtypes",[u.FileController,m])],y),r.GetFileUseCase=y},35911:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetFilesUseCase=void 0;const l=a(92937),u=a(75172),d=a(19663),p=a(94714),h=a(7071),m=a(7049),y=a(35076);let g=class GetFilesUseCase extends m.UseCase{constructor(t,r){super(r),this.fileController=t}async executeInternal(t){const r=GetFilesUseCase.queryTranslator.parse(t.query);t.ownerRestriction&&(r[(0,p.nameof)((t=>t.isOwn))]=t.ownerRestriction===m.OwnerRestriction.Own);const a=await this.fileController.getFiles(r);return u.Result.ok(y.FileMapper.toFileDTOList(a))}};g.queryTranslator=new l.QueryTranslator({whitelist:{[(0,p.nameof)((t=>t.createdAt))]:!0,[(0,p.nameof)((t=>t.createdBy))]:!0,[(0,p.nameof)((t=>t.createdByDevice))]:!0,[(0,p.nameof)((t=>t.deletedAt))]:!0,[(0,p.nameof)((t=>t.deletedBy))]:!0,[(0,p.nameof)((t=>t.deletedByDevice))]:!0,[(0,p.nameof)((t=>t.description))]:!0,[(0,p.nameof)((t=>t.expiresAt))]:!0,[(0,p.nameof)((t=>t.filename))]:!0,[(0,p.nameof)((t=>t.filesize))]:!0,[(0,p.nameof)((t=>t.mimetype))]:!0,[(0,p.nameof)((t=>t.title))]:!0,[(0,p.nameof)((t=>t.isOwn))]:!0},alias:{[(0,p.nameof)((t=>t.createdAt))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.createdAt))}`,[(0,p.nameof)((t=>t.createdBy))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.createdBy))}`,[(0,p.nameof)((t=>t.createdByDevice))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.createdByDevice))}`,[(0,p.nameof)((t=>t.deletedAt))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.deletedAt))}`,[(0,p.nameof)((t=>t.deletedBy))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.deletedBy))}`,[(0,p.nameof)((t=>t.deletedByDevice))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.deletedByDevice))}`,[(0,p.nameof)((t=>t.description))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.description))}`,[(0,p.nameof)((t=>t.expiresAt))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.expiresAt))}`,[(0,p.nameof)((t=>t.filename))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.filename))}`,[(0,p.nameof)((t=>t.filesize))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.filesize))}`,[(0,p.nameof)((t=>t.mimetype))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.mimetype))}`,[(0,p.nameof)((t=>t.title))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.title))}`,[(0,p.nameof)((t=>t.isOwn))]:(0,p.nameof)((t=>t.isOwn))}}),g=i([c(0,h.Inject),c(1,h.Inject),o("design:paramtypes",[d.FileController,m.RuntimeValidator])],g),r.GetFilesUseCase=g},67435:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.LoadPeerFileUseCase=void 0;const l=a(75172),u=a(82890),d=a(19663),p=a(63586),h=a(7071),m=a(7049),y=a(35076);function isLoadPeerFileViaSecret(t){return"id"in t&&"secretKey"in t}function isLoadPeerFileViaReference(t){return"reference"in t}let g=class Validator extends m.SchemaValidator{constructor(t){super(t.getSchema("LoadPeerFileRequest")),this.loadViaSecretSchema=t.getSchema("LoadPeerFileViaSecretRequest"),this.loadViaReferenceSchema=t.getSchema("LoadPeerFileViaReferenceRequest")}validate(t){if(this.schema.validate(t).isValid)return new p.ValidationResult;if(isLoadPeerFileViaReference(t))return this.convertValidationResult(this.loadViaReferenceSchema.validate(t));if(isLoadPeerFileViaSecret(t))return this.convertValidationResult(this.loadViaSecretSchema.validate(t));const r=new p.ValidationResult;return r.addFailures([new p.ValidationFailure(void 0,"",void 0,m.RuntimeErrors.general.invalidPayload().code,m.RuntimeErrors.general.invalidPayload().message)]),r}};g=i([c(0,h.Inject),o("design:paramtypes",[m.SchemaRepository])],g);let v=class LoadPeerFileUseCase extends m.UseCase{constructor(t,r,a,i){super(i),this.fileController=t,this.tokenController=r,this.accountController=a}async executeInternal(t){let r;if(isLoadPeerFileViaSecret(t)){const a=await u.CryptoSecretKey.fromBase64(t.secretKey);r=await this.loadFile(d.CoreId.from(t.id),a)}else{if(!isLoadPeerFileViaReference(t))throw new Error("Invalid request format.");r=await this.createFileFromTokenReferenceRequest(t.reference)}return await this.accountController.syncDatawallet(),r}async createFileFromTokenReferenceRequest(t){const r=await this.tokenController.loadPeerTokenByTruncated(t,!0);if(!r.cache)throw m.RuntimeErrors.general.cacheEmpty(d.Token,r.id.toString());if(!(r.cache.content instanceof d.TokenContentFile))return l.Result.fail(m.RuntimeErrors.general.invalidTokenContent());const a=r.cache.content;return await this.loadFile(a.fileId,a.secretKey)}async loadFile(t,r){const a=await this.fileController.loadPeerFile(t,r);return l.Result.ok(y.FileMapper.toFileDTO(a))}};v=i([c(0,h.Inject),c(1,h.Inject),c(2,h.Inject),c(3,h.Inject),o("design:paramtypes",[d.FileController,d.TokenController,d.AccountController,g])],v),r.LoadPeerFileUseCase=v},32109:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.UploadOwnFileUseCase=void 0;const l=a(75172),u=a(82890),d=a(19663),p=a(99490),h=a(7071),m=a(7049),y=a(35076);class UploadOwnFileRequestValidator extends m.RuntimeValidator{constructor(){super(),this.validateIf((t=>t.content)).isNotNull().fulfills((t=>t.length>0)).withFailureMessage("file content is empty"),this.validateIf((t=>t.content)).isNotNull().fulfills((t=>t.byteLength<=this._maxFileSize)).withFailureMessage("file content is too large"),this.validateIf((t=>t.filename)).isNotNull(),this.validateIf((t=>t.mimetype)).isNotNull(),this.validateIf((t=>t.title)).isNotNull(),this.validateIf((t=>t.expiresAt)).isNotNull(),this.validateIf((t=>t.expiresAt)).fulfills(m.DateValidator.required()),this.validateIf((t=>t.expiresAt)).fulfills((t=>p.DateTime.fromISO(t)>p.DateTime.utc())).withFailureMessage("'$propertyName' must be in the future.")}set maxFileSize(t){this._maxFileSize=t}}let g=class UploadOwnFileUseCase extends m.UseCase{constructor(t,r,a){super(a),this.fileController=t,this.accountController=r,a.maxFileSize=t.config.platformMaxUnencryptedFileSize}async executeInternal(t){var r;const a=await this.fileController.sendFile({buffer:u.CoreBuffer.from(t.content),title:t.title,description:null!==(r=t.description)&&void 0!==r?r:"",filename:t.filename,mimetype:t.mimetype,expiresAt:d.CoreDate.from(t.expiresAt)});return await this.accountController.syncDatawallet(),l.Result.ok(y.FileMapper.toFileDTO(a))}};g=i([c(0,h.Inject),c(1,h.Inject),c(2,h.Inject),o("design:paramtypes",[d.FileController,d.AccountController,UploadOwnFileRequestValidator])],g),r.UploadOwnFileUseCase=g},20098:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(10542),r),o(a(6913),r),o(a(68516),r),o(a(35076),r),o(a(13520),r),o(a(35911),r),o(a(67435),r),o(a(32109),r)},54824:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CheckIdentityUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(94316);class CheckIdentityRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.address)).fulfills(p.AddressValidator.required())}}let m=class CheckIdentityUseCase extends p.UseCase{constructor(t,r,a){super(a),this.identityController=t,this.relationshipsController=r}async executeInternal(t){const r=u.CoreAddress.from(t.address);if(this.identityController.isMe(r))return l.Result.ok({self:!0});const a=await this.relationshipsController.getRelationshipToIdentity(r);if(a){const t=h.RelationshipMapper.toRelationshipDTO(a);return a.status===u.RelationshipStatus.Pending?l.Result.ok({peer:!0,relationshipPending:!0,relationship:t}):a.status===u.RelationshipStatus.Active||a.status===u.RelationshipStatus.Terminating?l.Result.ok({peer:!0,relationshipActive:!0,relationship:t}):l.Result.ok({peer:!0,relationshipTerminated:!0,relationship:t})}return l.Result.ok({unknown:!0})}};m=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),o("design:paramtypes",[u.IdentityController,u.RelationshipsController,CheckIdentityRequestValidator])],m),r.CheckIdentityUseCase=m},74847:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(54824),r)},29667:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(69276),r),o(a(97802),r),o(a(20098),r),o(a(74847),r),o(a(92290),r),o(a(7831),r),o(a(43084),r),o(a(25631),r)},64860:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DownloadAttachmentUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(76881);class DownloadAttachmentRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIf((t=>t.id)).fulfills(p.IdValidator.required(u.BackboneIds.message)),this.validateIf((t=>t.attachmentId)).fulfills(p.IdValidator.required(u.BackboneIds.file))}}let m=class DownloadAttachmentUseCase extends p.UseCase{constructor(t,r,a){super(a),this.messageController=t,this.fileController=r}async executeInternal(t){const r=await this.messageController.getMessage(u.CoreId.from(t.id));if(!r)return l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.Message));if(!r.cache)throw p.RuntimeErrors.general.cacheEmpty(u.Message,r.id.toString());const a=r.cache.attachments.find((r=>r.equals(u.CoreId.from(t.attachmentId))));if(!a)return l.Result.fail(p.RuntimeErrors.messages.fileNotFoundInMessage(t.attachmentId));const i=await this.fileController.getFile(a);if(!i)return l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.File));const o=await this.fileController.downloadFileContent(a);return l.Result.ok(h.MessageMapper.toDownloadAttachmentResponse(o,i))}};m=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),o("design:paramtypes",[u.MessageController,u.FileController,DownloadAttachmentRequestValidator])],m),r.DownloadAttachmentUseCase=m},19558:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetAttachmentMetadataUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(35076);class GetAttachmentMetadataRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIf((t=>t.id)).fulfills(p.IdValidator.required(u.BackboneIds.message)),this.validateIf((t=>t.attachmentId)).fulfills(p.IdValidator.required(u.BackboneIds.file))}}let m=class GetAttachmentMetadataUseCase extends p.UseCase{constructor(t,r,a){super(a),this.messageController=t,this.fileController=r}async executeInternal(t){const r=await this.messageController.getMessage(u.CoreId.from(t.id));if(!r)return l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.Message));if(!r.cache)throw p.RuntimeErrors.general.cacheEmpty(u.Message,r.id.toString());const a=r.cache.attachments.find((r=>r.equals(u.CoreId.from(t.attachmentId))));if(!a)return l.Result.fail(p.RuntimeErrors.messages.fileNotFoundInMessage(t.attachmentId));const i=await this.fileController.getFile(a);return i?l.Result.ok(h.FileMapper.toFileDTO(i)):l.Result.fail(p.RuntimeErrors.general.recordNotFound(File))}};m=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),o("design:paramtypes",[u.MessageController,u.FileController,GetAttachmentMetadataRequestValidator])],m),r.GetAttachmentMetadataUseCase=m},40978:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetMessageUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(76881);class GetMessageRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIf((t=>t.id)).fulfills(p.IdValidator.required(u.BackboneIds.message))}}let m=class GetMessageUseCase extends p.UseCase{constructor(t,r,a){super(a),this.messageController=t,this.fileController=r}async executeInternal(t){const r=await this.messageController.getMessage(u.CoreId.from(t.id));if(!r)return l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.Message));if(!r.cache)return l.Result.fail(p.RuntimeErrors.general.cacheEmpty(u.Message,r.id.toString()));const a=await Promise.all(r.cache.attachments.map((t=>this.fileController.getFile(t))));if(a.some((t=>!t)))throw new Error("A file could not be fetched.");return l.Result.ok(h.MessageMapper.toMessageWithAttachmentsDTO(r,a))}};m=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),o("design:paramtypes",[u.MessageController,u.FileController,GetMessageRequestValidator])],m),r.GetMessageUseCase=m},79231:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetMessagesUseCase=void 0;const l=a(92937),u=a(75172),d=a(19663),p=a(94714),h=a(7071),m=a(7049),y=a(76881);class GetMessagesRequestValidator extends m.RuntimeValidator{constructor(){super()}}let g=class GetMessagesUseCase extends m.UseCase{constructor(t,r){super(r),this.messageController=t}async executeInternal(t){const r=GetMessagesUseCase.queryTranslator.parse(t.query),a=await this.messageController.getMessages(r);return u.Result.ok(y.MessageMapper.toMessageDTOList(a))}};g.queryTranslator=new l.QueryTranslator({whitelist:{[(0,p.nameof)((t=>t.createdBy))]:!0,[(0,p.nameof)((t=>t.createdByDevice))]:!0,[(0,p.nameof)((t=>t.createdAt))]:!0,[`${(0,p.nameof)((t=>t.recipients))}.${(0,p.nameof)((t=>t.address))}`]:!0,[`${(0,p.nameof)((t=>t.content))}.@type`]:!0,[`${(0,p.nameof)((t=>t.content))}.body`]:!0,[`${(0,p.nameof)((t=>t.content))}.subject`]:!0,[(0,p.nameof)((t=>t.attachments))]:!0,[(0,p.nameof)((t=>t.relationshipIds))]:!0,participant:!0},alias:{[(0,p.nameof)((t=>t.createdBy))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.createdBy))}`,[(0,p.nameof)((t=>t.createdByDevice))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.createdByDevice))}`,[(0,p.nameof)((t=>t.createdAt))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.createdAt))}`,[`${(0,p.nameof)((t=>t.recipients))}.${(0,p.nameof)((t=>t.address))}`]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.recipients))}.${(0,p.nameof)((t=>t.address))}`,[`${(0,p.nameof)((t=>t.content))}.@type`]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.content))}.@type`,[`${(0,p.nameof)((t=>t.content))}.body`]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.content))}.body`,[`${(0,p.nameof)((t=>t.content))}.subject`]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.content))}.subject`,[(0,p.nameof)((t=>t.attachments))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.attachments))}`},custom:{relationshipIds:(t,r)=>{t.relationshipIds={$contains:r}},participant:(t,r)=>{let a;if(Array.isArray(r)){if(0===r.length)return;a={};for(const t of r){const r=g.queryTranslator.parseString(t,!0);switch(r.field){case"$in":case"$nin":a[r.field]=a[r.field]||[],a[r.field].push(r.value);break;default:a[r.field]=r.value}}}else a=g.queryTranslator.parseStringVal(r);t.$or=[{[`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.createdBy))}`]:a},{[`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.recipients))}.${(0,p.nameof)((t=>t.address))}`]:a}]}}}),g=i([c(0,h.Inject),c(1,h.Inject),o("design:paramtypes",[d.MessageController,GetMessagesRequestValidator])],g),r.GetMessagesUseCase=g},76881:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MessageMapper=void 0;const i=a(19663),o=a(7049),c=a(35076);r.MessageMapper=class MessageMapper{static toDownloadAttachmentResponse(t,r){if(!r.cache)throw o.RuntimeErrors.general.cacheEmpty(i.File,r.id.toString());return{content:t.buffer,filename:r.cache.filename?r.cache.filename:r.id.toString(),mimetype:r.cache.mimetype}}static toMessageWithAttachmentsDTO(t,r){if(!t.cache)throw o.RuntimeErrors.general.cacheEmpty(i.Message,t.id.toString());return{id:t.id.toString(),content:t.cache.content.toJSON(),createdBy:t.cache.createdBy.toString(),createdByDevice:t.cache.createdByDevice.toString(),recipients:t.cache.recipients.map((t=>this.toRecipient(t))),createdAt:t.cache.createdAt.toString(),relationshipIds:t.relationshipIds.map((t=>t.toString())),attachments:r.map((t=>c.FileMapper.toFileDTO(t)))}}static toMessageDTO(t){if(!t.cache)throw o.RuntimeErrors.general.cacheEmpty(i.Message,t.id.toString());return{id:t.id.toString(),content:t.cache.content.toJSON(),createdBy:t.cache.createdBy.toString(),createdByDevice:t.cache.createdByDevice.toString(),recipients:t.cache.recipients.map((t=>this.toRecipient(t))),relationshipIds:t.relationshipIds.map((t=>t.toString())),createdAt:t.cache.createdAt.toString(),attachments:t.cache.attachments.map((t=>t.toString()))}}static toMessageDTOList(t){return t.map((t=>this.toMessageDTO(t)))}static toRecipient(t){var r,a;return{address:t.address.toString(),receivedAt:null===(r=t.receivedAt)||void 0===r?void 0:r.toString(),receivedByDevice:null===(a=t.receivedByDevice)||void 0===a?void 0:a.toString()}}}},38400:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SendMessageUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(42205),h=a(7049),m=a(76881);class SendMessageRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfIterable((t=>t.recipients)).isNotEmpty(),this.validateIfEachString((t=>t.recipients)).fulfills(h.AddressValidator.required()),this.validateIfAny((t=>t.content)).isNotNull(),this.validateIfEachString((t=>t.attachments)).fulfills(h.IdValidator.required(u.BackboneIds.file))}}let y=class SendMessageUseCase extends h.UseCase{constructor(t,r,a,i,o,c){super(c),this.messageController=t,this.fileController=r,this.accountController=a,this.identityController=i,this.eventBus=o}async executeInternal(t){const r=await this.transformAttachments(t.attachments);if(r.isError)return l.Result.fail(r.error);const a=await this.messageController.sendMessage({recipients:t.recipients.map((t=>u.CoreAddress.from(t))),content:t.content,attachments:r.value}),i=m.MessageMapper.toMessageDTO(a);return this.eventBus.publish(new p.MessageSentEvent(this.identityController.identity.address.toString(),i)),await this.accountController.syncDatawallet(),l.Result.ok(m.MessageMapper.toMessageDTO(a))}async transformAttachments(t){if(!t||0===t.length)return l.Result.ok([]);const r=[];for(const a of t){const t=await this.fileController.getFile(u.CoreId.from(a));if(!t)return l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.File));r.push(t)}return l.Result.ok(r)}};y=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),c(3,d.Inject),c(4,d.Inject),c(5,d.Inject),o("design:paramtypes",[u.MessageController,u.FileController,u.AccountController,u.IdentityController,l.EventBus,SendMessageRequestValidator])],y),r.SendMessageUseCase=y},92290:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(64860),r),o(a(19558),r),o(a(40978),r),o(a(79231),r),o(a(76881),r),o(a(38400),r)},88580:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateOwnRelationshipTemplateUseCase=void 0;const l=a(75172),u=a(19663),d=a(99490),p=a(7071),h=a(7049),m=a(58434);class CreateOwnRelationshipTemplateRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIf((t=>t.expiresAt)).fulfills(h.DateValidator.required()),this.validateIf((t=>t.expiresAt)).fulfills((t=>d.DateTime.fromISO(t)>d.DateTime.utc())).withFailureMessage("'$propertyName' must be in the future."),this.validateIfAny((t=>t.content)).isNotNull(),this.validateIfNumber((t=>t.maxNumberOfRelationships)).isGreaterThanOrEqual(1).whenNotNull()}}let y=class CreateOwnRelationshipTemplateUseCase extends h.UseCase{constructor(t,r,a){super(a),this.templateController=t,this.accountController=r}async executeInternal(t){const r=await this.templateController.sendRelationshipTemplate({content:t.content,expiresAt:u.CoreDate.from(t.expiresAt),maxNumberOfRelationships:t.maxNumberOfRelationships});return await this.accountController.syncDatawallet(),l.Result.ok(m.RelationshipTemplateMapper.toRelationshipTemplateDTO(r))}};y=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[u.RelationshipTemplateController,u.AccountController,CreateOwnRelationshipTemplateRequestValidator])],y),r.CreateOwnRelationshipTemplateUseCase=y},17255:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateTokenForOwnTemplateUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(57121);class CreateTokenForOwnTemplateRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.templateId)).fulfills(p.IdValidator.required(u.BackboneIds.relationshipTemplate)),this.validateIfString((t=>t.expiresAt)).fulfills(p.DateValidator.optional())}}let m=class CreateTokenForOwnTemplateUseCase extends p.UseCase{constructor(t,r,a,i){super(i),this.templateController=t,this.tokenController=r,this.accountController=a}async executeInternal(t){var r,a,i;const o=await this.templateController.getRelationshipTemplate(u.CoreId.from(t.templateId));if(!o)return l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.RelationshipTemplate));if(!o.isOwn)return l.Result.fail(p.RuntimeErrors.relationshipTemplates.cannotCreateTokenForPeerTemplate());const c=await u.TokenContentRelationshipTemplate.from({templateId:o.id,secretKey:o.secretKey}),d=null===(r=t.ephemeral)||void 0===r||r,m=null!==(i=null===(a=o.cache)||void 0===a?void 0:a.expiresAt)&&void 0!==i?i:u.CoreDate.utc().add({days:12}),y=t.expiresAt?u.CoreDate.from(t.expiresAt):m,g=await this.tokenController.sendToken({content:c,expiresAt:y,ephemeral:d});return d||await this.accountController.syncDatawallet(),l.Result.ok(await h.TokenMapper.toTokenDTO(g,d))}};m=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),c(3,d.Inject),o("design:paramtypes",[u.RelationshipTemplateController,u.TokenController,u.AccountController,CreateTokenForOwnTemplateRequestValidator])],m),r.CreateTokenForOwnTemplateUseCase=m},13683:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateTokenQrCodeForOwnTemplateUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049);class CreateTokenQrCodeForOwnTemplateRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.templateId)).fulfills(p.IdValidator.required(u.BackboneIds.relationshipTemplate)),this.validateIfString((t=>t.expiresAt)).fulfills(p.DateValidator.optional())}}let h=class CreateTokenQrCodeForOwnTemplateUseCase extends p.UseCase{constructor(t,r,a){super(a),this.templateController=t,this.tokenController=r}async executeInternal(t){var r,a;const i=await this.templateController.getRelationshipTemplate(u.CoreId.from(t.templateId));if(!i)return l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.RelationshipTemplate));if(!i.isOwn)return l.Result.fail(p.RuntimeErrors.relationshipTemplates.cannotCreateTokenForPeerTemplate());const o=await u.TokenContentRelationshipTemplate.from({templateId:i.id,secretKey:i.secretKey}),c=null!==(a=null===(r=i.cache)||void 0===r?void 0:r.expiresAt)&&void 0!==a?a:u.CoreDate.utc().add({days:12}),d=t.expiresAt?u.CoreDate.from(t.expiresAt):c,h=await this.tokenController.sendToken({content:o,expiresAt:d,ephemeral:!0}),m=await p.QRCode.from(await h.truncate());return l.Result.ok({qrCodeBytes:m.asBase64()})}};h=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),o("design:paramtypes",[u.RelationshipTemplateController,u.TokenController,CreateTokenQrCodeForOwnTemplateRequestValidator])],h),r.CreateTokenQrCodeForOwnTemplateUseCase=h},72603:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetRelationshipTemplateUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(58434);class GetRelationshipTemplateRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(p.IdValidator.required(u.BackboneIds.relationshipTemplate))}}let m=class GetRelationshipTemplateUseCase extends p.UseCase{constructor(t,r){super(r),this.relationshipTemplateController=t}async executeInternal(t){const r=await this.relationshipTemplateController.getRelationshipTemplate(u.CoreId.from(t.id));return r?l.Result.ok(h.RelationshipTemplateMapper.toRelationshipTemplateDTO(r)):l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.RelationshipTemplate))}};m=i([c(0,d.Inject),c(1,d.Inject),o("design:paramtypes",[u.RelationshipTemplateController,GetRelationshipTemplateRequestValidator])],m),r.GetRelationshipTemplateUseCase=m},1371:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetRelationshipTemplatesUseCase=void 0;const l=a(92937),u=a(75172),d=a(19663),p=a(94714),h=a(7071),m=a(7049),y=a(58434);let g=class GetRelationshipTemplatesUseCase extends m.UseCase{constructor(t,r){super(r),this.relationshipTemplateController=t}async executeInternal(t){const r=GetRelationshipTemplatesUseCase.queryTranslator.parse(t.query);t.ownerRestriction&&(r[(0,p.nameof)((t=>t.isOwn))]=t.ownerRestriction===m.OwnerRestriction.Own);const a=await this.relationshipTemplateController.getRelationshipTemplates(r);return u.Result.ok(y.RelationshipTemplateMapper.toRelationshipTemplateDTOList(a))}};g.queryTranslator=new l.QueryTranslator({whitelist:{[(0,p.nameof)((t=>t.isOwn))]:!0,[(0,p.nameof)((t=>t.createdAt))]:!0,[(0,p.nameof)((t=>t.expiresAt))]:!0,[(0,p.nameof)((t=>t.createdBy))]:!0,[(0,p.nameof)((t=>t.createdByDevice))]:!0,[(0,p.nameof)((t=>t.maxNumberOfRelationships))]:!0},alias:{[(0,p.nameof)((t=>t.isOwn))]:(0,p.nameof)((t=>t.isOwn)),[(0,p.nameof)((t=>t.createdAt))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.createdAt))}`,[(0,p.nameof)((t=>t.expiresAt))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.expiresAt))}`,[(0,p.nameof)((t=>t.createdBy))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.createdBy))}`,[(0,p.nameof)((t=>t.createdByDevice))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.createdByDevice))}`,[(0,p.nameof)((t=>t.maxNumberOfRelationships))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.maxNumberOfRelationships))}`}}),g=i([c(0,h.Inject),c(1,h.Inject),o("design:paramtypes",[d.RelationshipTemplateController,m.RuntimeValidator])],g),r.GetRelationshipTemplatesUseCase=g},73186:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.LoadPeerRelationshipTemplateUseCase=void 0;const l=a(75172),u=a(82890),d=a(19663),p=a(7071),h=a(7049),m=a(58434);class LoadPeerRelationshipTemplateRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIf((t=>t)).fulfills((t=>this.isCreateRelationshipTemplateFromIdAndKeyRequest(t)||this.isCreateRelationshipTemplateFromTokenReferenceRequest(t))).withFailureCode(h.RuntimeErrors.general.invalidPayload().code).withFailureMessage(h.RuntimeErrors.general.invalidPayload().message),this.setupRulesForCreateRelationshipTemplateFromIdAndKeyRequest(),this.setupRulesForCreateRelationshipTemplateFromTokenReferenceRequest()}setupRulesForCreateRelationshipTemplateFromIdAndKeyRequest(){this.validateIfString((t=>t.id)).fulfills(h.IdValidator.required(d.BackboneIds.relationshipTemplate)).when(this.isCreateRelationshipTemplateFromIdAndKeyRequest),this.validateIfString((t=>t.secretKey)).isNotNull().when(this.isCreateRelationshipTemplateFromIdAndKeyRequest)}setupRulesForCreateRelationshipTemplateFromTokenReferenceRequest(){this.validateIfString((t=>t.reference)).isNotNull().when(this.isCreateRelationshipTemplateFromTokenReferenceRequest)}isCreateRelationshipTemplateFromIdAndKeyRequest(t){return!!t.id&&!!t.secretKey}isCreateRelationshipTemplateFromTokenReferenceRequest(t){return!!t.reference}}let y=class LoadPeerRelationshipTemplateUseCase extends h.UseCase{constructor(t,r,a,i){super(i),this.templateController=t,this.tokenController=r,this.accountController=a}async executeInternal(t){let r;if(t.id&&t.secretKey){const a=await u.CryptoSecretKey.fromBase64(t.secretKey);r=await this.loadTemplate(d.CoreId.from(t.id),a)}else{if(!t.reference)throw new Error("Invalid request format.");r=await this.createRelationshipTemplateFromTokenReferenceRequest(t.reference)}return await this.accountController.syncDatawallet(),r}async createRelationshipTemplateFromTokenReferenceRequest(t){const r=await this.tokenController.loadPeerTokenByTruncated(t,!0);if(!r.cache)throw h.RuntimeErrors.general.cacheEmpty(d.Token,r.id.toString());if(!(r.cache.content instanceof d.TokenContentRelationshipTemplate))return l.Result.fail(h.RuntimeErrors.general.invalidTokenContent());const a=r.cache.content;return await this.loadTemplate(a.templateId,a.secretKey)}async loadTemplate(t,r){const a=await this.templateController.loadPeerRelationshipTemplate(t,r);return l.Result.ok(m.RelationshipTemplateMapper.toRelationshipTemplateDTO(a))}};y=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),c(3,p.Inject),o("design:paramtypes",[d.RelationshipTemplateController,d.TokenController,d.AccountController,LoadPeerRelationshipTemplateRequestValidator])],y),r.LoadPeerRelationshipTemplateUseCase=y},58434:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipTemplateMapper=void 0;const i=a(19663),o=a(7049);r.RelationshipTemplateMapper=class RelationshipTemplateMapper{static toRelationshipTemplateDTO(t){var r;if(!t.cache)throw o.RuntimeErrors.general.cacheEmpty(i.RelationshipTemplate,t.id.toString());return{id:t.id.toString(),isOwn:t.isOwn,createdBy:t.cache.createdBy.toString(),createdByDevice:t.cache.createdByDevice.toString(),createdAt:t.cache.createdAt.toString(),content:t.cache.content.toJSON(),expiresAt:null===(r=t.cache.expiresAt)||void 0===r?void 0:r.toString(),maxNumberOfRelationships:t.cache.maxNumberOfRelationships}}static toRelationshipTemplateDTOList(t){return t.map((t=>this.toRelationshipTemplateDTO(t)))}}},43084:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(88580),r),o(a(17255),r),o(a(13683),r),o(a(72603),r),o(a(1371),r),o(a(73186),r),o(a(58434),r)},63018:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AcceptRelationshipChangeUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(42205),h=a(7049),m=a(94316);class AcceptRelationshipChangeRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.relationshipId)).fulfills(h.IdValidator.required(u.BackboneIds.relationship)),this.validateIfString((t=>t.changeId)).fulfills(h.IdValidator.required(u.BackboneIds.relationshipChange))}}let y=class AcceptRelationshipChangeUseCase extends h.UseCase{constructor(t,r,a,i,o){super(o),this.relationshipsController=t,this.accountController=r,this.identityController=a,this.eventBus=i}async executeInternal(t){const r=await this.relationshipsController.getRelationship(u.CoreId.from(t.relationshipId));if(!r)return l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.Relationship));if(!r.cache)return l.Result.fail(h.RuntimeErrors.general.cacheEmpty(u.Relationship,r.id.toString()));const a=r.cache.changes.find((r=>r.id.toString()===t.changeId));if(!a)return l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.RelationshipChange));const i=await this.relationshipsController.acceptChange(a,t.content),o=m.RelationshipMapper.toRelationshipDTO(i);return this.eventBus.publish(new p.RelationshipChangedEvent(this.identityController.identity.address.toString(),o)),await this.accountController.syncDatawallet(),l.Result.ok(o)}};y=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),c(3,d.Inject),c(4,d.Inject),o("design:paramtypes",[u.RelationshipsController,u.AccountController,u.IdentityController,l.EventBus,AcceptRelationshipChangeRequestValidator])],y),r.AcceptRelationshipChangeUseCase=y},83986:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateRelationshipUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(42205),h=a(7049),m=a(94316);class CreateRelationshipRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.templateId)).fulfills(h.IdValidator.required(u.BackboneIds.relationshipTemplate)),this.validateIf((t=>t.content)).isDefined()}}let y=class CreateRelationshipUseCase extends h.UseCase{constructor(t,r,a,i,o,c){super(c),this.relationshipsController=t,this.relationshipTemplateController=r,this.accountController=a,this.identityController=i,this.eventBus=o}async executeInternal(t){const r=await this.relationshipTemplateController.getRelationshipTemplate(u.CoreId.from(t.templateId));if(!r)return l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.RelationshipTemplate));const a=await this.relationshipsController.sendRelationship({template:r,content:t.content}),i=m.RelationshipMapper.toRelationshipDTO(a);return this.eventBus.publish(new p.RelationshipChangedEvent(this.identityController.identity.address.toString(),i)),await this.accountController.syncDatawallet(),l.Result.ok(i)}};y=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),c(3,d.Inject),c(4,d.Inject),c(5,d.Inject),o("design:paramtypes",[u.RelationshipsController,u.RelationshipTemplateController,u.AccountController,u.IdentityController,l.EventBus,CreateRelationshipRequestValidator])],y),r.CreateRelationshipUseCase=y},57619:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateRelationshipChangeUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049);class CreateRelationshipChangeRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(p.IdValidator.required(u.BackboneIds.relationship)),this.validateIf((t=>t.content)).isDefined()}}let h=class CreateRelationshipChangeUseCase extends p.UseCase{constructor(t,r,a){super(a),this.relationshipsController=t,this.accountController=r}async executeInternal(t){return l.Result.fail(p.RuntimeErrors.general.notImplemented())}};h=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),o("design:paramtypes",[u.RelationshipsController,u.AccountController,CreateRelationshipChangeRequestValidator])],h),r.CreateRelationshipChangeUseCase=h},59456:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetRelationshipUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(94316);class GetRelationshipRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(p.IdValidator.required(u.BackboneIds.relationship))}}let m=class GetRelationshipUseCase extends p.UseCase{constructor(t,r){super(r),this.relationshipsController=t}async executeInternal(t){const r=await this.relationshipsController.getRelationship(u.CoreId.from(t.id));return r?l.Result.ok(h.RelationshipMapper.toRelationshipDTO(r)):l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.Relationship))}};m=i([c(0,d.Inject),c(1,d.Inject),o("design:paramtypes",[u.RelationshipsController,GetRelationshipRequestValidator])],m),r.GetRelationshipUseCase=m},90215:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetRelationshipByAddressUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(94316);class GetRelationshipByAddressRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.address)).fulfills(p.AddressValidator.required())}}let m=class GetRelationshipByAddressUseCase extends p.UseCase{constructor(t,r){super(r),this.relationshipsController=t}async executeInternal(t){const r=await this.relationshipsController.getRelationshipToIdentity(u.CoreAddress.from(t.address));return r?l.Result.ok(h.RelationshipMapper.toRelationshipDTO(r)):l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.Relationship))}};m=i([c(0,d.Inject),c(1,d.Inject),o("design:paramtypes",[u.RelationshipsController,GetRelationshipByAddressRequestValidator])],m),r.GetRelationshipByAddressUseCase=m},73457:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetRelationshipsUseCase=void 0;const l=a(92937),u=a(75172),d=a(19663),p=a(94714),h=a(7071),m=a(7049),y=a(94316);let g=class GetRelationshipsUseCase extends m.UseCase{constructor(t,r){super(r),this.relationshipsController=t}async executeInternal(t){const r=GetRelationshipsUseCase.queryTranslator.parse(t.query),a=await this.relationshipsController.getRelationships(r);return u.Result.ok(y.RelationshipMapper.toRelationshipDTOList(a))}};g.queryTranslator=new l.QueryTranslator({whitelist:{[(0,p.nameof)((t=>t.lastMessageReceivedAt))]:!0,[(0,p.nameof)((t=>t.lastMessageSentAt))]:!0,[(0,p.nameof)((t=>t.peer))]:!0,[(0,p.nameof)((t=>t.status))]:!0,[`${(0,p.nameof)((t=>t.template))}.${(0,p.nameof)((t=>t.id))}`]:!0},alias:{[(0,p.nameof)((t=>t.lastMessageReceivedAt))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.lastMessageReceivedAt))}`,[(0,p.nameof)((t=>t.lastMessageSentAt))]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.lastMessageSentAt))}`,[`${(0,p.nameof)((t=>t.template))}.${(0,p.nameof)((t=>t.id))}`]:`${(0,p.nameof)((t=>t.cache))}.${(0,p.nameof)((t=>t.template))}.${(0,p.nameof)((t=>t.id))}`,[(0,p.nameof)((t=>t.peer))]:(0,p.nameof)((t=>t.peer)),[(0,p.nameof)((t=>t.status))]:(0,p.nameof)((t=>t.status)),[(0,p.nameof)((t=>t.peer))]:`${(0,p.nameof)((t=>t.peer))}.${(0,p.nameof)((t=>t.address))}`}}),g=i([c(0,h.Inject),c(1,h.Inject),o("design:paramtypes",[d.RelationshipsController,m.RuntimeValidator])],g),r.GetRelationshipsUseCase=g},42214:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RejectRelationshipChangeUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(42205),h=a(7049),m=a(94316);class RejectRelationshipChangeRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.relationshipId)).fulfills(h.IdValidator.required(u.BackboneIds.relationship)),this.validateIfString((t=>t.changeId)).fulfills(h.IdValidator.required(u.BackboneIds.relationshipChange))}}let y=class RejectRelationshipChangeUseCase extends h.UseCase{constructor(t,r,a,i,o){super(o),this.relationshipsController=t,this.accountController=r,this.identityController=a,this.eventBus=i}async executeInternal(t){const r=await this.relationshipsController.getRelationship(u.CoreId.from(t.relationshipId));if(!r)return l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.Relationship));if(!r.cache)return l.Result.fail(h.RuntimeErrors.general.cacheEmpty(u.Relationship,r.id.toString()));const a=r.cache.changes.find((r=>r.id.toString()===t.changeId));if(!a)return l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.RelationshipChange));const i=await this.relationshipsController.rejectChange(a,t.content),o=m.RelationshipMapper.toRelationshipDTO(i);return this.eventBus.publish(new p.RelationshipChangedEvent(this.identityController.identity.address.toString(),o)),await this.accountController.syncDatawallet(),l.Result.ok(o)}};y=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),c(3,d.Inject),c(4,d.Inject),o("design:paramtypes",[u.RelationshipsController,u.AccountController,u.IdentityController,l.EventBus,RejectRelationshipChangeRequestValidator])],y),r.RejectRelationshipChangeUseCase=y},94316:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RelationshipMapper=void 0;const i=a(19663),o=a(7049),c=a(58434);r.RelationshipMapper=class RelationshipMapper{static toRelationshipDTO(t){var r,a;if(!t.cache)throw o.RuntimeErrors.general.cacheEmpty(i.Relationship,t.id.toString());return{id:t.id.toString(),template:c.RelationshipTemplateMapper.toRelationshipTemplateDTO(t.cache.template),status:t.status,peer:t.peer.address.toString(),peerIdentity:{address:t.peer.address.toString(),publicKey:t.peer.publicKey.toString(),realm:t.peer.realm},changes:t.cache.changes.map((t=>this.toRelationshipChangeDTO(t))),lastMessageSentAt:null===(r=t.cache.lastMessageSentAt)||void 0===r?void 0:r.toString(),lastMessageReceivedAt:null===(a=t.cache.lastMessageReceivedAt)||void 0===a?void 0:a.toString()}}static toRelationshipDTOList(t){return t.map((t=>this.toRelationshipDTO(t)))}static toRelationshipChangeRequestDTO(t){var r;return{createdBy:t.createdBy.toString(),createdByDevice:t.createdByDevice.toString(),createdAt:t.createdAt.toString(),content:null===(r=t.content)||void 0===r?void 0:r.toJSON()}}static toRelationshipChangeResponseDTO(t){var r;return{createdBy:t.createdBy.toString(),createdByDevice:t.createdByDevice.toString(),createdAt:t.createdAt.toString(),content:null===(r=t.content)||void 0===r?void 0:r.toJSON()}}static toRelationshipChangeDTO(t){return{id:t.id.toString(),request:this.toRelationshipChangeRequestDTO(t.request),status:t.status,type:t.type,response:t.response?this.toRelationshipChangeResponseDTO(t.response):void 0}}}},5261:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RevokeRelationshipChangeUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(42205),h=a(7049),m=a(94316);class RevokeRelationshipChangeRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.relationshipId)).fulfills(h.IdValidator.required(u.BackboneIds.relationship)),this.validateIfString((t=>t.changeId)).fulfills(h.IdValidator.required(u.BackboneIds.relationshipChange))}}let y=class RevokeRelationshipChangeUseCase extends h.UseCase{constructor(t,r,a,i,o){super(o),this.relationshipsController=t,this.accountController=r,this.eventBus=a,this.identityController=i}async executeInternal(t){const r=await this.relationshipsController.getRelationship(u.CoreId.from(t.relationshipId));if(!r)return l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.Relationship));if(!r.cache)return l.Result.fail(h.RuntimeErrors.general.cacheEmpty(u.Relationship,r.id.toString()));const a=r.cache.changes.find((r=>r.id.toString()===t.changeId));if(!a)return l.Result.fail(h.RuntimeErrors.general.recordNotFound(u.RelationshipChange));const i=await this.relationshipsController.revokeChange(a,t.content),o=m.RelationshipMapper.toRelationshipDTO(i);return this.eventBus.publish(new p.RelationshipChangedEvent(this.identityController.identity.address.toString(),o)),await this.accountController.syncDatawallet(),l.Result.ok(o)}};y=i([c(0,d.Inject),c(1,d.Inject),c(2,d.Inject),c(3,d.Inject),c(4,d.Inject),o("design:paramtypes",[u.RelationshipsController,u.AccountController,l.EventBus,u.IdentityController,RevokeRelationshipChangeRequestValidator])],y),r.RevokeRelationshipChangeUseCase=y},7831:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(63018),r),o(a(83986),r),o(a(57619),r),o(a(59456),r),o(a(90215),r),o(a(73457),r),o(a(42214),r),o(a(94316),r),o(a(5261),r)},10429:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CreateOwnTokenUseCase=void 0;const l=a(90194),u=a(75172),d=a(19663),p=a(99490),h=a(7071),m=a(7049),y=a(57121);class CreateOwnTokenRequestValidator extends m.RuntimeValidator{constructor(){super(),this.validateIfAny((t=>t.content)).isNotNull(),this.validateIf((t=>t.expiresAt)).isNotNull(),this.validateIf((t=>t.expiresAt)).fulfills(m.DateValidator.required()),this.validateIf((t=>t.expiresAt)).fulfills((t=>p.DateTime.fromISO(t)>p.DateTime.utc())).withFailureMessage("'$propertyName' must be in the future."),this.validateIfAny((t=>t.ephemeral)).isNotNull()}}let g=class CreateOwnTokenUseCase extends m.UseCase{constructor(t,r,a){super(a),this.tokenController=t,this.accountController=r}async executeInternal(t){let r;try{r=await l.SerializableAsync.from(t.content)}catch{throw m.RuntimeErrors.general.invalidTokenContent()}const a=await this.tokenController.sendToken({content:r,expiresAt:d.CoreDate.from(t.expiresAt),ephemeral:t.ephemeral});return t.ephemeral||await this.accountController.syncDatawallet(),u.Result.ok(await y.TokenMapper.toTokenDTO(a,t.ephemeral))}};g=i([c(0,h.Inject),c(1,h.Inject),c(2,h.Inject),o("design:paramtypes",[d.TokenController,d.AccountController,CreateOwnTokenRequestValidator])],g),r.CreateOwnTokenUseCase=g},37896:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetQRCodeForTokenUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049);class GetQRCodeForTokenRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(p.IdValidator.required(u.BackboneIds.token))}}let h=class GetQRCodeForTokenUseCase extends p.UseCase{constructor(t,r){super(r),this.tokenController=t}async executeInternal(t){const r=await this.tokenController.getToken(u.CoreId.from(t.id));if(!r)return l.Result.fail(p.RuntimeErrors.general.recordNotFound(u.Token));const a=await p.QRCode.from(await r.truncate());return l.Result.ok({qrCodeBytes:a.asBase64()})}};h=i([c(0,d.Inject),c(1,d.Inject),o("design:paramtypes",[u.TokenController,GetQRCodeForTokenRequestValidator])],h),r.GetQRCodeForTokenUseCase=h},50858:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetTokenUseCase=void 0;const l=a(75172),u=a(19663),d=a(7071),p=a(7049),h=a(57121);class GetTokenRequestValidator extends p.RuntimeValidator{constructor(){super(),this.validateIfString((t=>t.id)).fulfills(p.IdValidator.required(u.BackboneIds.token))}}let m=class GetTokenUseCase extends p.UseCase{constructor(t,r){super(r),this.tokenController=t}async executeInternal(t){const r=await this.tokenController.getToken(u.CoreId.from(t.id));return r?l.Result.ok(await h.TokenMapper.toTokenDTO(r,!1)):l.Result.fail(p.RuntimeErrors.general.recordNotFound("Token"))}};m=i([c(0,d.Inject),c(1,d.Inject),o("design:paramtypes",[u.TokenController,GetTokenRequestValidator])],m),r.GetTokenUseCase=m},82093:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.GetTokensUseCase=void 0;const l=a(92937),u=a(75172),d=a(19663),p=a(94714),h=a(7071),m=a(7049),y=a(57121);let g=class GetTokensUseCase extends m.UseCase{constructor(t,r){super(r),this.tokenController=t}async executeInternal(t){const r=GetTokensUseCase.queryTranslator.parse(t.query);t.ownerRestriction&&(r[(0,p.nameof)((t=>t.isOwn))]=t.ownerRestriction===m.OwnerRestriction.Own);const a=await this.tokenController.getTokens(r);return u.Result.ok(await y.TokenMapper.toTokenDTOList(a,!1))}};g.queryTranslator=new l.QueryTranslator({whitelist:{[(0,p.nameof)((t=>t.createdAt))]:!0,[(0,p.nameof)((t=>t.createdBy))]:!0,[(0,p.nameof)((t=>t.createdByDevice))]:!0,[(0,p.nameof)((t=>t.expiresAt))]:!0},alias:{[(0,p.nameof)((t=>t.createdAt))]:`${(0,p.nameof)((t=>t.cache))}.${[(0,p.nameof)((t=>t.createdAt))]}`,[(0,p.nameof)((t=>t.createdBy))]:`${(0,p.nameof)((t=>t.cache))}.${[(0,p.nameof)((t=>t.createdBy))]}`,[(0,p.nameof)((t=>t.createdByDevice))]:`${(0,p.nameof)((t=>t.cache))}.${[(0,p.nameof)((t=>t.createdByDevice))]}`,[(0,p.nameof)((t=>t.expiresAt))]:`${(0,p.nameof)((t=>t.cache))}.${[(0,p.nameof)((t=>t.expiresAt))]}`}}),g=i([c(0,h.Inject),c(1,h.Inject),o("design:paramtypes",[d.TokenController,m.RuntimeValidator])],g),r.GetTokensUseCase=g},28442:function(t,r,a){"use strict";var i=this&&this.__decorate||function(t,r,a,i){var o,c=arguments.length,l=c<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,r,a,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(l=(c<3?o(l):c>3?o(r,a,l):o(r,a))||l);return c>3&&l&&Object.defineProperty(r,a,l),l},o=this&&this.__metadata||function(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},c=this&&this.__param||function(t,r){return function(a,i){r(a,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.LoadPeerTokenUseCase=void 0;const l=a(75172),u=a(82890),d=a(19663),p=a(7071),h=a(7049),m=a(57121);class LoadPeerTokenRequestValidator extends h.RuntimeValidator{constructor(){super(),this.validateIf((t=>t)).fulfills((t=>isCreateTokenFromIdAndKeyRequest(t)||isCreateTokenFromReferenceRequest(t))).withFailureCode(h.RuntimeErrors.general.invalidPayload().code).withFailureMessage(h.RuntimeErrors.general.invalidPayload().message),this.setupRulesForCreateTokenFromReferenceRequest(),this.setupRulesForCreateTokenFromIdAndKeyRequest(),this.validateIfAny((t=>t.ephemeral)).isNotNull()}setupRulesForCreateTokenFromReferenceRequest(){this.validateIfString((t=>t.reference)).isNotNull().when(isCreateTokenFromReferenceRequest)}setupRulesForCreateTokenFromIdAndKeyRequest(){this.validateIfString((t=>t.id)).fulfills(h.IdValidator.required(d.BackboneIds.token)).when(isCreateTokenFromIdAndKeyRequest),this.validateIfString((t=>t.secretKey)).isNotNull().when(isCreateTokenFromIdAndKeyRequest)}}function isCreateTokenFromReferenceRequest(t){return!!t.reference}function isCreateTokenFromIdAndKeyRequest(t){return!!t.id&&!!t.secretKey}let y=class LoadPeerTokenUseCase extends h.UseCase{constructor(t,r,a){super(a),this.tokenController=t,this.accountController=r}async executeInternal(t){let r;if(t.id&&t.secretKey){const a=await u.CryptoSecretKey.fromBase64(t.secretKey);r=await this.tokenController.loadPeerToken(d.CoreId.from(t.id),a,t.ephemeral)}else{if(!t.reference)return l.Result.fail(h.RuntimeErrors.general.invalidPayload());r=await this.tokenController.loadPeerTokenByTruncated(t.reference,t.ephemeral)}return t.ephemeral||await this.accountController.syncDatawallet(),l.Result.ok(await m.TokenMapper.toTokenDTO(r,t.ephemeral))}};y=i([c(0,p.Inject),c(1,p.Inject),c(2,p.Inject),o("design:paramtypes",[d.TokenController,d.AccountController,LoadPeerTokenRequestValidator])],y),r.LoadPeerTokenUseCase=y},57121:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TokenMapper=void 0;const i=a(19663),o=a(7049);class TokenMapper{static async toTokenDTO(t,r){if(!t.cache)throw o.RuntimeErrors.general.cacheEmpty(i.Token,t.id.toString());const a=await t.toTokenReference();return{id:t.id.toString(),createdBy:t.cache.createdBy.toString(),createdByDevice:t.cache.createdByDevice.toString(),content:t.cache.content.toJSON(),createdAt:t.cache.createdAt.toString(),expiresAt:t.cache.expiresAt.toString(),secretKey:t.secretKey.toBase64(),truncatedReference:a.truncate(),isEphemeral:r}}static async toTokenDTOList(t,r){return await Promise.all(t.map((t=>TokenMapper.toTokenDTO(t,r))))}}r.TokenMapper=TokenMapper},25631:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(10429),r),o(a(37896),r),o(a(50858),r),o(a(82093),r),o(a(28442),r),o(a(57121),r)},79126:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.QueryTranslator=void 0;class QueryTranslator{static defaultKeyRegex=/^[A-z_@][A-z@0-9-_]*(\.[A-z_@][A-z@0-9-_]*)*$/;static defaultValRegex=void 0;static defaultArrRegex=/^[a-zæøå0-9-_.]+(\[])?$/i;ops;alias;blacklist;whitelist;custom;string;keyRegex;valRegex;arrRegex;constructor(t={}){this.ops=t.ops??["!","^","$","~",">","<","$in"],this.alias=t.alias??{},this.blacklist=t.blacklist??{},this.whitelist=t.whitelist??{},this.custom=t.custom??{},t.string=t.string??{},this.string=t.string,this.string.toBoolean="boolean"!=typeof t.string.toBoolean||t.string.toBoolean,this.string.toNumber="boolean"!=typeof t.string.toNumber||t.string.toNumber,this.keyRegex=t.keyRegex??QueryTranslator.defaultKeyRegex,this.valRegex=t.valRegex??QueryTranslator.defaultValRegex,this.arrRegex=t.arrRegex??QueryTranslator.defaultArrRegex}static setDefaultKeyRegex(t){QueryTranslator.defaultKeyRegex=t}static setDefaultValRegex(t){QueryTranslator.defaultValRegex=t}static setDefaultArrRegex(t){QueryTranslator.defaultArrRegex=t}parseString(t,r){let a=t[0]||"";const i="="===t[1];let o=t.substr(i?2:1)||"";const c=this.parseStringVal(o),l={op:a,org:o,value:c};switch(a){case"!":r?l.field="$nin":""===o?(l.field="$exists",l.value=!1):l.field="$ne";break;case">":l.field=i?"$gte":"$gt";break;case"<":l.field=i?"$lte":"$lt";break;case"^":case"$":case"~":switch(l.field="$regex",l.options="i",l.value=this.valRegex?o.replace(this.valRegex,""):l.value.toString(),a){case"^":l.value=`^${c}`;break;case"$":l.value=`${c}$`}break;default:l.org=o=a+o,l.op=a="",l.value=this.parseStringVal(o),r?l.field="$in":""===o?(l.field="$exists",l.value=!0):l.field="$eq"}return l.parsed={},l.parsed[l.field]=l.value,l.options&&(l.parsed.$options=l.options),l}parseStringVal(t){return!(!this.string.toBoolean||"true"!==t.toLowerCase())||(!this.string.toBoolean||"false"!==t.toLowerCase())&&(this.string.toNumber&&!isNaN(parseInt(t,10))&&+t-+t+1>=0?parseFloat(t):t)}parse(t){if(!t)return{};const r={};for(let a of Object.keys(t)){const i=t[a];if(Array.isArray(i)&&(a=a.replace(/\[]$/,"")),(!Object.keys(this.whitelist).length||this.whitelist[a])&&!this.blacklist[a]&&(this.alias[a]&&(a=this.alias[a]),("string"!=typeof i||this.keyRegex.test(a))&&(!Array.isArray(i)||this.arrRegex.test(a))))if("function"!=typeof this.custom[a])if(Array.isArray(i)){if(this.ops.includes("$in")&&i.length>0){r[a]={};for(const t of i)if(this.ops.includes(t[0])){const i=this.parseString(t,!0);switch(i.field){case"$in":case"$nin":r[a][i.field]=r[a][i.field]||[],r[a][i.field].push(i.value);break;case"$regex":r[a].$regex=i.value,r[a].$options=i.options;break;default:r[a][i.field]=i.value}}else r[a].$in=r[a].$in||[],r[a].$in.push(this.parseStringVal(t))}}else"string"==typeof i&&(i?this.ops.includes(i[0])?r[a]=this.parseString(i).parsed:r[a]=this.parseStringVal(i):r[a]={$exists:!0});else this.custom[a].apply(null,[r,i])}return r}}r.QueryTranslator=QueryTranslator},92937:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.QueryTranslator=void 0;var i=a(79126);Object.defineProperty(r,"QueryTranslator",{enumerable:!0,get:function(){return i.QueryTranslator}})},71174:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},29159:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getEventNamespaceFromObject=r.EventBus=void 0;r.EventBus=class EventBus{},r.getEventNamespaceFromObject=function getEventNamespaceFromObject(t){return t.namespace}},95970:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SubscriptionTargetInfo=void 0;class SubscriptionTargetInfo{namespace;constructor(t){this.namespace=t}static from(t){return t instanceof Function?new ConstructorSubscriptionTargetInfo(t):new NamespaceSubscriptionTargetInfo(t)}}r.SubscriptionTargetInfo=SubscriptionTargetInfo;class ConstructorSubscriptionTargetInfo extends SubscriptionTargetInfo{constructorFunction;constructor(t){super(function getEventNamespaceFromClass(t){return t.namespace}(t)),this.constructorFunction=t}isCompatibleWith(t){return t instanceof this.constructorFunction}}class NamespaceSubscriptionTargetInfo extends SubscriptionTargetInfo{constructor(t){super(t)}isCompatibleWith(t){return!0}}},69729:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.EventEmitter2EventBus=void 0;const i=a(56387);a(28660);const o=a(29159),c=a(95970);r.EventEmitter2EventBus=class EventEmitter2EventBus{emitter;wrappers=new Map;nextId=0;constructor(){this.emitter=new i.EventEmitter2({wildcard:!0,maxListeners:50,verboseMemoryLeak:!0})}subscribe(t,r){return this.registerHandler(t,r)}subscribeOnce(t,r){return this.registerHandler(t,r,!0)}unsubscribe(t,r){return this.unregisterHandler(t,r)}registerHandler(t,r,a=!1){const i=c.SubscriptionTargetInfo.from(t),o=this.nextId++,handlerWrapper=c=>{i.isCompatibleWith(c)&&(r(c),a&&this.unsubscribe(t,o))};return this.wrappers.set(o,handlerWrapper),this.emitter.on(i.namespace,handlerWrapper),o}unregisterHandler(t,r){const a=c.SubscriptionTargetInfo.from(t),i=this.wrappers.get(r);return!!i&&(this.emitter.off(a.namespace,i),this.wrappers.delete(r),!0)}publish(t){const r=(0,o.getEventNamespaceFromObject)(t);if(!r)throw Error("The event needs a namespace. Use the EventNamespace-decorator in order to define a namespace for a event.");this.emitter.emit(r,t)}}},9256:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(29159),r),o(a(69729),r)},35917:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DataEvent=void 0;const i=a(28267);class DataEvent extends i.Event{data;constructor(t,r){super(t),this.data=r}}r.DataEvent=DataEvent},28267:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Event=void 0;r.Event=class Event{namespace;constructor(t){this.namespace=t}}},42636:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(35917),r),o(a(28267),r)},75172:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(9256),r),o(a(42636),r),o(a(9855),r),o(a(81809),r),o(a(44569),r),o(a(71174),r),o(a(17226),r),o(a(77374),r)},9855:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.log=void 0,r.log=function log(t,r,a){const i=a.value;return a.value=function(...t){const a=t.map((t=>JSON.stringify(t))).join();try{const o=i.apply(this,t),c=JSON.stringify(o);return console.log(`Call: ${r}(${a}) => ${c}`),o}catch(t){throw console.log(t),t}},a}},81809:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.measureExcecutionTime=void 0,r.measureExcecutionTime=function measureExcecutionTime(t,r,a){const i=a.value;return a.value=async function(...t){const r=Date.now(),a=await i.apply(this,t),o=Date.now();return console.info(`Execution time: ${o-r}ms`),a},a}},44569:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.randomString=void 0,r.randomString=function randomString(t,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){let a="";const i=r.length;for(let o=0;o<t;o++)a+=r.charAt(Math.floor(Math.random()*i));return a}},77807:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ApplicationError=void 0;class ApplicationError extends Error{code;data;constructor(t,r,a){super(r),this.code=t,this.data=a}equals(t){return this.code===t.code}}r.ApplicationError=ApplicationError},19278:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Result=void 0;class Result{_isSuccess;_error;_value;constructor(t,r,a){if(t&&a)throw new Error("InvalidOperation: A result cannot be successful and contain an error");if(!t&&!a)throw new Error("InvalidOperation: A failing result needs to contain an error");if(void 0!==r&&!t)throw new Error("InvalidOperation: A value is only useful in case of a success.");this._value=r,this._isSuccess=t,this._error=a}get isSuccess(){return this._isSuccess}get isError(){return!this._isSuccess}get error(){return this._error}get value(){if(!this.isSuccess)throw new Error("Can't get the value of an error result. Use 'error' instead.");return this._value}static ok(t){return new Result(!0,t)}static fail(t){return new Result(!1,void 0,t)}}r.Result=Result},17226:function(t,r,a){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,r,a,i){void 0===i&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return r[a]}})}:function(t,r,a,i){void 0===i&&(i=a),t[i]=r[a]}),o=this&&this.__exportStar||function(t,r){for(var a in t)"default"===a||Object.prototype.hasOwnProperty.call(r,a)||i(r,t,a)};Object.defineProperty(r,"__esModule",{value:!0}),o(a(77807),r),o(a(19278),r)},77374:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.sleep=void 0,r.sleep=function sleep(t){return new Promise((r=>{setTimeout(r,t)}))}},33351:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(1581),o=a(93487),c=a(57023),l=a(74815),u=a(4181),d=a(22141),p="errorMessage",h=new i.Name("emUsed"),m={required:"missingProperty",dependencies:"property",dependentRequired:"property"},y=/\$\{[^}]+\}/,g=/\$\{([^}]+)\}/g,v=/^""\s*\+\s*|\s*\+\s*""$/g;function errorMessage(t){return{keyword:p,schemaType:["string","object"],post:!0,code(r){const{gen:a,data:b,schema:R,schemaValue:C,it:I}=r;if(!1===I.createErrors)return;const w=R,S=o.strConcat(d.default.instancePath,I.errorPath);function matchKeywordError(t,r){return o.and(i._`${t}.keyword !== ${p}`,i._`!${t}.${h}`,i._`${t}.instancePath === ${S}`,i._`${t}.keyword in ${r}`,i._`${t}.schemaPath.indexOf(${I.errSchemaPath}) === 0`,i._`/^\\/[^\\/]*$/.test(${t}.schemaPath.slice(${I.errSchemaPath.length}))`)}function getTemplatesCode(t,r){const i=[];for(const a in t){const t=r[a];y.test(t)&&i.push([a,templateFunc(t)])}return a.object(...i)}function templateExpr(t){return y.test(t)?new c._Code(c.safeStringify(t).replace(g,((t,r)=>`" + JSON.stringify(${l.getData(r,I)}) + "`)).replace(v,"")):i.stringify(t)}function templateFunc(t){return i._`function(){return ${templateExpr(t)}}`}a.if(i._`${d.default.errors} > 0`,(()=>{if("object"==typeof w){const[c,l]=function keywordErrorsConfig(t){let r,a;for(const i in t){if("properties"===i||"items"===i)continue;const o=t[i];if("object"==typeof o){r||(r={});const t=r[i]={};for(const r in o)t[r]=[]}else a||(a={}),a[i]=[]}return[r,a]}(w);l&&function processKeywordErrors(o){const c=a.const("emErrors",i.stringify(o)),l=a.const("templates",getTemplatesCode(o,R));a.forOf("err",d.default.vErrors,(t=>a.if(matchKeywordError(t,c),(()=>a.code(i._`${c}[${t}.keyword].push(${t})`).assign(i._`${t}.${h}`,!0)))));const{singleError:p}=t;if(p){const t=a.let("message",i._`""`),o=a.let("paramsErrors",i._`[]`);loopErrors((r=>{a.if(t,(()=>a.code(i._`${t} += ${"string"==typeof p?p:";"}`))),a.code(i._`${t} += ${errMessage(r)}`),a.assign(o,i._`${o}.concat(${c}[${r}])`)})),u.reportError(r,{message:t,params:i._`{errors: ${o}}`})}else loopErrors((t=>u.reportError(r,{message:errMessage(t),params:i._`{errors: ${c}[${t}]}`})));function loopErrors(t){a.forIn("key",c,(r=>a.if(i._`${c}[${r}].length`,(()=>t(r)))))}function errMessage(t){return i._`${t} in ${l} ? ${l}[${t}]() : ${C}[${t}]`}}(l),c&&function processKeywordPropErrors(t){const o=a.const("emErrors",i.stringify(t)),c=[];for(const r in t)c.push([r,getTemplatesCode(t[r],R[r])]);const l=a.const("templates",a.object(...c)),p=a.scopeValue("obj",{ref:m,code:i.stringify(m)}),y=a.let("emPropParams"),g=a.let("emParamsErrors");a.forOf("err",d.default.vErrors,(t=>a.if(matchKeywordError(t,o),(()=>{a.assign(y,i._`${p}[${t}.keyword]`),a.assign(g,i._`${o}[${t}.keyword][${t}.params[${y}]]`),a.if(g,(()=>a.code(i._`${g}.push(${t})`).assign(i._`${t}.${h}`,!0)))})))),a.forIn("key",o,(t=>a.forIn("keyProp",i._`${o}[${t}]`,(c=>{a.assign(g,i._`${o}[${t}][${c}]`),a.if(i._`${g}.length`,(()=>{const o=a.const("tmpl",i._`${l}[${t}] && ${l}[${t}][${c}]`);u.reportError(r,{message:i._`${o} ? ${o}() : ${C}[${t}][${c}]`,params:i._`{errors: ${g}}`})}))}))))}(c),function processChildErrors(t){const{props:c,items:l}=t;if(!c&&!l)return;const m=i._`typeof ${b} == "object"`,y=i._`Array.isArray(${b})`,g=a.let("emErrors");let v,I;const w=a.let("templates");c&&l?(v=a.let("emChildKwd"),a.if(m),a.if(y,(()=>{init(l,R.items),a.assign(v,i.str`items`)}),(()=>{init(c,R.properties),a.assign(v,i.str`properties`)})),I=i._`[${v}]`):l?(a.if(y),init(l,R.items),I=i._`.items`):c&&(a.if(o.and(m,o.not(y))),init(c,R.properties),I=i._`.properties`);function init(t,r){a.assign(g,i.stringify(t)),a.assign(w,getTemplatesCode(t,r))}a.forOf("err",d.default.vErrors,(t=>function ifMatchesChildError(t,r,c){a.if(o.and(i._`${t}.keyword !== ${p}`,i._`!${t}.${h}`,i._`${t}.instancePath.indexOf(${S}) === 0`),(()=>{const o=a.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),l=a.const("emMatches",i._`${o}.exec(${t}.instancePath.slice(${S}.length))`),u=a.const("emChild",i._`${l} && ${l}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);a.if(i._`${u} !== undefined && ${u} in ${r}`,(()=>c(u)))}))}(t,g,(r=>a.code(i._`${g}[${r}].push(${t})`).assign(i._`${t}.${h}`,!0))))),a.forIn("key",g,(t=>a.if(i._`${g}[${t}].length`,(()=>{u.reportError(r,{message:i._`${t} in ${w} ? ${w}[${t}]() : ${C}${I}[${t}]`,params:i._`{errors: ${g}[${t}]}`}),a.assign(i._`${d.default.vErrors}[${d.default.errors}-1].instancePath`,i._`${S} + "/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),a.endIf()}(function childErrorsConfig({properties:t,items:r}){const a={};if(t){a.props={};for(const r in t)a.props[r]=[]}if(r){a.items={};for(let t=0;t<r.length;t++)a.items[t]=[]}return a}(w))}const c="string"==typeof w?w:w._;c&&function processAllErrors(t){const c=a.const("emErrs",i._`[]`);a.forOf("err",d.default.vErrors,(t=>a.if(function matchAnyError(t){return o.and(i._`${t}.keyword !== ${p}`,i._`!${t}.${h}`,o.or(i._`${t}.instancePath === ${S}`,o.and(i._`${t}.instancePath.indexOf(${S}) === 0`,i._`${t}.instancePath[${S}.length] === "/"`)),i._`${t}.schemaPath.indexOf(${I.errSchemaPath}) === 0`,i._`${t}.schemaPath[${I.errSchemaPath}.length] === "/"`)}(t),(()=>a.code(i._`${c}.push(${t})`).assign(i._`${t}.${h}`,!0))))),a.if(i._`${c}.length`,(()=>u.reportError(r,{message:templateExpr(t),params:i._`{errors: ${c}}`})))}(c),t.keepErrors||function removeUsedErrors(){const t=a.const("emErrs",i._`[]`);a.forOf("err",d.default.vErrors,(r=>a.if(i._`!${r}.${h}`,(()=>a.code(i._`${t}.push(${r})`))))),a.assign(d.default.vErrors,t).assign(d.default.errors,i._`${t}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const ajvErrors=(t,r={})=>{if(!t.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(t.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return t.addKeyword(errorMessage(r))};r.default=ajvErrors,t.exports=ajvErrors,t.exports.default=ajvErrors},16870:(t,r)=>{"use strict";function fmtDef(t,r){return{validate:t,compare:r}}Object.defineProperty(r,"__esModule",{value:!0}),r.formatNames=r.fastFormats=r.fullFormats=void 0,r.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(time,compareTime),"date-time":fmtDef((function date_time(t){const r=t.split(c);return 2===r.length&&date(r[0])&&time(r[1],!0)}),compareDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function uri(t){return l.test(t)&&u.test(t)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function regex(t){if(p.test(t))return!1;try{return new RegExp(t),!0}catch(t){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function byte(t){return d.lastIndex=0,d.test(t)},int32:{type:"number",validate:function validateInt32(t){return Number.isInteger(t)&&t<=2147483647&&t>=-2147483648}},int64:{type:"number",validate:function validateInt64(t){return Number.isInteger(t)}},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},r.fastFormats={...r.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},r.formatNames=Object.keys(r.fullFormats);const a=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(t){const r=a.exec(t);if(!r)return!1;const o=+r[1],c=+r[2],l=+r[3];return c>=1&&c<=12&&l>=1&&l<=(2===c&&function isLeapYear(t){return t%4==0&&(t%100!=0||t%400==0)}(o)?29:i[c])}function compareDate(t,r){if(t&&r)return t>r?1:t<r?-1:0}const o=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function time(t,r){const a=o.exec(t);if(!a)return!1;const i=+a[1],c=+a[2],l=+a[3],u=a[5];return(i<=23&&c<=59&&l<=59||23===i&&59===c&&60===l)&&(!r||""!==u)}function compareTime(t,r){if(!t||!r)return;const a=o.exec(t),i=o.exec(r);return a&&i?(t=a[1]+a[2]+a[3]+(a[4]||""))>(r=i[1]+i[2]+i[3]+(i[4]||""))?1:t<r?-1:0:void 0}const c=/t|\s/i;function compareDateTime(t,r){if(!t||!r)return;const[a,i]=t.split(c),[o,l]=r.split(c),u=compareDate(a,o);return void 0!==u?u||compareTime(i,l):void 0}const l=/\/|:/,u=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;const d=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function validateNumber(){return!0}const p=/[^\\]\\Z/},5477:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(16870),o=a(57963),c=a(93487),l=new c.Name("fullFormats"),u=new c.Name("fastFormats"),formatsPlugin=(t,r={keywords:!0})=>{if(Array.isArray(r))return addFormats(t,r,i.fullFormats,l),t;const[a,c]="fast"===r.mode?[i.fastFormats,u]:[i.fullFormats,l];return addFormats(t,r.formats||i.formatNames,a,c),r.keywords&&o.default(t),t};function addFormats(t,r,a,i){var o,l;null!==(o=(l=t.opts.code).formats)&&void 0!==o||(l.formats=c._`require("ajv-formats/dist/formats").${i}`);for(const i of r)t.addFormat(i,a[i])}formatsPlugin.get=(t,r="full")=>{const a=("fast"===r?i.fastFormats:i.fullFormats)[t];if(!a)throw new Error(`Unknown format "${t}"`);return a},t.exports=r=formatsPlugin,Object.defineProperty(r,"__esModule",{value:!0}),r.default=formatsPlugin},57963:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.formatLimitDefinition=void 0;const i=a(1581),o=a(93487),c=o.operators,l={formatMaximum:{okStr:"<=",ok:c.LTE,fail:c.GT},formatMinimum:{okStr:">=",ok:c.GTE,fail:c.LT},formatExclusiveMaximum:{okStr:"<",ok:c.LT,fail:c.GTE},formatExclusiveMinimum:{okStr:">",ok:c.GT,fail:c.LTE}},u={message:({keyword:t,schemaCode:r})=>o.str`should be ${l[t].okStr} ${r}`,params:({keyword:t,schemaCode:r})=>o._`{comparison: ${l[t].okStr}, limit: ${r}}`};r.formatLimitDefinition={keyword:Object.keys(l),type:"string",schemaType:"string",$data:!0,error:u,code(t){const{gen:r,data:a,schemaCode:c,keyword:u,it:d}=t,{opts:p,self:h}=d;if(!p.validateFormats)return;const m=new i.KeywordCxt(d,h.RULES.all.format.definition,"format");function compareCode(t){return o._`${t}.compare(${a}, ${c}) ${l[u].fail} 0`}m.$data?function validate$DataFormat(){const a=r.scopeValue("formats",{ref:h.formats,code:p.code.formats}),i=r.const("fmt",o._`${a}[${m.schemaCode}]`);t.fail$data(o.or(o._`typeof ${i} != "object"`,o._`${i} instanceof RegExp`,o._`typeof ${i}.compare != "function"`,compareCode(i)))}():function validateFormat(){const a=m.schema,i=h.formats[a];if(!i||!0===i)return;if("object"!=typeof i||i instanceof RegExp||"function"!=typeof i.compare)throw new Error(`"${u}": format "${a}" does not define "compare" function`);const c=r.scopeValue("formats",{key:a,ref:i,code:p.code.formats?o._`${p.code.formats}${o.getProperty(a)}`:void 0});t.fail$data(compareCode(c))}()},dependencies:["format"]};r.default=t=>(t.addKeyword(r.formatLimitDefinition),t)},1581:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;const i=a(27159),o=a(93924),c=a(1240),l=a(98),u=["/properties"],d="http://json-schema.org/draft-07/schema";class Ajv extends i.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((t=>this.addVocabulary(t))),this.opts.discriminator&&this.addKeyword(c.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(l,u):l;this.addMetaSchema(t,d,!1),this.refs["http://json-schema.org/schema"]=d}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(d)?d:void 0)}}t.exports=r=Ajv,Object.defineProperty(r,"__esModule",{value:!0}),r.default=Ajv;var p=a(74815);Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var h=a(93487);Object.defineProperty(r,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}})},57023:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.regexpCode=r.getEsmExportName=r.getProperty=r.safeStringify=r.stringify=r.strConcat=r.addCodeArg=r.str=r._=r.nil=r._Code=r.Name=r.IDENTIFIER=r._CodeOrName=void 0;class _CodeOrName{}r._CodeOrName=_CodeOrName,r.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(t){if(super(),!r.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}r.Name=Name;class _Code extends _CodeOrName{constructor(t){super(),this._items="string"==typeof t?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const t=this._items[0];return""===t||'""'===t}get str(){var t;return null!==(t=this._str)&&void 0!==t?t:this._str=this._items.reduce(((t,r)=>`${t}${r}`),"")}get names(){var t;return null!==(t=this._names)&&void 0!==t?t:this._names=this._items.reduce(((t,r)=>(r instanceof Name&&(t[r.str]=(t[r.str]||0)+1),t)),{})}}function _(t,...r){const a=[t[0]];let i=0;for(;i<r.length;)addCodeArg(a,r[i]),a.push(t[++i]);return new _Code(a)}r._Code=_Code,r.nil=new _Code(""),r._=_;const a=new _Code("+");function str(t,...r){const i=[safeStringify(t[0])];let o=0;for(;o<r.length;)i.push(a),addCodeArg(i,r[o]),i.push(a,safeStringify(t[++o]));return function optimize(t){let r=1;for(;r<t.length-1;){if(t[r]===a){const a=mergeExprItems(t[r-1],t[r+1]);if(void 0!==a){t.splice(r-1,3,a);continue}t[r++]="+"}r++}}(i),new _Code(i)}function addCodeArg(t,r){r instanceof _Code?t.push(...r._items):r instanceof Name?t.push(r):t.push(function interpolate(t){return"number"==typeof t||"boolean"==typeof t||null===t?t:safeStringify(Array.isArray(t)?t.join(","):t)}(r))}function mergeExprItems(t,r){if('""'===r)return t;if('""'===t)return r;if("string"==typeof t){if(r instanceof Name||'"'!==t[t.length-1])return;return"string"!=typeof r?`${t.slice(0,-1)}${r}"`:'"'===r[0]?t.slice(0,-1)+r.slice(1):void 0}return"string"!=typeof r||'"'!==r[0]||t instanceof Name?void 0:`"${t}${r.slice(1)}`}function safeStringify(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}r.str=str,r.addCodeArg=addCodeArg,r.strConcat=function strConcat(t,r){return r.emptyStr()?t:t.emptyStr()?r:str`${t}${r}`},r.stringify=function stringify(t){return new _Code(safeStringify(t))},r.safeStringify=safeStringify,r.getProperty=function getProperty(t){return"string"==typeof t&&r.IDENTIFIER.test(t)?new _Code(`.${t}`):_`[${t}]`},r.getEsmExportName=function getEsmExportName(t){if("string"==typeof t&&r.IDENTIFIER.test(t))return new _Code(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},r.regexpCode=function regexpCode(t){return new _Code(t.toString())}},93487:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.or=r.and=r.not=r.CodeGen=r.operators=r.varKinds=r.ValueScopeName=r.ValueScope=r.Scope=r.Name=r.regexpCode=r.stringify=r.getProperty=r.nil=r.strConcat=r.str=r._=void 0;const i=a(57023),o=a(98490);var c=a(57023);Object.defineProperty(r,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(r,"strConcat",{enumerable:!0,get:function(){return c.strConcat}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(r,"getProperty",{enumerable:!0,get:function(){return c.getProperty}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(r,"regexpCode",{enumerable:!0,get:function(){return c.regexpCode}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return c.Name}});var l=a(98490);Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return l.Scope}}),Object.defineProperty(r,"ValueScope",{enumerable:!0,get:function(){return l.ValueScope}}),Object.defineProperty(r,"ValueScopeName",{enumerable:!0,get:function(){return l.ValueScopeName}}),Object.defineProperty(r,"varKinds",{enumerable:!0,get:function(){return l.varKinds}}),r.operators={GT:new i._Code(">"),GTE:new i._Code(">="),LT:new i._Code("<"),LTE:new i._Code("<="),EQ:new i._Code("==="),NEQ:new i._Code("!=="),NOT:new i._Code("!"),OR:new i._Code("||"),AND:new i._Code("&&"),ADD:new i._Code("+")};class Node{optimizeNodes(){return this}optimizeNames(t,r){return this}}class Def extends Node{constructor(t,r,a){super(),this.varKind=t,this.name=r,this.rhs=a}render({es5:t,_n:r}){const a=t?o.varKinds.var:this.varKind,i=void 0===this.rhs?"":` = ${this.rhs}`;return`${a} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=optimizeExpr(this.rhs,t,r)),this}get names(){return this.rhs instanceof i._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(t,r,a){super(),this.lhs=t,this.rhs=r,this.sideEffects=a}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof i.Name)||t[this.lhs.str]||this.sideEffects)return this.rhs=optimizeExpr(this.rhs,t,r),this}get names(){return addExprNames(this.lhs instanceof i.Name?{}:{...this.lhs.names},this.rhs)}}class AssignOp extends Assign{constructor(t,r,a,i){super(t,a,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}}class Label extends Node{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}}class Break extends Node{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}}class Throw extends Node{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}}class AnyCode extends Node{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=optimizeExpr(this.code,t,r),this}get names(){return this.code instanceof i._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce(((r,a)=>r+a.render(t)),"")}optimizeNodes(){const{nodes:t}=this;let r=t.length;for(;r--;){const a=t[r].optimizeNodes();Array.isArray(a)?t.splice(r,1,...a):a?t[r]=a:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){const{nodes:a}=this;let i=a.length;for(;i--;){const o=a[i];o.optimizeNames(t,r)||(subtractNames(t,o.names),a.splice(i,1))}return a.length>0?this:void 0}get names(){return this.nodes.reduce(((t,r)=>addNames(t,r.names)),{})}}class BlockNode extends ParentNode{render(t){return"{"+t._n+super.render(t)+"}"+t._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();const t=this.condition;if(!0===t)return this.nodes;let r=this.else;if(r){const t=r.optimizeNodes();r=this.else=Array.isArray(t)?new Else(t):t}return r?!1===t?r instanceof If?r:r.nodes:this.nodes.length?this:new If(not(t),r instanceof If?[r]:r.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(t,r){var a;if(this.else=null===(a=this.else)||void 0===a?void 0:a.optimizeNames(t,r),super.optimizeNames(t,r)||this.else)return this.condition=optimizeExpr(this.condition,t,r),this}get names(){const t=super.names;return addExprNames(t,this.condition),this.else&&addNames(t,this.else.names),t}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=optimizeExpr(this.iteration,t,r),this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(t,r,a,i){super(),this.varKind=t,this.name=r,this.from=a,this.to=i}render(t){const r=t.es5?o.varKinds.var:this.varKind,{name:a,from:i,to:c}=this;return`for(${r} ${a}=${i}; ${a}<${c}; ${a}++)`+super.render(t)}get names(){const t=addExprNames(super.names,this.from);return addExprNames(t,this.to)}}class ForIter extends For{constructor(t,r,a,i){super(),this.loop=t,this.varKind=r,this.name=a,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=optimizeExpr(this.iterable,t,r),this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(t,r,a){super(),this.name=t,this.args=r,this.async=a}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}Func.kind="func";class Return extends ParentNode{render(t){return"return "+super.render(t)}}Return.kind="return";class Try extends BlockNode{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),null===(t=this.catch)||void 0===t||t.optimizeNodes(),null===(r=this.finally)||void 0===r||r.optimizeNodes(),this}optimizeNames(t,r){var a,i;return super.optimizeNames(t,r),null===(a=this.catch)||void 0===a||a.optimizeNames(t,r),null===(i=this.finally)||void 0===i||i.optimizeNames(t,r),this}get names(){const t=super.names;return this.catch&&addNames(t,this.catch.names),this.finally&&addNames(t,this.finally.names),t}}class Catch extends BlockNode{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}Catch.kind="catch";class Finally extends BlockNode{render(t){return"finally"+super.render(t)}}Finally.kind="finally";function addNames(t,r){for(const a in r)t[a]=(t[a]||0)+(r[a]||0);return t}function addExprNames(t,r){return r instanceof i._CodeOrName?addNames(t,r.names):t}function optimizeExpr(t,r,a){return t instanceof i.Name?replaceName(t):function canOptimize(t){return t instanceof i._Code&&t._items.some((t=>t instanceof i.Name&&1===r[t.str]&&void 0!==a[t.str]))}(t)?new i._Code(t._items.reduce(((t,r)=>(r instanceof i.Name&&(r=replaceName(r)),r instanceof i._Code?t.push(...r._items):t.push(r),t)),[])):t;function replaceName(t){const i=a[t.str];return void 0===i||1!==r[t.str]?t:(delete r[t.str],i)}}function subtractNames(t,r){for(const a in r)t[a]=(t[a]||0)-(r[a]||0)}function not(t){return"boolean"==typeof t||"number"==typeof t||null===t?!t:i._`!${par(t)}`}r.CodeGen=class CodeGen{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?"\n":""},this._extScope=t,this._scope=new o.Scope({parent:t}),this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){const a=this._extScope.value(t,r);return(this._values[a.prefix]||(this._values[a.prefix]=new Set)).add(a),a}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,a,i){const o=this._scope.toName(r);return void 0!==a&&i&&(this._constants[o.str]=a),this._leafNode(new Def(t,o,a)),o}const(t,r,a){return this._def(o.varKinds.const,t,r,a)}let(t,r,a){return this._def(o.varKinds.let,t,r,a)}var(t,r,a){return this._def(o.varKinds.var,t,r,a)}assign(t,r,a){return this._leafNode(new Assign(t,r,a))}add(t,a){return this._leafNode(new AssignOp(t,r.operators.ADD,a))}code(t){return"function"==typeof t?t():t!==i.nil&&this._leafNode(new AnyCode(t)),this}object(...t){const r=["{"];for(const[a,o]of t)r.length>1&&r.push(","),r.push(a),(a!==o||this.opts.es5)&&(r.push(":"),(0,i.addCodeArg)(r,o));return r.push("}"),new i._Code(r)}if(t,r,a){if(this._blockNode(new If(t)),r&&a)this.code(r).else().code(a).endIf();else if(r)this.code(r).endIf();else if(a)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new If(t))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new ForLoop(t),r)}forRange(t,r,a,i,c=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const l=this._scope.toName(t);return this._for(new ForRange(c,l,r,a),(()=>i(l)))}forOf(t,r,a,c=o.varKinds.const){const l=this._scope.toName(t);if(this.opts.es5){const t=r instanceof i.Name?r:this.var("_arr",r);return this.forRange("_i",0,i._`${t}.length`,(r=>{this.var(l,i._`${t}[${r}]`),a(l)}))}return this._for(new ForIter("of",c,l,r),(()=>a(l)))}forIn(t,r,a,c=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(t,i._`Object.keys(${r})`,a);const l=this._scope.toName(t);return this._for(new ForIter("in",c,l,r),(()=>a(l)))}endFor(){return this._endBlockNode(For)}label(t){return this._leafNode(new Label(t))}break(t){return this._leafNode(new Break(t))}return(t){const r=new Return;if(this._blockNode(r),this.code(t),1!==r.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(t,r,a){if(!r&&!a)throw new Error('CodeGen: "try" without "catch" and "finally"');const i=new Try;if(this._blockNode(i),this.code(t),r){const t=this.name("e");this._currNode=i.catch=new Catch(t),r(t)}return a&&(this._currNode=i.finally=new Finally,this.code(a)),this._endBlockNode(Catch,Finally)}throw(t){return this._leafNode(new Throw(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){const r=this._blockStarts.pop();if(void 0===r)throw new Error("CodeGen: not in self-balancing block");const a=this._nodes.length-r;if(a<0||void 0!==t&&a!==t)throw new Error(`CodeGen: wrong number of nodes: ${a} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=i.nil,a,o){return this._blockNode(new Func(t,r,a)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Func)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){const a=this._currNode;if(a instanceof t||r&&a instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){const r=this._currNode;if(!(r instanceof If))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){const t=this._nodes;return t[t.length-1]}set _currNode(t){const r=this._nodes;r[r.length-1]=t}},r.not=not;const u=mappend(r.operators.AND);r.and=function and(...t){return t.reduce(u)};const d=mappend(r.operators.OR);function mappend(t){return(r,a)=>r===i.nil?a:a===i.nil?r:i._`${par(r)} ${t} ${par(a)}`}function par(t){return t instanceof i.Name?t:i._`(${t})`}r.or=function or(...t){return t.reduce(d)}},98490:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ValueScope=r.ValueScopeName=r.Scope=r.varKinds=r.UsedValueState=void 0;const i=a(57023);class ValueError extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}}var o;!function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"}(o=r.UsedValueState||(r.UsedValueState={})),r.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class Scope{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof i.Name?t:this.name(t)}name(t){return new i.Name(this._newName(t))}_newName(t){return`${t}${(this._names[t]||this._nameGroup(t)).index++}`}_nameGroup(t){var r,a;if((null===(a=null===(r=this._parent)||void 0===r?void 0:r._prefixes)||void 0===a?void 0:a.has(t))||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}}r.Scope=Scope;class ValueScopeName extends i.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:a}){this.value=t,this.scopePath=i._`.${new i.Name(r)}[${a}]`}}r.ValueScopeName=ValueScopeName;const c=i._`\n`;r.ValueScope=class ValueScope extends Scope{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?c:i.nil}}get(){return this._scope}name(t){return new ValueScopeName(t,this._newName(t))}value(t,r){var a;if(void 0===r.ref)throw new Error("CodeGen: ref must be passed in value");const i=this.toName(t),{prefix:o}=i,c=null!==(a=r.key)&&void 0!==a?a:r.ref;let l=this._values[o];if(l){const t=l.get(c);if(t)return t}else l=this._values[o]=new Map;l.set(c,i);const u=this._scope[o]||(this._scope[o]=[]),d=u.length;return u[d]=r.ref,i.setValue(r,{property:o,itemIndex:d}),i}getValue(t,r){const a=this._values[t];if(a)return a.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,(r=>{if(void 0===r.scopePath)throw new Error(`CodeGen: name "${r}" has no value`);return i._`${t}${r.scopePath}`}))}scopeCode(t=this._values,r,a){return this._reduceValues(t,(t=>{if(void 0===t.value)throw new Error(`CodeGen: name "${t}" has no value`);return t.value.code}),r,a)}_reduceValues(t,a,c={},l){let u=i.nil;for(const d in t){const p=t[d];if(!p)continue;const h=c[d]=c[d]||new Map;p.forEach((t=>{if(h.has(t))return;h.set(t,o.Started);let c=a(t);if(c){const a=this.opts.es5?r.varKinds.var:r.varKinds.const;u=i._`${u}${a} ${t} = ${c};${this.opts._n}`}else{if(!(c=null==l?void 0:l(t)))throw new ValueError(t);u=i._`${u}${c}${this.opts._n}`}h.set(t,o.Completed)}))}return u}}},4181:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.extendErrors=r.resetErrorsCount=r.reportExtraError=r.reportError=r.keyword$DataError=r.keywordError=void 0;const i=a(93487),o=a(76776),c=a(22141);function addError(t,r){const a=t.const("err",r);t.if(i._`${c.default.vErrors} === null`,(()=>t.assign(c.default.vErrors,i._`[${a}]`)),i._`${c.default.vErrors}.push(${a})`),t.code(i._`${c.default.errors}++`)}function returnErrors(t,r){const{gen:a,validateName:o,schemaEnv:c}=t;c.$async?a.throw(i._`new ${t.ValidationError}(${r})`):(a.assign(i._`${o}.errors`,r),a.return(!1))}r.keywordError={message:({keyword:t})=>i.str`must pass "${t}" keyword validation`},r.keyword$DataError={message:({keyword:t,schemaType:r})=>r?i.str`"${t}" keyword must be ${r} ($data)`:i.str`"${t}" keyword is invalid ($data)`},r.reportError=function reportError(t,a=r.keywordError,o,c){const{it:l}=t,{gen:u,compositeRule:d,allErrors:p}=l,h=errorObjectCode(t,a,o);(null!=c?c:d||p)?addError(u,h):returnErrors(l,i._`[${h}]`)},r.reportExtraError=function reportExtraError(t,a=r.keywordError,i){const{it:o}=t,{gen:l,compositeRule:u,allErrors:d}=o;addError(l,errorObjectCode(t,a,i)),u||d||returnErrors(o,c.default.vErrors)},r.resetErrorsCount=function resetErrorsCount(t,r){t.assign(c.default.errors,r),t.if(i._`${c.default.vErrors} !== null`,(()=>t.if(r,(()=>t.assign(i._`${c.default.vErrors}.length`,r)),(()=>t.assign(c.default.vErrors,null)))))},r.extendErrors=function extendErrors({gen:t,keyword:r,schemaValue:a,data:o,errsCount:l,it:u}){if(void 0===l)throw new Error("ajv implementation error");const d=t.name("err");t.forRange("i",l,c.default.errors,(l=>{t.const(d,i._`${c.default.vErrors}[${l}]`),t.if(i._`${d}.instancePath === undefined`,(()=>t.assign(i._`${d}.instancePath`,(0,i.strConcat)(c.default.instancePath,u.errorPath)))),t.assign(i._`${d}.schemaPath`,i.str`${u.errSchemaPath}/${r}`),u.opts.verbose&&(t.assign(i._`${d}.schema`,a),t.assign(i._`${d}.data`,o))}))};const l={keyword:new i.Name("keyword"),schemaPath:new i.Name("schemaPath"),params:new i.Name("params"),propertyName:new i.Name("propertyName"),message:new i.Name("message"),schema:new i.Name("schema"),parentSchema:new i.Name("parentSchema")};function errorObjectCode(t,r,a){const{createErrors:o}=t.it;return!1===o?i._`{}`:function errorObject(t,r,a={}){const{gen:o,it:u}=t,d=[errorInstancePath(u,a),errorSchemaPath(t,a)];return function extraErrorProps(t,{params:r,message:a},o){const{keyword:u,data:d,schemaValue:p,it:h}=t,{opts:m,propertyName:y,topSchemaRef:g,schemaPath:v}=h;o.push([l.keyword,u],[l.params,"function"==typeof r?r(t):r||i._`{}`]),m.messages&&o.push([l.message,"function"==typeof a?a(t):a]);m.verbose&&o.push([l.schema,p],[l.parentSchema,i._`${g}${v}`],[c.default.data,d]);y&&o.push([l.propertyName,y])}(t,r,d),o.object(...d)}(t,r,a)}function errorInstancePath({errorPath:t},{instancePath:r}){const a=r?i.str`${t}${(0,o.getErrorPath)(r,o.Type.Str)}`:t;return[c.default.instancePath,(0,i.strConcat)(c.default.instancePath,a)]}function errorSchemaPath({keyword:t,it:{errSchemaPath:r}},{schemaPath:a,parentSchema:c}){let u=c?r:i.str`${r}/${t}`;return a&&(u=i.str`${u}${(0,o.getErrorPath)(a,o.Type.Str)}`),[l.schemaPath,u]}},25173:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.resolveSchema=r.getCompilingSchema=r.resolveRef=r.compileSchema=r.SchemaEnv=void 0;const i=a(93487),o=a(67426),c=a(22141),l=a(32531),u=a(76776),d=a(74815),p=a(60540);class SchemaEnv{constructor(t){var r;let a;this.refs={},this.dynamicAnchors={},"object"==typeof t.schema&&(a=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=null!==(r=t.baseId)&&void 0!==r?r:(0,l.normalizeId)(null==a?void 0:a[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=null==a?void 0:a.$async,this.refs={}}}function compileSchema(t){const r=getCompilingSchema.call(this,t);if(r)return r;const a=(0,l.getFullPath)(t.root.baseId),{es5:u,lines:p}=this.opts.code,{ownProperties:h}=this.opts,m=new i.CodeGen(this.scope,{es5:u,lines:p,ownProperties:h});let y;t.$async&&(y=m.scopeValue("Error",{ref:o.default,code:i._`require("ajv/dist/runtime/validation_error").default`}));const g=m.scopeName("validate");t.validateName=g;const v={gen:m,allErrors:this.opts.allErrors,data:c.default.data,parentData:c.default.parentData,parentDataProperty:c.default.parentDataProperty,dataNames:[c.default.data],dataPathArr:[i.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:m.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,i.stringify)(t.schema)}:{ref:t.schema}),validateName:g,ValidationError:y,schema:t.schema,schemaEnv:t,rootId:a,baseId:t.baseId||a,schemaPath:i.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:i._`""`,opts:this.opts,self:this};let b;try{this._compilations.add(t),(0,d.validateFunctionCode)(v),m.optimize(this.opts.code.optimize);const r=m.toString();b=`${m.scopeRefs(c.default.scope)}return ${r}`,this.opts.code.process&&(b=this.opts.code.process(b,t));const a=new Function(`${c.default.self}`,`${c.default.scope}`,b)(this,this.scope.get());if(this.scope.value(g,{ref:a}),a.errors=null,a.schema=t.schema,a.schemaEnv=t,t.$async&&(a.$async=!0),!0===this.opts.code.source&&(a.source={validateName:g,validateCode:r,scopeValues:m._values}),this.opts.unevaluated){const{props:t,items:r}=v;a.evaluated={props:t instanceof i.Name?void 0:t,items:r instanceof i.Name?void 0:r,dynamicProps:t instanceof i.Name,dynamicItems:r instanceof i.Name},a.source&&(a.source.evaluated=(0,i.stringify)(a.evaluated))}return t.validate=a,t}catch(r){throw delete t.validate,delete t.validateName,b&&this.logger.error("Error compiling schema, function code:",b),r}finally{this._compilations.delete(t)}}function inlineOrCompile(t){return(0,l.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:compileSchema.call(this,t)}function getCompilingSchema(t){for(const i of this._compilations)if(a=t,(r=i).schema===a.schema&&r.root===a.root&&r.baseId===a.baseId)return i;var r,a}function resolve(t,r){let a;for(;"string"==typeof(a=this.refs[r]);)r=a;return a||this.schemas[r]||resolveSchema.call(this,t,r)}function resolveSchema(t,r){const a=p.parse(r),i=(0,l._getFullPath)(a);let o=(0,l.getFullPath)(t.baseId);if(Object.keys(t.schema).length>0&&i===o)return getJsonPointer.call(this,a,t);const c=(0,l.normalizeId)(i),u=this.refs[c]||this.schemas[c];if("string"==typeof u){const r=resolveSchema.call(this,t,u);if("object"!=typeof(null==r?void 0:r.schema))return;return getJsonPointer.call(this,a,r)}if("object"==typeof(null==u?void 0:u.schema)){if(u.validate||compileSchema.call(this,u),c===(0,l.normalizeId)(r)){const{schema:r}=u,{schemaId:a}=this.opts,i=r[a];return i&&(o=(0,l.resolveUrl)(o,i)),new SchemaEnv({schema:r,schemaId:a,root:t,baseId:o})}return getJsonPointer.call(this,a,u)}}r.SchemaEnv=SchemaEnv,r.compileSchema=compileSchema,r.resolveRef=function resolveRef(t,r,a){var i;a=(0,l.resolveUrl)(r,a);const o=t.refs[a];if(o)return o;let c=resolve.call(this,t,a);if(void 0===c){const o=null===(i=t.localRefs)||void 0===i?void 0:i[a],{schemaId:l}=this.opts;o&&(c=new SchemaEnv({schema:o,schemaId:l,root:t,baseId:r}))}return void 0!==c?t.refs[a]=inlineOrCompile.call(this,c):void 0},r.getCompilingSchema=getCompilingSchema,r.resolveSchema=resolveSchema;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(t,{baseId:r,schema:a,root:i}){var o;if("/"!==(null===(o=t.fragment)||void 0===o?void 0:o[0]))return;for(const i of t.fragment.slice(1).split("/")){if("boolean"==typeof a)return;const t=a[(0,u.unescapeFragment)(i)];if(void 0===t)return;const o="object"==typeof(a=t)&&a[this.opts.schemaId];!h.has(i)&&o&&(r=(0,l.resolveUrl)(r,o))}let c;if("boolean"!=typeof a&&a.$ref&&!(0,u.schemaHasRulesButRef)(a,this.RULES)){const t=(0,l.resolveUrl)(r,a.$ref);c=resolveSchema.call(this,i,t)}const{schemaId:d}=this.opts;return c=c||new SchemaEnv({schema:a,schemaId:d,root:i,baseId:r}),c.schema!==c.root.schema?c:void 0}},22141:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o={data:new i.Name("data"),valCxt:new i.Name("valCxt"),instancePath:new i.Name("instancePath"),parentData:new i.Name("parentData"),parentDataProperty:new i.Name("parentDataProperty"),rootData:new i.Name("rootData"),dynamicAnchors:new i.Name("dynamicAnchors"),vErrors:new i.Name("vErrors"),errors:new i.Name("errors"),this:new i.Name("this"),self:new i.Name("self"),scope:new i.Name("scope"),json:new i.Name("json"),jsonPos:new i.Name("jsonPos"),jsonLen:new i.Name("jsonLen"),jsonPart:new i.Name("jsonPart")};r.default=o},6646:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(32531);class MissingRefError extends Error{constructor(t,r,a){super(a||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,i.resolveUrl)(t,r),this.missingSchema=(0,i.normalizeId)((0,i.getFullPath)(this.missingRef))}}r.default=MissingRefError},32531:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getSchemaRefs=r.resolveUrl=r.normalizeId=r._getFullPath=r.getFullPath=r.inlineRef=void 0;const i=a(76776),o=a(64063),c=a(49461),l=a(60540),u=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);r.inlineRef=function inlineRef(t,r=!0){return"boolean"==typeof t||(!0===r?!hasRef(t):!!r&&countKeys(t)<=r)};const d=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(t){for(const r in t){if(d.has(r))return!0;const a=t[r];if(Array.isArray(a)&&a.some(hasRef))return!0;if("object"==typeof a&&hasRef(a))return!0}return!1}function countKeys(t){let r=0;for(const a in t){if("$ref"===a)return 1/0;if(r++,!u.has(a)&&("object"==typeof t[a]&&(0,i.eachItem)(t[a],(t=>r+=countKeys(t))),r===1/0))return 1/0}return r}function getFullPath(t="",r){!1!==r&&(t=normalizeId(t));return _getFullPath(l.parse(t))}function _getFullPath(t){return l.serialize(t).split("#")[0]+"#"}r.getFullPath=getFullPath,r._getFullPath=_getFullPath;const p=/#\/?$/;function normalizeId(t){return t?t.replace(p,""):""}r.normalizeId=normalizeId,r.resolveUrl=function resolveUrl(t,r){return r=normalizeId(r),l.resolve(t,r)};const h=/^[a-z_][-a-z0-9._]*$/i;r.getSchemaRefs=function getSchemaRefs(t,r){if("boolean"==typeof t)return{};const{schemaId:a}=this.opts,i=normalizeId(t[a]||r),u={"":i},d=getFullPath(i,!1),p={},m=new Set;return c(t,{allKeys:!0},((t,r,i,o)=>{if(void 0===o)return;const c=d+r;let y=u[o];function addRef(r){if(r=normalizeId(y?l.resolve(y,r):r),m.has(r))throw ambiguos(r);m.add(r);let a=this.refs[r];return"string"==typeof a&&(a=this.refs[a]),"object"==typeof a?checkAmbiguosRef(t,a.schema,r):r!==normalizeId(c)&&("#"===r[0]?(checkAmbiguosRef(t,p[r],r),p[r]=t):this.refs[r]=c),r}function addAnchor(t){if("string"==typeof t){if(!h.test(t))throw new Error(`invalid anchor "${t}"`);addRef.call(this,`#${t}`)}}"string"==typeof t[a]&&(y=addRef.call(this,t[a])),addAnchor.call(this,t.$anchor),addAnchor.call(this,t.$dynamicAnchor),u[r]=y})),p;function checkAmbiguosRef(t,r,a){if(void 0!==r&&!o(t,r))throw ambiguos(a)}function ambiguos(t){return new Error(`reference "${t}" resolves to more than one schema`)}}},13141:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getRules=r.isJSONType=void 0;const a=new Set(["string","number","integer","boolean","null","object","array"]);r.isJSONType=function isJSONType(t){return"string"==typeof t&&a.has(t)},r.getRules=function getRules(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}},76776:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.checkStrictMode=r.getErrorPath=r.Type=r.useFunc=r.setEvaluated=r.evaluatedPropsToName=r.mergeEvaluated=r.eachItem=r.unescapeJsonPointer=r.escapeJsonPointer=r.escapeFragment=r.unescapeFragment=r.schemaRefOrVal=r.schemaHasRulesButRef=r.schemaHasRules=r.checkUnknownRules=r.alwaysValidSchema=r.toHash=void 0;const i=a(93487),o=a(57023);function checkUnknownRules(t,r=t.schema){const{opts:a,self:i}=t;if(!a.strictSchema)return;if("boolean"==typeof r)return;const o=i.RULES.keywords;for(const a in r)o[a]||checkStrictMode(t,`unknown keyword: "${a}"`)}function schemaHasRules(t,r){if("boolean"==typeof t)return!t;for(const a in t)if(r[a])return!0;return!1}function escapeJsonPointer(t){return"number"==typeof t?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function makeMergeEvaluated({mergeNames:t,mergeToName:r,mergeValues:a,resultToName:o}){return(c,l,u,d)=>{const p=void 0===u?l:u instanceof i.Name?(l instanceof i.Name?t(c,l,u):r(c,l,u),u):l instanceof i.Name?(r(c,u,l),l):a(l,u);return d!==i.Name||p instanceof i.Name?p:o(c,p)}}function evaluatedPropsToName(t,r){if(!0===r)return t.var("props",!0);const a=t.var("props",i._`{}`);return void 0!==r&&setEvaluated(t,a,r),a}function setEvaluated(t,r,a){Object.keys(a).forEach((a=>t.assign(i._`${r}${(0,i.getProperty)(a)}`,!0)))}r.toHash=function toHash(t){const r={};for(const a of t)r[a]=!0;return r},r.alwaysValidSchema=function alwaysValidSchema(t,r){return"boolean"==typeof r?r:0===Object.keys(r).length||(checkUnknownRules(t,r),!schemaHasRules(r,t.self.RULES.all))},r.checkUnknownRules=checkUnknownRules,r.schemaHasRules=schemaHasRules,r.schemaHasRulesButRef=function schemaHasRulesButRef(t,r){if("boolean"==typeof t)return!t;for(const a in t)if("$ref"!==a&&r.all[a])return!0;return!1},r.schemaRefOrVal=function schemaRefOrVal({topSchemaRef:t,schemaPath:r},a,o,c){if(!c){if("number"==typeof a||"boolean"==typeof a)return a;if("string"==typeof a)return i._`${a}`}return i._`${t}${r}${(0,i.getProperty)(o)}`},r.unescapeFragment=function unescapeFragment(t){return unescapeJsonPointer(decodeURIComponent(t))},r.escapeFragment=function escapeFragment(t){return encodeURIComponent(escapeJsonPointer(t))},r.escapeJsonPointer=escapeJsonPointer,r.unescapeJsonPointer=unescapeJsonPointer,r.eachItem=function eachItem(t,r){if(Array.isArray(t))for(const a of t)r(a);else r(t)},r.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(t,r,a)=>t.if(i._`${a} !== true && ${r} !== undefined`,(()=>{t.if(i._`${r} === true`,(()=>t.assign(a,!0)),(()=>t.assign(a,i._`${a} || {}`).code(i._`Object.assign(${a}, ${r})`)))})),mergeToName:(t,r,a)=>t.if(i._`${a} !== true`,(()=>{!0===r?t.assign(a,!0):(t.assign(a,i._`${a} || {}`),setEvaluated(t,a,r))})),mergeValues:(t,r)=>!0===t||{...t,...r},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(t,r,a)=>t.if(i._`${a} !== true && ${r} !== undefined`,(()=>t.assign(a,i._`${r} === true ? true : ${a} > ${r} ? ${a} : ${r}`))),mergeToName:(t,r,a)=>t.if(i._`${a} !== true`,(()=>t.assign(a,!0===r||i._`${a} > ${r} ? ${a} : ${r}`))),mergeValues:(t,r)=>!0===t||Math.max(t,r),resultToName:(t,r)=>t.var("items",r)})},r.evaluatedPropsToName=evaluatedPropsToName,r.setEvaluated=setEvaluated;const c={};var l;function checkStrictMode(t,r,a=t.opts.strictSchema){if(a){if(r=`strict mode: ${r}`,!0===a)throw new Error(r);t.self.logger.warn(r)}}r.useFunc=function useFunc(t,r){return t.scopeValue("func",{ref:r,code:c[r.code]||(c[r.code]=new o._Code(r.code))})},function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"}(l=r.Type||(r.Type={})),r.getErrorPath=function getErrorPath(t,r,a){if(t instanceof i.Name){const o=r===l.Num;return a?o?i._`"[" + ${t} + "]"`:i._`"['" + ${t} + "']"`:o?i._`"/" + ${t}`:i._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return a?(0,i.getProperty)(t).toString():"/"+escapeJsonPointer(t)},r.checkStrictMode=checkStrictMode},58876:(t,r)=>{"use strict";function shouldUseGroup(t,r){return r.rules.some((r=>shouldUseRule(t,r)))}function shouldUseRule(t,r){var a;return void 0!==t[r.keyword]||(null===(a=r.definition.implements)||void 0===a?void 0:a.some((r=>void 0!==t[r])))}Object.defineProperty(r,"__esModule",{value:!0}),r.shouldUseRule=r.shouldUseGroup=r.schemaHasRulesForType=void 0,r.schemaHasRulesForType=function schemaHasRulesForType({schema:t,self:r},a){const i=r.RULES.types[a];return i&&!0!==i&&shouldUseGroup(t,i)},r.shouldUseGroup=shouldUseGroup,r.shouldUseRule=shouldUseRule},55667:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.boolOrEmptySchema=r.topBoolOrEmptySchema=void 0;const i=a(4181),o=a(93487),c=a(22141),l={message:"boolean schema is false"};function falseSchemaError(t,r){const{gen:a,data:o}=t,c={gen:a,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,i.reportError)(c,l,void 0,r)}r.topBoolOrEmptySchema=function topBoolOrEmptySchema(t){const{gen:r,schema:a,validateName:i}=t;!1===a?falseSchemaError(t,!1):"object"==typeof a&&!0===a.$async?r.return(c.default.data):(r.assign(o._`${i}.errors`,null),r.return(!0))},r.boolOrEmptySchema=function boolOrEmptySchema(t,r){const{gen:a,schema:i}=t;!1===i?(a.var(r,!1),falseSchemaError(t)):a.var(r,!0)}},50453:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.reportTypeError=r.checkDataTypes=r.checkDataType=r.coerceAndCheckDataType=r.getJSONTypes=r.getSchemaTypes=r.DataType=void 0;const i=a(13141),o=a(58876),c=a(4181),l=a(93487),u=a(76776);var d;function getJSONTypes(t){const r=Array.isArray(t)?t:t?[t]:[];if(r.every(i.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}!function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"}(d=r.DataType||(r.DataType={})),r.getSchemaTypes=function getSchemaTypes(t){const r=getJSONTypes(t.type);if(r.includes("null")){if(!1===t.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!r.length&&void 0!==t.nullable)throw new Error('"nullable" cannot be used without "type"');!0===t.nullable&&r.push("null")}return r},r.getJSONTypes=getJSONTypes,r.coerceAndCheckDataType=function coerceAndCheckDataType(t,r){const{gen:a,data:i,opts:c}=t,u=function coerceToTypes(t,r){return r?t.filter((t=>p.has(t)||"array"===r&&"array"===t)):[]}(r,c.coerceTypes),h=r.length>0&&!(0===u.length&&1===r.length&&(0,o.schemaHasRulesForType)(t,r[0]));if(h){const o=checkDataTypes(r,i,c.strictNumbers,d.Wrong);a.if(o,(()=>{u.length?function coerceData(t,r,a){const{gen:i,data:o,opts:c}=t,u=i.let("dataType",l._`typeof ${o}`),d=i.let("coerced",l._`undefined`);"array"===c.coerceTypes&&i.if(l._`${u} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,(()=>i.assign(o,l._`${o}[0]`).assign(u,l._`typeof ${o}`).if(checkDataTypes(r,o,c.strictNumbers),(()=>i.assign(d,o)))));i.if(l._`${d} !== undefined`);for(const t of a)(p.has(t)||"array"===t&&"array"===c.coerceTypes)&&coerceSpecificType(t);function coerceSpecificType(t){switch(t){case"string":return void i.elseIf(l._`${u} == "number" || ${u} == "boolean"`).assign(d,l._`"" + ${o}`).elseIf(l._`${o} === null`).assign(d,l._`""`);case"number":return void i.elseIf(l._`${u} == "boolean" || ${o} === null
3
+ || (${u} == "string" && ${o} && ${o} == +${o})`).assign(d,l._`+${o}`);case"integer":return void i.elseIf(l._`${u} === "boolean" || ${o} === null
4
+ || (${u} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(d,l._`+${o}`);case"boolean":return void i.elseIf(l._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(d,!1).elseIf(l._`${o} === "true" || ${o} === 1`).assign(d,!0);case"null":return i.elseIf(l._`${o} === "" || ${o} === 0 || ${o} === false`),void i.assign(d,null);case"array":i.elseIf(l._`${u} === "string" || ${u} === "number"
5
+ || ${u} === "boolean" || ${o} === null`).assign(d,l._`[${o}]`)}}i.else(),reportTypeError(t),i.endIf(),i.if(l._`${d} !== undefined`,(()=>{i.assign(o,d),function assignParentData({gen:t,parentData:r,parentDataProperty:a},i){t.if(l._`${r} !== undefined`,(()=>t.assign(l._`${r}[${a}]`,i)))}(t,d)}))}(t,r,u):reportTypeError(t)}))}return h};const p=new Set(["string","number","integer","boolean","null"]);function checkDataType(t,r,a,i=d.Correct){const o=i===d.Correct?l.operators.EQ:l.operators.NEQ;let c;switch(t){case"null":return l._`${r} ${o} null`;case"array":c=l._`Array.isArray(${r})`;break;case"object":c=l._`${r} && typeof ${r} == "object" && !Array.isArray(${r})`;break;case"integer":c=numCond(l._`!(${r} % 1) && !isNaN(${r})`);break;case"number":c=numCond();break;default:return l._`typeof ${r} ${o} ${t}`}return i===d.Correct?c:(0,l.not)(c);function numCond(t=l.nil){return(0,l.and)(l._`typeof ${r} == "number"`,t,a?l._`isFinite(${r})`:l.nil)}}function checkDataTypes(t,r,a,i){if(1===t.length)return checkDataType(t[0],r,a,i);let o;const c=(0,u.toHash)(t);if(c.array&&c.object){const t=l._`typeof ${r} != "object"`;o=c.null?t:l._`!${r} || ${t}`,delete c.null,delete c.array,delete c.object}else o=l.nil;c.number&&delete c.integer;for(const t in c)o=(0,l.and)(o,checkDataType(t,r,a,i));return o}r.checkDataType=checkDataType,r.checkDataTypes=checkDataTypes;const h={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:r})=>"string"==typeof t?l._`{type: ${t}}`:l._`{type: ${r}}`};function reportTypeError(t){const r=function getTypeErrorContext(t){const{gen:r,data:a,schema:i}=t,o=(0,u.schemaRefOrVal)(t,i,"type");return{gen:r,keyword:"type",data:a,schema:i.type,schemaCode:o,schemaValue:o,parentSchema:i,params:{},it:t}}(t);(0,c.reportError)(r,h)}r.reportTypeError=reportTypeError},90313:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.assignDefaults=void 0;const i=a(93487),o=a(76776);function assignDefault(t,r,a){const{gen:c,compositeRule:l,data:u,opts:d}=t;if(void 0===a)return;const p=i._`${u}${(0,i.getProperty)(r)}`;if(l)return void(0,o.checkStrictMode)(t,`default is ignored for: ${p}`);let h=i._`${p} === undefined`;"empty"===d.useDefaults&&(h=i._`${h} || ${p} === null || ${p} === ""`),c.if(h,i._`${p} = ${(0,i.stringify)(a)}`)}r.assignDefaults=function assignDefaults(t,r){const{properties:a,items:i}=t.schema;if("object"===r&&a)for(const r in a)assignDefault(t,r,a[r].default);else"array"===r&&Array.isArray(i)&&i.forEach(((r,a)=>assignDefault(t,a,r.default)))}},74815:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getData=r.KeywordCxt=r.validateFunctionCode=void 0;const i=a(55667),o=a(50453),c=a(58876),l=a(50453),u=a(90313),d=a(95005),p=a(13099),h=a(93487),m=a(22141),y=a(32531),g=a(76776),v=a(4181);function validateFunction({gen:t,validateName:r,schema:a,schemaEnv:i,opts:o},c){o.code.es5?t.func(r,h._`${m.default.data}, ${m.default.valCxt}`,i.$async,(()=>{t.code(h._`"use strict"; ${funcSourceUrl(a,o)}`),function destructureValCxtES5(t,r){t.if(m.default.valCxt,(()=>{t.var(m.default.instancePath,h._`${m.default.valCxt}.${m.default.instancePath}`),t.var(m.default.parentData,h._`${m.default.valCxt}.${m.default.parentData}`),t.var(m.default.parentDataProperty,h._`${m.default.valCxt}.${m.default.parentDataProperty}`),t.var(m.default.rootData,h._`${m.default.valCxt}.${m.default.rootData}`),r.dynamicRef&&t.var(m.default.dynamicAnchors,h._`${m.default.valCxt}.${m.default.dynamicAnchors}`)}),(()=>{t.var(m.default.instancePath,h._`""`),t.var(m.default.parentData,h._`undefined`),t.var(m.default.parentDataProperty,h._`undefined`),t.var(m.default.rootData,m.default.data),r.dynamicRef&&t.var(m.default.dynamicAnchors,h._`{}`)}))}(t,o),t.code(c)})):t.func(r,h._`${m.default.data}, ${function destructureValCxt(t){return h._`{${m.default.instancePath}="", ${m.default.parentData}, ${m.default.parentDataProperty}, ${m.default.rootData}=${m.default.data}${t.dynamicRef?h._`, ${m.default.dynamicAnchors}={}`:h.nil}}={}`}(o)}`,i.$async,(()=>t.code(funcSourceUrl(a,o)).code(c)))}function funcSourceUrl(t,r){const a="object"==typeof t&&t[r.schemaId];return a&&(r.code.source||r.code.process)?h._`/*# sourceURL=${a} */`:h.nil}function subschemaCode(t,r){isSchemaObj(t)&&(checkKeywords(t),schemaCxtHasRules(t))?function subSchemaObjCode(t,r){const{schema:a,gen:i,opts:o}=t;o.$comment&&a.$comment&&commentKeyword(t);(function updateContext(t){const r=t.schema[t.opts.schemaId];r&&(t.baseId=(0,y.resolveUrl)(t.baseId,r))})(t),function checkAsyncSchema(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}(t);const c=i.const("_errs",m.default.errors);typeAndKeywords(t,c),i.var(r,h._`${c} === ${m.default.errors}`)}(t,r):(0,i.boolOrEmptySchema)(t,r)}function schemaCxtHasRules({schema:t,self:r}){if("boolean"==typeof t)return!t;for(const a in t)if(r.RULES.all[a])return!0;return!1}function isSchemaObj(t){return"boolean"!=typeof t.schema}function checkKeywords(t){(0,g.checkUnknownRules)(t),function checkRefsAndKeywords(t){const{schema:r,errSchemaPath:a,opts:i,self:o}=t;r.$ref&&i.ignoreKeywordsWithRef&&(0,g.schemaHasRulesButRef)(r,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${a}"`)}(t)}function typeAndKeywords(t,r){if(t.opts.jtd)return schemaKeywords(t,[],!1,r);const a=(0,o.getSchemaTypes)(t.schema);schemaKeywords(t,a,!(0,o.coerceAndCheckDataType)(t,a),r)}function commentKeyword({gen:t,schemaEnv:r,schema:a,errSchemaPath:i,opts:o}){const c=a.$comment;if(!0===o.$comment)t.code(h._`${m.default.self}.logger.log(${c})`);else if("function"==typeof o.$comment){const a=h.str`${i}/$comment`,o=t.scopeValue("root",{ref:r.root});t.code(h._`${m.default.self}.opts.$comment(${c}, ${a}, ${o}.schema)`)}}function schemaKeywords(t,r,a,i){const{gen:o,schema:u,data:d,allErrors:p,opts:y,self:v}=t,{RULES:b}=v;function groupKeywords(g){(0,c.shouldUseGroup)(u,g)&&(g.type?(o.if((0,l.checkDataType)(g.type,d,y.strictNumbers)),iterateKeywords(t,g),1===r.length&&r[0]===g.type&&a&&(o.else(),(0,l.reportTypeError)(t)),o.endIf()):iterateKeywords(t,g),p||o.if(h._`${m.default.errors} === ${i||0}`))}!u.$ref||!y.ignoreKeywordsWithRef&&(0,g.schemaHasRulesButRef)(u,b)?(y.jtd||function checkStrictTypes(t,r){if(t.schemaEnv.meta||!t.opts.strictTypes)return;(function checkContextTypes(t,r){if(!r.length)return;if(!t.dataTypes.length)return void(t.dataTypes=r);r.forEach((r=>{includesType(t.dataTypes,r)||strictTypesError(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)})),t.dataTypes=t.dataTypes.filter((t=>includesType(r,t)))})(t,r),t.opts.allowUnionTypes||function checkMultipleTypes(t,r){r.length>1&&(2!==r.length||!r.includes("null"))&&strictTypesError(t,"use allowUnionTypes to allow union type keyword")}(t,r);!function checkKeywordTypes(t,r){const a=t.self.RULES.all;for(const i in a){const o=a[i];if("object"==typeof o&&(0,c.shouldUseRule)(t.schema,o)){const{type:a}=o.definition;a.length&&!a.some((t=>hasApplicableType(r,t)))&&strictTypesError(t,`missing type "${a.join(",")}" for keyword "${i}"`)}}}(t,t.dataTypes)}(t,r),o.block((()=>{for(const t of b.rules)groupKeywords(t);groupKeywords(b.post)}))):o.block((()=>keywordCode(t,"$ref",b.all.$ref.definition)))}function iterateKeywords(t,r){const{gen:a,schema:i,opts:{useDefaults:o}}=t;o&&(0,u.assignDefaults)(t,r.type),a.block((()=>{for(const a of r.rules)(0,c.shouldUseRule)(i,a)&&keywordCode(t,a.keyword,a.definition,r.type)}))}function hasApplicableType(t,r){return t.includes(r)||"number"===r&&t.includes("integer")}function includesType(t,r){return t.includes(r)||"integer"===r&&t.includes("number")}function strictTypesError(t,r){r+=` at "${t.schemaEnv.baseId+t.errSchemaPath}" (strictTypes)`,(0,g.checkStrictMode)(t,r,t.opts.strictTypes)}r.validateFunctionCode=function validateFunctionCode(t){isSchemaObj(t)&&(checkKeywords(t),schemaCxtHasRules(t))?function topSchemaObjCode(t){const{schema:r,opts:a,gen:i}=t;return void validateFunction(t,(()=>{a.$comment&&r.$comment&&commentKeyword(t),function checkNoDefault(t){const{schema:r,opts:a}=t;void 0!==r.default&&a.useDefaults&&a.strictSchema&&(0,g.checkStrictMode)(t,"default is ignored in the schema root")}(t),i.let(m.default.vErrors,null),i.let(m.default.errors,0),a.unevaluated&&function resetEvaluated(t){const{gen:r,validateName:a}=t;t.evaluated=r.const("evaluated",h._`${a}.evaluated`),r.if(h._`${t.evaluated}.dynamicProps`,(()=>r.assign(h._`${t.evaluated}.props`,h._`undefined`))),r.if(h._`${t.evaluated}.dynamicItems`,(()=>r.assign(h._`${t.evaluated}.items`,h._`undefined`)))}(t),typeAndKeywords(t),function returnResults(t){const{gen:r,schemaEnv:a,validateName:i,ValidationError:o,opts:c}=t;a.$async?r.if(h._`${m.default.errors} === 0`,(()=>r.return(m.default.data)),(()=>r.throw(h._`new ${o}(${m.default.vErrors})`))):(r.assign(h._`${i}.errors`,m.default.vErrors),c.unevaluated&&function assignEvaluated({gen:t,evaluated:r,props:a,items:i}){a instanceof h.Name&&t.assign(h._`${r}.props`,a);i instanceof h.Name&&t.assign(h._`${r}.items`,i)}(t),r.return(h._`${m.default.errors} === 0`))}(t)}))}(t):validateFunction(t,(()=>(0,i.topBoolOrEmptySchema)(t)))};class KeywordCxt{constructor(t,r,a){if((0,d.validateKeywordUsage)(t,r,a),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=a,this.data=t.data,this.schema=t.schema[a],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,g.schemaRefOrVal)(t,this.schema,a,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",getData(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,d.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${a} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:!1!==r.errors)&&(this.errsCount=t.gen.const("_errs",m.default.errors))}result(t,r,a){this.failResult((0,h.not)(t),r,a)}failResult(t,r,a){this.gen.if(t),a?a():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,h.not)(t),void 0,r)}fail(t){if(void 0===t)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail(h._`${r} !== undefined && (${(0,h.or)(this.invalid$data(),t)})`)}error(t,r,a){if(r)return this.setParams(r),this._error(t,a),void this.setParams({});this._error(t,a)}_error(t,r){(t?v.reportExtraError:v.reportError)(this,this.def.error,r)}$dataError(){(0,v.reportError)(this,this.def.$dataError||v.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,v.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,a=h.nil){this.gen.block((()=>{this.check$data(t,a),r()}))}check$data(t=h.nil,r=h.nil){if(!this.$data)return;const{gen:a,schemaCode:i,schemaType:o,def:c}=this;a.if((0,h.or)(h._`${i} === undefined`,r)),t!==h.nil&&a.assign(t,!0),(o.length||c.validateSchema)&&(a.elseIf(this.invalid$data()),this.$dataError(),t!==h.nil&&a.assign(t,!1)),a.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:a,def:i,it:o}=this;return(0,h.or)(function wrong$DataType(){if(a.length){if(!(r instanceof h.Name))throw new Error("ajv implementation error");const t=Array.isArray(a)?a:[a];return h._`${(0,l.checkDataTypes)(t,r,o.opts.strictNumbers,l.DataType.Wrong)}`}return h.nil}(),function invalid$DataSchema(){if(i.validateSchema){const a=t.scopeValue("validate$data",{ref:i.validateSchema});return h._`!${a}(${r})`}return h.nil}())}subschema(t,r){const a=(0,p.getSubschema)(this.it,t);(0,p.extendSubschemaData)(a,this.it,t),(0,p.extendSubschemaMode)(a,t);const i={...this.it,...a,items:void 0,props:void 0};return subschemaCode(i,r),i}mergeEvaluated(t,r){const{it:a,gen:i}=this;a.opts.unevaluated&&(!0!==a.props&&void 0!==t.props&&(a.props=g.mergeEvaluated.props(i,t.props,a.props,r)),!0!==a.items&&void 0!==t.items&&(a.items=g.mergeEvaluated.items(i,t.items,a.items,r)))}mergeValidEvaluated(t,r){const{it:a,gen:i}=this;if(a.opts.unevaluated&&(!0!==a.props||!0!==a.items))return i.if(r,(()=>this.mergeEvaluated(t,h.Name))),!0}}function keywordCode(t,r,a,i){const o=new KeywordCxt(t,a,r);"code"in a?a.code(o,i):o.$data&&a.validate?(0,d.funcKeywordCode)(o,a):"macro"in a?(0,d.macroKeywordCode)(o,a):(a.compile||a.validate)&&(0,d.funcKeywordCode)(o,a)}r.KeywordCxt=KeywordCxt;const b=/^\/(?:[^~]|~0|~1)*$/,R=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(t,{dataLevel:r,dataNames:a,dataPathArr:i}){let o,c;if(""===t)return m.default.rootData;if("/"===t[0]){if(!b.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,c=m.default.rootData}else{const l=R.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);const u=+l[1];if(o=l[2],"#"===o){if(u>=r)throw new Error(errorMsg("property/index",u));return i[r-u]}if(u>r)throw new Error(errorMsg("data",u));if(c=a[r-u],!o)return c}let l=c;const u=o.split("/");for(const t of u)t&&(c=h._`${c}${(0,h.getProperty)((0,g.unescapeJsonPointer)(t))}`,l=h._`${l} && ${c}`);return l;function errorMsg(t,a){return`Cannot access ${t} ${a} levels up, current level is ${r}`}}r.getData=getData},95005:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateKeywordUsage=r.validSchemaType=r.funcKeywordCode=r.macroKeywordCode=void 0;const i=a(93487),o=a(22141),c=a(10412),l=a(4181);function modifyData(t){const{gen:r,data:a,it:o}=t;r.if(o.parentData,(()=>r.assign(a,i._`${o.parentData}[${o.parentDataProperty}]`)))}function useKeyword(t,r,a){if(void 0===a)throw new Error(`keyword "${r}" failed to compile`);return t.scopeValue("keyword","function"==typeof a?{ref:a}:{ref:a,code:(0,i.stringify)(a)})}r.macroKeywordCode=function macroKeywordCode(t,r){const{gen:a,keyword:o,schema:c,parentSchema:l,it:u}=t,d=r.macro.call(u.self,c,l,u),p=useKeyword(a,o,d);!1!==u.opts.validateSchema&&u.self.validateSchema(d,!0);const h=a.name("valid");t.subschema({schema:d,schemaPath:i.nil,errSchemaPath:`${u.errSchemaPath}/${o}`,topSchemaRef:p,compositeRule:!0},h),t.pass(h,(()=>t.error(!0)))},r.funcKeywordCode=function funcKeywordCode(t,r){var a;const{gen:u,keyword:d,schema:p,parentSchema:h,$data:m,it:y}=t;!function checkAsyncKeyword({schemaEnv:t},r){if(r.async&&!t.$async)throw new Error("async keyword in sync schema")}(y,r);const g=!m&&r.compile?r.compile.call(y.self,p,h,y):r.validate,v=useKeyword(u,d,g),b=u.let("valid");function assignValid(a=(r.async?i._`await `:i.nil)){const l=y.opts.passContext?o.default.this:o.default.self,d=!("compile"in r&&!m||!1===r.schema);u.assign(b,i._`${a}${(0,c.callValidateCode)(t,v,l,d)}`,r.modifying)}function reportErrs(t){var a;u.if((0,i.not)(null!==(a=r.valid)&&void 0!==a?a:b),t)}t.block$data(b,(function validateKeyword(){if(!1===r.errors)assignValid(),r.modifying&&modifyData(t),reportErrs((()=>t.error()));else{const a=r.async?function validateAsync(){const t=u.let("ruleErrs",null);return u.try((()=>assignValid(i._`await `)),(r=>u.assign(b,!1).if(i._`${r} instanceof ${y.ValidationError}`,(()=>u.assign(t,i._`${r}.errors`)),(()=>u.throw(r))))),t}():function validateSync(){const t=i._`${v}.errors`;return u.assign(t,null),assignValid(i.nil),t}();r.modifying&&modifyData(t),reportErrs((()=>function addErrs(t,r){const{gen:a}=t;a.if(i._`Array.isArray(${r})`,(()=>{a.assign(o.default.vErrors,i._`${o.default.vErrors} === null ? ${r} : ${o.default.vErrors}.concat(${r})`).assign(o.default.errors,i._`${o.default.vErrors}.length`),(0,l.extendErrors)(t)}),(()=>t.error()))}(t,a)))}})),t.ok(null!==(a=r.valid)&&void 0!==a?a:b)},r.validSchemaType=function validSchemaType(t,r,a=!1){return!r.length||r.some((r=>"array"===r?Array.isArray(t):"object"===r?t&&"object"==typeof t&&!Array.isArray(t):typeof t==r||a&&void 0===t))},r.validateKeywordUsage=function validateKeywordUsage({schema:t,opts:r,self:a,errSchemaPath:i},o,c){if(Array.isArray(o.keyword)?!o.keyword.includes(c):o.keyword!==c)throw new Error("ajv implementation error");const l=o.dependencies;if(null==l?void 0:l.some((r=>!Object.prototype.hasOwnProperty.call(t,r))))throw new Error(`parent schema must have dependencies of ${c}: ${l.join(",")}`);if(o.validateSchema){if(!o.validateSchema(t[c])){const t=`keyword "${c}" value is invalid at path "${i}": `+a.errorsText(o.validateSchema.errors);if("log"!==r.validateSchema)throw new Error(t);a.logger.error(t)}}}},13099:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.extendSubschemaMode=r.extendSubschemaData=r.getSubschema=void 0;const i=a(93487),o=a(76776);r.getSubschema=function getSubschema(t,{keyword:r,schemaProp:a,schema:c,schemaPath:l,errSchemaPath:u,topSchemaRef:d}){if(void 0!==r&&void 0!==c)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==r){const c=t.schema[r];return void 0===a?{schema:c,schemaPath:i._`${t.schemaPath}${(0,i.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${r}`}:{schema:c[a],schemaPath:i._`${t.schemaPath}${(0,i.getProperty)(r)}${(0,i.getProperty)(a)}`,errSchemaPath:`${t.errSchemaPath}/${r}/${(0,o.escapeFragment)(a)}`}}if(void 0!==c){if(void 0===l||void 0===u||void 0===d)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:l,topSchemaRef:d,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')},r.extendSubschemaData=function extendSubschemaData(t,r,{dataProp:a,dataPropType:c,data:l,dataTypes:u,propertyName:d}){if(void 0!==l&&void 0!==a)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:p}=r;if(void 0!==a){const{errorPath:l,dataPathArr:u,opts:d}=r;dataContextProps(p.let("data",i._`${r.data}${(0,i.getProperty)(a)}`,!0)),t.errorPath=i.str`${l}${(0,o.getErrorPath)(a,c,d.jsPropertySyntax)}`,t.parentDataProperty=i._`${a}`,t.dataPathArr=[...u,t.parentDataProperty]}if(void 0!==l){dataContextProps(l instanceof i.Name?l:p.let("data",l,!0)),void 0!==d&&(t.propertyName=d)}function dataContextProps(a){t.data=a,t.dataLevel=r.dataLevel+1,t.dataTypes=[],r.definedProperties=new Set,t.parentData=r.data,t.dataNames=[...r.dataNames,a]}u&&(t.dataTypes=u)},r.extendSubschemaMode=function extendSubschemaMode(t,{jtdDiscriminator:r,jtdMetadata:a,compositeRule:i,createErrors:o,allErrors:c}){void 0!==i&&(t.compositeRule=i),void 0!==o&&(t.createErrors=o),void 0!==c&&(t.allErrors=c),t.jtdDiscriminator=r,t.jtdMetadata=a}},27159:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;var i=a(74815);Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var o=a(93487);Object.defineProperty(r,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const c=a(67426),l=a(6646),u=a(13141),d=a(25173),p=a(93487),h=a(32531),m=a(50453),y=a(76776),g=a(64775),defaultRegExp=(t,r)=>new RegExp(t,r);defaultRegExp.code="new RegExp";const v=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),R={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},C={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function requiredOptions(t){var r,a,i,o,c,l,u,d,p,h,m,y,g,v,b,R,C,I,w,S,O,j,D,T;const A=t.strict,P=null===(r=t.code)||void 0===r?void 0:r.optimize,E=!0===P||void 0===P?1:P||0,M=null!==(i=null===(a=t.code)||void 0===a?void 0:a.regExp)&&void 0!==i?i:defaultRegExp;return{strictSchema:null===(c=null!==(o=t.strictSchema)&&void 0!==o?o:A)||void 0===c||c,strictNumbers:null===(u=null!==(l=t.strictNumbers)&&void 0!==l?l:A)||void 0===u||u,strictTypes:null!==(p=null!==(d=t.strictTypes)&&void 0!==d?d:A)&&void 0!==p?p:"log",strictTuples:null!==(m=null!==(h=t.strictTuples)&&void 0!==h?h:A)&&void 0!==m?m:"log",strictRequired:null!==(g=null!==(y=t.strictRequired)&&void 0!==y?y:A)&&void 0!==g&&g,code:t.code?{...t.code,optimize:E,regExp:M}:{optimize:E,regExp:M},loopRequired:null!==(v=t.loopRequired)&&void 0!==v?v:200,loopEnum:null!==(b=t.loopEnum)&&void 0!==b?b:200,meta:null===(R=t.meta)||void 0===R||R,messages:null===(C=t.messages)||void 0===C||C,inlineRefs:null===(I=t.inlineRefs)||void 0===I||I,schemaId:null!==(w=t.schemaId)&&void 0!==w?w:"$id",addUsedSchema:null===(S=t.addUsedSchema)||void 0===S||S,validateSchema:null===(O=t.validateSchema)||void 0===O||O,validateFormats:null===(j=t.validateFormats)||void 0===j||j,unicodeRegExp:null===(D=t.unicodeRegExp)||void 0===D||D,int32range:null===(T=t.int32range)||void 0===T||T}}class Ajv{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...requiredOptions(t)};const{es5:r,lines:a}=this.opts.code;this.scope=new p.ValueScope({scope:{},prefixes:b,es5:r,lines:a}),this.logger=function getLogger(t){if(!1===t)return I;if(void 0===t)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}(t.logger);const i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,u.getRules)(),checkOptions.call(this,R,t,"NOT SUPPORTED"),checkOptions.call(this,C,t,"DEPRECATED","warn"),this._metaOpts=getMetaSchemaOptions.call(this),t.formats&&addInitialFormats.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&addInitialKeywords.call(this,t.keywords),"object"==typeof t.meta&&this.addMetaSchema(t.meta),addInitialSchemas.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:r,schemaId:a}=this.opts;let i=g;"id"===a&&(i={...g},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[a],!1)}defaultMeta(){const{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta="object"==typeof t?t[r]||t:void 0}validate(t,r){let a;if("string"==typeof t){if(a=this.getSchema(t),!a)throw new Error(`no schema with key or ref "${t}"`)}else a=this.compile(t);const i=a(r);return"$async"in a||(this.errors=a.errors),i}compile(t,r){const a=this._addSchema(t,r);return a.validate||this._compileSchemaEnv(a)}compileAsync(t,r){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:a}=this.opts;return runCompileAsync.call(this,t,r);async function runCompileAsync(t,r){await loadMetaSchema.call(this,t.$schema);const a=this._addSchema(t,r);return a.validate||_compileAsync.call(this,a)}async function loadMetaSchema(t){t&&!this.getSchema(t)&&await runCompileAsync.call(this,{$ref:t},!0)}async function _compileAsync(t){try{return this._compileSchemaEnv(t)}catch(r){if(!(r instanceof l.default))throw r;return checkLoaded.call(this,r),await loadMissingSchema.call(this,r.missingSchema),_compileAsync.call(this,t)}}function checkLoaded({missingSchema:t,missingRef:r}){if(this.refs[t])throw new Error(`AnySchema ${t} is loaded but ${r} cannot be resolved`)}async function loadMissingSchema(t){const a=await _loadSchema.call(this,t);this.refs[t]||await loadMetaSchema.call(this,a.$schema),this.refs[t]||this.addSchema(a,t,r)}async function _loadSchema(t){const r=this._loading[t];if(r)return r;try{return await(this._loading[t]=a(t))}finally{delete this._loading[t]}}}addSchema(t,r,a,i=this.opts.validateSchema){if(Array.isArray(t)){for(const r of t)this.addSchema(r,void 0,a,i);return this}let o;if("object"==typeof t){const{schemaId:r}=this.opts;if(o=t[r],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${r} must be string`)}return r=(0,h.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,a,r,i,!0),this}addMetaSchema(t,r,a=this.opts.validateSchema){return this.addSchema(t,r,!0,a),this}validateSchema(t,r){if("boolean"==typeof t)return!0;let a;if(a=t.$schema,void 0!==a&&"string"!=typeof a)throw new Error("$schema must be a string");if(a=a||this.opts.defaultMeta||this.defaultMeta(),!a)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const i=this.validate(a,t);if(!i&&r){const t="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(t);this.logger.error(t)}return i}getSchema(t){let r;for(;"string"==typeof(r=getSchEnv.call(this,t));)t=r;if(void 0===r){const{schemaId:a}=this.opts,i=new d.SchemaEnv({schema:{},schemaId:a});if(r=d.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const r=getSchEnv.call(this,t);return"object"==typeof r&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{const r=t;this._cache.delete(r);let a=t[this.opts.schemaId];return a&&(a=(0,h.normalizeId)(a),delete this.schemas[a],delete this.refs[a]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const r of t)this.addKeyword(r);return this}addKeyword(t,r){let a;if("string"==typeof t)a=t,"object"==typeof r&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=a);else{if("object"!=typeof t||void 0!==r)throw new Error("invalid addKeywords parameters");if(a=(r=t).keyword,Array.isArray(a)&&!a.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(checkKeyword.call(this,a,r),!r)return(0,y.eachItem)(a,(t=>addRule.call(this,t))),this;keywordMetaschema.call(this,r);const i={...r,type:(0,m.getJSONTypes)(r.type),schemaType:(0,m.getJSONTypes)(r.schemaType)};return(0,y.eachItem)(a,0===i.type.length?t=>addRule.call(this,t,i):t=>i.type.forEach((r=>addRule.call(this,t,i,r)))),this}getKeyword(t){const r=this.RULES.all[t];return"object"==typeof r?r.definition:!!r}removeKeyword(t){const{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(const a of r.rules){const r=a.rules.findIndex((r=>r.keyword===t));r>=0&&a.rules.splice(r,1)}return this}addFormat(t,r){return"string"==typeof r&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:a="data"}={}){return t&&0!==t.length?t.map((t=>`${a}${t.instancePath} ${t.message}`)).reduce(((t,a)=>t+r+a)):"No errors"}$dataMetaSchema(t,r){const a=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const i of r){const r=i.split("/").slice(1);let o=t;for(const t of r)o=o[t];for(const t in a){const r=a[t];if("object"!=typeof r)continue;const{$data:i}=r.definition,c=o[t];i&&c&&(o[t]=schemaOrData(c))}}return t}_removeAllSchemas(t,r){for(const a in t){const i=t[a];r&&!r.test(a)||("string"==typeof i?delete t[a]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[a]))}}_addSchema(t,r,a,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let c;const{schemaId:l}=this.opts;if("object"==typeof t)c=t[l];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof t)throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(void 0!==u)return u;a=(0,h.normalizeId)(c||a);const p=h.getSchemaRefs.call(this,t,a);return u=new d.SchemaEnv({schema:t,schemaId:l,meta:r,baseId:a,localRefs:p}),this._cache.set(u.schema,u),o&&!a.startsWith("#")&&(a&&this._checkUnique(a),this.refs[a]=u),i&&this.validateSchema(t,!0),u}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):d.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const r=this.opts;this.opts=this._metaOpts;try{d.compileSchema.call(this,t)}finally{this.opts=r}}}function checkOptions(t,r,a,i="error"){for(const o in t){const c=o;c in r&&this.logger[i](`${a}: option ${o}. ${t[c]}`)}}function getSchEnv(t){return t=(0,h.normalizeId)(t),this.schemas[t]||this.refs[t]}function addInitialSchemas(){const t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(const r in t)this.addSchema(t[r],r)}function addInitialFormats(){for(const t in this.opts.formats){const r=this.opts.formats[t];r&&this.addFormat(t,r)}}function addInitialKeywords(t){if(Array.isArray(t))this.addVocabulary(t);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const r in t){const a=t[r];a.keyword||(a.keyword=r),this.addKeyword(a)}}}function getMetaSchemaOptions(){const t={...this.opts};for(const r of v)delete t[r];return t}r.default=Ajv,Ajv.ValidationError=c.default,Ajv.MissingRefError=l.default;const I={log(){},warn(){},error(){}};const w=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(t,r){const{RULES:a}=this;if((0,y.eachItem)(t,(t=>{if(a.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!w.test(t))throw new Error(`Keyword ${t} has invalid name`)})),r&&r.$data&&!("code"in r)&&!("validate"in r))throw new Error('$data keyword must have "code" or "validate" function')}function addRule(t,r,a){var i;const o=null==r?void 0:r.post;if(a&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:c}=this;let l=o?c.post:c.rules.find((({type:t})=>t===a));if(l||(l={type:a,rules:[]},c.rules.push(l)),c.keywords[t]=!0,!r)return;const u={keyword:t,definition:{...r,type:(0,m.getJSONTypes)(r.type),schemaType:(0,m.getJSONTypes)(r.schemaType)}};r.before?addBeforeRule.call(this,l,u,r.before):l.rules.push(u),c.all[t]=u,null===(i=r.implements)||void 0===i||i.forEach((t=>this.addKeyword(t)))}function addBeforeRule(t,r,a){const i=t.rules.findIndex((t=>t.keyword===a));i>=0?t.rules.splice(i,0,r):(t.rules.push(r),this.logger.warn(`rule ${a} is not defined`))}function keywordMetaschema(t){let{metaSchema:r}=t;void 0!==r&&(t.$data&&this.opts.$data&&(r=schemaOrData(r)),t.validateSchema=this.compile(r,!0))}const S={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(t){return{anyOf:[t,S]}}},43510:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(64063);i.code='require("ajv/dist/runtime/equal").default',r.default=i},74499:(t,r)=>{"use strict";function ucs2length(t){const r=t.length;let a,i=0,o=0;for(;o<r;)i++,a=t.charCodeAt(o++),a>=55296&&a<=56319&&o<r&&(a=t.charCodeAt(o),56320==(64512&a)&&o++);return i}Object.defineProperty(r,"__esModule",{value:!0}),r.default=ucs2length,ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},67426:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});class ValidationError extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}r.default=ValidationError},4783:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateAdditionalItems=void 0;const i=a(93487),o=a(76776),c={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>i.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>i._`{limit: ${t}}`},code(t){const{parentSchema:r,it:a}=t,{items:i}=r;Array.isArray(i)?validateAdditionalItems(t,i):(0,o.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas')}};function validateAdditionalItems(t,r){const{gen:a,schema:c,data:l,keyword:u,it:d}=t;d.items=!0;const p=a.const("len",i._`${l}.length`);if(!1===c)t.setParams({len:r.length}),t.pass(i._`${p} <= ${r.length}`);else if("object"==typeof c&&!(0,o.alwaysValidSchema)(d,c)){const c=a.var("valid",i._`${p} <= ${r.length}`);a.if((0,i.not)(c),(()=>function validateItems(c){a.forRange("i",r.length,p,(r=>{t.subschema({keyword:u,dataProp:r,dataPropType:o.Type.Num},c),d.allErrors||a.if((0,i.not)(c),(()=>a.break()))}))}(c))),t.ok(c)}}r.validateAdditionalItems=validateAdditionalItems,r.default=c},69351:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(10412),o=a(93487),c=a(22141),l=a(76776),u={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>o._`{additionalProperty: ${t.additionalProperty}}`},code(t){const{gen:r,schema:a,parentSchema:u,data:d,errsCount:p,it:h}=t;if(!p)throw new Error("ajv implementation error");const{allErrors:m,opts:y}=h;if(h.props=!0,"all"!==y.removeAdditional&&(0,l.alwaysValidSchema)(h,a))return;const g=(0,i.allSchemaProperties)(u.properties),v=(0,i.allSchemaProperties)(u.patternProperties);function deleteAdditional(t){r.code(o._`delete ${d}[${t}]`)}function additionalPropertyCode(i){if("all"===y.removeAdditional||y.removeAdditional&&!1===a)deleteAdditional(i);else{if(!1===a)return t.setParams({additionalProperty:i}),t.error(),void(m||r.break());if("object"==typeof a&&!(0,l.alwaysValidSchema)(h,a)){const a=r.name("valid");"failing"===y.removeAdditional?(applyAdditionalSchema(i,a,!1),r.if((0,o.not)(a),(()=>{t.reset(),deleteAdditional(i)}))):(applyAdditionalSchema(i,a),m||r.if((0,o.not)(a),(()=>r.break())))}}}function applyAdditionalSchema(r,a,i){const o={keyword:"additionalProperties",dataProp:r,dataPropType:l.Type.Str};!1===i&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(o,a)}!function checkAdditionalProperties(){r.forIn("key",d,(a=>{g.length||v.length?r.if(function isAdditional(a){let c;if(g.length>8){const t=(0,l.schemaRefOrVal)(h,u.properties,"properties");c=(0,i.isOwnProperty)(r,t,a)}else c=g.length?(0,o.or)(...g.map((t=>o._`${a} === ${t}`))):o.nil;v.length&&(c=(0,o.or)(c,...v.map((r=>o._`${(0,i.usePattern)(t,r)}.test(${a})`))));return(0,o.not)(c)}(a),(()=>additionalPropertyCode(a))):additionalPropertyCode(a)}))}(),t.ok(o._`${p} === ${c.default.errors}`)}};r.default=u},71125:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(76776),o={keyword:"allOf",schemaType:"array",code(t){const{gen:r,schema:a,it:o}=t;if(!Array.isArray(a))throw new Error("ajv implementation error");const c=r.name("valid");a.forEach(((r,a)=>{if((0,i.alwaysValidSchema)(o,r))return;const l=t.subschema({keyword:"allOf",schemaProp:a},c);t.ok(c),t.mergeEvaluated(l)}))}};r.default=o},50019:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:a(10412).validateUnion,error:{message:"must match a schema in anyOf"}};r.default=i},79864:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o=a(76776),c={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:r}})=>void 0===r?i.str`must contain at least ${t} valid item(s)`:i.str`must contain at least ${t} and no more than ${r} valid item(s)`,params:({params:{min:t,max:r}})=>void 0===r?i._`{minContains: ${t}}`:i._`{minContains: ${t}, maxContains: ${r}}`},code(t){const{gen:r,schema:a,parentSchema:c,data:l,it:u}=t;let d,p;const{minContains:h,maxContains:m}=c;u.opts.next?(d=void 0===h?1:h,p=m):d=1;const y=r.const("len",i._`${l}.length`);if(t.setParams({min:d,max:p}),void 0===p&&0===d)return void(0,o.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==p&&d>p)return(0,o.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,o.alwaysValidSchema)(u,a)){let r=i._`${y} >= ${d}`;return void 0!==p&&(r=i._`${r} && ${y} <= ${p}`),void t.pass(r)}u.items=!0;const g=r.name("valid");function validateItemsWithCount(){const t=r.name("_valid"),a=r.let("count",0);validateItems(t,(()=>r.if(t,(()=>function checkLimits(t){r.code(i._`${t}++`),void 0===p?r.if(i._`${t} >= ${d}`,(()=>r.assign(g,!0).break())):(r.if(i._`${t} > ${p}`,(()=>r.assign(g,!1).break())),1===d?r.assign(g,!0):r.if(i._`${t} >= ${d}`,(()=>r.assign(g,!0))))}(a)))))}function validateItems(a,i){r.forRange("i",0,y,(r=>{t.subschema({keyword:"contains",dataProp:r,dataPropType:o.Type.Num,compositeRule:!0},a),i()}))}void 0===p&&1===d?validateItems(g,(()=>r.if(g,(()=>r.break())))):0===d?(r.let(g,!0),void 0!==p&&r.if(i._`${l}.length > 0`,validateItemsWithCount)):(r.let(g,!1),validateItemsWithCount()),t.result(g,(()=>t.reset()))}};r.default=c},67772:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateSchemaDeps=r.validatePropertyDeps=r.error=void 0;const i=a(93487),o=a(76776),c=a(10412);r.error={message:({params:{property:t,depsCount:r,deps:a}})=>{const o=1===r?"property":"properties";return i.str`must have ${o} ${a} when property ${t} is present`},params:({params:{property:t,depsCount:r,deps:a,missingProperty:o}})=>i._`{property: ${t},
6
+ missingProperty: ${o},
7
+ depsCount: ${r},
8
+ deps: ${a}}`};const l={keyword:"dependencies",type:"object",schemaType:"object",error:r.error,code(t){const[r,a]=function splitDependencies({schema:t}){const r={},a={};for(const i in t){if("__proto__"===i)continue;(Array.isArray(t[i])?r:a)[i]=t[i]}return[r,a]}(t);validatePropertyDeps(t,r),validateSchemaDeps(t,a)}};function validatePropertyDeps(t,r=t.schema){const{gen:a,data:o,it:l}=t;if(0===Object.keys(r).length)return;const u=a.let("missing");for(const d in r){const p=r[d];if(0===p.length)continue;const h=(0,c.propertyInData)(a,o,d,l.opts.ownProperties);t.setParams({property:d,depsCount:p.length,deps:p.join(", ")}),l.allErrors?a.if(h,(()=>{for(const r of p)(0,c.checkReportMissingProp)(t,r)})):(a.if(i._`${h} && (${(0,c.checkMissingProp)(t,p,u)})`),(0,c.reportMissingProp)(t,u),a.else())}}function validateSchemaDeps(t,r=t.schema){const{gen:a,data:i,keyword:l,it:u}=t,d=a.name("valid");for(const p in r)(0,o.alwaysValidSchema)(u,r[p])||(a.if((0,c.propertyInData)(a,i,p,u.opts.ownProperties),(()=>{const r=t.subschema({keyword:l,schemaProp:p},d);t.mergeValidEvaluated(r,d)}),(()=>a.var(d,!0))),t.ok(d))}r.validatePropertyDeps=validatePropertyDeps,r.validateSchemaDeps=validateSchemaDeps,r.default=l},89434:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o=a(76776),c={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>i.str`must match "${t.ifClause}" schema`,params:({params:t})=>i._`{failingKeyword: ${t.ifClause}}`},code(t){const{gen:r,parentSchema:a,it:c}=t;void 0===a.then&&void 0===a.else&&(0,o.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const l=hasSchema(c,"then"),u=hasSchema(c,"else");if(!l&&!u)return;const d=r.let("valid",!0),p=r.name("_valid");if(function validateIf(){const r=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p);t.mergeEvaluated(r)}(),t.reset(),l&&u){const a=r.let("ifClause");t.setParams({ifClause:a}),r.if(p,validateClause("then",a),validateClause("else",a))}else l?r.if(p,validateClause("then")):r.if((0,i.not)(p),validateClause("else"));function validateClause(a,o){return()=>{const c=t.subschema({keyword:a},p);r.assign(d,p),t.mergeValidEvaluated(c,d),o?r.assign(o,i._`${a}`):t.setParams({ifClause:a})}}t.pass(d,(()=>t.error(!0)))}};function hasSchema(t,r){const a=t.schema[r];return void 0!==a&&!(0,o.alwaysValidSchema)(t,a)}r.default=c},8200:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(4783),o=a(72924),c=a(64665),l=a(1119),u=a(79864),d=a(67772),p=a(33708),h=a(69351),m=a(76239),y=a(12296),g=a(15697),v=a(50019),b=a(14200),R=a(71125),C=a(89434),I=a(66552);r.default=function getApplicator(t=!1){const r=[g.default,v.default,b.default,R.default,C.default,I.default,p.default,h.default,d.default,m.default,y.default];return t?r.push(o.default,l.default):r.push(i.default,c.default),r.push(u.default),r}},64665:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateTuple=void 0;const i=a(93487),o=a(76776),c=a(10412),l={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:r,it:a}=t;if(Array.isArray(r))return validateTuple(t,"additionalItems",r);a.items=!0,(0,o.alwaysValidSchema)(a,r)||t.ok((0,c.validateArray)(t))}};function validateTuple(t,r,a=t.schema){const{gen:c,parentSchema:l,data:u,keyword:d,it:p}=t;!function checkStrictTuple(t){const{opts:i,errSchemaPath:c}=p,l=a.length,u=l===t.minItems&&(l===t.maxItems||!1===t[r]);if(i.strictTuples&&!u){const t=`"${d}" is ${l}-tuple, but minItems or maxItems/${r} are not specified or different at path "${c}"`;(0,o.checkStrictMode)(p,t,i.strictTuples)}}(l),p.opts.unevaluated&&a.length&&!0!==p.items&&(p.items=o.mergeEvaluated.items(c,a.length,p.items));const h=c.name("valid"),m=c.const("len",i._`${u}.length`);a.forEach(((r,a)=>{(0,o.alwaysValidSchema)(p,r)||(c.if(i._`${m} > ${a}`,(()=>t.subschema({keyword:d,schemaProp:a,dataProp:a},h))),t.ok(h))}))}r.validateTuple=validateTuple,r.default=l},1119:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o=a(76776),c=a(10412),l=a(4783),u={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>i.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>i._`{limit: ${t}}`},code(t){const{schema:r,parentSchema:a,it:i}=t,{prefixItems:u}=a;i.items=!0,(0,o.alwaysValidSchema)(i,r)||(u?(0,l.validateAdditionalItems)(t,u):t.ok((0,c.validateArray)(t)))}};r.default=u},15697:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(76776),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:r,schema:a,it:o}=t;if((0,i.alwaysValidSchema)(o,a))return void t.fail();const c=r.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},c),t.failResult(c,(()=>t.reset()),(()=>t.error()))},error:{message:"must NOT be valid"}};r.default=o},14200:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o=a(76776),c={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>i._`{passingSchemas: ${t.passing}}`},code(t){const{gen:r,schema:a,parentSchema:c,it:l}=t;if(!Array.isArray(a))throw new Error("ajv implementation error");if(l.opts.discriminator&&c.discriminator)return;const u=a,d=r.let("valid",!1),p=r.let("passing",null),h=r.name("_valid");t.setParams({passing:p}),r.block((function validateOneOf(){u.forEach(((a,c)=>{let u;(0,o.alwaysValidSchema)(l,a)?r.var(h,!0):u=t.subschema({keyword:"oneOf",schemaProp:c,compositeRule:!0},h),c>0&&r.if(i._`${h} && ${d}`).assign(d,!1).assign(p,i._`[${p}, ${c}]`).else(),r.if(h,(()=>{r.assign(d,!0),r.assign(p,c),u&&t.mergeEvaluated(u,i.Name)}))}))})),t.result(d,(()=>t.reset()),(()=>t.error(!0)))}};r.default=c},12296:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(10412),o=a(93487),c=a(76776),l=a(76776),u={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:r,schema:a,data:u,parentSchema:d,it:p}=t,{opts:h}=p,m=(0,i.allSchemaProperties)(a),y=m.filter((t=>(0,c.alwaysValidSchema)(p,a[t])));if(0===m.length||y.length===m.length&&(!p.opts.unevaluated||!0===p.props))return;const g=h.strictSchema&&!h.allowMatchingProperties&&d.properties,v=r.name("valid");!0===p.props||p.props instanceof o.Name||(p.props=(0,l.evaluatedPropsToName)(r,p.props));const{props:b}=p;function checkMatchingProperties(t){for(const r in g)new RegExp(t).test(r)&&(0,c.checkStrictMode)(p,`property ${r} matches pattern ${t} (use allowMatchingProperties)`)}function validateProperties(a){r.forIn("key",u,(c=>{r.if(o._`${(0,i.usePattern)(t,a)}.test(${c})`,(()=>{const i=y.includes(a);i||t.subschema({keyword:"patternProperties",schemaProp:a,dataProp:c,dataPropType:l.Type.Str},v),p.opts.unevaluated&&!0!==b?r.assign(o._`${b}[${c}]`,!0):i||p.allErrors||r.if((0,o.not)(v),(()=>r.break()))}))}))}!function validatePatternProperties(){for(const t of m)g&&checkMatchingProperties(t),p.allErrors?validateProperties(t):(r.var(v,!0),validateProperties(t),r.if(v))}()}};r.default=u},72924:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(64665),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,i.validateTuple)(t,"items")};r.default=o},76239:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(74815),o=a(10412),c=a(76776),l=a(69351),u={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:r,schema:a,parentSchema:u,data:d,it:p}=t;"all"===p.opts.removeAdditional&&void 0===u.additionalProperties&&l.default.code(new i.KeywordCxt(p,l.default,"additionalProperties"));const h=(0,o.allSchemaProperties)(a);for(const t of h)p.definedProperties.add(t);p.opts.unevaluated&&h.length&&!0!==p.props&&(p.props=c.mergeEvaluated.props(r,(0,c.toHash)(h),p.props));const m=h.filter((t=>!(0,c.alwaysValidSchema)(p,a[t])));if(0===m.length)return;const y=r.name("valid");for(const a of m)hasDefault(a)?applyPropertySchema(a):(r.if((0,o.propertyInData)(r,d,a,p.opts.ownProperties)),applyPropertySchema(a),p.allErrors||r.else().var(y,!0),r.endIf()),t.it.definedProperties.add(a),t.ok(y);function hasDefault(t){return p.opts.useDefaults&&!p.compositeRule&&void 0!==a[t].default}function applyPropertySchema(r){t.subschema({keyword:"properties",schemaProp:r,dataProp:r},y)}}};r.default=u},33708:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o=a(76776),c={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>i._`{propertyName: ${t.propertyName}}`},code(t){const{gen:r,schema:a,data:c,it:l}=t;if((0,o.alwaysValidSchema)(l,a))return;const u=r.name("valid");r.forIn("key",c,(a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},u),r.if((0,i.not)(u),(()=>{t.error(!0),l.allErrors||r.break()}))})),t.ok(u)}};r.default=c},66552:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(76776),o={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:r,it:a}){void 0===r.if&&(0,i.checkStrictMode)(a,`"${t}" without "if" is ignored`)}};r.default=o},10412:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateUnion=r.validateArray=r.usePattern=r.callValidateCode=r.schemaProperties=r.allSchemaProperties=r.noPropertyInData=r.propertyInData=r.isOwnProperty=r.hasPropFunc=r.reportMissingProp=r.checkMissingProp=r.checkReportMissingProp=void 0;const i=a(93487),o=a(76776),c=a(22141),l=a(76776);function hasPropFunc(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:i._`Object.prototype.hasOwnProperty`})}function isOwnProperty(t,r,a){return i._`${hasPropFunc(t)}.call(${r}, ${a})`}function noPropertyInData(t,r,a,o){const c=i._`${r}${(0,i.getProperty)(a)} === undefined`;return o?(0,i.or)(c,(0,i.not)(isOwnProperty(t,r,a))):c}function allSchemaProperties(t){return t?Object.keys(t).filter((t=>"__proto__"!==t)):[]}r.checkReportMissingProp=function checkReportMissingProp(t,r){const{gen:a,data:o,it:c}=t;a.if(noPropertyInData(a,o,r,c.opts.ownProperties),(()=>{t.setParams({missingProperty:i._`${r}`},!0),t.error()}))},r.checkMissingProp=function checkMissingProp({gen:t,data:r,it:{opts:a}},o,c){return(0,i.or)(...o.map((o=>(0,i.and)(noPropertyInData(t,r,o,a.ownProperties),i._`${c} = ${o}`))))},r.reportMissingProp=function reportMissingProp(t,r){t.setParams({missingProperty:r},!0),t.error()},r.hasPropFunc=hasPropFunc,r.isOwnProperty=isOwnProperty,r.propertyInData=function propertyInData(t,r,a,o){const c=i._`${r}${(0,i.getProperty)(a)} !== undefined`;return o?i._`${c} && ${isOwnProperty(t,r,a)}`:c},r.noPropertyInData=noPropertyInData,r.allSchemaProperties=allSchemaProperties,r.schemaProperties=function schemaProperties(t,r){return allSchemaProperties(r).filter((a=>!(0,o.alwaysValidSchema)(t,r[a])))},r.callValidateCode=function callValidateCode({schemaCode:t,data:r,it:{gen:a,topSchemaRef:o,schemaPath:l,errorPath:u},it:d},p,h,m){const y=m?i._`${t}, ${r}, ${o}${l}`:r,g=[[c.default.instancePath,(0,i.strConcat)(c.default.instancePath,u)],[c.default.parentData,d.parentData],[c.default.parentDataProperty,d.parentDataProperty],[c.default.rootData,c.default.rootData]];d.opts.dynamicRef&&g.push([c.default.dynamicAnchors,c.default.dynamicAnchors]);const v=i._`${y}, ${a.object(...g)}`;return h!==i.nil?i._`${p}.call(${h}, ${v})`:i._`${p}(${v})`};const u=i._`new RegExp`;r.usePattern=function usePattern({gen:t,it:{opts:r}},a){const o=r.unicodeRegExp?"u":"",{regExp:c}=r.code,d=c(a,o);return t.scopeValue("pattern",{key:d.toString(),ref:d,code:i._`${"new RegExp"===c.code?u:(0,l.useFunc)(t,c)}(${a}, ${o})`})},r.validateArray=function validateArray(t){const{gen:r,data:a,keyword:c,it:l}=t,u=r.name("valid");if(l.allErrors){const t=r.let("valid",!0);return validateItems((()=>r.assign(t,!1))),t}return r.var(u,!0),validateItems((()=>r.break())),u;function validateItems(l){const d=r.const("len",i._`${a}.length`);r.forRange("i",0,d,(a=>{t.subschema({keyword:c,dataProp:a,dataPropType:o.Type.Num},u),r.if((0,i.not)(u),l)}))}},r.validateUnion=function validateUnion(t){const{gen:r,schema:a,keyword:c,it:l}=t;if(!Array.isArray(a))throw new Error("ajv implementation error");if(a.some((t=>(0,o.alwaysValidSchema)(l,t)))&&!l.opts.unevaluated)return;const u=r.let("valid",!1),d=r.name("_valid");r.block((()=>a.forEach(((a,o)=>{const l=t.subschema({keyword:c,schemaProp:o,compositeRule:!0},d);r.assign(u,i._`${u} || ${d}`);t.mergeValidEvaluated(l,d)||r.if((0,i.not)(u))})))),t.result(u,(()=>t.reset()),(()=>t.error(!0)))}},78386:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const a={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};r.default=a},95684:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(78386),o=a(28280),c=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",i.default,o.default];r.default=c},28280:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.callRef=r.getValidate=void 0;const i=a(6646),o=a(10412),c=a(93487),l=a(22141),u=a(25173),d=a(76776),p={keyword:"$ref",schemaType:"string",code(t){const{gen:r,schema:a,it:o}=t,{baseId:l,schemaEnv:d,validateName:p,opts:h,self:m}=o,{root:y}=d;if(("#"===a||"#/"===a)&&l===y.baseId)return function callRootRef(){if(d===y)return callRef(t,p,d,d.$async);const a=r.scopeValue("root",{ref:y});return callRef(t,c._`${a}.validate`,y,y.$async)}();const g=u.resolveRef.call(m,y,l,a);if(void 0===g)throw new i.default(l,a);return g instanceof u.SchemaEnv?function callValidate(r){const a=getValidate(t,r);callRef(t,a,r,r.$async)}(g):function inlineRefSchema(i){const o=r.scopeValue("schema",!0===h.code.source?{ref:i,code:(0,c.stringify)(i)}:{ref:i}),l=r.name("valid"),u=t.subschema({schema:i,dataTypes:[],schemaPath:c.nil,topSchemaRef:o,errSchemaPath:a},l);t.mergeEvaluated(u),t.ok(l)}(g)}};function getValidate(t,r){const{gen:a}=t;return r.validate?a.scopeValue("validate",{ref:r.validate}):c._`${a.scopeValue("wrapper",{ref:r})}.validate`}function callRef(t,r,a,i){const{gen:u,it:p}=t,{allErrors:h,schemaEnv:m,opts:y}=p,g=y.passContext?l.default.this:c.nil;function addErrorsFrom(t){const r=c._`${t}.errors`;u.assign(l.default.vErrors,c._`${l.default.vErrors} === null ? ${r} : ${l.default.vErrors}.concat(${r})`),u.assign(l.default.errors,c._`${l.default.vErrors}.length`)}function addEvaluatedFrom(t){var r;if(!p.opts.unevaluated)return;const i=null===(r=null==a?void 0:a.validate)||void 0===r?void 0:r.evaluated;if(!0!==p.props)if(i&&!i.dynamicProps)void 0!==i.props&&(p.props=d.mergeEvaluated.props(u,i.props,p.props));else{const r=u.var("props",c._`${t}.evaluated.props`);p.props=d.mergeEvaluated.props(u,r,p.props,c.Name)}if(!0!==p.items)if(i&&!i.dynamicItems)void 0!==i.items&&(p.items=d.mergeEvaluated.items(u,i.items,p.items));else{const r=u.var("items",c._`${t}.evaluated.items`);p.items=d.mergeEvaluated.items(u,r,p.items,c.Name)}}i?function callAsyncRef(){if(!m.$async)throw new Error("async schema referenced by sync schema");const a=u.let("valid");u.try((()=>{u.code(c._`await ${(0,o.callValidateCode)(t,r,g)}`),addEvaluatedFrom(r),h||u.assign(a,!0)}),(t=>{u.if(c._`!(${t} instanceof ${p.ValidationError})`,(()=>u.throw(t))),addErrorsFrom(t),h||u.assign(a,!1)})),t.ok(a)}():function callSyncRef(){t.result((0,o.callValidateCode)(t,r,g),(()=>addEvaluatedFrom(r)),(()=>addErrorsFrom(r)))}()}r.getValidate=getValidate,r.callRef=callRef,r.default=p},1240:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o=a(89306),c=a(25173),l=a(76776),u={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:r}})=>t===o.DiscrError.Tag?`tag "${r}" must be string`:`value of tag "${r}" must be in oneOf`,params:({params:{discrError:t,tag:r,tagName:a}})=>i._`{error: ${t}, tag: ${a}, tagValue: ${r}}`},code(t){const{gen:r,data:a,schema:u,parentSchema:d,it:p}=t,{oneOf:h}=d;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const m=u.propertyName;if("string"!=typeof m)throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!h)throw new Error("discriminator: requires oneOf keyword");const y=r.let("valid",!1),g=r.const("tag",i._`${a}${(0,i.getProperty)(m)}`);function applyTagSchema(a){const o=r.name("valid"),c=t.subschema({keyword:"oneOf",schemaProp:a},o);return t.mergeEvaluated(c,i.Name),o}r.if(i._`typeof ${g} == "string"`,(()=>function validateMapping(){const a=function getMapping(){var t;const r={},a=hasRequired(d);let i=!0;for(let r=0;r<h.length;r++){let o=h[r];(null==o?void 0:o.$ref)&&!(0,l.schemaHasRulesButRef)(o,p.self.RULES)&&(o=c.resolveRef.call(p.self,p.schemaEnv,p.baseId,null==o?void 0:o.$ref),o instanceof c.SchemaEnv&&(o=o.schema));const u=null===(t=null==o?void 0:o.properties)||void 0===t?void 0:t[m];if("object"!=typeof u)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${m}"`);i=i&&(a||hasRequired(o)),addMappings(u,r)}if(!i)throw new Error(`discriminator: "${m}" must be required`);return r;function hasRequired({required:t}){return Array.isArray(t)&&t.includes(m)}function addMappings(t,r){if(t.const)addMapping(t.const,r);else{if(!t.enum)throw new Error(`discriminator: "properties/${m}" must have "const" or "enum"`);for(const a of t.enum)addMapping(a,r)}}function addMapping(t,a){if("string"!=typeof t||t in r)throw new Error(`discriminator: "${m}" values must be unique strings`);r[t]=a}}();r.if(!1);for(const t in a)r.elseIf(i._`${g} === ${t}`),r.assign(y,applyTagSchema(a[t]));r.else(),t.error(!1,{discrError:o.DiscrError.Mapping,tag:g,tagName:m}),r.endIf()}()),(()=>t.error(!1,{discrError:o.DiscrError.Tag,tag:g,tagName:m}))),t.ok(y)}};r.default=u},89306:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(r.DiscrError||(r.DiscrError={}))},93924:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(95684),o=a(62649),c=a(8200),l=a(39502),u=a(66167),d=[i.default,o.default,(0,c.default)(),l.default,u.metadataVocabulary,u.contentVocabulary];r.default=d},89651:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>i.str`must match format "${t}"`,params:({schemaCode:t})=>i._`{format: ${t}}`},code(t,r){const{gen:a,data:o,$data:c,schema:l,schemaCode:u,it:d}=t,{opts:p,errSchemaPath:h,schemaEnv:m,self:y}=d;p.validateFormats&&(c?function validate$DataFormat(){const c=a.scopeValue("formats",{ref:y.formats,code:p.code.formats}),l=a.const("fDef",i._`${c}[${u}]`),d=a.let("fType"),h=a.let("format");a.if(i._`typeof ${l} == "object" && !(${l} instanceof RegExp)`,(()=>a.assign(d,i._`${l}.type || "string"`).assign(h,i._`${l}.validate`)),(()=>a.assign(d,i._`"string"`).assign(h,l))),t.fail$data((0,i.or)(function unknownFmt(){return!1===p.strictSchema?i.nil:i._`${u} && !${h}`}(),function invalidFmt(){const t=m.$async?i._`(${l}.async ? await ${h}(${o}) : ${h}(${o}))`:i._`${h}(${o})`,a=i._`(typeof ${h} == "function" ? ${t} : ${h}.test(${o}))`;return i._`${h} && ${h} !== true && ${d} === ${r} && !${a}`}()))}():function validateFormat(){const c=y.formats[l];if(!c)return void function unknownFormat(){if(!1===p.strictSchema)return void y.logger.warn(unknownMsg());throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${l}" ignored in schema at path "${h}"`}}();if(!0===c)return;const[u,d,g]=function getFormat(t){const r=t instanceof RegExp?(0,i.regexpCode)(t):p.code.formats?i._`${p.code.formats}${(0,i.getProperty)(l)}`:void 0,o=a.scopeValue("formats",{key:l,ref:t,code:r});if("object"==typeof t&&!(t instanceof RegExp))return[t.type||"string",t.validate,i._`${o}.validate`];return["string",t,o]}(c);u===r&&t.pass(function validCondition(){if("object"==typeof c&&!(c instanceof RegExp)&&c.async){if(!m.$async)throw new Error("async format in sync schema");return i._`await ${g}(${o})`}return"function"==typeof d?i._`${g}(${o})`:i._`${g}.test(${o})`}())}())}};r.default=o},39502:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=[a(89651).default];r.default=i},66167:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.contentVocabulary=r.metadataVocabulary=void 0,r.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],r.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},64693:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o=a(76776),c=a(43510),l={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>i._`{allowedValue: ${t}}`},code(t){const{gen:r,data:a,$data:l,schemaCode:u,schema:d}=t;l||d&&"object"==typeof d?t.fail$data(i._`!${(0,o.useFunc)(r,c.default)}(${a}, ${u})`):t.fail(i._`${d} !== ${a}`)}};r.default=l},30966:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o=a(76776),c=a(43510),l={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>i._`{allowedValues: ${t}}`},code(t){const{gen:r,data:a,$data:l,schema:u,schemaCode:d,it:p}=t;if(!l&&0===u.length)throw new Error("enum must have non-empty array");const h=u.length>=p.opts.loopEnum,m=(0,o.useFunc)(r,c.default);let y;if(h||l)y=r.let("valid"),t.block$data(y,(function loopEnum(){r.assign(y,!1),r.forOf("v",d,(t=>r.if(i._`${m}(${a}, ${t})`,(()=>r.assign(y,!0).break()))))}));else{if(!Array.isArray(u))throw new Error("ajv implementation error");const t=r.const("vSchema",d);y=(0,i.or)(...u.map(((r,o)=>function equalCode(t,r){const o=u[r];return"object"==typeof o&&null!==o?i._`${m}(${a}, ${t}[${r}])`:i._`${a} === ${o}`}(t,o))))}t.pass(y)}};r.default=l},62649:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(83983),o=a(90430),c=a(93229),l=a(74336),u=a(90498),d=a(33301),p=a(31687),h=a(82958),m=a(64693),y=a(30966),g=[i.default,o.default,c.default,l.default,u.default,d.default,p.default,h.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},m.default,y.default];r.default=g},31687:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:r}){const a="maxItems"===t?"more":"fewer";return i.str`must NOT have ${a} than ${r} items`},params:({schemaCode:t})=>i._`{limit: ${t}}`},code(t){const{keyword:r,data:a,schemaCode:o}=t,c="maxItems"===r?i.operators.GT:i.operators.LT;t.fail$data(i._`${a}.length ${c} ${o}`)}};r.default=o},93229:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o=a(76776),c=a(74499),l={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:r}){const a="maxLength"===t?"more":"fewer";return i.str`must NOT have ${a} than ${r} characters`},params:({schemaCode:t})=>i._`{limit: ${t}}`},code(t){const{keyword:r,data:a,schemaCode:l,it:u}=t,d="maxLength"===r?i.operators.GT:i.operators.LT,p=!1===u.opts.unicode?i._`${a}.length`:i._`${(0,o.useFunc)(t.gen,c.default)}(${a})`;t.fail$data(i._`${p} ${d} ${l}`)}};r.default=l},83983:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o=i.operators,c={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},l={message:({keyword:t,schemaCode:r})=>i.str`must be ${c[t].okStr} ${r}`,params:({keyword:t,schemaCode:r})=>i._`{comparison: ${c[t].okStr}, limit: ${r}}`},u={keyword:Object.keys(c),type:"number",schemaType:"number",$data:!0,error:l,code(t){const{keyword:r,data:a,schemaCode:o}=t;t.fail$data(i._`${a} ${c[r].fail} ${o} || isNaN(${a})`)}};r.default=u},90498:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:r}){const a="maxProperties"===t?"more":"fewer";return i.str`must NOT have ${a} than ${r} items`},params:({schemaCode:t})=>i._`{limit: ${t}}`},code(t){const{keyword:r,data:a,schemaCode:o}=t,c="maxProperties"===r?i.operators.GT:i.operators.LT;t.fail$data(i._`Object.keys(${a}).length ${c} ${o}`)}};r.default=o},90430:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(93487),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>i.str`must be multiple of ${t}`,params:({schemaCode:t})=>i._`{multipleOf: ${t}}`},code(t){const{gen:r,data:a,schemaCode:o,it:c}=t,l=c.opts.multipleOfPrecision,u=r.let("res"),d=l?i._`Math.abs(Math.round(${u}) - ${u}) > 1e-${l}`:i._`${u} !== parseInt(${u})`;t.fail$data(i._`(${o} === 0 || (${u} = ${a}/${o}, ${d}))`)}};r.default=o},74336:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(10412),o=a(93487),c={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>o.str`must match pattern "${t}"`,params:({schemaCode:t})=>o._`{pattern: ${t}}`},code(t){const{data:r,$data:a,schema:c,schemaCode:l,it:u}=t,d=u.opts.unicodeRegExp?"u":"",p=a?o._`(new RegExp(${l}, ${d}))`:(0,i.usePattern)(t,c);t.fail$data(o._`!${p}.test(${r})`)}};r.default=c},33301:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(10412),o=a(93487),c=a(76776),l={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:t}})=>o.str`must have required property '${t}'`,params:({params:{missingProperty:t}})=>o._`{missingProperty: ${t}}`},code(t){const{gen:r,schema:a,schemaCode:l,data:u,$data:d,it:p}=t,{opts:h}=p;if(!d&&0===a.length)return;const m=a.length>=h.loopRequired;if(p.allErrors?function allErrorsMode(){if(m||d)t.block$data(o.nil,loopAllRequired);else for(const r of a)(0,i.checkReportMissingProp)(t,r)}():function exitOnErrorMode(){const c=r.let("missing");if(m||d){const a=r.let("valid",!0);t.block$data(a,(()=>function loopUntilMissing(a,c){t.setParams({missingProperty:a}),r.forOf(a,l,(()=>{r.assign(c,(0,i.propertyInData)(r,u,a,h.ownProperties)),r.if((0,o.not)(c),(()=>{t.error(),r.break()}))}),o.nil)}(c,a))),t.ok(a)}else r.if((0,i.checkMissingProp)(t,a,c)),(0,i.reportMissingProp)(t,c),r.else()}(),h.strictRequired){const r=t.parentSchema.properties,{definedProperties:i}=t.it;for(const t of a)if(void 0===(null==r?void 0:r[t])&&!i.has(t)){const r=`required property "${t}" is not defined at "${p.schemaEnv.baseId+p.errSchemaPath}" (strictRequired)`;(0,c.checkStrictMode)(p,r,p.opts.strictRequired)}}function loopAllRequired(){r.forOf("prop",l,(a=>{t.setParams({missingProperty:a}),r.if((0,i.noPropertyInData)(r,u,a,h.ownProperties),(()=>t.error()))}))}}};r.default=l},82958:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(50453),o=a(93487),c=a(76776),l=a(43510),u={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:t,j:r}})=>o.str`must NOT have duplicate items (items ## ${r} and ${t} are identical)`,params:({params:{i:t,j:r}})=>o._`{i: ${t}, j: ${r}}`},code(t){const{gen:r,data:a,$data:u,schema:d,parentSchema:p,schemaCode:h,it:m}=t;if(!u&&!d)return;const y=r.let("valid"),g=p.items?(0,i.getSchemaTypes)(p.items):[];function loopN(c,l){const u=r.name("item"),d=(0,i.checkDataTypes)(g,u,m.opts.strictNumbers,i.DataType.Wrong),p=r.const("indices",o._`{}`);r.for(o._`;${c}--;`,(()=>{r.let(u,o._`${a}[${c}]`),r.if(d,o._`continue`),g.length>1&&r.if(o._`typeof ${u} == "string"`,o._`${u} += "_"`),r.if(o._`typeof ${p}[${u}] == "number"`,(()=>{r.assign(l,o._`${p}[${u}]`),t.error(),r.assign(y,!1).break()})).code(o._`${p}[${u}] = ${c}`)}))}function loopN2(i,u){const d=(0,c.useFunc)(r,l.default),p=r.name("outer");r.label(p).for(o._`;${i}--;`,(()=>r.for(o._`${u} = ${i}; ${u}--;`,(()=>r.if(o._`${d}(${a}[${i}], ${a}[${u}])`,(()=>{t.error(),r.assign(y,!1).break(p)}))))))}t.block$data(y,(function validateUniqueItems(){const i=r.let("i",o._`${a}.length`),c=r.let("j");t.setParams({i,j:c}),r.assign(y,!0),r.if(o._`${i} > 1`,(()=>(function canOptimize(){return g.length>0&&!g.some((t=>"object"===t||"array"===t))}()?loopN:loopN2)(i,c)))}),o._`${h} === false`),t.ok(y)}};r.default=u},65987:t=>{"use strict";var r={single_source_shortest_paths:function(t,a,i){var o={},c={};c[a]=0;var l,u,d,p,h,m,y,g=r.PriorityQueue.make();for(g.push(a,0);!g.empty();)for(d in u=(l=g.pop()).value,p=l.cost,h=t[u]||{})h.hasOwnProperty(d)&&(m=p+h[d],y=c[d],(void 0===c[d]||y>m)&&(c[d]=m,g.push(d,m),o[d]=u));if(void 0!==i&&void 0===c[i]){var v=["Could not find a path from ",a," to ",i,"."].join("");throw new Error(v)}return o},extract_shortest_path_from_predecessor_list:function(t,r){for(var a=[],i=r;i;)a.push(i),t[i],i=t[i];return a.reverse(),a},find_path:function(t,a,i){var o=r.single_source_shortest_paths(t,a,i);return r.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(t){var a,i=r.PriorityQueue,o={};for(a in t=t||{},i)i.hasOwnProperty(a)&&(o[a]=i[a]);return o.queue=[],o.sorter=t.sorter||i.default_sorter,o},default_sorter:function(t,r){return t.cost-r.cost},push:function(t,r){var a={value:t,cost:r};this.queue.push(a),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=r},62378:t=>{"use strict";t.exports=function encodeUtf8(t){for(var r=[],a=t.length,i=0;i<a;i++){var o=t.charCodeAt(i);if(o>=55296&&o<=56319&&a>i+1){var c=t.charCodeAt(i+1);c>=56320&&c<=57343&&(o=1024*(o-55296)+c-56320+65536,i+=1)}o<128?r.push(o):o<2048?(r.push(o>>6|192),r.push(63&o|128)):o<55296||o>=57344&&o<65536?(r.push(o>>12|224),r.push(o>>6&63|128),r.push(63&o|128)):o>=65536&&o<=1114111?(r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)):r.push(239,191,189)}return new Uint8Array(r).buffer}},56387:(t,r,a)=>{var i;!function(o){var c=Object.hasOwnProperty,l=Array.isArray?Array.isArray:function _isArray(t){return"[object Array]"===Object.prototype.toString.call(t)},u="object"==typeof process&&"function"==typeof process.nextTick,d="function"==typeof Symbol,p="object"==typeof Reflect,h="function"==typeof setImmediate?setImmediate:setTimeout,m=d?p&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(t){var r=Object.getOwnPropertyNames(t);return r.push.apply(r,Object.getOwnPropertySymbols(t)),r}:Object.keys;function init(){this._events={},this._conf&&configure.call(this,this._conf)}function configure(t){t&&(this._conf=t,t.delimiter&&(this.delimiter=t.delimiter),t.maxListeners!==o&&(this._maxListeners=t.maxListeners),t.wildcard&&(this.wildcard=t.wildcard),t.newListener&&(this._newListener=t.newListener),t.removeListener&&(this._removeListener=t.removeListener),t.verboseMemoryLeak&&(this.verboseMemoryLeak=t.verboseMemoryLeak),t.ignoreErrors&&(this.ignoreErrors=t.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function logPossibleMemoryLeak(t,r){var a="(node) warning: possible EventEmitter memory leak detected. "+t+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(a+=" Event name: "+r+"."),"undefined"!=typeof process&&process.emitWarning){var i=new Error(a);i.name="MaxListenersExceededWarning",i.emitter=this,i.count=t,process.emitWarning(i)}else console.error(a),console.trace&&console.trace()}var toArray=function(t,r,a){var i=arguments.length;switch(i){case 0:return[];case 1:return[t];case 2:return[t,r];case 3:return[t,r,a];default:for(var o=new Array(i);i--;)o[i]=arguments[i];return o}};function toObject(t,r){for(var a={},i=t.length,c=r?value.length:0,l=0;l<i;l++)a[t[l]]=l<c?r[l]:o;return a}function TargetObserver(t,r,a){var i,o;if(this._emitter=t,this._target=r,this._listeners={},this._listenersCount=0,(a.on||a.off)&&(i=a.on,o=a.off),r.addEventListener?(i=r.addEventListener,o=r.removeEventListener):r.addListener?(i=r.addListener,o=r.removeListener):r.on&&(i=r.on,o=r.off),!i&&!o)throw Error("target does not implement any known event API");if("function"!=typeof i)throw TypeError("on method must be a function");if("function"!=typeof o)throw TypeError("off method must be a function");this._on=i,this._off=o;var c=t._observers;c?c.push(this):t._observers=[this]}function resolveOptions(t,r,a,i){var l=Object.assign({},r);if(!t)return l;if("object"!=typeof t)throw TypeError("options must be an object");var u,d,p,h=Object.keys(t),m=h.length;function reject(t){throw Error('Invalid "'+u+'" option value'+(t?". Reason: "+t:""))}for(var y=0;y<m;y++){if(u=h[y],!i&&!c.call(r,u))throw Error('Unknown "'+u+'" option');(d=t[u])!==o&&(p=a[u],l[u]=p?p(d,reject):d)}return l}function constructorReducer(t,r){return"function"==typeof t&&t.hasOwnProperty("prototype")||r("value must be a constructor"),t}function makeTypeReducer(t){var r="value must be type of "+t.join("|"),a=t.length,i=t[0],o=t[1];return 1===a?function(t,a){if(typeof t===i)return t;a(r)}:2===a?function(t,a){var c=typeof t;if(c===i||c===o)return t;a(r)}:function(i,o){for(var c=typeof i,l=a;l-- >0;)if(c===t[l])return i;o(r)}}Object.assign(TargetObserver.prototype,{subscribe:function(t,r,a){var i=this,o=this._target,c=this._emitter,l=this._listeners,handler=function(){var i=toArray.apply(null,arguments),l={data:i,name:r,original:t};if(a){var u=a.call(o,l);!1!==u&&c.emit.apply(c,[l.name].concat(i))}else c.emit.apply(c,[r].concat(i))};if(l[t])throw Error("Event '"+t+"' is already listening");this._listenersCount++,c._newListener&&c._removeListener&&!i._onNewListener?(this._onNewListener=function(a){a===r&&null===l[t]&&(l[t]=handler,i._on.call(o,t,handler))},c.on("newListener",this._onNewListener),this._onRemoveListener=function(a){a===r&&!c.hasListeners(a)&&l[t]&&(l[t]=null,i._off.call(o,t,handler))},l[t]=null,c.on("removeListener",this._onRemoveListener)):(l[t]=handler,i._on.call(o,t,handler))},unsubscribe:function(t){var r,a,i,o=this,c=this._listeners,l=this._emitter,u=this._off,d=this._target;if(t&&"string"!=typeof t)throw TypeError("event must be a string");function clearRefs(){o._onNewListener&&(l.off("newListener",o._onNewListener),l.off("removeListener",o._onRemoveListener),o._onNewListener=null,o._onRemoveListener=null);var t=findTargetIndex.call(l,o);l._observers.splice(t,1)}if(t){if(!(r=c[t]))return;u.call(d,t,r),delete c[t],--this._listenersCount||clearRefs()}else{for(i=(a=m(c)).length;i-- >0;)t=a[i],u.call(d,t,c[t]);this._listeners={},this._listenersCount=0,clearRefs()}}});var y=makeTypeReducer(["function"]),g=makeTypeReducer(["object","function"]);function makeCancelablePromise(t,r,a){var i,o,c,l=0,u=new t((function(d,p,h){function cleanup(){o&&(o=null),l&&(clearTimeout(l),l=0)}a=resolveOptions(a,{timeout:0,overload:!1},{timeout:function(t,r){return("number"!=typeof(t*=1)||t<0||!Number.isFinite(t))&&r("timeout must be a positive number"),t}}),i=!a.overload&&"function"==typeof t.prototype.cancel&&"function"==typeof h;var _resolve=function(t){cleanup(),d(t)},_reject=function(t){cleanup(),p(t)};i?r(_resolve,_reject,h):(o=[function(t){_reject(t||Error("canceled"))}],r(_resolve,_reject,(function(t){if(c)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof t)throw TypeError("onCancel callback must be a function");o.push(t)})),c=!0),a.timeout>0&&(l=setTimeout((function(){var t=Error("timeout");t.code="ETIMEDOUT",l=0,u.cancel(t),p(t)}),a.timeout))}));return i||(u.cancel=function(t){if(o){for(var r=o.length,a=1;a<r;a++)o[a](t);o[0](t),o=null}}),u}function findTargetIndex(t){var r=this._observers;if(!r)return-1;for(var a=r.length,i=0;i<a;i++)if(r[i]._target===t)return i;return-1}function searchListenerTree(t,r,a,i,o){if(!a)return null;if(0===i){var c=typeof r;if("string"===c){var l,u,d=0,p=0,h=this.delimiter,y=h.length;if(-1!==(u=r.indexOf(h))){l=new Array(5);do{l[d++]=r.slice(p,u),p=u+y}while(-1!==(u=r.indexOf(h,p)));l[d++]=r.slice(p),r=l,o=d}else r=[r],o=1}else"object"===c?o=r.length:(r=[r],o=1)}var g,v,b,R,C,I,w,S=null,O=r[i],j=r[i+1];if(i===o)a._listeners&&("function"==typeof a._listeners?(t&&t.push(a._listeners),S=[a]):(t&&t.push.apply(t,a._listeners),S=[a]));else{if("*"===O){for(u=(I=m(a)).length;u-- >0;)"_listeners"!==(g=I[u])&&(w=searchListenerTree(t,r,a[g],i+1,o))&&(S?S.push.apply(S,w):S=w);return S}if("**"===O){for((C=i+1===o||i+2===o&&"*"===j)&&a._listeners&&(S=searchListenerTree(t,r,a,o,o)),u=(I=m(a)).length;u-- >0;)"_listeners"!==(g=I[u])&&("*"===g||"**"===g?(a[g]._listeners&&!C&&(w=searchListenerTree(t,r,a[g],o,o))&&(S?S.push.apply(S,w):S=w),w=searchListenerTree(t,r,a[g],i,o)):w=searchListenerTree(t,r,a[g],g===j?i+2:i,o),w&&(S?S.push.apply(S,w):S=w));return S}a[O]&&(S=searchListenerTree(t,r,a[O],i+1,o))}if((v=a["*"])&&searchListenerTree(t,r,v,i+1,o),b=a["**"])if(i<o)for(b._listeners&&searchListenerTree(t,r,b,o,o),u=(I=m(b)).length;u-- >0;)"_listeners"!==(g=I[u])&&(g===j?searchListenerTree(t,r,b[g],i+2,o):g===O?searchListenerTree(t,r,b[g],i+1,o):((R={})[g]=b[g],searchListenerTree(t,r,{"**":R},i+1,o)));else b._listeners?searchListenerTree(t,r,b,o,o):b["*"]&&b["*"]._listeners&&searchListenerTree(t,r,b["*"],o,o);return S}function growListenerTree(t,r,a){var i,o,c=0,l=0,u=this.delimiter,d=u.length;if("string"==typeof t)if(-1!==(i=t.indexOf(u))){o=new Array(5);do{o[c++]=t.slice(l,i),l=i+d}while(-1!==(i=t.indexOf(u,l)));o[c++]=t.slice(l)}else o=[t],c=1;else o=t,c=t.length;if(c>1)for(i=0;i+1<c;i++)if("**"===o[i]&&"**"===o[i+1])return;var p,h=this.listenerTree;for(i=0;i<c;i++)if(h=h[p=o[i]]||(h[p]={}),i===c-1)return h._listeners?("function"==typeof h._listeners&&(h._listeners=[h._listeners]),a?h._listeners.unshift(r):h._listeners.push(r),!h._listeners.warned&&this._maxListeners>0&&h._listeners.length>this._maxListeners&&(h._listeners.warned=!0,logPossibleMemoryLeak.call(this,h._listeners.length,p))):h._listeners=r,!0;return!0}function collectTreeEvents(t,r,a,i){for(var o,c,l,u,d=m(t),p=d.length,h=t._listeners;p-- >0;)o=t[c=d[p]],l="_listeners"===c?a:a?a.concat(c):[c],u=i||"symbol"==typeof c,h&&r.push(u?l:l.join(this.delimiter)),"object"==typeof o&&collectTreeEvents.call(this,o,r,l,u);return r}function recursivelyGarbageCollect(t){for(var r,a,i,o=m(t),c=o.length;c-- >0;)(r=t[a=o[c]])&&(i=!0,"_listeners"===a||recursivelyGarbageCollect(r)||delete t[a]);return i}function Listener(t,r,a){this.emitter=t,this.event=r,this.listener=a}function setupListener(t,r,a){if(!0===a)c=!0;else if(!1===a)i=!0;else{if(!a||"object"!=typeof a)throw TypeError("options should be an object or true");var i=a.async,c=a.promisify,l=a.nextTick,d=a.objectify}if(i||l||c){var p=r,m=r._origin||r;if(l&&!u)throw Error("process.nextTick is not supported");c===o&&(c="AsyncFunction"===r.constructor.name),r=function(){var t=arguments,r=this,a=this.event;return c?l?Promise.resolve():new Promise((function(t){h(t)})).then((function(){return r.event=a,p.apply(r,t)})):(l?process.nextTick:h)((function(){r.event=a,p.apply(r,t)}))},r._async=!0,r._origin=m}return[r,d?new Listener(this,t,r):this]}function EventEmitter(t){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,configure.call(this,t)}Listener.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},EventEmitter.EventEmitter2=EventEmitter,EventEmitter.prototype.listenTo=function(t,r,a){if("object"!=typeof t)throw TypeError("target musts be an object");var i=this;function listen(r){if("object"!=typeof r)throw TypeError("events must be an object");var o,c=a.reducers,l=findTargetIndex.call(i,t);o=-1===l?new TargetObserver(i,t,a):i._observers[l];for(var u,d=m(r),p=d.length,h="function"==typeof c,y=0;y<p;y++)u=d[y],o.subscribe(u,r[u]||u,h?c:c&&c[u])}return a=resolveOptions(a,{on:o,off:o,reducers:o},{on:y,off:y,reducers:g}),l(r)?listen(toObject(r)):listen("string"==typeof r?toObject(r.split(/\s+/)):r),this},EventEmitter.prototype.stopListeningTo=function(t,r){var a=this._observers;if(!a)return!1;var i,o=a.length,c=!1;if(t&&"object"!=typeof t)throw TypeError("target should be an object");for(;o-- >0;)i=a[o],t&&i._target!==t||(i.unsubscribe(r),c=!0);return c},EventEmitter.prototype.delimiter=".",EventEmitter.prototype.setMaxListeners=function(t){t!==o&&(this._maxListeners=t,this._conf||(this._conf={}),this._conf.maxListeners=t)},EventEmitter.prototype.getMaxListeners=function(){return this._maxListeners},EventEmitter.prototype.event="",EventEmitter.prototype.once=function(t,r,a){return this._once(t,r,!1,a)},EventEmitter.prototype.prependOnceListener=function(t,r,a){return this._once(t,r,!0,a)},EventEmitter.prototype._once=function(t,r,a,i){return this._many(t,1,r,a,i)},EventEmitter.prototype.many=function(t,r,a,i){return this._many(t,r,a,!1,i)},EventEmitter.prototype.prependMany=function(t,r,a,i){return this._many(t,r,a,!0,i)},EventEmitter.prototype._many=function(t,r,a,i,o){var c=this;if("function"!=typeof a)throw new Error("many only accepts instances of Function");function listener(){return 0==--r&&c.off(t,listener),a.apply(this,arguments)}return listener._origin=a,this._on(t,listener,i,o)},EventEmitter.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||init.call(this);var t,r,a,i,o,c,l=arguments[0],u=this.wildcard;if("newListener"===l&&!this._newListener&&!this._events.newListener)return!1;if(u&&(t=l,"newListener"!==l&&"removeListener"!==l&&"object"==typeof l)){if(a=l.length,d)for(i=0;i<a;i++)if("symbol"==typeof l[i]){c=!0;break}c||(l=l.join(this.delimiter))}var p,h=arguments.length;if(this._all&&this._all.length)for(i=0,a=(p=this._all.slice()).length;i<a;i++)switch(this.event=l,h){case 1:p[i].call(this,l);break;case 2:p[i].call(this,l,arguments[1]);break;case 3:p[i].call(this,l,arguments[1],arguments[2]);break;default:p[i].apply(this,arguments)}if(u)p=[],searchListenerTree.call(this,p,t,this.listenerTree,0,a);else{if("function"==typeof(p=this._events[l])){switch(this.event=l,h){case 1:p.call(this);break;case 2:p.call(this,arguments[1]);break;case 3:p.call(this,arguments[1],arguments[2]);break;default:for(r=new Array(h-1),o=1;o<h;o++)r[o-1]=arguments[o];p.apply(this,r)}return!0}p&&(p=p.slice())}if(p&&p.length){if(h>3)for(r=new Array(h-1),o=1;o<h;o++)r[o-1]=arguments[o];for(i=0,a=p.length;i<a;i++)switch(this.event=l,h){case 1:p[i].call(this);break;case 2:p[i].call(this,arguments[1]);break;case 3:p[i].call(this,arguments[1],arguments[2]);break;default:p[i].apply(this,r)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===l)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},EventEmitter.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||init.call(this);var t,r,a,i,o,c,l=arguments[0],u=this.wildcard;if("newListener"===l&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(u&&(t=l,"newListener"!==l&&"removeListener"!==l&&"object"==typeof l)){if(i=l.length,d)for(o=0;o<i;o++)if("symbol"==typeof l[o]){r=!0;break}r||(l=l.join(this.delimiter))}var p,h=[],m=arguments.length;if(this._all)for(o=0,i=this._all.length;o<i;o++)switch(this.event=l,m){case 1:h.push(this._all[o].call(this,l));break;case 2:h.push(this._all[o].call(this,l,arguments[1]));break;case 3:h.push(this._all[o].call(this,l,arguments[1],arguments[2]));break;default:h.push(this._all[o].apply(this,arguments))}if(u?(p=[],searchListenerTree.call(this,p,t,this.listenerTree,0)):p=this._events[l],"function"==typeof p)switch(this.event=l,m){case 1:h.push(p.call(this));break;case 2:h.push(p.call(this,arguments[1]));break;case 3:h.push(p.call(this,arguments[1],arguments[2]));break;default:for(a=new Array(m-1),c=1;c<m;c++)a[c-1]=arguments[c];h.push(p.apply(this,a))}else if(p&&p.length){if(p=p.slice(),m>3)for(a=new Array(m-1),c=1;c<m;c++)a[c-1]=arguments[c];for(o=0,i=p.length;o<i;o++)switch(this.event=l,m){case 1:h.push(p[o].call(this));break;case 2:h.push(p[o].call(this,arguments[1]));break;case 3:h.push(p[o].call(this,arguments[1],arguments[2]));break;default:h.push(p[o].apply(this,a))}}else if(!this.ignoreErrors&&!this._all&&"error"===l)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(h)},EventEmitter.prototype.on=function(t,r,a){return this._on(t,r,!1,a)},EventEmitter.prototype.prependListener=function(t,r,a){return this._on(t,r,!0,a)},EventEmitter.prototype.onAny=function(t){return this._onAny(t,!1)},EventEmitter.prototype.prependAny=function(t){return this._onAny(t,!0)},EventEmitter.prototype.addListener=EventEmitter.prototype.on,EventEmitter.prototype._onAny=function(t,r){if("function"!=typeof t)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),r?this._all.unshift(t):this._all.push(t),this},EventEmitter.prototype._on=function(t,r,a,i){if("function"==typeof t)return this._onAny(t,r),this;if("function"!=typeof r)throw new Error("on only accepts instances of Function");this._events||init.call(this);var c,l=this;return i!==o&&(r=(c=setupListener.call(this,t,r,i))[0],l=c[1]),this._newListener&&this.emit("newListener",t,r),this.wildcard?(growListenerTree.call(this,t,r,a),l):(this._events[t]?("function"==typeof this._events[t]&&(this._events[t]=[this._events[t]]),a?this._events[t].unshift(r):this._events[t].push(r),!this._events[t].warned&&this._maxListeners>0&&this._events[t].length>this._maxListeners&&(this._events[t].warned=!0,logPossibleMemoryLeak.call(this,this._events[t].length,t))):this._events[t]=r,l)},EventEmitter.prototype.off=function(t,r){if("function"!=typeof r)throw new Error("removeListener only takes instances of Function");var a,i=[];if(this.wildcard){var o="string"==typeof t?t.split(this.delimiter):t.slice();if(!(i=searchListenerTree.call(this,null,o,this.listenerTree,0)))return this}else{if(!this._events[t])return this;a=this._events[t],i.push({_listeners:a})}for(var c=0;c<i.length;c++){var u=i[c];if(a=u._listeners,l(a)){for(var d=-1,p=0,h=a.length;p<h;p++)if(a[p]===r||a[p].listener&&a[p].listener===r||a[p]._origin&&a[p]._origin===r){d=p;break}if(d<0)continue;return this.wildcard?u._listeners.splice(d,1):this._events[t].splice(d,1),0===a.length&&(this.wildcard?delete u._listeners:delete this._events[t]),this._removeListener&&this.emit("removeListener",t,r),this}(a===r||a.listener&&a.listener===r||a._origin&&a._origin===r)&&(this.wildcard?delete u._listeners:delete this._events[t],this._removeListener&&this.emit("removeListener",t,r))}return this.listenerTree&&recursivelyGarbageCollect(this.listenerTree),this},EventEmitter.prototype.offAny=function(t){var r,a=0,i=0;if(t&&this._all&&this._all.length>0){for(a=0,i=(r=this._all).length;a<i;a++)if(t===r[a])return r.splice(a,1),this._removeListener&&this.emit("removeListenerAny",t),this}else{if(r=this._all,this._removeListener)for(a=0,i=r.length;a<i;a++)this.emit("removeListenerAny",r[a]);this._all=[]}return this},EventEmitter.prototype.removeListener=EventEmitter.prototype.off,EventEmitter.prototype.removeAllListeners=function(t){if(t===o)return!this._events||init.call(this),this;if(this.wildcard){var r,a=searchListenerTree.call(this,null,t,this.listenerTree,0);if(!a)return this;for(r=0;r<a.length;r++)a[r]._listeners=null;this.listenerTree&&recursivelyGarbageCollect(this.listenerTree)}else this._events&&(this._events[t]=null);return this},EventEmitter.prototype.listeners=function(t){var r,a,i,c,l,u=this._events;if(t===o){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!u)return[];for(c=(r=m(u)).length,i=[];c-- >0;)"function"==typeof(a=u[r[c]])?i.push(a):i.push.apply(i,a);return i}if(this.wildcard){if(!(l=this.listenerTree))return[];var d=[],p="string"==typeof t?t.split(this.delimiter):t.slice();return searchListenerTree.call(this,d,p,l,0),d}return u&&(a=u[t])?"function"==typeof a?[a]:a:[]},EventEmitter.prototype.eventNames=function(t){var r=this._events;return this.wildcard?collectTreeEvents.call(this,this.listenerTree,[],null,t):r?m(r):[]},EventEmitter.prototype.listenerCount=function(t){return this.listeners(t).length},EventEmitter.prototype.hasListeners=function(t){if(this.wildcard){var r=[],a="string"==typeof t?t.split(this.delimiter):t.slice();return searchListenerTree.call(this,r,a,this.listenerTree,0),r.length>0}var i=this._events,c=this._all;return!!(c&&c.length||i&&(t===o?m(i).length:i[t]))},EventEmitter.prototype.listenersAny=function(){return this._all?this._all:[]},EventEmitter.prototype.waitFor=function(t,r){var a=this,i=typeof r;return"number"===i?r={timeout:r}:"function"===i&&(r={filter:r}),makeCancelablePromise((r=resolveOptions(r,{timeout:0,filter:o,handleError:!1,Promise,overload:!1},{filter:y,Promise:constructorReducer})).Promise,(function(i,o,c){function listener(){var c=r.filter;if(!c||c.apply(a,arguments))if(a.off(t,listener),r.handleError){var l=arguments[0];l?o(l):i(toArray.apply(null,arguments).slice(1))}else i(toArray.apply(null,arguments))}c((function(){a.off(t,listener)})),a._on(t,listener,!1)}),{timeout:r.timeout,overload:r.overload})};var v=EventEmitter.prototype;Object.defineProperties(EventEmitter,{defaultMaxListeners:{get:function(){return v._maxListeners},set:function(t){if("number"!=typeof t||t<0||Number.isNaN(t))throw TypeError("n must be a non-negative number");v._maxListeners=t},enumerable:!0},once:{value:function once(t,r,a){return makeCancelablePromise((a=resolveOptions(a,{Promise,timeout:0,overload:!1},{Promise:constructorReducer})).Promise,(function(a,i,o){var c;if("function"==typeof t.addEventListener)return c=function(){a(toArray.apply(null,arguments))},o((function(){t.removeEventListener(r,c)})),void t.addEventListener(r,c,{once:!0});var l,eventListener=function(){l&&t.removeListener("error",l),a(toArray.apply(null,arguments))};"error"!==r&&(l=function(a){t.removeListener(r,eventListener),i(a)},t.once("error",l)),o((function(){l&&t.removeListener("error",l),t.removeListener(r,eventListener)})),t.once(r,eventListener)}),{timeout:a.timeout,overload:a.overload})},writable:!0,configurable:!0}}),Object.defineProperties(v,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),(i=function(){return EventEmitter}.call(r,a,r,t))===o||(t.exports=i)}()},64063:t=>{"use strict";t.exports=function equal(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var a,i,o;if(Array.isArray(t)){if((a=t.length)!=r.length)return!1;for(i=a;0!=i--;)if(!equal(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((a=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=a;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=a;0!=i--;){var c=o[i];if(!equal(t[c],r[c]))return!1}return!0}return t!=t&&r!=r}},21817:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(90248),o=a(17164),c=a(92901);r.AbstractValidator=class AbstractValidator{constructor(){this.rules=[]}validateIf(t){const r=this.registerRule(new c.ValidationRule(t));return new i.CommonValidatorBuilderImpl(r)}validateIfAny(t){const r=this.registerRule(new c.ValidationRule(t));return new i.TypeValidatorBuilderImpl(r)}validateIfNumber(t){const r=this.registerRule(new c.ValidationRule(t));return new i.NumberValidatorBuilderImpl(r)}validateIfDate(t){const r=this.registerRule(new c.ValidationRule(t));return new i.DateValidatorBuilderImpl(r)}validateIfString(t){const r=this.registerRule(new c.ValidationRule(t));return new i.StringValidatorBuilderImpl(r)}validateIfEach(t){const r=this.registerRule(new c.CollectionValidationRule(t));return new i.CommonValidatorBuilderImpl(r)}validateIfEachAny(t){const r=this.registerRule(new c.CollectionValidationRule(t));return new i.TypeValidatorBuilderImpl(r)}validateIfEachNumber(t){const r=this.registerRule(new c.CollectionValidationRule(t));return new i.NumberValidatorBuilderImpl(r)}validateIfEachDate(t){const r=this.registerRule(new c.CollectionValidationRule(t));return new i.DateValidatorBuilderImpl(r)}validateIfEachString(t){const r=this.registerRule(new c.CollectionValidationRule(t));return new i.StringValidatorBuilderImpl(r)}validateIfIterable(t){const r=this.registerRule(new c.ValidationRule(t));return new i.SizedIterableValidatorBuilderImpl(r)}registerRule(t){return this.rules.push(t),t}validate(t){const r=new o.ValidationResult;return this.rules.forEach((a=>{const i=a.apply(t);i.isFailure()&&r.addFailures(i.getValidationFailures())})),r}validateAsync(t){return new Promise((r=>{const a=this.createPromiseForEachRule(t,this.rules);Promise.all(a).then((t=>{r(this.buildValidationResultFrom(t))}))}))}createPromiseForEachRule(t,r){const a=[];return r.forEach((r=>{a.push(this.applyRuleAsync(r,t))})),a}applyRuleAsync(t,r){return new Promise((a=>{a(t.apply(r))}))}buildValidationResultFrom(t){const r=new o.ValidationResult;return t.forEach((t=>{t.isFailure()&&r.addFailures(t.getValidationFailures())})),r}}},59063:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(92901),o=a(59205);r.CommonValidatorBuilderImpl=class CommonValidatorBuilderImpl{constructor(t){this.validationRule=t}withFailureCode(t){return this.validationRule.setErrorCode(t),this}withFailureMessage(t){return this.validationRule.setErrorMessage(t),this}withSeverity(t){return this.validationRule.setSeverity(t),this}withPropertyName(t){return this.validationRule.setPropertyName(t),this}whenDefined(){return this.validationRule.addCondition(new i.WhenDefinedCondition(this.validationRule.lambdaExpression)),this}whenNotNull(){return this.validationRule.addCondition(new i.WhenNotNullCondition(this.validationRule.lambdaExpression)),this}when(t){return this.validationRule.addCondition(new i.WhenCondition(t)),this}unless(t){return this.validationRule.addCondition(new i.UnlessCondition(t)),this}onFailure(t){return this.validationRule.onFailure(t),this}fulfills(t){return"object"==typeof t?this.validationRule.addValidator({isValid:function(r){return t.validate(r).isValid()}}):this.validationRule.addValidator({isValid:function(r){return t(r)}}),this}isDefined(){return this.validationRule.addValidator(new o.IsDefinedValidator),this}isUndefined(){return this.validationRule.addValidator(new o.IsUndefinedValidator),this}isNull(){return this.validationRule.addValidator(new o.IsNullValidator),this}isNotNull(){return this.validationRule.addValidator(new o.IsNotNullValidator),this}isEmpty(){return this.validationRule.addValidator(new o.IsEmptyValidator),this}isNotEmpty(){return this.validationRule.addValidator(new o.IsNotEmptyValidator),this}isEqualTo(t){return this.validationRule.addValidator(new o.IsEqualValidator(t)),this}isNotEqualTo(t){return this.validationRule.addValidator(new o.IsNotEqualValidator(t)),this}isIn(t){return this.validationRule.addValidator(new o.IsInValidator(t)),this}isNotIn(t){return this.validationRule.addValidator(new o.IsNotInValidator(t)),this}}},80317:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(90248),o=a(16931);class DateValidatorBuilderImpl extends i.CommonValidatorBuilderImpl{constructor(t){super(t)}buildRuleWith(t){return this.validationRule.addValidator(t),this}isBefore(t){return this.buildRuleWith(new o.IsBeforeValidator(t))}isSameAs(t){return this.buildRuleWith(new o.IsSameAsValidator(t))}isAfter(t){return this.buildRuleWith(new o.IsAfterValidator(t))}isSameOrBefore(t){return this.buildRuleWith(new o.IsSameOrBeforeValidator(t))}isSameOrAfter(t){return this.buildRuleWith(new o.IsSameOrAfterValidator(t))}isBetween(t,r,a="(",i=")"){return this.buildRuleWith(new o.IsBetweenValidator(t,r,a,i))}}r.DateValidatorBuilderImpl=DateValidatorBuilderImpl},68956:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(90248),o=a(25559);class NumberValidatorBuilderImpl extends i.CommonValidatorBuilderImpl{constructor(t){super(t)}buildRuleWith(t){return this.validationRule.addValidator(t),this}isPositive(){return this.buildRuleWith(new o.IsPositiveValidator)}isNegative(){return this.buildRuleWith(new o.IsNegativeValidator)}isGreaterThan(t){return this.buildRuleWith(new o.IsGreaterThanValidator(t))}isGreaterThanOrEqual(t){return this.buildRuleWith(new o.IsGreaterThanOrEqualToValidator(t))}isLessThan(t){return this.buildRuleWith(new o.IsLessThanValidator(t))}isLessThanOrEqual(t){return this.buildRuleWith(new o.IsLessThanOrEqualToValidator(t))}}r.NumberValidatorBuilderImpl=NumberValidatorBuilderImpl},99260:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(84218),o=a(59063),c=a(47907);class SizedIterableValidatorBuilderImpl extends o.CommonValidatorBuilderImpl{constructor(t){super(t)}whenNotEmpty(){return this.validationRule.addCondition(new c.WhenNotEmptyCondition(this.validationRule.lambdaExpression)),this}contains(t){return this.validationRule.addValidator(new i.ContainsElementValidator(t)),this}doesNotContain(t){return this.validationRule.addValidator(new i.DoesNotContainElementValidator(t)),this}isEmpty(){return this.validationRule.addValidator(new i.IsEmptyValidator),this}isNotEmpty(){return this.validationRule.addValidator(new i.IsNotEmptyValidator),this}hasNumberOfElements(t){return this.validationRule.addValidator(new i.HasNumberOfElementsValidator(t)),this}hasMinNumberOfElements(t){return this.validationRule.addValidator(new i.HasMinNumberOfElementsValidator(t)),this}hasMaxNumberOfElements(t){return this.validationRule.addValidator(new i.HasMaxNumberOfElementsValidator(t)),this}hasNumberOfElementsBetween(t,r){return this.validationRule.addValidator(new i.HasMinMaxNumberOfElementsValidator(t,r)),this}}r.SizedIterableValidatorBuilderImpl=SizedIterableValidatorBuilderImpl},23950:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(90248),o=a(92901),c=a(9246),l=a(46054);class StringValidatorBuilderImpl extends i.CommonValidatorBuilderImpl{constructor(t){super(t)}buildRuleWith(t){return this.validationRule.addValidator(t),this}whenNotEmpty(){return this.validationRule.addCondition(new o.WhenNotEmptyCondition(this.validationRule.lambdaExpression)),this}isBooleanString(){return this.buildRuleWith(new c.IsBooleanStringValidator)}isNumericString(){return this.buildRuleWith(new c.IsNumericStringValidator)}isAlpha(t){return this.buildRuleWith(new c.IsAlphaValidator(t))}isAlphanumeric(t){return this.buildRuleWith(new c.IsAlphanumericValidator(t))}contains(t){return this.buildRuleWith(new c.ContainsValidator(t))}isAscii(){return this.buildRuleWith(new c.IsAsciiValidator)}isBase64(){return this.buildRuleWith(new c.IsBase64Validator)}isCurrency(t){return this.buildRuleWith(new c.IsCurrencyValidator(t))}isDecimalString(){return this.buildRuleWith(new c.IsDecimalStringValidator)}isEmail(t){return this.buildRuleWith(new c.IsEmailValidator(t))}isFqdn(t){return this.buildRuleWith(new c.IsFqdnValidator(t))}isHexadecimal(){return this.buildRuleWith(new c.IsHexadecimalValidator)}isIso8601(){return this.buildRuleWith(new c.IsIso8601Validator)}isJson(){return this.buildRuleWith(new c.IsJsonValidator)}isPostalCode(t){return this.buildRuleWith(new c.IsPostalCodeValidator(t))}hasLength(t){return this.buildRuleWith(new c.HasLengthValidator({min:t,max:t}))}hasLengthBetween(t,r){return this.buildRuleWith(new c.HasLengthValidator({min:t,max:r}))}hasMinLength(t){return this.buildRuleWith(new c.HasLengthValidator({min:t}))}hasMaxLength(t){return this.buildRuleWith(new c.HasLengthValidator({max:t}))}isLatLong(){return this.buildRuleWith(new l.IsLatLongValidator)}isLowercase(){return this.buildRuleWith(new c.IsLowercaseValidator)}isMobilePhoneNo(t){return this.buildRuleWith(new c.IsMobilePhoneValidator(t))}isUppercase(){return this.buildRuleWith(new c.IsUppercaseValidator)}isUrl(t){return this.buildRuleWith(new c.IsUrlValidator(t))}isUuid(t){return this.buildRuleWith(new c.IsUuidValidator(t))}matches(t,r){return this.buildRuleWith(new c.RegExValidator(t,r))}}r.StringValidatorBuilderImpl=StringValidatorBuilderImpl},66982:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(90248),o=a(23514);class TypeValidatorBuilderImpl extends i.CommonValidatorBuilderImpl{constructor(t){super(t)}isArray(){return this.validationRule.addValidator(new o.IsArrayValidator),new i.CommonValidatorBuilderImpl(this.validationRule)}isBoolean(){return this.validationRule.addValidator(new o.IsBooleanValidator),new i.CommonValidatorBuilderImpl(this.validationRule)}isDate(){return this.validationRule.addValidator(new o.IsDateValidator),new i.DateValidatorBuilderImpl(this.validationRule)}isNumber(){return this.validationRule.addValidator(new o.IsNumberValidator),new i.NumberValidatorBuilderImpl(this.validationRule)}isString(){return this.validationRule.addValidator(new o.IsStringValidator),new i.StringValidatorBuilderImpl(this.validationRule)}}r.TypeValidatorBuilderImpl=TypeValidatorBuilderImpl},90248:(t,r,a)=>{"use strict";function __export(t){for(var a in t)r.hasOwnProperty(a)||(r[a]=t[a])}Object.defineProperty(r,"__esModule",{value:!0}),__export(a(99260)),__export(a(59063)),__export(a(80317)),__export(a(68956)),__export(a(23950)),__export(a(66982))},63586:(t,r,a)=>{"use strict";function __export(t){for(var a in t)r.hasOwnProperty(a)||(r[a]=t[a])}Object.defineProperty(r,"__esModule",{value:!0}),__export(a(17164)),__export(a(21817))},61593:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.hasLength=function hasLength(t){return null!=t&&void 0!==t.length}},46975:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.hasSize=function hasSize(t){return null!=t&&void 0!==t.size}},57280:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isIterable=function isIterable(t){return!!t&&void 0!==t[Symbol.iterator]}},46089:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isIterableEmtpy=function isIterableEmtpy(t){if(t)for(let r of t)return!1;return!0}},25707:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),function(t){t[t.ERROR=0]="ERROR",t[t.WARNING=1]="WARNING",t[t.INFO=2]="INFO"}(r.Severity||(r.Severity={}))},67164:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(25707);r.ValidationFailure=class ValidationFailure{constructor(t,r,a,o,c,l=i.Severity.ERROR){this.target=t,this.propertyName=r,this.attemptedValue=a,this.code=o,this.message=c,this.severity=i.Severity[l]}}},39301:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.ValidationResult=class ValidationResult{constructor(){this.failures=[]}isValid(){return 0===this.failures.length}isInvalid(){return!this.isValid()}addFailures(t){t&&(this.failures=this.failures.concat(t))}getFailures(){return this.failures.slice(0)}getFailureMessages(){return this.failures.filter((t=>t.message)).map((t=>t.message))}getFailureCodes(){return this.failures.filter((t=>t.code)).map((t=>t.code))}}},17164:(t,r,a)=>{"use strict";function __export(t){for(var a in t)r.hasOwnProperty(a)||(r[a]=t[a])}Object.defineProperty(r,"__esModule",{value:!0}),__export(a(25707)),__export(a(39301)),__export(a(67164)),__export(a(61593)),__export(a(46975)),__export(a(57280)),__export(a(46089))},26413:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(92901),o=a(41673);class CollectionValidationRule extends i.ValidationRule{apply(t){const r=new o.RuleApplicationOutcome,a=this.lambdaExpressionResultWith(t);if(this.isNoValidationRequired(t)||null==a)return r;for(let i of a)this.processElementValidation(t,i,r);return r}processElementValidation(t,r,a){if(this.validators.some((t=>!1===t.isValid(r)))){const i=this.createValidationFailure(t,r);this.invokeCallbackWith(i),a.addValidationFailure(i)}}}r.CollectionValidationRule=CollectionValidationRule},41673:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.RuleApplicationOutcome=class RuleApplicationOutcome{constructor(t){this.validationFailure=t,this.failures=[],t&&this.addValidationFailure(t)}isSuccess(){return 0===this.failures.length}isFailure(){return!this.isSuccess()}addValidationFailure(t){this.failures.push(t)}getValidationFailures(){return this.failures.slice(0)}}},37986:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.UnlessCondition=class UnlessCondition{constructor(t){this.expression=t}shouldDoValidation(t){return!this.expression(t)}}},77e3:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(17164),o=a(41673),c=new o.RuleApplicationOutcome;r.ValidationRule=class ValidationRule{constructor(t){this.lambdaExpression=t,this.validators=[],this.conditions=[];let r=t.toString().match("\\s+\\w+\\.(\\w+(\\.\\w+)*)");this.propertyName=r&&r.length>1?r[1]:t.toString(),this.errorMessage=`${this.propertyName} is invalid`}setPropertyName(t){this.propertyName=t}addValidator(t){this.validators.push(t)}setErrorCode(t){this.errorCode=t}setErrorMessage(t){this.errorMessage=t}setSeverity(t){this.severity=t}addCondition(t){t&&this.conditions.push(t)}onFailure(t){this.callback=t}apply(t){const r=this.lambdaExpressionResultWith(t);if(this.isValid(t,r))return c;const a=this.createValidationFailure(t,r);return this.invokeCallbackWith(a),new o.RuleApplicationOutcome(a)}lambdaExpressionResultWith(t){try{return this.lambdaExpression(t)}catch(t){return}}isValid(t,r){return this.isNoValidationRequired(t)||this.allValidatorsAreValid(r)}isNoValidationRequired(t){return!this.isValidationRequired(t)}isValidationRequired(t){return 0===this.conditions.length||this.conditions.every((r=>r.shouldDoValidation(t)))}allValidatorsAreValid(t){return this.validators.every((r=>r.isValid(t)))}createValidationFailure(t,r){return new i.ValidationFailure(t,this.propertyName,r,this.errorCode,this.errorMessage,this.severity)}invokeCallbackWith(t){this.callback&&this.callback(t)}}},63839:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.WhenCondition=class WhenCondition{constructor(t){this.expression=t}shouldDoValidation(t){return this.expression(t)}}},39106:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.WhenDefinedCondition=class WhenDefinedCondition{constructor(t){this.expression=t}shouldDoValidation(t){try{return void 0!==this.expression(t)}catch(t){return!1}}}},47907:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(17164);r.WhenNotEmptyCondition=class WhenNotEmptyCondition{constructor(t){this.expression=t}shouldDoValidation(t){const r=this.lambdaExprResultFor(t);return i.isIterable(r)?!i.isIterableEmtpy(r):!!r}lambdaExprResultFor(t){try{return this.expression(t)}catch(t){return}}}},64646:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.WhenNotNullCondition=class WhenNotNullCondition{constructor(t){this.expression=t}shouldDoValidation(t){try{return null!=this.expression(t)}catch(t){return!1}}}},92901:(t,r,a)=>{"use strict";function __export(t){for(var a in t)r.hasOwnProperty(a)||(r[a]=t[a])}Object.defineProperty(r,"__esModule",{value:!0}),__export(a(77e3)),__export(a(26413)),__export(a(41673)),__export(a(63839)),__export(a(39106)),__export(a(64646)),__export(a(47907)),__export(a(37986))},75256:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.ContainsElementValidator=class ContainsElementValidator{constructor(t){this.seed=t}isValid(t){if(t)for(let r of t)if(r===this.seed)return!0;return!1}}},98232:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.DoesNotContainElementValidator=class DoesNotContainElementValidator{constructor(t){this.nonSeed=t}isValid(t){if(t){for(let r of t)if(r===this.nonSeed)return!1;return!0}return!1}}},43033:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(61593),o=a(46975);r.HasMaxNumberOfElementsValidator=class HasMaxNumberOfElementsValidator{constructor(t){this.maxElementCount=t}isValid(t){return i.hasLength(t)?t.length<=this.maxElementCount:!!o.hasSize(t)&&t.size<=this.maxElementCount}}},93717:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(1690),o=a(43033);r.HasMinMaxNumberOfElementsValidator=class HasMinMaxNumberOfElementsValidator{constructor(t,r){this.minValidator=new i.HasMinNumberOfElementsValidator(t),this.maxValidator=new o.HasMaxNumberOfElementsValidator(r)}isValid(t){return this.minValidator.isValid(t)&&this.maxValidator.isValid(t)}}},1690:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(61593),o=a(46975);r.HasMinNumberOfElementsValidator=class HasMinNumberOfElementsValidator{constructor(t){this.minElementCount=t}isValid(t){return i.hasLength(t)?t.length>=this.minElementCount:!!o.hasSize(t)&&t.size>=this.minElementCount}}},76463:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(61593),o=a(46975);r.HasNumberOfElementsValidator=class HasNumberOfElementsValidator{constructor(t){this.numberOfElements=t}isValid(t){return i.hasLength(t)?t.length===this.numberOfElements:!!o.hasSize(t)&&t.size===this.numberOfElements}}},85465:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(61593),o=a(46975);r.IsEmptyValidator=class IsEmptyValidator{isValid(t){return i.hasLength(t)?0===t.length:!!o.hasSize(t)&&0===t.size}}},29624:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(61593),o=a(46975);r.IsNotEmptyValidator=class IsNotEmptyValidator{isValid(t){return i.hasLength(t)?t.length>0:!!o.hasSize(t)&&t.size>0}}},84218:(t,r,a)=>{"use strict";function __export(t){for(var a in t)r.hasOwnProperty(a)||(r[a]=t[a])}Object.defineProperty(r,"__esModule",{value:!0}),__export(a(75256)),__export(a(98232)),__export(a(85465)),__export(a(29624)),__export(a(76463)),__export(a(1690)),__export(a(43033)),__export(a(93717))},38443:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsDefinedValidator=class IsDefinedValidator{isValid(t){return void 0!==t}}},88203:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(17164);r.IsEmptyValidator=class IsEmptyValidator{isValid(t){return""===t||null==t||this.isEmptyCollection(t)}isEmptyCollection(t){return!!i.isIterable(t)&&i.isIterableEmtpy(t)}}},7916:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsEqualValidator=class IsEqualValidator{constructor(t){this.comparison=t}isValid(t){return this.comparison===t}}},37775:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(57280);r.IsInValidator=class IsInValidator{constructor(t){this.obj=t}isValid(t){return i.isIterable(this.obj)?this.isElementOfIterable(t):this.isValueInObject(t)}isElementOfIterable(t){for(let r of this.obj)if(r===t)return!0;return!1}isValueInObject(t){return null!=Object.keys(this.obj).find((r=>this.obj[r]===t))}}},73613:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(59205);r.IsNotEmptyValidator=class IsNotEmptyValidator{constructor(){this.isEmptyValidator=new i.IsEmptyValidator}isValid(t){return!this.isEmptyValidator.isValid(t)}}},83150:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsNotEqualValidator=class IsNotEqualValidator{constructor(t){this.comparison=t}isValid(t){return this.comparison!==t}}},91879:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(57280);r.IsNotInValidator=class IsNotInValidator{constructor(t){this.obj=t}isValid(t){return i.isIterable(this.obj)?this.isElementNotInIterable(t):this.isValueNotInObject(t)}isElementNotInIterable(t){for(let r of this.obj)if(r===t)return!1;return!0}isValueNotInObject(t){return null==Object.keys(this.obj).find((r=>this.obj[r]===t))}}},27673:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsNotNullValidator=class IsNotNullValidator{isValid(t){return null!=t}}},20832:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsNullValidator=class IsNullValidator{isValid(t){return null===t}}},37361:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsUndefinedValidator=class IsUndefinedValidator{isValid(t){return void 0===t}}},59205:(t,r,a)=>{"use strict";function __export(t){for(var a in t)r.hasOwnProperty(a)||(r[a]=t[a])}Object.defineProperty(r,"__esModule",{value:!0}),__export(a(38443)),__export(a(37361)),__export(a(20832)),__export(a(27673)),__export(a(88203)),__export(a(73613)),__export(a(7916)),__export(a(83150)),__export(a(37775)),__export(a(91879))},61773:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsAfterValidator=class IsAfterValidator{constructor(t){this.date=t}isValid(t){return!!t&&t.getTime()>this.date.getTime()}}},33664:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsBeforeValidator=class IsBeforeValidator{constructor(t){this.date=t}isValid(t){return!!t&&t.getTime()<this.date.getTime()}}},61627:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsBetweenValidator=class IsBetweenValidator{constructor(t,r,a="(",i=")"){this.lowerDate=t,this.upperDate=r,this.lowerBoundary=a,this.upperBoundary=i}isValid(t){return null!=t&&("["===this.lowerBoundary&&"]"===this.upperBoundary?this.lowerDate.getTime()<=t.getTime()&&t.getTime()<=this.upperDate.getTime():"["===this.lowerBoundary&&")"===this.upperBoundary?this.lowerDate.getTime()<=t.getTime()&&t.getTime()<this.upperDate.getTime():"("===this.lowerBoundary&&"]"===this.upperBoundary?this.lowerDate.getTime()<t.getTime()&&t.getTime()<=this.upperDate.getTime():this.lowerDate.getTime()<t.getTime()&&t.getTime()<this.upperDate.getTime())}}},98274:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsSameAsValidator=class IsSameAsValidator{constructor(t){this.date=t}isValid(t){return!!t&&t.getTime()===this.date.getTime()}}},20936:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsSameOrAfterValidator=class IsSameOrAfterValidator{constructor(t){this.date=t}isValid(t){return!!t&&t.getTime()>=this.date.getTime()}}},26899:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsSameOrBeforeValidator=class IsSameOrBeforeValidator{constructor(t){this.date=t}isValid(t){return!!t&&t.getTime()<=this.date.getTime()}}},16931:(t,r,a)=>{"use strict";function __export(t){for(var a in t)r.hasOwnProperty(a)||(r[a]=t[a])}Object.defineProperty(r,"__esModule",{value:!0}),__export(a(33664)),__export(a(61773)),__export(a(98274)),__export(a(26899)),__export(a(20936)),__export(a(61627))},12323:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsGreaterThanOrEqualToValidator=class IsGreaterThanOrEqualToValidator{constructor(t){this.threshold=t}isValid(t){return null!=t&&t>=this.threshold}}},74576:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsGreaterThanValidator=class IsGreaterThanValidator{constructor(t){this.threshold=t}isValid(t){return!!t&&t>this.threshold}}},81027:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsLessThanOrEqualToValidator=class IsLessThanOrEqualToValidator{constructor(t){this.threshold=t}isValid(t){return null!=t&&t<=this.threshold}}},97687:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsLessThanValidator=class IsLessThanValidator{constructor(t){this.threshold=t}isValid(t){return null!=t&&t<this.threshold}}},68702:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsNegativeValidator=class IsNegativeValidator{isValid(t){return!!t&&t<0}}},90993:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsPositiveValidator=class IsPositiveValidator{isValid(t){return!!t&&t>0}}},25559:(t,r,a)=>{"use strict";function __export(t){for(var a in t)r.hasOwnProperty(a)||(r[a]=t[a])}Object.defineProperty(r,"__esModule",{value:!0}),__export(a(90993)),__export(a(68702)),__export(a(74576)),__export(a(12323)),__export(a(97687)),__export(a(81027))},67088:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.ContainsValidator=class ContainsValidator{constructor(t){this.seed=t}isValid(t){return!!t&&i.contains(t,this.seed)}}},1612:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.HasLengthValidator=class HasLengthValidator{constructor(t){this.options=t}isValid(t){return null!=t&&i.isLength(t,this.options)}}},30064:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsAlphaValidator=class IsAlphaValidator{constructor(t){this.locale=t}isValid(t){return!!t&&i.isAlpha(t,this.locale)}}},73146:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsAlphanumericValidator=class IsAlphanumericValidator{constructor(t){this.locale=t}isValid(t){return!!t&&i.isAlphanumeric(t,this.locale)}}},51074:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsAsciiValidator=class IsAsciiValidator{isValid(t){return!!t&&i.isAscii(t)}}},81766:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsBase64Validator=class IsBase64Validator{isValid(t){return!!t&&i.isBase64(t)}}},84989:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsBooleanStringValidator=class IsBooleanStringValidator{isValid(t){return!!t&&i.isBoolean(t)}}},40351:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsCurrencyValidator=class IsCurrencyValidator{constructor(t){this.options=t}isValid(t){return!!t&&i.isCurrency(t,this.options)}}},41495:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsDecimalStringValidator=class IsDecimalStringValidator{isValid(t){return!!t&&i.isDecimal(t)}}},25934:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsEmailValidator=class IsEmailValidator{constructor(t){this.options=t}isValid(t){return!!t&&i.isEmail(t,this.options)}}},10307:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsFqdnValidator=class IsFqdnValidator{constructor(t){this.options=t}isValid(t){return!!t&&i.isFQDN(t,this.options)}}},50978:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsHexadecimalValidator=class IsHexadecimalValidator{isValid(t){return!!t&&i.isHexadecimal(t)}}},46336:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsIso8601Validator=class IsIso8601Validator{isValid(t){return!!t&&i.isISO8601(t)}}},87201:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsJsonValidator=class IsJsonValidator{isValid(t){return!!t&&i.isJSON(t)}}},46054:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsLatLongValidator=class IsLatLongValidator{isValid(t){return!!t&&i.isLatLong(t)}}},86515:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsLowercaseValidator=class IsLowercaseValidator{isValid(t){return null!=t&&i.isLowercase(t)}}},97150:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsMobilePhoneValidator=class IsMobilePhoneValidator{constructor(t){this.locale=t}isValid(t){return!!t&&i.isMobilePhone(t,this.locale)}}},69731:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsNumericStringValidator=class IsNumericStringValidator{isValid(t){return!!t&&i.isNumeric(t)}}},81441:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsPostalCodeValidator=class IsPostalCodeValidator{constructor(t){this.locale=t}isValid(t){return!!t&&i.isPostalCode(t,this.locale)}}},469:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsUppercaseValidator=class IsUppercaseValidator{isValid(t){return null!=t&&i.isUppercase(t)}}},40938:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsUrlValidator=class IsUrlValidator{constructor(t){this.urlOptions=t}isValid(t){return!!t&&i.isURL(t,this.urlOptions)}}},10903:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.IsUuidValidator=class IsUuidValidator{constructor(t){this.version=t}isValid(t){return!!t&&i.isUUID(t,this.version)}}},58976:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(48966);r.RegExValidator=class RegExValidator{constructor(t,r){this.pattern=t,this.modifiers=r}isValid(t){return null!=t&&i.matches(t,this.pattern,this.modifiers)}}},9246:(t,r,a)=>{"use strict";function __export(t){for(var a in t)r.hasOwnProperty(a)||(r[a]=t[a])}Object.defineProperty(r,"__esModule",{value:!0}),__export(a(67088)),__export(a(73146)),__export(a(30064)),__export(a(51074)),__export(a(81766)),__export(a(84989)),__export(a(40351)),__export(a(41495)),__export(a(25934)),__export(a(10307)),__export(a(50978)),__export(a(46336)),__export(a(87201)),__export(a(1612)),__export(a(86515)),__export(a(97150)),__export(a(69731)),__export(a(40938)),__export(a(469)),__export(a(10903)),__export(a(58976)),__export(a(81441))},37208:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsArrayValidator=class IsArrayValidator{isValid(t){return t instanceof Array}}},64290:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsBooleanValidator=class IsBooleanValidator{isValid(t){return t instanceof Boolean||"boolean"==typeof t}}},16285:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsDateValidator=class IsDateValidator{isValid(t){return t instanceof Date}}},69234:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsNumberValidator=class IsNumberValidator{isValid(t){return t instanceof Number||"number"==typeof t}}},20072:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.IsStringValidator=class IsStringValidator{isValid(t){return t instanceof String||"string"==typeof t}}},23514:(t,r,a)=>{"use strict";function __export(t){for(var a in t)r.hasOwnProperty(a)||(r[a]=t[a])}Object.defineProperty(r,"__esModule",{value:!0}),__export(a(37208)),__export(a(64290)),__export(a(16285)),__export(a(69234)),__export(a(20072))},49461:t=>{"use strict";var r=t.exports=function(t,r,a){"function"==typeof r&&(a=r,r={}),_traverse(r,"function"==typeof(a=r.cb||a)?a:a.pre||function(){},a.post||function(){},t,"",t)};function _traverse(t,a,i,o,c,l,u,d,p,h){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var m in a(o,c,l,u,d,p,h),o){var y=o[m];if(Array.isArray(y)){if(m in r.arrayKeywords)for(var g=0;g<y.length;g++)_traverse(t,a,i,y[g],c+"/"+m+"/"+g,l,c,m,o,g)}else if(m in r.propsKeywords){if(y&&"object"==typeof y)for(var v in y)_traverse(t,a,i,y[v],c+"/"+m+"/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),l,c,m,o,v)}else(m in r.keywords||t.allKeys&&!(m in r.skipKeywords))&&_traverse(t,a,i,y,c+"/"+m,l,c,m,o)}i(o,c,l,u,d,p,h)}}r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},64530:(t,r)=>{function serializer(t,r){var a=[],i=[];return null==r&&(r=function(t,r){return a[0]===r?"[Circular ~]":"[Circular ~."+i.slice(0,a.indexOf(r)).join(".")+"]"}),function(o,c){if(a.length>0){var l=a.indexOf(this);~l?a.splice(l+1):a.push(this),~l?i.splice(l,1/0,o):i.push(o),~a.indexOf(c)&&(c=r.call(this,o,c))}else a.push(c);return null==t?c:t.call(this,o,c)}}(t.exports=function stringify(t,r,a,i){return JSON.stringify(t,serializer(r,i),a)}).getSerialize=serializer},29208:t=>{var r="__lodash_hash_undefined__",a="[object Function]",i="[object GeneratorFunction]",o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,l=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,h="object"==typeof global&&global&&global.Object===Object&&global,m="object"==typeof self&&self&&self.Object===Object&&self,y=h||m||Function("return this")();var g,v=Array.prototype,b=Function.prototype,R=Object.prototype,C=y["__core-js_shared__"],I=(g=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",w=b.toString,S=R.hasOwnProperty,O=R.toString,j=RegExp("^"+w.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=y.Symbol,T=v.splice,A=getNative(y,"Map"),P=getNative(Object,"create"),E=D?D.prototype:void 0,M=E?E.toString:void 0;function Hash(t){var r=-1,a=t?t.length:0;for(this.clear();++r<a;){var i=t[r];this.set(i[0],i[1])}}function ListCache(t){var r=-1,a=t?t.length:0;for(this.clear();++r<a;){var i=t[r];this.set(i[0],i[1])}}function MapCache(t){var r=-1,a=t?t.length:0;for(this.clear();++r<a;){var i=t[r];this.set(i[0],i[1])}}function assocIndexOf(t,r){for(var a=t.length;a--;)if(eq(t[a][0],r))return a;return-1}function baseGet(t,r){r=function isKey(t,r){if($(t))return!1;var a=typeof t;if("number"==a||"symbol"==a||"boolean"==a||null==t||isSymbol(t))return!0;return c.test(t)||!o.test(t)||null!=r&&t in Object(r)}(r,t)?[r]:function castPath(t){return $(t)?t:x(t)}(r);for(var a=0,i=r.length;null!=t&&a<i;)t=t[toKey(r[a++])];return a&&a==i?t:void 0}function baseIsNative(t){if(!isObject(t)||function isMasked(t){return!!I&&I in t}(t))return!1;var r=function isFunction(t){var r=isObject(t)?O.call(t):"";return r==a||r==i}(t)||function isHostObject(t){var r=!1;if(null!=t&&"function"!=typeof t.toString)try{r=!!(t+"")}catch(t){}return r}(t)?j:p;return r.test(function toSource(t){if(null!=t){try{return w.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function getMapData(t,r){var a=t.__data__;return function isKeyable(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t}(r)?a["string"==typeof r?"string":"hash"]:a.map}function getNative(t,r){var a=function getValue(t,r){return null==t?void 0:t[r]}(t,r);return baseIsNative(a)?a:void 0}Hash.prototype.clear=function hashClear(){this.__data__=P?P(null):{}},Hash.prototype.delete=function hashDelete(t){return this.has(t)&&delete this.__data__[t]},Hash.prototype.get=function hashGet(t){var a=this.__data__;if(P){var i=a[t];return i===r?void 0:i}return S.call(a,t)?a[t]:void 0},Hash.prototype.has=function hashHas(t){var r=this.__data__;return P?void 0!==r[t]:S.call(r,t)},Hash.prototype.set=function hashSet(t,a){return this.__data__[t]=P&&void 0===a?r:a,this},ListCache.prototype.clear=function listCacheClear(){this.__data__=[]},ListCache.prototype.delete=function listCacheDelete(t){var r=this.__data__,a=assocIndexOf(r,t);return!(a<0)&&(a==r.length-1?r.pop():T.call(r,a,1),!0)},ListCache.prototype.get=function listCacheGet(t){var r=this.__data__,a=assocIndexOf(r,t);return a<0?void 0:r[a][1]},ListCache.prototype.has=function listCacheHas(t){return assocIndexOf(this.__data__,t)>-1},ListCache.prototype.set=function listCacheSet(t,r){var a=this.__data__,i=assocIndexOf(a,t);return i<0?a.push([t,r]):a[i][1]=r,this},MapCache.prototype.clear=function mapCacheClear(){this.__data__={hash:new Hash,map:new(A||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(t){return getMapData(this,t).delete(t)},MapCache.prototype.get=function mapCacheGet(t){return getMapData(this,t).get(t)},MapCache.prototype.has=function mapCacheHas(t){return getMapData(this,t).has(t)},MapCache.prototype.set=function mapCacheSet(t,r){return getMapData(this,t).set(t,r),this};var x=memoize((function(t){t=function toString(t){return null==t?"":function baseToString(t){if("string"==typeof t)return t;if(isSymbol(t))return M?M.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}(t)}(t);var r=[];return l.test(t)&&r.push(""),t.replace(u,(function(t,a,i,o){r.push(i?o.replace(d,"$1"):a||t)})),r}));function toKey(t){if("string"==typeof t||isSymbol(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}function memoize(t,r){if("function"!=typeof t||r&&"function"!=typeof r)throw new TypeError("Expected a function");var memoized=function(){var a=arguments,i=r?r.apply(this,a):a[0],o=memoized.cache;if(o.has(i))return o.get(i);var c=t.apply(this,a);return memoized.cache=o.set(i,c),c};return memoized.cache=new(memoize.Cache||MapCache),memoized}function eq(t,r){return t===r||t!=t&&r!=r}memoize.Cache=MapCache;var $=Array.isArray;function isObject(t){var r=typeof t;return!!t&&("object"==r||"function"==r)}function isSymbol(t){return"symbol"==typeof t||function isObjectLike(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==O.call(t)}t.exports=function get(t,r,a){var i=null==t?void 0:baseGet(t,r);return void 0===i?a:i}},31468:t=>{var r="__lodash_hash_undefined__",a="[object Function]",i="[object GeneratorFunction]",o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,l=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,m="object"==typeof global&&global&&global.Object===Object&&global,y="object"==typeof self&&self&&self.Object===Object&&self,g=m||y||Function("return this")();var v,b=Array.prototype,R=Function.prototype,C=Object.prototype,I=g["__core-js_shared__"],w=(v=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+v:"",S=R.toString,O=C.hasOwnProperty,j=C.toString,D=RegExp("^"+S.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=g.Symbol,A=b.splice,P=getNative(g,"Map"),E=getNative(Object,"create"),M=T?T.prototype:void 0,x=M?M.toString:void 0;function Hash(t){var r=-1,a=t?t.length:0;for(this.clear();++r<a;){var i=t[r];this.set(i[0],i[1])}}function ListCache(t){var r=-1,a=t?t.length:0;for(this.clear();++r<a;){var i=t[r];this.set(i[0],i[1])}}function MapCache(t){var r=-1,a=t?t.length:0;for(this.clear();++r<a;){var i=t[r];this.set(i[0],i[1])}}function assignValue(t,r,a){var i=t[r];O.call(t,r)&&eq(i,a)&&(void 0!==a||r in t)||(t[r]=a)}function assocIndexOf(t,r){for(var a=t.length;a--;)if(eq(t[a][0],r))return a;return-1}function baseIsNative(t){if(!isObject(t)||function isMasked(t){return!!w&&w in t}(t))return!1;var r=function isFunction(t){var r=isObject(t)?j.call(t):"";return r==a||r==i}(t)||function isHostObject(t){var r=!1;if(null!=t&&"function"!=typeof t.toString)try{r=!!(t+"")}catch(t){}return r}(t)?D:p;return r.test(function toSource(t){if(null!=t){try{return S.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function baseSet(t,r,a,i){if(!isObject(t))return t;r=function isKey(t,r){if(k(t))return!1;var a=typeof t;if("number"==a||"symbol"==a||"boolean"==a||null==t||isSymbol(t))return!0;return c.test(t)||!o.test(t)||null!=r&&t in Object(r)}(r,t)?[r]:function castPath(t){return k(t)?t:$(t)}(r);for(var l=-1,u=r.length,d=u-1,p=t;null!=p&&++l<u;){var h=toKey(r[l]),m=a;if(l!=d){var y=p[h];void 0===(m=i?i(y,h,p):void 0)&&(m=isObject(y)?y:isIndex(r[l+1])?[]:{})}assignValue(p,h,m),p=p[h]}return t}function getMapData(t,r){var a=t.__data__;return function isKeyable(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t}(r)?a["string"==typeof r?"string":"hash"]:a.map}function getNative(t,r){var a=function getValue(t,r){return null==t?void 0:t[r]}(t,r);return baseIsNative(a)?a:void 0}function isIndex(t,r){return!!(r=null==r?9007199254740991:r)&&("number"==typeof t||h.test(t))&&t>-1&&t%1==0&&t<r}Hash.prototype.clear=function hashClear(){this.__data__=E?E(null):{}},Hash.prototype.delete=function hashDelete(t){return this.has(t)&&delete this.__data__[t]},Hash.prototype.get=function hashGet(t){var a=this.__data__;if(E){var i=a[t];return i===r?void 0:i}return O.call(a,t)?a[t]:void 0},Hash.prototype.has=function hashHas(t){var r=this.__data__;return E?void 0!==r[t]:O.call(r,t)},Hash.prototype.set=function hashSet(t,a){return this.__data__[t]=E&&void 0===a?r:a,this},ListCache.prototype.clear=function listCacheClear(){this.__data__=[]},ListCache.prototype.delete=function listCacheDelete(t){var r=this.__data__,a=assocIndexOf(r,t);return!(a<0)&&(a==r.length-1?r.pop():A.call(r,a,1),!0)},ListCache.prototype.get=function listCacheGet(t){var r=this.__data__,a=assocIndexOf(r,t);return a<0?void 0:r[a][1]},ListCache.prototype.has=function listCacheHas(t){return assocIndexOf(this.__data__,t)>-1},ListCache.prototype.set=function listCacheSet(t,r){var a=this.__data__,i=assocIndexOf(a,t);return i<0?a.push([t,r]):a[i][1]=r,this},MapCache.prototype.clear=function mapCacheClear(){this.__data__={hash:new Hash,map:new(P||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(t){return getMapData(this,t).delete(t)},MapCache.prototype.get=function mapCacheGet(t){return getMapData(this,t).get(t)},MapCache.prototype.has=function mapCacheHas(t){return getMapData(this,t).has(t)},MapCache.prototype.set=function mapCacheSet(t,r){return getMapData(this,t).set(t,r),this};var $=memoize((function(t){t=function toString(t){return null==t?"":function baseToString(t){if("string"==typeof t)return t;if(isSymbol(t))return x?x.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}(t)}(t);var r=[];return l.test(t)&&r.push(""),t.replace(u,(function(t,a,i,o){r.push(i?o.replace(d,"$1"):a||t)})),r}));function toKey(t){if("string"==typeof t||isSymbol(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}function memoize(t,r){if("function"!=typeof t||r&&"function"!=typeof r)throw new TypeError("Expected a function");var memoized=function(){var a=arguments,i=r?r.apply(this,a):a[0],o=memoized.cache;if(o.has(i))return o.get(i);var c=t.apply(this,a);return memoized.cache=o.set(i,c),c};return memoized.cache=new(memoize.Cache||MapCache),memoized}function eq(t,r){return t===r||t!=t&&r!=r}memoize.Cache=MapCache;var k=Array.isArray;function isObject(t){var r=typeof t;return!!t&&("object"==r||"function"==r)}function isSymbol(t){return"symbol"==typeof t||function isObjectLike(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==j.call(t)}t.exports=function set(t,r,a){return null==t?t:baseSet(t,r,a)}},99490:(t,r)=>{"use strict";function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){return r&&_defineProperties(t.prototype,r),a&&_defineProperties(t,a),t}function _extends(){return _extends=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(t[i]=a[i])}return t},_extends.apply(this,arguments)}function _inheritsLoose(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,_setPrototypeOf(t,r)}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _setPrototypeOf(t,r){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){return t.__proto__=r,t},_setPrototypeOf(t,r)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function _construct(t,r,a){return _construct=_isNativeReflectConstruct()?Reflect.construct:function _construct(t,r,a){var i=[null];i.push.apply(i,r);var o=new(Function.bind.apply(t,i));return a&&_setPrototypeOf(o,a.prototype),o},_construct.apply(null,arguments)}function _wrapNativeSuper(t){var r="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function _wrapNativeSuper(t){if(null===t||!function _isNativeFunction(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,Wrapper)}function Wrapper(){return _construct(t,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,t)},_wrapNativeSuper(t)}function _objectWithoutPropertiesLoose(t,r){if(null==t)return{};var a,i,o={},c=Object.keys(t);for(i=0;i<c.length;i++)a=c[i],r.indexOf(a)>=0||(o[a]=t[a]);return o}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _createForOfIteratorHelperLoose(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(a)return(a=a.call(t)).next.bind(a);if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(t){function LuxonError(){return t.apply(this,arguments)||this}return _inheritsLoose(LuxonError,t),LuxonError}(_wrapNativeSuper(Error)),i=function(t){function InvalidDateTimeError(r){return t.call(this,"Invalid DateTime: "+r.toMessage())||this}return _inheritsLoose(InvalidDateTimeError,t),InvalidDateTimeError}(a),o=function(t){function InvalidIntervalError(r){return t.call(this,"Invalid Interval: "+r.toMessage())||this}return _inheritsLoose(InvalidIntervalError,t),InvalidIntervalError}(a),c=function(t){function InvalidDurationError(r){return t.call(this,"Invalid Duration: "+r.toMessage())||this}return _inheritsLoose(InvalidDurationError,t),InvalidDurationError}(a),l=function(t){function ConflictingSpecificationError(){return t.apply(this,arguments)||this}return _inheritsLoose(ConflictingSpecificationError,t),ConflictingSpecificationError}(a),u=function(t){function InvalidUnitError(r){return t.call(this,"Invalid unit "+r)||this}return _inheritsLoose(InvalidUnitError,t),InvalidUnitError}(a),d=function(t){function InvalidArgumentError(){return t.apply(this,arguments)||this}return _inheritsLoose(InvalidArgumentError,t),InvalidArgumentError}(a),p=function(t){function ZoneIsAbstractError(){return t.call(this,"Zone is an abstract class")||this}return _inheritsLoose(ZoneIsAbstractError,t),ZoneIsAbstractError}(a),h="numeric",m="short",y="long",g={year:h,month:h,day:h},v={year:h,month:m,day:h},b={year:h,month:m,day:h,weekday:m},R={year:h,month:y,day:h},C={year:h,month:y,day:h,weekday:y},I={hour:h,minute:h},w={hour:h,minute:h,second:h},S={hour:h,minute:h,second:h,timeZoneName:m},O={hour:h,minute:h,second:h,timeZoneName:y},j={hour:h,minute:h,hourCycle:"h23"},D={hour:h,minute:h,second:h,hourCycle:"h23"},T={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:m},A={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:y},P={year:h,month:h,day:h,hour:h,minute:h},E={year:h,month:h,day:h,hour:h,minute:h,second:h},M={year:h,month:m,day:h,hour:h,minute:h},x={year:h,month:m,day:h,hour:h,minute:h,second:h},$={year:h,month:m,day:h,weekday:m,hour:h,minute:h},k={year:h,month:y,day:h,hour:h,minute:h,timeZoneName:m},N={year:h,month:y,day:h,hour:h,minute:h,second:h,timeZoneName:m},q={year:h,month:y,day:h,weekday:y,hour:h,minute:h,timeZoneName:y},V={year:h,month:y,day:h,weekday:y,hour:h,minute:h,second:h,timeZoneName:y};function isUndefined(t){return void 0===t}function isNumber(t){return"number"==typeof t}function isInteger(t){return"number"==typeof t&&t%1==0}function hasRelative(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function bestBy(t,r,a){if(0!==t.length)return t.reduce((function(t,i){var o=[r(i),i];return t&&a(t[0],o[0])===t[0]?t:o}),null)[1]}function hasOwnProperty(t,r){return Object.prototype.hasOwnProperty.call(t,r)}function integerBetween(t,r,a){return isInteger(t)&&t>=r&&t<=a}function padStart(t,r){return void 0===r&&(r=2),t<0?"-"+(""+-t).padStart(r,"0"):(""+t).padStart(r,"0")}function parseInteger(t){return isUndefined(t)||null===t||""===t?void 0:parseInt(t,10)}function parseFloating(t){return isUndefined(t)||null===t||""===t?void 0:parseFloat(t)}function parseMillis(t){if(!isUndefined(t)&&null!==t&&""!==t){var r=1e3*parseFloat("0."+t);return Math.floor(r)}}function roundTo(t,r,a){void 0===a&&(a=!1);var i=Math.pow(10,r);return(a?Math.trunc:Math.round)(t*i)/i}function isLeapYear(t){return t%4==0&&(t%100!=0||t%400==0)}function daysInYear(t){return isLeapYear(t)?366:365}function daysInMonth(t,r){var a=function floorMod(t,r){return t-r*Math.floor(t/r)}(r-1,12)+1;return 2===a?isLeapYear(t+(r-a)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][a-1]}function objToLocalTS(t){var r=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(r=new Date(r)).setUTCFullYear(r.getUTCFullYear()-1900),+r}function weeksInWeekYear(t){var r=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,a=t-1,i=(a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400))%7;return 4===r||3===i?53:52}function untruncateYear(t){return t>99?t:t>60?1900+t:2e3+t}function parseZoneInfo(t,r,a,i){void 0===i&&(i=null);var o=new Date(t),c={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(c.timeZone=i);var l=_extends({timeZoneName:r},c),u=new Intl.DateTimeFormat(a,l).formatToParts(o).find((function(t){return"timezonename"===t.type.toLowerCase()}));return u?u.value:null}function signedOffset(t,r){var a=parseInt(t,10);Number.isNaN(a)&&(a=0);var i=parseInt(r,10)||0;return 60*a+(a<0||Object.is(a,-0)?-i:i)}function asNumber(t){var r=Number(t);if("boolean"==typeof t||""===t||Number.isNaN(r))throw new d("Invalid unit value "+t);return r}function normalizeObject(t,r){var a={};for(var i in t)if(hasOwnProperty(t,i)){var o=t[i];if(null==o)continue;a[r(i)]=asNumber(o)}return a}function formatOffset(t,r){var a=Math.trunc(Math.abs(t/60)),i=Math.trunc(Math.abs(t%60)),o=t>=0?"+":"-";switch(r){case"short":return""+o+padStart(a,2)+":"+padStart(i,2);case"narrow":return""+o+a+(i>0?":"+i:"");case"techie":return""+o+padStart(a,2)+padStart(i,2);default:throw new RangeError("Value format "+r+" is out of range for property format")}}function timeObject(t){return function pick(t,r){return r.reduce((function(r,a){return r[a]=t[a],r}),{})}(t,["hour","minute","second","millisecond"])}var U=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z0-9_+-]{1,256}(\/[A-Za-z0-9_+-]{1,256})?)?/,B=["January","February","March","April","May","June","July","August","September","October","November","December"],L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],G=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(t){switch(t){case"narrow":return[].concat(G);case"short":return[].concat(L);case"long":return[].concat(B);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var z=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Z=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],K=["M","T","W","T","F","S","S"];function weekdays(t){switch(t){case"narrow":return[].concat(K);case"short":return[].concat(Z);case"long":return[].concat(z);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var H=["AM","PM"],W=["Before Christ","Anno Domini"],Y=["BC","AD"],J=["B","A"];function eras(t){switch(t){case"narrow":return[].concat(J);case"short":return[].concat(Y);case"long":return[].concat(W);default:return null}}function stringifyTokens(t,r){for(var a,i="",o=_createForOfIteratorHelperLoose(t);!(a=o()).done;){var c=a.value;c.literal?i+=c.val:i+=r(c.val)}return i}var Q={D:g,DD:v,DDD:R,DDDD:C,t:I,tt:w,ttt:S,tttt:O,T:j,TT:D,TTT:T,TTTT:A,f:P,ff:M,fff:k,ffff:q,F:E,FF:x,FFF:N,FFFF:V},X=function(){function Formatter(t,r){this.opts=r,this.loc=t,this.systemLoc=null}Formatter.create=function create(t,r){return void 0===r&&(r={}),new Formatter(t,r)},Formatter.parseFormat=function parseFormat(t){for(var r=null,a="",i=!1,o=[],c=0;c<t.length;c++){var l=t.charAt(c);"'"===l?(a.length>0&&o.push({literal:i,val:a}),r=null,a="",i=!i):i||l===r?a+=l:(a.length>0&&o.push({literal:!1,val:a}),a=l,r=l)}return a.length>0&&o.push({literal:i,val:a}),o},Formatter.macroTokenToFormatOpts=function macroTokenToFormatOpts(t){return Q[t]};var t=Formatter.prototype;return t.formatWithSystemDefault=function formatWithSystemDefault(t,r){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,_extends({},this.opts,r)).format()},t.formatDateTime=function formatDateTime(t,r){return void 0===r&&(r={}),this.loc.dtFormatter(t,_extends({},this.opts,r)).format()},t.formatDateTimeParts=function formatDateTimeParts(t,r){return void 0===r&&(r={}),this.loc.dtFormatter(t,_extends({},this.opts,r)).formatToParts()},t.resolvedOptions=function resolvedOptions(t,r){return void 0===r&&(r={}),this.loc.dtFormatter(t,_extends({},this.opts,r)).resolvedOptions()},t.num=function num(t,r){if(void 0===r&&(r=0),this.opts.forceSimple)return padStart(t,r);var a=_extends({},this.opts);return r>0&&(a.padTo=r),this.loc.numberFormatter(a).format(t)},t.formatDateTimeFromString=function formatDateTimeFromString(t,r){var a=this,i="en"===this.loc.listingMode(),o=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,c=function string(r,i){return a.loc.extract(t,r,i)},l=function formatOffset(r){return t.isOffsetFixed&&0===t.offset&&r.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,r.format):""},u=function meridiem(){return i?function meridiemForDateTime(t){return H[t.hour<12?0:1]}(t):c({hour:"numeric",hourCycle:"h12"},"dayperiod")},d=function month(r,a){return i?function monthForDateTime(t,r){return months(r)[t.month-1]}(t,r):c(a?{month:r}:{month:r,day:"numeric"},"month")},p=function weekday(r,a){return i?function weekdayForDateTime(t,r){return weekdays(r)[t.weekday-1]}(t,r):c(a?{weekday:r}:{weekday:r,month:"long",day:"numeric"},"weekday")},h=function era(r){return i?function eraForDateTime(t,r){return eras(r)[t.year<0?0:1]}(t,r):c({era:r},"era")};return stringifyTokens(Formatter.parseFormat(r),(function tokenToString(r){switch(r){case"S":return a.num(t.millisecond);case"u":case"SSS":return a.num(t.millisecond,3);case"s":return a.num(t.second);case"ss":return a.num(t.second,2);case"uu":return a.num(Math.floor(t.millisecond/10),2);case"uuu":return a.num(Math.floor(t.millisecond/100));case"m":return a.num(t.minute);case"mm":return a.num(t.minute,2);case"h":return a.num(t.hour%12==0?12:t.hour%12);case"hh":return a.num(t.hour%12==0?12:t.hour%12,2);case"H":return a.num(t.hour);case"HH":return a.num(t.hour,2);case"Z":return l({format:"narrow",allowZ:a.opts.allowZ});case"ZZ":return l({format:"short",allowZ:a.opts.allowZ});case"ZZZ":return l({format:"techie",allowZ:a.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:a.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:a.loc.locale});case"z":return t.zoneName;case"a":return u();case"d":return o?c({day:"numeric"},"day"):a.num(t.day);case"dd":return o?c({day:"2-digit"},"day"):a.num(t.day,2);case"c":case"E":return a.num(t.weekday);case"ccc":return p("short",!0);case"cccc":return p("long",!0);case"ccccc":return p("narrow",!0);case"EEE":return p("short",!1);case"EEEE":return p("long",!1);case"EEEEE":return p("narrow",!1);case"L":return o?c({month:"numeric",day:"numeric"},"month"):a.num(t.month);case"LL":return o?c({month:"2-digit",day:"numeric"},"month"):a.num(t.month,2);case"LLL":return d("short",!0);case"LLLL":return d("long",!0);case"LLLLL":return d("narrow",!0);case"M":return o?c({month:"numeric"},"month"):a.num(t.month);case"MM":return o?c({month:"2-digit"},"month"):a.num(t.month,2);case"MMM":return d("short",!1);case"MMMM":return d("long",!1);case"MMMMM":return d("narrow",!1);case"y":return o?c({year:"numeric"},"year"):a.num(t.year);case"yy":return o?c({year:"2-digit"},"year"):a.num(t.year.toString().slice(-2),2);case"yyyy":return o?c({year:"numeric"},"year"):a.num(t.year,4);case"yyyyyy":return o?c({year:"numeric"},"year"):a.num(t.year,6);case"G":return h("short");case"GG":return h("long");case"GGGGG":return h("narrow");case"kk":return a.num(t.weekYear.toString().slice(-2),2);case"kkkk":return a.num(t.weekYear,4);case"W":return a.num(t.weekNumber);case"WW":return a.num(t.weekNumber,2);case"o":return a.num(t.ordinal);case"ooo":return a.num(t.ordinal,3);case"q":return a.num(t.quarter);case"qq":return a.num(t.quarter,2);case"X":return a.num(Math.floor(t.ts/1e3));case"x":return a.num(t.ts);default:return function maybeMacro(r){var i=Formatter.macroTokenToFormatOpts(r);return i?a.formatWithSystemDefault(t,i):r}(r)}}))},t.formatDurationFromString=function formatDurationFromString(t,r){var a=this,i=function tokenToField(t){switch(t[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},o=Formatter.parseFormat(r),c=o.reduce((function(t,r){var a=r.literal,i=r.val;return a?t:t.concat(i)}),[]);return stringifyTokens(o,function tokenToString(t){return function(r){var o=i(r);return o?a.num(t.get(o),r.length):r}}(t.shiftTo.apply(t,c.map(i).filter((function(t){return t})))))},Formatter}(),ee=function(){function Invalid(t,r){this.reason=t,this.explanation=r}return Invalid.prototype.toMessage=function toMessage(){return this.explanation?this.reason+": "+this.explanation:this.reason},Invalid}(),te=function(){function Zone(){}var t=Zone.prototype;return t.offsetName=function offsetName(t,r){throw new p},t.formatOffset=function formatOffset(t,r){throw new p},t.offset=function offset(t){throw new p},t.equals=function equals(t){throw new p},_createClass(Zone,[{key:"type",get:function get(){throw new p}},{key:"name",get:function get(){throw new p}},{key:"isUniversal",get:function get(){throw new p}},{key:"isValid",get:function get(){throw new p}}]),Zone}(),re=null,ne=function(t){function SystemZone(){return t.apply(this,arguments)||this}_inheritsLoose(SystemZone,t);var r=SystemZone.prototype;return r.offsetName=function offsetName(t,r){return parseZoneInfo(t,r.format,r.locale)},r.formatOffset=function formatOffset$1(t,r){return formatOffset(this.offset(t),r)},r.offset=function offset(t){return-new Date(t).getTimezoneOffset()},r.equals=function equals(t){return"system"===t.type},_createClass(SystemZone,[{key:"type",get:function get(){return"system"}},{key:"name",get:function get(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}},{key:"isUniversal",get:function get(){return!1}},{key:"isValid",get:function get(){return!0}}],[{key:"instance",get:function get(){return null===re&&(re=new SystemZone),re}}]),SystemZone}(te),ae=RegExp("^"+U.source+"$"),ie={};var oe={year:0,month:1,day:2,hour:3,minute:4,second:5};var se={},ce=function(t){function IANAZone(r){var a;return(a=t.call(this)||this).zoneName=r,a.valid=IANAZone.isValidZone(r),a}_inheritsLoose(IANAZone,t),IANAZone.create=function create(t){return se[t]||(se[t]=new IANAZone(t)),se[t]},IANAZone.resetCache=function resetCache(){se={},ie={}},IANAZone.isValidSpecifier=function isValidSpecifier(t){return!(!t||!t.match(ae))},IANAZone.isValidZone=function isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}};var r=IANAZone.prototype;return r.offsetName=function offsetName(t,r){return parseZoneInfo(t,r.format,r.locale,this.name)},r.formatOffset=function formatOffset$1(t,r){return formatOffset(this.offset(t),r)},r.offset=function offset(t){var r=new Date(t);if(isNaN(r))return NaN;var a=function makeDTF(t){return ie[t]||(ie[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),ie[t]}(this.name),i=a.formatToParts?function partsOffset(t,r){for(var a=t.formatToParts(r),i=[],o=0;o<a.length;o++){var c=a[o],l=c.type,u=c.value,d=oe[l];isUndefined(d)||(i[d]=parseInt(u,10))}return i}(a,r):function hackyOffset(t,r){var a=t.format(r).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(a),o=i[1],c=i[2];return[i[3],o,c,i[4],i[5],i[6]]}(a,r),o=i[0],c=i[1],l=i[2],u=i[3],d=+r,p=d%1e3;return(objToLocalTS({year:o,month:c,day:l,hour:24===u?0:u,minute:i[4],second:i[5],millisecond:0})-(d-=p>=0?p:1e3+p))/6e4},r.equals=function equals(t){return"iana"===t.type&&t.name===this.name},_createClass(IANAZone,[{key:"type",get:function get(){return"iana"}},{key:"name",get:function get(){return this.zoneName}},{key:"isUniversal",get:function get(){return!1}},{key:"isValid",get:function get(){return this.valid}}]),IANAZone}(te),le=null,ue=function(t){function FixedOffsetZone(r){var a;return(a=t.call(this)||this).fixed=r,a}_inheritsLoose(FixedOffsetZone,t),FixedOffsetZone.instance=function instance(t){return 0===t?FixedOffsetZone.utcInstance:new FixedOffsetZone(t)},FixedOffsetZone.parseSpecifier=function parseSpecifier(t){if(t){var r=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new FixedOffsetZone(signedOffset(r[1],r[2]))}return null};var r=FixedOffsetZone.prototype;return r.offsetName=function offsetName(){return this.name},r.formatOffset=function formatOffset$1(t,r){return formatOffset(this.fixed,r)},r.offset=function offset(){return this.fixed},r.equals=function equals(t){return"fixed"===t.type&&t.fixed===this.fixed},_createClass(FixedOffsetZone,[{key:"type",get:function get(){return"fixed"}},{key:"name",get:function get(){return 0===this.fixed?"UTC":"UTC"+formatOffset(this.fixed,"narrow")}},{key:"isUniversal",get:function get(){return!0}},{key:"isValid",get:function get(){return!0}}],[{key:"utcInstance",get:function get(){return null===le&&(le=new FixedOffsetZone(0)),le}}]),FixedOffsetZone}(te),de=function(t){function InvalidZone(r){var a;return(a=t.call(this)||this).zoneName=r,a}_inheritsLoose(InvalidZone,t);var r=InvalidZone.prototype;return r.offsetName=function offsetName(){return null},r.formatOffset=function formatOffset(){return""},r.offset=function offset(){return NaN},r.equals=function equals(){return!1},_createClass(InvalidZone,[{key:"type",get:function get(){return"invalid"}},{key:"name",get:function get(){return this.zoneName}},{key:"isUniversal",get:function get(){return!1}},{key:"isValid",get:function get(){return!1}}]),InvalidZone}(te);function normalizeZone(t,r){if(isUndefined(t)||null===t)return r;if(t instanceof te)return t;if(function isString(t){return"string"==typeof t}(t)){var a=t.toLowerCase();return"local"===a||"system"===a?r:"utc"===a||"gmt"===a?ue.utcInstance:ce.isValidSpecifier(a)?ce.create(t):ue.parseSpecifier(a)||new de(t)}return isNumber(t)?ue.instance(t):"object"==typeof t&&t.offset&&"number"==typeof t.offset?t:new de(t)}var fe,pe=function now(){return Date.now()},he="system",me=null,ye=null,ge=null,ve=function(){function Settings(){}return Settings.resetCaches=function resetCaches(){Te.resetCache(),ce.resetCache()},_createClass(Settings,null,[{key:"now",get:function get(){return pe},set:function set(t){pe=t}},{key:"defaultZone",get:function get(){return normalizeZone(he,ne.instance)},set:function set(t){he=t}},{key:"defaultLocale",get:function get(){return me},set:function set(t){me=t}},{key:"defaultNumberingSystem",get:function get(){return ye},set:function set(t){ye=t}},{key:"defaultOutputCalendar",get:function get(){return ge},set:function set(t){ge=t}},{key:"throwOnInvalid",get:function get(){return fe},set:function set(t){fe=t}}]),Settings}(),_e=["base"],be=["padTo","floor"],Re={};var Ce={};function getCachedDTF(t,r){void 0===r&&(r={});var a=JSON.stringify([t,r]),i=Ce[a];return i||(i=new Intl.DateTimeFormat(t,r),Ce[a]=i),i}var Ie={};var we={};var Se=null;function listStuff(t,r,a,i,o){var c=t.listingMode(a);return"error"===c?null:"en"===c?i(r):o(r)}var Oe=function(){function PolyNumberFormatter(t,r,a){this.padTo=a.padTo||0,this.floor=a.floor||!1,a.padTo,a.floor;var i=_objectWithoutPropertiesLoose(a,be);if(!r||Object.keys(i).length>0){var o=_extends({useGrouping:!1},a);a.padTo>0&&(o.minimumIntegerDigits=a.padTo),this.inf=function getCachedINF(t,r){void 0===r&&(r={});var a=JSON.stringify([t,r]),i=Ie[a];return i||(i=new Intl.NumberFormat(t,r),Ie[a]=i),i}(t,o)}}return PolyNumberFormatter.prototype.format=function format(t){if(this.inf){var r=this.floor?Math.floor(t):t;return this.inf.format(r)}return padStart(this.floor?Math.floor(t):roundTo(t,3),this.padTo)},PolyNumberFormatter}(),je=function(){function PolyDateFormatter(t,r,a){var i;if(this.opts=a,t.zone.isUniversal){var o=t.offset/60*-1,c=o>=0?"Etc/GMT+"+o:"Etc/GMT"+o;0!==t.offset&&ce.create(c).valid?(i=c,this.dt=t):(i="UTC",a.timeZoneName?this.dt=t:this.dt=0===t.offset?t:Et.fromMillis(t.ts+60*t.offset*1e3))}else"system"===t.zone.type?this.dt=t:(this.dt=t,i=t.zone.name);var l=_extends({},this.opts);i&&(l.timeZone=i),this.dtf=getCachedDTF(r,l)}var t=PolyDateFormatter.prototype;return t.format=function format(){return this.dtf.format(this.dt.toJSDate())},t.formatToParts=function formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())},t.resolvedOptions=function resolvedOptions(){return this.dtf.resolvedOptions()},PolyDateFormatter}(),De=function(){function PolyRelFormatter(t,r,a){this.opts=_extends({style:"long"},a),!r&&hasRelative()&&(this.rtf=function getCachedRTF(t,r){void 0===r&&(r={});var a=r;a.base;var i=_objectWithoutPropertiesLoose(a,_e),o=JSON.stringify([t,i]),c=we[o];return c||(c=new Intl.RelativeTimeFormat(t,r),we[o]=c),c}(t,a))}var t=PolyRelFormatter.prototype;return t.format=function format(t,r){return this.rtf?this.rtf.format(t,r):function formatRelativeTime(t,r,a,i){void 0===a&&(a="always"),void 0===i&&(i=!1);var o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},c=-1===["hours","minutes","seconds"].indexOf(t);if("auto"===a&&c){var l="days"===t;switch(r){case 1:return l?"tomorrow":"next "+o[t][0];case-1:return l?"yesterday":"last "+o[t][0];case 0:return l?"today":"this "+o[t][0]}}var u=Object.is(r,-0)||r<0,d=Math.abs(r),p=1===d,h=o[t],m=i?p?h[1]:h[2]||h[1]:p?o[t][0]:t;return u?d+" "+m+" ago":"in "+d+" "+m}(r,t,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function formatToParts(t,r){return this.rtf?this.rtf.formatToParts(t,r):[]},PolyRelFormatter}(),Te=function(){function Locale(t,r,a,i){var o=function parseLocaleString(t){var r=t.indexOf("-u-");if(-1===r)return[t];var a,i=t.substring(0,r);try{a=getCachedDTF(t).resolvedOptions()}catch(t){a=getCachedDTF(i).resolvedOptions()}var o=a;return[i,o.numberingSystem,o.calendar]}(t),c=o[0],l=o[1],u=o[2];this.locale=c,this.numberingSystem=r||l||null,this.outputCalendar=a||u||null,this.intl=function intlConfigString(t,r,a){return a||r?(t+="-u",a&&(t+="-ca-"+a),r&&(t+="-nu-"+r),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}Locale.fromOpts=function fromOpts(t){return Locale.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)},Locale.create=function create(t,r,a,i){void 0===i&&(i=!1);var o=t||ve.defaultLocale;return new Locale(o||(i?"en-US":function systemLocale(){return Se||(Se=(new Intl.DateTimeFormat).resolvedOptions().locale)}()),r||ve.defaultNumberingSystem,a||ve.defaultOutputCalendar,o)},Locale.resetCache=function resetCache(){Se=null,Ce={},Ie={},we={}},Locale.fromObject=function fromObject(t){var r=void 0===t?{}:t,a=r.locale,i=r.numberingSystem,o=r.outputCalendar;return Locale.create(a,i,o)};var t=Locale.prototype;return t.listingMode=function listingMode(){var t=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t&&r?"en":"intl"},t.clone=function clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?Locale.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function redefaultToEN(t){return void 0===t&&(t={}),this.clone(_extends({},t,{defaultToEN:!0}))},t.redefaultToSystem=function redefaultToSystem(t){return void 0===t&&(t={}),this.clone(_extends({},t,{defaultToEN:!1}))},t.months=function months$1(t,r,a){var i=this;return void 0===r&&(r=!1),void 0===a&&(a=!0),listStuff(this,t,a,months,(function(){var a=r?{month:t,day:"numeric"}:{month:t},o=r?"format":"standalone";return i.monthsCache[o][t]||(i.monthsCache[o][t]=function mapMonths(t){for(var r=[],a=1;a<=12;a++){var i=Et.utc(2016,a,1);r.push(t(i))}return r}((function(t){return i.extract(t,a,"month")}))),i.monthsCache[o][t]}))},t.weekdays=function weekdays$1(t,r,a){var i=this;return void 0===r&&(r=!1),void 0===a&&(a=!0),listStuff(this,t,a,weekdays,(function(){var a=r?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=r?"format":"standalone";return i.weekdaysCache[o][t]||(i.weekdaysCache[o][t]=function mapWeekdays(t){for(var r=[],a=1;a<=7;a++){var i=Et.utc(2016,11,13+a);r.push(t(i))}return r}((function(t){return i.extract(t,a,"weekday")}))),i.weekdaysCache[o][t]}))},t.meridiems=function meridiems$1(t){var r=this;return void 0===t&&(t=!0),listStuff(this,void 0,t,(function(){return H}),(function(){if(!r.meridiemCache){var t={hour:"numeric",hourCycle:"h12"};r.meridiemCache=[Et.utc(2016,11,13,9),Et.utc(2016,11,13,19)].map((function(a){return r.extract(a,t,"dayperiod")}))}return r.meridiemCache}))},t.eras=function eras$1(t,r){var a=this;return void 0===r&&(r=!0),listStuff(this,t,r,eras,(function(){var r={era:t};return a.eraCache[t]||(a.eraCache[t]=[Et.utc(-40,1,1),Et.utc(2017,1,1)].map((function(t){return a.extract(t,r,"era")}))),a.eraCache[t]}))},t.extract=function extract(t,r,a){var i=this.dtFormatter(t,r).formatToParts().find((function(t){return t.type.toLowerCase()===a}));return i?i.value:null},t.numberFormatter=function numberFormatter(t){return void 0===t&&(t={}),new Oe(this.intl,t.forceSimple||this.fastNumbers,t)},t.dtFormatter=function dtFormatter(t,r){return void 0===r&&(r={}),new je(t,this.intl,r)},t.relFormatter=function relFormatter(t){return void 0===t&&(t={}),new De(this.intl,this.isEnglish(),t)},t.listFormatter=function listFormatter(t){return void 0===t&&(t={}),function getCachedLF(t,r){void 0===r&&(r={});var a=JSON.stringify([t,r]),i=Re[a];return i||(i=new Intl.ListFormat(t,r),Re[a]=i),i}(this.intl,t)},t.isEnglish=function isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.equals=function equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar},_createClass(Locale,[{key:"fastNumbers",get:function get(){return null==this.fastNumbersCached&&(this.fastNumbersCached=function supportsFastNumbers(t){return(!t.numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)}(this)),this.fastNumbersCached}}]),Locale}();function combineRegexes(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];var i=r.reduce((function(t,r){return t+r.source}),"");return RegExp("^"+i+"$")}function combineExtractors(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return function(t){return r.reduce((function(r,a){var i=r[0],o=r[1],c=r[2],l=a(t,c),u=l[0],d=l[1],p=l[2];return[_extends({},i,u),o||d,p]}),[{},null,1]).slice(0,2)}}function parse(t){if(null==t)return[null,null];for(var r=arguments.length,a=new Array(r>1?r-1:0),i=1;i<r;i++)a[i-1]=arguments[i];for(var o=0,c=a;o<c.length;o++){var l=c[o],u=l[0],d=l[1],p=u.exec(t);if(p)return d(p)}return[null,null]}function simpleParse(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return function(t,a){var i,o={};for(i=0;i<r.length;i++)o[r[i]]=parseInteger(t[a+i]);return[o,null,a+i]}}var Ae=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Pe=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Ee=RegExp(""+Pe.source+Ae.source+"?"),Me=RegExp("(?:T"+Ee.source+")?"),xe=simpleParse("weekYear","weekNumber","weekDay"),$e=simpleParse("year","ordinal"),ke=RegExp(Pe.source+" ?(?:"+Ae.source+"|("+U.source+"))?"),Ne=RegExp("(?: "+ke.source+")?");function int(t,r,a){var i=t[r];return isUndefined(i)?a:parseInteger(i)}function extractISOYmd(t,r){return[{year:int(t,r),month:int(t,r+1,1),day:int(t,r+2,1)},null,r+3]}function extractISOTime(t,r){return[{hours:int(t,r,0),minutes:int(t,r+1,0),seconds:int(t,r+2,0),milliseconds:parseMillis(t[r+3])},null,r+4]}function extractISOOffset(t,r){var a=!t[r]&&!t[r+1],i=signedOffset(t[r+1],t[r+2]);return[{},a?null:ue.instance(i),r+3]}function extractIANAZone(t,r){return[{},t[r]?ce.create(t[r]):null,r+1]}var qe=RegExp("^T?"+Pe.source+"$"),Ve=/^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function extractISODuration(t){var r=t[0],a=t[1],i=t[2],o=t[3],c=t[4],l=t[5],u=t[6],d=t[7],p=t[8],h="-"===r[0],m=d&&"-"===d[0],y=function maybeNegate(t,r){return void 0===r&&(r=!1),void 0!==t&&(r||t&&h)?-t:t};return[{years:y(parseFloating(a)),months:y(parseFloating(i)),weeks:y(parseFloating(o)),days:y(parseFloating(c)),hours:y(parseFloating(l)),minutes:y(parseFloating(u)),seconds:y(parseFloating(d),"-0"===d),milliseconds:y(parseMillis(p),m)}]}var Fe={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(t,r,a,i,o,c,l){var u={year:2===r.length?untruncateYear(parseInteger(r)):parseInteger(r),month:L.indexOf(a)+1,day:parseInteger(i),hour:parseInteger(o),minute:parseInteger(c)};return l&&(u.second=parseInteger(l)),t&&(u.weekday=t.length>3?z.indexOf(t)+1:Z.indexOf(t)+1),u}var Ue=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(t){var r,a=t[1],i=t[2],o=t[3],c=t[4],l=t[5],u=t[6],d=t[7],p=t[8],h=t[9],m=t[10],y=t[11],g=fromStrings(a,c,o,i,l,u,d);return r=p?Fe[p]:h?0:signedOffset(m,y),[g,new ue(r)]}var Be=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Le=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ge=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(t){var r=t[1],a=t[2],i=t[3];return[fromStrings(r,t[4],i,a,t[5],t[6],t[7]),ue.utcInstance]}function extractASCII(t){var r=t[1],a=t[2],i=t[3],o=t[4],c=t[5],l=t[6];return[fromStrings(r,t[7],a,i,o,c,l),ue.utcInstance]}var ze=combineRegexes(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Me),Ze=combineRegexes(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Me),Ke=combineRegexes(/(\d{4})-?(\d{3})/,Me),He=combineRegexes(Ee),We=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset),Ye=combineExtractors(xe,extractISOTime,extractISOOffset),Je=combineExtractors($e,extractISOTime,extractISOOffset),Qe=combineExtractors(extractISOTime,extractISOOffset);var Xe=combineExtractors(extractISOTime);var et=combineRegexes(/(\d{4})-(\d\d)-(\d\d)/,Ne),tt=combineRegexes(ke),rt=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone),nt=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);var at={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},it=_extends({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},at),ot=365.2425,st=30.436875,ct=_extends({years:{quarters:4,months:12,weeks:52.1775,days:ot,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:st,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},at),lt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ut=lt.slice(0).reverse();function clone$1(t,r,a){void 0===a&&(a=!1);var i={values:a?r.values:_extends({},t.values,r.values||{}),loc:t.loc.clone(r.loc),conversionAccuracy:r.conversionAccuracy||t.conversionAccuracy};return new dt(i)}function convert(t,r,a,i,o){var c=t[o][a],l=r[a]/c,u=!(Math.sign(l)===Math.sign(i[o]))&&0!==i[o]&&Math.abs(l)<=1?function antiTrunc(t){return t<0?Math.floor(t):Math.ceil(t)}(l):Math.trunc(l);i[o]+=u,r[a]-=u*c}var dt=function(){function Duration(t){var r="longterm"===t.conversionAccuracy||!1;this.values=t.values,this.loc=t.loc||Te.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r?ct:it,this.isLuxonDuration=!0}Duration.fromMillis=function fromMillis(t,r){return Duration.fromObject({milliseconds:t},r)},Duration.fromObject=function fromObject(t,r){if(void 0===r&&(r={}),null==t||"object"!=typeof t)throw new d("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new Duration({values:normalizeObject(t,Duration.normalizeUnit),loc:Te.fromObject(r),conversionAccuracy:r.conversionAccuracy})},Duration.fromDurationLike=function fromDurationLike(t){if(isNumber(t))return Duration.fromMillis(t);if(Duration.isDuration(t))return t;if("object"==typeof t)return Duration.fromObject(t);throw new d("Unknown duration argument "+t+" of type "+typeof t)},Duration.fromISO=function fromISO(t,r){var a=function parseISODuration(t){return parse(t,[Ve,extractISODuration])}(t),i=a[0];return i?Duration.fromObject(i,r):Duration.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},Duration.fromISOTime=function fromISOTime(t,r){var a=function parseISOTimeOnly(t){return parse(t,[qe,Xe])}(t),i=a[0];return i?Duration.fromObject(i,r):Duration.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},Duration.invalid=function invalid(t,r){if(void 0===r&&(r=null),!t)throw new d("need to specify a reason the Duration is invalid");var invalid=t instanceof ee?t:new ee(t,r);if(ve.throwOnInvalid)throw new c(invalid);return new Duration({invalid})},Duration.normalizeUnit=function normalizeUnit(t){var r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t?t.toLowerCase():t];if(!r)throw new u(t);return r},Duration.isDuration=function isDuration(t){return t&&t.isLuxonDuration||!1};var t=Duration.prototype;return t.toFormat=function toFormat(t,r){void 0===r&&(r={});var a=_extends({},r,{floor:!1!==r.round&&!1!==r.floor});return this.isValid?X.create(this.loc,a).formatDurationFromString(this,t):"Invalid Duration"},t.toHuman=function toHuman(t){var r=this;void 0===t&&(t={});var a=lt.map((function(a){var i=r.values[a];return isUndefined(i)?null:r.loc.numberFormatter(_extends({style:"unit",unitDisplay:"long"},t,{unit:a.slice(0,-1)})).format(i)})).filter((function(t){return t}));return this.loc.listFormatter(_extends({type:"conjunction",style:t.listStyle||"narrow"},t)).format(a)},t.toObject=function toObject(){return this.isValid?_extends({},this.values):{}},t.toISO=function toISO(){if(!this.isValid)return null;var t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t},t.toISOTime=function toISOTime(t){if(void 0===t&&(t={}),!this.isValid)return null;var r=this.toMillis();if(r<0||r>=864e5)return null;t=_extends({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},t);var a=this.shiftTo("hours","minutes","seconds","milliseconds"),i="basic"===t.format?"hhmm":"hh:mm";t.suppressSeconds&&0===a.seconds&&0===a.milliseconds||(i+="basic"===t.format?"ss":":ss",t.suppressMilliseconds&&0===a.milliseconds||(i+=".SSS"));var o=a.toFormat(i);return t.includePrefix&&(o="T"+o),o},t.toJSON=function toJSON(){return this.toISO()},t.toString=function toString(){return this.toISO()},t.toMillis=function toMillis(){return this.as("milliseconds")},t.valueOf=function valueOf(){return this.toMillis()},t.plus=function plus(t){if(!this.isValid)return this;for(var r,a=Duration.fromDurationLike(t),i={},o=_createForOfIteratorHelperLoose(lt);!(r=o()).done;){var c=r.value;(hasOwnProperty(a.values,c)||hasOwnProperty(this.values,c))&&(i[c]=a.get(c)+this.get(c))}return clone$1(this,{values:i},!0)},t.minus=function minus(t){if(!this.isValid)return this;var r=Duration.fromDurationLike(t);return this.plus(r.negate())},t.mapUnits=function mapUnits(t){if(!this.isValid)return this;for(var r={},a=0,i=Object.keys(this.values);a<i.length;a++){var o=i[a];r[o]=asNumber(t(this.values[o],o))}return clone$1(this,{values:r},!0)},t.get=function get(t){return this[Duration.normalizeUnit(t)]},t.set=function set(t){return this.isValid?clone$1(this,{values:_extends({},this.values,normalizeObject(t,Duration.normalizeUnit))}):this},t.reconfigure=function reconfigure(t){var r=void 0===t?{}:t,a=r.locale,i=r.numberingSystem,o=r.conversionAccuracy,c={loc:this.loc.clone({locale:a,numberingSystem:i})};return o&&(c.conversionAccuracy=o),clone$1(this,c)},t.as=function as(t){return this.isValid?this.shiftTo(t).get(t):NaN},t.normalize=function normalize(){if(!this.isValid)return this;var t=this.toObject();return function normalizeValues(t,r){ut.reduce((function(a,i){return isUndefined(r[i])?a:(a&&convert(t,r,a,r,i),i)}),null)}(this.matrix,t),clone$1(this,{values:t},!0)},t.shiftTo=function shiftTo(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];if(!this.isValid)return this;if(0===r.length)return this;r=r.map((function(t){return Duration.normalizeUnit(t)}));for(var i,o,c={},l={},u=this.toObject(),d=_createForOfIteratorHelperLoose(lt);!(o=d()).done;){var p=o.value;if(r.indexOf(p)>=0){i=p;var h=0;for(var m in l)h+=this.matrix[m][p]*l[m],l[m]=0;isNumber(u[p])&&(h+=u[p]);var y=Math.trunc(h);for(var g in c[p]=y,l[p]=(1e3*h-1e3*y)/1e3,u)lt.indexOf(g)>lt.indexOf(p)&&convert(this.matrix,u,g,c,p)}else isNumber(u[p])&&(l[p]=u[p])}for(var v in l)0!==l[v]&&(c[i]+=v===i?l[v]:l[v]/this.matrix[i][v]);return clone$1(this,{values:c},!0).normalize()},t.negate=function negate(){if(!this.isValid)return this;for(var t={},r=0,a=Object.keys(this.values);r<a.length;r++){var i=a[r];t[i]=-this.values[i]}return clone$1(this,{values:t},!0)},t.equals=function equals(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(var r,a=_createForOfIteratorHelperLoose(lt);!(r=a()).done;){var i=r.value;if(o=this.values[i],c=t.values[i],!(void 0===o||0===o?void 0===c||0===c:o===c))return!1}var o,c;return!0},_createClass(Duration,[{key:"locale",get:function get(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function get(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function get(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function get(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function get(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function get(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function get(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function get(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function get(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function get(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function get(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function get(){return null===this.invalid}},{key:"invalidReason",get:function get(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function get(){return this.invalid?this.invalid.explanation:null}}]),Duration}(),ft="Invalid Interval";function validateStartEnd(t,r){return t&&t.isValid?r&&r.isValid?r<t?pt.invalid("end before start","The end of an interval must be after its start, but you had start="+t.toISO()+" and end="+r.toISO()):null:pt.invalid("missing or invalid end"):pt.invalid("missing or invalid start")}var pt=function(){function Interval(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}Interval.invalid=function invalid(t,r){if(void 0===r&&(r=null),!t)throw new d("need to specify a reason the Interval is invalid");var invalid=t instanceof ee?t:new ee(t,r);if(ve.throwOnInvalid)throw new o(invalid);return new Interval({invalid})},Interval.fromDateTimes=function fromDateTimes(t,r){var a=friendlyDateTime(t),i=friendlyDateTime(r),o=validateStartEnd(a,i);return null==o?new Interval({start:a,end:i}):o},Interval.after=function after(t,r){var a=dt.fromDurationLike(r),i=friendlyDateTime(t);return Interval.fromDateTimes(i,i.plus(a))},Interval.before=function before(t,r){var a=dt.fromDurationLike(r),i=friendlyDateTime(t);return Interval.fromDateTimes(i.minus(a),i)},Interval.fromISO=function fromISO(t,r){var a=(t||"").split("/",2),i=a[0],o=a[1];if(i&&o){var c,l,u,d;try{l=(c=Et.fromISO(i,r)).isValid}catch(o){l=!1}try{d=(u=Et.fromISO(o,r)).isValid}catch(o){d=!1}if(l&&d)return Interval.fromDateTimes(c,u);if(l){var p=dt.fromISO(o,r);if(p.isValid)return Interval.after(c,p)}else if(d){var h=dt.fromISO(i,r);if(h.isValid)return Interval.before(u,h)}}return Interval.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},Interval.isInterval=function isInterval(t){return t&&t.isLuxonInterval||!1};var t=Interval.prototype;return t.length=function length(t){return void 0===t&&(t="milliseconds"),this.isValid?this.toDuration.apply(this,[t]).get(t):NaN},t.count=function count(t){if(void 0===t&&(t="milliseconds"),!this.isValid)return NaN;var r=this.start.startOf(t),a=this.end.startOf(t);return Math.floor(a.diff(r,t).get(t))+1},t.hasSame=function hasSame(t){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,t))},t.isEmpty=function isEmpty(){return this.s.valueOf()===this.e.valueOf()},t.isAfter=function isAfter(t){return!!this.isValid&&this.s>t},t.isBefore=function isBefore(t){return!!this.isValid&&this.e<=t},t.contains=function contains(t){return!!this.isValid&&(this.s<=t&&this.e>t)},t.set=function set(t){var r=void 0===t?{}:t,a=r.start,i=r.end;return this.isValid?Interval.fromDateTimes(a||this.s,i||this.e):this},t.splitAt=function splitAt(){var t=this;if(!this.isValid)return[];for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];for(var o=a.map(friendlyDateTime).filter((function(r){return t.contains(r)})).sort(),c=[],l=this.s,u=0;l<this.e;){var d=o[u]||this.e,p=+d>+this.e?this.e:d;c.push(Interval.fromDateTimes(l,p)),l=p,u+=1}return c},t.splitBy=function splitBy(t){var r=dt.fromDurationLike(t);if(!this.isValid||!r.isValid||0===r.as("milliseconds"))return[];for(var a,i=this.s,o=1,c=[];i<this.e;){var l=this.start.plus(r.mapUnits((function(t){return t*o})));a=+l>+this.e?this.e:l,c.push(Interval.fromDateTimes(i,a)),i=a,o+=1}return c},t.divideEqually=function divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]},t.overlaps=function overlaps(t){return this.e>t.s&&this.s<t.e},t.abutsStart=function abutsStart(t){return!!this.isValid&&+this.e==+t.s},t.abutsEnd=function abutsEnd(t){return!!this.isValid&&+t.e==+this.s},t.engulfs=function engulfs(t){return!!this.isValid&&(this.s<=t.s&&this.e>=t.e)},t.equals=function equals(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))},t.intersection=function intersection(t){if(!this.isValid)return this;var r=this.s>t.s?this.s:t.s,a=this.e<t.e?this.e:t.e;return r>=a?null:Interval.fromDateTimes(r,a)},t.union=function union(t){if(!this.isValid)return this;var r=this.s<t.s?this.s:t.s,a=this.e>t.e?this.e:t.e;return Interval.fromDateTimes(r,a)},Interval.merge=function merge(t){var r=t.sort((function(t,r){return t.s-r.s})).reduce((function(t,r){var a=t[0],i=t[1];return i?i.overlaps(r)||i.abutsStart(r)?[a,i.union(r)]:[a.concat([i]),r]:[a,r]}),[[],null]),a=r[0],i=r[1];return i&&a.push(i),a},Interval.xor=function xor(t){for(var r,a,i=null,o=0,c=[],l=t.map((function(t){return[{time:t.s,type:"s"},{time:t.e,type:"e"}]})),u=_createForOfIteratorHelperLoose((r=Array.prototype).concat.apply(r,l).sort((function(t,r){return t.time-r.time})));!(a=u()).done;){var d=a.value;1===(o+="s"===d.type?1:-1)?i=d.time:(i&&+i!=+d.time&&c.push(Interval.fromDateTimes(i,d.time)),i=null)}return Interval.merge(c)},t.difference=function difference(){for(var t=this,r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return Interval.xor([this].concat(a)).map((function(r){return t.intersection(r)})).filter((function(t){return t&&!t.isEmpty()}))},t.toString=function toString(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":ft},t.toISO=function toISO(t){return this.isValid?this.s.toISO(t)+"/"+this.e.toISO(t):ft},t.toISODate=function toISODate(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():ft},t.toISOTime=function toISOTime(t){return this.isValid?this.s.toISOTime(t)+"/"+this.e.toISOTime(t):ft},t.toFormat=function toFormat(t,r){var a=(void 0===r?{}:r).separator,i=void 0===a?" – ":a;return this.isValid?""+this.s.toFormat(t)+i+this.e.toFormat(t):ft},t.toDuration=function toDuration(t,r){return this.isValid?this.e.diff(this.s,t,r):dt.invalid(this.invalidReason)},t.mapEndpoints=function mapEndpoints(t){return Interval.fromDateTimes(t(this.s),t(this.e))},_createClass(Interval,[{key:"start",get:function get(){return this.isValid?this.s:null}},{key:"end",get:function get(){return this.isValid?this.e:null}},{key:"isValid",get:function get(){return null===this.invalidReason}},{key:"invalidReason",get:function get(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function get(){return this.invalid?this.invalid.explanation:null}}]),Interval}(),ht=function(){function Info(){}return Info.hasDST=function hasDST(t){void 0===t&&(t=ve.defaultZone);var r=Et.now().setZone(t).set({month:12});return!t.isUniversal&&r.offset!==r.set({month:6}).offset},Info.isValidIANAZone=function isValidIANAZone(t){return ce.isValidSpecifier(t)&&ce.isValidZone(t)},Info.normalizeZone=function normalizeZone$1(t){return normalizeZone(t,ve.defaultZone)},Info.months=function months(t,r){void 0===t&&(t="long");var a=void 0===r?{}:r,i=a.locale,o=void 0===i?null:i,c=a.numberingSystem,l=void 0===c?null:c,u=a.locObj,d=void 0===u?null:u,p=a.outputCalendar,h=void 0===p?"gregory":p;return(d||Te.create(o,l,h)).months(t)},Info.monthsFormat=function monthsFormat(t,r){void 0===t&&(t="long");var a=void 0===r?{}:r,i=a.locale,o=void 0===i?null:i,c=a.numberingSystem,l=void 0===c?null:c,u=a.locObj,d=void 0===u?null:u,p=a.outputCalendar,h=void 0===p?"gregory":p;return(d||Te.create(o,l,h)).months(t,!0)},Info.weekdays=function weekdays(t,r){void 0===t&&(t="long");var a=void 0===r?{}:r,i=a.locale,o=void 0===i?null:i,c=a.numberingSystem,l=void 0===c?null:c,u=a.locObj;return((void 0===u?null:u)||Te.create(o,l,null)).weekdays(t)},Info.weekdaysFormat=function weekdaysFormat(t,r){void 0===t&&(t="long");var a=void 0===r?{}:r,i=a.locale,o=void 0===i?null:i,c=a.numberingSystem,l=void 0===c?null:c,u=a.locObj;return((void 0===u?null:u)||Te.create(o,l,null)).weekdays(t,!0)},Info.meridiems=function meridiems(t){var r=(void 0===t?{}:t).locale,a=void 0===r?null:r;return Te.create(a).meridiems()},Info.eras=function eras(t,r){void 0===t&&(t="short");var a=(void 0===r?{}:r).locale,i=void 0===a?null:a;return Te.create(i,null,"gregory").eras(t)},Info.features=function features(){return{relative:hasRelative()}},Info}();function dayDiff(t,r){var a=function utcDayStart(t){return t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()},i=a(r)-a(t);return Math.floor(dt.fromMillis(i).as("days"))}function _diff(t,r,a,i){var o=function highOrderDiffs(t,r,a){for(var i,o,c={},l=0,u=[["years",function(t,r){return r.year-t.year}],["quarters",function(t,r){return r.quarter-t.quarter}],["months",function(t,r){return r.month-t.month+12*(r.year-t.year)}],["weeks",function(t,r){var a=dayDiff(t,r);return(a-a%7)/7}],["days",dayDiff]];l<u.length;l++){var d=u[l],p=d[0],h=d[1];if(a.indexOf(p)>=0){var m;i=p;var y,g=h(t,r);(o=t.plus(((m={})[p]=g,m)))>r?(t=t.plus(((y={})[p]=g-1,y)),g-=1):t=o,c[p]=g}}return[t,c,o,i]}(t,r,a),c=o[0],l=o[1],u=o[2],d=o[3],p=r-c,h=a.filter((function(t){return["hours","minutes","seconds","milliseconds"].indexOf(t)>=0}));if(0===h.length){var m;if(u<r)u=c.plus(((m={})[d]=1,m));u!==c&&(l[d]=(l[d]||0)+p/(u-c))}var y,g=dt.fromObject(l,i);return h.length>0?(y=dt.fromMillis(p,i)).shiftTo.apply(y,h).plus(g):g}var mt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},yt={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},gt=mt.hanidec.replace(/[\[|\]]/g,"").split("");function digitRegex(t,r){var a=t.numberingSystem;return void 0===r&&(r=""),new RegExp(""+mt[a||"latn"]+r)}function intUnit(t,r){return void 0===r&&(r=function post(t){return t}),{regex:t,deser:function deser(t){var a=t[0];return r(function parseDigits(t){var r=parseInt(t,10);if(isNaN(r)){r="";for(var a=0;a<t.length;a++){var i=t.charCodeAt(a);if(-1!==t[a].search(mt.hanidec))r+=gt.indexOf(t[a]);else for(var o in yt){var c=yt[o],l=c[0],u=c[1];i>=l&&i<=u&&(r+=i-l)}}return parseInt(r,10)}return r}(a))}}}var vt="( |"+String.fromCharCode(160)+")",_t=new RegExp(vt,"g");function fixListRegex(t){return t.replace(/\./g,"\\.?").replace(_t,vt)}function stripInsensitivities(t){return t.replace(/\./g,"").replace(_t," ").toLowerCase()}function oneOf(t,r){return null===t?null:{regex:RegExp(t.map(fixListRegex).join("|")),deser:function deser(a){var i=a[0];return t.findIndex((function(t){return stripInsensitivities(i)===stripInsensitivities(t)}))+r}}}function offset(t,r){return{regex:t,deser:function deser(t){return signedOffset(t[1],t[2])},groups:r}}function simple(t){return{regex:t,deser:function deser(t){return t[0]}}}function escapeToken(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var bt={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};var Rt=null;function maybeExpandMacroToken(t,r){if(t.literal)return t;var a=X.macroTokenToFormatOpts(t.val);if(!a)return t;var i=X.create(r,a).formatDateTimeParts(function getDummyDateTime(){return Rt||(Rt=Et.fromMillis(1555555555555)),Rt}()).map((function(t){return function tokenForPart(t,r,a){var i=t.type,o=t.value;if("literal"===i)return{literal:!0,val:o};var c=a[i],l=bt[i];return"object"==typeof l&&(l=l[c]),l?{literal:!1,val:l}:void 0}(t,0,a)}));return i.includes(void 0)?t:i}function explainFromTokens(t,r,a){var i=function expandMacroTokens(t,r){var a;return(a=Array.prototype).concat.apply(a,t.map((function(t){return maybeExpandMacroToken(t,r)})))}(X.parseFormat(a),t),o=i.map((function(r){return function unitForToken(t,r){var a=digitRegex(r),i=digitRegex(r,"{2}"),o=digitRegex(r,"{3}"),c=digitRegex(r,"{4}"),l=digitRegex(r,"{6}"),u=digitRegex(r,"{1,2}"),d=digitRegex(r,"{1,3}"),p=digitRegex(r,"{1,6}"),h=digitRegex(r,"{1,9}"),m=digitRegex(r,"{2,4}"),y=digitRegex(r,"{4,6}"),g=function literal(t){return{regex:RegExp(escapeToken(t.val)),deser:function deser(t){return t[0]},literal:!0}},v=function unitate(v){if(t.literal)return g(v);switch(v.val){case"G":return oneOf(r.eras("short",!1),0);case"GG":return oneOf(r.eras("long",!1),0);case"y":return intUnit(p);case"yy":case"kk":return intUnit(m,untruncateYear);case"yyyy":case"kkkk":return intUnit(c);case"yyyyy":return intUnit(y);case"yyyyyy":return intUnit(l);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return intUnit(u);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return intUnit(i);case"MMM":return oneOf(r.months("short",!0,!1),1);case"MMMM":return oneOf(r.months("long",!0,!1),1);case"LLL":return oneOf(r.months("short",!1,!1),1);case"LLLL":return oneOf(r.months("long",!1,!1),1);case"o":case"S":return intUnit(d);case"ooo":case"SSS":return intUnit(o);case"u":return simple(h);case"uu":return simple(u);case"uuu":case"E":case"c":return intUnit(a);case"a":return oneOf(r.meridiems(),0);case"EEE":return oneOf(r.weekdays("short",!1,!1),1);case"EEEE":return oneOf(r.weekdays("long",!1,!1),1);case"ccc":return oneOf(r.weekdays("short",!0,!1),1);case"cccc":return oneOf(r.weekdays("long",!0,!1),1);case"Z":case"ZZ":return offset(new RegExp("([+-]"+u.source+")(?::("+i.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+u.source+")("+i.source+")?"),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return g(v)}}(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return v.token=t,v}(r,t)})),c=o.find((function(t){return t.invalidReason}));if(c)return{input:r,tokens:i,invalidReason:c.invalidReason};var u=function buildRegex(t){return["^"+t.map((function(t){return t.regex})).reduce((function(t,r){return t+"("+r.source+")"}),"")+"$",t]}(o),d=u[0],p=u[1],h=RegExp(d,"i"),m=function match(t,r,a){var i=t.match(r);if(i){var o={},c=1;for(var l in a)if(hasOwnProperty(a,l)){var u=a[l],d=u.groups?u.groups+1:1;!u.literal&&u.token&&(o[u.token.val[0]]=u.deser(i.slice(c,c+d))),c+=d}return[i,o]}return[i,{}]}(r,h,p),y=m[0],g=m[1],v=g?function dateTimeFromMatches(t){var r,a=null;return isUndefined(t.z)||(a=ce.create(t.z)),isUndefined(t.Z)||(a||(a=new ue(t.Z)),r=t.Z),isUndefined(t.q)||(t.M=3*(t.q-1)+1),isUndefined(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),isUndefined(t.u)||(t.S=parseMillis(t.u)),[Object.keys(t).reduce((function(r,a){var i=function toField(t){switch(t){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(a);return i&&(r[i]=t[a]),r}),{}),a,r]}(g):[null,null,void 0],b=v[0],R=v[1],C=v[2];if(hasOwnProperty(g,"a")&&hasOwnProperty(g,"H"))throw new l("Can't include meridiem when specifying 24-hour format");return{input:r,tokens:i,regex:h,rawMatches:y,matches:g,result:b,zone:R,specificOffset:C}}var Ct=[0,31,59,90,120,151,181,212,243,273,304,334],It=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(t,r){return new ee("unit out of range","you specified "+r+" (of type "+typeof r+") as a "+t+", which is invalid")}function dayOfWeek(t,r,a){var i=new Date(Date.UTC(t,r-1,a)).getUTCDay();return 0===i?7:i}function computeOrdinal(t,r,a){return a+(isLeapYear(t)?It:Ct)[r-1]}function uncomputeOrdinal(t,r){var a=isLeapYear(t)?It:Ct,i=a.findIndex((function(t){return t<r}));return{month:i+1,day:r-a[i]}}function gregorianToWeek(t){var r,a=t.year,i=t.month,o=t.day,c=computeOrdinal(a,i,o),l=dayOfWeek(a,i,o),u=Math.floor((c-l+10)/7);return u<1?u=weeksInWeekYear(r=a-1):u>weeksInWeekYear(a)?(r=a+1,u=1):r=a,_extends({weekYear:r,weekNumber:u,weekday:l},timeObject(t))}function weekToGregorian(t){var r,a=t.weekYear,i=t.weekNumber,o=t.weekday,c=dayOfWeek(a,1,4),l=daysInYear(a),u=7*i+o-c-3;u<1?u+=daysInYear(r=a-1):u>l?(r=a+1,u-=daysInYear(a)):r=a;var d=uncomputeOrdinal(r,u);return _extends({year:r,month:d.month,day:d.day},timeObject(t))}function gregorianToOrdinal(t){var r=t.year;return _extends({year:r,ordinal:computeOrdinal(r,t.month,t.day)},timeObject(t))}function ordinalToGregorian(t){var r=t.year,a=uncomputeOrdinal(r,t.ordinal);return _extends({year:r,month:a.month,day:a.day},timeObject(t))}function hasInvalidGregorianData(t){var r=isInteger(t.year),a=integerBetween(t.month,1,12),i=integerBetween(t.day,1,daysInMonth(t.year,t.month));return r?a?!i&&unitOutOfRange("day",t.day):unitOutOfRange("month",t.month):unitOutOfRange("year",t.year)}function hasInvalidTimeData(t){var r=t.hour,a=t.minute,i=t.second,o=t.millisecond,c=integerBetween(r,0,23)||24===r&&0===a&&0===i&&0===o,l=integerBetween(a,0,59),u=integerBetween(i,0,59),d=integerBetween(o,0,999);return c?l?u?!d&&unitOutOfRange("millisecond",o):unitOutOfRange("second",i):unitOutOfRange("minute",a):unitOutOfRange("hour",r)}var wt="Invalid DateTime",St=864e13;function unsupportedZone(t){return new ee("unsupported zone",'the zone "'+t.name+'" is not supported')}function possiblyCachedWeekData(t){return null===t.weekData&&(t.weekData=gregorianToWeek(t.c)),t.weekData}function clone(t,r){var a={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Et(_extends({},a,r,{old:a}))}function fixOffset(t,r,a){var i=t-60*r*1e3,o=a.offset(i);if(r===o)return[i,r];i-=60*(o-r)*1e3;var c=a.offset(i);return o===c?[i,o]:[t-60*Math.min(o,c)*1e3,Math.max(o,c)]}function tsToObj(t,r){var a=new Date(t+=60*r*1e3);return{year:a.getUTCFullYear(),month:a.getUTCMonth()+1,day:a.getUTCDate(),hour:a.getUTCHours(),minute:a.getUTCMinutes(),second:a.getUTCSeconds(),millisecond:a.getUTCMilliseconds()}}function objToTS(t,r,a){return fixOffset(objToLocalTS(t),r,a)}function adjustTime(t,r){var a=t.o,i=t.c.year+Math.trunc(r.years),o=t.c.month+Math.trunc(r.months)+3*Math.trunc(r.quarters),c=_extends({},t.c,{year:i,month:o,day:Math.min(t.c.day,daysInMonth(i,o))+Math.trunc(r.days)+7*Math.trunc(r.weeks)}),l=dt.fromObject({years:r.years-Math.trunc(r.years),quarters:r.quarters-Math.trunc(r.quarters),months:r.months-Math.trunc(r.months),weeks:r.weeks-Math.trunc(r.weeks),days:r.days-Math.trunc(r.days),hours:r.hours,minutes:r.minutes,seconds:r.seconds,milliseconds:r.milliseconds}).as("milliseconds"),u=fixOffset(objToLocalTS(c),a,t.zone),d=u[0],p=u[1];return 0!==l&&(d+=l,p=t.zone.offset(d)),{ts:d,o:p}}function parseDataToDateTime(t,r,a,i,o,c){var l=a.setZone,u=a.zone;if(t&&0!==Object.keys(t).length){var d=r||u,p=Et.fromObject(t,_extends({},a,{zone:d,specificOffset:c}));return l?p:p.setZone(u)}return Et.invalid(new ee("unparsable",'the input "'+o+"\" can't be parsed as "+i))}function toTechFormat(t,r,a){return void 0===a&&(a=!0),t.isValid?X.create(Te.create("en-US"),{allowZ:a,forceSimple:!0}).formatDateTimeFromString(t,r):null}function _toISODate(t,r){var a=t.c.year>9999||t.c.year<0,i="";return a&&t.c.year>=0&&(i+="+"),i+=padStart(t.c.year,a?6:4),r?(i+="-",i+=padStart(t.c.month),i+="-",i+=padStart(t.c.day)):(i+=padStart(t.c.month),i+=padStart(t.c.day)),i}function _toISOTime(t,r,a,i,o){var c=padStart(t.c.hour);return r?(c+=":",c+=padStart(t.c.minute),0===t.c.second&&a||(c+=":")):c+=padStart(t.c.minute),0===t.c.second&&a||(c+=padStart(t.c.second),0===t.c.millisecond&&i||(c+=".",c+=padStart(t.c.millisecond,3))),o&&(t.isOffsetFixed&&0===t.offset?c+="Z":t.o<0?(c+="-",c+=padStart(Math.trunc(-t.o/60)),c+=":",c+=padStart(Math.trunc(-t.o%60))):(c+="+",c+=padStart(Math.trunc(t.o/60)),c+=":",c+=padStart(Math.trunc(t.o%60)))),c}var Ot={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},jt={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Dt={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Tt=["year","month","day","hour","minute","second","millisecond"],At=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Pt=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(t){var r={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!r)throw new u(t);return r}function quickDT(t,r){var a,i,o=normalizeZone(r.zone,ve.defaultZone),c=Te.fromObject(r),l=ve.now();if(isUndefined(t.year))a=l;else{for(var u,d=_createForOfIteratorHelperLoose(Tt);!(u=d()).done;){var p=u.value;isUndefined(t[p])&&(t[p]=Ot[p])}var h=hasInvalidGregorianData(t)||hasInvalidTimeData(t);if(h)return Et.invalid(h);var m=objToTS(t,o.offset(l),o);a=m[0],i=m[1]}return new Et({ts:a,zone:o,loc:c,o:i})}function diffRelative(t,r,a){var i=!!isUndefined(a.round)||a.round,o=function format(t,o){return t=roundTo(t,i||a.calendary?0:2,!0),r.loc.clone(a).relFormatter(a).format(t,o)},c=function differ(i){return a.calendary?r.hasSame(t,i)?0:r.startOf(i).diff(t.startOf(i),i).get(i):r.diff(t,i).get(i)};if(a.unit)return o(c(a.unit),a.unit);for(var l,u=_createForOfIteratorHelperLoose(a.units);!(l=u()).done;){var d=l.value,p=c(d);if(Math.abs(p)>=1)return o(p,d)}return o(t>r?-0:0,a.units[a.units.length-1])}function lastOpts(t){var r,a={};return t.length>0&&"object"==typeof t[t.length-1]?(a=t[t.length-1],r=Array.from(t).slice(0,t.length-1)):r=Array.from(t),[a,r]}var Et=function(){function DateTime(t){var r=t.zone||ve.defaultZone,a=t.invalid||(Number.isNaN(t.ts)?new ee("invalid input"):null)||(r.isValid?null:unsupportedZone(r));this.ts=isUndefined(t.ts)?ve.now():t.ts;var i=null,o=null;if(!a)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(r)){var c=[t.old.c,t.old.o];i=c[0],o=c[1]}else{var l=r.offset(this.ts);i=tsToObj(this.ts,l),i=(a=Number.isNaN(i.year)?new ee("invalid input"):null)?null:i,o=a?null:l}this._zone=r,this.loc=t.loc||Te.create(),this.invalid=a,this.weekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}DateTime.now=function now(){return new DateTime({})},DateTime.local=function local(){var t=lastOpts(arguments),r=t[0],a=t[1],i=a[0],o=a[1],c=a[2],l=a[3],u=a[4],d=a[5],p=a[6];return quickDT({year:i,month:o,day:c,hour:l,minute:u,second:d,millisecond:p},r)},DateTime.utc=function utc(){var t=lastOpts(arguments),r=t[0],a=t[1],i=a[0],o=a[1],c=a[2],l=a[3],u=a[4],d=a[5],p=a[6];return r.zone=ue.utcInstance,quickDT({year:i,month:o,day:c,hour:l,minute:u,second:d,millisecond:p},r)},DateTime.fromJSDate=function fromJSDate(t,r){void 0===r&&(r={});var a=function isDate(t){return"[object Date]"===Object.prototype.toString.call(t)}(t)?t.valueOf():NaN;if(Number.isNaN(a))return DateTime.invalid("invalid input");var i=normalizeZone(r.zone,ve.defaultZone);return i.isValid?new DateTime({ts:a,zone:i,loc:Te.fromObject(r)}):DateTime.invalid(unsupportedZone(i))},DateTime.fromMillis=function fromMillis(t,r){if(void 0===r&&(r={}),isNumber(t))return t<-St||t>St?DateTime.invalid("Timestamp out of range"):new DateTime({ts:t,zone:normalizeZone(r.zone,ve.defaultZone),loc:Te.fromObject(r)});throw new d("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},DateTime.fromSeconds=function fromSeconds(t,r){if(void 0===r&&(r={}),isNumber(t))return new DateTime({ts:1e3*t,zone:normalizeZone(r.zone,ve.defaultZone),loc:Te.fromObject(r)});throw new d("fromSeconds requires a numerical input")},DateTime.fromObject=function fromObject(t,r){void 0===r&&(r={}),t=t||{};var a=normalizeZone(r.zone,ve.defaultZone);if(!a.isValid)return DateTime.invalid(unsupportedZone(a));var i=ve.now(),o=isUndefined(r.specificOffset)?a.offset(i):r.specificOffset,c=normalizeObject(t,normalizeUnit),u=!isUndefined(c.ordinal),d=!isUndefined(c.year),p=!isUndefined(c.month)||!isUndefined(c.day),h=d||p,m=c.weekYear||c.weekNumber,y=Te.fromObject(r);if((h||u)&&m)throw new l("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(p&&u)throw new l("Can't mix ordinal dates with month/day");var g,v,b=m||c.weekday&&!h,R=tsToObj(i,o);b?(g=At,v=jt,R=gregorianToWeek(R)):u?(g=Pt,v=Dt,R=gregorianToOrdinal(R)):(g=Tt,v=Ot);for(var C,I=!1,w=_createForOfIteratorHelperLoose(g);!(C=w()).done;){var S=C.value;isUndefined(c[S])?c[S]=I?v[S]:R[S]:I=!0}var O=b?function hasInvalidWeekData(t){var r=isInteger(t.weekYear),a=integerBetween(t.weekNumber,1,weeksInWeekYear(t.weekYear)),i=integerBetween(t.weekday,1,7);return r?a?!i&&unitOutOfRange("weekday",t.weekday):unitOutOfRange("week",t.week):unitOutOfRange("weekYear",t.weekYear)}(c):u?function hasInvalidOrdinalData(t){var r=isInteger(t.year),a=integerBetween(t.ordinal,1,daysInYear(t.year));return r?!a&&unitOutOfRange("ordinal",t.ordinal):unitOutOfRange("year",t.year)}(c):hasInvalidGregorianData(c),j=O||hasInvalidTimeData(c);if(j)return DateTime.invalid(j);var D=objToTS(b?weekToGregorian(c):u?ordinalToGregorian(c):c,o,a),T=new DateTime({ts:D[0],zone:a,o:D[1],loc:y});return c.weekday&&h&&t.weekday!==T.weekday?DateTime.invalid("mismatched weekday","you can't specify both a weekday of "+c.weekday+" and a date of "+T.toISO()):T},DateTime.fromISO=function fromISO(t,r){void 0===r&&(r={});var a=function parseISODate(t){return parse(t,[ze,We],[Ze,Ye],[Ke,Je],[He,Qe])}(t);return parseDataToDateTime(a[0],a[1],r,"ISO 8601",t)},DateTime.fromRFC2822=function fromRFC2822(t,r){void 0===r&&(r={});var a=function parseRFC2822Date(t){return parse(function preprocessRFC2822(t){return t.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[Ue,extractRFC2822])}(t);return parseDataToDateTime(a[0],a[1],r,"RFC 2822",t)},DateTime.fromHTTP=function fromHTTP(t,r){void 0===r&&(r={});var a=function parseHTTPDate(t){return parse(t,[Be,extractRFC1123Or850],[Le,extractRFC1123Or850],[Ge,extractASCII])}(t);return parseDataToDateTime(a[0],a[1],r,"HTTP",r)},DateTime.fromFormat=function fromFormat(t,r,a){if(void 0===a&&(a={}),isUndefined(t)||isUndefined(r))throw new d("fromFormat requires an input string and a format");var i=a,o=i.locale,c=void 0===o?null:o,l=i.numberingSystem,u=void 0===l?null:l,p=function parseFromTokens(t,r,a){var i=explainFromTokens(t,r,a);return[i.result,i.zone,i.specificOffset,i.invalidReason]}(Te.fromOpts({locale:c,numberingSystem:u,defaultToEN:!0}),t,r),h=p[0],m=p[1],y=p[2],g=p[3];return g?DateTime.invalid(g):parseDataToDateTime(h,m,a,"format "+r,t,y)},DateTime.fromString=function fromString(t,r,a){return void 0===a&&(a={}),DateTime.fromFormat(t,r,a)},DateTime.fromSQL=function fromSQL(t,r){void 0===r&&(r={});var a=function parseSQL(t){return parse(t,[et,rt],[tt,nt])}(t);return parseDataToDateTime(a[0],a[1],r,"SQL",t)},DateTime.invalid=function invalid(t,r){if(void 0===r&&(r=null),!t)throw new d("need to specify a reason the DateTime is invalid");var invalid=t instanceof ee?t:new ee(t,r);if(ve.throwOnInvalid)throw new i(invalid);return new DateTime({invalid})},DateTime.isDateTime=function isDateTime(t){return t&&t.isLuxonDateTime||!1};var t=DateTime.prototype;return t.get=function get(t){return this[t]},t.resolvedLocaleOptions=function resolvedLocaleOptions(t){void 0===t&&(t={});var r=X.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:r.locale,numberingSystem:r.numberingSystem,outputCalendar:r.calendar}},t.toUTC=function toUTC(t,r){return void 0===t&&(t=0),void 0===r&&(r={}),this.setZone(ue.instance(t),r)},t.toLocal=function toLocal(){return this.setZone(ve.defaultZone)},t.setZone=function setZone(t,r){var a=void 0===r?{}:r,i=a.keepLocalTime,o=void 0!==i&&i,c=a.keepCalendarTime,l=void 0!==c&&c;if((t=normalizeZone(t,ve.defaultZone)).equals(this.zone))return this;if(t.isValid){var u=this.ts;if(o||l){var d=t.offset(this.ts);u=objToTS(this.toObject(),d,t)[0]}return clone(this,{ts:u,zone:t})}return DateTime.invalid(unsupportedZone(t))},t.reconfigure=function reconfigure(t){var r=void 0===t?{}:t,a=r.locale,i=r.numberingSystem,o=r.outputCalendar;return clone(this,{loc:this.loc.clone({locale:a,numberingSystem:i,outputCalendar:o})})},t.setLocale=function setLocale(t){return this.reconfigure({locale:t})},t.set=function set(t){if(!this.isValid)return this;var r,a=normalizeObject(t,normalizeUnit),i=!isUndefined(a.weekYear)||!isUndefined(a.weekNumber)||!isUndefined(a.weekday),o=!isUndefined(a.ordinal),c=!isUndefined(a.year),u=!isUndefined(a.month)||!isUndefined(a.day),d=c||u,p=a.weekYear||a.weekNumber;if((d||o)&&p)throw new l("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&o)throw new l("Can't mix ordinal dates with month/day");i?r=weekToGregorian(_extends({},gregorianToWeek(this.c),a)):isUndefined(a.ordinal)?(r=_extends({},this.toObject(),a),isUndefined(a.day)&&(r.day=Math.min(daysInMonth(r.year,r.month),r.day))):r=ordinalToGregorian(_extends({},gregorianToOrdinal(this.c),a));var h=objToTS(r,this.o,this.zone);return clone(this,{ts:h[0],o:h[1]})},t.plus=function plus(t){return this.isValid?clone(this,adjustTime(this,dt.fromDurationLike(t))):this},t.minus=function minus(t){return this.isValid?clone(this,adjustTime(this,dt.fromDurationLike(t).negate())):this},t.startOf=function startOf(t){if(!this.isValid)return this;var r={},a=dt.normalizeUnit(t);switch(a){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0}if("weeks"===a&&(r.weekday=1),"quarters"===a){var i=Math.ceil(this.month/3);r.month=3*(i-1)+1}return this.set(r)},t.endOf=function endOf(t){var r;return this.isValid?this.plus((r={},r[t]=1,r)).startOf(t).minus(1):this},t.toFormat=function toFormat(t,r){return void 0===r&&(r={}),this.isValid?X.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,t):wt},t.toLocaleString=function toLocaleString(t,r){return void 0===t&&(t=g),void 0===r&&(r={}),this.isValid?X.create(this.loc.clone(r),t).formatDateTime(this):wt},t.toLocaleParts=function toLocaleParts(t){return void 0===t&&(t={}),this.isValid?X.create(this.loc.clone(t),t).formatDateTimeParts(this):[]},t.toISO=function toISO(t){var r=void 0===t?{}:t,a=r.format,i=void 0===a?"extended":a,o=r.suppressSeconds,c=void 0!==o&&o,l=r.suppressMilliseconds,u=void 0!==l&&l,d=r.includeOffset,p=void 0===d||d;if(!this.isValid)return null;var h="extended"===i,m=_toISODate(this,h);return m+="T",m+=_toISOTime(this,h,c,u,p)},t.toISODate=function toISODate(t){var r=(void 0===t?{}:t).format,a=void 0===r?"extended":r;return this.isValid?_toISODate(this,"extended"===a):null},t.toISOWeekDate=function toISOWeekDate(){return toTechFormat(this,"kkkk-'W'WW-c")},t.toISOTime=function toISOTime(t){var r=void 0===t?{}:t,a=r.suppressMilliseconds,i=void 0!==a&&a,o=r.suppressSeconds,c=void 0!==o&&o,l=r.includeOffset,u=void 0===l||l,d=r.includePrefix,p=void 0!==d&&d,h=r.format,m=void 0===h?"extended":h;return this.isValid?(p?"T":"")+_toISOTime(this,"extended"===m,c,i,u):null},t.toRFC2822=function toRFC2822(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function toHTTP(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function toSQLDate(){return this.isValid?_toISODate(this,!0):null},t.toSQLTime=function toSQLTime(t){var r=void 0===t?{}:t,a=r.includeOffset,i=void 0===a||a,o=r.includeZone,c=void 0!==o&&o,l="HH:mm:ss.SSS";return(c||i)&&(l+=" ",c?l+="z":i&&(l+="ZZ")),toTechFormat(this,l,!0)},t.toSQL=function toSQL(t){return void 0===t&&(t={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(t):null},t.toString=function toString(){return this.isValid?this.toISO():wt},t.valueOf=function valueOf(){return this.toMillis()},t.toMillis=function toMillis(){return this.isValid?this.ts:NaN},t.toSeconds=function toSeconds(){return this.isValid?this.ts/1e3:NaN},t.toJSON=function toJSON(){return this.toISO()},t.toBSON=function toBSON(){return this.toJSDate()},t.toObject=function toObject(t){if(void 0===t&&(t={}),!this.isValid)return{};var r=_extends({},this.c);return t.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r},t.toJSDate=function toJSDate(){return new Date(this.isValid?this.ts:NaN)},t.diff=function diff(t,r,a){if(void 0===r&&(r="milliseconds"),void 0===a&&(a={}),!this.isValid||!t.isValid)return dt.invalid("created by diffing an invalid DateTime");var i=_extends({locale:this.locale,numberingSystem:this.numberingSystem},a),o=function maybeArray(t){return Array.isArray(t)?t:[t]}(r).map(dt.normalizeUnit),c=t.valueOf()>this.valueOf(),l=_diff(c?this:t,c?t:this,o,i);return c?l.negate():l},t.diffNow=function diffNow(t,r){return void 0===t&&(t="milliseconds"),void 0===r&&(r={}),this.diff(DateTime.now(),t,r)},t.until=function until(t){return this.isValid?pt.fromDateTimes(this,t):this},t.hasSame=function hasSame(t,r){if(!this.isValid)return!1;var a=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(r)<=a&&a<=i.endOf(r)},t.equals=function equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)},t.toRelative=function toRelative(t){if(void 0===t&&(t={}),!this.isValid)return null;var r=t.base||DateTime.fromObject({},{zone:this.zone}),a=t.padding?this<r?-t.padding:t.padding:0,i=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(i=t.unit,o=void 0),diffRelative(r,this.plus(a),_extends({},t,{numeric:"always",units:i,unit:o}))},t.toRelativeCalendar=function toRelativeCalendar(t){return void 0===t&&(t={}),this.isValid?diffRelative(t.base||DateTime.fromObject({},{zone:this.zone}),this,_extends({},t,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},DateTime.min=function min(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];if(!r.every(DateTime.isDateTime))throw new d("min requires all arguments be DateTimes");return bestBy(r,(function(t){return t.valueOf()}),Math.min)},DateTime.max=function max(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];if(!r.every(DateTime.isDateTime))throw new d("max requires all arguments be DateTimes");return bestBy(r,(function(t){return t.valueOf()}),Math.max)},DateTime.fromFormatExplain=function fromFormatExplain(t,r,a){void 0===a&&(a={});var i=a,o=i.locale,c=void 0===o?null:o,l=i.numberingSystem,u=void 0===l?null:l;return explainFromTokens(Te.fromOpts({locale:c,numberingSystem:u,defaultToEN:!0}),t,r)},DateTime.fromStringExplain=function fromStringExplain(t,r,a){return void 0===a&&(a={}),DateTime.fromFormatExplain(t,r,a)},_createClass(DateTime,[{key:"isValid",get:function get(){return null===this.invalid}},{key:"invalidReason",get:function get(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function get(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function get(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function get(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function get(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function get(){return this._zone}},{key:"zoneName",get:function get(){return this.isValid?this.zone.name:null}},{key:"year",get:function get(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function get(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function get(){return this.isValid?this.c.month:NaN}},{key:"day",get:function get(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function get(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function get(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function get(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function get(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function get(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}},{key:"weekNumber",get:function get(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}},{key:"weekday",get:function get(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}},{key:"ordinal",get:function get(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}},{key:"monthShort",get:function get(){return this.isValid?ht.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function get(){return this.isValid?ht.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function get(){return this.isValid?ht.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function get(){return this.isValid?ht.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function get(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function get(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function get(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function get(){return this.isValid?this.zone.isUniversal:null}},{key:"isInDST",get:function get(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function get(){return isLeapYear(this.year)}},{key:"daysInMonth",get:function get(){return daysInMonth(this.year,this.month)}},{key:"daysInYear",get:function get(){return this.isValid?daysInYear(this.year):NaN}},{key:"weeksInWeekYear",get:function get(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function get(){return g}},{key:"DATE_MED",get:function get(){return v}},{key:"DATE_MED_WITH_WEEKDAY",get:function get(){return b}},{key:"DATE_FULL",get:function get(){return R}},{key:"DATE_HUGE",get:function get(){return C}},{key:"TIME_SIMPLE",get:function get(){return I}},{key:"TIME_WITH_SECONDS",get:function get(){return w}},{key:"TIME_WITH_SHORT_OFFSET",get:function get(){return S}},{key:"TIME_WITH_LONG_OFFSET",get:function get(){return O}},{key:"TIME_24_SIMPLE",get:function get(){return j}},{key:"TIME_24_WITH_SECONDS",get:function get(){return D}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function get(){return T}},{key:"TIME_24_WITH_LONG_OFFSET",get:function get(){return A}},{key:"DATETIME_SHORT",get:function get(){return P}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function get(){return E}},{key:"DATETIME_MED",get:function get(){return M}},{key:"DATETIME_MED_WITH_SECONDS",get:function get(){return x}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function get(){return $}},{key:"DATETIME_FULL",get:function get(){return k}},{key:"DATETIME_FULL_WITH_SECONDS",get:function get(){return N}},{key:"DATETIME_HUGE",get:function get(){return q}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function get(){return V}}]),DateTime}();function friendlyDateTime(t){if(Et.isDateTime(t))return t;if(t&&t.valueOf&&isNumber(t.valueOf()))return Et.fromJSDate(t);if(t&&"object"==typeof t)return Et.fromObject(t);throw new d("Unknown datetime argument: "+t+", of type "+typeof t)}r.DateTime=Et,r.Duration=dt,r.FixedOffsetZone=ue,r.IANAZone=ce,r.Info=ht,r.Interval=pt,r.InvalidZone=de,r.Settings=ve,r.SystemZone=ne,r.VERSION="2.3.0",r.Zone=te},92592:(t,r,a)=>{const i=a(47138),o=a(95115),c=a(6907),l=a(93776);function renderCanvas(t,r,a,c,l){const u=[].slice.call(arguments,1),d=u.length,p="function"==typeof u[d-1];if(!p&&!i())throw new Error("Callback required as last argument");if(!p){if(d<1)throw new Error("Too few arguments provided");return 1===d?(a=r,r=c=void 0):2!==d||r.getContext||(c=a,a=r,r=void 0),new Promise((function(i,l){try{const l=o.create(a,c);i(t(l,r,c))}catch(t){l(t)}}))}if(d<2)throw new Error("Too few arguments provided");2===d?(l=a,a=r,r=c=void 0):3===d&&(r.getContext&&void 0===l?(l=c,c=void 0):(l=c,c=a,a=r,r=void 0));try{const i=o.create(a,c);l(null,t(i,r,c))}catch(t){l(t)}}r.create=o.create,r.toCanvas=renderCanvas.bind(null,c.render),r.toDataURL=renderCanvas.bind(null,c.renderToDataURL),r.toString=renderCanvas.bind(null,(function(t,r,a){return l.render(t,a)}))},47138:t=>{t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},21845:(t,r,a)=>{const i=a(10242).getSymbolSize;r.getRowColCoords=function getRowColCoords(t){if(1===t)return[];const r=Math.floor(t/7)+2,a=i(t),o=145===a?26:2*Math.ceil((a-13)/(2*r-2)),c=[a-7];for(let t=1;t<r-1;t++)c[t]=c[t-1]-o;return c.push(6),c.reverse()},r.getPositions=function getPositions(t){const a=[],i=r.getRowColCoords(t),o=i.length;for(let t=0;t<o;t++)for(let r=0;r<o;r++)0===t&&0===r||0===t&&r===o-1||t===o-1&&0===r||a.push([i[t],i[r]]);return a}},8260:(t,r,a)=>{const i=a(76910),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function AlphanumericData(t){this.mode=i.ALPHANUMERIC,this.data=t}AlphanumericData.getBitsLength=function getBitsLength(t){return 11*Math.floor(t/2)+t%2*6},AlphanumericData.prototype.getLength=function getLength(){return this.data.length},AlphanumericData.prototype.getBitsLength=function getBitsLength(){return AlphanumericData.getBitsLength(this.data.length)},AlphanumericData.prototype.write=function write(t){let r;for(r=0;r+2<=this.data.length;r+=2){let a=45*o.indexOf(this.data[r]);a+=o.indexOf(this.data[r+1]),t.put(a,11)}this.data.length%2&&t.put(o.indexOf(this.data[r]),6)},t.exports=AlphanumericData},97245:t=>{function BitBuffer(){this.buffer=[],this.length=0}BitBuffer.prototype={get:function(t){const r=Math.floor(t/8);return 1==(this.buffer[r]>>>7-t%8&1)},put:function(t,r){for(let a=0;a<r;a++)this.putBit(1==(t>>>r-a-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}},t.exports=BitBuffer},73280:t=>{function BitMatrix(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}BitMatrix.prototype.set=function(t,r,a,i){const o=t*this.size+r;this.data[o]=a,i&&(this.reservedBit[o]=!0)},BitMatrix.prototype.get=function(t,r){return this.data[t*this.size+r]},BitMatrix.prototype.xor=function(t,r,a){this.data[t*this.size+r]^=a},BitMatrix.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]},t.exports=BitMatrix},43424:(t,r,a)=>{const i=a(62378),o=a(76910);function ByteData(t){this.mode=o.BYTE,this.data=new Uint8Array(i(t))}ByteData.getBitsLength=function getBitsLength(t){return 8*t},ByteData.prototype.getLength=function getLength(){return this.data.length},ByteData.prototype.getBitsLength=function getBitsLength(){return ByteData.getBitsLength(this.data.length)},ByteData.prototype.write=function(t){for(let r=0,a=this.data.length;r<a;r++)t.put(this.data[r],8)},t.exports=ByteData},35393:(t,r,a)=>{const i=a(64908),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],c=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];r.getBlocksCount=function getBlocksCount(t,r){switch(r){case i.L:return o[4*(t-1)+0];case i.M:return o[4*(t-1)+1];case i.Q:return o[4*(t-1)+2];case i.H:return o[4*(t-1)+3];default:return}},r.getTotalCodewordsCount=function getTotalCodewordsCount(t,r){switch(r){case i.L:return c[4*(t-1)+0];case i.M:return c[4*(t-1)+1];case i.Q:return c[4*(t-1)+2];case i.H:return c[4*(t-1)+3];default:return}}},64908:(t,r)=>{r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2},r.isValid=function isValid(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},r.from=function from(t,a){if(r.isValid(t))return t;try{return function fromString(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return a}}},76526:(t,r,a)=>{const i=a(10242).getSymbolSize;r.getPositions=function getPositions(t){const r=i(t);return[[0,0],[r-7,0],[0,r-7]]}},61642:(t,r,a)=>{const i=a(10242),o=i.getBCHDigit(1335);r.getEncodedBits=function getEncodedBits(t,r){const a=t.bit<<3|r;let c=a<<10;for(;i.getBCHDigit(c)-o>=0;)c^=1335<<i.getBCHDigit(c)-o;return 21522^(a<<10|c)}},72577:(t,r)=>{const a=new Uint8Array(512),i=new Uint8Array(256);!function initTables(){let t=1;for(let r=0;r<255;r++)a[r]=t,i[t]=r,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)a[t]=a[t-255]}(),r.log=function log(t){if(t<1)throw new Error("log("+t+")");return i[t]},r.exp=function exp(t){return a[t]},r.mul=function mul(t,r){return 0===t||0===r?0:a[i[t]+i[r]]}},35442:(t,r,a)=>{const i=a(76910),o=a(10242);function KanjiData(t){this.mode=i.KANJI,this.data=t}KanjiData.getBitsLength=function getBitsLength(t){return 13*t},KanjiData.prototype.getLength=function getLength(){return this.data.length},KanjiData.prototype.getBitsLength=function getBitsLength(){return KanjiData.getBitsLength(this.data.length)},KanjiData.prototype.write=function(t){let r;for(r=0;r<this.data.length;r++){let a=o.toSJIS(this.data[r]);if(a>=33088&&a<=40956)a-=33088;else{if(!(a>=57408&&a<=60351))throw new Error("Invalid SJIS character: "+this.data[r]+"\nMake sure your charset is UTF-8");a-=49472}a=192*(a>>>8&255)+(255&a),t.put(a,13)}},t.exports=KanjiData},27126:(t,r)=>{r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const a=3,i=3,o=40,c=10;function getMaskAt(t,a,i){switch(t){case r.Patterns.PATTERN000:return(a+i)%2==0;case r.Patterns.PATTERN001:return a%2==0;case r.Patterns.PATTERN010:return i%3==0;case r.Patterns.PATTERN011:return(a+i)%3==0;case r.Patterns.PATTERN100:return(Math.floor(a/2)+Math.floor(i/3))%2==0;case r.Patterns.PATTERN101:return a*i%2+a*i%3==0;case r.Patterns.PATTERN110:return(a*i%2+a*i%3)%2==0;case r.Patterns.PATTERN111:return(a*i%3+(a+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}r.isValid=function isValid(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},r.from=function from(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function getPenaltyN1(t){const r=t.size;let i=0,o=0,c=0,l=null,u=null;for(let d=0;d<r;d++){o=c=0,l=u=null;for(let p=0;p<r;p++){let r=t.get(d,p);r===l?o++:(o>=5&&(i+=a+(o-5)),l=r,o=1),r=t.get(p,d),r===u?c++:(c>=5&&(i+=a+(c-5)),u=r,c=1)}o>=5&&(i+=a+(o-5)),c>=5&&(i+=a+(c-5))}return i},r.getPenaltyN2=function getPenaltyN2(t){const r=t.size;let a=0;for(let i=0;i<r-1;i++)for(let o=0;o<r-1;o++){const r=t.get(i,o)+t.get(i,o+1)+t.get(i+1,o)+t.get(i+1,o+1);4!==r&&0!==r||a++}return a*i},r.getPenaltyN3=function getPenaltyN3(t){const r=t.size;let a=0,i=0,c=0;for(let o=0;o<r;o++){i=c=0;for(let l=0;l<r;l++)i=i<<1&2047|t.get(o,l),l>=10&&(1488===i||93===i)&&a++,c=c<<1&2047|t.get(l,o),l>=10&&(1488===c||93===c)&&a++}return a*o},r.getPenaltyN4=function getPenaltyN4(t){let r=0;const a=t.data.length;for(let i=0;i<a;i++)r+=t.data[i];return Math.abs(Math.ceil(100*r/a/5)-10)*c},r.applyMask=function applyMask(t,r){const a=r.size;for(let i=0;i<a;i++)for(let o=0;o<a;o++)r.isReserved(o,i)||r.xor(o,i,getMaskAt(t,o,i))},r.getBestMask=function getBestMask(t,a){const i=Object.keys(r.Patterns).length;let o=0,c=1/0;for(let l=0;l<i;l++){a(l),r.applyMask(l,t);const i=r.getPenaltyN1(t)+r.getPenaltyN2(t)+r.getPenaltyN3(t)+r.getPenaltyN4(t);r.applyMask(l,t),i<c&&(c=i,o=l)}return o}},76910:(t,r,a)=>{const i=a(43114),o=a(7007);r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function getCharCountIndicator(t,r){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!i.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?t.ccBits[0]:r<27?t.ccBits[1]:t.ccBits[2]},r.getBestModeForData=function getBestModeForData(t){return o.testNumeric(t)?r.NUMERIC:o.testAlphanumeric(t)?r.ALPHANUMERIC:o.testKanji(t)?r.KANJI:r.BYTE},r.toString=function toString(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},r.isValid=function isValid(t){return t&&t.bit&&t.ccBits},r.from=function from(t,a){if(r.isValid(t))return t;try{return function fromString(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return a}}},41085:(t,r,a)=>{const i=a(76910);function NumericData(t){this.mode=i.NUMERIC,this.data=t.toString()}NumericData.getBitsLength=function getBitsLength(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},NumericData.prototype.getLength=function getLength(){return this.data.length},NumericData.prototype.getBitsLength=function getBitsLength(){return NumericData.getBitsLength(this.data.length)},NumericData.prototype.write=function write(t){let r,a,i;for(r=0;r+3<=this.data.length;r+=3)a=this.data.substr(r,3),i=parseInt(a,10),t.put(i,10);const o=this.data.length-r;o>0&&(a=this.data.substr(r),i=parseInt(a,10),t.put(i,3*o+1))},t.exports=NumericData},26143:(t,r,a)=>{const i=a(72577);r.mul=function mul(t,r){const a=new Uint8Array(t.length+r.length-1);for(let o=0;o<t.length;o++)for(let c=0;c<r.length;c++)a[o+c]^=i.mul(t[o],r[c]);return a},r.mod=function mod(t,r){let a=new Uint8Array(t);for(;a.length-r.length>=0;){const t=a[0];for(let o=0;o<r.length;o++)a[o]^=i.mul(r[o],t);let o=0;for(;o<a.length&&0===a[o];)o++;a=a.slice(o)}return a},r.generateECPolynomial=function generateECPolynomial(t){let a=new Uint8Array([1]);for(let o=0;o<t;o++)a=r.mul(a,new Uint8Array([1,i.exp(o)]));return a}},95115:(t,r,a)=>{const i=a(10242),o=a(64908),c=a(97245),l=a(73280),u=a(21845),d=a(76526),p=a(27126),h=a(35393),m=a(52882),y=a(23103),g=a(61642),v=a(76910),b=a(16130);function setupFormatInfo(t,r,a){const i=t.size,o=g.getEncodedBits(r,a);let c,l;for(c=0;c<15;c++)l=1==(o>>c&1),c<6?t.set(c,8,l,!0):c<8?t.set(c+1,8,l,!0):t.set(i-15+c,8,l,!0),c<8?t.set(8,i-c-1,l,!0):c<9?t.set(8,15-c-1+1,l,!0):t.set(8,15-c-1,l,!0);t.set(i-8,8,1,!0)}function createData(t,r,a){const o=new c;a.forEach((function(r){o.put(r.mode.bit,4),o.put(r.getLength(),v.getCharCountIndicator(r.mode,t)),r.write(o)}));const l=8*(i.getSymbolTotalCodewords(t)-h.getTotalCodewordsCount(t,r));for(o.getLengthInBits()+4<=l&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const u=(l-o.getLengthInBits())/8;for(let t=0;t<u;t++)o.put(t%2?17:236,8);return function createCodewords(t,r,a){const o=i.getSymbolTotalCodewords(r),c=h.getTotalCodewordsCount(r,a),l=o-c,u=h.getBlocksCount(r,a),d=u-o%u,p=Math.floor(o/u),y=Math.floor(l/u),g=y+1,v=p-y,b=new m(v);let R=0;const C=new Array(u),I=new Array(u);let w=0;const S=new Uint8Array(t.buffer);for(let t=0;t<u;t++){const r=t<d?y:g;C[t]=S.slice(R,R+r),I[t]=b.encode(C[t]),R+=r,w=Math.max(w,r)}const O=new Uint8Array(o);let j,D,T=0;for(j=0;j<w;j++)for(D=0;D<u;D++)j<C[D].length&&(O[T++]=C[D][j]);for(j=0;j<v;j++)for(D=0;D<u;D++)O[T++]=I[D][j];return O}(o,t,r)}function createSymbol(t,r,a,o){let c;if(Array.isArray(t))c=b.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let i=r;if(!i){const r=b.rawSplit(t);i=y.getBestVersionForData(r,a)}c=b.fromString(t,i||40)}}const h=y.getBestVersionForData(c,a);if(!h)throw new Error("The amount of data is too big to be stored in a QR Code");if(r){if(r<h)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+h+".\n")}else r=h;const m=createData(r,a,c),g=i.getSymbolSize(r),v=new l(g);return function setupFinderPattern(t,r){const a=t.size,i=d.getPositions(r);for(let r=0;r<i.length;r++){const o=i[r][0],c=i[r][1];for(let r=-1;r<=7;r++)if(!(o+r<=-1||a<=o+r))for(let i=-1;i<=7;i++)c+i<=-1||a<=c+i||(r>=0&&r<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===r||6===r)||r>=2&&r<=4&&i>=2&&i<=4?t.set(o+r,c+i,!0,!0):t.set(o+r,c+i,!1,!0))}}(v,r),function setupTimingPattern(t){const r=t.size;for(let a=8;a<r-8;a++){const r=a%2==0;t.set(a,6,r,!0),t.set(6,a,r,!0)}}(v),function setupAlignmentPattern(t,r){const a=u.getPositions(r);for(let r=0;r<a.length;r++){const i=a[r][0],o=a[r][1];for(let r=-2;r<=2;r++)for(let a=-2;a<=2;a++)-2===r||2===r||-2===a||2===a||0===r&&0===a?t.set(i+r,o+a,!0,!0):t.set(i+r,o+a,!1,!0)}}(v,r),setupFormatInfo(v,a,0),r>=7&&function setupVersionInfo(t,r){const a=t.size,i=y.getEncodedBits(r);let o,c,l;for(let r=0;r<18;r++)o=Math.floor(r/3),c=r%3+a-8-3,l=1==(i>>r&1),t.set(o,c,l,!0),t.set(c,o,l,!0)}(v,r),function setupData(t,r){const a=t.size;let i=-1,o=a-1,c=7,l=0;for(let u=a-1;u>0;u-=2)for(6===u&&u--;;){for(let a=0;a<2;a++)if(!t.isReserved(o,u-a)){let i=!1;l<r.length&&(i=1==(r[l]>>>c&1)),t.set(o,u-a,i),c--,-1===c&&(l++,c=7)}if(o+=i,o<0||a<=o){o-=i,i=-i;break}}}(v,m),isNaN(o)&&(o=p.getBestMask(v,setupFormatInfo.bind(null,v,a))),p.applyMask(o,v),setupFormatInfo(v,a,o),{modules:v,version:r,errorCorrectionLevel:a,maskPattern:o,segments:c}}r.create=function create(t,r){if(void 0===t||""===t)throw new Error("No input text");let a,c,l=o.M;return void 0!==r&&(l=o.from(r.errorCorrectionLevel,o.M),a=y.from(r.version),c=p.from(r.maskPattern),r.toSJISFunc&&i.setToSJISFunction(r.toSJISFunc)),createSymbol(t,a,l,c)}},52882:(t,r,a)=>{const i=a(26143);function ReedSolomonEncoder(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}ReedSolomonEncoder.prototype.initialize=function initialize(t){this.degree=t,this.genPoly=i.generateECPolynomial(this.degree)},ReedSolomonEncoder.prototype.encode=function encode(t){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(t.length+this.degree);r.set(t);const a=i.mod(r,this.genPoly),o=this.degree-a.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(a,o),t}return a},t.exports=ReedSolomonEncoder},7007:(t,r)=>{const a="[0-9]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+")(?:.|[\r\n]))+";r.KANJI=new RegExp(i,"g"),r.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),r.BYTE=new RegExp(o,"g"),r.NUMERIC=new RegExp(a,"g"),r.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const c=new RegExp("^"+i+"$"),l=new RegExp("^[0-9]+$"),u=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");r.testKanji=function testKanji(t){return c.test(t)},r.testNumeric=function testNumeric(t){return l.test(t)},r.testAlphanumeric=function testAlphanumeric(t){return u.test(t)}},16130:(t,r,a)=>{const i=a(76910),o=a(41085),c=a(8260),l=a(43424),u=a(35442),d=a(7007),p=a(10242),h=a(65987);function getStringByteLength(t){return unescape(encodeURIComponent(t)).length}function getSegments(t,r,a){const i=[];let o;for(;null!==(o=t.exec(a));)i.push({data:o[0],index:o.index,mode:r,length:o[0].length});return i}function getSegmentsFromString(t){const r=getSegments(d.NUMERIC,i.NUMERIC,t),a=getSegments(d.ALPHANUMERIC,i.ALPHANUMERIC,t);let o,c;p.isKanjiModeEnabled()?(o=getSegments(d.BYTE,i.BYTE,t),c=getSegments(d.KANJI,i.KANJI,t)):(o=getSegments(d.BYTE_KANJI,i.BYTE,t),c=[]);return r.concat(a,o,c).sort((function(t,r){return t.index-r.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function getSegmentBitsLength(t,r){switch(r){case i.NUMERIC:return o.getBitsLength(t);case i.ALPHANUMERIC:return c.getBitsLength(t);case i.KANJI:return u.getBitsLength(t);case i.BYTE:return l.getBitsLength(t)}}function buildSingleSegment(t,r){let a;const d=i.getBestModeForData(t);if(a=i.from(r,d),a!==i.BYTE&&a.bit<d.bit)throw new Error('"'+t+'" cannot be encoded with mode '+i.toString(a)+".\n Suggested mode is: "+i.toString(d));switch(a!==i.KANJI||p.isKanjiModeEnabled()||(a=i.BYTE),a){case i.NUMERIC:return new o(t);case i.ALPHANUMERIC:return new c(t);case i.KANJI:return new u(t);case i.BYTE:return new l(t)}}r.fromArray=function fromArray(t){return t.reduce((function(t,r){return"string"==typeof r?t.push(buildSingleSegment(r,null)):r.data&&t.push(buildSingleSegment(r.data,r.mode)),t}),[])},r.fromString=function fromString(t,a){const o=function buildNodes(t){const r=[];for(let a=0;a<t.length;a++){const o=t[a];switch(o.mode){case i.NUMERIC:r.push([o,{data:o.data,mode:i.ALPHANUMERIC,length:o.length},{data:o.data,mode:i.BYTE,length:o.length}]);break;case i.ALPHANUMERIC:r.push([o,{data:o.data,mode:i.BYTE,length:o.length}]);break;case i.KANJI:r.push([o,{data:o.data,mode:i.BYTE,length:getStringByteLength(o.data)}]);break;case i.BYTE:r.push([{data:o.data,mode:i.BYTE,length:getStringByteLength(o.data)}])}}return r}(getSegmentsFromString(t,p.isKanjiModeEnabled())),c=function buildGraph(t,r){const a={},o={start:{}};let c=["start"];for(let l=0;l<t.length;l++){const u=t[l],d=[];for(let t=0;t<u.length;t++){const p=u[t],h=""+l+t;d.push(h),a[h]={node:p,lastCount:0},o[h]={};for(let t=0;t<c.length;t++){const l=c[t];a[l]&&a[l].node.mode===p.mode?(o[l][h]=getSegmentBitsLength(a[l].lastCount+p.length,p.mode)-getSegmentBitsLength(a[l].lastCount,p.mode),a[l].lastCount+=p.length):(a[l]&&(a[l].lastCount=p.length),o[l][h]=getSegmentBitsLength(p.length,p.mode)+4+i.getCharCountIndicator(p.mode,r))}}c=d}for(let t=0;t<c.length;t++)o[c[t]].end=0;return{map:o,table:a}}(o,a),l=h.find_path(c.map,"start","end"),u=[];for(let t=1;t<l.length-1;t++)u.push(c.table[l[t]].node);return r.fromArray(function mergeSegments(t){return t.reduce((function(t,r){const a=t.length-1>=0?t[t.length-1]:null;return a&&a.mode===r.mode?(t[t.length-1].data+=r.data,t):(t.push(r),t)}),[])}(u))},r.rawSplit=function rawSplit(t){return r.fromArray(getSegmentsFromString(t,p.isKanjiModeEnabled()))}},10242:(t,r)=>{let a;const i=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];r.getSymbolSize=function getSymbolSize(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},r.getSymbolTotalCodewords=function getSymbolTotalCodewords(t){return i[t]},r.getBCHDigit=function(t){let r=0;for(;0!==t;)r++,t>>>=1;return r},r.setToSJISFunction=function setToSJISFunction(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');a=t},r.isKanjiModeEnabled=function(){return void 0!==a},r.toSJIS=function toSJIS(t){return a(t)}},43114:(t,r)=>{r.isValid=function isValid(t){return!isNaN(t)&&t>=1&&t<=40}},23103:(t,r,a)=>{const i=a(10242),o=a(35393),c=a(64908),l=a(76910),u=a(43114),d=i.getBCHDigit(7973);function getReservedBitsCount(t,r){return l.getCharCountIndicator(t,r)+4}function getTotalBitsFromDataArray(t,r){let a=0;return t.forEach((function(t){const i=getReservedBitsCount(t.mode,r);a+=i+t.getBitsLength()})),a}r.from=function from(t,r){return u.isValid(t)?parseInt(t,10):r},r.getCapacity=function getCapacity(t,r,a){if(!u.isValid(t))throw new Error("Invalid QR Code version");void 0===a&&(a=l.BYTE);const c=8*(i.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,r));if(a===l.MIXED)return c;const d=c-getReservedBitsCount(a,t);switch(a){case l.NUMERIC:return Math.floor(d/10*3);case l.ALPHANUMERIC:return Math.floor(d/11*2);case l.KANJI:return Math.floor(d/13);case l.BYTE:default:return Math.floor(d/8)}},r.getBestVersionForData=function getBestVersionForData(t,a){let i;const o=c.from(a,c.M);if(Array.isArray(t)){if(t.length>1)return function getBestVersionForMixedData(t,a){for(let i=1;i<=40;i++)if(getTotalBitsFromDataArray(t,i)<=r.getCapacity(i,a,l.MIXED))return i}(t,o);if(0===t.length)return 1;i=t[0]}else i=t;return function getBestVersionForDataLength(t,a,i){for(let o=1;o<=40;o++)if(a<=r.getCapacity(o,i,t))return o}(i.mode,i.getLength(),o)},r.getEncodedBits=function getEncodedBits(t){if(!u.isValid(t)||t<7)throw new Error("Invalid QR Code version");let r=t<<12;for(;i.getBCHDigit(r)-d>=0;)r^=7973<<i.getBCHDigit(r)-d;return t<<12|r}},6907:(t,r,a)=>{const i=a(89653);r.render=function render(t,r,a){let o=a,c=r;void 0!==o||r&&r.getContext||(o=r,r=void 0),r||(c=function getCanvasElement(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=i.getOptions(o);const l=i.getImageWidth(t.modules.size,o),u=c.getContext("2d"),d=u.createImageData(l,l);return i.qrToImageData(d.data,t,o),function clearCanvas(t,r,a){t.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=a,r.width=a,r.style.height=a+"px",r.style.width=a+"px"}(u,c,l),u.putImageData(d,0,0),c},r.renderToDataURL=function renderToDataURL(t,a,i){let o=i;void 0!==o||a&&a.getContext||(o=a,a=void 0),o||(o={});const c=r.render(t,a,o),l=o.type||"image/png",u=o.rendererOpts||{};return c.toDataURL(l,u.quality)}},93776:(t,r,a)=>{const i=a(89653);function getColorAttrib(t,r){const a=t.a/255,i=r+'="'+t.hex+'"';return a<1?i+" "+r+'-opacity="'+a.toFixed(2).slice(1)+'"':i}function svgCmd(t,r,a){let i=t+r;return void 0!==a&&(i+=" "+a),i}r.render=function render(t,r,a){const o=i.getOptions(r),c=t.modules.size,l=t.modules.data,u=c+2*o.margin,d=o.color.light.a?"<path "+getColorAttrib(o.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",p="<path "+getColorAttrib(o.color.dark,"stroke")+' d="'+function qrToPath(t,r,a){let i="",o=0,c=!1,l=0;for(let u=0;u<t.length;u++){const d=Math.floor(u%r),p=Math.floor(u/r);d||c||(c=!0),t[u]?(l++,u>0&&d>0&&t[u-1]||(i+=c?svgCmd("M",d+a,.5+p+a):svgCmd("m",o,0),o=0,c=!1),d+1<r&&t[u+1]||(i+=svgCmd("h",l),l=0)):o++}return i}(l,c,o.margin)+'"/>',h='viewBox="0 0 '+u+" "+u+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+h+' shape-rendering="crispEdges">'+d+p+"</svg>\n";return"function"==typeof a&&a(null,m),m}},89653:(t,r)=>{function hex2rgba(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let r=t.slice().replace("#","").split("");if(r.length<3||5===r.length||r.length>8)throw new Error("Invalid hex color: "+t);3!==r.length&&4!==r.length||(r=Array.prototype.concat.apply([],r.map((function(t){return[t,t]})))),6===r.length&&r.push("F","F");const a=parseInt(r.join(""),16);return{r:a>>24&255,g:a>>16&255,b:a>>8&255,a:255&a,hex:"#"+r.slice(0,6).join("")}}r.getOptions=function getOptions(t){t||(t={}),t.color||(t.color={});const r=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,a=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:a,scale:a?4:i,margin:r,color:{dark:hex2rgba(t.color.dark||"#000000ff"),light:hex2rgba(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},r.getScale=function getScale(t,r){return r.width&&r.width>=t+2*r.margin?r.width/(t+2*r.margin):r.scale},r.getImageWidth=function getImageWidth(t,a){const i=r.getScale(t,a);return Math.floor((t+2*a.margin)*i)},r.qrToImageData=function qrToImageData(t,a,i){const o=a.modules.size,c=a.modules.data,l=r.getScale(o,i),u=Math.floor((o+2*i.margin)*l),d=i.margin*l,p=[i.color.light,i.color.dark];for(let r=0;r<u;r++)for(let a=0;a<u;a++){let h=4*(r*u+a),m=i.color.light;if(r>=d&&a>=d&&r<u-d&&a<u-d){m=p[c[Math.floor((r-d)/l)*o+Math.floor((a-d)/l)]?1:0]}t[h++]=m.r,t[h++]=m.g,t[h++]=m.b,t[h]=m.a}}},28660:()=>{var t;!function(t){!function(r){var a="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),i=makeExporter(t);function makeExporter(t,r){return function(a,i){"function"!=typeof t[a]&&Object.defineProperty(t,a,{configurable:!0,writable:!0,value:i}),r&&r(a,i)}}void 0===a.Reflect?a.Reflect=t:i=makeExporter(a.Reflect,i),function(t){var r=Object.prototype.hasOwnProperty,a="function"==typeof Symbol,i=a&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=a&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",c="function"==typeof Object.create,l={__proto__:[]}instanceof Array,u=!c&&!l,d={create:c?function(){return MakeDictionary(Object.create(null))}:l?function(){return MakeDictionary({__proto__:null})}:function(){return MakeDictionary({})},has:u?function(t,a){return r.call(t,a)}:function(t,r){return r in t},get:u?function(t,a){return r.call(t,a)?t[a]:void 0}:function(t,r){return t[r]}},p=Object.getPrototypeOf(Function),h="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,m=h||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?CreateMapPolyfill():Map,y=h||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?CreateSetPolyfill():Set,g=new(h||"function"!=typeof WeakMap?CreateWeakMapPolyfill():WeakMap);function decorate(t,r,a,i){if(IsUndefined(a)){if(!IsArray(t))throw new TypeError;if(!IsConstructor(r))throw new TypeError;return DecorateConstructor(t,r)}if(!IsArray(t))throw new TypeError;if(!IsObject(r))throw new TypeError;if(!IsObject(i)&&!IsUndefined(i)&&!IsNull(i))throw new TypeError;return IsNull(i)&&(i=void 0),DecorateProperty(t,r,a=ToPropertyKey(a),i)}function metadata(t,r){function decorator(a,i){if(!IsObject(a))throw new TypeError;if(!IsUndefined(i)&&!IsPropertyKey(i))throw new TypeError;OrdinaryDefineOwnMetadata(t,r,a,i)}return decorator}function defineMetadata(t,r,a,i){if(!IsObject(a))throw new TypeError;return IsUndefined(i)||(i=ToPropertyKey(i)),OrdinaryDefineOwnMetadata(t,r,a,i)}function hasMetadata(t,r,a){if(!IsObject(r))throw new TypeError;return IsUndefined(a)||(a=ToPropertyKey(a)),OrdinaryHasMetadata(t,r,a)}function hasOwnMetadata(t,r,a){if(!IsObject(r))throw new TypeError;return IsUndefined(a)||(a=ToPropertyKey(a)),OrdinaryHasOwnMetadata(t,r,a)}function getMetadata(t,r,a){if(!IsObject(r))throw new TypeError;return IsUndefined(a)||(a=ToPropertyKey(a)),OrdinaryGetMetadata(t,r,a)}function getOwnMetadata(t,r,a){if(!IsObject(r))throw new TypeError;return IsUndefined(a)||(a=ToPropertyKey(a)),OrdinaryGetOwnMetadata(t,r,a)}function getMetadataKeys(t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryMetadataKeys(t,r)}function getOwnMetadataKeys(t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryOwnMetadataKeys(t,r)}function deleteMetadata(t,r,a){if(!IsObject(r))throw new TypeError;IsUndefined(a)||(a=ToPropertyKey(a));var i=GetOrCreateMetadataMap(r,a,!1);if(IsUndefined(i))return!1;if(!i.delete(t))return!1;if(i.size>0)return!0;var o=g.get(r);return o.delete(a),o.size>0||g.delete(r),!0}function DecorateConstructor(t,r){for(var a=t.length-1;a>=0;--a){var i=(0,t[a])(r);if(!IsUndefined(i)&&!IsNull(i)){if(!IsConstructor(i))throw new TypeError;r=i}}return r}function DecorateProperty(t,r,a,i){for(var o=t.length-1;o>=0;--o){var c=(0,t[o])(r,a,i);if(!IsUndefined(c)&&!IsNull(c)){if(!IsObject(c))throw new TypeError;i=c}}return i}function GetOrCreateMetadataMap(t,r,a){var i=g.get(t);if(IsUndefined(i)){if(!a)return;i=new m,g.set(t,i)}var o=i.get(r);if(IsUndefined(o)){if(!a)return;o=new m,i.set(r,o)}return o}function OrdinaryHasMetadata(t,r,a){if(OrdinaryHasOwnMetadata(t,r,a))return!0;var i=OrdinaryGetPrototypeOf(r);return!IsNull(i)&&OrdinaryHasMetadata(t,i,a)}function OrdinaryHasOwnMetadata(t,r,a){var i=GetOrCreateMetadataMap(r,a,!1);return!IsUndefined(i)&&ToBoolean(i.has(t))}function OrdinaryGetMetadata(t,r,a){if(OrdinaryHasOwnMetadata(t,r,a))return OrdinaryGetOwnMetadata(t,r,a);var i=OrdinaryGetPrototypeOf(r);return IsNull(i)?void 0:OrdinaryGetMetadata(t,i,a)}function OrdinaryGetOwnMetadata(t,r,a){var i=GetOrCreateMetadataMap(r,a,!1);if(!IsUndefined(i))return i.get(t)}function OrdinaryDefineOwnMetadata(t,r,a,i){GetOrCreateMetadataMap(a,i,!0).set(t,r)}function OrdinaryMetadataKeys(t,r){var a=OrdinaryOwnMetadataKeys(t,r),i=OrdinaryGetPrototypeOf(t);if(null===i)return a;var o=OrdinaryMetadataKeys(i,r);if(o.length<=0)return a;if(a.length<=0)return o;for(var c=new y,l=[],u=0,d=a;u<d.length;u++){var p=d[u];c.has(p)||(c.add(p),l.push(p))}for(var h=0,m=o;h<m.length;h++){p=m[h];c.has(p)||(c.add(p),l.push(p))}return l}function OrdinaryOwnMetadataKeys(t,r){var a=[],i=GetOrCreateMetadataMap(t,r,!1);if(IsUndefined(i))return a;for(var o=GetIterator(i.keys()),c=0;;){var l=IteratorStep(o);if(!l)return a.length=c,a;var u=IteratorValue(l);try{a[c]=u}catch(t){try{IteratorClose(o)}finally{throw t}}c++}}function Type(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function IsUndefined(t){return void 0===t}function IsNull(t){return null===t}function IsSymbol(t){return"symbol"==typeof t}function IsObject(t){return"object"==typeof t?null!==t:"function"==typeof t}function ToPrimitive(t,r){switch(Type(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var a=3===r?"string":5===r?"number":"default",o=GetMethod(t,i);if(void 0!==o){var c=o.call(t,a);if(IsObject(c))throw new TypeError;return c}return OrdinaryToPrimitive(t,"default"===a?"number":a)}function OrdinaryToPrimitive(t,r){if("string"===r){var a=t.toString;if(IsCallable(a))if(!IsObject(o=a.call(t)))return o;if(IsCallable(i=t.valueOf))if(!IsObject(o=i.call(t)))return o}else{var i;if(IsCallable(i=t.valueOf))if(!IsObject(o=i.call(t)))return o;var o,c=t.toString;if(IsCallable(c))if(!IsObject(o=c.call(t)))return o}throw new TypeError}function ToBoolean(t){return!!t}function ToString(t){return""+t}function ToPropertyKey(t){var r=ToPrimitive(t,3);return IsSymbol(r)?r:ToString(r)}function IsArray(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function IsCallable(t){return"function"==typeof t}function IsConstructor(t){return"function"==typeof t}function IsPropertyKey(t){switch(Type(t)){case 3:case 4:return!0;default:return!1}}function GetMethod(t,r){var a=t[r];if(null!=a){if(!IsCallable(a))throw new TypeError;return a}}function GetIterator(t){var r=GetMethod(t,o);if(!IsCallable(r))throw new TypeError;var a=r.call(t);if(!IsObject(a))throw new TypeError;return a}function IteratorValue(t){return t.value}function IteratorStep(t){var r=t.next();return!r.done&&r}function IteratorClose(t){var r=t.return;r&&r.call(t)}function OrdinaryGetPrototypeOf(t){var r=Object.getPrototypeOf(t);if("function"!=typeof t||t===p)return r;if(r!==p)return r;var a=t.prototype,i=a&&Object.getPrototypeOf(a);if(null==i||i===Object.prototype)return r;var o=i.constructor;return"function"!=typeof o||o===t?r:o}function CreateMapPolyfill(){var t={},r=[],a=function(){function MapIterator(t,r,a){this._index=0,this._keys=t,this._values=r,this._selector=a}return MapIterator.prototype["@@iterator"]=function(){return this},MapIterator.prototype[o]=function(){return this},MapIterator.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var a=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=r,this._values=r):this._index++,{value:a,done:!1}}return{value:void 0,done:!0}},MapIterator.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=r,this._values=r),t},MapIterator.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=r,this._values=r),{value:t,done:!0}},MapIterator}();return function(){function Map(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(Map.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Map.prototype.has=function(t){return this._find(t,!1)>=0},Map.prototype.get=function(t){var r=this._find(t,!1);return r>=0?this._values[r]:void 0},Map.prototype.set=function(t,r){var a=this._find(t,!0);return this._values[a]=r,this},Map.prototype.delete=function(r){var a=this._find(r,!1);if(a>=0){for(var i=this._keys.length,o=a+1;o<i;o++)this._keys[o-1]=this._keys[o],this._values[o-1]=this._values[o];return this._keys.length--,this._values.length--,r===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},Map.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},Map.prototype.keys=function(){return new a(this._keys,this._values,getKey)},Map.prototype.values=function(){return new a(this._keys,this._values,getValue)},Map.prototype.entries=function(){return new a(this._keys,this._values,getEntry)},Map.prototype["@@iterator"]=function(){return this.entries()},Map.prototype[o]=function(){return this.entries()},Map.prototype._find=function(t,r){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),this._cacheIndex<0&&r&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},Map}();function getKey(t,r){return t}function getValue(t,r){return r}function getEntry(t,r){return[t,r]}}function CreateSetPolyfill(){return function(){function Set(){this._map=new m}return Object.defineProperty(Set.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),Set.prototype.has=function(t){return this._map.has(t)},Set.prototype.add=function(t){return this._map.set(t,t),this},Set.prototype.delete=function(t){return this._map.delete(t)},Set.prototype.clear=function(){this._map.clear()},Set.prototype.keys=function(){return this._map.keys()},Set.prototype.values=function(){return this._map.values()},Set.prototype.entries=function(){return this._map.entries()},Set.prototype["@@iterator"]=function(){return this.keys()},Set.prototype[o]=function(){return this.keys()},Set}()}function CreateWeakMapPolyfill(){var t=16,a=d.create(),i=CreateUniqueKey();return function(){function WeakMap(){this._key=CreateUniqueKey()}return WeakMap.prototype.has=function(t){var r=GetOrCreateWeakMapTable(t,!1);return void 0!==r&&d.has(r,this._key)},WeakMap.prototype.get=function(t){var r=GetOrCreateWeakMapTable(t,!1);return void 0!==r?d.get(r,this._key):void 0},WeakMap.prototype.set=function(t,r){return GetOrCreateWeakMapTable(t,!0)[this._key]=r,this},WeakMap.prototype.delete=function(t){var r=GetOrCreateWeakMapTable(t,!1);return void 0!==r&&delete r[this._key]},WeakMap.prototype.clear=function(){this._key=CreateUniqueKey()},WeakMap}();function CreateUniqueKey(){var t;do{t="@@WeakMap@@"+CreateUUID()}while(d.has(a,t));return a[t]=!0,t}function GetOrCreateWeakMapTable(t,a){if(!r.call(t,i)){if(!a)return;Object.defineProperty(t,i,{value:d.create()})}return t[i]}function FillRandomBytes(t,r){for(var a=0;a<r;++a)t[a]=255*Math.random()|0;return t}function GenRandomBytes(t){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):FillRandomBytes(new Uint8Array(t),t):FillRandomBytes(new Array(t),t)}function CreateUUID(){var r=GenRandomBytes(t);r[6]=79&r[6]|64,r[8]=191&r[8]|128;for(var a="",i=0;i<t;++i){var o=r[i];4!==i&&6!==i&&8!==i||(a+="-"),o<16&&(a+="0"),a+=o.toString(16).toLowerCase()}return a}}function MakeDictionary(t){return t.__=void 0,delete t.__,t}t("decorate",decorate),t("metadata",metadata),t("defineMetadata",defineMetadata),t("hasMetadata",hasMetadata),t("hasOwnMetadata",hasOwnMetadata),t("getMetadata",getMetadata),t("getOwnMetadata",getOwnMetadata),t("getMetadataKeys",getMetadataKeys),t("getOwnMetadataKeys",getOwnMetadataKeys),t("deleteMetadata",deleteMetadata)}(i)}()}(t||(t={}))},94714:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.nameof=void 0;var i=a(6898);Object.defineProperty(r,"nameof",{enumerable:!0,get:function(){return i.nameof}})},6898:(t,r)=>{"use strict";function cleanseAssertionOperators(t){return t.replace(/[?!]/g,"")}Object.defineProperty(r,"__esModule",{value:!0}),r.nameof=void 0,r.nameof=function nameof(t,r){var a=t.toString();if(a.startsWith("class ")&&!a.startsWith("class =>"))return cleanseAssertionOperators(a.substring("class ".length,a.indexOf(" {")));if(a.includes("=>"))return cleanseAssertionOperators(a.substring(a.indexOf(".")+1));var i=a.match(/function\s*\(\w+\)\s*\{[\r\n\s]*return\s+\w+\.((\w+\.)*(\w+))/i);if(i)return r&&r.lastProp?i[3]:i[1];if(a.startsWith("function "))return cleanseAssertionOperators(a.substring("function ".length,a.indexOf("(")));throw new Error("ts-simple-nameof: Invalid function.")}},51694:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(25519),o=a(22866),c=a(29208),l=a(31468);class IoCBindConfig{constructor(t,r,a){this.source=t,this.instanceFactory=r,this.valueFactory=a}to(t){i.InjectorHandler.checkType(t);const r=i.InjectorHandler.getConstructorFromType(t);return this.targetSource=r,this.source===r?this.factory((r=>{const a=this.getParameters(r),i=this.decoratedConstructor||t;return a?new i(...a):new i})):this.factory((r=>this.instanceFactory(t,r))),this}factory(t){return this.iocFactory=r=>{const a=i.InjectorHandler.unblockInstantiation(),o=this.decoratedConstructor||this.targetSource||this.source;i.InjectorHandler.injectContext(o,r);const c=t(r);return i.InjectorHandler.removeContext(o),i.InjectorHandler.injectContext(c,r),i.InjectorHandler.blockInstantiation(a),c},this.iocScope&&this.iocScope.reset(this.source),this}scope(t){return this.iocScope&&this.iocScope!==t&&this.iocScope.finish(this.source),this.iocScope=t,this.iocScope&&this.iocScope.init(this.source),this}withParams(...t){return this.paramTypes=t,this}instrumentConstructor(){const t=i.InjectorHandler.instrumentConstructor(this.source);return this.decoratedConstructor=t,this.source.constructor=t,this}getInstance(t){return this.iocScope||this.scope(o.Scope.Local),this.iocScope.resolve(this.iocFactory,this.source,t)}clone(){const t=new IoCBindConfig(this.source,this.instanceFactory,this.valueFactory);return t.iocFactory=this.iocFactory,t.iocScope=this.iocScope,t.targetSource=this.targetSource,t.paramTypes=this.paramTypes,t.decoratedConstructor=this.decoratedConstructor,t}getParameters(t){return this.paramTypes?this.paramTypes.map((r=>"string"==typeof r||r instanceof String?this.valueFactory(r):this.instanceFactory(r,t))):null}}r.IoCBindConfig=IoCBindConfig;class IoCBindValueConfig{constructor(t){this.name=t}to(t){return this.path?(this.value=this.value||{},l(this.value,this.path,t)):this.value=t,this}getValue(){return this.path?c(this.value,this.path):this.value}clone(){const t=new IoCBindValueConfig(this.name);return t.path=this.path,t.value=this.value,t}}r.IoCBindValueConfig=IoCBindValueConfig;class PropertyPath{constructor(t,r){this.name=t,this.path=r}static parse(t){const r=t.indexOf(".");if(r<0)return new PropertyPath(t);if(0===r)throw new TypeError(`Invalid value [${t}] passed to Container.bindName`);return r+1<t.length?new PropertyPath(t.substring(0,r),t.substring(r+1)):new PropertyPath(t.substring(0,r))}}r.PropertyPath=PropertyPath},26878:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.ContainerNamespaces=class ContainerNamespaces{constructor(){this.defaultNamespace=new NamespaceBindings(null),this.namespaces=new Map}get(t){let r;return this.currentNamespace&&(r=this.currentNamespace.get(t),r)?r:this.defaultNamespace.get(t)}set(t,r){(this.currentNamespace||this.defaultNamespace).set(t,r)}getValue(t){let r;return this.currentNamespace&&(r=this.currentNamespace.getValue(t),r)?r:this.defaultNamespace.getValue(t)}setValue(t,r){(this.currentNamespace||this.defaultNamespace).setValue(t,r)}selectNamespace(t){if(t){let r=this.namespaces.get(t);r||(r=new NamespaceBindings(t),this.namespaces.set(t,r)),this.currentNamespace=r}else this.currentNamespace=null}removeNamespace(t){const r=this.namespaces.get(t);r&&(this.currentNamespace&&r.name===this.currentNamespace.name&&(this.currentNamespace=null),r.clear(),this.namespaces.delete(t))}selectedNamespace(){return this.currentNamespace?this.currentNamespace.name:null}};class NamespaceBindings{constructor(t){this.bindings=new Map,this.values=new Map,this.name=t}get(t){return this.bindings.get(t)}set(t,r){r.namespace=this.name,this.bindings.set(t,r)}getValue(t){return this.values.get(t)}setValue(t,r){r.namespace=this.name,this.values.set(t,r)}clear(){this.bindings.clear(),this.values.clear()}}},45729:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(25519),o=a(51694),c=a(26878);class IoCContainer{static bind(t,r=!1){i.InjectorHandler.checkType(t);const a=i.InjectorHandler.getConstructorFromType(t);let c=IoCContainer.namespaces.get(a);return c?r||c.namespace===IoCContainer.namespaces.selectedNamespace()||(c=c.clone(),IoCContainer.namespaces.set(a,c)):(c=new o.IoCBindConfig(a,IoCContainer.get,IoCContainer.getValue),c.to(t),IoCContainer.namespaces.set(a,c)),c}static bindName(t,r=!1){i.InjectorHandler.checkName(t);const a=o.PropertyPath.parse(t);let c=IoCContainer.namespaces.getValue(a.name);return c?r||c.namespace===IoCContainer.namespaces.selectedNamespace()||(c=c.clone(),IoCContainer.namespaces.setValue(a.name,c)):(c=new o.IoCBindValueConfig(a.name),IoCContainer.namespaces.setValue(a.name,c)),c.path=a.path,c}static get(t,r){const a=IoCContainer.bind(t,!0);return a.iocFactory||a.to(a.source),a.getInstance(r)}static getValue(t){return IoCContainer.bindName(t,!0).getValue()}static getType(t){i.InjectorHandler.checkType(t);const r=i.InjectorHandler.getConstructorFromType(t),a=IoCContainer.namespaces.get(r);if(!a)throw new TypeError(`The type ${t.name} hasn't been registered with the IOC Container`);return a.targetSource||a.source}static namespace(t){return IoCContainer.namespaces.selectNamespace(t),{remove:()=>{t&&IoCContainer.namespaces.removeNamespace(t)}}}static selectedNamespace(){return IoCContainer.namespaces.selectedNamespace()}static injectProperty(t,r,a){i.InjectorHandler.injectProperty(t,r,a,IoCContainer.get)}static injectValueProperty(t,r,a){i.InjectorHandler.injectValueProperty(t,r,a,IoCContainer.getValue)}static snapshot(){const t="_snapshot-"+IoCContainer.snapshotsCount++,r=IoCContainer.namespace(t);return{restore:()=>r.remove(),select:()=>IoCContainer.namespace(t)}}}r.IoCContainer=IoCContainer,IoCContainer.namespaces=new c.ContainerNamespaces,IoCContainer.snapshotsCount=0},25519:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});class InjectorHandler{static instrumentConstructor(t){let r;return r=class ioc_wrapper extends t{constructor(...t){super(...t),InjectorHandler.assertInstantiable()}},r.__parent=t,r}static blockInstantiation(t){InjectorHandler.instantiationsBlocked=t}static unblockInstantiation(){const t=InjectorHandler.instantiationsBlocked;return InjectorHandler.instantiationsBlocked=!1,t}static getConstructorFromType(t){let r=t;if(this.hasNamedConstructor(r))return r;for(r=r.__parent;r;){if(this.hasNamedConstructor(r))return r;r=r.__parent}throw TypeError("Can not identify the base Type for requested target "+t.toString())}static checkType(t){if(!t)throw new TypeError("Invalid type requested to IoC container. Type is not defined.")}static checkName(t){if(!t)throw new TypeError("Invalid name requested to IoC container. Name is not defined.")}static injectContext(t,r){t.__BuildContext=r}static removeContext(t){delete t.__BuildContext}static injectProperty(t,r,a,i){const o=`__${r}`;Object.defineProperty(t.prototype,r,{enumerable:!0,get:function(){const r=this.__BuildContext||t.__BuildContext;return this[o]?this[o]:this[o]=i(a,r)},set:function(t){this[o]=t}})}static injectValueProperty(t,r,a,i){const o=`__${r}`;Object.defineProperty(t.prototype,r,{enumerable:!0,get:function(){return this[o]?this[o]:this[o]=i(a)},set:function(t){this[o]=t}})}static hasNamedConstructor(t){if(t.name)return"ioc_wrapper"!==t.name;try{const r=t.prototype.constructor.toString().match(this.constructorNameRegEx)[1];return r&&"ioc_wrapper"!==r}catch(t){}return!1}static assertInstantiable(){if(InjectorHandler.instantiationsBlocked)throw new TypeError("Can not instantiate it. The instantiation is blocked for this class. Ask Container for it, using Container.get")}}r.InjectorHandler=InjectorHandler,InjectorHandler.constructorNameRegEx=/function (\w*)/,InjectorHandler.instantiationsBlocked=!0},63415:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),a(28660);const i=a(45729),o=a(22866);function InjectPropertyDecorator(t,r){let a=Reflect.getMetadata("design:type",t,r);a||(a=Reflect.getMetadata("design:type",t.constructor,r)),i.IoCContainer.injectProperty(t.constructor,r,a)}function InjectParamDecorator(t,r,a){if(!r){const r=i.IoCContainer.bind(t);r.paramTypes=r.paramTypes||[];const o=Reflect.getMetadata("design:paramtypes",t);r.paramTypes.unshift(o[a])}}function InjectValuePropertyDecorator(t,r,a){i.IoCContainer.injectValueProperty(t.constructor,r,a)}function InjectValueParamDecorator(t,r,a,o){if(!r){const r=i.IoCContainer.bind(t);r.paramTypes=r.paramTypes||[],r.paramTypes.unshift(o)}}r.InRequestScope=function InRequestScope(t){i.IoCContainer.bind(t).scope(o.Scope.Request)},r.Singleton=function Singleton(t){i.IoCContainer.bind(t).scope(o.Scope.Singleton)},r.OnlyInstantiableByContainer=function OnlyInstantiableByContainer(t){return i.IoCContainer.bind(t).instrumentConstructor().decoratedConstructor},r.Scoped=function Scoped(t){return r=>{i.IoCContainer.bind(r).scope(t)}},r.Factory=function Factory(t){return r=>{i.IoCContainer.bind(r).factory(t)}},r.Inject=function Inject(...t){if(2===t.length||3===t.length&&void 0===t[2])return InjectPropertyDecorator.apply(this,t);if(3===t.length&&"number"==typeof t[2])return InjectParamDecorator.apply(this,t);throw new TypeError("Invalid @Inject Decorator declaration.")},r.InjectValue=function InjectValue(t){return(...r)=>{if(2===r.length||3===r.length&&void 0===r[2]){const a=[...r,t].filter((t=>!!t));return InjectValuePropertyDecorator.apply(this,a)}if(3===r.length&&"number"==typeof r[2])return InjectValueParamDecorator.apply(this,[...r,t]);throw new TypeError("Invalid @InjectValue Decorator declaration.")}}},22866:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.Scope=class Scope{reset(t){}init(t){}finish(t){}};r.BuildContext=class BuildContext{}},52464:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const i=a(25519),o=a(22866);class LocalScope extends o.Scope{resolve(t,r,a){return t(a)}}r.LocalScope=LocalScope;class SingletonScope extends o.Scope{resolve(t,r,a){let i=SingletonScope.instances.get(r);return i||(i=t(a),SingletonScope.instances.set(r,i)),i}reset(t){SingletonScope.instances.delete(i.InjectorHandler.getConstructorFromType(t))}init(t){this.reset(t)}finish(t){this.reset(t)}}r.SingletonScope=SingletonScope,SingletonScope.instances=new Map;class RequestScope extends o.Scope{resolve(t,r,a){return this.ensureContext(a),a.build(r,t)}ensureContext(t){if(!t)throw new TypeError("IoC Container can not handle this request. When using @InRequestScope in any dependent type, you should be askking to Container to create the instances through Container.get and not calling the type constructor directly.")}}r.RequestScope=RequestScope},7071:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),a(28660);const i=a(22866);r.Scope=i.Scope,r.BuildContext=i.BuildContext;const o=a(45729),c=a(52464);var l=a(63415);r.Inject=l.Inject,r.Factory=l.Factory,r.Singleton=l.Singleton,r.Scoped=l.Scoped,r.OnlyInstantiableByContainer=l.OnlyInstantiableByContainer,r.InRequestScope=l.InRequestScope,r.InjectValue=l.InjectValue,i.Scope.Local=new c.LocalScope,i.Scope.Singleton=new c.SingletonScope,i.Scope.Request=new c.RequestScope;class Container{static bind(t){return o.IoCContainer.bind(t)}static get(t){return o.IoCContainer.get(t,new ContainerBuildContext)}static getType(t){return o.IoCContainer.getType(t)}static bindName(t){return o.IoCContainer.bindName(t)}static getValue(t){return o.IoCContainer.getValue(t)}static namespace(t){return o.IoCContainer.namespace(t)}static environment(t){return Container.namespace(t)}static snapshot(t){return o.IoCContainer.snapshot()}static configure(...t){t.forEach((t=>{t.bind?Container.configureType(t):t.bindName?Container.configureConstant(t):(t.env||t.namespace)&&Container.configureNamespace(t)}))}static configureNamespace(t){const r=o.IoCContainer.selectedNamespace(),a=t.env||t.namespace;Object.keys(a).forEach((t=>{Container.namespace(t);const r=a[t];Container.configure(...r)})),Container.namespace(r)}static configureConstant(t){const r=o.IoCContainer.bindName(t.bindName);r&&t.to&&r.to(t.to)}static configureType(t){const r=o.IoCContainer.bind(t.bind);r&&(t.to?r.to(t.to):t.factory&&r.factory(t.factory),t.scope&&r.scope(t.scope),t.withParams&&r.withParams(t.withParams))}}r.Container=Container;class ContainerBuildContext extends i.BuildContext{constructor(){super(...arguments),this.context=new Map}build(t,r){let a=this.context.get(t);return a||(a=r(this),this.context.set(t,a)),a}resolve(t){return o.IoCContainer.get(t,this)}}},60540:function(t,r){!function(t){"use strict";function merge(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];if(r.length>1){r[0]=r[0].slice(0,-1);for(var i=r.length-1,o=1;o<i;++o)r[o]=r[o].slice(1,-1);return r[i]=r[i].slice(1),r.join("")}return r[0]}function subexp(t){return"(?:"+t+")"}function typeOf(t){return void 0===t?"undefined":null===t?"null":Object.prototype.toString.call(t).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(t){return t.toUpperCase()}function toArray(t){return null!=t?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[]}function assign(t,r){var a=t;if(r)for(var i in r)a[i]=r[i];return a}function buildExps(t){var r="[A-Za-z]",a="[0-9]",i=merge(a,"[A-Fa-f]"),o=subexp(subexp("%[EFef]"+i+"%"+i+i+"%"+i+i)+"|"+subexp("%[89A-Fa-f]"+i+"%"+i+i)+"|"+subexp("%"+i+i)),c="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",l=merge("[\\:\\/\\?\\#\\[\\]\\@]",c),u=t?"[\\uE000-\\uF8FF]":"[]",d=merge(r,a,"[\\-\\.\\_\\~]",t?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),p=subexp(r+merge(r,a,"[\\+\\-\\.]")+"*"),h=subexp(subexp(o+"|"+merge(d,c,"[\\:]"))+"*"),m=(subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+a)+"|"+subexp("1"+a+a)+"|"+subexp("[1-9]"+a)+"|"+a),subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+a)+"|"+subexp("1"+a+a)+"|"+subexp("0?[1-9]"+a)+"|0?0?"+a)),y=subexp(m+"\\."+m+"\\."+m+"\\."+m),g=subexp(i+"{1,4}"),v=subexp(subexp(g+"\\:"+g)+"|"+y),b=subexp(subexp(g+"\\:")+"{6}"+v),R=subexp("\\:\\:"+subexp(g+"\\:")+"{5}"+v),C=subexp(subexp(g)+"?\\:\\:"+subexp(g+"\\:")+"{4}"+v),I=subexp(subexp(subexp(g+"\\:")+"{0,1}"+g)+"?\\:\\:"+subexp(g+"\\:")+"{3}"+v),w=subexp(subexp(subexp(g+"\\:")+"{0,2}"+g)+"?\\:\\:"+subexp(g+"\\:")+"{2}"+v),S=subexp(subexp(subexp(g+"\\:")+"{0,3}"+g)+"?\\:\\:"+g+"\\:"+v),O=subexp(subexp(subexp(g+"\\:")+"{0,4}"+g)+"?\\:\\:"+v),j=subexp(subexp(subexp(g+"\\:")+"{0,5}"+g)+"?\\:\\:"+g),D=subexp(subexp(subexp(g+"\\:")+"{0,6}"+g)+"?\\:\\:"),T=subexp([b,R,C,I,w,S,O,j,D].join("|")),A=subexp(subexp(d+"|"+o)+"+"),P=(subexp(T+"\\%25"+A),subexp(T+subexp("\\%25|\\%(?!"+i+"{2})")+A)),E=subexp("[vV]"+i+"+\\."+merge(d,c,"[\\:]")+"+"),M=subexp("\\["+subexp(P+"|"+T+"|"+E)+"\\]"),x=subexp(subexp(o+"|"+merge(d,c))+"*"),$=subexp(M+"|"+y+"(?!"+x+")|"+x),k=subexp(a+"*"),N=subexp(subexp(h+"@")+"?"+$+subexp("\\:"+k)+"?"),q=subexp(o+"|"+merge(d,c,"[\\:\\@]")),V=subexp(q+"*"),U=subexp(q+"+"),B=subexp(subexp(o+"|"+merge(d,c,"[\\@]"))+"+"),L=subexp(subexp("\\/"+V)+"*"),G=subexp("\\/"+subexp(U+L)+"?"),z=subexp(B+L),Z=subexp(U+L),K="(?!"+q+")",H=(subexp(L+"|"+G+"|"+z+"|"+Z+"|"+K),subexp(subexp(q+"|"+merge("[\\/\\?]",u))+"*")),W=subexp(subexp(q+"|[\\/\\?]")+"*"),Y=subexp(subexp("\\/\\/"+N+L)+"|"+G+"|"+Z+"|"+K),J=subexp(p+"\\:"+Y+subexp("\\?"+H)+"?"+subexp("\\#"+W)+"?"),Q=subexp(subexp("\\/\\/"+N+L)+"|"+G+"|"+z+"|"+K),X=subexp(Q+subexp("\\?"+H)+"?"+subexp("\\#"+W)+"?");return subexp(J+"|"+X),subexp(p+"\\:"+Y+subexp("\\?"+H)+"?"),subexp(subexp("\\/\\/("+subexp("("+h+")@")+"?("+$+")"+subexp("\\:("+k+")")+"?)")+"?("+L+"|"+G+"|"+Z+"|"+K+")"),subexp("\\?("+H+")"),subexp("\\#("+W+")"),subexp(subexp("\\/\\/("+subexp("("+h+")@")+"?("+$+")"+subexp("\\:("+k+")")+"?)")+"?("+L+"|"+G+"|"+z+"|"+K+")"),subexp("\\?("+H+")"),subexp("\\#("+W+")"),subexp(subexp("\\/\\/("+subexp("("+h+")@")+"?("+$+")"+subexp("\\:("+k+")")+"?)")+"?("+L+"|"+G+"|"+Z+"|"+K+")"),subexp("\\?("+H+")"),subexp("\\#("+W+")"),subexp("("+h+")@"),subexp("\\:("+k+")"),{NOT_SCHEME:new RegExp(merge("[^]",r,a,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",d,c),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",d,c),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",d,c),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",d,c),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",d,c,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",d,c,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",d,c),"g"),UNRESERVED:new RegExp(d,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",d,l),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+y+")$"),IPV6ADDRESS:new RegExp("^\\[?("+T+")"+subexp(subexp("\\%25|\\%(?!"+i+"{2})")+"("+A+")")+"?\\]?$")}}var r=buildExps(!1),a=buildExps(!0),i=function(){function sliceIterator(t,r){var a=[],i=!0,o=!1,c=void 0;try{for(var l,u=t[Symbol.iterator]();!(i=(l=u.next()).done)&&(a.push(l.value),!r||a.length!==r);i=!0);}catch(t){o=!0,c=t}finally{try{!i&&u.return&&u.return()}finally{if(o)throw c}}return a}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return sliceIterator(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),toConsumableArray=function(t){if(Array.isArray(t)){for(var r=0,a=Array(t.length);r<t.length;r++)a[r]=t[r];return a}return Array.from(t)},o=2147483647,c=36,l=1,u=26,d=38,p=700,h=72,m=128,y="-",g=/^xn--/,v=/[^\0-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=c-l,I=Math.floor,w=String.fromCharCode;function error$1(t){throw new RangeError(R[t])}function map(t,r){for(var a=[],i=t.length;i--;)a[i]=r(t[i]);return a}function mapDomain(t,r){var a=t.split("@"),i="";return a.length>1&&(i=a[0]+"@",t=a[1]),i+map((t=t.replace(b,".")).split("."),r).join(".")}function ucs2decode(t){for(var r=[],a=0,i=t.length;a<i;){var o=t.charCodeAt(a++);if(o>=55296&&o<=56319&&a<i){var c=t.charCodeAt(a++);56320==(64512&c)?r.push(((1023&o)<<10)+(1023&c)+65536):(r.push(o),a--)}else r.push(o)}return r}var S=function basicToDigit(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:c},O=function digitToBasic(t,r){return t+22+75*(t<26)-((0!=r)<<5)},j=function adapt(t,r,a){var i=0;for(t=a?I(t/p):t>>1,t+=I(t/r);t>C*u>>1;i+=c)t=I(t/C);return I(i+(C+1)*t/(t+d))},D=function decode(t){var r=[],a=t.length,i=0,d=m,p=h,g=t.lastIndexOf(y);g<0&&(g=0);for(var v=0;v<g;++v)t.charCodeAt(v)>=128&&error$1("not-basic"),r.push(t.charCodeAt(v));for(var b=g>0?g+1:0;b<a;){for(var R=i,C=1,w=c;;w+=c){b>=a&&error$1("invalid-input");var O=S(t.charCodeAt(b++));(O>=c||O>I((o-i)/C))&&error$1("overflow"),i+=O*C;var D=w<=p?l:w>=p+u?u:w-p;if(O<D)break;var T=c-D;C>I(o/T)&&error$1("overflow"),C*=T}var A=r.length+1;p=j(i-R,A,0==R),I(i/A)>o-d&&error$1("overflow"),d+=I(i/A),i%=A,r.splice(i++,0,d)}return String.fromCodePoint.apply(String,r)},T=function encode(t){var r=[],a=(t=ucs2decode(t)).length,i=m,d=0,p=h,g=!0,v=!1,b=void 0;try{for(var R,C=t[Symbol.iterator]();!(g=(R=C.next()).done);g=!0){var S=R.value;S<128&&r.push(w(S))}}catch(t){v=!0,b=t}finally{try{!g&&C.return&&C.return()}finally{if(v)throw b}}var D=r.length,T=D;for(D&&r.push(y);T<a;){var A=o,P=!0,E=!1,M=void 0;try{for(var x,$=t[Symbol.iterator]();!(P=(x=$.next()).done);P=!0){var k=x.value;k>=i&&k<A&&(A=k)}}catch(t){E=!0,M=t}finally{try{!P&&$.return&&$.return()}finally{if(E)throw M}}var N=T+1;A-i>I((o-d)/N)&&error$1("overflow"),d+=(A-i)*N,i=A;var q=!0,V=!1,U=void 0;try{for(var B,L=t[Symbol.iterator]();!(q=(B=L.next()).done);q=!0){var G=B.value;if(G<i&&++d>o&&error$1("overflow"),G==i){for(var z=d,Z=c;;Z+=c){var K=Z<=p?l:Z>=p+u?u:Z-p;if(z<K)break;var H=z-K,W=c-K;r.push(w(O(K+H%W,0))),z=I(H/W)}r.push(w(O(z,0))),p=j(d,N,T==D),d=0,++T}}}catch(t){V=!0,U=t}finally{try{!q&&L.return&&L.return()}finally{if(V)throw U}}++d,++i}return r.join("")},A=function toUnicode(t){return mapDomain(t,(function(t){return g.test(t)?D(t.slice(4).toLowerCase()):t}))},P=function toASCII(t){return mapDomain(t,(function(t){return v.test(t)?"xn--"+T(t):t}))},E={version:"2.1.0",ucs2:{decode:ucs2decode,encode:function ucs2encode(t){return String.fromCodePoint.apply(String,toConsumableArray(t))}},decode:D,encode:T,toASCII:P,toUnicode:A},M={};function pctEncChar(t){var r=t.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function pctDecChars(t){for(var r="",a=0,i=t.length;a<i;){var o=parseInt(t.substr(a+1,2),16);if(o<128)r+=String.fromCharCode(o),a+=3;else if(o>=194&&o<224){if(i-a>=6){var c=parseInt(t.substr(a+4,2),16);r+=String.fromCharCode((31&o)<<6|63&c)}else r+=t.substr(a,6);a+=6}else if(o>=224){if(i-a>=9){var l=parseInt(t.substr(a+4,2),16),u=parseInt(t.substr(a+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&l)<<6|63&u)}else r+=t.substr(a,9);a+=9}else r+=t.substr(a,3),a+=3}return r}function _normalizeComponentEncoding(t,r){function decodeUnreserved(t){var a=pctDecChars(t);return a.match(r.UNRESERVED)?a:t}return t.scheme&&(t.scheme=String(t.scheme).replace(r.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==t.userinfo&&(t.userinfo=String(t.userinfo).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_USERINFO,pctEncChar).replace(r.PCT_ENCODED,toUpperCase)),void 0!==t.host&&(t.host=String(t.host).replace(r.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(r.NOT_HOST,pctEncChar).replace(r.PCT_ENCODED,toUpperCase)),void 0!==t.path&&(t.path=String(t.path).replace(r.PCT_ENCODED,decodeUnreserved).replace(t.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,pctEncChar).replace(r.PCT_ENCODED,toUpperCase)),void 0!==t.query&&(t.query=String(t.query).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_QUERY,pctEncChar).replace(r.PCT_ENCODED,toUpperCase)),void 0!==t.fragment&&(t.fragment=String(t.fragment).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_FRAGMENT,pctEncChar).replace(r.PCT_ENCODED,toUpperCase)),t}function _stripLeadingZeros(t){return t.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(t,r){var a=t.match(r.IPV4ADDRESS)||[],o=i(a,2)[1];return o?o.split(".").map(_stripLeadingZeros).join("."):t}function _normalizeIPv6(t,r){var a=t.match(r.IPV6ADDRESS)||[],o=i(a,3),c=o[1],l=o[2];if(c){for(var u=c.toLowerCase().split("::").reverse(),d=i(u,2),p=d[0],h=d[1],m=h?h.split(":").map(_stripLeadingZeros):[],y=p.split(":").map(_stripLeadingZeros),g=r.IPV4ADDRESS.test(y[y.length-1]),v=g?7:8,b=y.length-v,R=Array(v),C=0;C<v;++C)R[C]=m[C]||y[b+C]||"";g&&(R[v-1]=_normalizeIPv4(R[v-1],r));var I=R.reduce((function(t,r,a){if(!r||"0"===r){var i=t[t.length-1];i&&i.index+i.length===a?i.length++:t.push({index:a,length:1})}return t}),[]).sort((function(t,r){return r.length-t.length}))[0],w=void 0;if(I&&I.length>1){var S=R.slice(0,I.index),O=R.slice(I.index+I.length);w=S.join(":")+"::"+O.join(":")}else w=R.join(":");return l&&(w+="%"+l),w}return t}var x=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,$=void 0==="".match(/(){0}/)[1];function parse(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o={},c=!1!==i.iri?a:r;"suffix"===i.reference&&(t=(i.scheme?i.scheme+":":"")+"//"+t);var l=t.match(x);if(l){$?(o.scheme=l[1],o.userinfo=l[3],o.host=l[4],o.port=parseInt(l[5],10),o.path=l[6]||"",o.query=l[7],o.fragment=l[8],isNaN(o.port)&&(o.port=l[5])):(o.scheme=l[1]||void 0,o.userinfo=-1!==t.indexOf("@")?l[3]:void 0,o.host=-1!==t.indexOf("//")?l[4]:void 0,o.port=parseInt(l[5],10),o.path=l[6]||"",o.query=-1!==t.indexOf("?")?l[7]:void 0,o.fragment=-1!==t.indexOf("#")?l[8]:void 0,isNaN(o.port)&&(o.port=t.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?l[4]:void 0)),o.host&&(o.host=_normalizeIPv6(_normalizeIPv4(o.host,c),c)),void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||o.path||void 0!==o.query?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",i.reference&&"suffix"!==i.reference&&i.reference!==o.reference&&(o.error=o.error||"URI is not a "+i.reference+" reference.");var u=M[(i.scheme||o.scheme||"").toLowerCase()];if(i.unicodeSupport||u&&u.unicodeSupport)_normalizeComponentEncoding(o,c);else{if(o.host&&(i.domainHost||u&&u.domainHost))try{o.host=E.toASCII(o.host.replace(c.PCT_ENCODED,pctDecChars).toLowerCase())}catch(t){o.error=o.error||"Host's domain name can not be converted to ASCII via punycode: "+t}_normalizeComponentEncoding(o,r)}u&&u.parse&&u.parse(o,i)}else o.error=o.error||"URI can not be parsed.";return o}function _recomposeAuthority(t,i){var o=!1!==i.iri?a:r,c=[];return void 0!==t.userinfo&&(c.push(t.userinfo),c.push("@")),void 0!==t.host&&c.push(_normalizeIPv6(_normalizeIPv4(String(t.host),o),o).replace(o.IPV6ADDRESS,(function(t,r,a){return"["+r+(a?"%25"+a:"")+"]"}))),"number"!=typeof t.port&&"string"!=typeof t.port||(c.push(":"),c.push(String(t.port))),c.length?c.join(""):void 0}var k=/^\.\.?\//,N=/^\/\.(\/|$)/,q=/^\/\.\.(\/|$)/,V=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(t){for(var r=[];t.length;)if(t.match(k))t=t.replace(k,"");else if(t.match(N))t=t.replace(N,"/");else if(t.match(q))t=t.replace(q,"/"),r.pop();else if("."===t||".."===t)t="";else{var a=t.match(V);if(!a)throw new Error("Unexpected dot segment condition");var i=a[0];t=t.slice(i.length),r.push(i)}return r.join("")}function serialize(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.iri?a:r,c=[],l=M[(i.scheme||t.scheme||"").toLowerCase()];if(l&&l.serialize&&l.serialize(t,i),t.host)if(o.IPV6ADDRESS.test(t.host));else if(i.domainHost||l&&l.domainHost)try{t.host=i.iri?E.toUnicode(t.host):E.toASCII(t.host.replace(o.PCT_ENCODED,pctDecChars).toLowerCase())}catch(r){t.error=t.error||"Host's domain name can not be converted to "+(i.iri?"Unicode":"ASCII")+" via punycode: "+r}_normalizeComponentEncoding(t,o),"suffix"!==i.reference&&t.scheme&&(c.push(t.scheme),c.push(":"));var u=_recomposeAuthority(t,i);if(void 0!==u&&("suffix"!==i.reference&&c.push("//"),c.push(u),t.path&&"/"!==t.path.charAt(0)&&c.push("/")),void 0!==t.path){var d=t.path;i.absolutePath||l&&l.absolutePath||(d=removeDotSegments(d)),void 0===u&&(d=d.replace(/^\/\//,"/%2F")),c.push(d)}return void 0!==t.query&&(c.push("?"),c.push(t.query)),void 0!==t.fragment&&(c.push("#"),c.push(t.fragment)),c.join("")}function resolveComponents(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={};return arguments[3]||(t=parse(serialize(t,a),a),r=parse(serialize(r,a),a)),!(a=a||{}).tolerant&&r.scheme?(i.scheme=r.scheme,i.userinfo=r.userinfo,i.host=r.host,i.port=r.port,i.path=removeDotSegments(r.path||""),i.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(i.userinfo=r.userinfo,i.host=r.host,i.port=r.port,i.path=removeDotSegments(r.path||""),i.query=r.query):(r.path?("/"===r.path.charAt(0)?i.path=removeDotSegments(r.path):(void 0===t.userinfo&&void 0===t.host&&void 0===t.port||t.path?t.path?i.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+r.path:i.path=r.path:i.path="/"+r.path,i.path=removeDotSegments(i.path)),i.query=r.query):(i.path=t.path,void 0!==r.query?i.query=r.query:i.query=t.query),i.userinfo=t.userinfo,i.host=t.host,i.port=t.port),i.scheme=t.scheme),i.fragment=r.fragment,i}function resolve(t,r,a){var i=assign({scheme:"null"},a);return serialize(resolveComponents(parse(t,i),parse(r,i),i,!0),i)}function normalize(t,r){return"string"==typeof t?t=serialize(parse(t,r),r):"object"===typeOf(t)&&(t=parse(serialize(t,r),r)),t}function equal(t,r,a){return"string"==typeof t?t=serialize(parse(t,a),a):"object"===typeOf(t)&&(t=serialize(t,a)),"string"==typeof r?r=serialize(parse(r,a),a):"object"===typeOf(r)&&(r=serialize(r,a)),t===r}function escapeComponent(t,i){return t&&t.toString().replace(i&&i.iri?a.ESCAPE:r.ESCAPE,pctEncChar)}function unescapeComponent(t,i){return t&&t.toString().replace(i&&i.iri?a.PCT_ENCODED:r.PCT_ENCODED,pctDecChars)}var U={scheme:"http",domainHost:!0,parse:function parse(t,r){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t},serialize:function serialize(t,r){var a="https"===String(t.scheme).toLowerCase();return t.port!==(a?443:80)&&""!==t.port||(t.port=void 0),t.path||(t.path="/"),t}},B={scheme:"https",domainHost:U.domainHost,parse:U.parse,serialize:U.serialize};function isSecure(t){return"boolean"==typeof t.secure?t.secure:"wss"===String(t.scheme).toLowerCase()}var L={scheme:"ws",domainHost:!0,parse:function parse(t,r){var a=t;return a.secure=isSecure(a),a.resourceName=(a.path||"/")+(a.query?"?"+a.query:""),a.path=void 0,a.query=void 0,a},serialize:function serialize(t,r){if(t.port!==(isSecure(t)?443:80)&&""!==t.port||(t.port=void 0),"boolean"==typeof t.secure&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){var a=t.resourceName.split("?"),o=i(a,2),c=o[0],l=o[1];t.path=c&&"/"!==c?c:void 0,t.query=l,t.resourceName=void 0}return t.fragment=void 0,t}},G={scheme:"wss",domainHost:L.domainHost,parse:L.parse,serialize:L.serialize},z={},Z="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",K="[0-9A-Fa-f]",H=subexp(subexp("%[EFef]"+K+"%"+K+K+"%"+K+K)+"|"+subexp("%[89A-Fa-f]"+K+"%"+K+K)+"|"+subexp("%"+K+K)),W="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Y=merge("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),J="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Q=new RegExp(Z,"g"),X=new RegExp(H,"g"),ee=new RegExp(merge("[^]",W,"[\\.]",'[\\"]',Y),"g"),te=new RegExp(merge("[^]",Z,J),"g"),re=te;function decodeUnreserved(t){var r=pctDecChars(t);return r.match(Q)?r:t}var ne={scheme:"mailto",parse:function parse$$1(t,r){var a=t,i=a.to=a.path?a.path.split(","):[];if(a.path=void 0,a.query){for(var o=!1,c={},l=a.query.split("&"),u=0,d=l.length;u<d;++u){var p=l[u].split("=");switch(p[0]){case"to":for(var h=p[1].split(","),m=0,y=h.length;m<y;++m)i.push(h[m]);break;case"subject":a.subject=unescapeComponent(p[1],r);break;case"body":a.body=unescapeComponent(p[1],r);break;default:o=!0,c[unescapeComponent(p[0],r)]=unescapeComponent(p[1],r)}}o&&(a.headers=c)}a.query=void 0;for(var g=0,v=i.length;g<v;++g){var b=i[g].split("@");if(b[0]=unescapeComponent(b[0]),r.unicodeSupport)b[1]=unescapeComponent(b[1],r).toLowerCase();else try{b[1]=E.toASCII(unescapeComponent(b[1],r).toLowerCase())}catch(t){a.error=a.error||"Email address's domain name can not be converted to ASCII via punycode: "+t}i[g]=b.join("@")}return a},serialize:function serialize$$1(t,r){var a=t,i=toArray(t.to);if(i){for(var o=0,c=i.length;o<c;++o){var l=String(i[o]),u=l.lastIndexOf("@"),d=l.slice(0,u).replace(X,decodeUnreserved).replace(X,toUpperCase).replace(ee,pctEncChar),p=l.slice(u+1);try{p=r.iri?E.toUnicode(p):E.toASCII(unescapeComponent(p,r).toLowerCase())}catch(t){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}i[o]=d+"@"+p}a.path=i.join(",")}var h=t.headers=t.headers||{};t.subject&&(h.subject=t.subject),t.body&&(h.body=t.body);var m=[];for(var y in h)h[y]!==z[y]&&m.push(y.replace(X,decodeUnreserved).replace(X,toUpperCase).replace(te,pctEncChar)+"="+h[y].replace(X,decodeUnreserved).replace(X,toUpperCase).replace(re,pctEncChar));return m.length&&(a.query=m.join("&")),a}},ae=/^([^\:]+)\:(.*)/,ie={scheme:"urn",parse:function parse$$1(t,r){var a=t.path&&t.path.match(ae),i=t;if(a){var o=r.scheme||i.scheme||"urn",c=a[1].toLowerCase(),l=a[2],u=o+":"+(r.nid||c),d=M[u];i.nid=c,i.nss=l,i.path=void 0,d&&(i=d.parse(i,r))}else i.error=i.error||"URN can not be parsed.";return i},serialize:function serialize$$1(t,r){var a=r.scheme||t.scheme||"urn",i=t.nid,o=a+":"+(r.nid||i),c=M[o];c&&(t=c.serialize(t,r));var l=t,u=t.nss;return l.path=(i||r.nid)+":"+u,l}},oe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,se={scheme:"urn:uuid",parse:function parse(t,r){var a=t;return a.uuid=a.nss,a.nss=void 0,r.tolerant||a.uuid&&a.uuid.match(oe)||(a.error=a.error||"UUID is not valid."),a},serialize:function serialize(t,r){var a=t;return a.nss=(t.uuid||"").toLowerCase(),a}};M[U.scheme]=U,M[B.scheme]=B,M[L.scheme]=L,M[G.scheme]=G,M[ne.scheme]=ne,M[ie.scheme]=ie,M[se.scheme]=se,t.SCHEMES=M,t.pctEncChar=pctEncChar,t.pctDecChars=pctDecChars,t.parse=parse,t.removeDotSegments=removeDotSegments,t.serialize=serialize,t.resolveComponents=resolveComponents,t.resolve=resolve,t.normalize=normalize,t.equal=equal,t.escapeComponent=escapeComponent,t.unescapeComponent=unescapeComponent,Object.defineProperty(t,"__esModule",{value:!0})}(r)},48966:(t,r,a)=>{"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=_interopRequireDefault(a(8469)),o=_interopRequireDefault(a(77536)),c=_interopRequireDefault(a(21359)),l=_interopRequireDefault(a(557)),u=_interopRequireDefault(a(2315)),d=_interopRequireDefault(a(89466)),p=_interopRequireDefault(a(30661)),h=_interopRequireDefault(a(83868)),m=_interopRequireDefault(a(2492)),y=_interopRequireDefault(a(28999)),g=_interopRequireDefault(a(61028)),v=_interopRequireDefault(a(27795)),b=_interopRequireDefault(a(10221)),R=_interopRequireDefault(a(82549)),C=_interopRequireDefault(a(99493)),I=_interopRequireDefault(a(67380)),w=_interopRequireWildcard(a(19234)),S=_interopRequireWildcard(a(94583)),O=_interopRequireDefault(a(24986)),j=_interopRequireDefault(a(51513)),D=_interopRequireDefault(a(24595)),T=_interopRequireDefault(a(43928)),A=_interopRequireDefault(a(57245)),P=_interopRequireDefault(a(15566)),E=_interopRequireDefault(a(64094)),M=_interopRequireDefault(a(77146)),x=_interopRequireDefault(a(82941)),$=_interopRequireDefault(a(49019)),k=_interopRequireDefault(a(13590)),N=_interopRequireDefault(a(86826)),q=_interopRequireDefault(a(72828)),V=_interopRequireDefault(a(20937)),U=_interopRequireWildcard(a(79146)),B=_interopRequireDefault(a(85218)),L=_interopRequireDefault(a(77117)),G=_interopRequireDefault(a(66090)),z=_interopRequireDefault(a(58335)),Z=_interopRequireDefault(a(96298)),K=_interopRequireDefault(a(6454)),H=_interopRequireDefault(a(16648)),W=_interopRequireDefault(a(34339)),Y=_interopRequireWildcard(a(88177)),J=_interopRequireDefault(a(42438)),Q=_interopRequireDefault(a(90368)),X=_interopRequireDefault(a(18874)),ee=_interopRequireDefault(a(74979)),te=_interopRequireDefault(a(81008)),re=_interopRequireDefault(a(54069)),ne=_interopRequireDefault(a(20661)),ae=_interopRequireDefault(a(93235)),ie=_interopRequireDefault(a(57278)),oe=_interopRequireDefault(a(19131)),se=_interopRequireDefault(a(93315)),ce=_interopRequireDefault(a(51464)),le=_interopRequireDefault(a(27228)),ue=_interopRequireDefault(a(682)),de=_interopRequireDefault(a(49396)),fe=_interopRequireDefault(a(35807)),pe=_interopRequireDefault(a(57148)),he=_interopRequireDefault(a(87612)),me=_interopRequireDefault(a(29887)),ye=_interopRequireDefault(a(53058)),ge=_interopRequireWildcard(a(28355)),ve=_interopRequireDefault(a(82129)),_e=_interopRequireDefault(a(90094)),be=_interopRequireDefault(a(88021)),Re=_interopRequireDefault(a(65061)),Ce=_interopRequireDefault(a(94611)),Ie=_interopRequireDefault(a(21727)),we=_interopRequireDefault(a(86776)),Se=_interopRequireDefault(a(19963)),Oe=_interopRequireDefault(a(2782)),je=_interopRequireDefault(a(65008)),De=_interopRequireDefault(a(2689)),Te=_interopRequireDefault(a(98983)),Ae=_interopRequireDefault(a(72776)),Pe=_interopRequireDefault(a(44554)),Ee=_interopRequireDefault(a(90478)),Me=_interopRequireWildcard(a(78140)),xe=_interopRequireDefault(a(14959)),$e=_interopRequireDefault(a(29778)),ke=_interopRequireDefault(a(24790)),Ne=_interopRequireDefault(a(5152)),qe=_interopRequireDefault(a(94816)),Ve=_interopRequireDefault(a(8035)),Fe=_interopRequireDefault(a(34714)),Ue=_interopRequireDefault(a(44928)),Be=_interopRequireDefault(a(88346)),Le=_interopRequireDefault(a(2900)),Ge=_interopRequireDefault(a(68220)),ze=_interopRequireDefault(a(82786)),Ze=_interopRequireDefault(a(17633)),Ke=_interopRequireDefault(a(55977));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return t},t}function _interopRequireWildcard(t){if(t&&t.__esModule)return t;if(null===t||"object"!==_typeof(t)&&"function"!=typeof t)return{default:t};var r=_getRequireWildcardCache();if(r&&r.has(t))return r.get(t);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var c=i?Object.getOwnPropertyDescriptor(t,o):null;c&&(c.get||c.set)?Object.defineProperty(a,o,c):a[o]=t[o]}return a.default=t,r&&r.set(t,a),a}function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var He={version:"13.7.0",toDate:i.default,toFloat:o.default,toInt:c.default,toBoolean:l.default,equals:u.default,contains:d.default,matches:p.default,isEmail:h.default,isURL:m.default,isMACAddress:y.default,isIP:g.default,isIPRange:v.default,isFQDN:b.default,isBoolean:C.default,isIBAN:Y.default,isBIC:J.default,isAlpha:w.default,isAlphaLocales:w.locales,isAlphanumeric:S.default,isAlphanumericLocales:S.locales,isNumeric:O.default,isPassportNumber:j.default,isPort:D.default,isLowercase:T.default,isUppercase:A.default,isAscii:E.default,isFullWidth:M.default,isHalfWidth:x.default,isVariableWidth:$.default,isMultibyte:k.default,isSemVer:N.default,isSurrogatePair:q.default,isInt:V.default,isIMEI:P.default,isFloat:U.default,isFloatLocales:U.locales,isDecimal:B.default,isHexadecimal:L.default,isOctal:G.default,isDivisibleBy:z.default,isHexColor:Z.default,isRgbColor:K.default,isHSL:H.default,isISRC:W.default,isMD5:Q.default,isHash:X.default,isJWT:ee.default,isJSON:te.default,isEmpty:re.default,isLength:ne.default,isLocale:I.default,isByteLength:ae.default,isUUID:ie.default,isMongoId:oe.default,isAfter:se.default,isBefore:ce.default,isIn:le.default,isCreditCard:ue.default,isIdentityCard:de.default,isEAN:fe.default,isISIN:pe.default,isISBN:he.default,isISSN:me.default,isMobilePhone:ge.default,isMobilePhoneLocales:ge.locales,isPostalCode:Me.default,isPostalCodeLocales:Me.locales,isEthereumAddress:ve.default,isCurrency:_e.default,isBtcAddress:be.default,isISO8601:Re.default,isRFC3339:Ce.default,isISO31661Alpha2:Ie.default,isISO31661Alpha3:we.default,isISO4217:Se.default,isBase32:Oe.default,isBase58:je.default,isBase64:De.default,isDataURI:Te.default,isMagnetURI:Ae.default,isMimeType:Pe.default,isLatLong:Ee.default,ltrim:xe.default,rtrim:$e.default,trim:ke.default,escape:Ne.default,unescape:qe.default,stripLow:Ve.default,whitelist:Fe.default,blacklist:Ue.default,isWhitelisted:Be.default,normalizeEmail:Le.default,toString,isSlug:Ge.default,isStrongPassword:Ze.default,isTaxID:ye.default,isDate:R.default,isLicensePlate:ze.default,isVAT:Ke.default,ibanLocales:Y.locales};r.default=He,t.exports=r.default,t.exports.default=r.default},60079:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.commaDecimal=r.dotDecimal=r.farsiLocales=r.arabicLocales=r.englishLocales=r.decimal=r.alphanumeric=r.alpha=void 0;var a={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[А-Я]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"el-GR":/^[Α-ώ]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fa-IR":/^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,"fi-FI":/^[A-ZÅÄÖ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"sl-SI":/^[A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๐\s]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐі]+$/i,"vi-VN":/^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,"ku-IQ":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i};r.alpha=a;var i={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[0-9А-Я]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"el-GR":/^[0-9Α-ω]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fi-FI":/^[0-9A-ZÅÄÖ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nb-NO":/^[0-9A-ZÆØÅ]+$/i,"nl-NL":/^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[0-9A-ZÆØÅ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"sl-SI":/^[0-9A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[0-9A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๙\s]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,"ku-IQ":/^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,"vi-VN":/^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[0-9א-ת]+$/,fa:/^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i};r.alphanumeric=i;var o={"en-US":".",ar:"٫"};r.decimal=o;var c=["AU","GB","HK","IN","NZ","ZA","ZM"];r.englishLocales=c;for(var l,u=0;u<c.length;u++)a[l="en-".concat(c[u])]=a["en-US"],i[l]=i["en-US"],o[l]=o["en-US"];var d=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"];r.arabicLocales=d;for(var p,h=0;h<d.length;h++)a[p="ar-".concat(d[h])]=a.ar,i[p]=i.ar,o[p]=o.ar;var m=["IR","AF"];r.farsiLocales=m;for(var y,g=0;g<m.length;g++)i[y="fa-".concat(m[g])]=i.fa,o[y]=o.ar;var v=["ar-EG","ar-LB","ar-LY"];r.dotDecimal=v;var b=["bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-ZM","es-ES","fr-CA","fr-FR","id-ID","it-IT","ku-IQ","hi-IN","hu-HU","nb-NO","nn-NO","nl-NL","pl-PL","pt-PT","ru-RU","sl-SI","sr-RS@latin","sr-RS","sv-SE","tr-TR","uk-UA","vi-VN"];r.commaDecimal=b;for(var R=0;R<v.length;R++)o[v[R]]=o["en-US"];for(var C=0;C<b.length;C++)o[b[C]]=",";a["fr-CA"]=a["fr-FR"],i["fr-CA"]=i["fr-FR"],a["pt-BR"]=a["pt-PT"],i["pt-BR"]=i["pt-PT"],o["pt-BR"]=o["pt-PT"],a["pl-Pl"]=a["pl-PL"],i["pl-Pl"]=i["pl-PL"],o["pl-Pl"]=o["pl-PL"],a["fa-AF"]=a.fa},44928:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function blacklist(t,r){return(0,i.default)(t),t.replace(new RegExp("[".concat(r,"]+"),"g"),"")};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},89466:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function contains(t,r,a){if((0,i.default)(t),(a=(0,c.default)(a,l)).ignoreCase)return t.toLowerCase().split((0,o.default)(r).toLowerCase()).length>a.minOccurrences;return t.split((0,o.default)(r)).length>a.minOccurrences};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(31913)),c=_interopRequireDefault(a(84808));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var l={ignoreCase:!1,minOccurrences:1};t.exports=r.default,t.exports.default=r.default},2315:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function equals(t,r){return(0,i.default)(t),t===r};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},5152:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function escape(t){return(0,i.default)(t),t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\//g,"&#x2F;").replace(/\\/g,"&#x5C;").replace(/`/g,"&#96;")};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},93315:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isAfter(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:String(new Date);(0,i.default)(t);var a=(0,o.default)(r),c=(0,o.default)(t);return!!(c&&a&&c>a)};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(8469));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}t.exports=r.default,t.exports.default=r.default},19234:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isAlpha(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,i.default)(t);var c=t,l=a.ignore;if(l)if(l instanceof RegExp)c=c.replace(l,"");else{if("string"!=typeof l)throw new Error("ignore should be instance of a String or RegExp");c=c.replace(new RegExp("[".concat(l.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"")}if(r in o.alpha)return o.alpha[r].test(c);throw new Error("Invalid locale '".concat(r,"'"))},r.locales=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571)),o=a(60079);var c=Object.keys(o.alpha);r.locales=c},94583:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isAlphanumeric(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,i.default)(t);var c=t,l=a.ignore;if(l)if(l instanceof RegExp)c=c.replace(l,"");else{if("string"!=typeof l)throw new Error("ignore should be instance of a String or RegExp");c=c.replace(new RegExp("[".concat(l.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"")}if(r in o.alphanumeric)return o.alphanumeric[r].test(c);throw new Error("Invalid locale '".concat(r,"'"))},r.locales=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571)),o=a(60079);var c=Object.keys(o.alphanumeric);r.locales=c},64094:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isAscii(t){return(0,i.default)(t),o.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^[\x00-\x7F]+$/;t.exports=r.default,t.exports.default=r.default},42438:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isBIC(t){if((0,i.default)(t),!o.CountryCodes.has(t.slice(4,6).toUpperCase()))return!1;return c.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571)),o=a(21727);var c=/^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;t.exports=r.default,t.exports.default=r.default},2782:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isBase32(t){if((0,i.default)(t),t.length%8==0&&o.test(t))return!0;return!1};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^[A-Z2-7]+=*$/;t.exports=r.default,t.exports.default=r.default},65008:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isBase58(t){if((0,i.default)(t),o.test(t))return!0;return!1};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^[A-HJ-NP-Za-km-z1-9]*$/;t.exports=r.default,t.exports.default=r.default},2689:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isBase64(t,r){(0,i.default)(t),r=(0,o.default)(r,u);var a=t.length;if(r.urlSafe)return l.test(t);if(a%4!=0||c.test(t))return!1;var d=t.indexOf("=");return-1===d||d===a-1||d===a-2&&"="===t[a-1]};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(84808));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var c=/[^A-Z0-9+\/=]/i,l=/^[A-Z0-9_\-]*$/i,u={urlSafe:!1};t.exports=r.default,t.exports.default=r.default},51464:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isBefore(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:String(new Date);(0,i.default)(t);var a=(0,o.default)(r),c=(0,o.default)(t);return!!(c&&a&&c<a)};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(8469));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}t.exports=r.default,t.exports.default=r.default},99493:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isBoolean(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if((0,i.default)(t),r.loose)return l.includes(t.toLowerCase());return c.includes(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o={loose:!1},c=["true","false","1","0"],l=[].concat(c,["yes","no"]);t.exports=r.default,t.exports.default=r.default},88021:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isBtcAddress(t){if((0,i.default)(t),t.startsWith("bc1"))return o.test(t);return c.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^(bc1)[a-z0-9]{25,39}$/,c=/^(1|3)[A-HJ-NP-Za-km-z1-9]{25,39}$/;t.exports=r.default,t.exports.default=r.default},93235:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isByteLength(t,r){var a,o;(0,i.default)(t),"object"===_typeof(r)?(a=r.min||0,o=r.max):(a=arguments[1],o=arguments[2]);var c=encodeURI(t).split(/%..|./).length-1;return c>=a&&(void 0===o||c<=o)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}t.exports=r.default,t.exports.default=r.default},682:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isCreditCard(t){(0,i.default)(t);var r=t.replace(/[- ]+/g,"");if(!o.test(r))return!1;for(var a,c,l,u=0,d=r.length-1;d>=0;d--)a=r.substring(d,d+1),c=parseInt(a,10),u+=l&&(c*=2)>=10?c%10+1:c,l=!l;return!(u%10!=0||!r)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^(?:4[0-9]{12}(?:[0-9]{3,6})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12,15}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14}|^(81[0-9]{14,17}))$/;t.exports=r.default,t.exports.default=r.default},90094:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isCurrency(t,r){return(0,o.default)(t),function currencyRegex(t){var r="\\d{".concat(t.digits_after_decimal[0],"}");t.digits_after_decimal.forEach((function(t,a){0!==a&&(r="".concat(r,"|\\d{").concat(t,"}"))}));var a="(".concat(t.symbol.replace(/\W/,(function(t){return"\\".concat(t)})),")").concat(t.require_symbol?"":"?"),i="-?",o="[1-9]\\d{0,2}(\\".concat(t.thousands_separator,"\\d{3})*"),c="(".concat(["0","[1-9]\\d*",o].join("|"),")?"),l="(\\".concat(t.decimal_separator,"(").concat(r,"))").concat(t.require_decimal?"":"?"),u=c+(t.allow_decimal||t.require_decimal?l:"");t.allow_negatives&&!t.parens_for_negatives&&(t.negative_sign_after_digits?u+=i:t.negative_sign_before_digits&&(u=i+u));t.allow_negative_sign_placeholder?u="( (?!\\-))?".concat(u):t.allow_space_after_symbol?u=" ?".concat(u):t.allow_space_after_digits&&(u+="( (?!$))?");t.symbol_after_digits?u+=a:u=a+u;t.allow_negatives&&(t.parens_for_negatives?u="(\\(".concat(u,"\\)|").concat(u,")"):t.negative_sign_before_digits||t.negative_sign_after_digits||(u=i+u));return new RegExp("^(?!-? )(?=.*\\d)".concat(u,"$"))}(r=(0,i.default)(r,c)).test(t)};var i=_interopRequireDefault(a(84808)),o=_interopRequireDefault(a(65571));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var c={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_decimal:!0,require_decimal:!1,digits_after_decimal:[2],allow_space_after_digits:!1};t.exports=r.default,t.exports.default=r.default},98983:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isDataURI(t){(0,i.default)(t);var r=t.split(",");if(r.length<2)return!1;var a=r.shift().trim().split(";"),u=a.shift();if("data:"!==u.substr(0,5))return!1;var d=u.substr(5);if(""!==d&&!o.test(d))return!1;for(var p=0;p<a.length;p++)if((p!==a.length-1||"base64"!==a[p].toLowerCase())&&!c.test(a[p]))return!1;for(var h=0;h<r.length;h++)if(!l.test(r[h]))return!1;return!0};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^[a-z]+\/[a-z0-9\-\+]+$/i,c=/^[a-z\-]+=[a-z0-9\-]+$/i,l=/^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i;t.exports=r.default,t.exports.default=r.default},82549:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isDate(t,r){r="string"==typeof r?(0,i.default)({format:r},o):(0,i.default)(r,o);if("string"==typeof t&&function isValidFormat(t){return/(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(t)}(r.format)){var a,c=r.delimiters.find((function(t){return-1!==r.format.indexOf(t)})),l=r.strictMode?c:r.delimiters.find((function(r){return-1!==t.indexOf(r)})),u=function zip(t,r){for(var a=[],i=Math.min(t.length,r.length),o=0;o<i;o++)a.push([t[o],r[o]]);return a}(t.split(l),r.format.toLowerCase().split(c)),d={},p=function _createForOfIteratorHelper(t,r){var a;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,l=!0,u=!1;return{s:function s(){a=t[Symbol.iterator]()},n:function n(){var t=a.next();return l=t.done,t},e:function e(t){u=!0,c=t},f:function f(){try{l||null==a.return||a.return()}finally{if(u)throw c}}}}(u);try{for(p.s();!(a=p.n()).done;){var h=(g=a.value,v=2,function _arrayWithHoles(t){if(Array.isArray(t))return t}(g)||function _iterableToArrayLimit(t,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var a=[],i=!0,o=!1,c=void 0;try{for(var l,u=t[Symbol.iterator]();!(i=(l=u.next()).done)&&(a.push(l.value),!r||a.length!==r);i=!0);}catch(t){o=!0,c=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw c}}return a}(g,v)||_unsupportedIterableToArray(g,v)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=h[0],y=h[1];if(m.length!==y.length)return!1;d[y.charAt(0)]=m}}catch(t){p.e(t)}finally{p.f()}return new Date("".concat(d.m,"/").concat(d.d,"/").concat(d.y)).getDate()===+d.d}var g,v;if(!r.strictMode)return"[object Date]"===Object.prototype.toString.call(t)&&isFinite(t);return!1};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(84808));function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}var o={format:"YYYY/MM/DD",delimiters:["/","-"],strictMode:!1};t.exports=r.default,t.exports.default=r.default},85218:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isDecimal(t,r){if((0,o.default)(t),(r=(0,i.default)(r,u)).locale in l.decimal)return!(0,c.default)(d,t.replace(/ /g,""))&&function decimalRegExp(t){return new RegExp("^[-+]?([0-9]+)?(\\".concat(l.decimal[t.locale],"[0-9]{").concat(t.decimal_digits,"})").concat(t.force_decimal?"":"?","$"))}(r).test(t);throw new Error("Invalid locale '".concat(r.locale,"'"))};var i=_interopRequireDefault(a(84808)),o=_interopRequireDefault(a(65571)),c=_interopRequireDefault(a(18343)),l=a(60079);function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var u={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},d=["","-","+"];t.exports=r.default,t.exports.default=r.default},58335:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isDivisibleBy(t,r){return(0,i.default)(t),(0,o.default)(t)%parseInt(r,10)==0};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(77536));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}t.exports=r.default,t.exports.default=r.default},35807:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isEAN(t){(0,i.default)(t);var r=Number(t.slice(-1));return o.test(t)&&r===function calculateCheckDigit(t){var r=10-t.slice(0,-1).split("").map((function(r,a){return Number(r)*function getPositionWeightThroughLengthAndIndex(t,r){if(8===t||14===t)return r%2==0?3:1;return r%2==0?1:3}(t.length,a)})).reduce((function(t,r){return t+r}),0)%10;return r<10?r:0}(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^(\d{8}|\d{13}|\d{14})$/;t.exports=r.default,t.exports.default=r.default},83868:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isEmail(t,r){if((0,i.default)(t),(r=(0,o.default)(r,d)).require_display_name||r.allow_display_name){var a=t.match(p);if(a){var b=a[1];if(t=t.replace(b,"").replace(/(^<|>$)/g,""),b.endsWith(" ")&&(b=b.substr(0,b.length-1)),!function validateDisplayName(t){var r=t.replace(/^"(.+)"$/,"$1");if(!r.trim())return!1;if(/[\.";<>]/.test(r)){if(r===t)return!1;if(!(r.split('"').length===r.split('\\"').length))return!1}return!0}(b))return!1}else if(r.require_display_name)return!1}if(!r.ignore_max_length&&t.length>254)return!1;var R=t.split("@"),C=R.pop(),I=C.toLowerCase();if(r.host_blacklist.includes(I))return!1;var w=R.join("@");if(r.domain_specific_validation&&("gmail.com"===I||"googlemail.com"===I)){var S=(w=w.toLowerCase()).split("+")[0];if(!(0,c.default)(S.replace(/\./g,""),{min:6,max:30}))return!1;for(var O=S.split("."),j=0;j<O.length;j++)if(!m.test(O[j]))return!1}if(!(!1!==r.ignore_max_length||(0,c.default)(w,{max:64})&&(0,c.default)(C,{max:254})))return!1;if(!(0,l.default)(C,{require_tld:r.require_tld})){if(!r.allow_ip_domain)return!1;if(!(0,u.default)(C)){if(!C.startsWith("[")||!C.endsWith("]"))return!1;var D=C.substr(1,C.length-2);if(0===D.length||!(0,u.default)(D))return!1}}if('"'===w[0])return w=w.slice(1,w.length-1),r.allow_utf8_local_part?v.test(w):y.test(w);for(var T=r.allow_utf8_local_part?g:h,A=w.split("."),P=0;P<A.length;P++)if(!T.test(A[P]))return!1;if(r.blacklisted_chars&&-1!==w.search(new RegExp("[".concat(r.blacklisted_chars,"]+"),"g")))return!1;return!0};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(84808)),c=_interopRequireDefault(a(93235)),l=_interopRequireDefault(a(10221)),u=_interopRequireDefault(a(61028));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var d={allow_display_name:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[]},p=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,h=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,m=/^[a-z\d]+$/,y=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,g=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,v=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;t.exports=r.default,t.exports.default=r.default},54069:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isEmpty(t,r){return(0,i.default)(t),0===((r=(0,o.default)(r,c)).ignore_whitespace?t.trim().length:t.length)};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(84808));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var c={ignore_whitespace:!1};t.exports=r.default,t.exports.default=r.default},82129:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isEthereumAddress(t){return(0,i.default)(t),o.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^(0x)[0-9a-f]{40}$/i;t.exports=r.default,t.exports.default=r.default},10221:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isFQDN(t,r){(0,i.default)(t),(r=(0,o.default)(r,c)).allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1));!0===r.allow_wildcard&&0===t.indexOf("*.")&&(t=t.substring(2));var a=t.split("."),l=a[a.length-1];if(r.require_tld){if(a.length<2)return!1;if(!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(l))return!1;if(/\s/.test(l))return!1}if(!r.allow_numeric_tld&&/^\d+$/.test(l))return!1;return a.every((function(t){return!(t.length>63)&&(!!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(t)&&(!/[\uff01-\uff5e]/.test(t)&&(!/^-|-$/.test(t)&&!(!r.allow_underscores&&/_/.test(t)))))}))};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(84808));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var c={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1};t.exports=r.default,t.exports.default=r.default},79146:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isFloat(t,r){(0,i.default)(t),r=r||{};var a=new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(r.locale?o.decimal[r.locale]:".","[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$"));if(""===t||"."===t||"-"===t||"+"===t)return!1;var c=parseFloat(t.replace(",","."));return a.test(t)&&(!r.hasOwnProperty("min")||c>=r.min)&&(!r.hasOwnProperty("max")||c<=r.max)&&(!r.hasOwnProperty("lt")||c<r.lt)&&(!r.hasOwnProperty("gt")||c>r.gt)},r.locales=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571)),o=a(60079);var c=Object.keys(o.decimal);r.locales=c},77146:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isFullWidth(t){return(0,i.default)(t),o.test(t)},r.fullWidth=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;r.fullWidth=o},16648:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isHSL(t){(0,i.default)(t);var r=t.replace(/\s+/g," ").replace(/\s?(hsla?\(|\)|,)\s?/gi,"$1");if(-1!==r.indexOf(","))return o.test(r);return c.test(r)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i,c=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i;t.exports=r.default,t.exports.default=r.default},82941:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isHalfWidth(t){return(0,i.default)(t),o.test(t)},r.halfWidth=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;r.halfWidth=o},18874:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isHash(t,r){return(0,i.default)(t),new RegExp("^[a-fA-F0-9]{".concat(o[r],"}$")).test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};t.exports=r.default,t.exports.default=r.default},96298:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isHexColor(t){return(0,i.default)(t),o.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;t.exports=r.default,t.exports.default=r.default},77117:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isHexadecimal(t){return(0,i.default)(t),o.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^(0x|0h)?[0-9A-F]+$/i;t.exports=r.default,t.exports.default=r.default},88177:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isIBAN(t){return(0,i.default)(t),function hasValidIbanFormat(t){var r=t.replace(/[\s\-]+/gi,"").toUpperCase(),a=r.slice(0,2).toUpperCase();return a in o&&o[a].test(r)}(t)&&function hasValidIbanChecksum(t){var r=t.replace(/[^A-Z0-9]+/gi,"").toUpperCase();return 1===(r.slice(4)+r.slice(0,4)).replace(/[A-Z]/g,(function(t){return t.charCodeAt(0)-55})).match(/\d{1,7}/g).reduce((function(t,r){return Number(t+r)%97}),"")}(t)},r.locales=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})0\d{2}0\d{18}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};var c=Object.keys(o);r.locales=c},15566:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isIMEI(t,r){(0,i.default)(t);var a=o;(r=r||{}).allow_hyphens&&(a=c);if(!a.test(t))return!1;t=t.replace(/-/g,"");for(var l=0,u=2,d=0;d<14;d++){var p=t.substring(14-d-1,14-d),h=parseInt(p,10)*u;l+=h>=10?h%10+1:h,1===u?u+=1:u-=1}if((10-l%10)%10!==parseInt(t.substring(14,15),10))return!1;return!0};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^[0-9]{15}$/,c=/^\d{2}-\d{6}-\d{6}-\d{1}$/;t.exports=r.default,t.exports.default=r.default},61028:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isIP(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,i.default)(t),!(r=String(r)))return isIP(t,4)||isIP(t,6);if("4"===r){if(!l.test(t))return!1;var a=t.split(".").sort((function(t,r){return t-r}));return a[3]<=255}if("6"===r)return!!d.test(t);return!1};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",c="(".concat(o,"[.]){3}").concat(o),l=new RegExp("^".concat(c,"$")),u="(?:[0-9a-fA-F]{1,4})",d=new RegExp("^("+"(?:".concat(u,":){7}(?:").concat(u,"|:)|")+"(?:".concat(u,":){6}(?:").concat(c,"|:").concat(u,"|:)|")+"(?:".concat(u,":){5}(?::").concat(c,"|(:").concat(u,"){1,2}|:)|")+"(?:".concat(u,":){4}(?:(:").concat(u,"){0,1}:").concat(c,"|(:").concat(u,"){1,3}|:)|")+"(?:".concat(u,":){3}(?:(:").concat(u,"){0,2}:").concat(c,"|(:").concat(u,"){1,4}|:)|")+"(?:".concat(u,":){2}(?:(:").concat(u,"){0,3}:").concat(c,"|(:").concat(u,"){1,5}|:)|")+"(?:".concat(u,":){1}(?:(:").concat(u,"){0,4}:").concat(c,"|(:").concat(u,"){1,6}|:)|")+"(?::((?::".concat(u,"){0,5}:").concat(c,"|(?::").concat(u,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");t.exports=r.default,t.exports.default=r.default},27795:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isIPRange(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,i.default)(t);var a=t.split("/");if(2!==a.length)return!1;if(!c.test(a[1]))return!1;if(a[1].length>1&&a[1].startsWith("0"))return!1;var u=(0,o.default)(a[0],r);if(!u)return!1;var d=null;switch(String(r)){case"4":d=32;break;case"6":d=l;break;default:d=(0,o.default)(a[0],"6")?l:32}return a[1]<=d&&a[1]>=0};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(61028));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var c=/^\d{1,3}$/,l=128;t.exports=r.default,t.exports.default=r.default},87612:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isISBN(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,i.default)(t),!(r=String(r)))return isISBN(t,10)||isISBN(t,13);var a,u=t.replace(/[\s-]+/g,""),d=0;if("10"===r){if(!o.test(u))return!1;for(a=0;a<9;a++)d+=(a+1)*u.charAt(a);if("X"===u.charAt(9)?d+=100:d+=10*u.charAt(9),d%11==0)return!!u}else if("13"===r){if(!c.test(u))return!1;for(a=0;a<12;a++)d+=l[a%2]*u.charAt(a);if(u.charAt(12)-(10-d%10)%10==0)return!!u}return!1};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^(?:[0-9]{9}X|[0-9]{10})$/,c=/^(?:[0-9]{13})$/,l=[1,3];t.exports=r.default,t.exports.default=r.default},57148:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isISIN(t){if((0,i.default)(t),!o.test(t))return!1;for(var r=!0,a=0,c=t.length-2;c>=0;c--)if(t[c]>="A"&&t[c]<="Z")for(var l=t[c].charCodeAt(0)-55,u=l%10,d=Math.trunc(l/10),p=0,h=[u,d];p<h.length;p++){var m=h[p];a+=r?m>=5?1+2*(m-5):2*m:m,r=!r}else{var y=t[c].charCodeAt(0)-"0".charCodeAt(0);a+=r?y>=5?1+2*(y-5):2*y:y,r=!r}var g=10*Math.trunc((a+9)/10)-a;return+t[t.length-1]===g};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;t.exports=r.default,t.exports.default=r.default},21727:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isISO31661Alpha2(t){return(0,i.default)(t),o.has(t.toUpperCase())},r.CountryCodes=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=new Set(["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]);var c=o;r.CountryCodes=c},86776:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isISO31661Alpha3(t){return(0,i.default)(t),o.has(t.toUpperCase())};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=new Set(["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","VAT","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWZ","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","URY","UZB","VUT","VEN","VNM","VGB","VIR","WLF","ESH","YEM","ZMB","ZWE"]);t.exports=r.default,t.exports.default=r.default},19963:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isISO4217(t){return(0,i.default)(t),o.has(t.toUpperCase())},r.CurrencyCodes=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=new Set(["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"]);var c=o;r.CurrencyCodes=c},65061:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isISO8601(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.default)(t);var a=r.strictSeparator?c.test(t):o.test(t);return a&&r.strict?l(t):a};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,c=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,l=function isValidDate(t){var r=t.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/);if(r){var a=Number(r[1]),i=Number(r[2]);return a%4==0&&a%100!=0||a%400==0?i<=366:i<=365}var o=t.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number),c=o[1],l=o[2],u=o[3],d=l?"0".concat(l).slice(-2):l,p=u?"0".concat(u).slice(-2):u,h=new Date("".concat(c,"-").concat(d||"01","-").concat(p||"01"));return!l||!u||h.getUTCFullYear()===c&&h.getUTCMonth()+1===l&&h.getUTCDate()===u};t.exports=r.default,t.exports.default=r.default},34339:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isISRC(t){return(0,i.default)(t),o.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;t.exports=r.default,t.exports.default=r.default},29887:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isISSN(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.default)(t);var a=o;if(a=r.require_hyphen?a.replace("?",""):a,!(a=r.case_sensitive?new RegExp(a):new RegExp(a,"i")).test(t))return!1;for(var c=t.replace("-","").toUpperCase(),l=0,u=0;u<c.length;u++){var d=c[u];l+=("X"===d?10:+d)*(8-u)}return l%11==0};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o="^\\d{4}-?\\d{3}[\\dX]$";t.exports=r.default,t.exports.default=r.default},49396:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isIdentityCard(t,r){if((0,i.default)(t),r in c)return c[r](t);if("any"===r){for(var a in c){if(c.hasOwnProperty(a))if((0,c[a])(t))return!0}return!1}throw new Error("Invalid locale '".concat(r,"'"))};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(20937));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var c={PL:function PL(t){(0,i.default)(t);var r={1:1,2:3,3:7,4:9,5:1,6:3,7:7,8:9,9:1,10:3,11:0};if(null!=t&&11===t.length&&(0,o.default)(t,{allow_leading_zeroes:!0})){var a=t.split("").slice(0,-1).reduce((function(t,a,i){return t+Number(a)*r[i+1]}),0)%10,c=Number(t.charAt(t.length-1));if(0===a&&0===c||c===10-a)return!0}return!1},ES:function ES(t){(0,i.default)(t);var r={X:0,Y:1,Z:2},a=t.trim().toUpperCase();if(!/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/.test(a))return!1;var o=a.slice(0,-1).replace(/[X,Y,Z]/g,(function(t){return r[t]}));return a.endsWith(["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"][o%23])},FI:function FI(t){if((0,i.default)(t),11!==t.length)return!1;if(!t.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/))return!1;return"0123456789ABCDEFHJKLMNPRSTUVWXY"[(1e3*parseInt(t.slice(0,6),10)+parseInt(t.slice(7,10),10))%31]===t.slice(10,11)},IN:function IN(t){var r=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],a=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],i=t.trim();if(!/^[1-9]\d{3}\s?\d{4}\s?\d{4}$/.test(i))return!1;var o=0;return i.replace(/\s/g,"").split("").map(Number).reverse().forEach((function(t,i){o=r[o][a[i%8][t]]})),0===o},IR:function IR(t){if(!t.match(/^\d{10}$/))return!1;if(t="0000".concat(t).substr(t.length-6),0===parseInt(t.substr(3,6),10))return!1;for(var r=parseInt(t.substr(9,1),10),a=0,i=0;i<9;i++)a+=parseInt(t.substr(i,1),10)*(10-i);return(a%=11)<2&&r===a||a>=2&&r===11-a},IT:function IT(t){return 9===t.length&&("CA00000AA"!==t&&t.search(/C[A-Z][0-9]{5}[A-Z]{2}/i)>-1)},NO:function NO(t){var r=t.trim();if(isNaN(Number(r)))return!1;if(11!==r.length)return!1;if("00000000000"===r)return!1;var a=r.split("").map(Number),i=(11-(3*a[0]+7*a[1]+6*a[2]+1*a[3]+8*a[4]+9*a[5]+4*a[6]+5*a[7]+2*a[8])%11)%11,o=(11-(5*a[0]+4*a[1]+3*a[2]+2*a[3]+7*a[4]+6*a[5]+5*a[6]+4*a[7]+3*a[8]+2*i)%11)%11;return i===a[9]&&o===a[10]},TH:function TH(t){if(!t.match(/^[1-8]\d{12}$/))return!1;for(var r=0,a=0;a<12;a++)r+=parseInt(t[a],10)*(13-a);return t[12]===((11-r%11)%10).toString()},LK:function LK(t){return!(10!==t.length||!/^[1-9]\d{8}[vx]$/i.test(t))||!(12!==t.length||!/^[1-9]\d{11}$/i.test(t))},"he-IL":function heIL(t){var r=t.trim();if(!/^\d{9}$/.test(r))return!1;for(var a,i=r,o=0,c=0;c<i.length;c++)o+=(a=Number(i[c])*(c%2+1))>9?a-9:a;return o%10==0},"ar-LY":function arLY(t){var r=t.trim();return!!/^(1|2)\d{11}$/.test(r)},"ar-TN":function arTN(t){var r=t.trim();return!!/^\d{8}$/.test(r)},"zh-CN":function zhCN(t){var r=["11","12","13","14","15","21","22","23","31","32","33","34","35","36","37","41","42","43","44","45","46","50","51","52","53","54","61","62","63","64","65","71","81","82","91"],a=["7","9","10","5","8","4","2","1","6","3","7","9","10","5","8","4","2"],i=["1","0","X","9","8","7","6","5","4","3","2"],o=function checkAddressCode(t){return r.includes(t)},c=function checkBirthDayCode(t){var r=parseInt(t.substring(0,4),10),a=parseInt(t.substring(4,6),10),i=parseInt(t.substring(6),10),o=new Date(r,a-1,i);return!(o>new Date)&&(o.getFullYear()===r&&o.getMonth()===a-1&&o.getDate()===i)},l=function checkParityBit(t){return function getParityBit(t){for(var r=t.substring(0,17),o=0,c=0;c<17;c++)o+=parseInt(r.charAt(c),10)*parseInt(a[c],10);return i[o%11]}(t)===t.charAt(17).toUpperCase()};return function checkIdCardNo(t){return!!/^\d{15}|(\d{17}(\d|x|X))$/.test(t)&&(15===t.length?function check15IdCardNo(t){var r=/^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(t);if(!r)return!1;var a=t.substring(0,2);if(!(r=o(a)))return!1;var i="19".concat(t.substring(6,12));return!!(r=c(i))}(t):function check18IdCardNo(t){var r=/^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(t);if(!r)return!1;var a=t.substring(0,2);if(!(r=o(a)))return!1;var i=t.substring(6,14);return!!(r=c(i))&&l(t)}(t))}(t)},"zh-TW":function zhTW(t){var r={A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:34,J:18,K:19,L:20,M:21,N:22,O:35,P:23,Q:24,R:25,S:26,T:27,U:28,V:29,W:32,X:30,Y:31,Z:33},a=t.trim().toUpperCase();return!!/^[A-Z][0-9]{9}$/.test(a)&&Array.from(a).reduce((function(t,a,i){if(0===i){var o=r[a];return o%10*9+Math.floor(o/10)}return 9===i?(10-t%10-Number(a))%10==0:t+Number(a)*(9-i)}),0)}};t.exports=r.default,t.exports.default=r.default},27228:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isIn(t,r){var a;if((0,i.default)(t),"[object Array]"===Object.prototype.toString.call(r)){var c=[];for(a in r)({}).hasOwnProperty.call(r,a)&&(c[a]=(0,o.default)(r[a]));return c.indexOf(t)>=0}if("object"===_typeof(r))return r.hasOwnProperty(t);if(r&&"function"==typeof r.indexOf)return r.indexOf(t)>=0;return!1};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(31913));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}t.exports=r.default,t.exports.default=r.default},20937:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isInt(t,r){(0,i.default)(t);var a=(r=r||{}).hasOwnProperty("allow_leading_zeroes")&&!r.allow_leading_zeroes?o:c,l=!r.hasOwnProperty("min")||t>=r.min,u=!r.hasOwnProperty("max")||t<=r.max,d=!r.hasOwnProperty("lt")||t<r.lt,p=!r.hasOwnProperty("gt")||t>r.gt;return a.test(t)&&l&&u&&d&&p};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,c=/^[-+]?[0-9]+$/;t.exports=r.default,t.exports.default=r.default},81008:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isJSON(t,r){(0,i.default)(t);try{r=(0,o.default)(r,c);var a=[];r.allow_primitives&&(a=[null,!1,!0]);var l=JSON.parse(t);return a.includes(l)||!!l&&"object"===_typeof(l)}catch(t){}return!1};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(84808));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var c={allow_primitives:!1};t.exports=r.default,t.exports.default=r.default},74979:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isJWT(t){(0,i.default)(t);var r=t.split("."),a=r.length;if(a>3||a<2)return!1;return r.reduce((function(t,r){return t&&(0,o.default)(r,{urlSafe:!0})}),!0)};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(2689));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}t.exports=r.default,t.exports.default=r.default},90478:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isLatLong(t,r){if((0,i.default)(t),r=(0,o.default)(r,p),!t.includes(","))return!1;var a=t.split(",");if(a[0].startsWith("(")&&!a[1].endsWith(")")||a[1].endsWith(")")&&!a[0].startsWith("("))return!1;if(r.checkDMS)return u.test(a[0])&&d.test(a[1]);return c.test(a[0])&&l.test(a[1])};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(84808));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var c=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,l=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,u=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,d=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,p={checkDMS:!1};t.exports=r.default,t.exports.default=r.default},20661:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isLength(t,r){var a,o;(0,i.default)(t),"object"===_typeof(r)?(a=r.min||0,o=r.max):(a=arguments[1]||0,o=arguments[2]);var c=t.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],l=t.length-c.length;return l>=a&&(void 0===o||l<=o)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}t.exports=r.default,t.exports.default=r.default},82786:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isLicensePlate(t,r){if((0,i.default)(t),r in o)return o[r](t);if("any"===r){for(var a in o){if((0,o[a])(t))return!0}return!1}throw new Error("Invalid locale '".concat(r,"'"))};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o={"cs-CZ":function csCZ(t){return/^(([ABCDEFHKIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(t)},"de-DE":function deDE(t){return/^((AW|UL|AK|GA|AÖ|LF|AZ|AM|AS|ZE|AN|AB|A|KG|KH|BA|EW|BZ|HY|KM|BT|HP|B|BC|BI|BO|FN|TT|ÜB|BN|AH|BS|FR|HB|ZZ|BB|BK|BÖ|OC|OK|CW|CE|C|CO|LH|CB|KW|LC|LN|DA|DI|DE|DH|SY|NÖ|DO|DD|DU|DN|D|EI|EA|EE|FI|EM|EL|EN|PF|ED|EF|ER|AU|ZP|E|ES|NT|EU|FL|FO|FT|FF|F|FS|FD|FÜ|GE|G|GI|GF|GS|ZR|GG|GP|GR|NY|ZI|GÖ|GZ|GT|HA|HH|HM|HU|WL|HZ|WR|RN|HK|HD|HN|HS|GK|HE|HF|RZ|HI|HG|HO|HX|IK|IL|IN|J|JL|KL|KA|KS|KF|KE|KI|KT|KO|KN|KR|KC|KU|K|LD|LL|LA|L|OP|LM|LI|LB|LU|LÖ|HL|LG|MD|GN|MZ|MA|ML|MR|MY|AT|DM|MC|NZ|RM|RG|MM|ME|MB|MI|FG|DL|HC|MW|RL|MK|MG|MÜ|WS|MH|M|MS|NU|NB|ND|NM|NK|NW|NR|NI|NF|DZ|EB|OZ|TG|TO|N|OA|GM|OB|CA|EH|FW|OF|OL|OE|OG|BH|LR|OS|AA|GD|OH|KY|NP|WK|PB|PA|PE|PI|PS|P|PM|PR|RA|RV|RE|R|H|SB|WN|RS|RD|RT|BM|NE|GV|RP|SU|GL|RO|GÜ|RH|EG|RW|PN|SK|MQ|RU|SZ|RI|SL|SM|SC|HR|FZ|VS|SW|SN|CR|SE|SI|SO|LP|SG|NH|SP|IZ|ST|BF|TE|HV|OD|SR|S|AC|DW|ZW|TF|TS|TR|TÜ|UM|PZ|TP|UE|UN|UH|MN|KK|VB|V|AE|PL|RC|VG|GW|PW|VR|VK|KB|WA|WT|BE|WM|WE|AP|MO|WW|FB|WZ|WI|WB|JE|WF|WO|W|WÜ|BL|Z|GC)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(AIC|FDB|ABG|SLN|SAW|KLZ|BUL|ESB|NAB|SUL|WST|ABI|AZE|BTF|KÖT|DKB|FEU|ROT|ALZ|SMÜ|WER|AUR|NOR|DÜW|BRK|HAB|TÖL|WOR|BAD|BAR|BER|BIW|EBS|KEM|MÜB|PEG|BGL|BGD|REI|WIL|BKS|BIR|WAT|BOR|BOH|BOT|BRB|BLK|HHM|NEB|NMB|WSF|LEO|HDL|WMS|WZL|BÜS|CHA|KÖZ|ROD|WÜM|CLP|NEC|COC|ZEL|COE|CUX|DAH|LDS|DEG|DEL|RSL|DLG|DGF|LAN|HEI|MED|DON|KIB|ROK|JÜL|MON|SLE|EBE|EIC|HIG|WBS|BIT|PRÜ|LIB|EMD|WIT|ERH|HÖS|ERZ|ANA|ASZ|MAB|MEK|STL|SZB|FDS|HCH|HOR|WOL|FRG|GRA|WOS|FRI|FFB|GAP|GER|BRL|CLZ|GTH|NOH|HGW|GRZ|LÖB|NOL|WSW|DUD|HMÜ|OHA|KRU|HAL|HAM|HBS|QLB|HVL|NAU|HAS|EBN|GEO|HOH|HDH|ERK|HER|WAN|HEF|ROF|HBN|ALF|HSK|USI|NAI|REH|SAN|KÜN|ÖHR|HOL|WAR|ARN|BRG|GNT|HOG|WOH|KEH|MAI|PAR|RID|ROL|KLE|GEL|KUS|KYF|ART|SDH|LDK|DIL|MAL|VIB|LER|BNA|GHA|GRM|MTL|WUR|LEV|LIF|STE|WEL|LIP|VAI|LUP|HGN|LBZ|LWL|PCH|STB|DAN|MKK|SLÜ|MSP|TBB|MGH|MTK|BIN|MSH|EIL|HET|SGH|BID|MYK|MSE|MST|MÜR|WRN|MEI|GRH|RIE|MZG|MIL|OBB|BED|FLÖ|MOL|FRW|SEE|SRB|AIB|MOS|BCH|ILL|SOB|NMS|NEA|SEF|UFF|NEW|VOH|NDH|TDO|NWM|GDB|GVM|WIS|NOM|EIN|GAN|LAU|HEB|OHV|OSL|SFB|ERB|LOS|BSK|KEL|BSB|MEL|WTL|OAL|FÜS|MOD|OHZ|OPR|BÜR|PAF|PLÖ|CAS|GLA|REG|VIT|ECK|SIM|GOA|EMS|DIZ|GOH|RÜD|SWA|NES|KÖN|MET|LRO|BÜZ|DBR|ROS|TET|HRO|ROW|BRV|HIP|PAN|GRI|SHK|EIS|SRO|SOK|LBS|SCZ|MER|QFT|SLF|SLS|HOM|SLK|ASL|BBG|SBK|SFT|SHG|MGN|MEG|ZIG|SAD|NEN|OVI|SHA|BLB|SIG|SON|SPN|FOR|GUB|SPB|IGB|WND|STD|STA|SDL|OBG|HST|BOG|SHL|PIR|FTL|SEB|SÖM|SÜW|TIR|SAB|TUT|ANG|SDT|LÜN|LSZ|MHL|VEC|VER|VIE|OVL|ANK|OVP|SBG|UEM|UER|WLG|GMN|NVP|RDG|RÜG|DAU|FKB|WAF|WAK|SLZ|WEN|SOG|APD|WUG|GUN|ESW|WIZ|WES|DIN|BRA|BÜD|WHV|HWI|GHC|WTM|WOB|WUN|MAK|SEL|OCH|HOT|WDA)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(t)},"de-LI":function deLI(t){return/^FL[- ]?\d{1,5}[UZ]?$/.test(t)},"fi-FI":function fiFI(t){return/^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(t)},"pt-PT":function ptPT(t){return/^([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})$/.test(t)},"sq-AL":function sqAL(t){return/^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(t)},"pt-BR":function ptBR(t){return/^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(t)}};t.exports=r.default,t.exports.default=r.default},67380:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isLocale(t){if((0,i.default)(t),"en_US_POSIX"===t||"ca_ES_VALENCIA"===t)return!0;return o.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^[A-Za-z]{2,4}([_-]([A-Za-z]{4}|[\d]{3}))?([_-]([A-Za-z]{2}|[\d]{3}))?$/;t.exports=r.default,t.exports.default=r.default},43928:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isLowercase(t){return(0,i.default)(t),t===t.toLowerCase()};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},28999:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isMACAddress(t,r){if((0,i.default)(t),r&&(r.no_colons||r.no_separators))return c.test(t);return o.test(t)||l.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/,c=/^([0-9a-fA-F]){12}$/,l=/^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/;t.exports=r.default,t.exports.default=r.default},90368:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isMD5(t){return(0,i.default)(t),o.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^[a-f0-9]{32}$/;t.exports=r.default,t.exports.default=r.default},72776:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isMagnetURI(t){return(0,i.default)(t),o.test(t.trim())};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^magnet:\?xt(?:\.1)?=urn:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?($|&)/i;t.exports=r.default,t.exports.default=r.default},44554:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isMimeType(t){return(0,i.default)(t),o.test(t)||c.test(t)||l.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+]{1,100}$/i,c=/^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i,l=/^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i;t.exports=r.default,t.exports.default=r.default},28355:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isMobilePhone(t,r,a){if((0,i.default)(t),a&&a.strictMode&&!t.startsWith("+"))return!1;if(Array.isArray(r))return r.some((function(r){if(o.hasOwnProperty(r)&&o[r].test(t))return!0;return!1}));if(r in o)return o[r].test(t);if(!r||"any"===r){for(var c in o){if(o.hasOwnProperty(c))if(o[c].test(t))return!0}return!1}throw new Error("Invalid locale '".concat(r,"'"))},r.locales=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o={"am-AM":/^(\+?374|0)((10|[9|7][0-9])\d{6}$|[2-4]\d{7}$)/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)[569]\d{7}$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?(9[1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(5[015]|7[07]|99)\d{7}$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)[1|3])([0|5][0-45-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|91|9[3-9])\d{7}$/,"el-GR":/^(\+?30|0)?(69\d{8})$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}))/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4(0|1|2|4|5|6)?|50)\s?(\d\s?){4,8}\d$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(5|79)\d{7}$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"ms-MY":/^(\+?6?01){1}(([0145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[2-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+244)\d{9}$/,"ro-RO":/^(\+?4?0)\s?7\d{2}(\/|\s|\.|\-)?\d{3}(\s|\.|\-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"sq-AL":/^(\+355|0)6[789]\d{6}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38|8)?0\d{9}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/};o["en-CA"]=o["en-US"],o["fr-CA"]=o["en-CA"],o["fr-BE"]=o["nl-BE"],o["zh-HK"]=o["en-HK"],o["zh-MO"]=o["en-MO"],o["ga-IE"]=o["en-IE"],o["fr-CH"]=o["de-CH"],o["it-CH"]=o["fr-CH"];var c=Object.keys(o);r.locales=c},19131:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isMongoId(t){return(0,i.default)(t),(0,o.default)(t)&&24===t.length};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(77117));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}t.exports=r.default,t.exports.default=r.default},13590:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isMultibyte(t){return(0,i.default)(t),o.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/[^\x00-\x7F]/;t.exports=r.default,t.exports.default=r.default},24986:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isNumeric(t,r){if((0,i.default)(t),r&&r.no_symbols)return c.test(t);return new RegExp("^[+-]?([0-9]*[".concat((r||{}).locale?o.decimal[r.locale]:".","])?[0-9]+$")).test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571)),o=a(60079);var c=/^[0-9]+$/;t.exports=r.default,t.exports.default=r.default},66090:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isOctal(t){return(0,i.default)(t),o.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^(0o)?[0-7]+$/i;t.exports=r.default,t.exports.default=r.default},51513:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isPassportNumber(t,r){(0,i.default)(t);var a=t.replace(/\s/g,"").toUpperCase();return r.toUpperCase()in o&&o[r].test(a)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$/};t.exports=r.default,t.exports.default=r.default},24595:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isPort(t){return(0,i.default)(t,{min:0,max:65535})};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(20937));t.exports=r.default,t.exports.default=r.default},78140:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isPostalCode(t,r){if((0,i.default)(t),r in u)return u[r].test(t);if("any"===r){for(var a in u){if(u.hasOwnProperty(a))if(u[a].test(t))return!0}return!1}throw new Error("Invalid locale '".concat(r,"'"))},r.locales=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^\d{4}$/,c=/^\d{5}$/,l=/^\d{6}$/,u={AD:/^AD\d{3}$/,AT:o,AU:o,AZ:/^AZ\d{4}$/,BE:o,BG:o,BR:/^\d{5}-\d{3}$/,BY:/2[1-4]{1}\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:o,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CZ:/^\d{3}\s?\d{2}$/,DE:c,DK:o,DO:c,DZ:c,EE:c,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:c,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:o,ID:c,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/\b(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}\b/,IS:/^\d{3}$/,IT:c,JP:/^\d{3}\-\d{4}$/,KE:c,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:o,LV:/^LV\-\d{4}$/,LK:c,MX:c,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:c,NL:/^\d{4}\s?[a-z]{2}$/i,NO:o,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:o,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:l,RU:l,SA:c,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:l,SI:o,SK:/^\d{3}\s?\d{2}$/,TH:c,TN:o,TW:/^\d{3}(\d{2})?$/,UA:c,US:/^\d{5}(-\d{4})?$/,ZA:o,ZM:c},d=Object.keys(u);r.locales=d},94611:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isRFC3339(t){return(0,i.default)(t),m.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/([01][0-9]|2[0-3])/,c=/[0-5][0-9]/,l=new RegExp("[-+]".concat(o.source,":").concat(c.source)),u=new RegExp("([zZ]|".concat(l.source,")")),d=new RegExp("".concat(o.source,":").concat(c.source,":").concat(/([0-5][0-9]|60)/.source).concat(/(\.[0-9]+)?/.source)),p=new RegExp("".concat(/[0-9]{4}/.source,"-").concat(/(0[1-9]|1[0-2])/.source,"-").concat(/([12]\d|0[1-9]|3[01])/.source)),h=new RegExp("".concat(d.source).concat(u.source)),m=new RegExp("^".concat(p.source,"[ tT]").concat(h.source,"$"));t.exports=r.default,t.exports.default=r.default},6454:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isRgbColor(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if((0,i.default)(t),!r)return o.test(t)||c.test(t);return o.test(t)||c.test(t)||l.test(t)||u.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/,c=/^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/,l=/^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)/,u=/^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)/;t.exports=r.default,t.exports.default=r.default},86826:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isSemVer(t){return(0,i.default)(t),o.test(t)};var i=_interopRequireDefault(a(65571));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var o=(0,_interopRequireDefault(a(24731)).default)(["^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)","(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))","?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$"],"i");t.exports=r.default,t.exports.default=r.default},68220:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isSlug(t){return(0,i.default)(t),o.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;t.exports=r.default,t.exports.default=r.default},17633:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isStrongPassword(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,o.default)(t);var a=analyzePassword(t);if((r=(0,i.default)(r||{},p)).returnScore)return scorePassword(a,r);return a.length>=r.minLength&&a.lowercaseCount>=r.minLowercase&&a.uppercaseCount>=r.minUppercase&&a.numberCount>=r.minNumbers&&a.symbolCount>=r.minSymbols};var i=_interopRequireDefault(a(84808)),o=_interopRequireDefault(a(65571));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var c=/^[A-Z]$/,l=/^[a-z]$/,u=/^[0-9]$/,d=/^[-#!$@%^&*()_+|~=`{}\[\]:";'<>?,.\/ ]$/,p={minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1,returnScore:!1,pointsPerUnique:1,pointsPerRepeat:.5,pointsForContainingLower:10,pointsForContainingUpper:10,pointsForContainingNumber:10,pointsForContainingSymbol:10};function analyzePassword(t){var r=function countChars(t){var r={};return Array.from(t).forEach((function(t){r[t]?r[t]+=1:r[t]=1})),r}(t),a={length:t.length,uniqueChars:Object.keys(r).length,uppercaseCount:0,lowercaseCount:0,numberCount:0,symbolCount:0};return Object.keys(r).forEach((function(t){c.test(t)?a.uppercaseCount+=r[t]:l.test(t)?a.lowercaseCount+=r[t]:u.test(t)?a.numberCount+=r[t]:d.test(t)&&(a.symbolCount+=r[t])})),a}function scorePassword(t,r){var a=0;return a+=t.uniqueChars*r.pointsPerUnique,a+=(t.length-t.uniqueChars)*r.pointsPerRepeat,t.lowercaseCount>0&&(a+=r.pointsForContainingLower),t.uppercaseCount>0&&(a+=r.pointsForContainingUpper),t.numberCount>0&&(a+=r.pointsForContainingNumber),t.symbolCount>0&&(a+=r.pointsForContainingSymbol),a}t.exports=r.default,t.exports.default=r.default},72828:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isSurrogatePair(t){return(0,i.default)(t),o.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o=/[\uD800-\uDBFF][\uDC00-\uDFFF]/;t.exports=r.default,t.exports.default=r.default},53058:(t,r,a)=>{"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isTaxID(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";(0,i.default)(t);var a=t.slice(0);if(r in u)return r in h&&(a=a.replace(h[r],"")),!!u[r].test(a)&&(!(r in d)||d[r](a));throw new Error("Invalid locale '".concat(r,"'"))};var i=_interopRequireDefault(a(65571)),o=function _interopRequireWildcard(t){if(t&&t.__esModule)return t;if(null===t||"object"!==_typeof(t)&&"function"!=typeof t)return{default:t};var r=_getRequireWildcardCache();if(r&&r.has(t))return r.get(t);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var c=i?Object.getOwnPropertyDescriptor(t,o):null;c&&(c.get||c.set)?Object.defineProperty(a,o,c):a[o]=t[o]}a.default=t,r&&r.set(t,a);return a}(a(83672)),c=_interopRequireDefault(a(82549));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return t},t}function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}var l={andover:["10","12"],atlanta:["60","67"],austin:["50","53"],brookhaven:["01","02","03","04","05","06","11","13","14","16","21","22","23","25","34","51","52","54","55","56","57","58","59","65"],cincinnati:["30","32","35","36","37","38","61"],fresno:["15","24"],internet:["20","26","27","45","46","47"],kansas:["40","44"],memphis:["94","95"],ogden:["80","90"],philadelphia:["33","39","41","42","43","46","48","62","63","64","66","68","71","72","73","74","75","76","77","81","82","83","84","85","86","87","88","91","92","93","98","99"],sba:["31"]};function itItNameCheck(t){for(var r=!1,a=!1,i=0;i<3;i++)if(!r&&/[AEIOU]/.test(t[i]))r=!0;else if(!a&&r&&"X"===t[i])a=!0;else if(i>0){if(r&&!a&&!/[AEIOU]/.test(t[i]))return!1;if(a&&!/X/.test(t[i]))return!1}return!0}var u={"bg-BG":/^\d{10}$/,"cs-CZ":/^\d{6}\/{0,1}\d{3,4}$/,"de-AT":/^\d{9}$/,"de-DE":/^[1-9]\d{10}$/,"dk-DK":/^\d{6}-{0,1}\d{4}$/,"el-CY":/^[09]\d{7}[A-Z]$/,"el-GR":/^([0-4]|[7-9])\d{8}$/,"en-GB":/^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i,"en-IE":/^\d{7}[A-W][A-IW]{0,1}$/i,"en-US":/^\d{2}[- ]{0,1}\d{7}$/,"es-ES":/^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i,"et-EE":/^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/,"fi-FI":/^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i,"fr-BE":/^\d{11}$/,"fr-FR":/^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/,"fr-LU":/^\d{13}$/,"hr-HR":/^\d{11}$/,"hu-HU":/^8\d{9}$/,"it-IT":/^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,"lv-LV":/^\d{6}-{0,1}\d{5}$/,"mt-MT":/^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i,"nl-NL":/^\d{9}$/,"pl-PL":/^\d{10,11}$/,"pt-BR":/(?:^\d{11}$)|(?:^\d{14}$)/,"pt-PT":/^\d{9}$/,"ro-RO":/^\d{13}$/,"sk-SK":/^\d{6}\/{0,1}\d{3,4}$/,"sl-SI":/^[1-9]\d{7}$/,"sv-SE":/^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/};u["lb-LU"]=u["fr-LU"],u["lt-LT"]=u["et-EE"],u["nl-BE"]=u["fr-BE"];var d={"bg-BG":function bgBgCheck(t){var r=t.slice(0,2),a=parseInt(t.slice(2,4),10);a>40?(a-=40,r="20".concat(r)):a>20?(a-=20,r="18".concat(r)):r="19".concat(r),a<10&&(a="0".concat(a));var i="".concat(r,"/").concat(a,"/").concat(t.slice(4,6));if(!(0,c.default)(i,"YYYY/MM/DD"))return!1;for(var o=t.split("").map((function(t){return parseInt(t,10)})),l=[2,4,8,5,10,9,7,3,6],u=0,d=0;d<l.length;d++)u+=o[d]*l[d];return(u=u%11==10?0:u%11)===o[9]},"cs-CZ":function csCzCheck(t){t=t.replace(/\W/,"");var r=parseInt(t.slice(0,2),10);if(10===t.length)r=r<54?"20".concat(r):"19".concat(r);else{if("000"===t.slice(6))return!1;if(!(r<54))return!1;r="19".concat(r)}3===r.length&&(r=[r.slice(0,2),"0",r.slice(2)].join(""));var a=parseInt(t.slice(2,4),10);if(a>50&&(a-=50),a>20){if(parseInt(r,10)<2004)return!1;a-=20}a<10&&(a="0".concat(a));var i="".concat(r,"/").concat(a,"/").concat(t.slice(4,6));if(!(0,c.default)(i,"YYYY/MM/DD"))return!1;if(10===t.length&&parseInt(t,10)%11!=0){var o=parseInt(t.slice(0,9),10)%11;if(!(parseInt(r,10)<1986&&10===o))return!1;if(0!==parseInt(t.slice(9),10))return!1}return!0},"de-AT":function deAtCheck(t){return o.luhnCheck(t)},"de-DE":function deDeCheck(t){for(var r=t.split("").map((function(t){return parseInt(t,10)})),a=[],i=0;i<r.length-1;i++){a.push("");for(var c=0;c<r.length-1;c++)r[i]===r[c]&&(a[i]+=c)}if(2!==(a=a.filter((function(t){return t.length>1}))).length&&3!==a.length)return!1;if(3===a[0].length){for(var l=a[0].split("").map((function(t){return parseInt(t,10)})),u=0,d=0;d<l.length-1;d++)l[d]+1===l[d+1]&&(u+=1);if(2===u)return!1}return o.iso7064Check(t)},"dk-DK":function dkDkCheck(t){t=t.replace(/\W/,"");var r=parseInt(t.slice(4,6),10);switch(t.slice(6,7)){case"0":case"1":case"2":case"3":r="19".concat(r);break;case"4":case"9":r=r<37?"20".concat(r):"19".concat(r);break;default:if(r<37)r="20".concat(r);else{if(!(r>58))return!1;r="18".concat(r)}}3===r.length&&(r=[r.slice(0,2),"0",r.slice(2)].join(""));var a="".concat(r,"/").concat(t.slice(2,4),"/").concat(t.slice(0,2));if(!(0,c.default)(a,"YYYY/MM/DD"))return!1;for(var i=t.split("").map((function(t){return parseInt(t,10)})),o=0,l=4,u=0;u<9;u++)o+=i[u]*l,1===(l-=1)&&(l=7);return 1!==(o%=11)&&(0===o?0===i[9]:i[9]===11-o)},"el-CY":function elCyCheck(t){for(var r=t.slice(0,8).split("").map((function(t){return parseInt(t,10)})),a=0,i=1;i<r.length;i+=2)a+=r[i];for(var o=0;o<r.length;o+=2)r[o]<2?a+=1-r[o]:(a+=2*(r[o]-2)+5,r[o]>4&&(a+=2));return String.fromCharCode(a%26+65)===t.charAt(8)},"el-GR":function elGrCheck(t){for(var r=t.split("").map((function(t){return parseInt(t,10)})),a=0,i=0;i<8;i++)a+=r[i]*Math.pow(2,8-i);return a%11%10===r[8]},"en-IE":function enIeCheck(t){var r=o.reverseMultiplyAndSum(t.split("").slice(0,7).map((function(t){return parseInt(t,10)})),8);return 9===t.length&&"W"!==t[8]&&(r+=9*(t[8].charCodeAt(0)-64)),0===(r%=23)?"W"===t[7].toUpperCase():t[7].toUpperCase()===String.fromCharCode(64+r)},"en-US":function enUsCheck(t){return-1!==function enUsGetPrefixes(){var t=[];for(var r in l)l.hasOwnProperty(r)&&t.push.apply(t,_toConsumableArray(l[r]));return t}().indexOf(t.substr(0,2))},"es-ES":function esEsCheck(t){var r=t.toUpperCase().split("");if(isNaN(parseInt(r[0],10))&&r.length>1){var a=0;switch(r[0]){case"Y":a=1;break;case"Z":a=2}r.splice(0,1,a)}else for(;r.length<9;)r.unshift(0);r=r.join("");var i=parseInt(r.slice(0,8),10)%23;return r[8]===["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"][i]},"et-EE":function etEeCheck(t){var r=t.slice(1,3);switch(t.slice(0,1)){case"1":case"2":r="18".concat(r);break;case"3":case"4":r="19".concat(r);break;default:r="20".concat(r)}var a="".concat(r,"/").concat(t.slice(3,5),"/").concat(t.slice(5,7));if(!(0,c.default)(a,"YYYY/MM/DD"))return!1;for(var i=t.split("").map((function(t){return parseInt(t,10)})),o=0,l=1,u=0;u<10;u++)o+=i[u]*l,10===(l+=1)&&(l=1);if(o%11==10){o=0,l=3;for(var d=0;d<10;d++)o+=i[d]*l,10===(l+=1)&&(l=1);if(o%11==10)return 0===i[10]}return o%11===i[10]},"fi-FI":function fiFiCheck(t){var r=t.slice(4,6);switch(t.slice(6,7)){case"+":r="18".concat(r);break;case"-":r="19".concat(r);break;default:r="20".concat(r)}var a="".concat(r,"/").concat(t.slice(2,4),"/").concat(t.slice(0,2));if(!(0,c.default)(a,"YYYY/MM/DD"))return!1;var i=parseInt(t.slice(0,6)+t.slice(7,10),10)%31;return i<10?i===parseInt(t.slice(10),10):["A","B","C","D","E","F","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y"][i-=10]===t.slice(10)},"fr-BE":function frBeCheck(t){if("00"!==t.slice(2,4)||"00"!==t.slice(4,6)){var r="".concat(t.slice(0,2),"/").concat(t.slice(2,4),"/").concat(t.slice(4,6));if(!(0,c.default)(r,"YY/MM/DD"))return!1}var a=97-parseInt(t.slice(0,9),10)%97,i=parseInt(t.slice(9,11),10);return a===i||(a=97-parseInt("2".concat(t.slice(0,9)),10)%97)===i},"fr-FR":function frFrCheck(t){return t=t.replace(/\s/g,""),parseInt(t.slice(0,10),10)%511===parseInt(t.slice(10,13),10)},"fr-LU":function frLuCheck(t){var r="".concat(t.slice(0,4),"/").concat(t.slice(4,6),"/").concat(t.slice(6,8));return!!(0,c.default)(r,"YYYY/MM/DD")&&(!!o.luhnCheck(t.slice(0,12))&&o.verhoeffCheck("".concat(t.slice(0,11)).concat(t[12])))},"hr-HR":function hrHrCheck(t){return o.iso7064Check(t)},"hu-HU":function huHuCheck(t){for(var r=t.split("").map((function(t){return parseInt(t,10)})),a=8,i=1;i<9;i++)a+=r[i]*(i+1);return a%11===r[9]},"it-IT":function itItCheck(t){var r=t.toUpperCase().split("");if(!itItNameCheck(r.slice(0,3)))return!1;if(!itItNameCheck(r.slice(3,6)))return!1;for(var a={L:"0",M:"1",N:"2",P:"3",Q:"4",R:"5",S:"6",T:"7",U:"8",V:"9"},i=0,o=[6,7,9,10,12,13,14];i<o.length;i++){var l=o[i];r[l]in a&&r.splice(l,1,a[r[l]])}var u={A:"01",B:"02",C:"03",D:"04",E:"05",H:"06",L:"07",M:"08",P:"09",R:"10",S:"11",T:"12"}[r[8]],d=parseInt(r[9]+r[10],10);d>40&&(d-=40),d<10&&(d="0".concat(d));var p="".concat(r[6]).concat(r[7],"/").concat(u,"/").concat(d);if(!(0,c.default)(p,"YY/MM/DD"))return!1;for(var h=0,m=1;m<r.length-1;m+=2){var y=parseInt(r[m],10);isNaN(y)&&(y=r[m].charCodeAt(0)-65),h+=y}for(var g={A:1,B:0,C:5,D:7,E:9,F:13,G:15,H:17,I:19,J:21,K:2,L:4,M:18,N:20,O:11,P:3,Q:6,R:8,S:12,T:14,U:16,V:10,W:22,X:25,Y:24,Z:23,0:1,1:0},v=0;v<r.length-1;v+=2){var b=0;if(r[v]in g)b=g[r[v]];else{var R=parseInt(r[v],10);b=2*R+1,R>4&&(b+=2)}h+=b}return String.fromCharCode(65+h%26)===r[15]},"lv-LV":function lvLvCheck(t){var r=(t=t.replace(/\W/,"")).slice(0,2);if("32"!==r){if("00"!==t.slice(2,4)){var a=t.slice(4,6);switch(t[6]){case"0":a="18".concat(a);break;case"1":a="19".concat(a);break;default:a="20".concat(a)}var i="".concat(a,"/").concat(t.slice(2,4),"/").concat(r);if(!(0,c.default)(i,"YYYY/MM/DD"))return!1}for(var o=1101,l=[1,6,3,7,9,10,5,8,4,2],u=0;u<t.length-1;u++)o-=parseInt(t[u],10)*l[u];return parseInt(t[10],10)===o%11}return!0},"mt-MT":function mtMtCheck(t){if(9!==t.length){for(var r=t.toUpperCase().split("");r.length<8;)r.unshift(0);switch(t[7]){case"A":case"P":if(0===parseInt(r[6],10))return!1;break;default:var a=parseInt(r.join("").slice(0,5),10);if(a>32e3)return!1;if(a===parseInt(r.join("").slice(5,7),10))return!1}}return!0},"nl-NL":function nlNlCheck(t){return o.reverseMultiplyAndSum(t.split("").slice(0,8).map((function(t){return parseInt(t,10)})),9)%11===parseInt(t[8],10)},"pl-PL":function plPlCheck(t){if(10===t.length){for(var r=[6,5,7,2,3,4,5,6,7],a=0,i=0;i<r.length;i++)a+=parseInt(t[i],10)*r[i];return 10!==(a%=11)&&a===parseInt(t[9],10)}var o=t.slice(0,2),l=parseInt(t.slice(2,4),10);l>80?(o="18".concat(o),l-=80):l>60?(o="22".concat(o),l-=60):l>40?(o="21".concat(o),l-=40):l>20?(o="20".concat(o),l-=20):o="19".concat(o),l<10&&(l="0".concat(l));var u="".concat(o,"/").concat(l,"/").concat(t.slice(4,6));if(!(0,c.default)(u,"YYYY/MM/DD"))return!1;for(var d=0,p=1,h=0;h<t.length-1;h++)d+=parseInt(t[h],10)*p%10,(p+=2)>10?p=1:5===p&&(p+=2);return(d=10-d%10)===parseInt(t[10],10)},"pt-BR":function ptBrCheck(t){if(11===t.length){var r,a;if(r=0,"11111111111"===t||"22222222222"===t||"33333333333"===t||"44444444444"===t||"55555555555"===t||"66666666666"===t||"77777777777"===t||"88888888888"===t||"99999999999"===t||"00000000000"===t)return!1;for(var i=1;i<=9;i++)r+=parseInt(t.substring(i-1,i),10)*(11-i);if(10===(a=10*r%11)&&(a=0),a!==parseInt(t.substring(9,10),10))return!1;r=0;for(var o=1;o<=10;o++)r+=parseInt(t.substring(o-1,o),10)*(12-o);return 10===(a=10*r%11)&&(a=0),a===parseInt(t.substring(10,11),10)}if("00000000000000"===t||"11111111111111"===t||"22222222222222"===t||"33333333333333"===t||"44444444444444"===t||"55555555555555"===t||"66666666666666"===t||"77777777777777"===t||"88888888888888"===t||"99999999999999"===t)return!1;for(var c=t.length-2,l=t.substring(0,c),u=t.substring(c),d=0,p=c-7,h=c;h>=1;h--)d+=l.charAt(c-h)*p,(p-=1)<2&&(p=9);var m=d%11<2?0:11-d%11;if(m!==parseInt(u.charAt(0),10))return!1;c+=1,l=t.substring(0,c),d=0,p=c-7;for(var y=c;y>=1;y--)d+=l.charAt(c-y)*p,(p-=1)<2&&(p=9);return(m=d%11<2?0:11-d%11)===parseInt(u.charAt(1),10)},"pt-PT":function ptPtCheck(t){var r=11-o.reverseMultiplyAndSum(t.split("").slice(0,8).map((function(t){return parseInt(t,10)})),9)%11;return r>9?0===parseInt(t[8],10):r===parseInt(t[8],10)},"ro-RO":function roRoCheck(t){if("9000"!==t.slice(0,4)){var r=t.slice(1,3);switch(t[0]){case"1":case"2":r="19".concat(r);break;case"3":case"4":r="18".concat(r);break;case"5":case"6":r="20".concat(r)}var a="".concat(r,"/").concat(t.slice(3,5),"/").concat(t.slice(5,7));if(8===a.length){if(!(0,c.default)(a,"YY/MM/DD"))return!1}else if(!(0,c.default)(a,"YYYY/MM/DD"))return!1;for(var i=t.split("").map((function(t){return parseInt(t,10)})),o=[2,7,9,1,4,6,3,5,8,2,7,9],l=0,u=0;u<o.length;u++)l+=i[u]*o[u];return l%11==10?1===i[12]:i[12]===l%11}return!0},"sk-SK":function skSkCheck(t){if(9===t.length){if("000"===(t=t.replace(/\W/,"")).slice(6))return!1;var r=parseInt(t.slice(0,2),10);if(r>53)return!1;r=r<10?"190".concat(r):"19".concat(r);var a=parseInt(t.slice(2,4),10);a>50&&(a-=50),a<10&&(a="0".concat(a));var i="".concat(r,"/").concat(a,"/").concat(t.slice(4,6));if(!(0,c.default)(i,"YYYY/MM/DD"))return!1}return!0},"sl-SI":function slSiCheck(t){var r=11-o.reverseMultiplyAndSum(t.split("").slice(0,7).map((function(t){return parseInt(t,10)})),8)%11;return 10===r?0===parseInt(t[7],10):r===parseInt(t[7],10)},"sv-SE":function svSeCheck(t){var r=t.slice(0);t.length>11&&(r=r.slice(2));var a="",i=r.slice(2,4),l=parseInt(r.slice(4,6),10);if(t.length>11)a=t.slice(0,4);else if(a=t.slice(0,2),11===t.length&&l<60){var u=(new Date).getFullYear().toString(),d=parseInt(u.slice(0,2),10);if(u=parseInt(u,10),"-"===t[6])a=parseInt("".concat(d).concat(a),10)>u?"".concat(d-1).concat(a):"".concat(d).concat(a);else if(a="".concat(d-1).concat(a),u-parseInt(a,10)<100)return!1}l>60&&(l-=60),l<10&&(l="0".concat(l));var p="".concat(a,"/").concat(i,"/").concat(l);if(8===p.length){if(!(0,c.default)(p,"YY/MM/DD"))return!1}else if(!(0,c.default)(p,"YYYY/MM/DD"))return!1;return o.luhnCheck(t.replace(/\W/,""))}};d["lb-LU"]=d["fr-LU"],d["lt-LT"]=d["et-EE"],d["nl-BE"]=d["fr-BE"];var p=/[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g,h={"de-AT":p,"de-DE":/[\/\\]/g,"fr-BE":p};h["nl-BE"]=h["fr-BE"],t.exports=r.default,t.exports.default=r.default},2492:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isURL(t,r){if((0,i.default)(t),!t||/[\s<>]/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;if((r=(0,l.default)(r,u)).validate_length&&t.length>=2083)return!1;if(!r.allow_fragments&&t.includes("#"))return!1;if(!r.allow_query_components&&(t.includes("?")||t.includes("&")))return!1;var a,p,h,m,y,g,v,b;if(v=t.split("#"),t=v.shift(),v=t.split("?"),t=v.shift(),(v=t.split("://")).length>1){if(a=v.shift().toLowerCase(),r.require_valid_protocol&&-1===r.protocols.indexOf(a))return!1}else{if(r.require_protocol)return!1;if("//"===t.substr(0,2)){if(!r.allow_protocol_relative_urls)return!1;v[0]=t.substr(2)}}if(""===(t=v.join("://")))return!1;if(v=t.split("/"),""===(t=v.shift())&&!r.require_host)return!0;if((v=t.split("@")).length>1){if(r.disallow_auth)return!1;if(""===v[0])return!1;if((p=v.shift()).indexOf(":")>=0&&p.split(":").length>2)return!1;var R=function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var a=[],i=!0,o=!1,c=void 0;try{for(var l,u=t[Symbol.iterator]();!(i=(l=u.next()).done)&&(a.push(l.value),!r||a.length!==r);i=!0);}catch(t){o=!0,c=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw c}}return a}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(p.split(":"),2),C=R[0],I=R[1];if(""===C&&""===I)return!1}m=v.join("@"),g=null,b=null;var w=m.match(d);w?(h="",b=w[1],g=w[2]||null):(v=m.split(":"),h=v.shift(),v.length&&(g=v.join(":")));if(null!==g&&g.length>0){if(y=parseInt(g,10),!/^[0-9]+$/.test(g)||y<=0||y>65535)return!1}else if(r.require_port)return!1;if(r.host_whitelist)return checkHost(h,r.host_whitelist);if(!((0,c.default)(h)||(0,o.default)(h,r)||b&&(0,c.default)(b,6)))return!1;if(h=h||b,r.host_blacklist&&checkHost(h,r.host_blacklist))return!1;return!0};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(10221)),c=_interopRequireDefault(a(61028)),l=_interopRequireDefault(a(84808));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}var u={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},d=/^\[([^\]]+)\](?::([0-9]+))?$/;function checkHost(t,r){for(var a=0;a<r.length;a++){var i=r[a];if(t===i||(o=i,"[object RegExp]"===Object.prototype.toString.call(o)&&i.test(t)))return!0}var o;return!1}t.exports=r.default,t.exports.default=r.default},57278:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isUUID(t,r){(0,i.default)(t);var a=o[[void 0,null].includes(r)?"all":r];return!!a&&a.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};t.exports=r.default,t.exports.default=r.default},57245:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isUppercase(t){return(0,i.default)(t),t===t.toUpperCase()};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},55977:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isVAT(t,r){if((0,i.default)(t),(0,i.default)(r),r in o)return o[r].test(t);throw new Error("Invalid country code: '".concat(r,"'"))},r.vatMatchers=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));var o={GB:/^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/,IT:/^(IT)?[0-9]{11}$/,NL:/^(NL)?[0-9]{9}B[0-9]{2}$/};r.vatMatchers=o},49019:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isVariableWidth(t){return(0,i.default)(t),o.fullWidth.test(t)&&c.halfWidth.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571)),o=a(77146),c=a(82941);t.exports=r.default,t.exports.default=r.default},88346:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function isWhitelisted(t,r){(0,i.default)(t);for(var a=t.length-1;a>=0;a--)if(-1===r.indexOf(t[a]))return!1;return!0};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},14959:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function ltrim(t,r){(0,i.default)(t);var a=r?new RegExp("^[".concat(r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+"),"g"):/^\s+/g;return t.replace(a,"")};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},30661:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function matches(t,r,a){(0,i.default)(t),"[object RegExp]"!==Object.prototype.toString.call(r)&&(r=new RegExp(r,a));return r.test(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},2900:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function normalizeEmail(t,r){r=(0,i.default)(r,o);var a=t.split("@"),p=a.pop(),h=[a.join("@"),p];if(h[1]=h[1].toLowerCase(),"gmail.com"===h[1]||"googlemail.com"===h[1]){if(r.gmail_remove_subaddress&&(h[0]=h[0].split("+")[0]),r.gmail_remove_dots&&(h[0]=h[0].replace(/\.+/g,dotsReplacer)),!h[0].length)return!1;(r.all_lowercase||r.gmail_lowercase)&&(h[0]=h[0].toLowerCase()),h[1]=r.gmail_convert_googlemaildotcom?"gmail.com":h[1]}else if(c.indexOf(h[1])>=0){if(r.icloud_remove_subaddress&&(h[0]=h[0].split("+")[0]),!h[0].length)return!1;(r.all_lowercase||r.icloud_lowercase)&&(h[0]=h[0].toLowerCase())}else if(l.indexOf(h[1])>=0){if(r.outlookdotcom_remove_subaddress&&(h[0]=h[0].split("+")[0]),!h[0].length)return!1;(r.all_lowercase||r.outlookdotcom_lowercase)&&(h[0]=h[0].toLowerCase())}else if(u.indexOf(h[1])>=0){if(r.yahoo_remove_subaddress){var m=h[0].split("-");h[0]=m.length>1?m.slice(0,-1).join("-"):m[0]}if(!h[0].length)return!1;(r.all_lowercase||r.yahoo_lowercase)&&(h[0]=h[0].toLowerCase())}else d.indexOf(h[1])>=0?((r.all_lowercase||r.yandex_lowercase)&&(h[0]=h[0].toLowerCase()),h[1]="yandex.ru"):r.all_lowercase&&(h[0]=h[0].toLowerCase());return h.join("@")};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(84808));var o={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},c=["icloud.com","me.com"],l=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],u=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],d=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];function dotsReplacer(t){return t.length>1?t:""}t.exports=r.default,t.exports.default=r.default},29778:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function rtrim(t,r){if((0,i.default)(t),r){var a=new RegExp("[".concat(r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+$"),"g");return t.replace(a,"")}var o=t.length-1;for(;/\s/.test(t.charAt(o));)o-=1;return t.slice(0,o+1)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},8035:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function stripLow(t,r){(0,i.default)(t);var a=r?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return(0,o.default)(t,a)};var i=_interopRequireDefault(a(65571)),o=_interopRequireDefault(a(44928));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}t.exports=r.default,t.exports.default=r.default},557:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function toBoolean(t,r){if((0,i.default)(t),r)return"1"===t||/^true$/i.test(t);return"0"!==t&&!/^false$/i.test(t)&&""!==t};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},8469:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function toDate(t){return(0,i.default)(t),t=Date.parse(t),isNaN(t)?null:new Date(t)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},77536:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function toFloat(t){return(0,i.default)(t)?parseFloat(t):NaN};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(79146));t.exports=r.default,t.exports.default=r.default},21359:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function toInt(t,r){return(0,i.default)(t),parseInt(t,r||10)};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},24790:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function trim(t,r){return(0,i.default)((0,o.default)(t,r),r)};var i=_interopRequireDefault(a(29778)),o=_interopRequireDefault(a(14959));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}t.exports=r.default,t.exports.default=r.default},94816:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function unescape(t){return(0,i.default)(t),t.replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#x2F;/g,"/").replace(/&#x5C;/g,"\\").replace(/&#96;/g,"`").replace(/&amp;/g,"&")};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},83672:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.iso7064Check=function iso7064Check(t){for(var r=10,a=0;a<t.length-1;a++)r=(parseInt(t[a],10)+r)%10==0?9:(parseInt(t[a],10)+r)%10*2%11;return(r=1===r?0:11-r)===parseInt(t[10],10)},r.luhnCheck=function luhnCheck(t){for(var r=0,a=!1,i=t.length-1;i>=0;i--){if(a){var o=2*parseInt(t[i],10);r+=o>9?o.toString().split("").map((function(t){return parseInt(t,10)})).reduce((function(t,r){return t+r}),0):o}else r+=parseInt(t[i],10);a=!a}return r%10==0},r.reverseMultiplyAndSum=function reverseMultiplyAndSum(t,r){for(var a=0,i=0;i<t.length;i++)a+=t[i]*(r-i);return a},r.verhoeffCheck=function verhoeffCheck(t){for(var r=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],a=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],i=t.split("").reverse().join(""),o=0,c=0;c<i.length;c++)o=r[o][a[c%8][parseInt(i[c],10)]];return 0===o}},65571:(t,r)=>{"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=function assertString(t){if(!("string"==typeof t||t instanceof String)){var r=_typeof(t);throw null===t?r="null":"object"===r&&(r=t.constructor.name),new TypeError("Expected a string but received a ".concat(r))}},t.exports=r.default,t.exports.default=r.default},18343:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=function includes(t,r){return t.some((function(t){return r===t}))};r.default=a,t.exports=r.default,t.exports.default=r.default},84808:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function merge(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;for(var a in r)void 0===t[a]&&(t[a]=r[a]);return t},t.exports=r.default,t.exports.default=r.default},24731:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function multilineRegexp(t,r){var a=t.join("");return new RegExp(a,r)},t.exports=r.default,t.exports.default=r.default},31913:(t,r)=>{"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=function toString(t){"object"===_typeof(t)&&null!==t?t="function"==typeof t.toString?t.toString():"[object Object]":(null==t||isNaN(t)&&!t.length)&&(t="");return String(t)},t.exports=r.default,t.exports.default=r.default},34714:(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function whitelist(t,r){return(0,i.default)(t),t.replace(new RegExp("[^".concat(r,"]+"),"g"),"")};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(65571));t.exports=r.default,t.exports.default=r.default},3850:t=>{"use strict";t.exports=NMSHDConsumption},25030:t=>{"use strict";t.exports=NMSHDContent},82890:t=>{"use strict";t.exports=NMSHDCrypto},19663:t=>{"use strict";t.exports=NMSHDTransport},90194:t=>{"use strict";t.exports=TSServal},64775:t=>{"use strict";t.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},98:t=>{"use strict";t.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},r={};var a=function __webpack_require__(a){var i=r[a];if(void 0!==i)return i.exports;var o=r[a]={exports:{}};return t[a].call(o.exports,o,o.exports,__webpack_require__),o.exports}(65590);NMSHDRuntime=a})();
9
9
  //# sourceMappingURL=nmshd.runtime.min.js.map