@ukpc-lib/react 0.12.1-dev.6 → 0.12.1-dev.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),T=require("react"),m=require("../index.esm2017-CmzbxdoD.cjs"),X=require("moment"),N=require("@mui/material");require("axios");require("@r2wc/react-to-web-component");const pr=require("react-router-dom");require("react-query");require("react-dom");function $o(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const A=$o(T),Ao=e=>{var n,o;const{tabs:t}=e,r=s=>{e.setCurrentTab(s.target.id)};return console.log("🚀 ~ brandColors:",e.currentTab),l.jsxs(l.Fragment,{children:[l.jsx("style",{children:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),T=require("react"),m=require("../index.esm2017-BQlpKDgO.cjs"),X=require("moment"),N=require("@mui/material");require("axios");require("@r2wc/react-to-web-component");const pr=require("react-router-dom");require("react-query");require("react-dom");function $o(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const A=$o(T),Ao=e=>{var n,o;const{tabs:t}=e,r=s=>{e.setCurrentTab(s.target.id)};return console.log("🚀 ~ brandColors:",e.currentTab),l.jsxs(l.Fragment,{children:[l.jsx("style",{children:`
2
2
  .tab-title {
3
3
  min-width: 90px;
4
4
  padding: 5px 16px;
@@ -1,8 +1,8 @@
1
1
  import ii, { jsxs as M, Fragment as le, jsx as u } from "react/jsx-runtime";
2
2
  import * as N from "react";
3
3
  import ye, { useState as W, useContext as $e, useEffect as q, useRef as Se, useCallback as Mt, forwardRef as ai, createElement as sr, PureComponent as si } from "react";
4
- import { c as ne, a as gt, C as Le, t as ct, p as li, L as Xr, u as ci, b as ui, S as qn, d as di, e as fi, Q as Zn, f as Et, g as Xn, h as hi, s as Ct, _ as B, P as R, i as pe, j as mi, o as pi, k as Ne, l as gi, m as yi, n as Jr, q as Ot, r as Qr, I as vi, v as bi, w as en, D as xi, x as Jn, y as Qn, z as Si, A as wi, B as _i } from "../index.esm2017-EnR0Wsx8.js";
5
- import { H as au, G as su, K as lu, E as cu, F as uu, J as du } from "../index.esm2017-EnR0Wsx8.js";
4
+ import { c as ne, a as gt, C as Le, t as ct, p as li, L as Xr, u as ci, b as ui, S as qn, d as di, e as fi, Q as Zn, f as Et, g as Xn, h as hi, s as Ct, _ as B, P as R, i as pe, j as mi, o as pi, k as Ne, l as gi, m as yi, n as Jr, q as Ot, r as Qr, I as vi, v as bi, w as en, D as xi, x as Jn, y as Qn, z as Si, A as wi, B as _i } from "../index.esm2017-WRY5UFlA.js";
5
+ import { H as au, G as su, K as lu, E as cu, F as uu, J as du } from "../index.esm2017-WRY5UFlA.js";
6
6
  import Q from "moment";
7
7
  import { Stack as me, Dialog as Ei, DialogTitle as Ci, Typography as Ce, DialogContent as Ti, DialogActions as Ii, Button as pr, Box as ki, ClickAwayListener as Mi, TextField as eo, IconButton as Oi, CircularProgress as $i, Fade as Ai, Paper as Ni, Checkbox as Ri, Breadcrumbs as Pi } from "@mui/material";
8
8
  import "axios";
@@ -28,7 +28,7 @@ object-assign
28
28
  (c) Sindre Sorhus
29
29
  @license MIT
30
30
  */var um,u1;function p4(){if(u1)return um;u1=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},c=0;c<10;c++)a["_"+String.fromCharCode(c)]=c;var d=Object.getOwnPropertyNames(a).map(function(w){return a[w]});if(d.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(w){p[w]=w}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return um=i()?Object.assign:function(o,a){for(var c,d=r(o),p,w=1;w<arguments.length;w++){c=Object(arguments[w]);for(var g in c)e.call(c,g)&&(d[g]=c[g]);if(t){p=t(c);for(var T=0;T<p.length;T++)n.call(c,p[T])&&(d[p[T]]=c[p[T]])}}return d},um}var cm,c1;function Qy(){if(c1)return cm;c1=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return cm=t,cm}var fm,f1;function MD(){return f1||(f1=1,fm=Function.call.bind(Object.prototype.hasOwnProperty)),fm}var dm,d1;function g4(){if(d1)return dm;d1=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Qy(),n={},r=MD();t=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,c,d,p){if(process.env.NODE_ENV!=="production"){for(var w in o)if(r(o,w)){var g;try{if(typeof o[w]!="function"){var T=Error((d||"React class")+": "+c+" type `"+w+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[w]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}g=o[w](a,w,d,c,null,e)}catch(I){g=I}if(g&&!(g instanceof Error)&&t((d||"React class")+": type specification of "+c+" `"+w+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in n)){n[g.message]=!0;var E=p?p():"";t("Failed "+c+" type: "+g.message+(E??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},dm=i,dm}var hm,h1;function m4(){if(h1)return hm;h1=1;var t=ID(),e=p4(),n=Qy(),r=MD(),i=g4(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(c){var d="Warning: "+c;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function a(){return null}return hm=function(c,d){var p=typeof Symbol=="function"&&Symbol.iterator,w="@@iterator";function g(me){var Ee=me&&(p&&me[p]||me[w]);if(typeof Ee=="function")return Ee}var T="<<anonymous>>",E={array:_("array"),bigint:_("bigint"),bool:_("boolean"),func:_("function"),number:_("number"),object:_("object"),string:_("string"),symbol:_("symbol"),any:U(),arrayOf:G,element:re(),elementType:Z(),instanceOf:ce,node:ze(),objectOf:ae,oneOf:S,oneOfType:ue,shape:Fe,exact:Ve};function I(me,Ee){return me===Ee?me!==0||1/me===1/Ee:me!==me&&Ee!==Ee}function A(me,Ee){this.message=me,this.data=Ee&&typeof Ee=="object"?Ee:{},this.stack=""}A.prototype=Error.prototype;function L(me){if(process.env.NODE_ENV!=="production")var Ee={},Ye=0;function We(Ze,Qe,it,ht,gt,ct,yt){if(ht=ht||T,ct=ct||it,yt!==n){if(d){var et=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 et.name="Invariant Violation",et}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var At=ht+":"+it;!Ee[At]&&Ye<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ct+"` prop on `"+ht+"`. 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."),Ee[At]=!0,Ye++)}}return Qe[it]==null?Ze?Qe[it]===null?new A("The "+gt+" `"+ct+"` is marked as required "+("in `"+ht+"`, but its value is `null`.")):new A("The "+gt+" `"+ct+"` is marked as required in "+("`"+ht+"`, but its value is `undefined`.")):null:me(Qe,it,ht,gt,ct)}var Je=We.bind(null,!1);return Je.isRequired=We.bind(null,!0),Je}function _(me){function Ee(Ye,We,Je,Ze,Qe,it){var ht=Ye[We],gt=ke(ht);if(gt!==me){var ct=Oe(ht);return new A("Invalid "+Ze+" `"+Qe+"` of type "+("`"+ct+"` supplied to `"+Je+"`, expected ")+("`"+me+"`."),{expectedType:me})}return null}return L(Ee)}function U(){return L(a)}function G(me){function Ee(Ye,We,Je,Ze,Qe){if(typeof me!="function")return new A("Property `"+Qe+"` of component `"+Je+"` has invalid PropType notation inside arrayOf.");var it=Ye[We];if(!Array.isArray(it)){var ht=ke(it);return new A("Invalid "+Ze+" `"+Qe+"` of type "+("`"+ht+"` supplied to `"+Je+"`, expected an array."))}for(var gt=0;gt<it.length;gt++){var ct=me(it,gt,Je,Ze,Qe+"["+gt+"]",n);if(ct instanceof Error)return ct}return null}return L(Ee)}function re(){function me(Ee,Ye,We,Je,Ze){var Qe=Ee[Ye];if(!c(Qe)){var it=ke(Qe);return new A("Invalid "+Je+" `"+Ze+"` of type "+("`"+it+"` supplied to `"+We+"`, expected a single ReactElement."))}return null}return L(me)}function Z(){function me(Ee,Ye,We,Je,Ze){var Qe=Ee[Ye];if(!t.isValidElementType(Qe)){var it=ke(Qe);return new A("Invalid "+Je+" `"+Ze+"` of type "+("`"+it+"` supplied to `"+We+"`, expected a single ReactElement type."))}return null}return L(me)}function ce(me){function Ee(Ye,We,Je,Ze,Qe){if(!(Ye[We]instanceof me)){var it=me.name||T,ht=tt(Ye[We]);return new A("Invalid "+Ze+" `"+Qe+"` of type "+("`"+ht+"` supplied to `"+Je+"`, expected ")+("instance of `"+it+"`."))}return null}return L(Ee)}function S(me){if(!Array.isArray(me))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("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])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function Ee(Ye,We,Je,Ze,Qe){for(var it=Ye[We],ht=0;ht<me.length;ht++)if(I(it,me[ht]))return null;var gt=JSON.stringify(me,function(yt,et){var At=Oe(et);return At==="symbol"?String(et):et});return new A("Invalid "+Ze+" `"+Qe+"` of value `"+String(it)+"` "+("supplied to `"+Je+"`, expected one of "+gt+"."))}return L(Ee)}function ae(me){function Ee(Ye,We,Je,Ze,Qe){if(typeof me!="function")return new A("Property `"+Qe+"` of component `"+Je+"` has invalid PropType notation inside objectOf.");var it=Ye[We],ht=ke(it);if(ht!=="object")return new A("Invalid "+Ze+" `"+Qe+"` of type "+("`"+ht+"` supplied to `"+Je+"`, expected an object."));for(var gt in it)if(r(it,gt)){var ct=me(it,gt,Je,Ze,Qe+"."+gt,n);if(ct instanceof Error)return ct}return null}return L(Ee)}function ue(me){if(!Array.isArray(me))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var Ee=0;Ee<me.length;Ee++){var Ye=me[Ee];if(typeof Ye!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ne(Ye)+" at index "+Ee+"."),a}function We(Je,Ze,Qe,it,ht){for(var gt=[],ct=0;ct<me.length;ct++){var yt=me[ct],et=yt(Je,Ze,Qe,it,ht,n);if(et==null)return null;et.data&&r(et.data,"expectedType")&&gt.push(et.data.expectedType)}var At=gt.length>0?", expected one of type ["+gt.join(", ")+"]":"";return new A("Invalid "+it+" `"+ht+"` supplied to "+("`"+Qe+"`"+At+"."))}return L(We)}function ze(){function me(Ee,Ye,We,Je,Ze){return Ue(Ee[Ye])?null:new A("Invalid "+Je+" `"+Ze+"` supplied to "+("`"+We+"`, expected a ReactNode."))}return L(me)}function Me(me,Ee,Ye,We,Je){return new A((me||"React class")+": "+Ee+" type `"+Ye+"."+We+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Je+"`.")}function Fe(me){function Ee(Ye,We,Je,Ze,Qe){var it=Ye[We],ht=ke(it);if(ht!=="object")return new A("Invalid "+Ze+" `"+Qe+"` of type `"+ht+"` "+("supplied to `"+Je+"`, expected `object`."));for(var gt in me){var ct=me[gt];if(typeof ct!="function")return Me(Je,Ze,Qe,gt,Oe(ct));var yt=ct(it,gt,Je,Ze,Qe+"."+gt,n);if(yt)return yt}return null}return L(Ee)}function Ve(me){function Ee(Ye,We,Je,Ze,Qe){var it=Ye[We],ht=ke(it);if(ht!=="object")return new A("Invalid "+Ze+" `"+Qe+"` of type `"+ht+"` "+("supplied to `"+Je+"`, expected `object`."));var gt=e({},Ye[We],me);for(var ct in gt){var yt=me[ct];if(r(me,ct)&&typeof yt!="function")return Me(Je,Ze,Qe,ct,Oe(yt));if(!yt)return new A("Invalid "+Ze+" `"+Qe+"` key `"+ct+"` supplied to `"+Je+"`.\nBad object: "+JSON.stringify(Ye[We],null," ")+`
31
- Valid keys: `+JSON.stringify(Object.keys(me),null," "));var et=yt(it,ct,Je,Ze,Qe+"."+ct,n);if(et)return et}return null}return L(Ee)}function Ue(me){switch(typeof me){case"number":case"string":case"undefined":return!0;case"boolean":return!me;case"object":if(Array.isArray(me))return me.every(Ue);if(me===null||c(me))return!0;var Ee=g(me);if(Ee){var Ye=Ee.call(me),We;if(Ee!==me.entries){for(;!(We=Ye.next()).done;)if(!Ue(We.value))return!1}else for(;!(We=Ye.next()).done;){var Je=We.value;if(Je&&!Ue(Je[1]))return!1}}else return!1;return!0;default:return!1}}function he(me,Ee){return me==="symbol"?!0:Ee?Ee["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Ee instanceof Symbol:!1}function ke(me){var Ee=typeof me;return Array.isArray(me)?"array":me instanceof RegExp?"object":he(Ee,me)?"symbol":Ee}function Oe(me){if(typeof me>"u"||me===null)return""+me;var Ee=ke(me);if(Ee==="object"){if(me instanceof Date)return"date";if(me instanceof RegExp)return"regexp"}return Ee}function Ne(me){var Ee=Oe(me);switch(Ee){case"array":case"object":return"an "+Ee;case"boolean":case"date":case"regexp":return"a "+Ee;default:return Ee}}function tt(me){return!me.constructor||!me.constructor.name?T:me.constructor.name}return E.checkPropTypes=i,E.resetWarningCache=i.resetWarningCache,E.PropTypes=E,E},hm}var pm,p1;function v4(){if(p1)return pm;p1=1;var t=Qy();function e(){}function n(){}return n.resetWarningCache=e,pm=function(){function r(a,c,d,p,w,g){if(g!==t){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}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},pm}if(process.env.NODE_ENV!=="production"){var y4=ID(),b4=!0;xv.exports=m4()(y4.isElement,b4)}else xv.exports=v4()();var Cr=xv.exports;const _s=Oc(Cr);var w4=function(e){var n=(e==null?void 0:e.ownerDocument)||document;return n.defaultView||window},x4=function(e,n){for(var r in e)if(!(r in n))return!0;for(var i in n)if(e[i]!==n[i])return!0;return!1},S4=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Ah="http://www.w3.org/2000/svg",g1="http://www.w3.org/1999/xlink",Yp=function(t){function e(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=t.call.apply(t,[this].concat(o))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(c){r.reactWrapper=c},r}_D(e,t);var n=e.prototype;return n.renderSVG=function(){var i=this;if(this.reactWrapper instanceof w4(this.reactWrapper).Node){var o=this.props,a=o.desc,c=o.evalScripts,d=o.httpRequestWithCredentials,p=o.renumerateIRIElements,w=o.src,g=o.title,T=o.useRequestCache,E=this.props.onError,I=this.props.beforeInjection,A=this.props.afterInjection,L=this.props.wrapper,_,U;L==="svg"?(_=document.createElementNS(Ah,L),_.setAttribute("xmlns",Ah),_.setAttribute("xmlns:xlink",g1),U=document.createElementNS(Ah,L)):(_=document.createElement(L),U=document.createElement(L)),_.appendChild(U),U.dataset.src=w,this.nonReactWrapper=this.reactWrapper.appendChild(_);var G=function(S){if(i.removeSVG(),!i._isMounted){E(S);return}i.setState(function(){return{hasError:!0,isLoading:!1}},function(){E(S)})},re=function(S,ae){if(S){G(S);return}i._isMounted&&i.setState(function(){return{isLoading:!1}},function(){try{A(ae)}catch(ue){G(ue)}})},Z=function(S){if(S.setAttribute("role","img"),a){var ae=S.querySelector(":scope > desc");ae&&S.removeChild(ae);var ue=document.createElement("desc");ue.innerHTML=a,S.prepend(ue)}if(g){var ze=S.querySelector(":scope > title");ze&&S.removeChild(ze);var Me=document.createElement("title");Me.innerHTML=g,S.prepend(Me)}try{I(S)}catch(Fe){G(Fe)}};f4(U,{afterEach:re,beforeEach:Z,cacheRequests:T,evalScripts:c,httpRequestWithCredentials:d,renumerateIRIElements:p})}},n.removeSVG=function(){var i;(i=this.nonReactWrapper)!=null&&i.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(i){var o=this;x4(Rf({},i),this.props)&&this.setState(function(){return o.initialState},function(){o.removeSVG(),o.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var i=this.props;i.afterInjection,i.beforeInjection,i.desc,i.evalScripts;var o=i.fallback;i.httpRequestWithCredentials;var a=i.loading;i.renumerateIRIElements,i.src,i.title,i.useRequestCache;var c=i.wrapper,d=Fv(i,S4),p=c;return kn.createElement(p,Rf({},d,{ref:this.refCallback},c==="svg"?{xmlns:Ah,xmlnsXlink:g1}:{}),this.state.isLoading&&a&&kn.createElement(a,null),this.state.hasError&&o&&kn.createElement(o,null))},e}(kn.Component);Yp.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Yp.propTypes={afterInjection:Cr.func,beforeInjection:Cr.func,desc:Cr.string,evalScripts:Cr.oneOf(["always","once","never"]),fallback:Cr.oneOfType([Cr.func,Cr.object,Cr.string]),httpRequestWithCredentials:Cr.bool,loading:Cr.oneOfType([Cr.func,Cr.object,Cr.string]),onError:Cr.func,renumerateIRIElements:Cr.bool,src:Cr.string.isRequired,title:Cr.string,useRequestCache:Cr.bool,wrapper:Cr.oneOf(["div","span","svg"])};const Af=new Map;Af.set("text",t=>{var e,n;return Ie.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center",lineHeight:"24px"},children:(n=(e=t==null?void 0:t.name)==null?void 0:e.trim().at(0))==null?void 0:n.toUpperCase()})});Af.set("svgHtml",t=>{function e(n){function r(o){const c=new DOMParser().parseFromString(o,"image/svg+xml").querySelector("svg");return c?(c.querySelectorAll("path").forEach(p=>{p.hasAttribute("fill")&&p.setAttribute("fill","currentColor"),p.hasAttribute("stroke")&&p.setAttribute("stroke","currentColor")}),c.outerHTML):""}const i=r(n.svgString);return Ie.jsx("div",{dangerouslySetInnerHTML:{__html:i},style:{width:24,height:24,margin:"0 auto"}})}return Ie.jsx(e,{svgString:t.icon})});Af.set("svgHttp",t=>Ie.jsx(Yp,{src:t.icon,beforeInjection:e=>{e.setAttribute("style","margin: 0 auto;"),e.querySelectorAll("path").forEach(r=>{r.hasAttribute("fill")&&r.setAttribute("fill","currentColor"),r.hasAttribute("stroke")&&r.setAttribute("stroke","currentColor")})}}));Af.set("img",t=>Ie.jsx("img",{src:t.icon||"/",alt:t.name,style:{height:24,maxHeight:24,maxWidth:24}}));function T4(t){return t.icon=(t.icon||"").trim(),t.icon?t.icon.startsWith("<svg")?"svgHtml":t.icon.endsWith(".svg")?"svgHttp":"img":"text"}function LD({item:t}){return(Af.get(T4(t))||Af.get("text"))(t)}function C4(t){return Ie.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...t,children:Ie.jsx("path",{fill:"currenColor",d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})})}function E4(t){const{renderChildren:e,parentRef:n,onlyChild:r,dropdownLevel:i}=t,[o,a]=q.useState({top:0,left:0}),c=q.useRef(null),[d,p]=q.useState("auto");return q.useLayoutEffect(()=>{if(n.current&&c.current){const w=n.current.getBoundingClientRect(),g=c.current.getBoundingClientRect();let T,E;if(i===1)T=w.bottom,E=w.left,g.height+T>window.innerHeight?(p(window.innerHeight-T-50),T=w.bottom-g.height):T=w.bottom;else if(i>1){T=w.top,E=w.left+w.width;const I=g.height+(window.innerHeight-w.top)>window.innerHeight;I&&(console.log("DropDown-fav overtop"),p(window.innerHeight-w.top-50)),w.top+g.height>window.innerHeight&&!I&&(T=w.top-g.height+w.height)}a({top:T-64,left:E})}},[n,c,i]),r?e({maxHeight:d}):Iv.createPortal(Ie.jsx("div",{ref:c,style:{position:"fixed",top:o.top,left:`calc(${o.left}px - var(--global-menu-width))`,zIndex:1200},children:e({maxHeight:d})}),n.current)}const If=new Map;If.set("text",t=>{var e,n;return Ie.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center",lineHeight:"24px"},children:(n=(e=t==null?void 0:t.name)==null?void 0:e.trim().at(0))==null?void 0:n.toUpperCase()})});If.set("svgHtml",t=>{function e(n){function r(o){const c=new DOMParser().parseFromString(o,"image/svg+xml").querySelector("svg");return c?(c.querySelectorAll("path").forEach(p=>{p.hasAttribute("fill")&&p.setAttribute("fill","currentColor"),p.hasAttribute("stroke")&&p.setAttribute("stroke","currentColor")}),c.outerHTML):""}const i=r(n.svgString);return Ie.jsx("div",{dangerouslySetInnerHTML:{__html:i},style:{width:24,height:24,margin:"0 auto"}})}return Ie.jsx(e,{svgString:t.icon})});If.set("svgHttp",t=>Ie.jsx(Yp,{src:t.icon,beforeInjection:e=>{e.setAttribute("style","margin: 0 auto;"),e.querySelectorAll("path").forEach(r=>{r.hasAttribute("fill")&&r.setAttribute("fill","currentColor"),r.hasAttribute("stroke")&&r.setAttribute("stroke","currentColor")})}}));If.set("img",t=>Ie.jsx("img",{src:t.icon||"/",alt:t.name,style:{height:24,maxHeight:24,maxWidth:24}}));function k4(t){return t.icon=(t.icon||"").trim(),t.icon?t.icon.startsWith("<svg")?"svgHtml":t.icon.endsWith(".svg")?"svgHttp":"img":"text"}function D4({item:t}){return(If.get(k4(t))||If.get("text"))(t)}function FD({...t}){var ae,ue,ze;const e=t.item,n=t.level||0,r=!!((ae=t.item.children)!=null&&ae.length),i=`level-${n}`,o=(Me,Fe=i)=>`${Me} ${Fe} `,[a,c]=q.useState(!1),[d,p]=q.useState(e.isFavorite||!1),w=q.useRef(),g=q.useRef();g!=null&&g.current&&((ue=g==null?void 0:g.current)==null?void 0:ue.scrollWidth)>((ze=g==null?void 0:g.current)==null?void 0:ze.clientWidth);const T=window.location.origin,E=e.path&&e.path.includes("http")?new URL(e.path):{origin:"",pathname:""},I=window.location.pathname.split("/")[1],A=E.pathname.split("/")[1],L=t.ssr||!T.includes("local")&&T!==E.origin||A!==I,_=r||n===0?"div":L?"a":xp.Link,U=e.path||"#",G=n+1,re=r&&a&&n>0,Z=()=>{c(!0)},ce=()=>{c(!1)},S="/global-menu-config/api/v1/menu-items/user/set-favorite";return Ie.jsxs("div",{ref:w,className:o("menu-item__wrapper tree-node"),style:{borderRadius:"8px",transition:"all 0.3s"},onMouseOver:Z,onMouseOut:ce,onDragStart:Me=>{n>1&&Me.preventDefault()},children:[Ie.jsxs(_,{to:U,href:U,draggable:"true",className:o("menu-item__link"),style:{width:"100%",transition:"all 0.3s"},onDragStart:Me=>{console.log("onDragStart component",Me.target)},children:[Ie.jsx(P4,{cls:o,item:e}),Ie.jsx("span",{className:o("menu-item__label"),ref:g,children:e.name}),Ie.jsx(O4,{menuLevel:n,hasChildren:r,isHovered:a,isFavorite:d,onClick:Me=>{const Fe={menuConfigId:e.id,isFavorite:Me},Ve=t.baseUrl+S;As.post(Ve,Fe).then(Ue=>{var he;p(Me),Uv("Set favorite menu item successfully"),(he=t.onSetFavoriteSuccess)==null||he.call(t,t.item.id,Me)}).catch(Ue=>{var he,ke;Wd(((ke=(he=Ue.response)==null?void 0:he.data)==null?void 0:ke.errorMessage)||"Have error when set favorite menu item")})}}),r&&Ie.jsx("div",{className:o("menu-item__icon-arrow__wrapper"),children:Ie.jsx(C4,{className:o("menu-item__icon-arrow__icon")})})]}),re&&Ie.jsx(E4,{parentRef:w,onlyChild:G<2,dropdownLevel:n,renderChildren:({maxHeight:Me})=>{var Fe;return Ie.jsx(DD.div,{className:o("menu-item__dropdown dropdown-favorite ? 'menu-item__dropdown--open' : 'menu-item__dropdown--close'}",`level-${G}`),style:Jy({maxHeight:Me,overflowY:"auto",paddingRight:3},Me!=="auto"&&!!G),children:(Fe=e.children)==null?void 0:Fe.map(Ve=>q.createElement(FD,{...t,key:Ve.id,item:Ve,level:G}))})}})]})}function P4({item:t,cls:e}){return Ie.jsx("div",{className:e("menu-item__icon"),children:Ie.jsx(D4,{item:t})})}function O4(t){const e={marginRight:t.hasChildren?10:0,fontSize:22,fill:ki.warning,minWidth:16};if(t.menuLevel!==0)return Ie.jsxs(Ie.Fragment,{children:[t.isHovered&&!t.isFavorite&&Ie.jsx(sa.Tooltip,{title:"Add to favorites",children:Ie.jsx(PD,{style:e,onClick:n=>{var r;n.preventDefault(),n.stopPropagation(),(r=t.onClick)==null||r.call(t,!0)}})}),t.isFavorite&&Ie.jsx(sa.Tooltip,{title:"Remove from favorites",children:Ie.jsx(OD,{style:e,onClick:n=>{var r;n.preventDefault(),n.stopPropagation(),(r=t.onClick)==null||r.call(t,!1)}})})]})}const _4='.flex-col-center{display:flex;flex-direction:column;justify-content:center}.wrap-section{transition:all .3s;padding:0 4px}.favorite-menu{display:flex;height:56px;border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s;width:100%}.scrollbar-hidden::-webkit-scrollbar{width:2px;background:transparent}.favorite-menu__wrap-btn-logout,.favorite-menu__btn-logout{margin:40px 0}.favorite-menu__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:0;transition:ease-in-out .2s;transition-delay:.15s}.favorite-menu__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px;justify-content:center;width:100%}.favorite-menu__toggle-btn{margin-top:-6px;color:#85858a}.favorite-menu__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:8px 16px 8px 18.6665px;min-height:48px;border-radius:.375rem;overflow:hidden;transition:all .3s ease-in-out;background-color:initial}.favorite-menu__logout-btn:hover{background-color:#919eab14}.favorite-menu__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;position:relative;width:100%}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-2,.menu-item__link.active.level-3,.menu-item__link.active.level-4,.menu-item__link.active.level-5,.menu-item__link.active.level-6,.menu-item__link.active.level-7,.menu-item__link.active.level-8,.menu-item__link.active.level-9,.menu-item__link.active.level-10{background-color:inherit;color:inherit}.menu-item__link.active.level-2:hover,.menu-item__link.active.level-3:hover,.menu-item__link.active.level-4:hover,.menu-item__link.active.level-5:hover,.menu-item__link.active.level-6:hover,.menu-item__link.active.level-7:hover,.menu-item__link.active.level-8:hover,.menu-item__link.active.level-9:hover,.menu-item__link.active.level-10:hover{background-color:#919eab14}.menu-item__link.menu-item__link.level-0{padding:0;background-color:#919eab14;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929;opacity:1}.menu-item__label.level-1{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.level-0,.menu-item__label.level-1{font-size:.875rem;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:8px}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.level-0{display:none}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.open{transform:rotate(0)!important}.menu-item__dropdown{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:210px;max-width:210px;padding:4px;z-index:1200}.menu-item__dropdown.dropdown-favorite{width:auto;min-width:180px;max-width:350px}.menu-item__dropdown::-webkit-scrollbar{width:4px}.menu-item__dropdown::-webkit-scrollbar-thumb{background-color:#9b9b9b99;border-radius:2px}.menu-item__dropdown,.menu-item__dropdown>*{margin-top:4px}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown .menu-item__link{height:40px}.menu-item__dropdown .menu-item__link.level-1{height:48px}.menu-item__dropdown.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}.favorite-menu__menu .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.treeFavorited{display:flex;align-items:center;margin:0 -5px}.treeFavorited li{margin:0 5px}.item.hover-on:before{content:"";position:absolute;top:0;left:0;height:100%;width:2px;background-color:var(--primary200)}';var ac={};/**
31
+ Valid keys: `+JSON.stringify(Object.keys(me),null," "));var et=yt(it,ct,Je,Ze,Qe+"."+ct,n);if(et)return et}return null}return L(Ee)}function Ue(me){switch(typeof me){case"number":case"string":case"undefined":return!0;case"boolean":return!me;case"object":if(Array.isArray(me))return me.every(Ue);if(me===null||c(me))return!0;var Ee=g(me);if(Ee){var Ye=Ee.call(me),We;if(Ee!==me.entries){for(;!(We=Ye.next()).done;)if(!Ue(We.value))return!1}else for(;!(We=Ye.next()).done;){var Je=We.value;if(Je&&!Ue(Je[1]))return!1}}else return!1;return!0;default:return!1}}function he(me,Ee){return me==="symbol"?!0:Ee?Ee["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Ee instanceof Symbol:!1}function ke(me){var Ee=typeof me;return Array.isArray(me)?"array":me instanceof RegExp?"object":he(Ee,me)?"symbol":Ee}function Oe(me){if(typeof me>"u"||me===null)return""+me;var Ee=ke(me);if(Ee==="object"){if(me instanceof Date)return"date";if(me instanceof RegExp)return"regexp"}return Ee}function Ne(me){var Ee=Oe(me);switch(Ee){case"array":case"object":return"an "+Ee;case"boolean":case"date":case"regexp":return"a "+Ee;default:return Ee}}function tt(me){return!me.constructor||!me.constructor.name?T:me.constructor.name}return E.checkPropTypes=i,E.resetWarningCache=i.resetWarningCache,E.PropTypes=E,E},hm}var pm,p1;function v4(){if(p1)return pm;p1=1;var t=Qy();function e(){}function n(){}return n.resetWarningCache=e,pm=function(){function r(a,c,d,p,w,g){if(g!==t){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}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},pm}if(process.env.NODE_ENV!=="production"){var y4=ID(),b4=!0;xv.exports=m4()(y4.isElement,b4)}else xv.exports=v4()();var Cr=xv.exports;const _s=Oc(Cr);var w4=function(e){var n=(e==null?void 0:e.ownerDocument)||document;return n.defaultView||window},x4=function(e,n){for(var r in e)if(!(r in n))return!0;for(var i in n)if(e[i]!==n[i])return!0;return!1},S4=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Ah="http://www.w3.org/2000/svg",g1="http://www.w3.org/1999/xlink",Yp=function(t){function e(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=t.call.apply(t,[this].concat(o))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(c){r.reactWrapper=c},r}_D(e,t);var n=e.prototype;return n.renderSVG=function(){var i=this;if(this.reactWrapper instanceof w4(this.reactWrapper).Node){var o=this.props,a=o.desc,c=o.evalScripts,d=o.httpRequestWithCredentials,p=o.renumerateIRIElements,w=o.src,g=o.title,T=o.useRequestCache,E=this.props.onError,I=this.props.beforeInjection,A=this.props.afterInjection,L=this.props.wrapper,_,U;L==="svg"?(_=document.createElementNS(Ah,L),_.setAttribute("xmlns",Ah),_.setAttribute("xmlns:xlink",g1),U=document.createElementNS(Ah,L)):(_=document.createElement(L),U=document.createElement(L)),_.appendChild(U),U.dataset.src=w,this.nonReactWrapper=this.reactWrapper.appendChild(_);var G=function(S){if(i.removeSVG(),!i._isMounted){E(S);return}i.setState(function(){return{hasError:!0,isLoading:!1}},function(){E(S)})},re=function(S,ae){if(S){G(S);return}i._isMounted&&i.setState(function(){return{isLoading:!1}},function(){try{A(ae)}catch(ue){G(ue)}})},Z=function(S){if(S.setAttribute("role","img"),a){var ae=S.querySelector(":scope > desc");ae&&S.removeChild(ae);var ue=document.createElement("desc");ue.innerHTML=a,S.prepend(ue)}if(g){var ze=S.querySelector(":scope > title");ze&&S.removeChild(ze);var Me=document.createElement("title");Me.innerHTML=g,S.prepend(Me)}try{I(S)}catch(Fe){G(Fe)}};f4(U,{afterEach:re,beforeEach:Z,cacheRequests:T,evalScripts:c,httpRequestWithCredentials:d,renumerateIRIElements:p})}},n.removeSVG=function(){var i;(i=this.nonReactWrapper)!=null&&i.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(i){var o=this;x4(Rf({},i),this.props)&&this.setState(function(){return o.initialState},function(){o.removeSVG(),o.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var i=this.props;i.afterInjection,i.beforeInjection,i.desc,i.evalScripts;var o=i.fallback;i.httpRequestWithCredentials;var a=i.loading;i.renumerateIRIElements,i.src,i.title,i.useRequestCache;var c=i.wrapper,d=Fv(i,S4),p=c;return kn.createElement(p,Rf({},d,{ref:this.refCallback},c==="svg"?{xmlns:Ah,xmlnsXlink:g1}:{}),this.state.isLoading&&a&&kn.createElement(a,null),this.state.hasError&&o&&kn.createElement(o,null))},e}(kn.Component);Yp.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Yp.propTypes={afterInjection:Cr.func,beforeInjection:Cr.func,desc:Cr.string,evalScripts:Cr.oneOf(["always","once","never"]),fallback:Cr.oneOfType([Cr.func,Cr.object,Cr.string]),httpRequestWithCredentials:Cr.bool,loading:Cr.oneOfType([Cr.func,Cr.object,Cr.string]),onError:Cr.func,renumerateIRIElements:Cr.bool,src:Cr.string.isRequired,title:Cr.string,useRequestCache:Cr.bool,wrapper:Cr.oneOf(["div","span","svg"])};const Af=new Map;Af.set("text",t=>{var e,n;return Ie.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center",lineHeight:"24px"},children:(n=(e=t==null?void 0:t.name)==null?void 0:e.trim().at(0))==null?void 0:n.toUpperCase()})});Af.set("svgHtml",t=>{function e(n){function r(o){const c=new DOMParser().parseFromString(o,"image/svg+xml").querySelector("svg");return c?(c.querySelectorAll("path").forEach(p=>{p.hasAttribute("fill")&&p.setAttribute("fill","currentColor"),p.hasAttribute("stroke")&&p.setAttribute("stroke","currentColor")}),c.outerHTML):""}const i=r(n.svgString);return Ie.jsx("div",{dangerouslySetInnerHTML:{__html:i},style:{width:24,height:24,margin:"0 auto"}})}return Ie.jsx(e,{svgString:t.icon})});Af.set("svgHttp",t=>Ie.jsx(Yp,{src:t.icon,beforeInjection:e=>{e.setAttribute("style","margin: 0 auto;"),e.querySelectorAll("path").forEach(r=>{r.hasAttribute("fill")&&r.setAttribute("fill","currentColor"),r.hasAttribute("stroke")&&r.setAttribute("stroke","currentColor")})}}));Af.set("img",t=>Ie.jsx("img",{src:t.icon||"/",alt:t.name,style:{height:24,maxHeight:24,maxWidth:24}}));function T4(t){return t.icon=(t.icon||"").trim(),t.icon?t.icon.startsWith("<svg")?"svgHtml":t.icon.endsWith(".svg")?"svgHttp":"img":"text"}function LD({item:t}){return(Af.get(T4(t))||Af.get("text"))(t)}function C4(t){return Ie.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...t,children:Ie.jsx("path",{fill:"currenColor",d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})})}function E4(t){const{renderChildren:e,parentRef:n,onlyChild:r,dropdownLevel:i}=t,[o,a]=q.useState({top:0,left:0}),c=q.useRef(null),[d,p]=q.useState("auto");return q.useLayoutEffect(()=>{if(n.current&&c.current){const w=n.current.getBoundingClientRect(),g=c.current.getBoundingClientRect();let T,E;if(i===1)T=w.bottom,E=w.left,g.height+T>window.innerHeight?(p(window.innerHeight-T-50),T=w.bottom-g.height):T=w.bottom;else if(i>1){T=w.top,E=w.left+w.width;const I=g.height+(window.innerHeight-w.top)>window.innerHeight;I&&(console.log("DropDown-fav overtop"),p(window.innerHeight-w.top-50)),w.top+g.height>window.innerHeight&&!I&&(T=w.top-g.height+w.height)}a({top:T-64,left:E})}},[n,c,i]),r?e({maxHeight:d}):Iv.createPortal(Ie.jsx("div",{ref:c,style:{position:"fixed",top:o.top,left:`calc(${o.left}px - var(--global-menu-width))`,zIndex:1200},children:e({maxHeight:d})}),n.current)}const If=new Map;If.set("text",t=>{var e,n;return Ie.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center",lineHeight:"24px"},children:(n=(e=t==null?void 0:t.name)==null?void 0:e.trim().at(0))==null?void 0:n.toUpperCase()})});If.set("svgHtml",t=>{function e(n){function r(o){const c=new DOMParser().parseFromString(o,"image/svg+xml").querySelector("svg");return c?(c.querySelectorAll("path").forEach(p=>{p.hasAttribute("fill")&&p.setAttribute("fill","currentColor"),p.hasAttribute("stroke")&&p.setAttribute("stroke","currentColor")}),c.outerHTML):""}const i=r(n.svgString);return Ie.jsx("div",{dangerouslySetInnerHTML:{__html:i},style:{width:24,height:24,margin:"0 auto"}})}return Ie.jsx(e,{svgString:t.icon})});If.set("svgHttp",t=>Ie.jsx(Yp,{src:t.icon,beforeInjection:e=>{e.setAttribute("style","margin: 0 auto;"),e.querySelectorAll("path").forEach(r=>{r.hasAttribute("fill")&&r.setAttribute("fill","currentColor"),r.hasAttribute("stroke")&&r.setAttribute("stroke","currentColor")})}}));If.set("img",t=>Ie.jsx("img",{src:t.icon||"/",alt:t.name,style:{height:24,maxHeight:24,maxWidth:24}}));function k4(t){return t.icon=(t.icon||"").trim(),t.icon?t.icon.startsWith("<svg")?"svgHtml":t.icon.endsWith(".svg")?"svgHttp":"img":"text"}function D4({item:t}){return(If.get(k4(t))||If.get("text"))(t)}function FD({...t}){var ae,ue,ze;const e=t.item,n=t.level||0,r=!!((ae=t.item.children)!=null&&ae.length),i=`level-${n}`,o=(Me,Fe=i)=>`${Me} ${Fe} `,[a,c]=q.useState(!1),[d,p]=q.useState(e.isFavorite||!1),w=q.useRef(),g=q.useRef();g!=null&&g.current&&((ue=g==null?void 0:g.current)==null?void 0:ue.scrollWidth)>((ze=g==null?void 0:g.current)==null?void 0:ze.clientWidth);const T=window.location.origin,E=e.path&&e.path.includes("http")?new URL(e.path):{origin:"",pathname:""},I=window.location.pathname.split("/")[1],A=E.pathname.split("/")[1],L=t.ssr||!T.includes("local")&&T!==E.origin||A!==I,_=r||n===0?"div":L?"a":xp.Link,U=e.path||"#",G=n+1,re=r&&a&&n>0,Z=()=>{c(!0)},ce=()=>{c(!1)},S="/global-menu-config/api/v1/menu-items/user/set-favorite";return Ie.jsxs("div",{ref:w,className:o("menu-item__wrapper tree-node"),style:{borderRadius:"8px",transition:"all 0.3s"},onMouseOver:Z,onMouseOut:ce,onDragStart:Me=>{n>1&&Me.preventDefault()},children:[Ie.jsxs(_,{to:U,href:U,draggable:"true",className:o("menu-item__link"),style:{width:"100%",transition:"all 0.3s"},onDragStart:Me=>{console.log("onDragStart component",Me.target)},children:[Ie.jsx(P4,{cls:o,item:e}),Ie.jsx("span",{className:o("menu-item__label"),ref:g,children:e.name}),Ie.jsx(O4,{menuLevel:n,hasChildren:r,isHovered:a,isFavorite:d,onClick:Me=>{const Fe={menuConfigId:e.id,isFavorite:Me},Ve=t.baseUrl+S;As.post(Ve,Fe).then(Ue=>{var he;p(Me),Uv("Set favorite menu item successfully"),(he=t.onSetFavoriteSuccess)==null||he.call(t,t.item.id,Me)}).catch(Ue=>{var he,ke;Wd(((ke=(he=Ue.response)==null?void 0:he.data)==null?void 0:ke.errorMessage)||"Have error when set favorite menu item")})}}),r&&Ie.jsx("div",{className:o("menu-item__icon-arrow__wrapper"),children:Ie.jsx(C4,{className:o("menu-item__icon-arrow__icon")})})]}),re&&Ie.jsx(E4,{parentRef:w,onlyChild:G<2,dropdownLevel:n,renderChildren:({maxHeight:Me})=>{var Fe;return Ie.jsx(DD.div,{className:o("menu-item__dropdown dropdown-favorite ? 'menu-item__dropdown--open' : 'menu-item__dropdown--close'}",`level-${G}`),style:Jy({maxHeight:Me,overflowY:"auto",paddingRight:3},Me!=="auto"&&!!G),children:(Fe=e.children)==null?void 0:Fe.map(Ve=>q.createElement(FD,{...t,key:Ve.id,item:Ve,level:G}))})}})]})}function P4({item:t,cls:e}){return Ie.jsx("div",{className:e("menu-item__icon"),children:Ie.jsx(D4,{item:t})})}function O4(t){const e={marginRight:t.hasChildren?10:0,fontSize:22,fill:ki.warning,minWidth:16};if(t.menuLevel!==0)return Ie.jsxs(Ie.Fragment,{children:[t.isHovered&&!t.isFavorite&&Ie.jsx(sa.Tooltip,{title:"Add to favorites",children:Ie.jsx(PD,{style:e,onClick:n=>{var r;n.preventDefault(),n.stopPropagation(),(r=t.onClick)==null||r.call(t,!0)}})}),t.isFavorite&&Ie.jsx(sa.Tooltip,{title:"Remove from favorites",children:Ie.jsx(OD,{style:e,onClick:n=>{var r;n.preventDefault(),n.stopPropagation(),(r=t.onClick)==null||r.call(t,!1)}})})]})}const _4='.flex-col-center{display:flex;flex-direction:column;justify-content:center}.wrap-section{transition:all .3s;padding:0 4px}.favorite-menu{display:flex;height:56px;border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s;width:100%}.scrollbar-hidden::-webkit-scrollbar{width:2px;background:transparent}.favorite-menu__wrap-btn-logout,.favorite-menu__btn-logout{margin:40px 0}.favorite-menu__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:0;transition:ease-in-out .2s;transition-delay:.15s}.favorite-menu__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px;justify-content:center;width:100%}.favorite-menu__toggle-btn{margin-top:-6px;color:#85858a}.favorite-menu__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:8px 16px 8px 18.6665px;min-height:48px;border-radius:.375rem;overflow:hidden;transition:all .3s ease-in-out;background-color:initial}.favorite-menu__logout-btn:hover{background-color:#919eab14}.favorite-menu__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;position:relative;width:100%}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-2,.menu-item__link.active.level-3,.menu-item__link.active.level-4,.menu-item__link.active.level-5,.menu-item__link.active.level-6,.menu-item__link.active.level-7,.menu-item__link.active.level-8,.menu-item__link.active.level-9,.menu-item__link.active.level-10{background-color:inherit;color:inherit}.menu-item__link.active.level-2:hover,.menu-item__link.active.level-3:hover,.menu-item__link.active.level-4:hover,.menu-item__link.active.level-5:hover,.menu-item__link.active.level-6:hover,.menu-item__link.active.level-7:hover,.menu-item__link.active.level-8:hover,.menu-item__link.active.level-9:hover,.menu-item__link.active.level-10:hover{background-color:#919eab14}.menu-item__link.menu-item__link.level-0{padding:0;background-color:#919eab14;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929;opacity:1}.menu-item__label.level-1{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.level-0,.menu-item__label.level-1{font-size:.875rem;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:8px}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.level-0{display:none}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.open{transform:rotate(0)!important}.menu-item__dropdown{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:210px;max-width:210px;padding:4px;z-index:1200}.menu-item__dropdown.dropdown-favorite{width:auto;min-width:180px;max-width:350px}.menu-item__dropdown::-webkit-scrollbar{width:4px}.menu-item__dropdown::-webkit-scrollbar-thumb{background-color:#9b9b9b99;border-radius:2px}.menu-item__dropdown,.menu-item__dropdown>*{margin-top:4px}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown .menu-item__link{height:40px}.menu-item__dropdown .menu-item__link.level-1{height:48px}.menu-item__dropdown.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}.favorite-menu__menu .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.treeFavorited{display:flex;align-items:center;margin:0 -5px}.treeFavorited li{margin:0 5px}.item.hover-on:before{content:"";position:absolute;top:0;left:0;height:100%;width:2px;background-color:var(--primary300)}';var ac={};/**
32
32
  * @license React
33
33
  * react-dom-server-legacy.browser.production.min.js
34
34
  *
@@ -19469,7 +19469,7 @@ function B4(t) {
19469
19469
  )
19470
19470
  ] });
19471
19471
  }
19472
- const $4 = '.flex-col-center{display:flex;flex-direction:column;justify-content:center}.wrap-section{transition:all .3s;padding:0 4px}.favorite-menu{display:flex;height:56px;border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s;width:100%}.scrollbar-hidden::-webkit-scrollbar{width:2px;background:transparent}.favorite-menu__wrap-btn-logout,.favorite-menu__btn-logout{margin:40px 0}.favorite-menu__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:0;transition:ease-in-out .2s;transition-delay:.15s}.favorite-menu__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px;justify-content:center;width:100%}.favorite-menu__toggle-btn{margin-top:-6px;color:#85858a}.favorite-menu__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:8px 16px 8px 18.6665px;min-height:48px;border-radius:.375rem;overflow:hidden;transition:all .3s ease-in-out;background-color:initial}.favorite-menu__logout-btn:hover{background-color:#919eab14}.favorite-menu__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;position:relative;width:100%}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-2,.menu-item__link.active.level-3,.menu-item__link.active.level-4,.menu-item__link.active.level-5,.menu-item__link.active.level-6,.menu-item__link.active.level-7,.menu-item__link.active.level-8,.menu-item__link.active.level-9,.menu-item__link.active.level-10{background-color:inherit;color:inherit}.menu-item__link.active.level-2:hover,.menu-item__link.active.level-3:hover,.menu-item__link.active.level-4:hover,.menu-item__link.active.level-5:hover,.menu-item__link.active.level-6:hover,.menu-item__link.active.level-7:hover,.menu-item__link.active.level-8:hover,.menu-item__link.active.level-9:hover,.menu-item__link.active.level-10:hover{background-color:#919eab14}.menu-item__link.menu-item__link.level-0{padding:0;background-color:#919eab14;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929;opacity:1}.menu-item__label.level-1{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.level-0,.menu-item__label.level-1{font-size:.875rem;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:8px}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.level-0{display:none}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.open{transform:rotate(0)!important}.menu-item__dropdown{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:210px;max-width:210px;padding:4px;z-index:1200}.menu-item__dropdown.dropdown-favorite{width:auto;min-width:180px;max-width:350px}.menu-item__dropdown::-webkit-scrollbar{width:4px}.menu-item__dropdown::-webkit-scrollbar-thumb{background-color:#9b9b9b99;border-radius:2px}.menu-item__dropdown,.menu-item__dropdown>*{margin-top:4px}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown .menu-item__link{height:40px}.menu-item__dropdown .menu-item__link.level-1{height:48px}.menu-item__dropdown.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}.favorite-menu__menu .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.treeFavorited{display:flex;align-items:center;margin:0 -5px}.treeFavorited li{margin:0 5px}.item.hover-on:before{content:"";position:absolute;top:0;left:0;height:100%;width:2px;background-color:var(--primary200)}';
19472
+ const $4 = '.flex-col-center{display:flex;flex-direction:column;justify-content:center}.wrap-section{transition:all .3s;padding:0 4px}.favorite-menu{display:flex;height:56px;border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s;width:100%}.scrollbar-hidden::-webkit-scrollbar{width:2px;background:transparent}.favorite-menu__wrap-btn-logout,.favorite-menu__btn-logout{margin:40px 0}.favorite-menu__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:0;transition:ease-in-out .2s;transition-delay:.15s}.favorite-menu__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px;justify-content:center;width:100%}.favorite-menu__toggle-btn{margin-top:-6px;color:#85858a}.favorite-menu__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:8px 16px 8px 18.6665px;min-height:48px;border-radius:.375rem;overflow:hidden;transition:all .3s ease-in-out;background-color:initial}.favorite-menu__logout-btn:hover{background-color:#919eab14}.favorite-menu__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;position:relative;width:100%}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-2,.menu-item__link.active.level-3,.menu-item__link.active.level-4,.menu-item__link.active.level-5,.menu-item__link.active.level-6,.menu-item__link.active.level-7,.menu-item__link.active.level-8,.menu-item__link.active.level-9,.menu-item__link.active.level-10{background-color:inherit;color:inherit}.menu-item__link.active.level-2:hover,.menu-item__link.active.level-3:hover,.menu-item__link.active.level-4:hover,.menu-item__link.active.level-5:hover,.menu-item__link.active.level-6:hover,.menu-item__link.active.level-7:hover,.menu-item__link.active.level-8:hover,.menu-item__link.active.level-9:hover,.menu-item__link.active.level-10:hover{background-color:#919eab14}.menu-item__link.menu-item__link.level-0{padding:0;background-color:#919eab14;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929;opacity:1}.menu-item__label.level-1{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.level-0,.menu-item__label.level-1{font-size:.875rem;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:8px}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.level-0{display:none}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.open{transform:rotate(0)!important}.menu-item__dropdown{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:210px;max-width:210px;padding:4px;z-index:1200}.menu-item__dropdown.dropdown-favorite{width:auto;min-width:180px;max-width:350px}.menu-item__dropdown::-webkit-scrollbar{width:4px}.menu-item__dropdown::-webkit-scrollbar-thumb{background-color:#9b9b9b99;border-radius:2px}.menu-item__dropdown,.menu-item__dropdown>*{margin-top:4px}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown .menu-item__link{height:40px}.menu-item__dropdown .menu-item__link.level-1{height:48px}.menu-item__dropdown.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}.favorite-menu__menu .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.treeFavorited{display:flex;align-items:center;margin:0 -5px}.treeFavorited li{margin:0 5px}.item.hover-on:before{content:"";position:absolute;top:0;left:0;height:100%;width:2px;background-color:var(--primary300)}';
19473
19473
  var pc = {};
19474
19474
  /**
19475
19475
  * @license React
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.esm2017-CmzbxdoD.cjs"),m=require("axios"),u=require("react"),i=require("react/jsx-runtime");require("@r2wc/react-to-web-component");const l=require("react-router-dom");require("@mui/material");const c=s=>{const[t,o]=u.useState([]);return u.useEffect(()=>{m.get(`${s}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(r=>o(r.data)).catch(r=>{console.error("Getting user permission error:",r)})},[s]),t},a=s=>(t,o)=>{const r=c(s);return o?t.every(n=>r==null?void 0:r.includes(n)):t.some(n=>r==null?void 0:r.includes(n))},h=({baseUrl:s,accessWith:t,requireAll:o,children:r})=>a(s)(t,o)?i.jsx(i.Fragment,{children:r}):null,P=({accessWith:s,requireAll:t,baseUrl:o,unAuthorizedPath:r,children:n})=>a(o)(s,t)?i.jsx(i.Fragment,{children:n}):i.jsx(l.Navigate,{to:r,replace:!0});exports.AuthContext=e.AuthContext;exports.AuthProvider=e.AuthProvider;exports.ERROR_MESSAGE=e.ERROR_MESSAGE;exports.SaasThemeProvider=e.SaasThemeProvider;exports.TranslationProvider=e.TranslationProvider;exports.axiosInstance=e.axiosInstance;exports.color=e.color;exports.createCustomTheme=e.createCustomTheme;exports.handleErrorAxios=e.handleErrorAxios;exports.login=e.login;exports.logout=e.logout;exports.responseInterceptor=e.responseInterceptor;exports.search=e.search;exports.setFavicon=e.setFavicon;exports.translate=e.translate;exports.translationConfig=e.translationConfig;exports.useAuth=e.useAuth;exports.useCustomTranslation=e.useCustomTranslation;exports.useTheme=e.useTheme;exports.useTranslation=e.useTranslation$1;exports.HasPermission=h;exports.PermissionRoute=P;exports.getUseHasPermission=a;exports.useGetPermission=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.esm2017-BQlpKDgO.cjs"),m=require("axios"),u=require("react"),i=require("react/jsx-runtime");require("@r2wc/react-to-web-component");const l=require("react-router-dom");require("@mui/material");const c=s=>{const[t,o]=u.useState([]);return u.useEffect(()=>{m.get(`${s}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(r=>o(r.data)).catch(r=>{console.error("Getting user permission error:",r)})},[s]),t},a=s=>(t,o)=>{const r=c(s);return o?t.every(n=>r==null?void 0:r.includes(n)):t.some(n=>r==null?void 0:r.includes(n))},h=({baseUrl:s,accessWith:t,requireAll:o,children:r})=>a(s)(t,o)?i.jsx(i.Fragment,{children:r}):null,P=({accessWith:s,requireAll:t,baseUrl:o,unAuthorizedPath:r,children:n})=>a(o)(s,t)?i.jsx(i.Fragment,{children:n}):i.jsx(l.Navigate,{to:r,replace:!0});exports.AuthContext=e.AuthContext;exports.AuthProvider=e.AuthProvider;exports.ERROR_MESSAGE=e.ERROR_MESSAGE;exports.SaasThemeProvider=e.SaasThemeProvider;exports.TranslationProvider=e.TranslationProvider;exports.axiosInstance=e.axiosInstance;exports.color=e.color;exports.createCustomTheme=e.createCustomTheme;exports.handleErrorAxios=e.handleErrorAxios;exports.login=e.login;exports.logout=e.logout;exports.responseInterceptor=e.responseInterceptor;exports.search=e.search;exports.setFavicon=e.setFavicon;exports.translate=e.translate;exports.translationConfig=e.translationConfig;exports.useAuth=e.useAuth;exports.useCustomTranslation=e.useCustomTranslation;exports.useTheme=e.useTheme;exports.useTranslation=e.useTranslation$1;exports.HasPermission=h;exports.PermissionRoute=P;exports.getUseHasPermission=a;exports.useGetPermission=c;
@@ -1,4 +1,4 @@
1
- import { M as R, N as S, O as G, a0 as y, Y as F, a as H, c as I, Z as M, U as N, R as O, T as $, V as j, v as w, $ as U, t as V, W as X, b as Y, u as Z, g as _, X as b } from "../index.esm2017-EnR0Wsx8.js";
1
+ import { M as R, N as S, O as G, a0 as y, Y as F, a as H, c as I, Z as M, U as N, R as O, T as $, V as j, v as w, $ as U, t as V, W as X, b as Y, u as Z, g as _, X as b } from "../index.esm2017-WRY5UFlA.js";
2
2
  import u from "axios";
3
3
  import { useState as m, useEffect as c } from "react";
4
4
  import { jsx as a, Fragment as n } from "react/jsx-runtime";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ukpc-lib/react",
3
3
  "private": false,
4
- "version": "0.12.1-dev.6",
4
+ "version": "0.12.1-dev.7",
5
5
  "type": "module",
6
6
  "main": "./dist/",
7
7
  "module": "./dist/",
@@ -1,5 +1,5 @@
1
1
  import "../react-to-web-component-CXwKHjZr.js";
2
- import { F as i, u as m } from "../index-BH7Nbk9b.js";
2
+ import { F as i, u as m } from "../index-X5jYAVzr.js";
3
3
  import "../index-BSe1av43.js";
4
4
  import "../index-BziS9Had.js";
5
5
  export {
@@ -1,5 +1,5 @@
1
1
  import "../react-to-web-component-CXwKHjZr.js";
2
- import { G as i } from "../index-BH7Nbk9b.js";
2
+ import { G as i } from "../index-X5jYAVzr.js";
3
3
  import "../index-BSe1av43.js";
4
4
  import "../index-BziS9Had.js";
5
5
  export {
@@ -1,5 +1,5 @@
1
1
  import "../react-to-web-component-CXwKHjZr.js";
2
- import { L as n, T as s } from "../index-BH7Nbk9b.js";
2
+ import { L as n, T as s } from "../index-X5jYAVzr.js";
3
3
  import "../index-BSe1av43.js";
4
4
  import "../index-T58UE-6b.js";
5
5
  import "../index-BziS9Had.js";
@@ -1,5 +1,5 @@
1
1
  import "../react-to-web-component-CXwKHjZr.js";
2
- import { H as e, g as m } from "../index-BH7Nbk9b.js";
2
+ import { H as e, g as m } from "../index-X5jYAVzr.js";
3
3
  import "../index-BziS9Had.js";
4
4
  export {
5
5
  e as HasPermission,
@@ -16663,7 +16663,7 @@ function tX(e) {
16663
16663
  )
16664
16664
  ] });
16665
16665
  }
16666
- const nX = '.flex-col-center{display:flex;flex-direction:column;justify-content:center}.wrap-section{transition:all .3s;padding:0 4px}.favorite-menu{display:flex;height:56px;border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s;width:100%}.scrollbar-hidden::-webkit-scrollbar{width:2px;background:transparent}.favorite-menu__wrap-btn-logout,.favorite-menu__btn-logout{margin:40px 0}.favorite-menu__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:0;transition:ease-in-out .2s;transition-delay:.15s}.favorite-menu__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px;justify-content:center;width:100%}.favorite-menu__toggle-btn{margin-top:-6px;color:#85858a}.favorite-menu__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:8px 16px 8px 18.6665px;min-height:48px;border-radius:.375rem;overflow:hidden;transition:all .3s ease-in-out;background-color:initial}.favorite-menu__logout-btn:hover{background-color:#919eab14}.favorite-menu__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;position:relative;width:100%}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-2,.menu-item__link.active.level-3,.menu-item__link.active.level-4,.menu-item__link.active.level-5,.menu-item__link.active.level-6,.menu-item__link.active.level-7,.menu-item__link.active.level-8,.menu-item__link.active.level-9,.menu-item__link.active.level-10{background-color:inherit;color:inherit}.menu-item__link.active.level-2:hover,.menu-item__link.active.level-3:hover,.menu-item__link.active.level-4:hover,.menu-item__link.active.level-5:hover,.menu-item__link.active.level-6:hover,.menu-item__link.active.level-7:hover,.menu-item__link.active.level-8:hover,.menu-item__link.active.level-9:hover,.menu-item__link.active.level-10:hover{background-color:#919eab14}.menu-item__link.menu-item__link.level-0{padding:0;background-color:#919eab14;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929;opacity:1}.menu-item__label.level-1{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.level-0,.menu-item__label.level-1{font-size:.875rem;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:8px}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.level-0{display:none}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.open{transform:rotate(0)!important}.menu-item__dropdown{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:210px;max-width:210px;padding:4px;z-index:1200}.menu-item__dropdown.dropdown-favorite{width:auto;min-width:180px;max-width:350px}.menu-item__dropdown::-webkit-scrollbar{width:4px}.menu-item__dropdown::-webkit-scrollbar-thumb{background-color:#9b9b9b99;border-radius:2px}.menu-item__dropdown,.menu-item__dropdown>*{margin-top:4px}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown .menu-item__link{height:40px}.menu-item__dropdown .menu-item__link.level-1{height:48px}.menu-item__dropdown.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}.favorite-menu__menu .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.treeFavorited{display:flex;align-items:center;margin:0 -5px}.treeFavorited li{margin:0 5px}.item.hover-on:before{content:"";position:absolute;top:0;left:0;height:100%;width:2px;background-color:var(--primary200)}';
16666
+ const nX = '.flex-col-center{display:flex;flex-direction:column;justify-content:center}.wrap-section{transition:all .3s;padding:0 4px}.favorite-menu{display:flex;height:56px;border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s;width:100%}.scrollbar-hidden::-webkit-scrollbar{width:2px;background:transparent}.favorite-menu__wrap-btn-logout,.favorite-menu__btn-logout{margin:40px 0}.favorite-menu__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:0;transition:ease-in-out .2s;transition-delay:.15s}.favorite-menu__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px;justify-content:center;width:100%}.favorite-menu__toggle-btn{margin-top:-6px;color:#85858a}.favorite-menu__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:8px 16px 8px 18.6665px;min-height:48px;border-radius:.375rem;overflow:hidden;transition:all .3s ease-in-out;background-color:initial}.favorite-menu__logout-btn:hover{background-color:#919eab14}.favorite-menu__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;position:relative;width:100%}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-2,.menu-item__link.active.level-3,.menu-item__link.active.level-4,.menu-item__link.active.level-5,.menu-item__link.active.level-6,.menu-item__link.active.level-7,.menu-item__link.active.level-8,.menu-item__link.active.level-9,.menu-item__link.active.level-10{background-color:inherit;color:inherit}.menu-item__link.active.level-2:hover,.menu-item__link.active.level-3:hover,.menu-item__link.active.level-4:hover,.menu-item__link.active.level-5:hover,.menu-item__link.active.level-6:hover,.menu-item__link.active.level-7:hover,.menu-item__link.active.level-8:hover,.menu-item__link.active.level-9:hover,.menu-item__link.active.level-10:hover{background-color:#919eab14}.menu-item__link.menu-item__link.level-0{padding:0;background-color:#919eab14;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929;opacity:1}.menu-item__label.level-1{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.level-0,.menu-item__label.level-1{font-size:.875rem;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:8px}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.level-0{display:none}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.open{transform:rotate(0)!important}.menu-item__dropdown{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:210px;max-width:210px;padding:4px;z-index:1200}.menu-item__dropdown.dropdown-favorite{width:auto;min-width:180px;max-width:350px}.menu-item__dropdown::-webkit-scrollbar{width:4px}.menu-item__dropdown::-webkit-scrollbar-thumb{background-color:#9b9b9b99;border-radius:2px}.menu-item__dropdown,.menu-item__dropdown>*{margin-top:4px}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown .menu-item__link{height:40px}.menu-item__dropdown .menu-item__link.level-1{height:48px}.menu-item__dropdown.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}.favorite-menu__menu .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.treeFavorited{display:flex;align-items:center;margin:0 -5px}.treeFavorited li{margin:0 5px}.item.hover-on:before{content:"";position:absolute;top:0;left:0;height:100%;width:2px;background-color:var(--primary300)}';
16667
16667
  var Su = {};
16668
16668
  /**
16669
16669
  * @license React