@decafhub/decaf-react-webapp 0.4.1 → 0.5.1
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.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +1 -1
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/theme/-styles.d.ts +1 -1
- package/dist/theme/-styles.d.ts.map +1 -1
- package/dist/theme/-theme-provider.d.ts.map +1 -1
- package/package.json +47 -47
package/dist/index.module.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Global as e,css as t}from"@emotion/react";export{Global as GlobalStyle,css}from"@emotion/react";export{default as styled}from"@emotion/styled";import n from"query-string";export{default as qs}from"query-string";import{LockFilled as r,RightOutlined as o,DownOutlined as l,HomeOutlined as a,QuestionCircleOutlined as i,EllipsisOutlined as c,MenuOutlined as u,UpOutlined as s,CameraOutlined as d,BulbFilled as m,BulbOutlined as p,UserOutlined as f,SettingOutlined as g,InfoCircleOutlined as h,LogoutOutlined as b,CaretUpOutlined as E,MessageOutlined as v}from"@ant-design/icons";import{Result as y,Typography as w,Button as k,theme as x,ConfigProvider as C,Grid as B,Dropdown as S,Layout as z,Menu as I,Drawer as A,Avatar as L,Row as P,Col as N,Card as T,Statistic as D,App as F}from"antd";import j,{useState as W,useLayoutEffect as q,useRef as R,useEffect as V}from"react";import{Link as H,useRouteError as _,isRouteErrorResponse as M,useMatches as O,useLocation as U,NavLink as Y,useNavigate as G,useNavigation as K,Outlet as X,createBrowserRouter as Z,RouterProvider as J}from"react-router-dom";import Q from"decimal.js";import $ from"js-cookie";import ee from"md5";import{useDecaf as te,DecafApp as ne,DecafWebappController as re}from"@decafhub/decaf-react";import"antd/dist/reset.css";import{QueryParamProvider as oe}from"use-query-params";import{ReactRouter6Adapter as le}from"use-query-params/adapters/react-router-6";import{useNProgress as ae}from"@tanem/react-nprogress";import ie from"html2canvas";function ce(e){return j.createElement(j.Fragment,null,j.createElement(w,null,e.message),j.createElement(H,{to:"/"},j.createElement(k,{style:{marginTop:20}},"Home Page")))}function ue(){return j.createElement(y,{icon:j.createElement(r,{style:{color:"#ff603b"}}),title:"Authentication Error",subTitle:j.createElement(ce,{message:"Your credentials are invalid. Please try to log in again."})})}function se(){return j.createElement(y,{status:"403",title:"Access Denied",subTitle:j.createElement(ce,{message:"You are not authorized to access this content."})})}function de(){return j.createElement(y,{status:"404",title:"Page Not Found",subTitle:j.createElement(ce,{message:"Sorry, the page you visited does not exist."})})}function me(){return j.createElement(y,{status:"500",title:"Error",subTitle:j.createElement(ce,{message:"Something went wrong. Please try again later. If the problem persists, please contact the administrator."})})}function pe(){var e=_();if(!M(e))return j.createElement(me,null);switch(e.status){case 401:return j.createElement(ue,null);case 403:return j.createElement(se,null);case 404:return j.createElement(de,null);default:return j.createElement(me,null)}}function fe(){return fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fe.apply(null,arguments)}var ge;function he(e){var t=W(0),n=t[0],r=t[1];return q(function(){var t=document.getElementById(e),n=function(){if(t){var e=t.getBoundingClientRect().top,n=window.innerHeight-e-32-16;r(n)}};return n(),null==t||t.addEventListener("resize",n),window.addEventListener("resize",n),function(){window.removeEventListener("resize",n),null==t||t.removeEventListener("resize",n)}},[e]),n}function be(e,t){void 0===t&&(t=0);var n=W(400),r=n[0],o=n[1],l=he(e),a=R(null);return q(function(){var n=document.getElementById(e);if(n)return a.current=new ResizeObserver(function(e){var n=0;e.forEach(function(e){var r,o=Ee(e.target.querySelector(".ant-table-header")),a=Ee(e.target.querySelector(".ant-table-footer")),i=ve(e.target.querySelector(".ant-table-container")),c=null!=(r=e.target.querySelectorAll(".ant-pagination"))?r:[],u=Array.from(c).reduce(function(e,t){return e+Ee(t)},0);n=l-o-a-i-u-t}),o(n>350?n:"100%")}),a.current.observe(null==n?void 0:n.closest(".ant-table-wrapper")),function(){var e;null==(e=a.current)||e.disconnect()};"development"===process.env.NODE_ENV&&console.warn("useTableMaxHeight: Element with id "+e+" not found. Aborting...")},[t,e,l]),r}function Ee(e){if(!e)return 0;var t=e.getBoundingClientRect().height,n=ve(e);return Math.ceil(t+n)}function ve(e){if(!e)return 0;var t=e.getBoundingClientRect().height,n=window.getComputedStyle(e),r=parseFloat(n.marginTop||"0"),o=parseFloat(n.marginBottom||"0");return Math.ceil(t-e.clientHeight+r+o)}function ye(e,t){var n=!1;"#"===e[0]&&(e=e.slice(1),n=!0);var r=parseInt(e,16),o=(r>>16)+t;o>255?o=255:o<0&&(o=0);var l=(r>>8&255)+t;l>255?l=255:l<0&&(l=0);var a=(255&r)+t;return a>255?a=255:a<0&&(a=0),(n?"#":"")+String("000000"+(a|l<<8|o<<16).toString(16)).slice(-6)}function we(e,t){e.barista.get("/auth/"+(t?"logoutall":"logout"),{timeout:3e3}).catch(function(e){t&&(console.error(e),alert("Failed to logout from all devices. Please try to logout from each device individually."))}).finally(function(){$.remove("ember_simple_auth-session"),window.location.reload()})}function ke(e){return function(t){return t?e.True:e.False}}function xe(e){return function(t){return null==t?e.Null:ke(e)(t)}}function Ce(e){switch(new Q(0).comparedTo(e)){case 1:return ge.Short;case 0:return ge.Square;case-1:return ge.Long}return ge.Square}function Be(e){return function(t){switch(Ce(t)){case ge.Short:return e.Short;case ge.Square:return e.Square;case ge.Long:return e.Long}}}function Se(e,t,n){var r=[].concat(e);return t.forEach(function(e){var t=r.findIndex(function(t){return t[n]===e[n]});t>=0?r[t]=e:r.push(e)}),r}function ze(e){return new URL(e.url).searchParams}function Ie(e,t){return new URL(e.url).searchParams.get(t)}function Ae(e,t,n){var r;return null!=(r=new URL(e.url).searchParams.get(t))?r:n}function Le(e,t){return new URL(e.url).searchParams.getAll(t)}!function(e){e[e.Short=-1]="Short",e[e.Square=0]="Square",e[e.Long=1]="Long"}(ge||(ge={}));var Pe="#10161d",Ne="rgb(31, 41, 55)",Te="rgb(20, 29, 41)",De="#f3f4f6",Fe="#2c3d50",je={colorBorder:"transparent",colorBorderSecondary:"transparent",colorBorderBg:"transparent"},We={hashed:!0,algorithm:[x.defaultAlgorithm],components:{Layout:{headerBg:"#ededed",headerHeight:40}},token:{borderRadius:0,colorBgContainer:"white",colorBgBase:De,colorBgLayout:De,colorBgElevated:"#fafbfc"}},qe={hashed:!0,components:{Layout:{headerBg:Pe,headerHeight:40},Button:{boxShadow:"none",boxShadowSecondary:"none",colorBgContainer:Fe},Input:fe({},je,{colorBgContainer:Fe}),Select:fe({},je,{colorBgContainer:Fe}),Checkbox:fe({},je,{colorBgContainer:Fe}),Dropdown:fe({},je),DatePicker:fe({},je,{colorBgContainer:Fe}),InputNumber:fe({},je,{colorBgContainer:Fe}),Menu:{itemColor:"rgba(255, 255, 255, 0.5)"},Tabs:{colorBorderSecondary:Te}},token:{fontFamily:"Inter, sans-serif",colorPrimary:"#344961",colorBgBase:Ne,colorBgContainer:Pe,colorBgElevated:Te,colorBorderSecondary:Ne,colorBorder:Ne,colorBgLayout:Ne,borderRadius:0,green:"#48734d",red:"#b03a38",blue:"#0d6efd",yellow:"#ffc107",orange:"#fd7e14",colorWhite:"#fff",colorLink:"#a4bfff",colorLinkHover:"#7199fb",colorLinkActive:"#7199fb"},algorithm:[x.darkAlgorithm]};function Re(e){var t,n,r,o,l,a,i,c={color:"white !important",":after":{borderBottomColor:"white"}};return{body:{background:null==(t=e.token)?void 0:t.colorBgBase,fontFamily:"Inter, sans-serif",margin:0},"#root":{minHeight:"100%"},button:{boxShadow:"none !important"},".ant-table-body":{overflow:"auto !important"},"#decaf-header":{position:"fixed",zIndex:999,right:0,left:0,paddingInline:16,display:"flex",alignItems:"center"},"#decaf-content":{paddingTop:null==(n=qe.components)||null==(n=n.Layout)?void 0:n.headerHeight,paddingBottom:32,"#decaf-layout-breadcrumb":fe({backgroundColor:null==(r=e.token)?void 0:r.colorBgElevated,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",height:54,paddingInline:16,boxShadow:"0px 1px 2px rgba(0, 0, 0, 0.10)"},(l=function(e){var t="dark"===e?"255, 255, 255":"0, 0, 0";return{color:"rgba("+t+", 0.5) !important","&:hover":{color:"rgba("+t+", 0.75) !important"}}},a=fe({},l("dark"),{"&:last-child":{color:"rgba(255, 255, 255, 0.85) !important"}}),i=fe({},l("light"),{"&:last-child":{color:"rgba(0, 0, 0, 0.85) !important"}}),{".decaf-breadcrumb":{display:"flex",alignItems:"center",listStyle:"none",margin:0,padding:0,">li":fe({"&.separator":{paddingInline:3,marginInline:3},"a, span":fe({},l("light")),display:"flex",alignItems:"center",transition:"color 0.2s"},i),"&.dark":{">li":fe({"a, span":fe({},l("dark"))},a)}}})),"#decaf-layout-content-outlet":{minHeight:"100%",padding:16,"&.full-screen":{padding:"0 !important"}}},"#decaf-footer":{position:"fixed",bottom:0,right:0,left:0,paddingBlock:0,paddingInline:0,zIndex:999,boxShadow:"0px -2px 4px rgba(0, 0, 0, 0.15)",backgroundColor:null==(o=qe.components)||null==(o=o.Layout)?void 0:o.headerBg},".dot":{borderRadius:"50%",width:10,height:10,display:"inline-block",backgroundColor:"rgba(255,255,255,.25)","&.green":{backgroundColor:"#80ff00 !important"},"&.yellow":{backgroundColor:"#ff0 !important"},"&.orange":{backgroundColor:"#ff7000 !important"},"&.red":{backgroundColor:"#ff0000 !important"}},".ant-menu-item-selected":c,".ant-menu-light.ant-menu-horizontal >.ant-menu-item-selected":c,".ant-menu-light.ant-menu-horizontal >.ant-menu-submenu-selected, .ant-menu-light .ant-menu-submenu-selected >.ant-menu-submenu-title":c}}var Ve,He=j.createContext({theme:"dark",toggleTheme:function(){}}),_e=function(){return j.useContext(He)};function Me(n){var r=j.useState(function(){var e=n.theme||localStorage.getItem("decafAppTheme");return"dark"===e||"light"===e?e:"dark"}),o=r[0],l=r[1],a="light"===o?We:qe;a=fe({},a,n.themeConfig||{}),a=fe({},a,{token:fe({},a.token,{fontFamily:"Inter, sans-serif"})});var i,c,u="light"===o?function(e){return fe({},Re(e))}(a):function(e){var t,n,r,o,l,a,i,c,u,s,d,m,p,f;return fe({},Re(e),{"*":{"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{background:null==(t=e.token)?void 0:t.colorBgContainer},"&::-webkit-scrollbar-thumb":{background:null==(n=e.token)?void 0:n.colorPrimary}},".ant-page-header-back-button, .ant-page-header-heading-title":{color:(null==(r=e.token)?void 0:r.colorWhite)+" !important"},".ant-badge-count":{color:(null==(o=e.token)?void 0:o.colorWhite)+" !important"},".ant-table-thead > tr > th":{background:ye((null==(l=e.token)?void 0:l.colorBgContainer)||"",-5)+" !important","&:hover":{background:(null==(a=e.token)?void 0:a.colorBgContainer)+" !important"}},".ant-table-filter-dropdown":{"input, .ant-table-filter-dropdown-search-input":{background:(null==(i=e.token)?void 0:i.colorBgBase)+" !important"},".ant-dropdown-menu-item, .ant-dropdown-menu":{background:(null==(c=e.token)?void 0:c.colorBgContainer)+" !important"}},".ant-tabs-tab-active":{".ant-tabs-tab-btn":{color:(null==(u=e.token)?void 0:u.colorWhite)+" !important"}},".ant-radio-button-wrapper-checked":{backgroundColor:(null==(s=e.components)||null==(s=s.Button)?void 0:s.colorBgContainer)+" !important",color:(null==(d=e.token)?void 0:d.colorWhite)+" !important"},".ant-picker-date-panel":{".ant-picker-cell-in-range, .ant-picker-cell-range-start, .ant-picker-cell-range-end":{"&::before":{background:(null==(m=e.token)?void 0:m.colorBgBase)+" !important"},".ant-picker-cell-inner":{background:(null==(p=e.token)?void 0:p.colorBgBase)+" !important"}},".ant-picker-cell-range-start, .ant-picker-cell-range-end":{".ant-picker-cell-inner":{background:(null==(f=e.token)?void 0:f.colorPrimary)+" !important"}}}})}(a);return j.createElement(He.Provider,{value:{theme:o,toggleTheme:function(){var e="dark"===o?"light":"dark";l(e),localStorage.setItem("decafAppTheme",e)}}},j.createElement(C,{theme:a},j.createElement(e,{styles:t(Ve||(i=["\n @import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap);\n "],c||(c=i.slice(0)),i.raw=c,Ve=i))}),j.createElement(e,{styles:u}),n.children))}function Oe(e){var t=e.items,n=e.itemRender,r=e.separator,a=_e().theme,i=B.useBreakpoint(),c=t.slice(0,1).concat(t.slice(-1));return j.createElement("ul",{className:"decaf-breadcrumb "+a},function(e,t,n){var r=[];return e.forEach(function(o,a){if(o.href&&a!==e.length-1)r.push(j.createElement("li",{key:a},n?n(o):j.createElement(H,{className:"decaf-breadcrumb-link",to:o.href},o.title)));else if(o.children){var i=o.children.map(function(e,t){return{key:t,label:j.createElement(H,{className:"decaf-breadcrumb-link",to:e.href},e.title)}});r.push(j.createElement("li",{key:a},j.createElement(S,{menu:{items:i}},j.createElement("div",{style:{display:"flex",cursor:"pointer",gap:3}},j.createElement("span",null,o.title),j.createElement(l,{style:{fontSize:12}})))))}else r.push(j.createElement("li",{key:a},o.title));a<e.length-1&&r.push(j.createElement("li",{key:"sep-"+a,className:"separator"},t))}),r}(i.lg?t:c,r||j.createElement(o,null),n))}function Ue(e){var t,n,r=O(),o=null==r?void 0:r[(null==r?void 0:r.length)-1],l=void 0!==e.isFullScreen?e.isFullScreen:!(null==o||null==(t=o.handle)||!t.fullScreen),a=void 0!==e.extras?e.extras:null==o||null==(n=o.handle)?void 0:n.extras;return j.createElement(z.Content,{id:"decaf-content",style:{flex:1,minHeight:"100%"}},j.createElement(Ye,null),j.createElement(Ge,{breadcrumb:e.breadcrumb},a),j.createElement("div",{id:"decaf-layout-content-outlet",className:l?"full-screen":""},e.children))}function Ye(){var e,t,n,r=O().filter(function(e){var t;return Boolean(null==(t=e.handle)?void 0:t.crumb)}).map(function(e){return e.handle.crumb(e.data)}),o=function(){var e=document.title;return e.split(" | ").length>1?e.split(" | ")[e.split(" | ").length-1]:e}(),l=null==r||null==(e=r[r.length-1])?void 0:e.title,a="string"==typeof l?l:((null==(n=null==(t=document.getElementById("decaf-layout-breadcrumb"))?void 0:t.querySelector("li:last-child"))?void 0:n.textContent)||"").trim();return document.title=a?a+" | "+o:o,null}function Ge(e){var t=O();if(!1===e.breadcrumb)return j.createElement("div",{id:"decaf-layout-breadcrumb",style:{justifyContent:"flex-end"}},e.children);if(e.breadcrumb)return j.createElement("div",{id:"decaf-layout-breadcrumb"},e.breadcrumb,e.children);var n=t.filter(function(e){var t;return Boolean(null==(t=e.handle)?void 0:t.crumb)}).map(function(e){return e.handle.crumb(e.data)}),r=[{href:"/",title:j.createElement(a,null)}].concat(n).map(function(e,t){return fe({},e,{_key:t})});return r.length<2?j.createElement(j.Fragment,null):j.createElement("div",{id:"decaf-layout-breadcrumb"},j.createElement(Oe,{items:r}),e.children)}function Ke(){var e=x.useToken().token,t=B.useBreakpoint();return j.createElement(k,{type:"link",href:"https://docs.decafhub.com",target:"_blank",rel:"noreferrer",icon:j.createElement(i,null),style:{backgroundColor:e.colorBgElevated}},!t.xs&&"Documentation")}function Xe(){return j.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 649.6 767.9",enableBackground:"new 0 0 649.6 767.9",xmlSpace:"preserve",width:32,height:32},j.createElement("g",null,j.createElement("path",{fill:"#52CEF4",d:"M324,767.9c-6.6-5.1-14.2-8.6-21.3-12.9c-22-13-44.3-25.6-66.4-38.5c-21.3-12.4-42.5-25-63.8-37.4\n c-33.5-19.5-67.1-39-100.7-58.5c-22.7-13.2-45.3-26.5-68-39.6c-2.8-1.6-3.8-3.3-3.8-6.5c0.2-58.6-0.2-117.3,0.4-175.9\n C1,333,0.7,267.3,1,201.6c0-1.8-0.6-3.7,0.6-5.4c6.4,3.8,12.7,7.6,19.1,11.3c23.8,13.9,47.7,27.9,71.5,41.8\n c4.9,2.9,9.6,6.2,14.9,8.4c-1.2,5.2-0.2,10.3-0.1,15.5c0.5,56.1-0.2,112.2,0.9,168.3c0.3,18.4,0.2,36.8,0.2,55.2\n c0,3,0.7,4.9,3.5,6.4c6.3,3.4,12.3,7.3,18.5,11c26.1,15.7,52.3,31.5,78.4,47.2c33,19.8,66,39.6,99,59.3c5.7,3.4,10.9,7.5,17.2,9.7\n c0,1.5,0.1,2.9,0.1,4.4c0,42.4,0,84.8,0,127.3c0,1.8-0.7,3.7,0.8,5.3c0,0.2,0,0.4,0,0.7C325.1,767.9,324.5,767.9,324,767.9z"}),j.createElement("path",{fill:"#227EC3",d:"M107.1,257.6c-5.3-2.2-10-5.5-14.9-8.4c-23.8-13.9-47.7-27.8-71.5-41.8c-6.4-3.7-12.7-7.6-19.1-11.3\n c8.2-6,17.1-10.7,25.7-16c28.7-17.5,57.5-34.9,86.3-52.4c39.2-23.8,78.5-47.6,117.7-71.4c27-16.3,53.9-32.7,80.9-49\n c4-2.4,8.1-4.6,11.7-7.4c1.3,0,2.7,0,4,0c0.3,1.6,1.9,1.8,2.9,2.4c31,18.9,62,37.8,93.1,56.4c4.2,2.5,5.9,5.2,5.9,10.3\n c-0.3,38.3-0.1,76.7-0.1,115c0,2.7-0.1,5.3-0.2,8c-10.5-6.3-21-12.5-31.4-18.9c-23.1-14-46.2-28-69.3-42c-1.6-1-2.8-1.6-5-0.4\n c-26.8,15.8-53.7,31.5-80.6,47.2c-26.1,15.2-52.2,30.4-78.3,45.7C145.7,235,126.4,246.3,107.1,257.6z"}),j.createElement("path",{fill:"#409DD5",d:"M324.7,630.2c5.2-4.2,11-7.4,16.7-10.9c32.6-20.3,65.3-40.6,98-60.8c30.8-19,61.6-38,92.4-57\n c7.5-4.6,7.5-4.6,7.5-13.6c0-58.6,0.1-117.3,0.1-175.9c0-1.6-0.1-3.2-0.1-4.8c0.8-1.5,0.4-3.1,0.4-4.7c0.1-14.7,0.2-29.5,0.3-44.2\n c1.3,0.1,2.4-0.4,3.4-1c8.7-5.1,17.4-10.2,26.1-15.3c15.8-9.2,31.7-18.3,47.6-27.5c10.5-6.1,21.1-12.3,31.6-18.4\n c1.5,0.9,0.8,2.4,0.8,3.6c0,124.2,0,248.4,0.1,372.6c0,2.7-0.9,4-3.1,5.3c-35.3,20.8-70.5,41.7-105.8,62.6\n c-27.2,16.1-54.5,32.2-81.7,48.4c-27,16-54,32.1-81,48c-17.4,10.3-34.8,20.4-52.3,30.7c-1.5-1.6-0.8-3.5-0.8-5.3\n c0-42.4,0-84.8,0-127.3C324.8,633.2,324.7,631.7,324.7,630.2z"}),j.createElement("path",{fill:"#227EC3",d:"M648.7,196.1c-10.5,6.1-21,12.3-31.6,18.4c-15.8,9.2-31.7,18.3-47.6,27.5c-8.7,5.1-17.4,10.2-26.1,15.3\n c-1,0.6-2.1,1.1-3.4,1c0-12.4-0.1-24.8-0.1-37.2c0-30.2,0-60.5,0-91c2.8,0.3,4.5,2,6.5,3.1c28.4,17.3,56.8,34.7,85.2,52\n C637.3,188.8,643.4,191.8,648.7,196.1z"}),j.createElement("path",{fill:"#227EC3",d:"M216.2,322.3c-0.3-1.6-0.4-2.9,1.4-4c29.2-18,58.4-36.1,87.5-54.1c4.7-2.9,9.5-5.8,14.2-8.9\n c1.5-1,2.7-1.1,4.3-0.2c26.9,15.9,53.8,31.8,80.7,47.7c7.1,4.2,14.1,8.5,21.4,12.4c3.5,1.9,4.8,4.3,3.9,8c-1.7,1.1-3.3,2.2-5,3.2\n c-20.5,11.9-41.1,23.8-61.6,35.7c-13,7.6-26.1,15.2-39.1,22.8c-7-4-14-8.1-21-12.1c-21.7-12.7-43.2-25.5-65-38\n C230.7,330.5,223.8,325.8,216.2,322.3z"}),j.createElement("path",{fill:"#52CEF4",d:"M216.2,322.3c7.6,3.5,14.5,8.2,21.8,12.4c21.7,12.5,43.3,25.3,65,38c7,4.1,14,8.1,21,12.1\n c0,39.3,0.1,78.6,0.1,117.9c-1.5,0.9-2.5-0.4-3.6-1c-21.3-12.8-42.5-25.5-63.7-38.3c-13.3-8-26.5-16.1-39.8-24\n c-1.8-1.1-2.5-2.3-2.5-4.4c0.4-26.9,0.4-53.8,1.1-80.7C215.8,343.6,215.4,332.9,216.2,322.3z"}),j.createElement("path",{fill:"#409DD5",d:"M324,502.6c0-39.3-0.1-78.6-0.1-117.9c13-7.6,26.1-15.2,39.1-22.8c20.5-11.9,41.1-23.8,61.6-35.7\n c1.7-1,3.3-2.1,5-3.2c0.1,7.6,0.1,15.2,0.1,22.8c0,30.5,0,61,0,91.5c0,2.6-0.4,4.4-2.9,5.8c-31.6,18.2-63,36.5-94.5,54.8\n C329.6,499.6,327.2,501.8,324,502.6z"})))}function Ze(e,t){if(void 0===t&&(t=!1),!e)return"";if("to"in e&&e.to){var n=e.to.substring(0,e.to.lastIndexOf("/"))||e.to;return t?n+":_parent_":e.to}return"href"in e&&e.href?e.href+(t?":_parent_":""):"children"in e&&e.children?Ze(e.children[0],!0):""}function Je(e){var t=[];return e.forEach(function(e){var n={key:Ze(e),label:e.label,icon:e.icon};"to"in e&&e.to?n.label=j.createElement(Y,{to:e.to,end:"/"===e.to},e.label):"href"in e&&e.href?n.label=j.createElement("a",{href:e.href},e.label):e.children&&(n.label=e.label,n.children=Je(e.children||[])),t.push(n)}),t}function Qe(){return j.createElement(w.Text,{type:"secondary"},"Powered by"," ",j.createElement("a",{href:"https://teloscube.com",target:"_blank",rel:"noreferrer"},"Teloscube"))}function $e(e){var t=j.useState(!1),n=t[0],r=t[1],o=O(),l=U(),a=B.useBreakpoint().md,i=Je(e.menu),s=o.map(function(e){return e.pathname}).filter(function(e){return"/"===l.pathname||"/"!==e});V(function(){a||r(!1)},[l.pathname,a]);var d=j.createElement(I,{items:i,selectedKeys:s,mode:a?"horizontal":"inline",overflowedIndicator:j.createElement(c,{style:{fontSize:20,color:"white"}}),style:{flex:"auto",justifyContent:"flex-end",backgroundColor:"transparent",border:"none",minWidth:0}});return a?d:j.createElement("div",{style:{display:"flex",flex:"auto",justifyContent:"flex-end"}},j.createElement(u,{style:{fontSize:20,marginRight:20},onClick:function(){return r(!n)}}),j.createElement(A,{open:n,footer:j.createElement(Qe,null),onClose:function(){return r(!1)},styles:{body:{padding:10}},width:document.body.clientWidth-50>350?350:.85*document.body.clientWidth},d))}function et(){return j.createElement("div",{style:{display:"flex"}},j.createElement(k,{type:"text",icon:j.createElement(s,null),title:"Scroll to top",onClick:function(){return window.scrollTo({top:0,behavior:"smooth"})}}),j.createElement(k,{type:"text",icon:j.createElement(l,null),title:"Scroll to bottom",onClick:function(){return window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})}}))}function tt(e){var t=function(){try{var e=document.getElementById("decaf-footer");return null==e||e.style.setProperty("display","none"),Promise.resolve(ie(document.body)).then(function(t){var n=t.toDataURL("image/png");null==e||e.style.setProperty("display","block");var r=document.createElement("a");r.download="screenshot.png",r.href=n,r.click(),r.remove()})}catch(e){return Promise.reject(e)}};return e.triggerNode?j.cloneElement(e.triggerNode,{onClick:t}):j.createElement(k,{type:"text",icon:j.createElement(d,null),title:"Take a screenshot of the current page",onClick:t})}function nt(e){return j.createElement(k,{type:"text",icon:j.createElement("dark"===e.theme?m:p,null),title:"dark"===e.theme?"Switch to light theme":"Switch to dark theme",onClick:function(){return e.onChange()}})}function rt(){var e=W(void 0),t=e[0],n=e[1],r=te(),o=G();V(function(){var e,t;r.me.email&&(e=r.me.email,t="https://www.gravatar.com/avatar/"+ee(e),fetch(t+"?d=404",{method:"HEAD"}).then(function(e){return 200!==e.status?void 0:t}).catch(function(){})).then(n)},[r.me.email]);var l=[{key:"me",label:r.me.fullname||r.me.username,title:r.me.email,disabled:!0,icon:j.createElement(f,null),style:{cursor:"default"}},{key:"settings",label:"Settings",title:"User Settings",icon:j.createElement(g,null),onClick:function(){return window.location.href="/webapps/waitress/production/profile"}},{key:"about",label:"About",icon:j.createElement(h,null),onClick:function(){return o("/about")}},{key:"divider-1",dashed:!0,type:"divider"},{key:"logout",label:"Logout",icon:j.createElement(b,null),onClick:function(){return we(r.client,!1)},style:{color:"orange"}},{key:"logout-all",label:"Logout All Sessions",icon:j.createElement(b,null),onClick:function(){return window.confirm("Logout from all sessions?")&&we(r.client,!0)},danger:!0}],a=t?{src:t}:{icon:j.createElement(f,{style:{color:"rgba(255,255,255, 0.5)"}}),style:{backgroundColor:"transparent",border:"1px solid rgba(255,255,255, 0.5)"}};return j.createElement(S,{trigger:["click"],menu:{items:l}},j.createElement(L,fe({},a,{style:fe({},a.style,{cursor:"pointer"})})))}function ot(e){var t=e.split("/"),n=t.indexOf("webapps");return-1===n?"":t.slice(n+3).join("/")}function lt(){var e,t,n,r=-1===(t=(e=window.location.href.split("/")).indexOf("webapps"))?"":e[t+1],o=function(){var e=window.location.href.split("/"),t=e.indexOf("webapps");return-1===t?"":e[t+2]}(),l=function(e){return e.startsWith("preview-")&&e.length>8}(n=o)?"preview":function(e){return e.startsWith("v")&&e.length>1}(n)?"release":n,a=B.useBreakpoint().md,i=[{code:"development",name:"Development Version",color:"red",url:"/webapps/"+r+"/development/"+ot(window.location.href),show:"development"===process.env.NODE_ENV},{code:"testing",name:"Testing Version",color:"orange",url:"/webapps/"+r+"/testing/"+ot(window.location.href),show:!0},{code:"staging",name:"Staging Version",color:"yellow",url:"/webapps/"+r+"/staging/"+ot(window.location.href),show:!0},{code:"production",name:"Production Version",color:"green",url:"/webapps/"+r+"/production/"+ot(window.location.href),show:!0},{code:"preview",name:"Preview Version",color:"grey",url:"/",show:!1},{code:"release",name:"Release Version",color:"grey",url:"/",show:!1}],c=i.find(function(e){return e.code===l}),u="production"===(null==c?void 0:c.code);return c?j.createElement(S,{placement:"top",arrow:!0,menu:{items:i.filter(function(e){return e.show}).map(function(e){return{key:e.name,label:j.createElement("span",null,j.createElement("i",{className:"dot "+e.color})," ",e.name),onClick:function(){window.location.href=e.url}}})}},j.createElement(k,{type:"text",style:{width:u?32:"initial",padding:u?0:"revert",display:"flex",alignItems:"center",justifyContent:"center"},icon:j.createElement("i",{className:"dot "+(null==c?void 0:c.color)})},j.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},!u&&a&&j.createElement(j.Fragment,null,j.createElement("span",{style:{marginInline:5}},"You are on ",j.createElement("b",null,c.name)),j.createElement(E,null))))):null}function at(){var e=te(),t=e.me,n=e.publicConfig,r=W(!1),o=r[0],l=r[1],a=x.useToken().token,i=B.useBreakpoint();return V(function(){if(n.zendesk&&"undefined"!=typeof document){var e=document.createElement("script");return e.src="https://static.zdassets.com/ekr/snippet.js?key="+n.zendesk,e.async=!0,e.id="ze-snippet",e.onload=function(){window.zE("webWidget","hide"),window.zE("webWidget:on","open",function(){window.zE("webWidget","show"),l(!0)}),window.zE("webWidget:on","close",function(){window.zE("webWidget","hide"),l(!1)})},document.body.appendChild(e),window.zESettings={webWidget:{offset:{horizontal:-7,vertical:20}},contactForm:{subject:!0,fields:[{id:"name",prefill:{"*":t.fullname}},{id:"email",prefill:{"*":t.email}}]}},function(){document.body.removeChild(e)}}},[n,t]),n.zendesk?j.createElement(k,{type:"link",icon:j.createElement(v,null),style:{backgroundColor:a.colorBgElevated},onClick:function(){o?null==window.zE||window.zE("webWidget","close"):null==window.zE||window.zE("webWidget","open"),l(!o)}},!i.xs&&"Support"):null}function it(e){var t,n=U(),r=K(),o=B.useBreakpoint(),l=_e(),a=l.theme,i=l.toggleTheme;return j.createElement(z,{style:{height:"100%"}},j.createElement(ut,{isAnimating:"loading"===r.state,key:n.key}),j.createElement(C,{theme:qe},j.createElement(z.Header,{id:"decaf-header"},j.createElement(ct,{title:e.appName}),j.createElement($e,{title:e.appName,menu:e.menu}),j.createElement(rt,null))),j.createElement(X,null),null!=(t=e.children)?t:null,j.createElement(C,{theme:qe},j.createElement(z.Footer,{id:"decaf-footer"},j.createElement(P,{justify:"space-between",align:"middle"},j.createElement(N,{span:o.lg?10:12},j.createElement(at,null),j.createElement("span",{style:{display:"inline-block",width:1}}),j.createElement(Ke,null)),j.createElement(N,{span:o.lg?4:0,style:{textAlign:"center"}},j.createElement(Qe,null)),j.createElement(N,{span:o.lg?10:12,style:{justifyContent:"flex-end",display:"flex",gap:10}},j.createElement(lt,null),j.createElement(nt,{theme:a,onChange:i}),j.createElement(tt,null),j.createElement(et,null))))))}function ct(e){var t=e.title,n=B.useBreakpoint();return j.createElement(H,{to:"/",style:{display:"flex",alignItems:"center",gap:10}},j.createElement(Xe,null),n.lg&&j.createElement(w.Title,{level:1,style:{margin:0,fontWeight:"normal",fontSize:20,color:"rgba(255, 255, 255, 0.75)",whiteSpace:"nowrap"}},t))}function ut(e){var t=ae({isAnimating:e.isAnimating}),n=t.animationDuration;return j.createElement("div",{style:{opacity:t.isFinished?0:1,pointerEvents:"none",transition:"opacity "+n+"ms linear"}},j.createElement("div",{style:{background:"#29d",height:2,left:0,marginLeft:100*(-1+t.progress)+"%",position:"fixed",top:0,transition:"margin-left "+n+"ms linear",width:"100%",zIndex:1031}},j.createElement("div",{style:{boxShadow:"0 0 10px #29d, 0 0 5px #29d",display:"block",height:"100%",opacity:1,position:"absolute",right:0,transform:"rotate(3deg) translate(0px, -4px)",width:100}})))}function st(e){var t=te().client,n=W(void 0),r=n[0],o=n[1],l=W(void 0),a=l[0],i=l[1],c=W(void 0),u=c[0],s=c[1];return V(function(){t.bare.get("/_cultproxy").then(function(e){return o(e.data.version)}),t.barista.get("/version/").then(function(e){return i(e.data.version)}),t.bare.get("/apis/estate/version").then(function(e){return s(e.data)})},[t]),j.createElement(Ue,null,j.createElement(P,{gutter:[16,16]},j.createElement(N,{xs:{span:24},sm:{span:24},md:{span:24},lg:{span:12},xl:{span:8},xxl:{span:6}},j.createElement(T,{bordered:!1},j.createElement(D,{title:"Application Name",value:e.appName}))),j.createElement(N,{xs:{span:24},lg:{span:12},xl:{span:16},xxl:{span:18}},j.createElement(T,{bordered:!1},j.createElement(D,{title:"Application Description",value:e.appDescription}))),j.createElement(N,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},j.createElement(T,{bordered:!1},j.createElement(D,{title:"Application Version",value:e.appVersion,prefix:"v"}))),j.createElement(N,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},j.createElement(T,{bordered:!1},j.createElement(D,{title:"DECAF Cultproxy Version",value:r,prefix:"v"}))),j.createElement(N,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},j.createElement(T,{bordered:!1},j.createElement(D,{title:"DECAF Barista Version",value:a,prefix:"v"}))),j.createElement(N,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},j.createElement(T,{bordered:!1},j.createElement(D,{title:"DECAF Estate Version",value:u,prefix:"v"}))),j.createElement(N,{span:24},e.content)))}var dt=["crumb","fullScreen","extras","children"];function mt(e){V(function(){var e=function(){var e=document.createElement("script");return e.defer=!0,e.setAttribute("data-domain",location.hostname),e.src="https://webax.svc.sys.decafhub.com/js/plausible.js",e}();return document.body.appendChild(e),function(){document.body.removeChild(e)}},[]);var t=e.controller||re;return t.disableZendeskWidget=!0,j.createElement(Me,{themeConfig:e.themeConfig,theme:e.theme},j.createElement(F,null,j.createElement(ne,{config:e.config,controller:t},j.createElement(pt,fe({},e)))))}function pt(e){var t,r,o=te(),l=[{path:"/about",element:j.createElement(st,{appName:e.appName,appVersion:null==(t=e.config)?void 0:t.currentVersion,appDescription:e.appDescription,content:null==e.buildAboutPageContent?void 0:e.buildAboutPageContent(o)}),crumb:function(){return{title:"About"}}},{path:"*",element:j.createElement(Ue,null,j.createElement(de,null)),crumb:function(){return{title:"Page Not Found"}}}],a=Se(e.buildRouteItems(o),l,"path"),i=Z(function(e,t,r){var o=e.buildMenuItems(t);return[{element:j.createElement(oe,{adapter:le,options:{removeDefaultsFromUrl:!0,searchStringToObject:n.parse,objectToSearchString:n.stringify,enableBatching:!0,includeAllParams:!0}},j.createElement(it,{menu:o,appName:e.appName})),path:"/",children:r.map(ft),errorElement:j.createElement(it,{menu:o,appName:e.appName},j.createElement(Ue,{breadcrumb:!1},j.createElement(pe,null)))}]}(e,o,a),{basename:null==(r=e.config)?void 0:r.basePath});return j.createElement(J,{router:i})}function ft(e){var t=e.crumb,n=e.fullScreen,r=e.extras,o=e.children;return fe({},function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,dt),o?{handle:{crumb:t,fullScreen:n,extras:r},children:o.map(ft)}:{handle:{crumb:t,fullScreen:n,extras:r}})}export{mt as DecafWebapp,ge as Direction,Ue as Page,ue as Page401,se as Page403,de as Page404,me as PageError,ke as booleanMap,qe as decafThemeDark,We as decafThemeLight,Be as directionMap,Ie as getSearchParam,Le as getSearchParamAll,Ae as getSearchParamDefault,ze as getSearchParams,xe as nullableBooleanMap,Se as setAtKey,Ce as toDirection,_e as useDecafTheme,he as useRemaningHeight,be as useTableMaxHeight};
|
|
1
|
+
import{Global as e,css as t}from"@emotion/react";export{Global as GlobalStyle,css}from"@emotion/react";export{default as styled}from"@emotion/styled";import n from"query-string";export{default as qs}from"query-string";import{LockFilled as r,RightOutlined as o,DownOutlined as a,HomeOutlined as l,QuestionCircleOutlined as i,EllipsisOutlined as c,MenuOutlined as u,UpOutlined as s,CameraOutlined as d,BulbFilled as m,BulbOutlined as p,UserOutlined as f,SettingOutlined as g,InfoCircleOutlined as h,LogoutOutlined as b,CaretUpOutlined as v,MessageOutlined as E}from"@ant-design/icons";import{Result as y,Typography as w,Button as k,theme as x,ConfigProvider as C,Grid as B,Dropdown as S,Layout as z,Menu as I,Drawer as P,Avatar as A,Row as L,Col as T,Card as F,Statistic as N,App as D}from"antd";import j,{useState as W,useLayoutEffect as V,useRef as q,useEffect as R}from"react";import{Link as H,useRouteError as M,isRouteErrorResponse as O,useMatches as _,useLocation as U,NavLink as Y,useNavigate as G,useNavigation as K,Outlet as X,createBrowserRouter as Z,RouterProvider as J}from"react-router-dom";import Q from"decimal.js";import $ from"js-cookie";import ee from"md5";import{useDecaf as te,DecafApp as ne,DecafWebappController as re}from"@decafhub/decaf-react";import"antd/dist/reset.css";import{QueryParamProvider as oe}from"use-query-params";import{ReactRouter6Adapter as ae}from"use-query-params/adapters/react-router-6";import{useNProgress as le}from"@tanem/react-nprogress";import ie from"html2canvas";function ce(e){return j.createElement(j.Fragment,null,j.createElement(w,null,e.message),j.createElement(H,{to:"/"},j.createElement(k,{style:{marginTop:20}},"Home Page")))}function ue(){return j.createElement(y,{icon:j.createElement(r,{style:{color:"#ff603b"}}),title:"Authentication Error",subTitle:j.createElement(ce,{message:"Your credentials are invalid. Please try to log in again."})})}function se(){return j.createElement(y,{status:"403",title:"Access Denied",subTitle:j.createElement(ce,{message:"You are not authorized to access this content."})})}function de(){return j.createElement(y,{status:"404",title:"Page Not Found",subTitle:j.createElement(ce,{message:"Sorry, the page you visited does not exist."})})}function me(){return j.createElement(y,{status:"500",title:"Error",subTitle:j.createElement(ce,{message:"Something went wrong. Please try again later. If the problem persists, please contact the administrator."})})}function pe(){var e=M();if(!O(e))return j.createElement(me,null);switch(e.status){case 401:return j.createElement(ue,null);case 403:return j.createElement(se,null);case 404:return j.createElement(de,null);default:return j.createElement(me,null)}}function fe(){return fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fe.apply(null,arguments)}var ge;function he(e){var t=W(0),n=t[0],r=t[1];return V(function(){var t=document.getElementById(e),n=function(){if(t){var e=t.getBoundingClientRect().top,n=window.innerHeight-e-32-16;r(n)}};return n(),null==t||t.addEventListener("resize",n),window.addEventListener("resize",n),function(){window.removeEventListener("resize",n),null==t||t.removeEventListener("resize",n)}},[e]),n}function be(e,t){void 0===t&&(t=0);var n=W(400),r=n[0],o=n[1],a=he(e),l=q(null);return V(function(){var n=document.getElementById(e);if(n)return l.current=new ResizeObserver(function(e){var n=0;e.forEach(function(e){var r,o=ve(e.target.querySelector(".ant-table-header")),l=ve(e.target.querySelector(".ant-table-footer")),i=Ee(e.target.querySelector(".ant-table-container")),c=null!=(r=e.target.querySelectorAll(".ant-pagination"))?r:[],u=Array.from(c).reduce(function(e,t){return e+ve(t)},0);n=a-o-l-i-u-t}),o(n>350?n:"100%")}),l.current.observe(null==n?void 0:n.closest(".ant-table-wrapper")),function(){var e;null==(e=l.current)||e.disconnect()};"development"===process.env.NODE_ENV&&console.warn("useTableMaxHeight: Element with id "+e+" not found. Aborting...")},[t,e,a]),r}function ve(e){if(!e)return 0;var t=e.getBoundingClientRect().height,n=Ee(e);return Math.ceil(t+n)}function Ee(e){if(!e)return 0;var t=e.getBoundingClientRect().height,n=window.getComputedStyle(e),r=parseFloat(n.marginTop||"0"),o=parseFloat(n.marginBottom||"0");return Math.ceil(t-e.clientHeight+r+o)}function ye(e,t){var n=!1;"#"===e[0]&&(e=e.slice(1),n=!0);var r=parseInt(e,16),o=(r>>16)+t;o>255?o=255:o<0&&(o=0);var a=(r>>8&255)+t;a>255?a=255:a<0&&(a=0);var l=(255&r)+t;return l>255?l=255:l<0&&(l=0),(n?"#":"")+String("000000"+(l|a<<8|o<<16).toString(16)).slice(-6)}function we(e,t){e.barista.get("/auth/"+(t?"logoutall":"logout"),{timeout:3e3}).catch(function(e){t&&(console.error(e),alert("Failed to logout from all devices. Please try to logout from each device individually."))}).finally(function(){$.remove("ember_simple_auth-session"),window.location.reload()})}function ke(e){return function(t){return t?e.True:e.False}}function xe(e){return function(t){return null==t?e.Null:ke(e)(t)}}function Ce(e){switch(new Q(0).comparedTo(e)){case 1:return ge.Short;case 0:return ge.Square;case-1:return ge.Long}return ge.Square}function Be(e){return function(t){switch(Ce(t)){case ge.Short:return e.Short;case ge.Square:return e.Square;case ge.Long:return e.Long}}}function Se(e,t,n){var r=[].concat(e);return t.forEach(function(e){var t=r.findIndex(function(t){return t[n]===e[n]});t>=0?r[t]=e:r.push(e)}),r}function ze(e){return new URL(e.url).searchParams}function Ie(e,t){return new URL(e.url).searchParams.get(t)}function Pe(e,t,n){var r;return null!=(r=new URL(e.url).searchParams.get(t))?r:n}function Ae(e,t){return new URL(e.url).searchParams.getAll(t)}!function(e){e[e.Short=-1]="Short",e[e.Square=0]="Square",e[e.Long=1]="Long"}(ge||(ge={}));var Le="#10161d",Te="rgb(31, 41, 55)",Fe="rgb(20, 29, 41)",Ne="#f3f4f6",De=Le,je={colorBorder:"transparent",colorBorderSecondary:"transparent",colorBorderBg:"transparent"},We={hashed:!0,algorithm:[x.defaultAlgorithm],components:{Layout:{headerBg:"#ededed",headerHeight:40},Tabs:{horizontalMargin:"0",horizontalItemPadding:"10px 12px",inkBarColor:"#3399FF"}},token:{borderRadius:0,colorBgContainer:"white",colorBgBase:Ne,colorBgLayout:Ne,colorBgElevated:"#fafbfc"}},Ve={hashed:!0,components:{Layout:{headerBg:Le,headerHeight:40},Button:{boxShadow:"none",boxShadowSecondary:"none",colorBgContainer:De},Input:fe({},je,{colorBgContainer:De}),Select:fe({},je,{colorBgContainer:De}),Checkbox:fe({},je,{colorBgContainer:De}),Dropdown:fe({},je),DatePicker:fe({},je,{colorBgContainer:De}),InputNumber:fe({},je,{colorBgContainer:De}),Menu:{itemColor:"rgba(255, 255, 255, 0.5)"},Tabs:{horizontalMargin:"0",horizontalItemPadding:"10px 12px",inkBarColor:"#3399FF",colorBorderSecondary:Fe}},token:{fontFamily:"Inter, sans-serif",colorPrimary:"#344961",colorBgBase:Te,colorBgContainer:Le,colorBgElevated:Fe,colorBorderSecondary:Te,colorBorder:Te,colorBgLayout:Te,borderRadius:0,green:"#48734d",red:"#b03a38",blue:"#0d6efd",yellow:"#ffc107",orange:"#fd7e14",colorWhite:"#fff",colorLink:"#a4bfff",colorLinkHover:"#7199fb",colorLinkActive:"#7199fb"},algorithm:[x.darkAlgorithm]};function qe(e){var t,n,r,o,a,l,i,c={color:"white !important",":after":{borderBottomColor:"white"}};return{body:{background:null==(t=e.token)?void 0:t.colorBgBase,fontFamily:"Inter, sans-serif",margin:0},"#root":{minHeight:"100%"},button:{boxShadow:"none !important"},".ant-table-body":{overflow:"auto !important"},"#decaf-header":{position:"fixed",zIndex:999,right:0,left:0,paddingInline:16,display:"flex",alignItems:"center"},"#decaf-content":{paddingTop:null==(n=Ve.components)||null==(n=n.Layout)?void 0:n.headerHeight,paddingBottom:32,"#decaf-layout-breadcrumb":fe({backgroundColor:null==(r=e.token)?void 0:r.colorBgElevated,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",height:54,paddingInline:16,boxShadow:"0px 1px 2px rgba(0, 0, 0, 0.10)"},(a=function(e){var t="dark"===e?"255, 255, 255":"0, 0, 0";return{color:"rgba("+t+", 0.5) !important","&:hover":{color:"rgba("+t+", 0.75) !important"}}},l=fe({},a("dark"),{"&:last-child":{color:"rgba(255, 255, 255, 0.85) !important"}}),i=fe({},a("light"),{"&:last-child":{color:"rgba(0, 0, 0, 0.85) !important"}}),{".decaf-breadcrumb":{display:"flex",alignItems:"center",listStyle:"none",margin:0,padding:0,">li":fe({"&.separator":{paddingInline:3,marginInline:3},"a, span":fe({},a("light")),display:"flex",alignItems:"center",transition:"color 0.2s"},i),"&.dark":{">li":fe({"a, span":fe({},a("dark"))},l)}}})),"#decaf-layout-content-outlet":{minHeight:"100%",padding:16,"&.full-screen":{padding:"0 !important"}}},"#decaf-footer":{position:"fixed",bottom:0,right:0,left:0,paddingBlock:0,paddingInline:0,zIndex:999,boxShadow:"0px -2px 4px rgba(0, 0, 0, 0.15)",backgroundColor:null==(o=Ve.components)||null==(o=o.Layout)?void 0:o.headerBg},".dot":{borderRadius:"50%",width:10,height:10,display:"inline-block",backgroundColor:"rgba(255,255,255,.25)","&.green":{backgroundColor:"#80ff00 !important"},"&.yellow":{backgroundColor:"#ff0 !important"},"&.orange":{backgroundColor:"#ff7000 !important"},"&.red":{backgroundColor:"#ff0000 !important"}},".ant-menu-item-selected":c,".ant-menu-light.ant-menu-horizontal >.ant-menu-item-selected":c,".ant-menu-light.ant-menu-horizontal >.ant-menu-submenu-selected, .ant-menu-light .ant-menu-submenu-selected >.ant-menu-submenu-title":c}}var Re,He=j.createContext({theme:"dark",toggleTheme:function(){}}),Me=function(){return j.useContext(He)};function Oe(n){var r,o,a=j.useState(function(){var e=n.theme||localStorage.getItem("decafAppTheme");return"dark"===e||"light"===e?e:"dark"}),l=a[0],i=a[1],c="light"===l?We:Ve;r=c,c=(o=n.themeConfig)?fe({},r,o,{token:fe({},r.token,o.token),components:fe({},r.components,o.components),cssVar:fe({},r.cssVar,o.cssVar)}):r,c=fe({},c,{token:fe({},c.token,{fontFamily:"Inter, sans-serif"})});var u,s,d="light"===l?function(e){return fe({},qe(e))}(c):function(e){var t,n,r,o,a,l,i,c,u,s,d,m,p,f;return fe({},qe(e),{"*":{"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{background:null==(t=e.token)?void 0:t.colorBgContainer},"&::-webkit-scrollbar-thumb":{background:null==(n=e.token)?void 0:n.colorPrimary}},".ant-page-header-back-button, .ant-page-header-heading-title":{color:(null==(r=e.token)?void 0:r.colorWhite)+" !important"},".ant-badge-count":{color:(null==(o=e.token)?void 0:o.colorWhite)+" !important"},".ant-table-thead > tr > th":{background:ye((null==(a=e.token)?void 0:a.colorBgContainer)||"",-5)+" !important","&:hover":{background:(null==(l=e.token)?void 0:l.colorBgContainer)+" !important"}},".ant-table-filter-dropdown":{"input, .ant-table-filter-dropdown-search-input":{background:(null==(i=e.token)?void 0:i.colorBgBase)+" !important"},".ant-dropdown-menu-item, .ant-dropdown-menu":{background:(null==(c=e.token)?void 0:c.colorBgContainer)+" !important"}},".ant-tabs-tab-active":{".ant-tabs-tab-btn":{color:(null==(u=e.token)?void 0:u.colorWhite)+" !important"}},".ant-radio-button-wrapper-checked":{backgroundColor:(null==(s=e.components)||null==(s=s.Button)?void 0:s.colorBgContainer)+" !important",color:(null==(d=e.token)?void 0:d.colorWhite)+" !important"},".ant-picker-date-panel":{".ant-picker-cell-in-range, .ant-picker-cell-range-start, .ant-picker-cell-range-end":{"&::before":{background:(null==(m=e.token)?void 0:m.colorBgBase)+" !important"},".ant-picker-cell-inner":{background:(null==(p=e.token)?void 0:p.colorBgBase)+" !important"}},".ant-picker-cell-range-start, .ant-picker-cell-range-end":{".ant-picker-cell-inner":{background:(null==(f=e.token)?void 0:f.colorPrimary)+" !important"}}}})}(c);return j.createElement(He.Provider,{value:{theme:l,toggleTheme:function(){var e="dark"===l?"light":"dark";i(e),localStorage.setItem("decafAppTheme",e)}}},j.createElement(C,{theme:c},j.createElement(e,{styles:t(Re||(u=["\n @import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap);\n "],s||(s=u.slice(0)),u.raw=s,Re=u))}),j.createElement(e,{styles:d}),n.children))}function _e(e){var t=e.items,n=e.itemRender,r=e.separator,l=Me().theme,i=B.useBreakpoint(),c=t.slice(0,1).concat(t.slice(-1));return j.createElement("ul",{className:"decaf-breadcrumb "+l},function(e,t,n){var r=[];return e.forEach(function(o,l){if(o.href&&l!==e.length-1)r.push(j.createElement("li",{key:l},n?n(o):j.createElement(H,{className:"decaf-breadcrumb-link",to:o.href},o.title)));else if(o.children){var i=o.children.map(function(e,t){return{key:t,label:j.createElement(H,{className:"decaf-breadcrumb-link",to:e.href},e.title)}});r.push(j.createElement("li",{key:l},j.createElement(S,{menu:{items:i}},j.createElement("div",{style:{display:"flex",cursor:"pointer",gap:3}},j.createElement("span",null,o.title),j.createElement(a,{style:{fontSize:12}})))))}else r.push(j.createElement("li",{key:l},o.title));l<e.length-1&&r.push(j.createElement("li",{key:"sep-"+l,className:"separator"},t))}),r}(i.lg?t:c,r||j.createElement(o,null),n))}function Ue(e){var t,n,r=_(),o=null==r?void 0:r[(null==r?void 0:r.length)-1],a=void 0!==e.isFullScreen?e.isFullScreen:!(null==o||null==(t=o.handle)||!t.fullScreen),l=void 0!==e.extras?e.extras:null==o||null==(n=o.handle)?void 0:n.extras;return j.createElement(z.Content,{id:"decaf-content",style:{flex:1,minHeight:"100%"}},j.createElement(Ye,null),j.createElement(Ge,{breadcrumb:e.breadcrumb},l),j.createElement("div",{id:"decaf-layout-content-outlet",className:a?"full-screen":""},e.children))}function Ye(){var e,t,n,r=_().filter(function(e){var t;return Boolean(null==(t=e.handle)?void 0:t.crumb)}).map(function(e){return e.handle.crumb(e.data)}),o=function(){var e=document.title;return e.split(" | ").length>1?e.split(" | ")[e.split(" | ").length-1]:e}(),a=null==r||null==(e=r[r.length-1])?void 0:e.title,l="string"==typeof a?a:((null==(n=null==(t=document.getElementById("decaf-layout-breadcrumb"))?void 0:t.querySelector("li:last-child"))?void 0:n.textContent)||"").trim();return document.title=l?l+" | "+o:o,null}function Ge(e){var t=_();if(!1===e.breadcrumb)return j.createElement("div",{id:"decaf-layout-breadcrumb",style:{justifyContent:"flex-end"}},e.children);if(e.breadcrumb)return j.createElement("div",{id:"decaf-layout-breadcrumb"},e.breadcrumb,e.children);var n=t.filter(function(e){var t;return Boolean(null==(t=e.handle)?void 0:t.crumb)}).map(function(e){return e.handle.crumb(e.data)}),r=[{href:"/",title:j.createElement(l,null)}].concat(n).map(function(e,t){return fe({},e,{_key:t})});return r.length<2?j.createElement(j.Fragment,null):j.createElement("div",{id:"decaf-layout-breadcrumb"},j.createElement(_e,{items:r}),e.children)}function Ke(){var e=x.useToken().token,t=B.useBreakpoint();return j.createElement(k,{type:"link",href:"https://docs.decafhub.com",target:"_blank",rel:"noreferrer",icon:j.createElement(i,null),style:{backgroundColor:e.colorBgElevated}},!t.xs&&"Documentation")}function Xe(){return j.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 649.6 767.9",enableBackground:"new 0 0 649.6 767.9",xmlSpace:"preserve",width:32,height:32},j.createElement("g",null,j.createElement("path",{fill:"#52CEF4",d:"M324,767.9c-6.6-5.1-14.2-8.6-21.3-12.9c-22-13-44.3-25.6-66.4-38.5c-21.3-12.4-42.5-25-63.8-37.4\n c-33.5-19.5-67.1-39-100.7-58.5c-22.7-13.2-45.3-26.5-68-39.6c-2.8-1.6-3.8-3.3-3.8-6.5c0.2-58.6-0.2-117.3,0.4-175.9\n C1,333,0.7,267.3,1,201.6c0-1.8-0.6-3.7,0.6-5.4c6.4,3.8,12.7,7.6,19.1,11.3c23.8,13.9,47.7,27.9,71.5,41.8\n c4.9,2.9,9.6,6.2,14.9,8.4c-1.2,5.2-0.2,10.3-0.1,15.5c0.5,56.1-0.2,112.2,0.9,168.3c0.3,18.4,0.2,36.8,0.2,55.2\n c0,3,0.7,4.9,3.5,6.4c6.3,3.4,12.3,7.3,18.5,11c26.1,15.7,52.3,31.5,78.4,47.2c33,19.8,66,39.6,99,59.3c5.7,3.4,10.9,7.5,17.2,9.7\n c0,1.5,0.1,2.9,0.1,4.4c0,42.4,0,84.8,0,127.3c0,1.8-0.7,3.7,0.8,5.3c0,0.2,0,0.4,0,0.7C325.1,767.9,324.5,767.9,324,767.9z"}),j.createElement("path",{fill:"#227EC3",d:"M107.1,257.6c-5.3-2.2-10-5.5-14.9-8.4c-23.8-13.9-47.7-27.8-71.5-41.8c-6.4-3.7-12.7-7.6-19.1-11.3\n c8.2-6,17.1-10.7,25.7-16c28.7-17.5,57.5-34.9,86.3-52.4c39.2-23.8,78.5-47.6,117.7-71.4c27-16.3,53.9-32.7,80.9-49\n c4-2.4,8.1-4.6,11.7-7.4c1.3,0,2.7,0,4,0c0.3,1.6,1.9,1.8,2.9,2.4c31,18.9,62,37.8,93.1,56.4c4.2,2.5,5.9,5.2,5.9,10.3\n c-0.3,38.3-0.1,76.7-0.1,115c0,2.7-0.1,5.3-0.2,8c-10.5-6.3-21-12.5-31.4-18.9c-23.1-14-46.2-28-69.3-42c-1.6-1-2.8-1.6-5-0.4\n c-26.8,15.8-53.7,31.5-80.6,47.2c-26.1,15.2-52.2,30.4-78.3,45.7C145.7,235,126.4,246.3,107.1,257.6z"}),j.createElement("path",{fill:"#409DD5",d:"M324.7,630.2c5.2-4.2,11-7.4,16.7-10.9c32.6-20.3,65.3-40.6,98-60.8c30.8-19,61.6-38,92.4-57\n c7.5-4.6,7.5-4.6,7.5-13.6c0-58.6,0.1-117.3,0.1-175.9c0-1.6-0.1-3.2-0.1-4.8c0.8-1.5,0.4-3.1,0.4-4.7c0.1-14.7,0.2-29.5,0.3-44.2\n c1.3,0.1,2.4-0.4,3.4-1c8.7-5.1,17.4-10.2,26.1-15.3c15.8-9.2,31.7-18.3,47.6-27.5c10.5-6.1,21.1-12.3,31.6-18.4\n c1.5,0.9,0.8,2.4,0.8,3.6c0,124.2,0,248.4,0.1,372.6c0,2.7-0.9,4-3.1,5.3c-35.3,20.8-70.5,41.7-105.8,62.6\n c-27.2,16.1-54.5,32.2-81.7,48.4c-27,16-54,32.1-81,48c-17.4,10.3-34.8,20.4-52.3,30.7c-1.5-1.6-0.8-3.5-0.8-5.3\n c0-42.4,0-84.8,0-127.3C324.8,633.2,324.7,631.7,324.7,630.2z"}),j.createElement("path",{fill:"#227EC3",d:"M648.7,196.1c-10.5,6.1-21,12.3-31.6,18.4c-15.8,9.2-31.7,18.3-47.6,27.5c-8.7,5.1-17.4,10.2-26.1,15.3\n c-1,0.6-2.1,1.1-3.4,1c0-12.4-0.1-24.8-0.1-37.2c0-30.2,0-60.5,0-91c2.8,0.3,4.5,2,6.5,3.1c28.4,17.3,56.8,34.7,85.2,52\n C637.3,188.8,643.4,191.8,648.7,196.1z"}),j.createElement("path",{fill:"#227EC3",d:"M216.2,322.3c-0.3-1.6-0.4-2.9,1.4-4c29.2-18,58.4-36.1,87.5-54.1c4.7-2.9,9.5-5.8,14.2-8.9\n c1.5-1,2.7-1.1,4.3-0.2c26.9,15.9,53.8,31.8,80.7,47.7c7.1,4.2,14.1,8.5,21.4,12.4c3.5,1.9,4.8,4.3,3.9,8c-1.7,1.1-3.3,2.2-5,3.2\n c-20.5,11.9-41.1,23.8-61.6,35.7c-13,7.6-26.1,15.2-39.1,22.8c-7-4-14-8.1-21-12.1c-21.7-12.7-43.2-25.5-65-38\n C230.7,330.5,223.8,325.8,216.2,322.3z"}),j.createElement("path",{fill:"#52CEF4",d:"M216.2,322.3c7.6,3.5,14.5,8.2,21.8,12.4c21.7,12.5,43.3,25.3,65,38c7,4.1,14,8.1,21,12.1\n c0,39.3,0.1,78.6,0.1,117.9c-1.5,0.9-2.5-0.4-3.6-1c-21.3-12.8-42.5-25.5-63.7-38.3c-13.3-8-26.5-16.1-39.8-24\n c-1.8-1.1-2.5-2.3-2.5-4.4c0.4-26.9,0.4-53.8,1.1-80.7C215.8,343.6,215.4,332.9,216.2,322.3z"}),j.createElement("path",{fill:"#409DD5",d:"M324,502.6c0-39.3-0.1-78.6-0.1-117.9c13-7.6,26.1-15.2,39.1-22.8c20.5-11.9,41.1-23.8,61.6-35.7\n c1.7-1,3.3-2.1,5-3.2c0.1,7.6,0.1,15.2,0.1,22.8c0,30.5,0,61,0,91.5c0,2.6-0.4,4.4-2.9,5.8c-31.6,18.2-63,36.5-94.5,54.8\n C329.6,499.6,327.2,501.8,324,502.6z"})))}function Ze(e,t){if(void 0===t&&(t=!1),!e)return"";if("to"in e&&e.to){var n=e.to.substring(0,e.to.lastIndexOf("/"))||e.to;return t?n+":_parent_":e.to}return"href"in e&&e.href?e.href+(t?":_parent_":""):"children"in e&&e.children?Ze(e.children[0],!0):""}function Je(e){var t=[];return e.forEach(function(e){var n={key:Ze(e),label:e.label,icon:e.icon};"to"in e&&e.to?n.label=j.createElement(Y,{to:e.to,end:"/"===e.to},e.label):"href"in e&&e.href?n.label=j.createElement("a",{href:e.href},e.label):e.children&&(n.label=e.label,n.children=Je(e.children||[])),t.push(n)}),t}function Qe(){return j.createElement(w.Text,{type:"secondary"},"Powered by"," ",j.createElement("a",{href:"https://teloscube.com",target:"_blank",rel:"noreferrer"},"Teloscube"))}function $e(e){var t=j.useState(!1),n=t[0],r=t[1],o=_(),a=U(),l=B.useBreakpoint().md,i=Je(e.menu),s=o.map(function(e){return e.pathname}).filter(function(e){return"/"===a.pathname||"/"!==e});R(function(){l||r(!1)},[a.pathname,l]);var d=j.createElement(I,{items:i,selectedKeys:s,mode:l?"horizontal":"inline",overflowedIndicator:j.createElement(c,{style:{fontSize:20,color:"white"}}),style:{flex:"auto",justifyContent:"flex-end",backgroundColor:"transparent",border:"none",minWidth:0}});return l?d:j.createElement("div",{style:{display:"flex",flex:"auto",justifyContent:"flex-end"}},j.createElement(u,{style:{fontSize:20,marginRight:20},onClick:function(){return r(!n)}}),j.createElement(P,{open:n,footer:j.createElement(Qe,null),onClose:function(){return r(!1)},styles:{body:{padding:10}},size:document.body.clientWidth-50>350?350:.85*document.body.clientWidth},d))}function et(){return j.createElement("div",{style:{display:"flex"}},j.createElement(k,{type:"text",icon:j.createElement(s,null),title:"Scroll to top",onClick:function(){return window.scrollTo({top:0,behavior:"smooth"})}}),j.createElement(k,{type:"text",icon:j.createElement(a,null),title:"Scroll to bottom",onClick:function(){return window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})}}))}function tt(e){var t=function(){try{var e=document.getElementById("decaf-footer");return null==e||e.style.setProperty("display","none"),Promise.resolve(ie(document.body)).then(function(t){var n=t.toDataURL("image/png");null==e||e.style.setProperty("display","block");var r=document.createElement("a");r.download="screenshot.png",r.href=n,r.click(),r.remove()})}catch(e){return Promise.reject(e)}};return e.triggerNode?j.cloneElement(e.triggerNode,{onClick:t}):j.createElement(k,{type:"text",icon:j.createElement(d,null),title:"Take a screenshot of the current page",onClick:t})}function nt(e){return j.createElement(k,{type:"text",icon:j.createElement("dark"===e.theme?m:p,null),title:"dark"===e.theme?"Switch to light theme":"Switch to dark theme",onClick:function(){return e.onChange()}})}function rt(){var e=W(void 0),t=e[0],n=e[1],r=te(),o=G();R(function(){var e,t;r.me.email&&(e=r.me.email,t="https://www.gravatar.com/avatar/"+ee(e),fetch(t+"?d=404",{method:"HEAD"}).then(function(e){return 200!==e.status?void 0:t}).catch(function(){})).then(n)},[r.me.email]);var a=[{key:"me",label:r.me.fullname||r.me.username,title:r.me.email,disabled:!0,icon:j.createElement(f,null),style:{cursor:"default"}},{key:"settings",label:"Settings",title:"User Settings",icon:j.createElement(g,null),onClick:function(){return window.location.href="/webapps/waitress/production/profile"}},{key:"about",label:"About",icon:j.createElement(h,null),onClick:function(){return o("/about")}},{key:"divider-1",dashed:!0,type:"divider"},{key:"logout",label:"Logout",icon:j.createElement(b,null),onClick:function(){return we(r.client,!1)},style:{color:"orange"}},{key:"logout-all",label:"Logout All Sessions",icon:j.createElement(b,null),onClick:function(){return window.confirm("Logout from all sessions?")&&we(r.client,!0)},danger:!0}],l=t?{src:t}:{icon:j.createElement(f,{style:{color:"rgba(255,255,255, 0.5)"}}),style:{backgroundColor:"transparent",border:"1px solid rgba(255,255,255, 0.5)"}};return j.createElement(S,{trigger:["click"],menu:{items:a}},j.createElement(A,fe({},l,{style:fe({},l.style,{cursor:"pointer"})})))}function ot(e){var t=e.split("/"),n=t.indexOf("webapps");return-1===n?"":t.slice(n+3).join("/")}function at(){var e,t,n,r=-1===(t=(e=window.location.href.split("/")).indexOf("webapps"))?"":e[t+1],o=function(){var e=window.location.href.split("/"),t=e.indexOf("webapps");return-1===t?"":e[t+2]}(),a=function(e){return e.startsWith("preview-")&&e.length>8}(n=o)?"preview":function(e){return e.startsWith("v")&&e.length>1}(n)?"release":n,l=B.useBreakpoint().md,i=[{code:"development",name:"Development Version",color:"red",url:"/webapps/"+r+"/development/"+ot(window.location.href),show:"development"===process.env.NODE_ENV},{code:"testing",name:"Testing Version",color:"orange",url:"/webapps/"+r+"/testing/"+ot(window.location.href),show:!0},{code:"staging",name:"Staging Version",color:"yellow",url:"/webapps/"+r+"/staging/"+ot(window.location.href),show:!0},{code:"production",name:"Production Version",color:"green",url:"/webapps/"+r+"/production/"+ot(window.location.href),show:!0},{code:"preview",name:"Preview Version",color:"grey",url:"/",show:!1},{code:"release",name:"Release Version",color:"grey",url:"/",show:!1}],c=i.find(function(e){return e.code===a}),u="production"===(null==c?void 0:c.code);return c?j.createElement(S,{placement:"top",arrow:!0,menu:{items:i.filter(function(e){return e.show}).map(function(e){return{key:e.name,label:j.createElement("span",null,j.createElement("i",{className:"dot "+e.color})," ",e.name),onClick:function(){window.location.href=e.url}}})}},j.createElement(k,{type:"text",style:{width:u?32:"initial",padding:u?0:"revert",display:"flex",alignItems:"center",justifyContent:"center"},icon:j.createElement("i",{className:"dot "+(null==c?void 0:c.color)})},j.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},!u&&l&&j.createElement(j.Fragment,null,j.createElement("span",{style:{marginInline:5}},"You are on ",j.createElement("b",null,c.name)),j.createElement(v,null))))):null}function lt(){var e=te(),t=e.me,n=e.publicConfig,r=W(!1),o=r[0],a=r[1],l=x.useToken().token,i=B.useBreakpoint();return R(function(){if(n.zendesk&&"undefined"!=typeof document){var e=document.createElement("script");return e.src="https://static.zdassets.com/ekr/snippet.js?key="+n.zendesk,e.async=!0,e.id="ze-snippet",e.onload=function(){window.zE("webWidget","hide"),window.zE("webWidget:on","open",function(){window.zE("webWidget","show"),a(!0)}),window.zE("webWidget:on","close",function(){window.zE("webWidget","hide"),a(!1)})},document.body.appendChild(e),window.zESettings={webWidget:{offset:{horizontal:-7,vertical:20}},contactForm:{subject:!0,fields:[{id:"name",prefill:{"*":t.fullname}},{id:"email",prefill:{"*":t.email}}]}},function(){document.body.removeChild(e)}}},[n,t]),n.zendesk?j.createElement(k,{type:"link",icon:j.createElement(E,null),style:{backgroundColor:l.colorBgElevated},onClick:function(){o?null==window.zE||window.zE("webWidget","close"):null==window.zE||window.zE("webWidget","open"),a(!o)}},!i.xs&&"Support"):null}function it(e){var t,n=U(),r=K(),o=B.useBreakpoint(),a=Me(),l=a.theme,i=a.toggleTheme;return j.createElement(z,{style:{height:"100%"}},j.createElement(ut,{isAnimating:"loading"===r.state,key:n.key}),j.createElement(C,{theme:Ve},j.createElement(z.Header,{id:"decaf-header"},j.createElement(ct,{title:e.appName}),j.createElement($e,{title:e.appName,menu:e.menu}),j.createElement(rt,null))),j.createElement(X,null),null!=(t=e.children)?t:null,j.createElement(C,{theme:Ve},j.createElement(z.Footer,{id:"decaf-footer"},j.createElement(L,{justify:"space-between",align:"middle"},j.createElement(T,{span:o.lg?10:12},j.createElement(lt,null),j.createElement("span",{style:{display:"inline-block",width:1}}),j.createElement(Ke,null)),j.createElement(T,{span:o.lg?4:0,style:{textAlign:"center"}},j.createElement(Qe,null)),j.createElement(T,{span:o.lg?10:12,style:{justifyContent:"flex-end",display:"flex",gap:10}},j.createElement(at,null),j.createElement(nt,{theme:l,onChange:i}),j.createElement(tt,null),j.createElement(et,null))))))}function ct(e){var t=e.title,n=B.useBreakpoint();return j.createElement(H,{to:"/",style:{display:"flex",alignItems:"center",gap:10}},j.createElement(Xe,null),n.lg&&j.createElement(w.Title,{level:1,style:{margin:0,fontWeight:"normal",fontSize:20,color:"rgba(255, 255, 255, 0.75)",whiteSpace:"nowrap"}},t))}function ut(e){var t=le({isAnimating:e.isAnimating}),n=t.animationDuration;return j.createElement("div",{style:{opacity:t.isFinished?0:1,pointerEvents:"none",transition:"opacity "+n+"ms linear"}},j.createElement("div",{style:{background:"#29d",height:2,left:0,marginLeft:100*(-1+t.progress)+"%",position:"fixed",top:0,transition:"margin-left "+n+"ms linear",width:"100%",zIndex:1031}},j.createElement("div",{style:{boxShadow:"0 0 10px #29d, 0 0 5px #29d",display:"block",height:"100%",opacity:1,position:"absolute",right:0,transform:"rotate(3deg) translate(0px, -4px)",width:100}})))}function st(e){var t=te().client,n=W(void 0),r=n[0],o=n[1],a=W(void 0),l=a[0],i=a[1],c=W(void 0),u=c[0],s=c[1];return R(function(){t.bare.get("/_cultproxy").then(function(e){return o(e.data.version)}),t.barista.get("/version/").then(function(e){return i(e.data.version)}),t.bare.get("/apis/estate/version").then(function(e){return s(e.data)})},[t]),j.createElement(Ue,null,j.createElement(L,{gutter:[16,16]},j.createElement(T,{xs:{span:24},sm:{span:24},md:{span:24},lg:{span:12},xl:{span:8},xxl:{span:6}},j.createElement(F,{variant:"borderless"},j.createElement(N,{title:"Application Name",value:e.appName}))),j.createElement(T,{xs:{span:24},lg:{span:12},xl:{span:16},xxl:{span:18}},j.createElement(F,{variant:"borderless"},j.createElement(N,{title:"Application Description",value:e.appDescription}))),j.createElement(T,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},j.createElement(F,{variant:"borderless"},j.createElement(N,{title:"Application Version",value:e.appVersion,prefix:"v"}))),j.createElement(T,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},j.createElement(F,{variant:"borderless"},j.createElement(N,{title:"DECAF Cultproxy Version",value:r,prefix:"v"}))),j.createElement(T,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},j.createElement(F,{variant:"borderless"},j.createElement(N,{title:"DECAF Barista Version",value:l,prefix:"v"}))),j.createElement(T,{xs:{span:24},sm:{span:24},md:{span:12},lg:{span:12},xl:{span:6},xxl:{span:6}},j.createElement(F,{variant:"borderless"},j.createElement(N,{title:"DECAF Estate Version",value:u,prefix:"v"}))),j.createElement(T,{span:24},e.content)))}var dt=["crumb","fullScreen","extras","children"];function mt(e){R(function(){var e=function(){var e=document.createElement("script");return e.defer=!0,e.setAttribute("data-domain",location.hostname),e.src="https://webax.svc.sys.decafhub.com/js/plausible.js",e}();return document.body.appendChild(e),function(){document.body.removeChild(e)}},[]);var t=e.controller||re;return t.disableZendeskWidget=!0,j.createElement(Oe,{themeConfig:e.themeConfig,theme:e.theme},j.createElement(D,null,j.createElement(ne,{config:e.config,controller:t},j.createElement(pt,fe({},e)))))}function pt(e){var t,r,o=te(),a=[{path:"/about",element:j.createElement(st,{appName:e.appName,appVersion:null==(t=e.config)?void 0:t.currentVersion,appDescription:e.appDescription,content:null==e.buildAboutPageContent?void 0:e.buildAboutPageContent(o)}),crumb:function(){return{title:"About"}}},{path:"*",element:j.createElement(Ue,null,j.createElement(de,null)),crumb:function(){return{title:"Page Not Found"}}}],l=Se(e.buildRouteItems(o),a,"path"),i=Z(function(e,t,r){var o=e.buildMenuItems(t);return[{element:j.createElement(oe,{adapter:ae,options:{removeDefaultsFromUrl:!0,searchStringToObject:n.parse,objectToSearchString:n.stringify,enableBatching:!0,includeAllParams:!0}},j.createElement(it,{menu:o,appName:e.appName})),path:"/",children:r.map(ft),errorElement:j.createElement(it,{menu:o,appName:e.appName},j.createElement(Ue,{breadcrumb:!1},j.createElement(pe,null)))}]}(e,o,l),{basename:null==(r=e.config)?void 0:r.basePath});return j.createElement(J,{router:i})}function ft(e){var t=e.crumb,n=e.fullScreen,r=e.extras,o=e.children;return fe({},function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,dt),o?{handle:{crumb:t,fullScreen:n,extras:r},children:o.map(ft)}:{handle:{crumb:t,fullScreen:n,extras:r}})}export{mt as DecafWebapp,ge as Direction,Ue as Page,ue as Page401,se as Page403,de as Page404,me as PageError,ke as booleanMap,Ve as decafThemeDark,We as decafThemeLight,Be as directionMap,Ie as getSearchParam,Ae as getSearchParamAll,Pe as getSearchParamDefault,ze as getSearchParams,xe as nullableBooleanMap,Se as setAtKey,Ce as toDirection,Me as useDecafTheme,he as useRemaningHeight,be as useTableMaxHeight};
|
|
2
2
|
//# sourceMappingURL=index.module.js.map
|