/*! * FormCreate商业版可视化表单设计器-让表单设计更简单 * fc-designer-pro v5.7.0 * (c) 2018-2025 FormCreate Team https://form-create.com/ * license 仅限于被授权主体(个人、企业或组织)使用 */ (function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode('._fc-step-form{width:100%}._fc-step-form .van-step{line-height:1.4;text-align:left}._fc-popup.van-popup{display:flex;height:100%;padding-bottom:110px;padding-top:50px}._fc-popup-title{color:#333;font-size:16px;left:0;position:absolute;text-align:center;top:16px;width:100%}._fc-popup-content{display:flex;flex:1;overflow:auto}._fc-popup-footer{bottom:0;left:0;padding:10px;position:absolute;right:0}._fc-data-table{width:100%}._fc-data-table .el-table{--el-table-header-bg-color:#e8eefc}._fc-data-table .el-pagination{display:flex;margin-top:10px}._fc-data-table .el-pagination.left{justify-content:flex-start}._fc-data-table .el-pagination.center{justify-content:center}._fc-data-table .el-pagination.right{justify-content:flex-end}._fc-data-table ._fc-data-table-img-list .el-image{height:60px;max-width:150px}._fc-table{overflow:auto}._fc-table>table{border-bottom:1px solid #ebeef5;border-right:1px solid #ebeef5;border-color:#ebeef5 currentcolor currentcolor #ebeef5;border-style:solid none none solid;border-width:1px 0 0 1px;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-table td,._fc-table tr{min-height:50px}._fc-table td{border-bottom:0;border-right:0;border-color:currentcolor #ebeef5 #ebeef5 currentcolor;border-style:none solid solid none;border-width:0 1px 1px 0;box-sizing:border-box;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:5px;position:relative}._fc-table.is-mini td{min-height:12px;padding:0}._fc-table.is-mini .el-form-item{margin:0;padding:0}._fc-table-form{color:var(--fc-text-color-2);overflow:auto}._fc-table-form .form-create td .el-form-item{margin-bottom:1px}._fc-table-form .form-create td .el-form-item.is-error{margin-bottom:22px}._fc-table-form .el-form-item__label,._fc-table-form .van-field__label{display:none!important}._fc-table-form .el-form-item__content{display:flex;margin-left:0!important;width:100%!important}._fc-tf-head-idx,._fc-tf-idx{font-weight:500;min-width:40px;text-align:center;width:40px}._fc-tf-btn,._fc-tf-edit{min-width:70px;text-align:center;width:70px}._fc-tf-btn .fc-icon{cursor:pointer}._fc-table-form._fc-disabled ._fc-tf-btn .fc-icon,._fc-table-form._fc-disabled>.el-button{cursor:not-allowed}._fc-tf-table{border:1px solid #ebeef5;border-bottom:0;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-table-form ._fc-tf-table>thead>tr>th{border:0;border-bottom:1px solid #ebeef5;font-weight:500;height:40px}._fc-table-form ._fc-tf-table>thead>tr>th+th{border-left:1px solid #ebeef5}._fc-table-form tr{min-height:50px}._fc-table-form ._fc-read-view{text-align:center;width:100%}._fc-table-form td{border:0;border-bottom:1px solid #ebeef5;box-sizing:border-box;min-height:50px;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:5px;position:relative}._fc-table-form td+td{border-left:1px solid #ebeef5}._fc-tf-table .el-cascader,._fc-tf-table .el-date-editor,._fc-tf-table .el-input-number,._fc-tf-table .el-select,._fc-tf-table .el-slider{width:100%}._fc-tf-head-required:before{color:#f56c6c;content:"*";margin-right:4px}._fc-table-form-v2{color:var(--fc-text-color-2);overflow:auto;width:100%}._fc-table-form-v2 .is-required:before{color:#f56c6c;content:"*";margin-right:4px}._fc-table-form-v2 .form-create td .el-form-item{margin-bottom:1px}._fc-table-form-v2 .form-create td .el-form-item.is-error{margin-bottom:22px}._fc-table-form-v2 .el-form-item__content{display:flex;margin-left:0!important;width:100%!important}._fc-table-form-v2 .el-form-item__label{display:none!important}._fc-tf-pro-handle{align-items:center;display:flex;flex-direction:row;justify-content:space-between;margin-top:12px}._fc-table-form-v2 .el-cascader,._fc-table-form-v2 .el-date-editor,._fc-table-form-v2 .el-input-number,._fc-table-form-v2 .el-select,._fc-table-form-v2 .el-slider{width:100%}._fc-infinite-table-form{color:var(--fc-text-color-2);overflow:auto}._fc-infinite-table-form .form-create .el-form-item{margin-bottom:1px}._fc-infinite-table-form .form-create .el-form-item.is-error{margin-bottom:22px}._fc-infinite-table-form .el-form-item__label,._fc-infinite-table-form .van-field__label{display:none!important}._fc-infinite-table-form .el-form-item__content{display:flex;margin-left:0!important;width:100%!important}._fc-itf-table ._fc-itf-head-idx,._fc-itf-table ._fc-itf-idx{font-weight:500;min-width:40px;padding:0;text-align:center;width:40px}._fc-itf-idx div{border:1px solid #bfbfbf;border-radius:6px;cursor:pointer;display:inline-flex;height:18px;justify-content:center;line-height:16px;width:18px}._fc-itf-sub-idx{width:30px}._fc-itf-btn,._fc-itf-edit{min-width:70px;text-align:center;width:70px}._fc-itf-btn .fc-icon{cursor:pointer}._fc-infinite-table-form._fc-disabled ._fc-itf-btn .fc-icon,._fc-infinite-table-form._fc-disabled>.el-button{cursor:not-allowed}._fc-itf-table{border:1px solid #ebeef5;border-bottom:0;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-itf-table>thead>tr>th{border:0;border-bottom:1px solid #ebeef5;font-weight:500;height:40px}._fc-itf-table ._fc-itf-table>thead{display:none}._fc-itf-table ._fc-itf-table{border-right:0}._fc-itf-table>thead>tr>th+th{border-left:1px solid #ebeef5}._fc-itf-table tr{min-height:50px}._fc-itf-table ._fc-read-view{text-align:center;width:100%}._fc-itf-table td{border:0;border-bottom:1px solid #ebeef5;box-sizing:border-box;min-height:50px;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:10px;position:relative}._fc-itf-table td+td{border-left:1px solid #ebeef5}._fc-itf-table .el-cascader,._fc-itf-table .el-date-editor,._fc-itf-table .el-input-number,._fc-itf-table .el-select,._fc-itf-table .el-slider{width:100%}._fc-infinite-table-form ._fc-itf-sub{padding:5px 0 5px 10px}._fc-itf-sub ._fc-table-form{background-color:var(--fc-bg-color-1)}._fc-itf-sub ._fc-tf-table{border:0}._fc-itf-idx+._fc-itf-idx,._fc-itf-sub-idx+._fc-itf-head-idx{border-left:0}._fc-itf-head-required:before{color:#f56c6c;content:"*";margin-right:4px}._fc-nested-table-form{color:var(--fc-text-color-2);overflow:auto}._fc-nested-table-form .form-create .el-form-item{margin-bottom:1px}._fc-nested-table-form .form-create .el-form-item.is-error{margin-bottom:22px}._fc-nested-table-form .el-form-item__label,._fc-nested-table-form .van-field__label{display:none!important}._fc-nested-table-form .el-form-item__content{display:flex;margin-left:0!important;width:100%!important}._fc-ntf-table ._fc-ntf-head-idx,._fc-ntf-table ._fc-ntf-idx{font-weight:500;min-width:40px;padding:0;text-align:center;width:40px}._fc-ntf-idx div{border:1px solid #bfbfbf;border-radius:6px;cursor:pointer;display:inline-flex;height:18px;justify-content:center;line-height:16px;width:18px}._fc-ntf-sub-idx{width:30px}._fc-ntf-btn,._fc-ntf-edit{min-width:70px;text-align:center;width:70px}._fc-ntf-btn .fc-icon{cursor:pointer}._fc-nested-table-form._fc-disabled ._fc-ntf-btn .fc-icon,._fc-nested-table-form._fc-disabled>.el-button{cursor:not-allowed}._fc-ntf-table{border:1px solid #ebeef5;border-bottom:0;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-ntf-table>thead>tr>th{border:0;border-bottom:1px solid #ebeef5;font-weight:500;height:40px}._fc-ntf-table>thead>tr>th+th{border-left:1px solid #ebeef5}._fc-ntf-table tr{min-height:50px}._fc-ntf-table ._fc-read-view{text-align:center;width:100%}._fc-ntf-table td{border:0;border-bottom:1px solid #ebeef5;box-sizing:border-box;min-height:50px;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:10px;position:relative}._fc-ntf-table td+td{border-left:1px solid #ebeef5}._fc-ntf-table .el-cascader,._fc-ntf-table .el-date-editor,._fc-ntf-table .el-input-number,._fc-ntf-table .el-select,._fc-ntf-table .el-slider{width:100%}._fc-nested-table-form ._fc-ntf-sub{background-color:#fafafa}._fc-ntf-sub ._fc-table-form{background-color:var(--fc-bg-color-1)}._fc-ntf-sub ._fc-tf-table{border:0}._fc-ntf-idx+._fc-ntf-idx,._fc-ntf-sub-idx+._fc-ntf-head-idx{border-left:0}._fc-ntf-head-required:before{color:#f56c6c;content:"*";margin-right:4px}._fc-cell{display:inline-block}._fc-cell .el-cascader,._fc-cell .el-date-editor,._fc-cell .el-input-number,._fc-cell .el-select,._fc-cell .el-slider,._fc-city-m{width:100%}._fc-city-m .van-cell{padding:0}._fc-line-form{align-items:flex-start;display:flex;flex-flow:wrap;width:100%}.form-create-m ._fc-line-form{display:flex;flex-wrap:wrap}.form-create ._fc-line-form ._fc-line-form,.form-create ._fc-line-form ._fd-drag-item,.form-create ._fc-line-form ._fd-drag-tool,.form-create ._fc-line-form .el-col-24{display:inline-flex;flex:initial;flex:unset!important;flex-wrap:wrap;max-width:100%;width:auto!important}._fc-m-con .form-create ._fc-line-form>.el-col-24{width:100%!important}._fc-line-form .el-form-item{display:inline-flex;vertical-align:middle}._fc-line-form .el-select,._fc-line-form .el-slider{width:220px}._fc-echarts{height:300px;width:100%}._fc-m-signature{width:100%}._fc-m-signature-btn,._fc-m-signature-preview{background:#fff;border:1px dashed #d4d7e0;border-radius:4px;box-sizing:border-box;color:#c9ccd8;font-size:14px;height:88px;line-height:88px;min-width:160px;position:relative;text-align:center;width:100%}._fc-m-signature-btn{cursor:pointer}._fc-m-signature-preview>img{display:inline-block;height:88px}._fc-m-signature-preview .icon-delete2{cursor:pointer;display:inline-block;font-size:14px;line-height:14px;position:absolute;right:9px;top:9px}._fc-m-signature-btn i{font-size:14px}._fc-m-signature-dialog .van-dialog__header{padding:15px 0;position:relative}._fc-m-signature-dialog .icon-add2{color:var(--fc-text-color-3);display:inline-block;position:absolute;right:18px;transform:rotate(45deg)}._fc-m-signature-pad{background-image:linear-gradient(#fff 14px,transparent 0),linear-gradient(90deg,#fff 14px,#d4d7e0 0);background-size:15px 15px;border:1px dashed #d4d7e0;border-radius:4px;box-sizing:border-box;width:100%}._fc-title{font-size:16px;font-weight:600;margin-bottom:16px;margin-top:1em;width:100%}._fc-title.h1,._fc-title.h2{border-bottom:1px solid #eee;padding-bottom:.3em}._fc-title.h1{font-size:32px;line-height:1.2}._fc-title.h2{font-size:24px;line-height:1.225}._fc-title.h3{font-size:20px;line-height:1.43}._fc-title.h4{font-size:16px}._fc-title.h5{font-size:14px}._fc-title.h6{font-size:12px}._fc-markdown{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;word-wrap:break-word;color-scheme:light;font-size:16px;line-height:1.5;margin:0;width:100%}._fc-markdown details,._fc-markdown figcaption,._fc-markdown figure{display:block}._fc-markdown summary{display:list-item}._fc-markdown [hidden]{display:none!important}._fc-markdown a{background-color:transparent;color:#0969da;text-decoration:none}._fc-markdown abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}._fc-markdown b,._fc-markdown strong{font-weight:600}._fc-markdown dfn{font-style:italic}._fc-markdown h1{border-bottom:1px solid #d1d9e0b3;font-size:2em;font-weight:600;margin:.67em 0;padding-bottom:.3em}._fc-markdown mark{background-color:#fff8c5;color:#1f2328}._fc-markdown small{font-size:90%}._fc-markdown sub,._fc-markdown sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}._fc-markdown sub{bottom:-.25em}._fc-markdown sup{top:-.5em}._fc-markdown img{border-style:none;box-sizing:content-box;max-width:100%}._fc-markdown code,._fc-markdown kbd,._fc-markdown pre,._fc-markdown samp{font-family:monospace;font-size:1em}._fc-markdown figure{margin:1em 2.5rem}._fc-markdown hr{background:transparent;background-color:#d1d9e0;border:0;box-sizing:content-box;height:.25em;margin:1.5rem 0;overflow:hidden;padding:0}._fc-markdown input{font:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible}._fc-markdown [type=button],._fc-markdown [type=reset],._fc-markdown [type=submit]{-webkit-appearance:button;appearance:button}._fc-markdown [type=checkbox],._fc-markdown [type=radio]{box-sizing:border-box;padding:0}._fc-markdown [type=number]::-webkit-inner-spin-button,._fc-markdown [type=number]::-webkit-outer-spin-button{height:auto}._fc-markdown [type=search]::-webkit-search-cancel-button,._fc-markdown [type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}._fc-markdown ::-webkit-input-placeholder{color:inherit;opacity:.54}._fc-markdown ::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}._fc-markdown a:hover{text-decoration:underline}._fc-markdown ::placeholder{color:#59636e;opacity:1}._fc-markdown hr:after,._fc-markdown hr:before{content:"";display:table}._fc-markdown hr:after{clear:both}._fc-markdown table{border-collapse:collapse;border-spacing:0;display:block;font-variant:tabular-nums;max-width:100%;overflow:auto;width:max-content}._fc-markdown td,._fc-markdown th{padding:0}._fc-markdown details summary{cursor:pointer}._fc-markdown [role=button]:focus,._fc-markdown a:focus,._fc-markdown input[type=checkbox]:focus,._fc-markdown input[type=radio]:focus{box-shadow:none;outline:2px solid #0969da;outline-offset:-2px}._fc-markdown [role=button]:focus:not(:focus-visible),._fc-markdown a:focus:not(:focus-visible),._fc-markdown input[type=checkbox]:focus:not(:focus-visible),._fc-markdown input[type=radio]:focus:not(:focus-visible){outline:1px solid transparent}._fc-markdown [role=button]:focus-visible,._fc-markdown a:focus-visible,._fc-markdown input[type=checkbox]:focus-visible,._fc-markdown input[type=radio]:focus-visible{box-shadow:none;outline:2px solid #0969da;outline-offset:-2px}._fc-markdown a:not([class]):focus,._fc-markdown a:not([class]):focus-visible,._fc-markdown input[type=checkbox]:focus,._fc-markdown input[type=checkbox]:focus-visible,._fc-markdown input[type=radio]:focus,._fc-markdown input[type=radio]:focus-visible{outline-offset:0}._fc-markdown kbd{background-color:#f6f8fa;border:1px solid #d1d9e0b3;border-radius:6px;box-shadow:inset 0 -1px #d1d9e0b3;color:#1f2328;display:inline-block;font:11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;line-height:10px;padding:.25rem;vertical-align:middle}._fc-markdown h1,._fc-markdown h2,._fc-markdown h3,._fc-markdown h4,._fc-markdown h5,._fc-markdown h6{font-weight:600;line-height:1.25;margin-bottom:1rem;margin-top:1.5rem}._fc-markdown h2{border-bottom:1px solid #d1d9e0b3;font-size:1.5em;font-weight:600;padding-bottom:.3em}._fc-markdown h3{font-size:1.25em;font-weight:600}._fc-markdown h4{font-size:1em;font-weight:600}._fc-markdown h5{font-size:.875em;font-weight:600}._fc-markdown h6{color:#59636e;font-size:.85em;font-weight:600}._fc-markdown p{margin-bottom:10px;margin-top:0}._fc-markdown blockquote{border-left:.25em solid #d1d9e0;color:#59636e;margin:0;padding:0 1em}._fc-markdown ol,._fc-markdown ul{margin-bottom:0;margin-top:0;padding-left:2em}._fc-markdown ol ol,._fc-markdown ul ol{list-style-type:lower-roman}._fc-markdown ol ol ol,._fc-markdown ol ul ol,._fc-markdown ul ol ol,._fc-markdown ul ul ol{list-style-type:lower-alpha}._fc-markdown dd{margin-left:0}._fc-markdown code,._fc-markdown pre,._fc-markdown samp,._fc-markdown tt{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px}._fc-markdown pre{word-wrap:normal;margin-bottom:0;margin-top:0}._fc-markdown input::-webkit-inner-spin-button,._fc-markdown input::-webkit-outer-spin-button{appearance:none;margin:0}._fc-markdown:after,._fc-markdown:before{content:"";display:table}._fc-markdown:after{clear:both}._fc-markdown>:first-child{margin-top:0!important}._fc-markdown>:last-child{margin-bottom:0!important}._fc-markdown a:not([href]){color:inherit;text-decoration:none}._fc-markdown blockquote,._fc-markdown details,._fc-markdown dl,._fc-markdown ol,._fc-markdown p,._fc-markdown pre,._fc-markdown table,._fc-markdown ul{margin-bottom:1rem;margin-top:0}._fc-markdown blockquote>:first-child{margin-top:0}._fc-markdown blockquote>:last-child{margin-bottom:0}._fc-markdown h1:hover .anchor,._fc-markdown h2:hover .anchor,._fc-markdown h3:hover .anchor,._fc-markdown h4:hover .anchor,._fc-markdown h5:hover .anchor,._fc-markdown h6:hover .anchor{text-decoration:none}._fc-markdown h1 code,._fc-markdown h1 tt,._fc-markdown h2 code,._fc-markdown h2 tt,._fc-markdown h3 code,._fc-markdown h3 tt,._fc-markdown h4 code,._fc-markdown h4 tt,._fc-markdown h5 code,._fc-markdown h5 tt,._fc-markdown h6 code,._fc-markdown h6 tt{font-size:inherit;padding:0 .2em}._fc-markdown summary h1,._fc-markdown summary h2,._fc-markdown summary h3,._fc-markdown summary h4,._fc-markdown summary h5,._fc-markdown summary h6{display:inline-block}._fc-markdown summary h1,._fc-markdown summary h2{border-bottom:0;padding-bottom:0}._fc-markdown ol.no-list,._fc-markdown ul.no-list{list-style-type:none;padding:0}._fc-markdown ol[type="a s"]{list-style-type:lower-alpha}._fc-markdown ol[type="A s"]{list-style-type:upper-alpha}._fc-markdown ol[type="i s"]{list-style-type:lower-roman}._fc-markdown ol[type="I s"]{list-style-type:upper-roman}._fc-markdown div>ol:not([type]),._fc-markdown ol[type="1"]{list-style-type:decimal}._fc-markdown ol ol,._fc-markdown ol ul,._fc-markdown ul ol,._fc-markdown ul ul{margin-bottom:0;margin-top:0}._fc-markdown li>p{margin-top:1rem}._fc-markdown li+li{margin-top:.25em}._fc-markdown dl{padding:0}._fc-markdown dl dt{font-size:1em;font-style:italic;font-weight:600;margin-top:1rem;padding:0}._fc-markdown dl dd{margin-bottom:1rem;padding:0 1rem}._fc-markdown table th{font-weight:600}._fc-markdown table td,._fc-markdown table th{border:1px solid #d1d9e0;padding:6px 13px}._fc-markdown table td>:last-child{margin-bottom:0}._fc-markdown table tr{background-color:#fff;border-top:1px solid #d1d9e0b3}._fc-markdown table tr:nth-child(2n){background-color:#f6f8fa}._fc-markdown table img{background-color:transparent}._fc-markdown img[align=right]{padding-left:20px}._fc-markdown img[align=left]{padding-right:20px}._fc-markdown .emoji{background-color:transparent;max-width:none;vertical-align:text-top}._fc-markdown span.frame{display:block;overflow:hidden}._fc-markdown span.frame>span{border:1px solid #d1d9e0;display:block;float:left;margin:13px 0 0;overflow:hidden;padding:7px;width:auto}._fc-markdown span.frame span img{display:block;float:left}._fc-markdown span.frame span span{clear:both;color:#1f2328;display:block;padding:5px 0 0}._fc-markdown span.align-center{clear:both;display:block;overflow:hidden}._fc-markdown span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}._fc-markdown span.align-center span img{margin:0 auto;text-align:center}._fc-markdown span.align-right{clear:both;display:block;overflow:hidden}._fc-markdown span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}._fc-markdown span.align-right span img{margin:0;text-align:right}._fc-markdown span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}._fc-markdown span.float-left span{margin:13px 0 0}._fc-markdown span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}._fc-markdown span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}._fc-markdown code,._fc-markdown tt{background-color:#818b981f;border-radius:6px;font-size:85%;margin:0;padding:.2em .4em;white-space:break-spaces}._fc-markdown code br,._fc-markdown tt br{display:none}._fc-markdown del code{text-decoration:inherit}._fc-markdown samp{font-size:85%}._fc-markdown pre code{font-size:100%}._fc-markdown pre>code{background:transparent;border:0;margin:0;padding:0;white-space:pre;word-break:normal}._fc-markdown .highlight{margin-bottom:1rem}._fc-markdown .highlight pre{margin-bottom:0;word-break:normal}._fc-markdown .highlight pre,._fc-markdown pre{background-color:#f6f8fa;border-radius:6px;color:#1f2328;font-size:85%;line-height:1.45;overflow:auto;padding:1rem}._fc-markdown pre code,._fc-markdown pre tt{word-wrap:normal;background-color:transparent;border:0;display:inline;line-height:inherit;margin:0;max-width:auto;overflow:visible;padding:0}._fc-markdown [data-footnote-ref]:before{content:"["}._fc-markdown [data-footnote-ref]:after{content:"]"}._fc-markdown [role=button]:focus:not(:focus-visible),._fc-markdown [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),._fc-markdown a:focus:not(:focus-visible),._fc-markdown button:focus:not(:focus-visible),._fc-markdown summary:focus:not(:focus-visible){box-shadow:none;outline:none}._fc-markdown [tabindex="0"]:focus:not(:focus-visible),._fc-markdown details-dialog:focus:not(:focus-visible){outline:none}._fc-markdown g-emoji{display:inline-block;font-family:Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:1em;font-style:normal!important;font-weight:400;line-height:1;min-width:1ch;vertical-align:-.075em}._fc-markdown g-emoji img{height:1em;width:1em}._fc-markdown .task-list-item{list-style-type:none}._fc-markdown .task-list-item label{font-weight:400}._fc-markdown .task-list-item.enabled label{cursor:pointer}._fc-markdown .task-list-item+.task-list-item{margin-top:.25rem}._fc-markdown .task-list-item .handle{display:none}._fc-markdown .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}._fc-markdown ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}._fc-markdown ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}._fc-dialog .el-dialog__headerbtn{align-items:center;color:var(--el-color-info);display:flex;justify-content:center}._fc-dialog .el-dialog__headerbtn:hover .fc-icon{color:var(--el-color-primary)}._fc-data-select-pop{display:none!important}._fc-data-select,._fc-iframe-box,._fc-video-box{width:100%}.form-create-m .van-checkbox--horizontal,.form-create-m .van-radio--horizontal{margin-bottom:5px}.form-create-m .el-input__wrapper,.form-create-m .el-select__wrapper{border-radius:0;box-shadow:none;padding-right:0}.form-create-m .el-input__wrapper:before,.form-create-m .el-select__wrapper:before{border-bottom:1px solid var(--van-cell-border-color);bottom:0;box-sizing:border-box;content:" ";left:var(--van-padding-md);pointer-events:none;position:absolute;right:var(--van-padding-md);transform:scaleY(.5)}.form-create-m .el-select__suffix{display:none}.form-create-m .el-input__wrapper:after,.form-create-m .el-select__wrapper:after{color:var(--van-cell-right-icon-color);content:"\\e660";font:normal normal normal 14px/1 var(--van-icon-font-family,"vant-icon")}.form-create-m .el-date-editor.el-input,.form-create-m .el-date-editor.el-input__wrapper,.form-create-m .el-tree{width:100%}.form-create-m .el-upload--picture-card,.form-create-m .el-upload-list{--el-upload-list-picture-card-size:64px;--el-upload-picture-card-size:64px}.form-create-m.is-preview ._fc-upload .el-icon--close,.form-create-m.is-preview ._fc-upload .el-icon--close-tip,.form-create-m.is-preview ._fc-upload .el-upload{display:none!important}@font-face{font-family:fc-icon;src:url(data:font/woff;base64,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) format("woff")}.fc-icon{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:fc-icon!important;font-size:16px;font-style:normal}.icon-data-select:before{content:"\\e6dd"}.icon-markdown:before{content:"\\e893"}.icon-grid-line:before{content:"\\e600"}.icon-print:before{content:"\\e6de"}.icon-city:before{content:"\\e64b"}.icon-location:before{content:"\\e6d4"}.icon-qrcode:before{content:"\\e6ce"}.icon-input-id:before{content:"\\e6d1"}.icon-iframe:before{content:"\\e6d2"}.icon-audio:before{content:"\\e6d3"}.icon-form-model:before{content:"\\e6d5"}.icon-title:before{content:"\\e6d6"}.icon-sign:before{content:"\\e6d7"}.icon-address:before{content:"\\e6d8"}.icon-statistic:before{content:"\\e6d9"}.icon-barcode:before{content:"\\e6da"}.icon-video:before{content:"\\e6db"}.icon-avatar:before{content:"\\e6dc"}.icon-suspend:before{content:"\\e6cf"}.icon-warning:before{content:"\\e6d0"}.icon-send:before{content:"\\e6cc"}.icon-refresh2:before{content:"\\e6cd"}.icon-ai:before{content:"\\e6cb"}.icon-ai.bright{-webkit-text-fill-color:transparent;background:linear-gradient(90deg,#328ff7,#62e3a3);-webkit-background-clip:text}.icon-column4:before{content:"\\e6c7"}.icon-column3:before{content:"\\e6c6"}.icon-column2:before{content:"\\e6c8"}.icon-column1:before{content:"\\e6c9"}.icon-layout:before{content:"\\e6ca"}.icon-segmented:before{content:"\\e682"}.icon-mention:before{content:"\\e6c5"}.icon-input-tag:before{content:"\\e6c4"}.icon-up:before{content:"\\e697";display:inline-block;transform:rotate(180deg)}.icon-alignitems-flexstart:before{content:"\\e67f";display:inline-block;transform:rotate(180deg)}.icon-align-center:before{content:"\\e6a5";display:inline-block;transform:rotate(90deg)}.icon-align-flexstart:before{content:"\\e6a4";display:inline-block;transform:rotate(90deg)}.icon-align-spacearound:before{content:"\\e670";display:inline-block;transform:rotate(-90deg)}.icon-align-spacebetween:before{content:"\\e695";display:inline-block;transform:rotate(-90deg)}.icon-align-stretch:before{content:"\\e6a7";display:inline-block;transform:rotate(-90deg)}.icon-align-flexend:before{content:"\\e6a4";display:inline-block;transform:rotate(-90deg)}.icon-justify-flexend:before{content:"\\e6a4";display:inline-block;transform:rotate(180deg)}.icon-direction-row:before{content:"\\e68b";display:inline-block;transform:rotate(180deg)}.icon-direction-column:before{content:"\\e68b";display:inline-block;transform:rotate(-90deg)}.icon-direction-columnreverse:before{content:"\\e68b";display:inline-block;transform:rotate(90deg)}.icon-arrow:before{content:"\\e697";display:inline-block;transform:rotate(180deg)}.icon-cell:before{content:"\\e654"}.icon-table:before{content:"\\eb0a"}.icon-next-step:before{content:"\\e6b4";display:inline-block;transform:rotateY(180deg)}.icon-grid:before{content:"\\e65c";display:inline-block;transform:rotate(90deg)}.icon-alignitems-stretch:before{content:"\\e67e"}.icon-alignitems-flexend:before{content:"\\e67f"}.icon-check:before{content:"\\e680"}.icon-auto:before{content:"\\e681"}.icon-config-event:before{content:"\\e66e"}.icon-calendar:before{content:"\\e683"}.icon-config-style:before{content:"\\e684"}.icon-copy:before{content:"\\e676"}.icon-config-advanced:before{content:"\\e686"}.icon-config-props:before{content:"\\e687"}.icon-delete-circle2:before{content:"\\e688"}.icon-delete-circle:before,.icon-delete2:before{content:"\\e689"}.icon-delete:before{content:"\\e68a"}.icon-direction-rowreverse:before{content:"\\e68b"}.icon-display-flex:before{content:"\\e68c"}.icon-dialog:before{content:"\\e66f"}.icon-drag:before{content:"\\e68e"}.icon-display-block:before{content:"\\e68f"}.icon-data:before{content:"\\e690"}.icon-edit2:before{content:"\\e691"}.icon-edit:before{content:"\\e692"}.icon-add-col:before{content:"\\e693"}.icon-display-inlineblock:before{content:"\\e694"}.icon-config-base:before{content:"\\e6bf"}.icon-config-validate:before{content:"\\e696"}.icon-down:before{content:"\\e697"}.icon-display-inline:before{content:"\\e698"}.icon-eye:before{content:"\\e699"}.icon-eye-close:before{content:"\\e69a"}.icon-import:before{content:"\\e6a6"}.icon-preview:before{content:"\\e69b"}.icon-flex-nowrap:before{content:"\\e69c"}.icon-folder:before{content:"\\e69d"}.icon-form-circle:before{content:"\\e69e"}.icon-flex-wrap:before{content:"\\e69f"}.icon-form:before{content:"\\e6a0"}.icon-form-item:before{content:"\\e6a1"}.icon-icon:before{content:"\\e6a2"}.icon-image:before{content:"\\e6a3"}.icon-justify-flexstart:before{content:"\\e6a4"}.icon-justify-center:before{content:"\\e6a5"}.icon-justify-spacearound:before{content:"\\e670"}.icon-justify-stretch:before{content:"\\e6a7"}.icon-link2:before{content:"\\e6a8"}.icon-justify-spacebetween:before{content:"\\e695"}.icon-minus:before{content:"\\e6aa"}.icon-menu2:before{content:"\\e6ab"}.icon-more:before{content:"\\e6ac"}.icon-menu:before{content:"\\e6ad"}.icon-language:before{content:"\\e6ae"}.icon-pad:before{content:"\\e6af"}.icon-mobile:before{content:"\\e6b0"}.icon-page-max:before{content:"\\e6b1"}.icon-move:before{content:"\\e6b2"}.icon-page-min:before{content:"\\e6b3"}.icon-pre-step:before{content:"\\e6b4"}.icon-pc:before{content:"\\e6b5"}.icon-page:before{content:"\\e6b6"}.icon-refresh:before{content:"\\e6b7"}.icon-radius:before{content:"\\e6b8"}.icon-save-filled:before{content:"\\e6b9"}.icon-question:before{content:"\\e6ba"}.icon-scroll:before{content:"\\e6bb"}.icon-script:before{content:"\\e6bc"}.icon-setting:before{content:"\\e6bd"}.icon-save-online:before,.icon-save:before{content:"\\e6be"}.icon-task-add:before{content:"\\e68d"}.icon-shadow:before{content:"\\e6c0"}.icon-variable:before{content:"\\e6c1"}.icon-yes:before{content:"\\e6c2"}.icon-shadow-inset:before{content:"\\e6c3"}.icon-date:before{content:"\\e642"}.icon-date-range:before{content:"\\e643"}.icon-collapse:before{content:"\\e644"}.icon-slider:before{content:"\\e665"}.icon-switch:before{content:"\\e646"}.icon-subform:before{content:"\\e647"}.icon-time-range:before{content:"\\e685"}.icon-tree-select:before{content:"\\e649"}.icon-value:before{content:"\\e64a"}.icon-table-form3:before{content:"\\e6a9"}.icon-alert:before{content:"\\e64c"}.icon-card:before{content:"\\e64d"}.icon-checkbox:before{content:"\\e64e"}.icon-cascader:before{content:"\\e64f"}.icon-button:before{content:"\\e650"}.icon-data-table:before{content:"\\e651"}.icon-group:before{content:"\\e652"}.icon-divider:before{content:"\\e653"}.icon-flex:before{content:"\\e654"}.icon-descriptions:before{content:"\\e655"}.icon-html:before{content:"\\e656"}.icon-editor:before{content:"\\e657"}.icon-input:before{content:"\\e658"}.icon-link:before{content:"\\e659"}.icon-password:before{content:"\\e65a"}.icon-radio:before{content:"\\e65b"}.icon-row:before{content:"\\e65c"}.icon-inline:before{content:"\\e65d"}.icon-rate:before{content:"\\e65e"}.icon-color:before{content:"\\e65f"}.icon-select:before{content:"\\e660"}.icon-json:before{content:"\\e661"}.icon-number:before{content:"\\e662"}.icon-space:before{content:"\\e664"}.icon-step-form:before{content:"\\e663"}.icon-table-form:before{content:"\\e666"}.icon-table-form2:before{content:"\\e667"}.icon-time:before{content:"\\e668"}.icon-span:before{content:"\\e669"}.icon-textarea:before{content:"\\e66a"}.icon-tooltip:before{content:"\\e66b"}.icon-slot:before{content:"\\e66c"}.icon-transfer:before{content:"\\e66d"}.icon-upload:before{content:"\\e673"}.icon-tag:before{content:"\\e671"}.icon-watermark:before{content:"\\e672"}.icon-tab:before{content:"\\e674"}.icon-tree:before{content:"\\e675"}.icon-table:before{content:"\\e677"}.icon-add-child:before{content:"\\e678"}.icon-add2:before{content:"\\e679"}.icon-add:before{content:"\\e67a"}.icon-alignitems-baseline:before{content:"\\e67b"}.icon-add-circle:before{content:"\\e67c"}.icon-alignitems-center:before{content:"\\e67d"}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})(); var zo = Object.defineProperty; var Uo = (n, e, t) => e in n ? zo(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t; var $e = (n, e, t) => (Uo(n, typeof e != "symbol" ? e + "" : e, t), t); import { defineComponent as he, reactive as Be, markRaw as Te, nextTick as je, createVNode as H, ref as Ot, toRef as De, watch as ze, computed as at, Fragment as Ke, resolveComponent as K, mergeProps as Pe, isVNode as Ir, getCurrentInstance as vr, provide as qo, inject as Go, toRefs as Ai, onBeforeMount as Ho, watchEffect as Wo, onMounted as Yo, onBeforeUnmount as Xo, onUpdated as Jo, withDirectives as $a, createApp as Ko, h as qe, openBlock as ee, createElementBlock as me, resolveDirective as Sa, createElementVNode as Me, withCtx as Ce, renderList as un, createBlock as Re, createTextVNode as He, toDisplayString as Ve, resolveDynamicComponent as Ft, createCommentVNode as dt, onUnmounted as Oa, normalizeClass as Yt, normalizeStyle as Ea, renderSlot as Tn, createSlots as xa, shallowRef as Di } from "vue"; import { showNotify as Ca, Field as Ri } from "vant"; import { ElMessage as ka } from "element-plus"; /*! * @form-create/vant v3.2.22 * (c) 2018-2025 xaboy * Github https://github.com/xaboy/form-create * Released under the MIT License. */ var Zo = "fcSubForm", Qo = he({ name: Zo, props: { rule: Array, options: { type: Object, default: function() { return Be({ submitBtn: !1, resetBtn: !1 }); } }, modelValue: { type: Object, default: function() { return {}; } }, disabled: { type: Boolean, default: !1 }, syncDisabled: { type: Boolean, default: !0 }, formCreateInject: Object }, data: function() { return { cacheValue: {}, subApi: {}, form: Te(this.formCreateInject.form.$form()) }; }, emits: ["fc:subform", "update:modelValue", "change", "itemMounted"], watch: { modelValue: function(e) { this.setValue(e); } }, methods: { formData: function(e) { this.cacheValue = JSON.stringify(e), this.$emit("update:modelValue", e), this.$emit("change", e); }, setValue: function(e) { var t = JSON.stringify(e); this.cacheValue !== t && (this.cacheValue = t, this.subApi.coverValue(e || {})); }, add$f: function(e) { var t = this; this.subApi = e, je(function() { t.$emit("itemMounted", e); }); } }, render: function() { var e = this.form; return H(e, { disabled: this.disabled, "onUpdate:modelValue": this.formData, modelValue: this.modelValue, "onEmit-event": this.$emit, "onUpdate:api": this.add$f, rule: this.rule, option: this.options, extendOption: !0 }, null); } }); function Pi(n, e) { var t = Object.keys(n); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(n); e && (r = r.filter(function(i) { return Object.getOwnPropertyDescriptor(n, i).enumerable; })), t.push.apply(t, r); } return t; } function W(n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? Pi(Object(t), !0).forEach(function(r) { Le(n, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Pi(Object(t)).forEach(function(r) { Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r)); }); } return n; } function pe(n) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? pe = function(e) { return typeof e; } : pe = function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, pe(n); } function es(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Le(n, e, t) { return e in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n; } function ts(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function"); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), e && yr(n, e); } function jn(n) { return jn = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, jn(n); } function yr(n, e) { return yr = Object.setPrototypeOf || function(r, i) { return r.__proto__ = i, r; }, yr(n, e); } function ns() { if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })), !0; } catch { return !1; } } function rs(n) { if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return n; } function is(n, e) { if (e && (typeof e == "object" || typeof e == "function")) return e; if (e !== void 0) throw new TypeError("Derived constructors may only return object or undefined"); return rs(n); } function as(n) { var e = ns(); return function() { var r = jn(n), i; if (e) { var a = jn(this).constructor; i = Reflect.construct(r, arguments, a); } else i = r.apply(this, arguments); return is(this, i); }; } function os(n, e) { return us(n) || cs(n, e) || Aa(n, e) || ds(); } function le(n) { return ss(n) || ls(n) || Aa(n) || fs(); } function ss(n) { if (Array.isArray(n)) return _r(n); } function us(n) { if (Array.isArray(n)) return n; } function ls(n) { if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n); } function cs(n, e) { var t = n == null ? null : typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"]; if (t != null) { var r = [], i = !0, a = !1, o, s; try { for (t = t.call(n); !(i = (o = t.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0) ; } catch (u) { a = !0, s = u; } finally { try { !i && t.return != null && t.return(); } finally { if (a) throw s; } } return r; } } function Aa(n, e) { if (!!n) { if (typeof n == "string") return _r(n, e); var t = Object.prototype.toString.call(n).slice(8, -1); if (t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set") return Array.from(n); if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return _r(n, e); } } function _r(n, e) { (e == null || e > n.length) && (e = n.length); for (var t = 0, r = new Array(e); t < e; t++) r[t] = n[t]; return r; } function fs() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function ds() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } var F = { type: function(e, t) { return Object.prototype.toString.call(e) === "[object " + t + "]"; }, Undef: function(e) { return e == null; }, Element: function(e) { return pe(e) === "object" && e !== null && e.nodeType === 1 && !F.Object(e); }, trueArray: function(e) { return Array.isArray(e) && e.length > 0; }, Function: function(e) { var t = this.getType(e); return t === "Function" || t === "AsyncFunction"; }, getType: function(e) { var t = Object.prototype.toString.call(e); return /^\[object (.*)\]$/.exec(t)[1]; }, empty: function(e) { return e == null || Array.isArray(e) && Array.isArray(e) && !e.length ? !0 : typeof e == "string" && !e; } }; ["Date", "Object", "String", "Boolean", "Array", "Number"].forEach(function(n) { F[n] = function(e) { return F.type(e, n); }; }); function Se(n, e) { return {}.hasOwnProperty.call(n, e); } var hs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Da = { exports: {} }; (function(n, e) { (function(t, r) { n.exports = r(); })(hs, function() { var t = 1e3, r = 6e4, i = 36e5, a = "millisecond", o = "second", s = "minute", u = "hour", c = "day", l = "week", h = "month", m = "quarter", w = "year", $ = "date", S = "Invalid Date", T = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, U = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, z = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(b) { var y = ["th", "st", "nd", "rd"], d = b % 100; return "[" + b + (y[(d - 20) % 10] || y[d] || y[0]) + "]"; } }, B = function(b, y, d) { var f = String(b); return !f || f.length >= y ? b : "" + Array(y + 1 - f.length).join(d) + b; }, Z = { s: B, z: function(b) { var y = -b.utcOffset(), d = Math.abs(y), f = Math.floor(d / 60), p = d % 60; return (y <= 0 ? "+" : "-") + B(f, 2, "0") + ":" + B(p, 2, "0"); }, m: function k(b, y) { if (b.date() < y.date()) return -k(y, b); var d = 12 * (y.year() - b.year()) + (y.month() - b.month()), f = b.clone().add(d, h), p = y - f < 0, v = b.clone().add(d + (p ? -1 : 1), h); return +(-(d + (y - f) / (p ? f - v : v - f)) || 0); }, a: function(b) { return b < 0 ? Math.ceil(b) || 0 : Math.floor(b); }, p: function(b) { return { M: h, y: w, w: l, d: c, D: $, h: u, m: s, s: o, ms: a, Q: m }[b] || String(b || "").toLowerCase().replace(/s$/, ""); }, u: function(b) { return b === void 0; } }, Q = "en", q = {}; q[Q] = z; var ce = "$isDayjsObject", re = function(b) { return b instanceof Oe || !(!b || !b[ce]); }, ae = function k(b, y, d) { var f; if (!b) return Q; if (typeof b == "string") { var p = b.toLowerCase(); q[p] && (f = p), y && (q[p] = y, f = p); var v = b.split("-"); if (!f && v.length > 1) return k(v[0]); } else { var g = b.name; q[g] = b, f = g; } return !d && f && (Q = f), f || !d && Q; }, J = function(b, y) { if (re(b)) return b.clone(); var d = pe(y) == "object" ? y : {}; return d.date = b, d.args = arguments, new Oe(d); }, G = Z; G.l = ae, G.i = re, G.w = function(k, b) { return J(k, { locale: b.$L, utc: b.$u, x: b.$x, $offset: b.$offset }); }; var Oe = function() { function k(y) { this.$L = ae(y.locale, null, !0), this.parse(y), this.$x = this.$x || y.x || {}, this[ce] = !0; } var b = k.prototype; return b.parse = function(y) { this.$d = function(d) { var f = d.date, p = d.utc; if (f === null) return new Date(NaN); if (G.u(f)) return new Date(); if (f instanceof Date) return new Date(f); if (typeof f == "string" && !/Z$/i.test(f)) { var v = f.match(T); if (v) { var g = v[2] - 1 || 0, x = (v[7] || "0").substring(0, 3); return p ? new Date(Date.UTC(v[1], g, v[3] || 1, v[4] || 0, v[5] || 0, v[6] || 0, x)) : new Date(v[1], g, v[3] || 1, v[4] || 0, v[5] || 0, v[6] || 0, x); } } return new Date(f); }(y), this.init(); }, b.init = function() { var y = this.$d; this.$y = y.getFullYear(), this.$M = y.getMonth(), this.$D = y.getDate(), this.$W = y.getDay(), this.$H = y.getHours(), this.$m = y.getMinutes(), this.$s = y.getSeconds(), this.$ms = y.getMilliseconds(); }, b.$utils = function() { return G; }, b.isValid = function() { return this.$d.toString() !== S; }, b.isSame = function(y, d) { var f = J(y); return this.startOf(d) <= f && f <= this.endOf(d); }, b.isAfter = function(y, d) { return J(y) < this.startOf(d); }, b.isBefore = function(y, d) { return this.endOf(d) < J(y); }, b.$g = function(y, d, f) { return G.u(y) ? this[d] : this.set(f, y); }, b.unix = function() { return Math.floor(this.valueOf() / 1e3); }, b.valueOf = function() { return this.$d.getTime(); }, b.startOf = function(y, d) { var f = this, p = !!G.u(d) || d, v = G.p(y), g = function(C, D) { var _ = G.w(f.$u ? Date.UTC(f.$y, D, C) : new Date(f.$y, D, C), f); return p ? _ : _.endOf(c); }, x = function(C, D) { return G.w(f.toDate()[C].apply(f.toDate("s"), (p ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(D)), f); }, M = this.$W, P = this.$M, N = this.$D, I = "set" + (this.$u ? "UTC" : ""); switch (v) { case w: return p ? g(1, 0) : g(31, 11); case h: return p ? g(1, P) : g(0, P + 1); case l: var V = this.$locale().weekStart || 0, L = (M < V ? M + 7 : M) - V; return g(p ? N - L : N + (6 - L), P); case c: case $: return x(I + "Hours", 0); case u: return x(I + "Minutes", 1); case s: return x(I + "Seconds", 2); case o: return x(I + "Milliseconds", 3); default: return this.clone(); } }, b.endOf = function(y) { return this.startOf(y, !1); }, b.$set = function(y, d) { var f, p = G.p(y), v = "set" + (this.$u ? "UTC" : ""), g = (f = {}, f[c] = v + "Date", f[$] = v + "Date", f[h] = v + "Month", f[w] = v + "FullYear", f[u] = v + "Hours", f[s] = v + "Minutes", f[o] = v + "Seconds", f[a] = v + "Milliseconds", f)[p], x = p === c ? this.$D + (d - this.$W) : d; if (p === h || p === w) { var M = this.clone().set($, 1); M.$d[g](x), M.init(), this.$d = M.set($, Math.min(this.$D, M.daysInMonth())).$d; } else g && this.$d[g](x); return this.init(), this; }, b.set = function(y, d) { return this.clone().$set(y, d); }, b.get = function(y) { return this[G.p(y)](); }, b.add = function(y, d) { var f, p = this; y = Number(y); var v = G.p(d), g = function(N) { var I = J(p); return G.w(I.date(I.date() + Math.round(N * y)), p); }; if (v === h) return this.set(h, this.$M + y); if (v === w) return this.set(w, this.$y + y); if (v === c) return g(1); if (v === l) return g(7); var x = (f = {}, f[s] = r, f[u] = i, f[o] = t, f)[v] || 1, M = this.$d.getTime() + y * x; return G.w(M, this); }, b.subtract = function(y, d) { return this.add(-1 * y, d); }, b.format = function(y) { var d = this, f = this.$locale(); if (!this.isValid()) return f.invalidDate || S; var p = y || "YYYY-MM-DDTHH:mm:ssZ", v = G.z(this), g = this.$H, x = this.$m, M = this.$M, P = f.weekdays, N = f.months, I = f.meridiem, V = function(D, _, E, O) { return D && (D[_] || D(d, p)) || E[_].slice(0, O); }, L = function(D) { return G.s(g % 12 || 12, D, "0"); }, A = I || function(C, D, _) { var E = C < 12 ? "AM" : "PM"; return _ ? E.toLowerCase() : E; }; return p.replace(U, function(C, D) { return D || function(_) { switch (_) { case "YY": return String(d.$y).slice(-2); case "YYYY": return G.s(d.$y, 4, "0"); case "M": return M + 1; case "MM": return G.s(M + 1, 2, "0"); case "MMM": return V(f.monthsShort, M, N, 3); case "MMMM": return V(N, M); case "D": return d.$D; case "DD": return G.s(d.$D, 2, "0"); case "d": return String(d.$W); case "dd": return V(f.weekdaysMin, d.$W, P, 2); case "ddd": return V(f.weekdaysShort, d.$W, P, 3); case "dddd": return P[d.$W]; case "H": return String(g); case "HH": return G.s(g, 2, "0"); case "h": return L(1); case "hh": return L(2); case "a": return A(g, x, !0); case "A": return A(g, x, !1); case "m": return String(x); case "mm": return G.s(x, 2, "0"); case "s": return String(d.$s); case "ss": return G.s(d.$s, 2, "0"); case "SSS": return G.s(d.$ms, 3, "0"); case "Z": return v; } return null; }(C) || v.replace(":", ""); }); }, b.utcOffset = function() { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); }, b.diff = function(y, d, f) { var p, v = this, g = G.p(d), x = J(y), M = (x.utcOffset() - this.utcOffset()) * r, P = this - x, N = function() { return G.m(v, x); }; switch (g) { case w: p = N() / 12; break; case h: p = N(); break; case m: p = N() / 3; break; case l: p = (P - M) / 6048e5; break; case c: p = (P - M) / 864e5; break; case u: p = P / i; break; case s: p = P / r; break; case o: p = P / t; break; default: p = P; } return f ? p : G.a(p); }, b.daysInMonth = function() { return this.endOf(h).$D; }, b.$locale = function() { return q[this.$L]; }, b.locale = function(y, d) { if (!y) return this.$L; var f = this.clone(), p = ae(y, d, !0); return p && (f.$L = p), f; }, b.clone = function() { return G.w(this.$d, this); }, b.toDate = function() { return new Date(this.valueOf()); }, b.toJSON = function() { return this.isValid() ? this.toISOString() : null; }, b.toISOString = function() { return this.$d.toISOString(); }, b.toString = function() { return this.$d.toUTCString(); }, k; }(), Ye = Oe.prototype; return J.prototype = Ye, [["$ms", a], ["$s", o], ["$m", s], ["$H", u], ["$W", c], ["$M", h], ["$y", w], ["$D", $]].forEach(function(k) { Ye[k[1]] = function(b) { return this.$g(b, k[0], k[1]); }; }), J.extend = function(k, b) { return k.$i || (k(b, Oe, J), k.$i = !0), J; }, J.locale = ae, J.isDayjs = re, J.unix = function(k) { return J(1e3 * k); }, J.en = q[Q], J.Ls = q, J.p = {}, J; }); })(Da); var Ht = Da.exports, ps = "fcCalendar", ms = he({ name: ps, inheritAttrs: !1, props: { placeholder: String, formCreateInject: Object, disabled: Boolean, clearable: Boolean, type: String, modelValue: [String, Array], minDate: [String, Date], maxDate: [String, Date] }, emits: ["update:modelValue", "change", "fc.el"], setup: function(e, t) { var r = Ot(!1), i = De(e, "modelValue"), a = De(e, "formCreateInject"), o = Ot(i.value); ze(function() { return i.value; }, function($) { o.value = $; }); var s = function(S) { return Ht(S).format("YYYY-MM-DD"); }, u = function(S) { return Ht(S).toDate(); }, c = at(function() { var $ = i.value; return Array.isArray($) ? $.map(u) : $ ? u($) : null; }), l = at(function() { return { minDate: e.minDate ? Ht(e.minDate).toDate() : void 0, maxDate: e.maxDate ? Ht(e.maxDate).toDate() : void 0 }; }), h = function(S) { Array.isArray(S) ? o.value = S.map(s) : S ? o.value = s(S) : o.value = S; }, m = function() { t.emit("update:modelValue", o.value), t.emit("change", o.value); }, w = { range: function() { return o.value.length ? o.value.join(" - ") : ""; }, multiple: function() { return o.value.length ? a.value.t("selectedData", { length: o.value.length }) || "\u9009\u62E9\u4E86 ".concat(o.value.length, " \u4E2A\u65E5\u671F") : ""; } }; return { show: r, inputValue: o, defaultDate: c, dateRange: l, open: function() { e.disabled || (r.value = !0); }, confirm: function(S) { h(S), r.value = !1, m(); }, getStrValue: function() { return o.value ? Se(w, e.type) ? w[e.type]() : o.value || "" : ""; }, clear: function(S) { S.stopPropagation(); var T = Array.isArray(o.value) ? [] : ""; h(T), m(); } }; }, render: function() { var e = this, t = function() { return e.$props.clearable && !F.empty(e.inputValue) ? H("i", { class: "van-badge__wrapper van-icon van-icon-clear van-field__clear", onClick: e.clear }, null) : void 0; }; return H(Ke, null, [H(K("van-field"), { ref: "el", placeholder: this.placeholder, readonly: !0, disabled: this.$props.disabled, onClick: this.open, "model-value": this.getStrValue(), isLink: !0, border: !1 }, { "right-icon": t }), H(K("van-calendar"), Pe(W(W({}, this.$attrs), this.dateRange), { show: this.show, "onUpdate:show": function(i) { return e.show = i; }, type: this.type, onConfirm: this.confirm, defaultDate: this.defaultDate }), null)]); }, mounted: function() { this.$emit("fc.el", this.$refs.el); } }), gs = "fcCascader", vs = he({ name: gs, inheritAttrs: !1, props: { placeholder: String, disabled: Boolean, clearable: Boolean, fieldNames: Object, modelValue: [String, Number], options: Array, minDate: [String, Date], maxDate: [String, Date] }, emits: ["update:modelValue", "fc.el", "change"], setup: function(e, t) { var r = Ot(!1), i = De(e, "modelValue"), a = De(e, "options"), o = De(e, "fieldNames", {}), s = function h(m, w, $) { for (var S = 0; S < m.length; S++) { if (m[S][o.value.value || "value"] === w) return [].concat(le($), [m[S]]); if (m[S][o.value.children || "children"]) { var T = h(m[S][o.value.children || "children"], w, [].concat(le($), [m[S]])); if (T) return T; } } }, u = function(m) { if (m == null || m === "") return ""; var w = s(a.value, m, []); return w ? w.map(function($) { return $[o.value.text || "text"]; }).join(" / ") : m; }, c = Ot(u(i.value)); ze(function() { return i.value; }, function(h) { c.value = u(h); }), ze(function() { return a.value; }, function() { i.value != null && i.value !== "" && (c.value = u(i.value)); }, { deep: !0 }); var l = function(m) { t.emit("update:modelValue", m), t.emit("change", m); }; return { show: r, inputValue: c, options: a, open: function() { e.disabled || (r.value = !0); }, confirm: function(m) { var w = m.selectedOptions, $ = m.value; c.value = w.map(function(S) { return S[o.value.text || "text"]; }).join(" / "), r.value = !1, l($); }, clear: function(m) { m.stopPropagation(), c.value = "", l(""); } }; }, render: function() { var e = this, t = function() { return e.$props.clearable && e.inputValue ? H("i", { class: "van-badge__wrapper van-icon van-icon-clear van-field__clear", onClick: e.clear }, null) : void 0; }; return H(Ke, null, [H(K("van-field"), { ref: "el", placeholder: this.placeholder, readonly: !0, disabled: this.$props.disabled, onClick: this.open, "model-value": this.inputValue, border: !1, isLink: !0 }, { "right-icon": t }), H(K("van-popup"), { show: this.show, "onUpdate:show": function(i) { return e.show = i; }, round: !0, position: "bottom" }, { default: function() { return [H(K("van-cascader"), Pe(e.$attrs, { modelValue: e.modelValue, fieldNames: e.fieldNames, options: e.options, onClose: function() { return e.show = !1; }, onFinish: e.confirm }), null)]; } })]); }, mounted: function() { this.$emit("fc.el", this.$refs.el); } }); function ys(n) { return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !Ir(n); } var _s = "fcCheckbox", bs = he({ name: _s, inheritAttrs: !1, props: { modelValue: Array, options: Array }, emits: ["update:modelValue", "change"], setup: function(e, t) { var r = De(e, "modelValue", []), i = De(e, "options"); return { options: i, modelValue: r, onInput: function(o) { t.emit("update:modelValue", o), t.emit("change", o); } }; }, render: function() { var e; return H(K("van-checkbox-group"), Pe({ direction: "horizontal" }, this.$attrs, { modelValue: Array.isArray(this.modelValue) ? this.modelValue : [], "onUpdate:modelValue": this.onInput }), ys(e = (this.options || []).map(function(t) { var r = W({}, t), i = t.text, a = t.value; return delete r.text, delete r.value, H(K("van-checkbox"), Pe({ name: a, shape: "square" }, r), { default: function() { return [i || t.label || a]; } }); })) ? e : { default: function() { return [e]; } }); } }), ws = "fcSelect", $s = he({ name: ws, inheritAttrs: !1, props: { disabled: Boolean, placeholder: String, columnsFieldNames: Object, modelValue: [String, Number], options: Array }, emits: ["update:modelValue", "fc.el", "change"], setup: function(e, t) { var r = Ot(!1), i = De(e, "modelValue"), a = De(e, "options"), o = De(e, "columnsFieldNames", {}), s = at(function() { if (i.value == null || i.value === "") return ""; for (var c = 0; c < (a.value || []).length; c++) if (a.value[c][o.value.value || "value"] === i.value) return a.value[c][o.value.text || "text"]; return i.value; }), u = function(l) { t.emit("update:modelValue", l), t.emit("change", l); }; return { show: r, inputValue: s, options: a, open: function() { e.disabled || (r.value = !0); }, confirm: function(l) { var h = l.selectedValues; u(h[0]), r.value = !1; } }; }, render: function() { var e = this; return H(Ke, null, [H(K("van-field"), { ref: "el", placeholder: this.placeholder, readonly: !0, disabled: this.$props.disabled, onClick: this.open, "model-value": this.inputValue, isLink: !0 }, null), H(K("van-popup"), { show: this.show, "onUpdate:show": function(r) { return e.show = r; }, round: !0, position: "bottom" }, { default: function() { return [H(K("van-picker"), Pe(e.$attrs, { modelValue: [e.modelValue], columnsFieldNames: e.columnsFieldNames, columns: e.options, onCancel: function() { return e.show = !1; }, onConfirm: e.confirm }), null)]; } })]); }, mounted: function() { this.$emit("fc.el", this.$refs.el); } }); function Tt(n) { return Array.isArray(n) ? n : [null, void 0, ""].indexOf(n) > -1 ? [] : [n]; } var Ss = "fcUploader"; function Mi(n, e) { return pe(n) === "object" ? n : { url: n, is_string: !0, name: Os(n), uid: e }; } function Ti(n) { return W(W({}, n), {}, { file: n, value: n }); } function Os(n) { return ("" + n).split("/").pop(); } var Es = he({ name: Ss, inheritAttrs: !1, props: { formCreateInject: Object, modelValue: [Array, String, Object], afterRead: Function, action: String, headers: Object, method: String, data: Object, uploadName: String, onSuccess: Function, onError: Function, maxCount: Number }, emits: ["update:modelValue", "delete"], setup: function(e, t) { var r = De(e, "afterRead"), i = De(e, "modelValue", []), a = Ot(Tt(i.value).map(Mi).map(Ti)); ze(function() { return i.value; }, function(s) { a.value = Tt(s).map(Mi).map(Ti); }); var o = function() { var u = a.value.map(function(c) { return c.is_string ? c.url : c.value || c.url; }).filter(function(c) { return c !== void 0; }); t.emit("update:modelValue", e.maxCount === 1 ? u[0] || "" : u); }; return { fileList: a, modelValue: i, onDelete: function(u) { o(), t.emit("delete", u); }, uploadFile: function(u) { var c = this; if (u.status = "uploading", r.value) return r.value(u); var l = e.data || {}; l[e.uploadName || "file"] = u.file, e.formCreateInject.api.fetch({ action: e.action, dataType: "formData", source: "upload", headers: e.headers || {}, method: e.method || "post", data: l }).then(function(h) { u.status = "success", e.onSuccess && e.onSuccess(h, u), o(); }).catch(function(h) { u.status = "failed", u.message = c.formCreateInject.t("uploadFail") || "\u4E0A\u4F20\u5931\u8D25", e.onError && e.onError(h, u); }); } }; }, render: function() { var e = this; return H(K("van-uploader"), Pe(this.$attrs, { "model-value": this.fileList, maxCount: this.maxCount, "onUpdate:model-value": function(r) { return e.fileList = r; }, afterRead: this.uploadFile, onDelete: this.onDelete }), null); } }); function xs(n) { return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !Ir(n); } var Cs = "fcRadio", ks = he({ name: Cs, inheritAttrs: !1, props: { modelValue: [String, Number], options: Array }, emits: ["update:modelValue", "change"], setup: function(e, t) { var r = De(e, "modelValue", []), i = De(e, "options"); return { options: i, modelValue: r, onInput: function(o) { t.emit("update:modelValue", o), t.emit("change", o); } }; }, render: function() { var e; return H(K("van-radio-group"), Pe({ direction: "horizontal" }, this.$attrs, { modelValue: this.modelValue, "onUpdate:modelValue": this.onInput }), xs(e = (this.options || []).map(function(t) { var r = W({}, t), i = t.text, a = t.value; return delete r.text, delete r.value, H(K("van-radio"), Pe({ name: a }, r), { default: function() { return [i || t.label || a]; } }); })) ? e : { default: function() { return [e]; } }); } }), As = "fcDatePicker", Ds = he({ name: As, inheritAttrs: !1, props: { disabled: Boolean, clearable: Boolean, placeholder: String, modelValue: [String, Number], minDate: [String, Date], maxDate: [String, Date] }, emits: ["update:modelValue", "fc.el", "change"], setup: function(e, t) { var r = Ot(!1), i = De(e, "modelValue"), a = at(function() { return i.value == null || i.value === "" ? [] : i.value.split("-"); }), o = at(function() { return { minDate: e.minDate ? Ht(e.minDate).toDate() : void 0, maxDate: e.maxDate ? Ht(e.maxDate).toDate() : void 0 }; }), s = function(c) { t.emit("update:modelValue", c), t.emit("change", c); }; return { show: r, formValue: a, dateRange: o, open: function() { e.disabled || (r.value = !0); }, confirm: function(c) { var l = c.selectedValues; s(l.join("-")), r.value = !1; }, clear: function(c) { c.stopPropagation(), s(""); } }; }, render: function() { var e = this, t = function() { return e.$props.clearable && e.modelValue ? H("i", { class: "van-badge__wrapper van-icon van-icon-clear van-field__clear", onClick: e.clear }, null) : void 0; }; return H(Ke, null, [H(K("van-field"), { ref: "el", placeholder: this.placeholder, readonly: !0, disabled: this.$props.disabled, onClick: this.open, "model-value": this.modelValue, border: !1, isLink: !0 }, { "right-icon": t }), H(K("van-popup"), { show: this.show, "onUpdate:show": function(i) { return e.show = i; }, round: !0, position: "bottom" }, { default: function() { return [H(K("van-date-picker"), Pe({ columnsType: ["year", "month", "day"] }, W(W({}, e.$attrs), e.dateRange), { modelValue: e.formValue, onConfirm: e.confirm, onCancel: function() { return e.show = !1; } }), null)]; } })]); }, mounted: function() { this.$emit("fc.el", this.$refs.el); } }), Rs = "fcTimePicker", Ps = he({ name: Rs, inheritAttrs: !1, props: { disabled: Boolean, clearable: Boolean, placeholder: String, modelValue: [String, Number] }, emits: ["update:modelValue", "fc.el", "change"], setup: function(e, t) { var r = Ot(!1), i = De(e, "modelValue"), a = at(function() { return i.value == null || i.value === "" ? [] : i.value.split(":"); }), o = function(u) { t.emit("update:modelValue", u), t.emit("change", u); }; return { show: r, formValue: a, open: function() { e.disabled || (r.value = !0); }, confirm: function(u) { var c = u.selectedValues; o(c.join(":")), r.value = !1; }, clear: function(u) { u.stopPropagation(), o(""); } }; }, render: function() { var e = this, t = function() { return e.$props.clearable && e.modelValue ? H("i", { class: "van-badge__wrapper van-icon van-icon-clear van-field__clear", onClick: e.clear }, null) : void 0; }; return H(Ke, null, [H(K("van-field"), { ref: "el", placeholder: this.placeholder, readonly: !0, disabled: this.$props.disabled, onClick: this.open, "model-value": this.modelValue, border: !1, isLink: !0 }, { "right-icon": t }), H(K("van-popup"), { show: this.show, "onUpdate:show": function(i) { return e.show = i; }, round: !0, position: "bottom" }, { default: function() { return [H(K("van-time-picker"), Pe({ columnsType: ["hour", "minute"] }, e.$attrs, { modelValue: e.formValue, onConfirm: e.confirm, onCancel: function() { return e.show = !1; } }), null)]; } })]); }, mounted: function() { this.$emit("fc.el", this.$refs.el); } }); function rt(n, e, t) { n[e] = t; } function Dt(n, e) { delete n[e]; } function hn(n) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = arguments.length > 2 ? arguments[2] : void 0, r = !1; for (var i in e) if (Object.prototype.hasOwnProperty.call(e, i)) { var a = e[i]; if ((r = Array.isArray(a)) || F.Object(a)) { var o = n[i] === void 0; if (r) r = !1, o && rt(n, i, []); else if (a._clone && t !== void 0) if (t) a = a.getRule(), o && rt(n, i, {}); else { rt(n, i, a._clone()); continue; } else o && rt(n, i, {}); n[i] = hn(n[i], a, t); } else rt(n, i, a), F.Undef(a) || (F.Undef(a.__json) || (n[i].__json = a.__json), F.Undef(a.__origin) || (n[i].__origin = a.__origin)); } return t !== void 0 && Array.isArray(n) ? n.filter(function(s) { return !s || !s.__ctrl; }) : n; } function ht(n) { return hn({}, { value: n }).value; } var Ms = Object.assign || function(n) { for (var e, t = 1; t < arguments.length; t++) for (var r in e = arguments[t], e) Object.prototype.hasOwnProperty.call(e, r) && rt(n, r, e[r]); return n; }; function ne() { return Ms.apply(this, arguments); } function br(n) { return pe(n) !== "object" || n === null ? n : n instanceof Array ? le(n) : W({}, n); } var Ts = "fcGroup", js = he({ name: Ts, props: { field: String, rule: Array, expand: Number, options: Object, button: { type: Boolean, default: !0 }, max: { type: Number, default: 0 }, min: { type: Number, default: 0 }, modelValue: { type: Array, default: function() { return []; } }, defaultValue: Object, sortBtn: { type: Boolean, default: !1 }, disabled: { type: Boolean, default: void 0 }, onBeforeRemove: { type: Function, default: function() { } }, onBeforeAdd: { type: Function, default: function() { } }, formCreateInject: Object, parse: Function }, data: function() { return { len: 0, cacheRule: {}, cacheValue: {}, sort: [], form: Te(this.formCreateInject.form.$form()) }; }, emits: ["update:modelValue", "change", "itemMounted", "remove", "add"], watch: { rule: { handler: function(e, t) { var r = this; Object.keys(this.cacheRule).forEach(function(i) { var a = r.cacheRule[i]; if (a.$f) { var o = a.$f.formData(); if (e === t) a.$f.deferSyncValue(function() { hn(a.rule, e), a.$f.setValue(o); }, !0); else { var s = a.$f.formData(); a.$f.once("reloading", function() { a.$f.setValue(s); }), a.rule = ht(e); } } }); }, deep: !0 }, expand: function(e) { var t = e - this.modelValue.length; t > 0 && this.expandRule(t); }, modelValue: { handler: function(e) { var t = this; e = e || []; var r = this.sort, i = r.length, a = i - e.length; if (a < 0) { for (var o = a; o < 0; o++) this.addRule(e.length + o, !0); for (var s = 0; s < i; s++) this.setValue(r[s], e[s]); } else { if (a > 0) for (var u = 0; u < a; u++) this.removeRule(r[i - u - 1]); e.forEach(function(c, l) { t.setValue(r[l], e[l]); }); } }, deep: !0 } }, methods: { _value: function(e) { return e && Se(e, this.field) ? e[this.field] : e; }, cache: function(e, t) { this.cacheValue[e] = JSON.stringify(t); }, input: function(e) { this.$emit("update:modelValue", e), this.$emit("change", e); }, formData: function(e, t) { var r = this, i = this.cacheRule, a = this.sort; if (a.filter(function(s) { return i[s] && i[s].$f; }).length === a.length) { var o = a.map(function(s) { var u = e === s ? t : W({}, r.cacheRule[s].$f.form), c = r.field ? u[r.field] || null : u; return r.cache(s, c), c; }); this.input(o); } }, setValue: function(e, t) { var r = this.field; r && (t = Le({}, r, this._value(t))), this.cacheValue[e] !== JSON.stringify(r ? t[r] : t) && (this.cacheRule[e].$f && this.cacheRule[e].$f.coverValue(t), this.cache(e, t)); }, addRule: function(e, t) { var r = this, i = this.formCreateInject.form.copyRules(this.rule || []), a = this.options ? W({}, this.options) : { submitBtn: !1, resetBtn: !1 }; if (this.defaultValue) { a.formData || (a.formData = {}); var o = ht(this.defaultValue); ne(a.formData, this.field ? Le({}, this.field, o) : o); } this.parse && this.parse({ rule: i, options: a, index: this.sort.length }), this.cacheRule[++this.len] = { rule: i, options: a }, this.sort = Object.keys(this.cacheRule), t && je(function() { return r.$emit("add", i, Object.keys(r.cacheRule).length - 1); }); }, add$f: function(e, t, r) { var i = this; this.cacheRule[t].$f = r, je(function() { i.$emit("itemMounted", r, Object.keys(i.cacheRule).indexOf(t)); }); }, removeRule: function(e, t) { var r = this, i = Object.keys(this.cacheRule).indexOf(e); delete this.cacheRule[e], delete this.cacheValue[e], this.sort = Object.keys(this.cacheRule), t && je(function() { return r.$emit("remove", i); }); }, add: function(e) { if (!(this.disabled || this.onBeforeAdd(this.modelValue) === !1)) { var t = le(this.modelValue); t.push(this.defaultValue ? ht(this.defaultValue) : this.field ? null : {}), this.input(t); } }, del: function(e, t) { if (!(this.disabled || this.onBeforeRemove(this.modelValue, e) === !1)) { this.removeRule(t, !0); var r = le(this.modelValue); r.splice(e, 1), this.input(r); } }, addIcon: function(e) { return H("div", { class: "_fc-m-group-btn _fc-m-group-plus-minus", onClick: this.add }, null); }, delIcon: function(e, t) { var r = this; return H("div", { class: "_fc-m-group-btn _fc-m-group-plus-minus _fc-m-group-minus", onClick: function() { return r.del(e, t); } }, null); }, sortUpIcon: function(e) { var t = this; return H("div", { class: "_fc-m-group-btn _fc-m-group-arrow _fc-m-group-up", onClick: function() { return t.changeSort(e, -1); } }, null); }, sortDownIcon: function(e) { var t = this; return H("div", { class: "_fc-m-group-btn _fc-m-group-arrow _fc-m-group-down", onClick: function() { return t.changeSort(e, 1); } }, null); }, changeSort: function(e, t) { var r = this, i = this.sort[e]; this.sort[e] = this.sort[e + t], this.sort[e + t] = i, this.formCreateInject.subForm(this.sort.map(function(a) { return r.cacheRule[a].$f; })), this.formData(0); }, makeIcon: function(e, t, r) { var i = this; if (this.$slots.button) return this.$slots.button({ total: e, index: t, vm: this, key: r, del: function() { return i.del(t, r); }, add: this.add }); var a = []; return (!this.max || e < this.max) && e === t + 1 && a.push(this.addIcon(r)), e > this.min && a.push(this.delIcon(t, r)), this.sortBtn && t && a.push(this.sortUpIcon(t)), this.sortBtn && t !== e - 1 && a.push(this.sortDownIcon(t)), a; }, emitEvent: function(e, t, r, i) { this.$emit.apply(this, [e].concat(le(t), [this.cacheRule[i].$f, r])); }, expandRule: function(e) { for (var t = 0; t < e; t++) this.addRule(t); } }, created: function() { for (var e = (this.expand || 0) - this.modelValue.length, t = 0; t < this.modelValue.length; t++) this.addRule(t); e > 0 && this.expandRule(e); }, render: function() { var e = this, t = this.sort, r = this.button, i = this.form, a = this.disabled, o = t.length === 0 ? this.$slots.default ? this.$slots.default({ vm: this, add: this.add }) : H("div", { key: "a_def", class: "_fc-m-group-plus-minus _fc-m-group-add fc-clock", onClick: this.add }, null) : t.map(function(s, u) { var c = e.cacheRule[s], l = c.rule, h = c.options, m = r && !a ? e.makeIcon(t.length, u, s) : []; return H("div", { class: "_fc-m-group-container", key: s }, [H(i, Pe({ key: s }, { disabled: a, "onUpdate:modelValue": function($) { return e.formData(s, $); }, "onEmit-event": function($) { for (var S = arguments.length, T = new Array(S > 1 ? S - 1 : 0), U = 1; U < S; U++) T[U - 1] = arguments[U]; return e.emitEvent($, T, u, s); }, "onUpdate:api": function($) { return e.add$f(u, s, $); }, inFor: !0, modelValue: e.field ? Le({}, e.field, e._value(e.modelValue[u])) : e.modelValue[u], rule: l, option: h, extendOption: !0 }), null), H("div", { class: "_fc-m-group-idx" }, [u + 1]), m.length ? H("div", { class: "_fc-m-group-handle fc-clock" }, [m]) : null]); }); return H("div", { key: "con", class: "_fc-m-group " + (a ? "_fc-m-group-disabled" : "") }, [o]); } }), Ra = { name: "IconWarning" }, Fs = { class: "icon", viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg" }, Is = /* @__PURE__ */ Me("path", { fill: "currentColor", d: "M512 64a448 448 0 110 896 448 448 0 010-896zm0 832a384 384 0 000-768 384 384 0 000 768zm48-176a48 48 0 11-96 0 48 48 0 0196 0zm-48-464a32 32 0 0132 32v288a32 32 0 01-64 0V288a32 32 0 0132-32z" }, null, -1), Vs = [Is]; function Bs(n, e, t, r, i, a) { return ee(), me("svg", Fs, Vs); } Ra.render = Bs; var Ls = [Qo, Ra, ms, vs, bs, ks, $s, Ds, Ps, js, Es]; function xt(n, e) { var t = null; return function() { for (var r = this, i = arguments.length, a = new Array(i), o = 0; o < i; o++) a[o] = arguments[o]; t !== null && clearTimeout(t), t = setTimeout(function() { return n.call.apply(n, [r].concat(a)); }, e); }; } function fn(n) { var e = n.replace(/([A-Z])/g, "-$1").toLocaleLowerCase(); return e.indexOf("-") === 0 && (e = e.substr(1)), e; } function Ns(n) { return n.replace(n[0], n[0].toLocaleUpperCase()); } var Pa = ["props"], Ma = ["class", "style", "directives"], Ta = ["on", "hook"], Rt = function n(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = [].concat(Pa, le(r.normal || [])), a = [].concat(Ma, le(r.array || [])), o = [].concat(Ta, le(r.functional || [])), s = r.props || []; return e.reduce(function(u, c) { for (var l in c) if (u[l]) if (s.indexOf(l) > -1) u[l] = n([c[l]], u[l]); else if (i.indexOf(l) > -1) u[l] = W(W({}, u[l]), c[l]); else if (a.indexOf(l) > -1) { var h = u[l] instanceof Array ? u[l] : [u[l]], m = c[l] instanceof Array ? c[l] : [c[l]]; u[l] = [].concat(le(h), le(m)); } else if (o.indexOf(l) > -1) for (var w in c[l]) if (u[l][w]) { var $ = u[l][w] instanceof Array ? u[l][w] : [u[l][w]], S = c[l][w] instanceof Array ? c[l][w] : [c[l][w]]; u[l][w] = [].concat(le($), le(S)); } else u[l][w] = c[l][w]; else if (l === "hook") for (var T in c[l]) u[l][T] ? u[l][T] = zs(u[l][T], c[l][T]) : u[l][T] = c[l][T]; else u[l] = c[l]; else i.indexOf(l) > -1 || o.indexOf(l) > -1 || s.indexOf(l) > -1 ? u[l] = W({}, c[l]) : a.indexOf(l) > -1 ? u[l] = c[l] instanceof Array ? le(c[l]) : pe(c[l]) === "object" ? W({}, c[l]) : c[l] : u[l] = c[l]; return u; }, t); }, zs = function(e, t) { return function() { e && e.apply(this, arguments), t && t.apply(this, arguments); }; }, wr = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache", "modelEmit"], Fn = ["validate", "children", "control"], In = ["effect", "deep", "renderSlots"]; function ja() { return [].concat(wr, le(Pa), le(Ma), le(Ta), Fn, In); } function Fa(n, e, t) { return "[form-create ".concat(n, "]: ").concat(e) + (t ? ` rule: ` + JSON.stringify(t.getRule ? t.getRule() : t) : ""); } function Vr(n, e) { console.error(Fa("err", n, e)); } function Us(n) { Vr(n.toString()), console.error(n); } function ft(n) { var e = n.replace(/(-[a-z])/g, function(t) { return t.replace("-", "").toLocaleUpperCase(); }); return Ia(e); } function Ia(n) { return n.replace(n[0], n[0].toLowerCase()); } var $r = "[[FORM-CREATE-PREFIX-", Sr = "-FORM-CREATE-SUFFIX]]"; function dn(n, e) { return JSON.stringify(hn(Array.isArray(n) ? [] : {}, n, !0), function(t, r) { if (!(r && r._isVue === !0)) { if (typeof r != "function") return r; if (r.__json) return r.__json; if (r.__origin && (r = r.__origin), !r.__emit) return $r + r + Sr; } }, e); } function ar(n) { return new Function("return " + n)(); } function gt(n, e) { if (n && F.String(n) && n.length > 4) { var t = n.trim(), r = !1; try { if (t.indexOf(Sr) > 0 && t.indexOf($r) === 0) t = t.replace(Sr, "").replace($r, ""), r = !0; else if (t.indexOf("$FN:") === 0) t = t.substring(4), r = !0; else if (t.indexOf("$EXEC:") === 0) t = t.substring(6), r = !0; else if (t.indexOf("$GLOBAL:") === 0) { var i = t.substring(8); return t = function() { for (var s = arguments.length, u = new Array(s), c = 0; c < s; c++) u[c] = arguments[c]; var l = u[0].api.getGlobalEvent(i); if (l) return l.call.apply(l, [this].concat(u)); }, t.__json = n, t.__inject = !0, t; } else { if (t.indexOf("$FNX:") === 0) return t = ar("function($inject){" + t.substring(5) + "}"), t.__json = n, t.__inject = !0, t; (!e && t.indexOf("function ") === 0 && t !== "function " || !e && t.indexOf("function(") === 0 && t !== "function(") && (r = !0); } if (!r) return n; var a; try { a = ar(t); } catch { a = ar("function " + t); } return a.__json = n, a; } catch (o) { Vr("\u89E3\u6790\u5931\u8D25:".concat(t, ` err: `).concat(o)); return; } } return n; } function Va(n, e) { return JSON.parse(n, function(t, r) { return F.Undef(r) || !r.indexOf ? r : gt(r, e); }); } function Or(n, e) { return { value: n, enumerable: !1, configurable: !1, writable: !!e }; } function Ba(n, e) { return La([n], e || !1)[0]; } function La(n, e) { return hn([], le(n), e || !1); } function $t(n, e) { return Rt(Array.isArray(e) ? e : [e], n, { array: Fn, normal: In }), n; } function ji(n) { var e = F.Function(n.getRule) ? n.getRule() : n; return e.type || (e.type = "input"), e; } function qs(n, e) { return n ? (Object.keys(e || {}).forEach(function(t) { e[t] && (n[t] = $t(n[t] || {}, e[t])); }), n) : e; } function Na(n, e) { Object.defineProperties(n, Object.keys(e).reduce(function(t, r) { return t[r] = { get: function() { return e[r](); } }, t; }, {})); } function bt(n) { return n.__fc__ || (n.__origin__ ? n.__origin__.__fc__ : null); } function fe(n, e) { try { e = n(); } catch (t) { Us(t); } return e; } function bn() { var n = {}, e = function(r) { return r || "default"; }; return { setSlot: function(r, i) { r = e(r), !(!i || Array.isArray(i) && i.length) && (n[r] || (n[r] = []), n[r].push(i)); }, getSlot: function(r, i) { r = e(r); var a = []; return (n[r] || []).forEach(function(o) { if (Array.isArray(o)) a.push.apply(a, le(o)); else if (F.Function(o)) { var s = o.apply(void 0, le(i || [])); Array.isArray(s) ? a.push.apply(a, le(s)) : a.push(s); } else F.Undef(o) || a.push(o); }), a; }, getSlots: function() { var r = this, i = {}; return Object.keys(n).forEach(function(a) { i[a] = function() { for (var o = arguments.length, s = new Array(o), u = 0; u < o; u++) s[u] = arguments[u]; return r.getSlot(a, s); }; }), i; }, slotLen: function(r) { return r = e(r), n[r] ? n[r].length : 0; }, mergeBag: function(r) { var i = this; if (!r) return this; var a = F.Function(r.getSlots) ? r.getSlots() : r; return Array.isArray(r) || Ir(r) ? this.setSlot(void 0, function() { return r; }) : Object.keys(a).forEach(function(o) { i.setSlot(o, a[o]); }), this; } }; } function Fi(n) { var e = W({}, n.props || {}); return Object.keys(n.on || {}).forEach(function(t) { t.indexOf("-") > 0 && (t = ft(t)); var r = "on".concat(Ns(t)); Array.isArray(e[r]) ? e[r] = [].concat(le(e[r]), [n.on[t]]) : e[r] ? e[r] = [e[r], n.on[t]] : e[r] = n.on[t]; }), e.key = n.key, e.ref = n.ref, e.class = n.class, e.id = n.id, e.style = n.style, e.slot && delete e.slot, e; } function wn(n, e) { return Object.setPrototypeOf(n, e), n; } var Ii = function(e, t) { return typeof e == "string" ? String(t) : typeof e == "number" ? Number(t) : t; }, Pt = { "==": function(e, t) { return JSON.stringify(e) === JSON.stringify(Ii(e, t)); }, "!=": function(e, t) { return !Pt["=="](e, t); }, ">": function(e, t) { return e > t; }, ">=": function(e, t) { return e >= t; }, "<": function(e, t) { return e < t; }, "<=": function(e, t) { return e <= t; }, on: function(e, t) { return e && e.indexOf && e.indexOf(Ii(e[0], t)) > -1; }, notOn: function(e, t) { return !Pt.on(e, t); }, in: function(e, t) { return t && t.indexOf && t.indexOf(e) > -1; }, notIn: function(e, t) { return !Pt.in(e, t); }, between: function(e, t) { return e > t[0] && e < t[1]; }, notBetween: function(e, t) { return e < t[0] || e > t[1]; }, empty: function(e) { return F.empty(e); }, notEmpty: function(e) { return !F.empty(e); }, pattern: function(e, t) { return new RegExp(t, "g").test(e); } }; function Ge(n, e) { return (Array.isArray(e) ? e : (e || "").split(".")).forEach(function(t) { n != null && (n = n[t]); }), n; } function Gs(n) { for (var e = /{{\s*(.*?)\s*}}/g, t, r = {}; (t = e.exec(n)) !== null; ) t[1] && (r[t[1]] = !0); return Object.keys(r); } function Vi(n) { var e = n.split("."), t = [], r = ""; return e.forEach(function(i, a) { a === 0 ? r = i : r += "." + i, t.push(r); }), t.join(" && "); } var Dn = function(e, t) { if (!(!e || e === t)) { if (e.props.formCreateInject) return e.props.formCreateInject; if (e.parent) return Dn(e.parent, t); } }; function Hs(n, e, t) { return he({ name: "FormCreate" + (n.isMobile ? "Mobile" : ""), components: e, directives: t, props: { rule: { type: Array, required: !0, default: function() { return []; } }, option: { type: Object, default: function() { return {}; } }, extendOption: Boolean, driver: [String, Object], modelValue: Object, disabled: { type: Boolean, default: void 0 }, preview: { type: Boolean, default: void 0 }, index: [String, Number], api: Object, locale: [String, Object], name: String, subForm: { type: Boolean, default: !0 }, inFor: Boolean }, emits: ["update:api", "update:modelValue", "mounted", "submit", "reset", "change", "emit-event", "control", "remove-rule", "remove-field", "sync", "reload", "repeat-field", "update", "validate-field-fail", "validate-fail", "created"], render: function() { return this.fc.render(); }, setup: function(i) { var a = vr(); qo("parentFC", a); var o = Go("parentFC", null), s = o; if (o) for (; s.setupState.parent; ) s = s.setupState.parent; else s = a; var u = Ai(i), c = u.rule, l = u.modelValue, h = u.subForm, m = u.inFor, w = Be({ ctxInject: {}, destroyed: !1, isShow: !0, unique: 1, renderRule: le(c.value || []), updateValue: JSON.stringify(l.value || {}) }), $ = new n(a), S = $.api(), T = m.value, U = function() { if (o) { var ae = Dn(a, o); if (ae) { var J; T ? (J = Tt(ae.getSubForm()), J.push(S)) : J = S, ae.subForm(J); } } }, z = function() { var ae = Dn(a, o); if (ae) if (T) { var J = Tt(ae.getSubForm()), G = J.indexOf(S); G > -1 && J.splice(G, 1); } else ae.subForm(); }, B = null; Ho(function() { Wo(function() { var re = "", ae = i.option && i.option.globalClass || {}; Object.keys(ae).forEach(function(J) { var G = ""; ae[J].style && Object.keys(ae[J].style).forEach(function(Oe) { G += fn(Oe) + ":" + ae[J].style[Oe] + ";"; }), ae[J].content && (G += ae[J].content + ";"), G && (re += ".".concat(J, "{").concat(G, "}")); }), i.option && i.option.style && (re += i.option.style), B || (B = document.createElement("style"), B.type = "text/css", document.head.appendChild(B)), B.innerHTML = re || ""; }); }); var Z = xt(function() { $.bus.$emit("$loadData.$topForm"); }, 100), Q = xt(function() { $.bus.$emit("$loadData.$scopeForm"); }, 100), q = xt(function() { $.bus.$emit("$loadData.$form"); }, 100), ce = function(ae) { $.bus.$emit("change-$form." + ae); }; return Yo(function() { o && (S.top.bus.$on("$loadData.$form", Z), S.top.bus.$on("change", ce)), S !== S.scope && S.scope.bus.$on("$loadData.$scopeForm", Q), $.mounted(); }), Xo(function() { o && (S.top.bus.$off("$loadData.$form", Z), S.top.bus.$off("change", ce)), S !== S.scope && S.scope.bus.$off("$loadData.$scopeForm", Q), B && document.head.removeChild(B), z(), w.destroyed = !0, $.unmount(); }), Jo(function() { $.updated(); }), U(), ze(function() { return i.option; }, function() { $.initOptions(), S.refresh(); }, { deep: !0 }), ze(function() { return le(c.value); }, function(re) { $.$handle.isBreakWatch() || re.length === w.renderRule.length && re.every(function(ae) { return w.renderRule.indexOf(ae) > -1; }) || ($.$handle.updateAppendData(), $.$handle.reloadRule(c.value), a.setupState.renderRule()); }), ze(function() { return [i.disabled, i.preview]; }, function() { S.refresh(); }), ze(l, function(re) { dn(re || {}) !== w.updateValue && (S.config.forceCoverValue ? S.coverValue(re || {}) : S.setValue(re || {})); }, { deep: !0, flush: "post" }), ze(function() { return i.index; }, function() { S.coverValue({}), $.$handle.updateAppendData(), je(function() { je(function() { S.clearValidateState(); }); }); }, { flush: "sync" }), W(W({ fc: Te($), parent: o && Te(o), top: Te(s), fapi: Te(S) }, Ai(w)), {}, { getGroupInject: function() { return Dn(a, o); }, refresh: function() { ++w.unique; }, renderRule: function() { w.renderRule = le(c.value || []); }, updateValue: function(ae) { if (!w.destroyed) { var J = dn(ae); w.updateValue !== J && (w.updateValue = J, a.emit("update:modelValue", ae), je(function() { q(), o ? h.value || Q() : (Z(), Q()); })); } } }); }, created: function() { var i = vr(); i.emit("update:api", i.setupState.fapi), i.setupState.fc.init(); } }); } function za() { return { props: {}, on: {}, options: [], children: [], hidden: !1, display: !0, value: void 0 }; } function Gn(n, e) { return function(t, r, i) { var a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, o = new Br(n, t, r, i, a); return e && (F.Function(e) ? e(o) : o.props(e)), o; }; } function Br(n, e, t, r, i) { this._data = ne(za(), { type: n, title: e, field: t, value: r, props: i || {} }), this.event = this.on; } ne(Br.prototype, { getRule: function() { return this._data; }, setProp: function(e, t) { return rt(this._data, e, t), this; }, modelField: function(e) { return this._data.modelField = e, this; }, _clone: function() { var e = new this.constructor(); return e._data = Ba(this._data), e; } }); function Ua(n) { n.forEach(function(e) { Br.prototype[e] = function(t) { return $t(this._data, Le({}, e, arguments.length < 2 ? t : Le({}, t, arguments[1]))), this; }; }); } Ua(ja()); var Ws = Gn(""); function Ys(n, e, t) { var r = Ws("", e); return r._data.type = n, r._data.title = t, r; } function Xs() { return { create: Ys, factory: Gn }; } function Js(n, e, t) { var r = "fail to ".concat(n, " ").concat(t.status, "'"), i = new Error(r); return i.status = t.status, i.url = n, i; } function Bi(n) { var e = n.responseText || n.response; if (!e) return e; try { return JSON.parse(e); } catch { return e; } } function qa(n) { if (!(typeof XMLHttpRequest > "u")) { var e = new XMLHttpRequest(), t = n.action || ""; if (e.upload && n.onProgress && e.upload.addEventListener("progress", function(o) { o.percent = o.total > 0 ? o.loaded / o.total * 100 : 0, n.onProgress(o); }), n.query) { var r = new URLSearchParams(n.query).toString(); r && (t.includes("?") ? t += "&".concat(r) : t += "?".concat(r)); } e.onerror = function(s) { n.onError(s); }, e.onload = function() { if (e.status < 200 || e.status >= 300) return n.onError(Js(t, n, e), Bi(e)); n.onSuccess(Bi(e)); }, e.open(n.method || "get", t, !0); var i; (n.data || n.file) && (n.file || (n.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(n.data || {}).map(function(o) { i.append(o, n.data[o]); })) : (i = JSON.stringify(n.data || {}), e.setRequestHeader("content-type", "application/json"))), n.file && i.append(n.filename, n.file, n.file.name), n.withCredentials && "withCredentials" in e && (e.withCredentials = !0); var a = n.headers || {}; Object.keys(a).forEach(function(o) { a[o] != null && e.setRequestHeader(o, a[o]); }), e.send(i); } } function Li(n, e, t) { return new Promise(function(r, i) { (e || qa)(W(W({}, n), {}, { onSuccess: function(o) { var s = function(l) { return l; }, u = gt(n.parse); F.Function(u) ? s = u : u && F.String(u) && (s = function(l) { return Ge(l, u); }), r(s(o, void 0, t)); }, onError: function(o) { i(o); } })); }); } function en(n) { return ht(n); } function Ks(n) { function e(a) { return F.Undef(a) ? a = n.fields() : Array.isArray(a) || (a = [a]), a; } function t(a, o, s) { F.Undef(a) ? a = Object.keys(W(W({}, n.fieldCtx), n.nameCtx)) : Array.isArray(a) || (a = [a]), a.forEach(function(u) { var c = n.fieldCtx[u] || n.nameCtx[u]; c && c.forEach(function(l) { rt(l.rule, o, s), n.$render.clearCache(l); }); }); } function r() { var a = n.subForm; return Object.keys(a).reduce(function(o, s) { var u = a[s]; return u && (Array.isArray(u) ? o.push.apply(o, le(u)) : o.push(u)), o; }, []); } var i = { get isScope() { return n.vm.props.subForm === !1; }, get isPreview() { return n.preview; }, get config() { return n.options; }, set config(a) { n.fc.options.value = a; }, get options() { return n.options; }, set options(a) { n.fc.options.value = a; }, get form() { return n.form; }, get rule() { return n.rules; }, get parent() { return n.vm.setupState.parent && n.vm.setupState.parent.setupState.fapi; }, get top() { return i.parent ? i.parent.top : i; }, get scope() { for (var a = n.vm; a && a.setupState.fapi; ) if (a.props.subForm) a = a.setupState.parent; else return a.setupState.fapi; return i.top; }, get children() { return r(); }, get siblings() { var a = n.vm.setupState.getGroupInject(); if (a) { var o = a.getSubForm(); if (Array.isArray(o)) return le(o); } }, get index() { var a = i.siblings; if (a) { var o = a.indexOf(i); return o > -1 ? o : void 0; } }, get formulas() { return W({}, n.fc.formulas); }, formData: function(o) { if (o == null || typeof o == "boolean") { var s = {}; return Object.keys(n.form).forEach(function(u) { (o === !0 || n.ignoreFields.indexOf(u) === -1) && (s[u] = en(n.form[u])); }), s; } else return e(o).reduce(function(u, c) { return u[c] = i.getValue(c), u; }, {}); }, getValue: function(o) { var s = n.getFieldCtx(o); return s ? en(s.rule.value) : n.options.appendValue !== !1 && Se(n.appendData, o) ? en(n.appendData[o]) : void 0; }, coverValue: function(o) { var s = W({}, o || {}); n.deferSyncValue(function() { n.appendData = {}, i.fields().forEach(function(u) { var c = n.fieldCtx[u]; if (c) { var l = Se(o, u); c.forEach(function(h) { h.rule.value = l ? o[u] : void 0; }), delete s[u]; } }), ne(n.appendData, s); }, !0); }, setValue: function(o) { var s = o; arguments.length >= 2 && (s = Le({}, o, arguments[1])), n.deferSyncValue(function() { Object.keys(s).forEach(function(u) { var c = n.fieldCtx[u]; if (!c) return n.appendData[u] = s[u]; c.forEach(function(l) { l.rule.value = s[u]; }); }); }, !0); }, removeField: function(o) { var s = n.getCtx(o); return n.deferSyncValue(function() { n.getCtxs(o).forEach(function(u) { u.rm(); }); }, !0), s ? s.origin : void 0; }, removeRule: function(o) { var s = o && bt(o); if (!!s) return s.rm(), s.origin; }, fields: function() { return n.fields(); }, append: function(o, s, u) { var c = n.sort.length - 1, l, h = n.getCtx(s); if (h) if (u) { if (l = h.getPending("children", h.rule.children), !Array.isArray(l)) return; c = h.rule.children.length - 1; } else c = h.root.indexOf(h.origin), l = h.root; else l = n.rules; l.splice(c + 1, 0, o); }, prepend: function(o, s, u) { var c = 0, l, h = n.getCtx(s); if (h) if (u) { if (l = h.getPending("children", h.rule.children), !Array.isArray(l)) return; } else c = h.root.indexOf(h.origin), l = h.root; else l = n.rules; l.splice(c, 0, o); }, hidden: function(o, s) { t(s, "hidden", !!o), n.refresh(); }, hiddenStatus: function(o) { var s = n.getCtx(o); if (!!s) return !!s.rule.hidden; }, display: function(o, s) { t(s, "display", !!o), n.refresh(); }, displayStatus: function(o) { var s = n.getCtx(o); if (!!s) return !!s.rule.display; }, disabled: function(o, s) { e(s).forEach(function(u) { n.getCtxs(u).forEach(function(c) { rt(c.rule.props, "disabled", !!o); }); }), n.refresh(); }, all: function(o) { return Object.keys(n.ctxs).map(function(s) { var u = n.ctxs[s]; return o ? u.origin : u.rule; }); }, model: function(o) { return n.fields().reduce(function(s, u) { var c = n.fieldCtx[u][0]; return s[u] = o ? c.origin : c.rule, s; }, {}); }, component: function(o) { return Object.keys(n.nameCtx).reduce(function(s, u) { var c = n.nameCtx[u].map(function(l) { return o ? l.origin : l.rule; }); return s[u] = c.length === 1 ? c[0] : c, s; }, {}); }, bind: function() { return i.form; }, reload: function(o) { n.reloadRule(o); }, updateOptions: function(o) { n.fc.updateOptions(o), i.refresh(); }, onSubmit: function(o) { i.updateOptions({ onSubmit: o }); }, sync: function(o) { if (Array.isArray(o)) { o.forEach(function(u) { return i.sync(u); }); return; } var s = F.Object(o) ? bt(o) : n.getCtxs(o); !s || (s = Array.isArray(s) ? s : [s], s.forEach(function(u) { if (!u.deleted) { var c = n.subForm[u.id]; c && (Array.isArray(c) ? c.forEach(function(l) { l.refresh(); }) : c && c.refresh()), n.$render.clearCache(u); } }), n.refresh()); }, refresh: function() { r().forEach(function(o) { o.refresh(); }), n.$render.clearCacheAll(), n.refresh(); }, refreshOptions: function() { n.$manager.updateOptions(n.options), i.refresh(); }, hideForm: function(o) { n.vm.setupState.isShow = !o; }, changeStatus: function() { return n.changeStatus; }, clearChangeStatus: function() { n.changeStatus = !1; }, updateRule: function(o, s) { n.getCtxs(o).forEach(function(u) { ne(u.rule, s); }); }, updateRules: function(o) { Object.keys(o).forEach(function(s) { i.updateRule(s, o[s]); }); }, mergeRule: function(o, s) { n.getCtxs(o).forEach(function(u) { $t(u.rule, s); }); }, mergeRules: function(o) { Object.keys(o).forEach(function(s) { i.mergeRule(s, o[s]); }); }, getRule: function(o, s) { var u = n.getCtx(o); if (u) return s ? u.origin : u.rule; }, getRenderRule: function(o) { var s = n.getCtx(o); if (s) return s.prop; }, getRefRule: function(o) { var s = n.getCtxs(o); if (s) { var u = s.map(function(c) { return c.rule; }); return u.length === 1 ? u[0] : u; } }, setEffect: function(o, s, u) { var c = n.getCtx(o); c && s && (s[0] === "$" && (s = s.substr(1)), Se(c.rule, "$" + s) && rt(c.rule, "$" + s, u), Se(c.rule, "effect") || (c.rule.effect = {}), rt(c.rule.effect, s, u)); }, clearEffectData: function(o, s) { var u = n.getCtx(o); u && (s && s[0] === "$" && (s = s.substr(1)), u.clearEffectData(s), i.sync(o)); }, updateValidate: function(o, s, u) { u ? i.mergeRule(o, { validate: s }) : t(o, "validate", s); }, updateValidates: function(o, s) { Object.keys(o).forEach(function(u) { i.updateValidate(u, o[u], s); }); }, refreshValidate: function() { i.refresh(); }, resetFields: function(o) { e(o).forEach(function(s) { n.getCtxs(s).forEach(function(u) { n.$render.clearCache(u), u.rule.value = en(u.defaultValue); }); }), je(function() { je(function() { je(function() { i.clearValidateState(o); }); }); }), o == null && (F.Function(n.options.onReset) && fe(function() { return n.options.onReset(i); }), n.vm.emit("reset", i)); }, method: function(o, s) { var u = i.el(o); if (!u || !u[s]) throw new Error(Fa("err", "".concat(s, " \u65B9\u6CD5\u4E0D\u5B58\u5728"))); return function() { return u[s].apply(u, arguments); }; }, exec: function(o, s) { for (var u = arguments.length, c = new Array(u > 2 ? u - 2 : 0), l = 2; l < u; l++) c[l - 2] = arguments[l]; return fe(function() { return i.method(o, s).apply(void 0, c); }); }, toJson: function(o) { return dn(i.rule, o); }, trigger: function(o, s) { for (var u = i.el(o), c = arguments.length, l = new Array(c > 2 ? c - 2 : 0), h = 2; h < c; h++) l[h - 2] = arguments[h]; u && u.$emit.apply(u, [s].concat(l)); }, el: function(o) { var s = n.getCtx(o); if (s) return s.el || n.vm.refs[s.ref]; }, closeModal: function(o) { n.bus.$emit("fc:closeModal:" + o); }, getSubForm: function(o) { var s = n.getCtx(o); return s ? n.subForm[s.id] : void 0; }, getChildrenRuleList: function(o) { var s = pe(o) === "object", u = s ? bt(o) : n.getCtx(o), c = u ? u.rule : s ? o : i.getRule(o); if (!c) return []; var l = [], h = function(w) { w && w.forEach(function($) { pe($) === "object" && ($.field && l.push($), l.push.apply(l, le(i.getChildrenRuleList($)))); }); }; return h(u ? u.loadChildrenPending() : c.children), l; }, getParentRule: function(o) { var s = pe(o) === "object", u = s ? bt(o) : n.getCtx(o); return u.parent.rule; }, getParentSubRule: function(o) { var s = pe(o) === "object", u = s ? bt(o) : n.getCtx(o); if (u) { var c = u.getParentGroup(); if (c) return c.rule; } }, getChildrenFormData: function(o, s) { var u = i.getChildrenRuleList(o); return u.reduce(function(c, l) { return (l.ignore !== !0 || s === !0) && (c[l.field] = en(l.value)), c; }, {}); }, setChildrenFormData: function(o, s, u) { var c = i.getChildrenRuleList(o); n.deferSyncValue(function() { c.forEach(function(l) { Se(s, l.field) ? l.value = s[l.field] : u && (l.value = void 0); }); }); }, getGlobalEvent: function(o) { var s = i.options.globalEvent[o]; if (s) return pe(s) === "object" && (s = s.handle), gt(s); }, getGlobalData: function(o) { return new Promise(function(s, u) { var c = i.options.globalData[o]; c || s(n.fc.loadData[o]), c.type === "fetch" ? i.fetch(c).then(function(l) { s(l); }).catch(u) : s(c.data); }); }, renderRule: function(o, s, u) { var c = pe(o) === "object", l = c ? bt(o) : n.getCtx(o); return l ? n.$render.createRuleVnode(l, s, u) : void 0; }, renderChildren: function(o, s, u) { var c = pe(o) === "object", l = c ? bt(o) : n.getCtx(o); return l ? n.$render.createChildrenVnodes(l, s, u) : void 0; }, nextTick: function(o) { n.bus.$once("next-tick", o), n.refresh(); }, nextRefresh: function(o) { n.nextRefresh(), o && fe(o); }, deferSyncValue: function(o, s) { n.deferSyncValue(o, s); }, emit: function(o) { for (var s, u = arguments.length, c = new Array(u > 1 ? u - 1 : 0), l = 1; l < u; l++) c[l - 1] = arguments[l]; (s = n.vm).emit.apply(s, [o].concat(c)); }, bus: n.bus, fetch: function(o) { return new Promise(function(s, u) { o = ht(o), o = n.loadFetchVar(o), n.beforeFetch(o).then(function() { return Li(o, n.fc.create.fetch, i).then(function(c) { fe(function() { return o.onSuccess && o.onSuccess(c); }), s(c); }).catch(function(c) { fe(function() { return o.onError && o.onError(c); }), u(c); }); }).catch(function(c) { }); }); }, watchFetch: function(o, s, u, c) { return n.fc.watchLoadData(function(l, h) { var m = ht(o); m = n.loadFetchVar(m, l), !(c && c(m, h) === !1) && n.beforeFetch(m).then(function() { return Li(m, n.fc.create.fetch, i).then(function(w) { fe(function() { return m.onSuccess && m.onSuccess(w); }), s && s(w, h); }).catch(function(w) { fe(function() { return m.onError && m.onError(w); }), u && u(w); }); }).catch(function(w) { }); }, o.wait == null ? 1e3 : o.wait); }, getData: function(o, s) { return n.fc.get ? n.fc.get(o, s) : n.fc.getLoadData(o, s); }, watchData: function(o) { return n.fc.watchLoadData(function(s, u) { fe(function() { return o(s, u); }); }); }, setData: function(o, s, u) { return n.fc.setData(o, s, u); }, refreshData: function(o) { return n.fc.refreshData(o); }, t: function(o, s) { return n.fc.t(o, s); }, getLocale: function() { return n.fc.getLocale(); }, helper: { tidyFields: e, props: t } }; return ["on", "once", "off"].forEach(function(a) { i[a] = function() { var o; (o = n.bus)["$".concat(a)].apply(o, arguments); }; }), i.changeValue = i.changeField = i.setValue, i; } function Zs(n) { ne(n.prototype, { initCache: function() { this.clearCacheAll(); }, clearCache: function(t) { if (!t.rule.cache) { if (!this.cache[t.id]) { t.parent && this.clearCache(t.parent); return; } (this.cache[t.id].use === !0 || this.cache[t.id].parent) && this.$handle.refresh(), this.cache[t.id].parent && this.clearCache(this.cache[t.id].parent), this.cache[t.id] = null; } }, clearCacheAll: function() { this.cache = {}; }, setCache: function(t, r, i) { this.cache[t.id] = { vnode: r, use: !1, parent: i, slot: t.rule.slot }; }, getCache: function(t) { var r = this.cache[t.id]; if (r) return r.use = !0, r.vnode; } }); } function Qs(n) { return n == null ? "" : pe(n) === "object" ? JSON.stringify(n, null, 2) : String(n); } var eu = 0; function Hn() { var n = 370 + ++eu; return "F" + Math.random().toString(36).substr(3, 3) + Number("".concat(Date.now())).toString(36) + n.toString(36) + "c"; } function kt(n, e, t) { var r = n, i; return (e || "").split(".").forEach(function(a) { i && ((!r[i] || pe(r[i]) != "object") && (r[i] = {}), r = r[i]), i = a; }), r[i] = t, r; } function tu(n) { ne(n.prototype, { initRender: function() { this.cacheConfig = {}; }, getTypeSlot: function(t) { var r = function i(a) { if (a) { var o = void 0; return t.rule.field && (o = a.slots["field-" + fn(t.rule.field)] || a.slots["field-" + t.rule.field]), o || (o = a.slots["type-" + fn(t.type)] || a.slots["type-" + t.type]), o || i(a.setupState.parent); } }; return r(this.vm); }, render: function() { var t = this; if (!!this.vm.setupState.isShow) { this.$manager.beforeRender(); var r = bn(); return this.sort.forEach(function(i) { t.renderSlot(r, t.$handle.ctxs[i]); }), this.$manager.render(r); } }, renderSlot: function(t, r, i) { if (this.isFragment(r)) { r.initProp(), this.mergeGlobal(r), r.initNone(); var a = this.renderChildren(r.loadChildrenPending(), r), o = a.default; o && t.setSlot(r.rule.slot, function() { return o(); }), delete a.default, t.mergeBag(a); } else t.setSlot(r.rule.slot, this.renderCtx(r, i)); }, mergeGlobal: function(t) { var r = this, i = this.$handle.options.global; !i || (this.cacheConfig[t.trueType] || (this.cacheConfig[t.trueType] = at(function() { var a = r.$handle.options.global; return $t({}, [a["*"] || a.default || {}, a[t.originType] || a[t.type] || a[t.type] || {}]); })), t.prop = $t({}, [this.cacheConfig[t.trueType].value, t.prop])); }, setOptions: function(t) { var r = t.loadPending({ key: "options", origin: t.prop.options, def: [] }); t.prop.options = r, t.prop.optionsTo && r && kt(t.prop, t.prop.optionsTo, r); }, deepSet: function(t) { var r = t.rule.deep; r && Object.keys(r).sort(function(i, a) { return i.length < a.length ? -1 : 1; }).forEach(function(i) { kt(t.prop, i, r[i]); }); }, parseSide: function(t, r) { return F.Object(t) ? $t({ props: { formCreateInject: r.prop.props.formCreateInject } }, t) : t; }, renderSides: function(t, r, i) { var a = r[i ? "rule" : "prop"]; return [this.renderRule(this.parseSide(a.prefix, r)), t, this.renderRule(this.parseSide(a.suffix, r))]; }, renderId: function(t, r) { var i = this, a = this.$handle[r === "field" ? "fieldCtx" : "nameCtx"][t]; return a ? a.map(function(o) { return i.renderCtx(o, o.parent); }) : void 0; }, renderCtx: function(t, r) { var i = this; try { if (t.type === "hidden") return; var a = t.rule; if (this.force || !this.cache[t.id] || this.cache[t.id].slot !== a.slot) { var o; t.initProp(), this.mergeGlobal(t), t.initNone(), this.$manager.tidyRule(t), this.deepSet(t), this.setOptions(t), this.ctxProp(t); var s = t.prop; s.preview = !!(s.preview != null ? s.preview : this.$handle.preview), s.props.formCreateInject = this.injectProp(t); var u = s.cache !== !1, c = s.preview; if (s.hidden) { this.setCache(t, void 0, r); return; } o = function() { for (var h = arguments.length, m = new Array(h), w = 0; w < h; w++) m[w] = arguments[w]; var $ = { rule: a, prop: s, preview: c, api: i.$handle.api, model: s.model || {}, slotValue: m }; m.length && a.slotUpdate && fe(function() { return a.slotUpdate($); }); var S = {}, T = t.loadChildrenPending(); t.parser.renderChildren ? S = t.parser.renderChildren(T, t) : t.parser.loadChildren !== !1 && (S = i.renderChildren(T, t)), Object.keys(s.renderSlots || {}).forEach(function(B) { S[B] = function() { for (var Z = arguments.length, Q = new Array(Z), q = 0; q < Z; q++) Q[q] = arguments[q]; if (F.Function(s.renderSlots[B])) return fe(function() { var re; return (re = s.renderSlots)[B].apply(re, Q); }); var ce = i.parseSide(s.renderSlots[B], t); return i.renderRule(ce); }; }); var U = i.getTypeSlot(t), z; return U ? ($.children = S, z = U($)) : z = c ? t.parser.preview(br(S), t) : t.parser.render(br(S), t), z = i.renderSides(z, t), !(!t.input && F.Undef(s.native)) && s.native !== !0 && (i.fc.targetFormDriver("updateWrap", t), z = i.$manager.makeWrap(t, z)), t.none && (Array.isArray(z) ? z = z.map(function(B) { return !B || !B.__v_isVNode ? B : i.none(B); }) : z = i.none(z)), u && i.setCache(t, function() { return i.stable(z); }, r), z; }, this.setCache(t, o, r); } return function() { var l = i.getCache(t); if (l) return l.apply(void 0, arguments); if (i.cache[t.id]) return; var h = i.renderCtx(t, t.parent); if (h) return h(); }; } catch (l) { console.error(l); return; } }, none: function(t) { if (t) return t.props.class = this.mergeClass(t.props.class, "fc-none"), t; }, mergeClass: function(t, r) { if (Array.isArray(t)) t.push(r); else return t ? [t, r] : r; return t; }, stable: function(t) { var r = this, i = Array.isArray(t) ? t : [t]; return i.forEach(function(a) { a && a.__v_isVNode && a.children && pe(a.children) === "object" && (a.children.$stable = !0, r.stable(a.children)); }), t; }, getModelField: function(t) { return t.prop.modelField || t.parser.modelField || this.fc.modelFields[this.vNode.aliasMap[t.type]] || this.fc.modelFields[t.type] || this.fc.modelFields[t.originType] || "modelValue"; }, isFragment: function(t) { return t.type === "fragment" || t.type === "template"; }, injectProp: function(t) { var r = this, i = this.vm.setupState; i.ctxInject[t.id] || (i.ctxInject[t.id] = { api: this.$handle.api, form: this.fc.create, subForm: function(s) { r.$handle.addSubForm(t, s); }, getSubForm: function() { return r.$handle.subForm[t.id]; }, slots: function() { return r.vm.setupState.top.slots; }, options: [], children: [], preview: !1, id: t.id, field: t.field, rule: t.rule, input: t.input, t: function() { var s; return (s = r.$handle.api).t.apply(s, arguments); }, updateValue: function(s) { r.$handle.onUpdateValue(t, s); } }); var a = i.ctxInject[t.id]; return ne(a, { preview: t.prop.preview, options: t.prop.options, children: t.loadChildrenPending() }), a; }, ctxProp: function(t) { var r = this, i = t.ref, a = t.key, o = t.rule; this.$manager.mergeProp(t), t.parser.mergeProp(t); var s = [{ ref: i, key: o.key || "".concat(a, "fc"), slot: void 0, on: { vnodeMounted: function(m) { m.el.__rule__ = t.rule, r.onMounted(t, m.el); }, "fc.updateValue": function(m) { r.$handle.onUpdateValue(t, m); }, "fc.el": function(m) { t.exportEl = m, m && ((m.$el || m).__rule__ = t.rule); } } }]; if (t.input) { var u = this.tmpInput; this.vm.props.disabled === !0 && (t.prop.props.disabled = !0); var c = this.getModelField(t), l = { callback: function(m) { u && u(t.field, m, t.rule), r.onInput(t, m); }, modelField: c, value: this.$handle.getFormData(t) }; s.push({ on: W(Le({}, "update:".concat(c), l.callback), t.prop.modelEmit ? Le({}, t.prop.modelEmit, function() { return r.onEmitInput(t); }) : {}), props: Le({}, c, l.value) }), t.prop.model = l; } return Rt(s, t.prop), t.prop; }, onMounted: function(t, r) { t.el = this.vm.refs[t.ref] || r, t.parser.mounted(t), this.$handle.effect(t, "mounted"), this.$handle.targetHook(t, "mounted"); }, onInput: function(t, r) { if (t.prop.modelEmit) { this.$handle.onBaseInput(t, r); return; } this.$handle.onInput(t, r); }, onEmitInput: function(t) { this.$handle.setValue(t, t.parser.toValue(t.modelValue, t), t.modelValue); }, renderChildren: function(t, r) { var i = this; if (!F.trueArray(t)) return {}; var a = bn(); return t.map(function(o) { if (!!o) { if (F.String(o)) return a.setSlot(null, o); if (o.__fc__) return i.renderSlot(a, o.__fc__, r); o.type && je(function() { i.$handle.loadChildren(t, r), i.$handle.refresh(); }); } }), a.getSlots(); }, defaultRender: function(t, r) { var i = t.prop; return i.component ? typeof i.component == "string" ? this.vNode.make(i.component, i, r) : this.vNode.makeComponent(i.component, i, r) : this.vNode[t.type] ? this.vNode[t.type](i, r) : this.vNode[t.originType] ? this.vNode[t.originType](i, r) : this.vNode.make(Ia(i.type), i, r); }, createChildrenVnodes: function(t, r, i) { this.force = i !== !1, this.tmpInput = r; var a = this.renderChildren(t.rule.children, t); return this.force = !1, this.tmpInput = null, a; }, createRuleVnode: function(t, r, i) { this.force = i !== !1, this.tmpInput = r; var a = bn(); return this.renderSlot(a, t, t.parent), this.force = !1, this.tmpInput = null, a.getSlots(); }, renderRule: function(t, r, i) { var a = this; if (!!t) { if (F.String(t)) return t; var o; if (i) o = t.type; else if (o = t.is, t.type) { o = ft(t.type); var s = this.vNode.aliasMap[o]; s && (o = ft(s)); } if (!!o) { var u = bn(); F.trueArray(t.children) && t.children.forEach(function(l) { l && u.setSlot(l == null ? void 0 : l.slot, function() { return a.renderRule(l); }); }); var c = W({}, t); return delete c.type, delete c.is, this.vNode.make(o, c, u.mergeBag(r).getSlots()); } } } }); } var nu = 1; function Lr(n) { ne(this, { $handle: n, fc: n.fc, vm: n.vm, $manager: n.$manager, vNode: new n.fc.CreateNode(n.vm), force: !1, tmpInput: null, id: nu++ }), Na(this, { options: function() { return n.options; }, sort: function() { return n.sort; } }), this.initCache(), this.initRender(); } Zs(Lr); tu(Lr); function ru(n) { ne(n.prototype, { parseInjectEvent: function(t, r) { var i = t.inject || this.options.injectEvent; return this.parseEventLst(t, r, i); }, parseEventLst: function(t, r, i, a) { var o = this; return Object.keys(r).forEach(function(s) { var u = o.parseEvent(t, r[s], i, a); u && (r[s] = u); }), r; }, parseEvent: function(t, r, i, a) { if (F.Function(r) && (i !== !1 && !F.Undef(i) || r.__inject)) return this.inject(t, r, i); if (!a && Array.isArray(r) && r[0] && (F.String(r[0]) || F.Function(r[0]))) return this.parseEventLst(t, r, i, !0); if (F.String(r)) { var o = gt(r); if (o && r !== o) return o.__inject ? this.parseEvent(t, o, i, !0) : o; } }, parseEmit: function(t) { var r = this, i = {}, a = t.rule, o = a.emitPrefix, s = a.field, u = a.name, c = a.inject, l = a.emit || []; return F.trueArray(l) && l.forEach(function(h) { if (!!h) { var m, w = o || s || u; if (F.Object(h) && (m = h.inject, h = h.name, w = h.prefix || w), w) { var $ = fn("".concat(w, "-").concat(h)), S = function() { var z, B, Z; r.vm.emitsOptions && (r.vm.emitsOptions[$] = null); for (var Q = arguments.length, q = new Array(Q), ce = 0; ce < Q; ce++) q[ce] = arguments[ce]; (z = r.vm).emit.apply(z, [$].concat(q)), (B = r.vm).emit.apply(B, ["emit-event", $].concat(q)), (Z = r.bus).$emit.apply(Z, [$].concat(q)); }; if (S.__emit = !0, !m && c === !1) i[h] = S; else { var T = m || c || r.options.injectEvent; i[h] = F.Undef(T) ? S : r.inject(a, S, T); } } } }), t.computed.on = i, i; }, getInjectData: function(t, r) { var i = t.__fc__ && t.__fc__.$api, a = t.__fc__ && t.__fc__.$handle.vm || this.vm, o = a.props, s = o.option, u = o.rule; return { $f: i || this.api, api: i || this.api, rule: u, self: t.__origin__, option: s, inject: r }; }, inject: function(t, r, i) { if (r.__origin) { if (this.watching && !this.loading) return r; r = r.__origin; } var a = this, o = function() { for (var u = a.getInjectData(t, i), c = arguments.length, l = new Array(c), h = 0; h < c; h++) l[h] = arguments[h]; return u.args = [].concat(l), l.unshift(u), r.apply(this, l); }; return o.__origin = r, o.__json = r.__json, o; }, loadStrVar: function(t, r, i) { var a = this; if (t && typeof t == "string" && t.indexOf("{{") > -1 && t.indexOf("}}") > -1) { var o = t, s = Gs(t), u; if (s.forEach(function(c) { var l = c.split("||"), h = l[0].trim(); if (h) { var m = (l[1] || "").trim(), w, $ = !1; if (i && h.indexOf("$form.") === 0) { var S = h.split("."); S.shift(), Se(i.value, S[0]) && ($ = !0, w = r ? r({ id: "$form." + S[0] + "_" + i.rule.__fc__.id, getValue: function() { return Ge(i.value, S); } }) : Ge(i.value, S)); } $ || (w = r ? r(h, m) : a.fc.getLoadData(h, m)), u = w, t = t.replaceAll("{{".concat(c, "}}"), w == null ? "" : w); } }), s.length === 1 && o === "{{".concat(s[0], "}}")) return u; } return t; }, loadFetchVar: function(t, r, i) { var a = this, o; i && i.__fc__ && (o = i.__fc__.getParentGroup()); var s = function(c) { return a.loadStrVar(c, r, o ? { rule: i, value: a.subRuleData[o.id] || {} } : null); }; return t.action = s(t.action || ""), ["headers", "data", "query"].forEach(function(u) { if (t[u]) { var c = {}; Object.keys(t[u]).forEach(function(l) { c[s(l)] = s(t[u][l]); }), t[u] = c; } }), t; } }); } var Ni = ["hook:updated", "hook:mounted"]; function iu(n) { ne(n.prototype, { usePage: function() { var t = this, r = this.options.page; if (!!r) { var i = 25, a = au(this.rules); F.Object(r) && (r.first && (i = parseInt(r.first, 10) || i), r.limit && (a = parseInt(r.limit, 10) || a)), ne(this, { first: i, limit: a, pageEnd: this.rules.length <= i }), this.bus.$on("page-end", function() { return t.vm.emit("page-end", t.api); }), this.pageLoad(); } }, pageLoad: function() { var t = this, r = function i() { t.pageEnd ? (t.bus.$off(Ni, i), t.bus.$emit("page-end")) : (t.first += t.limit, t.pageEnd = t.rules.length <= t.first, t.loadRule(), t.refresh()); }; this.bus.$on(Ni, r); } }); } function au(n) { return n.length < 31 ? 31 : Math.ceil(n.length / 3); } function ou(n) { ne(n.prototype, { clearNextTick: function() { this.nextTick && clearTimeout(this.nextTick), this.nextTick = null; }, bindNextTick: function(t) { var r = this; this.clearNextTick(), this.nextTick = setTimeout(function() { t(), r.nextTick = null; }, 10); }, render: function() { return ++this.loadedId, this.vm.setupState.unique > 0 ? this.$render.render() : (this.vm.setupState.unique = 1, []); } }); } function su(n) { Object.defineProperties(n.origin, { __fc__: Or(Te(n), !0) }), n.rule !== n.origin && Object.defineProperties(n.rule, { __fc__: Or(Te(n), !0) }); } function Ga(n, e, t) { var r = Hn(), i = !!e.field; ne(this, { id: r, ref: r, wrapRef: r + "fi", rule: e, origin: e.__origin__ || e, name: e.name, pending: {}, none: !1, watch: [], linkOn: [], root: [], ctrlRule: [], children: [], parent: null, group: e.subRule ? this : null, cacheConfig: null, prop: W({}, e), computed: {}, payload: {}, refRule: {}, input: i, el: void 0, exportEl: void 0, defaultValue: i ? ht(t) : void 0, field: e.field || void 0 }), this.updateKey(), su(this), this.update(n, !0); } ne(Ga.prototype, { getParentGroup: function() { for (var e = this.parent; e; ) { if (e.group) return e; e = e.parent; } }, loadChildrenPending: function() { var e = this, t = this.rule.children || []; return Array.isArray(t) ? t : this.loadPending({ key: "children", origin: t, def: [], onLoad: function(i) { e.$handle && e.$handle.loadChildren(i, e); }, onUpdate: function(i, a) { e.$handle && (i === a ? e.$handle.loadChildren(i, e) : e.$handle.updateChildren(e, i, a)); }, onReload: function(i) { e.$handle ? e.$handle.updateChildren(e, [], i) : delete e.pending.children; } }); }, loadPending: function(e) { var t = this, r = e.key, i = e.origin, a = e.def, o = e.onLoad, s = e.onReload, u = e.onUpdate; if (this.pending[r] && this.pending[r].origin === i) return this.getPending(r, a); delete this.pending[r]; var c = i; if (F.Function(i)) { var l = fe(function() { return i({ rule: t.rule, api: t.$api, update: function(m) { var w = m || a, $ = t.getPending(r, a); t.setPending(r, i, w), u && u(w, $); }, reload: function() { var m = t.getPending(r, a); delete t.pending[r], s && s(m), t.$api && t.$api.sync(t.rule); } }); }); l && F.Function(l.then) ? (l.then(function(h) { var m = h || a; t.setPending(r, i, m), o && o(m), t.$api && t.$api.sync(t.rule); }).catch(function(h) { console.error(h); }), c = a, this.setPending(r, i, c)) : (c = l || a, this.setPending(r, i, c), o && o(c)); } return c; }, getPending: function(e, t) { return this.pending[e] && this.pending[e].value || t; }, setPending: function(e, t, r) { this.pending[e] = { origin: t, value: Be(r) }; }, effectData: function(e) { return this.payload[e] || (this.payload[e] = {}), this.payload[e]; }, clearEffectData: function(e) { e === void 0 ? this.payload = {} : delete this.payload[e]; }, updateKey: function(e) { this.key = Hn(), e && this.parent && this.parent.updateKey(e); }, updateType: function() { this.originType = this.rule.type, this.type = ft(this.rule.type), this.trueType = this.$handle.getType(this.originType); }, setParser: function(e) { this.parser = e, e.init(this); }, initProp: function() { var e = this, t, r, i = W({}, this.rule); delete i.children, delete i.validate, this.prop = $t({}, [i].concat(le(Object.keys(this.payload).map(function(a) { return e.payload[a]; })), [this.computed])), this.prop.validate = [].concat(le(((t = this.refRule) === null || t === void 0 || (r = t.__$validate) === null || r === void 0 ? void 0 : r.value) || []), le(this.prop.validate || [])); }, initNone: function() { this.none = !(F.Undef(this.prop.display) || !!this.prop.display); }, injectValidate: function() { return this.prop.validate; }, check: function(e) { return this.vm === e.vm; }, unwatch: function() { this.watch.forEach(function(e) { return e(); }), this.watch = [], this.refRule = {}; }, unlink: function() { this.linkOn.forEach(function(e) { return e(); }), this.linkOn = []; }, link: function() { this.unlink(), this.$handle.appendLink(this); }, watchTo: function() { this.$handle.watchCtx(this); }, delete: function() { this.unwatch(), this.unlink(), this.rmCtrl(), this.parent && this.parent.children.splice(this.parent.children.indexOf(this) >>> 0, 1), ne(this, { deleted: !0, computed: {}, parent: null, children: [], cacheConfig: null, none: !1 }); }, rmCtrl: function() { this.ctrlRule.forEach(function(e) { return e.__fc__ && e.__fc__.rm(); }), this.ctrlRule = []; }, rm: function() { var e = this, t = function() { var i = e.root.indexOf(e.origin); i > -1 && (e.root.splice(i, 1), e.$handle && e.$handle.refresh()); }; if (this.deleted) { t(); return; } this.$handle.noWatch(function() { e.$handle.deferSyncValue(function() { e.rmCtrl(), t(), e.$handle.rmCtx(e), ne(e, { root: [] }); }, e.input); }); }, update: function(e, t) { ne(this, { deleted: !1, $handle: e, $render: e.$render, $api: e.api, vm: e.vm, vNode: e.$render.vNode, updated: !1, cacheValue: this.rule.value }), !t && this.unwatch(), this.watchTo(), this.link(), this.updateType(); } }); function uu(n) { ne(n.prototype, { nextRefresh: function(t) { var r = this, i = this.loadedId; je(function() { i === r.loadedId && (t ? t() : r.refresh()); }); }, parseRule: function(t) { var r = this, i = ji(t); return Object.defineProperties(i, { __origin__: Or(t, !0) }), lu(i), this.appendValue(i), [i, i.prefix, i.suffix].forEach(function(a) { !a || r.loadFn(a, i); }), this.loadCtrl(i), i.update && (i.update = gt(i.update)), i; }, loadFn: function(t, r) { var i = this; ["on", "props", "deep"].forEach(function(a) { t[a] && i.parseInjectEvent(r, t[a]); }); }, loadCtrl: function(t) { t.control && t.control.forEach(function(r) { r.handle && (r.handle = gt(r.handle)); }); }, syncProp: function(t) { var r = this, i = t.rule; F.trueArray(i.sync) && Rt([{ on: i.sync.reduce(function(a, o) { return a[pe(o) === "object" && o.event || "update:".concat(o)] = function(s) { i.props[pe(o) === "object" && o.prop || o] = s, r.vm.emit("sync", o, s, i, r.fapi); }, a; }, {}) }], t.computed); }, loadRule: function() { var t = this; this.cycleLoad = !1, this.loading = !0, this.pageEnd && this.bus.$emit("load-start"), this.deferSyncValue(function() { if (t._loadRule(t.rules), t.loading = !1, t.cycleLoad && t.pageEnd) return t.loadRule(); t.syncForm(), t.pageEnd && t.bus.$emit("load-end"), t.vm.setupState.renderRule(); }); }, loadChildren: function(t, r) { if (this.cycleLoad = !1, this.loading = !0, this.bus.$emit("load-start"), this._loadRule(t, r), this.loading = !1, this.cycleLoad) return this.loadRule(); this.syncForm(), this.bus.$emit("load-end"), this.$render.clearCache(r); }, _loadRule: function(t, r) { var i = this, a = function u(c) { var l = t[c - 1]; if (!l || !l.__fc__) return c > 0 ? u(c - 1) : -1; var h = i.sort.indexOf(l.__fc__.id); return h > -1 ? h : u(c - 1); }, o = function(c, l) { F.trueArray(c) && i._loadRule(c, l); }, s = t.map(function(u, c) { if (!(r && !F.Object(u)) && !(!i.pageEnd && !r && c >= i.first)) { if (u.__fc__ && u.__fc__.root === t && i.ctxs[u.__fc__.id]) return o(u.__fc__.loadChildrenPending(), u.__fc__), u.__fc__; var l = ji(u), h = function() { return !!(l.field && i.fieldCtx[l.field] && i.fieldCtx[l.field][0] !== u.__fc__); }; i.fc.targetFormDriver("loadRule", { rule: l, api: i.api }, i.fc), i.ruleEffect(l, "init", { repeat: h() }), h() && i.vm.emit("repeat-field", u, i.api); var m, w = !1, $ = !!u.__fc__, S = l.value; if ($) { if (m = u.__fc__, S = m.defaultValue, m.deleted) { if (zi(m)) return; m.update(i); } else if (!m.check(i)) { if (zi(m)) return; t[c] = u = u._clone ? u._clone() : Va(dn(u)), m = null, w = !0; } } if (m) m.originType !== m.rule.type && m.updateType(), i.bindParser(m), i.appendValue(m.rule), m.parent && m.parent !== r && i.rmSubRuleData(m); else { var T = i.parseRule(u); m = new Ga(i, T, S), i.bindParser(m); } i.parseEmit(m), i.syncProp(m), m.parent = r || null, m.root = t, i.setCtx(m), !w && !$ && (i.effect(m, "load"), i.targetHook(m, "load")), i.effect(m, "created"); var U = m.loadChildrenPending(); if (m.parser.loadChildren === !1 || o(U, m), !r) { var z = a(c); z > -1 || !c ? i.sort.splice(z + 1, 0, m.id) : i.sort.push(m.id); } var B = m.rule; return m.updated || (m.updated = !0, F.Function(B.update) && i.bus.$once("load-end", function() { i.refreshUpdate(m, B.value, "init"); }), i.effect(m, "loaded")), i.refreshControl(m) && (i.cycleLoad = !0), m; } }).filter(function(u) { return !!u; }); r && (r.children = s); }, refreshControl: function(t) { return t.input && t.rule.control && this.useCtrl(t); }, useCtrl: function(t) { var r = this, i = cu(t), a = [], o = this.api; if (!i.length) return !1; for (var s = function(w) { var $ = i[w], S = $.handle || function(U) { return (Pt[$.condition || "=="] || Pt["=="])(U, $.value); }; if (!F.trueArray($.rule)) return "continue"; var T = W(W({}, $), {}, { valid: fe(function() { return S(t.rule.value, o); }), ctrl: fu(t, $.rule), isHidden: F.String($.rule[0]) }); if (T.valid && T.ctrl || !T.valid && !T.ctrl && !T.isHidden) return "continue"; a.push(T); }, u = 0; u < i.length; u++) var c = s(u); if (!a.length) return !1; var l = [], h = !1; return this.deferSyncValue(function() { a.reverse().forEach(function(m) { var w = m.isHidden, $ = m.valid, S = m.rule, T = m.prepend, U = m.append, z = m.child, B = m.ctrl, Z = m.method; if (w) { $ ? t.ctrlRule.push({ __ctrl: !0, children: S, valid: $ }) : B && t.ctrlRule.splice(t.ctrlRule.indexOf(B) >>> 0, 1), l[$ ? "push" : "unshift"](function() { Z === "disabled" || Z === "enabled" ? r.api.disabled(!$, S) : Z === "display" || Z === "show" ? r.api.display($, S) : Z === "required" ? (S.forEach(function(ce) { r.api.setEffect(ce, "required", $); }), $ || r.api.clearValidateState(S)) : r.api.hidden(!$, S); }); return; } if ($) { h = !0; var Q = { type: "fragment", native: !0, __ctrl: !0, children: S }; t.ctrlRule.push(Q), r.bus.$once("load-start", function() { T ? o.prepend(Q, T, z) : U || z ? o.append(Q, U || t.id, z) : t.root.splice(t.root.indexOf(t.origin) + 1, 0, Q); }); } else { t.ctrlRule.splice(t.ctrlRule.indexOf(B), 1); var q = bt(B); q && q.rm(); } }); }), l.length && (this.loading ? l.length && this.bus.$once("load-end", function() { l.forEach(function(m) { return m(); }); }) : l.length && je(function() { l.forEach(function(m) { return m(); }); })), this.vm.emit("control", t.origin, this.api), this.effect(t, "control"), h; }, reloadRule: function(t) { return this._reloadRule(t); }, _reloadRule: function(t) { var r = this; t || (t = this.rules); var i = W({}, this.ctxs); this.clearNextTick(), this.initData(t), this.fc.rules = t, this.deferSyncValue(function() { r.bus.$once("load-end", function() { Object.keys(i).filter(function(a) { return r.ctxs[a] === void 0; }).forEach(function(a) { return r.rmCtx(i[a]); }), r.$render.clearCacheAll(); }), r.reloading = !0, r.loadRule(), r.reloading = !1, r.refresh(), r.bus.$emit("reloading", r.api); }), this.bus.$off("next-tick", this.nextReload), this.bus.$once("next-tick", this.nextReload), this.bus.$emit("update", this.api); }, refresh: function() { this.vm.setupState.refresh(); } }); } function lu(n) { var e = za(); return Object.keys(e).forEach(function(t) { Se(n, t) || (n[t] = e[t]); }), n; } function cu(n) { var e = n.rule.control || []; return F.Object(e) ? [e] : e; } function fu(n, e) { for (var t = 0; t < n.ctrlRule.length; t++) { var r = n.ctrlRule[t]; if (r.children === e) return r; } } function zi(n) { return !!n.rule.__ctrl; } function du(n) { ne(n.prototype, { setValue: function(t, r, i, a) { var o = this; t.deleted || (t.rule.value = r, this.changeStatus = !0, this.nextRefresh(), this.$render.clearCache(t), this.setFormData(t, i), this.syncValue(), this.valueChange(t, r), this.vm.emit("change", t.field, r, t.origin, this.api, a || !1), this.effect(t, "value"), this.targetHook(t, "value", { value: r }), this.emitEvent("change", t.field, r, { rule: t.origin, api: this.api, setFlag: a || !1 }), a && je(function() { je(function() { je(function() { o.api.clearValidateState(t.id); }); }); })); }, onInput: function(t, r) { var i; t.input && (this.isQuote(t, i = t.parser.toValue(r, t)) || this.isChange(t, r)) && this.setValue(t, i, r); }, onUpdateValue: function(t, r) { var i = this; this.deferSyncValue(function() { var a = t.getParentGroup(), o = a ? i.subRuleData[a.id] : null, s = {}; Object.keys(r || {}).forEach(function(u) { o && Se(o, u) ? s[u] = r[u] : Se(i.api.form, u) ? i.api.form[u] = r[u] : i.api.top !== i.api && Se(i.api.top.form, u) && (i.api.top.form[u] = r[u]); }), Object.keys(s).length && i.api.setChildrenFormData(a.rule, s); }); }, onBaseInput: function(t, r) { this.setFormData(t, r), t.modelValue = r, this.nextRefresh(), this.$render.clearCache(t); }, setFormData: function(t, r) { t.modelValue = r; var i = t.getParentGroup(); i && (this.subRuleData[i.id] || (this.subRuleData[i.id] = {}), this.subRuleData[i.id][t.field] = t.rule.value), rt(this.formData, t.id, r); }, rmSubRuleData: function(t) { var r = t.getParentGroup(); r && this.subRuleData[r.id] && delete this.subRuleData[r.id][t.field]; }, getFormData: function(t) { return this.formData[t.id]; }, syncForm: function() { var t = this, r = Be({}), i = this.fields(), a = []; this.options.appendValue !== !1 && Object.keys(this.appendData).reduce(function(o, s) { return i.indexOf(s) === -1 && (o[s] = De(t.appendData, s)), o; }, r), i.reduce(function(o, s) { var u = (t.fieldCtx[s] || []).filter(function(c) { return !t.isIgnore(c.rule); })[0] || t.fieldCtx[s][0]; return t.isIgnore(u.rule) && a.push(s), o[s] = De(u.rule, "value"), o; }, r), this.form = r, this.ignoreFields = a, this.syncValue(); }, isIgnore: function(t) { return t.ignore === !0 || t.ignore === "hidden" && t.hidden || this.options.ignoreHiddenFields && t.hidden; }, appendValue: function(t) { (!t.field || !Se(this.appendData, t.field)) && !this.options.forceCoverValue || (t.value = this.appendData[t.field], delete this.appendData[t.field]); }, addSubForm: function(t, r) { this.subForm[t.id] = r; }, deferSyncValue: function(t, r) { this.deferSyncFn || (this.deferSyncFn = t), this.deferSyncFn.sync || (this.deferSyncFn.sync = r), fe(t), this.deferSyncFn === t && (this.deferSyncFn = null, t.sync && this.syncForm()); }, syncValue: function() { var t = this; if (this.deferSyncFn) return this.deferSyncFn.sync = !0; var r = {}; Object.keys(this.form).forEach(function(i) { t.ignoreFields.indexOf(i) === -1 && (r[i] = t.form[i]); }), this.vm.setupState.updateValue(r); }, isChange: function(t, r) { return JSON.stringify(this.getFormData(t), Ui) !== JSON.stringify(r, Ui); }, isQuote: function(t, r) { return (r instanceof Function || F.Object(r) || Array.isArray(r)) && r === t.rule.value; }, refreshUpdate: function(t, r, i, a) { var o = this; if (F.Function(t.rule.update)) { var s = fe(function() { return t.rule.update(r, t.origin, o.api, { origin: i || "change", linkField: a }); }); if (s === void 0) return; t.rule.hidden = s === !0; } }, valueChange: function(t, r) { this.refreshRule(t, r), this.bus.$emit("change-" + t.field, r); }, refreshRule: function(t, r, i, a) { this.refreshControl(t) && (this.$render.clearCacheAll(), this.loadRule(), this.bus.$emit("update", this.api), this.refresh()), this.refreshUpdate(t, r, i, a); }, appendLink: function(t) { var r = this, i = t.rule.link; F.trueArray(i) && i.forEach(function(a) { var o = function() { return r.refreshRule(t, t.rule.value, "link", a); }; r.bus.$on("change-" + a, o), t.linkOn.push(function() { return r.bus.$off("change-" + a, o); }); }); }, fields: function() { return Object.keys(this.fieldCtx); } }); } function Ui(n, e) { return typeof e == "function" ? "" + e : e; } var Rn = { init: function(e) { }, toFormValue: function(e, t) { return e; }, toValue: function(e, t) { return e; }, mounted: function(e) { }, render: function(e, t) { return t.$handle.fc.renderDriver && t.$handle.fc.renderDriver.defaultRender ? t.$handle.fc.renderDriver.defaultRender(t, e) : t.$render.defaultRender(t, e); }, preview: function(e, t) { return t.$handle.fc.renderDriver && t.$handle.fc.renderDriver.defaultPreview ? t.$handle.fc.renderDriver.defaultPreview(t, e) : this.render(e, t); }, mergeProp: function(e) { } }, hu = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"], qi = Symbol("oldValue"); function pu(n) { ne(n.prototype, { getCtx: function(t) { return this.getFieldCtx(t) || this.getNameCtx(t)[0] || this.ctxs[t]; }, getCtxs: function(t) { return this.fieldCtx[t] || this.nameCtx[t] || (this.ctxs[t] ? [this.ctxs[t]] : []); }, setIdCtx: function(t, r, i) { var a = "".concat(i, "Ctx"); this[a][r] ? this[a][r].push(t) : this[a][r] = [t]; }, rmIdCtx: function(t, r, i) { var a = "".concat(i, "Ctx"), o = this[a][r]; if (!o) return !1; var s = o.splice(o.indexOf(t) >>> 0, 1).length > 0; return o.length || delete this[a][r], s; }, getFieldCtx: function(t) { return (this.fieldCtx[t] || [])[0]; }, getNameCtx: function(t) { return this.nameCtx[t] || []; }, setCtx: function(t) { var r = t.id, i = t.field, a = t.name, o = t.rule; this.ctxs[r] = t, a && this.setIdCtx(t, a, "name"), t.input && (this.setIdCtx(t, i, "field"), this.setFormData(t, t.parser.toFormValue(o.value, t)), this.isMounted && !this.reloading && this.vm.emit("change", t.field, o.value, t.origin, this.api)); }, getParser: function(t) { var r = this.fc.parsers, i = this.fc.renderDriver; if (i) { var a = i.parsers || {}, o = a[t.originType] || a[ft(t.type)] || a[t.trueType]; if (o) return o; } return r[t.originType] || r[ft(t.type)] || r[t.trueType] || Rn; }, bindParser: function(t) { t.setParser(this.getParser(t)); }, getType: function(t) { var r = this.fc.CreateNode.aliasMap, i = r[t] || r[ft(t)] || t; return ft(i); }, noWatch: function(t) { this.noWatchFn || (this.noWatchFn = t), fe(t), this.noWatchFn === t && (this.noWatchFn = null); }, watchCtx: function(t) { var r = this, i = ja(); if (i.filter(function(o) { return o[0] !== "_" && o[0] !== "$" && hu.indexOf(o) === -1; }).forEach(function(o) { var s = De(t.rule, o), u = o === "children"; t.refRule[o] = s, t.watch.push(ze(u ? function() { return F.Function(s.value) ? s.value : le(s.value || []); } : function() { return s.value; }, function(c, l) { var h = s.value; if (!r.isBreakWatch()) { if (u && t.parser.loadChildren === !1) { r.$render.clearCache(t), r.nextRefresh(); return; } if (r.watching = !0, je(function() { r.targetHook(t, "watch", { key: o, oldValue: l, newValue: h }); }), o === "hidden" && Boolean(h) !== Boolean(l) && (r.$render.clearCacheAll(), je(function() { r.targetHook(t, "hidden", { value: h }); })), o === "ignore" && t.input || o === "hidden" && t.input && (t.rule.ignore === "hidden" || r.options.ignoreHiddenFields)) r.syncForm(); else if (o === "link") { t.link(); return; } else ["props", "on", "deep"].indexOf(o) > -1 ? (r.parseInjectEvent(t.rule, h || {}), o === "props" && t.input && r.setFormData(t, t.parser.toFormValue(t.rule.value, t))) : o === "emit" ? r.parseEmit(t) : ["prefix", "suffix"].indexOf(o) > -1 ? h && r.loadFn(h, t.rule) : o === "type" ? (t.updateType(), r.bindParser(t)) : u && (F.Function(l) && (l = t.getPending("children", [])), F.Function(h) && (h = t.loadChildrenPending()), r.updateChildren(t, h, l)); r.$render.clearCache(t), r.refresh(), r.watching = !1; } }, { deep: !u, sync: u })); }), t.refRule.__$title = at(function() { var o = (pe(t.rule.title) === "object" ? t.rule.title.title : t.rule.title) || ""; if (o) { var s = o.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/); s && (o = r.api.t(s[1])); } return o; }), t.refRule.__$info = at(function() { var o = (pe(t.rule.info) === "object" ? t.rule.info.info : t.rule.info) || ""; if (o) { var s = o.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/); s && (o = r.api.t(s[1])); } return o; }), t.refRule.__$validate = at(function() { var o = function(u) { var c = u.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/); if (c) { var l, h; return r.api.t(c[1], { title: (l = t.refRule) === null || l === void 0 || (h = l.__$title) === null || h === void 0 ? void 0 : h.value }); } return u; }; return Tt(t.rule.validate).map(function(s) { var u = W({}, s); if (u.message && (u.message = o(u.message)), F.Function(u.validator)) { var c = t; u.validator = function() { for (var h, m = arguments.length, w = new Array(m), $ = 0; $ < m; $++) w[$] = arguments[$]; return (h = s.validator).call.apply(h, [{ that: this, id: c.id, field: c.field, rule: c.rule, api: c.$handle.api }].concat(w)); }; } if (u.adapter) { if (pe(u.error) === "object") { var l = W({}, u.error); Object.keys(l).forEach(function(h) { l[h] = o(l[h]); }), u.error = l; } return r.adapterValidate(u, t); } return u; }); }), t.input) { var a = De(t.rule, "value"); t.watch.push(ze(function() { return a.value; }, function() { var o = t.parser.toFormValue(a.value, t); r.isChange(t, o) && r.setValue(t, a.value, o, !0); })); } this.bus.$once("load-end", function() { var o = t.rule.computed; !o || (pe(o) !== "object" && (o = { value: o }), Object.keys(o).forEach(function(s) { var u = void 0, c = at(function() { var h = o[s]; if (!!h) { var m = r.compute(t, h); return h.linkage && m === qi ? u : m; } }), l = function(m) { s === "value" ? r.onInput(t, m) : s[0] === "$" ? r.api.setEffect(t.id, s, m) : kt(t.rule, s, m); }; (s === "value" ? [void 0, null, ""].indexOf(t.rule.value) > -1 : c.value !== Ge(t.rule, s)) && l(c.value), t.watch.push(ze(c, function(h) { u = h, setTimeout(function() { l(h); }); })); })); }), this.watchEffect(t); }, adapterValidate: function(t, r) { var i = this, a = function(s, u) { var c = t.beforeValidate && fe(function() { return t.beforeValidate({ value: s, api: i.api, validate: t, rule: r.rule }); }); if (c === !1) u(); else { var l = i.validator(s, t); if (l) { var m = ""; pe(t.error) === "object" && (m = t.error[l] || t.error.default), !m && typeof t.message == "string" && (m = t.message), m || (m = i.getValidateMessage(r, { key: l, rule: t[l] })), u(m); } else if (t.validator) { var h = t.validator && fe(function() { return t.validator(s, u); }); h && F.Function(h.then) && h.then(function() { return u(); }).catch(function(w) { return u(w); }); } else u(); } }; return this.$manager.adapterValidate({ required: t.required, message: t.message, target: t.trigger }, a); }, getValidateMessage: function(t, r) { var i, a, o, s = Array.isArray(r.rule) ? r.rule.join(",") : "" + r.rule; return this.api.t(r.key === "required" ? r.key : "validate." + r.key, (o = {}, Le(o, r.key, s), Le(o, "title", (i = t.refRule) === null || i === void 0 || (a = i.__$title) === null || a === void 0 ? void 0 : a.value), o)); }, validator: function(t, r) { var i = F.empty(t); if (i) return r.required ? "required" : void 0; for (var a = function() { var l = os(s[o], 2), h = l[0], m = l[1]; switch (h) { case "len": case "maxLen": case "minLen": var w = function(Q) { return h === "len" ? Q === m : h === "maxLen" ? Q <= m : Q >= m; }; if (Array.isArray(t)) { if (!w(t.length)) return { v: h }; } else { if (pe(t) === "object") return { v: h }; if (!w(("" + t).length)) return { v: h }; } break; case "pattern": var $ = typeof m == "string" ? new RegExp(m) : m; if (!$.test("" + t)) return { v: h }; break; case "uppercase": if (m && (typeof t != "string" || !/^[A-Z]*$/.test(t))) return { v: h }; break; case "lowercase": if (m && (typeof t != "string" || !/^[a-z]*$/.test(t))) return { v: h }; break; case "min": case "max": case "positive": case "negative": case "integer": case "number": var S = Number(t); if (Number.isNaN(S)) return { v: h }; if (h === "min" && S < m) return { v: h }; if (h === "max" && S > m) return { v: h }; if (h === "positive" && S <= 0) return { v: h }; if (h === "negative" && S >= 0) return { v: h }; if (h === "integer" && !Number.isInteger(S)) return { v: h }; break; case "equal": if (t !== m) return { v: h }; break; case "enum": if (Array.isArray(m) && !m.includes(t)) return { v: h }; break; case "hasKeys": if (pe(t) !== "object" || Array.isArray(m) && m.some(function(Z) { return !(Z in t); })) return { v: h }; break; case "email": var T = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; if (!T.test("" + t)) return { v: h }; break; case "url": var U = new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", "i"); if (!U.test("" + t)) return { v: h }; break; case "ip": var z = /^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/; if (!z.test("" + t)) return { v: h }; break; case "phone": var B = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/; if (!B.test("" + t)) return { v: h }; break; } }, o = 0, s = Object.entries(r); o < s.length; o++) { var u = a(); if (pe(u) === "object") return u.v; } }, compute: function(t, r) { var i = this, a; if (pe(r) === "object") { var o = t.getParentGroup(), s = function l(h) { if (h = Array.isArray(h) ? { mode: "AND", group: h } : h, !F.trueArray(h.group)) return !0; for (var m = h.mode === "OR", w = !0, $ = function(z) { var B = h.group[z], Z = void 0, Q = null; if (B.variable) Q = JSON.stringify(i.fc.getLoadData(B.variable) || ""); else if (B.field) Q = Vi(B.field || ""); else if (!B.mode) return { v: !0 }; var q = B.compare; if (q && (q = Vi(q || "")), B.mode ? Z = l(B) : Pt[B.condition] ? F.Function(B.handler) ? Z = fe(function() { return B.handler(i.api, t.rule); }) : Z = fe(function() { return new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", "with($form){with($scope){with(this){with($group){ return $condition['".concat(B.condition, "'](").concat(Q, ", ").concat(q || "$val", "); }}}}")).call(i.api.form, Pt, B.value, i.api.top.form, i.api.top === i.api.scope ? {} : i.api.scope.form, o ? i.subRuleData[o.id] || {} : {}, t.rule); }) : Z = !1, m && Z) return { v: !0 }; m || (w = w && Z); }, S = 0; S < h.group.length; S++) { var T = $(S); if (pe(T) === "object") return T.v; } return m ? !1 : w; }, u = s(r); return u = r.invert === !0 ? !u : u, r.linkage ? u ? fe(function() { return i.computeValue(r.linkage, t, o); }, void 0) : qi : u; } else if (F.Function(r)) a = function() { return r(i.api.form, i.api); }; else { var c = t.getParentGroup(); a = function() { return i.computeValue(r, t, c); }; } return fe(a, void 0); }, computeValue: function(t, r, i) { var a = this, o = this, s = Object.keys(this.fc.formulas).reduce(function(u, c) { return u[c] = function() { for (var l, h = arguments.length, m = new Array(h), w = 0; w < h; w++) m[w] = arguments[w]; return (l = o.fc.formulas[c]).call.apply(l, [{ that: this, rule: r.rule, api: o.api, fc: o.fc }].concat(m)); }, u; }, {}); return fe(function() { return new Function("$formulas", "$form", "$scope", "$group", "$rule", "$api", "with($form){with($scope){with(this){with($group){with($formulas){ return ".concat(t, " }}}}}")).call(a.api.form, s, a.api.top.form, a.api.top === a.api.scope ? {} : a.api.scope.form, i ? a.subRuleData[i.id] || {} : {}, r.rule, a.api); }, void 0); }, updateChildren: function(t, r, i) { var a = this; this.deferSyncValue(function() { i && i.forEach(function(o) { (r || []).indexOf(o) === -1 && o && !F.String(o) && o.__fc__ && o.__fc__.parent === t && a.rmCtx(o.__fc__); }), F.trueArray(r) && (a.loadChildren(r, t), a.bus.$emit("update", a.api)); }); }, rmSub: function(t) { var r = this; F.trueArray(t) && t.forEach(function(i) { i && i.__fc__ && r.rmCtx(i.__fc__); }); }, rmCtx: function(t) { var r = this; if (!t.deleted) { var i = t.id, a = t.field, o = t.input, s = t.name; Dt(this.ctxs, i), Dt(this.formData, i), Dt(this.subForm, i), Dt(this.vm.setupState.ctxInject, i); var u = t.getParentGroup(); u && this.subRuleData[u.id] && Dt(this.subRuleData[u.id], a), t.group && Dt(this.subRuleData, i), o && this.rmIdCtx(t, a, "field"), s && this.rmIdCtx(t, s, "name"), o && !Se(this.fieldCtx, a) && Dt(this.form, a), this.deferSyncValue(function() { if (!r.reloading) { if (t.parser.loadChildren !== !1) { var l = t.getPending("children", t.rule.children); F.trueArray(l) && l.forEach(function(h) { return h.__fc__ && r.rmCtx(h.__fc__); }); } t.root === r.rules && r.vm.setupState.renderRule(); } }, o); var c = this.sort.indexOf(i); return c > -1 && this.sort.splice(c, 1), this.$render.clearCache(t), t.delete(), this.effect(t, "deleted"), this.targetHook(t, "deleted"), o && !this.fieldCtx[a] && this.vm.emit("remove-field", a, t.rule, this.api), t.rule.__ctrl || this.vm.emit("remove-rule", t.rule, this.api), t; } } }); } function mu(n) { ne(n.prototype, { mounted: function() { var t = this, r = function() { t.isMounted = !0, t.lifecycle("mounted"); }; this.pageEnd ? r() : this.bus.$once("page-end", r); }, lifecycle: function(t) { this.fc.targetFormDriver(t, this.api, this.fc), this.vm.emit(t, this.api), this.emitEvent(t, this.api); }, emitEvent: function(t) { for (var r, i = arguments.length, a = new Array(i > 1 ? i - 1 : 0), o = 1; o < i; o++) a[o - 1] = arguments[o]; var s = this.options[t] || this.options[ft("on-" + t)]; if (s) { var u = gt(s); F.Function(u) && fe(function() { return u.apply(void 0, a); }); } (r = this.bus).$emit.apply(r, [t].concat(a)); }, targetHook: function(t, r, i) { var a, o, s = this, u = (a = t.prop) === null || a === void 0 || (o = a.hook) === null || o === void 0 ? void 0 : o[r]; u && (u = Array.isArray(u) ? u : [u], u.forEach(function(c) { fe(function() { return c(W(W({}, i || {}), {}, { self: t.rule, rule: t.rule, $f: s.api, api: s.api, option: s.vm.props.option })); }); })); } }); } function gu(n) { ne(n.prototype, { useProvider: function() { var t = this, r = this.fc.providers; Object.keys(r).forEach(function(i) { var a = r[i]; F.Function(a) && (a = a(t.fc)), a._c = yu(a), t.onEffect(a), t.providers[i] = a; }); }, onEffect: function(t) { var r = this, i = []; (t._c || ["*"]).forEach(function(a) { var o = a === "*" ? "*" : r.getType(a); i.indexOf(o) > -1 || (i.push(o), r.bus.$on("p:".concat(t.name, ":").concat(o, ":").concat(t.input ? 1 : 0), function(s, u) { t[s] && t[s].apply(t, le(u)); })); }), t._used = i; }, watchEffect: function(t) { var r = this, i = { required: function() { var o, s; return (Se(t.rule, "$required") ? t.rule.$required : (o = t.rule) === null || o === void 0 || (s = o.effect) === null || s === void 0 ? void 0 : s.required) || !1; } }; Object.keys(t.rule.effect || {}).forEach(function(a) { i[a] = function() { return t.rule.effect[a]; }; }), Object.keys(t.rule).forEach(function(a) { a[0] === "$" && (i[a.substr(1)] = function() { return t.rule[a]; }); }), Object.keys(i).forEach(function(a) { t.watch.push(ze(i[a], function(o) { r.effect(t, "watch", Le({}, a, o)); }, { deep: !0 })); }); }, ruleEffect: function(t, r, i) { this.emitEffect({ rule: t, input: !!t.field, type: this.getType(t.type) }, r, i); }, effect: function(t, r, i) { this.emitEffect({ rule: t.rule, input: t.input, type: t.trueType, ctx: t, custom: i }, r); }, getEffect: function(t, r) { if (Se(t, "$" + r)) return t["$" + r]; if (Se(t, "effect") && Se(t.effect, r)) return t.effect[r]; }, emitEffect: function(t, r, i) { var a = this, o = t.ctx, s = t.rule, u = t.input, c = t.type, l = t.custom; if (!(!c || ["fcFragment", "fragment"].indexOf(c) > -1)) { var h = l || Object.keys(s).reduce(function(m, w) { return w[0] === "$" && (m[w.substr(1)] = s[w]), m; }, W({}, s.effect || {})); Object.keys(h).forEach(function(m) { var w = a.providers[m]; if (!(!w || w.input && !u)) { var $; if (!w._c) $ = "*"; else if (w._used.indexOf(c) > -1) $ = c; else return; var S = W({ value: h[m], getValue: function() { return a.getEffect(s, m); } }, i || {}); o && (S.getProp = function() { return o.effectData(m); }, S.clearProp = function() { return o.clearEffectData(m); }, S.mergeProp = function(T) { return $t(S.getProp(), [T]); }, S.id = o.id), a.bus.$emit("p:".concat(m, ":").concat($, ":").concat(w.input ? 1 : 0), r, [S, s, a.api]); } }); } } }); } function vu(n) { return n.filter(function(e, t, r) { return r.indexOf(e, 0) === t; }); } function yu(n) { var e = n.components; if (Array.isArray(e)) { var t = vu(e.filter(function(r) { return r !== "*"; })); return t.length ? t : !1; } else return F.String(e) ? [e] : !1; } function yt(n) { var e = this; Na(this, { options: function() { return n.options.value || {}; }, bus: function() { return n.bus; }, preview: function() { return n.vm.props.preview != null ? n.vm.props.preview : n.vm.setupState.parent && n.vm.setupState.parent.props.preview != null ? n.vm.setupState.parent.props.preview : n.options.value.preview || !1; } }), ne(this, { fc: n, vm: n.vm, watching: !1, loading: !1, reloading: !1, noWatchFn: null, deferSyncFn: null, isMounted: !1, formData: Be({}), subRuleData: Be({}), subForm: {}, form: Be({}), appendData: {}, ignoreFields: [], providers: {}, cycleLoad: null, loadedId: 1, nextTick: null, changeStatus: !1, pageEnd: !0, nextReload: function() { e.lifecycle("reload"); } }), this.initData(n.rules), this.$manager = new n.manager(this), this.$render = new Lr(this), this.api = n.extendApiFn.reduce(function(t, r) { var i = fe(function() { return r(t, e); }); return i && i !== t && ne(t, i), t; }, Ks(this)); } ne(yt.prototype, { initData: function(e) { ne(this, { ctxs: {}, fieldCtx: {}, nameCtx: {}, sort: [], rules: e }); }, init: function() { this.updateAppendData(), this.useProvider(), this.usePage(), this.loadRule(), this.$manager.__init(), this.lifecycle("created"); }, updateAppendData: function() { this.appendData = W(W(W({}, this.options.formData || {}), this.fc.vm.props.modelValue || {}), this.appendData); }, isBreakWatch: function() { return this.loading || this.noWatchFn || this.reloading; }, globalBeforeFetch: function(e) { var t = this; return new Promise(function(r, i) { var a = t.options.beforeFetch && fe(function() { return t.options.beforeFetch(e, { api: t.api }); }); a && F.Function(a.then) ? a.then(r).catch(i) : r(); }); }, beforeFetch: function(e) { var t = this; return new Promise(function(r, i) { var a = e && e.beforeFetch && fe(function() { return e.beforeFetch(e, { api: t.api }); }); a && F.Function(a.then) ? a.then(r).catch(i) : a === !1 ? i() : r(); }).then(function() { return t.globalBeforeFetch(e); }); }, beforeSubmit: function(e) { var t = this; return new Promise(function(r, i) { var a = t.options.beforeSubmit && fe(function() { return t.options.beforeSubmit(e, { api: t.api }); }); a && F.Function(a.then) ? a.then(r).catch(i) : a === !1 ? i() : r(); }); } }); ru(yt); iu(yt); ou(yt); uu(yt); du(yt); pu(yt); mu(yt); gu(yt); var _u = "fcFragment", or = he({ name: _u, inheritAttrs: !1, props: ["vnode"], render: function() { return this.vnode; } }); function bu(n) { return Object.keys(n).map(function(e) { var t = n[e], r = Sa(e); if (!!r) return [r, t.value, t.arg, t.modifiers]; }).filter(function(e) { return !!e; }); } function Gi(n, e) { var t = n.directives; return t ? (Array.isArray(t) || (t = [t]), $a(e, t.reduce(function(r, i) { return r.concat(bu(i)); }, []))) : e; } function wu() { var n = {}; function e() { } return ne(e.prototype, { make: function(r, i, a) { return Gi(i, this.h(r, Fi(i), a)); }, makeComponent: function(r, i, a) { try { return Gi(i, H(r, Fi(i), a)); } catch (o) { return console.error(o), H(""); } }, h: function(r, i, a) { var o = vr().appContext.config.isNativeTag(r); o && delete i.formCreateInject; try { return H(o ? r : K(r), i, a); } catch (s) { return console.error(s), H(""); } }, aliasMap: n }), ne(e, { aliasMap: n, alias: function(r, i) { n[r] = i; }, use: function(r) { Object.keys(r).forEach(function(i) { var a = fn(i), o = Qs(i).toLocaleLowerCase(), s = r[i]; [i, a, o].forEach(function(u) { e.alias(i, s), e.prototype[u] = function(c, l) { return this.make(s, c, l); }; }); }); } }), e; } function $u(n) { var e = /* @__PURE__ */ function(t) { ts(i, t); var r = as(i); function i() { return es(this, i), r.apply(this, arguments); } return i; }(Ha); return Object.assign(e.prototype, n), e; } function Ha(n) { ne(this, { $handle: n, vm: n.vm, options: {}, ref: "fcForm", mergeOptionsRule: { normal: ["form", "row", "info", "submitBtn", "resetBtn"] } }), this.updateKey(), this.init(); } ne(Ha.prototype, { __init: function() { var e = this; this.$render = this.$handle.$render, this.$r = function() { var t; return (t = e.$render).renderRule.apply(t, arguments); }; }, updateKey: function() { this.key = Hn(); }, init: function() { }, update: function() { }, beforeRender: function() { }, form: function() { return this.vm.refs[this.ref]; }, adapterValidate: function(e, t) { return e.validator = function(r, i, a) { return t(i, a); }, e; }, getSlot: function(e) { var t = function r(i) { if (i) { var a = i.slots[e]; return a || r(i.setupState.parent); } }; return t(this.vm); }, mergeOptions: function(e, t) { var r = this; return Rt(e.map(function(i) { return r.tidyOptions(i); }), t, this.mergeOptionsRule); }, updateOptions: function(e) { this.$handle.fc.targetFormDriver("updateOptions", e, { handle: this.$handle, api: this.$handle.api }), this.options = this.mergeOptions([e], this.getDefaultOptions()), this.update(); }, tidyOptions: function(e) { return e; }, tidyRule: function(e) { }, mergeProp: function(e) { }, getDefaultOptions: function() { return {}; }, render: function(e) { } }); var Su = function(e) { var t = { name: "loadData", _fn: [], loaded: function(i, a, o) { var s = this; this.deleted(i), je(function() { var u = Tt(i.getValue()), c = []; u.forEach(function(l) { if (l && (l.attr || l.template)) { var h = function(S) { var T; l.template ? T = e.$handle.loadStrVar(l.template, S) : l.handler && F.Function(l.handler) ? T = l.handler(S, a, o) : T = S(l.attr, l.default), l.copy !== !1 && (T = ht(T)); var U = l.modify ? a : i.getProp(); l.to === "child" ? U.children ? U.children[0] = T : U.children = [T] : kt(U, l.to || "options", T), o.sync(a); }, m = function(S) { return h(S); }, w = e.watchLoadData(m); h = xt(h, l.wait || 300), l.watch !== !1 ? c.push(w) : w(); } }), s._fn[i.id] = c; }); }, deleted: function(i) { this._fn[i.id] && (this._fn[i.id].forEach(function(a) { a(); }), delete this._fn[i.id]), i.clearProp(); } }; return t.watch = t.loaded, t; }, Ou = function(e) { var t = { name: "t", _fn: [], loaded: function(i, a, o) { this.deleted(i); var s = i.getValue() || {}, u = []; Object.keys(s).forEach(function(c) { var l = s[c]; if (l) { var h = pe(l) === "object", m = function(T) { var U = e.t(h ? l.attr : l, h ? l.params : null, T), z = h && l.modify ? a : i.getProp(); c === "child" ? z.children ? z.children[0] = U : z.children = [U] : kt(z, c, U), o.sync(a); }, w = function(T) { return m(T); }, $ = e.watchLoadData(w); m = xt(m, l.wait || 300), l.watch !== !1 ? u.push($) : $(); } }), this._fn[i.id] = u; }, deleted: function(i) { this._fn[i.id] && (this._fn[i.id].forEach(function(a) { a(); }), delete this._fn[i.id]), i.clearProp(); } }; return t.watch = t.loaded, t; }, Er = { name: "componentValidate", load: function(e, t, r) { var i = e.getValue(); if (!i || i.method === !1) e.clearProp(), r.clearValidateState([t.field]); else { F.Object(i) || (i = { method: i }); var a = i.method; delete i.method, e.getProp().validate = [W(W({}, i), {}, { validator: function() { var s = bt(t); if (s) { for (var u = arguments.length, c = new Array(u), l = 0; l < u; l++) c[l] = arguments[l]; return r.exec.apply(r, [s.id, F.String(a) ? a : "formCreateValidate"].concat(c, [{ attr: e, rule: t, api: r }])); } } })]; } }, watch: function() { Er.load.apply(Er, arguments); } }, Eu = function(e) { function t(a) { return F.String(a) && (a = { action: a, to: "options" }), a; } function r(a, o, s) { var u = a.value; i.deleted(a), F.Function(u) && (u = u(o, s)), u = t(u); var c = function($) { $ === void 0 ? a.clearProp() : kt(a.getProp(), u.to || "options", $), $ != null && u && u.key && e.$handle.options.globalData[u.key] && e.fetchCache.set(e.$handle.options.globalData[u.key], { status: !0, data: $ }), s.sync(o); }; if (!u || !u.action && !u.key) { c(void 0); return; } if (u = ht(u), u.to || (u.to = "options"), u.key) { var l = e.$handle.options.globalData[u.key]; if (!l) { c(void 0); return; } if (l.type === "static") { c(l.data); return; } else u = W(W({}, u), l); } var h = u.onError, m = function() { if (!a.getValue()) return a.clearProp(), s.sync(o), !0; }; i._fn[a.id] = e.watchLoadData(xt(function(w, $) { if ($ && u.watch === !1) return i._fn[a.id](); var S = e.$handle.loadFetchVar(ht(u), w, o), T = W(W({ headers: {} }, S), {}, { onSuccess: function(z, B) { if (!m()) { var Z = function(ce) { return B ? ce : Se(ce, "data") ? ce.data : ce; }, Q = gt(S.parse); F.Function(Q) ? Z = Q : Q && F.String(Q) && (Z = function(ce) { return Ge(ce, Q); }), c(Z(z, o, s)); } }, onError: function(z) { c(void 0), !m() && (h || function(B) { return Vr(B.message || "fetch fail " + S.action); })(z, o, s); } }); e.$handle.beforeFetch(T, { rule: o, api: s }).then(function() { if (F.Function(S.action)) { S.action(o, s).then(function(U) { T.onSuccess(U, !0); }).catch(function(U) { T.onError(U); }); return; } fe(function() { return e.create.fetch(T, { inject: a, rule: o, api: s }); }); }).catch(function(U) { }); }, u.wait || 600)); } var i = { name: "fetch", _fn: [], loaded: function() { r.apply(void 0, arguments); }, watch: function() { r.apply(void 0, arguments); }, deleted: function(o) { this._fn[o.id] && (this._fn[o.id](), delete this._fn[o.id]), o.clearProp(); } }; return i; }, xu = { fetch: Eu, loadData: Su, t: Ou, componentValidate: Er }; function Cu(n) { n = n || /* @__PURE__ */ new Map(); var e = { $on: function(r, i) { var a = n.get(r), o = a && a.push(i); o || n.set(r, [i]); }, $once: function(r, i) { i._once = !0, e.$on(r, i); }, $off: function(r, i) { var a = n.get(r); a && a.splice(a.indexOf(i) >>> 0, 1); }, $emit: function(r) { for (var i = arguments.length, a = new Array(i > 1 ? i - 1 : 0), o = 1; o < i; o++) a[o - 1] = arguments[o]; (n.get(r) || []).slice().map(function(s) { s._once && (e.$off(r, s), delete s._once), s.apply(void 0, a); }), (n.get("*") || []).slice().map(function(s) { s(r, a); }); } }; return e; } var ku = "html", Au = { name: ku, loadChildren: !1, render: function(e, t) { return t.prop.props.innerHTML = e.default(), t.vNode.make(t.prop.props.tag || "div", t.prop); }, renderChildren: function(e) { return { default: function() { return e.filter(function(r) { return F.String(r); }).join(""); } }; } }; function Du(n) { n = n + "="; for (var e = decodeURIComponent(document.cookie), t = e.split(";"), r = 0; r < t.length; r++) { for (var i = t[r]; i.charAt(0) === " "; ) i = i.substring(1); if (i.indexOf(n) === 0) { i = i.substring(n.length, i.length); try { return JSON.parse(i); } catch { return i; } } } return null; } function Ru(n) { var e = localStorage.getItem(n); if (e) try { return JSON.parse(e); } catch { return e; } return null; } function Pu(n) { var e = sessionStorage.getItem(n); if (e) try { return JSON.parse(e); } catch { return e; } return null; } function Nr(n, e) { if (!e) return null; var t = e.split("."), r = n(t.shift()); return t.length ? r == null ? null : Ge(r, t) : r; } function Mu(n) { return Nr(Du, n); } function Tu(n) { return Nr(Ru, n); } function ju(n) { return Nr(Pu, n); } var Fu = { en: { required: "{title} is required", validate: { url: "{title} is not a valid url", email: "{title} is not a valid email", ip: "{title} {title} is not a valid ip", phone: "{title} {title} is not a valid phone", pattern: "{title} does not match pattern {pattern}", uppercase: "{title} must be all uppercase", lowercase: "{title} must be all lowercased", positive: "{title} is not a positive number", negative: "{title} is not a negative number", equal: "{title} is not equal to {equal}", min: "{title} cannot be less than {min}", max: "{title} cannot be greater than {max}", enum: "{title} must be one of {enum}", hasKeys: "{title} does not contain required fields {hasKeys}", minLen: "{title} must be at least {minLen}", maxLen: "{title} cannot be longer than {maxLen}", len: "{title} must be exactly {len}", integer: "{title} is not an integer", number: "{title} is not an number" } }, "zh-cn": { required: "{title}\u4E0D\u80FD\u4E3A\u7A7A", validate: { url: "{title}\u4E0D\u662F\u6709\u6548\u7684 url \u5730\u5740", email: "{title}\u4E0D\u662F\u6709\u6548\u7684\u90AE\u7BB1\u5730\u5740", ip: "{title}\u4E0D\u662F\u6709\u6548\u7684 IP \u5730\u5740", phone: "{title}\u4E0D\u662F\u6B63\u786E\u7684\u624B\u673A\u53F7", pattern: "{title}\u5FC5\u987B\u5339\u914D {pattern}", uppercase: "{title}\u5FC5\u987B\u5168\u5927\u5199", lowercase: "{title}\u5FC5\u987B\u5168\u5C0F\u5199", positive: "{title}\u4E0D\u662F\u6B63\u6570", negative: "{title}\u4E0D\u662F\u8D1F\u6570", equal: "{title}\u5FC5\u987B\u7B49\u4E8E {equal}", min: "{title}\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E {min}", max: "{title}\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E {max}", enum: "{title}\u5FC5\u987B\u662F {enum} \u4E4B\u4E00", hasKeys: "{title}\u5FC5\u987B\u5305\u542B {hasKeys} \u5B57\u6BB5", minLen: "{title}\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E {minLen}", maxLen: "{title}\u957F\u5EA6\u5FC5\u987B\u5C0F\u4E8E {maxLen}", len: "{title}\u957F\u5EA6\u5FC5\u987B\u4E3A {len}", integer: "{title}\u5FC5\u987B\u4E3A\u6574\u6570", number: "{title}\u5FC5\u987B\u4E3A\u6570\u5B57" } } }; function Iu(n, e) { var t; return arguments.length === 2 ? (t = arguments[1], e = t[n]) : t = arguments[2], { id: e, prop: t }; } function sr() { return Iu.apply(void 0, ["name"].concat(Array.prototype.slice.call(arguments))); } function Vu(n) { var e = n.key || [], t = n.array || [], r = n.normal || []; wr.push.apply(wr, le(e)), Fn.push.apply(Fn, le(t)), In.push.apply(In, le(r)), Ua([].concat(le(e), le(t), le(r))); } var Bu = 1, nt = {}, $n = Symbol("defValue"); function Wa(n) { var e = Le({}, or.name, or), t = {}, r = {}, i = {}, a = {}, o = [], s = [], u = [n.extendApi], c = W({}, xu), l = Xs(), h = { global: {} }, m = n.isMobile === !0, w = Be({ $mobile: m }), $ = wu(), S = {}, T = {}; Vu(n.attrs || {}); function U(A) { var C = nt[A]; if (Array.isArray(C)) return C.map(function(D) { return D.api(); }); if (C) return C.api(); } function z(A) { o.push(A); } function B() { var A = sr.apply(void 0, arguments); A.id && A.prop && (r[A.id] = A.prop); } function Z() { var A = sr.apply(void 0, arguments); A.id && A.prop && (c[A.id] = F.Function(A.prop) ? A.prop : W(W({}, A.prop), {}, { name: A.id })); } function Q(A) { $.use(A); } function q() { var A = sr.apply(void 0, arguments); if (!A.id || !A.prop) return Rn; var C = ft(A.id), D = A.prop, _ = D.merge === !0 ? t[C] : void 0; t[C] = wn(D, _ || Rn), l[C] = Gn(C), D.maker && ne(l, D.maker); } function ce(A, C) { var D; if (F.String(A)) { if (D = A, C === void 0) return e[D]; } else D = A.displayName || A.name, C = A; if (!(!D || !C)) { var _ = ft(D); e[D] = C, e[_] = C, delete $.aliasMap[D], delete $.aliasMap[_], delete t[D], delete t[_], C.formCreateParser && q(D, C.formCreateParser); } } function re() { return Hs(P, e, r); } function ae(A, C) { var D = re(); return Ko({ data: function() { return Be({ rule: A, option: C }); }, render: function() { return qe(D, W({ ref: "fc" }, this.$data)); } }); } function J() { return or; } function G(A, C) { return F.Function(A.install) ? A.install(Oe, C) : F.Function(A) && A(Oe, C), this; } function Oe(A, C) { var D = ae(A, C || {}); o.forEach(function(O) { fe(function() { return O(Oe, D); }); }); var _ = document.createElement("div"); ((C == null ? void 0 : C.el) || document.body).appendChild(_); var E = D.mount(_); return E.$refs.fc.fapi; } wn(Oe, T); function Ye(A) { var C = W({}, n); return A ? C.inherit = { components: e, parsers: t, directives: r, modelFields: i, providers: c, useApps: o, maker: l, formulas: S, loadData: w } : delete C.inherit, Wa(C); } function k(A, C) { i[A] = C; } function b(A, C) { S[A] = C; } function y(A, C) { var D = a[A] || {}, _ = D.parsers || {}; C.parsers && Object.keys(C.parsers).forEach(function(E) { _[E] = wn(C.parsers[E], Rn); }), C.name = A, a[A] = W(W(W({}, D), C), {}, { parsers: _ }); } function d(A) { A && Object.keys(nt).forEach(function(C) { var D = Array.isArray(nt[C]) ? nt[C] : [nt[C]]; D.forEach(function(_) { _.bus.$emit("$loadData." + A); }); }); } function f(A, C) { kt(w, A, C), d(A); } function p(A, C) { var D = function() { for (var E = arguments.length, O = new Array(E), R = 0; R < E; R++) O[R] = arguments[R]; return fe(function() { return C.apply(void 0, O); }); }; D._driver = !0, f(A, D); } function v(A, C) { var D = (A || "").split("."); A = D.shift(); var _ = D.join("."); if (Se(w, A) || (w[A] = $n), w[A] !== $n) { var E = w[A]; return E && E._driver ? E = E(_) : D.length && (E = Ge(E, D)), E == null || E === "" ? C : E; } else return C; } function g(A) { u.push(A); } function x(A) { delete w[A], d(A); } function M(A, C) { s.push({ name: A, callback: C }); } function P(A) { var C = this; ne(this, { id: Bu++, create: Oe, vm: A, manager: $u(n.manager), parsers: t, providers: c, modelFields: i, formulas: S, isMobile: m, rules: A.props.rule, name: A.props.name || Hn(), inFor: A.props.inFor, prop: { components: e, directives: r }, get: null, drivers: a, renderDriver: null, refreshData: d, loadData: w, CreateNode: $, bus: new Cu(), unwatch: [], options: Ot({}), extendApiFn: u, fetchCache: /* @__PURE__ */ new WeakMap(), tmpData: Be({}) }), s.forEach(function(D) { C.bus.$on(D.name, D.callback); }), je(function() { ze(C.options, function() { C.$handle.$manager.updateOptions(C.options.value), C.api().refresh(); }, { deep: !0 }); }), ne(A.appContext.components, e), ne(A.appContext.directives, r), this.$handle = new yt(this), this.name && (this.inFor ? (nt[this.name] || (nt[this.name] = []), nt[this.name].push(this)) : nt[this.name] = this); } P.isMobile = m, ne(P.prototype, { init: function() { var C = this; this.isSub() && this.unwatch.push(ze(function() { return C.vm.setupState.parent.setupState.fc.options.value; }, function() { C.initOptions(), C.$handle.api.refresh(); }, { deep: !0 })), this.vm.props.driver && (this.renderDriver = pe(this.vm.props.driver) === "object" ? this.vm.props.driver : this.drivers[this.vm.props.driver]), !this.renderDriver && this.vm.setupState.parent && (this.renderDriver = this.vm.setupState.parent.setupState.fc.renderDriver), this.renderDriver || (this.renderDriver = this.drivers.default), this.initOptions(), this.$handle.init(); }, targetFormDriver: function(C) { for (var D = this, _ = arguments.length, E = new Array(_ > 1 ? _ - 1 : 0), O = 1; O < _; O++) E[O - 1] = arguments[O]; if (this.renderDriver && this.renderDriver[C]) return fe(function() { var R; return (R = D.renderDriver)[C].apply(R, E); }); }, t: function(C, D, _) { var E = _ ? _("$t." + C) : this.globalLanguageDriver(C); return E == null && (E = ""), E && D && Object.keys(D).forEach(function(O) { var R = new RegExp("{".concat(O, "}"), "g"); E = E.replace(R, D[O]); }), E; }, globalDataDriver: function(C) { var D = this, _ = C.split("."), E = _.shift(), O = this.options.value.globalData && this.options.value.globalData[E]; if (O) { if (O.type === "static") return Ge(O.data, _); var R, j = this.fetchCache.get(O); if (j) { if (j.status && (R = Ge(j.data, _)), !j.loading) return R; j.loading = !1, this.fetchCache.set(O, j); } else this.fetchCache.set(O, { status: !1 }); var Y = xt(function() { se(); var ue = D.fetchCache.get(O); D.options.value.globalData && Object.values(D.options.value.globalData).indexOf(O) !== -1 ? (ue && (ue.loading = !0, D.fetchCache.set(O, ue)), D.bus.$emit("$loadData.$globalData." + E)) : D.fetchCache.delete(O); }, O.wait || 600), X = function(ge) { D.fetchCache.set(O, { status: !0, data: ge }), D.bus.$emit("$loadData.$globalData." + E); }, ie = function(ge, Ee) { if (Ee && O.watch === !1) return se(); if (Ee) { Y(); return; } var be = D.$handle.loadFetchVar(br(O), ge); D.$handle.api.fetch(be).then(function(de) { X(de); }).catch(function(de) { X(null); }); }, se = this.watchLoadData(ie); return this.unwatch.push(se), R; } }, getLocale: function() { var C = this.vm.setupState.top.props.locale; return C && pe(C) === "object" ? C.name : typeof C == "string" ? C : "zh-cn"; }, globalLanguageDriver: function(C) { var D = this.vm.setupState.top.props.locale, _ = void 0; if (D && pe(D) === "object" && (_ = Ge(D, C)), _ == null) { var E = this.options.value.language || {}, O = this.getLocale(); _ = Ge(E[O] || {}, C), _ == null && (_ = Ge(Fu[O] || {}, C)); } return _; }, globalVarDriver: function(C) { var D = this, _ = C.split("."), E = _.shift(), O = this.options.value.globalVariable && this.options.value.globalVariable[E]; if (O) { var R = F.Function(O) ? O : gt(O.handle); if (R) { var j, Y = this.watchLoadData(function(X, ie) { ie ? (D.bus.$emit("$loadData.$var." + E), Y()) : j = R(X, D.$handle.api); }); return this.unwatch.push(Y), Ge(j, _); } } }, setData: function(C, D, _) { _ ? f(C, D) : (kt(this.vm.setupState.top.setupState.fc.tmpData, C, D), this.bus.$emit("$loadData." + C)); }, getLoadData: function(C, D) { var _ = null; if (C != null) { var E = C.split("."), O = E.shift(); if (O === "$topForm") _ = this.$handle.api.top.formData(!0); else if (O === "$scopeForm") _ = this.$handle.api.scope.formData(!0); else if (O === "$form") _ = this.$handle.api.formData(!0); else if (O === "$options") _ = this.options.value; else if (O === "$globalData") _ = this.globalDataDriver(E.join(".")), E = []; else if (O === "$var") _ = this.globalVarDriver(E.join(".")), E = []; else if (O === "$locale") _ = this.getLocale(), E = []; else if (O === "$t") _ = this.globalLanguageDriver(E.join(".")), E = []; else { if (O === "$preview") return this.$handle.preview; var R = this.vm.setupState.top.setupState.fc.tmpData; Se(R, O) || (R[O] = $n), _ = R[O] !== $n ? Ge(R, C) : v(C), E = []; } _ && E.length && (_ = Ge(_, E)); } return _ == null || _ === "" ? D : _; }, watchLoadData: function(C, D) { var _ = this, E = {}, O = function(X) { _.get || (_.get = R), fe(function() { C(R, X); }), _.get === R && (_.get = void 0); }, R = function(X, ie) { var se; if (pe(X) === "object" && (se = X.getValue, X = X.id), E[X]) return E[X].val; var ue = at(function() { return se ? se() : _.getLoadData(X, ie); }), ge = X.split("."), Ee = ge.shift(), be = ge.shift() || "", de = xt(function() { var te = se ? se() : _.getLoadData(X, ie); if (E[X]) JSON.stringify(te) !== JSON.stringify(E[X].val) && (E[X].val = te, O(!0)); else return; }, D || 0), ve = ze(ue, function(te) { de(); }); return _.bus.$on("$loadData." + Ee, de), be && _.bus.$on("$loadData." + Ee + "." + be, de), E[X] = { fn: function() { _.bus.$off("$loadData." + Ee, de), be && _.bus.$off("$loadData." + Ee + "." + be, de), ve(); }, val: ue.value }, ue.value; }; O(!1); var j = function() { Object.keys(E).forEach(function(X) { return E[X].fn(); }), E = {}; }; return this.unwatch.push(j), j; }, isSub: function() { return this.vm.setupState.parent && this.vm.props.extendOption; }, initOptions: function() { this.options.value = {}; var C = W({ formData: {}, submitBtn: {}, resetBtn: {}, globalEvent: {}, globalData: {} }, ht(h)); this.isSub() && (C = this.mergeOptions(C, this.vm.setupState.parent.setupState.fc.options.value || {}, !0)), C = this.mergeOptions(C, this.vm.props.option), this.updateOptions(C); }, mergeOptions: function(C, D, _) { return D = W({}, D || {}), _ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach(function(E) { delete D[E]; }), D.global && (C.global = qs(C.global, D.global), delete D.global), this.$handle.$manager.mergeOptions([D], C), C; }, updateOptions: function(C) { this.options.value = this.mergeOptions(this.options.value, C), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options"); }, api: function() { return this.$handle.api; }, render: function() { return this.$handle.render(); }, mounted: function() { this.$handle.mounted(); }, unmount: function() { var C = this; if (this.name) if (this.inFor) { var D = nt[this.name].indexOf(this); nt[this.name].splice(D, 1); } else delete nt[this.name]; s.forEach(function(_) { C.bus.$off(_.name, _.callback); }), this.tmpData = {}, this.unwatch.forEach(function(_) { return _(); }), this.unwatch = [], this.$handle.reloadRule([]); }, updated: function() { var C = this; this.$handle.bindNextTick(function() { return C.bus.$emit("next-tick", C.$handle.api); }); } }); function N(A) { ne(A, { version: n.version, ui: n.ui, isMobile: m, extendApi: g, getData: v, setDataDriver: p, setData: f, removeData: x, refreshData: d, maker: l, component: ce, directive: B, setModelField: k, setFormula: b, setDriver: y, register: Z, $vnode: J, parser: q, use: G, factory: Ye, componentAlias: Q, copyRule: Ba, copyRules: La, mergeRule: $t, fetch: qa, $form: re, parseFn: gt, parseJson: Va, toJson: dn, useApp: z, getApi: U, on: M }); } function I(A) { ne(A, { create: Oe, install: function(D, _) { h = W(W({}, h), _ || {}); var E = "_installedFormCreate_" + n.ui; if (D[E] !== !0) { D[E] = !0; var O = function(Y) { var X = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; return Oe(Y, X); }; N(O), D.config.globalProperties.$formCreate = O; var R = re(); D.component(R.name, R), o.forEach(function(j) { fe(function() { return j(A, D); }); }); } } }); } if (N(T), I(T), p("$cookie", Mu), p("$localStorage", Tu), p("$sessionStorage", ju), $.use({ fragment: "fcFragment" }), n.install && Oe.use(n), z(function(A, C) { C.mixin({ props: ["formCreateInject"] }); }), q(Au), n.inherit) { var V = n.inherit; V.components && ne(e, V.components), V.parsers && ne(t, V.parsers), V.directives && ne(r, V.directives), V.modelFields && ne(i, V.modelFields), V.providers && ne(c, V.providers), V.useApps && ne(o, V.useApps), V.maker && ne(l, V.maker), V.loadData && ne(w, V.loadData), V.formulas && ne(S, V.formulas); } var L = re(); return wn(L, T), Object.defineProperties(L, { fetch: { get: function() { return T.fetch; }, set: function(C) { T.fetch = C; } } }), L.util = T, L; } var ur = "hidden", Lu = { name: ur, maker: Le({}, ur, function(n, e) { return Gn(ur)("", n, e); }), render: function() { return []; } }, Nu = { name: "FcRow", render: function(e, t) { return t.vNode.col({ props: { span: 24 } }, { default: function() { return [t.vNode.row(t.prop, e)]; } }); } }, zu = { name: "checkbox", mergeProp: function(e) { var t = e.prop.props; Se(t, "options") || (t.options = e.prop.options || []); } }, Uu = { name: "radio", mergeProp: function(e) { var t = e.prop.props; Se(t, "options") || (t.options = e.prop.options || []); } }, qu = { name: "select", mergeProp: function(e) { var t = e.prop.props; Se(t, "options") || (t.options = e.prop.options || []); } }, Gu = { name: "cascader", mergeProp: function(e) { var t = e.prop.props; Se(t, "options") || (t.options = e.prop.options || []); } }, Hu = [Lu, Nu, Gu, zu, Uu, qu], Qe = "van", Wu = { button: Qe + "-button", icon: Qe + "-icon", slider: Qe + "-slider", stepper: Qe + "-stepper", rate: Qe + "-rate", uploader: "fc-uploader", cell: Qe + "-cell", timePicker: "fc-time-picker", datePicker: "fc-date-picker", switch: Qe + "-switch", select: "fc-select", cascader: "fc-cascader", calendar: "fc-calendar", checkbox: "fc-checkbox", radio: "fc-radio", input: Qe + "-field", field: Qe + "-field", formItem: Qe + "-field", form: Qe + "-form", col: Qe + "-col", row: Qe + "-row", group: "fc-group", array: "fc-group", object: "fc-sub-form", subForm: "fc-sub-form" }; function Yu() { return { form: { required: "auto", labelAlign: "right", inputAlign: "right" }, row: { show: !0, gutter: 0 }, submitBtn: { type: "primary", loading: !1, disabled: !1, block: !0, innerText: "", size: "small", show: !0, col: void 0, click: void 0 }, resetBtn: { type: "default", loading: !1, disabled: !1, block: !0, innerText: "", size: "small", show: !1, col: void 0, click: void 0 } }; } function Hi(n, e) { if (!!Se(n, e) && F.String(n[e])) { var t; n[e] = (t = {}, Le(t, e, n[e]), Le(t, "show", !0), t); } } function _t(n) { return n === !1; } function Xu(n, e) { Se(n, e) && !F.Object(n[e]) && (n[e] = { show: !!n[e] }); } function Wi(n) { var e = W({}, n); return delete e.children, e; } var Ju = { validate: function() { var e = this.form(); return e ? e.validate() : new Promise(function(t) { return t(); }); }, validateField: function(e) { var t = this; return new Promise(function(r, i) { var a = t.form(); a ? a.validate(e).then(r).catch(i) : r(); }); }, clearValidateState: function(e) { var t = this.form(); if (t) return t.resetValidation(e.id); }, tidyOptions: function(e) { return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach(function(t) { Xu(e, t); }), e; }, tidyRule: function(e) { var t = e.prop; return Hi(t, "title"), Hi(t, "info"), t.validate && t.validate.forEach(function(r) { F.String(r.pattern) && (r.pattern = new RegExp(r.pattern)); }), t; }, mergeProp: function(e) { var t = this, r = { info: { icon: !0 }, title: {}, col: { span: 24 }, wrap: {} }; ["info", "wrap", "col", "title"].forEach(function(i) { e.prop[i] = Rt([t.options[i] || {}, e.prop[i] || {}], r[i]); }); }, getDefaultOptions: function() { return Yu(); }, adapterValidate: function(e, t) { return e.trigger === "change" ? e.trigger = "onChange" : e.trigger === "blur" && (e.trigger = "onBlur"), e.validator = function(r) { return new Promise(function(i) { var a = function(s) { e.message = s, s ? i(!1) : i(); }; return t(r, a); }); }, e; }, update: function() { var e = this.options.form; this.rule = { props: W({}, e), on: { submit: function(r) { r.preventDefault(); } }, style: e.style, type: "form" }; }, beforeRender: function() { var e = this.key, t = this.ref, r = this.options.form; ne(this.rule, { key: e, ref: t, class: [r.className, r.class, "form-create-m", this.$handle.preview ? "is-preview" : ""] }); }, render: function(e) { var t = this; return e.slotLen() && !this.$handle.preview && e.setSlot(void 0, function() { return t.makeFormBtn(); }), this.$r(this.rule, _t(this.options.row.show) ? e.getSlots() : [this.makeRow(e)]); }, makeWrap: function(e, t) { var r = this, i = e.prop, a = "".concat(this.key).concat(e.key), o = i.col, s = this.isTitle(i) && i.wrap.title !== !1, u = this.rule.props.col; delete i.wrap.title; var c = _t(i.wrap.show) ? t : this.$r(Rt([i.wrap, { props: W(W({ modelValue: e.rule.value, label: s ? i.title.title : void 0 }, Wi(i.wrap || {})), {}, { name: e.id, rules: e.injectValidate() }), class: this.$render.mergeClass(i.className, "fc-form-item"), key: "".concat(a, "fi"), ref: e.wrapRef, type: "formItem" }]), W({ input: function() { return t; } }, s ? { label: function() { return r.makeInfo(i, a, e); } } : {})); return _t(u) || _t(o.show) ? c : this.makeCol(i, a, [c]); }, isTitle: function(e) { if (this.options.form.title === !1) return !1; var t = e.title; return !(!t.title && !t.native || _t(t.show)); }, makeInfo: function(e, t, r) { var i, a, o, s, u = W({}, e.title), c = W({}, e.info), l = this.getSlot("title"), h = [l ? l({ title: (i = r.refRule) === null || i === void 0 || (a = i.__$title) === null || a === void 0 ? void 0 : a.value, rule: r.rule, options: this.options }) : (o = r.refRule) === null || o === void 0 || (s = o.__$title) === null || s === void 0 ? void 0 : s.value], m = !_t(c.show) && (c.info || c.native) && !_t(c.icon); m && h[c.align !== "left" ? "unshift" : "push"](this.$r({ type: c.icon === !0 ? "icon-warning" : c.icon, style: "width:1em;" })); var w = Rt([u, { props: Wi(u), key: "".concat(t, "tit"), class: "fc-form-title", type: u.type || "span" }]); return m && c.info && !w.props.onClick && (w.props.onClick = function() { var $, S; Ca({ type: "warning", message: ($ = r.refRule) === null || $ === void 0 || (S = $.__$info) === null || S === void 0 ? void 0 : S.value, duration: 1e3 }); }), delete w.props.show, delete w.props.title, delete w.props.native, this.$r(w, h); }, makeCol: function(e, t, r) { var i = e.col; return this.$r({ class: this.$render.mergeClass(i.class, "fc-form-col"), type: "col", props: i || { span: 24 }, key: "".concat(t, "col") }, r); }, makeRow: function(e) { var t = this.options.row || {}; return this.$r({ type: "row", props: t, class: this.$render.mergeClass(t.class, "fc-form-row"), key: "".concat(this.key, "row") }, e); }, makeFormBtn: function() { var e = []; if (_t(this.options.submitBtn.show) || e.push(this.makeSubmitBtn()), _t(this.options.resetBtn.show) || e.push(this.makeResetBtn()), !!e.length) return this.$r({ type: "cell", class: "fc-form-cell fc-form-footer", key: "".concat(this.key, "fb") }, e); }, makeResetBtn: function() { var e = this, t = W({}, this.options.resetBtn), r = t.innerText || this.$handle.api.t("reset") || "\u91CD\u7F6E"; return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({ type: "button", props: t, class: "fc-reset-btn", style: { width: t.width }, on: { click: function() { var a = e.$handle.api; e.options.resetBtn.click ? e.options.resetBtn.click(a) : a.resetFields(); } }, key: "".concat(this.key, "b2") }, [r]); }, makeSubmitBtn: function() { var e = this, t = W({}, this.options.submitBtn), r = t.innerText || this.$handle.api.t("submit") || "\u63D0\u4EA4"; return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({ type: "button", props: t, class: "fc-submit-btn", style: { width: t.width }, on: { click: function() { var a = e.$handle.api; e.options.submitBtn.click ? e.options.submitBtn.click(a) : a.submit().catch(function() { }); } }, key: "".concat(this.key, "b1") }, [r]); } }; function Ku(n, e) { e === void 0 && (e = {}); var t = e.insertAt; if (!(!n || typeof document > "u")) { var r = document.head || document.getElementsByTagName("head")[0], i = document.createElement("style"); i.type = "text/css", t === "top" && r.firstChild ? r.insertBefore(i, r.firstChild) : r.appendChild(i), i.styleSheet ? i.styleSheet.cssText = n : i.appendChild(document.createTextNode(n)); } } var Zu = '.form-create-m{width:100%}.form-create-m .fc-none,.form-create-m.is-preview .fc-clock{display:none!important}.form-create-m .van-field:has(.van-field__value>.van-field__body>.van-field__control>.van-field):after{display:none}.form-create-m .van-field>.van-field__value>.van-field__body>.van-field__control>*>.van-field:after,.form-create-m .van-field>.van-field__value>.van-field__body>.van-field__control>.van-field:after{display:block;left:0;right:0}.form-create-m .fc-form-item>.van-field__value>.van-field__body>.van-field__control>.van-cell{padding:0}.form-create-m .fc-form-item .fc-form-item{--van-padding-md:0;padding-left:0;padding-right:0}.form-create-m>.van-row>.van-col--24:last-of-type>.van-cell:last-of-type:after{display:none}.form-create-m .fc-reset-btn{margin-top:12px}.form-create-m .fc-form-title{align-items:center;display:inline-flex}.form-create-m.is-preview .van-field__label--required:before{display:none}._fc-m-group{align-items:flex-end;display:flex;flex-direction:column;justify-content:center;min-height:38px;width:100%}._fc-m-group-disabled ._fc-m-group-add,._fc-m-group-disabled ._fc-m-group-btn{cursor:not-allowed}._fc-m-group-handle{background-color:#fff;border:1px dashed #d9d9d9;border-radius:15px;bottom:-15px;display:flex;flex-direction:row;padding:3px 8px;position:absolute;right:30px;transform:scale(1.1)}._fc-m-group-btn{cursor:pointer}._fc-m-group-idx{align-items:center;background:#eee;border-radius:15px;bottom:-15px;display:flex;font-weight:700;height:30px;justify-content:center;left:10px;position:absolute;width:30px}._fc-m-group-handle ._fc-m-group-btn+._fc-m-group-btn{margin-left:7px}._fc-m-group-container{border:1px dashed #d9d9d9;border-radius:5px;box-sizing:border-box;display:flex;flex-direction:column;margin-bottom:25px;padding:5px 5px 25px;position:relative;width:100%}._fc-m-group-arrow{height:20px;position:relative;width:20px}._fc-m-group-arrow:before{border-left:2px solid #999;border-top:2px solid #999;content:"";height:9px;left:5px;position:absolute;top:8px;transform:rotate(45deg);width:9px}._fc-m-group-arrow._fc-m-group-down{transform:rotate(180deg)}._fc-m-group-plus-minus{cursor:pointer;height:20px;position:relative;width:20px}._fc-m-group-plus-minus:after,._fc-m-group-plus-minus:before{background-color:#409eff;content:"";height:2px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:60%}._fc-m-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-m-group-plus-minus._fc-m-group-minus:before{display:none}._fc-m-group-plus-minus._fc-m-group-minus:after{background-color:#f56c6c}._fc-m-group-add{border:1px solid rgba(64,158,255,.5);border-radius:15px;cursor:pointer;height:25px;transform:scale(1.1);width:25px}._fc-m-group-add._fc-m-group-plus-minus:after,._fc-m-group-add._fc-m-group-plus-minus:before{width:50%}'; Ku(Zu); function Yi(n, e) { return F.Boolean(n) ? n = { show: n } : !F.Undef(n) && !F.Object(n) && (n = { show: e }), n; } function Qu(n, e) { return { formEl: function() { return e.$manager.form(); }, wrapEl: function(r) { var i = e.getFieldCtx(r); if (!!i) return e.vm.refs[i.wrapRef]; }, validate: function(r) { return new Promise(function(i, a) { var o = n.children, s = [e.$manager.validate()]; o.filter(function(u) { return !u.isScope; }).forEach(function(u) { s.push(u.validate()); }), Promise.all(s).then(function() { i(!0), r && r(!0); }).catch(function(u) { a(u), r && r(u), e.vm.emit("validate-fail", u, { api: n }); }); }); }, validateField: function(r, i) { return new Promise(function(a, o) { var s = e.getFieldCtx(r); if (!!s) { var u = e.subForm[s.id], c = [e.$manager.validateField(s.id)]; Tt(u).filter(function(l) { return !l.isScope; }).forEach(function(l) { c.push(l.validate()); }), Promise.all(c).then(function() { a(null), i && i(null); }).catch(function(l) { o(l), i && i(l), e.vm.emit("validate-field-fail", l, { field: r, api: n }); }); } }); }, clearValidateState: function(r) { var i = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; n.helper.tidyFields(r).forEach(function(o) { a && i.clearSubValidateState(o), e.getCtxs(o).forEach(function(s) { e.$manager.clearValidateState(s); }); }); }, clearSubValidateState: function(r) { n.helper.tidyFields(r).forEach(function(i) { e.getCtxs(i).forEach(function(a) { var o = e.subForm[a.id]; !o || (Array.isArray(o) ? o.forEach(function(s) { s.clearValidateState(); }) : o && o.clearValidateState()); }); }); }, btn: { loading: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; n.submitBtnProps({ loading: !!r }); }, disabled: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; n.submitBtnProps({ disabled: !!r }); }, show: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; n.submitBtnProps({ show: !!r }); } }, resetBtn: { loading: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; n.resetBtnProps({ loading: !!r }); }, disabled: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; n.resetBtnProps({ disabled: !!r }); }, show: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; n.resetBtnProps({ show: !!r }); } }, submitBtnProps: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = Yi(e.options.submitBtn, !0); ne(i, r), e.options.submitBtn = i, n.refreshOptions(); }, resetBtnProps: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = Yi(e.options.resetBtn, !1); ne(i, r), e.options.resetBtn = i, n.refreshOptions(); }, submit: function(r, i) { return new Promise(function(a, o) { var s = e.options.validateOnSubmit === !1 ? Promise.resolve() : n.validate(); s.then(function() { var u = n.formData(); e.beforeSubmit(u).then(function() { F.Function(r) && fe(function() { return r(u, n); }), F.Function(e.options.onSubmit) && fe(function() { return e.options.onSubmit(u, n); }), e.vm.emit("submit", u, n), a(u); }).catch(function(c) { }); }).catch(function() { for (var u = arguments.length, c = new Array(u), l = 0; l < u; l++) c[l] = arguments[l]; F.Function(i) && fe(function() { return i.apply(void 0, [n].concat(c)); }), o.apply(void 0, c); }); }); } }; } var xr = { name: "required", load: function(e, t, r) { var i = el(e.getValue()); if (i.required === !1) e.clearProp(), r.clearValidateState([t.field]); else { var a, o, s = W({ required: !0, validator: function(h) { return !F.empty(h); }, trigger: ["onChange", "onSubmit"] }, i), u = (a = t.__fc__.refRule) === null || a === void 0 || (o = a.__$title) === null || o === void 0 ? void 0 : o.value; if (!s.message) s.message = r.t("required", { title: u }) || u + (r.getLocale() === "en" ? " is required" : "\u4E0D\u80FD\u4E3A\u7A7A"); else { var c = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/); c && (s.message = r.t(c[1], { title: u })); } e.getProp().validate = [s]; } r.sync(t); }, watch: function() { xr.load.apply(xr, arguments); } }; function el(n) { return F.Boolean(n) ? { required: n } : F.String(n) ? { message: n } : F.Undef(n) ? { required: !1 } : F.Function(n) ? { validator: n } : F.Object(n) ? n : {}; } function tl(n) { n.componentAlias(Wu), Ls.forEach(function(e) { n.component(e.name, e); }), n.register(xr), Hu.forEach(function(e) { n.parser(e); }), Ri.props && (Ri.props.modelValue = { type: [String, Number, Array, Object, Boolean], default: "" }); } function nl() { return Wa({ ui: "vant", version: "3.2.22", manager: Ju, extendApi: Qu, install: tl, isMobile: !0, attrs: { normal: ["col", "wrap"], key: ["title", "info"] } }); } var _e = nl(); typeof window < "u" && (window.formCreateMobile = _e); _e.maker; /*! * @form-create/component-elm-select v3.2.18 * (c) 2018-2025 xaboy * Github https://github.com/xaboy/form-create with select * Released under the MIT License. */ function Xi(n, e) { var t = Object.keys(n); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(n); e && (r = r.filter(function(i) { return Object.getOwnPropertyDescriptor(n, i).enumerable; })), t.push.apply(t, r); } return t; } function rl(n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? Xi(Object(t), !0).forEach(function(r) { il(n, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Xi(Object(t)).forEach(function(r) { Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r)); }); } return n; } function Pn(n) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Pn = function(e) { return typeof e; } : Pn = function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Pn(n); } function il(n, e, t) { return e in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n; } function al(n, e) { return Object.keys(n).reduce(function(t, r) { return (!e || e.indexOf(r) === -1) && (t[r] = n[r]), t; }, {}); } var Vn = { type: function(e, t) { return Object.prototype.toString.call(e) === "[object " + t + "]"; }, Undef: function(e) { return e == null; }, Element: function(e) { return Pn(e) === "object" && e !== null && e.nodeType === 1 && !Vn.Object(e); }, trueArray: function(e) { return Array.isArray(e) && e.length > 0; }, Function: function(e) { var t = this.getType(e); return t === "Function" || t === "AsyncFunction"; }, getType: function(e) { var t = Object.prototype.toString.call(e); return /^\[object (.*)\]$/.exec(t)[1]; }, empty: function(e) { return e == null || Array.isArray(e) && Array.isArray(e) && !e.length ? !0 : typeof e == "string" && !e; } }; ["Date", "Object", "String", "Boolean", "Array", "Number"].forEach(function(n) { Vn[n] = function(e) { return Vn.type(e, n); }; }); function ol(n, e) { return {}.hasOwnProperty.call(n, e); } var sl = "fcSelect", ul = he({ name: sl, inheritAttrs: !1, props: { formCreateInject: Object, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, type: String }, emits: ["update:modelValue", "fc.el"], setup: function(e) { var t = De(e.formCreateInject, "options", []), r = De(e, "modelValue"), i = function() { return Array.isArray(t.value) ? t.value : []; }; return { options: i, value: r }; }, render: function() { var e = this, t, r, i = function(u, c) { return H(K("ElOption"), Pe(u, { key: "" + c + "-" + u.value }), null); }, a = function(u, c) { return H(K("ElOptionGroup"), { label: u.label, key: "" + c + "-" + u.label }, { default: function() { return [Vn.trueArray(u.options) && u.options.map(function(h, m) { return i(h, m); })]; } }); }, o = this.options(); return H(K("ElSelect"), Pe(this.$attrs, { modelValue: this.value, "onUpdate:modelValue": function(u) { return e.$emit("update:modelValue", u); }, ref: "el" }), rl({ default: function() { return [o.map(function(u, c) { return ol(u || "", "options") ? a(u, c) : i(u, c); }), (t = (r = e.$slots).default) === null || t === void 0 ? void 0 : t.call(r)]; } }, al(this.$slots, ["default"]))); }, mounted: function() { this.$emit("fc.el", this.$refs.el); } }); /*! * @form-create/component-elm-tree v3.2.18 * (c) 2018-2025 xaboy * Github https://github.com/xaboy/form-create with tree * Released under the MIT License. */ function ll(n) { return Array.isArray(n) ? n : [null, void 0, ""].indexOf(n) > -1 ? [] : [n]; } var cl = "fcTree", fl = he({ name: cl, inheritAttrs: !1, formCreateParser: { mergeProp: function(e) { var t = e.prop.props; t.nodeKey || (t.nodeKey = "id"), t.props || (t.props = { label: "title" }); } }, props: { type: String, modelValue: { type: [Array, String, Number], default: function() { return []; } } }, emits: ["update:modelValue", "fc.el"], watch: { modelValue: function() { this.setValue(); } }, methods: { updateValue: function() { if (!!this.$refs.tree) { var e; this.type === "selected" ? e = this.$refs.tree.getCurrentKey() : e = this.$refs.tree.getCheckedKeys(), this.$emit("update:modelValue", e); } }, setValue: function() { if (!!this.$refs.tree) { var e = this.type; e === "selected" ? this.$refs.tree.setCurrentKey(this.modelValue) : this.$refs.tree.setCheckedKeys(ll(this.modelValue)); } } }, render: function() { return H(K("ElTree"), Pe(this.$attrs, { ref: "tree", onCheck: this.updateValue, onNodeClick: this.updateValue }), this.$slots); }, mounted: function() { this.setValue(), this.$emit("fc.el", this.$refs.tree); } }); /*! * @form-create/component-elm-upload v3.2.18 * (c) 2018-2025 xaboy * Github https://github.com/xaboy/form-create with upload * Released under the MIT License. */ function Ji(n, e) { var t = Object.keys(n); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(n); e && (r = r.filter(function(i) { return Object.getOwnPropertyDescriptor(n, i).enumerable; })), t.push.apply(t, r); } return t; } function Cr(n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? Ji(Object(t), !0).forEach(function(r) { dl(n, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Ji(Object(t)).forEach(function(r) { Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r)); }); } return n; } function Mn(n) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Mn = function(e) { return typeof e; } : Mn = function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Mn(n); } function dl(n, e, t) { return e in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n; } function Sn(n) { return Array.isArray(n) ? n : [null, void 0, ""].indexOf(n) > -1 ? [] : [n]; } function hl(n, e) { return Object.keys(n).reduce(function(t, r) { return (!e || e.indexOf(r) === -1) && (t[r] = n[r]), t; }, {}); } function pl(n, e) { e === void 0 && (e = {}); var t = e.insertAt; if (!(!n || typeof document > "u")) { var r = document.head || document.getElementsByTagName("head")[0], i = document.createElement("style"); i.type = "text/css", t === "top" && r.firstChild ? r.insertBefore(i, r.firstChild) : r.appendChild(i), i.styleSheet ? i.styleSheet.cssText = n : i.appendChild(document.createTextNode(n)); } } var ml = "._fc-upload{width:100%}._fc-exceed .el-upload{display:none}.el-upload-list.is-disabled .el-upload{cursor:not-allowed!important}"; pl(ml); var Ya = { name: "IconUpload" }, gl = { class: "icon", viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg" }, vl = /* @__PURE__ */ Me("path", { fill: "currentColor", d: "M160 832h704a32 32 0 110 64H160a32 32 0 110-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z" }, null, -1), yl = [vl]; function _l(n, e, t, r, i, a) { return ee(), me("svg", gl, yl); } Ya.render = _l; function Ki(n, e) { return Mn(n) === "object" ? n : { url: n, is_string: !0, name: bl(n), uid: e }; } function Zi(n) { return Cr(Cr({}, n), {}, { file: n, value: n }); } function bl(n) { return ("" + n).split("/").pop(); } var wl = "fcUpload", $l = he({ name: wl, inheritAttrs: !1, formCreateParser: { toFormValue: function(e) { return Sn(e); }, toValue: function(e, t) { return t.prop.props.limit === 1 ? e[0] || "" : e; } }, props: { previewMask: void 0, onPreview: Function, httpRequest: Function, modalTitle: String, listType: String, formCreateInject: Object, modelValue: [Array, String, Object] }, emits: ["update:modelValue", "change", "remove", "fc.el"], data: function() { return { previewVisible: !1, previewImage: "", fileList: [] }; }, created: function() { this.fileList = Sn(this.modelValue).map(Ki).map(Zi); }, watch: { modelValue: function(e) { this.fileList = Sn(e).map(Ki).map(Zi); } }, methods: { handlePreview: function(e) { this.onPreview ? this.onPreview.apply(this, arguments) : this.listType === "text" ? window.open(e.url) : (this.previewImage = e.url, this.previewVisible = !0); }, update: function(e) { var t = e.map(function(r) { return r.is_string ? r.url : r.value || r.url; }).filter(function(r) { return r !== void 0; }); this.$emit("update:modelValue", t); }, handleCancel: function() { this.previewVisible = !1; }, handleChange: function(e, t) { this.$emit.apply(this, ["change"].concat(Array.prototype.slice.call(arguments))), e.status === "success" && this.update(t); }, handleRemove: function(e, t) { this.$emit.apply(this, ["remove"].concat(Array.prototype.slice.call(arguments))), this.update(t); }, doHttpRequest: function(e) { if (this.httpRequest) return this.httpRequest(e); e.source = "upload", this.formCreateInject.api.fetch(e); } }, render: function() { var e, t, r = this, i = Sn(this.modelValue).length; return H("div", { class: "_fc-upload" }, [H(K("ElUpload"), Pe({ key: i }, this.$attrs, { listType: this.listType || "picture-card", class: { "_fc-exceed": this.$attrs.limit ? this.$attrs.limit <= i : !1 }, onPreview: this.handlePreview, onChange: this.handleChange, onRemove: this.handleRemove, httpRequest: this.doHttpRequest, fileList: this.fileList, ref: "upload" }), Cr({ default: function() { return [((e = (t = r.$slots).default) === null || e === void 0 ? void 0 : e.call(t)) || (["text", "picture"].indexOf(r.listType) === -1 ? H(K("ElIcon"), null, { default: function() { return [H(Ya, null, null)]; } }) : H(K("ElButton"), { type: "primary" }, { default: function() { return [r.formCreateInject.t("clickToUpload") || "\u70B9\u51FB\u4E0A\u4F20"]; } }))]; } }, hl(this.$slots, ["default"]))), H(K("ElDialog"), { appendToBody: !0, modal: this.previewMask, title: this.modalTitle, modelValue: this.previewVisible, onClose: this.handleCancel }, { default: function() { return [H("img", { style: "width: 100%", src: r.previewImage }, null)]; } })]); }, mounted: function() { this.$emit("fc.el", this.$refs.upload); } }); const ot = { type(n, e) { return Object.prototype.toString.call(n) === "[object " + e + "]"; }, Undef(n) { return n == null; }, Element(n) { return typeof n == "object" && n !== null && n.nodeType === 1 && !ot.Object(n); }, trueArray(n) { return Array.isArray(n) && n.length > 0; }, Function(n) { const e = this.getType(n); return e === "Function" || e === "AsyncFunction"; }, getType(n) { const e = Object.prototype.toString.call(n); return /^\[object (.*)\]$/.exec(e)[1]; }, empty(n) { return n == null || Array.isArray(n) && Array.isArray(n) && !n.length ? !0 : typeof n == "string" && !n; } }; ["Date", "Object", "String", "Boolean", "Array", "Number"].forEach((n) => { ot[n] = function(e) { return ot.type(e, n); }; }); function Xa(n, e) { return {}.hasOwnProperty.call(n, e); } var Ja = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function Sl(n) { return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n; } var Ka = { exports: {} }; (function(n, e) { (function(t, r) { n.exports = r(); })(Ja, function() { var t = 1e3, r = 6e4, i = 36e5, a = "millisecond", o = "second", s = "minute", u = "hour", c = "day", l = "week", h = "month", m = "quarter", w = "year", $ = "date", S = "Invalid Date", T = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, U = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, z = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(k) { var b = ["th", "st", "nd", "rd"], y = k % 100; return "[" + k + (b[(y - 20) % 10] || b[y] || b[0]) + "]"; } }, B = function(k, b, y) { var d = String(k); return !d || d.length >= b ? k : "" + Array(b + 1 - d.length).join(y) + k; }, Z = { s: B, z: function(k) { var b = -k.utcOffset(), y = Math.abs(b), d = Math.floor(y / 60), f = y % 60; return (b <= 0 ? "+" : "-") + B(d, 2, "0") + ":" + B(f, 2, "0"); }, m: function k(b, y) { if (b.date() < y.date()) return -k(y, b); var d = 12 * (y.year() - b.year()) + (y.month() - b.month()), f = b.clone().add(d, h), p = y - f < 0, v = b.clone().add(d + (p ? -1 : 1), h); return +(-(d + (y - f) / (p ? f - v : v - f)) || 0); }, a: function(k) { return k < 0 ? Math.ceil(k) || 0 : Math.floor(k); }, p: function(k) { return { M: h, y: w, w: l, d: c, D: $, h: u, m: s, s: o, ms: a, Q: m }[k] || String(k || "").toLowerCase().replace(/s$/, ""); }, u: function(k) { return k === void 0; } }, Q = "en", q = {}; q[Q] = z; var ce = "$isDayjsObject", re = function(k) { return k instanceof Oe || !(!k || !k[ce]); }, ae = function k(b, y, d) { var f; if (!b) return Q; if (typeof b == "string") { var p = b.toLowerCase(); q[p] && (f = p), y && (q[p] = y, f = p); var v = b.split("-"); if (!f && v.length > 1) return k(v[0]); } else { var g = b.name; q[g] = b, f = g; } return !d && f && (Q = f), f || !d && Q; }, J = function(k, b) { if (re(k)) return k.clone(); var y = typeof b == "object" ? b : {}; return y.date = k, y.args = arguments, new Oe(y); }, G = Z; G.l = ae, G.i = re, G.w = function(k, b) { return J(k, { locale: b.$L, utc: b.$u, x: b.$x, $offset: b.$offset }); }; var Oe = function() { function k(y) { this.$L = ae(y.locale, null, !0), this.parse(y), this.$x = this.$x || y.x || {}, this[ce] = !0; } var b = k.prototype; return b.parse = function(y) { this.$d = function(d) { var f = d.date, p = d.utc; if (f === null) return new Date(NaN); if (G.u(f)) return new Date(); if (f instanceof Date) return new Date(f); if (typeof f == "string" && !/Z$/i.test(f)) { var v = f.match(T); if (v) { var g = v[2] - 1 || 0, x = (v[7] || "0").substring(0, 3); return p ? new Date(Date.UTC(v[1], g, v[3] || 1, v[4] || 0, v[5] || 0, v[6] || 0, x)) : new Date(v[1], g, v[3] || 1, v[4] || 0, v[5] || 0, v[6] || 0, x); } } return new Date(f); }(y), this.init(); }, b.init = function() { var y = this.$d; this.$y = y.getFullYear(), this.$M = y.getMonth(), this.$D = y.getDate(), this.$W = y.getDay(), this.$H = y.getHours(), this.$m = y.getMinutes(), this.$s = y.getSeconds(), this.$ms = y.getMilliseconds(); }, b.$utils = function() { return G; }, b.isValid = function() { return this.$d.toString() !== S; }, b.isSame = function(y, d) { var f = J(y); return this.startOf(d) <= f && f <= this.endOf(d); }, b.isAfter = function(y, d) { return J(y) < this.startOf(d); }, b.isBefore = function(y, d) { return this.endOf(d) < J(y); }, b.$g = function(y, d, f) { return G.u(y) ? this[d] : this.set(f, y); }, b.unix = function() { return Math.floor(this.valueOf() / 1e3); }, b.valueOf = function() { return this.$d.getTime(); }, b.startOf = function(y, d) { var f = this, p = !!G.u(d) || d, v = G.p(y), g = function(A, C) { var D = G.w(f.$u ? Date.UTC(f.$y, C, A) : new Date(f.$y, C, A), f); return p ? D : D.endOf(c); }, x = function(A, C) { return G.w(f.toDate()[A].apply(f.toDate("s"), (p ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(C)), f); }, M = this.$W, P = this.$M, N = this.$D, I = "set" + (this.$u ? "UTC" : ""); switch (v) { case w: return p ? g(1, 0) : g(31, 11); case h: return p ? g(1, P) : g(0, P + 1); case l: var V = this.$locale().weekStart || 0, L = (M < V ? M + 7 : M) - V; return g(p ? N - L : N + (6 - L), P); case c: case $: return x(I + "Hours", 0); case u: return x(I + "Minutes", 1); case s: return x(I + "Seconds", 2); case o: return x(I + "Milliseconds", 3); default: return this.clone(); } }, b.endOf = function(y) { return this.startOf(y, !1); }, b.$set = function(y, d) { var f, p = G.p(y), v = "set" + (this.$u ? "UTC" : ""), g = (f = {}, f[c] = v + "Date", f[$] = v + "Date", f[h] = v + "Month", f[w] = v + "FullYear", f[u] = v + "Hours", f[s] = v + "Minutes", f[o] = v + "Seconds", f[a] = v + "Milliseconds", f)[p], x = p === c ? this.$D + (d - this.$W) : d; if (p === h || p === w) { var M = this.clone().set($, 1); M.$d[g](x), M.init(), this.$d = M.set($, Math.min(this.$D, M.daysInMonth())).$d; } else g && this.$d[g](x); return this.init(), this; }, b.set = function(y, d) { return this.clone().$set(y, d); }, b.get = function(y) { return this[G.p(y)](); }, b.add = function(y, d) { var f, p = this; y = Number(y); var v = G.p(d), g = function(P) { var N = J(p); return G.w(N.date(N.date() + Math.round(P * y)), p); }; if (v === h) return this.set(h, this.$M + y); if (v === w) return this.set(w, this.$y + y); if (v === c) return g(1); if (v === l) return g(7); var x = (f = {}, f[s] = r, f[u] = i, f[o] = t, f)[v] || 1, M = this.$d.getTime() + y * x; return G.w(M, this); }, b.subtract = function(y, d) { return this.add(-1 * y, d); }, b.format = function(y) { var d = this, f = this.$locale(); if (!this.isValid()) return f.invalidDate || S; var p = y || "YYYY-MM-DDTHH:mm:ssZ", v = G.z(this), g = this.$H, x = this.$m, M = this.$M, P = f.weekdays, N = f.months, I = f.meridiem, V = function(C, D, _, E) { return C && (C[D] || C(d, p)) || _[D].slice(0, E); }, L = function(C) { return G.s(g % 12 || 12, C, "0"); }, A = I || function(C, D, _) { var E = C < 12 ? "AM" : "PM"; return _ ? E.toLowerCase() : E; }; return p.replace(U, function(C, D) { return D || function(_) { switch (_) { case "YY": return String(d.$y).slice(-2); case "YYYY": return G.s(d.$y, 4, "0"); case "M": return M + 1; case "MM": return G.s(M + 1, 2, "0"); case "MMM": return V(f.monthsShort, M, N, 3); case "MMMM": return V(N, M); case "D": return d.$D; case "DD": return G.s(d.$D, 2, "0"); case "d": return String(d.$W); case "dd": return V(f.weekdaysMin, d.$W, P, 2); case "ddd": return V(f.weekdaysShort, d.$W, P, 3); case "dddd": return P[d.$W]; case "H": return String(g); case "HH": return G.s(g, 2, "0"); case "h": return L(1); case "hh": return L(2); case "a": return A(g, x, !0); case "A": return A(g, x, !1); case "m": return String(x); case "mm": return G.s(x, 2, "0"); case "s": return String(d.$s); case "ss": return G.s(d.$s, 2, "0"); case "SSS": return G.s(d.$ms, 3, "0"); case "Z": return v; } return null; }(C) || v.replace(":", ""); }); }, b.utcOffset = function() { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); }, b.diff = function(y, d, f) { var p, v = this, g = G.p(d), x = J(y), M = (x.utcOffset() - this.utcOffset()) * r, P = this - x, N = function() { return G.m(v, x); }; switch (g) { case w: p = N() / 12; break; case h: p = N(); break; case m: p = N() / 3; break; case l: p = (P - M) / 6048e5; break; case c: p = (P - M) / 864e5; break; case u: p = P / i; break; case s: p = P / r; break; case o: p = P / t; break; default: p = P; } return f ? p : G.a(p); }, b.daysInMonth = function() { return this.endOf(h).$D; }, b.$locale = function() { return q[this.$L]; }, b.locale = function(y, d) { if (!y) return this.$L; var f = this.clone(), p = ae(y, d, !0); return p && (f.$L = p), f; }, b.clone = function() { return G.w(this.$d, this); }, b.toDate = function() { return new Date(this.valueOf()); }, b.toJSON = function() { return this.isValid() ? this.toISOString() : null; }, b.toISOString = function() { return this.$d.toISOString(); }, b.toString = function() { return this.$d.toUTCString(); }, k; }(), Ye = Oe.prototype; return J.prototype = Ye, [["$ms", a], ["$s", o], ["$m", s], ["$H", u], ["$W", c], ["$M", h], ["$y", w], ["$D", $]].forEach(function(k) { Ye[k[1]] = function(b) { return this.$g(b, k[0], k[1]); }; }), J.extend = function(k, b) { return k.$i || (k(b, Oe, J), k.$i = !0), J; }, J.locale = ae, J.isDayjs = re, J.unix = function(k) { return J(1e3 * k); }, J.en = q[Q], J.Ls = q, J.p = {}, J; }); })(Ka); const Ol = Ka.exports, Nt = { Add: (n, e) => { let t, r, i; try { t = n.toString().split(".")[1].length; } catch { t = 0; } try { r = e.toString().split(".")[1].length; } catch { r = 0; } return i = Math.pow(10, Math.max(t, r)), (n * i + e * i) / i; }, Sub: (n, e) => { let t, r, i; try { t = n.toString().split(".")[1].length; } catch { t = 0; } try { r = e.toString().split(".")[1].length; } catch { r = 0; } i = Math.pow(10, Math.max(t, r)); let a = t >= r ? t : r; return Number(((n * i - e * i) / i).toFixed(a)); }, Mul: (n, e) => { let t = 0, r = n.toString(), i = e.toString(); try { t += r.split(".")[1].length; } catch { } try { t += i.split(".")[1].length; } catch { } return Number(r.replace(".", "")) * Number(i.replace(".", "")) / Math.pow(10, t); }, Div: (n, e) => { let t = 0, r = 0; try { t = n.toString().split(".")[1].length; } catch { } try { r = e.toString().split(".")[1].length; } catch { } let i = Number(n.toString().replace(".", "")), a = Number(e.toString().replace(".", "")); return i / a * Math.pow(10, r - t); } }, El = "YYYY-MM-DD HH:mm:ss", Et = (n, e) => n == null ? e : n, Ie = { ADD: function(n, e) { return Nt.Add(Et(n, "0"), Et(e, "0")); }, SUB: function(n, e) { return Nt.Sub(Et(n, "0"), Et(e, "0")); }, MUL: function(n, e) { return Nt.Mul(Et(n, "0"), Et(e, "0")); }, DIV: function(n, e) { return Nt.Div(Et(n, "0"), Et(e, "0")); }, SUM: function(...n) { return (n || []).reduce((e, t) => Nt.Add(e, Array.isArray(t) ? Ie.SUM(...t) : t || 0), 0); }, MAX: function(...n) { const e = Array.isArray(n[0]) ? n[0] : n; return Math.max(...e.map((t) => parseFloat(t)).filter((t) => !isNaN(t))); }, MIN: function(...n) { const e = Array.isArray(n[0]) ? n[0] : n; return Math.min(...e.map((t) => parseFloat(t)).filter((t) => !isNaN(t))); }, ABS: function(n) { return parseFloat(Math.abs(n)) || 0; }, AVG: function(...n) { const e = Array.isArray(n[0]) ? n[0] : n; return e.length ? Nt.Div(Ie.SUM(e), e.length) : 0; }, POWER: function(n, e) { return Math.pow(parseFloat(n), parseFloat(e)); }, RAND: function() { return Math.random(); }, CEIL: function(n) { return Math.ceil(parseFloat(n)) || 0; }, FLOOR: function(n) { return Math.floor(parseFloat(n) || 0); }, FIXED: function(n, e) { const t = Math.pow(10, e || 0); return (Math.floor(parseFloat(n) * t) / t).toFixed(e || 0); }, ISNUMBER: function(n) { return n === "" || n === null ? !1 : !isNaN(Number(n)); }, PI: function() { return Number(Math.PI); }, ROUND: function(n, e) { return n = parseFloat(n), isNaN(n) ? 0 : parseFloat(n.toFixed(parseFloat(e) || 0)); }, SQRT: function(n) { return Math.sqrt(parseFloat(n)) || 0; }, TONUMBER: function(n) { return parseFloat(n) || 0; }, MODIFYDATE: function(n, e, t, r) { if (!n) return null; let i = Ol(n); return e > 0 ? i = i.add(e, t) : e < 0 && (i = i.subtract(-1 * e, t)), i.format(r || El); }, ADDYEAR: function(n, e, t) { return Ie.MODIFYDATE(n, Math.max(e, 0), "y", t); }, ADDMONTH: function(n, e, t) { return Ie.MODIFYDATE(n, Math.max(e, 0), "M", t); }, ADDDAY: function(n, e, t) { return Ie.MODIFYDATE(n, Math.max(e, 0), "d", t); }, ADDHOUR: function(n, e, t) { return Ie.MODIFYDATE(n, Math.max(e, 0), "h", t); }, ADDMINUTE: function(n, e, t) { return Ie.MODIFYDATE(n, Math.max(e, 0), "m", t); }, ADDSECOND: function(n, e, t) { return Ie.MODIFYDATE(n, Math.max(e, 0), "s", t); }, ADDWEEK: function(n, e, t) { return Ie.MODIFYDATE(n, Math.max(e, 0), "w", t); }, SUBYEAR: function(n, e, t) { return e = Math.max(e, 0), Ie.MODIFYDATE(n, e > 0 ? -1 * e : 0, "y", t); }, SUBMONTH: function(n, e, t) { return e = Math.max(e, 0), Ie.MODIFYDATE(n, e > 0 ? -1 * e : 0, "M", t); }, SUBDAY: function(n, e, t) { return e = Math.max(e, 0), Ie.MODIFYDATE(n, e > 0 ? -1 * e : 0, "d", t); }, SUBHOUR: function(n, e, t) { return e = Math.max(e, 0), Ie.MODIFYDATE(n, e > 0 ? -1 * e : 0, "h", t); }, SUBMINUTE: function(n, e, t) { return e = Math.max(e, 0), Ie.MODIFYDATE(n, e > 0 ? -1 * e : 0, "m", t); }, SUBSECOND: function(n, e, t) { return e = Math.max(e, 0), Ie.MODIFYDATE(n, e > 0 ? -1 * e : 0, "s", t); }, SUBWEEK: function(n, e, t) { return e = Math.max(e, 0), Ie.MODIFYDATE(n, e > 0 ? -1 * e : 0, "w", t); }, NOW: function() { const n = new Date(), e = n.getFullYear(), t = ("0" + (n.getMonth() + 1)).slice(-2), r = ("0" + n.getDate()).slice(-2), i = ("0" + n.getHours()).slice(-2), a = ("0" + n.getMinutes()).slice(-2), o = ("0" + n.getSeconds()).slice(-2); return e + "-" + t + "-" + r + " " + i + ":" + a + ":" + o; }, TODAY: function() { const n = new Date(), e = n.getFullYear(), t = ("0" + (n.getMonth() + 1)).slice(-2), r = ("0" + n.getDate()).slice(-2); return e + "-" + t + "-" + r; }, YEAR: function(n) { return n ? new Date(n).getFullYear() : null; }, MONTH: function(n) { return n ? new Date(n).getMonth() + 1 : null; }, DAY: function(n) { return n ? new Date(n).getDate() : null; }, HOUR: function(n) { return n ? new Date(n).getHours() : null; }, MINUTE: function(n) { return n ? new Date(n).getMinutes() : null; }, SECOND: function(n) { return n ? new Date(n).getSeconds() : null; }, DIFFDAYS: function(n, e) { const t = new Date(n), r = new Date(e); return parseInt(Math.ceil(Math.abs(r.getTime() - t.getTime()) / (1e3 * 60 * 60 * 24))); }, DIFFHOURS: function(n, e) { const t = new Date(n), r = new Date(e); return parseFloat(Math.abs(r.getTime() - t.getTime()) / (1e3 * 60 * 60)).toFixed(2); }, DIFFMINUTES: function(n, e) { const t = new Date(n), r = new Date(e); return parseInt(Math.ceil(Math.abs(r.getTime() - t.getTime()) / (1e3 * 60))); }, TIMESTAMP: function(n) { return Date.parse(n); }, STARTSWITH: function(n, e) { return ("" + n).substring(0, ("" + e).length) === e; }, EMPTY: function(n) { return ot.empty(n); }, NOTEMPTY: function(n) { return !ot.empty(n); }, LEN: function(n) { return Array.isArray(n) ? n.length : 0; }, MOD: function(n, e) { return n = parseFloat(n), e = parseFloat(e), !n || !e || isNaN(n) || isNaN(e) ? 0 : n % e; }, SLICELEFT: function(n, e) { return ("" + n).slice(0, Number(e) || 0); }, SLICERIGHT: function(n, e) { return ("" + n).slice(Number(e) * -1); }, TOLOWER: function(n) { return ("" + n).toLowerCase(); }, TOUPPER: function(n) { return ("" + n).toUpperCase(); }, INCLUDES: function(n, e) { return (n || "").indexOf(e || ""); }, REPLACE: function(n, e, t) { return (n || "").replace(e || "", t || ""); }, REPLACEALL: function(n, e, t) { return (n || "").replaceAll(e || "", t || ""); }, TRIM: function(n) { return (n || "").trim(); }, TOCHINSESAMOUNT: function(n) { let e = ["\u96F6", "\u58F9", "\u8D30", "\u53C1", "\u8086", "\u4F0D", "\u9646", "\u67D2", "\u634C", "\u7396"], t = ["", "\u4E07", "\u4EBF", "\u4E07\u4EBF", "\u4EBF\u4EBF"], r = ["", "\u62FE", "\u4F70", "\u4EDF"], i = ["\u89D2", "\u5206"]; function a(m) { let w = "", $ = "", S = 0, T = !0; for (; m > 0; ) { let U = m % 10; U === 0 ? T || (T = !0, $ = e[U] + $) : (T = !1, w = e[U], w += r[S], $ = w + $), S++, m = Math.floor(m / 10); } return $; } let o = 0, s = "", u = "", c = !1; if (n === 0) return e[0]; let l = Math.floor(n), h = Math.round((n - l) * 100); for (; l > 0; ) { let m = l % 1e4; c && (u = e[0] + u), s = a(m), s += m !== 0 ? t[o] : t[0], u = s + u, c = m < 1e3 && m > 0, l = Math.floor(l / 1e4), o++; } return u && (u += "\u5143"), h > 0 ? (u += e[Math.floor(h / 10)] + i[0], h % 10 !== 0 && (u += e[h % 10] + i[1])) : u && (u += "\u6574"), u; }, UNION: function(...n) { return (Array.isArray(n[0]) ? n[0] : n).filter((t, r, i) => i.indexOf(t) === r); }, AND: function(...n) { return !!n.reduce((e, t) => e && t, !0); }, OR: function(...n) { return !!n.reduce((e, t) => e || t, !1); }, IF: function(n, e = !0, t = !1) { return n ? e : t; }, DEFAULT: function(n, e) { return ot.Undef(n) ? e : n; }, CASE: function(...n) { for (let e = 0; e < n.length - 1; e += 2) if (n[e]) return n[e + 1]; return null; }, COLUMN: function(n, e) { const t = []; return Array.isArray(n) && n.forEach(function(r) { Array.isArray(r) ? t.push(...Ie.COLUMN(r, e)) : r && t.push(r[e]); }), t; }, VALUE: function(n, e, t) { const r = ("" + e).split("."); let i = n; for (let a = 0; a < r.length; a++) if (Xa(i, r[a])) i = i[r[a]]; else return t; return i; }, CONCAT: function(...n) { return "".concat(...n); }, INTERSECTIONSET: function(n, e) { const t = []; for (let r = 0; r < n.length; r++) { const i = n[r]; e.indexOf(i) !== -1 && t.indexOf(i) === -1 && t.push(i); } return t; }, LIST: function(...n) { return n; }, IN: function(n, e) { return (n || []).indexOf(e) > -1; }, FALSE: function() { return !1; }, TRUE: function() { return !0; }, NOT: function(n) { return !n; }, EQ: function(n, e) { return n === e; }, GE: function(n, e) { return n >= e; }, GT: function(n, e) { return n > e; }, LE: function(n, e) { return n <= e; }, LT: function(n, e) { return n < e; }, NE: function(n, e) { return n !== e; } }; const Ae = (n, e) => { const t = n.__vccOpts || n; for (const [r, i] of e) t[r] = i; return t; }, Za = (n) => { const e = []; return n.forEach((t) => { t.field && e.push(t.field), t.children && e.push(...Za(t.children)); }), e; }, xl = he({ name: "StepForm", props: { stepsProps: Object, modelValue: Object, formCreateInject: Object, autoValidate: Boolean, submitBtn: Boolean, steps: { type: Array, required: !0, default: () => [] }, options: { type: Object, default: () => Be({ submitBtn: !1, resetBtn: !1 }) } }, emits: ["update:modelValue", "change", "itemMounted", "submit", "next"], data() { return { active: 0, cacheRule: [], cacheValue: {}, subApi: {}, Form: Te(this.formCreateInject.form.$form()) }; }, watch: { active() { this.init(); }, modelValue(n) { this.setValue(n); } }, methods: { init() { this.steps.forEach((n, e) => { this.cacheRule[e] ? this.cacheRule[e].display = e === this.active : this.cacheRule[e] = { type: "FcRow", native: !0, display: e === this.active, children: n.rule }; }); }, onPrev() { this.active--; }, validate() { return new Promise((n, e) => { const t = Za(this.cacheRule[this.active].children); t.length > 0 ? Promise.all(t.map((r) => this.subApi.validateField(r))).then(() => { n(); }).catch((r) => { e(r); }) : n(); }); }, onNext() { this.autoValidate ? this.validate().then(() => { this.active++; }).catch((n) => { }) : this.active++, this.$emit("next", { active: this.active, api: this.subApi }); }, submit() { const n = () => { this.$emit("submit", this.subApi.formData(), this.subApi); }; this.autoValidate ? this.validate().then(() => { n(); }).catch((e) => { }) : n(); }, addSubApi(n) { this.subApi = n, this.$emit("itemMounted", n); }, formData(n) { this.cacheValue = JSON.stringify(n), this.$emit("update:modelValue", n), this.$emit("change", n); }, setValue(n) { const e = JSON.stringify(n); this.cacheValue !== e && (this.cacheValue = e, this.subApi.coverValue(n || {})); } }, created() { this.init(); } }), Cl = { class: "_fc-step-form" }; function kl(n, e, t, r, i, a) { const o = K("van-step"), s = K("van-steps"), u = K("van-button"), c = K("van-col"), l = K("van-row"); return ee(), me("div", Cl, [ H(s, Pe({ active: n.active }, n.stepsProps), { default: Ce(() => [ (ee(!0), me(Ke, null, un(n.steps, (h) => (ee(), Re(o, Pe({ ref_for: !0 }, h.props), { default: Ce(() => [ He(Ve(h.props.title), 1) ]), _: 2 }, 1040))), 256)) ]), _: 1 }, 16, ["active"]), (ee(), Re(Ft(n.Form), { option: n.options, rule: n.cacheRule, extendOption: !0, modelValue: n.modelValue, "onUpdate:api": n.addSubApi, onEmitEvent: n.$emit, "onUpdate:modelValue": n.formData }, null, 40, ["option", "rule", "modelValue", "onUpdate:api", "onEmitEvent", "onUpdate:modelValue"])), H(l, null, { default: Ce(() => [ H(c, { span: 24, style: { "margin-top": "15px" } }, { default: Ce(() => [ n.active > 0 ? (ee(), Re(u, { key: 0, block: "", size: "small", onClick: n.onPrev }, { default: Ce(() => [ He(Ve(n.formCreateInject.t("prevStep") || "\u4E0A\u4E00\u6B65"), 1) ]), _: 1 }, 8, ["onClick"])) : dt("", !0), n.active < n.cacheRule.length - 1 ? (ee(), Re(u, { key: 1, block: "", size: "small", type: "primary", onClick: n.onNext }, { default: Ce(() => [ He(Ve(n.formCreateInject.t("nextStep") || "\u4E0B\u4E00\u6B65"), 1) ]), _: 1 }, 8, ["onClick"])) : dt("", !0), n.submitBtn !== !1 && n.active === n.cacheRule.length - 1 ? (ee(), Re(u, { key: 2, block: "", size: "small", class: "fc-clock", type: "primary", onClick: n.submit, style: { "margin-top": "10px" } }, { default: Ce(() => [ He(Ve(n.formCreateInject.t("submit") || "\u63D0\u4EA4"), 1) ]), _: 1 }, 8, ["onClick"])) : dt("", !0) ]), _: 1 }) ]), _: 1 }) ]); } const Al = /* @__PURE__ */ Ae(xl, [["render", kl]]); function Gt(n, e, t) { n[e] = t; } function Qa(n, e = {}, t) { let r = !1; for (let i in e) if (Object.prototype.hasOwnProperty.call(e, i)) { let a = e[i]; if ((r = Array.isArray(a)) || ot.Object(a)) { let o = n[i] === void 0; if (r) r = !1, o && Gt(n, i, []); else if (a._clone && t !== void 0) if (t) a = a.getRule(), o && Gt(n, i, {}); else { Gt(n, i, a._clone()); continue; } else o && Gt(n, i, {}); n[i] = Qa(n[i], a, t); } else Gt(n, i, a), ot.Undef(a) || (ot.Undef(a.__json) || (n[i].__json = a.__json), ot.Undef(a.__origin) || (n[i].__origin = a.__origin)); } return t !== void 0 && Array.isArray(n) ? n.filter((i) => !i || !i.__ctrl) : n; } function vt(n) { return Qa({}, { value: n }).value; } const Dl = he({ name: "FcPopup", emits: ["confirm", "submit", "validateFail", "update:modelValue"], props: { formData: Object, options: { type: Object, default: () => Be({ submitBtn: !1, resetBtn: !1 }) }, rule: Array, autoClose: { type: Boolean, default: !0 }, footer: { type: Boolean, default: !0 }, preview: Boolean, modelValue: Object, formCreateInject: Object, title: String }, computed: { formOptions() { const n = { ...this.options }; return this.preview && (n.preview = this.preview), n; } }, data() { return { visible: !1, fapi: {}, value: {}, formRule: [], Form: Te(this.formCreateInject.form.$form()) }; }, methods: { formChange() { this.$emit("update:modelValue", this.fapi.formData()); }, open(n) { this.$nextTick(() => { this.visible = !0, this.value = vt(n || this.modelValue || this.formData || {}), this.formRule = vt(this.rule || []); }); }, close() { this.visible = !1; }, handleConfirm() { this.$emit("confirm", this.fapi), this.fapi.submit().then((n) => { this.$emit("submit", n, this.fapi, this.close), this.autoClose && this.close(); }).catch((n) => { this.$emit("validateFail", n, this.fapi); }); } }, mounted() { this.formCreateInject.api.top.bus.$on("fc.closeDialog", this.close), Oa(() => { this.formCreateInject.api.top.bus.$off("fc.closeDialog", this.close); }); } }), Rl = { class: "_fc-popup-title" }, Pl = { class: "_fc-popup-content" }, Ml = { class: "_fc-popup-footer" }; function Tl(n, e, t, r, i, a) { const o = K("van-button"), s = K("van-popup"); return ee(), Re(s, Pe({ class: "_fc-popup", closeable: "" }, n.$attrs, { show: n.visible, "onUpdate:show": e[1] || (e[1] = (u) => n.visible = u) }), { default: Ce(() => [ Me("div", Rl, Ve(n.title), 1), Me("div", Pl, [ (ee(), Re(Ft(n.Form), { option: n.formOptions, rule: n.formRule, extendOption: !0, api: n.fapi, "onUpdate:api": e[0] || (e[0] = (u) => n.fapi = u), "model-value": n.value, subForm: !1, onChange: n.formChange, onEmitEvent: n.$emit }, null, 40, ["option", "rule", "api", "model-value", "onChange", "onEmitEvent"])) ]), Me("div", Ml, [ n.footer !== !1 ? (ee(), me(Ke, { key: 0 }, [ H(o, { block: "", size: "small", type: "primary", class: "fc-clock", onClick: n.handleConfirm }, { default: Ce(() => [ He(Ve(n.formCreateInject.t("ok") || "\u786E\u5B9A"), 1) ]), _: 1 }, 8, ["onClick"]), H(o, { block: "", size: "small", class: "fc-clock", style: { "margin-top": "10px" }, onClick: n.close }, { default: Ce(() => [ He(Ve(n.formCreateInject.t("close") || "\u5173\u95ED"), 1) ]), _: 1 }, 8, ["onClick"]) ], 64)) : dt("", !0) ]) ]), _: 1 }, 16, ["show"]); } const jl = /* @__PURE__ */ Ae(Dl, [["render", Tl]]); function Fl(n, e, t) { return `[form-create ${n}]: ${e}` + (t ? ` rule: ` + JSON.stringify(t.getRule ? t.getRule() : t) : ""); } function Il(n, e) { console.error(Fl("err", n, e)); } const Qi = "[[FORM-CREATE-PREFIX-", ea = "-FORM-CREATE-SUFFIX]]"; function lr(n) { return new Function("return " + n)(); } function Bn(n, e) { if (n && ot.String(n) && n.length > 4) { let t = n.trim(), r = !1; try { if (t.indexOf(ea) > 0 && t.indexOf(Qi) === 0) t = t.replace(ea, "").replace(Qi, ""), r = !0; else if (t.indexOf("$FN:") === 0) t = t.substring(4), r = !0; else if (t.indexOf("$EXEC:") === 0) t = t.substring(6), r = !0; else if (t.indexOf("$GLOBAL:") === 0) { const a = t.substring(8); return t = function(...o) { const s = o[0].api.getGlobalEvent(a); if (s) return s.call(this, ...o); }, t.__json = n, t.__inject = !0, t; } else { if (t.indexOf("$FNX:") === 0) return t = lr("function($inject){" + t.substring(5) + "}"), t.__json = n, t.__inject = !0, t; (!e && t.indexOf("function ") === 0 && t !== "function " || !e && t.indexOf("function(") === 0 && t !== "function(") && (r = !0); } if (!r) return n; let i; try { i = lr(t); } catch { i = lr("function " + t); } return i.__json = n, i; } catch (i) { Il(`\u89E3\u6790\u5931\u8D25:${t} err: ${i}`); return; } } return n; } const Vl = he({ name: "DataTable", emits: ["sortChange", "handleClick"], props: { column: { type: Array, default: () => [] }, globalDataKey: [String, Object], fetch: Object, data: { type: Array, default: () => [] }, button: Object, index: Boolean, selection: Boolean, page: Object, formCreateInject: Object }, data() { return { total: 0, loading: !1, unwatch: null, list: [], currentPage: 1, id: 1, order: "", orderBy: "" }; }, watch: { globalDataKey() { this.initPage(); }, fetch() { this.globalDataKey || this.initPage(); }, data() { !this.globalDataKey && !this.fetch && this.initPage(); }, selection() { this.id++; }, index() { this.id++; }, page: { handler() { this.initPage(), this.id++; }, deep: !0 }, button: { handler() { this.id++; }, deep: !0 } }, computed: { filterList() { let n = this.list || []; const e = []; return this.column.forEach((t) => { t.prop && Array.isArray(t.filter) && t.filter.length > 0 && e.push((r) => t.filter.indexOf(r[t.prop]) > -1); }), e.forEach((t) => { n = n.filter(t); }), n; } }, render() { return $a(qe("div", { class: "_fc-data-table" }, [ qe(K("el-table"), { data: this.filterList, ...this.$attrs, key: this.id, ref: "table", onSortChange: (n) => { this.$emit("sortChange", n), n.order ? (this.orderBy = n.order === "descending" ? "DESC" : "ASC", this.order = n.prop) : (this.orderBy = "", this.order = ""), this.initPage(); } }, () => { const n = this.column.filter((t) => t.hidden !== !0).map((t) => this.makeColumn(t)); this.selection && n.unshift(qe(K("el-table-column"), { type: "selection", width: "50px" })); const e = this.makeButtonCol(); return e && n.push(e), this.index && n.unshift(qe(K("el-table-column"), { type: "index", width: "50px" })), n; }), this.makePage() ]), [ [Sa("loading"), this.loading] ]); }, methods: { getEl() { return this.$refs.table; }, deepGet(n, e, t) { e = (e || "").split("."); let r = 0, i = e.length; for (; n != null && r < i; ) n = n[e[r++]]; return r && r === i && n != null ? n : t; }, initPage() { this.loading = !1, this.page && this.page.open ? (this.currentPage = 1, this.nextList()) : this.globalDataKey || this.fetch ? this.fetchData().then(({ list: n }) => { this.list = n; }) : this.list = this.data; }, btnProps(n, e) { const t = n.prop || [], r = { type: n.type, size: n.size, round: t.indexOf("round") > -1, link: t.indexOf("link") > -1, plain: t.indexOf("plain") > -1, disabled: t.indexOf("disabled") > -1, onClick: (a) => { a.stopPropagation(); const o = Bn(n.click); try { o && o(e, this.formCreateInject.api); } catch (s) { console.error(s); } this.$emit("handleClick", { name: n.name, key: n.key, scope: e, column: e.row }); } }, i = Bn(n.handle); try { const a = i && i(r, e, this.formCreateInject.api); typeof a == "boolean" && (r.disabled = a); } catch (a) { console.error(a); } return r; }, getLimit() { return this.page.props && this.page.props.pageSize || 20; }, nextList() { if (this.globalDataKey || this.fetch) this.fetchData(!0).then(({ list: n, total: e }) => { this.list = n, this.total = e; }); else { const n = this.data, e = this.getLimit(), t = this.currentPage * e; this.list = n.slice(t - e, t), this.total = n.length; } }, fetchData(n) { return this.unwatch && this.unwatch(), new Promise((e) => { let t = this.fetch; if (this.globalDataKey) { const r = typeof this.globalDataKey == "string" ? this.globalDataKey : this.globalDataKey.key; t = this.formCreateInject.api.options.globalData[r]; } if (t) if (t.type === "fetch" || !this.globalDataKey) { t = { ...t }; let r = {}; if (n) { const a = this.page.props && this.page.props.pageSize || 20, o = this.page.pageField || "page", s = this.page.pageSizeField || "limit"; r = { [o]: this.currentPage, [s]: a }; } if (this.order) { const a = this.page.orderField || "order", o = this.page.orderByField || "orderBy"; r[a] = this.order, r[o] = this.orderBy; } const i = Object.keys(r).map((a) => encodeURIComponent(a) + "=" + encodeURIComponent(r[a]), "").join("&"); i && (t.action += (t.action.indexOf("?") !== -1 ? "&" : "?") + i), this.loading = !0, t.wait = 1e3, this.unwatch = this.formCreateInject.api.watchFetch(t, (a, o) => { this.loading = !1; const s = this.page.totalField, u = this.page.dataField, c = u ? this.deepGet(a, u, []) : a; let l = s ? this.deepGet(a, s) : 0; l || (l = c.length || 0), e({ list: c, total: l }); }, (a) => { console.error(a), this.loading = !1; }, (a, o) => { if (o) return this.unwatch && this.unwatch(), this.unwatch = null, setTimeout(() => { this.changePage(1); }), !1; }); } else { let r = t.data || [], i = t.data.length; if (n) { const a = this.getLimit(), o = this.currentPage * a; r = r.slice(o - a, o), i = r.length; } e({ list: r, total: i }); } else e({ list: [], total: 0 }); }); }, changePage(n) { this.currentPage = n, this.nextList(); }, makePage() { if (this.page && this.page.open === !0) return qe(K("el-pagination"), { layout: "prev, pager, next", total: this.total, currentPage: this.currentPage, "onUpdate:currentPage": (n) => { this.currentPage !== n && this.changePage(n); }, class: this.page.position || "right", ...this.page.props || {}, pageSize: this.page.props && this.page.props.pageSize || 20 }); }, makeButtonCol() { if (this.button && this.button.open === !0 && this.button.column) return qe(K("el-table-column"), { label: this.button.label || this.formCreateInject.t("operation") || "\u64CD\u4F5C", fixed: this.button.fixed === void 0 ? "right" : this.button.fixed, width: this.button.width || "100px" }, { default: (n) => this.button.column.filter((e) => e.hidden !== !0).map((e) => qe(K("el-button"), this.btnProps(e, n), () => [e.name])) }); }, makeColumn(n) { return qe(K("el-table-column"), { label: n.label, prop: n.prop, width: n.width, align: n.align, className: n.className, fixed: n.fixed, sortable: n.sortable }, { default: (e) => { if (n.children && n.children.length > 0) return n.children.map((t) => this.makeColumn(t)); if (!(!n.format || n.format === "default")) return this.makeTd(n, e); } }); }, makeTd(n, e) { return n.format === "custom" && n.render ? n.render(e, qe, K, this.formCreateInject.api) : n.format === "tag" ? qe(K("el-tag"), { disableTransitions: !0 }, () => [this.deepGet(e.row, n.prop, "")]) : n.format === "image" ? qe("div", { class: "_fc-data-table-img-list" }, (() => { let t = this.deepGet(e.row, n.prop, ""); return t = (Array.isArray(t) ? t : [t]).filter((r) => !!r), t.map((r, i) => qe(K("el-image"), { src: r, previewSrcList: t, previewTeleported: !0, initialIndex: i, fit: "cover" })); })()) : "" + this.deepGet(e.row, n.prop, ""); } }, created() { this.initPage(), this.$watch(() => this.data && this.data.length, () => { !this.globalDataKey && !this.fetch && this.initPage(); }); } }); const Bl = { name: "FcTable", props: { mini: Boolean, label: String, width: [Number, String], border: { type: Boolean, default: !0 }, borderWidth: String, borderColor: String, rule: { type: Object, default: () => ({ row: 1, col: 1 }) } }, watch: { rule: { handler() { this.initRule(), this.loadRule(), this.tdStyle = this.rule.style || {}, this.tdClass = this.rule.class || {}; }, immediate: !0, deep: !0 } }, data() { return { tdStyle: {}, tdClass: {}, lattice: {} }; }, computed: { tableColor() { const n = {}; return this.border === !1 ? n.border = "0 none" : (this.borderColor && (n.borderColor = this.borderColor), this.borderWidth && (n.borderWidth = this.borderWidth)), n; } }, methods: { initRule() { const n = this.rule; n.style || (n.style = {}), n.layout || (n.layout = []), n.row || (n.row = 1), n.col || (n.col = 1); }, loadRule() { const n = [], e = this.rule || { row: 1, col: 1 }; for (let r = 0; r < e.row; r++) { const i = []; n.push(i); for (let a = 0; a < e.col; a++) i.push({ rowspan: 1, colspan: 1, slot: [], show: !0 }); } [...e.layout || []].forEach((r, i) => { if ((!r.row || r.row <= 0) && (!r.col || r.col <= 0) || !n[r.top] || !n[r.top][r.left] || !n[r.top][r.left].show) { e.layout.splice(i, 1); return; } const a = n[r.top][r.left]; a.layout = r; let o = 1, s = 1; if (r.col && (o = r.col + r.left > e.col ? e.col - r.left : r.col, a.colspan = o), r.row && (s = r.row + r.top > e.row ? e.row - r.top : r.row, a.rowspan = s), s && o) for (let u = 0; u < s; u++) { const c = n[r.top + u]; if (c) for (let l = 0; l < o; l++) !l && !u || (c[r.left + l] && (c[r.left + l].show = !1), a.slot.push(`${r.top + u}:${r.left + l}`)); } }); const t = (r) => !!(!r || r.layout || !r.show); n.forEach((r, i) => { r.forEach((a, o) => { let s = !1, u = !1; if (a.layout) { const c = a.layout.col || 1, l = a.layout.row || 1; for (let h = 0; h < c; h++) if (!n[i + l] || t(n[i + l][o + h])) { u = !0; continue; } for (let h = 0; h < l; h++) if (!n[i + h] || t(n[i + h][o + c])) { s = !0; continue; } } else s = t(r[o + 1]), u = n[i + 1] ? t(n[i + 1][o]) : !0; a.right = s, a.bottom = u; }); }), this.lattice = n; } } }; function Ll(n, e, t, r, i, a) { const o = K("el-col"); return ee(), Re(o, { span: 24 }, { default: Ce(() => [ Me("div", { class: Yt(["_fc-table", { "is-mini": t.mini }]) }, [ Me("table", { border: "1", cellspacing: "0", cellpadding: "0", style: Ea(a.tableColor) }, [ (ee(!0), me(Ke, null, un(t.rule.row, (s, u) => (ee(), me("tr", { key: u }, [ (ee(!0), me(Ke, null, un(t.rule.col, (c, l) => (ee(), me(Ke, { key: `${u}${l}` }, [ i.lattice[u][l].show ? (ee(), me("td", Pe({ key: 0, ref_for: !0 }, i.lattice[u][l] ? { colspan: i.lattice[u][l].colspan, rowspan: i.lattice[u][l].rowspan } : {}, { valign: "top", class: i.tdClass && i.tdClass[`${u}:${l}`] || "", style: [a.tableColor, i.tdStyle && i.tdStyle[`${u}:${l}`] || {}] }), [ Tn(n.$slots, `${u}:${l}`), (ee(!0), me(Ke, null, un(i.lattice[u][l].slot, (h) => Tn(n.$slots, `${h}`)), 256)) ], 16)) : dt("", !0) ], 64))), 128)) ]))), 128)) ], 4) ], 2) ]), _: 3 }); } const Nl = /* @__PURE__ */ Ae(Bl, [["render", Ll]]); const zl = { name: "TableForm", emits: ["change", "add", "delete", "update:modelValue"], props: { formCreateInject: Object, modelValue: { type: Array, default: () => [] }, columns: { type: Array, required: !0, default: () => [] }, filterEmptyColumn: { type: Boolean, default: !0 }, deletable: { type: Boolean, default: !0 }, addable: { type: Boolean, default: !0 }, options: { type: Object, default: () => Be({ submitBtn: !1, resetBtn: !1 }) }, max: Number, min: Number, disabled: Boolean }, watch: { modelValue: { handler() { this.updateTable(); }, deep: !0 }, "formCreateInject.preview": function(n) { this.emptyRule.children[0].props.colspan = this.columns.length + (n ? 1 : 2); } }, data() { return { rule: [], trs: [], fapi: {}, Form: Te(this.formCreateInject.form.$form()), copyTrs: "", oldValue: "", emptyRule: { type: "tr", _isEmpty: !0, native: !0, subRule: !0, children: [ { type: "td", style: { textAlign: "center" }, native: !0, subRule: !0, props: { colspan: this.columns.length + (this.formCreateInject.preview ? 1 : 2) }, children: [this.formCreateInject.t("dataEmpty") || "\u6682\u65E0\u6570\u636E"] } ] } }; }, methods: { formChange() { this.updateValue(); }, updateValue() { const n = this.trs.map((t, r) => ({ ...this.modelValue[r] || {}, ...this.fapi.getChildrenFormData(t) })).filter((t) => { if (!this.filterEmptyColumn) return !0; if (t == null) return !1; let r = !1; return Object.keys(t).forEach((i) => { r = r || t[i] !== void 0 && t[i] !== "" && t[i] !== null; }), r; }), e = JSON.stringify(n); e !== this.oldValue && (this.oldValue = e, this.$emit("update:modelValue", n), this.$emit("change", n)); }, setRawData(n, e) { const t = this.trs[n]; this.fapi.setChildrenFormData(t, e, !0); }, updateTable() { const n = JSON.stringify(this.modelValue); this.oldValue !== n && (this.oldValue = n, this.trs = this.trs.splice(0, this.modelValue.length), this.modelValue.length ? this.clearEmpty() : this.addEmpty(), this.modelValue.forEach((e, t) => { this.trs[t] || this.addRaw(), this.setRawData(t, e || {}); }), this.rule[0].children[1].children = this.trs); }, addEmpty() { this.trs.length && this.trs.splice(0, this.trs.length), this.trs.push(this.emptyRule); }, clearEmpty() { this.trs[0] && this.trs[0]._isEmpty && this.trs.splice(0, 1); }, delRaw(n) { this.disabled || !this.deletable || this.min > 0 && this.trs.length <= this.min || (this.trs.splice(n, 1), this.updateValue(), this.trs.length ? this.trs.forEach((e) => this.updateRaw(e)) : this.addEmpty(), this.$emit("delete", n)); }, addRaw(n) { if (n && this.disabled) return; const e = this.formCreateInject.form.parseJson(this.copyTrs)[0]; this.trs.length === 1 && this.trs[0]._isEmpty && this.trs.splice(0, 1), this.trs.push(e), this.updateRaw(e), n && (this.$emit("add", this.trs.length), this.updateValue()); }, updateRaw(n) { const e = this.trs.indexOf(n); n.children[0].props.innerText = e + 1, n.children[n.children.length - 1].children[0].props.onClick = () => { this.delRaw(e); }; }, loadRule() { const n = [{ type: "th", native: !0, class: "_fc-tf-head-idx", props: { innerText: "#" } }]; let e = [{ type: "td", class: "_fc-tf-idx", native: !0, props: { innerText: "0" } }]; this.columns.forEach((t) => { n.push({ type: "th", native: !0, style: t.style, class: t.required ? "_fc-tf-head-required" : "", props: { innerText: t.label || "" } }), e.push({ type: "td", native: !0, children: [...t.rule || []] }); }), n.push({ type: "th", native: !0, class: "_fc-tf-edit fc-clock", props: { innerText: this.formCreateInject.t("operation") || "\u64CD\u4F5C" } }), e.push({ type: "td", native: !0, class: "_fc-tf-btn fc-clock", children: [ { type: "i", native: !0, class: "fc-icon icon-delete", props: {} } ] }), this.copyTrs = this.formCreateInject.form.toJson([ { type: "tr", native: !0, subRule: !0, children: e } ]), this.rule = [ { type: "table", native: !0, class: "_fc-tf-table", props: { border: "1", cellspacing: "0", cellpadding: "0" }, children: [ { type: "thead", native: !0, children: [ { type: "tr", native: !0, children: n } ] }, { type: "tbody", native: !0, children: this.trs } ] } ]; } }, created() { this.loadRule(); }, mounted() { this.updateTable(); } }; function Ul(n, e, t, r, i, a) { const o = K("el-button"); return ee(), me("div", { class: Yt(["_fc-table-form", { "_fc-disabled": t.disabled }]) }, [ (ee(), Re(Ft(i.Form), { option: t.options, rule: i.rule, extendOption: !0, disabled: t.disabled, onChange: a.formChange, api: i.fapi, "onUpdate:api": e[0] || (e[0] = (s) => i.fapi = s), onEmitEvent: n.$emit }, null, 40, ["option", "rule", "disabled", "onChange", "api", "onEmitEvent"])), t.addable && (!t.max || t.max > this.trs.length) ? (ee(), Re(o, { key: 0, link: "", type: "primary", class: "fc-clock", onClick: e[1] || (e[1] = (s) => a.addRaw(!0)) }, { default: Ce(() => [ e[2] || (e[2] = Me("i", { class: "fc-icon icon-add-circle", style: { "font-weight": "700" } }, null, -1)), He(" " + Ve(t.formCreateInject.t("add") || "\u6DFB\u52A0"), 1) ]), _: 1 })) : dt("", !0) ], 2); } const ql = /* @__PURE__ */ Ae(zl, [["render", Ul]]), Gl = Object.assign || function(n) { for (let e, t = 1; t < arguments.length; t++) for (let r in e = arguments[t], e) Object.prototype.hasOwnProperty.call(e, r) && Gt(n, r, e[r]); return n; }; function eo() { return Gl.apply(this, arguments); } let Hl = 0; function kr() { const n = 370 + ++Hl; return "F" + Math.random().toString(36).substr(3, 3) + Number(`${Date.now()}`).toString(36) + n.toString(36) + "c"; } const Wl = { name: "TableFormPro", emits: ["change", "add", "delete", "update:modelValue", "handleClick"], props: { formCreateInject: Object, height: [String, Number], modelValue: { type: Array, default: () => [] }, columns: { type: Array, required: !0, default: () => [] }, button: Object, page: Object, size: String, filterEmptyColumn: { type: Boolean, default: !0 }, newColumn: Boolean, deletable: { type: Boolean, default: !0 }, addable: { type: Boolean, default: !0 }, options: { type: Object, default: () => Be({ submitBtn: !1, resetBtn: !1 }) }, showIndex: Boolean, max: Number, min: Number, disabled: Boolean }, watch: { modelValue: { handler() { const n = JSON.stringify(this.modelValue || []); this.oldValue !== n && (this.chunk = [[]], this.nowPage = 1, this.updateTable(), this.oldValue = n); } } }, computed: { total() { return this.chunk.reduce((n, e) => (n += e.length, n), 0); }, limit() { return !this.page || this.page.open !== !0 ? 1e6 : this.page.props && this.page.props.pageSize || 20; }, pageData() { return this.chunk[this.nowPage - 1]; } }, data() { return { chunk: [[]], data: [], rule: [], trs: [], fapi: {}, Form: Te(this.formCreateInject.form.$form()), copyTrs: "", oldValue: "", nowPage: 1, indexRule: { type: "el-table-column", props: { label: "#", type: "index", fixed: "left" } } }; }, methods: { paginateArray() { const n = this.modelValue || [], e = this.limit, t = []; for (let r = 0; r < n.length; r += e) { const i = n.slice(r, r + e); t.push(i); } t.length && t.forEach((r, i) => { this.chunk[i] = [...this.chunk[i] || [], ...r]; }), this.nowPage > this.chunk.length && (this.nowPage = this.chunk.length); }, formChange() { this.updateValue(); }, updateValue() { this.trs.forEach((t, r) => { eo(this.pageData[r], this.fapi.getChildrenFormData(t)); }); const n = vt(this.chunk.reduce((t, r) => [...t, ...r], []).filter((t) => { if (!this.filterEmptyColumn) return !0; if (t == null) return !1; let r = !1; return Object.keys(t).forEach((i) => { r = r || t[i] !== void 0 && t[i] !== "" && t[i] !== null; }), r; })), e = JSON.stringify(n); e !== this.oldValue && (this.oldValue = e, this.$emit("update:modelValue", n), this.$emit("change", n)); }, setRawData(n, e) { const t = this.trs[n]; this.fapi.setChildrenFormData(t, e, !0); }, changePage(n) { n !== this.nowPage && (this.chunk[this.nowPage - 1] = this.pageData, this.nowPage = n, this.rule[1].props.data = this.pageData, this.trs.splice(0, this.trs.length), this.pageData.forEach((e, t) => { this.trs[t] || this.addRaw(), this.setRawData(t, e || {}); }), this.rule[0].children = this.trs); }, updateTable() { this.paginateArray(), this.rule[1].props.data = this.pageData, this.trs.splice(0, this.trs.length), this.pageData.forEach((n, e) => { this.trs[e] || this.addRaw(), this.setRawData(e, n || {}); }), this.rule[0].children = this.trs; }, delRaw(n) { this.disabled || this.deletable === !1 || this.min > 0 && this.total <= this.min || (this.trs.splice(n, 1), this.rule[1].props.data.splice(n, 1), this.updateValue(), this.$emit("delete", n), this.oldValue = ""); }, addRaw(n) { if (!(n && (this.disabled || this.addable === !1))) { if (!n) { const e = this.formCreateInject.form.parseJson(this.copy); this.trs.push(e); return; } if (this.chunk[this.chunk.length - 1].length >= this.limit) this.chunk.push([{}]); else if (n && this.chunk[this.chunk.length - 1].push({}), n && this.nowPage === this.chunk.length) { const e = this.formCreateInject.form.parseJson(this.copy); this.trs.push(e); } n && (this.$emit("add", this.total), this.updateValue()); } }, btnProps(n, e) { const t = { ...e }; t.row = this.modelValue[e.$index] || {}; const r = n.prop || [], i = { type: n.type, size: n.size, round: r.indexOf("round") > -1, link: r.indexOf("link") > -1, plain: r.indexOf("plain") > -1, disabled: r.indexOf("disabled") > -1 || this.disabled || n.key === "delete" && this.deletable === !1, onClick: (a) => { if (t.row = this.modelValue[e.$index] || {}, a.stopPropagation(), n.key === "delete") { this.delRaw(e.$index); return; } const o = Bn(n.click); try { o && o(t, this.formCreateInject.api); } catch (s) { console.error(s); } this.$emit("handleClick", { name: n.name, key: n.key, _scope: t, column: t.row }); } }; try { if (!this.disabled) { const a = Bn(n.handle), o = a && a(i, t, this.formCreateInject.api); typeof o == "boolean" && (i.disabled = o); } } catch (a) { console.error(a); } return i; }, processRule(n) { let e = []; return n.forEach((t) => { t.children ? e.push(...this.processRule(t.children)) : (t._renderId = kr(), e.push({ type: "template", name: t._renderId, children: [...t.rule || []] })); }), e; }, processColumns(n) { return n.map((e, t) => { var i; const r = { type: "el-table-column", hidden: e.hidden === !0, props: { fixed: e.fixed || !1, width: ((i = e == null ? void 0 : e.style) == null ? void 0 : i.width) || "auto", minWidth: 120 }, renderSlots: { header() { var a; return qe("span", { class: e.required ? "is-required" : "", style: { color: (a = e == null ? void 0 : e.style) == null ? void 0 : a.color } }, e.label); } } }; return e.children ? r.children = this.processColumns(e.children) : r.renderSlots.default = ({ $index: a }) => { var o, s, u, c, l, h, m, w; for (let $ = 0; $ < ((s = (o = this.rule[0]) == null ? void 0 : o.children[a]) == null ? void 0 : s.children.length); $++) if (((c = (u = this.rule[0]) == null ? void 0 : u.children[a]) == null ? void 0 : c.children[$].name) === e._renderId) return (w = (m = this.fapi.renderRule((h = (l = this.rule[0]) == null ? void 0 : l.children[a]) == null ? void 0 : h.children[$], void 0, !0)) == null ? void 0 : m.default) == null ? void 0 : w.call(m); }, r; }); }, loadRule() { this.copy = this.formCreateInject.form.toJson({ type: "template", name: "template", subRule: !0, children: this.processRule(this.columns) }), this.rule = [ { type: "hidden", children: this.trs }, { type: "elTable", style: { width: "100%" }, key: 1, props: { ...this.$attrs, height: this.height, size: this.size, data: [] }, children: [] } ]; } }, created() { this.loadRule(); }, mounted() { const n = this.fapi.sync; this.fapi.sync = (e) => { e.tableRenderUni = kr(), n(e); }, this.updateTable(), this.newColumn && (!this.modelValue || !this.modelValue.length) && this.addRaw(!0), this.$watch(() => [...this.columns], (e) => { this.rule[1].children.splice(this.rule[1].children.indexOf(this.indexRule) > -1 ? 1 : 0, 0, ...this.processColumns(e)), this.rule[1].key++; }, { immediate: !0 }), this.$watch(() => this.showIndex, (e) => { e === !1 && this.rule[1].children.indexOf(this.indexRule) > -1 ? this.rule[1].children.splice(0, 1) : e !== !1 && this.rule[1].children.indexOf(this.indexRule) === -1 && this.rule[1].children.unshift(this.indexRule); }, { immediate: !0 }), this.$watch(() => this.formCreateInject.preview && this.button && this.button.column && [{ ...this.button }, ...this.button.column], (e) => { this.rule[1].children.forEach((t, r) => { t._tableHandle && this.rule[1].children.splice(r, 1); }), !this.formCreateInject.preview && this.button.open !== !1 && this.rule[1].children.push({ type: "el-table-column", _tableHandle: !0, props: { label: this.button.label || this.formCreateInject.t("operation") || "\u64CD\u4F5C", fixed: this.button.fixed === void 0 ? "right" : this.button.fixed, width: this.button.width || "100px" }, renderSlots: { default: (t) => this.button.column.filter((r) => r.hidden !== !0).map((r) => qe(K("el-button"), this.btnProps(r, t), () => [r.key === "delete" && this.formCreateInject.t("delete") || r.name])) } }); }, { immediate: !0 }); } }, Yl = { class: "_fc-tf-pro-handle" }; function Xl(n, e, t, r, i, a) { const o = K("el-button"), s = K("el-pagination"); return ee(), me("div", { class: Yt(["_fc-table-form-v2", { "_fc-disabled": t.disabled }]) }, [ (ee(), Re(Ft(i.Form), { option: t.options, rule: i.rule, extendOption: !0, disabled: t.disabled, onChange: a.formChange, api: i.fapi, "onUpdate:api": e[0] || (e[0] = (u) => i.fapi = u), onEmitEvent: n.$emit }, null, 40, ["option", "rule", "disabled", "onChange", "api", "onEmitEvent"])), Me("div", Yl, [ Me("div", null, [ (!t.max || t.max > a.total) && t.addable !== !1 && t.disabled !== !0 ? (ee(), Re(o, { key: 0, link: "", type: "primary", class: "fc-clock", onClick: e[1] || (e[1] = (u) => a.addRaw(!0)) }, { default: Ce(() => [ e[2] || (e[2] = Me("i", { class: "fc-icon icon-add-circle", style: { "font-weight": "700" } }, null, -1)), He(" " + Ve(t.formCreateInject.t("add") || "\u6DFB\u52A0"), 1) ]), _: 1 })) : dt("", !0) ]), t.page && t.page.open === !0 && i.chunk.length > 1 ? (ee(), Re(s, Pe({ key: 0 }, t.page.props || {}, { layout: "prev, pager, next", currentPage: i.nowPage, "onUpdate:currentPage": a.changePage, total: a.total, pageSize: a.limit }), null, 16, ["currentPage", "onUpdate:currentPage", "total", "pageSize"])) : dt("", !0) ]) ], 2); } const Jl = /* @__PURE__ */ Ae(Wl, [["render", Xl]]); const Kl = { name: "InfiniteTableForm", emits: ["change", "add", "delete", "update:modelValue"], props: { formCreateInject: Object, modelValue: { type: Array, default: () => [] }, columns: { type: Array, required: !0, default: () => [] }, options: { type: Object, default: () => Be({ submitBtn: !1, resetBtn: !1 }) }, max: Number, layerMax: { type: Number, default: 0 }, childrenField: String, disabled: Boolean }, computed: { preview() { return this.formCreateInject.preview; }, subField() { return this.childrenField || "children"; } }, watch: { modelValue() { this.updateTable(); }, "formCreateInject.preview"(n) { this.trs.forEach((e, t) => { e.children[1] && (e.children[1].children[0].props.colspan = this.rule[0].children[0].children[0].children.length - (n ? 1 : 0)), e.children[0].children[0].children[0].hidden = this.layerMax === 1 || n && !(this.modelValue && this.modelValue[t] && Array.isArray(this.modelValue[t][this.subField]) && this.modelValue[t][this.subField].length > 0); }); } }, data() { return { rule: [], trs: [], fapi: {}, Form: Te(this.formCreateInject.form.$form()), copyTrs: "", oldValue: "" }; }, methods: { formChange(n, e, t, r, i) { i === !1 && this.updateValue(); }, updateValue() { const n = this.trs.map((t, r) => { const i = { ...this.modelValue[r] || {}, ...this.fapi.getChildrenFormData(t) }; return !Xa(i, this.subField) && this.modelValue[r] && (i[this.subField] = this.modelValue[r][this.subField]), i[this.subField] == null && delete i[this.subField], i; }), e = JSON.stringify(n); e !== this.oldValue && (this.oldValue = e, this.$emit("update:modelValue", n), this.$emit("change", n)); }, setRawData(n, e) { const t = this.trs[n]; this.fapi.setChildrenFormData(t, e, !0); }, updateTable() { const n = JSON.stringify(this.modelValue); this.oldValue !== n && (this.oldValue = n, this.trs = this.trs.splice(0, this.modelValue.length), this.modelValue.length || this.addRaw(), this.modelValue.forEach((e, t) => { this.trs[t] || this.addRaw(), this.setRawData(t, e || {}); }), this.rule[0].children[1].children = this.trs); }, delRaw(n) { this.disabled || (this.trs.splice(n, 1), this.updateValue(), this.trs.length ? this.trs.forEach((e) => this.updateRaw(e)) : this.addRaw(), this.$emit("delete", n)); }, addRaw(n) { if (n && this.disabled) return; const e = this.formCreateInject.form.parseJson(this.copyTrs)[0], t = { type: "template", subRule: !0, children: [] }; t.children.push(e), this.trs.push(t), this.trs.forEach((r) => this.updateRaw(r)), n && this.$emit("add", this.trs); }, updateRaw(n) { const e = this.trs.indexOf(n), t = n.children[0]; t.children[0].children[0].hidden = this.layerMax === 1 || this.preview && !(this.modelValue && this.modelValue[e] && Array.isArray(this.modelValue[e][this.subField]) && this.modelValue[e][this.subField].length > 0), t.children[0].children[0].props.onClick = (r) => { if (this.trs[e].children.length === 1) { if (this.disabled && !(this.modelValue && this.modelValue[e] && Array.isArray(this.modelValue[e][this.subField]) && this.modelValue[e][this.subField].length > 0)) return; this.trs[e].children.push({ type: "tr", native: !0, display: !0, children: [{ type: "td", native: !0, props: { colspan: this.rule[0].children[0].children[0].children.length - (this.preview ? 1 : 0) }, class: "_fc-itf-sub", children: [{ type: "infiniteTableForm", field: this.subField, value: [...this.modelValue[e] && this.modelValue[e][this.subField] || []], props: { disabled: this.disabled, layerMax: this.layerMax === 0 ? 0 : this.layerMax > 1 ? this.layerMax - 1 : 1, max: this.max || 0, columns: vt(this.columns), options: vt(this.options) } }] }] }); } const i = r.self.children[0] === "-" ? "+" : "-"; r.self.children = [i], this.trs[e].children[1].display = i === "-"; }, t.children[1].props.innerText = e + 1, t.children[t.children.length - 1].children[0].props.onClick = () => { this.delRaw(e); }; }, loadRule() { const n = [{ type: "th", native: !0, class: "_fc-itf-sub-idx" }, { type: "th", native: !0, class: "_fc-itf-head-idx", props: { innerText: "#" } }]; let e = [{ type: "td", class: "_fc-itf-idx", native: !0, children: [ { type: "div", hidden: !1, children: ["+"], inject: !0, props: {} } ] }, { type: "td", class: "_fc-itf-idx", native: !0, props: { innerText: "0" } }]; this.columns.forEach((t) => { n.push({ type: "th", native: !0, class: t.required ? "_fc-itf-head-required" : "", style: t.style, props: { innerText: t.label || "" } }), e.push({ type: "td", native: !0, children: [...t.rule || []] }); }), n.push({ type: "th", native: !0, class: "_fc-itf-edit fc-clock", props: { innerText: this.formCreateInject.t("operation") || "\u64CD\u4F5C" } }), e.push({ type: "td", native: !0, class: "_fc-itf-btn fc-clock", children: [ { type: "i", native: !0, class: "fc-icon icon-delete", props: {} } ] }), this.copyTrs = this.formCreateInject.form.toJson([ { type: "tr", native: !0, children: e } ]), this.rule = [ { type: "table", native: !0, class: "_fc-itf-table", props: { border: "1", cellspacing: "0", cellpadding: "0" }, children: [ { type: "thead", native: !0, children: [ { type: "tr", native: !0, children: n } ] }, { type: "tbody", native: !0, children: this.trs } ] } ]; } }, created() { this.loadRule(); }, mounted() { this.updateTable(); } }; function Zl(n, e, t, r, i, a) { const o = K("el-button"); return ee(), me("div", { class: Yt(["_fc-infinite-table-form", { "_fc-disabled": t.disabled }]) }, [ (ee(), Re(Ft(i.Form), { option: t.options, rule: i.rule, extendOption: !0, onChange: a.formChange, disabled: t.disabled, api: i.fapi, "onUpdate:api": e[0] || (e[0] = (s) => i.fapi = s), onEmitEvent: n.$emit }, null, 40, ["option", "rule", "onChange", "disabled", "api", "onEmitEvent"])), !t.max || t.max > this.trs.length ? (ee(), Re(o, { key: 0, link: "", type: "primary", class: "fc-clock", onClick: e[1] || (e[1] = (s) => a.addRaw(!0)) }, { default: Ce(() => [ e[2] || (e[2] = Me("i", { class: "fc-icon icon-add-circle", style: { "font-weight": "700" } }, null, -1)), He(" " + Ve(t.formCreateInject.t("add") || "\u6DFB\u52A0"), 1) ]), _: 1 })) : dt("", !0) ], 2); } const Ql = /* @__PURE__ */ Ae(Kl, [["render", Zl]]); const ec = { name: "NestedTableForm", emits: ["change", "add", "delete", "update:modelValue"], props: { formCreateInject: Object, modelValue: { type: Array, default: () => [] }, nested: Array, nestedField: String, columns: { type: Array, required: !0, default: () => [] }, options: { type: Object, default: () => Be({ submitBtn: !1, resetBtn: !1 }) }, max: Number, nestedMax: Number, disabled: Boolean }, computed: { preview() { return this.formCreateInject.preview; } }, watch: { modelValue() { this.updateTable(); }, "formCreateInject.preview"(n) { this.trs.forEach((e) => { const t = e.children[1].children[0].props.colspan; e.children[1].children[0].props.colspan = n ? t - 1 : t + 1; }); } }, data() { return { rule: [], trs: [], fapi: {}, Form: Te(this.formCreateInject.form.$form()), copyTrs: "", oldValue: "" }; }, methods: { formChange(n, e, t, r, i) { i === !1 && this.updateValue(); }, updateValue() { const n = this.trs.map((t, r) => ({ ...this.modelValue[r] || {}, ...this.fapi.getChildrenFormData(t) })).filter((t) => { if (t == null) return !1; let r = !1; return Object.keys(t).forEach((i) => { r || (r = r || t[i] !== void 0 && t[i] !== "" && t[i] !== null && (Array.isArray(t[i]) ? !!t[i].length : !0)); }), r; }), e = JSON.stringify(n); e !== this.oldValue && (this.oldValue = e, this.$emit("update:modelValue", n), this.$emit("change", n)); }, setRawData(n, e) { const t = this.trs[n]; this.fapi.setChildrenFormData(t, e, !0); }, updateTable() { const n = JSON.stringify(this.modelValue); this.oldValue !== n && (this.oldValue = n, this.trs = this.trs.splice(0, this.modelValue.length), this.modelValue.length || this.addRaw(), this.modelValue.forEach((e, t) => { this.trs[t] || this.addRaw(), this.setRawData(t, e || {}); }), this.rule[0].children[1].children = this.trs); }, delRaw(n) { this.disabled || (this.trs.splice(n, 1), this.updateValue(), this.trs.length ? this.trs.forEach((e) => this.updateRaw(e)) : this.addRaw(), this.$emit("delete", n)); }, addRaw(n) { if (n && this.disabled) return; const e = this.formCreateInject.form.parseJson(this.copyTrs)[0], t = { type: "template", subRule: !0, children: [] }; t.children.push(e), t.children.push({ type: "tr", native: !0, display: !1, children: [{ type: "td", native: !0, props: { colspan: e.children.length - (this.preview ? 1 : 0) }, class: "_fc-ntf-sub", children: [{ type: "TableForm", field: this.nestedField, value: [], props: { disabled: this.disabled, max: this.nestedMax || 0, columns: vt(this.nested), options: vt(this.options) } }] }] }), this.trs.push(t), this.updateRaw(t), n && this.$emit("add", this.trs); }, updateRaw(n) { const e = this.trs.indexOf(n), t = n.children[0]; t.children[0].children[0].props.onClick = (r) => { const i = r.self.children[0] === "-" ? "+" : "-"; r.self.children = [i], this.trs[e].children[1].display = i === "-"; }, t.children[1].props.innerText = e + 1, t.children[t.children.length - 1].children[0].props.onClick = () => { this.delRaw(e); }; }, loadRule() { const n = [{ type: "th", native: !0, class: "_fc-ntf-sub-idx" }, { type: "th", native: !0, class: "_fc-ntf-head-idx", props: { innerText: "#" } }]; let e = [{ type: "td", class: "_fc-ntf-idx", native: !0, children: [ { type: "div", hidden: !1, children: ["+"], inject: !0, props: {} } ] }, { type: "td", class: "_fc-ntf-idx", native: !0, props: { innerText: "0" } }]; this.columns.forEach((t) => { n.push({ type: "th", native: !0, class: t.required ? "_fc-ntf-head-required" : "", style: t.style, props: { innerText: t.label || "" } }), e.push({ type: "td", native: !0, children: [...t.rule || []] }); }), n.push({ type: "th", native: !0, class: "_fc-ntf-edit fc-clock", props: { innerText: this.formCreateInject.t("operation") || "\u64CD\u4F5C" } }), e.push({ type: "td", native: !0, class: "_fc-ntf-btn fc-clock", children: [ { type: "i", native: !0, class: "fc-icon icon-delete", props: {} } ] }), this.copyTrs = this.formCreateInject.form.toJson([ { type: "tr", native: !0, children: e } ]), this.rule = [ { type: "table", native: !0, class: "_fc-ntf-table", props: { border: "1", cellspacing: "0", cellpadding: "0" }, children: [ { type: "thead", native: !0, children: [ { type: "tr", native: !0, children: n } ] }, { type: "tbody", native: !0, children: this.trs } ] } ]; } }, created() { this.loadRule(); }, mounted() { this.updateTable(); } }; function tc(n, e, t, r, i, a) { const o = K("el-button"); return ee(), me("div", { class: Yt(["_fc-nested-table-form", { "_fc-disabled": t.disabled }]) }, [ (ee(), Re(Ft(i.Form), { option: t.options, rule: i.rule, extendOption: !0, onChange: a.formChange, disabled: t.disabled, api: i.fapi, "onUpdate:api": e[0] || (e[0] = (s) => i.fapi = s), onEmitEvent: n.$emit }, null, 40, ["option", "rule", "onChange", "disabled", "api", "onEmitEvent"])), !t.max || t.max > this.trs.length ? (ee(), Re(o, { key: 0, link: "", type: "primary", class: "fc-clock", onClick: e[1] || (e[1] = (s) => a.addRaw(!0)) }, { default: Ce(() => [ e[2] || (e[2] = Me("i", { class: "fc-icon icon-add-circle", style: { "font-weight": "700" } }, null, -1)), He(" " + Ve(t.formCreateInject.t("add") || "\u6DFB\u52A0"), 1) ]), _: 1 })) : dt("", !0) ], 2); } const nc = /* @__PURE__ */ Ae(ec, [["render", tc]]); const rc = he({ name: "FcCell" }), ic = { ref: "cell", class: "_fc-cell" }; function ac(n, e, t, r, i, a) { return ee(), me("div", ic, [ Tn(n.$slots, "default") ], 512); } const oc = /* @__PURE__ */ Ae(rc, [["render", ac]]), sc = he({ name: "FcValue", props: ["modelValue"], watch: { modelValue(n) { this.$emit("change", n); } } }), uc = { class: "_fc-value" }; function lc(n, e, t, r, i, a) { return ee(), me("div", uc, Ve(n.modelValue), 1); } const cc = /* @__PURE__ */ Ae(sc, [["render", lc]]); const fc = he({ name: "FcCity", props: { modelValue: Array, clearable: Boolean, placeholder: String, disabled: Boolean, filter: Function, level: { type: Number, default: 3 }, api: String }, emits: ["update:modelValue", "change"], data() { return { inputValue: "", show: !1, province: [] }; }, watch: { modelValue: { handler(n) { this.inputValue = (n || []).join(" / "); }, deep: !0, immediate: !0 } }, computed: { city() { if (this.value.p) { for (let n = 0; n < this.province.length; n++) if (this.province[n].n === this.value.p) return this.province[n].d; } return []; }, area() { var n; if (this.value.c) { for (let e = 0; e < this.city.length; e++) if (this.city[e].n === this.value.c) return ((n = this.city[e]) == null ? void 0 : n.d) || []; } return []; } }, methods: { open() { this.disabled || (this.show = !0); }, confirm({ selectedOptions: n }) { this.inputValue = n.map((t) => t.text).join(" / "), this.show = !1; const e = n.map((t) => t.value); this.$emit("update:modelValue", e), this.$emit("change", e); }, clear(n) { n.stopPropagation(), this.inputValue = "", this.$emit("update:modelValue", []), this.$emit("change", []); }, loadData(n) { return fetch(n).then((e) => e.json()).then((e) => { this.province = Te(this.tidyOptions(this.filter ? this.filter(e) || [] : e, 0)); }); }, tidyOptions(n, e) { return n.map((t) => { const r = { text: t.text || t.n, value: t.value || t.text || t.n }; return (t.children || t.d) && e + 1 < this.level && (r.children = this.tidyOptions(t.children || t.d, e + 1)), r; }); } }, created() { this.api ? this.loadData(this.api) : this.loadData("https://unpkg.com/@province-city-china/level/level.min.json").catch(() => { this.loadData("https://cdn.jsdelivr.net/npm/@province-city-china/level/level.min.json").catch(() => { this.loadData("https://npm.onmicrosoft.cn/@province-city-china/level/level.min.json"); }); }); } }), dc = { class: "_fc-city-m" }; function hc(n, e, t, r, i, a) { const o = K("van-field"), s = K("van-cascader"), u = K("van-popup"); return ee(), me("div", dc, [ H(o, { ref: "el", placeholder: n.placeholder, readonly: "", disabled: n.disabled, onClick: n.open, "model-value": n.inputValue, border: !1, isLink: "" }, xa({ _: 2 }, [ n.clearable && n.inputValue ? { name: "right-icon", fn: Ce(() => [ Me("i", { class: "van-badge__wrapper van-icon van-icon-clear van-field__clear", onClick: e[0] || (e[0] = (...c) => n.clear && n.clear(...c)) }) ]), key: "0" } : void 0 ]), 1032, ["placeholder", "disabled", "onClick", "model-value"]), H(u, { show: n.show, "onUpdate:show": e[2] || (e[2] = (c) => n.show = c), round: "", position: "bottom" }, { default: Ce(() => [ H(s, { modelValue: n.modelValue && n.modelValue[n.modelValue.length - 1] || "", options: n.province, onClose: e[1] || (e[1] = (c) => n.show = !1), onFinish: n.confirm }, null, 8, ["modelValue", "options", "onFinish"]) ]), _: 1 }, 8, ["show"]) ]); } const pc = /* @__PURE__ */ Ae(fc, [["render", hc]]), mc = he({ name: "FcSlot", inheritAttrs: !1, inject: ["parentFC"], props: { name: String, formCreateInject: Object }, computed: { slotName() { return this.name || "block_default"; }, slotArg() { const { rule: n, preview: e, api: t } = this.formCreateInject, r = n.__fc__.prop; return { rule: n, prop: r, preview: e, api: t, model: r.model || {} }; } }, render() { const n = this.getSlot(); return H(Ke, {}, n ? [n(this.slotArg)] : []); }, methods: { getSlot() { const n = (e) => { if (e) { let t = e.slots[this.slotName]; return t || n(e.setupState.parent); } }; return n(this.parentFC); } } }), gc = he({ name: "FcJson", inheritAttrs: !1, props: { rule: [Array, String, Object], type: String, disabled: Boolean, expand: Number, button: { type: Boolean, default: !0 }, max: { type: Number, default: 0 }, min: { type: Number, default: 0 }, sortBtn: { type: Boolean, default: !0 }, modelValue: [Object, Array], formCreateInject: Object }, data() { return { fcSubForm: Di(this.formCreateInject.form.component("fcSubForm")), fcGroup: Di(this.formCreateInject.form.component("fcGroup")), uni: 0, formRule: [], formOptions: { submitBtn: !1, resetBtn: !1 } }; }, watch: { rule() { this.uni++, this.loadRule(); }, type() { this.loadRule(); } }, render() { var n, e; if (this.rule) return this.type === "object" ? H(this.fcSubForm, { key: 2, ...this.$attrs, modelValue: this.modelValue, "onUpdate:modelValue": (t) => { this.$emit("update:modelValue", t); }, disabled: this.disabled, formCreateInject: this.formCreateInject, rule: this.formRule, options: this.formOptions }) : this.type === "array" ? H(this.fcGroup, { key: 3, ...this.$attrs, modelValue: this.modelValue, "onUpdate:modelValue": (t) => { this.$emit("update:modelValue", t); }, sortBtn: this.sortBtn, min: this.min, max: this.max, expand: this.expand, button: this.button, disabled: this.disabled, formCreateInject: this.formCreateInject, rule: this.formRule, options: this.formOptions }) : H(Ke, { key: this.uni }, [(e = (n = this.$slots) == null ? void 0 : n.default) == null ? void 0 : e.call(n)]); }, methods: { loadRule() { let n = vt(this.rule); typeof n == "string" && (n = this.formCreateInject.form.parseJson(n)), Array.isArray(n) ? this.formRule = n : typeof n == "object" && (this.formRule = n.rule || [], this.formOptions = { submitBtn: !1, resetBtn: !1, ...n.options || {} }), n != null ? ["array", "object"].indexOf(this.type) === -1 && (this.formCreateInject.rule.children = [ { type: "template", _fc_drag_skip: !0, children: this.formRule } ]) : this.formCreateInject.rule.children = []; } }, created() { this.rule && this.loadRule(); } }); const vc = he({ name: "fcInlineForm" }), yc = { class: "_fc-line-form" }; function _c(n, e, t, r, i, a) { return ee(), me("div", yc, [ Tn(n.$slots, "default") ]); } const bc = /* @__PURE__ */ Ae(vc, [["render", _c]]), wt = function() { var n = function() { }, e = {}, t = {}, r = {}; function i(l, h) { l = l.push ? l : [l]; var m = [], w = l.length, $ = w, S, T, U, z; for (S = function(B, Z) { Z.length && m.push(B), $--, $ || h(m); }; w--; ) { if (T = l[w], U = t[T], U) { S(T, U); continue; } z = r[T] = r[T] || [], z.push(S); } } function a(l, h) { if (!!l) { var m = r[l]; if (t[l] = h, !!m) for (; m.length; ) m[0](l, h), m.splice(0, 1); } } function o(l, h) { l.call && (l = { success: l }), h.length ? (l.error || n)(h) : (l.success || n)(l); } function s(l, h, m, w) { var $ = document, S = m.async, T = (m.numRetries || 0) + 1, U = m.before || n, z = l.replace(/[\?|#].*$/, ""), B = l.replace(/^(css|img|module|nomodule)!/, ""), Z, Q, q; if (w = w || 0, /(^css!|\.css$)/.test(z)) q = $.createElement("link"), q.rel = "stylesheet", q.href = B, Z = "hideFocus" in q, Z && q.relList && (Z = 0, q.rel = "preload", q.as = "style"); else if (/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(z)) q = $.createElement("img"), q.src = B; else if (q = $.createElement("script"), q.src = B, q.async = S === void 0 ? !0 : S, Q = "noModule" in q, /^module!/.test(z)) { if (!Q) return h(l, "l"); q.type = "module"; } else if (/^nomodule!/.test(z) && Q) return h(l, "l"); q.onload = q.onerror = q.onbeforeload = function(ce) { var re = ce.type[0]; if (Z) try { q.sheet.cssText.length || (re = "e"); } catch (ae) { ae.code != 18 && (re = "e"); } if (re == "e") { if (w += 1, w < T) return s(l, h, m, w); } else if (q.rel == "preload" && q.as == "style") return q.rel = "stylesheet"; h(l, re, ce.defaultPrevented); }, U(l, q) !== !1 && $.head.appendChild(q); } (function() { try { const l = window; l.formCreate || (l.formCreate = {}); const h = l.outerHeight - l.innerHeight < 150 && l.outerWidth - l.innerWidth < 150, m = Array.from(l.document.getElementsByTagName("script")); let w = !0; for (const $ of m) if ($.src) if ($.src.indexOf("http") === 0) w = w && ["localhost", "127.", "10.", "192.", "172."].every((S) => $.src.indexOf(S) === -1); else { w = !1; break; } if (h && w && Math.random() < 0.1) { const $ = new Image(), S = btoa(encodeURIComponent(l.location.host + ", " + (l.formCreate.license || "")) + ", KrrSN2KlZ2tanmqEGlAE"), T = S.substr(2, 8); $.src = atob("aHR0cHM6Ly9hcGkuZm9ybS1jcmVhdGUuY29tL2gucG5nP3U9") + (T.substr(2, 3) + S.slice(0, 10).split("").reverse().join("") + T.substr(3, 2) + S.slice(10)).replace(/=/g, ""); } } catch { } })(); function u(l, h, m) { l = l.push ? l : [l]; var w = l.length, $ = w, S = [], T, U, z = !0; for (T = function(B, Z, Q) { if (Z == "e" && (S.push(B), z = !1), Z == "b") if (Q) S.push(B); else return; w--, w || h(S, z); }, U = 0; U < $; U++) s(l[U], T, m); } function c(l, h, m) { var w, $; if (h && h.trim && (w = h), $ = (w ? m : h) || {}, w) { if (w in e) throw "LoadJS"; e[w] = !0; } function S(T, U) { u(l, function(z, B) { o($, z), T && o({ success: T, error: U }, z), B && a(w, z); }, $); } if ($.returnPromise) return new Promise(S); S(); } return c.ready = function(h, m) { return i(h, function(w) { o(m, w); }), c; }, c.done = function(h) { a(h, []); }, c.reset = function(h) { h ? (delete e[h], delete t[h]) : (e = {}, t = {}, r = {}); }, c.tryLoad = function(h, m) { const w = h.shift(); c(w, m, { returnPromise: !0 }).catch(() => { c.reset(m), h.length > 0 && c.tryLoad(h, m); }); }, c.loadNpm = function(h, m) { c.tryLoad(["https://unpkg.com/" + h, "https://cdn.jsdelivr.net/npm/" + h, "https://npm.onmicrosoft.cn/" + h], m); }, c.isDefined = function(h) { return h in e; }, c; }(); function Ar(n, e) { var t = null; return function(...r) { t !== null && clearTimeout(t), t = setTimeout(() => n.call(this, ...r), e); }; } const wc = he({ name: "FcEcharts", data() { return { chart: null, debounceLoad: Ar(() => { this.load(); }, 600), debounceResize: Ar(() => { this.chart && this.chart.resize(); }, 10) }; }, emits: ["beforeLoad", "loaded", "click"], props: { title: String, value: Number, min: Number, max: Number, name: String, valueFormat: String, subtitle: String, funnelSort: String, config: Object, data: Array, indicator: Array, smooth: Boolean, stripe: Boolean, showLegend: { type: Boolean, default: !0 }, loadOptions: { type: Function, default: () => { } }, showSeriesLabel: Boolean, type: String, pieType: String, stack: Boolean, barBackgroundColor: String }, watch: { $props: { handler() { this.debounceLoad(); }, deep: !0 } }, methods: { getSeries() { var t; const n = { type: "line", stack: this.stack ? "Total" : "", smooth: this.smooth, showBackground: !1, label: { show: this.showSeriesLabel, position: this.stripe ? "inside" : "top" } }; this.type === "area" ? (n.areaStyle = {}, n.emphasis = { focus: "series" }) : this.type === "bar" && (n.type = "bar", this.barBackgroundColor && (n.showBackground = !0, n.backgroundStyle = { color: this.barBackgroundColor })); let e = ((t = this.config) == null ? void 0 : t.series) || []; return e.length ? (typeof e[0] != "object" && (e = [{ data: e }]), e = e.map((r) => ({ ...n, ...r })), e) : []; }, getTooltip() { const n = { trigger: "axis", valueFormat: void 0 }; return this.valueFormat && (n.valueFormatter = (e) => this.valueFormat ? this.valueFormat.replaceAll("{value}", e) : e), this.type === "bar" && (n.axisPointer = { type: "shadow" }), n; }, getAxis() { var n, e; return this.stripe ? { yAxis: { type: "category", boundaryGap: this.type === "bar", data: ((e = this.config) == null ? void 0 : e.category) || [] }, xAxis: { type: "value" } } : { xAxis: { type: "category", boundaryGap: this.type === "bar", data: (n = this.config) == null ? void 0 : n.category }, yAxis: { type: "value" } }; }, getDefOptions() { return { title: { text: this.title, subtext: this.subtitle }, tooltip: this.getTooltip(), legend: { left: "right", show: this.showLegend }, grid: { left: "20px", right: "20px", bottom: "20px", containLabel: !0 }, ...this.getAxis(), series: this.getSeries() }; }, getPieOptions() { const n = { radius: "50%", center: "50%", startAngle: 0, avoidLabelOverlap: !0, labelLine: { show: !0 }, emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: "rgba(0, 0, 0, 0.5)" } } }; return this.pieType === "doughnut" ? (n.radius = ["40%", "70%"], n.avoidLabelOverlap = !1) : this.pieType === "half-doughnut" && (n.radius = ["40%", "70%"], n.center = ["50%", "70%"], n.startAngle = 180, n.endAngle = 360), { title: { text: this.title, subtext: this.subtitle, left: "left" }, tooltip: { trigger: "item" }, legend: { left: "right", show: this.showLegend }, series: [ { type: "pie", data: this.data, ...n } ] }; }, getGaugeOptions() { return { title: { text: this.title, subtext: this.subtitle, left: "center" }, series: [ { name: "Pressure", type: "gauge", min: this.min || 0, max: this.max || 60, progress: { show: !0 }, detail: { valueAnimation: !0, formatter: "{value}" }, data: [ { value: this.value, name: this.name } ] } ] }; }, getRadarOptions() { return { title: { text: this.title, subtext: this.subtitle, left: "left" }, tooltip: { trigger: "axis" }, legend: { left: "right", show: this.showLegend }, radar: { indicator: this.indicator }, series: [ { type: "radar", tooltip: { trigger: "item" }, data: this.data } ] }; }, getScatterOptions() { return { title: { text: this.title, subtext: this.subtitle, left: "left" }, tooltip: { trigger: "axis" }, legend: { left: "right", show: !0 }, xAxis: { scale: !0 }, yAxis: { scale: !0 }, grid: { left: "20px", right: "20px", bottom: "20px", containLabel: !0 }, series: (this.data || []).map((n) => Array.isArray(n) ? { type: "scatter", data: n } : { type: "scatter", ...n }) }; }, getFunnelOptions() { return { title: { text: this.title, subtext: this.subtitle, left: "left" }, tooltip: { trigger: "item" }, legend: { left: "right", show: this.showLegend }, series: [ { name: "Funnel", type: "funnel", left: "10%", top: "40px", bottom: "20px", width: "80%", min: 0, max: Math.max(...(this.data || []).map((n) => n.value)), minSize: "0%", maxSize: "100%", sort: this.funnelSort || "descending", gap: 2, label: { show: !0, position: "inside" }, labelLine: { length: 10, lineStyle: { width: 1, type: "solid" } }, itemStyle: { borderColor: "#fff", borderWidth: 1 }, emphasis: { label: {} }, data: this.data } ] }; }, load() { this.$nextTick(() => { wt.ready("echarts", () => { this.chart = Te(window.echarts.init(this.$refs.chart)), this.chart.on("click", (...e) => { this.$emit("click", ...e); }); let n; if (this.type === "pie") n = this.getPieOptions(); else if (this.type === "funnel") n = this.getFunnelOptions(); else if (this.type === "gauge") n = this.getGaugeOptions(); else if (this.type === "radar") n = this.getRadarOptions(); else if (this.type === "scatter") n = this.getScatterOptions(); else if (this.type === "custom") { if (n = this.loadOptions(this.config, this.chart) || {}, typeof n.then == "function") { n.then((e) => { this.$emit("beforeLoad", this.chart, e), this.chart.setOption(e), this.$emit("loaded", this.chart, e); }); return; } } else n = this.getDefOptions(); this.$emit("beforeLoad", this.chart, n), this.chart.setOption(n), this.$emit("loaded", this.chart, n); }); }); } }, created() { window.echarts ? wt.done("echarts") : wt.isDefined("echarts") || wt.loadNpm("echarts@5.6.0/dist/echarts.min.js", "echarts"); }, mounted() { this.load(), window.addEventListener("resize", this.debounceResize); }, unmounted() { window.removeEventListener("resize", this.debounceResize); } }), $c = { class: "_fc-echarts", ref: "chart" }; function Sc(n, e, t, r, i, a) { return ee(), me("div", $c, null, 512); } const Oc = /* @__PURE__ */ Ae(wc, [["render", Sc]]); /*! * Signature Pad v5.0.7 | https://github.com/szimek/signature_pad * (c) 2025 Szymon Nowak | Released under the MIT license */ class Ln { constructor(e, t, r, i) { if (isNaN(e) || isNaN(t)) throw new Error(`Point is invalid: (${e}, ${t})`); this.x = +e, this.y = +t, this.pressure = r || 0, this.time = i || Date.now(); } distanceTo(e) { return Math.sqrt(Math.pow(this.x - e.x, 2) + Math.pow(this.y - e.y, 2)); } equals(e) { return this.x === e.x && this.y === e.y && this.pressure === e.pressure && this.time === e.time; } velocityFrom(e) { return this.time !== e.time ? this.distanceTo(e) / (this.time - e.time) : 0; } } class zr { static fromPoints(e, t) { const r = this.calculateControlPoints(e[0], e[1], e[2]).c2, i = this.calculateControlPoints(e[1], e[2], e[3]).c1; return new zr(e[1], r, i, e[2], t.start, t.end); } static calculateControlPoints(e, t, r) { const i = e.x - t.x, a = e.y - t.y, o = t.x - r.x, s = t.y - r.y, u = { x: (e.x + t.x) / 2, y: (e.y + t.y) / 2 }, c = { x: (t.x + r.x) / 2, y: (t.y + r.y) / 2 }, l = Math.sqrt(i * i + a * a), h = Math.sqrt(o * o + s * s), m = u.x - c.x, w = u.y - c.y, $ = l + h == 0 ? 0 : h / (l + h), S = { x: c.x + m * $, y: c.y + w * $ }, T = t.x - S.x, U = t.y - S.y; return { c1: new Ln(u.x + T, u.y + U), c2: new Ln(c.x + T, c.y + U) }; } constructor(e, t, r, i, a, o) { this.startPoint = e, this.control2 = t, this.control1 = r, this.endPoint = i, this.startWidth = a, this.endWidth = o; } length() { let t = 0, r, i; for (let a = 0; a <= 10; a += 1) { const o = a / 10, s = this.point(o, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), u = this.point(o, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y); if (a > 0) { const c = s - r, l = u - i; t += Math.sqrt(c * c + l * l); } r = s, i = u; } return t; } point(e, t, r, i, a) { return t * (1 - e) * (1 - e) * (1 - e) + 3 * r * (1 - e) * (1 - e) * e + 3 * i * (1 - e) * e * e + a * e * e * e; } } class Ec { constructor() { try { this._et = new EventTarget(); } catch { this._et = document; } } addEventListener(e, t, r) { this._et.addEventListener(e, t, r); } dispatchEvent(e) { return this._et.dispatchEvent(e); } removeEventListener(e, t, r) { this._et.removeEventListener(e, t, r); } } function xc(n, e = 250) { let t = 0, r = null, i, a, o; const s = () => { t = Date.now(), r = null, i = n.apply(a, o), r || (a = null, o = []); }; return function(...c) { const l = Date.now(), h = e - (l - t); return a = this, o = c, h <= 0 || h > e ? (r && (clearTimeout(r), r = null), t = l, i = n.apply(a, o), r || (a = null, o = [])) : r || (r = window.setTimeout(s, h)), i; }; } class Nn extends Ec { constructor(e, t = {}) { var r, i, a; super(), this.canvas = e, this._drawingStroke = !1, this._isEmpty = !0, this._lastPoints = [], this._data = [], this._lastVelocity = 0, this._lastWidth = 0, this._handleMouseDown = (o) => { !this._isLeftButtonPressed(o, !0) || this._drawingStroke || this._strokeBegin(this._pointerEventToSignatureEvent(o)); }, this._handleMouseMove = (o) => { if (!this._isLeftButtonPressed(o, !0) || !this._drawingStroke) { this._strokeEnd(this._pointerEventToSignatureEvent(o), !1); return; } this._strokeMoveUpdate(this._pointerEventToSignatureEvent(o)); }, this._handleMouseUp = (o) => { this._isLeftButtonPressed(o) || this._strokeEnd(this._pointerEventToSignatureEvent(o)); }, this._handleTouchStart = (o) => { o.targetTouches.length !== 1 || this._drawingStroke || (o.cancelable && o.preventDefault(), this._strokeBegin(this._touchEventToSignatureEvent(o))); }, this._handleTouchMove = (o) => { if (o.targetTouches.length === 1) { if (o.cancelable && o.preventDefault(), !this._drawingStroke) { this._strokeEnd(this._touchEventToSignatureEvent(o), !1); return; } this._strokeMoveUpdate(this._touchEventToSignatureEvent(o)); } }, this._handleTouchEnd = (o) => { o.targetTouches.length === 0 && (o.cancelable && o.preventDefault(), this.canvas.removeEventListener("touchmove", this._handleTouchMove), this._strokeEnd(this._touchEventToSignatureEvent(o))); }, this._handlePointerDown = (o) => { !o.isPrimary || !this._isLeftButtonPressed(o) || this._drawingStroke || (o.preventDefault(), this._strokeBegin(this._pointerEventToSignatureEvent(o))); }, this._handlePointerMove = (o) => { if (!!o.isPrimary) { if (!this._isLeftButtonPressed(o, !0) || !this._drawingStroke) { this._strokeEnd(this._pointerEventToSignatureEvent(o), !1); return; } o.preventDefault(), this._strokeMoveUpdate(this._pointerEventToSignatureEvent(o)); } }, this._handlePointerUp = (o) => { !o.isPrimary || this._isLeftButtonPressed(o) || (o.preventDefault(), this._strokeEnd(this._pointerEventToSignatureEvent(o))); }, this.velocityFilterWeight = t.velocityFilterWeight || 0.7, this.minWidth = t.minWidth || 0.5, this.maxWidth = t.maxWidth || 2.5, this.throttle = (r = t.throttle) !== null && r !== void 0 ? r : 16, this.minDistance = (i = t.minDistance) !== null && i !== void 0 ? i : 5, this.dotSize = t.dotSize || 0, this.penColor = t.penColor || "black", this.backgroundColor = t.backgroundColor || "rgba(0,0,0,0)", this.compositeOperation = t.compositeOperation || "source-over", this.canvasContextOptions = (a = t.canvasContextOptions) !== null && a !== void 0 ? a : {}, this._strokeMoveUpdate = this.throttle ? xc(Nn.prototype._strokeUpdate, this.throttle) : Nn.prototype._strokeUpdate, this._ctx = e.getContext("2d", this.canvasContextOptions), this.clear(), this.on(); } clear() { const { _ctx: e, canvas: t } = this; e.fillStyle = this.backgroundColor, e.clearRect(0, 0, t.width, t.height), e.fillRect(0, 0, t.width, t.height), this._data = [], this._reset(this._getPointGroupOptions()), this._isEmpty = !0; } fromDataURL(e, t = {}) { return new Promise((r, i) => { const a = new Image(), o = t.ratio || window.devicePixelRatio || 1, s = t.width || this.canvas.width / o, u = t.height || this.canvas.height / o, c = t.xOffset || 0, l = t.yOffset || 0; this._reset(this._getPointGroupOptions()), a.onload = () => { this._ctx.drawImage(a, c, l, s, u), r(); }, a.onerror = (h) => { i(h); }, a.crossOrigin = "anonymous", a.src = e, this._isEmpty = !1; }); } toDataURL(e = "image/png", t) { switch (e) { case "image/svg+xml": return typeof t != "object" && (t = void 0), `data:image/svg+xml;base64,${btoa(this.toSVG(t))}`; default: return typeof t != "number" && (t = void 0), this.canvas.toDataURL(e, t); } } on() { this.canvas.style.touchAction = "none", this.canvas.style.msTouchAction = "none", this.canvas.style.userSelect = "none"; const e = /Macintosh/.test(navigator.userAgent) && "ontouchstart" in document; window.PointerEvent && !e ? this._handlePointerEvents() : (this._handleMouseEvents(), "ontouchstart" in window && this._handleTouchEvents()); } off() { this.canvas.style.touchAction = "auto", this.canvas.style.msTouchAction = "auto", this.canvas.style.userSelect = "auto", this.canvas.removeEventListener("pointerdown", this._handlePointerDown), this.canvas.removeEventListener("mousedown", this._handleMouseDown), this.canvas.removeEventListener("touchstart", this._handleTouchStart), this._removeMoveUpEventListeners(); } _getListenerFunctions() { var e; const t = window.document === this.canvas.ownerDocument ? window : (e = this.canvas.ownerDocument.defaultView) !== null && e !== void 0 ? e : this.canvas.ownerDocument; return { addEventListener: t.addEventListener.bind(t), removeEventListener: t.removeEventListener.bind(t) }; } _removeMoveUpEventListeners() { const { removeEventListener: e } = this._getListenerFunctions(); e("pointermove", this._handlePointerMove), e("pointerup", this._handlePointerUp), e("mousemove", this._handleMouseMove), e("mouseup", this._handleMouseUp), e("touchmove", this._handleTouchMove), e("touchend", this._handleTouchEnd); } isEmpty() { return this._isEmpty; } fromData(e, { clear: t = !0 } = {}) { t && this.clear(), this._fromData(e, this._drawCurve.bind(this), this._drawDot.bind(this)), this._data = this._data.concat(e); } toData() { return this._data; } _isLeftButtonPressed(e, t) { return t ? e.buttons === 1 : (e.buttons & 1) === 1; } _pointerEventToSignatureEvent(e) { return { event: e, type: e.type, x: e.clientX, y: e.clientY, pressure: "pressure" in e ? e.pressure : 0 }; } _touchEventToSignatureEvent(e) { const t = e.changedTouches[0]; return { event: e, type: e.type, x: t.clientX, y: t.clientY, pressure: t.force }; } _getPointGroupOptions(e) { return { penColor: e && "penColor" in e ? e.penColor : this.penColor, dotSize: e && "dotSize" in e ? e.dotSize : this.dotSize, minWidth: e && "minWidth" in e ? e.minWidth : this.minWidth, maxWidth: e && "maxWidth" in e ? e.maxWidth : this.maxWidth, velocityFilterWeight: e && "velocityFilterWeight" in e ? e.velocityFilterWeight : this.velocityFilterWeight, compositeOperation: e && "compositeOperation" in e ? e.compositeOperation : this.compositeOperation }; } _strokeBegin(e) { if (!this.dispatchEvent(new CustomEvent("beginStroke", { detail: e, cancelable: !0 }))) return; const { addEventListener: r } = this._getListenerFunctions(); switch (e.event.type) { case "mousedown": r("mousemove", this._handleMouseMove), r("mouseup", this._handleMouseUp); break; case "touchstart": r("touchmove", this._handleTouchMove), r("touchend", this._handleTouchEnd); break; case "pointerdown": r("pointermove", this._handlePointerMove), r("pointerup", this._handlePointerUp); break; } this._drawingStroke = !0; const i = this._getPointGroupOptions(), a = Object.assign(Object.assign({}, i), { points: [] }); this._data.push(a), this._reset(i), this._strokeUpdate(e); } _strokeUpdate(e) { if (!this._drawingStroke) return; if (this._data.length === 0) { this._strokeBegin(e); return; } this.dispatchEvent(new CustomEvent("beforeUpdateStroke", { detail: e })); const t = this._createPoint(e.x, e.y, e.pressure), r = this._data[this._data.length - 1], i = r.points, a = i.length > 0 && i[i.length - 1], o = a ? t.distanceTo(a) <= this.minDistance : !1, s = this._getPointGroupOptions(r); if (!a || !(a && o)) { const u = this._addPoint(t, s); a ? u && this._drawCurve(u, s) : this._drawDot(t, s), i.push({ time: t.time, x: t.x, y: t.y, pressure: t.pressure }); } this.dispatchEvent(new CustomEvent("afterUpdateStroke", { detail: e })); } _strokeEnd(e, t = !0) { this._removeMoveUpEventListeners(), this._drawingStroke && (t && this._strokeUpdate(e), this._drawingStroke = !1, this.dispatchEvent(new CustomEvent("endStroke", { detail: e }))); } _handlePointerEvents() { this._drawingStroke = !1, this.canvas.addEventListener("pointerdown", this._handlePointerDown); } _handleMouseEvents() { this._drawingStroke = !1, this.canvas.addEventListener("mousedown", this._handleMouseDown); } _handleTouchEvents() { this.canvas.addEventListener("touchstart", this._handleTouchStart); } _reset(e) { this._lastPoints = [], this._lastVelocity = 0, this._lastWidth = (e.minWidth + e.maxWidth) / 2, this._ctx.fillStyle = e.penColor, this._ctx.globalCompositeOperation = e.compositeOperation; } _createPoint(e, t, r) { const i = this.canvas.getBoundingClientRect(); return new Ln(e - i.left, t - i.top, r, new Date().getTime()); } _addPoint(e, t) { const { _lastPoints: r } = this; if (r.push(e), r.length > 2) { r.length === 3 && r.unshift(r[0]); const i = this._calculateCurveWidths(r[1], r[2], t), a = zr.fromPoints(r, i); return r.shift(), a; } return null; } _calculateCurveWidths(e, t, r) { const i = r.velocityFilterWeight * t.velocityFrom(e) + (1 - r.velocityFilterWeight) * this._lastVelocity, a = this._strokeWidth(i, r), o = { end: a, start: this._lastWidth }; return this._lastVelocity = i, this._lastWidth = a, o; } _strokeWidth(e, t) { return Math.max(t.maxWidth / (e + 1), t.minWidth); } _drawCurveSegment(e, t, r) { const i = this._ctx; i.moveTo(e, t), i.arc(e, t, r, 0, 2 * Math.PI, !1), this._isEmpty = !1; } _drawCurve(e, t) { const r = this._ctx, i = e.endWidth - e.startWidth, a = Math.ceil(e.length()) * 2; r.beginPath(), r.fillStyle = t.penColor; for (let o = 0; o < a; o += 1) { const s = o / a, u = s * s, c = u * s, l = 1 - s, h = l * l, m = h * l; let w = m * e.startPoint.x; w += 3 * h * s * e.control1.x, w += 3 * l * u * e.control2.x, w += c * e.endPoint.x; let $ = m * e.startPoint.y; $ += 3 * h * s * e.control1.y, $ += 3 * l * u * e.control2.y, $ += c * e.endPoint.y; const S = Math.min(e.startWidth + c * i, t.maxWidth); this._drawCurveSegment(w, $, S); } r.closePath(), r.fill(); } _drawDot(e, t) { const r = this._ctx, i = t.dotSize > 0 ? t.dotSize : (t.minWidth + t.maxWidth) / 2; r.beginPath(), this._drawCurveSegment(e.x, e.y, i), r.closePath(), r.fillStyle = t.penColor, r.fill(); } _fromData(e, t, r) { for (const i of e) { const { points: a } = i, o = this._getPointGroupOptions(i); if (a.length > 1) for (let s = 0; s < a.length; s += 1) { const u = a[s], c = new Ln(u.x, u.y, u.pressure, u.time); s === 0 && this._reset(o); const l = this._addPoint(c, o); l && t(l, o); } else this._reset(o), r(a[0], o); } } toSVG({ includeBackgroundColor: e = !1 } = {}) { const t = this._data, r = Math.max(window.devicePixelRatio || 1, 1), i = 0, a = 0, o = this.canvas.width / r, s = this.canvas.height / r, u = document.createElementNS("http://www.w3.org/2000/svg", "svg"); if (u.setAttribute("xmlns", "http://www.w3.org/2000/svg"), u.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), u.setAttribute("viewBox", `${i} ${a} ${o} ${s}`), u.setAttribute("width", o.toString()), u.setAttribute("height", s.toString()), e && this.backgroundColor) { const c = document.createElement("rect"); c.setAttribute("width", "100%"), c.setAttribute("height", "100%"), c.setAttribute("fill", this.backgroundColor), u.appendChild(c); } return this._fromData(t, (c, { penColor: l }) => { const h = document.createElement("path"); if (!isNaN(c.control1.x) && !isNaN(c.control1.y) && !isNaN(c.control2.x) && !isNaN(c.control2.y)) { const m = `M ${c.startPoint.x.toFixed(3)},${c.startPoint.y.toFixed(3)} C ${c.control1.x.toFixed(3)},${c.control1.y.toFixed(3)} ${c.control2.x.toFixed(3)},${c.control2.y.toFixed(3)} ${c.endPoint.x.toFixed(3)},${c.endPoint.y.toFixed(3)}`; h.setAttribute("d", m), h.setAttribute("stroke-width", (c.endWidth * 2.25).toFixed(3)), h.setAttribute("stroke", l), h.setAttribute("fill", "none"), h.setAttribute("stroke-linecap", "round"), u.appendChild(h); } }, (c, { penColor: l, dotSize: h, minWidth: m, maxWidth: w }) => { const $ = document.createElement("circle"), S = h > 0 ? h : (m + w) / 2; $.setAttribute("r", S.toString()), $.setAttribute("cx", c.x.toString()), $.setAttribute("cy", c.y.toString()), $.setAttribute("fill", l), u.appendChild($); }), u.outerHTML; } } const Cc = he({ name: "SignaturePad", emits: ["update:modelValue", "change", "remove"], data() { return { visible: !1, isEmpty: !0, signaturePad: null }; }, props: { modelValue: String, penColor: String, formCreateInject: Object }, watch: { visible(n) { n ? (this.isEmpty = !0, this.$nextTick(() => { this.signaturePad = Te(new Nn(this.$refs.pad, { penColor: this.penColor })), this.signaturePad.addEventListener("endStroke", () => { this.isEmpty = this.signaturePad.isEmpty(); }); })) : (this.signaturePad.off(), this.signaturePad = null); } }, methods: { clear() { this.signaturePad.clear(), this.isEmpty = !0; }, submit() { const n = this.signaturePad.toDataURL(); this.updateValue(n), this.visible = !1; }, updateValue(n) { this.$emit("update:modelValue", n), this.$emit("change", n); }, remove() { this.updateValue(""), this.$emit("remove"); } } }), kc = { class: "_fc-m-signature" }, Ac = { key: 0, class: "_fc-m-signature-preview" }, Dc = ["src"], Rc = { class: "_fc-m-signature-pad", ref: "pad", width: "320px", height: "145px" }; function Pc(n, e, t, r, i, a) { const o = K("van-dialog"); return ee(), me("div", kc, [ n.modelValue ? (ee(), me("div", Ac, [ Me("i", { class: "fc-icon icon-delete2", onClick: e[0] || (e[0] = (...s) => n.remove && n.remove(...s)) }), Me("img", { src: n.modelValue, alt: "signature" }, null, 8, Dc) ])) : (ee(), me("div", { key: 1, class: "_fc-m-signature-btn", onClick: e[1] || (e[1] = (s) => n.visible = !0) }, [ e[4] || (e[4] = Me("i", { class: "fc-icon icon-edit2" }, null, -1)), He(" " + Ve(n.formCreateInject.t("signaturePadTip") || "\u70B9\u51FB\u6DFB\u52A0\u624B\u5199\u7B7E\u540D"), 1) ])), H(o, { show: n.visible, "onUpdate:show": e[3] || (e[3] = (s) => n.visible = s), class: "_fc-m-signature-dialog", onConfirm: n.submit, onCancel: n.clear, "confirm-button-text": n.formCreateInject.t("ok") || "\u786E\u5B9A", "cancel-button-text": n.formCreateInject.t("reset") || "\u91CD\u7F6E", "confirm-button-disabled": n.isEmpty }, { title: Ce(() => [ He(Ve(n.formCreateInject.t("signaturePadTitle") || "\u8BF7\u5728\u865A\u7EBF\u6846\u5185\u4E66\u5199") + " ", 1), Me("i", { class: "fc-icon icon-add2", onClick: e[2] || (e[2] = (s) => n.visible = !1) }) ]), default: Ce(() => [ Me("canvas", Rc, null, 512) ]), _: 1 }, 8, ["show", "onConfirm", "onCancel", "confirm-button-text", "cancel-button-text", "confirm-button-disabled"]) ]); } const Mc = /* @__PURE__ */ Ae(Cc, [["render", Pc]]); function Dr(n, e, t) { for (var r = [], i = Math.max(n.length, e.length), a = 0, o = 0; o < i || a; ) { var s = o < n.length ? n[o] : 0, u = o < e.length ? e[o] : 0, c = a + s + u; r.push(c % t), a = Math.floor(c / t), o++; } return r; } function ta(n, e, t) { if (n < 0) return null; if (n == 0) return []; for (var r = [], i = e; n & 1 && (r = Dr(r, i, t)), n = n >> 1, n !== 0; ) i = Dr(i, i, t); return r; } function Tc(n, e) { for (var t = n.split(""), r = [], i = t.length - 1; i >= 0; i--) { var a = parseInt(t[i], e); if (isNaN(a)) return null; r.push(a); } return r; } function jc(n, e, t) { var r = Tc(n, e); if (r === null) return null; for (var i = [], a = [1], o = 0; o < r.length; o++) r[o] && (i = Dr( i, ta(r[o], a, t), t )), a = ta(e, a, t); for (var s = "", o = i.length - 1; o >= 0; o--) s += i[o].toString(t); return s; } function Fc(n) { return n.substring(0, 2) === "0x" && (n = n.substring(2)), n = n.toLowerCase(), jc(n, 16, 10); } class Ic { constructor(e) { e = e || {}, this.seq = 0, this.mid = (e.mid || 1) % 1023, this.offset = e.offset || 0, this.lastTime = 0; } generate() { const e = Date.now(), t = (e - this.offset).toString(2); this.lastTime == e ? (this.seq++, this.seq > 4095 && (this.seq = 0)) : this.seq = 0, this.lastTime = e; let r = this.seq.toString(2), i = this.mid.toString(2); for (; r.length < 12; ) r = "0" + r; for (; i.length < 10; ) i = "0" + i; const a = t + i + r; let o = ""; for (let s = a.length; s > 0; s -= 4) o = parseInt(a.substring(s - 4, s), 2).toString(16) + o; return Fc(o); } } const Vc = he({ name: "FcId", props: ["modelValue", "prefix"], emits: ["update:modelValue"], inject: { designer: { default: null } }, data() { return { preview: "7379787000000000" }; }, watch: { modelValue: { handler: function(n) { if (!n) { const e = new Ic({ mid: 42, offset: 173448e7 }); this.$emit("update:modelValue", "" + (this.prefix || "") + e.generate()); } }, immediate: !0 } } }); function Bc(n, e, t, r, i, a) { const o = K("el-input"); return ee(), Re(o, { modelValue: n.designer ? "" + (n.prefix || "") + n.preview : n.modelValue, readonly: "", disabled: "" }, null, 8, ["modelValue"]); } const Lc = /* @__PURE__ */ Ae(Vc, [["render", Bc]]); const Nc = he({ name: "FcTitle", data() { return {}; }, props: { title: String, size: String, align: String }, computed: { textStyle() { return { textAlign: this.align || "left" }; } } }); function zc(n, e, t, r, i, a) { return ee(), me("div", { class: Yt(["_fc-title", n.size || "h2"]), style: Ea(n.textStyle) }, Ve(n.title), 7); } const Uc = /* @__PURE__ */ Ae(Nc, [["render", zc]]); function Ur() { return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null }; } let It = Ur(); function to(n) { It = n; } const ln = { exec: () => null }; function ye(n, e = "") { let t = typeof n == "string" ? n : n.source; const r = { replace: (i, a) => { let o = typeof a == "string" ? a : a.source; return o = o.replace(We.caret, "$1"), t = t.replace(i, o), r; }, getRegex: () => new RegExp(t, e) }; return r; } const We = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (n) => new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}#`), htmlBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}<(?:[a-z].*>|!--)`, "i") }, qc = /^(?:[ \t]*(?:\n|$))+/, Gc = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Hc = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, pn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Wc = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, qr = /(?:[*+-]|\d{1,9}[.)])/, no = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ro = ye(no).replace(/bull/g, qr).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Yc = ye(no).replace(/bull/g, qr).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Gr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Xc = /^[^\n]+/, Hr = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Jc = ye(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Hr).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Kc = ye(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, qr).getRegex(), Wn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Wr = /|$))/, Zc = ye("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Wr).replace("tag", Wn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), io = ye(Gr).replace("hr", pn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", Wn).getRegex(), Qc = ye(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", io).getRegex(), Yr = { blockquote: Qc, code: Gc, def: Jc, fences: Hc, heading: Wc, hr: pn, html: Zc, lheading: ro, list: Kc, newline: qc, paragraph: io, table: ln, text: Xc }, na = ye("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", pn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", Wn).getRegex(), ef = { ...Yr, lheading: Yc, table: na, paragraph: ye(Gr).replace("hr", pn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", na).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", Wn).getRegex() }, tf = { ...Yr, html: ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Wr).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: ln, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: ye(Gr).replace("hr", pn).replace("heading", ` *#{1,6} *[^ ]`).replace("lheading", ro).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, nf = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, rf = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ao = /^( {2,}|\\)\n(?!\s*$)/, af = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g, uo = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, cf = ye(uo, "u").replace(/punct/g, Yn).getRegex(), ff = ye(uo, "u").replace(/punct/g, so).getRegex(), lo = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", df = ye(lo, "gu").replace(/notPunctSpace/g, oo).replace(/punctSpace/g, Xr).replace(/punct/g, Yn).getRegex(), hf = ye(lo, "gu").replace(/notPunctSpace/g, uf).replace(/punctSpace/g, sf).replace(/punct/g, so).getRegex(), pf = ye("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, oo).replace(/punctSpace/g, Xr).replace(/punct/g, Yn).getRegex(), mf = ye(/\\(punct)/, "gu").replace(/punct/g, Yn).getRegex(), gf = ye(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), vf = ye(Wr).replace("(?:-->|$)", "-->").getRegex(), yf = ye("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", vf).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), zn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, _f = ye(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", zn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), co = ye(/^!?\[(label)\]\[(ref)\]/).replace("label", zn).replace("ref", Hr).getRegex(), fo = ye(/^!?\[(ref)\](?:\[\])?/).replace("ref", Hr).getRegex(), bf = ye("reflink|nolink(?!\\()", "g").replace("reflink", co).replace("nolink", fo).getRegex(), Jr = { _backpedal: ln, anyPunctuation: mf, autolink: gf, blockSkip: lf, br: ao, code: rf, del: ln, emStrongLDelim: cf, emStrongRDelimAst: df, emStrongRDelimUnd: pf, escape: nf, link: _f, nolink: fo, punctuation: of, reflink: co, reflinkSearch: bf, tag: yf, text: af, url: ln }, wf = { ...Jr, link: ye(/^!?\[(label)\]\((.*?)\)/).replace("label", zn).getRegex(), reflink: ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", zn).getRegex() }, Rr = { ...Jr, emStrongRDelimAst: hf, emStrongLDelim: ff, url: ye(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\": ">", '"': """, "'": "'" }, ra = (n) => Sf[n]; function pt(n, e) { if (e) { if (We.escapeTest.test(n)) return n.replace(We.escapeReplace, ra); } else if (We.escapeTestNoEncode.test(n)) return n.replace(We.escapeReplaceNoEncode, ra); return n; } function ia(n) { try { n = encodeURI(n).replace(We.percentDecode, "%"); } catch { return null; } return n; } function aa(n, e) { var a; const t = n.replace(We.findPipe, (o, s, u) => { let c = !1, l = s; for (; --l >= 0 && u[l] === "\\"; ) c = !c; return c ? "|" : " |"; }), r = t.split(We.splitPipe); let i = 0; if (r[0].trim() || r.shift(), r.length > 0 && !((a = r.at(-1)) != null && a.trim()) && r.pop(), e) if (r.length > e) r.splice(e); else for (; r.length < e; ) r.push(""); for (; i < r.length; i++) r[i] = r[i].trim().replace(We.slashPipe, "|"); return r; } function nn(n, e, t) { const r = n.length; if (r === 0) return ""; let i = 0; for (; i < r && n.charAt(r - i - 1) === e; ) i++; return n.slice(0, r - i); } function Of(n, e) { if (n.indexOf(e[1]) === -1) return -1; let t = 0; for (let r = 0; r < n.length; r++) if (n[r] === "\\") r++; else if (n[r] === e[0]) t++; else if (n[r] === e[1] && (t--, t < 0)) return r; return t > 0 ? -2 : -1; } function oa(n, e, t, r, i) { const a = e.href, o = e.title || null, s = n[1].replace(i.other.outputLinkReplace, "$1"); r.state.inLink = !0; const u = { type: n[0].charAt(0) === "!" ? "image" : "link", raw: t, href: a, title: o, text: s, tokens: r.inlineTokens(s) }; return r.state.inLink = !1, u; } function Ef(n, e, t) { const r = n.match(t.other.indentCodeCompensation); if (r === null) return e; const i = r[1]; return e.split(` `).map((a) => { const o = a.match(t.other.beginningSpace); if (o === null) return a; const [s] = o; return s.length >= i.length ? a.slice(i.length) : a; }).join(` `); } class Un { constructor(e) { $e(this, "options"); $e(this, "rules"); $e(this, "lexer"); this.options = e || It; } space(e) { const t = this.rules.block.newline.exec(e); if (t && t[0].length > 0) return { type: "space", raw: t[0] }; } code(e) { const t = this.rules.block.code.exec(e); if (t) { const r = t[0].replace(this.rules.other.codeRemoveIndent, ""); return { type: "code", raw: t[0], codeBlockStyle: "indented", text: this.options.pedantic ? r : nn(r, ` `) }; } } fences(e) { const t = this.rules.block.fences.exec(e); if (t) { const r = t[0], i = Ef(r, t[3] || "", this.rules); return { type: "code", raw: r, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: i }; } } heading(e) { const t = this.rules.block.heading.exec(e); if (t) { let r = t[2].trim(); if (this.rules.other.endingHash.test(r)) { const i = nn(r, "#"); (this.options.pedantic || !i || this.rules.other.endingSpaceChar.test(i)) && (r = i.trim()); } return { type: "heading", raw: t[0], depth: t[1].length, text: r, tokens: this.lexer.inline(r) }; } } hr(e) { const t = this.rules.block.hr.exec(e); if (t) return { type: "hr", raw: nn(t[0], ` `) }; } blockquote(e) { const t = this.rules.block.blockquote.exec(e); if (t) { let r = nn(t[0], ` `).split(` `), i = "", a = ""; const o = []; for (; r.length > 0; ) { let s = !1; const u = []; let c; for (c = 0; c < r.length; c++) if (this.rules.other.blockquoteStart.test(r[c])) u.push(r[c]), s = !0; else if (!s) u.push(r[c]); else break; r = r.slice(c); const l = u.join(` `), h = l.replace(this.rules.other.blockquoteSetextReplace, ` $1`).replace(this.rules.other.blockquoteSetextReplace2, ""); i = i ? `${i} ${l}` : l, a = a ? `${a} ${h}` : h; const m = this.lexer.state.top; if (this.lexer.state.top = !0, this.lexer.blockTokens(h, o, !0), this.lexer.state.top = m, r.length === 0) break; const w = o.at(-1); if ((w == null ? void 0 : w.type) === "code") break; if ((w == null ? void 0 : w.type) === "blockquote") { const $ = w, S = $.raw + ` ` + r.join(` `), T = this.blockquote(S); o[o.length - 1] = T, i = i.substring(0, i.length - $.raw.length) + T.raw, a = a.substring(0, a.length - $.text.length) + T.text; break; } else if ((w == null ? void 0 : w.type) === "list") { const $ = w, S = $.raw + ` ` + r.join(` `), T = this.list(S); o[o.length - 1] = T, i = i.substring(0, i.length - w.raw.length) + T.raw, a = a.substring(0, a.length - $.raw.length) + T.raw, r = S.substring(o.at(-1).raw.length).split(` `); continue; } } return { type: "blockquote", raw: i, tokens: o, text: a }; } } list(e) { let t = this.rules.block.list.exec(e); if (t) { let r = t[1].trim(); const i = r.length > 1, a = { type: "list", raw: "", ordered: i, start: i ? +r.slice(0, -1) : "", loose: !1, items: [] }; r = i ? `\\d{1,9}\\${r.slice(-1)}` : `\\${r}`, this.options.pedantic && (r = i ? r : "[*+-]"); const o = this.rules.other.listItemRegex(r); let s = !1; for (; e; ) { let c = !1, l = "", h = ""; if (!(t = o.exec(e)) || this.rules.block.hr.test(e)) break; l = t[0], e = e.substring(l.length); let m = t[2].split(` `, 1)[0].replace(this.rules.other.listReplaceTabs, (z) => " ".repeat(3 * z.length)), w = e.split(` `, 1)[0], $ = !m.trim(), S = 0; if (this.options.pedantic ? (S = 2, h = m.trimStart()) : $ ? S = t[1].length + 1 : (S = t[2].search(this.rules.other.nonSpaceChar), S = S > 4 ? 1 : S, h = m.slice(S), S += t[1].length), $ && this.rules.other.blankLine.test(w) && (l += w + ` `, e = e.substring(w.length + 1), c = !0), !c) { const z = this.rules.other.nextBulletRegex(S), B = this.rules.other.hrRegex(S), Z = this.rules.other.fencesBeginRegex(S), Q = this.rules.other.headingBeginRegex(S), q = this.rules.other.htmlBeginRegex(S); for (; e; ) { const ce = e.split(` `, 1)[0]; let re; if (w = ce, this.options.pedantic ? (w = w.replace(this.rules.other.listReplaceNesting, " "), re = w) : re = w.replace(this.rules.other.tabCharGlobal, " "), Z.test(w) || Q.test(w) || q.test(w) || z.test(w) || B.test(w)) break; if (re.search(this.rules.other.nonSpaceChar) >= S || !w.trim()) h += ` ` + re.slice(S); else { if ($ || m.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || Z.test(m) || Q.test(m) || B.test(m)) break; h += ` ` + w; } !$ && !w.trim() && ($ = !0), l += ce + ` `, e = e.substring(ce.length + 1), m = re.slice(S); } } a.loose || (s ? a.loose = !0 : this.rules.other.doubleBlankLine.test(l) && (s = !0)); let T = null, U; this.options.gfm && (T = this.rules.other.listIsTask.exec(h), T && (U = T[0] !== "[ ] ", h = h.replace(this.rules.other.listReplaceTask, ""))), a.items.push({ type: "list_item", raw: l, task: !!T, checked: U, loose: !1, text: h, tokens: [] }), a.raw += l; } const u = a.items.at(-1); if (u) u.raw = u.raw.trimEnd(), u.text = u.text.trimEnd(); else return; a.raw = a.raw.trimEnd(); for (let c = 0; c < a.items.length; c++) if (this.lexer.state.top = !1, a.items[c].tokens = this.lexer.blockTokens(a.items[c].text, []), !a.loose) { const l = a.items[c].tokens.filter((m) => m.type === "space"), h = l.length > 0 && l.some((m) => this.rules.other.anyLine.test(m.raw)); a.loose = h; } if (a.loose) for (let c = 0; c < a.items.length; c++) a.items[c].loose = !0; return a; } } html(e) { const t = this.rules.block.html.exec(e); if (t) return { type: "html", block: !0, raw: t[0], pre: t[1] === "pre" || t[1] === "script" || t[1] === "style", text: t[0] }; } def(e) { const t = this.rules.block.def.exec(e); if (t) { const r = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), i = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", a = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3]; return { type: "def", tag: r, raw: t[0], href: i, title: a }; } } table(e) { var s; const t = this.rules.block.table.exec(e); if (!t || !this.rules.other.tableDelimiter.test(t[2])) return; const r = aa(t[1]), i = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), a = (s = t[3]) != null && s.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(` `) : [], o = { type: "table", raw: t[0], header: [], align: [], rows: [] }; if (r.length === i.length) { for (const u of i) this.rules.other.tableAlignRight.test(u) ? o.align.push("right") : this.rules.other.tableAlignCenter.test(u) ? o.align.push("center") : this.rules.other.tableAlignLeft.test(u) ? o.align.push("left") : o.align.push(null); for (let u = 0; u < r.length; u++) o.header.push({ text: r[u], tokens: this.lexer.inline(r[u]), header: !0, align: o.align[u] }); for (const u of a) o.rows.push(aa(u, o.header.length).map((c, l) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: o.align[l] }))); return o; } } lheading(e) { const t = this.rules.block.lheading.exec(e); if (t) return { type: "heading", raw: t[0], depth: t[2].charAt(0) === "=" ? 1 : 2, text: t[1], tokens: this.lexer.inline(t[1]) }; } paragraph(e) { const t = this.rules.block.paragraph.exec(e); if (t) { const r = t[1].charAt(t[1].length - 1) === ` ` ? t[1].slice(0, -1) : t[1]; return { type: "paragraph", raw: t[0], text: r, tokens: this.lexer.inline(r) }; } } text(e) { const t = this.rules.block.text.exec(e); if (t) return { type: "text", raw: t[0], text: t[0], tokens: this.lexer.inline(t[0]) }; } escape(e) { const t = this.rules.inline.escape.exec(e); if (t) return { type: "escape", raw: t[0], text: t[1] }; } tag(e) { const t = this.rules.inline.tag.exec(e); if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = !1), { type: "html", raw: t[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: !1, text: t[0] }; } link(e) { const t = this.rules.inline.link.exec(e); if (t) { const r = t[2].trim(); if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) { if (!this.rules.other.endAngleBracket.test(r)) return; const o = nn(r.slice(0, -1), "\\"); if ((r.length - o.length) % 2 === 0) return; } else { const o = Of(t[2], "()"); if (o === -2) return; if (o > -1) { const u = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + o; t[2] = t[2].substring(0, o), t[0] = t[0].substring(0, u).trim(), t[3] = ""; } } let i = t[2], a = ""; if (this.options.pedantic) { const o = this.rules.other.pedanticHrefTitle.exec(i); o && (i = o[1], a = o[3]); } else a = t[3] ? t[3].slice(1, -1) : ""; return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? i = i.slice(1) : i = i.slice(1, -1)), oa(t, { href: i && i.replace(this.rules.inline.anyPunctuation, "$1"), title: a && a.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules); } } reflink(e, t) { let r; if ((r = this.rules.inline.reflink.exec(e)) || (r = this.rules.inline.nolink.exec(e))) { const i = (r[2] || r[1]).replace(this.rules.other.multipleSpaceGlobal, " "), a = t[i.toLowerCase()]; if (!a) { const o = r[0].charAt(0); return { type: "text", raw: o, text: o }; } return oa(r, a, r[0], this.lexer, this.rules); } } emStrong(e, t, r = "") { let i = this.rules.inline.emStrongLDelim.exec(e); if (!i || i[3] && r.match(this.rules.other.unicodeAlphaNumeric)) return; if (!(i[1] || i[2] || "") || !r || this.rules.inline.punctuation.exec(r)) { const o = [...i[0]].length - 1; let s, u, c = o, l = 0; const h = i[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd; for (h.lastIndex = 0, t = t.slice(-1 * e.length + o); (i = h.exec(t)) != null; ) { if (s = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !s) continue; if (u = [...s].length, i[3] || i[4]) { c += u; continue; } else if ((i[5] || i[6]) && o % 3 && !((o + u) % 3)) { l += u; continue; } if (c -= u, c > 0) continue; u = Math.min(u, u + c + l); const m = [...i[0]][0].length, w = e.slice(0, o + i.index + m + u); if (Math.min(o, u) % 2) { const S = w.slice(1, -1); return { type: "em", raw: w, text: S, tokens: this.lexer.inlineTokens(S) }; } const $ = w.slice(2, -2); return { type: "strong", raw: w, text: $, tokens: this.lexer.inlineTokens($) }; } } } codespan(e) { const t = this.rules.inline.code.exec(e); if (t) { let r = t[2].replace(this.rules.other.newLineCharGlobal, " "); const i = this.rules.other.nonSpaceChar.test(r), a = this.rules.other.startingSpaceChar.test(r) && this.rules.other.endingSpaceChar.test(r); return i && a && (r = r.substring(1, r.length - 1)), { type: "codespan", raw: t[0], text: r }; } } br(e) { const t = this.rules.inline.br.exec(e); if (t) return { type: "br", raw: t[0] }; } del(e) { const t = this.rules.inline.del.exec(e); if (t) return { type: "del", raw: t[0], text: t[2], tokens: this.lexer.inlineTokens(t[2]) }; } autolink(e) { const t = this.rules.inline.autolink.exec(e); if (t) { let r, i; return t[2] === "@" ? (r = t[1], i = "mailto:" + r) : (r = t[1], i = r), { type: "link", raw: t[0], text: r, href: i, tokens: [ { type: "text", raw: r, text: r } ] }; } } url(e) { var r, i; let t; if (t = this.rules.inline.url.exec(e)) { let a, o; if (t[2] === "@") a = t[0], o = "mailto:" + a; else { let s; do s = t[0], t[0] = (i = (r = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : r[0]) != null ? i : ""; while (s !== t[0]); a = t[0], t[1] === "www." ? o = "http://" + t[0] : o = t[0]; } return { type: "link", raw: t[0], text: a, href: o, tokens: [ { type: "text", raw: a, text: a } ] }; } } inlineText(e) { const t = this.rules.inline.text.exec(e); if (t) { const r = this.lexer.state.inRawBlock; return { type: "text", raw: t[0], text: t[0], escaped: r }; } } } class st { constructor(e) { $e(this, "tokens"); $e(this, "options"); $e(this, "state"); $e(this, "tokenizer"); $e(this, "inlineQueue"); this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || It, this.options.tokenizer = this.options.tokenizer || new Un(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 }; const t = { other: We, block: On.normal, inline: tn.normal }; this.options.pedantic ? (t.block = On.pedantic, t.inline = tn.pedantic) : this.options.gfm && (t.block = On.gfm, this.options.breaks ? t.inline = tn.breaks : t.inline = tn.gfm), this.tokenizer.rules = t; } static get rules() { return { block: On, inline: tn }; } static lex(e, t) { return new st(t).lex(e); } static lexInline(e, t) { return new st(t).inlineTokens(e); } lex(e) { e = e.replace(We.carriageReturn, ` `), this.blockTokens(e, this.tokens); for (let t = 0; t < this.inlineQueue.length; t++) { const r = this.inlineQueue[t]; this.inlineTokens(r.src, r.tokens); } return this.inlineQueue = [], this.tokens; } blockTokens(e, t = [], r = !1) { var i, a, o; for (this.options.pedantic && (e = e.replace(We.tabCharGlobal, " ").replace(We.spaceLine, "")); e; ) { let s; if ((a = (i = this.options.extensions) == null ? void 0 : i.block) != null && a.some((c) => (s = c.call({ lexer: this }, e, t)) ? (e = e.substring(s.raw.length), t.push(s), !0) : !1)) continue; if (s = this.tokenizer.space(e)) { e = e.substring(s.raw.length); const c = t.at(-1); s.raw.length === 1 && c !== void 0 ? c.raw += ` ` : t.push(s); continue; } if (s = this.tokenizer.code(e)) { e = e.substring(s.raw.length); const c = t.at(-1); (c == null ? void 0 : c.type) === "paragraph" || (c == null ? void 0 : c.type) === "text" ? (c.raw += ` ` + s.raw, c.text += ` ` + s.text, this.inlineQueue.at(-1).src = c.text) : t.push(s); continue; } if (s = this.tokenizer.fences(e)) { e = e.substring(s.raw.length), t.push(s); continue; } if (s = this.tokenizer.heading(e)) { e = e.substring(s.raw.length), t.push(s); continue; } if (s = this.tokenizer.hr(e)) { e = e.substring(s.raw.length), t.push(s); continue; } if (s = this.tokenizer.blockquote(e)) { e = e.substring(s.raw.length), t.push(s); continue; } if (s = this.tokenizer.list(e)) { e = e.substring(s.raw.length), t.push(s); continue; } if (s = this.tokenizer.html(e)) { e = e.substring(s.raw.length), t.push(s); continue; } if (s = this.tokenizer.def(e)) { e = e.substring(s.raw.length); const c = t.at(-1); (c == null ? void 0 : c.type) === "paragraph" || (c == null ? void 0 : c.type) === "text" ? (c.raw += ` ` + s.raw, c.text += ` ` + s.raw, this.inlineQueue.at(-1).src = c.text) : this.tokens.links[s.tag] || (this.tokens.links[s.tag] = { href: s.href, title: s.title }); continue; } if (s = this.tokenizer.table(e)) { e = e.substring(s.raw.length), t.push(s); continue; } if (s = this.tokenizer.lheading(e)) { e = e.substring(s.raw.length), t.push(s); continue; } let u = e; if ((o = this.options.extensions) != null && o.startBlock) { let c = 1 / 0; const l = e.slice(1); let h; this.options.extensions.startBlock.forEach((m) => { h = m.call({ lexer: this }, l), typeof h == "number" && h >= 0 && (c = Math.min(c, h)); }), c < 1 / 0 && c >= 0 && (u = e.substring(0, c + 1)); } if (this.state.top && (s = this.tokenizer.paragraph(u))) { const c = t.at(-1); r && (c == null ? void 0 : c.type) === "paragraph" ? (c.raw += ` ` + s.raw, c.text += ` ` + s.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = c.text) : t.push(s), r = u.length !== e.length, e = e.substring(s.raw.length); continue; } if (s = this.tokenizer.text(e)) { e = e.substring(s.raw.length); const c = t.at(-1); (c == null ? void 0 : c.type) === "text" ? (c.raw += ` ` + s.raw, c.text += ` ` + s.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = c.text) : t.push(s); continue; } if (e) { const c = "Infinite loop on byte: " + e.charCodeAt(0); if (this.options.silent) { console.error(c); break; } else throw new Error(c); } } return this.state.top = !0, t; } inline(e, t = []) { return this.inlineQueue.push({ src: e, tokens: t }), t; } inlineTokens(e, t = []) { var s, u, c; let r = e, i = null; if (this.tokens.links) { const l = Object.keys(this.tokens.links); if (l.length > 0) for (; (i = this.tokenizer.rules.inline.reflinkSearch.exec(r)) != null; ) l.includes(i[0].slice(i[0].lastIndexOf("[") + 1, -1)) && (r = r.slice(0, i.index) + "[" + "a".repeat(i[0].length - 2) + "]" + r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)); } for (; (i = this.tokenizer.rules.inline.anyPunctuation.exec(r)) != null; ) r = r.slice(0, i.index) + "++" + r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex); for (; (i = this.tokenizer.rules.inline.blockSkip.exec(r)) != null; ) r = r.slice(0, i.index) + "[" + "a".repeat(i[0].length - 2) + "]" + r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); let a = !1, o = ""; for (; e; ) { a || (o = ""), a = !1; let l; if ((u = (s = this.options.extensions) == null ? void 0 : s.inline) != null && u.some((m) => (l = m.call({ lexer: this }, e, t)) ? (e = e.substring(l.raw.length), t.push(l), !0) : !1)) continue; if (l = this.tokenizer.escape(e)) { e = e.substring(l.raw.length), t.push(l); continue; } if (l = this.tokenizer.tag(e)) { e = e.substring(l.raw.length), t.push(l); continue; } if (l = this.tokenizer.link(e)) { e = e.substring(l.raw.length), t.push(l); continue; } if (l = this.tokenizer.reflink(e, this.tokens.links)) { e = e.substring(l.raw.length); const m = t.at(-1); l.type === "text" && (m == null ? void 0 : m.type) === "text" ? (m.raw += l.raw, m.text += l.text) : t.push(l); continue; } if (l = this.tokenizer.emStrong(e, r, o)) { e = e.substring(l.raw.length), t.push(l); continue; } if (l = this.tokenizer.codespan(e)) { e = e.substring(l.raw.length), t.push(l); continue; } if (l = this.tokenizer.br(e)) { e = e.substring(l.raw.length), t.push(l); continue; } if (l = this.tokenizer.del(e)) { e = e.substring(l.raw.length), t.push(l); continue; } if (l = this.tokenizer.autolink(e)) { e = e.substring(l.raw.length), t.push(l); continue; } if (!this.state.inLink && (l = this.tokenizer.url(e))) { e = e.substring(l.raw.length), t.push(l); continue; } let h = e; if ((c = this.options.extensions) != null && c.startInline) { let m = 1 / 0; const w = e.slice(1); let $; this.options.extensions.startInline.forEach((S) => { $ = S.call({ lexer: this }, w), typeof $ == "number" && $ >= 0 && (m = Math.min(m, $)); }), m < 1 / 0 && m >= 0 && (h = e.substring(0, m + 1)); } if (l = this.tokenizer.inlineText(h)) { e = e.substring(l.raw.length), l.raw.slice(-1) !== "_" && (o = l.raw.slice(-1)), a = !0; const m = t.at(-1); (m == null ? void 0 : m.type) === "text" ? (m.raw += l.raw, m.text += l.text) : t.push(l); continue; } if (e) { const m = "Infinite loop on byte: " + e.charCodeAt(0); if (this.options.silent) { console.error(m); break; } else throw new Error(m); } } return t; } } class qn { constructor(e) { $e(this, "options"); $e(this, "parser"); this.options = e || It; } space(e) { return ""; } code({ text: e, lang: t, escaped: r }) { var o; const i = (o = (t || "").match(We.notSpaceStart)) == null ? void 0 : o[0], a = e.replace(We.endingNewline, "") + ` `; return i ? '
' + (r ? a : pt(a, !0)) + `
` : "
" + (r ? a : pt(a, !0)) + `
`; } blockquote({ tokens: e }) { return `
${this.parser.parse(e)}
`; } html({ text: e }) { return e; } heading({ tokens: e, depth: t }) { return `${this.parser.parseInline(e)} `; } hr(e) { return `
`; } list(e) { const t = e.ordered, r = e.start; let i = ""; for (let s = 0; s < e.items.length; s++) { const u = e.items[s]; i += this.listitem(u); } const a = t ? "ol" : "ul", o = t && r !== 1 ? ' start="' + r + '"' : ""; return "<" + a + o + `> ` + i + " `; } listitem(e) { var r; let t = ""; if (e.task) { const i = this.checkbox({ checked: !!e.checked }); e.loose ? ((r = e.tokens[0]) == null ? void 0 : r.type) === "paragraph" ? (e.tokens[0].text = i + " " + e.tokens[0].text, e.tokens[0].tokens && e.tokens[0].tokens.length > 0 && e.tokens[0].tokens[0].type === "text" && (e.tokens[0].tokens[0].text = i + " " + pt(e.tokens[0].tokens[0].text), e.tokens[0].tokens[0].escaped = !0)) : e.tokens.unshift({ type: "text", raw: i + " ", text: i + " ", escaped: !0 }) : t += i + " "; } return t += this.parser.parse(e.tokens, !!e.loose), `
  • ${t}
  • `; } checkbox({ checked: e }) { return "'; } paragraph({ tokens: e }) { return `

    ${this.parser.parseInline(e)}

    `; } table(e) { let t = "", r = ""; for (let a = 0; a < e.header.length; a++) r += this.tablecell(e.header[a]); t += this.tablerow({ text: r }); let i = ""; for (let a = 0; a < e.rows.length; a++) { const o = e.rows[a]; r = ""; for (let s = 0; s < o.length; s++) r += this.tablecell(o[s]); i += this.tablerow({ text: r }); } return i && (i = `${i}`), ` ` + t + ` ` + i + `
    `; } tablerow({ text: e }) { return ` ${e} `; } tablecell(e) { const t = this.parser.parseInline(e.tokens), r = e.header ? "th" : "td"; return (e.align ? `<${r} align="${e.align}">` : `<${r}>`) + t + ` `; } strong({ tokens: e }) { return `${this.parser.parseInline(e)}`; } em({ tokens: e }) { return `${this.parser.parseInline(e)}`; } codespan({ text: e }) { return `${pt(e, !0)}`; } br(e) { return "
    "; } del({ tokens: e }) { return `${this.parser.parseInline(e)}`; } link({ href: e, title: t, tokens: r }) { const i = this.parser.parseInline(r), a = ia(e); if (a === null) return i; e = a; let o = '
    ", o; } image({ href: e, title: t, text: r, tokens: i }) { i && (r = this.parser.parseInline(i, this.parser.textRenderer)); const a = ia(e); if (a === null) return pt(r); e = a; let o = `${r} { const c = s[u].flat(1 / 0); r = r.concat(this.walkTokens(c, t)); }) : s.tokens && (r = r.concat(this.walkTokens(s.tokens, t))); } } return r; } use(...e) { const t = this.defaults.extensions || { renderers: {}, childTokens: {} }; return e.forEach((r) => { const i = { ...r }; if (i.async = this.defaults.async || i.async || !1, r.extensions && (r.extensions.forEach((a) => { if (!a.name) throw new Error("extension name required"); if ("renderer" in a) { const o = t.renderers[a.name]; o ? t.renderers[a.name] = function(...s) { let u = a.renderer.apply(this, s); return u === !1 && (u = o.apply(this, s)), u; } : t.renderers[a.name] = a.renderer; } if ("tokenizer" in a) { if (!a.level || a.level !== "block" && a.level !== "inline") throw new Error("extension level must be 'block' or 'inline'"); const o = t[a.level]; o ? o.unshift(a.tokenizer) : t[a.level] = [a.tokenizer], a.start && (a.level === "block" ? t.startBlock ? t.startBlock.push(a.start) : t.startBlock = [a.start] : a.level === "inline" && (t.startInline ? t.startInline.push(a.start) : t.startInline = [a.start])); } "childTokens" in a && a.childTokens && (t.childTokens[a.name] = a.childTokens); }), i.extensions = t), r.renderer) { const a = this.defaults.renderer || new qn(this.defaults); for (const o in r.renderer) { if (!(o in a)) throw new Error(`renderer '${o}' does not exist`); if (["options", "parser"].includes(o)) continue; const s = o, u = r.renderer[s], c = a[s]; a[s] = (...l) => { let h = u.apply(a, l); return h === !1 && (h = c.apply(a, l)), h || ""; }; } i.renderer = a; } if (r.tokenizer) { const a = this.defaults.tokenizer || new Un(this.defaults); for (const o in r.tokenizer) { if (!(o in a)) throw new Error(`tokenizer '${o}' does not exist`); if (["options", "rules", "lexer"].includes(o)) continue; const s = o, u = r.tokenizer[s], c = a[s]; a[s] = (...l) => { let h = u.apply(a, l); return h === !1 && (h = c.apply(a, l)), h; }; } i.tokenizer = a; } if (r.hooks) { const a = this.defaults.hooks || new cn(); for (const o in r.hooks) { if (!(o in a)) throw new Error(`hook '${o}' does not exist`); if (["options", "block"].includes(o)) continue; const s = o, u = r.hooks[s], c = a[s]; cn.passThroughHooks.has(o) ? a[s] = (l) => { if (this.defaults.async) return Promise.resolve(u.call(a, l)).then((m) => c.call(a, m)); const h = u.call(a, l); return c.call(a, h); } : a[s] = (...l) => { let h = u.apply(a, l); return h === !1 && (h = c.apply(a, l)), h; }; } i.hooks = a; } if (r.walkTokens) { const a = this.defaults.walkTokens, o = r.walkTokens; i.walkTokens = function(s) { let u = []; return u.push(o.call(this, s)), a && (u = u.concat(a.call(this, s))), u; }; } this.defaults = { ...this.defaults, ...i }; }), this; } setOptions(e) { return this.defaults = { ...this.defaults, ...e }, this; } lexer(e, t) { return st.lex(e, t != null ? t : this.defaults); } parser(e, t) { return ut.parse(e, t != null ? t : this.defaults); } parseMarkdown(e) { return (r, i) => { const a = { ...i }, o = { ...this.defaults, ...a }, s = this.onError(!!o.silent, !!o.async); if (this.defaults.async === !0 && a.async === !1) return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.")); if (typeof r > "u" || r === null) return s(new Error("marked(): input parameter is undefined or null")); if (typeof r != "string") return s(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(r) + ", string expected")); o.hooks && (o.hooks.options = o, o.hooks.block = e); const u = o.hooks ? o.hooks.provideLexer() : e ? st.lex : st.lexInline, c = o.hooks ? o.hooks.provideParser() : e ? ut.parse : ut.parseInline; if (o.async) return Promise.resolve(o.hooks ? o.hooks.preprocess(r) : r).then((l) => u(l, o)).then((l) => o.hooks ? o.hooks.processAllTokens(l) : l).then((l) => o.walkTokens ? Promise.all(this.walkTokens(l, o.walkTokens)).then(() => l) : l).then((l) => c(l, o)).then((l) => o.hooks ? o.hooks.postprocess(l) : l).catch(s); try { o.hooks && (r = o.hooks.preprocess(r)); let l = u(r, o); o.hooks && (l = o.hooks.processAllTokens(l)), o.walkTokens && this.walkTokens(l, o.walkTokens); let h = c(l, o); return o.hooks && (h = o.hooks.postprocess(h)), h; } catch (l) { return s(l); } }; } onError(e, t) { return (r) => { if (r.message += ` Please report this to https://github.com/markedjs/marked.`, e) { const i = "

    An error occurred:

    " + pt(r.message + "", !0) + "
    "; return t ? Promise.resolve(i) : i; } if (t) return Promise.reject(r); throw r; }; } } const jt = new ho(); function we(n, e) { return jt.parse(n, e); } we.options = we.setOptions = function(n) { return jt.setOptions(n), we.defaults = jt.defaults, to(we.defaults), we; }; we.getDefaults = Ur; we.defaults = It; we.use = function(...n) { return jt.use(...n), we.defaults = jt.defaults, to(we.defaults), we; }; we.walkTokens = function(n, e) { return jt.walkTokens(n, e); }; we.parseInline = jt.parseInline; we.Parser = ut; we.parser = ut.parse; we.Renderer = qn; we.TextRenderer = Kr; we.Lexer = st; we.lexer = st.lex; we.Tokenizer = Un; we.Hooks = cn; we.parse = we; we.options; we.setOptions; we.use; we.walkTokens; we.parseInline; ut.parse; st.lex; const xf = he({ name: "FcMarkdown", data() { return { marked: Te(new ho()), html: "" }; }, props: { content: String }, watch: { content: { handler() { this.html = this.marked.parse(this.content || ""); }, immediate: !0 } } }), Cf = ["innerHTML"]; function kf(n, e, t, r, i, a) { return ee(), me("div", { class: "_fc-markdown", innerHTML: n.html }, null, 8, Cf); } const Af = /* @__PURE__ */ Ae(xf, [["render", kf]]); const Df = he({ name: "FcDialog", emits: ["confirm", "submit", "validateFail", "update:modelValue"], props: { formData: Object, options: { type: Object, default: () => Be({ submitBtn: !1, resetBtn: !1 }) }, rule: Array, autoClose: { type: Boolean, default: !0 }, footer: { type: Boolean, default: !0 }, preview: Boolean, modelValue: Object, formCreateInject: Object }, computed: { formOptions() { const n = { ...this.options }; return this.preview && (n.preview = this.preview), n; } }, data() { return { visible: !1, max: this.$attrs.fullscreen || !1, fapi: {}, value: {}, formRule: [], Form: Te(this.formCreateInject.form.$form()) }; }, methods: { formChange() { this.$emit("update:modelValue", this.fapi.formData()); }, open(n) { this.$nextTick(() => { this.visible = !0, this.value = vt(n || this.modelValue || this.formData || {}), this.formRule = vt(this.rule || []); }); }, close() { this.visible = !1; }, handleConfirm() { this.$emit("confirm", this.fapi), this.fapi.submit().then((n) => { this.$emit("submit", n, this.fapi, this.close), this.autoClose && this.close(); }).catch((n) => { this.$emit("validateFail", n, this.fapi); }); } }, mounted() { this.formCreateInject.api.top.bus.$on("fc.closeDialog", this.close), Oa(() => { this.formCreateInject.api.top.bus.$off("fc.closeDialog", this.close); }); } }), Rf = { key: 0, class: "el-dialog__headerbtn", type: "button", style: { right: "36px" } }; function Pf(n, e, t, r, i, a) { const o = K("el-button"), s = K("el-dialog"); return ee(), Re(s, Pe({ class: "_fc-dialog" }, n.$attrs, { fullscreen: n.max, modelValue: n.visible, "onUpdate:modelValue": e[3] || (e[3] = (u) => n.visible = u), destroyOnClose: "" }), xa({ default: Ce(() => [ n.$attrs.fullscreen ? dt("", !0) : (ee(), me("button", Rf, [ n.max ? (ee(), me("i", { key: 0, class: "fc-icon icon-page-min", onClick: e[0] || (e[0] = (u) => n.max = !1) })) : (ee(), me("i", { key: 1, class: "fc-icon icon-page-max", onClick: e[1] || (e[1] = (u) => n.max = !0) })) ])), (ee(), Re(Ft(n.Form), { option: n.formOptions, rule: n.formRule, extendOption: !0, api: n.fapi, "onUpdate:api": e[2] || (e[2] = (u) => n.fapi = u), "model-value": n.value, subForm: !1, onChange: n.formChange, onEmitEvent: n.$emit }, null, 40, ["option", "rule", "api", "model-value", "onChange", "onEmitEvent"])) ]), _: 2 }, [ n.footer !== !1 ? { name: "footer", fn: Ce(() => [ H(o, { onClick: n.close }, { default: Ce(() => [ He(Ve(n.formCreateInject.t("close") || "\u5173\u95ED"), 1) ]), _: 1 }, 8, ["onClick"]), H(o, { type: "primary", onClick: n.handleConfirm }, { default: Ce(() => [ He(Ve(n.formCreateInject.t("ok") || "\u786E\u5B9A"), 1) ]), _: 1 }, 8, ["onClick"]) ]), key: "0" } : void 0 ]), 1040, ["fullscreen", "modelValue"]); } const Mf = /* @__PURE__ */ Ae(Df, [["render", Pf]]), Tf = (n) => n !== null && typeof n == "object", jf = (n) => n != null; function Pr(n) { if (!jf(n)) return n; if (Array.isArray(n)) return n.map((e) => Pr(e)); if (Tf(n)) { const e = {}; return Object.keys(n).forEach((t) => { e[t] = Pr(n[t]); }), e; } return n; } const Ff = (n, e) => ka({ message: n, type: e || "info", customClass: "_fc-message-tip" }); function If(n) { const e = document.createElement("textarea"); e.style.position = "fixed", e.style.top = 0, e.style.left = "-9999px", e.value = n, document.body.appendChild(e), e.focus(), e.select(); try { document.execCommand("copy"); } catch { console.log("Oops, unable to copy"); } Ff("\u5DF2\u590D\u5236!", "success"), document.body.removeChild(e); } function Vf(n) { return n.filter((e, t) => n.indexOf(e) === t); } const Bf = he({ name: "FcDataSelect", components: { FcDialog: Mf }, emits: ["update:modelValue", "change", "clear"], props: { title: String, formCreateInject: Object, placeholder: String, multiple: Boolean, disabled: Boolean, multipleLimit: Number, valueKey: String, labelKey: String, clearable: Boolean, searchRule: Object, tableRule: Object, autoLoad: Boolean, modelValue: [Object, Array] }, computed: { options() { return this.list.map((n) => ({ label: n[this.labelKey || "label"], value: n[this.valueKey || "value"] })); }, selectValue() { const n = this.options.map((e) => e.value); return this.multiple === !0 ? n : n[0]; }, fapi() { var n, e; return (e = (n = this.$refs) == null ? void 0 : n.dialog) == null ? void 0 : e.fapi; } }, data() { return { list: [], visible: !1, formRule: [], load: Ar(() => { this.$refs.dialog.fapi.el(this.formRule[1].name).initPage(); }, 500) }; }, watch: { modelValue: { handler(n) { n ? this.list = Array.isArray(n) ? n : [n] : this.list = []; }, immediate: !0 } }, methods: { getTableEl() { return this.$refs.dialog.fapi.el(this.formRule[1].name); }, getDialogEl() { return this.$refs.dialog; }, formChange() { this.autoLoad && this.load(); }, changeSelectValue(n) { n == null ? this.list = [] : this.list = this.list.filter((e) => n.indexOf(e[this.valueKey || "value"]) !== -1), this.updateValue(); }, confirm() { const n = Vf([...this.list, ...this.$refs.dialog.fapi.el(this.formRule[1].name).getEl().getSelectionRows()]), e = n.map((t) => t[this.valueKey || "value"]); this.list = n.filter((t, r) => e.indexOf(t[this.valueKey || "value"]) === r), this.$refs.dialog.close(), this.updateValue(); }, tableRowClick(n) { this.multiple ? this.$refs.dialog.fapi.el(this.formRule[1].name).getEl().toggleRowSelection(n) : (this.list = [n], this.updateValue(), this.$refs.dialog.close()); }, updateValue() { this.multipleLimit > 0 && this.list.length > this.multipleLimit && (this.list = this.list.splice(0, this.multipleLimit)); const n = this.list.map((e) => ({ [this.valueKey || "value"]: e[this.valueKey || "value"], [this.labelKey || "label"]: e[this.labelKey || "label"] })); this.$emit("update:modelValue", this.multiple ? n : n[0]), this.$emit("change", this.multiple ? n : n[0]); }, getFormRule() { const n = Pr([ this.searchRule, this.tableRule ]); return n[1].on || (n[1].on = {}), n[1].props || (n[1].props = {}), this.multiple && (n[1].props.rowKey || (n[1].props.rowKey = this.valueKey || "value"), n[1].name || (n[1].name = kr())), n[1].props.selection = !0, n[1].on.rowClick ? n[1].on.rowClick = [(...e) => this.tableRowClick(...e), n[1].on.rowClick] : n[1].on.rowClick = (...e) => this.tableRowClick(...e), n[1].on.selectionChange ? n[1].on.selectionChange = [(...e) => this.selectionChange(...e), n[1].on.selectionChange] : n[1].on.selectionChange = (...e) => this.selectionChange(...e), n; }, selectionChange(n) { this.multiple || this.tableRowClick(n[0]); }, handleClear(...n) { this.$emit("clear", ...n); }, handleClick(n) { this.disabled || !n || (this.visible = !0, this.formRule = this.getFormRule(), this.$refs.dialog.open()); } } }), Lf = { class: "_fc-data-select" }; function Nf(n, e, t, r, i, a) { const o = K("el-option"), s = K("el-select"), u = K("FcDialog"); return ee(), me("div", Lf, [ H(s, { disabled: n.disabled, placeholder: n.placeholder, multiple: n.multiple, multipleLimit: n.multipleLimit, clearable: n.clearable, "model-value": n.selectValue, "onUpdate:modelValue": n.changeSelectValue, "popper-class": "_fc-data-select-pop", onVisibleChange: n.handleClick, onClear: n.handleClear }, { default: Ce(() => [ (ee(!0), me(Ke, null, un(n.options, (c) => (ee(), Re(o, { key: c.value, label: c.label, value: c.value }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["disabled", "placeholder", "multiple", "multipleLimit", "clearable", "model-value", "onUpdate:modelValue", "onVisibleChange", "onClear"]), H(u, { ref: "dialog", formCreateInject: n.formCreateInject, rule: n.formRule, "onUpdate:modelValue": n.formChange, footer: n.multiple, title: n.title, width: "900px", onConfirm: n.confirm }, null, 8, ["formCreateInject", "rule", "onUpdate:modelValue", "footer", "title", "onConfirm"]) ]); } const zf = /* @__PURE__ */ Ae(Bf, [["render", Nf]]), Uf = he({ name: "AudioBox", emits: ["pause", "play", "ended"], data() { return {}; }, props: { src: String, type: String, controls: { type: Boolean, default: !0 }, autoplay: Boolean, loop: Boolean, preload: { type: String, default: "auto" }, muted: Boolean } }), qf = ["controls", "autoplay", "loop", "preload", "muted"], Gf = ["src", "type"]; function Hf(n, e, t, r, i, a) { return ee(), me("audio", { key: n.src, controls: n.controls, autoplay: n.autoplay, loop: n.loop, preload: n.preload, muted: n.muted, onPause: e[0] || (e[0] = (o) => n.$emit("pause", o)), onPlay: e[1] || (e[1] = (o) => n.$emit("play", o)), onEnded: e[2] || (e[2] = (o) => n.$emit("ended", o)) }, [ Me("source", { src: n.src, type: n.type }, null, 8, Gf), e[3] || (e[3] = He(" Your browser does not support the audio element. ")) ], 40, qf); } const Wf = /* @__PURE__ */ Ae(Uf, [["render", Hf]]); const Yf = he({ name: "IframeBox", emits: ["load"], data() { return {}; }, props: { src: String, loading: String } }), Xf = ["src"]; function Jf(n, e, t, r, i, a) { return ee(), me("iframe", { class: "_fc-iframe-box", src: n.src, frameborder: "0", onLoad: e[0] || (e[0] = (o) => n.$emit("load", o)) }, null, 40, Xf); } const Kf = /* @__PURE__ */ Ae(Yf, [["render", Jf]]); var Zr = {}, Xn = {}, Ze = {}; Object.defineProperty(Ze, "__esModule", { value: !0 }); function Zf(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } var Qf = function n(e, t) { Zf(this, n), this.data = e, this.text = t.text || e, this.options = t; }; Ze.default = Qf; Object.defineProperty(Xn, "__esModule", { value: !0 }); Xn.CODE39 = void 0; var ed = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), td = Ze, nd = rd(td); function rd(n) { return n && n.__esModule ? n : { default: n }; } function id(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function ad(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function od(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var sd = function(n) { od(e, n); function e(t, r) { return id(this, e), t = t.toUpperCase(), r.mod43 && (t += cd(fd(t))), ad(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); } return ed(e, [{ key: "encode", value: function() { for (var r = cr("*"), i = 0; i < this.data.length; i++) r += cr(this.data[i]) + "0"; return r += cr("*"), { data: r, text: this.text }; } }, { key: "valid", value: function() { return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/) !== -1; } }]), e; }(nd.default), po = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "-", ".", " ", "$", "/", "+", "%", "*"], ud = [20957, 29783, 23639, 30485, 20951, 29813, 23669, 20855, 29789, 23645, 29975, 23831, 30533, 22295, 30149, 24005, 21623, 29981, 23837, 22301, 30023, 23879, 30545, 22343, 30161, 24017, 21959, 30065, 23921, 22385, 29015, 18263, 29141, 17879, 29045, 18293, 17783, 29021, 18269, 17477, 17489, 17681, 20753, 35770]; function cr(n) { return ld(mo(n)); } function ld(n) { return ud[n].toString(2); } function cd(n) { return po[n]; } function mo(n) { return po.indexOf(n); } function fd(n) { for (var e = 0, t = 0; t < n.length; t++) e += mo(n[t]); return e = e % 43, e; } Xn.CODE39 = sd; var mt = {}, Qr = {}, Xt = {}, xe = {}; Object.defineProperty(xe, "__esModule", { value: !0 }); var rn; function fr(n, e, t) { return e in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n; } var go = xe.SET_A = 0, vo = xe.SET_B = 1, yo = xe.SET_C = 2; xe.SHIFT = 98; var dd = xe.START_A = 103, hd = xe.START_B = 104, pd = xe.START_C = 105; xe.MODULO = 103; xe.STOP = 106; xe.FNC1 = 207; xe.SET_BY_CODE = (rn = {}, fr(rn, dd, go), fr(rn, hd, vo), fr(rn, pd, yo), rn); xe.SWAP = { 101: go, 100: vo, 99: yo }; xe.A_START_CHAR = String.fromCharCode(208); xe.B_START_CHAR = String.fromCharCode(209); xe.C_START_CHAR = String.fromCharCode(210); xe.A_CHARS = "[\0-_\xC8-\xCF]"; xe.B_CHARS = "[ -\x7F\xC8-\xCF]"; xe.C_CHARS = "(\xCF*[0-9]{2}\xCF*)"; xe.BARS = [11011001100, 11001101100, 11001100110, 10010011e3, 10010001100, 10001001100, 10011001e3, 10011000100, 10001100100, 11001001e3, 11001000100, 11000100100, 10110011100, 10011011100, 10011001110, 10111001100, 10011101100, 10011100110, 11001110010, 11001011100, 11001001110, 11011100100, 11001110100, 11101101110, 11101001100, 11100101100, 11100100110, 11101100100, 11100110100, 11100110010, 11011011e3, 11011000110, 11000110110, 10100011e3, 10001011e3, 10001000110, 10110001e3, 10001101e3, 10001100010, 11010001e3, 11000101e3, 11000100010, 10110111e3, 10110001110, 10001101110, 10111011e3, 10111000110, 10001110110, 11101110110, 11010001110, 11000101110, 11011101e3, 11011100010, 11011101110, 11101011e3, 11101000110, 11100010110, 11101101e3, 11101100010, 11100011010, 11101111010, 11001000010, 11110001010, 1010011e4, 10100001100, 1001011e4, 10010000110, 10000101100, 10000100110, 1011001e4, 10110000100, 1001101e4, 10011000010, 10000110100, 10000110010, 11000010010, 1100101e4, 11110111010, 11000010100, 10001111010, 10100111100, 10010111100, 10010011110, 10111100100, 10011110100, 10011110010, 11110100100, 11110010100, 11110010010, 11011011110, 11011110110, 11110110110, 10101111e3, 10100011110, 10001011110, 10111101e3, 10111100010, 11110101e3, 11110100010, 10111011110, 10111101110, 11101011110, 11110101110, 11010000100, 1101001e4, 11010011100, 1100011101011]; Object.defineProperty(Xt, "__esModule", { value: !0 }); var md = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), gd = Ze, vd = yd(gd), et = xe; function yd(n) { return n && n.__esModule ? n : { default: n }; } function _d(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function bd(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function wd(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var $d = function(n) { wd(e, n); function e(t, r) { _d(this, e); var i = bd(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t.substring(1), r)); return i.bytes = t.split("").map(function(a) { return a.charCodeAt(0); }), i; } return md(e, [{ key: "valid", value: function() { return /^[\x00-\x7F\xC8-\xD3]+$/.test(this.data); } }, { key: "encode", value: function() { var r = this.bytes, i = r.shift() - 105, a = et.SET_BY_CODE[i]; if (a === void 0) throw new RangeError("The encoding does not start with a start character."); this.shouldEncodeAsEan128() === !0 && r.unshift(et.FNC1); var o = e.next(r, 1, a); return { text: this.text === this.data ? this.text.replace(/[^\x20-\x7E]/g, "") : this.text, data: e.getBar(i) + o.result + e.getBar((o.checksum + i) % et.MODULO) + e.getBar(et.STOP) }; } }, { key: "shouldEncodeAsEan128", value: function() { var r = this.options.ean128 || !1; return typeof r == "string" && (r = r.toLowerCase() === "true"), r; } }], [{ key: "getBar", value: function(r) { return et.BARS[r] ? et.BARS[r].toString() : ""; } }, { key: "correctIndex", value: function(r, i) { if (i === et.SET_A) { var a = r.shift(); return a < 32 ? a + 64 : a - 32; } else return i === et.SET_B ? r.shift() - 32 : (r.shift() - 48) * 10 + r.shift() - 48; } }, { key: "next", value: function(r, i, a) { if (!r.length) return { result: "", checksum: 0 }; var o = void 0, s = void 0; if (r[0] >= 200) { s = r.shift() - 105; var u = et.SWAP[s]; u !== void 0 ? o = e.next(r, i + 1, u) : ((a === et.SET_A || a === et.SET_B) && s === et.SHIFT && (r[0] = a === et.SET_A ? r[0] > 95 ? r[0] - 96 : r[0] : r[0] < 32 ? r[0] + 96 : r[0]), o = e.next(r, i + 1, a)); } else s = e.correctIndex(r, a), o = e.next(r, i + 1, a); var c = e.getBar(s), l = s * i; return { result: c + o.result, checksum: l + o.checksum }; } }]), e; }(vd.default); Xt.default = $d; var ei = {}; Object.defineProperty(ei, "__esModule", { value: !0 }); var Ct = xe, _o = function(e) { return e.match(new RegExp("^" + Ct.A_CHARS + "*"))[0].length; }, bo = function(e) { return e.match(new RegExp("^" + Ct.B_CHARS + "*"))[0].length; }, wo = function(e) { return e.match(new RegExp("^" + Ct.C_CHARS + "*"))[0]; }; function ti(n, e) { var t = e ? Ct.A_CHARS : Ct.B_CHARS, r = n.match(new RegExp("^(" + t + "+?)(([0-9]{2}){2,})([^0-9]|$)")); if (r) return r[1] + String.fromCharCode(204) + $o(n.substring(r[1].length)); var i = n.match(new RegExp("^" + t + "+"))[0]; return i.length === n.length ? n : i + String.fromCharCode(e ? 205 : 206) + ti(n.substring(i.length), !e); } function $o(n) { var e = wo(n), t = e.length; if (t === n.length) return n; n = n.substring(t); var r = _o(n) >= bo(n); return e + String.fromCharCode(r ? 206 : 205) + ti(n, r); } ei.default = function(n) { var e = void 0, t = wo(n).length; if (t >= 2) e = Ct.C_START_CHAR + $o(n); else { var r = _o(n) > bo(n); e = (r ? Ct.A_START_CHAR : Ct.B_START_CHAR) + ti(n, r); } return e.replace( /[\xCD\xCE]([^])[\xCD\xCE]/, function(i, a) { return String.fromCharCode(203) + a; } ); }; Object.defineProperty(Qr, "__esModule", { value: !0 }); var Sd = Xt, Od = So(Sd), Ed = ei, xd = So(Ed); function So(n) { return n && n.__esModule ? n : { default: n }; } function Cd(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function dr(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function kd(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var Ad = function(n) { kd(e, n); function e(t, r) { if (Cd(this, e), /^[\x00-\x7F\xC8-\xD3]+$/.test(t)) var i = dr(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, (0, xd.default)(t), r)); else var i = dr(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); return dr(i); } return e; }(Od.default); Qr.default = Ad; var ni = {}; Object.defineProperty(ni, "__esModule", { value: !0 }); var Dd = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), Rd = Xt, Pd = Md(Rd), sa = xe; function Md(n) { return n && n.__esModule ? n : { default: n }; } function Td(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function jd(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function Fd(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var Id = function(n) { Fd(e, n); function e(t, r) { return Td(this, e), jd(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, sa.A_START_CHAR + t, r)); } return Dd(e, [{ key: "valid", value: function() { return new RegExp("^" + sa.A_CHARS + "+$").test(this.data); } }]), e; }(Pd.default); ni.default = Id; var ri = {}; Object.defineProperty(ri, "__esModule", { value: !0 }); var Vd = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), Bd = Xt, Ld = Nd(Bd), ua = xe; function Nd(n) { return n && n.__esModule ? n : { default: n }; } function zd(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Ud(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function qd(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var Gd = function(n) { qd(e, n); function e(t, r) { return zd(this, e), Ud(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, ua.B_START_CHAR + t, r)); } return Vd(e, [{ key: "valid", value: function() { return new RegExp("^" + ua.B_CHARS + "+$").test(this.data); } }]), e; }(Ld.default); ri.default = Gd; var ii = {}; Object.defineProperty(ii, "__esModule", { value: !0 }); var Hd = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), Wd = Xt, Yd = Xd(Wd), la = xe; function Xd(n) { return n && n.__esModule ? n : { default: n }; } function Jd(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Kd(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function Zd(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var Qd = function(n) { Zd(e, n); function e(t, r) { return Jd(this, e), Kd(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, la.C_START_CHAR + t, r)); } return Hd(e, [{ key: "valid", value: function() { return new RegExp("^" + la.C_CHARS + "+$").test(this.data); } }]), e; }(Yd.default); ii.default = Qd; Object.defineProperty(mt, "__esModule", { value: !0 }); mt.CODE128C = mt.CODE128B = mt.CODE128A = mt.CODE128 = void 0; var eh = Qr, th = Jn(eh), nh = ni, rh = Jn(nh), ih = ri, ah = Jn(ih), oh = ii, sh = Jn(oh); function Jn(n) { return n && n.__esModule ? n : { default: n }; } mt.CODE128 = th.default; mt.CODE128A = rh.default; mt.CODE128B = ah.default; mt.CODE128C = sh.default; var Je = {}, ai = {}, lt = {}; Object.defineProperty(lt, "__esModule", { value: !0 }); lt.SIDE_BIN = "101"; lt.MIDDLE_BIN = "01010"; lt.BINARIES = { L: [ "0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011" ], G: [ "0100111", "0110011", "0011011", "0100001", "0011101", "0111001", "0000101", "0010001", "0001001", "0010111" ], R: [ "1110010", "1100110", "1101100", "1000010", "1011100", "1001110", "1010000", "1000100", "1001000", "1110100" ], O: [ "0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011" ], E: [ "0100111", "0110011", "0011011", "0100001", "0011101", "0111001", "0000101", "0010001", "0001001", "0010111" ] }; lt.EAN2_STRUCTURE = ["LL", "LG", "GL", "GG"]; lt.EAN5_STRUCTURE = ["GGLLL", "GLGLL", "GLLGL", "GLLLG", "LGGLL", "LLGGL", "LLLGG", "LGLGL", "LGLLG", "LLGLG"]; lt.EAN13_STRUCTURE = ["LLLLLL", "LLGLGG", "LLGGLG", "LLGGGL", "LGLLGG", "LGGLLG", "LGGGLL", "LGLGLG", "LGLGGL", "LGGLGL"]; var Kn = {}, Vt = {}; Object.defineProperty(Vt, "__esModule", { value: !0 }); var uh = lt, lh = function(e, t, r) { var i = e.split("").map(function(o, s) { return uh.BINARIES[t[s]]; }).map(function(o, s) { return o ? o[e[s]] : ""; }); if (r) { var a = e.length - 1; i = i.map(function(o, s) { return s < a ? o + r : o; }); } return i.join(""); }; Vt.default = lh; Object.defineProperty(Kn, "__esModule", { value: !0 }); var ch = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), zt = lt, fh = Vt, ca = Oo(fh), dh = Ze, hh = Oo(dh); function Oo(n) { return n && n.__esModule ? n : { default: n }; } function ph(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function mh(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function gh(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var vh = function(n) { gh(e, n); function e(t, r) { ph(this, e); var i = mh(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); return i.fontSize = !r.flat && r.fontSize > r.width * 10 ? r.width * 10 : r.fontSize, i.guardHeight = r.height + i.fontSize / 2 + r.textMargin, i; } return ch(e, [{ key: "encode", value: function() { return this.options.flat ? this.encodeFlat() : this.encodeGuarded(); } }, { key: "leftText", value: function(r, i) { return this.text.substr(r, i); } }, { key: "leftEncode", value: function(r, i) { return (0, ca.default)(r, i); } }, { key: "rightText", value: function(r, i) { return this.text.substr(r, i); } }, { key: "rightEncode", value: function(r, i) { return (0, ca.default)(r, i); } }, { key: "encodeGuarded", value: function() { var r = { fontSize: this.fontSize }, i = { height: this.guardHeight }; return [{ data: zt.SIDE_BIN, options: i }, { data: this.leftEncode(), text: this.leftText(), options: r }, { data: zt.MIDDLE_BIN, options: i }, { data: this.rightEncode(), text: this.rightText(), options: r }, { data: zt.SIDE_BIN, options: i }]; } }, { key: "encodeFlat", value: function() { var r = [zt.SIDE_BIN, this.leftEncode(), zt.MIDDLE_BIN, this.rightEncode(), zt.SIDE_BIN]; return { data: r.join(""), text: this.text }; } }]), e; }(hh.default); Kn.default = vh; Object.defineProperty(ai, "__esModule", { value: !0 }); var yh = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), an = function n(e, t, r) { e === null && (e = Function.prototype); var i = Object.getOwnPropertyDescriptor(e, t); if (i === void 0) { var a = Object.getPrototypeOf(e); return a === null ? void 0 : n(a, t, r); } else { if ("value" in i) return i.value; var o = i.get; return o === void 0 ? void 0 : o.call(r); } }, _h = lt, bh = Kn, wh = $h(bh); function $h(n) { return n && n.__esModule ? n : { default: n }; } function Sh(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Oh(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function Eh(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var fa = function(e) { var t = e.substr(0, 12).split("").map(function(r) { return +r; }).reduce(function(r, i, a) { return a % 2 ? r + i * 3 : r + i; }, 0); return (10 - t % 10) % 10; }, xh = function(n) { Eh(e, n); function e(t, r) { Sh(this, e), t.search(/^[0-9]{12}$/) !== -1 && (t += fa(t)); var i = Oh(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); return i.lastChar = r.lastChar, i; } return yh(e, [{ key: "valid", value: function() { return this.data.search(/^[0-9]{13}$/) !== -1 && +this.data[12] === fa(this.data); } }, { key: "leftText", value: function() { return an(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "leftText", this).call(this, 1, 6); } }, { key: "leftEncode", value: function() { var r = this.data.substr(1, 6), i = _h.EAN13_STRUCTURE[this.data[0]]; return an(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "leftEncode", this).call(this, r, i); } }, { key: "rightText", value: function() { return an(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "rightText", this).call(this, 7, 6); } }, { key: "rightEncode", value: function() { var r = this.data.substr(7, 6); return an(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "rightEncode", this).call(this, r, "RRRRRR"); } }, { key: "encodeGuarded", value: function() { var r = an(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "encodeGuarded", this).call(this); return this.options.displayValue && (r.unshift({ data: "000000000000", text: this.text.substr(0, 1), options: { textAlign: "left", fontSize: this.fontSize } }), this.options.lastChar && (r.push({ data: "00" }), r.push({ data: "00000", text: this.options.lastChar, options: { fontSize: this.fontSize } }))), r; } }]), e; }(wh.default); ai.default = xh; var oi = {}; Object.defineProperty(oi, "__esModule", { value: !0 }); var Ch = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), En = function n(e, t, r) { e === null && (e = Function.prototype); var i = Object.getOwnPropertyDescriptor(e, t); if (i === void 0) { var a = Object.getPrototypeOf(e); return a === null ? void 0 : n(a, t, r); } else { if ("value" in i) return i.value; var o = i.get; return o === void 0 ? void 0 : o.call(r); } }, kh = Kn, Ah = Dh(kh); function Dh(n) { return n && n.__esModule ? n : { default: n }; } function Rh(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Ph(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function Mh(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var da = function(e) { var t = e.substr(0, 7).split("").map(function(r) { return +r; }).reduce(function(r, i, a) { return a % 2 ? r + i : r + i * 3; }, 0); return (10 - t % 10) % 10; }, Th = function(n) { Mh(e, n); function e(t, r) { return Rh(this, e), t.search(/^[0-9]{7}$/) !== -1 && (t += da(t)), Ph(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); } return Ch(e, [{ key: "valid", value: function() { return this.data.search(/^[0-9]{8}$/) !== -1 && +this.data[7] === da(this.data); } }, { key: "leftText", value: function() { return En(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "leftText", this).call(this, 0, 4); } }, { key: "leftEncode", value: function() { var r = this.data.substr(0, 4); return En(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "leftEncode", this).call(this, r, "LLLL"); } }, { key: "rightText", value: function() { return En(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "rightText", this).call(this, 4, 4); } }, { key: "rightEncode", value: function() { var r = this.data.substr(4, 4); return En(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "rightEncode", this).call(this, r, "RRRR"); } }]), e; }(Ah.default); oi.default = Th; var si = {}; Object.defineProperty(si, "__esModule", { value: !0 }); var jh = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), Fh = lt, Ih = Vt, Vh = Eo(Ih), Bh = Ze, Lh = Eo(Bh); function Eo(n) { return n && n.__esModule ? n : { default: n }; } function Nh(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function zh(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function Uh(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var qh = function(e) { var t = e.split("").map(function(r) { return +r; }).reduce(function(r, i, a) { return a % 2 ? r + i * 9 : r + i * 3; }, 0); return t % 10; }, Gh = function(n) { Uh(e, n); function e(t, r) { return Nh(this, e), zh(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); } return jh(e, [{ key: "valid", value: function() { return this.data.search(/^[0-9]{5}$/) !== -1; } }, { key: "encode", value: function() { var r = Fh.EAN5_STRUCTURE[qh(this.data)]; return { data: "1011" + (0, Vh.default)(this.data, r, "01"), text: this.text }; } }]), e; }(Lh.default); si.default = Gh; var ui = {}; Object.defineProperty(ui, "__esModule", { value: !0 }); var Hh = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), Wh = lt, Yh = Vt, Xh = xo(Yh), Jh = Ze, Kh = xo(Jh); function xo(n) { return n && n.__esModule ? n : { default: n }; } function Zh(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Qh(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function ep(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var tp = function(n) { ep(e, n); function e(t, r) { return Zh(this, e), Qh(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); } return Hh(e, [{ key: "valid", value: function() { return this.data.search(/^[0-9]{2}$/) !== -1; } }, { key: "encode", value: function() { var r = Wh.EAN2_STRUCTURE[parseInt(this.data) % 4]; return { data: "1011" + (0, Xh.default)(this.data, r, "01"), text: this.text }; } }]), e; }(Kh.default); ui.default = tp; var mn = {}; Object.defineProperty(mn, "__esModule", { value: !0 }); var np = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(); mn.checksum = Mr; var rp = Vt, Ut = Co(rp), ip = Ze, ap = Co(ip); function Co(n) { return n && n.__esModule ? n : { default: n }; } function op(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function sp(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function up(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var lp = function(n) { up(e, n); function e(t, r) { op(this, e), t.search(/^[0-9]{11}$/) !== -1 && (t += Mr(t)); var i = sp(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); return i.displayValue = r.displayValue, r.fontSize > r.width * 10 ? i.fontSize = r.width * 10 : i.fontSize = r.fontSize, i.guardHeight = r.height + i.fontSize / 2 + r.textMargin, i; } return np(e, [{ key: "valid", value: function() { return this.data.search(/^[0-9]{12}$/) !== -1 && this.data[11] == Mr(this.data); } }, { key: "encode", value: function() { return this.options.flat ? this.flatEncoding() : this.guardedEncoding(); } }, { key: "flatEncoding", value: function() { var r = ""; return r += "101", r += (0, Ut.default)(this.data.substr(0, 6), "LLLLLL"), r += "01010", r += (0, Ut.default)(this.data.substr(6, 6), "RRRRRR"), r += "101", { data: r, text: this.text }; } }, { key: "guardedEncoding", value: function() { var r = []; return this.displayValue && r.push({ data: "00000000", text: this.text.substr(0, 1), options: { textAlign: "left", fontSize: this.fontSize } }), r.push({ data: "101" + (0, Ut.default)(this.data[0], "L"), options: { height: this.guardHeight } }), r.push({ data: (0, Ut.default)(this.data.substr(1, 5), "LLLLL"), text: this.text.substr(1, 5), options: { fontSize: this.fontSize } }), r.push({ data: "01010", options: { height: this.guardHeight } }), r.push({ data: (0, Ut.default)(this.data.substr(6, 5), "RRRRR"), text: this.text.substr(6, 5), options: { fontSize: this.fontSize } }), r.push({ data: (0, Ut.default)(this.data[11], "R") + "101", options: { height: this.guardHeight } }), this.displayValue && r.push({ data: "00000000", text: this.text.substr(11, 1), options: { textAlign: "right", fontSize: this.fontSize } }), r; } }]), e; }(ap.default); function Mr(n) { var e = 0, t; for (t = 1; t < 11; t += 2) e += parseInt(n[t]); for (t = 0; t < 11; t += 2) e += parseInt(n[t]) * 3; return (10 - e % 10) % 10; } mn.default = lp; var li = {}; Object.defineProperty(li, "__esModule", { value: !0 }); var cp = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), fp = Vt, dp = ko(fp), hp = Ze, pp = ko(hp), mp = mn; function ko(n) { return n && n.__esModule ? n : { default: n }; } function gp(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function hr(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function vp(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var yp = ["XX00000XXX", "XX10000XXX", "XX20000XXX", "XXX00000XX", "XXXX00000X", "XXXXX00005", "XXXXX00006", "XXXXX00007", "XXXXX00008", "XXXXX00009"], _p = [["EEEOOO", "OOOEEE"], ["EEOEOO", "OOEOEE"], ["EEOOEO", "OOEEOE"], ["EEOOOE", "OOEEEO"], ["EOEEOO", "OEOOEE"], ["EOOEEO", "OEEOOE"], ["EOOOEE", "OEEEOO"], ["EOEOEO", "OEOEOE"], ["EOEOOE", "OEOEEO"], ["EOOEOE", "OEEOEO"]], bp = function(n) { vp(e, n); function e(t, r) { gp(this, e); var i = hr(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); if (i.isValid = !1, t.search(/^[0-9]{6}$/) !== -1) i.middleDigits = t, i.upcA = ha(t, "0"), i.text = r.text || "" + i.upcA[0] + t + i.upcA[i.upcA.length - 1], i.isValid = !0; else if (t.search(/^[01][0-9]{7}$/) !== -1) if (i.middleDigits = t.substring(1, t.length - 1), i.upcA = ha(i.middleDigits, t[0]), i.upcA[i.upcA.length - 1] === t[t.length - 1]) i.isValid = !0; else return hr(i); else return hr(i); return i.displayValue = r.displayValue, r.fontSize > r.width * 10 ? i.fontSize = r.width * 10 : i.fontSize = r.fontSize, i.guardHeight = r.height + i.fontSize / 2 + r.textMargin, i; } return cp(e, [{ key: "valid", value: function() { return this.isValid; } }, { key: "encode", value: function() { return this.options.flat ? this.flatEncoding() : this.guardedEncoding(); } }, { key: "flatEncoding", value: function() { var r = ""; return r += "101", r += this.encodeMiddleDigits(), r += "010101", { data: r, text: this.text }; } }, { key: "guardedEncoding", value: function() { var r = []; return this.displayValue && r.push({ data: "00000000", text: this.text[0], options: { textAlign: "left", fontSize: this.fontSize } }), r.push({ data: "101", options: { height: this.guardHeight } }), r.push({ data: this.encodeMiddleDigits(), text: this.text.substring(1, 7), options: { fontSize: this.fontSize } }), r.push({ data: "010101", options: { height: this.guardHeight } }), this.displayValue && r.push({ data: "00000000", text: this.text[7], options: { textAlign: "right", fontSize: this.fontSize } }), r; } }, { key: "encodeMiddleDigits", value: function() { var r = this.upcA[0], i = this.upcA[this.upcA.length - 1], a = _p[parseInt(i)][parseInt(r)]; return (0, dp.default)(this.middleDigits, a); } }]), e; }(pp.default); function ha(n, e) { for (var t = parseInt(n[n.length - 1]), r = yp[t], i = "", a = 0, o = 0; o < r.length; o++) { var s = r[o]; s === "X" ? i += n[a++] : i += s; } return i = "" + e + i, "" + i + (0, mp.checksum)(i); } li.default = bp; Object.defineProperty(Je, "__esModule", { value: !0 }); Je.UPCE = Je.UPC = Je.EAN2 = Je.EAN5 = Je.EAN8 = Je.EAN13 = void 0; var wp = ai, $p = Jt(wp), Sp = oi, Op = Jt(Sp), Ep = si, xp = Jt(Ep), Cp = ui, kp = Jt(Cp), Ap = mn, Dp = Jt(Ap), Rp = li, Pp = Jt(Rp); function Jt(n) { return n && n.__esModule ? n : { default: n }; } Je.EAN13 = $p.default; Je.EAN8 = Op.default; Je.EAN5 = xp.default; Je.EAN2 = kp.default; Je.UPC = Dp.default; Je.UPCE = Pp.default; var Wt = {}, Zn = {}, gn = {}; Object.defineProperty(gn, "__esModule", { value: !0 }); gn.START_BIN = "1010"; gn.END_BIN = "11101"; gn.BINARIES = ["00110", "10001", "01001", "11000", "00101", "10100", "01100", "00011", "10010", "01010"]; Object.defineProperty(Zn, "__esModule", { value: !0 }); var Mp = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), xn = gn, Tp = Ze, jp = Fp(Tp); function Fp(n) { return n && n.__esModule ? n : { default: n }; } function Ip(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Vp(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function Bp(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var Lp = function(n) { Bp(e, n); function e() { return Ip(this, e), Vp(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments)); } return Mp(e, [{ key: "valid", value: function() { return this.data.search(/^([0-9]{2})+$/) !== -1; } }, { key: "encode", value: function() { var r = this, i = this.data.match(/.{2}/g).map(function(a) { return r.encodePair(a); }).join(""); return { data: xn.START_BIN + i + xn.END_BIN, text: this.text }; } }, { key: "encodePair", value: function(r) { var i = xn.BINARIES[r[1]]; return xn.BINARIES[r[0]].split("").map(function(a, o) { return (a === "1" ? "111" : "1") + (i[o] === "1" ? "000" : "0"); }).join(""); } }]), e; }(jp.default); Zn.default = Lp; var ci = {}; Object.defineProperty(ci, "__esModule", { value: !0 }); var Np = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), zp = Zn, Up = qp(zp); function qp(n) { return n && n.__esModule ? n : { default: n }; } function Gp(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Hp(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function Wp(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var pa = function(e) { var t = e.substr(0, 13).split("").map(function(r) { return parseInt(r, 10); }).reduce(function(r, i, a) { return r + i * (3 - a % 2 * 2); }, 0); return Math.ceil(t / 10) * 10 - t; }, Yp = function(n) { Wp(e, n); function e(t, r) { return Gp(this, e), t.search(/^[0-9]{13}$/) !== -1 && (t += pa(t)), Hp(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); } return Np(e, [{ key: "valid", value: function() { return this.data.search(/^[0-9]{14}$/) !== -1 && +this.data[13] === pa(this.data); } }]), e; }(Up.default); ci.default = Yp; Object.defineProperty(Wt, "__esModule", { value: !0 }); Wt.ITF14 = Wt.ITF = void 0; var Xp = Zn, Jp = Ao(Xp), Kp = ci, Zp = Ao(Kp); function Ao(n) { return n && n.__esModule ? n : { default: n }; } Wt.ITF = Jp.default; Wt.ITF14 = Zp.default; var it = {}, Bt = {}; Object.defineProperty(Bt, "__esModule", { value: !0 }); var Qp = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), em = Ze, tm = nm(em); function nm(n) { return n && n.__esModule ? n : { default: n }; } function rm(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function im(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function am(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var om = function(n) { am(e, n); function e(t, r) { return rm(this, e), im(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); } return Qp(e, [{ key: "encode", value: function() { for (var r = "110", i = 0; i < this.data.length; i++) { var a = parseInt(this.data[i]), o = a.toString(2); o = sm(o, 4 - o.length); for (var s = 0; s < o.length; s++) r += o[s] == "0" ? "100" : "110"; } return r += "1001", { data: r, text: this.text }; } }, { key: "valid", value: function() { return this.data.search(/^[0-9]+$/) !== -1; } }]), e; }(tm.default); function sm(n, e) { for (var t = 0; t < e; t++) n = "0" + n; return n; } Bt.default = om; var fi = {}, Lt = {}; Object.defineProperty(Lt, "__esModule", { value: !0 }); Lt.mod10 = um; Lt.mod11 = lm; function um(n) { for (var e = 0, t = 0; t < n.length; t++) { var r = parseInt(n[t]); (t + n.length) % 2 === 0 ? e += r : e += r * 2 % 10 + Math.floor(r * 2 / 10); } return (10 - e % 10) % 10; } function lm(n) { for (var e = 0, t = [2, 3, 4, 5, 6, 7], r = 0; r < n.length; r++) { var i = parseInt(n[n.length - 1 - r]); e += t[r % t.length] * i; } return (11 - e % 11) % 11; } Object.defineProperty(fi, "__esModule", { value: !0 }); var cm = Bt, fm = hm(cm), dm = Lt; function hm(n) { return n && n.__esModule ? n : { default: n }; } function pm(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function mm(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function gm(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var vm = function(n) { gm(e, n); function e(t, r) { return pm(this, e), mm(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t + (0, dm.mod10)(t), r)); } return e; }(fm.default); fi.default = vm; var di = {}; Object.defineProperty(di, "__esModule", { value: !0 }); var ym = Bt, _m = wm(ym), bm = Lt; function wm(n) { return n && n.__esModule ? n : { default: n }; } function $m(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Sm(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function Om(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var Em = function(n) { Om(e, n); function e(t, r) { return $m(this, e), Sm(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t + (0, bm.mod11)(t), r)); } return e; }(_m.default); di.default = Em; var hi = {}; Object.defineProperty(hi, "__esModule", { value: !0 }); var xm = Bt, Cm = km(xm), ma = Lt; function km(n) { return n && n.__esModule ? n : { default: n }; } function Am(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Dm(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function Rm(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var Pm = function(n) { Rm(e, n); function e(t, r) { return Am(this, e), t += (0, ma.mod10)(t), t += (0, ma.mod10)(t), Dm(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); } return e; }(Cm.default); hi.default = Pm; var pi = {}; Object.defineProperty(pi, "__esModule", { value: !0 }); var Mm = Bt, Tm = jm(Mm), ga = Lt; function jm(n) { return n && n.__esModule ? n : { default: n }; } function Fm(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Im(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function Vm(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var Bm = function(n) { Vm(e, n); function e(t, r) { return Fm(this, e), t += (0, ga.mod11)(t), t += (0, ga.mod10)(t), Im(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); } return e; }(Tm.default); pi.default = Bm; Object.defineProperty(it, "__esModule", { value: !0 }); it.MSI1110 = it.MSI1010 = it.MSI11 = it.MSI10 = it.MSI = void 0; var Lm = Bt, Nm = vn(Lm), zm = fi, Um = vn(zm), qm = di, Gm = vn(qm), Hm = hi, Wm = vn(Hm), Ym = pi, Xm = vn(Ym); function vn(n) { return n && n.__esModule ? n : { default: n }; } it.MSI = Nm.default; it.MSI10 = Um.default; it.MSI11 = Gm.default; it.MSI1010 = Wm.default; it.MSI1110 = Xm.default; var Qn = {}; Object.defineProperty(Qn, "__esModule", { value: !0 }); Qn.pharmacode = void 0; var Jm = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), Km = Ze, Zm = Qm(Km); function Qm(n) { return n && n.__esModule ? n : { default: n }; } function eg(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function tg(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function ng(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var rg = function(n) { ng(e, n); function e(t, r) { eg(this, e); var i = tg(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); return i.number = parseInt(t, 10), i; } return Jm(e, [{ key: "encode", value: function() { for (var r = this.number, i = ""; !isNaN(r) && r != 0; ) r % 2 === 0 ? (i = "11100" + i, r = (r - 2) / 2) : (i = "100" + i, r = (r - 1) / 2); return i = i.slice(0, -2), { data: i, text: this.text }; } }, { key: "valid", value: function() { return this.number >= 3 && this.number <= 131070; } }]), e; }(Zm.default); Qn.pharmacode = rg; var er = {}; Object.defineProperty(er, "__esModule", { value: !0 }); er.codabar = void 0; var ig = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), ag = Ze, og = sg(ag); function sg(n) { return n && n.__esModule ? n : { default: n }; } function ug(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function lg(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function cg(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var fg = function(n) { cg(e, n); function e(t, r) { ug(this, e), t.search(/^[0-9\-\$\:\.\+\/]+$/) === 0 && (t = "A" + t + "A"); var i = lg(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t.toUpperCase(), r)); return i.text = i.options.text || i.text.replace(/[A-D]/g, ""), i; } return ig(e, [{ key: "valid", value: function() { return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/) !== -1; } }, { key: "encode", value: function() { for (var r = [], i = this.getEncodings(), a = 0; a < this.data.length; a++) r.push(i[this.data.charAt(a)]), a !== this.data.length - 1 && r.push("0"); return { text: this.text, data: r.join("") }; } }, { key: "getEncodings", value: function() { return { 0: "101010011", 1: "101011001", 2: "101001011", 3: "110010101", 4: "101101001", 5: "110101001", 6: "100101011", 7: "100101101", 8: "100110101", 9: "110100101", "-": "101001101", $: "101100101", ":": "1101011011", "/": "1101101011", ".": "1101101101", "+": "1011011011", A: "1011001001", B: "1001001011", C: "1010010011", D: "1010011001" }; } }]), e; }(og.default); er.codabar = fg; var tr = {}; Object.defineProperty(tr, "__esModule", { value: !0 }); tr.GenericBarcode = void 0; var dg = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), hg = Ze, pg = mg(hg); function mg(n) { return n && n.__esModule ? n : { default: n }; } function gg(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function vg(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function yg(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var _g = function(n) { yg(e, n); function e(t, r) { return gg(this, e), vg(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, r)); } return dg(e, [{ key: "encode", value: function() { return { data: "10101010101010101010101010101010101010101", text: this.text }; } }, { key: "valid", value: function() { return !0; } }]), e; }(pg.default); tr.GenericBarcode = _g; Object.defineProperty(Zr, "__esModule", { value: !0 }); var bg = Xn, Cn = mt, qt = Je, va = Wt, on = it, wg = Qn, $g = er, Sg = tr; Zr.default = { CODE39: bg.CODE39, CODE128: Cn.CODE128, CODE128A: Cn.CODE128A, CODE128B: Cn.CODE128B, CODE128C: Cn.CODE128C, EAN13: qt.EAN13, EAN8: qt.EAN8, EAN5: qt.EAN5, EAN2: qt.EAN2, UPC: qt.UPC, UPCE: qt.UPCE, ITF14: va.ITF14, ITF: va.ITF, MSI: on.MSI, MSI10: on.MSI10, MSI11: on.MSI11, MSI1010: on.MSI1010, MSI1110: on.MSI1110, pharmacode: wg.pharmacode, codabar: $g.codabar, GenericBarcode: Sg.GenericBarcode }; var Kt = {}; Object.defineProperty(Kt, "__esModule", { value: !0 }); var Og = Object.assign || function(n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }; Kt.default = function(n, e) { return Og({}, n, e); }; var mi = {}; Object.defineProperty(mi, "__esModule", { value: !0 }); mi.default = Eg; function Eg(n) { var e = []; function t(r) { if (Array.isArray(r)) for (var i = 0; i < r.length; i++) t(r[i]); else r.text = r.text || "", r.data = r.data || "", e.push(r); } return t(n), e; } var gi = {}; Object.defineProperty(gi, "__esModule", { value: !0 }); gi.default = xg; function xg(n) { return n.marginTop = n.marginTop || n.margin, n.marginBottom = n.marginBottom || n.margin, n.marginRight = n.marginRight || n.margin, n.marginLeft = n.marginLeft || n.margin, n; } var vi = {}, yi = {}, nr = {}; Object.defineProperty(nr, "__esModule", { value: !0 }); nr.default = Cg; function Cg(n) { var e = ["width", "height", "textMargin", "fontSize", "margin", "marginTop", "marginBottom", "marginLeft", "marginRight"]; for (var t in e) e.hasOwnProperty(t) && (t = e[t], typeof n[t] == "string" && (n[t] = parseInt(n[t], 10))); return typeof n.displayValue == "string" && (n.displayValue = n.displayValue != "false"), n; } var rr = {}; Object.defineProperty(rr, "__esModule", { value: !0 }); var kg = { width: 2, height: 100, format: "auto", displayValue: !0, fontOptions: "", font: "monospace", text: void 0, textAlign: "center", textPosition: "bottom", textMargin: 2, fontSize: 20, background: "#ffffff", lineColor: "#000000", margin: 10, marginTop: void 0, marginBottom: void 0, marginLeft: void 0, marginRight: void 0, valid: function() { } }; rr.default = kg; Object.defineProperty(yi, "__esModule", { value: !0 }); var Ag = nr, Dg = Do(Ag), Rg = rr, ya = Do(Rg); function Do(n) { return n && n.__esModule ? n : { default: n }; } function Pg(n) { var e = {}; for (var t in ya.default) ya.default.hasOwnProperty(t) && (n.hasAttribute("jsbarcode-" + t.toLowerCase()) && (e[t] = n.getAttribute("jsbarcode-" + t.toLowerCase())), n.hasAttribute("data-" + t.toLowerCase()) && (e[t] = n.getAttribute("data-" + t.toLowerCase()))); return e.value = n.getAttribute("jsbarcode-value") || n.getAttribute("data-value"), e = (0, Dg.default)(e), e; } yi.default = Pg; var _i = {}, bi = {}, tt = {}; Object.defineProperty(tt, "__esModule", { value: !0 }); tt.getTotalWidthOfEncodings = tt.calculateEncodingAttributes = tt.getBarcodePadding = tt.getEncodingHeight = tt.getMaximumHeightOfEncodings = void 0; var Mg = Kt, Tg = jg(Mg); function jg(n) { return n && n.__esModule ? n : { default: n }; } function Ro(n, e) { return e.height + (e.displayValue && n.text.length > 0 ? e.fontSize + e.textMargin : 0) + e.marginTop + e.marginBottom; } function Po(n, e, t) { if (t.displayValue && e < n) { if (t.textAlign == "center") return Math.floor((n - e) / 2); if (t.textAlign == "left") return 0; if (t.textAlign == "right") return Math.floor(n - e); } return 0; } function Fg(n, e, t) { for (var r = 0; r < n.length; r++) { var i = n[r], a = (0, Tg.default)(e, i.options), o; a.displayValue ? o = Bg(i.text, a, t) : o = 0; var s = i.data.length * a.width; i.width = Math.ceil(Math.max(o, s)), i.height = Ro(i, a), i.barcodePadding = Po(o, s, a); } } function Ig(n) { for (var e = 0, t = 0; t < n.length; t++) e += n[t].width; return e; } function Vg(n) { for (var e = 0, t = 0; t < n.length; t++) n[t].height > e && (e = n[t].height); return e; } function Bg(n, e, t) { var r; if (t) r = t; else if (typeof document < "u") r = document.createElement("canvas").getContext("2d"); else return 0; r.font = e.fontOptions + " " + e.fontSize + "px " + e.font; var i = r.measureText(n); if (!i) return 0; var a = i.width; return a; } tt.getMaximumHeightOfEncodings = Vg; tt.getEncodingHeight = Ro; tt.getBarcodePadding = Po; tt.calculateEncodingAttributes = Fg; tt.getTotalWidthOfEncodings = Ig; Object.defineProperty(bi, "__esModule", { value: !0 }); var Lg = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), Ng = Kt, zg = Ug(Ng), pr = tt; function Ug(n) { return n && n.__esModule ? n : { default: n }; } function qg(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } var Gg = function() { function n(e, t, r) { qg(this, n), this.canvas = e, this.encodings = t, this.options = r; } return Lg(n, [{ key: "render", value: function() { if (!this.canvas.getContext) throw new Error("The browser does not support canvas."); this.prepareCanvas(); for (var t = 0; t < this.encodings.length; t++) { var r = (0, zg.default)(this.options, this.encodings[t].options); this.drawCanvasBarcode(r, this.encodings[t]), this.drawCanvasText(r, this.encodings[t]), this.moveCanvasDrawing(this.encodings[t]); } this.restoreCanvas(); } }, { key: "prepareCanvas", value: function() { var t = this.canvas.getContext("2d"); t.save(), (0, pr.calculateEncodingAttributes)(this.encodings, this.options, t); var r = (0, pr.getTotalWidthOfEncodings)(this.encodings), i = (0, pr.getMaximumHeightOfEncodings)(this.encodings); this.canvas.width = r + this.options.marginLeft + this.options.marginRight, this.canvas.height = i, t.clearRect(0, 0, this.canvas.width, this.canvas.height), this.options.background && (t.fillStyle = this.options.background, t.fillRect(0, 0, this.canvas.width, this.canvas.height)), t.translate(this.options.marginLeft, 0); } }, { key: "drawCanvasBarcode", value: function(t, r) { var i = this.canvas.getContext("2d"), a = r.data, o; t.textPosition == "top" ? o = t.marginTop + t.fontSize + t.textMargin : o = t.marginTop, i.fillStyle = t.lineColor; for (var s = 0; s < a.length; s++) { var u = s * t.width + r.barcodePadding; a[s] === "1" ? i.fillRect(u, o, t.width, t.height) : a[s] && i.fillRect(u, o, t.width, t.height * a[s]); } } }, { key: "drawCanvasText", value: function(t, r) { var i = this.canvas.getContext("2d"), a = t.fontOptions + " " + t.fontSize + "px " + t.font; if (t.displayValue) { var o, s; t.textPosition == "top" ? s = t.marginTop + t.fontSize - t.textMargin : s = t.height + t.textMargin + t.marginTop + t.fontSize, i.font = a, t.textAlign == "left" || r.barcodePadding > 0 ? (o = 0, i.textAlign = "left") : t.textAlign == "right" ? (o = r.width - 1, i.textAlign = "right") : (o = r.width / 2, i.textAlign = "center"), i.fillText(r.text, o, s); } } }, { key: "moveCanvasDrawing", value: function(t) { var r = this.canvas.getContext("2d"); r.translate(t.width, 0); } }, { key: "restoreCanvas", value: function() { var t = this.canvas.getContext("2d"); t.restore(); } }]), n; }(); bi.default = Gg; var wi = {}; Object.defineProperty(wi, "__esModule", { value: !0 }); var Hg = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(), Wg = Kt, Yg = Xg(Wg), mr = tt; function Xg(n) { return n && n.__esModule ? n : { default: n }; } function Jg(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } var kn = "http://www.w3.org/2000/svg", Kg = function() { function n(e, t, r) { Jg(this, n), this.svg = e, this.encodings = t, this.options = r, this.document = r.xmlDocument || document; } return Hg(n, [{ key: "render", value: function() { var t = this.options.marginLeft; this.prepareSVG(); for (var r = 0; r < this.encodings.length; r++) { var i = this.encodings[r], a = (0, Yg.default)(this.options, i.options), o = this.createGroup(t, a.marginTop, this.svg); this.setGroupOptions(o, a), this.drawSvgBarcode(o, a, i), this.drawSVGText(o, a, i), t += i.width; } } }, { key: "prepareSVG", value: function() { for (; this.svg.firstChild; ) this.svg.removeChild(this.svg.firstChild); (0, mr.calculateEncodingAttributes)(this.encodings, this.options); var t = (0, mr.getTotalWidthOfEncodings)(this.encodings), r = (0, mr.getMaximumHeightOfEncodings)(this.encodings), i = t + this.options.marginLeft + this.options.marginRight; this.setSvgAttributes(i, r), this.options.background && this.drawRect(0, 0, i, r, this.svg).setAttribute("style", "fill:" + this.options.background + ";"); } }, { key: "drawSvgBarcode", value: function(t, r, i) { var a = i.data, o; r.textPosition == "top" ? o = r.fontSize + r.textMargin : o = 0; for (var s = 0, u = 0, c = 0; c < a.length; c++) u = c * r.width + i.barcodePadding, a[c] === "1" ? s++ : s > 0 && (this.drawRect(u - r.width * s, o, r.width * s, r.height, t), s = 0); s > 0 && this.drawRect(u - r.width * (s - 1), o, r.width * s, r.height, t); } }, { key: "drawSVGText", value: function(t, r, i) { var a = this.document.createElementNS(kn, "text"); if (r.displayValue) { var o, s; a.setAttribute("style", "font:" + r.fontOptions + " " + r.fontSize + "px " + r.font), r.textPosition == "top" ? s = r.fontSize - r.textMargin : s = r.height + r.textMargin + r.fontSize, r.textAlign == "left" || i.barcodePadding > 0 ? (o = 0, a.setAttribute("text-anchor", "start")) : r.textAlign == "right" ? (o = i.width - 1, a.setAttribute("text-anchor", "end")) : (o = i.width / 2, a.setAttribute("text-anchor", "middle")), a.setAttribute("x", o), a.setAttribute("y", s), a.appendChild(this.document.createTextNode(i.text)), t.appendChild(a); } } }, { key: "setSvgAttributes", value: function(t, r) { var i = this.svg; i.setAttribute("width", t + "px"), i.setAttribute("height", r + "px"), i.setAttribute("x", "0px"), i.setAttribute("y", "0px"), i.setAttribute("viewBox", "0 0 " + t + " " + r), i.setAttribute("xmlns", kn), i.setAttribute("version", "1.1"), i.setAttribute("style", "transform: translate(0,0)"); } }, { key: "createGroup", value: function(t, r, i) { var a = this.document.createElementNS(kn, "g"); return a.setAttribute("transform", "translate(" + t + ", " + r + ")"), i.appendChild(a), a; } }, { key: "setGroupOptions", value: function(t, r) { t.setAttribute("style", "fill:" + r.lineColor + ";"); } }, { key: "drawRect", value: function(t, r, i, a, o) { var s = this.document.createElementNS(kn, "rect"); return s.setAttribute("x", t), s.setAttribute("y", r), s.setAttribute("width", i), s.setAttribute("height", a), o.appendChild(s), s; } }]), n; }(); wi.default = Kg; var $i = {}; Object.defineProperty($i, "__esModule", { value: !0 }); var Zg = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(); function Qg(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } var e0 = function() { function n(e, t, r) { Qg(this, n), this.object = e, this.encodings = t, this.options = r; } return Zg(n, [{ key: "render", value: function() { this.object.encodings = this.encodings; } }]), n; }(); $i.default = e0; Object.defineProperty(_i, "__esModule", { value: !0 }); var t0 = bi, n0 = Si(t0), r0 = wi, i0 = Si(r0), a0 = $i, o0 = Si(a0); function Si(n) { return n && n.__esModule ? n : { default: n }; } _i.default = { CanvasRenderer: n0.default, SVGRenderer: i0.default, ObjectRenderer: o0.default }; var Zt = {}; Object.defineProperty(Zt, "__esModule", { value: !0 }); function Oi(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Ei(n, e) { if (!n) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : n; } function xi(n, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); n.prototype = Object.create(e && e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(n, e) : n.__proto__ = e); } var s0 = function(n) { xi(e, n); function e(t, r) { Oi(this, e); var i = Ei(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this)); return i.name = "InvalidInputException", i.symbology = t, i.input = r, i.message = '"' + i.input + '" is not a valid input for ' + i.symbology, i; } return e; }(Error), u0 = function(n) { xi(e, n); function e() { Oi(this, e); var t = Ei(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this)); return t.name = "InvalidElementException", t.message = "Not supported type to render on", t; } return e; }(Error), l0 = function(n) { xi(e, n); function e() { Oi(this, e); var t = Ei(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this)); return t.name = "NoElementException", t.message = "No element to render on.", t; } return e; }(Error); Zt.InvalidInputException = s0; Zt.InvalidElementException = u0; Zt.NoElementException = l0; Object.defineProperty(vi, "__esModule", { value: !0 }); var c0 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) { return typeof n; } : function(n) { return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; }, f0 = yi, Tr = Mo(f0), d0 = _i, sn = Mo(d0), h0 = Zt; function Mo(n) { return n && n.__esModule ? n : { default: n }; } function Ci(n) { if (typeof n == "string") return p0(n); if (Array.isArray(n)) { for (var e = [], t = 0; t < n.length; t++) e.push(Ci(n[t])); return e; } else { if (typeof HTMLCanvasElement < "u" && n instanceof HTMLImageElement) return m0(n); if (n && n.nodeName && n.nodeName.toLowerCase() === "svg" || typeof SVGElement < "u" && n instanceof SVGElement) return { element: n, options: (0, Tr.default)(n), renderer: sn.default.SVGRenderer }; if (typeof HTMLCanvasElement < "u" && n instanceof HTMLCanvasElement) return { element: n, options: (0, Tr.default)(n), renderer: sn.default.CanvasRenderer }; if (n && n.getContext) return { element: n, renderer: sn.default.CanvasRenderer }; if (n && (typeof n > "u" ? "undefined" : c0(n)) === "object" && !n.nodeName) return { element: n, renderer: sn.default.ObjectRenderer }; throw new h0.InvalidElementException(); } } function p0(n) { var e = document.querySelectorAll(n); if (e.length !== 0) { for (var t = [], r = 0; r < e.length; r++) t.push(Ci(e[r])); return t; } } function m0(n) { var e = document.createElement("canvas"); return { element: e, options: (0, Tr.default)(n), renderer: sn.default.CanvasRenderer, afterRender: function() { n.setAttribute("src", e.toDataURL()); } }; } vi.default = Ci; var ki = {}; Object.defineProperty(ki, "__esModule", { value: !0 }); var g0 = function() { function n(e, t) { for (var r = 0; r < t.length; r++) { var i = t[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e; }; }(); function v0(n, e) { if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function"); } var y0 = function() { function n(e) { v0(this, n), this.api = e; } return g0(n, [{ key: "handleCatch", value: function(t) { if (t.name === "InvalidInputException") if (this.api._options.valid !== this.api._defaults.valid) this.api._options.valid(!1); else throw t.message; else throw t; this.api.render = function() { }; } }, { key: "wrapBarcodeCall", value: function(t) { try { var r = t.apply(void 0, arguments); return this.api._options.valid(!0), r; } catch (i) { return this.handleCatch(i), this.api; } } }]), n; }(); ki.default = y0; var _0 = Zr, Mt = At(_0), b0 = Kt, yn = At(b0), w0 = mi, To = At(w0), $0 = gi, _a = At($0), S0 = vi, O0 = At(S0), E0 = nr, x0 = At(E0), C0 = ki, k0 = At(C0), jo = Zt, A0 = rr, Fo = At(A0); function At(n) { return n && n.__esModule ? n : { default: n }; } var St = function() { }, ir = function(e, t, r) { var i = new St(); if (typeof e > "u") throw Error("No element to render on was provided."); return i._renderProperties = (0, O0.default)(e), i._encodings = [], i._options = Fo.default, i._errorHandler = new k0.default(i), typeof t < "u" && (r = r || {}, r.format || (r.format = Vo()), i.options(r)[r.format](t, r).render()), i; }; ir.getModule = function(n) { return Mt.default[n]; }; for (var ba in Mt.default) Mt.default.hasOwnProperty(ba) && D0(Mt.default, ba); function D0(n, e) { St.prototype[e] = St.prototype[e.toUpperCase()] = St.prototype[e.toLowerCase()] = function(t, r) { var i = this; return i._errorHandler.wrapBarcodeCall(function() { r.text = typeof r.text > "u" ? void 0 : "" + r.text; var a = (0, yn.default)(i._options, r); a = (0, x0.default)(a); var o = n[e], s = Io(t, o, a); return i._encodings.push(s), i; }); }; } function Io(n, e, t) { n = "" + n; var r = new e(n, t); if (!r.valid()) throw new jo.InvalidInputException(r.constructor.name, n); var i = r.encode(); i = (0, To.default)(i); for (var a = 0; a < i.length; a++) i[a].options = (0, yn.default)(t, i[a].options); return i; } function Vo() { return Mt.default.CODE128 ? "CODE128" : Object.keys(Mt.default)[0]; } St.prototype.options = function(n) { return this._options = (0, yn.default)(this._options, n), this; }; St.prototype.blank = function(n) { var e = new Array(n + 1).join("0"); return this._encodings.push({ data: e }), this; }; St.prototype.init = function() { if (!!this._renderProperties) { Array.isArray(this._renderProperties) || (this._renderProperties = [this._renderProperties]); var n; for (var e in this._renderProperties) { n = this._renderProperties[e]; var t = (0, yn.default)(this._options, n.options); t.format == "auto" && (t.format = Vo()), this._errorHandler.wrapBarcodeCall(function() { var r = t.value, i = Mt.default[t.format.toUpperCase()], a = Io(r, i, t); jr(n, a, t); }); } } }; St.prototype.render = function() { if (!this._renderProperties) throw new jo.NoElementException(); if (Array.isArray(this._renderProperties)) for (var n = 0; n < this._renderProperties.length; n++) jr(this._renderProperties[n], this._encodings, this._options); else jr(this._renderProperties, this._encodings, this._options); return this; }; St.prototype._defaults = Fo.default; function jr(n, e, t) { e = (0, To.default)(e); for (var r = 0; r < e.length; r++) e[r].options = (0, yn.default)(t, e[r].options), (0, _a.default)(e[r].options); (0, _a.default)(t); var i = n.renderer, a = new i(n.element, e, t); a.render(), n.afterRender && n.afterRender(); } typeof window < "u" && (window.JsBarcode = ir); typeof jQuery < "u" && (jQuery.fn.JsBarcode = function(n, e) { var t = []; return jQuery(this).each(function() { t.push(this); }), ir(t, n, e); }); var R0 = ir; const P0 = he({ name: "BarCodeBox", data() { return {}; }, props: { value: String, format: String, displayValue: { type: Boolean, default: !0 }, fontSize: Number, textPosition: String, textAlign: String, textMargin: Number, width: { type: Number, default: 2 }, height: { type: Number, default: 50 }, background: String, lineColor: String }, methods: {}, computed: {}, components: {}, watch: { $props: { handler() { const n = this.value, e = {}; Object.keys(this.$props).forEach((t) => { this.$props[t] != null && this.$props[t] !== "" && (e[t] = this.$props[t]); }), delete e.value, delete e.formCreateInject, this.$nextTick(() => { R0(this.$refs.bar, n || "", e); }); }, deep: !0, immediate: !0 } } }), M0 = { class: "_fc-barcode", ref: "bar" }; function T0(n, e, t, r, i, a) { return ee(), me("img", M0, null, 512); } const j0 = /* @__PURE__ */ Ae(P0, [["render", T0]]); const F0 = he({ name: "VideoBox", emits: ["pause", "play", "ended", "error"], data() { return { player: null }; }, props: { src: String, type: String, controls: { type: Boolean, default: !0 }, autoplay: Boolean, isLive: Boolean, withCredentials: Boolean, loop: Boolean }, watch: { src: { handler: function() { this.$nextTick(() => { wt.ready("mpegts", () => { const n = this.$refs.video, e = window.mpegts.createPlayer({ isLive: this.isLive, type: this.type, url: this.src }); e.attachMediaElement(n), e.on("error", (t) => { this.$emit("error", t); }), e.load(), this.autoplay && e.play().catch((t) => { this.$emit("error", t); }), this.player = e; }); }); }, immediate: !0 } }, created() { window.mpegts ? wt.done("mpegts") : wt.isDefined("mpegts") || wt.loadNpm("mpegts.js@1.8.0/dist/mpegts.js", "mpegts"); } }), I0 = ["controls", "loop"]; function V0(n, e, t, r, i, a) { return ee(), me("video", { ref: "video", class: "_fc-video-box", controls: n.controls, loop: n.loop, onPause: e[0] || (e[0] = (o) => n.$emit("pause", o)), onPlay: e[1] || (e[1] = (o) => n.$emit("play", o)), onEnded: e[2] || (e[2] = (o) => n.$emit("ended", o)) }, null, 40, I0); } const B0 = /* @__PURE__ */ Ae(F0, [["render", V0]]); var Bo = { exports: {} }; (function(n, e) { (function(t, r) { n.exports = r(); })(Ja, () => (() => { var t = { 873: (o, s) => { var u, c, l = function() { var h = function(k, b) { var y = k, d = U[b], f = null, p = 0, v = null, g = [], x = {}, M = function(_, E) { f = function(O) { for (var R = new Array(O), j = 0; j < O; j += 1) { R[j] = new Array(O); for (var Y = 0; Y < O; Y += 1) R[j][Y] = null; } return R; }(p = 4 * y + 17), P(0, 0), P(p - 7, 0), P(0, p - 7), I(), N(), L(_, E), y >= 7 && V(_), v == null && (v = C(y, d, g)), A(v, E); }, P = function(_, E) { for (var O = -1; O <= 7; O += 1) if (!(_ + O <= -1 || p <= _ + O)) for (var R = -1; R <= 7; R += 1) E + R <= -1 || p <= E + R || (f[_ + O][E + R] = 0 <= O && O <= 6 && (R == 0 || R == 6) || 0 <= R && R <= 6 && (O == 0 || O == 6) || 2 <= O && O <= 4 && 2 <= R && R <= 4); }, N = function() { for (var _ = 8; _ < p - 8; _ += 1) f[_][6] == null && (f[_][6] = _ % 2 == 0); for (var E = 8; E < p - 8; E += 1) f[6][E] == null && (f[6][E] = E % 2 == 0); }, I = function() { for (var _ = z.getPatternPosition(y), E = 0; E < _.length; E += 1) for (var O = 0; O < _.length; O += 1) { var R = _[E], j = _[O]; if (f[R][j] == null) for (var Y = -2; Y <= 2; Y += 1) for (var X = -2; X <= 2; X += 1) f[R + Y][j + X] = Y == -2 || Y == 2 || X == -2 || X == 2 || Y == 0 && X == 0; } }, V = function(_) { for (var E = z.getBCHTypeNumber(y), O = 0; O < 18; O += 1) { var R = !_ && (E >> O & 1) == 1; f[Math.floor(O / 3)][O % 3 + p - 8 - 3] = R; } for (O = 0; O < 18; O += 1) R = !_ && (E >> O & 1) == 1, f[O % 3 + p - 8 - 3][Math.floor(O / 3)] = R; }, L = function(_, E) { for (var O = d << 3 | E, R = z.getBCHTypeInfo(O), j = 0; j < 15; j += 1) { var Y = !_ && (R >> j & 1) == 1; j < 6 ? f[j][8] = Y : j < 8 ? f[j + 1][8] = Y : f[p - 15 + j][8] = Y; } for (j = 0; j < 15; j += 1) Y = !_ && (R >> j & 1) == 1, j < 8 ? f[8][p - j - 1] = Y : j < 9 ? f[8][15 - j - 1 + 1] = Y : f[8][15 - j - 1] = Y; f[p - 8][8] = !_; }, A = function(_, E) { for (var O = -1, R = p - 1, j = 7, Y = 0, X = z.getMaskFunction(E), ie = p - 1; ie > 0; ie -= 2) for (ie == 6 && (ie -= 1); ; ) { for (var se = 0; se < 2; se += 1) if (f[R][ie - se] == null) { var ue = !1; Y < _.length && (ue = (_[Y] >>> j & 1) == 1), X(R, ie - se) && (ue = !ue), f[R][ie - se] = ue, (j -= 1) == -1 && (Y += 1, j = 7); } if ((R += O) < 0 || p <= R) { R -= O, O = -O; break; } } }, C = function(_, E, O) { for (var R = Q.getRSBlocks(_, E), j = q(), Y = 0; Y < O.length; Y += 1) { var X = O[Y]; j.put(X.getMode(), 4), j.put(X.getLength(), z.getLengthInBits(X.getMode(), _)), X.write(j); } var ie = 0; for (Y = 0; Y < R.length; Y += 1) ie += R[Y].dataCount; if (j.getLengthInBits() > 8 * ie) throw "code length overflow. (" + j.getLengthInBits() + ">" + 8 * ie + ")"; for (j.getLengthInBits() + 4 <= 8 * ie && j.put(0, 4); j.getLengthInBits() % 8 != 0; ) j.putBit(!1); for (; !(j.getLengthInBits() >= 8 * ie || (j.put(236, 8), j.getLengthInBits() >= 8 * ie)); ) j.put(17, 8); return function(se, ue) { for (var ge = 0, Ee = 0, be = 0, de = new Array(ue.length), ve = new Array(ue.length), te = 0; te < ue.length; te += 1) { var ke = ue[te].dataCount, Fe = ue[te].totalCount - ke; Ee = Math.max(Ee, ke), be = Math.max(be, Fe), de[te] = new Array(ke); for (var oe = 0; oe < de[te].length; oe += 1) de[te][oe] = 255 & se.getBuffer()[oe + ge]; ge += ke; var Xe = z.getErrorCorrectPolynomial(Fe), Ue = Z(de[te], Xe.getLength() - 1).mod(Xe); for (ve[te] = new Array(Xe.getLength() - 1), oe = 0; oe < ve[te].length; oe += 1) { var Ne = oe + Ue.getLength() - ve[te].length; ve[te][oe] = Ne >= 0 ? Ue.getAt(Ne) : 0; } } var _n = 0; for (oe = 0; oe < ue.length; oe += 1) _n += ue[oe].totalCount; var Qt = new Array(_n), ct = 0; for (oe = 0; oe < Ee; oe += 1) for (te = 0; te < ue.length; te += 1) oe < de[te].length && (Qt[ct] = de[te][oe], ct += 1); for (oe = 0; oe < be; oe += 1) for (te = 0; te < ue.length; te += 1) oe < ve[te].length && (Qt[ct] = ve[te][oe], ct += 1); return Qt; }(j, R); }; x.addData = function(_, E) { var O = null; switch (E = E || "Byte") { case "Numeric": O = ce(_); break; case "Alphanumeric": O = re(_); break; case "Byte": O = ae(_); break; case "Kanji": O = J(_); break; default: throw "mode:" + E; } g.push(O), v = null; }, x.isDark = function(_, E) { if (_ < 0 || p <= _ || E < 0 || p <= E) throw _ + "," + E; return f[_][E]; }, x.getModuleCount = function() { return p; }, x.make = function() { if (y < 1) { for (var _ = 1; _ < 40; _++) { for (var E = Q.getRSBlocks(_, d), O = q(), R = 0; R < g.length; R++) { var j = g[R]; O.put(j.getMode(), 4), O.put(j.getLength(), z.getLengthInBits(j.getMode(), _)), j.write(O); } var Y = 0; for (R = 0; R < E.length; R++) Y += E[R].dataCount; if (O.getLengthInBits() <= 8 * Y) break; } y = _; } M(!1, function() { for (var X = 0, ie = 0, se = 0; se < 8; se += 1) { M(!0, se); var ue = z.getLostPoint(x); (se == 0 || X > ue) && (X = ue, ie = se); } return ie; }()); }, x.createTableTag = function(_, E) { _ = _ || 2; var O = ""; O += '"; }, x.createSvgTag = function(_, E, O, R) { var j = {}; typeof arguments[0] == "object" && (_ = (j = arguments[0]).cellSize, E = j.margin, O = j.alt, R = j.title), _ = _ || 2, E = E === void 0 ? 4 * _ : E, (O = typeof O == "string" ? { text: O } : O || {}).text = O.text || null, O.id = O.text ? O.id || "qrcode-description" : null, (R = typeof R == "string" ? { text: R } : R || {}).text = R.text || null, R.id = R.text ? R.id || "qrcode-title" : null; var Y, X, ie, se, ue = x.getModuleCount() * _ + 2 * E, ge = ""; for (se = "l" + _ + ",0 0," + _ + " -" + _ + ",0 0,-" + _ + "z ", ge += '' + D(R.text) + "" : "", ge += O.text ? '' + D(O.text) + "" : "", ge += '', ge += '"; }, x.createDataURL = function(_, E) { _ = _ || 2, E = E === void 0 ? 4 * _ : E; var O = x.getModuleCount() * _ + 2 * E, R = E, j = O - E; return Ye(O, O, function(Y, X) { if (R <= Y && Y < j && R <= X && X < j) { var ie = Math.floor((Y - R) / _), se = Math.floor((X - R) / _); return x.isDark(se, ie) ? 0 : 1; } return 1; }); }, x.createImgTag = function(_, E, O) { _ = _ || 2, E = E === void 0 ? 4 * _ : E; var R = x.getModuleCount() * _ + 2 * E, j = ""; return j += ""; }; var D = function(_) { for (var E = "", O = 0; O < _.length; O += 1) { var R = _.charAt(O); switch (R) { case "<": E += "<"; break; case ">": E += ">"; break; case "&": E += "&"; break; case '"': E += """; break; default: E += R; } } return E; }; return x.createASCII = function(_, E) { if ((_ = _ || 1) < 2) return function(de) { de = de === void 0 ? 2 : de; var ve, te, ke, Fe, oe, Xe = 1 * x.getModuleCount() + 2 * de, Ue = de, Ne = Xe - de, _n = { "\u2588\u2588": "\u2588", "\u2588 ": "\u2580", " \u2588": "\u2584", " ": " " }, Qt = { "\u2588\u2588": "\u2580", "\u2588 ": "\u2580", " \u2588": " ", " ": " " }, ct = ""; for (ve = 0; ve < Xe; ve += 2) { for (ke = Math.floor((ve - Ue) / 1), Fe = Math.floor((ve + 1 - Ue) / 1), te = 0; te < Xe; te += 1) oe = "\u2588", Ue <= te && te < Ne && Ue <= ve && ve < Ne && x.isDark(ke, Math.floor((te - Ue) / 1)) && (oe = " "), Ue <= te && te < Ne && Ue <= ve + 1 && ve + 1 < Ne && x.isDark(Fe, Math.floor((te - Ue) / 1)) ? oe += " " : oe += "\u2588", ct += de < 1 && ve + 1 >= Ne ? Qt[oe] : _n[oe]; ct += ` `; } return Xe % 2 && de > 0 ? ct.substring(0, ct.length - Xe - 1) + Array(Xe + 1).join("\u2580") : ct.substring(0, ct.length - 1); }(E); _ -= 1, E = E === void 0 ? 2 * _ : E; var O, R, j, Y, X = x.getModuleCount() * _ + 2 * E, ie = E, se = X - E, ue = Array(_ + 1).join("\u2588\u2588"), ge = Array(_ + 1).join(" "), Ee = "", be = ""; for (O = 0; O < X; O += 1) { for (j = Math.floor((O - ie) / _), be = "", R = 0; R < X; R += 1) Y = 1, ie <= R && R < se && ie <= O && O < se && x.isDark(j, Math.floor((R - ie) / _)) && (Y = 0), be += Y ? ue : ge; for (j = 0; j < _; j += 1) Ee += be + ` `; } return Ee.substring(0, Ee.length - 1); }, x.renderTo2dContext = function(_, E) { E = E || 2; for (var O = x.getModuleCount(), R = 0; R < O; R++) for (var j = 0; j < O; j++) _.fillStyle = x.isDark(R, j) ? "black" : "white", _.fillRect(R * E, j * E, E, E); }, x; }; h.stringToBytes = (h.stringToBytesFuncs = { default: function(k) { for (var b = [], y = 0; y < k.length; y += 1) { var d = k.charCodeAt(y); b.push(255 & d); } return b; } }).default, h.createStringToBytes = function(k, b) { var y = function() { for (var f = Oe(k), p = function() { var N = f.read(); if (N == -1) throw "eof"; return N; }, v = 0, g = {}; ; ) { var x = f.read(); if (x == -1) break; var M = p(), P = p() << 8 | p(); g[String.fromCharCode(x << 8 | M)] = P, v += 1; } if (v != b) throw v + " != " + b; return g; }(), d = "?".charCodeAt(0); return function(f) { for (var p = [], v = 0; v < f.length; v += 1) { var g = f.charCodeAt(v); if (g < 128) p.push(g); else { var x = y[f.charAt(v)]; typeof x == "number" ? (255 & x) == x ? p.push(x) : (p.push(x >>> 8), p.push(255 & x)) : p.push(d); } } return p; }; }; var m, w, $, S, T, U = { L: 1, M: 0, Q: 3, H: 2 }, z = (m = [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]], w = 1335, $ = 7973, T = function(k) { for (var b = 0; k != 0; ) b += 1, k >>>= 1; return b; }, (S = {}).getBCHTypeInfo = function(k) { for (var b = k << 10; T(b) - T(w) >= 0; ) b ^= w << T(b) - T(w); return 21522 ^ (k << 10 | b); }, S.getBCHTypeNumber = function(k) { for (var b = k << 12; T(b) - T($) >= 0; ) b ^= $ << T(b) - T($); return k << 12 | b; }, S.getPatternPosition = function(k) { return m[k - 1]; }, S.getMaskFunction = function(k) { switch (k) { case 0: return function(b, y) { return (b + y) % 2 == 0; }; case 1: return function(b, y) { return b % 2 == 0; }; case 2: return function(b, y) { return y % 3 == 0; }; case 3: return function(b, y) { return (b + y) % 3 == 0; }; case 4: return function(b, y) { return (Math.floor(b / 2) + Math.floor(y / 3)) % 2 == 0; }; case 5: return function(b, y) { return b * y % 2 + b * y % 3 == 0; }; case 6: return function(b, y) { return (b * y % 2 + b * y % 3) % 2 == 0; }; case 7: return function(b, y) { return (b * y % 3 + (b + y) % 2) % 2 == 0; }; default: throw "bad maskPattern:" + k; } }, S.getErrorCorrectPolynomial = function(k) { for (var b = Z([1], 0), y = 0; y < k; y += 1) b = b.multiply(Z([1, B.gexp(y)], 0)); return b; }, S.getLengthInBits = function(k, b) { if (1 <= b && b < 10) switch (k) { case 1: return 10; case 2: return 9; case 4: case 8: return 8; default: throw "mode:" + k; } else if (b < 27) switch (k) { case 1: return 12; case 2: return 11; case 4: return 16; case 8: return 10; default: throw "mode:" + k; } else { if (!(b < 41)) throw "type:" + b; switch (k) { case 1: return 14; case 2: return 13; case 4: return 16; case 8: return 12; default: throw "mode:" + k; } } }, S.getLostPoint = function(k) { for (var b = k.getModuleCount(), y = 0, d = 0; d < b; d += 1) for (var f = 0; f < b; f += 1) { for (var p = 0, v = k.isDark(d, f), g = -1; g <= 1; g += 1) if (!(d + g < 0 || b <= d + g)) for (var x = -1; x <= 1; x += 1) f + x < 0 || b <= f + x || g == 0 && x == 0 || v == k.isDark(d + g, f + x) && (p += 1); p > 5 && (y += 3 + p - 5); } for (d = 0; d < b - 1; d += 1) for (f = 0; f < b - 1; f += 1) { var M = 0; k.isDark(d, f) && (M += 1), k.isDark(d + 1, f) && (M += 1), k.isDark(d, f + 1) && (M += 1), k.isDark(d + 1, f + 1) && (M += 1), M != 0 && M != 4 || (y += 3); } for (d = 0; d < b; d += 1) for (f = 0; f < b - 6; f += 1) k.isDark(d, f) && !k.isDark(d, f + 1) && k.isDark(d, f + 2) && k.isDark(d, f + 3) && k.isDark(d, f + 4) && !k.isDark(d, f + 5) && k.isDark(d, f + 6) && (y += 40); for (f = 0; f < b; f += 1) for (d = 0; d < b - 6; d += 1) k.isDark(d, f) && !k.isDark(d + 1, f) && k.isDark(d + 2, f) && k.isDark(d + 3, f) && k.isDark(d + 4, f) && !k.isDark(d + 5, f) && k.isDark(d + 6, f) && (y += 40); var P = 0; for (f = 0; f < b; f += 1) for (d = 0; d < b; d += 1) k.isDark(d, f) && (P += 1); return y + Math.abs(100 * P / b / b - 50) / 5 * 10; }, S), B = function() { for (var k = new Array(256), b = new Array(256), y = 0; y < 8; y += 1) k[y] = 1 << y; for (y = 8; y < 256; y += 1) k[y] = k[y - 4] ^ k[y - 5] ^ k[y - 6] ^ k[y - 8]; for (y = 0; y < 255; y += 1) b[k[y]] = y; return { glog: function(d) { if (d < 1) throw "glog(" + d + ")"; return b[d]; }, gexp: function(d) { for (; d < 0; ) d += 255; for (; d >= 256; ) d -= 255; return k[d]; } }; }(); function Z(k, b) { if (k.length === void 0) throw k.length + "/" + b; var y = function() { for (var f = 0; f < k.length && k[f] == 0; ) f += 1; for (var p = new Array(k.length - f + b), v = 0; v < k.length - f; v += 1) p[v] = k[v + f]; return p; }(), d = { getAt: function(f) { return y[f]; }, getLength: function() { return y.length; }, multiply: function(f) { for (var p = new Array(d.getLength() + f.getLength() - 1), v = 0; v < d.getLength(); v += 1) for (var g = 0; g < f.getLength(); g += 1) p[v + g] ^= B.gexp(B.glog(d.getAt(v)) + B.glog(f.getAt(g))); return Z(p, 0); }, mod: function(f) { if (d.getLength() - f.getLength() < 0) return d; for (var p = B.glog(d.getAt(0)) - B.glog(f.getAt(0)), v = new Array(d.getLength()), g = 0; g < d.getLength(); g += 1) v[g] = d.getAt(g); for (g = 0; g < f.getLength(); g += 1) v[g] ^= B.gexp(B.glog(f.getAt(g)) + p); return Z(v, 0).mod(f); } }; return d; } var Q = function() { var k = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12, 7, 37, 13], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]], b = function(d, f) { var p = {}; return p.totalCount = d, p.dataCount = f, p; }, y = { getRSBlocks: function(d, f) { var p = function(V, L) { switch (L) { case U.L: return k[4 * (V - 1) + 0]; case U.M: return k[4 * (V - 1) + 1]; case U.Q: return k[4 * (V - 1) + 2]; case U.H: return k[4 * (V - 1) + 3]; default: return; } }(d, f); if (p === void 0) throw "bad rs block @ typeNumber:" + d + "/errorCorrectionLevel:" + f; for (var v = p.length / 3, g = [], x = 0; x < v; x += 1) for (var M = p[3 * x + 0], P = p[3 * x + 1], N = p[3 * x + 2], I = 0; I < M; I += 1) g.push(b(P, N)); return g; } }; return y; }(), q = function() { var k = [], b = 0, y = { getBuffer: function() { return k; }, getAt: function(d) { var f = Math.floor(d / 8); return (k[f] >>> 7 - d % 8 & 1) == 1; }, put: function(d, f) { for (var p = 0; p < f; p += 1) y.putBit((d >>> f - p - 1 & 1) == 1); }, getLengthInBits: function() { return b; }, putBit: function(d) { var f = Math.floor(b / 8); k.length <= f && k.push(0), d && (k[f] |= 128 >>> b % 8), b += 1; } }; return y; }, ce = function(k) { var b = k, y = { getMode: function() { return 1; }, getLength: function(p) { return b.length; }, write: function(p) { for (var v = b, g = 0; g + 2 < v.length; ) p.put(d(v.substring(g, g + 3)), 10), g += 3; g < v.length && (v.length - g == 1 ? p.put(d(v.substring(g, g + 1)), 4) : v.length - g == 2 && p.put(d(v.substring(g, g + 2)), 7)); } }, d = function(p) { for (var v = 0, g = 0; g < p.length; g += 1) v = 10 * v + f(p.charAt(g)); return v; }, f = function(p) { if ("0" <= p && p <= "9") return p.charCodeAt(0) - "0".charCodeAt(0); throw "illegal char :" + p; }; return y; }, re = function(k) { var b = k, y = { getMode: function() { return 2; }, getLength: function(f) { return b.length; }, write: function(f) { for (var p = b, v = 0; v + 1 < p.length; ) f.put(45 * d(p.charAt(v)) + d(p.charAt(v + 1)), 11), v += 2; v < p.length && f.put(d(p.charAt(v)), 6); } }, d = function(f) { if ("0" <= f && f <= "9") return f.charCodeAt(0) - "0".charCodeAt(0); if ("A" <= f && f <= "Z") return f.charCodeAt(0) - "A".charCodeAt(0) + 10; switch (f) { case " ": return 36; case "$": return 37; case "%": return 38; case "*": return 39; case "+": return 40; case "-": return 41; case ".": return 42; case "/": return 43; case ":": return 44; default: throw "illegal char :" + f; } }; return y; }, ae = function(k) { var b = h.stringToBytes(k); return { getMode: function() { return 4; }, getLength: function(y) { return b.length; }, write: function(y) { for (var d = 0; d < b.length; d += 1) y.put(b[d], 8); } }; }, J = function(k) { var b = h.stringToBytesFuncs.SJIS; if (!b) throw "sjis not supported."; (function() { var f = b("\u53CB"); if (f.length != 2 || (f[0] << 8 | f[1]) != 38726) throw "sjis not supported."; })(); var y = b(k), d = { getMode: function() { return 8; }, getLength: function(f) { return ~~(y.length / 2); }, write: function(f) { for (var p = y, v = 0; v + 1 < p.length; ) { var g = (255 & p[v]) << 8 | 255 & p[v + 1]; if (33088 <= g && g <= 40956) g -= 33088; else { if (!(57408 <= g && g <= 60351)) throw "illegal char at " + (v + 1) + "/" + g; g -= 49472; } g = 192 * (g >>> 8 & 255) + (255 & g), f.put(g, 13), v += 2; } if (v < p.length) throw "illegal char at " + (v + 1); } }; return d; }, G = function() { var k = [], b = { writeByte: function(y) { k.push(255 & y); }, writeShort: function(y) { b.writeByte(y), b.writeByte(y >>> 8); }, writeBytes: function(y, d, f) { d = d || 0, f = f || y.length; for (var p = 0; p < f; p += 1) b.writeByte(y[p + d]); }, writeString: function(y) { for (var d = 0; d < y.length; d += 1) b.writeByte(y.charCodeAt(d)); }, toByteArray: function() { return k; }, toString: function() { var y = ""; y += "["; for (var d = 0; d < k.length; d += 1) d > 0 && (y += ","), y += k[d]; return y + "]"; } }; return b; }, Oe = function(k) { var b = k, y = 0, d = 0, f = 0, p = { read: function() { for (; f < 8; ) { if (y >= b.length) { if (f == 0) return -1; throw "unexpected end of file./" + f; } var g = b.charAt(y); if (y += 1, g == "=") return f = 0, -1; g.match(/^\s$/) || (d = d << 6 | v(g.charCodeAt(0)), f += 6); } var x = d >>> f - 8 & 255; return f -= 8, x; } }, v = function(g) { if (65 <= g && g <= 90) return g - 65; if (97 <= g && g <= 122) return g - 97 + 26; if (48 <= g && g <= 57) return g - 48 + 52; if (g == 43) return 62; if (g == 47) return 63; throw "c:" + g; }; return p; }, Ye = function(k, b, y) { for (var d = function(P, N) { var I = P, V = N, L = new Array(P * N), A = { setPixel: function(_, E, O) { L[E * I + _] = O; }, write: function(_) { _.writeString("GIF87a"), _.writeShort(I), _.writeShort(V), _.writeByte(128), _.writeByte(0), _.writeByte(0), _.writeByte(0), _.writeByte(0), _.writeByte(0), _.writeByte(255), _.writeByte(255), _.writeByte(255), _.writeString(","), _.writeShort(0), _.writeShort(0), _.writeShort(I), _.writeShort(V), _.writeByte(0); var E = C(2); _.writeByte(2); for (var O = 0; E.length - O > 255; ) _.writeByte(255), _.writeBytes(E, O, 255), O += 255; _.writeByte(E.length - O), _.writeBytes(E, O, E.length - O), _.writeByte(0), _.writeString(";"); } }, C = function(_) { for (var E = 1 << _, O = 1 + (1 << _), R = _ + 1, j = D(), Y = 0; Y < E; Y += 1) j.add(String.fromCharCode(Y)); j.add(String.fromCharCode(E)), j.add(String.fromCharCode(O)); var X, ie, se, ue = G(), ge = (X = ue, ie = 0, se = 0, { write: function(ve, te) { if (ve >>> te != 0) throw "length over"; for (; ie + te >= 8; ) X.writeByte(255 & (ve << ie | se)), te -= 8 - ie, ve >>>= 8 - ie, se = 0, ie = 0; se |= ve << ie, ie += te; }, flush: function() { ie > 0 && X.writeByte(se); } }); ge.write(E, R); var Ee = 0, be = String.fromCharCode(L[Ee]); for (Ee += 1; Ee < L.length; ) { var de = String.fromCharCode(L[Ee]); Ee += 1, j.contains(be + de) ? be += de : (ge.write(j.indexOf(be), R), j.size() < 4095 && (j.size() == 1 << R && (R += 1), j.add(be + de)), be = de); } return ge.write(j.indexOf(be), R), ge.write(O, R), ge.flush(), ue.toByteArray(); }, D = function() { var _ = {}, E = 0, O = { add: function(R) { if (O.contains(R)) throw "dup key:" + R; _[R] = E, E += 1; }, size: function() { return E; }, indexOf: function(R) { return _[R]; }, contains: function(R) { return _[R] !== void 0; } }; return O; }; return A; }(k, b), f = 0; f < b; f += 1) for (var p = 0; p < k; p += 1) d.setPixel(p, f, y(p, f)); var v = G(); d.write(v); for (var g = function() { var P = 0, N = 0, I = 0, V = "", L = {}, A = function(D) { V += String.fromCharCode(C(63 & D)); }, C = function(D) { if (!(D < 0)) { if (D < 26) return 65 + D; if (D < 52) return D - 26 + 97; if (D < 62) return D - 52 + 48; if (D == 62) return 43; if (D == 63) return 47; } throw "n:" + D; }; return L.writeByte = function(D) { for (P = P << 8 | 255 & D, N += 8, I += 1; N >= 6; ) A(P >>> N - 6), N -= 6; }, L.flush = function() { if (N > 0 && (A(P << 6 - N), P = 0, N = 0), I % 3 != 0) for (var D = 3 - I % 3, _ = 0; _ < D; _ += 1) V += "="; }, L.toString = function() { return V; }, L; }(), x = v.toByteArray(), M = 0; M < x.length; M += 1) g.writeByte(x[M]); return g.flush(), "data:image/gif;base64," + g; }; return h; }(); l.stringToBytesFuncs["UTF-8"] = function(h) { return function(m) { for (var w = [], $ = 0; $ < m.length; $++) { var S = m.charCodeAt($); S < 128 ? w.push(S) : S < 2048 ? w.push(192 | S >> 6, 128 | 63 & S) : S < 55296 || S >= 57344 ? w.push(224 | S >> 12, 128 | S >> 6 & 63, 128 | 63 & S) : ($++, S = 65536 + ((1023 & S) << 10 | 1023 & m.charCodeAt($)), w.push(240 | S >> 18, 128 | S >> 12 & 63, 128 | S >> 6 & 63, 128 | 63 & S)); } return w; }(h); }, (c = typeof (u = function() { return l; }) == "function" ? u.apply(s, []) : u) === void 0 || (o.exports = c); } }, r = {}; function i(o) { var s = r[o]; if (s !== void 0) return s.exports; var u = r[o] = { exports: {} }; return t[o](u, u.exports, i), u.exports; } i.n = (o) => { var s = o && o.__esModule ? () => o.default : () => o; return i.d(s, { a: s }), s; }, i.d = (o, s) => { for (var u in s) i.o(s, u) && !i.o(o, u) && Object.defineProperty(o, u, { enumerable: !0, get: s[u] }); }, i.o = (o, s) => Object.prototype.hasOwnProperty.call(o, s); var a = {}; return (() => { i.d(a, { default: () => b }); const o = (y) => !!y && typeof y == "object" && !Array.isArray(y); function s(y, ...d) { if (!d.length) return y; const f = d.shift(); return f !== void 0 && o(y) && o(f) ? (y = Object.assign({}, y), Object.keys(f).forEach((p) => { const v = y[p], g = f[p]; Array.isArray(v) && Array.isArray(g) ? y[p] = g : o(v) && o(g) ? y[p] = s(Object.assign({}, v), g) : y[p] = g; }), s(y, ...d)) : y; } function u(y, d) { const f = document.createElement("a"); f.download = d, f.href = y, document.body.appendChild(f), f.click(), document.body.removeChild(f); } const c = { L: 0.07, M: 0.15, Q: 0.25, H: 0.3 }; class l { constructor({ svg: d, type: f, window: p }) { this._svg = d, this._type = f, this._window = p; } draw(d, f, p, v) { let g; switch (this._type) { case "dots": g = this._drawDot; break; case "classy": g = this._drawClassy; break; case "classy-rounded": g = this._drawClassyRounded; break; case "rounded": g = this._drawRounded; break; case "extra-rounded": g = this._drawExtraRounded; break; default: g = this._drawSquare; } g.call(this, { x: d, y: f, size: p, getNeighbor: v }); } _rotateFigure({ x: d, y: f, size: p, rotation: v = 0, draw: g }) { var x; const M = d + p / 2, P = f + p / 2; g(), (x = this._element) === null || x === void 0 || x.setAttribute("transform", `rotate(${180 * v / Math.PI},${M},${P})`); } _basicDot(d) { const { size: f, x: p, y: v } = d; this._rotateFigure(Object.assign(Object.assign({}, d), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "circle"), this._element.setAttribute("cx", String(p + f / 2)), this._element.setAttribute("cy", String(v + f / 2)), this._element.setAttribute("r", String(f / 2)); } })); } _basicSquare(d) { const { size: f, x: p, y: v } = d; this._rotateFigure(Object.assign(Object.assign({}, d), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect"), this._element.setAttribute("x", String(p)), this._element.setAttribute("y", String(v)), this._element.setAttribute("width", String(f)), this._element.setAttribute("height", String(f)); } })); } _basicSideRounded(d) { const { size: f, x: p, y: v } = d; this._rotateFigure(Object.assign(Object.assign({}, d), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("d", `M ${p} ${v}v ${f}h ` + f / 2 + `a ${f / 2} ${f / 2}, 0, 0, 0, 0 ${-f}`); } })); } _basicCornerRounded(d) { const { size: f, x: p, y: v } = d; this._rotateFigure(Object.assign(Object.assign({}, d), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("d", `M ${p} ${v}v ${f}h ${f}v ` + -f / 2 + `a ${f / 2} ${f / 2}, 0, 0, 0, ${-f / 2} ${-f / 2}`); } })); } _basicCornerExtraRounded(d) { const { size: f, x: p, y: v } = d; this._rotateFigure(Object.assign(Object.assign({}, d), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("d", `M ${p} ${v}v ${f}h ${f}a ${f} ${f}, 0, 0, 0, ${-f} ${-f}`); } })); } _basicCornersRounded(d) { const { size: f, x: p, y: v } = d; this._rotateFigure(Object.assign(Object.assign({}, d), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("d", `M ${p} ${v}v ` + f / 2 + `a ${f / 2} ${f / 2}, 0, 0, 0, ${f / 2} ${f / 2}h ` + f / 2 + "v " + -f / 2 + `a ${f / 2} ${f / 2}, 0, 0, 0, ${-f / 2} ${-f / 2}`); } })); } _drawDot({ x: d, y: f, size: p }) { this._basicDot({ x: d, y: f, size: p, rotation: 0 }); } _drawSquare({ x: d, y: f, size: p }) { this._basicSquare({ x: d, y: f, size: p, rotation: 0 }); } _drawRounded({ x: d, y: f, size: p, getNeighbor: v }) { const g = v ? +v(-1, 0) : 0, x = v ? +v(1, 0) : 0, M = v ? +v(0, -1) : 0, P = v ? +v(0, 1) : 0, N = g + x + M + P; if (N !== 0) if (N > 2 || g && x || M && P) this._basicSquare({ x: d, y: f, size: p, rotation: 0 }); else { if (N === 2) { let I = 0; return g && M ? I = Math.PI / 2 : M && x ? I = Math.PI : x && P && (I = -Math.PI / 2), void this._basicCornerRounded({ x: d, y: f, size: p, rotation: I }); } if (N === 1) { let I = 0; return M ? I = Math.PI / 2 : x ? I = Math.PI : P && (I = -Math.PI / 2), void this._basicSideRounded({ x: d, y: f, size: p, rotation: I }); } } else this._basicDot({ x: d, y: f, size: p, rotation: 0 }); } _drawExtraRounded({ x: d, y: f, size: p, getNeighbor: v }) { const g = v ? +v(-1, 0) : 0, x = v ? +v(1, 0) : 0, M = v ? +v(0, -1) : 0, P = v ? +v(0, 1) : 0, N = g + x + M + P; if (N !== 0) if (N > 2 || g && x || M && P) this._basicSquare({ x: d, y: f, size: p, rotation: 0 }); else { if (N === 2) { let I = 0; return g && M ? I = Math.PI / 2 : M && x ? I = Math.PI : x && P && (I = -Math.PI / 2), void this._basicCornerExtraRounded({ x: d, y: f, size: p, rotation: I }); } if (N === 1) { let I = 0; return M ? I = Math.PI / 2 : x ? I = Math.PI : P && (I = -Math.PI / 2), void this._basicSideRounded({ x: d, y: f, size: p, rotation: I }); } } else this._basicDot({ x: d, y: f, size: p, rotation: 0 }); } _drawClassy({ x: d, y: f, size: p, getNeighbor: v }) { const g = v ? +v(-1, 0) : 0, x = v ? +v(1, 0) : 0, M = v ? +v(0, -1) : 0, P = v ? +v(0, 1) : 0; g + x + M + P !== 0 ? g || M ? x || P ? this._basicSquare({ x: d, y: f, size: p, rotation: 0 }) : this._basicCornerRounded({ x: d, y: f, size: p, rotation: Math.PI / 2 }) : this._basicCornerRounded({ x: d, y: f, size: p, rotation: -Math.PI / 2 }) : this._basicCornersRounded({ x: d, y: f, size: p, rotation: Math.PI / 2 }); } _drawClassyRounded({ x: d, y: f, size: p, getNeighbor: v }) { const g = v ? +v(-1, 0) : 0, x = v ? +v(1, 0) : 0, M = v ? +v(0, -1) : 0, P = v ? +v(0, 1) : 0; g + x + M + P !== 0 ? g || M ? x || P ? this._basicSquare({ x: d, y: f, size: p, rotation: 0 }) : this._basicCornerExtraRounded({ x: d, y: f, size: p, rotation: Math.PI / 2 }) : this._basicCornerExtraRounded({ x: d, y: f, size: p, rotation: -Math.PI / 2 }) : this._basicCornersRounded({ x: d, y: f, size: p, rotation: Math.PI / 2 }); } } const h = { dot: "dot", square: "square", extraRounded: "extra-rounded" }, m = Object.values(h); class w { constructor({ svg: d, type: f, window: p }) { this._svg = d, this._type = f, this._window = p; } draw(d, f, p, v) { let g; switch (this._type) { case h.square: g = this._drawSquare; break; case h.extraRounded: g = this._drawExtraRounded; break; default: g = this._drawDot; } g.call(this, { x: d, y: f, size: p, rotation: v }); } _rotateFigure({ x: d, y: f, size: p, rotation: v = 0, draw: g }) { var x; const M = d + p / 2, P = f + p / 2; g(), (x = this._element) === null || x === void 0 || x.setAttribute("transform", `rotate(${180 * v / Math.PI},${M},${P})`); } _basicDot(d) { const { size: f, x: p, y: v } = d, g = f / 7; this._rotateFigure(Object.assign(Object.assign({}, d), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", `M ${p + f / 2} ${v}a ${f / 2} ${f / 2} 0 1 0 0.1 0zm 0 ${g}a ${f / 2 - g} ${f / 2 - g} 0 1 1 -0.1 0Z`); } })); } _basicSquare(d) { const { size: f, x: p, y: v } = d, g = f / 7; this._rotateFigure(Object.assign(Object.assign({}, d), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", `M ${p} ${v}v ${f}h ${f}v ` + -f + `zM ${p + g} ${v + g}h ` + (f - 2 * g) + "v " + (f - 2 * g) + "h " + (2 * g - f) + "z"); } })); } _basicExtraRounded(d) { const { size: f, x: p, y: v } = d, g = f / 7; this._rotateFigure(Object.assign(Object.assign({}, d), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", `M ${p} ${v + 2.5 * g}v ` + 2 * g + `a ${2.5 * g} ${2.5 * g}, 0, 0, 0, ${2.5 * g} ${2.5 * g}h ` + 2 * g + `a ${2.5 * g} ${2.5 * g}, 0, 0, 0, ${2.5 * g} ${2.5 * -g}v ` + -2 * g + `a ${2.5 * g} ${2.5 * g}, 0, 0, 0, ${2.5 * -g} ${2.5 * -g}h ` + -2 * g + `a ${2.5 * g} ${2.5 * g}, 0, 0, 0, ${2.5 * -g} ${2.5 * g}M ${p + 2.5 * g} ${v + g}h ` + 2 * g + `a ${1.5 * g} ${1.5 * g}, 0, 0, 1, ${1.5 * g} ${1.5 * g}v ` + 2 * g + `a ${1.5 * g} ${1.5 * g}, 0, 0, 1, ${1.5 * -g} ${1.5 * g}h ` + -2 * g + `a ${1.5 * g} ${1.5 * g}, 0, 0, 1, ${1.5 * -g} ${1.5 * -g}v ` + -2 * g + `a ${1.5 * g} ${1.5 * g}, 0, 0, 1, ${1.5 * g} ${1.5 * -g}`); } })); } _drawDot({ x: d, y: f, size: p, rotation: v }) { this._basicDot({ x: d, y: f, size: p, rotation: v }); } _drawSquare({ x: d, y: f, size: p, rotation: v }) { this._basicSquare({ x: d, y: f, size: p, rotation: v }); } _drawExtraRounded({ x: d, y: f, size: p, rotation: v }) { this._basicExtraRounded({ x: d, y: f, size: p, rotation: v }); } } const $ = { dot: "dot", square: "square" }, S = Object.values($); class T { constructor({ svg: d, type: f, window: p }) { this._svg = d, this._type = f, this._window = p; } draw(d, f, p, v) { let g; g = this._type === $.square ? this._drawSquare : this._drawDot, g.call(this, { x: d, y: f, size: p, rotation: v }); } _rotateFigure({ x: d, y: f, size: p, rotation: v = 0, draw: g }) { var x; const M = d + p / 2, P = f + p / 2; g(), (x = this._element) === null || x === void 0 || x.setAttribute("transform", `rotate(${180 * v / Math.PI},${M},${P})`); } _basicDot(d) { const { size: f, x: p, y: v } = d; this._rotateFigure(Object.assign(Object.assign({}, d), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "circle"), this._element.setAttribute("cx", String(p + f / 2)), this._element.setAttribute("cy", String(v + f / 2)), this._element.setAttribute("r", String(f / 2)); } })); } _basicSquare(d) { const { size: f, x: p, y: v } = d; this._rotateFigure(Object.assign(Object.assign({}, d), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect"), this._element.setAttribute("x", String(p)), this._element.setAttribute("y", String(v)), this._element.setAttribute("width", String(f)), this._element.setAttribute("height", String(f)); } })); } _drawDot({ x: d, y: f, size: p, rotation: v }) { this._basicDot({ x: d, y: f, size: p, rotation: v }); } _drawSquare({ x: d, y: f, size: p, rotation: v }) { this._basicSquare({ x: d, y: f, size: p, rotation: v }); } } const U = "circle", z = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]], B = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]; class Z { constructor(d, f) { this._roundSize = (p) => this._options.dotsOptions.roundSize ? Math.floor(p) : p, this._window = f, this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "svg"), this._element.setAttribute("width", String(d.width)), this._element.setAttribute("height", String(d.height)), this._element.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), d.dotsOptions.roundSize || this._element.setAttribute("shape-rendering", "crispEdges"), this._element.setAttribute("viewBox", `0 0 ${d.width} ${d.height}`), this._defs = this._window.document.createElementNS("http://www.w3.org/2000/svg", "defs"), this._element.appendChild(this._defs), this._imageUri = d.image, this._instanceId = Z.instanceCount++, this._options = d; } get width() { return this._options.width; } get height() { return this._options.height; } getElement() { return this._element; } async drawQR(d) { const f = d.getModuleCount(), p = Math.min(this._options.width, this._options.height) - 2 * this._options.margin, v = this._options.shape === U ? p / Math.sqrt(2) : p, g = this._roundSize(v / f); let x = { hideXDots: 0, hideYDots: 0, width: 0, height: 0 }; if (this._qr = d, this._options.image) { if (await this.loadImage(), !this._image) return; const { imageOptions: M, qrOptions: P } = this._options, N = M.imageSize * c[P.errorCorrectionLevel], I = Math.floor(N * f * f); x = function({ originalHeight: V, originalWidth: L, maxHiddenDots: A, maxHiddenAxisDots: C, dotSize: D }) { const _ = { x: 0, y: 0 }, E = { x: 0, y: 0 }; if (V <= 0 || L <= 0 || A <= 0 || D <= 0) return { height: 0, width: 0, hideYDots: 0, hideXDots: 0 }; const O = V / L; return _.x = Math.floor(Math.sqrt(A / O)), _.x <= 0 && (_.x = 1), C && C < _.x && (_.x = C), _.x % 2 == 0 && _.x--, E.x = _.x * D, _.y = 1 + 2 * Math.ceil((_.x * O - 1) / 2), E.y = Math.round(E.x * O), (_.y * _.x > A || C && C < _.y) && (C && C < _.y ? (_.y = C, _.y % 2 == 0 && _.x--) : _.y -= 2, E.y = _.y * D, _.x = 1 + 2 * Math.ceil((_.y / O - 1) / 2), E.x = Math.round(E.y / O)), { height: E.y, width: E.x, hideYDots: _.y, hideXDots: _.x }; }({ originalWidth: this._image.width, originalHeight: this._image.height, maxHiddenDots: I, maxHiddenAxisDots: f - 14, dotSize: g }); } this.drawBackground(), this.drawDots((M, P) => { var N, I, V, L, A, C; return !(this._options.imageOptions.hideBackgroundDots && M >= (f - x.hideYDots) / 2 && M < (f + x.hideYDots) / 2 && P >= (f - x.hideXDots) / 2 && P < (f + x.hideXDots) / 2 || ((N = z[M]) === null || N === void 0 ? void 0 : N[P]) || ((I = z[M - f + 7]) === null || I === void 0 ? void 0 : I[P]) || ((V = z[M]) === null || V === void 0 ? void 0 : V[P - f + 7]) || ((L = B[M]) === null || L === void 0 ? void 0 : L[P]) || ((A = B[M - f + 7]) === null || A === void 0 ? void 0 : A[P]) || ((C = B[M]) === null || C === void 0 ? void 0 : C[P - f + 7])); }), this.drawCorners(), this._options.image && await this.drawImage({ width: x.width, height: x.height, count: f, dotSize: g }); } drawBackground() { var d, f, p; const v = this._element, g = this._options; if (v) { const x = (d = g.backgroundOptions) === null || d === void 0 ? void 0 : d.gradient, M = (f = g.backgroundOptions) === null || f === void 0 ? void 0 : f.color; let P = g.height, N = g.width; if (x || M) { const I = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect"); this._backgroundClipPath = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._backgroundClipPath.setAttribute("id", `clip-path-background-color-${this._instanceId}`), this._defs.appendChild(this._backgroundClipPath), !((p = g.backgroundOptions) === null || p === void 0) && p.round && (P = N = Math.min(g.width, g.height), I.setAttribute("rx", String(P / 2 * g.backgroundOptions.round))), I.setAttribute("x", String(this._roundSize((g.width - N) / 2))), I.setAttribute("y", String(this._roundSize((g.height - P) / 2))), I.setAttribute("width", String(N)), I.setAttribute("height", String(P)), this._backgroundClipPath.appendChild(I), this._createColor({ options: x, color: M, additionalRotation: 0, x: 0, y: 0, height: g.height, width: g.width, name: `background-color-${this._instanceId}` }); } } } drawDots(d) { var f, p; if (!this._qr) throw "QR code is not defined"; const v = this._options, g = this._qr.getModuleCount(); if (g > v.width || g > v.height) throw "The canvas is too small."; const x = Math.min(v.width, v.height) - 2 * v.margin, M = v.shape === U ? x / Math.sqrt(2) : x, P = this._roundSize(M / g), N = this._roundSize((v.width - g * P) / 2), I = this._roundSize((v.height - g * P) / 2), V = new l({ svg: this._element, type: v.dotsOptions.type, window: this._window }); this._dotsClipPath = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._dotsClipPath.setAttribute("id", `clip-path-dot-color-${this._instanceId}`), this._defs.appendChild(this._dotsClipPath), this._createColor({ options: (f = v.dotsOptions) === null || f === void 0 ? void 0 : f.gradient, color: v.dotsOptions.color, additionalRotation: 0, x: 0, y: 0, height: v.height, width: v.width, name: `dot-color-${this._instanceId}` }); for (let L = 0; L < g; L++) for (let A = 0; A < g; A++) d && !d(L, A) || !((p = this._qr) === null || p === void 0) && p.isDark(L, A) && (V.draw(N + A * P, I + L * P, P, (C, D) => !(A + C < 0 || L + D < 0 || A + C >= g || L + D >= g) && !(d && !d(L + D, A + C)) && !!this._qr && this._qr.isDark(L + D, A + C)), V._element && this._dotsClipPath && this._dotsClipPath.appendChild(V._element)); if (v.shape === U) { const L = this._roundSize((x / P - g) / 2), A = g + 2 * L, C = N - L * P, D = I - L * P, _ = [], E = this._roundSize(A / 2); for (let O = 0; O < A; O++) { _[O] = []; for (let R = 0; R < A; R++) O >= L - 1 && O <= A - L && R >= L - 1 && R <= A - L || Math.sqrt((O - E) * (O - E) + (R - E) * (R - E)) > E ? _[O][R] = 0 : _[O][R] = this._qr.isDark(R - 2 * L < 0 ? R : R >= g ? R - 2 * L : R - L, O - 2 * L < 0 ? O : O >= g ? O - 2 * L : O - L) ? 1 : 0; } for (let O = 0; O < A; O++) for (let R = 0; R < A; R++) _[O][R] && (V.draw(C + R * P, D + O * P, P, (j, Y) => { var X; return !!(!((X = _[O + Y]) === null || X === void 0) && X[R + j]); }), V._element && this._dotsClipPath && this._dotsClipPath.appendChild(V._element)); } } drawCorners() { if (!this._qr) throw "QR code is not defined"; const d = this._element, f = this._options; if (!d) throw "Element code is not defined"; const p = this._qr.getModuleCount(), v = Math.min(f.width, f.height) - 2 * f.margin, g = f.shape === U ? v / Math.sqrt(2) : v, x = this._roundSize(g / p), M = 7 * x, P = 3 * x, N = this._roundSize((f.width - p * x) / 2), I = this._roundSize((f.height - p * x) / 2); [[0, 0, 0], [1, 0, Math.PI / 2], [0, 1, -Math.PI / 2]].forEach(([V, L, A]) => { var C, D, _, E, O, R, j, Y, X, ie, se, ue, ge, Ee; const be = N + V * x * (p - 7), de = I + L * x * (p - 7); let ve = this._dotsClipPath, te = this._dotsClipPath; if ((((C = f.cornersSquareOptions) === null || C === void 0 ? void 0 : C.gradient) || ((D = f.cornersSquareOptions) === null || D === void 0 ? void 0 : D.color)) && (ve = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), ve.setAttribute("id", `clip-path-corners-square-color-${V}-${L}-${this._instanceId}`), this._defs.appendChild(ve), this._cornersSquareClipPath = this._cornersDotClipPath = te = ve, this._createColor({ options: (_ = f.cornersSquareOptions) === null || _ === void 0 ? void 0 : _.gradient, color: (E = f.cornersSquareOptions) === null || E === void 0 ? void 0 : E.color, additionalRotation: A, x: be, y: de, height: M, width: M, name: `corners-square-color-${V}-${L}-${this._instanceId}` })), ((O = f.cornersSquareOptions) === null || O === void 0 ? void 0 : O.type) && m.includes(f.cornersSquareOptions.type)) { const ke = new w({ svg: this._element, type: f.cornersSquareOptions.type, window: this._window }); ke.draw(be, de, M, A), ke._element && ve && ve.appendChild(ke._element); } else { const ke = new l({ svg: this._element, type: ((R = f.cornersSquareOptions) === null || R === void 0 ? void 0 : R.type) || f.dotsOptions.type, window: this._window }); for (let Fe = 0; Fe < z.length; Fe++) for (let oe = 0; oe < z[Fe].length; oe++) !((j = z[Fe]) === null || j === void 0) && j[oe] && (ke.draw(be + oe * x, de + Fe * x, x, (Xe, Ue) => { var Ne; return !!(!((Ne = z[Fe + Ue]) === null || Ne === void 0) && Ne[oe + Xe]); }), ke._element && ve && ve.appendChild(ke._element)); } if ((((Y = f.cornersDotOptions) === null || Y === void 0 ? void 0 : Y.gradient) || ((X = f.cornersDotOptions) === null || X === void 0 ? void 0 : X.color)) && (te = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), te.setAttribute("id", `clip-path-corners-dot-color-${V}-${L}-${this._instanceId}`), this._defs.appendChild(te), this._cornersDotClipPath = te, this._createColor({ options: (ie = f.cornersDotOptions) === null || ie === void 0 ? void 0 : ie.gradient, color: (se = f.cornersDotOptions) === null || se === void 0 ? void 0 : se.color, additionalRotation: A, x: be + 2 * x, y: de + 2 * x, height: P, width: P, name: `corners-dot-color-${V}-${L}-${this._instanceId}` })), ((ue = f.cornersDotOptions) === null || ue === void 0 ? void 0 : ue.type) && S.includes(f.cornersDotOptions.type)) { const ke = new T({ svg: this._element, type: f.cornersDotOptions.type, window: this._window }); ke.draw(be + 2 * x, de + 2 * x, P, A), ke._element && te && te.appendChild(ke._element); } else { const ke = new l({ svg: this._element, type: ((ge = f.cornersDotOptions) === null || ge === void 0 ? void 0 : ge.type) || f.dotsOptions.type, window: this._window }); for (let Fe = 0; Fe < B.length; Fe++) for (let oe = 0; oe < B[Fe].length; oe++) !((Ee = B[Fe]) === null || Ee === void 0) && Ee[oe] && (ke.draw(be + oe * x, de + Fe * x, x, (Xe, Ue) => { var Ne; return !!(!((Ne = B[Fe + Ue]) === null || Ne === void 0) && Ne[oe + Xe]); }), ke._element && te && te.appendChild(ke._element)); } }); } loadImage() { return new Promise((d, f) => { var p; const v = this._options; if (!v.image) return f("Image is not defined"); if (!((p = v.nodeCanvas) === null || p === void 0) && p.loadImage) v.nodeCanvas.loadImage(v.image).then((g) => { var x, M; if (this._image = g, this._options.imageOptions.saveAsBlob) { const P = (x = v.nodeCanvas) === null || x === void 0 ? void 0 : x.createCanvas(this._image.width, this._image.height); (M = P == null ? void 0 : P.getContext("2d")) === null || M === void 0 || M.drawImage(g, 0, 0), this._imageUri = P == null ? void 0 : P.toDataURL(); } d(); }).catch(f); else { const g = new this._window.Image(); typeof v.imageOptions.crossOrigin == "string" && (g.crossOrigin = v.imageOptions.crossOrigin), this._image = g, g.onload = async () => { this._options.imageOptions.saveAsBlob && (this._imageUri = await async function(x, M) { return new Promise((P) => { const N = new M.XMLHttpRequest(); N.onload = function() { const I = new M.FileReader(); I.onloadend = function() { P(I.result); }, I.readAsDataURL(N.response); }, N.open("GET", x), N.responseType = "blob", N.send(); }); }(v.image || "", this._window)), d(); }, g.src = v.image; } }); } async drawImage({ width: d, height: f, count: p, dotSize: v }) { const g = this._options, x = this._roundSize((g.width - p * v) / 2), M = this._roundSize((g.height - p * v) / 2), P = x + this._roundSize(g.imageOptions.margin + (p * v - d) / 2), N = M + this._roundSize(g.imageOptions.margin + (p * v - f) / 2), I = d - 2 * g.imageOptions.margin, V = f - 2 * g.imageOptions.margin, L = this._window.document.createElementNS("http://www.w3.org/2000/svg", "image"); L.setAttribute("href", this._imageUri || ""), L.setAttribute("xlink:href", this._imageUri || ""), L.setAttribute("x", String(P)), L.setAttribute("y", String(N)), L.setAttribute("width", `${I}px`), L.setAttribute("height", `${V}px`), this._element.appendChild(L); } _createColor({ options: d, color: f, additionalRotation: p, x: v, y: g, height: x, width: M, name: P }) { const N = M > x ? M : x, I = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect"); if (I.setAttribute("x", String(v)), I.setAttribute("y", String(g)), I.setAttribute("height", String(x)), I.setAttribute("width", String(M)), I.setAttribute("clip-path", `url('#clip-path-${P}')`), d) { let V; if (d.type === "radial") V = this._window.document.createElementNS("http://www.w3.org/2000/svg", "radialGradient"), V.setAttribute("id", P), V.setAttribute("gradientUnits", "userSpaceOnUse"), V.setAttribute("fx", String(v + M / 2)), V.setAttribute("fy", String(g + x / 2)), V.setAttribute("cx", String(v + M / 2)), V.setAttribute("cy", String(g + x / 2)), V.setAttribute("r", String(N / 2)); else { const L = ((d.rotation || 0) + p) % (2 * Math.PI), A = (L + 2 * Math.PI) % (2 * Math.PI); let C = v + M / 2, D = g + x / 2, _ = v + M / 2, E = g + x / 2; A >= 0 && A <= 0.25 * Math.PI || A > 1.75 * Math.PI && A <= 2 * Math.PI ? (C -= M / 2, D -= x / 2 * Math.tan(L), _ += M / 2, E += x / 2 * Math.tan(L)) : A > 0.25 * Math.PI && A <= 0.75 * Math.PI ? (D -= x / 2, C -= M / 2 / Math.tan(L), E += x / 2, _ += M / 2 / Math.tan(L)) : A > 0.75 * Math.PI && A <= 1.25 * Math.PI ? (C += M / 2, D += x / 2 * Math.tan(L), _ -= M / 2, E -= x / 2 * Math.tan(L)) : A > 1.25 * Math.PI && A <= 1.75 * Math.PI && (D += x / 2, C += M / 2 / Math.tan(L), E -= x / 2, _ -= M / 2 / Math.tan(L)), V = this._window.document.createElementNS("http://www.w3.org/2000/svg", "linearGradient"), V.setAttribute("id", P), V.setAttribute("gradientUnits", "userSpaceOnUse"), V.setAttribute("x1", String(Math.round(C))), V.setAttribute("y1", String(Math.round(D))), V.setAttribute("x2", String(Math.round(_))), V.setAttribute("y2", String(Math.round(E))); } d.colorStops.forEach(({ offset: L, color: A }) => { const C = this._window.document.createElementNS("http://www.w3.org/2000/svg", "stop"); C.setAttribute("offset", 100 * L + "%"), C.setAttribute("stop-color", A), V.appendChild(C); }), I.setAttribute("fill", `url('#${P}')`), this._defs.appendChild(V); } else f && I.setAttribute("fill", f); this._element.appendChild(I); } } Z.instanceCount = 0; const Q = Z, q = "canvas", ce = {}; for (let y = 0; y <= 40; y++) ce[y] = y; const re = { type: q, shape: "square", width: 300, height: 300, data: "", margin: 0, qrOptions: { typeNumber: ce[0], mode: void 0, errorCorrectionLevel: "Q" }, imageOptions: { saveAsBlob: !0, hideBackgroundDots: !0, imageSize: 0.4, crossOrigin: void 0, margin: 0 }, dotsOptions: { type: "square", color: "#000", roundSize: !0 }, backgroundOptions: { round: 0, color: "#fff" } }; function ae(y) { const d = Object.assign({}, y); if (!d.colorStops || !d.colorStops.length) throw "Field 'colorStops' is required in gradient"; return d.rotation ? d.rotation = Number(d.rotation) : d.rotation = 0, d.colorStops = d.colorStops.map((f) => Object.assign(Object.assign({}, f), { offset: Number(f.offset) })), d; } function J(y) { const d = Object.assign({}, y); return d.width = Number(d.width), d.height = Number(d.height), d.margin = Number(d.margin), d.imageOptions = Object.assign(Object.assign({}, d.imageOptions), { hideBackgroundDots: Boolean(d.imageOptions.hideBackgroundDots), imageSize: Number(d.imageOptions.imageSize), margin: Number(d.imageOptions.margin) }), d.margin > Math.min(d.width, d.height) && (d.margin = Math.min(d.width, d.height)), d.dotsOptions = Object.assign({}, d.dotsOptions), d.dotsOptions.gradient && (d.dotsOptions.gradient = ae(d.dotsOptions.gradient)), d.cornersSquareOptions && (d.cornersSquareOptions = Object.assign({}, d.cornersSquareOptions), d.cornersSquareOptions.gradient && (d.cornersSquareOptions.gradient = ae(d.cornersSquareOptions.gradient))), d.cornersDotOptions && (d.cornersDotOptions = Object.assign({}, d.cornersDotOptions), d.cornersDotOptions.gradient && (d.cornersDotOptions.gradient = ae(d.cornersDotOptions.gradient))), d.backgroundOptions && (d.backgroundOptions = Object.assign({}, d.backgroundOptions), d.backgroundOptions.gradient && (d.backgroundOptions.gradient = ae(d.backgroundOptions.gradient))), d; } var G = i(873), Oe = i.n(G); function Ye(y) { if (!y) throw new Error("Extension must be defined"); y[0] === "." && (y = y.substring(1)); const d = { bmp: "image/bmp", gif: "image/gif", ico: "image/vnd.microsoft.icon", jpeg: "image/jpeg", jpg: "image/jpeg", png: "image/png", svg: "image/svg+xml", tif: "image/tiff", tiff: "image/tiff", webp: "image/webp", pdf: "application/pdf" }[y.toLowerCase()]; if (!d) throw new Error(`Extension "${y}" is not supported`); return d; } class k { constructor(d) { d != null && d.jsdom ? this._window = new d.jsdom("", { resources: "usable" }).window : this._window = window, this._options = d ? J(s(re, d)) : re, this.update(); } static _clearContainer(d) { d && (d.innerHTML = ""); } _setupSvg() { if (!this._qr) return; const d = new Q(this._options, this._window); this._svg = d.getElement(), this._svgDrawingPromise = d.drawQR(this._qr).then(() => { var f; this._svg && ((f = this._extension) === null || f === void 0 || f.call(this, d.getElement(), this._options)); }); } _setupCanvas() { var d, f; this._qr && (!((d = this._options.nodeCanvas) === null || d === void 0) && d.createCanvas ? (this._nodeCanvas = this._options.nodeCanvas.createCanvas(this._options.width, this._options.height), this._nodeCanvas.width = this._options.width, this._nodeCanvas.height = this._options.height) : (this._domCanvas = document.createElement("canvas"), this._domCanvas.width = this._options.width, this._domCanvas.height = this._options.height), this._setupSvg(), this._canvasDrawingPromise = (f = this._svgDrawingPromise) === null || f === void 0 ? void 0 : f.then(() => { var p; if (!this._svg) return; const v = this._svg, g = new this._window.XMLSerializer().serializeToString(v), x = btoa(g), M = `data:${Ye("svg")};base64,${x}`; if (!((p = this._options.nodeCanvas) === null || p === void 0) && p.loadImage) return this._options.nodeCanvas.loadImage(M).then((P) => { var N, I; P.width = this._options.width, P.height = this._options.height, (I = (N = this._nodeCanvas) === null || N === void 0 ? void 0 : N.getContext("2d")) === null || I === void 0 || I.drawImage(P, 0, 0); }); { const P = new this._window.Image(); return new Promise((N) => { P.onload = () => { var I, V; (V = (I = this._domCanvas) === null || I === void 0 ? void 0 : I.getContext("2d")) === null || V === void 0 || V.drawImage(P, 0, 0), N(); }, P.src = M; }); } })); } async _getElement(d = "png") { if (!this._qr) throw "QR code is empty"; return d.toLowerCase() === "svg" ? (this._svg && this._svgDrawingPromise || this._setupSvg(), await this._svgDrawingPromise, this._svg) : ((this._domCanvas || this._nodeCanvas) && this._canvasDrawingPromise || this._setupCanvas(), await this._canvasDrawingPromise, this._domCanvas || this._nodeCanvas); } update(d) { k._clearContainer(this._container), this._options = d ? J(s(this._options, d)) : this._options, this._options.data && (this._qr = Oe()(this._options.qrOptions.typeNumber, this._options.qrOptions.errorCorrectionLevel), this._qr.addData(this._options.data, this._options.qrOptions.mode || function(f) { switch (!0) { case /^[0-9]*$/.test(f): return "Numeric"; case /^[0-9A-Z $%*+\-./:]*$/.test(f): return "Alphanumeric"; default: return "Byte"; } }(this._options.data)), this._qr.make(), this._options.type === q ? this._setupCanvas() : this._setupSvg(), this.append(this._container)); } append(d) { if (d) { if (typeof d.appendChild != "function") throw "Container should be a single DOM node"; this._options.type === q ? this._domCanvas && d.appendChild(this._domCanvas) : this._svg && d.appendChild(this._svg), this._container = d; } } applyExtension(d) { if (!d) throw "Extension function should be defined."; this._extension = d, this.update(); } deleteExtension() { this._extension = void 0, this.update(); } async getRawData(d = "png") { if (!this._qr) throw "QR code is empty"; const f = await this._getElement(d), p = Ye(d); if (!f) return null; if (d.toLowerCase() === "svg") { const v = `\r ${new this._window.XMLSerializer().serializeToString(f)}`; return typeof Blob > "u" || this._options.jsdom ? Buffer.from(v) : new Blob([v], { type: p }); } return new Promise((v) => { const g = f; if ("toBuffer" in g) if (p === "image/png") v(g.toBuffer(p)); else if (p === "image/jpeg") v(g.toBuffer(p)); else { if (p !== "application/pdf") throw Error("Unsupported extension"); v(g.toBuffer(p)); } else "toBlob" in g && g.toBlob(v, p, 1); }); } async download(d) { if (!this._qr) throw "QR code is empty"; if (typeof Blob > "u") throw "Cannot download in Node.js, call getRawData instead."; let f = "png", p = "qr"; typeof d == "string" ? (f = d, console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")) : typeof d == "object" && d !== null && (d.name && (p = d.name), d.extension && (f = d.extension)); const v = await this._getElement(f); if (v) if (f.toLowerCase() === "svg") { let g = new XMLSerializer().serializeToString(v); g = `\r ` + g, u(`data:${Ye(f)};charset=utf-8,${encodeURIComponent(g)}`, `${p}.svg`); } else u(v.toDataURL(Ye(f)), `${p}.${f}`); } } const b = k; })(), a.default; })()); })(Bo); const L0 = /* @__PURE__ */ Sl(Bo.exports), N0 = he({ name: "QrCodeBox", data() { return { qrcode: null }; }, props: { data: String, image: String, width: Number, height: Number, circleType: String, circleColor: String }, methods: {}, computed: {}, components: {}, watch: { $props: { handler() { const n = { dotsOptions: {} }; Object.keys(this.$props).forEach((e) => { this.$props[e] != null && this.$props[e] !== "" && (n[e] = this.$props[e]); }), delete n.formCreateInject, n.circleType && (n.dotsOptions.type = n.circleType), n.circleColor && (n.dotsOptions.color = n.circleColor), delete n.circleColor, delete n.circleType, this.$nextTick(() => { this.qrcode ? this.qrcode.update(n) : (this.qrcode = Te(new L0(n)), this.qrcode.append(this.$refs.qr)); }); }, deep: !0, immediate: !0 } } }), z0 = { class: "_fc-qrcode", ref: "qr" }; function U0(n, e, t, r, i, a) { return ee(), me("div", z0, null, 512); } const q0 = /* @__PURE__ */ Ae(N0, [["render", U0]]); const G0 = (n, e) => { let t = [n]; const r = e.split("."); let i = 1; for (; r[i]; ) { let a = []; t.forEach((o) => { Object.values(o.ctxs).forEach((s) => { if (s.rule._fc_id === r[i - 1]) { const u = o.subForm[s.id]; a.push(...Array.isArray(u) ? u : [u]); } }); }), t = a.map((o) => o.rule[0].__fc__.$handle), i++; } return [t, r[i - 1]]; }, An = (n, e, t) => { const r = n.vm.setupState.top.setupState.fc.$handle; let i = [n.$handle]; n.$handle !== r && i.push(r); let a = e; e.indexOf(".") > -1 && ([i, a] = G0(r, e)), i.forEach((o) => { Object.values(o.ctxs).forEach((s) => { s.rule._fc_id === a && t(s.rule, o.api); }); }); }, Lo = { openModel(n, e) { e.api.open(n.model); }, closeModel(n, e) { e.api.close(n.model); }, hidden(n, e, t) { const r = typeof n.id == "string" ? [n.id] : n.id || []; let i = !!n.status; n.compute && (i = !!t.$handle.compute(e.self.__fc__, n.formula)), r.forEach((a) => { An(t, a, (o) => { o.hidden = i; }); }); }, disabled(n, e, t) { const r = typeof n.id == "string" ? [n.id] : n.id || []; let i = !!n.status; n.compute && (i = !!t.$handle.compute(e.self.__fc__, n.formula)), r.forEach((a) => { An(t, a, (o) => { o.props || (o.props = {}), o.props.disabled = i; }); }); }, resetFields(n, e) { e.api.top.resetFields(); }, clearFields(n, e) { e.api.top.coverValue({}); }, validate(n, e) { return e.api.top.validate(); }, validateFields(n, e, t) { const r = typeof n.id == "string" ? [n.id] : n.id || [], i = []; return r.forEach((a) => { An(t, a, (o, s) => { o.field && i.push(s.validateField(o.field)); }); }), i.length ? Promise.all(i) : void 0; }, submit(n, e) { return e.api.top.submit(); }, setValue(n, e, t) { (n.formData || []).forEach((r) => { let i = r.value; r.compute && (i = t.$handle.compute(e.self.__fc__, r.formula)), An(t, r.id, (a) => { a.value = i; }); }); }, fetch(n, e) { const { append: t, response: r, fetch: i } = n; return t && (i.data = { ...e.api.formData(), ...i.data || {} }), new Promise((a, o) => { e.api.fetch(n.fetch).then((s) => { r && e.api.setData(r, s), a(s); }).catch((s) => { o(s); }); }); }, copy(n, e, t) { let r = n.content || ""; n.compute && (r = t.$handle.compute(e.self.__fc__, n.formula)), If(r); }, callback(n, e) { return n.callback && n.callback(e); }, message(n) { ka(n || {}); } }; function H0(n, e) { return n.reduce((t, r) => t.then(() => r(e)), Promise.resolve()); } const W0 = function(n) { return { name: "behavior", load(e, t) { const r = e.getValue(), i = {}, a = {}; r && Object.keys(r).forEach((o) => { if (Array.isArray(r[o])) { const s = []; if (r[o].forEach((u) => { const { method: c, config: l, expression: h, stopPropagation: m, ignoreError: w } = u; s.push(($) => new Promise((S) => { if (h && n.$handle.compute(t.__fc__, h) === !1) { S(); return; } const T = (...z) => { (!m || n.$handle.compute(t.__fc__, m) !== !0) && S(...z); }; let U; try { U = Lo[c](l || {}, $, n); } catch (z) { console.error(z), w !== !1 && T(); return; } U && U.then ? U.then(T).catch(() => { w !== !1 && T(); }) : T(U); })); }), s.length) { const u = n.$handle.inject(t, function(c) { H0(s, c); }, t.inject || n.$handle.options.injectEvent); o.indexOf("hook_") > -1 ? a[o.replace("hook_", "")] = u : i[o] = u; } } }), e.getProp().on = i, e.getProp().hook = a; } }; }; function Y0(n) { n.__proto__.setBehavior = (e) => { eo(Lo, e); }, n.extendApi((e) => ({ open(t, ...r) { (e.el(t) || e.top.el(t)).open(...r); }, close(t) { t ? (e.el(t) || e.top.el(t)).close() : (e.top.bus.$emit("fc.closeDialog"), e !== e.top && e.bus.$emit("fc.closeDialog")); } })); } const Fr = { name: "easySlots", load(n) { const e = n.getValue(), t = {}; e && Object.keys(e).forEach((r) => { t[r] = e[r].type === "icon" ? { type: "i", class: "fc-icon iconfont " + e[r].value } : { type: "div", children: ["" + (e[r].value || "")] }; }), n.getProp().renderSlots = t; } }; Fr.watch = Fr.load; const wa = { date: "YYYY-MM-DD", month: "YYYY-MM", datetime: "YYYY-MM-DD HH:mm:ss", timerange: "HH:mm:ss", daterange: "YYYY-MM-DD", monthrange: "YYYY-MM", datetimerange: "YYYY-MM-DD HH:mm:ss", year: "YYYY" }; function X0(n) { return n / 20 + "em"; } function J0(n) { var e; !((e = n.wrap) != null && e.class) || (n.wrap.class === "fc-wrap-top" ? (n.wrap.labelAlign = "top", delete n.wrap.class) : n.wrap.class === "fc-wrap-left" ? (n.wrap.labelAlign = "left", delete n.wrap.class) : n.wrap.class === "fc-wrap-right" && (n.wrap.labelAlign = "right", delete n.wrap.class)); } const No = function(n, e, t, r) { const i = r || {}; return e.forEach((a) => { n.indexOf(a[t || "id"]) > -1 && n.splice(n.indexOf(a[t || "id"]), 1, a[i.label || "label"] || a.text), ot.trueArray(a[i.children || "children"]) && No(n, a[i.children || "children"], t, r); }), n; }, K0 = function(n, e) { return e.forEach((t) => { n.indexOf(t.value) > -1 && (n[n.indexOf(t.value)] = t.label || t.text); }), n; }; function gr(n) { if (n) { if (!Array.isArray(n)) return [n]; } else return []; return n; } function Z0(n) { Object.keys(Ie).forEach((e) => { n.setFormula(e, Ie[e]); }), Y0(n), n.register("behavior", W0), n.register("easySlots", Fr), n.extendApi((e) => ({ message(t) { Ca({ type: "warning", ...t || {} }); } })), n.setDriver("elm", { defaultPreview(e, t) { let r = e.rule.value; const i = e.$render.vNode.h, a = e.type, o = e.$handle.subForm[e.id], s = e.prop.readMode; if (s === !1 || s === "custom" || !e.input || e.rule.subForm || (Array.isArray(o) ? o.length : o) || ["fcGroup", "fcSubForm", "tableForm", "stepForm", "nestedTableForm", "infiniteTableForm", "upload", "fcDialog", "fcDrawer", "fcPopup"].indexOf(e.trueType) > -1) return e.parser.render(t, e); if (["radio", "select", "checkbox"].indexOf(a) > -1) r = K0([...gr(r)], e.prop.props.options || e.prop.props.formCreateInject.options || []).join(", "); else if (["timePicker", "datePicker", "slider"].indexOf(a) > -1) r = Array.isArray(r) ? r.join(" - ") : r; else if (a === "cascader") r = [...gr(r)], Array.isArray(r[0]) || (r = [r]), r = r.map((u) => No(u, e.prop.props.options || e.prop.props.formCreateInject.options || [], "value").join("/")).join(", "); else { if (a === "fcEditor" || s === "html") return i("div", { innerHTML: r }); if (a === "uploader" || s === "image") return r = gr(r), i("div", { class: "_fc-upload" }, r.map(function(u) { return i("div", { class: "_fc-upload-preview" }, [ i("van-image", { src: u, fit: "cover" }) ]); })); if (a === "signaturePad" && r) return i("van-image", { src: r, fit: "cover", style: { height: "90px" } }); (typeof r == "boolean" || a === "switch") && (r = r ? "\u662F" : "\u5426"); } return i("span", { class: "_fc-read-view" }, ["" + (r == null ? "" : r)]); }, updateWrap(e) { var r, i; let t = (i = (r = e.prop) == null ? void 0 : r.wrap) == null ? void 0 : i.style; e.prop.col && e.prop.col.span && (e.prop.col.span = 24), t && (t = Array.isArray(t) ? t : [t], t.forEach((a) => { delete a.marginBottom; })), J0(e.prop); }, updateOptions(e) { var t, r, i; ((t = e.form) == null ? void 0 : t.labelWidth) && e.form.labelWidth.indexOf("px") > -1 && (e.form.labelWidth = X0(parseInt(e.form.labelWidth))), (r = e.form) != null && r.labelPosition && (e.form.labelAlign = e.form.labelPosition, delete e.form.labelPosition), (i = e.form) != null && i.hideRequiredAsterisk && (e.form.colon = e.form.hideRequiredAsterisk, delete e.form.hideRequiredAsterisk); }, parsers: { inputNumber: { mergeProp(e) { e.prop.component = "vanStepper"; const t = e.prop.props; t.decimalLength = t.precision, t.integer = t.precision === 0, delete t.precision; } }, radio: { mergeProp(e) { e.prop.options && (e.prop.props.options = e.prop.options); } }, checkbox: { mergeProp(e) { e.prop.options && (e.prop.props.options = e.prop.options); } }, select: { mergeProp(e) { e.prop.props.multiple === !0 ? e.prop.component = ul : (e.prop.options && (e.prop.props.options = e.prop.options), e.prop.props.options = (e.prop.props.options || []).map((t) => ({ text: t.label, value: t.value }))); } }, rate: { mergeProp(e) { e.prop.props.count = e.prop.props.max, delete e.prop.props.max; } }, timePicker: { mergeProp(e) { e.prop.component = "elTimePicker"; const t = e.prop.props; t.valueFormat || (t.valueFormat = "HH:mm:ss"); } }, datePicker: { mergeProp(e) { e.prop.component = "elDatePicker"; const t = e.prop.props; t.valueFormat || (t.valueFormat = wa[t.type] || wa.date); } }, colorPicker: { mergeProp(e) { e.prop.component = "elColorPicker"; } }, cascader: { mergeProp(e) { e.prop.component = "elCascader"; } }, elDivider: { mergeProp(e) { e.prop.component = "vanDivider"; } }, upload: { mergeProp(e) { e.prop.component = $l; } }, tree: { mergeProp(e) { e.prop.component = fl; } }, row: { mergeProp(e) { e.prop.component = "vanRow"; } }, col: { mergeProp(e) { e.prop.component = "vanCol", e.prop.props.xs && (e.prop.props = { ...e.prop.props, ...e.prop.props.xs }); } }, fcDialog: { mergeProp(e) { e.prop.component = "FcPopup"; } }, fcDrawer: { mergeProp(e) { e.prop.component = "FcPopup"; } } } }); } Z0(_e); _e.component("FcSlot", mc); _e.component("FcJson", gc); _e.component("StepForm", Al); _e.component("FcPopup", jl); _e.component("FcTable", Nl); _e.component("FcCell", oc); _e.component("FcInlineForm", bc); _e.component("TableForm", ql); _e.component("TableFormPro", Jl); _e.component("NestedTableForm", nc); _e.component("InfiniteTableForm", Ql); _e.component("DataTable", Vl); _e.component("FcValue", cc); _e.component("FcCity", pc); _e.component("AudioBox", Wf); _e.component("VideoBox", B0); _e.component("BarCodeBox", j0); _e.component("IframeBox", Kf); _e.component("QrCodeBox", q0); _e.component("SignaturePad", Mc); _e.component("FcEcharts", Oc); _e.component("FcTitle", Uc); _e.component("FcDataSelect", zf); _e.component("FcMarkdown", Af); _e.component("FcId", Lc); _e.loadjs = wt; export { _e as default, Z0 as useAdvanced };