tocco-widget-showcase 3.15.36 → 3.15.37

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/changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ 3.15.37
2
+ - do not break on unspecified error during delete
3
+ - handle temporary filters
4
+
1
5
  3.15.36
2
6
  - Adjust datepicker styles to match the v8 styling
3
7
 
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunktocco_widget_showcase=this.webpackChunktocco_widget_showcase||[]).push([[1556],{51368(e,t,n){n.r(t),n.d(t,{default:()=>u});var r=n(24843),i=n(6910),o=n(25133),a=n(26800),s=n(1636),l=n(78240),c=n(31085),d=n(74848);const u=(0,c.S)((0,r.Ay)((function(e){var t=e.path,n=e.context,r=e.onSuccess,c=e.intl,u=e.locale,y=e.emitAction,p=(0,l.A)(t),f=p?[{id:"rel".concat(p.model),value:p.key}]:[],m=(0,s.A)(n,"Domain");return(0,d.jsx)(i.Ay,{entityName:"Domain",formName:m,mode:"create",defaultValues:f,locale:u,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Domain/".concat(t)}]}}];r({title:c.formatMessage({id:"client.docs-browser.createDomainSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||y(e)},listApp:o.Ay,docsApp:a.Ay,labelPosition:"inside"})})))},28824(e,t,n){n.r(t),n.d(t,{default:()=>u});var r=n(24843),i=n(6910),o=n(25133),a=n(26800),s=n(1636),l=n(78240),c=n(31085),d=n(74848);const u=(0,c.S)((0,r.Ay)((function(e){var t=e.context,n=e.path,r=e.onSuccess,c=e.intl,u=e.locale,y=e.emitAction,p=(0,l.A)(n),f=p?[{id:"rel".concat(p.model),value:p.key}]:[],m=(0,s.A)(t,"Folder");return(0,d.jsx)(i.Ay,{entityName:"Folder",formName:m,mode:"create",defaultValues:f,locale:u,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Folder/".concat(t)}]}}];r({title:c.formatMessage({id:"client.docs-browser.createFolderSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||y(e)},listApp:o.Ay,docsApp:a.Ay,labelPosition:"inside"})})))},12876(e,t,n){n.r(t),n.d(t,{default:()=>Tt});var r,i=n(26396),o=n.n(i),a=n(5556),s=n.n(a),l=n(6730),c=n(53303),d=n(12199),u=n(59499),y=n(27772),p=n(61502),f=n(24843),m=n(71468),g="root/LOAD_DIALOG_INFO",v="delete/SET_DELETE_DIALOG_INFO",A="delete/DO_DELETE",x="delete/SET_DELETING_IN_PROGRESS",h="delete/ON_CANCEL",b="delete/SET_ENTITIES_TO_DELETE",E="delete/SOCKET_MESSAGE_RECEIVED",j="delete/SET_TEMPORARY_FILTERS",k=function(e){return{type:v,payload:{dialogInfo:e}}},S=function(){return{type:A}},O=function(e){return{type:b,payload:{entitiesToDelete:e}}},N=function(e){return{type:E,payload:{data:e}}},T=function(e){return{type:j,payload:{temporaryFilters:e}}},D=n(4883),w=n.n(D),L=n(88208),I=n(22834),P=n(69556),_=n(56375),F=n(21259),C=n.n(F),R=n(22056),B=n.n(R),M=n(72189),U=n.n(M),J=n(51510),G=n(3634),W=n(74848);const q=function(e){var t,n=e.deleteEntityProp,i=e.children,o=e.maxCountLink,a=e.hasTempFilter;if((a||n.keys.length<o)&&(!n.keysOtherBu||0===n.keysOtherBu.length))return i;var s=(0,W.jsxs)(W.Fragment,{children:[!a&&n.keys.length>o&&(r||(r=(0,W.jsx)(_.Ay.P,{children:(0,W.jsx)(I.A,{id:"client.delete.tooManyRecords"})}))),(null===(t=n.keysOtherBu)||void 0===t?void 0:t.length)>0&&(0,W.jsx)(_.Ay.P,{children:(0,W.jsx)(I.A,{id:"client.delete.recordInOtherBU",values:{count:n.keysOtherBu.length}})})]});return(0,W.jsx)(G.A,{content:s,placement:"top",children:i})};var K,V,z=J.Ay.span.withConfig({displayName:"NonBreakingText"})(K||(K=U()(["\n white-space: nowrap;\n"])));const H=function(e){var t=e.rootEntities,n=e.relatedEntities,r=e.maxCountLink,i=e.rootTemporaryFilters,o=void 0===i?{}:i,a=e.relatedTemporaryFilters,s=void 0===a?{}:a,l=e.navigationStrategy;return(0,W.jsxs)(_.Ay.Span,{children:[(0,W.jsx)(_.Ay.B,{children:Object.entries(t).map((function(e){var t=B()(e,2),n=t[0],i=t[1],a=!!o[n];return(0,W.jsxs)("span",{children:[i.entityLabel," (",(0,W.jsx)(q,{deleteEntityProp:i,maxCountLink:r,hasTempFilter:a,children:i.keys.length>0&&l.ListLink?(0,W.jsx)(l.ListLink,{entityName:n,tempFilter:a?o[n]:void 0,entityKeys:a?void 0:i.keys.slice(0,r),children:i.keys.length}):(0,W.jsx)(_.Ay.Span,{children:i.keys.length})}),")"]},"root-entity-".concat(n))})).reduce((function(e,t){return[].concat(C()(e),[t,", "])}),[]).slice(0,-1)}),Object.keys(n).length>0&&(0,W.jsxs)(W.Fragment,{children:[V||(V=(0,W.jsx)("span",{children:" / "})),Object.keys(n).map((function(e){var t=n[e],i=[].concat(C()(t.keys),C()(t.keysOtherBu)).length,o=!!s[e],a=t.keys.length>0&&l.ListLink?(0,W.jsx)(l.ListLink,{entityName:e,tempFilter:o?s[e]:void 0,entityKeys:o?void 0:t.keys.slice(0,r),children:i}):(0,W.jsx)(_.Ay.Span,{children:i}),c=(0,W.jsx)(q,{deleteEntityProp:t,maxCountLink:r,hasTempFilter:o,children:a});return(0,W.jsx)(w().Fragment,{children:(0,W.jsxs)(z,{children:[t.entityLabel," (",c,")"]})},"entity-info-"+e)})).reduce((function(e,t){return[].concat(C()(e),[t,", "])}),[]).slice(0,-1)]})]})};var Q,Y,X,Z=n(26166),$=J.Ay.div.withConfig({displayName:"StyledIconWrapper"})(Q||(Q=U()(["\n margin-bottom: ",";\n"])),Z.A.space(.2));const ee=function(e){var t=e.dialogInfo,n=e.navigationStrategy;return(0,W.jsxs)(W.Fragment,{children:[Y||(Y=(0,W.jsx)($,{children:(0,W.jsx)(P.A,{size:"30px"})})),X||(X=(0,W.jsx)(_.Ay.P,{children:(0,W.jsx)(I.A,{id:"client.delete.deleteInProgress"})})),(0,W.jsx)(H,{rootEntities:t.rootEntitiesDeletable,relatedEntities:t.relatedDeletable,maxCountLink:100,navigationStrategy:n},"infopart-deletable")]})};var te={doDelete:S};const ne=(0,m.Ng)((function(e,t){return{dialogInfo:e.del.dialogInfo,navigationStrategy:e.input.navigationStrategy}}),te)((0,f.Ay)(ee));var re,ie=n(82064),oe=n(77271),ae=n(93564),se=n(57488),le=[oe.A.condition.BASE,oe.A.condition.INFO,oe.A.condition.DANGER,oe.A.condition.SUCCESS,oe.A.condition.WARNING],ce=o()(o()(o()(o()(o()({},oe.A.condition.BASE,se.t7.color("signal.neutral")),oe.A.condition.DANGER,se.t7.color("signal.dangerLight")),oe.A.condition.SUCCESS,se.t7.color("signal.successLight")),oe.A.condition.WARNING,se.t7.color("signal.warningLight")),oe.A.condition.INFO,se.t7.color("signal.infoLight")),de=J.Ay.div.withConfig({displayName:"StyledSignalBox"})(re||(re=U()(["\n && {\n background-color: ",";\n padding: "," ",";\n border-radius: ",";\n\n &:not(:last-child) {\n margin-bottom: ",";\n }\n\n * {\n color: #000; /* black in all themes */\n }\n\n "," {\n margin-right: ",";\n }\n }\n"])),(function(e){var t=e.condition;return ce[le.includes(t)?t:oe.A.condition.INFO]}),Z.A.space(-1),Z.A.space(-.3),se.t7.radii("statusLabel"),Z.A.space(-1),ae.i,Z.A.space(-1));de.propTypes={condition:oe.A.oneOfPropTypeAndCompletelyMapped(le,ce)};const ue=function(e){var t=e.condition,n=void 0===t?oe.A.condition.BASE:t,r=e.title,i=e.children,o=e.meta;return(0,W.jsxs)(de,{condition:n,children:[r&&(0,W.jsx)(_.Ay.H5,{children:r}),i,o&&(0,W.jsx)(_.Ay.Small,{children:o})]})};var ye,pe,fe,me,ge,ve,Ae,xe,he,be=n(33150),Ee=n(76242),je=J.Ay.div.withConfig({displayName:"StyledSectionWrapper"})(ye||(ye=U()(["\n padding-top: ",";\n"])),Z.A.space(.6)),ke=J.Ay.div.withConfig({displayName:"StyledButtonsWrapper"})(pe||(pe=U()(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),Ee.Ay);const Se=function(e){var t=e.dialogInfo,n=t.rootEntitiesDeletable,r=t.rootEntitiesNotDeletable,i=t.relatedDeletable,o=t.relatedNotDeletable,a=t.hasUnreadableEntities,s=t.limitExceeded,l=e.temporaryFilters,c=e.doDelete,d=e.onCancel,u=e.navigationStrategy;return(0,ie.L)(d),s?fe||(fe=(0,W.jsx)(_.Ay.P,{children:(0,W.jsx)(I.A,{id:"client.delete.limitExceededText"})})):(0,W.jsxs)(W.Fragment,{children:[Object.keys(n).length>0&&(0,W.jsxs)(je,{children:[me||(me=(0,W.jsx)(_.Ay.P,{children:(0,W.jsx)(I.A,{id:"client.delete.confirmText"})})),(0,W.jsx)(H,{rootEntities:n,relatedEntities:i,maxCountLink:100,navigationStrategy:u,rootTemporaryFilters:null==l?void 0:l.deletableRoot,relatedTemporaryFilters:null==l?void 0:l.deletableRelated},"infopart-deletable")]}),Object.keys(r).length>0&&(0,W.jsxs)(je,{children:[ge||(ge=(0,W.jsx)(_.Ay.P,{children:(0,W.jsx)(I.A,{id:"client.delete.textNotDeletable"})})),(0,W.jsx)(H,{rootEntities:r,relatedEntities:o,maxCountLink:100,navigationStrategy:u,rootTemporaryFilters:null==l?void 0:l.undeletableRoot,relatedTemporaryFilters:null==l?void 0:l.undeletableRelated},"infopart-notdeletable")]}),0===Object.keys(n).length&&0===Object.keys(r).length&&(ve||(ve=(0,W.jsx)(je,{children:(0,W.jsx)(_.Ay.P,{children:(0,W.jsx)(I.A,{id:"client.delete.errorMessage"})})}))),a&&(Ae||(Ae=(0,W.jsx)(je,{children:(0,W.jsx)(ue,{condition:"warning",children:(0,W.jsx)(_.Ay.Span,{children:(0,W.jsx)(I.A,{id:"client.delete.unreadableEntities"})})})}))),(0,W.jsx)(je,{children:(0,W.jsxs)(ke,{children:[(0,W.jsx)(be.A,{onClick:c,disabled:Object.keys(n).every((function(e){return 0===n[e].keys.length})),"data-cy":"btn-delete-ok",children:xe||(xe=(0,W.jsx)(I.A,{id:"client.delete.deleteButton"}))}),(0,W.jsx)(be.A,{ink:"primary",look:"raised",onClick:d,"data-cy":"btn-delete-cancel",children:he||(he=(0,W.jsx)(I.A,{id:"client.delete.cancelButton"}))})]})})]})};var Oe={doDelete:S,onCancel:function(){return{type:h}}};const Ne=(0,m.Ng)((function(e,t){return{dialogInfo:e.del.dialogInfo,temporaryFilters:e.del.temporaryFilters,navigationStrategy:e.input.navigationStrategy}}),Oe)((0,f.Ay)(Se));var Te,De;const we=function(e){var t=e.loadDialogInfo,n=e.dialogInfo,r=e.deletingInProgress,i=e.intl;(0,D.useEffect)((function(){t()}),[t]);var o;return r?Te||(Te=(0,W.jsx)(ne,{})):(0,W.jsx)(L.A,{required:[n],loadingText:(o="client.delete.loadingText",i.formatMessage({id:o})),children:n&&(De||(De=(0,W.jsx)(Ne,{})))})};var Le={loadDialogInfo:function(){return{type:g}}};const Ie=(0,m.Ng)((function(e,t){return{dialogInfo:e.del.dialogInfo,deletingInProgress:e.del.deletingInProgress}}),Le)((0,f.Ay)(we));var Pe=n(98671),_e=o()(o()(o()(o()({},v,Pe.A.singleTransferReducer("dialogInfo")),b,Pe.A.singleTransferReducer("entitiesToDelete")),x,Pe.A.singleTransferReducer("deletingInProgress")),j,Pe.A.singleTransferReducer("temporaryFilters")),Fe={dialogInfo:null,entitiesToDelete:null,deletingInProgress:!1,temporaryFilters:{}};var Ce=n(92207),Re=n.n(Ce),Be=n(69917),Me=n(70661),Ue=n(48673);const Je=function(e){var t=e.errors.map((function(e){var t=e.entityValidatorErrors;return Object.keys(t).map((function(e){return(0,W.jsx)(Ue.A.List,{children:t[e].map((function(t,n){return(0,W.jsx)(Ue.A.Item,{label:t},"entity-".concat(e,"-").concat(n))}))},e)}))}));return(0,W.jsx)(W.Fragment,{children:t})};var Ge=n(58156),We=n.n(Ge);function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ve="DELETABLE",ze=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t.rootEntity,i=r.entityName,a=r.entityLabel,s=r.key;if(s.includes("/")){var l=s.split("/"),c=B()(l,2),d=c[0],u=c[1];return Ke(Ke({},e),{},o()({},d,{entityLabel:a,keys:[].concat(C()(We()(e,[d,"keys"],[])),C()(n?[u]:[]))}))}return Ke(Ke({},e),{},o()({},i,{entityLabel:a,keys:[].concat(C()(We()(e,[i,"keys"],[])),C()(n?[s]:[]))}))},He=function(e){return e.rootEntity.deleteStatus===Ve&&!e.affectedEntities.find((function(e){return e.deleteStatus!==Ve}))},Qe=function(e,t){var n=e.entitiesToDelete;return e.limitExceeded?{limitExceeded:!0}:n.reduce((function(e,n){var r=He(n),i=r?"relatedDeletable":"relatedNotDeletable";return Ke(Ke(Ke({},e),{},{rootEntitiesDeletable:ze(e.rootEntitiesDeletable,n,r)},!r&&{rootEntitiesNotDeletable:ze(e.rootEntitiesNotDeletable,n)}),{},o()({},i,function(e,t,n,r){return Ke({},t.affectedEntities.reduce((function(e,t){return Ke(Ke({},e),n||t.deleteStatus!==Ve?o()({},t.entityName,Ke(Ke({},We()(e,t.entityName,{keys:[],keysOtherBu:[],entityLabel:t.entityLabel})),null===t.businessUnitId||t.businessUnitId===r?{keys:Array.from(new Set([].concat(C()(We()(e,[t.entityName,"keys"],[])),[t.key])))}:{keysOtherBu:Array.from(new Set([].concat(C()(We()(e,[t.entityName,"keysOtherBu"],[])),[t.key])))})):{})}),Ke({},e)))}(e[i],n,r,t)))}),{rootEntitiesDeletable:{},rootEntitiesNotDeletable:{},relatedDeletable:{},relatedNotDeletable:{},hasUnreadableEntities:!!n.find((function(e){return e.unreadableEntities}))})},Ye=function(e){var t=e.entitiesToDelete;return{entityName:We()(t,"[0].rootEntity.entityName"),keys:t.reduce((function(e,t){return[].concat(C()(e),C()(He(t)?[t.rootEntity.key]:[]))}),[])}},Xe=s().shape({entityLabel:s().string.isRequired,keys:s().arrayOf(s().string).isRequired,keysOtherBu:s().arrayOf(s().string)}),Ze=(s().shape({rootEntitiesDeletable:s().objectOf(Xe),rootEntitiesNotDeletable:s().objectOf(Xe),relatedDeletable:s().objectOf(Xe),relatedNotDeletable:s().objectOf(Xe),hasUnreadableEntities:s().bool,limitExceeded:s().bool}),Re().mark(ct)),$e=Re().mark(dt),et=Re().mark(ut),tt=Re().mark(yt),nt=Re().mark(pt),rt=Re().mark(ft),it=Re().mark(mt),ot=Re().mark(vt),at=function(e){return e.input},st=function(e){return e.app.messages},lt=function(e){return e.del.entitiesToDelete};function ct(){var e,t,n;return Re().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=1,(0,Be.Lt)(at);case 1:return e=r.sent,t=e.selection,r.next=2,(0,Be.T1)(y.A.getEntities,t,Me.A.fetchAllEntities);case 2:return n=r.sent,r.abrupt("return",{entityModel:n.entityName,keys:n.keys});case 3:case"end":return r.stop()}}),Ze)}function dt(){var e,t;return Re().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=1,(0,Be.Lt)(at);case 1:return e=n.sent,t=e.customDeleteEndpoint,n.abrupt("return",t||"client/delete");case 2:case"end":return n.stop()}}),$e)}function ut(){var e,t,n,r,i,o,a;return Re().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=1,(0,Be.T1)(ct);case 1:return e=s.sent,s.next=2,(0,Be.T1)(dt);case 2:return t=s.sent,s.next=3,(0,Be.T1)(Me.A.requestSaga,"".concat(t,"/dialog"),{method:"POST",body:e,acceptedStatusCodes:[403]});case 3:if(!(n=s.sent).ok){s.next=10;break}return s.next=4,(0,Be.T1)(Me.A.fetchPrincipal);case 4:return r=s.sent,i=n.body.temporaryFilters,s.next=5,(0,Be.yJ)(T(i));case 5:return s.next=6,(0,Be.T1)(Qe,n.body,r.currentBusinessUnit.id);case 6:return o=s.sent,s.next=7,(0,Be.yJ)(k(o));case 7:return s.next=8,(0,Be.T1)(Ye,n.body);case 8:return a=s.sent,s.next=9,(0,Be.yJ)(O(a));case 9:s.next=11;break;case 10:return s.next=11,(0,Be.yJ)(k({rootEntitiesDeletable:{},rootEntitiesNotDeletable:{},relatedDeletable:{},relatedNotDeletable:{},hasUnreadableEntities:!1}));case 11:case"end":return s.stop()}}),et)}function yt(){var e,t;return Re().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=1,(0,Be.Lt)(lt);case 1:return e=n.sent,n.next=2,(0,Be.yJ)({type:x,payload:{deletingInProgress:!0}});case 2:return n.next=3,(0,Be.T1)(dt);case 3:return t=n.sent,n.next=4,(0,Be.yJ)(p.A.addSocketReceiver("deleteAction",N));case 4:return n.prev=4,n.next=5,(0,Be.T1)(Me.A.requestSaga,t,{method:"POST",body:{entityModel:e.entityName,keys:e.keys}});case 5:n.next=7;break;case 6:return n.prev=6,n.catch(4),n.next=7,(0,Be.yJ)(p.A.removeSocketReceiver("deleteAction"));case 7:case"end":return n.stop()}}),tt,null,[[4,6]])}function pt(){return Re().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,Be.yJ)(d.A.fireExternalEvent("onCancel"));case 1:case"end":return e.stop()}}),nt)}function ft(e){var t,n;return Re().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=1,(0,Be.yJ)(p.A.removeSocketReceiver("deleteAction"));case 1:return t=Object.keys(e.deletedEntities).reduce((function(t,n){return[].concat(C()(t),C()(e.deletedEntities[n].map((function(e){return{entityName:n,key:e}}))))}),[]),n=[{type:"entity-delete-event",payload:{entities:t}}],r.next=2,(0,Be.yJ)(d.A.fireExternalEvent("onSuccess",{title:null,remoteEvents:n}));case 2:case"end":return r.stop()}}),rt)}function mt(e){var t,n;return Re().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=1,(0,Be.yJ)(p.A.removeSocketReceiver("deleteAction"));case 1:return r.next=2,(0,Be.Lt)(st);case 2:if(t=r.sent,null==e||!e.information){r.next=4;break}return r.next=3,(0,Be.yJ)(d.A.fireExternalEvent("onError",{message:e.information}));case 3:case 5:r.next=7;break;case 4:if(null==e||!e.validationErrors){r.next=6;break}return n=function(){return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("div",{children:t["client.delete.validationErrorMessage"]}),(0,W.jsx)(Je,{errors:e.validationErrors})]})},r.next=5,(0,Be.yJ)(d.A.fireExternalEvent("onError",{message:n}));case 6:return r.next=7,(0,Be.yJ)(d.A.fireExternalEvent("onError",{message:t["client.delete.errorMessage"]}));case 7:case"end":return r.stop()}}),it)}function gt(e){var t=e.payload.data;return Re().mark((function e(){var n;return Re().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.type,e.next="DELETION_START"===n?1:"FINISHED"===n?3:"ERROR"===n?5:7;break;case 1:return e.next=2,(0,Be.yJ)(d.A.fireExternalEvent("onClose"));case 2:case 4:case 6:return e.abrupt("continue",7);case 3:return e.next=4,(0,Be.T1)(ft,t.result);case 5:return e.next=6,(0,Be.T1)(mt,t.error);case 7:case"end":return e.stop()}}),e)}))()}function vt(){return Re().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,Be.Q7)([(0,Be.p8)(g,ut),(0,Be.p8)(A,yt),(0,Be.p8)(h,pt),(0,Be.p8)(E,gt)]);case 1:case"end":return e.stop()}}),ot)}const At={del:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fe,t=arguments.length>1?arguments[1]:void 0,n=_e[t.type];return n?n(e,t):e}};var xt,ht=[vt],bt="delete",Et=["onSuccess","onCancel","onError","onClose","emitAction"],jt=function(e,t,n,r){var i=xt||(xt=(0,W.jsx)(Ie,{})),o=c.A.createStore(At,ht,t,bt);l.A.addToStore(o,(function(e){return e.input.emitAction}));var a=!n.emitAction;return u.A.addToStore(o,a),p.A.addToStore(o,!a),d.A.addToStore(o,(function(e){return c.A.getEvents(Et,e.input)})),c.A.createApp(bt,i,o,{input:t,events:n,actions:[],publicPath:r,textResourceModules:["component","common",bt]})};c.A.registerAppInRegistry(bt,jt);var kt=function(e){return c.A.useApp({initApp:jt,props:e,packageName:bt,externalEvents:Et}).component};kt.propTypes={selection:y.A.propType.isRequired,customDeleteEndpoint:s().string};const St=kt;c.A.createBundleableApp(bt,jt,kt);function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Tt=function(e){return(0,W.jsx)(St,Nt(Nt({},e),{},{customDeleteEndpoint:"documents/delete/websocket"}))}},62896(e,t,n){n.r(t),n.d(t,{default:()=>p});var r=n(22056),i=n.n(r),o=n(4883),a=n(6910),s=n(25133),l=n(40676),c=n(26800),d=n(1636),u=n(31085),y=n(74848);const p=(0,u.S)((function(e){var t=e.selection,n=e.onSuccess,r=e.onCancel,u=e.locale,p=e.context,f=e.emitAction,m=e.navigate,g=e.navigationStrategy,v=t.ids[0].split("/"),A=i()(v,2),x=A[0],h=A[1];(0,o.useEffect)((function(){"Resource"===x&&(m("/docs/doc/".concat(h,"/detail")),r())}),[x,h,m,r]);var b=(0,d.A)(p,x);return(0,y.jsx)(a.Ay,{entityName:x,formName:b,entityId:h,mode:"update",locale:u,onEntityUpdated:function(){var e=[{type:"entity-update-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},onEntityDeleted:function(){var e=[{type:"entity-delete-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||f(e)},listApp:s.Ay,docsApp:c.Ay,labelPosition:"inside",customActions:{history:function(e,t,n,r,i,o,a){g.navigateToPath({pathname:(0,l.K)(t),inNewTab:!0})}}})}))},19760(e,t,n){n.r(t),n.d(t,{default:()=>D});var r,i,o,a=n(24843),s=n(71468),l=n(9675),c=n(31085),d=n(22056),u=n.n(d),y=n(72189),p=n.n(y),f=n(2404),m=n.n(f),g=n(4883),v=n(22834),A=n(51510),x=n(76242),h=n(88208),b=n(33150),E=n(26800),j=n(78240),k=n(74848),S=A.Ay.div.withConfig({displayName:"StyledButtonsWrapper"})(r||(r=p()(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),x.Ay),O=(0,A.Ay)(h.A).withConfig({displayName:"StyledLoadMask"})(i||(i=p()(["\n height: auto;\n"]))),N=function(e,t){return null!==e?"Move_docs_list_item":null!==t?"Move_root_docs_list_item_specific":"Move_root_docs_list_item"},T={initialize:l.n_,moveElements:l.BQ};const D=(0,c.S)((0,s.Ng)((function(e){return{isWaiting:e.docs.move.isWaiting,domainTypes:e.input.domainTypes,rootNodes:e.input.rootNodes,businessUnit:e.input.businessUnit,locale:e.app.locale}}),T)((0,a.Ay)((function(e){var t=e.selection,n=e.onSuccess,r=e.onError,i=e.path,a=e.initialize,s=e.moveElements,l=e.isWaiting,c=e.domainTypes,d=e.rootNodes,y=e.businessUnit,p=e.locale,f=e.emitAction,A=(0,j.A)(i),x={model:"Docs_list_item",key:"".concat(A.model,"/").concat(A.key)},h=(0,g.useState)(x),T=u()(h,2),D=T[0],w=T[1];(0,g.useEffect)((function(){a(t,n,r)}),[]);var L=function(e,t){switch(e){case"Domain":return"/docs/domain/".concat(t,"/list");case"Folder":return"/docs/folder/".concat(t,"/list");case"Resource":return;default:throw new Error("Unexpected model: ".concat(e))}};return(0,k.jsxs)(O,{required:[!l],children:[(0,k.jsx)(E.Ay,{routerType:"routerless",initialLocation:function(){if(null===D)return null;var e=D.key.split("/"),t=u()(e,2),n=t[0],r=t[1];return L(n,r)}(),listLimit:10,selectionStyle:"none",searchFormType:"none",getListFormName:N,onListParentChange:w,getCustomLocation:L,navigationStrategy:{},embedded:!0,emitAction:f,noLeftPadding:!0,domainTypes:c,rootNodes:d,businessUnit:y,sortable:!1,scrollBehaviour:"none",locale:p,selectOnRowClick:!1}),(0,k.jsx)(S,{children:(0,k.jsx)(b.A,{onClick:function(){return s(D.key,t.ids)},look:"raised",ink:"primary",disabled:null===D||m()(D,x),children:o||(o=(0,k.jsx)(v.A,{id:"client.actions.dms-move.button"}))})})]})}))))},1636(e,t,n){n.d(t,{A:()=>r});const r=function(e,t){return e.detailFormNames&&e.detailFormNames[t]?e.detailFormNames[t]:"Dms".concat(t)}}}]);
package/dist/index.js CHANGED
@@ -62,4 +62,4 @@ const{entries:r,setPrototypeOf:o,isFrozen:i,getPrototypeOf:a,getOwnPropertyDescr
62
62
  * LICENSE.md file in the root directory of this source tree.
63
63
  *
64
64
  * @license MIT
65
- */function l(e={}){return g((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=h(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),f("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:m(t))}),(function(e,t){d("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function u(e,t){if(!1===e||null==e)throw new Error(t)}function d(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function f(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?h(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function m({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function h(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function g(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,c="POP",l=null,u=d();function d(){return(a.state||{idx:null}).idx}function m(){c="POP";let e=d(),t=null==e?null:e-u;u=e,l&&l({action:c,location:g.location,delta:t})}function h(e){return y(e)}null==u&&(u=0,a.replaceState({...a.state,idx:u},""));let g={get action(){return c},get location(){return e(o,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(s,m),l=e,()=>{o.removeEventListener(s,m),l=null}},createHref:e=>t(o,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c="PUSH";let r=f(g.location,e,t);n&&n(r,e),u=d()+1;let s=p(r,u),m=g.createHref(r);try{a.pushState(s,"",m)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(m)}i&&l&&l({action:c,location:g.location,delta:1})},replace:function(e,t){c="REPLACE";let r=f(g.location,e,t);n&&n(r,e),u=d();let o=p(r,u),s=g.createHref(r);a.replaceState(o,"",s),i&&l&&l({action:c,location:g.location,delta:0})},go:e=>a.go(e)};return g}function y(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),u(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:m(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function v(e){return{defaultValue:e}}var b=class{constructor(e){var t,n,r;if(t=this,n=o,r=new Map,n.has(t)?a("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),e)for(let[t,n]of e)this.set(t,n)}get(e){if(c(this,o).has(e))return c(this,o).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw new Error("No value found for context")}set(e,t){c(this,o).set(e,t)}};o=new WeakMap;var w=new Set(["lazy","caseSensitive","path","id","index","children"]);var x=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function O(e,t,n=[],r={},o=!1){return e.map(((e,i)=>{let a=[...n,String(i)],c="string"==typeof e.id?e.id:a.join("-");if(u(!0!==e.index||!e.children,"Cannot specify children on an index route"),u(o||!r[c],`Found a route id collision on id "${c}". Route id's must be globally unique within Data Router usages`),function(e){return!0===e.index}(e)){let n={...e,id:c};return r[c]=k(n,t(n)),n}{let n={...e,id:c,children:void 0};return r[c]=k(n,t(n)),e.children&&(n.children=O(e.children,t,a,r,o)),n}}))}function k(e,t){return Object.assign(e,{...t,..."object"==typeof t.lazy&&null!=t.lazy?{lazy:{...e.lazy,...t.lazy}}:{}})}function S(e,t,n="/"){return A(e,t,n,!1)}function A(e,t,n,r){let o=M(("string"==typeof t?h(t):t).pathname||"/",n);if(null==o)return null;let i=E(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e<i.length;++e){let t=R(o);a=C(i[e],t,r)}return a}function j(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function E(e,t=[],n=[],r="",o=!1){let i=(e,i,a=o,c)=>{let s={relativePath:void 0===c?e.path||"":c,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(r)&&a)return;u(s.relativePath.startsWith(r),`Absolute route path "${s.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length)}let l=W([r,s.relativePath]),d=n.concat(s);e.children&&e.children.length>0&&(u(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),E(e.children,t,d,l,a)),(null!=e.path||e.index)&&t.push({path:l,score:_(l,e.index),routesMeta:d})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of P(e.path))i(e,t,!0,n);else i(e,t)})),t}function P(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=P(r.join("/")),c=[];return c.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&c.push(...a),c.map((t=>e.startsWith("/")&&""===t?"/":t))}var T=/^:[\w-]+$/,D=e=>"*"===e;function _(e,t){let n=e.split("/"),r=n.length;return n.some(D)&&(r+=-2),t&&(r+=2),n.filter((e=>!D(e))).reduce(((e,t)=>e+(T.test(t)?3:""===t?1:10)),r)}function C(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e<r.length;++e){let c=r[e],s=e===r.length-1,l="/"===i?t:t.slice(i.length)||"/",u=N({path:c.relativePath,caseSensitive:c.caseSensitive,end:s},l),d=c.route;if(!u&&s&&n&&!r[r.length-1].route.index&&(u=N({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},l)),!u)return null;Object.assign(o,u.params),a.push({params:o,pathname:W([i,u.pathname]),pathnameBase:q(W([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=W([i,u.pathnameBase]))}return a}function N(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=I(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),c=o.slice(1);return{params:r.reduce(((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=c[r]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=c[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function I(e,t=!1,n=!0){d("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"))).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function R(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return d(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function M(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var L=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,F=e=>L.test(e);function H(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function z(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function B(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function V(e){let t=B(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function U(e,t,n,r=!1){let o;"string"==typeof e?o=h(e):(o={...e},u(!o.pathname||!o.pathname.includes("?"),z("?","pathname","search",o)),u(!o.pathname||!o.pathname.includes("#"),z("#","pathname","hash",o)),u(!o.search||!o.search.includes("#"),z("#","search","hash",o)));let i,a=""===e||""===o.pathname,c=a?"/":o.pathname;if(null==c)i=n;else{let e=t.length-1;if(!r&&c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let s=function(e,t="/"){let n,{pathname:r,search:o="",hash:i=""}="string"==typeof e?h(e):e;return r?(r=r.replace(/\/\/+/g,"/"),n=r.startsWith("/")?H(r.substring(1),"/"):H(r,t)):n=t,{pathname:n,search:Y(o),hash:$(i)}}(o,i),l=c&&"/"!==c&&c.endsWith("/"),d=(a||"."===c)&&n.endsWith("/");return s.pathname.endsWith("/")||!l&&!d||(s.pathname+="/"),s}var W=e=>e.join("/").replace(/\/\/+/g,"/"),q=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",$=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var J=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function G(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function K(e){return e.map((e=>e.route.path)).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Q="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function X(e,t){let n=e;if("string"!=typeof n||!L.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(Q)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=M(r.pathname,t);r.origin===e.origin&&null!=i?n=i+r.search+r.hash:o=!0}catch(e){d(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}var Z=Symbol("Uninstrumented");function ee(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach((e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}})));let r={};if("function"==typeof t.lazy&&n.lazy.length>0){let e=te(n.lazy,t.lazy,(()=>{}));e&&(r.lazy=e)}if("object"==typeof t.lazy){let e=t.lazy;["middleware","loader","action"].forEach((t=>{let o=e[t],i=n[`lazy.${t}`];if("function"==typeof o&&i.length>0){let e=te(i,o,(()=>{}));e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}}))}return["loader","action"].forEach((e=>{let o=t[e];if("function"==typeof o&&n[e].length>0){let t=o[Z]??o,i=te(n[e],t,((...e)=>re(e[0])));i&&("loader"===e&&!0===t.hydrate&&(i.hydrate=!0),i[Z]=t,r[e]=i)}})),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map((e=>{let t=e[Z]??e,r=te(n.middleware,t,((...e)=>re(e[0])));return r?(r[Z]=t,r):e}))),r}function te(e,t,n){return 0===e.length?null:async(...r)=>{let o=await ne(e,n(...r),(()=>t(...r)),e.length-1);if("error"===o.type)throw o.value;return o.value}}async function ne(e,t,n,r){let o,i=e[r];if(i){let a,c=async()=>(a?console.error("You cannot call instrumented handlers more than once"):a=ne(e,t,n,r-1),o=await a,u(o,"Expected a result"),"error"===o.type&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await i(c,t)}catch(e){console.error("An instrumentation function threw an error:",e)}a||await c(),await a}else try{let e=await n();o={type:"success",value:e}}catch(e){o={type:"error",value:e}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function re(e){let{request:t,context:n,params:r,unstable_pattern:o}=e;return{request:ie(t),params:{...r},unstable_pattern:o,context:ae(n)}}function oe(e,t){return{currentUrl:m(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function ie(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function ae(e){if(function(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t||Object.getOwnPropertyNames(t).sort().join("\0")===ce}(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var ce=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var se=["POST","PUT","PATCH","DELETE"],le=new Set(se),ue=["GET",...se],de=new Set(ue),pe=new Set([301,302,303,307,308]),fe=new Set([307,308]),me={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},he={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ge={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ye=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),ve="remix-router-transitions",be=Symbol("ResetLoaderData");function we(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,n=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement;u(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=e.hydrationRouteProperties||[],o=e.mapRouteProperties||ye,i=o;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;i=e=>({...o(e),...ee(t.map((e=>e.route)).filter(Boolean),e)})}let a,c={},s=O(e.routes,i,void 0,c),l=e.basename||"/";l.startsWith("/")||(l=`/${l}`);let p,h,g=e.dataStrategy||Ne,v={...e.future},w=null,x=new Set,k=null,E=null,P=null,T=null!=e.hydrationData,D=S(s,e.history.location,l),_=!1,C=null;if(null!=D||e.patchRoutesOnNavigation){if(D&&!e.hydrationData){nt(D,s,e.history.location.pathname).active&&(D=null)}if(D)if(D.some((e=>e.route.lazy)))p=!1;else if(D.some((e=>Se(e.route)))){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=D.findIndex((e=>void 0!==n[e.route.id]));p=D.slice(0,e+1).every((e=>!Ae(e.route,t,n)))}else p=D.every((e=>!Ae(e.route,t,n)))}else p=!0;else{p=!1,D=[];let t=nt(null,s,e.history.location.pathname);t.active&&t.matches&&(_=!0,D=t.matches)}}else{let t=et(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Ze(s);p=!0,D=n,C={[r.id]:t}}let N,I,R={historyAction:e.history.action,location:e.history.location,matches:D,initialized:p,navigation:me,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},L="POP",H=null,z=!1,B=!1,V=new Map,U=null,W=!1,q=!1,Y=new Set,$=new Map,J=0,K=-1,Q=new Map,X=new Set,ne=new Map,re=new Map,ie=new Set,ae=new Map,ce=null;function se(e,t={}){e.matches&&(e.matches=e.matches.map((e=>{let t=c[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}))),R={...R,...e};let n=[],r=[];R.fetchers.forEach(((e,t)=>{"idle"===e.state&&(ie.has(t)?n.push(t):r.push(t))})),ie.forEach((e=>{R.fetchers.has(e)||$.has(e)||n.push(e)})),[...x].forEach((r=>r(R,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),n.forEach((e=>_e(e))),r.forEach((e=>R.fetchers.delete(e)))}function le(t,n,{flushSync:r}={}){let o,i=null!=R.actionData&&null!=R.navigation.formMethod&&ft(R.navigation.formMethod)&&"loading"===R.navigation.state&&!0!==t.state?._isRedirect;o=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?R.actionData:null;let c=n.loaderData?Ke(R.loaderData,n.loaderData,n.matches||[],n.errors):R.loaderData,l=R.blockers;l.size>0&&(l=new Map(l),l.forEach(((e,t)=>l.set(t,ge))));let u,d=!W&&Je(t,n.matches||R.matches),p=!0===z||null!=R.navigation.formMethod&&ft(R.navigation.formMethod)&&!0!==t.state?._isRedirect;if(a&&(s=a,a=void 0),W||"POP"===L||("PUSH"===L?e.history.push(t,t.state):"REPLACE"===L&&e.history.replace(t,t.state)),"POP"===L){let e=V.get(R.location.pathname);e&&e.has(t.pathname)?u={currentLocation:R.location,nextLocation:t}:V.has(t.pathname)&&(u={currentLocation:t,nextLocation:R.location})}else if(B){let e=V.get(R.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),V.set(R.location.pathname,e)),u={currentLocation:R.location,nextLocation:t}}se({...n,actionData:o,loaderData:c,historyAction:L,location:t,initialized:!0,navigation:me,revalidation:"idle",restoreScrollPosition:d,preventScrollReset:p,blockers:l},{viewTransitionOpts:u,flushSync:!0===r}),L="POP",z=!1,B=!1,W=!1,q=!1,H?.resolve(),H=null,ce?.resolve(),ce=null}async function ue(t,n,o){N&&N.abort(),N=null,L=t,W=!0===(o&&o.startUninterruptedRevalidation),function(e,t){if(k&&P){let n=$e(e,t);k[n]=P()}}(R.location,R.matches),z=!0===(o&&o.preventScrollReset),B=!0===(o&&o.enableViewTransition);let u=a||s,d=o&&o.overrideNavigation,p=o?.initialHydration&&R.matches&&R.matches.length>0&&!_?R.matches:S(u,n,l),f=!0===(o&&o.flushSync);if(p&&R.initialized&&!q&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(R.location,n)&&!(o&&o.submission&&ft(o.submission.formMethod)))return void le(n,{matches:p},{flushSync:f});let m=nt(p,u,n.pathname);if(m.active&&m.matches&&(p=m.matches),!p){let{error:e,notFoundMatches:t,route:r}=Ye(n.pathname);return void le(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:f})}N=new AbortController;let h,g=qe(e.history,n,N.signal,o&&o.submission),y=e.getContext?await e.getContext():new b;if(o&&o.pendingError)h=[Xe(p).route.id,{type:"error",error:o.pendingError}];else if(o&&o.submission&&ft(o.submission.formMethod)){let t=await async function(t,n,o,a,u,d,p,f={}){je();let m,h=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(n,o);if(se({navigation:h},{flushSync:!0===f.flushSync}),d){let e=await rt(a,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:n}=Ze(s);return{matches:t,pendingActionResult:[n.id,{type:"error",error:e.error}]}}let t=Xe(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:"error",error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:r}=Ye(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:"error",error:t}]}}a=e.matches}let g=ht(a,n);if(g.route.action||g.route.lazy){let e=He(i,c,t,a,g,p?[]:r,u),n=await be(t,e,u,null);if(m=n[g.route.id],!m)for(let e of a)if(n[e.route.id]){m=n[e.route.id];break}if(t.signal.aborted)return{shortCircuited:!0}}else m={type:"error",error:et(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};if(st(m)){let n;if(f&&null!=f.replace)n=f.replace;else{n=We(m.response.headers.get("Location"),new URL(t.url),l,e.history)===R.location.pathname+R.location.search}return await pe(t,m,!0,{submission:o,replace:n}),{shortCircuited:!0}}if(ct(m)){let e=Xe(a,g.route.id);return!0!==(f&&f.replace)&&(L="PUSH"),{matches:a,pendingActionResult:[e.route.id,m,g.route.id]}}return{matches:a,pendingActionResult:[g.route.id,m]}}(g,n,o.submission,p,y,m.active,o&&!0===o.initialHydration,{replace:o.replace,flushSync:f});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(ct(r)&&G(r.error)&&404===r.error.status)return N=null,void le(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}p=t.matches||p,h=t.pendingActionResult,d=yt(n,o.submission),f=!1,m.active=!1,g=qe(e.history,g.url,g.signal)}let{shortCircuited:v,matches:w,loaderData:x,errors:O}=await async function(t,n,o,u,d,p,f,m,h,g,y,v,b){let w=p||yt(n,f),x=f||m||gt(w),O=!W&&!g;if(d){if(O){let e=de(v);se({navigation:w,...void 0!==e?{actionData:e}:{}},{flushSync:y})}let e=await rt(o,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:n}=Ze(s);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Xe(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=Ye(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}o=e.matches}let k=a||s,{dsMatches:S,revalidatingFetchers:A}=ke(t,u,i,c,e.history,R,o,x,n,g?[]:r,!0===g,q,Y,ie,ne,X,k,l,null!=e.patchRoutesOnNavigation,v,b);if(K=++J,!e.dataStrategy&&!S.some((e=>e.shouldLoad))&&!S.some((e=>e.route.middleware&&e.route.middleware.length>0))&&0===A.length){let e=Re();return le(n,{matches:o,loaderData:{},errors:v&&ct(v[1])?{[v[0]]:v[1].error}:null,...Qe(v),...e?{fetchers:new Map(R.fetchers)}:{}},{flushSync:y}),{shortCircuited:!0}}if(O){let e={};if(!d){e.navigation=w;let t=de(v);void 0!==t&&(e.actionData=t)}A.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=R.fetchers.get(e.key),n=vt(void 0,t?t.data:void 0);R.fetchers.set(e.key,n)})),new Map(R.fetchers)}(A)),se(e,{flushSync:y})}A.forEach((e=>{Ce(e.key),e.controller&&$.set(e.key,e.controller)}));let j=()=>A.forEach((e=>Ce(e.key)));N&&N.signal.addEventListener("abort",j);let{loaderResults:E,fetcherResults:P}=await we(S,A,t,u);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",j);A.forEach((e=>$.delete(e.key)));let T=tt(E);if(T)return await pe(t,T.result,!0,{replace:h}),{shortCircuited:!0};if(T=tt(P),T)return X.add(T.key),await pe(t,T.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:D,errors:_}=Ge(R,o,E,v,A,P);g&&R.errors&&(_={...R.errors,..._});let C=Re(),I=Me(K),M=C||I||A.length>0;return{matches:o,loaderData:D,errors:_,...M?{fetchers:new Map(R.fetchers)}:{}}}(g,n,p,y,m.active,d,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,f,h,o&&o.callSiteDefaultShouldRevalidate);v||(N=null,le(n,{matches:w||p,...Qe(h),loaderData:x,errors:O}))}function de(e){return e&&!ct(e[1])?{[e[0]]:e[1].data}:R.actionData?0===Object.keys(R.actionData).length?null:R.actionData:void 0}async function pe(r,o,i,{submission:a,fetcherSubmission:c,preventScrollReset:s,replace:d}={}){i||(H?.resolve(),H=null),o.response.headers.has("X-Remix-Revalidate")&&(q=!0);let p=o.response.headers.get("Location");u(p,"Expected a Location header on the redirect Response"),p=We(p,new URL(r.url),l,e.history);let m=f(R.location,p,{_isRedirect:!0});if(n){let e=!1;if(o.response.headers.has("X-Remix-Reload-Document"))e=!0;else if(F(p)){const n=y(p,!0);e=n.origin!==t.location.origin||null==M(n.pathname,l)}if(e)return void(d?t.location.replace(p):t.location.assign(p))}N=null;let h=!0===d||o.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:g,formAction:v,formEncType:b}=R.navigation;!a&&!c&&g&&v&&b&&(a=gt(R.navigation));let w=a||c;if(fe.has(o.response.status)&&w&&ft(w.formMethod))await ue(h,m,{submission:{...w,formAction:p},preventScrollReset:s||z,enableViewTransition:i?B:void 0});else{let e=yt(m,a);await ue(h,m,{overrideNavigation:e,fetcherSubmission:c,preventScrollReset:s||z,enableViewTransition:i?B:void 0})}}async function be(e,t,n,r){let o,i={};try{o=await ze(g,e,t,r,n,!1)}catch(e){return t.filter((e=>e.shouldLoad)).forEach((t=>{i[t.route.id]={type:"error",error:e}})),i}if(e.signal.aborted)return i;if(!ft(e.method))for(let e of t){if("error"===o[e.route.id]?.type)break;o.hasOwnProperty(e.route.id)||R.loaderData.hasOwnProperty(e.route.id)||R.errors&&R.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(o[e.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[n,r]of Object.entries(o))if(at(r)){let o=r.result;i[n]={type:"redirect",response:Ue(o,e,n,t,l)}}else i[n]=await Ve(r);return i}async function we(e,t,n,r){let o=be(n,e,r,null),i=Promise.all(t.map((async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await be(e.request,e.matches,r,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:"error",error:et(404,{pathname:e.path})}})})));return{loaderResults:await o,fetcherResults:(await i).reduce(((e,t)=>Object.assign(e,t)),{})}}function je(){q=!0,ne.forEach(((e,t)=>{$.has(t)&&Y.add(t),Ce(t)}))}function Pe(e,t,n={}){R.fetchers.set(e,t),se({fetchers:new Map(R.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function Te(e,t,n,r={}){let o=Xe(R.matches,t);_e(e),se({errors:{[o.route.id]:n},fetchers:new Map(R.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function De(e){return re.set(e,(re.get(e)||0)+1),ie.has(e)&&ie.delete(e),R.fetchers.get(e)||he}function _e(e){let t=R.fetchers.get(e);!$.has(e)||t&&"loading"===t.state&&Q.has(e)||Ce(e),ne.delete(e),Q.delete(e),X.delete(e),ie.delete(e),Y.delete(e),R.fetchers.delete(e)}function Ce(e,t){let n=$.get(e);n&&(n.abort(t),$.delete(e))}function Ie(e){for(let t of e){let e=bt(De(t).data);R.fetchers.set(t,e)}}function Re(){let e=[],t=!1;for(let n of X){let r=R.fetchers.get(n);u(r,`Expected fetcher: ${n}`),"loading"===r.state&&(X.delete(n),e.push(n),t=!0)}return Ie(e),t}function Me(e){let t=[];for(let[n,r]of Q)if(r<e){let e=R.fetchers.get(n);u(e,`Expected fetcher: ${n}`),"loading"===e.state&&(Ce(n),Q.delete(n),t.push(n))}return Ie(t),t.length>0}function Le(e){R.blockers.delete(e),ae.delete(e)}function Fe(e,t){let n=R.blockers.get(e)||ge;u("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(R.blockers);r.set(e,t),se({blockers:r})}function Be({currentLocation:e,nextLocation:t,historyAction:n}){if(0===ae.size)return;ae.size>1&&d(!1,"A router only supports one blocker at a time");let r=Array.from(ae.entries()),[o,i]=r[r.length-1],a=R.blockers.get(o);return a&&"proceeding"===a.state?void 0:i({currentLocation:e,nextLocation:t,historyAction:n})?o:void 0}function Ye(e){let t=et(404,{pathname:e}),n=a||s,{matches:r,route:o}=Ze(n);return{notFoundMatches:r,route:o,error:t}}function $e(e,t){if(E){return E(e,t.map((e=>j(e,R.loaderData))))||e.key}return e.key}function Je(e,t){if(k){let n=$e(e,t),r=k[n];if("number"==typeof r)return r}return null}function nt(t,n,r){if(e.patchRoutesOnNavigation){if(!t){return{active:!0,matches:A(n,r,l,!0)||[]}}if(Object.keys(t[0].params).length>0){return{active:!0,matches:A(n,r,l,!0)}}}return{active:!1,matches:null}}async function rt(t,n,r,o){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let u=t;for(;;){let t=null==a,d=a||s,p=c;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:u,fetcherKey:o,patch:(e,t)=>{r.aborted||Ee(e,t,d,p,i,!1)}})}catch(e){return{type:"error",error:e,partialMatches:u}}finally{t&&!r.aborted&&(s=[...s])}if(r.aborted)return{type:"aborted"};let f=S(d,n,l),m=null;if(f){if(0===Object.keys(f[0].params).length)return{type:"success",matches:f};if(m=A(d,n,l,!0),!(m&&u.length<m.length&&ot(u,m.slice(0,u.length))))return{type:"success",matches:f}}if(m||(m=A(d,n,l,!0)),!m||ot(u,m))return{type:"success",matches:null};u=m}}function ot(e,t){return e.length===t.length&&e.every(((e,n)=>e.route.id===t[n].route.id))}return h={get basename(){return l},get future(){return v},get state(){return R},get routes(){return s},get window(){return t},initialize:function(){if(w=e.history.listen((({action:t,location:n,delta:r})=>{if(I)return I(),void(I=void 0);d(0===ae.size||null!=r,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=Be({currentLocation:R.location,nextLocation:n,historyAction:t});if(o&&null!=r){let t=new Promise((e=>{I=e}));return e.history.go(-1*r),Fe(o,{state:"blocked",location:n,proceed(){Fe(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),t.then((()=>e.history.go(r)))},reset(){let e=new Map(R.blockers);e.set(o,ge),se({blockers:e})}}),H?.resolve(),void(H=null)}return ue(t,n)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(ve);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(e){}}(t,V);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(ve,JSON.stringify(n))}catch(e){d(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}(t,V);t.addEventListener("pagehide",e),U=()=>t.removeEventListener("pagehide",e)}return R.initialized||ue("POP",R.location,{initialHydration:!0}),h},subscribe:function(e){return x.add(e),()=>x.delete(e)},enableScrollRestoration:function(e,t,n){if(k=e,P=t,E=n||null,!T&&R.navigation===me){T=!0;let e=Je(R.location,R.matches);null!=e&&se({restoreScrollPosition:e})}return()=>{k=null,P=null,E=null}},navigate:async function t(n,r){if(H?.resolve(),H=null,"number"==typeof n){H||(H=wt());let t=H.promise;return e.history.go(n),t}let o=xe(R.location,R.matches,l,n,r?.fromRouteId,r?.relative),{path:i,submission:a,error:c}=Oe(!1,o,r),s=R.location,u=f(R.location,i,r&&r.state);u={...u,...e.history.encodeLocation(u)};let d=r&&null!=r.replace?r.replace:void 0,p="PUSH";!0===d?p="REPLACE":!1===d||null!=a&&ft(a.formMethod)&&a.formAction===R.location.pathname+R.location.search&&(p="REPLACE");let m=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,h=!0===(r&&r.flushSync),g=Be({currentLocation:s,nextLocation:u,historyAction:p});g?Fe(g,{state:"blocked",location:u,proceed(){Fe(g,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),t(n,r)},reset(){let e=new Map(R.blockers);e.set(g,ge),se({blockers:e})}}):await ue(p,u,{submission:a,pendingError:c,preventScrollReset:m,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:h,callSiteDefaultShouldRevalidate:r&&r.unstable_defaultShouldRevalidate})},fetch:async function(t,n,o,d){Ce(t);let p=!0===(d&&d.flushSync),f=a||s,m=xe(R.location,R.matches,l,o,n,d?.relative),h=S(f,m,l),g=nt(h,f,m);if(g.active&&g.matches&&(h=g.matches),!h)return void Te(t,n,et(404,{pathname:m}),{flushSync:p});let{path:y,submission:v,error:w}=Oe(!0,m,d);if(w)return void Te(t,n,w,{flushSync:p});let x=e.getContext?await e.getContext():new b,O=!0===(d&&d.preventScrollReset);v&&ft(v.formMethod)?await async function(t,n,o,d,p,f,m,h,g,y){je(),ne.delete(t);let v=R.fetchers.get(t);Pe(t,function(e,t){let n={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return n}(g,v),{flushSync:m});let b=new AbortController,w=qe(e.history,o,b.signal,g);if(f){let e=await rt(d,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void Te(t,n,e.error,{flushSync:m});if(!e.matches)return void Te(t,n,et(404,{pathname:o}),{flushSync:m});d=e.matches}let x=ht(d,o);if(!x.route.action&&!x.route.lazy){let e=et(405,{method:g.formMethod,pathname:o,routeId:n});return void Te(t,n,e,{flushSync:m})}$.set(t,b);let O=J,k=He(i,c,w,d,x,r,p),A=await be(w,k,p,t),j=A[x.route.id];if(!j)for(let e of k)if(A[e.route.id]){j=A[e.route.id];break}if(w.signal.aborted)return void($.get(t)===b&&$.delete(t));if(ie.has(t)){if(st(j)||ct(j))return void Pe(t,bt(void 0))}else{if(st(j))return $.delete(t),K>O?void Pe(t,bt(void 0)):(X.add(t),Pe(t,vt(g)),pe(w,j,!1,{fetcherSubmission:g,preventScrollReset:h}));if(ct(j))return void Te(t,n,j.error)}let E=R.navigation.location||R.location,P=qe(e.history,E,b.signal),T=a||s,D="idle"!==R.navigation.state?S(T,R.navigation.location,l):R.matches;u(D,"Didn't find any matches after fetcher action");let _=++J;Q.set(t,_);let C=vt(g,j.data);R.fetchers.set(t,C);let{dsMatches:I,revalidatingFetchers:M}=ke(P,p,i,c,e.history,R,D,g,E,r,!1,q,Y,ie,ne,X,T,l,null!=e.patchRoutesOnNavigation,[x.route.id,j],y);M.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=R.fetchers.get(t),r=vt(void 0,n?n.data:void 0);R.fetchers.set(t,r),Ce(t),e.controller&&$.set(t,e.controller)})),se({fetchers:new Map(R.fetchers)});let F=()=>M.forEach((e=>Ce(e.key)));b.signal.addEventListener("abort",F);let{loaderResults:H,fetcherResults:z}=await we(I,M,P,p);if(b.signal.aborted)return;if(b.signal.removeEventListener("abort",F),Q.delete(t),$.delete(t),M.forEach((e=>$.delete(e.key))),R.fetchers.has(t)){let e=bt(j.data);R.fetchers.set(t,e)}let B=tt(H);if(B)return pe(P,B.result,!1,{preventScrollReset:h});if(B=tt(z),B)return X.add(B.key),pe(P,B.result,!1,{preventScrollReset:h});let{loaderData:V,errors:U}=Ge(R,D,H,void 0,M,z);Me(_),"loading"===R.navigation.state&&_>K?(u(L,"Expected pending action"),N&&N.abort(),le(R.navigation.location,{matches:D,loaderData:V,errors:U,fetchers:new Map(R.fetchers)})):(se({errors:U,loaderData:Ke(R.loaderData,V,D,U),fetchers:new Map(R.fetchers)}),q=!1)}(t,n,y,h,x,g.active,p,O,v,d&&d.unstable_defaultShouldRevalidate):(ne.set(t,{routeId:n,path:y}),await async function(t,n,o,a,s,l,u,d,p){let f=R.fetchers.get(t);Pe(t,vt(p,f?f.data:void 0),{flushSync:u});let m=new AbortController,h=qe(e.history,o,m.signal);if(l){let e=await rt(a,new URL(h.url).pathname,h.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void Te(t,n,e.error,{flushSync:u});if(!e.matches)return void Te(t,n,et(404,{pathname:o}),{flushSync:u});a=e.matches}let g=ht(a,o);$.set(t,m);let y=J,v=He(i,c,h,a,g,r,s),b=await be(h,v,s,t),w=b[g.route.id];$.get(t)===m&&$.delete(t);if(h.signal.aborted)return;if(ie.has(t))return void Pe(t,bt(void 0));if(st(w))return K>y?void Pe(t,bt(void 0)):(X.add(t),void await pe(h,w,!1,{preventScrollReset:d}));if(ct(w))return void Te(t,n,w.error);Pe(t,bt(w.data))}(t,n,y,h,x,g.active,p,O,v))},revalidate:function(){ce||(ce=wt()),je(),se({revalidation:"loading"});let e=ce.promise;return"submitting"===R.navigation.state?e:"idle"===R.navigation.state?(ue(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),e):(ue(L||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:!0===B}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:De,resetFetcher:function(e,t){Ce(e,t?.reason),Pe(e,bt(null))},deleteFetcher:function(e){let t=(re.get(e)||0)-1;t<=0?(re.delete(e),ie.add(e)):re.set(e,t),se({fetchers:new Map(R.fetchers)})},dispose:function(){w&&w(),U&&U(),x.clear(),N&&N.abort(),R.fetchers.forEach(((e,t)=>_e(t))),R.blockers.forEach(((e,t)=>Le(t)))},getBlocker:function(e,t){let n=R.blockers.get(e)||ge;return ae.get(e)!==t&&ae.set(e,t),n},deleteBlocker:Le,patchRoutes:function(e,t,n=!1){let r=null==a;Ee(e,t,a||s,c,i,n),r&&(s=[...s],se({}))},_internalFetchControllers:$,_internalSetRoutes:function(e){c={},a=O(e,i,void 0,c)},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){se(e)}},e.unstable_instrumentations&&(h=function(e,t){let n={navigate:[],fetch:[]};if(t.forEach((e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}}))),n.navigate.length>0){let t=e.navigate[Z]??e.navigate,r=te(n.navigate,t,((...t)=>{let[n,r]=t;return{to:"number"==typeof n||"string"==typeof n?n:n?m(n):".",...oe(e,r??{})}}));r&&(r[Z]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[Z]??e.fetch,r=te(n.fetch,t,((...t)=>{let[n,,r,o]=t;return{href:r??".",fetcherKey:n,...oe(e,o??{})}}));r&&(r[Z]=t,e.fetch=r)}return e}(h,e.unstable_instrumentations.map((e=>e.router)).filter(Boolean))),h}function xe(e,t,n,r,o,i){let a,c;if(o){a=[];for(let e of t)if(a.push(e),e.route.id===o){c=e;break}}else a=t,c=t[t.length-1];let s=U(r||".",V(a),M(e.pathname,n)||e.pathname,"path"===i);if(null==r&&(s.search=e.search,s.hash=e.hash),(null==r||""===r||"."===r)&&c){let e=mt(s.search);if(c.route.index&&!e)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&e){let e=new URLSearchParams(s.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();s.search=n?`?${n}`:""}}return"/"!==n&&(s.pathname=function({basename:e,pathname:t}){return"/"===t?e:W([e,t])}({basename:n,pathname:s.pathname})),m(s)}function Oe(e,t,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:t};if(n.formMethod&&!pt(n.formMethod))return{path:t,error:et(405,{method:n.formMethod})};let r,o,i=()=>({path:t,error:et(400,{type:"invalid-body"})}),a=(n.formMethod||"get").toUpperCase(),c=nt(t);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!ft(a))return i();let e="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce(((e,[t,n])=>`${e}${t}=${n}\n`),""):String(n.body);return{path:t,submission:{formMethod:a,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!ft(a))return i();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:c,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return i()}}}if(u("function"==typeof FormData,"FormData is not available in this environment"),n.formData)r=Ye(n.formData),o=n.formData;else if(n.body instanceof FormData)r=Ye(n.body),o=n.body;else if(n.body instanceof URLSearchParams)r=n.body,o=$e(r);else if(null==n.body)r=new URLSearchParams,o=new FormData;else try{r=new URLSearchParams(n.body),o=$e(r)}catch(e){return i()}let s={formMethod:a,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(ft(s.formMethod))return{path:t,submission:s};let l=h(t);return e&&l.search&&mt(l.search)&&r.append("index",""),l.search=`?${r}`,{path:m(l),submission:s}}function ke(e,t,n,r,o,i,a,c,s,l,u,d,p,f,m,h,g,y,v,b,w){let x,O=b?ct(b[1])?b[1].error:b[1].data:void 0,k=o.createURL(i.location),A=o.createURL(s);if(u&&i.errors){let e=Object.keys(i.errors)[0];x=a.findIndex((t=>t.route.id===e))}else if(b&&ct(b[1])){let e=b[0];x=a.findIndex((t=>t.route.id===e))-1}let j=b?b[1].statusCode:void 0,E=j&&j>=400,P={currentUrl:k,currentParams:i.matches[0]?.params||{},nextUrl:A,nextParams:a[0].params,...c,actionResult:O,actionStatus:j},T=K(a),D=a.map(((o,a)=>{let{route:c}=o,s=null;if(null!=x&&a>x?s=!1:c.lazy?s=!0:Se(c)?u?s=Ae(c,i.loaderData,i.errors):function(e,t,n){let r=!t||n.route.id!==t.route.id,o=!e.hasOwnProperty(n.route.id);return r||o}(i.loaderData,i.matches[a],o)&&(s=!0):s=!1,null!==s)return Fe(n,r,e,T,o,l,t,s);let p=!1;"boolean"==typeof w?p=w:E?p=!1:(d||k.pathname+k.search===A.pathname+A.search||k.search!==A.search||function(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}(i.matches[a],o))&&(p=!0);let f={...P,defaultShouldRevalidate:p},m=je(o,f);return Fe(n,r,e,T,o,l,t,m,f,w)})),_=[];return m.forEach(((e,c)=>{if(u||!a.some((t=>t.route.id===e.routeId))||f.has(c))return;let s=i.fetchers.get(c),m=s&&"idle"!==s.state&&void 0===s.data,b=S(g,e.path,y);if(!b){if(v&&m)return;return void _.push({key:c,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null})}if(h.has(c))return;let x=ht(b,e.path),O=new AbortController,k=qe(o,e.path,O.signal),A=null;if(p.has(c))p.delete(c),A=He(n,r,k,b,x,l,t);else if(m)d&&(A=He(n,r,k,b,x,l,t));else{let e;e="boolean"==typeof w?w:!E&&d;let o={...P,defaultShouldRevalidate:e};je(x,o)&&(A=He(n,r,k,b,x,l,t,o))}A&&_.push({key:c,routeId:e.routeId,path:e.path,matches:A,match:x,request:k,controller:O})})),{dsMatches:D,revalidatingFetchers:_}}function Se(e){return null!=e.loader||null!=e.middleware&&e.middleware.length>0}function Ae(e,t,n){if(e.lazy)return!0;if(!Se(e))return!1;let r=null!=t&&e.id in t,o=null!=n&&void 0!==n[e.id];return!(!r&&o)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!r&&!o)}function je(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}function Ee(e,t,n,r,o,i){let a;if(e){let t=r[e];u(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),a=t.children}else a=n;let c=[],s=[];if(t.forEach((e=>{let t=a.find((t=>Pe(e,t)));t?s.push({existingRoute:t,newRoute:e}):c.push(e)})),c.length>0){let t=O(c,o,[e||"_","patch",String(a?.length||"0")],r);a.push(...t)}if(i&&s.length>0)for(let e=0;e<s.length;e++){let{existingRoute:t,newRoute:n}=s[e],r=t,[i]=O([n],o,[],{},!0);Object.assign(r,{element:i.element?i.element:r.element,errorElement:i.errorElement?i.errorElement:r.errorElement,hydrateFallbackElement:i.hydrateFallbackElement?i.hydrateFallbackElement:r.hydrateFallbackElement})}}function Pe(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(((e,n)=>t.children?.some((t=>Pe(e,t))))))}var Te=new WeakMap,De=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let o=n[t.id];if(u(o,"No route found in manifest"),!o.lazy||"object"!=typeof o.lazy)return;let i=o.lazy[e];if(!i)return;let a=Te.get(o);a||(a={},Te.set(o,a));let c=a[e];if(c)return c;let s=(async()=>{let t=function(e){return w.has(e)}(e),n=void 0!==o[e]&&"hasErrorBoundary"!==e;if(t)d(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),a[e]=Promise.resolve();else if(n)d(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await i();null!=t&&(Object.assign(o,{[e]:t}),Object.assign(o,r(o)))}"object"==typeof o.lazy&&(o.lazy[e]=void 0,Object.values(o.lazy).every((e=>void 0===e))&&(o.lazy=void 0))})();return a[e]=s,s},_e=new WeakMap;async function Ce(e){let t=e.matches.filter((e=>e.shouldLoad)),n={};return(await Promise.all(t.map((e=>e.resolve())))).forEach(((e,r)=>{n[t[r].route.id]=e})),n}async function Ne(e){return e.matches.some((e=>e.route.middleware))?Ie(e,(()=>Ce(e))):Ce(e)}function Ie(e,t){return Re(e,t,(e=>{if(dt(e))throw e;return e}),ot,(function(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:"error",result:t}}));{let{matches:r}=e,o=Math.min(Math.max(r.findIndex((e=>e.route.id===n)),0),Math.max(r.findIndex((e=>e.shouldCallHandler())),0)),i=Xe(r,r[o].route.id).route.id;return Promise.resolve({[i]:{type:"error",result:t}})}}))}async function Re(e,t,n,r,o){let{matches:i,request:a,params:c,context:s,unstable_pattern:l}=e,u=i.flatMap((e=>e.route.middleware?e.route.middleware.map((t=>[e.route.id,t])):[]));return await Me({request:a,params:c,context:s,unstable_pattern:l},u,t,n,r,o)}async function Me(e,t,n,r,o,i,a=0){let{request:c}=e;if(c.signal.aborted)throw c.signal.reason??new Error(`Request aborted: ${c.method} ${c.url}`);let s=t[a];if(!s){return await n()}let l,[u,d]=s,p=async()=>{if(l)throw new Error("You may only call `next()` once per middleware");try{let c=await Me(e,t,n,r,o,i,a+1);return l={value:c},l.value}catch(e){return l={value:await i(e,u,l)},l.value}};try{let t=await d(e,p),n=null!=t?r(t):void 0;return o(n)?n:l?n??l.value:(l={value:await p()},l.value)}catch(e){return await i(e,u,l)}}function Le(e,t,n,r,o){let i=De({key:"middleware",route:r.route,manifest:t,mapRouteProperties:e}),a=function(e,t,n,r,o){let i=n[e.id];if(u(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=_e.get(i);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{u("function"==typeof e.lazy,"No lazy route function found");let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(void 0===r)continue;let a=(o=e,x.has(o)),c=void 0!==i[e]&&"hasErrorBoundary"!==e;a?d(!a,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):c?d(!c,`Route "${i.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}var o;Object.assign(i,n),Object.assign(i,{...r(i),lazy:void 0})})();return _e.set(i,n),n.catch((()=>{})),{lazyRoutePromise:n,lazyHandlerPromise:n}}let a,c=Object.keys(e.lazy),s=[];for(let i of c){if(o&&o.includes(i))continue;let c=De({key:i,route:e,manifest:n,mapRouteProperties:r});c&&(s.push(c),i===t&&(a=c))}let l=s.length>0?Promise.all(s).then((()=>{})):void 0;return l?.catch((()=>{})),a?.catch((()=>{})),{lazyRoutePromise:l,lazyHandlerPromise:a}}(r.route,ft(n.method)?"action":"loader",t,e,o);return{middleware:i,route:a.lazyRoutePromise,handler:a.lazyHandlerPromise}}function Fe(e,t,n,r,o,i,a,c,s=null,l){let u=!1,d=Le(e,t,n,o,i);return{...o,_lazyPromises:d,shouldLoad:c,shouldRevalidateArgs:s,shouldCallHandler:e=>(u=!0,s?je(o,"boolean"==typeof l?{...s,defaultShouldRevalidate:l}:"boolean"==typeof e?{...s,defaultShouldRevalidate:e}:s):c),resolve(e){let{lazy:t,loader:i,middleware:s}=o.route,l=u||c||e&&!ft(n.method)&&(t||i),p=s&&s.length>0&&!i&&!t;return!l||!ft(n.method)&&p?Promise.resolve({type:"data",result:void 0}):async function({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:r,lazyRoutePromise:o,handlerOverride:i,scopedContext:a}){let c,s,l=ft(e.method),u=l?"action":"loader",d=r=>{let o,c=new Promise(((e,t)=>o=t));s=()=>o(),e.signal.addEventListener("abort",s);let l=o=>"function"!=typeof r?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${u}" [routeId: ${n.route.id}]`)):r({request:e,unstable_pattern:t,params:n.params,context:a},...void 0!==o?[o]:[]),d=(async()=>{try{return{type:"data",result:await(i?i((e=>l(e))):l())}}catch(e){return{type:"error",result:e}}})();return Promise.race([d,c])};try{let t=l?n.route.action:n.route.loader;if(r||o)if(t){let e,[n]=await Promise.all([d(t).catch((t=>{e=t})),r,o]);if(void 0!==e)throw e;c=n}else{await r;let t=l?n.route.action:n.route.loader;if(!t){if("action"===u){let t=new URL(e.url),r=t.pathname+t.search;throw et(405,{method:e.method,pathname:r,routeId:n.route.id})}return{type:"data",result:void 0}}[c]=await Promise.all([d(t),o])}else{if(!t){let t=new URL(e.url);throw et(404,{pathname:t.pathname+t.search})}c=await d(t)}}catch(e){return{type:"error",result:e}}finally{s&&e.signal.removeEventListener("abort",s)}return c}({request:n,unstable_pattern:r,match:o,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:e,scopedContext:a})}}}function He(e,t,n,r,o,i,a,c=null){return r.map((s=>s.route.id!==o.route.id?{...s,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Le(e,t,n,s,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Fe(e,t,n,K(r),s,i,a,!0,c)))}async function ze(e,t,n,r,o,i){n.some((e=>e._lazyPromises?.middleware))&&await Promise.all(n.map((e=>e._lazyPromises?.middleware)));let a={request:t,unstable_pattern:K(n),params:n[0].params,context:o,matches:n},c=i?()=>{throw new Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=a;return Ie(t,(()=>e({...t,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}})))},s=await e({...a,fetcherKey:r,runClientMiddleware:c});try{await Promise.all(n.flatMap((e=>[e._lazyPromises?.handler,e._lazyPromises?.route])))}catch(e){}return s}async function Be(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?null==e.body?null:e.json():e.text()}async function Ve(e){let{result:t,type:n}=e;if(ut(t)){let e;try{e=await Be(t)}catch(e){return{type:"error",error:e}}return"error"===n?{type:"error",error:new J(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:"data",data:e,statusCode:t.status,headers:t.headers}}return"error"===n?lt(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:rt(t),statusCode:G(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:G(t)?t.status:void 0}:lt(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Ue(e,t,n,r,o){let i=e.headers.get("Location");if(u(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!F(i)){let a=r.slice(0,r.findIndex((e=>e.route.id===n))+1);i=xe(new URL(t.url),a,o,i),e.headers.set("Location",i)}return e}function We(e,t,n,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(F(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r);if(o.includes(i.protocol))throw new Error("Invalid redirect location");let a=null!=M(i.pathname,n);if(i.origin===t.origin&&a)return i.pathname+i.search+i.hash}try{let t=r.createURL(e);if(o.includes(t.protocol))throw new Error("Invalid redirect location")}catch(e){}return e}function qe(e,t,n,r){let o=e.createURL(nt(t)).toString(),i={signal:n};if(r&&ft(r.formMethod)){let{formMethod:e,formEncType:t}=r;i.method=e.toUpperCase(),"application/json"===t?(i.headers=new Headers({"Content-Type":t}),i.body=JSON.stringify(r.json)):"text/plain"===t?i.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?i.body=Ye(r.formData):i.body=r.formData}return new Request(o,i)}function Ye(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"==typeof r?r:r.name);return t}function $e(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Je(e,t,n,r=!1,o=!1){let i,a={},c=null,s=!1,l={},d=n&&ct(n[1])?n[1].error:void 0;return e.forEach((n=>{if(!(n.route.id in t))return;let p=n.route.id,f=t[p];if(u(!st(f),"Cannot handle redirect results in processLoaderData"),ct(f)){let t=f.error;if(void 0!==d&&(t=d,d=void 0),c=c||{},o)c[p]=t;else{let n=Xe(e,p);null==c[n.route.id]&&(c[n.route.id]=t)}r||(a[p]=be),s||(s=!0,i=G(f.error)?f.error.status:500),f.headers&&(l[p]=f.headers)}else a[p]=f.data,f.statusCode&&200!==f.statusCode&&!s&&(i=f.statusCode),f.headers&&(l[p]=f.headers)})),void 0!==d&&n&&(c={[n[0]]:d},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:c,statusCode:i||200,loaderHeaders:l}}function Ge(e,t,n,r,o,i){let{loaderData:a,errors:c}=Je(t,n,r);return o.filter((e=>!e.matches||e.matches.some((e=>e.shouldLoad)))).forEach((t=>{let{key:n,match:r,controller:o}=t;if(o&&o.signal.aborted)return;let a=i[n];if(u(a,"Did not find corresponding fetcher result"),ct(a)){let t=Xe(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:a.error}),e.fetchers.delete(n)}else if(st(a))u(!1,"Unhandled fetcher revalidation redirect");else{let t=bt(a.data);e.fetchers.set(n,t)}})),{loaderData:a,errors:c}}function Ke(e,t,n,r){let o=Object.entries(t).filter((([,e])=>e!==be)).reduce(((e,[t,n])=>(e[t]=n,e)),{});for(let i of n){let n=i.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&i.route.loader&&(o[n]=e[n]),r&&r.hasOwnProperty(n))break}return o}function Qe(e){return e?ct(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Xe(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function Ze(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function et(e,{pathname:t,routeId:n,method:r,type:o,message:i}={}){let a="Unknown Server Error",c="Unknown @remix-run/router error";return 400===e?(a="Bad Request",r&&t&&n?c=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:"invalid-body"===o&&(c="Unable to encode submission body")):403===e?(a="Forbidden",c=`Route "${n}" does not match URL "${t}"`):404===e?(a="Not Found",c=`No route matches URL "${t}"`):405===e&&(a="Method Not Allowed",r&&t&&n?c=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(c=`Invalid request method "${r.toUpperCase()}"`)),new J(e||500,a,new Error(c),!0)}function tt(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(st(r))return{key:n,result:r}}}function nt(e){return m({..."string"==typeof e?h(e):e,hash:""})}function rt(e){return new J(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function ot(e){return null!=e&&"object"==typeof e&&Object.entries(e).every((([e,t])=>"string"==typeof e&&it(t)))}function it(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&("data"===e.type||"error"===e.type)}function at(e){return ut(e.result)&&pe.has(e.result.status)}function ct(e){return"error"===e.type}function st(e){return"redirect"===(e&&e.type)}function lt(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function ut(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function dt(e){return ut(e)&&(t=e.status,pe.has(t))&&e.headers.has("Location");var t}function pt(e){return de.has(e.toUpperCase())}function ft(e){return le.has(e.toUpperCase())}function mt(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function ht(e,t){let n="string"==typeof t?h(t).search:t.search;if(e[e.length-1].route.index&&mt(n||""))return e[e.length-1];let r=B(e);return r[r.length-1]}function gt(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(t&&n&&r)return null!=o?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o}:null!=i?{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0}:void 0!==a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}:void 0}function yt(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function vt(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function bt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function wt(){let e,t,n=new Promise(((r,o)=>{e=async e=>{r(e);try{await n}catch(e){}},t=async e=>{o(e);try{await n}catch(e){}}}));return{promise:n,resolve:e,reject:t}}var xt=i.createContext(null);xt.displayName="DataRouter";var Ot=i.createContext(null);Ot.displayName="DataRouterState";var kt=i.createContext(!1);function St(){return i.useContext(kt)}var At=i.createContext({isTransitioning:!1});At.displayName="ViewTransition";var jt=i.createContext(new Map);jt.displayName="Fetchers";var Et=i.createContext(null);Et.displayName="Await";var Pt=i.createContext(null);Pt.displayName="Navigation";var Tt=i.createContext(null);Tt.displayName="Location";var Dt=i.createContext({outlet:null,matches:[],isDataRoute:!1});Dt.displayName="Route";var _t=i.createContext(null);_t.displayName="RouteError";var Ct="REACT_ROUTER_ERROR";function Nt(){return null!=i.useContext(Tt)}function It(){return u(Nt(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(Tt).location}var Rt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Mt(e){i.useContext(Pt).static||i.useLayoutEffect(e)}function Lt(){let{isDataRoute:e}=i.useContext(Dt);return e?function(){let{router:e}=Gt("useNavigate"),t=Qt("useNavigate"),n=i.useRef(!1);return Mt((()=>{n.current=!0})),i.useCallback((async(r,o={})=>{d(n.current,Rt),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))}),[e,t])}():function(){u(Nt(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(xt),{basename:t,navigator:n}=i.useContext(Pt),{matches:r}=i.useContext(Dt),{pathname:o}=It(),a=JSON.stringify(V(r)),c=i.useRef(!1);return Mt((()=>{c.current=!0})),i.useCallback(((r,i={})=>{if(d(c.current,Rt),!c.current)return;if("number"==typeof r)return void n.go(r);let s=U(r,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:W([t,s.pathname])),(i.replace?n.replace:n.push)(s,i.state,i)}),[t,n,a,o,e])}()}i.createContext(null);function Ft(){let{matches:e}=i.useContext(Dt),t=e[e.length-1];return t?t.params:{}}function Ht(e,{relative:t}={}){let{matches:n}=i.useContext(Dt),{pathname:r}=It(),o=JSON.stringify(V(n));return i.useMemo((()=>U(e,JSON.parse(o),r,"path"===t)),[e,o,r,t])}function zt(e,t,n,r,o){u(Nt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=i.useContext(Pt),{matches:c}=i.useContext(Dt),s=c[c.length-1],l=s?s.params:{},p=s?s.pathname:"/",f=s?s.pathnameBase:"/",m=s&&s.route;{let e=m&&m.path||"";nn(p,!m||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let g,y=It();if(t){let e="string"==typeof t?h(t):t;u("/"===f||e.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${e.pathname}" was given in the \`location\` prop.`),g=e}else g=y;let v=g.pathname||"/",b=v;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(e.length).join("/")}let w=S(e,{pathname:b});d(m||null!=w,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),d(null==w||void 0!==w[w.length-1].route.element||void 0!==w[w.length-1].route.Component||void 0!==w[w.length-1].route.lazy,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=$t(w&&w.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:W([f,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:W([f,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])}))),c,n,r,o);return t&&x?i.createElement(Tt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},x):x}function Bt(){let e=Xt(),t=G(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:a},"ErrorBoundary")," or"," ",i.createElement("code",{style:a},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:o},n):null,c)}var Vt=i.createElement(Bt,null),Ut=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${Ct}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new J(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?i.createElement(Dt.Provider,{value:this.props.routeContext},i.createElement(_t.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(qt,{error:e},t):t}};Ut.contextType=kt;var Wt=new WeakMap;function qt({children:e,error:t}){let{basename:n}=i.useContext(Pt);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${Ct}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=Wt.get(t);if(r)throw r;let o=X(e.location,n);if(Q&&!Wt.get(t)){if(!o.isExternal&&!e.reloadDocument){const n=Promise.resolve().then((()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace})));throw Wt.set(t,n),n}window.location.href=o.absoluteURL||o.to}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Yt({routeContext:e,match:t,children:n}){let r=i.useContext(xt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(Dt.Provider,{value:e},n)}function $t(e,t=[],n=null,r=null,o=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let a=e,c=n?.errors;if(null!=c){let e=a.findIndex((e=>e.route.id&&void 0!==c?.[e.route.id]));u(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,l=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||void 0===r[t.route.id]);if(t.route.lazy||o){s=!0,a=l>=0?a.slice(0,l+1):[a[0]];break}}}let d=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:K(n.matches),errorInfo:t})}:void 0;return a.reduceRight(((e,r,o)=>{let u,p=!1,f=null,m=null;n&&(u=c&&r.route.id?c[r.route.id]:void 0,f=r.route.errorElement||Vt,s&&(l<0&&0===o?(nn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):l===o&&(p=!0,m=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,o+1)),g=()=>{let t;return t=u?f:p?m:r.route.Component?i.createElement(r.route.Component,null):r.route.element?r.route.element:e,i.createElement(Yt,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?i.createElement(Ut,{location:n.location,revalidation:n.revalidation,component:f,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:d}):g()}),null)}function Jt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gt(e){let t=i.useContext(xt);return u(t,Jt(e)),t}function Kt(e){let t=i.useContext(Ot);return u(t,Jt(e)),t}function Qt(e){let t=function(e){let t=i.useContext(Dt);return u(t,Jt(e)),t}(e),n=t.matches[t.matches.length-1];return u(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Xt(){let e=i.useContext(_t),t=Kt("useRouteError"),n=Qt("useRouteError");return void 0!==e?e:t.errors?.[n]}var Zt=0;function en(e){let{router:t,basename:n}=Gt("useBlocker"),r=Kt("useBlocker"),[o,a]=i.useState(""),c=i.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===n)return e(t);let{currentLocation:r,nextLocation:o,historyAction:i}=t;return e({currentLocation:{...r,pathname:M(r.pathname,n)||r.pathname},nextLocation:{...o,pathname:M(o.pathname,n)||o.pathname},historyAction:i})}),[n,e]);return i.useEffect((()=>{let e=String(++Zt);return a(e),()=>t.deleteBlocker(e)}),[t]),i.useEffect((()=>{""!==o&&t.getBlocker(o,c)}),[t,o,c]),o&&r.blockers.has(o)?r.blockers.get(o):ge}var tn={};function nn(e,t,n){t||tn[e]||(tn[e]=!0,d(!1,n))}var rn={};function on(e,t){e||rn[t]||(rn[t]=!0,console.warn(t))}var an=(r||(r=n.t(i,2))).useOptimistic,cn=()=>{};function sn(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(e.element&&d(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:i.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&d(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:i.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&d(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:i.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var ln=["HydrateFallback","hydrateFallbackElement"];var un=class{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}};function dn({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){let o=St();r=o||r;let[a,c]=i.useState(e.state),[s,l]=(u=a,an?an(u):[u,cn]);var u;let[d,p]=i.useState(),[f,m]=i.useState({isTransitioning:!1}),[h,g]=i.useState(),[y,v]=i.useState(),[b,w]=i.useState(),x=i.useRef(new Map),O=i.useCallback(((o,{deletedFetchers:a,newErrors:s,flushSync:u,viewTransitionOpts:d})=>{s&&n&&Object.values(s).forEach((e=>n(e,{location:o.location,params:o.matches[0]?.params??{},unstable_pattern:K(o.matches)}))),o.fetchers.forEach(((e,t)=>{void 0!==e.data&&x.current.set(t,e.data)})),a.forEach((e=>x.current.delete(e))),on(!1===u||null!=t,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let f=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(on(null==d||f,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),d&&f){if(t&&u){t((()=>{y&&(h?.resolve(),y.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:d.currentLocation,nextLocation:d.nextLocation})}));let n=e.window.document.startViewTransition((()=>{t((()=>c(o)))}));return n.finished.finally((()=>{t((()=>{g(void 0),v(void 0),p(void 0),m({isTransitioning:!1})}))})),void t((()=>v(n)))}y?(h?.resolve(),y.skipTransition(),w({state:o,currentLocation:d.currentLocation,nextLocation:d.nextLocation})):(p(o),m({isTransitioning:!0,flushSync:!1,currentLocation:d.currentLocation,nextLocation:d.nextLocation}))}else t&&u?t((()=>c(o))):!1===r?c(o):i.startTransition((()=>{!0===r&&l((e=>pn(e,o))),c(o)}))}),[e.window,t,y,h,r,l,n]);i.useLayoutEffect((()=>e.subscribe(O)),[e,O]),i.useEffect((()=>{f.isTransitioning&&!f.flushSync&&g(new un)}),[f]),i.useEffect((()=>{if(h&&d&&e.window){let t=d,n=h.promise,o=e.window.document.startViewTransition((async()=>{!1===r?c(t):i.startTransition((()=>{!0===r&&l((e=>pn(e,t))),c(t)})),await n}));o.finished.finally((()=>{g(void 0),v(void 0),p(void 0),m({isTransitioning:!1})})),v(o)}}),[d,h,e.window,r,l]),i.useEffect((()=>{h&&d&&s.location.key===d.location.key&&h.resolve()}),[h,y,s.location,d]),i.useEffect((()=>{!f.isTransitioning&&b&&(p(b.state),m({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),w(void 0))}),[f.isTransitioning,b]);let k=i.useMemo((()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})})),[e]),S=e.basename||"/",A=i.useMemo((()=>({router:e,navigator:k,static:!1,basename:S,onError:n})),[e,k,S,n]);return i.createElement(i.Fragment,null,i.createElement(xt.Provider,{value:A},i.createElement(Ot.Provider,{value:s},i.createElement(jt.Provider,{value:x.current},i.createElement(At.Provider,{value:f},i.createElement(gn,{basename:S,location:s.location,navigationType:s.historyAction,navigator:k,unstable_useTransitions:r},i.createElement(fn,{routes:e.routes,future:e.future,state:s,onError:n})))))),null)}function pn(e,t){return{...e,navigation:"idle"!==t.navigation.state?t.navigation:e.navigation,revalidation:"idle"!==t.revalidation?t.revalidation:e.revalidation,actionData:"submitting"!==t.navigation.state?t.actionData:e.actionData,fetchers:t.fetchers}}var fn=i.memo((function({routes:e,future:t,state:n,onError:r}){return zt(e,void 0,n,r,t)}));function mn({to:e,replace:t,state:n,relative:r}){u(Nt(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=i.useContext(Pt);d(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=i.useContext(Dt),{pathname:c}=It(),s=Lt(),l=U(e,V(a),c,"path"===r),p=JSON.stringify(l);return i.useEffect((()=>{s(JSON.parse(p),{replace:t,state:n,relative:r})}),[s,p,r,t,n]),null}function hn(e){u(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function gn({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,unstable_useTransitions:c}){u(!Nt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=i.useMemo((()=>({basename:s,navigator:o,static:a,unstable_useTransitions:c,future:{}})),[s,o,a,c]);"string"==typeof n&&(n=h(n));let{pathname:p="/",search:f="",hash:m="",state:g=null,key:y="default"}=n,v=i.useMemo((()=>{let e=M(p,s);return null==e?null:{location:{pathname:e,search:f,hash:m,state:g,key:y},navigationType:r}}),[s,p,f,m,g,y,r]);return d(null!=v,`<Router basename="${s}"> is not able to match the URL "${p}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),null==v?null:i.createElement(Pt.Provider,{value:l},i.createElement(Tt.Provider,{children:t,value:v}))}function yn({children:e,location:t}){return zt(vn(e),t)}i.Component;function vn(e,t=[]){let n=[];return i.Children.forEach(e,((e,r)=>{if(!i.isValidElement(e))return;let o=[...t,r];if(e.type===i.Fragment)return void n.push.apply(n,vn(e.props.children,o));u(e.type===hn,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),u(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=vn(e.props.children,o)),n.push(a)})),n}var bn="get",wn="application/x-www-form-urlencoded";function xn(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var On=null;var kn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Sn(e){return null==e||kn.has(e)?e:(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wn}"`),null)}function An(e,t){let n,r,o,i,a;if(xn(c=e)&&"form"===c.tagName.toLowerCase()){let a=e.getAttribute("action");r=a?M(a,t):null,n=e.getAttribute("method")||bn,o=Sn(e.getAttribute("enctype"))||wn,i=new FormData(e)}else if(function(e){return xn(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return xn(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||a.getAttribute("action");if(r=c?M(c,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||bn,o=Sn(e.getAttribute("formenctype"))||Sn(a.getAttribute("enctype"))||wn,i=new FormData(a,e),!function(){if(null===On)try{new FormData(document.createElement("form"),0),On=!1}catch(e){On=!0}return On}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,r)}}else{if(xn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=bn,r=null,o=wn,a=e}var c;return i&&"text/plain"===o&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis;function jn(e,t){if(!1===e||null==e)throw new Error(t)}Symbol("SingleFetchRedirect");function En(e,t,n,r){let o="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:"/"===o.pathname?o.pathname=`_root.${r}`:t&&"/"===M(o.pathname,t)?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function Pn(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}function Tn(e){return null!=e&&"string"==typeof e.page}function Dn(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function _n(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,c=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===i?t.filter(((e,t)=>a(e,t)||c(e,t))):"data"===i?t.filter(((t,i)=>{let s=r.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(a(t,i)||c(t,i))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0})):[]}function Cn(e,t,{includeHydrateFallback:n}={}){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o})).flat(1),[...new Set(r)];var r}function Nn(e,t){let n=new Set,r=new Set(t);return e.reduce(((e,o)=>{if(t&&!Tn(o)&&"script"===o.as&&o.href&&r.has(o.href))return e;let i=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(o));return n.has(i)||(n.add(i),e.push({key:i,link:o})),e}),[])}function In(e,t){return"lazy"===e.mode&&!0===t}function Rn(){let e=i.useContext(xt);return jn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Mn(){let e=i.useContext(Ot);return jn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ln=i.createContext(void 0);function Fn(){let e=i.useContext(Ln);return jn(e,"You must render this element inside a <HydratedRouter> element"),e}function Hn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function zn(e,t,n){if(n&&!Wn)return[e[0]];if(t){let n=e.findIndex((e=>void 0!==t[e.route.id]));return e.slice(0,n+1)}return e}Ln.displayName="FrameworkContext";function Bn({page:e,...t}){let{router:n}=Rn(),r=i.useMemo((()=>S(n.routes,e,n.basename)),[n.routes,e,n.basename]);return r?i.createElement(Un,{page:e,matches:r,...t}):null}function Vn(e){let{manifest:t,routeModules:n}=Fn(),[r,o]=i.useState([]);return i.useEffect((()=>{let r=!1;return async function(e,t,n){return Nn((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await Pn(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(Dn).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}(e,t,n).then((e=>{r||o(e)})),()=>{r=!0}}),[e,t,n]),r}function Un({page:e,matches:t,...n}){let r=It(),{future:o,manifest:a,routeModules:c}=Fn(),{basename:s}=Rn(),{loaderData:l,matches:u}=Mn(),d=i.useMemo((()=>_n(e,t,u,a,r,"data")),[e,t,u,a,r]),p=i.useMemo((()=>_n(e,t,u,a,r,"assets")),[e,t,u,a,r]),f=i.useMemo((()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,i=!1;if(t.forEach((e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!d.some((t=>t.route.id===e.route.id))&&e.route.id in l&&c[e.route.id]?.shouldRevalidate||t.hasClientLoader?i=!0:n.add(e.route.id))})),0===n.size)return[];let u=En(e,s,o.unstable_trailingSlashAwareDataRequests,"data");return i&&n.size>0&&u.searchParams.set("_routes",t.filter((e=>n.has(e.route.id))).map((e=>e.route.id)).join(",")),[u.pathname+u.search]}),[s,o.unstable_trailingSlashAwareDataRequests,l,r,a,d,t,e,c]),m=i.useMemo((()=>Cn(p,a)),[p,a]),h=Vn(p);return i.createElement(i.Fragment,null,f.map((e=>i.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n}))),m.map((e=>i.createElement("link",{key:e,rel:"modulepreload",href:e,...n}))),h.map((({key:e,link:t})=>i.createElement("link",{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin}))))}var Wn=!1;function qn(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:o,routeDiscovery:a,ssr:c}=Fn(),{router:s,static:l,staticContext:u}=Rn(),{matches:d}=Mn(),p=St(),f=In(a,c);o&&(o.didRenderScripts=!0);let m=zn(d,null,r);i.useEffect((()=>{0}),[]);let h=i.useMemo((()=>{if(p)return null;let r=u?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",o=l?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${f?"":`import ${JSON.stringify(t.url)}`};\n${m.map(((e,n)=>{let r=`route${n}`,o=t.routes[e.route.id];jn(o,`Route ${e.route.id} not found in manifest`);let{clientActionModule:i,clientLoaderModule:a,clientMiddlewareModule:c,hydrateFallbackModule:s,module:l}=o,u=[...i?[{module:i,varName:`${r}_clientAction`}]:[],...a?[{module:a,varName:`${r}_clientLoader`}]:[],...c?[{module:c,varName:`${r}_clientMiddleware`}]:[],...s?[{module:s,varName:`${r}_HydrateFallback`}]:[],{module:l,varName:`${r}_main`}];return 1===u.length?`import * as ${r} from ${JSON.stringify(l)};`:[u.map((e=>`import * as ${e.varName} from "${e.module}";`)).join("\n"),`const ${r} = {${u.map((e=>`...${e.varName}`)).join(",")}};`].join("\n")})).join("\n")}\n ${f?`window.__reactRouterManifest = ${JSON.stringify(function({sri:e,...t},n){let r=new Set(n.state.matches.map((e=>e.route.id))),o=n.state.location.pathname.split("/").filter(Boolean),i=["/"];for(o.pop();o.length>0;)i.push(`/${o.join("/")}`),o.pop();i.forEach((e=>{let t=S(n.routes,e,n.basename);t&&t.forEach((e=>r.add(e.route.id)))}));let a=[...r].reduce(((e,n)=>Object.assign(e,{[n]:t.routes[n]})),{});return{...t,routes:a,sri:!!e||void 0}}(t,s),null,2)};`:""}\n window.__reactRouterRouteModules = {${m.map(((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`)).join(",")}};\n\nimport(${JSON.stringify(t.entry.module)});`:" ";return i.createElement(i.Fragment,null,i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:void 0}),i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:o},type:"module",async:!0}))}),[]),g=Wn||p?[]:(t.entry.imports.concat(Cn(m,t,{includeHydrateFallback:!0})),[...new Set(y)]);var y;let v="object"==typeof t.sri?t.sri:{};return on(!p,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),Wn||p?null:i.createElement(i.Fragment,null,"object"==typeof t.sri?i.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:v})}}):null,f?null:i.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:v[t.url],suppressHydrationWarning:!0}),i.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:v[t.entry.module],suppressHydrationWarning:!0}),g.map((t=>i.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:v[t],suppressHydrationWarning:!0}))),h)}function Yn(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}i.Component;function $n({error:e,isOutsideRemixApp:t}){console.error(e);let n,r=i.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."\n );\n '}});if(G(e))return i.createElement(Jn,{title:"Unhandled Thrown Response!"},i.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);if(e instanceof Error)0;else{let t=null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e);new Error(t)}return i.createElement(Jn,{title:"Application Error!",isOutsideRemixApp:t},i.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),i.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),r)}function Jn({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:o}=Fn();return o.root?.Layout&&!n?r:i.createElement("html",{lang:"en"},i.createElement("head",null,i.createElement("meta",{charSet:"utf-8"}),i.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),i.createElement("title",null,e)),i.createElement("body",null,i.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},r,t?i.createElement(qn,null):null)))}var Gn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Gn&&(window.__reactRouterVersion="7.13.0")}catch(e){}function Kn(e,t){return we({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:l({window:t?.window}),hydrationData:t?.hydrationData||Qn(),routes:e,mapRouteProperties:sn,hydrationRouteProperties:ln,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function Qn(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Xn(e.errors)}),e}function Xn(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&"RouteErrorResponse"===r.__type)n[e]=new J(r.status,r.statusText,r.data,!0===r.internal);else if(r&&"Error"===r.__type){if(r.__subType){let t=window[r.__subType];if("function"==typeof t)try{let o=new t(r.message);o.stack="",n[e]=o}catch(e){}}if(null==n[e]){let t=new Error(r.message);t.stack="",n[e]=t}}else n[e]=r;return n}var Zn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,er=i.forwardRef((function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:o,replace:a,state:c,target:s,to:l,preventScrollReset:d,viewTransition:p,unstable_defaultShouldRevalidate:f,...h},g){let{basename:y,unstable_useTransitions:v}=i.useContext(Pt),b="string"==typeof l&&Zn.test(l),w=X(l,y),x=function(e,{relative:t}={}){u(Nt(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=i.useContext(Pt),{hash:o,pathname:a,search:c}=Ht(e,{relative:t}),s=a;return"/"!==n&&(s="/"===a?n:W([n,a])),r.createHref({pathname:s,search:c,hash:o})}(l=w.to,{relative:r}),[O,k,S]=function(e,t){let n=i.useContext(Ln),[r,o]=i.useState(!1),[a,c]=i.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:p}=t,f=i.useRef(null);i.useEffect((()=>{if("render"===e&&c(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{c(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[e]),i.useEffect((()=>{if(r){let e=setTimeout((()=>{c(!0)}),100);return()=>{clearTimeout(e)}}}),[r]);let m=()=>{o(!0)},h=()=>{o(!1),c(!1)};return n?"intent"!==e?[a,f,{}]:[a,f,{onFocus:Hn(s,m),onBlur:Hn(l,h),onMouseEnter:Hn(u,m),onMouseLeave:Hn(d,h),onTouchStart:Hn(p,m)}]:[!1,f,{}]}(n,h),A=function(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:c,unstable_defaultShouldRevalidate:s,unstable_useTransitions:l}={}){let u=Lt(),d=It(),p=Ht(e,{relative:a});return i.useCallback((f=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(f,t)){f.preventDefault();let t=void 0!==n?n:m(d)===m(p),h=()=>u(e,{replace:t,state:r,preventScrollReset:o,relative:a,viewTransition:c,unstable_defaultShouldRevalidate:s});l?i.startTransition((()=>h())):h()}}),[d,u,p,n,r,t,e,o,a,c,s,l])}(l,{replace:a,state:c,target:s,preventScrollReset:d,relative:r,viewTransition:p,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});let j=i.createElement("a",{...h,...S,href:w.absoluteURL||x,onClick:w.isExternal||o?e:function(t){e&&e(t),t.defaultPrevented||A(t)},ref:Yn(g,k),target:s,"data-discover":b||"render"!==t?void 0:"true"});return O&&!b?i.createElement(i.Fragment,null,j,i.createElement(Bn,{page:x})):j}));er.displayName="Link",i.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:o,to:a,viewTransition:c,children:s,...l},d){let p=Ht(a,{relative:l.relative}),f=It(),m=i.useContext(Ot),{navigator:h,basename:g}=i.useContext(Pt),y=null!=m&&function(e,{relative:t}={}){let n=i.useContext(At);u(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=rr("useViewTransitionState"),o=Ht(e,{relative:t});if(!n.isTransitioning)return!1;let a=M(n.currentLocation.pathname,r)||n.currentLocation.pathname,c=M(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=N(o.pathname,c)||null!=N(o.pathname,a)}(p)&&!0===c,v=h.encodeLocation?h.encodeLocation(p).pathname:p.pathname,b=f.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;t||(b=b.toLowerCase(),w=w?w.toLowerCase():null,v=v.toLowerCase()),w&&g&&(w=M(w,g)||w);const x="/"!==v&&v.endsWith("/")?v.length-1:v.length;let O,k=b===v||!r&&b.startsWith(v)&&"/"===b.charAt(x),S=null!=w&&(w===v||!r&&w.startsWith(v)&&"/"===w.charAt(v.length)),A={isActive:k,isPending:S,isTransitioning:y},j=k?e:void 0;O="function"==typeof n?n(A):[n,k?"active":null,S?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof o?o(A):o;return i.createElement(er,{...l,"aria-current":j,className:O,ref:d,style:E,to:a,viewTransition:c},"function"==typeof s?s(A):s)})).displayName="NavLink";var tr=i.forwardRef((({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:c=bn,action:s,onSubmit:l,relative:d,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:h,...g},y)=>{let{unstable_useTransitions:v}=i.useContext(Pt),b=ir(),w=function(e,{relative:t}={}){let{basename:n}=i.useContext(Pt),r=i.useContext(Dt);u(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...Ht(e||".",{relative:t})},c=It();if(null==e){a.search=c.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();a.search=n?`?${n}`:""}}e&&"."!==e||!o.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(a.pathname="/"===a.pathname?n:W([n,a.pathname]));return m(a)}(s,{relative:d}),x="get"===c.toLowerCase()?"get":"post",O="string"==typeof s&&Zn.test(s);return i.createElement("form",{ref:y,method:x,action:w,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute("formmethod")||c,u=()=>b(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:o,state:a,relative:d,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:h});v&&!1!==n?i.startTransition((()=>u())):u()},...g,"data-discover":O||"render"!==e?void 0:"true"})}));function nr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rr(e){let t=i.useContext(xt);return u(t,nr(e)),t}tr.displayName="Form";var or=0;function ir(){let{router:e}=rr("useSubmit"),{basename:t}=i.useContext(Pt),n=Qt("useRouteId"),r=e.fetch,o=e.navigate;return i.useCallback((async(e,i={})=>{let{action:a,method:c,encType:s,formData:l,body:u}=An(e,t);if(!1===i.navigate){let e=i.fetcherKey||`__${String(++or)}__`;await r(e,n,i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||c,formEncType:i.encType||s,flushSync:i.flushSync})}else await o(i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||c,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[r,o,t,n])}},77987(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:()=>r})},88097(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{A:()=>r})},65166(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},47029(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(88097);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},35412(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{A:()=>r})},2482(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(25134);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(e,t)||(0,r.A)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},65710(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},25134(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(77987);function o(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},14644(e,t,n){"use strict";function r(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}n.d(t,{HY:()=>l,Qd:()=>c,Tw:()=>f,Zz:()=>p,ve:()=>m,y$:()=>s,zH:()=>d});var o=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),i=()=>Math.random().toString(36).substring(7).split("").join("."),a={INIT:`@@redux/INIT${i()}`,REPLACE:`@@redux/REPLACE${i()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${i()}`};function c(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function s(e,t,n){if("function"!=typeof e)throw new Error(r(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(r(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(r(1));return n(s)(e,t)}let i=e,l=t,u=new Map,d=u,p=0,f=!1;function m(){d===u&&(d=new Map,u.forEach(((e,t)=>{d.set(t,e)})))}function h(){if(f)throw new Error(r(3));return l}function g(e){if("function"!=typeof e)throw new Error(r(4));if(f)throw new Error(r(5));let t=!0;m();const n=p++;return d.set(n,e),function(){if(t){if(f)throw new Error(r(6));t=!1,m(),d.delete(n),u=null}}}function y(e){if(!c(e))throw new Error(r(7));if(void 0===e.type)throw new Error(r(8));if("string"!=typeof e.type)throw new Error(r(17));if(f)throw new Error(r(9));try{f=!0,l=i(l,e)}finally{f=!1}return(u=d).forEach((e=>{e()})),e}y({type:a.INIT});return{dispatch:y,subscribe:g,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw new Error(r(10));i=e,y({type:a.REPLACE})},[o]:function(){const e=g;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(r(11));function n(){const e=t;e.next&&e.next(h())}n();return{unsubscribe:e(n)}},[o](){return this}}}}}function l(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];0,"function"==typeof e[o]&&(n[o]=e[o])}const o=Object.keys(n);let i;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:a.INIT}))throw new Error(r(12));if(void 0===n(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error(r(13))}))}(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1;const c={};for(let i=0;i<o.length;i++){const s=o[i],l=n[s],u=e[s],d=l(u,t);if(void 0===d){t&&t.type;throw new Error(r(14))}c[s]=d,a=a||d!==u}return a=a||o.length!==Object.keys(e).length,a?c:e}}function u(e,t){return function(...n){return t(e.apply(this,n))}}function d(e,t){if("function"==typeof e)return u(e,t);if("object"!=typeof e||null===e)throw new Error(r(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=u(o,t))}return n}function p(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function f(...e){return t=>(n,o)=>{const i=t(n,o);let a=()=>{throw new Error(r(15))};const c={getState:i.getState,dispatch:(e,...t)=>a(e,...t)},s=e.map((e=>e(c)));return a=p(...s)(i.dispatch),{...i,dispatch:a}}}function m(e){return c(e)&&"type"in e&&"string"==typeof e.type}}},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=a,s.amdD=function(){throw new Error("define cannot be used indirect")},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var o=Object.create(null);s.r(o);var i={};n=n||[null,r({}),r([]),r(r)];for(var a=2&t&&e;("object"==typeof a||"function"==typeof a)&&!~n.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,s.d(o,i),o},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>"chunk-"+({1262:"html-editor",1556:"docs-actions",3722:"code-editor",4310:"vendor-fontawesome",4672:"phone-formatter",6916:"vendor-icons",9222:"vendor-libphonenumber-js"}[e]||e)+"."+{8:"dc74b5023d8e5afd73dd",9:"cda2d5683182f50fed87",12:"c7e1a557a2c60b309831",47:"04d2452de4f7ad54f818",117:"608566115bf09889f71f",132:"61735580ea487aa78c8e",152:"27cb0ecfff5ecbb6bb1c",174:"2680fe0b76731806a396",240:"8c49b2d3346a66e8e8d7",262:"6a24e83a83e039b6941f",270:"3e66c444891a168e1106",311:"a450d6ae559e3e50c064",316:"aaea3fb02ddd615e8d6a",335:"ae3402eab9ec7842f677",360:"8903dc5758bbc1b87345",395:"9adf5cd0dbc9d5840620",426:"21bea2aee5a564649d5f",454:"888167003cc5e66783b9",470:"4e4ca02865202e120c58",471:"40f831ce2a402a86f873",472:"9159bf8fc7bf2f8c84d5",486:"2ccae6818e60876d0595",499:"f99c19b661362b0da80b",526:"cc8f4ad53f85f0d3eb72",566:"da7fcb4f14beec0e0351",569:"3ef1f6b7249c3cf286e0",592:"0c3a90b811cdba608d54",616:"46eae72f3f086727e5eb",638:"a1c14d203472a483c09f",655:"d548f47decb1b11d086c",659:"6d5e7e456ea7ff0b5ae2",662:"8454b52823a6f29d8ccd",667:"ffc8fa2cd8610a853e68",721:"e16ced8978fae5c79d66",724:"c3aafeb066d426cd86fc",731:"e0b9b38e50b9b043b7b3",766:"962952b53a24a6cff1fc",824:"c026d955719056cf6425",830:"d5d147ac7938e497a233",846:"bbd1c90205781d078485",850:"7870d63b390aa0fdbe84",871:"47133d250320ec7c2ff6",897:"7acf3ba0d7738e388546",902:"7b0259b56a319db30a08",910:"f14e43746928481ecdd2",975:"232d623885579cd2357a",996:"26215b868008edcb125c",997:"2bf5908a9598f3ee4279",1001:"9e32bb4b864ac72f6533",1004:"d913f123eea03657c830",1056:"b23ca4f8e74af8cdd06f",1057:"cb5a61370696c63c5148",1060:"99dacd2abbdca3bb38e9",1075:"64b74d9ce5ae01a53d40",1079:"4135c95f363a733ab330",1131:"b839529c15e86b29641b",1137:"00110f65b78609797b8a",1150:"d2133ac254c62d88985f",1170:"950fec13eea52781bee2",1183:"17e980038349a83c1cf7",1199:"7f68e9cf83e71e7edf76",1201:"764337c3c638a9f80a12",1207:"d5314e9783a34137ef5b",1211:"3cc37729ace241f1d01f",1216:"fbfa8277018c2b87afde",1221:"ed68686d7d23ce0ee517",1234:"5fb3da1be5b63909f4e8",1239:"60ec850fc2dd997ccd3c",1255:"83d22c57f41db0d920e7",1262:"cb2bf3c96145c7694ee3",1281:"8daa1a51f7875c351ea7",1287:"d28433cc06794e5f6547",1289:"7faa9225b52760ef0c58",1293:"75be7364f425a604c2b1",1305:"671c4ed971a16fd787fa",1316:"6a7bff798e63e88300be",1323:"891953b55c7eefe434b6",1325:"bbde5b0f9bd1130cefbd",1328:"488128bb7c5f6f2cbaa7",1344:"5e7390dd0500eba8cfbe",1361:"43f402c8da36f082786e",1450:"31997e89439640d217e2",1496:"15fb74628cee24c6cb22",1507:"f756a5f77291e50ed8ad",1532:"6aa3c51bf9de1ddbb9e8",1534:"06e71eeef49d378ddc23",1556:"91ec34180f69de7b0132",1570:"3b6001894270bbea6372",1594:"9d6bdef5a6b7f0ac2369",1600:"b66bccc4f42feda96ece",1655:"0cf131f6f133c8afd4da",1657:"3497423475623d6c6c41",1678:"eeed150ed7cd5c5b75c6",1702:"421d51a0404622304424",1723:"ecefa86d5079c4c8a530",1742:"40d5244a6568f41afea6",1766:"067f455a3e5bf29333ee",1777:"1bdb9c519105a917ada6",1788:"6f4abd1eb13463d60246",1835:"b52521eae7c389c18188",1841:"0b2620d223584b223007",1842:"e831633c7a32adfb745c",1843:"dee8cc7a9ad97daa4fa7",1852:"1e79ea4ad1a799723d41",1858:"fb86f75c135f6042db7b",1901:"10c24f691fbaed85b171",1951:"448c0853f11c3257457f",1958:"b2c69a836232f6833287",2012:"19759f4c3a4eb1a9e3a4",2030:"8b5030655f1556e9929c",2045:"d01a79d54981cdeeb195",2049:"8c991a460980d8e246a8",2067:"2cd2d54d51b4e522c285",2070:"0c4cf343db099f02af2e",2115:"eb1f6144eca85ba591ed",2174:"26c0271e62f93113eb28",2206:"9ddb2d21ca5ab47e2ca7",2246:"bad4bcec8effdb12ae69",2283:"89212ee60cb3e0098422",2308:"d54be3ced75aabbf3ab2",2327:"1db90c3420248799975f",2361:"33c8672a64a00889aa1e",2376:"a052a0b3e5cd2b484d60",2422:"35a931d03650496bbbce",2429:"64f95d5f086468141db4",2451:"6bcc39d15da6e3c73b95",2456:"b999643c556d401b5dd4",2459:"c253c8904f3122880103",2482:"a0b27df60f20cb223be4",2496:"46dea332df0db94bde14",2499:"848fb5fde07b1c57b3a2",2521:"9663e317772f28422b36",2540:"d70d987ff27b3a02ee92",2544:"e403e94e4c24c908c7ce",2555:"4f0f7c237d71ee2010dd",2575:"95bd2c96f5599ccb59fe",2584:"d0191010eedb83957285",2586:"6659132182d0d2087ecd",2602:"d86abbf0f83d3dafed65",2628:"6753f1b90ffd581d779d",2632:"1718896aa855ce5f3318",2657:"c79eae34d456bc621fd7",2682:"fcca3eec16a2c1557bcb",2725:"2151014ecf7699d8b2c1",2797:"dbfa1bf0564c5a7097a1",2823:"cf59e7e82b3fafbccea8",2887:"47b37be7a2e1b61912a6",2954:"70bfe8bf938607c79182",2969:"e787aaf50e417e1fed1d",2981:"cdb3f215bbaaf7af023d",3031:"59185bda2b2c394b288b",3081:"f5211bf83b8eb8506cd1",3082:"150c90a99b322a5e329e",3093:"c250bec93881e9e8d579",3097:"c3db504f1b2dbaf36657",3102:"35e0af0b3bec04075079",3103:"32929f61274bb24480ed",3112:"bd8946bb6c7f8a21d1b3",3120:"0218686ce90bbbe79323",3124:"25b1aaa4f2bb35772121",3135:"7f98e9c20079b361c0d3",3136:"48d7f7236adf8a2059e2",3158:"dcd24b8dbaf4ba649008",3171:"93b05bd37a86e49ffc9a",3204:"a05a55798f6505178c31",3206:"dc8cd1e48f5a57cb6e3c",3226:"2ef98854a52cedbd32f9",3227:"ac6ccb6a3ed692e4a9fc",3236:"43324efd2dd713922535",3257:"def4fd94dd245b7986ea",3282:"febefc3e39f8cf4ab072",3317:"e81d76efbf3cbf08d044",3330:"307bb432cc38a15ad806",3366:"e97e0eaa2a40fc9ddebb",3369:"de60518167de564ef740",3407:"2e65fb4da8ce9316db01",3419:"9f0edba375c66708d282",3425:"209d966c927ab55f2d24",3433:"6fb6f738bd97fe94497b",3452:"d5a76c249e29c6482cfa",3459:"5a6a90aed9b68513de38",3471:"04531b97be3cef5772d7",3477:"181873abfc7953f46674",3489:"4b3d4d38af8b5781ed09",3498:"8b2676ce13c3ca883abc",3500:"28857ddc3b23a256e71f",3534:"420fabed693e6c4a27ea",3537:"626445aef81884b8ab78",3610:"4ecb8b2b9f0f713f7699",3611:"1ad7e771cb32402281f1",3622:"3ae422d0c3623d5bb157",3636:"fcf91ad6794ef0a9adc8",3688:"ec6bbf9a5287d429ec27",3722:"a2fc6c72cd30c4dcceb7",3767:"9954d4d50daee62fb5b6",3780:"c737f82d871390344c74",3781:"a10eb2b9e49678b39dc3",3840:"2c32d0f09aafda7cda1e",3951:"9c9c928a3fa747fd03fc",3985:"cb5cb4bb6a5023d65775",4025:"81d84d79a6a2c4233707",4048:"ca91ecf3be19f3ce49ce",4108:"b5d832e87e629fd3560a",4139:"99d7d1949ffe57ea3fbb",4142:"305f3a942ae7abf677fe",4163:"2c34719c2a4df26023a9",4176:"fe690959bafc5836d9b3",4190:"abc96a514032b4fc9db1",4194:"7142c28d5502f5bfecfe",4224:"c7d007cb06e1597a4565",4286:"73198475cee4b1b2de94",4291:"37935d5ceeff4310bfb5",4309:"5e1908da274aeed0079a",4310:"bba2a08aac9ae10e119c",4330:"f7098c010a531a82736b",4364:"0a58de6ad175c07ce07b",4413:"f20a9c4217b71b8ade83",4417:"a3b5ea20f3be7ba374f3",4420:"54035e9b2e0396bad338",4442:"6783eb196935cb95496b",4443:"0d19d67d8117081bd0da",4490:"272a41d2ea7fe5232caa",4499:"7ac8b374b18928df7b45",4506:"b3ea614489308f911cb3",4522:"6b48b1bc0d5712a541fc",4527:"829b67e814a2b44b8d22",4556:"93c8e7500a8ab12d8126",4565:"e4188b71ab7e9be44b2f",4567:"fbd9a1bfc1918aaafba8",4570:"2c3f2549656912ff552b",4586:"bab03835028735f99721",4619:"11ac11a3d498f9a2eaee",4625:"d978f6c9c636e1e8c0cb",4660:"bd295770d7013dc28887",4663:"b623d1a409c2677fadf7",4672:"4267d0284a03b65fd0c5",4675:"e789af20b8b40a739fce",4678:"bdc5d57f5b927abb8094",4753:"1ed6623e920783d7fa48",4788:"4690d74f4dd99bf1c62c",4817:"58a33ea7fd257ac63526",4854:"1b033b21fc7ed316543e",4869:"735d7b5553c782b9d251",4879:"eb27203d2463ba6fe66e",4916:"396358e1c8bab7fabb9f",4958:"c26aab9c32ce6a1f2e20",4973:"3814c7fe1b48d068d8a2",5009:"3bd644970e5dc25791f8",5010:"59a49b5869cd84d21104",5011:"b1c502f46240f90f0183",5025:"741ccf79c2eeb5585e27",5028:"e33f497e0ade9fdbf476",5029:"796d923ef1474faeb574",5042:"0b71232715699819b119",5085:"d1808a98f887859d487f",5111:"2bcb8363a78a82736c2a",5113:"1ecd75b82f4a76b2f8e1",5173:"48afdd258546d72e26b1",5181:"c0d7ad55c63c177e4f40",5197:"5fbf2d706a84eebf3b97",5202:"df6a6a73f821cd8493a7",5208:"c4c187bab0c5c7c1b52f",5209:"b2fecf11679c65500f7a",5243:"57cecf960c5552a0152d",5263:"b85fa806aa6b7c87d608",5318:"396f6cabbe96ccb934fc",5391:"9d4610171ab415304092",5395:"e6aa44ce34755531597a",5399:"5512d8cf29ae1884053a",5408:"4e62eb2a8492e602954a",5438:"4c072cb7d56dd6c676e3",5477:"6e41cd48392c35efeef1",5481:"738aeb3a76d2350ed42b",5559:"f6f2ab5064bd44ced838",5575:"f1e6c0162bcb9855f147",5587:"1a11377f01d86234ad92",5631:"bcc7b51d3b30bcbfeaba",5637:"0160e686856ac8c1eef6",5677:"7631e4d3d9bd2a0c73fd",5692:"1e6a1002dab6e822b354",5734:"62402e166f29ded2281a",5749:"94fdb0b9de2377c1f193",5802:"c121ed73dfe2d77c8842",5814:"d5ab7cee0eef713156f6",5817:"56eb12c51e63f5e21cdb",5883:"5b34d356e1dd99d25a86",5896:"8e69975716441f0831e0",5898:"19c1c78f92d00142c8fc",5918:"cae3dcdf2801c5d67f6b",5980:"9f47a148d2ab0eeb6fcf",6006:"1d34e33b267357096bcb",6032:"ed71e691c616cf9dbef7",6041:"7b7bbfa11b2c5804adf3",6051:"e66bc98173bcffdb3d39",6086:"a2465e0dcd2988e67177",6116:"bf663f87fe90bb318923",6145:"24d09ef5da2871be570d",6147:"a12106d5f9cb6ec32ae4",6167:"b808a73d245cbf07f8f5",6181:"18fbc25a23722d14ee0d",6187:"ec8eae77abb972b63a84",6193:"82107a1c7136efa4ea74",6199:"0313bb92df664a8087f2",6235:"729229a4f5705b5c44e9",6254:"6a358b25b2d67d7c521b",6283:"fda91e0670ae67aa43ab",6332:"6119dfe5c23a3e990dbf",6334:"fb41fd73f09833e6210d",6396:"76624289342f39dde3b0",6397:"b38f4be747bbf4386383",6448:"8afbc81120866f3c3e6a",6470:"a9f4fc47f519cc77e89a",6503:"b5060750f90f16bca16d",6528:"f3147a503cf3635568fc",6565:"9d61dc13db5e0296e360",6605:"d68be7398ab5de7870a9",6623:"cc61351e0031f9ccd97b",6627:"aafe9ad0a91e6b04d267",6644:"a6ad692105bdb6167ceb",6656:"0b3a64944d4a2fc8f062",6667:"9f28f00aef12f5bafb72",6679:"3bee0d331ca7ba9224c7",6742:"e8d8f416020965216f54",6746:"a1ae0afc9ad814ec4dc4",6763:"e11d2d16c9fa4d7c1ed5",6788:"a7af0bdef685d99b9980",6796:"c79d1e02929ff757541e",6809:"b4fce1a046e3b6302ad7",6811:"2b176e50c41180c6af38",6820:"75e4115bc6c9e877f2a9",6885:"a5b743e4ab362bdde9b5",6893:"27beab71cf469ec17fb6",6902:"15fee2244b70845cf187",6916:"a5199d0019dc522818f2",6934:"f5b636656adb3de42af5",6952:"bea877416169c0b82210",7e3:"0816f70474c842eead20",7015:"0b5d52500d57850a0650",7026:"4bdc7fc310146f2fc8d0",7031:"cf1a5d9220e7a8eec720",7075:"1d1a475d24502ac2b73f",7076:"d53465200e55646672e5",7108:"b520895a1913436ee7ee",7145:"c0d89f2afe43a6e0752f",7173:"59f7150d7f096e2ca38d",7186:"f9a8275f1c2cd735b64b",7210:"977b00b459a128e125a2",7211:"f35f8f526a7162d638dc",7217:"96f6c12ac7582efbd8b9",7230:"b79876d6b02dabb47708",7247:"b028d2a1b82503425010",7268:"5aaa819f8134894ba320",7278:"835ed521a6bc1aa2a530",7281:"a0d06b5dfa28dfa8d426",7313:"9a26f2a85f62ea803fbf",7359:"5eae4ef6603175887066",7380:"3f5d942eacc8397dfb3f",7385:"d90fafe3bde21641a682",7387:"70ef4ee2265eabdd370b",7406:"b420bfe5af6787f6de5e",7507:"33cba0a23c6be001e429",7546:"7549ba00118642fcfe10",7551:"c4292c4f143a22fa31b3",7592:"e97955e27685c19ab88c",7623:"2536e9be301542b67be5",7624:"f7e14433c890424f0f86",7625:"9af86f12ec8be72aeabb",7627:"3822d4846d85c609d867",7632:"d374bf26b069ae51b98b",7633:"b5e610cec4559713493c",7644:"a98465f96f79e7e51a5f",7665:"e3354eef0f7fbaa6bd21",7694:"e7e4f5146c851859e1da",7705:"2bc839951176f0b33cd9",7743:"90c99f662c26620c4b47",7744:"536b9b7e505dc9386abd",7772:"ded33f3b2d7251841ef6",7802:"e57eaa8424d23351dd08",7826:"b3e20617b42154c8e18d",7842:"8889453438596ae6320d",7856:"5dba1bacf772941834de",7874:"6b846c1df643186b97c3",7887:"782385ff0bc36a9df865",7935:"8e732ad219df05661245",7936:"596070cd3191b156c2cd",7940:"7d0c7fcb7f110dc63dcc",7968:"1ac65ac4a64e920ae948",7989:"82ac9fb3c8d80f387c86",8045:"5fe9ce12b998a9a41f54",8056:"3525e571caf12bd87718",8077:"980f64802b615c7d4475",8082:"f3789bf8baf14f6c8009",8135:"e03ba28cef12375dbfc7",8153:"e7dbcd201d5a6bd78fc5",8155:"0a373d373f7405ab9382",8171:"40af98b7a6d27210baaf",8223:"9d1a7c5f9c37dfb81b5b",8292:"311c0f501228763520f0",8297:"300de28cf40889277c62",8320:"40c4fce0328bd7ef0701",8331:"76db1d7184f87517b564",8334:"d3e4103aeeda62fbc562",8382:"5e0c83ae9e361ce8f126",8389:"432e3b2d10ce87e0ec84",8408:"9aad2864f0bd76321ede",8410:"906394cb351f17e7f6a4",8423:"18c7a3e516e6b0d8bc11",8444:"726af7f69b3db56a2fa5",8457:"359c7d5750d4760c9e02",8470:"e036603af2243482cf09",8485:"579a06e166d6414c50e7",8504:"9259e4fb08e3bd1f0362",8506:"9677723e369839f165a9",8507:"2f306f0b0ca6c5b97fba",8533:"46027498f01f5947f14c",8575:"3925db8dd65c94923fd8",8586:"94ea095de421ef115a77",8628:"e1e8975c7c3a58602feb",8640:"784b038d82be1b694944",8648:"60a8a3c4f8de26471ec8",8676:"9026fd14eda2cdbb3286",8720:"a4ed6b5a21457218adcd",8734:"fbd96e580b19c2c97612",8749:"8fb270b71122525306a6",8769:"8c7fa5a6988118e0b5a1",8797:"9deaec83e400981cd9fc",8818:"fe2aaef74e9f8a4ade5a",8848:"9f021bc10fa198e9dcfa",8849:"16cde5be2ca6e594b66d",8909:"14279dec1e8204f607dc",8918:"64320ba16433f96bb441",8972:"efebdd60cd5d26b36733",8992:"fd365d397bd82a8ba150",8996:"7971b46710ca68e3e123",9010:"980e0b17aaa9d9251ddc",9017:"85906eb405bf67bb6a57",9067:"a7d6318b3ce56c5a35c6",9072:"63da80829cd0a1d88408",9073:"965fd3940de14a33bfd4",9115:"d23435b4adb004a8cd0b",9148:"f98ddfdebf37b402da80",9159:"16c2a936257041813bd8",9170:"dadfdc3b8cdae7831b5f",9179:"8d6dfba725203c76710f",9217:"6aec52e76ecee251ae67",9222:"abb557bbd6c95a75089f",9231:"05f14b2cb18a70620bd4",9249:"65c6d1d992a35cd5743b",9258:"631c3b7ef88337483cf1",9287:"46c92c4c0b9a3e579ca5",9289:"f30224bdbef4590589cb",9340:"d89e91753ab54f598112",9343:"e4fa1682eeae89c03987",9364:"53aa8e3d7f1935bb3cf7",9369:"27158ce14f9ee12e4aa3",9372:"22a0ab17837307aa7a05",9392:"7ea91661d9abc53d41b3",9417:"9d7798f5dbd07f84b0a6",9426:"fb7d972f1f9ddfdf85ac",9435:"106af166ebabd5124500",9476:"7aa5d2342b042dd50b54",9479:"a1e76ae6ae91d87c8ca7",9502:"7ffb827e38ca0129411d",9517:"070f595917bb6f00b5b5",9544:"2e65b68b3b18497962e7",9557:"3dc340b6e4f07f56af01",9561:"4d0de1eace4fdbb283fb",9588:"9904e06205eb73597475",9603:"6d431e640898e0e2176e",9609:"9b16a0cfd94a9fa9c33a",9623:"63eadbdb9e64fa079756",9625:"45f8bd2f580f37d97e4e",9651:"c5474f4eac58266a9bfc",9669:"09f38d65719291c1a000",9673:"970669fb835f0818e208",9685:"f4d4c4798d2f73a68780",9687:"7abb4e7b93f66655892c",9694:"b400e0b0fe8e36997451",9695:"a8fb4dbcafd9053acf81",9699:"730905509c81681e2204",9753:"a0a329c2a4f788d1b137",9755:"48b7f28e87ab722a3d0e",9776:"323bd75cc3ae7d35e179",9786:"6f5aed622dfe62c0b1d9",9797:"ed0faa050b2de4329e96",9808:"9eddaf7cccfb3ca6a66a",9861:"50eacfca0375c49967aa",9869:"af999ed0fea321c846e2",9884:"86a6a13db7110977dc29",9954:"e4de7a61b03687e9db13",9956:"9d10392b2d7574d9d8bb",9975:"ced112bdd1bf0264170f"}[e]+".js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},i="tocco-widget-showcase:",s.l=(e,t,n,r)=>{if(o[e])o[e].push(t);else{var a,c;if(void 0!==n)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==i+n){a=d;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",i+n),a.src=e),o[e]=[t];var p=(t,n)=>{a.onerror=a.onload=null,clearTimeout(f);var r=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),c&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.p="/",(()=>{var e={8792:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=s.p+s.u(t),a=new Error;s.l(i,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,a,c]=n,l=0;if(i.some((t=>0!==e[t]))){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(c)c(s)}for(t&&t(n);l<i.length;l++)o=i[l],s.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=this.webpackChunktocco_widget_showcase=this.webpackChunktocco_widget_showcase||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),s.nc=void 0;var l={};return(()=>{"use strict";s.r(l),s.d(l,{default:()=>Ge});var e=s(26396),t=s.n(e),n=s(5556),r=s.n(n),o=s(4883),i=s.n(o),a=s(6730),c=s(53303),u=s(27772),d=s(59499),p=s(44334),f=s(50083),m=s(98671),h=s(62128);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?g(Object(r),!0).forEach((function(n){t()(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=t()(t()(t()(t()(t()(t()(t()(t()(t()({},h.Ru,m.A.singleTransferReducer("widgets")),h.c6,m.A.singleTransferReducer("selectedWidget")),h.o5,m.A.singleTransferReducer("widgetConfigs")),h.$7,m.A.singleTransferReducer("selectedWidgetConfig")),h.Vr,m.A.singleTransferReducer("widgetConfig")),h.L9,m.A.singleTransferReducer("theme")),h.Kb,(function(e,t){var n=t.payload,r=n.isDevelopmentRunEnv,o=n.isWidgetManager;return y(y({},e),{},{access:{isDevelopmentRunEnv:r,isWidgetManager:o}})})),h.Gz,m.A.singleTransferReducer("mode")),h.pH,m.A.singleTransferReducer("mode")),b={widgets:[],selectedWidget:null,widgetConfigs:[],selectedWidgetConfig:null,widgetConfig:null,theme:f.A,mode:"simple",access:{isDevelopmentRunEnv:void 0,isWidgetManager:void 0}};var w=s(92207),x=s.n(w),O=s(69917),k=s(70661),S=s(89168),A="widgetConfig/FETCH_SPECIFIC_CONFIG_ENTITY_ID",j="widgetConfig/SET_SPECIFIC_CONFIG_ENTITY_ID",E=function(e){return{type:j,payload:{specificConfigEntityId:e}}},P=x().mark(C),T=x().mark(R),D=x().mark(F),_=x().mark(H);function C(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.Q7)([(0,O.p8)(h.Zz,H),(0,O.p8)(h.c6,N),(0,O.p8)(h.$7,I),(0,O.p8)(h.L4,R),(0,O.p8)(h.WJ,M),(0,O.p8)(h.$1,L),(0,O.p8)(h.qv,F),(0,O.p8)(h.pH,z)]);case 1:case"end":return e.stop()}}),P)}function N(e){var t=e.payload.selectedWidget;return x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.yJ)(h.qK(null));case 1:return e.next=2,(0,O.yJ)(E(null));case 2:return e.next=3,(0,O.yJ)((0,h.pE)(null));case 3:return e.next=4,(0,O.yJ)(h.mU(t));case 4:case"end":return e.stop()}}),e)}))()}function I(e){var t=e.payload.selectedWidgetConfig;return x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.yJ)((0,h.pE)(null));case 1:if(!t){e.next=2;break}return e.next=2,(0,O.yJ)(h.HS(t.uniqueId));case 2:case"end":return e.stop()}}),e)}))()}function R(){var e,t;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e={method:"GET"},n.next=1,(0,O.T1)(k.A.requestSaga,"showcase/widgets/",e);case 1:return t=n.sent,n.next=2,(0,O.yJ)((0,h.Oe)(t.body.widgets));case 2:case"end":return n.stop()}}),T)}function M(e){var t=e.payload.widget;return x().mark((function e(){var n,r,o;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="showcase/widgets/".concat(t.key),r={method:"GET"},e.next=1,(0,O.T1)(k.A.requestSaga,n,r);case 1:return o=e.sent,e.next=2,(0,O.yJ)((0,h.mj)(o.body.configs));case 2:case"end":return e.stop()}}),e)}))()}function L(e){var t=e.payload.widgetConfigUniqueId;return x().mark((function e(){var n,r,o;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="widget/configs/".concat(t),r={method:"GET",queryParams:{_showcase:!0}},e.next=1,(0,O.T1)(k.A.requestSaga,n,r);case 1:return o=e.sent,e.next=2,(0,O.yJ)((0,h.pE)(o.body));case 2:case"end":return e.stop()}}),e)}))()}function F(){var e,t;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e={method:"GET"},n.next=1,(0,O.T1)(k.A.requestSaga,"showcase/checkAccess",e);case 1:return t=n.sent,n.next=2,(0,O.yJ)((0,h.ZK)(t.body.isDevelopmentRunEnv,t.body.isWidgetManager));case 2:case"end":return n.stop()}}),D)}function H(){var e;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,(0,O.yJ)(h.x8());case 1:return t.next=2,(0,O.T1)(S.bA);case 2:if(!(e=t.sent)){t.next=3;break}return t.next=3,(0,O.yJ)(h.I0(e));case 3:case"end":return t.stop()}}),_)}function z(e){var t=e.payload.mode;return x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.T1)(S.cR,t);case 1:case"end":return e.stop()}}),e)}))()}var B,V,U,W=s(24843),q=s(71468),Y=s(22056),$=s.n(Y),J=s(22834),G=s(86395),K=s(56375),Q=s(90986),X=s(25763),Z=s(76242),ee=s(33150),te=s(74848);const ne=function(e){var t,n=e.intl,r=e.theme,i=e.setTheme,a=e.close,c=(0,o.useState)(JSON.stringify(r,null,4)),s=$()(c,2),l=s[0],u=s[1];return(0,te.jsxs)("div",{children:[(0,te.jsxs)(G.A.Wrapper,{children:[B||(B=(0,te.jsx)(G.A.Header,{children:(0,te.jsx)(K.Ay.H4,{children:(0,te.jsx)(J.A,{id:"client.widget-showcase.theme"})})})),(0,te.jsx)(G.A.Body,{children:(0,te.jsx)(Q.A,{label:(t="client.widget-showcase.theme",n.formatMessage({id:t})),labelPosition:"inside",children:(0,te.jsx)(X.A,{type:"code",value:l,events:{onChange:u},options:{autoFocusOnMount:!1,mode:"json"}})})})]}),(0,te.jsxs)(Z.C6,{children:[(0,te.jsx)(ee.A,{onClick:function(){u(JSON.stringify(f.A,null,4))},children:V||(V=(0,te.jsx)(J.A,{id:"client.widget-showcase.theme.reset"}))}),(0,te.jsx)(ee.A,{ink:"primary",look:"raised",onClick:function(){i(JSON.parse(l)),a()},children:U||(U=(0,te.jsx)(J.A,{id:"client.common.ok"}))})]})]})};var re={setTheme:h.Yl};const oe=(0,q.Ng)((function(e){return{theme:e.showcase.theme}}),re)((0,W.Ay)(ne));var ie,ae=s(26800),ce=s(6910);const se=function(e){var t=e.fetchSpecificConfigEntityId,n=e.loadWidgetConfig,r=e.widgetConfigKey,i=e.widgetConfigUniqueId,a=e.specificConfigEntityId,c=e.dispatchEmittedAction;(0,o.useEffect)((function(){r&&t(r)}),[t,r]);return a?a.entityName?(0,te.jsx)(ce.Ay,{entityName:a.entityName,formName:a.entityName,entityId:a.key,mode:"update",onEntityUpdated:function(){n(i)},labelPosition:"inside",docsApp:ae.Ay,emitAction:function(e){c(e)}}):ie||(ie=(0,te.jsx)(K.Ay.P,{children:(0,te.jsx)(J.A,{id:"client.widget-showcase.widgetConfiguration.noConfig"})})):null};var le={fetchSpecificConfigEntityId:function(e){return{type:A,payload:{widgetConfigKey:e}}},loadWidgetConfig:h.HS,dispatchEmittedAction:a.A.dispatchEmittedAction};const ue=(0,q.Ng)((function(e){return{widgetConfigKey:e.showcase.selectedWidgetConfig.key,widgetConfigUniqueId:e.showcase.selectedWidgetConfig.uniqueId,specificConfigEntityId:e.widgetConfig.specificConfigEntityId}}),le)((0,W.Ay)(se));var de,pe=s(90179),fe=s.n(pe),me=s(72189),he=s.n(me),ge=s(51510),ye=s(5016),ve=s(26166),be=(0,ge.Ay)(ye.pR).withConfig({displayName:"StyledInputCode"})(de||(de=he()(["\n && {\n padding: ",";\n }\n"])),ve.A.space(.3));const we=function(e){var t=e.input,n=fe()(t,["customTheme"]);return(0,te.jsx)(be,{children:JSON.stringify(n,null,4)})};var xe=s(52381);function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Oe(Object(r),!0).forEach((function(n){t()(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Se=x().mark(Pe),Ae=x().mark(Te),je=x().mark(De),Ee=function(e){return e.app.messages};function Pe(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.Q7)([(0,O.p8)(xe.de,Te),(0,O.p8)(xe.vc,De),(0,O.p8)(xe.MW,_e)]);case 1:case"end":return e.stop()}}),Se)}function Te(){var e;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,(0,O.Lt)(Ee);case 1:return e=t.sent,t.next=2,(0,O.yJ)(d.A.modal("widget-config-edit",e["client.widget-showcase.widgetConfiguration"],null,ue,!0));case 2:case"end":return t.stop()}}),Ae)}function De(){var e;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,(0,O.Lt)(Ee);case 1:return e=t.sent,t.next=2,(0,O.yJ)(d.A.modal("theme-edit",e["client.widget-showcase.theme"],null,oe,!0));case 2:case"end":return t.stop()}}),je)}function _e(e){var t=e.payload.input;return x().mark((function e(){var n,r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.Lt)(Ee);case 1:return n=e.sent,r=function(e){return(0,te.jsx)(we,ke({input:t},e))},e.next=2,(0,O.yJ)(d.A.modal("widget-input-view",n["client.widget-showcase.widgetInput"],null,r,!0));case 2:case"end":return e.stop()}}),e)}))()}var Ce=t()({},j,m.A.singleTransferReducer("specificConfigEntityId")),Ne={specificConfigEntityId:null};var Ie=x().mark(Re);function Re(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.Q7)([(0,O.p8)(A,Me)]);case 1:case"end":return e.stop()}}),Ie)}function Me(e){var t=e.payload.widgetConfigKey;return x().mark((function e(){var n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.T1)(k.A.requestSaga,"/widget/configs/".concat(t,"/specific-config"));case 1:return n=e.sent,e.next=2,(0,O.yJ)(E(n.body));case 2:case"end":return e.stop()}}),e)}))()}const Le={showcase:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,t=arguments.length>1?arguments[1]:void 0,n=v[t.type];return n?n(e,t):e},widgetConfig:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ne,t=arguments.length>1?arguments[1]:void 0,n=Ce[t.type];return n?n(e,t):e}};var Fe=[C,Pe,Re];const He={name:"widget-showcase",fontFamily:{monospace:"Ubuntu Mono, monospace",regular:"Ubuntu, sans-serif",url:"https://fonts.googleapis.com/css?family=Ubuntu+Mono:300,500|Ubuntu:300,500&display=swap"},fontSize:{base:1,factor:1.1},fontWeights:{regular:300,bold:300},radii:{button:"20px"},space:{base:1,factor:2}};var ze,Be;function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Ve(Object(r),!0).forEach((function(n){t()(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var We="widget-showcase",qe=i().lazy((function(){return s.e(9231).then(s.bind(s,653))})),Ye=function(){return ze||(ze=(0,te.jsx)("div",{children:(0,te.jsx)(o.Suspense,{fallback:"",children:(0,te.jsx)(qe,{})})}))},$e=function(e,t,n,r){var o=Be||(Be=(0,te.jsx)(Ye,{})),i=Ue(Ue({},t),{},{customTheme:He}),s=c.A.createStore(Le,Fe,i,We);return a.A.addToStore(s),d.A.addToStore(s,!0),c.A.createApp(We,o,s,{input:i,events:n,actions:[],publicPath:r,textResourceModules:["component","common",We]})};c.A.registerAppInRegistry(We,$e);var Je=function(e){return c.A.useApp({initApp:$e,props:e,packageName:We}).component};Je.propTypes={appContext:p.A.propTypes.isRequired,selection:u.A.propType.isRequired,baseRoute:r().string};const Ge=Je})(),l})()));
65
+ */function l(e={}){return g((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=h(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),f("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:m(t))}),(function(e,t){d("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function u(e,t){if(!1===e||null==e)throw new Error(t)}function d(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function f(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?h(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function m({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function h(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function g(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,c="POP",l=null,u=d();function d(){return(a.state||{idx:null}).idx}function m(){c="POP";let e=d(),t=null==e?null:e-u;u=e,l&&l({action:c,location:g.location,delta:t})}function h(e){return y(e)}null==u&&(u=0,a.replaceState({...a.state,idx:u},""));let g={get action(){return c},get location(){return e(o,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(s,m),l=e,()=>{o.removeEventListener(s,m),l=null}},createHref:e=>t(o,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c="PUSH";let r=f(g.location,e,t);n&&n(r,e),u=d()+1;let s=p(r,u),m=g.createHref(r);try{a.pushState(s,"",m)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(m)}i&&l&&l({action:c,location:g.location,delta:1})},replace:function(e,t){c="REPLACE";let r=f(g.location,e,t);n&&n(r,e),u=d();let o=p(r,u),s=g.createHref(r);a.replaceState(o,"",s),i&&l&&l({action:c,location:g.location,delta:0})},go:e=>a.go(e)};return g}function y(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),u(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:m(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function v(e){return{defaultValue:e}}var b=class{constructor(e){var t,n,r;if(t=this,n=o,r=new Map,n.has(t)?a("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),e)for(let[t,n]of e)this.set(t,n)}get(e){if(c(this,o).has(e))return c(this,o).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw new Error("No value found for context")}set(e,t){c(this,o).set(e,t)}};o=new WeakMap;var w=new Set(["lazy","caseSensitive","path","id","index","children"]);var x=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function O(e,t,n=[],r={},o=!1){return e.map(((e,i)=>{let a=[...n,String(i)],c="string"==typeof e.id?e.id:a.join("-");if(u(!0!==e.index||!e.children,"Cannot specify children on an index route"),u(o||!r[c],`Found a route id collision on id "${c}". Route id's must be globally unique within Data Router usages`),function(e){return!0===e.index}(e)){let n={...e,id:c};return r[c]=k(n,t(n)),n}{let n={...e,id:c,children:void 0};return r[c]=k(n,t(n)),e.children&&(n.children=O(e.children,t,a,r,o)),n}}))}function k(e,t){return Object.assign(e,{...t,..."object"==typeof t.lazy&&null!=t.lazy?{lazy:{...e.lazy,...t.lazy}}:{}})}function S(e,t,n="/"){return A(e,t,n,!1)}function A(e,t,n,r){let o=M(("string"==typeof t?h(t):t).pathname||"/",n);if(null==o)return null;let i=E(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e<i.length;++e){let t=R(o);a=C(i[e],t,r)}return a}function j(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function E(e,t=[],n=[],r="",o=!1){let i=(e,i,a=o,c)=>{let s={relativePath:void 0===c?e.path||"":c,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(r)&&a)return;u(s.relativePath.startsWith(r),`Absolute route path "${s.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length)}let l=W([r,s.relativePath]),d=n.concat(s);e.children&&e.children.length>0&&(u(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),E(e.children,t,d,l,a)),(null!=e.path||e.index)&&t.push({path:l,score:_(l,e.index),routesMeta:d})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of P(e.path))i(e,t,!0,n);else i(e,t)})),t}function P(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=P(r.join("/")),c=[];return c.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&c.push(...a),c.map((t=>e.startsWith("/")&&""===t?"/":t))}var T=/^:[\w-]+$/,D=e=>"*"===e;function _(e,t){let n=e.split("/"),r=n.length;return n.some(D)&&(r+=-2),t&&(r+=2),n.filter((e=>!D(e))).reduce(((e,t)=>e+(T.test(t)?3:""===t?1:10)),r)}function C(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e<r.length;++e){let c=r[e],s=e===r.length-1,l="/"===i?t:t.slice(i.length)||"/",u=N({path:c.relativePath,caseSensitive:c.caseSensitive,end:s},l),d=c.route;if(!u&&s&&n&&!r[r.length-1].route.index&&(u=N({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},l)),!u)return null;Object.assign(o,u.params),a.push({params:o,pathname:W([i,u.pathname]),pathnameBase:q(W([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=W([i,u.pathnameBase]))}return a}function N(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=I(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),c=o.slice(1);return{params:r.reduce(((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=c[r]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=c[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function I(e,t=!1,n=!0){d("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"))).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function R(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return d(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function M(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var L=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,F=e=>L.test(e);function H(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function z(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function B(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function V(e){let t=B(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function U(e,t,n,r=!1){let o;"string"==typeof e?o=h(e):(o={...e},u(!o.pathname||!o.pathname.includes("?"),z("?","pathname","search",o)),u(!o.pathname||!o.pathname.includes("#"),z("#","pathname","hash",o)),u(!o.search||!o.search.includes("#"),z("#","search","hash",o)));let i,a=""===e||""===o.pathname,c=a?"/":o.pathname;if(null==c)i=n;else{let e=t.length-1;if(!r&&c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let s=function(e,t="/"){let n,{pathname:r,search:o="",hash:i=""}="string"==typeof e?h(e):e;return r?(r=r.replace(/\/\/+/g,"/"),n=r.startsWith("/")?H(r.substring(1),"/"):H(r,t)):n=t,{pathname:n,search:Y(o),hash:$(i)}}(o,i),l=c&&"/"!==c&&c.endsWith("/"),d=(a||"."===c)&&n.endsWith("/");return s.pathname.endsWith("/")||!l&&!d||(s.pathname+="/"),s}var W=e=>e.join("/").replace(/\/\/+/g,"/"),q=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",$=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var J=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function G(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function K(e){return e.map((e=>e.route.path)).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Q="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function X(e,t){let n=e;if("string"!=typeof n||!L.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(Q)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=M(r.pathname,t);r.origin===e.origin&&null!=i?n=i+r.search+r.hash:o=!0}catch(e){d(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}var Z=Symbol("Uninstrumented");function ee(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach((e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}})));let r={};if("function"==typeof t.lazy&&n.lazy.length>0){let e=te(n.lazy,t.lazy,(()=>{}));e&&(r.lazy=e)}if("object"==typeof t.lazy){let e=t.lazy;["middleware","loader","action"].forEach((t=>{let o=e[t],i=n[`lazy.${t}`];if("function"==typeof o&&i.length>0){let e=te(i,o,(()=>{}));e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}}))}return["loader","action"].forEach((e=>{let o=t[e];if("function"==typeof o&&n[e].length>0){let t=o[Z]??o,i=te(n[e],t,((...e)=>re(e[0])));i&&("loader"===e&&!0===t.hydrate&&(i.hydrate=!0),i[Z]=t,r[e]=i)}})),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map((e=>{let t=e[Z]??e,r=te(n.middleware,t,((...e)=>re(e[0])));return r?(r[Z]=t,r):e}))),r}function te(e,t,n){return 0===e.length?null:async(...r)=>{let o=await ne(e,n(...r),(()=>t(...r)),e.length-1);if("error"===o.type)throw o.value;return o.value}}async function ne(e,t,n,r){let o,i=e[r];if(i){let a,c=async()=>(a?console.error("You cannot call instrumented handlers more than once"):a=ne(e,t,n,r-1),o=await a,u(o,"Expected a result"),"error"===o.type&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await i(c,t)}catch(e){console.error("An instrumentation function threw an error:",e)}a||await c(),await a}else try{let e=await n();o={type:"success",value:e}}catch(e){o={type:"error",value:e}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function re(e){let{request:t,context:n,params:r,unstable_pattern:o}=e;return{request:ie(t),params:{...r},unstable_pattern:o,context:ae(n)}}function oe(e,t){return{currentUrl:m(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function ie(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function ae(e){if(function(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t||Object.getOwnPropertyNames(t).sort().join("\0")===ce}(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var ce=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var se=["POST","PUT","PATCH","DELETE"],le=new Set(se),ue=["GET",...se],de=new Set(ue),pe=new Set([301,302,303,307,308]),fe=new Set([307,308]),me={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},he={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ge={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ye=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),ve="remix-router-transitions",be=Symbol("ResetLoaderData");function we(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,n=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement;u(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=e.hydrationRouteProperties||[],o=e.mapRouteProperties||ye,i=o;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;i=e=>({...o(e),...ee(t.map((e=>e.route)).filter(Boolean),e)})}let a,c={},s=O(e.routes,i,void 0,c),l=e.basename||"/";l.startsWith("/")||(l=`/${l}`);let p,h,g=e.dataStrategy||Ne,v={...e.future},w=null,x=new Set,k=null,E=null,P=null,T=null!=e.hydrationData,D=S(s,e.history.location,l),_=!1,C=null;if(null!=D||e.patchRoutesOnNavigation){if(D&&!e.hydrationData){nt(D,s,e.history.location.pathname).active&&(D=null)}if(D)if(D.some((e=>e.route.lazy)))p=!1;else if(D.some((e=>Se(e.route)))){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=D.findIndex((e=>void 0!==n[e.route.id]));p=D.slice(0,e+1).every((e=>!Ae(e.route,t,n)))}else p=D.every((e=>!Ae(e.route,t,n)))}else p=!0;else{p=!1,D=[];let t=nt(null,s,e.history.location.pathname);t.active&&t.matches&&(_=!0,D=t.matches)}}else{let t=et(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Ze(s);p=!0,D=n,C={[r.id]:t}}let N,I,R={historyAction:e.history.action,location:e.history.location,matches:D,initialized:p,navigation:me,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},L="POP",H=null,z=!1,B=!1,V=new Map,U=null,W=!1,q=!1,Y=new Set,$=new Map,J=0,K=-1,Q=new Map,X=new Set,ne=new Map,re=new Map,ie=new Set,ae=new Map,ce=null;function se(e,t={}){e.matches&&(e.matches=e.matches.map((e=>{let t=c[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}))),R={...R,...e};let n=[],r=[];R.fetchers.forEach(((e,t)=>{"idle"===e.state&&(ie.has(t)?n.push(t):r.push(t))})),ie.forEach((e=>{R.fetchers.has(e)||$.has(e)||n.push(e)})),[...x].forEach((r=>r(R,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),n.forEach((e=>_e(e))),r.forEach((e=>R.fetchers.delete(e)))}function le(t,n,{flushSync:r}={}){let o,i=null!=R.actionData&&null!=R.navigation.formMethod&&ft(R.navigation.formMethod)&&"loading"===R.navigation.state&&!0!==t.state?._isRedirect;o=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?R.actionData:null;let c=n.loaderData?Ke(R.loaderData,n.loaderData,n.matches||[],n.errors):R.loaderData,l=R.blockers;l.size>0&&(l=new Map(l),l.forEach(((e,t)=>l.set(t,ge))));let u,d=!W&&Je(t,n.matches||R.matches),p=!0===z||null!=R.navigation.formMethod&&ft(R.navigation.formMethod)&&!0!==t.state?._isRedirect;if(a&&(s=a,a=void 0),W||"POP"===L||("PUSH"===L?e.history.push(t,t.state):"REPLACE"===L&&e.history.replace(t,t.state)),"POP"===L){let e=V.get(R.location.pathname);e&&e.has(t.pathname)?u={currentLocation:R.location,nextLocation:t}:V.has(t.pathname)&&(u={currentLocation:t,nextLocation:R.location})}else if(B){let e=V.get(R.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),V.set(R.location.pathname,e)),u={currentLocation:R.location,nextLocation:t}}se({...n,actionData:o,loaderData:c,historyAction:L,location:t,initialized:!0,navigation:me,revalidation:"idle",restoreScrollPosition:d,preventScrollReset:p,blockers:l},{viewTransitionOpts:u,flushSync:!0===r}),L="POP",z=!1,B=!1,W=!1,q=!1,H?.resolve(),H=null,ce?.resolve(),ce=null}async function ue(t,n,o){N&&N.abort(),N=null,L=t,W=!0===(o&&o.startUninterruptedRevalidation),function(e,t){if(k&&P){let n=$e(e,t);k[n]=P()}}(R.location,R.matches),z=!0===(o&&o.preventScrollReset),B=!0===(o&&o.enableViewTransition);let u=a||s,d=o&&o.overrideNavigation,p=o?.initialHydration&&R.matches&&R.matches.length>0&&!_?R.matches:S(u,n,l),f=!0===(o&&o.flushSync);if(p&&R.initialized&&!q&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(R.location,n)&&!(o&&o.submission&&ft(o.submission.formMethod)))return void le(n,{matches:p},{flushSync:f});let m=nt(p,u,n.pathname);if(m.active&&m.matches&&(p=m.matches),!p){let{error:e,notFoundMatches:t,route:r}=Ye(n.pathname);return void le(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:f})}N=new AbortController;let h,g=qe(e.history,n,N.signal,o&&o.submission),y=e.getContext?await e.getContext():new b;if(o&&o.pendingError)h=[Xe(p).route.id,{type:"error",error:o.pendingError}];else if(o&&o.submission&&ft(o.submission.formMethod)){let t=await async function(t,n,o,a,u,d,p,f={}){je();let m,h=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(n,o);if(se({navigation:h},{flushSync:!0===f.flushSync}),d){let e=await rt(a,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:n}=Ze(s);return{matches:t,pendingActionResult:[n.id,{type:"error",error:e.error}]}}let t=Xe(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:"error",error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:r}=Ye(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:"error",error:t}]}}a=e.matches}let g=ht(a,n);if(g.route.action||g.route.lazy){let e=He(i,c,t,a,g,p?[]:r,u),n=await be(t,e,u,null);if(m=n[g.route.id],!m)for(let e of a)if(n[e.route.id]){m=n[e.route.id];break}if(t.signal.aborted)return{shortCircuited:!0}}else m={type:"error",error:et(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};if(st(m)){let n;if(f&&null!=f.replace)n=f.replace;else{n=We(m.response.headers.get("Location"),new URL(t.url),l,e.history)===R.location.pathname+R.location.search}return await pe(t,m,!0,{submission:o,replace:n}),{shortCircuited:!0}}if(ct(m)){let e=Xe(a,g.route.id);return!0!==(f&&f.replace)&&(L="PUSH"),{matches:a,pendingActionResult:[e.route.id,m,g.route.id]}}return{matches:a,pendingActionResult:[g.route.id,m]}}(g,n,o.submission,p,y,m.active,o&&!0===o.initialHydration,{replace:o.replace,flushSync:f});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(ct(r)&&G(r.error)&&404===r.error.status)return N=null,void le(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}p=t.matches||p,h=t.pendingActionResult,d=yt(n,o.submission),f=!1,m.active=!1,g=qe(e.history,g.url,g.signal)}let{shortCircuited:v,matches:w,loaderData:x,errors:O}=await async function(t,n,o,u,d,p,f,m,h,g,y,v,b){let w=p||yt(n,f),x=f||m||gt(w),O=!W&&!g;if(d){if(O){let e=de(v);se({navigation:w,...void 0!==e?{actionData:e}:{}},{flushSync:y})}let e=await rt(o,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:n}=Ze(s);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Xe(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=Ye(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}o=e.matches}let k=a||s,{dsMatches:S,revalidatingFetchers:A}=ke(t,u,i,c,e.history,R,o,x,n,g?[]:r,!0===g,q,Y,ie,ne,X,k,l,null!=e.patchRoutesOnNavigation,v,b);if(K=++J,!e.dataStrategy&&!S.some((e=>e.shouldLoad))&&!S.some((e=>e.route.middleware&&e.route.middleware.length>0))&&0===A.length){let e=Re();return le(n,{matches:o,loaderData:{},errors:v&&ct(v[1])?{[v[0]]:v[1].error}:null,...Qe(v),...e?{fetchers:new Map(R.fetchers)}:{}},{flushSync:y}),{shortCircuited:!0}}if(O){let e={};if(!d){e.navigation=w;let t=de(v);void 0!==t&&(e.actionData=t)}A.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=R.fetchers.get(e.key),n=vt(void 0,t?t.data:void 0);R.fetchers.set(e.key,n)})),new Map(R.fetchers)}(A)),se(e,{flushSync:y})}A.forEach((e=>{Ce(e.key),e.controller&&$.set(e.key,e.controller)}));let j=()=>A.forEach((e=>Ce(e.key)));N&&N.signal.addEventListener("abort",j);let{loaderResults:E,fetcherResults:P}=await we(S,A,t,u);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",j);A.forEach((e=>$.delete(e.key)));let T=tt(E);if(T)return await pe(t,T.result,!0,{replace:h}),{shortCircuited:!0};if(T=tt(P),T)return X.add(T.key),await pe(t,T.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:D,errors:_}=Ge(R,o,E,v,A,P);g&&R.errors&&(_={...R.errors,..._});let C=Re(),I=Me(K),M=C||I||A.length>0;return{matches:o,loaderData:D,errors:_,...M?{fetchers:new Map(R.fetchers)}:{}}}(g,n,p,y,m.active,d,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,f,h,o&&o.callSiteDefaultShouldRevalidate);v||(N=null,le(n,{matches:w||p,...Qe(h),loaderData:x,errors:O}))}function de(e){return e&&!ct(e[1])?{[e[0]]:e[1].data}:R.actionData?0===Object.keys(R.actionData).length?null:R.actionData:void 0}async function pe(r,o,i,{submission:a,fetcherSubmission:c,preventScrollReset:s,replace:d}={}){i||(H?.resolve(),H=null),o.response.headers.has("X-Remix-Revalidate")&&(q=!0);let p=o.response.headers.get("Location");u(p,"Expected a Location header on the redirect Response"),p=We(p,new URL(r.url),l,e.history);let m=f(R.location,p,{_isRedirect:!0});if(n){let e=!1;if(o.response.headers.has("X-Remix-Reload-Document"))e=!0;else if(F(p)){const n=y(p,!0);e=n.origin!==t.location.origin||null==M(n.pathname,l)}if(e)return void(d?t.location.replace(p):t.location.assign(p))}N=null;let h=!0===d||o.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:g,formAction:v,formEncType:b}=R.navigation;!a&&!c&&g&&v&&b&&(a=gt(R.navigation));let w=a||c;if(fe.has(o.response.status)&&w&&ft(w.formMethod))await ue(h,m,{submission:{...w,formAction:p},preventScrollReset:s||z,enableViewTransition:i?B:void 0});else{let e=yt(m,a);await ue(h,m,{overrideNavigation:e,fetcherSubmission:c,preventScrollReset:s||z,enableViewTransition:i?B:void 0})}}async function be(e,t,n,r){let o,i={};try{o=await ze(g,e,t,r,n,!1)}catch(e){return t.filter((e=>e.shouldLoad)).forEach((t=>{i[t.route.id]={type:"error",error:e}})),i}if(e.signal.aborted)return i;if(!ft(e.method))for(let e of t){if("error"===o[e.route.id]?.type)break;o.hasOwnProperty(e.route.id)||R.loaderData.hasOwnProperty(e.route.id)||R.errors&&R.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(o[e.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[n,r]of Object.entries(o))if(at(r)){let o=r.result;i[n]={type:"redirect",response:Ue(o,e,n,t,l)}}else i[n]=await Ve(r);return i}async function we(e,t,n,r){let o=be(n,e,r,null),i=Promise.all(t.map((async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await be(e.request,e.matches,r,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:"error",error:et(404,{pathname:e.path})}})})));return{loaderResults:await o,fetcherResults:(await i).reduce(((e,t)=>Object.assign(e,t)),{})}}function je(){q=!0,ne.forEach(((e,t)=>{$.has(t)&&Y.add(t),Ce(t)}))}function Pe(e,t,n={}){R.fetchers.set(e,t),se({fetchers:new Map(R.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function Te(e,t,n,r={}){let o=Xe(R.matches,t);_e(e),se({errors:{[o.route.id]:n},fetchers:new Map(R.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function De(e){return re.set(e,(re.get(e)||0)+1),ie.has(e)&&ie.delete(e),R.fetchers.get(e)||he}function _e(e){let t=R.fetchers.get(e);!$.has(e)||t&&"loading"===t.state&&Q.has(e)||Ce(e),ne.delete(e),Q.delete(e),X.delete(e),ie.delete(e),Y.delete(e),R.fetchers.delete(e)}function Ce(e,t){let n=$.get(e);n&&(n.abort(t),$.delete(e))}function Ie(e){for(let t of e){let e=bt(De(t).data);R.fetchers.set(t,e)}}function Re(){let e=[],t=!1;for(let n of X){let r=R.fetchers.get(n);u(r,`Expected fetcher: ${n}`),"loading"===r.state&&(X.delete(n),e.push(n),t=!0)}return Ie(e),t}function Me(e){let t=[];for(let[n,r]of Q)if(r<e){let e=R.fetchers.get(n);u(e,`Expected fetcher: ${n}`),"loading"===e.state&&(Ce(n),Q.delete(n),t.push(n))}return Ie(t),t.length>0}function Le(e){R.blockers.delete(e),ae.delete(e)}function Fe(e,t){let n=R.blockers.get(e)||ge;u("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(R.blockers);r.set(e,t),se({blockers:r})}function Be({currentLocation:e,nextLocation:t,historyAction:n}){if(0===ae.size)return;ae.size>1&&d(!1,"A router only supports one blocker at a time");let r=Array.from(ae.entries()),[o,i]=r[r.length-1],a=R.blockers.get(o);return a&&"proceeding"===a.state?void 0:i({currentLocation:e,nextLocation:t,historyAction:n})?o:void 0}function Ye(e){let t=et(404,{pathname:e}),n=a||s,{matches:r,route:o}=Ze(n);return{notFoundMatches:r,route:o,error:t}}function $e(e,t){if(E){return E(e,t.map((e=>j(e,R.loaderData))))||e.key}return e.key}function Je(e,t){if(k){let n=$e(e,t),r=k[n];if("number"==typeof r)return r}return null}function nt(t,n,r){if(e.patchRoutesOnNavigation){if(!t){return{active:!0,matches:A(n,r,l,!0)||[]}}if(Object.keys(t[0].params).length>0){return{active:!0,matches:A(n,r,l,!0)}}}return{active:!1,matches:null}}async function rt(t,n,r,o){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let u=t;for(;;){let t=null==a,d=a||s,p=c;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:u,fetcherKey:o,patch:(e,t)=>{r.aborted||Ee(e,t,d,p,i,!1)}})}catch(e){return{type:"error",error:e,partialMatches:u}}finally{t&&!r.aborted&&(s=[...s])}if(r.aborted)return{type:"aborted"};let f=S(d,n,l),m=null;if(f){if(0===Object.keys(f[0].params).length)return{type:"success",matches:f};if(m=A(d,n,l,!0),!(m&&u.length<m.length&&ot(u,m.slice(0,u.length))))return{type:"success",matches:f}}if(m||(m=A(d,n,l,!0)),!m||ot(u,m))return{type:"success",matches:null};u=m}}function ot(e,t){return e.length===t.length&&e.every(((e,n)=>e.route.id===t[n].route.id))}return h={get basename(){return l},get future(){return v},get state(){return R},get routes(){return s},get window(){return t},initialize:function(){if(w=e.history.listen((({action:t,location:n,delta:r})=>{if(I)return I(),void(I=void 0);d(0===ae.size||null!=r,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=Be({currentLocation:R.location,nextLocation:n,historyAction:t});if(o&&null!=r){let t=new Promise((e=>{I=e}));return e.history.go(-1*r),Fe(o,{state:"blocked",location:n,proceed(){Fe(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),t.then((()=>e.history.go(r)))},reset(){let e=new Map(R.blockers);e.set(o,ge),se({blockers:e})}}),H?.resolve(),void(H=null)}return ue(t,n)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(ve);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(e){}}(t,V);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(ve,JSON.stringify(n))}catch(e){d(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}(t,V);t.addEventListener("pagehide",e),U=()=>t.removeEventListener("pagehide",e)}return R.initialized||ue("POP",R.location,{initialHydration:!0}),h},subscribe:function(e){return x.add(e),()=>x.delete(e)},enableScrollRestoration:function(e,t,n){if(k=e,P=t,E=n||null,!T&&R.navigation===me){T=!0;let e=Je(R.location,R.matches);null!=e&&se({restoreScrollPosition:e})}return()=>{k=null,P=null,E=null}},navigate:async function t(n,r){if(H?.resolve(),H=null,"number"==typeof n){H||(H=wt());let t=H.promise;return e.history.go(n),t}let o=xe(R.location,R.matches,l,n,r?.fromRouteId,r?.relative),{path:i,submission:a,error:c}=Oe(!1,o,r),s=R.location,u=f(R.location,i,r&&r.state);u={...u,...e.history.encodeLocation(u)};let d=r&&null!=r.replace?r.replace:void 0,p="PUSH";!0===d?p="REPLACE":!1===d||null!=a&&ft(a.formMethod)&&a.formAction===R.location.pathname+R.location.search&&(p="REPLACE");let m=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,h=!0===(r&&r.flushSync),g=Be({currentLocation:s,nextLocation:u,historyAction:p});g?Fe(g,{state:"blocked",location:u,proceed(){Fe(g,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),t(n,r)},reset(){let e=new Map(R.blockers);e.set(g,ge),se({blockers:e})}}):await ue(p,u,{submission:a,pendingError:c,preventScrollReset:m,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:h,callSiteDefaultShouldRevalidate:r&&r.unstable_defaultShouldRevalidate})},fetch:async function(t,n,o,d){Ce(t);let p=!0===(d&&d.flushSync),f=a||s,m=xe(R.location,R.matches,l,o,n,d?.relative),h=S(f,m,l),g=nt(h,f,m);if(g.active&&g.matches&&(h=g.matches),!h)return void Te(t,n,et(404,{pathname:m}),{flushSync:p});let{path:y,submission:v,error:w}=Oe(!0,m,d);if(w)return void Te(t,n,w,{flushSync:p});let x=e.getContext?await e.getContext():new b,O=!0===(d&&d.preventScrollReset);v&&ft(v.formMethod)?await async function(t,n,o,d,p,f,m,h,g,y){je(),ne.delete(t);let v=R.fetchers.get(t);Pe(t,function(e,t){let n={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return n}(g,v),{flushSync:m});let b=new AbortController,w=qe(e.history,o,b.signal,g);if(f){let e=await rt(d,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void Te(t,n,e.error,{flushSync:m});if(!e.matches)return void Te(t,n,et(404,{pathname:o}),{flushSync:m});d=e.matches}let x=ht(d,o);if(!x.route.action&&!x.route.lazy){let e=et(405,{method:g.formMethod,pathname:o,routeId:n});return void Te(t,n,e,{flushSync:m})}$.set(t,b);let O=J,k=He(i,c,w,d,x,r,p),A=await be(w,k,p,t),j=A[x.route.id];if(!j)for(let e of k)if(A[e.route.id]){j=A[e.route.id];break}if(w.signal.aborted)return void($.get(t)===b&&$.delete(t));if(ie.has(t)){if(st(j)||ct(j))return void Pe(t,bt(void 0))}else{if(st(j))return $.delete(t),K>O?void Pe(t,bt(void 0)):(X.add(t),Pe(t,vt(g)),pe(w,j,!1,{fetcherSubmission:g,preventScrollReset:h}));if(ct(j))return void Te(t,n,j.error)}let E=R.navigation.location||R.location,P=qe(e.history,E,b.signal),T=a||s,D="idle"!==R.navigation.state?S(T,R.navigation.location,l):R.matches;u(D,"Didn't find any matches after fetcher action");let _=++J;Q.set(t,_);let C=vt(g,j.data);R.fetchers.set(t,C);let{dsMatches:I,revalidatingFetchers:M}=ke(P,p,i,c,e.history,R,D,g,E,r,!1,q,Y,ie,ne,X,T,l,null!=e.patchRoutesOnNavigation,[x.route.id,j],y);M.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=R.fetchers.get(t),r=vt(void 0,n?n.data:void 0);R.fetchers.set(t,r),Ce(t),e.controller&&$.set(t,e.controller)})),se({fetchers:new Map(R.fetchers)});let F=()=>M.forEach((e=>Ce(e.key)));b.signal.addEventListener("abort",F);let{loaderResults:H,fetcherResults:z}=await we(I,M,P,p);if(b.signal.aborted)return;if(b.signal.removeEventListener("abort",F),Q.delete(t),$.delete(t),M.forEach((e=>$.delete(e.key))),R.fetchers.has(t)){let e=bt(j.data);R.fetchers.set(t,e)}let B=tt(H);if(B)return pe(P,B.result,!1,{preventScrollReset:h});if(B=tt(z),B)return X.add(B.key),pe(P,B.result,!1,{preventScrollReset:h});let{loaderData:V,errors:U}=Ge(R,D,H,void 0,M,z);Me(_),"loading"===R.navigation.state&&_>K?(u(L,"Expected pending action"),N&&N.abort(),le(R.navigation.location,{matches:D,loaderData:V,errors:U,fetchers:new Map(R.fetchers)})):(se({errors:U,loaderData:Ke(R.loaderData,V,D,U),fetchers:new Map(R.fetchers)}),q=!1)}(t,n,y,h,x,g.active,p,O,v,d&&d.unstable_defaultShouldRevalidate):(ne.set(t,{routeId:n,path:y}),await async function(t,n,o,a,s,l,u,d,p){let f=R.fetchers.get(t);Pe(t,vt(p,f?f.data:void 0),{flushSync:u});let m=new AbortController,h=qe(e.history,o,m.signal);if(l){let e=await rt(a,new URL(h.url).pathname,h.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void Te(t,n,e.error,{flushSync:u});if(!e.matches)return void Te(t,n,et(404,{pathname:o}),{flushSync:u});a=e.matches}let g=ht(a,o);$.set(t,m);let y=J,v=He(i,c,h,a,g,r,s),b=await be(h,v,s,t),w=b[g.route.id];$.get(t)===m&&$.delete(t);if(h.signal.aborted)return;if(ie.has(t))return void Pe(t,bt(void 0));if(st(w))return K>y?void Pe(t,bt(void 0)):(X.add(t),void await pe(h,w,!1,{preventScrollReset:d}));if(ct(w))return void Te(t,n,w.error);Pe(t,bt(w.data))}(t,n,y,h,x,g.active,p,O,v))},revalidate:function(){ce||(ce=wt()),je(),se({revalidation:"loading"});let e=ce.promise;return"submitting"===R.navigation.state?e:"idle"===R.navigation.state?(ue(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),e):(ue(L||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:!0===B}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:De,resetFetcher:function(e,t){Ce(e,t?.reason),Pe(e,bt(null))},deleteFetcher:function(e){let t=(re.get(e)||0)-1;t<=0?(re.delete(e),ie.add(e)):re.set(e,t),se({fetchers:new Map(R.fetchers)})},dispose:function(){w&&w(),U&&U(),x.clear(),N&&N.abort(),R.fetchers.forEach(((e,t)=>_e(t))),R.blockers.forEach(((e,t)=>Le(t)))},getBlocker:function(e,t){let n=R.blockers.get(e)||ge;return ae.get(e)!==t&&ae.set(e,t),n},deleteBlocker:Le,patchRoutes:function(e,t,n=!1){let r=null==a;Ee(e,t,a||s,c,i,n),r&&(s=[...s],se({}))},_internalFetchControllers:$,_internalSetRoutes:function(e){c={},a=O(e,i,void 0,c)},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){se(e)}},e.unstable_instrumentations&&(h=function(e,t){let n={navigate:[],fetch:[]};if(t.forEach((e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}}))),n.navigate.length>0){let t=e.navigate[Z]??e.navigate,r=te(n.navigate,t,((...t)=>{let[n,r]=t;return{to:"number"==typeof n||"string"==typeof n?n:n?m(n):".",...oe(e,r??{})}}));r&&(r[Z]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[Z]??e.fetch,r=te(n.fetch,t,((...t)=>{let[n,,r,o]=t;return{href:r??".",fetcherKey:n,...oe(e,o??{})}}));r&&(r[Z]=t,e.fetch=r)}return e}(h,e.unstable_instrumentations.map((e=>e.router)).filter(Boolean))),h}function xe(e,t,n,r,o,i){let a,c;if(o){a=[];for(let e of t)if(a.push(e),e.route.id===o){c=e;break}}else a=t,c=t[t.length-1];let s=U(r||".",V(a),M(e.pathname,n)||e.pathname,"path"===i);if(null==r&&(s.search=e.search,s.hash=e.hash),(null==r||""===r||"."===r)&&c){let e=mt(s.search);if(c.route.index&&!e)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&e){let e=new URLSearchParams(s.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();s.search=n?`?${n}`:""}}return"/"!==n&&(s.pathname=function({basename:e,pathname:t}){return"/"===t?e:W([e,t])}({basename:n,pathname:s.pathname})),m(s)}function Oe(e,t,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:t};if(n.formMethod&&!pt(n.formMethod))return{path:t,error:et(405,{method:n.formMethod})};let r,o,i=()=>({path:t,error:et(400,{type:"invalid-body"})}),a=(n.formMethod||"get").toUpperCase(),c=nt(t);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!ft(a))return i();let e="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce(((e,[t,n])=>`${e}${t}=${n}\n`),""):String(n.body);return{path:t,submission:{formMethod:a,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!ft(a))return i();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:c,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return i()}}}if(u("function"==typeof FormData,"FormData is not available in this environment"),n.formData)r=Ye(n.formData),o=n.formData;else if(n.body instanceof FormData)r=Ye(n.body),o=n.body;else if(n.body instanceof URLSearchParams)r=n.body,o=$e(r);else if(null==n.body)r=new URLSearchParams,o=new FormData;else try{r=new URLSearchParams(n.body),o=$e(r)}catch(e){return i()}let s={formMethod:a,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(ft(s.formMethod))return{path:t,submission:s};let l=h(t);return e&&l.search&&mt(l.search)&&r.append("index",""),l.search=`?${r}`,{path:m(l),submission:s}}function ke(e,t,n,r,o,i,a,c,s,l,u,d,p,f,m,h,g,y,v,b,w){let x,O=b?ct(b[1])?b[1].error:b[1].data:void 0,k=o.createURL(i.location),A=o.createURL(s);if(u&&i.errors){let e=Object.keys(i.errors)[0];x=a.findIndex((t=>t.route.id===e))}else if(b&&ct(b[1])){let e=b[0];x=a.findIndex((t=>t.route.id===e))-1}let j=b?b[1].statusCode:void 0,E=j&&j>=400,P={currentUrl:k,currentParams:i.matches[0]?.params||{},nextUrl:A,nextParams:a[0].params,...c,actionResult:O,actionStatus:j},T=K(a),D=a.map(((o,a)=>{let{route:c}=o,s=null;if(null!=x&&a>x?s=!1:c.lazy?s=!0:Se(c)?u?s=Ae(c,i.loaderData,i.errors):function(e,t,n){let r=!t||n.route.id!==t.route.id,o=!e.hasOwnProperty(n.route.id);return r||o}(i.loaderData,i.matches[a],o)&&(s=!0):s=!1,null!==s)return Fe(n,r,e,T,o,l,t,s);let p=!1;"boolean"==typeof w?p=w:E?p=!1:(d||k.pathname+k.search===A.pathname+A.search||k.search!==A.search||function(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}(i.matches[a],o))&&(p=!0);let f={...P,defaultShouldRevalidate:p},m=je(o,f);return Fe(n,r,e,T,o,l,t,m,f,w)})),_=[];return m.forEach(((e,c)=>{if(u||!a.some((t=>t.route.id===e.routeId))||f.has(c))return;let s=i.fetchers.get(c),m=s&&"idle"!==s.state&&void 0===s.data,b=S(g,e.path,y);if(!b){if(v&&m)return;return void _.push({key:c,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null})}if(h.has(c))return;let x=ht(b,e.path),O=new AbortController,k=qe(o,e.path,O.signal),A=null;if(p.has(c))p.delete(c),A=He(n,r,k,b,x,l,t);else if(m)d&&(A=He(n,r,k,b,x,l,t));else{let e;e="boolean"==typeof w?w:!E&&d;let o={...P,defaultShouldRevalidate:e};je(x,o)&&(A=He(n,r,k,b,x,l,t,o))}A&&_.push({key:c,routeId:e.routeId,path:e.path,matches:A,match:x,request:k,controller:O})})),{dsMatches:D,revalidatingFetchers:_}}function Se(e){return null!=e.loader||null!=e.middleware&&e.middleware.length>0}function Ae(e,t,n){if(e.lazy)return!0;if(!Se(e))return!1;let r=null!=t&&e.id in t,o=null!=n&&void 0!==n[e.id];return!(!r&&o)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!r&&!o)}function je(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}function Ee(e,t,n,r,o,i){let a;if(e){let t=r[e];u(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),a=t.children}else a=n;let c=[],s=[];if(t.forEach((e=>{let t=a.find((t=>Pe(e,t)));t?s.push({existingRoute:t,newRoute:e}):c.push(e)})),c.length>0){let t=O(c,o,[e||"_","patch",String(a?.length||"0")],r);a.push(...t)}if(i&&s.length>0)for(let e=0;e<s.length;e++){let{existingRoute:t,newRoute:n}=s[e],r=t,[i]=O([n],o,[],{},!0);Object.assign(r,{element:i.element?i.element:r.element,errorElement:i.errorElement?i.errorElement:r.errorElement,hydrateFallbackElement:i.hydrateFallbackElement?i.hydrateFallbackElement:r.hydrateFallbackElement})}}function Pe(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(((e,n)=>t.children?.some((t=>Pe(e,t))))))}var Te=new WeakMap,De=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let o=n[t.id];if(u(o,"No route found in manifest"),!o.lazy||"object"!=typeof o.lazy)return;let i=o.lazy[e];if(!i)return;let a=Te.get(o);a||(a={},Te.set(o,a));let c=a[e];if(c)return c;let s=(async()=>{let t=function(e){return w.has(e)}(e),n=void 0!==o[e]&&"hasErrorBoundary"!==e;if(t)d(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),a[e]=Promise.resolve();else if(n)d(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await i();null!=t&&(Object.assign(o,{[e]:t}),Object.assign(o,r(o)))}"object"==typeof o.lazy&&(o.lazy[e]=void 0,Object.values(o.lazy).every((e=>void 0===e))&&(o.lazy=void 0))})();return a[e]=s,s},_e=new WeakMap;async function Ce(e){let t=e.matches.filter((e=>e.shouldLoad)),n={};return(await Promise.all(t.map((e=>e.resolve())))).forEach(((e,r)=>{n[t[r].route.id]=e})),n}async function Ne(e){return e.matches.some((e=>e.route.middleware))?Ie(e,(()=>Ce(e))):Ce(e)}function Ie(e,t){return Re(e,t,(e=>{if(dt(e))throw e;return e}),ot,(function(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:"error",result:t}}));{let{matches:r}=e,o=Math.min(Math.max(r.findIndex((e=>e.route.id===n)),0),Math.max(r.findIndex((e=>e.shouldCallHandler())),0)),i=Xe(r,r[o].route.id).route.id;return Promise.resolve({[i]:{type:"error",result:t}})}}))}async function Re(e,t,n,r,o){let{matches:i,request:a,params:c,context:s,unstable_pattern:l}=e,u=i.flatMap((e=>e.route.middleware?e.route.middleware.map((t=>[e.route.id,t])):[]));return await Me({request:a,params:c,context:s,unstable_pattern:l},u,t,n,r,o)}async function Me(e,t,n,r,o,i,a=0){let{request:c}=e;if(c.signal.aborted)throw c.signal.reason??new Error(`Request aborted: ${c.method} ${c.url}`);let s=t[a];if(!s){return await n()}let l,[u,d]=s,p=async()=>{if(l)throw new Error("You may only call `next()` once per middleware");try{let c=await Me(e,t,n,r,o,i,a+1);return l={value:c},l.value}catch(e){return l={value:await i(e,u,l)},l.value}};try{let t=await d(e,p),n=null!=t?r(t):void 0;return o(n)?n:l?n??l.value:(l={value:await p()},l.value)}catch(e){return await i(e,u,l)}}function Le(e,t,n,r,o){let i=De({key:"middleware",route:r.route,manifest:t,mapRouteProperties:e}),a=function(e,t,n,r,o){let i=n[e.id];if(u(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=_e.get(i);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{u("function"==typeof e.lazy,"No lazy route function found");let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(void 0===r)continue;let a=(o=e,x.has(o)),c=void 0!==i[e]&&"hasErrorBoundary"!==e;a?d(!a,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):c?d(!c,`Route "${i.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}var o;Object.assign(i,n),Object.assign(i,{...r(i),lazy:void 0})})();return _e.set(i,n),n.catch((()=>{})),{lazyRoutePromise:n,lazyHandlerPromise:n}}let a,c=Object.keys(e.lazy),s=[];for(let i of c){if(o&&o.includes(i))continue;let c=De({key:i,route:e,manifest:n,mapRouteProperties:r});c&&(s.push(c),i===t&&(a=c))}let l=s.length>0?Promise.all(s).then((()=>{})):void 0;return l?.catch((()=>{})),a?.catch((()=>{})),{lazyRoutePromise:l,lazyHandlerPromise:a}}(r.route,ft(n.method)?"action":"loader",t,e,o);return{middleware:i,route:a.lazyRoutePromise,handler:a.lazyHandlerPromise}}function Fe(e,t,n,r,o,i,a,c,s=null,l){let u=!1,d=Le(e,t,n,o,i);return{...o,_lazyPromises:d,shouldLoad:c,shouldRevalidateArgs:s,shouldCallHandler:e=>(u=!0,s?je(o,"boolean"==typeof l?{...s,defaultShouldRevalidate:l}:"boolean"==typeof e?{...s,defaultShouldRevalidate:e}:s):c),resolve(e){let{lazy:t,loader:i,middleware:s}=o.route,l=u||c||e&&!ft(n.method)&&(t||i),p=s&&s.length>0&&!i&&!t;return!l||!ft(n.method)&&p?Promise.resolve({type:"data",result:void 0}):async function({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:r,lazyRoutePromise:o,handlerOverride:i,scopedContext:a}){let c,s,l=ft(e.method),u=l?"action":"loader",d=r=>{let o,c=new Promise(((e,t)=>o=t));s=()=>o(),e.signal.addEventListener("abort",s);let l=o=>"function"!=typeof r?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${u}" [routeId: ${n.route.id}]`)):r({request:e,unstable_pattern:t,params:n.params,context:a},...void 0!==o?[o]:[]),d=(async()=>{try{return{type:"data",result:await(i?i((e=>l(e))):l())}}catch(e){return{type:"error",result:e}}})();return Promise.race([d,c])};try{let t=l?n.route.action:n.route.loader;if(r||o)if(t){let e,[n]=await Promise.all([d(t).catch((t=>{e=t})),r,o]);if(void 0!==e)throw e;c=n}else{await r;let t=l?n.route.action:n.route.loader;if(!t){if("action"===u){let t=new URL(e.url),r=t.pathname+t.search;throw et(405,{method:e.method,pathname:r,routeId:n.route.id})}return{type:"data",result:void 0}}[c]=await Promise.all([d(t),o])}else{if(!t){let t=new URL(e.url);throw et(404,{pathname:t.pathname+t.search})}c=await d(t)}}catch(e){return{type:"error",result:e}}finally{s&&e.signal.removeEventListener("abort",s)}return c}({request:n,unstable_pattern:r,match:o,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:e,scopedContext:a})}}}function He(e,t,n,r,o,i,a,c=null){return r.map((s=>s.route.id!==o.route.id?{...s,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Le(e,t,n,s,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Fe(e,t,n,K(r),s,i,a,!0,c)))}async function ze(e,t,n,r,o,i){n.some((e=>e._lazyPromises?.middleware))&&await Promise.all(n.map((e=>e._lazyPromises?.middleware)));let a={request:t,unstable_pattern:K(n),params:n[0].params,context:o,matches:n},c=i?()=>{throw new Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=a;return Ie(t,(()=>e({...t,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}})))},s=await e({...a,fetcherKey:r,runClientMiddleware:c});try{await Promise.all(n.flatMap((e=>[e._lazyPromises?.handler,e._lazyPromises?.route])))}catch(e){}return s}async function Be(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?null==e.body?null:e.json():e.text()}async function Ve(e){let{result:t,type:n}=e;if(ut(t)){let e;try{e=await Be(t)}catch(e){return{type:"error",error:e}}return"error"===n?{type:"error",error:new J(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:"data",data:e,statusCode:t.status,headers:t.headers}}return"error"===n?lt(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:rt(t),statusCode:G(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:G(t)?t.status:void 0}:lt(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Ue(e,t,n,r,o){let i=e.headers.get("Location");if(u(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!F(i)){let a=r.slice(0,r.findIndex((e=>e.route.id===n))+1);i=xe(new URL(t.url),a,o,i),e.headers.set("Location",i)}return e}function We(e,t,n,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(F(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r);if(o.includes(i.protocol))throw new Error("Invalid redirect location");let a=null!=M(i.pathname,n);if(i.origin===t.origin&&a)return i.pathname+i.search+i.hash}try{let t=r.createURL(e);if(o.includes(t.protocol))throw new Error("Invalid redirect location")}catch(e){}return e}function qe(e,t,n,r){let o=e.createURL(nt(t)).toString(),i={signal:n};if(r&&ft(r.formMethod)){let{formMethod:e,formEncType:t}=r;i.method=e.toUpperCase(),"application/json"===t?(i.headers=new Headers({"Content-Type":t}),i.body=JSON.stringify(r.json)):"text/plain"===t?i.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?i.body=Ye(r.formData):i.body=r.formData}return new Request(o,i)}function Ye(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"==typeof r?r:r.name);return t}function $e(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Je(e,t,n,r=!1,o=!1){let i,a={},c=null,s=!1,l={},d=n&&ct(n[1])?n[1].error:void 0;return e.forEach((n=>{if(!(n.route.id in t))return;let p=n.route.id,f=t[p];if(u(!st(f),"Cannot handle redirect results in processLoaderData"),ct(f)){let t=f.error;if(void 0!==d&&(t=d,d=void 0),c=c||{},o)c[p]=t;else{let n=Xe(e,p);null==c[n.route.id]&&(c[n.route.id]=t)}r||(a[p]=be),s||(s=!0,i=G(f.error)?f.error.status:500),f.headers&&(l[p]=f.headers)}else a[p]=f.data,f.statusCode&&200!==f.statusCode&&!s&&(i=f.statusCode),f.headers&&(l[p]=f.headers)})),void 0!==d&&n&&(c={[n[0]]:d},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:c,statusCode:i||200,loaderHeaders:l}}function Ge(e,t,n,r,o,i){let{loaderData:a,errors:c}=Je(t,n,r);return o.filter((e=>!e.matches||e.matches.some((e=>e.shouldLoad)))).forEach((t=>{let{key:n,match:r,controller:o}=t;if(o&&o.signal.aborted)return;let a=i[n];if(u(a,"Did not find corresponding fetcher result"),ct(a)){let t=Xe(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:a.error}),e.fetchers.delete(n)}else if(st(a))u(!1,"Unhandled fetcher revalidation redirect");else{let t=bt(a.data);e.fetchers.set(n,t)}})),{loaderData:a,errors:c}}function Ke(e,t,n,r){let o=Object.entries(t).filter((([,e])=>e!==be)).reduce(((e,[t,n])=>(e[t]=n,e)),{});for(let i of n){let n=i.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&i.route.loader&&(o[n]=e[n]),r&&r.hasOwnProperty(n))break}return o}function Qe(e){return e?ct(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Xe(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function Ze(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function et(e,{pathname:t,routeId:n,method:r,type:o,message:i}={}){let a="Unknown Server Error",c="Unknown @remix-run/router error";return 400===e?(a="Bad Request",r&&t&&n?c=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:"invalid-body"===o&&(c="Unable to encode submission body")):403===e?(a="Forbidden",c=`Route "${n}" does not match URL "${t}"`):404===e?(a="Not Found",c=`No route matches URL "${t}"`):405===e&&(a="Method Not Allowed",r&&t&&n?c=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(c=`Invalid request method "${r.toUpperCase()}"`)),new J(e||500,a,new Error(c),!0)}function tt(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(st(r))return{key:n,result:r}}}function nt(e){return m({..."string"==typeof e?h(e):e,hash:""})}function rt(e){return new J(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function ot(e){return null!=e&&"object"==typeof e&&Object.entries(e).every((([e,t])=>"string"==typeof e&&it(t)))}function it(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&("data"===e.type||"error"===e.type)}function at(e){return ut(e.result)&&pe.has(e.result.status)}function ct(e){return"error"===e.type}function st(e){return"redirect"===(e&&e.type)}function lt(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function ut(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function dt(e){return ut(e)&&(t=e.status,pe.has(t))&&e.headers.has("Location");var t}function pt(e){return de.has(e.toUpperCase())}function ft(e){return le.has(e.toUpperCase())}function mt(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function ht(e,t){let n="string"==typeof t?h(t).search:t.search;if(e[e.length-1].route.index&&mt(n||""))return e[e.length-1];let r=B(e);return r[r.length-1]}function gt(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(t&&n&&r)return null!=o?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o}:null!=i?{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0}:void 0!==a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}:void 0}function yt(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function vt(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function bt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function wt(){let e,t,n=new Promise(((r,o)=>{e=async e=>{r(e);try{await n}catch(e){}},t=async e=>{o(e);try{await n}catch(e){}}}));return{promise:n,resolve:e,reject:t}}var xt=i.createContext(null);xt.displayName="DataRouter";var Ot=i.createContext(null);Ot.displayName="DataRouterState";var kt=i.createContext(!1);function St(){return i.useContext(kt)}var At=i.createContext({isTransitioning:!1});At.displayName="ViewTransition";var jt=i.createContext(new Map);jt.displayName="Fetchers";var Et=i.createContext(null);Et.displayName="Await";var Pt=i.createContext(null);Pt.displayName="Navigation";var Tt=i.createContext(null);Tt.displayName="Location";var Dt=i.createContext({outlet:null,matches:[],isDataRoute:!1});Dt.displayName="Route";var _t=i.createContext(null);_t.displayName="RouteError";var Ct="REACT_ROUTER_ERROR";function Nt(){return null!=i.useContext(Tt)}function It(){return u(Nt(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(Tt).location}var Rt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Mt(e){i.useContext(Pt).static||i.useLayoutEffect(e)}function Lt(){let{isDataRoute:e}=i.useContext(Dt);return e?function(){let{router:e}=Gt("useNavigate"),t=Qt("useNavigate"),n=i.useRef(!1);return Mt((()=>{n.current=!0})),i.useCallback((async(r,o={})=>{d(n.current,Rt),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))}),[e,t])}():function(){u(Nt(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(xt),{basename:t,navigator:n}=i.useContext(Pt),{matches:r}=i.useContext(Dt),{pathname:o}=It(),a=JSON.stringify(V(r)),c=i.useRef(!1);return Mt((()=>{c.current=!0})),i.useCallback(((r,i={})=>{if(d(c.current,Rt),!c.current)return;if("number"==typeof r)return void n.go(r);let s=U(r,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:W([t,s.pathname])),(i.replace?n.replace:n.push)(s,i.state,i)}),[t,n,a,o,e])}()}i.createContext(null);function Ft(){let{matches:e}=i.useContext(Dt),t=e[e.length-1];return t?t.params:{}}function Ht(e,{relative:t}={}){let{matches:n}=i.useContext(Dt),{pathname:r}=It(),o=JSON.stringify(V(n));return i.useMemo((()=>U(e,JSON.parse(o),r,"path"===t)),[e,o,r,t])}function zt(e,t,n,r,o){u(Nt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=i.useContext(Pt),{matches:c}=i.useContext(Dt),s=c[c.length-1],l=s?s.params:{},p=s?s.pathname:"/",f=s?s.pathnameBase:"/",m=s&&s.route;{let e=m&&m.path||"";nn(p,!m||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let g,y=It();if(t){let e="string"==typeof t?h(t):t;u("/"===f||e.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${e.pathname}" was given in the \`location\` prop.`),g=e}else g=y;let v=g.pathname||"/",b=v;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(e.length).join("/")}let w=S(e,{pathname:b});d(m||null!=w,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),d(null==w||void 0!==w[w.length-1].route.element||void 0!==w[w.length-1].route.Component||void 0!==w[w.length-1].route.lazy,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=$t(w&&w.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:W([f,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:W([f,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])}))),c,n,r,o);return t&&x?i.createElement(Tt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},x):x}function Bt(){let e=Xt(),t=G(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:a},"ErrorBoundary")," or"," ",i.createElement("code",{style:a},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:o},n):null,c)}var Vt=i.createElement(Bt,null),Ut=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${Ct}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new J(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?i.createElement(Dt.Provider,{value:this.props.routeContext},i.createElement(_t.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(qt,{error:e},t):t}};Ut.contextType=kt;var Wt=new WeakMap;function qt({children:e,error:t}){let{basename:n}=i.useContext(Pt);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${Ct}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=Wt.get(t);if(r)throw r;let o=X(e.location,n);if(Q&&!Wt.get(t)){if(!o.isExternal&&!e.reloadDocument){const n=Promise.resolve().then((()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace})));throw Wt.set(t,n),n}window.location.href=o.absoluteURL||o.to}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Yt({routeContext:e,match:t,children:n}){let r=i.useContext(xt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(Dt.Provider,{value:e},n)}function $t(e,t=[],n=null,r=null,o=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let a=e,c=n?.errors;if(null!=c){let e=a.findIndex((e=>e.route.id&&void 0!==c?.[e.route.id]));u(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,l=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||void 0===r[t.route.id]);if(t.route.lazy||o){s=!0,a=l>=0?a.slice(0,l+1):[a[0]];break}}}let d=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:K(n.matches),errorInfo:t})}:void 0;return a.reduceRight(((e,r,o)=>{let u,p=!1,f=null,m=null;n&&(u=c&&r.route.id?c[r.route.id]:void 0,f=r.route.errorElement||Vt,s&&(l<0&&0===o?(nn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):l===o&&(p=!0,m=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,o+1)),g=()=>{let t;return t=u?f:p?m:r.route.Component?i.createElement(r.route.Component,null):r.route.element?r.route.element:e,i.createElement(Yt,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?i.createElement(Ut,{location:n.location,revalidation:n.revalidation,component:f,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:d}):g()}),null)}function Jt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gt(e){let t=i.useContext(xt);return u(t,Jt(e)),t}function Kt(e){let t=i.useContext(Ot);return u(t,Jt(e)),t}function Qt(e){let t=function(e){let t=i.useContext(Dt);return u(t,Jt(e)),t}(e),n=t.matches[t.matches.length-1];return u(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Xt(){let e=i.useContext(_t),t=Kt("useRouteError"),n=Qt("useRouteError");return void 0!==e?e:t.errors?.[n]}var Zt=0;function en(e){let{router:t,basename:n}=Gt("useBlocker"),r=Kt("useBlocker"),[o,a]=i.useState(""),c=i.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===n)return e(t);let{currentLocation:r,nextLocation:o,historyAction:i}=t;return e({currentLocation:{...r,pathname:M(r.pathname,n)||r.pathname},nextLocation:{...o,pathname:M(o.pathname,n)||o.pathname},historyAction:i})}),[n,e]);return i.useEffect((()=>{let e=String(++Zt);return a(e),()=>t.deleteBlocker(e)}),[t]),i.useEffect((()=>{""!==o&&t.getBlocker(o,c)}),[t,o,c]),o&&r.blockers.has(o)?r.blockers.get(o):ge}var tn={};function nn(e,t,n){t||tn[e]||(tn[e]=!0,d(!1,n))}var rn={};function on(e,t){e||rn[t]||(rn[t]=!0,console.warn(t))}var an=(r||(r=n.t(i,2))).useOptimistic,cn=()=>{};function sn(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(e.element&&d(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:i.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&d(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:i.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&d(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:i.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var ln=["HydrateFallback","hydrateFallbackElement"];var un=class{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}};function dn({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){let o=St();r=o||r;let[a,c]=i.useState(e.state),[s,l]=(u=a,an?an(u):[u,cn]);var u;let[d,p]=i.useState(),[f,m]=i.useState({isTransitioning:!1}),[h,g]=i.useState(),[y,v]=i.useState(),[b,w]=i.useState(),x=i.useRef(new Map),O=i.useCallback(((o,{deletedFetchers:a,newErrors:s,flushSync:u,viewTransitionOpts:d})=>{s&&n&&Object.values(s).forEach((e=>n(e,{location:o.location,params:o.matches[0]?.params??{},unstable_pattern:K(o.matches)}))),o.fetchers.forEach(((e,t)=>{void 0!==e.data&&x.current.set(t,e.data)})),a.forEach((e=>x.current.delete(e))),on(!1===u||null!=t,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let f=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(on(null==d||f,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),d&&f){if(t&&u){t((()=>{y&&(h?.resolve(),y.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:d.currentLocation,nextLocation:d.nextLocation})}));let n=e.window.document.startViewTransition((()=>{t((()=>c(o)))}));return n.finished.finally((()=>{t((()=>{g(void 0),v(void 0),p(void 0),m({isTransitioning:!1})}))})),void t((()=>v(n)))}y?(h?.resolve(),y.skipTransition(),w({state:o,currentLocation:d.currentLocation,nextLocation:d.nextLocation})):(p(o),m({isTransitioning:!0,flushSync:!1,currentLocation:d.currentLocation,nextLocation:d.nextLocation}))}else t&&u?t((()=>c(o))):!1===r?c(o):i.startTransition((()=>{!0===r&&l((e=>pn(e,o))),c(o)}))}),[e.window,t,y,h,r,l,n]);i.useLayoutEffect((()=>e.subscribe(O)),[e,O]),i.useEffect((()=>{f.isTransitioning&&!f.flushSync&&g(new un)}),[f]),i.useEffect((()=>{if(h&&d&&e.window){let t=d,n=h.promise,o=e.window.document.startViewTransition((async()=>{!1===r?c(t):i.startTransition((()=>{!0===r&&l((e=>pn(e,t))),c(t)})),await n}));o.finished.finally((()=>{g(void 0),v(void 0),p(void 0),m({isTransitioning:!1})})),v(o)}}),[d,h,e.window,r,l]),i.useEffect((()=>{h&&d&&s.location.key===d.location.key&&h.resolve()}),[h,y,s.location,d]),i.useEffect((()=>{!f.isTransitioning&&b&&(p(b.state),m({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),w(void 0))}),[f.isTransitioning,b]);let k=i.useMemo((()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})})),[e]),S=e.basename||"/",A=i.useMemo((()=>({router:e,navigator:k,static:!1,basename:S,onError:n})),[e,k,S,n]);return i.createElement(i.Fragment,null,i.createElement(xt.Provider,{value:A},i.createElement(Ot.Provider,{value:s},i.createElement(jt.Provider,{value:x.current},i.createElement(At.Provider,{value:f},i.createElement(gn,{basename:S,location:s.location,navigationType:s.historyAction,navigator:k,unstable_useTransitions:r},i.createElement(fn,{routes:e.routes,future:e.future,state:s,onError:n})))))),null)}function pn(e,t){return{...e,navigation:"idle"!==t.navigation.state?t.navigation:e.navigation,revalidation:"idle"!==t.revalidation?t.revalidation:e.revalidation,actionData:"submitting"!==t.navigation.state?t.actionData:e.actionData,fetchers:t.fetchers}}var fn=i.memo((function({routes:e,future:t,state:n,onError:r}){return zt(e,void 0,n,r,t)}));function mn({to:e,replace:t,state:n,relative:r}){u(Nt(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=i.useContext(Pt);d(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=i.useContext(Dt),{pathname:c}=It(),s=Lt(),l=U(e,V(a),c,"path"===r),p=JSON.stringify(l);return i.useEffect((()=>{s(JSON.parse(p),{replace:t,state:n,relative:r})}),[s,p,r,t,n]),null}function hn(e){u(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function gn({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,unstable_useTransitions:c}){u(!Nt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=i.useMemo((()=>({basename:s,navigator:o,static:a,unstable_useTransitions:c,future:{}})),[s,o,a,c]);"string"==typeof n&&(n=h(n));let{pathname:p="/",search:f="",hash:m="",state:g=null,key:y="default"}=n,v=i.useMemo((()=>{let e=M(p,s);return null==e?null:{location:{pathname:e,search:f,hash:m,state:g,key:y},navigationType:r}}),[s,p,f,m,g,y,r]);return d(null!=v,`<Router basename="${s}"> is not able to match the URL "${p}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),null==v?null:i.createElement(Pt.Provider,{value:l},i.createElement(Tt.Provider,{children:t,value:v}))}function yn({children:e,location:t}){return zt(vn(e),t)}i.Component;function vn(e,t=[]){let n=[];return i.Children.forEach(e,((e,r)=>{if(!i.isValidElement(e))return;let o=[...t,r];if(e.type===i.Fragment)return void n.push.apply(n,vn(e.props.children,o));u(e.type===hn,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),u(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=vn(e.props.children,o)),n.push(a)})),n}var bn="get",wn="application/x-www-form-urlencoded";function xn(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var On=null;var kn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Sn(e){return null==e||kn.has(e)?e:(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wn}"`),null)}function An(e,t){let n,r,o,i,a;if(xn(c=e)&&"form"===c.tagName.toLowerCase()){let a=e.getAttribute("action");r=a?M(a,t):null,n=e.getAttribute("method")||bn,o=Sn(e.getAttribute("enctype"))||wn,i=new FormData(e)}else if(function(e){return xn(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return xn(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||a.getAttribute("action");if(r=c?M(c,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||bn,o=Sn(e.getAttribute("formenctype"))||Sn(a.getAttribute("enctype"))||wn,i=new FormData(a,e),!function(){if(null===On)try{new FormData(document.createElement("form"),0),On=!1}catch(e){On=!0}return On}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,r)}}else{if(xn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=bn,r=null,o=wn,a=e}var c;return i&&"text/plain"===o&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis;function jn(e,t){if(!1===e||null==e)throw new Error(t)}Symbol("SingleFetchRedirect");function En(e,t,n,r){let o="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:"/"===o.pathname?o.pathname=`_root.${r}`:t&&"/"===M(o.pathname,t)?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function Pn(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}function Tn(e){return null!=e&&"string"==typeof e.page}function Dn(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function _n(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,c=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===i?t.filter(((e,t)=>a(e,t)||c(e,t))):"data"===i?t.filter(((t,i)=>{let s=r.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(a(t,i)||c(t,i))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0})):[]}function Cn(e,t,{includeHydrateFallback:n}={}){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o})).flat(1),[...new Set(r)];var r}function Nn(e,t){let n=new Set,r=new Set(t);return e.reduce(((e,o)=>{if(t&&!Tn(o)&&"script"===o.as&&o.href&&r.has(o.href))return e;let i=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(o));return n.has(i)||(n.add(i),e.push({key:i,link:o})),e}),[])}function In(e,t){return"lazy"===e.mode&&!0===t}function Rn(){let e=i.useContext(xt);return jn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Mn(){let e=i.useContext(Ot);return jn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ln=i.createContext(void 0);function Fn(){let e=i.useContext(Ln);return jn(e,"You must render this element inside a <HydratedRouter> element"),e}function Hn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function zn(e,t,n){if(n&&!Wn)return[e[0]];if(t){let n=e.findIndex((e=>void 0!==t[e.route.id]));return e.slice(0,n+1)}return e}Ln.displayName="FrameworkContext";function Bn({page:e,...t}){let{router:n}=Rn(),r=i.useMemo((()=>S(n.routes,e,n.basename)),[n.routes,e,n.basename]);return r?i.createElement(Un,{page:e,matches:r,...t}):null}function Vn(e){let{manifest:t,routeModules:n}=Fn(),[r,o]=i.useState([]);return i.useEffect((()=>{let r=!1;return async function(e,t,n){return Nn((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await Pn(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(Dn).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}(e,t,n).then((e=>{r||o(e)})),()=>{r=!0}}),[e,t,n]),r}function Un({page:e,matches:t,...n}){let r=It(),{future:o,manifest:a,routeModules:c}=Fn(),{basename:s}=Rn(),{loaderData:l,matches:u}=Mn(),d=i.useMemo((()=>_n(e,t,u,a,r,"data")),[e,t,u,a,r]),p=i.useMemo((()=>_n(e,t,u,a,r,"assets")),[e,t,u,a,r]),f=i.useMemo((()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,i=!1;if(t.forEach((e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!d.some((t=>t.route.id===e.route.id))&&e.route.id in l&&c[e.route.id]?.shouldRevalidate||t.hasClientLoader?i=!0:n.add(e.route.id))})),0===n.size)return[];let u=En(e,s,o.unstable_trailingSlashAwareDataRequests,"data");return i&&n.size>0&&u.searchParams.set("_routes",t.filter((e=>n.has(e.route.id))).map((e=>e.route.id)).join(",")),[u.pathname+u.search]}),[s,o.unstable_trailingSlashAwareDataRequests,l,r,a,d,t,e,c]),m=i.useMemo((()=>Cn(p,a)),[p,a]),h=Vn(p);return i.createElement(i.Fragment,null,f.map((e=>i.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n}))),m.map((e=>i.createElement("link",{key:e,rel:"modulepreload",href:e,...n}))),h.map((({key:e,link:t})=>i.createElement("link",{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin}))))}var Wn=!1;function qn(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:o,routeDiscovery:a,ssr:c}=Fn(),{router:s,static:l,staticContext:u}=Rn(),{matches:d}=Mn(),p=St(),f=In(a,c);o&&(o.didRenderScripts=!0);let m=zn(d,null,r);i.useEffect((()=>{0}),[]);let h=i.useMemo((()=>{if(p)return null;let r=u?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",o=l?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${f?"":`import ${JSON.stringify(t.url)}`};\n${m.map(((e,n)=>{let r=`route${n}`,o=t.routes[e.route.id];jn(o,`Route ${e.route.id} not found in manifest`);let{clientActionModule:i,clientLoaderModule:a,clientMiddlewareModule:c,hydrateFallbackModule:s,module:l}=o,u=[...i?[{module:i,varName:`${r}_clientAction`}]:[],...a?[{module:a,varName:`${r}_clientLoader`}]:[],...c?[{module:c,varName:`${r}_clientMiddleware`}]:[],...s?[{module:s,varName:`${r}_HydrateFallback`}]:[],{module:l,varName:`${r}_main`}];return 1===u.length?`import * as ${r} from ${JSON.stringify(l)};`:[u.map((e=>`import * as ${e.varName} from "${e.module}";`)).join("\n"),`const ${r} = {${u.map((e=>`...${e.varName}`)).join(",")}};`].join("\n")})).join("\n")}\n ${f?`window.__reactRouterManifest = ${JSON.stringify(function({sri:e,...t},n){let r=new Set(n.state.matches.map((e=>e.route.id))),o=n.state.location.pathname.split("/").filter(Boolean),i=["/"];for(o.pop();o.length>0;)i.push(`/${o.join("/")}`),o.pop();i.forEach((e=>{let t=S(n.routes,e,n.basename);t&&t.forEach((e=>r.add(e.route.id)))}));let a=[...r].reduce(((e,n)=>Object.assign(e,{[n]:t.routes[n]})),{});return{...t,routes:a,sri:!!e||void 0}}(t,s),null,2)};`:""}\n window.__reactRouterRouteModules = {${m.map(((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`)).join(",")}};\n\nimport(${JSON.stringify(t.entry.module)});`:" ";return i.createElement(i.Fragment,null,i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:void 0}),i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:o},type:"module",async:!0}))}),[]),g=Wn||p?[]:(t.entry.imports.concat(Cn(m,t,{includeHydrateFallback:!0})),[...new Set(y)]);var y;let v="object"==typeof t.sri?t.sri:{};return on(!p,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),Wn||p?null:i.createElement(i.Fragment,null,"object"==typeof t.sri?i.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:v})}}):null,f?null:i.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:v[t.url],suppressHydrationWarning:!0}),i.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:v[t.entry.module],suppressHydrationWarning:!0}),g.map((t=>i.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:v[t],suppressHydrationWarning:!0}))),h)}function Yn(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}i.Component;function $n({error:e,isOutsideRemixApp:t}){console.error(e);let n,r=i.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."\n );\n '}});if(G(e))return i.createElement(Jn,{title:"Unhandled Thrown Response!"},i.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);if(e instanceof Error)0;else{let t=null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e);new Error(t)}return i.createElement(Jn,{title:"Application Error!",isOutsideRemixApp:t},i.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),i.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),r)}function Jn({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:o}=Fn();return o.root?.Layout&&!n?r:i.createElement("html",{lang:"en"},i.createElement("head",null,i.createElement("meta",{charSet:"utf-8"}),i.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),i.createElement("title",null,e)),i.createElement("body",null,i.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},r,t?i.createElement(qn,null):null)))}var Gn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Gn&&(window.__reactRouterVersion="7.13.0")}catch(e){}function Kn(e,t){return we({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:l({window:t?.window}),hydrationData:t?.hydrationData||Qn(),routes:e,mapRouteProperties:sn,hydrationRouteProperties:ln,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function Qn(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Xn(e.errors)}),e}function Xn(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&"RouteErrorResponse"===r.__type)n[e]=new J(r.status,r.statusText,r.data,!0===r.internal);else if(r&&"Error"===r.__type){if(r.__subType){let t=window[r.__subType];if("function"==typeof t)try{let o=new t(r.message);o.stack="",n[e]=o}catch(e){}}if(null==n[e]){let t=new Error(r.message);t.stack="",n[e]=t}}else n[e]=r;return n}var Zn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,er=i.forwardRef((function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:o,replace:a,state:c,target:s,to:l,preventScrollReset:d,viewTransition:p,unstable_defaultShouldRevalidate:f,...h},g){let{basename:y,unstable_useTransitions:v}=i.useContext(Pt),b="string"==typeof l&&Zn.test(l),w=X(l,y),x=function(e,{relative:t}={}){u(Nt(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=i.useContext(Pt),{hash:o,pathname:a,search:c}=Ht(e,{relative:t}),s=a;return"/"!==n&&(s="/"===a?n:W([n,a])),r.createHref({pathname:s,search:c,hash:o})}(l=w.to,{relative:r}),[O,k,S]=function(e,t){let n=i.useContext(Ln),[r,o]=i.useState(!1),[a,c]=i.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:p}=t,f=i.useRef(null);i.useEffect((()=>{if("render"===e&&c(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{c(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[e]),i.useEffect((()=>{if(r){let e=setTimeout((()=>{c(!0)}),100);return()=>{clearTimeout(e)}}}),[r]);let m=()=>{o(!0)},h=()=>{o(!1),c(!1)};return n?"intent"!==e?[a,f,{}]:[a,f,{onFocus:Hn(s,m),onBlur:Hn(l,h),onMouseEnter:Hn(u,m),onMouseLeave:Hn(d,h),onTouchStart:Hn(p,m)}]:[!1,f,{}]}(n,h),A=function(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:c,unstable_defaultShouldRevalidate:s,unstable_useTransitions:l}={}){let u=Lt(),d=It(),p=Ht(e,{relative:a});return i.useCallback((f=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(f,t)){f.preventDefault();let t=void 0!==n?n:m(d)===m(p),h=()=>u(e,{replace:t,state:r,preventScrollReset:o,relative:a,viewTransition:c,unstable_defaultShouldRevalidate:s});l?i.startTransition((()=>h())):h()}}),[d,u,p,n,r,t,e,o,a,c,s,l])}(l,{replace:a,state:c,target:s,preventScrollReset:d,relative:r,viewTransition:p,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});let j=i.createElement("a",{...h,...S,href:w.absoluteURL||x,onClick:w.isExternal||o?e:function(t){e&&e(t),t.defaultPrevented||A(t)},ref:Yn(g,k),target:s,"data-discover":b||"render"!==t?void 0:"true"});return O&&!b?i.createElement(i.Fragment,null,j,i.createElement(Bn,{page:x})):j}));er.displayName="Link",i.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:o,to:a,viewTransition:c,children:s,...l},d){let p=Ht(a,{relative:l.relative}),f=It(),m=i.useContext(Ot),{navigator:h,basename:g}=i.useContext(Pt),y=null!=m&&function(e,{relative:t}={}){let n=i.useContext(At);u(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=rr("useViewTransitionState"),o=Ht(e,{relative:t});if(!n.isTransitioning)return!1;let a=M(n.currentLocation.pathname,r)||n.currentLocation.pathname,c=M(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=N(o.pathname,c)||null!=N(o.pathname,a)}(p)&&!0===c,v=h.encodeLocation?h.encodeLocation(p).pathname:p.pathname,b=f.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;t||(b=b.toLowerCase(),w=w?w.toLowerCase():null,v=v.toLowerCase()),w&&g&&(w=M(w,g)||w);const x="/"!==v&&v.endsWith("/")?v.length-1:v.length;let O,k=b===v||!r&&b.startsWith(v)&&"/"===b.charAt(x),S=null!=w&&(w===v||!r&&w.startsWith(v)&&"/"===w.charAt(v.length)),A={isActive:k,isPending:S,isTransitioning:y},j=k?e:void 0;O="function"==typeof n?n(A):[n,k?"active":null,S?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof o?o(A):o;return i.createElement(er,{...l,"aria-current":j,className:O,ref:d,style:E,to:a,viewTransition:c},"function"==typeof s?s(A):s)})).displayName="NavLink";var tr=i.forwardRef((({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:c=bn,action:s,onSubmit:l,relative:d,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:h,...g},y)=>{let{unstable_useTransitions:v}=i.useContext(Pt),b=ir(),w=function(e,{relative:t}={}){let{basename:n}=i.useContext(Pt),r=i.useContext(Dt);u(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...Ht(e||".",{relative:t})},c=It();if(null==e){a.search=c.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();a.search=n?`?${n}`:""}}e&&"."!==e||!o.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(a.pathname="/"===a.pathname?n:W([n,a.pathname]));return m(a)}(s,{relative:d}),x="get"===c.toLowerCase()?"get":"post",O="string"==typeof s&&Zn.test(s);return i.createElement("form",{ref:y,method:x,action:w,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute("formmethod")||c,u=()=>b(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:o,state:a,relative:d,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:h});v&&!1!==n?i.startTransition((()=>u())):u()},...g,"data-discover":O||"render"!==e?void 0:"true"})}));function nr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rr(e){let t=i.useContext(xt);return u(t,nr(e)),t}tr.displayName="Form";var or=0;function ir(){let{router:e}=rr("useSubmit"),{basename:t}=i.useContext(Pt),n=Qt("useRouteId"),r=e.fetch,o=e.navigate;return i.useCallback((async(e,i={})=>{let{action:a,method:c,encType:s,formData:l,body:u}=An(e,t);if(!1===i.navigate){let e=i.fetcherKey||`__${String(++or)}__`;await r(e,n,i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||c,formEncType:i.encType||s,flushSync:i.flushSync})}else await o(i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||c,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[r,o,t,n])}},77987(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:()=>r})},88097(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{A:()=>r})},65166(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},47029(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(88097);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},35412(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{A:()=>r})},2482(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(25134);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(e,t)||(0,r.A)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},65710(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},25134(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(77987);function o(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},14644(e,t,n){"use strict";function r(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}n.d(t,{HY:()=>l,Qd:()=>c,Tw:()=>f,Zz:()=>p,ve:()=>m,y$:()=>s,zH:()=>d});var o=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),i=()=>Math.random().toString(36).substring(7).split("").join("."),a={INIT:`@@redux/INIT${i()}`,REPLACE:`@@redux/REPLACE${i()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${i()}`};function c(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function s(e,t,n){if("function"!=typeof e)throw new Error(r(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(r(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(r(1));return n(s)(e,t)}let i=e,l=t,u=new Map,d=u,p=0,f=!1;function m(){d===u&&(d=new Map,u.forEach(((e,t)=>{d.set(t,e)})))}function h(){if(f)throw new Error(r(3));return l}function g(e){if("function"!=typeof e)throw new Error(r(4));if(f)throw new Error(r(5));let t=!0;m();const n=p++;return d.set(n,e),function(){if(t){if(f)throw new Error(r(6));t=!1,m(),d.delete(n),u=null}}}function y(e){if(!c(e))throw new Error(r(7));if(void 0===e.type)throw new Error(r(8));if("string"!=typeof e.type)throw new Error(r(17));if(f)throw new Error(r(9));try{f=!0,l=i(l,e)}finally{f=!1}return(u=d).forEach((e=>{e()})),e}y({type:a.INIT});return{dispatch:y,subscribe:g,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw new Error(r(10));i=e,y({type:a.REPLACE})},[o]:function(){const e=g;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(r(11));function n(){const e=t;e.next&&e.next(h())}n();return{unsubscribe:e(n)}},[o](){return this}}}}}function l(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];0,"function"==typeof e[o]&&(n[o]=e[o])}const o=Object.keys(n);let i;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:a.INIT}))throw new Error(r(12));if(void 0===n(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error(r(13))}))}(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1;const c={};for(let i=0;i<o.length;i++){const s=o[i],l=n[s],u=e[s],d=l(u,t);if(void 0===d){t&&t.type;throw new Error(r(14))}c[s]=d,a=a||d!==u}return a=a||o.length!==Object.keys(e).length,a?c:e}}function u(e,t){return function(...n){return t(e.apply(this,n))}}function d(e,t){if("function"==typeof e)return u(e,t);if("object"!=typeof e||null===e)throw new Error(r(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=u(o,t))}return n}function p(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function f(...e){return t=>(n,o)=>{const i=t(n,o);let a=()=>{throw new Error(r(15))};const c={getState:i.getState,dispatch:(e,...t)=>a(e,...t)},s=e.map((e=>e(c)));return a=p(...s)(i.dispatch),{...i,dispatch:a}}}function m(e){return c(e)&&"type"in e&&"string"==typeof e.type}}},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=a,s.amdD=function(){throw new Error("define cannot be used indirect")},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var o=Object.create(null);s.r(o);var i={};n=n||[null,r({}),r([]),r(r)];for(var a=2&t&&e;("object"==typeof a||"function"==typeof a)&&!~n.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,s.d(o,i),o},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>"chunk-"+({1262:"html-editor",1556:"docs-actions",3722:"code-editor",4310:"vendor-fontawesome",4672:"phone-formatter",6916:"vendor-icons",9222:"vendor-libphonenumber-js"}[e]||e)+"."+{8:"dc74b5023d8e5afd73dd",9:"cda2d5683182f50fed87",12:"c7e1a557a2c60b309831",47:"04d2452de4f7ad54f818",117:"608566115bf09889f71f",132:"61735580ea487aa78c8e",152:"27cb0ecfff5ecbb6bb1c",174:"2680fe0b76731806a396",240:"8c49b2d3346a66e8e8d7",262:"6a24e83a83e039b6941f",270:"3e66c444891a168e1106",311:"a450d6ae559e3e50c064",316:"aaea3fb02ddd615e8d6a",335:"ae3402eab9ec7842f677",360:"8903dc5758bbc1b87345",395:"9adf5cd0dbc9d5840620",426:"21bea2aee5a564649d5f",454:"888167003cc5e66783b9",470:"4e4ca02865202e120c58",471:"40f831ce2a402a86f873",472:"9159bf8fc7bf2f8c84d5",486:"2ccae6818e60876d0595",499:"f99c19b661362b0da80b",526:"cc8f4ad53f85f0d3eb72",566:"da7fcb4f14beec0e0351",569:"3ef1f6b7249c3cf286e0",592:"0c3a90b811cdba608d54",616:"46eae72f3f086727e5eb",638:"a1c14d203472a483c09f",655:"d548f47decb1b11d086c",659:"6d5e7e456ea7ff0b5ae2",662:"8454b52823a6f29d8ccd",667:"ffc8fa2cd8610a853e68",721:"e16ced8978fae5c79d66",724:"c3aafeb066d426cd86fc",731:"e0b9b38e50b9b043b7b3",766:"962952b53a24a6cff1fc",824:"c026d955719056cf6425",830:"d5d147ac7938e497a233",846:"bbd1c90205781d078485",850:"7870d63b390aa0fdbe84",871:"47133d250320ec7c2ff6",897:"7acf3ba0d7738e388546",902:"7b0259b56a319db30a08",910:"f14e43746928481ecdd2",975:"232d623885579cd2357a",996:"26215b868008edcb125c",997:"2bf5908a9598f3ee4279",1001:"9e32bb4b864ac72f6533",1004:"d913f123eea03657c830",1056:"b23ca4f8e74af8cdd06f",1057:"cb5a61370696c63c5148",1060:"99dacd2abbdca3bb38e9",1075:"64b74d9ce5ae01a53d40",1079:"4135c95f363a733ab330",1131:"b839529c15e86b29641b",1137:"00110f65b78609797b8a",1150:"d2133ac254c62d88985f",1170:"950fec13eea52781bee2",1183:"17e980038349a83c1cf7",1199:"7f68e9cf83e71e7edf76",1201:"764337c3c638a9f80a12",1207:"d5314e9783a34137ef5b",1211:"3cc37729ace241f1d01f",1216:"fbfa8277018c2b87afde",1221:"ed68686d7d23ce0ee517",1234:"5fb3da1be5b63909f4e8",1239:"60ec850fc2dd997ccd3c",1255:"83d22c57f41db0d920e7",1262:"cb2bf3c96145c7694ee3",1281:"8daa1a51f7875c351ea7",1287:"d28433cc06794e5f6547",1289:"7faa9225b52760ef0c58",1293:"75be7364f425a604c2b1",1305:"671c4ed971a16fd787fa",1316:"6a7bff798e63e88300be",1323:"891953b55c7eefe434b6",1325:"bbde5b0f9bd1130cefbd",1328:"488128bb7c5f6f2cbaa7",1344:"5e7390dd0500eba8cfbe",1361:"43f402c8da36f082786e",1450:"31997e89439640d217e2",1496:"15fb74628cee24c6cb22",1507:"f756a5f77291e50ed8ad",1532:"6aa3c51bf9de1ddbb9e8",1534:"06e71eeef49d378ddc23",1556:"7ef526d0ea915d5a387e",1570:"3b6001894270bbea6372",1594:"9d6bdef5a6b7f0ac2369",1600:"b66bccc4f42feda96ece",1655:"0cf131f6f133c8afd4da",1657:"3497423475623d6c6c41",1678:"eeed150ed7cd5c5b75c6",1702:"421d51a0404622304424",1723:"ecefa86d5079c4c8a530",1742:"40d5244a6568f41afea6",1766:"067f455a3e5bf29333ee",1777:"1bdb9c519105a917ada6",1788:"6f4abd1eb13463d60246",1835:"b52521eae7c389c18188",1841:"0b2620d223584b223007",1842:"e831633c7a32adfb745c",1843:"dee8cc7a9ad97daa4fa7",1852:"1e79ea4ad1a799723d41",1858:"fb86f75c135f6042db7b",1901:"10c24f691fbaed85b171",1951:"448c0853f11c3257457f",1958:"b2c69a836232f6833287",2012:"19759f4c3a4eb1a9e3a4",2030:"8b5030655f1556e9929c",2045:"d01a79d54981cdeeb195",2049:"8c991a460980d8e246a8",2067:"2cd2d54d51b4e522c285",2070:"0c4cf343db099f02af2e",2115:"eb1f6144eca85ba591ed",2174:"26c0271e62f93113eb28",2206:"9ddb2d21ca5ab47e2ca7",2246:"bad4bcec8effdb12ae69",2283:"89212ee60cb3e0098422",2308:"d54be3ced75aabbf3ab2",2327:"1db90c3420248799975f",2361:"33c8672a64a00889aa1e",2376:"a052a0b3e5cd2b484d60",2422:"35a931d03650496bbbce",2429:"64f95d5f086468141db4",2451:"6bcc39d15da6e3c73b95",2456:"b999643c556d401b5dd4",2459:"c253c8904f3122880103",2482:"a0b27df60f20cb223be4",2496:"46dea332df0db94bde14",2499:"848fb5fde07b1c57b3a2",2521:"9663e317772f28422b36",2540:"d70d987ff27b3a02ee92",2544:"e403e94e4c24c908c7ce",2555:"4f0f7c237d71ee2010dd",2575:"95bd2c96f5599ccb59fe",2584:"d0191010eedb83957285",2586:"6659132182d0d2087ecd",2602:"d86abbf0f83d3dafed65",2628:"6753f1b90ffd581d779d",2632:"1718896aa855ce5f3318",2657:"c79eae34d456bc621fd7",2682:"fcca3eec16a2c1557bcb",2725:"2151014ecf7699d8b2c1",2797:"dbfa1bf0564c5a7097a1",2823:"cf59e7e82b3fafbccea8",2887:"47b37be7a2e1b61912a6",2954:"70bfe8bf938607c79182",2969:"e787aaf50e417e1fed1d",2981:"cdb3f215bbaaf7af023d",3031:"59185bda2b2c394b288b",3081:"f5211bf83b8eb8506cd1",3082:"150c90a99b322a5e329e",3093:"c250bec93881e9e8d579",3097:"c3db504f1b2dbaf36657",3102:"35e0af0b3bec04075079",3103:"32929f61274bb24480ed",3112:"bd8946bb6c7f8a21d1b3",3120:"0218686ce90bbbe79323",3124:"25b1aaa4f2bb35772121",3135:"7f98e9c20079b361c0d3",3136:"48d7f7236adf8a2059e2",3158:"dcd24b8dbaf4ba649008",3171:"93b05bd37a86e49ffc9a",3204:"a05a55798f6505178c31",3206:"dc8cd1e48f5a57cb6e3c",3226:"2ef98854a52cedbd32f9",3227:"ac6ccb6a3ed692e4a9fc",3236:"43324efd2dd713922535",3257:"def4fd94dd245b7986ea",3282:"febefc3e39f8cf4ab072",3317:"e81d76efbf3cbf08d044",3330:"307bb432cc38a15ad806",3366:"e97e0eaa2a40fc9ddebb",3369:"de60518167de564ef740",3407:"2e65fb4da8ce9316db01",3419:"9f0edba375c66708d282",3425:"209d966c927ab55f2d24",3433:"6fb6f738bd97fe94497b",3452:"d5a76c249e29c6482cfa",3459:"5a6a90aed9b68513de38",3471:"04531b97be3cef5772d7",3477:"181873abfc7953f46674",3489:"4b3d4d38af8b5781ed09",3498:"8b2676ce13c3ca883abc",3500:"28857ddc3b23a256e71f",3534:"420fabed693e6c4a27ea",3537:"626445aef81884b8ab78",3610:"4ecb8b2b9f0f713f7699",3611:"1ad7e771cb32402281f1",3622:"3ae422d0c3623d5bb157",3636:"fcf91ad6794ef0a9adc8",3688:"ec6bbf9a5287d429ec27",3722:"a2fc6c72cd30c4dcceb7",3767:"9954d4d50daee62fb5b6",3780:"c737f82d871390344c74",3781:"a10eb2b9e49678b39dc3",3840:"2c32d0f09aafda7cda1e",3951:"9c9c928a3fa747fd03fc",3985:"cb5cb4bb6a5023d65775",4025:"81d84d79a6a2c4233707",4048:"ca91ecf3be19f3ce49ce",4108:"b5d832e87e629fd3560a",4139:"99d7d1949ffe57ea3fbb",4142:"305f3a942ae7abf677fe",4163:"2c34719c2a4df26023a9",4176:"fe690959bafc5836d9b3",4190:"abc96a514032b4fc9db1",4194:"7142c28d5502f5bfecfe",4224:"c7d007cb06e1597a4565",4286:"73198475cee4b1b2de94",4291:"37935d5ceeff4310bfb5",4309:"5e1908da274aeed0079a",4310:"bba2a08aac9ae10e119c",4330:"f7098c010a531a82736b",4364:"0a58de6ad175c07ce07b",4413:"f20a9c4217b71b8ade83",4417:"a3b5ea20f3be7ba374f3",4420:"54035e9b2e0396bad338",4442:"6783eb196935cb95496b",4443:"0d19d67d8117081bd0da",4490:"272a41d2ea7fe5232caa",4499:"7ac8b374b18928df7b45",4506:"b3ea614489308f911cb3",4522:"6b48b1bc0d5712a541fc",4527:"829b67e814a2b44b8d22",4556:"93c8e7500a8ab12d8126",4565:"e4188b71ab7e9be44b2f",4567:"fbd9a1bfc1918aaafba8",4570:"2c3f2549656912ff552b",4586:"bab03835028735f99721",4619:"11ac11a3d498f9a2eaee",4625:"d978f6c9c636e1e8c0cb",4660:"bd295770d7013dc28887",4663:"b623d1a409c2677fadf7",4672:"4267d0284a03b65fd0c5",4675:"e789af20b8b40a739fce",4678:"bdc5d57f5b927abb8094",4753:"1ed6623e920783d7fa48",4788:"4690d74f4dd99bf1c62c",4817:"58a33ea7fd257ac63526",4854:"1b033b21fc7ed316543e",4869:"735d7b5553c782b9d251",4879:"eb27203d2463ba6fe66e",4916:"396358e1c8bab7fabb9f",4958:"c26aab9c32ce6a1f2e20",4973:"3814c7fe1b48d068d8a2",5009:"3bd644970e5dc25791f8",5010:"59a49b5869cd84d21104",5011:"b1c502f46240f90f0183",5025:"741ccf79c2eeb5585e27",5028:"e33f497e0ade9fdbf476",5029:"796d923ef1474faeb574",5042:"0b71232715699819b119",5085:"d1808a98f887859d487f",5111:"2bcb8363a78a82736c2a",5113:"1ecd75b82f4a76b2f8e1",5173:"48afdd258546d72e26b1",5181:"c0d7ad55c63c177e4f40",5197:"5fbf2d706a84eebf3b97",5202:"df6a6a73f821cd8493a7",5208:"c4c187bab0c5c7c1b52f",5209:"b2fecf11679c65500f7a",5243:"57cecf960c5552a0152d",5263:"b85fa806aa6b7c87d608",5318:"396f6cabbe96ccb934fc",5391:"9d4610171ab415304092",5395:"e6aa44ce34755531597a",5399:"5512d8cf29ae1884053a",5408:"4e62eb2a8492e602954a",5438:"4c072cb7d56dd6c676e3",5477:"6e41cd48392c35efeef1",5481:"738aeb3a76d2350ed42b",5559:"f6f2ab5064bd44ced838",5575:"f1e6c0162bcb9855f147",5587:"1a11377f01d86234ad92",5631:"bcc7b51d3b30bcbfeaba",5637:"0160e686856ac8c1eef6",5677:"7631e4d3d9bd2a0c73fd",5692:"1e6a1002dab6e822b354",5734:"62402e166f29ded2281a",5749:"94fdb0b9de2377c1f193",5802:"c121ed73dfe2d77c8842",5814:"d5ab7cee0eef713156f6",5817:"56eb12c51e63f5e21cdb",5883:"5b34d356e1dd99d25a86",5896:"8e69975716441f0831e0",5898:"19c1c78f92d00142c8fc",5918:"cae3dcdf2801c5d67f6b",5980:"9f47a148d2ab0eeb6fcf",6006:"1d34e33b267357096bcb",6032:"ed71e691c616cf9dbef7",6041:"7b7bbfa11b2c5804adf3",6051:"e66bc98173bcffdb3d39",6086:"a2465e0dcd2988e67177",6116:"bf663f87fe90bb318923",6145:"24d09ef5da2871be570d",6147:"a12106d5f9cb6ec32ae4",6167:"b808a73d245cbf07f8f5",6181:"18fbc25a23722d14ee0d",6187:"ec8eae77abb972b63a84",6193:"82107a1c7136efa4ea74",6199:"0313bb92df664a8087f2",6235:"729229a4f5705b5c44e9",6254:"6a358b25b2d67d7c521b",6283:"fda91e0670ae67aa43ab",6332:"6119dfe5c23a3e990dbf",6334:"fb41fd73f09833e6210d",6396:"76624289342f39dde3b0",6397:"b38f4be747bbf4386383",6448:"8afbc81120866f3c3e6a",6470:"a9f4fc47f519cc77e89a",6503:"b5060750f90f16bca16d",6528:"f3147a503cf3635568fc",6565:"9d61dc13db5e0296e360",6605:"d68be7398ab5de7870a9",6623:"cc61351e0031f9ccd97b",6627:"aafe9ad0a91e6b04d267",6644:"a6ad692105bdb6167ceb",6656:"0b3a64944d4a2fc8f062",6667:"9f28f00aef12f5bafb72",6679:"3bee0d331ca7ba9224c7",6742:"e8d8f416020965216f54",6746:"a1ae0afc9ad814ec4dc4",6763:"e11d2d16c9fa4d7c1ed5",6788:"a7af0bdef685d99b9980",6796:"c79d1e02929ff757541e",6809:"b4fce1a046e3b6302ad7",6811:"2b176e50c41180c6af38",6820:"75e4115bc6c9e877f2a9",6885:"a5b743e4ab362bdde9b5",6893:"27beab71cf469ec17fb6",6902:"15fee2244b70845cf187",6916:"a5199d0019dc522818f2",6934:"f5b636656adb3de42af5",6952:"bea877416169c0b82210",7e3:"0816f70474c842eead20",7015:"0b5d52500d57850a0650",7026:"4bdc7fc310146f2fc8d0",7031:"cf1a5d9220e7a8eec720",7075:"1d1a475d24502ac2b73f",7076:"d53465200e55646672e5",7108:"b520895a1913436ee7ee",7145:"c0d89f2afe43a6e0752f",7173:"59f7150d7f096e2ca38d",7186:"f9a8275f1c2cd735b64b",7210:"977b00b459a128e125a2",7211:"f35f8f526a7162d638dc",7217:"96f6c12ac7582efbd8b9",7230:"b79876d6b02dabb47708",7247:"b028d2a1b82503425010",7268:"5aaa819f8134894ba320",7278:"835ed521a6bc1aa2a530",7281:"a0d06b5dfa28dfa8d426",7313:"9a26f2a85f62ea803fbf",7359:"5eae4ef6603175887066",7380:"3f5d942eacc8397dfb3f",7385:"d90fafe3bde21641a682",7387:"70ef4ee2265eabdd370b",7406:"b420bfe5af6787f6de5e",7507:"33cba0a23c6be001e429",7546:"7549ba00118642fcfe10",7551:"c4292c4f143a22fa31b3",7592:"e97955e27685c19ab88c",7623:"2536e9be301542b67be5",7624:"f7e14433c890424f0f86",7625:"9af86f12ec8be72aeabb",7627:"3822d4846d85c609d867",7632:"d374bf26b069ae51b98b",7633:"b5e610cec4559713493c",7644:"a98465f96f79e7e51a5f",7665:"e3354eef0f7fbaa6bd21",7694:"e7e4f5146c851859e1da",7705:"2bc839951176f0b33cd9",7743:"90c99f662c26620c4b47",7744:"536b9b7e505dc9386abd",7772:"ded33f3b2d7251841ef6",7802:"e57eaa8424d23351dd08",7826:"b3e20617b42154c8e18d",7842:"8889453438596ae6320d",7856:"5dba1bacf772941834de",7874:"6b846c1df643186b97c3",7887:"782385ff0bc36a9df865",7935:"8e732ad219df05661245",7936:"596070cd3191b156c2cd",7940:"7d0c7fcb7f110dc63dcc",7968:"1ac65ac4a64e920ae948",7989:"82ac9fb3c8d80f387c86",8045:"5fe9ce12b998a9a41f54",8056:"3525e571caf12bd87718",8077:"980f64802b615c7d4475",8082:"f3789bf8baf14f6c8009",8135:"e03ba28cef12375dbfc7",8153:"e7dbcd201d5a6bd78fc5",8155:"0a373d373f7405ab9382",8171:"40af98b7a6d27210baaf",8223:"9d1a7c5f9c37dfb81b5b",8292:"311c0f501228763520f0",8297:"300de28cf40889277c62",8320:"40c4fce0328bd7ef0701",8331:"76db1d7184f87517b564",8334:"d3e4103aeeda62fbc562",8382:"5e0c83ae9e361ce8f126",8389:"432e3b2d10ce87e0ec84",8408:"9aad2864f0bd76321ede",8410:"906394cb351f17e7f6a4",8423:"18c7a3e516e6b0d8bc11",8444:"726af7f69b3db56a2fa5",8457:"359c7d5750d4760c9e02",8470:"e036603af2243482cf09",8485:"579a06e166d6414c50e7",8504:"9259e4fb08e3bd1f0362",8506:"9677723e369839f165a9",8507:"2f306f0b0ca6c5b97fba",8533:"46027498f01f5947f14c",8575:"3925db8dd65c94923fd8",8586:"94ea095de421ef115a77",8628:"e1e8975c7c3a58602feb",8640:"784b038d82be1b694944",8648:"60a8a3c4f8de26471ec8",8676:"9026fd14eda2cdbb3286",8720:"a4ed6b5a21457218adcd",8734:"fbd96e580b19c2c97612",8749:"8fb270b71122525306a6",8769:"8c7fa5a6988118e0b5a1",8797:"9deaec83e400981cd9fc",8818:"fe2aaef74e9f8a4ade5a",8848:"9f021bc10fa198e9dcfa",8849:"16cde5be2ca6e594b66d",8909:"14279dec1e8204f607dc",8918:"64320ba16433f96bb441",8972:"efebdd60cd5d26b36733",8992:"fd365d397bd82a8ba150",8996:"7971b46710ca68e3e123",9010:"980e0b17aaa9d9251ddc",9017:"85906eb405bf67bb6a57",9067:"a7d6318b3ce56c5a35c6",9072:"63da80829cd0a1d88408",9073:"965fd3940de14a33bfd4",9115:"d23435b4adb004a8cd0b",9148:"f98ddfdebf37b402da80",9159:"16c2a936257041813bd8",9170:"dadfdc3b8cdae7831b5f",9179:"8d6dfba725203c76710f",9217:"6aec52e76ecee251ae67",9222:"abb557bbd6c95a75089f",9231:"05f14b2cb18a70620bd4",9249:"65c6d1d992a35cd5743b",9258:"631c3b7ef88337483cf1",9287:"46c92c4c0b9a3e579ca5",9289:"f30224bdbef4590589cb",9340:"d89e91753ab54f598112",9343:"e4fa1682eeae89c03987",9364:"53aa8e3d7f1935bb3cf7",9369:"27158ce14f9ee12e4aa3",9372:"22a0ab17837307aa7a05",9392:"7ea91661d9abc53d41b3",9417:"9d7798f5dbd07f84b0a6",9426:"fb7d972f1f9ddfdf85ac",9435:"106af166ebabd5124500",9476:"7aa5d2342b042dd50b54",9479:"a1e76ae6ae91d87c8ca7",9502:"7ffb827e38ca0129411d",9517:"070f595917bb6f00b5b5",9544:"2e65b68b3b18497962e7",9557:"3dc340b6e4f07f56af01",9561:"4d0de1eace4fdbb283fb",9588:"9904e06205eb73597475",9603:"6d431e640898e0e2176e",9609:"9b16a0cfd94a9fa9c33a",9623:"63eadbdb9e64fa079756",9625:"45f8bd2f580f37d97e4e",9651:"c5474f4eac58266a9bfc",9669:"09f38d65719291c1a000",9673:"970669fb835f0818e208",9685:"f4d4c4798d2f73a68780",9687:"7abb4e7b93f66655892c",9694:"b400e0b0fe8e36997451",9695:"a8fb4dbcafd9053acf81",9699:"730905509c81681e2204",9753:"a0a329c2a4f788d1b137",9755:"48b7f28e87ab722a3d0e",9776:"323bd75cc3ae7d35e179",9786:"6f5aed622dfe62c0b1d9",9797:"ed0faa050b2de4329e96",9808:"9eddaf7cccfb3ca6a66a",9861:"50eacfca0375c49967aa",9869:"af999ed0fea321c846e2",9884:"86a6a13db7110977dc29",9954:"e4de7a61b03687e9db13",9956:"9d10392b2d7574d9d8bb",9975:"ced112bdd1bf0264170f"}[e]+".js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},i="tocco-widget-showcase:",s.l=(e,t,n,r)=>{if(o[e])o[e].push(t);else{var a,c;if(void 0!==n)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==i+n){a=d;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",i+n),a.src=e),o[e]=[t];var p=(t,n)=>{a.onerror=a.onload=null,clearTimeout(f);var r=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),c&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.p="/",(()=>{var e={8792:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=s.p+s.u(t),a=new Error;s.l(i,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,a,c]=n,l=0;if(i.some((t=>0!==e[t]))){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(c)c(s)}for(t&&t(n);l<i.length;l++)o=i[l],s.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=this.webpackChunktocco_widget_showcase=this.webpackChunktocco_widget_showcase||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),s.nc=void 0;var l={};return(()=>{"use strict";s.r(l),s.d(l,{default:()=>Ge});var e=s(26396),t=s.n(e),n=s(5556),r=s.n(n),o=s(4883),i=s.n(o),a=s(6730),c=s(53303),u=s(27772),d=s(59499),p=s(44334),f=s(50083),m=s(98671),h=s(62128);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?g(Object(r),!0).forEach((function(n){t()(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=t()(t()(t()(t()(t()(t()(t()(t()(t()({},h.Ru,m.A.singleTransferReducer("widgets")),h.c6,m.A.singleTransferReducer("selectedWidget")),h.o5,m.A.singleTransferReducer("widgetConfigs")),h.$7,m.A.singleTransferReducer("selectedWidgetConfig")),h.Vr,m.A.singleTransferReducer("widgetConfig")),h.L9,m.A.singleTransferReducer("theme")),h.Kb,(function(e,t){var n=t.payload,r=n.isDevelopmentRunEnv,o=n.isWidgetManager;return y(y({},e),{},{access:{isDevelopmentRunEnv:r,isWidgetManager:o}})})),h.Gz,m.A.singleTransferReducer("mode")),h.pH,m.A.singleTransferReducer("mode")),b={widgets:[],selectedWidget:null,widgetConfigs:[],selectedWidgetConfig:null,widgetConfig:null,theme:f.A,mode:"simple",access:{isDevelopmentRunEnv:void 0,isWidgetManager:void 0}};var w=s(92207),x=s.n(w),O=s(69917),k=s(70661),S=s(89168),A="widgetConfig/FETCH_SPECIFIC_CONFIG_ENTITY_ID",j="widgetConfig/SET_SPECIFIC_CONFIG_ENTITY_ID",E=function(e){return{type:j,payload:{specificConfigEntityId:e}}},P=x().mark(C),T=x().mark(R),D=x().mark(F),_=x().mark(H);function C(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.Q7)([(0,O.p8)(h.Zz,H),(0,O.p8)(h.c6,N),(0,O.p8)(h.$7,I),(0,O.p8)(h.L4,R),(0,O.p8)(h.WJ,M),(0,O.p8)(h.$1,L),(0,O.p8)(h.qv,F),(0,O.p8)(h.pH,z)]);case 1:case"end":return e.stop()}}),P)}function N(e){var t=e.payload.selectedWidget;return x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.yJ)(h.qK(null));case 1:return e.next=2,(0,O.yJ)(E(null));case 2:return e.next=3,(0,O.yJ)((0,h.pE)(null));case 3:return e.next=4,(0,O.yJ)(h.mU(t));case 4:case"end":return e.stop()}}),e)}))()}function I(e){var t=e.payload.selectedWidgetConfig;return x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.yJ)((0,h.pE)(null));case 1:if(!t){e.next=2;break}return e.next=2,(0,O.yJ)(h.HS(t.uniqueId));case 2:case"end":return e.stop()}}),e)}))()}function R(){var e,t;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e={method:"GET"},n.next=1,(0,O.T1)(k.A.requestSaga,"showcase/widgets/",e);case 1:return t=n.sent,n.next=2,(0,O.yJ)((0,h.Oe)(t.body.widgets));case 2:case"end":return n.stop()}}),T)}function M(e){var t=e.payload.widget;return x().mark((function e(){var n,r,o;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="showcase/widgets/".concat(t.key),r={method:"GET"},e.next=1,(0,O.T1)(k.A.requestSaga,n,r);case 1:return o=e.sent,e.next=2,(0,O.yJ)((0,h.mj)(o.body.configs));case 2:case"end":return e.stop()}}),e)}))()}function L(e){var t=e.payload.widgetConfigUniqueId;return x().mark((function e(){var n,r,o;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="widget/configs/".concat(t),r={method:"GET",queryParams:{_showcase:!0}},e.next=1,(0,O.T1)(k.A.requestSaga,n,r);case 1:return o=e.sent,e.next=2,(0,O.yJ)((0,h.pE)(o.body));case 2:case"end":return e.stop()}}),e)}))()}function F(){var e,t;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e={method:"GET"},n.next=1,(0,O.T1)(k.A.requestSaga,"showcase/checkAccess",e);case 1:return t=n.sent,n.next=2,(0,O.yJ)((0,h.ZK)(t.body.isDevelopmentRunEnv,t.body.isWidgetManager));case 2:case"end":return n.stop()}}),D)}function H(){var e;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,(0,O.yJ)(h.x8());case 1:return t.next=2,(0,O.T1)(S.bA);case 2:if(!(e=t.sent)){t.next=3;break}return t.next=3,(0,O.yJ)(h.I0(e));case 3:case"end":return t.stop()}}),_)}function z(e){var t=e.payload.mode;return x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.T1)(S.cR,t);case 1:case"end":return e.stop()}}),e)}))()}var B,V,U,W=s(24843),q=s(71468),Y=s(22056),$=s.n(Y),J=s(22834),G=s(86395),K=s(56375),Q=s(90986),X=s(25763),Z=s(76242),ee=s(33150),te=s(74848);const ne=function(e){var t,n=e.intl,r=e.theme,i=e.setTheme,a=e.close,c=(0,o.useState)(JSON.stringify(r,null,4)),s=$()(c,2),l=s[0],u=s[1];return(0,te.jsxs)("div",{children:[(0,te.jsxs)(G.A.Wrapper,{children:[B||(B=(0,te.jsx)(G.A.Header,{children:(0,te.jsx)(K.Ay.H4,{children:(0,te.jsx)(J.A,{id:"client.widget-showcase.theme"})})})),(0,te.jsx)(G.A.Body,{children:(0,te.jsx)(Q.A,{label:(t="client.widget-showcase.theme",n.formatMessage({id:t})),labelPosition:"inside",children:(0,te.jsx)(X.A,{type:"code",value:l,events:{onChange:u},options:{autoFocusOnMount:!1,mode:"json"}})})})]}),(0,te.jsxs)(Z.C6,{children:[(0,te.jsx)(ee.A,{onClick:function(){u(JSON.stringify(f.A,null,4))},children:V||(V=(0,te.jsx)(J.A,{id:"client.widget-showcase.theme.reset"}))}),(0,te.jsx)(ee.A,{ink:"primary",look:"raised",onClick:function(){i(JSON.parse(l)),a()},children:U||(U=(0,te.jsx)(J.A,{id:"client.common.ok"}))})]})]})};var re={setTheme:h.Yl};const oe=(0,q.Ng)((function(e){return{theme:e.showcase.theme}}),re)((0,W.Ay)(ne));var ie,ae=s(26800),ce=s(6910);const se=function(e){var t=e.fetchSpecificConfigEntityId,n=e.loadWidgetConfig,r=e.widgetConfigKey,i=e.widgetConfigUniqueId,a=e.specificConfigEntityId,c=e.dispatchEmittedAction;(0,o.useEffect)((function(){r&&t(r)}),[t,r]);return a?a.entityName?(0,te.jsx)(ce.Ay,{entityName:a.entityName,formName:a.entityName,entityId:a.key,mode:"update",onEntityUpdated:function(){n(i)},labelPosition:"inside",docsApp:ae.Ay,emitAction:function(e){c(e)}}):ie||(ie=(0,te.jsx)(K.Ay.P,{children:(0,te.jsx)(J.A,{id:"client.widget-showcase.widgetConfiguration.noConfig"})})):null};var le={fetchSpecificConfigEntityId:function(e){return{type:A,payload:{widgetConfigKey:e}}},loadWidgetConfig:h.HS,dispatchEmittedAction:a.A.dispatchEmittedAction};const ue=(0,q.Ng)((function(e){return{widgetConfigKey:e.showcase.selectedWidgetConfig.key,widgetConfigUniqueId:e.showcase.selectedWidgetConfig.uniqueId,specificConfigEntityId:e.widgetConfig.specificConfigEntityId}}),le)((0,W.Ay)(se));var de,pe=s(90179),fe=s.n(pe),me=s(72189),he=s.n(me),ge=s(51510),ye=s(5016),ve=s(26166),be=(0,ge.Ay)(ye.pR).withConfig({displayName:"StyledInputCode"})(de||(de=he()(["\n && {\n padding: ",";\n }\n"])),ve.A.space(.3));const we=function(e){var t=e.input,n=fe()(t,["customTheme"]);return(0,te.jsx)(be,{children:JSON.stringify(n,null,4)})};var xe=s(52381);function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Oe(Object(r),!0).forEach((function(n){t()(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Se=x().mark(Pe),Ae=x().mark(Te),je=x().mark(De),Ee=function(e){return e.app.messages};function Pe(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.Q7)([(0,O.p8)(xe.de,Te),(0,O.p8)(xe.vc,De),(0,O.p8)(xe.MW,_e)]);case 1:case"end":return e.stop()}}),Se)}function Te(){var e;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,(0,O.Lt)(Ee);case 1:return e=t.sent,t.next=2,(0,O.yJ)(d.A.modal("widget-config-edit",e["client.widget-showcase.widgetConfiguration"],null,ue,!0));case 2:case"end":return t.stop()}}),Ae)}function De(){var e;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,(0,O.Lt)(Ee);case 1:return e=t.sent,t.next=2,(0,O.yJ)(d.A.modal("theme-edit",e["client.widget-showcase.theme"],null,oe,!0));case 2:case"end":return t.stop()}}),je)}function _e(e){var t=e.payload.input;return x().mark((function e(){var n,r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.Lt)(Ee);case 1:return n=e.sent,r=function(e){return(0,te.jsx)(we,ke({input:t},e))},e.next=2,(0,O.yJ)(d.A.modal("widget-input-view",n["client.widget-showcase.widgetInput"],null,r,!0));case 2:case"end":return e.stop()}}),e)}))()}var Ce=t()({},j,m.A.singleTransferReducer("specificConfigEntityId")),Ne={specificConfigEntityId:null};var Ie=x().mark(Re);function Re(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.Q7)([(0,O.p8)(A,Me)]);case 1:case"end":return e.stop()}}),Ie)}function Me(e){var t=e.payload.widgetConfigKey;return x().mark((function e(){var n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,O.T1)(k.A.requestSaga,"/widget/configs/".concat(t,"/specific-config"));case 1:return n=e.sent,e.next=2,(0,O.yJ)(E(n.body));case 2:case"end":return e.stop()}}),e)}))()}const Le={showcase:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,t=arguments.length>1?arguments[1]:void 0,n=v[t.type];return n?n(e,t):e},widgetConfig:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ne,t=arguments.length>1?arguments[1]:void 0,n=Ce[t.type];return n?n(e,t):e}};var Fe=[C,Pe,Re];const He={name:"widget-showcase",fontFamily:{monospace:"Ubuntu Mono, monospace",regular:"Ubuntu, sans-serif",url:"https://fonts.googleapis.com/css?family=Ubuntu+Mono:300,500|Ubuntu:300,500&display=swap"},fontSize:{base:1,factor:1.1},fontWeights:{regular:300,bold:300},radii:{button:"20px"},space:{base:1,factor:2}};var ze,Be;function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Ve(Object(r),!0).forEach((function(n){t()(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var We="widget-showcase",qe=i().lazy((function(){return s.e(9231).then(s.bind(s,653))})),Ye=function(){return ze||(ze=(0,te.jsx)("div",{children:(0,te.jsx)(o.Suspense,{fallback:"",children:(0,te.jsx)(qe,{})})}))},$e=function(e,t,n,r){var o=Be||(Be=(0,te.jsx)(Ye,{})),i=Ue(Ue({},t),{},{customTheme:He}),s=c.A.createStore(Le,Fe,i,We);return a.A.addToStore(s),d.A.addToStore(s,!0),c.A.createApp(We,o,s,{input:i,events:n,actions:[],publicPath:r,textResourceModules:["component","common",We]})};c.A.registerAppInRegistry(We,$e);var Je=function(e){return c.A.useApp({initApp:$e,props:e,packageName:We}).component};Je.propTypes={appContext:p.A.propTypes.isRequired,selection:u.A.propType.isRequired,baseRoute:r().string};const Ge=Je})(),l})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tocco-widget-showcase",
3
- "version": "3.15.36",
3
+ "version": "3.15.37",
4
4
  "description": "",
5
5
  "license": "AGPL-3.0+",
6
6
  "main": "dist/index.js",
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunktocco_widget_showcase=this.webpackChunktocco_widget_showcase||[]).push([[1556],{51368(e,t,n){n.r(t),n.d(t,{default:()=>u});var r=n(24843),i=n(6910),o=n(25133),a=n(26800),s=n(1636),c=n(78240),l=n(31085),d=n(74848);const u=(0,l.S)((0,r.Ay)((function(e){var t=e.path,n=e.context,r=e.onSuccess,l=e.intl,u=e.locale,y=e.emitAction,p=(0,c.A)(t),f=p?[{id:"rel".concat(p.model),value:p.key}]:[],m=(0,s.A)(n,"Domain");return(0,d.jsx)(i.Ay,{entityName:"Domain",formName:m,mode:"create",defaultValues:f,locale:u,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Domain/".concat(t)}]}}];r({title:l.formatMessage({id:"client.docs-browser.createDomainSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||y(e)},listApp:o.Ay,docsApp:a.Ay,labelPosition:"inside"})})))},28824(e,t,n){n.r(t),n.d(t,{default:()=>u});var r=n(24843),i=n(6910),o=n(25133),a=n(26800),s=n(1636),c=n(78240),l=n(31085),d=n(74848);const u=(0,l.S)((0,r.Ay)((function(e){var t=e.context,n=e.path,r=e.onSuccess,l=e.intl,u=e.locale,y=e.emitAction,p=(0,c.A)(n),f=p?[{id:"rel".concat(p.model),value:p.key}]:[],m=(0,s.A)(t,"Folder");return(0,d.jsx)(i.Ay,{entityName:"Folder",formName:m,mode:"create",defaultValues:f,locale:u,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Folder/".concat(t)}]}}];r({title:l.formatMessage({id:"client.docs-browser.createFolderSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||y(e)},listApp:o.Ay,docsApp:a.Ay,labelPosition:"inside"})})))},12876(e,t,n){n.r(t),n.d(t,{default:()=>Ot});var r,i=n(26396),o=n.n(i),a=n(5556),s=n.n(a),c=n(6730),l=n(53303),d=n(12199),u=n(59499),y=n(27772),p=n(61502),f=n(24843),m=n(71468),g="root/LOAD_DIALOG_INFO",A="delete/SET_DELETE_DIALOG_INFO",v="delete/DO_DELETE",x="delete/SET_DELETING_IN_PROGRESS",h="delete/ON_CANCEL",b="delete/SET_ENTITIES_TO_DELETE",E="delete/SOCKET_MESSAGE_RECEIVED",j=function(e){return{type:A,payload:{dialogInfo:e}}},k=function(){return{type:v}},S=function(e){return{type:b,payload:{entitiesToDelete:e}}},O=function(e){return{type:E,payload:{data:e}}},N=n(4883),D=n.n(N),T=n(88208),w=n(22834),L=n(69556),I=n(56375),P=n(21259),_=n.n(P),C=n(22056),R=n.n(C),B=n(72189),F=n.n(B),M=n(51510),U=n(3634),J=n(74848);const G=function(e){var t,n=e.deleteEntityProp,i=e.children,o=e.maxCountLink;if(n.keys.length<o&&(!n.keysOtherBu||0===n.keysOtherBu.length))return i;var a=(0,J.jsxs)(J.Fragment,{children:[n.keys.length>o&&(r||(r=(0,J.jsx)(I.Ay.P,{children:(0,J.jsx)(w.A,{id:"client.delete.tooManyRecords"})}))),(null===(t=n.keysOtherBu)||void 0===t?void 0:t.length)>0&&(0,J.jsx)(I.Ay.P,{children:(0,J.jsx)(w.A,{id:"client.delete.recordInOtherBU",values:{count:n.keysOtherBu.length}})})]});return(0,J.jsx)(U.A,{content:a,placement:"top",children:i})};var W,q,K=M.Ay.span.withConfig({displayName:"NonBreakingText"})(W||(W=F()(["\n white-space: nowrap;\n"])));const V=function(e){var t=e.rootEntities,n=e.relatedEntities,r=e.maxCountLink,i=e.navigationStrategy;return(0,J.jsxs)(I.Ay.Span,{children:[(0,J.jsx)(I.Ay.B,{children:Object.entries(t).map((function(e){var t=R()(e,2),n=t[0],o=t[1];return(0,J.jsxs)("span",{children:[o.entityLabel," (",(0,J.jsx)(G,{deleteEntityProp:o,maxCountLink:r,children:o.keys.length>0&&i.ListLink?(0,J.jsx)(i.ListLink,{entityName:n,entityKeys:o.keys.slice(0,r),children:o.keys.length}):(0,J.jsx)(I.Ay.Span,{children:o.keys.length})}),")"]},"root-entity-".concat(n))})).reduce((function(e,t){return[].concat(_()(e),[t,", "])}),[]).slice(0,-1)}),Object.keys(n).length>0&&(0,J.jsxs)(J.Fragment,{children:[q||(q=(0,J.jsx)("span",{children:" / "})),Object.keys(n).map((function(e){var t=n[e],o=[].concat(_()(t.keys),_()(t.keysOtherBu)).length,a=t.keys.length>0&&i.ListLink?(0,J.jsx)(i.ListLink,{entityName:e,entityKeys:t.keys.slice(0,r),children:o}):(0,J.jsx)(I.Ay.Span,{children:o}),s=(0,J.jsx)(G,{deleteEntityProp:t,maxCountLink:r,children:a});return(0,J.jsx)(D().Fragment,{children:(0,J.jsxs)(K,{children:[t.entityLabel," (",s,")"]})},"entity-info-"+e)})).reduce((function(e,t){return[].concat(_()(e),[t,", "])}),[]).slice(0,-1)]})]})};var z,H,Q,X=n(26166),Y=M.Ay.div.withConfig({displayName:"StyledIconWrapper"})(z||(z=F()(["\n margin-bottom: ",";\n"])),X.A.space(.2));const Z=function(e){var t=e.dialogInfo,n=e.navigationStrategy;return(0,J.jsxs)(J.Fragment,{children:[H||(H=(0,J.jsx)(Y,{children:(0,J.jsx)(L.A,{size:"30px"})})),Q||(Q=(0,J.jsx)(I.Ay.P,{children:(0,J.jsx)(w.A,{id:"client.delete.deleteInProgress"})})),(0,J.jsx)(V,{rootEntities:t.rootEntitiesDeletable,relatedEntities:t.relatedDeletable,maxCountLink:100,navigationStrategy:n},"infopart-deletable")]})};var $={doDelete:k};const ee=(0,m.Ng)((function(e,t){return{dialogInfo:e.del.dialogInfo,navigationStrategy:e.input.navigationStrategy}}),$)((0,f.Ay)(Z));var te,ne=n(82064),re=n(77271),ie=n(93564),oe=n(57488),ae=[re.A.condition.BASE,re.A.condition.INFO,re.A.condition.DANGER,re.A.condition.SUCCESS,re.A.condition.WARNING],se=o()(o()(o()(o()(o()({},re.A.condition.BASE,oe.t7.color("signal.neutral")),re.A.condition.DANGER,oe.t7.color("signal.dangerLight")),re.A.condition.SUCCESS,oe.t7.color("signal.successLight")),re.A.condition.WARNING,oe.t7.color("signal.warningLight")),re.A.condition.INFO,oe.t7.color("signal.infoLight")),ce=M.Ay.div.withConfig({displayName:"StyledSignalBox"})(te||(te=F()(["\n && {\n background-color: ",";\n padding: "," ",";\n border-radius: ",";\n\n &:not(:last-child) {\n margin-bottom: ",";\n }\n\n * {\n color: #000; /* black in all themes */\n }\n\n "," {\n margin-right: ",";\n }\n }\n"])),(function(e){var t=e.condition;return se[ae.includes(t)?t:re.A.condition.INFO]}),X.A.space(-1),X.A.space(-.3),oe.t7.radii("statusLabel"),X.A.space(-1),ie.i,X.A.space(-1));ce.propTypes={condition:re.A.oneOfPropTypeAndCompletelyMapped(ae,se)};const le=function(e){var t=e.condition,n=void 0===t?re.A.condition.BASE:t,r=e.title,i=e.children,o=e.meta;return(0,J.jsxs)(ce,{condition:n,children:[r&&(0,J.jsx)(I.Ay.H5,{children:r}),i,o&&(0,J.jsx)(I.Ay.Small,{children:o})]})};var de,ue,ye,pe,fe,me,ge,Ae,ve,xe=n(33150),he=n(76242),be=M.Ay.div.withConfig({displayName:"StyledSectionWrapper"})(de||(de=F()(["\n padding-top: ",";\n"])),X.A.space(.6)),Ee=M.Ay.div.withConfig({displayName:"StyledButtonsWrapper"})(ue||(ue=F()(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),he.Ay);const je=function(e){var t=e.dialogInfo,n=t.rootEntitiesDeletable,r=t.rootEntitiesNotDeletable,i=t.relatedDeletable,o=t.relatedNotDeletable,a=t.hasUnreadableEntities,s=t.limitExceeded,c=e.doDelete,l=e.onCancel,d=e.navigationStrategy;return(0,ne.L)(l),s?ye||(ye=(0,J.jsx)(I.Ay.P,{children:(0,J.jsx)(w.A,{id:"client.delete.limitExceededText"})})):(0,J.jsxs)(J.Fragment,{children:[Object.keys(n).length>0&&(0,J.jsxs)(be,{children:[pe||(pe=(0,J.jsx)(I.Ay.P,{children:(0,J.jsx)(w.A,{id:"client.delete.confirmText"})})),(0,J.jsx)(V,{rootEntities:n,relatedEntities:i,maxCountLink:100,navigationStrategy:d},"infopart-deletable")]}),Object.keys(r).length>0&&(0,J.jsxs)(be,{children:[fe||(fe=(0,J.jsx)(I.Ay.P,{children:(0,J.jsx)(w.A,{id:"client.delete.textNotDeletable"})})),(0,J.jsx)(V,{rootEntities:r,relatedEntities:o,maxCountLink:100,navigationStrategy:d},"infopart-notdeletable")]}),0===Object.keys(n).length&&0===Object.keys(r).length&&(me||(me=(0,J.jsx)(be,{children:(0,J.jsx)(I.Ay.P,{children:(0,J.jsx)(w.A,{id:"client.delete.errorMessage"})})}))),a&&(ge||(ge=(0,J.jsx)(be,{children:(0,J.jsx)(le,{condition:"warning",children:(0,J.jsx)(I.Ay.Span,{children:(0,J.jsx)(w.A,{id:"client.delete.unreadableEntities"})})})}))),(0,J.jsx)(be,{children:(0,J.jsxs)(Ee,{children:[(0,J.jsx)(xe.A,{onClick:c,disabled:Object.keys(n).every((function(e){return 0===n[e].keys.length})),"data-cy":"btn-delete-ok",children:Ae||(Ae=(0,J.jsx)(w.A,{id:"client.delete.deleteButton"}))}),(0,J.jsx)(xe.A,{ink:"primary",look:"raised",onClick:l,"data-cy":"btn-delete-cancel",children:ve||(ve=(0,J.jsx)(w.A,{id:"client.delete.cancelButton"}))})]})})]})};var ke={doDelete:k,onCancel:function(){return{type:h}}};const Se=(0,m.Ng)((function(e,t){return{dialogInfo:e.del.dialogInfo,navigationStrategy:e.input.navigationStrategy}}),ke)((0,f.Ay)(je));var Oe,Ne;const De=function(e){var t=e.loadDialogInfo,n=e.dialogInfo,r=e.deletingInProgress,i=e.intl;(0,N.useEffect)((function(){t()}),[t]);var o;return r?Oe||(Oe=(0,J.jsx)(ee,{})):(0,J.jsx)(T.A,{required:[n],loadingText:(o="client.delete.loadingText",i.formatMessage({id:o})),children:n&&(Ne||(Ne=(0,J.jsx)(Se,{})))})};var Te={loadDialogInfo:function(){return{type:g}}};const we=(0,m.Ng)((function(e,t){return{dialogInfo:e.del.dialogInfo,deletingInProgress:e.del.deletingInProgress}}),Te)((0,f.Ay)(De));var Le=n(98671),Ie=o()(o()(o()({},A,Le.A.singleTransferReducer("dialogInfo")),b,Le.A.singleTransferReducer("entitiesToDelete")),x,Le.A.singleTransferReducer("deletingInProgress")),Pe={dialogInfo:null,entitiesToDelete:null,deletingInProgress:!1};var _e=n(92207),Ce=n.n(_e),Re=n(69917),Be=n(70661),Fe=n(48673);const Me=function(e){var t=e.errors.map((function(e){var t=e.entityValidatorErrors;return Object.keys(t).map((function(e){return(0,J.jsx)(Fe.A.List,{children:t[e].map((function(t,n){return(0,J.jsx)(Fe.A.Item,{label:t},"entity-".concat(e,"-").concat(n))}))},e)}))}));return(0,J.jsx)(J.Fragment,{children:t})};var Ue=n(58156),Je=n.n(Ue);function Ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function We(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ge(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qe="DELETABLE",Ke=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t.rootEntity,i=r.entityName,a=r.entityLabel,s=r.key;if(s.includes("/")){var c=s.split("/"),l=R()(c,2),d=l[0],u=l[1];return We(We({},e),{},o()({},d,{entityLabel:a,keys:[].concat(_()(Je()(e,[d,"keys"],[])),_()(n?[u]:[]))}))}return We(We({},e),{},o()({},i,{entityLabel:a,keys:[].concat(_()(Je()(e,[i,"keys"],[])),_()(n?[s]:[]))}))},Ve=function(e){return e.rootEntity.deleteStatus===qe&&!e.affectedEntities.find((function(e){return e.deleteStatus!==qe}))},ze=function(e,t){var n=e.entitiesToDelete;return e.limitExceeded?{limitExceeded:!0}:n.reduce((function(e,n){var r=Ve(n),i=r?"relatedDeletable":"relatedNotDeletable";return We(We(We({},e),{},{rootEntitiesDeletable:Ke(e.rootEntitiesDeletable,n,r)},!r&&{rootEntitiesNotDeletable:Ke(e.rootEntitiesNotDeletable,n)}),{},o()({},i,function(e,t,n,r){return We({},t.affectedEntities.reduce((function(e,t){return We(We({},e),n||t.deleteStatus!==qe?o()({},t.entityName,We(We({},Je()(e,t.entityName,{keys:[],keysOtherBu:[],entityLabel:t.entityLabel})),null===t.businessUnitId||t.businessUnitId===r?{keys:Array.from(new Set([].concat(_()(Je()(e,[t.entityName,"keys"],[])),[t.key])))}:{keysOtherBu:Array.from(new Set([].concat(_()(Je()(e,[t.entityName,"keysOtherBu"],[])),[t.key])))})):{})}),We({},e)))}(e[i],n,r,t)))}),{rootEntitiesDeletable:{},rootEntitiesNotDeletable:{},relatedDeletable:{},relatedNotDeletable:{},hasUnreadableEntities:!!n.find((function(e){return e.unreadableEntities}))})},He=function(e){var t=e.entitiesToDelete;return{entityName:Je()(t,"[0].rootEntity.entityName"),keys:t.reduce((function(e,t){return[].concat(_()(e),_()(Ve(t)?[t.rootEntity.key]:[]))}),[])}},Qe=s().shape({entityLabel:s().string.isRequired,keys:s().arrayOf(s().string).isRequired,keysOtherBu:s().arrayOf(s().string)}),Xe=(s().shape({rootEntitiesDeletable:s().objectOf(Qe),rootEntitiesNotDeletable:s().objectOf(Qe),relatedDeletable:s().objectOf(Qe),relatedNotDeletable:s().objectOf(Qe),hasUnreadableEntities:s().bool,limitExceeded:s().bool}),Ce().mark(st)),Ye=Ce().mark(ct),Ze=Ce().mark(lt),$e=Ce().mark(dt),et=Ce().mark(ut),tt=Ce().mark(yt),nt=Ce().mark(pt),rt=Ce().mark(mt),it=function(e){return e.input},ot=function(e){return e.app.messages},at=function(e){return e.del.entitiesToDelete};function st(){var e,t,n;return Ce().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=1,(0,Re.Lt)(it);case 1:return e=r.sent,t=e.selection,r.next=2,(0,Re.T1)(y.A.getEntities,t,Be.A.fetchAllEntities);case 2:return n=r.sent,r.abrupt("return",{entityModel:n.entityName,keys:n.keys});case 3:case"end":return r.stop()}}),Xe)}function ct(){var e,t;return Ce().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=1,(0,Re.Lt)(it);case 1:return e=n.sent,t=e.customDeleteEndpoint,n.abrupt("return",t||"client/delete");case 2:case"end":return n.stop()}}),Ye)}function lt(){var e,t,n,r,i,o;return Ce().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=1,(0,Re.T1)(st);case 1:return e=a.sent,a.next=2,(0,Re.T1)(ct);case 2:return t=a.sent,a.next=3,(0,Re.T1)(Be.A.requestSaga,"".concat(t,"/dialog"),{method:"POST",body:e,acceptedStatusCodes:[403]});case 3:if(!(n=a.sent).ok){a.next=9;break}return a.next=4,(0,Re.T1)(Be.A.fetchPrincipal);case 4:return r=a.sent,a.next=5,(0,Re.T1)(ze,n.body,r.currentBusinessUnit.id);case 5:return i=a.sent,a.next=6,(0,Re.yJ)(j(i));case 6:return a.next=7,(0,Re.T1)(He,n.body);case 7:return o=a.sent,a.next=8,(0,Re.yJ)(S(o));case 8:a.next=10;break;case 9:return a.next=10,(0,Re.yJ)(j({rootEntitiesDeletable:{},rootEntitiesNotDeletable:{},relatedDeletable:{},relatedNotDeletable:{},hasUnreadableEntities:!1}));case 10:case"end":return a.stop()}}),Ze)}function dt(){var e,t;return Ce().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=1,(0,Re.Lt)(at);case 1:return e=n.sent,n.next=2,(0,Re.yJ)({type:x,payload:{deletingInProgress:!0}});case 2:return n.next=3,(0,Re.T1)(ct);case 3:return t=n.sent,n.next=4,(0,Re.yJ)(p.A.addSocketReceiver("deleteAction",O));case 4:return n.prev=4,n.next=5,(0,Re.T1)(Be.A.requestSaga,t,{method:"POST",body:{entityModel:e.entityName,keys:e.keys}});case 5:n.next=7;break;case 6:return n.prev=6,n.catch(4),n.next=7,(0,Re.yJ)(p.A.removeSocketReceiver("deleteAction"));case 7:case"end":return n.stop()}}),$e,null,[[4,6]])}function ut(){return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,Re.yJ)(d.A.fireExternalEvent("onCancel"));case 1:case"end":return e.stop()}}),et)}function yt(e){var t,n;return Ce().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=1,(0,Re.yJ)(p.A.removeSocketReceiver("deleteAction"));case 1:return t=Object.keys(e.deletedEntities).reduce((function(t,n){return[].concat(_()(t),_()(e.deletedEntities[n].map((function(e){return{entityName:n,key:e}}))))}),[]),n=[{type:"entity-delete-event",payload:{entities:t}}],r.next=2,(0,Re.yJ)(d.A.fireExternalEvent("onSuccess",{title:null,remoteEvents:n}));case 2:case"end":return r.stop()}}),tt)}function pt(e){var t,n;return Ce().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=1,(0,Re.yJ)(p.A.removeSocketReceiver("deleteAction"));case 1:return r.next=2,(0,Re.Lt)(ot);case 2:if(t=r.sent,!e.information){r.next=4;break}return r.next=3,(0,Re.yJ)(d.A.fireExternalEvent("onError",{message:e.information}));case 3:case 5:r.next=7;break;case 4:if(!e.validationErrors){r.next=6;break}return n=function(){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("div",{children:t["client.delete.validationErrorMessage"]}),(0,J.jsx)(Me,{errors:e.validationErrors})]})},r.next=5,(0,Re.yJ)(d.A.fireExternalEvent("onError",{message:n}));case 6:return r.next=7,(0,Re.yJ)(d.A.fireExternalEvent("onError",{message:t["client.delete.errorMessage"]}));case 7:case"end":return r.stop()}}),nt)}function ft(e){var t=e.payload.data;return Ce().mark((function e(){var n;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.type,e.next="DELETION_START"===n?1:"FINISHED"===n?3:"ERROR"===n?5:7;break;case 1:return e.next=2,(0,Re.yJ)(d.A.fireExternalEvent("onClose"));case 2:case 4:case 6:return e.abrupt("continue",7);case 3:return e.next=4,(0,Re.T1)(yt,t.result);case 5:return e.next=6,(0,Re.T1)(pt,t.error);case 7:case"end":return e.stop()}}),e)}))()}function mt(){return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,Re.Q7)([(0,Re.p8)(g,lt),(0,Re.p8)(v,dt),(0,Re.p8)(h,ut),(0,Re.p8)(E,ft)]);case 1:case"end":return e.stop()}}),rt)}const gt={del:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pe,t=arguments.length>1?arguments[1]:void 0,n=Ie[t.type];return n?n(e,t):e}};var At,vt=[mt],xt="delete",ht=["onSuccess","onCancel","onError","onClose","emitAction"],bt=function(e,t,n,r){var i=At||(At=(0,J.jsx)(we,{})),o=l.A.createStore(gt,vt,t,xt);c.A.addToStore(o,(function(e){return e.input.emitAction}));var a=!n.emitAction;return u.A.addToStore(o,a),p.A.addToStore(o,!a),d.A.addToStore(o,(function(e){return l.A.getEvents(ht,e.input)})),l.A.createApp(xt,i,o,{input:t,events:n,actions:[],publicPath:r,textResourceModules:["component","common",xt]})};l.A.registerAppInRegistry(xt,bt);var Et=function(e){return l.A.useApp({initApp:bt,props:e,packageName:xt,externalEvents:ht}).component};Et.propTypes={selection:y.A.propType.isRequired,customDeleteEndpoint:s().string};const jt=Et;l.A.createBundleableApp(xt,bt,Et);function kt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kt(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ot=function(e){return(0,J.jsx)(jt,St(St({},e),{},{customDeleteEndpoint:"documents/delete/websocket"}))}},62896(e,t,n){n.r(t),n.d(t,{default:()=>p});var r=n(22056),i=n.n(r),o=n(4883),a=n(6910),s=n(25133),c=n(40676),l=n(26800),d=n(1636),u=n(31085),y=n(74848);const p=(0,u.S)((function(e){var t=e.selection,n=e.onSuccess,r=e.onCancel,u=e.locale,p=e.context,f=e.emitAction,m=e.navigate,g=e.navigationStrategy,A=t.ids[0].split("/"),v=i()(A,2),x=v[0],h=v[1];(0,o.useEffect)((function(){"Resource"===x&&(m("/docs/doc/".concat(h,"/detail")),r())}),[x,h,m,r]);var b=(0,d.A)(p,x);return(0,y.jsx)(a.Ay,{entityName:x,formName:b,entityId:h,mode:"update",locale:u,onEntityUpdated:function(){var e=[{type:"entity-update-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},onEntityDeleted:function(){var e=[{type:"entity-delete-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||f(e)},listApp:s.Ay,docsApp:l.Ay,labelPosition:"inside",customActions:{history:function(e,t,n,r,i,o,a){g.navigateToPath({pathname:(0,c.K)(t),inNewTab:!0})}}})}))},19760(e,t,n){n.r(t),n.d(t,{default:()=>T});var r,i,o,a=n(24843),s=n(71468),c=n(9675),l=n(31085),d=n(22056),u=n.n(d),y=n(72189),p=n.n(y),f=n(2404),m=n.n(f),g=n(4883),A=n(22834),v=n(51510),x=n(76242),h=n(88208),b=n(33150),E=n(26800),j=n(78240),k=n(74848),S=v.Ay.div.withConfig({displayName:"StyledButtonsWrapper"})(r||(r=p()(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),x.Ay),O=(0,v.Ay)(h.A).withConfig({displayName:"StyledLoadMask"})(i||(i=p()(["\n height: auto;\n"]))),N=function(e,t){return null!==e?"Move_docs_list_item":null!==t?"Move_root_docs_list_item_specific":"Move_root_docs_list_item"},D={initialize:c.n_,moveElements:c.BQ};const T=(0,l.S)((0,s.Ng)((function(e){return{isWaiting:e.docs.move.isWaiting,domainTypes:e.input.domainTypes,rootNodes:e.input.rootNodes,businessUnit:e.input.businessUnit,locale:e.app.locale}}),D)((0,a.Ay)((function(e){var t=e.selection,n=e.onSuccess,r=e.onError,i=e.path,a=e.initialize,s=e.moveElements,c=e.isWaiting,l=e.domainTypes,d=e.rootNodes,y=e.businessUnit,p=e.locale,f=e.emitAction,v=(0,j.A)(i),x={model:"Docs_list_item",key:"".concat(v.model,"/").concat(v.key)},h=(0,g.useState)(x),D=u()(h,2),T=D[0],w=D[1];(0,g.useEffect)((function(){a(t,n,r)}),[]);var L=function(e,t){switch(e){case"Domain":return"/docs/domain/".concat(t,"/list");case"Folder":return"/docs/folder/".concat(t,"/list");case"Resource":return;default:throw new Error("Unexpected model: ".concat(e))}};return(0,k.jsxs)(O,{required:[!c],children:[(0,k.jsx)(E.Ay,{routerType:"routerless",initialLocation:function(){if(null===T)return null;var e=T.key.split("/"),t=u()(e,2),n=t[0],r=t[1];return L(n,r)}(),listLimit:10,selectionStyle:"none",searchFormType:"none",getListFormName:N,onListParentChange:w,getCustomLocation:L,navigationStrategy:{},embedded:!0,emitAction:f,noLeftPadding:!0,domainTypes:l,rootNodes:d,businessUnit:y,sortable:!1,scrollBehaviour:"none",locale:p,selectOnRowClick:!1}),(0,k.jsx)(S,{children:(0,k.jsx)(b.A,{onClick:function(){return s(T.key,t.ids)},look:"raised",ink:"primary",disabled:null===T||m()(T,x),children:o||(o=(0,k.jsx)(A.A,{id:"client.actions.dms-move.button"}))})})]})}))))},1636(e,t,n){n.d(t,{A:()=>r});const r=function(e,t){return e.detailFormNames&&e.detailFormNames[t]?e.detailFormNames[t]:"Dms".concat(t)}}}]);