vue-efko-data-view 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-view.cjs.js +7 -7
- package/dist/data-view.cjs.js.map +1 -1
- package/dist/data-view.es.js +1402 -1344
- package/dist/data-view.es.js.map +1 -1
- package/dist/dataview/DataView.vue.d.ts +2 -0
- package/dist/dataview/table/TheTable.vue.d.ts +1 -0
- package/dist/dataview/table/interface/table.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/data-view.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),_=require("lodash"),Ce=require("@formkit/auto-animate"),T=require("@ant-design/icons-vue"),mt=require("@vueform/multiselect"),gt=require("efko-ui-library");function w(){return w=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},w.apply(null,arguments)}function Oe(e){for(var n=0,o,r=0,a=e.length;a>=4;++r,a-=4)o=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,o=(o&65535)*1540483477+((o>>>16)*59797<<16),o^=o>>>24,n=(o&65535)*1540483477+((o>>>16)*59797<<16)^(n&65535)*1540483477+((n>>>16)*59797<<16);switch(a){case 3:n^=(e.charCodeAt(r+2)&255)<<16;case 2:n^=(e.charCodeAt(r+1)&255)<<8;case 1:n^=e.charCodeAt(r)&255,n=(n&65535)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,n=(n&65535)*1540483477+((n>>>16)*59797<<16),((n^n>>>15)>>>0).toString(36)}const Me="%";class ht{constructor(n){this.cache=new Map,this.instanceId=n}get(n){return this.cache.get(Array.isArray(n)?n.join(Me):n)||null}update(n,o){const r=Array.isArray(n)?n.join(Me):n,a=this.cache.get(r),l=o(a);l===null?this.cache.delete(r):this.cache.set(r,l)}}const vt=e=>{const n=e;return n.install=function(o){o.component(n.displayName||n.name,e)},e};function ze(e){return{type:Object,default:e}}function ae(e){return{type:Boolean,default:e}}function yt(e,n){const o={validator:()=>!0,default:e};return o}function Ve(e){return{type:Array,default:e}}function Te(e){return{type:String,default:e}}function bt(e,n){return e?{type:e,default:n}:yt(n)}const xt="data-token-hash",le="data-css-hash",W="__cssinjs_instance__";function q(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const n=document.body.querySelectorAll(`style[${le}]`)||[],{firstChild:o}=document.head;Array.from(n).forEach(a=>{a[W]=a[W]||e,a[W]===e&&document.head.insertBefore(a,o)});const r={};Array.from(document.querySelectorAll(`style[${le}]`)).forEach(a=>{var l;const s=a.getAttribute(le);r[s]?a[W]===e&&((l=a.parentNode)===null||l===void 0||l.removeChild(a)):r[s]=!0})}return new ht(e)}const je=Symbol("StyleContextKey"),Ct=()=>{var e,n,o;const r=t.getCurrentInstance();let a;if(r&&r.appContext){const l=(o=(n=(e=r.appContext)===null||e===void 0?void 0:e.config)===null||n===void 0?void 0:n.globalProperties)===null||o===void 0?void 0:o.__ANTDV_CSSINJS_CACHE__;l?a=l:(a=q(),r.appContext.config.globalProperties&&(r.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=a))}else a=q();return a},Ue={cache:q(),defaultCache:!0,hashPriority:"low"},ke=()=>{const e=Ct();return t.inject(je,t.shallowRef(w(w({},Ue),{cache:e})))},kt=e=>{const n=ke(),o=t.shallowRef(w(w({},Ue),{cache:q()}));return t.watch([()=>t.unref(e),n],()=>{const r=w({},n.value),a=t.unref(e);Object.keys(a).forEach(s=>{const d=a[s];a[s]!==void 0&&(r[s]=d)});const{cache:l}=a;r.cache=r.cache||q(),r.defaultCache=!l&&n.value.defaultCache,o.value=r},{immediate:!0}),t.provide(je,o),o},St=()=>({autoClear:ae(),mock:Te(),cache:ze(),defaultCache:ae(),hashPriority:Te(),container:bt(),ssrInline:ae(),transformers:Ve(),linters:Ve()});vt(t.defineComponent({name:"AStyleProvider",inheritAttrs:!1,props:St(),setup(e,{slots:n}){return kt(e),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}));function wt(){return!1}let ge=!1;function Et(){return ge}const At=process.env.NODE_ENV==="production"?wt:Et;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const e=window;if(typeof e.webpackHotUpdate=="function"){const n=e.webpackHotUpdate;e.webpackHotUpdate=(...o)=>(ge=!0,setTimeout(()=>{ge=!1},0),n(...o))}}function Bt(e,n,o,r){const a=ke(),l=t.shallowRef(""),s=t.shallowRef();t.watchEffect(()=>{l.value=[e,...n.value].join("%")});const d=At(),p=f=>{a.value.cache.update(f,u=>{const[m=0,C]=u||[];return m-1===0?(r==null||r(C,!1),null):[m-1,C]})};return t.watch(l,(f,u)=>{u&&p(u),a.value.cache.update(f,m=>{const[C=0,x]=m||[];let i=x;process.env.NODE_ENV!=="production"&&x&&d&&(r==null||r(i,d),i=null);const v=i||o();return[C+1,v]}),s.value=a.value.cache.get(l.value)[1]},{immediate:!0}),t.onBeforeUnmount(()=>{p(l.value)}),s}function Mt(e,n){if(e.length!==n.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==n[o])return!1;return!0}class U{constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(n,o=!1){let r={map:this.cache};return n.forEach(a=>{var l;r?r=(l=r==null?void 0:r.map)===null||l===void 0?void 0:l.get(a):r=void 0}),r!=null&&r.value&&o&&(r.value[1]=this.cacheCallTimes++),r==null?void 0:r.value}get(n){var o;return(o=this.internalGet(n,!0))===null||o===void 0?void 0:o[0]}has(n){return!!this.internalGet(n)}set(n,o){if(!this.has(n)){if(this.size()+1>U.MAX_CACHE_SIZE+U.MAX_CACHE_OFFSET){const[a]=this.keys.reduce((l,s)=>{const[,d]=l;return this.internalGet(s)[1]<d?[s,this.internalGet(s)[1]]:l},[this.keys[0],this.cacheCallTimes]);this.delete(a)}this.keys.push(n)}let r=this.cache;n.forEach((a,l)=>{if(l===n.length-1)r.set(a,{value:[o,this.cacheCallTimes++]});else{const s=r.get(a);s?s.map||(s.map=new Map):r.set(a,{map:new Map}),r=r.get(a).map}})}deleteByPath(n,o){var r;const a=n.get(o[0]);if(o.length===1)return a.map?n.set(o[0],{map:a.map}):n.delete(o[0]),(r=a.value)===null||r===void 0?void 0:r[0];const l=this.deleteByPath(a.map,o.slice(1));return(!a.map||a.map.size===0)&&!a.value&&n.delete(o[0]),l}delete(n){if(this.has(n))return this.keys=this.keys.filter(o=>!Mt(o,n)),this.deleteByPath(this.cache,n)}}U.MAX_CACHE_SIZE=20;U.MAX_CACHE_OFFSET=5;let he={};function Vt(e,n){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error(`Warning: ${n}`)}function Tt(){he={}}function Nt(e,n,o){!n&&!he[o]&&(e(!1,o),he[o]=!0)}function It(e,n){Nt(Vt,e,n)}function Dt(){}let Ge=Dt;process.env.NODE_ENV!=="production"&&(Ge=(e,n,o)=>{It(e,`[ant-design-vue: ${n}] ${o}`),process.env.NODE_ENV==="test"&&Tt()});let Ne=0;class Xe{constructor(n){this.derivatives=Array.isArray(n)?n:[n],this.id=Ne,n.length===0&&Ge(n.length>0,"[Efko дизайн Vue CSS-in-JS] Theme should have at least one derivative function."),Ne+=1}getDerivativeToken(n){return this.derivatives.reduce((o,r)=>r(n,o),void 0)}}const ie=new U;function Ft(e){const n=Array.isArray(e)?e:[e];return ie.has(n)||ie.set(n,new Xe(n)),ie.get(n)}const Ie=new WeakMap;function ee(e){let n=Ie.get(e)||"";return n||(Object.keys(e).forEach(o=>{const r=e[o];n+=o,r instanceof Xe?n+=r.id:r&&typeof r=="object"?n+=ee(r):n+=r}),Ie.set(e,n)),n}function Ht(e,n){return Oe(`${n}_${ee(e)}`)}const De={},$t=process.env.NODE_ENV==="production",_t=process.env.NODE_ENV==="prerender",Lt=!$t&&!_t?"css-dev-only-do-not-override":"css",P=new Map;function Rt(e){P.set(e,(P.get(e)||0)+1)}function Pt(e,n){typeof document<"u"&&document.querySelectorAll(`style[${xt}="${e}"]`).forEach(r=>{var a;r[W]===n&&((a=r.parentNode)===null||a===void 0||a.removeChild(r))})}const Ot=0;function zt(e,n){P.set(e,(P.get(e)||0)-1);const o=Array.from(P.keys()),r=o.filter(a=>(P.get(a)||0)<=0);o.length-r.length>Ot&&r.forEach(a=>{Pt(a,n),P.delete(a)})}const jt=(e,n,o,r)=>{const a=o.getDerivativeToken(e);let l=w(w({},a),n);return r&&(l=r(l)),l};function Ut(e,n,o=t.ref({})){const r=ke(),a=t.computed(()=>w({},...n.value)),l=t.computed(()=>ee(a.value)),s=t.computed(()=>ee(o.value.override||De));return Bt("token",t.computed(()=>[o.value.salt||"",e.value.id,l.value,s.value]),()=>{const{salt:p="",override:f=De,formatToken:u,getComputedToken:m}=o.value,C=m?m(a.value,f,e.value):jt(a.value,f,e.value,u),x=Ht(C,p);C._tokenKey=x,Rt(x);const i=`${Lt}-${Oe(x)}`;return C._hashId=i,[C,i]},p=>{var f;zt(p[0]._tokenKey,(f=r.value)===null||f===void 0?void 0:f.cache.instanceId)})}const Gt="1.7.0";function M(e,n){Xt(e)&&(e="100%");var o=Wt(e);return e=n===360?e:Math.min(n,Math.max(0,parseFloat(e))),o&&(e=parseInt(String(e*n),10)/100),Math.abs(e-n)<1e-6?1:(n===360?e=(e<0?e%n+n:e%n)/parseFloat(String(n)):e=e%n/parseFloat(String(n)),e)}function Z(e){return Math.min(1,Math.max(0,e))}function Xt(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Wt(e){return typeof e=="string"&&e.indexOf("%")!==-1}function We(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function K(e){return e<=1?"".concat(Number(e)*100,"%"):e}function O(e){return e.length===1?"0"+e:String(e)}function qt(e,n,o){return{r:M(e,255)*255,g:M(n,255)*255,b:M(o,255)*255}}function Fe(e,n,o){e=M(e,255),n=M(n,255),o=M(o,255);var r=Math.max(e,n,o),a=Math.min(e,n,o),l=0,s=0,d=(r+a)/2;if(r===a)s=0,l=0;else{var p=r-a;switch(s=d>.5?p/(2-r-a):p/(r+a),r){case e:l=(n-o)/p+(n<o?6:0);break;case n:l=(o-e)/p+2;break;case o:l=(e-n)/p+4;break}l/=6}return{h:l,s,l:d}}function se(e,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(n-e)*(6*o):o<1/2?n:o<2/3?e+(n-e)*(2/3-o)*6:e}function Zt(e,n,o){var r,a,l;if(e=M(e,360),n=M(n,100),o=M(o,100),n===0)a=o,l=o,r=o;else{var s=o<.5?o*(1+n):o+n-o*n,d=2*o-s;r=se(d,s,e+1/3),a=se(d,s,e),l=se(d,s,e-1/3)}return{r:r*255,g:a*255,b:l*255}}function ve(e,n,o){e=M(e,255),n=M(n,255),o=M(o,255);var r=Math.max(e,n,o),a=Math.min(e,n,o),l=0,s=r,d=r-a,p=r===0?0:d/r;if(r===a)l=0;else{switch(r){case e:l=(n-o)/d+(n<o?6:0);break;case n:l=(o-e)/d+2;break;case o:l=(e-n)/d+4;break}l/=6}return{h:l,s:p,v:s}}function Kt(e,n,o){e=M(e,360)*6,n=M(n,100),o=M(o,100);var r=Math.floor(e),a=e-r,l=o*(1-n),s=o*(1-a*n),d=o*(1-(1-a)*n),p=r%6,f=[o,s,l,l,d,o][p],u=[d,o,o,s,l,l][p],m=[l,l,d,o,o,s][p];return{r:f*255,g:u*255,b:m*255}}function ye(e,n,o,r){var a=[O(Math.round(e).toString(16)),O(Math.round(n).toString(16)),O(Math.round(o).toString(16))];return r&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Qt(e,n,o,r,a){var l=[O(Math.round(e).toString(16)),O(Math.round(n).toString(16)),O(Math.round(o).toString(16)),O(Jt(r))];return a&&l[0].startsWith(l[0].charAt(1))&&l[1].startsWith(l[1].charAt(1))&&l[2].startsWith(l[2].charAt(1))&&l[3].startsWith(l[3].charAt(1))?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function Jt(e){return Math.round(parseFloat(e)*255).toString(16)}function He(e){return V(e)/255}function V(e){return parseInt(e,16)}function Yt(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var be={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function j(e){var n={r:0,g:0,b:0},o=1,r=null,a=null,l=null,s=!1,d=!1;return typeof e=="string"&&(e=oo(e)),typeof e=="object"&&(D(e.r)&&D(e.g)&&D(e.b)?(n=qt(e.r,e.g,e.b),s=!0,d=String(e.r).substr(-1)==="%"?"prgb":"rgb"):D(e.h)&&D(e.s)&&D(e.v)?(r=K(e.s),a=K(e.v),n=Kt(e.h,r,a),s=!0,d="hsv"):D(e.h)&&D(e.s)&&D(e.l)&&(r=K(e.s),l=K(e.l),n=Zt(e.h,r,l),s=!0,d="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=We(o),{ok:s,format:e.format||d,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:o}}var eo="[-\\+]?\\d+%?",to="[-\\+]?\\d*\\.\\d+%?",L="(?:".concat(to,")|(?:").concat(eo,")"),ce="[\\s|\\(]+(".concat(L,")[,|\\s]+(").concat(L,")[,|\\s]+(").concat(L,")\\s*\\)?"),de="[\\s|\\(]+(".concat(L,")[,|\\s]+(").concat(L,")[,|\\s]+(").concat(L,")[,|\\s]+(").concat(L,")\\s*\\)?"),N={CSS_UNIT:new RegExp(L),rgb:new RegExp("rgb"+ce),rgba:new RegExp("rgba"+de),hsl:new RegExp("hsl"+ce),hsla:new RegExp("hsla"+de),hsv:new RegExp("hsv"+ce),hsva:new RegExp("hsva"+de),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function oo(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(be[e])e=be[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=N.rgb.exec(e);return o?{r:o[1],g:o[2],b:o[3]}:(o=N.rgba.exec(e),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=N.hsl.exec(e),o?{h:o[1],s:o[2],l:o[3]}:(o=N.hsla.exec(e),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=N.hsv.exec(e),o?{h:o[1],s:o[2],v:o[3]}:(o=N.hsva.exec(e),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=N.hex8.exec(e),o?{r:V(o[1]),g:V(o[2]),b:V(o[3]),a:He(o[4]),format:n?"name":"hex8"}:(o=N.hex6.exec(e),o?{r:V(o[1]),g:V(o[2]),b:V(o[3]),format:n?"name":"hex"}:(o=N.hex4.exec(e),o?{r:V(o[1]+o[1]),g:V(o[2]+o[2]),b:V(o[3]+o[3]),a:He(o[4]+o[4]),format:n?"name":"hex8"}:(o=N.hex3.exec(e),o?{r:V(o[1]+o[1]),g:V(o[2]+o[2]),b:V(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function D(e){return!!N.CSS_UNIT.exec(String(e))}var I=function(){function e(n,o){n===void 0&&(n=""),o===void 0&&(o={});var r;if(n instanceof e)return n;typeof n=="number"&&(n=Yt(n)),this.originalInput=n;var a=j(n);this.originalInput=n,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=o.format)!==null&&r!==void 0?r:a.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},e.prototype.getLuminance=function(){var n=this.toRgb(),o,r,a,l=n.r/255,s=n.g/255,d=n.b/255;return l<=.03928?o=l/12.92:o=Math.pow((l+.055)/1.055,2.4),s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),d<=.03928?a=d/12.92:a=Math.pow((d+.055)/1.055,2.4),.2126*o+.7152*r+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(n){return this.a=We(n),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var n=this.toHsl().s;return n===0},e.prototype.toHsv=function(){var n=ve(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}},e.prototype.toHsvString=function(){var n=ve(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),a=Math.round(n.v*100);return this.a===1?"hsv(".concat(o,", ").concat(r,"%, ").concat(a,"%)"):"hsva(".concat(o,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var n=Fe(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}},e.prototype.toHslString=function(){var n=Fe(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),a=Math.round(n.l*100);return this.a===1?"hsl(".concat(o,", ").concat(r,"%, ").concat(a,"%)"):"hsla(".concat(o,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(n){return n===void 0&&(n=!1),ye(this.r,this.g,this.b,n)},e.prototype.toHexString=function(n){return n===void 0&&(n=!1),"#"+this.toHex(n)},e.prototype.toHex8=function(n){return n===void 0&&(n=!1),Qt(this.r,this.g,this.b,this.a,n)},e.prototype.toHex8String=function(n){return n===void 0&&(n=!1),"#"+this.toHex8(n)},e.prototype.toHexShortString=function(n){return n===void 0&&(n=!1),this.a===1?this.toHexString(n):this.toHex8String(n)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var n=Math.round(this.r),o=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(n,", ").concat(o,", ").concat(r,")"):"rgba(".concat(n,", ").concat(o,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var n=function(o){return"".concat(Math.round(M(o,255)*100),"%")};return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var n=function(o){return Math.round(M(o,255)*100)};return this.a===1?"rgb(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%)"):"rgba(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var n="#"+ye(this.r,this.g,this.b,!1),o=0,r=Object.entries(be);o<r.length;o++){var a=r[o],l=a[0],s=a[1];if(n===s)return l}return!1},e.prototype.toString=function(n){var o=!!n;n=n??this.format;var r=!1,a=this.a<1&&this.a>=0,l=!o&&a&&(n.startsWith("hex")||n==="name");return l?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l+=n/100,o.l=Z(o.l),new e(o)},e.prototype.brighten=function(n){n===void 0&&(n=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(n/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(n/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(n/100)))),new e(o)},e.prototype.darken=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l-=n/100,o.l=Z(o.l),new e(o)},e.prototype.tint=function(n){return n===void 0&&(n=10),this.mix("white",n)},e.prototype.shade=function(n){return n===void 0&&(n=10),this.mix("black",n)},e.prototype.desaturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s-=n/100,o.s=Z(o.s),new e(o)},e.prototype.saturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s+=n/100,o.s=Z(o.s),new e(o)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(n){var o=this.toHsl(),r=(o.h+n)%360;return o.h=r<0?360+r:r,new e(o)},e.prototype.mix=function(n,o){o===void 0&&(o=50);var r=this.toRgb(),a=new e(n).toRgb(),l=o/100,s={r:(a.r-r.r)*l+r.r,g:(a.g-r.g)*l+r.g,b:(a.b-r.b)*l+r.b,a:(a.a-r.a)*l+r.a};return new e(s)},e.prototype.analogous=function(n,o){n===void 0&&(n=6),o===void 0&&(o=30);var r=this.toHsl(),a=360/o,l=[this];for(r.h=(r.h-(a*n>>1)+720)%360;--n;)r.h=(r.h+a)%360,l.push(new e(r));return l},e.prototype.complement=function(){var n=this.toHsl();return n.h=(n.h+180)%360,new e(n)},e.prototype.monochromatic=function(n){n===void 0&&(n=6);for(var o=this.toHsv(),r=o.h,a=o.s,l=o.v,s=[],d=1/n;n--;)s.push(new e({h:r,s:a,v:l})),l=(l+d)%1;return s},e.prototype.splitcomplement=function(){var n=this.toHsl(),o=n.h;return[this,new e({h:(o+72)%360,s:n.s,l:n.l}),new e({h:(o+216)%360,s:n.s,l:n.l})]},e.prototype.onBackground=function(n){var o=this.toRgb(),r=new e(n).toRgb(),a=o.a+r.a*(1-o.a);return new e({r:(o.r*o.a+r.r*r.a*(1-o.a))/a,g:(o.g*o.a+r.g*r.a*(1-o.a))/a,b:(o.b*o.a+r.b*r.a*(1-o.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(n){for(var o=this.toHsl(),r=o.h,a=[this],l=360/n,s=1;s<n;s++)a.push(new e({h:(r+s*l)%360,s:o.s,l:o.l}));return a},e.prototype.equals=function(n){return this.toRgbString()===new e(n).toRgbString()},e}(),Q=2,$e=.16,no=.05,ro=.05,ao=.15,qe=5,Ze=4,lo=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function _e(e){var n=e.r,o=e.g,r=e.b,a=ve(n,o,r);return{h:a.h*360,s:a.s,v:a.v}}function J(e){var n=e.r,o=e.g,r=e.b;return"#".concat(ye(n,o,r,!1))}function io(e,n,o){var r=o/100,a={r:(n.r-e.r)*r+e.r,g:(n.g-e.g)*r+e.g,b:(n.b-e.b)*r+e.b};return a}function Le(e,n,o){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=o?Math.round(e.h)-Q*n:Math.round(e.h)+Q*n:r=o?Math.round(e.h)+Q*n:Math.round(e.h)-Q*n,r<0?r+=360:r>=360&&(r-=360),r}function Re(e,n,o){if(e.h===0&&e.s===0)return e.s;var r;return o?r=e.s-$e*n:n===Ze?r=e.s+$e:r=e.s+no*n,r>1&&(r=1),o&&n===qe&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function Pe(e,n,o){var r;return o?r=e.v+ro*n:r=e.v-ao*n,r>1&&(r=1),Number(r.toFixed(2))}function te(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=[],r=j(e),a=qe;a>0;a-=1){var l=_e(r),s=J(j({h:Le(l,a,!0),s:Re(l,a,!0),v:Pe(l,a,!0)}));o.push(s)}o.push(J(r));for(var d=1;d<=Ze;d+=1){var p=_e(r),f=J(j({h:Le(p,d),s:Re(p,d),v:Pe(p,d)}));o.push(f)}return n.theme==="dark"?lo.map(function(u){var m=u.index,C=u.opacity,x=J(io(j(n.backgroundColor||"#141414"),j(o[m]),C*100));return x}):o}var ue={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},fe={},pe={};Object.keys(ue).forEach(function(e){fe[e]=te(ue[e]),fe[e].primary=fe[e][5],pe[e]=te(ue[e],{theme:"dark",backgroundColor:"#141414"}),pe[e].primary=pe[e][5]});const so=e=>{const{controlHeight:n}=e;return{controlHeightSM:n*.75,controlHeightXS:n*.5,controlHeightLG:n*1.25}};function co(e){const{sizeUnit:n,sizeStep:o}=e;return{sizeXXL:n*(o+8),sizeXL:n*(o+4),sizeLG:n*(o+2),sizeMD:n*(o+1),sizeMS:n*o,size:n*o,sizeSM:n*(o-1),sizeXS:n*(o-2),sizeXXS:n*(o-3)}}const Ke={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Se=w(w({},Ke),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),Y=require("lodash"),Ee=require("@formkit/auto-animate"),D=require("@ant-design/icons-vue"),vt=require("@vueform/multiselect"),yt=require("efko-ui-library");function A(){return A=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},A.apply(null,arguments)}function Ue(e){for(var n=0,o,r=0,a=e.length;a>=4;++r,a-=4)o=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,o=(o&65535)*1540483477+((o>>>16)*59797<<16),o^=o>>>24,n=(o&65535)*1540483477+((o>>>16)*59797<<16)^(n&65535)*1540483477+((n>>>16)*59797<<16);switch(a){case 3:n^=(e.charCodeAt(r+2)&255)<<16;case 2:n^=(e.charCodeAt(r+1)&255)<<8;case 1:n^=e.charCodeAt(r)&255,n=(n&65535)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,n=(n&65535)*1540483477+((n>>>16)*59797<<16),((n^n>>>15)>>>0).toString(36)}const Ne="%";class bt{constructor(n){this.cache=new Map,this.instanceId=n}get(n){return this.cache.get(Array.isArray(n)?n.join(Ne):n)||null}update(n,o){const r=Array.isArray(n)?n.join(Ne):n,a=this.cache.get(r),l=o(a);l===null?this.cache.delete(r):this.cache.set(r,l)}}const Ct=e=>{const n=e;return n.install=function(o){o.component(n.displayName||n.name,e)},e};function Ge(e){return{type:Object,default:e}}function ue(e){return{type:Boolean,default:e}}function xt(e,n){const o={validator:()=>!0,default:e};return o}function De(e){return{type:Array,default:e}}function Ie(e){return{type:String,default:e}}function kt(e,n){return e?{type:e,default:n}:xt(n)}const St="data-token-hash",de="data-css-hash",K="__cssinjs_instance__";function Q(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const n=document.body.querySelectorAll(`style[${de}]`)||[],{firstChild:o}=document.head;Array.from(n).forEach(a=>{a[K]=a[K]||e,a[K]===e&&document.head.insertBefore(a,o)});const r={};Array.from(document.querySelectorAll(`style[${de}]`)).forEach(a=>{var l;const s=a.getAttribute(de);r[s]?a[K]===e&&((l=a.parentNode)===null||l===void 0||l.removeChild(a)):r[s]=!0})}return new bt(e)}const Xe=Symbol("StyleContextKey"),wt=()=>{var e,n,o;const r=t.getCurrentInstance();let a;if(r&&r.appContext){const l=(o=(n=(e=r.appContext)===null||e===void 0?void 0:e.config)===null||n===void 0?void 0:n.globalProperties)===null||o===void 0?void 0:o.__ANTDV_CSSINJS_CACHE__;l?a=l:(a=Q(),r.appContext.config.globalProperties&&(r.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=a))}else a=Q();return a},We={cache:Q(),defaultCache:!0,hashPriority:"low"},Be=()=>{const e=wt();return t.inject(Xe,t.shallowRef(A(A({},We),{cache:e})))},At=e=>{const n=Be(),o=t.shallowRef(A(A({},We),{cache:Q()}));return t.watch([()=>t.unref(e),n],()=>{const r=A({},n.value),a=t.unref(e);Object.keys(a).forEach(s=>{const c=a[s];a[s]!==void 0&&(r[s]=c)});const{cache:l}=a;r.cache=r.cache||Q(),r.defaultCache=!l&&n.value.defaultCache,o.value=r},{immediate:!0}),t.provide(Xe,o),o},Et=()=>({autoClear:ue(),mock:Ie(),cache:Ge(),defaultCache:ue(),hashPriority:Ie(),container:kt(),ssrInline:ue(),transformers:De(),linters:De()});Ct(t.defineComponent({name:"AStyleProvider",inheritAttrs:!1,props:Et(),setup(e,{slots:n}){return At(e),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}));function Bt(){return!1}let Ce=!1;function Mt(){return Ce}const Tt=process.env.NODE_ENV==="production"?Bt:Mt;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const e=window;if(typeof e.webpackHotUpdate=="function"){const n=e.webpackHotUpdate;e.webpackHotUpdate=(...o)=>(Ce=!0,setTimeout(()=>{Ce=!1},0),n(...o))}}function Vt(e,n,o,r){const a=Be(),l=t.shallowRef(""),s=t.shallowRef();t.watchEffect(()=>{l.value=[e,...n.value].join("%")});const c=Tt(),h=f=>{a.value.cache.update(f,d=>{const[v=0,x]=d||[];return v-1===0?(r==null||r(x,!1),null):[v-1,x]})};return t.watch(l,(f,d)=>{d&&h(d),a.value.cache.update(f,v=>{const[x=0,C]=v||[];let p=C;process.env.NODE_ENV!=="production"&&C&&c&&(r==null||r(p,c),p=null);const S=p||o();return[x+1,S]}),s.value=a.value.cache.get(l.value)[1]},{immediate:!0}),t.onBeforeUnmount(()=>{h(l.value)}),s}function Nt(e,n){if(e.length!==n.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==n[o])return!1;return!0}class U{constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(n,o=!1){let r={map:this.cache};return n.forEach(a=>{var l;r?r=(l=r==null?void 0:r.map)===null||l===void 0?void 0:l.get(a):r=void 0}),r!=null&&r.value&&o&&(r.value[1]=this.cacheCallTimes++),r==null?void 0:r.value}get(n){var o;return(o=this.internalGet(n,!0))===null||o===void 0?void 0:o[0]}has(n){return!!this.internalGet(n)}set(n,o){if(!this.has(n)){if(this.size()+1>U.MAX_CACHE_SIZE+U.MAX_CACHE_OFFSET){const[a]=this.keys.reduce((l,s)=>{const[,c]=l;return this.internalGet(s)[1]<c?[s,this.internalGet(s)[1]]:l},[this.keys[0],this.cacheCallTimes]);this.delete(a)}this.keys.push(n)}let r=this.cache;n.forEach((a,l)=>{if(l===n.length-1)r.set(a,{value:[o,this.cacheCallTimes++]});else{const s=r.get(a);s?s.map||(s.map=new Map):r.set(a,{map:new Map}),r=r.get(a).map}})}deleteByPath(n,o){var r;const a=n.get(o[0]);if(o.length===1)return a.map?n.set(o[0],{map:a.map}):n.delete(o[0]),(r=a.value)===null||r===void 0?void 0:r[0];const l=this.deleteByPath(a.map,o.slice(1));return(!a.map||a.map.size===0)&&!a.value&&n.delete(o[0]),l}delete(n){if(this.has(n))return this.keys=this.keys.filter(o=>!Nt(o,n)),this.deleteByPath(this.cache,n)}}U.MAX_CACHE_SIZE=20;U.MAX_CACHE_OFFSET=5;let xe={};function Dt(e,n){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error(`Warning: ${n}`)}function It(){xe={}}function Ft(e,n,o){!n&&!xe[o]&&(e(!1,o),xe[o]=!0)}function Ht(e,n){Ft(Dt,e,n)}function $t(){}let qe=$t;process.env.NODE_ENV!=="production"&&(qe=(e,n,o)=>{Ht(e,`[ant-design-vue: ${n}] ${o}`),process.env.NODE_ENV==="test"&&It()});let Fe=0;class Ze{constructor(n){this.derivatives=Array.isArray(n)?n:[n],this.id=Fe,n.length===0&&qe(n.length>0,"[Efko дизайн Vue CSS-in-JS] Theme should have at least one derivative function."),Fe+=1}getDerivativeToken(n){return this.derivatives.reduce((o,r)=>r(n,o),void 0)}}const fe=new U;function _t(e){const n=Array.isArray(e)?e:[e];return fe.has(n)||fe.set(n,new Ze(n)),fe.get(n)}const He=new WeakMap;function ae(e){let n=He.get(e)||"";return n||(Object.keys(e).forEach(o=>{const r=e[o];n+=o,r instanceof Ze?n+=r.id:r&&typeof r=="object"?n+=ae(r):n+=r}),He.set(e,n)),n}function Lt(e,n){return Ue(`${n}_${ae(e)}`)}const $e={},Rt=process.env.NODE_ENV==="production",Pt=process.env.NODE_ENV==="prerender",Ot=!Rt&&!Pt?"css-dev-only-do-not-override":"css",O=new Map;function zt(e){O.set(e,(O.get(e)||0)+1)}function jt(e,n){typeof document<"u"&&document.querySelectorAll(`style[${St}="${e}"]`).forEach(r=>{var a;r[K]===n&&((a=r.parentNode)===null||a===void 0||a.removeChild(r))})}const Ut=0;function Gt(e,n){O.set(e,(O.get(e)||0)-1);const o=Array.from(O.keys()),r=o.filter(a=>(O.get(a)||0)<=0);o.length-r.length>Ut&&r.forEach(a=>{jt(a,n),O.delete(a)})}const Xt=(e,n,o,r)=>{const a=o.getDerivativeToken(e);let l=A(A({},a),n);return r&&(l=r(l)),l};function Wt(e,n,o=t.ref({})){const r=Be(),a=t.computed(()=>A({},...n.value)),l=t.computed(()=>ae(a.value)),s=t.computed(()=>ae(o.value.override||$e));return Vt("token",t.computed(()=>[o.value.salt||"",e.value.id,l.value,s.value]),()=>{const{salt:h="",override:f=$e,formatToken:d,getComputedToken:v}=o.value,x=v?v(a.value,f,e.value):Xt(a.value,f,e.value,d),C=Lt(x,h);x._tokenKey=C,zt(C);const p=`${Ot}-${Ue(C)}`;return x._hashId=p,[x,p]},h=>{var f;Gt(h[0]._tokenKey,(f=r.value)===null||f===void 0?void 0:f.cache.instanceId)})}const qt="1.7.0";function T(e,n){Zt(e)&&(e="100%");var o=Kt(e);return e=n===360?e:Math.min(n,Math.max(0,parseFloat(e))),o&&(e=parseInt(String(e*n),10)/100),Math.abs(e-n)<1e-6?1:(n===360?e=(e<0?e%n+n:e%n)/parseFloat(String(n)):e=e%n/parseFloat(String(n)),e)}function ee(e){return Math.min(1,Math.max(0,e))}function Zt(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Kt(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Ke(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function te(e){return e<=1?"".concat(Number(e)*100,"%"):e}function z(e){return e.length===1?"0"+e:String(e)}function Yt(e,n,o){return{r:T(e,255)*255,g:T(n,255)*255,b:T(o,255)*255}}function _e(e,n,o){e=T(e,255),n=T(n,255),o=T(o,255);var r=Math.max(e,n,o),a=Math.min(e,n,o),l=0,s=0,c=(r+a)/2;if(r===a)s=0,l=0;else{var h=r-a;switch(s=c>.5?h/(2-r-a):h/(r+a),r){case e:l=(n-o)/h+(n<o?6:0);break;case n:l=(o-e)/h+2;break;case o:l=(e-n)/h+4;break}l/=6}return{h:l,s,l:c}}function pe(e,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(n-e)*(6*o):o<1/2?n:o<2/3?e+(n-e)*(2/3-o)*6:e}function Qt(e,n,o){var r,a,l;if(e=T(e,360),n=T(n,100),o=T(o,100),n===0)a=o,l=o,r=o;else{var s=o<.5?o*(1+n):o+n-o*n,c=2*o-s;r=pe(c,s,e+1/3),a=pe(c,s,e),l=pe(c,s,e-1/3)}return{r:r*255,g:a*255,b:l*255}}function ke(e,n,o){e=T(e,255),n=T(n,255),o=T(o,255);var r=Math.max(e,n,o),a=Math.min(e,n,o),l=0,s=r,c=r-a,h=r===0?0:c/r;if(r===a)l=0;else{switch(r){case e:l=(n-o)/c+(n<o?6:0);break;case n:l=(o-e)/c+2;break;case o:l=(e-n)/c+4;break}l/=6}return{h:l,s:h,v:s}}function Jt(e,n,o){e=T(e,360)*6,n=T(n,100),o=T(o,100);var r=Math.floor(e),a=e-r,l=o*(1-n),s=o*(1-a*n),c=o*(1-(1-a)*n),h=r%6,f=[o,s,l,l,c,o][h],d=[c,o,o,s,l,l][h],v=[l,l,c,o,o,s][h];return{r:f*255,g:d*255,b:v*255}}function Se(e,n,o,r){var a=[z(Math.round(e).toString(16)),z(Math.round(n).toString(16)),z(Math.round(o).toString(16))];return r&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function eo(e,n,o,r,a){var l=[z(Math.round(e).toString(16)),z(Math.round(n).toString(16)),z(Math.round(o).toString(16)),z(to(r))];return a&&l[0].startsWith(l[0].charAt(1))&&l[1].startsWith(l[1].charAt(1))&&l[2].startsWith(l[2].charAt(1))&&l[3].startsWith(l[3].charAt(1))?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function to(e){return Math.round(parseFloat(e)*255).toString(16)}function Le(e){return V(e)/255}function V(e){return parseInt(e,16)}function oo(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var we={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function j(e){var n={r:0,g:0,b:0},o=1,r=null,a=null,l=null,s=!1,c=!1;return typeof e=="string"&&(e=ao(e)),typeof e=="object"&&(_(e.r)&&_(e.g)&&_(e.b)?(n=Yt(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):_(e.h)&&_(e.s)&&_(e.v)?(r=te(e.s),a=te(e.v),n=Jt(e.h,r,a),s=!0,c="hsv"):_(e.h)&&_(e.s)&&_(e.l)&&(r=te(e.s),l=te(e.l),n=Qt(e.h,r,l),s=!0,c="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=Ke(o),{ok:s,format:e.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:o}}var no="[-\\+]?\\d+%?",ro="[-\\+]?\\d*\\.\\d+%?",P="(?:".concat(ro,")|(?:").concat(no,")"),me="[\\s|\\(]+(".concat(P,")[,|\\s]+(").concat(P,")[,|\\s]+(").concat(P,")\\s*\\)?"),ge="[\\s|\\(]+(".concat(P,")[,|\\s]+(").concat(P,")[,|\\s]+(").concat(P,")[,|\\s]+(").concat(P,")\\s*\\)?"),F={CSS_UNIT:new RegExp(P),rgb:new RegExp("rgb"+me),rgba:new RegExp("rgba"+ge),hsl:new RegExp("hsl"+me),hsla:new RegExp("hsla"+ge),hsv:new RegExp("hsv"+me),hsva:new RegExp("hsva"+ge),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ao(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(we[e])e=we[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=F.rgb.exec(e);return o?{r:o[1],g:o[2],b:o[3]}:(o=F.rgba.exec(e),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=F.hsl.exec(e),o?{h:o[1],s:o[2],l:o[3]}:(o=F.hsla.exec(e),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=F.hsv.exec(e),o?{h:o[1],s:o[2],v:o[3]}:(o=F.hsva.exec(e),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=F.hex8.exec(e),o?{r:V(o[1]),g:V(o[2]),b:V(o[3]),a:Le(o[4]),format:n?"name":"hex8"}:(o=F.hex6.exec(e),o?{r:V(o[1]),g:V(o[2]),b:V(o[3]),format:n?"name":"hex"}:(o=F.hex4.exec(e),o?{r:V(o[1]+o[1]),g:V(o[2]+o[2]),b:V(o[3]+o[3]),a:Le(o[4]+o[4]),format:n?"name":"hex8"}:(o=F.hex3.exec(e),o?{r:V(o[1]+o[1]),g:V(o[2]+o[2]),b:V(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function _(e){return!!F.CSS_UNIT.exec(String(e))}var H=function(){function e(n,o){n===void 0&&(n=""),o===void 0&&(o={});var r;if(n instanceof e)return n;typeof n=="number"&&(n=oo(n)),this.originalInput=n;var a=j(n);this.originalInput=n,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=o.format)!==null&&r!==void 0?r:a.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},e.prototype.getLuminance=function(){var n=this.toRgb(),o,r,a,l=n.r/255,s=n.g/255,c=n.b/255;return l<=.03928?o=l/12.92:o=Math.pow((l+.055)/1.055,2.4),s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),c<=.03928?a=c/12.92:a=Math.pow((c+.055)/1.055,2.4),.2126*o+.7152*r+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(n){return this.a=Ke(n),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var n=this.toHsl().s;return n===0},e.prototype.toHsv=function(){var n=ke(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}},e.prototype.toHsvString=function(){var n=ke(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),a=Math.round(n.v*100);return this.a===1?"hsv(".concat(o,", ").concat(r,"%, ").concat(a,"%)"):"hsva(".concat(o,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var n=_e(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}},e.prototype.toHslString=function(){var n=_e(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),a=Math.round(n.l*100);return this.a===1?"hsl(".concat(o,", ").concat(r,"%, ").concat(a,"%)"):"hsla(".concat(o,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(n){return n===void 0&&(n=!1),Se(this.r,this.g,this.b,n)},e.prototype.toHexString=function(n){return n===void 0&&(n=!1),"#"+this.toHex(n)},e.prototype.toHex8=function(n){return n===void 0&&(n=!1),eo(this.r,this.g,this.b,this.a,n)},e.prototype.toHex8String=function(n){return n===void 0&&(n=!1),"#"+this.toHex8(n)},e.prototype.toHexShortString=function(n){return n===void 0&&(n=!1),this.a===1?this.toHexString(n):this.toHex8String(n)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var n=Math.round(this.r),o=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(n,", ").concat(o,", ").concat(r,")"):"rgba(".concat(n,", ").concat(o,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var n=function(o){return"".concat(Math.round(T(o,255)*100),"%")};return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var n=function(o){return Math.round(T(o,255)*100)};return this.a===1?"rgb(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%)"):"rgba(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var n="#"+Se(this.r,this.g,this.b,!1),o=0,r=Object.entries(we);o<r.length;o++){var a=r[o],l=a[0],s=a[1];if(n===s)return l}return!1},e.prototype.toString=function(n){var o=!!n;n=n??this.format;var r=!1,a=this.a<1&&this.a>=0,l=!o&&a&&(n.startsWith("hex")||n==="name");return l?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l+=n/100,o.l=ee(o.l),new e(o)},e.prototype.brighten=function(n){n===void 0&&(n=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(n/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(n/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(n/100)))),new e(o)},e.prototype.darken=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l-=n/100,o.l=ee(o.l),new e(o)},e.prototype.tint=function(n){return n===void 0&&(n=10),this.mix("white",n)},e.prototype.shade=function(n){return n===void 0&&(n=10),this.mix("black",n)},e.prototype.desaturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s-=n/100,o.s=ee(o.s),new e(o)},e.prototype.saturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s+=n/100,o.s=ee(o.s),new e(o)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(n){var o=this.toHsl(),r=(o.h+n)%360;return o.h=r<0?360+r:r,new e(o)},e.prototype.mix=function(n,o){o===void 0&&(o=50);var r=this.toRgb(),a=new e(n).toRgb(),l=o/100,s={r:(a.r-r.r)*l+r.r,g:(a.g-r.g)*l+r.g,b:(a.b-r.b)*l+r.b,a:(a.a-r.a)*l+r.a};return new e(s)},e.prototype.analogous=function(n,o){n===void 0&&(n=6),o===void 0&&(o=30);var r=this.toHsl(),a=360/o,l=[this];for(r.h=(r.h-(a*n>>1)+720)%360;--n;)r.h=(r.h+a)%360,l.push(new e(r));return l},e.prototype.complement=function(){var n=this.toHsl();return n.h=(n.h+180)%360,new e(n)},e.prototype.monochromatic=function(n){n===void 0&&(n=6);for(var o=this.toHsv(),r=o.h,a=o.s,l=o.v,s=[],c=1/n;n--;)s.push(new e({h:r,s:a,v:l})),l=(l+c)%1;return s},e.prototype.splitcomplement=function(){var n=this.toHsl(),o=n.h;return[this,new e({h:(o+72)%360,s:n.s,l:n.l}),new e({h:(o+216)%360,s:n.s,l:n.l})]},e.prototype.onBackground=function(n){var o=this.toRgb(),r=new e(n).toRgb(),a=o.a+r.a*(1-o.a);return new e({r:(o.r*o.a+r.r*r.a*(1-o.a))/a,g:(o.g*o.a+r.g*r.a*(1-o.a))/a,b:(o.b*o.a+r.b*r.a*(1-o.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(n){for(var o=this.toHsl(),r=o.h,a=[this],l=360/n,s=1;s<n;s++)a.push(new e({h:(r+s*l)%360,s:o.s,l:o.l}));return a},e.prototype.equals=function(n){return this.toRgbString()===new e(n).toRgbString()},e}(),oe=2,Re=.16,lo=.05,io=.05,so=.15,Ye=5,Qe=4,co=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Pe(e){var n=e.r,o=e.g,r=e.b,a=ke(n,o,r);return{h:a.h*360,s:a.s,v:a.v}}function ne(e){var n=e.r,o=e.g,r=e.b;return"#".concat(Se(n,o,r,!1))}function uo(e,n,o){var r=o/100,a={r:(n.r-e.r)*r+e.r,g:(n.g-e.g)*r+e.g,b:(n.b-e.b)*r+e.b};return a}function Oe(e,n,o){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=o?Math.round(e.h)-oe*n:Math.round(e.h)+oe*n:r=o?Math.round(e.h)+oe*n:Math.round(e.h)-oe*n,r<0?r+=360:r>=360&&(r-=360),r}function ze(e,n,o){if(e.h===0&&e.s===0)return e.s;var r;return o?r=e.s-Re*n:n===Qe?r=e.s+Re:r=e.s+lo*n,r>1&&(r=1),o&&n===Ye&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function je(e,n,o){var r;return o?r=e.v+io*n:r=e.v-so*n,r>1&&(r=1),Number(r.toFixed(2))}function le(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=[],r=j(e),a=Ye;a>0;a-=1){var l=Pe(r),s=ne(j({h:Oe(l,a,!0),s:ze(l,a,!0),v:je(l,a,!0)}));o.push(s)}o.push(ne(r));for(var c=1;c<=Qe;c+=1){var h=Pe(r),f=ne(j({h:Oe(h,c),s:ze(h,c),v:je(h,c)}));o.push(f)}return n.theme==="dark"?co.map(function(d){var v=d.index,x=d.opacity,C=ne(uo(j(n.backgroundColor||"#141414"),j(o[v]),x*100));return C}):o}var he={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},ve={},ye={};Object.keys(he).forEach(function(e){ve[e]=le(he[e]),ve[e].primary=ve[e][5],ye[e]=le(he[e],{theme:"dark",backgroundColor:"#141414"}),ye[e].primary=ye[e][5]});const fo=e=>{const{controlHeight:n}=e;return{controlHeightSM:n*.75,controlHeightXS:n*.5,controlHeightLG:n*1.25}};function po(e){const{sizeUnit:n,sizeStep:o}=e;return{sizeXXL:n*(o+8),sizeXL:n*(o+4),sizeLG:n*(o+2),sizeMD:n*(o+1),sizeMS:n*o,size:n*o,sizeSM:n*(o-1),sizeXS:n*(o-2),sizeXXS:n*(o-3)}}const Je={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Me=A(A({},Je),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
2
2
|
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
3
|
-
'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function
|
|
3
|
+
'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function mo(e,{generateColorPalettes:n,generateNeutralColorPalettes:o}){const{colorSuccess:r,colorWarning:a,colorError:l,colorInfo:s,colorPrimary:c,colorBgBase:h,colorTextBase:f}=e,d=n(c),v=n(r),x=n(a),C=n(l),p=n(s),S=o(h,f);return A(A({},S),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:v[1],colorSuccessBgHover:v[2],colorSuccessBorder:v[3],colorSuccessBorderHover:v[4],colorSuccessHover:v[4],colorSuccess:v[6],colorSuccessActive:v[7],colorSuccessTextHover:v[8],colorSuccessText:v[9],colorSuccessTextActive:v[10],colorErrorBg:C[1],colorErrorBgHover:C[2],colorErrorBorder:C[3],colorErrorBorderHover:C[4],colorErrorHover:C[5],colorError:C[6],colorErrorActive:C[7],colorErrorTextHover:C[8],colorErrorText:C[9],colorErrorTextActive:C[10],colorWarningBg:x[1],colorWarningBgHover:x[2],colorWarningBorder:x[3],colorWarningBorderHover:x[4],colorWarningHover:x[4],colorWarning:x[6],colorWarningActive:x[7],colorWarningTextHover:x[8],colorWarningText:x[9],colorWarningTextActive:x[10],colorInfoBg:p[1],colorInfoBgHover:p[2],colorInfoBorder:p[3],colorInfoBorderHover:p[4],colorInfoHover:p[4],colorInfo:p[6],colorInfoActive:p[7],colorInfoTextHover:p[8],colorInfoText:p[9],colorInfoTextActive:p[10],colorBgMask:new H("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const go=e=>{let n=e,o=e,r=e,a=e;return e<6&&e>=5?n=e+1:e<16&&e>=6?n=e+2:e>=16&&(n=16),e<7&&e>=5?o=4:e<8&&e>=7?o=5:e<14&&e>=8?o=6:e<16&&e>=14?o=7:e>=16&&(o=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?a=4:e>=8&&(a=6),{borderRadius:e>16?16:e,borderRadiusXS:r,borderRadiusSM:o,borderRadiusLG:n,borderRadiusOuter:a}};function ho(e){const{motionUnit:n,motionBase:o,borderRadius:r,lineWidth:a}=e;return A({motionDurationFast:`${(o+n).toFixed(1)}s`,motionDurationMid:`${(o+n*2).toFixed(1)}s`,motionDurationSlow:`${(o+n*3).toFixed(1)}s`,lineWidthBold:a+1},go(r))}const L=(e,n)=>new H(e).setAlpha(n).toRgbString(),Z=(e,n)=>new H(e).darken(n).toHexString(),vo=e=>{const n=le(e);return{1:n[0],2:n[1],3:n[2],4:n[3],5:n[4],6:n[5],7:n[6],8:n[4],9:n[5],10:n[6]}},yo=(e,n)=>{const o=e||"#fff",r=n||"#000";return{colorBgBase:o,colorTextBase:r,colorText:L(r,.88),colorTextSecondary:L(r,.65),colorTextTertiary:L(r,.45),colorTextQuaternary:L(r,.25),colorFill:L(r,.15),colorFillSecondary:L(r,.06),colorFillTertiary:L(r,.04),colorFillQuaternary:L(r,.02),colorBgLayout:Z(o,4),colorBgContainer:Z(o,0),colorBgElevated:Z(o,0),colorBgSpotlight:L(r,.85),colorBorder:Z(o,15),colorBorderSecondary:Z(o,6)}};function bo(e){const n=new Array(10).fill(null).map((o,r)=>{const a=r-1,l=e*Math.pow(2.71828,a/5),s=r>1?Math.floor(l):Math.ceil(l);return Math.floor(s/2)*2});return n[1]=e,n.map(o=>{const r=o+8;return{size:o,lineHeight:r/o}})}const Co=e=>{const n=bo(e),o=n.map(a=>a.size),r=n.map(a=>a.lineHeight);return{fontSizeSM:o[0],fontSize:o[1],fontSizeLG:o[2],fontSizeXL:o[3],fontSizeHeading1:o[6],fontSizeHeading2:o[5],fontSizeHeading3:o[4],fontSizeHeading4:o[3],fontSizeHeading5:o[2],lineHeight:r[1],lineHeightLG:r[2],lineHeightSM:r[0],lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function xo(e){const n=Object.keys(Je).map(o=>{const r=le(e[o]);return new Array(10).fill(1).reduce((a,l,s)=>(a[`${o}-${s+1}`]=r[s],a),{})}).reduce((o,r)=>(o=A(A({},o),r),o),{});return A(A(A(A(A(A(A({},e),n),mo(e,{generateColorPalettes:vo,generateNeutralColorPalettes:yo})),Co(e.fontSize)),po(e)),fo(e)),ho(e))}function be(e){return e>=0&&e<=255}function re(e,n){const{r:o,g:r,b:a,a:l}=new H(e).toRgb();if(l<1)return e;const{r:s,g:c,b:h}=new H(n).toRgb();for(let f=.01;f<=1;f+=.01){const d=Math.round((o-s*(1-f))/f),v=Math.round((r-c*(1-f))/f),x=Math.round((a-h*(1-f))/f);if(be(d)&&be(v)&&be(x))return new H({r:d,g:v,b:x,a:Math.round(f*100)/100}).toRgbString()}return new H({r:o,g:r,b:a,a:1}).toRgbString()}var ko=function(e,n){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(o[r[a]]=e[r[a]]);return o};function So(e){const{override:n}=e,o=ko(e,["override"]),r=A({},n);Object.keys(Me).forEach(C=>{delete r[C]});const a=A(A({},o),r),l=480,s=576,c=768,h=992,f=1200,d=1600,v=2e3;return A(A(A({},a),{colorLink:a.colorInfoText,colorLinkHover:a.colorInfoHover,colorLinkActive:a.colorInfoActive,colorFillContent:a.colorFillSecondary,colorFillContentHover:a.colorFill,colorFillAlter:a.colorFillQuaternary,colorBgContainerDisabled:a.colorFillTertiary,colorBorderBg:a.colorBgContainer,colorSplit:re(a.colorBorderSecondary,a.colorBgContainer),colorTextPlaceholder:a.colorTextQuaternary,colorTextDisabled:a.colorTextQuaternary,colorTextHeading:a.colorText,colorTextLabel:a.colorTextSecondary,colorTextDescription:a.colorTextTertiary,colorTextLightSolid:a.colorWhite,colorHighlight:a.colorError,colorBgTextHover:a.colorFillSecondary,colorBgTextActive:a.colorFill,colorIcon:a.colorTextTertiary,colorIconHover:a.colorText,colorErrorOutline:re(a.colorErrorBg,a.colorBgContainer),colorWarningOutline:re(a.colorWarningBg,a.colorBgContainer),colorLogo:a.colorLogo,colorSelectedMenu:a.colorSelectedMenu,mainBgColor:a.mainBgColor,fontSizeIcon:a.fontSizeSM,lineWidth:a.lineWidth,controlOutlineWidth:a.lineWidth*2,controlInteractiveSize:a.controlHeight/2,controlItemBgHover:a.colorFillTertiary,controlItemBgActive:a.colorPrimaryBg,controlItemBgActiveHover:a.colorPrimaryBgHover,controlItemBgActiveDisabled:a.colorFill,controlTmpOutline:a.colorFillQuaternary,controlOutline:re(a.colorPrimaryBg,a.colorBgContainer),lineType:a.lineType,borderRadius:a.borderRadius,borderRadiusXS:a.borderRadiusXS,borderRadiusSM:a.borderRadiusSM,borderRadiusLG:a.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:a.sizeXXS,paddingXS:a.sizeXS,paddingSM:a.sizeSM,padding:a.size,paddingMD:a.sizeMD,paddingLG:a.sizeLG,paddingXL:a.sizeXL,paddingContentHorizontalLG:a.sizeLG,paddingContentVerticalLG:a.sizeMS,paddingContentHorizontal:a.sizeMS,paddingContentVertical:a.sizeSM,paddingContentHorizontalSM:a.size,paddingContentVerticalSM:a.sizeXS,marginXXS:a.sizeXXS,marginXS:a.sizeXS,marginSM:a.sizeSM,margin:a.size,marginMD:a.sizeMD,marginLG:a.sizeLG,marginXL:a.sizeXL,marginXXL:a.sizeXXL,boxShadow:`
|
|
4
4
|
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
5
5
|
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
6
6
|
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
13
13
|
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
14
14
|
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
15
|
-
`,screenXS:l,screenXSMin:l,screenXSMax:s-1,screenSM:s,screenSMMin:s,screenSMMax:
|
|
16
|
-
0 1px 2px -2px ${new
|
|
17
|
-
0 3px 6px 0 ${new
|
|
18
|
-
0 5px 12px 4px ${new
|
|
15
|
+
`,screenXS:l,screenXSMin:l,screenXSMax:s-1,screenSM:s,screenSMMin:s,screenSMMax:c-1,screenMD:c,screenMDMin:c,screenMDMax:h-1,screenLG:h,screenLGMin:h,screenLGMax:f-1,screenXL:f,screenXLMin:f,screenXLMax:d-1,screenXXL:d,screenXXLMin:d,screenXXLMax:v-1,screenXXXL:v,screenXXXLMin:v,boxShadowPopoverArrow:"3px 3px 7px rgba(0, 0, 0, 0.1)",boxShadowCard:`
|
|
16
|
+
0 1px 2px -2px ${new H("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
17
|
+
0 3px 6px 0 ${new H("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
18
|
+
0 5px 12px 4px ${new H("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
19
19
|
`,boxShadowDrawerRight:`
|
|
20
20
|
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
21
21
|
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
33
33
|
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
34
34
|
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
35
|
-
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}const Co=Ft(yo),ko={token:Se,hashed:!0},Qe=Symbol("DesignTokenContext"),xe=t.shallowRef(),So=e=>{t.provide(Qe,e),t.watch(e,()=>{xe.value=t.unref(e),t.triggerRef(xe)},{immediate:!0,deep:!0})};t.defineComponent({props:{value:ze()},setup(e,{slots:n}){return So(t.computed(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function Je(){const e=t.inject(Qe,t.computed(()=>xe.value||ko)),n=t.computed(()=>`${Gt}-${e.value.hashed||""}`),o=t.computed(()=>e.value.theme||Co),r=Ut(o,t.computed(()=>[Se,e.value.token]),t.computed(()=>({salt:n.value,override:w({override:e.value.token},e.value.components),formatToken:xo})));return[o,t.computed(()=>r.value[0]),t.computed(()=>e.value.hashed?r.value[1]:"")]}const wo={class:"flex flex-wrap tag-cloud"},Eo={class:"flex flex-wrap"},Ao=t.defineComponent({__name:"FilterTagCloud",props:{filters:{}},emits:["update:filters","remove","clear"],setup(e,{emit:n}){const o=e,r=n,[,a]=Je(),l=t.computed(()=>(console.log(a),{color:a.value.colorSelectedMenu,borderColor:a.value.colorBorderSecondary,backgroundColor:a.value.mainBgColor||a.value.colorPrimaryBg})),s=i=>i==null?!1:Array.isArray(i)?i.length>0:!!i,d=t.computed(()=>Object.values(o.filters).some(s));function p(i){return typeof i=="object"&&i!==null&&"name"in i&&typeof i.name=="string"}const f=i=>{if(typeof i=="string")return{key:i,label:i,original:i};if(Array.isArray(i)){if(i.length===2&&typeof i[0]=="string"&&typeof i[1]=="string"){const k=`${i[0]} - ${i[1]}`;return{key:k,label:k,original:i}}const y=i.join(", ");return{key:y,label:y,original:i}}if(p(i)){const y=i.name;return{key:y,label:y,original:i}}const v=JSON.stringify(i);return{key:v,label:v,original:i}},u=i=>i==null?[]:Array.isArray(i)?i.map(v=>f(v)):[f(i)],m=(i,v)=>typeof i=="string"||typeof v=="string"?i===v:JSON.stringify(i)===JSON.stringify(v),C=(i,v,y)=>{if(Array.isArray(v)){const k=v.filter(b=>!m(b,y));r("update:filters",{...o.filters,[i]:k})}else r("update:filters",{...o.filters,[i]:null});r("remove",i,v,y)},x=()=>{r("update:filters",{}),r("clear")};return(i,v)=>{const y=t.resolveComponent("a-tag"),k=t.resolveComponent("a-button");return t.openBlock(),t.createElementBlock("div",wo,[t.createElementVNode("div",Eo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.entries(e.filters),([b,c])=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:b},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u(c),h=>(t.openBlock(),t.createBlock(y,{key:h.key,class:"filter-tag",closable:!0,style:t.normalizeStyle(l.value),onClose:()=>C(b,c,h.original)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.label),1)]),_:2},1032,["style","onClose"]))),128))],64))),128))]),d.value?(t.openBlock(),t.createBlock(k,{key:0,type:"link",onClick:x},{default:t.withCtx(()=>[...v[0]||(v[0]=[t.createTextVNode(" Очистить все ",-1)])]),_:1})):t.createCommentVNode("",!0)])}}}),G=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},Bo=G(Ao,[["__scopeId","data-v-a32f7554"]]),Mo={class:"flex items-center justify-center text-lg"},oe=t.defineComponent({__name:"TableCellStatus",props:{value:{}},setup(e){return(n,o)=>(t.openBlock(),t.createElementBlock("div",Mo,[e.value?(t.openBlock(),t.createBlock(t.unref(T.CheckCircleTwoTone),{key:1,"two-tone-color":"#bfbfbf"})):(t.openBlock(),t.createBlock(t.unref(T.CheckCircleTwoTone),{key:0,"two-tone-color":"#4ade80"}))]))}}),Vo={class:"flex items-center justify-center gap-2"},To=t.defineComponent({__name:"CardCellActions",props:{record:{},canEdit:{type:Boolean},editAction:{type:Boolean}},emits:["edit","delete","restore"],setup(e,{emit:n}){const o=e,r=n,a=o.canEdit??!0,l=o.editAction??!0,s=f=>r("delete",f),d=f=>r("restore",f),p=f=>r("edit",f);return(f,u)=>{const m=t.resolveComponent("a-button"),C=t.resolveComponent("a-tooltip");return t.openBlock(),t.createElementBlock("div",Vo,[t.unref(a)===!1?(t.openBlock(),t.createBlock(C,{key:0,title:"Смотреть"},{default:t.withCtx(()=>[t.createVNode(m,{icon:t.h(t.unref(T.EyeOutlined)),onClick:u[0]||(u[0]=x=>p(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),t.unref(a)!==!1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.unref(l)!==!1?(t.openBlock(),t.createBlock(C,{key:0,title:"Редактировать"},{default:t.withCtx(()=>[t.createVNode(m,{icon:t.h(t.unref(T.EditOutlined)),onClick:u[1]||(u[1]=x=>p(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(C,{title:e.record.deletedAt?"Восстановить":"Удалить"},{default:t.withCtx(()=>[t.createVNode(m,{icon:t.h(e.record.deletedAt?t.unref(T.RedoOutlined):t.unref(T.DeleteOutlined)),onClick:u[2]||(u[2]=x=>e.record.deletedAt?d(e.record):s(e.record))},null,8,["icon"])]),_:1},8,["title"])],64)):t.createCommentVNode("",!0)])}}}),No={class:"data-card__header"},Io={class:"data-card__body"},Do={class:"data-card__label"},Fo={class:"data-card__value"},Ho={key:0},$o={key:2},_o={key:3},Lo={key:4},Ro={key:5},Po={key:0,class:"data-card__footer"},Oo=t.defineComponent({__name:"TheCard",props:{loading:{type:Boolean},record:{},columns:{},canEdit:{type:Boolean},editAction:{type:Boolean},showActionsColumn:{type:Boolean}},emits:["delete","restore","edit"],setup(e,{emit:n}){const o=e,r=y=>o.record[String(y.dataIndex)],a=y=>{if(y===null||typeof y!="object")return"";if("name"in y){const k=y.name;return typeof k=="string"?k:""}return""},l=y=>y==null?!0:typeof y=="string"?y.trim().length===0:!1,s=y=>y==null?"":typeof y=="string"?y.trim():typeof y=="object"?a(y):String(y),d=y=>{const k=r(y);return Array.isArray(k)?k.map(b=>s(b)).filter(b=>b.trim().length>0):[]},p=y=>d(y).map((k,b)=>({key:`${k}-${b}`,label:k})),f=n,u=o.canEdit??!0,m=o.editAction??!0,C=o.showActionsColumn??!0,x=y=>f("delete",y),i=y=>f("restore",y),v=y=>f("edit",y);return(y,k)=>{const b=t.resolveComponent("a-tag"),c=t.resolveComponent("a-card");return t.openBlock(),t.createBlock(c,{loading:e.loading,bordered:!1,class:"data-card bg-white rounded-3 shadow-sm"},t.createSlots({title:t.withCtx(()=>[t.createElementVNode("div",No,[t.renderSlot(y.$slots,"title",{},void 0,!0)])]),default:t.withCtx(()=>[t.createElementVNode("div",Io,[t.renderSlot(y.$slots,"body",{record:e.record,columns:e.columns},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,h=>(t.openBlock(),t.createElementBlock("div",{key:h.dataIndex,class:"data-card__row"},[t.createElementVNode("span",Do,t.toDisplayString(h.title)+": ",1),t.createElementVNode("span",Fo,[h.dataIndex==="deletedAt"?(t.openBlock(),t.createElementBlock("span",Ho,[t.createVNode(oe,{value:e.record.deletedAt},null,8,["value"])])):Array.isArray(r(h))?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[h.tag===!0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(p(h),S=>(t.openBlock(),t.createBlock(b,{key:S.key,class:"mr-1 mb-1"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(S.label),1)]),_:2},1024))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(d(h),(S,E)=>(t.openBlock(),t.createElementBlock("span",{key:E},[t.createTextVNode(t.toDisplayString(S)+" ",1),E<d(h).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" , ")],64)):t.createCommentVNode("",!0)]))),128))],64)):typeof r(h)=="boolean"?(t.openBlock(),t.createElementBlock("span",$o,[t.createVNode(oe,{value:!r(h)},null,8,["value"])])):r(h)!==null&&typeof r(h)=="object"?(t.openBlock(),t.createElementBlock("span",_o,t.toDisplayString(a(r(h))),1)):h.tag===!0?(t.openBlock(),t.createElementBlock("span",Lo,[l(r(h))?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(b,{key:0},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r(h)),1)]),_:2},1024))])):(t.openBlock(),t.createElementBlock("span",Ro,t.toDisplayString(r(h)),1))])]))),128))],!0)]),y.$slots.footer?(t.openBlock(),t.createElementBlock("div",Po,[t.renderSlot(y.$slots,"footer",{record:e.record,columns:e.columns},void 0,!0)])):t.createCommentVNode("",!0)]),_:2},[t.unref(C)?{name:"actions",fn:t.withCtx(()=>[t.createVNode(To,{record:e.record,"can-edit":t.unref(u),"edit-action":t.unref(m),onEdit:v,onDelete:x,onRestore:i},null,8,["record","can-edit","edit-action"])]),key:"0"}:void 0]),1032,["loading"])}}}),zo=G(Oo,[["__scopeId","data-v-c6be2770"]]),jo={class:"efko-dataview"},Ye=t.defineComponent({__name:"LazyLoadTrigger",props:{onIntersect:{},threshold:{default:.1},once:{type:Boolean,default:!1},loading:{type:Boolean}},setup(e){const n=e,o=t.ref(null);let r=null;const a=l=>{var d;l[0].isIntersecting&&((d=n.onIntersect)==null||d.call(n),n.once&&r&&r.disconnect())};return t.onMounted(()=>{r=new IntersectionObserver(a,{threshold:n.threshold}),o.value&&r.observe(o.value)}),t.onBeforeUnmount(()=>{r&&r.disconnect()}),(l,s)=>{const d=t.resolveComponent("a-spin");return t.openBlock(),t.createElementBlock("div",jo,[t.createElementVNode("div",{ref_key:"container",ref:o,style:{height:"1px"},class:"flex items-center justify-center py-5"},[t.createVNode(d,{spinning:e.loading},null,8,["spinning"])],512)])}}}),Uo={class:"efko-dataview"},Go={class:"flex flex-col gap-4"},Xo=t.defineComponent({__name:"CardGrid",props:{loading:{type:Boolean},columns:{},dataSource:{},cardLayout:{},canEdit:{type:Boolean},editAction:{type:Boolean},showActionsColumn:{type:Boolean},pagination:{type:Boolean},meta:{}},emits:["delete","restore","edit","pageChange","sizeChange"],setup(e,{emit:n}){const o=e,r=n;t.onMounted(()=>{const u=document.querySelector(".card-grid");u!==null&&Ce(u)});const a=t.computed(()=>o.cardLayout==="row"?"card-grid card-grid--row":"card-grid card-grid--grid"),l=t.computed(()=>o.columns),s=t.ref([]),d=()=>{var C;if(((C=o.meta)==null?void 0:C.currentPage)===1){s.value=[...o.dataSource];return}const u=new Set(s.value.map(x=>x.id)),m=o.dataSource.filter(x=>!u.has(x.id));s.value.push(...m)};d(),t.watch(()=>{var u;return[o.dataSource,(u=o.meta)==null?void 0:u.currentPage]},d,{deep:!0});const p=t.computed(()=>o.meta===void 0?!0:o.meta.currentPage*o.meta.pageSize>=o.meta.total),f=()=>{o.loading||p.value||!o.meta||r("pageChange",o.meta.currentPage+1)};return(u,m)=>(t.openBlock(),t.createElementBlock("div",Uo,[t.createElementVNode("div",Go,[t.createElementVNode("div",{class:t.normalizeClass(a.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(C,x)=>(t.openBlock(),t.createBlock(zo,{key:String(C.id??`card-${x}`),loading:e.loading,record:C,columns:l.value,"can-edit":e.canEdit,"edit-action":e.editAction,"show-actions-column":e.showActionsColumn,onEdit:m[0]||(m[0]=i=>r("edit",i)),onDelete:m[1]||(m[1]=i=>r("delete",i)),onRestore:m[2]||(m[2]=i=>r("restore",i))},t.createSlots({_:2},[u.$slots.titleCard?{name:"title",fn:t.withCtx(()=>[t.renderSlot(u.$slots,"titleCard",{record:C,columns:l.value},void 0,!0)]),key:"0"}:void 0,u.$slots.bodyCard?{name:"body",fn:t.withCtx(({record:i,columns:v})=>[t.renderSlot(u.$slots,"bodyCard",{record:i,columns:v},void 0,!0)]),key:"1"}:void 0,u.$slots.footerCard?{name:"footer",fn:t.withCtx(({record:i,columns:v})=>[t.renderSlot(u.$slots,"footerCard",{record:i,columns:v},void 0,!0)]),key:"2"}:void 0]),1032,["loading","record","columns","can-edit","edit-action","show-actions-column"]))),128))],2),e.pagination&&!p.value?(t.openBlock(),t.createBlock(Ye,{key:0,loading:e.loading,once:!1,"on-intersect":f},null,8,["loading"])):t.createCommentVNode("",!0)])]))}}),et=G(Xo,[["__scopeId","data-v-e3e3f0a2"]]),tt="10",Wo="20",qo="50",Zo="100",Ko="1000",Qo=1,Jo=tt;var H=(e=>(e.SEARCH="search",e.SELECT="select",e.DATE="date",e))(H||{}),ot=(e=>(e.SMALL="10",e.MEDIUM="20",e.LARGE="50",e.EXTRA_LARGE="100",e.ULTRA="1000",e))(ot||{});const Yo=["10","20","50","100"];var nt=(e=>(e[e.NONE=0]="NONE",e[e.SMALL=10]="SMALL",e[e.MEDIUM=20]="MEDIUM",e[e.LARGE=50]="LARGE",e))(nt||{}),rt=(e=>(e[e.DEFAULT_CURRENT_PAGE=1]="DEFAULT_CURRENT_PAGE",e))(rt||{}),ne=(e=>(e.ASCEND="ascend",e.DESCEND="descend",e))(ne||{}),at=(e=>(e.ASC="asc",e.DESC="desc",e))(at||{});const en=t.defineComponent({name:"MultiselectWrapper",components:{VueMultiselect:mt},props:{modelValue:{type:[Array,String,Number,Object,Boolean,null],default:null}},emits:["update:modelValue"],data(){return{simpleImage:gt.Empty.PRESENTED_IMAGE_SIMPLE}}});function tn(e,n,o,r,a,l){const s=t.resolveComponent("a-empty"),d=t.resolveComponent("VueMultiselect");return t.openBlock(),t.createBlock(d,t.mergeProps(e.$attrs,{class:"filter-select",modelValue:e.modelValue,"onUpdate:modelValue":n[0]||(n[0]=p=>e.$emit("update:modelValue",p)),label:"name","value-prop":"id"}),{nooptions:t.withCtx(()=>[t.createVNode(s,{image:e.simpleImage},null,8,["image"])]),_:1},16,["modelValue"])}const lt=G(en,[["render",tn],["__scopeId","data-v-cfb3f123"]]),on={class:"efko-dataview"},nn={class:"flex items-center gap-2 p-2"},rn=t.defineComponent({__name:"FilterDropdown",props:{placeholder:{},filterMode:{},componentProps:{}},emits:["update:modelValue","apply"],setup(e,{emit:n}){const o=e,r=n,a=t.computed(()=>o.filterMode===H.SEARCH?"a-input":o.filterMode===H.SELECT?lt:o.filterMode===H.DATE?"a-range-picker":null),l=t.ref(null),s=()=>{r("update:modelValue",l.value),r("apply")};return(d,p)=>{const f=t.resolveComponent("a-button");return t.openBlock(),t.createElementBlock("div",on,[t.createElementVNode("div",nn,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value),t.mergeProps(e.componentProps,{value:l.value,"onUpdate:value":p[0]||(p[0]=u=>l.value=u),modelValue:l.value,"onUpdate:modelValue":p[1]||(p[1]=u=>l.value=u),placeholder:e.placeholder,style:{"min-width":"240px","max-width":"300px","font-size":"14px"},object:""}),null,16,["value","modelValue","placeholder"])),t.createVNode(f,{type:"primary",size:"small",onClick:s},{default:t.withCtx(()=>[...p[2]||(p[2]=[t.createTextVNode(" Добавить ",-1)])]),_:1})])])}}}),an={class:"flex items-center justify-center gap-2"},ln=t.defineComponent({__name:"TableCellActions",props:{record:{},canEdit:{type:Boolean},editAction:{type:Boolean},deleteAction:{type:Boolean}},emits:["edit","delete","restore"],setup(e,{emit:n}){const o=e,r=n,a=d=>{r("delete",d)},l=d=>{r("restore",d)},s=d=>{r("edit",d)};return(d,p)=>{const f=t.resolveComponent("a-button"),u=t.resolveComponent("a-tooltip");return t.openBlock(),t.createElementBlock("div",an,[o.canEdit===!1?(t.openBlock(),t.createBlock(u,{key:0,title:"Смотреть"},{default:t.withCtx(()=>[t.createVNode(f,{icon:t.h(t.unref(T.EyeOutlined)),onClick:p[0]||(p[0]=m=>s(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),e.canEdit!==!1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[o.editAction!==!1?(t.openBlock(),t.createBlock(u,{key:0,title:"Редактировать"},{default:t.withCtx(()=>[t.createVNode(f,{icon:t.h(t.unref(T.EditOutlined)),onClick:p[1]||(p[1]=m=>s(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),e.deleteAction!==!1?(t.openBlock(),t.createBlock(u,{key:1,title:e.record.isDeleted?"Восстановить":"Удалить"},{default:t.withCtx(()=>[t.createVNode(f,{icon:t.h(e.record.isDeleted?t.unref(T.RedoOutlined):t.unref(T.DeleteOutlined)),onClick:p[2]||(p[2]=m=>e.record.isDeleted?l(e.record):a(e.record))},null,8,["icon"])]),_:1},8,["title"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)])}}}),sn={key:0},cn={key:1},dn={key:2},un={key:3},fn={key:4},pn={key:5},it=t.defineComponent({__name:"TableBodyCell",props:{loading:{type:Boolean},column:{},record:{},tagStyle:{}},setup(e){const n=e,o=t.computed(()=>n.record[String(n.column.dataIndex)]),r=f=>f==null?!0:typeof f=="string"?f.trim().length===0:!1,a=f=>{if(f===null||typeof f!="object")return"";if("name"in f){const u=f.name;return typeof u=="string"?u:""}return""},l=f=>f==null?"":typeof f=="string"?f.trim():typeof f=="object"?a(f):String(f),s=t.computed(()=>{const f=o.value;return Array.isArray(f)?f.map(u=>l(u)).filter(u=>u.trim().length>0):[]}),d=t.computed(()=>s.value.map((f,u)=>({key:`${f}-${u}`,label:f}))),p=t.computed(()=>!r(o.value));return(f,u)=>{const m=t.resolveComponent("a-skeleton"),C=t.resolveComponent("a-tag");return e.loading?(t.openBlock(),t.createBlock(m,{key:0,active:!0,loading:!0,title:!1,paragraph:{rows:1}})):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.column.dataIndex==="isDeleted"?(t.openBlock(),t.createElementBlock("span",sn,[t.createVNode(oe,{value:e.record.isDeleted},null,8,["value"])])):Array.isArray(o.value)?(t.openBlock(),t.createElementBlock("span",cn,[e.column.tag===!0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(d.value,x=>(t.openBlock(),t.createBlock(C,{key:x.key,style:t.normalizeStyle(e.tagStyle),class:"mr-1 mb-1"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(x.label),1)]),_:2},1032,["style"]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(s.value,(x,i)=>(t.openBlock(),t.createElementBlock("span",{key:i},[t.createTextVNode(t.toDisplayString(x)+" ",1),i<s.value.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(", ")],64)):t.createCommentVNode("",!0)]))),128))])):typeof o.value=="boolean"?(t.openBlock(),t.createElementBlock("span",dn,[t.createVNode(oe,{value:!o.value},null,8,["value"])])):o.value!==null&&typeof o.value=="object"?(t.openBlock(),t.createElementBlock("span",un,t.toDisplayString(a(o.value)),1)):e.column.tag===!0?(t.openBlock(),t.createElementBlock("span",fn,[p.value?(t.openBlock(),t.createBlock(C,{key:0,style:t.normalizeStyle(e.tagStyle)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(String(o.value)),1)]),_:1},8,["style"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[],64))])):(t.openBlock(),t.createElementBlock("span",pn,t.toDisplayString(o.value),1))],64))}}}),mn={class:"efko-dataview"},gn={class:"flex items-center justify-between"},hn={class:"flex items-center gap-2"},st=t.defineComponent({__name:"TheTable",props:{loading:{type:Boolean},pagination:{type:Boolean},columns:{},dataSource:{},filterValues:{},meta:{},canEdit:{type:Boolean},editAction:{type:Boolean},deleteAction:{type:Boolean},showActionsColumn:{type:Boolean},columnsVisibility:{},disableColumnFilterDropdowns:{type:Boolean},showFilterButton:{type:Boolean}},emits:["update:filterValues","filterApply","restore","edit","delete","sortChange","pageChange","sizeChange","openColumnDrawer","openFilterDrawer"],setup(e,{emit:n}){const[,o]=Je(),r=e,a=n,l=t.computed(()=>r.showFilterButton===!0),s=t.ref(r.filterValues||{}),d=t.ref([...r.columns]),p=t.ref({}),f=t.computed(()=>r.disableColumnFilterDropdowns===!0?[]:d.value.filter(c=>c.filterable)),u=t.computed(()=>{const h=d.value.filter(S=>{if(S.filterOnly)return!1;const E=S.key||String(S.dataIndex);return r.columnsVisibility[E]!==!1}).map(S=>{const{headerAlign:E,cellAlign:g,...B}=S;return{...B,sorter:!!B.sortable,sortDirections:B.sortable?[ne.ASCEND,ne.DESCEND]:void 0,customHeaderCell:()=>E?{style:{textAlign:E}}:void 0,customCell:()=>g?{style:{textAlign:g}}:void 0,customFilterDropdown:!!B.filterable,slots:B.filterable?{filterDropdown:`filter${String(B.dataIndex)}Dropdown`}:void 0}});return r.showActionsColumn!==!1&&r.columnsVisibility.actions!==!1&&h.push({title:"Действия",key:"actions",dataIndex:"actions",width:100,slots:{customRender:"actionColumn"}}),h}),m=t.computed(()=>Object.keys(r.columnsVisibility).filter(c=>r.columnsVisibility[c]===!1).length),C=t.computed(()=>({color:o.value.colorSelectedMenu,borderColor:o.value.colorBorderSecondary,backgroundColor:o.value.mainBgColor||o.value.colorPrimaryBg})),x=c=>{const h=s.value[c];return Array.isArray(h)?h:h!=null?[h]:[]},i=(c,h)=>{const S={...s.value};if(h===null)S[c]=null,a("filterApply",{key:c,value:[]});else if(Array.isArray(h)){const E=h.filter(g=>g!=null);E.length===0?(S[c]=null,a("filterApply",{key:c,value:[]})):E.length===1?(S[c]=E[0],a("filterApply",{key:c,value:E})):(S[c]=E,a("filterApply",{key:c,value:E}))}else S[c]=h,a("filterApply",{key:c,value:[h]});a("update:filterValues",S),s.value=S,p.value[c]=null},v=(c,h)=>{const S=String(c.dataIndex);if(h==null){p.value[S]=null;return}if(c.filterMode===H.SELECT){const g=x(S);if(Array.isArray(h)){const B=[];h.forEach(R=>{B.some(z=>_.isEqual(z,R))||B.push(R)}),B.length===g.length&&B.every(R=>g.some(z=>_.isEqual(z,R)))?p.value[S]=null:i(S,B);return}if(g.some(B=>_.isEqual(B,h))){p.value[S]=null;return}i(S,[...g,h]);return}const E=s.value[S];if(_.isEqual(E,h)){p.value[S]=null;return}i(S,h)},y=c=>c.isGroup?"parent-row":"",k=(c,h,S)=>{a("sortChange",{columnKey:S.columnKey||"",order:S.order||null})},b=(c,h)=>{const S=h.key||String(h.dataIndex),E=d.value.findIndex(g=>(g.key||String(g.dataIndex))===S);E!==-1&&d.value.splice(E,1,{...h,width:c})};return t.watch(()=>r.filterValues,c=>{s.value=c||{}}),t.watch(()=>r.columns,c=>{d.value=[...c]},{immediate:!0}),t.onMounted(()=>{const c=document.querySelector(".the-table tbody");c!==null&&Ce(c)}),(c,h)=>{var R,z,Ae,Be;const S=t.resolveComponent("Icon"),E=t.resolveComponent("a-button"),g=t.resolveComponent("a-badge"),B=t.resolveComponent("a-table"),Ee=t.resolveComponent("a-pagination");return t.openBlock(),t.createElementBlock("div",mn,[t.createVNode(B,{bordered:"","table-layout":"fixed",class:"the-table",loading:e.loading,columns:u.value,"data-source":e.dataSource,"row-key":A=>A.id,pagination:!1,scroll:{x:"max-content"},"row-class-name":y,onChange:k,onResizeColumn:b},t.createSlots({title:t.withCtx(()=>[t.createElementVNode("div",gn,[t.createElementVNode("div",hn,[t.createVNode(g,{dot:"",count:m.value},{default:t.withCtx(()=>[t.createVNode(E,{class:"flex items-center justify-center p-2",onClick:h[0]||(h[0]=A=>c.$emit("openColumnDrawer"))},{default:t.withCtx(()=>[t.createVNode(S,{name:"solar:settings-outline",class:"text-lg"})]),_:1})]),_:1},8,["count"]),l.value?(t.openBlock(),t.createBlock(E,{key:0,class:"flex items-center justify-center p-2",onClick:h[1]||(h[1]=A=>c.$emit("openFilterDrawer"))},{default:t.withCtx(()=>[t.createVNode(S,{name:"ant-design:filter-outlined",class:"text-lg"})]),_:1})):t.createCommentVNode("",!0)]),t.renderSlot(c.$slots,"title")])]),bodyCell:t.withCtx(({column:A,record:$})=>[t.renderSlot(c.$slots,"bodyCell",{column:A,record:$},()=>[t.createVNode(it,{loading:e.loading,column:A,record:$,"tag-style":C.value},null,8,["loading","column","record","tag-style"])])]),actionColumn:t.withCtx(({record:A})=>[t.renderSlot(c.$slots,"actionColumn",{record:A},()=>[t.createVNode(ln,{"edit-action":e.editAction,"delete-action":e.deleteAction,"can-edit":e.canEdit,record:A,onEdit:()=>c.$emit("edit",A),onDelete:()=>c.$emit("delete",A),onRestore:()=>c.$emit("restore",A)},null,8,["edit-action","delete-action","can-edit","record","onEdit","onDelete","onRestore"])])]),_:2},[t.renderList(f.value,A=>({name:`filter${String(A.dataIndex)}Dropdown`,fn:t.withCtx(()=>[t.createVNode(rn,{modelValue:p.value[A.dataIndex],"onUpdate:modelValue":[$=>p.value[A.dataIndex]=$,$=>v(A,$)],"filter-mode":A.filterMode,"component-props":A.componentProps,placeholder:A.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])])}))]),1032,["loading","columns","data-source","row-key"]),e.pagination?(t.openBlock(),t.createBlock(Ee,{key:0,class:"mt-4 text-right",current:(R=e.meta)==null?void 0:R.currentPage,"page-size":(z=e.meta)==null?void 0:z.pageSize,total:(Ae=e.meta)==null?void 0:Ae.total,"show-total":A=>`Всего ${A} элементов`,"page-size-options":(Be=e.meta)==null?void 0:Be.pageSizeOptions,"show-size-changer":!0,onChange:h[2]||(h[2]=A=>c.$emit("pageChange",A)),onShowSizeChange:h[3]||(h[3]=(A,$)=>c.$emit("sizeChange",A,$))},null,8,["current","page-size","total","show-total","page-size-options"])):t.createCommentVNode("",!0)])}}}),vn={class:"mb-4"},yn={class:"flex flex-col gap-1"},ct=t.defineComponent({__name:"ColumnSettingsDrawer",props:{visible:{type:Boolean},columns:{},modelValue:{},showActionsColumn:{type:Boolean},disableViewMode:{type:Boolean},viewMode:{},cardLayout:{}},emits:["update:visible","update:modelValue","update:viewMode","update:cardLayout"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.visible),l=t.ref(o.viewMode),s=t.ref(o.cardLayout),d=t.reactive({...o.modelValue}),p=t.computed(()=>l.value==="grid"),f=o.disableViewMode||!1;return t.watch(()=>o.visible,u=>{a.value=u}),t.watch(a,u=>{r("update:visible",u)}),t.watch(()=>o.viewMode,u=>{l.value=u}),t.watch(l,u=>{r("update:viewMode",u)}),t.watch(()=>o.cardLayout,u=>{s.value=u}),t.watch(s,u=>{r("update:cardLayout",u)}),t.watch(()=>o.modelValue,u=>Object.assign(d,u),{deep:!0}),t.watch(d,u=>r("update:modelValue",{...u}),{deep:!0}),o.showActionsColumn&&d.actions===void 0&&(d.actions=!0),(u,m)=>{const C=t.resolveComponent("a-checkbox"),x=t.resolveComponent("a-radio"),i=t.resolveComponent("a-radio-group"),v=t.resolveComponent("a-radio-button"),y=t.resolveComponent("a-drawer");return t.openBlock(),t.createBlock(y,{open:a.value,"onUpdate:open":m[2]||(m[2]=k=>a.value=k),class:"efko-dataview",title:"Настройки представления",placement:"right"},{default:t.withCtx(()=>[t.createElementVNode("section",vn,[m[3]||(m[3]=t.createElementVNode("h3",{class:"font-bold text-base mb-2"},"Отображение колонок",-1)),t.createElementVNode("div",yn,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,k=>(t.openBlock(),t.createElementBlock("div",{key:k.key??k.dataIndex},[t.createVNode(C,{checked:d[k.key??k.dataIndex],"onUpdate:checked":b=>d[k.key??k.dataIndex]=b,disabled:p.value,class:"flex"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k.title),1)]),_:2},1032,["checked","onUpdate:checked","disabled"])]))),128))])]),t.createElementVNode("section",null,[m[8]||(m[8]=t.createElementVNode("h3",{class:"font-bold text-base mb-2"},"Вид",-1)),t.createVNode(i,{value:l.value,"onUpdate:value":m[0]||(m[0]=k=>l.value=k),"button-style":"solid",class:"mb-3",disabled:t.unref(f)},{default:t.withCtx(()=>[t.createVNode(x,{value:"table"},{default:t.withCtx(()=>[...m[4]||(m[4]=[t.createTextVNode("Таблица",-1)])]),_:1}),t.createVNode(x,{value:"grid"},{default:t.withCtx(()=>[...m[5]||(m[5]=[t.createTextVNode("Карточки",-1)])]),_:1})]),_:1},8,["value","disabled"]),t.createVNode(i,{value:s.value,"onUpdate:value":m[1]||(m[1]=k=>s.value=k),"button-style":"solid",disabled:!p.value},{default:t.withCtx(()=>[t.createVNode(v,{value:"grid"},{default:t.withCtx(()=>[t.createVNode(t.unref(T.AppstoreOutlined),{class:"mr-2"}),m[6]||(m[6]=t.createTextVNode("Сетка ",-1))]),_:1}),t.createVNode(v,{value:"row"},{default:t.withCtx(()=>[t.createVNode(t.unref(T.PicCenterOutlined),{class:"mr-2"}),m[7]||(m[7]=t.createTextVNode("Строка ",-1))]),_:1})]),_:1},8,["value","disabled"])])]),_:1},8,["open"])}}}),dt=t.defineComponent({__name:"FilterInput",props:{modelValue:{type:[String,Number,Boolean,Object,Array,null]},filterMode:{},componentProps:{},placeholder:{}},emits:["update:modelValue"],setup(e,{emit:n}){const o=e,r=n,a=t.computed(()=>o.filterMode===H.SEARCH?"a-input":o.filterMode===H.SELECT?lt:o.filterMode===H.DATE?"a-range-picker":"a-input"),l=t.ref(o.modelValue);return t.watch(()=>o.modelValue,s=>{l.value=s}),t.watch(l,s=>r("update:modelValue",s)),(s,d)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value),t.mergeProps(e.componentProps,{value:l.value,"onUpdate:value":d[0]||(d[0]=p=>l.value=p),modelValue:l.value,"onUpdate:modelValue":d[1]||(d[1]=p=>l.value=p),placeholder:e.placeholder,class:"w-full text-sm"}),null,16,["value","modelValue","placeholder"]))}}),bn={class:"text-sm font-medium"},xn={class:"mt-2 flex flex-col gap-2"},Cn=t.defineComponent({__name:"CardFiltersDrawer",props:{visible:{type:Boolean},columns:{},filterValues:{}},emits:["update:visible","update:filterValues","filterApply"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.visible),l=t.reactive({...o.filterValues}),s=i=>i.key??String(i.dataIndex),d=i=>Array.isArray(i)?i:i!=null?[i]:[],p=i=>i==null?!0:Array.isArray(i)?i.length===0:typeof i=="string"?i.trim()==="":!1,f=t.computed(()=>o.columns.filter(i=>i.filterable)),u=t.computed(()=>Object.keys(l).some(i=>!_.isEqual(l[i],o.filterValues[i]))),m=i=>{Object.keys(l).forEach(v=>{delete l[v]}),Object.assign(l,i)};t.watch(()=>o.visible,i=>{a.value=i,i&&m(o.filterValues)}),t.watch(a,i=>{r("update:visible",i)}),t.watch(()=>o.filterValues,i=>{m(i)},{deep:!0});const C=()=>{const i={...o.filterValues};Object.entries(l).forEach(([v,y])=>{if(p(y)){i[v]=null,r("filterApply",{key:v,value:[]});return}i[v]=y,r("filterApply",{key:v,value:d(y)})}),r("update:filterValues",i),a.value=!1},x=()=>{Object.keys(l).forEach(v=>{delete l[v]}),r("update:filterValues",{})};return(i,v)=>{const y=t.resolveComponent("a-button"),k=t.resolveComponent("a-drawer");return t.openBlock(),t.createBlock(k,{open:a.value,"onUpdate:open":v[0]||(v[0]=b=>a.value=b),class:"efko-dataview",placement:"right",width:"360",title:"Фильтры","body-style":"padding: 24px"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.value,b=>(t.openBlock(),t.createElementBlock("section",{key:s(b),class:"mb-4 flex flex-col gap-2"},[t.createElementVNode("span",bn,t.toDisplayString(b.title),1),t.createVNode(dt,{modelValue:l[s(b)],"onUpdate:modelValue":c=>l[s(b)]=c,"filter-mode":b.filterMode,"component-props":b.componentProps,placeholder:b.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])]))),128)),t.createElementVNode("div",xn,[t.createVNode(y,{block:"",onClick:x},{default:t.withCtx(()=>[...v[1]||(v[1]=[t.createTextVNode(" Сбросить ",-1)])]),_:1}),t.createVNode(y,{type:"primary",block:"",disabled:!u.value,onClick:C},{default:t.withCtx(()=>[...v[2]||(v[2]=[t.createTextVNode(" Применить ",-1)])]),_:1},8,["disabled"])])]),_:1},8,["open"])}}}),ut=G(Cn,[["__scopeId","data-v-2b4aab81"]]),kn={class:"text-sm font-medium"},Sn=t.defineComponent({__name:"CardFiltersModal",props:{visible:{type:Boolean},columns:{},filterValues:{}},emits:["update:visible","update:filterValues","filterApply"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.visible),l=t.reactive({...o.filterValues}),s=i=>i.key??String(i.dataIndex),d=i=>Array.isArray(i)?i:i!=null?[i]:[],p=i=>i==null?!0:Array.isArray(i)?i.length===0:typeof i=="string"?i.trim()==="":!1,f=t.computed(()=>o.columns.filter(i=>i.filterable)),u=t.computed(()=>Object.keys(l).some(i=>!_.isEqual(l[i],o.filterValues[i]))),m=i=>{Object.keys(l).forEach(v=>{delete l[v]}),Object.assign(l,i)};t.watch(()=>o.visible,i=>{a.value=i,i&&m(o.filterValues)}),t.watch(a,i=>{r("update:visible",i)}),t.watch(()=>o.filterValues,i=>{m(i)},{deep:!0});const C=()=>{const i={...o.filterValues};Object.entries(l).forEach(([v,y])=>{if(p(y)){i[v]=null,r("filterApply",{key:v,value:[]});return}i[v]=y,r("filterApply",{key:v,value:d(y)})}),r("update:filterValues",i),a.value=!1},x=()=>{a.value=!1};return(i,v)=>{const y=t.resolveComponent("a-modal");return t.openBlock(),t.createBlock(y,{visible:a.value,"onUpdate:visible":v[0]||(v[0]=k=>a.value=k),class:"efko-dataview",title:"Фильтры","destroy-on-close":"","ok-text":"Применить","cancel-text":"Сбросить","ok-button-props":{disabled:!u.value},onOk:C,onCancel:x},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.value,k=>(t.openBlock(),t.createElementBlock("section",{key:s(k),class:"mb-4 flex flex-col gap-2"},[t.createElementVNode("span",kn,t.toDisplayString(k.title),1),t.createVNode(dt,{modelValue:l[s(k)],"onUpdate:modelValue":b=>l[s(k)]=b,"filter-mode":k.filterMode,"component-props":k.componentProps,placeholder:k.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])]))),128))]),_:1},8,["visible","ok-button-props"])}}}),ft=G(Sn,[["__scopeId","data-v-f8bc496a"]]);var re=(e=>(e.Table="table",e.Grid="grid",e))(re||{}),we=(e=>(e.Grid="grid",e.Row="row",e))(we||{});const wn={class:"efko-dataview"},En={class:"flex items-center justify-between gap-2 mb-2"},An={class:"flex items-center gap-1"},pt=t.defineComponent({__name:"DataView",props:{viewMode:{},loading:{type:Boolean},pagination:{type:Boolean,default:!1},columns:{},dataSource:{},filterValues:{},meta:{},canEdit:{type:Boolean,default:!0},editAction:{type:Boolean,default:!0},deleteAction:{type:Boolean,default:!0},showActionsColumn:{type:Boolean,default:!0},disableViewMode:{type:Boolean,default:!1},enableTableFilterDrawer:{type:Boolean,default:!1},disableColumnFilterDropdowns:{type:Boolean,default:!1},useFilterModal:{type:Boolean,default:!1}},emits:["update:viewMode","update:filterValues","filterApply","edit","delete","restore","sortChange","pageChange","sizeChange"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.viewMode||re.Table),l=t.computed(()=>(a==null?void 0:a.value)===re.Grid),s=t.ref(we.Grid),d=t.ref(o.filterValues||{}),p=t.ref(null),f=b=>{d.value=b,r("update:filterValues",b)},u=(b,c,h)=>{const S={...d.value};if(c!==void 0){if(Array.isArray(c)){const E=c.filter(g=>!_.isEqual(g,h));E.length===0?S[b]=null:E.length===1?S[b]=E[0]:S[b]=E,f(S);return}_.isEqual(c,h)&&(S[b]=null,f(S))}},m=()=>f({}),C=b=>{r("filterApply",b)},x=t.ref(!1),i=t.ref(!1),v=t.ref({}),y=t.computed(()=>a.value==="table"?Object.keys(v.value).filter(b=>v.value[b]===!1).length:0),k=b=>{b.forEach(c=>{const h=c.key??String(c.dataIndex);v.value[h]===void 0&&(v.value[h]=!0)}),o.showActionsColumn&&v.value.actions===void 0&&(v.value.actions=!0)};return t.watch(()=>o.filterValues,b=>{d.value=b||{}}),t.watch(()=>o.viewMode,b=>{b!==void 0&&(a.value=b)}),t.watch(()=>o.columns,k),t.watch(a,b=>r("update:viewMode",b)),t.onMounted(()=>k(o.columns)),t.onMounted(()=>{p.value&&Ce(p.value)}),(b,c)=>{const h=t.resolveComponent("Icon"),S=t.resolveComponent("a-button"),E=t.resolveComponent("a-badge");return t.openBlock(),t.createElementBlock("div",wn,[t.createElementVNode("div",{ref_key:"tagCloudContainer",ref:p},[t.createVNode(Bo,{filters:d.value,"onUpdate:filters":f,onRemove:u,onClear:m},null,8,["filters"])],512),l.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",En,[t.createElementVNode("div",An,[t.createVNode(E,{dot:"",count:y.value},{default:t.withCtx(()=>[t.createVNode(S,{class:"flex items-center justify-center p-2",onClick:c[0]||(c[0]=g=>i.value=!0)},{default:t.withCtx(()=>[t.createVNode(h,{name:"solar:settings-outline",class:"text-lg"})]),_:1})]),_:1},8,["count"]),t.createVNode(S,{class:"flex items-center justify-center p-2",onClick:c[1]||(c[1]=g=>x.value=!0)},{default:t.withCtx(()=>[t.createVNode(h,{name:"ant-design:filter-outlined",class:"text-lg"})]),_:1})]),t.renderSlot(b.$slots,"headerCardContainer"),t.renderSlot(b.$slots,"title")]),l.value?(t.openBlock(),t.createBlock(et,{key:0,loading:e.loading,columns:e.columns,"data-source":e.dataSource,"card-layout":s.value,"can-edit":e.canEdit,"edit-action":e.editAction,"show-actions-column":e.showActionsColumn,pagination:e.pagination,meta:e.meta,onRestore:c[2]||(c[2]=g=>r("restore",g)),onEdit:c[3]||(c[3]=g=>r("edit",g)),onDelete:c[4]||(c[4]=g=>r("delete",g)),onPageChange:c[5]||(c[5]=g=>r("pageChange",g)),onSizeChange:c[6]||(c[6]=(g,B)=>r("sizeChange",g,B))},t.createSlots({_:2},[b.$slots.titleCard?{name:"titleCard",fn:t.withCtx(g=>[t.renderSlot(b.$slots,"titleCard",t.normalizeProps(t.guardReactiveProps(g)))]),key:"0"}:void 0,b.$slots.body?{name:"bodyCard",fn:t.withCtx(g=>[t.renderSlot(b.$slots,"body",t.normalizeProps(t.guardReactiveProps(g)))]),key:"1"}:void 0,b.$slots.footer?{name:"footerCard",fn:t.withCtx(g=>[t.renderSlot(b.$slots,"footer",t.normalizeProps(t.guardReactiveProps(g)))]),key:"2"}:void 0]),1032,["loading","columns","data-source","card-layout","can-edit","edit-action","show-actions-column","pagination","meta"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createBlock(st,{key:1,loading:e.loading,pagination:e.pagination,columns:e.columns,"data-source":e.dataSource,"filter-values":d.value,meta:e.meta,"can-edit":e.canEdit,"edit-action":e.editAction,"delete-action":e.deleteAction,"show-actions-column":e.showActionsColumn,"columns-visibility":v.value,"disable-column-filter-dropdowns":o.disableColumnFilterDropdowns===!0,"show-filter-button":o.enableTableFilterDrawer===!0,onOpenColumnDrawer:c[7]||(c[7]=g=>i.value=!0),onOpenFilterDrawer:c[8]||(c[8]=g=>x.value=!0),"onUpdate:filterValues":f,onFilterApply:c[9]||(c[9]=g=>r("filterApply",g)),onRestore:c[10]||(c[10]=g=>r("restore",g)),onEdit:c[11]||(c[11]=g=>r("edit",g)),onDelete:c[12]||(c[12]=g=>r("delete",g)),onSortChange:c[13]||(c[13]=g=>r("sortChange",g)),onPageChange:c[14]||(c[14]=g=>r("pageChange",g)),onSizeChange:c[15]||(c[15]=(g,B)=>r("sizeChange",g,B))},{title:t.withCtx(()=>[t.renderSlot(b.$slots,"title")]),bodyCell:t.withCtx(g=>[t.renderSlot(b.$slots,"bodyCell",t.normalizeProps(t.guardReactiveProps(g)))]),actionColumn:t.withCtx(g=>[t.renderSlot(b.$slots,"actionColumn",t.normalizeProps(t.guardReactiveProps(g)))]),_:3},8,["loading","pagination","columns","data-source","filter-values","meta","can-edit","edit-action","delete-action","show-actions-column","columns-visibility","disable-column-filter-dropdowns","show-filter-button"])),t.renderSlot(b.$slots,"filtersDrawer",{visible:x.value,setVisible:g=>{x.value=g},filters:d.value,updateFilters:f,emitFilterApply:C},()=>[o.useFilterModal===!0?(t.openBlock(),t.createBlock(ft,{key:0,visible:x.value,"onUpdate:visible":c[16]||(c[16]=g=>x.value=g),columns:e.columns,"filter-values":d.value,"onUpdate:filterValues":f,onFilterApply:c[17]||(c[17]=g=>r("filterApply",g))},null,8,["visible","columns","filter-values"])):(t.openBlock(),t.createBlock(ut,{key:1,visible:x.value,"onUpdate:visible":c[18]||(c[18]=g=>x.value=g),columns:e.columns,"filter-values":d.value,"onUpdate:filterValues":f,onFilterApply:c[19]||(c[19]=g=>r("filterApply",g))},null,8,["visible","columns","filter-values"]))]),t.createVNode(ct,{visible:i.value,"onUpdate:visible":c[20]||(c[20]=g=>i.value=g),"model-value":v.value,"onUpdate:modelValue":c[21]||(c[21]=g=>v.value=g),"view-mode":a.value,"onUpdate:viewMode":c[22]||(c[22]=g=>a.value=g),"card-layout":s.value,"onUpdate:cardLayout":c[23]||(c[23]=g=>s.value=g),columns:e.columns,"show-actions-column":e.showActionsColumn,"disable-view-mode":e.disableViewMode},null,8,["visible","model-value","view-mode","card-layout","columns","show-actions-column","disable-view-mode"])])}}}),Bn=t.defineComponent({__name:"LazyLoadContainer",props:{onIntersect:{},threshold:{default:.1},once:{type:Boolean,default:!1},rootMargin:{default:"0px"}},setup(e){const n=e,o=t.ref(null);let r=null;const a=l=>{l[0].isIntersecting&&n.onIntersect&&(n.onIntersect(),n.once&&r&&r.disconnect())};return t.onMounted(()=>{r=new IntersectionObserver(a,{threshold:n.threshold,rootMargin:n.rootMargin}),o.value&&r.observe(o.value)}),t.onBeforeUnmount(()=>{r==null||r.disconnect()}),(l,s)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"container",ref:o},[t.renderSlot(l.$slots,"default")],512))}});exports.CardFiltersDrawer=ut;exports.CardFiltersModal=ft;exports.CardGrid=et;exports.CardLayout=we;exports.ColumnSettingsDrawer=ct;exports.DEFAULT_PAGE_NUMBER=Qo;exports.DEFAULT_PAGE_SIZE=Jo;exports.DataTable=st;exports.DataView=pt;exports.FilterMode=H;exports.LazyLoadContainer=Bn;exports.LazyLoadTrigger=Ye;exports.PAGE_SIZE_EXTRA_LARGE=Zo;exports.PAGE_SIZE_LARGE=qo;exports.PAGE_SIZE_MEDIUM=Wo;exports.PAGE_SIZE_OPTIONS=Yo;exports.PAGE_SIZE_SMALL=tt;exports.PAGE_SIZE_ULTRA=Ko;exports.PageSizes=ot;exports.SkipSizes=nt;exports.SortOrder=at;exports.TableBodyCell=it;exports.TableDefaults=rt;exports.TableSortOrder=ne;exports.ViewMode=re;exports.default=pt;
|
|
35
|
+
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}const wo=_t(xo),Ao={token:Me,hashed:!0},et=Symbol("DesignTokenContext"),Ae=t.shallowRef(),Eo=e=>{t.provide(et,e),t.watch(e,()=>{Ae.value=t.unref(e),t.triggerRef(Ae)},{immediate:!0,deep:!0})};t.defineComponent({props:{value:Ge()},setup(e,{slots:n}){return Eo(t.computed(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function tt(){const e=t.inject(et,t.computed(()=>Ae.value||Ao)),n=t.computed(()=>`${qt}-${e.value.hashed||""}`),o=t.computed(()=>e.value.theme||wo),r=Wt(o,t.computed(()=>[Me,e.value.token]),t.computed(()=>({salt:n.value,override:A({override:e.value.token},e.value.components),formatToken:So})));return[o,t.computed(()=>r.value[0]),t.computed(()=>e.value.hashed?r.value[1]:"")]}const Bo={class:"flex flex-wrap tag-cloud"},Mo={class:"flex flex-wrap"},To=t.defineComponent({__name:"FilterTagCloud",props:{filters:{}},emits:["update:filters","remove","clear"],setup(e,{emit:n}){const o=e,r=n,[,a]=tt(),l=t.computed(()=>(console.log(a),{color:a.value.colorSelectedMenu,borderColor:a.value.colorBorderSecondary,backgroundColor:a.value.mainBgColor||a.value.colorPrimaryBg})),s=p=>p==null?!1:Array.isArray(p)?p.length>0:!!p,c=t.computed(()=>Object.values(o.filters).some(s));function h(p){return typeof p=="object"&&p!==null&&"name"in p&&typeof p.name=="string"}const f=p=>{if(typeof p=="string")return{key:p,label:p,original:p};if(Array.isArray(p)){if(p.length===2&&typeof p[0]=="string"&&typeof p[1]=="string"){const m=`${p[0]} - ${p[1]}`;return{key:m,label:m,original:p}}const i=p.join(", ");return{key:i,label:i,original:p}}if(h(p)){const i=p.name;return{key:i,label:i,original:p}}const S=JSON.stringify(p);return{key:S,label:S,original:p}},d=p=>p==null?[]:Array.isArray(p)?p.map(S=>f(S)):[f(p)],v=(p,S)=>typeof p=="string"||typeof S=="string"?p===S:JSON.stringify(p)===JSON.stringify(S),x=(p,S,i)=>{if(Array.isArray(S)){const m=S.filter(b=>!v(b,i));r("update:filters",{...o.filters,[p]:m})}else r("update:filters",{...o.filters,[p]:null});r("remove",p,S,i)},C=()=>{r("update:filters",{}),r("clear")};return(p,S)=>{const i=t.resolveComponent("a-tag"),m=t.resolveComponent("a-button");return t.openBlock(),t.createElementBlock("div",Bo,[t.createElementVNode("div",Mo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.entries(e.filters),([b,g])=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:b},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d(g),k=>(t.openBlock(),t.createBlock(i,{key:k.key,class:"filter-tag",closable:!0,style:t.normalizeStyle(l.value),onClose:()=>x(b,g,k.original)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k.label),1)]),_:2},1032,["style","onClose"]))),128))],64))),128))]),c.value?(t.openBlock(),t.createBlock(m,{key:0,type:"link",onClick:C},{default:t.withCtx(()=>[...S[0]||(S[0]=[t.createTextVNode(" Очистить все ",-1)])]),_:1})):t.createCommentVNode("",!0)])}}}),G=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},Vo=G(To,[["__scopeId","data-v-a32f7554"]]),No={class:"flex items-center justify-center text-lg"},ie=t.defineComponent({__name:"TableCellStatus",props:{value:{}},setup(e){return(n,o)=>(t.openBlock(),t.createElementBlock("div",No,[e.value?(t.openBlock(),t.createBlock(t.unref(D.CheckCircleTwoTone),{key:1,"two-tone-color":"#bfbfbf"})):(t.openBlock(),t.createBlock(t.unref(D.CheckCircleTwoTone),{key:0,"two-tone-color":"#4ade80"}))]))}}),Do={class:"flex items-center justify-center gap-2"},Io=t.defineComponent({__name:"CardCellActions",props:{record:{},canEdit:{type:Boolean},editAction:{type:Boolean}},emits:["edit","delete","restore"],setup(e,{emit:n}){const o=e,r=n,a=o.canEdit??!0,l=o.editAction??!0,s=f=>r("delete",f),c=f=>r("restore",f),h=f=>r("edit",f);return(f,d)=>{const v=t.resolveComponent("a-button"),x=t.resolveComponent("a-tooltip");return t.openBlock(),t.createElementBlock("div",Do,[t.unref(a)===!1?(t.openBlock(),t.createBlock(x,{key:0,title:"Смотреть"},{default:t.withCtx(()=>[t.createVNode(v,{icon:t.h(t.unref(D.EyeOutlined)),onClick:d[0]||(d[0]=C=>h(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),t.unref(a)!==!1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.unref(l)!==!1?(t.openBlock(),t.createBlock(x,{key:0,title:"Редактировать"},{default:t.withCtx(()=>[t.createVNode(v,{icon:t.h(t.unref(D.EditOutlined)),onClick:d[1]||(d[1]=C=>h(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(x,{title:e.record.deletedAt?"Восстановить":"Удалить"},{default:t.withCtx(()=>[t.createVNode(v,{icon:t.h(e.record.deletedAt?t.unref(D.RedoOutlined):t.unref(D.DeleteOutlined)),onClick:d[2]||(d[2]=C=>e.record.deletedAt?c(e.record):s(e.record))},null,8,["icon"])]),_:1},8,["title"])],64)):t.createCommentVNode("",!0)])}}}),Fo={class:"data-card__header"},Ho={class:"data-card__body"},$o={class:"data-card__label"},_o={class:"data-card__value"},Lo={key:0},Ro={key:2},Po={key:3},Oo={key:4},zo={key:5},jo={key:0,class:"data-card__footer"},Uo=t.defineComponent({__name:"TheCard",props:{loading:{type:Boolean},record:{},columns:{},canEdit:{type:Boolean},editAction:{type:Boolean},showActionsColumn:{type:Boolean}},emits:["delete","restore","edit"],setup(e,{emit:n}){const o=e,r=i=>o.record[String(i.dataIndex)],a=i=>{if(i===null||typeof i!="object")return"";if("name"in i){const m=i.name;return typeof m=="string"?m:""}return""},l=i=>i==null?!0:typeof i=="string"?i.trim().length===0:!1,s=i=>i==null?"":typeof i=="string"?i.trim():typeof i=="object"?a(i):String(i),c=i=>{const m=r(i);return Array.isArray(m)?m.map(b=>s(b)).filter(b=>b.trim().length>0):[]},h=i=>c(i).map((m,b)=>({key:`${m}-${b}`,label:m})),f=n,d=o.canEdit??!0,v=o.editAction??!0,x=o.showActionsColumn??!0,C=i=>f("delete",i),p=i=>f("restore",i),S=i=>f("edit",i);return(i,m)=>{const b=t.resolveComponent("a-tag"),g=t.resolveComponent("a-card");return t.openBlock(),t.createBlock(g,{loading:e.loading,bordered:!1,class:"data-card bg-white rounded-3 shadow-sm"},t.createSlots({title:t.withCtx(()=>[t.createElementVNode("div",Fo,[t.renderSlot(i.$slots,"title",{},void 0,!0)])]),default:t.withCtx(()=>[t.createElementVNode("div",Ho,[t.renderSlot(i.$slots,"body",{record:e.record,columns:e.columns},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,k=>(t.openBlock(),t.createElementBlock("div",{key:k.dataIndex,class:"data-card__row"},[t.createElementVNode("span",$o,t.toDisplayString(k.title)+": ",1),t.createElementVNode("span",_o,[k.dataIndex==="deletedAt"?(t.openBlock(),t.createElementBlock("span",Lo,[t.createVNode(ie,{value:e.record.deletedAt},null,8,["value"])])):Array.isArray(r(k))?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[k.tag===!0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(h(k),M=>(t.openBlock(),t.createBlock(b,{key:M.key,class:"mr-1 mb-1"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(M.label),1)]),_:2},1024))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(c(k),(M,y)=>(t.openBlock(),t.createElementBlock("span",{key:y},[t.createTextVNode(t.toDisplayString(M)+" ",1),y<c(k).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" , ")],64)):t.createCommentVNode("",!0)]))),128))],64)):typeof r(k)=="boolean"?(t.openBlock(),t.createElementBlock("span",Ro,[t.createVNode(ie,{value:!r(k)},null,8,["value"])])):r(k)!==null&&typeof r(k)=="object"?(t.openBlock(),t.createElementBlock("span",Po,t.toDisplayString(a(r(k))),1)):k.tag===!0?(t.openBlock(),t.createElementBlock("span",Oo,[l(r(k))?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(b,{key:0},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r(k)),1)]),_:2},1024))])):(t.openBlock(),t.createElementBlock("span",zo,t.toDisplayString(r(k)),1))])]))),128))],!0)]),i.$slots.footer?(t.openBlock(),t.createElementBlock("div",jo,[t.renderSlot(i.$slots,"footer",{record:e.record,columns:e.columns},void 0,!0)])):t.createCommentVNode("",!0)]),_:2},[t.unref(x)?{name:"actions",fn:t.withCtx(()=>[t.createVNode(Io,{record:e.record,"can-edit":t.unref(d),"edit-action":t.unref(v),onEdit:S,onDelete:C,onRestore:p},null,8,["record","can-edit","edit-action"])]),key:"0"}:void 0]),1032,["loading"])}}}),Go=G(Uo,[["__scopeId","data-v-c6be2770"]]),Xo={class:"efko-dataview"},ot=t.defineComponent({__name:"LazyLoadTrigger",props:{onIntersect:{},threshold:{default:.1},once:{type:Boolean,default:!1},loading:{type:Boolean}},setup(e){const n=e,o=t.ref(null);let r=null;const a=l=>{var c;l[0].isIntersecting&&((c=n.onIntersect)==null||c.call(n),n.once&&r&&r.disconnect())};return t.onMounted(()=>{r=new IntersectionObserver(a,{threshold:n.threshold}),o.value&&r.observe(o.value)}),t.onBeforeUnmount(()=>{r&&r.disconnect()}),(l,s)=>{const c=t.resolveComponent("a-spin");return t.openBlock(),t.createElementBlock("div",Xo,[t.createElementVNode("div",{ref_key:"container",ref:o,style:{height:"1px"},class:"flex items-center justify-center py-5"},[t.createVNode(c,{spinning:e.loading},null,8,["spinning"])],512)])}}}),Wo={class:"efko-dataview"},qo={class:"flex flex-col gap-4"},Zo=t.defineComponent({__name:"CardGrid",props:{loading:{type:Boolean},columns:{},dataSource:{},cardLayout:{},canEdit:{type:Boolean},editAction:{type:Boolean},showActionsColumn:{type:Boolean},pagination:{type:Boolean},meta:{}},emits:["delete","restore","edit","pageChange","sizeChange"],setup(e,{emit:n}){const o=e,r=n;t.onMounted(()=>{const d=document.querySelector(".card-grid");d!==null&&Ee(d)});const a=t.computed(()=>o.cardLayout==="row"?"card-grid card-grid--row":"card-grid card-grid--grid"),l=t.computed(()=>o.columns),s=t.ref([]),c=()=>{var x;if(((x=o.meta)==null?void 0:x.currentPage)===1){s.value=[...o.dataSource];return}const d=new Set(s.value.map(C=>C.id)),v=o.dataSource.filter(C=>!d.has(C.id));s.value.push(...v)};c(),t.watch(()=>{var d;return[o.dataSource,(d=o.meta)==null?void 0:d.currentPage]},c,{deep:!0});const h=t.computed(()=>o.meta===void 0?!0:o.meta.currentPage*o.meta.pageSize>=o.meta.total),f=()=>{o.loading||h.value||!o.meta||r("pageChange",o.meta.currentPage+1)};return(d,v)=>(t.openBlock(),t.createElementBlock("div",Wo,[t.createElementVNode("div",qo,[t.createElementVNode("div",{class:t.normalizeClass(a.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(x,C)=>(t.openBlock(),t.createBlock(Go,{key:String(x.id??`card-${C}`),loading:e.loading,record:x,columns:l.value,"can-edit":e.canEdit,"edit-action":e.editAction,"show-actions-column":e.showActionsColumn,onEdit:v[0]||(v[0]=p=>r("edit",p)),onDelete:v[1]||(v[1]=p=>r("delete",p)),onRestore:v[2]||(v[2]=p=>r("restore",p))},t.createSlots({_:2},[d.$slots.titleCard?{name:"title",fn:t.withCtx(()=>[t.renderSlot(d.$slots,"titleCard",{record:x,columns:l.value},void 0,!0)]),key:"0"}:void 0,d.$slots.bodyCard?{name:"body",fn:t.withCtx(({record:p,columns:S})=>[t.renderSlot(d.$slots,"bodyCard",{record:p,columns:S},void 0,!0)]),key:"1"}:void 0,d.$slots.footerCard?{name:"footer",fn:t.withCtx(({record:p,columns:S})=>[t.renderSlot(d.$slots,"footerCard",{record:p,columns:S},void 0,!0)]),key:"2"}:void 0]),1032,["loading","record","columns","can-edit","edit-action","show-actions-column"]))),128))],2),e.pagination&&!h.value?(t.openBlock(),t.createBlock(ot,{key:0,loading:e.loading,once:!1,"on-intersect":f},null,8,["loading"])):t.createCommentVNode("",!0)])]))}}),nt=G(Zo,[["__scopeId","data-v-e3e3f0a2"]]),rt="10",Ko="20",Yo="50",Qo="100",Jo="1000",en=1,tn=rt;var N=(e=>(e.SEARCH="search",e.SELECT="select",e.DATE="date",e))(N||{}),at=(e=>(e.SMALL="10",e.MEDIUM="20",e.LARGE="50",e.EXTRA_LARGE="100",e.ULTRA="1000",e))(at||{});const on=["10","20","50","100"];var lt=(e=>(e[e.NONE=0]="NONE",e[e.SMALL=10]="SMALL",e[e.MEDIUM=20]="MEDIUM",e[e.LARGE=50]="LARGE",e))(lt||{}),it=(e=>(e[e.DEFAULT_CURRENT_PAGE=1]="DEFAULT_CURRENT_PAGE",e))(it||{}),se=(e=>(e.ASCEND="ascend",e.DESCEND="descend",e))(se||{}),st=(e=>(e.ASC="asc",e.DESC="desc",e))(st||{});const nn=t.defineComponent({name:"MultiselectWrapper",components:{VueMultiselect:vt},props:{modelValue:{type:[Array,String,Number,Object,Boolean,null],default:null}},emits:["update:modelValue"],data(){return{simpleImage:yt.Empty.PRESENTED_IMAGE_SIMPLE}}});function rn(e,n,o,r,a,l){const s=t.resolveComponent("a-empty"),c=t.resolveComponent("VueMultiselect");return t.openBlock(),t.createBlock(c,t.mergeProps(e.$attrs,{class:"filter-select",modelValue:e.modelValue,"onUpdate:modelValue":n[0]||(n[0]=h=>e.$emit("update:modelValue",h)),label:"name","value-prop":"id"}),{nooptions:t.withCtx(()=>[t.createVNode(s,{image:e.simpleImage},null,8,["image"])]),_:1},16,["modelValue"])}const ct=G(nn,[["render",rn],["__scopeId","data-v-cfb3f123"]]),an={class:"efko-dataview"},ln={class:"flex items-center gap-2 p-2"},sn=t.defineComponent({__name:"FilterDropdown",props:{placeholder:{},filterMode:{},componentProps:{}},emits:["update:modelValue","apply"],setup(e,{emit:n}){const o=e,r=n,a=t.computed(()=>o.filterMode===N.SEARCH?"a-input":o.filterMode===N.SELECT?ct:o.filterMode===N.DATE?"a-range-picker":null),l=t.ref(null),s=()=>{r("update:modelValue",l.value),r("apply"),l.value=null};return(c,h)=>{const f=t.resolveComponent("a-button");return t.openBlock(),t.createElementBlock("div",an,[t.createElementVNode("div",ln,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value),t.mergeProps(e.componentProps,{value:l.value,"onUpdate:value":h[0]||(h[0]=d=>l.value=d),modelValue:l.value,"onUpdate:modelValue":h[1]||(h[1]=d=>l.value=d),placeholder:e.placeholder,style:{"min-width":"240px","max-width":"300px","font-size":"14px"},object:""}),null,16,["value","modelValue","placeholder"])),t.createVNode(f,{type:"primary",size:"small",onClick:s},{default:t.withCtx(()=>[...h[2]||(h[2]=[t.createTextVNode(" Добавить ",-1)])]),_:1})])])}}}),cn={class:"flex items-center justify-center gap-2"},un=t.defineComponent({__name:"TableCellActions",props:{record:{},canEdit:{type:Boolean},editAction:{type:Boolean},deleteAction:{type:Boolean}},emits:["edit","delete","restore"],setup(e,{emit:n}){const o=e,r=n,a=c=>{r("delete",c)},l=c=>{r("restore",c)},s=c=>{r("edit",c)};return(c,h)=>{const f=t.resolveComponent("a-button"),d=t.resolveComponent("a-tooltip");return t.openBlock(),t.createElementBlock("div",cn,[o.canEdit===!1?(t.openBlock(),t.createBlock(d,{key:0,title:"Смотреть"},{default:t.withCtx(()=>[t.createVNode(f,{icon:t.h(t.unref(D.EyeOutlined)),onClick:h[0]||(h[0]=v=>s(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),e.canEdit!==!1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[o.editAction!==!1?(t.openBlock(),t.createBlock(d,{key:0,title:"Редактировать"},{default:t.withCtx(()=>[t.createVNode(f,{icon:t.h(t.unref(D.EditOutlined)),onClick:h[1]||(h[1]=v=>s(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),e.deleteAction!==!1?(t.openBlock(),t.createBlock(d,{key:1,title:e.record.isDeleted?"Восстановить":"Удалить"},{default:t.withCtx(()=>[t.createVNode(f,{icon:t.h(e.record.isDeleted?t.unref(D.RedoOutlined):t.unref(D.DeleteOutlined)),onClick:h[2]||(h[2]=v=>e.record.isDeleted?l(e.record):a(e.record))},null,8,["icon"])]),_:1},8,["title"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)])}}}),dn={key:0},fn={key:1},pn={key:2},mn={key:3},gn={key:4},hn={key:5},ut=t.defineComponent({__name:"TableBodyCell",props:{loading:{type:Boolean},column:{},record:{},tagStyle:{}},setup(e){const n=e,o=t.computed(()=>n.record[String(n.column.dataIndex)]),r=f=>f==null?!0:typeof f=="string"?f.trim().length===0:!1,a=f=>{if(f===null||typeof f!="object")return"";if("name"in f){const d=f.name;return typeof d=="string"?d:""}return""},l=f=>f==null?"":typeof f=="string"?f.trim():typeof f=="object"?a(f):String(f),s=t.computed(()=>{const f=o.value;return Array.isArray(f)?f.map(d=>l(d)).filter(d=>d.trim().length>0):[]}),c=t.computed(()=>s.value.map((f,d)=>({key:`${f}-${d}`,label:f}))),h=t.computed(()=>!r(o.value));return(f,d)=>{const v=t.resolveComponent("a-skeleton"),x=t.resolveComponent("a-tag");return e.loading?(t.openBlock(),t.createBlock(v,{key:0,active:!0,loading:!0,title:!1,paragraph:{rows:1}})):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.column.dataIndex==="isDeleted"?(t.openBlock(),t.createElementBlock("span",dn,[t.createVNode(ie,{value:e.record.isDeleted},null,8,["value"])])):Array.isArray(o.value)?(t.openBlock(),t.createElementBlock("span",fn,[e.column.tag===!0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(c.value,C=>(t.openBlock(),t.createBlock(x,{key:C.key,style:t.normalizeStyle(e.tagStyle),class:"mr-1 mb-1"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(C.label),1)]),_:2},1032,["style"]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(s.value,(C,p)=>(t.openBlock(),t.createElementBlock("span",{key:p},[t.createTextVNode(t.toDisplayString(C)+" ",1),p<s.value.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(", ")],64)):t.createCommentVNode("",!0)]))),128))])):typeof o.value=="boolean"?(t.openBlock(),t.createElementBlock("span",pn,[t.createVNode(ie,{value:!o.value},null,8,["value"])])):o.value!==null&&typeof o.value=="object"?(t.openBlock(),t.createElementBlock("span",mn,t.toDisplayString(a(o.value)),1)):e.column.tag===!0?(t.openBlock(),t.createElementBlock("span",gn,[h.value?(t.openBlock(),t.createBlock(x,{key:0,style:t.normalizeStyle(e.tagStyle)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(String(o.value)),1)]),_:1},8,["style"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[],64))])):(t.openBlock(),t.createElementBlock("span",hn,t.toDisplayString(o.value),1))],64))}}}),vn={class:"efko-dataview"},yn={class:"flex items-center justify-between"},bn={class:"flex items-center gap-2"},dt=t.defineComponent({__name:"TheTable",props:{loading:{type:Boolean},pagination:{type:Boolean},columns:{},dataSource:{},filterValues:{},meta:{},canEdit:{type:Boolean},editAction:{type:Boolean},deleteAction:{type:Boolean},showActionsColumn:{type:Boolean},columnsVisibility:{},disableColumnFilterDropdowns:{type:Boolean},showFilterButton:{type:Boolean},multiColumnFilters:{type:Boolean}},emits:["update:filterValues","filterApply","restore","edit","delete","sortChange","pageChange","sizeChange","openColumnDrawer","openFilterDrawer"],setup(e,{emit:n}){const[,o]=tt(),r=e,a=n,l=t.computed(()=>r.showFilterButton===!0),s=t.ref(r.filterValues||{}),c=t.ref([...r.columns]),h=t.ref({}),f=t.computed(()=>r.disableColumnFilterDropdowns===!0?[]:c.value.filter(y=>y.filterable)),d=t.computed(()=>{const u=c.value.filter(w=>{if(w.filterOnly)return!1;const B=w.key||String(w.dataIndex);return r.columnsVisibility[B]!==!1}).map(w=>{const{headerAlign:B,cellAlign:I,...$}=w;return{...$,sorter:!!$.sortable,sortDirections:$.sortable?[se.ASCEND,se.DESCEND]:void 0,customHeaderCell:()=>B?{style:{textAlign:B}}:void 0,customCell:()=>I?{style:{textAlign:I}}:void 0,customFilterDropdown:!!$.filterable,slots:$.filterable?{filterDropdown:`filter${String($.dataIndex)}Dropdown`}:void 0}});return r.showActionsColumn!==!1&&r.columnsVisibility.actions!==!1&&u.push({title:"Действия",key:"actions",dataIndex:"actions",width:100,slots:{customRender:"actionColumn"}}),u}),v=t.computed(()=>Object.keys(r.columnsVisibility).filter(y=>r.columnsVisibility[y]===!1).length),x=t.computed(()=>({color:o.value.colorSelectedMenu,borderColor:o.value.colorBorderSecondary,backgroundColor:o.value.mainBgColor||o.value.colorPrimaryBg})),C=y=>{const u=s.value[y];return Array.isArray(u)?u:u!=null?[u]:[]},p=y=>Array.isArray(y)&&y.length===2&&typeof y[0]=="string"&&typeof y[1]=="string",S=y=>{if(typeof y=="string")return y;if(y!==null&&typeof y=="object"){const u=y.format;if(typeof u=="function")return u("YYYY-MM-DD");const w=y.toISOString;if(typeof w=="function")return w()}return String(y)},i=(y,u)=>{if(u==null)return[];if(y.filterMode===N.SEARCH){if(typeof u!="string")return[];const w=u.trim();return w.length===0?[]:[w]}return y.filterMode===N.DATE?!Array.isArray(u)||u.length!==2?[]:[[S(u[0]),S(u[1])]]:Array.isArray(u)?u:[u]},m=(y,u)=>{const w={...s.value};if(u===null)w[y]=null,a("filterApply",{key:y,value:[]});else if(Array.isArray(u)){const B=u.filter(I=>I!=null);B.length===0?(w[y]=null,a("filterApply",{key:y,value:[]})):B.length===1&&!p(B[0])?(w[y]=B[0],a("filterApply",{key:y,value:B})):(w[y]=B,a("filterApply",{key:y,value:B}))}else w[y]=u,a("filterApply",{key:y,value:[u]});a("update:filterValues",w),s.value=w,h.value[y]=null},b=(y,u)=>{const w=String(y.dataIndex),B=i(y,u);if(B.length===0){h.value[w]=null;return}if(!((y.filterMultiple??r.multiColumnFilters??!0)!==!1)){if(y.filterMode===N.DATE){m(w,B);return}if(Array.isArray(u)){m(w,B[B.length-1]);return}m(w,B[0]);return}const X=[...C(w)];let W=!1;if(B.forEach(q=>{X.some(J=>Y.isEqual(J,q))||(X.push(q),W=!0)}),!W){h.value[w]=null;return}m(w,X)},g=y=>y.isGroup?"parent-row":"",k=(y,u,w)=>{a("sortChange",{columnKey:w.columnKey||"",order:w.order||null})},M=(y,u)=>{const w=u.key||String(u.dataIndex),B=c.value.findIndex(I=>(I.key||String(I.dataIndex))===w);B!==-1&&c.value.splice(B,1,{...u,width:y})};return t.watch(()=>r.filterValues,y=>{s.value=y||{}}),t.watch(()=>r.columns,y=>{c.value=[...y]},{immediate:!0}),t.onMounted(()=>{const y=document.querySelector(".the-table tbody");y!==null&&Ee(y)}),(y,u)=>{var W,q,J,Ve;const w=t.resolveComponent("Icon"),B=t.resolveComponent("a-button"),I=t.resolveComponent("a-badge"),$=t.resolveComponent("a-table"),X=t.resolveComponent("a-pagination");return t.openBlock(),t.createElementBlock("div",vn,[t.createVNode($,{bordered:"","table-layout":"fixed",class:"the-table",loading:e.loading,columns:d.value,"data-source":e.dataSource,"row-key":E=>E.id,pagination:!1,scroll:{x:"max-content"},"row-class-name":g,onChange:k,onResizeColumn:M},t.createSlots({title:t.withCtx(()=>[t.createElementVNode("div",yn,[t.createElementVNode("div",bn,[t.createVNode(I,{dot:"",count:v.value},{default:t.withCtx(()=>[t.createVNode(B,{class:"flex items-center justify-center p-2",onClick:u[0]||(u[0]=E=>y.$emit("openColumnDrawer"))},{default:t.withCtx(()=>[t.createVNode(w,{name:"solar:settings-outline",class:"text-lg"})]),_:1})]),_:1},8,["count"]),l.value?(t.openBlock(),t.createBlock(B,{key:0,class:"flex items-center justify-center p-2",onClick:u[1]||(u[1]=E=>y.$emit("openFilterDrawer"))},{default:t.withCtx(()=>[t.createVNode(w,{name:"ant-design:filter-outlined",class:"text-lg"})]),_:1})):t.createCommentVNode("",!0)]),t.renderSlot(y.$slots,"title")])]),bodyCell:t.withCtx(({column:E,record:R})=>[t.renderSlot(y.$slots,"bodyCell",{column:E,record:R},()=>[t.createVNode(ut,{loading:e.loading,column:E,record:R,"tag-style":x.value},null,8,["loading","column","record","tag-style"])])]),actionColumn:t.withCtx(({record:E})=>[t.renderSlot(y.$slots,"actionColumn",{record:E},()=>[t.createVNode(un,{"edit-action":e.editAction,"delete-action":e.deleteAction,"can-edit":e.canEdit,record:E,onEdit:()=>y.$emit("edit",E),onDelete:()=>y.$emit("delete",E),onRestore:()=>y.$emit("restore",E)},null,8,["edit-action","delete-action","can-edit","record","onEdit","onDelete","onRestore"])])]),_:2},[t.renderList(f.value,E=>({name:`filter${String(E.dataIndex)}Dropdown`,fn:t.withCtx(()=>[t.createVNode(sn,{modelValue:h.value[E.dataIndex],"onUpdate:modelValue":[R=>h.value[E.dataIndex]=R,R=>b(E,R)],"filter-mode":E.filterMode,"component-props":E.componentProps,placeholder:E.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])])}))]),1032,["loading","columns","data-source","row-key"]),e.pagination?(t.openBlock(),t.createBlock(X,{key:0,class:"mt-4 text-right",current:(W=e.meta)==null?void 0:W.currentPage,"page-size":(q=e.meta)==null?void 0:q.pageSize,total:(J=e.meta)==null?void 0:J.total,"show-total":E=>`Всего ${E} элементов`,"page-size-options":(Ve=e.meta)==null?void 0:Ve.pageSizeOptions,"show-size-changer":!0,onChange:u[2]||(u[2]=E=>y.$emit("pageChange",E)),onShowSizeChange:u[3]||(u[3]=(E,R)=>y.$emit("sizeChange",E,R))},null,8,["current","page-size","total","show-total","page-size-options"])):t.createCommentVNode("",!0)])}}}),Cn={class:"mb-4"},xn={class:"flex flex-col gap-1"},ft=t.defineComponent({__name:"ColumnSettingsDrawer",props:{visible:{type:Boolean},columns:{},modelValue:{},showActionsColumn:{type:Boolean},disableViewMode:{type:Boolean},viewMode:{},cardLayout:{}},emits:["update:visible","update:modelValue","update:viewMode","update:cardLayout"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.visible),l=t.ref(o.viewMode),s=t.ref(o.cardLayout),c=t.reactive({...o.modelValue}),h=t.computed(()=>l.value==="grid"),f=o.disableViewMode||!1;return t.watch(()=>o.visible,d=>{a.value=d}),t.watch(a,d=>{r("update:visible",d)}),t.watch(()=>o.viewMode,d=>{l.value=d}),t.watch(l,d=>{r("update:viewMode",d)}),t.watch(()=>o.cardLayout,d=>{s.value=d}),t.watch(s,d=>{r("update:cardLayout",d)}),t.watch(()=>o.modelValue,d=>Object.assign(c,d),{deep:!0}),t.watch(c,d=>r("update:modelValue",{...d}),{deep:!0}),o.showActionsColumn&&c.actions===void 0&&(c.actions=!0),(d,v)=>{const x=t.resolveComponent("a-checkbox"),C=t.resolveComponent("a-radio"),p=t.resolveComponent("a-radio-group"),S=t.resolveComponent("a-radio-button"),i=t.resolveComponent("a-drawer");return t.openBlock(),t.createBlock(i,{open:a.value,"onUpdate:open":v[2]||(v[2]=m=>a.value=m),class:"efko-dataview",title:"Настройки представления",placement:"right"},{default:t.withCtx(()=>[t.createElementVNode("section",Cn,[v[3]||(v[3]=t.createElementVNode("h3",{class:"font-bold text-base mb-2"},"Отображение колонок",-1)),t.createElementVNode("div",xn,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,m=>(t.openBlock(),t.createElementBlock("div",{key:m.key??m.dataIndex},[t.createVNode(x,{checked:c[m.key??m.dataIndex],"onUpdate:checked":b=>c[m.key??m.dataIndex]=b,disabled:h.value,class:"flex"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.title),1)]),_:2},1032,["checked","onUpdate:checked","disabled"])]))),128))])]),t.createElementVNode("section",null,[v[8]||(v[8]=t.createElementVNode("h3",{class:"font-bold text-base mb-2"},"Вид",-1)),t.createVNode(p,{value:l.value,"onUpdate:value":v[0]||(v[0]=m=>l.value=m),"button-style":"solid",class:"mb-3",disabled:t.unref(f)},{default:t.withCtx(()=>[t.createVNode(C,{value:"table"},{default:t.withCtx(()=>[...v[4]||(v[4]=[t.createTextVNode("Таблица",-1)])]),_:1}),t.createVNode(C,{value:"grid"},{default:t.withCtx(()=>[...v[5]||(v[5]=[t.createTextVNode("Карточки",-1)])]),_:1})]),_:1},8,["value","disabled"]),t.createVNode(p,{value:s.value,"onUpdate:value":v[1]||(v[1]=m=>s.value=m),"button-style":"solid",disabled:!h.value},{default:t.withCtx(()=>[t.createVNode(S,{value:"grid"},{default:t.withCtx(()=>[t.createVNode(t.unref(D.AppstoreOutlined),{class:"mr-2"}),v[6]||(v[6]=t.createTextVNode("Сетка ",-1))]),_:1}),t.createVNode(S,{value:"row"},{default:t.withCtx(()=>[t.createVNode(t.unref(D.PicCenterOutlined),{class:"mr-2"}),v[7]||(v[7]=t.createTextVNode("Строка ",-1))]),_:1})]),_:1},8,["value","disabled"])])]),_:1},8,["open"])}}}),pt=t.defineComponent({__name:"FilterInput",props:{modelValue:{type:[String,Number,Boolean,Object,Array,null]},filterMode:{},componentProps:{},placeholder:{}},emits:["update:modelValue"],setup(e,{emit:n}){const o=e,r=n,a=t.computed(()=>o.filterMode===N.SEARCH?"a-input":o.filterMode===N.SELECT?ct:o.filterMode===N.DATE?"a-range-picker":"a-input"),l=t.ref(o.modelValue);return t.watch(()=>o.modelValue,s=>{l.value=s}),t.watch(l,s=>r("update:modelValue",s)),(s,c)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value),t.mergeProps(e.componentProps,{value:l.value,"onUpdate:value":c[0]||(c[0]=h=>l.value=h),modelValue:l.value,"onUpdate:modelValue":c[1]||(c[1]=h=>l.value=h),placeholder:e.placeholder,class:"w-full text-sm"}),null,16,["value","modelValue","placeholder"]))}}),kn={class:"text-sm font-medium"},Sn={class:"mt-2 flex flex-col gap-2"},wn=t.defineComponent({__name:"CardFiltersDrawer",props:{visible:{type:Boolean},columns:{},filterValues:{}},emits:["update:visible","update:filterValues","filterApply"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.visible),l=t.reactive({...o.filterValues}),s=i=>i.key??String(i.dataIndex),c=i=>{if(typeof i=="string")return i;if(i!==null&&typeof i=="object"){const m=i.format;if(typeof m=="function")return m("YYYY-MM-DD");const b=i.toISOString;if(typeof b=="function")return b()}return String(i)},h=(i,m)=>{if(m!==void 0)return i.filterMode===N.DATE&&Array.isArray(m)&&m.length===2?[[c(m[0]),c(m[1])]]:m},f=i=>Array.isArray(i)?i:i!=null?[i]:[],d=i=>i==null?!0:Array.isArray(i)?i.length===0:typeof i=="string"?i.trim()==="":!1,v=t.computed(()=>o.columns.filter(i=>i.filterable)),x=t.computed(()=>Object.keys(l).some(i=>!Y.isEqual(l[i],o.filterValues[i]))),C=i=>{Object.keys(l).forEach(m=>{delete l[m]}),Object.assign(l,i)};t.watch(()=>o.visible,i=>{a.value=i,i&&C(o.filterValues)}),t.watch(a,i=>{r("update:visible",i)}),t.watch(()=>o.filterValues,i=>{C(i)},{deep:!0});const p=()=>{const i={...o.filterValues};Object.entries(l).forEach(([m,b])=>{const g=o.columns.find(M=>String(s(M))===m),k=g?h(g,b):b;if(d(b)){i[m]=null,r("filterApply",{key:m,value:[]});return}i[m]=k,r("filterApply",{key:m,value:f(k)})}),r("update:filterValues",i),a.value=!1},S=()=>{Object.keys(l).forEach(m=>{delete l[m]}),r("update:filterValues",{})};return(i,m)=>{const b=t.resolveComponent("a-button"),g=t.resolveComponent("a-drawer");return t.openBlock(),t.createBlock(g,{open:a.value,"onUpdate:open":m[0]||(m[0]=k=>a.value=k),class:"efko-dataview",placement:"right",width:"360",title:"Фильтры","body-style":"padding: 24px"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value,k=>(t.openBlock(),t.createElementBlock("section",{key:s(k),class:"mb-4 flex flex-col gap-2"},[t.createElementVNode("span",kn,t.toDisplayString(k.title),1),t.createVNode(pt,{modelValue:l[s(k)],"onUpdate:modelValue":M=>l[s(k)]=M,"filter-mode":k.filterMode,"component-props":k.componentProps,placeholder:k.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])]))),128)),t.createElementVNode("div",Sn,[t.createVNode(b,{block:"",onClick:S},{default:t.withCtx(()=>[...m[1]||(m[1]=[t.createTextVNode(" Сбросить ",-1)])]),_:1}),t.createVNode(b,{type:"primary",block:"",disabled:!x.value,onClick:p},{default:t.withCtx(()=>[...m[2]||(m[2]=[t.createTextVNode(" Применить ",-1)])]),_:1},8,["disabled"])])]),_:1},8,["open"])}}}),mt=G(wn,[["__scopeId","data-v-c29393f2"]]),An={class:"text-sm font-medium"},En=t.defineComponent({__name:"CardFiltersModal",props:{visible:{type:Boolean},columns:{},filterValues:{}},emits:["update:visible","update:filterValues","filterApply"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.visible),l=t.reactive({...o.filterValues}),s=i=>i.key??String(i.dataIndex),c=i=>{if(typeof i=="string")return i;if(i!==null&&typeof i=="object"){const m=i.format;if(typeof m=="function")return m("YYYY-MM-DD");const b=i.toISOString;if(typeof b=="function")return b()}return String(i)},h=(i,m)=>{if(m!==void 0)return i.filterMode===N.DATE&&Array.isArray(m)&&m.length===2?[[c(m[0]),c(m[1])]]:m},f=i=>Array.isArray(i)?i:i!=null?[i]:[],d=i=>i==null?!0:Array.isArray(i)?i.length===0:typeof i=="string"?i.trim()==="":!1,v=t.computed(()=>o.columns.filter(i=>i.filterable)),x=t.computed(()=>Object.keys(l).some(i=>!Y.isEqual(l[i],o.filterValues[i]))),C=i=>{Object.keys(l).forEach(m=>{delete l[m]}),Object.assign(l,i)};t.watch(()=>o.visible,i=>{a.value=i,i&&C(o.filterValues)}),t.watch(a,i=>{r("update:visible",i)}),t.watch(()=>o.filterValues,i=>{C(i)},{deep:!0});const p=()=>{const i={...o.filterValues};Object.entries(l).forEach(([m,b])=>{const g=o.columns.find(M=>String(s(M))===m),k=g?h(g,b):b;if(d(b)){i[m]=null,r("filterApply",{key:m,value:[]});return}i[m]=k,r("filterApply",{key:m,value:f(k)})}),r("update:filterValues",i),a.value=!1},S=()=>{a.value=!1};return(i,m)=>{const b=t.resolveComponent("a-modal");return t.openBlock(),t.createBlock(b,{visible:a.value,"onUpdate:visible":m[0]||(m[0]=g=>a.value=g),class:"efko-dataview",title:"Фильтры","destroy-on-close":"","ok-text":"Применить","cancel-text":"Сбросить","ok-button-props":{disabled:!x.value},onOk:p,onCancel:S},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value,g=>(t.openBlock(),t.createElementBlock("section",{key:s(g),class:"mb-4 flex flex-col gap-2"},[t.createElementVNode("span",An,t.toDisplayString(g.title),1),t.createVNode(pt,{modelValue:l[s(g)],"onUpdate:modelValue":k=>l[s(g)]=k,"filter-mode":g.filterMode,"component-props":g.componentProps,placeholder:g.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])]))),128))]),_:1},8,["visible","ok-button-props"])}}}),gt=G(En,[["__scopeId","data-v-4171d5f0"]]);var ce=(e=>(e.Table="table",e.Grid="grid",e))(ce||{}),Te=(e=>(e.Grid="grid",e.Row="row",e))(Te||{});const Bn={class:"efko-dataview"},Mn={class:"flex items-center justify-between gap-2 mb-2"},Tn={class:"flex items-center gap-1"},ht=t.defineComponent({__name:"DataView",props:{viewMode:{},loading:{type:Boolean},pagination:{type:Boolean,default:!1},columns:{},dataSource:{},filterValues:{},meta:{},canEdit:{type:Boolean,default:!0},editAction:{type:Boolean,default:!0},deleteAction:{type:Boolean,default:!0},showActionsColumn:{type:Boolean,default:!0},disableViewMode:{type:Boolean,default:!1},enableTableFilterDrawer:{type:Boolean,default:!1},disableColumnFilterDropdowns:{type:Boolean,default:!1},useFilterModal:{type:Boolean,default:!1},multiColumnFilters:{type:Boolean,default:!0}},emits:["update:viewMode","update:filterValues","filterApply","edit","delete","restore","sortChange","pageChange","sizeChange"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.viewMode||ce.Table),l=t.computed(()=>(a==null?void 0:a.value)===ce.Grid),s=t.ref(Te.Grid),c=t.ref(o.filterValues||{}),h=t.ref(null),f=b=>{c.value=b,r("update:filterValues",b)},d=(b,g,k)=>{const M={...c.value};if(g!==void 0){if(Array.isArray(g)){const y=g.filter(u=>!Y.isEqual(u,k));y.length===0?M[b]=null:y.length===1&&!Array.isArray(y[0])?M[b]=y[0]:M[b]=y,f(M);return}Y.isEqual(g,k)&&(M[b]=null,f(M))}},v=()=>f({}),x=b=>{r("filterApply",b)},C=t.ref(!1),p=t.ref(!1),S=t.ref({}),i=t.computed(()=>a.value==="table"?Object.keys(S.value).filter(b=>S.value[b]===!1).length:0),m=b=>{b.forEach(g=>{const k=g.key??String(g.dataIndex);S.value[k]===void 0&&(S.value[k]=!0)}),o.showActionsColumn&&S.value.actions===void 0&&(S.value.actions=!0)};return t.watch(()=>o.filterValues,b=>{c.value=b||{}}),t.watch(()=>o.viewMode,b=>{b!==void 0&&(a.value=b)}),t.watch(()=>o.columns,m),t.watch(a,b=>r("update:viewMode",b)),t.onMounted(()=>m(o.columns)),t.onMounted(()=>{h.value&&Ee(h.value)}),(b,g)=>{const k=t.resolveComponent("Icon"),M=t.resolveComponent("a-button"),y=t.resolveComponent("a-badge");return t.openBlock(),t.createElementBlock("div",Bn,[t.createElementVNode("div",{ref_key:"tagCloudContainer",ref:h},[t.createVNode(Vo,{filters:c.value,"onUpdate:filters":f,onRemove:d,onClear:v},null,8,["filters"])],512),l.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",Mn,[t.createElementVNode("div",Tn,[t.createVNode(y,{dot:"",count:i.value},{default:t.withCtx(()=>[t.createVNode(M,{class:"flex items-center justify-center p-2",onClick:g[0]||(g[0]=u=>p.value=!0)},{default:t.withCtx(()=>[t.createVNode(k,{name:"solar:settings-outline",class:"text-lg"})]),_:1})]),_:1},8,["count"]),t.createVNode(M,{class:"flex items-center justify-center p-2",onClick:g[1]||(g[1]=u=>C.value=!0)},{default:t.withCtx(()=>[t.createVNode(k,{name:"ant-design:filter-outlined",class:"text-lg"})]),_:1})]),t.renderSlot(b.$slots,"headerCardContainer"),t.renderSlot(b.$slots,"title")]),l.value?(t.openBlock(),t.createBlock(nt,{key:0,loading:e.loading,columns:e.columns,"data-source":e.dataSource,"card-layout":s.value,"can-edit":e.canEdit,"edit-action":e.editAction,"show-actions-column":e.showActionsColumn,pagination:e.pagination,meta:e.meta,onRestore:g[2]||(g[2]=u=>r("restore",u)),onEdit:g[3]||(g[3]=u=>r("edit",u)),onDelete:g[4]||(g[4]=u=>r("delete",u)),onPageChange:g[5]||(g[5]=u=>r("pageChange",u)),onSizeChange:g[6]||(g[6]=(u,w)=>r("sizeChange",u,w))},t.createSlots({_:2},[b.$slots.titleCard?{name:"titleCard",fn:t.withCtx(u=>[t.renderSlot(b.$slots,"titleCard",t.normalizeProps(t.guardReactiveProps(u)))]),key:"0"}:void 0,b.$slots.body?{name:"bodyCard",fn:t.withCtx(u=>[t.renderSlot(b.$slots,"body",t.normalizeProps(t.guardReactiveProps(u)))]),key:"1"}:void 0,b.$slots.footer?{name:"footerCard",fn:t.withCtx(u=>[t.renderSlot(b.$slots,"footer",t.normalizeProps(t.guardReactiveProps(u)))]),key:"2"}:void 0]),1032,["loading","columns","data-source","card-layout","can-edit","edit-action","show-actions-column","pagination","meta"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createBlock(dt,{key:1,loading:e.loading,pagination:e.pagination,columns:e.columns,"data-source":e.dataSource,"filter-values":c.value,meta:e.meta,"can-edit":e.canEdit,"edit-action":e.editAction,"delete-action":e.deleteAction,"show-actions-column":e.showActionsColumn,"columns-visibility":S.value,"disable-column-filter-dropdowns":o.disableColumnFilterDropdowns===!0,"show-filter-button":o.enableTableFilterDrawer===!0,"multi-column-filters":o.multiColumnFilters,onOpenColumnDrawer:g[7]||(g[7]=u=>p.value=!0),onOpenFilterDrawer:g[8]||(g[8]=u=>C.value=!0),"onUpdate:filterValues":f,onFilterApply:g[9]||(g[9]=u=>r("filterApply",u)),onRestore:g[10]||(g[10]=u=>r("restore",u)),onEdit:g[11]||(g[11]=u=>r("edit",u)),onDelete:g[12]||(g[12]=u=>r("delete",u)),onSortChange:g[13]||(g[13]=u=>r("sortChange",u)),onPageChange:g[14]||(g[14]=u=>r("pageChange",u)),onSizeChange:g[15]||(g[15]=(u,w)=>r("sizeChange",u,w))},{title:t.withCtx(()=>[t.renderSlot(b.$slots,"title")]),bodyCell:t.withCtx(u=>[t.renderSlot(b.$slots,"bodyCell",t.normalizeProps(t.guardReactiveProps(u)))]),actionColumn:t.withCtx(u=>[t.renderSlot(b.$slots,"actionColumn",t.normalizeProps(t.guardReactiveProps(u)))]),_:3},8,["loading","pagination","columns","data-source","filter-values","meta","can-edit","edit-action","delete-action","show-actions-column","columns-visibility","disable-column-filter-dropdowns","show-filter-button","multi-column-filters"])),t.renderSlot(b.$slots,"filtersDrawer",{visible:C.value,setVisible:u=>{C.value=u},filters:c.value,updateFilters:f,emitFilterApply:x},()=>[o.useFilterModal===!0?(t.openBlock(),t.createBlock(gt,{key:0,visible:C.value,"onUpdate:visible":g[16]||(g[16]=u=>C.value=u),columns:e.columns,"filter-values":c.value,"onUpdate:filterValues":f,onFilterApply:g[17]||(g[17]=u=>r("filterApply",u))},null,8,["visible","columns","filter-values"])):(t.openBlock(),t.createBlock(mt,{key:1,visible:C.value,"onUpdate:visible":g[18]||(g[18]=u=>C.value=u),columns:e.columns,"filter-values":c.value,"onUpdate:filterValues":f,onFilterApply:g[19]||(g[19]=u=>r("filterApply",u))},null,8,["visible","columns","filter-values"]))]),t.createVNode(ft,{visible:p.value,"onUpdate:visible":g[20]||(g[20]=u=>p.value=u),"model-value":S.value,"onUpdate:modelValue":g[21]||(g[21]=u=>S.value=u),"view-mode":a.value,"onUpdate:viewMode":g[22]||(g[22]=u=>a.value=u),"card-layout":s.value,"onUpdate:cardLayout":g[23]||(g[23]=u=>s.value=u),columns:e.columns,"show-actions-column":e.showActionsColumn,"disable-view-mode":e.disableViewMode},null,8,["visible","model-value","view-mode","card-layout","columns","show-actions-column","disable-view-mode"])])}}}),Vn=t.defineComponent({__name:"LazyLoadContainer",props:{onIntersect:{},threshold:{default:.1},once:{type:Boolean,default:!1},rootMargin:{default:"0px"}},setup(e){const n=e,o=t.ref(null);let r=null;const a=l=>{l[0].isIntersecting&&n.onIntersect&&(n.onIntersect(),n.once&&r&&r.disconnect())};return t.onMounted(()=>{r=new IntersectionObserver(a,{threshold:n.threshold,rootMargin:n.rootMargin}),o.value&&r.observe(o.value)}),t.onBeforeUnmount(()=>{r==null||r.disconnect()}),(l,s)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"container",ref:o},[t.renderSlot(l.$slots,"default")],512))}});exports.CardFiltersDrawer=mt;exports.CardFiltersModal=gt;exports.CardGrid=nt;exports.CardLayout=Te;exports.ColumnSettingsDrawer=ft;exports.DEFAULT_PAGE_NUMBER=en;exports.DEFAULT_PAGE_SIZE=tn;exports.DataTable=dt;exports.DataView=ht;exports.FilterMode=N;exports.LazyLoadContainer=Vn;exports.LazyLoadTrigger=ot;exports.PAGE_SIZE_EXTRA_LARGE=Qo;exports.PAGE_SIZE_LARGE=Yo;exports.PAGE_SIZE_MEDIUM=Ko;exports.PAGE_SIZE_OPTIONS=on;exports.PAGE_SIZE_SMALL=rt;exports.PAGE_SIZE_ULTRA=Jo;exports.PageSizes=at;exports.SkipSizes=lt;exports.SortOrder=st;exports.TableBodyCell=ut;exports.TableDefaults=it;exports.TableSortOrder=se;exports.ViewMode=ce;exports.default=ht;
|
|
36
36
|
//# sourceMappingURL=data-view.cjs.js.map
|