jrs-react 1.2.24 → 1.2.25

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/build/index.js CHANGED
@@ -1,7 +1,5 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("styled-components"),r=require("react-dom/client");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var s=n(e),i=o(e),a=n(t);function l(e,t){return function(){return e.apply(t,arguments)}}const{toString:c}=Object.prototype,{getPrototypeOf:d}=Object,u=(h=Object.create(null),e=>{const t=c.call(e);return h[t]||(h[t]=t.slice(8,-1).toLowerCase())});var h;const p=e=>(e=e.toLowerCase(),t=>u(t)===e),f=e=>t=>typeof t===e,{isArray:m}=Array,g=f("undefined");const w=p("ArrayBuffer");const y=f("string"),b=f("function"),x=f("number"),v=e=>null!==e&&"object"==typeof e,E=e=>{if("object"!==u(e))return!1;const t=d(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},k=p("Date"),S=p("File"),R=p("Blob"),O=p("FileList"),C=p("URLSearchParams");function j(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),m(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(n=0;n<s;n++)i=o[n],t.call(null,e[i],i,e)}}function N(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const $="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,A=e=>!g(e)&&e!==$;const T=(V="undefined"!=typeof Uint8Array&&d(Uint8Array),e=>V&&e instanceof V);var V;const _=p("HTMLFormElement"),L=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),B=p("RegExp"),D=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};j(r,((r,o)=>{let s;!1!==(s=t(r,o,e))&&(n[o]=s||r)})),Object.defineProperties(e,n)},P="abcdefghijklmnopqrstuvwxyz",z="0123456789",F={DIGIT:z,ALPHA:P,ALPHA_DIGIT:P+P.toUpperCase()+z};const M=p("AsyncFunction");var U={isArray:m,isArrayBuffer:w,isBuffer:function(e){return null!==e&&!g(e)&&null!==e.constructor&&!g(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=u(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&w(e.buffer),t},isString:y,isNumber:x,isBoolean:e=>!0===e||!1===e,isObject:v,isPlainObject:E,isUndefined:g,isDate:k,isFile:S,isBlob:R,isRegExp:B,isFunction:b,isStream:e=>v(e)&&b(e.pipe),isURLSearchParams:C,isTypedArray:T,isFileList:O,forEach:j,merge:function e(){const{caseless:t}=A(this)&&this||{},r={},n=(n,o)=>{const s=t&&N(r,o)||o;E(r[s])&&E(n)?r[s]=e(r[s],n):E(n)?r[s]=e({},n):m(n)?r[s]=n.slice():r[s]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&j(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(j(t,((t,n)=>{r&&b(t)?e[n]=l(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,s,i;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],n&&!n(i,e,t)||a[i]||(t[i]=e[i],a[i]=!0);e=!1!==r&&d(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:u,kindOfTest:p,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!x(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:_,hasOwnProperty:L,hasOwnProp:L,reduceDescriptors:D,freezeMethods:e=>{D(e,((t,r)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];b(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return m(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:N,global:$,isContextDefined:A,ALPHABET:F,generateString:(e=16,t=F.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(v(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=m(e)?[]:{};return j(e,((e,t)=>{const s=r(e,n+1);!g(s)&&(o[t]=s)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:M,isThenable:e=>e&&(v(e)||b(e))&&b(e.then)&&b(e.catch)};function H(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}U.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:U.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const I=H.prototype,X={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{X[e]={value:e}})),Object.defineProperties(H,X),Object.defineProperty(I,"isAxiosError",{value:!0}),H.from=(e,t,r,n,o,s)=>{const i=Object.create(I);return U.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),H.call(i,e.message,t,r,n,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};function W(e){return U.isPlainObject(e)||U.isArray(e)}function q(e){return U.endsWith(e,"[]")?e.slice(0,-2):e}function J(e,t,r){return e?e.concat(t).map((function(e,t){return e=q(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const K=U.toFlatObject(U,{},null,(function(e){return/^is[A-Z]/.test(e)}));function G(e,t,r){if(!U.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=U.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!U.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,s=r.dots,i=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&U.isSpecCompliantForm(t);if(!U.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(U.isDate(e))return e.toISOString();if(!a&&U.isBlob(e))throw new H("Blob is not supported. Use a Buffer instead.");return U.isArrayBuffer(e)||U.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(U.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(U.isArray(e)&&function(e){return U.isArray(e)&&!e.some(W)}(e)||(U.isFileList(e)||U.endsWith(r,"[]"))&&(a=U.toArray(e)))return r=q(r),a.forEach((function(e,n){!U.isUndefined(e)&&null!==e&&t.append(!0===i?J([r],n,s):null===i?r:r+"[]",l(e))})),!1;return!!W(e)||(t.append(J(o,r,s),l(e)),!1)}const d=[],u=Object.assign(K,{defaultVisitor:c,convertValue:l,isVisitable:W});if(!U.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!U.isUndefined(r)){if(-1!==d.indexOf(r))throw Error("Circular reference detected in "+n.join("."));d.push(r),U.forEach(r,(function(r,s){!0===(!(U.isUndefined(r)||null===r)&&o.call(t,r,U.isString(s)?s.trim():s,n,u))&&e(r,n?n.concat(s):[s])})),d.pop()}}(e),t}function Y(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Q(e,t){this._pairs=[],e&&G(e,this,t)}const Z=Q.prototype;function ee(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function te(e,t,r){if(!t)return e;const n=r&&r.encode||ee,o=r&&r.serialize;let s;if(s=o?o(t,r):U.isURLSearchParams(t)?t.toString():new Q(t,r).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}Z.append=function(e,t){this._pairs.push([e,t])},Z.toString=function(e){const t=e?function(t){return e.call(this,t,Y)}:Y;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var re=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){U.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ne={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},oe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Q,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const se="undefined"!=typeof window&&"undefined"!=typeof document,ie=(ae="undefined"!=typeof navigator&&navigator.product,se&&["ReactNative","NativeScript","NS"].indexOf(ae)<0);var ae;const le="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ce={...Object.freeze({__proto__:null,hasBrowserEnv:se,hasStandardBrowserWebWorkerEnv:le,hasStandardBrowserEnv:ie}),...oe};function de(e){function t(e,r,n,o){let s=e[o++];const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&U.isArray(n)?n.length:s,a)return U.hasOwnProp(n,s)?n[s]=[n[s],r]:n[s]=r,!i;n[s]&&U.isObject(n[s])||(n[s]=[]);return t(e,r,n[s],o)&&U.isArray(n[s])&&(n[s]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}(n[s])),!i}if(U.isFormData(e)&&U.isFunction(e.entries)){const r={};return U.forEachEntry(e,((e,n)=>{t(function(e){return U.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const ue={transitional:ne,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=U.isObject(e);o&&U.isHTMLForm(e)&&(e=new FormData(e));if(U.isFormData(e))return n&&n?JSON.stringify(de(e)):e;if(U.isArrayBuffer(e)||U.isBuffer(e)||U.isStream(e)||U.isFile(e)||U.isBlob(e))return e;if(U.isArrayBufferView(e))return e.buffer;if(U.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return G(e,new ce.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ce.isNode&&U.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=U.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return G(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(U.isString(e))try{return(t||JSON.parse)(e),U.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ue.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&U.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw H.from(e,H.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ce.classes.FormData,Blob:ce.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};U.forEach(["delete","get","head","post","put","patch"],(e=>{ue.headers[e]={}}));var he=ue;const pe=U.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const fe=Symbol("internals");function me(e){return e&&String(e).trim().toLowerCase()}function ge(e){return!1===e||null==e?e:U.isArray(e)?e.map(ge):String(e)}function we(e,t,r,n,o){return U.isFunction(n)?n.call(this,t,r):(o&&(t=r),U.isString(t)?U.isString(n)?-1!==t.indexOf(n):U.isRegExp(n)?n.test(t):void 0:void 0)}class ye{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=me(t);if(!o)throw new Error("header name must be a non-empty string");const s=U.findKey(n,o);(!s||void 0===n[s]||!0===r||void 0===r&&!1!==n[s])&&(n[s||t]=ge(e))}const s=(e,t)=>U.forEach(e,((e,r)=>o(e,r,t)));return U.isPlainObject(e)||e instanceof this.constructor?s(e,t):U.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?s((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&pe[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&o(t,e,r),this}get(e,t){if(e=me(e)){const r=U.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(U.isFunction(t))return t.call(this,e,r);if(U.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=me(e)){const r=U.findKey(this,e);return!(!r||void 0===this[r]||t&&!we(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=me(e)){const o=U.findKey(r,e);!o||t&&!we(0,r[o],o,t)||(delete r[o],n=!0)}}return U.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!we(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return U.forEach(this,((n,o)=>{const s=U.findKey(r,o);if(s)return t[s]=ge(n),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();i!==o&&delete t[o],t[i]=ge(n),r[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return U.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&U.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[fe]=this[fe]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=me(e);t[n]||(!function(e,t){const r=U.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return U.isArray(e)?e.forEach(n):n(e),this}}ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),U.reduceDescriptors(ye.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),U.freezeMethods(ye);var be=ye;function xe(e,t){const r=this||he,n=t||r,o=be.from(n.headers);let s=n.data;return U.forEach(e,(function(e){s=e.call(r,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function ve(e){return!(!e||!e.__CANCEL__)}function Ee(e,t,r){H.call(this,null==e?"canceled":e,H.ERR_CANCELED,t,r),this.name="CanceledError"}U.inherits(Ee,H,{__CANCEL__:!0});var ke=ce.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const i=[e+"="+encodeURIComponent(t)];U.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),U.isString(n)&&i.push("path="+n),U.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Se(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Re=ce.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=U.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function Oe(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[i];o||(o=l),r[s]=a,n[s]=l;let d=i,u=0;for(;d!==s;)u+=r[d++],d%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o<t)return;const h=c&&l-c;return h?Math.round(1e3*u/h):void 0}}(50,250);return o=>{const s=o.loaded,i=o.lengthComputable?o.total:void 0,a=s-r,l=n(a);r=s;const c={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&s<=i?(i-s)/l:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const Ce={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const o=be.from(e.headers).normalize();let s,i,{responseType:a,withXSRFToken:l}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}if(U.isFormData(n))if(ce.hasStandardBrowserEnv||ce.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(i=o.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let d=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const u=Se(e.baseURL,e.url);function h(){if(!d)return;const n=be.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new H("Request failed with status code "+r.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),c()}),(function(e){r(e),c()}),{data:a&&"text"!==a&&"json"!==a?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:e,request:d}),d=null}if(d.open(e.method.toUpperCase(),te(u,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(h)},d.onabort=function(){d&&(r(new H("Request aborted",H.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new H("Network Error",H.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||ne;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new H(t,n.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,e,d)),d=null},ce.hasStandardBrowserEnv&&(l&&U.isFunction(l)&&(l=l(e)),l||!1!==l&&Re(u))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&ke.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in d&&U.forEach(o.toJSON(),(function(e,t){d.setRequestHeader(t,e)})),U.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),a&&"json"!==a&&(d.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",Oe(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",Oe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{d&&(r(!t||t.type?new Ee(null,e,d):t),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);p&&-1===ce.protocols.indexOf(p)?r(new H("Unsupported protocol "+p+":",H.ERR_BAD_REQUEST,e)):d.send(n||null)}))}};U.forEach(Ce,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const je=e=>`- ${e}`,Ne=e=>U.isFunction(e)||null===e||!1===e;var $e=e=>{e=U.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let s=0;s<t;s++){let t;if(r=e[s],n=r,!Ne(r)&&(n=Ce[(t=String(r)).toLowerCase()],void 0===n))throw new H(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+s]=n}if(!n){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new H("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(je).join("\n"):" "+je(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Ae(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ee(null,e)}function Te(e){Ae(e),e.headers=be.from(e.headers),e.data=xe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return $e(e.adapter||he.adapter)(e).then((function(t){return Ae(e),t.data=xe.call(e,e.transformResponse,t),t.headers=be.from(t.headers),t}),(function(t){return ve(t)||(Ae(e),t&&t.response&&(t.response.data=xe.call(e,e.transformResponse,t.response),t.response.headers=be.from(t.response.headers))),Promise.reject(t)}))}const Ve=e=>e instanceof be?e.toJSON():e;function _e(e,t){t=t||{};const r={};function n(e,t,r){return U.isPlainObject(e)&&U.isPlainObject(t)?U.merge.call({caseless:r},e,t):U.isPlainObject(t)?U.merge({},t):U.isArray(t)?t.slice():t}function o(e,t,r){return U.isUndefined(t)?U.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function s(e,t){if(!U.isUndefined(t))return n(void 0,t)}function i(e,t){return U.isUndefined(t)?U.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,s){return s in t?n(r,o):s in e?n(void 0,r):void 0}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t)=>o(Ve(e),Ve(t),!0)};return U.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=l[n]||o,i=s(e[n],t[n],n);U.isUndefined(i)&&s!==a||(r[n]=i)})),r}const Le="1.6.2",Be={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Be[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const De={};Be.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,s)=>{if(!1===e)throw new H(n(o," has been removed"+(t?" in "+t:"")),H.ERR_DEPRECATED);return t&&!De[o]&&(De[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,s)}};var Pe={assertOptions:function(e,t,r){if("object"!=typeof e)throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],i=t[s];if(i){const t=e[s],r=void 0===t||i(t,s,e);if(!0!==r)throw new H("option "+s+" must be "+r,H.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new H("Unknown option "+s,H.ERR_BAD_OPTION)}},validators:Be};const ze=Pe.validators;class Fe{constructor(e){this.defaults=e,this.interceptors={request:new re,response:new re}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=_e(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Pe.assertOptions(r,{silentJSONParsing:ze.transitional(ze.boolean),forcedJSONParsing:ze.transitional(ze.boolean),clarifyTimeoutError:ze.transitional(ze.boolean)},!1),null!=n&&(U.isFunction(n)?t.paramsSerializer={serialize:n}:Pe.assertOptions(n,{encode:ze.function,serialize:ze.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&U.merge(o.common,o[t.method]);o&&U.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=be.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[Te.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,l),d=e.length,c=Promise.resolve(t);u<d;)c=c.then(e[u++],e[u++]);return c}d=i.length;let h=t;for(u=0;u<d;){const e=i[u++],t=i[u++];try{h=e(h)}catch(e){t.call(this,e);break}}try{c=Te.call(this,h)}catch(e){return Promise.reject(e)}for(u=0,d=l.length;u<d;)c=c.then(l[u++],l[u++]);return c}getUri(e){return te(Se((e=_e(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}U.forEach(["delete","get","head","options"],(function(e){Fe.prototype[e]=function(t,r){return this.request(_e(r||{},{method:e,url:t,data:(r||{}).data}))}})),U.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(_e(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Fe.prototype[e]=t(),Fe.prototype[e+"Form"]=t(!0)}));var Me=Fe;class Ue{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new Ee(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Ue((function(t){e=t})),cancel:e}}}var He=Ue;const Ie={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ie).forEach((([e,t])=>{Ie[t]=e}));var Xe=Ie;const We=function e(t){const r=new Me(t),n=l(Me.prototype.request,r);return U.extend(n,Me.prototype,r,{allOwnKeys:!0}),U.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(_e(t,r))},n}(he);We.Axios=Me,We.CanceledError=Ee,We.CancelToken=He,We.isCancel=ve,We.VERSION=Le,We.toFormData=G,We.AxiosError=H,We.Cancel=We.CanceledError,We.all=function(e){return Promise.all(e)},We.spread=function(e){return function(t){return e.apply(null,t)}},We.isAxiosError=function(e){return U.isObject(e)&&!0===e.isAxiosError},We.mergeConfig=_e,We.AxiosHeaders=be,We.formToJSON=e=>de(U.isHTMLForm(e)?new FormData(e):e),We.getAdapter=$e,We.HttpStatusCode=Xe,We.default=We;var qe=We;const Je=console.debug,Ke=(e,t)=>{const r="function"==typeof t.get?(e,t)=>e?.get(t.slice(1))??t:(e,t)=>e?.[t.slice(1)]??t;return Array.from(e.match(/\:\w+/g)??[]).reduce(((e,n)=>e.replace(new RegExp(n,"g"),r(t,n))),e)},Ge=(e,t,r,n)=>"function"==typeof e?e?.bind(t)(r):e??n;class Ye{isJRHTML=!0;_hijos=[];_padre;_madre;_yo;constructor(e){var{yo:t,padre:r,madre:n,clases:o,personajes:s={},...e}=e;this.yo=t,r?(this.padre=r,this.madre=r.yo):n&&(this.madre=n),o&&(s.class=o.join(" ")),e.personajes=s,Object.assign(this,e),this._init()}_init(){}set style(e){Object.entries(e).forEach(((e,t)=>{this._yo.style[e[0]]=e[1]}))}set personajes(e){Object.entries(e).forEach((([e,t])=>{this._yo.setAttribute(e,t)}))}agregarHijo(e){return e.isJRHTML?(e.padre=this,e.madre=this.yo):e.yo?(e.padre=this,e=e.yo.name?new e.yo(e):new Ye(e)):this.yo.appendChild(document.createTextNode(e)),e}set html(e){this._yo.innerHTML=e}get html(){return this._yo.innerHTML}set hijos(e){e.forEach(((e,t)=>{this.agregarHijo(e)}))}get hijos(){return this._hijos}removeAllHijos(){this.hijos.forEach((e=>{e.yo.remove()})),delete this.hijos,this.hijos=[]}removeHijo(e){var t=this.hijos.indexOf(e);t>=0&&(this.yo.removeChild(this.yo.childNodes[t]),this.hijos.splice(t,1))}nacido(e){return document.createElement(e)}set yo(e){this._yo="string"==typeof e?this.nacido(e):e}get yo(){return this._yo}set padre(e){this._padre=e,this._padre&&this._padre._hijos.push(this)}get padre(){return this._padre}set madre(e){this._madre="string"==typeof e?document.getElementById(e):e,this._madre&&this._yo&&this._madre.appendChild(this._yo)}get madre(){return this._madre}set listeners(e){Object.entries(e).forEach((([e,t])=>{var r=this;"listeners"==e?this.listeners=t:this._yo.addEventListener(e,(function(e){t(e,r)}),!1)}))}get width(){return this._yo.clientWidth}set width(e){this._yo.style.width=e}get height(){return this._yo.clientHeight}set height(e){this._yo.style.height=e}set textContent(e){this._yo.textContent=e}set color(e){this.yo.style.color=e,this._color=e}get color(){return this._color}set visibility(e){this.yo.style.visibility=e}set tip(e){this.agregarHijo({yo:"span",clases:["tooltiptext"],textContent:e})}}const Qe=a.default.dialog`
2
-
3
-
4
- display:none;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("styled-components"),r=require("react-dom/client");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var s=n(e),i=o(e),a=n(t);function l(e,t){return function(){return e.apply(t,arguments)}}const{toString:c}=Object.prototype,{getPrototypeOf:d}=Object,u=(h=Object.create(null),e=>{const t=c.call(e);return h[t]||(h[t]=t.slice(8,-1).toLowerCase())});var h;const p=e=>(e=e.toLowerCase(),t=>u(t)===e),f=e=>t=>typeof t===e,{isArray:m}=Array,g=f("undefined");const w=p("ArrayBuffer");const y=f("string"),b=f("function"),x=f("number"),v=e=>null!==e&&"object"==typeof e,E=e=>{if("object"!==u(e))return!1;const t=d(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},k=p("Date"),S=p("File"),R=p("Blob"),O=p("FileList"),C=p("URLSearchParams");function j(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),m(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(n=0;n<s;n++)i=o[n],t.call(null,e[i],i,e)}}function N(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const $="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,A=e=>!g(e)&&e!==$;const T=(V="undefined"!=typeof Uint8Array&&d(Uint8Array),e=>V&&e instanceof V);var V;const _=p("HTMLFormElement"),L=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),B=p("RegExp"),D=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};j(r,((r,o)=>{let s;!1!==(s=t(r,o,e))&&(n[o]=s||r)})),Object.defineProperties(e,n)},P="abcdefghijklmnopqrstuvwxyz",z="0123456789",F={DIGIT:z,ALPHA:P,ALPHA_DIGIT:P+P.toUpperCase()+z};const M=p("AsyncFunction");var U={isArray:m,isArrayBuffer:w,isBuffer:function(e){return null!==e&&!g(e)&&null!==e.constructor&&!g(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=u(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&w(e.buffer),t},isString:y,isNumber:x,isBoolean:e=>!0===e||!1===e,isObject:v,isPlainObject:E,isUndefined:g,isDate:k,isFile:S,isBlob:R,isRegExp:B,isFunction:b,isStream:e=>v(e)&&b(e.pipe),isURLSearchParams:C,isTypedArray:T,isFileList:O,forEach:j,merge:function e(){const{caseless:t}=A(this)&&this||{},r={},n=(n,o)=>{const s=t&&N(r,o)||o;E(r[s])&&E(n)?r[s]=e(r[s],n):E(n)?r[s]=e({},n):m(n)?r[s]=n.slice():r[s]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&j(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(j(t,((t,n)=>{r&&b(t)?e[n]=l(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,s,i;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],n&&!n(i,e,t)||a[i]||(t[i]=e[i],a[i]=!0);e=!1!==r&&d(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:u,kindOfTest:p,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!x(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:_,hasOwnProperty:L,hasOwnProp:L,reduceDescriptors:D,freezeMethods:e=>{D(e,((t,r)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];b(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return m(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:N,global:$,isContextDefined:A,ALPHABET:F,generateString:(e=16,t=F.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(v(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=m(e)?[]:{};return j(e,((e,t)=>{const s=r(e,n+1);!g(s)&&(o[t]=s)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:M,isThenable:e=>e&&(v(e)||b(e))&&b(e.then)&&b(e.catch)};function I(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}U.inherits(I,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:U.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const H=I.prototype,X={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{X[e]={value:e}})),Object.defineProperties(I,X),Object.defineProperty(H,"isAxiosError",{value:!0}),I.from=(e,t,r,n,o,s)=>{const i=Object.create(H);return U.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),I.call(i,e.message,t,r,n,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};function W(e){return U.isPlainObject(e)||U.isArray(e)}function q(e){return U.endsWith(e,"[]")?e.slice(0,-2):e}function J(e,t,r){return e?e.concat(t).map((function(e,t){return e=q(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const K=U.toFlatObject(U,{},null,(function(e){return/^is[A-Z]/.test(e)}));function G(e,t,r){if(!U.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=U.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!U.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,s=r.dots,i=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&U.isSpecCompliantForm(t);if(!U.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(U.isDate(e))return e.toISOString();if(!a&&U.isBlob(e))throw new I("Blob is not supported. Use a Buffer instead.");return U.isArrayBuffer(e)||U.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(U.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(U.isArray(e)&&function(e){return U.isArray(e)&&!e.some(W)}(e)||(U.isFileList(e)||U.endsWith(r,"[]"))&&(a=U.toArray(e)))return r=q(r),a.forEach((function(e,n){!U.isUndefined(e)&&null!==e&&t.append(!0===i?J([r],n,s):null===i?r:r+"[]",l(e))})),!1;return!!W(e)||(t.append(J(o,r,s),l(e)),!1)}const d=[],u=Object.assign(K,{defaultVisitor:c,convertValue:l,isVisitable:W});if(!U.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!U.isUndefined(r)){if(-1!==d.indexOf(r))throw Error("Circular reference detected in "+n.join("."));d.push(r),U.forEach(r,(function(r,s){!0===(!(U.isUndefined(r)||null===r)&&o.call(t,r,U.isString(s)?s.trim():s,n,u))&&e(r,n?n.concat(s):[s])})),d.pop()}}(e),t}function Y(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Q(e,t){this._pairs=[],e&&G(e,this,t)}const Z=Q.prototype;function ee(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function te(e,t,r){if(!t)return e;const n=r&&r.encode||ee,o=r&&r.serialize;let s;if(s=o?o(t,r):U.isURLSearchParams(t)?t.toString():new Q(t,r).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}Z.append=function(e,t){this._pairs.push([e,t])},Z.toString=function(e){const t=e?function(t){return e.call(this,t,Y)}:Y;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var re=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){U.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ne={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},oe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Q,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const se="undefined"!=typeof window&&"undefined"!=typeof document,ie=(ae="undefined"!=typeof navigator&&navigator.product,se&&["ReactNative","NativeScript","NS"].indexOf(ae)<0);var ae;const le="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ce={...Object.freeze({__proto__:null,hasBrowserEnv:se,hasStandardBrowserWebWorkerEnv:le,hasStandardBrowserEnv:ie}),...oe};function de(e){function t(e,r,n,o){let s=e[o++];const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&U.isArray(n)?n.length:s,a)return U.hasOwnProp(n,s)?n[s]=[n[s],r]:n[s]=r,!i;n[s]&&U.isObject(n[s])||(n[s]=[]);return t(e,r,n[s],o)&&U.isArray(n[s])&&(n[s]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}(n[s])),!i}if(U.isFormData(e)&&U.isFunction(e.entries)){const r={};return U.forEachEntry(e,((e,n)=>{t(function(e){return U.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const ue={transitional:ne,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=U.isObject(e);o&&U.isHTMLForm(e)&&(e=new FormData(e));if(U.isFormData(e))return n&&n?JSON.stringify(de(e)):e;if(U.isArrayBuffer(e)||U.isBuffer(e)||U.isStream(e)||U.isFile(e)||U.isBlob(e))return e;if(U.isArrayBufferView(e))return e.buffer;if(U.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return G(e,new ce.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ce.isNode&&U.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=U.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return G(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(U.isString(e))try{return(t||JSON.parse)(e),U.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ue.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&U.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw I.from(e,I.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ce.classes.FormData,Blob:ce.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};U.forEach(["delete","get","head","post","put","patch"],(e=>{ue.headers[e]={}}));var he=ue;const pe=U.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const fe=Symbol("internals");function me(e){return e&&String(e).trim().toLowerCase()}function ge(e){return!1===e||null==e?e:U.isArray(e)?e.map(ge):String(e)}function we(e,t,r,n,o){return U.isFunction(n)?n.call(this,t,r):(o&&(t=r),U.isString(t)?U.isString(n)?-1!==t.indexOf(n):U.isRegExp(n)?n.test(t):void 0:void 0)}class ye{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=me(t);if(!o)throw new Error("header name must be a non-empty string");const s=U.findKey(n,o);(!s||void 0===n[s]||!0===r||void 0===r&&!1!==n[s])&&(n[s||t]=ge(e))}const s=(e,t)=>U.forEach(e,((e,r)=>o(e,r,t)));return U.isPlainObject(e)||e instanceof this.constructor?s(e,t):U.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?s((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&pe[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&o(t,e,r),this}get(e,t){if(e=me(e)){const r=U.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(U.isFunction(t))return t.call(this,e,r);if(U.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=me(e)){const r=U.findKey(this,e);return!(!r||void 0===this[r]||t&&!we(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=me(e)){const o=U.findKey(r,e);!o||t&&!we(0,r[o],o,t)||(delete r[o],n=!0)}}return U.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!we(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return U.forEach(this,((n,o)=>{const s=U.findKey(r,o);if(s)return t[s]=ge(n),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();i!==o&&delete t[o],t[i]=ge(n),r[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return U.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&U.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[fe]=this[fe]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=me(e);t[n]||(!function(e,t){const r=U.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return U.isArray(e)?e.forEach(n):n(e),this}}ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),U.reduceDescriptors(ye.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),U.freezeMethods(ye);var be=ye;function xe(e,t){const r=this||he,n=t||r,o=be.from(n.headers);let s=n.data;return U.forEach(e,(function(e){s=e.call(r,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function ve(e){return!(!e||!e.__CANCEL__)}function Ee(e,t,r){I.call(this,null==e?"canceled":e,I.ERR_CANCELED,t,r),this.name="CanceledError"}U.inherits(Ee,I,{__CANCEL__:!0});var ke=ce.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const i=[e+"="+encodeURIComponent(t)];U.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),U.isString(n)&&i.push("path="+n),U.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Se(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Re=ce.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=U.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function Oe(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[i];o||(o=l),r[s]=a,n[s]=l;let d=i,u=0;for(;d!==s;)u+=r[d++],d%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o<t)return;const h=c&&l-c;return h?Math.round(1e3*u/h):void 0}}(50,250);return o=>{const s=o.loaded,i=o.lengthComputable?o.total:void 0,a=s-r,l=n(a);r=s;const c={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&s<=i?(i-s)/l:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const Ce={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const o=be.from(e.headers).normalize();let s,i,{responseType:a,withXSRFToken:l}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}if(U.isFormData(n))if(ce.hasStandardBrowserEnv||ce.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(i=o.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let d=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const u=Se(e.baseURL,e.url);function h(){if(!d)return;const n=be.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new I("Request failed with status code "+r.status,[I.ERR_BAD_REQUEST,I.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),c()}),(function(e){r(e),c()}),{data:a&&"text"!==a&&"json"!==a?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:e,request:d}),d=null}if(d.open(e.method.toUpperCase(),te(u,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(h)},d.onabort=function(){d&&(r(new I("Request aborted",I.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new I("Network Error",I.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||ne;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new I(t,n.clarifyTimeoutError?I.ETIMEDOUT:I.ECONNABORTED,e,d)),d=null},ce.hasStandardBrowserEnv&&(l&&U.isFunction(l)&&(l=l(e)),l||!1!==l&&Re(u))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&ke.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in d&&U.forEach(o.toJSON(),(function(e,t){d.setRequestHeader(t,e)})),U.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),a&&"json"!==a&&(d.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",Oe(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",Oe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{d&&(r(!t||t.type?new Ee(null,e,d):t),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);p&&-1===ce.protocols.indexOf(p)?r(new I("Unsupported protocol "+p+":",I.ERR_BAD_REQUEST,e)):d.send(n||null)}))}};U.forEach(Ce,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const je=e=>`- ${e}`,Ne=e=>U.isFunction(e)||null===e||!1===e;var $e=e=>{e=U.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let s=0;s<t;s++){let t;if(r=e[s],n=r,!Ne(r)&&(n=Ce[(t=String(r)).toLowerCase()],void 0===n))throw new I(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+s]=n}if(!n){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new I("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(je).join("\n"):" "+je(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Ae(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ee(null,e)}function Te(e){Ae(e),e.headers=be.from(e.headers),e.data=xe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return $e(e.adapter||he.adapter)(e).then((function(t){return Ae(e),t.data=xe.call(e,e.transformResponse,t),t.headers=be.from(t.headers),t}),(function(t){return ve(t)||(Ae(e),t&&t.response&&(t.response.data=xe.call(e,e.transformResponse,t.response),t.response.headers=be.from(t.response.headers))),Promise.reject(t)}))}const Ve=e=>e instanceof be?e.toJSON():e;function _e(e,t){t=t||{};const r={};function n(e,t,r){return U.isPlainObject(e)&&U.isPlainObject(t)?U.merge.call({caseless:r},e,t):U.isPlainObject(t)?U.merge({},t):U.isArray(t)?t.slice():t}function o(e,t,r){return U.isUndefined(t)?U.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function s(e,t){if(!U.isUndefined(t))return n(void 0,t)}function i(e,t){return U.isUndefined(t)?U.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,s){return s in t?n(r,o):s in e?n(void 0,r):void 0}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t)=>o(Ve(e),Ve(t),!0)};return U.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=l[n]||o,i=s(e[n],t[n],n);U.isUndefined(i)&&s!==a||(r[n]=i)})),r}const Le="1.6.2",Be={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Be[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const De={};Be.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,s)=>{if(!1===e)throw new I(n(o," has been removed"+(t?" in "+t:"")),I.ERR_DEPRECATED);return t&&!De[o]&&(De[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,s)}};var Pe={assertOptions:function(e,t,r){if("object"!=typeof e)throw new I("options must be an object",I.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],i=t[s];if(i){const t=e[s],r=void 0===t||i(t,s,e);if(!0!==r)throw new I("option "+s+" must be "+r,I.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new I("Unknown option "+s,I.ERR_BAD_OPTION)}},validators:Be};const ze=Pe.validators;class Fe{constructor(e){this.defaults=e,this.interceptors={request:new re,response:new re}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=_e(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Pe.assertOptions(r,{silentJSONParsing:ze.transitional(ze.boolean),forcedJSONParsing:ze.transitional(ze.boolean),clarifyTimeoutError:ze.transitional(ze.boolean)},!1),null!=n&&(U.isFunction(n)?t.paramsSerializer={serialize:n}:Pe.assertOptions(n,{encode:ze.function,serialize:ze.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&U.merge(o.common,o[t.method]);o&&U.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=be.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[Te.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,l),d=e.length,c=Promise.resolve(t);u<d;)c=c.then(e[u++],e[u++]);return c}d=i.length;let h=t;for(u=0;u<d;){const e=i[u++],t=i[u++];try{h=e(h)}catch(e){t.call(this,e);break}}try{c=Te.call(this,h)}catch(e){return Promise.reject(e)}for(u=0,d=l.length;u<d;)c=c.then(l[u++],l[u++]);return c}getUri(e){return te(Se((e=_e(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}U.forEach(["delete","get","head","options"],(function(e){Fe.prototype[e]=function(t,r){return this.request(_e(r||{},{method:e,url:t,data:(r||{}).data}))}})),U.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(_e(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Fe.prototype[e]=t(),Fe.prototype[e+"Form"]=t(!0)}));var Me=Fe;class Ue{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new Ee(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Ue((function(t){e=t})),cancel:e}}}var Ie=Ue;const He={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(He).forEach((([e,t])=>{He[t]=e}));var Xe=He;const We=function e(t){const r=new Me(t),n=l(Me.prototype.request,r);return U.extend(n,Me.prototype,r,{allOwnKeys:!0}),U.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(_e(t,r))},n}(he);We.Axios=Me,We.CanceledError=Ee,We.CancelToken=Ie,We.isCancel=ve,We.VERSION=Le,We.toFormData=G,We.AxiosError=I,We.Cancel=We.CanceledError,We.all=function(e){return Promise.all(e)},We.spread=function(e){return function(t){return e.apply(null,t)}},We.isAxiosError=function(e){return U.isObject(e)&&!0===e.isAxiosError},We.mergeConfig=_e,We.AxiosHeaders=be,We.formToJSON=e=>de(U.isHTMLForm(e)?new FormData(e):e),We.getAdapter=$e,We.HttpStatusCode=Xe,We.default=We;var qe=We;const Je=console.debug,Ke=(e,t)=>{const r="function"==typeof t.get?(e,t)=>e?.get(t.slice(1))??t:(e,t)=>e?.[t.slice(1)]??t;return Array.from(e.match(/\:\w+/g)??[]).reduce(((e,n)=>e.replace(new RegExp(n,"g"),r(t,n))),e)},Ge=(e,t,r,n)=>"function"==typeof e?e?.bind(t)(r):e??n;function Ye(e=100,t=0){return Math.floor(Math.random()*(e+1-t))+t}class Qe{isJRHTML=!0;_hijos=[];_padre;_madre;_yo;constructor(e){var{yo:t,padre:r,madre:n,clases:o,personajes:s={},...e}=e;this.yo=t,r?(this.padre=r,this.madre=r.yo):n&&(this.madre=n),o&&(s.class=o.join(" ")),e.personajes=s,Object.assign(this,e),this._init()}_init(){}set style(e){Object.entries(e).forEach(((e,t)=>{this._yo.style[e[0]]=e[1]}))}set personajes(e){Object.entries(e).forEach((([e,t])=>{this._yo.setAttribute(e,t)}))}agregarHijo(e){return e.isJRHTML?(e.padre=this,e.madre=this.yo):e.yo?(e.padre=this,e=e.yo.name?new e.yo(e):new Qe(e)):this.yo.appendChild(document.createTextNode(e)),e}set html(e){this._yo.innerHTML=e}get html(){return this._yo.innerHTML}set hijos(e){e.forEach(((e,t)=>{this.agregarHijo(e)}))}get hijos(){return this._hijos}removeAllHijos(){this.hijos.forEach((e=>{e.yo.remove()})),delete this.hijos,this.hijos=[]}removeHijo(e){var t=this.hijos.indexOf(e);t>=0&&(this.yo.removeChild(this.yo.childNodes[t]),this.hijos.splice(t,1))}nacido(e){return document.createElement(e)}set yo(e){this._yo="string"==typeof e?this.nacido(e):e}get yo(){return this._yo}set padre(e){this._padre=e,this._padre&&this._padre._hijos.push(this)}get padre(){return this._padre}set madre(e){this._madre="string"==typeof e?document.getElementById(e):e,this._madre&&this._yo&&this._madre.appendChild(this._yo)}get madre(){return this._madre}set listeners(e){Object.entries(e).forEach((([e,t])=>{var r=this;"listeners"==e?this.listeners=t:this._yo.addEventListener(e,(function(e){t(e,r)}),!1)}))}get width(){return this._yo.clientWidth}set width(e){this._yo.style.width=e}get height(){return this._yo.clientHeight}set height(e){this._yo.style.height=e}set textContent(e){this._yo.textContent=e}set color(e){this.yo.style.color=e,this._color=e}get color(){return this._color}set visibility(e){this.yo.style.visibility=e}set tip(e){this.agregarHijo({yo:"span",clases:["tooltiptext"],textContent:e})}}const Ze=`\n display:none;\n #jr-mask-msg{\n padding: 10px;\n }\n user-select: none;\n cursor: wait;\n background-color: #000000aa;\n color: ${({theme:e})=>e?.colorPrimary??"whilte"};\n flex-direction: column;\n justify-content: center;\n align-items: center;\n position: fixed;\n\n z-index: 20000;\n overflow: hidden;\n \n .cs-loader-inner {\n\t\ttransform: translateY(-30%);\n\t\twidth: calc(100% - 200xpx);\n \n\t}\n\n animation: opc .4s ;\n @keyframes opc {\n 0% {opacity: 0;background: transparent;visibility:hidden;}\n 20% {opacity: 1;background: #000000aa; visibility: visible;}\n }\n\n\t.cs-loader-inner label {\n\t\tfont-size: 20px;\n\t\topacity: 0;\n\t\tdisplay:inline-block;\n\t}\n\n @keyframes lol {\n 0% {\n opacity: 0;\n transform: translateX(-300px);\n }\n 33% {\n opacity: 1;\n transform: translateX(0px);\n }\n 66% {\n opacity: 1;\n transform: translateX(0px);\n }\n 100% {\n opacity: 0;\n transform: translateX(300px);\n }\n }\n\n @-webkit-keyframes lol {\n 0% {\n opacity: 0;\n -webkit-transform: translateX(-300px);\n }\n 33% {\n opacity: 1;\n -webkit-transform: translateX(0px);\n }\n 66% {\n opacity: 1;\n -webkit-transform: translateX(0px);\n }\n 100% {\n opacity: 0;\n -webkit-transform: translateX(300px);\n }\n }\n\n .cs-loader-inner label:nth-child(6) {\n -webkit-animation: lol 3s infinite ease-in-out;\n animation: lol 3s infinite ease-in-out;\n }\n\n .cs-loader-inner label:nth-child(5) {\n -webkit-animation: lol 3s 100ms infinite ease-in-out;\n animation: lol 3s 100ms infinite ease-in-out;\n }\n\n .cs-loader-inner label:nth-child(4) {\n -webkit-animation: lol 3s 200ms infinite ease-in-out;\n animation: lol 3s 200ms infinite ease-in-out;\n }\n\n .cs-loader-inner label:nth-child(3) {\n -webkit-animation: lol 3s 300ms infinite ease-in-out;\n animation: lol 3s 300ms infinite ease-in-out;\n }\n\n .cs-loader-inner label:nth-child(2) {\n -webkit-animation: lol 3s 400ms infinite ease-in-out;\n animation: lol 3s 400ms infinite ease-in-out;\n }\n\n .cs-loader-inner label:nth-child(1) {\n -webkit-animation: lol 3s 500ms infinite ease-in-out;\n animation: lol 3s 500ms infinite ease-in-out;\n }\n`,et=a.default.dialog`
2
+ ${Ze}
5
3
  &:open{
6
4
  display:flex;
7
5
  }
@@ -11,120 +9,26 @@
11
9
  background-color: #000000aa;
12
10
  }
13
11
 
14
- #jr-mask-msg{
15
- padding: 10px;
16
- }
17
-
18
12
  max-width: 100vw;
19
13
  max-height: 100vh;
20
-
21
14
  width: 100vw;
22
15
  height: 100vh;
23
-
24
16
  border:0;
25
17
  margin: 0;
26
18
  top: 0;
27
19
  left: 0;
28
- color: ${({theme:e})=>e?.colorPrimary??"whilte"};
29
- user-select: none;
30
- cursor: wait;
31
- flex-direction: column;
32
- justify-content: center;
33
- align-items: center;
34
- position: fixed;
35
-
36
- z-index: 20000;
37
- overflow: hidden;
38
-
39
- .cs-loader-inner {
40
- transform: translateY(-30%);
41
- width: calc(100% - 200xpx);
42
-
43
- }
44
20
 
45
-
46
- animation: opc .4s ;
47
- @keyframes opc {
48
- 0% {opacity: 0;background: transparent;visibility:hidden;}
49
- 20% {opacity: 1;background: #000000aa; visibility: visible;}
50
- }
51
-
52
- .cs-loader-inner label {
53
- font-size: 20px;
54
- opacity: 0;
55
- display:inline-block;
56
- }
57
-
58
- @keyframes lol {
59
- 0% {
60
- opacity: 0;
61
- transform: translateX(-300px);
62
- }
63
- 33% {
64
- opacity: 1;
65
- transform: translateX(0px);
66
- }
67
- 66% {
68
- opacity: 1;
69
- transform: translateX(0px);
70
- }
71
- 100% {
72
- opacity: 0;
73
- transform: translateX(300px);
74
- }
75
- }
76
-
77
- @-webkit-keyframes lol {
78
- 0% {
79
- opacity: 0;
80
- -webkit-transform: translateX(-300px);
81
- }
82
- 33% {
83
- opacity: 1;
84
- -webkit-transform: translateX(0px);
85
- }
86
- 66% {
87
- opacity: 1;
88
- -webkit-transform: translateX(0px);
89
- }
90
- 100% {
91
- opacity: 0;
92
- -webkit-transform: translateX(300px);
93
- }
94
- }
95
-
96
- .cs-loader-inner label:nth-child(6) {
97
- -webkit-animation: lol 3s infinite ease-in-out;
98
- animation: lol 3s infinite ease-in-out;
99
- }
100
-
101
- .cs-loader-inner label:nth-child(5) {
102
- -webkit-animation: lol 3s 100ms infinite ease-in-out;
103
- animation: lol 3s 100ms infinite ease-in-out;
104
- }
105
-
106
- .cs-loader-inner label:nth-child(4) {
107
- -webkit-animation: lol 3s 200ms infinite ease-in-out;
108
- animation: lol 3s 200ms infinite ease-in-out;
109
- }
110
-
111
- .cs-loader-inner label:nth-child(3) {
112
- -webkit-animation: lol 3s 300ms infinite ease-in-out;
113
- animation: lol 3s 300ms infinite ease-in-out;
114
- }
115
-
116
- .cs-loader-inner label:nth-child(2) {
117
- -webkit-animation: lol 3s 400ms infinite ease-in-out;
118
- animation: lol 3s 400ms infinite ease-in-out;
119
- }
120
-
121
- .cs-loader-inner label:nth-child(1) {
122
- -webkit-animation: lol 3s 500ms infinite ease-in-out;
123
- animation: lol 3s 500ms infinite ease-in-out;
124
- }
125
- `;class Ze extends Ye{msg=[];#e=0;#t;get msgIndex(){return this.#e++}addMsg(e){const t=this.msgIndex;return this.msg.push({i:t,msg:e}),this.renderMsg(),()=>{Je("remove function",t),this.removeMsg(t)}}removeMsg(e){this.msg=this.msg.filter((t=>t.i!=e)),this.renderMsg()}renderMsg(){this.msgDiv.removeAllHijos(),this.msg.length?(this.msgDiv.html=this.msg[this.msg.length-1].msg,this.yo.open||this.yo.showModal()):this.yo.close()}}function et(e,t,r){const n=document.getElementById("jr-mask"),o=document.getElementById("jr-mask-msg");if(n&&o)return n.maskDiv||(n.maskDiv=new Ze({yo:n,msgDiv:new Ye({yo:o}),listeners:{keydown(e){"Escape"===e.key&&e.preventDefault()}}})),n.maskDiv.addMsg(e)}const tt=qe.create({authorization:`Bearer ${localStorage.getItem("accessToken")}`,timeout:12e4,maxBodyLength:104857600,maxContentLength:104857600});a.default.div`
21
+ `;a.default.div`
22
+ ${Ze}
23
+ width:100%;
24
+ height:100%;
25
+ position: absolute;
26
+ top: 0;
27
+ left: 0;
28
+ `;class tt extends Qe{msg=[];#e=0;#t;get msgIndex(){return this.#e++}addMsg(e){const t=this.msgIndex;return this.msg.push({i:t,msg:!0!==e?e:null}),this.renderMsg(),()=>{this.removeMsg(t)}}removeMsg(e){this.msg=this.msg.filter((t=>t.i!=e)),this.renderMsg()}renderMsg(){this.msgDiv?.removeAllHijos(),this.msg.length?(this.msgDiv&&(this.msgDiv.html=this.msg[this.msg.length-1].msg),this.run()):this.stop()}run=()=>{this.yo.showModal?.()??this.display()};display(){this.yo.style.display="flex"}stop(){this.yo.close?.()??this.hide()}hide(){this.yo.style.display="none"}}function rt(e,t="jr-mask"){const r=document.getElementById(t);if(r){const n=document.getElementById(`${t}-msg`);return r.maskDiv||(r.maskDiv=new tt({yo:r,msgDiv:n?new Qe({yo:n}):null,listeners:{keydown(e){"Escape"===e.key&&e.preventDefault()}}})),r.maskDiv.addMsg(e)}}const nt=qe.create({authorization:`Bearer ${localStorage.getItem("accessToken")}`,timeout:12e4,maxBodyLength:104857600,maxContentLength:104857600});a.default.div`
126
29
  border:2px solid red;
127
- `;class rt extends s.default.Component{#r=["get","post","put","patch","delete","download"];constructor(e){super(e),void 0===this.props.value&&void 0!==this.props.initValue&&void 0===this.props.onChange&&(this.state={value:e.initValue,rawValue:JSON.parse(JSON.stringify(e.initValue))})}componentDidMount(){this.#r.filter((e=>this[e]&&this.props[e]&&this.props[e].autoRun)).forEach((e=>{this[e]()}))}get(e={}){const t=Object.assign({method:"get",updateValue:!0},this.props.get,e);this.submit(t)}post(e={}){e=Object.assign({method:"post",updateValue:!1},this.props.post,e),this.submit(e)}put(e={}){e=Object.assign({method:"put",updateValue:!1},this.props.put,e),this.submit(e)}delete(e={}){e=Object.assign({method:"delete",updateValue:!1},this.props.delete,e),this.submit(e)}get from(){return void 0===this.props.value?"state":"props"}get isDirty(){return this.state?.isDirty}set isDirty(e){this.setState({isDirty:e})}get rawValue(){return this.state?.rawValue}setRawValue(e){this.setState({rawValue:null!=e?JSON.parse(JSON.stringify(e)):null})}reset(){this.setValue(this.rawValue,!0)}setValue(e,t=!1){this.props.onChange?this.props.onChange(e):this.setState({value:e}),t&&this.setRawValue(e),this.isDirty=!t}setRes(e,t,r){if(e&&r.updateValue){const e=r.formatValue?.bind(this)(t.data)??t.data;t.data=e,this.setValue(e,!0)}else r.updateValue&&this.setValue(null,!0)}#n(e,t){const r=e.shift();return 0==e.length?t?.[r]:null!=t?.[r]?this.#n(e,t[r]):void 0}getValue(e){if(e){const t=e.split(".");return this.#n(t,this[this.from]?.value)}return Ge(this[this.from]?.value,this,null,null)}getSubmitValue(){return this.getValue()}getAxiosParams({url:e,method:t,value:r,extraValue:n,sendValue:o,transformValue:s,...i}){const a=n?.bind?.(this)()??n;let l=r?.bind?.(this)({...this.getSubmitValue(),...a})??null==r?{...this.getSubmitValue(),...a}:{...r,...a};s&&(l=s.bind(this)(l));const c={authorization:`Bearer ${localStorage.getItem("accessToken")}`};let d={};const u={};return"get"==t?((null==o||o)&&(d.params=l),d.headers=c):"delete"==t?((null==o||o)&&(d.data=l),d.headers=c):(d=null==o||o?l:null,u.headers=c),{url:Ke(e,l),method:t,params1:d,params2:u,payload:l}}reload(){Je("reload 還沒有做 ")}submit(e){let t;this.setState({loading:!0}),e.mask&&(e.removeMaskFunction=et(e.mask)),(()=>{if(Array.isArray(e.url))return t=[],Promise.allSettled(e.url.map((r=>{const n="object"==typeof r?r:{url:r},o=Object.assign(e,n),{url:s,method:i,params1:a,params2:l,payload:c}=this.getAxiosParams(o);return t.push(c),tt[i](s,a,l)})));{const{url:r,method:n,params1:o,params2:s,payload:i}=this.getAxiosParams(e);return t=i,tt[n](r,o,s)}})().then((r=>{this.handleResponse(r,t,e)})).catch((r=>{this.handleResponse(r,t,e)})).finally((()=>{e.removeMaskFunction?.()}))}handleResponse=(e,t,r)=>{Array.isArray(e)?e=e.map(((e,r)=>(e.value?e.value.payload=t[r]:e.reason&&(e.reason.payload=t[r]),e))):e.payload=t;const n=(e=r?.response?.bind(this)(e,t)??e).status>=200&&e.status<=299;this.setRes(n,e,r),this.showMessage(n,n?r.successMessage:r.failedMessage),r.callback?.bind(this)(n,e,t)};showMessage(e,t){Je("success",e),Je("message",t)}renderer(){}render(){return this.renderer()}}const nt=({tag:e,config:t,me:r,className:n})=>{if("function"==typeof t){let o;const i=function(e){o=e},a=t.bind(r)({setStyle:i});return s.default.createElement(e,{className:n,style:o},a)}if("string"==typeof t)return s.default.createElement(e,{className:n},t)},ot=a.default.div`
30
+ `;class ot extends s.default.Component{#r=["get","post","put","patch","delete","download"];constructor(e){super(e),void 0===this.props.value&&void 0!==this.props.initValue&&void 0===this.props.onChange&&(this.state={value:e.initValue,rawValue:JSON.parse(JSON.stringify(e.initValue))})}componentDidMount(){this.#r.filter((e=>this[e]&&this.props[e]&&this.props[e].autoRun)).forEach((e=>{this[e]()}))}get(e={}){const t=Object.assign({method:"get",updateValue:!0},this.props.get,e);this.submit(t)}post(e={}){e=Object.assign({method:"post",updateValue:!1},this.props.post,e),this.submit(e)}put(e={}){e=Object.assign({method:"put",updateValue:!1},this.props.put,e),this.submit(e)}delete(e={}){e=Object.assign({method:"delete",updateValue:!1},this.props.delete,e),this.submit(e)}get from(){return void 0===this.props.value?"state":"props"}get isDirty(){return this.state?.isDirty}set isDirty(e){this.setState({isDirty:e})}get rawValue(){return this.state?.rawValue}setRawValue(e){this.setState({rawValue:null!=e?JSON.parse(JSON.stringify(e)):null})}reset(){this.setValue(this.rawValue,!0)}setValue(e,t=!1){this.props.onChange?this.props.onChange(e):this.setState({value:e}),t&&this.setRawValue(e),this.isDirty=!t}setRes(e,t,r){if(e&&r.updateValue){const e=r.formatValue?.bind(this)(t.data)??t.data;t.data=e,this.setValue(e,!0)}else r.updateValue&&this.setValue(null,!0)}#n(e,t){const r=e.shift();return 0==e.length?t?.[r]:null!=t?.[r]?this.#n(e,t[r]):void 0}getValue(e){if(e){const t=e.split(".");return this.#n(t,this[this.from]?.value)}return Ge(this[this.from]?.value,this,null,null)}getSubmitValue(){return this.getValue()}getAxiosParams({url:e,method:t,value:r,extraValue:n,sendValue:o,transformValue:s,...i}){const a=n?.bind?.(this)()??n;let l=r?.bind?.(this)({...this.getSubmitValue(),...a})??null==r?{...this.getSubmitValue(),...a}:{...r,...a};s&&(l=s.bind(this)(l));const c={authorization:`Bearer ${localStorage.getItem("accessToken")}`};let d={};const u={};return"get"==t?((null==o||o)&&(d.params=l),d.headers=c):"delete"==t?((null==o||o)&&(d.data=l),d.headers=c):(d=null==o||o?l:null,u.headers=c),{url:Ke(e,l),method:t,params1:d,params2:u,payload:l}}reload(){Je("reload 還沒有做 ")}submit(e){let t;e.mask&&(e.removeMaskFunction=rt(e.mask,this.maskId??"jr-mask")),(()=>{if(Array.isArray(e.url))return t=[],Promise.allSettled(e.url.map((r=>{const n="object"==typeof r?r:{url:r},o=Object.assign(e,n),{url:s,method:i,params1:a,params2:l,payload:c}=this.getAxiosParams(o);return t.push(c),nt[i](s,a,l)})));{const{url:r,method:n,params1:o,params2:s,payload:i}=this.getAxiosParams(e);return t=i,nt[n](r,o,s)}})().then((r=>{this.handleResponse(r,t,e)})).catch((r=>{this.handleResponse(r,t,e)})).finally((()=>{e.removeMaskFunction?.()}))}handleResponse=(e,t,r)=>{Array.isArray(e)?e=e.map(((e,r)=>(e.value?e.value.payload=t[r]:e.reason&&(e.reason.payload=t[r]),e))):e.payload=t;const n=(e=r?.response?.bind(this)(e,t)??e).status>=200&&e.status<=299;this.setRes(n,e,r),this.showMessage(n,n?r.successMessage:r.failedMessage),r.callback?.bind(this)(n,e,t)};showMessage(e,t){Je("success",e),Je("message",t)}renderer(){}render(){return this.renderer()}}const st=({tag:e,config:t,me:r,className:n})=>{if("function"==typeof t){let o;const i=function(e){o=e},a=t.bind(r)({setStyle:i});return s.default.createElement(e,{className:n,style:o},a)}if("string"==typeof t)return s.default.createElement(e,{className:n},t)},it=a.default.div`
31
+ position:relative;
128
32
  display:flex;
129
33
  flex:1;
130
34
  overflow:hidden;
@@ -165,7 +69,7 @@
165
69
  }
166
70
 
167
71
  }
168
- `;class st extends rt{renderer(){return s.default.createElement(ot,{id:this.props.id,style:this.props.style,className:"jr-frame"},s.default.createElement(nt,{tag:"div",config:this.props.start,me:this,className:"start"}),s.default.createElement("main",null,s.default.createElement(nt,{tag:"header",config:this.props.top,me:this}),s.default.createElement("main",null,s.default.createElement(nt,{tag:"div",config:this.props.left,me:this,className:"left"}),s.default.createElement("main",{className:"body"},this.renderMe?.()??this.props.children),s.default.createElement(nt,{tag:"div",config:this.props.right,me:this,className:"right"})),s.default.createElement(nt,{tag:"footer",config:this.props.bottom,me:this})),s.default.createElement(nt,{tag:"div",config:this.props.end,me:this,className:"end"}))}}var it;function at(){return at=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},at.apply(null,arguments)}var lt=function(e){return i.createElement("svg",at({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24"},e),it||(it=i.createElement("path",{d:"M18 6 6 18M6 6l12 12"})))};function ct({icon:e,children:t,...r}){return s.default.createElement("button",r,e,t)}const dt=a.default.div`
72
+ `;class at extends ot{rid=Ye(99999,1e4);mask=this.props.mask?()=>{const{type:e,props:t}=this.props.mask;return this.maskId=`mask-${this.rid}`,s.default.createElement(e,{...t,id:this.maskId})}:null;renderer(){return s.default.createElement(it,{id:this.props.id,style:this.props.style,className:"jr-frame"},this.mask?.(),s.default.createElement(st,{tag:"div",config:this.props.start,me:this,className:"start"}),s.default.createElement("main",null,s.default.createElement(st,{tag:"header",config:this.props.top,me:this}),s.default.createElement("main",null,s.default.createElement(st,{tag:"div",config:this.props.left,me:this,className:"left"}),s.default.createElement("main",{className:"body"},this.renderMe?.()??this.props.children),s.default.createElement(st,{tag:"div",config:this.props.right,me:this,className:"right"})),s.default.createElement(st,{tag:"footer",config:this.props.bottom,me:this})),s.default.createElement(st,{tag:"div",config:this.props.end,me:this,className:"end"}))}}var lt;function ct(){return ct=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},ct.apply(null,arguments)}var dt=function(e){return i.createElement("svg",ct({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24"},e),lt||(lt=i.createElement("path",{d:"M18 6 6 18M6 6l12 12"})))};function ut({icon:e,children:t,...r}){return s.default.createElement("button",r,e,t)}const ht=a.default.div`
169
73
  overflow: hidden;
170
74
  display: flex;
171
75
  border-radius: var(--jr-window-radius) var(--jr-window-radius) 0 0;
@@ -229,7 +133,7 @@
229
133
  }
230
134
  }
231
135
  }
232
- `;class ut extends s.default.Component{pos1=0;pos2=0;pos3=0;pos4=0;x=0;y=0;remember=e=>{Je("remember");const{clientX:t,clientY:r}=e,{x:n,y:o,width:s,height:i}=this.props.windowRef.current.getBoundingClientRect();this.props.window.orgHeight=i,this.props.window.orgWidth=s,this.props.window.orgTop=o,this.props.window.orgLeft=n,this.props.window.orgXd=t-n,this.props.window.orgBodyOverflow=document.body.style.overflow};adjustScreen=e=>{Je("double click adjustScreen"),e.preventDefault();const{x:t,y:r,width:n,height:o}=this.props.windowRef.current.getBoundingClientRect();r>1-this.props.thick?(this.remember(e),this.fullScreen(e)):this.floatScreen(e)};floatScreen=e=>{this.props.windowRef.current,this.props.windowRef.current.style.transition="var(--transition-x-y), left .05s ease-in",this.props.windowRef.current.style.left=`${this.props.window.orgLeft}px`,this.props.windowRef.current.style.top=`${this.props.window.orgTop}px`,this.props.windowRef.current.style.width=`${this.props.window.orgWidth}px`,this.props.windowRef.current.style.height=`${this.props.window.orgHeight}px`,document.body.style.overflow=this.props.window.orgBodyOverflow};fullScreen=e=>{this.props.windowRef.current.style.transition="var(--transition-x-y), left .05s ease-in",this.props.windowRef.current.style.left=-this.props.thick+"px",this.props.windowRef.current.style.top=-this.props.thick+"px",this.props.windowRef.current.style.width=`calc(100vw + ${2*this.props.thick}px)`,this.props.windowRef.current.style.height=`calc(100vh + ${2*this.props.thick}px)`,setTimeout((()=>{document.body.style.overflow="hidden",this.props.windowRef.current.style.transition="unset"}),50)};stop=e=>{if(e.preventDefault(),this.moved){const{height:t}=this.props.titleBarRef.current.getBoundingClientRect(),{x:r,y:n,width:o,height:s}=this.props.windowRef.current.getBoundingClientRect();n<1-this.props.thick&&this.fullScreen(e),n>window.innerHeight-t&&(this.props.windowRef.current.style.top=window.innerHeight-t+"px"),r+o-this.props.thick<0&&(this.props.windowRef.current.style.left=0),r>window.innerWidth&&(this.props.windowRef.current.style.left=window.innerWidth-o+"px")}document.body.style.cursor="default",window.removeEventListener("mousemove",this.move),window.removeEventListener("mouseup",this.stop),window.removeEventListener("mousemove",this.preMove)};move=e=>{e.preventDefault(),this.moved=!0;const{clientX:t,clientY:r}=e,n=r<1?0:r;this.pos1=this.pos3-t,this.pos2=this.pos4-n,this.pos3=t,this.pos4=n;const o=this.props.windowRef.current;this.y=o.offsetTop-this.pos2,this.x=o.offsetLeft-this.pos1,this.y=this.y<-this.props.thick?-this.props.thick:this.y,o.style.transition="unset",o.style.top=`${this.y}px`,o.style.left=`${this.x}px`};preMove=e=>{const t=this.props.windowRef.current,{clientX:r,clientY:n,...o}=e,{x:s,y:i,width:a,height:l}=t.getBoundingClientRect();if(t.style.transition="left .05s ease-in, height .05s ease-in",i<=0){const e=r/(window.innerWidth-2*this.props.thick)*(this.props.window.orgWidth-32);t.style.left=r-e+"px",t.style.width=`${this.props.window.orgWidth}px`,t.style.height=`${this.props.window.orgHeight}px`}else this.remember(e);this.props.window.orgSHeight=null,document.body.style.cursor="grabbing",document.body.style.overflow=this.props.window.orgBodyOverflow,setTimeout((()=>{window.addEventListener("mousemove",this.move)}),50),window.removeEventListener("mousemove",this.preMove)};start(e){e.preventDefault(),this.moved=!1,this.pos3=e.clientX,this.pos4=e.clientY,this.props.windowRef.current.style.transition="var(--transition-x-y)",window.addEventListener("mousemove",this.preMove),window.addEventListener("mouseup",this.stop)}onDoubleClick(){Je("onDoubleClick")}render(){return s.default.createElement(dt,{ref:this.props.titleBarRef,draggable:"false",onMouseDown:e=>{this.start(e)},onDoubleClick:this.adjustScreen},s.default.createElement(nt,{tag:"div",config:this.props.title??"",me:this.props.window,className:"title"}),s.default.createElement("nav",null,this.props.window.props.setOpen?s.default.createElement(ct,{icon:s.default.createElement(lt,null),className:"danger",onClick:e=>{e.stopPropagation(),null!=this.props.window.orgBodyOverflow&&(document.body.style.overflow=this.props.window.orgBodyOverflow),this.props.window.props.setOpen(!1)},onMouseDown:e=>{e.stopPropagation()}}):null))}}const ht=["n","e","s","w","nww","nnw","nne","nee","sse","see","sww","ssw"];class pt extends s.default.Component{render(){return ht.map(((e,t)=>s.default.createElement(mt,{direction:e,thick:this.props.thick,windowRef:this.props.windowRef,window:this.props.window,titleBarRef:this.props.titleBarRef,key:t})))}}const ft=a.default.div`
136
+ `;class pt extends s.default.Component{pos1=0;pos2=0;pos3=0;pos4=0;x=0;y=0;remember=e=>{Je("remember");const{clientX:t,clientY:r}=e,{x:n,y:o,width:s,height:i}=this.props.windowRef.current.getBoundingClientRect();this.props.window.orgHeight=i,this.props.window.orgWidth=s,this.props.window.orgTop=o,this.props.window.orgLeft=n,this.props.window.orgXd=t-n,this.props.window.orgBodyOverflow=document.body.style.overflow};adjustScreen=e=>{Je("double click adjustScreen"),e.preventDefault();const{x:t,y:r,width:n,height:o}=this.props.windowRef.current.getBoundingClientRect();r>1-this.props.thick?(this.remember(e),this.fullScreen(e)):this.floatScreen(e)};floatScreen=e=>{this.props.windowRef.current,this.props.windowRef.current.style.transition="var(--transition-x-y), left .05s ease-in",this.props.windowRef.current.style.left=`${this.props.window.orgLeft}px`,this.props.windowRef.current.style.top=`${this.props.window.orgTop}px`,this.props.windowRef.current.style.width=`${this.props.window.orgWidth}px`,this.props.windowRef.current.style.height=`${this.props.window.orgHeight}px`,document.body.style.overflow=this.props.window.orgBodyOverflow};fullScreen=e=>{this.props.windowRef.current.style.transition="var(--transition-x-y), left .05s ease-in",this.props.windowRef.current.style.left=-this.props.thick+"px",this.props.windowRef.current.style.top=-this.props.thick+"px",this.props.windowRef.current.style.width=`calc(100vw + ${2*this.props.thick}px)`,this.props.windowRef.current.style.height=`calc(100vh + ${2*this.props.thick}px)`,setTimeout((()=>{document.body.style.overflow="hidden",this.props.windowRef.current.style.transition="unset"}),50)};stop=e=>{if(e.preventDefault(),this.moved){const{height:t}=this.props.titleBarRef.current.getBoundingClientRect(),{x:r,y:n,width:o,height:s}=this.props.windowRef.current.getBoundingClientRect();n<1-this.props.thick&&this.fullScreen(e),n>window.innerHeight-t&&(this.props.windowRef.current.style.top=window.innerHeight-t+"px"),r+o-this.props.thick<0&&(this.props.windowRef.current.style.left=0),r>window.innerWidth&&(this.props.windowRef.current.style.left=window.innerWidth-o+"px")}document.body.style.cursor="default",window.removeEventListener("mousemove",this.move),window.removeEventListener("mouseup",this.stop),window.removeEventListener("mousemove",this.preMove)};move=e=>{e.preventDefault(),this.moved=!0;const{clientX:t,clientY:r}=e,n=r<1?0:r;this.pos1=this.pos3-t,this.pos2=this.pos4-n,this.pos3=t,this.pos4=n;const o=this.props.windowRef.current;this.y=o.offsetTop-this.pos2,this.x=o.offsetLeft-this.pos1,this.y=this.y<-this.props.thick?-this.props.thick:this.y,o.style.transition="unset",o.style.top=`${this.y}px`,o.style.left=`${this.x}px`};preMove=e=>{const t=this.props.windowRef.current,{clientX:r,clientY:n,...o}=e,{x:s,y:i,width:a,height:l}=t.getBoundingClientRect();if(t.style.transition="left .05s ease-in, height .05s ease-in",i<=0){const e=r/(window.innerWidth-2*this.props.thick)*(this.props.window.orgWidth-32);t.style.left=r-e+"px",t.style.width=`${this.props.window.orgWidth}px`,t.style.height=`${this.props.window.orgHeight}px`}else this.remember(e);this.props.window.orgSHeight=null,document.body.style.cursor="grabbing",document.body.style.overflow=this.props.window.orgBodyOverflow,setTimeout((()=>{window.addEventListener("mousemove",this.move)}),50),window.removeEventListener("mousemove",this.preMove)};start(e){e.preventDefault(),this.moved=!1,this.pos3=e.clientX,this.pos4=e.clientY,this.props.windowRef.current.style.transition="var(--transition-x-y)",window.addEventListener("mousemove",this.preMove),window.addEventListener("mouseup",this.stop)}onDoubleClick(){Je("onDoubleClick")}render(){return s.default.createElement(ht,{ref:this.props.titleBarRef,draggable:"false",onMouseDown:e=>{this.start(e)},onDoubleClick:this.adjustScreen},s.default.createElement(st,{tag:"div",config:this.props.title??"",me:this.props.window,className:"title"}),s.default.createElement("nav",null,this.props.window.props.setOpen?s.default.createElement(ut,{icon:s.default.createElement(dt,null),className:"danger",onClick:e=>{e.stopPropagation(),null!=this.props.window.orgBodyOverflow&&(document.body.style.overflow=this.props.window.orgBodyOverflow),this.props.window.props.setOpen(!1)},onMouseDown:e=>{e.stopPropagation()}}):null))}}const ft=["n","e","s","w","nww","nnw","nne","nee","sse","see","sww","ssw"];class mt extends s.default.Component{render(){return ft.map(((e,t)=>s.default.createElement(wt,{direction:e,thick:this.props.thick,windowRef:this.props.windowRef,window:this.props.window,titleBarRef:this.props.titleBarRef,key:t})))}}const gt=a.default.div`
233
137
  Xborder:1px solid ${({$direction:{color:e}})=>e};
234
138
  Xbackground:${({$direction:{color:e}})=>e};
235
139
  position: absolute;
@@ -247,7 +151,7 @@
247
151
  -o-user-select: none;
248
152
  user-select: none;
249
153
 
250
- `;class mt extends s.default.Component{width="3px";borderWidth="px";borderLong=5;constructor(e){super(e),this.sliderRef=s.default.createRef()}directions={n:{top:0,color:"red",width:"100%",height:`${this.props.thick}px`,cursor:"n-resize",resize:e=>{this.resizeN(e)}},e:{color:"yellow",right:0,width:`${this.props.thick}px`,height:"100%",cursor:"e-resize",resize:e=>{this.resizeE(e)}},s:{color:"blue",bottom:0,width:"100%",height:`${this.props.thick}px`,cursor:"s-resize",resize:e=>{this.resizeS(e)}},w:{color:"green",left:0,width:`${this.props.thick}px`,height:"100%",cursor:"w-resize",resize:e=>{this.resizeW(e)}},nw:{top:0,left:0,color:"blue",width:`${this.borderLong}px`,height:`${this.borderLong}px`,cursor:"nw-resize",resize:e=>{this.resizeN(e),this.resizeW(e)}},nww:{top:0,left:0,color:"blue",width:`${this.props.thick+this.borderLong}px`,height:`${this.props.thick}px`,cursor:"nw-resize",resize:e=>{this.resizeN(e),this.resizeW(e)}},nnw:{top:0,left:0,color:"blue",width:`${this.props.thick}px`,height:`${this.props.thick+this.borderLong}px`,cursor:"nw-resize",resize:e=>{this.resizeN(e),this.resizeW(e)}},nne:{top:0,right:0,color:"green",width:`${this.props.thick+this.borderLong}px`,height:`${this.props.thick}px`,cursor:"ne-resize",resize:e=>{this.resizeN(e),this.resizeE(e)}},nee:{top:0,right:0,color:"green",width:`${this.props.thick}px`,height:`${this.props.thick+this.borderLong}px`,cursor:"ne-resize",resize:e=>{this.resizeN(e),this.resizeE(e)}},sse:{color:"red",right:0,bottom:0,width:`${this.props.thick+this.borderLong}px`,height:`${this.props.thick}px`,cursor:"se-resize",resize:e=>{this.resizeS(e),this.resizeE(e)}},see:{color:"red",right:0,bottom:0,width:`${this.props.thick}px`,height:`${this.props.thick+this.borderLong}px`,cursor:"se-resize",resize:e=>{this.resizeS(e),this.resizeE(e)}},ssw:{color:"yellow",bottom:0,left:0,width:`${this.props.thick+this.borderLong}px`,height:`${this.props.thick}px`,cursor:"sw-resize",resize:e=>{this.resizeS(e),this.resizeW(e)}},sww:{color:"yellow",bottom:0,left:0,width:`${this.props.thick}px`,height:`${this.props.thick+this.borderLong}px`,cursor:"sw-resize",resize:e=>{this.resizeS(e),this.resizeW(e)}}};resizeN=({window:e,cursorY:t,startY:r,startHeight:n,titleBarHeight:o})=>{let s=t-this.props.thick;s<0&&(s=0);let i=n+(r-s);i<o+2*this.props.thick&&(i=o+2*this.props.thick,s=r+n-o-2*this.props.thick),e.style.top=`${s}px`,e.style.height=`${i}px`};resizeE=({window:e,clientX:t,left:r,titleBarHeight:n})=>{let o=t-r-this.props.thick;o<n&&(o=n),e.style.width=`${o+2*this.props.thick}px`};resizeS=({window:e,clientY:t,top:r,titleBarHeight:n})=>{let o=t-r-this.props.thick;o<n&&(o=n),e.style.height=`${o+2*this.props.thick}px`};resizeW=({window:e,cursorX:t,startX:r,startWidth:n,titleBarHeight:o})=>{let s=t-this.props.thick;s<0&&(s=0);let i=n+(r-s);i<o+2*this.props.thick&&(i=o+2*this.props.thick,s=r+n-o-2*this.props.thick),e.style.left=`${s}px`,e.style.width=`${i}px`};stop=e=>{e.preventDefault();const{height:t}=this.props.titleBarRef.current.getBoundingClientRect(),{x:r,y:n,width:o,height:s}=this.props.windowRef.current.getBoundingClientRect();this.props.windowRef.current.style.transition="var(--transition-x-y)",0==n&&this.data.direction.indexOf("n")>-1&&(this.props.window.orgSHeight=s,this.props.windowRef.current.style.height=`${window.innerHeight}px`),n>window.innerHeight&&(this.props.windowRef.current.style.top=window.innerHeight-t+"px"),r+o-this.props.thick<0&&(this.props.windowRef.current.style.left=0),r>window.innerWidth&&(this.props.windowRef.current.style.left=window.innerWidth-o+"px"),document.body.style.cursor="default",window.removeEventListener("mousemove",this.move),window.removeEventListener("mousemove",this.preMove),window.removeEventListener("mouseup",this.stop)};move=e=>{e.preventDefault(),this.props.windowRef.current.style.transition="unset";const{clientX:t,clientY:r,x:n,y:o}=e,s=this.props.windowRef.current,{left:i,top:a}=s.getBoundingClientRect();let{x:l,width:c,y:d,height:u,titleBarHeight:h}=this.data;this.directions[this.props.direction].resize({window:s,titleBarHeight:h,clientX:t,cursorX:n,startX:l,startWidth:c,left:i,clientY:r,cursorY:o,startY:d,startHeight:u,top:a})};preMove=()=>{this.props.direction.indexOf("n")>-1&&(this.props.windowRef.current.style.height=`${this.props.window.orgSHeight}px`,this.data.height=this.props.window.orgSHeight,this.props.window.orgSHeight=null),window.removeEventListener("mousemove",this.preMove),setTimeout((()=>{window.addEventListener("mousemove",this.move)}),100)};start=(e,t)=>{e.preventDefault();const{height:r}=this.props.titleBarRef.current.getBoundingClientRect();let{x:n,y:o,width:s,height:i}=this.props.windowRef.current.getBoundingClientRect();this.props.window.orgHeight=i,this.props.direction.indexOf("s")>-1&&(this.props.window.orgSHeight=null),this.data={x:n,y:o,width:s,height:i,titleBarHeight:r,direction:t},document.body.style.cursor=this.directions[this.props.direction].cursor,this.props.window.orgSHeight?window.addEventListener("mousemove",this.preMove):window.addEventListener("mousemove",this.move),window.addEventListener("mouseup",this.stop)};render(){return s.default.createElement(ft,{$direction:this.directions[this.props.direction],$padding:this.props.padding,onMouseDown:e=>{this.start(e,this.props.direction)}})}}var gt={test:"Style-module_test__LrdEc",withMask:"Style-module_withMask__LPcai"};!function(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.Style-module_test__LrdEc{border:1px solid red;color:red}.Style-module_withMask__LPcai{overflow:hidden!important;position:relative;user-select:none;&:after{a:#868686cc;background:#868686cc;border-radius:inherit;bottom:0;content:"";height:10000px;left:0;position:absolute;right:0;top:0;width:10000px}}mask{background:#868686cc;border-radius:inherit;bottom:0;height:10000px;left:0;position:absolute;right:0;top:0;width:10000px}');const wt=a.default.div`
154
+ `;class wt extends s.default.Component{width="3px";borderWidth="px";borderLong=5;constructor(e){super(e),this.sliderRef=s.default.createRef()}directions={n:{top:0,color:"red",width:"100%",height:`${this.props.thick}px`,cursor:"n-resize",resize:e=>{this.resizeN(e)}},e:{color:"yellow",right:0,width:`${this.props.thick}px`,height:"100%",cursor:"e-resize",resize:e=>{this.resizeE(e)}},s:{color:"blue",bottom:0,width:"100%",height:`${this.props.thick}px`,cursor:"s-resize",resize:e=>{this.resizeS(e)}},w:{color:"green",left:0,width:`${this.props.thick}px`,height:"100%",cursor:"w-resize",resize:e=>{this.resizeW(e)}},nw:{top:0,left:0,color:"blue",width:`${this.borderLong}px`,height:`${this.borderLong}px`,cursor:"nw-resize",resize:e=>{this.resizeN(e),this.resizeW(e)}},nww:{top:0,left:0,color:"blue",width:`${this.props.thick+this.borderLong}px`,height:`${this.props.thick}px`,cursor:"nw-resize",resize:e=>{this.resizeN(e),this.resizeW(e)}},nnw:{top:0,left:0,color:"blue",width:`${this.props.thick}px`,height:`${this.props.thick+this.borderLong}px`,cursor:"nw-resize",resize:e=>{this.resizeN(e),this.resizeW(e)}},nne:{top:0,right:0,color:"green",width:`${this.props.thick+this.borderLong}px`,height:`${this.props.thick}px`,cursor:"ne-resize",resize:e=>{this.resizeN(e),this.resizeE(e)}},nee:{top:0,right:0,color:"green",width:`${this.props.thick}px`,height:`${this.props.thick+this.borderLong}px`,cursor:"ne-resize",resize:e=>{this.resizeN(e),this.resizeE(e)}},sse:{color:"red",right:0,bottom:0,width:`${this.props.thick+this.borderLong}px`,height:`${this.props.thick}px`,cursor:"se-resize",resize:e=>{this.resizeS(e),this.resizeE(e)}},see:{color:"red",right:0,bottom:0,width:`${this.props.thick}px`,height:`${this.props.thick+this.borderLong}px`,cursor:"se-resize",resize:e=>{this.resizeS(e),this.resizeE(e)}},ssw:{color:"yellow",bottom:0,left:0,width:`${this.props.thick+this.borderLong}px`,height:`${this.props.thick}px`,cursor:"sw-resize",resize:e=>{this.resizeS(e),this.resizeW(e)}},sww:{color:"yellow",bottom:0,left:0,width:`${this.props.thick}px`,height:`${this.props.thick+this.borderLong}px`,cursor:"sw-resize",resize:e=>{this.resizeS(e),this.resizeW(e)}}};resizeN=({window:e,cursorY:t,startY:r,startHeight:n,titleBarHeight:o})=>{let s=t-this.props.thick;s<0&&(s=0);let i=n+(r-s);i<o+2*this.props.thick&&(i=o+2*this.props.thick,s=r+n-o-2*this.props.thick),e.style.top=`${s}px`,e.style.height=`${i}px`};resizeE=({window:e,clientX:t,left:r,titleBarHeight:n})=>{let o=t-r-this.props.thick;o<n&&(o=n),e.style.width=`${o+2*this.props.thick}px`};resizeS=({window:e,clientY:t,top:r,titleBarHeight:n})=>{let o=t-r-this.props.thick;o<n&&(o=n),e.style.height=`${o+2*this.props.thick}px`};resizeW=({window:e,cursorX:t,startX:r,startWidth:n,titleBarHeight:o})=>{let s=t-this.props.thick;s<0&&(s=0);let i=n+(r-s);i<o+2*this.props.thick&&(i=o+2*this.props.thick,s=r+n-o-2*this.props.thick),e.style.left=`${s}px`,e.style.width=`${i}px`};stop=e=>{e.preventDefault();const{height:t}=this.props.titleBarRef.current.getBoundingClientRect(),{x:r,y:n,width:o,height:s}=this.props.windowRef.current.getBoundingClientRect();this.props.windowRef.current.style.transition="var(--transition-x-y)",0==n&&this.data.direction.indexOf("n")>-1&&(this.props.window.orgSHeight=s,this.props.windowRef.current.style.height=`${window.innerHeight}px`),n>window.innerHeight&&(this.props.windowRef.current.style.top=window.innerHeight-t+"px"),r+o-this.props.thick<0&&(this.props.windowRef.current.style.left=0),r>window.innerWidth&&(this.props.windowRef.current.style.left=window.innerWidth-o+"px"),document.body.style.cursor="default",window.removeEventListener("mousemove",this.move),window.removeEventListener("mousemove",this.preMove),window.removeEventListener("mouseup",this.stop)};move=e=>{e.preventDefault(),this.props.windowRef.current.style.transition="unset";const{clientX:t,clientY:r,x:n,y:o}=e,s=this.props.windowRef.current,{left:i,top:a}=s.getBoundingClientRect();let{x:l,width:c,y:d,height:u,titleBarHeight:h}=this.data;this.directions[this.props.direction].resize({window:s,titleBarHeight:h,clientX:t,cursorX:n,startX:l,startWidth:c,left:i,clientY:r,cursorY:o,startY:d,startHeight:u,top:a})};preMove=()=>{this.props.direction.indexOf("n")>-1&&(this.props.windowRef.current.style.height=`${this.props.window.orgSHeight}px`,this.data.height=this.props.window.orgSHeight,this.props.window.orgSHeight=null),window.removeEventListener("mousemove",this.preMove),setTimeout((()=>{window.addEventListener("mousemove",this.move)}),100)};start=(e,t)=>{e.preventDefault();const{height:r}=this.props.titleBarRef.current.getBoundingClientRect();let{x:n,y:o,width:s,height:i}=this.props.windowRef.current.getBoundingClientRect();this.props.window.orgHeight=i,this.props.direction.indexOf("s")>-1&&(this.props.window.orgSHeight=null),this.data={x:n,y:o,width:s,height:i,titleBarHeight:r,direction:t},document.body.style.cursor=this.directions[this.props.direction].cursor,this.props.window.orgSHeight?window.addEventListener("mousemove",this.preMove):window.addEventListener("mousemove",this.move),window.addEventListener("mouseup",this.stop)};render(){return s.default.createElement(gt,{$direction:this.directions[this.props.direction],$padding:this.props.padding,onMouseDown:e=>{this.start(e,this.props.direction)}})}}var yt={test:"Style-module_test__LrdEc",withMask:"Style-module_withMask__LPcai"};!function(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.Style-module_test__LrdEc{border:1px solid red;color:red}.Style-module_withMask__LPcai{overflow:hidden!important;position:relative;user-select:none;&:after{a:#868686cc;background:#868686cc;border-radius:inherit;bottom:0;content:"";height:10000px;left:0;position:absolute;right:0;top:0;width:10000px}}mask{background:#868686cc;border-radius:inherit;bottom:0;height:10000px;left:0;position:absolute;right:0;top:0;width:10000px}');const bt=a.default.div`
251
155
  z-index:1;
252
156
 
253
157
  --jr-window-radius:3px;
@@ -284,7 +188,7 @@ z-index:1;
284
188
  display: flex;
285
189
  }
286
190
  }
287
- `;class yt extends st{x=0;y=0;width=300;height=300;padding=1;thick=5;constructor(e){super(e),this.ref=s.default.createRef(),this.titleBarRef=s.default.createRef(),this.init()}addMaskToTarget=e=>{this.mask=document.createElement("div"),this.mask.style.background="#868686cc",this.mask.style.position="absolute",this.mask.style.top="0",this.mask.style.left="0",this.mask.style.right="0",this.mask.style.bottom="0",this.mask.style.borderRadius="inherit",this.mask.style.height="10000px",this.mask.style.width="10000px",e.appendChild(this.mask),Je("style.mask",gt.mask),Je("addMask+++++++++++++++++++++++++++")};removeMaskFromTarget=()=>{Je("removeMask-----------------------"),this.mask.remove()};backdropOn(e){const t="object"==typeof this.props.backdrop?this.props.backdrop:"string"==typeof this.props.backdrop?document.getElementById(this.props.backdrop):document.body;t?.classList[e?"add":"remove"]("withMask")}componentDidMount(){super.componentDidMount(),this.props.backdrop&&this.props.open&&this.backdropOn(this.props.open),this.props.open&&this.open()}open(){this.props.onOpen?.bind(this)()}close(){this.props.onClose?.bind(this)()}componentDidUpdate(e,t,r){!0===this.props.popup&&(this.props.open&&!1===e.open?this.open():!1===this.props.open&&e.open&&this.close(),this.props.backdrop&&this.props.open!=e.open&&this.backdropOn(this.props.open))}init(){this.height=window.innerHeight>=(this.props.height??this.height)?this.props.height??this.height:window.innerHeight,this.width=window.innerWidth>=(this.props.width??this.width)?this.props.width??this.width:window.innerWidth,this.x=this.props.x??(window.innerWidth-(this.width??300))/2,this.y=this.props.y??(window.innerHeight-(this.height??300))/2}renderer(){return!0===this.props.popup?this.props.open?s.default.createElement(wt,{rule:"dialog",ref:this.ref,className:`jr-window ${this.props.className??""}`,$x:this.x,$y:this.y,$width:this.width,$height:this.height,$thick:this.thick},s.default.createElement("main",null,s.default.createElement(ut,{titleBarRef:this.titleBarRef,windowRef:this.ref,window:this,title:this.props.title,thick:this.thick}),s.default.createElement("main",null,super.renderer())),s.default.createElement(pt,{thick:this.thick,windowRef:this.ref,window:this,titleBarRef:this.titleBarRef})):"":super.renderer()}}const bt=a.default.div`
191
+ `;class xt extends at{x=0;y=0;width=300;height=300;padding=1;thick=5;constructor(e){super(e),this.ref=s.default.createRef(),this.titleBarRef=s.default.createRef(),this.init()}addMaskToTarget=e=>{this.mask=document.createElement("div"),this.mask.style.background="#868686cc",this.mask.style.position="absolute",this.mask.style.top="0",this.mask.style.left="0",this.mask.style.right="0",this.mask.style.bottom="0",this.mask.style.borderRadius="inherit",this.mask.style.height="10000px",this.mask.style.width="10000px",e.appendChild(this.mask),Je("style.mask",yt.mask),Je("addMask+++++++++++++++++++++++++++")};removeMaskFromTarget=()=>{Je("removeMask-----------------------"),this.mask.remove()};backdropOn(e){const t="object"==typeof this.props.backdrop?this.props.backdrop:"string"==typeof this.props.backdrop?document.getElementById(this.props.backdrop):document.body;t?.classList[e?"add":"remove"]("withMask")}componentDidMount(){super.componentDidMount(),this.props.backdrop&&this.props.open&&this.backdropOn(this.props.open),this.props.open&&this.open()}open(){this.props.onOpen?.bind(this)()}close(){this.props.onClose?.bind(this)()}componentDidUpdate(e,t,r){!0===this.props.popup&&(this.props.open&&!1===e.open?this.open():!1===this.props.open&&e.open&&this.close(),this.props.backdrop&&this.props.open!=e.open&&this.backdropOn(this.props.open))}init(){this.height=window.innerHeight>=(this.props.height??this.height)?this.props.height??this.height:window.innerHeight,this.width=window.innerWidth>=(this.props.width??this.width)?this.props.width??this.width:window.innerWidth,this.x=this.props.x??(window.innerWidth-(this.width??300))/2,this.y=this.props.y??(window.innerHeight-(this.height??300))/2}renderer(){return!0===this.props.popup?this.props.open?s.default.createElement(bt,{rule:"dialog",ref:this.ref,className:`jr-window ${this.props.className??""}`,$x:this.x,$y:this.y,$width:this.width,$height:this.height,$thick:this.thick},s.default.createElement("main",null,s.default.createElement(pt,{titleBarRef:this.titleBarRef,windowRef:this.ref,window:this,title:this.props.title,thick:this.thick}),s.default.createElement("main",null,super.renderer())),s.default.createElement(mt,{thick:this.thick,windowRef:this.ref,window:this,titleBarRef:this.titleBarRef})):"":super.renderer()}}const vt=a.default.div`
288
192
  position: absolute;
289
193
  top: 0;
290
194
  right: 0;
@@ -298,12 +202,12 @@ z-index:1;
298
202
  cursor: col-resize;
299
203
  border-right:1px dashed gray;
300
204
  }
301
- `;class xt extends s.default.Component{constructor(){super(),this.sliderRef=s.default.createRef()}stop=e=>{this.sliderRef.current.classList.remove("resizing"),document.body.style.cursor="default",window.removeEventListener("mousemove",this.move),window.removeEventListener("mouseup",this.stop)};move=({clientX:e})=>{const{th:t,selectedCols:r,widthRates:n}=this.data,{left:o}=t.getBoundingClientRect(),s=o+10,i=(e>=s?e:s)-o;r.forEach(((e,t)=>{const r=Math.round(i/100*n[t]);e.style.width=r+"px"}))};start(e,t){const r=[...this.props.table.colGroupRef.current.children].slice(t.columnNo,t.columnNo+(t.colSpan??1)),n=r.reduce(((e,{offsetWidth:t})=>e+t),0),o=r.map((({offsetWidth:e})=>e/n*100));this.data={selectedCols:r,th:e.current,widthRates:o},this.sliderRef.current.classList.add("resizing"),document.body.style.cursor="col-resize",window.addEventListener("mousemove",this.move),window.addEventListener("mouseup",this.stop)}render(){const e=this.props.column;return s.default.createElement(bt,{ref:this.sliderRef,onMouseDown:t=>{this.start(this.props.thRef,e)}})}}const vt=({leafColumns:e,colGroupRef:t})=>s.default.createElement("colgroup",{ref:t},e?.map(((e,t)=>{const{width:r,...n}=e,o={width:r};return s.default.createElement("col",{style:o,key:t})}))),Et=({deep:e,rowColumn:t,rowIndex:r,table:n})=>t?.map(((t,o)=>{const i=s.default.createRef();return s.default.createElement("th",{key:o,ref:i,colSpan:t.colSpan,rowSpan:t.rowSpan??(t.isLeaf&&e>r?e-r+1:null)},Ge(t.label,n),(void 0===n.props.resizableColumns||n.props.resizableColumns)&&s.default.createElement(xt,{table:n,thRef:i,column:t}))})),kt=({columns:e,trClassName:t,table:r})=>{const n=Array.isArray(e?.[0])?e:[e];return n?.map(((e,o)=>s.default.createElement("tr",{className:t,key:o},s.default.createElement(Et,{deep:n.length-1,rowColumn:e,rowIndex:o,table:r}))))},St=({columns:e,leafColumns:t,table:r})=>s.default.createElement(s.default.Fragment,null,s.default.createElement("thead",null,s.default.createElement(kt,{columns:e,table:r})),s.default.createElement(vt,{leafColumns:t,colGroupRef:r.colGroupRef})),Rt=({table:e,groupData:t,groupIndex:r,deep:n,columns:o,rowIndex:i})=>o?.map(((t,r)=>{let n=Ge(t.style,e,{},{});const o=(({type:e,typeStyle:t,render:r,...n},o,i)=>{if(e){const r="function"==typeof t?t?.bind(o)():t;return s.default.createElement(e,{style:r})}return r?r.bind(o)():i})(t,e,t.label);return s.default.createElement("th",{style:n,colSpan:t.colSpan,rowSpan:t.rowSpan},o)})),Ot=({table:e,columns:t})=>{const r=t?.map(((t,r)=>s.default.createElement("tr",{key:r},s.default.createElement(Rt,{columns:t,table:e}))));return s.default.createElement(s.default.Fragment,null,s.default.createElement("tfoot",null,r))};function Ct(){return Ct=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},Ct.apply(null,arguments)}a.default.tbody`
205
+ `;class Et extends s.default.Component{constructor(){super(),this.sliderRef=s.default.createRef()}stop=e=>{this.sliderRef.current.classList.remove("resizing"),document.body.style.cursor="default",window.removeEventListener("mousemove",this.move),window.removeEventListener("mouseup",this.stop)};move=({clientX:e})=>{const{th:t,selectedCols:r,widthRates:n}=this.data,{left:o}=t.getBoundingClientRect(),s=o+10,i=(e>=s?e:s)-o;r.forEach(((e,t)=>{const r=Math.round(i/100*n[t]);e.style.width=r+"px"}))};start(e,t){const r=[...this.props.table.colGroupRef.current.children].slice(t.columnNo,t.columnNo+(t.colSpan??1)),n=r.reduce(((e,{offsetWidth:t})=>e+t),0),o=r.map((({offsetWidth:e})=>e/n*100));this.data={selectedCols:r,th:e.current,widthRates:o},this.sliderRef.current.classList.add("resizing"),document.body.style.cursor="col-resize",window.addEventListener("mousemove",this.move),window.addEventListener("mouseup",this.stop)}render(){const e=this.props.column;return s.default.createElement(vt,{ref:this.sliderRef,onMouseDown:t=>{this.start(this.props.thRef,e)}})}}const kt=({leafColumns:e,colGroupRef:t})=>s.default.createElement("colgroup",{ref:t},e?.map(((e,t)=>{const{width:r,...n}=e,o={width:r};return s.default.createElement("col",{style:o,key:t})}))),St=({deep:e,rowColumn:t,rowIndex:r,table:n})=>t?.map(((t,o)=>{const i=s.default.createRef();return s.default.createElement("th",{key:o,ref:i,colSpan:t.colSpan,rowSpan:t.rowSpan??(t.isLeaf&&e>r?e-r+1:null)},Ge(t.label,n),(void 0===n.props.resizableColumns||n.props.resizableColumns)&&s.default.createElement(Et,{table:n,thRef:i,column:t}))})),Rt=({columns:e,trClassName:t,table:r})=>{const n=Array.isArray(e?.[0])?e:[e];return n?.map(((e,o)=>s.default.createElement("tr",{className:t,key:o},s.default.createElement(St,{deep:n.length-1,rowColumn:e,rowIndex:o,table:r}))))},Ot=({columns:e,leafColumns:t,table:r})=>s.default.createElement(s.default.Fragment,null,s.default.createElement("thead",null,s.default.createElement(Rt,{columns:e,table:r})),s.default.createElement(kt,{leafColumns:t,colGroupRef:r.colGroupRef})),Ct=({table:e,groupData:t,groupIndex:r,deep:n,columns:o,rowIndex:i})=>o?.map(((t,r)=>{let n=Ge(t.style,e,{},{});const o=(({type:e,typeStyle:t,render:r,...n},o,i)=>{if(e){const r="function"==typeof t?t?.bind(o)():t;return s.default.createElement(e,{style:r})}return r?r.bind(o)():i})(t,e,t.label);return s.default.createElement("th",{style:n,colSpan:t.colSpan,rowSpan:t.rowSpan},o)})),jt=({table:e,columns:t})=>{const r=t?.map(((t,r)=>s.default.createElement("tr",{key:r},s.default.createElement(Ct,{columns:t,table:e}))));return s.default.createElement(s.default.Fragment,null,s.default.createElement("tfoot",null,r))};function Nt(){return Nt=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},Nt.apply(null,arguments)}a.default.tbody`
302
206
  th{
303
207
  height:4px;
304
208
  background:#c6c6c6;
305
209
  }
306
- `;const jt=({table:e,groupData:t,groupIndex:r,deep:n,rowColumn:o,rowIndex:i})=>o?.map((({style:o,align:a,type:l,render:c,...d},u)=>{const h=Ge(o,e,{},{});let p;return p=l?"type":c?c?.bind(e)({groupData:t,groupIndex:r,ths:111}):d.label,s.default.createElement("th",{key:u,style:{textAlign:a,...h},colSpan:d.colSpan,rowSpan:d.isLeaf&&n>i?n-i+1:null},p)})),Nt=({table:e,columns:t,trClassName:r,groupData:n,tbodyIndex:o})=>{const i=Array.isArray(t?.[0])?t:[t];return i?.map(((t,a)=>s.default.createElement("tr",{className:r,key:a},s.default.createElement(jt,{table:e,groupData:n,groupIndex:o,deep:i.length-1,rowColumn:t,rowIndex:a}))))};a.default.tr`
210
+ `;const $t=({table:e,groupData:t,groupIndex:r,deep:n,rowColumn:o,rowIndex:i})=>o?.map((({style:o,align:a,type:l,render:c,...d},u)=>{const h=Ge(o,e,{},{});let p;return p=l?"type":c?c?.bind(e)({groupData:t,groupIndex:r,ths:111}):d.label,s.default.createElement("th",{key:u,style:{textAlign:a,...h},colSpan:d.colSpan,rowSpan:d.isLeaf&&n>i?n-i+1:null},p)})),At=({table:e,columns:t,trClassName:r,groupData:n,tbodyIndex:o})=>{const i=Array.isArray(t?.[0])?t:[t];return i?.map(((t,a)=>s.default.createElement("tr",{className:r,key:a},s.default.createElement($t,{table:e,groupData:n,groupIndex:o,deep:i.length-1,rowColumn:t,rowIndex:a}))))};a.default.tr`
307
211
  z-index: 1;
308
212
  XXposition: sticky;
309
213
  XXtop: 50px;
@@ -311,12 +215,12 @@ z-index:1;
311
215
  text-align: left;
312
216
  border:1px solid #222222;
313
217
  }
314
- `;const $t=e=>s.default.createElement(Nt,Ct({trClassName:"jr-group-header"},e));a.default.tr`
218
+ `;const Tt=e=>s.default.createElement(At,Nt({trClassName:"jr-group-header"},e));a.default.tr`
315
219
  th{
316
220
  border:1px solid #222222;
317
221
  text-align: left;
318
222
  }
319
- `;const At=e=>s.default.createElement(Nt,Ct({trClassName:"jr-group-footer"},e)),Tt=({column:e,record:t,tbodyIndex:r,trIndex:n,tdIndex:o,table:i})=>{let a;const{style:l,align:c,vAlign:d="baseline",type:u,typeStyle:h,render:p,setValue:f,getValue:m,onChange:g,funcProps:w,...y}=e,b=e=>{f(t,e?.target?.value??e),i.setValue(i.getValue())},x=m(t);let v=p?{}:Ge(l,i,{value:x,record:t},{});const E=e=>{v=e};if(E.bind(i),p?.bind(i),u){const e=Ge(h,i,{record:t},{});a=s.default.createElement(u,{onChange:g?e=>{g?.bind(i)(e,{value:x,onChange:b,me:a})}:b,value:x,style:e,render:p,...y,...w?.bind(i)({value:x})})}else a=p?p({index:n,groupIndex:r,value:x,record:t,onChange:b,setStyle:E}):x;return s.default.createElement("td",{colSpan:v.colSpan,rowSpan:v.rowSpan,style:{textAlign:c,verticalAlign:d,...v},key:o},a)},Vt=({leafColumns:e,record:t,table:r,tbodyIndex:n,trIndex:o})=>e?.map(((e,i)=>s.default.createElement(Tt,{column:e,key:i,record:t,table:r,tbodyIndex:n,trIndex:o,tdIndex:i}))),_t=({groupData:e,groupHeader:t,leafColumns:r,groupFooter:n,table:o,tbodyIndex:i})=>{const a={table:o,tbodyIndex:i};return s.default.createElement(s.default.Fragment,null,s.default.createElement("tbody",{key:`tbody${i}`},e?.length>0&&s.default.createElement($t,Ct({groupData:e,columns:t},a)),e?.map?.(((e,t)=>{const n=o.props.onRowClick?.bind(o);return s.default.createElement("tr",{key:t,onClick:()=>{n?.({record:e,index:t,groupIndex:i})}},s.default.createElement(Vt,Ct({record:e,trIndex:t},a,{leafColumns:r})))})),e?.length>0&&s.default.createElement(At,Ct({groupData:e,columns:n},a))))},Lt=({groupHeader:e,leafColumns:t,groupFooter:r,dataSource:n,table:o})=>{const i=Array.isArray(n?.[0])?n:[n];return i?.map(((n,i,a)=>s.default.createElement(_t,{key:`tbody${i}`,table:o,groupData:n,tbodyIndex:i,groupHeader:e,leafColumns:t,groupFooter:r})))},Bt=a.default.div`
223
+ `;const Vt=e=>s.default.createElement(At,Nt({trClassName:"jr-group-footer"},e)),_t=({column:e,record:t,tbodyIndex:r,trIndex:n,tdIndex:o,table:i})=>{let a;const{style:l,align:c,vAlign:d="baseline",type:u,typeStyle:h,render:p,setValue:f,getValue:m,onChange:g,funcProps:w,...y}=e,b=e=>{f(t,e?.target?.value??e),i.setValue(i.getValue())},x=m(t);let v=p?{}:Ge(l,i,{value:x,record:t},{});const E=e=>{v=e};if(E.bind(i),p?.bind(i),u){const e=Ge(h,i,{record:t},{});a=s.default.createElement(u,{onChange:g?e=>{g?.bind(i)(e,{value:x,onChange:b,me:a})}:b,value:x,style:e,render:p,...y,...w?.bind(i)({value:x})})}else a=p?p({index:n,groupIndex:r,value:x,record:t,onChange:b,setStyle:E}):x;return s.default.createElement("td",{colSpan:v.colSpan,rowSpan:v.rowSpan,style:{textAlign:c,verticalAlign:d,...v},key:o},a)},Lt=({leafColumns:e,record:t,table:r,tbodyIndex:n,trIndex:o})=>e?.map(((e,i)=>s.default.createElement(_t,{column:e,key:i,record:t,table:r,tbodyIndex:n,trIndex:o,tdIndex:i}))),Bt=({groupData:e,groupHeader:t,leafColumns:r,groupFooter:n,table:o,tbodyIndex:i})=>{const a={table:o,tbodyIndex:i};return s.default.createElement(s.default.Fragment,null,s.default.createElement("tbody",{key:`tbody${i}`},e?.length>0&&s.default.createElement(Tt,Nt({groupData:e,columns:t},a)),e?.map?.(((e,t)=>{const n=o.props.onRowClick?.bind(o);return s.default.createElement("tr",{key:t,onClick:()=>{n?.({record:e,index:t,groupIndex:i})}},s.default.createElement(Lt,Nt({record:e,trIndex:t},a,{leafColumns:r})))})),e?.length>0&&s.default.createElement(Vt,Nt({groupData:e,columns:n},a))))},Dt=({groupHeader:e,leafColumns:t,groupFooter:r,dataSource:n,table:o})=>{const i=Array.isArray(n?.[0])?n:[n];return i?.map(((n,i,a)=>s.default.createElement(Bt,{key:`tbody${i}`,table:o,groupData:n,tbodyIndex:i,groupHeader:e,leafColumns:t,groupFooter:r})))},Pt=a.default.div`
320
224
  --column-bd-color:#cccccc;
321
225
  --column-b-color:#ffffff;
322
226
  --column-b-hover-color:#eeeeee;
@@ -489,7 +393,7 @@ z-index:1;
489
393
 
490
394
  }
491
395
 
492
- `;const Dt=a.default.main`
396
+ `;const zt=a.default.main`
493
397
 
494
398
 
495
399
  --column-bd-color:#cccccc;
@@ -515,23 +419,23 @@ z-index:1;
515
419
  }
516
420
  }
517
421
  }
518
- `;function Pt(e){return null!=e&&""!=e&&""!=e.trim?.()||"This is required"}function zt(e,t){return null==e||("string"==typeof e&&e.length>t.max||Array.isArray(e)&&e.length>t.max?`Length can not more than ${t.max}`:!("number"==typeof e&&e>t.max)||`Length can not more than ${t.max}`)}function Ft(e,t){return"string"==typeof e&&t.min>e.length||Array.isArray(e)&&t.min>e.length?`Length can not less than ${t.min}`:!("number"==typeof e&&t.min>e)||`Can not less than ${t.min}`}function Mt(e,t,r,n){if(n.length){const o=n.shift();"object"!=typeof r[o]&&(r[o]={}),Mt(e,t,r[o],n)}else r[e]=t}a.default.div`
422
+ `;function Ft(e){return null!=e&&""!=e&&""!=e.trim?.()||"This is required"}function Mt(e,t){return null==e||("string"==typeof e&&e.length>t.max||Array.isArray(e)&&e.length>t.max?`Length can not more than ${t.max}`:!("number"==typeof e&&e>t.max)||`Length can not more than ${t.max}`)}function Ut(e,t){return"string"==typeof e&&t.min>e.length||Array.isArray(e)&&t.min>e.length?`Length can not less than ${t.min}`:!("number"==typeof e&&t.min>e)||`Can not less than ${t.min}`}function It(e,t,r,n){if(n.length){const o=n.shift();"object"!=typeof r[o]&&(r[o]={}),It(e,t,r[o],n)}else r[e]=t}a.default.div`
519
423
  overflow: auto;
520
424
  flex:1;
521
- `;const Ut=a.default.div`
425
+ `;const Ht=a.default.div`
522
426
  display: grid;
523
427
  gap:10px;
524
428
  grid: ${({grid:e,cols:t,children:r})=>e||`auto / ${Array(t??1).fill().map((()=>"1fr")).join(" ")}`};
525
429
 
526
430
  gap: ${({$gap:e})=>e};
527
431
  `;a.default.div`
528
- `;const Ht=a.default.div`
432
+ `;const Xt=a.default.div`
529
433
  flex:1;
530
434
  display: grid;
531
435
 
532
436
 
533
437
  ${({$layout:e,$labelWidth:t,$hasLabel:r,$valueWidth:n})=>"v"==e?"grid: auto 1fr / 1fr;":`grid: 1fr / ${r?t:""} ${n};`}
534
- `,It=a.default.div`
438
+ `,Wt=a.default.div`
535
439
  min-height:24px;
536
440
  ${({$layout:e})=>"v"==e?"text-align: start;":"text-align: end;\n padding-right:10px;\n "}
537
441
 
@@ -539,14 +443,14 @@ z-index:1;
539
443
 
540
444
  ${({$colon:e})=>{if(e)return`\n &:not(:empty)::after{\n content:'${e}';\n }\n `}}
541
445
 
542
- `,Xt=a.default.main`
446
+ `,qt=a.default.main`
543
447
  flex:1;
544
448
  flex-direction: column;
545
449
  overflow: hidden;
546
450
 
547
451
  text-align: start;
548
452
  ${({$validateValue:e})=>{if(null!=e)return"\n > * {\n xborder:1px solid red;\n }\n "}}
549
- `,Wt=a.default.div`
453
+ `,Jt=a.default.div`
550
454
  &:has(.left:empty):has(.right:empty)
551
455
  {
552
456
  border:1px solid blue;
@@ -608,9 +512,9 @@ z-index:1;
608
512
  border: 1px solid red;
609
513
  }
610
514
  }
611
- `;const qt=(e,t)=>{const r=t.shift(t);return t.length?qt(e?.[r],t):e},Jt=(e,t,r)=>{const n=t.shift(t);t?.length?("object"!=typeof e[n]&&(e[n]={}),Jt(e[n],t,r)):e[n]=r};const Kt=a.default.div`
515
+ `;const Kt=(e,t)=>{const r=t.shift(t);return t.length?Kt(e?.[r],t):e},Gt=(e,t,r)=>{const n=t.shift(t);t?.length?("object"!=typeof e[n]&&(e[n]={}),Gt(e[n],t,r)):e[n]=r};const Yt=a.default.div`
612
516
 
613
- `;const Gt=a.default(class extends yt{renderMe(){return this.getValue()?.message}})`
517
+ `;const Qt=a.default(class extends xt{renderMe(){return this.getValue()?.message}})`
614
518
  .body{
615
519
  display: flex;
616
520
  align-items: center;
@@ -622,13 +526,13 @@ z-index:1;
622
526
  justify-content: end;
623
527
  padding: 8px;
624
528
  }
625
- `;function Yt({title:t,message:r,container:n,...o}){const[i,a]=e.useState(!0);return s.default.createElement(Gt,Ct({initValue:{message:r},width:440,height:180,maskOn:"play"},o,{open:i,setOpen:a,popup:!0,title:t??"",onClose:()=>{n.remove()},bottom:function(){return s.default.createElement("button",{onClick:()=>{a(!1)}},"OK")}}),r)}const Qt=a.default.div`
529
+ `;function Zt({title:t,message:r,container:n,...o}){const[i,a]=e.useState(!0);return s.default.createElement(Qt,Nt({initValue:{message:r},width:440,height:180,maskOn:"play"},o,{open:i,setOpen:a,popup:!0,title:t??"",onClose:()=>{n.remove()},bottom:function(){return s.default.createElement("button",{onClick:()=>{a(!1)}},"OK")}}),r)}const er=a.default.div`
626
530
  display:flex;
627
531
  input:focus{
628
532
  outline: none;
629
533
  }
630
- `;class Zt extends s.default.Component{setValue(e){this.props?.onChange?.(e)}render(){return s.default.createElement(Qt,null,this.input())}}class er extends rt{get optionsFrom(){return void 0===this.props.options?"state":"props"}setOptions(e){this.props.setOptions?this.props.setOptions(e):this.setState({options:e})}getOptions(){return this[this.optionsFrom]?.options}setRes(e,t,r){if(e){const e=r.formatValue?.bind(this)(t.data)??t.data;t.data=e,this.setOptions(e)}}}const tr=a.default.option`
631
- `,rr=a.default.select`
534
+ `;class tr extends s.default.Component{setValue(e){this.props?.onChange?.(e)}render(){return s.default.createElement(er,null,this.input())}}class rr extends ot{get optionsFrom(){return void 0===this.props.options?"state":"props"}setOptions(e){this.props.setOptions?this.props.setOptions(e):this.setState({options:e})}getOptions(){return this[this.optionsFrom]?.options}setRes(e,t,r){if(e){const e=r.formatValue?.bind(this)(t.data)??t.data;t.data=e,this.setOptions(e)}}}const nr=a.default.option`
535
+ `,or=a.default.select`
632
536
  ${({size:e,multiple:t})=>""+(1==e||null==e&&1!=t?"height:24px;":"")}
633
537
  width: 100%;
634
538
  min-height: 24px;
@@ -640,7 +544,7 @@ z-index:1;
640
544
  display: flex;
641
545
  align-items: center;
642
546
  }
643
- `;const nr=a.default.div`
547
+ `;const sr=a.default.div`
644
548
  >label{
645
549
  white-space: nowrap;
646
550
  display: inline-flex;
@@ -648,7 +552,7 @@ z-index:1;
648
552
  height: 24px;
649
553
  padding-right: 12px;
650
554
  }
651
- `;const or=a.default.input`
555
+ `;const ir=a.default.input`
652
556
  min-height: 24px;
653
557
  width: 100%;
654
- `;exports.JRAlert=function(e){const t=document.body,n="jr-alert-div";let o=document.getElementById(n);null==o&&(o=document.createElement("div"),o.id=n,t.appendChild(o));const i=document.createElement("div");o.appendChild(i),r.createRoot(i).render(s.default.createElement(Yt,Ct({},e,{container:i})))},exports.JRButton=ct,exports.JRCheckbox=class extends er{renderer(){const{valueName:e="value",labelName:t="label"}=this.props,r=Array.isArray(this.getOptions()??[]),n=r?this.getOptions():[this.getOptions()],o=r?[...this.getValue()??[]]:this.getValue(),i=r?e=>o.indexOf(e)>-1:e=>e==o;return s.default.createElement(nr,{className:"jr-checkbox"},n?.map(((n,a)=>{const l=n[e];return s.default.createElement("label",{key:a},s.default.createElement("input",{type:"checkbox",multiple:r,value:l,checked:i(l),onChange:r?e=>{e.target.checked?o.push(l):o.splice(o.indexOf(l),1),this.setValue(o.length?o:null)}:e=>{this.setValue(e.target.checked?l:null)}}),n[t])})))}},exports.JRFields=class extends yt{UNSAFE_componentWillMount(){this.#o()}reset(){this.clearTestValue(),super.reset()}setValue(e,t){super.setValue(e,t),t&&this.clearTestValue()}#o(){"state"==this.validateValueFrom&&this.setState({validatorValue:{}})}get testValueFrom(){return void 0===this.props.testValue?"state":"props"}clearTestValue(){this.setTestValue({})}setTestValue(e,t){if("state"==this.testValueFrom)if(t){this.getTestValue()[t]=e,this.setState({testValue:{...this.getTestValue(),...e}})}else this.setState({testValue:e})}getTestValue(e){return e?this.state?.testValue?.[e]:this.state?.testValue}#s(e,t,r,n){const{name:o,validators:s,columns:i,type:a}=e,l=t.join("."),c=s?[...s]:[];if(e.required&&c.push(Pt),e.max&&c.push(zt),e.min&&c.push(Ft),c.length){r[l]={isValid:null,msg:[]};const t=[];for(let r=0;r<c.length;r++){const o=c[r].bind(this)(n,e);if(o?.then)t.push(o);else if("string"==typeof o){t.push(Promise.reject(o));break}}return Promise.all(t).then((e=>(r[l].isValid=!0,Promise.resolve(e)))).catch((e=>(r[l].msg.push(e),r[l].isValid=!1,Promise.reject(e))))}}#i(e,t,r,n,o){return e?.reduce(((e,t)=>{const{name:s,validators:i,columns:a,type:l}=t,c=s?[...r,s]:r;c.join(".");{const r=this.#s(t,c,n,s?o?.[s]:o);r&&e.push(r)}return a&&null==l&&this.#i(a,e,c,n,s?o?.[s]:o),e}),t)}validate(e){console.clear();const t=[],r=this.getTestValue()??{};return this.#i(this.getColumns(),t,[],r,void 0!==e?e:this.getValue()),Promise.all(t).then((e=>(this.setTestValue(r),Promise.resolve()))).catch((e=>(this.setTestValue(r),Promise.reject())))}get columnsFrom(){return void 0!==this.props.initColumns?"state":"props"}getColumns(){return this[this.columnsFrom]?.columns}createColumn(e,{type:t,name:r,colSpan:n,rowSpan:o,style:i,typeStyle:a,columnStyle:l,...c},d,u,h,p){const f=r?e?.[r]:e,m=c.gap??this.props.gap,g=c.label,w=Ge(i,this,{},{}),y=Ge(l,this,{},{});let b;n&&(w.gridColumn=`span ${n}`),o&&(w.gridRow=`span ${o}`);const x=t=>{const n=t?.target?.value??t;try{e[r]=n,this.setValue({...this.getValue()})}catch(e){const t=this.getValue()??{};Mt(r,n,t,[...u]),this.setValue(t)}const o=this.getTestValue()??{};this.#s(c,h,o,n)?.then((()=>{this.setTestValue(o)})).catch((()=>{this.setTestValue(o)}))},v=[...u];if(void 0!==r&&v.push(r),t){const r=Ge(a,this,null);b=s.default.createElement(Xt,{className:"jr-column-value",style:{gridColumn:null==g?"span 2":null,...y}},s.default.createElement(t,{value:f,onChange:x,record:e,style:{width:"100%",...r},...c}))}else c.columns?b=s.default.createElement(Ut,{cols:c.cols,className:"jr-grid",$gap:m,style:y},this.createColumns(f,c.columns,v,h,c.labelProps??this.props.labelProps)):(r||c.render)&&(b=s.default.createElement(Xt,{className:"jr-column-value",style:{gridColumn:null==g?"span 2":null,padding:c.render?"4px 0":null}},c.render?c.render.bind(this)({onChange:x,value:f,record:this.getValue()}):"object"==typeof f?JSON.stringify(f):f));const E=p?.layout,k=void 0===p?.colon?":":p.colon,S=c.labelProps?.style??this.props.labelProps?.style??{};return s.default.createElement(Ht,{$layout:E,$hasLabel:null!=g,key:`f${d}`,style:w,className:"jr-column",$labelWidth:c.labelProps?.width??this.props.labelProps?.width??"120px",$valueWidth:c.valueProps?.width??this.props.valueProps?.width??"1fr"},null!=g&&s.default.createElement(It,{style:S,$required:c.required,className:"label",$layout:E,$colon:k},g),b,s.default.createElement(Wt,{$layout:E},s.default.createElement("div",{className:"left"},this.getTestValue(v.join("."))?.msg?.map((e=>e))),s.default.createElement("div",{className:"right"})))}createColumns(e,t,r,n,o){return t?.map(((t,s)=>this.createColumn(e,t,s,r,t.name?[...n,t.name]:n,o)))}renderMe(){return s.default.createElement(Dt,{className:"jr-fields",style:this.props.typeStyle},s.default.createElement(Ut,{cols:this.props.cols,style:this.props.gridStyle,className:"jr-grid",$gap:this.props.gap},this.createColumns(this.props.dataSourceName?this.getValue()?.[this.props.dataSourceName]:this.getValue(),this.props.columns,this.props.dataSourceName?[this.props.dataSourceName]:[],this.props.dataSourceName?[this.props.dataSourceName]:[],this.props.labelProps)))}},exports.JRFrame=st,exports.JRMask=function({id:e="jr-mask"}){return s.default.createElement(Qe,{id:e,className:"jr-mask"},s.default.createElement("div",{id:`${e}-msg`}),s.default.createElement("div",{className:"cs-loader-inner"},s.default.createElement("label",null,"●"),s.default.createElement("label",null,"●"),s.default.createElement("label",null,"●"),s.default.createElement("label",null,"●"),s.default.createElement("label",null,"●"),s.default.createElement("label",null,"●")))},exports.JRRadio=class extends er{renderer(){const{valueName:e="value",labelName:t="label",onChange:r,...n}=this.props,o=this.getOptions();return s.default.createElement(nr,{className:"jr-radio"},o?.map(((r,n)=>{const o=r[e];return s.default.createElement("label",{key:n},s.default.createElement("input",{type:"radio",name:"radio",checked:this.getValue()==o,onClick:e=>{this.getValue()==o?(this.setValue(null),e.target.checked=!1):this.setValue(o)}}),r[t])})))}},exports.JRSelect=class extends er{renderer(){const{showBlank:e,valueName:t="value",labelName:r="label",multiple:n,size:o}=this.props,i=[...this.getOptions()??[]];return 1!=n&&0!=e&&i.unshift({[t]:"",[r]:""}),s.default.createElement(rr,{value:this.getValue()??(n?[]:""),className:"jr-select",onChange:e=>{if(n){const r=[...e.target.selectedOptions].map((e=>e.index));this.setValue(r.length?r.map((e=>i[e][t])):null)}else{const r=e.target.selectedOptions[0].index;this.setValue(r?i[r][t]:null)}},size:o,multiple:n},i.map(((e,o)=>{const i={value:e[t],key:o};return(n&&this.getValue()?.indexOf(e[t])>-1||this.getValue()==e[t])&&(i.className="selected"),s.default.createElement(tr,i,e[r])})))}},exports.JRSubmit=rt,exports.JRTable=class extends yt{constructor(e){super(e),this.colGroupRef=s.default.createRef()}UNSAFE_componentWillMount(){this.setColumns(this.props.columns??[])}checkableColumn(e){return{render:({value:e,onChange:t})=>s.default.createElement("checkbox",{checked:e,onChange:e=>{t(e.target.checked)}}),align:"center",name:"checked",...e}}deletableColumn({name:e="deletable",sendValue:t,sendName:r,valueName:n,...o}){return{render:({value:e,onChange:t})=>s.default.createElement("checkbox",{checked:e,onChange:e=>{t(e.target.checked)}}),align:"center",name:e,label(){return s.default.createElement("button",{onClick:()=>{const n=this.props.delete.value??this.getDataSource()?.filter((t=>t[e])).map((e=>t?e[t]:e)),s=this.props.delete.callback??function(e,t,r){this.reload()};this.delete({value:r?{[r]:n}:n,callback:s,...o})}},"刪除")},...o}}initColumn(e,t,r,n,o,s){const i=void 0===e.type&&e?.columns&&e?.columns.length,a=e.name?[...o,e.name]:o;if(i){null!==e.label&&r[t].push(e);const o=this.initColumns(e.columns,t+(null!==e.label?1:0)+(null!=e.rowSpan?e.rowSpan-1:0),r,n,a,s);return e.colSpan=o.colSpan,e.columnNo=s,{colSpan:e.colSpan}}return e.columnNo=s,r[t].push({...e,isLeaf:!0}),n.push(e),e.names=a,a?.length>1?(e.setValue=function(t,r){try{qt(t,[...a])[e.name]=r}catch{Jt(t,[...a],r)}},e.getValue=function(e){return a.reduce(((e,t)=>e?.[t]),e)}):(e.setValue=function(t,r){t[e.name]=r},e.getValue=function(t){return t[e.name]}),{colSpan:1}}initColumns(e,t,r,n,o,s){for(let e=r.length;e<=t;e++)r[e]||r.push([]);let i=s;const a=e?.reduce(((e,s)=>{const a=this.initColumn(s,t,r,n,o,i);return e.colSpan+=a.colSpan,i+=a.colSpan,e}),{colSpan:0});return a}setColumns([...e]){this.props.checkable&&e.unshift(this.checkableColumn(this.props.checkable)),this.props.deletable&&e.unshift(this.deletableColumn(this.props.deletable));const t=[],r=[];this.initColumns(e,0,t,r,[],0),this.setState({columns:t,leafColumns:r})}setDataSource(e){}getDataSource(){return this.props.dataSourceName?this.getValue()?.[this.props.dataSourceName]:this.getValue()}add(e,t=this.getDataSource()?.length??0,r){this.getDataSource()?(void 0===r?this.getDataSource().splice(t,0,e):this.getDataSource()[r].splice(t,0,e),this.setValue(this.getValue())):this.setValue(this.props.dataSourceName?{[this.props.dataSourceName]:[e]}:[e])}noData(){const e=this.getDataSource();return null==e||0==e.length}renderMe(){return s.default.createElement(Bt,{className:"jr-table "+(this.props.onRowClick?"row-highlightable":"")},s.default.createElement("table",{className:"jr-table-table"},s.default.createElement(Lt,{table:this,leafColumns:this.state.leafColumns,groupHeader:this.props.groupHeader,groupFooter:this.props.groupFooter,dataSource:this.getDataSource(),onRowClick:this.props.onRowClick}),s.default.createElement(Ot,{columns:this.props.footColumns,table:this}),s.default.createElement(St,{columns:this.state.columns,leafColumns:this.state.leafColumns,table:this})),this.noData()&&s.default.createElement("div",{className:"empty"}))}},exports.JRTestReact=class extends rt{renderer(){return s.default.createElement(Kt,{style:this.props.style,className:`${this.props.className} jr-frame`})}renderMe(){return s.default.createElement("div",{style:{flex:1}},"Render me")}},exports.JRText=class extends Zt{input(){return s.default.createElement(or,{value:this.props.value??"",onChange:e=>{this.setValue(e.target.value)}})}},exports.JRWindow=yt,exports.random=function(e=100,t=0){return Math.floor(Math.random()*(e+1-t))+t},exports.showMask=et;
558
+ `;exports.JRAlert=function(e){const t=document.body,n="jr-alert-div";let o=document.getElementById(n);null==o&&(o=document.createElement("div"),o.id=n,t.appendChild(o));const i=document.createElement("div");o.appendChild(i),r.createRoot(i).render(s.default.createElement(Zt,Nt({},e,{container:i})))},exports.JRButton=ut,exports.JRCheckbox=class extends rr{renderer(){const{valueName:e="value",labelName:t="label"}=this.props,r=Array.isArray(this.getOptions()??[]),n=r?this.getOptions():[this.getOptions()],o=r?[...this.getValue()??[]]:this.getValue(),i=r?e=>o.indexOf(e)>-1:e=>e==o;return s.default.createElement(sr,{className:"jr-checkbox"},n?.map(((n,a)=>{const l=n[e];return s.default.createElement("label",{key:a},s.default.createElement("input",{type:"checkbox",multiple:r,value:l,checked:i(l),onChange:r?e=>{e.target.checked?o.push(l):o.splice(o.indexOf(l),1),this.setValue(o.length?o:null)}:e=>{this.setValue(e.target.checked?l:null)}}),n[t])})))}},exports.JRFields=class extends xt{UNSAFE_componentWillMount(){this.#o()}reset(){this.clearTestValue(),super.reset()}setValue(e,t){super.setValue(e,t),t&&this.clearTestValue()}#o(){"state"==this.validateValueFrom&&this.setState({validatorValue:{}})}get testValueFrom(){return void 0===this.props.testValue?"state":"props"}clearTestValue(){this.setTestValue({})}setTestValue(e,t){if("state"==this.testValueFrom)if(t){this.getTestValue()[t]=e,this.setState({testValue:{...this.getTestValue(),...e}})}else this.setState({testValue:e})}getTestValue(e){return e?this.state?.testValue?.[e]:this.state?.testValue}#s(e,t,r,n){const{name:o,validators:s,columns:i,type:a}=e,l=t.join("."),c=s?[...s]:[];if(e.required&&c.push(Ft),e.max&&c.push(Mt),e.min&&c.push(Ut),c.length){r[l]={isValid:null,msg:[]};const t=[];for(let r=0;r<c.length;r++){const o=c[r].bind(this)(n,e);if(o?.then)t.push(o);else if("string"==typeof o){t.push(Promise.reject(o));break}}return Promise.all(t).then((e=>(r[l].isValid=!0,Promise.resolve(e)))).catch((e=>(r[l].msg.push(e),r[l].isValid=!1,Promise.reject(e))))}}#i(e,t,r,n,o){return e?.reduce(((e,t)=>{const{name:s,validators:i,columns:a,type:l}=t,c=s?[...r,s]:r;c.join(".");{const r=this.#s(t,c,n,s?o?.[s]:o);r&&e.push(r)}return a&&null==l&&this.#i(a,e,c,n,s?o?.[s]:o),e}),t)}validate(e){console.clear();const t=[],r=this.getTestValue()??{};return this.#i(this.getColumns(),t,[],r,void 0!==e?e:this.getValue()),Promise.all(t).then((e=>(this.setTestValue(r),Promise.resolve()))).catch((e=>(this.setTestValue(r),Promise.reject())))}get columnsFrom(){return void 0!==this.props.initColumns?"state":"props"}getColumns(){return this[this.columnsFrom]?.columns}createColumn(e,{type:t,name:r,colSpan:n,rowSpan:o,style:i,typeStyle:a,columnStyle:l,...c},d,u,h,p){const f=r?e?.[r]:e,m=c.gap??this.props.gap,g=c.label,w=Ge(i,this,{},{}),y=Ge(l,this,{},{});let b;n&&(w.gridColumn=`span ${n}`),o&&(w.gridRow=`span ${o}`);const x=t=>{const n=t?.target?.value??t;try{e[r]=n,this.setValue({...this.getValue()})}catch(e){const t=this.getValue()??{};It(r,n,t,[...u]),this.setValue(t)}const o=this.getTestValue()??{};this.#s(c,h,o,n)?.then((()=>{this.setTestValue(o)})).catch((()=>{this.setTestValue(o)}))},v=[...u];if(void 0!==r&&v.push(r),t){const r=Ge(a,this,null);b=s.default.createElement(qt,{className:"jr-column-value",style:{gridColumn:null==g?"span 2":null,...y}},s.default.createElement(t,{value:f,onChange:x,record:e,style:{width:"100%",...r},...c}))}else c.columns?b=s.default.createElement(Ht,{cols:c.cols,className:"jr-grid",$gap:m,style:y},this.createColumns(f,c.columns,v,h,c.labelProps??this.props.labelProps)):(r||c.render)&&(b=s.default.createElement(qt,{className:"jr-column-value",style:{gridColumn:null==g?"span 2":null,padding:c.render?"4px 0":null}},c.render?c.render.bind(this)({onChange:x,value:f,record:this.getValue()}):"object"==typeof f?JSON.stringify(f):f));const E=p?.layout,k=void 0===p?.colon?":":p.colon,S=c.labelProps?.style??this.props.labelProps?.style??{};return s.default.createElement(Xt,{$layout:E,$hasLabel:null!=g,key:`f${d}`,style:w,className:"jr-column",$labelWidth:c.labelProps?.width??this.props.labelProps?.width??"120px",$valueWidth:c.valueProps?.width??this.props.valueProps?.width??"1fr"},null!=g&&s.default.createElement(Wt,{style:S,$required:c.required,className:"label",$layout:E,$colon:k},g),b,s.default.createElement(Jt,{$layout:E},s.default.createElement("div",{className:"left"},this.getTestValue(v.join("."))?.msg?.map((e=>e))),s.default.createElement("div",{className:"right"})))}createColumns(e,t,r,n,o){return t?.map(((t,s)=>this.createColumn(e,t,s,r,t.name?[...n,t.name]:n,o)))}renderMe(){return s.default.createElement(zt,{className:"jr-fields",style:this.props.typeStyle},s.default.createElement(Ht,{cols:this.props.cols,style:this.props.gridStyle,className:"jr-grid",$gap:this.props.gap},this.createColumns(this.props.dataSourceName?this.getValue()?.[this.props.dataSourceName]:this.getValue(),this.props.columns,this.props.dataSourceName?[this.props.dataSourceName]:[],this.props.dataSourceName?[this.props.dataSourceName]:[],this.props.labelProps)))}},exports.JRFrame=at,exports.JRMask=function({id:e="jr-mask"}){return s.default.createElement(et,{id:e,className:"jr-mask"},s.default.createElement("div",{id:`${e}-msg`}),s.default.createElement("div",{className:"cs-loader-inner"},s.default.createElement("label",null,"●"),s.default.createElement("label",null,"●"),s.default.createElement("label",null,"●"),s.default.createElement("label",null,"●"),s.default.createElement("label",null,"●"),s.default.createElement("label",null,"●")))},exports.JRRadio=class extends rr{renderer(){const{valueName:e="value",labelName:t="label",onChange:r,...n}=this.props,o=this.getOptions();return s.default.createElement(sr,{className:"jr-radio"},o?.map(((r,n)=>{const o=r[e];return s.default.createElement("label",{key:n},s.default.createElement("input",{type:"radio",name:"radio",checked:this.getValue()==o,onClick:e=>{this.getValue()==o?(this.setValue(null),e.target.checked=!1):this.setValue(o)}}),r[t])})))}},exports.JRSelect=class extends rr{renderer(){const{showBlank:e,valueName:t="value",labelName:r="label",multiple:n,size:o}=this.props,i=[...this.getOptions()??[]];return 1!=n&&0!=e&&i.unshift({[t]:"",[r]:""}),s.default.createElement(or,{value:this.getValue()??(n?[]:""),className:"jr-select",onChange:e=>{if(n){const r=[...e.target.selectedOptions].map((e=>e.index));this.setValue(r.length?r.map((e=>i[e][t])):null)}else{const r=e.target.selectedOptions[0].index;this.setValue(r?i[r][t]:null)}},size:o,multiple:n},i.map(((e,o)=>{const i={value:e[t],key:o};return(n&&this.getValue()?.indexOf(e[t])>-1||this.getValue()==e[t])&&(i.className="selected"),s.default.createElement(nr,i,e[r])})))}},exports.JRSubmit=ot,exports.JRTable=class extends xt{constructor(e){super(e),this.colGroupRef=s.default.createRef()}UNSAFE_componentWillMount(){this.setColumns(this.props.columns??[])}checkableColumn(e){return{render:({value:e,onChange:t})=>s.default.createElement("checkbox",{checked:e,onChange:e=>{t(e.target.checked)}}),align:"center",name:"checked",...e}}deletableColumn({name:e="deletable",sendValue:t,sendName:r,valueName:n,...o}){return{render:({value:e,onChange:t})=>s.default.createElement("checkbox",{checked:e,onChange:e=>{t(e.target.checked)}}),align:"center",name:e,label(){return s.default.createElement("button",{onClick:()=>{const n=this.props.delete.value??this.getDataSource()?.filter((t=>t[e])).map((e=>t?e[t]:e)),s=this.props.delete.callback??function(e,t,r){this.reload()};this.delete({value:r?{[r]:n}:n,callback:s,...o})}},"刪除")},...o}}initColumn(e,t,r,n,o,s){const i=void 0===e.type&&e?.columns&&e?.columns.length,a=e.name?[...o,e.name]:o;if(i){null!==e.label&&r[t].push(e);const o=this.initColumns(e.columns,t+(null!==e.label?1:0)+(null!=e.rowSpan?e.rowSpan-1:0),r,n,a,s);return e.colSpan=o.colSpan,e.columnNo=s,{colSpan:e.colSpan}}return e.columnNo=s,r[t].push({...e,isLeaf:!0}),n.push(e),e.names=a,a?.length>1?(e.setValue=function(t,r){try{Kt(t,[...a])[e.name]=r}catch{Gt(t,[...a],r)}},e.getValue=function(e){return a.reduce(((e,t)=>e?.[t]),e)}):(e.setValue=function(t,r){t[e.name]=r},e.getValue=function(t){return t[e.name]}),{colSpan:1}}initColumns(e,t,r,n,o,s){for(let e=r.length;e<=t;e++)r[e]||r.push([]);let i=s;const a=e?.reduce(((e,s)=>{const a=this.initColumn(s,t,r,n,o,i);return e.colSpan+=a.colSpan,i+=a.colSpan,e}),{colSpan:0});return a}setColumns([...e]){this.props.checkable&&e.unshift(this.checkableColumn(this.props.checkable)),this.props.deletable&&e.unshift(this.deletableColumn(this.props.deletable));const t=[],r=[];this.initColumns(e,0,t,r,[],0),this.setState({columns:t,leafColumns:r})}setDataSource(e){}getDataSource(){return this.props.dataSourceName?this.getValue()?.[this.props.dataSourceName]:this.getValue()}add(e,t=this.getDataSource()?.length??0,r){this.getDataSource()?(void 0===r?this.getDataSource().splice(t,0,e):this.getDataSource()[r].splice(t,0,e),this.setValue(this.getValue())):this.setValue(this.props.dataSourceName?{[this.props.dataSourceName]:[e]}:[e])}noData(){const e=this.getDataSource();return null==e||0==e.length}renderMe(){return s.default.createElement(Pt,{className:"jr-table "+(this.props.onRowClick?"row-highlightable":"")},s.default.createElement("table",{className:"jr-table-table"},s.default.createElement(Dt,{table:this,leafColumns:this.state.leafColumns,groupHeader:this.props.groupHeader,groupFooter:this.props.groupFooter,dataSource:this.getDataSource(),onRowClick:this.props.onRowClick}),s.default.createElement(jt,{columns:this.props.footColumns,table:this}),s.default.createElement(Ot,{columns:this.state.columns,leafColumns:this.state.leafColumns,table:this})),this.noData()&&s.default.createElement("div",{className:"empty"}))}},exports.JRTestReact=class extends ot{renderer(){return s.default.createElement(Yt,{style:this.props.style,className:`${this.props.className} jr-frame`})}renderMe(){return s.default.createElement("div",{style:{flex:1}},"Render me")}},exports.JRText=class extends tr{input(){return s.default.createElement(ir,{value:this.props.value??"",onChange:e=>{this.setValue(e.target.value)}})}},exports.JRWindow=xt,exports.random=Ye,exports.showMask=rt;