eservices-core 1.3.2 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('[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}.grid{display:grid}.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}.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[data-v-f478f0d8]{text-align:start}.widget-table__head-cell[data-v-f478f0d8]{padding:18px;text-align:start}.widget-table__head-title[data-v-f478f0d8]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-weight:600;font-size:14px;line-height:19px;margin:0}.widget-wait[data-v-2038b2ba]{align-items:center}.wait-spinner[data-v-2038b2ba]{padding:8px}.widget-table-loader{padding:10px 0}.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-fe89c589]{padding:18px;text-align:start}.widget-table__head-label[data-v-fe89c589]{font-weight:600;font-size:14px;line-height:19px}[dir=rtl] .icon[data-v-e287c8d9]{transform:scaleX(-1)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  "use strict";/*!
3
- * eservices-core v1.3.2
3
+ * eservices-core v1.3.4
4
4
  * (c) 2023 ESERVICES
5
5
  */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),$t=require("jenesius-vue-modal"),C=require("jenesius-vue-form"),St=require("object-hash"),Ke=require("vue-router"),Nt=require("date-and-time");const v=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},an={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}`})}},B=v(an,[["__scopeId","data-v-0d979509"]]);function ln(t,e){return!!t&&t===e||"password is not equal"}function Fe(t){return Number(t.replace(/[^0-9.]/g,""))}function Xe(t,e=null){let o=String(Fe(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 cn=Object.freeze(Object.defineProperty({__proto__:null,numeric:Fe,prettyNumeric:Xe,validPassword:ln},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}}},Pe={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"}}},dn={props:{password:{type:Boolean,default:()=>!1}},data:()=>({isPasswordVisible:!1}),methods:{togglePasswordVisible(t=!this.isPasswordVisible){this.isPasswordVisible=t}}},un=Object.freeze(Object.defineProperty({__proto__:null,MixinInput:Y,MixinInputPassword:dn,MixinInputText:Pe},Symbol.toStringTag,{value:"Module"}));function we(t,e=[]){let n=t;return e.forEach(o=>{n=o(n)}),n}const pn={components:{Icon:B},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(Fe),t},arrayInputPrettyModifiers(){let t=[];return this.prettyNumeric&&t.push(Xe),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,Pe],name:"InputText"},fn={class:"input-wrap"},mn={key:0,class:"input-title"},hn={key:0,class:"input-title_required"},gn=["disabled","error"],_n=["type","placeholder","disabled","error","value"],yn={key:1,class:"input-text__error text_sm"};function vn(t,e,n,o,s,i){const c=r.resolveComponent("icon");return r.openBlock(),r.createElementBlock("div",fn,[t.title?(r.openBlock(),r.createElementBlock("p",mn,[r.createTextVNode(r.toDisplayString(t.title)+" ",1),t.required?(r.openBlock(),r.createElementBlock("span",hn,"*")):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,_n),t.password?(r.openBlock(),r.createElementBlock("div",{key:0,class:"input-text__password",onClick:e[1]||(e[1]=a=>t.togglePasswordVisible())},[r.createVNode(c,{class:"cursor_pointer",name:t.isPasswordVisible?"eye-crossed":"eye"},null,8,["name"])])):r.createCommentVNode("",!0),t.errorMessage?(r.openBlock(),r.createElementBlock("p",yn,r.toDisplayString(t.errorMessage),1)):r.createCommentVNode("",!0)],8,gn)])}const wn=v(pn,[["render",vn],["__scopeId","data-v-65e2ee2d"]]);const Cn={mixins:[Y],name:"InputToggle"};function En(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]=c=>t.input(!t.value))},null,2)}const kn=v(Cn,[["render",En],["__scopeId","data-v-56d58611"]]);const bn={props:["isActive","title"],name:"FragmentInputSelectItem"},$n={class:"item-wrap"};function Sn(t,e,n,o,s,i){return r.openBlock(),r.createElementBlock("div",$n,[r.createElementVNode("p",{class:r.normalizeClass(["input-select__item cursor_pointer",{active:n.isActive}])},r.toDisplayString(n.title),3)])}const Nn=v(bn,[["render",Sn],["__scopeId","data-v-69ab8592"]]);function ee(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 Tn={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&&ee(this.$refs.input,()=>this.hide())}},components:{Icon:B,FragmentInputSelectItem:Nn},mixins:[Y],name:"InputSelect"},Bn={class:"input-wrap"},Vn={key:0,class:"input-title"},In={key:0,class:"color__text_red"},An={class:"input-select-container__current input_size_md flex"},Fn={key:0,class:"input-select-value"},Pn={key:1,class:"current-placeholder text_md"},On={class:"input-select-list input-select-container__list"},Ln={key:0,class:"input-text__error position_absolute margin-0 text_sm color__text_red"};function Dn(t,e,n,o,s,i){const c=r.resolveComponent("icon"),a=r.resolveComponent("fragment-input-select-item");return r.openBlock(),r.createElementBlock("div",Bn,[t.title?(r.openBlock(),r.createElementBlock("p",Vn,[r.createTextVNode(r.toDisplayString(t.title)+" ",1),t.required?(r.openBlock(),r.createElementBlock("span",In,"*")):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]=l=>i.active()),ref:"input"},[r.createElementVNode("div",An,[t.value===void 0||t.value===null?(r.openBlock(),r.createElementBlock("span",Pn,r.toDisplayString(t.placeholder),1)):(r.openBlock(),r.createElementBlock("p",Fn,r.toDisplayString(i.titleValue),1)),t.disabled||t.isInsideDisabled?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(c,{key:2,class:"input-select__ico-toggle",name:"caret-down"}))]),r.createElementVNode("div",On,[t.value?(r.openBlock(),r.createBlock(a,{key:0,onClick:e[0]||(e[0]=l=>t.input(null))})):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.arrayParse,(l,u)=>(r.openBlock(),r.createBlock(a,{class:"input-select-list__item",key:u,"is-active":l.value===t.value,title:l.title,onClick:d=>t.input(l.value)},null,8,["is-active","title","onClick"]))),128))]),t.errorMessage?(r.openBlock(),r.createElementBlock("p",Ln,r.toDisplayString(t.errorMessage),1)):r.createCommentVNode("",!0)],2)])}const Rn=v(Tn,[["render",Dn],["__scopeId","data-v-c4acd469"]]);class Tt{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 Oe(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 Wn=r.defineComponent({props:{entityName:{type:String,required:!0}},emits:["load","change","input"],data:()=>({pw:null}),created(){this.pw=Oe(this.onLoad)},methods:{async onChange(t){t&&this.pw.call(t)},async onLoad(t){const e=await Tt.upload(t,this.entityName);this.$emit("load",e),this.name&&this.input(e.id)}},mixins:[Y],components:{Icon:B}}),Mn={class:"container-input-file"},jn={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 Un(t,e,n,o,s,i){const c=r.resolveComponent("icon");return r.openBlock(),r.createElementBlock("div",Mn,[r.createVNode(c,{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",jn,"Loading...")):r.createCommentVNode("",!0),t.pw.error?(r.openBlock(),r.createElementBlock("p",xn,"Error load file")):r.createCommentVNode("",!0)])}const qn=v(Wn,[["render",Un],["__scopeId","data-v-bdbf1475"]]),zn={InputText:wn,InputToggle:kn,InputSelect:Rn,InputLoadFile:qn};const Gn={props:{placeholder:String,error:[Boolean,String]},setup(){return{}},name:"WidgetInputContainer"},Hn=t=>(r.pushScopeId("data-v-1e3f1057"),t=t(),r.popScopeId(),t),Jn={class:"widget-input__container"},Yn={class:"input-container__content"},Kn=Hn(()=>r.createElementVNode("div",{class:"widget-input__underline"},null,-1));function Xn(t,e,n,o,s,i){return r.openBlock(),r.createElementBlock("div",Jn,[r.createElementVNode("div",Yn,[r.renderSlot(t.$slots,"default",{},void 0,!0)]),Kn,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 Zn=v(Gn,[["render",Xn],["__scopeId","data-v-1e3f1057"]]);const Qn={components:{Icon:B,WidgetInputContainer:Zn},mixins:[Y,Pe],name:"InputText"},er=["type","value"];function tr(t,e,n,o,s,i){const c=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]=l=>t.input(l.target.value)),onKeyup:e[1]||(e[1]=r.withKeys(l=>t.$emit("enter"),["enter"]))},null,40,er),t.password?(r.openBlock(),r.createElementBlock("div",{key:0,class:"input-text__password",onClick:e[2]||(e[2]=l=>t.togglePasswordVisible())},[r.createVNode(c,{class:"cursor_pointer",name:t.isPasswordVisible?"eye-crossed":"eye"},null,8,["name"])])):r.createCommentVNode("",!0)]),_:1},8,["placeholder","error"])}const nr=v(Qn,[["render",tr],["__scopeId","data-v-212b50e2"]]),rr={InputText:nr};function Ce(t,e=[]){let n=t;return e.forEach(o=>{n=o(n)}),n}const or=r.defineComponent({components:{Icon:B},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(Ce(this.modelValue,this.arrayInputPrettyModifiers))},arrayInputModifiers(){let t=[];return(this.numeric||this.prettyNumeric)&&t.push(Fe),t},arrayInputPrettyModifiers(){let t=[];return this.prettyNumeric&&t.push(Xe),t}},methods:{onChange(t){let e=this.modify(Ce(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(Ce(t.target.value,this.arrayInputModifiers));this.input(e),this.$refs.input.value=this.pretty(Ce(this.modelValue,this.arrayInputPrettyModifiers))}},mixins:[Y,Pe],name:"InputText"}),sr={key:0,class:"input-title"},ir={key:0,class:"color__text_red"},ar=["disabled","error"],lr=["type","placeholder","disabled","error","value"],cr={key:1,class:"input-text__error text_sm color__text_red"};function dr(t,e,n,o,s,i){const c=r.resolveComponent("icon");return r.openBlock(),r.createElementBlock(r.Fragment,null,[t.title?(r.openBlock(),r.createElementBlock("p",sr,[r.createTextVNode(r.toDisplayString(t.title)+" ",1),t.required?(r.openBlock(),r.createElementBlock("span",ir,"*")):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,lr),t.password?(r.openBlock(),r.createElementBlock("div",{key:0,class:"input-text__password",onClick:e[1]||(e[1]=a=>t.togglePasswordVisible())},[r.createVNode(c,{class:"cursor_pointer",name:t.isPasswordVisible?"eye-crossed":"eye"},null,8,["name"])])):r.createCommentVNode("",!0),t.errorMessage?(r.openBlock(),r.createElementBlock("p",cr,r.toDisplayString(t.errorMessage),1)):r.createCommentVNode("",!0)],8,ar)],64)}const ur=v(or,[["render",dr],["__scopeId","data-v-9c3e5ea6"]]),pr={InputText:ur},fr={default:zn,line:rr,naomi:pr};const mr={components:{Icon:B},props:{title:String,values:[Object,Array,String]},setup(t){Array.isArray(t.values)&&t.values.forEach(c=>{c.func&&console.warn("Prop func is deprecated. Use callback.",c)});const e=r.computed(()=>{if(!o.value)return"30px";let c=0;return Array.isArray(t.values)&&(c+=t.values.length),t.title&&c++,typeof t.values=="string"&&!Array.isArray(t.values)&&c++,c*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(c=!o.value){o.value=c,c&&ee(i.value,()=>s(!1))}const i=r.ref(null);return{isActive:o,array:n,toggle:s,button:i,maxHeight:e}},name:"Button"},hr={class:"widget-button-wrap flex"},gr=["onClick"];function _r(t,e,n,o,s,i){const c=r.resolveComponent("icon");return r.openBlock(),r.createElementBlock("div",hr,[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,l)=>(r.openBlock(),r.createElementBlock("span",{class:"widget-button__list-elem cursor_pointer",onClick:u=>(a.callback(),o.toggle(!1)),key:l},r.toDisplayString(a.title),9,gr))),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(c,{class:"widget-button__toggle-icon",name:"angle-small-down"})])):r.createCommentVNode("",!0)],2)])}const yr=v(mr,[["render",_r],["__scopeId","data-v-b6be5c12"]]);const vr={props:{icon:String,func:Function},name:"WidgetFormFunctionItem",components:{Icon:B}};function wr(t,e,n,o,s,i){const c=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(c,{name:n.icon},null,8,["name"])])}const Cr=v(vr,[["render",wr],["__scopeId","data-v-73f7eb9f"]]);const Er={props:{title:String},name:"WidgetFormTitle"},kr={class:"form-title"},br={class:"title_lg color__text_black margin-0"};function $r(t,e,n,o,s,i){return r.openBlock(),r.createElementBlock("div",kr,[r.createElementVNode("h2",br,r.toDisplayString(n.title),1)])}const Sr=v(Er,[["render",$r],["__scopeId","data-v-c91ffa31"]]);const Nr={components:{WidgetFormTitle:Sr,WidgetFormFunctionItem:Cr,WidgetButton:yr},props:{title:String,button:{type:[Array,Object],default:()=>[]},functions:[Array]},name:"WidgetForm"},Tr={class:"widget-form flex_column"},Br={class:"widget-form__head flex"},Vr={class:"widget-form__head-functions flex"},Ir={class:"widget-form__body"};function Ar(t,e,n,o,s,i){const c=r.resolveComponent("widget-form-title"),a=r.resolveComponent("widget-button"),l=r.resolveComponent("widget-form-function-item");return r.openBlock(),r.createElementBlock("div",Tr,[r.createElementVNode("div",Br,[r.createVNode(c,{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",Vr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.functions,(u,d)=>(r.openBlock(),r.createBlock(l,{key:d,icon:u.icon,func:u.callback},null,8,["icon","func"]))),128))])]),r.createElementVNode("div",Ir,[r.renderSlot(t.$slots,"default",{},void 0,!0)])])}const Fr=v(Nr,[["render",Ar],["__scopeId","data-v-c3e88e10"]]),Pr={default:{WidgetForm:Fr}};const Or={props:{title:String,subTitle:String,type:[String,Number],double:{type:Boolean,default:()=>!1}},name:"ContainerFormElem"},Lr={class:"form-container-item__title flex"},Dr={class:""},Rr={key:0,class:""},Wr={class:"title_sm"},Mr={key:1,class:"form-container-item__right"};function jr(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",Lr,[r.createElementVNode("span",Dr,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",Rr,[r.createElementVNode("span",Wr,r.toDisplayString(n.subTitle),1),r.renderSlot(t.$slots,"centerRight",{},void 0,!0)])):r.createCommentVNode("",!0),t.$slots.right?(r.openBlock(),r.createElementBlock("div",Mr,[r.renderSlot(t.$slots,"right",{},void 0,!0)])):r.createCommentVNode("",!0)],2)}const xr=v(Or,[["render",jr],["__scopeId","data-v-9264f6f4"]]);const Ur={name:"ContainerAuthView"},qr={class:"container-auth-wrap"},zr={class:"container-auth-sidebar"},Gr={class:"container-auth-main"};function Hr(t,e,n,o,s,i){return r.openBlock(),r.createElementBlock("div",qr,[r.createElementVNode("div",zr,[r.renderSlot(t.$slots,"side",{},void 0,!0)]),r.createElementVNode("div",Gr,[r.renderSlot(t.$slots,"default",{},void 0,!0)])])}const Jr=v(Ur,[["render",Hr],["__scopeId","data-v-0b1a5e81"]]),Yr={ContainerFormElem:xr,ContainerAuthView:Jr},Kr=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 te=v(Kr,[["__scopeId","data-v-661e0416"]]),Xr={class:"button-element"},Zr=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=Oe(e.callback);return(s,i)=>(r.openBlock(),r.createElementBlock("div",{class:"button-wrap",onClick:i[0]||(i[0]=c=>r.unref(o).call())},[r.unref(o).wait||s.wait?(r.openBlock(),r.createBlock(te,{key:0,class:"button-spinner"})):r.createCommentVNode("",!0),r.createElementVNode("button",Xr,[r.createTextVNode(r.toDisplayString(s.title)+" ",1),r.renderSlot(s.$slots,"default",{},void 0,!0)])]))}});const Bt=v(Zr,[["__scopeId","data-v-3cf452e1"]]),Qr={class:"widget-button-wrap"},eo={class:"widget-multi-button"},to={class:"widget-button-list"},no=["onClick"],ro={class:"button__side"},oo={key:0,class:"button__size-progress"},so=r.defineComponent({__name:"WidgetMultiButton",props:{title:{},array:{}},setup(t){const e=Oe(),n=r.reactive({active:!1});function o(i=!n.active){n.active=i}function s(i){e.setFunction(i),e.call()}return(i,c)=>(r.openBlock(),r.createElementBlock("div",Qr,[r.createElementVNode("div",eo,[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:c[0]||(c[0]=a=>o())},r.toDisplayString(i.title),1)):r.createCommentVNode("",!0),r.createElementVNode("div",to,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.array,(a,l)=>(r.openBlock(),r.createElementBlock("p",{class:"button__content-title widget-multi-button-row",key:l,onClick:u=>(s(a.callback),o(!1))},r.toDisplayString(a.title),9,no))),128))])],2),r.createElementVNode("div",ro,[r.unref(e).wait?(r.openBlock(),r.createElementBlock("div",oo,[r.createVNode(te,{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:c[1]||(c[1]=a=>o())},[r.createVNode(B,{class:"button__toggle-icon",name:"angle-small-down"})],2)):r.createCommentVNode("",!0)])])]))}});const Ze=v(so,[["__scopeId","data-v-3edae6ea"]]),io={WidgetButton:Bt,WidgetMultiButton:Ze},ao={Icon:B},T=new class{constructor(){this.store=r.reactive([])}add(e,n,{children:o,timeout:s=10,click:i=()=>{}}={}){const c=new lo(e,n,s,o||[],i);return this.store.push(c),s&&setTimeout(this.remove.bind(this,c.id),s*1e3),c}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.")}},Vt=class It{constructor(e,n,o,s,i){this.type=e,this.msg=n,this.timeout=o,this.children=s,this.click=i,this.id=It.cardId++}};Vt.cardId=1;let lo=Vt;const co={class:"widget-error"},uo={class:"widget-error-wrap"},po={class:"widget-error-main"},fo={class:"widget-error-text widget-error-message"},mo={class:"widget-error__container-close"},ho=r.defineComponent({__name:"WidgetError",props:{isGroup:{type:Boolean},message:{}},emits:["close","toggle"],setup(t,{emit:e}){return(n,o)=>(r.openBlock(),r.createElementBlock("div",co,[r.createElementVNode("div",uo,[r.createElementVNode("div",po,[r.createElementVNode("p",fo,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",mo,[r.createElementVNode("div",{class:"widget-error-close",onClick:o[1]||(o[1]=s=>e("close"))})])])]))}});const dt=v(ho,[["__scopeId","data-v-8a0a0924"]]),go={key:0,class:"widget-error-details"},_o=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,c)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(dt,{message:i.card.msg,key:i.card.id,onClose:c[0]||(c[0]=a=>e("closeCard",i.card.id)),onToggle:c[1]||(c[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",go,[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(dt,{key:a.id,message:a.msg,onClose:l=>e("closeChild",a.id)},null,8,["message","onClose"]))),128))]),_:1})])):r.createCommentVNode("",!0)]))}});const yo=v(_o,[["__scopeId","data-v-aa732044"]]),vo={class:"container-errors"},wo=r.defineComponent({__name:"WidgetNotificationSystem",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",vo,[r.createVNode(r.TransitionGroup,{name:"fade"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(T).store,o=>(r.openBlock(),r.createBlock(yo,{key:o.id,card:o,onCloseCard:s=>r.unref(T).remove(o.id),onCloseChild:s=>r.unref(T).removeChild(o.id,s)},null,8,["card","onCloseCard","onCloseChild"]))),128))]),_:1})]))}});const At=v(wo,[["__scopeId","data-v-8e9870dd"]]),Co={default:At};let Eo={inputs:fr,forms:Pr,containers:Yr,buttons:io,icons:ao,errorSystem:Co};const ko={inputs:cn};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 Qe(t){return t.reduce((e,n)=>e.then(o=>n==null?void 0:n(o)),Promise.resolve())}const Ft=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
6
  Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(e,n){return!e&&!n?k.ApiNotAvailable():new k(e||"Authorization Error",n)}static ApiResponseParseFailed(){return k.ApiNotAvailable()}static MissingIdInValuesEntity(e){return new k("Object doesn't have id",e)}static ObjectWithIdNotFound(e,n){return new k(`Can't find object with id: ${e}`,n)}static ObjectWithoutConnectToPresentArray(e,n){return new k("Object is not found.",{object:e,array:n})}static EntityWithoutId(e){return new k("Entity doesn't have id.",e)}static NotFoundedTableIndex(e,n){return new k(`Can't find the element with tableIndex ${e}`,n)}static UndefinedError(e,n=[]){return new k(e,n)}static TableArrayAlreadyIncludeProvidedIndexValue(e,n,o){return new k(`Array already includes the element with value ${e}`,{array:n,table:o})}static MetadataEntityIsNotAvailable(e){return new k(`Metadata for the ${e} is not currently available.`)}};Ft.ID=0;let I=Ft;const Pt="Please try again later or submit a feedback if problem doesn't go.";function me(t){return typeof t=="string"?Ue(t):bo(t)?Ue(t.message):Ue(Pt)}function bo(t){return!!(typeof t=="object"&&Object.hasOwnProperty.call(t,"message")&&t!==null)}function Ue(t,e=[]){return{message:t,details:e}}class Ot{static getClientData(){return y("/close-api/client-content")}static getNavigation(){return y("/close-api/client/navigation")}}/*!
