ubk.erp.webpack 1.0.0
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/README.md +64 -0
- package/dist/index.cjs +30 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +4225 -0
- package/package.json +42 -0
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# @send2biplab/ubk.erp.webpack
|
|
2
|
+
|
|
3
|
+
UBK internal React component library.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
You can install the package using npm:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @send2biplab/ubk.erp.webpack
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Peer Dependencies
|
|
14
|
+
|
|
15
|
+
Ensure you have the following peer dependencies installed in your project:
|
|
16
|
+
|
|
17
|
+
- `react` (>= 18)
|
|
18
|
+
- `react-dom` (>= 18)
|
|
19
|
+
- `antd` (>= 5)
|
|
20
|
+
- `swr` (>= 2)
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
Here is a basic example of how to use the components provided by this library:
|
|
25
|
+
|
|
26
|
+
```jsx
|
|
27
|
+
import React from 'react';
|
|
28
|
+
import { MenuSubmenu } from "@send2biplab/ubk.erp.webpack";
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
const App = () => {
|
|
32
|
+
const token = "123";
|
|
33
|
+
return (
|
|
34
|
+
<div>
|
|
35
|
+
<MenuSubmenu token={token} menu={"FrontOffice"} />
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default App;
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Available Components
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
- `AdmissionEnquiry`
|
|
48
|
+
```jsx
|
|
49
|
+
import { AdmissionEnquiry } from "@send2biplab/ubk.erp.webpack";
|
|
50
|
+
|
|
51
|
+
const App = () => {
|
|
52
|
+
const token = "123";
|
|
53
|
+
return (
|
|
54
|
+
<div>
|
|
55
|
+
<AdmissionEnquiry token={token} type={'table'} />
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default App;
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),I=require("antd"),an=require("swr"),oe=require("react"),Ze=require("swr/mutation"),be=require("@ant-design/icons"),qn=require("react-dom/server"),Bn=()=>w.jsxs(I.Card,{style:{borderRadius:16},children:[w.jsx(I.Typography.Title,{level:3,style:{marginTop:0},children:"UBK ERP"}),w.jsx(I.Typography.Paragraph,{style:{marginBottom:0},children:"Welcome to your webpack-powered ERP system."})]}),pe=({width:e,height:t,display:n,justifyContent:r,alignItems:o,flexDirection:s,gap:i,style:a,children:m,...l})=>{const c={width:e,height:t,display:n,justifyContent:r,alignItems:o,flexDirection:s,gap:i,...a};return w.jsx("div",{style:c,...l,children:m})},Hn=({variant:e,fontWeight:t,style:n,children:r,...o})=>{const s=t==="bold"?700:t==="light"?300:t;return e==="h1"?w.jsx(I.Typography.Title,{level:1,style:{fontWeight:s,...n},...o,children:r}):e==="h2"?w.jsx(I.Typography.Title,{level:2,style:{fontWeight:s,...n},...o,children:r}):e==="h3"?w.jsx(I.Typography.Title,{level:3,style:{fontWeight:s,...n},...o,children:r}):e==="h4"?w.jsx(I.Typography.Title,{level:4,style:{fontWeight:s,...n},...o,children:r}):e==="h5"?w.jsx(I.Typography.Title,{level:5,style:{fontWeight:s,...n},...o,children:r}):w.jsx(I.Typography.Text,{style:{fontWeight:s,...n},...o,children:r})};function cn({title:e="",icon:t="",path:n="",onClick:r}){const o=()=>{if(r){r(n);return}typeof window<"u"&&typeof n=="string"&&n.length>0&&window.location.assign(n)};return w.jsxs(I.Card,{hoverable:!0,onClick:o,style:{borderRadius:12,overflow:"hidden",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.10)"},bodyStyle:{padding:0,cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"stretch"},children:[w.jsx(pe,{width:"100%",display:"flex",justifyContent:"center",alignItems:"center",style:{padding:"10px 12px",minHeight:80},children:w.jsx("img",{src:t,alt:"",style:{width:45,height:50,objectFit:"contain"}})}),w.jsx(pe,{style:{padding:"0 12px"},children:w.jsx(I.Divider,{style:{margin:0,minWidth:0}})}),w.jsx(pe,{style:{padding:"10px 10px",display:"flex",justifyContent:"center",alignItems:"center",minHeight:35},children:w.jsx(Hn,{variant:"button",fontWeight:"bold",style:{fontSize:12},children:e})})]})}function ln(e,t){return function(){return e.apply(t,arguments)}}const{toString:Wn}=Object.prototype,{getPrototypeOf:Ve}=Object,{iterator:Ye,toStringTag:un}=Symbol,Je=(e=>t=>{const n=Wn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),me=e=>(e=e.toLowerCase(),t=>Je(t)===e),Ke=e=>t=>typeof t===e,{isArray:Re}=Array,Te=Ke("undefined");function je(e){return e!==null&&!Te(e)&&e.constructor!==null&&!Te(e.constructor)&&ue(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const fn=me("ArrayBuffer");function zn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&fn(e.buffer),t}const Vn=Ke("string"),ue=Ke("function"),dn=Ke("number"),De=e=>e!==null&&typeof e=="object",Yn=e=>e===!0||e===!1,Ue=e=>{if(Je(e)!=="object")return!1;const t=Ve(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(un in e)&&!(Ye in e)},Jn=e=>{if(!De(e)||je(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Kn=me("Date"),Xn=me("File"),Gn=e=>!!(e&&typeof e.uri<"u"),Zn=e=>e&&typeof e.getParts<"u",Qn=me("Blob"),er=me("FileList"),tr=e=>De(e)&&ue(e.pipe);function nr(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const xt=nr(),St=typeof xt.FormData<"u"?xt.FormData:void 0,rr=e=>{if(!e)return!1;if(St&&e instanceof St)return!0;const t=Ve(e);if(!t||t===Object.prototype||!ue(e.append))return!1;const n=Je(e);return n==="formdata"||n==="object"&&ue(e.toString)&&e.toString()==="[object FormData]"},or=me("URLSearchParams"),[sr,ir,ar,cr]=["ReadableStream","Request","Response","Headers"].map(me),lr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ne(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Re(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(je(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(r=0;r<i;r++)a=s[r],t.call(null,e[a],a,e)}}function pn(e,t){if(je(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const ge=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hn=e=>!Te(e)&&e!==ge;function dt(){const{caseless:e,skipUndefined:t}=hn(this)&&this||{},n={},r=(o,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const i=e&&pn(n,s)||s;Ue(n[i])&&Ue(o)?n[i]=dt(n[i],o):Ue(o)?n[i]=dt({},o):Re(o)?n[i]=o.slice():(!t||!Te(o))&&(n[i]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&Ne(arguments[o],r);return n}const ur=(e,t,n,{allOwnKeys:r}={})=>(Ne(t,(o,s)=>{n&&ue(o)?Object.defineProperty(e,s,{value:ln(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),fr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),dr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},pr=(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&Ve(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},hr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},mr=e=>{if(!e)return null;if(Re(e))return e;let t=e.length;if(!dn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},yr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ve(Uint8Array)),br=(e,t)=>{const r=(e&&e[Ye]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},gr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},wr=me("HTMLFormElement"),Er=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Tt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),vr=me("RegExp"),mn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ne(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},_r=e=>{mn(e,(t,n)=>{if(ue(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ue(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},xr=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Re(e)?r(e):r(String(e).split(t)),n},Sr=()=>{},Tr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Rr(e){return!!(e&&ue(e.append)&&e[un]==="FormData"&&e[Ye])}const Or=e=>{const t=new Array(10),n=(r,o)=>{if(De(r)){if(t.indexOf(r)>=0)return;if(je(r))return r;if(!("toJSON"in r)){t[o]=r;const s=Re(r)?[]:{};return Ne(r,(i,a)=>{const m=n(i,o+1);!Te(m)&&(s[a]=m)}),t[o]=void 0,s}}return r};return n(e,0)},Cr=me("AsyncFunction"),Pr=e=>e&&(De(e)||ue(e))&&ue(e.then)&&ue(e.catch),yn=((e,t)=>e?setImmediate:t?((n,r)=>(ge.addEventListener("message",({source:o,data:s})=>{o===ge&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ge.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ue(ge.postMessage)),Ar=typeof queueMicrotask<"u"?queueMicrotask.bind(ge):typeof process<"u"&&process.nextTick||yn,jr=e=>e!=null&&ue(e[Ye]),d={isArray:Re,isArrayBuffer:fn,isBuffer:je,isFormData:rr,isArrayBufferView:zn,isString:Vn,isNumber:dn,isBoolean:Yn,isObject:De,isPlainObject:Ue,isEmptyObject:Jn,isReadableStream:sr,isRequest:ir,isResponse:ar,isHeaders:cr,isUndefined:Te,isDate:Kn,isFile:Xn,isReactNativeBlob:Gn,isReactNative:Zn,isBlob:Qn,isRegExp:vr,isFunction:ue,isStream:tr,isURLSearchParams:or,isTypedArray:yr,isFileList:er,forEach:Ne,merge:dt,extend:ur,trim:lr,stripBOM:fr,inherits:dr,toFlatObject:pr,kindOf:Je,kindOfTest:me,endsWith:hr,toArray:mr,forEachEntry:br,matchAll:gr,isHTMLForm:wr,hasOwnProperty:Tt,hasOwnProp:Tt,reduceDescriptors:mn,freezeMethods:_r,toObjectSet:xr,toCamelCase:Er,noop:Sr,toFiniteNumber:Tr,findKey:pn,global:ge,isContextDefined:hn,isSpecCompliantForm:Rr,toJSONObject:Or,isAsyncFn:Cr,isThenable:Pr,setImmediate:yn,asap:Ar,isIterable:jr};let U=class bn extends Error{static from(t,n,r,o,s,i){const a=new bn(t.message,n||t.code,r,o,s);return a.cause=t,a.name=t.name,t.status!=null&&a.status==null&&(a.status=t.status),i&&Object.assign(a,i),a}constructor(t,n,r,o,s){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){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:d.toJSONObject(this.config),code:this.code,status:this.status}}};U.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";U.ERR_BAD_OPTION="ERR_BAD_OPTION";U.ECONNABORTED="ECONNABORTED";U.ETIMEDOUT="ETIMEDOUT";U.ERR_NETWORK="ERR_NETWORK";U.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";U.ERR_DEPRECATED="ERR_DEPRECATED";U.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";U.ERR_BAD_REQUEST="ERR_BAD_REQUEST";U.ERR_CANCELED="ERR_CANCELED";U.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";U.ERR_INVALID_URL="ERR_INVALID_URL";U.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Dr=null;function pt(e){return d.isPlainObject(e)||d.isArray(e)}function gn(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function Qe(e,t,n){return e?e.concat(t).map(function(o,s){return o=gn(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Nr(e){return d.isArray(e)&&!e.some(pt)}const $r=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Xe(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,R){return!d.isUndefined(R[f])});const r=n.metaTokens,o=n.visitor||p,s=n.dots,i=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,m=n.maxDepth===void 0?100:n.maxDepth,l=a&&d.isSpecCompliantForm(t);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function c(u){if(u===null)return"";if(d.isDate(u))return u.toISOString();if(d.isBoolean(u))return u.toString();if(!l&&d.isBlob(u))throw new U("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(u)||d.isTypedArray(u)?l&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function p(u,f,R){let k=u;if(d.isReactNative(t)&&d.isReactNativeBlob(u))return t.append(Qe(R,f,s),c(u)),!1;if(u&&!R&&typeof u=="object"){if(d.endsWith(f,"{}"))f=r?f:f.slice(0,-2),u=JSON.stringify(u);else if(d.isArray(u)&&Nr(u)||(d.isFileList(u)||d.endsWith(f,"[]"))&&(k=d.toArray(u)))return f=gn(f),k.forEach(function($,v){!(d.isUndefined($)||$===null)&&t.append(i===!0?Qe([f],v,s):i===null?f:f+"[]",c($))}),!1}return pt(u)?!0:(t.append(Qe(R,f,s),c(u)),!1)}const x=[],b=Object.assign($r,{defaultVisitor:p,convertValue:c,isVisitable:pt});function h(u,f,R=0){if(!d.isUndefined(u)){if(R>m)throw new U("Object is too deeply nested ("+R+" levels). Max depth: "+m,U.ERR_FORM_DATA_DEPTH_EXCEEDED);if(x.indexOf(u)!==-1)throw Error("Circular reference detected in "+f.join("."));x.push(u),d.forEach(u,function(P,$){(!(d.isUndefined(P)||P===null)&&o.call(t,P,d.isString($)?$.trim():$,f,b))===!0&&h(P,f?f.concat($):[$],R+1)}),x.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return h(e),t}function Rt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function yt(e,t){this._pairs=[],e&&Xe(e,this,t)}const wn=yt.prototype;wn.append=function(t,n){this._pairs.push([t,n])};wn.toString=function(t){const n=t?function(r){return t.call(this,r,Rt)}:Rt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Mr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function En(e,t,n){if(!t)return e;const r=n&&n.encode||Mr,o=d.isFunction(n)?{serialize:n}:n,s=o&&o.serialize;let i;if(s?i=s(t,o):i=d.isURLSearchParams(t)?t.toString():new yt(t,o).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ot{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(r){r!==null&&t(r)})}}const bt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},kr=typeof URLSearchParams<"u"?URLSearchParams:yt,Fr=typeof FormData<"u"?FormData:null,Ir=typeof Blob<"u"?Blob:null,Lr={isBrowser:!0,classes:{URLSearchParams:kr,FormData:Fr,Blob:Ir},protocols:["http","https","file","blob","url","data"]},gt=typeof window<"u"&&typeof document<"u",ht=typeof navigator=="object"&&navigator||void 0,Ur=gt&&(!ht||["ReactNative","NativeScript","NS"].indexOf(ht.product)<0),qr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Br=gt&&window.location.href||"http://localhost",Hr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:gt,hasStandardBrowserEnv:Ur,hasStandardBrowserWebWorkerEnv:qr,navigator:ht,origin:Br},Symbol.toStringTag,{value:"Module"})),ce={...Hr,...Lr};function Wr(e,t){return Xe(e,new ce.classes.URLSearchParams,{visitor:function(n,r,o,s){return ce.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function zr(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Vr(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function vn(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),m=s>=n.length;return i=!i&&d.isArray(o)?o.length:i,m?(d.hasOwnProp(o,i)?o[i]=d.isArray(o[i])?o[i].concat(r):[o[i],r]:o[i]=r,!a):((!o[i]||!d.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&d.isArray(o[i])&&(o[i]=Vr(o[i])),!a)}if(d.isFormData(e)&&d.isFunction(e.entries)){const n={};return d.forEachEntry(e,(r,o)=>{t(zr(r),o,n,0)}),n}return null}const xe=(e,t)=>e!=null&&d.hasOwnProp(e,t)?e[t]:void 0;function Yr(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const $e={transitional:bt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=d.isObject(t);if(s&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return o?JSON.stringify(vn(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){const m=xe(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Wr(t,m).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=xe(this,"env"),c=l&&l.FormData;return Xe(a?{"files[]":t}:t,c&&new c,m)}}return s||o?(n.setContentType("application/json",!1),Yr(t)):t}],transformResponse:[function(t){const n=xe(this,"transitional")||$e.transitional,r=n&&n.forcedJSONParsing,o=xe(this,"responseType"),s=o==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(r&&!o||s)){const a=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,xe(this,"parseReviver"))}catch(m){if(a)throw m.name==="SyntaxError"?U.from(m,U.ERR_BAD_RESPONSE,this,null,xe(this,"response")):m}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ce.classes.FormData,Blob:ce.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{$e.headers[e]={}});const Jr=d.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"]),Kr=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
+
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&Jr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ct=Symbol("internals"),Xr=/[^\x09\x20-\x7E\x80-\xFF]/g;function Gr(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function Oe(e){return e&&String(e).trim().toLowerCase()}function Zr(e){return Gr(e.replace(Xr,""))}function qe(e){return e===!1||e==null?e:d.isArray(e)?e.map(qe):Zr(String(e))}function Qr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const eo=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function et(e,t,n,r,o){if(d.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!d.isString(t)){if(d.isString(r))return t.indexOf(r)!==-1;if(d.isRegExp(r))return r.test(t)}}function to(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function no(e,t){const n=d.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}let fe=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(a,m,l){const c=Oe(m);if(!c)throw new Error("header name must be a non-empty string");const p=d.findKey(o,c);(!p||o[p]===void 0||l===!0||l===void 0&&o[p]!==!1)&&(o[p||m]=qe(a))}const i=(a,m)=>d.forEach(a,(l,c)=>s(l,c,m));if(d.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(d.isString(t)&&(t=t.trim())&&!eo(t))i(Kr(t),n);else if(d.isObject(t)&&d.isIterable(t)){let a={},m,l;for(const c of t){if(!d.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[l=c[0]]=(m=a[l])?d.isArray(m)?[...m,c[1]]:[m,c[1]]:c[1]}i(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=Oe(t),t){const r=d.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Qr(o);if(d.isFunction(n))return n.call(this,o,r);if(d.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Oe(t),t){const r=d.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||et(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=Oe(i),i){const a=d.findKey(r,i);a&&(!n||et(r,r[a],a,n))&&(delete r[a],o=!0)}}return d.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||et(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return d.forEach(this,(o,s)=>{const i=d.findKey(r,s);if(i){n[i]=qe(o),delete n[s];return}const a=t?to(s):String(s).trim();a!==s&&delete n[s],n[a]=qe(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return d.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&d.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ct]=this[Ct]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=Oe(i);r[a]||(no(o,i),r[a]=!0)}return d.isArray(t)?t.forEach(s):s(t),this}};fe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(fe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});d.freezeMethods(fe);function tt(e,t){const n=this||$e,r=t||n,o=fe.from(r.headers);let s=r.data;return d.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function _n(e){return!!(e&&e.__CANCEL__)}let Me=class extends U{constructor(t,n,r){super(t??"canceled",U.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function xn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new U("Request failed with status code "+n.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ro(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function oo(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(m){const l=Date.now(),c=r[s];i||(i=l),n[o]=m,r[o]=l;let p=s,x=0;for(;p!==o;)x+=n[p++],p=p%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const b=c&&l-c;return b?Math.round(x*1e3/b):void 0}}function so(e,t){let n=0,r=1e3/t,o,s;const i=(l,c=Date.now())=>{n=c,o=null,s&&(clearTimeout(s),s=null),e(...l)};return[(...l)=>{const c=Date.now(),p=c-n;p>=r?i(l,c):(o=l,s||(s=setTimeout(()=>{s=null,i(o)},r-p)))},()=>o&&i(o)]}const We=(e,t,n=3)=>{let r=0;const o=oo(50,250);return so(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,m=a!=null?Math.min(i,a):i,l=Math.max(0,m-r),c=o(l);r=Math.max(r,m);const p={loaded:m,total:a,progress:a?m/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a?(a-m)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(p)},n)},Pt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},At=e=>(...t)=>d.asap(()=>e(...t)),io=ce.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ce.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ce.origin),ce.navigator&&/(msie|trident)/i.test(ce.navigator.userAgent)):()=>!0,ao=ce.hasStandardBrowserEnv?{write(e,t,n,r,o,s,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];d.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),d.isString(r)&&a.push(`path=${r}`),d.isString(o)&&a.push(`domain=${o}`),s===!0&&a.push("secure"),d.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function co(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lo(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Sn(e,t,n){let r=!co(t);return e&&(r||n===!1)?lo(e,t):t}const jt=e=>e instanceof fe?{...e}:e;function Ee(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(l,c,p,x){return d.isPlainObject(l)&&d.isPlainObject(c)?d.merge.call({caseless:x},l,c):d.isPlainObject(c)?d.merge({},c):d.isArray(c)?c.slice():c}function o(l,c,p,x){if(d.isUndefined(c)){if(!d.isUndefined(l))return r(void 0,l,p,x)}else return r(l,c,p,x)}function s(l,c){if(!d.isUndefined(c))return r(void 0,c)}function i(l,c){if(d.isUndefined(c)){if(!d.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function a(l,c,p){if(d.hasOwnProp(t,p))return r(l,c);if(d.hasOwnProp(e,p))return r(void 0,l)}const m={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,allowedSocketPaths:i,responseEncoding:i,validateStatus:a,headers:(l,c,p)=>o(jt(l),jt(c),p,!0)};return d.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const p=d.hasOwnProp(m,c)?m[c]:o,x=d.hasOwnProp(e,c)?e[c]:void 0,b=d.hasOwnProp(t,c)?t[c]:void 0,h=p(x,b,c);d.isUndefined(h)&&p!==a||(n[c]=h)}),n}const Tn=e=>{const t=Ee({},e),n=x=>d.hasOwnProp(t,x)?t[x]:void 0,r=n("data");let o=n("withXSRFToken");const s=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const m=n("auth"),l=n("baseURL"),c=n("allowAbsoluteUrls"),p=n("url");if(t.headers=a=fe.from(a),t.url=En(Sn(l,p,c),e.params,e.paramsSerializer),m&&a.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?unescape(encodeURIComponent(m.password)):""))),d.isFormData(r)){if(ce.hasStandardBrowserEnv||ce.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(d.isFunction(r.getHeaders)){const x=r.getHeaders(),b=["content-type","content-length"];Object.entries(x).forEach(([h,u])=>{b.includes(h.toLowerCase())&&a.set(h,u)})}}if(ce.hasStandardBrowserEnv&&(d.isFunction(o)&&(o=o(t)),o===!0||o==null&&io(t.url))){const b=s&&i&&ao.read(i);b&&a.set(s,b)}return t},uo=typeof XMLHttpRequest<"u",fo=uo&&function(e){return new Promise(function(n,r){const o=Tn(e);let s=o.data;const i=fe.from(o.headers).normalize();let{responseType:a,onUploadProgress:m,onDownloadProgress:l}=o,c,p,x,b,h;function u(){b&&b(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let f=new XMLHttpRequest;f.open(o.method.toUpperCase(),o.url,!0),f.timeout=o.timeout;function R(){if(!f)return;const P=fe.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),v={data:!a||a==="text"||a==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:P,config:e,request:f};xn(function(te){n(te),u()},function(te){r(te),u()},v),f=null}"onloadend"in f?f.onloadend=R:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(R)},f.onabort=function(){f&&(r(new U("Request aborted",U.ECONNABORTED,e,f)),f=null)},f.onerror=function($){const v=$&&$.message?$.message:"Network Error",G=new U(v,U.ERR_NETWORK,e,f);G.event=$||null,r(G),f=null},f.ontimeout=function(){let $=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const v=o.transitional||bt;o.timeoutErrorMessage&&($=o.timeoutErrorMessage),r(new U($,v.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,e,f)),f=null},s===void 0&&i.setContentType(null),"setRequestHeader"in f&&d.forEach(i.toJSON(),function($,v){f.setRequestHeader(v,$)}),d.isUndefined(o.withCredentials)||(f.withCredentials=!!o.withCredentials),a&&a!=="json"&&(f.responseType=o.responseType),l&&([x,h]=We(l,!0),f.addEventListener("progress",x)),m&&f.upload&&([p,b]=We(m),f.upload.addEventListener("progress",p),f.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(c=P=>{f&&(r(!P||P.type?new Me(null,e,f):P),f.abort(),f=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const k=ro(o.url);if(k&&ce.protocols.indexOf(k)===-1){r(new U("Unsupported protocol "+k+":",U.ERR_BAD_REQUEST,e));return}f.send(s||null)})},po=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(l){if(!o){o=!0,a();const c=l instanceof Error?l:this.reason;r.abort(c instanceof U?c:new Me(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,s(new U(`timeout of ${t}ms exceeded`,U.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:m}=r;return m.unsubscribe=()=>d.asap(a),m}},ho=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},mo=async function*(e,t){for await(const n of yo(e))yield*ho(n,t)},yo=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Dt=(e,t,n,r)=>{const o=mo(e,t);let s=0,i,a=m=>{i||(i=!0,r&&r(m))};return new ReadableStream({async pull(m){try{const{done:l,value:c}=await o.next();if(l){a(),m.close();return}let p=c.byteLength;if(n){let x=s+=p;n(x)}m.enqueue(new Uint8Array(c))}catch(l){throw a(l),l}},cancel(m){return a(m),o.return()}},{highWaterMark:2})},Nt=64*1024,{isFunction:Fe}=d,bo=(({Request:e,Response:t})=>({Request:e,Response:t}))(d.global),{ReadableStream:$t,TextEncoder:Mt}=d.global,kt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},go=e=>{e=d.merge.call({skipUndefined:!0},bo,e);const{fetch:t,Request:n,Response:r}=e,o=t?Fe(t):typeof fetch=="function",s=Fe(n),i=Fe(r);if(!o)return!1;const a=o&&Fe($t),m=o&&(typeof Mt=="function"?(h=>u=>h.encode(u))(new Mt):async h=>new Uint8Array(await new n(h).arrayBuffer())),l=s&&a&&kt(()=>{let h=!1;const u=new n(ce.origin,{body:new $t,method:"POST",get duplex(){return h=!0,"half"}}),f=u.headers.has("Content-Type");return u.body!=null&&u.body.cancel(),h&&!f}),c=i&&a&&kt(()=>d.isReadableStream(new r("").body)),p={stream:c&&(h=>h.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!p[h]&&(p[h]=(u,f)=>{let R=u&&u[h];if(R)return R.call(u);throw new U(`Response type '${h}' is not supported`,U.ERR_NOT_SUPPORT,f)})});const x=async h=>{if(h==null)return 0;if(d.isBlob(h))return h.size;if(d.isSpecCompliantForm(h))return(await new n(ce.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(d.isArrayBufferView(h)||d.isArrayBuffer(h))return h.byteLength;if(d.isURLSearchParams(h)&&(h=h+""),d.isString(h))return(await m(h)).byteLength},b=async(h,u)=>{const f=d.toFiniteNumber(h.getContentLength());return f??x(u)};return async h=>{let{url:u,method:f,data:R,signal:k,cancelToken:P,timeout:$,onDownloadProgress:v,onUploadProgress:G,responseType:te,headers:se,withCredentials:re="same-origin",fetchOptions:Z}=Tn(h),A=t||fetch;te=te?(te+"").toLowerCase():"text";let F=po([k,P&&P.toAbortSignal()],$),Q=null;const T=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let S;try{if(G&&l&&f!=="get"&&f!=="head"&&(S=await b(se,R))!==0){let E=new n(u,{method:"POST",body:R,duplex:"half"}),j;if(d.isFormData(R)&&(j=E.headers.get("content-type"))&&se.setContentType(j),E.body){const[N,D]=Pt(S,We(At(G)));R=Dt(E.body,Nt,N,D)}}d.isString(re)||(re=re?"include":"omit");const g=s&&"credentials"in n.prototype;if(d.isFormData(R)){const E=se.getContentType();E&&/^multipart\/form-data/i.test(E)&&!/boundary=/i.test(E)&&se.delete("content-type")}const C={...Z,signal:F,method:f.toUpperCase(),headers:se.normalize().toJSON(),body:R,duplex:"half",credentials:g?re:void 0};Q=s&&new n(u,C);let _=await(s?A(Q,Z):A(u,C));const M=c&&(te==="stream"||te==="response");if(c&&(v||M&&T)){const E={};["status","statusText","headers"].forEach(q=>{E[q]=_[q]});const j=d.toFiniteNumber(_.headers.get("content-length")),[N,D]=v&&Pt(j,We(At(v),!0))||[];_=new r(Dt(_.body,Nt,N,()=>{D&&D(),T&&T()}),E)}te=te||"text";let y=await p[d.findKey(p,te)||"text"](_,h);return!M&&T&&T(),await new Promise((E,j)=>{xn(E,j,{data:y,headers:fe.from(_.headers),status:_.status,statusText:_.statusText,config:h,request:Q})})}catch(g){throw T&&T(),g&&g.name==="TypeError"&&/Load failed|fetch/i.test(g.message)?Object.assign(new U("Network Error",U.ERR_NETWORK,h,Q,g&&g.response),{cause:g.cause||g}):U.from(g,g&&g.code,h,Q,g&&g.response)}}},wo=new Map,Rn=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let i=s.length,a=i,m,l,c=wo;for(;a--;)m=s[a],l=c.get(m),l===void 0&&c.set(m,l=a?new Map:go(t)),c=l;return l};Rn();const wt={http:Dr,xhr:fo,fetch:{get:Rn}};d.forEach(wt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ft=e=>`- ${e}`,Eo=e=>d.isFunction(e)||e===null||e===!1;function vo(e,t){e=d.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let i=0;i<n;i++){r=e[i];let a;if(o=r,!Eo(r)&&(o=wt[(a=String(r)).toLowerCase()],o===void 0))throw new U(`Unknown adapter '${a}'`);if(o&&(d.isFunction(o)||(o=o.get(t))))break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([m,l])=>`adapter ${m} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
|
|
4
|
+
`+i.map(Ft).join(`
|
|
5
|
+
`):" "+Ft(i[0]):"as no adapter specified";throw new U("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const On={getAdapter:vo,adapters:wt};function nt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Me(null,e)}function It(e){return nt(e),e.headers=fe.from(e.headers),e.data=tt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),On.getAdapter(e.adapter||$e.adapter,e)(e).then(function(r){return nt(e),r.data=tt.call(e,e.transformResponse,r),r.headers=fe.from(r.headers),r},function(r){return _n(r)||(nt(e),r&&r.response&&(r.response.data=tt.call(e,e.transformResponse,r.response),r.response.headers=fe.from(r.response.headers))),Promise.reject(r)})}const Cn="1.15.2",Ge={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ge[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Lt={};Ge.transitional=function(t,n,r){function o(s,i){return"[Axios v"+Cn+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(t===!1)throw new U(o(i," has been removed"+(n?" in "+n:"")),U.ERR_DEPRECATED);return n&&!Lt[i]&&(Lt[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,a):!0}};Ge.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function _o(e,t,n){if(typeof e!="object")throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(i){const a=e[s],m=a===void 0||i(a,s,e);if(m!==!0)throw new U("option "+s+" must be "+m,U.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new U("Unknown option "+s,U.ERR_BAD_OPTION)}}const Be={assertOptions:_o,validators:Ge},he=Be.validators;let we=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ot,response:new Ot}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=(()=>{if(!o.stack)return"";const i=o.stack.indexOf(`
|
|
6
|
+
`);return i===-1?"":o.stack.slice(i+1)})();try{if(!r.stack)r.stack=s;else if(s){const i=s.indexOf(`
|
|
7
|
+
`),a=i===-1?-1:s.indexOf(`
|
|
8
|
+
`,i+1),m=a===-1?"":s.slice(a+1);String(r.stack).endsWith(m)||(r.stack+=`
|
|
9
|
+
`+s)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ee(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Be.assertOptions(r,{silentJSONParsing:he.transitional(he.boolean),forcedJSONParsing:he.transitional(he.boolean),clarifyTimeoutError:he.transitional(he.boolean),legacyInterceptorReqResOrdering:he.transitional(he.boolean)},!1),o!=null&&(d.isFunction(o)?n.paramsSerializer={serialize:o}:Be.assertOptions(o,{encode:he.function,serialize:he.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Be.assertOptions(n,{baseUrl:he.spelling("baseURL"),withXsrfToken:he.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&d.merge(s.common,s[n.method]);s&&d.forEach(["delete","get","head","post","put","patch","common"],h=>{delete s[h]}),n.headers=fe.concat(i,s);const a=[];let m=!0;this.interceptors.request.forEach(function(u){if(typeof u.runWhen=="function"&&u.runWhen(n)===!1)return;m=m&&u.synchronous;const f=n.transitional||bt;f&&f.legacyInterceptorReqResOrdering?a.unshift(u.fulfilled,u.rejected):a.push(u.fulfilled,u.rejected)});const l=[];this.interceptors.response.forEach(function(u){l.push(u.fulfilled,u.rejected)});let c,p=0,x;if(!m){const h=[It.bind(this),void 0];for(h.unshift(...a),h.push(...l),x=h.length,c=Promise.resolve(n);p<x;)c=c.then(h[p++],h[p++]);return c}x=a.length;let b=n;for(;p<x;){const h=a[p++],u=a[p++];try{b=h(b)}catch(f){u.call(this,f);break}}try{c=It.call(this,b)}catch(h){return Promise.reject(h)}for(p=0,x=l.length;p<x;)c=c.then(l[p++],l[p++]);return c}getUri(t){t=Ee(this.defaults,t);const n=Sn(t.baseURL,t.url,t.allowAbsoluteUrls);return En(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){we.prototype[t]=function(n,r){return this.request(Ee(r||{},{method:t,url:n,data:(r||{}).data}))}});d.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,a){return this.request(Ee(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}we.prototype[t]=n(),we.prototype[t+"Form"]=n(!0)});let xo=class Pn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{r.subscribe(a),s=a}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,a){r.reason||(r.reason=new Me(s,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Pn(function(o){t=o}),cancel:t}}};function So(e){return function(n){return e.apply(null,n)}}function To(e){return d.isObject(e)&&e.isAxiosError===!0}const mt={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(mt).forEach(([e,t])=>{mt[t]=e});function An(e){const t=new we(e),n=ln(we.prototype.request,t);return d.extend(n,we.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return An(Ee(e,o))},n}const ne=An($e);ne.Axios=we;ne.CanceledError=Me;ne.CancelToken=xo;ne.isCancel=_n;ne.VERSION=Cn;ne.toFormData=Xe;ne.AxiosError=U;ne.Cancel=ne.CanceledError;ne.all=function(t){return Promise.all(t)};ne.spread=So;ne.isAxiosError=To;ne.mergeConfig=Ee;ne.AxiosHeaders=fe;ne.formToJSON=e=>vn(d.isHTMLForm(e)?new FormData(e):e);ne.getAdapter=On.getAdapter;ne.HttpStatusCode=mt;ne.default=ne;const{Axios:hs,AxiosError:ms,CanceledError:ys,isCancel:bs,CancelToken:gs,VERSION:ws,all:Es,Cancel:vs,isAxiosError:_s,spread:xs,toFormData:Ss,AxiosHeaders:Ts,HttpStatusCode:Rs,formToJSON:Os,getAdapter:Cs,mergeConfig:Ps}=ne,Et=ne.create({baseURL:"http://192.168.0.12/easy_erp_multi_jwt/"}),Ro=async(e,t)=>{try{let r=e;if(!e.includes("session_id")){const s=e.includes("?")?"&":"?";r=`${e}${s}session_id=1`}return(await Et.get(r,{headers:{Authorization:t}})).data}catch(n){throw n.response?.status===401&&(console.error("401 Unauthorized"),localStorage.clear(),globalThis.location.href="/"),n}},Oo=async(e,t)=>{const n=await Et.post(e,"",{headers:{Authorization:t}});if(n.data?.Status=="Success")return n?.data?.data||n?.data;throw new Error(n.data?.msg)},rt=async(e,t)=>{const n=localStorage.getItem("authToken"),r=t?.arg;return(await Et.post(e,r,{headers:{Authorization:n}}))?.data},Co=({token:e,menu:t})=>{const{isLoading:n,data:r}=an(e?["api/sdk/Menus",e]:null,([s,i])=>Oo(s,i)),o=r?.find(s=>s.path===t)?.sub_menu??[];return console.log("menuData",r),w.jsx(I.Row,{gutter:[16,16],children:o?.map((s,i)=>s.dashboard_show==="YES"?w.jsx(I.Col,{xs:24,md:8,lg:8,children:w.jsx(pe,{children:w.jsx(cn,{icon:`http://192.168.0.12/easy_erp_multi_jwt/icons/frontoffice/${s.icons}`,title:s.submenu_name,path:s.menu_key})})},`${i}office001`):null)})};function Po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ie={},ot,Ut;function Ao(){return Ut||(Ut=1,ot=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),ot}var Ie={exports:{}},Le={exports:{}},K={};var qt;function jo(){if(qt)return K;qt=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,m=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,x=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function P(v){if(typeof v=="object"&&v!==null){var G=v.$$typeof;switch(G){case t:switch(v=v.type,v){case m:case l:case r:case s:case o:case p:return v;default:switch(v=v&&v.$$typeof,v){case a:case c:case h:case b:case i:return v;default:return G}}case n:return G}}}function $(v){return P(v)===l}return K.AsyncMode=m,K.ConcurrentMode=l,K.ContextConsumer=a,K.ContextProvider=i,K.Element=t,K.ForwardRef=c,K.Fragment=r,K.Lazy=h,K.Memo=b,K.Portal=n,K.Profiler=s,K.StrictMode=o,K.Suspense=p,K.isAsyncMode=function(v){return $(v)||P(v)===m},K.isConcurrentMode=$,K.isContextConsumer=function(v){return P(v)===a},K.isContextProvider=function(v){return P(v)===i},K.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},K.isForwardRef=function(v){return P(v)===c},K.isFragment=function(v){return P(v)===r},K.isLazy=function(v){return P(v)===h},K.isMemo=function(v){return P(v)===b},K.isPortal=function(v){return P(v)===n},K.isProfiler=function(v){return P(v)===s},K.isStrictMode=function(v){return P(v)===o},K.isSuspense=function(v){return P(v)===p},K.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===l||v===s||v===o||v===p||v===x||typeof v=="object"&&v!==null&&(v.$$typeof===h||v.$$typeof===b||v.$$typeof===i||v.$$typeof===a||v.$$typeof===c||v.$$typeof===f||v.$$typeof===R||v.$$typeof===k||v.$$typeof===u)},K.typeOf=P,K}var X={};var Bt;function Do(){return Bt||(Bt=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,m=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,x=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function P(O){return typeof O=="string"||typeof O=="function"||O===r||O===l||O===s||O===o||O===p||O===x||typeof O=="object"&&O!==null&&(O.$$typeof===h||O.$$typeof===b||O.$$typeof===i||O.$$typeof===a||O.$$typeof===c||O.$$typeof===f||O.$$typeof===R||O.$$typeof===k||O.$$typeof===u)}function $(O){if(typeof O=="object"&&O!==null){var ae=O.$$typeof;switch(ae){case t:var ve=O.type;switch(ve){case m:case l:case r:case s:case o:case p:return ve;default:var ke=ve&&ve.$$typeof;switch(ke){case a:case c:case h:case b:case i:return ke;default:return ae}}case n:return ae}}}var v=m,G=l,te=a,se=i,re=t,Z=c,A=r,F=h,Q=b,T=n,S=s,g=o,C=p,_=!1;function M(O){return _||(_=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(O)||$(O)===m}function y(O){return $(O)===l}function E(O){return $(O)===a}function j(O){return $(O)===i}function N(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function D(O){return $(O)===c}function q(O){return $(O)===r}function z(O){return $(O)===h}function H(O){return $(O)===b}function V(O){return $(O)===n}function Y(O){return $(O)===s}function L(O){return $(O)===o}function ee(O){return $(O)===p}X.AsyncMode=v,X.ConcurrentMode=G,X.ContextConsumer=te,X.ContextProvider=se,X.Element=re,X.ForwardRef=Z,X.Fragment=A,X.Lazy=F,X.Memo=Q,X.Portal=T,X.Profiler=S,X.StrictMode=g,X.Suspense=C,X.isAsyncMode=M,X.isConcurrentMode=y,X.isContextConsumer=E,X.isContextProvider=j,X.isElement=N,X.isForwardRef=D,X.isFragment=q,X.isLazy=z,X.isMemo=H,X.isPortal=V,X.isProfiler=Y,X.isStrictMode=L,X.isSuspense=ee,X.isValidElementType=P,X.typeOf=$})()),X}var Ht;function jn(){return Ht||(Ht=1,process.env.NODE_ENV==="production"?Le.exports=jo():Le.exports=Do()),Le.exports}var st,Wt;function No(){if(Wt)return st;Wt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var m=Object.getOwnPropertyNames(i).map(function(c){return i[c]});if(m.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(c){l[c]=c}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return st=o()?Object.assign:function(s,i){for(var a,m=r(s),l,c=1;c<arguments.length;c++){a=Object(arguments[c]);for(var p in a)t.call(a,p)&&(m[p]=a[p]);if(e){l=e(a);for(var x=0;x<l.length;x++)n.call(a,l[x])&&(m[l[x]]=a[l[x]])}}return m},st}var it,zt;function vt(){if(zt)return it;zt=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return it=e,it}var at,Vt;function Dn(){return Vt||(Vt=1,at=Function.call.bind(Object.prototype.hasOwnProperty)),at}var ct,Yt;function $o(){if(Yt)return ct;Yt=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=vt(),n={},r=Dn();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,m,l){if(process.env.NODE_ENV!=="production"){for(var c in s)if(r(s,c)){var p;try{if(typeof s[c]!="function"){var x=Error((m||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}p=s[c](i,c,m,a,null,t)}catch(h){p=h}if(p&&!(p instanceof Error)&&e((m||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in n)){n[p.message]=!0;var b=l?l():"";e("Failed "+a+" type: "+p.message+(b??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ct=o,ct}var lt,Jt;function Mo(){if(Jt)return lt;Jt=1;var e=jn(),t=No(),n=vt(),r=Dn(),o=$o(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var m="Warning: "+a;typeof console<"u"&&console.error(m);try{throw new Error(m)}catch{}});function i(){return null}return lt=function(a,m){var l=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function p(y){var E=y&&(l&&y[l]||y[c]);if(typeof E=="function")return E}var x="<<anonymous>>",b={array:R("array"),bigint:R("bigint"),bool:R("boolean"),func:R("function"),number:R("number"),object:R("object"),string:R("string"),symbol:R("symbol"),any:k(),arrayOf:P,element:$(),elementType:v(),instanceOf:G,node:Z(),objectOf:se,oneOf:te,oneOfType:re,shape:F,exact:Q};function h(y,E){return y===E?y!==0||1/y===1/E:y!==y&&E!==E}function u(y,E){this.message=y,this.data=E&&typeof E=="object"?E:{},this.stack=""}u.prototype=Error.prototype;function f(y){if(process.env.NODE_ENV!=="production")var E={},j=0;function N(q,z,H,V,Y,L,ee){if(V=V||x,L=L||H,ee!==n){if(m){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=V+":"+H;!E[ae]&&j<3&&(s("You are manually calling a React.PropTypes validation function for the `"+L+"` prop on `"+V+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),E[ae]=!0,j++)}}return z[H]==null?q?z[H]===null?new u("The "+Y+" `"+L+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new u("The "+Y+" `"+L+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:y(z,H,V,Y,L)}var D=N.bind(null,!1);return D.isRequired=N.bind(null,!0),D}function R(y){function E(j,N,D,q,z,H){var V=j[N],Y=g(V);if(Y!==y){var L=C(V);return new u("Invalid "+q+" `"+z+"` of type "+("`"+L+"` supplied to `"+D+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return f(E)}function k(){return f(i)}function P(y){function E(j,N,D,q,z){if(typeof y!="function")return new u("Property `"+z+"` of component `"+D+"` has invalid PropType notation inside arrayOf.");var H=j[N];if(!Array.isArray(H)){var V=g(H);return new u("Invalid "+q+" `"+z+"` of type "+("`"+V+"` supplied to `"+D+"`, expected an array."))}for(var Y=0;Y<H.length;Y++){var L=y(H,Y,D,q,z+"["+Y+"]",n);if(L instanceof Error)return L}return null}return f(E)}function $(){function y(E,j,N,D,q){var z=E[j];if(!a(z)){var H=g(z);return new u("Invalid "+D+" `"+q+"` of type "+("`"+H+"` supplied to `"+N+"`, expected a single ReactElement."))}return null}return f(y)}function v(){function y(E,j,N,D,q){var z=E[j];if(!e.isValidElementType(z)){var H=g(z);return new u("Invalid "+D+" `"+q+"` of type "+("`"+H+"` supplied to `"+N+"`, expected a single ReactElement type."))}return null}return f(y)}function G(y){function E(j,N,D,q,z){if(!(j[N]instanceof y)){var H=y.name||x,V=M(j[N]);return new u("Invalid "+q+" `"+z+"` of type "+("`"+V+"` supplied to `"+D+"`, expected ")+("instance of `"+H+"`."))}return null}return f(E)}function te(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function E(j,N,D,q,z){for(var H=j[N],V=0;V<y.length;V++)if(h(H,y[V]))return null;var Y=JSON.stringify(y,function(ee,O){var ae=C(O);return ae==="symbol"?String(O):O});return new u("Invalid "+q+" `"+z+"` of value `"+String(H)+"` "+("supplied to `"+D+"`, expected one of "+Y+"."))}return f(E)}function se(y){function E(j,N,D,q,z){if(typeof y!="function")return new u("Property `"+z+"` of component `"+D+"` has invalid PropType notation inside objectOf.");var H=j[N],V=g(H);if(V!=="object")return new u("Invalid "+q+" `"+z+"` of type "+("`"+V+"` supplied to `"+D+"`, expected an object."));for(var Y in H)if(r(H,Y)){var L=y(H,Y,D,q,z+"."+Y,n);if(L instanceof Error)return L}return null}return f(E)}function re(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var E=0;E<y.length;E++){var j=y[E];if(typeof j!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+_(j)+" at index "+E+"."),i}function N(D,q,z,H,V){for(var Y=[],L=0;L<y.length;L++){var ee=y[L],O=ee(D,q,z,H,V,n);if(O==null)return null;O.data&&r(O.data,"expectedType")&&Y.push(O.data.expectedType)}var ae=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new u("Invalid "+H+" `"+V+"` supplied to "+("`"+z+"`"+ae+"."))}return f(N)}function Z(){function y(E,j,N,D,q){return T(E[j])?null:new u("Invalid "+D+" `"+q+"` supplied to "+("`"+N+"`, expected a ReactNode."))}return f(y)}function A(y,E,j,N,D){return new u((y||"React class")+": "+E+" type `"+j+"."+N+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+D+"`.")}function F(y){function E(j,N,D,q,z){var H=j[N],V=g(H);if(V!=="object")return new u("Invalid "+q+" `"+z+"` of type `"+V+"` "+("supplied to `"+D+"`, expected `object`."));for(var Y in y){var L=y[Y];if(typeof L!="function")return A(D,q,z,Y,C(L));var ee=L(H,Y,D,q,z+"."+Y,n);if(ee)return ee}return null}return f(E)}function Q(y){function E(j,N,D,q,z){var H=j[N],V=g(H);if(V!=="object")return new u("Invalid "+q+" `"+z+"` of type `"+V+"` "+("supplied to `"+D+"`, expected `object`."));var Y=t({},j[N],y);for(var L in Y){var ee=y[L];if(r(y,L)&&typeof ee!="function")return A(D,q,z,L,C(ee));if(!ee)return new u("Invalid "+q+" `"+z+"` key `"+L+"` supplied to `"+D+"`.\nBad object: "+JSON.stringify(j[N],null," ")+`
|
|
10
|
+
Valid keys: `+JSON.stringify(Object.keys(y),null," "));var O=ee(H,L,D,q,z+"."+L,n);if(O)return O}return null}return f(E)}function T(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(T);if(y===null||a(y))return!0;var E=p(y);if(E){var j=E.call(y),N;if(E!==y.entries){for(;!(N=j.next()).done;)if(!T(N.value))return!1}else for(;!(N=j.next()).done;){var D=N.value;if(D&&!T(D[1]))return!1}}else return!1;return!0;default:return!1}}function S(y,E){return y==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function g(y){var E=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":S(E,y)?"symbol":E}function C(y){if(typeof y>"u"||y===null)return""+y;var E=g(y);if(E==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return E}function _(y){var E=C(y);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function M(y){return!y.constructor||!y.constructor.name?x:y.constructor.name}return b.checkPropTypes=o,b.resetWarningCache=o.resetWarningCache,b.PropTypes=b,b},lt}var ut,Kt;function ko(){if(Kt)return ut;Kt=1;var e=vt();function t(){}function n(){}return n.resetWarningCache=t,ut=function(){function r(i,a,m,l,c,p){if(p!==e){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},ut}var Xt;function Fo(){if(Xt)return Ie.exports;if(Xt=1,process.env.NODE_ENV!=="production"){var e=jn(),t=!0;Ie.exports=Mo()(e.isElement,t)}else Ie.exports=ko()();return Ie.exports}var Gt;function Io(){if(Gt)return ie;Gt=1;var e=ie&&ie.__extends||(function(){var b=function(h,u){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,R){f.__proto__=R}||function(f,R){for(var k in R)Object.prototype.hasOwnProperty.call(R,k)&&(f[k]=R[k])},b(h,u)};return function(h,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");b(h,u);function f(){this.constructor=h}h.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)}})(),t=ie&&ie.__assign||function(){return t=Object.assign||function(b){for(var h,u=1,f=arguments.length;u<f;u++){h=arguments[u];for(var R in h)Object.prototype.hasOwnProperty.call(h,R)&&(b[R]=h[R])}return b},t.apply(this,arguments)},n=ie&&ie.__createBinding||(Object.create?(function(b,h,u,f){f===void 0&&(f=u);var R=Object.getOwnPropertyDescriptor(h,u);(!R||("get"in R?!h.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return h[u]}}),Object.defineProperty(b,f,R)}):(function(b,h,u,f){f===void 0&&(f=u),b[f]=h[u]})),r=ie&&ie.__setModuleDefault||(Object.create?(function(b,h){Object.defineProperty(b,"default",{enumerable:!0,value:h})}):function(b,h){b.default=h}),o=ie&&ie.__importStar||function(b){if(b&&b.__esModule)return b;var h={};if(b!=null)for(var u in b)u!=="default"&&Object.prototype.hasOwnProperty.call(b,u)&&n(h,b,u);return r(h,b),h},s=ie&&ie.__rest||function(b,h){var u={};for(var f in b)Object.prototype.hasOwnProperty.call(b,f)&&h.indexOf(f)<0&&(u[f]=b[f]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,f=Object.getOwnPropertySymbols(b);R<f.length;R++)h.indexOf(f[R])<0&&Object.prototype.propertyIsEnumerable.call(b,f[R])&&(u[f[R]]=b[f[R]]);return u},i=ie&&ie.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(ie,"__esModule",{value:!0});var a=o(oe),m=i(Ao()),l=o(Fo());function c(b){return b&&b.replace(/ |\u202F|\u00A0/g," ").replace(/<br \/>/g,"<br>")}function p(b){var h=document.createTextNode("");b.appendChild(h);var u=document.activeElement===b;if(h!==null&&h.nodeValue!==null&&u){var f=window.getSelection();if(f!==null){var R=document.createRange();R.setStart(h,h.nodeValue.length),R.collapse(!0),f.removeAllRanges(),f.addRange(R)}b instanceof HTMLElement&&b.focus()}}var x=(function(b){e(h,b);function h(){var u=b!==null&&b.apply(this,arguments)||this;return u.lastHtml=u.props.html,u.el=typeof u.props.innerRef=="function"?{current:null}:a.createRef(),u.getEl=function(){return(u.props.innerRef&&typeof u.props.innerRef!="function"?u.props.innerRef:u.el).current},u.emitChange=function(f){var R=u.getEl();if(R){var k=R.innerHTML;if(u.props.onChange&&k!==u.lastHtml){var P=Object.assign({},f,{target:{value:k}});u.props.onChange(P)}u.lastHtml=k}},u}return h.prototype.render=function(){var u=this,f=this.props,R=f.tagName,k=f.html,P=f.innerRef,$=s(f,["tagName","html","innerRef"]);return a.createElement(R||"div",t(t({},$),{ref:typeof P=="function"?function(v){P(v),u.el.current=v}:P||this.el,onInput:this.emitChange,onBlur:this.props.onBlur||this.emitChange,onKeyUp:this.props.onKeyUp||this.emitChange,onKeyDown:this.props.onKeyDown||this.emitChange,contentEditable:!this.props.disabled,dangerouslySetInnerHTML:{__html:k}}),this.props.children)},h.prototype.shouldComponentUpdate=function(u){var f=this.props,R=this.getEl();return!R||c(u.html)!==c(R.innerHTML)?!0:f.disabled!==u.disabled||f.tagName!==u.tagName||f.className!==u.className||f.innerRef!==u.innerRef||f.placeholder!==u.placeholder||!(0,m.default)(f.style,u.style)},h.prototype.componentDidUpdate=function(){var u=this.getEl();u&&(this.props.html!==u.innerHTML&&(u.innerHTML=this.props.html),this.lastHtml=this.props.html,p(u))},h.propTypes={html:l.string.isRequired,onChange:l.func,disabled:l.bool,tagName:l.string,className:l.string,style:l.object,innerRef:l.oneOfType([l.object,l.func])},h})(a.Component);return ie.default=x,ie}var Lo=Io();const Uo=Po(Lo),ft=oe.forwardRef(({...e},t)=>w.jsxs("div",{className:"",children:[e.label&&w.jsx("label",{className:"labelfont",...e,children:e.label}),w.jsx("input",{className:"form-control",placeholder:e.label,...e,ref:t})]}));var He={exports:{}},qo=He.exports,Zt;function Bo(){return Zt||(Zt=1,(function(e,t){(function(n,r){e.exports=r()})(qo,(function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",m="hour",l="day",c="week",p="month",x="quarter",b="year",h="date",u="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var S=["th","st","nd","rd"],g=T%100;return"["+T+(S[(g-20)%10]||S[g]||S[0])+"]"}},P=function(T,S,g){var C=String(T);return!C||C.length>=S?T:""+Array(S+1-C.length).join(g)+T},$={s:P,z:function(T){var S=-T.utcOffset(),g=Math.abs(S),C=Math.floor(g/60),_=g%60;return(S<=0?"+":"-")+P(C,2,"0")+":"+P(_,2,"0")},m:function T(S,g){if(S.date()<g.date())return-T(g,S);var C=12*(g.year()-S.year())+(g.month()-S.month()),_=S.clone().add(C,p),M=g-_<0,y=S.clone().add(C+(M?-1:1),p);return+(-(C+(g-_)/(M?_-y:y-_))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:p,y:b,w:c,d:l,D:h,h:m,m:a,s:i,ms:s,Q:x}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},v="en",G={};G[v]=k;var te="$isDayjsObject",se=function(T){return T instanceof F||!(!T||!T[te])},re=function T(S,g,C){var _;if(!S)return v;if(typeof S=="string"){var M=S.toLowerCase();G[M]&&(_=M),g&&(G[M]=g,_=M);var y=S.split("-");if(!_&&y.length>1)return T(y[0])}else{var E=S.name;G[E]=S,_=E}return!C&&_&&(v=_),_||!C&&v},Z=function(T,S){if(se(T))return T.clone();var g=typeof S=="object"?S:{};return g.date=T,g.args=arguments,new F(g)},A=$;A.l=re,A.i=se,A.w=function(T,S){return Z(T,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var F=(function(){function T(g){this.$L=re(g.locale,null,!0),this.parse(g),this.$x=this.$x||g.x||{},this[te]=!0}var S=T.prototype;return S.parse=function(g){this.$d=(function(C){var _=C.date,M=C.utc;if(_===null)return new Date(NaN);if(A.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var y=_.match(f);if(y){var E=y[2]-1||0,j=(y[7]||"0").substring(0,3);return M?new Date(Date.UTC(y[1],E,y[3]||1,y[4]||0,y[5]||0,y[6]||0,j)):new Date(y[1],E,y[3]||1,y[4]||0,y[5]||0,y[6]||0,j)}}return new Date(_)})(g),this.init()},S.init=function(){var g=this.$d;this.$y=g.getFullYear(),this.$M=g.getMonth(),this.$D=g.getDate(),this.$W=g.getDay(),this.$H=g.getHours(),this.$m=g.getMinutes(),this.$s=g.getSeconds(),this.$ms=g.getMilliseconds()},S.$utils=function(){return A},S.isValid=function(){return this.$d.toString()!==u},S.isSame=function(g,C){var _=Z(g);return this.startOf(C)<=_&&_<=this.endOf(C)},S.isAfter=function(g,C){return Z(g)<this.startOf(C)},S.isBefore=function(g,C){return this.endOf(C)<Z(g)},S.$g=function(g,C,_){return A.u(g)?this[C]:this.set(_,g)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(g,C){var _=this,M=!!A.u(C)||C,y=A.p(g),E=function(Y,L){var ee=A.w(_.$u?Date.UTC(_.$y,L,Y):new Date(_.$y,L,Y),_);return M?ee:ee.endOf(l)},j=function(Y,L){return A.w(_.toDate()[Y].apply(_.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(L)),_)},N=this.$W,D=this.$M,q=this.$D,z="set"+(this.$u?"UTC":"");switch(y){case b:return M?E(1,0):E(31,11);case p:return M?E(1,D):E(0,D+1);case c:var H=this.$locale().weekStart||0,V=(N<H?N+7:N)-H;return E(M?q-V:q+(6-V),D);case l:case h:return j(z+"Hours",0);case m:return j(z+"Minutes",1);case a:return j(z+"Seconds",2);case i:return j(z+"Milliseconds",3);default:return this.clone()}},S.endOf=function(g){return this.startOf(g,!1)},S.$set=function(g,C){var _,M=A.p(g),y="set"+(this.$u?"UTC":""),E=(_={},_[l]=y+"Date",_[h]=y+"Date",_[p]=y+"Month",_[b]=y+"FullYear",_[m]=y+"Hours",_[a]=y+"Minutes",_[i]=y+"Seconds",_[s]=y+"Milliseconds",_)[M],j=M===l?this.$D+(C-this.$W):C;if(M===p||M===b){var N=this.clone().set(h,1);N.$d[E](j),N.init(),this.$d=N.set(h,Math.min(this.$D,N.daysInMonth())).$d}else E&&this.$d[E](j);return this.init(),this},S.set=function(g,C){return this.clone().$set(g,C)},S.get=function(g){return this[A.p(g)]()},S.add=function(g,C){var _,M=this;g=Number(g);var y=A.p(C),E=function(D){var q=Z(M);return A.w(q.date(q.date()+Math.round(D*g)),M)};if(y===p)return this.set(p,this.$M+g);if(y===b)return this.set(b,this.$y+g);if(y===l)return E(1);if(y===c)return E(7);var j=(_={},_[a]=r,_[m]=o,_[i]=n,_)[y]||1,N=this.$d.getTime()+g*j;return A.w(N,this)},S.subtract=function(g,C){return this.add(-1*g,C)},S.format=function(g){var C=this,_=this.$locale();if(!this.isValid())return _.invalidDate||u;var M=g||"YYYY-MM-DDTHH:mm:ssZ",y=A.z(this),E=this.$H,j=this.$m,N=this.$M,D=_.weekdays,q=_.months,z=_.meridiem,H=function(L,ee,O,ae){return L&&(L[ee]||L(C,M))||O[ee].slice(0,ae)},V=function(L){return A.s(E%12||12,L,"0")},Y=z||function(L,ee,O){var ae=L<12?"AM":"PM";return O?ae.toLowerCase():ae};return M.replace(R,(function(L,ee){return ee||(function(O){switch(O){case"YY":return String(C.$y).slice(-2);case"YYYY":return A.s(C.$y,4,"0");case"M":return N+1;case"MM":return A.s(N+1,2,"0");case"MMM":return H(_.monthsShort,N,q,3);case"MMMM":return H(q,N);case"D":return C.$D;case"DD":return A.s(C.$D,2,"0");case"d":return String(C.$W);case"dd":return H(_.weekdaysMin,C.$W,D,2);case"ddd":return H(_.weekdaysShort,C.$W,D,3);case"dddd":return D[C.$W];case"H":return String(E);case"HH":return A.s(E,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return Y(E,j,!0);case"A":return Y(E,j,!1);case"m":return String(j);case"mm":return A.s(j,2,"0");case"s":return String(C.$s);case"ss":return A.s(C.$s,2,"0");case"SSS":return A.s(C.$ms,3,"0");case"Z":return y}return null})(L)||y.replace(":","")}))},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(g,C,_){var M,y=this,E=A.p(C),j=Z(g),N=(j.utcOffset()-this.utcOffset())*r,D=this-j,q=function(){return A.m(y,j)};switch(E){case b:M=q()/12;break;case p:M=q();break;case x:M=q()/3;break;case c:M=(D-N)/6048e5;break;case l:M=(D-N)/864e5;break;case m:M=D/o;break;case a:M=D/r;break;case i:M=D/n;break;default:M=D}return _?M:A.a(M)},S.daysInMonth=function(){return this.endOf(p).$D},S.$locale=function(){return G[this.$L]},S.locale=function(g,C){if(!g)return this.$L;var _=this.clone(),M=re(g,C,!0);return M&&(_.$L=M),_},S.clone=function(){return A.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},T})(),Q=F.prototype;return Z.prototype=Q,[["$ms",s],["$s",i],["$m",a],["$H",m],["$W",l],["$M",p],["$y",b],["$D",h]].forEach((function(T){Q[T[1]]=function(S){return this.$g(S,T[0],T[1])}})),Z.extend=function(T,S){return T.$i||(T(S,F,Z),T.$i=!0),Z},Z.locale=re,Z.isDayjs=se,Z.unix=function(T){return Z(1e3*T)},Z.en=G[v],Z.Ls=G,Z.p={},Z}))})(He)),He.exports}Bo();function Ho(){return[{label:"One Time (During Admission)",value:"one_time"},{label:"One Time",value:"one_time_without_admission"},{label:"Monthly",value:"monthly"},{label:"Quarterly",value:"quarterly"},{label:"Half Yearly",value:"half_yearly"},{label:"Yearly",value:"yearly"}]}const Wo=e=>{const t=JSON.parse(localStorage.getItem("genrall_settings"));return console.log("amount______",e),w.jsxs(w.Fragment,{children:[t?.currency_icon," ",Number(e||0).toLocaleString("en-IN")]})};var Ce={},Pe={},de={},Ae={},Se={},Qt;function zo(){if(Qt)return Se;Qt=1;var e=Se&&Se.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Se,"__esModule",{value:!0});const t=e(oe),n=qn,r=["string","number","boolean"];function o({header:s,body:i}){const a=t.default.createElement("tr",null,s.map(l=>t.default.createElement("th",{key:l},l))),m=i.map((l,c)=>Array.isArray(l)?t.default.createElement("tr",{key:c},l.map((p,x)=>t.default.createElement("th",{key:x}," ",p," "))):l!==null&&typeof l=="object"?t.default.createElement("tr",{key:c},Object.entries(l).map(([p,x],b)=>typeof x=="object"?(console.error(`typeof ${p} is incorrect, only accept ${r.join(", ")} `),t.default.createElement("th",{key:b})):t.default.createElement("th",{key:b},t.default.createElement(t.default.Fragment,null,x)))):(console.error(`
|
|
11
|
+
data structure is incorrect,
|
|
12
|
+
data structure type ->
|
|
13
|
+
" type data = Array<{ [key: string]: string | number | boolean }>
|
|
14
|
+
or
|
|
15
|
+
type data = Array<(string | number | boolean)[]>"
|
|
16
|
+
`),null));return(0,n.renderToString)(t.default.createElement("table",null,t.default.createElement("tbody",null,a,m)))}return Se.default=o,Se}var en;function Vo(){return en||(en=1,(function(e){var t=Ae&&Ae.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.createTable=e.template=e.uri=e.format=e.base64=void 0;function n(s){return window.btoa(unescape(encodeURIComponent(s)))}e.base64=n;function r(s,i){return s.replace(/{(\w+)}/g,(a,m)=>i[m])}e.format=r,e.uri="data:application/vnd.ms-excel;base64,",e.template='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta charset="UTF-8"><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body>{table}</body></html>';var o=zo();Object.defineProperty(e,"createTable",{enumerable:!0,get:function(){return t(o).default}})})(Ae)),Ae}var tn;function Nn(){if(tn)return de;tn=1;var e=de&&de.__createBinding||(Object.create?(function(l,c,p,x){x===void 0&&(x=p);var b=Object.getOwnPropertyDescriptor(c,p);(!b||("get"in b?!c.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return c[p]}}),Object.defineProperty(l,x,b)}):(function(l,c,p,x){x===void 0&&(x=p),l[x]=c[p]})),t=de&&de.__setModuleDefault||(Object.create?(function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}):function(l,c){l.default=c}),n=de&&de.__importStar||function(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var p in l)p!=="default"&&Object.prototype.hasOwnProperty.call(l,p)&&e(c,l,p);return t(c,l),c};Object.defineProperty(de,"__esModule",{value:!0}),de.downloadExcel=de.excel=void 0;const r=n(Vo());function o(){return document?!0:((process==null?void 0:process.env.NODE_ENV)!=="production"&&console.error("Failed to access document object"),!1)}function s(l,c){const p=window.document.createElement("a");return p.href=r.uri+r.base64(r.format(r.template,c)),p.download=l,document.body.appendChild(p),p.click(),document.body.removeChild(p),!0}function i(l,c){if(l)return l.cloneNode(!0).outerHTML;if(c)return r.createTable(c);console.error("currentTableRef or tablePayload does not exist")}function a({fileName:l,sheet:c,tablePayload:p},x){if(!o())return!1;const b=i(x,p);return s(l,{worksheet:c||"Worksheet",table:b})}de.downloadExcel=a;function m({currentTableRef:l,filename:c,sheet:p}){function x(){if(!o())return!1;const b=i(l),h=`${c}.xls`;return s(h,{worksheet:p||"Worksheet",table:b})}return{onDownload:x}}return de.excel=m,de}var nn;function Yo(){if(nn)return Pe;nn=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.useDownloadExcel=void 0;const e=oe,t=Nn();function n({currentTableRef:r,filename:o,sheet:s}){const[i,a]=(0,e.useState)({});return(0,e.useEffect)(()=>{a({currentTableRef:r,filename:o,sheet:s})},[r,o,s]),(0,e.useMemo)(()=>(0,t.excel)(i),[i])}return Pe.useDownloadExcel=n,Pe}var rn;function Jo(){return rn||(rn=1,(function(e){var t=Ce&&Ce.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.downloadExcel=e.useDownloadExcel=e.DownloadTableExcel=void 0;const n=t(oe),r=Yo();Object.defineProperty(e,"useDownloadExcel",{enumerable:!0,get:function(){return r.useDownloadExcel}});const o=Nn();Object.defineProperty(e,"downloadExcel",{enumerable:!0,get:function(){return o.downloadExcel}});const s=({currentTableRef:i,filename:a,sheet:m,children:l})=>{const{onDownload:c}=(0,r.useDownloadExcel)({currentTableRef:i,filename:a,sheet:m});return n.default.createElement("span",{onClick:c},l)};e.DownloadTableExcel=s})(Ce)),Ce}var Ko=Jo();const $n="printWindow";function Xo(e){const t=document.createElement("iframe");return t.width=`${document.documentElement.clientWidth}px`,t.height=`${document.documentElement.clientHeight}px`,t.style.position="absolute",t.style.top=`-${document.documentElement.clientHeight+100}px`,t.style.left=`-${document.documentElement.clientWidth+100}px`,t.id=$n,t.srcdoc="<!DOCTYPE html>",e&&(e.allow&&(t.allow=e.allow),e.referrerPolicy!==void 0&&(t.referrerPolicy=e.referrerPolicy),e.sandbox!==void 0&&(t.sandbox=e.sandbox)),t}function le({level:e="error",messages:t,suppressErrors:n=!1}){n||(e==="error"?console.error(t):e==="warning"?console.warn(t):console.debug(t))}function Mn(e,t){if(t||!e){const n=document.getElementById($n);n&&document.body.removeChild(n)}}function ze(e){return e instanceof Error?e:new Error("Unknown Error")}function on(e,t){const{documentTitle:n,onAfterPrint:r,onPrintError:o,preserveAfterPrint:s,print:i,suppressErrors:a}=t;setTimeout(()=>{if(e.contentWindow){let m=function(){r?.(),Mn(s)};if(e.contentWindow.focus(),i)i(e).then(m).catch(l=>{o?o("print",ze(l)):le({messages:["An error was thrown by the specified `print` function"],suppressErrors:a})});else{if(e.contentWindow.print){const l=e.contentDocument?.title??"",c=e.ownerDocument.title,p=typeof n=="function"?n():n;p&&(e.ownerDocument.title=p,e.contentDocument&&(e.contentDocument.title=p)),e.contentWindow.print(),p&&(e.ownerDocument.title=c,e.contentDocument&&(e.contentDocument.title=l))}else le({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:a});Go()?setTimeout(m,500):m()}}else le({messages:["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/MatthewHerbst/react-to-print/issues/"],suppressErrors:a})},500)}function Go(){return[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i].some(e=>(navigator.userAgent??navigator.vendor??("opera"in window&&window.opera)).match(e))}function sn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,null);let r=n.nextNode();for(;r;)t.push(r),r=n.nextNode();return t}function kn(e,t,n){const r=sn(e),o=sn(t);if(r.length!==o.length){le({messages:["When cloning shadow root content, source and target elements have different size. `onBeforePrint` likely resolved too early.",e,t],suppressErrors:n});return}for(let s=0;s<r.length;s++){const i=r[s],a=o[s],m=i.shadowRoot;if(m!==null){const l=a.attachShadow({mode:m.mode});l.innerHTML=m.innerHTML,kn(m,l,n)}}}const Zo=`
|
|
17
|
+
@page {
|
|
18
|
+
/* Remove browser default header (title) and footer (url) */
|
|
19
|
+
margin: 0;
|
|
20
|
+
}
|
|
21
|
+
@media print {
|
|
22
|
+
body {
|
|
23
|
+
/* Tell browsers to print background colors */
|
|
24
|
+
color-adjust: exact; /* Firefox. This is an older version of "print-color-adjust" */
|
|
25
|
+
print-color-adjust: exact; /* Firefox/Safari */
|
|
26
|
+
-webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`;function Qo(e,t,n){const{contentNode:r,clonedContentNode:o,clonedImgNodes:s,clonedVideoNodes:i,numResourcesToLoad:a,originalCanvasNodes:m}=t,{bodyClass:l,fonts:c,ignoreGlobalStyles:p,pageStyle:x,nonce:b,suppressErrors:h,copyShadowRoots:u}=n,f=[],R=[];function k($,v){if(f.includes($)){le({level:"debug",messages:["Tried to mark a resource that has already been handled",$],suppressErrors:h});return}v?(le({messages:['"react-to-print" was unable to load a resource but will continue attempting to print the page',...v],suppressErrors:h}),R.push($)):f.push($),f.length+R.length===a&&on(e,n)}e.onload=null;const P=e.contentDocument??e.contentWindow?.document;if(P){const $=P.body.appendChild(o);u&&kn(r,$,!!h),c&&(e.contentDocument?.fonts&&e.contentWindow?.FontFace?c.forEach(A=>{const F=new FontFace(A.family,A.source,{weight:A.weight,style:A.style});e.contentDocument.fonts.add(F),F.loaded.then(()=>{k(F)}).catch(Q=>{k(F,["Failed loading the font:",F,"Load error:",ze(Q)])})}):(c.forEach(A=>{k(A)}),le({messages:['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'],suppressErrors:h})));const v=x??Zo,G=P.createElement("style");b&&(G.setAttribute("nonce",b),P.head.setAttribute("nonce",b)),G.appendChild(P.createTextNode(v)),P.head.appendChild(G),l&&P.body.classList.add(...l.split(" "));const te=P.querySelectorAll("canvas");for(let A=0;A<m.length;++A){const F=m[A],Q=te[A];if(Q===void 0){le({messages:["A canvas element could not be copied for printing, has it loaded? `onBeforePrint` likely resolved too early.",F],suppressErrors:h});continue}const T=Q.getContext("2d");T&&T.drawImage(F,0,0)}for(let A=0;A<s.length;A++){const F=s[A],Q=F.getAttribute("src");if(!Q)k(F,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it.',F]);else{const T=new Image;T.onload=()=>{k(F)},T.onerror=(S,g,C,_,M)=>{k(F,["Error loading <img>",F,"Error",M])},T.src=Q}}for(let A=0;A<i.length;A++){const F=i[A];F.preload="auto";const Q=F.getAttribute("poster");if(Q){const T=new Image;T.onload=()=>{k(F)},T.onerror=(S,g,C,_,M)=>{k(F,["Error loading video poster",Q,"for video",F,"Error:",M])},T.src=Q}else F.readyState>=2?k(F):F.src?(F.onloadeddata=()=>{k(F)},F.onerror=(T,S,g,C,_)=>{k(F,["Error loading video",F,"Error",_])},F.onstalled=()=>{k(F,["Loading video stalled, skipping",F])}):k(F,["Error loading video, `src` is empty",F])}const se="select",re=r.querySelectorAll(se),Z=P.querySelectorAll(se);for(let A=0;A<re.length;A++)Z[A].value=re[A].value;if(!p){const A=document.querySelectorAll("style, link[rel~='stylesheet'], link[as='style']");for(let F=0,Q=A.length;F<Q;++F){const T=A[F];if(T.tagName.toLowerCase()==="style"){const S=P.createElement(T.tagName),g=T.sheet;if(g){let C="";try{const _=g.cssRules.length;for(let M=0;M<_;++M)typeof g.cssRules[M].cssText=="string"&&(C+=`${g.cssRules[M].cssText}\r
|
|
30
|
+
`)}catch(_){le({messages:["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/MatthewHerbst/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",T,`Original error: ${ze(_).message}`],level:"warning"})}S.setAttribute("id",`react-to-print-${F}`),b&&S.setAttribute("nonce",b),S.appendChild(P.createTextNode(C)),P.head.appendChild(S)}}else if(T.getAttribute("href"))if(T.hasAttribute("disabled"))le({messages:["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",T],level:"warning"}),k(T);else{const S=P.createElement(T.tagName);for(let g=0,C=T.attributes.length;g<C;++g){const _=T.attributes[g];_&&S.setAttribute(_.nodeName,_.nodeValue??"")}S.onload=()=>{k(S)},S.onerror=(g,C,_,M,y)=>{k(S,["Failed to load",S,"Error:",y])},b&&S.setAttribute("nonce",b),P.head.appendChild(S)}else le({messages:["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",T],level:"warning"}),k(T)}}}a===0&&on(e,n)}function es(e,t,n){e.onload=()=>{Qo(e,t,n)},document.body.appendChild(e)}function ts({contentRef:e,optionalContent:t,suppressErrors:n}){if(t&&typeof t=="function")return e&&le({level:"warning",messages:['"react-to-print" received a `contentRef` option and an optional-content param passed to its callback. The `contentRef` option will be ignored.']}),t();if(e)return e.current;le({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:n})}function ns(e,t){const{contentRef:n,fonts:r,ignoreGlobalStyles:o,suppressErrors:s}=t,i=ts({contentRef:n,optionalContent:e,suppressErrors:s});if(!i)return;const a=i.cloneNode(!0),m=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),l=a.querySelectorAll("img"),c=a.querySelectorAll("video"),p=r?r.length:0,x=(o?0:m.length)+l.length+c.length+p;return{contentNode:i,clonedContentNode:a,clonedImgNodes:l,clonedVideoNodes:c,numResourcesToLoad:x,originalCanvasNodes:i.querySelectorAll("canvas")}}function rs({bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:o,ignoreGlobalStyles:s,nonce:i,onAfterPrint:a,onBeforePrint:m,onPrintError:l,pageStyle:c,preserveAfterPrint:p,print:x,printIframeProps:b,suppressErrors:h}){return oe.useCallback(u=>{Mn(p,!0);function f(){const R={bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:o,ignoreGlobalStyles:s,nonce:i,onAfterPrint:a,onPrintError:l,pageStyle:c,preserveAfterPrint:p,print:x,suppressErrors:h},k=Xo(b),P=ns(u,R);if(!P){le({messages:["There is nothing to print"],suppressErrors:h});return}es(k,P,R)}m?m().then(()=>{f()}).catch(R=>{l?.("onBeforePrint",ze(R))}):f()},[e,t,n,r,o,s,i,a,m,l,c,p,b,x,h])}const os=e=>{console.log("ExportDataWithHeader______",e);const{tableRef:t}=e.data;e?.tableRef;const n=new Date().getTime(),r=rs({});return w.jsx(w.Fragment,{children:w.jsx(I.Row,{justify:"end",children:w.jsx(I.Col,{children:w.jsxs(I.Row,{gutter:8,children:[w.jsx(I.Col,{children:w.jsx(I.Button,{type:"text",icon:w.jsx(be.PrinterOutlined,{style:{color:"#5080f8"}}),onClick:r})}),w.jsx(I.Col,{children:w.jsx(Ko.DownloadTableExcel,{filename:n,sheet:"users",currentTableRef:t.current,children:w.jsx(I.Button,{type:"text",icon:w.jsx(be.FileTextOutlined,{style:{color:"#5080f8"}})})})})]})})})})},ss=e=>{const{tableRef:t}=e;return new Date().getTime(),w.jsx(w.Fragment,{children:w.jsx(I.Row,{justify:"center",children:w.jsx(I.Col,{span:24,style:{display:"flex",justifyContent:"center",alignSelf:"center",paddingBottom:"20px",position:"relative"}})})})},is=oe.createContext(),as=()=>({modal:{outline:"none",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundcolor:"red"}},img:{outline:"none"},passwordmodal:{outline:"none",display:"flex",alignItems:"center",justifyContent:"center"}}),cs=e=>{const{columns:t,action:n,DrawerUpdate:r,editDesign:o,newData:s,Loading:i,error:a,deleteTodoMutation:m,open:l,ActionView:c,viewDetails:p,myType:x,type:b,urlkey:h,columnstype:u,rowSelection:f}=e.data,R=as(),[k,P]=oe.useState(!1),[$,v]=oe.useState(null),[G,te]=oe.useState("false"),[se,re]=oe.useState(!1),[Z,A]=oe.useState(!1),[F,Q]=oe.useState(),T=()=>P(!1),S=B=>{te(B),P(!0)},[g,C]=oe.useState(),[_,M]=oe.useState(0),[y,E]=oe.useState({page:e?.data?.pageController?e.data?.pageController?.page:1,rowsPerPage:e?.data?.pageController?e.data?.pageController?.rowsPerPage:10}),j=oe.useRef(null);let N=0;const D=(B,W)=>{e.parentCallback?.(B,W),E({rowsPerPage:W,page:B})},q=(B,W)=>{v(W),re(!0),Q(B)},z=(B,W)=>{v(W),A(!0),Q(B)},H=e?.data?.onNavigate??e?.onNavigate,V=(B,W)=>{if(typeof H=="function"){H(B,W);return}typeof window<"u"&&typeof B=="string"&&B.length>0&&window.location.assign(B)},Y=B=>{if(b==="staff"){V(`/HumanResourceDashboard/StaffFullInformation?id=${B.fk_staffID}`,B);return}V(`/StudentInformation/StudentFullInformation?id=${B.id}`,B)},L=(B,W)=>{C(B),r?.(W)},ee=async(B,W,J,ye)=>{r?.(!0),J!==""&&((await ye({id:B,admission_no:W,ec_no:J}))?.Status==="Success"?I.message.success("Ec No updated successfully"):I.message.error("Failed to Update Ec No."))},O=()=>w.jsx(is.Provider,{value:g,children:o}),{trigger:ae}=Ze("branchapi/staff/updateStaffPassword",rt),{trigger:ve}=Ze("branchapi/Student/updateEcNo",rt),{trigger:ke}=Ze(h,(B,W)=>rt("student/studentDetails/editStudentLogInCredential",W)),Fn=async B=>{B.preventDefault(),re(!1);try{(await ae({staff_id:F,new_passwod:B.target.password.value}))?.Status==="Success"?I.message.success("Password updated successfully"):I.message.error("Failed to update password")}catch{I.message.error("Failed to update password")}},In=async B=>{B.preventDefault(),A(!1);try{(await ke({edit_id:$?.edit_id,new_passwod:B.target.password.value,username:B.target.username.value,branch_id:JSON.parse(localStorage.getItem("genrall_settings"))?.fk_branchID}))?.Status==="Success"?I.message.success("Password updated successfully"):I.message.error("Failed to update password")}catch(W){I.message.error(W?.response?.data?.msg??"Failed to update password")}},Ln=[{title:"SL",key:"serialNumber",render:(B,W,J)=>J+1},...u==="antd"?t:(Array.isArray(t)?t:[]).map(B=>({title:B.name,dataIndex:B.selector,key:B.selector,render:(W,J)=>{switch(B.selector){case"my_staff":return J.staff_id!=="0"?J.staff_id:"Admin";case"gallery_cat_logo":return w.jsx(I.Image,{width:50,src:`undefined/branch/gallery/${J.gallery_cat_logo}`});case"file01":return J.documents?w.jsx("div",{onClick:()=>S(`undefined/branch/frontoffice/${J.documents}`),style:{textDecoration:"underline",color:"blue",cursor:"pointer"},children:"view file"}):"Not Uploaded";case"amount":case"fine_amount":case"basic_pay":case"net_amount":return Wo(W);case"full_name":return w.jsx("span",{onClick:()=>Y(J),style:{cursor:"pointer",color:"blue",textDecoration:"underline"},children:W||`${J.firstname} ${J.lastname}`});case"extra_curricular_activity":return W==="Yes"?"Extra Subject":"Fees Master";case"is_active":return W==="yes"?w.jsx("span",{className:"label label-success",children:"Active"}):w.jsx("span",{className:"label label-danger",children:"Inactive"});case"steps":return J?.current_status==="Active"?w.jsx(I.Progress,{percent:J.steps==="1"?30:J.steps==="2"?70:100,steps:3}):w.jsx("span",{className:"label label-success",children:J?.current_status});case"Password":return w.jsx("span",{onClick:()=>q(J.id,J),style:{cursor:"pointer"},className:"label label-danger",children:"Update"});case"Passwordstd":return w.jsx("span",{onClick:()=>z(J.id,J),style:{cursor:"pointer"},className:"label label-danger",children:"Update"});case"payment_status":return w.jsx(I.Tag,{onClick:()=>p?.(J.id),color:W==="paid"?"#66aa18":W==="partially_paid"?"#ff5722":"#DC143C",children:W==="paid"?"Paid":W==="partially_paid"?"Partially Paid":"Due"});case"fees_duration":return Ho().find(ye=>ye.value===W)?.label;case"status":return w.jsx("span",{onClick:()=>p?.(J?.fk_staffID,J?.total_leave),className:`label ${W==="due"?"label-danger":"label-success"}`,style:{cursor:"pointer"},children:W==="due"?"Due":"Paid"});case"subject_type_1":return w.jsxs(w.Fragment,{children:[J.is_theory==="yes"&&"Theory, ",J.is_practical==="yes"&&"Practical"]});case"ec_no":return w.jsx(Uo,{html:J.ec_no,onBlur:ye=>ee(J.id,J.admission_no,ye.target.innerHTML,ve)});case"Assign":case"AssignExtCarriAci":case"Medical":return w.jsx(I.Button,{type:"primary",icon:w.jsx(be.SendOutlined,{}),size:"small",onClick:()=>L(J.id,!0,B.name),children:B.name});case"Button":return w.jsx(I.Tag,{color:"cyan",onClick:()=>p?.(J),children:B.name});default:return W}}})),...n?[{title:"Action",key:"action",render:(B,W)=>{const J=W?.current_status==="Promoted",ye=()=>{if(x=="sameAddUpdate"){L(W,!0);return}if(x?.type==="examEdit"){x.editFunc(W.id);return}L(W.id||W,!0)},_t=()=>{if(x==="student_result"){p?.(W);return}if(x==="student"){p?.(W.id,W.class_id);return}p?.(W.id)},Un=()=>{m?.(W?.id)};return w.jsxs("div",{style:{display:"flex",gap:"5px"},children:[c?.[0]?.status&&w.jsx(I.Button,{icon:w.jsx(be.EditOutlined,{}),size:"small",disabled:J,onClick:ye}),c?.[1]?.status&&w.jsx(I.Button,{icon:w.jsx(be.DeleteOutlined,{}),size:"small",danger:!0,disabled:J,onClick:Un}),c?.[2]?.status&&w.jsx(I.Button,{icon:w.jsx(be.EyeOutlined,{}),size:"small",onClick:_t})]})}}]:[]];let _e;if(i)_e=w.jsx("p",{children:"Loading..."});else if(a)_e=w.jsx("p",{children:a.message});else if(s?.data?.length===0)_e=w.jsx(I.Empty,{});else if(s){const B=s,W=B?.pagination;N=W?W?.total_rows:0,!_&&e.parentCallback&&M(N);const J=B?.data?B.data:B;_e=w.jsx(I.Table,{dataSource:J,columns:Ln,size:"small",pagination:!1,rowSelection:f,rowKey:"id"})}else _e=w.jsx(I.Empty,{});return w.jsxs("div",{style:{width:"100%"},children:[w.jsx(I.Drawer,{open:l,placement:"right",onClose:()=>r?.(!1),width:720,children:O()}),w.jsx(I.Modal,{title:"Update Password",open:se,onCancel:()=>re(!1),footer:null,children:w.jsx("form",{onSubmit:Fn,children:w.jsxs(pe,{children:[w.jsx(pe,{style:{marginBottom:12},children:w.jsx(ft,{type:"password",label:"Password",name:"password",required:"required"})}),w.jsx(pe,{style:{marginTop:16},children:w.jsx(I.Button,{type:"primary",htmlType:"submit",children:"Update"})})]})})}),w.jsx(I.Modal,{title:" Update Credential",open:Z,onCancel:()=>A(!1),footer:null,children:w.jsx("form",{onSubmit:In,children:w.jsxs(pe,{children:[w.jsx(pe,{style:{marginBottom:12},children:w.jsx(ft,{type:"text",label:"User Name",name:"username",required:"required",value:$?.username?$?.username:"",onChange:B=>v({...$,username:B.target.value})})}),w.jsx(pe,{style:{marginBottom:12},children:w.jsx(ft,{label:"Password",name:"password",required:"required",value:$?.password?$?.password:"",onChange:B=>v({...$,password:B.target.value})})}),w.jsx(pe,{style:{marginTop:16},children:w.jsx(I.Button,{type:"primary",htmlType:"submit",children:"Update"})})]})})}),w.jsx(I.Modal,{open:k,onCancel:T,footer:null,centered:!0,width:"80%",className:R.modal,children:w.jsxs("div",{style:{position:"relative"},className:R.img,children:[w.jsx(I.Image,{src:G,alt:"",style:{width:"100%"},preview:!1}),w.jsx(I.Button,{type:"text",icon:w.jsx(be.CloseOutlined,{}),onClick:T,style:{position:"absolute",top:8,right:8,background:"rgba(0,0,0,0.45)",color:"#fff"}})]})}),w.jsxs(I.Card,{children:[w.jsx(pe,{children:w.jsx("div",{style:{display:"flex",justifyContent:"space-between"},children:w.jsx(os,{data:{tableRef:j}})})}),w.jsxs("div",{ref:j,children:[w.jsx("div",{className:"print-only",children:w.jsx(ss,{})}),_e]}),s&&e.parentCallback&&w.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:16},children:w.jsx(I.Pagination,{current:y.page,pageSize:y.rowsPerPage,total:N||0,showSizeChanger:!0,onChange:D,onShowSizeChange:D})})]})]})},ls=({token:e,type:t})=>{const[n,r]=oe.useState({page:1,rowsPerPage:10}),o="api/branchapi/frontoffice/enquirytablelist",s=o.includes("?")?o.endsWith("?")||o.endsWith("&")?"":"&":"?",i=`${o}${s}page=${n.page}&per_page=${n.rowsPerPage}`,{isLoading:a,data:m,error:l}=an(e?[i,e]:null,([k,P])=>Ro(k,P)),[c,p]=oe.useState(!1),x=(k,P)=>{r({page:k,rowsPerPage:parseInt(P)})},b=async k=>{},h=k=>{console.log("dsdsdsdsd",k),p(k)},u=()=>{},f=[{key:"Edit",status:!0},{key:"Delete",status:!0},{key:"View",status:!1}],R=oe.useMemo(()=>[{id:"1",name:"Name",selector:"name",sortable:!0},{id:"2",name:"Phone",selector:"contact",sortable:!0},{id:"6",name:"Description",selector:"description",sortable:!0},{id:"3",name:"Source",selector:"source_name",sortable:!0},{id:"4",name:"Enquiry Date",selector:"date",sortable:!0},{id:"5",name:"Next Follow Up Date",selector:"follow_up_date",sortable:!0}]);return w.jsx("div",{children:w.jsx(cs,{parentCallback:x,data:{newData:m,columns:R,action:!0,Loading:a,error:l,open:c,viewDetails:u,deleteTodoMutation:b,DrawerUpdate:h,ActionView:f}})})},us=({routes:e=[],onNavigate:t})=>w.jsx(I.Row,{gutter:[16,16],children:e.map((n,r)=>w.jsx(I.Col,{xs:24,md:8,lg:8,children:w.jsx(pe,{children:w.jsx(cn,{icon:n?.icon??"",title:n?.title??"",path:n?.path??"",onClick:t})})},`${r}route001`))});exports.AdmissionEnquiry=ls;exports.ErpDashboard=Bn;exports.MenuSubmenu=Co;exports.RoutePage=us;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare function AdmissionEnquiry({ token, type }: {
|
|
2
|
+
token: any;
|
|
3
|
+
type: any;
|
|
4
|
+
}): any;
|
|
5
|
+
|
|
6
|
+
export declare function ErpDashboard(): any;
|
|
7
|
+
|
|
8
|
+
export declare function MenuSubmenu({ token, menu }: {
|
|
9
|
+
token: any;
|
|
10
|
+
menu: any;
|
|
11
|
+
}): any;
|
|
12
|
+
|
|
13
|
+
export declare function RoutePage({ routes, onNavigate }: {
|
|
14
|
+
routes?: never[] | undefined;
|
|
15
|
+
onNavigate: any;
|
|
16
|
+
}): any;
|
|
17
|
+
|
|
18
|
+
export { }
|