eservices-core 1.3.93 → 1.3.94
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,11 +1,11 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('*{--extra-fast:.1s;--fast:.2s;--medium:.3s;box-sizing:border-box;--primary: #3949ab }html,body,#app{height:100%}body{margin:0}ul{text-align:left}.flex{display:flex}.flex_column{display:flex;flex-direction:column}.flex_center{display:flex;align-items:center;justify-content:center}.flex_full,.flex_grow{flex-grow:1}.flex-align_center{align-items:center}.grid{display:grid}.grid-center{display:grid;place-content:center}.link{text-decoration:var(--link-decoration);color:var(--link-color)}.link_hover-underline:hover,.link_hover_underline:hover{text-decoration:underline}.link_full{position:absolute;height:100%;width:100%;left:0;top:0}.text_sm{font-weight:400;font-size:12px;line-height:16px}.text_md{font-size:14px;line-height:20px}.text_lg{font-size:16px;line-height:24px}.text_size_xxl{font-size:18px;line-height:25px}.text_bold{font-weight:600}.text_nowrap{white-space:nowrap}.text_right{text-align:right}.text_center{text-align:center}.text_size_sm{font-size:12px;line-height:130%}.text_size_md{font-size:14px;line-height:140%}.text_error{color:red}.text_overflow{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.title_sm{font-weight:600;font-size:16px;line-height:24px}.title_md{font-weight:600;font-size:24px;line-height:32px}.title_lg{font-weight:700;font-size:32px;line-height:48px}.title_xxl,.title_xl{font-weight:700;font-size:48px;line-height:64px}.cursor_pointer{cursor:pointer}.cursor_default{cursor:default}button{outline:none;-webkit-user-select:none;user-select:none;transition:background-color .2s}.button{display:flex;align-items:center;justify-content:center;outline:none}.button_main{background-color:var(--button-background);color:var(--button-color)}.button_main:focus{background-color:var(--button-background-active)}.button_main:active{background-color:var(--button-background-active)}.button_white{background-color:var(--white);color:var(--main)}.button_sm{height:30px;width:130px}.button_shadow{box-shadow:0 2px 4px #00000040}.button_lg{font-weight:600;font-size:16px;line-height:24px;padding:12px 0;height:50px;width:200px}.button_disabled{background-color:var(--gray-1)}.button_resolve{background-color:var(--main);color:var(--white);border-radius:2px}.button_reject{border:1px solid var(--color-dark);border-radius:2px}.button_md{height:30px;padding:0 10px;min-width:80px}.button_disabled{background-color:var(--button-disabled-background-color);cursor:pointer!important}.color_main,.color__text_main{color:var(--main)}.color__text_black{color:var(--black-1)}.color__text_gray{color:var(--text-gray)}.color__text_red,.color_red{color:var(--red)}.color__text_white{color:var(--white)}.background_orange{background-color:var(--orange)}.background_red{background-color:var(--red)}.color_dark{color:var(--dark)}.color_light{color:var(--light)}.move-vertical-enter-active,.move-vertical-leave-active{transition:transform .5s ease}.move-vertical-enter-from,.move-vertical-leave-to{transform:translateY(-10px)}.move-horizontal-enter-active,.move-horizontal-leave-active{transition:transform .5s}.move-horizontal-enter-from,.move-horizontal-leave-to{transform:translate(-40px)}.modal-vertical-enter-active,.modal-vertical-leave-active,.modal-default{transition:transform var(--medium)}.modal-vertical-enter-active .modal-default,.modal-vertical-leave-active .modal-default{transform:translateY(-100px)}.move-vertical-fast-enter-active,.move-vertical-fast-leave-active{transition:transform var(--fast) ease}.move-vertical-fast-enter-from,.move-vertical-fast-leave-to{transform:translateY(-20px)}.slide-up-enter-active,.slide-up-leave-active{transition:transform var(--fast) ease,opacity var(--fast)}.slide-up-enter-from,.slide-up-leave-to{transform:translateY(20px);opacity:0}.opacity-enter-active,.opacity-leave-active{transition:opacity var(--fast) ease}.opacity-enter-from,.opacity-leave-to{opacity:0}.list-move,.list-enter-active,.list-leave-active{transition:all .5s ease}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}.list-leave-active{position:absolute}.modal-default{background-color:var(--white);position:relative;z-index:1;width:auto;background:var(--white);border-radius:var(--border-radius)}.modal-default__head{background-color:var(--black-1);text-align:center;padding:5px 0;border-radius:6px 6px 0 0}.modal-default__body{gap:20px;padding:0 15px}.modal-default__foot{padding:30px 0;display:flex;justify-content:center}.hint-tooltip{display:block;z-index:222;margin:auto;pointer-events:none;box-shadow:0 0 0 9999px #00000080}.tooltip-help-circle-in,.tooltip-help-circle-out{border-radius:50%}.tooltip-help-undefined{border-radius:50px}.tooltip-card{position:fixed;z-index:315;display:flex;flex-direction:column;width:480px;height:fit-content;margin:auto;border-radius:10px;background-color:var(--hint-background);cursor:default}.tooltip-card__foot{display:flex;justify-content:space-between;align-items:center;background-color:var(--hint-background-navigation);border-radius:10px;padding:20px}.tooltip-card__foot-current{font-weight:600;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body{position:relative;display:flex;flex-direction:column;gap:8px;padding:20px 20px 10px}.tooltip-card__body-title{font-weight:700;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body-text{font-size:16px;line-height:24px;color:var(--white)}.tooltip-card__foot-button_back{background-color:var(--main-1)}.tooltip-card__foot-button_next{background-color:var(--hint)}.tooltip-card__body-close{position:absolute;right:22px;top:12px;width:20px;height:16px;opacity:.3;cursor:pointer}.tooltip-card__body-close:hover{opacity:1}.tooltip-card__body-close:before,.tooltip-card__body-close:after{position:absolute;left:15px;content:" ";height:21px;width:2px;background-color:#fff}.tooltip-card__body-close:before{transform:rotate(45deg)}.tooltip-card__body-close:after{transform:rotate(-45deg)}.tooltip-card-container-wrap{pointer-events:none;position:absolute;left:0;top:0;z-index:123132;height:100%;width:100%}.tooltip-card-container-wrap>div{height:100%;width:100%;display:flex;justify-content:center;align-items:center}.tester-box-tooltip{pointer-events:all}.position_relative{position:relative}.position_absolute{position:absolute}.gap_5{gap:5px}.gap_10{gap:10px}.gap_15{gap:15px}.gap_20{gap:20px}.margin-0,.margin_0{margin:0}.widget-input{background-color:var(--input-background);border:var(--input-border);border-radius:var(--input-border-radius);color:var(--input-color)}.widget-input:disabled{background-color:var(--input-background-disabled);border:var(--input-border-disabled)}.widget-input[error=true]{border:var(--input-border-error)}.widget-input::placeholder{color:var(--input-placeholder-color)}.widget-input:disabled::placeholder{color:var(--input-placeholder-color-disabled)}.input_error{border:1px solid red!important}.input_size_md{height:var(--input-height)}.input-title{font-size:12px;line-height:16px;color:#667085;margin:4px 0}.widget-table{border-collapse:collapse}.widget-table_mini p{margin:0}.list-cell-link>a{position:absolute;left:0;top:0;z-index:1;height:100%;width:100%;cursor:pointer}.list-cell-link>p{font-weight:500}.widget-table__cell{padding:0 20px;font-weight:400;font-size:14px;line-height:19px;color:#4f4f4f}.widget-table-cell_use{cursor:pointer}.widget-table-cell_select{width:min-content}.table-cell-toggle{--border-color: black;position:relative;display:grid;place-content:center;border:1px solid var(--border-color);height:15px;aspect-ratio:1 / 1;border-radius:50%}.table-cell-toggle_active:after{content:"";border-radius:50%;background-color:var(--border-color);height:9px;aspect-ratio:1/1}.widget-table-cell_number{text-align:right}.overflow_auto{overflow:auto}.overflow_hidden{overflow:hidden}.padding_5{padding:5px}.padding_10{padding:10px}.padding_0{padding:0}.padding_15{padding:15px}.padding_20{padding:20px}.es-list-container{overflow:auto}.radius_5{border-radius:5px}.radius_10{border-radius:10px}.radius_15{border-radius:15px}.radius_20{border-radius:20px}.widget-table__head-cell[data-v-25198f4a]{padding:18px;text-align:start}.widget-table__head-label[data-v-25198f4a]{font-weight:600;font-size:14px;line-height:19px}[dir=rtl] .icon[data-v-e287c8d9]{transform:scaleX(-1)}.widget-spinner[data-v-0ef9ae88],.widget-spinner[data-v-0ef9ae88]:after{border-radius:50%;width:14px;height:14px}.widget-spinner[data-v-0ef9ae88]{font-size:2px;position:relative;text-indent:-9999em;border-top:1.1em solid rgba(255,255,255,.2);border-right:1.1em solid rgba(255,255,255,.2);border-bottom:1.1em solid rgba(255,255,255,.2);border-left:1.1em solid #ffffff;transform:translateZ(0);animation:spinnerAnimation-0ef9ae88 1.1s infinite linear}@keyframes spinnerAnimation-0ef9ae88{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.widget-button[data-v-450dc564]{position:relative}.widget-button-spinner[data-v-450dc564]{position:absolute;top:0;bottom:0;left:5px;margin:auto}.widget-multi-button-wrap[data-v-a8d711d1]{--button-size: 40px;max-height:var(--button-size);z-index:1;width:fit-content}.widget-multi-button[data-v-a8d711d1]{grid-template-columns:1fr var(--button-size);background-color:var(--primary);grid-template-rows:var(--button-size);transition:var(--fast)}.widget-multi-button_active[data-v-a8d711d1]{grid-template-rows:calc(var(--button-size) * var(--7025434e))}.widget-multi-button-body[data-v-a8d711d1]{min-width:80px}.widget-multi-button-body-label[data-v-a8d711d1]{padding:10px 10px 10px 20px;color:#fff;transition:background-color var(--fast)}.widget-multi-button-body-label[data-v-a8d711d1]:hover{background-color:#223296}.widget-multi-button-side[data-v-a8d711d1]{height:var(--button-size);transition:transform var(--fast),background-color var(--fast);color:#fff}.widget-multi-button-side_active[data-v-a8d711d1]{transform:rotate(180deg)}.widget-multi-button-side[data-v-a8d711d1]:hover{background-color:#223296}tr[data-v-344a8cc1]{border:1px solid #F3F4FC;height:30px}th[data-v-344a8cc1],td[data-v-344a8cc1]{position:relative;padding:0 11px}th[data-v-344a8cc1]{text-align:left}p[data-v-344a8cc1]{margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.widget-list-head-cell[data-v-bf495d6a]{padding:0 0 0 10px;display:flex}.widget-list-head-cell[data-v-bf495d6a]:hover{box-shadow:0 -1px #e7f2ff}.list-head-cell-label[data-v-bf495d6a]{padding:5px 0;white-space:nowrap;cursor:pointer}.head-cell-order[data-v-bf495d6a]{position:absolute;inset-inline-end:22px;inset-block:0 0;margin:auto;font-size:14px;height:14px}.head-cell-order_down[data-v-bf495d6a]{transform:rotate(180deg)}.head-cell-resize[data-v-bf495d6a]{padding:3px 10px;cursor:col-resize;transition:background-color .1s}.head-cell-resize[data-v-bf495d6a]:hover{background-color:#f5f5f5}.head-cell-resize[data-v-bf495d6a]:after{content:"";margin:auto;width:1px;height:100%;display:block;background-color:#d2d2d2}.widget-list-head[data-v-ccffc6bd]{position:sticky;top:-1px;z-index:1}.test-block[data-v-ccffc6bd]{position:absolute;z-index:2;display:none;height:calc(100% + 1px);place-content:center;inset-block-start:-1px;padding-inline:10px;background-color:#e7f2ff;-webkit-user-select:none;user-select:none;white-space:nowrap}.widget-list-head th[data-v-ccffc6bd]{position:sticky;top:0;z-index:2;-webkit-user-select:none;user-select:none}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
2
|
"use strict";/*!
|
|
3
|
-
* eservices-core v1.3.
|
|
3
|
+
* eservices-core v1.3.94
|
|
4
4
|
* (c) 2024 ESERVICES
|
|
5
|
-
*/Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),B=require("jenesius-vue-form"),ze=require("vue-router"),Te=require("debug"),
|
|
6
|
-
Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(e,n){return!e&&!n?v.ApiNotAvailable():new v(e||"Authorization Error",n)}static ApiResponseParseFailed(){return v.ApiNotAvailable()}static MissingIdInValuesEntity(e){return new v("Object doesn't have id",e)}static ObjectWithIdNotFound(e,n){return new v(`Can't find object with id: ${e}`,n)}static ObjectWithoutConnectToPresentArray(e,n){return new v("Object is not found.",{object:e,array:n})}static EntityWithoutId(e){return new v("Entity doesn't have id.",e)}static NotFoundedTableIndex(e,n){return new v(`Can't find the element with tableIndex ${e}`,n)}static UndefinedError(e,n=[]){return new v(e,n)}static TableArrayAlreadyIncludeProvidedIndexValue(e,n,r){return new v(`Array already includes the element with value ${e}`,{array:n,table:r})}static MetadataEntityIsNotAvailable(e){return new v(`Metadata for the ${e} is not currently available.`)}static RequestTookToLong(){return new v("The request took too long to complete. Try again later.")}};
|
|
5
|
+
*/Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),B=require("jenesius-vue-form"),ze=require("vue-router"),Te=require("debug"),gt=require("date-and-time"),de=require("jenesius-vue-modal");function Se(t,e){if(typeof t!="object"||t===null)return;if(e in t)return t[e];let n=e.indexOf(".");if(n>-1){const r=e.substring(0,n);return r in t?Se(t[r],e.substr(n+1)):void 0}return t[e]}function Je(t,e){if(!t)return console.warn("Element is not provided.");function n(o,s){return o==s.target||o.contains(s.target)}const r=o=>{n(t,o)||(e(),window.removeEventListener("click",r))};window.addEventListener("click",r)}function Ye(t){return t.reduce((e,n)=>e.then(r=>n==null?void 0:n(r)),Promise.resolve())}const Ke=class v extends Error{constructor(e,n=null){super(),this.message=e,this.details=n,this.id=v.ID++}static ParentFormNotFound(){return new v("Can't found parent form.")}static UndefinedNameOfCompositeFormController(e){return new v("Composite object name is undefined",e)}static EntityWithoutName(e){return new v("'Entity doesn't have a name",e)}static NotResolvedNameEventEmitter(e){return new v(`'${e}' is not a valid Event emitter name`)}static FormIsNotValidated(e){return new v("Form is not validated",e)}static ListWorkerIsRunningOrEnd(e){return new v("List data request is running or already done",e)}static ObjectIdNotNumber(e){return new v(`${e} (id) is not a number`)}static UndefinedErrorId(e,n){return v.ApiNotAvailable()}static ApiError(e){return new v("Request error",e)}static ApiNotAvailable(){return new v(`Sorry, we experience difficulties here.
|
|
6
|
+
Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(e,n){return!e&&!n?v.ApiNotAvailable():new v(e||"Authorization Error",n)}static ApiResponseParseFailed(){return v.ApiNotAvailable()}static MissingIdInValuesEntity(e){return new v("Object doesn't have id",e)}static ObjectWithIdNotFound(e,n){return new v(`Can't find object with id: ${e}`,n)}static ObjectWithoutConnectToPresentArray(e,n){return new v("Object is not found.",{object:e,array:n})}static EntityWithoutId(e){return new v("Entity doesn't have id.",e)}static NotFoundedTableIndex(e,n){return new v(`Can't find the element with tableIndex ${e}`,n)}static UndefinedError(e,n=[]){return new v(e,n)}static TableArrayAlreadyIncludeProvidedIndexValue(e,n,r){return new v(`Array already includes the element with value ${e}`,{array:n,table:r})}static MetadataEntityIsNotAvailable(e){return new v(`Metadata for the ${e} is not currently available.`)}static RequestTookToLong(){return new v("The request took too long to complete. Try again later.")}};Ke.ID=0;let q=Ke;const mt="Please try again later or submit a feedback if problem doesn't go.";class He{static getClientData(){return m("/close-api/client-content")}static getNavigation(){return m("/close-api/client/navigation")}}const yt=new class{constructor(){this.store=i.reactive([])}add(e,n,{children:r,timeout:o=10,click:s=()=>{}}={}){const u=new Et(e,n,o,r||[],s);return this.store.push(u),o&&setTimeout(this.remove.bind(this,u.id),o*1e3),u}remove(e){const n=this.store.findIndex(r=>r.id===e);if(n===-1)return!1;this.store.splice(n,1)}removeChild(e,n){throw new Error("Removing children error.")}},Xe=class Qe{constructor(e,n,r,o,s){this.type=e,this.msg=n,this.timeout=r,this.children=o,this.click=s,this.id=Qe.cardId++}};Xe.cardId=1;let Et=Xe;/*!
|
|
7
7
|
* jenesius-event-emitter v1.0.2
|
|
8
8
|
* (c) 2022 Jenesius
|
|
9
9
|
* @license MIT
|
|
10
|
-
*/const De=function(t,e){return t in this.events||(this.events[t]=[]),this.events[t].push(e),this.off.bind(this,t,e)},xe=function(t,e){t in this.events&&this.events[t].forEach(n=>n(e))},Be=function(t,e){const n=this.events[t];if(!n)return;const r=n.indexOf(e);r!==-1&&n.splice(r,1)},Me=function(){this.events={}};class M{constructor(){this.events={}}on(e,n){return De.call(this,e,n)}emit(e,n){return xe.call(this,e,n)}off(e,n){return Be.call(this,e,n)}cleanEvents(){Me.call(this)}static on(e,n){return De.call(M,e,n)}static emit(e,n){return xe.call(M,e,n)}static off(e,n){return Be.call(M,e,n)}static cleanEvents(){Me.call(M)}}M.events={};var et=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},ie=(t,e,n)=>(et(t,e,"read from private field"),n?n.call(t):e.get(t)),we=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},_e=(t,e,n,r)=>(et(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Q,se,ae;const W=class O extends M{constructor(){super(...arguments),we(this,Q,void 0),we(this,se,"front"),this.organizations=[],we(this,ae,!1)}set language(e){localStorage.setItem(O.LOCALSTORAGE_LANGUAGE_KEY,e)}get language(){return localStorage.getItem(O.LOCALSTORAGE_LANGUAGE_KEY)||O.DEFAULT_LANGUAGE}checkLanguageInStorage(){return!!localStorage.getItem(O.LOCALSTORAGE_LANGUAGE_KEY)}get contextType(){var e;if(this.contextId)return((e=this.person)==null?void 0:e.id)===this.contextId?"person":"organization"}set router(e){_e(this,Q,e)}get router(){if(!ie(this,Q))throw new Error("Router was not founded. Please set router: Manager.router = router: VueRouter");return ie(this,Q)}set type(e){_e(this,se,e)}get type(){return ie(this,se)}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(e){_e(this,ae,e),this.emit(O.EVENT_READY_UPDATE,e)}get ready(){return ie(this,ae)}onReady(e){return this.on(O.EVENT_READY_UPDATE,e)}onupdateContext(e){return this.on(O.EVENT_CONTEXT_UPDATE,e)}onupdateData(e){return this.on(O.EVENT_DATA_UPDATE,e)}setCurrentContext(e){if(this.contextId===e)return console.log("[application-manager] The current context has already been installed.");this.contextId=Number(e),localStorage.setItem(O.CURRENT_CONTEXT_KEY,String(e)),this.emit(O.EVENT_CONTEXT_UPDATE,e),console.log(`Current context id %c${e}`,"color: purple")}get context(){var e;return this.contextId?this.contextId===((e=this.person)==null?void 0:e.id)?this.person:this.organizations.find(n=>n.id===this.contextId)||null:null}async init(){try{const e=await this.loadCustomerData();this.person=e,this.organizations=e.organizations,this.user=e.user,this.ready=!0;const n=Number.parseInt(localStorage.getItem(O.CURRENT_CONTEXT_KEY)||"");!Number.isNaN(n)&&this.validateContextId(Number(n))?this.setCurrentContext(n):this.setCurrentContext(Number(e.id))}catch{Ct.add("error",q.ApiNotAvailable().message)}}loadCustomerData(){return Xe.getClientData()}async updateFullClientData(){return this.init()}validateContextId(e){var n;return((n=this.person)==null?void 0:n.id)==e?!0:!!this.organizations.find(r=>r.id===e)}getListKeyById(e){return console.log("DEPRECATED"),`list-information-${e}`}getListInformationFromLocalStorage(e){console.log("DEPRECATED");const n=localStorage.getItem(this.getListKeyById(e));return n&&JSON.parse(n)}setListInformationToLocalStorage(e,n){console.log("DEPRECATED"),localStorage.setItem(this.getListKeyById(e),JSON.stringify(n))}};Q=new WeakMap;se=new WeakMap;ae=new WeakMap;W.DEFAULT_LANGUAGE="en";W.LOCALSTORAGE_LANGUAGE_KEY="CurrentLanguage";W.EVENT_CONTEXT_UPDATE="event:context-update";W.EVENT_READY_UPDATE="event:ready-update";W.EVENT_DATA_UPDATE="event:data-update";W.CURRENT_CONTEXT_KEY="CurrentContext";let St=W;const Ve=new St;function At(t){return t.text().then(e=>{try{return JSON.parse(e)}catch{return _t}})}function m(t,e={}){return Ve.isFront&&(e.headers||(e.headers={}),e.headers["Context-Id"]=Ve.contextId),e.redirect="manual",fetch(t,e).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw q.ApiNotAvailable()}).then(n=>At(n).then(r=>{if(!n.ok)throw r;return r}))}class ge{constructor(){}static parseNamesFromListConfig(e){let n=ge.parseFieldsToGraphQL(e.reduce((o,s)=>(s.name&&o.push(s.name),o),[]));function r(o){let s="";for(let u in o)typeof o[u]=="boolean"?s+=` ${u} `:s+=` ${u} { ${r(o[u])} }`;return s}return r(n)}static parseSortFromListConfig(e){let n={};for(let r in e)n[r]=e[r]?"ASC":"DESC";return n}static parseFieldsToGraphQL(e){function n(r,o){if(o.includes(".")){const s=o.indexOf("."),u=o.substring(s+1),c=o.substring(0,s);c in r||(r[c]={}),n(r[c],u)}else r[o]=!0;return r}return e.reduce(n,{})}}class bt{constructor(){this.public=!1,this.errors=new Proxy([],{set:(e,n,r)=>(n!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(r)}`),e[n]=r,!0)}),window._journal=this}get error(){return{add:(...e)=>{this.errors.push(e)},clean:()=>{this.errors.splice(0,this.errors.length)},console:()=>{console.log(this.errors)}}}welcome(){console.log("The journal has been initialized. To get access check %c_journal in console.","background: blue; color: white")}}const kt=new bt;function tt(t){return t&&t[0].toLowerCase()+t.slice(1)}function Ae(t){return Object.keys(t).reduce((e,n)=>{let r=t[n];const o=n.charAt(0).toUpperCase()+n.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=Ae(r)),e[o]=r,e},{})}function Nt(t,e=2){if(!(typeof t=="string"||typeof t=="number"))return"";let r=String(t).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(e,"0"),r[1].length>e&&(r[1]=r[1].substring(0,e)),r.join(".")}const Ot={Request:m,clickOutside:Ye,getPropFromObject:Se,runPromiseQueue:Ke,GraphQL:ge,firstChapterToLowerCase:tt,valuesToUpperCase:Ae,prettyMoney:Nt},It=Object.freeze(Object.defineProperty({__proto__:null,GraphQL:ge,Journal:kt,Request:m,clickOutside:Ye,default:Ot,firstChapterToLowerCase:tt,getPropFromObject:Se,runPromiseQueue:Ke,valuesToUpperCase:Ae},Symbol.toStringTag,{value:"Module"})),Rt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class Lt{static getDictionary(e){if(!e)throw new Error(`Can't get dictionary for ${e}.`);return m(`/open-api/internationalization/language/${e}`)}}let j={};function Y(t,...e){if(typeof t!="string")return console.trace(`Label is not provided for translation: ${t}`),"undefined";let n=B.utils.getPropFromObject((this==null?void 0:this.vocabulary)||j,t);if(typeof n=="string")return Fe(n,e);const r=B.utils.getPropFromObject(j==null?void 0:j.root,t);return typeof r=="string"?Fe(r,e):(typeof n===void 0&&console.warn(`Translation for label "${t}" is not founded.`),t)}function Fe(t,e){return e.forEach((n,r)=>{t=t.replaceAll(new RegExp(`\\{${r}}`,"g"),n)}),t}Y.setGlobalVocabulary=function(t){j=t};Y.getScope=function(t){const e=typeof t=="string"?t:"root";return typeof t!="string"&&console.warn(`SCOPE ${t} for translate is not string.`),Y.bind({vocabulary:B.utils.getPropFromObject(j,e.toLowerCase())})};Y.setVocabulary=function(t){return typeof t=="string"&&(t=B.utils.getPropFromObject(j,t)),Y.bind({vocabulary:t})};function $t(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="string"&&typeof t[1]=="number"}const Pt="masterId",Dt="masterEntity";function Ue(t,e){if(!Array.isArray(e))return;if($t(e))return n(e);e.forEach(n);function n(r){t.append(Dt,r[0]),t.append(Pt,r[1].toString())}}class ee{static async anonymousGetList(e){return await m(`/open-api/data/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getSearchParamsForEntityListRead(e){const n=(o,s)=>r.append(o,s),r=new URLSearchParams;if(e.fields){const o=e.fields;typeof o=="string"?n("fields",o):Array.isArray(o)?n("fields",o.join(" ")):typeof o=="object"&&n("fields",Object.keys(o).join(" "))}if(e.order){let o=e.order;const u=(Array.isArray(o)?[o]:Object.entries(o)).map(([c,l="desc"])=>`@${c} ${l}`).join(",");n("order",u)}return e.limit&&n("limit",e.limit.toString()),e.offset&&n("offset",e.offset.toString()),e.filter&&n("filter",e.filter.toString()),e.useUsageContext&&r.append("useUsageContext",e.useUsageContext.toString()),r}static async getList(e,n){const r=ee.getSearchParamsForEntityListRead(n||{});return await m(`/close-api/data/${e}?${r.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getCount(e,n){const r=ee.getSearchParamsForEntityListRead(n||{});return m(`/close-api/data/entities/${e}/count?${r.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static create(e,n,r){const o=new URLSearchParams;return Ue(o,r==null?void 0:r.masterEntities),m(`/close-api/data/${e}?${o.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:n})})}static update(e,n,r,o={}){return m(`/close-api/data/entities/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:r})})}static readById(e,n,r={}){const o=new URLSearchParams;if(r.fields){let s=r.fields;typeof s=="string"&&(s=[s]),o.append("fields",s.join(" "))}return m(`/close-api/data/entities/${e}/id/${n}?${o.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static updateById(e,n,r,o){const s=new URLSearchParams;return Ue(s,o==null?void 0:o.masterEntities),m(`/close-api/data/entities/${e}/id/${n}?${s.toString()}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:r,version:o==null?void 0:o.version})})}static removeById(e,n,r){const o=typeof n=="number"?{Id:n}:n;return ee.removeByKeys(e,o,r)}static removeByKeys(e,n,r){return m(`/close-api/data/entities/${e}`,{method:"delete",headers:{"Content-Type":"application/json"},body:JSON.stringify({keys:n,version:r})})}}const nt=class Z{static async create(e){return m(Z.url,{method:"post",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}static async read(e){const n=new URLSearchParams({targetCode:String(e.targetCode),entityName:e.entity.name,entityCatalogId:e.entity.catalogId});return m(Z.url+"?"+n.toString(),{method:"get"})}static async readMessages(e){return m(`${Z.url}/${e}/messages`,{method:"get"})}static async createMessage(e){return m(`${Z.url}/${e.talkId}/messages`,{method:"post",body:JSON.stringify({text:e.text}),headers:{"Content-Type":"application/json"}})}};nt.url="/close-api/communications";let xt=nt;function je(t){return{...t,createdEntities:t.createdEntites}}const rt=class ce{static async getStartConfig(e,n){return m([ce.url,e,n].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(e,n){return m([ce.url,e,n].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(je)}static async runStep(e,n,r,o,s){return m([ce.url,e,n].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:r,token:o,values:s})}).then(je)}};rt.url="/close-api/views/process-wizard";let le=rt;class Bt{static async upload(e,n){const r=new FormData;r.append("file",e);const o=`/close-api/files?entityName=${n}`;return await fetch(o,{method:"POST",body:r}).then(s=>s.json()).then(s=>(s.filename=e.name,s))}}class Mt{static invite(e,n,r){return m("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:e,personKey:n,relatedRoleCode:r})})}static accept(e,n){return m("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e,version:n,mark:!0})})}static decline(e,n){return m("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e,version:n,mark:!1})})}}class be{static get url(){return"/close-api/rules-validation/"}static validate(e,n){return m(be.url+e,{method:"POST",body:JSON.stringify(n)})}}class Vt{static getConfiguration(){return m("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}}function Ft(t,e="images"){return`/static-folder/${e}/${t}`}class Ut{static getRequiredDocuments(e,n,r){const o=new URLSearchParams({entity:e,primaryKey:n,statusCode:r});return fetch(`/close-api/views/required-documents?${o.toString()}`).then(s=>s.json())}}class J{static url(){return"close-api/billing"}static getBillingMetadata(e){return fetch(`/${J.url()}/calculator/${e}`)}static calculate(e,n){return m(`/${J.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:e,values:n})}).then(r=>{if(r&&r.status===1)return r;throw Array.isArray(r.notes)?new Error(r.notes[0]):q.ApiNotAvailable()})}static parseMetadataField(e){function n(r){switch(r.type){case"ValueType":switch(r.dataType){case"Integer":return"number";default:return r.dataType}case"EntityReference":return r.dataType}}return{name:e.name,label:e.title,required:e.required,type:n(e)}}static createOnlinePayment(e,n){return m(`/${J.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:e,returnURL:n})})}static applyOnlinePayment(e){return m(`/${J.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:e})})}}function jt(t){return t.statusName==="Completed"}function qt(t){return t.statusName==="FinalStepWithConfirmation"}function Wt(t){return t.statusName==="ValidationError"}function Gt(t,e,n){let r=null;const o=i.reactive({wait:null});let s=[],u=null;const c=i.ref(null);function l(){c.value=s.find(a=>a.name===u)||null}function d(){var a;return u?((a=s.find(p=>p.name===u))==null?void 0:a.fields)||[]:[]}function f(a){if(l(),Wt(a))return void n.onValidation(a.validationResults);if((a.statusName==="FinalStep"||a.statusName==="NextStep")&&(!d().length||zt(d(),n.presets)))return h(n.presets||{});jt(a)&&n.onCompleted(a),qt(a)&&n.onConfirmation(a)}async function C(){try{await A(),await E()}catch(a){const{message:p}=fe(a);ne.add("error",p)}}function A(){return o.wait="Loading process information.",le.getStartConfig(e,t).then(a=>{s=a.steps.map(p=>({label:p.title,name:p.stepName,number:p.number,fields:p.frontendEntity.objectTypes.reduce((g,b)=>(b.properties.forEach(k=>{g.push({name:k.name,label:k.title,type:k.refEntityName||k.dataType})}),g),[])}))}).then(a=>(o.wait=!1,a))}function w(a){return u=a.nextStepName,r=a.token,a}function y(a){const p=fe(a);ne.add("error",p.message)}function E(){return o.wait="Starting process",le.startProcess(e,t).then(w).then(f).catch(y).finally(()=>{o.wait=null})}function h(a={}){return!r||!u?Promise.reject("Not step or token."):(o.wait="Waiting for result...",le.runStep(e,t,u,r,a).then(w).then(f).catch(y).finally(()=>{o.wait=!1}))}return{initialize:C,state:o,currentStepConfig:i.readonly(c),next:h}}function zt(t,e){for(let n=0;n<t.length;n++){const r=t[n];if(!B.utils.getPropFromObject(e,r.name))return!1}return!0}const Jt="close-api/proxy/Equipment/Search";class Yt{static search(e,n,r,o,s){const u=new URLSearchParams;u.append("pattern",e||""),n&&u.append("categoryId",n),r&&u.append("useType",String(r)),o&&u.append("statusCode",o),s&&(u.append("limit",String(s.limit)),u.append("offset",String(s.offset)));const c=`/${Jt}?${u.toString()}`;return m(c,{method:"GET",headers:{"Content-Type":"application/json"}})}}const Kt={class:"widget-table__head"},Ht={class:"widget-table__head-label margin_0 text_overflow"},Xt=i.defineComponent({__name:"widget-table-head",props:{config:{}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("tr",Kt,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.config,(r,o)=>(i.openBlock(),i.createElementBlock("th",{class:"widget-table__head-cell",key:o},[i.createElementVNode("p",Ht,i.toDisplayString(r.label),1)]))),128))]))}});const V=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},Qt=V(Xt,[["__scopeId","data-v-25198f4a"]]);function ot(t){return typeof t.name=="string"?t.name:Array.isArray(t.name)?t.name[0]:null}function ke(t,e){const n=ot(t);let r=n?B.utils.getPropFromObject(e,n):null;return r===void 0&&(r=null),t.value?t.value(r,e):t.value===null?null:r}function Ne(t){return["eservices-core",t].join(":")}function it(t){return Oe(t,"YYYY/MM/DD HH:mm:ss")}function Oe(t,e="YYYY/MM/DD"){if(!t)return"";try{const n=new Date(t);return mt.format(n,e)}catch(n){return console.log(n),"Invalid date"}}const Zt={props:{name:String},setup(t,e){let n="unknown";try{n=e.slots.default()[0].children}catch{n=t.name}typeof n!="string"&&console.warn(`Name for Icon.vue is not string. ${n}`);try{n=n.replace(/\s+/g,"")}catch{}return()=>i.h("i",{class:`icon icon-${n}`})}},te=V(Zt,[["__scopeId","data-v-e287c8d9"]]);function st(t){return e=>typeof e=="string"||typeof e=="number"?`${e} ${t}`:""}const en=Te(Ne("setup-list-row"));function tn(t,e){const n=t.config.map(r=>nn(r,t,e));return i.h("tr",{class:"widget-table__row widget-table-row"},n)}function nn(t,e,n){const r=e.values;let o=ke(t,r);const s={onClick:[],class:["widget-table__cell widget-table-cell"]};function u(f){s.onClick.push(()=>f(r))}function c(f){Array.isArray(f)?s.class.push(...f):s.class.push(f)}const l=[],d=[];if(t.unitValue&&(o=st(t.unitValue)(o)),t.hide&&t.hide(r))return[i.h("td")];if(t.type)switch(c(`widget-table-cell_${t.type}`),t.type){case"number":{typeof o=="number"&&(o=new Intl.NumberFormat().format(o));break}case"date":{o=Oe(typeof o=="string"?o:null);break}case"dateTime":case"dateWithTime":{o=it(typeof o=="string"?o:null);break}case"money":{o=ct(o);break}case"multi-select":{d.push(i.h(B.FormField,{type:"single-checkbox",modelValue:e.selected})),u(qe.bind(null,n,!0));break}case"select":{d.push(i.h(B.FormField,{type:"single-radio",modelValue:e.selected})),u(qe.bind(null,n,!1));break}}if(t.onClick&&u(t.onClick),t.link)try{const f=t.link(r);if(f){const C=i.h(ze.RouterLink,{to:f});d.push(C),c("widget-table-cell_link")}}catch(f){en("Can't add router link",f)}if(t.href&&(d.push(i.h("a",{href:t.href(r),target:"_blank"})),c("widget-table-cell_link")),typeof o=="boolean"&&(o=o?"✓":"—"),(typeof o=="string"||typeof o=="number")&&d.push(i.h("p",{class:"widget-list-cell-text"},o)),t.icon&&(typeof t.icon=="string"&&d.push(i.h(te,{name:t.icon})),typeof t.icon=="function")){const f=t.icon(r);f!==null&&d.push(i.h(te,{name:f}))}return t.class&&(typeof t.class=="function"?c(t.class(r)):c(t.class)),l.push(i.h("td",s,d)),l}function qe(t,e){t.emit("select",e)}function at(t,e){return()=>{try{return tn(t,e)}catch(n){return console.warn(n),null}}}const rn={props:{values:Object,config:Object,selected:Boolean},setup:at},on=["colspan"],We=i.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(t,{emit:e}){const n=i.ref();return i.onMounted(()=>{setTimeout(()=>{n.value&&n.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(r,o)=>(i.openBlock(),i.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:n},[i.createElementVNode("td",{colspan:r.rowLength},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.component),i.mergeProps(r.$attrs,{values:r.values,new:r.isNew,onClose:o[0]||(o[0]=s=>e("close")),onSave:o[1]||(o[1]=s=>e("save",s))}),null,16,["values","new"]))],8,on)],512))}}),_={LIST_ACTIVE_NEW:"list-active-new",DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go.",LOCALSTORAGE_CURRENT_CONTEXT_KEY:"CurrentContext",LOCALSTORAGE_LANGUAGE_KEY:"CurrentLanguage",DELAY_SOCKET_RECONNECT:1e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",TIME_TO_LIVE_SOCKET_REQUEST:3e4};function sn(t,e){return i.computed(()=>t.filter(n=>n.name?!!e.find(o=>![null,""].includes(ke(n,o))):!0))}const an={class:"widget-table"},Ge="update:selectedRows",cn=i.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{}},emits:["update:activeRow","save"],setup(t,{emit:e}){const n=t,r=i.useSlots(),o=i.computed(()=>{var l;return(l=r==null?void 0:r.default)==null?void 0:l.call(r)[0]});function s(l,d=!0){if(!n.selectedRows)return;if(!d)return e(Ge,n.selectedRows.includes(l)?[]:[l]);const f=[...n.selectedRows],C=f.indexOf(l);return C===-1?f.push(l):f.splice(C,1),e(Ge,f)}function u(l){e("save",l),e("update:activeRow",null)}const c=sn(n.config,n.array);return(l,d)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("table",an,[i.createVNode(Qt,{config:i.unref(c)},null,8,["config"]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.array,(f,C)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:C},[i.createVNode(rn,{config:i.unref(c),values:f,selected:l.selectedRows.includes(f),onSelect:A=>s(f,A),class:i.normalizeClass(l.classCallback?l.classCallback(f):"")},null,8,["config","values","selected","onSelect","class"]),o.value&&l.activeRow===f?(i.openBlock(),i.createBlock(We,{key:0,component:o.value,"row-length":l.config.length,values:f,onClose:d[0]||(d[0]=A=>e("update:activeRow",null)),onSave:u,"is-new":!1},null,8,["component","row-length","values"])):i.createCommentVNode("",!0)],64))),128)),l.activeRow===i.unref(_).LIST_ACTIVE_NEW?(i.openBlock(),i.createBlock(We,{key:0,component:o.value,"row-length":i.unref(c).length,onClose:d[1]||(d[1]=f=>e("update:activeRow",null)),onSave:u,"is-new":!0},null,8,["component","row-length"])):i.createCommentVNode("",!0)])])]))}}),ln=i.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"widget-spinner",style:i.normalizeStyle({"border-left":`1.1em solid ${e.color}`})},null,4))}});const me=V(ln,[["__scopeId","data-v-0ef9ae88"]]),un={class:"widget-button"},dn=i.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("button",un,[e.wait?(i.openBlock(),i.createBlock(me,{key:0,class:"widget-button-spinner"})):i.createCommentVNode("",!0),i.renderSlot(e.$slots,"default",{},void 0,!0)]))}});const fn=V(dn,[["__scopeId","data-v-450dc564"]]),pn={class:"widget-multi-button-wrap position_relative cursor_pointer"},hn={class:"widget-multi-button-body grid"},gn=["onClick"],mn={class:"widget-multi-button-side-wrap"},yn=i.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(t){const e=t;i.useCssVars(u=>({"7025434e":r.value}));const n=i.reactive({active:!1,wait:!1}),r=i.computed(()=>e.array.length+(e.label?1:0));function o(u){if(!(typeof u!="function"||n.wait))return n.wait=!0,Promise.resolve().then(u).finally(()=>{n.wait=!1})}function s(u=!n.active){n.active=u}return(u,c)=>(i.openBlock(),i.createElementBlock("div",pn,[i.createElementVNode("div",{class:i.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",n.active?"widget-multi-button_active":null])},[i.createElementVNode("div",hn,[u.label?(i.openBlock(),i.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:c[0]||(c[0]=l=>s())},i.toDisplayString(u.label),1)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.array,(l,d)=>(i.openBlock(),i.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:d,onClick:f=>{o(l.callback),s(!1)}},i.toDisplayString(l.label),9,gn))),128))]),i.createElementVNode("div",mn,[i.createElementVNode("div",{class:i.normalizeClass(["grid-center widget-multi-button-side",n.active?"widget-multi-button-side_active":null]),onClick:c[1]||(c[1]=l=>s())},[n.wait?(i.openBlock(),i.createBlock(i.unref(me),{key:0,class:"widget-multi-button-side-spinner"})):u.array.length>1?(i.openBlock(),i.createBlock(i.unref(te),{key:1,class:"widget-multi-button-side-icon"},{default:i.withCtx(()=>[i.createTextVNode("angle-small-down")]),_:1})):i.createCommentVNode("",!0)],2)])],2)]))}});const En=V(yn,[["__scopeId","data-v-a8d711d1"]]),vn={class:"widget-loader flex flex-align_center gap_10 padding_15"},wn={class:"text_md"},_n=i.defineComponent({__name:"widget-loader",props:{label:{}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",vn,[i.createVNode(me,{color:"var(--primary)",class:"padding_10"}),i.createElementVNode("span",wn,i.toDisplayString(e.label),1)]))}}),Cn=["alt","src"],Tn=i.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(t){const e=t,n=i.ref();return i.onMounted(()=>{n.value&&(n.value.src=e.src),n.value.onerror=function(){e.default&&(n.value.src=e.default)}}),(r,o)=>(i.openBlock(),i.createElementBlock("img",{alt:r.alt,ref_key:"refImage",ref:n,src:r.src||r.$props.default},null,8,Cn))}}),Sn={props:{config:Array,values:Object,selected:Boolean},setup:at};const An=V(Sn,[["__scopeId","data-v-344a8cc1"]]),bn=t=>(i.pushScopeId("data-v-bf495d6a"),t=t(),i.popScopeId(),t),kn={class:"widget-list-head-cell"},Nn=bn(()=>i.createElementVNode("div",{class:"head-cell-resize"},null,-1)),On=i.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(t,{emit:e}){const n=t;return n.title&&console.warn(`For cell ${n.name} using title,it should be replaced with label.`),(r,o)=>(i.openBlock(),i.createElementBlock("th",null,[i.createElementVNode("div",kn,[i.createElementVNode("div",{class:"head-cell-content flex_grow",style:i.normalizeStyle({"min-width":r.minWidth,"max-width":r.maxWidth,width:r.width})},[r.type==="multi-select"?(i.openBlock(),i.createBlock(i.unref(B.FormField),{key:0,type:"single-checkbox",onClick:o[0]||(o[0]=i.withModifiers(s=>e("select"),["stop","prevent"]))})):(i.openBlock(),i.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:o[1]||(o[1]=s=>e("order"))},i.toDisplayString(r.title||r.label),1))],4),r.name&&r.order.length&&r.order[0]===r.name?(i.openBlock(),i.createBlock(i.unref(te),{key:0,class:i.normalizeClass(["head-cell-order",{"head-cell-order_down":r.order.length>1&&r.order[1]==="desc"}])},{default:i.withCtx(()=>[i.createTextVNode("core-arrow-up")]),_:1},8,["class"])):i.createCommentVNode("",!0),Nn])]))}});const In=V(On,[["__scopeId","data-v-bf495d6a"]]),Rn=i.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(t,{emit:e}){const n=t,r=i.ref(),o=i.ref();i.onMounted(()=>{function l(w,y){let E=-1;do E++,y-=w[E];while(y>0&&E<w.length);return E}function d(w,y){let E=0;for(;y>0&&y>w[E]&&E<w.length;)y-=w[E],E++;return console.log(y,E),E>0?E:0}function f(w){try{o.value.style.insetInlineStart=w+"px"}catch(y){console.log(y)}}function C(w){try{o.value.style.width=w+"px",o.value.style.minWidth=w+"px",o.value.style.maxWidth=w+"px"}catch(y){console.log(y)}}function A(w){return w===null?!1:w.classList.contains("head-cell-resize")}r.value.addEventListener("pointerdown",function(y){var Pe;function E(N){return N.screenX+p-k}const h=r.value,a=[...h.children].filter(N=>N.localName==="th"),p=((Pe=h.offsetParent)==null?void 0:Pe.scrollLeft)||0,g=a.map(N=>N.clientWidth),b=A(y.target),k=h.getBoundingClientRect().left,G=E(y),T=l(g,G),F=g.slice(0,T).reduce((N,$)=>N+$,0),K=G-F,Ee=h.offsetWidth,H=a[T].clientWidth;if(n.config[T].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",y.screenX),console.log("Widths",g),console.log("max width",Ee),console.log("Start Position",G),console.log("Position From",T),console.log("Start Position",T),console.log("Global offset (Отступ самой таблицы от края экрана)",k),console.log("Del",K),console.groupEnd(),o.value.innerText=a[T].textContent||"",o.value.style.display="grid",o.value.style.width=H+"px",o.value.style.cursor="grabbing",f(F),C(H),document.addEventListener("pointermove",$e,{passive:!0}),document.addEventListener("pointerup",Le);function Le(N){if(console.group("END"),document.removeEventListener("pointermove",$e),document.removeEventListener("pointerup",Le),b&&(n.config[T].width=o.value.style.width,n.config[T].minWidth=o.value.style.width,n.config[T].maxWidth=o.value.style.width,s(n.config)),!b){const $=N.screenX+p-k;console.log("ENP Position",$);const oe=d(g,$);if(console.log(T,"->",oe),oe!==T){const X=n.config[T],ve=n.config;ve.splice(T,1),ve.splice(oe,0,X),s(ve)}else{const X=n.config[T].name;u(X)}}o.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function $e(N){if(b){const X=E(N)-G+H;C(X);return}let $=N.screenX+p-k-K;$<0&&($=0),$+H>Ee&&($=Ee-H),f($)}})});function s(l){e("update:config",l)}function u(l){if(!l)return;if(Array.isArray(l)){if(l.length<1)return;l=l[0]}if(n.order.length===0||n.order[0]!==l)return void c([l]);const d=n.order.length===1||n.order[1]==="asc"?"asc":"desc";c([l,d==="asc"?"desc":"asc"])}function c(l){e("update:order",l)}return(l,d)=>(i.openBlock(),i.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:r},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.config,(f,C)=>(i.openBlock(),i.createBlock(In,i.mergeProps({key:f},f,{onOrder:A=>u(f.name),onSelect:d[0]||(d[0]=A=>e("select")),order:l.order}),null,16,["onOrder","order"]))),128)),i.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:o},"test",512)],512))}});const Ln=V(Rn,[["__scopeId","data-v-ccffc6bd"]]),$n={class:"widget-list"},Pn={class:"widget-list-body position_relative"},Dn=50,xn=i.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(t,{emit:e}){const n=t;function r(c,l=!0){if(n.selectedRows)if(!l)s(n.selectedRows.includes(c)?[]:[c]);else{const d=[...n.selectedRows],f=d.indexOf(c);f===-1?d.push(c):d==null||d.splice(f,1),s(d)}}function o(){var c;if(((c=n.selectedRows)==null?void 0:c.length)!==n.array.length)return s([...n.array]);s([])}function s(c){e("update:selectedRows",c)}function u(c){if(!c)return;const l=c.target;l.scrollTop+l.clientHeight+Dn>l.scrollHeight&&e("scrollEnd")}return(c,l)=>(i.openBlock(),i.createElementBlock("div",{class:"es-list-container",onScrollPassive:u},[i.createElementVNode("table",$n,[i.createElementVNode("thead",null,[i.createVNode(Ln,{onSelect:l[0]||(l[0]=d=>o()),"onUpdate:order":l[1]||(l[1]=d=>e("update:order",d)),"onUpdate:config":l[2]||(l[2]=d=>e("update:config",d)),config:c.config,order:c.order},null,8,["config","order"])]),i.createElementVNode("tbody",Pn,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c.array,(d,f)=>{var C;return i.openBlock(),i.createBlock(An,{key:f,class:"widget-list-row",values:d,config:c.config,selected:(C=c.selectedRows)==null?void 0:C.includes(d),onSelect:A=>r(d,A)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}}),P={};function Bn(t){for(let e in t)P[e]=t[e];console.log("The config has been initialized. To get access check %c_config in console.","background: purple; color: white")}function Mn(t){function e(...r){return n.wait?Promise.reject("The process has already started."):(n.wait=!0,Promise.resolve().then(()=>t(...r)).finally(()=>{n.wait=!1}))}const n=i.reactive({wait:!1,call:e});return n}function fe(t){return typeof t=="string"?Ce(t):Vn(t)?Ce(t.message):Ce(_.DEFAULT_ERROR_MESSAGE)}function Vn(t){return!!(typeof t=="object"&&t!==null&&Object.hasOwnProperty.call(t,"message"))}function Ce(t){return{message:t}}function R(t="error"){return function(e){const{message:n}=fe(e);ne.add(t,n)}}function pe(t,e={}){return S().emit("entity:read",{...e,entity:t})}function Ie(t,e){return S().emit("entity:update",{...e,entity:t})}function Fn(t){return t.reduce((e,n)=>(n.name&&(typeof n.name=="string"?e.push(n.name):e.push(...n.name)),e),[])}function ct(t,e=2){if(!(typeof t=="string"||typeof t=="number"))return"";let r=String(t).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(e,"0"),r[1].length>e&&(r[1]=r[1].substring(0,e)),r.join(".")}function Re(t){return Object.keys(t).reduce((e,n)=>{let r=t[n];const o=n.charAt(0).toUpperCase()+n.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=Re(r)),e[o]=r,e},{})}function Un(t,e){const n=new Map;return t.forEach(r=>{var s;const o=e(r);n.has(o)||n.set(o,[]),(s=n.get(o))==null||s.push(r)}),n}function jn(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}function qn(t){return t.text().then(e=>{try{return JSON.parse(e)}catch{return _.DEFAULT_ERROR_MESSAGE}})}function x(t,e={}){return I.isFront&&(e.headers||(e.headers={}),e.headers["Context-Id"]=I.contextId),e.redirect="manual",fetch(t,e).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw new Error(_.DEFAULT_ERROR_MESSAGE)}).then(n=>qn(n).then(r=>{if(!n.ok)throw r;return r}))}function Wn(t,e=1e3){let n=0;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(...r),e)}}function Gn(t,e){let n=!1;return(...r)=>{if(!n)return n=!0,setTimeout(()=>n=!1,e),t(...r)}}const zn=Te(Ne("pretty-value-field-by-entity"));function Jn(t,e,n){try{const r=he.get(t);if(!r)throw new Error("For entity metadata is not loaded");const o=r.fieldsByName[e];if(!o)throw new Error(`For entity ${t} can't found fieldMetadata for field ${e}`);return o.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(r){return zn('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',r,t,e,n),n}}const Yn=1,Kn=5e3,U=Te(Ne("use-socket"));function S(){return Xn}function Hn(t){return typeof t=="object"&&Object.prototype.toString.call(t)==="[object Blob]"}const Xn=function(){let t=1,e,n;const r=new Set;let o=0;const s=new Set;function u(){if(e)o&&(clearTimeout(o),o=0);else return;o=setTimeout(()=>{e.close()},Kn*2);const a=new Uint8Array(1);a[0]=Yn,e.send(a)}setInterval(()=>{Array.from(r).forEach(a=>{h(a)&&(U("Handler for event %s requestId %d was expired",a.event,a.requestId),a.requestId?l({requestId:a.requestId,event:"request-error",data:{message:q.RequestTookToLong().message}}):r.delete(a))})},1e3),setInterval(()=>{(!e||e.readyState===3)&&d()},_.DELAY_SOCKET_RECONNECT);function c(){return{safeQueue:s,requestId:t,handlers:r,socketInstance:e}}function l(a){const p=[...r.values()];U("Handlers array length is %d. Response event: %s. Request id: %d",r.size,a.event,a.requestId),p.forEach(g=>{const b=a.requestId;(g.requestId&&g.requestId===b||!g.requestId&&g.event===a.event)&&(U("Find appropriated handler: %d, event: %s",t,g.event),g.callback(a.data,a),g.once&&(r.delete(g),U("Handler was removed by *once* params was passed. %o",g)))})}function d(){if(typeof n!="string"){console.log("Please initialize use-socket");return}console.log(`%cInitializing sockets: %c${n}`,"color: purple","color: black"),e=new WebSocket(n),e.onclose=function(a){U("Connection to server was stopped: %d %s",a.code,a.reason),Array.from(r).forEach(p=>{p.guaranteedAnswer&&p.serializeString&&s.add(p.serializeString)})},e.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...s.values()].forEach(a=>{f(a),s.delete(a)})},e.onerror=function(a){console.warn(a)},e.onmessage=a=>{var p;try{if(Hn(a.data)){u();return}const g=JSON.parse(a.data);if(!lt(g)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(g);return}(p=g==null?void 0:g.data)!=null&&p.refresh&&location.reload(),l(g)}catch(g){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(g)}}}function f(a){e.send(a)}function C(a,p){E({event:a,callback:p})}function A(a,p){E({event:a,callback:p,once:!0})}function w(){return e&&(e==null?void 0:e.readyState)===1}function y(a,p,g){const b=++t,k=JSON.stringify({requestId:b,event:a,data:p,contextId:I.contextId,url:window.location.href});return w()?f(k):(s.add(k),U("Socket is not connected. Message was send to save-queue")),new Promise((G,T)=>{E({event:a,requestId:b,once:!0,guaranteedAnswer:!0,serializeString:k,callback:(F,K)=>{if(U("Promise was resolve with next data:",F),Qn(K))return void T(F);g&&g(F,K),G(F)},timeToLive:_.TIME_TO_LIVE_SOCKET_REQUEST})})}function E(a){const p={timeToLive:0,...a,created:new Date().getTime()};r.add(p)}function h(a){return a.timeToLive===0||typeof a.timeToLive!="number"?!1:new Date().getTime()-a.created>a.timeToLive}return{get socket(){return e},on:C,once:A,emit:y,initialization(a){n=a},getDevInfo:c}}(),Qn=t=>!!lt(t)&&t.event==="request-error",lt=t=>typeof t=="object"&&t!==null&&"event"in t&&typeof t.event=="string"&&"requestId"in t&&typeof t.requestId=="number"&&"data"in t;function Zn(t,e){return S().emit("list-setting:read",{entity:t,mark:e})}function er(t,e){return S().emit("metadata-field:treat",{entity:t,fieldName:e})}function ut(t,e){return S().emit("entity:create",{...e,entity:t})}function dt(t,e){return S().emit("entity:delete",{...e,entity:t})}function tr(t,e){return S().emit("usage-context:read",{...e,entity:t})}function ft(t={}){return S().emit("tool:read",t)}function nr(t,e={},n={}){const r=i.inject(_.PROVIDE_NAME_ACTIONS,null),o=typeof t=="string"?t:e,s=typeof e=="string"?n:e;return i.computed(()=>{var l;const c=((typeof t=="string"?(l=r==null?void 0:r.actions)==null?void 0:l.value:i.unref(t))||[]).find(d=>d.name===o);return c?{...c,...s}:null})}function rr(t){return S().emit("history:read",t)}function or(){const t=i.ref(null);function e(n){t.value=n}return{activeRow:t,activateRow:e}}function ir(t,e,n={}){const r=i.reactive([]);let o=0;const s=i.ref(!1);function u(){if(s.value)return Promise.reject("The process has already started.");const h=y();return s.value=!0,typeof h.limit!="number"&&(h.limit=100),h.offset=o,(n.request||pe)(t,h).then(p=>(o+=p.length,p)).finally(()=>{s.value=!1})}function c(h,a){var g;return typeof h.Version=="number"?h.Version:(g=r.find(b=>b.Id===a))==null?void 0:g.Version}function l(h,a){const p=r.findIndex(g=>g.Id===h);if(p===-1)throw new Error(`Can't found item with Id ${h}`);r.splice(p,1,a)}function d(h){const a=r.findIndex(p=>p.Id===h);if(a===-1)throw new Error(`Can't found item with Id ${h}`);r.splice(a,1)}async function f(h,a){try{const p=y(),g=c(a,h);delete a.Version,await Ie(t,{id:h,values:a,version:g});const b=await pe(t,{fields:p.fields||"",id:h});l(h,b)}catch(p){R()(p)}}async function C(h,a){try{const p=y(),g=c(a,h);delete a.Version,await dt(t,{id:h,version:g}),d(h)}catch(p){R()(p)}}async function A(h){try{await ut(t,{values:h}),await E()}catch(a){R()(a)}}async function w(){try{const h=await u();r.push(...h)}catch(h){R()(h)}}function y(){return typeof e=="function"?e():e}async function E(){try{o=0;const h=await u();r.splice(0,r.length,...h)}catch(h){R()(h)}}return{array:r,updateById:f,next:w,reload:E,wait:s,create:A,deleteById:C}}function sr(){function t(){return{organizations:I.organizations,currentContextId:I.contextId,person:I.person,context:I.context,contextType:I.contextType,userId:I.userId}}const e=i.reactive(t());return I.onupdateContext(()=>{Object.assign(e,t())}),e}function ar(t,e,n){return S().emit("communication:create",{entityName:t,entityCatalogId:e,targetCode:n})}function cr(t,e,n){return S().emit("communication:read",{entityName:t,entityCatalogId:e,targetCode:n})}function lr(t,e){return S().emit("communication-message:create",{communicationId:t,text:e})}function ur(t){return S().emit("communication-message:read",{communicationId:t})}function dr(t){const e=B.Form.getParentForm(),n=i.reactive([]);return e&&e.subscribe(t),t.read=()=>ur(t.id).then(r=>(n.splice(0,n.length,...r),r)),{array:n}}function fr(t,e){t.read=()=>{const r=n();return Promise.resolve().then(()=>{if(!t.name)throw q.EntityWithoutName(t);return pe(t.name,r)}).then(Re).then(o=>(o.hasOwnProperty("Version")&&(t.version=o.Version),t.setValues(o),o)).catch(R())},t.save=()=>{const r=n();return Promise.resolve().then(()=>{if(!t.name)throw q.EntityWithoutName(t);return Ie(t.name,{id:r.id,values:t.changes,version:t.version})}).then(o=>{t.version=o.version}).catch(o=>{throw R()(o),o})};function n(){return typeof e=="function"?e():e}}function pr(t){if(!t)return i.inject(_.PROVIDE_NAME_METADATA);he.initEntity(t);const e=i.computed(()=>he.state[t]);return i.provide(_.PROVIDE_NAME_METADATA,e),e}function hr(t,e={}){if(!t)return i.inject(_.PROVIDE_NAME_USAGE_CONTEXT);const n=i.ref(null);return i.provide(_.PROVIDE_NAME_USAGE_CONTEXT,n),{state:n,update:async function(){n.value=await tr(t,gr(e||{}))}}}function gr(t){return typeof t=="function"?t():t}function mr(t){if(!t)return i.inject(_.PROVIDE_NAME_ACTIONS);const e=i.reactive([]),n=i.computed(()=>e.map(s=>yr(t,s))),r={actions:n,update:o};i.provide(_.PROVIDE_NAME_ACTIONS,r),t.router=ze.useRouter(),t.handleConfirmation||(t.handleConfirmation=vr),t.handleAffectedEntity||(t.handleAffectedEntity=_r),t.handleCloseForm||(t.handleCloseForm=Cr),t.handleValidationResult||(t.handleValidationResult=wr);function o(s={}){return e.splice(0,e.length),ft(s).then(u=>e.splice(0,0,...u)).catch(R("error"))}return{actions:n,update:o}}function yr(t,e){return{...e,label:e.title,callback(){const n=typeof t.values=="function"?t.values(e,t):t.values,r=()=>x(e.url,{method:"POST",body:JSON.stringify({keys:n,contextId:I.contextId}),headers:{"Content-Type":"application/json"}}).then(async o=>{var s,u;if(!Tr(o))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(t.handlers))for await(const c of t.handlers)await c(e,o,t);if(!o.success)throw t.handleValidationResult&&o.validationEffect&&((u=(s=o.validationEffect)==null?void 0:s.results)!=null&&u.length)&&t.handleValidationResult(e,o.validationEffect,t),new Error(o.message);return o.message&&ne.add("info",o.message),Array.isArray(o.affectedEntities)&&t.handleAffectedEntity&&o.affectedEntities.forEach(c=>{var l;return(l=t.handleAffectedEntity)==null?void 0:l.call(t,e,c,t)}),e.closeHostForm&&t.handleCloseForm&&t.handleCloseForm(e,t),o}).catch(R("error"));return e.requireSave&&t.form&&t.form.changed?t.form.save().then(r):!e.confirmation||!t.handleConfirmation?r():t.handleConfirmation(e,r)}}}function Er(t){const e="Are you sure?";return t===!0||typeof t=="string"&&t.toLowerCase()==="true"||t==="1"?e:typeof t=="string"?t:e}async function vr(t,e){const n=Er(t.confirmation);if(!de.getComponentFromStore(_.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await de.promptModal(_.MODAL_CONFIRM,{message:n}))return e()}function wr(t,e){const n=_.MODAL_VALIDATION_EFFECT;if(!de.getComponentFromStore(n))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{de.pushModal(n,e)})}function _r(t,e,n){var u;const{router:r,form:o}=n,s=(u=e.primaryKey)==null?void 0:u.Id;if(r&&e&&e.name===t.redirectEntity)return r.push({name:e.name,params:{id:s}});o&&e.name===o.name&&e.updated&&s===o.id&&o.read()}function Cr(t,e){const{router:n}=e;n&&t.closeHostForm&&n.back()}function Tr(t){return!!(t&&typeof t=="object"&&"affectedEntities"in t&&"success"in t)}function Sr(t){function e(n){n.key==="Enter"&&t()}i.onMounted(()=>{document.addEventListener("keypress",e)}),i.onUnmounted(()=>{document.removeEventListener("keypress",e)})}function Ar(t){const e=i.reactive([]),n=c=>{const l=i.unref(t);if(c===void 0){e.length===0?l.forEach(o):l.forEach(s);return}r(c)?s(c):o(c)},r=c=>e.includes(c),o=c=>{r(c)||e.push(c)},s=c=>{const l=e.findIndex(d=>d===c);l!==-1&&e.splice(l,1)},u=i.computed(()=>{const c=i.unref(t);return e.length===c.length&&c.length!==0});return[e,n,u,o,s]}function br(t){const e=i.ref(""),n=i.computed(()=>{const r=e.value.toLowerCase();return i.unref(t).filter(o=>e.value.length?Object.values(o).join().toLowerCase().includes(r):!0)});return{search:e,searchArray:n}}const ne=new class{constructor(){this.store=i.reactive([])}add(e,n,r={}){const o=kr(r),s=new Nr(e,n,o.timeout,o.children,o.click);return this.store.push(s),o.timeout&&setTimeout(this.remove.bind(this,s.id),o.timeout*1e3),s}remove(e){const n=this.store.findIndex(r=>r.id===e);if(n===-1)return!1;this.store.splice(n,1)}};function kr(t){function e(r){return!!r&&typeof r=="object"}const n={timeout:10,click:()=>null,children:[]};return e(t)?{timeout:t.timeout||n.timeout,click:t.click||n.click,children:t.children||n.children}:n}const pt=class ht{constructor(e,n,r,o,s){this.type=e,this.message=n,this.timeout=r,this.children=o,this.click=s,this.id=ht.cardId++}};pt.cardId=1;let Nr=pt;class Or extends M{constructor(e){super(),this.name="Communication",this.read=()=>{},this.id=e}sendMessage(e){return lr(this.id,e)}static checkAndGenerate(e,n,r){return cr(e,n,r).then(o=>o.length===0?ar(e,n,r):o[0])}}function Ir(){return S().emit("client:read",{})}var gt=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Rr=(t,e,n)=>(gt(t,e,"read from private field"),n?n.call(t):e.get(t)),Lr=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},$r=(t,e,n,r)=>(gt(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ue;const ye=class z extends M{constructor(){super(...arguments),this.type="front",this.organizations=[],Lr(this,ue,!1)}set language(e){localStorage.setItem(_.LOCALSTORAGE_LANGUAGE_KEY,e)}get language(){return localStorage.getItem(_.LOCALSTORAGE_LANGUAGE_KEY)||z.DEFAULT_LANGUAGE}get contextType(){var e;if(this.contextId)return((e=this.person)==null?void 0:e.id)===this.contextId?"person":"organization"}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(e){$r(this,ue,e),this.emit(z.EVENT_READY_UPDATE,e)}get ready(){return Rr(this,ue)}onReady(e){return this.on(z.EVENT_READY_UPDATE,e)}onupdateContext(e){return this.on(z.EVENT_CONTEXT_UPDATE,e)}setCurrentContext(e){if(this.contextId===e)return console.warn("[application-manager] The current context has already been installed.");this.contextId=Number(e),localStorage.setItem(_.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(e)),this.emit(z.EVENT_CONTEXT_UPDATE,e),console.log(`Current context id %c${e}`,"color: purple")}get context(){var e;return this.contextId?this.contextId===((e=this.person)==null?void 0:e.id)?this.person:this.organizations.find(n=>n.id===this.contextId)||null:null}async init(){try{const e=await this.loadCustomerData();this.person=e,this.organizations=e.organizations,this.userId=e.userId,this.restoreCurrentContext(),this.ready=!0}catch(e){R()(e)}}restoreCurrentContext(){const e=Number.parseInt(localStorage.getItem(_.LOCALSTORAGE_CURRENT_CONTEXT_KEY)||"");if(!Number.isNaN(e)&&this.validateContextId(Number(e)))this.setCurrentContext(e);else{if(!this.person)return console.warn("Make sure you call ID recovery after saving user data");this.setCurrentContext(this.person.id)}}loadCustomerData(){return Ir()}validateContextId(e){var n;try{return((n=this.person)==null?void 0:n.id)==e?!0:!!this.organizations.find(r=>r.id===e)}catch{return!1}}};ue=new WeakMap;ye.DEFAULT_LANGUAGE="en";ye.EVENT_CONTEXT_UPDATE="event:context-update";ye.EVENT_READY_UPDATE="event:ready-update";let Pr=ye;function Dr(t){return S().emit("metadata:read",{entity:t})}const he=function(){const e=i.reactive({}),n=new Map;function r(c){return e[c]}async function o(c){if(n.has(c)&&await n.get(c),e[c])return;const l=await s(c);u(c,l)}function s(c){const l=Dr(c).finally(()=>{n.delete(c)});return n.set(c,l),l}function u(c,l){e[c]=l}return{state:e,initEntity:o,get:r}}();class D{static login(e){return x(P.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...e,AppName:P.applicationName})})}static parseProcessAnswer(e){if(e.statusCode>4)throw new Error(e.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return e}static startRegistrationProcess(e){return D.requestStepRegistrationProcess("StartRegistration",e)}static confirmPhoneRegistrationProcess(e){return D.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",e)}static confirmEmailRegistrationProcess(e){return D.requestStepRegistrationProcess("ConfirmEmailByRegistration",e)}static finishEmailRegistrationProcess(e){return D.requestStepRegistrationProcess("FinishRegistration",e)}static requestStepRegistrationProcess(e,n){return x(`${P.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)})}static startLoginProcess(e){return D.requestStepLoginProcess("StartLogin",e)}static loginWithPassword(e){return D.requestStepLoginProcess("LoginWithPassword",e)}static loginWithOtpCode(e){return D.requestStepLoginProcess("LoginWithOtpCode",e)}static requestStepLoginProcess(e,n){return x(`${P.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).then(D.parseLoginProcessAnswer)}static parseLoginProcessAnswer(e){if(e.statusCode>3)throw Error(e.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return e}static startPasswordReset(e,n){return x(`${P.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:n,AppName:e})})}static confirmPhoneNumberByAccessRecovery(e,n,r,o){return x(`${P.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:e,Token:n,Prefix:r,Code:o})})}static confirmEmailByAccessRecovery(e,n,r,o){return x(`${P.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:e,Token:n,Prefix:r,Code:o})})}static finishAccessRecovery(e,n,r){return x(`${P.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:e,Token:n,Password:r,ConfirmedPassword:r})})}}class xr{static readLicences(e){const n=`/close-api/proxy/Dashboard/Licenses?organizationId=${e.toString()}`;return x(n).then(r=>{const o={};return r.byOrganization.licenses.forEach(s=>{const u=s.licenseTypeCode;o[u]||(o[u]={licenseTypeCode:u}),o[u][s.statisticName]=s.value}),Object.values(o)})}}function Br(t){return typeof t!="object"||t===null?!1:!!(t.hasOwnProperty("start")||t.hasOwnProperty("end"))}function L(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];if(Array.isArray(r)){const o=r.map(s=>typeof s=="string"?`'${s}'`:s).join(", ");return r.length&&e.push(`@${n} in (${o})`),e}if(Br(r)){let o=function(s){var u;return((u=s.match(/([^Z]*)/))==null?void 0:u[0])+"0000Z"};return r.start&&e.push(`@${n} ge ${o(r.start)}`),r.end&&e.push(`@${n} le ${o(r.end)}`),e}return typeof r=="number"?(e.push(`@${n} eq ${r}`),e):typeof r=="string"?(r.length!==0&&e.push(`@${n} eq '${r}'`),e):(r===null&&e.push(L.is(n,r)),e)},[]).join(" and ")}function re(t){return typeof t=="string"?`'${t}'`:`${t}`}L.includes=function(e,n){return`@${e} Contains ${re(n)}`};L.beginWith=function(e,n){return`@${e} BeginWith ${re(n)}`};L.notEq=function(e,n){return`@${e} nq ${re(n)}`};L.eq=function(e,n){return Array.isArray(n)?L.in(e,n):`@${e} eq ${re(n)}`};L.in=function(e,n){const r=n.map(re).join(", ");return`@${e} in (${r})`};L.and=function(...e){return e.filter(n=>typeof n!="string"||n.trim().length===0?!1:n).map(n=>`(${n})`).join(" and ")};L.is=function(e,n){return`@${e} is ${n}`};L.or=function(...e){return e.join(" or ")};const I=new Pr,Mr={staticLink:Ft},Vr={usage:wt,utils:It,types:Rt};exports.Communication=Or;exports.CoreError=q;exports.Filter=L;exports.Manager=I;exports.MetadataStore=he;exports.NotificationSystem=ne;exports.WidgetButton=fn;exports.WidgetIcon=te;exports.WidgetImage=Tn;exports.WidgetList=xn;exports.WidgetLoader=_n;exports.WidgetMultiButton=En;exports.WidgetSpinner=me;exports.WidgetTable=cn;exports.asyncProcess=Mn;exports.authService=D;exports.billingService=J;exports.catchUniversal=R;exports.clientService=Xe;exports.communicationService=xt;exports.config=Bn;exports.configuration=P;exports.constants=_;exports.dashboardService=xr;exports.dataService=ee;exports.debounce=Wn;exports.default=Vr;exports.documentsService=Ut;exports.equipmentService=Yt;exports.fileService=Bt;exports.getCellName=ot;exports.getCellValue=ke;exports.getNamesFromListConfig=Fn;exports.getUnitValue=st;exports.groupArrayByField=Un;exports.injectAction=nr;exports.internationalizationService=Lt;exports.invitationService=Mt;exports.openService=Vt;exports.parseError=fe;exports.prettyDate=Oe;exports.prettyDateWithTime=it;exports.prettyMoney=ct;exports.prettyValueFieldByEntity=Jn;exports.processWizardService=le;exports.request=x;exports.ruleValidationService=be;exports.t=Y;exports.throttle=Gn;exports.universalEntityCreate=ut;exports.universalEntityDelete=dt;exports.universalEntityRead=pe;exports.universalEntityUpdate=Ie;exports.universalHistoryRead=rr;exports.universalListSettingRead=Zn;exports.universalMetadataFieldTreat=er;exports.universalToolRead=ft;exports.useActions=mr;exports.useCommunication=dr;exports.useEnter=Sr;exports.useFormEntity=fr;exports.useListActiveRow=or;exports.useListEntity=ir;exports.useListSearch=br;exports.useListSelect=Ar;exports.useManagerState=sr;exports.useMetadata=pr;exports.useSocket=S;exports.useUsageContext=hr;exports.useWizard=Gt;exports.utils=Mr;exports.uuidv4=jn;exports.valuesToUpperCase=Re;
|
|
10
|
+
*/const De=function(t,e){return t in this.events||(this.events[t]=[]),this.events[t].push(e),this.off.bind(this,t,e)},xe=function(t,e){t in this.events&&this.events[t].forEach(n=>n(e))},Be=function(t,e){const n=this.events[t];if(!n)return;const r=n.indexOf(e);r!==-1&&n.splice(r,1)},Ve=function(){this.events={}};class V{constructor(){this.events={}}on(e,n){return De.call(this,e,n)}emit(e,n){return xe.call(this,e,n)}off(e,n){return Be.call(this,e,n)}cleanEvents(){Ve.call(this)}static on(e,n){return De.call(V,e,n)}static emit(e,n){return xe.call(V,e,n)}static off(e,n){return Be.call(V,e,n)}static cleanEvents(){Ve.call(V)}}V.events={};var Ze=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},ie=(t,e,n)=>(Ze(t,e,"read from private field"),n?n.call(t):e.get(t)),we=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Ce=(t,e,n,r)=>(Ze(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Q,se,ae;const W=class I extends V{constructor(){super(...arguments),we(this,Q,void 0),we(this,se,"front"),this.organizations=[],we(this,ae,!1)}set language(e){localStorage.setItem(I.LOCALSTORAGE_LANGUAGE_KEY,e)}get language(){return localStorage.getItem(I.LOCALSTORAGE_LANGUAGE_KEY)||I.DEFAULT_LANGUAGE}checkLanguageInStorage(){return!!localStorage.getItem(I.LOCALSTORAGE_LANGUAGE_KEY)}get contextType(){var e;if(this.contextId)return((e=this.person)==null?void 0:e.id)===this.contextId?"person":"organization"}set router(e){Ce(this,Q,e)}get router(){if(!ie(this,Q))throw new Error("Router was not founded. Please set router: Manager.router = router: VueRouter");return ie(this,Q)}set type(e){Ce(this,se,e)}get type(){return ie(this,se)}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(e){Ce(this,ae,e),this.emit(I.EVENT_READY_UPDATE,e)}get ready(){return ie(this,ae)}onReady(e){return this.on(I.EVENT_READY_UPDATE,e)}onupdateContext(e){return this.on(I.EVENT_CONTEXT_UPDATE,e)}onupdateData(e){return this.on(I.EVENT_DATA_UPDATE,e)}setCurrentContext(e){if(this.contextId===e)return console.log("[application-manager] The current context has already been installed.");this.contextId=Number(e),localStorage.setItem(I.CURRENT_CONTEXT_KEY,String(e)),this.emit(I.EVENT_CONTEXT_UPDATE,e),console.log(`Current context id %c${e}`,"color: purple")}get context(){var e;return this.contextId?this.contextId===((e=this.person)==null?void 0:e.id)?this.person:this.organizations.find(n=>n.id===this.contextId)||null:null}async init(){try{const e=await this.loadCustomerData();this.person=e,this.organizations=e.organizations,this.user=e.user,this.ready=!0;const n=Number.parseInt(localStorage.getItem(I.CURRENT_CONTEXT_KEY)||"");!Number.isNaN(n)&&this.validateContextId(Number(n))?this.setCurrentContext(n):this.setCurrentContext(Number(e.id))}catch{yt.add("error",q.ApiNotAvailable().message)}}loadCustomerData(){return He.getClientData()}async updateFullClientData(){return this.init()}validateContextId(e){var n;return((n=this.person)==null?void 0:n.id)==e?!0:!!this.organizations.find(r=>r.id===e)}getListKeyById(e){return console.log("DEPRECATED"),`list-information-${e}`}getListInformationFromLocalStorage(e){console.log("DEPRECATED");const n=localStorage.getItem(this.getListKeyById(e));return n&&JSON.parse(n)}setListInformationToLocalStorage(e,n){console.log("DEPRECATED"),localStorage.setItem(this.getListKeyById(e),JSON.stringify(n))}};Q=new WeakMap;se=new WeakMap;ae=new WeakMap;W.DEFAULT_LANGUAGE="en";W.LOCALSTORAGE_LANGUAGE_KEY="CurrentLanguage";W.EVENT_CONTEXT_UPDATE="event:context-update";W.EVENT_READY_UPDATE="event:ready-update";W.EVENT_DATA_UPDATE="event:data-update";W.CURRENT_CONTEXT_KEY="CurrentContext";let vt=W;const Me=new vt;function wt(t){return t.text().then(e=>{try{return JSON.parse(e)}catch{return mt}})}function m(t,e={}){return Me.isFront&&(e.headers||(e.headers={}),e.headers["Context-Id"]=Me.contextId),e.redirect="manual",fetch(t,e).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw q.ApiNotAvailable()}).then(n=>wt(n).then(r=>{if(!n.ok)throw r;return r}))}class ge{constructor(){}static parseNamesFromListConfig(e){let n=ge.parseFieldsToGraphQL(e.reduce((o,s)=>(s.name&&o.push(s.name),o),[]));function r(o){let s="";for(let u in o)typeof o[u]=="boolean"?s+=` ${u} `:s+=` ${u} { ${r(o[u])} }`;return s}return r(n)}static parseSortFromListConfig(e){let n={};for(let r in e)n[r]=e[r]?"ASC":"DESC";return n}static parseFieldsToGraphQL(e){function n(r,o){if(o.includes(".")){const s=o.indexOf("."),u=o.substring(s+1),c=o.substring(0,s);c in r||(r[c]={}),n(r[c],u)}else r[o]=!0;return r}return e.reduce(n,{})}}class Ct{constructor(){this.public=!1,this.errors=new Proxy([],{set:(e,n,r)=>(n!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(r)}`),e[n]=r,!0)}),window._journal=this}get error(){return{add:(...e)=>{this.errors.push(e)},clean:()=>{this.errors.splice(0,this.errors.length)},console:()=>{console.log(this.errors)}}}welcome(){console.log("The journal has been initialized. To get access check %c_journal in console.","background: blue; color: white")}}const _t=new Ct;function et(t){return t&&t[0].toLowerCase()+t.slice(1)}function Ae(t){return Object.keys(t).reduce((e,n)=>{let r=t[n];const o=n.charAt(0).toUpperCase()+n.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=Ae(r)),e[o]=r,e},{})}function Tt(t,e=2){if(!(typeof t=="string"||typeof t=="number"))return"";let r=String(t).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(e,"0"),r[1].length>e&&(r[1]=r[1].substring(0,e)),r.join(".")}const St={Request:m,clickOutside:Je,getPropFromObject:Se,runPromiseQueue:Ye,GraphQL:ge,firstChapterToLowerCase:et,valuesToUpperCase:Ae,prettyMoney:Tt},At=Object.freeze(Object.defineProperty({__proto__:null,GraphQL:ge,Journal:_t,Request:m,clickOutside:Je,default:St,firstChapterToLowerCase:et,getPropFromObject:Se,runPromiseQueue:Ye,valuesToUpperCase:Ae},Symbol.toStringTag,{value:"Module"}));class bt{static getDictionary(e){if(!e)throw new Error(`Can't get dictionary for ${e}.`);return m(`/open-api/internationalization/language/${e}`)}}let j={};function Y(t,...e){if(typeof t!="string")return console.trace(`Label is not provided for translation: ${t}`),"undefined";let n=B.utils.getPropFromObject((this==null?void 0:this.vocabulary)||j,t);if(typeof n=="string")return Fe(n,e);const r=B.utils.getPropFromObject(j==null?void 0:j.root,t);return typeof r=="string"?Fe(r,e):(typeof n===void 0&&console.warn(`Translation for label "${t}" is not founded.`),t)}function Fe(t,e){return e.forEach((n,r)=>{t=t.replaceAll(new RegExp(`\\{${r}}`,"g"),n)}),t}Y.setGlobalVocabulary=function(t){j=t};Y.getScope=function(t){const e=typeof t=="string"?t:"root";return typeof t!="string"&&console.warn(`SCOPE ${t} for translate is not string.`),Y.bind({vocabulary:B.utils.getPropFromObject(j,e.toLowerCase())})};Y.setVocabulary=function(t){return typeof t=="string"&&(t=B.utils.getPropFromObject(j,t)),Y.bind({vocabulary:t})};function kt(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="string"&&typeof t[1]=="number"}const Nt="masterId",It="masterEntity";function Ue(t,e){if(!Array.isArray(e))return;if(kt(e))return n(e);e.forEach(n);function n(r){t.append(It,r[0]),t.append(Nt,r[1].toString())}}class ee{static async anonymousGetList(e){return await m(`/open-api/data/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getSearchParamsForEntityListRead(e){const n=(o,s)=>r.append(o,s),r=new URLSearchParams;if(e.fields){const o=e.fields;typeof o=="string"?n("fields",o):Array.isArray(o)?n("fields",o.join(" ")):typeof o=="object"&&n("fields",Object.keys(o).join(" "))}if(e.order){let o=e.order;const u=(Array.isArray(o)?[o]:Object.entries(o)).map(([c,l="desc"])=>`@${c} ${l}`).join(",");n("order",u)}return e.limit&&n("limit",e.limit.toString()),e.offset&&n("offset",e.offset.toString()),e.filter&&n("filter",e.filter.toString()),e.useUsageContext&&r.append("useUsageContext",e.useUsageContext.toString()),r}static async getList(e,n){const r=ee.getSearchParamsForEntityListRead(n||{});return await m(`/close-api/data/${e}?${r.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getCount(e,n){const r=ee.getSearchParamsForEntityListRead(n||{});return m(`/close-api/data/entities/${e}/count?${r.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static create(e,n,r){const o=new URLSearchParams;return Ue(o,r==null?void 0:r.masterEntities),m(`/close-api/data/${e}?${o.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:n})})}static update(e,n,r,o={}){return m(`/close-api/data/entities/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:r})})}static readById(e,n,r={}){const o=new URLSearchParams;if(r.fields){let s=r.fields;typeof s=="string"&&(s=[s]),o.append("fields",s.join(" "))}return m(`/close-api/data/entities/${e}/id/${n}?${o.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static updateById(e,n,r,o){const s=new URLSearchParams;return Ue(s,o==null?void 0:o.masterEntities),m(`/close-api/data/entities/${e}/id/${n}?${s.toString()}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:r,version:o==null?void 0:o.version})})}static removeById(e,n,r){const o=typeof n=="number"?{Id:n}:n;return ee.removeByKeys(e,o,r)}static removeByKeys(e,n,r){return m(`/close-api/data/entities/${e}`,{method:"delete",headers:{"Content-Type":"application/json"},body:JSON.stringify({keys:n,version:r})})}}const tt=class Z{static async create(e){return m(Z.url,{method:"post",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}static async read(e){const n=new URLSearchParams({targetCode:String(e.targetCode),entityName:e.entity.name,entityCatalogId:e.entity.catalogId});return m(Z.url+"?"+n.toString(),{method:"get"})}static async readMessages(e){return m(`${Z.url}/${e}/messages`,{method:"get"})}static async createMessage(e){return m(`${Z.url}/${e.talkId}/messages`,{method:"post",body:JSON.stringify({text:e.text}),headers:{"Content-Type":"application/json"}})}};tt.url="/close-api/communications";let Ot=tt;function je(t){return{...t,createdEntities:t.createdEntites}}const nt=class ce{static async getStartConfig(e,n){return m([ce.url,e,n].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(e,n){return m([ce.url,e,n].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(je)}static async runStep(e,n,r,o,s){return m([ce.url,e,n].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:r,token:o,values:s})}).then(je)}};nt.url="/close-api/views/process-wizard";let le=nt;class Rt{static async upload(e,n){const r=new FormData;r.append("file",e);const o=`/close-api/files?entityName=${n}`;return await fetch(o,{method:"POST",body:r}).then(s=>s.json()).then(s=>(s.filename=e.name,s))}}class Lt{static invite(e,n,r){return m("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:e,personKey:n,relatedRoleCode:r})})}static accept(e,n){return m("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e,version:n,mark:!0})})}static decline(e,n){return m("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e,version:n,mark:!1})})}}class be{static get url(){return"/close-api/rules-validation/"}static validate(e,n){return m(be.url+e,{method:"POST",body:JSON.stringify(n)})}}class $t{static getConfiguration(){return m("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}}function Pt(t,e="images"){return`/static-folder/${e}/${t}`}class Dt{static getRequiredDocuments(e,n,r){const o=new URLSearchParams({entity:e,primaryKey:n,statusCode:r});return fetch(`/close-api/views/required-documents?${o.toString()}`).then(s=>s.json())}}class J{static url(){return"close-api/billing"}static getBillingMetadata(e){return fetch(`/${J.url()}/calculator/${e}`)}static calculate(e,n){return m(`/${J.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:e,values:n})}).then(r=>{if(r&&r.status===1)return r;throw Array.isArray(r.notes)?new Error(r.notes[0]):q.ApiNotAvailable()})}static parseMetadataField(e){function n(r){switch(r.type){case"ValueType":switch(r.dataType){case"Integer":return"number";default:return r.dataType}case"EntityReference":return r.dataType}}return{name:e.name,label:e.title,required:e.required,type:n(e)}}static createOnlinePayment(e,n){return m(`/${J.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:e,returnURL:n})})}static applyOnlinePayment(e){return m(`/${J.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:e})})}}function xt(t){return t.statusName==="Completed"}function Bt(t){return t.statusName==="FinalStepWithConfirmation"}function Vt(t){return t.statusName==="ValidationError"}function Mt(t,e,n){let r=null;const o=i.reactive({wait:null});let s=[],u=null;const c=i.ref(null);function l(){c.value=s.find(a=>a.name===u)||null}function d(){var a;return u?((a=s.find(p=>p.name===u))==null?void 0:a.fields)||[]:[]}function f(a){if(l(),Vt(a))return void n.onValidation(a.validationResults);if((a.statusName==="FinalStep"||a.statusName==="NextStep")&&(!d().length||Ft(d(),n.presets)))return h(n.presets||{});xt(a)&&n.onCompleted(a),Bt(a)&&n.onConfirmation(a)}async function _(){try{await A(),await E()}catch(a){const{message:p}=fe(a);ne.add("error",p)}}function A(){return o.wait="Loading process information.",le.getStartConfig(e,t).then(a=>{s=a.steps.map(p=>({label:p.title,name:p.stepName,number:p.number,fields:p.frontendEntity.objectTypes.reduce((g,b)=>(b.properties.forEach(k=>{g.push({name:k.name,label:k.title,type:k.refEntityName||k.dataType})}),g),[])}))}).then(a=>(o.wait=!1,a))}function w(a){return u=a.nextStepName,r=a.token,a}function y(a){const p=fe(a);ne.add("error",p.message)}function E(){return o.wait="Starting process",le.startProcess(e,t).then(w).then(f).catch(y).finally(()=>{o.wait=null})}function h(a={}){return!r||!u?Promise.reject("Not step or token."):(o.wait="Waiting for result...",le.runStep(e,t,u,r,a).then(w).then(f).catch(y).finally(()=>{o.wait=!1}))}return{initialize:_,state:o,currentStepConfig:i.readonly(c),next:h}}function Ft(t,e){for(let n=0;n<t.length;n++){const r=t[n];if(!B.utils.getPropFromObject(e,r.name))return!1}return!0}const Ut="close-api/proxy/Equipment/Search";class jt{static search(e,n,r,o,s){const u=new URLSearchParams;u.append("pattern",e||""),n&&u.append("categoryId",n),r&&u.append("useType",String(r)),o&&u.append("statusCode",o),s&&(u.append("limit",String(s.limit)),u.append("offset",String(s.offset)));const c=`/${Ut}?${u.toString()}`;return m(c,{method:"GET",headers:{"Content-Type":"application/json"}})}}const qt={class:"widget-table__head"},Wt={class:"widget-table__head-label margin_0 text_overflow"},Gt=i.defineComponent({__name:"widget-table-head",props:{config:{}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("tr",qt,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.config,(r,o)=>(i.openBlock(),i.createElementBlock("th",{class:"widget-table__head-cell",key:o},[i.createElementVNode("p",Wt,i.toDisplayString(r.label),1)]))),128))]))}});const M=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},zt=M(Gt,[["__scopeId","data-v-25198f4a"]]);function rt(t){return typeof t.name=="string"?t.name:Array.isArray(t.name)?t.name[0]:null}function ke(t,e){const n=rt(t);let r=n?B.utils.getPropFromObject(e,n):null;return r===void 0&&(r=null),t.value?t.value(r,e):t.value===null?null:r}function Ne(t){return["eservices-core",t].join(":")}function ot(t){return Ie(t,"YYYY/MM/DD HH:mm:ss")}function Ie(t,e="YYYY/MM/DD"){if(!t)return"";try{const n=new Date(t);return gt.format(n,e)}catch(n){return console.log(n),"Invalid date"}}const Jt={props:{name:String},setup(t,e){let n="unknown";try{n=e.slots.default()[0].children}catch{n=t.name}typeof n!="string"&&console.warn(`Name for Icon.vue is not string. ${n}`);try{n=n.replace(/\s+/g,"")}catch{}return()=>i.h("i",{class:`icon icon-${n}`})}},te=M(Jt,[["__scopeId","data-v-e287c8d9"]]);function it(t){return e=>typeof e=="string"||typeof e=="number"?`${e} ${t}`:""}const Yt=Te(Ne("setup-list-row"));function Kt(t,e){const n=t.config.map(r=>Ht(r,t,e));return i.h("tr",{class:"widget-table__row widget-table-row"},n)}function Ht(t,e,n){const r=e.values;let o=ke(t,r);const s={onClick:[],class:["widget-table__cell widget-table-cell"]};function u(f){s.onClick.push(()=>f(r))}function c(f){Array.isArray(f)?s.class.push(...f):s.class.push(f)}const l=[],d=[];if(t.unitValue&&(o=it(t.unitValue)(o)),t.hide&&t.hide(r))return[i.h("td")];if(t.type)switch(c(`widget-table-cell_${t.type}`),t.type){case"number":{typeof o=="number"&&(o=new Intl.NumberFormat().format(o));break}case"date":{o=Ie(typeof o=="string"?o:null);break}case"dateTime":case"dateWithTime":{o=ot(typeof o=="string"?o:null);break}case"money":{o=at(o);break}case"multi-select":{d.push(i.h(B.FormField,{type:"single-checkbox",modelValue:e.selected})),u(qe.bind(null,n,!0));break}case"select":{d.push(i.h(B.FormField,{type:"single-radio",modelValue:e.selected})),u(qe.bind(null,n,!1));break}}if(t.onClick&&u(t.onClick),t.link)try{const f=t.link(r);if(f){const _=i.h(ze.RouterLink,{to:f});d.push(_),c("widget-table-cell_link")}}catch(f){Yt("Can't add router link",f)}if(t.href&&(d.push(i.h("a",{href:t.href(r),target:"_blank"})),c("widget-table-cell_link")),typeof o=="boolean"&&(o=o?"✓":"—"),(typeof o=="string"||typeof o=="number")&&d.push(i.h("p",{class:"widget-list-cell-text"},o)),t.icon&&(typeof t.icon=="string"&&d.push(i.h(te,{name:t.icon})),typeof t.icon=="function")){const f=t.icon(r);f!==null&&d.push(i.h(te,{name:f}))}return t.class&&(typeof t.class=="function"?c(t.class(r)):c(t.class)),l.push(i.h("td",s,d)),l}function qe(t,e){t.emit("select",e)}function st(t,e){return()=>{try{return Kt(t,e)}catch(n){return console.warn(n),null}}}const Xt={props:{values:Object,config:Object,selected:Boolean},setup:st},Qt=["colspan"],We=i.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(t,{emit:e}){const n=i.ref();return i.onMounted(()=>{setTimeout(()=>{n.value&&n.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(r,o)=>(i.openBlock(),i.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:n},[i.createElementVNode("td",{colspan:r.rowLength},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.component),i.mergeProps(r.$attrs,{values:r.values,new:r.isNew,onClose:o[0]||(o[0]=s=>e("close")),onSave:o[1]||(o[1]=s=>e("save",s))}),null,16,["values","new"]))],8,Qt)],512))}}),C={LIST_ACTIVE_NEW:"list-active-new",DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go.",LOCALSTORAGE_CURRENT_CONTEXT_KEY:"CurrentContext",LOCALSTORAGE_LANGUAGE_KEY:"CurrentLanguage",DELAY_SOCKET_RECONNECT:1e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",TIME_TO_LIVE_SOCKET_REQUEST:3e4};function Zt(t,e){return i.computed(()=>t.filter(n=>n.name?!!e.find(o=>![null,""].includes(ke(n,o))):!0))}const en={class:"widget-table"},Ge="update:selectedRows",tn=i.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{}},emits:["update:activeRow","save"],setup(t,{emit:e}){const n=t,r=i.useSlots(),o=i.computed(()=>{var l;return(l=r==null?void 0:r.default)==null?void 0:l.call(r)[0]});function s(l,d=!0){if(!n.selectedRows)return;if(!d)return e(Ge,n.selectedRows.includes(l)?[]:[l]);const f=[...n.selectedRows],_=f.indexOf(l);return _===-1?f.push(l):f.splice(_,1),e(Ge,f)}function u(l){e("save",l),e("update:activeRow",null)}const c=Zt(n.config,n.array);return(l,d)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("table",en,[i.createVNode(zt,{config:i.unref(c)},null,8,["config"]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.array,(f,_)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:_},[i.createVNode(Xt,{config:i.unref(c),values:f,selected:l.selectedRows.includes(f),onSelect:A=>s(f,A),class:i.normalizeClass(l.classCallback?l.classCallback(f):"")},null,8,["config","values","selected","onSelect","class"]),o.value&&l.activeRow===f?(i.openBlock(),i.createBlock(We,{key:0,component:o.value,"row-length":l.config.length,values:f,onClose:d[0]||(d[0]=A=>e("update:activeRow",null)),onSave:u,"is-new":!1},null,8,["component","row-length","values"])):i.createCommentVNode("",!0)],64))),128)),l.activeRow===i.unref(C).LIST_ACTIVE_NEW?(i.openBlock(),i.createBlock(We,{key:0,component:o.value,"row-length":i.unref(c).length,onClose:d[1]||(d[1]=f=>e("update:activeRow",null)),onSave:u,"is-new":!0},null,8,["component","row-length"])):i.createCommentVNode("",!0)])])]))}}),nn=i.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"widget-spinner",style:i.normalizeStyle({"border-left":`1.1em solid ${e.color}`})},null,4))}});const me=M(nn,[["__scopeId","data-v-0ef9ae88"]]),rn={class:"widget-button"},on=i.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("button",rn,[e.wait?(i.openBlock(),i.createBlock(me,{key:0,class:"widget-button-spinner"})):i.createCommentVNode("",!0),i.renderSlot(e.$slots,"default",{},void 0,!0)]))}});const sn=M(on,[["__scopeId","data-v-450dc564"]]),an={class:"widget-multi-button-wrap position_relative cursor_pointer"},cn={class:"widget-multi-button-body grid"},ln=["onClick"],un={class:"widget-multi-button-side-wrap"},dn=i.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(t){const e=t;i.useCssVars(u=>({"7025434e":r.value}));const n=i.reactive({active:!1,wait:!1}),r=i.computed(()=>e.array.length+(e.label?1:0));function o(u){if(!(typeof u!="function"||n.wait))return n.wait=!0,Promise.resolve().then(u).finally(()=>{n.wait=!1})}function s(u=!n.active){n.active=u}return(u,c)=>(i.openBlock(),i.createElementBlock("div",an,[i.createElementVNode("div",{class:i.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",n.active?"widget-multi-button_active":null])},[i.createElementVNode("div",cn,[u.label?(i.openBlock(),i.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:c[0]||(c[0]=l=>s())},i.toDisplayString(u.label),1)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.array,(l,d)=>(i.openBlock(),i.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:d,onClick:f=>{o(l.callback),s(!1)}},i.toDisplayString(l.label),9,ln))),128))]),i.createElementVNode("div",un,[i.createElementVNode("div",{class:i.normalizeClass(["grid-center widget-multi-button-side",n.active?"widget-multi-button-side_active":null]),onClick:c[1]||(c[1]=l=>s())},[n.wait?(i.openBlock(),i.createBlock(i.unref(me),{key:0,class:"widget-multi-button-side-spinner"})):u.array.length>1?(i.openBlock(),i.createBlock(i.unref(te),{key:1,class:"widget-multi-button-side-icon"},{default:i.withCtx(()=>[i.createTextVNode("angle-small-down")]),_:1})):i.createCommentVNode("",!0)],2)])],2)]))}});const fn=M(dn,[["__scopeId","data-v-a8d711d1"]]),pn={class:"widget-loader flex flex-align_center gap_10 padding_15"},hn={class:"text_md"},gn=i.defineComponent({__name:"widget-loader",props:{label:{}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",pn,[i.createVNode(me,{color:"var(--primary)",class:"padding_10"}),i.createElementVNode("span",hn,i.toDisplayString(e.label),1)]))}}),mn=["alt","src"],yn=i.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(t){const e=t,n=i.ref();return i.onMounted(()=>{n.value&&(n.value.src=e.src),n.value.onerror=function(){e.default&&(n.value.src=e.default)}}),(r,o)=>(i.openBlock(),i.createElementBlock("img",{alt:r.alt,ref_key:"refImage",ref:n,src:r.src||r.$props.default},null,8,mn))}}),En={props:{config:Array,values:Object,selected:Boolean},setup:st};const vn=M(En,[["__scopeId","data-v-344a8cc1"]]),wn=t=>(i.pushScopeId("data-v-bf495d6a"),t=t(),i.popScopeId(),t),Cn={class:"widget-list-head-cell"},_n=wn(()=>i.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Tn=i.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(t,{emit:e}){const n=t;return n.title&&console.warn(`For cell ${n.name} using title,it should be replaced with label.`),(r,o)=>(i.openBlock(),i.createElementBlock("th",null,[i.createElementVNode("div",Cn,[i.createElementVNode("div",{class:"head-cell-content flex_grow",style:i.normalizeStyle({"min-width":r.minWidth,"max-width":r.maxWidth,width:r.width})},[r.type==="multi-select"?(i.openBlock(),i.createBlock(i.unref(B.FormField),{key:0,type:"single-checkbox",onClick:o[0]||(o[0]=i.withModifiers(s=>e("select"),["stop","prevent"]))})):(i.openBlock(),i.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:o[1]||(o[1]=s=>e("order"))},i.toDisplayString(r.title||r.label),1))],4),r.name&&r.order.length&&r.order[0]===r.name?(i.openBlock(),i.createBlock(i.unref(te),{key:0,class:i.normalizeClass(["head-cell-order",{"head-cell-order_down":r.order.length>1&&r.order[1]==="desc"}])},{default:i.withCtx(()=>[i.createTextVNode("core-arrow-up")]),_:1},8,["class"])):i.createCommentVNode("",!0),_n])]))}});const Sn=M(Tn,[["__scopeId","data-v-bf495d6a"]]),An=i.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(t,{emit:e}){const n=t,r=i.ref(),o=i.ref();i.onMounted(()=>{function l(w,y){let E=-1;do E++,y-=w[E];while(y>0&&E<w.length);return E}function d(w,y){let E=0;for(;y>0&&y>w[E]&&E<w.length;)y-=w[E],E++;return console.log(y,E),E>0?E:0}function f(w){try{o.value.style.insetInlineStart=w+"px"}catch(y){console.log(y)}}function _(w){try{o.value.style.width=w+"px",o.value.style.minWidth=w+"px",o.value.style.maxWidth=w+"px"}catch(y){console.log(y)}}function A(w){return w===null?!1:w.classList.contains("head-cell-resize")}r.value.addEventListener("pointerdown",function(y){var Pe;function E(N){return N.screenX+p-k}const h=r.value,a=[...h.children].filter(N=>N.localName==="th"),p=((Pe=h.offsetParent)==null?void 0:Pe.scrollLeft)||0,g=a.map(N=>N.clientWidth),b=A(y.target),k=h.getBoundingClientRect().left,G=E(y),T=l(g,G),F=g.slice(0,T).reduce((N,P)=>N+P,0),K=G-F,Ee=h.offsetWidth,H=a[T].clientWidth;if(n.config[T].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",y.screenX),console.log("Widths",g),console.log("max width",Ee),console.log("Start Position",G),console.log("Position From",T),console.log("Start Position",T),console.log("Global offset (Отступ самой таблицы от края экрана)",k),console.log("Del",K),console.groupEnd(),o.value.innerText=a[T].textContent||"",o.value.style.display="grid",o.value.style.width=H+"px",o.value.style.cursor="grabbing",f(F),_(H),document.addEventListener("pointermove",$e,{passive:!0}),document.addEventListener("pointerup",Le);function Le(N){if(console.group("END"),document.removeEventListener("pointermove",$e),document.removeEventListener("pointerup",Le),b&&(n.config[T].width=o.value.style.width,n.config[T].minWidth=o.value.style.width,n.config[T].maxWidth=o.value.style.width,s(n.config)),!b){const P=N.screenX+p-k;console.log("ENP Position",P);const oe=d(g,P);if(console.log(T,"->",oe),oe!==T){const X=n.config[T],ve=n.config;ve.splice(T,1),ve.splice(oe,0,X),s(ve)}else{const X=n.config[T].name;u(X)}}o.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function $e(N){if(b){const X=E(N)-G+H;_(X);return}let P=N.screenX+p-k-K;P<0&&(P=0),P+H>Ee&&(P=Ee-H),f(P)}})});function s(l){e("update:config",l)}function u(l){if(!l)return;if(Array.isArray(l)){if(l.length<1)return;l=l[0]}if(n.order.length===0||n.order[0]!==l)return void c([l]);const d=n.order.length===1||n.order[1]==="asc"?"asc":"desc";c([l,d==="asc"?"desc":"asc"])}function c(l){e("update:order",l)}return(l,d)=>(i.openBlock(),i.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:r},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.config,(f,_)=>(i.openBlock(),i.createBlock(Sn,i.mergeProps({key:f},f,{onOrder:A=>u(f.name),onSelect:d[0]||(d[0]=A=>e("select")),order:l.order}),null,16,["onOrder","order"]))),128)),i.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:o},"test",512)],512))}});const bn=M(An,[["__scopeId","data-v-ccffc6bd"]]),kn={class:"widget-list"},Nn={class:"widget-list-body position_relative"},In=50,On=i.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(t,{emit:e}){const n=t;function r(c,l=!0){if(n.selectedRows)if(!l)s(n.selectedRows.includes(c)?[]:[c]);else{const d=[...n.selectedRows],f=d.indexOf(c);f===-1?d.push(c):d==null||d.splice(f,1),s(d)}}function o(){var c;if(((c=n.selectedRows)==null?void 0:c.length)!==n.array.length)return s([...n.array]);s([])}function s(c){e("update:selectedRows",c)}function u(c){if(!c)return;const l=c.target;l.scrollTop+l.clientHeight+In>l.scrollHeight&&e("scrollEnd")}return(c,l)=>(i.openBlock(),i.createElementBlock("div",{class:"es-list-container",onScrollPassive:u},[i.createElementVNode("table",kn,[i.createElementVNode("thead",null,[i.createVNode(bn,{onSelect:l[0]||(l[0]=d=>o()),"onUpdate:order":l[1]||(l[1]=d=>e("update:order",d)),"onUpdate:config":l[2]||(l[2]=d=>e("update:config",d)),config:c.config,order:c.order},null,8,["config","order"])]),i.createElementVNode("tbody",Nn,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c.array,(d,f)=>{var _;return i.openBlock(),i.createBlock(vn,{key:f,class:"widget-list-row",values:d,config:c.config,selected:(_=c.selectedRows)==null?void 0:_.includes(d),onSelect:A=>r(d,A)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}}),D={};function Rn(t){for(let e in t)D[e]=t[e];console.log("The config has been initialized. To get access check %c_config in console.","background: purple; color: white")}function Ln(t){function e(...r){return n.wait?Promise.reject("The process has already started."):(n.wait=!0,Promise.resolve().then(()=>t(...r)).finally(()=>{n.wait=!1}))}const n=i.reactive({wait:!1,call:e});return n}function fe(t){return typeof t=="string"?_e(t):$n(t)?_e(t.message):_e(C.DEFAULT_ERROR_MESSAGE)}function $n(t){return!!(typeof t=="object"&&t!==null&&Object.hasOwnProperty.call(t,"message"))}function _e(t,e=[]){return{message:t,children:e}}function L(t="error"){return function(e){const{message:n,children:r}=fe(e);ne.add(t,n,{children:r})}}function pe(t,e={}){return S().emit("entity:read",{...e,entity:t})}function Oe(t,e){return S().emit("entity:update",{...e,entity:t})}function Pn(t){return t.reduce((e,n)=>(n.name&&(typeof n.name=="string"?e.push(n.name):e.push(...n.name)),e),[])}function at(t,e=2){if(!(typeof t=="string"||typeof t=="number"))return"";let r=String(t).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(e,"0"),r[1].length>e&&(r[1]=r[1].substring(0,e)),r.join(".")}function Re(t){return Object.keys(t).reduce((e,n)=>{let r=t[n];const o=n.charAt(0).toUpperCase()+n.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=Re(r)),e[o]=r,e},{})}function Dn(t,e){const n=new Map;return t.forEach(r=>{var s;const o=e(r);n.has(o)||n.set(o,[]),(s=n.get(o))==null||s.push(r)}),n}function xn(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}function Bn(t){return t.text().then(e=>{try{return JSON.parse(e)}catch{return C.DEFAULT_ERROR_MESSAGE}})}function R(t,e={}){return O.isFront&&(e.headers||(e.headers={}),e.headers["Context-Id"]=O.contextId),e.redirect="manual",fetch(t,e).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw new Error(C.DEFAULT_ERROR_MESSAGE)}).then(n=>Bn(n).then(r=>{if(!n.ok)throw r;return r}))}function Vn(t,e=1e3){let n=0;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(...r),e)}}function Mn(t,e){let n=!1;return(...r)=>{if(!n)return n=!0,setTimeout(()=>n=!1,e),t(...r)}}const Fn=Te(Ne("pretty-value-field-by-entity"));function Un(t,e,n){try{const r=he.get(t);if(!r)throw new Error("For entity metadata is not loaded");const o=r.fieldsByName[e];if(!o)throw new Error(`For entity ${t} can't found fieldMetadata for field ${e}`);return o.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(r){return Fn('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',r,t,e,n),n}}const jn=1,qn=5e3,U=Te(Ne("use-socket"));function S(){return Gn}function Wn(t){return typeof t=="object"&&Object.prototype.toString.call(t)==="[object Blob]"}const Gn=function(){let t=1,e,n;const r=new Set;let o=0;const s=new Set;function u(){if(e)o&&(clearTimeout(o),o=0);else return;o=setTimeout(()=>{e.close()},qn*2);const a=new Uint8Array(1);a[0]=jn,e.send(a)}setInterval(()=>{Array.from(r).forEach(a=>{h(a)&&(U("Handler for event %s requestId %d was expired",a.event,a.requestId),a.requestId?l({requestId:a.requestId,event:"request-error",data:{message:q.RequestTookToLong().message}}):r.delete(a))})},1e3),setInterval(()=>{(!e||e.readyState===3)&&d()},C.DELAY_SOCKET_RECONNECT);function c(){return{safeQueue:s,requestId:t,handlers:r,socketInstance:e}}function l(a){const p=[...r.values()];U("Handlers array length is %d. Response event: %s. Request id: %d",r.size,a.event,a.requestId),p.forEach(g=>{const b=a.requestId;(g.requestId&&g.requestId===b||!g.requestId&&g.event===a.event)&&(U("Find appropriated handler: %d, event: %s",t,g.event),g.callback(a.data,a),g.once&&(r.delete(g),U("Handler was removed by *once* params was passed. %o",g)))})}function d(){if(typeof n!="string"){console.log("Please initialize use-socket");return}console.log(`%cInitializing sockets: %c${n}`,"color: purple","color: black"),e=new WebSocket(n),e.onclose=function(a){U("Connection to server was stopped: %d %s",a.code,a.reason),Array.from(r).forEach(p=>{p.guaranteedAnswer&&p.serializeString&&s.add(p.serializeString)})},e.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...s.values()].forEach(a=>{f(a),s.delete(a)})},e.onerror=function(a){console.warn(a)},e.onmessage=a=>{var p;try{if(Wn(a.data)){u();return}const g=JSON.parse(a.data);if(!ct(g)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(g);return}(p=g==null?void 0:g.data)!=null&&p.refresh&&location.reload(),l(g)}catch(g){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(g)}}}function f(a){e.send(a)}function _(a,p){E({event:a,callback:p})}function A(a,p){E({event:a,callback:p,once:!0})}function w(){return e&&(e==null?void 0:e.readyState)===1}function y(a,p,g){const b=++t,k=JSON.stringify({requestId:b,event:a,data:p,contextId:O.contextId,url:window.location.href});return w()?f(k):(s.add(k),U("Socket is not connected. Message was send to save-queue")),new Promise((G,T)=>{E({event:a,requestId:b,once:!0,guaranteedAnswer:!0,serializeString:k,callback:(F,K)=>{if(U("Promise was resolve with next data:",F),zn(K))return void T(F);g&&g(F,K),G(F)},timeToLive:C.TIME_TO_LIVE_SOCKET_REQUEST})})}function E(a){const p={timeToLive:0,...a,created:new Date().getTime()};r.add(p)}function h(a){return a.timeToLive===0||typeof a.timeToLive!="number"?!1:new Date().getTime()-a.created>a.timeToLive}return{get socket(){return e},on:_,once:A,emit:y,initialization(a){n=a},getDevInfo:c}}(),zn=t=>!!ct(t)&&t.event==="request-error",ct=t=>typeof t=="object"&&t!==null&&"event"in t&&typeof t.event=="string"&&"requestId"in t&&typeof t.requestId=="number"&&"data"in t;function Jn(t,e){return S().emit("list-setting:read",{entity:t,mark:e})}function Yn(t,e){return S().emit("metadata-field:treat",{entity:t,fieldName:e})}function lt(t,e){return S().emit("entity:create",{...e,entity:t})}function ut(t,e){return S().emit("entity:delete",{...e,entity:t})}function Kn(t,e){return S().emit("usage-context:read",{...e,entity:t})}function dt(t={}){return S().emit("tool:read",t)}function Hn(t,e={},n={}){const r=i.inject(C.PROVIDE_NAME_ACTIONS,null),o=typeof t=="string"?t:e,s=typeof e=="string"?n:e;return i.computed(()=>{var l;const c=((typeof t=="string"?(l=r==null?void 0:r.actions)==null?void 0:l.value:i.unref(t))||[]).find(d=>d.name===o);return c?{...c,...s}:null})}function Xn(t){return S().emit("history:read",t)}function Qn(){const t=i.ref(null);function e(n){t.value=n}return{activeRow:t,activateRow:e}}function Zn(t,e,n={}){const r=i.reactive([]);let o=0;const s=i.ref(!1);function u(){if(s.value)return Promise.reject("The process has already started.");const h=y();return s.value=!0,typeof h.limit!="number"&&(h.limit=100),h.offset=o,(n.request||pe)(t,h).then(p=>(o+=p.length,p)).finally(()=>{s.value=!1})}function c(h,a){var g;return typeof h.Version=="number"?h.Version:(g=r.find(b=>b.Id===a))==null?void 0:g.Version}function l(h,a){const p=r.findIndex(g=>g.Id===h);if(p===-1)throw new Error(`Can't found item with Id ${h}`);r.splice(p,1,a)}function d(h){const a=r.findIndex(p=>p.Id===h);if(a===-1)throw new Error(`Can't found item with Id ${h}`);r.splice(a,1)}async function f(h,a){try{const p=y(),g=c(a,h);delete a.Version,await Oe(t,{id:h,values:a,version:g});const b=await pe(t,{fields:p.fields||"",id:h});l(h,b)}catch(p){L()(p)}}async function _(h,a){try{const p=y(),g=c(a,h);delete a.Version,await ut(t,{id:h,version:g}),d(h)}catch(p){L()(p)}}async function A(h){try{await lt(t,{values:h}),await E()}catch(a){L()(a)}}async function w(){try{const h=await u();r.push(...h)}catch(h){L()(h)}}function y(){return typeof e=="function"?e():e}async function E(){try{o=0;const h=await u();r.splice(0,r.length,...h)}catch(h){L()(h)}}return{array:r,updateById:f,next:w,reload:E,wait:s,create:A,deleteById:_}}function er(){function t(){return{organizations:O.organizations,currentContextId:O.contextId,person:O.person,context:O.context,contextType:O.contextType,userId:O.userId}}const e=i.reactive(t());return O.onupdateContext(()=>{Object.assign(e,t())}),e}function tr(t,e,n){return S().emit("communication:create",{entityName:t,entityCatalogId:e,targetCode:n})}function nr(t,e,n){return S().emit("communication:read",{entityName:t,entityCatalogId:e,targetCode:n})}function rr(t,e){return S().emit("communication-message:create",{communicationId:t,text:e})}function or(t){return S().emit("communication-message:read",{communicationId:t})}function ir(t){const e=B.Form.getParentForm(),n=i.reactive([]);return e&&e.subscribe(t),t.read=()=>or(t.id).then(r=>(n.splice(0,n.length,...r),r)),{array:n}}function sr(t,e){t.read=()=>{const r=n();return Promise.resolve().then(()=>{if(!t.name)throw q.EntityWithoutName(t);return pe(t.name,r)}).then(Re).then(o=>(o.hasOwnProperty("Version")&&(t.version=o.Version),t.setValues(o),o)).catch(L())},t.save=()=>{const r=n();return Promise.resolve().then(()=>{if(!t.name)throw q.EntityWithoutName(t);return Oe(t.name,{id:r.id,values:t.changes,version:t.version})}).then(o=>{t.version=o.version}).catch(o=>{throw L()(o),o})};function n(){return typeof e=="function"?e():e}}function ar(t){if(!t)return i.inject(C.PROVIDE_NAME_METADATA);he.initEntity(t);const e=i.computed(()=>he.state[t]);return i.provide(C.PROVIDE_NAME_METADATA,e),e}function cr(t,e={}){if(!t)return i.inject(C.PROVIDE_NAME_USAGE_CONTEXT);const n=i.ref(null);return i.provide(C.PROVIDE_NAME_USAGE_CONTEXT,n),{state:n,update:async function(){n.value=await Kn(t,lr(e||{}))}}}function lr(t){return typeof t=="function"?t():t}function ur(t){if(!t)return i.inject(C.PROVIDE_NAME_ACTIONS);const e=i.reactive([]),n=i.computed(()=>e.map(s=>dr(t,s))),r={actions:n,update:o};i.provide(C.PROVIDE_NAME_ACTIONS,r),t.router=ze.useRouter(),t.handleConfirmation||(t.handleConfirmation=pr),t.handleAffectedEntity||(t.handleAffectedEntity=gr),t.handleCloseForm||(t.handleCloseForm=mr),t.handleValidationResult||(t.handleValidationResult=hr);function o(s={}){return e.splice(0,e.length),dt(s).then(u=>e.splice(0,0,...u)).catch(L("error"))}return{actions:n,update:o}}function dr(t,e){return{...e,label:e.title,callback(){const n=typeof t.values=="function"?t.values(e,t):t.values,r=()=>R(e.url,{method:"POST",body:JSON.stringify({keys:n,contextId:O.contextId}),headers:{"Content-Type":"application/json"}}).then(async o=>{var s,u;if(!yr(o))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(t.handlers))for await(const c of t.handlers)await c(e,o,t);if(!o.success)throw t.handleValidationResult&&o.validationEffect&&((u=(s=o.validationEffect)==null?void 0:s.results)!=null&&u.length)&&t.handleValidationResult(e,o.validationEffect,t),new Error(o.message);return o.message&&ne.add("info",o.message),Array.isArray(o.affectedEntities)&&t.handleAffectedEntity&&o.affectedEntities.forEach(c=>{var l;return(l=t.handleAffectedEntity)==null?void 0:l.call(t,e,c,t)}),e.closeHostForm&&t.handleCloseForm&&t.handleCloseForm(e,t),o}).catch(L("error"));return e.requireSave&&t.form&&t.form.changed?t.form.save().then(r):!e.confirmation||!t.handleConfirmation?r():t.handleConfirmation(e,r)}}}function fr(t){const e="Are you sure?";return t===!0||typeof t=="string"&&t.toLowerCase()==="true"||t==="1"?e:typeof t=="string"?t:e}async function pr(t,e){const n=fr(t.confirmation);if(!de.getComponentFromStore(C.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await de.promptModal(C.MODAL_CONFIRM,{message:n}))return e()}function hr(t,e){const n=C.MODAL_VALIDATION_EFFECT;if(!de.getComponentFromStore(n))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{de.pushModal(n,e)})}function gr(t,e,n){var u;const{router:r,form:o}=n,s=(u=e.primaryKey)==null?void 0:u.Id;if(r&&e&&e.name===t.redirectEntity)return r.push({name:e.name,params:{id:s}});o&&e.name===o.name&&e.updated&&s===o.id&&o.read()}function mr(t,e){const{router:n}=e;n&&t.closeHostForm&&n.back()}function yr(t){return!!(t&&typeof t=="object"&&"affectedEntities"in t&&"success"in t)}function Er(t){function e(n){n.key==="Enter"&&t()}i.onMounted(()=>{document.addEventListener("keypress",e)}),i.onUnmounted(()=>{document.removeEventListener("keypress",e)})}function vr(t){const e=i.reactive([]),n=c=>{const l=i.unref(t);if(c===void 0){e.length===0?l.forEach(o):l.forEach(s);return}r(c)?s(c):o(c)},r=c=>e.includes(c),o=c=>{r(c)||e.push(c)},s=c=>{const l=e.findIndex(d=>d===c);l!==-1&&e.splice(l,1)},u=i.computed(()=>{const c=i.unref(t);return e.length===c.length&&c.length!==0});return[e,n,u,o,s]}function wr(t){const e=i.ref(""),n=i.computed(()=>{const r=e.value.toLowerCase();return i.unref(t).filter(o=>e.value.length?Object.values(o).join().toLowerCase().includes(r):!0)});return{search:e,searchArray:n}}const ne=new class{constructor(){this.store=i.reactive([])}add(e,n,r={}){const o=Cr(r),s=new _r(e,n,o.timeout,o.children,o.click);return this.store.push(s),o.timeout&&setTimeout(this.remove.bind(this,s.id),o.timeout*1e3),s}remove(e){const n=this.store.findIndex(r=>r.id===e);if(n===-1)return!1;this.store.splice(n,1)}};function Cr(t){function e(r){return!!r&&typeof r=="object"}const n={timeout:10,click:()=>null,children:[]};return e(t)?{timeout:t.timeout||n.timeout,click:t.click||n.click,children:t.children||n.children}:n}const ft=class pt{constructor(e,n,r,o,s){this.type=e,this.message=n,this.timeout=r,this.children=o,this.click=s,this.id=pt.cardId++}};ft.cardId=1;let _r=ft;class Tr extends V{constructor(e){super(),this.name="Communication",this.read=()=>{},this.id=e}sendMessage(e){return rr(this.id,e)}static checkAndGenerate(e,n,r){return nr(e,n,r).then(o=>o.length===0?tr(e,n,r):o[0])}}function Sr(){return S().emit("client:read",{})}var ht=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ar=(t,e,n)=>(ht(t,e,"read from private field"),n?n.call(t):e.get(t)),br=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},kr=(t,e,n,r)=>(ht(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ue;const ye=class z extends V{constructor(){super(...arguments),this.type="front",this.organizations=[],br(this,ue,!1)}set language(e){localStorage.setItem(C.LOCALSTORAGE_LANGUAGE_KEY,e)}get language(){return localStorage.getItem(C.LOCALSTORAGE_LANGUAGE_KEY)||z.DEFAULT_LANGUAGE}get contextType(){var e;if(this.contextId)return((e=this.person)==null?void 0:e.id)===this.contextId?"person":"organization"}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(e){kr(this,ue,e),this.emit(z.EVENT_READY_UPDATE,e)}get ready(){return Ar(this,ue)}onReady(e){return this.on(z.EVENT_READY_UPDATE,e)}onupdateContext(e){return this.on(z.EVENT_CONTEXT_UPDATE,e)}setCurrentContext(e){if(this.contextId===e)return console.warn("[application-manager] The current context has already been installed.");this.contextId=Number(e),localStorage.setItem(C.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(e)),this.emit(z.EVENT_CONTEXT_UPDATE,e),console.log(`Current context id %c${e}`,"color: purple")}get context(){var e;return this.contextId?this.contextId===((e=this.person)==null?void 0:e.id)?this.person:this.organizations.find(n=>n.id===this.contextId)||null:null}async init(){try{const e=await this.loadCustomerData();this.person=e,this.organizations=e.organizations,this.userId=e.userId,this.restoreCurrentContext(),this.ready=!0}catch(e){L()(e)}}restoreCurrentContext(){const e=Number.parseInt(localStorage.getItem(C.LOCALSTORAGE_CURRENT_CONTEXT_KEY)||"");if(!Number.isNaN(e)&&this.validateContextId(Number(e)))this.setCurrentContext(e);else{if(!this.person)return console.warn("Make sure you call ID recovery after saving user data");this.setCurrentContext(this.person.id)}}loadCustomerData(){return Sr()}validateContextId(e){var n;try{return((n=this.person)==null?void 0:n.id)==e?!0:!!this.organizations.find(r=>r.id===e)}catch{return!1}}};ue=new WeakMap;ye.DEFAULT_LANGUAGE="en";ye.EVENT_CONTEXT_UPDATE="event:context-update";ye.EVENT_READY_UPDATE="event:ready-update";let Nr=ye;function Ir(t){return S().emit("metadata:read",{entity:t})}const he=function(){const e=i.reactive({}),n=new Map;function r(c){return e[c]}async function o(c){if(n.has(c)&&await n.get(c),e[c])return;const l=await s(c);u(c,l)}function s(c){const l=Ir(c).finally(()=>{n.delete(c)});return n.set(c,l),l}function u(c,l){e[c]=l}return{state:e,initEntity:o,get:r}}();class x{static login(e){return R(D.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...e,AppName:D.applicationName})})}static parseProcessAnswer(e){if(e.statusCode>4)throw new Error(e.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return e}static startRegistrationProcess(e){return x.requestStepRegistrationProcess("StartRegistration",e)}static confirmPhoneRegistrationProcess(e){return x.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",e)}static confirmEmailRegistrationProcess(e){return x.requestStepRegistrationProcess("ConfirmEmailByRegistration",e)}static finishEmailRegistrationProcess(e){return x.requestStepRegistrationProcess("FinishRegistration",e)}static requestStepRegistrationProcess(e,n){return R(`${D.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)})}static startLoginProcess(e){return x.requestStepLoginProcess("StartLogin",e)}static loginWithPassword(e){return x.requestStepLoginProcess("LoginWithPassword",e)}static loginWithOtpCode(e){return x.requestStepLoginProcess("LoginWithOtpCode",e)}static requestStepLoginProcess(e,n){return R(`${D.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).then(x.parseLoginProcessAnswer)}static parseLoginProcessAnswer(e){if(e.statusCode>3)throw Error(e.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return e}static startPasswordReset(e,n){return R(`${D.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:n,AppName:e})})}static confirmPhoneNumberByAccessRecovery(e,n,r,o){return R(`${D.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:e,Token:n,Prefix:r,Code:o})})}static confirmEmailByAccessRecovery(e,n,r,o){return R(`${D.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:e,Token:n,Prefix:r,Code:o})})}static finishAccessRecovery(e,n,r){return R(`${D.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:e,Token:n,Password:r,ConfirmedPassword:r})})}}class Or{static readHistoryById(e,n){return R(`/close-api/audits/history/${e}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Rr{static readLicences(e){const n=`/close-api/proxy/Dashboard/Licenses?organizationId=${e.toString()}`;return R(n).then(r=>{const o={};return r.byOrganization.licenses.forEach(s=>{const u=s.licenseTypeCode;o[u]||(o[u]={licenseTypeCode:u}),o[u][s.statisticName]=s.value}),Object.values(o)})}}function Lr(t){return typeof t!="object"||t===null?!1:!!(t.hasOwnProperty("start")||t.hasOwnProperty("end"))}function $(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];if(Array.isArray(r)){const o=r.map(s=>typeof s=="string"?`'${s}'`:s).join(", ");return r.length&&e.push(`@${n} in (${o})`),e}if(Lr(r)){let o=function(s){var u;return((u=s.match(/([^Z]*)/))==null?void 0:u[0])+"0000Z"};return r.start&&e.push(`@${n} ge ${o(r.start)}`),r.end&&e.push(`@${n} le ${o(r.end)}`),e}return typeof r=="number"?(e.push(`@${n} eq ${r}`),e):typeof r=="string"?(r.length!==0&&e.push(`@${n} eq '${r}'`),e):(r===null&&e.push($.is(n,r)),e)},[]).join(" and ")}function re(t){return typeof t=="string"?`'${t}'`:`${t}`}$.includes=function(e,n){return`@${e} Contains ${re(n)}`};$.beginWith=function(e,n){return`@${e} BeginWith ${re(n)}`};$.notEq=function(e,n){return`@${e} nq ${re(n)}`};$.eq=function(e,n){return Array.isArray(n)?$.in(e,n):`@${e} eq ${re(n)}`};$.in=function(e,n){const r=n.map(re).join(", ");return`@${e} in (${r})`};$.and=function(...e){return e.filter(n=>typeof n!="string"||n.trim().length===0?!1:n).map(n=>`(${n})`).join(" and ")};$.is=function(e,n){return`@${e} is ${n}`};$.or=function(...e){return e.join(" or ")};const O=new Nr,$r={staticLink:Pt},Pr={utils:At};exports.Communication=Tr;exports.CoreError=q;exports.Filter=$;exports.Manager=O;exports.MetadataStore=he;exports.NotificationSystem=ne;exports.WidgetButton=sn;exports.WidgetIcon=te;exports.WidgetImage=yn;exports.WidgetList=On;exports.WidgetLoader=gn;exports.WidgetMultiButton=fn;exports.WidgetSpinner=me;exports.WidgetTable=tn;exports.asyncProcess=Ln;exports.authService=x;exports.billingService=J;exports.catchUniversal=L;exports.clientService=He;exports.communicationService=Ot;exports.config=Rn;exports.configuration=D;exports.constants=C;exports.dashboardService=Rr;exports.dataService=ee;exports.debounce=Vn;exports.default=Pr;exports.documentsService=Dt;exports.equipmentService=jt;exports.fileService=Rt;exports.getCellName=rt;exports.getCellValue=ke;exports.getNamesFromListConfig=Pn;exports.getUnitValue=it;exports.groupArrayByField=Dn;exports.historyService=Or;exports.injectAction=Hn;exports.internationalizationService=bt;exports.invitationService=Lt;exports.openService=$t;exports.parseError=fe;exports.prettyDate=Ie;exports.prettyDateWithTime=ot;exports.prettyMoney=at;exports.prettyValueFieldByEntity=Un;exports.processWizardService=le;exports.request=R;exports.ruleValidationService=be;exports.t=Y;exports.throttle=Mn;exports.universalEntityCreate=lt;exports.universalEntityDelete=ut;exports.universalEntityRead=pe;exports.universalEntityUpdate=Oe;exports.universalHistoryRead=Xn;exports.universalListSettingRead=Jn;exports.universalMetadataFieldTreat=Yn;exports.universalToolRead=dt;exports.useActions=ur;exports.useCommunication=ir;exports.useEnter=Er;exports.useFormEntity=sr;exports.useListActiveRow=Qn;exports.useListEntity=Zn;exports.useListSearch=wr;exports.useListSelect=vr;exports.useManagerState=er;exports.useMetadata=ar;exports.useSocket=S;exports.useUsageContext=cr;exports.useWizard=Mt;exports.utils=$r;exports.uuidv4=xn;exports.valuesToUpperCase=Re;
|
|
11
11
|
//# sourceMappingURL=eservices-core.cjs.js.map
|