eservices-core 1.3.11 → 1.3.12
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.
- package/dist/eservices-core.cjs.js +5 -5
- package/dist/eservices-core.es.js +1706 -3181
- package/dist/eservices-core.umd.js +6 -6
- package/dist/frontend/core/index.d.ts +9 -216
- package/dist/frontend/core/utils/index.d.ts +1 -3
- package/dist/frontend/src/index.d.ts +7 -4
- package/dist/frontend/src/methods/get-names-from-list-config.d.ts +3 -0
- package/dist/frontend/src/types/list-type.d.ts +1 -0
- package/dist/frontend/{core → src}/widgets/image/widget-image.vue.d.ts +2 -2
- package/dist/frontend/src/widgets/list/list-head/widget-list-head.vue.d.ts +29 -0
- package/dist/frontend/src/widgets/list/widget-list.vue.d.ts +53 -0
- package/package.json +1 -1
- package/dist/frontend/core/classes/new/get-table-row.d.ts +0 -14
- package/dist/frontend/core/mixins/index.d.ts +0 -4
- package/dist/frontend/core/utils/requestHandler.d.ts +0 -7
- package/dist/frontend/core/widgets/breadcrumbs/widget-breadcrumb-item.vue.d.ts +0 -28
- package/dist/frontend/core/widgets/breadcrumbs/widget-breadcrumbs.vue.d.ts +0 -13
- package/dist/frontend/core/widgets/buttons/WidgetButton.vue.d.ts +0 -35
- package/dist/frontend/core/widgets/buttons/index.d.ts +0 -155
- package/dist/frontend/core/widgets/buttons/multi-button/WidgetMultiButton.vue.d.ts +0 -18
- package/dist/frontend/core/widgets/cards/widget-card.vue.d.ts +0 -23
- package/dist/frontend/core/widgets/containers/index.d.ts +0 -5
- package/dist/frontend/core/widgets/errorSystem/default/WidgetError.vue.d.ts +0 -24
- package/dist/frontend/core/widgets/errorSystem/default/WidgetErrorGroup.vue.d.ts +0 -18
- package/dist/frontend/core/widgets/errorSystem/default/WidgetNotificationSystem.vue.d.ts +0 -2
- package/dist/frontend/core/widgets/errorSystem/index.d.ts +0 -4
- package/dist/frontend/core/widgets/forms/index.d.ts +0 -6
- package/dist/frontend/core/widgets/forms/naomi/WidgetForm.vue.d.ts +0 -53
- package/dist/frontend/core/widgets/forms/naomi/WidgetFormInfo.vue.d.ts +0 -26
- package/dist/frontend/core/widgets/icons/index.d.ts +0 -4
- package/dist/frontend/core/widgets/index.d.ts +0 -186
- package/dist/frontend/core/widgets/inputs/default-style/index.d.ts +0 -7
- package/dist/frontend/core/widgets/inputs/index.d.ts +0 -15
- package/dist/frontend/core/widgets/inputs/line-style/index.d.ts +0 -4
- package/dist/frontend/core/widgets/inputs/naomi-style/index.d.ts +0 -4
- package/dist/frontend/core/widgets/inputs/widget-input-check.vue.d.ts +0 -16
- package/dist/frontend/core/widgets/list/list-head/widget-list-head.vue.d.ts +0 -29
- package/dist/frontend/core/widgets/list/widget-list.vue.d.ts +0 -60
- package/dist/frontend/core/widgets/modals/modal-validation/modal-validation-item.vue.d.ts +0 -44
- package/dist/frontend/core/widgets/modals/modal-validation/modal-validation.vue.d.ts +0 -12
- package/dist/frontend/core/widgets/modals/modal-wrap.vue.d.ts +0 -19
- package/dist/frontend/core/widgets/section/widget-section.vue.d.ts +0 -17
- package/dist/frontend/core/widgets/spinner/widget-spinner.vue.d.ts +0 -10
- package/dist/frontend/core/widgets/spinner/widget-wait.vue.d.ts +0 -12
- /package/dist/frontend/{core → src}/widgets/list/list-head/widget-list-head-cell.vue.d.ts +0 -0
- /package/dist/frontend/{core → src}/widgets/list/widget-list-row.vue.d.ts +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('[dir=rtl] .icon[data-v-0d979509]{transform:scaleX(-1)}.input-text-container[data-v-65e2ee2d]{position:relative;height:var(--input-height);width:100%;background-color:var(--input-background-color);border:var(--input-border);border-radius:var(--input-border-radius)}.input-text-container[data-v-65e2ee2d]:focus-within{outline:var(--input-border-active)}.input-text__error[data-v-65e2ee2d]{position:absolute;margin:0;top:100%}.input-text[data-v-65e2ee2d]{width:100%;height:100%;padding:0 10px;background-color:transparent;border:0;color:var(--input-color);font-size:var(--input-font-size);outline:none}.input-text[data-v-65e2ee2d]::placeholder{color:var(--input-placeholder-color)}.input-text-container[disabled=true][data-v-65e2ee2d]{background-color:var(--input-background-color-disabled);border:var(--input-border-disabled)}.input-text-container[error=true][data-v-65e2ee2d]{border:var(--input-border-error)}.input-text__password[data-v-65e2ee2d]{padding:0 6px;display:flex;align-items:center}.input-title[data-v-65e2ee2d]{font-size:12px;line-height:16px;color:#667085;margin:4px 0}.input-title_required[data-v-65e2ee2d],.input-text__error[data-v-65e2ee2d]{color:red}.input__toggle[data-v-56d58611]{position:relative;width:40px;height:20px;background-color:var(--input-toggle-background-color);border-radius:var(--input-toggle-border-radius);cursor:pointer;transition:var(--fast);border:var(--input-toggle-border)}.input__toggle[data-v-56d58611]:before{content:"";position:absolute;top:0;bottom:0;margin:auto;left:3px;height:14px;width:14px;border-radius:var(--input-toggle-round-radius);background-color:var(--input-toggle-round-background-color);transition:var(--transition-fast)}.input__toggle.active[data-v-56d58611]{background-color:var(--input-toggle-background-color-active)}.input__toggle.active[data-v-56d58611]:before{transform:translate(20px)}.input__toggle.disabled[data-v-56d58611]{background-color:var(--input-disabled-background-color);border:var(--input-disabled-border)}.input__toggle.disabled[data-v-56d58611]:before{background-color:var(--gray-1)}.input__toggle.disabled[data-v-56d58611]{cursor:auto}.item-wrap[data-v-69ab8592]{display:flex;align-items:center}.input-select__item[data-v-69ab8592]{margin:0;text-overflow:ellipsis;overflow:hidden;color:var(--text-black);transition:var(--fast);font-size:14px;line-height:19px;font-weight:400}.input-select__item.active[data-v-69ab8592]{background-color:var(--main);color:var(--text-white)}.input-select-container[data-v-c4acd469]{position:relative;width:100%;outline:none}.input-select-container.disabled>.input-select-container__current[data-v-c4acd469]{background-color:var(--input-background-color-disabled)}.input-select-container__list[data-v-c4acd469]{display:none;position:absolute;top:calc(100% - 5px);z-index:100;padding-top:4px;border:1px solid var(--gray-1);border-top:0;max-height:250px;width:100%;overflow:auto}.input-select-container.active .input-select-container__list[data-v-c4acd469]{display:block}.input-select-container.active>.input-select-container__current>img[data-v-c4acd469]{transform:rotate(-180deg)}.input-select-container__current[data-v-c4acd469]{display:flex;justify-content:space-between;align-items:center;padding:0 10px 0 0;border:var(--input-border);width:100%;border-radius:var(--input-border-radius);cursor:pointer;background-color:var(--input-background-color)}.current-placeholder[data-v-c4acd469]{padding:0 10px;color:var(--input-placeholder-color)}.input-select__ico-toggle[data-v-c4acd469]{fill:var(--main)}.input-select-container.error>.input-select-container__current[data-v-c4acd469]{border:1px solid var(--error)}.input-select-container.active>.input-select-container__current[data-v-c4acd469]{outline:var(--input-border-active)}.input-select-value[data-v-c4acd469]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0 16px;color:var(--input-color)}.container-input-file[data-v-bdbf1475]{height:var(--input-height);border:var(--input-border);background-color:var(--input-background-color);border-radius:var(--input-border-radius);padding:5px;display:flex;align-items:center;position:relative}.icon__file-upload[data-v-bdbf1475]{font-size:12px;color:var(--input-color)}.input-file[data-v-bdbf1475]{position:absolute;left:0;top:0;z-index:500;width:100%;height:100%;opacity:0;cursor:pointer}.input-file[data-v-bdbf1475]::-webkit-file-upload-button{visibility:hidden}.process-info[data-v-bdbf1475]{margin:4px 0}.widget-input__container[data-v-1e3f1057]{position:relative;outline:none}.widget-input__underline[data-v-1e3f1057]{height:2px;background-color:var(--input-line-color)}.widget-input__placeholder[data-v-1e3f1057]{margin:2px 0 0;color:var(--input-line-placeholder-color);font-size:var(--input-line-placeholder-font-size);line-height:var(--input-line-placeholder-line-height);-webkit-user-select:none;user-select:none}.widget-input__placeholder_error[data-v-1e3f1057]{color:var(--error)}.input-container__content[data-v-1e3f1057]{width:100%;display:flex}.input-text[data-v-212b50e2]{height:31px;width:100%;border:unset;outline:unset;background-color:transparent;color:var(--input-line-color);font-size:var(--input-line-font-size)}.input-text__password[data-v-212b50e2]{padding:0 6px;display:flex;align-items:center}.input-title[data-v-9c3e5ea6]{font-size:12px;line-height:16px;color:#667085;margin:4px 0}.input-text-container[data-v-9c3e5ea6]{position:relative;height:32px;width:100%;background-color:var(--input-background-color);border:var(--input-border);border-radius:var(--input-border-radius)}.input-text-container[data-v-9c3e5ea6]:focus-within{border:var(--input-border-active)!important}.input-text__error[data-v-9c3e5ea6]{position:absolute;margin:0;top:100%;text-align:right}.input-text[data-v-9c3e5ea6]{width:100%;height:100%;padding:0 10px;background-color:transparent;border:0;color:var(--input-color);font-size:var(--input-font-size)}.input-text[data-v-9c3e5ea6]::placeholder{color:var(--input-placeholder-color)}.input-text-container[disabled=true][data-v-9c3e5ea6]{background-color:var(--input-background-disabled);border:var(--input-border-disabled)}.input-text-container[error=true][data-v-9c3e5ea6]{border:var(--input-border-error)}.input-text__password[data-v-9c3e5ea6]{padding:0 6px;display:flex;align-items:center}.input-text[data-v-9c3e5ea6]:focus{border:0;outline:0}.widget-button-wrap[data-v-b6be5c12]{width:fit-content;outline:none;-webkit-user-select:none;user-select:none;position:relative;--size: 30px;max-height:var(--size);height:var(--size)}.widget-button[data-v-b6be5c12]{background-color:var(--widget-button-background);color:var(--widget-button-color);border:var(--widget-button-border);border-radius:var(--widget-button-radius);height:fit-content;overflow:hidden}.widget-button__toggle[data-v-b6be5c12]{height:var(--size);width:var(--size)}.widget-button__toggle[data-v-b6be5c12]:hover{background-color:var(--widget-button-background-hover)}.widget-button__list[data-v-b6be5c12]{overflow:hidden;max-height:var(--size);transition:var(--fast);height:fit-content}.widget-button .widget-button__toggle-icon[data-v-b6be5c12]{transition:var(--fast)}.widget-button.active .widget-button__toggle-icon[data-v-b6be5c12]{transform:rotate(-180deg)}.widget-button__list-elem[data-v-b6be5c12]{line-height:var(--size);font-size:14px;padding:0 10px;transition:var(--extra-fast);min-width:80px}.widget-button__list-elem[data-v-b6be5c12]:hover{background-color:var(--widget-button-background-hover)}.function-item[data-v-73f7eb9f]{padding:10px}.form-title[data-v-c91ffa31]{flex-grow:1}.widget-form[data-v-c3e88e10]{width:100%;max-width:966px;overflow:hidden;border:var(--form-border);background-color:var(--form-background-color);box-shadow:var(--form-shadow);border-radius:var(--form-radius);border-bottom:5px solid var(--form-border-bottom)}.widget-form__head[data-v-c3e88e10]{min-height:60px;align-items:center;background-color:var(--form-head-background-color)}@media screen and (min-width: 769px){.widget-form__head[data-v-c3e88e10]{flex-wrap:nowrap;padding:0 20px 0 40px}.widget-form__head-button[data-v-c3e88e10]{margin-right:15px}}@media screen and (max-width: 768px){.widget-form[data-v-c3e88e10]{width:100%}.widget-form__head[data-v-c3e88e10]{flex-wrap:wrap}}.widget-form__head-functions[data-v-c3e88e10]{height:100%;align-items:center}.widget-form__body[data-v-c3e88e10]{overflow:auto}.form-container-item[data-v-9264f6f4]{flex-wrap:wrap;gap:10px}.form-container-item-center[data-v-9264f6f4]{flex-grow:1;max-width:240px}.form-container-item__title[data-v-9264f6f4]{min-width:180px;max-width:180px;min-height:30px;justify-content:flex-end}.form-container-item__title>span[data-v-9264f6f4]{display:flex;align-items:center;font-size:14px;height:30px;line-height:130%}.form-container-item-1 .form-container-item-center[data-v-9264f6f4]{max-width:unset}.form-container-item__right[data-v-9264f6f4]{flex-grow:1;max-width:240px}.content_double[data-v-9264f6f4]{max-width:480px}.container-auth-wrap[data-v-0b1a5e81]{display:flex;align-items:center;justify-content:center;background-color:var(--container-auth-background-color);border-radius:var(--container-auth-border-radius);box-shadow:var(--container-auth-box-shadow);overflow:hidden;max-width:900px}.container-auth-wrap[data-v-0b1a5e81]{display:flex;width:100%;height:100%}.container-auth-sidebar[data-v-0b1a5e81]{width:300px;background-color:var(--container-auth-sidebar-background-color)}.container-auth-main[data-v-0b1a5e81]{display:flex;flex-direction:column;flex-grow:1;position:relative}@media screen and (min-width: 768px){.container-auth-wrap[data-v-0b1a5e81]{height:500px}.container-auth-wrap>div[data-v-0b1a5e81]{height:100%}.container-auth-sidebar[data-v-0b1a5e81]{height:100%}}@media screen and (max-width: 768px){.container-auth-wrap[data-v-0b1a5e81]{flex-direction:column}.container-auth-sidebar[data-v-0b1a5e81]{height:220px}}.loader[data-v-661e0416],.loader[data-v-661e0416]:after{border-radius:50%;width:14px;height:14px}.loader[data-v-661e0416]{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;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8-661e0416 1.1s infinite linear;animation:load8-661e0416 1.1s infinite linear}@-webkit-keyframes load8-661e0416{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8-661e0416{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.button-wrap[data-v-3cf452e1]{position:relative}.button-spinner[data-v-3cf452e1]{position:absolute;top:0;bottom:0;left:5px;margin:auto}.button-element[data-v-3cf452e1]{height:100%;width:100%;padding:0 20px;cursor:pointer;background-color:transparent;outline:unset;border:unset;color:unset;font-weight:unset;font-size:unset}.widget-button-wrap[data-v-3edae6ea]{--button-size: 40px;max-height:var(--button-size);z-index:1;position:relative;cursor:pointer;width:fit-content}.widget-multi-button[data-v-3edae6ea]{display:flex;background-color:#3949ab;border-radius:20px;overflow:hidden}.button__content[data-v-3edae6ea]{max-height:40px;min-width:80px;transition:.2s;overflow:hidden}.button__content_active[data-v-3edae6ea]{max-height:200px}.button__content-title[data-v-3edae6ea]{white-space:nowrap;font-size:14px;line-height:20px;padding:10px 10px 10px 20px;color:#fff;margin:0;transition:background-color .2s}.button__content-title[data-v-3edae6ea]:hover{background-color:#223296}.button__toggle_active[data-v-3edae6ea]{transform:rotate(180deg)}.button__side[data-v-3edae6ea]{min-width:var(--button-size)}.button__size-toggle[data-v-3edae6ea]{height:var(--button-size)}.button__size-toggle[data-v-3edae6ea]{cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .1s,background-color .2s;color:#fff}.button__size-toggle[data-v-3edae6ea]:hover{background-color:#223296}.button__toggle-icon[data-v-3edae6ea]{height:16px}.button__size-progress[data-v-3edae6ea]{display:flex;align-items:center;justify-content:center;height:var(--button-size)}.widget-error[data-v-8a0a0924]{height:38px;background-color:#ffb694;box-shadow:4px 4px 10px #ff500033}.widget-error-text[data-v-8a0a0924]{margin:0}.widget-error-wrap[data-v-8a0a0924]{height:100%;display:flex;align-items:center;justify-content:center}.widget-error-close[data-v-8a0a0924]{display:flex;align-items:center;justify-content:center;height:100%;width:40px;cursor:pointer}.widget-error-close[data-v-8a0a0924]:after,.widget-error-close[data-v-8a0a0924]:before{position:absolute;content:"";height:20px;width:2px;background-color:#000;border-radius:2px}.widget-error-close[data-v-8a0a0924]:after{transform:rotate(45deg)}.widget-error-close[data-v-8a0a0924]:before{transform:rotate(-45deg)}.widget-error-message[data-v-8a0a0924]{font-size:14px;line-height:130%;letter-spacing:.05em;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.widget-error-main[data-v-8a0a0924]{width:700px}.widget-error__container-close[data-v-8a0a0924]{height:100%}.article-details[data-v-8a0a0924]{font-size:18px;line-height:130%;letter-spacing:.05em;text-decoration-line:underline;font-weight:700;cursor:pointer}.fade-enter-active[data-v-aa732044],.fade-leave-active[data-v-aa732044]{transition:.5s ease;max-height:38px}.fade-enter-from[data-v-aa732044],.fade-leave-to[data-v-aa732044]{opacity:0;max-height:0}.container-errors[data-v-8e9870dd]{display:flex;gap:1px;flex-direction:column;position:fixed;top:0;left:0;width:100%;z-index:11}.fade-enter-active[data-v-8e9870dd],.fade-leave-active[data-v-8e9870dd]{transition:.5s ease;max-height:38px}.fade-enter-from[data-v-8e9870dd],.fade-leave-to[data-v-8e9870dd]{opacity:0;max-height:0}.modal__wait[data-v-4d18289e]{padding:40px 30px;max-width:450px}*{--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-wait[data-v-2038b2ba]{align-items:center}.wait-spinner[data-v-2038b2ba]{padding:8px}.breadcrumb[data-v-1702aee0]{gap:8px;align-items:center;color:#828282;cursor:pointer}.breadcrumb__title[data-v-1702aee0]{font-weight:400;font-size:12px;line-height:16px;margin:0}.breadcrumb__icon[data-v-1702aee0]{height:16px}.breadcrumb_active[data-v-1702aee0],.breadcrumb[data-v-1702aee0]:hover{color:#4f4f4f}.widget-breadcrumbs[data-v-1dfb2668]{display:flex;gap:14px}tr[data-v-48d3df56]{border:1px solid #F3F4FC;height:30px}th[data-v-48d3df56],td[data-v-48d3df56]{position:relative;padding:0 11px}th[data-v-48d3df56]{text-align:left}p[data-v-48d3df56]{margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.head-cell[data-v-03c9724f]{padding:0 15px 0 10px;display:flex}.head-cell[data-v-03c9724f]:hover{box-shadow:0 -1px #e7f2ff}.list-head-cell-label[data-v-03c9724f]{padding:5px 0;white-space:nowrap;cursor:pointer}.head-cell-order[data-v-03c9724f]{position:absolute;inset-inline-end:4px;inset-block:0 0;margin:auto;font-size:14px;height:14px}.head-cell-order_down[data-v-03c9724f]{transform:rotate(180deg)}.head-cell-resize[data-v-03c9724f]{padding:3px 10px;cursor:col-resize;transition:background-color .1s}.head-cell-resize[data-v-03c9724f]:hover{background-color:#f5f5f5}.head-cell-resize[data-v-03c9724f]:after{content:"";margin:auto;width:1px;height:100%;display:block;background-color:#d2d2d2}.widget-list-head[data-v-11644ad4]{position:sticky;top:-1px;z-index:1}.test-block[data-v-11644ad4]{background-color:#e7f2ff;inset-block-start:-1px;position:absolute;z-index:2;-webkit-user-select:none;user-select:none;white-space:nowrap;padding:0 10px;height:calc(100% + 1px);display:none;place-content:center}.widget-list-head th[data-v-11644ad4]{position:sticky;top:0;z-index:2;-webkit-user-select:none;user-select:none}.head-cell[data-v-11644ad4]{display:flex;cursor:pointer;padding:0 10px}.head-cell-label[data-v-11644ad4]{flex-grow:1;margin:0;white-space:nowrap;-webkit-user-select:none;user-select:none}.list-arrow[data-v-11644ad4]{position:relative;display:block;height:15px;width:2px;background-color:gray;border-radius:2px}.list-arrow[data-v-11644ad4]:after,.list-arrow[data-v-11644ad4]:before{position:absolute;display:block;content:"";background-color:gray;height:8px;width:2px;border-radius:2px}.list-arrow[data-v-11644ad4]:after{transform:rotate(-30deg);right:-2px}.list-arrow[data-v-11644ad4]:before{transform:rotate(30deg);left:-2px}.block-list-arrow[data-v-11644ad4]{transition:.1s}.down[data-v-11644ad4]{transform:rotate(180deg)}.head-cell-order[data-v-11644ad4]{display:grid;place-content:center}.widget-list-head-label[data-v-11644ad4]{font-weight:400;font-size:13px;line-height:16px;padding:5px 0}.head-cell-resize[data-v-11644ad4]{position:relative;padding:3px 10px;cursor:col-resize}.head-cell-resize[data-v-11644ad4]:after{content:"";margin:auto;width:1px;height:100%;display:block;background-color:gray}.widget-list-body[data-v-a0fe6a42]{position:relative}.widget-list-body[data-v-a0fe6a42]:after{content:"";background-color:transparent;z-index:-1;transition:.1s}.widget-list-body_inactive[data-v-a0fe6a42]:after{z-index:0;position:absolute;top:0;background-color:#afafaf80;height:100%;width:100%}.widget-section[data-v-07232553]{background-color:var(--form-section-background-color);box-shadow:var(--form-section-box-shadow);border-radius:var(--form-section-border-radius)}.widget-section__header[data-v-07232553]{border-radius:10px 10px 0 0;display:flex;padding:8px 8px 8px 40px;background-color:var(--form-section-header-background-color)}.widget-section-title[data-v-07232553]{flex-grow:1;font-weight:var(--form-section-title-font-weight);color:var(--form-section-title-color);font-size:var(--form-section-title-font-size);line-height:var(--form-section-title-line-height);margin:0}.widget-section__body[data-v-07232553]{padding:20px 40px}.form-titles[data-v-6ea1062c]{display:flex;flex-direction:column;justify-content:center}.form-label[data-v-6ea1062c]{display:flex;gap:10px;padding:4px 7px;align-items:center}.form-container-label[data-v-6ea1062c]{margin:0 0 0 6px}.form-info[data-v-6ea1062c]{color:#828282}.form-label[data-v-6ea1062c]{background-color:#ff6262;color:#fff;border-radius:4px}.form-title[data-v-6ea1062c]{font-weight:700;font-size:18px;line-height:25px}.form-label__title[data-v-6ea1062c]{margin:0;line-height:16px}.form-label__icon[data-v-6ea1062c]{height:16px;font-size:16px}.form-label_inactive[data-v-6ea1062c]{background-color:gray}.form-label_correct[data-v-6ea1062c]{background-color:green}.form-label_warning[data-v-6ea1062c]{background-color:#ff0}.form-label_error[data-v-6ea1062c]{background-color:#ff6262}.widget-form[data-v-f076ad65]{display:flex;flex-direction:column;gap:10px}.widget-form__head[data-v-f076ad65]{display:flex;gap:16px;align-items:center;z-index:1;padding:10px 0}.widget-form__button[data-v-f076ad65]{margin-left:auto}.wrap__widget-form[data-v-f076ad65]{padding:20px}.widget-form__head[data-v-f076ad65]{position:sticky;top:0}@media screen and (max-width: 768px){.wrap__widget-form[data-v-f076ad65]{padding:10px}.widget-form__head[data-v-f076ad65]{top:15px}}.head-image[data-v-f076ad65]{padding:15px;background-color:#f3f4fc;border-radius:8px}.validation-item[data-v-e6138c02]{display:grid;grid-template-columns:70px 1fr;border:1px solid #00CCB1;border-radius:4px}.validation-item_failed[data-v-e6138c02]{border-color:#ee8030}.validation-item-header[data-v-e6138c02]{display:grid;place-content:center;background-color:#00ccb1}.validation-item_failed .validation-item-header[data-v-e6138c02]{background-color:#ee8030}.validation-item__title[data-v-e6138c02]{font-weight:700;font-size:18px;line-height:25px;color:#fff}.validation-item-content[data-v-e6138c02]{display:flex;flex-direction:column;padding:10px 16px;gap:10px}.modal-wrap[data-v-119165b9]{max-height:80%;display:flex;flex-direction:column}.modal-wrap-head[data-v-119165b9]{display:flex;align-items:center;padding:10px;background:#F3F4FC;border-radius:8px 8px 0 0}.modal-head__title[data-v-119165b9]{font-weight:700;font-size:18px;line-height:25px}.modal-wrap-body[data-v-119165b9]{background-color:#fff;border-radius:0 0 8px 8px;overflow:auto}.modal-validation-body[data-v-a39cfe2f]{display:flex;flex-direction:column;gap:10px;padding:20px}.widget-input-check[data-v-f4a3dc6c]{display:grid;place-items:center;height:20px;aspect-ratio:1/1;border:2px solid #1a1a1a;border-radius:4px;cursor:pointer;background-color:#fff}.widget-input-check_active[data-v-f4a3dc6c]{background-color:#2f2f2f}.widget-input-check>i[data-v-f4a3dc6c]{font-size:12px;height:12px;color:#fff}.widget-card[data-v-bca33c5b]{display:flex}.widget-card-toggle[data-v-bca33c5b]{padding:10px}.widget-card-wrap[data-v-bca33c5b]{display:flex;flex-grow:1;background-color:#fff;border:1px solid #cbcbcb;border-radius:8px}.widget-card-arrow[data-v-bca33c5b]{padding:10px;cursor:pointer}.card-icon-arrow[data-v-bca33c5b]{display:block;transition:transform var(--fast)}.card-icon-arrow_active[data-v-bca33c5b]{transform:rotate(90deg)}.widget-card-title[data-v-bca33c5b]{margin:0;font-weight:600;font-size:18px;line-height:20px}.widget-card-content[data-v-bca33c5b]{padding:9px 0;flex-grow:1}.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}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
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}.head-cell[data-v-4e1d87c8]{padding:0 15px 0 10px;display:flex}.head-cell[data-v-4e1d87c8]:hover{box-shadow:0 -1px #e7f2ff}.list-head-cell-label[data-v-4e1d87c8]{padding:5px 0;white-space:nowrap;cursor:pointer}.head-cell-order[data-v-4e1d87c8]{position:absolute;inset-inline-end:4px;inset-block:0 0;margin:auto;font-size:14px;height:14px}.head-cell-order_down[data-v-4e1d87c8]{transform:rotate(180deg)}.head-cell-resize[data-v-4e1d87c8]{padding:3px 10px;cursor:col-resize;transition:background-color .1s}.head-cell-resize[data-v-4e1d87c8]:hover{background-color:#f5f5f5}.head-cell-resize[data-v-4e1d87c8]: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.12
|
|
4
4
|
* (c) 2023 ESERVICES
|
|
5
|
-
*/Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),At=require("jenesius-vue-modal"),E=require("jenesius-vue-form"),hn=require("object-hash"),tt=require("vue-router"),Ft=require("date-and-time");const _=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},gn={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()=>r.h("i",{class:`icon icon-${n}`})}},N=_(gn,[["__scopeId","data-v-0d979509"]]);function _n(t,e){return!!t&&t===e||"password is not equal"}function De(t){return Number(t.replace(/[^0-9.]/g,""))}function nt(t,e=null){let o=String(De(t)).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o.length>1&&e!==null&&o[1].length>e&&(o[1]=o[1].substring(0,e)),o.join(".")}const yn=Object.freeze(Object.defineProperty({__proto__:null,numeric:De,prettyNumeric:nt,validPassword:_n},Symbol.toStringTag,{value:"Module"})),Y={props:{title:{type:String},modelValue:{default(){return null}},placeholder:[String],required:{type:Boolean,default(){return!1}},rules:{type:Array,default(){return[]}},array:Array,name:String,disabled:Boolean,complex:{type:Boolean,default(){return!1}}},data:()=>({errorMessage:!1,isInsideDisabled:!1,isInsideRequired:!1,value:null}),computed:{arrayParse(){return this.array?this.array.map(t=>["string","number"].includes(typeof t)?{value:t,title:t}:t):[]},currentTitle(){let t="",e=this.arrayParse.find(n=>n.value===this.value);return e&&(t=e.title),t},elemController(){return{_self:this,name:this.name,setValue:t=>{this.setValue(t)},getValue:()=>this.value,validate:()=>this.validate(),disable:()=>{this.isInsideDisabled=!0},enable:()=>{this.isInsideDisabled=!1}}}},emits:["update:modelValue","input"],inject:{formController:{default:null}},methods:{validate(){const t=[...this.rules];this.required&&t.push(e=>e!=null||"Please fill in this field");for(let e=0;e<t.length;e++){let n=t[e](this.value);if(n!==!0)return this.setError(n),!1}return!0},input(t){this.errorMessage=!1,!(this.disabled||this.isInsideDisabled)&&(typeof t=="string"&&t.length===0&&(t=null),this.name&&this.formController&&this.formController.onInput({name:this.name,value:t}),this.setValue(t))},setValue(t){this.value=t,this.$emit("update:modelValue",t),this.$emit("input",t)},select(t){this.input(t)},setError(t){this.errorMessage=t},error(t){this.errorMessage=t}},mounted(){!this.complex&&this.formController&&this.formController.onDepend(this.elemController)},beforeUnmount(){!this.complex&&this.formController&&this.formController.unDepend(this.elemController)},watch:{modelValue(t){this.value=t}}},Le={props:{password:{type:Boolean,default:()=>!1}},data:()=>({isPasswordVisible:!1}),methods:{togglePasswordVisible(t=!this.isPasswordVisible){this.isPasswordVisible=t}},computed:{inputType(){return this.password&&!this.isPasswordVisible?"password":"text"}}},vn={props:{password:{type:Boolean,default:()=>!1}},data:()=>({isPasswordVisible:!1}),methods:{togglePasswordVisible(t=!this.isPasswordVisible){this.isPasswordVisible=t}}},wn=Object.freeze(Object.defineProperty({__proto__:null,MixinInput:Y,MixinInputPassword:vn,MixinInputText:Le},Symbol.toStringTag,{value:"Module"}));function we(t,e=[]){let n=t;return e.forEach(o=>{n=o(n)}),n}const En={components:{Icon:N},props:{modify:{type:Function,default:t=>t},pretty:{type:Function,default:t=>t},numeric:{type:Boolean,default:!1},prettyNumeric:{type:Boolean,default:!1}},computed:{prettyValue(){return console.log("pretty value"),this.pretty(we(this.modelValue,this.arrayInputPrettyModifiers))},arrayInputModifiers(){let t=[];return(this.numeric||this.prettyNumeric)&&t.push(De),t},arrayInputPrettyModifiers(){let t=[];return this.prettyNumeric&&t.push(nt),t}},methods:{onChange(t){let e=this.modify(we(t.target.value,this.arrayInputModifiers));this.input(e)},onInput(){const t=this.$refs.input.value,e=this.modify(t);this.input(e),this.$refs.input.value=this.pretty(e)},_onInput(t){let e=this.modify(we(t.target.value,this.arrayInputModifiers));this.input(e),this.$refs.input.value=this.pretty(we(this.modelValue,this.arrayInputPrettyModifiers))}},mixins:[Y,Le],name:"InputText"},Cn={class:"input-wrap"},kn={key:0,class:"input-title"},bn={key:0,class:"input-title_required"},$n=["disabled","error"],Sn=["type","placeholder","disabled","error","value"],Nn={key:1,class:"input-text__error text_sm"};function Bn(t,e,n,o,s,i){const l=r.resolveComponent("icon");return r.openBlock(),r.createElementBlock("div",Cn,[t.title?(r.openBlock(),r.createElementBlock("p",kn,[r.createTextVNode(r.toDisplayString(t.title)+" ",1),t.required?(r.openBlock(),r.createElementBlock("span",bn,"*")):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"input-text-container input_size_md flex",disabled:t.disabled||t.isInsideDisabled,error:!!t.errorMessage},[r.createElementVNode("input",{class:"input-text",type:t.inputType,placeholder:t.placeholder,disabled:t.disabled||t.isInsideDisabled,error:!!t.errorMessage,ref:"input",value:n.pretty(t.value),onInput:e[0]||(e[0]=(...a)=>i.onInput&&i.onInput(...a))},null,40,Sn),t.password?(r.openBlock(),r.createElementBlock("div",{key:0,class:"input-text__password",onClick:e[1]||(e[1]=a=>t.togglePasswordVisible())},[r.createVNode(l,{class:"cursor_pointer",name:t.isPasswordVisible?"eye-crossed":"eye"},null,8,["name"])])):r.createCommentVNode("",!0),t.errorMessage?(r.openBlock(),r.createElementBlock("p",Nn,r.toDisplayString(t.errorMessage),1)):r.createCommentVNode("",!0)],8,$n)])}const Tn=_(En,[["render",Bn],["__scopeId","data-v-65e2ee2d"]]);const In={mixins:[Y],name:"InputToggle"};function Vn(t,e,n,o,s,i){return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["input__toggle widget-input",{active:t.value,disabled:t.disabled||t.isInsideDisabled}]),onClick:e[0]||(e[0]=l=>t.input(!t.value))},null,2)}const An=_(In,[["render",Vn],["__scopeId","data-v-56d58611"]]);const Fn={props:["isActive","title"],name:"FragmentInputSelectItem"},On={class:"item-wrap"};function Pn(t,e,n,o,s,i){return r.openBlock(),r.createElementBlock("div",On,[r.createElementVNode("p",{class:r.normalizeClass(["input-select__item cursor_pointer",{active:n.isActive}])},r.toDisplayString(n.title),3)])}const Dn=_(Fn,[["render",Pn],["__scopeId","data-v-69ab8592"]]);function te(t,e){if(!t)return console.warn("Element is not provided.");function n(s,i){return s==i.target||s.contains(i.target)}const o=s=>{n(t,s)||(e(),window.removeEventListener("click",o))};window.addEventListener("click",o)}const Ln={data:()=>({isActive:!1}),computed:{titleValue(){try{return this.arrayParse.find(t=>t.value===this.value).title}catch{return""}}},methods:{active(t=!this.isActive){this.isInsideDisabled||this.disabled||(this.isActive=t)},hide(){this.isActive=!1}},watch:{isActive(t){t&&te(this.$refs.input,()=>this.hide())}},components:{Icon:N,FragmentInputSelectItem:Dn},mixins:[Y],name:"InputSelect"},Rn={class:"input-wrap"},Wn={key:0,class:"input-title"},Mn={key:0,class:"color__text_red"},xn={class:"input-select-container__current input_size_md flex"},jn={key:0,class:"input-select-value"},Un={key:1,class:"current-placeholder text_md"},qn={class:"input-select-list input-select-container__list"},zn={key:0,class:"input-text__error position_absolute margin-0 text_sm color__text_red"};function Gn(t,e,n,o,s,i){const l=r.resolveComponent("icon"),a=r.resolveComponent("fragment-input-select-item");return r.openBlock(),r.createElementBlock("div",Rn,[t.title?(r.openBlock(),r.createElementBlock("p",Wn,[r.createTextVNode(r.toDisplayString(t.title)+" ",1),t.required?(r.openBlock(),r.createElementBlock("span",Mn,"*")):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["input-select-container cursor_pointer",{active:t.isActive,disabled:t.disabled||t.isInsideDisabled,error:!!t.errorMessage}]),onClick:e[1]||(e[1]=c=>i.active()),ref:"input"},[r.createElementVNode("div",xn,[t.value===void 0||t.value===null?(r.openBlock(),r.createElementBlock("span",Un,r.toDisplayString(t.placeholder),1)):(r.openBlock(),r.createElementBlock("p",jn,r.toDisplayString(i.titleValue),1)),t.disabled||t.isInsideDisabled?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(l,{key:2,class:"input-select__ico-toggle",name:"caret-down"}))]),r.createElementVNode("div",qn,[t.value?(r.openBlock(),r.createBlock(a,{key:0,onClick:e[0]||(e[0]=c=>t.input(null))})):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.arrayParse,(c,p)=>(r.openBlock(),r.createBlock(a,{class:"input-select-list__item",key:p,"is-active":c.value===t.value,title:c.title,onClick:d=>t.input(c.value)},null,8,["is-active","title","onClick"]))),128))]),t.errorMessage?(r.openBlock(),r.createElementBlock("p",zn,r.toDisplayString(t.errorMessage),1)):r.createCommentVNode("",!0)],2)])}const Jn=_(Ln,[["render",Gn],["__scopeId","data-v-c4acd469"]]);class Ot{static async upload(e,n){const o=new FormData;o.append("file",e);const s=`/close-api/files?entityName=${n}`;return await fetch(s,{method:"POST",body:o}).then(i=>i.json()).then(i=>(i.filename=e.name,i))}}function rt(t=()=>null){console.warn("ProcessWrap deprecated! Use AsyncWrap");let e=t;const n=r.reactive({wait:!1,error:!1,ready:!1});return n.call=async function(...o){this.wait=!0,this.error=!1,this.ready=!1;try{await e(...o),this.ready=!0}catch{this.error=!0}this.wait=!1},n.setFunction=async function(o){e=o},n}const Hn=r.defineComponent({props:{entityName:{type:String,required:!0}},emits:["load","change","input"],data:()=>({pw:null}),created(){this.pw=rt(this.onLoad)},methods:{async onChange(t){t&&this.pw.call(t)},async onLoad(t){const e=await Ot.upload(t,this.entityName);this.$emit("load",e),this.name&&this.input(e.id)}},mixins:[Y],components:{Icon:N}}),Yn={class:"container-input-file"},Kn={key:0,class:"process-info input-file__wait text_size_sm"},Xn={key:1,class:"process-info input-file__error text_size_sm text_error"};function Zn(t,e,n,o,s,i){const l=r.resolveComponent("icon");return r.openBlock(),r.createElementBlock("div",Yn,[r.createVNode(l,{name:"plus",class:"icon__file-upload"}),r.createElementVNode("input",{type:"file",class:"input-file",onChange:e[0]||(e[0]=a=>t.onChange(a.target.files[0]))},null,32),t.pw.wait?(r.openBlock(),r.createElementBlock("p",Kn,"Loading...")):r.createCommentVNode("",!0),t.pw.error?(r.openBlock(),r.createElementBlock("p",Xn,"Error load file")):r.createCommentVNode("",!0)])}const Qn=_(Hn,[["render",Zn],["__scopeId","data-v-bdbf1475"]]),er={InputText:Tn,InputToggle:An,InputSelect:Jn,InputLoadFile:Qn};const tr={props:{placeholder:String,error:[Boolean,String]},setup(){return{}},name:"WidgetInputContainer"},nr=t=>(r.pushScopeId("data-v-1e3f1057"),t=t(),r.popScopeId(),t),rr={class:"widget-input__container"},or={class:"input-container__content"},sr=nr(()=>r.createElementVNode("div",{class:"widget-input__underline"},null,-1));function ir(t,e,n,o,s,i){return r.openBlock(),r.createElementBlock("div",rr,[r.createElementVNode("div",or,[r.renderSlot(t.$slots,"default",{},void 0,!0)]),sr,n.placeholder?(r.openBlock(),r.createElementBlock("p",{key:0,class:r.normalizeClass(["widget-input__placeholder",{"widget-input__placeholder_error":n.error}])},r.toDisplayString(n.placeholder),3)):r.createCommentVNode("",!0)])}const ar=_(tr,[["render",ir],["__scopeId","data-v-1e3f1057"]]);const lr={components:{Icon:N,WidgetInputContainer:ar},mixins:[Y,Le],name:"InputText"},cr=["type","value"];function dr(t,e,n,o,s,i){const l=r.resolveComponent("icon"),a=r.resolveComponent("widget-input-container");return r.openBlock(),r.createBlock(a,{placeholder:t.placeholder,error:!!t.errorMessage},{default:r.withCtx(()=>[r.createElementVNode("input",{type:t.password&&!t.isPasswordVisible?"password":"text",class:"input-text title_sm",value:t.value,onChange:e[0]||(e[0]=c=>t.input(c.target.value)),onKeyup:e[1]||(e[1]=r.withKeys(c=>t.$emit("enter"),["enter"]))},null,40,cr),t.password?(r.openBlock(),r.createElementBlock("div",{key:0,class:"input-text__password",onClick:e[2]||(e[2]=c=>t.togglePasswordVisible())},[r.createVNode(l,{class:"cursor_pointer",name:t.isPasswordVisible?"eye-crossed":"eye"},null,8,["name"])])):r.createCommentVNode("",!0)]),_:1},8,["placeholder","error"])}const ur=_(lr,[["render",dr],["__scopeId","data-v-212b50e2"]]),pr={InputText:ur};function Ee(t,e=[]){let n=t;return e.forEach(o=>{n=o(n)}),n}const fr=r.defineComponent({components:{Icon:N},props:{title:String,modify:{type:Function,default:t=>t},pretty:{type:Function,default:t=>t},numeric:{type:Boolean,default:!1},prettyNumeric:{type:Boolean,default:!1}},computed:{prettyValue(){return console.log("pretty value"),this.pretty(Ee(this.modelValue,this.arrayInputPrettyModifiers))},arrayInputModifiers(){let t=[];return(this.numeric||this.prettyNumeric)&&t.push(De),t},arrayInputPrettyModifiers(){let t=[];return this.prettyNumeric&&t.push(nt),t}},methods:{onChange(t){let e=this.modify(Ee(t.target.value,this.arrayInputModifiers));this.input(e)},onInput(){const t=this.$refs.input.value,e=this.modify(t);this.input(e),this.$refs.input.value=this.pretty(e)},_onInput(t){let e=this.modify(Ee(t.target.value,this.arrayInputModifiers));this.input(e),this.$refs.input.value=this.pretty(Ee(this.modelValue,this.arrayInputPrettyModifiers))}},mixins:[Y,Le],name:"InputText"}),mr={key:0,class:"input-title"},hr={key:0,class:"color__text_red"},gr=["disabled","error"],_r=["type","placeholder","disabled","error","value"],yr={key:1,class:"input-text__error text_sm color__text_red"};function vr(t,e,n,o,s,i){const l=r.resolveComponent("icon");return r.openBlock(),r.createElementBlock(r.Fragment,null,[t.title?(r.openBlock(),r.createElementBlock("p",mr,[r.createTextVNode(r.toDisplayString(t.title)+" ",1),t.required?(r.openBlock(),r.createElementBlock("span",hr,"*")):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"input-text-container flex",disabled:t.disabled||t.isInsideDisabled,error:!!t.errorMessage},[r.createElementVNode("input",{class:"input-text",type:t.inputType,placeholder:t.placeholder,disabled:t.disabled||t.isInsideDisabled,error:!!t.errorMessage,ref:"input",value:t.pretty(t.value),onInput:e[0]||(e[0]=(...a)=>t.onInput&&t.onInput(...a))},null,40,_r),t.password?(r.openBlock(),r.createElementBlock("div",{key:0,class:"input-text__password",onClick:e[1]||(e[1]=a=>t.togglePasswordVisible())},[r.createVNode(l,{class:"cursor_pointer",name:t.isPasswordVisible?"eye-crossed":"eye"},null,8,["name"])])):r.createCommentVNode("",!0),t.errorMessage?(r.openBlock(),r.createElementBlock("p",yr,r.toDisplayString(t.errorMessage),1)):r.createCommentVNode("",!0)],8,gr)],64)}const wr=_(fr,[["render",vr],["__scopeId","data-v-9c3e5ea6"]]),Er={InputText:wr},Cr={default:er,line:pr,naomi:Er};const kr={components:{Icon:N},props:{title:String,values:[Object,Array,String]},setup(t){Array.isArray(t.values)&&t.values.forEach(l=>{l.func&&console.warn("Prop func is deprecated. Use callback.",l)});const e=r.computed(()=>{if(!o.value)return"30px";let l=0;return Array.isArray(t.values)&&(l+=t.values.length),t.title&&l++,typeof t.values=="string"&&!Array.isArray(t.values)&&l++,l*30+"px"}),n=r.computed(()=>Array.isArray(t.values)?t.values:typeof t.values=="string"?{title:t.values}:[t.values]),o=r.ref(!1);function s(l=!o.value){o.value=l,l&&te(i.value,()=>s(!1))}const i=r.ref(null);return{isActive:o,array:n,toggle:s,button:i,maxHeight:e}},name:"Button"},br={class:"widget-button-wrap flex"},$r=["onClick"];function Sr(t,e,n,o,s,i){const l=r.resolveComponent("icon");return r.openBlock(),r.createElementBlock("div",br,[r.createElementVNode("div",{class:r.normalizeClass(["widget-button flex",{active:o.isActive}]),ref:"button"},[r.createElementVNode("div",{class:"widget-button__list flex_column",style:r.normalizeStyle({maxHeight:o.maxHeight})},[n.title?(r.openBlock(),r.createElementBlock("span",{key:0,class:"widget-button__list-elem cursor_pointer",onClick:e[0]||(e[0]=a=>o.toggle())},r.toDisplayString(n.title),1)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.array,(a,c)=>(r.openBlock(),r.createElementBlock("span",{class:"widget-button__list-elem cursor_pointer",onClick:p=>(a.callback(),o.toggle(!1)),key:c},r.toDisplayString(a.title),9,$r))),128))],4),o.array.length>1?(r.openBlock(),r.createElementBlock("div",{key:0,class:"widget-button__toggle flex flex_center cursor_pointer",onClick:e[1]||(e[1]=r.withModifiers(a=>o.toggle(),["stop"]))},[r.createVNode(l,{class:"widget-button__toggle-icon",name:"angle-small-down"})])):r.createCommentVNode("",!0)],2)])}const Nr=_(kr,[["render",Sr],["__scopeId","data-v-b6be5c12"]]);const Br={props:{icon:String,func:Function},name:"WidgetFormFunctionItem",components:{Icon:N}};function Tr(t,e,n,o,s,i){const l=r.resolveComponent("icon");return r.openBlock(),r.createElementBlock("div",{class:"function-item cursor_pointer",onClick:e[0]||(e[0]=(...a)=>n.func&&n.func(...a))},[r.createVNode(l,{name:n.icon},null,8,["name"])])}const Ir=_(Br,[["render",Tr],["__scopeId","data-v-73f7eb9f"]]);const Vr={props:{title:String},name:"WidgetFormTitle"},Ar={class:"form-title"},Fr={class:"title_lg color__text_black margin-0"};function Or(t,e,n,o,s,i){return r.openBlock(),r.createElementBlock("div",Ar,[r.createElementVNode("h2",Fr,r.toDisplayString(n.title),1)])}const Pr=_(Vr,[["render",Or],["__scopeId","data-v-c91ffa31"]]);const Dr={components:{WidgetFormTitle:Pr,WidgetFormFunctionItem:Ir,WidgetButton:Nr},props:{title:String,button:{type:[Array,Object],default:()=>[]},functions:[Array]},name:"WidgetForm"},Lr={class:"widget-form flex_column"},Rr={class:"widget-form__head flex"},Wr={class:"widget-form__head-functions flex"},Mr={class:"widget-form__body"};function xr(t,e,n,o,s,i){const l=r.resolveComponent("widget-form-title"),a=r.resolveComponent("widget-button"),c=r.resolveComponent("widget-form-function-item");return r.openBlock(),r.createElementBlock("div",Lr,[r.createElementVNode("div",Rr,[r.createVNode(l,{title:n.title},null,8,["title"]),Array.isArray(n.button)&&n.button.length||!Array.isArray(n.button)&&n.button?(r.openBlock(),r.createBlock(a,{key:0,class:"widget-form__head-button",values:n.button},null,8,["values"])):r.createCommentVNode("",!0),r.createElementVNode("div",Wr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.functions,(p,d)=>(r.openBlock(),r.createBlock(c,{key:d,icon:p.icon,func:p.callback},null,8,["icon","func"]))),128))])]),r.createElementVNode("div",Mr,[r.renderSlot(t.$slots,"default",{},void 0,!0)])])}const jr=_(Dr,[["render",xr],["__scopeId","data-v-c3e88e10"]]),Ur={default:{WidgetForm:jr}};const qr={props:{title:String,subTitle:String,type:[String,Number],double:{type:Boolean,default:()=>!1}},name:"ContainerFormElem"},zr={class:"form-container-item__title flex"},Gr={class:""},Jr={key:0,class:""},Hr={class:"title_sm"},Yr={key:1,class:"form-container-item__right"};function Kr(t,e,n,o,s,i){return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["form-container-item flex",[`form-container-item-${n.type}`]])},[r.createElementVNode("div",zr,[r.createElementVNode("span",Gr,r.toDisplayString(n.title),1)]),r.createElementVNode("div",{class:r.normalizeClass(["form-container-item-center flex_column",{content_double:n.double}])},[r.renderSlot(t.$slots,"default",{},void 0,!0)],2),n.subTitle?(r.openBlock(),r.createElementBlock("div",Jr,[r.createElementVNode("span",Hr,r.toDisplayString(n.subTitle),1),r.renderSlot(t.$slots,"centerRight",{},void 0,!0)])):r.createCommentVNode("",!0),t.$slots.right?(r.openBlock(),r.createElementBlock("div",Yr,[r.renderSlot(t.$slots,"right",{},void 0,!0)])):r.createCommentVNode("",!0)],2)}const Xr=_(qr,[["render",Kr],["__scopeId","data-v-9264f6f4"]]);const Zr={name:"ContainerAuthView"},Qr={class:"container-auth-wrap"},eo={class:"container-auth-sidebar"},to={class:"container-auth-main"};function no(t,e,n,o,s,i){return r.openBlock(),r.createElementBlock("div",Qr,[r.createElementVNode("div",eo,[r.renderSlot(t.$slots,"side",{},void 0,!0)]),r.createElementVNode("div",to,[r.renderSlot(t.$slots,"default",{},void 0,!0)])])}const ro=_(Zr,[["render",no],["__scopeId","data-v-0b1a5e81"]]),oo={ContainerFormElem:Xr,ContainerAuthView:ro},so=r.defineComponent({__name:"widget-spinner",props:{color:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:"loader",style:r.normalizeStyle({"border-left":`1.1em solid ${e.color?e.color:"#fff"}`})},null,4))}});const me=_(so,[["__scopeId","data-v-661e0416"]]),io={class:"button-element"},ao=r.defineComponent({__name:"WidgetButton",props:{title:{},callback:{type:Function},wait:{type:Boolean},default:{type:Boolean}},setup(t){const e=t;function n(s){s.key==="Enter"&&o.call()}r.onMounted(()=>{e.default&&document.addEventListener("keypress",n)}),r.onUnmounted(()=>{document.removeEventListener("keypress",n)});const o=rt(e.callback);return(s,i)=>(r.openBlock(),r.createElementBlock("div",{class:"button-wrap",onClick:i[0]||(i[0]=l=>r.unref(o).call())},[r.unref(o).wait||s.wait?(r.openBlock(),r.createBlock(me,{key:0,class:"button-spinner"})):r.createCommentVNode("",!0),r.createElementVNode("button",io,[r.createTextVNode(r.toDisplayString(s.title)+" ",1),r.renderSlot(s.$slots,"default",{},void 0,!0)])]))}});const lo=_(ao,[["__scopeId","data-v-3cf452e1"]]),co={class:"widget-button-wrap"},uo={class:"widget-multi-button"},po={class:"widget-button-list"},fo=["onClick"],mo={class:"button__side"},ho={key:0,class:"button__size-progress"},go=r.defineComponent({__name:"WidgetMultiButton",props:{title:{},array:{}},setup(t){const e=rt(),n=r.reactive({active:!1});function o(i=!n.active){n.active=i}function s(i){e.setFunction(i),e.call()}return(i,l)=>(r.openBlock(),r.createElementBlock("div",co,[r.createElementVNode("div",uo,[r.createElementVNode("div",{class:r.normalizeClass(["button__content",{button__content_active:n.active}])},[i.title?(r.openBlock(),r.createElementBlock("p",{key:0,class:"button__content-title widget-multi-button-row",onClick:l[0]||(l[0]=a=>o())},r.toDisplayString(i.title),1)):r.createCommentVNode("",!0),r.createElementVNode("div",po,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.array,(a,c)=>(r.openBlock(),r.createElementBlock("p",{class:"button__content-title widget-multi-button-row",key:c,onClick:p=>(s(a.callback),o(!1))},r.toDisplayString(a.title),9,fo))),128))])],2),r.createElementVNode("div",mo,[r.unref(e).wait?(r.openBlock(),r.createElementBlock("div",ho,[r.createVNode(me,{class:"button-spinner"})])):i.array&&i.array.length>1?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["button__size-toggle widget-multi-button-toggle",{button__toggle_active:n.active}]),onClick:l[1]||(l[1]=a=>o())},[r.createVNode(N,{class:"button__toggle-icon",name:"angle-small-down"})],2)):r.createCommentVNode("",!0)])])]))}});const Pt=_(go,[["__scopeId","data-v-3edae6ea"]]),_o={WidgetButton:lo,WidgetMultiButton:Pt},yo={Icon:N},P=new class{constructor(){this.store=r.reactive([])}add(e,n,{children:o,timeout:s=10,click:i=()=>{}}={}){const l=new vo(e,n,s,o||[],i);return this.store.push(l),s&&setTimeout(this.remove.bind(this,l.id),s*1e3),l}remove(e){const n=this.store.findIndex(o=>o.id===e);if(n===-1)return!1;this.store.splice(n,1)}removeChild(e,n){throw new Error("Removing children error.")}},Dt=class Lt{constructor(e,n,o,s,i){this.type=e,this.msg=n,this.timeout=o,this.children=s,this.click=i,this.id=Lt.cardId++}};Dt.cardId=1;let vo=Dt;const wo={class:"widget-error"},Eo={class:"widget-error-wrap"},Co={class:"widget-error-main"},ko={class:"widget-error-text widget-error-message"},bo={class:"widget-error__container-close"},$o=r.defineComponent({__name:"WidgetError",props:{isGroup:{type:Boolean},message:{}},emits:["close","toggle"],setup(t,{emit:e}){return(n,o)=>(r.openBlock(),r.createElementBlock("div",wo,[r.createElementVNode("div",Eo,[r.createElementVNode("div",Co,[r.createElementVNode("p",ko,r.toDisplayString(n.message),1)]),n.isGroup?(r.openBlock(),r.createElementBlock("p",{key:0,onClick:o[0]||(o[0]=s=>e("toggle")),class:"article-details"},"See details")):r.createCommentVNode("",!0),r.createElementVNode("div",bo,[r.createElementVNode("div",{class:"widget-error-close",onClick:o[1]||(o[1]=s=>e("close"))})])])]))}});const _t=_($o,[["__scopeId","data-v-8a0a0924"]]),So={key:0,class:"widget-error-details"},No=r.defineComponent({__name:"WidgetErrorGroup",props:{card:{}},emits:["closeCard","closeChild"],setup(t,{emit:e}){const n=t,o=r.computed(()=>{var i;return!!((i=n.card.children)!=null&&i.length)}),s=r.ref(!0);return(i,l)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(_t,{message:i.card.msg,key:i.card.id,onClose:l[0]||(l[0]=a=>e("closeCard",i.card.id)),onToggle:l[1]||(l[1]=a=>s.value=!s.value),"is-group":o.value},null,8,["message","is-group"])),!s.value&&i.card.children?(r.openBlock(),r.createElementBlock("div",So,[r.createVNode(r.TransitionGroup,{name:"fade"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.card.children,a=>(r.openBlock(),r.createBlock(_t,{key:a.id,message:a.msg,onClose:c=>e("closeChild",a.id)},null,8,["message","onClose"]))),128))]),_:1})])):r.createCommentVNode("",!0)]))}});const Bo=_(No,[["__scopeId","data-v-aa732044"]]),To={class:"container-errors"},Io=r.defineComponent({__name:"WidgetNotificationSystem",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",To,[r.createVNode(r.TransitionGroup,{name:"fade"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(P).store,o=>(r.openBlock(),r.createBlock(Bo,{key:o.id,card:o,onCloseCard:s=>r.unref(P).remove(o.id),onCloseChild:s=>r.unref(P).removeChild(o.id,s)},null,8,["card","onCloseCard","onCloseChild"]))),128))]),_:1})]))}});const Rt=_(Io,[["__scopeId","data-v-8e9870dd"]]),Vo={default:Rt};let Ao={inputs:Cr,forms:Ur,containers:oo,buttons:_o,icons:yo,errorSystem:Vo};const Fo={inputs:yn};function he(t,e){if(typeof t!="object"||t===null)return;if(e in t)return t[e];let n=e.indexOf(".");if(n>-1){const o=e.substring(0,n);return o in t?he(t[o],e.substr(n+1)):void 0}return t[e]}function ot(t){return t.reduce((e,n)=>e.then(o=>n==null?void 0:n(o)),Promise.resolve())}const Wt=class k extends Error{constructor(e,n=null){super(),this.message=e,this.details=n,this.id=k.ID++}static ParentFormNotFound(){return new k("Can't found parent form.")}static UndefinedNameOfCompositeFormController(e){return new k("Composite object name is undefined",e)}static EntityWithoutName(e){return new k("'Entity doesn't have a name",e)}static NotResolvedNameEventEmitter(e){return new k(`'${e}' is not a valid Event emitter name`)}static FormIsNotValidated(e){return new k("Form is not validated",e)}static ListWorkerIsRunningOrEnd(e){return new k("List data request is running or already done",e)}static ObjectIdNotNumber(e){return new k(`${e} (id) is not a number`)}static UndefinedErrorId(e,n){return k.ApiNotAvailable()}static ApiError(e){return new k("Request error",e)}static ApiNotAvailable(){return new k(`Sorry, we experience difficulties here.
|
|
6
|
-
Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(e,
|
|
5
|
+
*/Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),_=require("jenesius-vue-form"),Zt=require("object-hash"),Qt=require("jenesius-vue-modal"),yt=require("vue-router"),en=require("date-and-time");function tn(n,e){return!!n&&n===e||"password is not equal"}function wt(n){return Number(n.replace(/[^0-9.]/g,""))}function nn(n,e=null){let r=String(wt(n)).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length>1&&e!==null&&r[1].length>e&&(r[1]=r[1].substring(0,e)),r.join(".")}const rn=Object.freeze(Object.defineProperty({__proto__:null,numeric:wt,prettyNumeric:nn,validPassword:tn},Symbol.toStringTag,{value:"Module"})),sn={inputs:rn};function de(n,e){if(typeof n!="object"||n===null)return;if(e in n)return n[e];let t=e.indexOf(".");if(t>-1){const r=e.substring(0,t);return r in n?de(n[r],e.substr(t+1)):void 0}return n[e]}function Fe(n,e){if(!n)return console.warn("Element is not provided.");function t(i,o){return i==o.target||i.contains(o.target)}const r=i=>{t(n,i)||(e(),window.removeEventListener("click",r))};window.addEventListener("click",r)}function Ge(n){return n.reduce((e,t)=>e.then(r=>t==null?void 0:t(r)),Promise.resolve())}const vt=class C extends Error{constructor(e,t=null){super(),this.message=e,this.details=t,this.id=C.ID++}static ParentFormNotFound(){return new C("Can't found parent form.")}static UndefinedNameOfCompositeFormController(e){return new C("Composite object name is undefined",e)}static EntityWithoutName(e){return new C("'Entity doesn't have a name",e)}static NotResolvedNameEventEmitter(e){return new C(`'${e}' is not a valid Event emitter name`)}static FormIsNotValidated(e){return new C("Form is not validated",e)}static ListWorkerIsRunningOrEnd(e){return new C("List data request is running or already done",e)}static ObjectIdNotNumber(e){return new C(`${e} (id) is not a number`)}static UndefinedErrorId(e,t){return C.ApiNotAvailable()}static ApiError(e){return new C("Request error",e)}static ApiNotAvailable(){return new C(`Sorry, we experience difficulties here.
|
|
6
|
+
Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(e,t){return!e&&!t?C.ApiNotAvailable():new C(e||"Authorization Error",t)}static ApiResponseParseFailed(){return C.ApiNotAvailable()}static MissingIdInValuesEntity(e){return new C("Object doesn't have id",e)}static ObjectWithIdNotFound(e,t){return new C(`Can't find object with id: ${e}`,t)}static ObjectWithoutConnectToPresentArray(e,t){return new C("Object is not found.",{object:e,array:t})}static EntityWithoutId(e){return new C("Entity doesn't have id.",e)}static NotFoundedTableIndex(e,t){return new C(`Can't find the element with tableIndex ${e}`,t)}static UndefinedError(e,t=[]){return new C(e,t)}static TableArrayAlreadyIncludeProvidedIndexValue(e,t,r){return new C(`Array already includes the element with value ${e}`,{array:t,table:r})}static MetadataEntityIsNotAvailable(e){return new C(`Metadata for the ${e} is not currently available.`)}};vt.ID=0;let P=vt;const Et="Please try again later or submit a feedback if problem doesn't go.";function it(n){return typeof n=="string"?Ve(n):on(n)?Ve(n.message):Ve(Et)}function on(n){return!!(typeof n=="object"&&Object.hasOwnProperty.call(n,"message")&&n!==null)}function Ve(n,e=[]){return{message:n,details:e}}class Ct{static getClientData(){return m("/close-api/client-content")}static getNavigation(){return m("/close-api/client/navigation")}}const X=new class{constructor(){this.store=s.reactive([])}add(e,t,{children:r,timeout:i=10,click:o=()=>{}}={}){const u=new an(e,t,i,r||[],o);return this.store.push(u),i&&setTimeout(this.remove.bind(this,u.id),i*1e3),u}remove(e){const t=this.store.findIndex(r=>r.id===e);if(t===-1)return!1;this.store.splice(t,1)}removeChild(e,t){throw new Error("Removing children error.")}},_t=class St{constructor(e,t,r,i,o){this.type=e,this.msg=t,this.timeout=r,this.children=i,this.click=o,this.id=St.cardId++}};_t.cardId=1;let an=_t;/*!
|
|
7
7
|
* jenesius-event-emitter v1.0.2
|
|
8
8
|
* (c) 2022 Jenesius
|
|
9
9
|
* @license MIT
|
|
10
|
-
*/const vt=function(t,e){return t in this.events||(this.events[t]=[]),this.events[t].push(e),this.off.bind(this,t,e)},wt=function(t,e){t in this.events&&this.events[t].forEach(n=>n(e))},Et=function(t,e){const n=this.events[t];if(!n)return;const o=n.indexOf(e);o!==-1&&n.splice(o,1)},Ct=function(){this.events={}};class O{constructor(){this.events={}}on(e,n){return vt.call(this,e,n)}emit(e,n){return wt.call(this,e,n)}off(e,n){return Et.call(this,e,n)}cleanEvents(){Ct.call(this)}static on(e,n){return vt.call(O,e,n)}static emit(e,n){return wt.call(O,e,n)}static off(e,n){return Et.call(O,e,n)}static cleanEvents(){Ct.call(O)}}O.events={};var jt=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ce=(t,e,n)=>(jt(t,e,"read from private field"),n?n.call(t):e.get(t)),Je=(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)},He=(t,e,n,o)=>(jt(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n),se,ke,be;const K=class F extends O{constructor(){super(...arguments),Je(this,se,void 0),Je(this,ke,"front"),this.organizations=[],Je(this,be,!1)}set language(e){localStorage.setItem(F.LOCALSTORAGE_LANGUAGE_KEY,e)}get language(){return localStorage.getItem(F.LOCALSTORAGE_LANGUAGE_KEY)||F.DEFAULT_LANGUAGE}checkLanguageInStorage(){return!!localStorage.getItem(F.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){He(this,se,e)}get router(){if(!Ce(this,se))throw new Error("Router was not founded. Please set router: Manager.router = router: VueRouter");return Ce(this,se)}set type(e){He(this,ke,e)}get type(){return Ce(this,ke)}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(e){He(this,be,e),this.emit(F.EVENT_READY_UPDATE,e)}get ready(){return Ce(this,be)}onReady(e){return this.on(F.EVENT_READY_UPDATE,e)}onupdateContext(e){return this.on(F.EVENT_CONTEXT_UPDATE,e)}onupdateData(e){return this.on(F.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(F.CURRENT_CONTEXT_KEY,String(e)),this.emit(F.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(F.CURRENT_CONTEXT_KEY)||"");!Number.isNaN(n)&&this.validateContextId(Number(n))?this.setCurrentContext(n):this.setCurrentContext(Number(e.id))}catch{P.add("error",I.ApiNotAvailable().message)}}loadCustomerData(){return xt.getClientData()}async updateFullClientData(){return this.init()}validateContextId(e){var n;return((n=this.person)==null?void 0:n.id)==e?!0:!!this.organizations.find(o=>o.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))}};se=new WeakMap;ke=new WeakMap;be=new WeakMap;K.DEFAULT_LANGUAGE="en";K.LOCALSTORAGE_LANGUAGE_KEY="CurrentLanguage";K.EVENT_CONTEXT_UPDATE="event:context-update";K.EVENT_READY_UPDATE="event:ready-update";K.EVENT_DATA_UPDATE="event:data-update";K.CURRENT_CONTEXT_KEY="CurrentContext";let Ut=K;const w=new Ut;function Po(){const t=r.reactive({contextType:w.contextType,contextId:w.contextId,context:w.context});return w.onupdateContext(()=>{t.contextType=w.contextType,t.contextId=w.contextId,t.context=w.context}),t}function Do(t){return t.text().then(e=>{try{return JSON.parse(e)}catch{return Mt}})}function g(t,e={}){return w.isFront&&(e.headers||(e.headers={}),e.headers["Context-Id"]=w.contextId),e.redirect="manual",fetch(t,e).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw I.ApiNotAvailable()}).then(n=>Do(n).then(o=>{if(!n.ok)throw o;return o}))}class Re{constructor(){}static parseNamesFromListConfig(e){let n=Re.parseFieldsToGraphQL(e.reduce((s,i)=>(i.name&&s.push(i.name),s),[]));function o(s){let i="";for(let l in s)typeof s[l]=="boolean"?i+=` ${l} `:i+=` ${l} { ${o(s[l])} }`;return i}return o(n)}static parseSortFromListConfig(e){let n={};for(let o in e)n[o]=e[o]?"ASC":"DESC";return n}static parseFieldsToGraphQL(e){function n(o,s){if(s.includes(".")){const i=s.indexOf("."),l=s.substring(i+1),a=s.substring(0,i);a in o||(o[a]={}),n(o[a],l)}else o[s]=!0;return o}return e.reduce(n,{})}}class Lo{constructor(){this.public=!1,this.errors=new Proxy([],{set:(e,n,o)=>(n!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(o)}`),e[n]=o,!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 qt=new Lo;function zt(t){return t&&t[0].toLowerCase()+t.slice(1)}const Ro={props:{message:String},name:"ModalWait",components:{WidgetSpinner:me}},Wo={class:"modal__wait modal-default flex_column"};function Mo(t,e,n,o,s,i){const l=r.resolveComponent("widget-spinner");return r.openBlock(),r.createElementBlock("div",Wo,[r.createVNode(l),r.createElementVNode("p",null,r.toDisplayString(n.message),1)])}const xo=_(Ro,[["render",Mo],["__scopeId","data-v-4d18289e"]]),jo={error:!0,wait:!1,throw:!0};async function We(t,e={}){const n={modalWait:null};e=Object.assign({},e,jo);try{e.wait&&(n.modalWait=await At.openModal(xo,{message:typeof e.wait=="string"?e.wait:""}))}catch(o){console.warn(o)}return Promise.resolve(t()).catch(o=>{let s=o;if(typeof s=="string"&&(s=I.UndefinedError(s)),e.error&&(console.log(s,s.details),s instanceof I?P.add("error",s.message,{children:s.details||[],timeout:12}):s!=null&&s.message?P.add("error",s.message):(console.warn(s),P.add("error",I.ApiResponseParseFailed().message))),e.throw)throw s}).finally(()=>{var o;(o=n.modalWait)==null||o.close()})}function Me(t){return Object.keys(t).reduce((e,n)=>{let o=t[n];const s=n.charAt(0).toUpperCase()+n.slice(1);return typeof o=="object"&&!(o==null||Array.isArray(o))&&(o=Me(o)),e[s]=o,e},{})}function Gt(t,e=2){if(!(typeof t=="string"||typeof t=="number"))return"";let o=String(t).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o.length<2&&(o[1]=""),o[1]=o[1].padEnd(e,"0"),o[1].length>e&&(o[1]=o[1].substring(0,e)),o.join(".")}const pe={Request:g,clickOutside:te,getPropFromObject:he,runPromiseQueue:ot,GraphQL:Re,firstChapterToLowerCase:zt,requestHandler:We,valuesToUpperCase:Me,prettyMoney:Gt},Uo=Object.freeze(Object.defineProperty({__proto__:null,GraphQL:Re,Journal:qt,Request:g,clickOutside:te,default:pe,firstChapterToLowerCase:zt,getPropFromObject:he,requestHandler:We,runPromiseQueue:ot,valuesToUpperCase:Me},Symbol.toStringTag,{value:"Module"}));function Jt(t,e=""){for(let n in t){if(typeof t[n]=="object"){Jt(t[n],(e.length?`${e}-`:"")+n);continue}let o="--"+((e.length?`${e}-`:"")+n).replace(/([A-Z])/g,s=>`-${s}`.toLowerCase());document.documentElement.style.setProperty(o,t[n])}}const W={};function qo(t){for(let e in t)W[e]=t[e];t.styles&&Jt(t.styles),qt.welcome(),console.log("The config has been initialized. To get access check %c_config in console.","background: purple; color: white"),window._config=W}const zo=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Go(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="string"&&typeof t[1]=="number"}const Jo="masterId",Ho="masterEntity";function Ae(t,e){if(!Array.isArray(e))return;if(Go(e))return n(e);e.forEach(n);function n(o){t.append(Ho,o[0]),t.append(Jo,o[1].toString())}}class S{static async anonymousGetList(e){return await g(`/open-api/data/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getSearchParamsForEntityListRead(e){const n=(s,i)=>o.append(s,i),o=new URLSearchParams;if(e.fields){const s=e.fields;typeof s=="string"?n("fields",s):Array.isArray(s)?n("fields",s.join(" ")):typeof s=="object"&&n("fields",Object.keys(s).join(" "))}if(e.order){let s=e.order;const l=(Array.isArray(s)?[s]:Object.entries(s)).map(([a,c="desc"])=>`@${a} ${c}`).join(",");n("order",l)}return e.limit&&n("limit",e.limit.toString()),e.offset&&n("offset",e.offset.toString()),e.filter&&n("filter",e.filter.toString()),e.useUsageContext&&o.append("useUsageContext",e.useUsageContext.toString()),o}static async getList(e,n){const o=S.getSearchParamsForEntityListRead(n||{});return await g(`/close-api/data/${e}?${o.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getCount(e,n){const o=S.getSearchParamsForEntityListRead(n||{});return g(`/close-api/data/entities/${e}/count?${o.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static create(e,n,o){const s=new URLSearchParams;return Ae(s,o==null?void 0:o.masterEntities),g(`/close-api/data/${e}?${s.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:n})})}static update(e,n,o,s={}){return g(`/close-api/data/entities/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:o})})}static readById(e,n,o={}){const s=new URLSearchParams;if(o.fields){let i=o.fields;typeof i=="string"&&(i=[i]),s.append("fields",i.join(" "))}return g(`/close-api/data/entities/${e}/id/${n}?${s.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static updateById(e,n,o,s){const i=new URLSearchParams;return Ae(i,s==null?void 0:s.masterEntities),g(`/close-api/data/entities/${e}/id/${n}?${i.toString()}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:o,version:s==null?void 0:s.version})})}static removeById(e,n,o){const s=typeof n=="number"?{Id:n}:n;return S.removeByKeys(e,s,o)}static removeByKeys(e,n,o){return g(`/close-api/data/entities/${e}`,{method:"delete",headers:{"Content-Type":"application/json"},body:JSON.stringify({keys:n,version:o})})}}var Ht=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ye=(t,e,n)=>(Ht(t,e,"read from private field"),n?n.call(t):e.get(t)),kt=(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)},bt=(t,e,n,o)=>(Ht(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n),ie,$e;const st=class Z extends O{constructor(e){super(),kt(this,ie,[]),kt(this,$e,!1),this.hashParams="",this.offset=0,this.name=e.name}set wait(e){bt(this,$e,e),this.emit(Z.EVENT_CHANGE_WAIT,e)}get wait(){return Ye(this,$e)}read(e){var s,i;this.wait=!0;const n={};e.order&&(n.order={[(s=e.order)==null?void 0:s.name]:(i=e.order)==null?void 0:i.duration}),e.fields&&(n.fields=e.fields),e.filter&&(n.filter=e.filter);const o=JSON.stringify(n.order)+JSON.stringify(n.filter);return o!==this.hashParams&&(this.offset=0,this.hashParams=o),e.limit&&(n.limit=e.limit),e.offset&&(n.offset=e.offset||this.offset),S.getList(this.name,n).then(l=>(this.offset===0&&(this.array=[]),this.offset+=n.limit,l)).then(l=>{this.array.push(...l)}).then(()=>this.emit(Z.EVENT_DATA,this.array)).finally(()=>{this.wait=!1})}set array(e){bt(this,ie,e),this.emit(Z.EVENT_DATA,this.array)}add(e){Ye(this,ie).push(...e),this.emit(Z.EVENT_DATA,this.array)}get array(){return Ye(this,ie)}static GetFieldNames(e){return e.reduce((n,o)=>(o.name&&(typeof o.name=="string"?n.push(o.name):n.push(...o.name)),n),[])}static getCellInfo(e,n){const o=Z.getCellName(e),s=(()=>{let i=o?he(n,o):null;return i===void 0&&(i=null),e.value?e.value(i,n):i})();return{name:o,value:s}}static getCellName(e){return typeof e.name=="string"?e.name:Array.isArray(e.name)?e.name[0]:null}};ie=new WeakMap;$e=new WeakMap;st.EVENT_DATA="LIST:DATA";st.EVENT_CHANGE_WAIT="LIST:UPDATE-WAIT";let Yt=st;const q=Symbol("__ROW_INDEX__");let it=class extends Yt{constructor(e){super(e),this.rowIndex=1,this.changes={new:{},edit:{},remove:[]},this.save=()=>{}}get changed(){return Object.keys(this.changes.new).length||Object.keys(this.changes.edit).length||this.changes.remove.length}create(e){const n=this.wrapData(e);this.changes.new[n[q]]=n,this.emitChanges()}cleanChanges(){this.changes.new={},this.changes.edit={},this.changes.remove=[],this.emitChanges()}edit(e,n){const o=this.wrapData(n,e);if(this.changes.new[e])return this.changes.new[e]=o,this.emitChanges();this.array.find(s=>s[q]===e)&&(this.changes.edit[e]={...this.changes.edit[e],...o},this.emitChanges())}remove(e){if(this.changes.new[e])return delete this.changes.new[e],this.emitChanges();this.array.find(n=>n[q]===e)&&(delete this.changes.edit[e],this.changes.remove.includes(e)||this.changes.remove.push(e),this.emitChanges())}wrapData(e,n){return n===void 0&&!Object.prototype.hasOwnProperty.call(e,q.toString())&&(n=++this.rowIndex),{...e,[q]:n}}emitChanges(){this.emit(E.Form.EVENT_CHANGED,!0)}set array(e){super.array=e.map(n=>this.wrapData(n))}get array(){return super.array}log(e){console.log(`[table] ${e}`)}};it.PROVIDE_NAME="table-controller";function Yo(t){const e=r.reactive(t.array);r.provide(it.PROVIDE_NAME,t);const n=r.reactive(t.changes);t.on(Yt.EVENT_DATA,l=>e.splice(0,e.length,...l)),t.on(E.Form.EVENT_CHANGED,()=>{n.new=Object.keys(t.changes.new).reduce((l,a)=>{const c=Number(a);return l[c]=t.changes.new[c],l},{})});const o=r.computed(()=>[...e.reduce((l,a)=>{const c=a[q];return t.changes.remove.includes(c)||l.push({...a,...t.changes.edit[c]}),l},[]),...Object.values(n.new)]),s=E.Form.getParentForm();return s==null||s.subscribe(t),{activeRow:r.ref(null),array:o}}function Ko(t,e){t.read=()=>S.getList(t.name,{fields:e==null?void 0:e.fields}).then(n=>t.array=n).then(()=>t.emit(E.Form.EVENT_READ,t.array)),t.save=()=>{const n=t.name;Object.values(t.changes.new).forEach(async s=>{await S.create(n,s)}),Object.entries(t.changes.edit).forEach(async([s,i])=>{await S.updateById(t.name,o(Number(s)),i)});function o(s){const i=t.array.find(l=>l[q]===s);return i.id|i.Id}t.changes.remove.forEach(async s=>{await S.removeById(n,o(s),0)}),t.emit(E.Form.EVENT_SAVE)}}const Xo=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class Zo{static readHistoryById(e,n){return g(`/close-api/audits/history/${e}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}}).then(o=>{const s=o.history.map(i=>{if(!i.changes)return i;const l=i.changes.map(a=>({...a,oldValue:a.originalValue,name:a.fieldName}));return{...i,changes:l}});return{...o,history:s}})}}var Kt=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},M=(t,e,n)=>(Kt(t,e,"read from private field"),n?n.call(t):e.get(t)),z=(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)},G=(t,e,n,o)=>(Kt(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n),Se,ae,Ne,Be,le,ce,Ze;const J="_______LIST_______ROW_______INDEX________NAME_______",ge=class x extends O{constructor(e){super(),this.LIST_ROW_KEY=1,z(this,Se,void 0),this.array=[],z(this,ae,[]),z(this,Ne,[]),z(this,Be,new Proxy({},{set:(n,o,s,i)=>(n[o]=s,this.emit(x.EVENT_FILTERS_UPDATE,n),!0),deleteProperty:(n,o)=>(delete n[o],this.emit(x.EVENT_FILTERS_UPDATE,n),!0)})),z(this,le,!1),z(this,ce,(...n)=>Promise),z(this,Ze,()=>{}),G(this,Se,e.primaryKeys||[]),this.name=e.name||void 0,e.config&&G(this,ae,e.config)}set config(e){G(this,ae,e.map(E.utils.copyObject)),this.emitUpdateConfig()}get config(){return M(this,ae)}emitUpdateConfig(){this.emit(x.EVENT_CONFIG_UPDATE,this.config)}get order(){return M(this,Ne)}set order(e){G(this,Ne,e),this.emit(x.EVENT_ORDER_UPDATE,this.order)}get filters(){return M(this,Be)}set filters(e){tn(M(this,Be),e)}set wait(e){G(this,le,e),this.emit(E.Form.EVENT_WAIT,M(this,le))}get wait(){return M(this,le)}get primaryKeys(){return M(this,Se)}at(e){return this.array[e%this.array.length]}atByKey(e){return this.array.find(n=>n[J]===e)}indexByKey(e){return this.array.findIndex(n=>n[J]===e)}static getKey(e){return e[J]}static hasKey(e){return typeof e!="object"||e===null?!1:Object.prototype.hasOwnProperty.call(e,J)}add(...e){const n=this.wrapArray(e);this.array.push(...n),this.emit(x.EVENT_DATA,this.array)}set(e){this.array=[],this.add(...e)}removeByKey(e){const n=this.indexByKey(e);n!==-1&&(this.array.splice(n,1),this.emit(x.EVENT_DATA,this.array))}updateByKey(e,n){const o=this.atByKey(e);o&&(Object.assign(o,n),this.emit(x.EVENT_DATA,this.array))}wrapArray(e){return e.map(this.wrapItem.bind(this))}wrapItem(e){return this.isWrapped(e)?e:{...e,[J]:this.LIST_ROW_KEY++}}isWrapped(e){return Object.prototype.hasOwnProperty.call(e,J)}set read(e){G(this,ce,e)}get read(){return(...e)=>Promise.resolve().then(()=>{const n=M(this,ce).call(this,...e);return this.wait=!0,n}).finally(()=>this.wait=!1)}set save(e){G(this,ce,e)}get save(){return()=>Promise.resolve().then(()=>this.wait=!0).then(()=>M(this,Ze).call(this)).finally(()=>this.wait=!1)}static GetFieldNames(e){return e.reduce((n,o)=>(o.name&&(typeof o.name=="string"?n.push(o.name):n.push(...o.name)),n),[])}static mergeWithKey(e,n){return{...e,[J]:n}}static getCellName(e){return typeof e.name=="string"?e.name:Array.isArray(e.name)?e.name[0]:null}static getCellInfo(e,n){const o=x.getCellName(e),s=(()=>{let i=o?he(n,o):null;return i===void 0&&(i=null),e.value?e.value(i,n):i})();return{name:o,value:s}}};Se=new WeakMap;ae=new WeakMap;Ne=new WeakMap;Be=new WeakMap;le=new WeakMap;ce=new WeakMap;Ze=new WeakMap;ge.EVENT_DATA="list-data: update";ge.EVENT_CONFIG_UPDATE="list-config:update";ge.EVENT_ORDER_UPDATE="list-order:update";ge.EVENT_FILTERS_UPDATE="list-filters:update";let j=ge;function Xt(t,e){let n="",o=0,s=!1,i;t.read=(l={})=>{if(t.wait)return i;if(l.clean&&(n="",o=0,s=!1),s)return Promise.resolve([]);let a=e;typeof a=="function"&&(a=a());const c={};if(!t.name)throw new Error("Reading list`s data without name is not available.");a.order&&Array.isArray(a.order)&&a.order.length&&(c.order={[a.order[0]]:a.order[1]||"asc"}),a.fields&&(c.fields=a.fields),a.filter&&(c.filter=a.filter);const p=JSON.stringify(c.order)+JSON.stringify(c.filter)+JSON.stringify(c.fields);return p!==n&&!Number.isNaN(p)&&(o=0,n=p),"limit"in a&&(c.limit=a.limit),c.offset=o||a.offset||0,i=S.getList(t.name,c).then(d=>((o===0||l.clean)&&t.set([]),o+=c.limit,d)).then(d=>(t.add(...d),d.length===0&&(s=!0),d)),i}}function Zt(t){const e=r.reactive({wait:t.wait,array:[]});return t.on(j.EVENT_DATA,n=>{e.array.splice(0,e.array.length,...n.map(o=>Object.freeze(JSON.parse(JSON.stringify(o)))))}),t.on(E.Form.EVENT_WAIT,()=>{e.wait=t.wait}),e}function Qt(t,e){const n="list-flex-config",o=r.inject(n,void 0);if(o)return o;if(!t||!e)throw new Error("Hook useProvideList has two required params: list and defaultSettings");t.on(j.EVENT_CONFIG_UPDATE,()=>{t.read()});const s={list:t,defaultSettings:e};return r.provide(n,s),s}function Qo(t){const e=r.reactive([...t.config]);return t.on(j.EVENT_CONFIG_UPDATE,n=>{e.splice(0,e.length,...n)}),e}function en(t){const e=t.order||[],n=r.reactive(e);return t.on(j.EVENT_ORDER_UPDATE,o=>{n.splice(0,n.length,...o),t.read()}),n}function es(t){const e=r.ref(""),n=r.computed(()=>{const o=e.value.toLowerCase();return r.unref(t).filter(s=>e.value.length?Object.values(s).join().toLowerCase().includes(o):!0)});return{search:e,searchArray:n}}function tn(t,e){Object.keys(t).forEach(n=>delete t[n]),Object.entries(e).forEach(([n,o])=>{t[n]=o})}function ts(t){const e=r.reactive(E.utils.copyObject(t.filters));return t.on(j.EVENT_FILTERS_UPDATE,n=>{tn(e,n),t.read()}),e}function ns(t){const e=r.reactive([]);function n(a){return e.includes(a)}function o(a){n(a)||e.push(a)}function s(a){const c=e.findIndex(p=>p===a);c!==-1&&e.splice(c,1)}function i(a){const c=r.unref(t);if(a===void 0){e.length===0?c.forEach(o):c.forEach(s);return}n(a)?s(a):o(a)}const l=r.computed(()=>{const a=r.unref(t);return e.length===a.length&&a.length!==0});return[e,i,l,o,s]}class rs extends j{constructor(e){super(e),this.changes=[],this.save=os.bind(this)}get changed(){return!!this.changes.find(e=>e.status==="active")}addChange(e,n){this.changes.push({type:e,status:"active",data:this.wrapItem(n)})}}function os(){const t=this.changes.filter(e=>e.status==="active");return ot(t.map(e=>{console.log("++")}))}function ss(){const t=r.ref(null);function e(n){t.value=n&&hn(n)}return{activeRow:t,activateRow:e}}const is=Object.freeze(Object.defineProperty({__proto__:null,List:j,Table:rs,useListOrder:en,useListProvide:Qt,useListRead:Xt,useListState:Zt,useTableActiveRow:ss},Symbol.toStringTag,{value:"Module"}));class as extends O{constructor(){super(),this.EVENT_NEW="event:new-metadata",this.store={}}get(e){return this.store[e]}async load(e){return this.store[e]||this.set(e,await this.loadEntityInformation(e)),this.store[e]}set(e,n){this.store[e]=n,this.emit(this.EVENT_NEW,{entityName:e})}async loadEntityInformation(e){return await lt.get(e)}}const de=new as;function ls(t){const e=r.ref(de.get(t));return de.on(de.EVENT_NEW,n=>{t===n.entityName&&(e.value=de.get(t))}),e}function cs(t,e){try{return e.dataType==="DateTime"&&typeof t=="string"?new Date(t).toLocaleString():t}catch(n){at().error("prettify value by metadata",t,n)}}class ds{static getDictionary(e){if(!e)throw new Error(`Can't get dictionary for ${e}.`);return g(`/open-api/internationalization/language/${e}`)}}const us={class:"widget-wait flex gap_10 padding_15"},ps={class:"text_md"},fs=r.defineComponent({__name:"widget-wait",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",us,[r.createVNode(me,{color:"var(--primary)",class:"wait-spinner"}),r.createElementVNode("span",ps,r.toDisplayString(e.label),1)]))}});const ms=_(fs,[["__scopeId","data-v-2038b2ba"]]);let H={};function ee(t,...e){if(typeof t!="string")return console.trace(`Label is not provided for translation: ${t}`),"undefined";let n=E.utils.getPropFromObject((this==null?void 0:this.vocabulary)||H,t);if(typeof n=="string")return $t(n,e);const o=E.utils.getPropFromObject(H==null?void 0:H.root,t);return typeof o=="string"?$t(o,e):(typeof n===void 0&&console.warn(`Translation for label "${t}" is not founded.`),t)}function $t(t,e){return e.forEach((n,o)=>{t=t.replaceAll(new RegExp(`\\{${o}}`,"g"),n)}),t}ee.setGlobalVocabulary=function(t){H=t};ee.getScope=function(t){const e=typeof t=="string"?t:"root";return typeof t!="string"&&console.warn(`SCOPE ${t} for translate is not string.`),ee.bind({vocabulary:E.utils.getPropFromObject(H,e.toLowerCase())})};ee.setVocabulary=function(t){return typeof t=="string"&&(t=E.utils.getPropFromObject(H,t)),ee.bind({vocabulary:t})};const hs=function(){let t=!1;const e=[];function n(){return t}function o(c,p){n()&&console[c](...p),e.push(p)}function s(...c){o("log",c)}function i(...c){o("warn",c)}function l(...c){o("error",c)}function a(c=!0){t=c}return{info:s,warn:i,history:e,display:a,error:l}}();function at(){return hs}const gs={class:"breadcrumb__title"},_s=r.defineComponent({__name:"widget-breadcrumb-item",props:{active:{type:Boolean},title:{},link:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["breadcrumb flex",{breadcrumb_active:e.active}])},[r.createElementVNode("p",gs,r.toDisplayString(e.title),1),e.active?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(N,{key:0,class:"breadcrumb__icon",name:"caret-right"}))],2))}});const ys=_(_s,[["__scopeId","data-v-1702aee0"]]),vs={class:"widget-breadcrumbs"},ws=r.defineComponent({__name:"widget-breadcrumbs",props:{array:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",vs,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.array,(o,s)=>(r.openBlock(),r.createBlock(ys,{key:s,title:o.title,link:o.link,active:s===e.array.length-1},null,8,["title","link","active"]))),128))]))}});const Es=_(ws,[["__scopeId","data-v-1dfb2668"]]);function Cs(t){return nn(t,"YYYY/MM/DD HH:mm:ss")}function nn(t,e="YYYY/MM/DD"){if(!t)return"";try{const n=new Date(t);return Ft.format(n,e)}catch(n){return console.log(n),"Invalid date"}}function ks(t,e){const n=t.config.map(o=>bs(o,t,e));return r.h("tr",{class:"widget-table__row widget-table-row"},n)}function bs(t,e,n){const o=e.values,s=at();let{name:i,value:l}=j.getCellInfo(t,o);const a={onClick:[],class:["widget-table__cell widget-table-cell"]};function c(f){a.onClick.push(()=>f(o))}function p(f){Array.isArray(f)?a.class.push(...f):a.class.push(f)}const d=[],u=[];if(W.handleListCell)try{W.handleListCell(t,o,e,u)}catch(f){s.error("get-table-row","handle list cell",f)}if(t.hide&&t.hide(o))return[r.h("td")];if(t.type)switch(p(`widget-table-cell_${t.type}`),t.type){case"number":{typeof l=="number"&&(l=new Intl.NumberFormat().format(l));break}case"date":{l=nn(typeof l=="string"?l:null);break}case"dateTime":case"dateWithTime":{l=Cs(typeof l=="string"?l:null);break}case"multi-select":{u.push(r.h(E.FormField,{type:"single-checkbox",modelValue:e.selected})),c(St.bind(null,n,!0));break}case"select":{u.push(r.h(E.FormField,{type:"single-radio",modelValue:e.selected})),c(St.bind(null,n,!1));break}}if(t.checked){const f=t.checked(o);u.push(r.h(E.FormField,{type:"single-checkbox",modelValue:f}))}if(t.onClick&&c(t.onClick),t.link)try{const f=t.link(o);if(f){const m=r.h(tt.RouterLink,{to:f});u.push(m),p("list-cell-link")}}catch(f){console.warn("Error handle: Add Router link to cell",f)}return t.href&&(u.push(r.h("a",{href:t.href(o),target:"_blank"})),p("list-cell-link")),l!=null&&u.push(r.h("p",{class:"widget-list-cell-text"},l)),t.icon&&u.push(r.h(N,{name:t.icon})),t.class&&(typeof t.class=="function"?p(t.class(o)):p(t.class)),d.push(r.h("td",a,u)),d}function St(t,e){t.emit("select",e)}function $s(t,e){return()=>{try{return ks(t,e)}catch(n){return console.warn(n),null}}}const Ss={props:{config:Array,values:Object,selected:Boolean},setup:$s};const Ns=_(Ss,[["__scopeId","data-v-48d3df56"]]),Bs=t=>(r.pushScopeId("data-v-03c9724f"),t=t(),r.popScopeId(),t),Ts={class:"head-cell"},Is=Bs(()=>r.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Vs=r.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.`),(o,s)=>(r.openBlock(),r.createElementBlock("th",null,[r.createElementVNode("div",Ts,[r.createElementVNode("div",{class:"head-cell-content flex_grow",style:r.normalizeStyle({"min-width":o.minWidth,"max-width":o.maxWidth,width:o.width})},[o.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(E.FormField),{key:0,type:"single-checkbox",onClick:s[0]||(s[0]=r.withModifiers(i=>e("select"),["stop","prevent"]))})):(r.openBlock(),r.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:s[1]||(s[1]=i=>e("order"))},r.toDisplayString(o.title||o.label),1))],4),o.name&&o.order.length&&o.order[0]===o.name?(r.openBlock(),r.createBlock(r.unref(je),{key:0,class:r.normalizeClass(["head-cell-order",{"head-cell-order_down":o.order.length>1&&o.order[1]==="desc"}])},{default:r.withCtx(()=>[r.createTextVNode("core-arrow-up")]),_:1},8,["class"])):r.createCommentVNode("",!0),Is])]))}});const As=_(Vs,[["__scopeId","data-v-03c9724f"]]),Fs=r.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(t,{emit:e}){const n=t,o=r.ref(),s=r.ref();r.onMounted(()=>{function c(m,h){let v=-1;do v++,h-=m[v];while(h>0&&v<m.length);return v}function p(m,h){let v=0;for(;h>0&&h>m[v]&&v<m.length;)h-=m[v],v++;return console.log(h,v),v>0?v:0}function d(m){try{s.value.style.insetInlineStart=m+"px"}catch(h){console.log(h)}}function u(m){try{s.value.style.width=m+"px",s.value.style.minWidth=m+"px",s.value.style.maxWidth=m+"px"}catch(h){console.log(h)}}function f(m){return m===null?!1:m.classList.contains("head-cell-resize")}o.value.addEventListener("pointerdown",function(h){var gt;function v(A){return A.screenX+b-L}const C=o.value,y=[...C.children].filter(A=>A.localName==="th"),b=((gt=C.offsetParent)==null?void 0:gt.scrollLeft)||0,B=y.map(A=>A.clientWidth),V=f(h.target),L=C.getBoundingClientRect().left,U=v(h),$=c(B,U),ne=B.slice(0,$).reduce((A,R)=>A+R,0),ye=U-ne,qe=C.offsetWidth,re=y[$].clientWidth;if(n.config[$].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",h.screenX),console.log("Widths",B),console.log("max width",qe),console.log("Start Position",U),console.log("Position From",$),console.log("Start Position",$),console.log("Global offset (Отступ самой таблицы от края экрана)",L),console.log("Del",ye),console.groupEnd(),s.value.innerText=y[$].textContent||"",s.value.style.display="grid",s.value.style.width=re+"px",s.value.style.cursor="grabbing",d(ne),u(re),document.addEventListener("pointermove",ht,{passive:!0}),document.addEventListener("pointerup",mt);function mt(A){if(console.group("END"),document.removeEventListener("pointermove",ht),document.removeEventListener("pointerup",mt),V&&(n.config[$].width=s.value.style.width,n.config[$].minWidth=s.value.style.width,n.config[$].maxWidth=s.value.style.width,i(n.config)),!V){const R=A.screenX+b-L;console.log("ENP Position",R);const ve=p(B,R);if(console.log($,"->",ve),ve!==$){const oe=n.config[$],ze=n.config;ze.splice($,1),ze.splice(ve,0,oe),i(ze)}else{const oe=n.config[$].name;l(oe)}}s.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function ht(A){if(V){const oe=v(A)-U+re;u(oe);return}let R=A.screenX+b-L-ye;R<0&&(R=0),R+re>qe&&(R=qe-re),d(R)}})});function i(c){e("update:config",c)}function l(c){if(!c)return;if(Array.isArray(c)){if(c.length<1)return;c=c[0]}if(n.order.length===0||n.order[0]!==c)return void a([c]);const p=n.order.length===1||n.order[1]==="asc"?"asc":"desc";a([c,p==="asc"?"desc":"asc"])}function a(c){e("update:order",c)}return(c,p)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:o},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.config,(d,u)=>(r.openBlock(),r.createBlock(As,r.mergeProps({key:d},d,{onOrder:f=>l(d.name),onSelect:p[0]||(p[0]=f=>e("select")),order:c.order}),null,16,["onOrder","order"]))),128)),r.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:s},"test",512)],512))}});const Os=_(Fs,[["__scopeId","data-v-11644ad4"]]),Ps=50,Ds=r.defineComponent({__name:"widget-list",props:{array:{},wait:{type:Boolean},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(t,{emit:e}){const n=t;function o(a,c=!0){if(n.selectedRows)if(!c)i(n.selectedRows.includes(a)?[]:[a]);else{const p=[...n.selectedRows],d=p.indexOf(a);d===-1?p.push(a):p==null||p.splice(d,1),i(p)}}function s(){var a;if(((a=n.selectedRows)==null?void 0:a.length)!==n.array.length)return i([...n.array]);i([])}function i(a){e("update:selectedRows",a)}function l(a){if(!a)return;const c=a.target;c.scrollTop+c.clientHeight+Ps>c.scrollHeight&&e("scrollEnd")}return(a,c)=>(r.openBlock(),r.createElementBlock("div",{class:"es-list-container",onScrollPassive:l},[r.createElementVNode("table",{class:r.normalizeClass(["widget-list",{"widget-list_load":a.wait}])},[r.createElementVNode("thead",null,[r.createVNode(Os,{onSelect:c[0]||(c[0]=p=>s()),"onUpdate:order":c[1]||(c[1]=p=>e("update:order",p)),"onUpdate:config":c[2]||(c[2]=p=>e("update:config",p)),config:a.config,order:a.order},null,8,["config","order"])]),r.createElementVNode("tbody",{class:r.normalizeClass(["widget-list-body",{"widget-list-body_inactive":a.wait}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.array,(p,d)=>{var u;return r.openBlock(),r.createBlock(Ns,{key:d,class:"widget-list-row",values:p,config:a.config,selected:(u=a.selectedRows)==null?void 0:u.includes(p),onSelect:f=>o(p,f)},null,8,["values","config","selected","onSelect"])}),128))],2)],2)],32))}});const Ls=_(Ds,[["__scopeId","data-v-a0fe6a42"]]),Rs={class:"widget-section"},Ws={class:"widget-section__header"},Ms={class:"widget-section-title"},xs={class:"widget-section__body"},js=r.defineComponent({__name:"widget-section",props:{title:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Rs,[r.createElementVNode("div",Ws,[r.createElementVNode("p",Ms,r.toDisplayString(e.title),1)]),r.createElementVNode("div",xs,[r.renderSlot(e.$slots,"default",{},void 0,!0)])]))}});const Us=_(js,[["__scopeId","data-v-07232553"]]),qs={class:"widget-form-info flex"},zs={class:"form-titles"},Gs={class:"form-title margin-0"},Js={class:"form-info text_size_md margin-0"},Hs={key:0,class:"form-container-label"},Ys={class:"form-label__title text_size_sm"},Ks=r.defineComponent({__name:"WidgetFormInfo",props:{title:{},info:{},label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",qs,[r.createElementVNode("div",zs,[r.createElementVNode("p",Gs,r.toDisplayString(e.title),1),r.createElementVNode("p",Js,r.toDisplayString(e.info),1)]),e.label?(r.openBlock(),r.createElementBlock("div",Hs,[r.createElementVNode("div",{class:r.normalizeClass(["form-label",`form-label_${e.label.type}`])},[e.label.icon?(r.openBlock(),r.createBlock(N,{key:0,class:"form-label__icon",name:e.label.icon},null,8,["name"])):r.createCommentVNode("",!0),r.createElementVNode("p",Ys,r.toDisplayString(e.label.title),1)],2)])):r.createCommentVNode("",!0)]))}});const Xs=_(Ks,[["__scopeId","data-v-6ea1062c"]]),Zs={class:"wrap__widget-form"},Qs={class:"widget-form"},ei={class:"widget-form__head"},ti={class:"head-image"},ni={key:1},ri={class:"widget-form__body"},oi=r.defineComponent({__name:"WidgetForm",props:{title:{},info:{},image:{},icon:{},label:{},button:{},wait:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Zs,[r.createElementVNode("div",Qs,[r.createElementVNode("div",ei,[r.createElementVNode("div",ti,[e.wait?(r.openBlock(),r.createBlock(me,{key:0,color:"#3949AB"})):(r.openBlock(),r.createElementBlock("div",ni,[e.icon?(r.openBlock(),r.createBlock(N,{key:0,class:"form-image",name:e.icon},null,8,["name"])):r.createCommentVNode("",!0)]))]),r.createVNode(Xs,{title:e.title,info:e.info,label:e.label},null,8,["title","info","label"]),e.button&&e.button.length?(r.openBlock(),r.createBlock(Pt,{key:0,class:"widget-form__button",array:e.button},null,8,["array"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",ri,[r.renderSlot(e.$slots,"default",{},void 0,!0)])])]))}});const si=_(oi,[["__scopeId","data-v-f076ad65"]]),ii={class:"validation-item-header"},ai={class:"validation-item__title text_bold margin-0"},li={class:"validation-item-content"},ci={class:"text_bold text_md margin-0"},di={class:"text_md margin-0"},ui=r.defineComponent({__name:"modal-validation-item",props:{message:{},status:{},statusName:{},title:{},name:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["validation-item",`validation-item_${e.statusName.toLowerCase()}`])},[r.createElementVNode("div",ii,[r.createElementVNode("p",ai,r.toDisplayString(e.statusName),1)]),r.createElementVNode("div",li,[r.createElementVNode("p",ci,r.toDisplayString(e.title),1),r.createElementVNode("p",di,r.toDisplayString(e.message),1)])],2))}});const pi=_(ui,[["__scopeId","data-v-e6138c02"]]),fi={class:"modal-wrap"},mi={class:"modal-wrap-head"},hi={class:"modal-head__title margin-0"},gi={class:"modal-wrap-body"},_i=r.defineComponent({__name:"modal-wrap",props:{title:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",fi,[r.createElementVNode("div",mi,[r.createElementVNode("p",hi,r.toDisplayString(e.title),1)]),r.createElementVNode("div",gi,[r.renderSlot(e.$slots,"default",{},void 0,!0)])]))}});const yi=_(_i,[["__scopeId","data-v-119165b9"]]),vi={class:"modal-validation-body"},wi=r.defineComponent({__name:"modal-validation",props:{array:{}},setup(t){return(e,n)=>(r.openBlock(),r.createBlock(yi,{title:"Validation results"},{default:r.withCtx(()=>[r.createElementVNode("div",vi,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.array,(o,s)=>(r.openBlock(),r.createBlock(pi,{key:s,message:o.message,name:o.name,status:o.statusCode,"status-name":o.statusName,title:o.title},null,8,["message","name","status","status-name","title"]))),128))])]),_:1}))}});const Ei=_(wi,[["__scopeId","data-v-a39cfe2f"]]),Ci=["alt","src"],ki=r.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(t){const e=t,n=r.ref();return r.onMounted(()=>{n.value&&(n.value.src=e.src),n.value.onerror=function(){e.default&&(n.value.src=e.default)}}),(o,s)=>(r.openBlock(),r.createElementBlock("img",{alt:o.alt,ref_key:"refImage",ref:n,src:o.src||o.$props.default},null,8,Ci))}}),bi=r.defineComponent({__name:"widget-input-check",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;function o(){e("update:modelValue",!n.modelValue)}return(s,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["widget-input-check",{"widget-input-check_active":s.modelValue}]),onClick:o},[s.modelValue?(r.openBlock(),r.createBlock(N,{key:0,name:"check"})):r.createCommentVNode("",!0)],2))}});const $i=_(bi,[["__scopeId","data-v-f4a3dc6c"]]),Si={class:"widget-card"},Ni={class:"widget-card-toggle"},Bi={class:"widget-card-wrap"},Ti={class:"widget-card-content"},Ii={key:0,class:"widget-card-title"},Vi=r.defineComponent({__name:"widget-card",props:{title:{}},setup(t,{expose:e}){const n=r.reactive({selected:!1,hidden:!0});return e({state:n}),(o,s)=>(r.openBlock(),r.createElementBlock("div",Si,[r.createElementVNode("div",Ni,[r.createVNode($i,{modelValue:n.selected,"onUpdate:modelValue":s[0]||(s[0]=i=>n.selected=i)},null,8,["modelValue"])]),r.createElementVNode("div",Bi,[r.createElementVNode("div",{class:"widget-card-arrow",onClick:s[1]||(s[1]=i=>n.hidden=!n.hidden)},[r.createVNode(N,{name:"angle-small-right",class:r.normalizeClass(["card-icon-arrow",{"card-icon-arrow_active":!n.hidden}])},null,8,["class"])]),r.createElementVNode("div",Ti,[o.title?(r.openBlock(),r.createElementBlock("p",Ii,r.toDisplayString(o.title),1)):r.createCommentVNode("",!0),r.renderSlot(o.$slots,"main",{},void 0,!0),n.hidden?r.createCommentVNode("",!0):r.renderSlot(o.$slots,"sub",{key:1},void 0,!0)])])]))}});const Ai=_(Vi,[["__scopeId","data-v-bca33c5b"]]);class T{static parseError(e){let n=e.errors?Object.values(e.errors).map(o=>o[0]):null;throw I.AuthServiceError(e.title,n)}static login(e){return g(W.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...e,AppName:W.applicationName})}).catch(T.parseError)}static registration(e){return e.AppName=W.applicationName,g(W.identityServerURL+"/api/Authenticate/Registration",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(e)}).catch(T.parseError)}static parseProcessAnswer(e){if(e.statusCode>4)throw I.UndefinedError(e.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return e}static startRegistrationProcess(e){return T.requestStepRegistrationProcess("StartRegistration",e)}static confirmPhoneRegistrationProcess(e){return T.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",e)}static confirmEmailRegistrationProcess(e){return T.requestStepRegistrationProcess("ConfirmEmailByRegistration",e)}static finishEmailRegistrationProcess(e){return T.requestStepRegistrationProcess("FinishRegistration",e)}static requestStepRegistrationProcess(e,n){return g(`${W.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).catch(T.parseError)}static startLoginProcess(e){return T.requestStepLoginProcess("StartLogin",e)}static loginWithPassword(e){return T.requestStepLoginProcess("LoginWithPassword",e)}static loginWithOtpCode(e){return T.requestStepLoginProcess("LoginWithOtpCode",e)}static requestStepLoginProcess(e,n){return g(`${W.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).catch(T.parseError).then(T.parseLoginProcessAnswer)}static parseLoginProcessAnswer(e){if(e.statusCode>3)throw I.UndefinedError(e.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return e}}const rn=class ue{static async create(e){return g(ue.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 g(ue.url+"?"+n.toString(),{method:"get"})}static async readMessages(e){return g(`${ue.url}/${e}/messages`,{method:"get"})}static async createMessage(e){return g(`${ue.url}/${e.talkId}/messages`,{method:"post",body:JSON.stringify({text:e.text}),headers:{"Content-Type":"application/json"}})}};rn.url="/close-api/communications";let fe=rn;class Fi{static async getDefaultView(e){return g("/close-api/views/"+e,{method:"GET",headers:{"Content-Type":"application/json"}})}}function Nt(t){return{...t,createdEntities:t.createdEntites}}const on=class Te{static async getStartConfig(e,n){return g([Te.url,e,n].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(e,n){return g([Te.url,e,n].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(Nt)}static async runStep(e,n,o,s,i){return g([Te.url,e,n].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:o,token:s,values:i})}).then(Nt)}};on.url="/close-api/views/process-wizard";let Ie=on;class lt{static get url(){return"/close-api/metadata"}static async get(e,n,o){console.warn("GETTING METADATA BY DEPRECATED METHOD."),console.trace();const s=new URLSearchParams;return n&&s.append("criteria",n),o&&s.append("id",String(o)),await fetch(this.url+`/${e}?${s.toString()}`,{method:"GET"}).then(i=>i.json())}static getById(e,n,o=[]){const s=new URLSearchParams;return Ae(s,o),n&&s.append("id",n),g([this.url,e].join("/")+`?${s.toString()}`)}static getFieldInformation(e,n){return g(`/open-api/metadata/${e}/fields/${n}`)}static getTreatmentListField(e,n){return g(`/open-api/metadata/${e}/list-fields/${n}`)}}class Oi{static invite(e,n,o){return g("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:e,personKey:n,relatedRoleCode:o})})}static accept(e,n){return g("/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 g("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e,version:n,mark:!1})})}}class ct{static get url(){return"/close-api/rules-validation/"}static validate(e,n){return g(ct.url+e,{method:"POST",body:JSON.stringify(n)})}}class Pi{static getConfiguration(){return g("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}}class sn{static url(){return"/close-api/actions"}static async get({criterion:e}){const n=new URLSearchParams;return e&&n.append("criterion",e),await fetch(this.url()+`?${n.toString()}`,{method:"GET"}).then(o=>o.json())}static getById(e,n,o=[]){const s=new URLSearchParams;return Ae(s,o),g([this.url(),e,n].join("/")+`?${s.toString()}`,{method:"GET"})}}const an=class ln extends O{constructor(e=[]){super(),this.array=r.reactive([]),this.defaultArray=[],this.setDefault(e)}emitUpdate(){this.emit(ln.EVENT_DATA,this.array)}setDefault(e){const n=JSON.parse(JSON.stringify(e));this.defaultArray=n,this.set(n)}revert(){this.set(this.defaultArray)}set(e){this.array.splice(0,this.array.length,...e),this.emitUpdate()}append(e){this.array.push(e),this.emitUpdate()}moveTo(e,n){if(this.isOutOfRange(e)||this.isOutOfRange(n))throw new Error(`Provided position is out of range: ${e}, ${n}`);const o=this.array[e];this.array.splice(e,1),this.array.splice(n,0,o),this.emitUpdate()}remove(e){this.array.splice(e,1),this.emitUpdate()}isOutOfRange(e){return!(e>=0&&e<this.array.length)}};an.EVENT_DATA="list-config:update";let Di=an;class Li extends O{constructor(e){super(),this.name="Communication",this.read=()=>{},this.id=e}sendMessage(e){return fe.createMessage({talkId:this.id,text:e})}static checkAndGenerate(e){return fe.read(e).then(n=>n.length===0?fe.create(e):n[0])}}function Ri(t){const e=E.Form.getParentForm();e?e.subscribe(t):console.warn(I.ParentFormNotFound());const n=r.reactive([]);return t.read=()=>fe.readMessages(t.id).then(o=>(n.splice(0,n.length,...o),o)),{array:n}}function Wi(t){return typeof t!="object"||t===null?!1:!!(t.hasOwnProperty("start")||t.hasOwnProperty("end"))}function D(t){return Object.keys(t).reduce((e,n)=>{const o=t[n];if(Array.isArray(o)){const s=o.map(i=>typeof i=="string"?`'${i}'`:i).join(", ");return o.length&&e.push(`@${n} in (${s})`),e}if(Wi(o)){let s=function(i){var l;return((l=i.match(/([^Z]*)/))==null?void 0:l[0])+"0000Z"};return o.start&&e.push(`@${n} ge ${s(o.start)}`),o.end&&e.push(`@${n} le ${s(o.end)}`),e}return typeof o=="number"?(e.push(`@${n} eq ${o}`),e):typeof o=="string"?(o.length!==0&&e.push(`@${n} eq '${o}'`),e):(o===null&&e.push(D.is(n,o)),e)},[]).join(" and ")}function _e(t){return typeof t=="string"?`'${t}'`:`${t}`}D.includes=function(e,n){return`@${e} Contains ${_e(n)}`};D.beginWith=function(e,n){return`@${e} BeginWith ${_e(n)}`};D.notEq=function(e,n){return`@${e} nq ${_e(n)}`};D.eq=function(e,n){return Array.isArray(n)?D.in(e,n):`@${e} eq ${_e(n)}`};D.in=function(e,n){const o=n.map(_e).join(", ");return`@${e} in (${o})`};D.and=function(...e){return e.join(" and ")};D.is=function(e,n){return`@${e} is ${n}`};D.or=function(...e){return e.join(" or ")};function Mi(t,e="images"){return`/static-folder/${e}/${t}`}function xi(t,e,n){return t.reduce((o,s)=>{var a;let i=typeof e=="function"?e(s):s[e];const l=(a=o[o.length-1])==null?void 0:a.value;return l&&n(l,i)?o[o.length-1].array.push(s):o.push({value:i,array:[s]}),o},[])}function ji(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}function Ui(t,e=1e3){let n=0;return(...o)=>{clearTimeout(n),n=setTimeout(()=>t(...o),e)}}function qi(t,e){const n=r.ref(null);function o(){return t.name?lt.getById(t.name,e,[]).then(s=>{n.value=s,s.fields.forEach(i=>{i.canSet?t.enable(i.name):t.disable(i.name)})}).catch(()=>{n.value=null;const s=I.MetadataEntityIsNotAvailable(t.name||"FORM_WITHOUT_NAME");P.add("error",s.message)}):Promise.reject()}return t.on(E.Form.EVENT_READ,o),{metadata:n,update:o}}class dt extends Error{static UndefinedStatus(){return new dt("Status is undefined.")}}class zi extends dt{}function Gi(t,e){const n=r.reactive([]);async function o(i,l){if(!i)throw zi.UndefinedStatus();const a=await sn.get({criterion:i});n.splice(0,n.length),n.push(...a.map(c=>s(c,l)))}return{actions:n,update:o};function s(i,l){return{title:i.title,callback:()=>(()=>Promise.resolve().then(()=>{if(t.changed)return t.save()}).then(()=>fetch(i.url,{method:"POST",body:JSON.stringify({keys:{Id:l},contextId:w.contextId}),headers:{"Content-Type":"application/json"}})).then(c=>c.json()).then(c=>{if(!c.success)throw e!=null&&e.ModalValidationResult&&c.validationEffect?At.openModal(e.ModalValidationResult,{rules:c.validationEffect.results}):P.add("error",c.message),new Error;return c}).then(c=>{c.message&&P.add("info",c.message),e!=null&&e.handleAffectedEntities&&e.handleAffectedEntities(c.affectedEntities)}).then(()=>t.read()))()}}}class Fe{static url(){return"/close-api/presentation"}static getStatuses(e,n){return fetch(`${Fe.url()}/status/${e}/${n}`).then(o=>o.json())}}function Ji(t){const e=r.reactive({title:"Loading",type:"wait"});function n(o){if(t.name&&Number.isInteger(o))return Fe.getStatuses(t.name,o).then(s=>{e.type=s.type,e.title=s.name})}return t.on(E.Form.EVENT_READ,o=>{var l,a;const{code:s,name:i}={code:(l=o.Status)==null?void 0:l.Code,name:(a=o.Status)==null?void 0:a.Name};return t.name?!Number.isInteger(s)&&!i?void console.log("Undefined code or name is Status prop."):Fe.getStatuses(t.name,s).then(c=>{e.type=c.type,e.title=i}):void console.log("Form without name.")}),{label:e,update:n}}function Hi(t,e){const n=tt.useRoute(),o=r.computed(()=>Number(n.params.id)),s=r.reactive({ready:!1,show:!1});return r.watch(()=>o.value,()=>{s.ready=!1}),r.watch(()=>o.value,()=>{Number.isInteger(o.value)&&t.read()},{immediate:!0}),t.read=pe.requestHandler.bind(null,()=>Promise.resolve().then(()=>{if(!t.name)throw new Error("Form without entity name. Please set form.name");return S.readById(t.name,o.value,{fields:e.fields})}).then(pe.valuesToUpperCase).then(i=>(Number.isInteger(i.Version)&&(t.version=i.Version),t.setValues(i),s.show=!0,i)).catch(i=>{throw Object.prototype.hasOwnProperty.call(i,"status")&&[403,404].includes(i.status)&&(s.show=!1),i}).finally(()=>{s.ready=!0})),t.save=pe.requestHandler.bind(null,()=>Promise.resolve().then(()=>{if(!t.name)throw new Error("Form without entity name. Please set form.name");return S.updateById(t.name,o.value,t.changes,{version:t.version})}).then(i=>{t.version=i.version})),t.on(E.Form.EVENT_SAVE,t.read.bind(t)),{formShadowState:s}}function Yi(){const t=r.reactive({contextId:w.contextId,person:w.person,organizations:w.organizations,ready:w.ready,user:w.user}),e=r.computed(()=>{if(!w.ready||!w.person)return null;const o=t.contextId;return w.person.id===o?w.person:w.organizations.find(s=>s.id===o)||null}),n=r.computed(()=>{var o;return t.contextId===((o=t.person)==null?void 0:o.id)});return w.onupdateContext(o=>{t.contextId=o}),w.onupdateData(()=>{t.person=w.person,t.organizations=w.organizations,t.user=w.user}),w.onReady(o=>{t.ready=o}),{state:r.readonly(t),currentContext:e,isPerson:n}}function Ki(t,e){const n=r.reactive({ready:!1,show:!1});function o(){n.ready=!1,n.show=!1}return t.read=()=>{let s=e();return Promise.resolve().then(()=>{if(!t.name)throw I.EntityWithoutName("Use Form Request");return S.readById(t.name,s.id,{fields:s.fields})}).then(pe.valuesToUpperCase).then(i=>(i.hasOwnProperty("Version")&&(t.version=Number(i.Version)),t.setValues(i),n.show=!0,i)).catch(i=>{const l=yt(i);throw P.add("error",l.message),l}).finally(()=>{n.ready=!0})},t.save=()=>{let s=e();return Promise.resolve().then(()=>{if(!t.name)throw I.EntityWithoutName("Use Form Request");return S.updateById(t.name,s.id,t.changes,{version:t.version})}).then(i=>{t.version=i.version||i.Version}).catch(i=>{const l=yt(i);throw P.add("error",l.message),l})},t.on(E.Form.EVENT_SAVE,t.read.bind(t)),{shadowFormState:n,initShadow:o}}class Xi{static getRequiredDocuments(e,n,o){const s=new URLSearchParams({entity:e,primaryKey:n,statusCode:o});return fetch(`/close-api/views/required-documents?${s.toString()}`).then(i=>i.json())}}class Q{static url(){return"close-api/billing"}static getBillingMetadata(e){return fetch(`/${Q.url()}/calculator/${e}`)}static calculate(e,n){return g(`/${Q.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:e,values:n})}).then(o=>{if(o&&o.status===1)return o;throw Array.isArray(o.notes)?new Error(o.notes[0]):I.ApiNotAvailable()})}static parseMetadataField(e){function n(o){switch(o.type){case"ValueType":switch(o.dataType){case"Integer":return"number";default:return o.dataType}case"EntityReference":return o.dataType}}return{name:e.name,label:e.title,required:e.required,type:n(e)}}static createOnlinePayment(e,n){return g(`/${Q.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:e,returnURL:n})})}static applyOnlinePayment(e){return g(`/${Q.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:e})})}}class Zi{static getListSettings(e,n){const o=new URLSearchParams;o.set("entity",e),n&&o.set("mark",n);const s=`/close-api/views/list/configs?${o.toString()}`;return g(s)}}function Qi(t){return t.statusName==="Completed"}function ea(t){return t.statusName==="FinalStepWithConfirmation"}function ta(t){return t.statusName==="ValidationError"}function na(t,e,n){let o=null;const s=r.reactive({wait:null});let i=[],l=null;const a=r.ref(null);function c(){a.value=i.find(y=>y.name===l)||null}function p(){var y;return l?((y=i.find(b=>b.name===l))==null?void 0:y.fields)||[]:[]}function d(y){if(c(),ta(y))return void n.onValidation(y.validationResults);if((y.statusName==="FinalStep"||y.statusName==="NextStep")&&(!p().length||ra(p(),n.presets)))return C(n.presets||{});Qi(y)&&n.onCompleted(y),ea(y)&&n.onConfirmation(y)}async function u(){try{await f(),await v()}catch(y){const{message:b}=Oe(y);Pe.add("error",b)}}function f(){return s.wait="Loading process information.",Ie.getStartConfig(e,t).then(y=>{i=y.steps.map(b=>({label:b.title,name:b.stepName,number:b.number,fields:b.frontendEntity.objectTypes.reduce((B,V)=>(V.properties.forEach(L=>{B.push({name:L.name,label:L.title,type:L.refEntityName||L.dataType})}),B),[])}))}).then(y=>(s.wait=!1,y))}function m(y){return l=y.nextStepName,o=y.token,y}function h(y){const b=Oe(y);Pe.add("error",b.message)}function v(){return s.wait="Starting process",Ie.startProcess(e,t).then(m).then(d).catch(h).finally(()=>{s.wait=null})}function C(y={}){return!o||!l?Promise.reject("Not step or token."):(s.wait="Expect the result",Ie.runStep(e,t,l,o,y).then(m).then(d).catch(h).finally(()=>{s.wait=!1}))}return{initialize:u,state:s,currentStepConfig:r.readonly(a),next:C}}function ra(t,e){for(let n=0;n<t.length;n++){const o=t[n];if(!E.utils.getPropFromObject(e,o.name))return!1}return!0}const oa="close-api/proxy/Equipment/Search";class sa{static search(e,n,o,s,i){const l=new URLSearchParams;l.append("pattern",e||""),n&&l.append("categoryId",n),o&&l.append("useType",String(o)),s&&l.append("statusCode",s),i&&(l.append("limit",String(i.limit)),l.append("offset",String(i.offset)));const a=`/${oa}?${l.toString()}`;return g(a,{method:"GET",headers:{"Content-Type":"application/json"}})}}const ia={class:"widget-table__head"},aa={class:"widget-table__head-label margin_0 text_overflow"},la=r.defineComponent({__name:"widget-table-head",props:{config:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("tr",ia,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.config,(o,s)=>(r.openBlock(),r.createElementBlock("th",{class:"widget-table__head-cell",key:s},[r.createElementVNode("p",aa,r.toDisplayString(o.label),1)]))),128))]))}});const ca=_(la,[["__scopeId","data-v-25198f4a"]]);function da(t){return typeof t.name=="string"?t.name:Array.isArray(t.name)?t.name[0]:null}function ua(t,e){const n=da(t);let o=n?E.utils.getPropFromObject(e,n):null;return o===void 0&&(o=null),t.value?t.value(o,e):o}function pa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Qe={exports:{}},Ke,Bt;function fa(){if(Bt)return Ke;Bt=1;var t=1e3,e=t*60,n=e*60,o=n*24,s=o*7,i=o*365.25;Ke=function(d,u){u=u||{};var f=typeof d;if(f==="string"&&d.length>0)return l(d);if(f==="number"&&isFinite(d))return u.long?c(d):a(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function l(d){if(d=String(d),!(d.length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(u){var f=parseFloat(u[1]),m=(u[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return f*i;case"weeks":case"week":case"w":return f*s;case"days":case"day":case"d":return f*o;case"hours":case"hour":case"hrs":case"hr":case"h":return f*n;case"minutes":case"minute":case"mins":case"min":case"m":return f*e;case"seconds":case"second":case"secs":case"sec":case"s":return f*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function a(d){var u=Math.abs(d);return u>=o?Math.round(d/o)+"d":u>=n?Math.round(d/n)+"h":u>=e?Math.round(d/e)+"m":u>=t?Math.round(d/t)+"s":d+"ms"}function c(d){var u=Math.abs(d);return u>=o?p(d,u,o,"day"):u>=n?p(d,u,n,"hour"):u>=e?p(d,u,e,"minute"):u>=t?p(d,u,t,"second"):d+" ms"}function p(d,u,f,m){var h=u>=f*1.5;return Math.round(d/f)+" "+m+(h?"s":"")}return Ke}function ma(t){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=s,n.enabled=l,n.humanize=fa(),n.destroy=p,Object.keys(t).forEach(d=>{n[d]=t[d]}),n.names=[],n.skips=[],n.formatters={};function e(d){let u=0;for(let f=0;f<d.length;f++)u=(u<<5)-u+d.charCodeAt(f),u|=0;return n.colors[Math.abs(u)%n.colors.length]}n.selectColor=e;function n(d){let u,f=null,m,h;function v(...C){if(!v.enabled)return;const y=v,b=Number(new Date),B=b-(u||b);y.diff=B,y.prev=u,y.curr=b,u=b,C[0]=n.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let V=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(U,$)=>{if(U==="%%")return"%";V++;const ne=n.formatters[$];if(typeof ne=="function"){const ye=C[V];U=ne.call(y,ye),C.splice(V,1),V--}return U}),n.formatArgs.call(y,C),(y.log||n.log).apply(y,C)}return v.namespace=d,v.useColors=n.useColors(),v.color=n.selectColor(d),v.extend=o,v.destroy=n.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==n.namespaces&&(m=n.namespaces,h=n.enabled(d)),h),set:C=>{f=C}}),typeof n.init=="function"&&n.init(v),v}function o(d,u){const f=n(this.namespace+(typeof u>"u"?":":u)+d);return f.log=this.log,f}function s(d){n.save(d),n.namespaces=d,n.names=[],n.skips=[];let u;const f=(typeof d=="string"?d:"").split(/[\s,]+/),m=f.length;for(u=0;u<m;u++)f[u]&&(d=f[u].replace(/\*/g,".*?"),d[0]==="-"?n.skips.push(new RegExp("^"+d.slice(1)+"$")):n.names.push(new RegExp("^"+d+"$")))}function i(){const d=[...n.names.map(a),...n.skips.map(a).map(u=>"-"+u)].join(",");return n.enable(""),d}function l(d){if(d[d.length-1]==="*")return!0;let u,f;for(u=0,f=n.skips.length;u<f;u++)if(n.skips[u].test(d))return!1;for(u=0,f=n.names.length;u<f;u++)if(n.names[u].test(d))return!0;return!1}function a(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function c(d){return d instanceof Error?d.stack||d.message:d}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var ha=ma;(function(t,e){e.formatArgs=o,e.save=s,e.load=i,e.useColors=n,e.storage=l(),e.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const p="color: "+this.color;c.splice(1,0,p,"color: inherit");let d=0,u=0;c[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(d++,f==="%c"&&(u=d))}),c.splice(u,0,p)}e.log=console.debug||console.log||(()=>{});function s(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function i(){let c;try{c=e.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function l(){try{return localStorage}catch{}}t.exports=ha(e);const{formatters:a}=t.exports;a.j=function(c){try{return JSON.stringify(c)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}})(Qe,Qe.exports);var ga=Qe.exports;const cn=pa(ga);function dn(t){return["eservices-core",t].join(":")}function ut(t){return xe(t,"YYYY/MM/DD HH:mm:ss")}function xe(t,e="YYYY/MM/DD"){if(!t)return"";try{const n=new Date(t);return Ft.format(n,e)}catch(n){return console.log(n),"Invalid date"}}const _a={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()=>r.h("i",{class:`icon icon-${n}`})}},je=_(_a,[["__scopeId","data-v-e287c8d9"]]),ya=cn(dn("setup-list-row"));function va(t,e){const n=t.config.map(o=>wa(o,t,e));return r.h("tr",{class:"widget-table__row widget-table-row"},n)}function wa(t,e,n){const o=e.values;let s=ua(t,o);const i={onClick:[],class:["widget-table__cell widget-table-cell"]};function l(d){i.onClick.push(()=>d(o))}function a(d){Array.isArray(d)?i.class.push(...d):i.class.push(d)}const c=[],p=[];if(t.hide&&t.hide(o))return[r.h("td")];if(t.type)switch(a(`widget-table-cell_${t.type}`),t.type){case"number":{typeof s=="number"&&(s=new Intl.NumberFormat().format(s));break}case"date":{s=xe(typeof s=="string"?s:null);break}case"dateTime":case"dateWithTime":{s=ut(typeof s=="string"?s:null);break}case"multi-select":{p.push(r.h(E.FormField,{type:"single-checkbox",modelValue:e.selected})),l(Tt.bind(null,n,!0));break}case"select":{p.push(r.h(E.FormField,{type:"single-radio",modelValue:e.selected})),l(Tt.bind(null,n,!1));break}}if(t.onClick&&l(t.onClick),t.link)try{const d=t.link(o);if(d){const u=r.h(tt.RouterLink,{to:d});p.push(u),a("widget-table-cell_link")}}catch(d){ya("Can't add router link",d)}return t.href&&(p.push(r.h("a",{href:t.href(o),target:"_blank"})),a("widget-table-cell_link")),(typeof s=="string"||typeof s=="number")&&p.push(r.h("p",{class:"widget-list-cell-text"},s)),t.icon&&p.push(r.h(je,{name:t.icon})),t.class&&(typeof t.class=="function"?a(t.class(o)):a(t.class)),c.push(r.h("td",i,p)),c}function Tt(t,e){t.emit("select",e)}function Ea(t,e){return()=>{try{return va(t,e)}catch(n){return console.warn(n),null}}}const Ca={props:{values:Object,config:Object,selected:Boolean},setup:Ea},ka=["colspan"],It=r.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(t,{emit:e}){const n=r.ref();return r.onMounted(()=>{setTimeout(()=>{n.value&&n.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(o,s)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:n},[r.createElementVNode("td",{colspan:o.rowLength},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.component),r.mergeProps(o.$attrs,{values:o.values,new:o.isNew,onClose:s[0]||(s[0]=i=>e("close")),onSave:s[1]||(s[1]=i=>e("save",i))}),null,16,["values","new"]))],8,ka)],512))}}),pt={LIST_ACTIVE_NEW:"list-active-new",DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go."},ba={class:"widget-table"},Vt="update:selectedRows",$a=r.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{}},emits:["update:activeRow","save"],setup(t,{emit:e}){const n=t,o=r.useSlots(),s=r.computed(()=>{var a;return(a=o==null?void 0:o.default)==null?void 0:a.call(o)[0]});function i(a,c=!0){if(!n.selectedRows)return;if(!c)return e(Vt,n.selectedRows.includes(a)?[]:[a]);const p=[...n.selectedRows],d=p.indexOf(a);return d===-1?p.push(a):p.splice(d,1),e(Vt,p)}function l(a){e("save",a),e("update:activeRow",null)}return(a,c)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("table",ba,[r.createVNode(ca,{config:a.config},null,8,["config"]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.array,(p,d)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:d},[r.createVNode(Ca,{config:a.config,values:p,selected:a.selectedRows.includes(p),onSelect:u=>i(p,u),class:r.normalizeClass(a.classCallback?a.classCallback(p):"")},null,8,["config","values","selected","onSelect","class"]),s.value&&a.activeRow===p?(r.openBlock(),r.createBlock(It,{key:0,component:s.value,"row-length":a.config.length,values:p,onClose:c[0]||(c[0]=u=>e("update:activeRow",null)),onSave:l,"is-new":!1},null,8,["component","row-length","values"])):r.createCommentVNode("",!0)],64))),128)),a.activeRow===r.unref(pt).LIST_ACTIVE_NEW?(r.openBlock(),r.createBlock(It,{key:0,component:s.value,"row-length":a.config.length,onClose:c[1]||(c[1]=p=>e("update:activeRow",null)),onSave:l,"is-new":!0},null,8,["component","row-length"])):r.createCommentVNode("",!0)])])]))}}),Sa=r.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:"widget-spinner",style:r.normalizeStyle({"border-left":`1.1em solid ${e.color}`})},null,4))}});const Ue=_(Sa,[["__scopeId","data-v-0ef9ae88"]]),Na={class:"widget-button"},Ba=r.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("button",Na,[e.wait?(r.openBlock(),r.createBlock(Ue,{key:0,class:"widget-button-spinner"})):r.createCommentVNode("",!0),r.renderSlot(e.$slots,"default",{},void 0,!0)]))}});const Ta=_(Ba,[["__scopeId","data-v-450dc564"]]),Ia={class:"widget-multi-button-wrap position_relative cursor_pointer"},Va={class:"widget-multi-button-body grid"},Aa=["onClick"],Fa={class:"widget-multi-button-side-wrap"},Oa=r.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(t){const e=t;r.useCssVars(l=>({"7025434e":o.value}));const n=r.reactive({active:!1,wait:!1}),o=r.computed(()=>e.array.length+(e.label?1:0));function s(l){if(!(typeof l!="function"||n.wait))return n.wait=!0,Promise.resolve().then(l).finally(()=>{n.wait=!1})}function i(l=!n.active){n.active=l}return(l,a)=>(r.openBlock(),r.createElementBlock("div",Ia,[r.createElementVNode("div",{class:r.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",n.active?"widget-multi-button_active":null])},[r.createElementVNode("div",Va,[l.label?(r.openBlock(),r.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:a[0]||(a[0]=c=>i())},r.toDisplayString(l.label),1)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.array,(c,p)=>(r.openBlock(),r.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:p,onClick:d=>{s(c.callback),i(!1)}},r.toDisplayString(c.label),9,Aa))),128))]),r.createElementVNode("div",Fa,[r.createElementVNode("div",{class:r.normalizeClass(["grid-center widget-multi-button-side",n.active?"widget-multi-button-side_active":null]),onClick:a[1]||(a[1]=c=>i())},[n.wait?(r.openBlock(),r.createBlock(r.unref(Ue),{key:0,class:"widget-multi-button-side-spinner"})):l.array.length>1?(r.openBlock(),r.createBlock(r.unref(je),{key:1,class:"widget-multi-button-side-icon"},{default:r.withCtx(()=>[r.createTextVNode("angle-small-down")]),_:1})):r.createCommentVNode("",!0)],2)])],2)]))}});const Pa=_(Oa,[["__scopeId","data-v-a8d711d1"]]),Da={class:"widget-loader flex flex-align_center gap_10 padding_15"},La={class:"text_md"},Ra=r.defineComponent({__name:"widget-loader",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Da,[r.createVNode(Ue,{color:"var(--primary)",class:"padding_10"}),r.createElementVNode("span",La,r.toDisplayString(e.label),1)]))}});function Wa(t){function e(...o){return n.wait?Promise.reject("The process has already started."):(n.wait=!0,Promise.resolve().then(()=>t(...o)).finally(()=>{n.wait=!1}))}const n=r.reactive({wait:!1,call:e});return n}function Oe(t){return typeof t=="string"?Xe(t):Ma(t)?Xe(t.message):Xe(pt.DEFAULT_ERROR_MESSAGE)}function Ma(t){return!!(typeof t=="object"&&t!==null&&Object.hasOwnProperty.call(t,"message"))}function Xe(t){return{message:t}}function Ve(t="error"){return function(e){const{message:n}=Oe(e);Pe.add(t,n)}}function et(t,e){return ft().emit("entity:read",{...e,entity:t})}function un(t,e){return ft().emit("entity:update",{...e,entity:t})}function xa(){const t=r.ref(null);function e(n){t.value=n}return{activeRow:t,activateRow:e}}const X=cn(dn("use-socket"));function ft(){return ja}const ja=function(){let t=1,e;const n=new Set,o=new Set;function s(){return{safeQueue:o,requestId:t,handlers:n}}function i(f){const m=[...n.values()];X("Handlers array length is %d. Response event: %s. Request id: %d",n.size,f.event,f.requestId),m.forEach(h=>{const v=f.requestId;(h.requestId&&h.requestId===v||!h.requestId&&h.event===f.event)&&(X("Find appropriated handler: %d, event: %s",t,h.event),h.callback(f.data,f),h.once&&(n.delete(h),X("Handler was removed by *once* params was passed. %o",h)))})}function l(f){console.log(`%cInitializing sockets: %c${f}`,"color: purple","color: black"),e=new WebSocket(f),e.onclose=function(m){X("Connection to server was stopped: %d %s",m.code,m.reason),setTimeout(()=>l(f))},e.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...o.values()].forEach(m=>{a(m),o.delete(m)})},e.onerror=function(m){console.warn(m)},e.onmessage=m=>{try{const h=JSON.parse(m.data);if(!pn(h)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(h);return}i(h)}catch(h){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(h)}}}function a(f){e.send(f)}function c(f,m){n.add({event:f,callback:m})}function p(f,m){n.add({event:f,callback:m,once:!0})}function d(){return e&&(e==null?void 0:e.readyState)===1}function u(f,m,h){const v=++t,C=JSON.stringify({requestId:v,event:f,data:m,contextId:w.contextId,url:window.location.href});return d()?a(C):(o.add(C),X("Socket is not connected. Message was send to save-queue. %s")),new Promise((y,b)=>{n.add({event:f,requestId:v,once:!0,callback:(B,V)=>{if(X("Promise was resolve with next data:",B),Ua(V))return void b(B);h&&h(B,V),y(B)}})})}return{get socket(){return e},on:c,once:p,emit:u,initialization:l,getDevInfo:s}}(),Ua=t=>!!pn(t)&&t.event==="request-error",pn=t=>!!t&&typeof t=="object"&&t!==null&&"event"in t&&typeof t.event=="string"&&"requestId"in t&&typeof t.requestId=="number"&&"data"in t;function qa(t,e){const n=r.reactive([]);let o=0;const s=r.ref(!1);function i(){return s.value?Promise.reject("The process has already started."):(s.value=!0,typeof e.limit!="number"&&(e.limit=100),e.offset=o,et(t,e).then(u=>(o+=u.length,u)).finally(()=>{s.value=!1}))}function l(u,f){var h;const m=u.Version||((h=n.find(v=>v.Id===f))==null?void 0:h.Version);if(m===void 0)throw new Error("Object without version.");return m}function a(u,f){const m=n.findIndex(h=>h.Id===u);if(m===-1)throw new Error(`Can't found item with Id ${u}`);n.splice(m,1,f)}async function c(u,f){try{const m=l(f,u);delete f.Version,await un(t,{id:u,values:f,version:m});const h=await et(t,{fields:e.fields||"",id:u});a(u,h)}catch(m){Ve()(m)}}async function p(){try{const u=await i();n.push(...u)}catch(u){Ve()(u)}}async function d(){try{o=0;const u=await i();n.splice(0,n.length,...u)}catch(u){Ve()(u)}}return{array:n,updateById:c,next:p,reload:d,wait:s}}const Pe=new class{constructor(){this.store=r.reactive([])}add(e,n,o={}){const s=za(o),i=new Ga(e,n,s.timeout,s.children,s.click);return this.store.push(i),o.timeout&&setTimeout(this.remove.bind(this,i.id),o.timeout*1e3),i}remove(e){const n=this.store.findIndex(o=>o.id===e);if(n===-1)return!1;this.store.splice(n,1)}};function za(t){function e(o){return!!o&&typeof o=="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 fn=class mn{constructor(e,n,o,s,i){this.type=e,this.message=n,this.timeout=o,this.children=s,this.click=i,this.id=mn.cardId++}};fn.cardId=1;let Ga=fn;const Ja={clickOutside:te,requestHandler:We,valuesToUpperCase:Me,prettyDate:xe,prettyDateWithTime:ut,Filter:D,staticLink:Mi,groupArrayByField:xi,uuidv4:ji,Request:g,prettyMoney:Gt},Ha={widgets:Ao,usage:Fo,utils:Uo,mixins:wn,config:qo,types:zo};exports.ApplicationManager=Ut;exports.Communication=Li;exports.ComputedMetadata=ls;exports.CoreError=I;exports.Filter=D;exports.List=j;exports.ListConfig=Di;exports.Manager=w;exports.MetadataStore=de;exports.ModalValidation=Ei;exports.NotificationSystem=Pe;exports.Request=g;exports.SYMBOL_ROW=q;exports.Table=it;exports.WidgetBreadcrumbs=Es;exports.WidgetButton=Ta;exports.WidgetCard=Ai;exports.WidgetForm=si;exports.WidgetIcon=je;exports.WidgetImage=ki;exports.WidgetList=Ls;exports.WidgetLoader=Ra;exports.WidgetMultiButton=Pa;exports.WidgetNotificationSystem=Rt;exports.WidgetSection=Us;exports.WidgetSpinner=Ue;exports.WidgetTable=$a;exports.WidgetWait=ms;exports.actionService=sn;exports.asyncProcess=Wa;exports.authService=T;exports.billingService=Q;exports.catchUniversal=Ve;exports.clickOutside=te;exports.clientService=xt;exports.communicationService=fe;exports.configurationService=Zi;exports.constants=pt;exports.dataService=S;exports.debounce=Ui;exports.default=Ha;exports.documentsService=Xi;exports.equipmentService=sa;exports.fileService=Ot;exports.historyService=Zo;exports.internationalizationService=ds;exports.invitationService=Oi;exports.metadataService=lt;exports.newImport=is;exports.openService=Pi;exports.parseError=Oe;exports.prettifyValueByMetadata=cs;exports.prettyDate=xe;exports.prettyDateWithTime=ut;exports.processWizardService=Ie;exports.requestHandler=We;exports.ruleValidationService=ct;exports.t=ee;exports.testTypes=Xo;exports.universalEntityRead=et;exports.universalEntityUpdate=un;exports.useCommunication=Ri;exports.useCustomerState=Yi;exports.useFormAction=Gi;exports.useFormLabel=Ji;exports.useFormMetadata=qi;exports.useFormRequest=Ki;exports.useFormRequestData=Hi;exports.useListActiveRow=xa;exports.useListConfig=Qo;exports.useListEntity=qa;exports.useListFilter=ts;exports.useListOrder=en;exports.useListProvide=Qt;exports.useListRead=Xt;exports.useListSearch=es;exports.useListSelect=ns;exports.useListState=Zt;exports.useLogger=at;exports.useManagerState=Po;exports.useSocket=ft;exports.useTableRequest=Ko;exports.useTableState=Yo;exports.useWizard=na;exports.utils=Ja;exports.viewService=Fi;
|
|
10
|
+
*/const st=function(n,e){return n in this.events||(this.events[n]=[]),this.events[n].push(e),this.off.bind(this,n,e)},ot=function(n,e){n in this.events&&this.events[n].forEach(t=>t(e))},at=function(n,e){const t=this.events[n];if(!t)return;const r=t.indexOf(e);r!==-1&&t.splice(r,1)},ct=function(){this.events={}};class I{constructor(){this.events={}}on(e,t){return st.call(this,e,t)}emit(e,t){return ot.call(this,e,t)}off(e,t){return at.call(this,e,t)}cleanEvents(){ct.call(this)}static on(e,t){return st.call(I,e,t)}static emit(e,t){return ot.call(I,e,t)}static off(e,t){return at.call(I,e,t)}static cleanEvents(){ct.call(I)}}I.events={};var bt=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},me=(n,e,t)=>(bt(n,e,"read from private field"),t?t.call(n):e.get(n)),Be=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},xe=(n,e,t,r)=>(bt(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),ne,ye,we;const J=class F extends I{constructor(){super(...arguments),Be(this,ne,void 0),Be(this,ye,"front"),this.organizations=[],Be(this,we,!1)}set language(e){localStorage.setItem(F.LOCALSTORAGE_LANGUAGE_KEY,e)}get language(){return localStorage.getItem(F.LOCALSTORAGE_LANGUAGE_KEY)||F.DEFAULT_LANGUAGE}checkLanguageInStorage(){return!!localStorage.getItem(F.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){xe(this,ne,e)}get router(){if(!me(this,ne))throw new Error("Router was not founded. Please set router: Manager.router = router: VueRouter");return me(this,ne)}set type(e){xe(this,ye,e)}get type(){return me(this,ye)}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(e){xe(this,we,e),this.emit(F.EVENT_READY_UPDATE,e)}get ready(){return me(this,we)}onReady(e){return this.on(F.EVENT_READY_UPDATE,e)}onupdateContext(e){return this.on(F.EVENT_CONTEXT_UPDATE,e)}onupdateData(e){return this.on(F.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(F.CURRENT_CONTEXT_KEY,String(e)),this.emit(F.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(t=>t.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 t=Number.parseInt(localStorage.getItem(F.CURRENT_CONTEXT_KEY)||"");!Number.isNaN(t)&&this.validateContextId(Number(t))?this.setCurrentContext(t):this.setCurrentContext(Number(e.id))}catch{X.add("error",P.ApiNotAvailable().message)}}loadCustomerData(){return Ct.getClientData()}async updateFullClientData(){return this.init()}validateContextId(e){var t;return((t=this.person)==null?void 0:t.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 t=localStorage.getItem(this.getListKeyById(e));return t&&JSON.parse(t)}setListInformationToLocalStorage(e,t){console.log("DEPRECATED"),localStorage.setItem(this.getListKeyById(e),JSON.stringify(t))}};ne=new WeakMap;ye=new WeakMap;we=new WeakMap;J.DEFAULT_LANGUAGE="en";J.LOCALSTORAGE_LANGUAGE_KEY="CurrentLanguage";J.EVENT_CONTEXT_UPDATE="event:context-update";J.EVENT_READY_UPDATE="event:ready-update";J.EVENT_DATA_UPDATE="event:data-update";J.CURRENT_CONTEXT_KEY="CurrentContext";let Tt=J;const v=new Tt;function cn(){const n=s.reactive({contextType:v.contextType,contextId:v.contextId,context:v.context});return v.onupdateContext(()=>{n.contextType=v.contextType,n.contextId=v.contextId,n.context=v.context}),n}function ln(n){return n.text().then(e=>{try{return JSON.parse(e)}catch{return Et}})}function m(n,e={}){return v.isFront&&(e.headers||(e.headers={}),e.headers["Context-Id"]=v.contextId),e.redirect="manual",fetch(n,e).then(t=>t.type==="opaqueredirect"?void window.location.replace("/auth"):t).catch(()=>{throw P.ApiNotAvailable()}).then(t=>ln(t).then(r=>{if(!t.ok)throw r;return r}))}class Ie{constructor(){}static parseNamesFromListConfig(e){let t=Ie.parseFieldsToGraphQL(e.reduce((i,o)=>(o.name&&i.push(o.name),i),[]));function r(i){let o="";for(let u in i)typeof i[u]=="boolean"?o+=` ${u} `:o+=` ${u} { ${r(i[u])} }`;return o}return r(t)}static parseSortFromListConfig(e){let t={};for(let r in e)t[r]=e[r]?"ASC":"DESC";return t}static parseFieldsToGraphQL(e){function t(r,i){if(i.includes(".")){const o=i.indexOf("."),u=i.substring(o+1),a=i.substring(0,o);a in r||(r[a]={}),t(r[a],u)}else r[i]=!0;return r}return e.reduce(t,{})}}class un{constructor(){this.public=!1,this.errors=new Proxy([],{set:(e,t,r)=>(t!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(r)}`),e[t]=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 Nt=new un;function At(n){return n&&n[0].toLowerCase()+n.slice(1)}function $e(n){return Object.keys(n).reduce((e,t)=>{let r=n[t];const i=t.charAt(0).toUpperCase()+t.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=$e(r)),e[i]=r,e},{})}function kt(n,e=2){if(!(typeof n=="string"||typeof n=="number"))return"";let r=String(n).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 le={Request:m,clickOutside:Fe,getPropFromObject:de,runPromiseQueue:Ge,GraphQL:Ie,firstChapterToLowerCase:At,valuesToUpperCase:$e,prettyMoney:kt},dn=Object.freeze(Object.defineProperty({__proto__:null,GraphQL:Ie,Journal:Nt,Request:m,clickOutside:Fe,default:le,firstChapterToLowerCase:At,getPropFromObject:de,runPromiseQueue:Ge,valuesToUpperCase:$e},Symbol.toStringTag,{value:"Module"}));function Ot(n,e=""){for(let t in n){if(typeof n[t]=="object"){Ot(n[t],(e.length?`${e}-`:"")+t);continue}let r="--"+((e.length?`${e}-`:"")+t).replace(/([A-Z])/g,i=>`-${i}`.toLowerCase());document.documentElement.style.setProperty(r,n[t])}}const x={};function fn(n){for(let e in n)x[e]=n[e];n.styles&&Ot(n.styles),Nt.welcome(),console.log("The config has been initialized. To get access check %c_config in console.","background: purple; color: white"),window._config=x}const hn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function pn(n){return Array.isArray(n)&&n.length===2&&typeof n[0]=="string"&&typeof n[1]=="number"}const gn="masterId",mn="masterEntity";function Ne(n,e){if(!Array.isArray(e))return;if(pn(e))return t(e);e.forEach(t);function t(r){n.append(mn,r[0]),n.append(gn,r[1].toString())}}class T{static async anonymousGetList(e){return await m(`/open-api/data/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getSearchParamsForEntityListRead(e){const t=(i,o)=>r.append(i,o),r=new URLSearchParams;if(e.fields){const i=e.fields;typeof i=="string"?t("fields",i):Array.isArray(i)?t("fields",i.join(" ")):typeof i=="object"&&t("fields",Object.keys(i).join(" "))}if(e.order){let i=e.order;const u=(Array.isArray(i)?[i]:Object.entries(i)).map(([a,c="desc"])=>`@${a} ${c}`).join(",");t("order",u)}return e.limit&&t("limit",e.limit.toString()),e.offset&&t("offset",e.offset.toString()),e.filter&&t("filter",e.filter.toString()),e.useUsageContext&&r.append("useUsageContext",e.useUsageContext.toString()),r}static async getList(e,t){const r=T.getSearchParamsForEntityListRead(t||{});return await m(`/close-api/data/${e}?${r.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getCount(e,t){const r=T.getSearchParamsForEntityListRead(t||{});return m(`/close-api/data/entities/${e}/count?${r.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static create(e,t,r){const i=new URLSearchParams;return Ne(i,r==null?void 0:r.masterEntities),m(`/close-api/data/${e}?${i.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:t})})}static update(e,t,r,i={}){return m(`/close-api/data/entities/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:r})})}static readById(e,t,r={}){const i=new URLSearchParams;if(r.fields){let o=r.fields;typeof o=="string"&&(o=[o]),i.append("fields",o.join(" "))}return m(`/close-api/data/entities/${e}/id/${t}?${i.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static updateById(e,t,r,i){const o=new URLSearchParams;return Ne(o,i==null?void 0:i.masterEntities),m(`/close-api/data/entities/${e}/id/${t}?${o.toString()}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:r,version:i==null?void 0:i.version})})}static removeById(e,t,r){const i=typeof t=="number"?{Id:t}:t;return T.removeByKeys(e,i,r)}static removeByKeys(e,t,r){return m(`/close-api/data/entities/${e}`,{method:"delete",headers:{"Content-Type":"application/json"},body:JSON.stringify({keys:t,version:r})})}}var Ft=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},je=(n,e,t)=>(Ft(n,e,"read from private field"),t?t.call(n):e.get(n)),lt=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},ut=(n,e,t,r)=>(Ft(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),re,ve;const Je=class K extends I{constructor(e){super(),lt(this,re,[]),lt(this,ve,!1),this.hashParams="",this.offset=0,this.name=e.name}set wait(e){ut(this,ve,e),this.emit(K.EVENT_CHANGE_WAIT,e)}get wait(){return je(this,ve)}read(e){var i,o;this.wait=!0;const t={};e.order&&(t.order={[(i=e.order)==null?void 0:i.name]:(o=e.order)==null?void 0:o.duration}),e.fields&&(t.fields=e.fields),e.filter&&(t.filter=e.filter);const r=JSON.stringify(t.order)+JSON.stringify(t.filter);return r!==this.hashParams&&(this.offset=0,this.hashParams=r),e.limit&&(t.limit=e.limit),e.offset&&(t.offset=e.offset||this.offset),T.getList(this.name,t).then(u=>(this.offset===0&&(this.array=[]),this.offset+=t.limit,u)).then(u=>{this.array.push(...u)}).then(()=>this.emit(K.EVENT_DATA,this.array)).finally(()=>{this.wait=!1})}set array(e){ut(this,re,e),this.emit(K.EVENT_DATA,this.array)}add(e){je(this,re).push(...e),this.emit(K.EVENT_DATA,this.array)}get array(){return je(this,re)}static GetFieldNames(e){return e.reduce((t,r)=>(r.name&&(typeof r.name=="string"?t.push(r.name):t.push(...r.name)),t),[])}static getCellInfo(e,t){const r=K.getCellName(e),i=(()=>{let o=r?de(t,r):null;return o===void 0&&(o=null),e.value?e.value(o,t):o})();return{name:r,value:i}}static getCellName(e){return typeof e.name=="string"?e.name:Array.isArray(e.name)?e.name[0]:null}};re=new WeakMap;ve=new WeakMap;Je.EVENT_DATA="LIST:DATA";Je.EVENT_CHANGE_WAIT="LIST:UPDATE-WAIT";let It=Je;const j=Symbol("__ROW_INDEX__");let He=class extends It{constructor(e){super(e),this.rowIndex=1,this.changes={new:{},edit:{},remove:[]},this.save=()=>{}}get changed(){return Object.keys(this.changes.new).length||Object.keys(this.changes.edit).length||this.changes.remove.length}create(e){const t=this.wrapData(e);this.changes.new[t[j]]=t,this.emitChanges()}cleanChanges(){this.changes.new={},this.changes.edit={},this.changes.remove=[],this.emitChanges()}edit(e,t){const r=this.wrapData(t,e);if(this.changes.new[e])return this.changes.new[e]=r,this.emitChanges();this.array.find(i=>i[j]===e)&&(this.changes.edit[e]={...this.changes.edit[e],...r},this.emitChanges())}remove(e){if(this.changes.new[e])return delete this.changes.new[e],this.emitChanges();this.array.find(t=>t[j]===e)&&(delete this.changes.edit[e],this.changes.remove.includes(e)||this.changes.remove.push(e),this.emitChanges())}wrapData(e,t){return t===void 0&&!Object.prototype.hasOwnProperty.call(e,j.toString())&&(t=++this.rowIndex),{...e,[j]:t}}emitChanges(){this.emit(_.Form.EVENT_CHANGED,!0)}set array(e){super.array=e.map(t=>this.wrapData(t))}get array(){return super.array}log(e){console.log(`[table] ${e}`)}};He.PROVIDE_NAME="table-controller";function yn(n){const e=s.reactive(n.array);s.provide(He.PROVIDE_NAME,n);const t=s.reactive(n.changes);n.on(It.EVENT_DATA,u=>e.splice(0,e.length,...u)),n.on(_.Form.EVENT_CHANGED,()=>{t.new=Object.keys(n.changes.new).reduce((u,a)=>{const c=Number(a);return u[c]=n.changes.new[c],u},{})});const r=s.computed(()=>[...e.reduce((u,a)=>{const c=a[j];return n.changes.remove.includes(c)||u.push({...a,...n.changes.edit[c]}),u},[]),...Object.values(t.new)]),i=_.Form.getParentForm();return i==null||i.subscribe(n),{activeRow:s.ref(null),array:r}}function wn(n,e){n.read=()=>T.getList(n.name,{fields:e==null?void 0:e.fields}).then(t=>n.array=t).then(()=>n.emit(_.Form.EVENT_READ,n.array)),n.save=()=>{const t=n.name;Object.values(n.changes.new).forEach(async i=>{await T.create(t,i)}),Object.entries(n.changes.edit).forEach(async([i,o])=>{await T.updateById(n.name,r(Number(i)),o)});function r(i){const o=n.array.find(u=>u[j]===i);return o.id|o.Id}n.changes.remove.forEach(async i=>{await T.removeById(t,r(i),0)}),n.emit(_.Form.EVENT_SAVE)}}const vn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class En{static readHistoryById(e,t){return m(`/close-api/audits/history/${e}/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}}).then(r=>{const i=r.history.map(o=>{if(!o.changes)return o;const u=o.changes.map(a=>({...a,oldValue:a.originalValue,name:a.fieldName}));return{...o,changes:u}});return{...r,history:i}})}}var $t=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},D=(n,e,t)=>($t(n,e,"read from private field"),t?t.call(n):e.get(n)),U=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},q=(n,e,t,r)=>($t(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),Ee,ie,Ce,_e,se,oe,Ue;const z="_______LIST_______ROW_______INDEX________NAME_______",fe=class V extends I{constructor(e){super(),this.LIST_ROW_KEY=1,U(this,Ee,void 0),this.array=[],U(this,ie,[]),U(this,Ce,[]),U(this,_e,new Proxy({},{set:(t,r,i,o)=>(t[r]=i,this.emit(V.EVENT_FILTERS_UPDATE,t),!0),deleteProperty:(t,r)=>(delete t[r],this.emit(V.EVENT_FILTERS_UPDATE,t),!0)})),U(this,se,!1),U(this,oe,(...t)=>Promise),U(this,Ue,()=>{}),q(this,Ee,e.primaryKeys||[]),this.name=e.name||void 0,e.config&&q(this,ie,e.config)}set config(e){q(this,ie,e.map(_.utils.copyObject)),this.emitUpdateConfig()}get config(){return D(this,ie)}emitUpdateConfig(){this.emit(V.EVENT_CONFIG_UPDATE,this.config)}get order(){return D(this,Ce)}set order(e){q(this,Ce,e),this.emit(V.EVENT_ORDER_UPDATE,this.order)}get filters(){return D(this,_e)}set filters(e){Vt(D(this,_e),e)}set wait(e){q(this,se,e),this.emit(_.Form.EVENT_WAIT,D(this,se))}get wait(){return D(this,se)}get primaryKeys(){return D(this,Ee)}at(e){return this.array[e%this.array.length]}atByKey(e){return this.array.find(t=>t[z]===e)}indexByKey(e){return this.array.findIndex(t=>t[z]===e)}static getKey(e){return e[z]}static hasKey(e){return typeof e!="object"||e===null?!1:Object.prototype.hasOwnProperty.call(e,z)}add(...e){const t=this.wrapArray(e);this.array.push(...t),this.emit(V.EVENT_DATA,this.array)}set(e){this.array=[],this.add(...e)}removeByKey(e){const t=this.indexByKey(e);t!==-1&&(this.array.splice(t,1),this.emit(V.EVENT_DATA,this.array))}updateByKey(e,t){const r=this.atByKey(e);r&&(Object.assign(r,t),this.emit(V.EVENT_DATA,this.array))}wrapArray(e){return e.map(this.wrapItem.bind(this))}wrapItem(e){return this.isWrapped(e)?e:{...e,[z]:this.LIST_ROW_KEY++}}isWrapped(e){return Object.prototype.hasOwnProperty.call(e,z)}set read(e){q(this,oe,e)}get read(){return(...e)=>Promise.resolve().then(()=>{const t=D(this,oe).call(this,...e);return this.wait=!0,t}).finally(()=>this.wait=!1)}set save(e){q(this,oe,e)}get save(){return()=>Promise.resolve().then(()=>this.wait=!0).then(()=>D(this,Ue).call(this)).finally(()=>this.wait=!1)}static GetFieldNames(e){return e.reduce((t,r)=>(r.name&&(typeof r.name=="string"?t.push(r.name):t.push(...r.name)),t),[])}static mergeWithKey(e,t){return{...e,[z]:t}}static getCellName(e){return typeof e.name=="string"?e.name:Array.isArray(e.name)?e.name[0]:null}static getCellInfo(e,t){const r=V.getCellName(e),i=(()=>{let o=r?de(t,r):null;return o===void 0&&(o=null),e.value?e.value(o,t):o})();return{name:r,value:i}}};Ee=new WeakMap;ie=new WeakMap;Ce=new WeakMap;_e=new WeakMap;se=new WeakMap;oe=new WeakMap;Ue=new WeakMap;fe.EVENT_DATA="list-data: update";fe.EVENT_CONFIG_UPDATE="list-config:update";fe.EVENT_ORDER_UPDATE="list-order:update";fe.EVENT_FILTERS_UPDATE="list-filters:update";let M=fe;function Pt(n,e){let t="",r=0,i=!1,o;n.read=(u={})=>{if(n.wait)return o;if(u.clean&&(t="",r=0,i=!1),i)return Promise.resolve([]);let a=e;typeof a=="function"&&(a=a());const c={};if(!n.name)throw new Error("Reading list`s data without name is not available.");a.order&&Array.isArray(a.order)&&a.order.length&&(c.order={[a.order[0]]:a.order[1]||"asc"}),a.fields&&(c.fields=a.fields),a.filter&&(c.filter=a.filter);const f=JSON.stringify(c.order)+JSON.stringify(c.filter)+JSON.stringify(c.fields);return f!==t&&!Number.isNaN(f)&&(r=0,t=f),"limit"in a&&(c.limit=a.limit),c.offset=r||a.offset||0,o=T.getList(n.name,c).then(l=>((r===0||u.clean)&&n.set([]),r+=c.limit,l)).then(l=>(n.add(...l),l.length===0&&(i=!0),l)),o}}function Lt(n){const e=s.reactive({wait:n.wait,array:[]});return n.on(M.EVENT_DATA,t=>{e.array.splice(0,e.array.length,...t.map(r=>Object.freeze(JSON.parse(JSON.stringify(r)))))}),n.on(_.Form.EVENT_WAIT,()=>{e.wait=n.wait}),e}function Rt(n,e){const t="list-flex-config",r=s.inject(t,void 0);if(r)return r;if(!n||!e)throw new Error("Hook useProvideList has two required params: list and defaultSettings");n.on(M.EVENT_CONFIG_UPDATE,()=>{n.read()});const i={list:n,defaultSettings:e};return s.provide(t,i),i}function Cn(n){const e=s.reactive([...n.config]);return n.on(M.EVENT_CONFIG_UPDATE,t=>{e.splice(0,e.length,...t)}),e}function Dt(n){const e=n.order||[],t=s.reactive(e);return n.on(M.EVENT_ORDER_UPDATE,r=>{t.splice(0,t.length,...r),n.read()}),t}function _n(n){const e=s.ref(""),t=s.computed(()=>{const r=e.value.toLowerCase();return s.unref(n).filter(i=>e.value.length?Object.values(i).join().toLowerCase().includes(r):!0)});return{search:e,searchArray:t}}function Vt(n,e){Object.keys(n).forEach(t=>delete n[t]),Object.entries(e).forEach(([t,r])=>{n[t]=r})}function Sn(n){const e=s.reactive(_.utils.copyObject(n.filters));return n.on(M.EVENT_FILTERS_UPDATE,t=>{Vt(e,t),n.read()}),e}function bn(n){const e=s.reactive([]);function t(a){return e.includes(a)}function r(a){t(a)||e.push(a)}function i(a){const c=e.findIndex(f=>f===a);c!==-1&&e.splice(c,1)}function o(a){const c=s.unref(n);if(a===void 0){e.length===0?c.forEach(r):c.forEach(i);return}t(a)?i(a):r(a)}const u=s.computed(()=>{const a=s.unref(n);return e.length===a.length&&a.length!==0});return[e,o,u,r,i]}class Tn extends M{constructor(e){super(e),this.changes=[],this.save=Nn.bind(this)}get changed(){return!!this.changes.find(e=>e.status==="active")}addChange(e,t){this.changes.push({type:e,status:"active",data:this.wrapItem(t)})}}function Nn(){const n=this.changes.filter(e=>e.status==="active");return Ge(n.map(e=>{console.log("++")}))}function An(){const n=s.ref(null);function e(t){n.value=t&&Zt(t)}return{activeRow:n,activateRow:e}}const kn=Object.freeze(Object.defineProperty({__proto__:null,List:M,Table:Tn,useListOrder:Dt,useListProvide:Rt,useListRead:Pt,useListState:Lt,useTableActiveRow:An},Symbol.toStringTag,{value:"Module"}));class On extends I{constructor(){super(),this.EVENT_NEW="event:new-metadata",this.store={}}get(e){return this.store[e]}async load(e){return this.store[e]||this.set(e,await this.loadEntityInformation(e)),this.store[e]}set(e,t){this.store[e]=t,this.emit(this.EVENT_NEW,{entityName:e})}async loadEntityInformation(e){return await Ke.get(e)}}const ae=new On;function Fn(n){const e=s.ref(ae.get(n));return ae.on(ae.EVENT_NEW,t=>{n===t.entityName&&(e.value=ae.get(n))}),e}function In(n,e){try{return e.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(t){Bt().error("prettify value by metadata",n,t)}}class $n{static getDictionary(e){if(!e)throw new Error(`Can't get dictionary for ${e}.`);return m(`/open-api/internationalization/language/${e}`)}}let G={};function Z(n,...e){if(typeof n!="string")return console.trace(`Label is not provided for translation: ${n}`),"undefined";let t=_.utils.getPropFromObject((this==null?void 0:this.vocabulary)||G,n);if(typeof t=="string")return dt(t,e);const r=_.utils.getPropFromObject(G==null?void 0:G.root,n);return typeof r=="string"?dt(r,e):(typeof t===void 0&&console.warn(`Translation for label "${n}" is not founded.`),n)}function dt(n,e){return e.forEach((t,r)=>{n=n.replaceAll(new RegExp(`\\{${r}}`,"g"),t)}),n}Z.setGlobalVocabulary=function(n){G=n};Z.getScope=function(n){const e=typeof n=="string"?n:"root";return typeof n!="string"&&console.warn(`SCOPE ${n} for translate is not string.`),Z.bind({vocabulary:_.utils.getPropFromObject(G,e.toLowerCase())})};Z.setVocabulary=function(n){return typeof n=="string"&&(n=_.utils.getPropFromObject(G,n)),Z.bind({vocabulary:n})};const Pn=function(){let n=!1;const e=[];function t(){return n}function r(c,f){t()&&console[c](...f),e.push(f)}function i(...c){r("log",c)}function o(...c){r("warn",c)}function u(...c){r("error",c)}function a(c=!0){n=c}return{info:i,warn:o,history:e,display:a,error:u}}();function Bt(){return Pn}class A{static parseError(e){let t=e.errors?Object.values(e.errors).map(r=>r[0]):null;throw P.AuthServiceError(e.title,t)}static login(e){return m(x.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...e,AppName:x.applicationName})}).catch(A.parseError)}static registration(e){return e.AppName=x.applicationName,m(x.identityServerURL+"/api/Authenticate/Registration",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(e)}).catch(A.parseError)}static parseProcessAnswer(e){if(e.statusCode>4)throw P.UndefinedError(e.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return e}static startRegistrationProcess(e){return A.requestStepRegistrationProcess("StartRegistration",e)}static confirmPhoneRegistrationProcess(e){return A.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",e)}static confirmEmailRegistrationProcess(e){return A.requestStepRegistrationProcess("ConfirmEmailByRegistration",e)}static finishEmailRegistrationProcess(e){return A.requestStepRegistrationProcess("FinishRegistration",e)}static requestStepRegistrationProcess(e,t){return m(`${x.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)}).catch(A.parseError)}static startLoginProcess(e){return A.requestStepLoginProcess("StartLogin",e)}static loginWithPassword(e){return A.requestStepLoginProcess("LoginWithPassword",e)}static loginWithOtpCode(e){return A.requestStepLoginProcess("LoginWithOtpCode",e)}static requestStepLoginProcess(e,t){return m(`${x.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)}).catch(A.parseError).then(A.parseLoginProcessAnswer)}static parseLoginProcessAnswer(e){if(e.statusCode>3)throw P.UndefinedError(e.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return e}}const xt=class ce{static async create(e){return m(ce.url,{method:"post",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}static async read(e){const t=new URLSearchParams({targetCode:String(e.targetCode),entityName:e.entity.name,entityCatalogId:e.entity.catalogId});return m(ce.url+"?"+t.toString(),{method:"get"})}static async readMessages(e){return m(`${ce.url}/${e}/messages`,{method:"get"})}static async createMessage(e){return m(`${ce.url}/${e.talkId}/messages`,{method:"post",body:JSON.stringify({text:e.text}),headers:{"Content-Type":"application/json"}})}};xt.url="/close-api/communications";let ue=xt;class Ln{static async getDefaultView(e){return m("/close-api/views/"+e,{method:"GET",headers:{"Content-Type":"application/json"}})}}function ft(n){return{...n,createdEntities:n.createdEntites}}const jt=class Se{static async getStartConfig(e,t){return m([Se.url,e,t].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(e,t){return m([Se.url,e,t].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(ft)}static async runStep(e,t,r,i,o){return m([Se.url,e,t].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:r,token:i,values:o})}).then(ft)}};jt.url="/close-api/views/process-wizard";let be=jt;class Ke{static get url(){return"/close-api/metadata"}static async get(e,t,r){console.warn("GETTING METADATA BY DEPRECATED METHOD."),console.trace();const i=new URLSearchParams;return t&&i.append("criteria",t),r&&i.append("id",String(r)),await fetch(this.url+`/${e}?${i.toString()}`,{method:"GET"}).then(o=>o.json())}static getById(e,t,r=[]){const i=new URLSearchParams;return Ne(i,r),t&&i.append("id",t),m([this.url,e].join("/")+`?${i.toString()}`)}static getFieldInformation(e,t){return m(`/open-api/metadata/${e}/fields/${t}`)}static getTreatmentListField(e,t){return m(`/open-api/metadata/${e}/list-fields/${t}`)}}class Rn{static async upload(e,t){const r=new FormData;r.append("file",e);const i=`/close-api/files?entityName=${t}`;return await fetch(i,{method:"POST",body:r}).then(o=>o.json()).then(o=>(o.filename=e.name,o))}}class Dn{static invite(e,t,r){return m("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:e,personKey:t,relatedRoleCode:r})})}static accept(e,t){return m("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e,version:t,mark:!0})})}static decline(e,t){return m("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e,version:t,mark:!1})})}}class Ye{static get url(){return"/close-api/rules-validation/"}static validate(e,t){return m(Ye.url+e,{method:"POST",body:JSON.stringify(t)})}}class Vn{static getConfiguration(){return m("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}}class Mt{static url(){return"/close-api/actions"}static async get({criterion:e}){const t=new URLSearchParams;return e&&t.append("criterion",e),await fetch(this.url()+`?${t.toString()}`,{method:"GET"}).then(r=>r.json())}static getById(e,t,r=[]){const i=new URLSearchParams;return Ne(i,r),m([this.url(),e,t].join("/")+`?${i.toString()}`,{method:"GET"})}}const Wt=class Ut extends I{constructor(e=[]){super(),this.array=s.reactive([]),this.defaultArray=[],this.setDefault(e)}emitUpdate(){this.emit(Ut.EVENT_DATA,this.array)}setDefault(e){const t=JSON.parse(JSON.stringify(e));this.defaultArray=t,this.set(t)}revert(){this.set(this.defaultArray)}set(e){this.array.splice(0,this.array.length,...e),this.emitUpdate()}append(e){this.array.push(e),this.emitUpdate()}moveTo(e,t){if(this.isOutOfRange(e)||this.isOutOfRange(t))throw new Error(`Provided position is out of range: ${e}, ${t}`);const r=this.array[e];this.array.splice(e,1),this.array.splice(t,0,r),this.emitUpdate()}remove(e){this.array.splice(e,1),this.emitUpdate()}isOutOfRange(e){return!(e>=0&&e<this.array.length)}};Wt.EVENT_DATA="list-config:update";let Bn=Wt;class xn extends I{constructor(e){super(),this.name="Communication",this.read=()=>{},this.id=e}sendMessage(e){return ue.createMessage({talkId:this.id,text:e})}static checkAndGenerate(e){return ue.read(e).then(t=>t.length===0?ue.create(e):t[0])}}function jn(n){const e=_.Form.getParentForm();e?e.subscribe(n):console.warn(P.ParentFormNotFound());const t=s.reactive([]);return n.read=()=>ue.readMessages(n.id).then(r=>(t.splice(0,t.length,...r),r)),{array:t}}function Mn(n){return typeof n!="object"||n===null?!1:!!(n.hasOwnProperty("start")||n.hasOwnProperty("end"))}function $(n){return Object.keys(n).reduce((e,t)=>{const r=n[t];if(Array.isArray(r)){const i=r.map(o=>typeof o=="string"?`'${o}'`:o).join(", ");return r.length&&e.push(`@${t} in (${i})`),e}if(Mn(r)){let i=function(o){var u;return((u=o.match(/([^Z]*)/))==null?void 0:u[0])+"0000Z"};return r.start&&e.push(`@${t} ge ${i(r.start)}`),r.end&&e.push(`@${t} le ${i(r.end)}`),e}return typeof r=="number"?(e.push(`@${t} eq ${r}`),e):typeof r=="string"?(r.length!==0&&e.push(`@${t} eq '${r}'`),e):(r===null&&e.push($.is(t,r)),e)},[]).join(" and ")}function he(n){return typeof n=="string"?`'${n}'`:`${n}`}$.includes=function(e,t){return`@${e} Contains ${he(t)}`};$.beginWith=function(e,t){return`@${e} BeginWith ${he(t)}`};$.notEq=function(e,t){return`@${e} nq ${he(t)}`};$.eq=function(e,t){return Array.isArray(t)?$.in(e,t):`@${e} eq ${he(t)}`};$.in=function(e,t){const r=t.map(he).join(", ");return`@${e} in (${r})`};$.and=function(...e){return e.join(" and ")};$.is=function(e,t){return`@${e} is ${t}`};$.or=function(...e){return e.join(" or ")};function Wn(n,e="images"){return`/static-folder/${e}/${n}`}function Un(n,e,t){return n.reduce((r,i)=>{var a;let o=typeof e=="function"?e(i):i[e];const u=(a=r[r.length-1])==null?void 0:a.value;return u&&t(u,o)?r[r.length-1].array.push(i):r.push({value:o,array:[i]}),r},[])}function qn(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,n=>(n^crypto.getRandomValues(new Uint8Array(1))[0]&15>>n/4).toString(16))}function zn(n,e=1e3){let t=0;return(...r)=>{clearTimeout(t),t=setTimeout(()=>n(...r),e)}}function Gn(n,e){const t=s.ref(null);function r(){return n.name?Ke.getById(n.name,e,[]).then(i=>{t.value=i,i.fields.forEach(o=>{o.canSet?n.enable(o.name):n.disable(o.name)})}).catch(()=>{t.value=null;const i=P.MetadataEntityIsNotAvailable(n.name||"FORM_WITHOUT_NAME");X.add("error",i.message)}):Promise.reject()}return n.on(_.Form.EVENT_READ,r),{metadata:t,update:r}}class Xe extends Error{static UndefinedStatus(){return new Xe("Status is undefined.")}}class Jn extends Xe{}function Hn(n,e){const t=s.reactive([]);async function r(o,u){if(!o)throw Jn.UndefinedStatus();const a=await Mt.get({criterion:o});t.splice(0,t.length),t.push(...a.map(c=>i(c,u)))}return{actions:t,update:r};function i(o,u){return{title:o.title,callback:()=>(()=>Promise.resolve().then(()=>{if(n.changed)return n.save()}).then(()=>fetch(o.url,{method:"POST",body:JSON.stringify({keys:{Id:u},contextId:v.contextId}),headers:{"Content-Type":"application/json"}})).then(c=>c.json()).then(c=>{if(!c.success)throw e!=null&&e.ModalValidationResult&&c.validationEffect?Qt.openModal(e.ModalValidationResult,{rules:c.validationEffect.results}):X.add("error",c.message),new Error;return c}).then(c=>{c.message&&X.add("info",c.message),e!=null&&e.handleAffectedEntities&&e.handleAffectedEntities(c.affectedEntities)}).then(()=>n.read()))()}}}class Ae{static url(){return"/close-api/presentation"}static getStatuses(e,t){return fetch(`${Ae.url()}/status/${e}/${t}`).then(r=>r.json())}}function Kn(n){const e=s.reactive({title:"Loading",type:"wait"});function t(r){if(n.name&&Number.isInteger(r))return Ae.getStatuses(n.name,r).then(i=>{e.type=i.type,e.title=i.name})}return n.on(_.Form.EVENT_READ,r=>{var u,a;const{code:i,name:o}={code:(u=r.Status)==null?void 0:u.Code,name:(a=r.Status)==null?void 0:a.Name};return n.name?!Number.isInteger(i)&&!o?void console.log("Undefined code or name is Status prop."):Ae.getStatuses(n.name,i).then(c=>{e.type=c.type,e.title=o}):void console.log("Form without name.")}),{label:e,update:t}}function Yn(n,e){const t=yt.useRoute(),r=s.computed(()=>Number(t.params.id)),i=s.reactive({ready:!1,show:!1});return s.watch(()=>r.value,()=>{i.ready=!1}),s.watch(()=>r.value,()=>{Number.isInteger(r.value)&&n.read()},{immediate:!0}),n.read=le.requestHandler.bind(null,()=>Promise.resolve().then(()=>{if(!n.name)throw new Error("Form without entity name. Please set form.name");return T.readById(n.name,r.value,{fields:e.fields})}).then(le.valuesToUpperCase).then(o=>(Number.isInteger(o.Version)&&(n.version=o.Version),n.setValues(o),i.show=!0,o)).catch(o=>{throw Object.prototype.hasOwnProperty.call(o,"status")&&[403,404].includes(o.status)&&(i.show=!1),o}).finally(()=>{i.ready=!0})),n.save=le.requestHandler.bind(null,()=>Promise.resolve().then(()=>{if(!n.name)throw new Error("Form without entity name. Please set form.name");return T.updateById(n.name,r.value,n.changes,{version:n.version})}).then(o=>{n.version=o.version})),n.on(_.Form.EVENT_SAVE,n.read.bind(n)),{formShadowState:i}}function Xn(){const n=s.reactive({contextId:v.contextId,person:v.person,organizations:v.organizations,ready:v.ready,user:v.user}),e=s.computed(()=>{if(!v.ready||!v.person)return null;const r=n.contextId;return v.person.id===r?v.person:v.organizations.find(i=>i.id===r)||null}),t=s.computed(()=>{var r;return n.contextId===((r=n.person)==null?void 0:r.id)});return v.onupdateContext(r=>{n.contextId=r}),v.onupdateData(()=>{n.person=v.person,n.organizations=v.organizations,n.user=v.user}),v.onReady(r=>{n.ready=r}),{state:s.readonly(n),currentContext:e,isPerson:t}}function Zn(n,e){const t=s.reactive({ready:!1,show:!1});function r(){t.ready=!1,t.show=!1}return n.read=()=>{let i=e();return Promise.resolve().then(()=>{if(!n.name)throw P.EntityWithoutName("Use Form Request");return T.readById(n.name,i.id,{fields:i.fields})}).then(le.valuesToUpperCase).then(o=>(o.hasOwnProperty("Version")&&(n.version=Number(o.Version)),n.setValues(o),t.show=!0,o)).catch(o=>{const u=it(o);throw X.add("error",u.message),u}).finally(()=>{t.ready=!0})},n.save=()=>{let i=e();return Promise.resolve().then(()=>{if(!n.name)throw P.EntityWithoutName("Use Form Request");return T.updateById(n.name,i.id,n.changes,{version:n.version})}).then(o=>{n.version=o.version||o.Version}).catch(o=>{const u=it(o);throw X.add("error",u.message),u})},n.on(_.Form.EVENT_SAVE,n.read.bind(n)),{shadowFormState:t,initShadow:r}}class Qn{static getRequiredDocuments(e,t,r){const i=new URLSearchParams({entity:e,primaryKey:t,statusCode:r});return fetch(`/close-api/views/required-documents?${i.toString()}`).then(o=>o.json())}}class Y{static url(){return"close-api/billing"}static getBillingMetadata(e){return fetch(`/${Y.url()}/calculator/${e}`)}static calculate(e,t){return m(`/${Y.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:e,values:t})}).then(r=>{if(r&&r.status===1)return r;throw Array.isArray(r.notes)?new Error(r.notes[0]):P.ApiNotAvailable()})}static parseMetadataField(e){function t(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:t(e)}}static createOnlinePayment(e,t){return m(`/${Y.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:e,returnURL:t})})}static applyOnlinePayment(e){return m(`/${Y.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:e})})}}class er{static getListSettings(e,t){const r=new URLSearchParams;r.set("entity",e),t&&r.set("mark",t);const i=`/close-api/views/list/configs?${r.toString()}`;return m(i)}}function tr(n){return n.statusName==="Completed"}function nr(n){return n.statusName==="FinalStepWithConfirmation"}function rr(n){return n.statusName==="ValidationError"}function ir(n,e,t){let r=null;const i=s.reactive({wait:null});let o=[],u=null;const a=s.ref(null);function c(){a.value=o.find(y=>y.name===u)||null}function f(){var y;return u?((y=o.find(S=>S.name===u))==null?void 0:y.fields)||[]:[]}function l(y){if(c(),rr(y))return void t.onValidation(y.validationResults);if((y.statusName==="FinalStep"||y.statusName==="NextStep")&&(!f().length||sr(f(),t.presets)))return E(t.presets||{});tr(y)&&t.onCompleted(y),nr(y)&&t.onConfirmation(y)}async function d(){try{await h(),await w()}catch(y){const{message:S}=ke(y);Oe.add("error",S)}}function h(){return i.wait="Loading process information.",be.getStartConfig(e,n).then(y=>{o=y.steps.map(S=>({label:S.title,name:S.stepName,number:S.number,fields:S.frontendEntity.objectTypes.reduce((N,k)=>(k.properties.forEach(L=>{N.push({name:L.name,label:L.title,type:L.refEntityName||L.dataType})}),N),[])}))}).then(y=>(i.wait=!1,y))}function p(y){return u=y.nextStepName,r=y.token,y}function g(y){const S=ke(y);Oe.add("error",S.message)}function w(){return i.wait="Starting process",be.startProcess(e,n).then(p).then(l).catch(g).finally(()=>{i.wait=null})}function E(y={}){return!r||!u?Promise.reject("Not step or token."):(i.wait="Expect the result",be.runStep(e,n,u,r,y).then(p).then(l).catch(g).finally(()=>{i.wait=!1}))}return{initialize:d,state:i,currentStepConfig:s.readonly(a),next:E}}function sr(n,e){for(let t=0;t<n.length;t++){const r=n[t];if(!_.utils.getPropFromObject(e,r.name))return!1}return!0}const or="close-api/proxy/Equipment/Search";class ar{static search(e,t,r,i,o){const u=new URLSearchParams;u.append("pattern",e||""),t&&u.append("categoryId",t),r&&u.append("useType",String(r)),i&&u.append("statusCode",i),o&&(u.append("limit",String(o.limit)),u.append("offset",String(o.offset)));const a=`/${or}?${u.toString()}`;return m(a,{method:"GET",headers:{"Content-Type":"application/json"}})}}const cr={class:"widget-table__head"},lr={class:"widget-table__head-label margin_0 text_overflow"},ur=s.defineComponent({__name:"widget-table-head",props:{config:{}},setup(n){return(e,t)=>(s.openBlock(),s.createElementBlock("tr",cr,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.config,(r,i)=>(s.openBlock(),s.createElementBlock("th",{class:"widget-table__head-cell",key:i},[s.createElementVNode("p",lr,s.toDisplayString(r.label),1)]))),128))]))}});const W=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},dr=W(ur,[["__scopeId","data-v-25198f4a"]]);function fr(n){return typeof n.name=="string"?n.name:Array.isArray(n.name)?n.name[0]:null}function hr(n,e){const t=fr(n);let r=t?_.utils.getPropFromObject(e,t):null;return r===void 0&&(r=null),n.value?n.value(r,e):r}function pr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var qe={exports:{}},Me,ht;function gr(){if(ht)return Me;ht=1;var n=1e3,e=n*60,t=e*60,r=t*24,i=r*7,o=r*365.25;Me=function(l,d){d=d||{};var h=typeof l;if(h==="string"&&l.length>0)return u(l);if(h==="number"&&isFinite(l))return d.long?c(l):a(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))};function u(l){if(l=String(l),!(l.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(d){var h=parseFloat(d[1]),p=(d[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return h*o;case"weeks":case"week":case"w":return h*i;case"days":case"day":case"d":return h*r;case"hours":case"hour":case"hrs":case"hr":case"h":return h*t;case"minutes":case"minute":case"mins":case"min":case"m":return h*e;case"seconds":case"second":case"secs":case"sec":case"s":return h*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function a(l){var d=Math.abs(l);return d>=r?Math.round(l/r)+"d":d>=t?Math.round(l/t)+"h":d>=e?Math.round(l/e)+"m":d>=n?Math.round(l/n)+"s":l+"ms"}function c(l){var d=Math.abs(l);return d>=r?f(l,d,r,"day"):d>=t?f(l,d,t,"hour"):d>=e?f(l,d,e,"minute"):d>=n?f(l,d,n,"second"):l+" ms"}function f(l,d,h,p){var g=d>=h*1.5;return Math.round(l/h)+" "+p+(g?"s":"")}return Me}function mr(n){t.debug=t,t.default=t,t.coerce=c,t.disable=o,t.enable=i,t.enabled=u,t.humanize=gr(),t.destroy=f,Object.keys(n).forEach(l=>{t[l]=n[l]}),t.names=[],t.skips=[],t.formatters={};function e(l){let d=0;for(let h=0;h<l.length;h++)d=(d<<5)-d+l.charCodeAt(h),d|=0;return t.colors[Math.abs(d)%t.colors.length]}t.selectColor=e;function t(l){let d,h=null,p,g;function w(...E){if(!w.enabled)return;const y=w,S=Number(new Date),N=S-(d||S);y.diff=N,y.prev=d,y.curr=S,d=S,E[0]=t.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let k=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(B,b)=>{if(B==="%%")return"%";k++;const Q=t.formatters[b];if(typeof Q=="function"){const pe=E[k];B=Q.call(y,pe),E.splice(k,1),k--}return B}),t.formatArgs.call(y,E),(y.log||t.log).apply(y,E)}return w.namespace=l,w.useColors=t.useColors(),w.color=t.selectColor(l),w.extend=r,w.destroy=t.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(p!==t.namespaces&&(p=t.namespaces,g=t.enabled(l)),g),set:E=>{h=E}}),typeof t.init=="function"&&t.init(w),w}function r(l,d){const h=t(this.namespace+(typeof d>"u"?":":d)+l);return h.log=this.log,h}function i(l){t.save(l),t.namespaces=l,t.names=[],t.skips=[];let d;const h=(typeof l=="string"?l:"").split(/[\s,]+/),p=h.length;for(d=0;d<p;d++)h[d]&&(l=h[d].replace(/\*/g,".*?"),l[0]==="-"?t.skips.push(new RegExp("^"+l.slice(1)+"$")):t.names.push(new RegExp("^"+l+"$")))}function o(){const l=[...t.names.map(a),...t.skips.map(a).map(d=>"-"+d)].join(",");return t.enable(""),l}function u(l){if(l[l.length-1]==="*")return!0;let d,h;for(d=0,h=t.skips.length;d<h;d++)if(t.skips[d].test(l))return!1;for(d=0,h=t.names.length;d<h;d++)if(t.names[d].test(l))return!0;return!1}function a(l){return l.toString().substring(2,l.toString().length-2).replace(/\.\*\?$/,"*")}function c(l){return l instanceof Error?l.stack||l.message:l}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}var yr=mr;(function(n,e){e.formatArgs=r,e.save=i,e.load=o,e.useColors=t,e.storage=u(),e.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function t(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const f="color: "+this.color;c.splice(1,0,f,"color: inherit");let l=0,d=0;c[0].replace(/%[a-zA-Z%]/g,h=>{h!=="%%"&&(l++,h==="%c"&&(d=l))}),c.splice(d,0,f)}e.log=console.debug||console.log||(()=>{});function i(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function o(){let c;try{c=e.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function u(){try{return localStorage}catch{}}n.exports=yr(e);const{formatters:a}=n.exports;a.j=function(c){try{return JSON.stringify(c)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}})(qe,qe.exports);var wr=qe.exports;const qt=pr(wr);function zt(n){return["eservices-core",n].join(":")}function Gt(n){return Ze(n,"YYYY/MM/DD HH:mm:ss")}function Ze(n,e="YYYY/MM/DD"){if(!n)return"";try{const t=new Date(n);return en.format(t,e)}catch(t){return console.log(t),"Invalid date"}}const vr={props:{name:String},setup(n,e){let t="unknown";try{t=e.slots.default()[0].children}catch{t=n.name}typeof t!="string"&&console.warn(`Name for Icon.vue is not string. ${t}`);try{t=t.replace(/\s+/g,"")}catch{}return()=>s.h("i",{class:`icon icon-${t}`})}},Pe=W(vr,[["__scopeId","data-v-e287c8d9"]]),Er=qt(zt("setup-list-row"));function Cr(n,e){const t=n.config.map(r=>_r(r,n,e));return s.h("tr",{class:"widget-table__row widget-table-row"},t)}function _r(n,e,t){const r=e.values;let i=hr(n,r);const o={onClick:[],class:["widget-table__cell widget-table-cell"]};function u(l){o.onClick.push(()=>l(r))}function a(l){Array.isArray(l)?o.class.push(...l):o.class.push(l)}const c=[],f=[];if(n.hide&&n.hide(r))return[s.h("td")];if(n.type)switch(a(`widget-table-cell_${n.type}`),n.type){case"number":{typeof i=="number"&&(i=new Intl.NumberFormat().format(i));break}case"date":{i=Ze(typeof i=="string"?i:null);break}case"dateTime":case"dateWithTime":{i=Gt(typeof i=="string"?i:null);break}case"multi-select":{f.push(s.h(_.FormField,{type:"single-checkbox",modelValue:e.selected})),u(pt.bind(null,t,!0));break}case"select":{f.push(s.h(_.FormField,{type:"single-radio",modelValue:e.selected})),u(pt.bind(null,t,!1));break}}if(n.onClick&&u(n.onClick),n.link)try{const l=n.link(r);if(l){const d=s.h(yt.RouterLink,{to:l});f.push(d),a("widget-table-cell_link")}}catch(l){Er("Can't add router link",l)}return n.href&&(f.push(s.h("a",{href:n.href(r),target:"_blank"})),a("widget-table-cell_link")),(typeof i=="string"||typeof i=="number")&&f.push(s.h("p",{class:"widget-list-cell-text"},i)),n.icon&&f.push(s.h(Pe,{name:n.icon})),n.class&&(typeof n.class=="function"?a(n.class(r)):a(n.class)),c.push(s.h("td",o,f)),c}function pt(n,e){n.emit("select",e)}function Jt(n,e){return()=>{try{return Cr(n,e)}catch(t){return console.warn(t),null}}}const Sr={props:{values:Object,config:Object,selected:Boolean},setup:Jt},br=["colspan"],gt=s.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(n,{emit:e}){const t=s.ref();return s.onMounted(()=>{setTimeout(()=>{t.value&&t.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(r,i)=>(s.openBlock(),s.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:t},[s.createElementVNode("td",{colspan:r.rowLength},[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(r.component),s.mergeProps(r.$attrs,{values:r.values,new:r.isNew,onClose:i[0]||(i[0]=o=>e("close")),onSave:i[1]||(i[1]=o=>e("save",o))}),null,16,["values","new"]))],8,br)],512))}}),Qe={LIST_ACTIVE_NEW:"list-active-new",DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go."},Tr={class:"widget-table"},mt="update:selectedRows",Nr=s.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{}},emits:["update:activeRow","save"],setup(n,{emit:e}){const t=n,r=s.useSlots(),i=s.computed(()=>{var a;return(a=r==null?void 0:r.default)==null?void 0:a.call(r)[0]});function o(a,c=!0){if(!t.selectedRows)return;if(!c)return e(mt,t.selectedRows.includes(a)?[]:[a]);const f=[...t.selectedRows],l=f.indexOf(a);return l===-1?f.push(a):f.splice(l,1),e(mt,f)}function u(a){e("save",a),e("update:activeRow",null)}return(a,c)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("table",Tr,[s.createVNode(dr,{config:a.config},null,8,["config"]),s.createElementVNode("tbody",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.array,(f,l)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:l},[s.createVNode(Sr,{config:a.config,values:f,selected:a.selectedRows.includes(f),onSelect:d=>o(f,d),class:s.normalizeClass(a.classCallback?a.classCallback(f):"")},null,8,["config","values","selected","onSelect","class"]),i.value&&a.activeRow===f?(s.openBlock(),s.createBlock(gt,{key:0,component:i.value,"row-length":a.config.length,values:f,onClose:c[0]||(c[0]=d=>e("update:activeRow",null)),onSave:u,"is-new":!1},null,8,["component","row-length","values"])):s.createCommentVNode("",!0)],64))),128)),a.activeRow===s.unref(Qe).LIST_ACTIVE_NEW?(s.openBlock(),s.createBlock(gt,{key:0,component:i.value,"row-length":a.config.length,onClose:c[1]||(c[1]=f=>e("update:activeRow",null)),onSave:u,"is-new":!0},null,8,["component","row-length"])):s.createCommentVNode("",!0)])])]))}}),Ar=s.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(n){return(e,t)=>(s.openBlock(),s.createElementBlock("div",{class:"widget-spinner",style:s.normalizeStyle({"border-left":`1.1em solid ${e.color}`})},null,4))}});const Le=W(Ar,[["__scopeId","data-v-0ef9ae88"]]),kr={class:"widget-button"},Or=s.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(n){return(e,t)=>(s.openBlock(),s.createElementBlock("button",kr,[e.wait?(s.openBlock(),s.createBlock(Le,{key:0,class:"widget-button-spinner"})):s.createCommentVNode("",!0),s.renderSlot(e.$slots,"default",{},void 0,!0)]))}});const Fr=W(Or,[["__scopeId","data-v-450dc564"]]),Ir={class:"widget-multi-button-wrap position_relative cursor_pointer"},$r={class:"widget-multi-button-body grid"},Pr=["onClick"],Lr={class:"widget-multi-button-side-wrap"},Rr=s.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(n){const e=n;s.useCssVars(u=>({"7025434e":r.value}));const t=s.reactive({active:!1,wait:!1}),r=s.computed(()=>e.array.length+(e.label?1:0));function i(u){if(!(typeof u!="function"||t.wait))return t.wait=!0,Promise.resolve().then(u).finally(()=>{t.wait=!1})}function o(u=!t.active){t.active=u}return(u,a)=>(s.openBlock(),s.createElementBlock("div",Ir,[s.createElementVNode("div",{class:s.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",t.active?"widget-multi-button_active":null])},[s.createElementVNode("div",$r,[u.label?(s.openBlock(),s.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:a[0]||(a[0]=c=>o())},s.toDisplayString(u.label),1)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.array,(c,f)=>(s.openBlock(),s.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:f,onClick:l=>{i(c.callback),o(!1)}},s.toDisplayString(c.label),9,Pr))),128))]),s.createElementVNode("div",Lr,[s.createElementVNode("div",{class:s.normalizeClass(["grid-center widget-multi-button-side",t.active?"widget-multi-button-side_active":null]),onClick:a[1]||(a[1]=c=>o())},[t.wait?(s.openBlock(),s.createBlock(s.unref(Le),{key:0,class:"widget-multi-button-side-spinner"})):u.array.length>1?(s.openBlock(),s.createBlock(s.unref(Pe),{key:1,class:"widget-multi-button-side-icon"},{default:s.withCtx(()=>[s.createTextVNode("angle-small-down")]),_:1})):s.createCommentVNode("",!0)],2)])],2)]))}});const Dr=W(Rr,[["__scopeId","data-v-a8d711d1"]]),Vr={class:"widget-loader flex flex-align_center gap_10 padding_15"},Br={class:"text_md"},xr=s.defineComponent({__name:"widget-loader",props:{label:{}},setup(n){return(e,t)=>(s.openBlock(),s.createElementBlock("div",Vr,[s.createVNode(Le,{color:"var(--primary)",class:"padding_10"}),s.createElementVNode("span",Br,s.toDisplayString(e.label),1)]))}}),jr=["alt","src"],Mr=s.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(n){const e=n,t=s.ref();return s.onMounted(()=>{t.value&&(t.value.src=e.src),t.value.onerror=function(){e.default&&(t.value.src=e.default)}}),(r,i)=>(s.openBlock(),s.createElementBlock("img",{alt:r.alt,ref_key:"refImage",ref:t,src:r.src||r.$props.default},null,8,jr))}}),Wr={props:{config:Array,values:Object,selected:Boolean},setup:Jt};const Ur=W(Wr,[["__scopeId","data-v-344a8cc1"]]),qr=n=>(s.pushScopeId("data-v-4e1d87c8"),n=n(),s.popScopeId(),n),zr={class:"head-cell"},Gr=qr(()=>s.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Jr=s.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(n,{emit:e}){const t=n;return t.title&&console.warn(`For cell ${t.name} using title,it should be replaced with label.`),(r,i)=>(s.openBlock(),s.createElementBlock("th",null,[s.createElementVNode("div",zr,[s.createElementVNode("div",{class:"head-cell-content flex_grow",style:s.normalizeStyle({"min-width":r.minWidth,"max-width":r.maxWidth,width:r.width})},[r.type==="multi-select"?(s.openBlock(),s.createBlock(s.unref(_.FormField),{key:0,type:"single-checkbox",onClick:i[0]||(i[0]=s.withModifiers(o=>e("select"),["stop","prevent"]))})):(s.openBlock(),s.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:i[1]||(i[1]=o=>e("order"))},s.toDisplayString(r.title||r.label),1))],4),r.name&&r.order.length&&r.order[0]===r.name?(s.openBlock(),s.createBlock(s.unref(Pe),{key:0,class:s.normalizeClass(["head-cell-order",{"head-cell-order_down":r.order.length>1&&r.order[1]==="desc"}])},{default:s.withCtx(()=>[s.createTextVNode("core-arrow-up")]),_:1},8,["class"])):s.createCommentVNode("",!0),Gr])]))}});const Hr=W(Jr,[["__scopeId","data-v-4e1d87c8"]]),Kr=s.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(n,{emit:e}){const t=n,r=s.ref(),i=s.ref();s.onMounted(()=>{function c(p,g){let w=-1;do w++,g-=p[w];while(g>0&&w<p.length);return w}function f(p,g){let w=0;for(;g>0&&g>p[w]&&w<p.length;)g-=p[w],w++;return console.log(g,w),w>0?w:0}function l(p){try{i.value.style.insetInlineStart=p+"px"}catch(g){console.log(g)}}function d(p){try{i.value.style.width=p+"px",i.value.style.minWidth=p+"px",i.value.style.maxWidth=p+"px"}catch(g){console.log(g)}}function h(p){return p===null?!1:p.classList.contains("head-cell-resize")}r.value.addEventListener("pointerdown",function(g){var rt;function w(O){return O.screenX+S-L}const E=r.value,y=[...E.children].filter(O=>O.localName==="th"),S=((rt=E.offsetParent)==null?void 0:rt.scrollLeft)||0,N=y.map(O=>O.clientWidth),k=h(g.target),L=E.getBoundingClientRect().left,B=w(g),b=c(N,B),Q=N.slice(0,b).reduce((O,R)=>O+R,0),pe=B-Q,Re=E.offsetWidth,ee=y[b].clientWidth;if(t.config[b].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",g.screenX),console.log("Widths",N),console.log("max width",Re),console.log("Start Position",B),console.log("Position From",b),console.log("Start Position",b),console.log("Global offset (Отступ самой таблицы от края экрана)",L),console.log("Del",pe),console.groupEnd(),i.value.innerText=y[b].textContent||"",i.value.style.display="grid",i.value.style.width=ee+"px",i.value.style.cursor="grabbing",l(Q),d(ee),document.addEventListener("pointermove",nt,{passive:!0}),document.addEventListener("pointerup",tt);function tt(O){if(console.group("END"),document.removeEventListener("pointermove",nt),document.removeEventListener("pointerup",tt),k&&(t.config[b].width=i.value.style.width,t.config[b].minWidth=i.value.style.width,t.config[b].maxWidth=i.value.style.width,o(t.config)),!k){const R=O.screenX+S-L;console.log("ENP Position",R);const ge=f(N,R);if(console.log(b,"->",ge),ge!==b){const te=t.config[b],De=t.config;De.splice(b,1),De.splice(ge,0,te),o(De)}else{const te=t.config[b].name;u(te)}}i.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function nt(O){if(k){const te=w(O)-B+ee;d(te);return}let R=O.screenX+S-L-pe;R<0&&(R=0),R+ee>Re&&(R=Re-ee),l(R)}})});function o(c){e("update:config",c)}function u(c){if(!c)return;if(Array.isArray(c)){if(c.length<1)return;c=c[0]}if(t.order.length===0||t.order[0]!==c)return void a([c]);const f=t.order.length===1||t.order[1]==="asc"?"asc":"desc";a([c,f==="asc"?"desc":"asc"])}function a(c){e("update:order",c)}return(c,f)=>(s.openBlock(),s.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:r},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(c.config,(l,d)=>(s.openBlock(),s.createBlock(Hr,s.mergeProps({key:l},l,{onOrder:h=>u(l.name),onSelect:f[0]||(f[0]=h=>e("select")),order:c.order}),null,16,["onOrder","order"]))),128)),s.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:i},"test",512)],512))}});const Yr=W(Kr,[["__scopeId","data-v-ccffc6bd"]]),Xr={class:"widget-list"},Zr={class:"widget-list-body position_relative"},Qr=50,ei=s.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(n,{emit:e}){const t=n;function r(a,c=!0){if(t.selectedRows)if(!c)o(t.selectedRows.includes(a)?[]:[a]);else{const f=[...t.selectedRows],l=f.indexOf(a);l===-1?f.push(a):f==null||f.splice(l,1),o(f)}}function i(){var a;if(((a=t.selectedRows)==null?void 0:a.length)!==t.array.length)return o([...t.array]);o([])}function o(a){e("update:selectedRows",a)}function u(a){if(!a)return;const c=a.target;c.scrollTop+c.clientHeight+Qr>c.scrollHeight&&e("scrollEnd")}return(a,c)=>(s.openBlock(),s.createElementBlock("div",{class:"es-list-container",onScrollPassive:u},[s.createElementVNode("table",Xr,[s.createElementVNode("thead",null,[s.createVNode(Yr,{onSelect:c[0]||(c[0]=f=>i()),"onUpdate:order":c[1]||(c[1]=f=>e("update:order",f)),"onUpdate:config":c[2]||(c[2]=f=>e("update:config",f)),config:a.config,order:a.order},null,8,["config","order"])]),s.createElementVNode("tbody",Zr,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.array,(f,l)=>{var d;return s.openBlock(),s.createBlock(Ur,{key:l,class:"widget-list-row",values:f,config:a.config,selected:(d=a.selectedRows)==null?void 0:d.includes(f),onSelect:h=>r(f,h)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}});function ti(n){function e(...r){return t.wait?Promise.reject("The process has already started."):(t.wait=!0,Promise.resolve().then(()=>n(...r)).finally(()=>{t.wait=!1}))}const t=s.reactive({wait:!1,call:e});return t}function ke(n){return typeof n=="string"?We(n):ni(n)?We(n.message):We(Qe.DEFAULT_ERROR_MESSAGE)}function ni(n){return!!(typeof n=="object"&&n!==null&&Object.hasOwnProperty.call(n,"message"))}function We(n){return{message:n}}function Te(n="error"){return function(e){const{message:t}=ke(e);Oe.add(n,t)}}function ze(n,e){return et().emit("entity:read",{...e,entity:n})}function Ht(n,e){return et().emit("entity:update",{...e,entity:n})}function ri(n){return n.reduce((e,t)=>(t.name&&(typeof t.name=="string"?e.push(t.name):e.push(...t.name)),e),[])}function ii(){const n=s.ref(null);function e(t){n.value=t}return{activeRow:n,activateRow:e}}const H=qt(zt("use-socket"));function et(){return si}const si=function(){let n=1,e;const t=new Set,r=new Set;function i(){return{safeQueue:r,requestId:n,handlers:t}}function o(h){const p=[...t.values()];H("Handlers array length is %d. Response event: %s. Request id: %d",t.size,h.event,h.requestId),p.forEach(g=>{const w=h.requestId;(g.requestId&&g.requestId===w||!g.requestId&&g.event===h.event)&&(H("Find appropriated handler: %d, event: %s",n,g.event),g.callback(h.data,h),g.once&&(t.delete(g),H("Handler was removed by *once* params was passed. %o",g)))})}function u(h){console.log(`%cInitializing sockets: %c${h}`,"color: purple","color: black"),e=new WebSocket(h),e.onclose=function(p){H("Connection to server was stopped: %d %s",p.code,p.reason),setTimeout(()=>u(h))},e.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...r.values()].forEach(p=>{a(p),r.delete(p)})},e.onerror=function(p){console.warn(p)},e.onmessage=p=>{try{const g=JSON.parse(p.data);if(!Kt(g)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(g);return}o(g)}catch(g){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(g)}}}function a(h){e.send(h)}function c(h,p){t.add({event:h,callback:p})}function f(h,p){t.add({event:h,callback:p,once:!0})}function l(){return e&&(e==null?void 0:e.readyState)===1}function d(h,p,g){const w=++n,E=JSON.stringify({requestId:w,event:h,data:p,contextId:v.contextId,url:window.location.href});return l()?a(E):(r.add(E),H("Socket is not connected. Message was send to save-queue. %s")),new Promise((y,S)=>{t.add({event:h,requestId:w,once:!0,callback:(N,k)=>{if(H("Promise was resolve with next data:",N),oi(k))return void S(N);g&&g(N,k),y(N)}})})}return{get socket(){return e},on:c,once:f,emit:d,initialization:u,getDevInfo:i}}(),oi=n=>!!Kt(n)&&n.event==="request-error",Kt=n=>!!n&&typeof n=="object"&&n!==null&&"event"in n&&typeof n.event=="string"&&"requestId"in n&&typeof n.requestId=="number"&&"data"in n;function ai(n,e){const t=s.reactive([]);let r=0;const i=s.ref(!1);function o(){return i.value?Promise.reject("The process has already started."):(i.value=!0,typeof e.limit!="number"&&(e.limit=100),e.offset=r,ze(n,e).then(d=>(r+=d.length,d)).finally(()=>{i.value=!1}))}function u(d,h){var g;const p=d.Version||((g=t.find(w=>w.Id===h))==null?void 0:g.Version);if(p===void 0)throw new Error("Object without version.");return p}function a(d,h){const p=t.findIndex(g=>g.Id===d);if(p===-1)throw new Error(`Can't found item with Id ${d}`);t.splice(p,1,h)}async function c(d,h){try{const p=u(h,d);delete h.Version,await Ht(n,{id:d,values:h,version:p});const g=await ze(n,{fields:e.fields||"",id:d});a(d,g)}catch(p){Te()(p)}}async function f(){try{const d=await o();t.push(...d)}catch(d){Te()(d)}}async function l(){try{r=0;const d=await o();t.splice(0,t.length,...d)}catch(d){Te()(d)}}return{array:t,updateById:c,next:f,reload:l,wait:i}}const Oe=new class{constructor(){this.store=s.reactive([])}add(e,t,r={}){const i=ci(r),o=new li(e,t,i.timeout,i.children,i.click);return this.store.push(o),r.timeout&&setTimeout(this.remove.bind(this,o.id),r.timeout*1e3),o}remove(e){const t=this.store.findIndex(r=>r.id===e);if(t===-1)return!1;this.store.splice(t,1)}};function ci(n){function e(r){return!!r&&typeof r=="object"}const t={timeout:10,click:()=>null,children:[]};return e(n)?{timeout:n.timeout||t.timeout,click:n.click||t.click,children:n.children||t.children}:t}const Yt=class Xt{constructor(e,t,r,i,o){this.type=e,this.message=t,this.timeout=r,this.children=i,this.click=o,this.id=Xt.cardId++}};Yt.cardId=1;let li=Yt;const ui={clickOutside:Fe,valuesToUpperCase:$e,Filter:$,staticLink:Wn,groupArrayByField:Un,uuidv4:qn,Request:m,prettyMoney:kt},di={usage:sn,utils:dn,config:fn,types:hn};exports.ApplicationManager=Tt;exports.Communication=xn;exports.ComputedMetadata=Fn;exports.CoreError=P;exports.Filter=$;exports.List=M;exports.ListConfig=Bn;exports.Manager=v;exports.MetadataStore=ae;exports.NotificationSystem=Oe;exports.Request=m;exports.SYMBOL_ROW=j;exports.Table=He;exports.WidgetButton=Fr;exports.WidgetIcon=Pe;exports.WidgetImage=Mr;exports.WidgetList=ei;exports.WidgetLoader=xr;exports.WidgetMultiButton=Dr;exports.WidgetSpinner=Le;exports.WidgetTable=Nr;exports.actionService=Mt;exports.asyncProcess=ti;exports.authService=A;exports.billingService=Y;exports.catchUniversal=Te;exports.clickOutside=Fe;exports.clientService=Ct;exports.communicationService=ue;exports.configurationService=er;exports.constants=Qe;exports.dataService=T;exports.debounce=zn;exports.default=di;exports.documentsService=Qn;exports.equipmentService=ar;exports.fileService=Rn;exports.getNamesFromListConfig=ri;exports.historyService=En;exports.internationalizationService=$n;exports.invitationService=Dn;exports.metadataService=Ke;exports.newImport=kn;exports.openService=Vn;exports.parseError=ke;exports.prettifyValueByMetadata=In;exports.prettyDate=Ze;exports.prettyDateWithTime=Gt;exports.processWizardService=be;exports.ruleValidationService=Ye;exports.t=Z;exports.testTypes=vn;exports.universalEntityRead=ze;exports.universalEntityUpdate=Ht;exports.useCommunication=jn;exports.useCustomerState=Xn;exports.useFormAction=Hn;exports.useFormLabel=Kn;exports.useFormMetadata=Gn;exports.useFormRequest=Zn;exports.useFormRequestData=Yn;exports.useListActiveRow=ii;exports.useListConfig=Cn;exports.useListEntity=ai;exports.useListFilter=Sn;exports.useListOrder=Dt;exports.useListProvide=Rt;exports.useListRead=Pt;exports.useListSearch=_n;exports.useListSelect=bn;exports.useListState=Lt;exports.useLogger=Bt;exports.useManagerState=cn;exports.useSocket=et;exports.useTableRequest=wn;exports.useTableState=yn;exports.useWizard=ir;exports.utils=ui;exports.viewService=Ln;
|
|
11
11
|
//# sourceMappingURL=eservices-core.cjs.js.map
|