7
7
  * jenesius-event-emitter v1.0.2
8
8
  * (c) 2022 Jenesius
9
9
  * @license MIT
10
- */const ut=function(t,e){return t in this.events||(this.events[t]=[]),this.events[t].push(e),this.off.bind(this,t,e)},pt=function(t,e){t in this.events&&this.events[t].forEach(n=>n(e))},ft=function(t,e){const n=this.events[t];if(!n)return;const o=n.indexOf(e);o!==-1&&n.splice(o,1)},mt=function(){this.events={}};class O{constructor(){this.events={}}on(e,n){return ut.call(this,e,n)}emit(e,n){return pt.call(this,e,n)}off(e,n){return ft.call(this,e,n)}cleanEvents(){mt.call(this)}static on(e,n){return ut.call(O,e,n)}static emit(e,n){return pt.call(O,e,n)}static off(e,n){return ft.call(O,e,n)}static cleanEvents(){mt.call(O)}}O.events={};var Lt=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ee=(t,e,n)=>(Lt(t,e,"read from private field"),n?n.call(t):e.get(t)),qe=(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)},ze=(t,e,n,o)=>(Lt(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n),se,ke,be;const K=class P extends O{constructor(){super(...arguments),qe(this,se,void 0),qe(this,ke,"front"),this.organizations=[],qe(this,be,!1)}set language(e){localStorage.setItem(P.LOCALSTORAGE_LANGUAGE_KEY,e)}get language(){return localStorage.getItem(P.LOCALSTORAGE_LANGUAGE_KEY)||P.DEFAULT_LANGUAGE}checkLanguageInStorage(){return!!localStorage.getItem(P.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){ze(this,se,e)}get router(){if(!Ee(this,se))throw new Error("Router was not founded. Please set router: Manager.router = router: VueRouter");return Ee(this,se)}set type(e){ze(this,ke,e)}get type(){return Ee(this,ke)}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(e){ze(this,be,e),this.emit(P.EVENT_READY_UPDATE,e)}get ready(){return Ee(this,be)}onReady(e){return this.on(P.EVENT_READY_UPDATE,e)}onupdateContext(e){return this.on(P.EVENT_CONTEXT_UPDATE,e)}onupdateData(e){return this.on(P.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(P.CURRENT_CONTEXT_KEY,String(e)),this.emit(P.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(P.CURRENT_CONTEXT_KEY)||"");!Number.isNaN(n)&&this.validateContextId(Number(n))?this.setCurrentContext(n):this.setCurrentContext(Number(e.id))}catch{T.add("error",I.ApiNotAvailable().message)}}loadCustomerData(){return Ot.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 Dt=K;const w=new Dt;function $o(){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 So(t){return t.text().then(e=>{try{return JSON.parse(e)}catch{return Pt}})}function y(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=>So(n).then(o=>{if(!n.ok)throw o;return o}))}class Le{constructor(){}static parseNamesFromListConfig(e){let n=Le.parseFieldsToGraphQL(e.reduce((s,i)=>(i.name&&s.push(i.name),s),[]));function o(s){let i="";for(let c in s)typeof s[c]=="boolean"?i+=` ${c} `:i+=` ${c} { ${o(s[c])} }`;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("."),c=s.substring(i+1),a=s.substring(0,i);a in o||(o[a]={}),n(o[a],c)}else o[s]=!0;return o}return e.reduce(n,{})}}class No{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 Rt=new No;function Wt(t){return t&&t[0].toLowerCase()+t.slice(1)}const To={props:{message:String},name:"ModalWait",components:{WidgetSpinner:te}},Bo={class:"modal__wait modal-default flex_column"};function Vo(t,e,n,o,s,i){const c=r.resolveComponent("widget-spinner");return r.openBlock(),r.createElementBlock("div",Bo,[r.createVNode(c),r.createElementVNode("p",null,r.toDisplayString(n.message),1)])}const Io=v(To,[["render",Vo],["__scopeId","data-v-4d18289e"]]),Ao={error:!0,wait:!1,throw:!0};async function De(t,e={}){const n={modalWait:null};e=Object.assign({},e,Ao);try{e.wait&&(n.modalWait=await $t.openModal(Io,{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?T.add("error",s.message,{children:s.details||[],timeout:12}):s!=null&&s.message?T.add("error",s.message):(console.warn(s),T.add("error",I.ApiResponseParseFailed().message))),e.throw)throw s}).finally(()=>{var o;(o=n.modalWait)==null||o.close()})}function Re(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=Re(o)),e[s]=o,e},{})}function Mt(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:y,clickOutside:ee,getPropFromObject:he,runPromiseQueue:Qe,GraphQL:Le,firstChapterToLowerCase:Wt,requestHandler:De,valuesToUpperCase:Re,prettyMoney:Mt},Fo=Object.freeze(Object.defineProperty({__proto__:null,GraphQL:Le,Journal:Rt,Request:y,clickOutside:ee,default:pe,firstChapterToLowerCase:Wt,getPropFromObject:he,requestHandler:De,runPromiseQueue:Qe,valuesToUpperCase:Re},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 Po(t){for(let e in t)W[e]=t[e];t.styles&&jt(t.styles),Rt.welcome(),console.log("The config has been initialized. To get access check %c_config in console.","background: purple; color: white"),window._config=W}const Oo=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Lo(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="string"&&typeof t[1]=="number"}const Do="masterId",Ro="masterEntity";function Ie(t,e){if(!Array.isArray(e))return;if(Lo(e))return n(e);e.forEach(n);function n(o){t.append(Ro,o[0]),t.append(Do,o[1].toString())}}class N{static async anonymousGetList(e){return await y(`/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 c=(Array.isArray(s)?[s]:Object.entries(s)).map(([a,l="desc"])=>`@${a} ${l}`).join(",");n("order",c)}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=N.getSearchParamsForEntityListRead(n||{});return await y(`/close-api/data/${e}?${o.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getCount(e,n){const o=N.getSearchParamsForEntityListRead(n||{});return y(`/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 Ie(s,o==null?void 0:o.masterEntities),y(`/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 y(`/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 y(`/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 Ie(i,s==null?void 0:s.masterEntities),y(`/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 N.removeByKeys(e,s,o)}static removeByKeys(e,n,o){return y(`/close-api/data/entities/${e}`,{method:"delete",headers:{"Content-Type":"application/json"},body:JSON.stringify({keys:n,version:o})})}}var xt=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ge=(t,e,n)=>(xt(t,e,"read from private field"),n?n.call(t):e.get(t)),ht=(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)},gt=(t,e,n,o)=>(xt(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n),ie,$e;const et=class X extends O{constructor(e){super(),ht(this,ie,[]),ht(this,$e,!1),this.hashParams="",this.offset=0,this.name=e.name}set wait(e){gt(this,$e,e),this.emit(X.EVENT_CHANGE_WAIT,e)}get wait(){return Ge(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),N.getList(this.name,n).then(c=>(this.offset===0&&(this.array=[]),this.offset+=n.limit,c)).then(c=>{this.array.push(...c)}).then(()=>this.emit(X.EVENT_DATA,this.array)).finally(()=>{this.wait=!1})}set array(e){gt(this,ie,e),this.emit(X.EVENT_DATA,this.array)}add(e){Ge(this,ie).push(...e),this.emit(X.EVENT_DATA,this.array)}get array(){return Ge(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=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}}static getCellName(e){return typeof e.name=="string"?e.name:Array.isArray(e.name)?e.name[0]:null}};ie=new WeakMap;$e=new WeakMap;et.EVENT_DATA="LIST:DATA";et.EVENT_CHANGE_WAIT="LIST:UPDATE-WAIT";let Ut=et;const q=Symbol("__ROW_INDEX__");let tt=class extends Ut{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(C.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}`)}};tt.PROVIDE_NAME="table-controller";function Wo(t){const e=r.reactive(t.array);r.provide(tt.PROVIDE_NAME,t);const n=r.reactive(t.changes);t.on(Ut.EVENT_DATA,c=>e.splice(0,e.length,...c)),t.on(C.Form.EVENT_CHANGED,()=>{n.new=Object.keys(t.changes.new).reduce((c,a)=>{const l=Number(a);return c[l]=t.changes.new[l],c},{})});const o=r.computed(()=>[...e.reduce((c,a)=>{const l=a[q];return t.changes.remove.includes(l)||c.push({...a,...t.changes.edit[l]}),c},[]),...Object.values(n.new)]),s=C.Form.getParentForm();return s==null||s.subscribe(t),{activeRow:r.ref(null),array:o}}function Mo(t,e){t.read=()=>N.getList(t.name,{fields:e==null?void 0:e.fields}).then(n=>t.array=n).then(()=>t.emit(C.Form.EVENT_READ,t.array)),t.save=()=>{const n=t.name;Object.values(t.changes.new).forEach(async s=>{await N.create(n,s)}),Object.entries(t.changes.edit).forEach(async([s,i])=>{await N.updateById(t.name,o(Number(s)),i)});function o(s){const i=t.array.find(c=>c[q]===s);return i.id|i.Id}t.changes.remove.forEach(async s=>{await N.removeById(n,o(s),0)}),t.emit(C.Form.EVENT_SAVE)}}const jo=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class xo{static readHistoryById(e,n){return y(`/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 c=i.changes.map(a=>({...a,oldValue:a.originalValue,name:a.fieldName}));return{...i,changes:c}});return{...o,history:s}})}}var qt=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},j=(t,e,n)=>(qt(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)=>(qt(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n),Se,ae,Ne,Te,le,ce,Je;const H="_______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,Te,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,Je,()=>{}),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(C.utils.copyObject)),this.emitUpdateConfig()}get config(){return j(this,ae)}emitUpdateConfig(){this.emit(x.EVENT_CONFIG_UPDATE,this.config)}get order(){return j(this,Ne)}set order(e){G(this,Ne,e),this.emit(x.EVENT_ORDER_UPDATE,this.order)}get filters(){return j(this,Te)}set filters(e){Yt(j(this,Te),e)}set wait(e){G(this,le,e),this.emit(C.Form.EVENT_WAIT,j(this,le))}get wait(){return j(this,le)}get primaryKeys(){return j(this,Se)}at(e){return this.array[e%this.array.length]}atByKey(e){return this.array.find(n=>n[H]===e)}indexByKey(e){return this.array.findIndex(n=>n[H]===e)}static getKey(e){return e[H]}static hasKey(e){return typeof e!="object"||e===null?!1:Object.prototype.hasOwnProperty.call(e,H)}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,[H]:this.LIST_ROW_KEY++}}isWrapped(e){return Object.prototype.hasOwnProperty.call(e,H)}set read(e){G(this,ce,e)}get read(){return(...e)=>Promise.resolve().then(()=>{const n=j(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(()=>j(this,Je).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,[H]: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;Te=new WeakMap;le=new WeakMap;ce=new WeakMap;Je=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 M=ge;function zt(t,e){let n="",o=0,s=!1,i;t.read=(c={})=>{if(t.wait)return i;if(c.clean&&(n="",o=0,s=!1),s)return Promise.resolve([]);let a=e;typeof a=="function"&&(a=a());const l={};if(!t.name)throw new Error("Reading list`s data without name is not available.");a.order&&Array.isArray(a.order)&&a.order.length&&(l.order={[a.order[0]]:a.order[1]||"asc"}),a.fields&&(l.fields=a.fields),a.filter&&(l.filter=a.filter);const u=JSON.stringify(l.order)+JSON.stringify(l.filter)+JSON.stringify(l.fields);return u!==n&&!Number.isNaN(u)&&(o=0,n=u),"limit"in a&&(l.limit=a.limit),l.offset=o||a.offset||0,i=N.getList(t.name,l).then(d=>((o===0||c.clean)&&t.set([]),o+=l.limit,d)).then(d=>(t.add(...d),d.length===0&&(s=!0),d)),i}}function Gt(t){const e=r.reactive({wait:t.wait,array:[]});return t.on(M.EVENT_DATA,n=>{e.array.splice(0,e.array.length,...n.map(o=>Object.freeze(JSON.parse(JSON.stringify(o)))))}),t.on(C.Form.EVENT_WAIT,()=>{e.wait=t.wait}),e}function Ht(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(M.EVENT_CONFIG_UPDATE,()=>{t.read()});const s={list:t,defaultSettings:e};return r.provide(n,s),s}function Uo(t){const e=r.reactive([...t.config]);return t.on(M.EVENT_CONFIG_UPDATE,n=>{e.splice(0,e.length,...n)}),e}function Jt(t){const e=t.order||[],n=r.reactive(e);return t.on(M.EVENT_ORDER_UPDATE,o=>{n.splice(0,n.length,...o),t.read()}),n}function qo(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 Yt(t,e){Object.keys(t).forEach(n=>delete t[n]),Object.entries(e).forEach(([n,o])=>{t[n]=o})}function zo(t){const e=r.reactive(C.utils.copyObject(t.filters));return t.on(M.EVENT_FILTERS_UPDATE,n=>{Yt(e,n),t.read()}),e}function Go(t){const e=r.reactive([]);function n(a){return e.includes(a)}function o(a){n(a)||e.push(a)}function s(a){const l=e.findIndex(u=>u===a);l!==-1&&e.splice(l,1)}function i(a){const l=r.unref(t);if(a===void 0){e.length===0?l.forEach(o):l.forEach(s);return}n(a)?s(a):o(a)}const c=r.computed(()=>{const a=r.unref(t);return e.length===a.length&&a.length!==0});return[e,i,c,o,s]}class Ho extends M{constructor(e){super(e),this.changes=[],this.save=Jo.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 Jo(){const t=this.changes.filter(e=>e.status==="active");return Qe(t.map(e=>{console.log("++")}))}function Yo(){const t=r.ref(null);function e(n){t.value=n&&St(n)}return{activeRow:t,activateRow:e}}const Ko={props:{config:Array},name:"WidgetTableHead"},Xo={class:"widget-table__head"},Zo={class:"widget-table__head-title"};function Qo(t,e,n,o,s,i){return r.openBlock(),r.createElementBlock("tr",Xo,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.config,(c,a)=>(r.openBlock(),r.createElementBlock("th",{class:"widget-table__head-cell",key:a},[r.createElementVNode("p",Zo,r.toDisplayString(c.title),1)]))),128))])}const es=v(Ko,[["render",Qo],["__scopeId","data-v-f478f0d8"]]);function ts(t){return Kt(t,"YYYY/MM/DD HH:mm:ss")}function Kt(t,e="YYYY/MM/DD"){if(!t)return"";try{const n=new Date(t);return Nt.format(n,e)}catch(n){return console.log(n),"Invalid date"}}const ns=function(){let t=!1;const e=[];function n(){return t}function o(l,u){n()&&console[l](...u),e.push(u)}function s(...l){o("log",l)}function i(...l){o("warn",l)}function c(...l){o("error",l)}function a(l=!0){t=l}return{info:s,warn:i,history:e,display:a,error:c}}();function We(){return ns}function rs(t,e){const n=t.config.map(o=>os(o,t,e));return r.h("tr",{class:"widget-table__row widget-table-row"},n)}function os(t,e,n){const o=e.values,s=We();let{name:i,value:c}=M.getCellInfo(t,o);const a={onClick:[],class:["widget-table__cell widget-table-cell"]};function l(f){a.onClick.push(()=>f(o))}function u(f){Array.isArray(f)?a.class.push(...f):a.class.push(f)}const d=[],p=[];if(W.handleListCell)try{W.handleListCell(t,o,e,p)}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(u(`widget-table-cell_${t.type}`),t.type){case"number":{typeof c=="number"&&(c=new Intl.NumberFormat().format(c));break}case"date":{c=Kt(typeof c=="string"?c:null);break}case"dateTime":case"dateWithTime":{c=ts(typeof c=="string"?c:null);break}case"multi-select":{p.push(r.h(C.FormField,{type:"single-checkbox",modelValue:e.selected})),l(_t.bind(null,n,!0));break}case"select":{p.push(r.h(C.FormField,{type:"single-radio",modelValue:e.selected})),l(_t.bind(null,n,!1));break}}if(t.checked){const f=t.checked(o);p.push(r.h(C.FormField,{type:"single-checkbox",modelValue:f}))}if(t.onClick&&l(t.onClick),t.link)try{const f=t.link(o);if(f){const m=r.h(Ke.RouterLink,{to:f});p.push(m),u("list-cell-link")}}catch(f){console.warn("Error handle: Add Router link to cell",f)}return t.href&&(p.push(r.h("a",{href:t.href(o),target:"_blank"})),u("list-cell-link")),c!=null&&p.push(r.h("p",{class:"widget-list-cell-text"},c)),t.icon&&p.push(r.h(B,{name:t.icon})),t.class&&(typeof t.class=="function"?u(t.class(o)):u(t.class)),d.push(r.h("td",a,p)),d}function _t(t,e){t.emit("select",e)}function Xt(t,e){return()=>{try{return rs(t,e)}catch(n){return console.warn(n),null}}}const ss={props:{values:Object,config:Object,selected:Boolean},setup:Xt},is=["colspan"],yt=r.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{}},emits:["save","remove","close"],setup(t,{emit:e}){const n=t,o=r.ref(),s=r.computed(()=>!n.values&&!M.hasKey(n.values));return r.onMounted(()=>{setTimeout(()=>{o.value&&o.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(i,c)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:o},[r.createElementVNode("td",{colspan:i.rowLength},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.component),r.mergeProps(i.$attrs,{values:i.values,new:s.value,onClose:c[0]||(c[0]=a=>e("close")),onSave:c[1]||(c[1]=a=>e("save",a))}),null,16,["values","new"]))],8,is)],512))}}),as={class:"widget-wait flex gap_10 padding_15"},ls={class:"text_md"},cs=r.defineComponent({__name:"widget-wait",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",as,[r.createVNode(te,{color:"var(--primary)",class:"wait-spinner"}),r.createElementVNode("span",ls,r.toDisplayString(e.label),1)]))}});const Zt=v(cs,[["__scopeId","data-v-2038b2ba"]]),ds=r.defineComponent({__name:"widget-table",props:{array:{},config:{},mini:{type:Boolean},activeRow:{},selectRows:{},wait:{type:Boolean},classCallback:{type:Function}},emits:["update:activeRow","update:selectRows","save","read"],setup(t,{emit:e}){const n=t,o=r.useSlots(),s=r.computed(()=>{var l;return(l=o==null?void 0:o.default)==null?void 0:l.call(o)[0]}),i=r.computed(()=>n.array.map(l=>({values:l,hash:St(l)})));function c(l,u=!0){return n.selectRows?u?n.selectRows.indexOf(l)===-1?e("update:selectRows",[...n.selectRows,l]):e("update:selectRows",n.selectRows.filter(p=>p!==l)):e("update:selectRows",[l]):void 0}function a(l){e("save",l),e("update:activeRow",null)}return(l,u)=>(r.openBlock(),r.createElementBlock("div",null,[r.createVNode(r.Transition,{name:"move-horizontal"},{default:r.withCtx(()=>[l.wait?(r.openBlock(),r.createBlock(Zt,{key:0,label:"Loading data",color:"black",class:"widget-table-loader"})):r.createCommentVNode("",!0)]),_:1}),r.createElementVNode("table",{class:r.normalizeClass(["widget-table",{"widget-table_mini":l.mini}])},[r.createVNode(es,{config:l.config},null,8,["config"]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,({values:d,hash:p},f)=>{var m;return r.openBlock(),r.createElementBlock(r.Fragment,{key:f},[r.createVNode(ss,{config:l.config,values:d,selected:(m=l.selectRows)==null?void 0:m.includes(d),onSelect:g=>c(d,g),class:r.normalizeClass(l.classCallback?l.classCallback(d):"")},null,8,["config","values","selected","onSelect","class"]),s.value&&l.activeRow===p?(r.openBlock(),r.createBlock(yt,{key:0,component:s.value,"row-length":l.config.length,values:d,onClose:u[0]||(u[0]=g=>e("update:activeRow",null)),onSave:a,onRead:u[1]||(u[1]=g=>e("read"))},null,8,["component","row-length","values"])):r.createCommentVNode("",!0)],64)}),128)),l.activeRow===0?(r.openBlock(),r.createBlock(yt,{key:0,component:s.value,"row-length":l.config.length,onClose:u[2]||(u[2]=d=>e("update:activeRow",null)),onSave:a,onRead:u[3]||(u[3]=d=>e("read"))},null,8,["component","row-length"])):r.createCommentVNode("",!0)])],2)]))}});const us=Object.freeze(Object.defineProperty({__proto__:null,List:M,Table:Ho,WidgetTable:ds,useListOrder:Jt,useListProvide:Ht,useListRead:zt,useListState:Gt,useTableActiveRow:Yo},Symbol.toStringTag,{value:"Module"}));class ps 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 nt.get(e)}}const de=new ps;function fs(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 ms(t,e){try{return e.dataType==="DateTime"&&typeof t=="string"?new Date(t).toLocaleString():t}catch(n){We().error("prettify value by metadata",t,n)}}class hs{static getDictionary(e){if(!e)throw new Error(`Can't get dictionary for ${e}.`);return y(`/open-api/internationalization/language/${e}`)}}let J={};function Q(t,...e){if(typeof t!="string")return console.trace(`Label is not provided for translation: ${t}`),"undefined";let n=C.utils.getPropFromObject((this==null?void 0:this.vocabulary)||J,t);if(typeof n=="string")return vt(n,e);const o=C.utils.getPropFromObject(J==null?void 0:J.root,t);return typeof o=="string"?vt(o,e):(typeof n===void 0&&console.warn(`Translation for label "${t}" is not founded.`),t)}function vt(t,e){return e.forEach((n,o)=>{t=t.replaceAll(new RegExp(`\\{${o}}`,"g"),n)}),t}Q.setGlobalVocabulary=function(t){J=t};Q.getScope=function(t){const e=typeof t=="string"?t:"root";return typeof t!="string"&&console.warn(`SCOPE ${t} for translate is not string.`),Q.bind({vocabulary:C.utils.getPropFromObject(J,e.toLowerCase())})};Q.setVocabulary=function(t){return typeof t=="string"&&(t=C.utils.getPropFromObject(J,t)),Q.bind({vocabulary:t})};function gs(){return _s}const _s=function(){let t=1,e;const n=new Set,o=new Set,s=We();function i(){return{safeQueue:o,requestId:t,handlers:n}}function c(m){const g=[...n.values()];s.info("use-socket",`Handlers array length is ${n.size}. Response event: ${m.event}. Request id: ${m.requestId}`),g.forEach(h=>{const E=m.requestId;(h.requestId&&h.requestId===E||!h.requestId&&h.event===m.event)&&(s.info("use-socket",`Find appropriated handler: ${t}, event: ${h.event}`),h.callback(m.data,m),h.once&&(n.delete(h),s.info("use-socket","Handler was removed by *once* params was passed. ",h)))})}function a(m){console.log(`%cInitializing sockets: %c${m}`,"color: purple","color: black"),e=new WebSocket(m),e.onclose=function(g){s.error(`Connection to server was stopped: ${g.code} ${g.reason}`),setTimeout(()=>a(m))},e.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...o.values()].forEach(g=>{l(g),o.delete(g)})},e.onerror=function(g){console.warn(g)},e.onmessage=g=>{try{const h=JSON.parse(g.data);if(!Qt(h)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(h);return}c(h)}catch(h){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(h)}}}function l(m){e.send(m)}function u(m,g){n.add({event:m,callback:g})}function d(m,g){n.add({event:m,callback:g,once:!0})}function p(){return e&&(e==null?void 0:e.readyState)===1}function f(m,g,h){const E=++t,_=JSON.stringify({requestId:E,event:m,data:g,contextId:w.contextId,url:window.location.href});return p()?l(_):(o.add(_),s.info("use-socket","Socket is not connected. Message was send to save-queue.",_)),new Promise((b,D)=>{n.add({event:m,requestId:E,once:!0,callback:(S,A)=>{if(s.info("use-socket","Promise was resolve with next data:",S),ys(A))return void D(S);h&&h(S,A),b(S)}})})}return{get socket(){return e},on:u,once:d,emit:f,initialization:a,getDevInfo:i}}(),ys=t=>!!Qt(t)&&t.event==="request-error",Qt=t=>!!t&&typeof t=="object"&&t!==null&&"event"in t&&typeof t.event=="string"&&"requestId"in t&&typeof t.requestId=="number"&&"data"in t,vs={class:"breadcrumb__title"},ws=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",vs,r.toDisplayString(e.title),1),e.active?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(B,{key:0,class:"breadcrumb__icon",name:"caret-right"}))],2))}});const Cs=v(ws,[["__scopeId","data-v-1702aee0"]]),Es={class:"widget-breadcrumbs"},ks=r.defineComponent({__name:"widget-breadcrumbs",props:{array:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Es,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.array,(o,s)=>(r.openBlock(),r.createBlock(Cs,{key:s,title:o.title,link:o.link,active:s===e.array.length-1},null,8,["title","link","active"]))),128))]))}});const bs=v(ks,[["__scopeId","data-v-1dfb2668"]]),$s={props:{config:Array,values:Object,selected:Boolean},setup:Xt};const Ss=v($s,[["__scopeId","data-v-48d3df56"]]),Ns=t=>(r.pushScopeId("data-v-03c9724f"),t=t(),r.popScopeId(),t),Ts={class:"head-cell"},Bs=Ns(()=>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(C.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(it),{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),Bs])]))}});const Is=v(Vs,[["__scopeId","data-v-03c9724f"]]),As=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 l(m,g){let h=-1;do h++,g-=m[h];while(g>0&&h<m.length);return h}function u(m,g){let h=0;for(;g>0&&g>m[h]&&h<m.length;)g-=m[h],h++;return console.log(g,h),h>0?h:0}function d(m){try{s.value.style.insetInlineStart=m+"px"}catch(g){console.log(g)}}function p(m){try{s.value.style.width=m+"px",s.value.style.minWidth=m+"px",s.value.style.maxWidth=m+"px"}catch(g){console.log(g)}}function f(m){return m===null?!1:m.classList.contains("head-cell-resize")}o.value.addEventListener("pointerdown",function(g){var ct;function h(F){return F.screenX+b-A}const E=o.value,_=[...E.children].filter(F=>F.localName==="th"),b=((ct=E.offsetParent)==null?void 0:ct.scrollLeft)||0,D=_.map(F=>F.clientWidth),S=f(g.target),A=E.getBoundingClientRect().left,U=h(g),$=l(D,U),ne=D.slice(0,$).reduce((F,R)=>F+R,0),ye=U-ne,je=E.offsetWidth,re=_[$].clientWidth;if(n.config[$].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",g.screenX),console.log("Widths",D),console.log("max width",je),console.log("Start Position",U),console.log("Position From",$),console.log("Start Position",$),console.log("Global offset (Отступ самой таблицы от края экрана)",A),console.log("Del",ye),console.groupEnd(),s.value.innerText=_[$].textContent||"",s.value.style.display="grid",s.value.style.width=re+"px",s.value.style.cursor="grabbing",d(ne),p(re),document.addEventListener("pointermove",lt,{passive:!0}),document.addEventListener("pointerup",at);function at(F){if(console.group("END"),document.removeEventListener("pointermove",lt),document.removeEventListener("pointerup",at),S&&(n.config[$].width=s.value.style.width,n.config[$].minWidth=s.value.style.width,n.config[$].maxWidth=s.value.style.width,i(n.config)),!S){const R=F.screenX+b-A;console.log("ENP Position",R);const ve=u(D,R);if(console.log($,"->",ve),ve!==$){const oe=n.config[$],xe=n.config;xe.splice($,1),xe.splice(ve,0,oe),i(xe)}else{const oe=n.config[$].name;c(oe)}}s.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function lt(F){if(S){const oe=h(F)-U+re;p(oe);return}let R=F.screenX+b-A-ye;R<0&&(R=0),R+re>je&&(R=je-re),d(R)}})});function i(l){e("update:config",l)}function c(l){if(!l)return;if(Array.isArray(l)){if(l.length<1)return;l=l[0]}if(n.order.length===0||n.order[0]!==l)return void a([l]);const u=n.order.length===1||n.order[1]==="asc"?"asc":"desc";a([l,u==="asc"?"desc":"asc"])}function a(l){e("update:order",l)}return(l,u)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:o},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.config,(d,p)=>(r.openBlock(),r.createBlock(Is,r.mergeProps({key:d},d,{onOrder:f=>c(d.name),onSelect:u[0]||(u[0]=f=>e("select")),order:l.order}),null,16,["onOrder","order"]))),128)),r.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:s},"test",512)],512))}});const Fs=v(As,[["__scopeId","data-v-11644ad4"]]),Ps=50,Os=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,l=!0){if(n.selectedRows)if(!l)i(n.selectedRows.includes(a)?[]:[a]);else{const u=[...n.selectedRows],d=u.indexOf(a);d===-1?u.push(a):u==null||u.splice(d,1),i(u)}}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 c(a){if(!a)return;const l=a.target;l.scrollTop+l.clientHeight+Ps>l.scrollHeight&&e("scrollEnd")}return(a,l)=>(r.openBlock(),r.createElementBlock("div",{class:"es-list-container",onScrollPassive:c},[r.createElementVNode("table",{class:r.normalizeClass(["widget-list",{"widget-list_load":a.wait}])},[r.createElementVNode("thead",null,[r.createVNode(Fs,{onSelect:l[0]||(l[0]=u=>s()),"onUpdate:order":l[1]||(l[1]=u=>e("update:order",u)),"onUpdate:config":l[2]||(l[2]=u=>e("update:config",u)),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,(u,d)=>{var p;return r.openBlock(),r.createBlock(Ss,{key:d,class:"widget-list-row",values:u,config:a.config,selected:(p=a.selectedRows)==null?void 0:p.includes(u),onSelect:f=>o(u,f)},null,8,["values","config","selected","onSelect"])}),128))],2)],2)],32))}});const Ls=v(Os,[["__scopeId","data-v-a0fe6a42"]]),Ds={class:"widget-section"},Rs={class:"widget-section__header"},Ws={class:"widget-section-title"},Ms={class:"widget-section__body"},js=r.defineComponent({__name:"widget-section",props:{title:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Ds,[r.createElementVNode("div",Rs,[r.createElementVNode("p",Ws,r.toDisplayString(e.title),1)]),r.createElementVNode("div",Ms,[r.renderSlot(e.$slots,"default",{},void 0,!0)])]))}});const xs=v(js,[["__scopeId","data-v-07232553"]]),Us={class:"widget-form-info flex"},qs={class:"form-titles"},zs={class:"form-title margin-0"},Gs={class:"form-info text_size_md margin-0"},Hs={key:0,class:"form-container-label"},Js={class:"form-label__title text_size_sm"},Ys=r.defineComponent({__name:"WidgetFormInfo",props:{title:{},info:{},label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Us,[r.createElementVNode("div",qs,[r.createElementVNode("p",zs,r.toDisplayString(e.title),1),r.createElementVNode("p",Gs,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(B,{key:0,class:"form-label__icon",name:e.label.icon},null,8,["name"])):r.createCommentVNode("",!0),r.createElementVNode("p",Js,r.toDisplayString(e.label.title),1)],2)])):r.createCommentVNode("",!0)]))}});const Ks=v(Ys,[["__scopeId","data-v-6ea1062c"]]),Xs={class:"wrap__widget-form"},Zs={class:"widget-form"},Qs={class:"widget-form__head"},ei={class:"head-image"},ti={key:1},ni={class:"widget-form__body"},ri=r.defineComponent({__name:"WidgetForm",props:{title:{},info:{},image:{},icon:{},label:{},button:{},wait:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Xs,[r.createElementVNode("div",Zs,[r.createElementVNode("div",Qs,[r.createElementVNode("div",ei,[e.wait?(r.openBlock(),r.createBlock(te,{key:0,color:"#3949AB"})):(r.openBlock(),r.createElementBlock("div",ti,[e.icon?(r.openBlock(),r.createBlock(B,{key:0,class:"form-image",name:e.icon},null,8,["name"])):r.createCommentVNode("",!0)]))]),r.createVNode(Ks,{title:e.title,info:e.info,label:e.label},null,8,["title","info","label"]),e.button&&e.button.length?(r.openBlock(),r.createBlock(Ze,{key:0,class:"widget-form__button",array:e.button},null,8,["array"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",ni,[r.renderSlot(e.$slots,"default",{},void 0,!0)])])]))}});const oi=v(ri,[["__scopeId","data-v-f076ad65"]]),si={class:"validation-item-header"},ii={class:"validation-item__title text_bold margin-0"},ai={class:"validation-item-content"},li={class:"text_bold text_md margin-0"},ci={class:"text_md margin-0"},di=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",si,[r.createElementVNode("p",ii,r.toDisplayString(e.statusName),1)]),r.createElementVNode("div",ai,[r.createElementVNode("p",li,r.toDisplayString(e.title),1),r.createElementVNode("p",ci,r.toDisplayString(e.message),1)])],2))}});const ui=v(di,[["__scopeId","data-v-e6138c02"]]),pi={class:"modal-wrap"},fi={class:"modal-wrap-head"},mi={class:"modal-head__title margin-0"},hi={class:"modal-wrap-body"},gi=r.defineComponent({__name:"modal-wrap",props:{title:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",pi,[r.createElementVNode("div",fi,[r.createElementVNode("p",mi,r.toDisplayString(e.title),1)]),r.createElementVNode("div",hi,[r.renderSlot(e.$slots,"default",{},void 0,!0)])]))}});const _i=v(gi,[["__scopeId","data-v-119165b9"]]),yi={class:"modal-validation-body"},vi=r.defineComponent({__name:"modal-validation",props:{array:{}},setup(t){return(e,n)=>(r.openBlock(),r.createBlock(_i,{title:"Validation results"},{default:r.withCtx(()=>[r.createElementVNode("div",yi,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.array,(o,s)=>(r.openBlock(),r.createBlock(ui,{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 wi=v(vi,[["__scopeId","data-v-a39cfe2f"]]),Ci=["alt","src"],Ei=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))}}),ki=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(B,{key:0,name:"check"})):r.createCommentVNode("",!0)],2))}});const bi=v(ki,[["__scopeId","data-v-f4a3dc6c"]]),$i={class:"widget-card"},Si={class:"widget-card-toggle"},Ni={class:"widget-card-wrap"},Ti={class:"widget-card-content"},Bi={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",$i,[r.createElementVNode("div",Si,[r.createVNode(bi,{modelValue:n.selected,"onUpdate:modelValue":s[0]||(s[0]=i=>n.selected=i)},null,8,["modelValue"])]),r.createElementVNode("div",Ni,[r.createElementVNode("div",{class:"widget-card-arrow",onClick:s[1]||(s[1]=i=>n.hidden=!n.hidden)},[r.createVNode(B,{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",Bi,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 Ii=v(Vi,[["__scopeId","data-v-bca33c5b"]]);class V{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 y(W.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...e,AppName:W.applicationName})}).catch(V.parseError)}static registration(e){return e.AppName=W.applicationName,y(W.identityServerURL+"/api/Authenticate/Registration",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(e)}).catch(V.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 V.requestStepRegistrationProcess("StartRegistration",e)}static confirmPhoneRegistrationProcess(e){return V.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",e)}static confirmEmailRegistrationProcess(e){return V.requestStepRegistrationProcess("ConfirmEmailByRegistration",e)}static finishEmailRegistrationProcess(e){return V.requestStepRegistrationProcess("FinishRegistration",e)}static requestStepRegistrationProcess(e,n){return y(`${W.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).catch(V.parseError)}static startLoginProcess(e){return V.requestStepLoginProcess("StartLogin",e)}static loginWithPassword(e){return V.requestStepLoginProcess("LoginWithPassword",e)}static loginWithOtpCode(e){return V.requestStepLoginProcess("LoginWithOtpCode",e)}static requestStepLoginProcess(e,n){return y(`${W.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).catch(V.parseError).then(V.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 en=class ue{static async create(e){return y(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 y(ue.url+"?"+n.toString(),{method:"get"})}static async readMessages(e){return y(`${ue.url}/${e}/messages`,{method:"get"})}static async createMessage(e){return y(`${ue.url}/${e.talkId}/messages`,{method:"post",body:JSON.stringify({text:e.text}),headers:{"Content-Type":"application/json"}})}};en.url="/close-api/communications";let fe=en;class Ai{static async getDefaultView(e){return y("/close-api/views/"+e,{method:"GET",headers:{"Content-Type":"application/json"}})}}function wt(t){return{...t,createdEntities:t.createdEntites}}const tn=class Be{static async getStartConfig(e,n){return y([Be.url,e,n].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(e,n){return y([Be.url,e,n].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(wt)}static async runStep(e,n,o,s,i){return y([Be.url,e,n].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:o,token:s,values:i})}).then(wt)}};tn.url="/close-api/views/process-wizard";let Ve=tn;class nt{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 Ie(s,o),n&&s.append("id",n),y([this.url,e].join("/")+`?${s.toString()}`)}static getFieldInformation(e,n){return y(`/open-api/metadata/${e}/fields/${n}`)}static getTreatmentListField(e,n){return y(`/open-api/metadata/${e}/list-fields/${n}`)}}class Fi{static invite(e,n,o){return y("/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 y("/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 y("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e,version:n,mark:!1})})}}class rt{static get url(){return"/close-api/rules-validation/"}static validate(e,n){return y(rt.url+e,{method:"POST",body:JSON.stringify(n)})}}class Pi{static getConfiguration(){return y("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}}class nn{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 Ie(s,o),y([this.url(),e,n].join("/")+`?${s.toString()}`,{method:"GET"})}}const rn=class on extends O{constructor(e=[]){super(),this.array=r.reactive([]),this.defaultArray=[],this.setDefault(e)}emitUpdate(){this.emit(on.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)}};rn.EVENT_DATA="list-config:update";let Oi=rn;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 Di(t){const e=C.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 Ri(t){return typeof t!="object"||t===null?!1:!!(t.hasOwnProperty("start")||t.hasOwnProperty("end"))}function L(t){return Object.keys(t).reduce((e,n)=>{const 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(Ri(o)){let s=function(i){var c;return((c=i.match(/([^Z]*)/))==null?void 0:c[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(L.is(n,o)),e)},[]).join(" and ")}function _e(t){return typeof t=="string"?`'${t}'`:`${t}`}L.includes=function(e,n){return`@${e} Contains ${_e(n)}`};L.beginWith=function(e,n){return`@${e} BeginWith ${_e(n)}`};L.notEq=function(e,n){return`@${e} nq ${_e(n)}`};L.eq=function(e,n){return Array.isArray(n)?L.in(e,n):`@${e} eq ${_e(n)}`};L.in=function(e,n){const o=n.map(_e).join(", ");return`@${e} in (${o})`};L.and=function(...e){return e.join(" and ")};L.is=function(e,n){return`@${e} is ${n}`};L.or=function(...e){return e.join(" or ")};function Wi(t,e="images"){return`/static-folder/${e}/${t}`}function Mi(t,e,n){return t.reduce((o,s)=>{var a;let i=typeof e=="function"?e(s):s[e];const c=(a=o[o.length-1])==null?void 0:a.value;return c&&n(c,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 xi(t,e=1e3){let n=0;return(...o)=>{clearTimeout(n),n=setTimeout(()=>t(...o),e)}}function Ui(t,e){const n=r.ref(null);function o(){return t.name?nt.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");T.add("error",s.message)}):Promise.reject()}return t.on(C.Form.EVENT_READ,o),{metadata:n,update:o}}class ot extends Error{static UndefinedStatus(){return new ot("Status is undefined.")}}class qi extends ot{}function zi(t,e){const n=r.reactive([]);async function o(i,c){if(!i)throw qi.UndefinedStatus();const a=await nn.get({criterion:i});n.splice(0,n.length),n.push(...a.map(l=>s(l,c)))}return{actions:n,update:o};function s(i,c){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:c},contextId:w.contextId}),headers:{"Content-Type":"application/json"}})).then(l=>l.json()).then(l=>{if(!l.success)throw e!=null&&e.ModalValidationResult&&l.validationEffect?$t.openModal(e.ModalValidationResult,{rules:l.validationEffect.results}):T.add("error",l.message),new Error;return l}).then(l=>{l.message&&T.add("info",l.message),e!=null&&e.handleAffectedEntities&&e.handleAffectedEntities(l.affectedEntities)}).then(()=>t.read()))()}}}class Ae{static url(){return"/close-api/presentation"}static getStatuses(e,n){return fetch(`${Ae.url()}/status/${e}/${n}`).then(o=>o.json())}}function Gi(t){const e=r.reactive({title:"Loading",type:"wait"});function n(o){if(t.name&&Number.isInteger(o))return Ae.getStatuses(t.name,o).then(s=>{e.type=s.type,e.title=s.name})}return t.on(C.Form.EVENT_READ,o=>{var c,a;const{code:s,name:i}={code:(c=o.Status)==null?void 0:c.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."):Ae.getStatuses(t.name,s).then(l=>{e.type=l.type,e.title=i}):void console.log("Form without name.")}),{label:e,update:n}}function Hi(t,e){const n=Ke.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 N.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 N.updateById(t.name,o.value,t.changes,{version:t.version})}).then(i=>{t.version=i.version})),t.on(C.Form.EVENT_SAVE,t.read.bind(t)),{formShadowState:s}}function Ji(){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 Yi(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 N.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 c=me(i);throw T.add("error",c.message),c}).finally(()=>{n.ready=!0})},t.save=()=>{let s=e();return Promise.resolve().then(()=>{if(!t.name)throw I.EntityWithoutName("Use Form Request");return N.updateById(t.name,s.id,t.changes,{version:t.version})}).then(i=>{t.version=i.version||i.Version}).catch(i=>{const c=me(i);throw T.add("error",c.message),c})},t.on(C.Form.EVENT_SAVE,t.read.bind(t)),{shadowFormState:n,initShadow:o}}class Ki{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 Z{static url(){return"close-api/billing"}static getBillingMetadata(e){return fetch(`/${Z.url()}/calculator/${e}`)}static calculate(e,n){return y(`/${Z.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 y(`/${Z.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:e,returnURL:n})})}static applyOnlinePayment(e){return y(`/${Z.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:e})})}}class Xi{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 y(s)}}function Zi(t){return t.statusName==="Completed"}function Qi(t){return t.statusName==="FinalStepWithConfirmation"}function ea(t){return t.statusName==="ValidationError"}function ta(t,e,n){let o=null;const s=r.reactive({wait:null});let i=[],c=null;const a=r.ref(null);function l(){a.value=i.find(_=>_.name===c)||null}function u(){var _;return c?((_=i.find(b=>b.name===c))==null?void 0:_.fields)||[]:[]}function d(_){if(l(),ea(_))return void n.onValidation(_.validationResults);if((_.statusName==="FinalStep"||_.statusName==="NextStep")&&(!u().length||na(u(),n.presets)))return E(n.presets||{});Zi(_)&&n.onCompleted(_),Qi(_)&&n.onConfirmation(_)}async function p(){try{await f(),await h()}catch(_){const{message:b}=me(_);T.add("error",b)}}function f(){return s.wait="Loading process information.",Ve.getStartConfig(e,t).then(_=>{i=_.steps.map(b=>({label:b.title,name:b.stepName,number:b.number,fields:b.frontendEntity.objectTypes.reduce((D,S)=>(S.properties.forEach(A=>{D.push({name:A.name,label:A.title,type:A.refEntityName||A.dataType})}),D),[])}))}).then(_=>(s.wait=!1,_))}function m(_){return c=_.nextStepName,o=_.token,_}function g(_){const b=me(_);T.add("error",b.message)}function h(){return s.wait="Starting process",Ve.startProcess(e,t).then(m).then(d).catch(g).finally(()=>{s.wait=null})}function E(_={}){return!o||!c?Promise.reject("Not step or token."):(s.wait="Expect the result",Ve.runStep(e,t,c,o,_).then(m).then(d).catch(g).finally(()=>{s.wait=!1}))}return{initialize:p,state:s,currentStepConfig:r.readonly(a),next:E}}function na(t,e){for(let n=0;n<t.length;n++){const o=t[n];if(!C.utils.getPropFromObject(e,o.name))return!1}return!0}const ra="close-api/proxy/Equipment/Search";class oa{static search(e,n,o,s,i){const c=new URLSearchParams;c.append("pattern",e||""),n&&c.append("categoryId",n),o&&c.append("useType",String(o)),s&&c.append("statusCode",s),i&&(c.append("limit",String(i.limit)),c.append("offset",String(i.offset)));const a=`/${ra}?${c.toString()}`;return y(a,{method:"GET",headers:{"Content-Type":"application/json"}})}}const sa={class:"widget-table__head"},ia={class:"widget-table__head-label margin_0 text_overflow"},aa=r.defineComponent({__name:"widget-table-head",props:{config:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("tr",sa,[(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",ia,r.toDisplayString(o.label),1)]))),128))]))}});const la=v(aa,[["__scopeId","data-v-fe89c589"]]);function ca(t){return typeof t.name=="string"?t.name:Array.isArray(t.name)?t.name[0]:null}function da(t,e){const n=ca(t);let o=n?C.utils.getPropFromObject(e,n):null;return o===void 0&&(o=null),t.value?t.value(o,e):o}function ua(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ye={exports:{}},He,Ct;function pa(){if(Ct)return He;Ct=1;var t=1e3,e=t*60,n=e*60,o=n*24,s=o*7,i=o*365.25;He=function(d,p){p=p||{};var f=typeof d;if(f==="string"&&d.length>0)return c(d);if(f==="number"&&isFinite(d))return p.long?l(d):a(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function c(d){if(d=String(d),!(d.length>100)){var p=/^(-?(?:\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(p){var f=parseFloat(p[1]),m=(p[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 p=Math.abs(d);return p>=o?Math.round(d/o)+"d":p>=n?Math.round(d/n)+"h":p>=e?Math.round(d/e)+"m":p>=t?Math.round(d/t)+"s":d+"ms"}function l(d){var p=Math.abs(d);return p>=o?u(d,p,o,"day"):p>=n?u(d,p,n,"hour"):p>=e?u(d,p,e,"minute"):p>=t?u(d,p,t,"second"):d+" ms"}function u(d,p,f,m){var g=p>=f*1.5;return Math.round(d/f)+" "+m+(g?"s":"")}return He}function fa(t){n.debug=n,n.default=n,n.coerce=l,n.disable=i,n.enable=s,n.enabled=c,n.humanize=pa(),n.destroy=u,Object.keys(t).forEach(d=>{n[d]=t[d]}),n.names=[],n.skips=[],n.formatters={};function e(d){let p=0;for(let f=0;f<d.length;f++)p=(p<<5)-p+d.charCodeAt(f),p|=0;return n.colors[Math.abs(p)%n.colors.length]}n.selectColor=e;function n(d){let p,f=null,m,g;function h(...E){if(!h.enabled)return;const _=h,b=Number(new Date),D=b-(p||b);_.diff=D,_.prev=p,_.curr=b,p=b,E[0]=n.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let S=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(U,$)=>{if(U==="%%")return"%";S++;const ne=n.formatters[$];if(typeof ne=="function"){const ye=E[S];U=ne.call(_,ye),E.splice(S,1),S--}return U}),n.formatArgs.call(_,E),(_.log||n.log).apply(_,E)}return h.namespace=d,h.useColors=n.useColors(),h.color=n.selectColor(d),h.extend=o,h.destroy=n.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==n.namespaces&&(m=n.namespaces,g=n.enabled(d)),g),set:E=>{f=E}}),typeof n.init=="function"&&n.init(h),h}function o(d,p){const f=n(this.namespace+(typeof p>"u"?":":p)+d);return f.log=this.log,f}function s(d){n.save(d),n.namespaces=d,n.names=[],n.skips=[];let p;const f=(typeof d=="string"?d:"").split(/[\s,]+/),m=f.length;for(p=0;p<m;p++)f[p]&&(d=f[p].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(p=>"-"+p)].join(",");return n.enable(""),d}function c(d){if(d[d.length-1]==="*")return!0;let p,f;for(p=0,f=n.skips.length;p<f;p++)if(n.skips[p].test(d))return!1;for(p=0,f=n.names.length;p<f;p++)if(n.names[p].test(d))return!0;return!1}function a(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function l(d){return d instanceof Error?d.stack||d.message:d}function u(){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 ma=fa;(function(t,e){e.formatArgs=o,e.save=s,e.load=i,e.useColors=n,e.storage=c(),e.destroy=(()=>{let l=!1;return()=>{l||(l=!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(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const u="color: "+this.color;l.splice(1,0,u,"color: inherit");let d=0,p=0;l[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(d++,f==="%c"&&(p=d))}),l.splice(p,0,u)}e.log=console.debug||console.log||(()=>{});function s(l){try{l?e.storage.setItem("debug",l):e.storage.removeItem("debug")}catch{}}function i(){let l;try{l=e.storage.getItem("debug")}catch{}return!l&&typeof process<"u"&&"env"in process&&(l=process.env.DEBUG),l}function c(){try{return localStorage}catch{}}t.exports=ma(e);const{formatters:a}=t.exports;a.j=function(l){try{return JSON.stringify(l)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}}})(Ye,Ye.exports);var ha=Ye.exports;const ga=ua(ha);function _a(t){return["eservices-core",t].join(":")}function st(t){return Me(t,"YYYY/MM/DD HH:mm:ss")}function Me(t,e="YYYY/MM/DD"){if(!t)return"";try{const n=new Date(t);return Nt.format(n,e)}catch(n){return console.log(n),"Invalid date"}}const ya={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}`})}},it=v(ya,[["__scopeId","data-v-e287c8d9"]]),va=ga(_a("setup-list-row"));function wa(t,e){const n=t.config.map(o=>Ca(o,t,e));return r.h("tr",{class:"widget-table__row widget-table-row"},n)}function Ca(t,e,n){const o=e.values;let s=da(t,o);const i={onClick:[],class:["widget-table__cell widget-table-cell"]};function c(d){i.onClick.push(()=>d(o))}function a(d){Array.isArray(d)?i.class.push(...d):i.class.push(d)}const l=[],u=[];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=Me(typeof s=="string"?s:null);break}case"dateTime":case"dateWithTime":{s=st(typeof s=="string"?s:null);break}case"multi-select":{u.push(r.h(C.FormField,{type:"single-checkbox",modelValue:e.selected})),c(Et.bind(null,n,!0));break}case"select":{u.push(r.h(C.FormField,{type:"single-radio",modelValue:e.selected})),c(Et.bind(null,n,!1));break}}if(t.onClick&&c(t.onClick),t.link)try{const d=t.link(o);if(d){const p=r.h(Ke.RouterLink,{to:d});u.push(p),a("widget-table-cell_link")}}catch(d){va("Can't add router link",d)}return t.href&&(u.push(r.h("a",{href:t.href(o),target:"_blank"})),a("widget-table-cell_link")),(typeof s=="string"||typeof s=="number")&&u.push(r.h("p",{class:"widget-list-cell-text"},s)),t.icon&&u.push(r.h(it,{name:t.icon})),t.class&&(typeof t.class=="function"?a(t.class(o)):a(t.class)),l.push(r.h("td",i,u)),l}function Et(t,e){t.emit("select",e)}function Ea(t,e){return()=>{try{return wa(t,e)}catch(n){return console.warn(n),null}}}const ka={props:{values:Object,config:Object,selected:Boolean},setup:Ea},ba=["colspan"],kt=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,ba)],512))}}),sn={LIST_ACTIVE_NEW:"list-active-new"},$a={class:"widget-table"},bt="update:selectedRows",Sa=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,l=!0){if(!n.selectedRows)return;if(!l)return e(bt,n.selectedRows.includes(a)?[]:[a]);const u=[...n.selectedRows],d=u.indexOf(a);return d===-1?u.push(a):u.splice(d,1),e(bt,u)}function c(a){e("save",a),e("update:activeRow",null)}return(a,l)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("table",$a,[r.createVNode(la,{config:a.config},null,8,["config"]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.array,(u,d)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:d},[r.createVNode(ka,{config:a.config,values:u,selected:a.selectedRows.includes(u),onSelect:p=>i(u,p),class:r.normalizeClass(a.classCallback?a.classCallback(u):"")},null,8,["config","values","selected","onSelect","class"]),s.value&&a.activeRow===u?(r.openBlock(),r.createBlock(kt,{key:0,component:s.value,"row-length":a.config.length,values:u,onClose:l[0]||(l[0]=p=>e("update:activeRow",null)),onSave:c,"is-new":!1},null,8,["component","row-length","values"])):r.createCommentVNode("",!0)],64))),128)),a.activeRow===r.unref(sn).LIST_ACTIVE_NEW?(r.openBlock(),r.createBlock(kt,{key:0,component:s.value,"row-length":a.config.length,onClose:l[1]||(l[1]=u=>e("update:activeRow",null)),onSave:c,"is-new":!0},null,8,["component","row-length"])):r.createCommentVNode("",!0)])])]))}});function Na(){const t=r.ref(null);function e(n){t.value=n}return{activeRow:t,activateRow:e}}const Ta={clickOutside:ee,requestHandler:De,valuesToUpperCase:Re,prettyDate:Me,prettyDateWithTime:st,Filter:L,staticLink:Wi,groupArrayByField:Mi,uuidv4:ji,Request:y,prettyMoney:Mt},Ba={widgets:Eo,usage:ko,utils:Fo,mixins:un,config:Po,types:Oo};exports.ApplicationManager=Dt;exports.Communication=Li;exports.ComputedMetadata=fs;exports.CoreError=I;exports.Filter=L;exports.List=M;exports.ListConfig=Oi;exports.Manager=w;exports.MetadataStore=de;exports.ModalValidation=wi;exports.NotificationSystem=T;exports.ProcessWrap=Oe;exports.Request=y;exports.SYMBOL_ROW=q;exports.Table=tt;exports.WidgetBreadcrumbs=bs;exports.WidgetButton=Bt;exports.WidgetCard=Ii;exports.WidgetForm=oi;exports.WidgetIcon=it;exports.WidgetImage=Ei;exports.WidgetList=Ls;exports.WidgetMultiButton=Ze;exports.WidgetNotificationSystem=At;exports.WidgetSection=xs;exports.WidgetSpinner=te;exports.WidgetTable=Sa;exports.WidgetWait=Zt;exports.actionService=nn;exports.authService=V;exports.billingService=Z;exports.clickOutside=ee;exports.clientService=Ot;exports.communicationService=fe;exports.configurationService=Xi;exports.constants=sn;exports.dataService=N;exports.debounce=xi;exports.default=Ba;exports.documentsService=Ki;exports.equipmentService=oa;exports.fileService=Tt;exports.historyService=xo;exports.internationalizationService=hs;exports.invitationService=Fi;exports.metadataService=nt;exports.newImport=us;exports.openService=Pi;exports.parseError=me;exports.prettifyValueByMetadata=ms;exports.prettyDate=Me;exports.prettyDateWithTime=st;exports.processWizardService=Ve;exports.requestHandler=De;exports.ruleValidationService=rt;exports.t=Q;exports.testTypes=jo;exports.useCommunication=Di;exports.useCustomerState=Ji;exports.useFormAction=zi;exports.useFormLabel=Gi;exports.useFormMetadata=Ui;exports.useFormRequest=Yi;exports.useFormRequestData=Hi;exports.useListActiveRow=Na;exports.useListConfig=Uo;exports.useListFilter=zo;exports.useListOrder=Jt;exports.useListProvide=Ht;exports.useListRead=zt;exports.useListSearch=qo;exports.useListSelect=Go;exports.useListState=Gt;exports.useLogger=We;exports.useManagerState=$o;exports.useSocket=gs;exports.useTableRequest=Mo;exports.useTableState=Wo;exports.useWizard=ta;exports.utils=Ta;exports.viewService=Ai;
10
+ */const ut=function(t,e){return t in this.events||(this.events[t]=[]),this.events[t].push(e),this.off.bind(this,t,e)},pt=function(t,e){t in this.events&&this.events[t].forEach(n=>n(e))},ft=function(t,e){const n=this.events[t];if(!n)return;const o=n.indexOf(e);o!==-1&&n.splice(o,1)},mt=function(){this.events={}};class O{constructor(){this.events={}}on(e,n){return ut.call(this,e,n)}emit(e,n){return pt.call(this,e,n)}off(e,n){return ft.call(this,e,n)}cleanEvents(){mt.call(this)}static on(e,n){return ut.call(O,e,n)}static emit(e,n){return pt.call(O,e,n)}static off(e,n){return ft.call(O,e,n)}static cleanEvents(){mt.call(O)}}O.events={};var Lt=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ee=(t,e,n)=>(Lt(t,e,"read from private field"),n?n.call(t):e.get(t)),qe=(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)},ze=(t,e,n,o)=>(Lt(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n),se,ke,be;const K=class P extends O{constructor(){super(...arguments),qe(this,se,void 0),qe(this,ke,"front"),this.organizations=[],qe(this,be,!1)}set language(e){localStorage.setItem(P.LOCALSTORAGE_LANGUAGE_KEY,e)}get language(){return localStorage.getItem(P.LOCALSTORAGE_LANGUAGE_KEY)||P.DEFAULT_LANGUAGE}checkLanguageInStorage(){return!!localStorage.getItem(P.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){ze(this,se,e)}get router(){if(!Ee(this,se))throw new Error("Router was not founded. Please set router: Manager.router = router: VueRouter");return Ee(this,se)}set type(e){ze(this,ke,e)}get type(){return Ee(this,ke)}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(e){ze(this,be,e),this.emit(P.EVENT_READY_UPDATE,e)}get ready(){return Ee(this,be)}onReady(e){return this.on(P.EVENT_READY_UPDATE,e)}onupdateContext(e){return this.on(P.EVENT_CONTEXT_UPDATE,e)}onupdateData(e){return this.on(P.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(P.CURRENT_CONTEXT_KEY,String(e)),this.emit(P.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(P.CURRENT_CONTEXT_KEY)||"");!Number.isNaN(n)&&this.validateContextId(Number(n))?this.setCurrentContext(n):this.setCurrentContext(Number(e.id))}catch{T.add("error",I.ApiNotAvailable().message)}}loadCustomerData(){return Ot.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 Dt=K;const w=new Dt;function $o(){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 So(t){return t.text().then(e=>{try{return JSON.parse(e)}catch{return Pt}})}function y(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=>So(n).then(o=>{if(!n.ok)throw o;return o}))}class Le{constructor(){}static parseNamesFromListConfig(e){let n=Le.parseFieldsToGraphQL(e.reduce((s,i)=>(i.name&&s.push(i.name),s),[]));function o(s){let i="";for(let c in s)typeof s[c]=="boolean"?i+=` ${c} `:i+=` ${c} { ${o(s[c])} }`;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("."),c=s.substring(i+1),a=s.substring(0,i);a in o||(o[a]={}),n(o[a],c)}else o[s]=!0;return o}return e.reduce(n,{})}}class No{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 Rt=new No;function Wt(t){return t&&t[0].toLowerCase()+t.slice(1)}const To={props:{message:String},name:"ModalWait",components:{WidgetSpinner:te}},Bo={class:"modal__wait modal-default flex_column"};function Vo(t,e,n,o,s,i){const c=r.resolveComponent("widget-spinner");return r.openBlock(),r.createElementBlock("div",Bo,[r.createVNode(c),r.createElementVNode("p",null,r.toDisplayString(n.message),1)])}const Io=v(To,[["render",Vo],["__scopeId","data-v-4d18289e"]]),Ao={error:!0,wait:!1,throw:!0};async function De(t,e={}){const n={modalWait:null};e=Object.assign({},e,Ao);try{e.wait&&(n.modalWait=await $t.openModal(Io,{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?T.add("error",s.message,{children:s.details||[],timeout:12}):s!=null&&s.message?T.add("error",s.message):(console.warn(s),T.add("error",I.ApiResponseParseFailed().message))),e.throw)throw s}).finally(()=>{var o;(o=n.modalWait)==null||o.close()})}function Re(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=Re(o)),e[s]=o,e},{})}function Mt(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:y,clickOutside:ee,getPropFromObject:he,runPromiseQueue:Qe,GraphQL:Le,firstChapterToLowerCase:Wt,requestHandler:De,valuesToUpperCase:Re,prettyMoney:Mt},Fo=Object.freeze(Object.defineProperty({__proto__:null,GraphQL:Le,Journal:Rt,Request:y,clickOutside:ee,default:pe,firstChapterToLowerCase:Wt,getPropFromObject:he,requestHandler:De,runPromiseQueue:Qe,valuesToUpperCase:Re},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 Po(t){for(let e in t)W[e]=t[e];t.styles&&jt(t.styles),Rt.welcome(),console.log("The config has been initialized. To get access check %c_config in console.","background: purple; color: white"),window._config=W}const Oo=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Lo(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="string"&&typeof t[1]=="number"}const Do="masterId",Ro="masterEntity";function Ie(t,e){if(!Array.isArray(e))return;if(Lo(e))return n(e);e.forEach(n);function n(o){t.append(Ro,o[0]),t.append(Do,o[1].toString())}}class N{static async anonymousGetList(e){return await y(`/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 c=(Array.isArray(s)?[s]:Object.entries(s)).map(([a,l="desc"])=>`@${a} ${l}`).join(",");n("order",c)}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=N.getSearchParamsForEntityListRead(n||{});return await y(`/close-api/data/${e}?${o.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getCount(e,n){const o=N.getSearchParamsForEntityListRead(n||{});return y(`/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 Ie(s,o==null?void 0:o.masterEntities),y(`/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 y(`/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 y(`/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 Ie(i,s==null?void 0:s.masterEntities),y(`/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 N.removeByKeys(e,s,o)}static removeByKeys(e,n,o){return y(`/close-api/data/entities/${e}`,{method:"delete",headers:{"Content-Type":"application/json"},body:JSON.stringify({keys:n,version:o})})}}var xt=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ge=(t,e,n)=>(xt(t,e,"read from private field"),n?n.call(t):e.get(t)),ht=(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)},gt=(t,e,n,o)=>(xt(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n),ie,$e;const et=class X extends O{constructor(e){super(),ht(this,ie,[]),ht(this,$e,!1),this.hashParams="",this.offset=0,this.name=e.name}set wait(e){gt(this,$e,e),this.emit(X.EVENT_CHANGE_WAIT,e)}get wait(){return Ge(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),N.getList(this.name,n).then(c=>(this.offset===0&&(this.array=[]),this.offset+=n.limit,c)).then(c=>{this.array.push(...c)}).then(()=>this.emit(X.EVENT_DATA,this.array)).finally(()=>{this.wait=!1})}set array(e){gt(this,ie,e),this.emit(X.EVENT_DATA,this.array)}add(e){Ge(this,ie).push(...e),this.emit(X.EVENT_DATA,this.array)}get array(){return Ge(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=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}}static getCellName(e){return typeof e.name=="string"?e.name:Array.isArray(e.name)?e.name[0]:null}};ie=new WeakMap;$e=new WeakMap;et.EVENT_DATA="LIST:DATA";et.EVENT_CHANGE_WAIT="LIST:UPDATE-WAIT";let Ut=et;const q=Symbol("__ROW_INDEX__");let tt=class extends Ut{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(C.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}`)}};tt.PROVIDE_NAME="table-controller";function Wo(t){const e=r.reactive(t.array);r.provide(tt.PROVIDE_NAME,t);const n=r.reactive(t.changes);t.on(Ut.EVENT_DATA,c=>e.splice(0,e.length,...c)),t.on(C.Form.EVENT_CHANGED,()=>{n.new=Object.keys(t.changes.new).reduce((c,a)=>{const l=Number(a);return c[l]=t.changes.new[l],c},{})});const o=r.computed(()=>[...e.reduce((c,a)=>{const l=a[q];return t.changes.remove.includes(l)||c.push({...a,...t.changes.edit[l]}),c},[]),...Object.values(n.new)]),s=C.Form.getParentForm();return s==null||s.subscribe(t),{activeRow:r.ref(null),array:o}}function Mo(t,e){t.read=()=>N.getList(t.name,{fields:e==null?void 0:e.fields}).then(n=>t.array=n).then(()=>t.emit(C.Form.EVENT_READ,t.array)),t.save=()=>{const n=t.name;Object.values(t.changes.new).forEach(async s=>{await N.create(n,s)}),Object.entries(t.changes.edit).forEach(async([s,i])=>{await N.updateById(t.name,o(Number(s)),i)});function o(s){const i=t.array.find(c=>c[q]===s);return i.id|i.Id}t.changes.remove.forEach(async s=>{await N.removeById(n,o(s),0)}),t.emit(C.Form.EVENT_SAVE)}}const jo=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class xo{static readHistoryById(e,n){return y(`/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 c=i.changes.map(a=>({...a,oldValue:a.originalValue,name:a.fieldName}));return{...i,changes:c}});return{...o,history:s}})}}var qt=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},j=(t,e,n)=>(qt(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)=>(qt(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n),Se,ae,Ne,Te,le,ce,Je;const H="_______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,Te,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,Je,()=>{}),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(C.utils.copyObject)),this.emitUpdateConfig()}get config(){return j(this,ae)}emitUpdateConfig(){this.emit(x.EVENT_CONFIG_UPDATE,this.config)}get order(){return j(this,Ne)}set order(e){G(this,Ne,e),this.emit(x.EVENT_ORDER_UPDATE,this.order)}get filters(){return j(this,Te)}set filters(e){Yt(j(this,Te),e)}set wait(e){G(this,le,e),this.emit(C.Form.EVENT_WAIT,j(this,le))}get wait(){return j(this,le)}get primaryKeys(){return j(this,Se)}at(e){return this.array[e%this.array.length]}atByKey(e){return this.array.find(n=>n[H]===e)}indexByKey(e){return this.array.findIndex(n=>n[H]===e)}static getKey(e){return e[H]}static hasKey(e){return typeof e!="object"||e===null?!1:Object.prototype.hasOwnProperty.call(e,H)}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,[H]:this.LIST_ROW_KEY++}}isWrapped(e){return Object.prototype.hasOwnProperty.call(e,H)}set read(e){G(this,ce,e)}get read(){return(...e)=>Promise.resolve().then(()=>{const n=j(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(()=>j(this,Je).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,[H]: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;Te=new WeakMap;le=new WeakMap;ce=new WeakMap;Je=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 M=ge;function zt(t,e){let n="",o=0,s=!1,i;t.read=(c={})=>{if(t.wait)return i;if(c.clean&&(n="",o=0,s=!1),s)return Promise.resolve([]);let a=e;typeof a=="function"&&(a=a());const l={};if(!t.name)throw new Error("Reading list`s data without name is not available.");a.order&&Array.isArray(a.order)&&a.order.length&&(l.order={[a.order[0]]:a.order[1]||"asc"}),a.fields&&(l.fields=a.fields),a.filter&&(l.filter=a.filter);const u=JSON.stringify(l.order)+JSON.stringify(l.filter)+JSON.stringify(l.fields);return u!==n&&!Number.isNaN(u)&&(o=0,n=u),"limit"in a&&(l.limit=a.limit),l.offset=o||a.offset||0,i=N.getList(t.name,l).then(d=>((o===0||c.clean)&&t.set([]),o+=l.limit,d)).then(d=>(t.add(...d),d.length===0&&(s=!0),d)),i}}function Gt(t){const e=r.reactive({wait:t.wait,array:[]});return t.on(M.EVENT_DATA,n=>{e.array.splice(0,e.array.length,...n.map(o=>Object.freeze(JSON.parse(JSON.stringify(o)))))}),t.on(C.Form.EVENT_WAIT,()=>{e.wait=t.wait}),e}function Ht(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(M.EVENT_CONFIG_UPDATE,()=>{t.read()});const s={list:t,defaultSettings:e};return r.provide(n,s),s}function Uo(t){const e=r.reactive([...t.config]);return t.on(M.EVENT_CONFIG_UPDATE,n=>{e.splice(0,e.length,...n)}),e}function Jt(t){const e=t.order||[],n=r.reactive(e);return t.on(M.EVENT_ORDER_UPDATE,o=>{n.splice(0,n.length,...o),t.read()}),n}function qo(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 Yt(t,e){Object.keys(t).forEach(n=>delete t[n]),Object.entries(e).forEach(([n,o])=>{t[n]=o})}function zo(t){const e=r.reactive(C.utils.copyObject(t.filters));return t.on(M.EVENT_FILTERS_UPDATE,n=>{Yt(e,n),t.read()}),e}function Go(t){const e=r.reactive([]);function n(a){return e.includes(a)}function o(a){n(a)||e.push(a)}function s(a){const l=e.findIndex(u=>u===a);l!==-1&&e.splice(l,1)}function i(a){const l=r.unref(t);if(a===void 0){e.length===0?l.forEach(o):l.forEach(s);return}n(a)?s(a):o(a)}const c=r.computed(()=>{const a=r.unref(t);return e.length===a.length&&a.length!==0});return[e,i,c,o,s]}class Ho extends M{constructor(e){super(e),this.changes=[],this.save=Jo.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 Jo(){const t=this.changes.filter(e=>e.status==="active");return Qe(t.map(e=>{console.log("++")}))}function Yo(){const t=r.ref(null);function e(n){t.value=n&&St(n)}return{activeRow:t,activateRow:e}}const Ko={props:{config:Array},name:"WidgetTableHead"},Xo={class:"widget-table__head"},Zo={class:"widget-table__head-title"};function Qo(t,e,n,o,s,i){return r.openBlock(),r.createElementBlock("tr",Xo,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.config,(c,a)=>(r.openBlock(),r.createElementBlock("th",{class:"widget-table__head-cell",key:a},[r.createElementVNode("p",Zo,r.toDisplayString(c.title),1)]))),128))])}const es=v(Ko,[["render",Qo],["__scopeId","data-v-f478f0d8"]]);function ts(t){return Kt(t,"YYYY/MM/DD HH:mm:ss")}function Kt(t,e="YYYY/MM/DD"){if(!t)return"";try{const n=new Date(t);return Nt.format(n,e)}catch(n){return console.log(n),"Invalid date"}}const ns=function(){let t=!1;const e=[];function n(){return t}function o(l,u){n()&&console[l](...u),e.push(u)}function s(...l){o("log",l)}function i(...l){o("warn",l)}function c(...l){o("error",l)}function a(l=!0){t=l}return{info:s,warn:i,history:e,display:a,error:c}}();function We(){return ns}function rs(t,e){const n=t.config.map(o=>os(o,t,e));return r.h("tr",{class:"widget-table__row widget-table-row"},n)}function os(t,e,n){const o=e.values,s=We();let{name:i,value:c}=M.getCellInfo(t,o);const a={onClick:[],class:["widget-table__cell widget-table-cell"]};function l(f){a.onClick.push(()=>f(o))}function u(f){Array.isArray(f)?a.class.push(...f):a.class.push(f)}const d=[],p=[];if(W.handleListCell)try{W.handleListCell(t,o,e,p)}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(u(`widget-table-cell_${t.type}`),t.type){case"number":{typeof c=="number"&&(c=new Intl.NumberFormat().format(c));break}case"date":{c=Kt(typeof c=="string"?c:null);break}case"dateTime":case"dateWithTime":{c=ts(typeof c=="string"?c:null);break}case"multi-select":{p.push(r.h(C.FormField,{type:"single-checkbox",modelValue:e.selected})),l(_t.bind(null,n,!0));break}case"select":{p.push(r.h(C.FormField,{type:"single-radio",modelValue:e.selected})),l(_t.bind(null,n,!1));break}}if(t.checked){const f=t.checked(o);p.push(r.h(C.FormField,{type:"single-checkbox",modelValue:f}))}if(t.onClick&&l(t.onClick),t.link)try{const f=t.link(o);if(f){const m=r.h(Ke.RouterLink,{to:f});p.push(m),u("list-cell-link")}}catch(f){console.warn("Error handle: Add Router link to cell",f)}return t.href&&(p.push(r.h("a",{href:t.href(o),target:"_blank"})),u("list-cell-link")),c!=null&&p.push(r.h("p",{class:"widget-list-cell-text"},c)),t.icon&&p.push(r.h(B,{name:t.icon})),t.class&&(typeof t.class=="function"?u(t.class(o)):u(t.class)),d.push(r.h("td",a,p)),d}function _t(t,e){t.emit("select",e)}function Xt(t,e){return()=>{try{return rs(t,e)}catch(n){return console.warn(n),null}}}const ss={props:{values:Object,config:Object,selected:Boolean},setup:Xt},is=["colspan"],yt=r.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{}},emits:["save","remove","close"],setup(t,{emit:e}){const n=t,o=r.ref(),s=r.computed(()=>!n.values&&!M.hasKey(n.values));return r.onMounted(()=>{setTimeout(()=>{o.value&&o.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(i,c)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:o},[r.createElementVNode("td",{colspan:i.rowLength},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.component),r.mergeProps(i.$attrs,{values:i.values,new:s.value,onClose:c[0]||(c[0]=a=>e("close")),onSave:c[1]||(c[1]=a=>e("save",a))}),null,16,["values","new"]))],8,is)],512))}}),as={class:"widget-wait flex gap_10 padding_15"},ls={class:"text_md"},cs=r.defineComponent({__name:"widget-wait",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",as,[r.createVNode(te,{color:"var(--primary)",class:"wait-spinner"}),r.createElementVNode("span",ls,r.toDisplayString(e.label),1)]))}});const Zt=v(cs,[["__scopeId","data-v-2038b2ba"]]),ds=r.defineComponent({__name:"widget-table",props:{array:{},config:{},mini:{type:Boolean},activeRow:{},selectRows:{},wait:{type:Boolean},classCallback:{type:Function}},emits:["update:activeRow","update:selectRows","save","read"],setup(t,{emit:e}){const n=t,o=r.useSlots(),s=r.computed(()=>{var l;return(l=o==null?void 0:o.default)==null?void 0:l.call(o)[0]}),i=r.computed(()=>n.array.map(l=>({values:l,hash:St(l)})));function c(l,u=!0){return n.selectRows?u?n.selectRows.indexOf(l)===-1?e("update:selectRows",[...n.selectRows,l]):e("update:selectRows",n.selectRows.filter(p=>p!==l)):e("update:selectRows",[l]):void 0}function a(l){e("save",l),e("update:activeRow",null)}return(l,u)=>(r.openBlock(),r.createElementBlock("div",null,[r.createVNode(r.Transition,{name:"move-horizontal"},{default:r.withCtx(()=>[l.wait?(r.openBlock(),r.createBlock(Zt,{key:0,label:"Loading data",color:"black",class:"widget-table-loader"})):r.createCommentVNode("",!0)]),_:1}),r.createElementVNode("table",{class:r.normalizeClass(["widget-table",{"widget-table_mini":l.mini}])},[r.createVNode(es,{config:l.config},null,8,["config"]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,({values:d,hash:p},f)=>{var m;return r.openBlock(),r.createElementBlock(r.Fragment,{key:f},[r.createVNode(ss,{config:l.config,values:d,selected:(m=l.selectRows)==null?void 0:m.includes(d),onSelect:g=>c(d,g),class:r.normalizeClass(l.classCallback?l.classCallback(d):"")},null,8,["config","values","selected","onSelect","class"]),s.value&&l.activeRow===p?(r.openBlock(),r.createBlock(yt,{key:0,component:s.value,"row-length":l.config.length,values:d,onClose:u[0]||(u[0]=g=>e("update:activeRow",null)),onSave:a,onRead:u[1]||(u[1]=g=>e("read"))},null,8,["component","row-length","values"])):r.createCommentVNode("",!0)],64)}),128)),l.activeRow===0?(r.openBlock(),r.createBlock(yt,{key:0,component:s.value,"row-length":l.config.length,onClose:u[2]||(u[2]=d=>e("update:activeRow",null)),onSave:a,onRead:u[3]||(u[3]=d=>e("read"))},null,8,["component","row-length"])):r.createCommentVNode("",!0)])],2)]))}});const us=Object.freeze(Object.defineProperty({__proto__:null,List:M,Table:Ho,WidgetTable:ds,useListOrder:Jt,useListProvide:Ht,useListRead:zt,useListState:Gt,useTableActiveRow:Yo},Symbol.toStringTag,{value:"Module"}));class ps 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 nt.get(e)}}const de=new ps;function fs(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 ms(t,e){try{return e.dataType==="DateTime"&&typeof t=="string"?new Date(t).toLocaleString():t}catch(n){We().error("prettify value by metadata",t,n)}}class hs{static getDictionary(e){if(!e)throw new Error(`Can't get dictionary for ${e}.`);return y(`/open-api/internationalization/language/${e}`)}}let J={};function Q(t,...e){if(typeof t!="string")return console.trace(`Label is not provided for translation: ${t}`),"undefined";let n=C.utils.getPropFromObject((this==null?void 0:this.vocabulary)||J,t);if(typeof n=="string")return vt(n,e);const o=C.utils.getPropFromObject(J==null?void 0:J.root,t);return typeof o=="string"?vt(o,e):(typeof n===void 0&&console.warn(`Translation for label "${t}" is not founded.`),t)}function vt(t,e){return e.forEach((n,o)=>{t=t.replaceAll(new RegExp(`\\{${o}}`,"g"),n)}),t}Q.setGlobalVocabulary=function(t){J=t};Q.getScope=function(t){const e=typeof t=="string"?t:"root";return typeof t!="string"&&console.warn(`SCOPE ${t} for translate is not string.`),Q.bind({vocabulary:C.utils.getPropFromObject(J,e.toLowerCase())})};Q.setVocabulary=function(t){return typeof t=="string"&&(t=C.utils.getPropFromObject(J,t)),Q.bind({vocabulary:t})};function gs(){return _s}const _s=function(){let t=1,e;const n=new Set,o=new Set,s=We();function i(){return{safeQueue:o,requestId:t,handlers:n}}function c(m){const g=[...n.values()];s.info("use-socket",`Handlers array length is ${n.size}. Response event: ${m.event}. Request id: ${m.requestId}`),g.forEach(h=>{const E=m.requestId;(h.requestId&&h.requestId===E||!h.requestId&&h.event===m.event)&&(s.info("use-socket",`Find appropriated handler: ${t}, event: ${h.event}`),h.callback(m.data,m),h.once&&(n.delete(h),s.info("use-socket","Handler was removed by *once* params was passed. ",h)))})}function a(m){console.log(`%cInitializing sockets: %c${m}`,"color: purple","color: black"),e=new WebSocket(m),e.onclose=function(g){s.error(`Connection to server was stopped: ${g.code} ${g.reason}`),setTimeout(()=>a(m))},e.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...o.values()].forEach(g=>{l(g),o.delete(g)})},e.onerror=function(g){console.warn(g)},e.onmessage=g=>{try{const h=JSON.parse(g.data);if(!Qt(h)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(h);return}c(h)}catch(h){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(h)}}}function l(m){e.send(m)}function u(m,g){n.add({event:m,callback:g})}function d(m,g){n.add({event:m,callback:g,once:!0})}function p(){return e&&(e==null?void 0:e.readyState)===1}function f(m,g,h){const E=++t,_=JSON.stringify({requestId:E,event:m,data:g,contextId:w.contextId,url:window.location.href});return p()?l(_):(o.add(_),s.info("use-socket","Socket is not connected. Message was send to save-queue.",_)),new Promise((b,D)=>{n.add({event:m,requestId:E,once:!0,callback:(S,A)=>{if(s.info("use-socket","Promise was resolve with next data:",S),ys(A))return void D(S);h&&h(S,A),b(S)}})})}return{get socket(){return e},on:u,once:d,emit:f,initialization:a,getDevInfo:i}}(),ys=t=>!!Qt(t)&&t.event==="request-error",Qt=t=>!!t&&typeof t=="object"&&t!==null&&"event"in t&&typeof t.event=="string"&&"requestId"in t&&typeof t.requestId=="number"&&"data"in t,vs={class:"breadcrumb__title"},ws=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",vs,r.toDisplayString(e.title),1),e.active?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(B,{key:0,class:"breadcrumb__icon",name:"caret-right"}))],2))}});const Cs=v(ws,[["__scopeId","data-v-1702aee0"]]),Es={class:"widget-breadcrumbs"},ks=r.defineComponent({__name:"widget-breadcrumbs",props:{array:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Es,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.array,(o,s)=>(r.openBlock(),r.createBlock(Cs,{key:s,title:o.title,link:o.link,active:s===e.array.length-1},null,8,["title","link","active"]))),128))]))}});const bs=v(ks,[["__scopeId","data-v-1dfb2668"]]),$s={props:{config:Array,values:Object,selected:Boolean},setup:Xt};const Ss=v($s,[["__scopeId","data-v-48d3df56"]]),Ns=t=>(r.pushScopeId("data-v-03c9724f"),t=t(),r.popScopeId(),t),Ts={class:"head-cell"},Bs=Ns(()=>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(C.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(it),{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),Bs])]))}});const Is=v(Vs,[["__scopeId","data-v-03c9724f"]]),As=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 l(m,g){let h=-1;do h++,g-=m[h];while(g>0&&h<m.length);return h}function u(m,g){let h=0;for(;g>0&&g>m[h]&&h<m.length;)g-=m[h],h++;return console.log(g,h),h>0?h:0}function d(m){try{s.value.style.insetInlineStart=m+"px"}catch(g){console.log(g)}}function p(m){try{s.value.style.width=m+"px",s.value.style.minWidth=m+"px",s.value.style.maxWidth=m+"px"}catch(g){console.log(g)}}function f(m){return m===null?!1:m.classList.contains("head-cell-resize")}o.value.addEventListener("pointerdown",function(g){var ct;function h(F){return F.screenX+b-A}const E=o.value,_=[...E.children].filter(F=>F.localName==="th"),b=((ct=E.offsetParent)==null?void 0:ct.scrollLeft)||0,D=_.map(F=>F.clientWidth),S=f(g.target),A=E.getBoundingClientRect().left,U=h(g),$=l(D,U),ne=D.slice(0,$).reduce((F,R)=>F+R,0),ye=U-ne,je=E.offsetWidth,re=_[$].clientWidth;if(n.config[$].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",g.screenX),console.log("Widths",D),console.log("max width",je),console.log("Start Position",U),console.log("Position From",$),console.log("Start Position",$),console.log("Global offset (Отступ самой таблицы от края экрана)",A),console.log("Del",ye),console.groupEnd(),s.value.innerText=_[$].textContent||"",s.value.style.display="grid",s.value.style.width=re+"px",s.value.style.cursor="grabbing",d(ne),p(re),document.addEventListener("pointermove",lt,{passive:!0}),document.addEventListener("pointerup",at);function at(F){if(console.group("END"),document.removeEventListener("pointermove",lt),document.removeEventListener("pointerup",at),S&&(n.config[$].width=s.value.style.width,n.config[$].minWidth=s.value.style.width,n.config[$].maxWidth=s.value.style.width,i(n.config)),!S){const R=F.screenX+b-A;console.log("ENP Position",R);const ve=u(D,R);if(console.log($,"->",ve),ve!==$){const oe=n.config[$],xe=n.config;xe.splice($,1),xe.splice(ve,0,oe),i(xe)}else{const oe=n.config[$].name;c(oe)}}s.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function lt(F){if(S){const oe=h(F)-U+re;p(oe);return}let R=F.screenX+b-A-ye;R<0&&(R=0),R+re>je&&(R=je-re),d(R)}})});function i(l){e("update:config",l)}function c(l){if(!l)return;if(Array.isArray(l)){if(l.length<1)return;l=l[0]}if(n.order.length===0||n.order[0]!==l)return void a([l]);const u=n.order.length===1||n.order[1]==="asc"?"asc":"desc";a([l,u==="asc"?"desc":"asc"])}function a(l){e("update:order",l)}return(l,u)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:o},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.config,(d,p)=>(r.openBlock(),r.createBlock(Is,r.mergeProps({key:d},d,{onOrder:f=>c(d.name),onSelect:u[0]||(u[0]=f=>e("select")),order:l.order}),null,16,["onOrder","order"]))),128)),r.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:s},"test",512)],512))}});const Fs=v(As,[["__scopeId","data-v-11644ad4"]]),Ps=50,Os=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,l=!0){if(n.selectedRows)if(!l)i(n.selectedRows.includes(a)?[]:[a]);else{const u=[...n.selectedRows],d=u.indexOf(a);d===-1?u.push(a):u==null||u.splice(d,1),i(u)}}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 c(a){if(!a)return;const l=a.target;l.scrollTop+l.clientHeight+Ps>l.scrollHeight&&e("scrollEnd")}return(a,l)=>(r.openBlock(),r.createElementBlock("div",{class:"es-list-container",onScrollPassive:c},[r.createElementVNode("table",{class:r.normalizeClass(["widget-list",{"widget-list_load":a.wait}])},[r.createElementVNode("thead",null,[r.createVNode(Fs,{onSelect:l[0]||(l[0]=u=>s()),"onUpdate:order":l[1]||(l[1]=u=>e("update:order",u)),"onUpdate:config":l[2]||(l[2]=u=>e("update:config",u)),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,(u,d)=>{var p;return r.openBlock(),r.createBlock(Ss,{key:d,class:"widget-list-row",values:u,config:a.config,selected:(p=a.selectedRows)==null?void 0:p.includes(u),onSelect:f=>o(u,f)},null,8,["values","config","selected","onSelect"])}),128))],2)],2)],32))}});const Ls=v(Os,[["__scopeId","data-v-a0fe6a42"]]),Ds={class:"widget-section"},Rs={class:"widget-section__header"},Ws={class:"widget-section-title"},Ms={class:"widget-section__body"},js=r.defineComponent({__name:"widget-section",props:{title:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Ds,[r.createElementVNode("div",Rs,[r.createElementVNode("p",Ws,r.toDisplayString(e.title),1)]),r.createElementVNode("div",Ms,[r.renderSlot(e.$slots,"default",{},void 0,!0)])]))}});const xs=v(js,[["__scopeId","data-v-07232553"]]),Us={class:"widget-form-info flex"},qs={class:"form-titles"},zs={class:"form-title margin-0"},Gs={class:"form-info text_size_md margin-0"},Hs={key:0,class:"form-container-label"},Js={class:"form-label__title text_size_sm"},Ys=r.defineComponent({__name:"WidgetFormInfo",props:{title:{},info:{},label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Us,[r.createElementVNode("div",qs,[r.createElementVNode("p",zs,r.toDisplayString(e.title),1),r.createElementVNode("p",Gs,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(B,{key:0,class:"form-label__icon",name:e.label.icon},null,8,["name"])):r.createCommentVNode("",!0),r.createElementVNode("p",Js,r.toDisplayString(e.label.title),1)],2)])):r.createCommentVNode("",!0)]))}});const Ks=v(Ys,[["__scopeId","data-v-6ea1062c"]]),Xs={class:"wrap__widget-form"},Zs={class:"widget-form"},Qs={class:"widget-form__head"},ei={class:"head-image"},ti={key:1},ni={class:"widget-form__body"},ri=r.defineComponent({__name:"WidgetForm",props:{title:{},info:{},image:{},icon:{},label:{},button:{},wait:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Xs,[r.createElementVNode("div",Zs,[r.createElementVNode("div",Qs,[r.createElementVNode("div",ei,[e.wait?(r.openBlock(),r.createBlock(te,{key:0,color:"#3949AB"})):(r.openBlock(),r.createElementBlock("div",ti,[e.icon?(r.openBlock(),r.createBlock(B,{key:0,class:"form-image",name:e.icon},null,8,["name"])):r.createCommentVNode("",!0)]))]),r.createVNode(Ks,{title:e.title,info:e.info,label:e.label},null,8,["title","info","label"]),e.button&&e.button.length?(r.openBlock(),r.createBlock(Ze,{key:0,class:"widget-form__button",array:e.button},null,8,["array"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",ni,[r.renderSlot(e.$slots,"default",{},void 0,!0)])])]))}});const oi=v(ri,[["__scopeId","data-v-f076ad65"]]),si={class:"validation-item-header"},ii={class:"validation-item__title text_bold margin-0"},ai={class:"validation-item-content"},li={class:"text_bold text_md margin-0"},ci={class:"text_md margin-0"},di=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",si,[r.createElementVNode("p",ii,r.toDisplayString(e.statusName),1)]),r.createElementVNode("div",ai,[r.createElementVNode("p",li,r.toDisplayString(e.title),1),r.createElementVNode("p",ci,r.toDisplayString(e.message),1)])],2))}});const ui=v(di,[["__scopeId","data-v-e6138c02"]]),pi={class:"modal-wrap"},fi={class:"modal-wrap-head"},mi={class:"modal-head__title margin-0"},hi={class:"modal-wrap-body"},gi=r.defineComponent({__name:"modal-wrap",props:{title:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",pi,[r.createElementVNode("div",fi,[r.createElementVNode("p",mi,r.toDisplayString(e.title),1)]),r.createElementVNode("div",hi,[r.renderSlot(e.$slots,"default",{},void 0,!0)])]))}});const _i=v(gi,[["__scopeId","data-v-119165b9"]]),yi={class:"modal-validation-body"},vi=r.defineComponent({__name:"modal-validation",props:{array:{}},setup(t){return(e,n)=>(r.openBlock(),r.createBlock(_i,{title:"Validation results"},{default:r.withCtx(()=>[r.createElementVNode("div",yi,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.array,(o,s)=>(r.openBlock(),r.createBlock(ui,{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 wi=v(vi,[["__scopeId","data-v-a39cfe2f"]]),Ci=["alt","src"],Ei=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))}}),ki=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(B,{key:0,name:"check"})):r.createCommentVNode("",!0)],2))}});const bi=v(ki,[["__scopeId","data-v-f4a3dc6c"]]),$i={class:"widget-card"},Si={class:"widget-card-toggle"},Ni={class:"widget-card-wrap"},Ti={class:"widget-card-content"},Bi={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",$i,[r.createElementVNode("div",Si,[r.createVNode(bi,{modelValue:n.selected,"onUpdate:modelValue":s[0]||(s[0]=i=>n.selected=i)},null,8,["modelValue"])]),r.createElementVNode("div",Ni,[r.createElementVNode("div",{class:"widget-card-arrow",onClick:s[1]||(s[1]=i=>n.hidden=!n.hidden)},[r.createVNode(B,{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",Bi,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 Ii=v(Vi,[["__scopeId","data-v-bca33c5b"]]);class V{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 y(W.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...e,AppName:W.applicationName})}).catch(V.parseError)}static registration(e){return e.AppName=W.applicationName,y(W.identityServerURL+"/api/Authenticate/Registration",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(e)}).catch(V.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 V.requestStepRegistrationProcess("StartRegistration",e)}static confirmPhoneRegistrationProcess(e){return V.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",e)}static confirmEmailRegistrationProcess(e){return V.requestStepRegistrationProcess("ConfirmEmailByRegistration",e)}static finishEmailRegistrationProcess(e){return V.requestStepRegistrationProcess("FinishRegistration",e)}static requestStepRegistrationProcess(e,n){return y(`${W.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).catch(V.parseError)}static startLoginProcess(e){return V.requestStepLoginProcess("StartLogin",e)}static loginWithPassword(e){return V.requestStepLoginProcess("LoginWithPassword",e)}static loginWithOtpCode(e){return V.requestStepLoginProcess("LoginWithOtpCode",e)}static requestStepLoginProcess(e,n){return y(`${W.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).catch(V.parseError).then(V.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 en=class ue{static async create(e){return y(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 y(ue.url+"?"+n.toString(),{method:"get"})}static async readMessages(e){return y(`${ue.url}/${e}/messages`,{method:"get"})}static async createMessage(e){return y(`${ue.url}/${e.talkId}/messages`,{method:"post",body:JSON.stringify({text:e.text}),headers:{"Content-Type":"application/json"}})}};en.url="/close-api/communications";let fe=en;class Ai{static async getDefaultView(e){return y("/close-api/views/"+e,{method:"GET",headers:{"Content-Type":"application/json"}})}}function wt(t){return{...t,createdEntities:t.createdEntites}}const tn=class Be{static async getStartConfig(e,n){return y([Be.url,e,n].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(e,n){return y([Be.url,e,n].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(wt)}static async runStep(e,n,o,s,i){return y([Be.url,e,n].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:o,token:s,values:i})}).then(wt)}};tn.url="/close-api/views/process-wizard";let Ve=tn;class nt{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 Ie(s,o),n&&s.append("id",n),y([this.url,e].join("/")+`?${s.toString()}`)}static getFieldInformation(e,n){return y(`/open-api/metadata/${e}/fields/${n}`)}static getTreatmentListField(e,n){return y(`/open-api/metadata/${e}/list-fields/${n}`)}}class Fi{static invite(e,n,o){return y("/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 y("/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 y("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e,version:n,mark:!1})})}}class rt{static get url(){return"/close-api/rules-validation/"}static validate(e,n){return y(rt.url+e,{method:"POST",body:JSON.stringify(n)})}}class Pi{static getConfiguration(){return y("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}}class nn{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 Ie(s,o),y([this.url(),e,n].join("/")+`?${s.toString()}`,{method:"GET"})}}const rn=class on extends O{constructor(e=[]){super(),this.array=r.reactive([]),this.defaultArray=[],this.setDefault(e)}emitUpdate(){this.emit(on.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)}};rn.EVENT_DATA="list-config:update";let Oi=rn;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 Di(t){const e=C.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 Ri(t){return typeof t!="object"||t===null?!1:!!(t.hasOwnProperty("start")||t.hasOwnProperty("end"))}function L(t){return Object.keys(t).reduce((e,n)=>{const 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(Ri(o)){let s=function(i){var c;return((c=i.match(/([^Z]*)/))==null?void 0:c[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(L.is(n,o)),e)},[]).join(" and ")}function _e(t){return typeof t=="string"?`'${t}'`:`${t}`}L.includes=function(e,n){return`@${e} Contains ${_e(n)}`};L.beginWith=function(e,n){return`@${e} BeginWith ${_e(n)}`};L.notEq=function(e,n){return`@${e} nq ${_e(n)}`};L.eq=function(e,n){return Array.isArray(n)?L.in(e,n):`@${e} eq ${_e(n)}`};L.in=function(e,n){const o=n.map(_e).join(", ");return`@${e} in (${o})`};L.and=function(...e){return e.join(" and ")};L.is=function(e,n){return`@${e} is ${n}`};L.or=function(...e){return e.join(" or ")};function Wi(t,e="images"){return`/static-folder/${e}/${t}`}function Mi(t,e,n){return t.reduce((o,s)=>{var a;let i=typeof e=="function"?e(s):s[e];const c=(a=o[o.length-1])==null?void 0:a.value;return c&&n(c,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 xi(t,e=1e3){let n=0;return(...o)=>{clearTimeout(n),n=setTimeout(()=>t(...o),e)}}function Ui(t,e){const n=r.ref(null);function o(){return t.name?nt.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");T.add("error",s.message)}):Promise.reject()}return t.on(C.Form.EVENT_READ,o),{metadata:n,update:o}}class ot extends Error{static UndefinedStatus(){return new ot("Status is undefined.")}}class qi extends ot{}function zi(t,e){const n=r.reactive([]);async function o(i,c){if(!i)throw qi.UndefinedStatus();const a=await nn.get({criterion:i});n.splice(0,n.length),n.push(...a.map(l=>s(l,c)))}return{actions:n,update:o};function s(i,c){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:c},contextId:w.contextId}),headers:{"Content-Type":"application/json"}})).then(l=>l.json()).then(l=>{if(!l.success)throw e!=null&&e.ModalValidationResult&&l.validationEffect?$t.openModal(e.ModalValidationResult,{rules:l.validationEffect.results}):T.add("error",l.message),new Error;return l}).then(l=>{l.message&&T.add("info",l.message),e!=null&&e.handleAffectedEntities&&e.handleAffectedEntities(l.affectedEntities)}).then(()=>t.read()))()}}}class Ae{static url(){return"/close-api/presentation"}static getStatuses(e,n){return fetch(`${Ae.url()}/status/${e}/${n}`).then(o=>o.json())}}function Gi(t){const e=r.reactive({title:"Loading",type:"wait"});function n(o){if(t.name&&Number.isInteger(o))return Ae.getStatuses(t.name,o).then(s=>{e.type=s.type,e.title=s.name})}return t.on(C.Form.EVENT_READ,o=>{var c,a;const{code:s,name:i}={code:(c=o.Status)==null?void 0:c.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."):Ae.getStatuses(t.name,s).then(l=>{e.type=l.type,e.title=i}):void console.log("Form without name.")}),{label:e,update:n}}function Hi(t,e){const n=Ke.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 N.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 N.updateById(t.name,o.value,t.changes,{version:t.version})}).then(i=>{t.version=i.version})),t.on(C.Form.EVENT_SAVE,t.read.bind(t)),{formShadowState:s}}function Ji(){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 Yi(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 N.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 c=me(i);throw T.add("error",c.message),c}).finally(()=>{n.ready=!0})},t.save=()=>{let s=e();return Promise.resolve().then(()=>{if(!t.name)throw I.EntityWithoutName("Use Form Request");return N.updateById(t.name,s.id,t.changes,{version:t.version})}).then(i=>{t.version=i.version||i.Version}).catch(i=>{const c=me(i);throw T.add("error",c.message),c})},t.on(C.Form.EVENT_SAVE,t.read.bind(t)),{shadowFormState:n,initShadow:o}}class Ki{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 Z{static url(){return"close-api/billing"}static getBillingMetadata(e){return fetch(`/${Z.url()}/calculator/${e}`)}static calculate(e,n){return y(`/${Z.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 y(`/${Z.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:e,returnURL:n})})}static applyOnlinePayment(e){return y(`/${Z.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:e})})}}class Xi{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 y(s)}}function Zi(t){return t.statusName==="Completed"}function Qi(t){return t.statusName==="FinalStepWithConfirmation"}function ea(t){return t.statusName==="ValidationError"}function ta(t,e,n){let o=null;const s=r.reactive({wait:null});let i=[],c=null;const a=r.ref(null);function l(){a.value=i.find(_=>_.name===c)||null}function u(){var _;return c?((_=i.find(b=>b.name===c))==null?void 0:_.fields)||[]:[]}function d(_){if(l(),ea(_))return void n.onValidation(_.validationResults);if((_.statusName==="FinalStep"||_.statusName==="NextStep")&&(!u().length||na(u(),n.presets)))return E(n.presets||{});Zi(_)&&n.onCompleted(_),Qi(_)&&n.onConfirmation(_)}async function p(){try{await f(),await h()}catch(_){const{message:b}=me(_);T.add("error",b)}}function f(){return s.wait="Loading process information.",Ve.getStartConfig(e,t).then(_=>{i=_.steps.map(b=>({label:b.title,name:b.stepName,number:b.number,fields:b.frontendEntity.objectTypes.reduce((D,S)=>(S.properties.forEach(A=>{D.push({name:A.name,label:A.title,type:A.refEntityName||A.dataType})}),D),[])}))}).then(_=>(s.wait=!1,_))}function m(_){return c=_.nextStepName,o=_.token,_}function g(_){const b=me(_);T.add("error",b.message)}function h(){return s.wait="Starting process",Ve.startProcess(e,t).then(m).then(d).catch(g).finally(()=>{s.wait=null})}function E(_={}){return!o||!c?Promise.reject("Not step or token."):(s.wait="Expect the result",Ve.runStep(e,t,c,o,_).then(m).then(d).catch(g).finally(()=>{s.wait=!1}))}return{initialize:p,state:s,currentStepConfig:r.readonly(a),next:E}}function na(t,e){for(let n=0;n<t.length;n++){const o=t[n];if(!C.utils.getPropFromObject(e,o.name))return!1}return!0}const ra="close-api/proxy/Equipment/Search";class oa{static search(e,n,o,s,i){const c=new URLSearchParams;c.append("pattern",e||""),n&&c.append("categoryId",n),o&&c.append("useType",String(o)),s&&c.append("statusCode",s),i&&(c.append("limit",String(i.limit)),c.append("offset",String(i.offset)));const a=`/${ra}?${c.toString()}`;return y(a,{method:"GET",headers:{"Content-Type":"application/json"}})}}const sa={class:"widget-table__head"},ia={class:"widget-table__head-label margin_0 text_overflow"},aa=r.defineComponent({__name:"widget-table-head",props:{config:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("tr",sa,[(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",ia,r.toDisplayString(o.label),1)]))),128))]))}});const la=v(aa,[["__scopeId","data-v-fe89c589"]]);function ca(t){return typeof t.name=="string"?t.name:Array.isArray(t.name)?t.name[0]:null}function da(t,e){const n=ca(t);let o=n?C.utils.getPropFromObject(e,n):null;return o===void 0&&(o=null),t.value?t.value(o,e):o}function ua(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ye={exports:{}},He,Ct;function pa(){if(Ct)return He;Ct=1;var t=1e3,e=t*60,n=e*60,o=n*24,s=o*7,i=o*365.25;He=function(d,p){p=p||{};var f=typeof d;if(f==="string"&&d.length>0)return c(d);if(f==="number"&&isFinite(d))return p.long?l(d):a(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function c(d){if(d=String(d),!(d.length>100)){var p=/^(-?(?:\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(p){var f=parseFloat(p[1]),m=(p[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 p=Math.abs(d);return p>=o?Math.round(d/o)+"d":p>=n?Math.round(d/n)+"h":p>=e?Math.round(d/e)+"m":p>=t?Math.round(d/t)+"s":d+"ms"}function l(d){var p=Math.abs(d);return p>=o?u(d,p,o,"day"):p>=n?u(d,p,n,"hour"):p>=e?u(d,p,e,"minute"):p>=t?u(d,p,t,"second"):d+" ms"}function u(d,p,f,m){var g=p>=f*1.5;return Math.round(d/f)+" "+m+(g?"s":"")}return He}function fa(t){n.debug=n,n.default=n,n.coerce=l,n.disable=i,n.enable=s,n.enabled=c,n.humanize=pa(),n.destroy=u,Object.keys(t).forEach(d=>{n[d]=t[d]}),n.names=[],n.skips=[],n.formatters={};function e(d){let p=0;for(let f=0;f<d.length;f++)p=(p<<5)-p+d.charCodeAt(f),p|=0;return n.colors[Math.abs(p)%n.colors.length]}n.selectColor=e;function n(d){let p,f=null,m,g;function h(...E){if(!h.enabled)return;const _=h,b=Number(new Date),D=b-(p||b);_.diff=D,_.prev=p,_.curr=b,p=b,E[0]=n.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let S=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(U,$)=>{if(U==="%%")return"%";S++;const ne=n.formatters[$];if(typeof ne=="function"){const ye=E[S];U=ne.call(_,ye),E.splice(S,1),S--}return U}),n.formatArgs.call(_,E),(_.log||n.log).apply(_,E)}return h.namespace=d,h.useColors=n.useColors(),h.color=n.selectColor(d),h.extend=o,h.destroy=n.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==n.namespaces&&(m=n.namespaces,g=n.enabled(d)),g),set:E=>{f=E}}),typeof n.init=="function"&&n.init(h),h}function o(d,p){const f=n(this.namespace+(typeof p>"u"?":":p)+d);return f.log=this.log,f}function s(d){n.save(d),n.namespaces=d,n.names=[],n.skips=[];let p;const f=(typeof d=="string"?d:"").split(/[\s,]+/),m=f.length;for(p=0;p<m;p++)f[p]&&(d=f[p].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(p=>"-"+p)].join(",");return n.enable(""),d}function c(d){if(d[d.length-1]==="*")return!0;let p,f;for(p=0,f=n.skips.length;p<f;p++)if(n.skips[p].test(d))return!1;for(p=0,f=n.names.length;p<f;p++)if(n.names[p].test(d))return!0;return!1}function a(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function l(d){return d instanceof Error?d.stack||d.message:d}function u(){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 ma=fa;(function(t,e){e.formatArgs=o,e.save=s,e.load=i,e.useColors=n,e.storage=c(),e.destroy=(()=>{let l=!1;return()=>{l||(l=!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(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const u="color: "+this.color;l.splice(1,0,u,"color: inherit");let d=0,p=0;l[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(d++,f==="%c"&&(p=d))}),l.splice(p,0,u)}e.log=console.debug||console.log||(()=>{});function s(l){try{l?e.storage.setItem("debug",l):e.storage.removeItem("debug")}catch{}}function i(){let l;try{l=e.storage.getItem("debug")}catch{}return!l&&typeof process<"u"&&"env"in process&&(l=process.env.DEBUG),l}function c(){try{return localStorage}catch{}}t.exports=ma(e);const{formatters:a}=t.exports;a.j=function(l){try{return JSON.stringify(l)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}}})(Ye,Ye.exports);var ha=Ye.exports;const ga=ua(ha);function _a(t){return["eservices-core",t].join(":")}function st(t){return Me(t,"YYYY/MM/DD HH:mm:ss")}function Me(t,e="YYYY/MM/DD"){if(!t)return"";try{const n=new Date(t);return Nt.format(n,e)}catch(n){return console.log(n),"Invalid date"}}const ya={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}`})}},it=v(ya,[["__scopeId","data-v-e287c8d9"]]),va=ga(_a("setup-list-row"));function wa(t,e){const n=t.config.map(o=>Ca(o,t,e));return r.h("tr",{class:"widget-table__row widget-table-row"},n)}function Ca(t,e,n){const o=e.values;let s=da(t,o);const i={onClick:[],class:["widget-table__cell widget-table-cell"]};function c(d){i.onClick.push(()=>d(o))}function a(d){Array.isArray(d)?i.class.push(...d):i.class.push(d)}const l=[],u=[];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=Me(typeof s=="string"?s:null);break}case"dateTime":case"dateWithTime":{s=st(typeof s=="string"?s:null);break}case"multi-select":{u.push(r.h(C.FormField,{type:"single-checkbox",modelValue:e.selected})),c(Et.bind(null,n,!0));break}case"select":{u.push(r.h(C.FormField,{type:"single-radio",modelValue:e.selected})),c(Et.bind(null,n,!1));break}}if(t.onClick&&c(t.onClick),t.link)try{const d=t.link(o);if(d){const p=r.h(Ke.RouterLink,{to:d});u.push(p),a("widget-table-cell_link")}}catch(d){va("Can't add router link",d)}return t.href&&(u.push(r.h("a",{href:t.href(o),target:"_blank"})),a("widget-table-cell_link")),(typeof s=="string"||typeof s=="number")&&u.push(r.h("p",{class:"widget-list-cell-text"},s)),t.icon&&u.push(r.h(it,{name:t.icon})),t.class&&(typeof t.class=="function"?a(t.class(o)):a(t.class)),l.push(r.h("td",i,u)),l}function Et(t,e){t.emit("select",e)}function Ea(t,e){return()=>{try{return wa(t,e)}catch(n){return console.warn(n),null}}}const ka={props:{values:Object,config:Object,selected:Boolean},setup:Ea},ba=["colspan"],kt=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,ba)],512))}}),sn={LIST_ACTIVE_NEW:"list-active-new"},$a={class:"widget-table"},bt="update:selectedRows",Sa=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,l=!0){if(!n.selectedRows)return;if(!l)return e(bt,n.selectedRows.includes(a)?[]:[a]);const u=[...n.selectedRows],d=u.indexOf(a);return d===-1?u.push(a):u.splice(d,1),e(bt,u)}function c(a){e("save",a),e("update:activeRow",null)}return(a,l)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("table",$a,[r.createVNode(la,{config:a.config},null,8,["config"]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.array,(u,d)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:d},[r.createVNode(ka,{config:a.config,values:u,selected:a.selectedRows.includes(u),onSelect:p=>i(u,p),class:r.normalizeClass(a.classCallback?a.classCallback(u):"")},null,8,["config","values","selected","onSelect","class"]),s.value&&a.activeRow===u?(r.openBlock(),r.createBlock(kt,{key:0,component:s.value,"row-length":a.config.length,values:u,onClose:l[0]||(l[0]=p=>e("update:activeRow",null)),onSave:c,"is-new":!1},null,8,["component","row-length","values"])):r.createCommentVNode("",!0)],64))),128)),a.activeRow===r.unref(sn).LIST_ACTIVE_NEW?(r.openBlock(),r.createBlock(kt,{key:0,component:s.value,"row-length":a.config.length,onClose:l[1]||(l[1]=u=>e("update:activeRow",null)),onSave:c,"is-new":!0},null,8,["component","row-length"])):r.createCommentVNode("",!0)])])]))}});function Na(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 Ta(){const t=r.ref(null);function e(n){t.value=n}return{activeRow:t,activateRow:e}}const Ba={clickOutside:ee,requestHandler:De,valuesToUpperCase:Re,prettyDate:Me,prettyDateWithTime:st,Filter:L,staticLink:Wi,groupArrayByField:Mi,uuidv4:ji,Request:y,prettyMoney:Mt},Va={widgets:Eo,usage:ko,utils:Fo,mixins:un,config:Po,types:Oo};exports.ApplicationManager=Dt;exports.Communication=Li;exports.ComputedMetadata=fs;exports.CoreError=I;exports.Filter=L;exports.List=M;exports.ListConfig=Oi;exports.Manager=w;exports.MetadataStore=de;exports.ModalValidation=wi;exports.NotificationSystem=T;exports.ProcessWrap=Oe;exports.Request=y;exports.SYMBOL_ROW=q;exports.Table=tt;exports.WidgetBreadcrumbs=bs;exports.WidgetButton=Bt;exports.WidgetCard=Ii;exports.WidgetForm=oi;exports.WidgetIcon=it;exports.WidgetImage=Ei;exports.WidgetList=Ls;exports.WidgetMultiButton=Ze;exports.WidgetNotificationSystem=At;exports.WidgetSection=xs;exports.WidgetSpinner=te;exports.WidgetTable=Sa;exports.WidgetWait=Zt;exports.actionService=nn;exports.asyncProcess=Na;exports.authService=V;exports.billingService=Z;exports.clickOutside=ee;exports.clientService=Ot;exports.communicationService=fe;exports.configurationService=Xi;exports.constants=sn;exports.dataService=N;exports.debounce=xi;exports.default=Va;exports.documentsService=Ki;exports.equipmentService=oa;exports.fileService=Tt;exports.historyService=xo;exports.internationalizationService=hs;exports.invitationService=Fi;exports.metadataService=nt;exports.newImport=us;exports.openService=Pi;exports.parseError=me;exports.prettifyValueByMetadata=ms;exports.prettyDate=Me;exports.prettyDateWithTime=st;exports.processWizardService=Ve;exports.requestHandler=De;exports.ruleValidationService=rt;exports.t=Q;exports.testTypes=jo;exports.useCommunication=Di;exports.useCustomerState=Ji;exports.useFormAction=zi;exports.useFormLabel=Gi;exports.useFormMetadata=Ui;exports.useFormRequest=Yi;exports.useFormRequestData=Hi;exports.useListActiveRow=Ta;exports.useListConfig=Uo;exports.useListFilter=zo;exports.useListOrder=Jt;exports.useListProvide=Ht;exports.useListRead=zt;exports.useListSearch=qo;exports.useListSelect=Go;exports.useListState=Gt;exports.useLogger=We;exports.useManagerState=$o;exports.useSocket=gs;exports.useTableRequest=Mo;exports.useTableState=Wo;exports.useWizard=ta;exports.utils=Ba;exports.viewService=Ai;
11
11
  //# sourceMappingURL=eservices-core.cjs.js.map