dfish-widget 1.1.11 → 1.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.esm.js CHANGED
@@ -1 +1 @@
1
- import t from"lodash";import e from"jquery";import i from"axios";import l from"qs";import{mergeProps as r,h as a,nextTick as o,resolveComponent as n,toRaw as h,createElementBlock as c,openBlock as u,createStaticVNode as d,createElementVNode as p,createBlock as m,withCtx as f,Fragment as x,createVNode as g,renderList as v,toDisplayString as w,createCommentVNode as b,createTextVNode as _,inject as y,provide as k,renderSlot as S,Teleport as T,computed as C,resolveDirective as M,withDirectives as V,normalizeClass as P,markRaw as z,ref as D,getCurrentInstance as E,onMounted as L,watch as H,normalizeStyle as F,unref as I,TransitionGroup as N,createSlots as Y,resolveDynamicComponent as B,withModifiers as O}from"vue";let j=navigator.userAgent.toLowerCase(),q=j.match(/\bchrome\/(\d+)/),R=j.match(/\bfirefox\/(\d+)/);const W={agent:j,chrome:q&&parseFloat(q[1]),firefox:R&&parseFloat(R[1]),safari:!q&&j.indexOf("safari")>0,ie:("Microsoft Internet Explorer"===navigator.appName||j.indexOf("trident")>0)&&document.documentMode,compat:{gap:!1}};if(j.match(/\bmobile\b/)){W.mobile=!0,W.app="file:"===location.protocol;let t=j.match(/(MicroMessenger)\/([\d\.]+)/i);t&&(W.wechat={version:t[2].replace(/_/g,".")});let e=j.match(/(Android);?[\s\/]+([\d.]+)?/i);e&&(W.android=!0,W.version=e[2],W.isBadAndroid=!/Chrome\/\d/.test(window.navigator.appVersion));let i=j.match(/(iPhone\sOS)\s([\d_]+)/i);if(i)W.ios=W.iphone=!0,W.version=i[2].replace(/_/g,".");else{let t=j.match(/(iPad).*OS\s([\d_]+)/i);t&&(W.ios=W.ipad=!0,W.version=t[2].replace(/_/g,"."))}}(W.chrome&&W.chrome<84||W.firefox&&W.firefox<63)&&(W.compat.gap=!0);let U=0;const X=()=>(U++).toString(36)+":";function Q(t){return t?t.uid||(t.uid=X()):X()}var G={yes:"是",no:"否",none:"无",to:"至",jump:"转到",confirm:"确定",search:"搜索",query:"查询",choose:"选择",save:"保存",remove:"删除",cancel:"取消",create:"新建",add:"添加",edit:"编辑",finish:"完成",refresh:"刷新",operfail:"操作失败",opertip:"操作提示",nodata:"暂无数据",more:"更多",field:"字段",close:"关闭",restore:"还原",rotate_left:"向左旋转",rotate_right:"向右旋转",dialog_max:"最大化",dialog_min:"最小化",detect_zoom:"温馨提示: 你的浏览器可能处于缩放({0}%)状态,这可能影响页面浏览效果,请尝试Ctrl+0重置,并刷新",no_tip_anymore:"不再提示",loading:"正在加载",wait:"请稍候..",submiting:"数据提交中,请稍候..",uploading:"正在上传,请稍侯..",click_preview:"点击预览",toomuch_wait:"次数过多,请稍候再试",toomuch_wait_countdown:"次数过多,请稍候再试(<em>{0}</em>)",preview_orginal_image:"查看原图",auth_success:"验证成功",auth_fail:"验证失败",choose_image:"选择图片",tree_movefail1:"无法移动:目标文件夹和源文件夹相同",tree_movefail2:"无法移动:目标文件夹是源文件夹的子文件夹",internet_error:"[{0} error] {1}<br>网络连接失败,请稍候再试",server_error:"[{0} error] {1}<br>系统异常,请联系管理员",preload_error:'获取预装载模板 "{0}" 失败',page:"页",page_text:{first:"首页",last:"尾页",next:"下页",prev:"上页"},print_preview:"打印预览",placeholder_input:"请输入{0}",placeholder_select:"请选择{0}",pulldown_refresh:"下拉刷新",release_refresh:"释放刷新",pullup_refresh:"上拉显示更多",pullup_nomore:"没有更多了",download_start:"开始下载..",download_complete:"下载完成",download_cannotopen:"无法打开此文件",download_fail:"下载失败",tab_close:"关闭标签",tab_close_others:"关闭其他标签",tab_close_all:"关闭全部标签",sort_asc:"升序",sort_desc:"降序",sort_cancel:"取消排序",column_choose:"选择列",connection_not_wifi:"您当前处于非wifi网络环境下,继续使用可能产生流量,确定继续吗?",debug:{sorry:"很抱歉,系统发生了错误",view_more:"点击“确定”,可在新窗口查看详细错误信息",no_command:"视图中没有定义此命令: {0}\nview path: {1}",no_combo:"选项列表(或树)没有设置combo参数\nname: {0}",error_template_type:'{0}\n请把此模板类型改为 "{1}"',error_type:"type错误或丢失\n{0}",tmpl_method_undefined:'"{0}" 方法不存在'},form:{required:"{0}不能为空",onlyone:"{0的}只能选择一条记录",maxLength:"{0}超出了{1}个字",reach_maxLength:"已到达可输入的最大字符长度",over_maxLength:"字符长度超出了{0}个字节",minLength:"{0}不能少于{1}个字节",maxValue:"{0}最大值为{1}",minValue:"{0}最小值为{1}",maxSize:"{0}最多选择{1}项",minSize:"{0}最少选择{1}项",pattern:"{0}格式不符合规范,或包含非法字符",password_weak:"弱",password_middle:"中",password_strong:"强",number_invalid:"{0}不是一个有效数字",number_integer:"{0}请填入一个整数",number_decimal_digit:"{0的}小数位不能超过{1}位",step_max_value:"已到达最大值",step_min_value:"已到达最小值",time_exceed:"{0的}年份超出有效范围。有效年份:{1}年 至 {2}年",time_format:"{0的}时间格式错误。正确格式范例:{1}",period_invalid:"{0的}起始时间应早于结束时间",beforeNow:"{0}不能大于当前时间",afterNow:"{0}不能小于当前时间",compare:"{0}需要满足条件:{1} {2} {3}",invalid_option:"存在无效选项",need_valid_option:"请输入一个有效选项",choose_atleastone:"请至少选择一项",complete_required:"请完成必填项",jigsaw_drag_right:"向右拖动滑块填充拼图",jigsaw_required:"请完成滑块验证",jigsaw_errorimg:"图片数据异常",upload_loading:"正在上传,请稍候..",upload_invalid_file:"存在无效文件",no_files:"<没有文件>",upload_error:"(上传失败)",upload_limit:"上传数量超过上限(最多{0}个)",upload_invalid_file_type:"无效的文件类型:<br>{0}<br><br>只能选择 {1} 格式文件",upload_invalid_data:"错误的文件数据格式:<br>{0}",upload_no_data:"缺少文件数据",upload_maxfilesize:"上传失败: {0}<br><br>文件大小不能超过{1}",upload_minfilesize:"上传失败: {0}<br><br>文件大小不能小于{1}"},year:"年",month:"月",day:"日",sky:"天",hour:"时",minute:"分",second:"秒",calendar:{now:"现在",today:"今天",weeknow:"本周",monthnow:"本月",yearnow:"本年",day_title:["日","一","二","三","四","五","六"],day_title_1:["一","二","三","四","五","六","日"],y:"{0}<span>年</span>",monthname:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],backdate:"返回日期",picktime:"选择时间",H:"时",m:"分",s:"秒",from_to:"{0} 至 {1}"},error:"错误",ps:(t,...e)=>(t&&(t=t.replace(/\{(\d+)([^\d]+)?\}/g,function(t,i,s){let l=e[parseFloat(i)];return null==l||""===l?"":s?l+s:l})),t),end:"结束"};const J=t=>null==t?"":""+t,K=(t,e,i)=>{let s=i?t.lastIndexOf(e):t.indexOf(e);return s<0?"":t.substr(s+e.length)},Z=(t,e,i)=>{let s=i?t.lastIndexOf(e):t.indexOf(e);return s<0?"":t.substr(0,s)},tt=(t,e)=>{if(!t)return 0;e||(e=$.x.cnBytes||2);let i=0;for(let s=0,l=t.length;s<l;s++)i+=t.charCodeAt(s)>128?e:1;return i},et=function(t,e,i){if(i=null==i?"0":i+"",!e)return t<10?i+t:t;for(t+="";t.length<e;)t=i+t;return t},it=function(t){return t.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},st=function(t,e,i){let s=[it(t)],l=t.length;if(e>0&&l>e)for(let i=l-1;i>=e;i--)for(let e,r=0,a=l-i;r<=a;r++)e=t.substr(r,i),s.push(it(e));return s},lt="object",rt=null,at=void 0,ot=t=>{var e="string"==typeof t?parseFloat(t.replace(/[^\d\.-]|\b-/g,"")):+t;return isNaN(e)?0:e},nt=t=>null!=t&&!isNaN(t),ht=function(t,e){return e!=rt&&(e.min&&!isNaN(e.min)&&(t=Math.max(t,e.min)),e.max&&!isNaN(e.max)&&(t=Math.min(t,e.max))),t},ct=864e5,ut="yyyy-MM-dd HH:mm:ss",dt={0:"Q1",1:"Q1",2:"Q1",3:"Q2",4:"Q2",5:"Q2",6:"Q3",7:"Q3",8:"Q3",9:"Q4",10:"Q4",11:"Q4"},pt=function(t,e){"string"==typeof t&&(t=mt(t,e));let i={y:t.getFullYear(),m:t.getMonth(),d:t.getDate(),h:t.getHours(),i:t.getMinutes(),s:t.getSeconds()},s=(e||ut).replace("yyyy",i.y).replace("MM",et(i.m+1)).replace("dd",et(i.d)).replace("HH",et(i.h)).replace("mm",et(i.i)).replace("ss",et(i.s)).replace("M",i.m+1).replace("d",i.d).replace("H",i.h).replace("m",i.i).replace("s",i.s);if(s.indexOf("w")>-1){let e=xt(t);s=s.replace("ww",et(e[1])).replace("w",e[1])}if(s.indexOf("q")>-1){let t=dt[i.m];s=s.replace("qq",t).replace("q",t)}return s},mt=function(t,e){let i;t=(""+t).replace(/\b(\d)\b/g,"0$1");let s=(i=(e=(e||ut).replace(/\b([MdHmsw])\b/g,"$1$1")).indexOf("yyyy"))>-1&&ot(t.substr(i,4))||(new Date).getFullYear(),l=(i=e.indexOf("MM"))>-1?Math.max(ot(t.substr(i,2))-1,0):0,r=(i=e.indexOf("dd"))>-1&&ot(t.substr(i,2))||1,a=(i=e.indexOf("HH"))>-1?ot(t.substr(i,2)):0,o=(i=e.indexOf("mm"))>-1?ot(t.substr(i,2)):0,n=(i=e.indexOf("ss"))>-1?ot(t.substr(i,2)):0;if((i=e.indexOf("qq"))>-1){let e=t.substr(i,2);return new Date(s,"Q1"===e?0:"Q2"===e?3:"Q3"===e?6:9,1)}if((i=e.indexOf("ww"))>-1){let e=ot(t.substr(i,2)),l=xt(new Date(s,0,1));return l[0]!=s&&(l=xt(new Date(s,0,8))),new Date(l[2].getTime()+7*(e-1)*ct)}return new Date(s,l,r,a,o,n)},ft=function(t,e,i){i=ot(i);let s=new Date(t.getTime());return"y"===e?s.setFullYear(t.getFullYear()+i):"M"===e?s.setMonth(s.getMonth()+i):"d"===e?s.setDate(s.getDate()+i):"H"===e?s.setHours(s.getHours()+i):"m"===e?s.setMinutes(s.getMinutes()+i):"s"===e&&s.setSeconds(s.getSeconds()+i),"y"!==e&&"M"!==e||s.getDate()==t.getDate()||(s=new Date(s.getTime()-s.getDate()*ct)),s},xt=function(t){let e=null!=$.x.weekPoint?$.x.weekPoint:1,i=null!=$.x.weekStart?$.x.weekStart:1,s=t.getDay()||7,l=new Date(t.getFullYear(),t.getMonth(),t.getDate()-s+e),r=Math.ceil((l-new Date(l.getFullYear(),0,0))/ct),a=new Date(t.getFullYear(),t.getMonth(),t.getDate()-s+i);return[l.getFullYear(),Math.floor((r+6)/7),a,new Date(a.getTime()+6048e5-1)]};window.Range&&!Range.prototype.movePoint&&(Range.prototype.__defineGetter__&&(Range.prototype.__defineGetter__("text",function(){return this.toString()}),Range.prototype.__defineSetter__("text",function(t){this.deleteContents(),this.insertNode(document.createTextNode(t))})),Range.prototype.movePoint=function(t,e){var i,s=this.startContainer.firstChild||this.startContainer,l=t,r=0;e=null==e?t:e;do{this.selectNodeContents(s),l-=r=this.toString().length}while(l>0&&(s=s.nextSibling));s=i=this.startContainer;var a=e-t+(l+=r);r=0;do{this.selectNodeContents(i),a-=r=this.toString().length}while(a>0&&(i=i.nextSibling));if(this.setStart(s.firstChild||s,l),i){for(var o=i;o.firstChild;)o=o.firstChild;this.setEnd(o,r+a)}},Range.prototype.select=function(){let t=window.getSelection();t.removeAllRanges(),t.addRange(this)});const gt=function(){let t=window.getSelection();return t.rangeCount&&t.getRangeAt(0)},vt=function(t,e){return null==t&&(t=gt()),null!=e&&(t.deleteContents?(t.deleteContents(),t.insertNode(document.createTextNode(e))):t.text=e),void 0===t.text?t.toString():t.text},wt=["afterend","afterbegin","beforebegin","beforeend"],bt=["after","prepend","before","append"],_t=function(t){let e="string"==typeof t?function(t){let e=document.createElement("div");t&&(e.innerHTML=t);try{return e}catch(t){return!1}finally{e=null}}(t):t,i=document.createDocumentFragment();for(;e.firstChild;)i.appendChild(e.firstChild);try{return i}catch(t){return!1}finally{e=i=null}},yt=function(t,i,s){if(null==s){if(null==i)return t.innerHTML;try{t.innerHTML=i}catch(e){for(;t.firstChild;)t.removeChild(t.firstChild);yt(t,i,3)}}else if("string"==typeof i)try{3===t.nodeType?e(t)[bt[s]](i):t.insertAdjacentHTML(wt[s],i)}catch(e){yt(t,_t(i),s)}else{let e=s%2?t:t.parentNode;e&&e.insertBefore(i,0===s?t.nextSibling:1===s?t.firstChild:2===s?t:null)}},kt=function(t,e){return yt(t,e,3),t.lastElementChild||t.lastChild},St=function(t,e){return yt(t,e,2),t.previousElementSibling||t.previousSibling},Tt=function(){let t={float:"cssFloat"};return function(e){return t[e]||e.replace(/-./g,function(t){return t.charAt(1).toUpperCase()})}}(),Ct=function(t,e,i){if("string"==typeof i&&"="===i.charAt(1)){e=Tt(e);var s=t.style[e]||getComputedStyle(t,null)[e];i=ot(i.replace("=",""));"width"===e||"height"===e?(s=ot(s&&"auto"!==s?s:"w"===e.charAt(0)?t.offsetWidth:t.offsetHeight))<0&&(s=0):s=ot(s),t.style[e]=s+i+("zIndex"===e?0:"px")}else"width"!==(e=Tt(e))&&"height"!==e||i&&"auto"!==i&&(i=Math.max(_number(i),0)),i&&!isNaN(i)&&"zIndex"!==e&&(i+="px"),t.style[e]=i;return t},Mt=!0,Vt=document,Pt=document.documentElement,$t=t=>t.split(","),zt={h:$t("21,12,34,43"),v:$t("41,14,32,23"),a:$t("41,32,14,23,21,34,12,43,11"),t:["tt"],b:["bb"],l:["ll"],r:["rr"],c:["cc"],top:["tt"],bottom:["bb"],left:["ll"],right:["rr"],tl:["11"],tr:["22"],rt:["22"],rb:["33"],br:["33"],bl:["44"],lb:["44"],lt:["11"],1:["11"],2:["22"],3:["22"],4:["33"],5:["33"],6:["44"],7:["44"],8:["11"]},Dt=function(){var t,e=[14,23,34,43,33,44,"bb","tb"],i={pix:{r:{},b:{}},mag:{l:{},r:{},t:{},b:{}},inner:{}};for(t=(s=[23,22,33,32,21,34,"rr","rl"]).length;t--;)i.pix.r[s[t]]=Mt;for(t=e.length;t--;)i.pix.b[e[t]]=Mt;e=[41,32,44,33,"bt","bb"];var s,l=[12,43,11,44,"lr","ll"],r=[14,23,11,22,"tb","tt"];for(t=(s=[21,34,22,33,"rr","rl"]).length;t--;)i.mag.r[s[t]]=Mt;for(t=e.length;t--;)i.mag.b[e[t]]=Mt;for(t=l.length;t--;)i.mag.l[l[t]]=Mt;for(t=r.length;t--;)i.mag.t[r[t]]=Mt;for(t=(s=[11,22,33,44,"tt","bb","ll","rr"]).length;t--;)i.inner[s[t]]=Mt;return i}(),Et=function(t){var e=Pt.clientLeft,i=Pt.scrollLeft,s=Pt.clientTop,l=Pt.scrollTop,r=t&&t!=Vt&&(t.isWidget?t.el():t),a=r&&r.getBoundingClientRect();return a?{left:a.left-e+i,top:a.top-s+l,right:a.right-e+i,bottom:a.bottom-s+l,width:a.width,height:a.height}:t==document?{left:i,top:l,right:Pt.clientWidth+i,bottom:Pt.clientHeight+l,width:Pt.clientWidth,height:Pt.clientHeight}:null},Lt={},At=function(e){e.fn&&(t.pull(Lt[e.id][e.type],e),e.type=e.fn=e.args=null)},Ht=function(t){return t.indexOf(".")>-1?Z(t,"."):t},Ft=function(t){return t.indexOf(".")>-1?"."+K(t,".").split(".").sort().join(".")+".":""},It=function(t,e){var i=Lt[Q(t)];if(i){var s=Ht(e),l=Ft(e);if(s)return i[s]&&(l?i[s].filter(t=>t.ns.indexOf(l)>-1):i[s]);var r=[];for(s in i)r.push.apply(r,i[s].filter(t=>t.ns.indexOf(l)>-1));return r}};function Nt(e){if(!e||e.isWidget)return e;if("string"==typeof e||e.uid)return Nt.vueMap.get(e.uid||e);if(e instanceof Event&&(e=e.currentTarget||e.target),e.$el){if(e.$attrs.orientUid)return Nt.vueMap.get(e.$attrs.orientUid);const t=e.$el;if(8===t.nodeType&&e.$.subTree.component.data.uid)return Nt.vueMap.get(e.$.subTree.component.data.uid);e=1!=t.nodeType?e.$el.nextElementSibling:e.$el}if(t.isElement(e))do{if(e.id){if(Nt.vueMap.has(e.id))return Nt.vueMap.get(e.id);let t=Nt.strTo(e.id,":")+":";if(Nt.vueMap.has(t))return Nt.vueMap.get(t)}}while(e=e.parentNode);for(;e&&!e.isWidget;)e=e.$parent;return e||Nt.docView}Object.assign(Nt,{x:{defaultOptions:{}},vueMap:new Map,dfclsCache:{},q:e,lodash:t,http:i,br:W,loc:G,uid:Q,EventListener:class{constructor(t){this.ctx=t}hasEvent(t){let e=It(this.ctx,t);return e&&e.length}addEvent(t,e,i){var s={id:Q(this.ctx),type:Ht(t),ns:Ft(t),fn:e,one:i};return(function(t,e){for(var i=2,s=arguments.length-1;i<s;i++)e=e[arguments[i]]||(e[arguments[i]]={});return(e[arguments[s]]||(e[arguments[s]]=[])).push(t),e[arguments[s]]}(s,Lt,s.id,s.type)).ori=!0,this}addEventOnce(t,e){return this.addEvent(t,e,!0)}fireEvent(t,e){var i=It(this.ctx,t.type||t);if(i)for(var s,l,r=0,a=i.length;r<a;r++)if((s=i[r])&&s.fn&&(l=s.fn.apply(this.ctx,e?[t].concat(e):[t]),s.one&&(At(s),i.ori&&(r--,a--)),void 0!==l))return l;return this}removeEvent(t,e){if(t){var i=It(this.ctx,t);if(i)for(var s=i.length;s--;)e&&i[s].fn!==e||At(i[s])}else{var l=Lt[Q(this.ctx)];for(s in l)this.removeEvent(s);delete Lt[Q(this.ctx)]}return this}},eventX:function(t){return t.targetTouches?t.targetTouches[0].clientX:t.clientX},eventY:function(t){return t.targetTouches?t.targetTouches[0].clientY:t.clientY},number:ot,isNumber:nt,numRange:function(t,e,i){return null==t?e||0===e?e:i||0===i?i:t:(e||0===e)&&t<e?e:(i||0===i)&&t>i?i:t},numAdd:function(...t){let e=0,i=0;return t.forEach(t=>{e=Math.max(e,K(t+"",".").length),i+=t}),e=Math.pow(10,e),Math.round(i*e)/e},numFormat:function(t,e,i,s){null==e&&(e=3),null==i&&(i=",");let l=(t=String(t)).replace(/[^.\d]/g,"").split("."),r=l[0],a=r.length,o=s?0:a,n="",h="-"===t.charAt(0)?"-":"";if(s)do{o+=e,n+=o<a?r.substr(o-e,e)+i:r.substr(o-e)}while(o<a);else do{o-=e,n=(o>0?i+r.substr(o,e):r.substr(0,e+o))+n}while(o>0);return h+n+(l.length>1?"."+K(t,".").replace(RegExp("[."+i+"]","g"),""):"")},numDecimal:function(t,e){if(e){if(e<0)return parseFloat(ot(t));{let i=K(""+t,".");return i?Z(""+t,".")+"."+i.slice(0,e):t}}return parseInt(ot(t))},numScale:function(t,e,i){for(var s,l,r,a=0,o=t,n=e.length,h=0,c=0,u=Array(n);h<n;h++)(r=typeof e[h]===lt?e[h].value:e[h])!=rt&&isNaN(r)?t==rt?u[h]=rt:"*"===r?(l=h,c++):s=h:a+=u[h]=r==rt||r<0?rt:+r;if(t==rt)return u;if(s!==at){t=Math.max(0,t-a);var d=0;for(h=a=0;h<=s;h++)r=typeof e[h]===lt?e[h].value:e[h],u[h]===at&&typeof r===_STR&&r.indexOf("%")>0&&(d+=r=parseFloat(r),a+=u[h]=ht(Math.floor(o*r/100),e[h]));l===at&&d>=100&&(u[s]=ht(Math.max(0,u[s]+o-a),e[h]))}if(l!==at){for(t=Math.max(0,t-a),h=a=0;h<=l;h++)u[h]===at&&(a+=u[h]=ht(Math.floor(t/c),e[h]));u[l]=ht(Math.max(0,u[l]+t-a),e[l])}if(i&&s===at&&l===at){for(h=0,n=u.length,a=0,c=0;h<n;h++)nt(u[h])&&(a+=u[h],c++);if(a<o){var p=Math.floor((o-a)/c);for(h=0;h<n;h++)nt(u[h])&&(u[h]+=p);for(h=n;h>=0;h--)if(nt(u[h])){u[h]+=o-a-p*c;break}}}return u},string:J,strTrim:t=>String(t).replace(/^\s+|\s+$/g,""),strEscape:function(t){return null!=t?(t+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;"):""},strFrom:K,strTo:Z,strPad:et,strLen:tt,strExceed:(t,e,i)=>{let s=tt(t,i);return i||(i=$.x.cnBytes||2),Math.ceil((s-e)/i)},strFormat:(e,i,s,l)=>(null!=e&&(e+=""),e&&i?Array.isArray(i)?e.replace(/\$\{?(\d+)\}?/g,function(t,e){return null==i[e]?l?t:"":s?encodeURIComponent(i[e]):i[e]}):e.replace(/\$\{?([a-z_][\w.]*)\}?/gi,function(e,r){let a=t.get(i,r);return null==a?l?e:"":s?encodeURIComponent(a):a}):e),strHighlight:function(t,e,i,s){return(t+="").replace(RegExp("(<[\\/!]?\\w+(?::\\w+)?\\s*(?:[-\\w]+(?:=('|\")?.*?\\2)?\\s*)*>)|("+st(e,i).join("|")+")","ig"),function(t,e,i,l){return void 0===l?e:'<em class="'+(s||"f-keyword")+'">'+l+"</em>"})},dateFormat:pt,dateParse:mt,dateAdd:ft,dateValid:function(t,e){t=(""+t).replace(/\b(\d)\b/g,"0$1");let i=mt(t,e),s=i.getFullYear();return s>=1e3&&s<=9999&&t==pt(i,e)},dateDiff:function(t,e=new Date,i){switch("string"==typeof t&&(t=mt(t)),"string"==typeof e&&(e=mt(e)),i){case"y":let s=e.getFullYear()-t.getFullYear(),l=ft(t,i,s);return l>e&&s--,s;case"M":let r=_dateDiff(t,e,"y"),a=ft(t,"y",r);return s=a.getFullYear()<e.getFullYear()?e.getMonth()+11-a.getMonth():e.getMonth()-a.getMonth(),l=ft(t,i,s),l>e&&s--,s+12*r;case"H":return Math.floor((e-t)/36e5);case"m":return Math.floor((e-t)/6e4);case"s":return Math.floor((e-t)/1e3);default:return Math.floor((e-t)/ct)}},dateSheet:function(...t){return $.docView.dateSheet(...t)},dateWeek:xt,dateWeekFirst:function(t){let e=$.dateWeek(new Date(t,0,1));return e[0]!=t&&(e=$.dateWeek(new Date(t,0,8))),e},dateWeekLast:function(t){let e=xt(new Date(t,11,31));return e[0]!==t&&(e=xt(new Date(t,11,24))),e},rngSelection:gt,rngElement:function(){let t=gt();return t&&t.startContainer.parentNode},rngCursor:function(t,e){let i=t;if(window.getSelection)if("number"==typeof t.selectionStart&&"number"==typeof t.selectionEnd)t.selectionStart=t.selectionEnd=null!=e?e:t.value.length;else{let s=window.getSelection();1===t.nodeType&&(i=document.createRange()).selectNodeContents(t),null!=e&&i.movePoint(e),s.removeAllRanges(),s.addRange(i),s.collapseToEnd()}return i},rngCursorOffset:function(){let t=gt(),e=t.startOffset;if(null!=e)return e;let i=document.body.createTextRange();return i.selectNodeContents(t.startContainer.parentNode),i.setEndPoint("EndToStart",t),vt(i).length},rngText:vt,el:function(t){if(t){const e=t.$el;return e?1===e.nodeType?e:e.nextElementSibling:t.isWidget?t.el():t}},html:yt,append:kt,prepend:function(t,e){return yt(t,e,1),t.firstElementChild||t.firstChild},before:St,after:function(t,e){return yt(t,e,0),t.nextElementSibling||t.nextSibling},replaceWith:function(t,e){let i=t.nextSibling;if(i)return t.parentNode.removeChild(t),St(i,e);{let i=t.parentNode;return i.removeChild(t),kt(i,e)}},moveup:function(t,e,i){let s,l,r=null==i,a=document.documentElement,o=t=>t.targetTouches?t.targetTouches[0].clientX:t.clientX,n=t=>t.targetTouches?t.targetTouches[0].clientY:t.clientY,h=t=>t.preventDefault();i.currentTarget&&(i.currentTarget.style.userSelect="none"),a.addEventListener(W.mobile?"touchmove":"mousemove",s=function(e){r?t(e):i&&(Math.abs(o(e)-o(i))>1||Math.abs(n(e)-n(i))>1)&&(r=!0)},!0),a.addEventListener(W.mobile?"touchend":"mouseup",l=function(t){a.removeEventListener(W.mobile?"touchmove":"mousemove",s,!0),a.removeEventListener(W.mobile?"touchend":"mouseup",l,!0),i.currentTarget&&(i.currentTarget.style.userSelect=""),W.mobile&&a.removeEventListener("touchmove",h,{passive:!1}),e&&e(t,r)},!0),W.mobile&&a.addEventListener("touchmove",h,{passive:!1})},bcr:Et,offset:function(t,e){let i={top:0,left:0,width:t.offsetWidth,height:t.offsetHeight};do{i.top+=t.offsetTop,i.left+=t.offsetLeft}while((t=t.offsetParent)&&e!=t);return i},snap:function(t,e,i,s,l,r,a){i?i.nodeType?i=Et(i):i.isWidget?i=Et(i.el()):(i.originalEvent||null!=i.clientX)&&(i={left:(i=i.originalEvent||i).clientX,right:i.clientX,top:i.clientY,bottom:i.clientY}):i=Et(Vt);var o,n,h=[],c=[],u=-1,d=Pt.clientWidth,p=Pt.clientHeight,m=s?zt[s]||(""+s).split(","):zt.a;if(/[1-4]/.test(m[0]))for(var f=0,x=0;f<m.length;f++){if(o=+m[f].charAt(0),n=+m[f].charAt(1),h.push((1===o||2===o?i.top:i.bottom)-(3===n||4===n?e:0)),c.push((1===o||4===o?i.left:i.right)-(2===n||3===n?t:0)),S=h[f]>=0&&h[f]+e<=p,_=c[f]+t<=d&&c[f]>=0,S&&_){u=f;break}var g=h[f]<0?-h[f]:0,v=c[f]+t>d?c[f]+t-d:0,w=h[f]+e>p?h[f]+e-p:0,b=c[f]<0?-c[f]:0;y="14"===m[f]||"34"===m[f]?(t-v)*(e-g):"23"===m[f]||"43"===m[f]?(t-b)*(e-g):"32"===m[f]||"12"===m[f]?(t-b)*(e-w):(t-v)*(e-w),(!x||x<y)&&(x=y,u=f)}else{var _,y;for(f=0,x=0;f<m.length;f++){if(o=m[f].charAt(0),n=m[f].charAt(1),h.push(("r"===o||"l"===o||"c"===o?(i.top+i.bottom)/2:"t"===o?i.top:i.bottom)-("r"===n||"l"===n||"c"===n?e/2:"b"===n?e:0)),c.push(("t"===o||"b"===o||"c"===o?(i.left+i.right)/2:"r"===o?i.right:i.left)-("t"===n||"b"===n||"c"===n?t/2:"r"===n?t:0)),S=h[f]>=0&&h[f]+e<=p,_=c[f]+t<=d&&c[f]>=0,S&&_){u=f;break}(S||_)&&(s?(y=s==zt.v?1==o||2==o?-h[f]:h[f]+e-p:1==o||4==o?-c[f]:c[f]+t-d,(!x||x>y)&&(x=y,u=f)):u<0&&(u=f))}}u<0&&(u=0);var k=m[u],S={left:c[u],top:h[u],bottom:p-(h[u]+e),right:d-(c[u]+t),type:k};(Dt.pix.r[k]&&(S.pix_r=Mt),Dt.pix.b[k]&&(S.pix_b=Mt),Dt.mag.r[k]&&(S.mag_r=Mt,S.mag="r"),Dt.mag.b[k]&&(S.mag_b=Mt,S.mag="b"),Dt.mag.l[k]&&(S.mag_l=Mt,S.mag="l"),Dt.mag.t[k]&&(S.mag_t=Mt,S.mag="t"),Dt.inner[k]&&(S.inner=Mt),r&&S.mag)&&((f=r.indent||ot(r))&&(f/=window.devicePixelRatio||1,S.inner?S.mag_t?(S.top-=f,S.bottom+=f):S.mag_b?(S.top+=f,S.bottom-=f):S.mag_r?(S.left+=f,S.right-=f):(S.left-=f,S.right+=f):S.mag_t?(S.top+=f,S.bottom-=f):S.mag_b?(S.top-=f,S.bottom+=f):S.mag_r?(S.left-=f,S.right+=f):(S.left+=f,S.right-=f)),r.top&&(S.top-=r.top),r.bottom&&(S.bottom-=r.bottom),r.left&&(S.left-=r.left),r.right&&(S.right-=r.right));if(l){c=S.left;var T=S.right;e=S.bottom,h=S.top;(S.mag_t||S.mag_b)&&(S.pix_r?(T=Math.max(0,c<0?T+c:T),c+=S.right-T):(c=Math.max(0,T<0?T+c:c),T+=S.left-c)),(S.mag_l||S.mag_r)&&(S.pix_b?(e=Math.max(0,h<0?e+h:e),h+=S.bottom-e):(h=Math.max(0,e<0?e+h:h),e+=S.top-h)),S.left=c,S.right=T,S.top=h,S.bottom=e}if("cc"===s&&S.top<0&&(S.top=0),a){m=function(t){var e=Et(t);return e.right=Pt.clientWidth-e.right,e.bottom=Pt.clientHeight-e.bottom,e}(a);S.top-=m.top,S.left-=m.left,S.right-=m.right,S.bottom-=m.bottom}return S.width=t,S.height=e,S.target=i,S},snapTo:function(t,e){e.type?(e.pix_r?(t.style.right=e.right+"px",t.style.left=""):(t.style.left=e.left+"px",t.style.right=""),e.pix_b?(t.style.bottom=e.bottom+"px",t.style.top=""):(t.style.top=e.top+"px",t.style.bottom="")):function(t,e){if(!t||!e)return null;if("string"==typeof e){if(!(e.indexOf(":")>0))return t.style[e]||getComputedStyle(t,null)[e];for(var i,s,l=0,r=e.split(";"),a=r.length;l<a;l++)(i=Z(r[l],":"))&&(s=K(r[l],":"))&&Ct(t,i,s)}for(var l in e)Ct(t,l,e[l])}(t,e)}}),Nt.extend=function(t,...e){return e.forEach(e=>{if(e)for(let i in e)i in t||void 0===e[i]||(t[i]=e[i])}),t},Nt.extendDeep=function(t,...e){return e.forEach(e=>{if(null!=e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object)for(let i in e)i in t?null!=t[i]&&"object"==typeof t[i]&&"constructor"in t[i]&&t[i].constructor===Object&&Nt.extendDeep(t[i],e[i]):null!=e[i]&&"object"==typeof e[i]&&"constructor"in e[i]&&e[i].constructor===Object?Nt.extendDeep(t[i]={},e[i]):t[i]=e[i]}),t},Nt.merge=function(t,...e){return e.forEach(e=>{if(e)for(let i in e)t[i]=e[i]}),t},Nt.mergeDeep=function(t,...e){return e.forEach(e=>{if(null!=e)for(let i in e)"object"==typeof t[i]?Nt.mergeDeep(t[i],e[i]):t[i]=e[i]}),t},Nt.cloneDeep=t.cloneDeep,Nt.eval=function(t,e){if(e){let i=Object.keys(e);return Function(i.map(t=>t),`return (${t})`)(...i.map(t=>e[t]))}return Function(`return (${t})`)()},Nt.string=function(t){return null==t?"":"object"==typeof t?JSON.stringify(t):""+t},Nt.array=function(t){return Array.isArray(t)?t:null==t||""===t?[]:[t]},Nt.arrayID=function(t){return Array.isArray(t)?t:null==t||""===t?[]:"string"==typeof t?t.split(","):[t]},Nt.arrayNumber=function(t){return Nt.array(t).map(t=>parseFloat(t))};Nt.unitSize=function(t,e){return null==t||""===t||"*"===t?"":"auto"==t?"auto":isNaN(t)?t:e?t/e*100+"vw":`${t}px`},Nt.idsAdd=(t,e,i)=>{if(t=J(t),e=J(e),i=null==i?",":""+i,!t||!e)return t||e;for(var s=0,l=(e=e.split(i)).length;s<l;s++)(i+t+i).indexOf(i+e[s]+i)<0&&(t+=(t?i:"")+e[s]);return t},Nt.idsRemove=(t,e,i)=>{if(t=J(t),e=J(e),i=null==i?",":""+i,!t||!e)return t;for(var s,l=0,r=(e=e.split(i)).length;l<r;l++)do{(s=(i+t+i).indexOf(i+e[l]+i))>-1&&(t=t.slice(0,s?s-1:s)+t.slice(s+e[l].length+(s?0:1)))}while(t&&s>-1);return t},Nt.idsAny=(t,e,i)=>{if(""===t&&e===t)return!0;if(t=J(t),e=J(e),i=null==i?",":""+i,!t||!e)return!1;if(t==e)return!0;for(let s of e.split(i))if((i+t+i).indexOf(i+s+i)>-1)return!0;return!1},Nt.idsAll=(t,e,i)=>{if(""===t&&e===t)return!0;if(i=null==i?",":""+i,!(t=null==t?"":""+t))return!1;if(!(e=null==e?"":""+e)||t==e)return!0;for(let s of e.split(i))if((i+t+i).indexOf(i+s+i)<0)return!1;return!0},Nt.classAdd=function(t,e,i){if(!t)return;let s=t.className;if(e.indexOf(" ")>-1)for(let t=0,l=(e=Nt.strTrim(e).split(/ +/)).length;t<l;t++)s=(!1===i?Nt.idsRemove:Nt.idsAdd)(s,e[t]," ");else s=(!1===i?Nt.idsRemove:Nt.idsAdd)(s,e," ");t.className=s},Nt.classRemove=function(t,e){t&&(e.indexOf(" ")>-1?Nt.classAdd(t,e,!1):t.className=Nt.idsRemove(t.className,e," "))},Nt.classAny=function(t,e){if(!t)return;let i="string"==typeof t?t:t.className;if(!(e.indexOf(" ")>-1))return Nt.idsAny(i,e," ");for(let t=0,s=(e=$strTrim(e).split(/ +/)).length;t<s;t++)if(Nt.idsAny(i,e[t]," "))return t+1},Nt.urlEncode=t=>null==t?"":encodeURIComponent("object"==typeof t?JSON.stringify(t):t),Nt.urlDecode=t=>null==t?"":decodeURIComponent(t.replace(/\+/g," ")),Nt.urlFormat=(t,...e)=>(e.forEach((i,s)=>null!=i&&(t=Nt.strFormat(t,i,!0,s<e.length-1))),t),Nt.urlParam=function(t,e){var i=(a=t.split("#"))[0],s=a[1];if("string"==typeof e)return"#"===e?s||"":Nt.urlDecode((i.match(new RegExp("[\\?&]"+e+"=([^&]*)"),"g")||A)[1]);if(e&&"object"==typeof e)for(var l in e)if("#"===l)s=e[l];else{var r=Nt.urlEncode(e[l]);i=(c=new RegExp("\\b"+l+"=[^&]*")).test(i)?i.replace(c,l+"="+r):i+(i.indexOf("?")<0?"?":"&")+l+"="+r}else if(1===arguments.length){var a={};if(r=(r=i.split("?"))[r.length-1]){r=r.split("&");for(var o,n,h,c=0;c<r.length;c++)-1!=(o=r[c].indexOf("="))&&(n=r[c].substring(0,o),h=r[c].substring(o+1),a[n]=Nt.urlDecode(h.replace(/\+/g," ")))}return a}return i+(s?"#"+s:"")},Nt.urlServer=function(e,...i){if(e){if(!e.startsWith("http://")&&!e.startsWith("https://")){let i=t.get(Nt.x,"http.baseURL");i&&(e=i+(i.endsWith("/")?"":"/")+e)}return Nt.strFormat(e,...i)}},Nt.urlComplete=function(e){if(0!==e.indexOf("data:")){e=Nt.urlServer(e);let i=t.get(Nt.x,"http.params");i&&(e=Nt.urlParam(e,i))}return e},Nt.download=function(t,e){if(t=Nt.urlComplete(t),W.app)Nt.wifiConfirm(function(){let i=plus.downloader.createDownload(t,e);plus.nativeUI.showWaiting(),i.addEventListener("statechanged",function(t,e){switch(t.state){case 1:plus.nativeUI.toast(Nt.loc.download_start);break;case 4:200==e?(plus.nativeUI.toast(Nt.loc.download_complete),plus.runtime.openFile(t.filename,{},function(t){plus.nativeUI.alert(Nt.loc.download_cannotopen)})):plus.nativeUI.toast(Nt.loc.download_fail+e),plus.nativeUI.closeWaiting()}}),i.start()});else{let e=document.createElement("a");e.href=t,Nt.x.downloadTarget&&(e.target=Nt.x.downloadTarget),e.click(),e.remove()}},Nt.wifiConfirm=(t,e)=>{Nt.x.wifiConfirm&&3!=plus.networkinfo.getCurrentType()?plus.nativeUI.confirm(Nt.loc.connection_not_wifi,function(i){0===i.index&&t.call(e)},{buttons:[Nt.loc.confirm,Nt.loc.cancel]}):t.call(e)},Nt.vm=Nt.view=t=>t?"string"==typeof t&&Nt.vueMap.has(t)&&(t=Nt.vueMap.get(t)).isView?t:null!=(t=Nt(t))?t.isView?t:t.ownerView:void 0:Nt.docView,Nt.close=t=>{let e=Nt.dialog(t);e&&e.close()},Nt.closePopup=()=>{document.dispatchEvent(new Event("mousedown"))},Nt.previewVideo=function(t){Nt.vm().previewVideo(Nt.urlServer(t))},Nt.previewImage=function(t,e){t=Nt.array(t).map(t=>Nt.urlServer(t)),W.app?plus.nativeUI.previewImage(t,e):Nt.vm().previewImage(t,e)},Nt.slotsChildren=function(t,e="default"){let i=[];const s=t=>{t&&t.forEach(t=>{"symbol"==typeof t.type?Array.isArray(t.children)?s(t.children):"Symbol(v-txt)"===t.type.toString()&&i.push(t):i.push(t)})};return s(t[e]&&t[e]()),i},Nt.hasChild=function(e,i="default"){let s=!1;const l=e=>{t.forEach(e,t=>{if("symbol"!=typeof t.type)return!(s=!0);Array.isArray(t.children)&&l(t.children)})};return l(e[i]&&e[i]()),s},Nt.ease=function(t,e,i){t(0),null==e&&(e=200),null==i&&(i=Math.ceil(e/10));let s=Math.ceil(e/i),l=0,r=(new Date).getTime(),a=setInterval(function(){let e=(new Date).getTime()-r,o=Math.floor(e/s);l!=o&&(o<i?t(-Math.cos(o/i*Math.PI)/2+.5):(clearInterval(a),t(1)),l=o)},Math.max(s-10,5));return a},Nt.print=function(t,e){let i=Nt.el(t),s=i.ownerDocument,l=Nt.q("link[media=print]",s),r=[];e=e||{},Nt.q("meta",s).each(function(){r.push(this.outerHTML)}),(l.length>0?l:Nt.q("link",s)).each(function(){r.push('<link rel="stylesheet" type="text/css" href="'+this.getAttribute("href")+'"/>')}),Nt.q("style",s).each(function(){r.push(this.outerHTML)});let a=i.outerHTML;a=a.replace(/<div[^>]+w-scroll[^>]+>/gi,function(t){return t.replace(/height: \w+/gi,"")}),Nt.q(":text,:password,textarea,select",i).each(function(){let t,i=this.outerHTML;if(e.input2text){let e=Nt(this);e&&e.isFormWidget?(i=e.el("form").outerHTML,t=e.formText()):t=this.value,t='<div class="f-oh w-input-s">'+t+"</div>"}else t=i.replace('value="'+this.defaultValue+'"',()=>'value="'+this.value+'"');a=a.replace(i,()=>t+"")}),Nt.q(":radio,:checkbox",i).each(function(){if(e.input2text){let t=Nt(this);t&&t.isFormWidget&&(a=a.replace(t.el().outerHTML,()=>t.isChecked?'<div class="f-wdbr">'+t.text+"</div>":""))}else{let t=this.outerHTML,e=t.replace(/ checked=""/,"");this.checked&&(e=e.replace(/>$/," checked>")),a=a.replace(t,e)}}),e.input2text&&Nt.q("input[type=hidden]",i).each(function(){var t=Nt(this);t&&t.isFormWidget&&"w-hidden"!=t.$options.name&&(a=a.replace(t.el("form").outerHTML,()=>'<div class="f-wdbr f-print-input-text">'+t.formText()+"</div>"))}),Nt.q(".w-input-placeholder",i).each(function(){a=a.replace(this.outerHTML,"")});return s=!1!==e.print?function(){let t=window.frames.wPrintFrame;return t||(Nt.q("<div class=f-none><iframe name=wPrintFrame></iframe></div>").appendTo(document.body),t=window.frames.wPrintFrame),t}():window.open(),i=s.document,i.open("text/html","replace"),i.write("<!doctype html><html class=f-print><head><meta charset=utf-8><title>"+Nt.loc.print_preview+'</title><style>.f-print .w-f-remark{height:auto;line-height:inherit}.f-print-input-text{line-height: var(--w-label-min-height);}.w-input{display: flex!important;}.w-input-s{word-break:normal;white-space:normal}.w-input-s:empty:before{content:" "}</style><script>var $={e:function(){}}<\/script>'+r.join("")+(e.head||"")+"</head><body><div class=x-print>"+a+"</div>"+(!1!==e.print?"<script>window.print();window.close()<\/script>":"")+"</body></html>"),i.close(),i};const Yt=function(t,e){if(!t||t instanceof FormData)return t;return"application/x-www-form-urlencoded"==(Nt.lodash.get(e,'headers["Content-Type"]')||Nt.lodash.get(Nt.x,'http.headers.post["Content-Type"]'))?l.stringify(t,{arrayFormat:"repeat"}):t};function Bt(t,e){e.value?t.setAttribute("w-form-ignore",""):t.removeAttribute("w-form-ignore")}Nt.ajax=async function(t,e){let i=e?Nt.urlFormat(t.src,e):t.src;if(!i&&!t.request)return Promise.reject("$.ajax(): The first parameter must be an object, and the property(src) of the object is required.");let s=Nt.lodash.pick(t,["headers","responseType","transformRequest","transformResponse","timeout","cancelToken"]);if(t.download&&Nt.extend(s,{responseType:"blob"}),t.request)return t.request(t.data);{let e=(t.method||(t.data?"post":"get")).toLowerCase();return("post"===e||"put"===e||"patch"===e?Nt.http[e](i,Yt(t.data,s),s):Nt.http[e](i,s)).then(e=>{let i=e.data;if(t.filter&&(i=t.filter(e)),t.success&&t.success(i),t.complete&&t.complete(e),t.download){let t=e.headers["content-disposition"];if(t){let i=decodeURI(t.substring(t.indexOf("filename=")+9,t.length)),s=new Blob([e.data]),l=document.createElement("a");l.href=URL.createObjectURL(s),l.download=i,l.click(),l.remove()}else console.error("download: none content-disposition")}return i}).catch(e=>(t.error&&t.error(e),t.complete&&t.complete(e.response,e),Promise.reject(e)))}},Nt.extend(Nt.ajax,{get:(t,e)=>Nt.http.get(t,e).then(t=>t&&t.data),head:(t,e)=>Nt.http.head(t,e),delete:(t,e)=>Nt.http.delete(t,e).then(t=>t&&t.data),post:(t,e,i)=>Nt.http.post(t,Yt(e,i),i).then(t=>t&&t.data),put:(t,e,i)=>Nt.http.put(t,Yt(e,i),i).then(t=>t&&t.data),patch:(t,e,i)=>Nt.http.patch(t,Yt(e,i),i).then(t=>t&&t.data)},i),Nt.alert=function(t,e,i,s){return Nt.docView.pop("w-alert","object"==typeof t?{title:Nt.loc.opertip,...t}:{title:Nt.loc.opertip,text:t,position:e,timeout:i,yes:s})},Nt.confirm=function(t,e,i,s=!0){return Nt.docView.pop("w-confirm","object"==typeof t?{title:Nt.loc.opertip,...t}:{title:Nt.loc.opertip,text:t,yes:e,no:i,cover:s})},Nt.dialog=t=>{if(t){for(t=Nt.vm(t);t&&!t.isDialog;)t=t.ownerView;return t}},Nt.config=function(t){Nt.config_uid=Q(),Nt.mergeDeep(Nt.x,t),t.http&&(Nt.mergeDeep(i.defaults,t.http),i.interceptors.response.use(t.http.filter,t.http.error||function(t){return t.response&&(t.callback=()=>Nt.alert({icon:".f-i .f-i-alert-warning",text:t.response.status+": "+t.config.url})),Promise.reject(t)}));const e=Nt.x.defaultOptions;for(let t in e)if(t.includes(".")){let i=Nt.strFrom(t,".").replace(/\./g," "),s=Nt.strTo(t,".");(Nt.dfclsCache[s]||(Nt.dfclsCache[s]={}))[i]=e[t]}},Nt.pop=(t,e,i,s)=>(i?Nt(i):Nt.vm()).pop(t,e,{mode:s}),Nt.submit=(t,e={})=>(Nt(e.target)||Nt.vm()).submit(t,e),Nt.symbol={leafSymbol:Symbol("leaf"),changeSymbol:Symbol("change")},window.addEventListener("unhandledrejection",t=>{Nt.x.catchReject?Nt.x.catchReject(t):(t.reason&&(t.reason.callback?t.reason.callback():"string"==typeof t.reason&&console.error(t.reason)),t.preventDefault())});var Ot={created:Bt,updated:Bt};function jt(t){let e=Nt.dialog(t.currentTarget);if(e&&!1!==e.x.movable&&!e.x.fullScreen){let i,s=e.el(),l=s.style.left,r=s.style.right,a=s.style.top,o=s.style.bottom,n=o?-1:1,h=r?-1:1,c=n<0?"bottom":"top",u=h<0?"right":"left",d=t.clientX,p=t.clientY,m=Nt.number(n<0?o:a),f=Nt.number(h<0?r:l),x=document.documentElement.clientHeight,g=document.documentElement.clientWidth;Nt.moveup(function(t){i||(i=Nt.q("<div class=w-dialog-move-helper></div>").appendTo(document.body),e.el().style.transition="none");let s=Nt.numRange(t.clientX,0,g),l=Nt.numRange(t.clientY,0,x);e.setPosition({[c]:m+n*(l-p)+"px",[u]:f+h*(s-d)+"px"})},function(t,s){s&&i&&i.remove(),e.el().style.transition=""},t)}}var qt={mounted(t,e){e.value&&t.addEventListener("mousedown",jt)},unmounted(t){t.removeEventListener("mousedown",jt)}};function Rt(t,e){t.style.setProperty("--v-label-width",Nt.unitSize(e.value))}var Wt={created:Rt,updated:Rt};function Ut(t){t.directive("form-ignore",Ot),t.directive("dialog-move",qt),t.directive("label-width",Wt)}const Xt={};var Qt={props:["data","width","height","colspan","rowspan","ownproperty","orientUid"],data(){return{isWidget:!0,uid:this.orientUid||Nt.uid(),runtimeX:{}}},created(){Nt.vueMap.set(this.uid,this);let t=this.getDefaultProp(),e=Nt.config_uid,i={};this.x=new Proxy(this.runtimeX,{get:(i,s)=>s in i?i[s]:void 0!==this.$props[s]?this.$props[s]:(e!=Nt.config_uid&&(e=Nt.config_uid,t=this.getDefaultProp()),t[s]),set:(t,e,s)=>(i[e]||(i[e]=this.$watch(e,i=>t[e]=i)),t[e]=s,!0)})},unmounted(){Nt.vueMap.delete(this.uid)},methods:{x_default(){},getDefaultProp(){let t;if(!this.ownproperty){let e=this.$options.name;if(t=Nt.x.defaultOptions[e],Nt.dfclsCache[e]){let i,s=this.$options.name+(this.$attrs.class?" "+this.$attrs.class:""),l=Nt.dfclsCache[e];for(let t in l)Nt.idsAll(s,t," ")&&Nt.mergeDeep(i||(i={}),l[t]);i&&(t=Nt.extendDeep(i,t))}}return{...this.x_default(),...t}},attr(t,e){if(2!=arguments.length)return this.x[t];this.x[t]=e},ajax(t){return this.setLoading&&this.setLoading(),Nt.ajax(t).then(t=>(this.setLoading&&this.setLoading(!1),t))},submit(t,e){return"object"==typeof t&&(e=t,t=null),e||(e={}),t&&(e.request=t),new Promise(async t=>{await o();const i=Nt.vm(this);if(this.setLoading&&this.setLoading(),await i.valid(e.range,e.group)){let s=i.getPostData(e.range);e.data=e.data&&s?Nt.extend({},e.data,s):e.data||s,t(this.ajax(e))}else this.setLoading&&this.setLoading(!1)})},pop(t,e,i){return Nt.vm(this).createPop(this,t,e,i)},closePop(t){const e=Nt.vm(this);e.getPops(t).forEach(t=>e.removePop(t))},createEvent(t,e){return{type:t,uid:this.uid,...e}},trigger(t,...e){let i=t.runType||t.type||t,s=this.getOn(i);s&&("string"==typeof t&&(t=this.createEvent(t)),Array.isArray(s)?s.forEach(i=>i(t,...e)):s(t,...e))},getOn(t){let e="on"+t.charAt(0).toUpperCase()+t.slice(1);return this.$.vnode.props&&this.$.vnode.props[e]||this.x[e]},getKey(){return this.$.vnode.key},closest(t,e){let i=this;const s=typeof t;do{if("string"===s){if(Nt.idsAny(t,i.$options.name))return i}else if("function"===s&&t(i))return i;if(i.isDialog||i==e)return}while(i=i.$parent)},contains(t){return t&&this.el()&&this.el().contains(t.isWidget?t.el():t)},el(t){if(t&&/\W/.test(t)){const e=this.el();return e&&Nt.q(t,e)[0]}return document.getElementById(this.uid+(t||""))},snapElem(){return this.el()},scrollIntoView(t=!1){const e=(e,i)=>{let s="hasScroll"+e.toUpperCase(),l=this.closest(t=>t[s]&&(t.scrollState()||!1)[e]);l?l.scrollTo(this,t.hasOwnProperty("y")?t.y:"auto",t.x,null==t.ease?200:t.ease,t.divide,i):i&&i()};e("y",()=>e("x",t.success))},hasBubble(t){if(!t)return!1;if(this.contains(t))return!0;let e=Nt.dialog(t);return e&&e.commander?e.commander===t||this.hasBubble(e.commander):void 0},bind(t,e){let i=Xt[this.uid]||(Xt[this.uid]={});return i[t]||(i[t]=e||this[t]),i[t]},slots_children(t){return Nt.slotsChildren(this.$slots,t)},slot(t="default"){return this.$slots[t]?this.$slots[t]():[]},html_icon(t,e,i){const s=t.startsWith(".")&&!t.includes("/"),l=this.$.vnode.scopeId||"";return s?a("i",{[`${l}`]:"",class:[e,t.replace(/\./g,"")],onclick:i}):a("img",{src:t,onclick:i,class:e,[`${l}`]:""})},html_slots(){return this.$slots},html_self(t){return a(this.tagName||"div",t?r(this.html_attrs,this.html_props,this.$attrs):r(this.html_attrs,this.html_props),this.html_slots())},html(){return this.html_self()}},computed:{dfish:()=>Nt,ownerView(){let t=this.provideView;for(;t&&!t.isView;)t=t.provideView;return t},pubParent(){return this.providePubParent&&Nt.idsAny(this.$options.pubParentName,this.providePubParent.$options.name)&&this.providePubParent},parentNode(){return Nt(this.el().parentElement)},tagName:()=>"div",html_attrs(){return{id:this.uid,class:[this.$options.name,this.html_class],style:[{width:this.x.width&&Nt.unitSize(this.x.width),height:this.x.height&&Nt.unitSize(this.x.height),"--w-grid-colspan":this.x.colspan&&-1!=this.x.colspan?`span ${this.x.colspan}`:null,"--w-grid-rowspan":this.x.rowspan&&-1!=this.x.rowspan?`span ${this.x.rowspan}`:null},this.html_style],"w-key":this.getKey(),"w-width":"*"===this.x.width?"*":null,"w-height":"*"===this.x.height?"*":null}},html_style(){},html_class(){},html_props(){},html_binds(){return r(this.html_attrs,this.html_props,this.$attrs)}},render(){return this.html()},__file:"src/widgets/WidgetAbs.vue"},Gt={props:["src","children","parentItem"],data:()=>({loading:!1,loaded:!1}),methods:{getSrc(){return(this.x||this.$props).src},request(t){let e=this.getSrc();if(e&&!this.loading&&(this.showLoading(!0),"function"==typeof e))return e(this).then(e=>{this.showLoading(!1),this.loaded=!0,t&&t()}).catch(t=>{this.showLoading(!1),this.loaded=!0})},showLoading(t){this.loading=t}},__file:"src/widgets/SrcParent.vue"},Jt={name:"w-view",mixins:[Gt],provide(){return{provideView:this}},props:["commands"],data:()=>({isView:!0,pops:[]}),beforeCreate(){this.popCommanders={}},methods:{find(t){const e=this.el().querySelectorAll(`[w-key="${t}"]`);for(let t of e)if((t=Nt(t))&&t.ownerView===this)return t},fv(t,e){let i=this.f(t);if(2===arguments.length)i&&(i.groupFormVal?i.groupFormVal(e):i.val(e));else{if("object"!=typeof t)return i&&(i.groupFormVal?i.groupFormVal():i.formVal());for(let e in t)this.fv(e,t[e])}},f(t,e){return this.fAll(t,e)[0]},fAll(t,e){if("*"===t||null==t){for(var i,s,l=0,r=this.getFormList(e,!0),a=r.length,o=[];l<a;l++)(i=Nt(r[l]))&&i!=s&&o.push(s=i);return o}let n=e?e.isWidget?e.el():e:this.el(),h=Nt.q(':input[name="'+t+'"]',n);return h.length||(h=Nt.q(':input[w-name="'+t+'"]',n)),Nt.lodash.map(h.not("[w-form-ignore] :input"),t=>Nt(t))},getFormList(t,e){let i,s=":input:not(button)"+(e?"":":not(:disabled)");if(t&&"string"==typeof t){let e="!"===t.charAt(0),l=t.replace(/\!/g,"").split(",").map(t=>`[w-key="${t}"] ${s}`);(l=l.join())&&(i=Nt.q(e?`${s}:not(${l})`:l,this.el()))}else i=Nt.q(s,Array.isArray(t)?Nt.q(t.map(t=>Nt.el(t))):t?Nt.el(t):this.el());return i?Nt.lodash.map(i.not("[w-form-ignore] :input")):[]},getPostData(t){let e={};return this.getFormList(t).forEach(t=>{let i=t.name,s=t.value;if(i){switch(t.type){case"text":"number"===t.getAttribute("w-valuetype")&&(s=s.replace(/[^\d\.-]/g,""));break;case"checkbox":if(!(t.value&&(t.checked||t.indeterminate&&t.getAttribute("w-partialsubmit"))))return null;break;case"radio":if(!t.value||!t.checked)return null;i=t.getAttribute("w-name")||i;break;case"select-one":if(t.selectedIndex<0)return null}s&&(s=Nt.strTrim(s)),i in e?(Array.isArray(e[i])||(e[i]=[e[i]]),e[i].push(s)):e[i]=s}}),e},async getValidError(t){let e,i=this.getFormList(t);const s={};for(let t,l,r=0,a=i.length;r<a;r++)(t=Nt(i[r]))&&t.isFormWidget&&(l=i[r].name in s?s[i[r].name]&&Nt.extend({wid:t.uid},s[i[r].name]):await t.getValidError(),l&&(e||(e=[]),e.find(t=>t.wid==l.wid)||e.push(l))),"checkbox"!==i[r].type&&"radio"!==i[r].type||(s[i[r].name]=l);return e},async valid(t){this._err_ns&&this._err_ns.forEach(t=>{const e=Nt.vueMap.get(t.wid);e&&e.warn(!1)});let e=await this.getValidError(t);return e&&(e.forEach(t=>Nt.vueMap.get(t.wid).warn()),Nt.vueMap.get(e[0].wid).showErrorTip(e[0].text)),!(this._err_ns=e)},isModified(t,e){return this.getFormList(t).find(t=>(t=Nt(t)).isModified&&t.isModified(e))},saveModified(t,e){this.getFormList(t).forEach(t=>(t=Nt(t)).saveModified&&t.saveModified(e))},resetFormStyle(t){this.getFormList(t).forEach(t=>{const e=Nt(t);e.warn&&e.warn(!1)})},resetForm(t,e){this.getFormList(t).forEach(t=>{const i=Nt(t);i.reset&&i.reset(e)})},showLoading(t){if(!1!==t)return this.pop("w-loading",{cover:!0,local:!0,...t});this.pop("w-loading",!1)},createPop(t,e,i,s={}){return new Promise((l,r)=>{const a=s.mode||"multiple",o=this.getPops(e)[0];if(o){if("component"===a)return void Object.assign(o,{props:i,options:s,resolve:l,reject:r});if("single"===a){let t=this.pops.indexOf(o);this.pops.splice(t,1)}}const n=Nt.uid();this.pops.push({commander:t,template:e,props:i,options:s,orientUid:n,resolve:l,reject:r})})},removePop(t){let e="string"==typeof t?this.pops.findIndex(e=>e.orientUid==t):this.pops.indexOf(t);e>-1&&this.pops.splice(e,1)},getPops(t,e){return this.pops.filter(i=>(!t||h(i.template)==h(t))&&(!e||i.commander==e))},getPopById(t){return this.pops.find(e=>e.orientUid==t)},html_pops(){return this.pops.map(({template:t,orientUid:e,props:i})=>{const s="string"==typeof t?n(t):h(t);return s&&a(s,{key:e,orientUid:e,...i})})}},__file:"src/widgets/ViewAbs.vue"},Kt={name:"SVGIcon"};const Zt={style:{display:"none",width:"0",height:"0"},width:"0",height:"0",focusable:"false","aria-hidden":"true"};Kt.render=function(t,e,i,s,l,r){return u(),c("svg",Zt,e[0]||(e[0]=[d('<symbol id="f-svg-loading" viewBox="0 0 50 50"><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" transform="rotate(86.9154 25 25)"></path></symbol><symbol id="f-svg-loading-1" viewBox="0 0 50 50"><circle cx="25" cy="25" r="20"></circle></symbol><symbol id="f-svg-loading-2" viewBox="0 0 24 30"><rect x="0" y="8.66115" width="4" height="12.6777" opacity="0.2"><animate attributeName="opacity" values="0.2; 1; .2" begin="0s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="height" values="10; 20; 10" begin="0s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" values="10; 5; 10" begin="0s" dur="0.6s" repeatCount="indefinite"></animate></rect><rect x="8" y="6.16115" width="4" height="17.6777" opacity="0.2"><animate attributeName="opacity" values="0.2; 1; .2" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="height" values="10; 20; 10" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" values="10; 5; 10" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate></rect><rect x="16" y="6.33885" width="4" height="17.3223" opacity="0.2"><animate attributeName="opacity" values="0.2; 1; .2" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="height" values="10; 20; 10" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" values="10; 5; 10" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate></rect></symbol>',3),p("symbol",{id:"f-svg-loading-3",viewBox:"0 0 1024 1024"},[p("path",{d:"M514.048 337.715a32 32 0 0 1-32-32V135.168a32 32 0 1 1 64 0v170.534a32 32 0 0 1-32 32z m-1.28 581.799a32 32 0 0 1-32-32V714.406a32 32 0 1 1 64 0v173.095a32 32 0 0 1-32 32zM305.011 543.347H135.744a32 32 0 0 1 0-64h169.267a32 32 0 0 1 0 64z m583.079 0H713.83a32 32 0 0 1 0-64h174.26a32 32 0 1 1 0 64zM245.978 806.4a32 32 0 0 1-22.656-54.669L342.643 632.32a32 32 0 0 1 45.325 45.325L268.646 796.979a31.898 31.898 0 0 1-22.668 9.344z m408.435-408.5a32 32 0 0 1-22.656-54.68l123.558-123.56a32 32 0 1 1 45.325 45.3L677.12 388.544a31.898 31.898 0 0 1-22.669 9.357z m121.523 411.06a31.885 31.885 0 0 1-22.669-9.344l-122.15-122.15a32 32 0 1 1 45.325-45.325l122.15 122.15a32 32 0 0 1-22.656 54.669zM364.672 397.632a31.923 31.923 0 0 1-22.669-9.344L221.273 267.52a32 32 0 1 1 45.325-45.325l120.73 120.743a32 32 0 0 1-22.656 54.668z m0 0","p-id":"4486"})],-1)]))},Kt.__file="src/assets/SVGIcon.vue";var te={props:["data"],data(){return{rotate:{},current:Nt.lodash.get(this.data,"options.current",0)}},methods:{close(){Nt.close(this)},rot(t){let e=this.$refs.swiper.focusIndex,i=this.rotate[e];null==i&&(i=this.rotate[e]=0);let s=this.$refs.swiper.getCurrentItem().el(),l=Nt.bcr(s),r=l.width-40,a=l.height-80;t>0?i+=90:t<0&&(i-=90);let o=i/90%2;Nt.q("._img",s).css({transform:"rotate("+i+"deg)",maxWidth:o?a:r,maxHeight:o?r:a}),this.rotate[e]=i}},computed:{loc:()=>Nt.loc},mounted(){}};const ee={class:"f-height f-rel f-oh"},ie=["src"],se={class:"_rotate"};te.render=function(t,e,i,s,l,r){const a=n("w-swiper-item"),o=n("w-swiper"),h=n("w-video"),d=n("w-dialog");return u(),m(d,{class:"f-dialog-preview",width:"calc(100% - 100px)",height:"calc(100% - 100px)",ownproperty:!0,cover:!0,autoHide:!0},{default:f(()=>["image"==i.data.type?(u(),c(x,{key:0},[g(o,{ref:"swiper",class:"f-height",current:l.current,arrow:i.data.imgs.length>1,"indicator-dots":i.data.imgs.length>1,duration:"300"},{default:f(()=>[(u(!0),c(x,null,v(i.data.imgs,(t,e)=>(u(),m(a,{key:e},{default:f(()=>[p("div",ee,[p("img",{class:"_img",src:t},null,8,ie)])]),_:2},1024))),128))]),_:1},8,["current","arrow","indicator-dots"]),p("div",se,[p("a",{class:"_l",onClick:e[0]||(e[0]=t=>r.rot(-1))},w(r.loc.rotate_left),1),e[3]||(e[3]=p("span",{class:"_s"},"|",-1)),p("a",{class:"_r",onClick:e[1]||(e[1]=t=>r.rot(1))},w(r.loc.rotate_right),1)])],64)):(u(),m(h,{key:1,class:"f-height",src:i.data.src},null,8,["src"])),p("div",{class:"_dlg_x",onClick:e[2]||(e[2]=(...t)=>r.close&&r.close(...t))})]),_:1})},te.__file="src/template/TemplatePreviewMedia.vue";var le={props:["data"],data(){let t=this.data.format||"yyyy-MM-dd",e=this.data&&this.data.value?Nt.dateParse(this.data.value,t):new Date,i=this.data&&this.data.minValue&&Nt.dateParse(this.data.minValue,t),s=this.data&&this.data.maxValue&&Nt.dateParse(this.data.maxValue,t);e=Nt.numRange(e,i,s);let l,r,a,o=e.getFullYear();return t.includes("w")&&(l=Nt.dateWeek(e)[1],r=Nt.dateWeekFirst(o),a=Nt.dateWeekLast(o)),{focusYear:o,focusMonth:e.getMonth(),focusDate:e.getDate(),focusHour:e.getHours(),focusMinute:e.getMinutes(),focusSecond:e.getSeconds(),startYear:Nt.numRange(e.getFullYear()-30,i&&i.getFullYear()),endYear:Nt.numRange(e.getFullYear()+30,null,s&&s.getFullYear()),monthDays:new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),focusWeek:l,weekFirst:r,weekLast:a,minTime:i,maxTime:s,format:t}},watch:{focusYear(t){t==this.yearList[0]&&t>1030?this.startYear=Nt.numRange(this.startYear-30,this.minYear):t==this.yearList.at(-1)&&(this.endYear=Nt.numRange(this.endYear+30,null,this.maxYear)),this.monthDays=new Date(t,this.focusMonth+1,0).getDate(),this.hasWeek&&(this.weekFirst=Nt.dateWeekFirst(t),this.weekLast=Nt.dateWeekLast(t))},focusMonth(t){this.monthDays=new Date(this.focusYear,t+1,0).getDate()}},methods:{weekText(t){},clickCancel(){Nt.close(this)},clickOK(t){if(this.data.success){let e=this.hasWeek?Nt.dateParse(`${this.focusYear}-${this.focusWeek}`,"yyyy-ww"):new Date(this.focusYear,this.focusMonth,this.focusDate,this.focusHour,this.focusMinute,this.focusSecond);this.data.success(Nt.dateFormat(e,this.format),t)}Nt.close(this)}},computed:{dfish:()=>Nt,yearList(){return Array.from(Array(this.endYear-this.startYear+1)).map((t,e)=>this.startYear+e)},monthList:()=>Array.from(Array(12)).map((t,e)=>e),dateList(){return Array.from(Array(this.monthDays)).map((t,e)=>e+1)},hourList:()=>Array.from(Array(24)).map((t,e)=>e),minuteList:()=>Array.from(Array(60)).map((t,e)=>e),secondList:()=>Array.from(Array(60)).map((t,e)=>e),weekList(){let t=this.weekFirst[2];return Array.from(Array(this.weekLast[1])).map((e,i)=>{let s=t,l=Nt.dateAdd(t,"d",6);return t=Nt.dateAdd(t,"d",7),{value:i+1,text:`${Nt.strPad(i+1)} (${Nt.dateFormat(s,"MM.dd")} - ${Nt.dateFormat(l,"MM.dd")})`}})},hasYear(){return this.format.includes("y")},hasMonth(){return this.format.includes("M")},hasDate(){return this.format.includes("d")},hasHour(){return this.format.includes("H")},hasMinute(){return this.format.includes("m")},hasSecond(){return this.format.includes("s")},hasWeek(){return this.format.includes("w")},minYear(){return this.minTime&&this.hasYear&&this.minTime.getFullYear()},maxYear(){return this.maxTime&&this.hasYear&&this.maxTime.getFullYear()},minMonth(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&this.minTime.getMonth()},maxMonth(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&this.maxTime.getMonth()},minDate(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&this.minTime.getDate()},maxDate(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&this.maxTime.getDate()},minHour(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&(!this.hasDate||this.minDate==this.focusDate)&&this.minTime.getHours()},maxHour(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&(!this.hasDate||this.maxDate==this.focusDate)&&this.maxTime.getHours()},minMinute(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&(!this.hasDate||this.minDate==this.focusDate)&&(!this.hasHour||this.minHour==this.focusHour)&&this.minTime.getMinutes()},maxMinute(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&(!this.hasDate||this.maxDate==this.focusDate)&&(!this.hasHour||this.maxHour==this.focusHour)&&this.maxTime.getMinutes()},minSecond(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&(!this.hasDate||this.minDate==this.focusDate)&&(!this.hasHour||this.minHour==this.focusHour)&&(!this.hasMinute||this.minMinute==this.focusMinute)&&this.minTime.getSeconds()},maxSecond(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&(!this.hasDate||this.maxDate==this.focusDate)&&(!this.hasHour||this.maxHour==this.focusHour)&&(!this.hasMinute||this.maxMinute==this.focusMinute)&&this.maxTime.getSeconds()},minWeek(){},maxWeek(){}}};le.render=function(t,e,i,s,l,r){const a=n("w-button"),o=n("w-buttonbar"),h=n("w-html"),d=n("w-option"),p=n("w-slidepicker"),w=n("w-vertical"),y=n("w-horizontal"),k=n("w-dialog");return u(),m(k,{class:"f-datesheet"},{default:f(()=>[g(o,{class:"f-datesheet-bbr",align:"between",height:"52",style:{padding:"0 10px"}},{default:f(()=>[g(a,{text:"取消",onClick:r.clickCancel},null,8,["onClick"]),g(a,{text:"确定",onClick:r.clickOK,face:"primary"},null,8,["onClick"])]),_:1}),g(y,{height:"*"},{default:f(()=>[r.hasYear?(u(),m(w,{key:0,width:"*"},{default:f(()=>[g(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:f(()=>e[7]||(e[7]=[_("年")])),_:1,__:[7]}),g(p,{height:"*",modelValue:l.focusYear,"onUpdate:modelValue":e[0]||(e[0]=t=>l.focusYear=t),"min-value":r.minYear,"max-value":r.maxYear,"keep-index":!0,data:{mode:"year"}},{default:f(()=>[(u(!0),c(x,null,v(r.yearList,t=>(u(),m(d,{key:t,value:t,text:t},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):b("v-if",!0),r.hasMonth?(u(),m(w,{key:1,width:"*"},{default:f(()=>[g(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:f(()=>e[8]||(e[8]=[_("月")])),_:1,__:[8]}),g(p,{height:"*",modelValue:l.focusMonth,"onUpdate:modelValue":e[1]||(e[1]=t=>l.focusMonth=t),"min-value":r.minMonth,"max-value":r.maxMonth,"keep-index":!0,data:{mode:"month"}},{default:f(()=>[(u(!0),c(x,null,v(r.monthList,t=>(u(),m(d,{key:t,value:t,text:r.dfish.strPad(t+1)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):b("v-if",!0),r.hasDate?(u(),m(w,{key:2,width:"*"},{default:f(()=>[g(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:f(()=>e[9]||(e[9]=[_("日")])),_:1,__:[9]}),g(p,{height:"*",modelValue:l.focusDate,"onUpdate:modelValue":e[2]||(e[2]=t=>l.focusDate=t),"min-value":r.minDate,"max-value":r.maxDate,"keep-index":!0,data:{mode:"date"}},{default:f(()=>[(u(!0),c(x,null,v(r.dateList,t=>(u(),m(d,{key:t,value:t,text:r.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):b("v-if",!0),r.hasHour?(u(),m(w,{key:3,width:"*"},{default:f(()=>[g(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:f(()=>e[10]||(e[10]=[_("时")])),_:1,__:[10]}),g(p,{height:"*",modelValue:l.focusHour,"onUpdate:modelValue":e[3]||(e[3]=t=>l.focusHour=t),"min-value":r.minHour,"max-value":r.maxHour,"keep-index":!0},{default:f(()=>[(u(!0),c(x,null,v(r.hourList,t=>(u(),m(d,{key:t,value:t,text:r.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):b("v-if",!0),r.hasMinute?(u(),m(w,{key:4,width:"*"},{default:f(()=>[g(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:f(()=>e[11]||(e[11]=[_("分")])),_:1,__:[11]}),g(p,{height:"*",modelValue:l.focusMinute,"onUpdate:modelValue":e[4]||(e[4]=t=>l.focusMinute=t),"min-value":r.minMinute,"max-value":r.maxMinute,"keep-index":!0},{default:f(()=>[(u(!0),c(x,null,v(r.minuteList,t=>(u(),m(d,{key:t,value:t,text:r.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):b("v-if",!0),r.hasSecond?(u(),m(w,{key:5,width:"*"},{default:f(()=>[g(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:f(()=>e[12]||(e[12]=[_("秒")])),_:1,__:[12]}),g(p,{height:"*",modelValue:l.focusSecond,"onUpdate:modelValue":e[5]||(e[5]=t=>l.focusSecond=t),"min-value":r.minSecond,"max-value":r.maxSecond,"keep-index":!0},{default:f(()=>[(u(!0),c(x,null,v(r.secondList,t=>(u(),m(d,{key:t,value:t,text:r.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):b("v-if",!0),r.hasWeek?(u(),m(w,{key:6,width:"*"},{default:f(()=>[g(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:f(()=>e[13]||(e[13]=[_("周")])),_:1,__:[13]}),g(p,{height:"*",modelValue:l.focusWeek,"onUpdate:modelValue":e[6]||(e[6]=t=>l.focusWeek=t),"min-value":r.minWeek,"max-value":r.maxWeek,"keep-index":!0},{default:f(()=>[(u(!0),c(x,null,v(r.weekList,t=>(u(),m(d,{key:t.value,value:t.value,text:t.text},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):b("v-if",!0)]),_:1})]),_:1})},le.__file="src/template/TemplateDateSheet.vue";var re={name:"w-docview",mixins:[Qt,Jt],provide:()=>({providePubParent:null,provideBoxParent:null,provideRangeParent:null,provideCompatGap:null,provideMenu_w:null,provideTripleboxContainer:null}),beforeCreate(){Nt.docView=this,Nt.q(document.body).prepend("<div id=w-dfish-pops></div>")},methods:{el:()=>document.getElementById("app")||document.body,getKey:()=>null,previewVideo(t){this.pop(te,{data:{type:"video",src:t}})},previewImage(t,e){this.pop(te,{data:{type:"image",imgs:t,options:e}})},dateSheet(t,e){this.pop(le,{template:le,width:"100%",height:"55%",position:"b",cover:!0,autoHide:!0,data:t,on:{"click:cover":Nt.close}})},html(){return[this.$slots.default?this.$slots.default():null,this.html_pops(),a(Kt)]}},__file:"src/widgets/DocView.vue"},ae=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var i=-1;return t.some(function(t,s){return t[0]===e&&(i=s,!0)}),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var i=t(this.__entries__,e),s=this.__entries__[i];return s&&s[1]},e.prototype.set=function(e,i){var s=t(this.__entries__,e);~s?this.__entries__[s][1]=i:this.__entries__.push([e,i])},e.prototype.delete=function(e){var i=this.__entries__,s=t(i,e);~s&&i.splice(s,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var i=0,s=this.__entries__;i<s.length;i++){var l=s[i];t.call(e,l[1],l[0])}},e}()}(),oe="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,ne="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),he="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(ne):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)};var ce=["top","right","bottom","left","width","height","size","weight"],ue="undefined"!=typeof MutationObserver,de=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var i=!1,s=!1,l=0;function r(){i&&(i=!1,t()),s&&o()}function a(){he(r)}function o(){var t=Date.now();if(i){if(t-l<2)return;s=!0}else i=!0,s=!1,setTimeout(a,e);l=t}return o}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,i=e.indexOf(t);~i&&e.splice(i,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),t.length>0},t.prototype.connect_=function(){oe&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ue?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){oe&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=void 0===e?"":e;ce.some(function(t){return!!~i.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),pe=function(t,e){for(var i=0,s=Object.keys(e);i<s.length;i++){var l=s[i];Object.defineProperty(t,l,{value:e[l],enumerable:!1,writable:!1,configurable:!0})}return t},me=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||ne},fe=_e(0,0,0,0);function xe(t){return parseFloat(t)||0}function ge(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduce(function(e,i){return e+xe(t["border-"+i+"-width"])},0)}function ve(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return fe;var s=me(t).getComputedStyle(t),l=function(t){for(var e={},i=0,s=["top","right","bottom","left"];i<s.length;i++){var l=s[i],r=t["padding-"+l];e[l]=xe(r)}return e}(s),r=l.left+l.right,a=l.top+l.bottom,o=xe(s.width),n=xe(s.height);if("border-box"===s.boxSizing&&(Math.round(o+r)!==e&&(o-=ge(s,"left","right")+r),Math.round(n+a)!==i&&(n-=ge(s,"top","bottom")+a)),!function(t){return t===me(t).document.documentElement}(t)){var h=Math.round(o+r)-e,c=Math.round(n+a)-i;1!==Math.abs(h)&&(o-=h),1!==Math.abs(c)&&(n-=c)}return _e(l.left,l.top,o,n)}var we="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof me(t).SVGGraphicsElement}:function(t){return t instanceof me(t).SVGElement&&"function"==typeof t.getBBox};function be(t){return oe?we(t)?function(t){var e=t.getBBox();return _e(0,0,e.width,e.height)}(t):ve(t):fe}function _e(t,e,i,s){return{x:t,y:e,width:i,height:s}}var ye=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=_e(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=be(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),ke=function(t,e){var i,s,l,r,a,o,n,h=(s=(i=e).x,l=i.y,r=i.width,a=i.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,n=Object.create(o.prototype),pe(n,{x:s,y:l,width:r,height:a,top:l,right:s+r,bottom:a+l,left:s}),n);pe(this,{target:t,contentRect:h})},Se=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new ae,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof me(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new ye(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof me(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new ke(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Te="undefined"!=typeof WeakMap?new WeakMap:new ae,Ce=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=de.getInstance(),s=new Se(e,i,this);Te.set(this,s)};["observe","unobserve","disconnect"].forEach(function(t){Ce.prototype[t]=function(){var e;return(e=Te.get(this))[t].apply(e,arguments)}});var Me=void 0!==ne.ResizeObserver?ne.ResizeObserver:Ce,Ve={mixins:[Qt],inject:["provideView"],__file:"src/widgets/WidgetBase.vue"};const Pe=function(t){if(this.wScrollPercentX){let e=t.target.scrollLeft;this.scrollXPosition=0==e?"left":e>=this.wScrollSizeX?"right":"center",this.el("wScrollBarThumbX").style.transform=`translateX(${e/this.wScrollPercentX}px)`}if(this.wScrollPercentY){let e=t.target.scrollTop;this.scrollYPosition=0==e?"top":e>=this.wScrollSizeY?"bottom":"middle",this.el("wScrollBarThumbY").style.transform=`translateY(${e/this.wScrollPercentY}px)`}this.onScroll(t)},$e=function(t){let e,i,s,l,r,a=this.el("wScrollOverflow"),o=this.wScrollPercentX,n=this.wScrollPercentY;Nt.moveup(h=>{e||(e=this.el("wScrollBarThumbX")===t.target?"X":"Y",i=t.clientX,s=t.clientY,l=a.scrollLeft,r=a.scrollTop,t.target.parentNode.classList.add("z-drag")),"X"===e?a.scrollLeft=l+(h.clientX-i)*o:a.scrollTop=r+(h.clientY-s)*n},(e,i)=>{i&&t.target.parentNode.classList.remove("z-drag")},t)};var ze={mixins:[Ve],props:["scrollX","scrollY","scrollView","scrollFlex"],emits:["scroll","resize"],data:()=>({wScrollPercentX:!1,wScrollPercentY:!1,wScrollSizeX:!1,wScrollSizeY:!1,scrollXPosition:"left",scrollYPosition:"top",isDeactivated:!1}),watch:{scrollXPosition(t){this.onScrollPosition(t)},scrollYPosition(t){this.onScrollPosition(t)},wScrollPercentX(t){let e=this.el();e&&(t?e.setAttribute("w-scroll-show-x",""):e.removeAttribute("w-scroll-show-x"))},wScrollPercentY(t){let e=this.el();e&&(t?e.setAttribute("w-scroll-show-y",""):e.removeAttribute("w-scroll-show-y"))}},methods:{onScroll(t){this.$emit("scroll",t)},onScrollPosition(){},onScrollAttributeChange(t){},onScrollResize(){},scrollTo(t,e,i,s,l,r){let a=this.ovf();if(!a)return r&&r();let o,n,h=this.el("wScrollCont")||a,c=Nt.bcr(a),u=Nt.bcr(h),d=t?Nt.bcr(t):u;if(null!=e)if(isNaN(e))if(~e.indexOf("top")){o=0;let t=i.slice(3);t&&(o=a.scrollTop+ +t)}else if(~e.indexOf("bottom"))o=d.bottom-u.top-c.height+ +e.slice(6);else if("middle"===e)o=d.top-u.top-(c.height/2-d.height/2);else if("nearest"===e){let t=i.slice(7);t=t?t.split(","):[0,0],d.top-t[0]<c.top?o=a.scrollTop-c.top+d.top-t[0]:d.bottom>c.bottom-t[1]&&(o=a.scrollTop+d.bottom-c.bottom+ +t[1])}else(d.top<c.top||d.bottom>c.bottom)&&(o=d.top-u.top-(c.height/2-d.height/2));else o=Nt.number(e),t&&(o=d.top-u.top-o);if(null!=i)if(isNaN(i))if(~i.indexOf("left")){n=0;let t=i.slice(4);t&&(n=a.scrollLeft+ +t)}else if(~i.indexOf("right"))n=d.right-u.left-c.width+ +i.slice(5);else if("center"===i)n=d.left-u.left-(c.width/2-d.width/2);else if(~i.indexOf("nearest")){let t=i.slice(7);t=t?t.split(","):[0,0],d.left-t[0]<c.left?n=a.scrollLeft-c.left+d.left-t[0]:d.right>c.right-t[1]&&(n=a.scrollLeft+d.right-c.right+ +t[1])}else(d.left<c.left||d.right>c.right)&&(n=d.left-u.left-(c.width/2-d.width/2));else n=Nt.number(i),t&&(n=d.left-u.left-n);if(null!=l&&(null!=o&&(o-=o%l),null!=n&&(n-=n%l)),!s||null==o&&null==n)null!=o&&(a.scrollTop=o),null!=n&&(a.scrollLeft=n),r&&r();else{let t=a.scrollTop,e=a.scrollLeft;Nt.ease(i=>{null!=o&&(a.scrollTop=t+(o-t)*i),null!=n&&(a.scrollLeft=e+(n-e)*i),1===i&&r&&r()},s)}},scrollToY(t,e,i,s,l){if(0===arguments.length)return this.ovf().scrollTop;"object"!=typeof t&&(l=s,s=i,i=e,e=t,t=null),"function"==typeof s&&(l=s,s=null),this.scrollTo(t,e,null,i,s,l)},scrollToX(t,e,i,s,l){if(0===arguments.length)return this.ovf().scrollLeft;"object"!=typeof t&&(l=s,s=i,i=e,e=t,t=null),"function"==typeof s&&(l=s,s=null),this.scrollTo(t,null,e,i,s,l)},ovf(){return Nt.br.mobile?this.el():this.el("wScrollOverflow")||this.el("wScrollCont")},html_scroll_slots(t){return this.hasScrollX||this.hasScrollY?[a("div",{id:this.uid+"wScrollOverflow",class:"w-scroll-overflow",onscroll:Pe.bind(this),onmouseenter:this.initScroll},a("div",{class:"w-scroll-cont",style:this.html_scroll_cont_style,id:this.uid+"wScrollCont"},t||this.$slots.default&&this.$slots.default())),!Nt.br.mobile&&this.hasScrollX&&[a("div",{class:"w-scrollbar-x",id:this.uid+"wScrollBarX",onmousedown:$e.bind(this)},a("div",{class:"w-scrollbar-thumb",id:this.uid+"wScrollBarThumbX"}))],!Nt.br.mobile&&this.hasScrollY&&[a("div",{class:"w-scrollbar-y",id:this.uid+"wScrollBarY",onmousedown:$e.bind(this)},a("div",{class:"w-scrollbar-thumb",id:this.uid+"wScrollBarThumbY"}))]]:t||this.$slots.default&&this.$slots.default()},scrollState(){if(Nt.br.mobile||!this.el("wScrollCont")||!this.el())return;const t=this.el("wScrollOverflow").getBoundingClientRect(),e=this.el("wScrollCont").getBoundingClientRect();let i,s;if(this.hasScrollX){let s=e.width>t.width&&e.width-t.width;s&&s<=1&&(s=!1),s&&(i={size:s,percent:t.width/e.width})}if(this.hasScrollY){let i=e.height>t.height&&e.height-t.height;i&&(s={size:i,percent:t.height/e.height})}return{x:i,y:s}},initScroll(){const t=this.scrollState();if(!t)return;const e=this.el().getBoundingClientRect(),{x:i,y:s}=t;if(i){let t=i.percent*e.width;this.el("wScrollBarThumbX").style.width=Math.max(20,t)+"px",this.wScrollSizeX=i.size,this.wScrollPercentX=i.size&&i.size/((1-i.percent)*(e.width-(t<20?20-t:0)))}else this.wScrollSizeX=this.wScrollPercentX=!1;if(s){let t=s.percent*e.height;this.el("wScrollBarThumbY").style.height=Math.max(20,t)+"px",this.wScrollSizeY=s.size,this.wScrollPercentY=s.size&&s.size/((1-s.percent)*(e.height-(t<20?20-t:0)))}else this.wScrollSizeY=this.wScrollPercentY=!1},scroll_observe_overflow(t){this.$emit("resize"),this.scroll_observe(t)},scroll_observe(t){this.isDeactivated||(this.initScroll(),this.onScrollResize(t),this.el("wScrollOverflow")&&this.el("wScrollOverflow").dispatchEvent(new Event("scroll")))}},computed:{hasScrollX(){return this.x.scrollX},hasScrollY(){return this.x.scrollY},html_scroll_cont_style(){},html_scroll_class(){let t=this.hasScrollX,e=this.hasScrollY;return{"w-scroll":t||e,"w-scroll-x":t,"w-scroll-y":e,"w-scroll-flex":this.x.scrollFlex}}},mounted(){this.x.scrollView&&this.el()&&setTimeout(()=>{let t=this.el().querySelector(this.x.scrollView);t&&this.scrollToY(t,"middle")}),Nt.br.mobile||!this.hasScrollX&&!this.hasScrollY||(this.el("wScrollOverflow")&&new Me(this.scroll_observe_overflow).observe(this.el("wScrollOverflow")),this.el("wScrollCont")&&new Me(this.scroll_observe).observe(this.el("wScrollCont")),this.el()&&new MutationObserver(this.onScrollAttributeChange).observe(this.el(),{attributes:!0}))},deactivated(){this.isDeactivated=!0},activated(){this.isDeactivated=!1,this.hasScrollY&&this.el("wScrollBarThumbY")&&this.scrollToY(Nt.number(this.el("wScrollBarThumbY").style.transform)*this.wScrollPercentY),this.hasScrollX&&this.el("wScrollBarThumbX")&&this.scrollToX(Nt.number(this.el("wScrollBarThumbX").style.transform)*this.wScrollPercentX)},__file:"src/widgets/Scroll.vue"},De={props:["align","valign","gap"],computed:{dir:()=>"h",html_align_class(){return[this.x.align&&"z-"+(this.x.vertical?"v":this.dir)+"-align-"+this.x.align,this.x.valign&&"z-"+(this.x.vertical?"v":this.dir)+"-valign-"+this.x.valign]}},__file:"src/widgets/AlignParent.vue"},Ee={name:"w-horizontal",mixins:[ze,De],props:["br","reverse"],provide(){return{provideLayout:this.$options.name,provideCompatGap:this.compatGap}},inject:["provideCompatGap"],methods:{html_slots(){return this.html_scroll_slots()}},computed:{dir:()=>"h",compatGap(){return Nt.br.compat.gap?this.x?this.x.gap:this.gap:null},html_props_on(){},html_props(){let t=this.x.gap;return{class:[this.html_scroll_class,this.html_align_class,{"z-br":this.x.br,[`f-${this.dir}-gap${this.x.reverse?"-reverse":""}`]:null!=t&&""!==t&&(Nt.br.compat.gap||t<0)}],style:!this.x.scrollX&&!this.x.scrollY&&this.html_scroll_cont_style,...this.html_props_on}},html_scroll_cont_style(){let t=this.x.gap,e={};return null!=t&&(e.gap=Nt.unitSize(t)),(Nt.br.compat.gap||t<0)&&(e["--w-gap"]=Nt.unitSize(t)),Nt.br.compat.gap&&null!=this.provideCompatGap&&(e["--w-compat-gap"]=Nt.unitSize(this.provideCompatGap)),this.x.reverse&&(e["flex-direction"]=("h"==this.dir?"row":"column")+"-reverse"),e}},__file:"src/widgets/Horizontal.vue"},Le={name:"w-vertical",mixins:[Ee],computed:{dir:()=>"v"},__file:"src/widgets/Vertical.vue"},Ae={name:"w-view",mixins:[Le,Jt],inject:["provideView"],methods:{html_slots(){return[this.html_scroll_slots(),this.html_pops()]}},computed:{html_class(){return["w-vertical f-rel",this.html_scroll_class]}},__file:"src/widgets/View.vue"},He={__name:"DialogTarget",setup(t){const e=y("provideView",null),i=e&&e.provideView;return k("provideView",i),(t,e)=>S(t.$slots,"default")},__file:"src/widgets/DialogTarget.vue"};const Fe={},Ie=!0,Ne=!1,Ye={t:"tt",r:"rr",b:"bb",l:"ll",c:"cc",lt:"11",tl:"11",tr:"22",rt:"22",rb:"33",br:"33",bl:"44",lb:"44","-t":"tb","-r":"rl","-b":"bt","-l":"lr","-c":"cc","-tl":"14","-tr":"23","-rt":"21","-rb":"34","-bl":"41","-br":"32","-lt":"12","-lb":"43"},Be=["minWidth","maxWidth","minHeight","maxHeight"];var Oe={name:"w-dialog",mixins:[Ae],props:["title","autoHide","context","prong","independent","timeout","cover","coverProps","position","snap","indent","offsetRange","local","fullScreen","hoverShowDrop","visible",...Be],emits:["show","close","update:visible"],data:()=>({isDialog:!0,keepHover:!1,hoverTimer:null,hoverMove:null,animateState:null,isDeactivated:!1,_pos:null,snapStyle:null,unique:!1}),activated(){this.isDeactivated=!1},deactivated(){this.isDeactivated=!0},methods:{getKey:()=>null,getLocalElem(){if(!0===this.x.local){let t=this.getCommander();return t&&Nt.el(t)}return"string"==typeof this.x.local?document.querySelector(this.x.local):this.x.local},snapTargetElem(){let t=this.x.snap;return"function"==typeof t?t():t?t.isWidget?t.snapElem():t:this.x.local?this.getLocalElem():this.defaultSnapTargetElem},fixSnapStyle(){let t=this._pos,e={};t.type?(t.pix_r?e.right=t.right:e.left=t.left,t.pix_b?(e.pix_b=!0,e.bottom=t.bottom):e.top=t.top,e.type=t.type):e=t,this.snapStyle=e},axis(){let t=this.x.position||this.defaultSnapPosition,e=t;if(this.slotTarget&&!this.x.visible)e={top:0,left:0};else if("string"==typeof t||!t){let s=this.el();if(!s||this.x.fullScreen)return;let l=this.x.local,r=this.snapTargetElem(),a=s.offsetWidth,o=s.offsetHeight,n=null!=this.x.indent?this.x.indent:this.x.prong&&-9;if(e=Nt.snap(a,o,r,"string"==typeof(i=t)&&i.split(",").map(t=>Ye[t]||t).join(),this._fitpos,n,l&&r),!this.x.snap){let i=Nt.q(`[w-dialog-position="${e.type}"]:not([id="${this.uid}"]):last`)[0];if(i){let s=Nt(i)._pos;"tl"==t||"tr"==t||"t"==t?(e.top=s.top+s.height+5,e.bottom=s.bottom-s.height-5):"br"==t||"bl"==t||"b"==t?(e.top=s.top-s.height-5,e.bottom=s.bottom+s.height+5):"lb"==t||"lt"==t||"l"==t?(e.left=s.left+s.width+5,e.right=s.right-s.width-5):"rb"!=t&&"rt"!=t&&"r"!=t||(e.left=s.left-s.width-5,e.right=s.right+s.width+5)}this.animateState="animating"}}var i;this._pos=e,this.fixSnapStyle(),"string"==typeof this.x.position&&this.x.snap&&this.checkOutScreen()},setPosition(t){this.x.position=t},checkOutScreen(){let t=this._pos;t.bottom<0?this.autoSetMaxHeight(t.height+t.bottom):t.top<0&&this.autoSetMaxHeight(t.height+t.top)},close(){!1!==this.x.visible&&(this.closeRelease(),this.trigger("close"),this.ownerView.removePop(this.uid),this.setVisible(!1))},closeRelease(){this.x.autoHide&&this.listenHide(Ne);let t=this.x.position,e=this._pos;if(t&&"string"==typeof t&&e&&this.el()){Nt.q(`~[w-dialog-position="${e.type}"]`,this.el()).each((i,s)=>{const l=Nt(s),r=l._pos;"tl"==t||"tr"==t||"t"==t?(r.top-=e.height+5,r.bottom+=e.height+5):"br"==t||"bl"==t||"b"==t?(r.top+=e.height+5,r.bottom-=e.height+5):"lb"==t||"lt"==t||"l"==t?(r.left-=e.width+5,r.right+=e.width+5):"rb"!=t&&"rt"!=t&&"r"!=t||(r.left+=e.width+5,r.right-=e.width+5),l.fixSnapStyle()})}},listenHide(t){t===Ne?this.setListenHide(t):setTimeout(()=>{!1!==this.x.visible&&this.setListenHide(t)},100)},setListenHide(t){let e=this.x.hoverShowDrop,i=t?"addEventListener":"removeEventListener",s=Nt.br.firefox?"DOMMouseScroll":"mousewheel";if((Nt.br.mobile?["touchend"]:["mousedown",s]).forEach(t=>document[i](t,this.bind("listenHideClose",t=>{let e;!1!==this.x.visible&&(t.target.classList.contains("w-dialog-cover")||this.isForceWheelHide&&t.type===s||!(this.hasBubble(t.target)||!this.x.independent&&((e=this.getCommander()).isWidget?e.hasBubble(t.target):e.contains(t.target))))&&(t.target.id==this.id+"cvr"&&t.stopPropagation(),this.close())}),Ie)),window.plus&&plus.key[i]("backbutton",this.bind("close"),Ne),e){let t=e===Ie?this.x.snap?this.snapTargetElem():Nt.el(this.getCommander()):Nt.el(e),s=this.bind("listenHideHoverOver",t=>{clearTimeout(this.hoverTimer),this.hoverTimer=null}),l=this.bind("listenHideHoverMove",e=>{t.contains(e.target)||this.hasBubble(e.target)||this.keepHover?s():this.hoverTimer||(this.hoverTimer=setTimeout(()=>{this.close(),s()},200))});[t,this.el()].forEach(t=>t&&t[i]("mouseenter",s)),document[i]("mousemove",l)}},autoSetMaxHeight(t){null==this.maxHeight&&(this.x.maxHeight=t)},setVisible(t){t=null==t||t,this.x.visible=t,this.$emit("update:visible",t),this.slotTarget&&(t?this.getTargetElem().setAttribute("w-pop-visible",""):this.getTargetElem().removeAttribute("w-pop-visible")),this.setVisibleSub(t)},setVisibleSub(t){},getTargetElem(){return this.$el?3===this.$el.nodeType?this.$el.nextElementSibling:this.$el:null},getPop(){return this.ownerView.getPopById(this.uid)},getCommander(){if(this.context)return this.context;let t=this.getPop();return t?t.commander:this.slotTarget?this.getTargetElem():this.ownerView},resolve(t){let e=this.getPop();e&&e.resolve&&e.resolve(t)},reject(t){let e=this.getPop();e&&e.reject&&e.reject(t)},html_slots_default:()=>null,html_slots(){let t,e=this._pos;if(this.x.prong&&e){let i=e.inner?e.mag_b?"b":e.mag_t?"t":e.mag_l?"l":"r":e.mag_b?"t":e.mag_t?"b":e.mag_l?"r":"l";t=a("div",{class:"w-dialog-prong z-"+i},[a("i",{class:"w-dialog-prong-out f-arw f-arw-"+i+"5"}),a("i",{class:"w-dialog-prong-in f-arw f-arw-"+i+"4"})])}return[t||[],this.html_scroll_slots(this.html_slots_default()),this.html_pops()]},html(){let t=this.x.local?this.getLocalElem():"#w-dfish-pops",e=null;if(this.x.cover&&!1!==this.x.visible&&!this.isDeactivated){let t={class:"w-dialog-cover f-abs-full",...this.scope_props};this.x.coverProps&&(t=r(t,this.x.coverProps)),e=a("div",t)}let i=[e,this.html_self(!0)],s=t?a(T,{to:t},i):i;return this.slotTarget?[s,a(He,null,{default:()=>[this.slotTarget()]})]:s}},computed:{commander(){return this.getCommander()},defaultSnapTargetElem(){},defaultSnapPosition:()=>"cc",isForceWheelHide:()=>!1,slotTarget(){return this.$slots.target},scope_props(){let t=this.$.vnode.scopeId||this.$.parent.vnode.scopeId;if(t)return{[`${t}`]:""}},html_props(){return{class:"w-dialog","w-dialog-position":(this._pos||Fe).type,...this.scope_props}},html_class(){const t=this._pos||Fe,e=this.x.position;return["w-vertical",this.html_align_class,this.html_scroll_class,{"z-hide":this.isDeactivated||(null!=this.x.visible?!this.x.visible:!!this.slotTarget),"z-full":this.x.fullScreen,["z-face-"+this.x.face]:this.x.face,["z-mag-"+(t.mag_t?"t":t.mag_l?"l":t.mag_b?"b":"r")]:t.type,["z-snap z-snap-"+t.type]:t.type,[`w-dialog-animate-${e}`]:Ye[e]&&"string"==typeof e&&"animating"!=this.animateState}]},html_style(){if(this.x.fullScreen)return{width:"100%",height:"100%",top:0,left:0};{let t=this.x.position,e=this.snapStyle,i={};t&&"object"==typeof t?(Nt.extend(i,t),e&&(null==i.top&&null==i.bottom&&Nt.extend(i,Nt.lodash.pick(e,"top","bottom")),null==i.left&&null==i.right&&Nt.extend(i,Nt.lodash.pick(e,"left","right")))):e&&Nt.extend(i,e);for(let t in i)i[t]=Nt.unitSize(i[t]);return Be.forEach(t=>{null!=this.x[t]&&(i[t]=Nt.unitSize(this.x[t]))}),i}}},mounted(){this.x.local&&Nt.q(this.getLocalElem()).addClass("f-dialog-local-wrap"),this.$nextTick(()=>{if(this.$watch(()=>this.x.position,this.axis),this.$watch(()=>this.x.visible,t=>{!1!==t&&this.x.autoHide&&this.listenHide(Ie),this.axis()},{immediate:!0}),setTimeout(()=>{this.axis(),this.$nextTick(()=>this.trigger("show"))}),this.slotTarget){let t=this.getTargetElem();t&&(this.hoverShowDrop?t.addEventListener("mouseenter",()=>null==this.visible&&this.setVisible(),!1):t.addEventListener("click",t=>{t.stopPropagation(),null==this.visible&&this.setVisible()},!1))}new Me(t=>{!1!==this.x.visible&&"animating"!=this.animateState&&this.el()&&this.axis()}).observe(this.el()),this.x.timeout&&setTimeout(this.close,this.x.timeout)})},unmounted(){!1!==this.x.visible&&this.closeRelease()},__file:"src/widgets/Dialog.vue"},je={__name:"TemplateAlert",props:["text","escape","title","icon","button","showButton","yesText"],emits:["save","close"],setup(t,{emit:e}){const i=t,s=e,l={info:".f-i .f-i-alert-info",warning:".f-i .f-i-alert-warning",success:".f-i .f-i-alert-success",question:".f-i .f-i-alert-question",error:".f-i .f-i-alert-error"},r=t=>{s("save",t)},a=t=>{s("close",t)},o=C(()=>l[i.icon]||i.icon||l.info),h=C(()=>i.yesText||"确定");return(e,i)=>{const s=n("w-html"),l=n("w-vertical"),d=n("w-horizontal"),y=n("w-img"),k=n("w-button"),T=n("w-buttonbar"),C=M("dialog-move");return u(),m(l,{class:"w-alert-wrap"},{default:f(()=>[g(d,{class:"w-alert-head"},{default:f(()=>[V((u(),m(l,{class:"w-alert-move","w-width":"*"},{default:f(()=>[g(s,{class:"w-alert-title",valign:"middle",height:"*",innerHTML:t.title},null,8,["innerHTML"])]),_:1})),[[C,!0]]),g(s,{class:"w-alert-close",align:"center",valign:"middle",onClick:a},{default:f(()=>i[0]||(i[0]=[p("i",{class:"w-alert-close-icon f-i f-i-close"},null,-1)])),_:1,__:[0]})]),_:1}),g(l,{class:"w-alert-body"},{default:f(()=>[g(d,{class:"w-alert-main"},{default:f(()=>[g(y,{class:"w-alert-icon",src:o.value},null,8,["src"]),S(e.$slots,"default",{width:"*"},()=>[t.escape?(u(),m(s,{key:0,width:"*",class:"w-alert-text"},{default:f(()=>[_(w(t.text),1)]),_:1})):(u(),m(s,{key:1,width:"*",class:"w-alert-text",innerHTML:t.text},null,8,["innerHTML"]))])]),_:3}),!1!==t.showButton?(u(),m(T,{key:0,gap:"10",class:"w-alert-buttonbar"},{default:f(()=>[t.button?(u(!0),c(x,{key:0},v(t.button,t=>(u(),m(k,{face:t.face,class:P(["w-alert-button",t.class]),text:t.text,onClick:t.click,ownproperty:!0},null,8,["face","class","text","onClick"]))),256)):(u(),m(k,{key:1,face:"primary",class:"w-alert-button",text:h.value,onClick:r,ownproperty:!0},null,8,["text"]))]),_:1})):b("v-if",!0)]),_:3})]),_:3})}},__file:"src/template/TemplateAlert.vue"},qe={name:"w-alert",mixins:[Oe],props:["text","title","escape","yes","no","button","showButton","yesText"],methods:{x_default:()=>({title:Nt.loc.opertip}),async onSave(t){let e;if(this.x.yes)try{e=await this.x.yes(t)}catch(t){console.error(t)}this.resolve(e),this.close()},async onClose(t){let e;this.x.no&&(e=await this.x.no(t)),this.resolve(e),this.close()},html_slots_default(){return a(je,{text:this.x.text,title:this.x.title,icon:this.x.icon,escape:this.x.escape,yesText:this.x.yesText,showButton:this.x.showButton,onSave:this.onSave,onClose:this.onClose,button:this.x.button},this.$slots)}},__file:"src/widgets/Alert.vue"},Re={__name:"TemplateConfirm",props:["text","escape","title","icon","button","showButton","yesText","noText"],emits:["save","close"],setup(t,{emit:e}){const i=t,s=e,l={info:".f-i .f-i-alert-info",warning:".f-i .f-i-alert-warning",success:".f-i .f-i-alert-success",question:".f-i .f-i-alert-question",error:".f-i .f-i-alert-error"},r=t=>{s("save",t)},a=t=>{s("close",t)},o=C(()=>l[i.icon]||i.icon||l.question),h=C(()=>i.yesText||"确定"),d=C(()=>i.noText||"取消");return(e,i)=>{const s=n("w-html"),l=n("w-vertical"),b=n("w-horizontal"),y=n("w-img"),k=n("w-button"),T=n("w-buttonbar"),C=M("dialog-move");return u(),m(l,{class:"w-alert-wrap"},{default:f(()=>[g(b,{class:"w-alert-head"},{default:f(()=>[V((u(),m(l,{class:"w-alert-move","w-width":"*"},{default:f(()=>[g(s,{class:"w-alert-title",valign:"middle",height:"*",innerHTML:t.title},null,8,["innerHTML"])]),_:1})),[[C,!0]]),g(s,{class:"w-alert-close",align:"center",valign:"middle",onClick:a},{default:f(()=>i[0]||(i[0]=[p("i",{class:"w-alert-close-icon f-i f-i-close"},null,-1)])),_:1,__:[0]})]),_:1}),g(l,{class:"w-alert-body"},{default:f(()=>[g(b,{class:"w-alert-main",valign:"middle"},{default:f(()=>[g(y,{class:"w-alert-icon",src:o.value},null,8,["src"]),S(e.$slots,"default",{width:"*"},()=>[t.escape?(u(),m(s,{key:0,width:"*",class:"w-alert-text"},{default:f(()=>[_(w(t.text),1)]),_:1})):(u(),m(s,{key:1,width:"*",class:"w-alert-text",innerHTML:t.text},null,8,["innerHTML"]))])]),_:3}),g(T,{gap:"10",class:"w-alert-buttonbar"},{default:f(()=>[t.button?(u(!0),c(x,{key:0},v(t.button,t=>(u(),m(k,{face:t.face,class:P(["w-alert-button",t.class]),text:t.text,onClick:t.click,ownproperty:!0},null,8,["face","class","text","onClick"]))),256)):(u(),c(x,{key:1},[g(k,{face:"primary",class:"w-alert-button",text:h.value,onClick:r,ownproperty:!0},null,8,["text"]),g(k,{class:"w-alert-button",text:d.value,onClick:a,ownproperty:!0},null,8,["text"])],64))]),_:1})]),_:3})]),_:3})}},__file:"src/template/TemplateConfirm.vue"},We={name:"w-confirm",mixins:[Oe],props:["text","title","escape","yes","no","yesText","noText","button","showButton"],methods:{x_default:()=>({title:Nt.loc.opertip}),async onSave(t){let e;if(this.x.yes)try{e=await this.x.yes(t)}catch(t){console.error(t)}this.resolve(e),this.close()},async onClose(t){let e;this.x.no&&(e=await this.x.no(t)),this.resolve(e),this.close()},html_slots_default(){return a(Re,{text:this.x.text,title:this.x.title,icon:this.x.icon,escape:this.x.escape,yesText:this.x.yesText,noText:this.x.noText,showButton:this.x.showButton,onSave:this.onSave,onClose:this.onClose,button:this.x.button},this.$slots)}},__file:"src/widgets/Confirm.vue"};const Ue={class:"w-tip-body"},Xe={key:0,class:"w-tip-text"},Qe=["innerHTML"];var Ge={__name:"TemplateTip",props:["text","escape"],setup:t=>(e,i)=>(u(),c("div",Ue,[S(e.$slots,"text",{},()=>[t.escape?(u(),c("div",Xe,w(t.text),1)):(u(),c("div",{key:1,class:"w-tip-text",innerHTML:t.text},null,8,Qe))])])),__file:"src/template/TemplateTip.vue"};let Je=null,Ke={time:(new Date).getTime(),list:[]};var Ze={name:"w-tip",mixins:[Oe],props:["face","text","escape"],provide(){return{provideView:this.provideView}},methods:{x_default:()=>({prong:!0,autoHide:!0,face:"normal",escape:!0}),html_slots_default(){return a(Ge,{text:this.x.text,escape:this.x.escape},this.$slots)},setVisibleSub(t){if(t)for(let t of Ke.list)t!=this.uid&&Nt.close(t)}},computed:{isForceWheelHide:()=>!0,slotTarget(){return this.$slots.default},defaultSnapTargetElem(){const t=this.commander;return t.snapElem?t.snapElem():t},defaultSnapPosition:()=>"-t,-r,-b,-l,-tl,-tr,-rt,-tb,-bl,-br,-lt,-lb,c"},mounted(){Ke.time=(new Date).getTime(),Je&&Nt.close(Je),Je=this.uid,Ke.list.push(this.uid)},unmounted(){Je=null;let t=Ke.list.indexOf(this.uid);t>-1&&Ke.list.splice(t,1)},__file:"src/widgets/Tip.vue"},ti={name:"w-img",pubParentName:"w-album",mixins:[Ve],inject:["providePubParent"],props:["src","text","square","imgWidth","imgHeight","dataUrl","vertical","disabled"],data:()=>({hover:!1}),methods:{x_default:()=>({vertical:!0}),onerror(t){this.dataUrl&&(t.target.src=this.dataUrl)},html_slots(){let t=this.x.src,e=t&&t.startsWith(".")&&!t.includes("/"),i=t&&t.startsWith("#"),s=this.$slots.default||(this.x.text?{default:()=>this.x.text}:null);return t=t||this.dataUrl,[t&&a("div",{class:"w-img-gut"},[e?a("i",{class:"w-img-icon "+t.replace(/\./g,"")}):i?a("svg",{class:"f-svg "+t.slice(1)},a("use",{"xlink:href":t})):a("img",{ref:"img",src:t,class:"w-img-icon",onerror:this.onerror}),this.$slots.cover&&a("div",{class:"w-img-cover f-abs-full"},this.$slots.cover())]),s&&a(Le,{class:"w-img-description"},s)]}},computed:{isCurrent(){return this.pubParent&&this.pubParent.inCurrent(this)},html_props(){let t=Nt.unitSize(this.x.imgWidth?this.x.imgWidth:this.x.width),e=Nt.unitSize(this.x.imgHeight?this.x.imgHeight:this.x.height);return{class:{"z-hv":this.hover,"z-on":this.isCurrent,"z-ds":this.x.disabled,"z-square":this.x.square,"z-canplay":this.x.canPlay,"z-vertical":this.x.vertical,[`f-${this.x.vertical?"v":"h"}-gap`]:Nt.br.compat.gap},style:{"--w-img-icon-width":t,"--w-img-icon-height":e},onmouseenter:t=>!this.x.disabled&&(this.hover=!0),onmouseleave:t=>!this.x.disabled&&(this.hover=!1)}}},__file:"src/widgets/Img.vue"},ei={pubParentName:"w-buttonbar",mixins:[Ve],props:["text","icon","focusIcon","dropIcon","focusDropIcon","arrowIcon","face","target","closable","dropToggle","loading","disabled","vertical","hoverShowDrop","dropProps","showArrowIcon"],inject:["providePubParent","provideMenu_w"],emits:["click:close","dropClose"],data(){return{dropper:null,showDrop:!1,mouses:{onmouseenter:t=>{this.showDrop||(this.pubParent&&ai(this.pubParent)&&!ai(this)&&ri(),this.x.hoverShowDrop&&(this.drop(),this.$nextTick(()=>t.currentTarget.classList.add("z-hv")))),t.currentTarget.classList.add("z-hv")},onmouseleave:t=>t.currentTarget.classList.remove("z-hv"),onmousedown:t=>t.currentTarget.classList.add("z-down"),onmouseup:t=>t.currentTarget.classList.remove("z-down")}}},watch:{disabled(t){t&&Nt.q(".z-hv",this.el()).removeClass("z-hv")}},methods:{setLoading(t){t=null==t||t,this.x.loading=t},drop(){this.hasChild?this.showDrop=!0:ri()},isShowDrop(){return this.showDrop},closeDrop(){this.showDrop=!1},onclick(t){this.isMore&&(this.showDrop&&this.x.dropToggle?this.closeDrop():this.drop()),this.pubParent&&this.pubParent.$emit("click:item",t)},clickClose(t){t.stopPropagation(),t.runType="click:close",this.trigger(t)},clickDrop(t){this.isDisabled||(t.stopPropagation(),this.drop())},html_drop(){if(this.showDrop&&this.hasChild){let t={context:this,ownproperty:!0,minWidth:Nt.bcr(this.el()).width,autoHide:!0,hoverShowDrop:this.x.hoverShowDrop,snap:()=>this.el(),position:this.pubParent&&this.pubParent.x.vertical?"-rt,-lt":"v",indent:1,onClose:()=>{this.showDrop=!1,this.$emit("dropClose")}};return this.x.dropProps&&(t=r(t,this.x.dropProps)),a(n("w-menu"),t,this.$slots)}return[]},html_slots(){let t=this.x.text,e=[];if(this.x.loading&&e.push(a("div",{class:"w-button-loading f-abs-full f-flex-center"},a(ti,{src:"#f-svg-loading"}))),this.x.icon){let t=this.x.focusDropIcon&&this.isCurrent&&this.showDrop?this.x.focusDropIcon:this.x.focusIcon&&this.isCurrent?this.x.focusIcon:this.x.dropIcon&&this.showDrop?this.x.dropIcon:this.x.icon;e.push(this.html_icon(t,"w-button-icon f-flex-center"+(this.x.vertical?"":" f-height")))}if(t){const i=this.pubParent&&this.pubParent.x.flexSize&&t;e.push(a("div",{class:"w-button-text"},a("span",{class:"w-button-text-line f-line-1",title:i||""},t)))}return this.isMore&&this.x.showArrowIcon&&e.push(a(ti,{class:"w-button-more f-flex-center f-height",src:this.x.arrowIcon||".f-i .f-i-caret-down"})),this.x.closable&&e.push(a("div",{class:"w-button-close f-flex-center"},a("i",{class:"w-button-close-icon f-i f-i-close",onclick:this.clickClose}))),[a("div",{class:"w-button-main f-oh f-height",...this.isCombo&&!this.isDisabled&&this.mouses},e),this.isCombo&&a(ti,{class:"w-button-drop f-flex-center f-height",src:".f-i .f-i-caret-down",...!this.isDisabled&&this.mouses,onclick:this.clickDrop}),this.html_drop()]}},computed:{tagName:()=>"button",hasChild(){const t=this.slots_children();return t&&t.length},isCurrent(){return this.pubParent&&this.pubParent.inCurrent(this)},isMore(){return this.hasChild&&!this.getOn("click")},isCombo(){return!!(this.hasChild&&this.x.showArrowIcon&&this.getOn("click"))},isDisabled(){return!!this.x.disabled||!!this.x.loading},html_props(){return{disabled:this.isDisabled,class:{[`z-face-${this.x.face}`]:this.x.face,"z-combo":this.isCombo,"z-more":this.isMore,"z-on":this.isCurrent,"z-ds":!!this.x.disabled,"z-loading":!!this.x.loading,"z-vertical":!!this.x.vertical,"z-closable":!!this.x.closable,"z-drop":this.showDrop},onclick:this.onclick,...!this.isCombo&&!this.isDisabled&&this.mouses}}},__file:"src/widgets/ButtonAbs.vue"},ii={name:"w-menubutton",mixins:[ei],methods:{ajax(...t){return this.parentMenu.rootCommander.ajax(...t)},submit(...t){return this.parentMenu.rootCommander.submit(...t)},drop(){this.showDrop||(this.closeSub(),this.showDrop=!0,this.parentMenu.currentMenuButton=this)},onclick(t){this.isMore||setTimeout(()=>this.parentMenu.root.close(),10)},onmouseenter(t){!this.x.disabled&&t.currentTarget.classList.add("z-hv"),this.isMore?this.drop():this.closeSub()},closeSub(){this.parentMenu.currentMenuButton&&(this.parentMenu.currentMenuButton.showDrop=!1,this.parentMenu.currentMenuButton=null)},clickClose(t){t.stopPropagation(),t.runType="click:close",this.trigger(t)},html_slots(){let t=this.x.text,e=[],i=this.x.icon,s=i&&i.startsWith(".")&&!i.includes("/");if(e.push(!i||s?a("i",{class:"w-menubutton-icon f-flex-center f-height "+(i?i.replace(/\./g,""):"")}):a("img",{src:i,class:"w-menubutton-icon f-flex-center f-height"})),t&&e.push(a("div",{class:"w-menubutton-text f-line-1"},t)),this.x.closable&&e.push(a("div",{class:"w-menubutton-close"},a("i",{class:"w-menubutton-close-icon f-i f-i-close",onclick:this.clickClose}))),e.push(a(ti,{class:"w-menubutton-drop f-flex-center f-height",src:this.isMore?this.x.arrowIcon||".f-i .f-i-caret-right":""})),this.showDrop){let t={autoHide:!0,context:this,ownproperty:!0,snap:()=>this.el(),position:"21,12",indent:{top:1,bottom:1},onClose:()=>this.showDrop=null};this.x.dropProps&&(t=r(t,this.x.dropProps)),e.push(a(n("w-menu"),t,this.$slots))}return e}},computed:{tagName:()=>"button",isMore(){return!!this.hasChild},parentMenu(){let t=this.provideView;for(;t&&!t.isView;)t=t.provideView;return t},ownerView(){const t=this.parentMenu.rootCommander;return t?t.ownerView:this.parentMenu.root.provideView},html_props(){return{disabled:!!this.x.disabled,class:{"z-on":this.isCurrent,"z-ds":!!this.x.disabled,"z-drop":this.showDrop},onmouseenter:this.onmouseenter,onmouseleave:!this.x.disabled&&(t=>t.currentTarget.classList.remove("z-hv")),onclick:this.onclick}}},__file:"src/widgets/MenuButton.vue"},si={name:"w-button",mixins:[ei],props:["autoMenuButton"],methods:{x_default:()=>({showArrowIcon:!0,autoMenuButton:!0})},render(){return this.provideMenu_w&&this.x.autoMenuButton?a(ii,this.$props,this.$slots):this.html()},__file:"src/widgets/Button.vue"};let li=null;function ri(){li&&(Nt.close(li),li=null)}function ai(t){return li&&(t.hasBubble(li.context)||li.hasBubble(t))}var oi={name:"w-menu",mixins:[Oe],provide(){return{provideMenu_w:this}},methods:{x_default:()=>({autoHide:!0,independent:!1}),hasBubble(t,e){if(this.contains(t,e))return!0;let i=Nt(t).closest("w-menu,w-menubutton");return!(!i||!(i=i.parentMenu)||i.rootCommander!=this.rootCommander)||void 0},arrow(t){let e=this.$refs.bbr.el(),i=Nt.bcr(e);e.scrollTop+=i.height*t},mousewheel(t){this.arrow(t.deltaY<0?1:-1)},getRoot(){let t=this;for(;t.getCommander()&&t.getCommander().isWidget&&"w-menubutton"===t.getCommander().$options.name;)t=t.getCommander().parentMenu;return t},setVisibleSub(t){!1===t&&this.currentMenuButton&&(this.currentMenuButton.showDrop=!1)},checkOutScreen(){let t=this._pos;t.mag_l||t.mag_r?t.bottom<0?(t.top+=t.bottom,t.top<0&&(this.autoSetMaxHeight(t.height+t.top),t.top=0),this.fixSnapStyle()):t.top<0&&(t.bottom+=t.top,t.bottom<0&&(this.autoSetMaxHeight(t.height+t.bottom),t.bottom=0),this.fixSnapStyle()):t.bottom<0?this.autoSetMaxHeight(t.height+t.bottom):t.top<0&&this.autoSetMaxHeight(t.height+t.top)},html_buttons(){return this.slots_children()},html_slots(){return[this.x.maxHeight&&a("div",{class:"w-menu-arr f-oh",onclick:t=>this.arrow(-1)},a("i",{class:"f-i f-i-caret-up"})),a(Le,{class:"w-menu-bbr",height:"*",ref:"bbr",onwheel:this.mousewheel},this.$slots),this.x.maxHeight&&a("div",{class:"w-menu-arr f-oh",onclick:t=>this.arrow(1)},a("i",{class:"f-i f-i-caret-down"}))]}},computed:{root(){return this.getRoot()},rootCommander(){return this.root.commander},parentMenu(){let t=this.provideView;for(;t&&!t.isView;)t=t.provideView;return t},defaultSnapTargetElem(){let t=this.getCommander();if(t)return t.isWidget?t.snapElem():t},defaultSnapPosition:()=>"-bl,-br,-tl,-tr",scope_props(){if(this.rootCommander){let t=Nt(this.rootCommander).$.vnode.scopeId||this.$.vnode.scopeId||this.$.parent.vnode.scopeId;if(t)return{[`${t}`]:""}}}},mounted(){(!this.context||this.context.$options&&"w-menubutton"!==this.context.$options.name)&&(li&&li.context!==this.context&&Nt.close(li),li=this)},__file:"src/widgets/Menu.vue"},ni={name:"w-loading",mixins:[Oe],props:["text","icon"],methods:{x_default:()=>({}),html_slots(){return a(ti,{src:void 0!==this.x.icon?this.x.icon:"#f-svg-loading",text:void 0!==this.x.text?this.x.text:Nt.loc.loading})}},mounted(){this.resolve(this)},__file:"src/widgets/Loading.vue"},hi={name:"w-table",mixins:[Ve],props:["face","scroll-x","scroll-y"],provide(){return{_provideTable:this,provideLevel:-1,provideParentTR:null,provideTripleboxContainer:this}},data:()=>({sticky:z({left:null,right:null,observers:[]})}),methods:{observeSticky(){for(let t of this.sticky.observers)t.disconnect();let t=[];Nt.lodash.each(this.initFixedCells(),e=>{let i=new Me(this.setFixedStyle);i.observe(e),t.push(i)}),this.sticky.observers=t},setFixedStyle(){this.initFixedCells();let t={};if(this.sticky.left&&this.sticky.left.forEach(e=>t[`--w-td-fixed-left-${e.colIndex}`]=`${e.offset}px`),this.sticky.right&&this.sticky.right.forEach(e=>t[`--w-td-fixed-right-${e.colIndex}`]=`${e.offset}px`),this.$el)for(let e in t)this.$el.style.setProperty(e,t[e])},initFixedCells(){return this.getFixedCells("left").concat(this.getFixedCells("right"))},getFixedCells(t){let e=null,i=0,s=Nt.lodash.map(this.$el.querySelector("thead").querySelectorAll(`td[w-fixed="${t}"]`));return"right"===t&&s.reverse(),s.forEach(t=>{(e||(e=[])).push({colIndex:t.cellIndex,offset:i}),i+=t.offsetWidth}),this.sticky[t]=e,s},html_slots(){return[this.slotHooks.thead,this.slotHooks.tbody,this.slotHooks.hiddens||[]]}},computed:{slotHooks(){const t={};return this.slots_children().forEach(e=>{let i=e.type.name&&e.type.name.slice(2);i&&("hidden"===i?(t.hiddens||(t.hiddens=[])).push(e):t[i]=e)}),t},colgroup(){return Nt.slotsChildren(this.slotHooks.columns.children).map(t=>t.props)},stickyState(){let t="";for(let e of this.colgroup)e.fixed&&(t+=e.fixed);return t},html_class(){return["f-flex-column",this.x.face&&"z-face-"+this.x.face]}},mounted(){this.$watch("stickyState",t=>{this.$nextTick(()=>this.observeSticky())},{immediate:!0}),this.$el.setAttribute("w-scroll-x","left"),Nt.br.chrome&&Nt.br.chrome<=60&&new Me(()=>{this.$el.setAttribute("w-compact-resize-sticky",""),requestAnimationFrame(()=>this.$el.removeAttribute("w-compact-resize-sticky"))}).observe(this.$el)},__file:"src/widgets/Table.vue"},ci={name:"w-columns",__file:"src/widgets/TableColumns.vue"},ui={name:"w-column",props:["width","minWidth"],__file:"src/widgets/TableColumn.vue"},di={props:["pub","current"],provide(){return{providePubParent:this}},methods:{inCurrent(t){let e=this.x.current;if(null!=e)return Array.isArray(e)?-1<e.findIndex(e=>this.isCurrentChild(e,t)):this.isCurrentChild(e,t)},isCurrentChild(t,e){if("object"==typeof t){let i=e.isWidget?(e.x||e).data:e.props&&e.props.data;if(i)for(let e in t)if(Nt.lodash.get(i,e)==t[e])return!0}else if(t==(e.isWidget?e.getKey():e.key))return!0}}};di.__file="src/widgets/PubParent.vue";const pi={render:function(t,e){return S(t.$slots,"default")},__file:"src/widgets/SlotDefault.vue"};var mi={name:"w-thead",mixins:[Ve,di],props:["br","sort"],inject:["_provideTable"],provide(){return{provideLeafLevel:-2,provideParentLeaf:null,provideInBody:!1,_provideThead:this,_provideTBody:!1}},data:()=>({rows:null,sortUID:null}),methods:{isExpanded:()=>!0,slot_rows(){if(this.$slots.row){let t,e=this.x.children;if(Array.isArray(e)){let i=0;t=e.map((t,e)=>{let s;const l=this.$slots.row({item:t,index:e}).map(t=>(t.props||(t.props={}),t.props.rowIndex=i++,s||(s=t.key),t));return s?a(pi,{key:s},{default:()=>l}):l})}return t||[]}return this.slots_children().map((t,e)=>Nt.lodash.set(t,"props.rowIndex",e))},html_tbody(){let t=this._provideTable.colgroup,e=this.slot_rows(),i={};if(!this._provideTable.fixed){let e=0;t.forEach(t=>{e+=Nt.number(t.width)||Nt.number(t["min-width"])}),e&&(i.minWidth=Nt.unitSize(e))}return this.rows=z({}),a("div",{class:"w-table-tbl-wrap"},a("table",{ref:"table",cellpadding:0,cellspacing:0,class:"w-table-tbl",style:i},[a("thead",null,a("tr",null,t.map(t=>a("td",{style:{width:"*"==t.width?null:Nt.unitSize(t.width),minWidth:Nt.unitSize(t["min-width"])},"w-fixed":t.fixed})))),a("tbody",e)]))},html_slots(){return this.html_tbody()}},computed:{isEscape(){return this.x.escape}},__file:"src/widgets/TableTHead.vue"},fi={name:"w-tbody",mixins:[mi,ze],inject:["_provideTable"],props:["children"],provide(){return{_provideThead:null,provideInBody:!0,_provideTBody:this}},created(){this.$watch(()=>this._provideTable.x,t=>{this.x.scrollX=t.scrollX,this.x.scrollY=!!this._provideTable.fixed||t.scrollY},{immediate:!0}),this.$watch("current",()=>this.viewCurrent())},methods:{getCurrent(){const t=Nt.q(".w-tr.z-on",this.el())[0];return t&&Nt(t)},viewCurrent(t){this.$nextTick(()=>{(t=t||this.getCurrent())&&(t.expandToView(),this.$nextTick(()=>t.scrollIntoView()))})},onScroll(t){let e=this._provideTable.slotHooks.thead;e&&(e.el.scrollLeft=t.target.scrollLeft)},onScrollPosition(t){let e=this._provideTable.el();(e&&"left"==t||"center"==t||"right"==t)&&e.setAttribute("w-scroll-x",t)},onScrollAttributeChange(t){let e=this._provideTable.el();e&&t.forEach(t=>{let i=t.attributeName;t.target.hasAttribute(i)?e.setAttribute(i,""):e.removeAttribute(i)})},html_slots(){return this.html_scroll_slots(this.html_tbody())}},computed:{inBody:()=>!0,html_class(){return["w-vertical f-flex-1 f-oh",this.html_scroll_class]}},__file:"src/widgets/TableTBody.vue"},xi={name:"w-tr",pubParentName:"w-tbody,w-thead",mixins:[Ve,Gt],props:["rowIndex","expanded","children"],inject:["_provideTable","providePubParent","provideInBody","_provideTBody","provideLevel","provideParentTR"],provide(){return{provideParentTR:this,provideLevel:this.provideLevel+1}},methods:{hasChild(){return Nt.hasChild(this.$slots,"rows")},isDisplay(){if(!this.provideParentTR)return!0;let t=this;for(;t=t.provideParentTR;)if(!t.isExpanded())return!1;return!0},isExpanded(){return this.x.expanded},setExpanded(t){this.x.expanded=null!=t?t:!this.x.expanded},expandToView(){let t=this;for(;(t=t.provideParentTR)&&t.$options.name===this.$options.name;)t.toggle(!0)},toggle(t,e){const i=this.el(".w-leaf");let s=i&&Nt(i);s?s.toggle(t,e):(this.setExpanded(t),e&&this.$nextTick(e))},onmouseenter(t){this.el().classList.add("z-hv")},onmouseleave(t){this.el().classList.remove("z-hv")},html_slots(){let t=this.rowIndex,e=this.pubParent.rows,i=0;return this.slots_children().map(s=>{for(;e[t]&&e[t][i];)i+=e[t][i];if(s.dfishColIndex=i,s.props){if(s.props.rowspan>1)for(let l,r=1;r<s.props.rowspan;r++)l=e[t+r]||(e[t+r]={}),l[i]=Nt.number(s.props.colspan)||1;s.props.colspan>1&&(i+=s.props.colspan-1)}return i++,s})},html(){return this.x.children&&Array.isArray(this.x.children)&&this._provideTBody&&this._provideTBody.$slots.row?[this.html_self(!0),this.x.children.map((t,e)=>{let i;const s=this._provideTBody.$slots.row({item:t,index:e});for(let t of s)i||(i=t.key);return i?a(pi,{key:i},{default:()=>s}):s})]:this.$slots.row?[this.html_self(!0),this.$slots.row()]:this.html_self()}},computed:{tagName:()=>"tr",level(){return this.provideLevel+1},isEscape(){return this.pubParent.x.escape},inCurrent(){return this.pubParent.inCurrent(this)},html_props(){if(this.provideInBody)return{class:{"z-on":this.inCurrent,"z-expanded":this.isExpanded(),"f-hide":!this.isDisplay()},onmouseenter:this.onmouseenter,onmouseleave:this.onmouseleave}}},mounted(){this.inCurrent&&this.pubParent.viewCurrent(this)},__file:"src/widgets/TableTR.vue"},gi={name:"w-td",props:["colspan","rowspan","align","valign","data"],inject:["_provideTable","provideInBody"],methods:{td_props(){let t=this.$.vnode.dfishColIndex,e=this._provideTable.colgroup[t]||!1,i=this._provideTable.colgroup.length,s=this.colspan;return-1==s&&(s=i),{class:["w-td",t+(s||1)==i&&"w-td-lastborder",this.provideInBody&&e.class,e.fixed&&{[`w-td-fixed-${e.fixed}`]:!0,"w-td-fixed-left-last":"left"===e.fixed&&this._provideTable.colgroup[t+1]&&this._provideTable.colgroup[t+1].fixed!=e.fixed,"w-td-fixed-right-first":"right"===e.fixed&&this._provideTable.colgroup[t-1]&&this._provideTable.colgroup[t-1].fixed!=e.fixed}],style:[this.provideInBody&&e.style,e.fixed&&{[`${e.fixed}`]:`var(--w-td-fixed-${e.fixed}-${t})`}],colspan:s,rowspan:this.rowspan,align:this.align||e.align,valign:this.valign||e.valign}}},render(){return a("td",this.td_props(),this.$slots)},__file:"src/widgets/TableTD.vue"},vi={name:"w-th",mixins:[gi,Ve],props:["sortable","sortOrders","sortOrderDefault"],inject:["_provideThead"],emits:["click:sort"],data:()=>({sortType:null,sortOrder:null}),methods:{onClick(t){this.x.sortable&&this.clickSort(t,"toggle")},clickSort(t,e){t.stopPropagation();let i=this.sortOrder;this._provideThead.sortUID!=this.uid&&(i=null);let s=this.x.sortOrders||["asc","desc",null];if("toggle"===e){let t=s.indexOf(i);i=s[t<0||2==t?0:t+1]}else i=i==e?null:e;this.sortOrder=i,this._provideThead.sortUID=this.uid,t.value=i,this.$emit("click:sort",t,i)},html_slots(){return a(Ee,{class:"w-th-wrap",valign:"middle",align:this.align||this.col.align},{default:()=>[a("div",{class:"w-th-title"},this.$slots),this.x.sortable?a("div",{class:"w-th-sort f-flex-column f-flex-center f-oh"},[a("i",{class:"f-i f-i-caret-up f-oh w-th-sort-up",onClick:t=>this.clickSort(t,"asc")}),a("i",{class:"f-i f-i-caret-down f-oh w-th-sort-down",onClick:t=>this.clickSort(t,"desc")})]):[]]})}},computed:{col(){return this._provideTable.colgroup[this.$.vnode.dfishColIndex]||!1},tagName:()=>"th",html_props(){return r(this.td_props(),{class:{"z-sortable":this.x.sortable,[`z-${this.sortOrder}`]:this.sortOrder&&this._provideThead.sortUID==this.uid},onClick:this.onClick})}},__file:"src/widgets/TableTH.vue"};const wi={class:"'w-table-v2-th-text f-line-1"},bi={class:"w-tree-loading w-table-v2-loading"},_i=["onClick"],yi=["onClick"],ki=["title"],Si={class:"'w-table-v2-td-text f-line-1"},Ti={name:"w-table-v2"};var Ci=Object.assign(Ti,{props:{alias:{type:Object,default:()=>({})},children:{type:Array,default:()=>[]},current:{type:[String,Number,Array]},itemHeight:{type:[String,Number],default:40},src:{type:Function},columns:{type:Array,default:()=>[]},loading:{type:Boolean}},emits:["click:item"],setup(t,{expose:e,emit:i}){const s=i,l=t;let{alias:r,itemHeight:a,current:h}=l;const d=r.value||"id";r.text;const _=r.children||"children",y=r.class||"class",T=Symbol("leaf"),M=D(0),V=D(0),$=D([]),z=D(),A=D(),N=D(),Y=D(!1),B=C(()=>l.loading||Y.value);k("provideTripleboxContainer",E());const O=C(()=>({height:$.value.length*a+"px"})),j=(t,e)=>{const i={};return t.width&&"*"!=t.width?i.width=Nt.unitSize(t.width):i.flex=1,t.minWidth&&(i.minWidth=Nt.unitSize(t.minWidth)),i},q=t=>"function"==typeof y?y(t):t[y],R=t=>({height:`${a}px`,top:t[T].showIndex*a+"px"}),W=t=>({paddingLeft:16*t[T].level+"px"}),U=t=>Q(t)?t.expanded?t.expandedIcon:t.collapsedIcon:t.icon,X=t=>t[T].loading,Q=t=>t[_]&&t[_].length||t[T].src&&!t[T].loaded,G=t=>Array.isArray(l.current)?l.current.includes(t[d]):l.current===t[d];let J,K=!0;const Z=async(t,e)=>{if("string"==typeof t&&(t=lt(t)),!t)return;const i=t[T];if(!i.loading)if(t.expanded=null!=e?e:!t.expanded,t.expanded)if(t[_]){const e=$.value.indexOf(t),i=it(t[_],t),s=$.value.slice(0,e+1),l=$.value.slice(e+1);$.value=s.concat(i,l)}else i.src&&!i.loaded&&(i.loading=!0,await i.src().catch(()=>{}),i.loading=!1,i.loaded=!0,Z(t,t.expanded));else{const e=$.value.indexOf(t),i=st(t[_]),s=$.value.slice(0,e+1),l=$.value.slice(e+1+i);$.value=s.concat(l)}},tt=t=>{V.value!==t.target.scrollTop&&(V.value=t.target.scrollTop)},et=()=>{nt()},it=(t,e)=>{let i=[];return t&&t.forEach(t=>{i.push(t);const s=t[T];s||(t[T]={level:e?e[T].level+1:0,parent:e,src:l.src&&l.src(t)}),t[_]&&t[_].length?t.expanded?i=i.concat(it(t[_],t)):s||it(t[_],t):t.expanded&&t[T].src&&o(()=>Z(t,!0))}),i},st=t=>{let e=0;for(let i of t)e++,i[_]&&i.expanded&&(e+=st(i[_]));return e},lt=(t,e)=>{e||(e=l.children);for(let i of e){if(i[d]===t)return i;if(i[_]&&i[_].length){const e=lt(t,i[_]);if(e)return e}}},rt=t=>{const e=lt(t);if(e){let t=e,i=t;for(;t=t[T].parent;)t.expanded||(t.expanded=!0,i=t);i&&i!=e&&Z(i,!0)}return e},at=(t,e)=>{for(let i of t){let t=e.find(t=>t[d]===i[d]);t&&(t[_]&&(i[_]?at(i[_],t[_]):i[_]=t[_]),null!=t.expanded&&(i.expanded=t.expanded))}},ot=C(()=>{const t=Math.floor(V.value/a),e=$.value.slice(t,t+M.value).map((e,i)=>(e[T].showIndex=i+t,e));return e}),nt=()=>{N.value=A.value.el("wScrollOverflow").getBoundingClientRect(),M.value=Math.ceil(N.value.height/a)+1},ht=async t=>{ot.value.find(e=>t===e[d])||rt(t);const e=ot.value.findIndex(e=>t===e[d]);if(-1===e||e===ot.value.length-1){const e=lt(t),i=$.value.indexOf(e);i>-1&&(await o(),z.value.scrollToY((i+1)*a-N.value.height/2))}},ct=async t=>{if(await o(),h=t,(t=t&&Nt.arrayID(t))&&t.length){for(let e of t)ot.value.find(t=>e===t[d])||rt(e);K&&ht(t[0])}};return L(async()=>{if(H(()=>A.value.wScrollSizeY,t=>{nt()},{immediate:!0}),H(()=>l.children,t=>{$.value=it(t),h&&h==l.current&&ct(l.current)},{immediate:!0}),H(()=>l.current,ct,{deep:!0}),!l.children||0==l.children.length){const t=l.src&&l.src();t&&(Y.value=!0,await t().catch(()=>{}),Y.value=!1)}}),e({toggle:Z,focus:ht,find:lt,merge:t=>{if(!Array.isArray(t))return[];const e=JSON.parse(JSON.stringify(l.children));at(t,e),l.children.length=0,l.children.push.apply(l.children,t),$.value=it(t)}}),(e,i)=>{const l=n("w-horizontal"),r=n("w-img"),o=n("w-vertical");return u(),m(o,{ref_key:"root",ref:z,class:"w-table-v2"},{default:f(()=>[g(l,{class:"w-table-v2-thead",style:F({height:`${I(a)}px`})},{default:f(()=>[(u(!0),c(x,null,v(t.columns,(t,e)=>(u(),c("div",{class:P(["w-table-v2-th",{[`z-align-${t.align}`]:t.align}]),style:F(j(t)),key:e},[p("div",wi,w(t.text),1)],6))),128))]),_:1},8,["style"]),g(o,{ref_key:"wrap",ref:A,height:"*",class:"w-table-v2-tbody","scroll-y":!0,onScroll:tt,onResize:et},{default:f(()=>[B.value?S(e.$slots,"loading",{key:0},()=>[p("div",bi,[g(r,{src:"#f-svg-loading-1",width:"28",height:"28"})])]):(u(),c("div",{key:1,class:"w-table-v2-wrap",style:F(O.value)},[(u(!0),c(x,null,v(ot.value,(i,l)=>(u(),c("div",{key:l,class:P(["w-table-v2-tr",q(i),{"z-on":G(i)}]),style:F(R(i)),onClick:t=>((t,e)=>{K=!1,clearTimeout(J),J=setTimeout(()=>K=!0,500),s("click:item",t,e)})(t,i)},[(u(!0),c(x,null,v(t.columns,(t,s)=>(u(),c("div",{key:s,class:P(["w-table-v2-td",{[`z-align-${t.align}`]:t.align}]),style:F(j(t))},["leaf"==t.type?(u(),c("div",{key:0,class:P(["w-leaf",{"z-folder":Q(i)}]),style:F(W(i))},[X(i)?(u(),m(r,{key:0,src:"#f-svg-loading",class:"w-leaf-loading"})):(u(),c("div",{key:1,class:P(["w-leaf-toggle f-i",i.expanded?"f-i-caret-down":"f-i-caret-right"]),onClick:t=>((t,e)=>{t.stopPropagation(),Z(e)})(t,i)},null,10,yi)),U(i)?(u(),m(r,{key:2,src:U(i),class:"w-leaf-icon"},null,8,["src"])):b("v-if",!0),p("div",{class:"w-leaf-text f-line-1",title:i[t.field]},w(i[t.field]),9,ki)],6)):S(e.$slots,t.field,{key:1,item:i,rowIndex:l,column:t,colIndex:s},()=>[p("div",Si,w(i[t.field]),1)])],6))),128))],14,_i))),128))],4))]),_:3},512)]),_:3},512)}}});Ci.__file="src/widgets/TableV2.vue";var Mi={name:"w-grid",mixins:[ze],props:["columns","rows","gap","defaultColspan","face","labelWidth"],methods:{x_default:()=>({columns:12,gap:0,face:"normal"}),html_slots(){return this.x.scrollX||this.x.scrollY?this.html_scroll_slots():a("div",{class:"w-grid-cont",style:this.html_scroll_cont_style},this.$slots)}},computed:{html_props(){return{class:[this.x.rows?"z-full":"z-auto",this.x.face&&"z-face-"+this.x.face,this.html_scroll_class],style:{"--important-label-width":Nt.unitSize(this.x.labelWidth)}}},html_scroll_cont_style(){let t=this.x.columns;Nt.isNumber(t)&&(t=`repeat(${t}, 1fr)`);let e=this.x.rows;Nt.isNumber(e)&&(e=`repeat(${e}, 1fr)`);let i=this.x.defaultColspan;return{"grid-template-columns":t,"grid-template-rows":e,"grid-gap":"var(--w-grid-gap)","--w-grid-gap":this.x.gap?Nt.unitSize(this.x.gap):"","--w-grid-colspan":-1!=i&&i?`span ${i}`:""}}},__file:"src/widgets/Grid.vue"},Vi={name:"w-swiper-item",pubParentName:"w-swiper",inject:["providePubParent"],mixins:[Ve],props:["lazy"],data:()=>({loaded:!1}),methods:{x_default:()=>({lazy:!0}),html_slots(){return this.loaded||!this.lazy?this.$slots:this.isCurrent?(this.loaded=!0,this.$slots):void 0}},computed:{html_class(){return{"z-on":this.isCurrent}},isCurrent(){return this.pubParent.inCurrent(this)}},__file:"src/widgets/SwiperItem.vue"},Pi={name:"w-swiper",mixins:[Ve,di],props:["arrow","indicatorDots","duration"],data:()=>({focusIndex:null}),watch:{current(t){this.setFocus(t)}},methods:{setFocus(t){let e=this.slots_children().findIndex(e=>this.isCurrentChild(t,e));this.focusIndex=e},getCurrentItem(){if(this.el()){let t=Nt.q(">.w-swiper-cont>.w-swiper-item",this.el())[this.focusIndex];return t&&Nt(t)}},clickArrow(t){this.focusIndex+=t},clickIndicator(t){this.focusIndex=t},html_slots(){null==this.focusIndex&&this.setFocus(this.x.current);let t=this.x.vertical,e=t?"up":"left",i=t?"down":"right";return[a("div",{class:"w-swiper-cont",id:this.uid+"cont"},this.$slots),this.x.arrow&&a("div",{class:"w-swiper-arrow z-"+e,onclick:t=>this.clickArrow(-1)},a("i",{class:"f-i f-i-angle-"+e})),this.x.arrow&&a("div",{class:"w-swiper-arrow z-"+i,onclick:t=>this.clickArrow(1)},a("i",{class:"f-i f-i-angle-"+i})),this.x.indicatorDots&&a("div",{class:"w-swiper-indicator f-flex-center"},this.slots_children().map((t,e)=>a("div",{class:"w-swiper-indicator-dot"+(e==this.focusIndex?" z-on":""),onclick:t=>this.clickIndicator(e)})))]}},computed:{html_class(){let t=this.focusIndex;return{"z-at-first":0==t,"z-at-last":t>-1&&t==this.slots_children().length-1}},html_style(){return{"--w-swiper-translate-x":100*-this.focusIndex+"%","--w-swiper-transition":this.x.duration?`left ${this.x.duration}ms`:0}}},mounted(){this.el("cont")&&new MutationObserver(()=>{this.setFocus(this.x.current)}).observe(this.el("cont"),{childList:!0})},__file:"src/widgets/Swiper.vue"},$i={name:"w-buttonbar",mixins:[Ee,di],props:["vertical"],emits:["click:item"],methods:{x_default(){return{gap:0,valign:this.vertical?null:"middle"}},html_slots(){let t=this.slots_children().concat(),e=this.$slots.split;if(e)for(let i=s.length-1;i>0;i--)t.splice(i,0,e);return this.html_scroll_slots(t)}},computed:{dir(){return this.x.vertical?"v":"h"},html_class(){return[this.x.vertical?"w-vertical":"w-horizontal"]}},__file:"src/widgets/ButtonBar.vue"},zi={name:"w-tabbar",mixins:[$i],props:["vertical","arrow","quickCloseButton","flexSize","buttons"],emits:["click:item","click:quickCloseButton"],data:()=>({resizeObserver:1,isMouseEnter:!1,runButtonFlexWidth:null,runArrow:!1,isClickCloseLastChild:!1}),methods:{onScrollResize(t){this.resizeObserver++},clickArrow(t){this.scrollToX("left"+240*t,240)},closeAll(t){this.$emit("click:quickCloseButton","closeAll")},onMouseenter(t){this.isMouseEnter=!0,this.x.flexSize&&(this.runButtonFlexWidth=this.buttonFlexWidth)},onMouseleave(t){t&&this.hasBubble(t.relatedTarget)||(this.isMouseEnter=!1,this.x.flexSize&&(this.runButtonFlexWidth=null))},onBeforeEnter(t){this.fixQuickCloseButton&&this.el().setAttribute("w-tabbar-fixed-quickclosebutton","")},onAfterEnter(t){this.fixQuickCloseButton&&(this.el().removeAttribute("w-tabbar-fixed-quickclosebutton"),this.resizeObserver++);const e=Nt(t);e&&e.vis&&e.vis()},onBeforeLeave(t){t.nextElementSibling||(this.isClickCloseLastChild=!0,this.fixQuickCloseButton&&this.el().setAttribute("w-tabbar-fixed-quickclosebutton",""),this.isMouseEnter&&this.x.flexSize&&(this.runButtonFlexWidth=null))},onAfterLeave(t){this.isClickCloseLastChild&&(this.isClickCloseLastChild=!1,this.fixQuickCloseButton&&this.el().removeAttribute("w-tabbar-fixed-quickclosebutton"),this.isMouseEnter&&this.x.flexSize&&(this.runButtonFlexWidth=this.buttonFlexWidth))},html_slots(){let t=a(N,{name:"w-tabbar",onBeforeEnter:this.onBeforeEnter,onAfterEnter:this.onAfterEnter,onBeforeLeave:this.onBeforeLeave,onAfterLeave:this.onAfterLeave},{default:()=>this.buttons}),e=[a(this.x.vertical?Le:Ee,{ref:"gut",width:"*",class:"w-tabbar-gut",gap:this.x.gap,align:this.x.align,valign:this.x.valign},{default:()=>t})];if(this.$slots.append&&e.push(a("div",{ref:"append",class:"w-tabbar-append"},this.slot("append"))),this.x.arrow&&(e.unshift(a("div",{class:"w-tabbar-arrow-start",onClick:()=>this.clickArrow(-1)},a("i",{class:"f-i f-i-caret-left"}))),e.push(a("div",{class:"w-tabbar-arrow-end",onClick:()=>this.clickArrow(1)},a("i",{class:"f-i f-i-caret-right"})))),this.x.quickCloseButton){let t=!this.buttons.find(t=>t.props.closable);this.buttons.length&&e.push(a(si,{ref:"quickCloseButton",data:{isQuickCloseButton:!0},showArrowIcon:!1,icon:".f-i .f-i-close",class:"w-tabbar-quickclosebutton",onClick:this.closeAll,disabled:t,title:"关闭全部标签"}))}return this.html_scroll_slots(e)}},computed:{hasScrollX(){return this.x.arrow&&"h"===this.dir||this.x.scrollX},showArrow(){if(this.x.arrow){if(this.x.flexSize){let t=this.buttonCalcWidth;return t&&t<this.x.flexSize[0]}return this.wScrollPercentX}},fixQuickCloseButton(){if(this.x.quickCloseButton&&this.x.flexSize){let t=this.buttonCalcWidth;return t&&t<this.x.flexSize[1]}},gutWidth(){const t=this.x.arrow&&this.wScrollPercentX;if(this.resizeObserver&&this.el()){let e=this.el().clientWidth;return t&&(e-=40),this.x.quickCloseButton&&(e-=20),this.$refs.append&&(e-=this.$refs.append.offsetWidth),e}},buttonCalcWidth(){if(this.x.flexSize){let t,e=this.buttons.length,i=this.gutWidth;return i&&e&&(t=i/e),t}},buttonFlexWidth(){if(this.x.flexSize){let t=this.x.flexSize[0],e=this.x.flexSize[1],i=e;return this.buttonCalcWidth&&(i=Nt.numRange(this.buttonCalcWidth,t,e)),i+1}},html_props_on(){return{onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave}},html_class(){return[this.x.vertical?"w-vertical":"w-horizontal",{"z-arrow":this.x.arrow,"z-quickclosebutton":this.x.quickCloseButton,"z-flexsize":this.x.flexSize,"z-show-arrow":this.showArrow}]},html_style(){const t={};return this.x.flexSize&&(t["--w-tabbar-flex-width"]=`${this.runButtonFlexWidth||this.buttonFlexWidth}px`),t}},mounted(){if(this.x.flexSize&&this.$refs.gut){new ResizeObserver(()=>this.resizeObserver++).observe(this.$refs.gut.el());let t=this.$watch(()=>this.buttons.length,e=>{e&&this.$nextTick(()=>{t(),setTimeout(()=>{const t=this.el();t&&t.setAttribute("w-tabbar-flex-all","")},150)})},{immediate:!0})}},__file:"src/widgets/TabBar.vue"},Di={name:"w-tabbutton",pubParentName:"w-tabbar",mixins:[si],methods:{vis(){let t=[20,20];this.pubParent.x.quickCloseButton&&(t[1]+=20),this.scrollIntoView({x:`nearest${t}`,y:null})}},computed:{html_class:()=>"w-button"},mounted(){this.$watch("isCurrent",t=>t&&this.vis(),{immediate:!0})},__file:"src/widgets/TabButton.vue"},Ei={name:"w-tabs",mixins:[Ve],props:["current","position","gap","face","quickCloseButton","flexSize"],emits:["click:quickCloseButton"],methods:{x_default:()=>({position:"top",face:"line",gap:-1}),clickTab(t){const e=Nt(t);!e.data||e.data.isQuickCloseButton},clickQuickCloseButton(t){this.$emit("click:quickCloseButton",t)},html_slots(){let t=[],e=[],i=this.x.position;return this.slots_children().forEach((i,s)=>{i.props&&null!=i.props.key||Nt.lodash.set(i,"props.key",s),t.push(a(Di,i.props)),e.push(a(Vi,{lazy:null==i.props.lazy||i.props.lazy,key:i.props.key},i.children))}),[a(zi,{ref:"tabBar",class:"w-tabs-buttonbar",current:this.x.current,gap:this.x.gap,vertical:"left"==i||"right"==i,arrow:!0,flexSize:this.x.flexSize,quickCloseButton:this.x.quickCloseButton,"onClick:item":this.clickTab,"onClick:quickCloseButton":this.clickQuickCloseButton,buttons:t},this.$slots),a(Pi,{class:"w-tabs-swiper f-flex-1 f-oh",current:this.x.current},{default:()=>e})]}},computed:{tabBar(){return this.$refs.tabBar},html_class(){let t=this.x.position;return"f-oh f-flex"+("top"==t||"bottom"==t?"-column":"")+" z-pos-"+t+" z-face-"+this.x.face}},__file:"src/widgets/Tabs.vue"},Li={name:"w-tab",__file:"src/widgets/Tab.vue"},Ai={name:"w-album",mixins:[Ee,di],methods:{x_default:()=>({gap:0,br:!0,valign:"top"})},computed:{html_class:()=>"w-horizontal"},__file:"src/widgets/Album.vue"},Hi={name:"w-html",mixins:[Ve,De],props:["line"],computed:{html_props(){let t=this.x.line;return{class:[(this.x.align||this.x.valign)&&"w-horizontal",null!=t&&"f-line",this.html_align_class],style:null!=t&&{"-webkit-line-clamp":t}}}},__file:"src/widgets/Html.vue"},Fi={name:"w-tree",mixins:[ze,di,Gt],emits:["click:item"],provide(){return{provideLevel:-1,provideParentLeaf:null,provideParentTR:null,provideTripleboxContainer:this}},methods:{load(){return this.request()},getCurrent(){const t=Nt.q(".w-leaf.z-on",this.el())[0];return t&&Nt(t)},viewCurrent(t){this.$nextTick(()=>{(t=t||this.getCurrent())&&(t.expandToView(),this.$nextTick(()=>t.scrollIntoView()))})},html_slots(){let t;if(this.loading){const e=this.slot("loading");t=e&&e.length?e:a("div",{class:"w-tree-loading"},a(ti,{src:"#f-svg-loading-1",width:28,height:28}))}else{let e=this.x.children;this.$slots.default&&(t=Array.isArray(e)?e.map((t,e)=>{let i;const s=this.$slots.default({item:t,index:e});for(let t of s)i||(i=t.key);return i?a(pi,{key:i},{default:()=>s}):s}):[])}return this.html_scroll_slots(t)}},computed:{level:()=>-1,html_props(){return{class:this.html_scroll_class}}},mounted(){this.x.children&&this.x.children.length||this.request()},__file:"src/widgets/Tree.vue"};const Ii={class:"w-tree-loading w-tree-v2-loading"},Ni=["onClick"],Yi=["onClick"],Bi={class:"w-leaf-text f-line-1"},Oi=["title"],ji={name:"w-tree-v2"};var qi=Object.assign(ji,{props:{alias:{type:Object,default:()=>({})},children:{type:Array,default:()=>[]},current:{type:[String,Number,Array]},itemHeight:{type:[String,Number],default:32},src:{type:Function},loading:{type:Boolean}},emits:["click:item"],setup(t,{expose:e,emit:i}){const s=i,l=t;let{alias:r,itemHeight:a,current:h}=l;const d=r.value||"id",_=r.text||"text",y=r.children||"children",T=r.class||"class",M=r.disabled||"disabled",V=Symbol("leaf"),$=D(0),z=D(0),A=D([]),N=D(),Y=D(),B=D(!1),O=C(()=>l.loading||B.value);k("provideTripleboxContainer",E);const j=C(()=>({height:A.value.length*a+"px"})),q=(t,e)=>"function"==typeof T?T(t,e):t[T],R=t=>({height:`${a}px`,top:t[V].showIndex*a+"px",paddingLeft:16*t[V].level+"px"}),W=t=>X(t)?t.expanded?t.expandedIcon:t.collapsedIcon:t.icon,U=t=>t[V].loading,X=t=>t[y]&&t[y].length||t[V].src&&!t[V].loaded,Q=t=>Array.isArray(l.current)?l.current.includes(t[d]):l.current===t[d],G=(t,e)=>"function"==typeof M?M(t,e):t[M];let J,K=!0;const Z=async(t,e)=>{if("string"==typeof t&&(t=lt(t)),!t)return;const i=t[V];if(!i.loading)if(t.expanded=null!=e?e:!t.expanded,t.expanded)if(t[y]){const e=A.value.indexOf(t),i=it(t[y],t),s=A.value.slice(0,e+1),l=A.value.slice(e+1);A.value=s.concat(i,l)}else i.src&&!i.loaded&&(i.loading=!0,await i.src().catch(()=>{}),i.loading=!1,i.loaded=!0,Z(t,t.expanded));else{const e=A.value.indexOf(t),i=st(t[y]),s=A.value.slice(0,e+1),l=A.value.slice(e+1+i);A.value=s.concat(l)}},tt=t=>{z.value!==t.target.scrollTop&&(z.value=t.target.scrollTop)},et=()=>{nt()},it=(t,e)=>{let i=[];return t&&t.forEach(t=>{i.push(t);const s=t[V];s||(t[V]={level:e?e[V].level+1:0,parent:e,src:l.src&&l.src(t)}),t[y]&&t[y].length?t.expanded?i=i.concat(it(t[y],t)):s||it(t[y],t):t.expanded&&t[V].src&&o(()=>Z(t,!0))}),i},st=t=>{let e=0;for(let i of t)e++,i[y]&&i.expanded&&(e+=st(i[y]));return e},lt=(t,e)=>{if(t&&t[V])return t;e||(e=l.children);for(let i of e){if(i[d]===t)return i;if(i[y]&&i[y].length){const e=lt(t,i[y]);if(e)return e}}},rt=t=>{const e=lt(t);if(e){let t=e,i=t;for(;t=t[V].parent;)t.expanded||(t.expanded=!0,i=t);i&&i!=e&&Z(i,!0)}return e},at=(t,e)=>{for(let i of t){let t=e.find(t=>t[d]===i[d]);t&&(t[y]&&(i[y]?at(i[y],t[y]):i[y]=t[y]),null!=t.expanded&&(i.expanded=t.expanded))}},ot=C(()=>{const t=Math.floor(z.value/a),e=A.value.slice(t,t+$.value).map((e,i)=>(e[V].showIndex=i+t,e));return e}),nt=()=>{Y.value=N.value.el("wScrollOverflow").getBoundingClientRect(),$.value=Math.ceil(Y.value.height/a)+1},ht=async t=>{await o(),ot.value.find(e=>t===e[d])||rt(t);const e=ot.value.findIndex(e=>t===e[d]);if(-1===e||e===ot.value.length-1){const e=lt(t),i=A.value.indexOf(e);i>-1&&(await o(),N.value.scrollToY((i+1)*a-Y.value.height/2))}},ct=async t=>{if(await o(),h=t,(t=t&&Nt.arrayID(t))&&t.length){for(let e of t)ot.value.find(t=>e===t[d])||rt(e);K&&ht(t[0])}};return L(async()=>{if(H(()=>N.value.wScrollSizeY,t=>{nt()},{immediate:!0}),H(()=>l.children,t=>{A.value=it(t),h&&h==l.current&&ct(l.current)},{immediate:!0}),H(()=>l.current,ct,{deep:!0}),!l.children||0==l.children.length){const t=l.src&&l.src();t&&(B.value=!0,await t().catch(()=>{}),B.value=!1)}}),e({toggle:Z,focus:ht,find:lt,merge:t=>{if(!Array.isArray(t))return[];const e=JSON.parse(JSON.stringify(l.children));at(t,e),l.children.length=0,l.children.push.apply(l.children,t),A.value=it(t)}}),(t,e)=>{const i=n("w-img"),l=n("w-vertical");return u(),m(l,{ref_key:"root",ref:N,class:"w-tree w-tree-v2","scroll-y":!0,onScroll:tt,onResize:et},{default:f(()=>[O.value?S(t.$slots,"loading",{key:0},()=>[p("div",Ii,[g(i,{src:"#f-svg-loading-1",width:"28",height:"28"})])]):(u(),c("div",{key:1,class:"w-tree-v2-wrap",style:F(j.value)},[(u(!0),c(x,null,v(ot.value,(e,l)=>(u(),c("div",{key:l,class:P(["w-leaf w-leaf-v2",q(e,l),{"z-folder":X(e),"z-on":Q(e),"z-ds":G(e,l)}]),style:F(R(e)),onClick:t=>((t,e)=>{G(e)||(K=!1,clearTimeout(J),J=setTimeout(()=>K=!0,500),s("click:item",t,e))})(t,e)},[U(e)?(u(),m(i,{key:0,src:"#f-svg-loading",class:"w-leaf-loading"})):(u(),c("div",{key:1,class:P(["w-leaf-toggle f-i",e.expanded?"f-i-caret-down":"f-i-caret-right"]),onClick:t=>((t,e)=>{t.stopPropagation(),Z(e)})(t,e)},null,10,Yi)),S(t.$slots,"box",{item:e}),W(e)?(u(),m(i,{key:2,src:W(e),class:"w-leaf-icon"},null,8,["src"])):b("v-if",!0),p("div",Bi,[S(t.$slots,"text",{item:e},()=>[p("span",{title:e[I(_)]},w(e[I(_)]),9,Oi)])])],14,Ni))),128))],4))]),_:3},512)}}});qi.__file="src/widgets/TreeV2.vue";var Ri={name:"w-label",mixins:[Ve,De],props:["text","suffix","vertical"],methods:{html_slots(){return a("label",{class:"w-label-text"},a("span",this.$slots.default?this.$slots.default():this.x.text+(null==this.x.suffix?"":this.x.suffix)))}},computed:{html_class(){return this.x.vertical&&(this.$parent.labelVertical=!0),["f-oh f-br"+(this.x.vertical?" z-vertical":""),this.html_align_class]},html_style(){return{width:null,"--label-width":this.x.width&&Nt.unitSize(this.x.width)}}},__file:"src/widgets/Label.vue"},Wi={mixins:[Ve,De],props:["name","value","modelValue","placeholder","label","readonly","readonlyValidate","disabled","required","validateDefault","validateHandler","inputWidth","inputHeight"],emits:["update:modelValue","change","blur","focus"],data(){let t=this.modelValue;return{isFormWidget:!0,isFocus:!1,hasBorder:!1,isPlural:!1,isEdit:!1,loading:!1,warnClass:"",labelVertical:!1,modifiedValue:t,defaultValue:t,placeholder_type:"",validIndex:0}},watch:{modelValue(t,e){this.isEdit?this.isEdit=!1:(null==t&&(t=""),null==e&&(e=""),this.watchModelValue(t,e))}},methods:{val(t,e){if(0==arguments.length)return this.x.modelValue;let i=this.x.modelValue;this.x.modelValue=t,null==i&&(i=""),null==t&&(t="");let s=i!==t;if("object"==typeof i&&(s=JSON.stringify(i)!=JSON.stringify(t)),s&&(this.warnClass&&this.warn(!1),this.isUsableVal(t))){this.isEdit=!0,this.$emit("update:modelValue",t);const i=this.createEvent("change",{originalEvent:e});this.trigger(i,t)}return t},formVal(){return this.input_value},isUsableVal:t=>!0,defaultRuleValue(t){let e=this.rules[t];if(null!=e)return Array.isArray(e)&&(e=e[0]),e&&e.value?e.value:e},watchModelValue(t,e){e!=t&&this.trigger("change",t)},async valid(t){let e=await this.getValidError(t);return e&&(this.warn(),this.showErrorTip(e.text)),!e},async getValidError(t,e){let i=t?this.validTriggers[t]:this.validQueues;if(i&&(this.isNormal||this.isReadonly&&this.x.readonlyValidate)){let t=void 0!==e?e:this.isPlural?this.groupFormVal():this.formVal();"string"!=typeof t&&(t=Array.isArray(t)?t.join(","):null==t?"":""+t),t=t.trim();let s=this.validHooks;for(let e of i){let i="object"!=typeof e.rule?e.rule:void 0!==e.rule.value?e.rule.value:e.rule,l=await s[e.type](t,i,e);if(l)return l}}},getValidErrorSync(t,e){let i=t?this.validTriggers[t]:this.validQueues;if(i&&(this.isNormal||this.isReadonly&&this.x.readonlyValidate)){let s=void 0!==e?e:this.isPlural?this.groupFormVal():this.formVal();"string"!=typeof s&&(s=Array.isArray(s)?s.join(","):null==s?"":""+s),s=s.trim();let l=this.validHooks;for(let e of i){let i="object"!=typeof e.rule?e.rule:void 0!==e.rule.value?e.rule.value:e.rule;if(!e.rule||e.rule.trigger==t){let t=l[e.type](s,i,e);if(t&&!(t instanceof Promise))return t}}}},formErr(t,e){let i=this.getLabelText(),s=t.type,l=t.rule&&t.rule.text;return l||(l=Nt.loc.ps.apply(null,[Nt.loc.form[s],i||""].concat(null!=e&&""!==e?e:[]))||""),{wid:this.uid,name:this.x.name,type:s,label:i,text:l}},warn(t){let e="string"==typeof t?t:!1!==t?"z-err":"";this.warnClass=e,!e&&this._tip&&this._tip.close()},showErrorTip(t){this.scrollIntoView({ease:200,success:()=>{this.pop("w-tip",{text:t,face:"warn",independent:!0,snap:this.errorTipTarget,onClose:()=>this._tip=null},t=>{this._tip=t})}})},focus(){return this.$refs.v.focus(),this},formText(){let t=this.val();return null==t?"":t},getLabelText(){let t=this.x.label||this.pubParent&&this.pubParent.x.label;return t?t.text||t:""},onCloseDrop(){this.showDrop=!1},mergeDropProps(t){return this.x.dropProps&&(t=r(t,this.x.dropProps)),t.onClose=()=>{this.onCloseDrop(),this.x.dropProps&&this.x.dropProps.onClose&&this.x.dropProps.onClose()},t},oninput(t){this.val(t.target.value),this.baseValid("change")},baseFocus(t){this.isFocus=!0,this.warn(!1),this.trigger(t),this.baseValid("focus")},baseBlur(t){this.isFocusTarget(t.relatedTarget)||(this.isFocus=!1),this.trigger(t),this.baseValid("blur")},baseValid(t){this.validTriggers[t]&&(clearTimeout(this._baseValidTimer),this._baseValidTimer=setTimeout(()=>{if(!this.$.isUnmounted&&!this.$.isDeactivated){(new Date).getTime()-Ke.time>100&&this.valid(t)}},100))},snapElem(){return this.el("form")},hasBubble(t){return this.snapElem().contains(t.isWidget?t.el():t)},isFocusTarget(t){},getInputValue:t=>t,isModified(t){let e=t?this.defaultValue:this.modifiedValue,i=this.x.modelValue;return null==e&&(e=""),null==i&&(i=""),e!=i&&this.getInputValue(e)!=this.getInputValue(i)},saveModified(t){this.modifiedValue=Nt.lodash.clone(this.x.modelValue),t&&(this.defaultValue=this.modifiedValue)},reset(t){this.warn(!1),this.val(t||null==this.defaultValue?"":this.defaultValue)},html_label(){if(this.$slots.label)return this.$slots.label();if(this.x.label&&"object"==typeof this.x.label){const t=Nt.cloneDeep(this.x.label);if(null==t.width&&delete t.width,0!=t.width)return a(Ri,t)}},html_input(){return a(this.input_tag,{class:"w-input-value",ref:"v",id:this.uid+"v",type:this.input_type,name:this.input_name,value:this.input_value,readonly:this.isReadonly,disabled:this.isDisabled,placeholder:this.input_placeholder,autocomplete:"off",oninput:this.oninput,onfocus:this.baseFocus,onblur:this.baseBlur,...this.input_prop})},html_input_hidden(){return this.x.name?a("input",{type:"hidden",ref:"v",name:this.input_name,value:this.input_value,disabled:this.isDisabled,class:"f-hide"}):[]},html_button:()=>[],html_form_slot(){return[this.slot("prepend"),this.html_input(),this.html_button(),this.slot("append")]},html_slot_down(){return this.slot("down")},html_main(){return a("div",{class:"w-formbase-main"},[this.html_form(),this.html_slot_down()])},html_form(){let t=this.x.inputHeight&&Nt.unitSize(this.x.inputHeight);return a("div",r({ref:"form",id:this.uid+"form",class:["w-input",{"w-input-border":this.hasBorder,[`f-${this.dir}-gap`]:Nt.br.compat.gap&&this.x.gap}],style:{height:t},title:this.input_title},this.form_prop),this.html_form_slot())},html_slots(){return[this.html_label(),this.html_main(),this.slot("right")]}},computed:{rules(){return this.x},pubValidHooks(){return{required:(t,e,i)=>{if(e&&!t)return this.formErr(i)},pattern:(t,e,i)=>{if(t&&e&&("string"==typeof e?!Nt.eval(`${e}.test(v)`,{rule:e,v:t}):e.test&&!e.test(t)))return this.formErr(i)},validateHandler:async(t,e,i)=>{let s=e&&e(t);if(s){let t=await s;if(t)return this.formErr({type:"validateHandler",rule:{text:t}})}}}},validHooks(){return this.pubValidHooks},validQueues(){let t=[],e="validateDefault";this.validHooks[e]&&t.push({type:e});for(let e in this.validHooks)if(!t.includes(e)){let i=this.rules[e];null!=i&&(Array.isArray(i)?i.forEach(i=>t.push({type:e,rule:i})):t.push({type:e,rule:i}))}return t},validTriggers(){let t={};return Object.keys(this.validHooks).forEach(e=>{let i=this.rules[e];if(i)if(Array.isArray(i))for(let s of i)s.trigger&&(t[s.trigger]||(t[s.trigger]=[])).push({type:e,rule:s});else i.trigger&&(t[i.trigger]||(t[i.trigger]=[])).push({type:e,rule:i})}),t},input_value(){return this.getInputValue(this.x.modelValue)},input_name(){return this.x.name},input_tag:()=>"input",input_type:()=>"text",input_title(){},input_prop(){},input_placeholder(){if(!this.isNormal)return;let t=this.x.placeholder;return null==t&&Nt.x.autoPlaceholder&&this.x.label&&(t=Nt.loc.ps(Nt.loc[this.placeholder_type||"placeholder_input"],this.x.label.text||this.x.label)),t},form_prop(){},hasVal(){return null!=this.x.modelValue&&""!==this.x.modelValue},isNormal(){return!this.isReadonly&&!this.isDisabled},isDisabled(){return!!this.x.disabled},isReadonly(){return!!this.x.readonly},errorTipTarget(){return this},hasClassSlotDown(){return!!this.$slots.down},html_on(){},html_props(){return this.x.inputWidth&&Nt.unitSize(this.x.inputWidth),{class:["w-formbase",this.warnClass,this.html_align_class,{"z-on":this.isFocus,"z-ds":!this.isNormal,"z-req":this.rules.required,"z-label-vertical":this.labelVertical,"z-slot-down":this.hasClassSlotDown}],...this.html_on}}},__file:"src/widgets/FormBase.vue"};const{leafSymbol:Ui,changeSymbol:Xi}=Nt.symbol;var Qi={name:"w-checkbox",pubParentName:"w-checkboxgroup",mixins:[Wi],props:["text","checked","partialSubmit","minSize","maxSize"],inject:["providePubParent","provideBoxParent"],emits:["change","update:checked","click"],data:()=>({isPlural:!0,indeterminate:!1,modifiedChecked:!1,defaultChecked:!1}),created(){this.provideBoxParent&&(this.provideBoxParent.boxProxy=this),this.defaultChecked=this.isChecked,this.modifiedChecked=this.isChecked},methods:{val(t,e){if(0==arguments.length)return this.getVal();const i=this.createEvent("change",{target:this.$refs.v,originalEvent:e});this.setVal(t,i)},getVal(){return this.isChecked?this.value:""},setVal(t,e){this.pubParent;let i=this.checkValue,s="radio"===this.input_type,l=this.x.modelValue;l=s?t?Nt.string(i):"":t?Nt.idsAdd(l,i):Nt.idsRemove(l,i),this.x.modelValue=l,s&&this.siblings().forEach(t=>t.x.modelValue=l),this.$emit("update:modelValue",l),this.trigger(e,l),this.parentTrigger(e,l)},formVal(){return!this.isDisabled&&this.isChecked?this.x.value:""},groupFormVal(t){if(null==t){let t=[];return Nt.lodash.each(this.siblings(null,!0),e=>{let i=e.formVal();null!=i&&""!==i&&t.push(i)}),t.join(",")}Array.isArray(t)&&(t=t.join(",")),Nt.lodash.each(this.siblings(),e=>e.val(Nt.idsAny(t,e.checkValue)))},watchModelValue(t,e){e!=t&&this.parentTrigger("change",t)},getInputValue:t=>null==t?"":t,parentTrigger(t,e){this.pubParent&&this.pubParent.watchValue!=e&&(this.pubParent.watchValue=e,this.pubParent.trigger(t,e))},check(t){this.isNormal&&this.val(t)},siblingsContainer(){return this.ownerView.el()},siblings(t,e){return Nt.lodash.map(Nt.q(':input[name="'+this.input_name+'"]:not([w-form-ignore] :input)'+(e?":not(:disabled)":"")+(!0===t?":checked":!1===t?":not(:checked)":t||""),this.siblingsContainer()),t=>Nt(t))},relate(){},reset(t){this.pubParent?this.pubParent.reset(t):this.val(!(t||!this.defaultChecked))},onclick(t){t.stopPropagation()},onbasechange(t){this.warnClass&&this.siblings().forEach(t=>t.warn&&t.warn(!1)),this.setVal(t.target.checked,t)},onchange(t){this.onbasechange(t)},isModified(t){return(t?this.defaultChecked:this.modifiedChecked)!=this.isChecked},saveModified(t){this.modifiedChecked=this.isChecked,t&&(this.defaultChecked=this.modifiedChecked)},snapElem(){return this.el()},html_input(){return[a(this.input_tag,{ref:"v",class:"w-input-value",type:this.input_type,name:this.input_name,value:this.input_value,checked:this.isChecked,disabled:this.isDisabled,onclick:t=>{this.isNormal?(this.indeterminate=!1,this.x.cancelable&&this.isChecked&&(t.preventDefault(),this.val(!1),setTimeout(()=>{this.$refs.v.checked=!1}))):t.preventDefault()},onchange:this.onchange,...this.input_prop}),a("em",{ref:"appear",class:this.$options.name+"-appear"},a("i",{class:this.input_icon})),this.$slots.text||this.x.text?a("span",{class:this.$options.name+"-text"},this.$slots.text?this.$slots.text():this.x.text):null]},html_main(){return a("label",{class:"w-input",onclick:this.onclick},this.html_input())},html_target(){return this.$slots.default?a(Ee,{class:this.$options.name+"-target",width:"*",ref:"target"},this.$slots):[]},html(){return this.$slots.default?[this.html_self(!0),this.html_target()]:this.html_self()}},computed:{validHooks(){return{...this.pubValidHooks,minSize:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&t.split(",").length<Nt.number(e))return this.formErr(i,[e])},maxSize:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&t.split(",").length>Nt.number(e))return this.formErr(i,[e])}}},rules(){return{required:null!=this.x.required?!!this.x.required:!(!this.pubParent||!this.pubParent.x.required),minSize:null!=this.x.minSize?this.x.minSize:this.pubParent&&this.pubParent.x.minSize,maxSize:null!=this.x.maxSize?this.x.maxSize:this.pubParent&&this.pubParent.x.maxSize}},input_type:()=>"checkbox",input_name(){return this.x.name||this.pubParent&&this.pubParent.x.name},input_value(){return null==this.x.value?"":this.x.value},isIndeterminate(){return this.data&&this.data[Ui]?this.data[Ui].indeterminate:this.indeterminate},input_prop(){return{indeterminate:this.isIndeterminate,"w-partialsubmit":this.x.partialSubmit?1:null,"w-all":this.x.all?"":null}},input_icon:()=>"f-i f-i-check",checkValue(){return this.x.value},isChecked(){return Nt.idsAny(this.x.modelValue,this.checkValue)},isDisabled(){return null!=this.x.disabled?!!this.x.disabled:this.pubParent&&this.pubParent.disabled},isReadonly(){return null!=this.x.readonly?!!this.x.readonly:this.pubParent&&this.pubParent.readonly},html_class(){return{"z-half":this.isIndeterminate,"z-target":!!this.$slots.default,"z-checked":this.isChecked}}},mounted(){this.$refs.target&&this.$watch(()=>this.x.modelValue,t=>{this.siblings().forEach(t=>{let e=t.$refs.target;e&&this.ownerView.fAll(null,e.$el).forEach(e=>e.x.disabled=!t.isChecked)})},{immediate:!0})},__file:"src/widgets/CheckBox.vue"};const{leafSymbol:Gi}=Nt.symbol;var Ji={name:"w-triplebox",mixins:[Qi],props:["all"],inject:["provideTripleboxContainer"],created(){if(this.provideBoxParent){if(this.data&&!this.data[Gi]){const t=this.provideBoxParent.provideParentLeaf,e=t&&t.boxProxy&&t.boxProxy.data,i=C(()=>{if(this.data.children&&this.data.children.length){let t,e;const i=this.x.modelValue;for(let s of this.data.children){if(!s[Gi])return!1;if(s[Gi].indeterminate)return!0;Nt.idsAny(i,s[Gi].checkValue)?t=!0:e=!0}return!(!t||!e)}return!1});this.data[Gi]={parent:e,checkValue:this.value,indeterminate:i}}}else this.$watch(()=>this.x.modelValue,(t,e)=>{(null!=t&&""!==t||null!=e&&""!==e)&&(this.x.all||this.relate())})},methods:{getVal(){let t=this.checkstate();return 1==t||this.x.partialSubmit&&2==t?this.value:""},checkDescendant(t,e,i){if(t.children)for(let s of t.children){const t=s[Gi];e=i?Nt.idsAdd(e,t.checkValue):Nt.idsRemove(e,t.checkValue),e=this.checkDescendant(s,e,i)}return e},checkAncestor(t,e){const i=t.children.find(t=>!Nt.idsAny(e,t[Gi].checkValue));return e=i?Nt.idsRemove(e,t[Gi].checkValue):Nt.idsAdd(e,t[Gi].checkValue),t[Gi].parent&&(e=this.checkAncestor(t[Gi].parent,e)),e},setVal(t,e){this.pubParent;let i=this.checkValue,s=this.x.modelValue;if(s=t?Nt.idsAdd(s,i):Nt.idsRemove(s,i),this.data){this.data.children&&(s=this.checkDescendant(this.data,s,t));const e=this.data[Gi];e.parent&&(s=this.checkAncestor(e.parent,s,t))}this.x.modelValue=s,this.$emit("update:modelValue",s),this.x.all||this.parentTrigger(e,this.groupFormVal())},formVal(){if(this.isDisabled)return"";let t=this.checkstate();return 1==t||this.x.partialSubmit&&2==t?this.$refs.v.value:""},siblingsContainer(){let t=this.provideTripleboxContainer;return t&&t.el()||this.ownerView.el()},parentTrigger(t,e){let i=this.provideTripleboxContainer,s=i&&i.el();e&&(e=e.split(",").sort().join(",")),s&&s.getAttribute("wTripleboxValue")!=e&&(s.setAttribute("wTripleboxValue",e),this.trigger(t,e))},onchange(t){this.onbasechange(t),this.relate()},checkstate(t){let e=this.indeterminate?2:this.isChecked?1:0;if(null==t)return e;this.val(1==t),this.indeterminate=2==t},isPartial(){return 2==this.checkstate()},relate(){if(this.x.name&&Nt.q(`[name="${this.x.name}"][w-all]`,Nt.el(this.ownerView))[0]){const n=this.ownerView.fAll(this.x.name);for(var t,e=0,i=this.isPartial(),s=n.length,l=s,r=0,a=0,o=0;e<s;e++)if(n[e].isNormal)if(this.x.all)if(this!=n[e]){if(i){this.checkstate(n[e].checkstate());break}n[e].checkstate(this.isChecked?1:0)}else 1==s&&(t=this);else n[e].x.all?t=n[e]:n[e].isChecked?a++:n[e].isPartial()?o++:r++;else l--;t&&(r+a+o||1==s)&&t.checkstate(r==l-1?0:a==l-1?1:2)}},check(t){if(!this.isNormal)return;this.checkstate()!=t&&(this.checkstate(t),this.relate())}},computed:{checkValue(){return this.x.all?"checked":this.x.value}},mounted(){},__file:"src/widgets/TripleBox.vue"},Ki={name:"w-leaf",pubParentName:"w-tree",mixins:[Ve,Gt],props:["text","expanded","expandedIcon","collapsedIcon","icon","boxSync","src","disabled"],inject:["providePubParent","provideLevel","provideParentLeaf","provideParentTR"],emits:["click"],provide(){return{provideParentLeaf:this,provideLevel:this.provideLevel+1,provideBoxParent:this}},data(){return{hover:!1,loading:!1,loaded:this.getInitLoaded()}},methods:{hasChild(){let t=(this.x||this.$props).children;if(!0===t||Array.isArray(t)&&t.length)return!0},childrenList(){return Nt.lodash.map(this.$refs.cont.querySelectorAll(":scope > .w-leaf"),t=>Nt(t))},getInitLoaded(){return!(!this.hasChild()&&this.getSrc())},isExpanded(){return this.provideParentTR?this.provideParentTR.isExpanded():this.x.expanded},setExpanded(t){this.x.expanded=null!=t?t:!this.x.expanded},isFolder(){return!!this.hasChild()||!(!this.getSrc()||this.loaded)},toggle(t,e){(this.provideParentTR||this).setExpanded(t),this.isExpanded()&&!this.loaded?this.request(e):e&&this.$nextTick(e)},onmouseenter(t){!this.x.disabled&&this.el().classList.add("z-hv")},onmouseleave(t){this.el().classList.remove("z-hv")},onclick(t){this.x.disabled||(this.boxProxy&&this.x.boxSync&&this.boxProxy.check(!this.boxProxy.isChecked),this.$emit("click",t))},triple(){if(!this.boxProxy||"w-triplebox"!==this.boxProxy.$options.name)return;let t=this;for(;(t=t.provideParentLeaf)&&"w-leaf"===t.$options.name;)if(t.boxProxy){let e=t.childrenList(),i=[0,0,0],s=e.length;e.forEach(t=>{let e=t.boxProxy;e&&i[e.checkstate()]++}),t.boxProxy.check(i[0]===s?0:i[1]===s?1:2)}let e=this.boxProxy.checkstate();2!=e&&this.tripleAll(e)},tripleAll(t){this.childrenList().forEach(e=>{e.boxProxy&&(e.boxProxy.check(t),e.tripleAll(t))})},expandToView(){let t=this;for(;(t=t.provideParentLeaf)&&t.$options.name===this.$options.name;)t.toggle(!0)},html_self(){let t=this.isExpanded(),e=this.isFolder()?t?this.x.expandedIcon:this.x.collapsedIcon:this.x.icon;return a("div",r(this.html_attrs,this.html_props,this.$attrs),[this.loading?a(ti,{src:"#f-svg-loading",class:"w-leaf-loading"}):a("div",{ref:"toggle",class:["w-leaf-toggle f-i",t?"f-i-caret-down":"f-i-caret-right"],onclick:t=>{t.stopPropagation(),this.toggle()}}),this.$slots.box&&this.$slots.box(),e&&a(ti,{src:e,class:"w-leaf-icon"}),a("div",{class:"w-leaf-text f-line-1",title:this.x.text},this.$slots.text?this.$slots.text():this.x.text)])},html_cont(){let t,e=this.x.children,i=this.pubParent;return Array.isArray(e)&&i&&(t=e.map((t,e)=>{let s;const l=i.$slots.default({item:t,index:e});for(let t of l)s||(s=t.key);return s?a(pi,{key:s},{default:()=>l}):l})),a("div",{id:this.uid+"cont",ref:"cont",class:"w-leaf-cont",style:{display:this.x.expanded?"":"none"}},t)},html(){return[this.html_self(),this.html_cont()]}},computed:{tree(){return this.pubParent},level(){return this.provideParentTR?this.provideParentTR.level:this.provideLevel+1},isCurrent(){return this.pubParent&&this.pubParent.inCurrent(this)},html_props(){let t=this.isExpanded(),e=this.isFolder(),i=!!this.x.disabled,s={class:{"z-on":this.isCurrent,"z-ds":i,"z-folder":e,"z-expanded":e&&t,"z-collapse":e&&!t},style:"padding-left:"+Nt.unitSize(16*this.level)};return this.pubParent&&(s.onmouseenter=this.onmouseenter,s.onmouseleave=this.onmouseleave,s.onclick=this.onclick),s}},mounted(){this.x.expanded&&this.toggle(!0),this.isCurrent&&this.pubParent.viewCurrent(this)},__file:"src/widgets/Leaf.vue"},Zi={name:"w-pagebar",mixins:[$i],emits:["click:item"],props:["limit","size","offset","buttonCount","noFirstLast","face","jump"],data:()=>({isJumpFocus:!1,showDrop:!1}),methods:{x_default:()=>({limit:1,size:0,offset:0,buttonCount:5,face:"normal",gap:0,valign:"middle"}),inCurrent(t){return this.currentPage==t.text},clickItem(t,e){let i=(e-1)*this.x.limit;i!=this.x.offset&&(t.runType="click:item",t.value=i,this.trigger(t,i))},clickDrop(t){this.showDrop=!0},onJumpClick(t){let e=Math.max(0,Nt.number(this.$refs.jumpInput.value));this.clickItem(t,e)},html_button(t,e,i,s){return a("button",{class:["w-pagebar-button w-pagebar-num",{"z-on":!e&&!i&&t==this.currentPage,"z-ds":s,[i]:i}],disabled:s,onclick:e=>this.clickItem(e,t)},e||(i?"":t))},html_slots(){return"button"===this.x.face?this.html_face_button():"simple"===this.x.face?this.html_face_simple():this.html_face_normal()},html_buttons(){return[a(si,{class:"w-pagebar-button w-pagebar-prev",icon:".f-i .f-i-angle-left",disabled:1==this.currentPage,title:Nt.loc.page_text.prev,onclick:t=>this.clickItem(t,this.currentPage-1)}),a(si,{class:"w-pagebar-button w-pagebar-next",icon:".f-i .f-i-angle-right",disabled:this.currentPage==this.sumPage,title:Nt.loc.page_text.next,onclick:t=>this.clickItem(t,this.currentPage+1)})]},html_drop(){let t=[];if(this.x.buttonCount&&t.push(a(si,{class:"w-pagebar-button w-pagebar-button-count w-pagebar-prev",ref:"drop",text:this.currentPage+"/"+this.sumPage,onclick:t=>this.clickDrop(t)})),this.showDrop){let e=[];for(let t=1,i=this.sumPage;t<=i;t++)e.push(a(si,{text:t,onClick:e=>this.clickItem(e,t)}));t.push(a(oi,{snap:()=>this.$refs.drop,position:"v",indent:1,onClose:()=>this.showDrop=!1},{default:()=>e}))}return t},html_face_simple(){return this.html_drop().concat(this.html_buttons())},html_face_button(){let t=this.html_buttons();return t.splice(1,0,...this.html_drop()),t},html_face_normal(){const t=[];let e=this.sumPage,i=this.currentPage,s=Nt.number(this.x.buttonCount),l=Math.max(1,i-Math.ceil(s/2)+1),r=Math.min(e+1,l+s),o=r-l<s?Math.max(1,r-s):l;this.x.noFirstLast||t.push(this.html_button(1,this.labelFirst,this.iconFirst,1==i)),t.push(this.html_button(i-1,this.labelPrev,this.iconPrev,1==i));for(let e=o;e<r;e++)t.push(this.html_button(e));return t.push(this.html_button(i+1,this.labelNext,this.iconNext,i>=this.sumPage)),this.x.noFirstLast||t.push(this.html_button(e,this.labelLast,this.iconLast,i>=this.sumPage)),this.x.jump&&(t.push(a("span",{class:"w-pagebar-jump-to"},Nt.loc.to)),t.push(a("input",{class:"w-pagebar-jump-input",ref:"jumpInput",onfocus:t=>this.isJumpFocus=!0,onblur:t=>this.isJumpFocus=!1,onkeydown:t=>13==t.keyCode&&this.onJumpClick(t)})),t.push(a("button",{class:"w-pagebar-button w-pagebar-jump-button",onclick:this.onJumpClick},"GO")),t.push(a("span",{class:"w-pagebar-jump-page"},Nt.loc.page))),t},html_face_mini(){return this.html_face_normal()}},computed:{currentPage(){return(Math.ceil(this.x.offset/this.x.limit)||0)+1},sumPage(){return Math.ceil(this.x.size/this.x.limit)||1},labelFirst(){return"normal"===this.x.face?Nt.loc.page_text.first:""},labelLast(){return"normal"===this.x.face?Nt.loc.page_text.last:""},labelNext(){return"normal"===this.x.face?Nt.loc.page_text.next:""},labelPrev(){return"normal"===this.x.face?Nt.loc.page_text.prev:""},iconFirst(){return"mini"===this.x.face?"f-i f-i-angle-first":""},iconLast(){return"mini"===this.x.face?"f-i f-i-angle-last":""},iconNext(){return"mini"===this.x.face?"f-i f-i-angle-right":""},iconPrev(){return"mini"===this.x.face?"f-i f-i-angle-left":""},html_class(){return["w-buttonbar w-horizontal","z-face-"+this.x.face,this.html_align_class,this.isJumpFocus&&"z-jump-on"]}},__file:"src/widgets/PageBar.vue"},ts={name:"w-split",mixins:[Ve],props:["collapsedIcon","expandedIcon","movable","range","toNext","expanded"],inject:["provideLayout"],created(){this.$watch("expanded",t=>{"boolean"==typeof t?this.x.expanded=t:null==this.x.expanded&&(this.x.expanded=!0)},{immediate:!0})},methods:{toggle(t){this.x.expanded=null==t?!this.x.expanded:t;let e=this.x.toNext?this.el().nextElementSibling:this.el().previousElementSibling;e&&Nt.q(e).toggleClass("f-split-collapsed",!this.x.expanded)},dragstart(t){let e=this.el().previousElementSibling,i=this.el().nextElementSibling;if(e&&i){let s,l,r=this.inVertical,a=this.x.toNext?i:e,o=Nt.eventX(t),n=Nt.eventY(t),h=r?"top":"left",c=r?"height":"width",u=r?"clientY":"clientX",d=r?n:o,p=Nt.bcr(e)[h],m=Nt.bcr(i)[r?"bottom":"right"]-5,f=Nt.lodash.pick(Nt.bcr(this.$refs.movable),["width","height","top","left"]);Nt.moveup(t=>{l||(l=Nt.q('<div style="position:absolute;background:rgba(0,0,0,.3);z-index:101;"></div>').css(f).appendTo(document.body)),s=Nt.numRange(f[h]+t[u]-d,p,m),l.css({[h]:s})},(t,e)=>{if(e&&l){l.remove();let t=(this.x.expanded?Nt.bcr(a)[c]:0)+(this.x.toNext?1:-1)*(d-s);t<=0?this.toggle(!1):(this.x.expanded||this.toggle(!0),Nt.q(a).css({[c]:t}))}},t)}},html_slots(){let t=[],e=this.x.expandedIcon||this.x.collapsedIcon,i=this.x.collapsedIcon||e;return e&&t.push(this.html_icon(this.x.expanded?e:i,"w-split-icon",()=>this.toggle())),this.x.movable&&t.push(a("div",{ref:"movable",class:"w-split-movable",onmousedown:this.dragstart})),t}},computed:{inVertical(){return"w-vertical"===this.provideLayout},html_props(){return{class:["f-rel z-"+(this.inVertical?"vertical":"horizontal"),{"z-tonext":this.x.toNext}]}}},mounted(){this.x.expanded||this.toggle(!1)},__file:"src/widgets/Split.vue"},es={name:"w-toggle",mixins:[Ve,De],props:["collapsedIcon","expandedIcon","expanded","align","valign"],methods:{x_default:()=>({expanded:!0,valign:"middle"}),toggle(t=!0){let e="boolean"==typeof t?t:!this.x.expanded;this.x.expanded=e,Nt.q(this.el()).nextUntil(".w-toggle").toggle(e)},html_slots(){let t=this.x.expanded?this.x.expandedIcon:this.x.collapsedIcon;return[t&&a(ti,{src:t,class:"w-toggle-icon"}),a("div",{class:"w-toggle-main"},this.$slots.default())]}},computed:{html_props(){let t=this.x.expanded;return{class:["w-horizontal f-pointer",{"z-expanded":t,"z-collapse":!t},this.html_align_class],onclick:this.toggle}}},mounted(){this.x.expanded||this.toggle(!1)},__file:"src/widgets/Toggle.vue"},is={name:"w-video",mixins:[Ve],props:["src","poster"],data:()=>({playing:!1}),methods:{getMimeType(){let t=Nt.strTo(this.x.src,"?")||this.x.src,e=Nt.strFrom(t,"/",!0)||t;return Nt.strFrom(e,".",!0)?mimeType(e):"video/mp4"},html_slots(){return[a("video",{class:"w-video-vd f-width f-height",ref:"vd",src:this.x.src,poster:this.x.poster,onplay:t=>this.playing=!0,onpause:t=>this.playing=!1,controls:!0,"webkit-playsinline":!0,playsinline:!0,"x-webkit-airplay":!0,"x5-playsinline":!0,"x5-video-player-type":"h5","x5-video-orientation":"h5","x5-video-player-fullscreen":!0}),a("div",{class:"w-video-play f-abs-center f-flex-center",innerHTML:'<i class="f-i f-i-play"></i>',onclick:t=>{let e=this.$refs.vd;e.paused?e.play():e.pause()}})]}},computed:{html_class(){return["f-rel f-flex-center",{"z-play":this.playing}]}},__file:"src/widgets/Video.vue"},ss={name:"w-progress",mixins:[Ve],props:["percent","range","text"],methods:{html_slots(){let t=Nt.number(this.x.percent),e=this.x.text;return null==e&&(e=t+"%"),[a("span",{class:"w-progress-text"},e),a("div",{class:"w-progress-gut",style:{width:`${t}%`}},a("div",{class:"w-progress-bar f-flex f-flex-center",style:{width:`${0==t?t:1e4/t}%`}},a("span",{class:"w-progress-text"},e)))]}},computed:{html_class(){if(this.x.range){let t=this.x.range.split(",");for(let e=t.length-1;e>=0;e--)if(Nt.number(this.x.percent)>=Nt.number(t[e]))return"z-"+t[e]}}},__file:"src/widgets/Progress.vue"},ls={name:"w-calendar",mixins:[Ve],emits:["click:item","change"],props:["value","minValue","maxValue","current","pad","face","format","success","cg","start","enableHour","enableMinute","enableSecond","defaultHour","defaultMinute","defaultSecond"],data(){return{dt:this.value2date(),currentDate:null,headPopYear:null,headPopMonth:null}},watch:{value(t){this.dt=this.value2date()},dt(t,e){let i=t.getFullYear(),s=e.getFullYear();if("year"===this.x.face){(""+i).slice(-2,-1)!=(""+s).slice(-2,-1)&&this.trigger("change",t)}else"quarter"===this.x.face||"month"===this.x.face||"week"===this.x.face?i!=s&&this.trigger("change",t):"date"===this.x.face&&(i==s&&t.getMonth()==e.getMonth()||this.trigger("change",t))},current(t){if(!t)return;let e="string"==typeof t?Nt.dateParse(t,this.formatter):t,i=this.dt,s=e.getFullYear(),l=i.getFullYear();if("year"===this.x.face){(""+s).slice(-2,-1)!=(""+l).slice(-2,-1)&&(this.dt=e)}else"quarter"===this.x.face||"month"===this.x.face||"week"===this.x.face?s!=l&&(this.dt=e):"date"===this.x.face&&(s==l&&e.getMonth()==i.getMonth()||(this.dt=e))}},methods:{x_default(){let t=this.format||"";return{face:"yyyy"===t?"year":t.includes("MM")&&!t.includes("dd")?"month":t.includes("ww")?"week":t.includes("qq")?"quarter":"date"}},value2date(){let t=this.value,e=this.minValue,i=this.maxValue,s=this.format||"";return e&&(!t||t<e)&&(t=e),i&&(!t||t>i)&&(t=i),t=t?Nt.dateParse(t,s):new Date,this.value||this.setDefaultTime(t),t},weekday(t){let e=t.getDay();return 0==e?6:e-1},setDefaultTime(t){let e=null==this.defaultHour?t.getHours():parseFloat(this.defaultHour);if(this.enableHour){let t=Nt.arrayNumber(this.enableHour);t.includes(e)||(e=t[0])}t.setHours(e);let i=null==this.defaultMinute?t.getMinutes():parseFloat(this.defaultMinute);if(this.enableMinute){let t=Nt.arrayNumber(this.enableMinute);t.includes(i)||(i=t[0])}t.setMinutes(i);let s=null==this.defaultSecond?t.getSeconds():parseFloat(this.defaultSecond);if(this.enableSecond){let t=Nt.arrayNumber(this.enableSecond);t.includes(s)||(s=t[0])}return t.setSeconds(s),t},fixDate(t){return this.beginDate&&t<this.beginDate&&(t=this.beginDate),this.endDate&&t>this.endDate&&(t=this.endDate),this.setDefaultTime(new Date(t.getTime()))},clickStep(t){let e=new Date(this.dt.getTime());"year"==this.x.face?e=Nt.dateAdd(e,"y",10*t):"quarter"==this.x.face||"month"==this.x.face?e=Nt.dateAdd(e,"y",t):"date"==this.x.face?e=Nt.dateAdd(e,"M",t):"week"==this.x.face&&(e=Nt.dateAdd(e,"y",t)),this.dt=e},clickPopYear(t){(t=t||this.dt.getFullYear()-4)<1e3&&(t=1e3),this.headPopYear=Array.from(Array(10)).map((e,i)=>t+i)},clickPopYearItem(t){let e=new Date(this.dt.getTime());e.setFullYear(t),this.dt=e,this.headPopYear=null},clickPopYearStep(t){let e=this.headPopYear,i=t<0?e[0]-10:e[e.length-1]+1;this.clickPopYear(i)},mousewheelPopYear(t){this.clickPopYearStep(t.deltaY>0?-1:1)},clickPopMonth(){this.headPopMonth=Array.from(Array(12)).map((t,e)=>e+1)},clickPopMonthItem(t){this.dt.getMonth(),this.dt=Nt.dateAdd(this.dt,"M",t-1-this.dt.getMonth()),this.headPopMonth=null},clickItem(t,e){e.disabled||(void 0!==this.x.current&&(this.dt=this.fixDate(e.date)),t.runType="click:item",t.value=e,this.trigger(t,e),this.hasTime||this.callback(e.value,t))},clickNow(t){this.callback(this.fixDate(new Date),t)},clickConfirm(t){let e=this.dt,i=this.focusDate,s=this.fixDate(new Date(i.getFullYear(),i.getMonth(),i.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()));this.callback(s,t)},callback(t,e){"object"==typeof t&&(t=this.fm(t)),this.x.success&&this.x.success(t,e)},clickHour(t,e){this.dt.setHours(e),this.dt=this.fixDate(this.dt),this.$refs.hour.scrollToY(t.currentTarget,"middle",150)},clickMinute(t,e){this.dt.setMinutes(e),this.dt=this.fixDate(this.dt),this.$refs.minute.scrollToY(t.currentTarget,"middle",150)},clickSecond(t,e){this.dt.setSeconds(e),this.dt=this.fixDate(this.dt),this.$refs.second.scrollToY(t.currentTarget,"middle",150)},fm(t){return Nt.dateFormat("string"==typeof t?Nt.dateParse(t,this.formatter):t,this.formatter)},isHourDisabled(t){let e=this.minHour,i=this.maxHour;return e&&e>t||i&&i<t},isMinuteDisabled(t){let e=this.minMinute,i=this.maxMinute;return e&&e>t||i&&i<t},isSecondDisabled(t){let e=this.minSecond,i=this.maxSecond;return e&&e>t||i&&i<t}},computed:{loc:()=>Nt.loc,formatter(){return this.x.format||"yyyy-MM-dd"},hasTime(){return/[Hms]/.test(this.formatter)},onlyTime(){return this.hasTime&&!/[yMd]/.test(this.formatter)},focusValue(){let t=this.focusDate;return t&&this.fm(t)},focusDate(){let t=this.x.current;return t?Nt.dateParse(t,this.x.format):!this.x.value&&this.x.success?this.x.format&&this.dt:void 0},beginDate(){return this.x.minValue&&Nt.dateParse(this.x.minValue,this.formatter)},endDate(){return this.x.maxValue&&Nt.dateParse(this.x.maxValue,this.formatter)},focusHour(){return this.x.format.includes("H")&&this.dt.getHours()},focusMinute(){return this.x.format.includes("m")&&this.dt.getMinutes()},focusSecond(){return this.x.format.includes("s")&&this.dt.getSeconds()},minHour(){if(this.beginDate){let t=this.beginDate,e=this.dt;if(t.getFullYear()==e.getFullYear()&&t.getMonth()==e.getMonth()&&t.getDate()==e.getDate())return t.getHours()}},maxHour(){if(this.endDate){let t=this.endDate,e=this.dt;if(t.getFullYear()==e.getFullYear()&&t.getMonth()==e.getMonth()&&t.getDate()==e.getDate())return t.getHours()}},minMinute(){if(this.minHour===this.dt.getHours())return this.beginDate.getMinutes()},maxMinute(){if(this.maxHour===this.dt.getHours())return this.endDate.getMinutes()},minSecond(){if(this.minMinute===this.dt.getMinutes())return this.beginDate.getSeconds()},maxSecond(){if(this.maxMinute===this.dt.getMinutes())return this.endDate.getSeconds()},headYear(){let t=this.dt.getFullYear();return"year"===this.x.face&&(t=this.dt.getFullYear()-this.dt.getFullYear()%10,t+=" - "+(t+9)),Nt.loc.ps(Nt.loc.calendar.y,t)},headMonth(){return Nt.loc.calendar.monthname[this.dt.getMonth()]},bodyList(){return"year"===this.x.face?this.bodyListYear:"quarter"===this.x.face?this.bodyListQuarter:"month"===this.x.face?this.bodyListMonth:"week"===this.x.face?this.bodyListWeek:this.bodyListDate},bodyListYear(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue,l=this.dt.getFullYear()-this.dt.getFullYear()%10-1,r=new Date(this.dt.getTime());r.setDate(1),r.setFullYear(l);for(let a=0;a<12;a++){let o=l+a,n={value:o,text:o,date:new Date(r.getTime()),pad:0==a||11==a,disabled:!!(e&&e>o||i&&i<o),focus:s==o};t.push(n),r.setFullYear(r.getFullYear()+1)}return t},bodyListQuarter(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue;this.dt.getFullYear();let l=new Date(this.dt.getTime());l.setDate(1),l.setMonth(0);for(let r=1;r<=4;r++){let a=this.fm(l),o={text:`Q${r}`,value:a,date:new Date(l.getTime()),disabled:!!(e&&e>a||i&&i<a),focus:s==a};l.setMonth(l.getMonth()+3),t.push(o)}return t},bodyListMonth(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue;this.dt.getFullYear();let l=new Date(this.dt.getTime());l.setDate(1),l.setMonth(0);for(let r=0;r<12;r++){let a=this.fm(l),o={text:Nt.loc.calendar.monthname[r],value:a,date:new Date(l.getTime()),disabled:!!(e&&e>a||i&&i<a),focus:s==a};l.setMonth(l.getMonth()+1),t.push(o)}return t},bodyListWeek(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue,l=Nt.dateWeek(this.dt)[0],r=Nt.dateWeekLast(l),a=Nt.dateWeekFirst(l)[2];for(let o=1,n=r[1];o<=n;o++){let r=this.fm(a),n={text:o,value:l+"-"+Nt.strPad(o),date:new Date(a.getTime()),disabled:!!(e&&e>r||i&&i<r),focus:s==r,title:Nt.loc.ps(Nt.loc.calendar.from_to,Nt.dateFormat(a,"yyyy-MM-dd"),Nt.dateFormat(Nt.dateAdd(a,"d",6),"yyyy-MM-dd"))};a.setDate(a.getDate()+7),t.push(n)}return t},bodyListDate(){let t=new Date(this.dt.getTime()),e=t.getMonth(),i=new Date(t.getTime()),s=this.focusValue,l=s&&Nt.dateFormat(Nt.dateParse(s,this.x.format),"yyyy-MM-dd"),r=this.beginDate&&Nt.dateFormat(this.beginDate,"yyyy-MM-dd"),a=this.endDate&&Nt.dateFormat(this.endDate,"yyyy-MM-dd"),o=[];t.setDate(1),i.setDate(new Date(t.getFullYear(),e+1,0).getDate());let n=7-(this.weekday(t)+i.getDate())%7;for(n&&n<7&&i.setDate(i.getDate()+n),this.weekday(t)>0&&t.setDate(1-this.weekday(t)),this.x.pad&&(n=1+(i.getTime()-t.getTime())/864e5,n<42&&i.setDate(i.getDate()+42-n));t<=i;){let i=this.fm(t),s=Nt.dateFormat(t,"yyyy-MM-dd"),n={text:t.getDate(),value:i,date:new Date(t.getTime()),pad:t.getMonth()!==e,disabled:!!(r&&r>s||a&&a<s),focus:l===s};o.push(n),t.setDate(t.getDate()+1)}return o},bodyListHour(){return this.enableHour?Nt.arrayNumber(this.enableHour):Array.from(Array(24).keys())},bodyListMinute(){return this.enableMinute?Nt.arrayNumber(this.enableMinute):Array.from(Array(60).keys())},bodyListSecond(){return this.enableSecond?Nt.arrayNumber(this.enableSecond):Array.from(Array(60).keys())}}};const rs=["innerHTML"],as=["onClick"],os=["onClick"],ns={class:"w-calendar-body"},hs={class:"w-calendar-daytitle"},cs=["title","onClick"],us={class:"w-calendar-item-text"},ds={class:"w-calendar-time-th"},ps={class:"w-calendar-time-th"},ms={class:"w-calendar-time-th"};ls.render=function(t,e,i,s,l,a){const o=n("w-html"),h=n("w-dialog"),d=n("w-horizontal"),y=n("w-vertical"),k=n("w-button"),T=n("w-buttonbar");return u(),m(y,r(t.html_binds,{class:["f-rel","w-calendar-"+this.x.face]}),{default:f(()=>[a.onlyTime?b("v-if",!0):(u(),m(y,{key:0,class:"w-calendar-main"},{default:f(()=>[g(d,{class:P(["w-calendar-head",{"f-h-gap":t.dfish.br.compat.gap}]),valign:"middle",align:"center"},{default:f(()=>["date"==t.x.face?(u(),c("i",{key:0,class:"w-calendar-head-prev-year f-i f-i-angle-double-left f-pointer",onClick:e[0]||(e[0]=t=>a.clickStep(-12))})):b("v-if",!0),p("i",{class:"w-calendar-head-prev f-i f-i-angle-single-left f-pointer",onClick:e[1]||(e[1]=t=>a.clickStep(-1))}),g(d,{class:P(["w-calendar-head-pop",{"f-h-gap":t.dfish.br.compat.gap}])},{default:f(()=>[p("div",{class:"w-calendar-head-year f-link",ref:"popYear",onClick:e[2]||(e[2]=t=>a.clickPopYear()),innerHTML:a.headYear},null,8,rs),l.headPopYear?(u(),m(h,{key:0,class:"f-dfish-dialog",width:"72",context:t.$refs.popYear,"auto-hide":!0,ownproperty:!0,snap:t.$refs.popYear,onClose:e[5]||(e[5]=t=>l.headPopYear=null)},{default:f(()=>[p("div",{class:"w-calendar-head-year-item",onClick:e[3]||(e[3]=t=>a.clickPopYearStep(-1))},e[11]||(e[11]=[p("i",{class:"f-i f-i-minus"},null,-1)])),g(o,{height:"*",onWheelPassive:a.mousewheelPopYear},{default:f(()=>[(u(!0),c(x,null,v(l.headPopYear,t=>(u(),c("div",{class:P(["w-calendar-head-year-item",{"z-on":t==l.dt.getFullYear()}]),onClick:e=>a.clickPopYearItem(t)},w(t),11,as))),256))]),_:1},8,["onWheelPassive"]),g(o,{class:"w-calendar-head-year-item",onClick:e[4]||(e[4]=t=>a.clickPopYearStep(1))},{default:f(()=>e[12]||(e[12]=[p("i",{class:"f-i f-i-plus"},null,-1)])),_:1,__:[12]})]),_:1},8,["context","snap"])):b("v-if",!0),"date"==t.x.face?(u(),m(o,{key:1,class:"w-calendar-head-month f-link",ref:"popMonth",onClick:a.clickPopMonth},{default:f(()=>[_(w(a.headMonth),1)]),_:1},8,["onClick"])):b("v-if",!0),l.headPopMonth?(u(),m(h,{key:2,class:"f-dfish-dialog",width:"72",context:t.$refs.popMonth,"auto-hide":!0,ownproperty:!0,snap:t.$refs.popMonth,onClose:e[6]||(e[6]=t=>l.headPopMonth=null)},{default:f(()=>[g(o,{height:"*"},{default:f(()=>[(u(!0),c(x,null,v(l.headPopMonth,t=>(u(),c("div",{class:P(["w-calendar-head-year-item",{"z-on":t==l.dt.getMonth()+1}]),onClick:e=>a.clickPopMonthItem(t)},w(t),11,os))),256))]),_:1})]),_:1},8,["context","snap"])):b("v-if",!0)]),_:1},8,["class"]),p("i",{class:"w-calendar-head-next f-i f-i-angle-single-right f-pointer",onClick:e[7]||(e[7]=t=>a.clickStep(1))}),"date"==t.x.face?(u(),c("i",{key:1,class:"w-calendar-head-next-year f-i f-i-angle-double-right f-pointer",onClick:e[8]||(e[8]=t=>a.clickStep(12))})):b("v-if",!0),e[13]||(e[13]=p("div",{class:"w-calendar-head-blank"},null,-1))]),_:1,__:[13]},8,["class"]),S(t.$slots,"head"),p("div",ns,["date"==t.x.face?(u(!0),c(x,{key:0},v(a.loc.calendar.day_title_1,t=>(u(),c("div",hs,w(t),1))),256)):b("v-if",!0),(u(!0),c(x,null,v(a.bodyList,(e,i)=>(u(),c("div",{title:e.title,class:P(["w-calendar-item",{"z-on":e.focus&&!e.disabled,"z-pad":e.pad,"z-ds":e.disabled}]),onClick:t=>a.clickItem(t,e)},[S(t.$slots,"default",{item:e,index:i},()=>[p("div",us,w(e.text),1)])],10,cs))),256))])]),_:3})),a.hasTime?(u(),m(d,{key:1,class:"w-calendar-time"},{default:f(()=>[!1!==a.focusHour?(u(),m(y,{key:0,class:"w-calendar-time-col w-calendar-time-hour",width:"*"},{default:f(()=>[p("div",ds,w(a.loc.hour),1),g(T,{class:"w-calendar-time-body",ref:"hour",current:a.focusHour,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:f(()=>[(u(!0),c(x,null,v(a.bodyListHour,e=>(u(),m(k,{class:"w-calendar-time-item",key:e,text:t.dfish.strPad(e),disabled:a.isHourDisabled(e),onClick:t=>a.clickHour(t,e)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):b("v-if",!0),!1!==a.focusMinute?(u(),m(y,{key:1,class:"w-calendar-time-col w-calendar-time-minute",width:"*"},{default:f(()=>[p("div",ps,w(a.loc.minute),1),g(T,{class:"w-calendar-time-body",ref:"minute",current:a.focusMinute,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:f(()=>[(u(!0),c(x,null,v(a.bodyListMinute,e=>(u(),m(k,{class:"w-calendar-time-item",key:e,text:t.dfish.strPad(e),disabled:a.isMinuteDisabled(e),onClick:t=>a.clickMinute(t,e)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):b("v-if",!0),!1!==a.focusSecond?(u(),m(y,{key:2,class:"w-calendar-time-col w-calendar-time-second",width:"*"},{default:f(()=>[p("div",ms,w(a.loc.second),1),g(T,{class:"w-calendar-time-body",ref:"second",current:a.focusSecond,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:f(()=>[(u(!0),c(x,null,v(a.bodyListSecond,e=>(u(),m(k,{class:"w-calendar-time-item",key:e,text:t.dfish.strPad(e),disabled:a.isSecondDisabled(e),onClick:t=>a.clickSecond(t,e)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):b("v-if",!0)]),_:1})):b("v-if",!0),i.success?(u(),m(d,{key:2,class:P(["w-calendar-foot",{"f-h-gap":t.dfish.br.compat.gap}]),align:"between",valign:"middle"},{default:f(()=>[p("div",{class:"w-calendar-button-now f-link",onClick:e[9]||(e[9]=(...t)=>a.clickNow&&a.clickNow(...t))},w(a.loc.calendar.now),1),p("div",{class:"w-calendar-button-confirm f-link",onClick:e[10]||(e[10]=(...t)=>a.clickConfirm&&a.clickConfirm(...t))},w(a.loc.confirm),1)]),_:1},8,["class"])):b("v-if",!0)]),_:3},16,["class"])},ls.__file="src/widgets/Calendar.vue";var fs={name:"w-timeline",mixins:[ze,di],props:["face","vertical"],methods:{indent(){let t=this.$refs.wrap.querySelectorAll(":scope>.w-timeline-half>.w-timeline-item").length;if(t>0){let e=this.x.vertical,i=e?"width":"height",s=0,l=0;for(let r=0;r<t;r++){let a=this.$refs.wrap.querySelector(`:scope>.w-timeline-half>.w-timeline-item[w-index="${r}"]`),o=r<t-1&&this.$refs.wrap.querySelector(`:scope>.w-timeline-half>.w-timeline-item[w-index="${r+1}"]`),n=Nt.bcr(a.querySelector(":scope>.w-timeline-item-icon>.w-timeline-item-icon-img"));if(a.parentNode==this.$refs.prev?s=Math.max(s,n[i]):l=Math.max(l,n[i]),o&&a.parentNode!=o.parentNode){let t=Nt.bcr(o.querySelector(":scope>.w-timeline-item-icon>.w-timeline-item-icon-img"));e&&n.bottom+25>t.top?Nt.q(o).css({marginTop:n.bottom+25-t.top}):!e&&n.right+50>t.left&&Nt.q(o).css({marginLeft:n.right+50-t.left})}}let r=Nt.q(">.w-timeline-item",this.$refs.prev);r.each((t,l)=>{let r=Nt.q(">.w-timeline-item-icon",l),a=Nt.bcr(r[0]);r.css({[e?"marginRight":"marginBottom"]:(s-a[i])/2})}),Nt.q(">.w-timeline-item",this.$refs.next).each((t,s)=>{let r=Nt.q(">.w-timeline-item-icon",s),a=Nt.bcr(r[0]);r.css({[e?"marginLeft":"marginTop"]:(l-a[i])/2})}),r.length&&Nt.q(this.$refs.next).css({[e?"marginLeft":"marginTop"]:`-${l/2+s/2}px`})}if(0==t)Nt.q(this.$refs.line).css({width:0,height:0});else{const e=Nt.bcr(this.$refs.wrap),i=[];let s=[],l=0,r="#ddd";for(let e=0;e<t;e++){let t=Nt.q(`>.w-timeline-half>.w-timeline-item[w-index="${e}"]`,this.$refs.wrap),s=Nt.bcr(t.find(">.w-timeline-item-icon>.w-timeline-item-icon-img")[0]),l={x:s.left+s.width/2,y:s.top+s.height/2,color:t.attr("w-line-color")};i.push(l)}i.sort((t,e)=>this.x.vertical?t.y<e.y?-1:0:t.x<e.x?-1:0);for(let e=0;e<t;e++){const t=i[e];if(e>0){const e=i[0];l=this.x.vertical?t.y-e.y:t.x-e.x,s.push(`${r} ${l}px`)}t.color&&(r=t.color),e>0&&s.push(`${r} ${l}px`)}this.x.vertical?Nt.q(this.$refs.line).css({width:2,height:i[t-1].y-i[0].y,top:i[0].y-e.top,left:i[0].x-e.left-1}):Nt.q(this.$refs.line).css({width:i[t-1].x-i[0].x,height:2,top:i[0].y-e.top-1,left:i[0].x-e.left,background:`linear-gradient(to right, ${s.join()})`})}},html_slots(){let t=[],e=[],i=this.x.vertical;return this.slots_children().forEach((s,l)=>{Nt.lodash.set(s,"props.index",l),i?("right"==s.props.position?t:e).push(s):("bottom"==s.props.position?e:t).push(s)}),this.html_scroll_slots(a("div",{ref:"wrap",class:"w-timeline-wrap"},[a("div",{ref:"line",class:"w-timeline-line"}),a("div",{ref:"prev",class:["w-timeline-half w-timeline-prev",{[`f-${this.x.vertical?"v":"h"}-gap`]:Nt.br.compat.gap}]},t),a("div",{ref:"next",class:["w-timeline-half w-timeline-next",{[`f-${this.x.vertical?"v":"h"}-gap`]:Nt.br.compat.gap}]},e)]))}},computed:{html_class(){return[this.html_scroll_class,{["z-face-"+this.x.face]:this.x.face,"z-horizontal":!this.x.vertical,"z-vertical":this.x.vertical}]}},mounted(){this.indent();const t=Nt.lodash.debounce(()=>{this.$refs.wrap&&this.$refs.next&&(Nt.q(">.w-timeline-half>.w-timeline-item",this.$refs.wrap).css({[this.x.vertical?"marginTop":"marginLeft"]:0}),Nt.q(this.$refs.next).css({[this.x.vertical?"marginTop":"marginLeft"]:0}),this.indent())});new MutationObserver(t).observe(this.$refs.wrap,{childList:!0,attributes:!0,subtree:!0})},__file:"src/widgets/Timeline.vue"},xs={name:"w-timeline-item",pubParentName:"w-timeline",mixins:[Ve],inject:["providePubParent"],props:["position","index","align","lineColor"],watch:{lineColor(t){this.$nextTick(()=>this.providePubParent.indent())}},methods:{html_slots(){let t=a("div",{class:"w-timeline-item-main f-br"},a("div",{class:"w-timeline-item-main-text"},this.$slots));return[a("div",{ref:"icon",class:"w-timeline-item-icon"},this.$slots.icon?a("div",{class:"w-timeline-item-icon-img"},this.$slots.icon()):a("i",{class:"w-timeline-item-icon-img z-default"})),t]}},computed:{html_class(){return"z-position-"+(this.x.position||(this.pubParent.x.vertical?"left":"bottom"))+" z-align-"+(this.x.align||"left")},html_props(){return{"w-index":this.x.index,"w-line-color":this.x.lineColor}}},__file:"src/widgets/TimelineItem.vue"},gs={name:"w-slidepicker",mixins:[Ve],provide(){return{provideOptionParent:this}},props:["optionHeight","modelValue","minValue","maxValue","keepIndex","cover"],emits:["update:modelValue","change"],setup(t,e){const i=E().ctx,s=D(),l=D();let r,a,o,n,h,c;const u=function(t){let e,i,s,r=Nt.eventY(t),a=0,u=null;l.value.style.transition="",Nt.moveup(t=>{let d=Nt.eventY(t),p=t.timeStamp;e=h+d-r,i&&s&&p>s&&(u=a,a=(d-i)/(p-s)),i=d,s=p,e=Nt.numRange(e,o-c,n+c),l.value.style.transform=`translateY(${e}px)`},(i,s)=>{if(!s)return p(t);if(null==e)return;let r=.15;Math.abs(a)<r||u&&Math.abs(u)<r?a=0:u&&Math.abs(u)>Math.abs(a)&&(a=u);let d=e+200*a,m=Math.abs(a/2),f=(n-d)%c;d+=f,f>c/2&&(d-=c),h=Nt.numRange(d,o,n),h!=e&&((e<o||e>o||m<r)&&(m=r),Math.abs(h-e)<10&&(m=.05),l.value.style.transform=`translateY(${h}px)`,l.value.style.transition=`transform ${m}s ease-out`)},t)},d=function(t){h+=(t.deltaY<0?-1:1)*c,h=Nt.numRange(h,o,n),l.value.style.transform=`translateY(${h}px)`,l.value.style.transition="transform .12s ease-out"},p=function(t){let e=Nt(t);"w-option"==e.$options.name&&(f(e.$props.value),m(!0))},m=function(t){if(!s.value||!l.value)return;let e=i.slots_children();if(!e.length)return;let u=i.x.modelValue,d=i.x.minValue,p=i.x.maxValue;(d||0===d||p||0===p)&&(u=Nt.numRange(u,d,p),u!=i.x.modelValue&&f(u));let m=Nt.bcr(s.value),x=Nt.bcr(l.value),g=-1,v=-1,w=!0;if(c=i.x.optionHeight,r=n=(m.height-c)/2,a=o=r-x.height+c,(d||0===d)&&(g=e.findIndex(t=>t.props.value==d)),(p||0===p)&&(v=e.findIndex(t=>t.props.value==p)),(g>-1||v>-1)&&e[0].props.value>e[e.length-1].props.value&&(w=!1),g>-1&&(w?n-=g*c:o+=g*c),v>-1&&(w?o+=(e.length-1-v)*c:n-=(e.length-1-v)*c),null!=u){let t=e.findIndex(t=>t.props.value==u);-1===t?f(null!=h&&h<a&&i.keepIndex?e[e.length-1].props.value:e[0].props.value):h=r-c*t}else h=r;h=Nt.numRange(h,o,n),l.value.style.transition="",l.value.style.transform=`translateY(${h}px)`,t&&(l.value.style.transition="transform .15s ease-out")},f=function(t){i.x.modelValue=t},x=function(){let t=i.slots_children()[(r-h)/c];t&&f(t.props.value)},g=C(()=>({style:{"--w-option-height":Nt.unitSize(i.x.optionHeight)},...Nt.br.mobile?{ontouchstart:u}:{onmousedown:u,onwheel:d}}));return L(()=>{H(()=>i.x.modelValue,t=>{e.emit("update:modelValue",t),e.emit("change",t)}),H(()=>i.x.minValue,m),H(()=>i.x.maxValue,m),new Me(()=>{l.value&&(m(),x())}).observe(l.value),l.value.addEventListener("transitionend",x)}),{root:s,options:l,x_default:function(){return{optionHeight:32,cover:!0}},onmousedown:u,onwheel:d,html_props:g}}};const vs={ref:"options",class:"w-slidepicker-options"},ws={key:0,class:"w-slidepicker-bg-top"},bs={key:1,class:"w-slidepicker-bg-bottom"};gs.render=function(t,e,i,s,l,a){return u(),c("div",r({ref:"root"},t.html_binds),[p("div",vs,[S(t.$slots,"default")],512),t.x.cover?(u(),c("div",ws)):b("v-if",!0),t.x.cover?(u(),c("div",bs)):b("v-if",!0)],16)},gs.__file="src/widgets/SlidePicker.vue";var _s={name:"w-hidden",mixins:[Wi],methods:{isModified:()=>!1,html(){return a("input",{type:"hidden",id:this.uid,class:"w-hidden",name:this.x.name,value:this.x.modelValue,ref:"v"})}},__file:"src/widgets/Hidden.vue"},ys={name:"w-text",mixins:[Wi],props:["minLength","maxLength","pattern","clearable","showCount","dropProps","suggest"],emits:["input","clear"],data:()=>({hasBorder:!0,showSuggest:!1,sug_timer:null,sug_completed:!1}),methods:{clickButtonClear(t){t.stopPropagation(),this.hasVal&&(this.val(""),this.focus(),this.$emit("clear",t))},baseInput(t){let e=t.target.value;this.val(e,t),this.baseValid("change"),this.trigger(t,e)},oninput(t){if(this.x.suggest)if(clearTimeout(this.sug_timer),""===t.target.value)this.baseInput(t),this.doSuggest(!1);else if("input"!==t.type)t.runType="input",this.baseInput(t),this.doSuggest(!0);else{let e=t.target.value;this.val(e,t),this.sug_timer=setTimeout(()=>{this.trigger(t,e),this.baseValid("change"),this.doSuggest(!0)},500)}else this.baseInput(t)},onfocus(t){this.isFocus=!0,this.x.suggest&&!this.showSuggest&&t.target.value&&!this.sug_completed&&this.oninput(t),this.sug_completed&&(this.sug_completed=!1),this.trigger("focus")},onclick(t){this.x.suggest&&!this.showSuggest&&t.target.value&&!this.sug_completed&&this.oninput(t)},doSuggest(t){!1===(t=null==t||t)&&clearTimeout(this.sug_timer),this.showSuggest=t,this.warn(!1)},onCloseDrop(){this.showSuggest=!1},complete(t){return this.val(t),this.sug_completed=!0,this.$nextTick(this.focus),this},closeDrop(){return this.doSuggest(!1),this},html_button(){let t=[];if(this.isNormal&&this.x.clearable&&t.push(a("button",{class:"w-input-button-clear w-input-button f-i f-i-close",onclick:this.clickButtonClear})),this.showSuggest){let e={context:this,ownproperty:!0,class:"f-dfish-dialog",width:Nt.bcr(this.el("form")).width,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(a(Oe,e,this.$slots.suggest))}return t}},computed:{validHooks(){return{...this.pubValidHooks,minLength:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&Nt.strLen(t)<e)return this.formErr(i,[e])},maxLength:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&t&&Nt.strLen(t)>e)return this.formErr(i,[Nt.strExceed(t,e)])}}},input_prop(){let t={oninput:this.oninput,onfocus:this.onfocus,onclick:this.onclick};return this.x.maxLength&&(t.maxlength=this.x.maxLength),t},html_class(){return{"z-val":this.hasVal,"z-clearable":this.x.clearable}}},__file:"src/widgets/Text.vue"},ks={name:"w-textarea",mixins:[ys],methods:{html_slot_down(){const t=this.slot("down");if(this.x.showCount||t&&t.length){let e="";if(this.x.showCount&&this.x.maxLength){let t=this.x.modelValue||"",i=Nt.strLen(t);if(i>this.x.maxLength){i=`<em class=w-textarea-show-count-exceed>超出${Nt.strExceed(t,this.x.maxLength)}个字</em>`}e=`${i} / ${this.x.maxLength}`}return a("div",{class:"w-textarea-down"},[a("div",{class:"w-textarea-down-left"},t),a("div",{class:"w-textarea-down-right w-textarea-show-count",innerHTML:e})])}return t}},computed:{input_tag:()=>"textarea",hasClassSlotDown(){return this.x.showCount&&this.x.maxLength||!!this.$slots.down}},__file:"src/widgets/Textarea.vue"},Ss={name:"w-checkboxgroup",mixins:[Wi],props:["modelValue","required","vertical","gap","minSize","maxSize","br"],provide(){return{providePubParent:this}},data:()=>({watchValue:null}),methods:{x_default:()=>({br:!0,gap:15}),watchModelValue(t,e){},html_form_slot(){return this.x.vertical?a("div",{class:"w-boxgroup-grid"},this.$slots):this.$slots}},computed:{html_class(){return{"z-br":this.x.br}},html_style(){return this.x.gap&&{"--w-boxgroup-gap":Nt.unitSize(this.x.gap)}}},__file:"src/widgets/CheckBoxGroup.vue"},Ts={name:"w-radiogroup",mixins:[Ss],__file:"src/widgets/RadioGroup.vue"},Cs={name:"w-radio",pubParentName:"w-radiogroup",mixins:[Qi],props:["cancelable"],methods:{},computed:{input_type:()=>"radio",input_icon:()=>"f-i",input_name(){return this.w_name&&this.w_name+"@"+this.ownerView.uid},w_name(){return this.x.name||this.pubParent&&this.pubParent.x.name},input_prop(){return{"w-name":this.w_name}}},mounted(){},__file:"src/widgets/Radio.vue"},Ms={name:"w-switch",pubParentName:"w-checkboxgroup",mixins:[Wi],props:["checkedText","uncheckedText","checkedValue","uncheckedValue"],inject:["providePubParent"],methods:{x_default:()=>({checkedValue:1,uncheckedValue:0}),onclick(t){let e=!this.isChecked?this.x.checkedValue:this.x.uncheckedValue;this.val(e)},formText(){return this.isChecked?this.x.checkedText:this.x.uncheckedText},html_input(){return[this.html_input_hidden(),a("div",{class:"w-switch-box",onclick:this.isNormal&&this.onclick},[a("i",{class:"w-switch-icon"}),a("span",{class:"w-switch-text"},this.isChecked?this.x.checkedText:this.x.uncheckedText)])]}},computed:{input_value(){return this.isChecked?this.x.checkedValue:this.x.uncheckedValue},html_class(){return this.isChecked?"z-checked":"z-unchecked"},isChecked(){return this.x.modelValue==this.x.checkedValue}},__file:"src/widgets/Switch.vue"};const Vs={".323":"text/h323",".3gp":"video/3gpp",".aab":"application/x-authoware-bin",".aam":"application/x-authoware-map",".aas":"application/x-authoware-seg",".acx":"application/internet-property-stream",".ai":"application/postscript",".aif":"audio/x-aiff",".aifc":"audio/x-aiff",".aiff":"audio/x-aiff",".als":"audio/X-Alpha5",".amc":"application/x-mpeg",".apk":"application/vnd.android.package-archive",".asc":"text/plain",".asd":"application/astound",".asf":"video/x-ms-asf",".asn":"application/astound",".asp":"application/x-asap",".asr":"video/x-ms-asf",".asx":"video/x-ms-asf",".au":"audio/basic",".avi":"video/x-msvideo",".awb":"audio/amr-wb",".axs":"application/olescript",".bas":"text/plain",".bcpio":"application/x-bcpio",".bld":"application/bld",".bld2":"application/bld2",".bmp":"image/bmp",".bz2":"application/x-bzip2",".c":"text/plain",".cal":"image/x-cals",".cat":"application/vnd.ms-pkiseccat",".ccn":"application/x-cnc",".cco":"application/x-cocoa",".cdf":"application/x-cdf",".cer":"application/x-x509-ca-cert",".cgi":"magnus-internal/cgi",".chat":"application/x-chat",".clp":"application/x-msclip",".cmx":"image/x-cmx",".co":"application/x-cult3d-object",".cod":"image/cis-cod",".conf":"text/plain",".cpio":"application/x-cpio",".cpp":"text/plain",".cpt":"application/mac-compactpro",".crd":"application/x-mscardfile",".crl":"application/pkix-crl",".crt":"application/x-x509-ca-cert",".csh":"application/x-csh",".csm":"chemical/x-csml",".csml":"chemical/x-csml",".css":"text/css",".dcm":"x-lml/x-evm",".dcr":"application/x-director",".dcx":"image/x-dcx",".der":"application/x-x509-ca-cert",".dhtml":"text/html",".dir":"application/x-director",".dll":"application/x-msdownload",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".dot":"application/msword",".dvi":"application/x-dvi",".dwf":"drawing/x-dwf",".dwg":"application/x-autocad",".dxf":"application/x-autocad",".dxr":"application/x-director",".ebk":"application/x-expandedbook",".emb":"chemical/x-embl-dl-nucleotide",".embl":"chemical/x-embl-dl-nucleotide",".eps":"application/postscript",".epub":"application/epub+zip",".eri":"image/x-eri",".es":"audio/echospeech",".esl":"audio/echospeech",".etc":"application/x-earthtime",".etx":"text/x-setext",".evm":"x-lml/x-evm",".evy":"application/envoy",".fh4":"image/x-freehand",".fh5":"image/x-freehand",".fhc":"image/x-freehand",".fif":"application/fractals",".flr":"x-world/x-vrml",".flv":"flv-application/octet-stream",".fm":"application/x-maker",".fpx":"image/x-fpx",".fvi":"video/isivideo",".gau":"chemical/x-gaussian-input",".gca":"application/x-gca-compressed",".gdb":"x-lml/x-gdb",".gif":"image/gif",".gps":"application/x-gps",".gtar":"application/x-gtar",".gz":"application/x-gzip",".h":"text/plain",".hdf":"application/x-hdf",".hdm":"text/x-hdml",".hdml":"text/x-hdml",".hlp":"application/winhlp",".hqx":"application/mac-binhex40",".hta":"application/hta",".htc":"text/x-component",".htm":"text/html",".html":"text/html",".hts":"text/html",".htt":"text/webviewhtml",".ice":"x-conference/x-cooltalk",".ico":"image/x-icon",".ief":"image/ief",".ifm":"image/gif",".ifs":"image/ifs",".iii":"application/x-iphone",".imy":"audio/melody",".ins":"application/x-internet-signup",".ips":"application/x-ipscript",".ipx":"application/x-ipix",".isp":"application/x-internet-signup",".it":"audio/x-mod",".itz":"audio/x-mod",".ivr":"i-world/i-vrml",".j2k":"image/j2k",".jad":"text/vnd.sun.j2me.app-descriptor",".jam":"application/x-jam",".jar":"application/java-archive",".java":"text/plain",".jfif":"image/pipeg",".jnlp":"application/x-java-jnlp-file",".jpe":"image/jpeg",".jpeg":"image/jpeg",".jpg":"image/jpeg",".jpz":"image/jpeg",".js":"application/x-javascript",".jwc":"application/jwc",".kjx":"application/x-kjx",".lak":"x-lml/x-lak",".latex":"application/x-latex",".lcc":"application/fastman",".lcl":"application/x-digitalloca",".lcr":"application/x-digitalloca",".lgh":"application/lgh",".lml":"x-lml/x-lml",".lmlpack":"x-lml/x-lmlpack",".log":"text/plain",".lsf":"video/x-la-asf",".lsx":"video/x-la-asf",".m13":"application/x-msmediaview",".m14":"application/x-msmediaview",".m15":"audio/x-mod",".m3u":"audio/x-mpegurl",".m3url":"audio/x-mpegurl",".m4a":"audio/mp4a-latm",".m4b":"audio/mp4a-latm",".m4p":"audio/mp4a-latm",".m4u":"video/vnd.mpegurl",".m4v":"video/x-m4v",".ma1":"audio/ma1",".ma2":"audio/ma2",".ma3":"audio/ma3",".ma5":"audio/ma5",".man":"application/x-troff-man",".map":"magnus-internal/imagemap",".mbd":"application/mbedlet",".mct":"application/x-mascot",".mdb":"application/x-msaccess",".mdz":"audio/x-mod",".me":"application/x-troff-me",".mel":"text/x-vmel",".mht":"message/rfc822",".mhtml":"message/rfc822",".mi":"application/x-mif",".mid":"audio/mid",".midi":"audio/midi",".mif":"application/x-mif",".mil":"image/x-cals",".mio":"audio/x-mio",".mmf":"application/x-skt-lbs",".mng":"video/x-mng",".mny":"application/x-msmoney",".moc":"application/x-mocha",".mocha":"application/x-mocha",".mod":"audio/x-mod",".mof":"application/x-yumekara",".mol":"chemical/x-mdl-molfile",".mop":"chemical/x-mopac-input",".mov":"video/quicktime",".movie":"video/x-sgi-movie",".mp2":"video/mpeg",".mp3":"audio/mpeg",".mp4":"video/mp4",".mpa":"video/mpeg",".mpc":"application/vnd.mpohun.certificate",".mpe":"video/mpeg",".mpeg":"video/mpeg",".mpg":"video/mpeg",".mpg4":"video/mp4",".mpga":"audio/mpeg",".mpn":"application/vnd.mophun.application",".mpp":"application/vnd.ms-project",".mps":"application/x-mapserver",".mpv2":"video/mpeg",".mrl":"text/x-mrml",".mrm":"application/x-mrm",".ms":"application/x-troff-ms",".msg":"application/vnd.ms-outlook",".mts":"application/metastream",".mtx":"application/metastream",".mtz":"application/metastream",".mvb":"application/x-msmediaview",".mzv":"application/metastream",".nar":"application/zip",".nbmp":"image/nbmp",".nc":"application/x-netcdf",".ndb":"x-lml/x-ndb",".ndwn":"application/ndwn",".nif":"application/x-nif",".nmz":"application/x-scream",".nokia-op-logo":"image/vnd.nok-oplogo-color",".npx":"application/x-netfpx",".nsnd":"audio/nsnd",".nva":"application/x-neva1",".nws":"message/rfc822",".oda":"application/oda",".ogg":"audio/ogg",".oom":"application/x-AtlasMate-Plugin",".p10":"application/pkcs10",".p12":"application/x-pkcs12",".p7b":"application/x-pkcs7-certificates",".p7c":"application/x-pkcs7-mime",".p7m":"application/x-pkcs7-mime",".p7r":"application/x-pkcs7-certreqresp",".p7s":"application/x-pkcs7-signature",".pac":"audio/x-pac",".pae":"audio/x-epac",".pan":"application/x-pan",".pbm":"image/x-portable-bitmap",".pcx":"image/x-pcx",".pda":"image/x-pda",".pdb":"chemical/x-pdb",".pdf":"application/pdf",".pfr":"application/font-tdpfr",".pfx":"application/x-pkcs12",".pgm":"image/x-portable-graymap",".pict":"image/x-pict",".pko":"application/ynd.ms-pkipko",".pm":"application/x-perl",".pma":"application/x-perfmon",".pmc":"application/x-perfmon",".pmd":"application/x-pmd",".pml":"application/x-perfmon",".pmr":"application/x-perfmon",".pmw":"application/x-perfmon",".png":"image/png",".pnm":"image/x-portable-anymap",".pnz":"image/png",".pot":"application/vnd.ms-powerpoint",".ppm":"image/x-portable-pixmap",".pps":"application/vnd.ms-powerpoint",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".pqf":"application/x-cprplayer",".pqi":"application/cprplayer",".prc":"application/x-prc",".prf":"application/pics-rules",".prop":"text/plain",".proxy":"application/x-ns-proxy-autoconfig",".ps":"application/postscript",".ptlk":"application/listenup",".pub":"application/x-mspublisher",".pvx":"video/x-pv-pvx",".qcp":"audio/vnd.qcelp",".qt":"video/quicktime",".qti":"image/x-quicktime",".qtif":"image/x-quicktime",".r3t":"text/vnd.rn-realtext3d",".ra":"audio/x-pn-realaudio",".ram":"audio/x-pn-realaudio",".ras":"image/x-cmu-raster",".rc":"text/plain",".rdf":"application/rdf+xml",".rf":"image/vnd.rn-realflash",".rgb":"image/x-rgb",".rlf":"application/x-richlink",".rm":"audio/x-pn-realaudio",".rmf":"audio/x-rmf",".rmi":"audio/mid",".rmm":"audio/x-pn-realaudio",".rmvb":"audio/x-pn-realaudio",".rnx":"application/vnd.rn-realplayer",".roff":"application/x-troff",".rp":"image/vnd.rn-realpix",".rpm":"audio/x-pn-realaudio-plugin",".rt":"text/vnd.rn-realtext",".rte":"x-lml/x-gps",".rtf":"application/rtf",".rtg":"application/metastream",".rtx":"text/richtext",".rv":"video/vnd.rn-realvideo",".rwc":"application/x-rogerwilco",".s3m":"audio/x-mod",".s3z":"audio/x-mod",".sca":"application/x-supercard",".scd":"application/x-msschedule",".sct":"text/scriptlet",".sdf":"application/e-score",".sea":"application/x-stuffit",".setpay":"application/set-payment-initiation",".setreg":"application/set-registration-initiation",".sgm":"text/x-sgml",".sgml":"text/x-sgml",".sh":"application/x-sh",".shar":"application/x-shar",".shtml":"magnus-internal/parsed-html",".shw":"application/presentations",".si6":"image/si6",".si7":"image/vnd.stiwap.sis",".si9":"image/vnd.lgtwap.sis",".sis":"application/vnd.symbian.install",".sit":"application/x-stuffit",".skd":"application/x-Koan",".skm":"application/x-Koan",".skp":"application/x-Koan",".skt":"application/x-Koan",".slc":"application/x-salsa",".smd":"audio/x-smd",".smi":"application/smil",".smil":"application/smil",".smp":"application/studiom",".smz":"audio/x-smd",".snd":"audio/basic",".spc":"application/x-pkcs7-certificates",".spl":"application/futuresplash",".spr":"application/x-sprite",".sprite":"application/x-sprite",".sdp":"application/sdp",".spt":"application/x-spt",".src":"application/x-wais-source",".sst":"application/vnd.ms-pkicertstore",".stk":"application/hyperstudio",".stl":"application/vnd.ms-pkistl",".stm":"text/html",".svg":"image/svg+xml",".sv4cpio":"application/x-sv4cpio",".sv4crc":"application/x-sv4crc",".svf":"image/vnd",".svh":"image/svh",".svr":"x-world/x-svr",".swf":"application/x-shockwave-flash",".swfl":"application/x-shockwave-flash",".t":"application/x-troff",".talk":"text/x-speech",".tar":"application/x-tar",".taz":"application/x-tar",".tbp":"application/x-timbuktu",".tbt":"application/x-timbuktu",".tcl":"application/x-tcl",".tex":"application/x-tex",".texi":"application/x-texinfo",".texinfo":"application/x-texinfo",".tgz":"application/x-compressed",".thm":"application/vnd.eri.thm",".tif":"image/tiff",".tiff":"image/tiff",".tki":"application/x-tkined",".tkined":"application/x-tkined",".toc":"application/toc",".toy":"image/toy",".tr":"application/x-troff",".trk":"x-lml/x-gps",".trm":"application/x-msterminal",".tsi":"audio/tsplayer",".tsp":"application/dsptype",".tsv":"text/tab-separated-values",".ttz":"application/t-time",".txt":"text/plain",".uls":"text/iuls",".ult":"audio/x-mod",".ustar":"application/x-ustar",".uu":"application/x-uuencode",".uue":"application/x-uuencode",".vcd":"application/x-cdlink",".vcf":"text/x-vcard",".vdo":"video/vdo",".vib":"audio/vib",".viv":"video/vivo",".vivo":"video/vivo",".vmd":"application/vocaltec-media-desc",".vmf":"application/vocaltec-media-file",".vmi":"application/x-dreamcast-vms-info",".vms":"application/x-dreamcast-vms",".vox":"audio/voxware",".vqe":"audio/x-twinvq-plugin",".vqf":"audio/x-twinvq",".vql":"audio/x-twinvq",".vre":"x-world/x-vream",".vrml":"x-world/x-vrml",".vrt":"x-world/x-vrt",".vrw":"x-world/x-vream",".vts":"workbook/formulaone",".wav":"audio/x-wav",".wax":"audio/x-ms-wax",".wbmp":"image/vnd.wap.wbmp",".wcm":"application/vnd.ms-works",".wdb":"application/vnd.ms-works",".web":"application/vnd.xara",".webm":"video/webm",".wi":"image/wavelet",".wis":"application/x-InstallShield",".wks":"application/vnd.ms-works",".wm":"video/x-ms-wm",".wma":"audio/x-ms-wma",".wmd":"application/x-ms-wmd",".wmf":"application/x-msmetafile",".wml":"text/vnd.wap.wml",".wmlc":"application/vnd.wap.wmlc",".wmls":"text/vnd.wap.wmlscript",".wmlsc":"application/vnd.wap.wmlscriptc",".wmlscript":"text/vnd.wap.wmlscript",".wmv":"audio/x-ms-wmv",".wmx":"video/x-ms-wmx",".wmz":"application/x-ms-wmz",".wpng":"image/x-up-wpng",".wpt":"x-lml/x-gps",".wri":"application/x-mswrite",".wrl":"x-world/x-vrml",".wrz":"x-world/x-vrml",".ws":"text/vnd.wap.wmlscript",".wsc":"application/vnd.wap.wmlscriptc",".wv":"video/wavelet",".wvx":"video/x-ms-wvx",".wxl":"application/x-wxl",".x-gzip":"application/x-gzip",".xaf":"x-world/x-vrml",".xar":"application/vnd.xara",".xbm":"image/x-xbitmap",".xdm":"application/x-xdma",".xdma":"application/x-xdma",".xdw":"application/vnd.fujixerox.docuworks",".xht":"application/xhtml+xml",".xhtm":"application/xhtml+xml",".xhtml":"application/xhtml+xml",".xla":"application/vnd.ms-excel",".xlc":"application/vnd.ms-excel",".xll":"application/x-excel",".xlm":"application/vnd.ms-excel",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".xlt":"application/vnd.ms-excel",".xlw":"application/vnd.ms-excel",".xm":"audio/x-mod",".xml":"application/xml",".xmz":"audio/x-mod",".xof":"x-world/x-vrml",".xpi":"application/x-xpinstall",".xpm":"image/x-xpixmap",".xsit":"text/xml",".xsl":"text/xml",".xul":"text/xul",".xwd":"image/x-xwindowdump",".xyz":"chemical/x-pdb",".yz1":"application/x-yz1",".z":"application/x-compress",".zac":"application/x-zaurus-zac",".json":"application/json",".vsd":"application/vnd.visio",".et":"application/kset",".wps":"application/kswps",".dps":"application/ksdps"};const Ps={0:"js.css.pdf.psd.ai.txt.eps.txt",xls:"xls.xlsx",doc:"doc.docx.rtf",ppt:"ppt.pptx",htm:"htm.html",zip:"rar.zip.tar.jar.z.7z.ace.lzh.arj.gzip.bz2.cab.uue",fla:"fla.swf",fon:"eot.otf.fon.font.ttf.ttc.woff.woff2",iso:"iso.nrg.mds.mdf.bin.cue.img.fcd.lcd.dmg",vid:"avi.asf.wmv.avs.flv.mkv.mov.3gp.mp4.webm.mpa.mpe.mpg.mpeg.dat.dsm.ogm.vob.rm.rmvb.ts.tp.ifo.nsv.m4u.m4v.asx.asr.movie.fvi.pvx.rv.vdo.viv.vivo.wm.wmx.wv.wvx.mpv2.mpg4",aud:"aif.aifc.aiff.als.awb.mp3.aac.au.wav.wma.cda.flac.m4a.mid.mka.mp2.mpc.ape.ofr.ogg.ra.wv.tta.ac3.dts.wv.shn.vqf.spc.nsf.adx.psf.minipsf.psf2.minipsf2.rsn.zst",img:"jpg.jpeg.gif.png.bmp.tif.tiff.ico"},$s={};for(let t in Ps)Ps[t].split(".").forEach(e=>{$s[e]="0"==t?e:t});const zs={video:Ps.vid,audio:Ps.aud,image:Ps.img};for(let t in zs)zs[t]=zs[t].split(".").map(t=>`*.${t};`).join("");const Ds=function(t){let e=Nt.strFrom(t||"",".",!0).toLowerCase();return $s[e]||"file"},Es=function(t){let e;return null==t||isNaN(t)||(t+="K"),(t=Nt.number(t.replace(/[a-z]+$/i,function(t){return e=t.charAt(0).toUpperCase(),""})))*("K"===e?1024:"M"===e?1048576:"G"===e?1073741824:"T"===e?1099511627776:1)};var Ls={name:"w-fileupload",mixins:[Wi],props:["uploadSrc","thumbnailSrc","downloadSrc","uploadLimit","sizeLimit","maxFileSize","minFileSize","fileTypes","filter","success","error","itemWidth","align","vertical","gap","checkFile"],data:()=>({list:[],emiting:!1}),created(){this.$watch(()=>this.x.modelValue,t=>{if(this.emiting)return this.emiting=!1;t&&"string"==typeof t&&(t=JSON.parse(t)),this.list=Array.isArray(t)?t.map(t=>({value:t})):t?[{value:t}]:[]},{immediate:!0})},methods:{x_default:()=>({gap:10,vertical:!0}),val(t){if(0==arguments.length){let t=[];return this.list.forEach(e=>e.value&&t.push(e.value)),t}this.x.modelValue=t,this.$emit("update:modelValue",t),this.trigger("change",t)},getInputValue:t=>0==t.length?"":JSON.stringify(t),getFileTypes(){let t=this.x.fileTypes;return zs[t]&&(t=zs[t]),t&&"*.*"!==t?t.replace(/\*/g,"").replace(/;/g,",").toLowerCase():""},getAccept(){let t=[],e=this.getFileTypes();if(!e)return;let i=[];return e.toLowerCase().split(",").forEach(t=>{t&&i.push(t)}),i.forEach(e=>{e&&t.push(function(t){let e=K(t,".",!0)||t;return Vs["."+e]}(e)||e)}),t.join(",")},isImage:t=>"img"==Ds(t.value?t.value.name:t.file.name),isVideo:t=>"vid"==Ds(t.value?t.value.name:t.file.name),isAudio:t=>"aud"==Ds(t.value?t.value.name:t.file.name),fileSelected(t){if(this.x.uploadLimit>1&&t.target.files.length+this.list.length>this.x.uploadLimit)return t.target.value="",Nt.alert(Nt.loc.ps(Nt.loc.form.upload_limit,this.x.uploadLimit));let e,i,s,l,r=this.x.maxFileSize&&Es(this.x.maxFileSize),a=this.x.minFileSize&&Es(this.x.minFileSize),o=this.getFileTypes(),n=this.x.checkFile,h=n&&this.list.filter(t=>t.file).map(t=>t.file),c=n&&this.list.filter(t=>t.value).map(t=>t.value);Nt.lodash.each(t.target.files,u=>{let d="."+Nt.strFrom(u.name,".",!0).toLowerCase();if(r&&u.size>r)(e||(e=[])).push(u.name);else if(a&&u.size<a)(i||(i=[])).push(u.name);else if(o&&!Nt.idsAny(o,d,","))(s||(s=[])).push(u.name);else{let e=n&&n(u,t.target.files,h,c);e?(l||(l=[])).push(e):this.list.push({file:u})}}),e?Nt.alert(Nt.loc.ps(Nt.loc.form.upload_maxfilesize,e.join("<br>"),this.x.maxFileSize)):i?Nt.alert(Nt.loc.ps(Nt.loc.form.upload_minfilesize,i.join("<br>"),this.x.minFileSize)):s?Nt.alert(Nt.loc.ps(Nt.loc.form.upload_invalid_file_type,s.join("<br>"),o)):l&&Nt.alert(l.join("<br>")),t.target.value="",this.nextUpload()},upload(t){if(this.x.uploadSrc&&!t.loading){let e=Nt.urlFormat(this.x.uploadSrc,this.x.data,this.x),i=new FormData;i.append("Filedata",t.file),t.loading=!0,t.source=Nt.http.CancelToken.source(),Nt.http.post(e,i,{onUploadProgress:e=>t.progress=Math.floor(e.loaded/e.total*100),cancelToken:t.source.token}).then(e=>{t.loading=!1,t.loaded=!0,t.source=null;let i=this.x.filter?this.x.filter(e,this):e.data;i?i.error?t.error=i.error:i.id?(t.value=i,this.x.success&&this.x.success(t.value,this,e)):t.error={message:Nt.loc.ps(Nt.loc.form.upload_invalid_data,JSON.stringify(i))}:t.error={message:Nt.loc.form.upload_no_data},t.error&&t.error.message&&Nt.alert(t.error.message),this.nextUpload()}).catch(e=>{t.error=e,t.loading=!1,t.loaded=!0,t.source=null,this.nextUpload(),e.response&&e.response.status&&Nt.alert(e.response.status+": "+e)})}else if(!this.x.uploadSrc){let e="请给上传组件配置uploadSrc";t.error={message:e},console.error(e),this.nextUpload()}},nextUpload(){for(let t of this.list){if(t.loading)return;if(!t.error&&(t.file&&!t.loaded))return this.upload(t)}this.emiting=!0;let t=this.val();this.$emit("update:modelValue",t),this.trigger("change",t)},clickItem(t,e){e.value&&(this.getOn("click:item")?(t.runType="click:item",this.trigger(t,e.value,this.val())):this.x.downloadSrc&&Nt.download(Nt.urlServer(this.x.downloadSrc,e.value,this.x.data)))},remove(t){t.source&&t.source.cancel();let e=this.list.findIndex(e=>e==t);this.list.splice(e,1),this.nextUpload()},formText(){return this.val().map(t=>t.name).join(", ")},chooseFile(){this.$refs.file.click()},html_list(){return this.list.map(t=>{let e=t.value,i=e?e.name:t.file.name,s=[a("div",{class:"w-fileupload-value-close f-i f-i-trash",title:Nt.loc.remove,onclick:e=>this.remove(t)})];e&&this.$slots.menu&&s.push(a(oi,null,{target:()=>a("div",{class:"w-fileupload-value-menu f-i f-i-ellipsis",title:Nt.loc.more}),default:()=>this.$slots.menu({item:e})}));let l=e?e.id:t.key;return l||(t.key=l=Nt.uid()),this.$slots.name&&(i=this.$slots.name({item:t.value||t.file})),a("div",{key:l,class:["w-fileupload-value",{"z-loading":!t.error&&(t.loading||t.file&&!t.loaded),"z-err":t.error}],style:{"--w-upload-progress":t.file?`${t.progress||0}%`:"",width:Nt.unitSize(this.x.itemWidth)},title:t.error?t.error.message:i},[a("i",{class:["w-fileupload-value-icon f-i","f-i-file-"+Ds(i)],onclick:e=>this.clickItem(e,t)}),t.error&&a("div",{class:"w-fileupload-value-error"},Nt.loc.form.upload_error),a("div",{class:"w-fileupload-value-text f-line-1",onclick:e=>this.clickItem(e,t)},i),s])})},html_input_form(){return[this.html_input_hidden(),a("input",{type:"file",ref:"file",multiple:1!=this.x.uploadLimit,accept:this.getAccept(),onchange:this.fileSelected,class:"f-hide"})]},html_input_button(){return a("div",{},[a($i,{ref:"uploadbbr",class:"w-fileupload-bbr",gap:10},{default:()=>[this.$slots.button?this.$slots.button(this):a(si,{text:"选择文件",icon:".f-i .f-i-upload",class:"w-fileupload-button",onclick:this.chooseFile,disabled:!this.canUpload}),this.slot("right")]}),this.slot("down")])},html_input_list(){return this.list.length?a("div",{ref:"list",class:["w-fileupload-list",{"f-clearfix":this.x.vertical}]},this.html_list()):null},html_input(){return this.html_input_form().concat(this.html_input_button(),this.html_input_list())},html_main(){return a("div",{class:"w-formbase-main"},this.html_form())},html_slots(){return[this.html_label(),this.html_main()]}},computed:{validHooks(){return{...this.pubValidHooks,validateDefault:t=>{for(let t of this.list){if(t.loading)return this.formErr({type:"upload_loading"});if(t.error)return this.formErr({type:"upload_invalid_file"})}}}},input_value(){return this.getInputValue(this.val())},errorTipTarget(){return this.$refs.uploadbbr||this},canUpload(){return!!this.isNormal&&!(this.x.uploadLimit>0&&this.list.length>=this.x.uploadLimit)},dir:()=>"v",html_class(){return{"z-vertical":this.x.vertical,"z-horizontal":!this.x.vertical,"z-compat":Nt.br.compat.gap}},html_style:()=>({"--w-label-min-height":"32px"}),html_on(){return{onclick:()=>this.warn(!1)}}},__file:"src/widgets/FileUpload.vue"},As={props:["item"],inject:["provideUpload"],data:()=>({dataURL:null}),methods:{click(t){this.provideUpload.clickItem(t,this.item,this.provideUpload)},createImageThumbnail(){let t=new FileReader;t.onload=t=>{this.item.loaded||(this.dataURL=t.target.result)},t.readAsDataURL(this.item.file)},createVideoThumbnail(){let t=document.createElement("video");t.addEventListener("loadeddata",()=>{setTimeout(()=>{if(this.item.loaded)return;let e=document.createElement("canvas"),i=e.getContext("2d");e.width=t.videoWidth,e.height=t.videoHeight,i.drawImage(t,0,0),this.dataURL=e.toDataURL("image/png"),t.pause(),Nt.q(t).remove()},150)}),t.src=URL.createObjectURL(this.item.file),t.muted=!0,t.play()},setProgress(t){let e=this.$refs.loading;if(!this.item.loading||!e)return;let i=e.getContext("2d");e.width=e.width,i.beginPath(),i.translate(17,17),i.moveTo(0,0),i.arc(0,0,15,.5*-Math.PI,Math.PI*(2*t/100-.5)),i.closePath(),i.fillStyle="rgba(255,255,255,.7)",i.fill(),i.beginPath(),i.arc(0,0,16,0,2*Math.PI),i.strokeStyle="#fff",i.stroke()},remove(t){this.upload.remove(this.item),t.stopPropagation()}},computed:{upload(){return this.provideUpload},img(){return this.$refs.thumbnail.$refs.img},src(){return this.item.value?Nt.urlServer(this.item.value.thumbnail||this.upload.x.thumbnailSrc,this.item.value,this.upload.x.data):""},name(){return this.item.value?this.item.value.name:this.item.file.name},tip(){return this.item.error?this.item.error.message:this.name},titleRemove:()=>Nt.loc.remove,titleMore:()=>Nt.loc.more,canPlay(){return this.item.value&&(this.upload.isVideo(this.item)||this.upload.isAudio(this.item))},menus(){return this.upload.$slots.menu({item:this.item.value})}},mounted(){!this.item.loaded&&this.item.file&&(this.upload.isVideo(this.item)?this.createVideoThumbnail():this.upload.isImage(this.item)&&this.createImageThumbnail(),this.$watch(()=>this.item.progress,t=>this.setProgress(t),{immediate:!0}))}};const Hs={class:"f-line-1"},Fs={key:0,ref:"loading",width:"34",height:"34",class:"w-mediaupload-progress-loading f-abs-center"},Is={key:1,class:"w-mediaupload-cover-play f-abs-center f-flex-center f-i f-i-play"},Ns={class:"w-mediaupload-value-oper"},Ys=["title"],Bs=["title"];As.render=function(t,e,i,s,l,r){const a=n("w-menu"),o=n("w-img");return u(),m(o,{class:P(["w-mediaupload-value",{"z-loading":i.item.loading,"z-canplay":r.canPlay,"z-err":i.item.error}]),ref:"thumbnail",src:r.src,"data-url":l.dataURL,width:r.upload.x.thumbnailWidth,"img-width":r.upload.x.thumbnailWidth-2,"img-height":r.upload.x.thumbnailHeight-2,tip:r.tip,onClick:r.click},Y({cover:f(()=>[i.item.loading?(u(),c("canvas",Fs,null,512)):r.canPlay?(u(),c("i",Is)):b("v-if",!0),p("div",Ns,[r.upload.isNormal?(u(),c("i",{key:0,class:"w-mediaupload-value-close f-flex-center f-i f-i-trash",title:r.titleRemove,onClick:e[0]||(e[0]=(...t)=>r.remove&&r.remove(...t))},null,8,Ys)):b("v-if",!0),i.item.value&&r.upload.$slots.menu?(u(),m(a,{key:1},{target:f(()=>[p("i",{class:"w-mediaupload-value-menu f-flex-center f-i f-i-ellipsis",title:r.titleMore},null,8,Bs)]),default:f(()=>[(u(!0),c(x,null,v(r.menus,t=>(u(),m(B(t)))),256))]),_:1})):b("v-if",!0)])]),_:2},[r.upload.x.showFileName?{name:"default",fn:f(()=>[p("div",Hs,w(r.name),1)]),key:"0"}:void 0]),1032,["class","src","data-url","width","img-width","img-height","tip","onClick"])},As.__file="src/widgets/MediaUploadItem.vue";var Os={name:"w-mediaupload",mixins:[Ls],props:["thumbnailWidth","thumbnailHeight","showFileName"],provide(){return{provideUpload:this}},methods:{x_default:()=>({fileTypes:"video",thumbnailWidth:80,thumbnailHeight:80,gap:10}),html_list(){return this.list.map((t,e)=>{let i=t.value?t.value.id:t.key;return i||(t.key=i=Nt.uid()),a(As,{item:t,index:e,key:i})})},html_input_button(){return a("div",{},[a($i,{ref:"uploadbbr",class:"w-fileupload-bbr"},{default:()=>[this.$slots.button?this.$slots.button(this):a(si,{ref:"uploadbutton",title:Nt.loc.form.choose_image,icon:".f-i .f-i-plus",class:"w-mediaupload-button",style:{width:Nt.unitSize(this.x.thumbnailWidth),height:Nt.unitSize(this.x.thumbnailHeight)},onclick:this.chooseFile}),this.slot("right")]}),this.slot("down")])},html_input(){return this.html_input_form().concat(a(Ee,{width:"*",class:"w-mediaupload-list",align:this.x.align,gap:this.x.gap},{default:()=>[this.html_list(),this.canUpload&&this.html_input_button()]}))}},computed:{html_style(){return{"--w-thumbnail-width":Nt.unitSize(this.x.thumbnailWidth),"--w-label-min-height":Nt.unitSize(this.x.thumbnailHeight),"--w-gap":Nt.unitSize(this.x.gap)}}},__file:"src/widgets/MediaUpload.vue"},js={name:"w-imageupload",mixins:[Os],methods:{x_default:()=>({fileTypes:"image",thumbnailWidth:80,thumbnailHeight:80,gap:10})},computed:{html_class:()=>"w-mediaupload"},__file:"src/widgets/ImageUpload.vue"},qs={name:"w-option",mixins:[Ve],props:["value","text","disabled"],inject:["provideOptionParent"],methods:{click(t){this.provideOptionParent.clickOption&&this.provideOptionParent.clickOption(this,t)}},computed:{isFocus(){let t=this.provideOptionParent.x.modelValue;return Array.isArray(t)?t.includes(this.value):Nt.idsAny(t,this.value)},isMul(){return this.provideOptionParent.x.multiple}}};const Rs=["disabled","title"],Ws={class:"f-flex-1 f-line-1"};qs.render=function(t,e,i,s,l,a){return u(),c("button",r(t.html_attrs,{class:["f-flex-align",a.provideOptionParent.$options.name+"-option",{"z-on":a.isFocus,"z-ds":i.disabled,"z-mul":a.isMul}],onClick:e[0]||(e[0]=(...t)=>a.click&&a.click(...t)),disabled:i.disabled,title:i.text}),[p("div",Ws,[S(t.$slots,"default",{},()=>[_(w(i.text),1)])]),a.isMul?(u(),c("div",{key:0,class:P(["w-option-checked",{"f-i f-i-check":a.isFocus}])},null,2)):b("v-if",!0)],16,Rs)},qs.__file="src/widgets/Option.vue";var Us={name:"w-spinner",mixins:[ys],inject:["provideRangeParent"],props:["decimal","format","showButton","buttonPosition","step","autoFix","compare","minValue","maxValue"],mounted(){this.x.format&&this.doFormat()},methods:{x_default:()=>({step:1,autoFix:!0,showButton:!0,buttonPosition:"right"}),doFormat(t){let e=""+this.x.modelValue,i=this.x.format.separator||",",s=RegExp(i.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),"g"),l=Nt.numFormat(e,this.x.format.length,i,this.x.format.rightward);if(e!==l){let i=this.$refs.v.selectionStart,r=e.slice(0,i).replace(s,"");if(this.val(l,t),document.activeElement===this.$refs.v){let t=l.slice(0,i).replace(s,"");this.$nextTick(()=>Nt.rngCursor(this.$refs.v,i+(r.length-t.length)))}}},stepBy(t,e){if(!this.isNormal)return;let i=this.defaultRuleValue("maxValue"),s=this.defaultRuleValue("minValue"),l=this.val(),r=Nt.numAdd(Nt.number(l),t*this.x.step),a=this.provideRangeParent&&this.provideRangeParent.forms(),o=r;if(null!=i&&(o=Math.min(i,o)),null!=s&&(o=Math.max(s,o)),a)if(a[0]==this){let t=a[1].val();null!=t&&(o=Math.min(t,o))}else if(a[1]==this){let t=a[0].val();null!=t&&(o=Math.max(t,o))}this.warn(!1),this.focus(),this.val(o,e),o==r&&this.tip_uid&&(Nt.close(this.tip_uid),this.tip_uid=null),this.x.format&&this.doFormat(e)},isUsableVal(t){return!this.getValidErrorSync(null,t)},isFocusTarget(t){return this.$refs.buttonMinus&&this.$refs.buttonMinus.contains(t)||this.$refs.buttonPlus&&this.$refs.buttonPlus.contains(t)},getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=e.mode||"<=",s=e.target.isWidget?e.target:this.ownerView.f(e.target),l=s&&s.formVal();if(t&&l&&Nt.isNumber(t)&&Nt.isNumber(l)){let e=Nt.number(t),r=Nt.number(l);if(!Nt.eval("d"+i+"td",{d:e,td:r}))return[this.getLabelText(),i,s.getLabelText()]}}},oninput(t){this.val(t.target.value,t),this.x.format&&this.doFormat(t)},onfocus(t){this.baseFocus(t)},onblur(t){let e=this.x.modelValue;if(e&&!this.isUsableVal(e)&&this.x.autoFix){let i=Nt.numDecimal(e,this.x.decimal);i=Nt.numRange(i,this.x.minValue,this.x.maxValue),this.val(i,t)}this.baseBlur(t)},html_button(){let t,e=[];return this.x.clearable&&this.isNormal&&(t=a("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),this.x.showButton?(t&&e.push(t),"right"===this.x.buttonPosition?e.push(a("div",{class:"w-spinner-step w-input-button f-flex-column f-oh"},[a("button",{ref:"buttonPlus",class:"w-spinner-step-up f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(1,t),innerHTML:'<i class="f-abs-center f-i f-i-caret-up"></i>'}),a("button",{ref:"buttonMinus",class:"w-spinner-step-down f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(-1,t),innerHTML:'<i class="f-abs-center f-i f-i-caret-down"></i>'})])):"between"===this.x.buttonPosition&&e.push(a("button",{ref:"buttonMinus",class:"w-spinner-step-minus f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(-1,t),innerHTML:'<i class="f-abs-center f-i f-i-minus"></i>'}),a("button",{ref:"buttonPlus",class:"w-spinner-step-plus f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(1,t),innerHTML:'<i class="f-abs-center f-i f-i-plus"></i>'}))):t&&e.push(t),e}},computed:{validHooks(){return{...this.pubValidHooks,minValue:(t,e,i)=>{if(t&&null!=e&&""!==e&&(Nt.isNumber(e)?Nt.number(t)<Nt.number(e):t<e))return this.formErr(i,[e])},maxValue:(t,e,i)=>{if(t&&null!=e&&""!==e&&(Nt.isNumber(e)?Nt.number(t)>Nt.number(e):t>e))return this.formErr(i,[e])},compare:(t,e,i)=>{let s=this.getCompareError(t,e);if(s)return this.formErr(i,s)},validateDefault:t=>{if(this.x.format&&(t=t.replace(RegExp(this.x.format.separator||",","g"),"")),null!=t){if(!Nt.isNumber(t))return this.formErr({type:"number_invalid"});let e=this.x.decimal;if(t=""+t,!e&&t.includes("."))return this.formErr({type:"number_integer"});if(e&&e>0&&Nt.strFrom(t,".").length>e)return this.formErr({type:"number_decimal_digit"},[e]);let i=this.provideRangeParent&&this.provideRangeParent.getRangeError();if(i)return this.formErr({type:"compare"},i)}}}},isReadonly(){if(null==this.x.readonly){let t=this.provideRangeParent;if(t&&t.x.readonly)return!0}return!!this.x.readonly},isDisabled(){if(null==this.x.disabled){let t=this.provideRangeParent;if(t&&t.x.disabled)return!0}return!!this.x.disabled},input_prop(){return{"w-valuetype":"number",oninput:this.oninput,onfocus:this.onfocus,onblur:this.onblur}},html_class(){return["z-buttonposition-"+this.x.buttonPosition,{"z-val":this.hasVal,"z-clearable":!!this.x.clearable}]}},__file:"src/widgets/Spinner.vue"},Xs={name:"w-datepicker",mixins:[ys],inject:["provideRangeParent"],props:["showButton","multiple","format","autoFix","compare","minValue","maxValue","dropProps","enableHour","enableMinute","enableSecond","defaultHour","defaultMinute","defaultSecond"],data:()=>({showDrop:!1,currentDate:null,lastValue:null,placeholder_type:"placeholder_select"}),methods:{x_default:()=>({format:"yyyy-MM-dd",autoFix:!0,showButton:!0}),isUsableVal(t){if(!t)return!0;if(!Nt.dateValid(t,this.x.format))return!1;let e=this.x.enableHour&&Nt.arrayNumber(this.x.enableHour),i=this.x.enableMinute&&Nt.arrayNumber(this.x.enableMinute),s=this.x.enableSecond&&Nt.arrayNumber(this.x.enableSecond);if(e||i||s){let l=Nt.dateParse(t,this.x.format);if(e&&!e.includes(l.getHours())||i&&!i.includes(l.getMinutes())||s&&!s.includes(l.getSeconds()))return!1}return!0},onfocus(t){this.lastValue=this.x.modelValue,this.baseFocus(t)},onkeyup(){this.isNormal&&(this.showDrop=!0)},onCloseDrop(){this.showDrop=!1,this.currentDate=null,this.doAutoFix()},clickButtonClear(t){t.stopPropagation(),this.hasVal&&(this.val("",t),this.$emit("clear",t))},doAutoFix(){let t=this.x.modelValue;if(t)if(this.isUsableVal(t)){let e=/\b(\d)\b/g;e.test(t)&&this.val(t.replace(e,"0$1"))}else this.x.autoFix&&this.val(this.lastValue)},drop(){Nt.br.mobile?Nt.dateSheet({value:this.x.modelValue,format:this.x.format,...this.getPeriod(),success:this.calendarCallback}):this.showDrop=!0},calendarCallback(t,e){this.val(t,e),this.showDrop=!1,this.currentDate=null,Nt.br.mobile||this.focus()},getPeriod(){let t=this.x.minValue,e=this.x.maxValue,i=this.provideRangeParent&&this.provideRangeParent.forms();if(i)if(i[0]==this){let t=i[1].formVal();null!=t&&(null==e||e>t)&&(e=t)}else if(i[1]==this){let e=i[0].formVal();null!=e&&(null==t||t<e)&&(t=e)}return{minValue:t,maxValue:e}},getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=this.x.format,s=e.mode||"<=",l=e.target.isWidget?e.target:this.ownerView.f(e.target),r=l&&l.formVal();if(t&&r&&Nt.dateValid(t,i)&&Nt.dateValid(r,i)){let e=Nt.dateParse(t,i),a=Nt.dateParse(r,i);if(!Nt.eval("d"+s+"td",{d:e,td:a}))return[this.getLabelText(),s,l.getLabelText()]}}},html_button(){let t=[],e=this.x.format||"",i=0;e.includes("H")&&i++,e.includes("m")&&i++,e.includes("s")&&i++;let s,l=/[Hms]/.test(e)&&!/[yMd]/.test(e);if(this.x.clearable&&this.isNormal&&(s=a("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),this.x.showButton){let e=[a("button",{class:"w-input-button-drop w-input-button f-i f-i-date"})];s&&e.push(s),t.push(a("div",{class:"w-input-buttonbar"},e))}else s&&t.push(s);if(this.showDrop){let e={ownproperty:!0,class:["f-dfish-dialog w-calendar-dialog",{"z-hastime":i,"z-onlytime":l}],style:{"--w-datepicker-time-cols":i||""},context:this,autoHide:!0,snap:()=>this.snapElem(),position:"v",indent:1};e=this.mergeDropProps(e),t.push(a(Oe,e,{default:()=>a(ls,{height:"*",pad:!0,current:this.currentDate||this.x.modelValue||"",value:this.x.modelValue,format:this.x.format,...this.getPeriod(),enableHour:this.x.enableHour,enableMinute:this.x.enableMinute,enableSecond:this.x.enableSecond,defaultHour:this.x.defaultHour,defaultMinute:this.x.defaultMinute,defaultSecond:this.x.defaultSecond,success:this.calendarCallback,"onClick:item":(t,e)=>{this.currentDate=e.value}})}))}return t}},computed:{validHooks(){return{...this.pubValidHooks,minValue:(t,e,i)=>{if(t&&Nt.dateParse(t,this.x.format)<Nt.dateParse(e,this.x.format))return this.formErr(i,[e])},maxValue:(t,e,i)=>{if(t&&Nt.dateParse(t,this.x.format)>Nt.dateParse(e,this.x.format))return this.formErr(i,[e])},compare:(t,e,i)=>{let s=this.getCompareError(t,e);if(s)return this.formErr(i,s)},validateDefault:(t,e,i)=>{if(this.x.multiple)return;if(t){let e=t,i=Nt.dateParse(e,this.x.format),s=i.getFullYear(),l=9999,r=1e3;if(s>l||s<r)return this.formErr({type:"time_exceed"},[r,l]);if(e!=Nt.dateFormat(i,this.x.format))return this.formErr({type:"time_format"},[Nt.dateFormat(new Date,this.x.format)])}if(this.defaultRuleValue("beforeNow")&&t&&t>Nt.dateFormat(new Date,this.x.format))return this.formErr({type:"beforeNow"},[this.x.beforeNow]);if(this.defaultRuleValue("afterNow")&&t&&t<Nt.dateFormat(new Date,this.x.format))return this.formErr({type:"afterNow"},[this.x.afterNow]);let s=this.provideRangeParent&&this.provideRangeParent.getRangeError();return s?this.formErr({type:"compare"},s):void 0}}},isReadonly(){if(null==this.x.readonly){let t=this.provideRangeParent;if(t&&t.x.readonly)return!0}return!!this.x.readonly},isDisabled(){if(null==this.x.disabled){let t=this.provideRangeParent;if(t&&t.x.disabled)return!0}return!!this.x.disabled},input_prop(){return Nt.br.mobile?{readonly:!0}:{onfocus:this.onfocus,onkeyup:this.onkeyup}},form_prop(){return{onclick:this.isNormal&&this.drop}},html_class(){return{"z-drop":this.showDrop,"z-val":this.hasVal,"z-droppable":!0,"z-clearable":this.x.clearable}}},mounted(){this.$watch("modelValue",t=>{if(this.x.autoFix&&t&&(t=Nt.strTrim(t))){if(!Nt.dateValid(t,this.x.format)){let e=Nt.dateParse(t,this.x.format);t=Nt.dateFormat(e,this.x.format),this.val(t)}this.lastValue=t}},{immediate:!0})},__file:"src/widgets/DatePicker.vue"},Qs={name:"w-dropbox",mixins:[Wi],provide(){return{provideOptionParent:this}},props:["multiple","cancelable","clearable","dropProps"],emits:["clear"],data:()=>({hasBorder:!0,text:"",dropper:null,showDrop:!1,placeholder_type:"placeholder_select"}),methods:{click(){this.$slots.default&&(this.showDrop=!this.showDrop,this.warn(!1))},clickOption(t,e){if(this.x.multiple){let e=Nt.arrayID(this.val()).concat();t.isFocus?Nt.lodash.pull(e,t.value):e.push(t.value),this.val(e)}else{let i=this.x.cancelable&&t.isFocus?"":t.value;this.val(i,e),this.showDrop=!1}},clickButtonClear(t){this.x.clearable&&this.hasVal&&(t.stopPropagation(),this.val(""),this.$emit("clear",t))},formText(){return this.input_text},html_input(){let t=Nt.string(this.input_text),e=this.input_placeholder,i=!!Nt.br.mobile,s=[this.html_input_hidden(),a("div",{class:"w-dropbox-text f-line-1",title:t||e},t||e&&a("div",{class:"w-input-placeholder"},e))];if(this.showDrop){let t={context:this,ownproperty:!0,class:"f-dfish-dialog w-dropbox-dialog"+(i?" z-mob":""),width:i?"100%":Nt.bcr(this.el("form")).width,autoHide:!0,cover:i,snap:i?null:()=>this.el("form"),position:i?null:"v",indent:1,scrollY:!0,scrollView:".z-on"};t=this.mergeDropProps(t),s.push(a(Oe,t,this.$slots))}return s},html_button(){let t=[a("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})];return this.x.clearable&&this.isNormal&&t.push(a("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),a("div",{class:"w-input-buttonbar"},t)}},computed:{input_text(){let t=[],e=this.slots_children(),i=Nt.arrayID(this.x.modelValue);return Nt.lodash.each(i,i=>{let s=e.findIndex(t=>t.props.value==i);if(s>-1&&t.push(s),!this.x.multiple)return!1}),t.sort().map(t=>e[t].props.text).join(", ")},form_prop(){return{onclick:this.isNormal&&this.click}},html_class(){return{"z-val":this.hasVal,"z-drop":this.showDrop,"z-droppable":!0,"z-clearable":this.x.clearable}}},__file:"src/widgets/DropBox.vue"},Gs={name:"w-pickbox",mixins:[Qs],props:["picker"],methods:{getInputValue:t=>"string"==typeof t?t:Nt.array(t).map(t=>t.value).join(","),click(t){this.$slots.default?(this.showDrop=!this.showDrop,this.warn(!1)):this.x.picker&&this.clickButtonPicker(t)},clickButtonPicker(t){t&&t.stopPropagation();let e=this.x.picker;"function"==typeof e&&e(t,this)},closeDrop(){return this.showDrop=!1,this},html_button(){let t=[];if(this.$slots.default||this.x.clearable&&this.isNormal){let e=[];this.$slots.default&&e.push(a("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&this.isNormal&&e.push(a("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(a("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(a("button",{class:"w-input-button-picker w-input-button f-i f-i-ellipsis",disabled:!this.isNormal,onclick:this.clickButtonPicker})),t}},computed:{hasVal(){return this.input_text},input_text(){let t=this.x.modelValue;return t&&"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(t)?t.map(t=>t.text).join(", "):t&&t.text||""}},__file:"src/widgets/PickBox.vue"},Js={name:"w-password",mixins:[ys],props:["compare","showPassword"],data:()=>({passwordVisible:!1}),methods:{getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=e.mode||"==",s=e.target.isWidget?e.target:this.ownerView.f(e.target),l=s&&s.formVal();if(t&&l&&!Nt.eval("v"+i+"tv",{v:t,tv:l}))return[this.getLabelText(),i,s.getLabelText()]}},clickButtonShowPassword(){this.passwordVisible=!this.passwordVisible},html_button(){let t=[];return this.isNormal&&this.x.clearable&&t.push(a("button",{class:"w-input-button-clear w-input-button f-i f-i-close",onclick:this.clickButtonClear})),this.x.showPassword&&t.push(a("button",{class:"w-input-button-showpassword w-input-button f-i "+(this.passwordVisible?"f-i-visible":"f-i-invisible"),onclick:this.clickButtonShowPassword})),t}},computed:{validHooks(){return{...this.pubValidHooks,compare:(t,e,i)=>{let s=this.getCompareError(t,e);if(s)return this.formErr(i,s)}}},input_type(){return this.passwordVisible?"text":"password"}},__file:"src/widgets/Password.vue"},Ks={name:"w-range",mixins:[Wi],provide(){return{provideRangeParent:this}},props:["mode"],methods:{getRangeError(){let t=this.forms();if(t&&t.length)return t[0].getCompareError(t[0].formVal(),{target:t[1],mode:this.x.mode})},forms(){const t=this.$refs.to;return t&&this.ownerView.fAll(null,t.parentNode)},snapElem(){return this.forms()[0]||this.el("form")},html_form(){let t=this.slots_children();return t.splice(1,0,a("div",{ref:"to",class:"w-range-to"},Nt.loc.to)),t}},computed:{html_on(){return{onclick:t=>this.warnClass=""}}},__file:"src/widgets/Range.vue"},Zs={name:"w-combobox",mixins:[Wi],props:["multiple","strict","dropper","picker","dropProps","br","clearable"],emits:["input","click:item","blur","focus","clear"],data(){return{hasBorder:!0,text:"",showSuggest:!1,sug_timer:null,sensor_text:this.getInputText(this.modelValue),sensor_width:null}},methods:{x_default:()=>({strict:!0}),watchModelValue(t,e){this.clear(),this.x.strict||(this.sensor_text=this.getInputText(t));(e&&e.map?e.map(t=>t.value).join(","):"")!=(t&&t.map?t.map(t=>t.value).join(","):"")&&this.trigger("change",t)},getInputValue(t){if("string"==typeof t&&t)return t;let e=Nt.array(t).filter(t=>t.value).map(t=>t.value);return!this.x.strict&&this.sensor_text&&e.push(this.sensor_text),e.join(",")},getInputText(t){const e=Nt.array(t).find(t=>!t.value&&t.text);return e?e.text:""},addVal(t,e){let i;i=this.x.multiple?Nt.lodash.unionBy(Nt.array(this.x.modelValue),Nt.array(t),"value"):[t],Nt.lodash.remove(i,t=>!t||!t.text),this.val(i,e)},complete(t,e){return e=e||new CustomEvent("complete"),this.addVal(t,e),this.clear(),this.$nextTick(this.focus),this},closeDrop(){return this.suggest(!1),this},suggest(t){!1===(t=null==t||t)&&clearTimeout(this.sug_timer),this.showSuggest=t,this.warn(!1)},clear(){this.sensor_text="",this.isNormal&&(this.$refs.input.value="")},reset(t){this.warn(!1),this.clear(),this.val(t||null==this.defaultValue?"":this.defaultValue)},focus(t){this.isNormal&&(this.$refs.input.focus(),t&&this.$refs.input.value&&Nt.rngCursor(this.$refs.input),this.warn(!1))},onclick(t){this.sensor_text||"function"!=typeof this.x.dropper||(this.suggest(),this.x.dropper(this));const e=t&&t.target==this.$refs.list;this.focus(e)},oninput(t){let e=t.target.value;this.sensor_text=e,clearTimeout(this.sug_timer),""===e?this.suggest(!1):this.sug_timer=setTimeout(()=>{this.suggest(!0),t.value=e,this.trigger(t,e)},500)},onkeydown(t){if(8===t.keyCode&&0===t.target.selectionStart&&0===t.target.selectionEnd){let t=Nt.array(this.x.modelValue).concat();t.length&&(t.splice(t.length-1,1),this.val(t))}},onblur(t){this.trigger("blur"),setTimeout(()=>{this.$.isUnmounted||this.$.isDeactivated||(this.valid("blur"),this.$refs.list.contains(document.activeElement)||(this.isFocus=!1))},100)},onfocus(t){this.isFocus=!0,!this.showSuggest&&t.target.value&&t.target.dispatchEvent(new Event("input")),this.trigger("focus")},onwheel(t){this.$refs.list.scrollWidth>this.$refs.list.clientWidth&&(this.$refs.list.scrollLeft+=50*(t.deltaY>0?1:-1),t.preventDefault())},onCloseDrop(){this.showSuggest=!1},clickItem(t,e){t.runType="click:item",t.value=e,this.trigger(t,e)},clickClose(t,e){t.stopPropagation();let i=Nt.array(this.x.modelValue).concat(),s=i.findIndex(t=>t.value==e.value);s>-1&&(i.splice(s,1),this.val(i,t))},clickButtonPicker(t){t.stopPropagation(),this.warn(!1);let e=this.x.picker;"function"==typeof e&&e(t,this)},clickButtonClear(t){t.stopPropagation(),this.val("",t),this.clear(),this.suggest(!1),this.focus(),this.$emit("clear",t)},formText(){return this.input_title},html_options(){let t=this.x.modelValue;if(t&&"string"!=typeof t)return Nt.array(t).filter(t=>t.value).map(t=>a("div",{class:["w-combobox-option f-flex-center",{"z-forbid":t.forbid}],onclick:e=>this.clickItem(e,t)},[a("div",{class:"w-combobox-option-text f-line-1",title:t.text},t.text),this.isNormal&&a("div",{class:"w-combobox-option-close f-i f-i-close",onclick:e=>this.clickClose(e,t)})]))},html_var(){return a("div",{class:"w-combobox-input-wrap"},[a("div",{class:"w-combobox-sensor",ref:"sensor"},this.sensor_text||(this.input_value?null:this.input_placeholder)),a("input",{type:"text",ref:"input",value:this.sensor_text,class:"w-combobox-input",style:{width:this.sensor_width},readonly:!this.isNormal,placeholder:this.input_value?null:this.input_placeholder,oninput:this.oninput,onkeydown:this.onkeydown,onblur:this.isNormal&&this.onblur,onfocus:this.isNormal&&this.onfocus})])},html_input(){const t=[this.html_options()];if(t.push(this.html_var()),this.showSuggest){let e={context:this,ownproperty:!0,class:"f-dfish-dialog",width:Nt.bcr(this.el("form")).width,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(a(Oe,e,this.$slots))}return[this.html_input_hidden(),a("div",{ref:"list",class:["w-combobox-list f-flex-1 f-flex f-oh f-height",{"f-h-gap":Nt.br.compat.gap}],onWheel:!this.x.br&&this.onwheel},t)]},html_button(){let t=[];if(this.x.dropper||this.x.clearable&&this.isNormal){let e=[];this.x.dropper&&e.push(a("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&e.push(a("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(a("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(a("button",{class:"w-input-button-picker w-input-button f-i f-i-ellipsis",disabled:!this.isNormal,onclick:this.clickButtonPicker})),t}},computed:{validHooks(){return{validateDefault:t=>{if(this.sensor_text){if(this.x.strict)return this.formErr({type:"invalid_option"});if(!this.x.multiple){const t=Nt.array(this.x.modelValue).find(t=>t.value);if(t)return this.formErr({type:"maxSize"},1)}}},...this.pubValidHooks}},hasVal(){return this.input_value},input_title(){return"string"==typeof this.x.modelValue?"":Nt.array(this.x.modelValue).map(t=>t.text).join(", ")},html_class(){return{"z-br":this.x.br,"z-drop":this.showSuggest,"z-val":this.hasVal||this.sensor_text,"z-droppable":this.x.dropper,"z-clearable":this.x.clearable,"z-on":this.isFocus}},form_prop(){return{onclick:this.isNormal&&this.onclick}}},mounted(){this.$refs.sensor&&new Me(()=>{this.$refs.sensor&&(this.sensor_width=this.$refs.sensor.offsetWidth+"px")}).observe(this.$refs.sensor)},__file:"src/widgets/ComboBox.vue"},tl={name:"w-linkbox",mixins:[Wi],props:["multiple","picker","dropProps","separator","strict","br","clearable"],emits:["input","dblclick:item","clear"],created(){this.$watch(()=>this.x.modelValue,t=>{this.isFocus||this.initOptions(t)})},data:()=>({hasBorder:!0,text:"",sugger:null,showSuggest:!1,sug_timer:null,_KC:null,imeMode:!1,paste_rng:null,currOpt:null,store:[]}),methods:{x_default:()=>({strict:!0}),getInputValue:t=>"string"==typeof t?t:Nt.array(t).map(t=>t.value).join(","),initOptions(t){null==t&&(t=this.x.modelValue),t&&"string"!=typeof t&&(t=Nt.array(t),this.store.length&&(this.store=[]),this.addStore(t),this.inp().innerHTML=this.html_options(t))},addVal(t,e){let i;i=this.x.multiple?Nt.lodash.unionBy(Nt.array(this.x.modelValue),Nt.array(t),"value"):[t],this.val(i,e)},complete(t,e){e=e||new CustomEvent("complete"),this.addStore(t),this.focus();let i=this.currOpt||Nt.rngElement(),s=this.x.separator||",";if(i){"U"===i.tagName||("I"===i.tagName?i.nextSibling&&"U"===i.nextSibling.tagName?i=i.nextSibling:(i=Nt.after(i,"<u></u>"),this.x.multiple&&Nt.after(i,"<i>"+s+"</i>")):i=!this.x.multiple&&this.inp().querySelector("u")||Nt.append(this.inp(),"<u></u>")),this.rng_text(i,0,t.text),Nt.classAdd(i,"_o"),i.setAttribute("data-value",t.value),t.forbid&&i.setAttribute("data-forbid","");let l=i.nextSibling;Nt.rngCursor(l&&!l.nextSibling?l:i),this.x.multiple&&!l&&Nt.rngCursor(Nt.after(i,"<i>"+s+"</i>"));let r=Nt.q(`u[data-value="${t.value}"]`,this.inp());r.length>1&&r.eq(0).next("i").addBack().remove(),this.save(e)}return this},closeDrop(){return this.suggest(!1),this},suggest(t){!1===(t=null==t||t)&&clearTimeout(this.sug_timer),this.showSuggest=t,this.warn(!1)},input(t,e){this.currOpt=t;let i=t.innerText.replace(/^[\s,]+|[\s,]+$/g,"");clearTimeout(this.sug_timer),""===i?this.suggest(!1):this.sug_timer=setTimeout(()=>{this.suggest(!0);const t=this.createEvent("input",{originalEvent:e});this.trigger(t,i)},500)},focus(){return this.$refs.inp.focus(),this.warn(!1),this},inp(){return this.$refs.inp},fixStyle(t){let e,i=Nt.rngElement(),s=!1,l=this.uid,r=this.inp();if(r.contains(i)||(i=r),e=i.innerText,this.paste_rng&&(i=this.paste_rng.parentElement()),i.id===l&&(i=r),i.id===l+"t"){if(!e)return this.closeDrop();if(3===i.firstChild.nodeType){let t=Nt.rngCursor(i),s=document.createElement("u");t.extractContents(),s.appendChild(document.createTextNode(e)),t.insertNode(s),Nt.rngCursor(s),i=s}else Nt.q("br",r).remove(),i.firstChild?i=i.firstChild:Nt.rngCursor(i)}if(Nt.q("br",r).remove(),"FONT"===i.tagName)if("U"===i.parentNode.tagName){let t=e.previousSibling.nodeValue,e=e.parentNode,i=e.innerText;this.rng_text(e,i.indexOf(t)+t.length+1,i)}else i.parentNode.id===l+"t"&&(e=i.parentNode.innerText,i=Nt.replaceWith(i,"<u></u>"),i.innerText=e);i!==r&&"I"!==i.tagName&&i.nextSibling&&"I"!==i.nextSibling.tagName&&(3===i.nextSibling.nodeType?i.nextSibling.parentNode.removeChild(i.nextSibling):(e=i.innerText,this.rng_text(i,e.length,e+i.nextSibling.innerText),i.nextSibling.parentNode.removeChild(i.nextSibling),s=!0)),Nt.q("u:has(br)",r).remove(),e=i.innerText;let a=[],o=this.x.separator||",";if(this.x.multiple&&e.length>1&&e.indexOf(o)>-1){let l,n=[],h=e.length-Nt.rngCursorOffset(),c=[];e.split(o).forEach(t=>{(l=Nt.strTrim(t))?(s=this.param(l),n.push("<u"+(s?' class=_o data-value="'+s.value+'"'+(s.forbid?" data-forbid":""):"")+">"+l+"</u>"),s?c.push('u[data-value="'+s.value+'"]'):a.push(l)):n.push("")}),c.length&&(c=Nt.q(c.join(","),r).next("i").addBack());let u=Nt.replaceWith(i,n.join("<i>"+o+"</i>")),d=0;if(!this.paste_rng||188===this._KC)do{if((d+=u.innerText.length)>=h){this.rng_text(u,d-h);break}}while(u=u.previousSibling);c.length&&(c.remove(),Nt.q("i + i, i:first-child",r).remove()),s=!0,(i=Nt.rngElement())&&"U"===i.tagName&&!i.getAttribute("data-value")?this.input(i,t):this.closeDrop()}else e?(Nt.classAny(i,"_o")&&!this.param(e)?(Nt.classRemove(i,"_o"),i.removeAttribute("data-value"),s=!0):this.x.strict||(s=!0),this.input(i,t)):(s=!0,this.closeDrop());s&&this.save(t),this.paste_rng=null},rng_text(t,e,i){let s=Nt.rngSelection();null!=i&&(t.innerText=i),s.selectNodeContents(t),Nt.rngCursor(s,e)},clickPicker(t){t.stopPropagation();let e=this.x.picker;"function"==typeof e&&e(t,this)},clickButtonClear(t){t.stopPropagation(),this.x.clearable&&this.hasVal&&(this.val([],t),this.$nextTick(this.focus),this.$emit("clear",t))},addStore(t){if(t&&"string"!=typeof t){let e=Nt.array(t).filter(t=>!this.store.find(e=>e.value==t.value));e.length&&(this.store=this.store.concat(e))}},param(t){return this.store.find(e=>e.text==t)},save(t){let e=this.x.strict,i=[];Nt.q("> u",this.inp()).each((t,s)=>{let l=s.getAttribute("data-value"),r=s.innerText;l?i.push({value:l,text:r}):e||i.push({value:r})}),this.val(i,t)},onkeydown(t){13===t.keyCode&&t.preventDefault()},onkeyup(t){if(!this.imeMode){let e=this._KC=t.keyCode;13===e||38===e||40===e||17===e?t.stopPropagation():this.fixStyle(t),this._KC=null}},onclick(t){if(this.isNormal)if(t.target&&"U"===t.target.tagName&&!t.target.getAttribute("data-value"))this.input(t.target,t);else{let e=Nt.rngElement();"U"===e.tagName?this.input(e,t):"function"==typeof this.x.dropper?this.x.dropper(this):this.closeDrop()}},ondblclick(t){if("U"===t.target.tagName&&t.target.getAttribute("data-value")){let e=Nt.array(this.x.modelValue).find(e=>e.value==t.target.getAttribute("data-value"));e&&(t.runType="dblclick:item",t.value=e,this.trigger(t,e),window.getSelection().removeAllRanges())}},onCloseDrop(){this.showSuggest=!1},formText(){return this.input_title},html_options(t){let e=this.x.separator||",";if(null==t&&(t=this.x.modelValue),"string"!==t){let i=Nt.array(t),s=[];return Nt.lodash.each(i,(t,i)=>{if(s.push("<u"+(t.value?' class=_o data-value="'+t.value+'"':"")+(t.forbid?" data-forbid":"")+">"+t.text+"</u>"),!this.x.multiple)return!1;s.push("<i>"+e+"</i>")}),s.join("")}},html_var(){return a("div",{class:"w-linkbox-input f-flex-1",ref:"inp",id:this.uid+"t",contentEditable:this.isNormal,onkeyup:this.onkeyup,onkeydown:this.onkeydown,onclick:this.onclick,ondblclick:this.ondblclick,onfocus:t=>{this.isFocus=!0},onblur:t=>{this.isFocus=!1}})},html_input(){let t=[];if(this.showSuggest){let e={context:this,ownproperty:!0,class:"f-dfish-dialog",width:Nt.bcr(this.el("form")).width,scrollY:!0,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(a(Oe,e,this.$slots))}return[this.html_input_hidden(),this.html_var(),a("div",{class:"w-input-placeholder"},this.input_value?null:this.input_placeholder),t]},html_button(){let t=[];if(this.x.dropper||this.x.clearable&&this.isNormal){let e=[];this.x.dropper&&e.push(a("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&e.push(a("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(a("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(a("button",{class:"w-input-button f-i f-i-ellipsis",disabled:!this.isNormal,onclick:this.clickPicker})),t}},computed:{validHooks(){return{...this.pubValidHooks,validateDefault:t=>{if(this.x.strict&&Nt.q("u:not([data-value])").length>0)return this.formErr({type:"invalid_option"})}}},hasVal(){return this.input_value},input_title(){return"string"==typeof this.x.modelValue?"":Nt.array(this.x.modelValue).map(t=>t.text||t.value).join(", ")},html_class(){return{"z-br":this.x.br,"z-dc":this.getOn("dblclick:item"),"z-drop":this.showSuggest,"z-val":this.hasVal,"z-droppable":this.x.dropper,"z-clearable":this.x.clearable}}},mounted(){this.initOptions(),this.inp().addEventListener("compositionstart",()=>{this.imeMode=!0}),this.inp().addEventListener("compositionend",()=>{this.imeMode=!1})},__file:"src/widgets/LinkBox.vue"},el={props:["width","height","context"],data:()=>({smallLeft:0}),watch:{"context.x.modelValue":{handler(t){let e=this.context.max(),i=this.context.min();this.smallLeft=(this.width-this.smallWidth)*(t/(e-i))}}},mounted(){},methods:{refresh(t){this.context.refresh(t)},dragstart(t){},mousedown(t){this.context.dragstart(t)}},computed:{bigSrc(){return this.context.x.big.src},smallSrc(){return this.context.x.small.src},smallWidth(){return this.height*(this.context.x.small.width/this.context.x.small.height)}}};const il=["src"],sl=["src","width"];el.render=function(t,e,i,s,l,r){const a=n("w-dialog");return u(),m(a,{ref:"dialog",class:"w-jigsaw-dialog",width:i.width,height:i.height,context:i.context},{default:f(()=>[p("img",{class:"w-jigsaw-big",src:r.bigSrc},null,8,il),p("img",{class:"w-jigsaw-small",src:r.smallSrc,width:r.smallWidth,style:F({left:l.smallLeft+"px"}),onDragstart:e[0]||(e[0]=O((...t)=>r.dragstart&&r.dragstart(...t),["prevent"])),onMousedown:e[1]||(e[1]=(...t)=>r.mousedown&&r.mousedown(...t))},null,44,sl),p("span",{onClick:e[2]||(e[2]=(...t)=>r.refresh&&r.refresh(...t)),class:"w-jigsaw-refresh"},"刷新")]),_:1},8,["width","height","context"])},el.__file="src/template/TemplateJigsaw.vue";const ll=Nt.loc.form.jigsaw_drag_right;var rl={name:"w-jigsaw",mixins:[Wi],emits:["drop","click:refresh"],props:["big","small","dropWidth"],data:()=>({hasBorder:!0,text:ll,locked:!1,isSuccess:!1,isError:!1,showDrop:!1}),methods:{success(t){this.text=t,this.locked=!0,this.isSuccess=!0,this.showDrop=!1,this.setThumbLeft()},error(t,e,i){if(t||(t=""),this.text=t,this.isError=!0,this.showDrop=!1,this.warn(!0),this.setThumbLeft(0),e){this.locked=!0,this.text=t+`(${e/1e3})`;let s=setInterval(()=>{e-=1e3,this.text=t+`(${e/1e3})`,e<=0&&(clearInterval(s),this.reset(),i&&i())},1e3)}else i&&i()},reset(){this.locked=!1,this.isError=!1,this.isSuccess=!1,this.text=ll,this.setThumbLeft(0),this.warn(!1)},refresh(t){t.runType="click:refresh",this.trigger(t)},setThumbLeft(t){null==t?t=Nt.number(this.$refs.thumb.style.left):this.$refs.thumb.style.left=t+"px";let e=this.thumbWidth(),i=this.mainWidth(),s=t+e/2>i/2;this.$refs.text.style.left=s?0:t+e+"px",this.$refs.text.style.right=s?i-t+"px":0,this.el().classList.remove("z-drag")},dragstart(t){if(!this.isNormal||this.locked)return;this.warn(!1);let e=this.$refs.thumb,i=Nt.eventX(t),s=this.max(),l=this.min(),r=Nt.number(e.style.left),a=this.thumbWidth(),o=this.mainWidth();Nt.moveup(t=>{let n=Nt.eventX(t),h=Nt.numRange(r+n-i,0,o-a);e.style.left=h+"px",this.$refs.track.style.width=h+a+"px",this.x.modelValue=(s-l)*h/(o-a),this.el().classList.add("z-drag")},(t,i)=>{i&&e.dispatchEvent(new Event("drop"))},t)},mouseenter(t){!this.x.big||this.isSuccess||this.locked||(this.warn(!1),this.showDrop=!0)},drop(t){this.trigger(t,this.x.modelValue)},max(){let t=this.x.maxValue;return null==t?100:t},min(){let t=this.x.minValue;return null==t?0:t},thumbWidth(){return Nt.bcr(this.$refs.thumb).width},mainWidth(){return Nt.bcr(this.$refs.form).width},html_input(){return[this.html_input_hidden(),[a("div",{ref:"track",class:"w-jigsaw-track"}),a("div",{ref:"text",class:"w-jigsaw-text f-flex-center f-line-1"},this.text)]]},html_button(){let t=[a("button",{ref:"thumb",class:["w-jigsaw-thumb w-input-button f-i",this.isSuccess?"f-i-check":"f-i-long-arrow-right"],disabled:!!this.x.disabled,onmousedown:this.dragstart,onmouseenter:this.mouseenter,ondrop:this.drop})];if(this.showDrop){let e=Math.max(Nt.number(this.x.dropWidth),Nt.bcr(this.el("form")).width),i=Math.ceil(e*(this.x.big.height/this.x.big.width));t.push(a(el,{ownproperty:!0,width:e,height:i,autoHide:!0,context:this,snap:()=>this.el("form"),position:"v",onClose:()=>this.showDrop=null}))}return t}},computed:{validHooks(){return{...this.pubValidHooks,validateDefault:t=>{if(!this.isSuccess)return this.formErr({type:"jigsaw_required"})}}},html_class(){return{"z-success":this.isSuccess}},form_prop(){return{onmouseenter:this.mouseenter}}},__file:"src/widgets/Jigsaw.vue"},al={name:"w-form",mixins:[Wi],props:["vertical"],methods:{getInputValue:t=>null==t?"":"object"==typeof t?JSON.stringify(t):t,html_input(){return[this.html_input_hidden(),this.$slots.default&&this.$slots.default()]}},computed:{validHooks(){return{...this.pubValidHooks,required:(t,e,i)=>{if(e&&(!t||"[]"===t||"{}"===t))return this.formErr(i)}}},html_class(){return[{"z-vertical":this.x.vertical}]},html_style(){return{"--w-form-gap":Nt.unitSize(this.x.gap)}},form_prop(){return this.name&&{onclick:t=>this.warn(!1)}}},__file:"src/widgets/Form.vue"},ol={name:"w-formgroup",mixins:[Wi],props:["columns","rows","gap","defaultColspan"],methods:{x_default:()=>({columns:12,gap:0}),getInputValue:t=>null==t?"":"object"==typeof t?JSON.stringify(t):t,html_input(){return[this.html_input_hidden(),this.$slots.default&&this.$slots.default()]}},computed:{validHooks(){return{...this.pubValidHooks}},html_style(){let t=this.x.columns;Nt.isNumber(t)&&(t=`repeat(${t}, 1fr)`);let e=this.x.rows;return Nt.isNumber(e)&&(e=`repeat(${e}, 1fr)`),this.x.defaultColspan,{"--w-fromgroup-template-columns":t,"--w-fromgroup-template-rows":e,"--w-grid-gap":this.x.gap?Nt.unitSize(this.x.gap):""}},form_prop(){return this.name&&{onclick:t=>this.warn(!1)}}},__file:"src/widgets/FormGroup.vue"},nl={name:"w-rate",mixins:[Wi],props:["allowHalf","cancelable","sum","count","text"],data:()=>({hoverWrap:!1,hoverIndex:-1}),methods:{x_default:()=>({sum:5,count:5}),hoverItem(t,e){this.isNormal&&(this.hoverIndex=e)},clickItem(t,e){this.isNormal&&(this.x.modelValue=this.x.cancelable&&this.x.modelValue==e?"":e)},html_star(t){return a(ti,{class:["w-rate-star-icon",{"z-hv":this.hoverWrap&&t<=this.hoverIndex,"z-on":!this.hoverWrap&&t<=this.x.modelValue}],src:".f-i .f-i-star-full",onMouseenter:e=>this.hoverItem(e,t),onClick:e=>this.clickItem(e,t),disabled:!this.isNormal})},html_input(){let t=this.x.allowHalf?.5:1,e=(this.x.sum||5)*t/(this.x.count||5),i=[];for(let s=e;s<=this.x.sum;s+=e/t){let t=[this.html_star(s)];this.x.allowHalf&&t.push(this.html_star(s+e)),i.push(a("li",{class:"w-rate-star"},t))}return[this.html_input_hidden(),a("ul",{class:"w-rate-wrap",onMouseenter:t=>this.isNormal&&(this.hoverWrap=!0),onMouseleave:t=>this.isNormal&&(this.hoverWrap=!1)},i),this.x.text&&this.x.modelValue&&a("span",{class:"w-rate-text"},this.x.text[(this.x.modelValue-e)/t])]}},computed:{html_class(){return{"z-allow-half":this.x.allowHalf}}}};function hl(t,{trimZeros:e=!1}={}){let i=Number(t).toLocaleString("fullwide",{useGrouping:!1,minimumFractionDigits:0,maximumFractionDigits:20});if(i.includes("e")){const[e,s]=i.split("e"),l=parseInt(s,10);i=Number(t).toFixed(Math.abs(l)+(e.split(".").length||0))}const[s,l]=i.split(".");if(!l)return 0;return(e?l.replace(/0+$/,""):l).length}nl.__file="src/widgets/Rate.vue";var cl={name:"w-slider",mixins:[Wi],props:["minValue","maxValue","step"],emits:["drop"],data:()=>({grabbing:!1,left:0}),methods:{x_default:()=>({minValue:0,maxValue:100,step:1}),onmousedown(t){const e=Nt.bcr(this.$refs.bar);let i=Nt.number(this.x.modelValue),s=t.clientX;this.grabbing=!0;const l=hl(this.x.step);Nt.moveup(t=>{let r=t.clientX-s,a=i+r/e.width*(this.x.maxValue-this.x.minValue);a=Nt.numRange(a,this.x.minValue,this.x.maxValue),a=Number(Number(a).toFixed(l)),this.val(a)},t=>{this.grabbing=!1,this.trigger("drop",this.x.modelValue)},t)},onclick(t){if(t.target!==this.$refs.button){const e=hl(this.x.step),i=Nt.bcr(this.$refs.bar);let s=t.clientX-i.left,l=+this.x.minValue+(s-10)/i.width*(this.x.maxValue-this.x.minValue);l=Nt.numRange(l,this.x.minValue,this.x.maxValue),l=Number(Number(l).toFixed(e)),this.val(l),this.trigger("drop",l)}},html_input(){return[this.html_input_hidden(),a("div",{onClick:this.onclick,class:["w-slider-wrap"]},[a("div",{class:["w-slider-progress"]}),a("div",{ref:"bar",class:"w-slider-bar"},a("div",{ref:"button",onMousedown:this.onmousedown,class:["w-slider-button",{"z-grabbing":this.grabbing}]}))])]}},computed:{html_style(){return{"--w-slider-left":`${100*(this.x.modelValue-this.x.minValue)/(this.x.maxValue-this.x.minValue)||0}%`}}},__file:"src/widgets/Slider.vue"};const ul=[re,Ae,Oe,qe,We,Ze,oi,ni,Mi,Le,Ee,hi,ci,ui,fi,mi,xi,gi,vi,Ci,Pi,Vi,Ei,Li,Ai,ti,$i,si,ii,Hi,Fi,Ki,qi,Zi,ts,es,is,ss,ls,fs,xs,gs,Ri,_s,ys,ks,Ss,Qi,Ts,Cs,Ji,Ms,Ls,Os,js,qs,Us,Xs,Qs,Gs,Js,Ks,Zs,tl,rl,al,ol,nl,cl],dl={};Nt.WIDGET=dl,Nt.install=t=>{ul.forEach(e=>{t.component(e.name,e),dl[e.name]=e}),t.use(Ut)};export{Nt as default};
1
+ import t from"lodash";import e from"jquery";import i from"axios";import l from"qs";import{mergeProps as r,h as a,nextTick as o,resolveComponent as n,toRaw as h,createBlock as c,openBlock as u,withCtx as d,createElementBlock as p,createElementVNode as m,Fragment as f,createVNode as x,renderList as g,toDisplayString as v,createCommentVNode as w,createTextVNode as b,inject as _,provide as y,renderSlot as k,Teleport as S,computed as T,resolveDirective as C,withDirectives as M,normalizeClass as P,markRaw as V,ref as z,getCurrentInstance as D,onMounted as E,watch as L,normalizeStyle as H,unref as F,TransitionGroup as I,createSlots as N,resolveDynamicComponent as Y,withModifiers as B}from"vue";let O=navigator.userAgent.toLowerCase(),j=O.match(/\bchrome\/(\d+)/),q=O.match(/\bfirefox\/(\d+)/);const R={agent:O,chrome:j&&parseFloat(j[1]),firefox:q&&parseFloat(q[1]),safari:!j&&O.indexOf("safari")>0,ie:("Microsoft Internet Explorer"===navigator.appName||O.indexOf("trident")>0)&&document.documentMode,compat:{gap:!1}};if(O.match(/\bmobile\b/)){R.mobile=!0,R.app="file:"===location.protocol;let t=O.match(/(MicroMessenger)\/([\d\.]+)/i);t&&(R.wechat={version:t[2].replace(/_/g,".")});let e=O.match(/(Android);?[\s\/]+([\d.]+)?/i);e&&(R.android=!0,R.version=e[2],R.isBadAndroid=!/Chrome\/\d/.test(window.navigator.appVersion));let i=O.match(/(iPhone\sOS)\s([\d_]+)/i);if(i)R.ios=R.iphone=!0,R.version=i[2].replace(/_/g,".");else{let t=O.match(/(iPad).*OS\s([\d_]+)/i);t&&(R.ios=R.ipad=!0,R.version=t[2].replace(/_/g,"."))}}(R.chrome&&R.chrome<84||R.firefox&&R.firefox<63)&&(R.compat.gap=!0);let W=0;const U=()=>(W++).toString(36)+":";function X(t){return t?t.uid||(t.uid=U()):U()}var Q={yes:"是",no:"否",none:"无",to:"至",jump:"转到",confirm:"确定",search:"搜索",query:"查询",choose:"选择",save:"保存",remove:"删除",cancel:"取消",create:"新建",add:"添加",edit:"编辑",finish:"完成",refresh:"刷新",operfail:"操作失败",opertip:"操作提示",nodata:"暂无数据",more:"更多",field:"字段",close:"关闭",restore:"还原",rotate_left:"向左旋转",rotate_right:"向右旋转",dialog_max:"最大化",dialog_min:"最小化",detect_zoom:"温馨提示: 你的浏览器可能处于缩放({0}%)状态,这可能影响页面浏览效果,请尝试Ctrl+0重置,并刷新",no_tip_anymore:"不再提示",loading:"正在加载",wait:"请稍候..",submiting:"数据提交中,请稍候..",uploading:"正在上传,请稍侯..",click_preview:"点击预览",toomuch_wait:"次数过多,请稍候再试",toomuch_wait_countdown:"次数过多,请稍候再试(<em>{0}</em>)",preview_orginal_image:"查看原图",auth_success:"验证成功",auth_fail:"验证失败",choose_image:"选择图片",tree_movefail1:"无法移动:目标文件夹和源文件夹相同",tree_movefail2:"无法移动:目标文件夹是源文件夹的子文件夹",internet_error:"[{0} error] {1}<br>网络连接失败,请稍候再试",server_error:"[{0} error] {1}<br>系统异常,请联系管理员",preload_error:'获取预装载模板 "{0}" 失败',page:"页",page_text:{first:"首页",last:"尾页",next:"下页",prev:"上页"},print_preview:"打印预览",placeholder_input:"请输入{0}",placeholder_select:"请选择{0}",pulldown_refresh:"下拉刷新",release_refresh:"释放刷新",pullup_refresh:"上拉显示更多",pullup_nomore:"没有更多了",download_start:"开始下载..",download_complete:"下载完成",download_cannotopen:"无法打开此文件",download_fail:"下载失败",tab_close:"关闭标签",tab_close_others:"关闭其他标签",tab_close_all:"关闭全部标签",sort_asc:"升序",sort_desc:"降序",sort_cancel:"取消排序",column_choose:"选择列",connection_not_wifi:"您当前处于非wifi网络环境下,继续使用可能产生流量,确定继续吗?",debug:{sorry:"很抱歉,系统发生了错误",view_more:"点击“确定”,可在新窗口查看详细错误信息",no_command:"视图中没有定义此命令: {0}\nview path: {1}",no_combo:"选项列表(或树)没有设置combo参数\nname: {0}",error_template_type:'{0}\n请把此模板类型改为 "{1}"',error_type:"type错误或丢失\n{0}",tmpl_method_undefined:'"{0}" 方法不存在'},form:{required:"{0}不能为空",onlyone:"{0的}只能选择一条记录",maxLength:"{0}超出了{1}个字",reach_maxLength:"已到达可输入的最大字符长度",over_maxLength:"字符长度超出了{0}个字节",minLength:"{0}不能少于{1}个字节",maxValue:"{0}最大值为{1}",minValue:"{0}最小值为{1}",maxSize:"{0}最多选择{1}项",minSize:"{0}最少选择{1}项",pattern:"{0}格式不符合规范,或包含非法字符",password_weak:"弱",password_middle:"中",password_strong:"强",number_invalid:"{0}不是一个有效数字",number_integer:"{0}请填入一个整数",number_decimal_digit:"{0的}小数位不能超过{1}位",step_max_value:"已到达最大值",step_min_value:"已到达最小值",time_exceed:"{0的}年份超出有效范围。有效年份:{1}年 至 {2}年",time_format:"{0的}时间格式错误。正确格式范例:{1}",period_invalid:"{0的}起始时间应早于结束时间",beforeNow:"{0}不能大于当前时间",afterNow:"{0}不能小于当前时间",compare:"{0}需要满足条件:{1} {2} {3}",invalid_option:"存在无效选项",need_valid_option:"请输入一个有效选项",choose_atleastone:"请至少选择一项",complete_required:"请完成必填项",jigsaw_drag_right:"向右拖动滑块填充拼图",jigsaw_required:"请完成滑块验证",jigsaw_errorimg:"图片数据异常",upload_loading:"正在上传,请稍候..",upload_invalid_file:"存在无效文件",no_files:"<没有文件>",upload_error:"(上传失败)",upload_limit:"上传数量超过上限(最多{0}个)",upload_invalid_file_type:"无效的文件类型:<br>{0}<br><br>只能选择 {1} 格式文件",upload_invalid_data:"错误的文件数据格式:<br>{0}",upload_no_data:"缺少文件数据",upload_maxfilesize:"上传失败: {0}<br><br>文件大小不能超过{1}",upload_minfilesize:"上传失败: {0}<br><br>文件大小不能小于{1}"},year:"年",month:"月",day:"日",sky:"天",hour:"时",minute:"分",second:"秒",calendar:{now:"现在",today:"今天",weeknow:"本周",monthnow:"本月",yearnow:"本年",day_title:["日","一","二","三","四","五","六"],day_title_1:["一","二","三","四","五","六","日"],y:"{0}<span>年</span>",monthname:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],backdate:"返回日期",picktime:"选择时间",H:"时",m:"分",s:"秒",from_to:"{0} 至 {1}"},error:"错误",ps:(t,...e)=>(t&&(t=t.replace(/\{(\d+)([^\d]+)?\}/g,function(t,i,s){let l=e[parseFloat(i)];return null==l||""===l?"":s?l+s:l})),t),end:"结束"};const J=t=>null==t?"":""+t,G=(t,e,i)=>{let s=i?t.lastIndexOf(e):t.indexOf(e);return s<0?"":t.substr(s+e.length)},K=(t,e,i)=>{let s=i?t.lastIndexOf(e):t.indexOf(e);return s<0?"":t.substr(0,s)},Z=(t,e)=>{if(!t)return 0;e||(e=$.x.cnBytes||2);let i=0;for(let s=0,l=t.length;s<l;s++)i+=t.charCodeAt(s)>128?e:1;return i},tt=function(t,e,i){if(i=null==i?"0":i+"",!e)return t<10?i+t:t;for(t+="";t.length<e;)t=i+t;return t},et=function(t){return t.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},it=function(t,e,i){let s=[et(t)],l=t.length;if(e>0&&l>e)for(let i=l-1;i>=e;i--)for(let e,r=0,a=l-i;r<=a;r++)e=t.substr(r,i),s.push(et(e));return s},st="object",lt=null,rt=void 0,at=t=>{var e="string"==typeof t?parseFloat(t.replace(/[^\d\.-]|\b-/g,"")):+t;return isNaN(e)?0:e},ot=t=>null!=t&&!isNaN(t),nt=function(t,e){return e!=lt&&(e.min&&!isNaN(e.min)&&(t=Math.max(t,e.min)),e.max&&!isNaN(e.max)&&(t=Math.min(t,e.max))),t},ht=864e5,ct="yyyy-MM-dd HH:mm:ss",ut={0:"Q1",1:"Q1",2:"Q1",3:"Q2",4:"Q2",5:"Q2",6:"Q3",7:"Q3",8:"Q3",9:"Q4",10:"Q4",11:"Q4"},dt=function(t,e){"string"==typeof t&&(t=pt(t,e));let i={y:t.getFullYear(),m:t.getMonth(),d:t.getDate(),h:t.getHours(),i:t.getMinutes(),s:t.getSeconds()},s=(e||ct).replace("yyyy",i.y).replace("MM",tt(i.m+1)).replace("dd",tt(i.d)).replace("HH",tt(i.h)).replace("mm",tt(i.i)).replace("ss",tt(i.s)).replace("M",i.m+1).replace("d",i.d).replace("H",i.h).replace("m",i.i).replace("s",i.s);if(s.indexOf("w")>-1){let e=ft(t);s=s.replace("ww",tt(e[1])).replace("w",e[1])}if(s.indexOf("q")>-1){let t=ut[i.m];s=s.replace("qq",t).replace("q",t)}return s},pt=function(t,e){let i;t=(""+t).replace(/\b(\d)\b/g,"0$1");let s=(i=(e=(e||ct).replace(/\b([MdHmsw])\b/g,"$1$1")).indexOf("yyyy"))>-1&&at(t.substr(i,4))||(new Date).getFullYear(),l=(i=e.indexOf("MM"))>-1?Math.max(at(t.substr(i,2))-1,0):0,r=(i=e.indexOf("dd"))>-1&&at(t.substr(i,2))||1,a=(i=e.indexOf("HH"))>-1?at(t.substr(i,2)):0,o=(i=e.indexOf("mm"))>-1?at(t.substr(i,2)):0,n=(i=e.indexOf("ss"))>-1?at(t.substr(i,2)):0;if((i=e.indexOf("qq"))>-1){let e=t.substr(i,2);return new Date(s,"Q1"===e?0:"Q2"===e?3:"Q3"===e?6:9,1)}if((i=e.indexOf("ww"))>-1){let e=at(t.substr(i,2)),l=ft(new Date(s,0,1));return l[0]!=s&&(l=ft(new Date(s,0,8))),new Date(l[2].getTime()+7*(e-1)*ht)}return new Date(s,l,r,a,o,n)},mt=function(t,e,i){i=at(i);let s=new Date(t.getTime());return"y"===e?s.setFullYear(t.getFullYear()+i):"M"===e?s.setMonth(s.getMonth()+i):"d"===e?s.setDate(s.getDate()+i):"H"===e?s.setHours(s.getHours()+i):"m"===e?s.setMinutes(s.getMinutes()+i):"s"===e&&s.setSeconds(s.getSeconds()+i),"y"!==e&&"M"!==e||s.getDate()==t.getDate()||(s=new Date(s.getTime()-s.getDate()*ht)),s},ft=function(t){let e=null!=$.x.weekPoint?$.x.weekPoint:1,i=null!=$.x.weekStart?$.x.weekStart:1,s=t.getDay()||7,l=new Date(t.getFullYear(),t.getMonth(),t.getDate()-s+e),r=Math.ceil((l-new Date(l.getFullYear(),0,0))/ht),a=new Date(t.getFullYear(),t.getMonth(),t.getDate()-s+i);return[l.getFullYear(),Math.floor((r+6)/7),a,new Date(a.getTime()+6048e5-1)]};window.Range&&!Range.prototype.movePoint&&(Range.prototype.__defineGetter__&&(Range.prototype.__defineGetter__("text",function(){return this.toString()}),Range.prototype.__defineSetter__("text",function(t){this.deleteContents(),this.insertNode(document.createTextNode(t))})),Range.prototype.movePoint=function(t,e){var i,s=this.startContainer.firstChild||this.startContainer,l=t,r=0;e=null==e?t:e;do{this.selectNodeContents(s),l-=r=this.toString().length}while(l>0&&(s=s.nextSibling));s=i=this.startContainer;var a=e-t+(l+=r);r=0;do{this.selectNodeContents(i),a-=r=this.toString().length}while(a>0&&(i=i.nextSibling));if(this.setStart(s.firstChild||s,l),i){for(var o=i;o.firstChild;)o=o.firstChild;this.setEnd(o,r+a)}},Range.prototype.select=function(){let t=window.getSelection();t.removeAllRanges(),t.addRange(this)});const xt=function(){let t=window.getSelection();return t.rangeCount&&t.getRangeAt(0)},gt=function(t,e){return null==t&&(t=xt()),null!=e&&(t.deleteContents?(t.deleteContents(),t.insertNode(document.createTextNode(e))):t.text=e),void 0===t.text?t.toString():t.text},vt=["afterend","afterbegin","beforebegin","beforeend"],wt=["after","prepend","before","append"],bt=function(t){let e="string"==typeof t?function(t){let e=document.createElement("div");t&&(e.innerHTML=t);try{return e}catch(t){return!1}finally{e=null}}(t):t,i=document.createDocumentFragment();for(;e.firstChild;)i.appendChild(e.firstChild);try{return i}catch(t){return!1}finally{e=i=null}},_t=function(t,i,s){if(null==s){if(null==i)return t.innerHTML;try{t.innerHTML=i}catch(e){for(;t.firstChild;)t.removeChild(t.firstChild);_t(t,i,3)}}else if("string"==typeof i)try{3===t.nodeType?e(t)[wt[s]](i):t.insertAdjacentHTML(vt[s],i)}catch(e){_t(t,bt(i),s)}else{let e=s%2?t:t.parentNode;e&&e.insertBefore(i,0===s?t.nextSibling:1===s?t.firstChild:2===s?t:null)}},yt=function(t,e){return _t(t,e,3),t.lastElementChild||t.lastChild},kt=function(t,e){return _t(t,e,2),t.previousElementSibling||t.previousSibling},St=function(){let t={float:"cssFloat"};return function(e){return t[e]||e.replace(/-./g,function(t){return t.charAt(1).toUpperCase()})}}(),Tt=function(t,e,i){if("string"==typeof i&&"="===i.charAt(1)){e=St(e);var s=t.style[e]||getComputedStyle(t,null)[e];i=at(i.replace("=",""));"width"===e||"height"===e?(s=at(s&&"auto"!==s?s:"w"===e.charAt(0)?t.offsetWidth:t.offsetHeight))<0&&(s=0):s=at(s),t.style[e]=s+i+("zIndex"===e?0:"px")}else"width"!==(e=St(e))&&"height"!==e||i&&"auto"!==i&&(i=Math.max(_number(i),0)),i&&!isNaN(i)&&"zIndex"!==e&&(i+="px"),t.style[e]=i;return t},Ct=!0,Mt=document,Pt=document.documentElement,Vt=t=>t.split(","),$t={h:Vt("21,12,34,43"),v:Vt("41,14,32,23"),a:Vt("41,32,14,23,21,34,12,43,11"),t:["tt"],b:["bb"],l:["ll"],r:["rr"],c:["cc"],top:["tt"],bottom:["bb"],left:["ll"],right:["rr"],tl:["11"],tr:["22"],rt:["22"],rb:["33"],br:["33"],bl:["44"],lb:["44"],lt:["11"],1:["11"],2:["22"],3:["22"],4:["33"],5:["33"],6:["44"],7:["44"],8:["11"]},zt=function(){var t,e=[14,23,34,43,33,44,"bb","tb"],i={pix:{r:{},b:{}},mag:{l:{},r:{},t:{},b:{}},inner:{}};for(t=(s=[23,22,33,32,21,34,"rr","rl"]).length;t--;)i.pix.r[s[t]]=Ct;for(t=e.length;t--;)i.pix.b[e[t]]=Ct;e=[41,32,44,33,"bt","bb"];var s,l=[12,43,11,44,"lr","ll"],r=[14,23,11,22,"tb","tt"];for(t=(s=[21,34,22,33,"rr","rl"]).length;t--;)i.mag.r[s[t]]=Ct;for(t=e.length;t--;)i.mag.b[e[t]]=Ct;for(t=l.length;t--;)i.mag.l[l[t]]=Ct;for(t=r.length;t--;)i.mag.t[r[t]]=Ct;for(t=(s=[11,22,33,44,"tt","bb","ll","rr"]).length;t--;)i.inner[s[t]]=Ct;return i}(),Dt=function(t){var e=Pt.clientLeft,i=Pt.scrollLeft,s=Pt.clientTop,l=Pt.scrollTop,r=t&&t!=Mt&&(t.isWidget?t.el():t),a=r&&r.getBoundingClientRect();return a?{left:a.left-e+i,top:a.top-s+l,right:a.right-e+i,bottom:a.bottom-s+l,width:a.width,height:a.height}:t==document?{left:i,top:l,right:Pt.clientWidth+i,bottom:Pt.clientHeight+l,width:Pt.clientWidth,height:Pt.clientHeight}:null},Et={},Lt=function(e){e.fn&&(t.pull(Et[e.id][e.type],e),e.type=e.fn=e.args=null)},At=function(t){return t.indexOf(".")>-1?K(t,"."):t},Ht=function(t){return t.indexOf(".")>-1?"."+G(t,".").split(".").sort().join(".")+".":""},Ft=function(t,e){var i=Et[X(t)];if(i){var s=At(e),l=Ht(e);if(s)return i[s]&&(l?i[s].filter(t=>t.ns.indexOf(l)>-1):i[s]);var r=[];for(s in i)r.push.apply(r,i[s].filter(t=>t.ns.indexOf(l)>-1));return r}};function It(e){if(!e||e.isWidget)return e;if("string"==typeof e||e.uid)return It.vueMap.get(e.uid||e);if(e instanceof Event&&(e=e.currentTarget||e.target),e.$el){if(e.$attrs.orientUid)return It.vueMap.get(e.$attrs.orientUid);const t=e.$el;if(8===t.nodeType&&e.$.subTree.component.data.uid)return It.vueMap.get(e.$.subTree.component.data.uid);e=1!=t.nodeType?e.$el.nextElementSibling:e.$el}if(t.isElement(e))do{if(e.id){if(It.vueMap.has(e.id))return It.vueMap.get(e.id);let t=It.strTo(e.id,":")+":";if(It.vueMap.has(t))return It.vueMap.get(t)}}while(e=e.parentNode);for(;e&&!e.isWidget;)e=e.$parent;return e||It.docView}Object.assign(It,{x:{defaultOptions:{}},vueMap:new Map,dfclsCache:{},q:e,lodash:t,http:i,br:R,loc:Q,uid:X,EventListener:class{constructor(t){this.ctx=t}hasEvent(t){let e=Ft(this.ctx,t);return e&&e.length}addEvent(t,e,i){var s={id:X(this.ctx),type:At(t),ns:Ht(t),fn:e,one:i};return(function(t,e){for(var i=2,s=arguments.length-1;i<s;i++)e=e[arguments[i]]||(e[arguments[i]]={});return(e[arguments[s]]||(e[arguments[s]]=[])).push(t),e[arguments[s]]}(s,Et,s.id,s.type)).ori=!0,this}addEventOnce(t,e){return this.addEvent(t,e,!0)}fireEvent(t,e){var i=Ft(this.ctx,t.type||t);if(i)for(var s,l,r=0,a=i.length;r<a;r++)if((s=i[r])&&s.fn&&(l=s.fn.apply(this.ctx,e?[t].concat(e):[t]),s.one&&(Lt(s),i.ori&&(r--,a--)),void 0!==l))return l;return this}removeEvent(t,e){if(t){var i=Ft(this.ctx,t);if(i)for(var s=i.length;s--;)e&&i[s].fn!==e||Lt(i[s])}else{var l=Et[X(this.ctx)];for(s in l)this.removeEvent(s);delete Et[X(this.ctx)]}return this}},eventX:function(t){return t.targetTouches?t.targetTouches[0].clientX:t.clientX},eventY:function(t){return t.targetTouches?t.targetTouches[0].clientY:t.clientY},number:at,isNumber:ot,numRange:function(t,e,i){return null==t?e||0===e?e:i||0===i?i:t:(e||0===e)&&t<e?e:(i||0===i)&&t>i?i:t},numAdd:function(...t){let e=0,i=0;return t.forEach(t=>{e=Math.max(e,G(t+"",".").length),i+=t}),e=Math.pow(10,e),Math.round(i*e)/e},numFormat:function(t,e,i,s){null==e&&(e=3),null==i&&(i=",");let l=(t=String(t)).replace(/[^.\d]/g,"").split("."),r=l[0],a=r.length,o=s?0:a,n="",h="-"===t.charAt(0)?"-":"";if(s)do{o+=e,n+=o<a?r.substr(o-e,e)+i:r.substr(o-e)}while(o<a);else do{o-=e,n=(o>0?i+r.substr(o,e):r.substr(0,e+o))+n}while(o>0);return h+n+(l.length>1?"."+G(t,".").replace(RegExp("[."+i+"]","g"),""):"")},numDecimal:function(t,e){if(e){if(e<0)return parseFloat(at(t));{let i=G(""+t,".");return i?K(""+t,".")+"."+i.slice(0,e):t}}return parseInt(at(t))},numScale:function(t,e,i){for(var s,l,r,a=0,o=t,n=e.length,h=0,c=0,u=Array(n);h<n;h++)(r=typeof e[h]===st?e[h].value:e[h])!=lt&&isNaN(r)?t==lt?u[h]=lt:"*"===r?(l=h,c++):s=h:a+=u[h]=r==lt||r<0?lt:+r;if(t==lt)return u;if(s!==rt){t=Math.max(0,t-a);var d=0;for(h=a=0;h<=s;h++)r=typeof e[h]===st?e[h].value:e[h],u[h]===rt&&typeof r===_STR&&r.indexOf("%")>0&&(d+=r=parseFloat(r),a+=u[h]=nt(Math.floor(o*r/100),e[h]));l===rt&&d>=100&&(u[s]=nt(Math.max(0,u[s]+o-a),e[h]))}if(l!==rt){for(t=Math.max(0,t-a),h=a=0;h<=l;h++)u[h]===rt&&(a+=u[h]=nt(Math.floor(t/c),e[h]));u[l]=nt(Math.max(0,u[l]+t-a),e[l])}if(i&&s===rt&&l===rt){for(h=0,n=u.length,a=0,c=0;h<n;h++)ot(u[h])&&(a+=u[h],c++);if(a<o){var p=Math.floor((o-a)/c);for(h=0;h<n;h++)ot(u[h])&&(u[h]+=p);for(h=n;h>=0;h--)if(ot(u[h])){u[h]+=o-a-p*c;break}}}return u},string:J,strTrim:t=>String(t).replace(/^\s+|\s+$/g,""),strEscape:function(t){return null!=t?(t+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;"):""},strFrom:G,strTo:K,strPad:tt,strLen:Z,strExceed:(t,e,i)=>{let s=Z(t,i);return i||(i=$.x.cnBytes||2),Math.ceil((s-e)/i)},strFormat:(e,i,s,l)=>(null!=e&&(e+=""),e&&i?Array.isArray(i)?e.replace(/\$\{?(\d+)\}?/g,function(t,e){return null==i[e]?l?t:"":s?encodeURIComponent(i[e]):i[e]}):e.replace(/\$\{?([a-z_][\w.]*)\}?/gi,function(e,r){let a=t.get(i,r);return null==a?l?e:"":s?encodeURIComponent(a):a}):e),strHighlight:function(t,e,i,s){return(t+="").replace(RegExp("(<[\\/!]?\\w+(?::\\w+)?\\s*(?:[-\\w]+(?:=('|\")?.*?\\2)?\\s*)*>)|("+it(e,i).join("|")+")","ig"),function(t,e,i,l){return void 0===l?e:'<em class="'+(s||"f-keyword")+'">'+l+"</em>"})},dateFormat:dt,dateParse:pt,dateAdd:mt,dateValid:function(t,e){t=(""+t).replace(/\b(\d)\b/g,"0$1");let i=pt(t,e),s=i.getFullYear();return s>=1e3&&s<=9999&&t==dt(i,e)},dateDiff:function(t,e=new Date,i){switch("string"==typeof t&&(t=pt(t)),"string"==typeof e&&(e=pt(e)),i){case"y":let s=e.getFullYear()-t.getFullYear(),l=mt(t,i,s);return l>e&&s--,s;case"M":let r=_dateDiff(t,e,"y"),a=mt(t,"y",r);return s=a.getFullYear()<e.getFullYear()?e.getMonth()+11-a.getMonth():e.getMonth()-a.getMonth(),l=mt(t,i,s),l>e&&s--,s+12*r;case"H":return Math.floor((e-t)/36e5);case"m":return Math.floor((e-t)/6e4);case"s":return Math.floor((e-t)/1e3);default:return Math.floor((e-t)/ht)}},dateSheet:function(...t){return $.docView.dateSheet(...t)},dateWeek:ft,dateWeekFirst:function(t){let e=$.dateWeek(new Date(t,0,1));return e[0]!=t&&(e=$.dateWeek(new Date(t,0,8))),e},dateWeekLast:function(t){let e=ft(new Date(t,11,31));return e[0]!==t&&(e=ft(new Date(t,11,24))),e},rngSelection:xt,rngElement:function(){let t=xt();return t&&t.startContainer.parentNode},rngCursor:function(t,e){let i=t;if(window.getSelection)if("number"==typeof t.selectionStart&&"number"==typeof t.selectionEnd)t.selectionStart=t.selectionEnd=null!=e?e:t.value.length;else{let s=window.getSelection();1===t.nodeType&&(i=document.createRange()).selectNodeContents(t),null!=e&&i.movePoint(e),s.removeAllRanges(),s.addRange(i),s.collapseToEnd()}return i},rngCursorOffset:function(){let t=xt(),e=t.startOffset;if(null!=e)return e;let i=document.body.createTextRange();return i.selectNodeContents(t.startContainer.parentNode),i.setEndPoint("EndToStart",t),gt(i).length},rngText:gt,el:function(t){if(t){const e=t.$el;return e?1===e.nodeType?e:e.nextElementSibling:t.isWidget?t.el():t}},html:_t,append:yt,prepend:function(t,e){return _t(t,e,1),t.firstElementChild||t.firstChild},before:kt,after:function(t,e){return _t(t,e,0),t.nextElementSibling||t.nextSibling},replaceWith:function(t,e){let i=t.nextSibling;if(i)return t.parentNode.removeChild(t),kt(i,e);{let i=t.parentNode;return i.removeChild(t),yt(i,e)}},moveup:function(t,e,i){let s,l,r=null==i,a=document.documentElement,o=t=>t.targetTouches?t.targetTouches[0].clientX:t.clientX,n=t=>t.targetTouches?t.targetTouches[0].clientY:t.clientY,h=t=>t.preventDefault();i.currentTarget&&(i.currentTarget.style.userSelect="none"),a.addEventListener(R.mobile?"touchmove":"mousemove",s=function(e){r?t(e):i&&(Math.abs(o(e)-o(i))>1||Math.abs(n(e)-n(i))>1)&&(r=!0)},!0),a.addEventListener(R.mobile?"touchend":"mouseup",l=function(t){a.removeEventListener(R.mobile?"touchmove":"mousemove",s,!0),a.removeEventListener(R.mobile?"touchend":"mouseup",l,!0),i.currentTarget&&(i.currentTarget.style.userSelect=""),R.mobile&&a.removeEventListener("touchmove",h,{passive:!1}),e&&e(t,r)},!0),R.mobile&&a.addEventListener("touchmove",h,{passive:!1})},bcr:Dt,offset:function(t,e){let i={top:0,left:0,width:t.offsetWidth,height:t.offsetHeight};do{i.top+=t.offsetTop,i.left+=t.offsetLeft}while((t=t.offsetParent)&&e!=t);return i},snap:function(t,e,i,s,l,r,a){i?i.nodeType?i=Dt(i):i.isWidget?i=Dt(i.el()):(i.originalEvent||null!=i.clientX)&&(i={left:(i=i.originalEvent||i).clientX,right:i.clientX,top:i.clientY,bottom:i.clientY}):i=Dt(Mt);var o,n,h=[],c=[],u=-1,d=Pt.clientWidth,p=Pt.clientHeight,m=s?$t[s]||(""+s).split(","):$t.a;if(/[1-4]/.test(m[0]))for(var f=0,x=0;f<m.length;f++){if(o=+m[f].charAt(0),n=+m[f].charAt(1),h.push((1===o||2===o?i.top:i.bottom)-(3===n||4===n?e:0)),c.push((1===o||4===o?i.left:i.right)-(2===n||3===n?t:0)),S=h[f]>=0&&h[f]+e<=p,_=c[f]+t<=d&&c[f]>=0,S&&_){u=f;break}var g=h[f]<0?-h[f]:0,v=c[f]+t>d?c[f]+t-d:0,w=h[f]+e>p?h[f]+e-p:0,b=c[f]<0?-c[f]:0;y="14"===m[f]||"34"===m[f]?(t-v)*(e-g):"23"===m[f]||"43"===m[f]?(t-b)*(e-g):"32"===m[f]||"12"===m[f]?(t-b)*(e-w):(t-v)*(e-w),(!x||x<y)&&(x=y,u=f)}else{var _,y;for(f=0,x=0;f<m.length;f++){if(o=m[f].charAt(0),n=m[f].charAt(1),h.push(("r"===o||"l"===o||"c"===o?(i.top+i.bottom)/2:"t"===o?i.top:i.bottom)-("r"===n||"l"===n||"c"===n?e/2:"b"===n?e:0)),c.push(("t"===o||"b"===o||"c"===o?(i.left+i.right)/2:"r"===o?i.right:i.left)-("t"===n||"b"===n||"c"===n?t/2:"r"===n?t:0)),S=h[f]>=0&&h[f]+e<=p,_=c[f]+t<=d&&c[f]>=0,S&&_){u=f;break}(S||_)&&(s?(y=s==$t.v?1==o||2==o?-h[f]:h[f]+e-p:1==o||4==o?-c[f]:c[f]+t-d,(!x||x>y)&&(x=y,u=f)):u<0&&(u=f))}}u<0&&(u=0);var k=m[u],S={left:c[u],top:h[u],bottom:p-(h[u]+e),right:d-(c[u]+t),type:k};(zt.pix.r[k]&&(S.pix_r=Ct),zt.pix.b[k]&&(S.pix_b=Ct),zt.mag.r[k]&&(S.mag_r=Ct,S.mag="r"),zt.mag.b[k]&&(S.mag_b=Ct,S.mag="b"),zt.mag.l[k]&&(S.mag_l=Ct,S.mag="l"),zt.mag.t[k]&&(S.mag_t=Ct,S.mag="t"),zt.inner[k]&&(S.inner=Ct),r&&S.mag)&&((f=r.indent||at(r))&&(f/=window.devicePixelRatio||1,S.inner?S.mag_t?(S.top-=f,S.bottom+=f):S.mag_b?(S.top+=f,S.bottom-=f):S.mag_r?(S.left+=f,S.right-=f):(S.left-=f,S.right+=f):S.mag_t?(S.top+=f,S.bottom-=f):S.mag_b?(S.top-=f,S.bottom+=f):S.mag_r?(S.left-=f,S.right+=f):(S.left+=f,S.right-=f)),r.top&&(S.top-=r.top),r.bottom&&(S.bottom-=r.bottom),r.left&&(S.left-=r.left),r.right&&(S.right-=r.right));if(l){c=S.left;var T=S.right;e=S.bottom,h=S.top;(S.mag_t||S.mag_b)&&(S.pix_r?(T=Math.max(0,c<0?T+c:T),c+=S.right-T):(c=Math.max(0,T<0?T+c:c),T+=S.left-c)),(S.mag_l||S.mag_r)&&(S.pix_b?(e=Math.max(0,h<0?e+h:e),h+=S.bottom-e):(h=Math.max(0,e<0?e+h:h),e+=S.top-h)),S.left=c,S.right=T,S.top=h,S.bottom=e}if("cc"===s&&S.top<0&&(S.top=0),a){m=function(t){var e=Dt(t);return e.right=Pt.clientWidth-e.right,e.bottom=Pt.clientHeight-e.bottom,e}(a);S.top-=m.top,S.left-=m.left,S.right-=m.right,S.bottom-=m.bottom}return S.width=t,S.height=e,S.target=i,S},snapTo:function(t,e){e.type?(e.pix_r?(t.style.right=e.right+"px",t.style.left=""):(t.style.left=e.left+"px",t.style.right=""),e.pix_b?(t.style.bottom=e.bottom+"px",t.style.top=""):(t.style.top=e.top+"px",t.style.bottom="")):function(t,e){if(!t||!e)return null;if("string"==typeof e){if(!(e.indexOf(":")>0))return t.style[e]||getComputedStyle(t,null)[e];for(var i,s,l=0,r=e.split(";"),a=r.length;l<a;l++)(i=K(r[l],":"))&&(s=G(r[l],":"))&&Tt(t,i,s)}for(var l in e)Tt(t,l,e[l])}(t,e)}}),It.extend=function(t,...e){return e.forEach(e=>{if(e)for(let i in e)i in t||void 0===e[i]||(t[i]=e[i])}),t},It.extendDeep=function(t,...e){return e.forEach(e=>{if(null!=e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object)for(let i in e)i in t?null!=t[i]&&"object"==typeof t[i]&&"constructor"in t[i]&&t[i].constructor===Object&&It.extendDeep(t[i],e[i]):null!=e[i]&&"object"==typeof e[i]&&"constructor"in e[i]&&e[i].constructor===Object?It.extendDeep(t[i]={},e[i]):t[i]=e[i]}),t},It.merge=function(t,...e){return e.forEach(e=>{if(e)for(let i in e)t[i]=e[i]}),t},It.mergeDeep=function(t,...e){return e.forEach(e=>{if(null!=e)for(let i in e)"object"==typeof t[i]?It.mergeDeep(t[i],e[i]):t[i]=e[i]}),t},It.cloneDeep=t.cloneDeep,It.eval=function(t,e){if(e){let i=Object.keys(e);return Function(i.map(t=>t),`return (${t})`)(...i.map(t=>e[t]))}return Function(`return (${t})`)()},It.string=function(t){return null==t?"":"object"==typeof t?JSON.stringify(t):""+t},It.array=function(t){return Array.isArray(t)?t:null==t||""===t?[]:[t]},It.arrayID=function(t){return Array.isArray(t)?t:null==t||""===t?[]:"string"==typeof t?t.split(","):[t]},It.arrayNumber=function(t){return It.array(t).map(t=>parseFloat(t))};It.unitSize=function(t,e){return null==t||""===t||"*"===t?"":"auto"==t?"auto":isNaN(t)?t:e?t/e*100+"vw":`${t}px`},It.idsAdd=(t,e,i)=>{if(t=J(t),e=J(e),i=null==i?",":""+i,!t||!e)return t||e;for(var s=0,l=(e=e.split(i)).length;s<l;s++)(i+t+i).indexOf(i+e[s]+i)<0&&(t+=(t?i:"")+e[s]);return t},It.idsRemove=(t,e,i)=>{if(t=J(t),e=J(e),i=null==i?",":""+i,!t||!e)return t;for(var s,l=0,r=(e=e.split(i)).length;l<r;l++)do{(s=(i+t+i).indexOf(i+e[l]+i))>-1&&(t=t.slice(0,s?s-1:s)+t.slice(s+e[l].length+(s?0:1)))}while(t&&s>-1);return t},It.idsAny=(t,e,i)=>{if(""===t&&e===t)return!0;if(t=J(t),e=J(e),i=null==i?",":""+i,!t||!e)return!1;if(t==e)return!0;for(let s of e.split(i))if((i+t+i).indexOf(i+s+i)>-1)return!0;return!1},It.idsAll=(t,e,i)=>{if(""===t&&e===t)return!0;if(i=null==i?",":""+i,!(t=null==t?"":""+t))return!1;if(!(e=null==e?"":""+e)||t==e)return!0;for(let s of e.split(i))if((i+t+i).indexOf(i+s+i)<0)return!1;return!0},It.classAdd=function(t,e,i){if(!t)return;let s=t.className;if(e.indexOf(" ")>-1)for(let t=0,l=(e=It.strTrim(e).split(/ +/)).length;t<l;t++)s=(!1===i?It.idsRemove:It.idsAdd)(s,e[t]," ");else s=(!1===i?It.idsRemove:It.idsAdd)(s,e," ");t.className=s},It.classRemove=function(t,e){t&&(e.indexOf(" ")>-1?It.classAdd(t,e,!1):t.className=It.idsRemove(t.className,e," "))},It.classAny=function(t,e){if(!t)return;let i="string"==typeof t?t:t.className;if(!(e.indexOf(" ")>-1))return It.idsAny(i,e," ");for(let t=0,s=(e=$strTrim(e).split(/ +/)).length;t<s;t++)if(It.idsAny(i,e[t]," "))return t+1},It.urlEncode=t=>null==t?"":encodeURIComponent("object"==typeof t?JSON.stringify(t):t),It.urlDecode=t=>null==t?"":decodeURIComponent(t.replace(/\+/g," ")),It.urlFormat=(t,...e)=>(e.forEach((i,s)=>null!=i&&(t=It.strFormat(t,i,!0,s<e.length-1))),t),It.urlParam=function(t,e){var i=(a=t.split("#"))[0],s=a[1];if("string"==typeof e)return"#"===e?s||"":It.urlDecode((i.match(new RegExp("[\\?&]"+e+"=([^&]*)"),"g")||A)[1]);if(e&&"object"==typeof e)for(var l in e)if("#"===l)s=e[l];else{var r=It.urlEncode(e[l]);i=(c=new RegExp("\\b"+l+"=[^&]*")).test(i)?i.replace(c,l+"="+r):i+(i.indexOf("?")<0?"?":"&")+l+"="+r}else if(1===arguments.length){var a={};if(r=(r=i.split("?"))[r.length-1]){r=r.split("&");for(var o,n,h,c=0;c<r.length;c++)-1!=(o=r[c].indexOf("="))&&(n=r[c].substring(0,o),h=r[c].substring(o+1),a[n]=It.urlDecode(h.replace(/\+/g," ")))}return a}return i+(s?"#"+s:"")},It.urlServer=function(e,...i){if(e){if(!e.startsWith("http://")&&!e.startsWith("https://")){let i=t.get(It.x,"http.baseURL");i&&(e=i+(i.endsWith("/")?"":"/")+e)}return It.strFormat(e,...i)}},It.urlComplete=function(e){if(0!==e.indexOf("data:")){e=It.urlServer(e);let i=t.get(It.x,"http.params");i&&(e=It.urlParam(e,i))}return e},It.download=function(t,e){if(t=It.urlComplete(t),R.app)It.wifiConfirm(function(){let i=plus.downloader.createDownload(t,e);plus.nativeUI.showWaiting(),i.addEventListener("statechanged",function(t,e){switch(t.state){case 1:plus.nativeUI.toast(It.loc.download_start);break;case 4:200==e?(plus.nativeUI.toast(It.loc.download_complete),plus.runtime.openFile(t.filename,{},function(t){plus.nativeUI.alert(It.loc.download_cannotopen)})):plus.nativeUI.toast(It.loc.download_fail+e),plus.nativeUI.closeWaiting()}}),i.start()});else{let e=document.createElement("a");e.href=t,It.x.downloadTarget&&(e.target=It.x.downloadTarget),e.click(),e.remove()}},It.wifiConfirm=(t,e)=>{It.x.wifiConfirm&&3!=plus.networkinfo.getCurrentType()?plus.nativeUI.confirm(It.loc.connection_not_wifi,function(i){0===i.index&&t.call(e)},{buttons:[It.loc.confirm,It.loc.cancel]}):t.call(e)},It.vm=It.view=t=>t?"string"==typeof t&&It.vueMap.has(t)&&(t=It.vueMap.get(t)).isView?t:null!=(t=It(t))?t.isView?t:t.ownerView:void 0:It.docView,It.close=t=>{let e=It.dialog(t);e&&e.close()},It.closePopup=()=>{document.dispatchEvent(new Event("mousedown"))},It.previewVideo=function(t){It.vm().previewVideo(It.urlServer(t))},It.previewImage=function(t,e){t=It.array(t).map(t=>It.urlServer(t)),R.app?plus.nativeUI.previewImage(t,e):It.vm().previewImage(t,e)},It.slotsChildren=function(t,e="default"){let i=[];const s=t=>{t&&t.forEach(t=>{"symbol"==typeof t.type?Array.isArray(t.children)?s(t.children):"Symbol(v-txt)"===t.type.toString()&&i.push(t):i.push(t)})};return s(t[e]&&t[e]()),i},It.hasChild=function(e,i="default"){let s=!1;const l=e=>{t.forEach(e,t=>{if("symbol"!=typeof t.type)return!(s=!0);Array.isArray(t.children)&&l(t.children)})};return l(e[i]&&e[i]()),s},It.ease=function(t,e,i){t(0),null==e&&(e=200),null==i&&(i=Math.ceil(e/10));let s=Math.ceil(e/i),l=0,r=(new Date).getTime(),a=setInterval(function(){let e=(new Date).getTime()-r,o=Math.floor(e/s);l!=o&&(o<i?t(-Math.cos(o/i*Math.PI)/2+.5):(clearInterval(a),t(1)),l=o)},Math.max(s-10,5));return a},It.print=function(t,e){let i=It.el(t),s=i.ownerDocument,l=It.q("link[media=print]",s),r=[];e=e||{},It.q("meta",s).each(function(){r.push(this.outerHTML)}),(l.length>0?l:It.q("link",s)).each(function(){r.push('<link rel="stylesheet" type="text/css" href="'+this.getAttribute("href")+'"/>')}),It.q("style",s).each(function(){r.push(this.outerHTML)});let a=i.outerHTML;a=a.replace(/<div[^>]+w-scroll[^>]+>/gi,function(t){return t.replace(/height: \w+/gi,"")}),It.q(":text,:password,textarea,select",i).each(function(){let t,i=this.outerHTML;if(e.input2text){let e=It(this);e&&e.isFormWidget?(i=e.el("form").outerHTML,t=e.formText()):t=this.value,t='<div class="f-oh w-input-s">'+t+"</div>"}else t=i.replace('value="'+this.defaultValue+'"',()=>'value="'+this.value+'"');a=a.replace(i,()=>t+"")}),It.q(":radio,:checkbox",i).each(function(){if(e.input2text){let t=It(this);t&&t.isFormWidget&&(a=a.replace(t.el().outerHTML,()=>t.isChecked?'<div class="f-wdbr">'+t.text+"</div>":""))}else{let t=this.outerHTML,e=t.replace(/ checked=""/,"");this.checked&&(e=e.replace(/>$/," checked>")),a=a.replace(t,e)}}),e.input2text&&It.q("input[type=hidden]",i).each(function(){var t=It(this);t&&t.isFormWidget&&"w-hidden"!=t.$options.name&&(a=a.replace(t.el("form").outerHTML,()=>'<div class="f-wdbr f-print-input-text">'+t.formText()+"</div>"))}),It.q(".w-input-placeholder",i).each(function(){a=a.replace(this.outerHTML,"")});return s=!1!==e.print?function(){let t=window.frames.wPrintFrame;return t||(It.q("<div class=f-none><iframe name=wPrintFrame></iframe></div>").appendTo(document.body),t=window.frames.wPrintFrame),t}():window.open(),i=s.document,i.open("text/html","replace"),i.write("<!doctype html><html class=f-print><head><meta charset=utf-8><title>"+It.loc.print_preview+'</title><style>.f-print .w-f-remark{height:auto;line-height:inherit}.f-print-input-text{line-height: var(--w-label-min-height);}.w-input{display: flex!important;}.w-input-s{word-break:normal;white-space:normal}.w-input-s:empty:before{content:" "}</style><script>var $={e:function(){}}<\/script>'+r.join("")+(e.head||"")+"</head><body><div class=x-print>"+a+"</div>"+(!1!==e.print?"<script>window.print();window.close()<\/script>":"")+"</body></html>"),i.close(),i};const Nt=function(t,e){if(!t||t instanceof FormData)return t;return"application/x-www-form-urlencoded"==(It.lodash.get(e,'headers["Content-Type"]')||It.lodash.get(It.x,'http.headers.post["Content-Type"]'))?l.stringify(t,{arrayFormat:"repeat"}):t};function Yt(t,e){e.value?t.setAttribute("w-form-ignore",""):t.removeAttribute("w-form-ignore")}It.ajax=async function(t,e){let i=e?It.urlFormat(t.src,e):t.src;if(!i&&!t.request)return Promise.reject("$.ajax(): The first parameter must be an object, and the property(src) of the object is required.");let s=It.lodash.pick(t,["headers","responseType","transformRequest","transformResponse","timeout","cancelToken"]);if(t.download&&It.extend(s,{responseType:"blob"}),t.request)return t.request(t.data);{let e=(t.method||(t.data?"post":"get")).toLowerCase();return("post"===e||"put"===e||"patch"===e?It.http[e](i,Nt(t.data,s),s):It.http[e](i,s)).then(e=>{let i=e.data;if(t.filter&&(i=t.filter(e)),t.success&&t.success(i),t.complete&&t.complete(e),t.download){let t=e.headers["content-disposition"];if(t){let i=decodeURI(t.substring(t.indexOf("filename=")+9,t.length)),s=new Blob([e.data]),l=document.createElement("a");l.href=URL.createObjectURL(s),l.download=i,l.click(),l.remove()}else console.error("download: none content-disposition")}return i}).catch(e=>(t.error&&t.error(e),t.complete&&t.complete(e.response,e),Promise.reject(e)))}},It.extend(It.ajax,{get:(t,e)=>It.http.get(t,e).then(t=>t&&t.data),head:(t,e)=>It.http.head(t,e),delete:(t,e)=>It.http.delete(t,e).then(t=>t&&t.data),post:(t,e,i)=>It.http.post(t,Nt(e,i),i).then(t=>t&&t.data),put:(t,e,i)=>It.http.put(t,Nt(e,i),i).then(t=>t&&t.data),patch:(t,e,i)=>It.http.patch(t,Nt(e,i),i).then(t=>t&&t.data)},i),It.alert=function(t,e,i,s){return It.docView.pop("w-alert","object"==typeof t?{title:It.loc.opertip,...t}:{title:It.loc.opertip,text:t,position:e,timeout:i,yes:s})},It.confirm=function(t,e,i,s=!0){return It.docView.pop("w-confirm","object"==typeof t?{title:It.loc.opertip,...t}:{title:It.loc.opertip,text:t,yes:e,no:i,cover:s})},It.dialog=t=>{if(t){for(t=It.vm(t);t&&!t.isDialog;)t=t.ownerView;return t}},It.config=function(t){It.config_uid=X(),It.mergeDeep(It.x,t),t.http&&(It.mergeDeep(i.defaults,t.http),i.interceptors.response.use(t.http.filter,t.http.error||function(t){return t.response&&(t.callback=()=>It.alert({icon:".f-i .f-i-alert-warning",text:t.response.status+": "+t.config.url})),Promise.reject(t)}));const e=It.x.defaultOptions;for(let t in e)if(t.includes(".")){let i=It.strFrom(t,".").replace(/\./g," "),s=It.strTo(t,".");(It.dfclsCache[s]||(It.dfclsCache[s]={}))[i]=e[t]}},It.pop=(t,e,i,s)=>(i?It(i):It.vm()).pop(t,e,{mode:s}),It.submit=(t,e={})=>(It(e.target)||It.vm()).submit(t,e),It.symbol={leafSymbol:Symbol("leaf"),changeSymbol:Symbol("change")},window.addEventListener("unhandledrejection",t=>{It.x.catchReject?It.x.catchReject(t):(t.reason&&(t.reason.callback?t.reason.callback():"string"==typeof t.reason&&console.error(t.reason)),t.preventDefault())});var Bt={created:Yt,updated:Yt};function Ot(t){let e=It.dialog(t.currentTarget);if(e&&!1!==e.x.movable&&!e.x.fullScreen){let i,s=e.el(),l=s.style.left,r=s.style.right,a=s.style.top,o=s.style.bottom,n=o?-1:1,h=r?-1:1,c=n<0?"bottom":"top",u=h<0?"right":"left",d=t.clientX,p=t.clientY,m=It.number(n<0?o:a),f=It.number(h<0?r:l),x=document.documentElement.clientHeight,g=document.documentElement.clientWidth;It.moveup(function(t){i||(i=It.q("<div class=w-dialog-move-helper></div>").appendTo(document.body),e.el().style.transition="none");let s=It.numRange(t.clientX,0,g),l=It.numRange(t.clientY,0,x);e.setPosition({[c]:m+n*(l-p)+"px",[u]:f+h*(s-d)+"px"})},function(t,s){s&&i&&i.remove(),e.el().style.transition=""},t)}}var jt={mounted(t,e){e.value&&t.addEventListener("mousedown",Ot)},unmounted(t){t.removeEventListener("mousedown",Ot)}};function qt(t,e){t.style.setProperty("--v-label-width",It.unitSize(e.value))}var Rt={created:qt,updated:qt};function Wt(t){t.directive("form-ignore",Bt),t.directive("dialog-move",jt),t.directive("label-width",Rt)}const Ut={};var Xt={props:["data","width","height","colspan","rowspan","ownproperty","orientUid"],data(){return{isWidget:!0,uid:this.orientUid||It.uid(),runtimeX:{}}},created(){It.vueMap.set(this.uid,this);let t=this.getDefaultProp(),e=It.config_uid,i={};this.x=new Proxy(this.runtimeX,{get:(i,s)=>s in i?i[s]:void 0!==this.$props[s]?this.$props[s]:(e!=It.config_uid&&(e=It.config_uid,t=this.getDefaultProp()),t[s]),set:(t,e,s)=>(i[e]||(i[e]=this.$watch(e,i=>t[e]=i)),t[e]=s,!0)})},unmounted(){It.vueMap.delete(this.uid)},methods:{x_default(){},getDefaultProp(){let t;if(!this.ownproperty){let e=this.$options.name;if(t=It.x.defaultOptions[e],It.dfclsCache[e]){let i,s=this.$options.name+(this.$attrs.class?" "+this.$attrs.class:""),l=It.dfclsCache[e];for(let t in l)It.idsAll(s,t," ")&&It.mergeDeep(i||(i={}),l[t]);i&&(t=It.extendDeep(i,t))}}return{...this.x_default(),...t}},attr(t,e){if(2!=arguments.length)return this.x[t];this.x[t]=e},ajax(t){return this.setLoading&&this.setLoading(),It.ajax(t).then(t=>(this.setLoading&&this.setLoading(!1),t))},submit(t,e){return"object"==typeof t&&(e=t,t=null),e||(e={}),t&&(e.request=t),new Promise(async t=>{await o();const i=It.vm(this);if(this.setLoading&&this.setLoading(),await i.valid(e.range,e.group)){let s=i.getPostData(e.range);e.data=e.data&&s?It.extend({},e.data,s):e.data||s,t(this.ajax(e))}else this.setLoading&&this.setLoading(!1)})},pop(t,e,i){return It.vm(this).createPop(this,t,e,i)},closePop(t){const e=It.vm(this);e.getPops(t).forEach(t=>e.removePop(t))},createEvent(t,e){return{type:t,uid:this.uid,...e}},trigger(t,...e){let i=t.runType||t.type||t,s=this.getOn(i);s&&("string"==typeof t&&(t=this.createEvent(t)),Array.isArray(s)?s.forEach(i=>i(t,...e)):s(t,...e))},getOn(t){let e="on"+t.charAt(0).toUpperCase()+t.slice(1);return this.$.vnode.props&&this.$.vnode.props[e]||this.x[e]},getKey(){return this.$.vnode.key},closest(t,e){let i=this;const s=typeof t;do{if("string"===s){if(It.idsAny(t,i.$options.name))return i}else if("function"===s&&t(i))return i;if(i.isDialog||i==e)return}while(i=i.$parent)},contains(t){return t&&this.el()&&this.el().contains(t.isWidget?t.el():t)},el(t){if(t&&/\W/.test(t)){const e=this.el();return e&&It.q(t,e)[0]}return document.getElementById(this.uid+(t||""))},snapElem(){return this.el()},scrollIntoView(t=!1){const e=(e,i)=>{let s="hasScroll"+e.toUpperCase(),l=this.closest(t=>t[s]&&(t.scrollState()||!1)[e]);l?l.scrollTo(this,t.hasOwnProperty("y")?t.y:"auto",t.x,null==t.ease?200:t.ease,t.divide,i):i&&i()};e("y",()=>e("x",t.success))},hasBubble(t){if(!t)return!1;if(this.contains(t))return!0;let e=It.dialog(t);return e&&e.commander?e.commander===t||this.hasBubble(e.commander):void 0},bind(t,e){let i=Ut[this.uid]||(Ut[this.uid]={});return i[t]||(i[t]=e||this[t]),i[t]},slots_children(t){return It.slotsChildren(this.$slots,t)},slot(t="default"){return this.$slots[t]?this.$slots[t]():[]},html_icon(t,e,i){const s=t.startsWith(".")&&!t.includes("/"),l=this.$.vnode.scopeId||"";return s?a("i",{[`${l}`]:"",class:[e,t.replace(/\./g,"")],onclick:i}):a("img",{src:t,onclick:i,class:e,[`${l}`]:""})},html_slots(){return this.$slots},html_self(t){return a(this.tagName||"div",t?r(this.html_attrs,this.html_props,this.$attrs):r(this.html_attrs,this.html_props),this.html_slots())},html(){return this.html_self()}},computed:{dfish:()=>It,ownerView(){let t=this.provideView;for(;t&&!t.isView;)t=t.provideView;return t},pubParent(){return this.providePubParent&&It.idsAny(this.$options.pubParentName,this.providePubParent.$options.name)&&this.providePubParent},parentNode(){return It(this.el().parentElement)},tagName:()=>"div",html_attrs(){return{id:this.uid,class:[this.$options.name,this.html_class],style:[{width:this.x.width&&It.unitSize(this.x.width),height:this.x.height&&It.unitSize(this.x.height),"--w-grid-colspan":this.x.colspan&&-1!=this.x.colspan?`span ${this.x.colspan}`:null,"--w-grid-rowspan":this.x.rowspan&&-1!=this.x.rowspan?`span ${this.x.rowspan}`:null},this.html_style],"w-key":this.getKey(),"w-width":"*"===this.x.width?"*":null,"w-height":"*"===this.x.height?"*":null}},html_style(){},html_class(){},html_props(){},html_binds(){return r(this.html_attrs,this.html_props,this.$attrs)}},render(){return this.html()},__file:"src/widgets/WidgetAbs.vue"},Qt={props:["src","children","parentItem"],data:()=>({loading:!1,loaded:!1}),methods:{getSrc(){return(this.x||this.$props).src},request(t){let e=this.getSrc();if(e&&!this.loading&&(this.showLoading(!0),"function"==typeof e))return e(this).then(e=>{this.showLoading(!1),this.loaded=!0,t&&t()}).catch(t=>{this.showLoading(!1),this.loaded=!0})},showLoading(t){this.loading=t}},__file:"src/widgets/SrcParent.vue"},Jt={name:"w-view",mixins:[Qt],provide(){return{provideView:this}},props:["commands"],data:()=>({isView:!0,pops:[]}),beforeCreate(){this.popCommanders={}},methods:{find(t){const e=this.el().querySelectorAll(`[w-key="${t}"]`);for(let t of e)if((t=It(t))&&t.ownerView===this)return t},fv(t,e){let i=this.f(t);if(2===arguments.length)i&&(i.groupFormVal?i.groupFormVal(e):i.val(e));else{if("object"!=typeof t)return i&&(i.groupFormVal?i.groupFormVal():i.formVal());for(let e in t)this.fv(e,t[e])}},f(t,e){return this.fAll(t,e)[0]},fAll(t,e){if("*"===t||null==t){for(var i,s,l=0,r=this.getFormList(e,!0),a=r.length,o=[];l<a;l++)(i=It(r[l]))&&i!=s&&o.push(s=i);return o}let n=e?e.isWidget?e.el():e:this.el(),h=It.q(':input[name="'+t+'"]',n);return h.length||(h=It.q(':input[w-name="'+t+'"]',n)),It.lodash.map(h.not("[w-form-ignore] :input"),t=>It(t))},getFormList(t,e){let i,s=":input:not(button)"+(e?"":":not(:disabled)");if(t&&"string"==typeof t){let e="!"===t.charAt(0),l=t.replace(/\!/g,"").split(",").map(t=>`[w-key="${t}"] ${s}`);(l=l.join())&&(i=It.q(e?`${s}:not(${l})`:l,this.el()))}else i=It.q(s,Array.isArray(t)?It.q(t.map(t=>It.el(t))):t?It.el(t):this.el());return i?It.lodash.map(i.not("[w-form-ignore] :input")):[]},getPostData(t){let e={};return this.getFormList(t).forEach(t=>{let i=t.name,s=t.value;if(i){switch(t.type){case"text":"number"===t.getAttribute("w-valuetype")&&(s=s.replace(/[^\d\.-]/g,""));break;case"checkbox":if(!(t.value&&(t.checked||t.indeterminate&&t.getAttribute("w-partialsubmit"))))return null;break;case"radio":if(!t.value||!t.checked)return null;i=t.getAttribute("w-name")||i;break;case"select-one":if(t.selectedIndex<0)return null}s&&(s=It.strTrim(s)),i in e?(Array.isArray(e[i])||(e[i]=[e[i]]),e[i].push(s)):e[i]=s}}),e},async getValidError(t){let e,i=this.getFormList(t);const s={};for(let t,l,r=0,a=i.length;r<a;r++)(t=It(i[r]))&&t.isFormWidget&&(l=i[r].name in s?s[i[r].name]&&It.extend({wid:t.uid},s[i[r].name]):await t.getValidError(),l&&(e||(e=[]),e.find(t=>t.wid==l.wid)||e.push(l))),"checkbox"!==i[r].type&&"radio"!==i[r].type||(s[i[r].name]=l);return e},async valid(t){this._err_ns&&this._err_ns.forEach(t=>{const e=It.vueMap.get(t.wid);e&&e.warn(!1)});let e=await this.getValidError(t);return e&&(e.forEach(t=>It.vueMap.get(t.wid).warn()),It.vueMap.get(e[0].wid).showErrorTip(e[0].text)),!(this._err_ns=e)},isModified(t,e){return this.getFormList(t).find(t=>(t=It(t)).isModified&&t.isModified(e))},saveModified(t,e){this.getFormList(t).forEach(t=>(t=It(t)).saveModified&&t.saveModified(e))},resetFormStyle(t){this.getFormList(t).forEach(t=>{const e=It(t);e.warn&&e.warn(!1)})},resetForm(t,e){this.getFormList(t).forEach(t=>{const i=It(t);i.reset&&i.reset(e)})},showLoading(t){if(!1!==t)return this.pop("w-loading",{cover:!0,local:!0,...t});this.pop("w-loading",!1)},createPop(t,e,i,s={}){return new Promise((l,r)=>{const a=s.mode||"multiple",o=this.getPops(e)[0];if(o){if("component"===a)return void Object.assign(o,{props:i,options:s,resolve:l,reject:r});if("single"===a){let t=this.pops.indexOf(o);this.pops.splice(t,1)}}const n=It.uid();this.pops.push({commander:t,template:e,props:i,options:s,orientUid:n,resolve:l,reject:r})})},removePop(t){let e="string"==typeof t?this.pops.findIndex(e=>e.orientUid==t):this.pops.indexOf(t);e>-1&&this.pops.splice(e,1)},getPops(t,e){return this.pops.filter(i=>(!t||h(i.template)==h(t))&&(!e||i.commander==e))},getPopById(t){return this.pops.find(e=>e.orientUid==t)},html_pops(){return this.pops.map(({template:t,orientUid:e,props:i})=>{const s="string"==typeof t?n(t):h(t);return s&&a(s,{key:e,orientUid:e,...i})})}},__file:"src/widgets/ViewAbs.vue"},Gt={props:["data"],data(){return{rotate:{},current:It.lodash.get(this.data,"options.current",0)}},methods:{close(){It.close(this)},rot(t){let e=this.$refs.swiper.focusIndex,i=this.rotate[e];null==i&&(i=this.rotate[e]=0);let s=this.$refs.swiper.getCurrentItem().el(),l=It.bcr(s),r=l.width-40,a=l.height-80;t>0?i+=90:t<0&&(i-=90);let o=i/90%2;It.q("._img",s).css({transform:"rotate("+i+"deg)",maxWidth:o?a:r,maxHeight:o?r:a}),this.rotate[e]=i}},computed:{loc:()=>It.loc},mounted(){}};const Kt={class:"f-height f-rel f-oh"},Zt=["src"],te={class:"_rotate"};Gt.render=function(t,e,i,s,l,r){const a=n("w-swiper-item"),o=n("w-swiper"),h=n("w-video"),w=n("w-dialog");return u(),c(w,{class:"f-dialog-preview",width:"calc(100% - 100px)",height:"calc(100% - 100px)",ownproperty:!0,cover:!0,autoHide:!0},{default:d(()=>["image"==i.data.type?(u(),p(f,{key:0},[x(o,{ref:"swiper",class:"f-height",current:l.current,arrow:i.data.imgs.length>1,"indicator-dots":i.data.imgs.length>1,duration:"300"},{default:d(()=>[(u(!0),p(f,null,g(i.data.imgs,(t,e)=>(u(),c(a,{key:e},{default:d(()=>[m("div",Kt,[m("img",{class:"_img",src:t},null,8,Zt)])]),_:2},1024))),128))]),_:1},8,["current","arrow","indicator-dots"]),m("div",te,[m("a",{class:"_l",onClick:e[0]||(e[0]=t=>r.rot(-1))},v(r.loc.rotate_left),1),e[3]||(e[3]=m("span",{class:"_s"},"|",-1)),m("a",{class:"_r",onClick:e[1]||(e[1]=t=>r.rot(1))},v(r.loc.rotate_right),1)])],64)):(u(),c(h,{key:1,class:"f-height",src:i.data.src},null,8,["src"])),m("div",{class:"_dlg_x",onClick:e[2]||(e[2]=(...t)=>r.close&&r.close(...t))})]),_:1})},Gt.__file="src/template/TemplatePreviewMedia.vue";var ee={props:["data"],data(){let t=this.data.format||"yyyy-MM-dd",e=this.data&&this.data.value?It.dateParse(this.data.value,t):new Date,i=this.data&&this.data.minValue&&It.dateParse(this.data.minValue,t),s=this.data&&this.data.maxValue&&It.dateParse(this.data.maxValue,t);e=It.numRange(e,i,s);let l,r,a,o=e.getFullYear();return t.includes("w")&&(l=It.dateWeek(e)[1],r=It.dateWeekFirst(o),a=It.dateWeekLast(o)),{focusYear:o,focusMonth:e.getMonth(),focusDate:e.getDate(),focusHour:e.getHours(),focusMinute:e.getMinutes(),focusSecond:e.getSeconds(),startYear:It.numRange(e.getFullYear()-30,i&&i.getFullYear()),endYear:It.numRange(e.getFullYear()+30,null,s&&s.getFullYear()),monthDays:new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),focusWeek:l,weekFirst:r,weekLast:a,minTime:i,maxTime:s,format:t}},watch:{focusYear(t){t==this.yearList[0]&&t>1030?this.startYear=It.numRange(this.startYear-30,this.minYear):t==this.yearList.at(-1)&&(this.endYear=It.numRange(this.endYear+30,null,this.maxYear)),this.monthDays=new Date(t,this.focusMonth+1,0).getDate(),this.hasWeek&&(this.weekFirst=It.dateWeekFirst(t),this.weekLast=It.dateWeekLast(t))},focusMonth(t){this.monthDays=new Date(this.focusYear,t+1,0).getDate()}},methods:{weekText(t){},clickCancel(){It.close(this)},clickOK(t){if(this.data.success){let e=this.hasWeek?It.dateParse(`${this.focusYear}-${this.focusWeek}`,"yyyy-ww"):new Date(this.focusYear,this.focusMonth,this.focusDate,this.focusHour,this.focusMinute,this.focusSecond);this.data.success(It.dateFormat(e,this.format),t)}It.close(this)}},computed:{dfish:()=>It,yearList(){return Array.from(Array(this.endYear-this.startYear+1)).map((t,e)=>this.startYear+e)},monthList:()=>Array.from(Array(12)).map((t,e)=>e),dateList(){return Array.from(Array(this.monthDays)).map((t,e)=>e+1)},hourList:()=>Array.from(Array(24)).map((t,e)=>e),minuteList:()=>Array.from(Array(60)).map((t,e)=>e),secondList:()=>Array.from(Array(60)).map((t,e)=>e),weekList(){let t=this.weekFirst[2];return Array.from(Array(this.weekLast[1])).map((e,i)=>{let s=t,l=It.dateAdd(t,"d",6);return t=It.dateAdd(t,"d",7),{value:i+1,text:`${It.strPad(i+1)} (${It.dateFormat(s,"MM.dd")} - ${It.dateFormat(l,"MM.dd")})`}})},hasYear(){return this.format.includes("y")},hasMonth(){return this.format.includes("M")},hasDate(){return this.format.includes("d")},hasHour(){return this.format.includes("H")},hasMinute(){return this.format.includes("m")},hasSecond(){return this.format.includes("s")},hasWeek(){return this.format.includes("w")},minYear(){return this.minTime&&this.hasYear&&this.minTime.getFullYear()},maxYear(){return this.maxTime&&this.hasYear&&this.maxTime.getFullYear()},minMonth(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&this.minTime.getMonth()},maxMonth(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&this.maxTime.getMonth()},minDate(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&this.minTime.getDate()},maxDate(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&this.maxTime.getDate()},minHour(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&(!this.hasDate||this.minDate==this.focusDate)&&this.minTime.getHours()},maxHour(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&(!this.hasDate||this.maxDate==this.focusDate)&&this.maxTime.getHours()},minMinute(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&(!this.hasDate||this.minDate==this.focusDate)&&(!this.hasHour||this.minHour==this.focusHour)&&this.minTime.getMinutes()},maxMinute(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&(!this.hasDate||this.maxDate==this.focusDate)&&(!this.hasHour||this.maxHour==this.focusHour)&&this.maxTime.getMinutes()},minSecond(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&(!this.hasDate||this.minDate==this.focusDate)&&(!this.hasHour||this.minHour==this.focusHour)&&(!this.hasMinute||this.minMinute==this.focusMinute)&&this.minTime.getSeconds()},maxSecond(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&(!this.hasDate||this.maxDate==this.focusDate)&&(!this.hasHour||this.maxHour==this.focusHour)&&(!this.hasMinute||this.maxMinute==this.focusMinute)&&this.maxTime.getSeconds()},minWeek(){},maxWeek(){}}};ee.render=function(t,e,i,s,l,r){const a=n("w-button"),o=n("w-buttonbar"),h=n("w-html"),m=n("w-option"),v=n("w-slidepicker"),_=n("w-vertical"),y=n("w-horizontal"),k=n("w-dialog");return u(),c(k,{class:"f-datesheet"},{default:d(()=>[x(o,{class:"f-datesheet-bbr",align:"between",height:"52",style:{padding:"0 10px"}},{default:d(()=>[x(a,{text:"取消",onClick:r.clickCancel},null,8,["onClick"]),x(a,{text:"确定",onClick:r.clickOK,face:"primary"},null,8,["onClick"])]),_:1}),x(y,{height:"*"},{default:d(()=>[r.hasYear?(u(),c(_,{key:0,width:"*"},{default:d(()=>[x(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:d(()=>e[7]||(e[7]=[b("年")])),_:1,__:[7]}),x(v,{height:"*",modelValue:l.focusYear,"onUpdate:modelValue":e[0]||(e[0]=t=>l.focusYear=t),"min-value":r.minYear,"max-value":r.maxYear,"keep-index":!0,data:{mode:"year"}},{default:d(()=>[(u(!0),p(f,null,g(r.yearList,t=>(u(),c(m,{key:t,value:t,text:t},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):w("v-if",!0),r.hasMonth?(u(),c(_,{key:1,width:"*"},{default:d(()=>[x(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:d(()=>e[8]||(e[8]=[b("月")])),_:1,__:[8]}),x(v,{height:"*",modelValue:l.focusMonth,"onUpdate:modelValue":e[1]||(e[1]=t=>l.focusMonth=t),"min-value":r.minMonth,"max-value":r.maxMonth,"keep-index":!0,data:{mode:"month"}},{default:d(()=>[(u(!0),p(f,null,g(r.monthList,t=>(u(),c(m,{key:t,value:t,text:r.dfish.strPad(t+1)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):w("v-if",!0),r.hasDate?(u(),c(_,{key:2,width:"*"},{default:d(()=>[x(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:d(()=>e[9]||(e[9]=[b("日")])),_:1,__:[9]}),x(v,{height:"*",modelValue:l.focusDate,"onUpdate:modelValue":e[2]||(e[2]=t=>l.focusDate=t),"min-value":r.minDate,"max-value":r.maxDate,"keep-index":!0,data:{mode:"date"}},{default:d(()=>[(u(!0),p(f,null,g(r.dateList,t=>(u(),c(m,{key:t,value:t,text:r.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):w("v-if",!0),r.hasHour?(u(),c(_,{key:3,width:"*"},{default:d(()=>[x(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:d(()=>e[10]||(e[10]=[b("时")])),_:1,__:[10]}),x(v,{height:"*",modelValue:l.focusHour,"onUpdate:modelValue":e[3]||(e[3]=t=>l.focusHour=t),"min-value":r.minHour,"max-value":r.maxHour,"keep-index":!0},{default:d(()=>[(u(!0),p(f,null,g(r.hourList,t=>(u(),c(m,{key:t,value:t,text:r.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):w("v-if",!0),r.hasMinute?(u(),c(_,{key:4,width:"*"},{default:d(()=>[x(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:d(()=>e[11]||(e[11]=[b("分")])),_:1,__:[11]}),x(v,{height:"*",modelValue:l.focusMinute,"onUpdate:modelValue":e[4]||(e[4]=t=>l.focusMinute=t),"min-value":r.minMinute,"max-value":r.maxMinute,"keep-index":!0},{default:d(()=>[(u(!0),p(f,null,g(r.minuteList,t=>(u(),c(m,{key:t,value:t,text:r.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):w("v-if",!0),r.hasSecond?(u(),c(_,{key:5,width:"*"},{default:d(()=>[x(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:d(()=>e[12]||(e[12]=[b("秒")])),_:1,__:[12]}),x(v,{height:"*",modelValue:l.focusSecond,"onUpdate:modelValue":e[5]||(e[5]=t=>l.focusSecond=t),"min-value":r.minSecond,"max-value":r.maxSecond,"keep-index":!0},{default:d(()=>[(u(!0),p(f,null,g(r.secondList,t=>(u(),c(m,{key:t,value:t,text:r.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):w("v-if",!0),r.hasWeek?(u(),c(_,{key:6,width:"*"},{default:d(()=>[x(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:d(()=>e[13]||(e[13]=[b("周")])),_:1,__:[13]}),x(v,{height:"*",modelValue:l.focusWeek,"onUpdate:modelValue":e[6]||(e[6]=t=>l.focusWeek=t),"min-value":r.minWeek,"max-value":r.maxWeek,"keep-index":!0},{default:d(()=>[(u(!0),p(f,null,g(r.weekList,t=>(u(),c(m,{key:t.value,value:t.value,text:t.text},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):w("v-if",!0)]),_:1})]),_:1})},ee.__file="src/template/TemplateDateSheet.vue";var ie={name:"w-docview",mixins:[Xt,Jt],provide:()=>({providePubParent:null,provideBoxParent:null,provideRangeParent:null,provideCompatGap:null,provideMenu_w:null,provideTripleboxContainer:null}),beforeCreate(){It.docView=this,It.q(document.body).prepend("<div id=w-dfish-pops></div>"),It.q(document.body).append('<svg style="display:none;width:0;height:0" width="0" height="0" focusable="false" aria-hidden="true">\n <symbol id="f-svg-loading" viewBox="0 0 50 50">\n <path\n d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"\n transform="rotate(86.9154 25 25)">\n </path>\n </symbol>\n <symbol id="f-svg-loading-1" viewBox="0 0 50 50">\n <circle cx="25" cy="25" r="20" />\n </symbol>\n <symbol id="f-svg-loading-2" viewBox="0 0 24 30">\n <rect x="0" y="8.66115" width="4" height="12.6777" opacity="0.2">\n <animate attributeName="opacity" values="0.2; 1; .2" begin="0s" dur="0.6s"\n repeatCount="indefinite"></animate>\n <animate attributeName="height" values="10; 20; 10" begin="0s" dur="0.6s"\n repeatCount="indefinite"></animate>\n <animate attributeName="y" values="10; 5; 10" begin="0s" dur="0.6s"\n repeatCount="indefinite"></animate>\n </rect>\n <rect x="8" y="6.16115" width="4" height="17.6777" opacity="0.2">\n <animate attributeName="opacity" values="0.2; 1; .2" begin="0.15s" dur="0.6s"\n repeatCount="indefinite"></animate>\n <animate attributeName="height" values="10; 20; 10" begin="0.15s" dur="0.6s"\n repeatCount="indefinite"></animate>\n <animate attributeName="y" values="10; 5; 10" begin="0.15s" dur="0.6s"\n repeatCount="indefinite"></animate>\n </rect>\n <rect x="16" y="6.33885" width="4" height="17.3223" opacity="0.2">\n <animate attributeName="opacity" values="0.2; 1; .2" begin="0.3s" dur="0.6s"\n repeatCount="indefinite"></animate>\n <animate attributeName="height" values="10; 20; 10" begin="0.3s" dur="0.6s"\n repeatCount="indefinite"></animate>\n <animate attributeName="y" values="10; 5; 10" begin="0.3s" dur="0.6s"\n repeatCount="indefinite"></animate>\n </rect>\n </symbol>\n <symbol id="f-svg-loading-3" viewBox="0 0 1024 1024">\n <path\n d="M514.048 337.715a32 32 0 0 1-32-32V135.168a32 32 0 1 1 64 0v170.534a32 32 0 0 1-32 32z m-1.28 581.799a32 32 0 0 1-32-32V714.406a32 32 0 1 1 64 0v173.095a32 32 0 0 1-32 32zM305.011 543.347H135.744a32 32 0 0 1 0-64h169.267a32 32 0 0 1 0 64z m583.079 0H713.83a32 32 0 0 1 0-64h174.26a32 32 0 1 1 0 64zM245.978 806.4a32 32 0 0 1-22.656-54.669L342.643 632.32a32 32 0 0 1 45.325 45.325L268.646 796.979a31.898 31.898 0 0 1-22.668 9.344z m408.435-408.5a32 32 0 0 1-22.656-54.68l123.558-123.56a32 32 0 1 1 45.325 45.3L677.12 388.544a31.898 31.898 0 0 1-22.669 9.357z m121.523 411.06a31.885 31.885 0 0 1-22.669-9.344l-122.15-122.15a32 32 0 1 1 45.325-45.325l122.15 122.15a32 32 0 0 1-22.656 54.669zM364.672 397.632a31.923 31.923 0 0 1-22.669-9.344L221.273 267.52a32 32 0 1 1 45.325-45.325l120.73 120.743a32 32 0 0 1-22.656 54.668z m0 0"\n p-id="4486"></path>\n </symbol>\n </svg>')},methods:{el:()=>document.getElementById("app")||document.body,getKey:()=>null,previewVideo(t){this.pop(Gt,{data:{type:"video",src:t}})},previewImage(t,e){this.pop(Gt,{data:{type:"image",imgs:t,options:e}})},dateSheet(t,e){this.pop(ee,{template:ee,width:"100%",height:"55%",position:"b",cover:!0,autoHide:!0,data:t,on:{"click:cover":It.close}})},html(){return[this.$slots.default?this.$slots.default():null,this.html_pops()]}},__file:"src/widgets/DocView.vue"},se=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var i=-1;return t.some(function(t,s){return t[0]===e&&(i=s,!0)}),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var i=t(this.__entries__,e),s=this.__entries__[i];return s&&s[1]},e.prototype.set=function(e,i){var s=t(this.__entries__,e);~s?this.__entries__[s][1]=i:this.__entries__.push([e,i])},e.prototype.delete=function(e){var i=this.__entries__,s=t(i,e);~s&&i.splice(s,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var i=0,s=this.__entries__;i<s.length;i++){var l=s[i];t.call(e,l[1],l[0])}},e}()}(),le="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,re="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),ae="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(re):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)};var oe=["top","right","bottom","left","width","height","size","weight"],ne="undefined"!=typeof MutationObserver,he=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var i=!1,s=!1,l=0;function r(){i&&(i=!1,t()),s&&o()}function a(){ae(r)}function o(){var t=Date.now();if(i){if(t-l<2)return;s=!0}else i=!0,s=!1,setTimeout(a,e);l=t}return o}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,i=e.indexOf(t);~i&&e.splice(i,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),t.length>0},t.prototype.connect_=function(){le&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ne?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){le&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=void 0===e?"":e;oe.some(function(t){return!!~i.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),ce=function(t,e){for(var i=0,s=Object.keys(e);i<s.length;i++){var l=s[i];Object.defineProperty(t,l,{value:e[l],enumerable:!1,writable:!1,configurable:!0})}return t},ue=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||re},de=ve(0,0,0,0);function pe(t){return parseFloat(t)||0}function me(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduce(function(e,i){return e+pe(t["border-"+i+"-width"])},0)}function fe(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return de;var s=ue(t).getComputedStyle(t),l=function(t){for(var e={},i=0,s=["top","right","bottom","left"];i<s.length;i++){var l=s[i],r=t["padding-"+l];e[l]=pe(r)}return e}(s),r=l.left+l.right,a=l.top+l.bottom,o=pe(s.width),n=pe(s.height);if("border-box"===s.boxSizing&&(Math.round(o+r)!==e&&(o-=me(s,"left","right")+r),Math.round(n+a)!==i&&(n-=me(s,"top","bottom")+a)),!function(t){return t===ue(t).document.documentElement}(t)){var h=Math.round(o+r)-e,c=Math.round(n+a)-i;1!==Math.abs(h)&&(o-=h),1!==Math.abs(c)&&(n-=c)}return ve(l.left,l.top,o,n)}var xe="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof ue(t).SVGGraphicsElement}:function(t){return t instanceof ue(t).SVGElement&&"function"==typeof t.getBBox};function ge(t){return le?xe(t)?function(t){var e=t.getBBox();return ve(0,0,e.width,e.height)}(t):fe(t):de}function ve(t,e,i,s){return{x:t,y:e,width:i,height:s}}var we=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ve(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=ge(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),be=function(t,e){var i,s,l,r,a,o,n,h=(s=(i=e).x,l=i.y,r=i.width,a=i.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,n=Object.create(o.prototype),ce(n,{x:s,y:l,width:r,height:a,top:l,right:s+r,bottom:a+l,left:s}),n);ce(this,{target:t,contentRect:h})},_e=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new se,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof ue(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new we(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof ue(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new be(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),ye="undefined"!=typeof WeakMap?new WeakMap:new se,ke=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=he.getInstance(),s=new _e(e,i,this);ye.set(this,s)};["observe","unobserve","disconnect"].forEach(function(t){ke.prototype[t]=function(){var e;return(e=ye.get(this))[t].apply(e,arguments)}});var Se=void 0!==re.ResizeObserver?re.ResizeObserver:ke,Te={mixins:[Xt],inject:["provideView"],__file:"src/widgets/WidgetBase.vue"};const Ce=function(t){if(this.wScrollPercentX){let e=t.target.scrollLeft;this.scrollXPosition=0==e?"left":e>=this.wScrollSizeX?"right":"center",this.el("wScrollBarThumbX").style.transform=`translateX(${e/this.wScrollPercentX}px)`}if(this.wScrollPercentY){let e=t.target.scrollTop;this.scrollYPosition=0==e?"top":e>=this.wScrollSizeY?"bottom":"middle",this.el("wScrollBarThumbY").style.transform=`translateY(${e/this.wScrollPercentY}px)`}this.onScroll(t)},Me=function(t){let e,i,s,l,r,a=this.el("wScrollOverflow"),o=this.wScrollPercentX,n=this.wScrollPercentY;It.moveup(h=>{e||(e=this.el("wScrollBarThumbX")===t.target?"X":"Y",i=t.clientX,s=t.clientY,l=a.scrollLeft,r=a.scrollTop,t.target.parentNode.classList.add("z-drag")),"X"===e?a.scrollLeft=l+(h.clientX-i)*o:a.scrollTop=r+(h.clientY-s)*n},(e,i)=>{i&&t.target.parentNode.classList.remove("z-drag")},t)};var Pe={mixins:[Te],props:["scrollX","scrollY","scrollView","scrollFlex"],emits:["scroll","resize"],data:()=>({wScrollPercentX:!1,wScrollPercentY:!1,wScrollSizeX:!1,wScrollSizeY:!1,scrollXPosition:"left",scrollYPosition:"top",isDeactivated:!1}),watch:{scrollXPosition(t){this.onScrollPosition(t)},scrollYPosition(t){this.onScrollPosition(t)},wScrollPercentX(t){let e=this.el();e&&(t?e.setAttribute("w-scroll-show-x",""):e.removeAttribute("w-scroll-show-x"))},wScrollPercentY(t){let e=this.el();e&&(t?e.setAttribute("w-scroll-show-y",""):e.removeAttribute("w-scroll-show-y"))}},methods:{onScroll(t){this.$emit("scroll",t)},onScrollPosition(){},onScrollAttributeChange(t){},onScrollResize(){},scrollTo(t,e,i,s,l,r){let a=this.ovf();if(!a)return r&&r();let o,n,h=this.el("wScrollCont")||a,c=It.bcr(a),u=It.bcr(h),d=t?It.bcr(t):u;if(null!=e)if(isNaN(e))if(~e.indexOf("top")){o=0;let t=i.slice(3);t&&(o=a.scrollTop+ +t)}else if(~e.indexOf("bottom"))o=d.bottom-u.top-c.height+ +e.slice(6);else if("middle"===e)o=d.top-u.top-(c.height/2-d.height/2);else if("nearest"===e){let t=i.slice(7);t=t?t.split(","):[0,0],d.top-t[0]<c.top?o=a.scrollTop-c.top+d.top-t[0]:d.bottom>c.bottom-t[1]&&(o=a.scrollTop+d.bottom-c.bottom+ +t[1])}else(d.top<c.top||d.bottom>c.bottom)&&(o=d.top-u.top-(c.height/2-d.height/2));else o=It.number(e),t&&(o=d.top-u.top-o);if(null!=i)if(isNaN(i))if(~i.indexOf("left")){n=0;let t=i.slice(4);t&&(n=a.scrollLeft+ +t)}else if(~i.indexOf("right"))n=d.right-u.left-c.width+ +i.slice(5);else if("center"===i)n=d.left-u.left-(c.width/2-d.width/2);else if(~i.indexOf("nearest")){let t=i.slice(7);t=t?t.split(","):[0,0],d.left-t[0]<c.left?n=a.scrollLeft-c.left+d.left-t[0]:d.right>c.right-t[1]&&(n=a.scrollLeft+d.right-c.right+ +t[1])}else(d.left<c.left||d.right>c.right)&&(n=d.left-u.left-(c.width/2-d.width/2));else n=It.number(i),t&&(n=d.left-u.left-n);if(null!=l&&(null!=o&&(o-=o%l),null!=n&&(n-=n%l)),!s||null==o&&null==n)null!=o&&(a.scrollTop=o),null!=n&&(a.scrollLeft=n),r&&r();else{let t=a.scrollTop,e=a.scrollLeft;It.ease(i=>{null!=o&&(a.scrollTop=t+(o-t)*i),null!=n&&(a.scrollLeft=e+(n-e)*i),1===i&&r&&r()},s)}},scrollToY(t,e,i,s,l){if(0===arguments.length)return this.ovf().scrollTop;"object"!=typeof t&&(l=s,s=i,i=e,e=t,t=null),"function"==typeof s&&(l=s,s=null),this.scrollTo(t,e,null,i,s,l)},scrollToX(t,e,i,s,l){if(0===arguments.length)return this.ovf().scrollLeft;"object"!=typeof t&&(l=s,s=i,i=e,e=t,t=null),"function"==typeof s&&(l=s,s=null),this.scrollTo(t,null,e,i,s,l)},ovf(){return It.br.mobile?this.el():this.el("wScrollOverflow")||this.el("wScrollCont")},html_scroll_slots(t){return this.hasScrollX||this.hasScrollY?[a("div",{id:this.uid+"wScrollOverflow",class:"w-scroll-overflow",onscroll:Ce.bind(this),onmouseenter:this.initScroll},a("div",{class:"w-scroll-cont",style:this.html_scroll_cont_style,id:this.uid+"wScrollCont"},t||this.$slots.default&&this.$slots.default())),!It.br.mobile&&this.hasScrollX&&[a("div",{class:"w-scrollbar-x",id:this.uid+"wScrollBarX",onmousedown:Me.bind(this)},a("div",{class:"w-scrollbar-thumb",id:this.uid+"wScrollBarThumbX"}))],!It.br.mobile&&this.hasScrollY&&[a("div",{class:"w-scrollbar-y",id:this.uid+"wScrollBarY",onmousedown:Me.bind(this)},a("div",{class:"w-scrollbar-thumb",id:this.uid+"wScrollBarThumbY"}))]]:t||this.$slots.default&&this.$slots.default()},scrollState(){if(It.br.mobile||!this.el("wScrollCont")||!this.el())return;const t=this.el("wScrollOverflow").getBoundingClientRect(),e=this.el("wScrollCont").getBoundingClientRect();let i,s;if(this.hasScrollX){let s=e.width>t.width&&e.width-t.width;s&&s<=1&&(s=!1),s&&(i={size:s,percent:t.width/e.width})}if(this.hasScrollY){let i=e.height>t.height&&e.height-t.height;i&&(s={size:i,percent:t.height/e.height})}return{x:i,y:s}},initScroll(){const t=this.scrollState();if(!t)return;const e=this.el().getBoundingClientRect(),{x:i,y:s}=t;if(i){let t=i.percent*e.width;this.el("wScrollBarThumbX").style.width=Math.max(20,t)+"px",this.wScrollSizeX=i.size,this.wScrollPercentX=i.size&&i.size/((1-i.percent)*(e.width-(t<20?20-t:0)))}else this.wScrollSizeX=this.wScrollPercentX=!1;if(s){let t=s.percent*e.height;this.el("wScrollBarThumbY").style.height=Math.max(20,t)+"px",this.wScrollSizeY=s.size,this.wScrollPercentY=s.size&&s.size/((1-s.percent)*(e.height-(t<20?20-t:0)))}else this.wScrollSizeY=this.wScrollPercentY=!1},scroll_observe_overflow(t){this.$emit("resize"),this.scroll_observe(t)},scroll_observe(t){this.isDeactivated||(this.initScroll(),this.onScrollResize(t),this.el("wScrollOverflow")&&this.el("wScrollOverflow").dispatchEvent(new Event("scroll")))}},computed:{hasScrollX(){return this.x.scrollX},hasScrollY(){return this.x.scrollY},html_scroll_cont_style(){},html_scroll_class(){let t=this.hasScrollX,e=this.hasScrollY;return{"w-scroll":t||e,"w-scroll-x":t,"w-scroll-y":e,"w-scroll-flex":this.x.scrollFlex}}},mounted(){this.x.scrollView&&this.el()&&setTimeout(()=>{let t=this.el().querySelector(this.x.scrollView);t&&this.scrollToY(t,"middle")}),It.br.mobile||!this.hasScrollX&&!this.hasScrollY||(this.el("wScrollOverflow")&&new Se(this.scroll_observe_overflow).observe(this.el("wScrollOverflow")),this.el("wScrollCont")&&new Se(this.scroll_observe).observe(this.el("wScrollCont")),this.el()&&new MutationObserver(this.onScrollAttributeChange).observe(this.el(),{attributes:!0}))},deactivated(){this.isDeactivated=!0},activated(){this.isDeactivated=!1,this.hasScrollY&&this.el("wScrollBarThumbY")&&this.scrollToY(It.number(this.el("wScrollBarThumbY").style.transform)*this.wScrollPercentY),this.hasScrollX&&this.el("wScrollBarThumbX")&&this.scrollToX(It.number(this.el("wScrollBarThumbX").style.transform)*this.wScrollPercentX)},__file:"src/widgets/Scroll.vue"},Ve={props:["align","valign","gap"],computed:{dir:()=>"h",html_align_class(){return[this.x.align&&"z-"+(this.x.vertical?"v":this.dir)+"-align-"+this.x.align,this.x.valign&&"z-"+(this.x.vertical?"v":this.dir)+"-valign-"+this.x.valign]}},__file:"src/widgets/AlignParent.vue"},$e={name:"w-horizontal",mixins:[Pe,Ve],props:["br","reverse"],provide(){return{provideLayout:this.$options.name,provideCompatGap:this.compatGap}},inject:["provideCompatGap"],methods:{html_slots(){return this.html_scroll_slots()}},computed:{dir:()=>"h",compatGap(){return It.br.compat.gap?this.x?this.x.gap:this.gap:null},html_props_on(){},html_props(){let t=this.x.gap;return{class:[this.html_scroll_class,this.html_align_class,{"z-br":this.x.br,[`f-${this.dir}-gap${this.x.reverse?"-reverse":""}`]:null!=t&&""!==t&&(It.br.compat.gap||t<0)}],style:!this.x.scrollX&&!this.x.scrollY&&this.html_scroll_cont_style,...this.html_props_on}},html_scroll_cont_style(){let t=this.x.gap,e={};return null!=t&&(e.gap=It.unitSize(t)),(It.br.compat.gap||t<0)&&(e["--w-gap"]=It.unitSize(t)),It.br.compat.gap&&null!=this.provideCompatGap&&(e["--w-compat-gap"]=It.unitSize(this.provideCompatGap)),this.x.reverse&&(e["flex-direction"]=("h"==this.dir?"row":"column")+"-reverse"),e}},__file:"src/widgets/Horizontal.vue"},ze={name:"w-vertical",mixins:[$e],computed:{dir:()=>"v"},__file:"src/widgets/Vertical.vue"},De={name:"w-view",mixins:[ze,Jt],inject:["provideView"],methods:{html_slots(){return[this.html_scroll_slots(),this.html_pops()]}},computed:{html_class(){return["w-vertical f-rel",this.html_scroll_class]}},__file:"src/widgets/View.vue"},Ee={__name:"DialogTarget",setup(t){const e=_("provideView",null),i=e&&e.provideView;return y("provideView",i),(t,e)=>k(t.$slots,"default")},__file:"src/widgets/DialogTarget.vue"};const Le={},Ae=!0,He=!1,Fe={t:"tt",r:"rr",b:"bb",l:"ll",c:"cc",lt:"11",tl:"11",tr:"22",rt:"22",rb:"33",br:"33",bl:"44",lb:"44","-t":"tb","-r":"rl","-b":"bt","-l":"lr","-c":"cc","-tl":"14","-tr":"23","-rt":"21","-rb":"34","-bl":"41","-br":"32","-lt":"12","-lb":"43"},Ie=["minWidth","maxWidth","minHeight","maxHeight"];var Ne={name:"w-dialog",mixins:[De],props:["title","autoHide","context","prong","independent","timeout","cover","coverProps","position","snap","indent","offsetRange","local","fullScreen","hoverShowDrop","visible",...Ie],emits:["show","close","update:visible"],data:()=>({isDialog:!0,keepHover:!1,hoverTimer:null,hoverMove:null,animateState:null,isDeactivated:!1,_pos:null,snapStyle:null,unique:!1}),activated(){this.isDeactivated=!1},deactivated(){this.isDeactivated=!0},methods:{getKey:()=>null,getLocalElem(){if(!0===this.x.local){let t=this.getCommander();return t&&It.el(t)}return"string"==typeof this.x.local?document.querySelector(this.x.local):this.x.local},snapTargetElem(){let t=this.x.snap;return"function"==typeof t?t():t?t.isWidget?t.snapElem():t:this.x.local?this.getLocalElem():this.defaultSnapTargetElem},fixSnapStyle(){let t=this._pos,e={};t.type?(t.pix_r?e.right=t.right:e.left=t.left,t.pix_b?(e.pix_b=!0,e.bottom=t.bottom):e.top=t.top,e.type=t.type):e=t,this.snapStyle=e},axis(){let t=this.x.position||this.defaultSnapPosition,e=t;if(this.slotTarget&&!this.x.visible)e={top:0,left:0};else if("string"==typeof t||!t){let s=this.el();if(!s||this.x.fullScreen)return;let l=this.x.local,r=this.snapTargetElem(),a=s.offsetWidth,o=s.offsetHeight,n=null!=this.x.indent?this.x.indent:this.x.prong&&-9;if(e=It.snap(a,o,r,"string"==typeof(i=t)&&i.split(",").map(t=>Fe[t]||t).join(),this._fitpos,n,l&&r),!this.x.snap){let i=It.q(`[w-dialog-position="${e.type}"]:not([id="${this.uid}"]):last`)[0];if(i){let s=It(i)._pos;"tl"==t||"tr"==t||"t"==t?(e.top=s.top+s.height+5,e.bottom=s.bottom-s.height-5):"br"==t||"bl"==t||"b"==t?(e.top=s.top-s.height-5,e.bottom=s.bottom+s.height+5):"lb"==t||"lt"==t||"l"==t?(e.left=s.left+s.width+5,e.right=s.right-s.width-5):"rb"!=t&&"rt"!=t&&"r"!=t||(e.left=s.left-s.width-5,e.right=s.right+s.width+5)}this.animateState="animating"}}var i;this._pos=e,this.fixSnapStyle(),"string"==typeof this.x.position&&this.x.snap&&this.checkOutScreen()},setPosition(t){this.x.position=t},checkOutScreen(){let t=this._pos;t.bottom<0?this.autoSetMaxHeight(t.height+t.bottom):t.top<0&&this.autoSetMaxHeight(t.height+t.top)},close(){!1!==this.x.visible&&(this.closeRelease(),this.trigger("close"),this.ownerView.removePop(this.uid),this.setVisible(!1))},closeRelease(){this.x.autoHide&&this.listenHide(He);let t=this.x.position,e=this._pos;if(t&&"string"==typeof t&&e&&this.el()){It.q(`~[w-dialog-position="${e.type}"]`,this.el()).each((i,s)=>{const l=It(s),r=l._pos;"tl"==t||"tr"==t||"t"==t?(r.top-=e.height+5,r.bottom+=e.height+5):"br"==t||"bl"==t||"b"==t?(r.top+=e.height+5,r.bottom-=e.height+5):"lb"==t||"lt"==t||"l"==t?(r.left-=e.width+5,r.right+=e.width+5):"rb"!=t&&"rt"!=t&&"r"!=t||(r.left+=e.width+5,r.right-=e.width+5),l.fixSnapStyle()})}},listenHide(t){t===He?this.setListenHide(t):setTimeout(()=>{!1!==this.x.visible&&this.setListenHide(t)},100)},setListenHide(t){let e=this.x.hoverShowDrop,i=t?"addEventListener":"removeEventListener",s=It.br.firefox?"DOMMouseScroll":"mousewheel";if((It.br.mobile?["touchend"]:["mousedown",s]).forEach(t=>document[i](t,this.bind("listenHideClose",t=>{let e;!1!==this.x.visible&&(t.target.classList.contains("w-dialog-cover")||this.isForceWheelHide&&t.type===s||!(this.hasBubble(t.target)||!this.x.independent&&((e=this.getCommander()).isWidget?e.hasBubble(t.target):e.contains(t.target))))&&(t.target.id==this.id+"cvr"&&t.stopPropagation(),this.close())}),Ae)),window.plus&&plus.key[i]("backbutton",this.bind("close"),He),e){let t=e===Ae?this.x.snap?this.snapTargetElem():It.el(this.getCommander()):It.el(e),s=this.bind("listenHideHoverOver",t=>{clearTimeout(this.hoverTimer),this.hoverTimer=null}),l=this.bind("listenHideHoverMove",e=>{t.contains(e.target)||this.hasBubble(e.target)||this.keepHover?s():this.hoverTimer||(this.hoverTimer=setTimeout(()=>{this.close(),s()},200))});[t,this.el()].forEach(t=>t&&t[i]("mouseenter",s)),document[i]("mousemove",l)}},autoSetMaxHeight(t){null==this.maxHeight&&(this.x.maxHeight=t)},setVisible(t){t=null==t||t,this.x.visible=t,this.$emit("update:visible",t),this.slotTarget&&(t?this.getTargetElem().setAttribute("w-pop-visible",""):this.getTargetElem().removeAttribute("w-pop-visible")),this.setVisibleSub(t)},setVisibleSub(t){},getTargetElem(){return this.$el?3===this.$el.nodeType?this.$el.nextElementSibling:this.$el:null},getPop(){return this.ownerView.getPopById(this.uid)},getCommander(){if(this.context)return this.context;let t=this.getPop();return t?t.commander:this.slotTarget?this.getTargetElem():this.ownerView},resolve(t){let e=this.getPop();e&&e.resolve&&e.resolve(t)},reject(t){let e=this.getPop();e&&e.reject&&e.reject(t)},html_slots_default:()=>null,html_slots(){let t,e=this._pos;if(this.x.prong&&e){let i=e.inner?e.mag_b?"b":e.mag_t?"t":e.mag_l?"l":"r":e.mag_b?"t":e.mag_t?"b":e.mag_l?"r":"l";t=a("div",{class:"w-dialog-prong z-"+i},[a("i",{class:"w-dialog-prong-out f-arw f-arw-"+i+"5"}),a("i",{class:"w-dialog-prong-in f-arw f-arw-"+i+"4"})])}return[t||[],this.html_scroll_slots(this.html_slots_default()),this.html_pops()]},html(){let t=this.x.local?this.getLocalElem():"#w-dfish-pops",e=null;if(this.x.cover&&!1!==this.x.visible&&!this.isDeactivated){let t={class:"w-dialog-cover f-abs-full",...this.scope_props};this.x.coverProps&&(t=r(t,this.x.coverProps)),e=a("div",t)}let i=[e,this.html_self(!0)],s=t?a(S,{to:t},i):i;return this.slotTarget?[s,a(Ee,null,{default:()=>[this.slotTarget()]})]:s}},computed:{commander(){return this.getCommander()},defaultSnapTargetElem(){},defaultSnapPosition:()=>"cc",isForceWheelHide:()=>!1,slotTarget(){return this.$slots.target},scope_props(){let t=this.$.vnode.scopeId||this.$.parent.vnode.scopeId;if(t)return{[`${t}`]:""}},html_props(){return{class:"w-dialog","w-dialog-position":(this._pos||Le).type,...this.scope_props}},html_class(){const t=this._pos||Le,e=this.x.position;return["w-vertical",this.html_align_class,this.html_scroll_class,{"z-hide":this.isDeactivated||(null!=this.x.visible?!this.x.visible:!!this.slotTarget),"z-full":this.x.fullScreen,["z-face-"+this.x.face]:this.x.face,["z-mag-"+(t.mag_t?"t":t.mag_l?"l":t.mag_b?"b":"r")]:t.type,["z-snap z-snap-"+t.type]:t.type,[`w-dialog-animate-${e}`]:Fe[e]&&"string"==typeof e&&"animating"!=this.animateState}]},html_style(){if(this.x.fullScreen)return{width:"100%",height:"100%",top:0,left:0};{let t=this.x.position,e=this.snapStyle,i={};t&&"object"==typeof t?(It.extend(i,t),e&&(null==i.top&&null==i.bottom&&It.extend(i,It.lodash.pick(e,"top","bottom")),null==i.left&&null==i.right&&It.extend(i,It.lodash.pick(e,"left","right")))):e&&It.extend(i,e);for(let t in i)i[t]=It.unitSize(i[t]);return Ie.forEach(t=>{null!=this.x[t]&&(i[t]=It.unitSize(this.x[t]))}),i}}},mounted(){this.x.local&&It.q(this.getLocalElem()).addClass("f-dialog-local-wrap"),this.$nextTick(()=>{if(this.$watch(()=>this.x.position,this.axis),this.$watch(()=>this.x.visible,t=>{!1!==t&&this.x.autoHide&&this.listenHide(Ae),this.axis()},{immediate:!0}),setTimeout(()=>{this.axis(),this.$nextTick(()=>this.trigger("show"))}),this.slotTarget){let t=this.getTargetElem();t&&(this.hoverShowDrop?t.addEventListener("mouseenter",()=>null==this.visible&&this.setVisible(),!1):t.addEventListener("click",t=>{t.stopPropagation(),null==this.visible&&this.setVisible()},!1))}new Se(t=>{!1!==this.x.visible&&"animating"!=this.animateState&&this.el()&&this.axis()}).observe(this.el()),this.x.timeout&&setTimeout(this.close,this.x.timeout)})},unmounted(){!1!==this.x.visible&&this.closeRelease()},__file:"src/widgets/Dialog.vue"},Ye={__name:"TemplateAlert",props:["text","escape","title","icon","button","showButton","yesText"],emits:["save","close"],setup(t,{emit:e}){const i=t,s=e,l={info:".f-i .f-i-alert-info",warning:".f-i .f-i-alert-warning",success:".f-i .f-i-alert-success",question:".f-i .f-i-alert-question",error:".f-i .f-i-alert-error"},r=t=>{s("save",t)},a=t=>{s("close",t)},o=T(()=>l[i.icon]||i.icon||l.info),h=T(()=>i.yesText||"确定");return(e,i)=>{const s=n("w-html"),l=n("w-vertical"),_=n("w-horizontal"),y=n("w-img"),S=n("w-button"),T=n("w-buttonbar"),V=C("dialog-move");return u(),c(l,{class:"w-alert-wrap"},{default:d(()=>[x(_,{class:"w-alert-head"},{default:d(()=>[M((u(),c(l,{class:"w-alert-move","w-width":"*"},{default:d(()=>[x(s,{class:"w-alert-title",valign:"middle",height:"*",innerHTML:t.title},null,8,["innerHTML"])]),_:1})),[[V,!0]]),x(s,{class:"w-alert-close",align:"center",valign:"middle",onClick:a},{default:d(()=>i[0]||(i[0]=[m("i",{class:"w-alert-close-icon f-i f-i-close"},null,-1)])),_:1,__:[0]})]),_:1}),x(l,{class:"w-alert-body"},{default:d(()=>[x(_,{class:"w-alert-main"},{default:d(()=>[x(y,{class:"w-alert-icon",src:o.value},null,8,["src"]),k(e.$slots,"default",{width:"*"},()=>[t.escape?(u(),c(s,{key:0,width:"*",class:"w-alert-text"},{default:d(()=>[b(v(t.text),1)]),_:1})):(u(),c(s,{key:1,width:"*",class:"w-alert-text",innerHTML:t.text},null,8,["innerHTML"]))])]),_:3}),!1!==t.showButton?(u(),c(T,{key:0,gap:"10",class:"w-alert-buttonbar"},{default:d(()=>[t.button?(u(!0),p(f,{key:0},g(t.button,t=>(u(),c(S,{face:t.face,class:P(["w-alert-button",t.class]),text:t.text,onClick:t.click,ownproperty:!0},null,8,["face","class","text","onClick"]))),256)):(u(),c(S,{key:1,face:"primary",class:"w-alert-button",text:h.value,onClick:r,ownproperty:!0},null,8,["text"]))]),_:1})):w("v-if",!0)]),_:3})]),_:3})}},__file:"src/template/TemplateAlert.vue"},Be={name:"w-alert",mixins:[Ne],props:["text","title","escape","yes","no","button","showButton","yesText"],methods:{x_default:()=>({title:It.loc.opertip}),async onSave(t){let e;if(this.x.yes)try{e=await this.x.yes(t)}catch(t){console.error(t)}this.resolve(e),this.close()},async onClose(t){let e;this.x.no&&(e=await this.x.no(t)),this.resolve(e),this.close()},html_slots_default(){return a(Ye,{text:this.x.text,title:this.x.title,icon:this.x.icon,escape:this.x.escape,yesText:this.x.yesText,showButton:this.x.showButton,onSave:this.onSave,onClose:this.onClose,button:this.x.button},this.$slots)}},__file:"src/widgets/Alert.vue"},Oe={__name:"TemplateConfirm",props:["text","escape","title","icon","button","showButton","yesText","noText"],emits:["save","close"],setup(t,{emit:e}){const i=t,s=e,l={info:".f-i .f-i-alert-info",warning:".f-i .f-i-alert-warning",success:".f-i .f-i-alert-success",question:".f-i .f-i-alert-question",error:".f-i .f-i-alert-error"},r=t=>{s("save",t)},a=t=>{s("close",t)},o=T(()=>l[i.icon]||i.icon||l.question),h=T(()=>i.yesText||"确定"),w=T(()=>i.noText||"取消");return(e,i)=>{const s=n("w-html"),l=n("w-vertical"),_=n("w-horizontal"),y=n("w-img"),S=n("w-button"),T=n("w-buttonbar"),V=C("dialog-move");return u(),c(l,{class:"w-alert-wrap"},{default:d(()=>[x(_,{class:"w-alert-head"},{default:d(()=>[M((u(),c(l,{class:"w-alert-move","w-width":"*"},{default:d(()=>[x(s,{class:"w-alert-title",valign:"middle",height:"*",innerHTML:t.title},null,8,["innerHTML"])]),_:1})),[[V,!0]]),x(s,{class:"w-alert-close",align:"center",valign:"middle",onClick:a},{default:d(()=>i[0]||(i[0]=[m("i",{class:"w-alert-close-icon f-i f-i-close"},null,-1)])),_:1,__:[0]})]),_:1}),x(l,{class:"w-alert-body"},{default:d(()=>[x(_,{class:"w-alert-main",valign:"middle"},{default:d(()=>[x(y,{class:"w-alert-icon",src:o.value},null,8,["src"]),k(e.$slots,"default",{width:"*"},()=>[t.escape?(u(),c(s,{key:0,width:"*",class:"w-alert-text"},{default:d(()=>[b(v(t.text),1)]),_:1})):(u(),c(s,{key:1,width:"*",class:"w-alert-text",innerHTML:t.text},null,8,["innerHTML"]))])]),_:3}),x(T,{gap:"10",class:"w-alert-buttonbar"},{default:d(()=>[t.button?(u(!0),p(f,{key:0},g(t.button,t=>(u(),c(S,{face:t.face,class:P(["w-alert-button",t.class]),text:t.text,onClick:t.click,ownproperty:!0},null,8,["face","class","text","onClick"]))),256)):(u(),p(f,{key:1},[x(S,{face:"primary",class:"w-alert-button",text:h.value,onClick:r,ownproperty:!0},null,8,["text"]),x(S,{class:"w-alert-button",text:w.value,onClick:a,ownproperty:!0},null,8,["text"])],64))]),_:1})]),_:3})]),_:3})}},__file:"src/template/TemplateConfirm.vue"},je={name:"w-confirm",mixins:[Ne],props:["text","title","escape","yes","no","yesText","noText","button","showButton"],methods:{x_default:()=>({title:It.loc.opertip}),async onSave(t){let e;if(this.x.yes)try{e=await this.x.yes(t)}catch(t){console.error(t)}this.resolve(e),this.close()},async onClose(t){let e;this.x.no&&(e=await this.x.no(t)),this.resolve(e),this.close()},html_slots_default(){return a(Oe,{text:this.x.text,title:this.x.title,icon:this.x.icon,escape:this.x.escape,yesText:this.x.yesText,noText:this.x.noText,showButton:this.x.showButton,onSave:this.onSave,onClose:this.onClose,button:this.x.button},this.$slots)}},__file:"src/widgets/Confirm.vue"};const qe={class:"w-tip-body"},Re={key:0,class:"w-tip-text"},We=["innerHTML"];var Ue={__name:"TemplateTip",props:["text","escape"],setup:t=>(e,i)=>(u(),p("div",qe,[k(e.$slots,"text",{},()=>[t.escape?(u(),p("div",Re,v(t.text),1)):(u(),p("div",{key:1,class:"w-tip-text",innerHTML:t.text},null,8,We))])])),__file:"src/template/TemplateTip.vue"};let Xe=null,Qe={time:(new Date).getTime(),list:[]};var Je={name:"w-tip",mixins:[Ne],props:["face","text","escape"],provide(){return{provideView:this.provideView}},methods:{x_default:()=>({prong:!0,autoHide:!0,face:"normal",escape:!0}),html_slots_default(){return a(Ue,{text:this.x.text,escape:this.x.escape},this.$slots)},setVisibleSub(t){if(t)for(let t of Qe.list)t!=this.uid&&It.close(t)}},computed:{isForceWheelHide:()=>!0,slotTarget(){return this.$slots.default},defaultSnapTargetElem(){const t=this.commander;return t.snapElem?t.snapElem():t},defaultSnapPosition:()=>"-t,-r,-b,-l,-tl,-tr,-rt,-tb,-bl,-br,-lt,-lb,c"},mounted(){Qe.time=(new Date).getTime(),Xe&&It.close(Xe),Xe=this.uid,Qe.list.push(this.uid)},unmounted(){Xe=null;let t=Qe.list.indexOf(this.uid);t>-1&&Qe.list.splice(t,1)},__file:"src/widgets/Tip.vue"},Ge={name:"w-img",pubParentName:"w-album",mixins:[Te],inject:["providePubParent"],props:["src","text","square","imgWidth","imgHeight","dataUrl","vertical","disabled"],data:()=>({hover:!1}),methods:{x_default:()=>({vertical:!0}),onerror(t){this.dataUrl&&(t.target.src=this.dataUrl)},html_slots(){let t=this.x.src,e=t&&t.startsWith(".")&&!t.includes("/"),i=t&&t.startsWith("#"),s=this.$slots.default||(this.x.text?{default:()=>this.x.text}:null);return t=t||this.dataUrl,[t&&a("div",{class:"w-img-gut"},[e?a("i",{class:"w-img-icon "+t.replace(/\./g,"")}):i?a("svg",{class:"f-svg "+t.slice(1)},a("use",{"xlink:href":t})):a("img",{ref:"img",src:t,class:"w-img-icon",onerror:this.onerror}),this.$slots.cover&&a("div",{class:"w-img-cover f-abs-full"},this.$slots.cover())]),s&&a(ze,{class:"w-img-description"},s)]}},computed:{isCurrent(){return this.pubParent&&this.pubParent.inCurrent(this)},html_props(){let t=It.unitSize(this.x.imgWidth?this.x.imgWidth:this.x.width),e=It.unitSize(this.x.imgHeight?this.x.imgHeight:this.x.height);return{class:{"z-hv":this.hover,"z-on":this.isCurrent,"z-ds":this.x.disabled,"z-square":this.x.square,"z-canplay":this.x.canPlay,"z-vertical":this.x.vertical,[`f-${this.x.vertical?"v":"h"}-gap`]:It.br.compat.gap},style:{"--w-img-icon-width":t,"--w-img-icon-height":e},onmouseenter:t=>!this.x.disabled&&(this.hover=!0),onmouseleave:t=>!this.x.disabled&&(this.hover=!1)}}},__file:"src/widgets/Img.vue"},Ke={pubParentName:"w-buttonbar",mixins:[Te],props:["text","icon","focusIcon","dropIcon","focusDropIcon","arrowIcon","face","target","closable","dropToggle","loading","disabled","vertical","hoverShowDrop","dropProps","showArrowIcon"],inject:["providePubParent","provideMenu_w"],emits:["click:close","dropClose"],data(){return{dropper:null,showDrop:!1,mouses:{onmouseenter:t=>{this.showDrop||(this.pubParent&&si(this.pubParent)&&!si(this)&&ii(),this.x.hoverShowDrop&&(this.drop(),this.$nextTick(()=>t.currentTarget.classList.add("z-hv")))),t.currentTarget.classList.add("z-hv")},onmouseleave:t=>t.currentTarget.classList.remove("z-hv"),onmousedown:t=>t.currentTarget.classList.add("z-down"),onmouseup:t=>t.currentTarget.classList.remove("z-down")}}},watch:{disabled(t){t&&It.q(".z-hv",this.el()).removeClass("z-hv")}},methods:{setLoading(t){t=null==t||t,this.x.loading=t},drop(){this.hasChild?this.showDrop=!0:ii()},isShowDrop(){return this.showDrop},closeDrop(){this.showDrop=!1},onclick(t){this.isMore&&(this.showDrop&&this.x.dropToggle?this.closeDrop():this.drop()),this.pubParent&&this.pubParent.$emit("click:item",t)},clickClose(t){t.stopPropagation(),t.runType="click:close",this.trigger(t)},clickDrop(t){this.isDisabled||(t.stopPropagation(),this.drop())},html_drop(){if(this.showDrop&&this.hasChild){let t={context:this,ownproperty:!0,minWidth:It.bcr(this.el()).width,autoHide:!0,hoverShowDrop:this.x.hoverShowDrop,snap:()=>this.el(),position:this.pubParent&&this.pubParent.x.vertical?"-rt,-lt":"v",indent:1,onClose:()=>{this.showDrop=!1,this.$emit("dropClose")}};return this.x.dropProps&&(t=r(t,this.x.dropProps)),a(n("w-menu"),t,this.$slots)}return[]},html_slots(){let t=this.x.text,e=[];if(this.x.loading&&e.push(a("div",{class:"w-button-loading f-abs-full f-flex-center"},a(Ge,{src:"#f-svg-loading"}))),this.x.icon){let t=this.x.focusDropIcon&&this.isCurrent&&this.showDrop?this.x.focusDropIcon:this.x.focusIcon&&this.isCurrent?this.x.focusIcon:this.x.dropIcon&&this.showDrop?this.x.dropIcon:this.x.icon;e.push(this.html_icon(t,"w-button-icon f-flex-center"+(this.x.vertical?"":" f-height")))}if(t){const i=this.pubParent&&this.pubParent.x.flexSize&&t;e.push(a("div",{class:"w-button-text"},a("span",{class:"w-button-text-line f-line-1",title:i||""},t)))}return this.isMore&&this.x.showArrowIcon&&e.push(a(Ge,{class:"w-button-more f-flex-center f-height",src:this.x.arrowIcon||".f-i .f-i-caret-down"})),this.x.closable&&e.push(a("div",{class:"w-button-close f-flex-center"},a("i",{class:"w-button-close-icon f-i f-i-close",onclick:this.clickClose}))),[a("div",{class:"w-button-main f-oh f-height",...this.isCombo&&!this.isDisabled&&this.mouses},e),this.isCombo&&a(Ge,{class:"w-button-drop f-flex-center f-height",src:".f-i .f-i-caret-down",...!this.isDisabled&&this.mouses,onclick:this.clickDrop}),this.html_drop()]}},computed:{tagName:()=>"button",hasChild(){const t=this.slots_children();return t&&t.length},isCurrent(){return this.pubParent&&this.pubParent.inCurrent(this)},isMore(){return this.hasChild&&!this.getOn("click")},isCombo(){return!!(this.hasChild&&this.x.showArrowIcon&&this.getOn("click"))},isDisabled(){return!!this.x.disabled||!!this.x.loading},html_props(){return{disabled:this.isDisabled,class:{[`z-face-${this.x.face}`]:this.x.face,"z-combo":this.isCombo,"z-more":this.isMore,"z-on":this.isCurrent,"z-ds":!!this.x.disabled,"z-loading":!!this.x.loading,"z-vertical":!!this.x.vertical,"z-closable":!!this.x.closable,"z-drop":this.showDrop},onclick:this.onclick,...!this.isCombo&&!this.isDisabled&&this.mouses}}},__file:"src/widgets/ButtonAbs.vue"},Ze={name:"w-menubutton",mixins:[Ke],methods:{ajax(...t){return this.parentMenu.rootCommander.ajax(...t)},submit(...t){return this.parentMenu.rootCommander.submit(...t)},drop(){this.showDrop||(this.closeSub(),this.showDrop=!0,this.parentMenu.currentMenuButton=this)},onclick(t){this.isMore||setTimeout(()=>this.parentMenu.root.close(),10)},onmouseenter(t){!this.x.disabled&&t.currentTarget.classList.add("z-hv"),this.isMore?this.drop():this.closeSub()},closeSub(){this.parentMenu.currentMenuButton&&(this.parentMenu.currentMenuButton.showDrop=!1,this.parentMenu.currentMenuButton=null)},clickClose(t){t.stopPropagation(),t.runType="click:close",this.trigger(t)},html_slots(){let t=this.x.text,e=[],i=this.x.icon,s=i&&i.startsWith(".")&&!i.includes("/");if(e.push(!i||s?a("i",{class:"w-menubutton-icon f-flex-center f-height "+(i?i.replace(/\./g,""):"")}):a("img",{src:i,class:"w-menubutton-icon f-flex-center f-height"})),t&&e.push(a("div",{class:"w-menubutton-text f-line-1"},t)),this.x.closable&&e.push(a("div",{class:"w-menubutton-close"},a("i",{class:"w-menubutton-close-icon f-i f-i-close",onclick:this.clickClose}))),e.push(a(Ge,{class:"w-menubutton-drop f-flex-center f-height",src:this.isMore?this.x.arrowIcon||".f-i .f-i-caret-right":""})),this.showDrop){let t={autoHide:!0,context:this,ownproperty:!0,snap:()=>this.el(),position:"21,12",indent:{top:1,bottom:1},onClose:()=>this.showDrop=null};this.x.dropProps&&(t=r(t,this.x.dropProps)),e.push(a(n("w-menu"),t,this.$slots))}return e}},computed:{tagName:()=>"button",isMore(){return!!this.hasChild},parentMenu(){let t=this.provideView;for(;t&&!t.isView;)t=t.provideView;return t},ownerView(){const t=this.parentMenu.rootCommander;return t?t.ownerView:this.parentMenu.root.provideView},html_props(){return{disabled:!!this.x.disabled,class:{"z-on":this.isCurrent,"z-ds":!!this.x.disabled,"z-drop":this.showDrop},onmouseenter:this.onmouseenter,onmouseleave:!this.x.disabled&&(t=>t.currentTarget.classList.remove("z-hv")),onclick:this.onclick}}},__file:"src/widgets/MenuButton.vue"},ti={name:"w-button",mixins:[Ke],props:["autoMenuButton"],methods:{x_default:()=>({showArrowIcon:!0,autoMenuButton:!0})},render(){return this.provideMenu_w&&this.x.autoMenuButton?a(Ze,this.$props,this.$slots):this.html()},__file:"src/widgets/Button.vue"};let ei=null;function ii(){ei&&(It.close(ei),ei=null)}function si(t){return ei&&(t.hasBubble(ei.context)||ei.hasBubble(t))}var li={name:"w-menu",mixins:[Ne],provide(){return{provideMenu_w:this}},methods:{x_default:()=>({autoHide:!0,independent:!1}),hasBubble(t,e){if(this.contains(t,e))return!0;let i=It(t).closest("w-menu,w-menubutton");return!(!i||!(i=i.parentMenu)||i.rootCommander!=this.rootCommander)||void 0},arrow(t){let e=this.$refs.bbr.el(),i=It.bcr(e);e.scrollTop+=i.height*t},mousewheel(t){this.arrow(t.deltaY<0?1:-1)},getRoot(){let t=this;for(;t.getCommander()&&t.getCommander().isWidget&&"w-menubutton"===t.getCommander().$options.name;)t=t.getCommander().parentMenu;return t},setVisibleSub(t){!1===t&&this.currentMenuButton&&(this.currentMenuButton.showDrop=!1)},checkOutScreen(){let t=this._pos;t.mag_l||t.mag_r?t.bottom<0?(t.top+=t.bottom,t.top<0&&(this.autoSetMaxHeight(t.height+t.top),t.top=0),this.fixSnapStyle()):t.top<0&&(t.bottom+=t.top,t.bottom<0&&(this.autoSetMaxHeight(t.height+t.bottom),t.bottom=0),this.fixSnapStyle()):t.bottom<0?this.autoSetMaxHeight(t.height+t.bottom):t.top<0&&this.autoSetMaxHeight(t.height+t.top)},html_buttons(){return this.slots_children()},html_slots(){return[this.x.maxHeight&&a("div",{class:"w-menu-arr f-oh",onclick:t=>this.arrow(-1)},a("i",{class:"f-i f-i-caret-up"})),a(ze,{class:"w-menu-bbr",height:"*",ref:"bbr",onwheel:this.mousewheel},this.$slots),this.x.maxHeight&&a("div",{class:"w-menu-arr f-oh",onclick:t=>this.arrow(1)},a("i",{class:"f-i f-i-caret-down"}))]}},computed:{root(){return this.getRoot()},rootCommander(){return this.root.commander},parentMenu(){let t=this.provideView;for(;t&&!t.isView;)t=t.provideView;return t},defaultSnapTargetElem(){let t=this.getCommander();if(t)return t.isWidget?t.snapElem():t},defaultSnapPosition:()=>"-bl,-br,-tl,-tr",scope_props(){if(this.rootCommander){let t=It(this.rootCommander).$.vnode.scopeId||this.$.vnode.scopeId||this.$.parent.vnode.scopeId;if(t)return{[`${t}`]:""}}}},mounted(){(!this.context||this.context.$options&&"w-menubutton"!==this.context.$options.name)&&(ei&&ei.context!==this.context&&It.close(ei),ei=this)},__file:"src/widgets/Menu.vue"},ri={name:"w-loading",mixins:[Ne],props:["text","icon"],methods:{x_default:()=>({}),html_slots(){return a(Ge,{src:void 0!==this.x.icon?this.x.icon:"#f-svg-loading",text:void 0!==this.x.text?this.x.text:It.loc.loading})}},mounted(){this.resolve(this)},__file:"src/widgets/Loading.vue"},ai={name:"w-table",mixins:[Te],props:["face","scroll-x","scroll-y"],provide(){return{_provideTable:this,provideLevel:-1,provideParentTR:null,provideTripleboxContainer:this}},data:()=>({sticky:V({left:null,right:null,observers:[]})}),methods:{observeSticky(){for(let t of this.sticky.observers)t.disconnect();let t=[];It.lodash.each(this.initFixedCells(),e=>{let i=new Se(this.setFixedStyle);i.observe(e),t.push(i)}),this.sticky.observers=t},setFixedStyle(){this.initFixedCells();let t={};if(this.sticky.left&&this.sticky.left.forEach(e=>t[`--w-td-fixed-left-${e.colIndex}`]=`${e.offset}px`),this.sticky.right&&this.sticky.right.forEach(e=>t[`--w-td-fixed-right-${e.colIndex}`]=`${e.offset}px`),this.$el)for(let e in t)this.$el.style.setProperty(e,t[e])},initFixedCells(){return this.getFixedCells("left").concat(this.getFixedCells("right"))},getFixedCells(t){let e=null,i=0,s=It.lodash.map(this.$el.querySelector("thead").querySelectorAll(`td[w-fixed="${t}"]`));return"right"===t&&s.reverse(),s.forEach(t=>{(e||(e=[])).push({colIndex:t.cellIndex,offset:i}),i+=t.offsetWidth}),this.sticky[t]=e,s},html_slots(){return[this.slotHooks.thead,this.slotHooks.tbody,this.slotHooks.hiddens||[]]}},computed:{slotHooks(){const t={};return this.slots_children().forEach(e=>{let i=e.type.name&&e.type.name.slice(2);i&&("hidden"===i?(t.hiddens||(t.hiddens=[])).push(e):t[i]=e)}),t},colgroup(){return It.slotsChildren(this.slotHooks.columns.children).map(t=>t.props)},stickyState(){let t="";for(let e of this.colgroup)e.fixed&&(t+=e.fixed);return t},html_class(){return["f-flex-column",this.x.face&&"z-face-"+this.x.face]}},mounted(){this.$watch("stickyState",t=>{this.$nextTick(()=>this.observeSticky())},{immediate:!0}),this.$el.setAttribute("w-scroll-x","left"),It.br.chrome&&It.br.chrome<=60&&new Se(()=>{this.$el.setAttribute("w-compact-resize-sticky",""),requestAnimationFrame(()=>this.$el.removeAttribute("w-compact-resize-sticky"))}).observe(this.$el)},__file:"src/widgets/Table.vue"},oi={name:"w-columns",__file:"src/widgets/TableColumns.vue"},ni={name:"w-column",props:["width","minWidth"],__file:"src/widgets/TableColumn.vue"},hi={props:["pub","current"],provide(){return{providePubParent:this}},methods:{inCurrent(t){let e=this.x.current;if(null!=e)return Array.isArray(e)?-1<e.findIndex(e=>this.isCurrentChild(e,t)):this.isCurrentChild(e,t)},isCurrentChild(t,e){if("object"==typeof t){let i=e.isWidget?(e.x||e).data:e.props&&e.props.data;if(i)for(let e in t)if(It.lodash.get(i,e)==t[e])return!0}else if(t==(e.isWidget?e.getKey():e.key))return!0}}};hi.__file="src/widgets/PubParent.vue";const ci={render:function(t,e){return k(t.$slots,"default")},__file:"src/widgets/SlotDefault.vue"};var ui={name:"w-thead",mixins:[Te,hi],props:["br","sort"],inject:["_provideTable"],provide(){return{provideLeafLevel:-2,provideParentLeaf:null,provideInBody:!1,_provideThead:this,_provideTBody:!1}},data:()=>({rows:null,sortUID:null}),methods:{isExpanded:()=>!0,slot_rows(){if(this.$slots.row){let t,e=this.x.children;if(Array.isArray(e)){let i=0;t=e.map((t,e)=>{let s;const l=this.$slots.row({item:t,index:e}).map(t=>(t.props||(t.props={}),t.props.rowIndex=i++,s||(s=t.key),t));return s?a(ci,{key:s},{default:()=>l}):l})}return t||[]}return this.slots_children().map((t,e)=>It.lodash.set(t,"props.rowIndex",e))},html_tbody(){let t=this._provideTable.colgroup,e=this.slot_rows(),i={};if(!this._provideTable.fixed){let e=0;t.forEach(t=>{e+=It.number(t.width)||It.number(t["min-width"])}),e&&(i.minWidth=It.unitSize(e))}return this.rows=V({}),a("div",{class:"w-table-tbl-wrap"},a("table",{ref:"table",cellpadding:0,cellspacing:0,class:"w-table-tbl",style:i},[a("thead",null,a("tr",null,t.map(t=>a("td",{style:{width:"*"==t.width?null:It.unitSize(t.width),minWidth:It.unitSize(t["min-width"])},"w-fixed":t.fixed})))),a("tbody",e)]))},html_slots(){return this.html_tbody()}},computed:{isEscape(){return this.x.escape}},__file:"src/widgets/TableTHead.vue"},di={name:"w-tbody",mixins:[ui,Pe],inject:["_provideTable"],props:["children"],provide(){return{_provideThead:null,provideInBody:!0,_provideTBody:this}},created(){this.$watch(()=>this._provideTable.x,t=>{this.x.scrollX=t.scrollX,this.x.scrollY=!!this._provideTable.fixed||t.scrollY},{immediate:!0}),this.$watch("current",()=>this.viewCurrent())},methods:{getCurrent(){const t=It.q(".w-tr.z-on",this.el())[0];return t&&It(t)},viewCurrent(t){this.$nextTick(()=>{(t=t||this.getCurrent())&&(t.expandToView(),this.$nextTick(()=>t.scrollIntoView()))})},onScroll(t){let e=this._provideTable.slotHooks.thead;e&&(e.el.scrollLeft=t.target.scrollLeft)},onScrollPosition(t){let e=this._provideTable.el();(e&&"left"==t||"center"==t||"right"==t)&&e.setAttribute("w-scroll-x",t)},onScrollAttributeChange(t){let e=this._provideTable.el();e&&t.forEach(t=>{let i=t.attributeName;t.target.hasAttribute(i)?e.setAttribute(i,""):e.removeAttribute(i)})},html_slots(){return this.html_scroll_slots(this.html_tbody())}},computed:{inBody:()=>!0,html_class(){return["w-vertical f-flex-1 f-oh",this.html_scroll_class]}},__file:"src/widgets/TableTBody.vue"},pi={name:"w-tr",pubParentName:"w-tbody,w-thead",mixins:[Te,Qt],props:["rowIndex","expanded","children"],inject:["_provideTable","providePubParent","provideInBody","_provideTBody","provideLevel","provideParentTR"],provide(){return{provideParentTR:this,provideLevel:this.provideLevel+1}},methods:{hasChild(){return It.hasChild(this.$slots,"rows")},isDisplay(){if(!this.provideParentTR)return!0;let t=this;for(;t=t.provideParentTR;)if(!t.isExpanded())return!1;return!0},isExpanded(){return this.x.expanded},setExpanded(t){this.x.expanded=null!=t?t:!this.x.expanded},expandToView(){let t=this;for(;(t=t.provideParentTR)&&t.$options.name===this.$options.name;)t.toggle(!0)},toggle(t,e){const i=this.el(".w-leaf");let s=i&&It(i);s?s.toggle(t,e):(this.setExpanded(t),e&&this.$nextTick(e))},onmouseenter(t){this.el().classList.add("z-hv")},onmouseleave(t){this.el().classList.remove("z-hv")},html_slots(){let t=this.rowIndex,e=this.pubParent.rows,i=0;return this.slots_children().map(s=>{for(;e[t]&&e[t][i];)i+=e[t][i];if(s.dfishColIndex=i,s.props){if(s.props.rowspan>1)for(let l,r=1;r<s.props.rowspan;r++)l=e[t+r]||(e[t+r]={}),l[i]=It.number(s.props.colspan)||1;s.props.colspan>1&&(i+=s.props.colspan-1)}return i++,s})},html(){return this.x.children&&Array.isArray(this.x.children)&&this._provideTBody&&this._provideTBody.$slots.row?[this.html_self(!0),this.x.children.map((t,e)=>{let i;const s=this._provideTBody.$slots.row({item:t,index:e});for(let t of s)i||(i=t.key);return i?a(ci,{key:i},{default:()=>s}):s})]:this.$slots.row?[this.html_self(!0),this.$slots.row()]:this.html_self()}},computed:{tagName:()=>"tr",level(){return this.provideLevel+1},isEscape(){return this.pubParent.x.escape},inCurrent(){return this.pubParent.inCurrent(this)},html_props(){if(this.provideInBody)return{class:{"z-on":this.inCurrent,"z-expanded":this.isExpanded(),"f-hide":!this.isDisplay()},onmouseenter:this.onmouseenter,onmouseleave:this.onmouseleave}}},mounted(){this.inCurrent&&this.pubParent.viewCurrent(this)},__file:"src/widgets/TableTR.vue"},mi={name:"w-td",props:["colspan","rowspan","align","valign","data"],inject:["_provideTable","provideInBody"],methods:{td_props(){let t=this.$.vnode.dfishColIndex,e=this._provideTable.colgroup[t]||!1,i=this._provideTable.colgroup.length,s=this.colspan;return-1==s&&(s=i),{class:["w-td",t+(s||1)==i&&"w-td-lastborder",this.provideInBody&&e.class,e.fixed&&{[`w-td-fixed-${e.fixed}`]:!0,"w-td-fixed-left-last":"left"===e.fixed&&this._provideTable.colgroup[t+1]&&this._provideTable.colgroup[t+1].fixed!=e.fixed,"w-td-fixed-right-first":"right"===e.fixed&&this._provideTable.colgroup[t-1]&&this._provideTable.colgroup[t-1].fixed!=e.fixed}],style:[this.provideInBody&&e.style,e.fixed&&{[`${e.fixed}`]:`var(--w-td-fixed-${e.fixed}-${t})`}],colspan:s,rowspan:this.rowspan,align:this.align||e.align,valign:this.valign||e.valign}}},render(){return a("td",this.td_props(),this.$slots)},__file:"src/widgets/TableTD.vue"},fi={name:"w-th",mixins:[mi,Te],props:["sortable","sortOrders","sortOrderDefault"],inject:["_provideThead"],emits:["click:sort"],data:()=>({sortType:null,sortOrder:null}),methods:{onClick(t){this.x.sortable&&this.clickSort(t,"toggle")},clickSort(t,e){t.stopPropagation();let i=this.sortOrder;this._provideThead.sortUID!=this.uid&&(i=null);let s=this.x.sortOrders||["asc","desc",null];if("toggle"===e){let t=s.indexOf(i);i=s[t<0||2==t?0:t+1]}else i=i==e?null:e;this.sortOrder=i,this._provideThead.sortUID=this.uid,t.value=i,this.$emit("click:sort",t,i)},html_slots(){return a($e,{class:"w-th-wrap",valign:"middle",align:this.align||this.col.align},{default:()=>[a("div",{class:"w-th-title"},this.$slots),this.x.sortable?a("div",{class:"w-th-sort f-flex-column f-flex-center f-oh"},[a("i",{class:"f-i f-i-caret-up f-oh w-th-sort-up",onClick:t=>this.clickSort(t,"asc")}),a("i",{class:"f-i f-i-caret-down f-oh w-th-sort-down",onClick:t=>this.clickSort(t,"desc")})]):[]]})}},computed:{col(){return this._provideTable.colgroup[this.$.vnode.dfishColIndex]||!1},tagName:()=>"th",html_props(){return r(this.td_props(),{class:{"z-sortable":this.x.sortable,[`z-${this.sortOrder}`]:this.sortOrder&&this._provideThead.sortUID==this.uid},onClick:this.onClick})}},__file:"src/widgets/TableTH.vue"};const xi={class:"'w-table-v2-th-text f-line-1"},gi={class:"w-tree-loading w-table-v2-loading"},vi=["onClick"],wi=["onClick"],bi=["title"],_i={class:"'w-table-v2-td-text f-line-1"},yi={name:"w-table-v2"};var ki=Object.assign(yi,{props:{alias:{type:Object,default:()=>({})},children:{type:Array,default:()=>[]},current:{type:[String,Number,Array]},itemHeight:{type:[String,Number],default:40},src:{type:Function},columns:{type:Array,default:()=>[]},loading:{type:Boolean}},emits:["click:item"],setup(t,{expose:e,emit:i}){const s=i,l=t;let{alias:r,itemHeight:a,current:h}=l;const b=r.value||"id";r.text;const _=r.children||"children",S=r.class||"class",C=Symbol("leaf"),M=z(0),V=z(0),$=z([]),A=z(),I=z(),N=z(),Y=z(!1),B=T(()=>l.loading||Y.value);y("provideTripleboxContainer",D());const O=T(()=>({height:$.value.length*a+"px"})),j=(t,e)=>{const i={};return t.width&&"*"!=t.width?i.width=It.unitSize(t.width):i.flex=1,t.minWidth&&(i.minWidth=It.unitSize(t.minWidth)),i},q=t=>"function"==typeof S?S(t):t[S],R=t=>({height:`${a}px`,top:t[C].showIndex*a+"px"}),W=t=>({paddingLeft:16*t[C].level+"px"}),U=t=>Q(t)?t.expanded?t.expandedIcon:t.collapsedIcon:t.icon,X=t=>t[C].loading,Q=t=>t[_]&&t[_].length||t[C].src&&!t[C].loaded,J=t=>Array.isArray(l.current)?l.current.includes(t[b]):l.current===t[b];let G,K=!0;const Z=async(t,e)=>{if("string"==typeof t&&(t=lt(t)),!t)return;const i=t[C];if(!i.loading)if(t.expanded=null!=e?e:!t.expanded,t.expanded)if(t[_]){const e=$.value.indexOf(t),i=it(t[_],t),s=$.value.slice(0,e+1),l=$.value.slice(e+1);$.value=s.concat(i,l)}else i.src&&!i.loaded&&(i.loading=!0,await i.src().catch(()=>{}),i.loading=!1,i.loaded=!0,Z(t,t.expanded));else{const e=$.value.indexOf(t),i=st(t[_]),s=$.value.slice(0,e+1),l=$.value.slice(e+1+i);$.value=s.concat(l)}},tt=t=>{V.value!==t.target.scrollTop&&(V.value=t.target.scrollTop)},et=()=>{nt()},it=(t,e)=>{let i=[];return t&&t.forEach(t=>{i.push(t);const s=t[C];s||(t[C]={level:e?e[C].level+1:0,parent:e,src:l.src&&l.src(t)}),t[_]&&t[_].length?t.expanded?i=i.concat(it(t[_],t)):s||it(t[_],t):t.expanded&&t[C].src&&o(()=>Z(t,!0))}),i},st=t=>{let e=0;for(let i of t)e++,i[_]&&i.expanded&&(e+=st(i[_]));return e},lt=(t,e)=>{e||(e=l.children);for(let i of e){if(i[b]===t)return i;if(i[_]&&i[_].length){const e=lt(t,i[_]);if(e)return e}}},rt=t=>{const e=lt(t);if(e){let t=e,i=t;for(;t=t[C].parent;)t.expanded||(t.expanded=!0,i=t);i&&i!=e&&Z(i,!0)}return e},at=(t,e)=>{for(let i of t){let t=e.find(t=>t[b]===i[b]);t&&(t[_]&&(i[_]?at(i[_],t[_]):i[_]=t[_]),null!=t.expanded&&(i.expanded=t.expanded))}},ot=T(()=>{const t=Math.floor(V.value/a),e=$.value.slice(t,t+M.value).map((e,i)=>(e[C].showIndex=i+t,e));return e}),nt=()=>{N.value=I.value.el("wScrollOverflow").getBoundingClientRect(),M.value=Math.ceil(N.value.height/a)+1},ht=async t=>{ot.value.find(e=>t===e[b])||rt(t);const e=ot.value.findIndex(e=>t===e[b]);if(-1===e||e===ot.value.length-1){const e=lt(t),i=$.value.indexOf(e);i>-1&&(await o(),A.value.scrollToY((i+1)*a-N.value.height/2))}},ct=async t=>{if(await o(),h=t,(t=t&&It.arrayID(t))&&t.length){for(let e of t)ot.value.find(t=>e===t[b])||rt(e);K&&ht(t[0])}};return E(async()=>{if(L(()=>I.value.wScrollSizeY,t=>{nt()},{immediate:!0}),L(()=>l.children,t=>{$.value=it(t),h&&h==l.current&&ct(l.current)},{immediate:!0}),L(()=>l.current,ct,{deep:!0}),!l.children||0==l.children.length){const t=l.src&&l.src();t&&(Y.value=!0,await t().catch(()=>{}),Y.value=!1)}}),e({toggle:Z,focus:ht,find:lt,merge:t=>{if(!Array.isArray(t))return[];const e=JSON.parse(JSON.stringify(l.children));at(t,e),l.children.length=0,l.children.push.apply(l.children,t),$.value=it(t)}}),(e,i)=>{const l=n("w-horizontal"),r=n("w-img"),o=n("w-vertical");return u(),c(o,{ref_key:"root",ref:A,class:"w-table-v2"},{default:d(()=>[x(l,{class:"w-table-v2-thead",style:H({height:`${F(a)}px`})},{default:d(()=>[(u(!0),p(f,null,g(t.columns,(t,e)=>(u(),p("div",{class:P(["w-table-v2-th",{[`z-align-${t.align}`]:t.align}]),style:H(j(t)),key:e},[m("div",xi,v(t.text),1)],6))),128))]),_:1},8,["style"]),x(o,{ref_key:"wrap",ref:I,height:"*",class:"w-table-v2-tbody","scroll-y":!0,onScroll:tt,onResize:et},{default:d(()=>[B.value?k(e.$slots,"loading",{key:0},()=>[m("div",gi,[x(r,{src:"#f-svg-loading-1",width:"28",height:"28"})])]):(u(),p("div",{key:1,class:"w-table-v2-wrap",style:H(O.value)},[(u(!0),p(f,null,g(ot.value,(i,l)=>(u(),p("div",{key:l,class:P(["w-table-v2-tr",q(i),{"z-on":J(i)}]),style:H(R(i)),onClick:t=>((t,e)=>{K=!1,clearTimeout(G),G=setTimeout(()=>K=!0,500),s("click:item",t,e)})(t,i)},[(u(!0),p(f,null,g(t.columns,(t,s)=>(u(),p("div",{key:s,class:P(["w-table-v2-td",{[`z-align-${t.align}`]:t.align}]),style:H(j(t))},["leaf"==t.type?(u(),p("div",{key:0,class:P(["w-leaf",{"z-folder":Q(i)}]),style:H(W(i))},[X(i)?(u(),c(r,{key:0,src:"#f-svg-loading",class:"w-leaf-loading"})):(u(),p("div",{key:1,class:P(["w-leaf-toggle f-i",i.expanded?"f-i-caret-down":"f-i-caret-right"]),onClick:t=>((t,e)=>{t.stopPropagation(),Z(e)})(t,i)},null,10,wi)),U(i)?(u(),c(r,{key:2,src:U(i),class:"w-leaf-icon"},null,8,["src"])):w("v-if",!0),m("div",{class:"w-leaf-text f-line-1",title:i[t.field]},v(i[t.field]),9,bi)],6)):k(e.$slots,t.field,{key:1,item:i,rowIndex:l,column:t,colIndex:s},()=>[m("div",_i,v(i[t.field]),1)])],6))),128))],14,vi))),128))],4))]),_:3},512)]),_:3},512)}}});ki.__file="src/widgets/TableV2.vue";var Si={name:"w-grid",mixins:[Pe],props:["columns","rows","gap","defaultColspan","face","labelWidth"],methods:{x_default:()=>({columns:12,gap:0,face:"normal"}),html_slots(){return this.x.scrollX||this.x.scrollY?this.html_scroll_slots():a("div",{class:"w-grid-cont",style:this.html_scroll_cont_style},this.$slots)}},computed:{html_props(){return{class:[this.x.rows?"z-full":"z-auto",this.x.face&&"z-face-"+this.x.face,this.html_scroll_class],style:{"--important-label-width":It.unitSize(this.x.labelWidth)}}},html_scroll_cont_style(){let t=this.x.columns;It.isNumber(t)&&(t=`repeat(${t}, 1fr)`);let e=this.x.rows;It.isNumber(e)&&(e=`repeat(${e}, 1fr)`);let i=this.x.defaultColspan;return{"grid-template-columns":t,"grid-template-rows":e,"grid-gap":"var(--w-grid-gap)","--w-grid-gap":this.x.gap?It.unitSize(this.x.gap):"","--w-grid-colspan":-1!=i&&i?`span ${i}`:""}}},__file:"src/widgets/Grid.vue"},Ti={name:"w-swiper-item",pubParentName:"w-swiper",inject:["providePubParent"],mixins:[Te],props:["lazy"],data:()=>({loaded:!1}),methods:{x_default:()=>({lazy:!0}),html_slots(){return this.loaded||!this.lazy?this.$slots:this.isCurrent?(this.loaded=!0,this.$slots):void 0}},computed:{html_class(){return{"z-on":this.isCurrent}},isCurrent(){return this.pubParent.inCurrent(this)}},__file:"src/widgets/SwiperItem.vue"},Ci={name:"w-swiper",mixins:[Te,hi],props:["arrow","indicatorDots","duration"],data:()=>({focusIndex:null}),watch:{current(t){this.setFocus(t)}},methods:{setFocus(t){let e=this.slots_children().findIndex(e=>this.isCurrentChild(t,e));this.focusIndex=e},getCurrentItem(){if(this.el()){let t=It.q(">.w-swiper-cont>.w-swiper-item",this.el())[this.focusIndex];return t&&It(t)}},clickArrow(t){this.focusIndex+=t},clickIndicator(t){this.focusIndex=t},html_slots(){null==this.focusIndex&&this.setFocus(this.x.current);let t=this.x.vertical,e=t?"up":"left",i=t?"down":"right";return[a("div",{class:"w-swiper-cont",id:this.uid+"cont"},this.$slots),this.x.arrow&&a("div",{class:"w-swiper-arrow z-"+e,onclick:t=>this.clickArrow(-1)},a("i",{class:"f-i f-i-angle-"+e})),this.x.arrow&&a("div",{class:"w-swiper-arrow z-"+i,onclick:t=>this.clickArrow(1)},a("i",{class:"f-i f-i-angle-"+i})),this.x.indicatorDots&&a("div",{class:"w-swiper-indicator f-flex-center"},this.slots_children().map((t,e)=>a("div",{class:"w-swiper-indicator-dot"+(e==this.focusIndex?" z-on":""),onclick:t=>this.clickIndicator(e)})))]}},computed:{html_class(){let t=this.focusIndex;return{"z-at-first":0==t,"z-at-last":t>-1&&t==this.slots_children().length-1}},html_style(){return{"--w-swiper-translate-x":100*-this.focusIndex+"%","--w-swiper-transition":this.x.duration?`left ${this.x.duration}ms`:0}}},mounted(){this.el("cont")&&new MutationObserver(()=>{this.setFocus(this.x.current)}).observe(this.el("cont"),{childList:!0})},__file:"src/widgets/Swiper.vue"},Mi={name:"w-buttonbar",mixins:[$e,hi],props:["vertical"],emits:["click:item"],methods:{x_default(){return{gap:0,valign:this.vertical?null:"middle"}},html_slots(){let t=this.slots_children().concat(),e=this.$slots.split;if(e)for(let i=s.length-1;i>0;i--)t.splice(i,0,e);return this.html_scroll_slots(t)}},computed:{dir(){return this.x.vertical?"v":"h"},html_class(){return[this.x.vertical?"w-vertical":"w-horizontal"]}},__file:"src/widgets/ButtonBar.vue"},Pi={name:"w-tabbar",mixins:[Mi],props:["vertical","arrow","quickCloseButton","flexSize","buttons"],emits:["click:item","click:quickCloseButton"],data:()=>({resizeObserver:1,isMouseEnter:!1,runButtonFlexWidth:null,runArrow:!1,isClickCloseLastChild:!1}),methods:{onScrollResize(t){this.resizeObserver++},clickArrow(t){this.scrollToX("left"+240*t,240)},closeAll(t){this.$emit("click:quickCloseButton","closeAll")},onMouseenter(t){this.isMouseEnter=!0,this.x.flexSize&&(this.runButtonFlexWidth=this.buttonFlexWidth)},onMouseleave(t){t&&this.hasBubble(t.relatedTarget)||(this.isMouseEnter=!1,this.x.flexSize&&(this.runButtonFlexWidth=null))},onBeforeEnter(t){this.fixQuickCloseButton&&this.el().setAttribute("w-tabbar-fixed-quickclosebutton","")},onAfterEnter(t){this.fixQuickCloseButton&&(this.el().removeAttribute("w-tabbar-fixed-quickclosebutton"),this.resizeObserver++);const e=It(t);e&&e.vis&&e.vis()},onBeforeLeave(t){t.nextElementSibling||(this.isClickCloseLastChild=!0,this.fixQuickCloseButton&&this.el().setAttribute("w-tabbar-fixed-quickclosebutton",""),this.isMouseEnter&&this.x.flexSize&&(this.runButtonFlexWidth=null))},onAfterLeave(t){this.isClickCloseLastChild&&(this.isClickCloseLastChild=!1,this.fixQuickCloseButton&&this.el().removeAttribute("w-tabbar-fixed-quickclosebutton"),this.isMouseEnter&&this.x.flexSize&&(this.runButtonFlexWidth=this.buttonFlexWidth))},html_slots(){let t=a(I,{name:"w-tabbar",onBeforeEnter:this.onBeforeEnter,onAfterEnter:this.onAfterEnter,onBeforeLeave:this.onBeforeLeave,onAfterLeave:this.onAfterLeave},{default:()=>this.buttons}),e=[a(this.x.vertical?ze:$e,{ref:"gut",width:"*",class:"w-tabbar-gut",gap:this.x.gap,align:this.x.align,valign:this.x.valign},{default:()=>t})];if(this.$slots.append&&e.push(a("div",{ref:"append",class:"w-tabbar-append"},this.slot("append"))),this.x.arrow&&(e.unshift(a("div",{class:"w-tabbar-arrow-start",onClick:()=>this.clickArrow(-1)},a("i",{class:"f-i f-i-caret-left"}))),e.push(a("div",{class:"w-tabbar-arrow-end",onClick:()=>this.clickArrow(1)},a("i",{class:"f-i f-i-caret-right"})))),this.x.quickCloseButton){let t=!this.buttons.find(t=>t.props.closable);this.buttons.length&&e.push(a(ti,{ref:"quickCloseButton",data:{isQuickCloseButton:!0},showArrowIcon:!1,icon:".f-i .f-i-close",class:"w-tabbar-quickclosebutton",onClick:this.closeAll,disabled:t,title:"关闭全部标签"}))}return this.html_scroll_slots(e)}},computed:{hasScrollX(){return this.x.arrow&&"h"===this.dir||this.x.scrollX},showArrow(){if(this.x.arrow){if(this.x.flexSize){let t=this.buttonCalcWidth;return t&&t<this.x.flexSize[0]}return this.wScrollPercentX}},fixQuickCloseButton(){if(this.x.quickCloseButton&&this.x.flexSize){let t=this.buttonCalcWidth;return t&&t<this.x.flexSize[1]}},gutWidth(){const t=this.x.arrow&&this.wScrollPercentX;if(this.resizeObserver&&this.el()){let e=this.el().clientWidth;return t&&(e-=40),this.x.quickCloseButton&&(e-=20),this.$refs.append&&(e-=this.$refs.append.offsetWidth),e}},buttonCalcWidth(){if(this.x.flexSize){let t,e=this.buttons.length,i=this.gutWidth;return i&&e&&(t=i/e),t}},buttonFlexWidth(){if(this.x.flexSize){let t=this.x.flexSize[0],e=this.x.flexSize[1],i=e;return this.buttonCalcWidth&&(i=It.numRange(this.buttonCalcWidth,t,e)),i+1}},html_props_on(){return{onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave}},html_class(){return[this.x.vertical?"w-vertical":"w-horizontal",{"z-arrow":this.x.arrow,"z-quickclosebutton":this.x.quickCloseButton,"z-flexsize":this.x.flexSize,"z-show-arrow":this.showArrow}]},html_style(){const t={};return this.x.flexSize&&(t["--w-tabbar-flex-width"]=`${this.runButtonFlexWidth||this.buttonFlexWidth}px`),t}},mounted(){if(this.x.flexSize&&this.$refs.gut){new ResizeObserver(()=>this.resizeObserver++).observe(this.$refs.gut.el());let t=this.$watch(()=>this.buttons.length,e=>{e&&this.$nextTick(()=>{t(),setTimeout(()=>{const t=this.el();t&&t.setAttribute("w-tabbar-flex-all","")},150)})},{immediate:!0})}},__file:"src/widgets/TabBar.vue"},Vi={name:"w-tabbutton",pubParentName:"w-tabbar",mixins:[ti],methods:{vis(){let t=[20,20];this.pubParent.x.quickCloseButton&&(t[1]+=20),this.scrollIntoView({x:`nearest${t}`,y:null})}},computed:{html_class:()=>"w-button"},mounted(){this.$watch("isCurrent",t=>t&&this.vis(),{immediate:!0})},__file:"src/widgets/TabButton.vue"},$i={name:"w-tabs",mixins:[Te],props:["current","position","gap","face","quickCloseButton","flexSize"],emits:["click:quickCloseButton"],methods:{x_default:()=>({position:"top",face:"line",gap:-1}),clickTab(t){const e=It(t);!e.data||e.data.isQuickCloseButton},clickQuickCloseButton(t){this.$emit("click:quickCloseButton",t)},html_slots(){let t=[],e=[],i=this.x.position;return this.slots_children().forEach((i,s)=>{i.props&&null!=i.props.key||It.lodash.set(i,"props.key",s),t.push(a(Vi,i.props)),e.push(a(Ti,{lazy:null==i.props.lazy||i.props.lazy,key:i.props.key},i.children))}),[a(Pi,{ref:"tabBar",class:"w-tabs-buttonbar",current:this.x.current,gap:this.x.gap,vertical:"left"==i||"right"==i,arrow:!0,flexSize:this.x.flexSize,quickCloseButton:this.x.quickCloseButton,"onClick:item":this.clickTab,"onClick:quickCloseButton":this.clickQuickCloseButton,buttons:t},this.$slots),a(Ci,{class:"w-tabs-swiper f-flex-1 f-oh",current:this.x.current},{default:()=>e})]}},computed:{tabBar(){return this.$refs.tabBar},html_class(){let t=this.x.position;return"f-oh f-flex"+("top"==t||"bottom"==t?"-column":"")+" z-pos-"+t+" z-face-"+this.x.face}},__file:"src/widgets/Tabs.vue"},zi={name:"w-tab",__file:"src/widgets/Tab.vue"},Di={name:"w-album",mixins:[$e,hi],methods:{x_default:()=>({gap:0,br:!0,valign:"top"})},computed:{html_class:()=>"w-horizontal"},__file:"src/widgets/Album.vue"},Ei={name:"w-html",mixins:[Te,Ve],props:["line"],computed:{html_props(){let t=this.x.line;return{class:[(this.x.align||this.x.valign)&&"w-horizontal",null!=t&&"f-line",this.html_align_class],style:null!=t&&{"-webkit-line-clamp":t}}}},__file:"src/widgets/Html.vue"},Li={name:"w-tree",mixins:[Pe,hi,Qt],emits:["click:item"],provide(){return{provideLevel:-1,provideParentLeaf:null,provideParentTR:null,provideTripleboxContainer:this}},methods:{load(){return this.request()},getCurrent(){const t=It.q(".w-leaf.z-on",this.el())[0];return t&&It(t)},viewCurrent(t){this.$nextTick(()=>{(t=t||this.getCurrent())&&(t.expandToView(),this.$nextTick(()=>t.scrollIntoView()))})},html_slots(){let t;if(this.loading){const e=this.slot("loading");t=e&&e.length?e:a("div",{class:"w-tree-loading"},a(Ge,{src:"#f-svg-loading-1",width:28,height:28}))}else{let e=this.x.children;this.$slots.default&&(t=Array.isArray(e)?e.map((t,e)=>{let i;const s=this.$slots.default({item:t,index:e});for(let t of s)i||(i=t.key);return i?a(ci,{key:i},{default:()=>s}):s}):[])}return this.html_scroll_slots(t)}},computed:{level:()=>-1,html_props(){return{class:this.html_scroll_class}}},mounted(){this.x.children&&this.x.children.length||this.request()},__file:"src/widgets/Tree.vue"};const Ai={class:"w-tree-loading w-tree-v2-loading"},Hi=["onClick"],Fi=["onClick"],Ii={class:"w-leaf-text f-line-1"},Ni=["title"],Yi={name:"w-tree-v2"};var Bi=Object.assign(Yi,{props:{alias:{type:Object,default:()=>({})},children:{type:Array,default:()=>[]},current:{type:[String,Number,Array]},itemHeight:{type:[String,Number],default:32},src:{type:Function},loading:{type:Boolean}},emits:["click:item"],setup(t,{expose:e,emit:i}){const s=i,l=t;let{alias:r,itemHeight:a,current:h}=l;const b=r.value||"id",_=r.text||"text",S=r.children||"children",C=r.class||"class",M=r.disabled||"disabled",V=Symbol("leaf"),$=z(0),A=z(0),I=z([]),N=z(),Y=z(),B=z(!1),O=T(()=>l.loading||B.value);y("provideTripleboxContainer",D);const j=T(()=>({height:I.value.length*a+"px"})),q=(t,e)=>"function"==typeof C?C(t,e):t[C],R=t=>({height:`${a}px`,top:t[V].showIndex*a+"px",paddingLeft:16*t[V].level+"px"}),W=t=>X(t)?t.expanded?t.expandedIcon:t.collapsedIcon:t.icon,U=t=>t[V].loading,X=t=>t[S]&&t[S].length||t[V].src&&!t[V].loaded,Q=t=>Array.isArray(l.current)?l.current.includes(t[b]):l.current===t[b],J=(t,e)=>"function"==typeof M?M(t,e):t[M];let G,K=!0;const Z=async(t,e)=>{if("string"==typeof t&&(t=lt(t)),!t)return;const i=t[V];if(!i.loading)if(t.expanded=null!=e?e:!t.expanded,t.expanded)if(t[S]){const e=I.value.indexOf(t),i=it(t[S],t),s=I.value.slice(0,e+1),l=I.value.slice(e+1);I.value=s.concat(i,l)}else i.src&&!i.loaded&&(i.loading=!0,await i.src().catch(()=>{}),i.loading=!1,i.loaded=!0,Z(t,t.expanded));else{const e=I.value.indexOf(t),i=st(t[S]),s=I.value.slice(0,e+1),l=I.value.slice(e+1+i);I.value=s.concat(l)}},tt=t=>{A.value!==t.target.scrollTop&&(A.value=t.target.scrollTop)},et=()=>{nt()},it=(t,e)=>{let i=[];return t&&t.forEach(t=>{i.push(t);const s=t[V];s||(t[V]={level:e?e[V].level+1:0,parent:e,src:l.src&&l.src(t)}),t[S]&&t[S].length?t.expanded?i=i.concat(it(t[S],t)):s||it(t[S],t):t.expanded&&t[V].src&&o(()=>Z(t,!0))}),i},st=t=>{let e=0;for(let i of t)e++,i[S]&&i.expanded&&(e+=st(i[S]));return e},lt=(t,e)=>{if(t&&t[V])return t;e||(e=l.children);for(let i of e){if(i[b]===t)return i;if(i[S]&&i[S].length){const e=lt(t,i[S]);if(e)return e}}},rt=t=>{const e=lt(t);if(e){let t=e,i=t;for(;t=t[V].parent;)t.expanded||(t.expanded=!0,i=t);i&&i!=e&&Z(i,!0)}return e},at=(t,e)=>{for(let i of t){let t=e.find(t=>t[b]===i[b]);t&&(t[S]&&(i[S]?at(i[S],t[S]):i[S]=t[S]),null!=t.expanded&&(i.expanded=t.expanded))}},ot=T(()=>{const t=Math.floor(A.value/a),e=I.value.slice(t,t+$.value).map((e,i)=>(e[V].showIndex=i+t,e));return e}),nt=()=>{Y.value=N.value.el("wScrollOverflow").getBoundingClientRect(),$.value=Math.ceil(Y.value.height/a)+1},ht=async t=>{await o(),ot.value.find(e=>t===e[b])||rt(t);const e=ot.value.findIndex(e=>t===e[b]);if(-1===e||e===ot.value.length-1){const e=lt(t),i=I.value.indexOf(e);i>-1&&(await o(),N.value.scrollToY((i+1)*a-Y.value.height/2))}},ct=async t=>{if(await o(),h=t,(t=t&&It.arrayID(t))&&t.length){for(let e of t)ot.value.find(t=>e===t[b])||rt(e);K&&ht(t[0])}};return E(async()=>{if(L(()=>N.value.wScrollSizeY,t=>{nt()},{immediate:!0}),L(()=>l.children,t=>{I.value=it(t),h&&h==l.current&&ct(l.current)},{immediate:!0}),L(()=>l.current,ct,{deep:!0}),!l.children||0==l.children.length){const t=l.src&&l.src();t&&(B.value=!0,await t().catch(()=>{}),B.value=!1)}}),e({toggle:Z,focus:ht,find:lt,merge:t=>{if(!Array.isArray(t))return[];const e=JSON.parse(JSON.stringify(l.children));at(t,e),l.children.length=0,l.children.push.apply(l.children,t),I.value=it(t)}}),(t,e)=>{const i=n("w-img"),l=n("w-vertical");return u(),c(l,{ref_key:"root",ref:N,class:"w-tree w-tree-v2","scroll-y":!0,onScroll:tt,onResize:et},{default:d(()=>[O.value?k(t.$slots,"loading",{key:0},()=>[m("div",Ai,[x(i,{src:"#f-svg-loading-1",width:"28",height:"28"})])]):(u(),p("div",{key:1,class:"w-tree-v2-wrap",style:H(j.value)},[(u(!0),p(f,null,g(ot.value,(e,l)=>(u(),p("div",{key:l,class:P(["w-leaf w-leaf-v2",q(e,l),{"z-folder":X(e),"z-on":Q(e),"z-ds":J(e,l)}]),style:H(R(e)),onClick:t=>((t,e)=>{J(e)||(K=!1,clearTimeout(G),G=setTimeout(()=>K=!0,500),s("click:item",t,e))})(t,e)},[U(e)?(u(),c(i,{key:0,src:"#f-svg-loading",class:"w-leaf-loading"})):(u(),p("div",{key:1,class:P(["w-leaf-toggle f-i",e.expanded?"f-i-caret-down":"f-i-caret-right"]),onClick:t=>((t,e)=>{t.stopPropagation(),Z(e)})(t,e)},null,10,Fi)),k(t.$slots,"box",{item:e}),W(e)?(u(),c(i,{key:2,src:W(e),class:"w-leaf-icon"},null,8,["src"])):w("v-if",!0),m("div",Ii,[k(t.$slots,"text",{item:e},()=>[m("span",{title:e[F(_)]},v(e[F(_)]),9,Ni)])])],14,Hi))),128))],4))]),_:3},512)}}});Bi.__file="src/widgets/TreeV2.vue";var Oi={name:"w-label",mixins:[Te,Ve],props:["text","suffix","vertical"],methods:{html_slots(){return a("label",{class:"w-label-text"},a("span",this.$slots.default?this.$slots.default():this.x.text+(null==this.x.suffix?"":this.x.suffix)))}},computed:{html_class(){return this.x.vertical&&(this.$parent.labelVertical=!0),["f-oh f-br"+(this.x.vertical?" z-vertical":""),this.html_align_class]},html_style(){return{width:null,"--label-width":this.x.width&&It.unitSize(this.x.width)}}},__file:"src/widgets/Label.vue"},ji={mixins:[Te,Ve],props:["name","value","modelValue","placeholder","label","readonly","readonlyValidate","disabled","required","validateDefault","validateHandler","inputWidth","inputHeight"],emits:["update:modelValue","change","blur","focus"],data(){let t=this.modelValue;return{isFormWidget:!0,isFocus:!1,hasBorder:!1,isPlural:!1,isEdit:!1,loading:!1,warnClass:"",labelVertical:!1,modifiedValue:t,defaultValue:t,placeholder_type:"",validIndex:0}},watch:{modelValue(t,e){this.isEdit?this.isEdit=!1:(null==t&&(t=""),null==e&&(e=""),this.watchModelValue(t,e))}},methods:{val(t,e){if(0==arguments.length)return this.x.modelValue;let i=this.x.modelValue;this.x.modelValue=t,null==i&&(i=""),null==t&&(t="");let s=i!==t;if("object"==typeof i&&(s=JSON.stringify(i)!=JSON.stringify(t)),s&&(this.warnClass&&this.warn(!1),this.isUsableVal(t))){this.isEdit=!0,this.$emit("update:modelValue",t);const i=this.createEvent("change",{originalEvent:e});this.trigger(i,t)}return t},formVal(){return this.input_value},isUsableVal:t=>!0,defaultRuleValue(t){let e=this.rules[t];if(null!=e)return Array.isArray(e)&&(e=e[0]),e&&e.value?e.value:e},watchModelValue(t,e){e!=t&&this.trigger("change",t)},async valid(t){let e=await this.getValidError(t);return e&&(this.warn(),this.showErrorTip(e.text)),!e},async getValidError(t,e){let i=t?this.validTriggers[t]:this.validQueues;if(i&&(this.isNormal||this.isReadonly&&this.x.readonlyValidate)){let t=void 0!==e?e:this.isPlural?this.groupFormVal():this.formVal();"string"!=typeof t&&(t=Array.isArray(t)?t.join(","):null==t?"":""+t),t=t.trim();let s=this.validHooks;for(let e of i){let i="object"!=typeof e.rule?e.rule:void 0!==e.rule.value?e.rule.value:e.rule,l=await s[e.type](t,i,e);if(l)return l}}},getValidErrorSync(t,e){let i=t?this.validTriggers[t]:this.validQueues;if(i&&(this.isNormal||this.isReadonly&&this.x.readonlyValidate)){let s=void 0!==e?e:this.isPlural?this.groupFormVal():this.formVal();"string"!=typeof s&&(s=Array.isArray(s)?s.join(","):null==s?"":""+s),s=s.trim();let l=this.validHooks;for(let e of i){let i="object"!=typeof e.rule?e.rule:void 0!==e.rule.value?e.rule.value:e.rule;if(!e.rule||e.rule.trigger==t){let t=l[e.type](s,i,e);if(t&&!(t instanceof Promise))return t}}}},formErr(t,e){let i=this.getLabelText(),s=t.type,l=t.rule&&t.rule.text;return l||(l=It.loc.ps.apply(null,[It.loc.form[s],i||""].concat(null!=e&&""!==e?e:[]))||""),{wid:this.uid,name:this.x.name,type:s,label:i,text:l}},warn(t){let e="string"==typeof t?t:!1!==t?"z-err":"";this.warnClass=e,!e&&this._tip&&this._tip.close()},showErrorTip(t){this.scrollIntoView({ease:200,success:()=>{this.pop("w-tip",{text:t,face:"warn",independent:!0,snap:this.errorTipTarget,onClose:()=>this._tip=null},t=>{this._tip=t})}})},focus(){return this.$refs.v.focus(),this},formText(){let t=this.val();return null==t?"":t},getLabelText(){let t=this.x.label||this.pubParent&&this.pubParent.x.label;return t?t.text||t:""},onCloseDrop(){this.showDrop=!1},mergeDropProps(t){return this.x.dropProps&&(t=r(t,this.x.dropProps)),t.onClose=()=>{this.onCloseDrop(),this.x.dropProps&&this.x.dropProps.onClose&&this.x.dropProps.onClose()},t},oninput(t){this.val(t.target.value),this.baseValid("change")},baseFocus(t){this.isFocus=!0,this.warn(!1),this.trigger(t),this.baseValid("focus")},baseBlur(t){this.isFocusTarget(t.relatedTarget)||(this.isFocus=!1),this.trigger(t),this.baseValid("blur")},baseValid(t){this.validTriggers[t]&&(clearTimeout(this._baseValidTimer),this._baseValidTimer=setTimeout(()=>{if(!this.$.isUnmounted&&!this.$.isDeactivated){(new Date).getTime()-Qe.time>100&&this.valid(t)}},100))},snapElem(){return this.el("form")},hasBubble(t){return this.snapElem().contains(t.isWidget?t.el():t)},isFocusTarget(t){},getInputValue:t=>t,isModified(t){let e=t?this.defaultValue:this.modifiedValue,i=this.x.modelValue;return null==e&&(e=""),null==i&&(i=""),e!=i&&this.getInputValue(e)!=this.getInputValue(i)},saveModified(t){this.modifiedValue=It.lodash.clone(this.x.modelValue),t&&(this.defaultValue=this.modifiedValue)},reset(t){this.warn(!1),this.val(t||null==this.defaultValue?"":this.defaultValue)},html_label(){if(this.$slots.label)return this.$slots.label();if(this.x.label&&"object"==typeof this.x.label){const t=It.cloneDeep(this.x.label);if(null==t.width&&delete t.width,0!=t.width)return a(Oi,t)}},html_input(){return a(this.input_tag,{class:"w-input-value",ref:"v",id:this.uid+"v",type:this.input_type,name:this.input_name,value:this.input_value,readonly:this.isReadonly,disabled:this.isDisabled,placeholder:this.input_placeholder,autocomplete:"off",oninput:this.oninput,onfocus:this.baseFocus,onblur:this.baseBlur,...this.input_prop})},html_input_hidden(){return this.x.name?a("input",{type:"hidden",ref:"v",name:this.input_name,value:this.input_value,disabled:this.isDisabled,class:"f-hide"}):[]},html_button:()=>[],html_form_slot(){return[this.slot("prepend"),this.html_input(),this.html_button(),this.slot("append")]},html_slot_down(){return this.slot("down")},html_main(){return a("div",{class:"w-formbase-main"},[this.html_form(),this.html_slot_down()])},html_form(){let t=this.x.inputHeight&&It.unitSize(this.x.inputHeight);return a("div",r({ref:"form",id:this.uid+"form",class:["w-input",{"w-input-border":this.hasBorder,[`f-${this.dir}-gap`]:It.br.compat.gap&&this.x.gap}],style:{height:t},title:this.input_title},this.form_prop),this.html_form_slot())},html_slots(){return[this.html_label(),this.html_main(),this.slot("right")]}},computed:{rules(){return this.x},pubValidHooks(){return{required:(t,e,i)=>{if(e&&!t)return this.formErr(i)},pattern:(t,e,i)=>{if(t&&e&&("string"==typeof e?!It.eval(`${e}.test(v)`,{rule:e,v:t}):e.test&&!e.test(t)))return this.formErr(i)},validateHandler:async(t,e,i)=>{let s=e&&e(t);if(s){let t=await s;if(t)return this.formErr({type:"validateHandler",rule:{text:t}})}}}},validHooks(){return this.pubValidHooks},validQueues(){let t=[],e="validateDefault";this.validHooks[e]&&t.push({type:e});for(let e in this.validHooks)if(!t.includes(e)){let i=this.rules[e];null!=i&&(Array.isArray(i)?i.forEach(i=>t.push({type:e,rule:i})):t.push({type:e,rule:i}))}return t},validTriggers(){let t={};return Object.keys(this.validHooks).forEach(e=>{let i=this.rules[e];if(i)if(Array.isArray(i))for(let s of i)s.trigger&&(t[s.trigger]||(t[s.trigger]=[])).push({type:e,rule:s});else i.trigger&&(t[i.trigger]||(t[i.trigger]=[])).push({type:e,rule:i})}),t},input_value(){return this.getInputValue(this.x.modelValue)},input_name(){return this.x.name},input_tag:()=>"input",input_type:()=>"text",input_title(){},input_prop(){},input_placeholder(){if(!this.isNormal)return;let t=this.x.placeholder;return null==t&&It.x.autoPlaceholder&&this.x.label&&(t=It.loc.ps(It.loc[this.placeholder_type||"placeholder_input"],this.x.label.text||this.x.label)),t},form_prop(){},hasVal(){return null!=this.x.modelValue&&""!==this.x.modelValue},isNormal(){return!this.isReadonly&&!this.isDisabled},isDisabled(){return!!this.x.disabled},isReadonly(){return!!this.x.readonly},errorTipTarget(){return this},hasClassSlotDown(){return!!this.$slots.down},html_on(){},html_props(){return this.x.inputWidth&&It.unitSize(this.x.inputWidth),{class:["w-formbase",this.warnClass,this.html_align_class,{"z-on":this.isFocus,"z-ds":!this.isNormal,"z-req":this.rules.required,"z-label-vertical":this.labelVertical,"z-slot-down":this.hasClassSlotDown}],...this.html_on}}},__file:"src/widgets/FormBase.vue"};const{leafSymbol:qi,changeSymbol:Ri}=It.symbol;var Wi={name:"w-checkbox",pubParentName:"w-checkboxgroup",mixins:[ji],props:["text","checked","partialSubmit","minSize","maxSize"],inject:["providePubParent","provideBoxParent"],emits:["change","update:checked","click"],data:()=>({isPlural:!0,indeterminate:!1,modifiedChecked:!1,defaultChecked:!1}),created(){this.provideBoxParent&&(this.provideBoxParent.boxProxy=this),this.defaultChecked=this.isChecked,this.modifiedChecked=this.isChecked},methods:{val(t,e){if(0==arguments.length)return this.getVal();const i=this.createEvent("change",{target:this.$refs.v,originalEvent:e});this.setVal(t,i)},getVal(){return this.isChecked?this.value:""},setVal(t,e){this.pubParent;let i=this.checkValue,s="radio"===this.input_type,l=this.x.modelValue;l=s?t?It.string(i):"":t?It.idsAdd(l,i):It.idsRemove(l,i),this.x.modelValue=l,s&&this.siblings().forEach(t=>t.x.modelValue=l),this.$emit("update:modelValue",l),this.trigger(e,l),this.parentTrigger(e,l)},formVal(){return!this.isDisabled&&this.isChecked?this.x.value:""},groupFormVal(t){if(null==t){let t=[];return It.lodash.each(this.siblings(null,!0),e=>{let i=e.formVal();null!=i&&""!==i&&t.push(i)}),t.join(",")}Array.isArray(t)&&(t=t.join(",")),It.lodash.each(this.siblings(),e=>e.val(It.idsAny(t,e.checkValue)))},watchModelValue(t,e){e!=t&&this.parentTrigger("change",t)},getInputValue:t=>null==t?"":t,parentTrigger(t,e){this.pubParent&&this.pubParent.watchValue!=e&&(this.pubParent.watchValue=e,this.pubParent.trigger(t,e))},check(t){this.isNormal&&this.val(t)},siblingsContainer(){return this.ownerView.el()},siblings(t,e){return It.lodash.map(It.q(':input[name="'+this.input_name+'"]:not([w-form-ignore] :input)'+(e?":not(:disabled)":"")+(!0===t?":checked":!1===t?":not(:checked)":t||""),this.siblingsContainer()),t=>It(t))},relate(){},reset(t){this.pubParent?this.pubParent.reset(t):this.val(!(t||!this.defaultChecked))},onclick(t){t.stopPropagation()},onbasechange(t){this.warnClass&&this.siblings().forEach(t=>t.warn&&t.warn(!1)),this.setVal(t.target.checked,t)},onchange(t){this.onbasechange(t)},isModified(t){return(t?this.defaultChecked:this.modifiedChecked)!=this.isChecked},saveModified(t){this.modifiedChecked=this.isChecked,t&&(this.defaultChecked=this.modifiedChecked)},snapElem(){return this.el()},html_input(){return[a(this.input_tag,{ref:"v",class:"w-input-value",type:this.input_type,name:this.input_name,value:this.input_value,checked:this.isChecked,disabled:this.isDisabled,onclick:t=>{this.isNormal?(this.indeterminate=!1,this.x.cancelable&&this.isChecked&&(t.preventDefault(),this.val(!1),setTimeout(()=>{this.$refs.v.checked=!1}))):t.preventDefault()},onchange:this.onchange,...this.input_prop}),a("em",{ref:"appear",class:this.$options.name+"-appear"},a("i",{class:this.input_icon})),this.$slots.text||this.x.text?a("span",{class:this.$options.name+"-text"},this.$slots.text?this.$slots.text():this.x.text):null]},html_main(){return a("label",{class:"w-input",onclick:this.onclick},this.html_input())},html_target(){return this.$slots.default?a($e,{class:this.$options.name+"-target",width:"*",ref:"target"},this.$slots):[]},html(){return this.$slots.default?[this.html_self(!0),this.html_target()]:this.html_self()}},computed:{validHooks(){return{...this.pubValidHooks,minSize:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&t.split(",").length<It.number(e))return this.formErr(i,[e])},maxSize:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&t.split(",").length>It.number(e))return this.formErr(i,[e])}}},rules(){return{required:null!=this.x.required?!!this.x.required:!(!this.pubParent||!this.pubParent.x.required),minSize:null!=this.x.minSize?this.x.minSize:this.pubParent&&this.pubParent.x.minSize,maxSize:null!=this.x.maxSize?this.x.maxSize:this.pubParent&&this.pubParent.x.maxSize}},input_type:()=>"checkbox",input_name(){return this.x.name||this.pubParent&&this.pubParent.x.name},input_value(){return null==this.x.value?"":this.x.value},isIndeterminate(){return this.data&&this.data[qi]?this.data[qi].indeterminate:this.indeterminate},input_prop(){return{indeterminate:this.isIndeterminate,"w-partialsubmit":this.x.partialSubmit?1:null,"w-all":this.x.all?"":null}},input_icon:()=>"f-i f-i-check",checkValue(){return this.x.value},isChecked(){return It.idsAny(this.x.modelValue,this.checkValue)},isDisabled(){return null!=this.x.disabled?!!this.x.disabled:this.pubParent&&this.pubParent.disabled},isReadonly(){return null!=this.x.readonly?!!this.x.readonly:this.pubParent&&this.pubParent.readonly},html_class(){return{"z-half":this.isIndeterminate,"z-target":!!this.$slots.default,"z-checked":this.isChecked}}},mounted(){this.$refs.target&&this.$watch(()=>this.x.modelValue,t=>{this.siblings().forEach(t=>{let e=t.$refs.target;e&&this.ownerView.fAll(null,e.$el).forEach(e=>e.x.disabled=!t.isChecked)})},{immediate:!0})},__file:"src/widgets/CheckBox.vue"};const{leafSymbol:Ui}=It.symbol;var Xi={name:"w-triplebox",mixins:[Wi],props:["all"],inject:["provideTripleboxContainer"],created(){if(this.provideBoxParent){if(this.data&&!this.data[Ui]){const t=this.provideBoxParent.provideParentLeaf,e=t&&t.boxProxy&&t.boxProxy.data,i=T(()=>{if(this.data.children&&this.data.children.length){let t,e;const i=this.x.modelValue;for(let s of this.data.children){if(!s[Ui])return!1;if(s[Ui].indeterminate)return!0;It.idsAny(i,s[Ui].checkValue)?t=!0:e=!0}return!(!t||!e)}return!1});this.data[Ui]={parent:e,checkValue:this.value,indeterminate:i}}}else this.$watch(()=>this.x.modelValue,(t,e)=>{(null!=t&&""!==t||null!=e&&""!==e)&&(this.x.all||this.relate())})},methods:{getVal(){let t=this.checkstate();return 1==t||this.x.partialSubmit&&2==t?this.value:""},checkDescendant(t,e,i){if(t.children)for(let s of t.children){const t=s[Ui];e=i?It.idsAdd(e,t.checkValue):It.idsRemove(e,t.checkValue),e=this.checkDescendant(s,e,i)}return e},checkAncestor(t,e){const i=t.children.find(t=>!It.idsAny(e,t[Ui].checkValue));return e=i?It.idsRemove(e,t[Ui].checkValue):It.idsAdd(e,t[Ui].checkValue),t[Ui].parent&&(e=this.checkAncestor(t[Ui].parent,e)),e},setVal(t,e){this.pubParent;let i=this.checkValue,s=this.x.modelValue;if(s=t?It.idsAdd(s,i):It.idsRemove(s,i),this.data){this.data.children&&(s=this.checkDescendant(this.data,s,t));const e=this.data[Ui];e.parent&&(s=this.checkAncestor(e.parent,s,t))}this.x.modelValue=s,this.$emit("update:modelValue",s),this.x.all||this.parentTrigger(e,this.groupFormVal())},formVal(){if(this.isDisabled)return"";let t=this.checkstate();return 1==t||this.x.partialSubmit&&2==t?this.$refs.v.value:""},siblingsContainer(){let t=this.provideTripleboxContainer;return t&&t.el()||this.ownerView.el()},parentTrigger(t,e){let i=this.provideTripleboxContainer,s=i&&i.el();e&&(e=e.split(",").sort().join(",")),s&&s.getAttribute("wTripleboxValue")!=e&&(s.setAttribute("wTripleboxValue",e),this.trigger(t,e))},onchange(t){this.onbasechange(t),this.relate()},checkstate(t){let e=this.indeterminate?2:this.isChecked?1:0;if(null==t)return e;this.val(1==t),this.indeterminate=2==t},isPartial(){return 2==this.checkstate()},relate(){if(this.x.name&&It.q(`[name="${this.x.name}"][w-all]`,It.el(this.ownerView))[0]){const n=this.ownerView.fAll(this.x.name);for(var t,e=0,i=this.isPartial(),s=n.length,l=s,r=0,a=0,o=0;e<s;e++)if(n[e].isNormal)if(this.x.all)if(this!=n[e]){if(i){this.checkstate(n[e].checkstate());break}n[e].checkstate(this.isChecked?1:0)}else 1==s&&(t=this);else n[e].x.all?t=n[e]:n[e].isChecked?a++:n[e].isPartial()?o++:r++;else l--;t&&(r+a+o||1==s)&&t.checkstate(r==l-1?0:a==l-1?1:2)}},check(t){if(!this.isNormal)return;this.checkstate()!=t&&(this.checkstate(t),this.relate())}},computed:{checkValue(){return this.x.all?"checked":this.x.value}},mounted(){},__file:"src/widgets/TripleBox.vue"},Qi={name:"w-leaf",pubParentName:"w-tree",mixins:[Te,Qt],props:["text","expanded","expandedIcon","collapsedIcon","icon","boxSync","src","disabled"],inject:["providePubParent","provideLevel","provideParentLeaf","provideParentTR"],emits:["click"],provide(){return{provideParentLeaf:this,provideLevel:this.provideLevel+1,provideBoxParent:this}},data(){return{hover:!1,loading:!1,loaded:this.getInitLoaded()}},methods:{hasChild(){let t=(this.x||this.$props).children;if(!0===t||Array.isArray(t)&&t.length)return!0},childrenList(){return It.lodash.map(this.$refs.cont.querySelectorAll(":scope > .w-leaf"),t=>It(t))},getInitLoaded(){return!(!this.hasChild()&&this.getSrc())},isExpanded(){return this.provideParentTR?this.provideParentTR.isExpanded():this.x.expanded},setExpanded(t){this.x.expanded=null!=t?t:!this.x.expanded},isFolder(){return!!this.hasChild()||!(!this.getSrc()||this.loaded)},toggle(t,e){(this.provideParentTR||this).setExpanded(t),this.isExpanded()&&!this.loaded?this.request(e):e&&this.$nextTick(e)},onmouseenter(t){!this.x.disabled&&this.el().classList.add("z-hv")},onmouseleave(t){this.el().classList.remove("z-hv")},onclick(t){this.x.disabled||(this.boxProxy&&this.x.boxSync&&this.boxProxy.check(!this.boxProxy.isChecked),this.$emit("click",t))},triple(){if(!this.boxProxy||"w-triplebox"!==this.boxProxy.$options.name)return;let t=this;for(;(t=t.provideParentLeaf)&&"w-leaf"===t.$options.name;)if(t.boxProxy){let e=t.childrenList(),i=[0,0,0],s=e.length;e.forEach(t=>{let e=t.boxProxy;e&&i[e.checkstate()]++}),t.boxProxy.check(i[0]===s?0:i[1]===s?1:2)}let e=this.boxProxy.checkstate();2!=e&&this.tripleAll(e)},tripleAll(t){this.childrenList().forEach(e=>{e.boxProxy&&(e.boxProxy.check(t),e.tripleAll(t))})},expandToView(){let t=this;for(;(t=t.provideParentLeaf)&&t.$options.name===this.$options.name;)t.toggle(!0)},html_self(){let t=this.isExpanded(),e=this.isFolder()?t?this.x.expandedIcon:this.x.collapsedIcon:this.x.icon;return a("div",r(this.html_attrs,this.html_props,this.$attrs),[this.loading?a(Ge,{src:"#f-svg-loading",class:"w-leaf-loading"}):a("div",{ref:"toggle",class:["w-leaf-toggle f-i",t?"f-i-caret-down":"f-i-caret-right"],onclick:t=>{t.stopPropagation(),this.toggle()}}),this.$slots.box&&this.$slots.box(),e&&a(Ge,{src:e,class:"w-leaf-icon"}),a("div",{class:"w-leaf-text f-line-1",title:this.x.text},this.$slots.text?this.$slots.text():this.x.text)])},html_cont(){let t,e=this.x.children,i=this.pubParent;return Array.isArray(e)&&i&&(t=e.map((t,e)=>{let s;const l=i.$slots.default({item:t,index:e});for(let t of l)s||(s=t.key);return s?a(ci,{key:s},{default:()=>l}):l})),a("div",{id:this.uid+"cont",ref:"cont",class:"w-leaf-cont",style:{display:this.x.expanded?"":"none"}},t)},html(){return[this.html_self(),this.html_cont()]}},computed:{tree(){return this.pubParent},level(){return this.provideParentTR?this.provideParentTR.level:this.provideLevel+1},isCurrent(){return this.pubParent&&this.pubParent.inCurrent(this)},html_props(){let t=this.isExpanded(),e=this.isFolder(),i=!!this.x.disabled,s={class:{"z-on":this.isCurrent,"z-ds":i,"z-folder":e,"z-expanded":e&&t,"z-collapse":e&&!t},style:"padding-left:"+It.unitSize(16*this.level)};return this.pubParent&&(s.onmouseenter=this.onmouseenter,s.onmouseleave=this.onmouseleave,s.onclick=this.onclick),s}},mounted(){this.x.expanded&&this.toggle(!0),this.isCurrent&&this.pubParent.viewCurrent(this)},__file:"src/widgets/Leaf.vue"},Ji={name:"w-pagebar",mixins:[Mi],emits:["click:item"],props:["limit","size","offset","buttonCount","noFirstLast","face","jump"],data:()=>({isJumpFocus:!1,showDrop:!1}),methods:{x_default:()=>({limit:1,size:0,offset:0,buttonCount:5,face:"normal",gap:0,valign:"middle"}),inCurrent(t){return this.currentPage==t.text},clickItem(t,e){let i=(e-1)*this.x.limit;i!=this.x.offset&&(t.runType="click:item",t.value=i,this.trigger(t,i))},clickDrop(t){this.showDrop=!0},onJumpClick(t){let e=Math.max(0,It.number(this.$refs.jumpInput.value));this.clickItem(t,e)},html_button(t,e,i,s){return a("button",{class:["w-pagebar-button w-pagebar-num",{"z-on":!e&&!i&&t==this.currentPage,"z-ds":s,[i]:i}],disabled:s,onclick:e=>this.clickItem(e,t)},e||(i?"":t))},html_slots(){return"button"===this.x.face?this.html_face_button():"simple"===this.x.face?this.html_face_simple():this.html_face_normal()},html_buttons(){return[a(ti,{class:"w-pagebar-button w-pagebar-prev",icon:".f-i .f-i-angle-left",disabled:1==this.currentPage,title:It.loc.page_text.prev,onclick:t=>this.clickItem(t,this.currentPage-1)}),a(ti,{class:"w-pagebar-button w-pagebar-next",icon:".f-i .f-i-angle-right",disabled:this.currentPage==this.sumPage,title:It.loc.page_text.next,onclick:t=>this.clickItem(t,this.currentPage+1)})]},html_drop(){let t=[];if(this.x.buttonCount&&t.push(a(ti,{class:"w-pagebar-button w-pagebar-button-count w-pagebar-prev",ref:"drop",text:this.currentPage+"/"+this.sumPage,onclick:t=>this.clickDrop(t)})),this.showDrop){let e=[];for(let t=1,i=this.sumPage;t<=i;t++)e.push(a(ti,{text:t,onClick:e=>this.clickItem(e,t)}));t.push(a(li,{snap:()=>this.$refs.drop,position:"v",indent:1,onClose:()=>this.showDrop=!1},{default:()=>e}))}return t},html_face_simple(){return this.html_drop().concat(this.html_buttons())},html_face_button(){let t=this.html_buttons();return t.splice(1,0,...this.html_drop()),t},html_face_normal(){const t=[];let e=this.sumPage,i=this.currentPage,s=It.number(this.x.buttonCount),l=Math.max(1,i-Math.ceil(s/2)+1),r=Math.min(e+1,l+s),o=r-l<s?Math.max(1,r-s):l;this.x.noFirstLast||t.push(this.html_button(1,this.labelFirst,this.iconFirst,1==i)),t.push(this.html_button(i-1,this.labelPrev,this.iconPrev,1==i));for(let e=o;e<r;e++)t.push(this.html_button(e));return t.push(this.html_button(i+1,this.labelNext,this.iconNext,i>=this.sumPage)),this.x.noFirstLast||t.push(this.html_button(e,this.labelLast,this.iconLast,i>=this.sumPage)),this.x.jump&&(t.push(a("span",{class:"w-pagebar-jump-to"},It.loc.to)),t.push(a("input",{class:"w-pagebar-jump-input",ref:"jumpInput",onfocus:t=>this.isJumpFocus=!0,onblur:t=>this.isJumpFocus=!1,onkeydown:t=>13==t.keyCode&&this.onJumpClick(t)})),t.push(a("button",{class:"w-pagebar-button w-pagebar-jump-button",onclick:this.onJumpClick},"GO")),t.push(a("span",{class:"w-pagebar-jump-page"},It.loc.page))),t},html_face_mini(){return this.html_face_normal()}},computed:{currentPage(){return(Math.ceil(this.x.offset/this.x.limit)||0)+1},sumPage(){return Math.ceil(this.x.size/this.x.limit)||1},labelFirst(){return"normal"===this.x.face?It.loc.page_text.first:""},labelLast(){return"normal"===this.x.face?It.loc.page_text.last:""},labelNext(){return"normal"===this.x.face?It.loc.page_text.next:""},labelPrev(){return"normal"===this.x.face?It.loc.page_text.prev:""},iconFirst(){return"mini"===this.x.face?"f-i f-i-angle-first":""},iconLast(){return"mini"===this.x.face?"f-i f-i-angle-last":""},iconNext(){return"mini"===this.x.face?"f-i f-i-angle-right":""},iconPrev(){return"mini"===this.x.face?"f-i f-i-angle-left":""},html_class(){return["w-buttonbar w-horizontal","z-face-"+this.x.face,this.html_align_class,this.isJumpFocus&&"z-jump-on"]}},__file:"src/widgets/PageBar.vue"},Gi={name:"w-split",mixins:[Te],props:["collapsedIcon","expandedIcon","movable","range","toNext","expanded"],inject:["provideLayout"],created(){this.$watch("expanded",t=>{"boolean"==typeof t?this.x.expanded=t:null==this.x.expanded&&(this.x.expanded=!0)},{immediate:!0})},methods:{toggle(t){this.x.expanded=null==t?!this.x.expanded:t;let e=this.x.toNext?this.el().nextElementSibling:this.el().previousElementSibling;e&&It.q(e).toggleClass("f-split-collapsed",!this.x.expanded)},dragstart(t){let e=this.el().previousElementSibling,i=this.el().nextElementSibling;if(e&&i){let s,l,r=this.inVertical,a=this.x.toNext?i:e,o=It.eventX(t),n=It.eventY(t),h=r?"top":"left",c=r?"height":"width",u=r?"clientY":"clientX",d=r?n:o,p=It.bcr(e)[h],m=It.bcr(i)[r?"bottom":"right"]-5,f=It.lodash.pick(It.bcr(this.$refs.movable),["width","height","top","left"]);It.moveup(t=>{l||(l=It.q('<div style="position:absolute;background:rgba(0,0,0,.3);z-index:101;"></div>').css(f).appendTo(document.body)),s=It.numRange(f[h]+t[u]-d,p,m),l.css({[h]:s})},(t,e)=>{if(e&&l){l.remove();let t=(this.x.expanded?It.bcr(a)[c]:0)+(this.x.toNext?1:-1)*(d-s);t<=0?this.toggle(!1):(this.x.expanded||this.toggle(!0),It.q(a).css({[c]:t}))}},t)}},html_slots(){let t=[],e=this.x.expandedIcon||this.x.collapsedIcon,i=this.x.collapsedIcon||e;return e&&t.push(this.html_icon(this.x.expanded?e:i,"w-split-icon",()=>this.toggle())),this.x.movable&&t.push(a("div",{ref:"movable",class:"w-split-movable",onmousedown:this.dragstart})),t}},computed:{inVertical(){return"w-vertical"===this.provideLayout},html_props(){return{class:["f-rel z-"+(this.inVertical?"vertical":"horizontal"),{"z-tonext":this.x.toNext}]}}},mounted(){this.x.expanded||this.toggle(!1)},__file:"src/widgets/Split.vue"},Ki={name:"w-toggle",mixins:[Te,Ve],props:["collapsedIcon","expandedIcon","expanded","align","valign"],methods:{x_default:()=>({expanded:!0,valign:"middle"}),toggle(t=!0){let e="boolean"==typeof t?t:!this.x.expanded;this.x.expanded=e,It.q(this.el()).nextUntil(".w-toggle").toggle(e)},html_slots(){let t=this.x.expanded?this.x.expandedIcon:this.x.collapsedIcon;return[t&&a(Ge,{src:t,class:"w-toggle-icon"}),a("div",{class:"w-toggle-main"},this.$slots.default())]}},computed:{html_props(){let t=this.x.expanded;return{class:["w-horizontal f-pointer",{"z-expanded":t,"z-collapse":!t},this.html_align_class],onclick:this.toggle}}},mounted(){this.x.expanded||this.toggle(!1)},__file:"src/widgets/Toggle.vue"},Zi={name:"w-video",mixins:[Te],props:["src","poster"],data:()=>({playing:!1}),methods:{getMimeType(){let t=It.strTo(this.x.src,"?")||this.x.src,e=It.strFrom(t,"/",!0)||t;return It.strFrom(e,".",!0)?mimeType(e):"video/mp4"},html_slots(){return[a("video",{class:"w-video-vd f-width f-height",ref:"vd",src:this.x.src,poster:this.x.poster,onplay:t=>this.playing=!0,onpause:t=>this.playing=!1,controls:!0,"webkit-playsinline":!0,playsinline:!0,"x-webkit-airplay":!0,"x5-playsinline":!0,"x5-video-player-type":"h5","x5-video-orientation":"h5","x5-video-player-fullscreen":!0}),a("div",{class:"w-video-play f-abs-center f-flex-center",innerHTML:'<i class="f-i f-i-play"></i>',onclick:t=>{let e=this.$refs.vd;e.paused?e.play():e.pause()}})]}},computed:{html_class(){return["f-rel f-flex-center",{"z-play":this.playing}]}},__file:"src/widgets/Video.vue"},ts={name:"w-progress",mixins:[Te],props:["percent","range","text"],methods:{html_slots(){let t=It.number(this.x.percent),e=this.x.text;return null==e&&(e=t+"%"),[a("span",{class:"w-progress-text"},e),a("div",{class:"w-progress-gut",style:{width:`${t}%`}},a("div",{class:"w-progress-bar f-flex f-flex-center",style:{width:`${0==t?t:1e4/t}%`}},a("span",{class:"w-progress-text"},e)))]}},computed:{html_class(){if(this.x.range){let t=this.x.range.split(",");for(let e=t.length-1;e>=0;e--)if(It.number(this.x.percent)>=It.number(t[e]))return"z-"+t[e]}}},__file:"src/widgets/Progress.vue"},es={name:"w-calendar",mixins:[Te],emits:["click:item","change"],props:["value","minValue","maxValue","current","pad","face","format","success","cg","start","enableHour","enableMinute","enableSecond","defaultHour","defaultMinute","defaultSecond"],data(){return{dt:this.value2date(),currentDate:null,headPopYear:null,headPopMonth:null}},watch:{value(t){this.dt=this.value2date()},dt(t,e){let i=t.getFullYear(),s=e.getFullYear();if("year"===this.x.face){(""+i).slice(-2,-1)!=(""+s).slice(-2,-1)&&this.trigger("change",t)}else"quarter"===this.x.face||"month"===this.x.face||"week"===this.x.face?i!=s&&this.trigger("change",t):"date"===this.x.face&&(i==s&&t.getMonth()==e.getMonth()||this.trigger("change",t))},current(t){if(!t)return;let e="string"==typeof t?It.dateParse(t,this.formatter):t,i=this.dt,s=e.getFullYear(),l=i.getFullYear();if("year"===this.x.face){(""+s).slice(-2,-1)!=(""+l).slice(-2,-1)&&(this.dt=e)}else"quarter"===this.x.face||"month"===this.x.face||"week"===this.x.face?s!=l&&(this.dt=e):"date"===this.x.face&&(s==l&&e.getMonth()==i.getMonth()||(this.dt=e))}},methods:{x_default(){let t=this.format||"";return{face:"yyyy"===t?"year":t.includes("MM")&&!t.includes("dd")?"month":t.includes("ww")?"week":t.includes("qq")?"quarter":"date"}},value2date(){let t=this.value,e=this.minValue,i=this.maxValue,s=this.format||"";return e&&(!t||t<e)&&(t=e),i&&(!t||t>i)&&(t=i),t=t?It.dateParse(t,s):new Date,this.value||this.setDefaultTime(t),t},weekday(t){let e=t.getDay();return 0==e?6:e-1},setDefaultTime(t){let e=null==this.defaultHour?t.getHours():parseFloat(this.defaultHour);if(this.enableHour){let t=It.arrayNumber(this.enableHour);t.includes(e)||(e=t[0])}t.setHours(e);let i=null==this.defaultMinute?t.getMinutes():parseFloat(this.defaultMinute);if(this.enableMinute){let t=It.arrayNumber(this.enableMinute);t.includes(i)||(i=t[0])}t.setMinutes(i);let s=null==this.defaultSecond?t.getSeconds():parseFloat(this.defaultSecond);if(this.enableSecond){let t=It.arrayNumber(this.enableSecond);t.includes(s)||(s=t[0])}return t.setSeconds(s),t},fixDate(t){return this.beginDate&&t<this.beginDate&&(t=this.beginDate),this.endDate&&t>this.endDate&&(t=this.endDate),this.setDefaultTime(new Date(t.getTime()))},clickStep(t){let e=new Date(this.dt.getTime());"year"==this.x.face?e=It.dateAdd(e,"y",10*t):"quarter"==this.x.face||"month"==this.x.face?e=It.dateAdd(e,"y",t):"date"==this.x.face?e=It.dateAdd(e,"M",t):"week"==this.x.face&&(e=It.dateAdd(e,"y",t)),this.dt=e},clickPopYear(t){(t=t||this.dt.getFullYear()-4)<1e3&&(t=1e3),this.headPopYear=Array.from(Array(10)).map((e,i)=>t+i)},clickPopYearItem(t){let e=new Date(this.dt.getTime());e.setFullYear(t),this.dt=e,this.headPopYear=null},clickPopYearStep(t){let e=this.headPopYear,i=t<0?e[0]-10:e[e.length-1]+1;this.clickPopYear(i)},mousewheelPopYear(t){this.clickPopYearStep(t.deltaY>0?-1:1)},clickPopMonth(){this.headPopMonth=Array.from(Array(12)).map((t,e)=>e+1)},clickPopMonthItem(t){this.dt.getMonth(),this.dt=It.dateAdd(this.dt,"M",t-1-this.dt.getMonth()),this.headPopMonth=null},clickItem(t,e){e.disabled||(void 0!==this.x.current&&(this.dt=this.fixDate(e.date)),t.runType="click:item",t.value=e,this.trigger(t,e),this.hasTime||this.callback(e.value,t))},clickNow(t){this.callback(this.fixDate(new Date),t)},clickConfirm(t){let e=this.dt,i=this.focusDate,s=this.fixDate(new Date(i.getFullYear(),i.getMonth(),i.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()));this.callback(s,t)},callback(t,e){"object"==typeof t&&(t=this.fm(t)),this.x.success&&this.x.success(t,e)},clickHour(t,e){this.dt.setHours(e),this.dt=this.fixDate(this.dt),this.$refs.hour.scrollToY(t.currentTarget,"middle",150)},clickMinute(t,e){this.dt.setMinutes(e),this.dt=this.fixDate(this.dt),this.$refs.minute.scrollToY(t.currentTarget,"middle",150)},clickSecond(t,e){this.dt.setSeconds(e),this.dt=this.fixDate(this.dt),this.$refs.second.scrollToY(t.currentTarget,"middle",150)},fm(t){return It.dateFormat("string"==typeof t?It.dateParse(t,this.formatter):t,this.formatter)},isHourDisabled(t){let e=this.minHour,i=this.maxHour;return e&&e>t||i&&i<t},isMinuteDisabled(t){let e=this.minMinute,i=this.maxMinute;return e&&e>t||i&&i<t},isSecondDisabled(t){let e=this.minSecond,i=this.maxSecond;return e&&e>t||i&&i<t}},computed:{loc:()=>It.loc,formatter(){return this.x.format||"yyyy-MM-dd"},hasTime(){return/[Hms]/.test(this.formatter)},onlyTime(){return this.hasTime&&!/[yMd]/.test(this.formatter)},focusValue(){let t=this.focusDate;return t&&this.fm(t)},focusDate(){let t=this.x.current;return t?It.dateParse(t,this.x.format):!this.x.value&&this.x.success?this.x.format&&this.dt:void 0},beginDate(){return this.x.minValue&&It.dateParse(this.x.minValue,this.formatter)},endDate(){return this.x.maxValue&&It.dateParse(this.x.maxValue,this.formatter)},focusHour(){return this.x.format.includes("H")&&this.dt.getHours()},focusMinute(){return this.x.format.includes("m")&&this.dt.getMinutes()},focusSecond(){return this.x.format.includes("s")&&this.dt.getSeconds()},minHour(){if(this.beginDate){let t=this.beginDate,e=this.dt;if(t.getFullYear()==e.getFullYear()&&t.getMonth()==e.getMonth()&&t.getDate()==e.getDate())return t.getHours()}},maxHour(){if(this.endDate){let t=this.endDate,e=this.dt;if(t.getFullYear()==e.getFullYear()&&t.getMonth()==e.getMonth()&&t.getDate()==e.getDate())return t.getHours()}},minMinute(){if(this.minHour===this.dt.getHours())return this.beginDate.getMinutes()},maxMinute(){if(this.maxHour===this.dt.getHours())return this.endDate.getMinutes()},minSecond(){if(this.minMinute===this.dt.getMinutes())return this.beginDate.getSeconds()},maxSecond(){if(this.maxMinute===this.dt.getMinutes())return this.endDate.getSeconds()},headYear(){let t=this.dt.getFullYear();return"year"===this.x.face&&(t=this.dt.getFullYear()-this.dt.getFullYear()%10,t+=" - "+(t+9)),It.loc.ps(It.loc.calendar.y,t)},headMonth(){return It.loc.calendar.monthname[this.dt.getMonth()]},bodyList(){return"year"===this.x.face?this.bodyListYear:"quarter"===this.x.face?this.bodyListQuarter:"month"===this.x.face?this.bodyListMonth:"week"===this.x.face?this.bodyListWeek:this.bodyListDate},bodyListYear(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue,l=this.dt.getFullYear()-this.dt.getFullYear()%10-1,r=new Date(this.dt.getTime());r.setDate(1),r.setFullYear(l);for(let a=0;a<12;a++){let o=l+a,n={value:o,text:o,date:new Date(r.getTime()),pad:0==a||11==a,disabled:!!(e&&e>o||i&&i<o),focus:s==o};t.push(n),r.setFullYear(r.getFullYear()+1)}return t},bodyListQuarter(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue;this.dt.getFullYear();let l=new Date(this.dt.getTime());l.setDate(1),l.setMonth(0);for(let r=1;r<=4;r++){let a=this.fm(l),o={text:`Q${r}`,value:a,date:new Date(l.getTime()),disabled:!!(e&&e>a||i&&i<a),focus:s==a};l.setMonth(l.getMonth()+3),t.push(o)}return t},bodyListMonth(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue;this.dt.getFullYear();let l=new Date(this.dt.getTime());l.setDate(1),l.setMonth(0);for(let r=0;r<12;r++){let a=this.fm(l),o={text:It.loc.calendar.monthname[r],value:a,date:new Date(l.getTime()),disabled:!!(e&&e>a||i&&i<a),focus:s==a};l.setMonth(l.getMonth()+1),t.push(o)}return t},bodyListWeek(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue,l=It.dateWeek(this.dt)[0],r=It.dateWeekLast(l),a=It.dateWeekFirst(l)[2];for(let o=1,n=r[1];o<=n;o++){let r=this.fm(a),n={text:o,value:l+"-"+It.strPad(o),date:new Date(a.getTime()),disabled:!!(e&&e>r||i&&i<r),focus:s==r,title:It.loc.ps(It.loc.calendar.from_to,It.dateFormat(a,"yyyy-MM-dd"),It.dateFormat(It.dateAdd(a,"d",6),"yyyy-MM-dd"))};a.setDate(a.getDate()+7),t.push(n)}return t},bodyListDate(){let t=new Date(this.dt.getTime()),e=t.getMonth(),i=new Date(t.getTime()),s=this.focusValue,l=s&&It.dateFormat(It.dateParse(s,this.x.format),"yyyy-MM-dd"),r=this.beginDate&&It.dateFormat(this.beginDate,"yyyy-MM-dd"),a=this.endDate&&It.dateFormat(this.endDate,"yyyy-MM-dd"),o=[];t.setDate(1),i.setDate(new Date(t.getFullYear(),e+1,0).getDate());let n=7-(this.weekday(t)+i.getDate())%7;for(n&&n<7&&i.setDate(i.getDate()+n),this.weekday(t)>0&&t.setDate(1-this.weekday(t)),this.x.pad&&(n=1+(i.getTime()-t.getTime())/864e5,n<42&&i.setDate(i.getDate()+42-n));t<=i;){let i=this.fm(t),s=It.dateFormat(t,"yyyy-MM-dd"),n={text:t.getDate(),value:i,date:new Date(t.getTime()),pad:t.getMonth()!==e,disabled:!!(r&&r>s||a&&a<s),focus:l===s};o.push(n),t.setDate(t.getDate()+1)}return o},bodyListHour(){return this.enableHour?It.arrayNumber(this.enableHour):Array.from(Array(24).keys())},bodyListMinute(){return this.enableMinute?It.arrayNumber(this.enableMinute):Array.from(Array(60).keys())},bodyListSecond(){return this.enableSecond?It.arrayNumber(this.enableSecond):Array.from(Array(60).keys())}}};const is=["innerHTML"],ss=["onClick"],ls=["onClick"],rs={class:"w-calendar-body"},as={class:"w-calendar-daytitle"},os=["title","onClick"],ns={class:"w-calendar-item-text"},hs={class:"w-calendar-time-th"},cs={class:"w-calendar-time-th"},us={class:"w-calendar-time-th"};es.render=function(t,e,i,s,l,a){const o=n("w-html"),h=n("w-dialog"),_=n("w-horizontal"),y=n("w-vertical"),S=n("w-button"),T=n("w-buttonbar");return u(),c(y,r(t.html_binds,{class:["f-rel","w-calendar-"+this.x.face]}),{default:d(()=>[a.onlyTime?w("v-if",!0):(u(),c(y,{key:0,class:"w-calendar-main"},{default:d(()=>[x(_,{class:P(["w-calendar-head",{"f-h-gap":t.dfish.br.compat.gap}]),valign:"middle",align:"center"},{default:d(()=>["date"==t.x.face?(u(),p("i",{key:0,class:"w-calendar-head-prev-year f-i f-i-angle-double-left f-pointer",onClick:e[0]||(e[0]=t=>a.clickStep(-12))})):w("v-if",!0),m("i",{class:"w-calendar-head-prev f-i f-i-angle-single-left f-pointer",onClick:e[1]||(e[1]=t=>a.clickStep(-1))}),x(_,{class:P(["w-calendar-head-pop",{"f-h-gap":t.dfish.br.compat.gap}])},{default:d(()=>[m("div",{class:"w-calendar-head-year f-link",ref:"popYear",onClick:e[2]||(e[2]=t=>a.clickPopYear()),innerHTML:a.headYear},null,8,is),l.headPopYear?(u(),c(h,{key:0,class:"f-dfish-dialog",width:"72",context:t.$refs.popYear,"auto-hide":!0,ownproperty:!0,snap:t.$refs.popYear,onClose:e[5]||(e[5]=t=>l.headPopYear=null)},{default:d(()=>[m("div",{class:"w-calendar-head-year-item",onClick:e[3]||(e[3]=t=>a.clickPopYearStep(-1))},e[11]||(e[11]=[m("i",{class:"f-i f-i-minus"},null,-1)])),x(o,{height:"*",onWheelPassive:a.mousewheelPopYear},{default:d(()=>[(u(!0),p(f,null,g(l.headPopYear,t=>(u(),p("div",{class:P(["w-calendar-head-year-item",{"z-on":t==l.dt.getFullYear()}]),onClick:e=>a.clickPopYearItem(t)},v(t),11,ss))),256))]),_:1},8,["onWheelPassive"]),x(o,{class:"w-calendar-head-year-item",onClick:e[4]||(e[4]=t=>a.clickPopYearStep(1))},{default:d(()=>e[12]||(e[12]=[m("i",{class:"f-i f-i-plus"},null,-1)])),_:1,__:[12]})]),_:1},8,["context","snap"])):w("v-if",!0),"date"==t.x.face?(u(),c(o,{key:1,class:"w-calendar-head-month f-link",ref:"popMonth",onClick:a.clickPopMonth},{default:d(()=>[b(v(a.headMonth),1)]),_:1},8,["onClick"])):w("v-if",!0),l.headPopMonth?(u(),c(h,{key:2,class:"f-dfish-dialog",width:"72",context:t.$refs.popMonth,"auto-hide":!0,ownproperty:!0,snap:t.$refs.popMonth,onClose:e[6]||(e[6]=t=>l.headPopMonth=null)},{default:d(()=>[x(o,{height:"*"},{default:d(()=>[(u(!0),p(f,null,g(l.headPopMonth,t=>(u(),p("div",{class:P(["w-calendar-head-year-item",{"z-on":t==l.dt.getMonth()+1}]),onClick:e=>a.clickPopMonthItem(t)},v(t),11,ls))),256))]),_:1})]),_:1},8,["context","snap"])):w("v-if",!0)]),_:1},8,["class"]),m("i",{class:"w-calendar-head-next f-i f-i-angle-single-right f-pointer",onClick:e[7]||(e[7]=t=>a.clickStep(1))}),"date"==t.x.face?(u(),p("i",{key:1,class:"w-calendar-head-next-year f-i f-i-angle-double-right f-pointer",onClick:e[8]||(e[8]=t=>a.clickStep(12))})):w("v-if",!0),e[13]||(e[13]=m("div",{class:"w-calendar-head-blank"},null,-1))]),_:1,__:[13]},8,["class"]),k(t.$slots,"head"),m("div",rs,["date"==t.x.face?(u(!0),p(f,{key:0},g(a.loc.calendar.day_title_1,t=>(u(),p("div",as,v(t),1))),256)):w("v-if",!0),(u(!0),p(f,null,g(a.bodyList,(e,i)=>(u(),p("div",{title:e.title,class:P(["w-calendar-item",{"z-on":e.focus&&!e.disabled,"z-pad":e.pad,"z-ds":e.disabled}]),onClick:t=>a.clickItem(t,e)},[k(t.$slots,"default",{item:e,index:i},()=>[m("div",ns,v(e.text),1)])],10,os))),256))])]),_:3})),a.hasTime?(u(),c(_,{key:1,class:"w-calendar-time"},{default:d(()=>[!1!==a.focusHour?(u(),c(y,{key:0,class:"w-calendar-time-col w-calendar-time-hour",width:"*"},{default:d(()=>[m("div",hs,v(a.loc.hour),1),x(T,{class:"w-calendar-time-body",ref:"hour",current:a.focusHour,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:d(()=>[(u(!0),p(f,null,g(a.bodyListHour,e=>(u(),c(S,{class:"w-calendar-time-item",key:e,text:t.dfish.strPad(e),disabled:a.isHourDisabled(e),onClick:t=>a.clickHour(t,e)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):w("v-if",!0),!1!==a.focusMinute?(u(),c(y,{key:1,class:"w-calendar-time-col w-calendar-time-minute",width:"*"},{default:d(()=>[m("div",cs,v(a.loc.minute),1),x(T,{class:"w-calendar-time-body",ref:"minute",current:a.focusMinute,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:d(()=>[(u(!0),p(f,null,g(a.bodyListMinute,e=>(u(),c(S,{class:"w-calendar-time-item",key:e,text:t.dfish.strPad(e),disabled:a.isMinuteDisabled(e),onClick:t=>a.clickMinute(t,e)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):w("v-if",!0),!1!==a.focusSecond?(u(),c(y,{key:2,class:"w-calendar-time-col w-calendar-time-second",width:"*"},{default:d(()=>[m("div",us,v(a.loc.second),1),x(T,{class:"w-calendar-time-body",ref:"second",current:a.focusSecond,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:d(()=>[(u(!0),p(f,null,g(a.bodyListSecond,e=>(u(),c(S,{class:"w-calendar-time-item",key:e,text:t.dfish.strPad(e),disabled:a.isSecondDisabled(e),onClick:t=>a.clickSecond(t,e)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):w("v-if",!0)]),_:1})):w("v-if",!0),i.success?(u(),c(_,{key:2,class:P(["w-calendar-foot",{"f-h-gap":t.dfish.br.compat.gap}]),align:"between",valign:"middle"},{default:d(()=>[m("div",{class:"w-calendar-button-now f-link",onClick:e[9]||(e[9]=(...t)=>a.clickNow&&a.clickNow(...t))},v(a.loc.calendar.now),1),m("div",{class:"w-calendar-button-confirm f-link",onClick:e[10]||(e[10]=(...t)=>a.clickConfirm&&a.clickConfirm(...t))},v(a.loc.confirm),1)]),_:1},8,["class"])):w("v-if",!0)]),_:3},16,["class"])},es.__file="src/widgets/Calendar.vue";var ds={name:"w-timeline",mixins:[Pe,hi],props:["face","vertical"],methods:{indent(){let t=this.$refs.wrap.querySelectorAll(":scope>.w-timeline-half>.w-timeline-item").length;if(t>0){let e=this.x.vertical,i=e?"width":"height",s=0,l=0;for(let r=0;r<t;r++){let a=this.$refs.wrap.querySelector(`:scope>.w-timeline-half>.w-timeline-item[w-index="${r}"]`),o=r<t-1&&this.$refs.wrap.querySelector(`:scope>.w-timeline-half>.w-timeline-item[w-index="${r+1}"]`),n=It.bcr(a.querySelector(":scope>.w-timeline-item-icon>.w-timeline-item-icon-img"));if(a.parentNode==this.$refs.prev?s=Math.max(s,n[i]):l=Math.max(l,n[i]),o&&a.parentNode!=o.parentNode){let t=It.bcr(o.querySelector(":scope>.w-timeline-item-icon>.w-timeline-item-icon-img"));e&&n.bottom+25>t.top?It.q(o).css({marginTop:n.bottom+25-t.top}):!e&&n.right+50>t.left&&It.q(o).css({marginLeft:n.right+50-t.left})}}let r=It.q(">.w-timeline-item",this.$refs.prev);r.each((t,l)=>{let r=It.q(">.w-timeline-item-icon",l),a=It.bcr(r[0]);r.css({[e?"marginRight":"marginBottom"]:(s-a[i])/2})}),It.q(">.w-timeline-item",this.$refs.next).each((t,s)=>{let r=It.q(">.w-timeline-item-icon",s),a=It.bcr(r[0]);r.css({[e?"marginLeft":"marginTop"]:(l-a[i])/2})}),r.length&&It.q(this.$refs.next).css({[e?"marginLeft":"marginTop"]:`-${l/2+s/2}px`})}if(0==t)It.q(this.$refs.line).css({width:0,height:0});else{const e=It.bcr(this.$refs.wrap),i=[];let s=[],l=0,r="#ddd";for(let e=0;e<t;e++){let t=It.q(`>.w-timeline-half>.w-timeline-item[w-index="${e}"]`,this.$refs.wrap),s=It.bcr(t.find(">.w-timeline-item-icon>.w-timeline-item-icon-img")[0]),l={x:s.left+s.width/2,y:s.top+s.height/2,color:t.attr("w-line-color")};i.push(l)}i.sort((t,e)=>this.x.vertical?t.y<e.y?-1:0:t.x<e.x?-1:0);for(let e=0;e<t;e++){const t=i[e];if(e>0){const e=i[0];l=this.x.vertical?t.y-e.y:t.x-e.x,s.push(`${r} ${l}px`)}t.color&&(r=t.color),e>0&&s.push(`${r} ${l}px`)}this.x.vertical?It.q(this.$refs.line).css({width:2,height:i[t-1].y-i[0].y,top:i[0].y-e.top,left:i[0].x-e.left-1}):It.q(this.$refs.line).css({width:i[t-1].x-i[0].x,height:2,top:i[0].y-e.top-1,left:i[0].x-e.left,background:`linear-gradient(to right, ${s.join()})`})}},html_slots(){let t=[],e=[],i=this.x.vertical;return this.slots_children().forEach((s,l)=>{It.lodash.set(s,"props.index",l),i?("right"==s.props.position?t:e).push(s):("bottom"==s.props.position?e:t).push(s)}),this.html_scroll_slots(a("div",{ref:"wrap",class:"w-timeline-wrap"},[a("div",{ref:"line",class:"w-timeline-line"}),a("div",{ref:"prev",class:["w-timeline-half w-timeline-prev",{[`f-${this.x.vertical?"v":"h"}-gap`]:It.br.compat.gap}]},t),a("div",{ref:"next",class:["w-timeline-half w-timeline-next",{[`f-${this.x.vertical?"v":"h"}-gap`]:It.br.compat.gap}]},e)]))}},computed:{html_class(){return[this.html_scroll_class,{["z-face-"+this.x.face]:this.x.face,"z-horizontal":!this.x.vertical,"z-vertical":this.x.vertical}]}},mounted(){this.indent();const t=It.lodash.debounce(()=>{this.$refs.wrap&&this.$refs.next&&(It.q(">.w-timeline-half>.w-timeline-item",this.$refs.wrap).css({[this.x.vertical?"marginTop":"marginLeft"]:0}),It.q(this.$refs.next).css({[this.x.vertical?"marginTop":"marginLeft"]:0}),this.indent())});new MutationObserver(t).observe(this.$refs.wrap,{childList:!0,attributes:!0,subtree:!0})},__file:"src/widgets/Timeline.vue"},ps={name:"w-timeline-item",pubParentName:"w-timeline",mixins:[Te],inject:["providePubParent"],props:["position","index","align","lineColor"],watch:{lineColor(t){this.$nextTick(()=>this.providePubParent.indent())}},methods:{html_slots(){let t=a("div",{class:"w-timeline-item-main f-br"},a("div",{class:"w-timeline-item-main-text"},this.$slots));return[a("div",{ref:"icon",class:"w-timeline-item-icon"},this.$slots.icon?a("div",{class:"w-timeline-item-icon-img"},this.$slots.icon()):a("i",{class:"w-timeline-item-icon-img z-default"})),t]}},computed:{html_class(){return"z-position-"+(this.x.position||(this.pubParent.x.vertical?"left":"bottom"))+" z-align-"+(this.x.align||"left")},html_props(){return{"w-index":this.x.index,"w-line-color":this.x.lineColor}}},__file:"src/widgets/TimelineItem.vue"},ms={name:"w-slidepicker",mixins:[Te],provide(){return{provideOptionParent:this}},props:["optionHeight","modelValue","minValue","maxValue","keepIndex","cover"],emits:["update:modelValue","change"],setup(t,e){const i=D().ctx,s=z(),l=z();let r,a,o,n,h,c;const u=function(t){let e,i,s,r=It.eventY(t),a=0,u=null;l.value.style.transition="",It.moveup(t=>{let d=It.eventY(t),p=t.timeStamp;e=h+d-r,i&&s&&p>s&&(u=a,a=(d-i)/(p-s)),i=d,s=p,e=It.numRange(e,o-c,n+c),l.value.style.transform=`translateY(${e}px)`},(i,s)=>{if(!s)return p(t);if(null==e)return;let r=.15;Math.abs(a)<r||u&&Math.abs(u)<r?a=0:u&&Math.abs(u)>Math.abs(a)&&(a=u);let d=e+200*a,m=Math.abs(a/2),f=(n-d)%c;d+=f,f>c/2&&(d-=c),h=It.numRange(d,o,n),h!=e&&((e<o||e>o||m<r)&&(m=r),Math.abs(h-e)<10&&(m=.05),l.value.style.transform=`translateY(${h}px)`,l.value.style.transition=`transform ${m}s ease-out`)},t)},d=function(t){h+=(t.deltaY<0?-1:1)*c,h=It.numRange(h,o,n),l.value.style.transform=`translateY(${h}px)`,l.value.style.transition="transform .12s ease-out"},p=function(t){let e=It(t);"w-option"==e.$options.name&&(f(e.$props.value),m(!0))},m=function(t){if(!s.value||!l.value)return;let e=i.slots_children();if(!e.length)return;let u=i.x.modelValue,d=i.x.minValue,p=i.x.maxValue;(d||0===d||p||0===p)&&(u=It.numRange(u,d,p),u!=i.x.modelValue&&f(u));let m=It.bcr(s.value),x=It.bcr(l.value),g=-1,v=-1,w=!0;if(c=i.x.optionHeight,r=n=(m.height-c)/2,a=o=r-x.height+c,(d||0===d)&&(g=e.findIndex(t=>t.props.value==d)),(p||0===p)&&(v=e.findIndex(t=>t.props.value==p)),(g>-1||v>-1)&&e[0].props.value>e[e.length-1].props.value&&(w=!1),g>-1&&(w?n-=g*c:o+=g*c),v>-1&&(w?o+=(e.length-1-v)*c:n-=(e.length-1-v)*c),null!=u){let t=e.findIndex(t=>t.props.value==u);-1===t?f(null!=h&&h<a&&i.keepIndex?e[e.length-1].props.value:e[0].props.value):h=r-c*t}else h=r;h=It.numRange(h,o,n),l.value.style.transition="",l.value.style.transform=`translateY(${h}px)`,t&&(l.value.style.transition="transform .15s ease-out")},f=function(t){i.x.modelValue=t},x=function(){let t=i.slots_children()[(r-h)/c];t&&f(t.props.value)},g=T(()=>({style:{"--w-option-height":It.unitSize(i.x.optionHeight)},...It.br.mobile?{ontouchstart:u}:{onmousedown:u,onwheel:d}}));return E(()=>{L(()=>i.x.modelValue,t=>{e.emit("update:modelValue",t),e.emit("change",t)}),L(()=>i.x.minValue,m),L(()=>i.x.maxValue,m),new Se(()=>{l.value&&(m(),x())}).observe(l.value),l.value.addEventListener("transitionend",x)}),{root:s,options:l,x_default:function(){return{optionHeight:32,cover:!0}},onmousedown:u,onwheel:d,html_props:g}}};const fs={ref:"options",class:"w-slidepicker-options"},xs={key:0,class:"w-slidepicker-bg-top"},gs={key:1,class:"w-slidepicker-bg-bottom"};ms.render=function(t,e,i,s,l,a){return u(),p("div",r({ref:"root"},t.html_binds),[m("div",fs,[k(t.$slots,"default")],512),t.x.cover?(u(),p("div",xs)):w("v-if",!0),t.x.cover?(u(),p("div",gs)):w("v-if",!0)],16)},ms.__file="src/widgets/SlidePicker.vue";var vs={name:"w-hidden",mixins:[ji],methods:{isModified:()=>!1,html(){return a("input",{type:"hidden",id:this.uid,class:"w-hidden",name:this.x.name,value:this.x.modelValue,ref:"v"})}},__file:"src/widgets/Hidden.vue"},ws={name:"w-text",mixins:[ji],props:["minLength","maxLength","pattern","clearable","showCount","dropProps","suggest"],emits:["input","clear"],data:()=>({hasBorder:!0,showSuggest:!1,sug_timer:null,sug_completed:!1}),methods:{clickButtonClear(t){t.stopPropagation(),this.hasVal&&(this.val(""),this.focus(),this.$emit("clear",t))},baseInput(t){let e=t.target.value;this.val(e,t),this.baseValid("change"),this.trigger(t,e)},oninput(t){if(this.x.suggest)if(clearTimeout(this.sug_timer),""===t.target.value)this.baseInput(t),this.doSuggest(!1);else if("input"!==t.type)t.runType="input",this.baseInput(t),this.doSuggest(!0);else{let e=t.target.value;this.val(e,t),this.sug_timer=setTimeout(()=>{this.trigger(t,e),this.baseValid("change"),this.doSuggest(!0)},500)}else this.baseInput(t)},onfocus(t){this.isFocus=!0,this.x.suggest&&!this.showSuggest&&t.target.value&&!this.sug_completed&&this.oninput(t),this.sug_completed&&(this.sug_completed=!1),this.trigger("focus")},onclick(t){this.x.suggest&&!this.showSuggest&&t.target.value&&!this.sug_completed&&this.oninput(t)},doSuggest(t){!1===(t=null==t||t)&&clearTimeout(this.sug_timer),this.showSuggest=t,this.warn(!1)},onCloseDrop(){this.showSuggest=!1},complete(t){return this.val(t),this.sug_completed=!0,this.$nextTick(this.focus),this},closeDrop(){return this.doSuggest(!1),this},html_button(){let t=[];if(this.isNormal&&this.x.clearable&&t.push(a("button",{class:"w-input-button-clear w-input-button f-i f-i-close",onclick:this.clickButtonClear})),this.showSuggest){let e={context:this,ownproperty:!0,class:"f-dfish-dialog",width:It.bcr(this.el("form")).width,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(a(Ne,e,this.$slots.suggest))}return t}},computed:{validHooks(){return{...this.pubValidHooks,minLength:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&It.strLen(t)<e)return this.formErr(i,[e])},maxLength:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&t&&It.strLen(t)>e)return this.formErr(i,[It.strExceed(t,e)])}}},input_prop(){let t={oninput:this.oninput,onfocus:this.onfocus,onclick:this.onclick};return this.x.maxLength&&(t.maxlength=this.x.maxLength),t},html_class(){return{"z-val":this.hasVal,"z-clearable":this.x.clearable}}},__file:"src/widgets/Text.vue"},bs={name:"w-textarea",mixins:[ws],methods:{html_slot_down(){const t=this.slot("down");if(this.x.showCount||t&&t.length){let e="";if(this.x.showCount&&this.x.maxLength){let t=this.x.modelValue||"",i=It.strLen(t);if(i>this.x.maxLength){i=`<em class=w-textarea-show-count-exceed>超出${It.strExceed(t,this.x.maxLength)}个字</em>`}e=`${i} / ${this.x.maxLength}`}return a("div",{class:"w-textarea-down"},[a("div",{class:"w-textarea-down-left"},t),a("div",{class:"w-textarea-down-right w-textarea-show-count",innerHTML:e})])}return t}},computed:{input_tag:()=>"textarea",hasClassSlotDown(){return this.x.showCount&&this.x.maxLength||!!this.$slots.down}},__file:"src/widgets/Textarea.vue"},_s={name:"w-checkboxgroup",mixins:[ji],props:["modelValue","required","vertical","gap","minSize","maxSize","br"],provide(){return{providePubParent:this}},data:()=>({watchValue:null}),methods:{x_default:()=>({br:!0,gap:15}),watchModelValue(t,e){},html_form_slot(){return this.x.vertical?a("div",{class:"w-boxgroup-grid"},this.$slots):this.$slots}},computed:{html_class(){return{"z-br":this.x.br}},html_style(){return this.x.gap&&{"--w-boxgroup-gap":It.unitSize(this.x.gap)}}},__file:"src/widgets/CheckBoxGroup.vue"},ys={name:"w-radiogroup",mixins:[_s],__file:"src/widgets/RadioGroup.vue"},ks={name:"w-radio",pubParentName:"w-radiogroup",mixins:[Wi],props:["cancelable"],methods:{},computed:{input_type:()=>"radio",input_icon:()=>"f-i",input_name(){return this.w_name&&this.w_name+"@"+this.ownerView.uid},w_name(){return this.x.name||this.pubParent&&this.pubParent.x.name},input_prop(){return{"w-name":this.w_name}}},mounted(){},__file:"src/widgets/Radio.vue"},Ss={name:"w-switch",pubParentName:"w-checkboxgroup",mixins:[ji],props:["checkedText","uncheckedText","checkedValue","uncheckedValue"],inject:["providePubParent"],methods:{x_default:()=>({checkedValue:1,uncheckedValue:0}),onclick(t){let e=!this.isChecked?this.x.checkedValue:this.x.uncheckedValue;this.val(e)},formText(){return this.isChecked?this.x.checkedText:this.x.uncheckedText},html_input(){return[this.html_input_hidden(),a("div",{class:"w-switch-box",onclick:this.isNormal&&this.onclick},[a("i",{class:"w-switch-icon"}),a("span",{class:"w-switch-text"},this.isChecked?this.x.checkedText:this.x.uncheckedText)])]}},computed:{input_value(){return this.isChecked?this.x.checkedValue:this.x.uncheckedValue},html_class(){return this.isChecked?"z-checked":"z-unchecked"},isChecked(){return this.x.modelValue==this.x.checkedValue}},__file:"src/widgets/Switch.vue"};const Ts={".323":"text/h323",".3gp":"video/3gpp",".aab":"application/x-authoware-bin",".aam":"application/x-authoware-map",".aas":"application/x-authoware-seg",".acx":"application/internet-property-stream",".ai":"application/postscript",".aif":"audio/x-aiff",".aifc":"audio/x-aiff",".aiff":"audio/x-aiff",".als":"audio/X-Alpha5",".amc":"application/x-mpeg",".apk":"application/vnd.android.package-archive",".asc":"text/plain",".asd":"application/astound",".asf":"video/x-ms-asf",".asn":"application/astound",".asp":"application/x-asap",".asr":"video/x-ms-asf",".asx":"video/x-ms-asf",".au":"audio/basic",".avi":"video/x-msvideo",".awb":"audio/amr-wb",".axs":"application/olescript",".bas":"text/plain",".bcpio":"application/x-bcpio",".bld":"application/bld",".bld2":"application/bld2",".bmp":"image/bmp",".bz2":"application/x-bzip2",".c":"text/plain",".cal":"image/x-cals",".cat":"application/vnd.ms-pkiseccat",".ccn":"application/x-cnc",".cco":"application/x-cocoa",".cdf":"application/x-cdf",".cer":"application/x-x509-ca-cert",".cgi":"magnus-internal/cgi",".chat":"application/x-chat",".clp":"application/x-msclip",".cmx":"image/x-cmx",".co":"application/x-cult3d-object",".cod":"image/cis-cod",".conf":"text/plain",".cpio":"application/x-cpio",".cpp":"text/plain",".cpt":"application/mac-compactpro",".crd":"application/x-mscardfile",".crl":"application/pkix-crl",".crt":"application/x-x509-ca-cert",".csh":"application/x-csh",".csm":"chemical/x-csml",".csml":"chemical/x-csml",".css":"text/css",".dcm":"x-lml/x-evm",".dcr":"application/x-director",".dcx":"image/x-dcx",".der":"application/x-x509-ca-cert",".dhtml":"text/html",".dir":"application/x-director",".dll":"application/x-msdownload",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".dot":"application/msword",".dvi":"application/x-dvi",".dwf":"drawing/x-dwf",".dwg":"application/x-autocad",".dxf":"application/x-autocad",".dxr":"application/x-director",".ebk":"application/x-expandedbook",".emb":"chemical/x-embl-dl-nucleotide",".embl":"chemical/x-embl-dl-nucleotide",".eps":"application/postscript",".epub":"application/epub+zip",".eri":"image/x-eri",".es":"audio/echospeech",".esl":"audio/echospeech",".etc":"application/x-earthtime",".etx":"text/x-setext",".evm":"x-lml/x-evm",".evy":"application/envoy",".fh4":"image/x-freehand",".fh5":"image/x-freehand",".fhc":"image/x-freehand",".fif":"application/fractals",".flr":"x-world/x-vrml",".flv":"flv-application/octet-stream",".fm":"application/x-maker",".fpx":"image/x-fpx",".fvi":"video/isivideo",".gau":"chemical/x-gaussian-input",".gca":"application/x-gca-compressed",".gdb":"x-lml/x-gdb",".gif":"image/gif",".gps":"application/x-gps",".gtar":"application/x-gtar",".gz":"application/x-gzip",".h":"text/plain",".hdf":"application/x-hdf",".hdm":"text/x-hdml",".hdml":"text/x-hdml",".hlp":"application/winhlp",".hqx":"application/mac-binhex40",".hta":"application/hta",".htc":"text/x-component",".htm":"text/html",".html":"text/html",".hts":"text/html",".htt":"text/webviewhtml",".ice":"x-conference/x-cooltalk",".ico":"image/x-icon",".ief":"image/ief",".ifm":"image/gif",".ifs":"image/ifs",".iii":"application/x-iphone",".imy":"audio/melody",".ins":"application/x-internet-signup",".ips":"application/x-ipscript",".ipx":"application/x-ipix",".isp":"application/x-internet-signup",".it":"audio/x-mod",".itz":"audio/x-mod",".ivr":"i-world/i-vrml",".j2k":"image/j2k",".jad":"text/vnd.sun.j2me.app-descriptor",".jam":"application/x-jam",".jar":"application/java-archive",".java":"text/plain",".jfif":"image/pipeg",".jnlp":"application/x-java-jnlp-file",".jpe":"image/jpeg",".jpeg":"image/jpeg",".jpg":"image/jpeg",".jpz":"image/jpeg",".js":"application/x-javascript",".jwc":"application/jwc",".kjx":"application/x-kjx",".lak":"x-lml/x-lak",".latex":"application/x-latex",".lcc":"application/fastman",".lcl":"application/x-digitalloca",".lcr":"application/x-digitalloca",".lgh":"application/lgh",".lml":"x-lml/x-lml",".lmlpack":"x-lml/x-lmlpack",".log":"text/plain",".lsf":"video/x-la-asf",".lsx":"video/x-la-asf",".m13":"application/x-msmediaview",".m14":"application/x-msmediaview",".m15":"audio/x-mod",".m3u":"audio/x-mpegurl",".m3url":"audio/x-mpegurl",".m4a":"audio/mp4a-latm",".m4b":"audio/mp4a-latm",".m4p":"audio/mp4a-latm",".m4u":"video/vnd.mpegurl",".m4v":"video/x-m4v",".ma1":"audio/ma1",".ma2":"audio/ma2",".ma3":"audio/ma3",".ma5":"audio/ma5",".man":"application/x-troff-man",".map":"magnus-internal/imagemap",".mbd":"application/mbedlet",".mct":"application/x-mascot",".mdb":"application/x-msaccess",".mdz":"audio/x-mod",".me":"application/x-troff-me",".mel":"text/x-vmel",".mht":"message/rfc822",".mhtml":"message/rfc822",".mi":"application/x-mif",".mid":"audio/mid",".midi":"audio/midi",".mif":"application/x-mif",".mil":"image/x-cals",".mio":"audio/x-mio",".mmf":"application/x-skt-lbs",".mng":"video/x-mng",".mny":"application/x-msmoney",".moc":"application/x-mocha",".mocha":"application/x-mocha",".mod":"audio/x-mod",".mof":"application/x-yumekara",".mol":"chemical/x-mdl-molfile",".mop":"chemical/x-mopac-input",".mov":"video/quicktime",".movie":"video/x-sgi-movie",".mp2":"video/mpeg",".mp3":"audio/mpeg",".mp4":"video/mp4",".mpa":"video/mpeg",".mpc":"application/vnd.mpohun.certificate",".mpe":"video/mpeg",".mpeg":"video/mpeg",".mpg":"video/mpeg",".mpg4":"video/mp4",".mpga":"audio/mpeg",".mpn":"application/vnd.mophun.application",".mpp":"application/vnd.ms-project",".mps":"application/x-mapserver",".mpv2":"video/mpeg",".mrl":"text/x-mrml",".mrm":"application/x-mrm",".ms":"application/x-troff-ms",".msg":"application/vnd.ms-outlook",".mts":"application/metastream",".mtx":"application/metastream",".mtz":"application/metastream",".mvb":"application/x-msmediaview",".mzv":"application/metastream",".nar":"application/zip",".nbmp":"image/nbmp",".nc":"application/x-netcdf",".ndb":"x-lml/x-ndb",".ndwn":"application/ndwn",".nif":"application/x-nif",".nmz":"application/x-scream",".nokia-op-logo":"image/vnd.nok-oplogo-color",".npx":"application/x-netfpx",".nsnd":"audio/nsnd",".nva":"application/x-neva1",".nws":"message/rfc822",".oda":"application/oda",".ogg":"audio/ogg",".oom":"application/x-AtlasMate-Plugin",".p10":"application/pkcs10",".p12":"application/x-pkcs12",".p7b":"application/x-pkcs7-certificates",".p7c":"application/x-pkcs7-mime",".p7m":"application/x-pkcs7-mime",".p7r":"application/x-pkcs7-certreqresp",".p7s":"application/x-pkcs7-signature",".pac":"audio/x-pac",".pae":"audio/x-epac",".pan":"application/x-pan",".pbm":"image/x-portable-bitmap",".pcx":"image/x-pcx",".pda":"image/x-pda",".pdb":"chemical/x-pdb",".pdf":"application/pdf",".pfr":"application/font-tdpfr",".pfx":"application/x-pkcs12",".pgm":"image/x-portable-graymap",".pict":"image/x-pict",".pko":"application/ynd.ms-pkipko",".pm":"application/x-perl",".pma":"application/x-perfmon",".pmc":"application/x-perfmon",".pmd":"application/x-pmd",".pml":"application/x-perfmon",".pmr":"application/x-perfmon",".pmw":"application/x-perfmon",".png":"image/png",".pnm":"image/x-portable-anymap",".pnz":"image/png",".pot":"application/vnd.ms-powerpoint",".ppm":"image/x-portable-pixmap",".pps":"application/vnd.ms-powerpoint",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".pqf":"application/x-cprplayer",".pqi":"application/cprplayer",".prc":"application/x-prc",".prf":"application/pics-rules",".prop":"text/plain",".proxy":"application/x-ns-proxy-autoconfig",".ps":"application/postscript",".ptlk":"application/listenup",".pub":"application/x-mspublisher",".pvx":"video/x-pv-pvx",".qcp":"audio/vnd.qcelp",".qt":"video/quicktime",".qti":"image/x-quicktime",".qtif":"image/x-quicktime",".r3t":"text/vnd.rn-realtext3d",".ra":"audio/x-pn-realaudio",".ram":"audio/x-pn-realaudio",".ras":"image/x-cmu-raster",".rc":"text/plain",".rdf":"application/rdf+xml",".rf":"image/vnd.rn-realflash",".rgb":"image/x-rgb",".rlf":"application/x-richlink",".rm":"audio/x-pn-realaudio",".rmf":"audio/x-rmf",".rmi":"audio/mid",".rmm":"audio/x-pn-realaudio",".rmvb":"audio/x-pn-realaudio",".rnx":"application/vnd.rn-realplayer",".roff":"application/x-troff",".rp":"image/vnd.rn-realpix",".rpm":"audio/x-pn-realaudio-plugin",".rt":"text/vnd.rn-realtext",".rte":"x-lml/x-gps",".rtf":"application/rtf",".rtg":"application/metastream",".rtx":"text/richtext",".rv":"video/vnd.rn-realvideo",".rwc":"application/x-rogerwilco",".s3m":"audio/x-mod",".s3z":"audio/x-mod",".sca":"application/x-supercard",".scd":"application/x-msschedule",".sct":"text/scriptlet",".sdf":"application/e-score",".sea":"application/x-stuffit",".setpay":"application/set-payment-initiation",".setreg":"application/set-registration-initiation",".sgm":"text/x-sgml",".sgml":"text/x-sgml",".sh":"application/x-sh",".shar":"application/x-shar",".shtml":"magnus-internal/parsed-html",".shw":"application/presentations",".si6":"image/si6",".si7":"image/vnd.stiwap.sis",".si9":"image/vnd.lgtwap.sis",".sis":"application/vnd.symbian.install",".sit":"application/x-stuffit",".skd":"application/x-Koan",".skm":"application/x-Koan",".skp":"application/x-Koan",".skt":"application/x-Koan",".slc":"application/x-salsa",".smd":"audio/x-smd",".smi":"application/smil",".smil":"application/smil",".smp":"application/studiom",".smz":"audio/x-smd",".snd":"audio/basic",".spc":"application/x-pkcs7-certificates",".spl":"application/futuresplash",".spr":"application/x-sprite",".sprite":"application/x-sprite",".sdp":"application/sdp",".spt":"application/x-spt",".src":"application/x-wais-source",".sst":"application/vnd.ms-pkicertstore",".stk":"application/hyperstudio",".stl":"application/vnd.ms-pkistl",".stm":"text/html",".svg":"image/svg+xml",".sv4cpio":"application/x-sv4cpio",".sv4crc":"application/x-sv4crc",".svf":"image/vnd",".svh":"image/svh",".svr":"x-world/x-svr",".swf":"application/x-shockwave-flash",".swfl":"application/x-shockwave-flash",".t":"application/x-troff",".talk":"text/x-speech",".tar":"application/x-tar",".taz":"application/x-tar",".tbp":"application/x-timbuktu",".tbt":"application/x-timbuktu",".tcl":"application/x-tcl",".tex":"application/x-tex",".texi":"application/x-texinfo",".texinfo":"application/x-texinfo",".tgz":"application/x-compressed",".thm":"application/vnd.eri.thm",".tif":"image/tiff",".tiff":"image/tiff",".tki":"application/x-tkined",".tkined":"application/x-tkined",".toc":"application/toc",".toy":"image/toy",".tr":"application/x-troff",".trk":"x-lml/x-gps",".trm":"application/x-msterminal",".tsi":"audio/tsplayer",".tsp":"application/dsptype",".tsv":"text/tab-separated-values",".ttz":"application/t-time",".txt":"text/plain",".uls":"text/iuls",".ult":"audio/x-mod",".ustar":"application/x-ustar",".uu":"application/x-uuencode",".uue":"application/x-uuencode",".vcd":"application/x-cdlink",".vcf":"text/x-vcard",".vdo":"video/vdo",".vib":"audio/vib",".viv":"video/vivo",".vivo":"video/vivo",".vmd":"application/vocaltec-media-desc",".vmf":"application/vocaltec-media-file",".vmi":"application/x-dreamcast-vms-info",".vms":"application/x-dreamcast-vms",".vox":"audio/voxware",".vqe":"audio/x-twinvq-plugin",".vqf":"audio/x-twinvq",".vql":"audio/x-twinvq",".vre":"x-world/x-vream",".vrml":"x-world/x-vrml",".vrt":"x-world/x-vrt",".vrw":"x-world/x-vream",".vts":"workbook/formulaone",".wav":"audio/x-wav",".wax":"audio/x-ms-wax",".wbmp":"image/vnd.wap.wbmp",".wcm":"application/vnd.ms-works",".wdb":"application/vnd.ms-works",".web":"application/vnd.xara",".webm":"video/webm",".wi":"image/wavelet",".wis":"application/x-InstallShield",".wks":"application/vnd.ms-works",".wm":"video/x-ms-wm",".wma":"audio/x-ms-wma",".wmd":"application/x-ms-wmd",".wmf":"application/x-msmetafile",".wml":"text/vnd.wap.wml",".wmlc":"application/vnd.wap.wmlc",".wmls":"text/vnd.wap.wmlscript",".wmlsc":"application/vnd.wap.wmlscriptc",".wmlscript":"text/vnd.wap.wmlscript",".wmv":"audio/x-ms-wmv",".wmx":"video/x-ms-wmx",".wmz":"application/x-ms-wmz",".wpng":"image/x-up-wpng",".wpt":"x-lml/x-gps",".wri":"application/x-mswrite",".wrl":"x-world/x-vrml",".wrz":"x-world/x-vrml",".ws":"text/vnd.wap.wmlscript",".wsc":"application/vnd.wap.wmlscriptc",".wv":"video/wavelet",".wvx":"video/x-ms-wvx",".wxl":"application/x-wxl",".x-gzip":"application/x-gzip",".xaf":"x-world/x-vrml",".xar":"application/vnd.xara",".xbm":"image/x-xbitmap",".xdm":"application/x-xdma",".xdma":"application/x-xdma",".xdw":"application/vnd.fujixerox.docuworks",".xht":"application/xhtml+xml",".xhtm":"application/xhtml+xml",".xhtml":"application/xhtml+xml",".xla":"application/vnd.ms-excel",".xlc":"application/vnd.ms-excel",".xll":"application/x-excel",".xlm":"application/vnd.ms-excel",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".xlt":"application/vnd.ms-excel",".xlw":"application/vnd.ms-excel",".xm":"audio/x-mod",".xml":"application/xml",".xmz":"audio/x-mod",".xof":"x-world/x-vrml",".xpi":"application/x-xpinstall",".xpm":"image/x-xpixmap",".xsit":"text/xml",".xsl":"text/xml",".xul":"text/xul",".xwd":"image/x-xwindowdump",".xyz":"chemical/x-pdb",".yz1":"application/x-yz1",".z":"application/x-compress",".zac":"application/x-zaurus-zac",".json":"application/json",".vsd":"application/vnd.visio",".et":"application/kset",".wps":"application/kswps",".dps":"application/ksdps"};const Cs={0:"js.css.pdf.psd.ai.txt.eps.txt",xls:"xls.xlsx",doc:"doc.docx.rtf",ppt:"ppt.pptx",htm:"htm.html",zip:"rar.zip.tar.jar.z.7z.ace.lzh.arj.gzip.bz2.cab.uue",fla:"fla.swf",fon:"eot.otf.fon.font.ttf.ttc.woff.woff2",iso:"iso.nrg.mds.mdf.bin.cue.img.fcd.lcd.dmg",vid:"avi.asf.wmv.avs.flv.mkv.mov.3gp.mp4.webm.mpa.mpe.mpg.mpeg.dat.dsm.ogm.vob.rm.rmvb.ts.tp.ifo.nsv.m4u.m4v.asx.asr.movie.fvi.pvx.rv.vdo.viv.vivo.wm.wmx.wv.wvx.mpv2.mpg4",aud:"aif.aifc.aiff.als.awb.mp3.aac.au.wav.wma.cda.flac.m4a.mid.mka.mp2.mpc.ape.ofr.ogg.ra.wv.tta.ac3.dts.wv.shn.vqf.spc.nsf.adx.psf.minipsf.psf2.minipsf2.rsn.zst",img:"jpg.jpeg.gif.png.bmp.tif.tiff.ico"},Ms={};for(let t in Cs)Cs[t].split(".").forEach(e=>{Ms[e]="0"==t?e:t});const Ps={video:Cs.vid,audio:Cs.aud,image:Cs.img};for(let t in Ps)Ps[t]=Ps[t].split(".").map(t=>`*.${t};`).join("");const Vs=function(t){let e=It.strFrom(t||"",".",!0).toLowerCase();return Ms[e]||"file"},$s=function(t){let e;return null==t||isNaN(t)||(t+="K"),(t=It.number(t.replace(/[a-z]+$/i,function(t){return e=t.charAt(0).toUpperCase(),""})))*("K"===e?1024:"M"===e?1048576:"G"===e?1073741824:"T"===e?1099511627776:1)};var zs={name:"w-fileupload",mixins:[ji],props:["uploadSrc","thumbnailSrc","downloadSrc","uploadLimit","sizeLimit","maxFileSize","minFileSize","fileTypes","filter","success","error","itemWidth","align","vertical","gap","checkFile"],data:()=>({list:[],emiting:!1}),created(){this.$watch(()=>this.x.modelValue,t=>{if(this.emiting)return this.emiting=!1;t&&"string"==typeof t&&(t=JSON.parse(t)),this.list=Array.isArray(t)?t.map(t=>({value:t})):t?[{value:t}]:[]},{immediate:!0})},methods:{x_default:()=>({gap:10,vertical:!0}),val(t){if(0==arguments.length){let t=[];return this.list.forEach(e=>e.value&&t.push(e.value)),t}this.x.modelValue=t,this.$emit("update:modelValue",t),this.trigger("change",t)},getInputValue:t=>0==t.length?"":JSON.stringify(t),getFileTypes(){let t=this.x.fileTypes;return Ps[t]&&(t=Ps[t]),t&&"*.*"!==t?t.replace(/\*/g,"").replace(/;/g,",").toLowerCase():""},getAccept(){let t=[],e=this.getFileTypes();if(!e)return;let i=[];return e.toLowerCase().split(",").forEach(t=>{t&&i.push(t)}),i.forEach(e=>{e&&t.push(function(t){let e=G(t,".",!0)||t;return Ts["."+e]}(e)||e)}),t.join(",")},isImage:t=>"img"==Vs(t.value?t.value.name:t.file.name),isVideo:t=>"vid"==Vs(t.value?t.value.name:t.file.name),isAudio:t=>"aud"==Vs(t.value?t.value.name:t.file.name),fileSelected(t){if(this.x.uploadLimit>1&&t.target.files.length+this.list.length>this.x.uploadLimit)return t.target.value="",It.alert(It.loc.ps(It.loc.form.upload_limit,this.x.uploadLimit));let e,i,s,l,r=this.x.maxFileSize&&$s(this.x.maxFileSize),a=this.x.minFileSize&&$s(this.x.minFileSize),o=this.getFileTypes(),n=this.x.checkFile,h=n&&this.list.filter(t=>t.file).map(t=>t.file),c=n&&this.list.filter(t=>t.value).map(t=>t.value);It.lodash.each(t.target.files,u=>{let d="."+It.strFrom(u.name,".",!0).toLowerCase();if(r&&u.size>r)(e||(e=[])).push(u.name);else if(a&&u.size<a)(i||(i=[])).push(u.name);else if(o&&!It.idsAny(o,d,","))(s||(s=[])).push(u.name);else{let e=n&&n(u,t.target.files,h,c);e?(l||(l=[])).push(e):this.list.push({file:u})}}),e?It.alert(It.loc.ps(It.loc.form.upload_maxfilesize,e.join("<br>"),this.x.maxFileSize)):i?It.alert(It.loc.ps(It.loc.form.upload_minfilesize,i.join("<br>"),this.x.minFileSize)):s?It.alert(It.loc.ps(It.loc.form.upload_invalid_file_type,s.join("<br>"),o)):l&&It.alert(l.join("<br>")),t.target.value="",this.nextUpload()},upload(t){if(this.x.uploadSrc&&!t.loading){let e=It.urlFormat(this.x.uploadSrc,this.x.data,this.x),i=new FormData;i.append("Filedata",t.file),t.loading=!0,t.source=It.http.CancelToken.source(),It.http.post(e,i,{onUploadProgress:e=>t.progress=Math.floor(e.loaded/e.total*100),cancelToken:t.source.token}).then(e=>{t.loading=!1,t.loaded=!0,t.source=null;let i=this.x.filter?this.x.filter(e,this):e.data;i?i.error?t.error=i.error:i.id?(t.value=i,this.x.success&&this.x.success(t.value,this,e)):t.error={message:It.loc.ps(It.loc.form.upload_invalid_data,JSON.stringify(i))}:t.error={message:It.loc.form.upload_no_data},t.error&&t.error.message&&It.alert(t.error.message),this.nextUpload()}).catch(e=>{t.error=e,t.loading=!1,t.loaded=!0,t.source=null,this.nextUpload(),e.response&&e.response.status&&It.alert(e.response.status+": "+e)})}else if(!this.x.uploadSrc){let e="请给上传组件配置uploadSrc";t.error={message:e},console.error(e),this.nextUpload()}},nextUpload(){for(let t of this.list){if(t.loading)return;if(!t.error&&(t.file&&!t.loaded))return this.upload(t)}this.emiting=!0;let t=this.val();this.$emit("update:modelValue",t),this.trigger("change",t)},clickItem(t,e){e.value&&(this.getOn("click:item")?(t.runType="click:item",this.trigger(t,e.value,this.val())):this.x.downloadSrc&&It.download(It.urlServer(this.x.downloadSrc,e.value,this.x.data)))},remove(t){t.source&&t.source.cancel();let e=this.list.findIndex(e=>e==t);this.list.splice(e,1),this.nextUpload()},formText(){return this.val().map(t=>t.name).join(", ")},chooseFile(){this.$refs.file.click()},html_list(){return this.list.map(t=>{let e=t.value,i=e?e.name:t.file.name,s=[a("div",{class:"w-fileupload-value-close f-i f-i-trash",title:It.loc.remove,onclick:e=>this.remove(t)})];e&&this.$slots.menu&&s.push(a(li,null,{target:()=>a("div",{class:"w-fileupload-value-menu f-i f-i-ellipsis",title:It.loc.more}),default:()=>this.$slots.menu({item:e})}));let l=e?e.id:t.key;return l||(t.key=l=It.uid()),this.$slots.name&&(i=this.$slots.name({item:t.value||t.file})),a("div",{key:l,class:["w-fileupload-value",{"z-loading":!t.error&&(t.loading||t.file&&!t.loaded),"z-err":t.error}],style:{"--w-upload-progress":t.file?`${t.progress||0}%`:"",width:It.unitSize(this.x.itemWidth)},title:t.error?t.error.message:i},[a("i",{class:["w-fileupload-value-icon f-i","f-i-file-"+Vs(i)],onclick:e=>this.clickItem(e,t)}),t.error&&a("div",{class:"w-fileupload-value-error"},It.loc.form.upload_error),a("div",{class:"w-fileupload-value-text f-line-1",onclick:e=>this.clickItem(e,t)},i),s])})},html_input_form(){return[this.html_input_hidden(),a("input",{type:"file",ref:"file",multiple:1!=this.x.uploadLimit,accept:this.getAccept(),onchange:this.fileSelected,class:"f-hide"})]},html_input_button(){return a("div",{},[a(Mi,{ref:"uploadbbr",class:"w-fileupload-bbr",gap:10},{default:()=>[this.$slots.button?this.$slots.button(this):a(ti,{text:"选择文件",icon:".f-i .f-i-upload",class:"w-fileupload-button",onclick:this.chooseFile,disabled:!this.canUpload}),this.slot("right")]}),this.slot("down")])},html_input_list(){return this.list.length?a("div",{ref:"list",class:["w-fileupload-list",{"f-clearfix":this.x.vertical}]},this.html_list()):null},html_input(){return this.html_input_form().concat(this.html_input_button(),this.html_input_list())},html_main(){return a("div",{class:"w-formbase-main"},this.html_form())},html_slots(){return[this.html_label(),this.html_main()]}},computed:{validHooks(){return{...this.pubValidHooks,validateDefault:t=>{for(let t of this.list){if(t.loading)return this.formErr({type:"upload_loading"});if(t.error)return this.formErr({type:"upload_invalid_file"})}}}},input_value(){return this.getInputValue(this.val())},errorTipTarget(){return this.$refs.uploadbbr||this},canUpload(){return!!this.isNormal&&!(this.x.uploadLimit>0&&this.list.length>=this.x.uploadLimit)},dir:()=>"v",html_class(){return{"z-vertical":this.x.vertical,"z-horizontal":!this.x.vertical,"z-compat":It.br.compat.gap}},html_style:()=>({"--w-label-min-height":"32px"}),html_on(){return{onclick:()=>this.warn(!1)}}},__file:"src/widgets/FileUpload.vue"},Ds={props:["item"],inject:["provideUpload"],data:()=>({dataURL:null}),methods:{click(t){this.provideUpload.clickItem(t,this.item,this.provideUpload)},createImageThumbnail(){let t=new FileReader;t.onload=t=>{this.item.loaded||(this.dataURL=t.target.result)},t.readAsDataURL(this.item.file)},createVideoThumbnail(){let t=document.createElement("video");t.addEventListener("loadeddata",()=>{setTimeout(()=>{if(this.item.loaded)return;let e=document.createElement("canvas"),i=e.getContext("2d");e.width=t.videoWidth,e.height=t.videoHeight,i.drawImage(t,0,0),this.dataURL=e.toDataURL("image/png"),t.pause(),It.q(t).remove()},150)}),t.src=URL.createObjectURL(this.item.file),t.muted=!0,t.play()},setProgress(t){let e=this.$refs.loading;if(!this.item.loading||!e)return;let i=e.getContext("2d");e.width=e.width,i.beginPath(),i.translate(17,17),i.moveTo(0,0),i.arc(0,0,15,.5*-Math.PI,Math.PI*(2*t/100-.5)),i.closePath(),i.fillStyle="rgba(255,255,255,.7)",i.fill(),i.beginPath(),i.arc(0,0,16,0,2*Math.PI),i.strokeStyle="#fff",i.stroke()},remove(t){this.upload.remove(this.item),t.stopPropagation()}},computed:{upload(){return this.provideUpload},img(){return this.$refs.thumbnail.$refs.img},src(){return this.item.value?It.urlServer(this.item.value.thumbnail||this.upload.x.thumbnailSrc,this.item.value,this.upload.x.data):""},name(){return this.item.value?this.item.value.name:this.item.file.name},tip(){return this.item.error?this.item.error.message:this.name},titleRemove:()=>It.loc.remove,titleMore:()=>It.loc.more,canPlay(){return this.item.value&&(this.upload.isVideo(this.item)||this.upload.isAudio(this.item))},menus(){return this.upload.$slots.menu({item:this.item.value})}},mounted(){!this.item.loaded&&this.item.file&&(this.upload.isVideo(this.item)?this.createVideoThumbnail():this.upload.isImage(this.item)&&this.createImageThumbnail(),this.$watch(()=>this.item.progress,t=>this.setProgress(t),{immediate:!0}))}};const Es={class:"f-line-1"},Ls={key:0,ref:"loading",width:"34",height:"34",class:"w-mediaupload-progress-loading f-abs-center"},As={key:1,class:"w-mediaupload-cover-play f-abs-center f-flex-center f-i f-i-play"},Hs={class:"w-mediaupload-value-oper"},Fs=["title"],Is=["title"];Ds.render=function(t,e,i,s,l,r){const a=n("w-menu"),o=n("w-img");return u(),c(o,{class:P(["w-mediaupload-value",{"z-loading":i.item.loading,"z-canplay":r.canPlay,"z-err":i.item.error}]),ref:"thumbnail",src:r.src,"data-url":l.dataURL,width:r.upload.x.thumbnailWidth,"img-width":r.upload.x.thumbnailWidth-2,"img-height":r.upload.x.thumbnailHeight-2,tip:r.tip,onClick:r.click},N({cover:d(()=>[i.item.loading?(u(),p("canvas",Ls,null,512)):r.canPlay?(u(),p("i",As)):w("v-if",!0),m("div",Hs,[r.upload.isNormal?(u(),p("i",{key:0,class:"w-mediaupload-value-close f-flex-center f-i f-i-trash",title:r.titleRemove,onClick:e[0]||(e[0]=(...t)=>r.remove&&r.remove(...t))},null,8,Fs)):w("v-if",!0),i.item.value&&r.upload.$slots.menu?(u(),c(a,{key:1},{target:d(()=>[m("i",{class:"w-mediaupload-value-menu f-flex-center f-i f-i-ellipsis",title:r.titleMore},null,8,Is)]),default:d(()=>[(u(!0),p(f,null,g(r.menus,t=>(u(),c(Y(t)))),256))]),_:1})):w("v-if",!0)])]),_:2},[r.upload.x.showFileName?{name:"default",fn:d(()=>[m("div",Es,v(r.name),1)]),key:"0"}:void 0]),1032,["class","src","data-url","width","img-width","img-height","tip","onClick"])},Ds.__file="src/widgets/MediaUploadItem.vue";var Ns={name:"w-mediaupload",mixins:[zs],props:["thumbnailWidth","thumbnailHeight","showFileName"],provide(){return{provideUpload:this}},methods:{x_default:()=>({fileTypes:"video",thumbnailWidth:80,thumbnailHeight:80,gap:10}),html_list(){return this.list.map((t,e)=>{let i=t.value?t.value.id:t.key;return i||(t.key=i=It.uid()),a(Ds,{item:t,index:e,key:i})})},html_input_button(){return a("div",{},[a(Mi,{ref:"uploadbbr",class:"w-fileupload-bbr"},{default:()=>[this.$slots.button?this.$slots.button(this):a(ti,{ref:"uploadbutton",title:It.loc.form.choose_image,icon:".f-i .f-i-plus",class:"w-mediaupload-button",style:{width:It.unitSize(this.x.thumbnailWidth),height:It.unitSize(this.x.thumbnailHeight)},onclick:this.chooseFile}),this.slot("right")]}),this.slot("down")])},html_input(){return this.html_input_form().concat(a($e,{width:"*",class:"w-mediaupload-list",align:this.x.align,gap:this.x.gap},{default:()=>[this.html_list(),this.canUpload&&this.html_input_button()]}))}},computed:{html_style(){return{"--w-thumbnail-width":It.unitSize(this.x.thumbnailWidth),"--w-label-min-height":It.unitSize(this.x.thumbnailHeight),"--w-gap":It.unitSize(this.x.gap)}}},__file:"src/widgets/MediaUpload.vue"},Ys={name:"w-imageupload",mixins:[Ns],methods:{x_default:()=>({fileTypes:"image",thumbnailWidth:80,thumbnailHeight:80,gap:10})},computed:{html_class:()=>"w-mediaupload"},__file:"src/widgets/ImageUpload.vue"},Bs={name:"w-option",mixins:[Te],props:["value","text","disabled"],inject:["provideOptionParent"],methods:{click(t){this.provideOptionParent.clickOption&&this.provideOptionParent.clickOption(this,t)}},computed:{isFocus(){let t=this.provideOptionParent.x.modelValue;return Array.isArray(t)?t.includes(this.value):It.idsAny(t,this.value)},isMul(){return this.provideOptionParent.x.multiple}}};const Os=["disabled","title"],js={class:"f-flex-1 f-line-1"};Bs.render=function(t,e,i,s,l,a){return u(),p("button",r(t.html_attrs,{class:["f-flex-align",a.provideOptionParent.$options.name+"-option",{"z-on":a.isFocus,"z-ds":i.disabled,"z-mul":a.isMul}],onClick:e[0]||(e[0]=(...t)=>a.click&&a.click(...t)),disabled:i.disabled,title:i.text}),[m("div",js,[k(t.$slots,"default",{},()=>[b(v(i.text),1)])]),a.isMul?(u(),p("div",{key:0,class:P(["w-option-checked",{"f-i f-i-check":a.isFocus}])},null,2)):w("v-if",!0)],16,Os)},Bs.__file="src/widgets/Option.vue";var qs={name:"w-spinner",mixins:[ws],inject:["provideRangeParent"],props:["decimal","format","showButton","buttonPosition","step","autoFix","compare","minValue","maxValue"],mounted(){this.x.format&&this.doFormat()},methods:{x_default:()=>({step:1,autoFix:!0,showButton:!0,buttonPosition:"right"}),doFormat(t){let e=""+this.x.modelValue,i=this.x.format.separator||",",s=RegExp(i.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),"g"),l=It.numFormat(e,this.x.format.length,i,this.x.format.rightward);if(e!==l){let i=this.$refs.v.selectionStart,r=e.slice(0,i).replace(s,"");if(this.val(l,t),document.activeElement===this.$refs.v){let t=l.slice(0,i).replace(s,"");this.$nextTick(()=>It.rngCursor(this.$refs.v,i+(r.length-t.length)))}}},stepBy(t,e){if(!this.isNormal)return;let i=this.defaultRuleValue("maxValue"),s=this.defaultRuleValue("minValue"),l=this.val(),r=It.numAdd(It.number(l),t*this.x.step),a=this.provideRangeParent&&this.provideRangeParent.forms(),o=r;if(null!=i&&(o=Math.min(i,o)),null!=s&&(o=Math.max(s,o)),a)if(a[0]==this){let t=a[1].val();null!=t&&(o=Math.min(t,o))}else if(a[1]==this){let t=a[0].val();null!=t&&(o=Math.max(t,o))}this.warn(!1),this.focus(),this.val(o,e),o==r&&this.tip_uid&&(It.close(this.tip_uid),this.tip_uid=null),this.x.format&&this.doFormat(e)},isUsableVal(t){return!this.getValidErrorSync(null,t)},isFocusTarget(t){return this.$refs.buttonMinus&&this.$refs.buttonMinus.contains(t)||this.$refs.buttonPlus&&this.$refs.buttonPlus.contains(t)},getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=e.mode||"<=",s=e.target.isWidget?e.target:this.ownerView.f(e.target),l=s&&s.formVal();if(t&&l&&It.isNumber(t)&&It.isNumber(l)){let e=It.number(t),r=It.number(l);if(!It.eval("d"+i+"td",{d:e,td:r}))return[this.getLabelText(),i,s.getLabelText()]}}},oninput(t){this.val(t.target.value,t),this.x.format&&this.doFormat(t)},onfocus(t){this.baseFocus(t)},onblur(t){let e=this.x.modelValue;if(e&&!this.isUsableVal(e)&&this.x.autoFix){let i=It.numDecimal(e,this.x.decimal);i=It.numRange(i,this.x.minValue,this.x.maxValue),this.val(i,t)}this.baseBlur(t)},html_button(){let t,e=[];return this.x.clearable&&this.isNormal&&(t=a("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),this.x.showButton?(t&&e.push(t),"right"===this.x.buttonPosition?e.push(a("div",{class:"w-spinner-step w-input-button f-flex-column f-oh"},[a("button",{ref:"buttonPlus",class:"w-spinner-step-up f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(1,t),innerHTML:'<i class="f-abs-center f-i f-i-caret-up"></i>'}),a("button",{ref:"buttonMinus",class:"w-spinner-step-down f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(-1,t),innerHTML:'<i class="f-abs-center f-i f-i-caret-down"></i>'})])):"between"===this.x.buttonPosition&&e.push(a("button",{ref:"buttonMinus",class:"w-spinner-step-minus f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(-1,t),innerHTML:'<i class="f-abs-center f-i f-i-minus"></i>'}),a("button",{ref:"buttonPlus",class:"w-spinner-step-plus f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(1,t),innerHTML:'<i class="f-abs-center f-i f-i-plus"></i>'}))):t&&e.push(t),e}},computed:{validHooks(){return{...this.pubValidHooks,minValue:(t,e,i)=>{if(t&&null!=e&&""!==e&&(It.isNumber(e)?It.number(t)<It.number(e):t<e))return this.formErr(i,[e])},maxValue:(t,e,i)=>{if(t&&null!=e&&""!==e&&(It.isNumber(e)?It.number(t)>It.number(e):t>e))return this.formErr(i,[e])},compare:(t,e,i)=>{let s=this.getCompareError(t,e);if(s)return this.formErr(i,s)},validateDefault:t=>{if(this.x.format&&(t=t.replace(RegExp(this.x.format.separator||",","g"),"")),null!=t){if(!It.isNumber(t))return this.formErr({type:"number_invalid"});let e=this.x.decimal;if(t=""+t,!e&&t.includes("."))return this.formErr({type:"number_integer"});if(e&&e>0&&It.strFrom(t,".").length>e)return this.formErr({type:"number_decimal_digit"},[e]);let i=this.provideRangeParent&&this.provideRangeParent.getRangeError();if(i)return this.formErr({type:"compare"},i)}}}},isReadonly(){if(null==this.x.readonly){let t=this.provideRangeParent;if(t&&t.x.readonly)return!0}return!!this.x.readonly},isDisabled(){if(null==this.x.disabled){let t=this.provideRangeParent;if(t&&t.x.disabled)return!0}return!!this.x.disabled},input_prop(){return{"w-valuetype":"number",oninput:this.oninput,onfocus:this.onfocus,onblur:this.onblur}},html_class(){return["z-buttonposition-"+this.x.buttonPosition,{"z-val":this.hasVal,"z-clearable":!!this.x.clearable}]}},__file:"src/widgets/Spinner.vue"},Rs={name:"w-datepicker",mixins:[ws],inject:["provideRangeParent"],props:["showButton","multiple","format","autoFix","compare","minValue","maxValue","dropProps","enableHour","enableMinute","enableSecond","defaultHour","defaultMinute","defaultSecond"],data:()=>({showDrop:!1,currentDate:null,lastValue:null,placeholder_type:"placeholder_select"}),methods:{x_default:()=>({format:"yyyy-MM-dd",autoFix:!0,showButton:!0}),isUsableVal(t){if(!t)return!0;if(!It.dateValid(t,this.x.format))return!1;let e=this.x.enableHour&&It.arrayNumber(this.x.enableHour),i=this.x.enableMinute&&It.arrayNumber(this.x.enableMinute),s=this.x.enableSecond&&It.arrayNumber(this.x.enableSecond);if(e||i||s){let l=It.dateParse(t,this.x.format);if(e&&!e.includes(l.getHours())||i&&!i.includes(l.getMinutes())||s&&!s.includes(l.getSeconds()))return!1}return!0},onfocus(t){this.lastValue=this.x.modelValue,this.baseFocus(t)},onkeyup(){this.isNormal&&(this.showDrop=!0)},onCloseDrop(){this.showDrop=!1,this.currentDate=null,this.doAutoFix()},clickButtonClear(t){t.stopPropagation(),this.hasVal&&(this.val("",t),this.$emit("clear",t))},doAutoFix(){let t=this.x.modelValue;if(t)if(this.isUsableVal(t)){let e=/\b(\d)\b/g;e.test(t)&&this.val(t.replace(e,"0$1"))}else this.x.autoFix&&this.val(this.lastValue)},drop(){It.br.mobile?It.dateSheet({value:this.x.modelValue,format:this.x.format,...this.getPeriod(),success:this.calendarCallback}):this.showDrop=!0},calendarCallback(t,e){this.val(t,e),this.showDrop=!1,this.currentDate=null,It.br.mobile||this.focus()},getPeriod(){let t=this.x.minValue,e=this.x.maxValue,i=this.provideRangeParent&&this.provideRangeParent.forms();if(i)if(i[0]==this){let t=i[1].formVal();null!=t&&(null==e||e>t)&&(e=t)}else if(i[1]==this){let e=i[0].formVal();null!=e&&(null==t||t<e)&&(t=e)}return{minValue:t,maxValue:e}},getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=this.x.format,s=e.mode||"<=",l=e.target.isWidget?e.target:this.ownerView.f(e.target),r=l&&l.formVal();if(t&&r&&It.dateValid(t,i)&&It.dateValid(r,i)){let e=It.dateParse(t,i),a=It.dateParse(r,i);if(!It.eval("d"+s+"td",{d:e,td:a}))return[this.getLabelText(),s,l.getLabelText()]}}},html_button(){let t=[],e=this.x.format||"",i=0;e.includes("H")&&i++,e.includes("m")&&i++,e.includes("s")&&i++;let s,l=/[Hms]/.test(e)&&!/[yMd]/.test(e);if(this.x.clearable&&this.isNormal&&(s=a("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),this.x.showButton){let e=[a("button",{class:"w-input-button-drop w-input-button f-i f-i-date"})];s&&e.push(s),t.push(a("div",{class:"w-input-buttonbar"},e))}else s&&t.push(s);if(this.showDrop){let e={ownproperty:!0,class:["f-dfish-dialog w-calendar-dialog",{"z-hastime":i,"z-onlytime":l}],style:{"--w-datepicker-time-cols":i||""},context:this,autoHide:!0,snap:()=>this.snapElem(),position:"v",indent:1};e=this.mergeDropProps(e),t.push(a(Ne,e,{default:()=>a(es,{height:"*",pad:!0,current:this.currentDate||this.x.modelValue||"",value:this.x.modelValue,format:this.x.format,...this.getPeriod(),enableHour:this.x.enableHour,enableMinute:this.x.enableMinute,enableSecond:this.x.enableSecond,defaultHour:this.x.defaultHour,defaultMinute:this.x.defaultMinute,defaultSecond:this.x.defaultSecond,success:this.calendarCallback,"onClick:item":(t,e)=>{this.currentDate=e.value}})}))}return t}},computed:{validHooks(){return{...this.pubValidHooks,minValue:(t,e,i)=>{if(t&&It.dateParse(t,this.x.format)<It.dateParse(e,this.x.format))return this.formErr(i,[e])},maxValue:(t,e,i)=>{if(t&&It.dateParse(t,this.x.format)>It.dateParse(e,this.x.format))return this.formErr(i,[e])},compare:(t,e,i)=>{let s=this.getCompareError(t,e);if(s)return this.formErr(i,s)},validateDefault:(t,e,i)=>{if(this.x.multiple)return;if(t){let e=t,i=It.dateParse(e,this.x.format),s=i.getFullYear(),l=9999,r=1e3;if(s>l||s<r)return this.formErr({type:"time_exceed"},[r,l]);if(e!=It.dateFormat(i,this.x.format))return this.formErr({type:"time_format"},[It.dateFormat(new Date,this.x.format)])}if(this.defaultRuleValue("beforeNow")&&t&&t>It.dateFormat(new Date,this.x.format))return this.formErr({type:"beforeNow"},[this.x.beforeNow]);if(this.defaultRuleValue("afterNow")&&t&&t<It.dateFormat(new Date,this.x.format))return this.formErr({type:"afterNow"},[this.x.afterNow]);let s=this.provideRangeParent&&this.provideRangeParent.getRangeError();return s?this.formErr({type:"compare"},s):void 0}}},isReadonly(){if(null==this.x.readonly){let t=this.provideRangeParent;if(t&&t.x.readonly)return!0}return!!this.x.readonly},isDisabled(){if(null==this.x.disabled){let t=this.provideRangeParent;if(t&&t.x.disabled)return!0}return!!this.x.disabled},input_prop(){return It.br.mobile?{readonly:!0}:{onfocus:this.onfocus,onkeyup:this.onkeyup}},form_prop(){return{onclick:this.isNormal&&this.drop}},html_class(){return{"z-drop":this.showDrop,"z-val":this.hasVal,"z-droppable":!0,"z-clearable":this.x.clearable}}},mounted(){this.$watch("modelValue",t=>{if(this.x.autoFix&&t&&(t=It.strTrim(t))){if(!It.dateValid(t,this.x.format)){let e=It.dateParse(t,this.x.format);t=It.dateFormat(e,this.x.format),this.val(t)}this.lastValue=t}},{immediate:!0})},__file:"src/widgets/DatePicker.vue"},Ws={name:"w-dropbox",mixins:[ji],provide(){return{provideOptionParent:this}},props:["multiple","cancelable","clearable","dropProps"],emits:["clear"],data:()=>({hasBorder:!0,text:"",dropper:null,showDrop:!1,placeholder_type:"placeholder_select"}),methods:{click(){this.$slots.default&&(this.showDrop=!this.showDrop,this.warn(!1))},clickOption(t,e){if(this.x.multiple){let e=It.arrayID(this.val()).concat();t.isFocus?It.lodash.pull(e,t.value):e.push(t.value),this.val(e)}else{let i=this.x.cancelable&&t.isFocus?"":t.value;this.val(i,e),this.showDrop=!1}},clickButtonClear(t){this.x.clearable&&this.hasVal&&(t.stopPropagation(),this.val(""),this.$emit("clear",t))},formText(){return this.input_text},html_input(){let t=It.string(this.input_text),e=this.input_placeholder,i=!!It.br.mobile,s=[this.html_input_hidden(),a("div",{class:"w-dropbox-text f-line-1",title:t||e},t||e&&a("div",{class:"w-input-placeholder"},e))];if(this.showDrop){let t={context:this,ownproperty:!0,class:"f-dfish-dialog w-dropbox-dialog"+(i?" z-mob":""),width:i?"100%":It.bcr(this.el("form")).width,autoHide:!0,cover:i,snap:i?null:()=>this.el("form"),position:i?null:"v",indent:1,scrollY:!0,scrollView:".z-on"};t=this.mergeDropProps(t),s.push(a(Ne,t,this.$slots))}return s},html_button(){let t=[a("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})];return this.x.clearable&&this.isNormal&&t.push(a("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),a("div",{class:"w-input-buttonbar"},t)}},computed:{input_text(){let t=[],e=this.slots_children(),i=It.arrayID(this.x.modelValue);return It.lodash.each(i,i=>{let s=e.findIndex(t=>t.props.value==i);if(s>-1&&t.push(s),!this.x.multiple)return!1}),t.sort().map(t=>e[t].props.text).join(", ")},form_prop(){return{onclick:this.isNormal&&this.click}},html_class(){return{"z-val":this.hasVal,"z-drop":this.showDrop,"z-droppable":!0,"z-clearable":this.x.clearable}}},__file:"src/widgets/DropBox.vue"},Us={name:"w-pickbox",mixins:[Ws],props:["picker"],methods:{getInputValue:t=>"string"==typeof t?t:It.array(t).map(t=>t.value).join(","),click(t){this.$slots.default?(this.showDrop=!this.showDrop,this.warn(!1)):this.x.picker&&this.clickButtonPicker(t)},clickButtonPicker(t){t&&t.stopPropagation();let e=this.x.picker;"function"==typeof e&&e(t,this)},closeDrop(){return this.showDrop=!1,this},html_button(){let t=[];if(this.$slots.default||this.x.clearable&&this.isNormal){let e=[];this.$slots.default&&e.push(a("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&this.isNormal&&e.push(a("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(a("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(a("button",{class:"w-input-button-picker w-input-button f-i f-i-ellipsis",disabled:!this.isNormal,onclick:this.clickButtonPicker})),t}},computed:{hasVal(){return this.input_text},input_text(){let t=this.x.modelValue;return t&&"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(t)?t.map(t=>t.text).join(", "):t&&t.text||""}},__file:"src/widgets/PickBox.vue"},Xs={name:"w-password",mixins:[ws],props:["compare","showPassword"],data:()=>({passwordVisible:!1}),methods:{getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=e.mode||"==",s=e.target.isWidget?e.target:this.ownerView.f(e.target),l=s&&s.formVal();if(t&&l&&!It.eval("v"+i+"tv",{v:t,tv:l}))return[this.getLabelText(),i,s.getLabelText()]}},clickButtonShowPassword(){this.passwordVisible=!this.passwordVisible},html_button(){let t=[];return this.isNormal&&this.x.clearable&&t.push(a("button",{class:"w-input-button-clear w-input-button f-i f-i-close",onclick:this.clickButtonClear})),this.x.showPassword&&t.push(a("button",{class:"w-input-button-showpassword w-input-button f-i "+(this.passwordVisible?"f-i-visible":"f-i-invisible"),onclick:this.clickButtonShowPassword})),t}},computed:{validHooks(){return{...this.pubValidHooks,compare:(t,e,i)=>{let s=this.getCompareError(t,e);if(s)return this.formErr(i,s)}}},input_type(){return this.passwordVisible?"text":"password"}},__file:"src/widgets/Password.vue"},Qs={name:"w-range",mixins:[ji],provide(){return{provideRangeParent:this}},props:["mode"],methods:{getRangeError(){let t=this.forms();if(t&&t.length)return t[0].getCompareError(t[0].formVal(),{target:t[1],mode:this.x.mode})},forms(){const t=this.$refs.to;return t&&this.ownerView.fAll(null,t.parentNode)},snapElem(){return this.forms()[0]||this.el("form")},html_form(){let t=this.slots_children();return t.splice(1,0,a("div",{ref:"to",class:"w-range-to"},It.loc.to)),t}},computed:{html_on(){return{onclick:t=>this.warnClass=""}}},__file:"src/widgets/Range.vue"},Js={name:"w-combobox",mixins:[ji],props:["multiple","strict","dropper","picker","dropProps","br","clearable"],emits:["input","click:item","blur","focus","clear"],data(){return{hasBorder:!0,text:"",showSuggest:!1,sug_timer:null,sensor_text:this.getInputText(this.modelValue),sensor_width:null}},methods:{x_default:()=>({strict:!0}),watchModelValue(t,e){this.clear(),this.x.strict||(this.sensor_text=this.getInputText(t));(e&&e.map?e.map(t=>t.value).join(","):"")!=(t&&t.map?t.map(t=>t.value).join(","):"")&&this.trigger("change",t)},getInputValue(t){if("string"==typeof t&&t)return t;let e=It.array(t).filter(t=>t.value).map(t=>t.value);return!this.x.strict&&this.sensor_text&&e.push(this.sensor_text),e.join(",")},getInputText(t){const e=It.array(t).find(t=>!t.value&&t.text);return e?e.text:""},addVal(t,e){let i;i=this.x.multiple?It.lodash.unionBy(It.array(this.x.modelValue),It.array(t),"value"):[t],It.lodash.remove(i,t=>!t||!t.text),this.val(i,e)},complete(t,e){return e=e||new CustomEvent("complete"),this.addVal(t,e),this.clear(),this.$nextTick(this.focus),this},closeDrop(){return this.suggest(!1),this},suggest(t){!1===(t=null==t||t)&&clearTimeout(this.sug_timer),this.showSuggest=t,this.warn(!1)},clear(){this.sensor_text="",this.isNormal&&(this.$refs.input.value="")},reset(t){this.warn(!1),this.clear(),this.val(t||null==this.defaultValue?"":this.defaultValue)},focus(t){this.isNormal&&(this.$refs.input.focus(),t&&this.$refs.input.value&&It.rngCursor(this.$refs.input),this.warn(!1))},onclick(t){this.sensor_text||"function"!=typeof this.x.dropper||(this.suggest(),this.x.dropper(this));const e=t&&t.target==this.$refs.list;this.focus(e)},oninput(t){let e=t.target.value;this.sensor_text=e,clearTimeout(this.sug_timer),""===e?this.suggest(!1):this.sug_timer=setTimeout(()=>{this.suggest(!0),t.value=e,this.trigger(t,e)},500)},onkeydown(t){if(8===t.keyCode&&0===t.target.selectionStart&&0===t.target.selectionEnd){let t=It.array(this.x.modelValue).concat();t.length&&(t.splice(t.length-1,1),this.val(t))}},onblur(t){this.trigger("blur"),setTimeout(()=>{this.$.isUnmounted||this.$.isDeactivated||(this.valid("blur"),this.$refs.list.contains(document.activeElement)||(this.isFocus=!1))},100)},onfocus(t){this.isFocus=!0,!this.showSuggest&&t.target.value&&t.target.dispatchEvent(new Event("input")),this.trigger("focus")},onwheel(t){this.$refs.list.scrollWidth>this.$refs.list.clientWidth&&(this.$refs.list.scrollLeft+=50*(t.deltaY>0?1:-1),t.preventDefault())},onCloseDrop(){this.showSuggest=!1},clickItem(t,e){t.runType="click:item",t.value=e,this.trigger(t,e)},clickClose(t,e){t.stopPropagation();let i=It.array(this.x.modelValue).concat(),s=i.findIndex(t=>t.value==e.value);s>-1&&(i.splice(s,1),this.val(i,t))},clickButtonPicker(t){t.stopPropagation(),this.warn(!1);let e=this.x.picker;"function"==typeof e&&e(t,this)},clickButtonClear(t){t.stopPropagation(),this.val("",t),this.clear(),this.suggest(!1),this.focus(),this.$emit("clear",t)},formText(){return this.input_title},html_options(){let t=this.x.modelValue;if(t&&"string"!=typeof t)return It.array(t).filter(t=>t.value).map(t=>a("div",{class:["w-combobox-option f-flex-center",{"z-forbid":t.forbid}],onclick:e=>this.clickItem(e,t)},[a("div",{class:"w-combobox-option-text f-line-1",title:t.text},t.text),this.isNormal&&a("div",{class:"w-combobox-option-close f-i f-i-close",onclick:e=>this.clickClose(e,t)})]))},html_var(){return a("div",{class:"w-combobox-input-wrap"},[a("div",{class:"w-combobox-sensor",ref:"sensor"},this.sensor_text||(this.input_value?null:this.input_placeholder)),a("input",{type:"text",ref:"input",value:this.sensor_text,class:"w-combobox-input",style:{width:this.sensor_width},readonly:!this.isNormal,placeholder:this.input_value?null:this.input_placeholder,oninput:this.oninput,onkeydown:this.onkeydown,onblur:this.isNormal&&this.onblur,onfocus:this.isNormal&&this.onfocus})])},html_input(){const t=[this.html_options()];if(t.push(this.html_var()),this.showSuggest){let e={context:this,ownproperty:!0,class:"f-dfish-dialog",width:It.bcr(this.el("form")).width,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(a(Ne,e,this.$slots))}return[this.html_input_hidden(),a("div",{ref:"list",class:["w-combobox-list f-flex-1 f-flex f-oh f-height",{"f-h-gap":It.br.compat.gap}],onWheel:!this.x.br&&this.onwheel},t)]},html_button(){let t=[];if(this.x.dropper||this.x.clearable&&this.isNormal){let e=[];this.x.dropper&&e.push(a("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&e.push(a("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(a("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(a("button",{class:"w-input-button-picker w-input-button f-i f-i-ellipsis",disabled:!this.isNormal,onclick:this.clickButtonPicker})),t}},computed:{validHooks(){return{validateDefault:t=>{if(this.sensor_text){if(this.x.strict)return this.formErr({type:"invalid_option"});if(!this.x.multiple){const t=It.array(this.x.modelValue).find(t=>t.value);if(t)return this.formErr({type:"maxSize"},1)}}},...this.pubValidHooks}},hasVal(){return this.input_value},input_title(){return"string"==typeof this.x.modelValue?"":It.array(this.x.modelValue).map(t=>t.text).join(", ")},html_class(){return{"z-br":this.x.br,"z-drop":this.showSuggest,"z-val":this.hasVal||this.sensor_text,"z-droppable":this.x.dropper,"z-clearable":this.x.clearable,"z-on":this.isFocus}},form_prop(){return{onclick:this.isNormal&&this.onclick}}},mounted(){this.$refs.sensor&&new Se(()=>{this.$refs.sensor&&(this.sensor_width=this.$refs.sensor.offsetWidth+"px")}).observe(this.$refs.sensor)},__file:"src/widgets/ComboBox.vue"},Gs={name:"w-linkbox",mixins:[ji],props:["multiple","picker","dropProps","separator","strict","br","clearable"],emits:["input","dblclick:item","clear"],created(){this.$watch(()=>this.x.modelValue,t=>{this.isFocus||this.initOptions(t)})},data:()=>({hasBorder:!0,text:"",sugger:null,showSuggest:!1,sug_timer:null,_KC:null,imeMode:!1,paste_rng:null,currOpt:null,store:[]}),methods:{x_default:()=>({strict:!0}),getInputValue:t=>"string"==typeof t?t:It.array(t).map(t=>t.value).join(","),initOptions(t){null==t&&(t=this.x.modelValue),t&&"string"!=typeof t&&(t=It.array(t),this.store.length&&(this.store=[]),this.addStore(t),this.inp().innerHTML=this.html_options(t))},addVal(t,e){let i;i=this.x.multiple?It.lodash.unionBy(It.array(this.x.modelValue),It.array(t),"value"):[t],this.val(i,e)},complete(t,e){e=e||new CustomEvent("complete"),this.addStore(t),this.focus();let i=this.currOpt||It.rngElement(),s=this.x.separator||",";if(i){"U"===i.tagName||("I"===i.tagName?i.nextSibling&&"U"===i.nextSibling.tagName?i=i.nextSibling:(i=It.after(i,"<u></u>"),this.x.multiple&&It.after(i,"<i>"+s+"</i>")):i=!this.x.multiple&&this.inp().querySelector("u")||It.append(this.inp(),"<u></u>")),this.rng_text(i,0,t.text),It.classAdd(i,"_o"),i.setAttribute("data-value",t.value),t.forbid&&i.setAttribute("data-forbid","");let l=i.nextSibling;It.rngCursor(l&&!l.nextSibling?l:i),this.x.multiple&&!l&&It.rngCursor(It.after(i,"<i>"+s+"</i>"));let r=It.q(`u[data-value="${t.value}"]`,this.inp());r.length>1&&r.eq(0).next("i").addBack().remove(),this.save(e)}return this},closeDrop(){return this.suggest(!1),this},suggest(t){!1===(t=null==t||t)&&clearTimeout(this.sug_timer),this.showSuggest=t,this.warn(!1)},input(t,e){this.currOpt=t;let i=t.innerText.replace(/^[\s,]+|[\s,]+$/g,"");clearTimeout(this.sug_timer),""===i?this.suggest(!1):this.sug_timer=setTimeout(()=>{this.suggest(!0);const t=this.createEvent("input",{originalEvent:e});this.trigger(t,i)},500)},focus(){return this.$refs.inp.focus(),this.warn(!1),this},inp(){return this.$refs.inp},fixStyle(t){let e,i=It.rngElement(),s=!1,l=this.uid,r=this.inp();if(r.contains(i)||(i=r),e=i.innerText,this.paste_rng&&(i=this.paste_rng.parentElement()),i.id===l&&(i=r),i.id===l+"t"){if(!e)return this.closeDrop();if(3===i.firstChild.nodeType){let t=It.rngCursor(i),s=document.createElement("u");t.extractContents(),s.appendChild(document.createTextNode(e)),t.insertNode(s),It.rngCursor(s),i=s}else It.q("br",r).remove(),i.firstChild?i=i.firstChild:It.rngCursor(i)}if(It.q("br",r).remove(),"FONT"===i.tagName)if("U"===i.parentNode.tagName){let t=e.previousSibling.nodeValue,e=e.parentNode,i=e.innerText;this.rng_text(e,i.indexOf(t)+t.length+1,i)}else i.parentNode.id===l+"t"&&(e=i.parentNode.innerText,i=It.replaceWith(i,"<u></u>"),i.innerText=e);i!==r&&"I"!==i.tagName&&i.nextSibling&&"I"!==i.nextSibling.tagName&&(3===i.nextSibling.nodeType?i.nextSibling.parentNode.removeChild(i.nextSibling):(e=i.innerText,this.rng_text(i,e.length,e+i.nextSibling.innerText),i.nextSibling.parentNode.removeChild(i.nextSibling),s=!0)),It.q("u:has(br)",r).remove(),e=i.innerText;let a=[],o=this.x.separator||",";if(this.x.multiple&&e.length>1&&e.indexOf(o)>-1){let l,n=[],h=e.length-It.rngCursorOffset(),c=[];e.split(o).forEach(t=>{(l=It.strTrim(t))?(s=this.param(l),n.push("<u"+(s?' class=_o data-value="'+s.value+'"'+(s.forbid?" data-forbid":""):"")+">"+l+"</u>"),s?c.push('u[data-value="'+s.value+'"]'):a.push(l)):n.push("")}),c.length&&(c=It.q(c.join(","),r).next("i").addBack());let u=It.replaceWith(i,n.join("<i>"+o+"</i>")),d=0;if(!this.paste_rng||188===this._KC)do{if((d+=u.innerText.length)>=h){this.rng_text(u,d-h);break}}while(u=u.previousSibling);c.length&&(c.remove(),It.q("i + i, i:first-child",r).remove()),s=!0,(i=It.rngElement())&&"U"===i.tagName&&!i.getAttribute("data-value")?this.input(i,t):this.closeDrop()}else e?(It.classAny(i,"_o")&&!this.param(e)?(It.classRemove(i,"_o"),i.removeAttribute("data-value"),s=!0):this.x.strict||(s=!0),this.input(i,t)):(s=!0,this.closeDrop());s&&this.save(t),this.paste_rng=null},rng_text(t,e,i){let s=It.rngSelection();null!=i&&(t.innerText=i),s.selectNodeContents(t),It.rngCursor(s,e)},clickPicker(t){t.stopPropagation();let e=this.x.picker;"function"==typeof e&&e(t,this)},clickButtonClear(t){t.stopPropagation(),this.x.clearable&&this.hasVal&&(this.val([],t),this.$nextTick(this.focus),this.$emit("clear",t))},addStore(t){if(t&&"string"!=typeof t){let e=It.array(t).filter(t=>!this.store.find(e=>e.value==t.value));e.length&&(this.store=this.store.concat(e))}},param(t){return this.store.find(e=>e.text==t)},save(t){let e=this.x.strict,i=[];It.q("> u",this.inp()).each((t,s)=>{let l=s.getAttribute("data-value"),r=s.innerText;l?i.push({value:l,text:r}):e||i.push({value:r})}),this.val(i,t)},onkeydown(t){13===t.keyCode&&t.preventDefault()},onkeyup(t){if(!this.imeMode){let e=this._KC=t.keyCode;13===e||38===e||40===e||17===e?t.stopPropagation():this.fixStyle(t),this._KC=null}},onclick(t){if(this.isNormal)if(t.target&&"U"===t.target.tagName&&!t.target.getAttribute("data-value"))this.input(t.target,t);else{let e=It.rngElement();"U"===e.tagName?this.input(e,t):"function"==typeof this.x.dropper?this.x.dropper(this):this.closeDrop()}},ondblclick(t){if("U"===t.target.tagName&&t.target.getAttribute("data-value")){let e=It.array(this.x.modelValue).find(e=>e.value==t.target.getAttribute("data-value"));e&&(t.runType="dblclick:item",t.value=e,this.trigger(t,e),window.getSelection().removeAllRanges())}},onCloseDrop(){this.showSuggest=!1},formText(){return this.input_title},html_options(t){let e=this.x.separator||",";if(null==t&&(t=this.x.modelValue),"string"!==t){let i=It.array(t),s=[];return It.lodash.each(i,(t,i)=>{if(s.push("<u"+(t.value?' class=_o data-value="'+t.value+'"':"")+(t.forbid?" data-forbid":"")+">"+t.text+"</u>"),!this.x.multiple)return!1;s.push("<i>"+e+"</i>")}),s.join("")}},html_var(){return a("div",{class:"w-linkbox-input f-flex-1",ref:"inp",id:this.uid+"t",contentEditable:this.isNormal,onkeyup:this.onkeyup,onkeydown:this.onkeydown,onclick:this.onclick,ondblclick:this.ondblclick,onfocus:t=>{this.isFocus=!0},onblur:t=>{this.isFocus=!1}})},html_input(){let t=[];if(this.showSuggest){let e={context:this,ownproperty:!0,class:"f-dfish-dialog",width:It.bcr(this.el("form")).width,scrollY:!0,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(a(Ne,e,this.$slots))}return[this.html_input_hidden(),this.html_var(),a("div",{class:"w-input-placeholder"},this.input_value?null:this.input_placeholder),t]},html_button(){let t=[];if(this.x.dropper||this.x.clearable&&this.isNormal){let e=[];this.x.dropper&&e.push(a("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&e.push(a("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(a("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(a("button",{class:"w-input-button f-i f-i-ellipsis",disabled:!this.isNormal,onclick:this.clickPicker})),t}},computed:{validHooks(){return{...this.pubValidHooks,validateDefault:t=>{if(this.x.strict&&It.q("u:not([data-value])").length>0)return this.formErr({type:"invalid_option"})}}},hasVal(){return this.input_value},input_title(){return"string"==typeof this.x.modelValue?"":It.array(this.x.modelValue).map(t=>t.text||t.value).join(", ")},html_class(){return{"z-br":this.x.br,"z-dc":this.getOn("dblclick:item"),"z-drop":this.showSuggest,"z-val":this.hasVal,"z-droppable":this.x.dropper,"z-clearable":this.x.clearable}}},mounted(){this.initOptions(),this.inp().addEventListener("compositionstart",()=>{this.imeMode=!0}),this.inp().addEventListener("compositionend",()=>{this.imeMode=!1})},__file:"src/widgets/LinkBox.vue"},Ks={props:["width","height","context"],data:()=>({smallLeft:0}),watch:{"context.x.modelValue":{handler(t){let e=this.context.max(),i=this.context.min();this.smallLeft=(this.width-this.smallWidth)*(t/(e-i))}}},mounted(){},methods:{refresh(t){this.context.refresh(t)},dragstart(t){},mousedown(t){this.context.dragstart(t)}},computed:{bigSrc(){return this.context.x.big.src},smallSrc(){return this.context.x.small.src},smallWidth(){return this.height*(this.context.x.small.width/this.context.x.small.height)}}};const Zs=["src"],tl=["src","width"];Ks.render=function(t,e,i,s,l,r){const a=n("w-dialog");return u(),c(a,{ref:"dialog",class:"w-jigsaw-dialog",width:i.width,height:i.height,context:i.context},{default:d(()=>[m("img",{class:"w-jigsaw-big",src:r.bigSrc},null,8,Zs),m("img",{class:"w-jigsaw-small",src:r.smallSrc,width:r.smallWidth,style:H({left:l.smallLeft+"px"}),onDragstart:e[0]||(e[0]=B((...t)=>r.dragstart&&r.dragstart(...t),["prevent"])),onMousedown:e[1]||(e[1]=(...t)=>r.mousedown&&r.mousedown(...t))},null,44,tl),m("span",{onClick:e[2]||(e[2]=(...t)=>r.refresh&&r.refresh(...t)),class:"w-jigsaw-refresh"},"刷新")]),_:1},8,["width","height","context"])},Ks.__file="src/template/TemplateJigsaw.vue";const el=It.loc.form.jigsaw_drag_right;var il={name:"w-jigsaw",mixins:[ji],emits:["drop","click:refresh"],props:["big","small","dropWidth"],data:()=>({hasBorder:!0,text:el,locked:!1,isSuccess:!1,isError:!1,showDrop:!1}),methods:{success(t){this.text=t,this.locked=!0,this.isSuccess=!0,this.showDrop=!1,this.setThumbLeft()},error(t,e,i){if(t||(t=""),this.text=t,this.isError=!0,this.showDrop=!1,this.warn(!0),this.setThumbLeft(0),e){this.locked=!0,this.text=t+`(${e/1e3})`;let s=setInterval(()=>{e-=1e3,this.text=t+`(${e/1e3})`,e<=0&&(clearInterval(s),this.reset(),i&&i())},1e3)}else i&&i()},reset(){this.locked=!1,this.isError=!1,this.isSuccess=!1,this.text=el,this.setThumbLeft(0),this.warn(!1)},refresh(t){t.runType="click:refresh",this.trigger(t)},setThumbLeft(t){null==t?t=It.number(this.$refs.thumb.style.left):this.$refs.thumb.style.left=t+"px";let e=this.thumbWidth(),i=this.mainWidth(),s=t+e/2>i/2;this.$refs.text.style.left=s?0:t+e+"px",this.$refs.text.style.right=s?i-t+"px":0,this.el().classList.remove("z-drag")},dragstart(t){if(!this.isNormal||this.locked)return;this.warn(!1);let e=this.$refs.thumb,i=It.eventX(t),s=this.max(),l=this.min(),r=It.number(e.style.left),a=this.thumbWidth(),o=this.mainWidth();It.moveup(t=>{let n=It.eventX(t),h=It.numRange(r+n-i,0,o-a);e.style.left=h+"px",this.$refs.track.style.width=h+a+"px",this.x.modelValue=(s-l)*h/(o-a),this.el().classList.add("z-drag")},(t,i)=>{i&&e.dispatchEvent(new Event("drop"))},t)},mouseenter(t){!this.x.big||this.isSuccess||this.locked||(this.warn(!1),this.showDrop=!0)},drop(t){this.trigger(t,this.x.modelValue)},max(){let t=this.x.maxValue;return null==t?100:t},min(){let t=this.x.minValue;return null==t?0:t},thumbWidth(){return It.bcr(this.$refs.thumb).width},mainWidth(){return It.bcr(this.$refs.form).width},html_input(){return[this.html_input_hidden(),[a("div",{ref:"track",class:"w-jigsaw-track"}),a("div",{ref:"text",class:"w-jigsaw-text f-flex-center f-line-1"},this.text)]]},html_button(){let t=[a("button",{ref:"thumb",class:["w-jigsaw-thumb w-input-button f-i",this.isSuccess?"f-i-check":"f-i-long-arrow-right"],disabled:!!this.x.disabled,onmousedown:this.dragstart,onmouseenter:this.mouseenter,ondrop:this.drop})];if(this.showDrop){let e=Math.max(It.number(this.x.dropWidth),It.bcr(this.el("form")).width),i=Math.ceil(e*(this.x.big.height/this.x.big.width));t.push(a(Ks,{ownproperty:!0,width:e,height:i,autoHide:!0,context:this,snap:()=>this.el("form"),position:"v",onClose:()=>this.showDrop=null}))}return t}},computed:{validHooks(){return{...this.pubValidHooks,validateDefault:t=>{if(!this.isSuccess)return this.formErr({type:"jigsaw_required"})}}},html_class(){return{"z-success":this.isSuccess}},form_prop(){return{onmouseenter:this.mouseenter}}},__file:"src/widgets/Jigsaw.vue"},sl={name:"w-form",mixins:[ji],props:["vertical"],methods:{getInputValue:t=>null==t?"":"object"==typeof t?JSON.stringify(t):t,html_input(){return[this.html_input_hidden(),this.$slots.default&&this.$slots.default()]}},computed:{validHooks(){return{...this.pubValidHooks,required:(t,e,i)=>{if(e&&(!t||"[]"===t||"{}"===t))return this.formErr(i)}}},html_class(){return[{"z-vertical":this.x.vertical}]},html_style(){return{"--w-form-gap":It.unitSize(this.x.gap)}},form_prop(){return this.name&&{onclick:t=>this.warn(!1)}}},__file:"src/widgets/Form.vue"},ll={name:"w-formgroup",mixins:[ji],props:["columns","rows","gap","defaultColspan"],methods:{x_default:()=>({columns:12,gap:0}),getInputValue:t=>null==t?"":"object"==typeof t?JSON.stringify(t):t,html_input(){return[this.html_input_hidden(),this.$slots.default&&this.$slots.default()]}},computed:{validHooks(){return{...this.pubValidHooks}},html_style(){let t=this.x.columns;It.isNumber(t)&&(t=`repeat(${t}, 1fr)`);let e=this.x.rows;return It.isNumber(e)&&(e=`repeat(${e}, 1fr)`),this.x.defaultColspan,{"--w-fromgroup-template-columns":t,"--w-fromgroup-template-rows":e,"--w-grid-gap":this.x.gap?It.unitSize(this.x.gap):""}},form_prop(){return this.name&&{onclick:t=>this.warn(!1)}}},__file:"src/widgets/FormGroup.vue"},rl={name:"w-rate",mixins:[ji],props:["allowHalf","cancelable","sum","count","text"],data:()=>({hoverWrap:!1,hoverIndex:-1}),methods:{x_default:()=>({sum:5,count:5}),hoverItem(t,e){this.isNormal&&(this.hoverIndex=e)},clickItem(t,e){this.isNormal&&(this.x.modelValue=this.x.cancelable&&this.x.modelValue==e?"":e)},html_star(t){return a(Ge,{class:["w-rate-star-icon",{"z-hv":this.hoverWrap&&t<=this.hoverIndex,"z-on":!this.hoverWrap&&t<=this.x.modelValue}],src:".f-i .f-i-star-full",onMouseenter:e=>this.hoverItem(e,t),onClick:e=>this.clickItem(e,t),disabled:!this.isNormal})},html_input(){let t=this.x.allowHalf?.5:1,e=(this.x.sum||5)*t/(this.x.count||5),i=[];for(let s=e;s<=this.x.sum;s+=e/t){let t=[this.html_star(s)];this.x.allowHalf&&t.push(this.html_star(s+e)),i.push(a("li",{class:"w-rate-star"},t))}return[this.html_input_hidden(),a("ul",{class:"w-rate-wrap",onMouseenter:t=>this.isNormal&&(this.hoverWrap=!0),onMouseleave:t=>this.isNormal&&(this.hoverWrap=!1)},i),this.x.text&&this.x.modelValue&&a("span",{class:"w-rate-text"},this.x.text[(this.x.modelValue-e)/t])]}},computed:{html_class(){return{"z-allow-half":this.x.allowHalf}}}};function al(t,{trimZeros:e=!1}={}){let i=Number(t).toLocaleString("fullwide",{useGrouping:!1,minimumFractionDigits:0,maximumFractionDigits:20});if(i.includes("e")){const[e,s]=i.split("e"),l=parseInt(s,10);i=Number(t).toFixed(Math.abs(l)+(e.split(".").length||0))}const[s,l]=i.split(".");if(!l)return 0;return(e?l.replace(/0+$/,""):l).length}rl.__file="src/widgets/Rate.vue";var ol={name:"w-slider",mixins:[ji],props:["minValue","maxValue","step"],emits:["drop"],data:()=>({grabbing:!1,left:0}),methods:{x_default:()=>({minValue:0,maxValue:100,step:1}),onmousedown(t){const e=It.bcr(this.$refs.bar);let i=It.number(this.x.modelValue),s=t.clientX;this.grabbing=!0;const l=al(this.x.step);It.moveup(t=>{let r=t.clientX-s,a=i+r/e.width*(this.x.maxValue-this.x.minValue);a=It.numRange(a,this.x.minValue,this.x.maxValue),a=Number(Number(a).toFixed(l)),this.val(a)},t=>{this.grabbing=!1,this.trigger("drop",this.x.modelValue)},t)},onclick(t){if(t.target!==this.$refs.button){const e=al(this.x.step),i=It.bcr(this.$refs.bar);let s=t.clientX-i.left,l=+this.x.minValue+(s-10)/i.width*(this.x.maxValue-this.x.minValue);l=It.numRange(l,this.x.minValue,this.x.maxValue),l=Number(Number(l).toFixed(e)),this.val(l),this.trigger("drop",l)}},html_input(){return[this.html_input_hidden(),a("div",{onClick:this.onclick,class:["w-slider-wrap"]},[a("div",{class:["w-slider-progress"]}),a("div",{ref:"bar",class:"w-slider-bar"},a("div",{ref:"button",onMousedown:this.onmousedown,class:["w-slider-button",{"z-grabbing":this.grabbing}]}))])]}},computed:{html_style(){return{"--w-slider-left":`${100*(this.x.modelValue-this.x.minValue)/(this.x.maxValue-this.x.minValue)||0}%`}}},__file:"src/widgets/Slider.vue"};const nl=[ie,De,Ne,Be,je,Je,li,ri,Si,ze,$e,ai,oi,ni,di,ui,pi,mi,fi,ki,Ci,Ti,$i,zi,Di,Ge,Mi,ti,Ze,Ei,Li,Qi,Bi,Ji,Gi,Ki,Zi,ts,es,ds,ps,ms,Oi,vs,ws,bs,_s,Wi,ys,ks,Xi,Ss,zs,Ns,Ys,Bs,qs,Rs,Ws,Us,Xs,Qs,Js,Gs,il,sl,ll,rl,ol],hl={};It.WIDGET=hl,It.install=t=>{nl.forEach(e=>{t.component(e.name,e),hl[e.name]=e}),t.use(Wt)};export{It as default};