tocco-devcon 1.0.12 → 1.0.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tocco-devcon",
3
- "version": "1.0.12",
3
+ "version": "1.0.15",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1 +0,0 @@
1
- (self.webpackChunktocco_devcon=self.webpackChunktocco_devcon||[]).push([[85],{5702:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>_r});var r,o=t(80467),i=t(14911),a=t(34206),c=t(46458),l=t(48479),s=t(1024),u=t.n(s),f=t(88265),d=t.n(f),p=(t(46444),t(44066)),h=t(70696),g=t(10535),m=t(78958),v=t(53124),b=t.n(v),y=t(86048),x=t.n(y),w=t(29163),j=t(37188);const k=(0,w.ZP)(j.hc).withConfig({displayName:"StyledSignalList"})(r||(r=x()(["\n && {\n list-style-type: none;\n }\n"])));var O=t(85893);const P=function(e){return(0,O.jsx)(k,{as:"ul",children:u().Children.map(e.children,(function(e){return u().cloneElement(e)}))})};var Z,S,C=t(88162),_=t(32884),R=t.n(_),E=t(88601),D=t(58664),N=(Z={},d()(Z,m.Z.condition.BASE,"inherit"),d()(Z,m.Z.condition.DANGER,E.Z.color("signal.danger.text")),d()(Z,m.Z.condition.PRIMARY,(function(e){return(0,D.HO)(R()(e.theme,"colors.primary"),1)})),d()(Z,m.Z.condition.SUCCESS,E.Z.color("signal.success.text")),d()(Z,m.Z.condition.WARNING,E.Z.color("signal.warning.text")),d()(Z,m.Z.condition.INFO,E.Z.color("signal.info.text")),Z),L=(0,w.ZP)(j.EF).withConfig({displayName:"StyledSignalListItem"})(S||(S=x()(["\n && {\n color: ",";\n position: relative;\n\n > i,\n > svg {\n position: absolute;\n left: -1.6rem;\n text-align: left;\n }\n\n > svg {\n top: 0.2em;\n }\n }\n"])),(function(e){return function(e){return N[e.condition]||"inherit"}(e)}));L.propTypes={condition:m.Z.conditionPropTypes(N)};const T=L;var I,A,M=(I={},d()(I,m.Z.condition.BASE,!1),d()(I,m.Z.condition.PRIMARY,!1),d()(I,m.Z.condition.DANGER,"times"),d()(I,m.Z.condition.SUCCESS,"check"),d()(I,m.Z.condition.WARNING,"exclamation-triangle"),d()(I,m.Z.condition.INFO,"info"),I),F=function(e){var n=M[e.condition];return n?(0,O.jsx)(C.Z,{icon:n,position:m.Z.position.SOLE}):A||(A=(0,O.jsx)("i",{children:"•"}))},V=function(e){return(0,O.jsxs)(T,{condition:e.condition,children:[F(e),e.label,u().Children.map(e.children,(function(e){return u().cloneElement(e)}))]})};V.defaultProps={condition:m.Z.condition.BASE};const q={List:P,Item:V};const z=function(e){if(!e.error)return null;var n=[];return Object.keys(e.error).forEach((function(t){n.push.apply(n,b()(e.error[t]))})),(0,O.jsx)(q.List,{children:n.map((function(e,n){return(0,O.jsx)(q.Item,{condition:"danger",label:e},n)}))})};var B,W,H,$,U,G,Y,K,Q=t(19908),J=t(7281),X=t(30759),ee=t(40953),ne="1.1px",te=function(e){var n=e.isDisplay,t=e.immutable;return"cursor: ".concat(!n&&t?"not-allowed":"auto",";")},re=w.ZP.div.withConfig({displayName:"StyledLabelWrapper"})(H||(H=x()(["\n width: calc(100% - ",");\n"])),J.Z.space(.5)),oe=w.ZP.label.withConfig({displayName:"StyledStatedValueLabel"})($||($=x()(["\n &&& {\n ","\n background-color: ",";\n color: ",";\n left: ",";\n margin: calc("," / -2) 0 0;\n padding: 1px ","; // 1px to prevent label bottom from being cut\n position: absolute;\n top: 50%;\n width: ",";\n height: calc("," + 1px);\n overflow: hidden;\n ","\n ","\n pointer-events: ",";\n padding-left: ",";\n\n span {\n white-space: nowrap;\n }\n }\n"])),(0,X.Z)({fontSize:J.Z.font(0),fontWeight:function(e){return e.dirty?E.Z.fontWeight("bold"):E.Z.fontWeight("regular")},lineHeight:1}),E.Z.color("paper"),(function(e){return ee.v[(n=e,t=n.isDisplay,r=n.secondaryPosition,o=n.immutable,i=n.signal,a=n.hasValue,i?"signal":a?"hasValue":t&&r&&o&&!i?"shade1":t?r?"shade0":"shade1":r?"shade1":o?"shade0":i?"signal":"shade1")](e);var n,t,r,o,i,a}),J.Z.space(-2),J.Z.font(0),J.Z.space(-2),(function(e){return e.secondaryPosition?"auto":"inherit"}),J.Z.font(0),(function(e){return n=e.secondaryPosition,(0,w.iv)(B||(B=x()(["\n &&& {\n ","\n }\n"])),n&&(0,w.iv)(W||(W=x()(["\n top: 0;\n font-size: ",";\n margin: calc("," / -2) 0 0;\n "])),J.Z.font(-.8),J.Z.font(-.5)));var n}),(function(e){return te(e)}),(function(e){return e.secondaryPosition?"auto":"none"}),(function(e){return e.immutable&&"0"})),ie=w.ZP.div.withConfig({displayName:"StyledStatedValueBox"})(U||(U=x()(["\n &&& {\n border: "," solid ",";\n padding: "," "," "," ",";\n position: relative;\n ","\n ","\n margin-top: ",";\n padding-left: ",";\n padding-top: ",";\n\n * {\n padding-left: ",";\n margin-bottom: 0;\n }\n\n > "," {\n padding-top: ",";\n position: relative;\n top: 5px;\n\n p:first-of-type {\n margin-top: 0;\n }\n }\n }\n"])),ne,(function(e){return ee.m[(n=e,t=n.immutable,r=n.isDisplay,o=n.signal,n.isDirty?"isDirty":r||t?"transparent":o?"signal":"shade1")](e);var n,t,r,o}),J.Z.space(-1),J.Z.space(-1),J.Z.space(-2),J.Z.space(-1),(function(e){return!e.immutable&&(0,D.kk)(e)}),(function(e){return te(e)}),(function(e){return e.isDisplay&&J.Z.space(-1)}),(function(e){return e.immutable&&J.Z.space(-2)}),(function(e){var n=e.isDisplay,t=e.immutable;return n&&t&&J.Z.space(-1)}),(function(e){return e.isDisplay&&"0"}),Q.j,(function(e){return e.isDisplay&&J.Z.space(-1)})),ae=w.ZP.p.withConfig({displayName:"StyledStatedValueDescription"})(G||(G=x()(["\n &&& {\n ","\n }\n"])),(0,X.Z)({fontSize:J.Z.font(-1)})),ce=w.ZP.div.withConfig({displayName:"StyledStatedValueError"})(Y||(Y=x()([""]))),le=w.ZP.div.withConfig({displayName:"StyledStatedValueWrapper"})(K||(K=x()(["\n &&& {\n margin-bottom: ",";\n padding-top: ",";\n\n ",",\n ",",\n "," {\n margin-bottom: ",";\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n ",",\n "," {\n margin-left: calc("," + ",");\n\n "," {\n margin-left: -",";\n }\n }\n }\n"])),J.Z.space(-1),J.Z.space(-2),ie,ae,ce,J.Z.space(-2),ae,ce,J.Z.space(-1),ne,j.hc,J.Z.space(-2));function se(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ue(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?se(Object(t),!0).forEach((function(n){d()(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}const fe=function(e){var n,t,r=e.children,o=e.description,i=e.dirty,a=e.fixLabel,c=e.isDisplay,l=e.error,s=e.hasValue,u=e.id,f=e.label,d=e.mandatory,v=e.mandatoryTitle,b=e.immutable,y=e.touched,x=e.signal,w=!b&&y&&l&&Object.keys(l).length>0,j="".concat(h.Z.adjustedHTMLString(f)).concat(d&&v?", ".concat(v):""),k=x||function(e,n,t,r){return n?m.Z.condition.DANGER:e?m.Z.condition.INFO:t&&!r?m.Z.condition.WARNING:void 0}(i,w,d,s);return(0,O.jsx)(p.Z,{children:function(e){var p=e.focused,h=e.getRef,m=!b&&p||s||c||a;return(0,O.jsxs)(le,{ref:h,secondaryPosition:m,children:[(0,O.jsxs)(ie,{className:"StyledStatedValueBox",hasValue:s,immutable:b,isDisplay:c,signal:k,children:[r,f&&(0,O.jsx)(re,{children:(0,O.jsx)(oe,ue(ue({},!c&&!b&&{htmlFor:u}),{},{hasValue:s,dirty:i,title:j,secondaryPosition:m,immutable:b,isDisplay:c,signal:k,children:(0,O.jsx)("span",{dangerouslySetInnerHTML:{__html:"".concat(g.Z.sanitizeHtml(f)).concat(d?" *":"")}})}))})]}),o&&(n||(n=(0,O.jsx)(ae,{children:o}))),w&&(t||(t=(0,O.jsx)(ce,{children:(0,O.jsx)(z,{error:l})})))]})}})};var de,pe,he=t(87343),ge=t(65035),me=t(28655),ve=t.n(me),be=t(51032),ye=w.ZP.input.withConfig({displayName:"StyledInput"})(de||(de=ve()(["\n && {\n ","\n }\n"])),be.k9),xe=w.ZP.div.withConfig({displayName:"StyledInputWrapper"})(pe||(pe=ve()(["\n && {\n ","\n }\n"])),be.yP);const we=function(e){var n=e.fragments,t=e.selectedFragments,r=e.disabled,o=e.setFragmentSelected;return(0,O.jsx)(O.Fragment,{children:n.map((function(e){return(0,O.jsxs)("div",{children:[(0,O.jsx)("input",{type:"checkbox",id:e.id,checked:t.includes(e.id),onChange:(n=e.id,function(e){o(n,e.target.checked)}),disabled:r}),(0,O.jsx)(a.ZP.Label,{for:e.id,children:e.label})]},e.id);var n}))})};const je=function(e){var n=e.version,t=e.modules,r=e.selectedModules,o=e.fragments,i=e.selectedFragments,a=e.ignoreErrors,c=e.running,l=e.disabled,u=e.executeDbRefactoring,f=e.loadModules,d=e.loadFragments,p=e.setSelectedModules,h=e.setFragmentSelected,g=e.setVersion,m=e.setIgnoreErrors;(0,s.useEffect)((function(){0===t.length&&f(),0===o.length&&d()}),[]);return(0,O.jsxs)("form",{onSubmit:function(e){e.preventDefault(),u()},children:[(0,O.jsx)(fe,{label:"Modules (none selected => all)",hasValue:r.length>0,children:(0,O.jsx)(he.Z,{options:t,value:r,onChange:p,isMulti:!0,immutable:l})}),(0,O.jsx)(fe,{label:"Fragments",fixLabel:!0,children:(0,O.jsx)(we,{fragments:o,selectedFragments:i,disabled:l,setFragmentSelected:h})}),(0,O.jsx)(fe,{label:"Version",hasValue:n.length>0,children:(0,O.jsx)(xe,{children:(0,O.jsx)(ye,{value:n,onChange:function(e){var n=e.target.value.replaceAll(/[^\d\\.]/g,"");g(n)},disabled:l})})}),(0,O.jsx)(fe,{label:"Ignore errors",fixLabel:!0,children:(0,O.jsx)("input",{type:"checkbox",checked:a,onChange:function(e){m(e.target.checked)},disabled:l})}),(0,O.jsx)(ge.Z,{type:"submit",label:"Execute",look:"raised",pending:c,disabled:l})]})};var ke={loadModules:l.H6,loadFragments:l.VL,setSelectedModules:l.pi,setFragmentSelected:l.LO,setVersion:l.xO,setIgnoreErrors:l.Pm,executeDbRefactoring:l.KK};const Oe=(0,c.connect)((function(e){var n=e.dbRefactoring,t=n.dbRefactoring,r=n.languageUpgrade;return{version:t.version,modules:t.modules,selectedModules:t.selectedModules,fragments:t.fragments,selectedFragments:t.selectedFragments,ignoreErrors:t.ignoreErrors,running:t.running,disabled:t.running||r.running}}),ke)(je);const Pe=function(e){var n=e.language,t=e.running,r=e.disabled,o=e.executeLanguageUpgrade,i=e.setLanguage;return(0,O.jsxs)("form",{onSubmit:function(e){e.preventDefault(),o()},children:[(0,O.jsx)(fe,{label:"Language",hasValue:n.length>0,children:(0,O.jsx)(xe,{children:(0,O.jsx)(ye,{value:n,onChange:function(e){i(e.target.value)},disabled:r})})}),(0,O.jsx)(ge.Z,{type:"submit",label:"Execute language upgrade",look:"raised",pending:t,disabled:r})]})};var Ze={setLanguage:l.m0,executeLanguageUpgrade:l.b7};const Se=(0,c.connect)((function(e){var n=e.dbRefactoring,t=n.dbRefactoring,r=n.languageUpgrade;return{language:r.language,running:r.running,disabled:r.running||t.running}}),Ze)(Pe);var Ce,_e,Re,Ee;const De=function(){return(0,O.jsxs)(O.Fragment,{children:[Ce||(Ce=(0,O.jsx)(a.ZP.H1,{children:"Database Refactoring"})),_e||(_e=(0,O.jsx)(Oe,{})),Re||(Re=(0,O.jsx)(a.ZP.H1,{children:"Language Upgrade"})),Ee||(Ee=(0,O.jsx)(Se,{}))]})};var Ne,Le,Te,Ie,Ae,Me,Fe,Ve=t(63038),qe=t.n(Ve),ze={ERROR:"#a00"},Be=w.ZP.div.withConfig({displayName:"StyledLogTable"})(Ne||(Ne=ve()(["\n display: grid;\n gap: 1px;\n"]))),We=w.ZP.div.withConfig({displayName:"StyledLogEntry"})(Le||(Le=ve()(["\n display: grid;\n height: fit-content;\n grid-template-columns: repeat(3, 1fr);\n padding: 1em;\n ","\n"])),(function(e){return"border: 1px solid ".concat(ze[e.level]||"#ddd",";")})),He=w.ZP.span.withConfig({displayName:"StyledMessage"})(Te||(Te=ve()(["\n grid-column: 1 / 3;\n ","\n\n && {\n ","\n }\n"])),(function(e){return e.expandable&&"cursor: pointer;"}),(0,X.Z)()),$e=w.ZP.span.withConfig({displayName:"StyledTime"})(Ie||(Ie=ve()(["\n grid-column-start: 3;\n text-align: right;\n\n && {\n ","\n }\n"])),(0,X.Z)()),Ue=w.ZP.div.withConfig({displayName:"StyledExceptionDetails"})(Ae||(Ae=ve()(["\n margin-top: 1em;\n"]))),Ge=w.ZP.div.withConfig({displayName:"StyledDetailMessage"})(Me||(Me=ve()(["\n margin-bottom: 1em;\n\n && {\n ","\n }\n"])),(0,X.Z)()),Ye=w.ZP.div.withConfig({displayName:"StyledStackTrace"})(Fe||(Fe=ve()(["\n && {\n ","\n }\n"])),(0,X.Z)()),Ke=function(e){return"".concat(e.declaringClass,".").concat(e.methodName,":").concat(e.lineNumber)};const Qe=function(e){var n=e.exception;return(0,O.jsxs)(Ue,{children:[(0,O.jsx)(Ge,{children:n.detailMessage}),(0,O.jsx)(Ye,{children:n.stackTrace.map((function(e,n){return(0,O.jsx)("div",{children:Ke(e)},n)}))})]})};const Je=function(e){var n=e.entry,t=(0,s.useState)(!1),r=qe()(t,2),o=r[0],i=r[1];return(0,O.jsxs)(We,{level:n.level,children:[(0,O.jsx)(He,{onClick:function(){n.exception&&i(!o)},expandable:!!n.exception,children:n.message}),(0,O.jsx)($e,{children:new Date(n.timestamp).toLocaleString()}),o&&(0,O.jsx)(Qe,{exception:n.exception})]})};var Xe;const en=function(e){var n=e.entries;return(0,O.jsx)(Be,{children:n.length>0?n.map((function(e){return(0,O.jsx)(Je,{entry:e},e.key)})):Xe||(Xe=(0,O.jsx)(a.ZP.Span,{children:"No entries so far."}))})};const nn=(0,c.connect)((function(e){return{entries:e.log.entries}}),{})(en);var tn,rn;const on=function(){return(0,O.jsxs)(O.Fragment,{children:[tn||(tn=(0,O.jsx)(a.ZP.H1,{children:"Log"})),rn||(rn=(0,O.jsx)(nn,{}))]})};var an,cn,ln=t(49478),sn=w.ZP.div.withConfig({displayName:"StyledCheckEventGroup"})(an||(an=ve()(["\n margin: 1em 0;\n border: 1px solid #ddd;\n border-radius: 5px;\n padding: 1em;\n"]))),un=w.ZP.div.withConfig({displayName:"StyledGroupHeading"})(cn||(cn=ve()(["\n margin-bottom: 1em;\n"])));function fn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(!e)return;if("string"==typeof e)return dn(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return dn(e,n)}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(c)throw i}}}}function dn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}const pn=function(e){var n=e.type,t=e.events,r=e.selection,o=e.setSelected,i=function(e,n){var t,r=fn(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(!n.has(o.id))return!1}}catch(e){r.e(e)}finally{r.f()}return!0}(t,r);return(0,O.jsxs)(sn,{children:[(0,O.jsxs)(un,{children:[(0,O.jsx)("input",{type:"checkbox",id:"checkbox-"+n,checked:i,onChange:function(e){o(t.map((function(e){return e.id})),e.target.checked)}}),(0,O.jsx)(a.ZP.Label,{for:"checkbox-"+n,children:(0,O.jsxs)(a.ZP.B,{children:[n," (",t.length,")"]})})]}),t.map((function(e){return(0,O.jsxs)("div",{children:[(0,O.jsx)("input",{type:"checkbox",id:"checkbox-"+e.id,checked:r.has(e.id),onChange:(n=e.id,function(e){o([n],e.target.checked)})}),(0,O.jsx)(a.ZP.Label,{for:"checkbox-"+e.id,children:e.label})]},e.id);var n}))]})};const hn=function(e){var n=e.checkEvents,t=e.selection,r=e.setSelected,o=e.generateSql,i=e.generateChangelog;return(0,O.jsxs)("div",{children:[Object.keys(n).length>0&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(ge.Z,{look:"raised",onClick:o,disabled:0===t.size,children:["Generate SQL ",t.size>0&&"(".concat(t.size,")")]}),(0,O.jsxs)(ge.Z,{look:"raised",onClick:i,disabled:0===t.size,children:["Generate Changelog ",t.size>0&&"(".concat(t.size,")")]})]}),(0,O.jsx)("div",{children:Object.keys(n).sort().map((function(e){return(0,O.jsx)(pn,{type:e,events:n[e],selection:t,setSelected:r},e)}))})]})};var gn={setSelected:ln.Pq,generateSql:ln.$i,generateChangelog:ln._w};const mn=(0,c.connect)((function(e){return{checkEvents:e.modelValidation.checkEvents,selection:e.modelValidation.selection}}),gn)(hn);var vn,bn,yn,xn=w.ZP.div.withConfig({displayName:"StyledProgressBar"})(vn||(vn=ve()(["\n width: 100%;\n border: 1px solid #ddd;\n height: 20px;\n position: relative;\n margin: 1em 0;\n"]))),wn=w.ZP.div.withConfig({displayName:"StyledInnerProgress"})(bn||(bn=ve()(["\n position: absolute;\n background-color: #ddd;\n height: 100%;\n width: ","%;\n"])),(function(e){return e.percentage})),jn=w.ZP.div.withConfig({displayName:"StyledProgressText"})(yn||(yn=ve()(["\n position: absolute;\n top: 0;\n width: 100%;\n text-align: center;\n\n && {\n ","\n }\n"])),(0,X.Z)()),kn=function(e){return e.result?e.result:e.running?e.total?"".concat(On(e),"%"):"Preparing...":"Not started"},On=function(e){return e.running&&e.total?Math.round(e.currentIndex/e.total*100):0};const Pn=function(e){var n=e.state;return(0,O.jsxs)(xn,{children:[(0,O.jsx)(wn,{percentage:On(n)}),(0,O.jsx)(jn,{children:kn(n)})]})};const Zn=function(e){var n=e.state,t=e.startValidation;return(0,O.jsxs)("div",{children:[(0,O.jsx)(ge.Z,{look:"raised",pending:n.running,disabled:n.running,onClick:t,children:"Execute"}),(0,O.jsx)(Pn,{state:n})]})};var Sn={startValidation:ln.YV};const Cn=(0,c.connect)((function(e){return{state:e.modelValidation.state}}),Sn)(Zn);var _n,Rn,En;const Dn=function(){return(0,O.jsxs)(O.Fragment,{children:[_n||(_n=(0,O.jsx)(a.ZP.H1,{children:"Model Validation"})),Rn||(Rn=(0,O.jsx)(Cn,{})),En||(En=(0,O.jsx)(mn,{}))]})};var Nn=t(22541),Ln=t(87852),Tn=t.n(Ln),In=t(2091),An=t(49325),Mn=t(30381),Fn=t.n(Mn);function Vn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function qn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Vn(Object(t),!0).forEach((function(n){d()(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Vn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var zn="YYYY-MM-DD[T]HH:mm:ss.SSS[Z]",Bn="YYYY-MM-DD";const Wn={datetime:{type:"date",icons:{range:"calendar-plus",single:"calendar-minus"},toRange:function(e){return{from:e?Fn()(e).utc().format(zn):null,to:e?Fn()(e).utc().add(1,"d").format(zn):null,isRangeValue:!0}},fromRange:function(e){return e&&e.from?Fn().utc(e.from,zn).local().format(Bn):e&&e.to?Fn().utc(e.to,zn).local().format(Bn):null},getToOptions:function(e,n){return qn(qn({},e),{},{flatpickrOptions:{minDate:n}})},getFromOptions:function(e,n){return qn(qn({},e),{},{flatpickrOptions:{maxDate:n}})}},date:{icons:{range:"calendar-plus",single:"calendar-minus"},getToOptions:function(e,n){return qn(qn({},e),{},{flatpickrOptions:{minDate:n}})},getFromOptions:function(e,n){return qn(qn({},e),{},{flatpickrOptions:{maxDate:n}})}}};var Hn,$n,Un,Gn,Yn,Kn,Qn,Jn=w.ZP.div.withConfig({displayName:"StyledInputWrapper"})(Hn||(Hn=x()(["\n width: calc(100% - 20px); // subtract extender width\n"]))),Xn=w.ZP.div.withConfig({displayName:"StyledInputItemWrapper"})($n||($n=x()(["\n display: inline-block;\n width: 50%;\n\n * {\n line-height: unset !important;\n text-align: center;\n }\n"]))),et=w.ZP.div.withConfig({displayName:"StyledIconWrapper"})(Un||(Un=x()(["\n font-size: ",";\n display: flex;\n align-items: center;\n"])),J.Z.font(-2.7)),nt=w.ZP.div.withConfig({displayName:"StyledRange"})(Gn||(Gn=x()(["\n display: flex;\n"]))),tt=w.ZP.div.withConfig({displayName:"StyledInput"})(Yn||(Yn=x()(["\n flex: 1;\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n width: inherit;\n"]))),rt=w.ZP.div.withConfig({displayName:"StyledExtender"})(Kn||(Kn=x()(["\n display: flex;\n align-items: center;\n position: relative;\n left: 2px;\n z-index: 1;\n"])));function ot(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function it(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ot(Object(t),!0).forEach((function(n){d()(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ot(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}const at=function(e){var n,t,r=e.value,o=e.events,i=e.readOnly,a=e.type,c=e.options,l=e.fromText,u=e.toText,f=(null==r?void 0:r.isRangeValue)||!1,d=(0,s.useRef)(r);d.current=r;var p=(0,s.useMemo)((function(){return it(it({},o),{},{onChange:function(e){o.onChange(e)}})}),[o]),h={onChange:function(e){o.onChange(it(it({},d.current),{},{to:e}))}},g={onChange:function(e){o.onChange(it(it({},d.current),{},{from:e}))}},m=Wn[a],v=(null==m||null===(n=m.icons)||void 0===n?void 0:n.range)||"chevron-down",b=(null==m||null===(t=m.icons)||void 0===t?void 0:t.single)||"chevron-left",y=(null==m?void 0:m.type)||a;return(0,O.jsxs)(nt,{children:[(0,O.jsx)(Jn,{children:f?(0,O.jsxs)(tt,{children:[(0,O.jsx)(Xn,{children:(0,O.jsx)(An.Z,it(it({},e),{},{options:function(e,n){return null!=m&&m.getFromOptions?m.getFromOptions(e,n):e}(c,r.to),value:(null==r?void 0:r.from)||null,events:g,placeholder:l}))}),Qn||(Qn=(0,O.jsx)(et,{children:(0,O.jsx)(C.Z,{icon:"horizontal-rule"})})),(0,O.jsx)(Xn,{children:(0,O.jsx)(An.Z,it(it({},e),{},{options:function(e,n){return null!=m&&m.getToOptions?m.getToOptions(e,n):e}(c,r.from),value:(null==r?void 0:r.to)||null,events:h,placeholder:u}))})]}):(0,O.jsx)(An.Z,it(it({type:y},Tn()(e,["type"])),{},{events:p}))}),(0,O.jsx)(rt,{children:(0,O.jsx)(In.Z,{disabled:i,icon:f?b:v,onClick:function(){var e=f?function(e){return null!=m&&m.fromRange?m.fromRange(e):(null==e?void 0:e.from)||(null==e?void 0:e.to)||null}(r):function(e){return null!=m&&m.toRange?m.toRange(e):{from:e,to:e,isRangeValue:!0}}(r);o.onChange(e)}})})]})};const ct=function(e){var n=e.active,t=e.elapsed,r=e.setActive,o=e.setElapsed;return(0,O.jsxs)("div",{children:[(0,O.jsx)(fe,{label:"Active",fixLabel:!0,children:(0,O.jsx)("input",{type:"checkbox",checked:n,onChange:function(e){r(e.target.checked)}})}),(0,O.jsx)(fe,{label:"Elapsed",hasValue:!!t,children:(0,O.jsx)(at,{fromText:"from",toText:"to",type:"number",value:t,options:{postPointDigits:0,fixedDecimalScale:!0},events:{onChange:function(e){o(e)}}})})]})};var lt={setActive:Nn.Iv,setElapsed:Nn.uI};const st=(0,c.connect)((function(e){return{active:e.sqlLog.active,elapsed:e.sqlLog.elapsed}}),lt)(ct);var ut,ft,dt,pt,ht,gt,mt,vt={ERROR:"#a00"},bt=w.ZP.div.withConfig({displayName:"StyledLogTable"})(ut||(ut=ve()(["\n display: grid;\n gap: 1px;\n"]))),yt=w.ZP.div.withConfig({displayName:"StyledLogEntry"})(ft||(ft=ve()(["\n display: grid;\n height: fit-content;\n grid-template-columns: repeat(3, 1fr);\n padding: 1em;\n ","\n"])),(function(e){return"border: 1px solid ".concat(vt[e.level]||"#ddd",";")})),xt=w.ZP.span.withConfig({displayName:"StyledStatementHeader"})(dt||(dt=ve()(["\n grid-column: 1 / 3;\n ","\n\n && {\n ","\n }\n"])),(function(e){return e.expandable&&"cursor: pointer;"}),(0,X.Z)()),wt=w.ZP.span.withConfig({displayName:"StyledStatement"})(pt||(pt=ve()(["\n grid-column: 1 / 3;\n margin-top: 1em;\n\n && {\n ","\n }\n"])),(0,X.Z)()),jt=w.ZP.span.withConfig({displayName:"StyledTime"})(ht||(ht=ve()(["\n grid-row-start: 1;\n grid-column-start: 3;\n text-align: right;\n\n && {\n ","\n }\n"])),(0,X.Z)()),kt=w.ZP.span.withConfig({displayName:"StyledElapsedContainer"})(gt||(gt=ve()(["\n grid-column-start: 3;\n text-align: right;\n margin-top: 1em;\n\n && {\n ","\n }\n"])),(0,X.Z)()),Ot=w.ZP.span.withConfig({displayName:"StyledElapsed"})(mt||(mt=ve()(["\n background-color: ",";\n border-radius: 5px;\n padding: 0.5em;\n"])),(function(e){return(n=e.elapsed)>=1e3?"#f00":n>=500?"#ff8c00":n>=100?"#ff0":"#dedede";var n}));const Pt=function(e){var n=e.entry,t=(0,s.useState)(!1),r=qe()(t,2),o=r[0],i=r[1],a=n.sql.length>100,c=a?n.sql.substr(0,100)+"...":n.sql;return(0,O.jsxs)(yt,{children:[(0,O.jsx)(xt,{expandable:a,onClick:function(){a&&i(!o)},children:c}),o&&(0,O.jsx)(wt,{children:n.sql}),(0,O.jsx)(jt,{children:new Date(n.timestamp.iMillis).toLocaleString()}),(0,O.jsx)(kt,{children:(0,O.jsxs)(Ot,{elapsed:n.elapsed,children:[n.elapsed," ms"]})})]})};var Zt;const St=function(e){var n=function(e,n){return n?e.filter((function(e){return!0===n.isRangeValue?e.elapsed>=n.from&&e.elapsed<=n.to:e.elapsed>=n})):e}(e.entries,e.elapsed);return(0,O.jsx)(bt,{children:n.length>0?n.map((function(e){return(0,O.jsx)(Pt,{entry:e},e.key)})):Zt||(Zt=(0,O.jsx)(a.ZP.Span,{children:"No entries so far."}))})};const Ct=(0,c.connect)((function(e){return{entries:e.sqlLog.entries,elapsed:e.sqlLog.elapsed}}),{})(St);var _t,Rt,Et;const Dt=function(){return(0,O.jsxs)(O.Fragment,{children:[_t||(_t=(0,O.jsx)(a.ZP.H1,{children:"SQL Log"})),Rt||(Rt=(0,O.jsx)(st,{})),Et||(Et=(0,O.jsx)(Ct,{}))]})};function Nt(e,n){return Nt=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},Nt(e,n)}function Lt(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,Nt(e,n)}function Tt(){return Tt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Tt.apply(this,arguments)}function It(e){return"/"===e.charAt(0)}function At(e,n){for(var t=n,r=t+1,o=e.length;r<o;t+=1,r+=1)e[t]=e[r];e.pop()}const Mt=function(e,n){void 0===n&&(n="");var t,r=e&&e.split("/")||[],o=n&&n.split("/")||[],i=e&&It(e),a=n&&It(n),c=i||a;if(e&&It(e)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var l=o[o.length-1];t="."===l||".."===l||""===l}else t=!1;for(var s=0,u=o.length;u>=0;u--){var f=o[u];"."===f?At(o,u):".."===f?(At(o,u),s++):s&&(At(o,u),s--)}if(!c)for(;s--;s)o.unshift("..");!c||""===o[0]||o[0]&&It(o[0])||o.unshift("");var d=o.join("/");return t&&"/"!==d.substr(-1)&&(d+="/"),d};var Ft=t(2177);function Vt(e){return"/"===e.charAt(0)?e:"/"+e}function qt(e){return"/"===e.charAt(0)?e.substr(1):e}function zt(e,n){return function(e,n){return 0===e.toLowerCase().indexOf(n.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(n.length))}(e,n)?e.substr(n.length):e}function Bt(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function Wt(e){var n=e.pathname,t=e.search,r=e.hash,o=n||"/";return t&&"?"!==t&&(o+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function Ht(e,n,t,r){var o;"string"==typeof e?(o=function(e){var n=e||"/",t="",r="",o=n.indexOf("#");-1!==o&&(r=n.substr(o),n=n.substr(0,o));var i=n.indexOf("?");return-1!==i&&(t=n.substr(i),n=n.substr(0,i)),{pathname:n,search:"?"===t?"":t,hash:"#"===r?"":r}}(e),o.state=n):(void 0===(o=Tt({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==n&&void 0===o.state&&(o.state=n));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return t&&(o.key=t),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=Mt(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function $t(){var e=null;var n=[];return{setPrompt:function(n){return e=n,function(){e===n&&(e=null)}},confirmTransitionTo:function(n,t,r,o){if(null!=e){var i="function"==typeof e?e(n,t):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var t=!0;function r(){t&&e.apply(void 0,arguments)}return n.push(r),function(){t=!1,n=n.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n.forEach((function(e){return e.apply(void 0,t)}))}}}var Ut=!("undefined"==typeof window||!window.document||!window.document.createElement);function Gt(e,n){n(window.confirm(e))}var Yt="popstate",Kt="hashchange";function Qt(){try{return window.history.state||{}}catch(e){return{}}}function Jt(e){void 0===e&&(e={}),Ut||(0,Ft.Z)(!1);var n,t=window.history,r=(-1===(n=window.navigator.userAgent).indexOf("Android 2.")&&-1===n.indexOf("Android 4.0")||-1===n.indexOf("Mobile Safari")||-1!==n.indexOf("Chrome")||-1!==n.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,a=i.forceRefresh,c=void 0!==a&&a,l=i.getUserConfirmation,s=void 0===l?Gt:l,u=i.keyLength,f=void 0===u?6:u,d=e.basename?Bt(Vt(e.basename)):"";function p(e){var n=e||{},t=n.key,r=n.state,o=window.location,i=o.pathname+o.search+o.hash;return d&&(i=zt(i,d)),Ht(i,r,t)}function h(){return Math.random().toString(36).substr(2,f)}var g=$t();function m(e){Tt(C,e),C.length=t.length,g.notifyListeners(C.location,C.action)}function v(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||x(p(e.state))}function b(){x(p(Qt()))}var y=!1;function x(e){if(y)y=!1,m();else{g.confirmTransitionTo(e,"POP",s,(function(n){n?m({action:"POP",location:e}):function(e){var n=C.location,t=j.indexOf(n.key);-1===t&&(t=0);var r=j.indexOf(e.key);-1===r&&(r=0);var o=t-r;o&&(y=!0,O(o))}(e)}))}}var w=p(Qt()),j=[w.key];function k(e){return d+Wt(e)}function O(e){t.go(e)}var P=0;function Z(e){1===(P+=e)&&1===e?(window.addEventListener(Yt,v),o&&window.addEventListener(Kt,b)):0===P&&(window.removeEventListener(Yt,v),o&&window.removeEventListener(Kt,b))}var S=!1;var C={length:t.length,action:"POP",location:w,createHref:k,push:function(e,n){var o="PUSH",i=Ht(e,n,h(),C.location);g.confirmTransitionTo(i,o,s,(function(e){if(e){var n=k(i),a=i.key,l=i.state;if(r)if(t.pushState({key:a,state:l},null,n),c)window.location.href=n;else{var s=j.indexOf(C.location.key),u=j.slice(0,s+1);u.push(i.key),j=u,m({action:o,location:i})}else window.location.href=n}}))},replace:function(e,n){var o="REPLACE",i=Ht(e,n,h(),C.location);g.confirmTransitionTo(i,o,s,(function(e){if(e){var n=k(i),a=i.key,l=i.state;if(r)if(t.replaceState({key:a,state:l},null,n),c)window.location.replace(n);else{var s=j.indexOf(C.location.key);-1!==s&&(j[s]=i.key),m({action:o,location:i})}else window.location.replace(n)}}))},go:O,goBack:function(){O(-1)},goForward:function(){O(1)},block:function(e){void 0===e&&(e=!1);var n=g.setPrompt(e);return S||(Z(1),S=!0),function(){return S&&(S=!1,Z(-1)),n()}},listen:function(e){var n=g.appendListener(e);return Z(1),function(){Z(-1),n()}}};return C}var Xt="hashchange",er={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+qt(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:qt,decodePath:Vt},slash:{encodePath:Vt,decodePath:Vt}};function nr(e){var n=e.indexOf("#");return-1===n?e:e.slice(0,n)}function tr(){var e=window.location.href,n=e.indexOf("#");return-1===n?"":e.substring(n+1)}function rr(e){window.location.replace(nr(window.location.href)+"#"+e)}function or(e){void 0===e&&(e={}),Ut||(0,Ft.Z)(!1);var n=window.history,t=(window.navigator.userAgent.indexOf("Firefox"),e),r=t.getUserConfirmation,o=void 0===r?Gt:r,i=t.hashType,a=void 0===i?"slash":i,c=e.basename?Bt(Vt(e.basename)):"",l=er[a],s=l.encodePath,u=l.decodePath;function f(){var e=u(tr());return c&&(e=zt(e,c)),Ht(e)}var d=$t();function p(e){Tt(P,e),P.length=n.length,d.notifyListeners(P.location,P.action)}var h=!1,g=null;function m(){var e,n,t=tr(),r=s(t);if(t!==r)rr(r);else{var i=f(),a=P.location;if(!h&&(n=i,(e=a).pathname===n.pathname&&e.search===n.search&&e.hash===n.hash))return;if(g===Wt(i))return;g=null,function(e){if(h)h=!1,p();else{var n="POP";d.confirmTransitionTo(e,n,o,(function(t){t?p({action:n,location:e}):function(e){var n=P.location,t=x.lastIndexOf(Wt(n));-1===t&&(t=0);var r=x.lastIndexOf(Wt(e));-1===r&&(r=0);var o=t-r;o&&(h=!0,w(o))}(e)}))}}(i)}}var v=tr(),b=s(v);v!==b&&rr(b);var y=f(),x=[Wt(y)];function w(e){n.go(e)}var j=0;function k(e){1===(j+=e)&&1===e?window.addEventListener(Xt,m):0===j&&window.removeEventListener(Xt,m)}var O=!1;var P={length:n.length,action:"POP",location:y,createHref:function(e){var n=document.querySelector("base"),t="";return n&&n.getAttribute("href")&&(t=nr(window.location.href)),t+"#"+s(c+Wt(e))},push:function(e,n){var t="PUSH",r=Ht(e,void 0,void 0,P.location);d.confirmTransitionTo(r,t,o,(function(e){if(e){var n=Wt(r),o=s(c+n);if(tr()!==o){g=n,function(e){window.location.hash=e}(o);var i=x.lastIndexOf(Wt(P.location)),a=x.slice(0,i+1);a.push(n),x=a,p({action:t,location:r})}else p()}}))},replace:function(e,n){var t="REPLACE",r=Ht(e,void 0,void 0,P.location);d.confirmTransitionTo(r,t,o,(function(e){if(e){var n=Wt(r),o=s(c+n);tr()!==o&&(g=n,rr(o));var i=x.indexOf(Wt(P.location));-1!==i&&(x[i]=n),p({action:t,location:r})}}))},go:w,goBack:function(){w(-1)},goForward:function(){w(1)},block:function(e){void 0===e&&(e=!1);var n=d.setPrompt(e);return O||(k(1),O=!0),function(){return O&&(O=!1,k(-1)),n()}},listen:function(e){var n=d.appendListener(e);return k(1),function(){k(-1),n()}}};return P}t(94662);function ir(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}u().Component;u().Component;var ar=function(e,n){return"function"==typeof e?e(n):e},cr=function(e,n){return"string"==typeof e?Ht(e,null,null,n):e},lr=function(e){return e},sr=u().forwardRef;void 0===sr&&(sr=lr);var ur=sr((function(e,n){var t=e.innerRef,r=e.navigate,o=e.onClick,i=ir(e,["innerRef","navigate","onClick"]),a=i.target,c=Tt({},i,{onClick:function(e){try{o&&o(e)}catch(n){throw e.preventDefault(),n}e.defaultPrevented||0!==e.button||a&&"_self"!==a||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return c.ref=lr!==sr&&n||t,u().createElement("a",c)}));var fr=sr((function(e,n){var t=e.component,r=void 0===t?ur:t,i=e.replace,a=e.to,c=e.innerRef,l=ir(e,["component","replace","to","innerRef"]);return u().createElement(o.s6.Consumer,null,(function(e){e||(0,Ft.Z)(!1);var t=e.history,o=cr(ar(a,e.location),e.location),s=o?t.createHref(o):"",f=Tt({},l,{href:s,navigate:function(){var n=ar(a,e.location),r=Wt(e.location)===Wt(cr(n));(i||r?t.replace:t.push)(n)}});return lr!==sr?f.ref=n||c:f.innerRef=c,u().createElement(r,f)}))})),dr=function(e){return e},pr=u().forwardRef;void 0===pr&&(pr=dr);var hr;pr((function(e,n){var t=e["aria-current"],r=void 0===t?"page":t,i=e.activeClassName,a=void 0===i?"active":i,c=e.activeStyle,l=e.className,s=e.exact,f=e.isActive,d=e.location,p=e.sensitive,h=e.strict,g=e.style,m=e.to,v=e.innerRef,b=ir(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return u().createElement(o.s6.Consumer,null,(function(e){e||(0,Ft.Z)(!1);var t=d||e.location,i=cr(ar(m,t),t),y=i.pathname,x=y&&y.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),w=x?(0,o.LX)(t.pathname,{path:x,exact:s,sensitive:p,strict:h}):null,j=!!(f?f(w,t):w),k="function"==typeof l?l(j):l,O="function"==typeof g?g(j):g;j&&(k=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return n.filter((function(e){return e})).join(" ")}(k,a),O=Tt({},O,c));var P=Tt({"aria-current":j&&r||null,className:k,style:O,to:i},b);return dr!==pr?P.ref=n||v:P.innerRef=v,u().createElement(fr,P)}))}));const gr=(0,w.ZP)(fr)(hr||(hr=x()(["\n ","\n text-decoration: none;\n color: ",";\n\n * {\n color: ",";\n text-decoration: none;\n }\n\n &:hover,\n &:hover *,\n &:focus,\n &:focus * {\n color: ",";\n text-decoration: ",";\n }\n\n &:active,\n &:active * {\n color: ",";\n text-decoration: ",";\n }\n"])),(0,X.Z)(),E.Z.color("secondary"),E.Z.color("text"),E.Z.color("secondaryLight"),(function(e){return e.neutral?"none":"underline"}),(function(e){var n=e.neutral,t=e.theme;return n?(0,D.HO)(R()(t,"colors.text"),2):(0,D.HO)(R()(t,"colors.secondary"),2)}),(function(e){return e.neutral?"none":"underline"}));var mr,vr,br,yr,xr,wr,jr,kr,Or,Pr,Zr=w.ZP.div.withConfig({displayName:"StyledDevCon"})(mr||(mr=ve()(["\n && {\n background-color: ",";\n padding: ",";\n display: flex;\n flex-direction: column;\n flex: 1;\n overflow: auto;\n }\n"])),E.Z.color("paper"),J.Z.space(0)),Sr=w.ZP.div.withConfig({displayName:"StyledNavigation"})(vr||(vr=ve()(["\n display: flex;\n"]))),Cr=(0,w.ZP)(gr).withConfig({displayName:"StyledRouterLink"})(br||(br=ve()(["\n padding: 1em;\n background-color: #ddd;\n border-radius: 5px;\n margin: 5px;\n"])));const _r=function(){return(0,O.jsxs)(Zr,{children:[yr||(yr=(0,O.jsx)(i.Z.Notifications,{})),xr||(xr=(0,O.jsx)(a.ZP.Span,{children:"Tocco Developer Console"})),wr||(wr=(0,O.jsxs)(Sr,{children:[(0,O.jsx)(Cr,{to:"/log",children:"Log"}),(0,O.jsx)(Cr,{to:"/modelvalidation",children:"Model Validation"}),(0,O.jsx)(Cr,{to:"/dbrefactoring",children:"DB Refactoring"}),(0,O.jsx)(Cr,{to:"/sqllog",children:"SQL Log"})]})),(0,O.jsxs)(o.rs,{children:[(0,O.jsx)(o.AW,{path:"/",exact:!0,render:function(){return(0,O.jsx)(o.l_,{to:{pathname:"/log"}})}}),(0,O.jsx)(o.AW,{path:"/log",exact:!0,render:function(){return jr||(jr=(0,O.jsx)(on,{}))}}),(0,O.jsx)(o.AW,{path:"/dbrefactoring",exact:!0,render:function(){return kr||(kr=(0,O.jsx)(De,{}))}}),(0,O.jsx)(o.AW,{path:"/modelvalidation",exact:!0,render:function(){return Or||(Or=(0,O.jsx)(Dn,{}))}}),(0,O.jsx)(o.AW,{path:"/sqllog",exact:!0,render:function(){return Pr||(Pr=(0,O.jsx)(Dt,{}))}})]})]})}},24295:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>_e});var r=t(22824),o=t.n(r),i=t(86048),a=t.n(i),c=t(86249),l=t.n(c),s=(t(58900),t(78634)),u=t(84100),f=t(60131),d=t(48230),p=t(64952),h=t(469),g=t(81896),m=t(46940),v=t(32884),b=t.n(v),y=t(40021),x=t.n(y),w=t(11203),j=t.n(w),k=t(72730),O=t.n(k),P=t(1024),Z=t(29163),S=(t(39335),t(28212),t(6488),t(32510),t(79657),t(20844),t(41030),t(98827),t(37363),t(53299),t(54159)),C=function(e){return S.Z.executeRequest("rest/".concat(e))},_=function(e){return 200===e.status?e.json():null},R=t(55695),E=t.n(R),D=t(76682),N=t.n(D),L=t(10300),T=t.n(L),I=t(47383),A=t.n(I),M=t(1462),F=t.n(M),V=(t(70646),t(74085)),q=t.n(V),z=t(77654),B=t.n(z),W=["==","!=","<=",">=","<",">","~="],H=["true","false","null"],$=["string","long","serial","bool","boolean","double","float","time","timestamp","char","varchar","date","datetime"],U=["now_date","yesterday_date","tomorrow_date","today_date","now_start","yesterday_start","tomorrow_start","today_start","now","yesterday","tomorrow","today","currentUsername","currentUser","currentBu"],G=["in","dateadd","datetimeadd","duedate","birthdayin","fulltext","likeall","distance","inboundingbox"];function Y(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=F()(e);if(n){var o=F()(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return A()(this,t)}}const K=function(e){return function(n){T()(r,n);var t=Y(r);function r(){var n;N()(this,r),n=t.call(this);var o=[{token:"keyword.operator.conjunction",regex:/(\s*)(and|or|not)($|\s+)/,caseInsensitive:!0},{token:"support.class.relation",regex:/rel/,push:"model"},{token:"keyword.exists",regex:/exists\s*/,push:"exists",caseInsensitive:!0},{token:"keyword.count",regex:/count\s*/,push:"count",caseInsensitive:!0},{token:["keyword.function.nice_function","paren.lparen.function_arguments","text.function_arguments","paren.rparen","text.whitespace"],regex:"((?:".concat(G.join("|"),")\\s*)(\\()(.*?)(\\))($|\\s+)"),caseInsensitive:!0},{token:"keyword.other.chaining",regex:/\./},{token:"support.function.field",regex:/([a-z_]+)($|\s+)/,push:"comparison"}],i={start:e?[{token:"keyword.where",regex:/\s*/,next:"rootwhere",caseInsensitive:!0}]:[{token:"keyword.find",regex:/find($|\s+)/,push:"model",caseInsensitive:!0},{token:"keyword.where",regex:/where($|\s+)/,next:"rootwhere",caseInsensitive:!0}],model:[{token:"support.class.model",regex:/[A-Z][a-z_0-9]*\s*/,next:"pop"}],rootwhere:[{token:"keyword.order_by",regex:/order by($|\s+)/,next:"order",caseInsensitive:!0}].concat(o),comparison:[{token:"keyword.operator.comparison",regex:"(".concat(W.join("|"),")\\s*"),next:"value"}],value:[{token:"string",regex:/".*?"\s*/,next:"pop"},{token:"constant.numeric",regex:/\d+(.\d+)?\s*/,next:"pop"},{token:"constant.language.tocco_placeholder",regex:"\\:(".concat(U.join("|"),")\\s*"),next:"pop",caseInsensitive:!0},{token:"constant.language",regex:"(".concat(H.join("|"),")\\s*"),next:"pop",caseInsensitive:!0},{token:"support.type",regex:"(".concat($.join("|"),"):\\s*"),caseInsensitive:!0}],exists:[{token:"paren.lparen",regex:/\(\s*/},{token:"support.class.relation",regex:/rel/,push:"model"},{token:"keyword.other.chaining",regex:/\./},{token:"keyword.where",regex:/where($|\s+)/,next:"existswhere",caseInsensitive:!0},{token:"paren.rparen",regex:/\)\s*/,next:"pop"}],existswhere:[].concat(o,[{token:"paren.rparen",regex:/\)\s*/,next:"pop"}]),count:[{token:"paren.lparen",regex:/\(\s*/},{token:"support.class.relation",regex:/rel/,push:"model"},{token:"keyword.other.chaining",regex:/\./},{token:"keyword.where",regex:/where($|\s+)/,next:"countwhere",caseInsensitive:!0},{token:"paren.rparen",regex:/\)\s*/,next:"comparison"}],countwhere:[].concat(o,[{token:"paren.rparen",regex:/\)\s*/,next:"comparison"}]),order:[{token:"support.class.relation",regex:/rel/,push:"model"},{token:"keyword.other.chaining",regex:/\./},{token:["support.function.field","keyword.direction","separator"],regex:/([a-z_]+\s*)(asc|desc)?($|,|\s+)/}]};return n.$rules=B()(n.$rules,i,(function(e,n){return q()(e)?e.concat(n):void 0})),n.normalizeRules(),n}return E()(r)}(l().require("ace/mode/text_highlight_rules").TextHighlightRules)};function Q(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=F()(e);if(n){var o=F()(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return A()(this,t)}}var J=function(e){T()(t,e);var n=Q(t);function t(){var e;N()(this,t);return(e=n.call(this)).$rules={start:[{token:"constant.character.entity",regex:/&[^;]+;/},{token:"support.function",regex:"\\?(\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|upper_case|word_list|xhtml|xmlc|round|floor|ceilingiso_[a-z_]+first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunkkeys|valueschildren|parent|root|ancestors|node_name|node_type|node_namespacebyte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|eval|has_content|interpret|is_[a-z_]+|namespacenew)"},{token:"support.function.deprecated",regex:"\\?(default|exists|if_exists|web_safe)"},{token:"language.variable",regex:"\\.(?:data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|now|output_encoding|template_name|url_escaping_charset|vars|version)"},{token:"constant.language",regex:"\\b(true|false)\\b"},{token:"keyword.operator",regex:"\\b(?:gt|gte|lt|lte|as|in|using)\\b"},{token:"entity.other.attribute-name",regex:"encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|attributes"},{token:"string",regex:/['"]/,next:"qstring"},{token:function(e){return e.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")?"constant.numeric":"variable"},regex:/[\w.+-]+/},{token:"keyword.operator",regex:"!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qstring:[{token:"constant.character.escape",regex:'\\\\[nrtvef\\\\"$]'},{token:"string",regex:/['"]/,next:"start"},{defaultToken:"string"}]},e}return E()(t)}(l().require("ace/mode/text_highlight_rules").TextHighlightRules),X=function(e){T()(t,e);var n=Q(t);function t(){var e;N()(this,t),e=n.call(this);var r=["query","queryCount"],o=[{token:"keyword.function",regex:"\\[@(".concat(r.join("|"),").*?]"),push:"tql-start"},{token:"comment",regex:"\\[#--",next:"ftl-dcomment"},{token:"string.interpolated",regex:"\\${",push:"ftl-start"},{token:"keyword.function",regex:"\\[/?#(assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|setting|stop|switch|t|visit)",push:"ftl-start"},{token:"keyword.other",regex:"\\[/?@[a-zA-Z\\.]+",push:"ftl-start"}];for(var i in e.$rules)e.$rules[i].unshift.apply(e.$rules[i],o);e.embedRules(J,"ftl-",[{token:"keyword",regex:"/?\\]",next:"pop"},{token:"string.interpolated",regex:"}",next:"pop"}],["start"]),e.addRules({"ftl-dcomment":[{token:"comment",regex:"--\\]",next:"pop"},{defaultToken:"comment"}]});var a=[{token:"keyword.function",regex:"\\[/@(".concat(r.join("|"),")]"),next:"pop"}];e.embedRules(K(),"tql-",a,["start"]);var c={"tql-rootwhere":[{token:"keyword.function",regex:"\\[/@(".concat(r.join("|"),")]"),next:"pop"}],"tql-order":[{token:"keyword.function",regex:"\\[/@(".concat(r.join("|"),")]"),next:"pop"}]};return e.$rules=B()(e.$rules,c,(function(e,n){return q()(e)?e.concat(n):void 0})),e.normalizeRules(),e}return E()(t)}(l().require("ace/mode/html_highlight_rules").HtmlHighlightRules),ee=t(6597),ne=t.n(ee),te=t(53124),re=t.n(te),oe=l().require("ace/token_iterator").TokenIterator,ie=function(e){return e?e.type.substring(e.type.lastIndexOf(".")+1):null},ae=function(e,n){return ie(e.getCurrentToken())===n},ce=function(e){if(ae(e,"model")&&e.stepBackward(),(ae(e,"field")||ae(e,"relation"))&&e.stepBackward(),!ae(e,"chaining"))return null;if(e.stepBackward(),ae(e,"model")){var n=e.getCurrentToken();return e.stepBackward(),e.stepBackward(),n?n.value.trim():null}return null},le=function(e,n){for(;!ae(e,n);)if(!e.stepBackward())return!1;return!0},se=function(e,n){return ae(e,"rparen")?1:n>0&&ae(e,"lparen")?(e.stepBackward(),-1):0},ue=function(e){for(var n=0;e.getCurrentToken();){if(0===n&&ae(e,"where")){var t=e.stepBackward();return t?[t.value.trim()].concat(re()(de(e))):[]}if(ae(e,"order_by")){if(le(e,"find")){var r=e.stepForward();return r?r.value.trim():[]}return[]}if(n+=se(e,n),!e.stepBackward())return null}return null},fe=function(e,n){for(var t=[],r=n(e);r;)Array.isArray(r)?r.forEach((function(e){return t.unshift(e)})):t.unshift(r),r=n(e);return t},de=function(e){return fe(e,ce)},pe=function(e){return fe(e,ue)},he=1e3,ge=function(e,n,t){var r=function(e,n){if(n){var t=pe(e());return{baseModel:n,modelScope:ne()(t).slice(0)}}var r=pe(e()),o=ne()(r);return{baseModel:o[0],modelScope:o.slice(1)}}(e,t),o=r.baseModel,i=r.modelScope;if(o){var a=de(e()),c=[].concat(re()(i),re()(a)).map((function(e){return"rel".concat(e)}));(function(e){var n=ne()(e),t=n[0],r=n.slice(1);return C(function(e,n){var t=n.length>0?"/resolve?path="+n.join("."):"";return"entities/".concat(e,"/model").concat(t)}(t,r)).then(_).then((function(e){if(!e)return[];var n=e.fields||[],t=e.relations||[];return[].concat(re()(n.map((function(e){return{label:(n=e,n.label?"".concat(n.fieldName," (").concat(n.label,")"):n.fieldName),value:e.fieldName,meta:e.type};var n}))),re()(t.map((function(e){return{label:(n=e,n.label?"".concat(n.relationName," (").concat(n.label,")"):n.relationName),value:e.relationName,meta:e.targetEntity};var n}))))}))})([o].concat(re()(c))).then((function(e){var t=e.map((function(e){return{caption:e.label,value:e.value,meta:e.meta,score:he}}));n(null,t)})).catch((function(e){return n(e)}))}},me=function(e,n){return n?"".concat(e," (").concat(n,")"):e},ve=function(e){return C("entities").then(_).then((function(e){return e?e.entities:{}})).then((function(e){return e?Object.values(e):[]})).then((function(e){return e.map((function(e){return e.metaData}))})).then((function(n){var t=n.map((function(e){var n=e.modelName,t=e.label;return{caption:me(n,t),value:n,score:he}}));e(null,t)})).catch((function(n){return e(n)}))},be=function(){return G.map((function(e){return e.toUpperCase()})).map((function(e){return{caption:e,value:"".concat(e,"()"),meta:"function",score:970}}))};const ye=function(e){return{getCompletions:function(n,t,r,o,i){var a=function(){return new oe(t,r.row,r.column)},c=a(),l=c.getCurrentToken(),s=c.stepBackward()?c.getCurrentToken():null;switch(ie(l)){case"chaining":case"relation":case"separator":case"order_by":case"count":case"exists":case"field":case"function_arguments":ge(a,i,e);break;case"where":case"conjunction":ge(a,i,e),i(null,be());break;case"nice_function":i(null,be());break;case"find":ve(i);break;case"type":case"tocco_placeholder":case"comparison":i(null,$.map((function(e){return{caption:e,value:"".concat(e,":"),meta:"type",score:980}}))),i(null,U.map((function(e){return{caption:e,value:":".concat(e),meta:"placeholder",score:990}})));break;case"model":ge(a,i,e),s&&"relation"!==ie(s)&&ve(i);break;case null:e&&ge(a,i,e),i(null,be())}}}};function xe(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=F()(e);if(n){var o=F()(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return A()(this,t)}}var we=function(e){T()(t,e);var n=xe(t);function t(){var e;return N()(this,t),(e=n.call(this)).HighlightRules=X,e.completer=ye(),e}return E()(t)}(l().require("ace/mode/ftl").Mode);function je(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=F()(e);if(n){var o=F()(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return A()(this,t)}}var ke,Oe=function(e){T()(t,e);var n=je(t);function t(e){var r,o=e.implicitModelName;return N()(this,t),(r=n.call(this)).HighlightRules=K(o),r.completer=ye(o),r.snippedIdField=null,r}return E()(t)}(l().require("ace/mode/text").Mode),Pe=t(85893),Ze=Z.ZP.div.withConfig({displayName:"StyledEditor"})(ke||(ke=a()(["\n width: 100%;\n z-index: 0; /* gutter lays over menu otherwise */\n"]))),Se={groovy:function(){return new u.Mode},html:function(){return new f.Mode},xml:function(){return new m.Mode},properties:function(){return new h.Mode},json:function(){return new d.Mode},htmlmixed:function(){return new we},freemarkermixed:function(){return new we},ftl:function(){return new we},tql:function(e){return new Oe(e)},less:function(){return new p.Mode},drools:function(){return new s.Mode},text:function(){return new g.Mode}},Ce=function(e,n){var t=n.mode,r=n.theme,i=n.showGutter,a=n.editorOptions,c=void 0===a?{}:a;(function(e){return O()(e)?Promise.resolve(e):j()(e)?C("entities/2.0/".concat(e.entityModel,"/").concat(e.key,"?_paths=").concat(e.field)).then(_).then((function(e){return b()(e,["paths","entity_name","value"],null)})):Promise.resolve(null)})(n.implicitModel).then((function(e){return function(e,n){return b()(Se,e,e)(n)}(t,{implicitModelName:e})})).then((function(n){return e.getSession().setMode(n)})),e.setTheme("ace/theme/".concat(r)),Object.entries(c).forEach((function(n){var t=o()(n,2),r=t[0],i=t[1];e.setOption(r,i)})),e.renderer.setShowGutter(i),e.resize()};const _e=function(e){var n=e.mode,t=e.theme,r=void 0===t?"textmate":t,o=e.value,i=e.onChange,a=e.showGutter,c=void 0===a||a,s=e.editorOptions,u=void 0===s?{}:s,f=e.implicitModel,d=(0,P.useRef)(null),p=(0,P.useRef)(null),h=(0,P.useMemo)((function(){return{mode:n,theme:r,showGutter:c,editorOptions:u,implicitModel:f}}),[n,r,c,u,f]);return(0,P.useEffect)((function(){var e=l().edit(d.current);return e.getSession().setValue(o||""),e.on("change",(function(){return i(e.getValue())})),Ce(e,h),p.current=e,function(){return e.destroy()}}),[]),(0,P.useEffect)((function(){p.current&&Ce(p.current,h)}),[h]),(0,P.useEffect)((function(){p.current&&!x()(o)&&o!==p.current.getValue()&&p.current.getSession().setValue(o)}),[o]),(0,Pe.jsx)(Ze,{ref:d})}},5711:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>F});var r=t(88265),o=t.n(r),i=t(22824),a=t.n(i),c=(t(46444),t(1024)),l=t(74806),s=t(29163),u=t(2091),f=(t(66991),t(29214)),d=t(57413),p=t(53528),h=t(36258),g=t(35997),m=t(70696);function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){o()(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var y,x,w,j,k={"de-CH":d.German,de:d.German,fr:p.French,it:h.Italian},O=function(e){return function(n){n&&n.length>0?e(n[0].toISOString()):e(null)}},P=function(e,n){var t=n.value,r=n.locale,o=n.flatpickrOptions,i=(0,c.useRef)(null),l=g.Z.usePrevious(o);return(0,c.useEffect)((function(){return function(){i.current&&i.current.destroy()}}),[]),(0,c.useEffect)((function(){i.current&&(i.current.setDate(t,!1),i.current.redraw())}),[JSON.stringify(t)]),(0,c.useEffect)((function(){var e,n,t=k[r]||(null===(e=i.current)||void 0===e||null===(n=e.l10ns)||void 0===n?void 0:n.en);i.current&&t&&(i.current.localize(t),i.current.set("locale",t),i.current.redraw())}),[r]),(0,c.useEffect)((function(){if(i.current){var e=m.Z.difference(o,l);Object.keys(e).length>0&&(Object.entries(e).forEach((function(e){var n=a()(e,2),t=n[0],r=n[1];i.current.set(t,r)})),i.current.redraw())}}),[o]),function(){return i.current=function(e,n){var t=n.shouldAppend,r=n.onChange,o=n.value,i=n.fontFamily,a=n.locale,c=n.flatpickrOptions,l=k[a],s=b(b(b({wrap:!0,onChange:O(r),altInput:!1,enableTime:!1,defaultDate:o},t?{appendTo:e.current,static:!0}:{}),l?{locale:l}:{}),c),u=(0,f.Z)(e.current,s);return i&&(u.calendarContainer.style.fontFamily=i),u}(e,n),i.current}},Z=t(88601),S=t(86048),C=t.n(S),_=t(40953),R=t(51032),E=s.ZP.input.withConfig({displayName:"StyledDatePickerInput"})(y||(y=C()(["\n &&& {\n ","\n margin: 0;\n }\n"])),R.k9),D=s.ZP.div.withConfig({displayName:"StyledDatePickerValue"})(x||(x=C()(["\n && {\n ","\n display: flex;\n align-items: center;\n ","\n }\n"])),R.k9,(function(e){return!e.hasValue&&"\n justify-content: center;\n color: ".concat(_.v.shade1(e),";\n ")})),N=s.ZP.div.withConfig({displayName:"StyledDatePickerOuterWrapper"})(w||(w=C()(["\n outline: ",";\n"])),(function(e){return e.immutable?0:"initial"})),L=s.ZP.div.withConfig({displayName:"StyledDatePickerWrapper"})(j||(j=C()(["\n && {\n ","\n\n input {\n display: ",";\n\n &:last-of-type {\n display: ",";\n }\n }\n }\n"])),R.yP,(function(e){return e.immutable?"none":"block"}),(function(e){return e.immutable?"block":"none"})),T=t(85893);function I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function A(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?I(Object(t),!0).forEach((function(n){o()(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var M=function(e){var n=e.querySelector('input.flatpickr-input:not([type="hidden"])');n&&n.focus()};const F=(0,s.Zz)((0,l.ZP)((function(e){var n,t,r=e.immutable,o=e.id,i=e.options,l=e.value,s=e.onChange,f=e.formatDate,d=e.intl,p=e.placeholder,h=(0,c.useState)(!1),g=a()(h,2),m=g[0],v=g[1],b=(0,c.useRef)(null),y=(0,c.useRef)(null),x=d.locale,w=Z.Z.fontFamily("regular")(e),j=A({altInput:!0,altInputClass:"",clickOpens:!r},i?i.flatpickrOptions:{}),k=P(y,{value:l,onChange:function(e){e&&s([e])},fontFamily:w,locale:x,flatpickrOptions:j}),O=(null===(n=b.current)||void 0===n||null===(t=n.altInput)||void 0===t?void 0:t.value)||"",S=function(){m?M(y.current):(b.current=k(),b.current.calendarContainer.classList.add("tocco-ui-theme"),b.current.calendarContainer.addEventListener("keydown",C),v(!0),setTimeout((function(){M(y.current)})))},C=function(e){(e.target.classList.contains("flatpickr-hour")||"Tab"!==e.key||e.shiftKey)&&"Enter"!==e.key||setTimeout((function(){b.current.close()})),"Enter"===e.key&&(e.preventDefault(),e.stopPropagation())},_=l&&l.length>0&&l.every((function(e){return e}));return(0,T.jsx)(T.Fragment,{children:(0,T.jsx)(N,{immutable:r,id:o,tabIndex:"-1",onFocus:function(){S(),b.current&&b.current.open()},onKeyDown:C,children:(0,T.jsxs)(L,{"data-wrap":!0,immutable:r,ref:y,children:[(0,T.jsx)(E,A(A({},r?{disabled:"disabled"}:{}),{},{type:"hidden","data-input":!0,immutable:r,className:"flatpickr-input",placeholder:p})),!m&&(0,T.jsx)(D,{tabIndex:0,hasValue:_,children:_?f(l[0]):p}),(0,T.jsx)(E,{disabled:!0,immutable:r,value:O,placeholder:p}),!r&&_&&(0,T.jsx)(u.Z,{icon:"times",tabIndex:-1,"aria-label":function(e){return d.formatMessage({id:e})}("client.component.dateAbstract.clearDateLabel"),onMouseDown:function(e){e.preventDefault(),s(null)}})]})})})})))},94475:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>l});var r=t(97044),o=t(96098),i=t.n(o),a=(t(46444),t(34206)),c=t(85893);const l=function(e){var n=e.value,t=e.breakWords,o=(0,r._)(n),l=i()(o)?n:o.formatInternational();return(0,c.jsx)(a.ZP.Span,{breakWords:t,children:l})}},59178:(e,n,t)=>{"use strict";t.r(n),t.d(n,{Icon:()=>L,default:()=>T});var r,o=t(88265),i=t.n(o),a=t(46444),c=t.n(a),l=t(51400),s=t(99245),u=t(68019),f=t(70457),d=t(30963),p=t(32884),h=t.n(p),g=t(86048),m=t.n(g),v=t(29163).ZP.span.withConfig({displayName:"StyledFontAwesomeAdapterWrapper"})(r||(r=m()([""]))),b=t(85893);function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function x(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){i()(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}l.vI.add(u.C65,u.kJo,u._tD,u.A35,u.mTx,u.ptq,u.g4A,u.r8p,u.Pk,u.g9M,u.Tab,f.Tab,u.NBC,u.eFW,u.acZ,u.gMD,u.cwv,u.w49,u.fUD,u.icc,u.ca9,u.Vmj,u.gSj,u.WFE,u.hQn,u.LEp,u.WV2,u.diR,u.f8k,s.xYR,s.neY,s.AYu,s.kBj,s.hVS,s.dc_,s.Av$,u.xiG,u.gJF,u.j1w,u.WKO,u.wn1,u.b7W,u.YHc,u.ZC5,u.UO1,f.Fyj,u.Qj4,u.FL8,u.foy,u.u9C,u.Fuz,u.iV1,u.Kl4,u.nYk,u.sqG,u.RLE,u.$aW,u.Zrf,u.pL1,u.qmU,u.nek,u.Qy6,f.pL1,u.hVM,u.yOf,u.Xgz,u.Mzg,u.r6l,u.IwR,f.Alc,u.dLO,u.ntl,u.Hw7,u.FYs,u.$36,u.Ry6,u.C3l,u.a1i,u.IeV,u.A8,u.hG5,u.FVb,u.AxY,u.mAj,u.hGM,u.UkD,u.BDt,u.QzV,u.py1,u.cf$,u.byT,u.dT$,u.G_j,u.A4,u.ar8);var w=function(e){var n=e.icon,t=e.style,r=e.hasFixedWidth;return(0,b.jsx)(v,{children:(0,b.jsx)(d.G,x(x({icon:n.includes(",")?n.replace(/\s+/,"").split(","):n,style:t},h()(t,"color")&&{color:t.color}),{},{fixedWidth:r}))})};w.defaultProps={hasFixedWidth:!0};const j=w,k=JSON.parse('{"abacus":{"id":"fal, abacus","lib":"fa"},"address-card":{"id":"fal, address-card","lib":"fa"},"apple":{"id":"fab, apple","lib":"fa","tags":["sso"]},"arrow-left":{"id":"fal, arrow-left","lib":"fa","tags":["navigate"]},"arrow-right":{"id":"fal, arrow-right","lib":"fa","tags":["navigate"]},"arrow-to-bottom":{"id":"fal, arrow-to-bottom","lib":"fa","tags":["download"]},"arrow-to-top":{"id":"fal, arrow-to-top","lib":"fa","tags":["upload"]},"barcode-alt":{"id":"fal, barcode-alt","lib":"fa"},"bars":{"id":"fal, bars","lib":"fa","tags":["burger"]},"bell":{"id":"fal, bell","lib":"fa","tags":["notification"]},"bolt":{"id":"fal, bolt-lightning","lib":"fa"},"bolt-lightning":{"id":"fal, bolt-lightning","lib":"fa"},"book":{"id":"fal, book","lib":"fa"},"box":{"id":"fal, box","lib":"fa"},"box-open":{"id":"fal, box-open","lib":"fa"},"calendar-check":{"id":"fal, calendar-check","lib":"fa"},"calendar-minus":{"id":"fal, calendar-minus","lib":"fa"},"calendar-plus":{"id":"fal, calendar-plus","lib":"fa"},"chalkboard-teacher":{"id":"fal, chalkboard-teacher","lib":"fa"},"chart-network":{"id":"fal, chart-network","lib":"fa"},"check":{"id":"fal, check","lib":"fa","tags":["ok"]},"check-circle":{"id":"fal, check-circle","lib":"fa","tags":["check"]},"chevron-double-down":{"id":"fal, chevron-double-down","lib":"fa"},"chevron-double-left":{"id":"fal, chevron-double-left","lib":"fa"},"chevron-double-right":{"id":"fal, chevron-double-right","lib":"fa"},"chevron-double-up":{"id":"fal, chevron-double-up","lib":"fa"},"chevron-down":{"id":"fal, chevron-down","lib":"fa"},"chevron-left":{"id":"fal, chevron-left","lib":"fa"},"chevron-right":{"id":"fal, chevron-right","lib":"fa"},"chevron-up":{"id":"fal, chevron-up","lib":"fa"},"circle":{"id":"fal, circle","lib":"fa","tags":["selection"]},"code":{"id":"fal, code","lib":"fa"},"cog":{"id":"fal, cog","lib":"fa"},"compress":{"id":"fal, compress","lib":"fa"},"comment":{"id":"fal, comment","lib":"fa"},"cube":{"id":"fal, cube","lib":"fa"},"dropbox":{"id":"fab, dropbox","lib":"fa","tags":["sso"]},"ellipsis-v":{"id":"fal, ellipsis-v","lib":"fa","tags":["dots","pünktli"]},"exclamation":{"id":"fal, exclamation","lib":"fa","tags":["warning"]},"exclamation-circle":{"id":"fal, exclamation-circle","lib":"fa","tags":["warning"]},"external-link":{"id":"fal, external-link","lib":"fa","tags":["external-link"]},"facebook":{"id":"fab, facebook","lib":"fa","tags":["sso"]},"facebook-f":{"id":"fab, facebook-f","lib":"fa","tags":["sso"]},"file":{"id":"fal, file","lib":"fa"},"file-alt":{"id":"fal, file-alt","lib":"fa"},"file-code":{"id":"fal, file-code","lib":"fa"},"file-csv":{"id":"fal, file-csv","lib":"fa"},"file-excel":{"id":"fal, file-excel","lib":"fa"},"file-export":{"id":"fal, file-export","lib":"fa"},"file-import":{"id":"fal, file-import","lib":"fa"},"file-pdf":{"id":"fal, file-pdf","lib":"fa"},"file-spreadsheet":{"id":"fal, file-spreadsheet","lib":"fa"},"filter":{"id":"fal, filter","lib":"fa"},"folder":{"id":"fal, folder","lib":"fa"},"folders":{"id":"fal, folders","lib":"fa","tags":["copy"]},"globe":{"id":"fal, globe","lib":"fa"},"google":{"id":"fab, google","lib":"fa","tags":["sso"]},"horizontal-rule":{"id":"fal, horizontal-rule","lib":"fa"},"id-badge":{"id":"fal, id-badge","lib":"fa"},"info":{"id":"fal, info","lib":"fa"},"laptop-code":{"id":"fal, laptop-code","lib":"fa"},"list":{"id":"fal, list","lib":"fa"},"lock":{"id":"fal, lock","lib":"fa"},"info-circle":{"id":"fal, info-circle","lib":"fa","tags":["info"]},"mail-bulk":{"id":"fal, mail-bulk","lib":"fa"},"map-marked":{"id":"fal, map-marked","lib":"fa"},"merge":{"id":"fal, merge","lib":"fa"},"microsoft":{"id":"fab, microsoft","lib":"fa","tags":["sso"]},"minus":{"id":"fal, minus","lib":"fa"},"newspaper":{"id":"fal, newspaper","lib":"fa"},"office":{"id":"office","lib":"toc"},"paper-clip":{"id":"fa, paper-clip","lib":"fa"},"pen":{"id":"fal, pen","lib":"fa"},"phone":{"id":"fal, phone","lib":"fa"},"phone-laptop":{"id":"fal, phone-laptop","lib":"fa"},"plus":{"id":"fal, plus","lib":"fa","tags":["new"]},"question-circle":{"id":"fal, question-circle","lib":"fa","tags":["help"]},"save":{"id":"fal, save","lib":"fa"},"search":{"id":"fal, search","lib":"fa"},"sitemap":{"id":"fal, sitemap","lib":"fa"},"sort-down":{"id":"fal, sort-down","lib":"fa"},"sort-up":{"id":"fal, sort-up","lib":"fa"},"square":{"id":"fal, square","lib":"fa"},"square-full":{"id":"fas, square-full","lib":"fa"},"star":{"id":"fal, star","lib":"fa","tags":["favorite"]},"star-full":{"id":"fas, star","lib":"fa","tags":["favorite"]},"sync":{"id":"fal, sync","lib":"fa","tags":["refresh"]},"tasks":{"id":"fal, tasks","lib":"fa"},"times":{"id":"fal, times","lib":"fa","tags":["delete","close"]},"times-circle":{"id":"fal, times-circle","lib":"fa","tags":["error"]},"tocco":{"id":"logo","lib":"toc"},"trash":{"id":"fal, trash","lib":"fa","tags":["trash"]},"upload":{"id":"fal, upload","lib":"fa"},"users":{"id":"fal, users","lib":"fa"},"lightbulb-exclamation":{"id":"fal, lightbulb-exclamation","lib":"fa"}}');var O,P;function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function S(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){i()(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var C={logo:function(e){return(0,b.jsx)("svg",S(S({height:h()(e,"fontSize",20)},e),{},{"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:O||(O=(0,b.jsx)("path",{fill:"currentColor",d:"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 \n 8zm80 248c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80z"}))}))},office:function(e){return(0,b.jsx)("svg",S(S({height:h()(e,"fontSize",20)},e),{},{"aria-hidden":"true",role:"img",enableBackground:"new 0 0 2075 2499.8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2075 2499.8",children:P||(P=(0,b.jsx)("path",{fill:"currentColor",d:"m0 2016.6v-1519.8l1344.4-496.8 730.6 233.7v2045.9l-730.6 220.3-1344.4-483.3 1344.4 \n 161.8v-1769.2l-876.8 204.6v1198.3z"}))}))}},_=function(e){var n=e.icon,t=e.style;return C[n](t)};_.propTypes={icon:c().string.isRequired,style:c().object};const R=_;function E(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function D(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach((function(n){i()(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var N={fa:function(e,n){return(0,b.jsx)(j,D(D({},n),{},{icon:e.id}))},toc:function(e,n){return(0,b.jsx)(R,D(D({},n),{},{icon:e.id}))}},L=function(e){var n=k[e.icon];if(!n)return null;var t=N[n.lib];return t?t(n,e):null};L.propTypes={icon:c().string.isRequired,style:c().objectOf(c().string)};const T=L},81251:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>u});var r=t(88265),o=t.n(r),i=t(70457),a=t(30963),c=(t(46444),t(85893));function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){o()(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}const u=function(e){var n=e.size,t=e.style;return(0,c.jsx)(a.G,s(s({},t),{},{style:{fontSize:n},spin:!0,icon:i.IJ7}))}},126:(e,n,t)=>{"use strict";var r=t(51235);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,n,t,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:i,resetWarningCache:o};return t.PropTypes=t,t}},94662:(e,n,t)=>{e.exports=t(126)()},51235:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}}]);