@gx-design-vue/context 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * Gx Design Pro
3
- * Version: 0.0.0
3
+ * Version: 0.0.1
4
4
  * Author: gx12358
5
5
  * Copyright (C) 2024 gx12358
6
6
  * License: MIT License
@@ -9,24 +9,4 @@
9
9
  * Homepage:
10
10
  * Contact: gx12358@gmail.com
11
11
  */
12
- (function(p,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue"),require("ant-design-vue"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","ant-design-vue","@vueuse/core"],c):(p=typeof globalThis<"u"?globalThis:p||self,c(p.GContext={},p.vue,p.antDesignVue,p.core))})(this,(function(p,c,C,zt){"use strict";/*!
13
- * Gx Design Pro
14
- * Version: 0.2.0-beta.79
15
- * Author: gx12358
16
- * Copyright (C) 2024 gx12358
17
- * License: MIT License
18
- * Description: Gx Design Pro Utils
19
- * Date Created: 2025-08-17
20
- * Homepage:
21
- * Contact: gx12358@gmail.com
22
- */const $e=({suffixCls:e,customizePrefixCls:t,isPor:r,className:n})=>{const o=n||(r?"gx-pro":"gx");return t||(e?`${o}-${e}`:o)};function Lt(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,r){const n=e,o=[],a=r||n.length;let i,s;if(t)for(i=0;i<t;i+=1)o[i]=n[Number.parseInt(String(Math.random()*a))];else for(o[8]="-",o[13]="-",o[18]="-",o[23]="-",o[14]="4",i=0;i<36;i+=1)o[i]||(s=Math.random()*16,o[i]=n[i===19?s&&3||8:s]);return o.join("")},uuidFast(){const t=e,r=Array.from({length:36});let n=0,o,a;for(a=0;a<36;a+=1)a===8||a===13||a===18||a===23?r[a]="-":a===14?r[a]="4":(n<=2&&(n=33554432+Math.random()*16777216||0),o=n&&15,n=n>4,r[a]=t[a===19?o&&3||8:o]);return r.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.random()*16||0;return(t==="x"?r:r&&3||8).toString(16)})}}}typeof process<"u"&&process.versions!=null&&process.versions.node!=null;const B=(...e)=>{const t={},r=e.length;let n,o=0;for(;o<r;o+=1)for(n in e[o])Object.prototype.hasOwnProperty.call(e[o],n)&&(typeof t[n]=="object"&&typeof e[o][n]=="object"&&t[n]!==void 0&&t[n]!==null&&!Array.isArray(t[n])&&!Array.isArray(e[o][n])?t[n]={...t[n],...e[o][n]}:t[n]=e[o][n]);return t};function g(e,t){Ut(e)&&(e="100%");var r=Wt(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function X(e){return Math.min(1,Math.max(0,e))}function Ut(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Wt(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Pe(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Q(e){return e<=1?"".concat(Number(e)*100,"%"):e}function H(e){return e.length===1?"0"+e:String(e)}function qt(e,t,r){return{r:g(e,255)*255,g:g(t,255)*255,b:g(r,255)*255}}function Ce(e,t,r){e=g(e,255),t=g(t,255),r=g(r,255);var n=Math.max(e,t,r),o=Math.min(e,t,r),a=0,i=0,s=(n+o)/2;if(n===o)i=0,a=0;else{var u=n-o;switch(i=s>.5?u/(2-n-o):u/(n+o),n){case e:a=(t-r)/u+(t<r?6:0);break;case t:a=(r-e)/u+2;break;case r:a=(e-t)/u+4;break}a/=6}return{h:a,s:i,l:s}}function ae(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Dt(e,t,r){var n,o,a;if(e=g(e,360),t=g(t,100),r=g(r,100),t===0)o=r,a=r,n=r;else{var i=r<.5?r*(1+t):r+t-r*t,s=2*r-i;n=ae(s,i,e+1/3),o=ae(s,i,e),a=ae(s,i,e-1/3)}return{r:n*255,g:o*255,b:a*255}}function Be(e,t,r){e=g(e,255),t=g(t,255),r=g(r,255);var n=Math.max(e,t,r),o=Math.min(e,t,r),a=0,i=n,s=n-o,u=n===0?0:s/n;if(n===o)a=0;else{switch(n){case e:a=(t-r)/s+(t<r?6:0);break;case t:a=(r-e)/s+2;break;case r:a=(e-t)/s+4;break}a/=6}return{h:a,s:u,v:i}}function Yt(e,t,r){e=g(e,360)*6,t=g(t,100),r=g(r,100);var n=Math.floor(e),o=e-n,a=r*(1-t),i=r*(1-o*t),s=r*(1-(1-o)*t),u=n%6,l=[r,i,a,a,s,r][u],d=[s,r,r,i,a,a][u],P=[a,a,s,r,r,i][u];return{r:l*255,g:d*255,b:P*255}}function He(e,t,r,n){var o=[H(Math.round(e).toString(16)),H(Math.round(t).toString(16)),H(Math.round(r).toString(16))];return n&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Vt(e,t,r,n,o){var a=[H(Math.round(e).toString(16)),H(Math.round(t).toString(16)),H(Math.round(r).toString(16)),H(Gt(n))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Gt(e){return Math.round(parseFloat(e)*255).toString(16)}function Ie(e){return b(e)/255}function b(e){return parseInt(e,16)}function Xt(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var ie={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 Qt(e){var t={r:0,g:0,b:0},r=1,n=null,o=null,a=null,i=!1,s=!1;return typeof e=="string"&&(e=Jt(e)),typeof e=="object"&&(A(e.r)&&A(e.g)&&A(e.b)?(t=qt(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):A(e.h)&&A(e.s)&&A(e.v)?(n=Q(e.s),o=Q(e.v),t=Yt(e.h,n,o),i=!0,s="hsv"):A(e.h)&&A(e.s)&&A(e.l)&&(n=Q(e.s),a=Q(e.l),t=Dt(e.h,n,a),i=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=Pe(r),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var Zt="[-\\+]?\\d+%?",Kt="[-\\+]?\\d*\\.\\d+%?",_="(?:".concat(Kt,")|(?:").concat(Zt,")"),se="[\\s|\\(]+(".concat(_,")[,|\\s]+(").concat(_,")[,|\\s]+(").concat(_,")\\s*\\)?"),ce="[\\s|\\(]+(".concat(_,")[,|\\s]+(").concat(_,")[,|\\s]+(").concat(_,")[,|\\s]+(").concat(_,")\\s*\\)?"),m={CSS_UNIT:new RegExp(_),rgb:new RegExp("rgb"+se),rgba:new RegExp("rgba"+ce),hsl:new RegExp("hsl"+se),hsla:new RegExp("hsla"+ce),hsv:new RegExp("hsv"+se),hsva:new RegExp("hsva"+ce),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 Jt(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(ie[e])e=ie[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=m.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=m.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=m.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=m.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=m.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=m.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=m.hex8.exec(e),r?{r:b(r[1]),g:b(r[2]),b:b(r[3]),a:Ie(r[4]),format:t?"name":"hex8"}:(r=m.hex6.exec(e),r?{r:b(r[1]),g:b(r[2]),b:b(r[3]),format:t?"name":"hex"}:(r=m.hex4.exec(e),r?{r:b(r[1]+r[1]),g:b(r[2]+r[2]),b:b(r[3]+r[3]),a:Ie(r[4]+r[4]),format:t?"name":"hex8"}:(r=m.hex3.exec(e),r?{r:b(r[1]+r[1]),g:b(r[2]+r[2]),b:b(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function A(e){return!!m.CSS_UNIT.exec(String(e))}var er=(function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=Xt(t)),this.originalInput=t;var o=Qt(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:o.format,this.gradientType=r.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=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,o,a=t.r/255,i=t.g/255,s=t.b/255;return a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),.2126*r+.7152*n+.0722*o},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Pe(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Be(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Be(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(o,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Ce(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Ce(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(o,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),He(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Vt(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},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 t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(g(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(g(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+He(this.r,this.g,this.b,!1),r=0,n=Object.entries(ie);r<n.length;r++){var o=n[r],a=o[0],i=o[1];if(t===i)return a}return!1},e.prototype.toString=function(t){var r=!!t;t=t??this.format;var n=!1,o=this.a<1&&this.a>=0,a=!r&&o&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||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(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=X(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=X(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=X(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=X(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),o=new e(t).toRgb(),a=r/100,i={r:(o.r-n.r)*a+n.r,g:(o.g-n.g)*a+n.g,b:(o.b-n.b)*a+n.b,a:(o.a-n.a)*a+n.a};return new e(i)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),o=360/r,a=[this];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,a.push(new e(n));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,o=r.s,a=r.v,i=[],s=1/t;t--;)i.push(new e({h:n,s:o,v:a})),a=(a+s)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),o=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/o,g:(r.g*r.a+n.g*n.a*(1-r.a))/o,b:(r.b*r.a+n.b*n.a*(1-r.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,o=[this],a=360/t,i=1;i<t;i++)o.push(new e({h:(n+i*a)%360,s:r.s,l:r.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e})();function y(e){return{type:Object,default:e}}const tr="anticon",Oe=()=>({iconPrefixCls:String,getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:y(),input:y(),autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:y(),pageHeader:y(),componentSize:{type:String},componentDisabled:{type:Boolean,default:void 0},direction:{type:String,default:"ltr"},space:y(),virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:y(),pagination:y(),theme:y(),select:y(),wave:y()}),rr=Symbol("configProvider"),nr={getPrefixCls:(e,t)=>t||(e?`ant-${e}`:"ant"),iconPrefixCls:c.computed(()=>tr),getPopupContainer:c.computed(()=>()=>document.body),direction:c.computed(()=>"ltr")},Fe=()=>c.inject(rr,nr),or={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"};function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Z.apply(null,arguments)}const ar={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},Re={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},ue={lang:Z({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},ar),timePickerLocale:Z({},Re)};ue.lang.ok="确定";const v="${label}不是一个有效的${type}",ir={locale:"zh-cn",Pagination:or,DatePicker:ue,TimePicker:Re,Calendar:ue,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:v,method:v,array:v,object:v,number:v,date:v,boolean:v,integer:v,float:v,regexp:v,email:v,url:v,hex:v},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码已过期",refresh:"点击刷新",scanned:"已扫描"}};/*!
23
- * Gx Design Pro
24
- * Version: 0.1.0-beta.129
25
- * Author: gx12358
26
- * Copyright (C) 2024 gx12358
27
- * License: MIT License
28
- * Description: Gx Design Pro Provider
29
- * Date Created: 2025-11-05
30
- * Homepage:
31
- * Contact: gx12358@gmail.com
32
- */class Ee{}const Ne="CALC_UNIT",sr=new RegExp(Ne,"g");function le(e){return typeof e=="number"?`${e}${Ne}`:e}class I extends Ee{constructor(t,r){super(),this.result="";const n=typeof t;this.unitlessCssVar=r,t instanceof I?this.result=`(${t.result})`:n==="number"?this.result=le(t):n==="string"&&(this.result=t)}add(t){return t instanceof I?this.result=`${this.result} + ${t.getResult()}`:(typeof t=="number"||typeof t=="string")&&(this.result=`${this.result} + ${le(t)}`),this.lowPriority=!0,this}sub(t){return t instanceof I?this.result=`${this.result} - ${t.getResult()}`:(typeof t=="number"||typeof t=="string")&&(this.result=`${this.result} - ${le(t)}`),this.lowPriority=!0,this}mul(t){return this.lowPriority&&(this.result=`(${this.result})`),t instanceof I?this.result=`${this.result} * ${t.getResult(!0)}`:(typeof t=="number"||typeof t=="string")&&(this.result=`${this.result} * ${t}`),this.lowPriority=!1,this}div(t){return this.lowPriority&&(this.result=`(${this.result})`),t instanceof I?this.result=`${this.result} / ${t.getResult(!0)}`:(typeof t=="number"||typeof t=="string")&&(this.result=`${this.result} / ${t}`),this.lowPriority=!1,this}getResult(t){return this.lowPriority||t?`(${this.result})`:this.result}equal(t){const{unit:r}=t||{};let n=!0;return typeof r=="boolean"?n=r:Array.from(this.unitlessCssVar).some(o=>this.result.includes(o))&&(n=!1),this.result=this.result.replace(sr,n?"px":""),typeof this.lowPriority<"u"?`calc(${this.result})`:this.result}}class O extends Ee{constructor(t){super(),this.result=0,t instanceof O?this.result=t.result:typeof t=="number"&&(this.result=t)}add(t){return t instanceof O?this.result+=t.result:typeof t=="number"&&(this.result+=t),this}sub(t){return t instanceof O?this.result-=t.result:typeof t=="number"&&(this.result-=t),this}mul(t){return t instanceof O?this.result*=t.result:typeof t=="number"&&(this.result*=t),this}div(t){return t instanceof O?this.result/=t.result:typeof t=="number"&&(this.result/=t),this}equal(){return this.result}}const cr=(e,t)=>{const r=e==="css"?I:O;return n=>new r(n,t)};function ze(e){return typeof e=="number"?`${e}px`:e}function ur(e){return e==="js"?{max:Math.max,min:Math.min}:{max:(...t)=>`max(${t.map(r=>ze(r)).join(",")})`,min:(...t)=>`min(${t.map(r=>ze(r)).join(",")})`}}function lr(e,t){return e&&e.contains?e.contains(t):!1}const Le="data-vc-order",Ue="data-vc-priority",fr="data-token-hash",hr="data-css-hash",fe=new Map;function dr(e,t){const r=fe.get(e);if(!r||!lr(document,r)){const n=De("",t),{parentNode:o}=n;fe.set(e,o),e.removeChild(n)}}function pr(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function he(){return document.querySelector("head")||document.body}function We(){return hr}function qe(e){return Array.from((fe.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function gr(e){const t=he();return qe(t).find(r=>r.getAttribute(We())===e)}function De(e,t={}){const{prepend:r,priority:n=0}=t,o=pr(r),a=o==="prependQueue",i=document.createElement("style");i.setAttribute(Le,o),a&&n&&i.setAttribute(Ue,`${n}`),i.innerHTML=e;const s=he(),{firstChild:u}=s;if(r){if(a){const l=qe(s).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(Le)||""))return!1;const P=Number(d.getAttribute(Ue)||0);return n>=P});if(l.length)return s.insertBefore(i,l[l.length-1].nextSibling),i}s.insertBefore(i,u)}else s.appendChild(i);return i}function br(e,t,r={}){const n=he();dr(n,r);const o=gr(t);if(o)return o.innerHTML!==e&&(o.innerHTML=e),o;const a=De(e,r);return a.setAttribute(We(),t),a.setAttribute(fr,`theme-var-${t}`),a}const vr="gx",mr=["colorPrimary","colorSuccess","colorError","colorWarning","colorBgBase","colorBgLayout","colorBgContainer","colorText","colorTextBase","colorTextDescription","colorBorder","colorSplit","colorPrimaryHover","colorErrorHover","colorWarningBgHover","colorPrimaryActive","colorErrorActive","colorWarningActive","colorPrimaryBorder","colorErrorBorder","colorWarningBorder","colorPrimaryBorderHover","colorWarningBorderHover","colorErrorBorderHover","colorPrimaryBg","colorWarningBg","colorErrorBg","colorPrimaryBgHover","colorWarningBgHover","colorErrorBgHover"],yr=e=>Object.keys(e).length?`:root{${Object.entries(e).map(([t,r])=>`${t}:${r};`).join("")}}`:"",xr=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();function jr(e=[],t){const r=`${Lt().uuid(7)}`,n=de(),o=document.querySelector("html");(n?.token||t?.token?.value)&&c.watch([()=>n?.token?n.token.value:t?.token?.value,()=>c.isRef(e)?e.value:e],([a,i])=>{if(o&&a){const s={};i.concat(mr).forEach(l=>{const d=xr(l,t?.prefix||vr);a[l]&&!s[d]&&(s[d]=a[l])});const u=yr(s);br(u,r,{prepend:"queue",priority:-999})}},{immediate:!0,deep:!0})}function Ye(e,t){const r=Symbol(e);return{provideContext:n=>{c.provide(r,n)},useInjectContext:n=>c.inject(r,n||t||{}),contextInjectKey:r}}C.Form.useForm;const{provideContext:Sr,useInjectContext:de}=Ye("pro-config-provider"),k=(e,t)=>new er(e).setAlpha(t).toRgbString(),Tr=(e,t)=>{const{key:r}=e,n={...e},o=k(t.colorBgElevated,.6),a=r?.split(":")?.[0]==="dark";return{key:"",bgLayout:`linear-gradient(${t.colorBgContainer}, ${t.colorBgLayout} 28%)`,colorTextAppListIcon:t.colorTextSecondary,appListIconHoverBgColor:n?.sider?.colorBgMenuItemSelected,colorBgAppListIconHover:k(t.colorTextBase,.04),colorTextAppListIconHover:t.colorTextBase,menuItemIconSize:t.fontSize,...n,header:{colorBgHeader:o,colorBgScrollHeader:k(t.colorBgElevated,.8),colorHeaderTitle:t.colorText,colorBgMenuItemHover:k(t.colorTextBase,.03),colorBgMenuItemSelected:a?t.colorPrimary:"transparent",colorBgMenuElevated:(n?.header?.colorBgHeader??o)!==o?n.header?.colorBgHeader:t.colorBgElevated,colorTextMenuSelected:a?t.colorTextLightSolid:t.colorPrimary,colorBgRightActionsItemHover:t.colorBgTextHover,colorTextRightActionsItem:t.colorTextTertiary,colorTextRightActionsItemHover:t.colorText,heightLayoutHeader:48,colorTextMenu:t.colorTextSecondary,colorTextMenuSecondary:t.colorTextTertiary,colorTextMenuTitle:t.colorText,colorTextMenuActive:t.colorText,itemBorderRadius:4,paddingMenuItem:B({inline:t.margin},n.header?.paddingMenuItem)},sider:{colorBgCollapsedButton:t.colorBgElevated,colorTextCollapsedButtonHover:t.colorTextSecondary,colorTextCollapsedButton:k(t.colorTextBase,.25),colorMenuBackground:"transparent",colorMenuItemDivider:k(t.colorTextBase,.06),colorBgMenuItemHover:t.colorBgTextHover,colorBgMenuItemSelected:a?t.colorPrimary:t.controlItemBgActive,colorTextMenu:a?t.colorTextSecondary:t.colorText,colorTextMenuItemHover:t.colorText,colorTextMenuSelected:a?k(t.colorTextBase,.95):t.colorPrimary,colorTextMenuActive:a?t.colorText:t.colorPrimary,colorTextMenuSecondary:t.colorTextTertiary,colorTextMenuTitle:t.colorText,colorTextSubMenuSelected:k(t.colorTextBase,.95),subMenuItemSelectedColor:a?t.colorTextLightSolid:t.colorText,...n.sider,paddingMenu:B({},n.sider?.paddingMenu),paddingMenuItem:B({inline:t.padding},n.sider?.paddingMenuItem),marginMenuItem:B({block:t.marginXXS,inline:t.marginXXS},n.sider?.marginMenuItem),marginSubMenu:B({block:t.marginXXS,inline:t.marginXXS},n.sider?.marginMenuItem)},pageContainer:{borderRadius:t.borderRadiusLG,colorBgPageContainer:"transparent",paddingInlinePageContainerContent:n.pageContainer?.marginInlinePageContainerContent||20,paddingBlockPageContainerContent:n.pageContainer?.marginBlockPageContainerContent||20,colorBgPageContainerFixed:t.colorBgElevated,...n.pageContainer}}};function Ar(e="js"){const t=new Set,{max:r,min:n}=ur(e);return{calc:cr(e,t),max:r,min:n}}process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",C.theme.useToken;var Ve=typeof global=="object"&&global&&global.Object===Object&&global,Mr=typeof self=="object"&&self&&self.Object===Object&&self,x=Ve||Mr||Function("return this")(),j=x.Symbol,Ge=Object.prototype,wr=Ge.hasOwnProperty,_r=Ge.toString,D=j?j.toStringTag:void 0;function kr(e){var t=wr.call(e,D),r=e[D];try{e[D]=void 0;var n=!0}catch{}var o=_r.call(e);return n&&(t?e[D]=r:delete e[D]),o}var $r=Object.prototype,Pr=$r.toString;function Cr(e){return Pr.call(e)}var Br="[object Null]",Hr="[object Undefined]",Xe=j?j.toStringTag:void 0;function F(e){return e==null?e===void 0?Hr:Br:Xe&&Xe in Object(e)?kr(e):Cr(e)}function R(e){return e!=null&&typeof e=="object"}var Ir="[object Symbol]";function pe(e){return typeof e=="symbol"||R(e)&&F(e)==Ir}function Qe(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var E=Array.isArray,Ze=j?j.prototype:void 0,Ke=Ze?Ze.toString:void 0;function Je(e){if(typeof e=="string")return e;if(E(e))return Qe(e,Je)+"";if(pe(e))return Ke?Ke.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function K(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Or(e){return e}var Fr="[object AsyncFunction]",Rr="[object Function]",Er="[object GeneratorFunction]",Nr="[object Proxy]";function ge(e){if(!K(e))return!1;var t=F(e);return t==Rr||t==Er||t==Fr||t==Nr}var be=x["__core-js_shared__"],et=(function(){var e=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function zr(e){return!!et&&et in e}var Lr=Function.prototype,Ur=Lr.toString;function N(e){if(e!=null){try{return Ur.call(e)}catch{}try{return e+""}catch{}}return""}var Wr=/[\\^$.*+?()[\]{}|]/g,qr=/^\[object .+?Constructor\]$/,Dr=Function.prototype,Yr=Object.prototype,Vr=Dr.toString,Gr=Yr.hasOwnProperty,Xr=RegExp("^"+Vr.call(Gr).replace(Wr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qr(e){if(!K(e)||zr(e))return!1;var t=ge(e)?Xr:qr;return t.test(N(e))}function Zr(e,t){return e?.[t]}function z(e,t){var r=Zr(e,t);return Qr(r)?r:void 0}var ve=z(x,"WeakMap");function Kr(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Jr=800,en=16,tn=Date.now;function rn(e){var t=0,r=0;return function(){var n=tn(),o=en-(n-r);if(r=n,o>0){if(++t>=Jr)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function nn(e){return function(){return e}}var J=(function(){try{var e=z(Object,"defineProperty");return e({},"",{}),e}catch{}})(),on=J?function(e,t){return J(e,"toString",{configurable:!0,enumerable:!1,value:nn(t),writable:!0})}:Or,an=rn(on);function sn(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var cn=9007199254740991,un=/^(?:0|[1-9]\d*)$/;function ln(e,t){var r=typeof e;return t=t??cn,!!t&&(r=="number"||r!="symbol"&&un.test(e))&&e>-1&&e%1==0&&e<t}function tt(e,t,r){t=="__proto__"&&J?J(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function rt(e,t){return e===t||e!==e&&t!==t}var fn=Object.prototype,hn=fn.hasOwnProperty;function nt(e,t,r){var n=e[t];(!(hn.call(e,t)&&rt(n,r))||r===void 0&&!(t in e))&&tt(e,t,r)}function dn(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],u=void 0;u===void 0&&(u=e[s]),o?tt(r,s,u):nt(r,s,u)}return r}var ot=Math.max;function pn(e,t,r){return t=ot(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=ot(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),Kr(e,this,s)}}var gn=9007199254740991;function at(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=gn}function bn(e){return e!=null&&at(e.length)&&!ge(e)}var vn=Object.prototype;function mn(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||vn;return e===r}function yn(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var xn="[object Arguments]";function it(e){return R(e)&&F(e)==xn}var st=Object.prototype,jn=st.hasOwnProperty,Sn=st.propertyIsEnumerable,ct=it((function(){return arguments})())?it:function(e){return R(e)&&jn.call(e,"callee")&&!Sn.call(e,"callee")};function Tn(){return!1}var ut=typeof p=="object"&&p&&!p.nodeType&&p,lt=ut&&typeof module=="object"&&module&&!module.nodeType&&module,An=lt&&lt.exports===ut,ft=An?x.Buffer:void 0,Mn=ft?ft.isBuffer:void 0,ht=Mn||Tn,wn="[object Arguments]",_n="[object Array]",kn="[object Boolean]",$n="[object Date]",Pn="[object Error]",Cn="[object Function]",Bn="[object Map]",Hn="[object Number]",In="[object Object]",On="[object RegExp]",Fn="[object Set]",Rn="[object String]",En="[object WeakMap]",Nn="[object ArrayBuffer]",zn="[object DataView]",Ln="[object Float32Array]",Un="[object Float64Array]",Wn="[object Int8Array]",qn="[object Int16Array]",Dn="[object Int32Array]",Yn="[object Uint8Array]",Vn="[object Uint8ClampedArray]",Gn="[object Uint16Array]",Xn="[object Uint32Array]",h={};h[Ln]=h[Un]=h[Wn]=h[qn]=h[Dn]=h[Yn]=h[Vn]=h[Gn]=h[Xn]=!0,h[wn]=h[_n]=h[Nn]=h[kn]=h[zn]=h[$n]=h[Pn]=h[Cn]=h[Bn]=h[Hn]=h[In]=h[On]=h[Fn]=h[Rn]=h[En]=!1;function Qn(e){return R(e)&&at(e.length)&&!!h[F(e)]}function me(e){return function(t){return e(t)}}var dt=typeof p=="object"&&p&&!p.nodeType&&p,Y=dt&&typeof module=="object"&&module&&!module.nodeType&&module,Zn=Y&&Y.exports===dt,ye=Zn&&Ve.process,U=(function(){try{var e=Y&&Y.require&&Y.require("util").types;return e||ye&&ye.binding&&ye.binding("util")}catch{}})(),pt=U&&U.isTypedArray,Kn=pt?me(pt):Qn;function Jn(e,t){var r=E(e),n=!r&&ct(e),o=!r&&!n&&ht(e),a=!r&&!n&&!o&&Kn(e),i=r||n||o||a,s=i?yn(e.length,String):[],u=s.length;for(var l in e)i&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||ln(l,u))||s.push(l);return s}function eo(e,t){return function(r){return e(t(r))}}function to(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var ro=Object.prototype,no=ro.hasOwnProperty;function oo(e){if(!K(e))return to(e);var t=mn(e),r=[];for(var n in e)n=="constructor"&&(t||!no.call(e,n))||r.push(n);return r}function ao(e){return bn(e)?Jn(e):oo(e)}var io=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,so=/^\w*$/;function co(e,t){if(E(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||pe(e)?!0:so.test(e)||!io.test(e)||t!=null&&e in Object(t)}var V=z(Object,"create");function uo(){this.__data__=V?V(null):{},this.size=0}function lo(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var fo="__lodash_hash_undefined__",ho=Object.prototype,po=ho.hasOwnProperty;function go(e){var t=this.__data__;if(V){var r=t[e];return r===fo?void 0:r}return po.call(t,e)?t[e]:void 0}var bo=Object.prototype,vo=bo.hasOwnProperty;function mo(e){var t=this.__data__;return V?t[e]!==void 0:vo.call(t,e)}var yo="__lodash_hash_undefined__";function xo(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=V&&t===void 0?yo:t,this}function L(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}L.prototype.clear=uo,L.prototype.delete=lo,L.prototype.get=go,L.prototype.has=mo,L.prototype.set=xo;function jo(){this.__data__=[],this.size=0}function ee(e,t){for(var r=e.length;r--;)if(rt(e[r][0],t))return r;return-1}var So=Array.prototype,To=So.splice;function Ao(e){var t=this.__data__,r=ee(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():To.call(t,r,1),--this.size,!0}function Mo(e){var t=this.__data__,r=ee(t,e);return r<0?void 0:t[r][1]}function wo(e){return ee(this.__data__,e)>-1}function _o(e,t){var r=this.__data__,n=ee(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function M(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}M.prototype.clear=jo,M.prototype.delete=Ao,M.prototype.get=Mo,M.prototype.has=wo,M.prototype.set=_o;var G=z(x,"Map");function ko(){this.size=0,this.__data__={hash:new L,map:new(G||M),string:new L}}function $o(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function te(e,t){var r=e.__data__;return $o(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Po(e){var t=te(this,e).delete(e);return this.size-=t?1:0,t}function Co(e){return te(this,e).get(e)}function Bo(e){return te(this,e).has(e)}function Ho(e,t){var r=te(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function $(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}$.prototype.clear=ko,$.prototype.delete=Po,$.prototype.get=Co,$.prototype.has=Bo,$.prototype.set=Ho;var Io="Expected a function";function xe(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Io);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(xe.Cache||$),r}xe.Cache=$;var Oo=500;function Fo(e){var t=xe(e,function(n){return r.size===Oo&&r.clear(),n}),r=t.cache;return t}var Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Eo=/\\(\\)?/g,No=Fo(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ro,function(r,n,o,a){t.push(o?a.replace(Eo,"$1"):n||r)}),t});function zo(e){return e==null?"":Je(e)}function je(e,t){return E(e)?e:co(e,t)?[e]:No(zo(e))}function gt(e){if(typeof e=="string"||pe(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Lo(e,t){t=je(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[gt(t[r++])];return r&&r==n?e:void 0}function Se(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var bt=j?j.isConcatSpreadable:void 0;function Uo(e){return E(e)||ct(e)||!!(bt&&e&&e[bt])}function Wo(e,t,r,n,o){var a=-1,i=e.length;for(r||(r=Uo),o||(o=[]);++a<i;){var s=e[a];r(s)?Se(o,s):o[o.length]=s}return o}function qo(e){var t=e==null?0:e.length;return t?Wo(e):[]}function Do(e){return an(pn(e,void 0,qo),e+"")}var vt=eo(Object.getPrototypeOf,Object),Yo="[object Object]",Vo=Function.prototype,Go=Object.prototype,mt=Vo.toString,Xo=Go.hasOwnProperty,Qo=mt.call(Object);function Zo(e){if(!R(e)||F(e)!=Yo)return!1;var t=vt(e);if(t===null)return!0;var r=Xo.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&mt.call(r)==Qo}function Ko(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}function Jo(){this.__data__=new M,this.size=0}function ea(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function ta(e){return this.__data__.get(e)}function ra(e){return this.__data__.has(e)}var na=200;function oa(e,t){var r=this.__data__;if(r instanceof M){var n=r.__data__;if(!G||n.length<na-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new $(n)}return r.set(e,t),this.size=r.size,this}function W(e){var t=this.__data__=new M(e);this.size=t.size}W.prototype.clear=Jo,W.prototype.delete=ea,W.prototype.get=ta,W.prototype.has=ra,W.prototype.set=oa;var yt=typeof p=="object"&&p&&!p.nodeType&&p,xt=yt&&typeof module=="object"&&module&&!module.nodeType&&module,aa=xt&&xt.exports===yt,jt=aa?x.Buffer:void 0;jt&&jt.allocUnsafe;function ia(e,t){return e.slice()}function sa(e,t){for(var r=-1,n=e==null?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}function St(){return[]}var ca=Object.prototype,ua=ca.propertyIsEnumerable,Tt=Object.getOwnPropertySymbols,la=Tt?function(e){return e==null?[]:(e=Object(e),sa(Tt(e),function(t){return ua.call(e,t)}))}:St,fa=Object.getOwnPropertySymbols,ha=fa?function(e){for(var t=[];e;)Se(t,la(e)),e=vt(e);return t}:St;function da(e,t,r){var n=t(e);return E(e)?n:Se(n,r(e))}function At(e){return da(e,ao,ha)}var Te=z(x,"DataView"),Ae=z(x,"Promise"),Me=z(x,"Set"),Mt="[object Map]",pa="[object Object]",wt="[object Promise]",_t="[object Set]",kt="[object WeakMap]",$t="[object DataView]",ga=N(Te),ba=N(G),va=N(Ae),ma=N(Me),ya=N(ve),w=F;(Te&&w(new Te(new ArrayBuffer(1)))!=$t||G&&w(new G)!=Mt||Ae&&w(Ae.resolve())!=wt||Me&&w(new Me)!=_t||ve&&w(new ve)!=kt)&&(w=function(e){var t=F(e),r=t==pa?e.constructor:void 0,n=r?N(r):"";if(n)switch(n){case ga:return $t;case ba:return Mt;case va:return wt;case ma:return _t;case ya:return kt}return t});var xa=Object.prototype,ja=xa.hasOwnProperty;function Sa(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&ja.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Pt=x.Uint8Array;function we(e){var t=new e.constructor(e.byteLength);return new Pt(t).set(new Pt(e)),t}function Ta(e,t){var r=we(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Aa=/\w*$/;function Ma(e){var t=new e.constructor(e.source,Aa.exec(e));return t.lastIndex=e.lastIndex,t}var Ct=j?j.prototype:void 0,Bt=Ct?Ct.valueOf:void 0;function wa(e){return Bt?Object(Bt.call(e)):{}}function _a(e,t){var r=we(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}var ka="[object Boolean]",$a="[object Date]",Pa="[object Map]",Ca="[object Number]",Ba="[object RegExp]",Ha="[object Set]",Ia="[object String]",Oa="[object Symbol]",Fa="[object ArrayBuffer]",Ra="[object DataView]",Ea="[object Float32Array]",Na="[object Float64Array]",za="[object Int8Array]",La="[object Int16Array]",Ua="[object Int32Array]",Wa="[object Uint8Array]",qa="[object Uint8ClampedArray]",Da="[object Uint16Array]",Ya="[object Uint32Array]";function Va(e,t,r){var n=e.constructor;switch(t){case Fa:return we(e);case ka:case $a:return new n(+e);case Ra:return Ta(e);case Ea:case Na:case za:case La:case Ua:case Wa:case qa:case Da:case Ya:return _a(e);case Pa:return new n;case Ca:case Ia:return new n(e);case Ba:return Ma(e);case Ha:return new n;case Oa:return wa(e)}}var Ga="[object Map]";function Xa(e){return R(e)&&w(e)==Ga}var Ht=U&&U.isMap,Qa=Ht?me(Ht):Xa,Za="[object Set]";function Ka(e){return R(e)&&w(e)==Za}var It=U&&U.isSet,Ja=It?me(It):Ka,Ot="[object Arguments]",ei="[object Array]",ti="[object Boolean]",ri="[object Date]",ni="[object Error]",Ft="[object Function]",oi="[object GeneratorFunction]",ai="[object Map]",ii="[object Number]",Rt="[object Object]",si="[object RegExp]",ci="[object Set]",ui="[object String]",li="[object Symbol]",fi="[object WeakMap]",hi="[object ArrayBuffer]",di="[object DataView]",pi="[object Float32Array]",gi="[object Float64Array]",bi="[object Int8Array]",vi="[object Int16Array]",mi="[object Int32Array]",yi="[object Uint8Array]",xi="[object Uint8ClampedArray]",ji="[object Uint16Array]",Si="[object Uint32Array]",f={};f[Ot]=f[ei]=f[hi]=f[di]=f[ti]=f[ri]=f[pi]=f[gi]=f[bi]=f[vi]=f[mi]=f[ai]=f[ii]=f[Rt]=f[si]=f[ci]=f[ui]=f[li]=f[yi]=f[xi]=f[ji]=f[Si]=!0,f[ni]=f[Ft]=f[fi]=!1;function re(e,t,r,n,o,a){var i;if(r&&(i=o?r(e,n,o,a):r(e)),i!==void 0)return i;if(!K(e))return e;var s=E(e);if(s)i=Sa(e);else{var u=w(e),l=u==Ft||u==oi;if(ht(e))return ia(e);if(u==Rt||u==Ot||l&&!o)i={};else{if(!f[u])return o?e:{};i=Va(e,u)}}a||(a=new W);var d=a.get(e);if(d)return d;a.set(e,i),Ja(e)?e.forEach(function(S){i.add(re(S,t,r,S,e,a))}):Qa(e)&&e.forEach(function(S,T){i.set(T,re(S,t,r,T,e,a))});var P=At,ne=s?void 0:P(e);return sn(ne||e,function(S,T){ne&&(T=S,S=e[T]),nt(i,T,re(S,t,r,T,e,a))}),i}function Ti(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Ai(e,t){return t.length<2?e:Lo(e,Ko(t,0,-1))}function Mi(e,t){return t=je(t,e),e=Ai(e,t),e==null||delete e[gt(Ti(t))]}function wi(e){return Zo(e)?void 0:e}var _i=1,ki=2,$i=4,_e=Do(function(e,t){var r={};if(e==null)return r;var n=!1;t=Qe(t,function(a){return a=je(a,e),n||(n=a.length>1),a}),dn(e,At(e),r),n&&(r=re(r,_i|ki|$i,wi));for(var o=t.length;o--;)Mi(r,t[o]);return r});const Et={dark:Boolean,cssVar:{type:Array,default:()=>[]},hashed:{type:Boolean,default:void 0},components:Object,token:Object},Pi=c.defineComponent({name:"ConfigProviderContainer",props:{...Oe(),...Et},setup(e,{slots:t}){const r=Fe(),n=de(),o=r?"."+r?.getPrefixCls():"",a=C.theme.useToken?.(),i=`.${$e({})}`,s=`.${$e({isPor:!0})}`,u=`${s}`,l=c.computed(()=>Tr(e.token?.layout||{},a?.token?.value)),d=c.computed(()=>B(a?.token?.value||{},_e(e.token||{},"layout"),{...Ar(),antCls:o,componentsCls:i,proComponentsCls:s,layout:l.value})),P=C.useCacheToken(a.theme,c.computed(()=>[d.value??{},a.token.value]),c.computed(()=>({salt:u,override:d.value}))),ne=c.computed(()=>P.value?.[0]),S=c.computed(()=>P.value?.[1]),T=c.computed(()=>({...B(n?.token?.value,a.token.value,{componentsCls:i,proComponentsCls:s,antCls:o,themeId:a.theme.value.id,layout:l.value}),...ne.value||{}})),Hi=c.computed(()=>!(e.hashed===!1||n?.hashed?.value===!1)),Nt=c.computed(()=>e.hashed===!1||n?.hashed?.value===!1?"":a?.hashId?.value?a?.hashId?.value:S.value),Ii=c.computed(()=>e.dark??n.dark?.value),Oi=c.computed(()=>{const q=_e(r||{},["locale","getPrefixCls","theme"]);for(const oe in q)q[oe]=ge(q[oe])?q[oe]:q[oe]?.value;return q}),Fi=c.computed(()=>({...r.theme?.value,hashId:Nt.value,hashed:!0}));return jr(c.toRef(e,"cssVar"),{token:T}),Sr({...n||{},token:T,dark:Ii,hashId:Nt,hashed:Hi,theme:c.computed(()=>a.theme?.value)}),()=>c.createVNode(C.ConfigProvider,c.mergeProps(Oi.value,{theme:Fi.value}),{default:()=>[t.default?.()]})}}),ke=c.defineComponent({name:"GProConfigProvider",props:{...Oe(),...Et},setup(e,{slots:t}){const r=Fe(),n=de(),o=c.computed(()=>e.dark??n?.dark?.value),a=()=>o.value?[e.theme?.algorithm,C.theme.darkAlgorithm].flat(1).filter(Boolean):e.theme?.algorithm;return()=>{const{locale:i,token:s,components:u,...l}=e;return c.createVNode(C.ConfigProvider,c.mergeProps(l,{locale:i||r?.locale?.value||ir,theme:{..._e(r?.theme?.value,["locale","theme"]),token:{...s},components:r?.theme?.value?.components??u,algorithm:a()}}),{default:()=>[c.createVNode(Pi,c.mergeProps(e,{token:s}),{default:()=>[t.default?.()]})]})}}});ke.install=e=>(e.component(ke.name,ke),e);const{provideContext:Ci}=Ye("theme-provider"),Bi=c.defineComponent({name:"ThemeContext",inheritAttrs:!1,props:{theme:{type:String},defaultTheme:{type:String,default:"system"},onChange:{type:Function},"onUpdate:theme":{type:Function},onChangeBase:{type:Function}},emits:["change","changeBase","update:theme"],slots:Object,setup(e,{slots:t,emit:r}){const n=document.querySelector("html"),o=c.ref(),a=c.ref(e.theme||e.defaultTheme||"system");c.watch(()=>e.theme,d=>{d&&(a.value=d)});const{system:i,store:s}=zt.useColorMode();c.watch(()=>i.value,()=>{u()},{immediate:!0}),c.watch(()=>o.value,d=>{d&&e.onChangeBase?.(d)},{immediate:!0}),c.watch(a,d=>{e.onChange?.(d),r("update:theme",d),u()});function u(){n&&(a.value==="system"?(o.value=i.value,n.setAttribute("data-theme",o.value)):(o.value=a.value,n.setAttribute("data-theme",a.value)),s.value=o.value)}function l(d){a.value=d,u()}return Ci({theme:a,resolvedTheme:o,isDark:c.computed(()=>o.value==="dark"),setTheme:l}),()=>t.default()}});p.ThemeContext=Bi,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
12
+ (function(t,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("@gx-design-vue/pro-provider"),require("@vueuse/core"),require("vue")):typeof define=="function"&&define.amd?define(["exports","@gx-design-vue/pro-provider","@vueuse/core","vue"],i):(t=typeof globalThis<"u"?globalThis:t||self,i(t.GContext={},t.proProvider,t.core,t.vue))})(this,(function(t,i,h,n){"use strict";const{provideContext:d,useInjectContext:y}=i.useContext("theme-provider"),c=n.defineComponent({name:"ThemeContext",inheritAttrs:!1,props:{theme:{type:String},defaultTheme:{type:String,default:"system"},onChange:{type:Function},"onUpdate:theme":{type:Function},onChangeBase:{type:Function}},emits:["change","changeBase","update:theme"],slots:Object,setup(s,{slots:f,emit:l}){const r=document.querySelector("html"),o=n.ref(),u=n.ref(s.theme||s.defaultTheme||"system");n.watch(()=>s.theme,e=>{e&&(u.value=e)});const{system:a,store:p}=h.useColorMode();n.watch(()=>a.value,()=>{m()},{immediate:!0}),n.watch(()=>o.value,e=>{e&&s.onChangeBase?.(e)},{immediate:!0}),n.watch(u,e=>{s.onChange?.(e),l("update:theme",e),m()});function m(){r&&(u.value==="system"?(o.value=a.value,r.setAttribute("data-theme",o.value)):(o.value=u.value,r.setAttribute("data-theme",u.value)),p.value=o.value)}function v(e){u.value=e,m()}return d({theme:u,resolvedTheme:o,isDark:n.computed(()=>o.value==="dark"),setTheme:v}),()=>f.default()}});t.ThemeContext=c,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gx-design-vue/context",
3
3
  "type": "module",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "description": "Gx Design context",
6
6
  "exports": {
7
7
  ".": {