35 lines
349 KiB
JavaScript
35 lines
349 KiB
JavaScript
![]() |
/*!
|
|||
|
* FormCreate商业版可视化表单设计器-让表单设计更简单
|
|||
|
* fc-designer-pro v5.6.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 .ant-pagination{display:flex;margin-top:10px}._fc-data-table .ant-pagination.left{justify-content:flex-start}._fc-data-table .ant-pagination.center{justify-content:center}._fc-data-table .ant-pagination.right{justify-content:flex-end}._fc-data-table ._fc-data-table-img-list .ant-image{height:60px;max-width:150px}._fc-data-table ._fc-data-table-img-list .ant-image img{height:100%;object-fit:cover;width:100%}._fc-data-table .ant-btn+.ant-btn{margin-left:12px}._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-form{color:var(--fc-text-color-2);overflow:auto}._fc-table-form .form-create .ant-form-item{margin-bottom:1px!important}._fc-table-form .ant-form-item-label,._fc-table-form .van-field__label{display:none!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>.ant-btn{align-items:center;display:flex;padding:2px}._fc-table-form._fc-disabled ._fc-tf-btn .fc-icon,._fc-table-form._fc-disabled>.ant-btn{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 .ant-cascader,._fc-tf-table .ant-input-number,._fc-tf-table .ant-picker,._fc-tf-table .ant-select,._fc-tf-table .ant-slider{width:100%}._fc-tf-head-required:before{color:#f56c6c;content:"*";margin-right:4px}._fc-infinite-table-form{color:var(--fc-text-color-2);overflow:auto}._fc-infinite-table-form .form-create .ant-form-item{margin-bottom:1px}._fc-infinite-table-form .ant-form-item-label,._fc-infinite-table-form .van-field__label{display:none!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>.ant-btn{align-items:center;display:flex;padding:2px}._fc-infinite-table-form._fc-disabled ._fc-itf-btn .fc-icon,._fc-infinite-table-form._fc-disabled>.ant-btn{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
|
|||
|
(function(Ue,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue"),require("vant"),require("ant-design-vue")):typeof define=="function"&&define.amd?define(["exports","vue","vant","ant-design-vue"],l):(Ue=typeof globalThis<"u"?globalThis:Ue||self,l(Ue.formCreateMobile={},Ue.Vue,Ue.vant,Ue.antd))})(this,function(Ue,l,ln,$r){"use strict";/*!
|
|||
|
* @form-create/vant v3.2.18
|
|||
|
* (c) 2018-2025 xaboy
|
|||
|
* Github https://github.com/xaboy/form-create
|
|||
|
* Released under the MIT License.
|
|||
|
*/var uo="fcSubForm",lo=l.defineComponent({name:uo,props:{rule:Array,options:{type:Object,default:function(){return l.reactive({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:l.markRaw(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 n=JSON.stringify(e);this.cacheValue!==n&&(this.cacheValue=n,this.subApi.coverValue(e||{}))},add$f:function(e){var n=this;this.subApi=e,l.nextTick(function(){n.$emit("itemMounted",e)})}},render:function(){var e=this.form;return l.createVNode(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 Or(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function G(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Or(Object(n),!0).forEach(function(r){Se(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Or(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function pe(t){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(t)}function co(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Se(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&cn(t,e)}function Mt(t){return Mt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Mt(t)}function cn(t,e){return cn=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},cn(t,e)}function ho(){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 po(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mo(t,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 po(t)}function go(t){var e=ho();return function(){var r=Mt(t),i;if(e){var a=Mt(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return mo(this,i)}}function oe(t){return vo(t)||_o(t)||yo(t)||bo()}function vo(t){if(Array.isArray(t))return fn(t)}function _o(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function yo(t,e){if(!!t){if(typeof t=="string")return fn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fn(t,e)}}function fn(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function bo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var j={type:function(e,n){return Object.prototype.toString.call(e)==="[object "+n+"]"},Undef:function(e){return e==null},Element:function(e){return pe(e)==="object"&&e!==null&&e.nodeType===1&&!j.Object(e)},trueArray:function(e){return Array.isArray(e)&&e.length>0},Function:function(e){var n=this.getType(e);return n==="Function"||n==="AsyncFunction"},getType:function(e){var n=Object.prototype.toString.call(e);return/^\[object (.*)\]$/.exec(n)[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(t){j[t]=function(e){return j.type(e,t)}});function me(t,e){return{}.hasOwnProperty.call(t,e)}var wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Sr={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(wo,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",o="second",s="minute",u="hour",d="day",h="week",y="month",_="quarter",A="year",S="date",C="Invalid Date",T=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,q=/\[([^\]]+)]|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,U={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(O){var b=["th","st","nd","rd"],f=O%100;return"["+O+(b[(f-20)%10]||b[f]||b[0])+"]"}},L=function(O,b,f){var c=String(O);return!c||c.length>=b?O:""+Array(b+1-c.length).join(f)+O},Y={s:L,z:function(O){var b=-O.utcOffset(),f=Math.abs(b),c=Math.floor(f/60),m=f%60;return(b<=0?"+":"-")+L(c,2,"0")+":"+L(m,2,"0")},m:function k(O,b){if(O.date()<b.date())return-k(b,O);var f=12*(b.year()-O.year())+(b.month()-O.month()),c=O.clone().add(f,y),m=b-c<0,v=O.clone().add(f+(m?-1:1),y);return+(-(f+(b-c)/(m?c-v:v-c))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:y,y:A,w:h,d,D:S,h:u,m:s,s:o,ms:a,Q:_}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},ne="en",Z={};Z[ne]=U;var Q="$isDayjsObject",X=function(O){return O instanceof $e||!(!O||!O[Q])},ce=function k(O,b,f){var c;if(!O)return ne;if(typeof O=="string"){var m=O.toLowerCase();Z[m]&&(c=m),b&&(Z[m]=b,c=m);var v=O.split("-");if(!c&&v.length>1)return k(v[0])}else{var p=O.name;Z[p]=O,c=p}return!f&&c&&(ne=c),c||!f&&ne},se=function(O,b){if(X(O))return O.clone();var f=pe(b)=="object"?b:{};return f.date=O,f.args=arguments,new $e(f)},re=Y;re.l=ce,re.i=X,re.w=function(k,O){return se(k,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var $e=function(){function k(b){this.$L=ce(b.locale,null,!0),this.parse(b),this.$x=this.$x||b.x||{},this[Q]=!0}var O=k.prototype;return O.parse=function(b){this.$d=function(f){var c=f.date,m=f.utc;if(c===null)return new Date(NaN);if(re.u(c))return new Date;if(c instanceof Date)return new Date(c);if(typeof c=="string"&&!/Z$/i.test(c)){var v=c.match(T);if(v){var p=v[2]-1||0,E=(v[7]||"0").substring(0,3);return m?new Date(Date.UTC(v[1],p,v[3]||1,v[4]||0,v[5]||0,v[6]||0,E)):new Date(v[1],p,v[3]||1,v[4]||0,v[5]||0,v[6]||0,E)}}return new Date(c)}(b),this.init()},O.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},O.$utils=function(){return re},O.isValid=function(){return this.$d.toString()!==C},O.isSame=function(b,f){var c=se(b);return this.startOf(f)<=c&&c<=this.endOf(f)},O.isAfter=function(b,f){return se(b)<this.startOf(f)},O.isBefore=function(b,f){return this.endOf(f)<se(b)},O.$g=function(b,f,c){return re.u(b)?this[f]:this.set(c,b)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(b,f){var c=this,m=!!re.u(f)||f,v=re.p(b),p=function(x,P){var g=re.w(c.$u?Date.UTC(c.$
|
|||
|
|
|||
|
rule: `+JSON.stringify(n.getRule?n.getRule():n):"")}function pn(t,e){console.error(kr("err",t,e))}function Ko(t){pn(t.toString()),console.error(t)}function Ie(t){var e=t.replace(/(-[a-z])/g,function(n){return n.replace("-","").toLocaleUpperCase()});return Vr(e)}function Vr(t){return t.replace(t[0],t[0].toLowerCase())}var mn="[[FORM-CREATE-PREFIX-",gn="-FORM-CREATE-SUFFIX]]";function vn(t,e){return JSON.stringify(wt(Array.isArray(t)?[]:{},t,!0),function(n,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 mn+r+gn}},e)}function _n(t){return new Function("return "+t)()}function ze(t,e){if(t&&j.String(t)&&t.length>4){var n=t.trim(),r=!1;try{if(n.indexOf(gn)>0&&n.indexOf(mn)===0)n=n.replace(gn,"").replace(mn,""),r=!0;else if(n.indexOf("$FN:")===0)n=n.substring(4),r=!0;else if(n.indexOf("$EXEC:")===0)n=n.substring(6),r=!0;else if(n.indexOf("$GLOBAL:")===0){var i=n.substring(8);return n=function(){for(var s=arguments.length,u=new Array(s),d=0;d<s;d++)u[d]=arguments[d];var h=u[0].api.getGlobalEvent(i);if(h)return h.call.apply(h,[this].concat(u))},n.__json=t,n.__inject=!0,n}else{if(n.indexOf("$FNX:")===0)return n=_n("function($inject){"+n.substring(5)+"}"),n.__json=t,n.__inject=!0,n;(!e&&n.indexOf("function ")===0&&n!=="function "||!e&&n.indexOf("function(")===0&&n!=="function(")&&(r=!0)}if(!r)return t;var a;try{a=_n(n)}catch{a=_n("function "+n)}return a.__json=t,a}catch(o){pn("\u89E3\u6790\u5931\u8D25:".concat(n,`
|
|||
|
|
|||
|
err: `).concat(o));return}}return t}function Mr(t,e){return JSON.parse(t,function(n,r){return j.Undef(r)||!r.indexOf?r:ze(r,e)})}function yn(t,e){return{value:t,enumerable:!1,configurable:!1,writable:!!e}}function Fr(t,e){return Tr([t],e||!1)[0]}function Tr(t,e){return wt([],oe(t),e||!1)}function He(t,e){return nt(Array.isArray(e)?e:[e],t,{array:Tt,normal:jt}),t}function jr(t){var e=j.Function(t.getRule)?t.getRule():t;return e.type||(e.type="input"),e}function Zo(t,e){return t?(Object.keys(e||{}).forEach(function(n){e[n]&&(t[n]=He(t[n]||{},e[n]))}),t):e}function Br(t,e){Object.defineProperties(t,Object.keys(e).reduce(function(n,r){return n[r]={get:function(){return e[r]()}},n},{}))}function rt(t){return t.__fc__||(t.__origin__?t.__origin__.__fc__:null)}function de(t,e){try{e=t()}catch(n){Ko(n)}return e}function bn(){var t={},e=function(r){return r||"default"};return{setSlot:function(r,i){r=e(r),!(!i||Array.isArray(i)&&i.length)&&(t[r]||(t[r]=[]),t[r].push(i))},getSlot:function(r,i){r=e(r);var a=[];return(t[r]||[]).forEach(function(o){if(Array.isArray(o))a.push.apply(a,oe(o));else if(j.Function(o)){var s=o.apply(void 0,oe(i||[]));Array.isArray(s)?a.push.apply(a,oe(s)):a.push(s)}else j.Undef(o)||a.push(o)}),a},getSlots:function(){var r=this,i={};return Object.keys(t).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),t[r]?t[r].length:0},mergeBag:function(r){var i=this;if(!r)return this;var a=j.Function(r.getSlots)?r.getSlots():r;return Array.isArray(r)||l.isVNode(r)?this.setSlot(void 0,function(){return r}):Object.keys(a).forEach(function(o){i.setSlot(o,a[o])}),this}}}function Ir(t){var e=G({},t.props||{});return Object.keys(t.on||{}).forEach(function(n){n.indexOf("-")>0&&(n=Ie(n));var r="on".concat(Yo(n));Array.isArray(e[r])?e[r]=[].concat(oe(e[r]),[t.on[n]]):e[r]?e[r]=[e[r],t.on[n]]:e[r]=t.on[n]}),e.key=t.key,e.ref=t.ref,e.class=t.class,e.id=t.id,e.style=t.style,e.slot&&delete e.slot,e}function Bt(t,e){return Object.setPrototypeOf(t,e),t}var Nr=function(e,n){return typeof e=="string"?String(n):typeof e=="number"?Number(n):n},it={"==":function(e,n){return JSON.stringify(e)===JSON.stringify(Nr(e,n))},"!=":function(e,n){return!it["=="](e,n)},">":function(e,n){return e>n},">=":function(e,n){return e>=n},"<":function(e,n){return e<n},"<=":function(e,n){return e<=n},on:function(e,n){return e&&e.indexOf&&e.indexOf(Nr(e[0],n))>-1},notOn:function(e,n){return!it.on(e,n)},in:function(e,n){return n&&n.indexOf&&n.indexOf(e)>-1},notIn:function(e,n){return!it.in(e,n)},between:function(e,n){return e>n[0]&&e<n[1]},notBetween:function(e,n){return e<n[0]||e>n[1]},empty:function(e){return j.empty(e)},notEmpty:function(e){return!j.empty(e)},pattern:function(e,n){return new RegExp(n,"g").test(e)}};function Ve(t,e){return(Array.isArray(e)?e:(e||"").split(".")).forEach(function(n){t!=null&&(t=t[n])}),t}function ea(t){for(var e=/{{\s*(.*?)\s*}}/g,n,r={};(n=e.exec(t))!==null;)n[1]&&(r[n[1]]=!0);return Object.keys(r)}function Lr(t){var e=t.split("."),n=[],r="";return e.forEach(function(i,a){a===0?r=i:r+="."+i,n.push(r)}),n.join(" && ")}function Ur(){return{props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0}}function It(t,e){return function(n,r,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=new wn(t,n,r,i,a);return e&&(j.Function(e)?e(o):o.props(e)),o}}function wn(t,e,n,r,i){this._data=J(Ur(),{type:t,title:e,field:n,value:r,props:i||{}}),this.event=this.on}J(wn.prototype,{getRule:function(){return this._data},setProp:function(e,n){return ke(this._data,e,n),this},modelField:function(e){return this._data.modelField=e,this},_clone:function(){var e=new this.constructor;return e._data=Fr(this._data),e}});function zr(t){t.forEach(function(e){wn.prototype[e]=function(n){return He(this._data,Se({},e,arguments.length<2?n:Se({},n,arguments[1]))),this}})}zr(Pr());var ta=It("");function na(t,e,n){var r=ta("",e);return r._data.type=t,r._data.title=n,r}function ra(){return{create:na,factory:It}}functio
|
|||
|
* @form-create/component-antdv-upload v3.2.15
|
|||
|
* (c) 2018-2024 xaboy
|
|||
|
* Github https://github.com/xaboy/form-create with upload
|
|||
|
* Released under the MIT License.
|
|||
|
*/function ii(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Dn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ii(Object(n),!0).forEach(function(r){oi(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ii(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function zt(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zt=function(e){return typeof e}:zt=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zt(t)}function oi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cs(t){return Array.isArray(t)?t:[null,void 0,""].indexOf(t)>-1?[]:[t]}function fs(t,e){return Object.keys(t).reduce(function(n,r){return(!e||e.indexOf(r)===-1)&&n.push(t[r]),n},[])}var ai={name:"PlusOutlined"},ds={class:"anticon"},hs=l.createElementVNode("svg",{height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("defs"),l.createElementVNode("path",{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z",fill:"currentColor"}),l.createElementVNode("path",{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z",fill:"currentColor"})],-1),ps=[hs];function ms(t,e,n,r,i,a){return l.openBlock(),l.createElementBlock("span",ds,ps)}ai.render=ms;var si={name:"UploadOutlined"},gs={class:"anticon"},vs=l.createElementVNode("svg",{focusable:"false","data-icon":"upload",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"64 64 896 896"},[l.createElementVNode("path",{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"})],-1),_s=[vs];function ys(t,e,n,r,i,a){return l.openBlock(),l.createElementBlock("span",gs,_s)}si.render=ys;var ui=function(e,n){return zt(e)==="object"?e:{url:e,is_string:!0,name:bs(e),status:"done",uid:-1*(n+1)}},bs=function(e){return(""+e).split("/").pop()},li=function(e){return Dn(Dn({},e),{},{file:e,value:e})},ws="fcUpload",$s=l.defineComponent({name:ws,inheritAttrs:!1,formCreateParser:{toFormValue:function(e){return cs(e)},toValue:function(e,n){return n.prop.props.limit===1?e[0]||"":e}},props:{limit:{type:Number,default:0},modelValue:{type:[Array,String,Object],default:function(){return[]}},onSuccess:{type:Function,required:!0},onPreview:Function,listType:String,modalTitle:String,previewMask:void 0},emits:["update:modelValue","change","fc.el"],data:function(){return{previewImage:"",previewVisible:!1,uploadList:this.modelValue.map(ui).map(li)}},watch:{modelValue:function(e){this.uploadList=e.map(ui).map(li)}},methods:{handlePreview:function(e){this.onPreview?this.onPreview.apply(this,arguments):(this.previewImage=e.url,this.previewVisible=!0)},handleChange:function(e){var n=e.file,r=e.fileList;this.$emit.apply(this,["change"].concat(Array.prototype.slice.call(arguments))),this.uploadList=r,n.status==="done"?(this.onSuccess(n,r),this.input()):n.status==="removed"&&(r.forEach(function(i,a){i.file===n&&r.splice(a,1)}),this.input())},input:function(){this.$emit("update:modelValue",this.uploadList.map(function(e){return e.is_string?e.url:e.value||e.url}))}},render:function(){var e,n,r=this,i=!this.limit||this.limit>this.uploadList.length,a=l.resolveComponent("AModal"),o=oi({},a.props.open?"open":"visible",this.previewVisible);return l.createVNode(l.Fragment,null,[l.createVNode(l.resolveComponent("AUpload"),l.mergeProps({maxCount:this.limit,listType:this.listType||"picture-card"},this.$attrs,{onPreview:this.handlePreview,onChange:this.handleChange,fileList:this.upl
|
|||
|
|
|||
|
rule: `+JSON.stringify(n.getRule?n.getRule():n):"")}function Ms(t,e){console.error(Vs("err",t,e))}const di="[[FORM-CREATE-PREFIX-",hi="-FORM-CREATE-SUFFIX]]";function Pn(t){return new Function("return "+t)()}function pi(t,e){if(t&&Fe.String(t)&&t.length>4){let n=t.trim(),r=!1;try{if(n.indexOf(hi)>0&&n.indexOf(di)===0)n=n.replace(hi,"").replace(di,""),r=!0;else if(n.indexOf("$FN:")===0)n=n.substring(4),r=!0;else if(n.indexOf("$EXEC:")===0)n=n.substring(6),r=!0;else if(n.indexOf("$GLOBAL:")===0){const a=n.substring(8);return n=function(...o){const s=o[0].api.getGlobalEvent(a);if(s)return s.call(this,...o)},n.__json=t,n.__inject=!0,n}else{if(n.indexOf("$FNX:")===0)return n=Pn("function($inject){"+n.substring(5)+"}"),n.__json=t,n.__inject=!0,n;(!e&&n.indexOf("function ")===0&&n!=="function "||!e&&n.indexOf("function(")===0&&n!=="function(")&&(r=!0)}if(!r)return t;let i;try{i=Pn(n)}catch{i=Pn("function "+n)}return i.__json=t,i}catch(i){Ms(`\u89E3\u6790\u5931\u8D25:${n}
|
|||
|
|
|||
|
err: ${i}`);return}}return t}const Yp="",Fs=l.defineComponent({name:"DataTable",emits:["change","handleClick","rowSelectionChange"],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 t=this.list||[];const e=[];return this.column.forEach(n=>{n.prop&&Array.isArray(n.filter)&&n.filter.length>0&&e.push(r=>n.filter.indexOf(r[n.prop])>-1)}),e.forEach(n=>{t=t.filter(n)}),t},tableColumns(){const t=[];return this.column.forEach(e=>{t.push({dataIndex:e.prop,title:e.label,width:e.width,fixed:e.fixed,className:e.className,align:e.align,sorter:e.sorter==="custom"?!0:e.sorter?(n,r)=>n[e.prop]>r[e.prop]:!1,customRender:n=>this.makeTd(e,n)})}),this.button&&this.button.open===!0&&this.button.column&&t.push({dataIndex:"_handle",label:this.button.label||this.formCreateInject.t("operation")||"\u64CD\u4F5C",fixed:this.button.fixed===void 0?"right":this.button.fixed,width:this.button.width||"125px",customRender:e=>(this.button.column||[]).filter(n=>n.hidden!==!0).map(n=>l.h(l.resolveComponent("a-button"),this.btnProps(n,e),()=>[n.name]))}),t}},render(){return l.h("div",{class:"_fc-data-table"},[l.h(l.resolveComponent("a-spin"),{spinning:this.loading},()=>[l.h(l.resolveComponent("a-table"),{dataSource:this.filterList,columns:this.tableColumns,pagination:!1,rowSelection:this.selection?{onChange:(...t)=>{this.$emit("rowSelectionChange",...t)}}:void 0,...this.$attrs,key:this.id,ref:"table",onChange:(...t)=>{const e=t[2];this.$emit("change",...t),e.order&&e.field?(this.orderBy=e.order==="descend"?"DESC":"ASC",this.order=e.field):(this.orderBy="",this.order=""),this.initPage()}}),this.makePage()])])},methods:{getEl(){return this.$refs.table},deepGet(t,e,n){e=(e||"").split(".");let r=0,i=e.length;for(;t!=null&&r<i;)t=t[e[r++]];return r&&r===i&&t!==void 0?t:n},initPage(){this.loading=!1,this.page&&this.page.open?(this.currentPage=1,this.nextList()):this.globalDataKey||this.fetch?this.fetchData().then(({list:t})=>{this.list=t}):this.list=this.data},btnProps(t,e){const n={type:t.type,size:t.size,onClick:i=>{i.stopPropagation();const a=pi(t.click);try{a&&a(e,this.formCreateInject.api)}catch(o){console.error(o)}this.$emit("handleClick",{name:t.name,scope:e,column:e.record})}},r=pi(t.handle);try{const i=r&&r(n,e,this.formCreateInject.api);typeof i=="boolean"&&(n.disabled=i)}catch(i){console.error(i)}return n},getLimit(){return this.page.props&&this.page.props.pageSize||20},nextList(){if(this.globalDataKey||this.fetch)this.fetchData(!0).then(({list:t,total:e})=>{this.list=t,this.total=e});else{const t=this.data,e=this.getLimit(),n=this.currentPage*e;this.list=t.slice(n-e,n),this.total=t.length}},fetchData(t){return this.unwatch&&this.unwatch(),new Promise(e=>{let n=this.fetch;if(this.globalDataKey){const r=typeof this.globalDataKey=="string"?this.globalDataKey:this.globalDataKey.key;n=this.formCreateInject.api.options.globalData[r]}if(n)if(n.type==="fetch"||!this.globalDataKey){n={...n};let r={};if(t){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&&(n.action+=(n.action.indexOf("?")!==-1?"&":"?")+i),this.loading=!0,n.wait=1e3,this.unwatch=this.formCreateInject.api.watchFetch(n,(a,o)=>{this.loading=!1;const s=this.page.totalField,u=this.page.dataField,d=u?this.deepGet(a,u,[]):a;let h=s?this.deepGet(a,s)
|
|||
|
* Signature Pad v5.0.4 | https://github.com/szimek/signature_pad
|
|||
|
* (c) 2024 Szymon Nowak | Released under the MIT license
|
|||
|
*/class qt{constructor(e,n,r,i){if(isNaN(e)||isNaN(n))throw new Error(`Point is invalid: (${e}, ${n})`);this.x=+e,this.y=+n,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 kn{static fromPoints(e,n){const r=this.calculateControlPoints(e[0],e[1],e[2]).c2,i=this.calculateControlPoints(e[1],e[2],e[3]).c1;return new kn(e[1],r,i,e[2],n.start,n.end)}static calculateControlPoints(e,n,r){const i=e.x-n.x,a=e.y-n.y,o=n.x-r.x,s=n.y-r.y,u={x:(e.x+n.x)/2,y:(e.y+n.y)/2},d={x:(n.x+r.x)/2,y:(n.y+r.y)/2},h=Math.sqrt(i*i+a*a),y=Math.sqrt(o*o+s*s),_=u.x-d.x,A=u.y-d.y,S=h+y==0?0:y/(h+y),C={x:d.x+_*S,y:d.y+A*S},T=n.x-C.x,q=n.y-C.y;return{c1:new qt(u.x+T,u.y+q),c2:new qt(d.x+T,d.y+q)}}constructor(e,n,r,i,a,o){this.startPoint=e,this.control2=n,this.control1=r,this.endPoint=i,this.startWidth=a,this.endWidth=o}length(){let n=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 d=s-r,h=u-i;n+=Math.sqrt(d*d+h*h)}r=s,i=u}return n}point(e,n,r,i,a){return n*(1-e)*(1-e)*(1-e)+3*r*(1-e)*(1-e)*e+3*i*(1-e)*e*e+a*e*e*e}}class mu{constructor(){try{this._et=new EventTarget}catch{this._et=document}}addEventListener(e,n,r){this._et.addEventListener(e,n,r)}dispatchEvent(e){return this._et.dispatchEvent(e)}removeEventListener(e,n,r){this._et.removeEventListener(e,n,r)}}function gu(t,e=250){let n=0,r=null,i,a,o;const s=()=>{n=Date.now(),r=null,i=t.apply(a,o),r||(a=null,o=[])};return function(...d){const h=Date.now(),y=e-(h-n);return a=this,o=d,y<=0||y>e?(r&&(clearTimeout(r),r=null),n=h,i=t.apply(a,o),r||(a=null,o=[])):r||(r=window.setTimeout(s,y)),i}}class Gt extends mu{constructor(e,n={}){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=n.velocityFilterWeight||.7,this.minWidth=n.minWidth||.5,this.maxWidth=n.maxWidth||2.5,this.throttle=(r=n.throttle)!==null&&r!==void 0?r:16,this.minDistance=(i=n.minDistance)!==null&&i!==void 0?i:5,this.dotSize=n.dotSize||0,this.penColor=n.penColor||"black",this.backgroundColo
|
|||
|
`}return Ae%2&&fe>0?Le.substring(0,Le.length-Ae-1)+Array(Ae+1).join("\u2580"):Le.substring(0,Le.length-1)}($);g-=1,$=$===void 0?2*g:$;var w,R,V,H,W=E.getModuleCount()*g+2*$,ee=$,ae=W-$,ie=Array(g+1).join("\u2588\u2588"),ue=Array(g+1).join(" "),_e="",he="";for(w=0;w<W;w+=1){for(V=Math.floor((w-ee)/g),he="",R=0;R<W;R+=1)H=1,ee<=R&&R<ae&&ee<=w&&w<ae&&E.isDark(V,Math.floor((R-ee)/g))&&(H=0),he+=H?ie:ue;for(V=0;V<g;V+=1)_e+=he+`
|
|||
|
`}return _e.substring(0,_e.length-1)},E.renderTo2dContext=function(g,$){$=$||2;for(var w=E.getModuleCount(),R=0;R<w;R++)for(var V=0;V<w;V++)g.fillStyle=E.isDark(R,V)?"black":"white",g.fillRect(R*$,V*$,$,$)},E};y.stringToBytes=(y.stringToBytesFuncs={default:function(k){for(var O=[],b=0;b<k.length;b+=1){var f=k.charCodeAt(b);O.push(255&f)}return O}}).default,y.createStringToBytes=function(k,O){var b=function(){for(var c=$e(k),m=function(){var z=c.read();if(z==-1)throw"eof";return z},v=0,p={};;){var E=c.read();if(E==-1)break;var F=m(),M=m()<<8|m();p[String.fromCharCode(E<<8|F)]=M,v+=1}if(v!=O)throw v+" != "+O;return p}(),f="?".charCodeAt(0);return function(c){for(var m=[],v=0;v<c.length;v+=1){var p=c.charCodeAt(v);if(p<128)m.push(p);else{var E=b[c.charAt(v)];typeof E=="number"?(255&E)==E?m.push(E):(m.push(E>>>8),m.push(255&E)):m.push(f)}}return m}};var _,A,S,C,T,q={L:1,M:0,Q:3,H:2},U=(_=[[],[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]],A=1335,S=7973,T=function(k){for(var O=0;k!=0;)O+=1,k>>>=1;return O},(C={}).getBCHTypeInfo=function(k){for(var O=k<<10;T(O)-T(A)>=0;)O^=A<<T(O)-T(A);return 21522^(k<<10|O)},C.getBCHTypeNumber=function(k){for(var O=k<<12;T(O)-T(S)>=0;)O^=S<<T(O)-T(S);return k<<12|O},C.getPatternPosition=function(k){return _[k-1]},C.getMaskFunction=function(k){switch(k){case 0:return function(O,b){return(O+b)%2==0};case 1:return function(O,b){return O%2==0};case 2:return function(O,b){return b%3==0};case 3:return function(O,b){return(O+b)%3==0};case 4:return function(O,b){return(Math.floor(O/2)+Math.floor(b/3))%2==0};case 5:return function(O,b){return O*b%2+O*b%3==0};case 6:return function(O,b){return(O*b%2+O*b%3)%2==0};case 7:return function(O,b){return(O*b%3+(O+b)%2)%2==0};default:throw"bad maskPattern:"+k}},C.getErrorCorrectPolynomial=function(k){for(var O=Y([1],0),b=0;b<k;b+=1)O=O.multiply(Y([1,L.gexp(b)],0));return O},C.getLengthInBits=function(k,O){if(1<=O&&O<10)switch(k){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+k}else if(O<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(!(O<41))throw"type:"+O;switch(k){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+k}}},C.getLostPoint=function(k){for(var O=k.getModuleCount(),b=0,f=0;f<O;f+=1)for(var c=0;c<O;c+=1){for(var m=0,v=k.isDark(f,c),p=-1;p<=1;p+=1)if(!(f+p<0||O<=f+p))for(var E=-1;E<=1;E+=1)c+E<0||O<=c+E||p==0&&E==0||v==k.isDark(f+p,c+E)&&(m+=1);m>5&&(b+=3+m-5)}for(f=0;f<O-1;f+=1)for(c=0;c<O-1;c+=1){var F=0;k.isDark(f,c)&&(F+=1),k.isDark(f+1,c)&&(F+=1),k.isDark(f,c+1)&&(F+=1),k.isDark(f+1,c+1)&&(F+=1),F!=0&&F!=4||(b+=3)}for(f=0;f<O;f+=1)for(c=0;c<O-6;c+=1)k.isDark(f,c)&&!k.isDark(f,c+1)&&k.isDark(f,c+2)&&k.isDark(f,c+3)&&k.isDark(f,c+4)&&!k.isDark(f,c+5)&&k.isDark(f,c+6)&&(b+=40);for(c=0;c<O;c+=1)for(f=0;f<O-6;f+=1)k.isDark(f,c)&&!k.isDark(f+1,c)&&k.isDark(f+2,c)&&k.isDark(f+3,c)&&k.isDark(f+4,c)&&!k.isDark(f+5,c)&&k.isDark(f+6,c)&&(b+=40);var M=0;for(c=0;c<O;c+=1)for(f=0;f<O;f+=1)k.isDark(f,c)&&(M+=1);return b+Math.abs(100*M/O/O-50)/5*10},C),L=function(){for(var k=new Array(256),O=new Array(256),b=0;b<8;b+=1)k[b]=1<<b;for(b=8;b<256;b+=1)k[b]=k[b-4]^k[b-5]^k[b-6]^k[b-8];for(b=0;b<255;b+=1)O[k[b]]=b;return{glog:function(f){if(f<1)throw"glog("+f+")";return O[f]},gexp:function(f){for(;f<0;)f+=255;for(;f>=256;)f-=255;return k[f]}}}();function Y(k,O){if(k.length===void 0)throw k.length+"/"+O;var b=function(){for(var c=0;c<k.length&&k[c]==0;)c+=1;for(var m=new Array(k.length-c+
|
|||
|
${new this._window.XMLSerializer().serializeToString(c)}`;return typeof Blob>"u"||this._options.jsdom?Buffer.from(v):new Blob([v],{type:m})}return new Promise(v=>{const p=c;if("toBuffer"in p)if(m==="image/png")v(p.toBuffer(m));else if(m==="image/jpeg")v(p.toBuffer(m));else{if(m!=="application/pdf")throw Error("Unsupported extension");v(p.toBuffer(m))}else"toBlob"in p&&p.toBlob(v,m,1)})}async download(f){if(!this._qr)throw"QR code is empty";if(typeof Blob>"u")throw"Cannot download in Node.js, call getRawData instead.";let c="png",m="qr";typeof f=="string"?(c=f,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof f=="object"&&f!==null&&(f.name&&(m=f.name),f.extension&&(c=f.extension));const v=await this._getElement(c);if(v)if(c.toLowerCase()==="svg"){let p=new XMLSerializer().serializeToString(v);p=`<?xml version="1.0" standalone="no"?>\r
|
|||
|
`+p,u(`data:${Ne(c)};charset=utf-8,${encodeURIComponent(p)}`,`${m}.svg`)}else u(v.toDataURL(Ne(c)),`${m}.${c}`)}}const O=k})(),a.default})())})(ro);const kp=lu(ro.exports),Vp=l.defineComponent({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 t={dotsOptions:{}};Object.keys(this.$props).forEach(e=>{this.$props[e]!=null&&this.$props[e]!==""&&(t[e]=this.$props[e])}),delete t.formCreateInject,t.circleType&&(t.dotsOptions.type=t.circleType),t.circleColor&&(t.dotsOptions.color=t.circleColor),delete t.circleColor,delete t.circleType,this.$nextTick(()=>{this.qrcode?this.qrcode.update(t):(this.qrcode=l.markRaw(new kp(t)),this.qrcode.append(this.$refs.qr))})},deep:!0,immediate:!0}}}),Mp={class:"_fc-qrcode",ref:"qr"};function Fp(t,e,n,r,i,a){return l.openBlock(),l.createElementBlock("div",Mp,null,512)}const Tp=we(Vp,[["render",Fp]]),sm="",um="",jp=Object.assign||function(t){for(let e,n=1;n<arguments.length;n++)for(let r in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,r)&&dt(t,r,e[r]);return t};function Bp(){return jp.apply(this,arguments)}const Ip=(t,e)=>$r.message[e||"info"]({content:t});function Np(t){const e=document.createElement("textarea");e.style.position="fixed",e.style.top=0,e.style.left="-9999px",e.value=t,document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")}catch{console.log("Oops, unable to copy")}Ip("\u5DF2\u590D\u5236!","success"),document.body.removeChild(e)}const Lp=(t,e)=>{let n=[t];const r=e.split(".");let i=1;for(;r[i];){let a=[];n.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])}})}),n=a.map(o=>o.rule[0].__fc__.$handle),i++}return[n,r[i-1]]},sn=(t,e,n)=>{const r=t.vm.setupState.top.setupState.fc.$handle;let i=[t.$handle];t.$handle!==r&&i.push(r);let a=e;e.indexOf(".")>-1&&([i,a]=Lp(r,e)),i.forEach(o=>{Object.values(o.ctxs).forEach(s=>{s.rule._fc_id===a&&n(s.rule,o.api)})})},io={openModel(t,e){e.api.open(t.model)},closeModel(t,e){e.api.close(t.model)},hidden(t,e,n){const r=typeof t.id=="string"?[t.id]:t.id||[];let i=!!t.status;t.compute&&(i=!!n.$handle.compute(e.self.__fc__,t.formula)),r.forEach(a=>{sn(n,a,o=>{o.hidden=i})})},disabled(t,e,n){const r=typeof t.id=="string"?[t.id]:t.id||[];let i=!!t.status;t.compute&&(i=!!n.$handle.compute(e.self.__fc__,t.formula)),r.forEach(a=>{sn(n,a,o=>{o.props||(o.props={}),o.props.disabled=i})})},resetFields(t,e){e.api.top.resetFields()},clearFields(t,e){e.api.top.coverValue({})},validate(t,e){return e.api.top.validate()},validateFields(t,e,n){const r=typeof t.id=="string"?[t.id]:t.id||[],i=[];return r.forEach(a=>{sn(n,a,(o,s)=>{o.field&&i.push(s.validateField(o.field))})}),i.length?Promise.all(i):void 0},submit(t,e){return e.api.top.submit()},setValue(t,e,n){(t.formData||[]).forEach(r=>{let i=r.value;r.compute&&(i=n.$handle.compute(e.self.__fc__,r.formula)),sn(n,r.id,a=>{a.value=i})})},fetch(t,e){const{append:n,response:r,fetch:i}=t;return n&&(i.data={...e.api.formData(),...i.data||{}}),new Promise((a,o)=>{e.api.fetch(t.fetch).then(s=>{r&&e.api.setData(r,s),a(s)}).catch(s=>{o(s)})})},copy(t,e,n){let r=t.content||"";t.compute&&(r=n.$handle.compute(e.self.__fc__,t.formula)),Np(r)},callback(t,e){return t.callback&&t.callback(e)},message(t){$r.message[t.type||"info"]({content:t.message,duration:t.duration})}};function Up(t,e){return t.reduce((n,r)=>n.then(()=>r(e)),Promise.resolve())}const zp=function(t){return{name:"behavior",load(e,n){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:d,config:h,expression:y,stopPropagation:_,ignoreError:A}=u;s.push(S=>new Promise(C=>{if(y&&t.$handle.compute(n.__fc__,y)===!1){C();return}const T=(...U)=>{(!_||t.$handle.compute(n.__fc__,_)!==!0)&&C(...U)};let q;try{q=io[d](h||{},S,t)}catch(U){console.error(U),A!==!1&&T();return}q&&q.then?q.then(T).catch(()=>{A!==!1&&T()}):T(q)}))}),s.length)
|