ubk.erp.webpack 1.0.5 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,19 +1,19 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),k=require("antd"),Tt=require("swr"),ne=require("react"),at=require("swr/mutation"),ge=require("@ant-design/icons"),er=require("react-dom/server"),we=require("react-hot-toast"),tr=()=>d.jsxs(k.Card,{style:{borderRadius:16},children:[d.jsx(k.Typography.Title,{level:3,style:{marginTop:0},children:"UBK ERP"}),d.jsx(k.Typography.Paragraph,{style:{marginBottom:0},children:"Welcome to your webpack-powered ERP system."})]}),ae=({width:e,height:t,display:n,justifyContent:r,alignItems:o,flexDirection:s,gap:i,style:a,children:b,...c})=>{const l={width:e,height:t,display:n,justifyContent:r,alignItems:o,flexDirection:s,gap:i,...a};return d.jsx("div",{style:l,...c,children:b})},xt=({variant:e,fontWeight:t,style:n,children:r,...o})=>{const s=t==="bold"?700:t==="light"?300:t;return e==="h1"?d.jsx(k.Typography.Title,{level:1,style:{fontWeight:s,...n},...o,children:r}):e==="h2"?d.jsx(k.Typography.Title,{level:2,style:{fontWeight:s,...n},...o,children:r}):e==="h3"?d.jsx(k.Typography.Title,{level:3,style:{fontWeight:s,...n},...o,children:r}):e==="h4"?d.jsx(k.Typography.Title,{level:4,style:{fontWeight:s,...n},...o,children:r}):e==="h5"?d.jsx(k.Typography.Title,{level:5,style:{fontWeight:s,...n},...o,children:r}):d.jsx(k.Typography.Text,{style:{fontWeight:s,...n},...o,children:r})};function bn({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 d.jsxs(k.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:[d.jsx(ae,{width:"100%",display:"flex",justifyContent:"center",alignItems:"center",style:{padding:"10px 12px",minHeight:80},children:d.jsx("img",{src:t,alt:"",style:{width:45,height:50,objectFit:"contain"}})}),d.jsx(ae,{style:{padding:"0 12px"},children:d.jsx(k.Divider,{style:{margin:0,minWidth:0}})}),d.jsx(ae,{style:{padding:"10px 10px",display:"flex",justifyContent:"center",alignItems:"center",minHeight:35},children:d.jsx(xt,{variant:"button",fontWeight:"bold",style:{fontSize:12},children:e})})]})}function gn(e,t){return function(){return e.apply(t,arguments)}}const{toString:nr}=Object.prototype,{getPrototypeOf:Qe}=Object,{iterator:et,toStringTag:wn}=Symbol,tt=(e=>t=>{const n=nr.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ye=e=>(e=e.toLowerCase(),t=>tt(t)===e),nt=e=>t=>typeof t===e,{isArray:je}=Array,Ce=nt("undefined");function ke(e){return e!==null&&!Ce(e)&&e.constructor!==null&&!Ce(e.constructor)&&de(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const xn=ye("ArrayBuffer");function rr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&xn(e.buffer),t}const or=nt("string"),de=nt("function"),En=nt("number"),Ie=e=>e!==null&&typeof e=="object",sr=e=>e===!0||e===!1,Ye=e=>{if(tt(e)!=="object")return!1;const t=Qe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(wn in e)&&!(et in e)},ir=e=>{if(!Ie(e)||ke(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ar=ye("Date"),lr=ye("File"),cr=e=>!!(e&&typeof e.uri<"u"),ur=e=>e&&typeof e.getParts<"u",dr=ye("Blob"),fr=ye("FileList"),pr=e=>Ie(e)&&de(e.pipe);function hr(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const At=hr(),Dt=typeof At.FormData<"u"?At.FormData:void 0,mr=e=>{if(!e)return!1;if(Dt&&e instanceof Dt)return!0;const t=Qe(e);if(!t||t===Object.prototype||!de(e.append))return!1;const n=tt(e);return n==="formdata"||n==="object"&&de(e.toString)&&e.toString()==="[object FormData]"},yr=ye("URLSearchParams"),[br,gr,wr,xr]=["ReadableStream","Request","Response","Headers"].map(ye),Er=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),je(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(ke(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 vn(e,t){if(ke(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 xe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sn=e=>!Ce(e)&&e!==xe;function Et(){const{caseless:e,skipUndefined:t}=Sn(this)&&this||{},n={},r=(o,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const i=e&&vn(n,s)||s;Ye(n[i])&&Ye(o)?n[i]=Et(n[i],o):Ye(o)?n[i]=Et({},o):je(o)?n[i]=o.slice():(!t||!Ce(o))&&(n[i]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&Fe(arguments[o],r);return n}const vr=(e,t,n,{allOwnKeys:r}={})=>(Fe(t,(o,s)=>{n&&de(o)?Object.defineProperty(e,s,{value:gn(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Sr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),_r=(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)},Tr=(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&&Qe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Rr=(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},Or=e=>{if(!e)return null;if(je(e))return e;let t=e.length;if(!En(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Cr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Qe(Uint8Array)),jr=(e,t)=>{const r=(e&&e[et]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Pr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ar=ye("HTMLFormElement"),Dr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),$t=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$r=ye("RegExp"),_n=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Fe(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},Mr=e=>{_n(e,(t,n)=>{if(de(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(de(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+"'")})}})},Nr=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return je(e)?r(e):r(String(e).split(t)),n},kr=()=>{},Ir=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Fr(e){return!!(e&&de(e.append)&&e[wn]==="FormData"&&e[et])}const Lr=e=>{const t=new Array(10),n=(r,o)=>{if(Ie(r)){if(t.indexOf(r)>=0)return;if(ke(r))return r;if(!("toJSON"in r)){t[o]=r;const s=je(r)?[]:{};return Fe(r,(i,a)=>{const b=n(i,o+1);!Ce(b)&&(s[a]=b)}),t[o]=void 0,s}}return r};return n(e,0)},Ur=ye("AsyncFunction"),qr=e=>e&&(Ie(e)||de(e))&&de(e.then)&&de(e.catch),Tn=((e,t)=>e?setImmediate:t?((n,r)=>(xe.addEventListener("message",({source:o,data:s})=>{o===xe&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),xe.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",de(xe.postMessage)),Br=typeof queueMicrotask<"u"?queueMicrotask.bind(xe):typeof process<"u"&&process.nextTick||Tn,Hr=e=>e!=null&&de(e[et]),p={isArray:je,isArrayBuffer:xn,isBuffer:ke,isFormData:mr,isArrayBufferView:rr,isString:or,isNumber:En,isBoolean:sr,isObject:Ie,isPlainObject:Ye,isEmptyObject:ir,isReadableStream:br,isRequest:gr,isResponse:wr,isHeaders:xr,isUndefined:Ce,isDate:ar,isFile:lr,isReactNativeBlob:cr,isReactNative:ur,isBlob:dr,isRegExp:$r,isFunction:de,isStream:pr,isURLSearchParams:yr,isTypedArray:Cr,isFileList:fr,forEach:Fe,merge:Et,extend:vr,trim:Er,stripBOM:Sr,inherits:_r,toFlatObject:Tr,kindOf:tt,kindOfTest:ye,endsWith:Rr,toArray:Or,forEachEntry:jr,matchAll:Pr,isHTMLForm:Ar,hasOwnProperty:$t,hasOwnProp:$t,reduceDescriptors:_n,freezeMethods:Mr,toObjectSet:Nr,toCamelCase:Dr,noop:kr,toFiniteNumber:Ir,findKey:vn,global:xe,isContextDefined:Sn,isSpecCompliantForm:Fr,toJSONObject:Lr,isAsyncFn:Ur,isThenable:qr,setImmediate:Tn,asap:Br,isIterable:Hr};let q=class Rn extends Error{static from(t,n,r,o,s,i){const a=new Rn(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:p.toJSONObject(this.config),code:this.code,status:this.status}}};q.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";q.ERR_BAD_OPTION="ERR_BAD_OPTION";q.ECONNABORTED="ECONNABORTED";q.ETIMEDOUT="ETIMEDOUT";q.ERR_NETWORK="ERR_NETWORK";q.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";q.ERR_DEPRECATED="ERR_DEPRECATED";q.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";q.ERR_BAD_REQUEST="ERR_BAD_REQUEST";q.ERR_CANCELED="ERR_CANCELED";q.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";q.ERR_INVALID_URL="ERR_INVALID_URL";q.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Wr=null;function vt(e){return p.isPlainObject(e)||p.isArray(e)}function On(e){return p.endsWith(e,"[]")?e.slice(0,-2):e}function lt(e,t,n){return e?e.concat(t).map(function(o,s){return o=On(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function zr(e){return p.isArray(e)&&!e.some(vt)}const Vr=p.toFlatObject(p,{},null,function(t){return/^is[A-Z]/.test(t)});function rt(e,t,n){if(!p.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=p.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,R){return!p.isUndefined(R[f])});const r=n.metaTokens,o=n.visitor||m,s=n.dots,i=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,b=n.maxDepth===void 0?100:n.maxDepth,c=a&&p.isSpecCompliantForm(t);if(!p.isFunction(o))throw new TypeError("visitor must be a function");function l(u){if(u===null)return"";if(p.isDate(u))return u.toISOString();if(p.isBoolean(u))return u.toString();if(!c&&p.isBlob(u))throw new q("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(u)||p.isTypedArray(u)?c&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function m(u,f,R){let P=u;if(p.isReactNative(t)&&p.isReactNativeBlob(u))return t.append(lt(R,f,s),l(u)),!1;if(u&&!R&&typeof u=="object"){if(p.endsWith(f,"{}"))f=r?f:f.slice(0,-2),u=JSON.stringify(u);else if(p.isArray(u)&&zr(u)||(p.isFileList(u)||p.endsWith(f,"[]"))&&(P=p.toArray(u)))return f=On(f),P.forEach(function(M,E){!(p.isUndefined(M)||M===null)&&t.append(i===!0?lt([f],E,s):i===null?f:f+"[]",l(M))}),!1}return vt(u)?!0:(t.append(lt(R,f,s),l(u)),!1)}const S=[],g=Object.assign(Vr,{defaultVisitor:m,convertValue:l,isVisitable:vt});function h(u,f,R=0){if(!p.isUndefined(u)){if(R>b)throw new q("Object is too deeply nested ("+R+" levels). Max depth: "+b,q.ERR_FORM_DATA_DEPTH_EXCEEDED);if(S.indexOf(u)!==-1)throw Error("Circular reference detected in "+f.join("."));S.push(u),p.forEach(u,function(O,M){(!(p.isUndefined(O)||O===null)&&o.call(t,O,p.isString(M)?M.trim():M,f,g))===!0&&h(O,f?f.concat(M):[M],R+1)}),S.pop()}}if(!p.isObject(e))throw new TypeError("data must be an object");return h(e),t}function Mt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Rt(e,t){this._pairs=[],e&&rt(e,this,t)}const Cn=Rt.prototype;Cn.append=function(t,n){this._pairs.push([t,n])};Cn.toString=function(t){const n=t?function(r){return t.call(this,r,Mt)}:Mt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Yr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function jn(e,t,n){if(!t)return e;const r=n&&n.encode||Yr,o=p.isFunction(n)?{serialize:n}:n,s=o&&o.serialize;let i;if(s?i=s(t,o):i=p.isURLSearchParams(t)?t.toString():new Rt(t,o).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Nt{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){p.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ot={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Jr=typeof URLSearchParams<"u"?URLSearchParams:Rt,Kr=typeof FormData<"u"?FormData:null,Xr=typeof Blob<"u"?Blob:null,Gr={isBrowser:!0,classes:{URLSearchParams:Jr,FormData:Kr,Blob:Xr},protocols:["http","https","file","blob","url","data"]},Ct=typeof window<"u"&&typeof document<"u",St=typeof navigator=="object"&&navigator||void 0,Zr=Ct&&(!St||["ReactNative","NativeScript","NS"].indexOf(St.product)<0),Qr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",eo=Ct&&window.location.href||"http://localhost",to=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ct,hasStandardBrowserEnv:Zr,hasStandardBrowserWebWorkerEnv:Qr,navigator:St,origin:eo},Symbol.toStringTag,{value:"Module"})),ce={...to,...Gr};function no(e,t){return rt(e,new ce.classes.URLSearchParams,{visitor:function(n,r,o,s){return ce.isNode&&p.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function ro(e){return p.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function oo(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 Pn(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),b=s>=n.length;return i=!i&&p.isArray(o)?o.length:i,b?(p.hasOwnProp(o,i)?o[i]=p.isArray(o[i])?o[i].concat(r):[o[i],r]:o[i]=r,!a):((!o[i]||!p.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&p.isArray(o[i])&&(o[i]=oo(o[i])),!a)}if(p.isFormData(e)&&p.isFunction(e.entries)){const n={};return p.forEachEntry(e,(r,o)=>{t(ro(r),o,n,0)}),n}return null}const Re=(e,t)=>e!=null&&p.hasOwnProp(e,t)?e[t]:void 0;function so(e,t,n){if(p.isString(e))try{return(t||JSON.parse)(e),p.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Le={transitional:Ot,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=p.isObject(t);if(s&&p.isHTMLForm(t)&&(t=new FormData(t)),p.isFormData(t))return o?JSON.stringify(Pn(t)):t;if(p.isArrayBuffer(t)||p.isBuffer(t)||p.isStream(t)||p.isFile(t)||p.isBlob(t)||p.isReadableStream(t))return t;if(p.isArrayBufferView(t))return t.buffer;if(p.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){const b=Re(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return no(t,b).toString();if((a=p.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=Re(this,"env"),l=c&&c.FormData;return rt(a?{"files[]":t}:t,l&&new l,b)}}return s||o?(n.setContentType("application/json",!1),so(t)):t}],transformResponse:[function(t){const n=Re(this,"transitional")||Le.transitional,r=n&&n.forcedJSONParsing,o=Re(this,"responseType"),s=o==="json";if(p.isResponse(t)||p.isReadableStream(t))return t;if(t&&p.isString(t)&&(r&&!o||s)){const a=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,Re(this,"parseReviver"))}catch(b){if(a)throw b.name==="SyntaxError"?q.from(b,q.ERR_BAD_RESPONSE,this,null,Re(this,"response")):b}}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}}};p.forEach(["delete","get","head","post","put","patch"],e=>{Le.headers[e]={}});const io=p.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"]),ao=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]&&io[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},kt=Symbol("internals"),lo=/[^\x09\x20-\x7E\x80-\xFF]/g;function co(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 De(e){return e&&String(e).trim().toLowerCase()}function uo(e){return co(e.replace(lo,""))}function Je(e){return e===!1||e==null?e:p.isArray(e)?e.map(Je):uo(String(e))}function fo(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 po=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ct(e,t,n,r,o){if(p.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!p.isString(t)){if(p.isString(r))return t.indexOf(r)!==-1;if(p.isRegExp(r))return r.test(t)}}function ho(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function mo(e,t){const n=p.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,b,c){const l=De(b);if(!l)throw new Error("header name must be a non-empty string");const m=p.findKey(o,l);(!m||o[m]===void 0||c===!0||c===void 0&&o[m]!==!1)&&(o[m||b]=Je(a))}const i=(a,b)=>p.forEach(a,(c,l)=>s(c,l,b));if(p.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(p.isString(t)&&(t=t.trim())&&!po(t))i(ao(t),n);else if(p.isObject(t)&&p.isIterable(t)){let a={},b,c;for(const l of t){if(!p.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[c=l[0]]=(b=a[c])?p.isArray(b)?[...b,l[1]]:[b,l[1]]:l[1]}i(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=De(t),t){const r=p.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return fo(o);if(p.isFunction(n))return n.call(this,o,r);if(p.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=De(t),t){const r=p.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ct(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=De(i),i){const a=p.findKey(r,i);a&&(!n||ct(r,r[a],a,n))&&(delete r[a],o=!0)}}return p.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||ct(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return p.forEach(this,(o,s)=>{const i=p.findKey(r,s);if(i){n[i]=Je(o),delete n[s];return}const a=t?ho(s):String(s).trim();a!==s&&delete n[s],n[a]=Je(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return p.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&p.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[kt]=this[kt]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=De(i);r[a]||(mo(o,i),r[a]=!0)}return p.isArray(t)?t.forEach(s):s(t),this}};fe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);p.reduceDescriptors(fe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});p.freezeMethods(fe);function ut(e,t){const n=this||Le,r=t||n,o=fe.from(r.headers);let s=r.data;return p.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function An(e){return!!(e&&e.__CANCEL__)}let Ue=class extends q{constructor(t,n,r){super(t??"canceled",q.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Dn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new q("Request failed with status code "+n.status,[q.ERR_BAD_REQUEST,q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function yo(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bo(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(b){const c=Date.now(),l=r[s];i||(i=c),n[o]=b,r[o]=c;let m=s,S=0;for(;m!==o;)S+=n[m++],m=m%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-i<t)return;const g=l&&c-l;return g?Math.round(S*1e3/g):void 0}}function go(e,t){let n=0,r=1e3/t,o,s;const i=(c,l=Date.now())=>{n=l,o=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const l=Date.now(),m=l-n;m>=r?i(c,l):(o=c,s||(s=setTimeout(()=>{s=null,i(o)},r-m)))},()=>o&&i(o)]}const Ge=(e,t,n=3)=>{let r=0;const o=bo(50,250);return go(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,b=a!=null?Math.min(i,a):i,c=Math.max(0,b-r),l=o(c);r=Math.max(r,b);const m={loaded:b,total:a,progress:a?b/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a?(a-b)/l:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(m)},n)},It=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ft=e=>(...t)=>p.asap(()=>e(...t)),wo=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,xo=ce.hasStandardBrowserEnv?{write(e,t,n,r,o,s,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];p.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),p.isString(r)&&a.push(`path=${r}`),p.isString(o)&&a.push(`domain=${o}`),s===!0&&a.push("secure"),p.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 Eo(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vo(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $n(e,t,n){let r=!Eo(t);return e&&(r||n===!1)?vo(e,t):t}const Lt=e=>e instanceof fe?{...e}:e;function ve(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(c,l,m,S){return p.isPlainObject(c)&&p.isPlainObject(l)?p.merge.call({caseless:S},c,l):p.isPlainObject(l)?p.merge({},l):p.isArray(l)?l.slice():l}function o(c,l,m,S){if(p.isUndefined(l)){if(!p.isUndefined(c))return r(void 0,c,m,S)}else return r(c,l,m,S)}function s(c,l){if(!p.isUndefined(l))return r(void 0,l)}function i(c,l){if(p.isUndefined(l)){if(!p.isUndefined(c))return r(void 0,c)}else return r(void 0,l)}function a(c,l,m){if(p.hasOwnProp(t,m))return r(c,l);if(p.hasOwnProp(e,m))return r(void 0,c)}const b={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:(c,l,m)=>o(Lt(c),Lt(l),m,!0)};return p.forEach(Object.keys({...e,...t}),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;const m=p.hasOwnProp(b,l)?b[l]:o,S=p.hasOwnProp(e,l)?e[l]:void 0,g=p.hasOwnProp(t,l)?t[l]:void 0,h=m(S,g,l);p.isUndefined(h)&&m!==a||(n[l]=h)}),n}const Mn=e=>{const t=ve({},e),n=S=>p.hasOwnProp(t,S)?t[S]:void 0,r=n("data");let o=n("withXSRFToken");const s=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const b=n("auth"),c=n("baseURL"),l=n("allowAbsoluteUrls"),m=n("url");if(t.headers=a=fe.from(a),t.url=jn($n(c,m,l),e.params,e.paramsSerializer),b&&a.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):""))),p.isFormData(r)){if(ce.hasStandardBrowserEnv||ce.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(p.isFunction(r.getHeaders)){const S=r.getHeaders(),g=["content-type","content-length"];Object.entries(S).forEach(([h,u])=>{g.includes(h.toLowerCase())&&a.set(h,u)})}}if(ce.hasStandardBrowserEnv&&(p.isFunction(o)&&(o=o(t)),o===!0||o==null&&wo(t.url))){const g=s&&i&&xo.read(i);g&&a.set(s,g)}return t},So=typeof XMLHttpRequest<"u",_o=So&&function(e){return new Promise(function(n,r){const o=Mn(e);let s=o.data;const i=fe.from(o.headers).normalize();let{responseType:a,onUploadProgress:b,onDownloadProgress:c}=o,l,m,S,g,h;function u(){g&&g(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let f=new XMLHttpRequest;f.open(o.method.toUpperCase(),o.url,!0),f.timeout=o.timeout;function R(){if(!f)return;const O=fe.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:O,config:e,request:f};Dn(function(re){n(re),u()},function(re){r(re),u()},E),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 q("Request aborted",q.ECONNABORTED,e,f)),f=null)},f.onerror=function(M){const E=M&&M.message?M.message:"Network Error",Z=new q(E,q.ERR_NETWORK,e,f);Z.event=M||null,r(Z),f=null},f.ontimeout=function(){let M=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Ot;o.timeoutErrorMessage&&(M=o.timeoutErrorMessage),r(new q(M,E.clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,e,f)),f=null},s===void 0&&i.setContentType(null),"setRequestHeader"in f&&p.forEach(i.toJSON(),function(M,E){f.setRequestHeader(E,M)}),p.isUndefined(o.withCredentials)||(f.withCredentials=!!o.withCredentials),a&&a!=="json"&&(f.responseType=o.responseType),c&&([S,h]=Ge(c,!0),f.addEventListener("progress",S)),b&&f.upload&&([m,g]=Ge(b),f.upload.addEventListener("progress",m),f.upload.addEventListener("loadend",g)),(o.cancelToken||o.signal)&&(l=O=>{f&&(r(!O||O.type?new Ue(null,e,f):O),f.abort(),f=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const P=yo(o.url);if(P&&ce.protocols.indexOf(P)===-1){r(new q("Unsupported protocol "+P+":",q.ERR_BAD_REQUEST,e));return}f.send(s||null)})},To=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(c){if(!o){o=!0,a();const l=c instanceof Error?c:this.reason;r.abort(l instanceof q?l:new Ue(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{i=null,s(new q(`timeout of ${t}ms exceeded`,q.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:b}=r;return b.unsubscribe=()=>p.asap(a),b}},Ro=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},Oo=async function*(e,t){for await(const n of Co(e))yield*Ro(n,t)},Co=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()}},Ut=(e,t,n,r)=>{const o=Oo(e,t);let s=0,i,a=b=>{i||(i=!0,r&&r(b))};return new ReadableStream({async pull(b){try{const{done:c,value:l}=await o.next();if(c){a(),b.close();return}let m=l.byteLength;if(n){let S=s+=m;n(S)}b.enqueue(new Uint8Array(l))}catch(c){throw a(c),c}},cancel(b){return a(b),o.return()}},{highWaterMark:2})},qt=64*1024,{isFunction:We}=p,jo=(({Request:e,Response:t})=>({Request:e,Response:t}))(p.global),{ReadableStream:Bt,TextEncoder:Ht}=p.global,Wt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Po=e=>{e=p.merge.call({skipUndefined:!0},jo,e);const{fetch:t,Request:n,Response:r}=e,o=t?We(t):typeof fetch=="function",s=We(n),i=We(r);if(!o)return!1;const a=o&&We(Bt),b=o&&(typeof Ht=="function"?(h=>u=>h.encode(u))(new Ht):async h=>new Uint8Array(await new n(h).arrayBuffer())),c=s&&a&&Wt(()=>{let h=!1;const u=new n(ce.origin,{body:new Bt,method:"POST",get duplex(){return h=!0,"half"}}),f=u.headers.has("Content-Type");return u.body!=null&&u.body.cancel(),h&&!f}),l=i&&a&&Wt(()=>p.isReadableStream(new r("").body)),m={stream:l&&(h=>h.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!m[h]&&(m[h]=(u,f)=>{let R=u&&u[h];if(R)return R.call(u);throw new q(`Response type '${h}' is not supported`,q.ERR_NOT_SUPPORT,f)})});const S=async h=>{if(h==null)return 0;if(p.isBlob(h))return h.size;if(p.isSpecCompliantForm(h))return(await new n(ce.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(p.isArrayBufferView(h)||p.isArrayBuffer(h))return h.byteLength;if(p.isURLSearchParams(h)&&(h=h+""),p.isString(h))return(await b(h)).byteLength},g=async(h,u)=>{const f=p.toFiniteNumber(h.getContentLength());return f??S(u)};return async h=>{let{url:u,method:f,data:R,signal:P,cancelToken:O,timeout:M,onDownloadProgress:E,onUploadProgress:Z,responseType:re,headers:V,withCredentials:Y="same-origin",fetchOptions:G}=Mn(h),A=t||fetch;re=re?(re+"").toLowerCase():"text";let L=To([P,O&&O.toAbortSignal()],M),te=null;const _=L&&L.unsubscribe&&(()=>{L.unsubscribe()});let T;try{if(Z&&c&&f!=="get"&&f!=="head"&&(T=await g(V,R))!==0){let x=new n(u,{method:"POST",body:R,duplex:"half"}),D;if(p.isFormData(R)&&(D=x.headers.get("content-type"))&&V.setContentType(D),x.body){const[N,$]=It(T,Ge(Ft(Z)));R=Ut(x.body,qt,N,$)}}p.isString(Y)||(Y=Y?"include":"omit");const w=s&&"credentials"in n.prototype;if(p.isFormData(R)){const x=V.getContentType();x&&/^multipart\/form-data/i.test(x)&&!/boundary=/i.test(x)&&V.delete("content-type")}const j={...G,signal:L,method:f.toUpperCase(),headers:V.normalize().toJSON(),body:R,duplex:"half",credentials:w?Y:void 0};te=s&&new n(u,j);let v=await(s?A(te,G):A(u,j));const F=l&&(re==="stream"||re==="response");if(l&&(E||F&&_)){const x={};["status","statusText","headers"].forEach(B=>{x[B]=v[B]});const D=p.toFiniteNumber(v.headers.get("content-length")),[N,$]=E&&It(D,Ge(Ft(E),!0))||[];v=new r(Ut(v.body,qt,N,()=>{$&&$(),_&&_()}),x)}re=re||"text";let y=await m[p.findKey(m,re)||"text"](v,h);return!F&&_&&_(),await new Promise((x,D)=>{Dn(x,D,{data:y,headers:fe.from(v.headers),status:v.status,statusText:v.statusText,config:h,request:te})})}catch(w){throw _&&_(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new q("Network Error",q.ERR_NETWORK,h,te,w&&w.response),{cause:w.cause||w}):q.from(w,w&&w.code,h,te,w&&w.response)}}},Ao=new Map,Nn=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let i=s.length,a=i,b,c,l=Ao;for(;a--;)b=s[a],c=l.get(b),c===void 0&&l.set(b,c=a?new Map:Po(t)),l=c;return c};Nn();const jt={http:Wr,xhr:_o,fetch:{get:Nn}};p.forEach(jt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const zt=e=>`- ${e}`,Do=e=>p.isFunction(e)||e===null||e===!1;function $o(e,t){e=p.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,!Do(r)&&(o=jt[(a=String(r)).toLowerCase()],o===void 0))throw new q(`Unknown adapter '${a}'`);if(o&&(p.isFunction(o)||(o=o.get(t))))break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([b,c])=>`adapter ${b} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
4
- `+i.map(zt).join(`
5
- `):" "+zt(i[0]):"as no adapter specified";throw new q("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const kn={getAdapter:$o,adapters:jt};function dt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ue(null,e)}function Vt(e){return dt(e),e.headers=fe.from(e.headers),e.data=ut.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),kn.getAdapter(e.adapter||Le.adapter,e)(e).then(function(r){return dt(e),r.data=ut.call(e,e.transformResponse,r),r.headers=fe.from(r.headers),r},function(r){return An(r)||(dt(e),r&&r.response&&(r.response.data=ut.call(e,e.transformResponse,r.response),r.response.headers=fe.from(r.response.headers))),Promise.reject(r)})}const In="1.15.2",ot={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ot[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Yt={};ot.transitional=function(t,n,r){function o(s,i){return"[Axios v"+In+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(t===!1)throw new q(o(i," has been removed"+(n?" in "+n:"")),q.ERR_DEPRECATED);return n&&!Yt[i]&&(Yt[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}};ot.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Mo(e,t,n){if(typeof e!="object")throw new q("options must be an object",q.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],b=a===void 0||i(a,s,e);if(b!==!0)throw new q("option "+s+" must be "+b,q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new q("Unknown option "+s,q.ERR_BAD_OPTION)}}const Ke={assertOptions:Mo,validators:ot},he=Ke.validators;let Ee=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Nt,response:new Nt}}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),b=a===-1?"":s.slice(a+1);String(r.stack).endsWith(b)||(r.stack+=`
9
- `+s)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ve(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Ke.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&&(p.isFunction(o)?n.paramsSerializer={serialize:o}:Ke.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),Ke.assertOptions(n,{baseUrl:he.spelling("baseURL"),withXsrfToken:he.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&p.merge(s.common,s[n.method]);s&&p.forEach(["delete","get","head","post","put","patch","common"],h=>{delete s[h]}),n.headers=fe.concat(i,s);const a=[];let b=!0;this.interceptors.request.forEach(function(u){if(typeof u.runWhen=="function"&&u.runWhen(n)===!1)return;b=b&&u.synchronous;const f=n.transitional||Ot;f&&f.legacyInterceptorReqResOrdering?a.unshift(u.fulfilled,u.rejected):a.push(u.fulfilled,u.rejected)});const c=[];this.interceptors.response.forEach(function(u){c.push(u.fulfilled,u.rejected)});let l,m=0,S;if(!b){const h=[Vt.bind(this),void 0];for(h.unshift(...a),h.push(...c),S=h.length,l=Promise.resolve(n);m<S;)l=l.then(h[m++],h[m++]);return l}S=a.length;let g=n;for(;m<S;){const h=a[m++],u=a[m++];try{g=h(g)}catch(f){u.call(this,f);break}}try{l=Vt.call(this,g)}catch(h){return Promise.reject(h)}for(m=0,S=c.length;m<S;)l=l.then(c[m++],c[m++]);return l}getUri(t){t=ve(this.defaults,t);const n=$n(t.baseURL,t.url,t.allowAbsoluteUrls);return jn(n,t.params,t.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(t){Ee.prototype[t]=function(n,r){return this.request(ve(r||{},{method:t,url:n,data:(r||{}).data}))}});p.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,a){return this.request(ve(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Ee.prototype[t]=n(),Ee.prototype[t+"Form"]=n(!0)});let No=class Fn{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 Ue(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 Fn(function(o){t=o}),cancel:t}}};function ko(e){return function(n){return e.apply(null,n)}}function Io(e){return p.isObject(e)&&e.isAxiosError===!0}const _t={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(_t).forEach(([e,t])=>{_t[t]=e});function Ln(e){const t=new Ee(e),n=gn(Ee.prototype.request,t);return p.extend(n,Ee.prototype,t,{allOwnKeys:!0}),p.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ln(ve(e,o))},n}const se=Ln(Le);se.Axios=Ee;se.CanceledError=Ue;se.CancelToken=No;se.isCancel=An;se.VERSION=In;se.toFormData=rt;se.AxiosError=q;se.Cancel=se.CanceledError;se.all=function(t){return Promise.all(t)};se.spread=ko;se.isAxiosError=Io;se.mergeConfig=ve;se.AxiosHeaders=fe;se.formToJSON=e=>Pn(p.isHTMLForm(e)?new FormData(e):e);se.getAdapter=kn.getAdapter;se.HttpStatusCode=_t;se.default=se;const{Axios:Ns,AxiosError:ks,CanceledError:Is,isCancel:Fs,CancelToken:Ls,VERSION:Us,all:qs,Cancel:Bs,isAxiosError:Hs,spread:Ws,toFormData:zs,AxiosHeaders:Vs,HttpStatusCode:Ys,formToJSON:Js,getAdapter:Ks,mergeConfig:Xs}=se,Fo=()=>new Promise(e=>setTimeout(()=>e(),800)),Pe=se.create({baseURL:"https://npmapi.ubkerp.com/"}),Lo=async(e,t,n)=>{const r=await Pe.post(e,t,{headers:{Authorization:n}});if(console.log("ddddfdfdfd",r.data?.Status),r.data?.Status=="Success")return r?.data?.data||r?.data;throw new Error(r.data?.msg)},Un=async(e,t)=>{try{let r=e;if(!e.includes("session_id")){const s=e.includes("?")?"&":"?";r=`${e}${s}session_id=1`}return(await Pe.get(r,{headers:{Authorization:t}})).data}catch(n){throw n.response?.status===401&&console.error("401 Unauthorized"),n}},Uo=async(e,t)=>{const n=await Pe.post(e,"",{headers:{Authorization:t}});if(n.data?.Status=="Success")return n?.data?.data||n?.data;throw new Error(n.data?.msg)},ft=async(e,t)=>{const n=localStorage.getItem("authToken"),r=t?.arg;return(await Pe.post(e,r,{headers:{Authorization:n}}))?.data},qo=async(e,t,n)=>(await Fo(),(await Pe.post(e,t,{headers:{Authorization:n}}))?.data),Bo=async(e,t,n)=>(await Pe.delete(`${e}/${t}`,{headers:{Authorization:n}})).data,Ho=({token:e,menu:t})=>{const{isLoading:n,data:r}=Tt(e?["api/sdk/Menus",e]:null,([s,i])=>Uo(s,i)),o=r?.find(s=>s.path===t)?.sub_menu??[];return console.log("menuData",r),d.jsx(k.Row,{gutter:[16,16],children:o?.map((s,i)=>s.dashboard_show==="YES"?d.jsx(k.Col,{xs:24,md:8,lg:8,children:d.jsx(ae,{children:d.jsx(bn,{icon:`https://npmapi.ubkerp.com/icons/frontoffice/${s.icons}`,title:s.submenu_name,path:s.menu_key})})},`${i}office001`):null)})};function Wo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ie={},pt,Jt;function zo(){return Jt||(Jt=1,pt=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}),pt}var ze={exports:{}},Ve={exports:{}},Q={};var Kt;function Vo(){if(Kt)return Q;Kt=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,b=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,S=e?Symbol.for("react.suspense_list"):60120,g=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,P=e?Symbol.for("react.scope"):60119;function O(E){if(typeof E=="object"&&E!==null){var Z=E.$$typeof;switch(Z){case t:switch(E=E.type,E){case b:case c:case r:case s:case o:case m:return E;default:switch(E=E&&E.$$typeof,E){case a:case l:case h:case g:case i:return E;default:return Z}}case n:return Z}}}function M(E){return O(E)===c}return Q.AsyncMode=b,Q.ConcurrentMode=c,Q.ContextConsumer=a,Q.ContextProvider=i,Q.Element=t,Q.ForwardRef=l,Q.Fragment=r,Q.Lazy=h,Q.Memo=g,Q.Portal=n,Q.Profiler=s,Q.StrictMode=o,Q.Suspense=m,Q.isAsyncMode=function(E){return M(E)||O(E)===b},Q.isConcurrentMode=M,Q.isContextConsumer=function(E){return O(E)===a},Q.isContextProvider=function(E){return O(E)===i},Q.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},Q.isForwardRef=function(E){return O(E)===l},Q.isFragment=function(E){return O(E)===r},Q.isLazy=function(E){return O(E)===h},Q.isMemo=function(E){return O(E)===g},Q.isPortal=function(E){return O(E)===n},Q.isProfiler=function(E){return O(E)===s},Q.isStrictMode=function(E){return O(E)===o},Q.isSuspense=function(E){return O(E)===m},Q.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===c||E===s||E===o||E===m||E===S||typeof E=="object"&&E!==null&&(E.$$typeof===h||E.$$typeof===g||E.$$typeof===i||E.$$typeof===a||E.$$typeof===l||E.$$typeof===f||E.$$typeof===R||E.$$typeof===P||E.$$typeof===u)},Q.typeOf=O,Q}var ee={};var Xt;function Yo(){return Xt||(Xt=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,b=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,S=e?Symbol.for("react.suspense_list"):60120,g=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,P=e?Symbol.for("react.scope"):60119;function O(C){return typeof C=="string"||typeof C=="function"||C===r||C===c||C===s||C===o||C===m||C===S||typeof C=="object"&&C!==null&&(C.$$typeof===h||C.$$typeof===g||C.$$typeof===i||C.$$typeof===a||C.$$typeof===l||C.$$typeof===f||C.$$typeof===R||C.$$typeof===P||C.$$typeof===u)}function M(C){if(typeof C=="object"&&C!==null){var le=C.$$typeof;switch(le){case t:var Se=C.type;switch(Se){case b:case c:case r:case s:case o:case m:return Se;default:var qe=Se&&Se.$$typeof;switch(qe){case a:case l:case h:case g:case i:return qe;default:return le}}case n:return le}}}var E=b,Z=c,re=a,V=i,Y=t,G=l,A=r,L=h,te=g,_=n,T=s,w=o,j=m,v=!1;function F(C){return v||(v=!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(C)||M(C)===b}function y(C){return M(C)===c}function x(C){return M(C)===a}function D(C){return M(C)===i}function N(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function $(C){return M(C)===l}function B(C){return M(C)===r}function W(C){return M(C)===h}function z(C){return M(C)===g}function K(C){return M(C)===n}function J(C){return M(C)===s}function H(C){return M(C)===o}function oe(C){return M(C)===m}ee.AsyncMode=E,ee.ConcurrentMode=Z,ee.ContextConsumer=re,ee.ContextProvider=V,ee.Element=Y,ee.ForwardRef=G,ee.Fragment=A,ee.Lazy=L,ee.Memo=te,ee.Portal=_,ee.Profiler=T,ee.StrictMode=w,ee.Suspense=j,ee.isAsyncMode=F,ee.isConcurrentMode=y,ee.isContextConsumer=x,ee.isContextProvider=D,ee.isElement=N,ee.isForwardRef=$,ee.isFragment=B,ee.isLazy=W,ee.isMemo=z,ee.isPortal=K,ee.isProfiler=J,ee.isStrictMode=H,ee.isSuspense=oe,ee.isValidElementType=O,ee.typeOf=M})()),ee}var Gt;function qn(){return Gt||(Gt=1,process.env.NODE_ENV==="production"?Ve.exports=Vo():Ve.exports=Yo()),Ve.exports}var ht,Zt;function Jo(){if(Zt)return ht;Zt=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 b=Object.getOwnPropertyNames(i).map(function(l){return i[l]});if(b.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(l){c[l]=l}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ht=o()?Object.assign:function(s,i){for(var a,b=r(s),c,l=1;l<arguments.length;l++){a=Object(arguments[l]);for(var m in a)t.call(a,m)&&(b[m]=a[m]);if(e){c=e(a);for(var S=0;S<c.length;S++)n.call(a,c[S])&&(b[c[S]]=a[c[S]])}}return b},ht}var mt,Qt;function Pt(){if(Qt)return mt;Qt=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return mt=e,mt}var yt,en;function Bn(){return en||(en=1,yt=Function.call.bind(Object.prototype.hasOwnProperty)),yt}var bt,tn;function Ko(){if(tn)return bt;tn=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Pt(),n={},r=Bn();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,b,c){if(process.env.NODE_ENV!=="production"){for(var l in s)if(r(s,l)){var m;try{if(typeof s[l]!="function"){var S=Error((b||"React class")+": "+a+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}m=s[l](i,l,b,a,null,t)}catch(h){m=h}if(m&&!(m instanceof Error)&&e((b||"React class")+": type specification of "+a+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in n)){n[m.message]=!0;var g=c?c():"";e("Failed "+a+" type: "+m.message+(g??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},bt=o,bt}var gt,nn;function Xo(){if(nn)return gt;nn=1;var e=qn(),t=Jo(),n=Pt(),r=Bn(),o=Ko(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var b="Warning: "+a;typeof console<"u"&&console.error(b);try{throw new Error(b)}catch{}});function i(){return null}return gt=function(a,b){var c=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function m(y){var x=y&&(c&&y[c]||y[l]);if(typeof x=="function")return x}var S="<<anonymous>>",g={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:P(),arrayOf:O,element:M(),elementType:E(),instanceOf:Z,node:G(),objectOf:V,oneOf:re,oneOfType:Y,shape:L,exact:te};function h(y,x){return y===x?y!==0||1/y===1/x:y!==y&&x!==x}function u(y,x){this.message=y,this.data=x&&typeof x=="object"?x:{},this.stack=""}u.prototype=Error.prototype;function f(y){if(process.env.NODE_ENV!=="production")var x={},D=0;function N(B,W,z,K,J,H,oe){if(K=K||S,H=H||z,oe!==n){if(b){var C=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 C.name="Invariant Violation",C}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var le=K+":"+z;!x[le]&&D<3&&(s("You are manually calling a React.PropTypes validation function for the `"+H+"` prop on `"+K+"`. 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."),x[le]=!0,D++)}}return W[z]==null?B?W[z]===null?new u("The "+J+" `"+H+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new u("The "+J+" `"+H+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:y(W,z,K,J,H)}var $=N.bind(null,!1);return $.isRequired=N.bind(null,!0),$}function R(y){function x(D,N,$,B,W,z){var K=D[N],J=w(K);if(J!==y){var H=j(K);return new u("Invalid "+B+" `"+W+"` of type "+("`"+H+"` supplied to `"+$+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return f(x)}function P(){return f(i)}function O(y){function x(D,N,$,B,W){if(typeof y!="function")return new u("Property `"+W+"` of component `"+$+"` has invalid PropType notation inside arrayOf.");var z=D[N];if(!Array.isArray(z)){var K=w(z);return new u("Invalid "+B+" `"+W+"` of type "+("`"+K+"` supplied to `"+$+"`, expected an array."))}for(var J=0;J<z.length;J++){var H=y(z,J,$,B,W+"["+J+"]",n);if(H instanceof Error)return H}return null}return f(x)}function M(){function y(x,D,N,$,B){var W=x[D];if(!a(W)){var z=w(W);return new u("Invalid "+$+" `"+B+"` of type "+("`"+z+"` supplied to `"+N+"`, expected a single ReactElement."))}return null}return f(y)}function E(){function y(x,D,N,$,B){var W=x[D];if(!e.isValidElementType(W)){var z=w(W);return new u("Invalid "+$+" `"+B+"` of type "+("`"+z+"` supplied to `"+N+"`, expected a single ReactElement type."))}return null}return f(y)}function Z(y){function x(D,N,$,B,W){if(!(D[N]instanceof y)){var z=y.name||S,K=F(D[N]);return new u("Invalid "+B+" `"+W+"` of type "+("`"+K+"` supplied to `"+$+"`, expected ")+("instance of `"+z+"`."))}return null}return f(x)}function re(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 x(D,N,$,B,W){for(var z=D[N],K=0;K<y.length;K++)if(h(z,y[K]))return null;var J=JSON.stringify(y,function(oe,C){var le=j(C);return le==="symbol"?String(C):C});return new u("Invalid "+B+" `"+W+"` of value `"+String(z)+"` "+("supplied to `"+$+"`, expected one of "+J+"."))}return f(x)}function V(y){function x(D,N,$,B,W){if(typeof y!="function")return new u("Property `"+W+"` of component `"+$+"` has invalid PropType notation inside objectOf.");var z=D[N],K=w(z);if(K!=="object")return new u("Invalid "+B+" `"+W+"` of type "+("`"+K+"` supplied to `"+$+"`, expected an object."));for(var J in z)if(r(z,J)){var H=y(z,J,$,B,W+"."+J,n);if(H instanceof Error)return H}return null}return f(x)}function Y(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 x=0;x<y.length;x++){var D=y[x];if(typeof D!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+v(D)+" at index "+x+"."),i}function N($,B,W,z,K){for(var J=[],H=0;H<y.length;H++){var oe=y[H],C=oe($,B,W,z,K,n);if(C==null)return null;C.data&&r(C.data,"expectedType")&&J.push(C.data.expectedType)}var le=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new u("Invalid "+z+" `"+K+"` supplied to "+("`"+W+"`"+le+"."))}return f(N)}function G(){function y(x,D,N,$,B){return _(x[D])?null:new u("Invalid "+$+" `"+B+"` supplied to "+("`"+N+"`, expected a ReactNode."))}return f(y)}function A(y,x,D,N,$){return new u((y||"React class")+": "+x+" type `"+D+"."+N+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+$+"`.")}function L(y){function x(D,N,$,B,W){var z=D[N],K=w(z);if(K!=="object")return new u("Invalid "+B+" `"+W+"` of type `"+K+"` "+("supplied to `"+$+"`, expected `object`."));for(var J in y){var H=y[J];if(typeof H!="function")return A($,B,W,J,j(H));var oe=H(z,J,$,B,W+"."+J,n);if(oe)return oe}return null}return f(x)}function te(y){function x(D,N,$,B,W){var z=D[N],K=w(z);if(K!=="object")return new u("Invalid "+B+" `"+W+"` of type `"+K+"` "+("supplied to `"+$+"`, expected `object`."));var J=t({},D[N],y);for(var H in J){var oe=y[H];if(r(y,H)&&typeof oe!="function")return A($,B,W,H,j(oe));if(!oe)return new u("Invalid "+B+" `"+W+"` key `"+H+"` supplied to `"+$+"`.\nBad object: "+JSON.stringify(D[N],null," ")+`
10
- Valid keys: `+JSON.stringify(Object.keys(y),null," "));var C=oe(z,H,$,B,W+"."+H,n);if(C)return C}return null}return f(x)}function _(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(_);if(y===null||a(y))return!0;var x=m(y);if(x){var D=x.call(y),N;if(x!==y.entries){for(;!(N=D.next()).done;)if(!_(N.value))return!1}else for(;!(N=D.next()).done;){var $=N.value;if($&&!_($[1]))return!1}}else return!1;return!0;default:return!1}}function T(y,x){return y==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function w(y){var x=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":T(x,y)?"symbol":x}function j(y){if(typeof y>"u"||y===null)return""+y;var x=w(y);if(x==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return x}function v(y){var x=j(y);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function F(y){return!y.constructor||!y.constructor.name?S:y.constructor.name}return g.checkPropTypes=o,g.resetWarningCache=o.resetWarningCache,g.PropTypes=g,g},gt}var wt,rn;function Go(){if(rn)return wt;rn=1;var e=Pt();function t(){}function n(){}return n.resetWarningCache=t,wt=function(){function r(i,a,b,c,l,m){if(m!==e){var S=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 S.name="Invariant Violation",S}}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},wt}var on;function Zo(){if(on)return ze.exports;if(on=1,process.env.NODE_ENV!=="production"){var e=qn(),t=!0;ze.exports=Xo()(e.isElement,t)}else ze.exports=Go()();return ze.exports}var sn;function Qo(){if(sn)return ie;sn=1;var e=ie&&ie.__extends||(function(){var g=function(h,u){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,R){f.__proto__=R}||function(f,R){for(var P in R)Object.prototype.hasOwnProperty.call(R,P)&&(f[P]=R[P])},g(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");g(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(g){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)&&(g[R]=h[R])}return g},t.apply(this,arguments)},n=ie&&ie.__createBinding||(Object.create?(function(g,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(g,f,R)}):(function(g,h,u,f){f===void 0&&(f=u),g[f]=h[u]})),r=ie&&ie.__setModuleDefault||(Object.create?(function(g,h){Object.defineProperty(g,"default",{enumerable:!0,value:h})}):function(g,h){g.default=h}),o=ie&&ie.__importStar||function(g){if(g&&g.__esModule)return g;var h={};if(g!=null)for(var u in g)u!=="default"&&Object.prototype.hasOwnProperty.call(g,u)&&n(h,g,u);return r(h,g),h},s=ie&&ie.__rest||function(g,h){var u={};for(var f in g)Object.prototype.hasOwnProperty.call(g,f)&&h.indexOf(f)<0&&(u[f]=g[f]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,f=Object.getOwnPropertySymbols(g);R<f.length;R++)h.indexOf(f[R])<0&&Object.prototype.propertyIsEnumerable.call(g,f[R])&&(u[f[R]]=g[f[R]]);return u},i=ie&&ie.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(ie,"__esModule",{value:!0});var a=o(ne),b=i(zo()),c=o(Zo());function l(g){return g&&g.replace(/&nbsp;|\u202F|\u00A0/g," ").replace(/<br \/>/g,"<br>")}function m(g){var h=document.createTextNode("");g.appendChild(h);var u=document.activeElement===g;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)}g instanceof HTMLElement&&g.focus()}}var S=(function(g){e(h,g);function h(){var u=g!==null&&g.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 P=R.innerHTML;if(u.props.onChange&&P!==u.lastHtml){var O=Object.assign({},f,{target:{value:P}});u.props.onChange(O)}u.lastHtml=P}},u}return h.prototype.render=function(){var u=this,f=this.props,R=f.tagName,P=f.html,O=f.innerRef,M=s(f,["tagName","html","innerRef"]);return a.createElement(R||"div",t(t({},M),{ref:typeof O=="function"?function(E){O(E),u.el.current=E}:O||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:P}}),this.props.children)},h.prototype.shouldComponentUpdate=function(u){var f=this.props,R=this.getEl();return!R||l(u.html)!==l(R.innerHTML)?!0:f.disabled!==u.disabled||f.tagName!==u.tagName||f.className!==u.className||f.innerRef!==u.innerRef||f.placeholder!==u.placeholder||!(0,b.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,m(u))},h.propTypes={html:c.string.isRequired,onChange:c.func,disabled:c.bool,tagName:c.string,className:c.string,style:c.object,innerRef:c.oneOfType([c.object,c.func])},h})(a.Component);return ie.default=S,ie}var es=Qo();const ts=Wo(es),ns={display:"block",marginBottom:6,fontSize:"14px",fontWeight:500,color:"#222"},rs={width:"100%",minHeight:40,padding:"8px 0",fontSize:"14px",color:"#222",background:"transparent",border:0,borderTop:0,borderLeft:0,borderRight:0,borderBottom:"1px solid #d9d9d9",borderRadius:0,boxShadow:"none",outline:"none",transition:"border-color 0.2s ease"},be=ne.forwardRef(({style:e,onFocus:t,onBlur:n,...r},o)=>{const[s,i]=ne.useState(!1);return d.jsxs("div",{className:"",style:{width:"100%"},children:[r.label&&d.jsx("label",{className:"labelfont",style:ns,children:r.label}),d.jsx("input",{placeholder:r.placeholder||r.label,...r,ref:o,onFocus:a=>{i(!0),t?.(a)},onBlur:a=>{i(!1),n?.(a)},style:{...rs,borderBottom:`1px solid ${s?"#222":"#d9d9d9"}`,...e||{}}})]})});var Xe={exports:{}},os=Xe.exports,an;function ss(){return an||(an=1,(function(e,t){(function(n,r){e.exports=r()})(os,(function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",b="hour",c="day",l="week",m="month",S="quarter",g="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,P={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(_){var T=["th","st","nd","rd"],w=_%100;return"["+_+(T[(w-20)%10]||T[w]||T[0])+"]"}},O=function(_,T,w){var j=String(_);return!j||j.length>=T?_:""+Array(T+1-j.length).join(w)+_},M={s:O,z:function(_){var T=-_.utcOffset(),w=Math.abs(T),j=Math.floor(w/60),v=w%60;return(T<=0?"+":"-")+O(j,2,"0")+":"+O(v,2,"0")},m:function _(T,w){if(T.date()<w.date())return-_(w,T);var j=12*(w.year()-T.year())+(w.month()-T.month()),v=T.clone().add(j,m),F=w-v<0,y=T.clone().add(j+(F?-1:1),m);return+(-(j+(w-v)/(F?v-y:y-v))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:m,y:g,w:l,d:c,D:h,h:b,m:a,s:i,ms:s,Q:S}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},E="en",Z={};Z[E]=P;var re="$isDayjsObject",V=function(_){return _ instanceof L||!(!_||!_[re])},Y=function _(T,w,j){var v;if(!T)return E;if(typeof T=="string"){var F=T.toLowerCase();Z[F]&&(v=F),w&&(Z[F]=w,v=F);var y=T.split("-");if(!v&&y.length>1)return _(y[0])}else{var x=T.name;Z[x]=T,v=x}return!j&&v&&(E=v),v||!j&&E},G=function(_,T){if(V(_))return _.clone();var w=typeof T=="object"?T:{};return w.date=_,w.args=arguments,new L(w)},A=M;A.l=Y,A.i=V,A.w=function(_,T){return G(_,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var L=(function(){function _(w){this.$L=Y(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[re]=!0}var T=_.prototype;return T.parse=function(w){this.$d=(function(j){var v=j.date,F=j.utc;if(v===null)return new Date(NaN);if(A.u(v))return new Date;if(v instanceof Date)return new Date(v);if(typeof v=="string"&&!/Z$/i.test(v)){var y=v.match(f);if(y){var x=y[2]-1||0,D=(y[7]||"0").substring(0,3);return F?new Date(Date.UTC(y[1],x,y[3]||1,y[4]||0,y[5]||0,y[6]||0,D)):new Date(y[1],x,y[3]||1,y[4]||0,y[5]||0,y[6]||0,D)}}return new Date(v)})(w),this.init()},T.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},T.$utils=function(){return A},T.isValid=function(){return this.$d.toString()!==u},T.isSame=function(w,j){var v=G(w);return this.startOf(j)<=v&&v<=this.endOf(j)},T.isAfter=function(w,j){return G(w)<this.startOf(j)},T.isBefore=function(w,j){return this.endOf(j)<G(w)},T.$g=function(w,j,v){return A.u(w)?this[j]:this.set(v,w)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(w,j){var v=this,F=!!A.u(j)||j,y=A.p(w),x=function(J,H){var oe=A.w(v.$u?Date.UTC(v.$y,H,J):new Date(v.$y,H,J),v);return F?oe:oe.endOf(c)},D=function(J,H){return A.w(v.toDate()[J].apply(v.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(H)),v)},N=this.$W,$=this.$M,B=this.$D,W="set"+(this.$u?"UTC":"");switch(y){case g:return F?x(1,0):x(31,11);case m:return F?x(1,$):x(0,$+1);case l:var z=this.$locale().weekStart||0,K=(N<z?N+7:N)-z;return x(F?B-K:B+(6-K),$);case c:case h:return D(W+"Hours",0);case b:return D(W+"Minutes",1);case a:return D(W+"Seconds",2);case i:return D(W+"Milliseconds",3);default:return this.clone()}},T.endOf=function(w){return this.startOf(w,!1)},T.$set=function(w,j){var v,F=A.p(w),y="set"+(this.$u?"UTC":""),x=(v={},v[c]=y+"Date",v[h]=y+"Date",v[m]=y+"Month",v[g]=y+"FullYear",v[b]=y+"Hours",v[a]=y+"Minutes",v[i]=y+"Seconds",v[s]=y+"Milliseconds",v)[F],D=F===c?this.$D+(j-this.$W):j;if(F===m||F===g){var N=this.clone().set(h,1);N.$d[x](D),N.init(),this.$d=N.set(h,Math.min(this.$D,N.daysInMonth())).$d}else x&&this.$d[x](D);return this.init(),this},T.set=function(w,j){return this.clone().$set(w,j)},T.get=function(w){return this[A.p(w)]()},T.add=function(w,j){var v,F=this;w=Number(w);var y=A.p(j),x=function($){var B=G(F);return A.w(B.date(B.date()+Math.round($*w)),F)};if(y===m)return this.set(m,this.$M+w);if(y===g)return this.set(g,this.$y+w);if(y===c)return x(1);if(y===l)return x(7);var D=(v={},v[a]=r,v[b]=o,v[i]=n,v)[y]||1,N=this.$d.getTime()+w*D;return A.w(N,this)},T.subtract=function(w,j){return this.add(-1*w,j)},T.format=function(w){var j=this,v=this.$locale();if(!this.isValid())return v.invalidDate||u;var F=w||"YYYY-MM-DDTHH:mm:ssZ",y=A.z(this),x=this.$H,D=this.$m,N=this.$M,$=v.weekdays,B=v.months,W=v.meridiem,z=function(H,oe,C,le){return H&&(H[oe]||H(j,F))||C[oe].slice(0,le)},K=function(H){return A.s(x%12||12,H,"0")},J=W||function(H,oe,C){var le=H<12?"AM":"PM";return C?le.toLowerCase():le};return F.replace(R,(function(H,oe){return oe||(function(C){switch(C){case"YY":return String(j.$y).slice(-2);case"YYYY":return A.s(j.$y,4,"0");case"M":return N+1;case"MM":return A.s(N+1,2,"0");case"MMM":return z(v.monthsShort,N,B,3);case"MMMM":return z(B,N);case"D":return j.$D;case"DD":return A.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return z(v.weekdaysMin,j.$W,$,2);case"ddd":return z(v.weekdaysShort,j.$W,$,3);case"dddd":return $[j.$W];case"H":return String(x);case"HH":return A.s(x,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return J(x,D,!0);case"A":return J(x,D,!1);case"m":return String(D);case"mm":return A.s(D,2,"0");case"s":return String(j.$s);case"ss":return A.s(j.$s,2,"0");case"SSS":return A.s(j.$ms,3,"0");case"Z":return y}return null})(H)||y.replace(":","")}))},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(w,j,v){var F,y=this,x=A.p(j),D=G(w),N=(D.utcOffset()-this.utcOffset())*r,$=this-D,B=function(){return A.m(y,D)};switch(x){case g:F=B()/12;break;case m:F=B();break;case S:F=B()/3;break;case l:F=($-N)/6048e5;break;case c:F=($-N)/864e5;break;case b:F=$/o;break;case a:F=$/r;break;case i:F=$/n;break;default:F=$}return v?F:A.a(F)},T.daysInMonth=function(){return this.endOf(m).$D},T.$locale=function(){return Z[this.$L]},T.locale=function(w,j){if(!w)return this.$L;var v=this.clone(),F=Y(w,j,!0);return F&&(v.$L=F),v},T.clone=function(){return A.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},_})(),te=L.prototype;return G.prototype=te,[["$ms",s],["$s",i],["$m",a],["$H",b],["$W",c],["$M",m],["$y",g],["$D",h]].forEach((function(_){te[_[1]]=function(T){return this.$g(T,_[0],_[1])}})),G.extend=function(_,T){return _.$i||(_(T,L,G),_.$i=!0),G},G.locale=Y,G.isDayjs=V,G.unix=function(_){return G(1e3*_)},G.en=Z[E],G.Ls=Z,G.p={},G}))})(Xe)),Xe.exports}ss();function is(){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 as=e=>{const t=JSON.parse(localStorage.getItem("genrall_settings"));return console.log("amount______",e),d.jsxs(d.Fragment,{children:[t?.currency_icon," ",Number(e||0).toLocaleString("en-IN")]})};var $e={},Me={},pe={},Ne={},Oe={},ln;function ls(){if(ln)return Oe;ln=1;var e=Oe&&Oe.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Oe,"__esModule",{value:!0});const t=e(ne),n=er,r=["string","number","boolean"];function o({header:s,body:i}){const a=t.default.createElement("tr",null,s.map(c=>t.default.createElement("th",{key:c},c))),b=i.map((c,l)=>Array.isArray(c)?t.default.createElement("tr",{key:l},c.map((m,S)=>t.default.createElement("th",{key:S}," ",m," "))):c!==null&&typeof c=="object"?t.default.createElement("tr",{key:l},Object.entries(c).map(([m,S],g)=>typeof S=="object"?(console.error(`typeof ${m} is incorrect, only accept ${r.join(", ")} `),t.default.createElement("th",{key:g})):t.default.createElement("th",{key:g},t.default.createElement(t.default.Fragment,null,S)))):(console.error(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),j=require("antd"),ce=require("swr"),v=require("react"),Lt=require("swr/mutation"),ye=require("@ant-design/icons"),fe=require("dayjs"),Wr=require("react-dom/server"),te=require("react-hot-toast"),ur=require("react-select"),Kr=()=>r.jsxs(j.Card,{style:{borderRadius:16},children:[r.jsx(j.Typography.Title,{level:3,style:{marginTop:0},children:"UBK ERP"}),r.jsx(j.Typography.Paragraph,{style:{marginBottom:0},children:"Welcome to your webpack-powered ERP system."})]}),X=({width:e,height:t,display:n,justifyContent:o,alignItems:s,flexDirection:a,gap:i,style:l,children:h,...d})=>{const c={width:e,height:t,display:n,justifyContent:o,alignItems:s,flexDirection:a,gap:i,...l};return r.jsx("div",{style:c,...d,children:h})},_e=({variant:e,fontWeight:t,style:n,children:o,...s})=>{const a=t==="bold"?700:t==="light"?300:t;return e==="h1"?r.jsx(j.Typography.Title,{level:1,style:{fontWeight:a,...n},...s,children:o}):e==="h2"?r.jsx(j.Typography.Title,{level:2,style:{fontWeight:a,...n},...s,children:o}):e==="h3"?r.jsx(j.Typography.Title,{level:3,style:{fontWeight:a,...n},...s,children:o}):e==="h4"?r.jsx(j.Typography.Title,{level:4,style:{fontWeight:a,...n},...s,children:o}):e==="h5"?r.jsx(j.Typography.Title,{level:5,style:{fontWeight:a,...n},...s,children:o}):r.jsx(j.Typography.Text,{style:{fontWeight:a,...n},...s,children:o})};function pr({title:e="",icon:t="",path:n="",onClick:o}){const s=()=>{if(o){o(n);return}typeof window<"u"&&typeof n=="string"&&n.length>0&&window.location.assign(n)};return r.jsxs(j.Card,{hoverable:!0,onClick:s,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:[r.jsx(X,{width:"100%",display:"flex",justifyContent:"center",alignItems:"center",style:{padding:"10px 12px",minHeight:80},children:r.jsx("img",{src:t,alt:"",style:{width:45,height:50,objectFit:"contain"}})}),r.jsx(X,{style:{padding:"0 12px"},children:r.jsx(j.Divider,{style:{margin:0,minWidth:0}})}),r.jsx(X,{style:{padding:"10px 10px",display:"flex",justifyContent:"center",alignItems:"center",minHeight:35},children:r.jsx(_e,{variant:"button",fontWeight:"bold",style:{fontSize:12},children:e})})]})}function fr(e,t){return function(){return e.apply(t,arguments)}}const{toString:Yr}=Object.prototype,{getPrototypeOf:It}=Object,{iterator:Nt,toStringTag:hr}=Symbol,kt=(e=>t=>{const n=Yr.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ke=e=>(e=e.toLowerCase(),t=>kt(t)===e),Ut=e=>t=>typeof t===e,{isArray:ot}=Array,rt=Ut("undefined");function mt(e){return e!==null&&!rt(e)&&e.constructor!==null&&!rt(e.constructor)&&Ee(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mr=ke("ArrayBuffer");function Jr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mr(e.buffer),t}const Gr=Ut("string"),Ee=Ut("function"),yr=Ut("number"),yt=e=>e!==null&&typeof e=="object",Xr=e=>e===!0||e===!1,Rt=e=>{if(kt(e)!=="object")return!1;const t=It(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(hr in e)&&!(Nt in e)},Qr=e=>{if(!yt(e)||mt(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Zr=ke("Date"),eo=ke("File"),to=e=>!!(e&&typeof e.uri<"u"),no=e=>e&&typeof e.getParts<"u",ro=ke("Blob"),oo=ke("FileList"),so=e=>yt(e)&&Ee(e.pipe);function ao(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const gn=ao(),bn=typeof gn.FormData<"u"?gn.FormData:void 0,io=e=>{if(!e)return!1;if(bn&&e instanceof bn)return!0;const t=It(e);if(!t||t===Object.prototype||!Ee(e.append))return!1;const n=kt(e);return n==="formdata"||n==="object"&&Ee(e.toString)&&e.toString()==="[object FormData]"},lo=ke("URLSearchParams"),[co,uo,po,fo]=["ReadableStream","Request","Response","Headers"].map(ke),ho=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gt(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,s;if(typeof e!="object"&&(e=[e]),ot(e))for(o=0,s=e.length;o<s;o++)t.call(null,e[o],o,e);else{if(mt(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let l;for(o=0;o<i;o++)l=a[o],t.call(null,e[l],l,e)}}function gr(e,t){if(mt(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o=n.length,s;for(;o-- >0;)if(s=n[o],t===s.toLowerCase())return s;return null}const ze=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,br=e=>!rt(e)&&e!==ze;function rn(){const{caseless:e,skipUndefined:t}=br(this)&&this||{},n={},o=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const i=e&&gr(n,a)||a;Rt(n[i])&&Rt(s)?n[i]=rn(n[i],s):Rt(s)?n[i]=rn({},s):ot(s)?n[i]=s.slice():(!t||!rt(s))&&(n[i]=s)};for(let s=0,a=arguments.length;s<a;s++)arguments[s]&&gt(arguments[s],o);return n}const mo=(e,t,n,{allOwnKeys:o}={})=>(gt(t,(s,a)=>{n&&Ee(s)?Object.defineProperty(e,a,{value:fr(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),e),yo=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),go=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),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)},bo=(e,t,n,o)=>{let s,a,i;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)i=s[a],(!o||o(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=n!==!1&&It(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},xo=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},wo=e=>{if(!e)return null;if(ot(e))return e;let t=e.length;if(!yr(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},So=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&It(Uint8Array)),vo=(e,t)=>{const o=(e&&e[Nt]).call(e);let s;for(;(s=o.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},_o=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},jo=ke("HTMLFormElement"),To=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,s){return o.toUpperCase()+s}),xn=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Eo=ke("RegExp"),xr=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};gt(n,(s,a)=>{let i;(i=t(s,a,e))!==!1&&(o[a]=i||s)}),Object.defineProperties(e,o)},Co=e=>{xr(e,(t,n)=>{if(Ee(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(Ee(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ro=(e,t)=>{const n={},o=s=>{s.forEach(a=>{n[a]=!0})};return ot(e)?o(e):o(String(e).split(t)),n},Oo=()=>{},Do=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ao(e){return!!(e&&Ee(e.append)&&e[hr]==="FormData"&&e[Nt])}const Po=e=>{const t=new Array(10),n=(o,s)=>{if(yt(o)){if(t.indexOf(o)>=0)return;if(mt(o))return o;if(!("toJSON"in o)){t[s]=o;const a=ot(o)?[]:{};return gt(o,(i,l)=>{const h=n(i,s+1);!rt(h)&&(a[l]=h)}),t[s]=void 0,a}}return o};return n(e,0)},Io=ke("AsyncFunction"),No=e=>e&&(yt(e)||Ee(e))&&Ee(e.then)&&Ee(e.catch),wr=((e,t)=>e?setImmediate:t?((n,o)=>(ze.addEventListener("message",({source:s,data:a})=>{s===ze&&a===n&&o.length&&o.shift()()},!1),s=>{o.push(s),ze.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ee(ze.postMessage)),ko=typeof queueMicrotask<"u"?queueMicrotask.bind(ze):typeof process<"u"&&process.nextTick||wr,Uo=e=>e!=null&&Ee(e[Nt]),y={isArray:ot,isArrayBuffer:mr,isBuffer:mt,isFormData:io,isArrayBufferView:Jr,isString:Gr,isNumber:yr,isBoolean:Xr,isObject:yt,isPlainObject:Rt,isEmptyObject:Qr,isReadableStream:co,isRequest:uo,isResponse:po,isHeaders:fo,isUndefined:rt,isDate:Zr,isFile:eo,isReactNativeBlob:to,isReactNative:no,isBlob:ro,isRegExp:Eo,isFunction:Ee,isStream:so,isURLSearchParams:lo,isTypedArray:So,isFileList:oo,forEach:gt,merge:rn,extend:mo,trim:ho,stripBOM:yo,inherits:go,toFlatObject:bo,kindOf:kt,kindOfTest:ke,endsWith:xo,toArray:wo,forEachEntry:vo,matchAll:_o,isHTMLForm:jo,hasOwnProperty:xn,hasOwnProp:xn,reduceDescriptors:xr,freezeMethods:Co,toObjectSet:Ro,toCamelCase:To,noop:Oo,toFiniteNumber:Do,findKey:gr,global:ze,isContextDefined:br,isSpecCompliantForm:Ao,toJSONObject:Po,isAsyncFn:Io,isThenable:No,setImmediate:wr,asap:ko,isIterable:Uo};let Y=class Sr extends Error{static from(t,n,o,s,a,i){const l=new Sr(t.message,n||t.code,o,s,a);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),i&&Object.assign(l,i),l}constructor(t,n,o,s,a){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),o&&(this.config=o),s&&(this.request=s),a&&(this.response=a,this.status=a.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:y.toJSONObject(this.config),code:this.code,status:this.status}}};Y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Y.ERR_BAD_OPTION="ERR_BAD_OPTION";Y.ECONNABORTED="ECONNABORTED";Y.ETIMEDOUT="ETIMEDOUT";Y.ERR_NETWORK="ERR_NETWORK";Y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Y.ERR_DEPRECATED="ERR_DEPRECATED";Y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Y.ERR_CANCELED="ERR_CANCELED";Y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Y.ERR_INVALID_URL="ERR_INVALID_URL";Y.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Mo=null;function on(e){return y.isPlainObject(e)||y.isArray(e)}function vr(e){return y.endsWith(e,"[]")?e.slice(0,-2):e}function qt(e,t,n){return e?e.concat(t).map(function(s,a){return s=vr(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function $o(e){return y.isArray(e)&&!e.some(on)}const Bo=y.toFlatObject(y,{},null,function(t){return/^is[A-Z]/.test(t)});function Mt(e,t,n){if(!y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,_){return!y.isUndefined(_[p])});const o=n.metaTokens,s=n.visitor||m,a=n.dots,i=n.indexes,l=n.Blob||typeof Blob<"u"&&Blob,h=n.maxDepth===void 0?100:n.maxDepth,d=l&&y.isSpecCompliantForm(t);if(!y.isFunction(s))throw new TypeError("visitor must be a function");function c(u){if(u===null)return"";if(y.isDate(u))return u.toISOString();if(y.isBoolean(u))return u.toString();if(!d&&y.isBlob(u))throw new Y("Blob is not supported. Use a Buffer instead.");return y.isArrayBuffer(u)||y.isTypedArray(u)?d&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function m(u,p,_){let R=u;if(y.isReactNative(t)&&y.isReactNativeBlob(u))return t.append(qt(_,p,a),c(u)),!1;if(u&&!_&&typeof u=="object"){if(y.endsWith(p,"{}"))p=o?p:p.slice(0,-2),u=JSON.stringify(u);else if(y.isArray(u)&&$o(u)||(y.isFileList(u)||y.endsWith(p,"[]"))&&(R=y.toArray(u)))return p=vr(p),R.forEach(function(P,S){!(y.isUndefined(P)||P===null)&&t.append(i===!0?qt([p],S,a):i===null?p:p+"[]",c(P))}),!1}return on(u)?!0:(t.append(qt(_,p,a),c(u)),!1)}const T=[],x=Object.assign(Bo,{defaultVisitor:m,convertValue:c,isVisitable:on});function f(u,p,_=0){if(!y.isUndefined(u)){if(_>h)throw new Y("Object is too deeply nested ("+_+" levels). Max depth: "+h,Y.ERR_FORM_DATA_DEPTH_EXCEEDED);if(T.indexOf(u)!==-1)throw Error("Circular reference detected in "+p.join("."));T.push(u),y.forEach(u,function(w,P){(!(y.isUndefined(w)||w===null)&&s.call(t,w,y.isString(P)?P.trim():P,p,x))===!0&&f(w,p?p.concat(P):[P],_+1)}),T.pop()}}if(!y.isObject(e))throw new TypeError("data must be an object");return f(e),t}function wn(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(o){return t[o]})}function dn(e,t){this._pairs=[],e&&Mt(e,this,t)}const _r=dn.prototype;_r.append=function(t,n){this._pairs.push([t,n])};_r.toString=function(t){const n=t?function(o){return t.call(this,o,wn)}:wn;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Fo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function jr(e,t,n){if(!t)return e;const o=n&&n.encode||Fo,s=y.isFunction(n)?{serialize:n}:n,a=s&&s.serialize;let i;if(a?i=a(t,s):i=y.isURLSearchParams(t)?t.toString():new dn(t,s).toString(o),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Sn{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){y.forEach(this.handlers,function(o){o!==null&&t(o)})}}const un={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Lo=typeof URLSearchParams<"u"?URLSearchParams:dn,qo=typeof FormData<"u"?FormData:null,Vo=typeof Blob<"u"?Blob:null,zo={isBrowser:!0,classes:{URLSearchParams:Lo,FormData:qo,Blob:Vo},protocols:["http","https","file","blob","url","data"]},pn=typeof window<"u"&&typeof document<"u",sn=typeof navigator=="object"&&navigator||void 0,Ho=pn&&(!sn||["ReactNative","NativeScript","NS"].indexOf(sn.product)<0),Wo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ko=pn&&window.location.href||"http://localhost",Yo=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pn,hasStandardBrowserEnv:Ho,hasStandardBrowserWebWorkerEnv:Wo,navigator:sn,origin:Ko},Symbol.toStringTag,{value:"Module"})),ve={...Yo,...zo};function Jo(e,t){return Mt(e,new ve.classes.URLSearchParams,{visitor:function(n,o,s,a){return ve.isNode&&y.isBuffer(n)?(this.append(o,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function Go(e){return y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Xo(e){const t={},n=Object.keys(e);let o;const s=n.length;let a;for(o=0;o<s;o++)a=n[o],t[a]=e[a];return t}function Tr(e){function t(n,o,s,a){let i=n[a++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),h=a>=n.length;return i=!i&&y.isArray(s)?s.length:i,h?(y.hasOwnProp(s,i)?s[i]=y.isArray(s[i])?s[i].concat(o):[s[i],o]:s[i]=o,!l):((!s[i]||!y.isObject(s[i]))&&(s[i]=[]),t(n,o,s[i],a)&&y.isArray(s[i])&&(s[i]=Xo(s[i])),!l)}if(y.isFormData(e)&&y.isFunction(e.entries)){const n={};return y.forEachEntry(e,(o,s)=>{t(Go(o),s,n,0)}),n}return null}const et=(e,t)=>e!=null&&y.hasOwnProp(e,t)?e[t]:void 0;function Qo(e,t,n){if(y.isString(e))try{return(t||JSON.parse)(e),y.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const bt={transitional:un,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",s=o.indexOf("application/json")>-1,a=y.isObject(t);if(a&&y.isHTMLForm(t)&&(t=new FormData(t)),y.isFormData(t))return s?JSON.stringify(Tr(t)):t;if(y.isArrayBuffer(t)||y.isBuffer(t)||y.isStream(t)||y.isFile(t)||y.isBlob(t)||y.isReadableStream(t))return t;if(y.isArrayBufferView(t))return t.buffer;if(y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const h=et(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return Jo(t,h).toString();if((l=y.isFileList(t))||o.indexOf("multipart/form-data")>-1){const d=et(this,"env"),c=d&&d.FormData;return Mt(l?{"files[]":t}:t,c&&new c,h)}}return a||s?(n.setContentType("application/json",!1),Qo(t)):t}],transformResponse:[function(t){const n=et(this,"transitional")||bt.transitional,o=n&&n.forcedJSONParsing,s=et(this,"responseType"),a=s==="json";if(y.isResponse(t)||y.isReadableStream(t))return t;if(t&&y.isString(t)&&(o&&!s||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,et(this,"parseReviver"))}catch(h){if(l)throw h.name==="SyntaxError"?Y.from(h,Y.ERR_BAD_RESPONSE,this,null,et(this,"response")):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ve.classes.FormData,Blob:ve.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch"],e=>{bt.headers[e]={}});const Zo=y.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"]),es=e=>{const t={};let n,o,s;return e&&e.split(`
2
+ `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),o=i.substring(s+1).trim(),!(!n||t[n]&&Zo[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},vn=Symbol("internals"),ts=/[^\x09\x20-\x7E\x80-\xFF]/g;function ns(e){let t=0,n=e.length;for(;t<n;){const o=e.charCodeAt(t);if(o!==9&&o!==32)break;t+=1}for(;n>t;){const o=e.charCodeAt(n-1);if(o!==9&&o!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function dt(e){return e&&String(e).trim().toLowerCase()}function rs(e){return ns(e.replace(ts,""))}function Ot(e){return e===!1||e==null?e:y.isArray(e)?e.map(Ot):rs(String(e))}function os(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}const ss=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Vt(e,t,n,o,s){if(y.isFunction(o))return o.call(this,t,n);if(s&&(t=n),!!y.isString(t)){if(y.isString(o))return t.indexOf(o)!==-1;if(y.isRegExp(o))return o.test(t)}}function as(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function is(e,t){const n=y.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(s,a,i){return this[o].call(this,t,s,a,i)},configurable:!0})})}let Ce=class{constructor(t){t&&this.set(t)}set(t,n,o){const s=this;function a(l,h,d){const c=dt(h);if(!c)throw new Error("header name must be a non-empty string");const m=y.findKey(s,c);(!m||s[m]===void 0||d===!0||d===void 0&&s[m]!==!1)&&(s[m||h]=Ot(l))}const i=(l,h)=>y.forEach(l,(d,c)=>a(d,c,h));if(y.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(y.isString(t)&&(t=t.trim())&&!ss(t))i(es(t),n);else if(y.isObject(t)&&y.isIterable(t)){let l={},h,d;for(const c of t){if(!y.isArray(c))throw TypeError("Object iterator must return a key-value pair");l[d=c[0]]=(h=l[d])?y.isArray(h)?[...h,c[1]]:[h,c[1]]:c[1]}i(l,n)}else t!=null&&a(n,t,o);return this}get(t,n){if(t=dt(t),t){const o=y.findKey(this,t);if(o){const s=this[o];if(!n)return s;if(n===!0)return os(s);if(y.isFunction(n))return n.call(this,s,o);if(y.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=dt(t),t){const o=y.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||Vt(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let s=!1;function a(i){if(i=dt(i),i){const l=y.findKey(o,i);l&&(!n||Vt(o,o[l],l,n))&&(delete o[l],s=!0)}}return y.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let o=n.length,s=!1;for(;o--;){const a=n[o];(!t||Vt(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,o={};return y.forEach(this,(s,a)=>{const i=y.findKey(o,a);if(i){n[i]=Ot(s),delete n[a];return}const l=t?as(a):String(a).trim();l!==a&&delete n[a],n[l]=Ot(s),o[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return y.forEach(this,(o,s)=>{o!=null&&o!==!1&&(n[s]=t&&y.isArray(o)?o.join(", "):o)}),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 o=new this(t);return n.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[vn]=this[vn]={accessors:{}}).accessors,s=this.prototype;function a(i){const l=dt(i);o[l]||(is(s,i),o[l]=!0)}return y.isArray(t)?t.forEach(a):a(t),this}};Ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);y.reduceDescriptors(Ce.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});y.freezeMethods(Ce);function zt(e,t){const n=this||bt,o=t||n,s=Ce.from(o.headers);let a=o.data;return y.forEach(e,function(l){a=l.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Er(e){return!!(e&&e.__CANCEL__)}let xt=class extends Y{constructor(t,n,o){super(t??"canceled",Y.ERR_CANCELED,n,o),this.name="CanceledError",this.__CANCEL__=!0}};function Cr(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ls(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cs(e,t){e=e||10;const n=new Array(e),o=new Array(e);let s=0,a=0,i;return t=t!==void 0?t:1e3,function(h){const d=Date.now(),c=o[a];i||(i=d),n[s]=h,o[s]=d;let m=a,T=0;for(;m!==s;)T+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),d-i<t)return;const x=c&&d-c;return x?Math.round(T*1e3/x):void 0}}function ds(e,t){let n=0,o=1e3/t,s,a;const i=(d,c=Date.now())=>{n=c,s=null,a&&(clearTimeout(a),a=null),e(...d)};return[(...d)=>{const c=Date.now(),m=c-n;m>=o?i(d,c):(s=d,a||(a=setTimeout(()=>{a=null,i(s)},o-m)))},()=>s&&i(s)]}const At=(e,t,n=3)=>{let o=0;const s=cs(50,250);return ds(a=>{const i=a.loaded,l=a.lengthComputable?a.total:void 0,h=l!=null?Math.min(i,l):i,d=Math.max(0,h-o),c=s(d);o=Math.max(o,h);const m={loaded:h,total:l,progress:l?h/l:void 0,bytes:d,rate:c||void 0,estimated:c&&l?(l-h)/c:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},_n=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},jn=e=>(...t)=>y.asap(()=>e(...t)),us=ve.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ve.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ve.origin),ve.navigator&&/(msie|trident)/i.test(ve.navigator.userAgent)):()=>!0,ps=ve.hasStandardBrowserEnv?{write(e,t,n,o,s,a,i){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];y.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),y.isString(o)&&l.push(`path=${o}`),y.isString(s)&&l.push(`domain=${s}`),a===!0&&l.push("secure"),y.isString(i)&&l.push(`SameSite=${i}`),document.cookie=l.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 fs(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function hs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Rr(e,t,n){let o=!fs(t);return e&&(o||n===!1)?hs(e,t):t}const Tn=e=>e instanceof Ce?{...e}:e;function We(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(d,c,m,T){return y.isPlainObject(d)&&y.isPlainObject(c)?y.merge.call({caseless:T},d,c):y.isPlainObject(c)?y.merge({},c):y.isArray(c)?c.slice():c}function s(d,c,m,T){if(y.isUndefined(c)){if(!y.isUndefined(d))return o(void 0,d,m,T)}else return o(d,c,m,T)}function a(d,c){if(!y.isUndefined(c))return o(void 0,c)}function i(d,c){if(y.isUndefined(c)){if(!y.isUndefined(d))return o(void 0,d)}else return o(void 0,c)}function l(d,c,m){if(y.hasOwnProp(t,m))return o(d,c);if(y.hasOwnProp(e,m))return o(void 0,d)}const h={url:a,method:a,data:a,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:l,headers:(d,c,m)=>s(Tn(d),Tn(c),m,!0)};return y.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const m=y.hasOwnProp(h,c)?h[c]:s,T=y.hasOwnProp(e,c)?e[c]:void 0,x=y.hasOwnProp(t,c)?t[c]:void 0,f=m(T,x,c);y.isUndefined(f)&&m!==l||(n[c]=f)}),n}const Or=e=>{const t=We({},e),n=T=>y.hasOwnProp(t,T)?t[T]:void 0,o=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),i=n("xsrfCookieName");let l=n("headers");const h=n("auth"),d=n("baseURL"),c=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=Ce.from(l),t.url=jr(Rr(d,m,c),e.params,e.paramsSerializer),h&&l.set("Authorization","Basic "+btoa((h.username||"")+":"+(h.password?unescape(encodeURIComponent(h.password)):""))),y.isFormData(o)){if(ve.hasStandardBrowserEnv||ve.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(y.isFunction(o.getHeaders)){const T=o.getHeaders(),x=["content-type","content-length"];Object.entries(T).forEach(([f,u])=>{x.includes(f.toLowerCase())&&l.set(f,u)})}}if(ve.hasStandardBrowserEnv&&(y.isFunction(s)&&(s=s(t)),s===!0||s==null&&us(t.url))){const x=a&&i&&ps.read(i);x&&l.set(a,x)}return t},ms=typeof XMLHttpRequest<"u",ys=ms&&function(e){return new Promise(function(n,o){const s=Or(e);let a=s.data;const i=Ce.from(s.headers).normalize();let{responseType:l,onUploadProgress:h,onDownloadProgress:d}=s,c,m,T,x,f;function u(){x&&x(),f&&f(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function _(){if(!p)return;const w=Ce.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),S={data:!l||l==="text"||l==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:w,config:e,request:p};Cr(function(oe){n(oe),u()},function(oe){o(oe),u()},S),p=null}"onloadend"in p?p.onloadend=_:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(_)},p.onabort=function(){p&&(o(new Y("Request aborted",Y.ECONNABORTED,e,p)),p=null)},p.onerror=function(P){const S=P&&P.message?P.message:"Network Error",ne=new Y(S,Y.ERR_NETWORK,e,p);ne.event=P||null,o(ne),p=null},p.ontimeout=function(){let P=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const S=s.transitional||un;s.timeoutErrorMessage&&(P=s.timeoutErrorMessage),o(new Y(P,S.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,p)),p=null},a===void 0&&i.setContentType(null),"setRequestHeader"in p&&y.forEach(i.toJSON(),function(P,S){p.setRequestHeader(S,P)}),y.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),l&&l!=="json"&&(p.responseType=s.responseType),d&&([T,f]=At(d,!0),p.addEventListener("progress",T)),h&&p.upload&&([m,x]=At(h),p.upload.addEventListener("progress",m),p.upload.addEventListener("loadend",x)),(s.cancelToken||s.signal)&&(c=w=>{p&&(o(!w||w.type?new xt(null,e,p):w),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const R=ls(s.url);if(R&&ve.protocols.indexOf(R)===-1){o(new Y("Unsupported protocol "+R+":",Y.ERR_BAD_REQUEST,e));return}p.send(a||null)})},gs=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,s;const a=function(d){if(!s){s=!0,l();const c=d instanceof Error?d:this.reason;o.abort(c instanceof Y?c:new xt(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,a(new Y(`timeout of ${t}ms exceeded`,Y.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(a):d.removeEventListener("abort",a)}),e=null)};e.forEach(d=>d.addEventListener("abort",a));const{signal:h}=o;return h.unsubscribe=()=>y.asap(l),h}},bs=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,s;for(;o<n;)s=o+t,yield e.slice(o,s),o=s},xs=async function*(e,t){for await(const n of ws(e))yield*bs(n,t)},ws=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},En=(e,t,n,o)=>{const s=xs(e,t);let a=0,i,l=h=>{i||(i=!0,o&&o(h))};return new ReadableStream({async pull(h){try{const{done:d,value:c}=await s.next();if(d){l(),h.close();return}let m=c.byteLength;if(n){let T=a+=m;n(T)}h.enqueue(new Uint8Array(c))}catch(d){throw l(d),d}},cancel(h){return l(h),s.return()}},{highWaterMark:2})},Cn=64*1024,{isFunction:vt}=y,Ss=(({Request:e,Response:t})=>({Request:e,Response:t}))(y.global),{ReadableStream:Rn,TextEncoder:On}=y.global,Dn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vs=e=>{e=y.merge.call({skipUndefined:!0},Ss,e);const{fetch:t,Request:n,Response:o}=e,s=t?vt(t):typeof fetch=="function",a=vt(n),i=vt(o);if(!s)return!1;const l=s&&vt(Rn),h=s&&(typeof On=="function"?(f=>u=>f.encode(u))(new On):async f=>new Uint8Array(await new n(f).arrayBuffer())),d=a&&l&&Dn(()=>{let f=!1;const u=new n(ve.origin,{body:new Rn,method:"POST",get duplex(){return f=!0,"half"}}),p=u.headers.has("Content-Type");return u.body!=null&&u.body.cancel(),f&&!p}),c=i&&l&&Dn(()=>y.isReadableStream(new o("").body)),m={stream:c&&(f=>f.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!m[f]&&(m[f]=(u,p)=>{let _=u&&u[f];if(_)return _.call(u);throw new Y(`Response type '${f}' is not supported`,Y.ERR_NOT_SUPPORT,p)})});const T=async f=>{if(f==null)return 0;if(y.isBlob(f))return f.size;if(y.isSpecCompliantForm(f))return(await new n(ve.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(y.isArrayBufferView(f)||y.isArrayBuffer(f))return f.byteLength;if(y.isURLSearchParams(f)&&(f=f+""),y.isString(f))return(await h(f)).byteLength},x=async(f,u)=>{const p=y.toFiniteNumber(f.getContentLength());return p??T(u)};return async f=>{let{url:u,method:p,data:_,signal:R,cancelToken:w,timeout:P,onDownloadProgress:S,onUploadProgress:ne,responseType:oe,headers:C,withCredentials:O="same-origin",fetchOptions:k}=Or(f),D=t||fetch;oe=oe?(oe+"").toLowerCase():"text";let N=gs([R,w&&w.toAbortSignal()],P),J=null;const L=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let ae;try{if(ne&&d&&p!=="get"&&p!=="head"&&(ae=await x(C,_))!==0){let b=new n(u,{method:"POST",body:_,duplex:"half"}),E;if(y.isFormData(_)&&(E=b.headers.get("content-type"))&&C.setContentType(E),b.body){const[A,M]=_n(ae,At(jn(ne)));_=En(b.body,Cn,A,M)}}y.isString(O)||(O=O?"include":"omit");const V=a&&"credentials"in n.prototype;if(y.isFormData(_)){const b=C.getContentType();b&&/^multipart\/form-data/i.test(b)&&!/boundary=/i.test(b)&&C.delete("content-type")}const ie={...k,signal:N,method:p.toUpperCase(),headers:C.normalize().toJSON(),body:_,duplex:"half",credentials:V?O:void 0};J=a&&new n(u,ie);let re=await(a?D(J,k):D(u,ie));const B=c&&(oe==="stream"||oe==="response");if(c&&(S||B&&L)){const b={};["status","statusText","headers"].forEach(G=>{b[G]=re[G]});const E=y.toFiniteNumber(re.headers.get("content-length")),[A,M]=S&&_n(E,At(jn(S),!0))||[];re=new o(En(re.body,Cn,A,()=>{M&&M(),L&&L()}),b)}oe=oe||"text";let g=await m[y.findKey(m,oe)||"text"](re,f);return!B&&L&&L(),await new Promise((b,E)=>{Cr(b,E,{data:g,headers:Ce.from(re.headers),status:re.status,statusText:re.statusText,config:f,request:J})})}catch(V){throw L&&L(),V&&V.name==="TypeError"&&/Load failed|fetch/i.test(V.message)?Object.assign(new Y("Network Error",Y.ERR_NETWORK,f,J,V&&V.response),{cause:V.cause||V}):Y.from(V,V&&V.code,f,J,V&&V.response)}}},_s=new Map,Dr=e=>{let t=e&&e.env||{};const{fetch:n,Request:o,Response:s}=t,a=[o,s,n];let i=a.length,l=i,h,d,c=_s;for(;l--;)h=a[l],d=c.get(h),d===void 0&&c.set(h,d=l?new Map:vs(t)),c=d;return d};Dr();const fn={http:Mo,xhr:ys,fetch:{get:Dr}};y.forEach(fn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const An=e=>`- ${e}`,js=e=>y.isFunction(e)||e===null||e===!1;function Ts(e,t){e=y.isArray(e)?e:[e];const{length:n}=e;let o,s;const a={};for(let i=0;i<n;i++){o=e[i];let l;if(s=o,!js(o)&&(s=fn[(l=String(o)).toLowerCase()],s===void 0))throw new Y(`Unknown adapter '${l}'`);if(s&&(y.isFunction(s)||(s=s.get(t))))break;a[l||"#"+i]=s}if(!s){const i=Object.entries(a).map(([h,d])=>`adapter ${h} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=n?i.length>1?`since :
4
+ `+i.map(An).join(`
5
+ `):" "+An(i[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return s}const Ar={getAdapter:Ts,adapters:fn};function Ht(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xt(null,e)}function Pn(e){return Ht(e),e.headers=Ce.from(e.headers),e.data=zt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ar.getAdapter(e.adapter||bt.adapter,e)(e).then(function(o){return Ht(e),o.data=zt.call(e,e.transformResponse,o),o.headers=Ce.from(o.headers),o},function(o){return Er(o)||(Ht(e),o&&o.response&&(o.response.data=zt.call(e,e.transformResponse,o.response),o.response.headers=Ce.from(o.response.headers))),Promise.reject(o)})}const Pr="1.15.2",$t={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$t[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const In={};$t.transitional=function(t,n,o){function s(a,i){return"[Axios v"+Pr+"] Transitional option '"+a+"'"+i+(o?". "+o:"")}return(a,i,l)=>{if(t===!1)throw new Y(s(i," has been removed"+(n?" in "+n:"")),Y.ERR_DEPRECATED);return n&&!In[i]&&(In[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,l):!0}};$t.spelling=function(t){return(n,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function Es(e,t,n){if(typeof e!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let s=o.length;for(;s-- >0;){const a=o[s],i=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(i){const l=e[a],h=l===void 0||i(l,a,e);if(h!==!0)throw new Y("option "+a+" must be "+h,Y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Y("Unknown option "+a,Y.ERR_BAD_OPTION)}}const Dt={assertOptions:Es,validators:$t},Pe=Dt.validators;let He=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Sn,response:new Sn}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const i=s.stack.indexOf(`
6
+ `);return i===-1?"":s.stack.slice(i+1)})();try{if(!o.stack)o.stack=a;else if(a){const i=a.indexOf(`
7
+ `),l=i===-1?-1:a.indexOf(`
8
+ `,i+1),h=l===-1?"":a.slice(l+1);String(o.stack).endsWith(h)||(o.stack+=`
9
+ `+a)}}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=We(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:a}=n;o!==void 0&&Dt.assertOptions(o,{silentJSONParsing:Pe.transitional(Pe.boolean),forcedJSONParsing:Pe.transitional(Pe.boolean),clarifyTimeoutError:Pe.transitional(Pe.boolean),legacyInterceptorReqResOrdering:Pe.transitional(Pe.boolean)},!1),s!=null&&(y.isFunction(s)?n.paramsSerializer={serialize:s}:Dt.assertOptions(s,{encode:Pe.function,serialize:Pe.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Dt.assertOptions(n,{baseUrl:Pe.spelling("baseURL"),withXsrfToken:Pe.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&y.merge(a.common,a[n.method]);a&&y.forEach(["delete","get","head","post","put","patch","common"],f=>{delete a[f]}),n.headers=Ce.concat(i,a);const l=[];let h=!0;this.interceptors.request.forEach(function(u){if(typeof u.runWhen=="function"&&u.runWhen(n)===!1)return;h=h&&u.synchronous;const p=n.transitional||un;p&&p.legacyInterceptorReqResOrdering?l.unshift(u.fulfilled,u.rejected):l.push(u.fulfilled,u.rejected)});const d=[];this.interceptors.response.forEach(function(u){d.push(u.fulfilled,u.rejected)});let c,m=0,T;if(!h){const f=[Pn.bind(this),void 0];for(f.unshift(...l),f.push(...d),T=f.length,c=Promise.resolve(n);m<T;)c=c.then(f[m++],f[m++]);return c}T=l.length;let x=n;for(;m<T;){const f=l[m++],u=l[m++];try{x=f(x)}catch(p){u.call(this,p);break}}try{c=Pn.call(this,x)}catch(f){return Promise.reject(f)}for(m=0,T=d.length;m<T;)c=c.then(d[m++],d[m++]);return c}getUri(t){t=We(this.defaults,t);const n=Rr(t.baseURL,t.url,t.allowAbsoluteUrls);return jr(n,t.params,t.paramsSerializer)}};y.forEach(["delete","get","head","options"],function(t){He.prototype[t]=function(n,o){return this.request(We(o||{},{method:t,url:n,data:(o||{}).data}))}});y.forEach(["post","put","patch"],function(t){function n(o){return function(a,i,l){return this.request(We(l||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}He.prototype[t]=n(),He.prototype[t+"Form"]=n(!0)});let Cs=class Ir{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const o=this;this.promise.then(s=>{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](s);o._listeners=null}),this.promise.then=s=>{let a;const i=new Promise(l=>{o.subscribe(l),a=l}).then(s);return i.cancel=function(){o.unsubscribe(a)},i},t(function(a,i,l){o.reason||(o.reason=new xt(a,i,l),n(o.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=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Ir(function(s){t=s}),cancel:t}}};function Rs(e){return function(n){return e.apply(null,n)}}function Os(e){return y.isObject(e)&&e.isAxiosError===!0}const an={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(an).forEach(([e,t])=>{an[t]=e});function Nr(e){const t=new He(e),n=fr(He.prototype.request,t);return y.extend(n,He.prototype,t,{allOwnKeys:!0}),y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Nr(We(e,s))},n}const me=Nr(bt);me.Axios=He;me.CanceledError=xt;me.CancelToken=Cs;me.isCancel=Er;me.VERSION=Pr;me.toFormData=Mt;me.AxiosError=Y;me.Cancel=me.CanceledError;me.all=function(t){return Promise.all(t)};me.spread=Rs;me.isAxiosError=Os;me.mergeConfig=We;me.AxiosHeaders=Ce;me.formToJSON=e=>Tr(y.isHTMLForm(e)?new FormData(e):e);me.getAdapter=Ar.getAdapter;me.HttpStatusCode=an;me.default=me;const{Axios:Fa,AxiosError:La,CanceledError:qa,isCancel:Va,CancelToken:za,VERSION:Ha,all:Wa,Cancel:Ka,isAxiosError:Ya,spread:Ja,toFormData:Ga,AxiosHeaders:Xa,HttpStatusCode:Qa,formToJSON:Za,getAdapter:ei,mergeConfig:ti}=me,Ds=()=>new Promise(e=>setTimeout(()=>e(),800));let ln=null;const As=e=>{ln=e,Ke.defaults.baseURL=hn()},hn=()=>ln||"https://npmapi.ubkerp.com/",Ke=me.create({baseURL:hn()}),cn=()=>hn(),Ye=async(e,t,n)=>{const o=await Ke.post(e,t,{headers:{Authorization:n}});if(console.log("ddddfdfdfd",o.data?.Status),o.data?.Status=="Success")return o?.data?.data||o?.data;throw new Error(o.data?.msg)},pe=async(e,t)=>{try{let o=e;if(!e.includes("session_id")){const a=e.includes("?")?"&":"?";o=`${e}${a}session_id=1`}return(await Ke.get(o,{headers:{Authorization:t}})).data}catch(n){throw n.response?.status===401&&console.error("401 Unauthorized"),n}},Ps=async(e,t)=>{const n=await Ke.post(e,"",{headers:{Authorization:t}});if(n.data?.Status=="Success")return n?.data?.data||n?.data;throw new Error(n.data?.msg)},Wt=async(e,t)=>{const n=localStorage.getItem("authToken"),o=t?.arg;return(await Ke.post(e,o,{headers:{Authorization:n}}))?.data},wt=async(e,t,n)=>(await Ds(),(await Ke.post(e,t,{headers:{Authorization:n}}))?.data),Je=async(e,t,n)=>(await Ke.delete(`${e}/${t}`,{headers:{Authorization:n}})).data,Is=({token:e,menu:t})=>{const{isLoading:n,data:o}=ce(e?["api/sdk/Menus",e]:null,([a,i])=>Ps(a,i)),s=o?.find(a=>a.path===t)?.sub_menu??[];return console.log("menuData",o),r.jsx(j.Row,{gutter:[16,16],children:s?.map((a,i)=>a.dashboard_show==="YES"?r.jsx(j.Col,{xs:24,md:8,lg:8,children:r.jsx(X,{children:r.jsx(pr,{icon:`${cn()}icons/frontoffice/${a.icons}`,title:a.submenu_name,path:a.menu_key})})},`${i}office001`):null)})};function kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xe={},Kt,Nn;function Ns(){return Nn||(Nn=1,Kt=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 o,s,a;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(s=o;s--!==0;)if(!e(t[s],n[s]))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(a=Object.keys(t),o=a.length,o!==Object.keys(n).length)return!1;for(s=o;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[s]))return!1;for(s=o;s--!==0;){var i=a[s];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),Kt}var _t={exports:{}},jt={exports:{}},de={};var kn;function ks(){if(kn)return de;kn=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,T=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function w(S){if(typeof S=="object"&&S!==null){var ne=S.$$typeof;switch(ne){case t:switch(S=S.type,S){case h:case d:case o:case a:case s:case m:return S;default:switch(S=S&&S.$$typeof,S){case l:case c:case f:case x:case i:return S;default:return ne}}case n:return ne}}}function P(S){return w(S)===d}return de.AsyncMode=h,de.ConcurrentMode=d,de.ContextConsumer=l,de.ContextProvider=i,de.Element=t,de.ForwardRef=c,de.Fragment=o,de.Lazy=f,de.Memo=x,de.Portal=n,de.Profiler=a,de.StrictMode=s,de.Suspense=m,de.isAsyncMode=function(S){return P(S)||w(S)===h},de.isConcurrentMode=P,de.isContextConsumer=function(S){return w(S)===l},de.isContextProvider=function(S){return w(S)===i},de.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},de.isForwardRef=function(S){return w(S)===c},de.isFragment=function(S){return w(S)===o},de.isLazy=function(S){return w(S)===f},de.isMemo=function(S){return w(S)===x},de.isPortal=function(S){return w(S)===n},de.isProfiler=function(S){return w(S)===a},de.isStrictMode=function(S){return w(S)===s},de.isSuspense=function(S){return w(S)===m},de.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===o||S===d||S===a||S===s||S===m||S===T||typeof S=="object"&&S!==null&&(S.$$typeof===f||S.$$typeof===x||S.$$typeof===i||S.$$typeof===l||S.$$typeof===c||S.$$typeof===p||S.$$typeof===_||S.$$typeof===R||S.$$typeof===u)},de.typeOf=w,de}var ue={};var Un;function Us(){return Un||(Un=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,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,T=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function w(U){return typeof U=="string"||typeof U=="function"||U===o||U===d||U===a||U===s||U===m||U===T||typeof U=="object"&&U!==null&&(U.$$typeof===f||U.$$typeof===x||U.$$typeof===i||U.$$typeof===l||U.$$typeof===c||U.$$typeof===p||U.$$typeof===_||U.$$typeof===R||U.$$typeof===u)}function P(U){if(typeof U=="object"&&U!==null){var ge=U.$$typeof;switch(ge){case t:var je=U.type;switch(je){case h:case d:case o:case a:case s:case m:return je;default:var Le=je&&je.$$typeof;switch(Le){case l:case c:case f:case x:case i:return Le;default:return ge}}case n:return ge}}}var S=h,ne=d,oe=l,C=i,O=t,k=c,D=o,N=f,J=x,L=n,ae=a,V=s,ie=m,re=!1;function B(U){return re||(re=!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.")),g(U)||P(U)===h}function g(U){return P(U)===d}function b(U){return P(U)===l}function E(U){return P(U)===i}function A(U){return typeof U=="object"&&U!==null&&U.$$typeof===t}function M(U){return P(U)===c}function G(U){return P(U)===o}function W(U){return P(U)===f}function Q(U){return P(U)===x}function F(U){return P(U)===n}function z(U){return P(U)===a}function Z(U){return P(U)===s}function he(U){return P(U)===m}ue.AsyncMode=S,ue.ConcurrentMode=ne,ue.ContextConsumer=oe,ue.ContextProvider=C,ue.Element=O,ue.ForwardRef=k,ue.Fragment=D,ue.Lazy=N,ue.Memo=J,ue.Portal=L,ue.Profiler=ae,ue.StrictMode=V,ue.Suspense=ie,ue.isAsyncMode=B,ue.isConcurrentMode=g,ue.isContextConsumer=b,ue.isContextProvider=E,ue.isElement=A,ue.isForwardRef=M,ue.isFragment=G,ue.isLazy=W,ue.isMemo=Q,ue.isPortal=F,ue.isProfiler=z,ue.isStrictMode=Z,ue.isSuspense=he,ue.isValidElementType=w,ue.typeOf=P})()),ue}var Mn;function Ur(){return Mn||(Mn=1,process.env.NODE_ENV==="production"?jt.exports=ks():jt.exports=Us()),jt.exports}var Yt,$n;function Ms(){if($n)return Yt;$n=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function s(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},l=0;l<10;l++)i["_"+String.fromCharCode(l)]=l;var h=Object.getOwnPropertyNames(i).map(function(c){return i[c]});if(h.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(c){d[c]=c}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Yt=s()?Object.assign:function(a,i){for(var l,h=o(a),d,c=1;c<arguments.length;c++){l=Object(arguments[c]);for(var m in l)t.call(l,m)&&(h[m]=l[m]);if(e){d=e(l);for(var T=0;T<d.length;T++)n.call(l,d[T])&&(h[d[T]]=l[d[T]])}}return h},Yt}var Jt,Bn;function mn(){if(Bn)return Jt;Bn=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Jt=e,Jt}var Gt,Fn;function Mr(){return Fn||(Fn=1,Gt=Function.call.bind(Object.prototype.hasOwnProperty)),Gt}var Xt,Ln;function $s(){if(Ln)return Xt;Ln=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=mn(),n={},o=Mr();e=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(a,i,l,h,d){if(process.env.NODE_ENV!=="production"){for(var c in a)if(o(a,c)){var m;try{if(typeof a[c]!="function"){var T=Error((h||"React class")+": "+l+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}m=a[c](i,c,h,l,null,t)}catch(f){m=f}if(m&&!(m instanceof Error)&&e((h||"React class")+": type specification of "+l+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in n)){n[m.message]=!0;var x=d?d():"";e("Failed "+l+" type: "+m.message+(x??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Xt=s,Xt}var Qt,qn;function Bs(){if(qn)return Qt;qn=1;var e=Ur(),t=Ms(),n=mn(),o=Mr(),s=$s(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(l){var h="Warning: "+l;typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}});function i(){return null}return Qt=function(l,h){var d=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function m(g){var b=g&&(d&&g[d]||g[c]);if(typeof b=="function")return b}var T="<<anonymous>>",x={array:_("array"),bigint:_("bigint"),bool:_("boolean"),func:_("function"),number:_("number"),object:_("object"),string:_("string"),symbol:_("symbol"),any:R(),arrayOf:w,element:P(),elementType:S(),instanceOf:ne,node:k(),objectOf:C,oneOf:oe,oneOfType:O,shape:N,exact:J};function f(g,b){return g===b?g!==0||1/g===1/b:g!==g&&b!==b}function u(g,b){this.message=g,this.data=b&&typeof b=="object"?b:{},this.stack=""}u.prototype=Error.prototype;function p(g){if(process.env.NODE_ENV!=="production")var b={},E=0;function A(G,W,Q,F,z,Z,he){if(F=F||T,Z=Z||Q,he!==n){if(h){var U=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 U.name="Invariant Violation",U}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ge=F+":"+Q;!b[ge]&&E<3&&(a("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+F+"`. 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."),b[ge]=!0,E++)}}return W[Q]==null?G?W[Q]===null?new u("The "+z+" `"+Z+"` is marked as required "+("in `"+F+"`, but its value is `null`.")):new u("The "+z+" `"+Z+"` is marked as required in "+("`"+F+"`, but its value is `undefined`.")):null:g(W,Q,F,z,Z)}var M=A.bind(null,!1);return M.isRequired=A.bind(null,!0),M}function _(g){function b(E,A,M,G,W,Q){var F=E[A],z=V(F);if(z!==g){var Z=ie(F);return new u("Invalid "+G+" `"+W+"` of type "+("`"+Z+"` supplied to `"+M+"`, expected ")+("`"+g+"`."),{expectedType:g})}return null}return p(b)}function R(){return p(i)}function w(g){function b(E,A,M,G,W){if(typeof g!="function")return new u("Property `"+W+"` of component `"+M+"` has invalid PropType notation inside arrayOf.");var Q=E[A];if(!Array.isArray(Q)){var F=V(Q);return new u("Invalid "+G+" `"+W+"` of type "+("`"+F+"` supplied to `"+M+"`, expected an array."))}for(var z=0;z<Q.length;z++){var Z=g(Q,z,M,G,W+"["+z+"]",n);if(Z instanceof Error)return Z}return null}return p(b)}function P(){function g(b,E,A,M,G){var W=b[E];if(!l(W)){var Q=V(W);return new u("Invalid "+M+" `"+G+"` of type "+("`"+Q+"` supplied to `"+A+"`, expected a single ReactElement."))}return null}return p(g)}function S(){function g(b,E,A,M,G){var W=b[E];if(!e.isValidElementType(W)){var Q=V(W);return new u("Invalid "+M+" `"+G+"` of type "+("`"+Q+"` supplied to `"+A+"`, expected a single ReactElement type."))}return null}return p(g)}function ne(g){function b(E,A,M,G,W){if(!(E[A]instanceof g)){var Q=g.name||T,F=B(E[A]);return new u("Invalid "+G+" `"+W+"` of type "+("`"+F+"` supplied to `"+M+"`, expected ")+("instance of `"+Q+"`."))}return null}return p(b)}function oe(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("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])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function b(E,A,M,G,W){for(var Q=E[A],F=0;F<g.length;F++)if(f(Q,g[F]))return null;var z=JSON.stringify(g,function(he,U){var ge=ie(U);return ge==="symbol"?String(U):U});return new u("Invalid "+G+" `"+W+"` of value `"+String(Q)+"` "+("supplied to `"+M+"`, expected one of "+z+"."))}return p(b)}function C(g){function b(E,A,M,G,W){if(typeof g!="function")return new u("Property `"+W+"` of component `"+M+"` has invalid PropType notation inside objectOf.");var Q=E[A],F=V(Q);if(F!=="object")return new u("Invalid "+G+" `"+W+"` of type "+("`"+F+"` supplied to `"+M+"`, expected an object."));for(var z in Q)if(o(Q,z)){var Z=g(Q,z,M,G,W+"."+z,n);if(Z instanceof Error)return Z}return null}return p(b)}function O(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var b=0;b<g.length;b++){var E=g[b];if(typeof E!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+re(E)+" at index "+b+"."),i}function A(M,G,W,Q,F){for(var z=[],Z=0;Z<g.length;Z++){var he=g[Z],U=he(M,G,W,Q,F,n);if(U==null)return null;U.data&&o(U.data,"expectedType")&&z.push(U.data.expectedType)}var ge=z.length>0?", expected one of type ["+z.join(", ")+"]":"";return new u("Invalid "+Q+" `"+F+"` supplied to "+("`"+W+"`"+ge+"."))}return p(A)}function k(){function g(b,E,A,M,G){return L(b[E])?null:new u("Invalid "+M+" `"+G+"` supplied to "+("`"+A+"`, expected a ReactNode."))}return p(g)}function D(g,b,E,A,M){return new u((g||"React class")+": "+b+" type `"+E+"."+A+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+M+"`.")}function N(g){function b(E,A,M,G,W){var Q=E[A],F=V(Q);if(F!=="object")return new u("Invalid "+G+" `"+W+"` of type `"+F+"` "+("supplied to `"+M+"`, expected `object`."));for(var z in g){var Z=g[z];if(typeof Z!="function")return D(M,G,W,z,ie(Z));var he=Z(Q,z,M,G,W+"."+z,n);if(he)return he}return null}return p(b)}function J(g){function b(E,A,M,G,W){var Q=E[A],F=V(Q);if(F!=="object")return new u("Invalid "+G+" `"+W+"` of type `"+F+"` "+("supplied to `"+M+"`, expected `object`."));var z=t({},E[A],g);for(var Z in z){var he=g[Z];if(o(g,Z)&&typeof he!="function")return D(M,G,W,Z,ie(he));if(!he)return new u("Invalid "+G+" `"+W+"` key `"+Z+"` supplied to `"+M+"`.\nBad object: "+JSON.stringify(E[A],null," ")+`
10
+ Valid keys: `+JSON.stringify(Object.keys(g),null," "));var U=he(Q,Z,M,G,W+"."+Z,n);if(U)return U}return null}return p(b)}function L(g){switch(typeof g){case"number":case"string":case"undefined":return!0;case"boolean":return!g;case"object":if(Array.isArray(g))return g.every(L);if(g===null||l(g))return!0;var b=m(g);if(b){var E=b.call(g),A;if(b!==g.entries){for(;!(A=E.next()).done;)if(!L(A.value))return!1}else for(;!(A=E.next()).done;){var M=A.value;if(M&&!L(M[1]))return!1}}else return!1;return!0;default:return!1}}function ae(g,b){return g==="symbol"?!0:b?b["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&b instanceof Symbol:!1}function V(g){var b=typeof g;return Array.isArray(g)?"array":g instanceof RegExp?"object":ae(b,g)?"symbol":b}function ie(g){if(typeof g>"u"||g===null)return""+g;var b=V(g);if(b==="object"){if(g instanceof Date)return"date";if(g instanceof RegExp)return"regexp"}return b}function re(g){var b=ie(g);switch(b){case"array":case"object":return"an "+b;case"boolean":case"date":case"regexp":return"a "+b;default:return b}}function B(g){return!g.constructor||!g.constructor.name?T:g.constructor.name}return x.checkPropTypes=s,x.resetWarningCache=s.resetWarningCache,x.PropTypes=x,x},Qt}var Zt,Vn;function Fs(){if(Vn)return Zt;Vn=1;var e=mn();function t(){}function n(){}return n.resetWarningCache=t,Zt=function(){function o(i,l,h,d,c,m){if(m!==e){var T=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 T.name="Invariant Violation",T}}o.isRequired=o;function s(){return o}var a={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:s,element:o,elementType:o,instanceOf:s,node:o,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Zt}var zn;function $r(){if(zn)return _t.exports;if(zn=1,process.env.NODE_ENV!=="production"){var e=Ur(),t=!0;_t.exports=Bs()(e.isElement,t)}else _t.exports=Fs()();return _t.exports}var Hn;function Ls(){if(Hn)return xe;Hn=1;var e=xe&&xe.__extends||(function(){var x=function(f,u){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,_){p.__proto__=_}||function(p,_){for(var R in _)Object.prototype.hasOwnProperty.call(_,R)&&(p[R]=_[R])},x(f,u)};return function(f,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");x(f,u);function p(){this.constructor=f}f.prototype=u===null?Object.create(u):(p.prototype=u.prototype,new p)}})(),t=xe&&xe.__assign||function(){return t=Object.assign||function(x){for(var f,u=1,p=arguments.length;u<p;u++){f=arguments[u];for(var _ in f)Object.prototype.hasOwnProperty.call(f,_)&&(x[_]=f[_])}return x},t.apply(this,arguments)},n=xe&&xe.__createBinding||(Object.create?(function(x,f,u,p){p===void 0&&(p=u);var _=Object.getOwnPropertyDescriptor(f,u);(!_||("get"in _?!f.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return f[u]}}),Object.defineProperty(x,p,_)}):(function(x,f,u,p){p===void 0&&(p=u),x[p]=f[u]})),o=xe&&xe.__setModuleDefault||(Object.create?(function(x,f){Object.defineProperty(x,"default",{enumerable:!0,value:f})}):function(x,f){x.default=f}),s=xe&&xe.__importStar||function(x){if(x&&x.__esModule)return x;var f={};if(x!=null)for(var u in x)u!=="default"&&Object.prototype.hasOwnProperty.call(x,u)&&n(f,x,u);return o(f,x),f},a=xe&&xe.__rest||function(x,f){var u={};for(var p in x)Object.prototype.hasOwnProperty.call(x,p)&&f.indexOf(p)<0&&(u[p]=x[p]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _=0,p=Object.getOwnPropertySymbols(x);_<p.length;_++)f.indexOf(p[_])<0&&Object.prototype.propertyIsEnumerable.call(x,p[_])&&(u[p[_]]=x[p[_]]);return u},i=xe&&xe.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(xe,"__esModule",{value:!0});var l=s(v),h=i(Ns()),d=s($r());function c(x){return x&&x.replace(/&nbsp;|\u202F|\u00A0/g," ").replace(/<br \/>/g,"<br>")}function m(x){var f=document.createTextNode("");x.appendChild(f);var u=document.activeElement===x;if(f!==null&&f.nodeValue!==null&&u){var p=window.getSelection();if(p!==null){var _=document.createRange();_.setStart(f,f.nodeValue.length),_.collapse(!0),p.removeAllRanges(),p.addRange(_)}x instanceof HTMLElement&&x.focus()}}var T=(function(x){e(f,x);function f(){var u=x!==null&&x.apply(this,arguments)||this;return u.lastHtml=u.props.html,u.el=typeof u.props.innerRef=="function"?{current:null}:l.createRef(),u.getEl=function(){return(u.props.innerRef&&typeof u.props.innerRef!="function"?u.props.innerRef:u.el).current},u.emitChange=function(p){var _=u.getEl();if(_){var R=_.innerHTML;if(u.props.onChange&&R!==u.lastHtml){var w=Object.assign({},p,{target:{value:R}});u.props.onChange(w)}u.lastHtml=R}},u}return f.prototype.render=function(){var u=this,p=this.props,_=p.tagName,R=p.html,w=p.innerRef,P=a(p,["tagName","html","innerRef"]);return l.createElement(_||"div",t(t({},P),{ref:typeof w=="function"?function(S){w(S),u.el.current=S}:w||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:R}}),this.props.children)},f.prototype.shouldComponentUpdate=function(u){var p=this.props,_=this.getEl();return!_||c(u.html)!==c(_.innerHTML)?!0:p.disabled!==u.disabled||p.tagName!==u.tagName||p.className!==u.className||p.innerRef!==u.innerRef||p.placeholder!==u.placeholder||!(0,h.default)(p.style,u.style)},f.prototype.componentDidUpdate=function(){var u=this.getEl();u&&(this.props.html!==u.innerHTML&&(u.innerHTML=this.props.html),this.lastHtml=this.props.html,m(u))},f.propTypes={html:d.string.isRequired,onChange:d.func,disabled:d.bool,tagName:d.string,className:d.string,style:d.object,innerRef:d.oneOfType([d.object,d.func])},f})(l.Component);return xe.default=T,xe}var qs=Ls();const Vs=kr(qs),zs={display:"block",marginBottom:6,fontSize:"14px",fontWeight:500,color:"#222"},Hs={width:"100%",minHeight:40,padding:"8px 0",fontSize:"14px",color:"#222",background:"transparent",border:0,borderTop:0,borderLeft:0,borderRight:0,borderBottom:"1px solid #d9d9d9",borderRadius:0,boxShadow:"none",outline:"none",transition:"border-color 0.2s ease"},le=v.forwardRef(({style:e,onFocus:t,onBlur:n,...o},s)=>{const[a,i]=v.useState(!1);return r.jsxs("div",{className:"",style:{width:"100%"},children:[o.label&&r.jsx("label",{className:"labelfont",style:zs,children:o.label}),r.jsx("input",{placeholder:o.placeholder||o.label,...o,ref:s,onFocus:l=>{i(!0),t?.(l)},onBlur:l=>{i(!1),n?.(l)},style:{...Hs,borderBottom:`1px solid ${a?"#222":"#d9d9d9"}`,...e||{}}})]})});function Ws(){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 Ks=e=>{const t=JSON.parse(localStorage.getItem("genrall_settings"));return console.log("amount______",e),r.jsxs(r.Fragment,{children:[t?.currency_icon," ",Number(e||0).toLocaleString("en-IN")]})};var ut={},pt={},De={},ft={},tt={},Wn;function Ys(){if(Wn)return tt;Wn=1;var e=tt&&tt.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(tt,"__esModule",{value:!0});const t=e(v),n=Wr,o=["string","number","boolean"];function s({header:a,body:i}){const l=t.default.createElement("tr",null,a.map(d=>t.default.createElement("th",{key:d},d))),h=i.map((d,c)=>Array.isArray(d)?t.default.createElement("tr",{key:c},d.map((m,T)=>t.default.createElement("th",{key:T}," ",m," "))):d!==null&&typeof d=="object"?t.default.createElement("tr",{key:c},Object.entries(d).map(([m,T],x)=>typeof T=="object"?(console.error(`typeof ${m} is incorrect, only accept ${o.join(", ")} `),t.default.createElement("th",{key:x})):t.default.createElement("th",{key:x},t.default.createElement(t.default.Fragment,null,T)))):(console.error(`
11
11
  data structure is incorrect,
12
12
  data structure type ->
13
13
  " type data = Array<{ [key: string]: string | number | boolean }>
14
14
  or
15
15
  type data = Array<(string | number | boolean)[]>"
16
- `),null));return(0,n.renderToString)(t.default.createElement("table",null,t.default.createElement("tbody",null,a,b)))}return Oe.default=o,Oe}var cn;function cs(){return cn||(cn=1,(function(e){var t=Ne&&Ne.__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,b)=>i[b])}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=ls();Object.defineProperty(e,"createTable",{enumerable:!0,get:function(){return t(o).default}})})(Ne)),Ne}var un;function Hn(){if(un)return pe;un=1;var e=pe&&pe.__createBinding||(Object.create?(function(c,l,m,S){S===void 0&&(S=m);var g=Object.getOwnPropertyDescriptor(l,m);(!g||("get"in g?!l.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return l[m]}}),Object.defineProperty(c,S,g)}):(function(c,l,m,S){S===void 0&&(S=m),c[S]=l[m]})),t=pe&&pe.__setModuleDefault||(Object.create?(function(c,l){Object.defineProperty(c,"default",{enumerable:!0,value:l})}):function(c,l){c.default=l}),n=pe&&pe.__importStar||function(c){if(c&&c.__esModule)return c;var l={};if(c!=null)for(var m in c)m!=="default"&&Object.prototype.hasOwnProperty.call(c,m)&&e(l,c,m);return t(l,c),l};Object.defineProperty(pe,"__esModule",{value:!0}),pe.downloadExcel=pe.excel=void 0;const r=n(cs());function o(){return document?!0:((process==null?void 0:process.env.NODE_ENV)!=="production"&&console.error("Failed to access document object"),!1)}function s(c,l){const m=window.document.createElement("a");return m.href=r.uri+r.base64(r.format(r.template,l)),m.download=c,document.body.appendChild(m),m.click(),document.body.removeChild(m),!0}function i(c,l){if(c)return c.cloneNode(!0).outerHTML;if(l)return r.createTable(l);console.error("currentTableRef or tablePayload does not exist")}function a({fileName:c,sheet:l,tablePayload:m},S){if(!o())return!1;const g=i(S,m);return s(c,{worksheet:l||"Worksheet",table:g})}pe.downloadExcel=a;function b({currentTableRef:c,filename:l,sheet:m}){function S(){if(!o())return!1;const g=i(c),h=`${l}.xls`;return s(h,{worksheet:m||"Worksheet",table:g})}return{onDownload:S}}return pe.excel=b,pe}var dn;function us(){if(dn)return Me;dn=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.useDownloadExcel=void 0;const e=ne,t=Hn();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 Me.useDownloadExcel=n,Me}var fn;function ds(){return fn||(fn=1,(function(e){var t=$e&&$e.__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(ne),r=us();Object.defineProperty(e,"useDownloadExcel",{enumerable:!0,get:function(){return r.useDownloadExcel}});const o=Hn();Object.defineProperty(e,"downloadExcel",{enumerable:!0,get:function(){return o.downloadExcel}});const s=({currentTableRef:i,filename:a,sheet:b,children:c})=>{const{onDownload:l}=(0,r.useDownloadExcel)({currentTableRef:i,filename:a,sheet:b});return n.default.createElement("span",{onClick:l},c)};e.DownloadTableExcel=s})($e)),$e}var fs=ds();const Wn="printWindow";function ps(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=Wn,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 ue({level:e="error",messages:t,suppressErrors:n=!1}){n||(e==="error"?console.error(t):e==="warning"?console.warn(t):console.debug(t))}function zn(e,t){if(t||!e){const n=document.getElementById(Wn);n&&document.body.removeChild(n)}}function Ze(e){return e instanceof Error?e:new Error("Unknown Error")}function pn(e,t){const{documentTitle:n,onAfterPrint:r,onPrintError:o,preserveAfterPrint:s,print:i,suppressErrors:a}=t;setTimeout(()=>{if(e.contentWindow){let b=function(){r?.(),zn(s)};if(e.contentWindow.focus(),i)i(e).then(b).catch(c=>{o?o("print",Ze(c)):ue({messages:["An error was thrown by the specified `print` function"],suppressErrors:a})});else{if(e.contentWindow.print){const c=e.contentDocument?.title??"",l=e.ownerDocument.title,m=typeof n=="function"?n():n;m&&(e.ownerDocument.title=m,e.contentDocument&&(e.contentDocument.title=m)),e.contentWindow.print(),m&&(e.ownerDocument.title=l,e.contentDocument&&(e.contentDocument.title=c))}else ue({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:a});hs()?setTimeout(b,500):b()}}else ue({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 hs(){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 hn(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 Vn(e,t,n){const r=hn(e),o=hn(t);if(r.length!==o.length){ue({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],b=i.shadowRoot;if(b!==null){const c=a.attachShadow({mode:b.mode});c.innerHTML=b.innerHTML,Vn(b,c,n)}}}const ms=`
16
+ `),null));return(0,n.renderToString)(t.default.createElement("table",null,t.default.createElement("tbody",null,l,h)))}return tt.default=s,tt}var Kn;function Js(){return Kn||(Kn=1,(function(e){var t=ft&&ft.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.createTable=e.template=e.uri=e.format=e.base64=void 0;function n(a){return window.btoa(unescape(encodeURIComponent(a)))}e.base64=n;function o(a,i){return a.replace(/{(\w+)}/g,(l,h)=>i[h])}e.format=o,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 s=Ys();Object.defineProperty(e,"createTable",{enumerable:!0,get:function(){return t(s).default}})})(ft)),ft}var Yn;function Br(){if(Yn)return De;Yn=1;var e=De&&De.__createBinding||(Object.create?(function(d,c,m,T){T===void 0&&(T=m);var x=Object.getOwnPropertyDescriptor(c,m);(!x||("get"in x?!c.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return c[m]}}),Object.defineProperty(d,T,x)}):(function(d,c,m,T){T===void 0&&(T=m),d[T]=c[m]})),t=De&&De.__setModuleDefault||(Object.create?(function(d,c){Object.defineProperty(d,"default",{enumerable:!0,value:c})}):function(d,c){d.default=c}),n=De&&De.__importStar||function(d){if(d&&d.__esModule)return d;var c={};if(d!=null)for(var m in d)m!=="default"&&Object.prototype.hasOwnProperty.call(d,m)&&e(c,d,m);return t(c,d),c};Object.defineProperty(De,"__esModule",{value:!0}),De.downloadExcel=De.excel=void 0;const o=n(Js());function s(){return document?!0:((process==null?void 0:process.env.NODE_ENV)!=="production"&&console.error("Failed to access document object"),!1)}function a(d,c){const m=window.document.createElement("a");return m.href=o.uri+o.base64(o.format(o.template,c)),m.download=d,document.body.appendChild(m),m.click(),document.body.removeChild(m),!0}function i(d,c){if(d)return d.cloneNode(!0).outerHTML;if(c)return o.createTable(c);console.error("currentTableRef or tablePayload does not exist")}function l({fileName:d,sheet:c,tablePayload:m},T){if(!s())return!1;const x=i(T,m);return a(d,{worksheet:c||"Worksheet",table:x})}De.downloadExcel=l;function h({currentTableRef:d,filename:c,sheet:m}){function T(){if(!s())return!1;const x=i(d),f=`${c}.xls`;return a(f,{worksheet:m||"Worksheet",table:x})}return{onDownload:T}}return De.excel=h,De}var Jn;function Gs(){if(Jn)return pt;Jn=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.useDownloadExcel=void 0;const e=v,t=Br();function n({currentTableRef:o,filename:s,sheet:a}){const[i,l]=(0,e.useState)({});return(0,e.useEffect)(()=>{l({currentTableRef:o,filename:s,sheet:a})},[o,s,a]),(0,e.useMemo)(()=>(0,t.excel)(i),[i])}return pt.useDownloadExcel=n,pt}var Gn;function Xs(){return Gn||(Gn=1,(function(e){var t=ut&&ut.__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(v),o=Gs();Object.defineProperty(e,"useDownloadExcel",{enumerable:!0,get:function(){return o.useDownloadExcel}});const s=Br();Object.defineProperty(e,"downloadExcel",{enumerable:!0,get:function(){return s.downloadExcel}});const a=({currentTableRef:i,filename:l,sheet:h,children:d})=>{const{onDownload:c}=(0,o.useDownloadExcel)({currentTableRef:i,filename:l,sheet:h});return n.default.createElement("span",{onClick:c},d)};e.DownloadTableExcel=a})(ut)),ut}var Qs=Xs();const Fr="printWindow";function Zs(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=Fr,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 Te({level:e="error",messages:t,suppressErrors:n=!1}){n||(e==="error"?console.error(t):e==="warning"?console.warn(t):console.debug(t))}function Lr(e,t){if(t||!e){const n=document.getElementById(Fr);n&&document.body.removeChild(n)}}function Pt(e){return e instanceof Error?e:new Error("Unknown Error")}function Xn(e,t){const{documentTitle:n,onAfterPrint:o,onPrintError:s,preserveAfterPrint:a,print:i,suppressErrors:l}=t;setTimeout(()=>{if(e.contentWindow){let h=function(){o?.(),Lr(a)};if(e.contentWindow.focus(),i)i(e).then(h).catch(d=>{s?s("print",Pt(d)):Te({messages:["An error was thrown by the specified `print` function"],suppressErrors:l})});else{if(e.contentWindow.print){const d=e.contentDocument?.title??"",c=e.ownerDocument.title,m=typeof n=="function"?n():n;m&&(e.ownerDocument.title=m,e.contentDocument&&(e.contentDocument.title=m)),e.contentWindow.print(),m&&(e.ownerDocument.title=c,e.contentDocument&&(e.contentDocument.title=d))}else Te({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:l});ea()?setTimeout(h,500):h()}}else Te({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:l})},500)}function ea(){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 Qn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,null);let o=n.nextNode();for(;o;)t.push(o),o=n.nextNode();return t}function qr(e,t,n){const o=Qn(e),s=Qn(t);if(o.length!==s.length){Te({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 a=0;a<o.length;a++){const i=o[a],l=s[a],h=i.shadowRoot;if(h!==null){const d=l.attachShadow({mode:h.mode});d.innerHTML=h.innerHTML,qr(h,d,n)}}}const ta=`
17
17
  @page {
18
18
  /* Remove browser default header (title) and footer (url) */
19
19
  margin: 0;
@@ -26,8 +26,8 @@ Valid keys: `+JSON.stringify(Object.keys(y),null," "));var C=oe(z,H,$,B,W+"."+H
26
26
  -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */
27
27
  }
28
28
  }
29
- `;function ys(e,t,n){const{contentNode:r,clonedContentNode:o,clonedImgNodes:s,clonedVideoNodes:i,numResourcesToLoad:a,originalCanvasNodes:b}=t,{bodyClass:c,fonts:l,ignoreGlobalStyles:m,pageStyle:S,nonce:g,suppressErrors:h,copyShadowRoots:u}=n,f=[],R=[];function P(M,E){if(f.includes(M)){ue({level:"debug",messages:["Tried to mark a resource that has already been handled",M],suppressErrors:h});return}E?(ue({messages:['"react-to-print" was unable to load a resource but will continue attempting to print the page',...E],suppressErrors:h}),R.push(M)):f.push(M),f.length+R.length===a&&pn(e,n)}e.onload=null;const O=e.contentDocument??e.contentWindow?.document;if(O){const M=O.body.appendChild(o);u&&Vn(r,M,!!h),l&&(e.contentDocument?.fonts&&e.contentWindow?.FontFace?l.forEach(A=>{const L=new FontFace(A.family,A.source,{weight:A.weight,style:A.style});e.contentDocument.fonts.add(L),L.loaded.then(()=>{P(L)}).catch(te=>{P(L,["Failed loading the font:",L,"Load error:",Ze(te)])})}):(l.forEach(A=>{P(A)}),ue({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 E=S??ms,Z=O.createElement("style");g&&(Z.setAttribute("nonce",g),O.head.setAttribute("nonce",g)),Z.appendChild(O.createTextNode(E)),O.head.appendChild(Z),c&&O.body.classList.add(...c.split(" "));const re=O.querySelectorAll("canvas");for(let A=0;A<b.length;++A){const L=b[A],te=re[A];if(te===void 0){ue({messages:["A canvas element could not be copied for printing, has it loaded? `onBeforePrint` likely resolved too early.",L],suppressErrors:h});continue}const _=te.getContext("2d");_&&_.drawImage(L,0,0)}for(let A=0;A<s.length;A++){const L=s[A],te=L.getAttribute("src");if(!te)P(L,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it.',L]);else{const _=new Image;_.onload=()=>{P(L)},_.onerror=(T,w,j,v,F)=>{P(L,["Error loading <img>",L,"Error",F])},_.src=te}}for(let A=0;A<i.length;A++){const L=i[A];L.preload="auto";const te=L.getAttribute("poster");if(te){const _=new Image;_.onload=()=>{P(L)},_.onerror=(T,w,j,v,F)=>{P(L,["Error loading video poster",te,"for video",L,"Error:",F])},_.src=te}else L.readyState>=2?P(L):L.src?(L.onloadeddata=()=>{P(L)},L.onerror=(_,T,w,j,v)=>{P(L,["Error loading video",L,"Error",v])},L.onstalled=()=>{P(L,["Loading video stalled, skipping",L])}):P(L,["Error loading video, `src` is empty",L])}const V="select",Y=r.querySelectorAll(V),G=O.querySelectorAll(V);for(let A=0;A<Y.length;A++)G[A].value=Y[A].value;if(!m){const A=document.querySelectorAll("style, link[rel~='stylesheet'], link[as='style']");for(let L=0,te=A.length;L<te;++L){const _=A[L];if(_.tagName.toLowerCase()==="style"){const T=O.createElement(_.tagName),w=_.sheet;if(w){let j="";try{const v=w.cssRules.length;for(let F=0;F<v;++F)typeof w.cssRules[F].cssText=="string"&&(j+=`${w.cssRules[F].cssText}\r
30
- `)}catch(v){ue({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.",_,`Original error: ${Ze(v).message}`],level:"warning"})}T.setAttribute("id",`react-to-print-${L}`),g&&T.setAttribute("nonce",g),T.appendChild(O.createTextNode(j)),O.head.appendChild(T)}}else if(_.getAttribute("href"))if(_.hasAttribute("disabled"))ue({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:",_],level:"warning"}),P(_);else{const T=O.createElement(_.tagName);for(let w=0,j=_.attributes.length;w<j;++w){const v=_.attributes[w];v&&T.setAttribute(v.nodeName,v.nodeValue??"")}T.onload=()=>{P(T)},T.onerror=(w,j,v,F,y)=>{P(T,["Failed to load",T,"Error:",y])},g&&T.setAttribute("nonce",g),O.head.appendChild(T)}else ue({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:",_],level:"warning"}),P(_)}}}a===0&&pn(e,n)}function bs(e,t,n){e.onload=()=>{ys(e,t,n)},document.body.appendChild(e)}function gs({contentRef:e,optionalContent:t,suppressErrors:n}){if(t&&typeof t=="function")return e&&ue({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;ue({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:n})}function ws(e,t){const{contentRef:n,fonts:r,ignoreGlobalStyles:o,suppressErrors:s}=t,i=gs({contentRef:n,optionalContent:e,suppressErrors:s});if(!i)return;const a=i.cloneNode(!0),b=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),c=a.querySelectorAll("img"),l=a.querySelectorAll("video"),m=r?r.length:0,S=(o?0:b.length)+c.length+l.length+m;return{contentNode:i,clonedContentNode:a,clonedImgNodes:c,clonedVideoNodes:l,numResourcesToLoad:S,originalCanvasNodes:i.querySelectorAll("canvas")}}function xs({bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:o,ignoreGlobalStyles:s,nonce:i,onAfterPrint:a,onBeforePrint:b,onPrintError:c,pageStyle:l,preserveAfterPrint:m,print:S,printIframeProps:g,suppressErrors:h}){return ne.useCallback(u=>{zn(m,!0);function f(){const R={bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:o,ignoreGlobalStyles:s,nonce:i,onAfterPrint:a,onPrintError:c,pageStyle:l,preserveAfterPrint:m,print:S,suppressErrors:h},P=ps(g),O=ws(u,R);if(!O){ue({messages:["There is nothing to print"],suppressErrors:h});return}bs(P,O,R)}b?b().then(()=>{f()}).catch(R=>{c?.("onBeforePrint",Ze(R))}):f()},[e,t,n,r,o,s,i,a,b,c,l,m,g,S,h])}const Es=e=>{console.log("ExportDataWithHeader______",e);const{tableRef:t}=e.data;e?.tableRef;const n=new Date().getTime(),r=xs({});return d.jsx(d.Fragment,{children:d.jsx(k.Row,{justify:"end",children:d.jsx(k.Col,{children:d.jsxs(k.Row,{gutter:8,children:[d.jsx(k.Col,{children:d.jsx(k.Button,{type:"text",icon:d.jsx(ge.PrinterOutlined,{style:{color:"#5080f8"}}),onClick:r})}),d.jsx(k.Col,{children:d.jsx(fs.DownloadTableExcel,{filename:n,sheet:"users",currentTableRef:t.current,children:d.jsx(k.Button,{type:"text",icon:d.jsx(ge.FileTextOutlined,{style:{color:"#5080f8"}})})})})]})})})})},vs=e=>{const{tableRef:t}=e;return new Date().getTime(),d.jsx(d.Fragment,{children:d.jsx(k.Row,{justify:"center",children:d.jsx(k.Col,{span:24,style:{display:"flex",justifyContent:"center",alignSelf:"center",paddingBottom:"20px",position:"relative"}})})})},Ss=ne.createContext(),_s=()=>({modal:{outline:"none",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundcolor:"red"}},img:{outline:"none"},passwordmodal:{outline:"none",display:"flex",alignItems:"center",justifyContent:"center"}}),Yn=e=>{const{columns:t,action:n,DrawerUpdate:r,editDesign:o,newData:s,Loading:i,error:a,deleteTodoMutation:b,open:c,ActionView:l,viewDetails:m,myType:S,type:g,urlkey:h,columnstype:u,rowSelection:f}=e.data,R=_s(),[P,O]=ne.useState(!1),[M,E]=ne.useState(null),[Z,re]=ne.useState("false"),[V,Y]=ne.useState(!1),[G,A]=ne.useState(!1),[L,te]=ne.useState(),[_,T]=ne.useState(""),w=()=>O(!1),j=I=>{re(I),O(!0)},[v,F]=ne.useState(),[y,x]=ne.useState({page:e?.data?.pageController?e.data?.pageController?.page:1,rowsPerPage:e?.data?.pageController?e.data?.pageController?.rowsPerPage:10}),D=ne.useRef(null),N=(I,U)=>{e.parentCallback?.(I,U),x({rowsPerPage:U,page:I})},$=(I,U)=>{E(U),Y(!0),te(I)},B=(I,U)=>{E(U),A(!0),te(I)},W=e?.data?.onNavigate??e?.onNavigate,z=(I,U)=>{if(typeof W=="function"){W(I,U);return}typeof window<"u"&&typeof I=="string"&&I.length>0&&window.location.assign(I)},K=I=>{if(g==="staff"){z(`/HumanResourceDashboard/StaffFullInformation?id=${I.fk_staffID}`,I);return}z(`/StudentInformation/StudentFullInformation?id=${I.id}`,I)},J=(I,U)=>{F(I),r?.(U)},H=async(I,U,X,me)=>{r?.(!0),X!==""&&((await me({id:I,admission_no:U,ec_no:X}))?.Status==="Success"?k.message.success("Ec No updated successfully"):k.message.error("Failed to Update Ec No."))},oe=()=>d.jsx(Ss.Provider,{value:v,children:o}),{trigger:C}=at("branchapi/staff/updateStaffPassword",ft),{trigger:le}=at("branchapi/Student/updateEcNo",ft),{trigger:Se}=at(h,(I,U)=>ft("student/studentDetails/editStudentLogInCredential",U)),qe=async I=>{I.preventDefault(),Y(!1);try{(await C({staff_id:L,new_passwod:I.target.password.value}))?.Status==="Success"?k.message.success("Password updated successfully"):k.message.error("Failed to update password")}catch{k.message.error("Failed to update password")}},Jn=async I=>{I.preventDefault(),A(!1);try{(await Se({edit_id:M?.edit_id,new_passwod:I.target.password.value,username:I.target.username.value,branch_id:JSON.parse(localStorage.getItem("genrall_settings"))?.fk_branchID}))?.Status==="Success"?k.message.success("Password updated successfully"):k.message.error("Failed to update password")}catch(U){k.message.error(U?.response?.data?.msg??"Failed to update password")}},Kn=[{title:"SR. NO.",key:"serialNumber",width:90,render:(I,U,X)=>(y.page-1)*y.rowsPerPage+X+1},...u==="antd"?t:(Array.isArray(t)?t:[]).map(I=>({title:I.name,dataIndex:I.selector,key:I.selector,sorter:I.sorter||(I.sortable?(U,X)=>{const me=U[I.selector]??"",Te=X[I.selector]??"";return typeof me=="number"&&typeof Te=="number"?me-Te:String(me).localeCompare(String(Te))}:!1),render:(U,X)=>{switch(I.selector){case"my_staff":return X.staff_id!=="0"?X.staff_id:"Admin";case"gallery_cat_logo":return d.jsx(k.Image,{width:50,src:`undefined/branch/gallery/${X.gallery_cat_logo}`});case"file01":return X.documents?d.jsx("div",{onClick:()=>j(`undefined/branch/frontoffice/${X.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 as(U);case"full_name":return d.jsx("span",{onClick:()=>K(X),style:{cursor:"pointer",color:"blue",textDecoration:"underline"},children:U||`${X.firstname} ${X.lastname}`});case"extra_curricular_activity":return U==="Yes"?"Extra Subject":"Fees Master";case"is_active":return U==="yes"?d.jsx("span",{className:"label label-success",children:"Active"}):d.jsx("span",{className:"label label-danger",children:"Inactive"});case"steps":return X?.current_status==="Active"?d.jsx(k.Progress,{percent:X.steps==="1"?30:X.steps==="2"?70:100,steps:3}):d.jsx("span",{className:"label label-success",children:X?.current_status});case"Password":return d.jsx("span",{onClick:()=>$(X.id,X),style:{cursor:"pointer"},className:"label label-danger",children:"Update"});case"Passwordstd":return d.jsx("span",{onClick:()=>B(X.id,X),style:{cursor:"pointer"},className:"label label-danger",children:"Update"});case"payment_status":return d.jsx(k.Tag,{onClick:()=>m?.(X.id),color:U==="paid"?"#66aa18":U==="partially_paid"?"#ff5722":"#DC143C",children:U==="paid"?"Paid":U==="partially_paid"?"Partially Paid":"Due"});case"fees_duration":return is().find(me=>me.value===U)?.label;case"status":return d.jsx("span",{onClick:()=>m?.(X?.fk_staffID,X?.total_leave),className:`label ${U==="due"?"label-danger":"label-success"}`,style:{cursor:"pointer"},children:U==="due"?"Due":"Paid"});case"subject_type_1":return d.jsxs(d.Fragment,{children:[X.is_theory==="yes"&&"Theory, ",X.is_practical==="yes"&&"Practical"]});case"ec_no":return d.jsx(ts,{html:X.ec_no,onBlur:me=>H(X.id,X.admission_no,me.target.innerHTML,le)});case"Assign":case"AssignExtCarriAci":case"Medical":return d.jsx(k.Button,{type:"primary",icon:d.jsx(ge.SendOutlined,{}),size:"small",onClick:()=>J(X.id,!0,I.name),children:I.name});case"Button":return d.jsx(k.Tag,{color:"cyan",onClick:()=>m?.(X),children:I.name});default:return U}}})),...n?[{title:"Action",key:"action",render:(I,U)=>{const X=U?.current_status==="Promoted",me=()=>{if(S=="sameAddUpdate"){J(U,!0);return}if(S?.type==="examEdit"){S.editFunc(U.id);return}J(U.id||U,!0)},Te=()=>{if(S==="student_result"){m?.(U);return}if(S==="student"){m?.(U.id,U.class_id);return}m?.(U.id)},Qn=()=>{b?.(U?.id)};return d.jsxs("div",{style:{display:"flex",gap:"5px"},children:[l?.[0]?.status&&d.jsx(k.Button,{icon:d.jsx(ge.EditOutlined,{}),size:"small",disabled:X,onClick:me}),l?.[1]?.status&&d.jsx(k.Button,{icon:d.jsx(ge.DeleteOutlined,{}),size:"small",danger:!0,disabled:X,onClick:Qn}),l?.[2]?.status&&d.jsx(k.Button,{icon:d.jsx(ge.EyeOutlined,{}),size:"small",onClick:Te})]})}}]:[]],st=ne.useMemo(()=>s?Array.isArray(s?.data)?s.data:Array.isArray(s)?s:[]:[],[s]),Be=ne.useMemo(()=>{const I=_.trim().toLowerCase();return I?st.filter(U=>Object.values(U??{}).some(X=>String(X??"").toLowerCase().includes(I))):st},[st,_]),Xn=!!e.parentCallback,_e=_?Be.length:s?.pagination?.total_rows??Be.length,He=(y.page-1)*y.rowsPerPage,it=Xn?Be:Be.slice(He,He+y.rowsPerPage),Gn=_e===0?0:Math.min(He+1,_e),Zn=_e===0?0:Math.min(He+it.length,_e);let Ae;return i?Ae=d.jsx("p",{children:"Loading..."}):a?Ae=d.jsx("p",{children:a.message}):it.length?Ae=d.jsx(k.Table,{dataSource:it,columns:Kn,size:"small",bordered:!0,pagination:!1,rowSelection:f,rowKey:(I,U)=>I?.id??I?._id??U,scroll:{x:"max-content"}}):Ae=d.jsx(k.Empty,{}),d.jsxs("div",{style:{width:"100%"},children:[d.jsx(k.Drawer,{open:c,placement:"right",onClose:()=>r?.(!1),width:720,children:oe()}),d.jsx(k.Modal,{title:"Update Password",open:V,onCancel:()=>Y(!1),footer:null,children:d.jsx("form",{onSubmit:qe,children:d.jsxs(ae,{children:[d.jsx(ae,{style:{marginBottom:12},children:d.jsx(be,{type:"password",label:"Password",name:"password",required:"required"})}),d.jsx(ae,{style:{marginTop:16},children:d.jsx(k.Button,{type:"primary",htmlType:"submit",children:"Update"})})]})})}),d.jsx(k.Modal,{title:" Update Credential",open:G,onCancel:()=>A(!1),footer:null,children:d.jsx("form",{onSubmit:Jn,children:d.jsxs(ae,{children:[d.jsx(ae,{style:{marginBottom:12},children:d.jsx(be,{type:"text",label:"User Name",name:"username",required:"required",value:M?.username?M?.username:"",onChange:I=>E({...M,username:I.target.value})})}),d.jsx(ae,{style:{marginBottom:12},children:d.jsx(be,{label:"Password",name:"password",required:"required",value:M?.password?M?.password:"",onChange:I=>E({...M,password:I.target.value})})}),d.jsx(ae,{style:{marginTop:16},children:d.jsx(k.Button,{type:"primary",htmlType:"submit",children:"Update"})})]})})}),d.jsx(k.Modal,{open:P,onCancel:w,footer:null,centered:!0,width:"80%",className:R.modal,children:d.jsxs("div",{style:{position:"relative"},className:R.img,children:[d.jsx(k.Image,{src:Z,alt:"",style:{width:"100%"},preview:!1}),d.jsx(k.Button,{type:"text",icon:d.jsx(ge.CloseOutlined,{}),onClick:w,style:{position:"absolute",top:8,right:8,background:"rgba(0,0,0,0.45)",color:"#fff"}})]})}),d.jsxs(k.Card,{bodyStyle:{padding:16,background:"#f7f7fa"},children:[d.jsx("style",{children:`
29
+ `;function na(e,t,n){const{contentNode:o,clonedContentNode:s,clonedImgNodes:a,clonedVideoNodes:i,numResourcesToLoad:l,originalCanvasNodes:h}=t,{bodyClass:d,fonts:c,ignoreGlobalStyles:m,pageStyle:T,nonce:x,suppressErrors:f,copyShadowRoots:u}=n,p=[],_=[];function R(P,S){if(p.includes(P)){Te({level:"debug",messages:["Tried to mark a resource that has already been handled",P],suppressErrors:f});return}S?(Te({messages:['"react-to-print" was unable to load a resource but will continue attempting to print the page',...S],suppressErrors:f}),_.push(P)):p.push(P),p.length+_.length===l&&Xn(e,n)}e.onload=null;const w=e.contentDocument??e.contentWindow?.document;if(w){const P=w.body.appendChild(s);u&&qr(o,P,!!f),c&&(e.contentDocument?.fonts&&e.contentWindow?.FontFace?c.forEach(D=>{const N=new FontFace(D.family,D.source,{weight:D.weight,style:D.style});e.contentDocument.fonts.add(N),N.loaded.then(()=>{R(N)}).catch(J=>{R(N,["Failed loading the font:",N,"Load error:",Pt(J)])})}):(c.forEach(D=>{R(D)}),Te({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:f})));const S=T??ta,ne=w.createElement("style");x&&(ne.setAttribute("nonce",x),w.head.setAttribute("nonce",x)),ne.appendChild(w.createTextNode(S)),w.head.appendChild(ne),d&&w.body.classList.add(...d.split(" "));const oe=w.querySelectorAll("canvas");for(let D=0;D<h.length;++D){const N=h[D],J=oe[D];if(J===void 0){Te({messages:["A canvas element could not be copied for printing, has it loaded? `onBeforePrint` likely resolved too early.",N],suppressErrors:f});continue}const L=J.getContext("2d");L&&L.drawImage(N,0,0)}for(let D=0;D<a.length;D++){const N=a[D],J=N.getAttribute("src");if(!J)R(N,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it.',N]);else{const L=new Image;L.onload=()=>{R(N)},L.onerror=(ae,V,ie,re,B)=>{R(N,["Error loading <img>",N,"Error",B])},L.src=J}}for(let D=0;D<i.length;D++){const N=i[D];N.preload="auto";const J=N.getAttribute("poster");if(J){const L=new Image;L.onload=()=>{R(N)},L.onerror=(ae,V,ie,re,B)=>{R(N,["Error loading video poster",J,"for video",N,"Error:",B])},L.src=J}else N.readyState>=2?R(N):N.src?(N.onloadeddata=()=>{R(N)},N.onerror=(L,ae,V,ie,re)=>{R(N,["Error loading video",N,"Error",re])},N.onstalled=()=>{R(N,["Loading video stalled, skipping",N])}):R(N,["Error loading video, `src` is empty",N])}const C="select",O=o.querySelectorAll(C),k=w.querySelectorAll(C);for(let D=0;D<O.length;D++)k[D].value=O[D].value;if(!m){const D=document.querySelectorAll("style, link[rel~='stylesheet'], link[as='style']");for(let N=0,J=D.length;N<J;++N){const L=D[N];if(L.tagName.toLowerCase()==="style"){const ae=w.createElement(L.tagName),V=L.sheet;if(V){let ie="";try{const re=V.cssRules.length;for(let B=0;B<re;++B)typeof V.cssRules[B].cssText=="string"&&(ie+=`${V.cssRules[B].cssText}\r
30
+ `)}catch(re){Te({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.",L,`Original error: ${Pt(re).message}`],level:"warning"})}ae.setAttribute("id",`react-to-print-${N}`),x&&ae.setAttribute("nonce",x),ae.appendChild(w.createTextNode(ie)),w.head.appendChild(ae)}}else if(L.getAttribute("href"))if(L.hasAttribute("disabled"))Te({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:",L],level:"warning"}),R(L);else{const ae=w.createElement(L.tagName);for(let V=0,ie=L.attributes.length;V<ie;++V){const re=L.attributes[V];re&&ae.setAttribute(re.nodeName,re.nodeValue??"")}ae.onload=()=>{R(ae)},ae.onerror=(V,ie,re,B,g)=>{R(ae,["Failed to load",ae,"Error:",g])},x&&ae.setAttribute("nonce",x),w.head.appendChild(ae)}else Te({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:",L],level:"warning"}),R(L)}}}l===0&&Xn(e,n)}function ra(e,t,n){e.onload=()=>{na(e,t,n)},document.body.appendChild(e)}function oa({contentRef:e,optionalContent:t,suppressErrors:n}){if(t&&typeof t=="function")return e&&Te({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;Te({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:n})}function sa(e,t){const{contentRef:n,fonts:o,ignoreGlobalStyles:s,suppressErrors:a}=t,i=oa({contentRef:n,optionalContent:e,suppressErrors:a});if(!i)return;const l=i.cloneNode(!0),h=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),d=l.querySelectorAll("img"),c=l.querySelectorAll("video"),m=o?o.length:0,T=(s?0:h.length)+d.length+c.length+m;return{contentNode:i,clonedContentNode:l,clonedImgNodes:d,clonedVideoNodes:c,numResourcesToLoad:T,originalCanvasNodes:i.querySelectorAll("canvas")}}function aa({bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:o,fonts:s,ignoreGlobalStyles:a,nonce:i,onAfterPrint:l,onBeforePrint:h,onPrintError:d,pageStyle:c,preserveAfterPrint:m,print:T,printIframeProps:x,suppressErrors:f}){return v.useCallback(u=>{Lr(m,!0);function p(){const _={bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:o,fonts:s,ignoreGlobalStyles:a,nonce:i,onAfterPrint:l,onPrintError:d,pageStyle:c,preserveAfterPrint:m,print:T,suppressErrors:f},R=Zs(x),w=sa(u,_);if(!w){Te({messages:["There is nothing to print"],suppressErrors:f});return}ra(R,w,_)}h?h().then(()=>{p()}).catch(_=>{d?.("onBeforePrint",Pt(_))}):p()},[e,t,n,o,s,a,i,l,h,d,c,m,x,T,f])}const ia=e=>{console.log("ExportDataWithHeader______",e);const{tableRef:t}=e.data;e?.tableRef;const n=new Date().getTime(),o=aa({});return r.jsx(r.Fragment,{children:r.jsx(j.Row,{justify:"end",children:r.jsx(j.Col,{children:r.jsxs(j.Row,{gutter:8,children:[r.jsx(j.Col,{children:r.jsx(j.Button,{type:"text",icon:r.jsx(ye.PrinterOutlined,{style:{color:"#5080f8"}}),onClick:o})}),r.jsx(j.Col,{children:r.jsx(Qs.DownloadTableExcel,{filename:n,sheet:"users",currentTableRef:t.current,children:r.jsx(j.Button,{type:"text",icon:r.jsx(ye.FileTextOutlined,{style:{color:"#5080f8"}})})})})]})})})})},la=e=>{const{tableRef:t}=e;return new Date().getTime(),r.jsx(r.Fragment,{children:r.jsx(j.Row,{justify:"center",children:r.jsx(j.Col,{span:24,style:{display:"flex",justifyContent:"center",alignSelf:"center",paddingBottom:"20px",position:"relative"}})})})},ca=v.createContext(),da=()=>({modal:{outline:"none",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundcolor:"red"}},img:{outline:"none"},passwordmodal:{outline:"none",display:"flex",alignItems:"center",justifyContent:"center"}}),st=e=>{const{columns:t,action:n,DrawerUpdate:o,editDesign:s,newData:a,Loading:i,error:l,deleteTodoMutation:h,open:d,ActionView:c,viewDetails:m,myType:T,type:x,urlkey:f,columnstype:u,rowSelection:p}=e.data,_=da(),[R,w]=v.useState(!1),[P,S]=v.useState(null),[ne,oe]=v.useState("false"),[C,O]=v.useState(!1),[k,D]=v.useState(!1),[N,J]=v.useState(),[L,ae]=v.useState(""),V=()=>w(!1),ie=$=>{oe($),w(!0)},[re,B]=v.useState(),[g,b]=v.useState({page:e?.data?.pageController?e.data?.pageController?.page:1,rowsPerPage:e?.data?.pageController?e.data?.pageController?.rowsPerPage:10}),E=v.useRef(null),A=($,q)=>{e.parentCallback?.($,q),b({rowsPerPage:q,page:$})},M=($,q)=>{S(q),O(!0),J($)},G=($,q)=>{S(q),D(!0),J($)},W=e?.data?.onNavigate??e?.onNavigate,Q=($,q)=>{if(typeof W=="function"){W($,q);return}typeof window<"u"&&typeof $=="string"&&$.length>0&&window.location.assign($)},F=$=>{if(x==="staff"){Q(`/HumanResourceDashboard/StaffFullInformation?id=${$.fk_staffID}`,$);return}Q(`/StudentInformation/StudentFullInformation?id=${$.id}`,$)},z=($,q)=>{B($),o?.(q)},Z=async($,q,se,we)=>{o?.(!0),se!==""&&((await we({id:$,admission_no:q,ec_no:se}))?.Status==="Success"?j.message.success("Ec No updated successfully"):j.message.error("Failed to Update Ec No."))},he=()=>r.jsx(ca.Provider,{value:re,children:s}),{trigger:U}=Lt("branchapi/staff/updateStaffPassword",Wt),{trigger:ge}=Lt("branchapi/Student/updateEcNo",Wt),{trigger:je}=Lt(f,($,q)=>Wt("student/studentDetails/editStudentLogInCredential",q)),Le=async $=>{$.preventDefault(),O(!1);try{(await U({staff_id:N,new_passwod:$.target.password.value}))?.Status==="Success"?j.message.success("Password updated successfully"):j.message.error("Failed to update password")}catch{j.message.error("Failed to update password")}},Xe=async $=>{$.preventDefault(),D(!1);try{(await je({edit_id:P?.edit_id,new_passwod:$.target.password.value,username:$.target.username.value,branch_id:JSON.parse(localStorage.getItem("genrall_settings"))?.fk_branchID}))?.Status==="Success"?j.message.success("Password updated successfully"):j.message.error("Failed to update password")}catch(q){j.message.error(q?.response?.data?.msg??"Failed to update password")}},Qe=[{title:"SR. NO.",dataIndex:"__serialNumber",key:"__serialNumber",width:90,sorter:($,q)=>($.__serialNumber??0)-(q.__serialNumber??0),render:$=>$},...u==="antd"?t:(Array.isArray(t)?t:[]).map($=>({title:$.name,dataIndex:$.selector,key:$.selector,sorter:$.sorter||($.sortable?(q,se)=>{const we=q[$.selector]??"",Ue=se[$.selector]??"";return typeof we=="number"&&typeof Ue=="number"?we-Ue:String(we).localeCompare(String(Ue))}:!1),render:(q,se)=>{switch($.selector){case"my_staff":return se.staff_id!=="0"?se.staff_id:"Admin";case"gallery_cat_logo":return r.jsx(j.Image,{width:50,src:`undefined/branch/gallery/${se.gallery_cat_logo}`});case"file01":return se.documents?r.jsx("div",{onClick:()=>ie(`undefined/branch/frontoffice/${se.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 Ks(q);case"full_name":return r.jsx("span",{onClick:()=>F(se),style:{cursor:"pointer",color:"blue",textDecoration:"underline"},children:q||`${se.firstname} ${se.lastname}`});case"extra_curricular_activity":return q==="Yes"?"Extra Subject":"Fees Master";case"is_active":return q==="yes"?r.jsx("span",{className:"label label-success",children:"Active"}):r.jsx("span",{className:"label label-danger",children:"Inactive"});case"steps":return se?.current_status==="Active"?r.jsx(j.Progress,{percent:se.steps==="1"?30:se.steps==="2"?70:100,steps:3}):r.jsx("span",{className:"label label-success",children:se?.current_status});case"Password":return r.jsx("span",{onClick:()=>M(se.id,se),style:{cursor:"pointer"},className:"label label-danger",children:"Update"});case"Passwordstd":return r.jsx("span",{onClick:()=>G(se.id,se),style:{cursor:"pointer"},className:"label label-danger",children:"Update"});case"payment_status":return r.jsx(j.Tag,{onClick:()=>m?.(se.id),color:q==="paid"?"#66aa18":q==="partially_paid"?"#ff5722":"#DC143C",children:q==="paid"?"Paid":q==="partially_paid"?"Partially Paid":"Due"});case"fees_duration":return Ws().find(we=>we.value===q)?.label;case"status":return r.jsx("span",{onClick:()=>m?.(se?.fk_staffID,se?.total_leave),className:`label ${q==="due"?"label-danger":"label-success"}`,style:{cursor:"pointer"},children:q==="due"?"Due":"Paid"});case"subject_type_1":return r.jsxs(r.Fragment,{children:[se.is_theory==="yes"&&"Theory, ",se.is_practical==="yes"&&"Practical"]});case"ec_no":return r.jsx(Vs,{html:se.ec_no,onBlur:we=>Z(se.id,se.admission_no,we.target.innerHTML,ge)});case"Assign":case"AssignExtCarriAci":case"Medical":return r.jsx(j.Button,{type:"primary",icon:r.jsx(ye.SendOutlined,{}),size:"small",onClick:()=>z(se.id,!0,$.name),children:$.name});case"Button":return r.jsx(j.Tag,{color:"cyan",onClick:()=>m?.(se),children:$.name});default:return q}}})),...n?[{title:"Action",key:"action",render:($,q)=>{const se=q?.current_status==="Promoted",we=()=>{if(T=="sameAddUpdate"){z(q,!0);return}if(T?.type==="examEdit"){T.editFunc(q.id);return}z(q.id||q,!0)},Ue=()=>{if(T==="student_result"){m?.(q);return}if(T==="student"){m?.(q.id,q.class_id);return}m?.(q.id)},be=()=>{h?.(q?.id)};return r.jsxs("div",{style:{display:"flex",gap:"5px"},children:[c?.[0]?.status&&r.jsx(j.Button,{icon:r.jsx(ye.EditOutlined,{}),size:"small",disabled:se,onClick:we}),c?.[1]?.status&&r.jsx(j.Button,{icon:r.jsx(ye.DeleteOutlined,{}),size:"small",danger:!0,disabled:se,onClick:be}),c?.[2]?.status&&r.jsx(j.Button,{icon:r.jsx(ye.EyeOutlined,{}),size:"small",onClick:Ue})]})}}]:[]],$e=v.useMemo(()=>a?Array.isArray(a?.data)?a.data:Array.isArray(a)?a:[]:[],[a]),Ie=v.useMemo(()=>{const $=L.trim().toLowerCase();return $?$e.filter(q=>Object.values(q??{}).some(se=>String(se??"").toLowerCase().includes($))):$e},[$e,L]),qe=!!e.parentCallback,Re=L?Ie.length:a?.pagination?.total_rows??Ie.length,Oe=(g.page-1)*g.rowsPerPage,Be=qe?Ie:Ie.slice(Oe,Oe+g.rowsPerPage),Ze=v.useMemo(()=>(Be??[]).map(($,q)=>({...$??{},__serialNumber:Oe+q+1})),[Oe,Be]),it=Re===0?0:Math.min(Oe+1,Re),lt=Re===0?0:Math.min(Oe+Be.length,Re);let Ne;return i?Ne=r.jsx("p",{children:"Loading..."}):l?Ne=r.jsx("p",{children:l.message}):Be.length?Ne=r.jsx(j.Table,{dataSource:Ze,columns:Qe,size:"small",bordered:!0,pagination:!1,rowSelection:p,rowKey:($,q)=>$?.id??$?._id??q,scroll:{x:"max-content"}}):Ne=r.jsx(j.Empty,{}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx(j.Drawer,{open:d,placement:"right",onClose:()=>o?.(!1),width:720,children:he()}),r.jsx(j.Modal,{title:"Update Password",open:C,onCancel:()=>O(!1),footer:null,children:r.jsx("form",{onSubmit:Le,children:r.jsxs(X,{children:[r.jsx(X,{style:{marginBottom:12},children:r.jsx(le,{type:"password",label:"Password",name:"password",required:"required"})}),r.jsx(X,{style:{marginTop:16},children:r.jsx(j.Button,{type:"primary",htmlType:"submit",children:"Update"})})]})})}),r.jsx(j.Modal,{title:" Update Credential",open:k,onCancel:()=>D(!1),footer:null,children:r.jsx("form",{onSubmit:Xe,children:r.jsxs(X,{children:[r.jsx(X,{style:{marginBottom:12},children:r.jsx(le,{type:"text",label:"User Name",name:"username",required:"required",value:P?.username?P?.username:"",onChange:$=>S({...P,username:$.target.value})})}),r.jsx(X,{style:{marginBottom:12},children:r.jsx(le,{label:"Password",name:"password",required:"required",value:P?.password?P?.password:"",onChange:$=>S({...P,password:$.target.value})})}),r.jsx(X,{style:{marginTop:16},children:r.jsx(j.Button,{type:"primary",htmlType:"submit",children:"Update"})})]})})}),r.jsx(j.Modal,{open:R,onCancel:V,footer:null,centered:!0,width:"80%",className:_.modal,children:r.jsxs("div",{style:{position:"relative"},className:_.img,children:[r.jsx(j.Image,{src:ne,alt:"",style:{width:"100%"},preview:!1}),r.jsx(j.Button,{type:"text",icon:r.jsx(ye.CloseOutlined,{}),onClick:V,style:{position:"absolute",top:8,right:8,background:"rgba(0,0,0,0.45)",color:"#fff"}})]})}),r.jsxs(j.Card,{bodyStyle:{padding:16,background:"#f7f7fa"},children:[r.jsx("style",{children:`
31
31
  .ubk-table-shell .ant-table-wrapper {
32
32
  background: #fff;
33
33
  border: 1px solid #e7e8f2;
@@ -70,4 +70,4 @@ Valid keys: `+JSON.stringify(Object.keys(y),null," "));var C=oe(z,H,$,B,W+"."+H
70
70
  .ubk-table-shell .ant-pagination .ant-pagination-next button:hover {
71
71
  color: #8f99ff;
72
72
  }
73
- `}),d.jsx(ae,{children:d.jsx("div",{style:{display:"flex",justifyContent:"space-between"},children:d.jsx(Es,{data:{tableRef:D}})})}),d.jsxs("div",{className:"ubk-table-shell",ref:D,style:{marginTop:12},children:[d.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:16,flexWrap:"wrap",marginBottom:14},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:12,color:"#222"},children:[d.jsx("span",{children:"Show"}),d.jsx(k.Select,{size:"small",value:y.rowsPerPage,onChange:I=>N(1,I),options:[10,25,50,100].map(I=>({label:I,value:I})),style:{width:72}}),d.jsx("span",{children:"entries"})]}),d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[d.jsx("span",{style:{fontSize:12,color:"#222"},children:"Search:"}),d.jsx(k.Input,{size:"small",allowClear:!0,value:_,onChange:I=>{T(I.target.value),x(U=>({...U,page:1}))},placeholder:"Enter search keyword",prefix:d.jsx(ge.SearchOutlined,{style:{color:"#a3a8cf"}}),style:{width:220,borderWidth:"0 0 1px 0",borderRadius:0,background:"transparent"}})]})]}),d.jsx("div",{className:"print-only",children:d.jsx(vs,{})}),Ae]}),s&&d.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:16,marginTop:16,flexWrap:"wrap"},children:[d.jsx("div",{style:{fontSize:12,color:"#222"},children:`Showing ${Gn} to ${Zn} of ${_e} entries`}),d.jsx(k.Pagination,{current:y.page,pageSize:y.rowsPerPage,total:_e||0,showSizeChanger:!1,onChange:N})]})]})]})},Ts=({token:e,type:t})=>{const[n,r]=ne.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:b,error:c}=Tt(e?[i,e]:null,([P,O])=>Un(P,O)),[l,m]=ne.useState(!1),S=(P,O)=>{r({page:P,rowsPerPage:parseInt(O)})},g=async P=>{},h=P=>{console.log("dsdsdsdsd",P),m(P)},u=()=>{},f=[{key:"Edit",status:!0},{key:"Delete",status:!0},{key:"View",status:!1}],R=ne.useMemo(()=>[{id:"1",name:"Name",selector:"name",sortable:!0,sorter:{compare:(P,O)=>P.name.localeCompare(O.name)}},{id:"2",name:"Phone",selector:"contact",sortable:!0,sorter:(P,O)=>(P.contact||"").localeCompare(O.contact||"")},{id:"6",name:"Description",selector:"description",sortable:!0,sorter:(P,O)=>(P.description||"").localeCompare(O.description||"")},{id:"3",name:"Source",selector:"source_name",sortable:!0,sorter:(P,O)=>(P.source_name||"").localeCompare(O.source_name||"")},{id:"4",name:"Enquiry Date",selector:"date",sortable:!0,sorter:(P,O)=>new Date(P.date)-new Date(O.date)},{id:"5",name:"Next Follow Up Date",selector:"follow_up_date",sortable:!0,sorter:(P,O)=>new Date(P.follow_up_date)-new Date(O.follow_up_date)}]);return d.jsx("div",{children:d.jsx(Yn,{parentCallback:S,data:{newData:b,columns:R,action:!0,Loading:a,error:c,open:l,viewDetails:u,deleteTodoMutation:g,DrawerUpdate:h,ActionView:f}})})},Rs={minWidth:160,height:36,padding:"0 28px",border:"none",borderRadius:999,background:"linear-gradient(90deg, #f59b1c 0%, #ef3e7b 100%)",color:"#fff",fontSize:14,fontWeight:700,textTransform:"uppercase",cursor:"pointer",boxShadow:"none"},mn=ne.forwardRef(({error:e,success:t,disabled:n,style:r,...o},s)=>d.jsx("div",{className:"form-group",style:{marginBottom:0},children:d.jsx("input",{...o,ref:s,disabled:n,style:{...Rs,opacity:n?.7:1,cursor:n?"not-allowed":"pointer",...r||{}}})})),Os=({id:e,funcName:t,disabled:n=!1})=>{const r="Data",[o,s]=ne.useState(!1),i=()=>{s(!0),t(e),k.message.success(`${r} deleted successfully!`)},a=()=>{k.message.info(`Deletion of ${r} cancelled`)};return d.jsx(k.Popconfirm,{title:`Delete ${r}?`,description:`Are you sure you want to delete ${r}?`,onConfirm:i,onCancel:a,okText:"Yes",cancelText:"No",disabled:n||o,children:d.jsx(k.Button,{danger:!0,disabled:n,loading:o,icon:d.jsx(ge.DeleteOutlined,{}),size:"small"})})},Cs=e=>({optimisticData:t=>[...t.data,e],populateCache:(t,n)=>[...n.data,t]}),js=e=>({optimisticData:t=>t.data.filter(n=>n.id!==e),populateCache:(t,n)=>n.data.filter(r=>r.id!==e)}),yn={height:36,padding:"0 14px",border:"none",background:"transparent",color:"#243a9b",fontSize:14,fontWeight:500,textTransform:"uppercase",boxShadow:"none"};function Ps({token:e}){console.log("token__",e);const[t,n]=ne.useState({pagination:{current:1,pageSize:10}}),[r,o]=ne.useState(!1),[s,i]=ne.useState(null),a=`api/branchapi/Transport/routeTableList?page=${t.pagination.current}&per_page=${t.pagination.pageSize}`,b="api/branchapi/Transport/addroute",c="api/branchapi/Transport/editroute",l="api/branchapi/Transport/deleteroute",{isLoading:m,data:S,error:g,mutate:h}=Tt(e?[a,e]:null,([V,Y])=>Un(V,Y)),u=async(V,Y)=>{try{await h(Lo(V,Y,e),Cs(Y)),we.success("Success! Added new item.",{duration:1e3,icon:"🎉"})}catch{we.error("Failed to add the new item.",{duration:1e3})}},f=V=>{V.preventDefault();const Y=new FormData(V.target);u(b,Y),V.target.reset()},R=(V,Y)=>{n(G=>({...G,pagination:{current:V,pageSize:parseInt(Y,10)}}))},P=async V=>{try{await h(Bo(l,V,e),js(V)),we.success("Success! Deleted item.",{duration:1e3})}catch{we.error("Failed to delete the item.",{duration:1e3})}},O=V=>{i(V),o(!0)},M=async V=>{try{await qo(c,V,e),await h(),we.success("Success! Updated item.",{duration:1e3,icon:"🚀"}),o(!1),i(null)}catch{we.error("Failed to update the item.",{duration:1e3})}},E=async V=>{V.preventDefault();const Y=new FormData(V.target);Y.append("id",s?.id),M(Y)},Z=[{title:"Route Title",dataIndex:"route_title",key:"route_title",sorter:{compare:(V,Y)=>V.name.localeCompare(Y.route_title)}},{title:"Fare (Monthly)",dataIndex:"fare",key:"fare",sorter:{compare:(V,Y)=>V.fare-Y.fare}},{title:"Note",dataIndex:"note",key:"note",sorter:{compare:(V,Y)=>V.note.localeCompare(Y.note)}},{title:"Action",key:"action",render:(V,Y)=>d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[d.jsx(k.Button,{type:"text",size:"small",icon:d.jsx(ge.EditOutlined,{}),onClick:()=>O(Y),style:{padding:2}}),d.jsx(Os,{id:Y?.id,funcName:P})]})}],re=s?.route_title?`Edit ${s.route_title}`:"Edit Route";return d.jsxs("div",{children:[d.jsx(k.Drawer,{open:r,title:re,placement:"right",width:420,onClose:()=>{o(!1),i(null)},children:d.jsx("form",{onSubmit:E,children:d.jsxs("div",{style:{display:"grid",gap:20},children:[d.jsx(be,{type:"text",name:"title",label:"Title",defaultValue:s?.route_title||"",required:"required"}),d.jsx(be,{type:"number",name:"fare",label:"Fare (Monthly)",defaultValue:s?.fare||"",required:"required"}),d.jsx(be,{type:"text",name:"note",label:"Note",defaultValue:s?.note||""}),d.jsx("div",{style:{display:"none"},children:d.jsx(be,{type:"text",name:"no_of_vehicle",label:"Note"})}),d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[d.jsx(mn,{type:"submit",value:"Update",color:"primary"}),d.jsx(k.Button,{type:"text",onClick:()=>{o(!1),i(null)},style:yn,children:"Cancel"})]})]})})}),d.jsx(we.Toaster,{toastOptions:{position:"top-center"}}),d.jsx(ae,{pt:5,pb:1,children:d.jsxs("div",{children:[d.jsx("div",{children:d.jsxs("div",{children:[d.jsx(ae,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:d.jsx(xt,{variant:"h6",color:"white",children:"Add Route"})}),d.jsx(ae,{px:3,pb:2,children:d.jsx("form",{onSubmit:f,children:d.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:20,alignItems:"end"},children:[d.jsx(be,{type:"text",name:"title",label:"Title",placeholder:"Mumbai to Delhi",required:"required"}),d.jsx(be,{type:"number",name:"fare",label:"Fare (Monthly)",required:"required"}),d.jsx(be,{type:"text",name:"note",label:"Note"}),d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[d.jsx(mn,{type:"submit",value:"Save",color:"primary"}),d.jsx(k.Button,{type:"text",htmlType:"reset",style:yn,children:"Cancel"})]})]})})})]})}),d.jsx("div",{style:{marginTop:24},children:d.jsxs("div",{children:[d.jsx(ae,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:d.jsx(xt,{variant:"h6",color:"white",children:"Route List"})}),d.jsx(ae,{children:d.jsx(Yn,{parentCallback:R,data:{newData:S,columns:Z,columnstype:"antd",action:!1,Loading:m,error:g,deleteTodoMutation:P}})})]})})]})})]})}const As=({routes:e=[],onNavigate:t})=>d.jsx(k.Row,{gutter:[16,16],children:e.map((n,r)=>d.jsx(k.Col,{xs:24,md:8,lg:8,children:d.jsx(ae,{children:d.jsx(bn,{icon:n?.icon??"",title:n?.title??"",path:n?.path??"",onClick:t})})},`${r}route001`))});exports.AdmissionEnquiry=Ts;exports.ErpDashboard=tr;exports.MenuSubmenu=Ho;exports.RoutePage=As;exports.TransportRoutes=Ps;
73
+ `}),r.jsx(X,{children:r.jsx("div",{style:{display:"flex",justifyContent:"space-between"},children:r.jsx(ia,{data:{tableRef:E}})})}),r.jsxs("div",{className:"ubk-table-shell",ref:E,style:{marginTop:12},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:16,flexWrap:"wrap",marginBottom:14},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:12,color:"#222"},children:[r.jsx("span",{children:"Show"}),r.jsx(j.Select,{size:"small",value:g.rowsPerPage,onChange:$=>A(1,$),options:[10,25,50,100].map($=>({label:$,value:$})),style:{width:72}}),r.jsx("span",{children:"entries"})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{style:{fontSize:12,color:"#222"},children:"Search:"}),r.jsx(j.Input,{size:"small",allowClear:!0,value:L,onChange:$=>{ae($.target.value),b(q=>({...q,page:1}))},placeholder:"Enter search keyword",prefix:r.jsx(ye.SearchOutlined,{style:{color:"#a3a8cf"}}),style:{width:220,borderWidth:"0 0 1px 0",borderRadius:0,background:"transparent"}})]})]}),r.jsx("div",{className:"print-only",children:r.jsx(la,{})}),Ne]}),a&&r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:16,marginTop:16,flexWrap:"wrap"},children:[r.jsx("div",{style:{fontSize:12,color:"#222"},children:`Showing ${it} to ${lt} of ${Re} entries`}),r.jsx(j.Pagination,{current:g.page,pageSize:g.rowsPerPage,total:Re||0,showSizeChanger:!1,onChange:A})]})]})]})},ua=({token:e,type:t})=>{const[n,o]=v.useState({page:1,rowsPerPage:10}),s="api/branchapi/frontoffice/enquirytablelist",a=s.includes("?")?s.endsWith("?")||s.endsWith("&")?"":"&":"?",i=`${s}${a}page=${n.page}&per_page=${n.rowsPerPage}`,{isLoading:l,data:h,error:d}=ce(e?[i,e]:null,([R,w])=>pe(R,w)),[c,m]=v.useState(!1),T=(R,w)=>{o({page:R,rowsPerPage:parseInt(w)})},x=async R=>{},f=R=>{console.log("dsdsdsdsd",R),m(R)},u=()=>{},p=[{key:"Edit",status:!0},{key:"Delete",status:!0},{key:"View",status:!1}],_=v.useMemo(()=>[{id:"1",name:"Name",selector:"name",sortable:!0,sorter:{compare:(R,w)=>R.name.localeCompare(w.name)}},{id:"2",name:"Phone",selector:"contact",sortable:!0,sorter:(R,w)=>(R.contact||"").localeCompare(w.contact||"")},{id:"6",name:"Description",selector:"description",sortable:!0,sorter:(R,w)=>(R.description||"").localeCompare(w.description||"")},{id:"3",name:"Source",selector:"source_name",sortable:!0,sorter:(R,w)=>(R.source_name||"").localeCompare(w.source_name||"")},{id:"4",name:"Enquiry Date",selector:"date",sortable:!0,sorter:(R,w)=>new Date(R.date)-new Date(w.date)},{id:"5",name:"Next Follow Up Date",selector:"follow_up_date",sortable:!0,sorter:(R,w)=>new Date(R.follow_up_date)-new Date(w.follow_up_date)}]);return r.jsx("div",{children:r.jsx(st,{parentCallback:T,data:{newData:h,columns:_,action:!0,Loading:l,error:d,open:c,viewDetails:u,deleteTodoMutation:x,DrawerUpdate:f,ActionView:p}})})},pa={minWidth:160,height:36,padding:"0 28px",border:"none",borderRadius:999,background:"linear-gradient(90deg, #f59b1c 0%, #ef3e7b 100%)",color:"#fff",fontSize:14,fontWeight:700,textTransform:"uppercase",cursor:"pointer",boxShadow:"none"},Ae=v.forwardRef(({error:e,success:t,disabled:n,style:o,...s},a)=>r.jsx("div",{className:"form-group",style:{marginBottom:0},children:r.jsx("input",{...s,ref:a,disabled:n,style:{...pa,opacity:n?.7:1,cursor:n?"not-allowed":"pointer",...o||{}}})})),Ge=({id:e,funcName:t,disabled:n=!1})=>{const o="Data",[s,a]=v.useState(!1),i=()=>{a(!0),t(e),j.message.success(`${o} deleted successfully!`)},l=()=>{j.message.info(`Deletion of ${o} cancelled`)};return r.jsx(j.Popconfirm,{title:`Delete ${o}?`,description:`Are you sure you want to delete ${o}?`,onConfirm:i,onCancel:l,okText:"Yes",cancelText:"No",disabled:n||s,children:r.jsx(j.Button,{danger:!0,disabled:n,loading:s,icon:r.jsx(ye.DeleteOutlined,{}),size:"small"})})},St=e=>({optimisticData:t=>[...t.data,e],populateCache:(t,n)=>[...n.data,t]}),at=e=>({optimisticData:t=>t.data.filter(n=>n.id!==e),populateCache:(t,n)=>n.data.filter(o=>o.id!==e)}),Zn={height:36,padding:"0 14px",border:"none",background:"transparent",color:"#243a9b",fontSize:14,fontWeight:500,textTransform:"uppercase",boxShadow:"none"};function fa({token:e}){const[t,n]=v.useState({pagination:{current:1,pageSize:10}}),[o,s]=v.useState(!1),[a,i]=v.useState(null),l=`api/branchapi/Transport/routeTableList?page=${t.pagination.current}&per_page=${t.pagination.pageSize}`,h="api/branchapi/Transport/addroute",d="api/branchapi/Transport/editroute",c="api/branchapi/Transport/deleteroute",{isLoading:m,data:T,error:x,mutate:f}=ce(e?[l,e]:null,([C,O])=>pe(C,O)),u=async(C,O)=>{try{await f(Ye(C,O,e),St(O)),te.success("Success! Added new item.",{duration:1e3,icon:"🎉"})}catch{te.error("Failed to add the new item.",{duration:1e3})}},p=C=>{C.preventDefault();const O=new FormData(C.target);u(h,O),C.target.reset()},_=(C,O)=>{n(k=>({...k,pagination:{current:C,pageSize:parseInt(O,10)}}))},R=async C=>{try{await f(Je(c,C,e),at(C)),te.success("Success! Deleted item.",{duration:1e3})}catch{te.error("Failed to delete the item.",{duration:1e3})}},w=C=>{i(C),s(!0)},P=async C=>{try{await wt(d,C,e),await f(),te.success("Success! Updated item.",{duration:1e3,icon:"🚀"}),s(!1),i(null)}catch{te.error("Failed to update the item.",{duration:1e3})}},S=async C=>{C.preventDefault();const O=new FormData(C.target);O.append("id",a?.id),P(O)},ne=[{title:"Route Title",dataIndex:"route_title",key:"route_title",sorter:{compare:(C,O)=>C.name.localeCompare(O.route_title)}},{title:"Fare (Monthly)",dataIndex:"fare",key:"fare",sorter:{compare:(C,O)=>C.fare-O.fare}},{title:"Note",dataIndex:"note",key:"note",sorter:{compare:(C,O)=>C.note.localeCompare(O.note)}},{title:"Action",key:"action",render:(C,O)=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx(j.Button,{type:"text",size:"small",icon:r.jsx(ye.EditOutlined,{}),onClick:()=>w(O),style:{padding:2}}),r.jsx(Ge,{id:O?.id,funcName:R})]})}],oe=a?.route_title?`Edit ${a.route_title}`:"Edit Route";return r.jsxs("div",{children:[r.jsx(j.Drawer,{open:o,title:oe,placement:"right",width:420,onClose:()=>{s(!1),i(null)},children:r.jsx("form",{onSubmit:S,children:r.jsxs("div",{style:{display:"grid",gap:20},children:[r.jsx(le,{type:"text",name:"title",label:"Title",defaultValue:a?.route_title||"",required:"required"}),r.jsx(le,{type:"number",name:"fare",label:"Fare (Monthly)",defaultValue:a?.fare||"",required:"required"}),r.jsx(le,{type:"text",name:"note",label:"Note",defaultValue:a?.note||""}),r.jsx("div",{style:{display:"none"},children:r.jsx(le,{type:"text",name:"no_of_vehicle",label:"Note"})}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r.jsx(Ae,{type:"submit",value:"Update",color:"primary"}),r.jsx(j.Button,{type:"text",onClick:()=>{s(!1),i(null)},style:Zn,children:"Cancel"})]})]})})}),r.jsx(te.Toaster,{toastOptions:{position:"top-center"}}),r.jsx(X,{pt:5,pb:1,children:r.jsxs("div",{children:[r.jsx("div",{children:r.jsxs("div",{children:[r.jsx(X,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Add Route"})}),r.jsx(X,{px:3,pb:2,children:r.jsx("form",{onSubmit:p,children:r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:20,alignItems:"end"},children:[r.jsx(le,{type:"text",name:"title",label:"Title",placeholder:"Mumbai to Delhi",required:"required"}),r.jsx(le,{type:"number",name:"fare",label:"Fare (Monthly)",required:"required"}),r.jsx(le,{type:"text",name:"note",label:"Note"}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r.jsx(Ae,{type:"submit",value:"Save",color:"primary"}),r.jsx(j.Button,{type:"text",htmlType:"reset",style:Zn,children:"Cancel"})]})]})})})]})}),r.jsx("div",{style:{marginTop:24},children:r.jsxs("div",{children:[r.jsx(X,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Route List"})}),r.jsx(X,{children:r.jsx(st,{parentCallback:_,data:{newData:T,columns:ne,columnstype:"antd",action:!1,Loading:m,error:x,deleteTodoMutation:R}})})]})})]})})]})}const er={height:36,padding:"0 14px",border:"none",background:"transparent",color:"#243a9b",fontSize:14,fontWeight:500,textTransform:"uppercase",boxShadow:"none"};function ha({token:e}){const[t,n]=v.useState({page:1,rowsPerPage:10}),[o,s]=v.useState(!1),[a,i]=v.useState(null),l=`api/branchapi/Transport/vehiclesTableList?page=${t.page}&per_page=${t.rowsPerPage}`,h="api/branchapi/Transport/addvehicles",d="api/branchapi/Transport/editvehicle",c="api/branchapi/Transport/deletevehicle",{isLoading:m,data:T,error:x,mutate:f}=ce(e?[l,e]:null,([C,O])=>pe(C,O)),u=async(C,O)=>{try{await f(Ye(C,O,e),St(O)),te.success("Success! Added new item.",{duration:1e3,icon:"🎉"})}catch{te.error("Failed to add the new item.",{duration:1e3})}},p=C=>{C.preventDefault();const O=new FormData(C.target);u(h,O),C.target.reset()},_=async C=>{try{await f(Je(c,C,e),at(C)),te.success("Success! Deleted item.",{duration:1e3})}catch{te.error("Failed to delete the item.",{duration:1e3})}},R=C=>{i(C),s(!0)},w=async C=>{try{await wt(d,C,e),await f(),te.success("Success! Updated item.",{duration:1e3,icon:"🚀"}),s(!1),i(null)}catch{te.error("Failed to update the item.",{duration:1e3})}},P=async C=>{C.preventDefault();const O=new FormData(C.target);O.append("id",a?.id),w(O)},S=(C,O)=>{n({page:C,rowsPerPage:parseInt(O,10)})},ne=[{title:"Vehicle Number",dataIndex:"vehicle_no",key:"vehicle_no",sorter:{compare:(C,O)=>C.vehicle_no.localeCompare(O.vehicle_no)}},{title:"Vehicle Model",dataIndex:"vehicle_model",key:"vehicle_model",sorter:{compare:(C,O)=>C.vehicle_model.localeCompare(O.vehicle_model)}},{title:"Max Seating Capacity",dataIndex:"seating_capacity",key:"seating_capacity",sorter:{compare:(C,O)=>C.seating_capacity-O.seating_capacity}},{title:"Manufacture Year",dataIndex:"manufacture_year",key:"manufacture_year",sorter:{compare:(C,O)=>C.manufacture_year-O.manufacture_year}},{title:"Gps Url",key:"gps_url",sorter:{compare:(C,O)=>C.gps_url.localeCompare(O.gps_url)},render:(C,O)=>r.jsx("span",{title:O?.gps_url??"",style:{display:"inline-block",maxWidth:220,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:O?.gps_url})},{title:"Note",dataIndex:"note",key:"note",sorter:{compare:(C,O)=>C.note.localeCompare(O.note)}},{title:"Action",key:"action",render:(C,O)=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx(j.Button,{type:"text",size:"small",icon:r.jsx(ye.EditOutlined,{}),onClick:()=>R(O),style:{padding:2}}),r.jsx(Ge,{id:O?.id,funcName:_})]})}],oe=a?.vehicle_no?`Edit ${a.vehicle_no}`:"Edit Vehicle";return r.jsxs("div",{children:[r.jsx(j.Drawer,{open:o,title:oe,placement:"right",width:420,onClose:()=>{s(!1),i(null)},children:r.jsx("form",{onSubmit:P,children:r.jsxs("div",{style:{display:"grid",gap:20},children:[r.jsx(le,{type:"text",name:"number",label:"Vehicle Number",defaultValue:a?.vehicle_no||"",required:"required"}),r.jsx(le,{type:"text",name:"model",label:"Vehicle Model",defaultValue:a?.vehicle_model||""}),r.jsx(le,{type:"number",name:"manufacture_year",label:"Manufacture Year",defaultValue:a?.manufacture_year||""}),r.jsx(le,{type:"number",name:"seating_capacity",label:"Max Seating Capacity",defaultValue:a?.seating_capacity||""}),r.jsx(le,{type:"text",name:"gps_url",label:"Gps Url",defaultValue:a?.gps_url||""}),r.jsx(le,{type:"text",name:"note",label:"Note",defaultValue:a?.note||""}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r.jsx(Ae,{type:"submit",value:"Update",color:"primary"}),r.jsx(j.Button,{type:"text",onClick:()=>{s(!1),i(null)},style:er,children:"Cancel"})]})]})})}),r.jsx(te.Toaster,{toastOptions:{position:"top-center"}}),r.jsx(X,{pt:5,pb:1,children:r.jsxs("div",{children:[r.jsxs("div",{children:[r.jsx(X,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Add Vehicle"})}),r.jsx(X,{px:3,pb:2,children:r.jsx("form",{onSubmit:p,children:r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:20,alignItems:"end"},children:[r.jsx(le,{type:"text",name:"number",label:"Vehicle Number",required:"required"}),r.jsx(le,{type:"text",name:"model",label:"Vehicle Model"}),r.jsx(le,{type:"number",name:"manufacture_year",label:"Manufacture Year"}),r.jsx(le,{type:"number",name:"seating_capacity",label:"Max Seating Capacity"}),r.jsx(le,{type:"text",name:"gps_url",label:"Gps Url"}),r.jsx(le,{type:"text",name:"note",label:"Note"}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r.jsx(Ae,{type:"submit",value:"Save",color:"primary"}),r.jsx(j.Button,{type:"text",htmlType:"reset",style:er,children:"Cancel"})]})]})})})]}),r.jsx("div",{style:{marginTop:24},children:r.jsxs("div",{children:[r.jsx(X,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Vehicle List"})}),r.jsx(X,{children:r.jsx(st,{parentCallback:S,data:{newData:T,columns:ne,columnstype:"antd",action:!1,Loading:m,error:x,deleteTodoMutation:_}})})]})})]})})]})}var ma=$r();const en=kr(ma),Vr=()=>{};class yn extends v.Component{state={value:this.props.value||this.props.defaultValue||""};selectRef=null;setSelectRef=t=>{this.selectRef=t};componentDidUpdate(t){t.value!==this.props.value&&this.setState({value:this.props.value})}onChange=(t,n)=>{this.props.onChange(t,n),this.setState({value:t})};getValue=()=>{const{value:t}=this.state;return t?Array.isArray(t)?t.length?"valid":"":typeof t=="object"?t.value||"":t:""};render(){const{SelectComponent:t,required:n,...o}=this.props;console.log("sdsdsfsdddddddd",{...o});const{isDisabled:s}=this.props,a=!s;return r.jsxs("div",{children:[r.jsx(t,{...o,ref:this.setSelectRef,onChange:this.onChange}),a&&r.jsx("input",{tabIndex:-1,autoComplete:"off",style:{opacity:0,width:"100%",height:0,display:"block"},value:this.getValue(),onChange:Vr,onFocus:()=>this.selectRef.focus(),required:n})]})}}yn.defaultProps={onChange:Vr};yn.protoTypes={selectComponent:en.func.isRequired,onChange:en.func,required:en.bool};const ya={display:"block",marginBottom:6,fontSize:"14px",fontWeight:500,color:"#222"},ga={menuPortal:e=>({...e,zIndex:9999}),control:(e,t)=>({...e,minHeight:40,height:40,fontSize:"14px",border:"none",borderBottom:`1px solid ${t.isFocused?"#222":"#d9d9d9"}`,borderRadius:0,boxShadow:"none",backgroundColor:"transparent",transition:"border-color 0.2s ease","&:hover":{border:"none",borderBottom:`1px solid ${t.isFocused?"#222":"#a8a8a8"}`}}),valueContainer:e=>({...e,height:40,padding:"0 0",display:"flex",alignItems:"center"}),input:e=>({...e,margin:0,padding:0}),indicatorSeparator:()=>({display:"none"}),indicatorsContainer:e=>({...e,height:40}),dropdownIndicator:(e,t)=>({...e,padding:"0 0 0 8px",color:t.isFocused?"#222":"#b5b5b5"}),singleValue:e=>({...e,color:"#222",marginLeft:0}),placeholder:e=>({...e,color:"#9f9f9f",marginLeft:0}),option:(e,t)=>({...e,fontSize:"14px",backgroundColor:t.isFocused?"#f8f8f8":"#fff",color:"#222",cursor:"pointer"})},zr=e=>r.jsx(ur.components.Input,{...e,className:"input-cont",required:!!e?.selectProps?.required,children:e.children}),ba=e=>r.jsx(yn,{...e,SelectComponent:ur,components:{Input:zr},options:e.options}),Se=v.forwardRef(({...e},t)=>r.jsxs("div",{className:"form-group",style:{height:"auto"},children:[e.label&&r.jsx("label",{className:"labelfont",style:ya,children:e?.label}),r.jsx(ba,{components:{Input:zr},menuPortalTarget:document.body,styles:ga,className:"input-cont",...e,ref:t})]})),xa={height:36,padding:"0 14px",border:"none",background:"transparent",color:"#243a9b",fontSize:14,fontWeight:500,textTransform:"uppercase",boxShadow:"none"},tr=({dataIndex:e,title:t,record:n,children:o,isEditable:s,...a})=>r.jsx("td",{...a,children:s?r.jsx("div",{style:{display:"flex",marginLeft:"5%"},children:o}):o});function wa({token:e}){const[t,n]=v.useState(!1),[o,s]=v.useState({pagination:{current:1,pageSize:50}}),[a,i]=v.useState(null),[l,h]=v.useState([]),d="api/branchapi/Transport/getrouteDropdown",c="api/branchapi/Transport/getvehicleDropdown",m="api/branchapi/Transport/getchechkedVehicleData",T="api/branchapi/Transport/assignedVehicleTable",x="api/branchapi/transport/assignvehicle",f="api/branchapi/Transport/deleteassignvehicle",u=a?`${m}?route_id=${a}`:null,{isLoading:p,data:_,mutate:R}=ce(e?[`${T}?page=${o.pagination.current}&per_page=${o.pagination.pageSize}`,e]:null,([b,E])=>pe(b,E)),{data:w}=ce(e&&d?[d,e]:null,([b,E])=>pe(b,E)),{data:P}=ce(e&&c?[c,e]:null,([b,E])=>pe(b,E)),S=e&&u?[u,e]:null,{isLoading:ne,data:oe}=ce(S,([b,E])=>pe(b,E)),{Status:C="Failed",pagination:{total_rows:O=0}={}}=_||{},{data:k=[]}=C==="Success"?_:{},D=v.useMemo(()=>{const b=w?.data??w??[];return Array.isArray(b)?b:[]},[w]),N=v.useMemo(()=>{const b=P?.data??P??[];return(Array.isArray(b)?b:[]).map(A=>{if(A==null)return null;if(typeof A=="string"||typeof A=="number")return{label:String(A),value:A};const M=A.value??A.vehicle_id??A.id??A.vehicleID,G=A.label??A.vehicle_name??A.vehicle_no??A.vehicle_number??A.name??String(M??"");return M==null||G===""?null:{label:String(G),value:M}}).filter(Boolean)},[P]),J=v.useMemo(()=>{const b=oe?.data??oe??[];return(Array.isArray(b)?b:[]).map(A=>A?.value??A?.vehicle_id??A?.id??A).filter(A=>A!=null)},[oe]);v.useEffect(()=>{h(J)},[J,t]);const L=async(b,E,A)=>{try{await R(Ye(b,E,e),St(E)),u&&ce.mutate(S),n(M=>!M),te.success("Success! Added new item.",{duration:1e3,icon:"🎉"})}catch(M){te.error(M?.response?.data?.msg??"Failed to add the new item.",{duration:1e3})}},ae=b=>{b.preventDefault();const E=new FormData;E.append("route_id",a??""),l.length?l.forEach(A=>E.append("vehicle_ids[]",A)):E.append("vehicle_ids[]",""),L(x,E)},V=b=>{s(E=>({...E,pagination:{current:b,pageSize:E.pagination.pageSize}}))},ie=async b=>{try{await R(Je(f,b,e),at(b)),u&&ce.mutate(S),te.success("Success! Deleted item.",{duration:1e3})}catch{te.error("Failed to delete the item.",{duration:1e3})}},re=[{title:"Route",dataIndex:"route_title"},{title:"Vehicle Numbers",render:(b,E,A)=>r.jsx(r.Fragment,{children:E.children.map((M,G,W)=>r.jsx("span",{children:`${M.vehicle_name} ${G+1===W.length?"":","}`},`${G}vehicle001`))})},{title:"Action",render:(b,E,A)=>r.jsx(r.Fragment,{children:r.jsx(Ge,{id:E?.route_id,funcName:ie})})}],B=b=>{const E=["route_id","index"];for(let A=0;A<E.length;A++)if(b[E[A]])return b[E[A]]},g=b=>{const{children:E=[]}=b||{},A=[{title:"Vehicle Name",dataIndex:"vehicle_name",onCell:M=>({isEditable:!0})},{title:"Driver Name",dataIndex:"driver_name",onCell:M=>({isEditable:!0})},{title:"Driver Contact",dataIndex:"driver_contact_number",onCell:M=>({isEditable:!0})},{title:"Driver Licence",dataIndex:"Driver_licence",onCell:M=>({isEditable:!0})},{title:"Start Time",dataIndex:"start_time",onCell:M=>({isEditable:!0})},{title:"Drop Time",dataIndex:"drop_time",onCell:M=>({isEditable:!0})},{title:"Type",dataIndex:"type",onCell:M=>({isEditable:!0})}];return r.jsx("div",{style:{display:"flex",justifyContent:"center"},children:r.jsx("div",{style:{width:"95%",margin:8},children:r.jsx(j.Table,{components:{body:{cell:tr}},expandable:{childrenColumnName:"changed"},bordered:!0,size:"small",columns:A,rowKey:M=>B(M)+"cell01",dataSource:E,pagination:!1})})})};return r.jsxs("div",{children:[r.jsx(te.Toaster,{toastOptions:{position:"top-center"}}),r.jsx(X,{pt:5,pb:1,children:r.jsxs("div",{children:[r.jsxs("div",{children:[r.jsx(X,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Assign Vehicle"})}),r.jsx(X,{px:3,pb:2,children:r.jsx("form",{onSubmit:ae,children:r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(220px, 320px) 1fr auto",gap:20,alignItems:"end"},children:[r.jsx("div",{children:r.jsx(Se,{options:D,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Route",name:"route_id",required:!0,allowSelectAll:!1,onChange:b=>{i(b?.value??null),n(E=>!E)}})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx("label",{className:"labelfont",style:{display:"block",marginBottom:6,fontSize:14,fontWeight:500,color:"#222"},children:"Vehicles"}),r.jsx("div",{style:{borderBottom:"1px solid #d9d9d9",paddingBottom:8,maxHeight:140,overflow:"auto"},children:r.jsx(j.Checkbox.Group,{style:{display:"flex",flexWrap:"wrap",gap:12},options:N,value:l,onChange:b=>h(b),disabled:!a||ne})},`check001${t}`)]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r.jsx(Ae,{type:"submit",value:"Save",color:"primary"}),r.jsx(j.Button,{type:"text",htmlType:"button",onClick:()=>{i(null),h([]),n(b=>!b)},style:xa,children:"Cancel"})]})]})})})]}),r.jsx("div",{style:{marginTop:24},children:r.jsxs("div",{children:[r.jsx(X,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Vehicle List"})}),r.jsx(X,{style:{padding:"10px 16px"},children:r.jsx(j.Table,{components:{body:{cell:tr}},columns:re,bordered:!0,rowKey:b=>B(b),dataSource:Array.isArray(k)?k:[],loading:p,expandable:{expandedRowRender:g,childrenColumnName:"changed"},pagination:{current:o.pagination.current,pageSize:o.pagination.pageSize,total:O,showSizeChanger:!0,onChange:V,onShowSizeChange:(b,E)=>{s(A=>({...A,pagination:{current:1,pageSize:E}}))},showTotal:(b,E)=>`${E[0]}-${E[1]} of ${b} items`}})})]})})]})})]})}const Sa={display:"block",marginBottom:6,fontSize:"14px",fontWeight:500,color:"#222"},va={width:"100%",height:"40px",background:"transparent",border:"none",borderBottom:"1px solid #d9d9d9",borderRadius:0,boxShadow:"none"},_a=(e,t,n)=>t?e>fe(n).endOf("day")||e<fe(t).endOf("day"):!1,Hr=v.forwardRef(function(t,n){const{...o}=t;return r.jsxs("div",{className:"form-group",children:[o.Desplay&&r.jsx("label",{className:`labelfont ${o.classnme?o.classnme:""}`,style:Sa,children:o.Desplay}),r.jsx(j.DatePicker,{...o,style:{...va,...o.style||{}},className:"form-group",disabledDate:s=>_a(s,o.sessionStart||o.minDate?.subtract(1,"day").format("YYYY-MM-DD"),o.sessionEnd||o.maxDate?.format("YYYY-MM-DD")),required:!0,ref:n})]})}),nr={height:36,padding:"0 14px",border:"none",background:"transparent",color:"#243a9b",fontSize:14,fontWeight:500,textTransform:"uppercase",boxShadow:"none"},tn=e=>{const t=e?.data??e??[];return Array.isArray(t)?t:[]},nn=(e,t,n)=>{if(t==null||t==="")return null;const o=e.find(s=>String(s.value)===String(t));return o||(n?{label:String(n),value:t}:{label:String(t),value:t})},ja=()=>{try{return JSON.parse(localStorage.getItem("genrall_settings")||"{}")?.currency_symbol??""}catch{return""}},Ta=e=>{if(e==null||e===""||e==="null"||e==="undefined")return"";if(Array.isArray(e))return e.filter(n=>n!=null&&n!==""&&String(n).toLowerCase()!=="null"&&String(n).toLowerCase()!=="undefined").join(", ");const t=String(e).trim();return!t||t.toLowerCase()==="null"||t.toLowerCase()==="undefined"?"":t};function Ea({token:e,assignmentId:t,studentName:n,onClose:o,onSuccess:s}){const a="api/branchapi/Transport/showRouteAssignStudent",i="api/branchapi/Transport/updateTransportRoutesStudent",l="api/branchapi/Transport/getrouteDropdown",h="api/branchapi/Transport/getvehicleListByRouteIdwithCount",d="api/branchapi/Transport/getStoppageDropdown",c="api/branchapi/Transport/routeShowdata",[m,T]=v.useState(null),[x,f]=v.useState(0),[u,p]=v.useState(0),{data:_,isLoading:R}=ce(e&&t?[`${a}?id=${t}`,e]:null,([F,z])=>pe(F,z)),w=v.useMemo(()=>{if(!_||_?.Status&&_.Status!=="Success")return null;const F=_?.data??_;return Array.isArray(F)?F[0]??null:F},[_]);v.useEffect(()=>{const F=w?.fk_route_id??w?.route_id;F!=null&&T(F)},[w]);const P=e&&m?`${h}?route_id=${m}`:null,S=e&&m?`${c}?id=${m}`:null,ne=e&&m?`${d}?route_id=${m}`:null,{data:oe}=ce(e&&l?[l,e]:null,([F,z])=>pe(F,z)),{data:C,isLoading:O}=ce(P?[P,e]:null,([F,z])=>pe(F,z)),{data:k,isLoading:D}=ce(ne?[ne,e]:null,([F,z])=>pe(F,z)),{data:N}=ce(S?[S,e]:null,([F,z])=>pe(F,z)),J=v.useMemo(()=>tn(oe),[oe]),L=v.useMemo(()=>tn(C),[C]),ae=v.useMemo(()=>tn(k),[k]),V=N?.data?.[0]?.fare??w?.fare??w?.rootCost??w?.rootcost,ie=ja(),re=n||[w?.firstname,w?.lastname].filter(Boolean).join(" ")||"",B=(F,z)=>{switch(z){case"route_id":T(F?.value??null),f(Z=>Z+1),p(Z=>Z+1);break;case"vehicle_id":p(Z=>Z+1);break}},g=async F=>{F.preventDefault();const z=new FormData(F.target);z.append("id",t);try{await wt(i,z,e),te.success("Success! Updated item.",{duration:1e3,icon:"🚀"}),s?.(),o?.()}catch(Z){te.error(Z?.message??"Failed to update the item.",{duration:1e3})}};if(R||!(w&&!R&&(!m||!O&&!D)))return r.jsx("div",{style:{display:"flex",justifyContent:"center",padding:48},children:r.jsx(j.Spin,{})});if(!w)return r.jsxs("div",{style:{padding:"8px 0"},children:[r.jsx("p",{style:{color:"#666",fontSize:14,marginBottom:16},children:"Unable to load assignment details. Please try again."}),r.jsx(j.Button,{type:"text",onClick:o,style:nr,children:"Close"})]});const E=w.fk_route_id??w.route_id,A=nn(J,E,w.route_title),M=nn(L,w.vehicle_id,w.vehicle_name??w.vehicle_no),G=nn(ae,w.stop_id,w.stop_name??w.stoppage_name),W=w.start_date?fe(w.start_date):fe(),Q=Ta(w?.service_push);return r.jsx("form",{onSubmit:g,children:r.jsxs("div",{style:{display:"grid",gap:20},children:[r.jsx(le,{type:"text",name:"title",label:"Student",defaultValue:re,readOnly:!0}),r.jsx("input",{type:"hidden",name:"student_id",value:w.fk_student_id??w.student_id??""}),r.jsx(Se,{options:J,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Route",name:"fk_route_id",required:!0,allowSelectAll:!1,defaultValue:A,onChange:F=>B(F,"route_id")}),r.jsx(Se,{options:L,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Vehicle",name:"vehicle_id",required:!0,allowSelectAll:!1,defaultValue:M,onChange:F=>B(F,"vehicle_id")},`edit-vehicle-${x}`),r.jsx(Se,{options:ae,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Stop",name:"stop_id",required:!0,allowSelectAll:!1,defaultValue:G},`edit-stop-${u}`),r.jsx(le,{type:"text",label:"Route Cost",value:V!=null?`${ie}${V}`:"",readOnly:!0}),r.jsx("input",{type:"hidden",name:"rootCost",value:V??""}),r.jsx(Hr,{defaultValue:W,Desplay:"Start Date",name:"start_date",placement:"bottomRight",format:"YYYY-MM-DD",allowClear:!1}),r.jsx(le,{type:"text",name:"puse_service",label:"Pause Service",defaultValue:Q,placeholder:"e.g. 01, 02, 03"}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:4},children:[r.jsx(Ae,{type:"submit",value:"Update",color:"primary"}),r.jsx(j.Button,{type:"text",onClick:o,style:nr,children:"Cancel"})]})]})},`edit-${t}-${x}`)}const rr={height:36,padding:"0 14px",border:"none",background:"transparent",color:"#243a9b",fontSize:14,fontWeight:500,textTransform:"uppercase",boxShadow:"none"},ht=e=>{const t=e?.data??e??[];return Array.isArray(t)?t:[]},Ca=e=>e||"",Ra=()=>{try{return JSON.parse(localStorage.getItem("genrall_settings")||"{}")?.currency_symbol??""}catch{return""}},Oa=e=>{const t=String(e??"Drawer").trim().toLowerCase().replace(/\s+/g,"");return t==="page"||t==="sendpage"?"page":"drawer"},Da=(e,t)=>{const n=t||"/TransportDashboard/EditAssignStudentTransport?id={id}",o=e?.id??"",s=encodeURIComponent(String(o));if(n.includes("{id}"))return n.replaceAll("{id}",s);if(n.includes(":id"))return n.replace(":id",s);try{const i=new URL(n,"http://localhost");if(i.searchParams.has("id"))return i.searchParams.set("id",String(o)),`${i.pathname}${i.search}${i.hash}`}catch{}const a=n.includes("?")?"&":"?";return`${n}${a}id=${s}`};function Aa({token:e,editType:t,onNavigate:n,editPagePath:o}){const a=Oa(t)==="drawer",i="api/branchapi/academy/classdropdownlist",l="api/branchapi/academy/sectionoftheClass",h="api/branchapi/Transport/routeStudentList",d="api/branchapi/Transport/getrouteDropdown",c="api/branchapi/Transport/getvehicleListByRouteIdwithCount",m="api/branchapi/Transport/getStoppageDropdown",T="api/branchapi/Transport/routeShowdata",x="api/branchapi/Transport/assignTransportRoutesStudent",f="api/branchapi/transport/removeStudentTransport",[u,p]=v.useState(null),[_,R]=v.useState(!1),[w,P]=v.useState(!1),[S,ne]=v.useState(null),[oe,C]=v.useState(null),[O,k]=v.useState(null),[D,N]=v.useState(null),[J,L]=v.useState(!1),[ae,V]=v.useState(!1),[ie,re]=v.useState({page:1,rowsPerPage:50}),[B,g]=v.useState(null),[b,E]=v.useState(!1),[A,M]=v.useState(null),[G,W]=v.useState(null),Q=(H,ee)=>{switch(ee){case"class_id":g(`${l}?class_id=${H.value}`),R(Me=>!Me);break;case"route_id":C(`${c}?route_id=${H.value}`),k(`${T}?id=${H.value}`),W(H.value),L(Me=>!Me);break;case"vehicle_id":N(`${m}?route_id=${G}`),V(Me=>!Me);break}},F=H=>{if(a){ne(H),P(!0);return}const ee=Da(H,o);if(typeof n=="function"){n(ee,H);return}typeof window<"u"&&ee&&window.location.assign(ee)},z=()=>{P(!1),ne(null)},Z=S?`Edit — ${S.firstname??""} ${S.lastname??""}`.trim():"Edit Student Transport",{data:he}=ce(e&&i?[i,e]:null,([H,ee])=>pe(H,ee)),{data:U}=ce(e&&B?[B,e]:null,([H,ee])=>pe(H,ee)),{data:ge}=ce(e&&oe?[oe,e]:null,([H,ee])=>pe(H,ee)),{data:je}=ce(e&&D?[D,e]:null,([H,ee])=>pe(H,ee)),{data:Le}=ce(e&&O?[O,e]:null,([H,ee])=>pe(H,ee)),{data:Xe}=ce(e&&d?[d,e]:null,([H,ee])=>pe(H,ee)),Qe=e&&u?`${u}&page=${ie.page}&per_page=${ie.rowsPerPage}`:null,{isLoading:$e,error:Ie,data:qe,mutate:Re}=ce(Qe?[Qe,e]:null,([H,ee])=>pe(H,ee)),Oe=v.useMemo(()=>ht(he),[he]),Be=v.useMemo(()=>ht(U),[U]),Ze=v.useMemo(()=>ht(ge),[ge]),it=v.useMemo(()=>ht(je),[je]),lt=v.useMemo(()=>ht(Xe),[Xe]),Ne=Le?.data?.[0]?.fare,$=async H=>{try{await Re(Je(f,H,e),at(H)),te.success("Success! Deleted item.",{duration:1e3})}catch{te.error("Failed to delete the item.",{duration:1e3})}},q=[{title:"Route Status",key:"route_status",render:(H,ee)=>ee.fk_route_id?r.jsx("span",{children:ee.route_title}):r.jsx("span",{children:"Not Assigned"})},{title:"Vehicle Assign Date",dataIndex:"start_date",key:"start_date",render:(H,ee)=>Ca(ee.start_date)},{title:"Admission No",dataIndex:"admission_no",key:"admission_no"},{title:"Roll No",dataIndex:"roll_no",key:"roll_no"},{title:"Name",key:"name",render:(H,ee)=>`${ee.firstname} ${ee.lastname}`},{title:"Class",dataIndex:"class",key:"class"},{title:"Section",dataIndex:"section",key:"section"},{title:"Mobileno",dataIndex:"mobileno",key:"mobileno"},{title:"Action",key:"action",render:(H,ee)=>r.jsx("div",{style:{display:"flex",alignItems:"center",gap:8},children:ee.fk_route_id?r.jsxs(r.Fragment,{children:[r.jsx(Ge,{id:ee?.id,funcName:$}),r.jsx(j.Button,{type:"text",size:"small",icon:r.jsx(ye.EditOutlined,{}),onClick:()=>F(ee),style:{padding:2}})]}):r.jsx(j.Button,{type:"text",size:"small",icon:r.jsx(ye.PlusOutlined,{}),onClick:()=>be(ee.student_id),style:{padding:2}})})}],se=async(H,ee)=>{try{await Re(Ye(H,ee,e),St(ee)),te.success("Success! Added new item.",{duration:1e3,icon:"🎉"}),E(!1),ct()}catch{te.error("Failed to add the new item.",{duration:1e3})}},we=H=>{H.preventDefault();const ee=H?.target?.class_id?.value,Me=H?.target?.section_id?.value;p(`${h}?cID=${ee}&sID=${Me}`),re(I=>({...I,page:1}))},Ue=(H,ee)=>{re({page:H,rowsPerPage:parseInt(ee,10)})},be=H=>{M(H),E(!0)},Bt=H=>{H.preventDefault();const ee=new FormData(H.target);se(x,ee)},ct=()=>{E(!1),C(null),k(null),N(null),W(null)},Ft=Ra();return r.jsxs("div",{children:[a&&r.jsx(j.Drawer,{open:w,title:Z,placement:"right",width:420,destroyOnClose:!0,onClose:z,children:S?.id&&r.jsx(Ea,{token:e,assignmentId:S.id,studentName:`${S.firstname??""} ${S.lastname??""}`.trim(),onClose:z,onSuccess:()=>Re()})}),r.jsx(j.Modal,{open:b,title:"Assign Student to Transport",onCancel:ct,footer:null,width:640,destroyOnClose:!0,children:r.jsx("form",{onSubmit:Bt,children:r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:20},children:[r.jsx(Se,{options:lt,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Route",name:"fk_route_id",required:!0,allowSelectAll:!1,onChange:H=>Q(H,"route_id")}),r.jsx(Se,{options:Ze,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Vehicle",name:"vehicle_id",required:!0,allowSelectAll:!1,onChange:H=>Q(H,"vehicle_id")},`vehicle001${J}`),r.jsx(Se,{options:it,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Stop",name:"stop_id",required:!0,allowSelectAll:!1},`stop001${ae}`),r.jsx(Hr,{defaultValue:fe(),Desplay:"Start Date",name:"start_date",placement:"bottomRight",format:"YYYY-MM-DD"}),r.jsx("input",{type:"hidden",value:A??"",name:"student_id"}),r.jsx(le,{className:"noDisplay",type:"text",name:"rootCost",value:Ne??""}),r.jsxs("div",{style:{gridColumn:"1 / -1",display:"flex",alignItems:"center",gap:12},children:[r.jsx(Ae,{type:"submit",value:Ne!=null?`${Ft}${Ne} — Assign`:"Assign",color:"primary"}),r.jsx(j.Button,{type:"text",onClick:ct,style:rr,children:"Cancel"})]})]})})}),r.jsx(te.Toaster,{toastOptions:{position:"top-center"}}),r.jsx(X,{pt:5,pb:1,children:r.jsxs("div",{children:[r.jsxs("div",{children:[r.jsx(X,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Search Students"})}),r.jsx(X,{px:3,pb:2,children:r.jsx("form",{onSubmit:we,children:r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:20,alignItems:"end"},children:[r.jsx(Se,{options:Oe,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Class",onChange:H=>Q(H,"class_id"),name:"class_id",required:!0,allowSelectAll:!1}),r.jsx(Se,{options:Be,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Section",allowSelectAll:!1,name:"section_id",required:!0},`section1${_}`),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r.jsx(Ae,{type:"submit",value:"Search",color:"primary"}),r.jsx(j.Button,{type:"text",htmlType:"button",onClick:()=>{p(null),g(null),R(H=>!H)},style:rr,children:"Cancel"})]})]})})})]}),u&&r.jsx("div",{style:{marginTop:24},children:r.jsxs("div",{children:[r.jsx(X,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Student List"})}),r.jsx(X,{children:r.jsx(st,{parentCallback:Ue,data:{newData:qe,columns:q,columnstype:"antd",action:!1,Loading:$e,error:Ie,deleteTodoMutation:$,pageController:ie}})})]})})]})})]})}const or={height:36,padding:"0 14px",border:"none",background:"transparent",color:"#243a9b",fontSize:14,fontWeight:500,textTransform:"uppercase",boxShadow:"none"},Tt={display:"block",marginBottom:6,fontSize:"14px",fontWeight:500,color:"#222"};function Pa({token:e}){const[t,n]=v.useState({page:1,rowsPerPage:50}),[o,s]=v.useState(!1),[a,i]=v.useState(null),[l,h]=v.useState(""),[d,c]=v.useState(""),[m,T]=v.useState(""),[x,f]=v.useState(!1),u=`api/branchapi/Transport/getdriverTable?page=${t.page}&per_page=${t.rowsPerPage}`,p="api/branchapi/Transport/add_driver",_="api/branchapi/Transport/edit_driver",R="api/branchapi/Transport/deletedriver",w="api/branchapi/staff/uploadDocuments",P=v.useMemo(()=>String(w).startsWith("http")?w:`${cn()??""}${String(w).replace(/^\/+/,"")}`,[w]),S=cn()??"",{isLoading:ne,data:oe,error:C,mutate:O}=ce(e?[u,e]:null,([B,g])=>pe(B,g)),k=async(B,g)=>{try{await Ye(B,g,e),await O(),te.success("Success! Added new item.",{duration:1e3,icon:"🎉"}),h("")}catch(b){te.error(b?.response?.data?.msg??"Failed to add the new item.",{duration:1e3})}},D=B=>{B.preventDefault();const g=new FormData(B.target);k(p,g),B.target.reset()},N=async B=>{try{await O(Je(R,B,e),at(B)),te.success("Success! Deleted item.",{duration:1e3})}catch{te.error("Failed to delete the item.",{duration:1e3})}},J=B=>{i(B),h(B?.image??""),s(!0)},L=async B=>{try{await wt(_,B,e),await O(),te.success("Success! Updated item.",{duration:1e3,icon:"🚀"}),s(!1),i(null),h("")}catch(g){te.error(g?.response?.data?.msg??"Failed to update the item.",{duration:1e3})}},ae=B=>{B.preventDefault();const g=new FormData(B.target);g.append("id",a?.id??""),L(g)},V=(B,g)=>{n({page:B,rowsPerPage:parseInt(g,10)})},ie=[{title:"Driver Name",dataIndex:"name",key:"name",sorter:{compare:(B,g)=>String(B?.name??"").localeCompare(String(g?.name??""))}},{title:"Driver Licence",dataIndex:"Driver_licence",key:"Driver_licence",sorter:{compare:(B,g)=>String(B?.Driver_licence??"").localeCompare(String(g?.Driver_licence??""))}},{title:"Contact",dataIndex:"contact_number",key:"contact_number",sorter:{compare:(B,g)=>Number(B?.contact_number??0)-Number(g?.contact_number??0)}},{title:"Address",dataIndex:"address",key:"address",sorter:{compare:(B,g)=>String(B?.address??"").localeCompare(String(g?.address??""))}},{title:"Image",key:"image",width:100,render:(B,g)=>{const b=g?.image?`${S}staff/document/${g.image}`:"";return b?r.jsx("div",{style:{display:"flex",justifyContent:"center"},children:r.jsx(j.Image,{width:80,src:b,preview:{visible:!1,onVisibleChange:()=>{f(!0),c(b),T(g?.name??"Driver")}}})}):null}},{title:"Action",key:"action",render:(B,g)=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx(j.Button,{type:"text",size:"small",icon:r.jsx(ye.EditOutlined,{}),onClick:()=>J(g),style:{padding:2}}),r.jsx(Ge,{id:g?.id,funcName:N})]})}],re=a?.name?`Edit ${a.name}`:"Edit Driver";return r.jsxs("div",{children:[r.jsx(j.Drawer,{open:o,title:re,placement:"right",width:420,destroyOnClose:!0,onClose:()=>{s(!1),i(null),h("")},children:r.jsx("form",{onSubmit:ae,children:r.jsxs("div",{style:{display:"grid",gap:20},children:[r.jsx(le,{type:"text",name:"name",label:"Driver Name",defaultValue:a?.name??"",required:"required"}),r.jsx(le,{type:"text",name:"Driver_licence",label:"Driver Licence",defaultValue:a?.Driver_licence??"",required:"required"}),r.jsx(le,{type:"number",name:"contact_number",label:"Driver Contact",defaultValue:a?.contact_number??"",required:"required"}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx("label",{className:"labelfont",style:Tt,children:"Address"}),r.jsx(j.Input.TextArea,{name:"address",defaultValue:a?.address??"",rows:2,style:{width:"100%",border:0,borderBottom:"1px solid #d9d9d9",borderRadius:0,boxShadow:"none",paddingLeft:0,paddingRight:0}})]}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx("label",{className:"labelfont",style:Tt,children:"Image"}),r.jsx(j.Upload,{maxCount:1,action:P,headers:e?{Authorization:e}:void 0,onChange:B=>{if(B?.file?.status!=="done")return;const g=B?.file?.response,b=g?.data??g?.filename??g?.file??g?.path??"";b&&h(String(b))},children:r.jsx(j.Button,{icon:r.jsx(ye.UploadOutlined,{}),disabled:!P,children:"Upload"})}),r.jsx("input",{type:"hidden",name:"file",value:l})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r.jsx(Ae,{type:"submit",value:"Update",color:"primary"}),r.jsx(j.Button,{type:"text",onClick:()=>{s(!1),i(null),h("")},style:or,children:"Cancel"})]})]})})}),r.jsx(j.Modal,{zIndex:9999,open:x,title:m,footer:null,onCancel:()=>f(!1),children:r.jsx("img",{alt:"preview",style:{width:"100%"},src:d})}),r.jsx(te.Toaster,{toastOptions:{position:"top-center"}}),r.jsx(X,{pt:5,pb:1,children:r.jsxs("div",{children:[r.jsxs("div",{children:[r.jsx(X,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Add Driver"})}),r.jsx(X,{px:3,pb:2,children:r.jsx("form",{onSubmit:D,children:r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:20,alignItems:"end"},children:[r.jsx(le,{type:"text",name:"name",label:"Driver Name",required:"required"}),r.jsx(le,{type:"text",name:"Driver_licence",label:"Driver Licence",required:"required"}),r.jsx(le,{type:"number",name:"contact_number",label:"Driver Contact",required:"required"}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx("label",{className:"labelfont",style:Tt,children:"Address"}),r.jsx(j.Input.TextArea,{name:"address",rows:2,style:{width:"100%",border:0,borderBottom:"1px solid #d9d9d9",borderRadius:0,boxShadow:"none",paddingLeft:0,paddingRight:0}})]}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx("label",{className:"labelfont",style:Tt,children:"Image"}),r.jsx(j.Upload,{maxCount:1,action:P,headers:e?{Authorization:e}:void 0,onChange:B=>{if(B?.file?.status!=="done")return;const g=B?.file?.response,b=g?.data??g?.filename??g?.file??g?.path??"";b&&h(String(b))},children:r.jsx(j.Button,{icon:r.jsx(ye.UploadOutlined,{}),disabled:!P,children:"Upload"})}),r.jsx("input",{type:"hidden",name:"file",value:l})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r.jsx(Ae,{type:"submit",value:"Save",color:"primary"}),r.jsx(j.Button,{type:"text",htmlType:"reset",onClick:()=>h(""),style:or,children:"Cancel"})]})]})})})]}),r.jsx("div",{style:{marginTop:24},children:r.jsxs("div",{children:[r.jsx(X,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Driver List"})}),r.jsx(X,{children:r.jsx(st,{parentCallback:V,data:{newData:oe,columns:ie,columnstype:"antd",action:!1,Loading:ne,error:C,deleteTodoMutation:N}})})]})})]})})]})}const sr={height:36,padding:"0 14px",border:"none",background:"transparent",color:"#243a9b",fontSize:14,fontWeight:500,textTransform:"uppercase",boxShadow:"none"},nt={display:"block",marginBottom:6,fontSize:"14px",fontWeight:500,color:"#222"},Et={width:"100%",height:40,background:"transparent",border:"none",borderBottom:"1px solid #d9d9d9",borderRadius:0,boxShadow:"none"},ar=[{label:"Pick",value:"pick"},{label:"Drop",value:"drop"}],Ct=e=>{const t=e?.data??e??[];return Array.isArray(t)?t:[]};function Ia({token:e}){const[t,n]=v.useState({page:1,rowsPerPage:50}),[o,s]=v.useState(!1),[a,i]=v.useState(!1),[l,h]=v.useState(null),[d,c]=v.useState(null),[m,T]=v.useState(null),[x,f]=v.useState(null),[u,p]=v.useState(fe()),[_,R]=v.useState(fe()),[w,P]=v.useState("pick"),[S,ne]=v.useState(!1),[oe,C]=v.useState(null),[O,k]=v.useState(null),[D,N]=v.useState(!1),[J,L]=v.useState(null),[ae,V]=v.useState(null),[ie,re]=v.useState(null),[B,g]=v.useState(null),[b,E]=v.useState(fe()),[A,M]=v.useState(fe()),[G,W]=v.useState("pick"),Q=`api/branchapi/Transport/assignRouteTimeList?page=${t.page}&per_page=${t.rowsPerPage}`,F="api/branchapi/Transport/assignRouteTime",z="api/branchapi/Transport/editAssignRouteTime",Z="api/branchapi/Transport/deleteAssignRouteTime",he="api/branchapi/Transport/driverDropdown",U="api/branchapi/transport/routeTimetableShowdata",ge="api/branchapi/Transport/getrouteDropdown",je="api/branchapi/Transport/getvehicleDropdown",{isLoading:Le,data:Xe,error:Qe,mutate:$e}=ce(e?[Q,e]:null,([I,K])=>pe(I,K)),{data:Ie}=ce(e&&ge?[ge,e]:null,([I,K])=>pe(I,K)),{data:qe}=ce(e&&he?[he,e]:null,([I,K])=>pe(I,K)),Re=v.useMemo(()=>l?`${je}?route_id=${l}`:null,[l,je]),{data:Oe}=ce(e&&Re?[Re,e]:null,([I,K])=>pe(I,K)),Be=v.useMemo(()=>Ct(Ie),[Ie]),Ze=v.useMemo(()=>Ct(qe),[qe]),it=v.useMemo(()=>Ct(Oe),[Oe]),lt=(I,K)=>{n({page:I,rowsPerPage:parseInt(K,10)})},Ne=async I=>{I.preventDefault();const K=new FormData(I.target);K.set("route_id",d?.value??l??""),K.set("driver_id",m?.value??""),K.set("vehicle_id",x?.value??""),K.set("start_time",u?u.format("h:mm a"):""),K.set("drop_time",_?_.format("h:mm a"):""),K.set("type",w);try{await Ye(F,K,e),await $e(),te.success("Success! Added new item.",{duration:1e3,icon:"🎉"}),I.target.reset(),h(null),c(null),T(null),f(null),i(Fe=>!Fe),p(fe()),R(fe()),P("pick"),s(Fe=>!Fe)}catch(Fe){te.error(Fe?.response?.data?.msg??"Failed to add the new item.",{duration:1e3})}},$=async I=>{try{await Je(Z,I,e),await $e(),te.success("Success! Deleted item.",{duration:1e3})}catch(K){te.error(K?.response?.data?.msg??"Failed to delete the item.",{duration:1e3})}},q=I=>{C(I),ne(!0);const K=I?.id??I?.route_time_id??I?.routeId??null;k(K);const Fe=I?.route_id??I?.routeId??I?.fk_route_id;L(Fe??null),V(Ie.filter(Ve=>Ve.value===I.route_id)),re(qe.filter(Ve=>Ve.value===I.driver_id)),g(Oe?.filter(Ve=>Ve.value===I?.vehicle_id)),N(Ve=>!Ve),E(I?.start_time?fe(I.start_time,["h:mm a","HH:mm"]):fe()),M(I?.drop_time?fe(I.drop_time,["h:mm a","HH:mm"]):fe()),W(I?.type??"pick")},se=v.useMemo(()=>{if(!O)return null;const I=String(U).includes("?")?"&":"?";return`${U}${I}id=${encodeURIComponent(String(O))}`},[O,U]),{data:we,isLoading:Ue}=ce(e&&se?[se,e]:null,([I,K])=>pe(I,K)),be=v.useMemo(()=>{const I=we?.data??we;return Array.isArray(I)?I[0]??null:Array.isArray(I?.data)?I.data[0]??null:I??null},[we]);v.useEffect(()=>{if(!be)return;h(be?.route_id);const I=be?.route_id??be?.fk_route_id??be?.routeId;L(I??null),V(Ie.filter(K=>K.value===be.route_id)),re(qe.filter(K=>K.value===be?.driver_id)),g(Oe?.filter(K=>K.value===be?.vehicle_id)),E(be?.start_time?fe(be.start_time,["h:mm a","HH:mm"]):fe()),M(be?.drop_time?fe(be.drop_time,["h:mm a","HH:mm"]):fe()),W(be?.type??"pick"),N(K=>!K)},[be]);const Bt=async I=>{if(I.preventDefault(),!O)return;const K=new FormData(I.target);K.set("id",String(O)),K.set("route_id",ae?.value??J??""),K.set("driver_id",ie?.value??""),K.set("vehicle_id",B?.value??""),K.set("start_time",b?b.format("h:mm a"):""),K.set("drop_time",A?A.format("h:mm a"):""),K.set("type",G);try{await wt(z,K,e),await $e(),te.success("Success! Updated item.",{duration:1e3,icon:"🚀"}),ne(!1),C(null)}catch(Fe){te.error(Fe?.response?.data?.msg??"Failed to update the item.",{duration:1e3})}},ct=[{title:"Route Name",dataIndex:"route_title",key:"route_title"},{title:"Driver Name",dataIndex:"driver_name",key:"driver_name"},{title:"Vehicle Name",dataIndex:"vehicle_name",key:"vehicle_name"},{title:"Start Time",dataIndex:"start_time",key:"start_time"},{title:"End Time",dataIndex:"drop_time",key:"drop_time"},{title:"Type",dataIndex:"type",key:"type"},{title:"Action",key:"action",render:(I,K)=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx(j.Button,{type:"text",size:"small",icon:r.jsx(ye.EditOutlined,{}),onClick:()=>q(K),style:{padding:2}}),r.jsx(Ge,{id:K?.id??K?.routeId??K?.route_time_id,funcName:$})]})}],Ft=oe?.route_title?`Edit ${oe.route_title}`:"Edit Route Time",H=v.useMemo(()=>J?`${je}?route_id=${J}`:null,[J,je]),{data:ee}=ce(e&&H?[H,e]:null,([I,K])=>pe(I,K)),Me=v.useMemo(()=>Ct(ee),[ee]);return r.jsxs("div",{children:[r.jsx(j.Drawer,{open:S,title:Ft,placement:"right",width:420,destroyOnClose:!0,onClose:()=>{ne(!1),C(null),k(null),L(null),V(null),re(null),g(null)},children:r.jsx("form",{onSubmit:Bt,children:r.jsxs("div",{style:{display:"grid",gap:20,opacity:Ue?.6:1},children:[r.jsx(Se,{options:Be,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Route",name:"route_id",required:!0,allowSelectAll:!1,value:ae,onChange:I=>{L(I?.value??null),V(I??null),g(null),N(K=>!K)}}),r.jsx(Se,{options:Ze,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Driver",name:"driver_id",required:!0,allowSelectAll:!1,value:ie,onChange:I=>re(I??null)}),r.jsx(Se,{options:Me,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Vehicle",name:"vehicle_id",required:!0,allowSelectAll:!1,value:B,onChange:I=>g(I??null)},`edit-vehicle-${D}`),r.jsxs("div",{style:{width:"100%"},children:[r.jsx("label",{className:"labelfont",style:nt,children:"Start Time"}),r.jsx(j.TimePicker,{value:b,onChange:I=>E(I),use12Hours:!0,format:"h:mm a",allowClear:!1,style:Et})]}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx("label",{className:"labelfont",style:nt,children:"Drop Time"}),r.jsx(j.TimePicker,{value:A,onChange:I=>M(I),use12Hours:!0,format:"h:mm a",allowClear:!1,style:Et})]}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx("label",{className:"labelfont",style:nt,children:"Type"}),r.jsx("div",{style:{borderBottom:"1px solid #d9d9d9",paddingBottom:6},children:r.jsx(j.Radio.Group,{options:ar,optionType:"button",buttonStyle:"solid",value:G,onChange:I=>W(I.target.value)})})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r.jsx(Ae,{type:"submit",value:"Update",color:"primary"}),r.jsx(j.Button,{type:"text",onClick:()=>{ne(!1),C(null)},style:sr,children:"Cancel"})]})]})})}),r.jsx(te.Toaster,{toastOptions:{position:"top-center"}}),r.jsx(X,{pt:5,pb:1,children:r.jsxs("div",{children:[r.jsxs("div",{children:[r.jsx(X,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Route Time Table"})}),r.jsx(X,{px:3,pb:2,children:r.jsx("form",{onSubmit:Ne,children:r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:20,alignItems:"end"},children:[r.jsx(Se,{options:Be,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Route",name:"route_id",value:d,onChange:I=>{h(I?.value??null),c(I??null),f(null),i(K=>!K)},allowSelectAll:!1,required:!0}),r.jsx(Se,{options:Ze,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Driver",name:"driver_id",value:m,onChange:I=>T(I??null),allowSelectAll:!1,required:!0}),r.jsx(Se,{options:it,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Vehicle",name:"vehicle_id",value:x,onChange:I=>f(I??null),allowSelectAll:!1,required:!0},`vehicle-${a}`),r.jsxs("div",{style:{width:"100%"},children:[r.jsx("label",{className:"labelfont",style:nt,children:"Start Time"}),r.jsx(j.TimePicker,{value:u,onChange:I=>p(I),use12Hours:!0,format:"h:mm a",allowClear:!1,style:Et})]}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx("label",{className:"labelfont",style:nt,children:"Drop Time"}),r.jsx(j.TimePicker,{value:_,onChange:I=>R(I),use12Hours:!0,format:"h:mm a",allowClear:!1,style:Et})]}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx("label",{className:"labelfont",style:nt,children:"Type"}),r.jsx("div",{style:{borderBottom:"1px solid #d9d9d9",paddingBottom:6},children:r.jsx(j.Radio.Group,{options:ar,optionType:"button",buttonStyle:"solid",value:w,onChange:I=>P(I.target.value)})})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r.jsx(Ae,{type:"submit",value:"Add",color:"primary"}),r.jsx(j.Button,{type:"text",htmlType:"reset",onClick:()=>{h(null),c(null),T(null),f(null),i(I=>!I),p(fe()),R(fe()),P("pick"),s(I=>!I)},style:sr,children:"Cancel"})]})]})},`form-${o}`)})]}),r.jsx("div",{style:{marginTop:24},children:r.jsxs("div",{children:[r.jsx(X,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Route Time List"})}),r.jsx(X,{children:r.jsx(st,{parentCallback:lt,data:{newData:Xe,columns:ct,columnstype:"antd",action:!1,Loading:Le,error:Qe,deleteTodoMutation:$}})})]})})]})})]})}const Na={height:36,padding:"0 14px",border:"none",background:"transparent",color:"#243a9b",fontSize:14,fontWeight:500,textTransform:"uppercase",boxShadow:"none"},ir={display:"block",marginBottom:6,fontSize:"14px",fontWeight:500,color:"#222"},lr={width:"100%",height:40,background:"transparent",border:"none",borderBottom:"1px solid #d9d9d9",borderRadius:0,boxShadow:"none"},cr=({dataIndex:e,title:t,record:n,children:o,isEditable:s,...a})=>r.jsx("td",{...a,children:s?r.jsx("div",{style:{display:"flex",marginLeft:"5%"},children:o}):o});let dr=2;function ka({token:e}){const[t,n]=v.useState([]),[o,s]=v.useState(null),[a,i]=v.useState({pagination:{current:1,pageSize:50}}),{isLoading:l,data:h,mutate:d}=ce(e?[`api/branchapi/transport/getrouteStoppageData?page=${a.pagination.current}&per_page=${a.pagination.pageSize}`,e]:null,([k,D])=>pe(k,D)),{Status:c="Failed",pagination:{total_rows:m=0}={}}=h||{},{data:T=[]}=c==="Success"?h:{},{data:x}=ce(e?["api/branchapi/Transport/getrouteDropdown",e]:null,([k,D])=>pe(k,D)),f=v.useMemo(()=>{const k=x?.data??x??[];return Array.isArray(k)?k:[]},[x]),{data:u}=ce(e&&o?["api/branchapi/transport/getrouteStoppageData?route_id="+o,e]:null,([k,D])=>pe(k,D)),{Status:p="Failed"}=u||{},_=async(k,D)=>{try{await d(Ye(k,D,e),St(D)),te.success("Success! Added new item.",{duration:1e3,icon:"🎉"})}catch{te.error("Failed to add the new item.",{duration:1e3})}},R=k=>{k.preventDefault();const D=new FormData(k.target);_("/branchapi/transport/addstoppageToRoute",D)},w=()=>{n(k=>[...k,{idKey:dr++}])},P=k=>{if(t.length===1)return;const D=[...t];D.splice(k,1),n(D)},S=k=>{i(D=>({...D,pagination:{current:k,pageSize:D.pagination.pageSize}}))},ne=async k=>{const D="/branchapi/Transport/deletevehicle";try{await d(Je(D,k,e),at(k)),te.success("Success! Deleted item.",{duration:1e3})}catch{te.error("Failed to delete the item.",{duration:1e3})}};v.useEffect(()=>{if(p==="Success"){const k=Array.isArray(u?.data)?u.data:[];k.length>0?n(k):o&&n([{idKey:dr++}])}},[p,u,o]);const oe=k=>{const{children:D=[]}=k||{},N=[{title:"Stop Name",dataIndex:"stop_name",onCell:J=>({isEditable:!0})},{title:"Pick Time",dataIndex:"pickup_time",onCell:J=>({isEditable:!0})},{title:"Drop Name",dataIndex:"drop_time",onCell:J=>({isEditable:!0})}];return r.jsx("div",{style:{display:"flex",justifyContent:"center"},children:r.jsx("div",{style:{width:"95%",margin:8},children:r.jsx(j.Table,{components:{body:{cell:cr}},expandable:{childrenColumnName:"changed"},bordered:!0,columns:N,rowKey:J=>C(J)+"cell01",dataSource:D,pagination:!1})})})},C=k=>{const D=["id","index"];for(let N=0;N<D.length;N++)if(k[D[N]])return k[D[N]]},O=[{title:"Route",dataIndex:"route_title"},{title:"Stoppages",render:(k,D,N)=>r.jsx(r.Fragment,{children:D.children?.map((J,L,ae)=>r.jsx("span",{children:`${J.stop_name} ${L+1===ae.length?"":","}`},`${L}vehicle001`))})},{title:"Action",render:(k,D,N)=>r.jsx(r.Fragment,{children:r.jsx(Ge,{id:D?.route_id,funcName:ne})})}];return r.jsxs("div",{children:[r.jsx(te.Toaster,{toastOptions:{position:"top-center"}}),r.jsxs(X,{pt:5,pb:1,children:[r.jsx(X,{mx:2,mt:-3,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Route Time Table"})}),r.jsx(X,{px:3,pb:2,children:r.jsxs("form",{onSubmit:R,children:[r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:20,alignItems:"end"},children:[r.jsx("div",{children:r.jsx(Se,{options:f,value:f.find(k=>k.value===o)??null,closeMenuOnSelect:!0,hideSelectedOptions:!1,label:"Route",name:"route_id",onChange:k=>{s(k?.value??null),n([])},allowSelectAll:!1,required:!0})}),r.jsx("div",{style:{display:"flex",justifyContent:"flex-start",gap:12},children:o&&r.jsx("button",{type:"button",style:{padding:2,border:"none",background:"transparent",cursor:"pointer",marginBottom:8},title:"Add Row",onClick:w,children:r.jsx(ye.PlusCircleOutlined,{style:{fontSize:24,color:"#28a745"}})})}),r.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[r.jsx(Ae,{type:"submit",value:"Add",color:"primary"}),r.jsx(j.Button,{type:"text",htmlType:"button",onClick:()=>{s(null),n([])},style:Na,children:"Cancel"})]})]}),r.jsx("div",{style:{marginTop:20},children:t.length>0&&t.map((k,D)=>{const N=k.pickup_time?fe(k.pickup_time,"h:mm a"):fe(),J=k.drop_time?fe(k.drop_time,"h:mm a"):fe();return r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr)) auto",gap:16,alignItems:"end",marginBottom:12},children:[r.jsx("div",{children:r.jsx(le,{defaultValue:k.stop_name??"",type:"text",name:`stoppage[${D}][name]`,label:"Place Name*",required:"required"})}),r.jsxs("div",{children:[r.jsx("label",{className:"labelfont",style:ir,children:"Pick Time"}),r.jsx(j.TimePicker,{defaultValue:N,use12Hours:!0,format:"h:mm a",name:`stoppage[${D}][pickTime]`,allowClear:!1,style:lr})]}),r.jsxs("div",{children:[r.jsx("label",{className:"labelfont",style:ir,children:"Drop Time"}),r.jsx(j.TimePicker,{defaultValue:J,use12Hours:!0,format:"h:mm a",name:`stoppage[${D}][drop_time]`,allowClear:!1,style:lr})]}),r.jsx("div",{style:{marginBottom:8},children:t.length>1&&r.jsx("button",{type:"button",style:{padding:2,border:"none",background:"transparent",cursor:"pointer"},onClick:()=>P(D),children:r.jsx(ye.MinusCircleOutlined,{style:{fontSize:20,color:"#dc3545"}})})})]},k.idKey?k.idKey+"exp":k.id+"exp")})})]})}),r.jsx(X,{mx:2,mt:1,py:1,px:1,variant:"gradient",bgColor:"info",borderRadius:"lg",coloredShadow:"info",children:r.jsx(_e,{variant:"h6",color:"white",children:"Stoppage List"})}),r.jsx(X,{style:{padding:"10px 16px"},children:r.jsx(j.Table,{components:{body:{cell:cr}},columns:O,bordered:!0,size:"small",rowKey:k=>C(k),dataSource:T,loading:l,expandable:{expandedRowRender:oe,childrenColumnName:"changed"},pagination:{current:a.pagination.current,pageSize:a.pagination.pageSize,total:m,showSizeChanger:!0,onChange:S,onShowSizeChange:(k,D)=>{i(N=>({...N,pagination:{current:1,pageSize:D}}))},showTotal:(k,D)=>`${D[0]}-${D[1]} of ${k} items`}})})]})]})}const Ua=({routes:e=[],onNavigate:t})=>r.jsx(j.Row,{gutter:[16,16],children:e.map((n,o)=>r.jsx(j.Col,{xs:24,md:8,lg:8,children:r.jsx(X,{children:r.jsx(pr,{icon:n?.icon??"",title:n?.title??"",path:n?.path??"",onClick:t})})},`${o}route001`))});exports.AddDriver=Pa;exports.AdmissionEnquiry=ua;exports.AssignStudentToTransport=Aa;exports.AssignVehicles=wa;exports.ErpDashboard=Kr;exports.MenuSubmenu=Is;exports.RoutePage=Ua;exports.RouteTimeTable=Ia;exports.Stoppage=ka;exports.TransportRoutes=fa;exports.TransportVehicles=ha;exports.setBaseUrl=As;